method
stringlengths
13
441k
clean_method
stringlengths
7
313k
doc
stringlengths
17
17.3k
comment
stringlengths
3
1.42k
method_name
stringlengths
1
273
extra
dict
imports
list
imports_info
stringlengths
19
34.8k
cluster_imports_info
stringlengths
15
3.66k
libraries
list
libraries_info
stringlengths
6
661
id
int64
0
2.92M
public EntityLabel withChildren(List<EntityLabel> children) { this.children = children; return this; }
EntityLabel function(List<EntityLabel> children) { this.children = children; return this; }
/** * Set the children value. * * @param children the children value to set * @return the EntityLabel object itself. */
Set the children value
withChildren
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/cognitiveservices/ms-azure-cs-luis-authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/models/EntityLabel.java", "license": "mit", "size": 4020 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,876,870
public void setRepository(ChargingStationRepository repository) { this.repository = repository; }
void function(ChargingStationRepository repository) { this.repository = repository; }
/** * Sets the charging station repository. * * @param repository the charging station repository. */
Sets the charging station repository
setRepository
{ "repo_name": "quann169/MotownBlueCurrent", "path": "operator-api/json/src/main/java/io/motown/operatorapi/json/commands/AcceptChargingStationJsonCommandHandler.java", "license": "apache-2.0", "size": 5053 }
[ "io.motown.operatorapi.viewmodel.persistence.repositories.ChargingStationRepository" ]
import io.motown.operatorapi.viewmodel.persistence.repositories.ChargingStationRepository;
import io.motown.operatorapi.viewmodel.persistence.repositories.*;
[ "io.motown.operatorapi" ]
io.motown.operatorapi;
186,560
public void publish(String channel, String message, boolean storeInHistory, Callback callback) { Hashtable args = new Hashtable(); args.put("channel", channel); args.put("message", message); args.put("callback", callback); args.put("storeInHistory", (storeInHistory)?"":"0"); ...
void function(String channel, String message, boolean storeInHistory, Callback callback) { Hashtable args = new Hashtable(); args.put(STR, channel); args.put(STR, message); args.put(STR, callback); args.put(STR, (storeInHistory)?"":"0"); publish(args); }
/** * Send a message to a channel. * * @param channel * Channel name * @param message * String to be published * @param callback * object of sub class of Callback class */
Send a message to a channel
publish
{ "repo_name": "NizarBoussarsar/java", "path": "java/srcPubnubApi/com/pubnub/api/PubnubCore.java", "license": "mit", "size": 93411 }
[ "java.util.Hashtable" ]
import java.util.Hashtable;
import java.util.*;
[ "java.util" ]
java.util;
2,652,435
private RestartContainerCmd executeRestartContainerRequest(DockerClient client, Message message) throws DockerException { LOGGER.debug("Executing Docker Restart Container Request"); String containerId = DockerHelper.getProperty(DockerConstants.DOCKER_CONTAINER_ID, configuration, message, String.cl...
RestartContainerCmd function(DockerClient client, Message message) throws DockerException { LOGGER.debug(STR); String containerId = DockerHelper.getProperty(DockerConstants.DOCKER_CONTAINER_ID, configuration, message, String.class); RestartContainerCmd restartContainerCmd = client.restartContainerCmd(containerId); Inte...
/** * Produces a restart container request * * @param client * @param message * @return * @throws DockerException */
Produces a restart container request
executeRestartContainerRequest
{ "repo_name": "sabre1041/camel", "path": "components/camel-docker/src/main/java/org/apache/camel/component/docker/producer/DockerProducer.java", "license": "apache-2.0", "size": 38109 }
[ "com.github.dockerjava.api.DockerClient", "com.github.dockerjava.api.command.RestartContainerCmd", "org.apache.camel.Message", "org.apache.camel.component.docker.DockerConstants", "org.apache.camel.component.docker.DockerHelper", "org.apache.camel.component.docker.exception.DockerException" ]
import com.github.dockerjava.api.DockerClient; import com.github.dockerjava.api.command.RestartContainerCmd; import org.apache.camel.Message; import org.apache.camel.component.docker.DockerConstants; import org.apache.camel.component.docker.DockerHelper; import org.apache.camel.component.docker.exception.DockerExceptio...
import com.github.dockerjava.api.*; import com.github.dockerjava.api.command.*; import org.apache.camel.*; import org.apache.camel.component.docker.*; import org.apache.camel.component.docker.exception.*;
[ "com.github.dockerjava", "org.apache.camel" ]
com.github.dockerjava; org.apache.camel;
1,336,283
@Override public void initialize() { updateStatus(ThingStatus.ONLINE); }
void function() { updateStatus(ThingStatus.ONLINE); }
/** * Initializes the thing handler. */
Initializes the thing handler
initialize
{ "repo_name": "openhab/openhab2", "path": "bundles/org.openhab.binding.ojelectronics/src/main/java/org/openhab/binding/ojelectronics/internal/ThermostatHandler.java", "license": "epl-1.0", "size": 14597 }
[ "org.openhab.core.thing.ThingStatus" ]
import org.openhab.core.thing.ThingStatus;
import org.openhab.core.thing.*;
[ "org.openhab.core" ]
org.openhab.core;
2,134,856
public void setCurrentFileFilter(FileFilter filter) { _currentFilter = filter; }
void function(FileFilter filter) { _currentFilter = filter; }
/** * Sets the current file filter. * @param filter the file filter */
Sets the current file filter
setCurrentFileFilter
{ "repo_name": "UnAfraid/topzone", "path": "VotingRewardAPI/src/main/java/com/github/unafraid/votingreward/util/DocumentParser.java", "license": "lgpl-3.0", "size": 20481 }
[ "java.io.FileFilter" ]
import java.io.FileFilter;
import java.io.*;
[ "java.io" ]
java.io;
2,595,120
EAttribute getPartnerEntity_Name();
EAttribute getPartnerEntity_Name();
/** * Returns the meta object for the attribute '{@link org.eclipse.bpmn2.PartnerEntity#getName <em>Name</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the attribute '<em>Name</em>'. * @see org.eclipse.bpmn2.PartnerEntity#getName() * @see #getPartne...
Returns the meta object for the attribute '<code>org.eclipse.bpmn2.PartnerEntity#getName Name</code>'.
getPartnerEntity_Name
{ "repo_name": "lqjack/fixflow", "path": "modules/fixflow-core/src/main/java/org/eclipse/bpmn2/Bpmn2Package.java", "license": "apache-2.0", "size": 1014933 }
[ "org.eclipse.emf.ecore.EAttribute" ]
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,408,283
@Pure void motionNewtonEuler1Law1D5( Vector1D<?, ?, ?> velocity, double minSpeed, double maxSpeed, double dt, Vector1D<?, ?, ?> result);
void motionNewtonEuler1Law1D5( Vector1D<?, ?, ?> velocity, double minSpeed, double maxSpeed, double dt, Vector1D<?, ?, ?> result);
/** Compute and replies a motion according * to Newton-Euler-1 equations for motion * (where acceleration is not significant). * * <p>From the first-order Newton-Euler method: * <code>movement = clamp(velocity) * dt</code> * * <p>Caution: The resulting vector has the same segment as the provided vector. ...
Compute and replies a motion according to Newton-Euler-1 equations for motion (where acceleration is not significant). From the first-order Newton-Euler method: <code>movement = clamp(velocity) * dt</code> Caution: The resulting vector has the same segment as the provided vector
motionNewtonEuler1Law1D5
{ "repo_name": "gallandarakhneorg/afc", "path": "core/maths/mathphysics/src/main/java/org/arakhne/afc/math/physics/PhysicsEngine.java", "license": "apache-2.0", "size": 16642 }
[ "org.arakhne.afc.math.geometry.d1.Vector1D" ]
import org.arakhne.afc.math.geometry.d1.Vector1D;
import org.arakhne.afc.math.geometry.d1.*;
[ "org.arakhne.afc" ]
org.arakhne.afc;
370,496
public void setDate(Date date) { this.date = date; }
void function(Date date) { this.date = date; }
/** * Set the value of date * * @param date new value of date */
Set the value of date
setDate
{ "repo_name": "bryandaniel1/diabetes-registry", "path": "netbeans/diabetesregistry/src/java/registry/BloodPressureResult.java", "license": "apache-2.0", "size": 3348 }
[ "java.sql.Date" ]
import java.sql.Date;
import java.sql.*;
[ "java.sql" ]
java.sql;
2,755,194
this.simpleJdbcTemplate = new SimpleJdbcTemplate(dataSource); }
this.simpleJdbcTemplate = new SimpleJdbcTemplate(dataSource); }
/** * Set the DataSource, typically provided via Dependency Injection. * @param dataSource the DataSource to inject */
Set the DataSource, typically provided via Dependency Injection
setDataSource
{ "repo_name": "codeApeFromChina/resource", "path": "frame_packages/java_libs/spring-2.5.6-src/tiger/mock/org/springframework/test/context/testng/AbstractTransactionalTestNGSpringContextTests.java", "license": "unlicense", "size": 5641 }
[ "org.springframework.jdbc.core.simple.SimpleJdbcTemplate" ]
import org.springframework.jdbc.core.simple.SimpleJdbcTemplate;
import org.springframework.jdbc.core.simple.*;
[ "org.springframework.jdbc" ]
org.springframework.jdbc;
656,723
public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random) { super.updateTick(par1World, par2, par3, par4, par5Random); if (par1World.getBlockMetadata(par2, par3, par4) == 0) { this.onBlockAdded(par1World, par2, par3, par4); } }
void function(World par1World, int par2, int par3, int par4, Random par5Random) { super.updateTick(par1World, par2, par3, par4, par5Random); if (par1World.getBlockMetadata(par2, par3, par4) == 0) { this.onBlockAdded(par1World, par2, par3, par4); } }
/** * Ticks the block if it's been scheduled */
Ticks the block if it's been scheduled
updateTick
{ "repo_name": "LolololTrololol/InsertNameHere", "path": "minecraft/net/minecraft/src/BlockTorch.java", "license": "gpl-2.0", "size": 10453 }
[ "java.util.Random" ]
import java.util.Random;
import java.util.*;
[ "java.util" ]
java.util;
245,414
public void testGetTablesUsingInfoSchema() throws Exception { if (versionMeetsMinimum(5, 0, 7)) { createTable("`t1-1`", "(c1 char(1))"); createTable("`t1-2`", "(c1 char(1))"); createTable("`t2`", "(c1 char(1))"); Set tableNames = new HashSet(); tab...
void function() throws Exception { if (versionMeetsMinimum(5, 0, 7)) { createTable(STR, STR); createTable(STR, STR); createTable("`t2`", STR); Set tableNames = new HashSet(); tableNames.add("t1-1"); tableNames.add("t1-2"); Properties props = new Properties(); props.put(STR, "true"); Connection conn1 = null; try { conn1...
/** * Tests the implementation of Information Schema for tables. */
Tests the implementation of Information Schema for tables
testGetTablesUsingInfoSchema
{ "repo_name": "spullara/mysql-connector-java", "path": "src/test/java/testsuite/simple/MetadataTest.java", "license": "gpl-2.0", "size": 29199 }
[ "java.sql.Connection", "java.sql.DatabaseMetaData", "java.util.HashSet", "java.util.Properties", "java.util.Set" ]
import java.sql.Connection; import java.sql.DatabaseMetaData; import java.util.HashSet; import java.util.Properties; import java.util.Set;
import java.sql.*; import java.util.*;
[ "java.sql", "java.util" ]
java.sql; java.util;
1,345,754
@JsonProperty( "max_simult_tcp_sessions_per_scan" ) public void setMaxSimultTcpSessionsPerScan( String maxSimultTcpSessionsPerScan ) { this.maxSimultTcpSessionsPerScan = maxSimultTcpSessionsPerScan; }
@JsonProperty( STR ) void function( String maxSimultTcpSessionsPerScan ) { this.maxSimultTcpSessionsPerScan = maxSimultTcpSessionsPerScan; }
/** * Sets max simult tcp sessions per scan. * * @param maxSimultTcpSessionsPerScan the max simult tcp sessions per scan */
Sets max simult tcp sessions per scan
setMaxSimultTcpSessionsPerScan
{ "repo_name": "tenable/Tenable.io-SDK-for-Java", "path": "src/main/java/com/tenable/io/api/policies/models/PolicySettings.java", "license": "mit", "size": 90382 }
[ "com.fasterxml.jackson.annotation.JsonProperty" ]
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.*;
[ "com.fasterxml.jackson" ]
com.fasterxml.jackson;
1,164,853
private ArrayList<RamRequirement> getSortedRAMInstances(Set<String> componentNames) { ArrayList<RamRequirement> ramRequirements = new ArrayList<>(); Map<String, ByteAmount> ramMap = TopologyUtils.getComponentRamMapConfig(topology); for (String componentName : componentNames) { Resource requiredReso...
ArrayList<RamRequirement> function(Set<String> componentNames) { ArrayList<RamRequirement> ramRequirements = new ArrayList<>(); Map<String, ByteAmount> ramMap = TopologyUtils.getComponentRamMapConfig(topology); for (String componentName : componentNames) { Resource requiredResource = PackingUtils.getResourceRequirement...
/** * Sort the components in decreasing order based on their RAM requirements * * @return The sorted list of components and their RAM requirements */
Sort the components in decreasing order based on their RAM requirements
getSortedRAMInstances
{ "repo_name": "streamlio/heron", "path": "heron/packing/src/java/com/twitter/heron/packing/binpacking/FirstFitDecreasingPacking.java", "license": "apache-2.0", "size": 13458 }
[ "com.twitter.heron.common.basics.ByteAmount", "com.twitter.heron.packing.RamRequirement", "com.twitter.heron.packing.utils.PackingUtils", "com.twitter.heron.spi.packing.Resource", "com.twitter.heron.spi.utils.TopologyUtils", "java.util.ArrayList", "java.util.Collections", "java.util.Map", "java.util...
import com.twitter.heron.common.basics.ByteAmount; import com.twitter.heron.packing.RamRequirement; import com.twitter.heron.packing.utils.PackingUtils; import com.twitter.heron.spi.packing.Resource; import com.twitter.heron.spi.utils.TopologyUtils; import java.util.ArrayList; import java.util.Collections; import java....
import com.twitter.heron.common.basics.*; import com.twitter.heron.packing.*; import com.twitter.heron.packing.utils.*; import com.twitter.heron.spi.packing.*; import com.twitter.heron.spi.utils.*; import java.util.*;
[ "com.twitter.heron", "java.util" ]
com.twitter.heron; java.util;
98,368
public void removeUdf(InfoPolicy policy, String serverPath) throws AerospikeException;
void function(InfoPolicy policy, String serverPath) throws AerospikeException;
/** * Remove user defined function from server nodes. * * @param policy info configuration parameters, pass in null for defaults * @param serverPath location of UDF on server nodes. Example: mylua.lua * @throws AerospikeException if remove fails */
Remove user defined function from server nodes
removeUdf
{ "repo_name": "wgpshashank/aerospike-client-java", "path": "client/src/com/aerospike/client/IAerospikeClient.java", "license": "apache-2.0", "size": 41552 }
[ "com.aerospike.client.policy.InfoPolicy" ]
import com.aerospike.client.policy.InfoPolicy;
import com.aerospike.client.policy.*;
[ "com.aerospike.client" ]
com.aerospike.client;
1,984,753
public R attempt(final BiFunction<Graph, Function<Graph, R>, R> retryStrategy) { return retryStrategy.apply(g, workToDo); }
R function(final BiFunction<Graph, Function<Graph, R>, R> retryStrategy) { return retryStrategy.apply(g, workToDo); }
/** * Try to execute a {@link Workload} with a mapper retry strategy. * * @param retryStrategy The first argument to this function is the Graph instance and the second is * the encapsulated work to be performed. The function should ultimately return the ...
Try to execute a <code>Workload</code> with a mapper retry strategy
attempt
{ "repo_name": "velo/incubator-tinkerpop", "path": "gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Transaction.java", "license": "apache-2.0", "size": 17318 }
[ "java.util.function.BiFunction", "java.util.function.Function" ]
import java.util.function.BiFunction; import java.util.function.Function;
import java.util.function.*;
[ "java.util" ]
java.util;
2,507,854
public void handleCancelOk(String consumerTag) { // no work to do log.debug("Received cancelOk signal on the rabbitMQ channel"); } /** * No-op implementation of {@link Consumer#handleCancel(String)}
void function(String consumerTag) { log.debug(STR); } /** * No-op implementation of {@link Consumer#handleCancel(String)}
/** * No-op implementation of {@link Consumer#handleCancelOk}. * * @param consumerTag * the defined consumer tag (client- or server-generated) */
No-op implementation of <code>Consumer#handleCancelOk</code>
handleCancelOk
{ "repo_name": "anoordover/camel", "path": "components/camel-rabbitmq/src/main/java/org/apache/camel/component/rabbitmq/RabbitConsumer.java", "license": "apache-2.0", "size": 13472 }
[ "com.rabbitmq.client.Consumer" ]
import com.rabbitmq.client.Consumer;
import com.rabbitmq.client.*;
[ "com.rabbitmq.client" ]
com.rabbitmq.client;
386,715
public String getName() { if (name != null) return name; else if (toObfArtifact != null) return ((File) toObfArtifact).getName(); else if (outputSpec.getBaseName() != null) return outputSpec.getBaseName().toString(); else return get...
String function() { if (name != null) return name; else if (toObfArtifact != null) return ((File) toObfArtifact).getName(); else if (outputSpec.getBaseName() != null) return outputSpec.getBaseName().toString(); else return getFile() == null ? null : getFile().getName(); }
/** * The name of the obfuscated artifact. * <p> * Defaults to the name of the obfuscated artifact {@link #getFile() file}. * @return The name. May be {@code null} if unknown at this time. */
The name of the obfuscated artifact. Defaults to the name of the obfuscated artifact <code>#getFile() file</code>
getName
{ "repo_name": "14mRh4X0r/ForgeGradle", "path": "src/main/java/net/minecraftforge/gradle/tasks/user/reobf/ObfArtifact.java", "license": "epl-1.0", "size": 10913 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
2,775,786
private void testDescendingInputTransposed(int numRows, int numCols, boolean tranU , boolean tranV , boolean testArray ) { SimpleMatrix U,S,V; int minLength = Math.min(numRows,numCols); double singularValues[] = new double[minLength]; ...
void function(int numRows, int numCols, boolean tranU , boolean tranV , boolean testArray ) { SimpleMatrix U,S,V; int minLength = Math.min(numRows,numCols); double singularValues[] = new double[minLength]; U = SimpleMatrix.wrap(RandomMatrices_DDRM.orthogonal(numRows,minLength,rand)); S = SimpleMatrix.wrap(RandomMatrice...
/** * Use the transpose flags and see what happens */
Use the transpose flags and see what happens
testDescendingInputTransposed
{ "repo_name": "lessthanoptimal/ejml", "path": "main/ejml-ddense/test/org/ejml/dense/row/TestSingularOps_DDRM.java", "license": "apache-2.0", "size": 17882 }
[ "org.ejml.UtilEjml", "org.ejml.simple.SimpleMatrix", "org.junit.jupiter.api.Assertions" ]
import org.ejml.UtilEjml; import org.ejml.simple.SimpleMatrix; import org.junit.jupiter.api.Assertions;
import org.ejml.*; import org.ejml.simple.*; import org.junit.jupiter.api.*;
[ "org.ejml", "org.ejml.simple", "org.junit.jupiter" ]
org.ejml; org.ejml.simple; org.junit.jupiter;
426,366
private boolean advance(final Consumer<? super String> action, final boolean all) { final int digits = digits(); final String separator = getSeparator(); if (normalized == null) { normalized = new DirectPosition2D(); } boolean found = f...
boolean function(final Consumer<? super String> action, final boolean all) { final int digits = digits(); final String separator = getSeparator(); if (normalized == null) { normalized = new DirectPosition2D(); } boolean found = false; try { do { if (pending != null) { action.accept(pending); pending = null; found = tru...
/** * Implementation of {@link #tryAdvance(Consumer)} and {@link #forEachRemaining(Consumer)}. * The {@code all} argument specifies whether this method is invoked for a single element * or for all remaining ones. */
Implementation of <code>#tryAdvance(Consumer)</code> and <code>#forEachRemaining(Consumer)</code>. The all argument specifies whether this method is invoked for a single element or for all remaining ones
advance
{ "repo_name": "Geomatys/sis", "path": "core/sis-referencing-by-identifiers/src/main/java/org/apache/sis/referencing/gazetteer/MilitaryGridReferenceSystem.java", "license": "apache-2.0", "size": 117638 }
[ "org.apache.sis.geometry.DirectPosition2D", "org.apache.sis.geometry.Shapes2D", "org.apache.sis.internal.jdk8.Consumer", "org.apache.sis.util.resources.Errors", "org.opengis.referencing.operation.TransformException", "org.opengis.util.FactoryException" ]
import org.apache.sis.geometry.DirectPosition2D; import org.apache.sis.geometry.Shapes2D; import org.apache.sis.internal.jdk8.Consumer; import org.apache.sis.util.resources.Errors; import org.opengis.referencing.operation.TransformException; import org.opengis.util.FactoryException;
import org.apache.sis.geometry.*; import org.apache.sis.internal.jdk8.*; import org.apache.sis.util.resources.*; import org.opengis.referencing.operation.*; import org.opengis.util.*;
[ "org.apache.sis", "org.opengis.referencing", "org.opengis.util" ]
org.apache.sis; org.opengis.referencing; org.opengis.util;
1,634,195
return AdditionalInformationDocument.class; }
return AdditionalInformationDocument.class; }
/** * Get the Class representation of the domain object that this DAO is representing. * * @return Class representation of the domain object that this DAO is representing. */
Get the Class representation of the domain object that this DAO is representing
domainClass
{ "repo_name": "NCIP/caaers", "path": "caAERS/software/core/src/main/java/gov/nih/nci/cabig/caaers/dao/AdditionalInformationDocumentDao.java", "license": "bsd-3-clause", "size": 2548 }
[ "gov.nih.nci.cabig.caaers.domain.AdditionalInformationDocument" ]
import gov.nih.nci.cabig.caaers.domain.AdditionalInformationDocument;
import gov.nih.nci.cabig.caaers.domain.*;
[ "gov.nih.nci" ]
gov.nih.nci;
892,128
public static Vector<OCFile> sortByName(Vector<OCFile> files){ final Integer val; if (mSortAscending){ val = 1; } else { val = -1; }
static Vector<OCFile> function(Vector<OCFile> files){ final Integer val; if (mSortAscending){ val = 1; } else { val = -1; }
/** * Sorts list by Name * @param files files to sort */
Sorts list by Name
sortByName
{ "repo_name": "duke8804/Iluq-Cloud", "path": "src/com/owncloud/android/utils/FileStorageUtils.java", "license": "gpl-2.0", "size": 11242 }
[ "com.iluq_cloud.android.datamodel.OCFile", "java.util.Vector" ]
import com.iluq_cloud.android.datamodel.OCFile; import java.util.Vector;
import com.iluq_cloud.android.datamodel.*; import java.util.*;
[ "com.iluq_cloud.android", "java.util" ]
com.iluq_cloud.android; java.util;
2,707,840
private static String replaceURLPlaceholders(String accessURL, HttpServletRequest request) { if (StringUtils.isBlank(accessURL)) { return accessURL; } if (!accessURL.contains("${UserTenantHint}")) { return accessURL; } String userTenantHint = request.g...
static String function(String accessURL, HttpServletRequest request) { if (StringUtils.isBlank(accessURL)) { return accessURL; } if (!accessURL.contains(STR)) { return accessURL; } String userTenantHint = request.getParameter("ut"); if (StringUtils.isBlank(userTenantHint)) { userTenantHint = request.getParameter("t"); ...
/** * Resolve the placeholders in the access URL * * @param accessURL Access URL. * @param request Servlet Request. * @return Resolved access URL. */
Resolve the placeholders in the access URL
replaceURLPlaceholders
{ "repo_name": "omindu/carbon-identity-framework", "path": "components/authentication-framework/org.wso2.carbon.identity.application.authentication.framework/src/main/java/org/wso2/carbon/identity/application/authentication/framework/util/LoginContextManagementUtil.java", "license": "apache-2.0", "size": 14839 ...
[ "java.util.regex.Pattern", "javax.servlet.http.HttpServletRequest", "org.apache.commons.lang.StringUtils", "org.wso2.carbon.base.MultitenantConstants" ]
import java.util.regex.Pattern; import javax.servlet.http.HttpServletRequest; import org.apache.commons.lang.StringUtils; import org.wso2.carbon.base.MultitenantConstants;
import java.util.regex.*; import javax.servlet.http.*; import org.apache.commons.lang.*; import org.wso2.carbon.base.*;
[ "java.util", "javax.servlet", "org.apache.commons", "org.wso2.carbon" ]
java.util; javax.servlet; org.apache.commons; org.wso2.carbon;
834,029
public ValueNode remapColumnReferencesToExpressions() throws StandardException { return this; }
ValueNode function() throws StandardException { return this; }
/** * Remap all ColumnReferences in this tree to be clones of the * underlying expression. * * @return ValueNode The remapped expression tree. * * @exception StandardException Thrown on error */
Remap all ColumnReferences in this tree to be clones of the underlying expression
remapColumnReferencesToExpressions
{ "repo_name": "viaper/DBPlus", "path": "DerbyHodgepodge/java/engine/org/apache/derby/impl/sql/compile/ValueNode.java", "license": "apache-2.0", "size": 43555 }
[ "org.apache.derby.iapi.error.StandardException" ]
import org.apache.derby.iapi.error.StandardException;
import org.apache.derby.iapi.error.*;
[ "org.apache.derby" ]
org.apache.derby;
1,179,478
EClass getOpaqueSource();
EClass getOpaqueSource();
/** * Returns the meta object for class '{@link org.nasdanika.amur.lang.OpaqueSource <em>Opaque Source</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for class '<em>Opaque Source</em>'. * @see org.nasdanika.amur.lang.OpaqueSource * @generated */
Returns the meta object for class '<code>org.nasdanika.amur.lang.OpaqueSource Opaque Source</code>'.
getOpaqueSource
{ "repo_name": "Nasdanika/amur-lang", "path": "org.nasdanika.amur.lang/src/org/nasdanika/amur/lang/LangPackage.java", "license": "epl-1.0", "size": 45409 }
[ "org.eclipse.emf.ecore.EClass" ]
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,873,910
PublicProfile profile = new PublicProfile(); profile.setPublicProfileId(profileIdMapper.mapRow(rs, rowNum)); profile.setOwnerId(rs.getLong("owner_id")); profile.setDescription(rs.getString("profile_description")); profile.setOwnerNoteboard(rs.getString("noteboard")); return profile; }
PublicProfile profile = new PublicProfile(); profile.setPublicProfileId(profileIdMapper.mapRow(rs, rowNum)); profile.setOwnerId(rs.getLong(STR)); profile.setDescription(rs.getString(STR)); profile.setOwnerNoteboard(rs.getString(STR)); return profile; }
/** * Expects following columns (in addition to all columns expected by {@link PublicProfileIdRowMapper#mapRow(ResultSet, int)}: <pre> profile_description noteboard </pre> * * @see org.springframework.jdbc.core.RowMapper#mapRow(java.sql.ResultSet, int) */
Expects following columns (in addition to all columns expected by <code>PublicProfileIdRowMapper#mapRow(ResultSet, int)</code>:
mapRow
{ "repo_name": "Jasig/sched-assist", "path": "sched-assist-spi/src/main/java/org/jasig/schedassist/impl/owner/PublicProfileRowMapper.java", "license": "apache-2.0", "size": 2024 }
[ "org.jasig.schedassist.model.PublicProfile" ]
import org.jasig.schedassist.model.PublicProfile;
import org.jasig.schedassist.model.*;
[ "org.jasig.schedassist" ]
org.jasig.schedassist;
2,171,845
public static String getIdentifier( IJp2pPropertySource<IJp2pProperties> source ){ return source.getDirective( IJp2pDirectives.Directives.NAME ); }
static String function( IJp2pPropertySource<IJp2pProperties> source ){ return source.getDirective( IJp2pDirectives.Directives.NAME ); }
/** * Get the bundle id for the given source * @param source * @return */
Get the bundle id for the given source
getIdentifier
{ "repo_name": "chaupal/jp2p", "path": "Workspace/net.jp2p.container/src/net/jp2p/container/properties/AbstractJp2pPropertySource.java", "license": "apache-2.0", "size": 17881 }
[ "net.jp2p.container.properties.IJp2pDirectives" ]
import net.jp2p.container.properties.IJp2pDirectives;
import net.jp2p.container.properties.*;
[ "net.jp2p.container" ]
net.jp2p.container;
2,302,153
private TileCoordinates getCenteredTileCoordinates() { CameraPosition cameraPosition = this.googleMap.getCameraPosition(); return new TileCoordinates( (int)Math.floor(cameraPosition.zoom), (int)Math.floor(ProjectionUtils.lngToTileX(cameraPosition.zoom, cameraPosition.target.longitude)), (int)Math.flo...
TileCoordinates function() { CameraPosition cameraPosition = this.googleMap.getCameraPosition(); return new TileCoordinates( (int)Math.floor(cameraPosition.zoom), (int)Math.floor(ProjectionUtils.lngToTileX(cameraPosition.zoom, cameraPosition.target.longitude)), (int)Math.floor(ProjectionUtils.latToTileY(cameraPosition....
/** * Get the coordinates of the tile in the center. * * @return coordinates of the tile in the center */
Get the coordinates of the tile in the center
getCenteredTileCoordinates
{ "repo_name": "marcplouhinec/opentravelmate", "path": "android/app/src/org/opentravelmate/widget/map/TileObserver.java", "license": "gpl-3.0", "size": 6259 }
[ "com.google.android.gms.maps.model.CameraPosition" ]
import com.google.android.gms.maps.model.CameraPosition;
import com.google.android.gms.maps.model.*;
[ "com.google.android" ]
com.google.android;
1,150,436
protected ResourceLocation getEntityTexture(Entity par1Entity) { return this.getHermesTextures((EntityHermes)par1Entity); }
ResourceLocation function(Entity par1Entity) { return this.getHermesTextures((EntityHermes)par1Entity); }
/** * Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture. */
Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture
getEntityTexture
{ "repo_name": "TheCodeOff/mymod1", "path": "common/me/louw/mm1/render/RenderHermes.java", "license": "gpl-3.0", "size": 1054 }
[ "me.louw.mm1.entity.EntityHermes", "net.minecraft.entity.Entity", "net.minecraft.util.ResourceLocation" ]
import me.louw.mm1.entity.EntityHermes; import net.minecraft.entity.Entity; import net.minecraft.util.ResourceLocation;
import me.louw.mm1.entity.*; import net.minecraft.entity.*; import net.minecraft.util.*;
[ "me.louw.mm1", "net.minecraft.entity", "net.minecraft.util" ]
me.louw.mm1; net.minecraft.entity; net.minecraft.util;
2,570,233
public void rebind(String name, Object obj) throws NamingException { rebind(nameParser.parse(name), obj); }
void function(String name, Object obj) throws NamingException { rebind(nameParser.parse(name), obj); }
/** * Rebinds object obj to String name. If there is existing binding it will be overwritten. * * @param name name of the object to rebind. * @param obj object to add. Can be null. * @throws NoPermissionException if this context has been destroyed * @throws InvalidNameException if name is empty or is...
Rebinds object obj to String name. If there is existing binding it will be overwritten
rebind
{ "repo_name": "pivotal-amurmann/geode", "path": "geode-core/src/main/java/org/apache/geode/internal/jndi/ContextImpl.java", "license": "apache-2.0", "size": 29126 }
[ "javax.naming.NamingException" ]
import javax.naming.NamingException;
import javax.naming.*;
[ "javax.naming" ]
javax.naming;
2,422,641
// Test for WaitingList /////////////////////// @Test public void testEnroll() throws Exception { log.info("testEnroll: start..."); ENCourseNode enNode = new ENCourseNode(); OLATResourceable ores = OresHelper.createOLATResourceableTypeWithoutCheck("TestCourse"); CourseEnvironment cenv = CourseFactory.creat...
@Test void function() throws Exception { log.info(STR); ENCourseNode enNode = new ENCourseNode(); OLATResourceable ores = OresHelper.createOLATResourceableTypeWithoutCheck(STR); CourseEnvironment cenv = CourseFactory.createEmptyCourse(ores, "Test", "Test", STR).getCourseEnvironment(); IdentityEnvironment ienv = new Ide...
/** * Enroll 3 idenities (group with max-size=2 and waiting-list). * Cancel enrollment. Check size after each step. */
Enroll 3 idenities (group with max-size=2 and waiting-list). Cancel enrollment. Check size after each step
testEnroll
{ "repo_name": "stevenhva/InfoLearn_OpenOLAT", "path": "src/test/java/org/olat/course/nodes/en/EnrollmentManagerTest.java", "license": "apache-2.0", "size": 18390 }
[ "java.util.ArrayList", "org.junit.Assert", "org.junit.Test", "org.olat.basesecurity.BaseSecurityManager", "org.olat.core.id.IdentityEnvironment", "org.olat.core.id.OLATResourceable", "org.olat.core.util.resource.OresHelper", "org.olat.course.CourseFactory", "org.olat.course.nodes.ENCourseNode", "o...
import java.util.ArrayList; import org.junit.Assert; import org.junit.Test; import org.olat.basesecurity.BaseSecurityManager; import org.olat.core.id.IdentityEnvironment; import org.olat.core.id.OLATResourceable; import org.olat.core.util.resource.OresHelper; import org.olat.course.CourseFactory; import org.olat.course...
import java.util.*; import org.junit.*; import org.olat.basesecurity.*; import org.olat.core.id.*; import org.olat.core.util.resource.*; import org.olat.course.*; import org.olat.course.nodes.*; import org.olat.course.properties.*; import org.olat.course.run.environment.*; import org.olat.course.run.userview.*;
[ "java.util", "org.junit", "org.olat.basesecurity", "org.olat.core", "org.olat.course" ]
java.util; org.junit; org.olat.basesecurity; org.olat.core; org.olat.course;
2,160,884
public void setScrollView(View v) { mScrollView = v; }
void function(View v) { mScrollView = v; }
/** * Set which view scrolls for touch events near the edge of the screen. */
Set which view scrolls for touch events near the edge of the screen
setScrollView
{ "repo_name": "yftx/fruit.launcher", "path": "src/com/fruit/launcher/DragController.java", "license": "apache-2.0", "size": 18042 }
[ "android.view.View" ]
import android.view.View;
import android.view.*;
[ "android.view" ]
android.view;
1,790,239
private boolean isWrongLostFocusEvent() { Control controlGotFocus = Display.getCurrent().getCursorControl(); return Const.isLinux() && ( controlGotFocus == null || text.equals( controlGotFocus ) ); }
boolean function() { Control controlGotFocus = Display.getCurrent().getCursorControl(); return Const.isLinux() && ( controlGotFocus == null text.equals( controlGotFocus ) ); }
/** * This is a workaround for SWT bug (see PDI-15268). * Calling a context menu should be ignored in * SWT org.eclipse.swt.widgets.Control#gtk_event_after * * @return true if it is wrong event */
This is a workaround for SWT bug (see PDI-15268). Calling a context menu should be ignored in SWT org.eclipse.swt.widgets.Control#gtk_event_after
isWrongLostFocusEvent
{ "repo_name": "pavel-sakun/pentaho-kettle", "path": "ui/src/main/java/org/pentaho/di/ui/core/widget/TableView.java", "license": "apache-2.0", "size": 99490 }
[ "org.eclipse.swt.widgets.Control", "org.eclipse.swt.widgets.Display", "org.pentaho.di.core.Const" ]
import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Display; import org.pentaho.di.core.Const;
import org.eclipse.swt.widgets.*; import org.pentaho.di.core.*;
[ "org.eclipse.swt", "org.pentaho.di" ]
org.eclipse.swt; org.pentaho.di;
839,689
ServiceResponse<AuthorizationUserListMsg> resolveAuthorizationUserList(ServiceRequest<AuthorizationUserListMsg> rq) throws ResolveException;
ServiceResponse<AuthorizationUserListMsg> resolveAuthorizationUserList(ServiceRequest<AuthorizationUserListMsg> rq) throws ResolveException;
/** * Resolve a list of authorization users from the database. * * @param rq the ServiceRequest<AuthorizationUserListMsg>. * @return the ServiceResponse<AuthorizationUserListMsg>. * @throws ResolveException */
Resolve a list of authorization users from the database
resolveAuthorizationUserList
{ "repo_name": "NABUCCO/org.nabucco.framework.common.authorization", "path": "org.nabucco.framework.common.authorization.facade.service/src/main/gen/org/nabucco/framework/common/authorization/facade/service/resolve/ResolveAuthorization.java", "license": "epl-1.0", "size": 5717 }
[ "org.nabucco.framework.base.facade.exception.service.ResolveException", "org.nabucco.framework.base.facade.message.ServiceRequest", "org.nabucco.framework.base.facade.message.ServiceResponse", "org.nabucco.framework.common.authorization.facade.message.AuthorizationUserListMsg" ]
import org.nabucco.framework.base.facade.exception.service.ResolveException; import org.nabucco.framework.base.facade.message.ServiceRequest; import org.nabucco.framework.base.facade.message.ServiceResponse; import org.nabucco.framework.common.authorization.facade.message.AuthorizationUserListMsg;
import org.nabucco.framework.base.facade.exception.service.*; import org.nabucco.framework.base.facade.message.*; import org.nabucco.framework.common.authorization.facade.message.*;
[ "org.nabucco.framework" ]
org.nabucco.framework;
2,059,158
public void setURLRequired(boolean flag) { this.getCOSObject().setFlag(COSName.FF, FLAG_URL, flag); }
void function(boolean flag) { this.getCOSObject().setFlag(COSName.FF, FLAG_URL, flag); }
/** * set true if URL shall be required as a constraint on signature. * * @param flag if true, the specified URL shall be enforced as a constraint. */
set true if URL shall be required as a constraint on signature
setURLRequired
{ "repo_name": "TomRoush/PdfBox-Android", "path": "library/src/main/java/com/tom_roush/pdfbox/pdmodel/interactive/digitalsignature/PDSeedValueCertificate.java", "license": "apache-2.0", "size": 22688 }
[ "com.tom_roush.pdfbox.cos.COSName" ]
import com.tom_roush.pdfbox.cos.COSName;
import com.tom_roush.pdfbox.cos.*;
[ "com.tom_roush.pdfbox" ]
com.tom_roush.pdfbox;
288,912
@ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) @MethodSource("getTestParameters") public void setSecretEmptyName(HttpClient httpClient, SecretServiceVersion serviceVersion) { createSecretAsyncClient(httpClient, serviceVersion); StepVerifier.create(client.setSecret("", "A value")) ...
@ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) @MethodSource(STR) void function(HttpClient httpClient, SecretServiceVersion serviceVersion) { createSecretAsyncClient(httpClient, serviceVersion); StepVerifier.create(client.setSecret(STRA value")) .verifyErrorSatisfies(ex -> assertRestException(ex, HttpResponseEx...
/** * Tests that we cannot create a secret when the key is an empty string. */
Tests that we cannot create a secret when the key is an empty string
setSecretEmptyName
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/keyvault/azure-security-keyvault-secrets/src/test/java/com/azure/security/keyvault/secrets/SecretAsyncClientTest.java", "license": "mit", "size": 25025 }
[ "com.azure.core.exception.HttpResponseException", "com.azure.core.http.HttpClient", "java.net.HttpURLConnection", "org.junit.jupiter.params.ParameterizedTest", "org.junit.jupiter.params.provider.MethodSource" ]
import com.azure.core.exception.HttpResponseException; import com.azure.core.http.HttpClient; import java.net.HttpURLConnection; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource;
import com.azure.core.exception.*; import com.azure.core.http.*; import java.net.*; import org.junit.jupiter.params.*; import org.junit.jupiter.params.provider.*;
[ "com.azure.core", "java.net", "org.junit.jupiter" ]
com.azure.core; java.net; org.junit.jupiter;
1,157,045
protected boolean isUsedAsCallee(TestCase test, VariableReference var) { for (int pos = var.getStPosition() + 1; pos < test.size(); pos++) { Statement statement = test.getStatement(pos); if (statement instanceof MethodStatement) { if (((MethodStatement) statement).getCallee() == var) return true; ...
boolean function(TestCase test, VariableReference var) { for (int pos = var.getStPosition() + 1; pos < test.size(); pos++) { Statement statement = test.getStatement(pos); if (statement instanceof MethodStatement) { if (((MethodStatement) statement).getCallee() == var) return true; } else if (statement instanceof FieldS...
/** * Returns true if the variable var is used as callee later on in the test * * @param test * @param var * @return */
Returns true if the variable var is used as callee later on in the test
isUsedAsCallee
{ "repo_name": "claudejin/evosuite", "path": "client/src/main/java/org/evosuite/assertion/MutationAssertionGenerator.java", "license": "lgpl-3.0", "size": 13342 }
[ "org.evosuite.testcase.TestCase", "org.evosuite.testcase.statements.FieldStatement", "org.evosuite.testcase.statements.MethodStatement", "org.evosuite.testcase.statements.Statement", "org.evosuite.testcase.variable.VariableReference" ]
import org.evosuite.testcase.TestCase; import org.evosuite.testcase.statements.FieldStatement; import org.evosuite.testcase.statements.MethodStatement; import org.evosuite.testcase.statements.Statement; import org.evosuite.testcase.variable.VariableReference;
import org.evosuite.testcase.*; import org.evosuite.testcase.statements.*; import org.evosuite.testcase.variable.*;
[ "org.evosuite.testcase" ]
org.evosuite.testcase;
1,320,481
public Map<Integer, Map<Direction, Pheromone>> getPheromones() { return pheromones; }
Map<Integer, Map<Direction, Pheromone>> function() { return pheromones; }
/** * Get the map of destination-direction-pheromones. * * @return the map of pheromones */
Get the map of destination-direction-pheromones
getPheromones
{ "repo_name": "mcai/Archimulator", "path": "src/main/java/archimulator/uncore/noc/selection/aco/PheromoneTable.java", "license": "mit", "size": 3369 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
511,178
public VirtualNetworkPeeringInner withRemoteAddressSpace(AddressSpace remoteAddressSpace) { this.remoteAddressSpace = remoteAddressSpace; return this; }
VirtualNetworkPeeringInner function(AddressSpace remoteAddressSpace) { this.remoteAddressSpace = remoteAddressSpace; return this; }
/** * Set the reference of the remote virtual network address space. * * @param remoteAddressSpace the remoteAddressSpace value to set * @return the VirtualNetworkPeeringInner object itself. */
Set the reference of the remote virtual network address space
withRemoteAddressSpace
{ "repo_name": "navalev/azure-sdk-for-java", "path": "sdk/network/mgmt-v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/VirtualNetworkPeeringInner.java", "license": "mit", "size": 10986 }
[ "com.microsoft.azure.management.network.v2018_04_01.AddressSpace" ]
import com.microsoft.azure.management.network.v2018_04_01.AddressSpace;
import com.microsoft.azure.management.network.v2018_04_01.*;
[ "com.microsoft.azure" ]
com.microsoft.azure;
2,477,115
private static int getDateValueFromDate(String date, String formatString, int returnValue) throws ParseException, IllegalArgumentException { // determine position of yyyy, MM, and dd in formatString. int yearIndex = formatString.indexOf("yyyy"); int monthIndex = formatString.inde...
static int function(String date, String formatString, int returnValue) throws ParseException, IllegalArgumentException { int yearIndex = formatString.indexOf("yyyy"); int monthIndex = formatString.indexOf("MM"); int dayIndex = formatString.indexOf("dd"); int yearPosition = 0; int monthPosition = 0; int dayPosition = 0;...
/** * Parses out month, date, or year from a date string based on a given format. * @param date the date string from which to parse the values * @param formatString the format from which to interpret the date values * @param returnValue the date value to return, TimeConverter.YEAR, TimeConverter...
Parses out month, date, or year from a date string based on a given format
getDateValueFromDate
{ "repo_name": "joshforester/rdboard", "path": "src/java/com/myrunning/leaderboard/global/TimeConverter.java", "license": "mit", "size": 15857 }
[ "java.lang.IllegalArgumentException", "java.text.ParseException", "java.util.regex.Matcher", "java.util.regex.Pattern" ]
import java.lang.IllegalArgumentException; import java.text.ParseException; import java.util.regex.Matcher; import java.util.regex.Pattern;
import java.lang.*; import java.text.*; import java.util.regex.*;
[ "java.lang", "java.text", "java.util" ]
java.lang; java.text; java.util;
2,370,895
protected void addEnabledPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Constraint_enabled_feature"), getString("_UI_PropertyDescript...
void function(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString(STR), getString(STR, STR, STR), SmcPackage.Literals.CONSTRAINT__ENABLED, true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE...
/** * This adds a property descriptor for the Enabled feature. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This adds a property descriptor for the Enabled feature.
addEnabledPropertyDescriptor
{ "repo_name": "road-framework/ROADDesigner", "path": "au.edu.swin.ict.road.designer.edit/src/au/edu/swin/ict/road/designer/smc/provider/ConstraintItemProvider.java", "license": "apache-2.0", "size": 7936 }
[ "au.edu.swin.ict.road.designer.smc.SmcPackage", "org.eclipse.emf.edit.provider.ComposeableAdapterFactory", "org.eclipse.emf.edit.provider.ItemPropertyDescriptor" ]
import au.edu.swin.ict.road.designer.smc.SmcPackage; import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
import au.edu.swin.ict.road.designer.smc.*; import org.eclipse.emf.edit.provider.*;
[ "au.edu.swin", "org.eclipse.emf" ]
au.edu.swin; org.eclipse.emf;
2,813,721
public static Image createImageFromFile(final String fileName) { if (new File(fileName).exists()) { return new Image(Display.getCurrent(), fileName); } else { return new Image(Display.getCurrent(), SWTResourceManager.class.getClassLoader().getResourceAsStream(fileName)); } }
static Image function(final String fileName) { if (new File(fileName).exists()) { return new Image(Display.getCurrent(), fileName); } else { return new Image(Display.getCurrent(), SWTResourceManager.class.getClassLoader().getResourceAsStream(fileName)); } }
/** * Loads an image and create a SWT Image corresponding to this file * * @param fileName * file name of the image * @return an image * @see org.eclipse.swt.graphics.Image */
Loads an image and create a SWT Image corresponding to this file
createImageFromFile
{ "repo_name": "Agem-Bilisim/lider-console", "path": "lider-console-core/src/tr/org/liderahenk/liderconsole/core/utils/SWTResourceManager.java", "license": "lgpl-3.0", "size": 32467 }
[ "java.io.File", "org.eclipse.swt.graphics.Image", "org.eclipse.swt.widgets.Display" ]
import java.io.File; import org.eclipse.swt.graphics.Image; import org.eclipse.swt.widgets.Display;
import java.io.*; import org.eclipse.swt.graphics.*; import org.eclipse.swt.widgets.*;
[ "java.io", "org.eclipse.swt" ]
java.io; org.eclipse.swt;
1,467,932
public static String getHttpMethod(Span span) { if (isHttp(span)) { BinaryAnnotation ba = span.getBinaryAnnotation("http.method"); String httpMethod = null; if (ba != null) { httpMethod = ba.getValue().toUpperCase(); } else if (span.getName() !...
static String function(Span span) { if (isHttp(span)) { BinaryAnnotation ba = span.getBinaryAnnotation(STR); String httpMethod = null; if (ba != null) { httpMethod = ba.getValue().toUpperCase(); } else if (span.getName() != null) { httpMethod = span.getName().toUpperCase(); } if (HTTP_METHODS.contains(httpMethod)) { re...
/** * Derives HTTP operation from Span's binary annotations. * * @param span the span * @return HTTP method */
Derives HTTP operation from Span's binary annotations
getHttpMethod
{ "repo_name": "jpkrohling/hawkular-apm", "path": "server/api/src/main/java/org/hawkular/apm/server/api/utils/zipkin/SpanHttpDeriverUtil.java", "license": "apache-2.0", "size": 5338 }
[ "org.hawkular.apm.server.api.model.zipkin.BinaryAnnotation", "org.hawkular.apm.server.api.model.zipkin.Span" ]
import org.hawkular.apm.server.api.model.zipkin.BinaryAnnotation; import org.hawkular.apm.server.api.model.zipkin.Span;
import org.hawkular.apm.server.api.model.zipkin.*;
[ "org.hawkular.apm" ]
org.hawkular.apm;
2,518,115
private void initPaths() { // Path for 'in' animation: growing from 20% to 100% mPathIn = new Path(); mPathIn.moveTo(0.2f, 0.2f); mPathIn.lineTo(1f, 1f); // Path for 'out' animation: shrinking from 100% to 20% mPathOut = new Path(); mPathOut.moveTo(1f, 1f); ...
void function() { mPathIn = new Path(); mPathIn.moveTo(0.2f, 0.2f); mPathIn.lineTo(1f, 1f); mPathOut = new Path(); mPathOut.moveTo(1f, 1f); mPathOut.lineTo(0.2f, 0.2f); }
/** * Initializes the paths that are used by the ObjectAnimator to scale the view. */
Initializes the paths that are used by the ObjectAnimator to scale the view
initPaths
{ "repo_name": "android/animation-samples", "path": "Interpolator/Application/src/main/java/com/example/android/interpolator/InterpolatorFragment.java", "license": "apache-2.0", "size": 9575 }
[ "android.graphics.Path" ]
import android.graphics.Path;
import android.graphics.*;
[ "android.graphics" ]
android.graphics;
2,704,918
public List<Object> getNonFiltered() { return nonFilteredContent; }
List<Object> function() { return nonFilteredContent; }
/** * Returns the non-filtered content. * * @return all non-filtered input */
Returns the non-filtered content
getNonFiltered
{ "repo_name": "edgarmueller/emfstore-rest", "path": "bundles/org.eclipse.emf.emfstore.client.ui/src/org/eclipse/emf/emfstore/internal/client/ui/views/scm/FilteredOperationsResult.java", "license": "epl-1.0", "size": 2084 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,149,502
@VisibleForTesting protected OverrideUrlLoadingResult clobberCurrentTab(GURL url, GURL referrerUrl) { int transitionType = PageTransition.LINK; final LoadUrlParams loadUrlParams = new LoadUrlParams(url, transitionType); if (!referrerUrl.isEmpty()) { Referrer referrer = new Re...
OverrideUrlLoadingResult function(GURL url, GURL referrerUrl) { int transitionType = PageTransition.LINK; final LoadUrlParams loadUrlParams = new LoadUrlParams(url, transitionType); if (!referrerUrl.isEmpty()) { Referrer referrer = new Referrer(referrerUrl.getSpec(), ReferrerPolicy.ALWAYS); loadUrlParams.setReferrer(re...
/** * Clobber the current tab and try not to pass an intent when it should be handled internally * so that we can deliver HTTP referrer information safely. * * @param url The new URL after clobbering the current tab. * @param referrerUrl The HTTP referrer URL. * @return OverrideUrlLoadingR...
Clobber the current tab and try not to pass an intent when it should be handled internally so that we can deliver HTTP referrer information safely
clobberCurrentTab
{ "repo_name": "nwjs/chromium.src", "path": "components/external_intents/android/java/src/org/chromium/components/external_intents/ExternalNavigationHandler.java", "license": "bsd-3-clause", "size": 96618 }
[ "org.chromium.content_public.browser.LoadUrlParams", "org.chromium.content_public.common.Referrer", "org.chromium.network.mojom.ReferrerPolicy", "org.chromium.ui.base.PageTransition" ]
import org.chromium.content_public.browser.LoadUrlParams; import org.chromium.content_public.common.Referrer; import org.chromium.network.mojom.ReferrerPolicy; import org.chromium.ui.base.PageTransition;
import org.chromium.content_public.browser.*; import org.chromium.content_public.common.*; import org.chromium.network.mojom.*; import org.chromium.ui.base.*;
[ "org.chromium.content_public", "org.chromium.network", "org.chromium.ui" ]
org.chromium.content_public; org.chromium.network; org.chromium.ui;
472,084
public List<TIntArrayList> findComponents() { int nodes = graph.getNodes(); for (int start = 0; start < nodes; start++) { if (nodeIndex[start] == 0 && !ignoreSet.contains(start) && !graph.isNodeRemoved(start)) strongConn...
List<TIntArrayList> function() { int nodes = graph.getNodes(); for (int start = 0; start < nodes; start++) { if (nodeIndex[start] == 0 && !ignoreSet.contains(start) && !graph.isNodeRemoved(start)) strongConnect(start); } return components; }
/** * Find and return list of all strongly connected components in g. */
Find and return list of all strongly connected components in g
findComponents
{ "repo_name": "CEPFU/graphhopper", "path": "core/src/main/java/com/graphhopper/routing/util/TarjansSCCAlgorithm.java", "license": "apache-2.0", "size": 7026 }
[ "gnu.trove.list.array.TIntArrayList", "java.util.List" ]
import gnu.trove.list.array.TIntArrayList; import java.util.List;
import gnu.trove.list.array.*; import java.util.*;
[ "gnu.trove.list", "java.util" ]
gnu.trove.list; java.util;
503,265
@VisibleForTesting static SortedSet<String> parseProtectedDirectories(Configuration conf) { return parseProtectedDirectories(conf .getTrimmedStringCollection(FS_PROTECTED_DIRECTORIES)); }
static SortedSet<String> parseProtectedDirectories(Configuration conf) { return parseProtectedDirectories(conf .getTrimmedStringCollection(FS_PROTECTED_DIRECTORIES)); }
/** * Parse configuration setting dfs.namenode.protected.directories to * retrieve the set of protected directories. * * @param conf * @return a TreeSet */
Parse configuration setting dfs.namenode.protected.directories to retrieve the set of protected directories
parseProtectedDirectories
{ "repo_name": "plusplusjiajia/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirectory.java", "license": "apache-2.0", "size": 73906 }
[ "java.util.SortedSet", "org.apache.hadoop.conf.Configuration" ]
import java.util.SortedSet; import org.apache.hadoop.conf.Configuration;
import java.util.*; import org.apache.hadoop.conf.*;
[ "java.util", "org.apache.hadoop" ]
java.util; org.apache.hadoop;
1,894,620
public int type() { return Element.PTABLE; }
int function() { return Element.PTABLE; }
/** * Gets the type of the text element. * * @return a type */
Gets the type of the text element
type
{ "repo_name": "shitalm/jsignpdf2", "path": "src/main/java/com/lowagie/text/pdf/PdfPTable.java", "license": "gpl-2.0", "size": 50346 }
[ "com.lowagie.text.Element" ]
import com.lowagie.text.Element;
import com.lowagie.text.*;
[ "com.lowagie.text" ]
com.lowagie.text;
301,751
public synchronized Async<String> startNodeAsync() { return startNodeAsync(Settings.EMPTY, Version.CURRENT); }
synchronized Async<String> function() { return startNodeAsync(Settings.EMPTY, Version.CURRENT); }
/** * Starts a node in an async manner with the given settings and returns future with its name. */
Starts a node in an async manner with the given settings and returns future with its name
startNodeAsync
{ "repo_name": "xuzha/elasticsearch", "path": "test/framework/src/main/java/org/elasticsearch/test/InternalTestCluster.java", "license": "apache-2.0", "size": 81644 }
[ "org.elasticsearch.Version", "org.elasticsearch.common.settings.Settings" ]
import org.elasticsearch.Version; import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.*; import org.elasticsearch.common.settings.*;
[ "org.elasticsearch", "org.elasticsearch.common" ]
org.elasticsearch; org.elasticsearch.common;
2,660,205
void removeRouteDefinition(RouteDefinition routeDefinition) throws Exception; /** * Starts the given route if it has been previously stopped * * @param route the route to start * @throws Exception is thrown if the route could not be started for whatever reason * @deprecated favor using...
void removeRouteDefinition(RouteDefinition routeDefinition) throws Exception; /** * Starts the given route if it has been previously stopped * * @param route the route to start * @throws Exception is thrown if the route could not be started for whatever reason * @deprecated favor using {@link CamelContext#startRoute(St...
/** * Removes a route definition from the CamelContext - stopping any previously running * routes if any of them are actively running * * @param routeDefinition route definition to remove * @throws Exception if the route definition could not be removed for whatever reason */
Removes a route definition from the CamelContext - stopping any previously running routes if any of them are actively running
removeRouteDefinition
{ "repo_name": "jonmcewen/camel", "path": "camel-core/src/main/java/org/apache/camel/CamelContext.java", "license": "apache-2.0", "size": 79068 }
[ "org.apache.camel.model.RouteDefinition" ]
import org.apache.camel.model.RouteDefinition;
import org.apache.camel.model.*;
[ "org.apache.camel" ]
org.apache.camel;
1,031,338
public TopicFert getTopicFert() throws Throwable { return topicFert; }
TopicFert function() throws Throwable { return topicFert; }
/** * hole die Fertigung-topic queue; jeder client hat genau eine. * * @return TopicFert * @throws Throwable */
hole die Fertigung-topic queue; jeder client hat genau eine
getTopicFert
{ "repo_name": "erdincay/lpclientpc", "path": "src/com/lp/client/pc/LPMain.java", "license": "agpl-3.0", "size": 33865 }
[ "com.lp.client.jms.TopicFert" ]
import com.lp.client.jms.TopicFert;
import com.lp.client.jms.*;
[ "com.lp.client" ]
com.lp.client;
1,161,171
public static ArrayList<ItemStack> getItemStacksWithTag(ResourceLocation resourceLocation) { TagKey<Item> tags = TagKey.create(Registry.ITEM_REGISTRY, resourceLocation); ArrayList<ItemStack> itemStacks = new ArrayList<>(); for (Holder<Item> holder : Registry.ITEM.getTagOrEmpty(tags)) { ...
static ArrayList<ItemStack> function(ResourceLocation resourceLocation) { TagKey<Item> tags = TagKey.create(Registry.ITEM_REGISTRY, resourceLocation); ArrayList<ItemStack> itemStacks = new ArrayList<>(); for (Holder<Item> holder : Registry.ITEM.getTagOrEmpty(tags)) { itemStacks.add(new ItemStack(holder.value())); } ret...
/** * Gets a collection of all item stacks with the associated tag. * @param resourceLocation The resource location to check. * @return A collection of found blocks. */
Gets a collection of all item stacks with the associated tag
getItemStacksWithTag
{ "repo_name": "Brian-Wuest/MC-Prefab", "path": "src/main/java/com/wuest/prefab/Utils.java", "license": "mit", "size": 7487 }
[ "java.util.ArrayList", "net.minecraft.core.Holder", "net.minecraft.core.Registry", "net.minecraft.resources.ResourceLocation", "net.minecraft.tags.TagKey", "net.minecraft.world.item.Item", "net.minecraft.world.item.ItemStack" ]
import java.util.ArrayList; import net.minecraft.core.Holder; import net.minecraft.core.Registry; import net.minecraft.resources.ResourceLocation; import net.minecraft.tags.TagKey; import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack;
import java.util.*; import net.minecraft.core.*; import net.minecraft.resources.*; import net.minecraft.tags.*; import net.minecraft.world.item.*;
[ "java.util", "net.minecraft.core", "net.minecraft.resources", "net.minecraft.tags", "net.minecraft.world" ]
java.util; net.minecraft.core; net.minecraft.resources; net.minecraft.tags; net.minecraft.world;
2,232,928
private void requestSync(@Nullable ObjectId objectId, long version, @Nullable String payload) { int objectSource = 0; String objectName = null; if (objectId != null) { objectName = new String(objectId.getName()); objectSource = objectId.getSource(); } ...
void function(@Nullable ObjectId objectId, long version, @Nullable String payload) { int objectSource = 0; String objectName = null; if (objectId != null) { objectName = new String(objectId.getName()); objectSource = objectId.getSource(); } Bundle bundle = PendingInvalidation.createBundle(objectName, objectSource, vers...
/** * Requests that the sync system perform a sync. * * @param objectId the object that changed, if known. * @param version the version of the object that changed, if known. * @param payload the payload of the change, if known. */
Requests that the sync system perform a sync
requestSync
{ "repo_name": "hujiajie/chromium-crosswalk", "path": "components/invalidation/impl/android/java/src/org/chromium/components/invalidation/InvalidationClientService.java", "license": "bsd-3-clause", "size": 20846 }
[ "android.accounts.Account", "android.os.Bundle", "com.google.ipc.invalidation.external.client.types.ObjectId", "javax.annotation.Nullable", "org.chromium.sync.AndroidSyncSettings", "org.chromium.sync.signin.ChromeSigninController" ]
import android.accounts.Account; import android.os.Bundle; import com.google.ipc.invalidation.external.client.types.ObjectId; import javax.annotation.Nullable; import org.chromium.sync.AndroidSyncSettings; import org.chromium.sync.signin.ChromeSigninController;
import android.accounts.*; import android.os.*; import com.google.ipc.invalidation.external.client.types.*; import javax.annotation.*; import org.chromium.sync.*; import org.chromium.sync.signin.*;
[ "android.accounts", "android.os", "com.google.ipc", "javax.annotation", "org.chromium.sync" ]
android.accounts; android.os; com.google.ipc; javax.annotation; org.chromium.sync;
497,731
public void generateFiles(MMESPPSWPPackageFile pswpPackageFile, IContainer newProject, IProgressMonitor monitor);
void function(MMESPPSWPPackageFile pswpPackageFile, IContainer newProject, IProgressMonitor monitor);
/** * Creates initial set of files of the new Platform SwPackage project. * * @param pswpPackageFile the root of the platform software package * model file. * @param newProject the container where the new files will be created. * @param monitor the progress monitor that controls the activity. */
Creates initial set of files of the new Platform SwPackage project
generateFiles
{ "repo_name": "parraman/micobs", "path": "mesp/es.uah.aut.srg.micobs.mesp/src/es/uah/aut/srg/micobs/mesp/lang/generator/IEmptyPlatformSwPackageProjectCreator.java", "license": "epl-1.0", "size": 1745 }
[ "es.uah.aut.srg.micobs.mesp.mesppswp.MMESPPSWPPackageFile", "org.eclipse.core.resources.IContainer", "org.eclipse.core.runtime.IProgressMonitor" ]
import es.uah.aut.srg.micobs.mesp.mesppswp.MMESPPSWPPackageFile; import org.eclipse.core.resources.IContainer; import org.eclipse.core.runtime.IProgressMonitor;
import es.uah.aut.srg.micobs.mesp.mesppswp.*; import org.eclipse.core.resources.*; import org.eclipse.core.runtime.*;
[ "es.uah.aut", "org.eclipse.core" ]
es.uah.aut; org.eclipse.core;
366,582
private static SchemeRegistry getDefaultSchemeRegistry(boolean fixNoHttpResponseException, int httpPort, int httpsPort) { if (fixNoHttpResponseException) { Log.d(LOG_TAG, "Beware! Using the fix is insecure, as it doesn't verify SSL certificates."); } if (httpPort < 1) { httpPort = 80; Log.d(LOG_TAG...
static SchemeRegistry function(boolean fixNoHttpResponseException, int httpPort, int httpsPort) { if (fixNoHttpResponseException) { Log.d(LOG_TAG, STR); } if (httpPort < 1) { httpPort = 80; Log.d(LOG_TAG, STR); } if (httpsPort < 1) { httpsPort = 443; Log.d(LOG_TAG, STR); } SSLSocketFactory sslSocketFactory; if (fixNoHt...
/** * Returns default instance of SchemeRegistry * * @param fixNoHttpResponseException Whether to fix or not issue, by ommiting SSL verification * @param httpPort HTTP port to be used, must be greater than 0 * @param httpsPort HTTPS port to be used, must be greater than 0 ...
Returns default instance of SchemeRegistry
getDefaultSchemeRegistry
{ "repo_name": "chen-android/guoliao", "path": "seal/src/main/java/com/GuoGuo/JuicyChat/server/network/http/AsyncHttpClient.java", "license": "mit", "size": 40933 }
[ "android.content.Context", "android.util.Log", "java.lang.ref.WeakReference", "java.util.HashMap", "java.util.List", "java.util.WeakHashMap", "java.util.concurrent.Executors", "java.util.concurrent.Future", "java.util.concurrent.ThreadPoolExecutor", "org.apache.http.HttpVersion", "org.apache.htt...
import android.content.Context; import android.util.Log; import java.lang.ref.WeakReference; import java.util.HashMap; import java.util.List; import java.util.WeakHashMap; import java.util.concurrent.Executors; import java.util.concurrent.Future; import java.util.concurrent.ThreadPoolExecutor; import org.apache.http.Ht...
import android.content.*; import android.util.*; import java.lang.ref.*; import java.util.*; import java.util.concurrent.*; import org.apache.http.*; import org.apache.http.conn.params.*; import org.apache.http.conn.scheme.*; import org.apache.http.conn.ssl.*; import org.apache.http.impl.conn.tsccm.*; import org.apache...
[ "android.content", "android.util", "java.lang", "java.util", "org.apache.http" ]
android.content; android.util; java.lang; java.util; org.apache.http;
995,787
EReference getMessage_ItemRef();
EReference getMessage_ItemRef();
/** * Returns the meta object for the reference '{@link org.eclipse.bpmn2.Message#getItemRef <em>Item Ref</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the reference '<em>Item Ref</em>'. * @see org.eclipse.bpmn2.Message#getItemRef() * @see #getMessage() * @generat...
Returns the meta object for the reference '<code>org.eclipse.bpmn2.Message#getItemRef Item Ref</code>'.
getMessage_ItemRef
{ "repo_name": "Rikkola/kie-wb-common", "path": "kie-wb-common-stunner/kie-wb-common-stunner-sets/kie-wb-common-stunner-bpmn/kie-wb-common-stunner-bpmn-emf/src/main/java/org/eclipse/bpmn2/Bpmn2Package.java", "license": "apache-2.0", "size": 929298 }
[ "org.eclipse.emf.ecore.EReference" ]
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,124,365
public boolean isRecursiveWildCardMatch(String pathToCheck, String wildcardPath) { if (pathToCheck != null) { if (wildcardPath != null && wildcardPath.equals(fileSeparator)) { return true; } StringBuilder sb = new StringBuilder(); for (String p : pathToCheck.split(fileSeparator)) { sb.append...
boolean function(String pathToCheck, String wildcardPath) { if (pathToCheck != null) { if (wildcardPath != null && wildcardPath.equals(fileSeparator)) { return true; } StringBuilder sb = new StringBuilder(); for (String p : pathToCheck.split(fileSeparator)) { sb.append(p); boolean matchFound = FilenameUtils.wildcardMat...
/** * returns true if given path matches in same level or sub directories with * given wild card pattern * * @param pathToCheck * @param wildcardPath * @return */
returns true if given path matches in same level or sub directories with given wild card pattern
isRecursiveWildCardMatch
{ "repo_name": "gzsombor/ranger", "path": "security-admin/src/main/java/org/apache/ranger/biz/RangerBizUtil.java", "license": "apache-2.0", "size": 46281 }
[ "org.apache.commons.io.FilenameUtils" ]
import org.apache.commons.io.FilenameUtils;
import org.apache.commons.io.*;
[ "org.apache.commons" ]
org.apache.commons;
454,844
public void setBusinessObjectService(BusinessObjectService businessObjectService) { this.businessObjectService = businessObjectService; }
void function(BusinessObjectService businessObjectService) { this.businessObjectService = businessObjectService; }
/** * Sets the businessObjectService attribute value. * @param businessObjectService The businessObjectService to set. */
Sets the businessObjectService attribute value
setBusinessObjectService
{ "repo_name": "sanjupolus/KC6.oLatest", "path": "coeus-impl/src/main/java/org/kuali/kra/timeandmoney/service/impl/TimeAndMoneyActionSummaryServiceImpl.java", "license": "agpl-3.0", "size": 2800 }
[ "org.kuali.rice.krad.service.BusinessObjectService" ]
import org.kuali.rice.krad.service.BusinessObjectService;
import org.kuali.rice.krad.service.*;
[ "org.kuali.rice" ]
org.kuali.rice;
1,886,572
public ShareServiceSasSignatureValues setSasIpRange(SasIpRange sasIpRange) { this.sasIpRange = sasIpRange; return this; }
ShareServiceSasSignatureValues function(SasIpRange sasIpRange) { this.sasIpRange = sasIpRange; return this; }
/** * Sets the {@link SasIpRange} which determines the IP ranges that are allowed to use the SAS. * * @param sasIpRange Allowed IP range to set * @return the updated FileServiceSasSignatureValues object */
Sets the <code>SasIpRange</code> which determines the IP ranges that are allowed to use the SAS
setSasIpRange
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/sas/ShareServiceSasSignatureValues.java", "license": "mit", "size": 18695 }
[ "com.azure.storage.common.sas.SasIpRange" ]
import com.azure.storage.common.sas.SasIpRange;
import com.azure.storage.common.sas.*;
[ "com.azure.storage" ]
com.azure.storage;
717,307
public static double[] minimize(FunctionWithGradient f, double[] x) { // reset directions every so often because of nonlinearity and roundoff error for (int resetSize = 2; resetSize <= 1024; resetSize *= 2) { final double[] deltaX0 = f.minusGradient(x); final Optimum optimum1...
static double[] function(FunctionWithGradient f, double[] x) { for (int resetSize = 2; resetSize <= 1024; resetSize *= 2) { final double[] deltaX0 = f.minusGradient(x); final Optimum optimum1 = f.findOptimum(x, deltaX0); double prevFx = optimum1.getFx(); final double alpha0 = optimum1.getX(); Vec.plusTimesEquals(x, del...
/** * Return the location of an approximate minimum of f * * @param f function to minimize * @return approximate minimum location. Note, this will be overwritten with the result. */
Return the location of an approximate minimum of f
minimize
{ "repo_name": "weltyc/novello", "path": "src/com/welty/novello/coca/ConjugateGradientMethod.java", "license": "gpl-3.0", "size": 3413 }
[ "com.orbanova.common.math.function.oned.Optimum", "com.orbanova.common.misc.Vec" ]
import com.orbanova.common.math.function.oned.Optimum; import com.orbanova.common.misc.Vec;
import com.orbanova.common.math.function.oned.*; import com.orbanova.common.misc.*;
[ "com.orbanova.common" ]
com.orbanova.common;
2,147,645
OffsetDateTime expiryTime();
OffsetDateTime expiryTime();
/** * Gets the expiryTime property: The time in UTC when the download URL will expire. * * @return the expiryTime value. */
Gets the expiryTime property: The time in UTC when the download URL will expire
expiryTime
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/models/DownloadUrl.java", "license": "mit", "size": 906 }
[ "java.time.OffsetDateTime" ]
import java.time.OffsetDateTime;
import java.time.*;
[ "java.time" ]
java.time;
813,831
@Override protected Map<String, String> getDataMap(Object data) { if (data == null) { return null; } String dataStr = getNextActivityString(data); if (StringUtils.isEmpty(dataStr)) { return null; } logger().log(OpLevel.DEBUG, StreamsResources.getBundle(StreamsResources.RESOURCE_BUNDLE_NAME), ...
Map<String, String> function(Object data) { if (data == null) { return null; } String dataStr = getNextActivityString(data); if (StringUtils.isEmpty(dataStr)) { return null; } logger().log(OpLevel.DEBUG, StreamsResources.getBundle(StreamsResources.RESOURCE_BUNDLE_NAME), STR, dataStr); if (pattern != null) { Matcher mat...
/** * Makes map of name/value pairs, resolved from provided string. * * @param data * activity object data object * * @return activity object data map */
Makes map of name/value pairs, resolved from provided string
getDataMap
{ "repo_name": "Nastel/tnt4j-streams", "path": "tnt4j-streams-core/src/main/java/com/jkoolcloud/tnt4j/streams/parsers/ActivityNameValueParser.java", "license": "apache-2.0", "size": 10539 }
[ "com.jkoolcloud.tnt4j.core.OpLevel", "com.jkoolcloud.tnt4j.streams.utils.StreamsResources", "java.util.Map", "java.util.regex.Matcher", "org.apache.commons.lang3.StringUtils" ]
import com.jkoolcloud.tnt4j.core.OpLevel; import com.jkoolcloud.tnt4j.streams.utils.StreamsResources; import java.util.Map; import java.util.regex.Matcher; import org.apache.commons.lang3.StringUtils;
import com.jkoolcloud.tnt4j.core.*; import com.jkoolcloud.tnt4j.streams.utils.*; import java.util.*; import java.util.regex.*; import org.apache.commons.lang3.*;
[ "com.jkoolcloud.tnt4j", "java.util", "org.apache.commons" ]
com.jkoolcloud.tnt4j; java.util; org.apache.commons;
14,434
public static ItemInfo get(ItemStack stack) { if (API.items != null) return API.items.get(stack); return null; }
static ItemInfo function(ItemStack stack) { if (API.items != null) return API.items.get(stack); return null; }
/** * Get a descriptor object for the block or item represented by the * specified item stack. * * @param stack the stack to get the descriptor for. * @return the descriptor for the specified item stack, or <tt>null</tt> * if the stack is not a valid OpenComputers item or block. */
Get a descriptor object for the block or item represented by the specified item stack
get
{ "repo_name": "java8compiler/OpenTeleporter", "path": "src/main/java/li/cil/oc/api/Items.java", "license": "mit", "size": 4047 }
[ "li.cil.oc.api.detail.ItemInfo", "net.minecraft.item.ItemStack" ]
import li.cil.oc.api.detail.ItemInfo; import net.minecraft.item.ItemStack;
import li.cil.oc.api.detail.*; import net.minecraft.item.*;
[ "li.cil.oc", "net.minecraft.item" ]
li.cil.oc; net.minecraft.item;
240,746
@Generated @CVariable() public static native CFStringRef kCVImageBufferContentLightLevelInfoKey();
@CVariable() static native CFStringRef function();
/** * CFData (4 bytes) containing big-endian data matching payload of Content Light Level Information SEI message */
CFData (4 bytes) containing big-endian data matching payload of Content Light Level Information SEI message
kCVImageBufferContentLightLevelInfoKey
{ "repo_name": "multi-os-engine/moe-core", "path": "moe.apple/moe.platform.ios/src/main/java/apple/corevideo/c/CoreVideo.java", "license": "apache-2.0", "size": 85217 }
[ "org.moe.natj.c.ann.CVariable" ]
import org.moe.natj.c.ann.CVariable;
import org.moe.natj.c.ann.*;
[ "org.moe.natj" ]
org.moe.natj;
812,212
public boolean isInvisible() { return annot.getFlag(COSName.F, FLAG_INVISIBLE); }
boolean function() { return annot.getFlag(COSName.F, FLAG_INVISIBLE); }
/** * Get the invisible flag. * * @return The invisible flag. */
Get the invisible flag
isInvisible
{ "repo_name": "TomRoush/PdfBox-Android", "path": "library/src/main/java/com/tom_roush/pdfbox/pdmodel/fdf/FDFAnnotation.java", "license": "apache-2.0", "size": 27928 }
[ "com.tom_roush.pdfbox.cos.COSName" ]
import com.tom_roush.pdfbox.cos.COSName;
import com.tom_roush.pdfbox.cos.*;
[ "com.tom_roush.pdfbox" ]
com.tom_roush.pdfbox;
2,905,595
@SuppressWarnings("ThrowableResultOfMethodCallIgnored") public static <T> T doInTransactionWithRetries(IgniteInternalCache cache, IgniteOutClosureX<T> clo) throws IgniteCheckedException { assert cache != null; int attempts = 0; while (attempts < MAX_CACHE_TX_RETRIES) { ...
@SuppressWarnings(STR) static <T> T function(IgniteInternalCache cache, IgniteOutClosureX<T> clo) throws IgniteCheckedException { assert cache != null; int attempts = 0; while (attempts < MAX_CACHE_TX_RETRIES) { try (Transaction tx = cache.txStart(PESSIMISTIC, REPEATABLE_READ)) { T res = clo.applyx(); tx.commit(); retu...
/** * Performs an operation with transaction with retries. * * @param cache Cache to do the transaction on. * @param clo Closure. * @return Result of closure execution. * @throws IgniteCheckedException If failed. */
Performs an operation with transaction with retries
doInTransactionWithRetries
{ "repo_name": "agura/incubator-ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsUtils.java", "license": "apache-2.0", "size": 6949 }
[ "org.apache.ignite.IgniteCheckedException", "org.apache.ignite.IgniteException", "org.apache.ignite.cluster.ClusterTopologyException", "org.apache.ignite.internal.processors.cache.IgniteInternalCache", "org.apache.ignite.internal.util.future.IgniteFutureImpl", "org.apache.ignite.internal.util.lang.IgniteO...
import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.IgniteException; import org.apache.ignite.cluster.ClusterTopologyException; import org.apache.ignite.internal.processors.cache.IgniteInternalCache; import org.apache.ignite.internal.util.future.IgniteFutureImpl; import org.apache.ignite.internal....
import org.apache.ignite.*; import org.apache.ignite.cluster.*; import org.apache.ignite.internal.processors.cache.*; import org.apache.ignite.internal.util.future.*; import org.apache.ignite.internal.util.lang.*; import org.apache.ignite.internal.util.typedef.*; import org.apache.ignite.internal.util.typedef.internal....
[ "org.apache.ignite" ]
org.apache.ignite;
436,299
@Override public void emit(OutputStream outputStream, IData document, Charset charset) throws IOException, ServiceException { if (document != null) { document = normalize(document); charset = normalize(charset); IData pipeline = IDataHelper.duplicate(this.pipeline); ...
void function(OutputStream outputStream, IData document, Charset charset) throws IOException, ServiceException { if (document != null) { document = normalize(document); charset = normalize(charset); IData pipeline = IDataHelper.duplicate(this.pipeline); IDataCursor cursor = pipeline.getCursor(); try { if (validate && M...
/** * Serializes the given IData document. * * @param outputStream The output stream the serialized IData is written to. * @param document The IData document to be serialized. * @param charset The character set to use when serializing the IData document. * @throws I...
Serializes the given IData document
emit
{ "repo_name": "Permafrost/Tundra.java", "path": "src/main/java/permafrost/tundra/content/ContentParser.java", "license": "mit", "size": 20879 }
[ "com.wm.app.b2b.server.ServiceException", "com.wm.data.IData", "com.wm.data.IDataCursor", "java.io.IOException", "java.io.OutputStream", "java.nio.charset.Charset", "org.apache.commons.csv.QuoteMode" ]
import com.wm.app.b2b.server.ServiceException; import com.wm.data.IData; import com.wm.data.IDataCursor; import java.io.IOException; import java.io.OutputStream; import java.nio.charset.Charset; import org.apache.commons.csv.QuoteMode;
import com.wm.app.b2b.server.*; import com.wm.data.*; import java.io.*; import java.nio.charset.*; import org.apache.commons.csv.*;
[ "com.wm.app", "com.wm.data", "java.io", "java.nio", "org.apache.commons" ]
com.wm.app; com.wm.data; java.io; java.nio; org.apache.commons;
520,141
public static String makePartName(List<String> partCols, List<String> vals, String defaultStr) { StringBuilder name = new StringBuilder(); for (int i = 0; i < partCols.size(); i++) { if (i > 0) { name.append(Path.SEPARATOR); } name.append(escapePathName((partCols.get(i)).toLowe...
static String function(List<String> partCols, List<String> vals, String defaultStr) { StringBuilder name = new StringBuilder(); for (int i = 0; i < partCols.size(); i++) { if (i > 0) { name.append(Path.SEPARATOR); } name.append(escapePathName((partCols.get(i)).toLowerCase(), defaultStr)); name.append('='); name.append(...
/** * Makes a valid partition name. * @param partCols The partition keys' names * @param vals The partition values * @param defaultStr * The default name given to a partition value if the respective value is empty or null. * @return An escaped, valid partition name. */
Makes a valid partition name
makePartName
{ "repo_name": "vergilchiu/hive", "path": "common/src/java/org/apache/hadoop/hive/common/FileUtils.java", "license": "apache-2.0", "size": 34953 }
[ "java.util.List", "org.apache.hadoop.fs.Path" ]
import java.util.List; import org.apache.hadoop.fs.Path;
import java.util.*; import org.apache.hadoop.fs.*;
[ "java.util", "org.apache.hadoop" ]
java.util; org.apache.hadoop;
2,666,888
@Override public void setMaxFieldSize(int max) throws SQLException { try { debugCodeCall("setMaxFieldSize", max); checkClosed(); } catch (Exception e) { throw logAndConvert(e); } }
void function(int max) throws SQLException { try { debugCodeCall(STR, max); checkClosed(); } catch (Exception e) { throw logAndConvert(e); } }
/** * Sets the maximum number of bytes for a result set column. * This method does currently do nothing for this driver. * * @param max the maximum size - ignored * @throws SQLException if this object is closed */
Sets the maximum number of bytes for a result set column. This method does currently do nothing for this driver
setMaxFieldSize
{ "repo_name": "ferquies/2dam", "path": "AD/Tema 2/h2/src/main/org/h2/jdbc/JdbcStatement.java", "license": "gpl-3.0", "size": 34682 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
2,900,231
@Test public void testDependenciesViaFiles() throws Exception { scratch.file( "foo/BUILD", "genrule(name = 'bar',", " srcs = ['bar_in.txt'],", " cmd = 'touch $(OUTS)',", " outs = ['bar_out.txt'])", "genrule(name = 'baz',", " src...
void function() throws Exception { scratch.file( STR, STR, STR, STR, STR, STR, STR, STR, STR); FileConfiguredTarget bazOutTarget = getFileConfiguredTarget(STRfoo/bar_out.txtSTRfoo/bar_in.txt"))).isTrue(); }
/** * Ensure that the actions / artifacts created by genrule dependencies allow us to follow the * chain of generated files backward. */
Ensure that the actions / artifacts created by genrule dependencies allow us to follow the chain of generated files backward
testDependenciesViaFiles
{ "repo_name": "bazelbuild/bazel", "path": "src/test/java/com/google/devtools/build/lib/bazel/rules/genrule/GenRuleConfiguredTargetTest.java", "license": "apache-2.0", "size": 24579 }
[ "com.google.devtools.build.lib.analysis.configuredtargets.FileConfiguredTarget" ]
import com.google.devtools.build.lib.analysis.configuredtargets.FileConfiguredTarget;
import com.google.devtools.build.lib.analysis.configuredtargets.*;
[ "com.google.devtools" ]
com.google.devtools;
970,880
private boolean expireMessages(int size) throws DbException { Collection<MessageId> expired; lock.writeLock().lock(); try { T txn = db.startTransaction(); try { expired = db.getOldMessages(txn, size); if(!expired.isEmpty()) { for(MessageId m : expired) db.removeMessage(txn, m); db.incre...
boolean function(int size) throws DbException { Collection<MessageId> expired; lock.writeLock().lock(); try { T txn = db.startTransaction(); try { expired = db.getOldMessages(txn, size); if(!expired.isEmpty()) { for(MessageId m : expired) db.removeMessage(txn, m); db.incrementRetentionVersions(txn); if(LOG.isLoggable(I...
/** * Removes the oldest messages from the database, with a total size less * than or equal to the given size, and returns true if any messages were * removed. */
Removes the oldest messages from the database, with a total size less than or equal to the given size, and returns true if any messages were removed
expireMessages
{ "repo_name": "biddyweb/briar", "path": "briar-core/src/org/briarproject/db/DatabaseComponentImpl.java", "license": "gpl-3.0", "size": 43171 }
[ "java.util.Collection", "org.briarproject.api.db.DbException", "org.briarproject.api.event.MessageExpiredEvent", "org.briarproject.api.messaging.MessageId" ]
import java.util.Collection; import org.briarproject.api.db.DbException; import org.briarproject.api.event.MessageExpiredEvent; import org.briarproject.api.messaging.MessageId;
import java.util.*; import org.briarproject.api.db.*; import org.briarproject.api.event.*; import org.briarproject.api.messaging.*;
[ "java.util", "org.briarproject.api" ]
java.util; org.briarproject.api;
617,419
public static boolean equals(Type t1, Type t2) { if (ObjectUtils.equals(t1, t2)) { return true; } if (t1 instanceof ParameterizedType) { return equals((ParameterizedType) t1, t2); } if (t1 instanceof GenericArrayType) { return equals((Gener...
static boolean function(Type t1, Type t2) { if (ObjectUtils.equals(t1, t2)) { return true; } if (t1 instanceof ParameterizedType) { return equals((ParameterizedType) t1, t2); } if (t1 instanceof GenericArrayType) { return equals((GenericArrayType) t1, t2); } if (t1 instanceof WildcardType) { return equals((WildcardType...
/** * Check equality of types. * * @param t1 the first type * @param t2 the second type * @return boolean * @since 3.2 */
Check equality of types
equals
{ "repo_name": "nhchanh/apache-commons-lang3-3.2", "path": "src/main/java/org/apache/commons/lang3/reflect/TypeUtils.java", "license": "apache-2.0", "size": 69597 }
[ "java.lang.reflect.GenericArrayType", "java.lang.reflect.ParameterizedType", "java.lang.reflect.Type", "java.lang.reflect.WildcardType", "org.apache.commons.lang3.ObjectUtils" ]
import java.lang.reflect.GenericArrayType; import java.lang.reflect.ParameterizedType; import java.lang.reflect.Type; import java.lang.reflect.WildcardType; import org.apache.commons.lang3.ObjectUtils;
import java.lang.reflect.*; import org.apache.commons.lang3.*;
[ "java.lang", "org.apache.commons" ]
java.lang; org.apache.commons;
664,411
protected String resolveCodeWithoutArgumentsFromPlugins(String code, Locale locale) { if (pluginCacheMillis < 0) { PropertiesHolder propHolder = getMergedPluginProperties(locale); String result = propHolder.getProperty(code); if (result != null) { return r...
String function(String code, Locale locale) { if (pluginCacheMillis < 0) { PropertiesHolder propHolder = getMergedPluginProperties(locale); String result = propHolder.getProperty(code); if (result != null) { return result; } } else { for (String pluginBaseName : pluginBaseNames) { List<String> filenames = calculateAllF...
/** * Attempts to resolve a String for the code from the list of plugin base names * * @param code The code * @param locale The locale * @return a MessageFormat */
Attempts to resolve a String for the code from the list of plugin base names
resolveCodeWithoutArgumentsFromPlugins
{ "repo_name": "jeffbrown/grailsnolib", "path": "grails-core/src/main/groovy/org/codehaus/groovy/grails/context/support/PluginAwareResourceBundleMessageSource.java", "license": "apache-2.0", "size": 9386 }
[ "java.util.List", "java.util.Locale" ]
import java.util.List; import java.util.Locale;
import java.util.*;
[ "java.util" ]
java.util;
2,446,625
public static List<Integer> parseSelectionString(String selection) { String[] tokens = selection.split("[:]"); if (tokens.length != 2) throw new UnsupportedOperationException("Expected string: \"lower_bound : upper_bound\""); int lower = -1; try { lower = Inte...
static List<Integer> function(String selection) { String[] tokens = selection.split("[:]"); if (tokens.length != 2) throw new UnsupportedOperationException(STRlower_bound : upper_bound\STRLower bound not a valid integer: STRUpper bound not a valid integer: STRLower bound is larger than upper bound."); } List<Integer> s...
/** * Parses the string for a range representing a selection in the form: * lower_bound : upper_bound * @param selection string in the form: "int colon int". * @return list of integers representing selection. */
Parses the string for a range representing a selection in the form: lower_bound : upper_bound
parseSelectionString
{ "repo_name": "krharrison/cilib", "path": "library/src/main/java/net/sourceforge/cilib/io/transform/SelectiveDataOperator.java", "license": "gpl-3.0", "size": 3582 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,003,739
Future<FirewallRuleListResponse> listAsync(String serverName);
Future<FirewallRuleListResponse> listAsync(String serverName);
/** * Returns a list of server-level Firewall Rules for an Azure SQL Database * Server. * * @param serverName Required. The name of the Azure SQL Database Server * from which to list the Firewall Rules. * @return Contains the response from a request to List Firewall Rules. */
Returns a list of server-level Firewall Rules for an Azure SQL Database Server
listAsync
{ "repo_name": "flydream2046/azure-sdk-for-java", "path": "service-management/azure-svc-mgmt-sql/src/main/java/com/microsoft/windowsazure/management/sql/FirewallRuleOperations.java", "license": "apache-2.0", "size": 9637 }
[ "com.microsoft.windowsazure.management.sql.models.FirewallRuleListResponse", "java.util.concurrent.Future" ]
import com.microsoft.windowsazure.management.sql.models.FirewallRuleListResponse; import java.util.concurrent.Future;
import com.microsoft.windowsazure.management.sql.models.*; import java.util.concurrent.*;
[ "com.microsoft.windowsazure", "java.util" ]
com.microsoft.windowsazure; java.util;
2,211,567
public Enumeration listOptions () { Vector newVector = new Vector(4); newVector.addElement(new Option("\tSpecify a starting set of attributes." + "\n\tEg. 1,3,5-7." ,"P",1 , "-P <start set>")); newVector.addElement(new Option("\tDirection of search. (default = 1)." , ...
Enumeration function () { Vector newVector = new Vector(4); newVector.addElement(new Option(STR + STR ,"P",1 , STR)); newVector.addElement(new Option(STR , "D", 1 , STR + STR)); newVector.addElement(new Option(STR + STR , "N", 1, STR)); newVector.addElement(new Option(STR +STR +STR, "S", 1, STR)); return newVector.elem...
/** * Returns an enumeration describing the available options. * @return an enumeration of all the available options. * **/
Returns an enumeration describing the available options
listOptions
{ "repo_name": "williamClanton/jbossBA", "path": "weka/src/main/java/weka/attributeSelection/BestFirst.java", "license": "gpl-2.0", "size": 24824 }
[ "java.util.Enumeration", "java.util.Vector" ]
import java.util.Enumeration; import java.util.Vector;
import java.util.*;
[ "java.util" ]
java.util;
1,293,582
public void testDefaultPropertyCreation() throws Throwable { CmsObject cms = getCmsObject(); echo("Testing default property creation"); String resourcename = "/folder1/article_test.html"; byte[] content = new byte[0]; // resource 27 is article (xml content) with default pr...
void function() throws Throwable { CmsObject cms = getCmsObject(); echo(STR); String resourcename = STR; byte[] content = new byte[0]; cms.createResource(resourcename, OpenCmsTestCase.ARTICLE_TYPEID, content, null); assertResourceType(cms, resourcename, OpenCmsTestCase.ARTICLE_TYPEID); assertProject(cms, resourcename, ...
/** * Test default property creation (from resource type configuration).<p> * * @throws Throwable if something goes wrong */
Test default property creation (from resource type configuration)
testDefaultPropertyCreation
{ "repo_name": "it-tavis/opencms-core", "path": "test/org/opencms/file/TestProperty.java", "license": "lgpl-2.1", "size": 32653 }
[ "org.opencms.main.OpenCms", "org.opencms.test.OpenCmsTestCase" ]
import org.opencms.main.OpenCms; import org.opencms.test.OpenCmsTestCase;
import org.opencms.main.*; import org.opencms.test.*;
[ "org.opencms.main", "org.opencms.test" ]
org.opencms.main; org.opencms.test;
1,059,831
private void buildUI() { VerticalPanel mainPanel = new VerticalPanel(); mainPanel.setWidth("100%"); mainPanel.add(new Label("Label above!")); mainPanel.add(editor1); // Label to display current row/column rowColLabel = new InlineLabel(""); mainPanel.add(rowColLabel); // Create some buttons for te...
void function() { VerticalPanel mainPanel = new VerticalPanel(); mainPanel.setWidth("100%"); mainPanel.add(new Label(STR)); mainPanel.add(editor1); rowColLabel = new InlineLabel(""); mainPanel.add(rowColLabel); HorizontalPanel buttonPanel = new HorizontalPanel();
/** * This method builds the UI. It creates UI widgets that exercise most/all of the AceEditor methods, so it's a bit of a kitchen sink. */
This method builds the UI. It creates UI widgets that exercise most/all of the AceEditor methods, so it's a bit of a kitchen sink
buildUI
{ "repo_name": "ahome-it/ahome-ace", "path": "ahome-ace/examples/com/ait/toolkit/ace/examples/client/AceDemo.java", "license": "apache-2.0", "size": 7186 }
[ "com.google.gwt.user.client.ui.HorizontalPanel", "com.google.gwt.user.client.ui.InlineLabel", "com.google.gwt.user.client.ui.Label", "com.google.gwt.user.client.ui.VerticalPanel" ]
import com.google.gwt.user.client.ui.HorizontalPanel; import com.google.gwt.user.client.ui.InlineLabel; import com.google.gwt.user.client.ui.Label; import com.google.gwt.user.client.ui.VerticalPanel;
import com.google.gwt.user.client.ui.*;
[ "com.google.gwt" ]
com.google.gwt;
1,151,223
void removeAriaDescribedbyProperty(Element element);
void removeAriaDescribedbyProperty(Element element);
/** * Removes the <a href="http://www.w3.org/TR/wai-aria/states_and_properties#aria-describedby"> * aria-describedby</a> attribute from the {@code element}. */
Removes the aria-describedby attribute from the element
removeAriaDescribedbyProperty
{ "repo_name": "gwtproject/gwt-aria", "path": "gwt-aria/src/main/java/org/gwtproject/aria/client/Role.java", "license": "apache-2.0", "size": 14634 }
[ "org.gwtproject.dom.client.Element" ]
import org.gwtproject.dom.client.Element;
import org.gwtproject.dom.client.*;
[ "org.gwtproject.dom" ]
org.gwtproject.dom;
209,148
PortEntity deleteInputPort(Revision revision, String inputPortId);
PortEntity deleteInputPort(Revision revision, String inputPortId);
/** * Deletes the specified input port. * * @param revision Revision to compare with current base revision * @param inputPortId The id of the input port * @return snapshot */
Deletes the specified input port
deleteInputPort
{ "repo_name": "mans2singh/nifi", "path": "nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/NiFiServiceFacade.java", "license": "apache-2.0", "size": 84641 }
[ "org.apache.nifi.web.api.entity.PortEntity" ]
import org.apache.nifi.web.api.entity.PortEntity;
import org.apache.nifi.web.api.entity.*;
[ "org.apache.nifi" ]
org.apache.nifi;
1,377,079
void onStartDrag(RecyclerView.ViewHolder viewHolder);
void onStartDrag(RecyclerView.ViewHolder viewHolder);
/** * Called when a view is requesting a start of a drag. * * @param viewHolder The holder of the view to drag. */
Called when a view is requesting a start of a drag
onStartDrag
{ "repo_name": "1641835946/MyJournal", "path": "app/src/main/java/com/example/administrator/myjournal/helper/OnStartDragListener.java", "license": "apache-2.0", "size": 994 }
[ "android.support.v7.widget.RecyclerView" ]
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.*;
[ "android.support" ]
android.support;
2,304,620
public void deleteObject(IPersistent object, boolean invokeLifecycleEvents) throws DeleteFailedException, IllegalPersistentStateRuntimeException { if (object.isQueued()) { String str = "The domain object has already been submitted to the UOW for an Add/Update/Delete. No more updates can be perfo...
void function(IPersistent object, boolean invokeLifecycleEvents) throws DeleteFailedException, IllegalPersistentStateRuntimeException { if (object.isQueued()) { String str = STR; log.error(str); throw new IllegalPersistentStateRuntimeException(str); } if (invokeLifecycleEvents) { if (log.isDebugEnabled()) log.debug(STR...
/** * Adds an object to the transaction to be deleted. * The PreDelete trigger will be invoked before the deletion from the transaction. * * @param object the object to be deleted. * @param invokeLifecycleEvents Lifecycle events will be invoked if this parameter is true. * @...
Adds an object to the transaction to be deleted. The PreDelete trigger will be invoked before the deletion from the transaction
deleteObject
{ "repo_name": "snavaneethan1/jaffa-framework", "path": "jaffa-core/source/java/org/jaffa/persistence/engines/jdbcengine/datasource/PersistentTransaction.java", "license": "gpl-3.0", "size": 26882 }
[ "java.util.ArrayList", "org.jaffa.persistence.IPersistent", "org.jaffa.persistence.exceptions.DeleteFailedException", "org.jaffa.persistence.exceptions.IllegalPersistentStateRuntimeException", "org.jaffa.persistence.logging.IPersistenceLoggingPlugin" ]
import java.util.ArrayList; import org.jaffa.persistence.IPersistent; import org.jaffa.persistence.exceptions.DeleteFailedException; import org.jaffa.persistence.exceptions.IllegalPersistentStateRuntimeException; import org.jaffa.persistence.logging.IPersistenceLoggingPlugin;
import java.util.*; import org.jaffa.persistence.*; import org.jaffa.persistence.exceptions.*; import org.jaffa.persistence.logging.*;
[ "java.util", "org.jaffa.persistence" ]
java.util; org.jaffa.persistence;
2,604,526
@SuppressWarnings("unchecked") public static <T extends Enum<T>> int toBits(T... values) { return toBits(ImmutableSet.copyOf(values)); }
@SuppressWarnings(STR) static <T extends Enum<T>> int function(T... values) { return toBits(ImmutableSet.copyOf(values)); }
/** * Converts a set of enum values to a bit field. Requires that the enum contains at most 32 * elements. */
Converts a set of enum values to a bit field. Requires that the enum contains at most 32 elements
toBits
{ "repo_name": "wakashige/bazel", "path": "src/main/java/com/google/devtools/build/lib/collect/CollectionUtils.java", "license": "apache-2.0", "size": 7661 }
[ "com.google.common.collect.ImmutableSet" ]
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.*;
[ "com.google.common" ]
com.google.common;
1,097,537
removeAppliesToType(DatabaseType.OTHERFEATURES); removeAppliesToType(DatabaseType.ESTGENE); removeAppliesToType(DatabaseType.VEGA); removeAppliesToType(DatabaseType.CDNA); removeAppliesToType(DatabaseType.RNASEQ); }
removeAppliesToType(DatabaseType.OTHERFEATURES); removeAppliesToType(DatabaseType.ESTGENE); removeAppliesToType(DatabaseType.VEGA); removeAppliesToType(DatabaseType.CDNA); removeAppliesToType(DatabaseType.RNASEQ); }
/** * This only really applies to core databases */
This only really applies to core databases
types
{ "repo_name": "thomasmaurel/ensj-healthcheck", "path": "src/org/ensembl/healthcheck/testcase/generic/GOXrefs.java", "license": "apache-2.0", "size": 6390 }
[ "org.ensembl.healthcheck.DatabaseType" ]
import org.ensembl.healthcheck.DatabaseType;
import org.ensembl.healthcheck.*;
[ "org.ensembl.healthcheck" ]
org.ensembl.healthcheck;
1,557,366
public int damageDropped(IBlockState state) { return ((BlockPrismarine.EnumType)state.getValue(VARIANT)).getMetadata(); }
int function(IBlockState state) { return ((BlockPrismarine.EnumType)state.getValue(VARIANT)).getMetadata(); }
/** * Gets the metadata of the item this Block can drop. This method is called when the block gets destroyed. It * returns the metadata of the dropped item based on the old metadata of the block. */
Gets the metadata of the item this Block can drop. This method is called when the block gets destroyed. It returns the metadata of the dropped item based on the old metadata of the block
damageDropped
{ "repo_name": "SuperUnitato/UnLonely", "path": "build/tmp/recompileMc/sources/net/minecraft/block/BlockPrismarine.java", "license": "lgpl-2.1", "size": 4784 }
[ "net.minecraft.block.state.IBlockState" ]
import net.minecraft.block.state.IBlockState;
import net.minecraft.block.state.*;
[ "net.minecraft.block" ]
net.minecraft.block;
2,479,067
private void bindSipService() { Log.i(TAG, "bindService"); Intent serviceIntent = new Intent(SipManager.INTENT_SIP_SERVICE); // Optional, but here we bundle so just ensure we are using csipsimple package serviceIntent.setPackage(getApplicationContext().getPackageName()); getA...
void function() { Log.i(TAG, STR); Intent serviceIntent = new Intent(SipManager.INTENT_SIP_SERVICE); serviceIntent.setPackage(getApplicationContext().getPackageName()); getApplicationContext().bindService(serviceIntent, connection, Context.BIND_AUTO_CREATE); }
/** * Bind (starts if it is not running) to the SIP service */
Bind (starts if it is not running) to the SIP service
bindSipService
{ "repo_name": "skadyrov/CSipSimple", "path": "sipHome/src/main/java/com/csipsimple/api/SendMessageService.java", "license": "lgpl-3.0", "size": 6445 }
[ "android.content.Context", "android.content.Intent", "android.util.Log" ]
import android.content.Context; import android.content.Intent; import android.util.Log;
import android.content.*; import android.util.*;
[ "android.content", "android.util" ]
android.content; android.util;
1,549,178
public void save(ActionEvent event) { String msg = ResourceBundle.getBundle("/MyBundle2").getString(itemClass.getSimpleName() + "Updated"); persist(PersistAction.UPDATE, msg); }
void function(ActionEvent event) { String msg = ResourceBundle.getBundle(STR).getString(itemClass.getSimpleName() + STR); persist(PersistAction.UPDATE, msg); }
/** * Apply changes to an existing item to the data layer. * * @param event an event from the widget that wants to save an Entity to the * data layer */
Apply changes to an existing item to the data layer
save
{ "repo_name": "jeronimovf/contavinculada", "path": "src/main/java/br/jus/trt23/contavinculada/crud/jsf/AbstractController.java", "license": "gpl-3.0", "size": 9404 }
[ "java.util.ResourceBundle", "javax.faces.event.ActionEvent" ]
import java.util.ResourceBundle; import javax.faces.event.ActionEvent;
import java.util.*; import javax.faces.event.*;
[ "java.util", "javax.faces" ]
java.util; javax.faces;
2,175,820
public Paint getItemPaint() { return this.itemPaint; }
Paint function() { return this.itemPaint; }
/** * Returns the item paint. * * @return The paint (never <code>null</code>). */
Returns the item paint
getItemPaint
{ "repo_name": "integrated/jfreechart", "path": "source/org/jfree/chart/title/LegendTitle.java", "license": "lgpl-2.1", "size": 21435 }
[ "java.awt.Paint" ]
import java.awt.Paint;
import java.awt.*;
[ "java.awt" ]
java.awt;
1,676,245
public void runTestCase(Object testCase) throws TestException { logger.log(Level.INFO, "===== invoking constructor: " + testCase.toString()); try { if ( testCase == INVOC_CONSTRAINT__TEST_CASE) { callConstructor(testCase, Confidentiality.YES, ...
void function(Object testCase) throws TestException { logger.log(Level.INFO, STR + testCase.toString()); try { if ( testCase == INVOC_CONSTRAINT__TEST_CASE) { callConstructor(testCase, Confidentiality.YES, Confidentiality.NO); } else if (testCase == INVOC_CONSTRAINT_NULL_REQ__TEST_CASE) { callConstructor(testCase, (Inv...
/** * Execution of a Test Case. * For each Test Case the corresponding callConstructor() method is invoked. */
Execution of a Test Case. For each Test Case the corresponding callConstructor() method is invoked
runTestCase
{ "repo_name": "cdegroot/river", "path": "qa/src/com/sun/jini/test/spec/constraint/coreconstraint/invocationconstraints/ConstructorsTest.java", "license": "apache-2.0", "size": 38595 }
[ "com.sun.jini.qa.harness.TestException", "java.util.Collection", "java.util.HashSet", "java.util.logging.Level", "net.jini.core.constraint.Confidentiality", "net.jini.core.constraint.Delegation", "net.jini.core.constraint.InvocationConstraint", "net.jini.core.constraint.InvocationConstraints" ]
import com.sun.jini.qa.harness.TestException; import java.util.Collection; import java.util.HashSet; import java.util.logging.Level; import net.jini.core.constraint.Confidentiality; import net.jini.core.constraint.Delegation; import net.jini.core.constraint.InvocationConstraint; import net.jini.core.constraint.Invocati...
import com.sun.jini.qa.harness.*; import java.util.*; import java.util.logging.*; import net.jini.core.constraint.*;
[ "com.sun.jini", "java.util", "net.jini.core" ]
com.sun.jini; java.util; net.jini.core;
2,319,553
public void testField() throws JavaScriptModelException { IType type = this.cu.getType("X"); IField field = type.getField("field"); String actualSource = field.getSource(); String expectedSource = "public Object field;"; assertSourceEquals("Unexpected source'", expectedSource, actualSource); }
void function() throws JavaScriptModelException { IType type = this.cu.getType("X"); IField field = type.getField("field"); String actualSource = field.getSource(); String expectedSource = STR; assertSourceEquals(STR, expectedSource, actualSource); }
/** * Ensure the source for a field contains the modifiers, field type, name, * and terminator. */
Ensure the source for a field contains the modifiers, field type, name, and terminator
testField
{ "repo_name": "echoes-tech/eclipse.jsdt.core", "path": "org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/GetSourceTests.java", "license": "epl-1.0", "size": 9018 }
[ "org.eclipse.wst.jsdt.core.IField", "org.eclipse.wst.jsdt.core.IType", "org.eclipse.wst.jsdt.core.JavaScriptModelException" ]
import org.eclipse.wst.jsdt.core.IField; import org.eclipse.wst.jsdt.core.IType; import org.eclipse.wst.jsdt.core.JavaScriptModelException;
import org.eclipse.wst.jsdt.core.*;
[ "org.eclipse.wst" ]
org.eclipse.wst;
1,864,465
public JMenuItem createCheckBoxMenuItem(String pPrefix, ActionListener pListener) { String text = aBundle.getString(pPrefix + ".text"); JMenuItem menuItem = new JCheckBoxMenuItem(text); return configure(menuItem, pPrefix, pListener); }
JMenuItem function(String pPrefix, ActionListener pListener) { String text = aBundle.getString(pPrefix + ".text"); JMenuItem menuItem = new JCheckBoxMenuItem(text); return configure(menuItem, pPrefix, pListener); }
/** * Create a checkbox menu. * @param pPrefix A string such as "file.open" that indicates the menu->submenu path * @param pListener The callback to execute when the menu item is selected. * @return A menu item for the action described. */
Create a checkbox menu
createCheckBoxMenuItem
{ "repo_name": "henray/JetUML", "path": "src/ca/mcgill/cs/stg/jetuml/framework/MenuFactory.java", "license": "gpl-3.0", "size": 5585 }
[ "java.awt.event.ActionListener", "javax.swing.JCheckBoxMenuItem", "javax.swing.JMenuItem" ]
import java.awt.event.ActionListener; import javax.swing.JCheckBoxMenuItem; import javax.swing.JMenuItem;
import java.awt.event.*; import javax.swing.*;
[ "java.awt", "javax.swing" ]
java.awt; javax.swing;
2,170,329
// // Build the message payload // // The protocol version will be set to the lesser of our version and the // peer version // SerializedBuffer msgBuffer = new SerializedBuffer(blockList.size() * 32 + 40); msgBuffer.putInt(Math.min(peer.getVersion(), NetParams.PROTOCOL_VERSION)).putVarInt(blockList.size...
msgBuffer.putInt(Math.min(peer.getVersion(), NetParams.PROTOCOL_VERSION)).putVarInt(blockList.size()); for (Sha256Hash hash : blockList) { msgBuffer.putBytes(Helper.reverseBytes(hash.getBytes())); } msgBuffer.putBytes(Helper.reverseBytes(stopBlock.getBytes())); return new Message(buffer, peer, MessageHeader.MessageComm...
/** * Build a 'getblocks' message * * @param peer * Destination peer * @param blockList * Block hash list * @param stopBlock * Stop block hash (Sha256Hash.ZERO_HASH to get all blocks) * @return 'getblocks' message */
Build a 'getblocks' message
buildGetBlocksMessage
{ "repo_name": "cping/RipplePower", "path": "eclipse/RipplePower/src/org/ripple/power/txns/btc/GetBlocksMessage.java", "license": "apache-2.0", "size": 3180 }
[ "org.ripple.power.Helper" ]
import org.ripple.power.Helper;
import org.ripple.power.*;
[ "org.ripple.power" ]
org.ripple.power;
521,243
public final void setSpannableFactory(Spannable.Factory factory) { mSpannableFactory = factory; setText(mText); }
final void function(Spannable.Factory factory) { mSpannableFactory = factory; setText(mText); }
/** * Sets the Factory used to create new Spannables. */
Sets the Factory used to create new Spannables
setSpannableFactory
{ "repo_name": "szpaddy/android-4.1.2_r2-core", "path": "java/android/widget/TextView.java", "license": "apache-2.0", "size": 343588 }
[ "android.text.Spannable" ]
import android.text.Spannable;
import android.text.*;
[ "android.text" ]
android.text;
706,683
Task newTask();
Task newTask();
/** * Creates a new task that is not related to any process instance. * * The returned task is transient and must be saved with {@link #saveTask(Task)} 'manually'. */
Creates a new task that is not related to any process instance. The returned task is transient and must be saved with <code>#saveTask(Task)</code> 'manually'
newTask
{ "repo_name": "stefan-ziel/Activiti", "path": "modules/activiti5-engine/src/main/java/org/activiti5/engine/TaskService.java", "license": "apache-2.0", "size": 21789 }
[ "org.activiti5.engine.task.Task" ]
import org.activiti5.engine.task.Task;
import org.activiti5.engine.task.*;
[ "org.activiti5.engine" ]
org.activiti5.engine;
2,880,071
@Deprecated public void load(XMPPConnection connection, EntityBareJid user) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { VCard result = VCardManager.getInstanceFor(connection).loadVCard(user); copyFieldsFrom(result); }
void function(XMPPConnection connection, EntityBareJid user) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { VCard result = VCardManager.getInstanceFor(connection).loadVCard(user); copyFieldsFrom(result); }
/** * Load VCard information for a given user. XMPPConnection should be authenticated and not anonymous. * @throws XMPPErrorException * @throws NoResponseException if there was no response from the server. * @throws NotConnectedException * @throws InterruptedException * @deprecated use ...
Load VCard information for a given user. XMPPConnection should be authenticated and not anonymous
load
{ "repo_name": "qingsong-xu/Smack", "path": "smack-extensions/src/main/java/org/jivesoftware/smackx/vcardtemp/packet/VCard.java", "license": "apache-2.0", "size": 25445 }
[ "org.jivesoftware.smack.SmackException", "org.jivesoftware.smack.XMPPConnection", "org.jivesoftware.smack.XMPPException", "org.jivesoftware.smackx.vcardtemp.VCardManager", "org.jxmpp.jid.EntityBareJid" ]
import org.jivesoftware.smack.SmackException; import org.jivesoftware.smack.XMPPConnection; import org.jivesoftware.smack.XMPPException; import org.jivesoftware.smackx.vcardtemp.VCardManager; import org.jxmpp.jid.EntityBareJid;
import org.jivesoftware.smack.*; import org.jivesoftware.smackx.vcardtemp.*; import org.jxmpp.jid.*;
[ "org.jivesoftware.smack", "org.jivesoftware.smackx", "org.jxmpp.jid" ]
org.jivesoftware.smack; org.jivesoftware.smackx; org.jxmpp.jid;
1,978,004
public void setFrom(final DateTime from) { this.from = from; }
void function(final DateTime from) { this.from = from; }
/** * Specify lower bound of interval */
Specify lower bound of interval
setFrom
{ "repo_name": "standevgd/gooddata-java", "path": "src/main/java/com/gooddata/auditevent/AuditEventPageRequest.java", "license": "bsd-3-clause", "size": 4056 }
[ "org.joda.time.DateTime" ]
import org.joda.time.DateTime;
import org.joda.time.*;
[ "org.joda.time" ]
org.joda.time;
1,372,994
private T animatePropertyBy(Property<View, Float> property, float by) { return animatePropertyBy(property, by, true); }
T function(Property<View, Float> property, float by) { return animatePropertyBy(property, by, true); }
/** * Wrapper for {@link #animatePropertyBy(Property, float, boolean)}, with byValueCanBeUsedByParentAnimators set to true. */
Wrapper for <code>#animatePropertyBy(Property, float, boolean)</code>, with byValueCanBeUsedByParentAnimators set to true
animatePropertyBy
{ "repo_name": "wirecube/android_additive_animations", "path": "additive_animations/src/main/java/at/wirecube/additiveanimations/additive_animator/SubclassableAdditiveViewAnimator.java", "license": "apache-2.0", "size": 21051 }
[ "android.util.Property", "android.view.View" ]
import android.util.Property; import android.view.View;
import android.util.*; import android.view.*;
[ "android.util", "android.view" ]
android.util; android.view;
771,596
public IFile getModelFile() { return newFileCreationPage.getModelFile(); }
IFile function() { return newFileCreationPage.getModelFile(); }
/** * Get the file from the page. * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */
Get the file from the page.
getModelFile
{ "repo_name": "ylussaud/M2Doc", "path": "plugins/org.obeonetwork.m2doc.genconf.editor/src-gen/org/obeonetwork/m2doc/genconf/presentation/GenconfModelWizard.java", "license": "epl-1.0", "size": 21851 }
[ "org.eclipse.core.resources.IFile" ]
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.*;
[ "org.eclipse.core" ]
org.eclipse.core;
2,497,818
@Test public void testRetrieveIndexedQuestionsByName(){ //flush indexes flushIndexes(); //keyword: iPods final List<Question> listOfQuestions = getQuestionDaoImp().retrieveIndexQuestionsByKeyword("iPods", this.user.getUid(), 100, 0); log.debu...
void function(){ flushIndexes(); final List<Question> listOfQuestions = getQuestionDaoImp().retrieveIndexQuestionsByKeyword("iPods", this.user.getUid(), 100, 0); log.debug(STR+listOfQuestions.size()); assertEquals(STR, 2, listOfQuestions.size()); final List<Question> startlistOfQuestions = getQuestionDaoImp().retrieveI...
/** * Test Retrieve Indexed QuestionsByName. */
Test Retrieve Indexed QuestionsByName
testRetrieveIndexedQuestionsByName
{ "repo_name": "cristiani/encuestame", "path": "enme-persistence/enme-dao/src/test/java/org/encuestame/test/persistence/dao/TestQuestionDao.java", "license": "apache-2.0", "size": 9272 }
[ "java.util.List", "org.encuestame.persistence.domain.question.Question", "org.junit.Assert" ]
import java.util.List; import org.encuestame.persistence.domain.question.Question; import org.junit.Assert;
import java.util.*; import org.encuestame.persistence.domain.question.*; import org.junit.*;
[ "java.util", "org.encuestame.persistence", "org.junit" ]
java.util; org.encuestame.persistence; org.junit;
44,945