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 List<PublishingEndPoint> getEndPoints(); | List<PublishingEndPoint> function(); | /**
* Returns the list of {@link PublishingEndPoint} objects in the cache.
*
* @return The list of {@link PublishingEndPoint} objects.
*/ | Returns the list of <code>PublishingEndPoint</code> objects in the cache | getEndPoints | {
"repo_name": "dotCMS/core",
"path": "dotCMS/src/main/java/com/dotcms/publisher/endpoint/business/PublishingEndPointCache.java",
"license": "gpl-3.0",
"size": 1890
} | [
"com.dotcms.publisher.endpoint.bean.PublishingEndPoint",
"java.util.List"
] | import com.dotcms.publisher.endpoint.bean.PublishingEndPoint; import java.util.List; | import com.dotcms.publisher.endpoint.bean.*; import java.util.*; | [
"com.dotcms.publisher",
"java.util"
] | com.dotcms.publisher; java.util; | 2,455,138 |
private Geometry rectangleToGeometry(Rectangle2D r) {
return createRectangle(r.getMinX(), r.getMinY(), r.getWidth(), r.getHeight());
} | Geometry function(Rectangle2D r) { return createRectangle(r.getMinX(), r.getMinY(), r.getWidth(), r.getHeight()); } | /**
* Converts the Rectangle2D passed as parameter in a jts Geometry object
*
* @param r the rectangle to be converted
* @return a geometry with the same vertices as the rectangle
*/ | Converts the Rectangle2D passed as parameter in a jts Geometry object | rectangleToGeometry | {
"repo_name": "geotools/geotools",
"path": "modules/library/main/src/main/java/org/geotools/geometry/jts/LiteShape.java",
"license": "lgpl-2.1",
"size": 22447
} | [
"java.awt.geom.Rectangle2D",
"org.locationtech.jts.geom.Geometry"
] | import java.awt.geom.Rectangle2D; import org.locationtech.jts.geom.Geometry; | import java.awt.geom.*; import org.locationtech.jts.geom.*; | [
"java.awt",
"org.locationtech.jts"
] | java.awt; org.locationtech.jts; | 1,148,156 |
public ObjectStoreBag getOsb() {
return osb;
} | ObjectStoreBag function() { return osb; } | /**
* Returns the ObjectStoreBag, so that elements can be added and removed.
*
* @return the ObjectStoreBag
*/ | Returns the ObjectStoreBag, so that elements can be added and removed | getOsb | {
"repo_name": "julie-sullivan/phytomine",
"path": "intermine/api/main/src/org/intermine/api/profile/InterMineBag.java",
"license": "lgpl-2.1",
"size": 32778
} | [
"org.intermine.objectstore.query.ObjectStoreBag"
] | import org.intermine.objectstore.query.ObjectStoreBag; | import org.intermine.objectstore.query.*; | [
"org.intermine.objectstore"
] | org.intermine.objectstore; | 2,824,655 |
public static void runUiDelayedIfBlock(final Runnable runnable)
{
//if (TiApplication.getInstance().getMessageQueue().isBlocking()) {
if (TiMessenger.getMainMessenger().isBlocking()) {
runUiDelayed(runnable);
} else {
//Handler handler = new Handler(Looper.getMainLooper());
//handler.post(runnable);
... | static void function(final Runnable runnable) { if (TiMessenger.getMainMessenger().isBlocking()) { runUiDelayed(runnable); } else { TiMessenger.getMainMessenger().getHandler().post(runnable); } } | /**
* If there is a block on the UI message queue, run the Runnable "delayed".
* @param runnable Runnable to run on UI thread.
*/ | If there is a block on the UI message queue, run the Runnable "delayed" | runUiDelayedIfBlock | {
"repo_name": "hieupham007/Titanium_Mobile",
"path": "android/titanium/src/java/org/appcelerator/titanium/util/TiUIHelper.java",
"license": "apache-2.0",
"size": 31547
} | [
"org.appcelerator.kroll.common.TiMessenger"
] | import org.appcelerator.kroll.common.TiMessenger; | import org.appcelerator.kroll.common.*; | [
"org.appcelerator.kroll"
] | org.appcelerator.kroll; | 994,845 |
public Set<ClaimMapping> getMappedIdPClaims(String idPName, String tenantDomain,
List<String> localClaimURIs) throws
IdentityProviderManagementException {
int tenantId = IdentityTenantUtil.getTenantId(tenantDomain);
if (StringUtils.isEmpty... | Set<ClaimMapping> function(String idPName, String tenantDomain, List<String> localClaimURIs) throws IdentityProviderManagementException { int tenantId = IdentityTenantUtil.getTenantId(tenantDomain); if (StringUtils.isEmpty(idPName)) { String msg = STR; log.error(msg); throw new IdentityProviderManagementException(msg);... | /**
* Retrieves Identity provider information about a given tenant
*
* @param idPName Unique Name of the IdP to which the given local claim URIs need to be mapped
* @param tenantDomain The tenant domain of whose local claim URIs to be mapped
* @param localClaimURIs Local claim URIs whi... | Retrieves Identity provider information about a given tenant | getMappedIdPClaims | {
"repo_name": "kasungayan/carbon-identity",
"path": "components/idp-mgt/org.wso2.carbon.idp.mgt/src/main/java/org/wso2/carbon/idp/mgt/IdentityProviderManager.java",
"license": "apache-2.0",
"size": 73185
} | [
"java.util.HashSet",
"java.util.List",
"java.util.Set",
"org.apache.commons.lang.StringUtils",
"org.wso2.carbon.identity.application.common.model.ClaimConfig",
"org.wso2.carbon.identity.application.common.model.ClaimMapping",
"org.wso2.carbon.identity.application.common.model.IdentityProvider",
"org.w... | import java.util.HashSet; import java.util.List; import java.util.Set; import org.apache.commons.lang.StringUtils; import org.wso2.carbon.identity.application.common.model.ClaimConfig; import org.wso2.carbon.identity.application.common.model.ClaimMapping; import org.wso2.carbon.identity.application.common.model.Identit... | import java.util.*; import org.apache.commons.lang.*; import org.wso2.carbon.identity.application.common.model.*; import org.wso2.carbon.identity.application.common.util.*; import org.wso2.carbon.identity.core.util.*; import org.wso2.carbon.idp.mgt.*; import org.wso2.carbon.idp.mgt.dao.*; import org.wso2.carbon.idp.mgt... | [
"java.util",
"org.apache.commons",
"org.wso2.carbon"
] | java.util; org.apache.commons; org.wso2.carbon; | 1,194,424 |
PomEquippedEmbeddedMaven setPom(File pomFile); | PomEquippedEmbeddedMaven setPom(File pomFile); | /**
* Creates an instance of EmbeddedMaven with set given POM file.
*
* @param pomFile A POM file the EmbeddedMaven should be created with
* @return A created instance of EmbeddedMaven with set given POM file
*/ | Creates an instance of EmbeddedMaven with set given POM file | setPom | {
"repo_name": "shrinkwrap/resolver",
"path": "maven/api-maven-embedded/src/main/java/org/jboss/shrinkwrap/resolver/api/maven/embedded/pom/equipped/PomUnequippedEmbeddedMaven.java",
"license": "apache-2.0",
"size": 1377
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 1,201,257 |
private MethodType removeWrapper(MethodType targetType) {
Class[] types = targetType.parameterArray();
for (int i=0; i<types.length; i++) {
if (types[i]==Wrapper.class) {
targetType = targetType.changeParameterType(i, Object.class);
}
... | MethodType function(MethodType targetType) { Class[] types = targetType.parameterArray(); for (int i=0; i<types.length; i++) { if (types[i]==Wrapper.class) { targetType = targetType.changeParameterType(i, Object.class); } } return targetType; } | /**
* Helper method to manipulate the given type to replace Wrapper with Object.
*/ | Helper method to manipulate the given type to replace Wrapper with Object | removeWrapper | {
"repo_name": "avafanasiev/groovy",
"path": "src/main/org/codehaus/groovy/vmplugin/v7/Selector.java",
"license": "apache-2.0",
"size": 50283
} | [
"java.lang.invoke.MethodType",
"org.codehaus.groovy.runtime.wrappers.Wrapper"
] | import java.lang.invoke.MethodType; import org.codehaus.groovy.runtime.wrappers.Wrapper; | import java.lang.invoke.*; import org.codehaus.groovy.runtime.wrappers.*; | [
"java.lang",
"org.codehaus.groovy"
] | java.lang; org.codehaus.groovy; | 288,990 |
public SortedMetadata<org.restlet.data.MediaType> getAccMediaTypes() {
return this.accMediaTypes;
} | SortedMetadata<org.restlet.data.MediaType> function() { return this.accMediaTypes; } | /**
* Returns the accepted media types as Restlet
* {@link org.restlet.data.MediaType}s.
*
* @return the accepted {@link org.restlet.data.MediaType}s.
*/ | Returns the accepted media types as Restlet <code>org.restlet.data.MediaType</code>s | getAccMediaTypes | {
"repo_name": "alastrina123/debrief",
"path": "org.mwc.asset.comms/docs/restlet_src/org.restlet.ext.jaxrs/org/restlet/ext/jaxrs/internal/core/CallContext.java",
"license": "epl-1.0",
"size": 46359
} | [
"javax.ws.rs.core.MediaType",
"org.restlet.ext.jaxrs.internal.util.SortedMetadata"
] | import javax.ws.rs.core.MediaType; import org.restlet.ext.jaxrs.internal.util.SortedMetadata; | import javax.ws.rs.core.*; import org.restlet.ext.jaxrs.internal.util.*; | [
"javax.ws",
"org.restlet.ext"
] | javax.ws; org.restlet.ext; | 2,832,981 |
public Map getObjectivesForEntity(String name)
{
Object object = (Map)this.entitiesScoreObjectives.get(name);
if (object == null)
{
object = Maps.newHashMap();
}
return (Map)object;
} | Map function(String name) { Object object = (Map)this.entitiesScoreObjectives.get(name); if (object == null) { object = Maps.newHashMap(); } return (Map)object; } | /**
* Returns all the objectives for the given entity
*
* @param name The entity Name
*/ | Returns all the objectives for the given entity | getObjectivesForEntity | {
"repo_name": "trixmot/mod1",
"path": "build/tmp/recompileMc/sources/net/minecraft/scoreboard/Scoreboard.java",
"license": "lgpl-2.1",
"size": 14645
} | [
"com.google.common.collect.Maps",
"java.util.Map"
] | import com.google.common.collect.Maps; import java.util.Map; | import com.google.common.collect.*; import java.util.*; | [
"com.google.common",
"java.util"
] | com.google.common; java.util; | 1,634,684 |
public StoreFileMetaData metadata() {
return metadata;
} | StoreFileMetaData function() { return metadata; } | /**
* Returns the StoreFileMetaData for this file info.
*/ | Returns the StoreFileMetaData for this file info | metadata | {
"repo_name": "episerver/elasticsearch",
"path": "core/src/main/java/org/elasticsearch/index/snapshots/blobstore/BlobStoreIndexShardSnapshot.java",
"license": "apache-2.0",
"size": 20201
} | [
"org.elasticsearch.index.store.StoreFileMetaData"
] | import org.elasticsearch.index.store.StoreFileMetaData; | import org.elasticsearch.index.store.*; | [
"org.elasticsearch.index"
] | org.elasticsearch.index; | 1,504,303 |
Configuration conf = (Configuration)getServletContext().getAttribute(
HttpServer2.CONF_CONTEXT_ATTRIBUTE);
assert conf != null;
return conf;
} | Configuration conf = (Configuration)getServletContext().getAttribute( HttpServer2.CONF_CONTEXT_ATTRIBUTE); assert conf != null; return conf; } | /**
* Return the Configuration of the daemon hosting this servlet.
* This is populated when the HttpServer starts.
*/ | Return the Configuration of the daemon hosting this servlet. This is populated when the HttpServer starts | getConfFromContext | {
"repo_name": "dennishuo/hadoop",
"path": "hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/ConfServlet.java",
"license": "apache-2.0",
"size": 4135
} | [
"org.apache.hadoop.http.HttpServer2"
] | import org.apache.hadoop.http.HttpServer2; | import org.apache.hadoop.http.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 1,780,163 |
public void sortArray(Object array) {
switch (this) {
case BOOLEAN:
// there is no Arrays.sort(boolean[])
final boolean[] booleans = (boolean[]) array;
sortBooleanArray(booleans, 0, booleans.length);
return;
case BYTE:
Arrays.sort((byte[]) array);
return;
case CHAR:... | void function(Object array) { switch (this) { case BOOLEAN: final boolean[] booleans = (boolean[]) array; sortBooleanArray(booleans, 0, booleans.length); return; case BYTE: Arrays.sort((byte[]) array); return; case CHAR: Arrays.sort((char[]) array); return; case DOUBLE: Arrays.sort((double[]) array); return; case FLOAT... | /**
* Sorts an array of this primitive type.
*
* @param array Array of this primitive type
*/ | Sorts an array of this primitive type | sortArray | {
"repo_name": "arina-ielchiieva/calcite",
"path": "linq4j/src/main/java/org/apache/calcite/linq4j/tree/Primitive.java",
"license": "apache-2.0",
"size": 27669
} | [
"java.util.Arrays"
] | import java.util.Arrays; | import java.util.*; | [
"java.util"
] | java.util; | 413,389 |
protected void addRow(Component label, Component component) {
this.addComponent(label);
this.addComponent(component);
this.setComponentAlignment(label, Alignment.MIDDLE_LEFT);
}
| void function(Component label, Component component) { this.addComponent(label); this.addComponent(component); this.setComponentAlignment(label, Alignment.MIDDLE_LEFT); } | /**
* adds row
* @param label
* @param component
*/ | adds row | addRow | {
"repo_name": "chipster/chipster",
"path": "src/main/web/tool-editor/src/fi/csc/chipster/web/model/BasicModel.java",
"license": "mit",
"size": 5489
} | [
"com.vaadin.ui.Alignment",
"com.vaadin.ui.Component"
] | import com.vaadin.ui.Alignment; import com.vaadin.ui.Component; | import com.vaadin.ui.*; | [
"com.vaadin.ui"
] | com.vaadin.ui; | 2,222,080 |
public void setTotal(BigDecimal value) {
total = value;
} | void function(BigDecimal value) { total = value; } | /**
* Sets this ItemDealGroup's total.
*
* @param value the value to set
*/ | Sets this ItemDealGroup's total | setTotal | {
"repo_name": "mordigaldj/SmartRegister",
"path": "src/main/java/com/djm/smartreg/data/DBItemDealGroup.java",
"license": "mit",
"size": 8409
} | [
"java.math.BigDecimal"
] | import java.math.BigDecimal; | import java.math.*; | [
"java.math"
] | java.math; | 531,994 |
protected void loadCentralProperties(Properties properties){
properties.putAll(configBundle.loadAll());
} | void function(Properties properties){ properties.putAll(configBundle.loadAll()); } | /**
* load central proxy
*/ | load central proxy | loadCentralProperties | {
"repo_name": "vernonzheng/jforth-config",
"path": "jforth-config-client/src/main/java/org/xforth/config/context/DistributedPropertyPlaceholderConfigurer.java",
"license": "mit",
"size": 1870
} | [
"java.util.Properties"
] | import java.util.Properties; | import java.util.*; | [
"java.util"
] | java.util; | 2,005,375 |
public void add(Native2AsciiAdapter adapter) {
if (nestedAdapter != null) {
throw new BuildException("Can't have more than one native2ascii"
+ " adapter");
}
nestedAdapter = adapter;
} | void function(Native2AsciiAdapter adapter) { if (nestedAdapter != null) { throw new BuildException(STR + STR); } nestedAdapter = adapter; } | /**
* Set the adapter explicitly.
* @since Ant 1.8.0
*/ | Set the adapter explicitly | add | {
"repo_name": "Mayo-WE01051879/mayosapp",
"path": "Build/src/main/org/apache/tools/ant/taskdefs/optional/Native2Ascii.java",
"license": "mit",
"size": 10608
} | [
"org.apache.tools.ant.BuildException",
"org.apache.tools.ant.taskdefs.optional.native2ascii.Native2AsciiAdapter"
] | import org.apache.tools.ant.BuildException; import org.apache.tools.ant.taskdefs.optional.native2ascii.Native2AsciiAdapter; | import org.apache.tools.ant.*; import org.apache.tools.ant.taskdefs.optional.native2ascii.*; | [
"org.apache.tools"
] | org.apache.tools; | 2,472,477 |
static synchronized native long createNativeCallback(Callback callback,
Method method,
Class[] parameterTypes,
Class returnType,
... | static synchronized native long createNativeCallback(Callback callback, Method method, Class[] parameterTypes, Class returnType, int callingConvention, boolean direct); | /** Create a native trampoline to delegate execution to the Java callback.
*/ | Create a native trampoline to delegate execution to the Java callback | createNativeCallback | {
"repo_name": "xien777/yajsw",
"path": "yajsw/wrapper/src/main/java/com/sun/jna/Native.java",
"license": "lgpl-2.1",
"size": 72907
} | [
"java.lang.reflect.Method"
] | import java.lang.reflect.Method; | import java.lang.reflect.*; | [
"java.lang"
] | java.lang; | 1,441,858 |
public void generateSurface(World world, Random random, int chunkX, int chunkZ)
{
} | void function(World world, Random random, int chunkX, int chunkZ) { } | /**
* Generates the overworld
* @param world the world to generate in
* @param random the world random number generator
* @param chunkX the chunk X position
* @param chunkZ the chunk Z position
*/ | Generates the overworld | generateSurface | {
"repo_name": "TeamCoderCraft/EnergizedPower",
"path": "src/main/java/com/codecraft/energizedpower/init/ModWorldGen.java",
"license": "lgpl-3.0",
"size": 2824
} | [
"java.util.Random",
"net.minecraft.world.World"
] | import java.util.Random; import net.minecraft.world.World; | import java.util.*; import net.minecraft.world.*; | [
"java.util",
"net.minecraft.world"
] | java.util; net.minecraft.world; | 617,595 |
private void correctTICBaselines(final RSessionWrapper rSession,
final RawDataFile origDataFile, final RawDataFileWriter writer,
final int level, final int numBins, final ParameterSet parameters)
throws IOException, RSessionWrapperException {
// Get scan numbers from ori... | void function(final RSessionWrapper rSession, final RawDataFile origDataFile, final RawDataFileWriter writer, final int level, final int numBins, final ParameterSet parameters) throws IOException, RSessionWrapperException { final int[] scanNumbers = origDataFile.getScanNumbers(level); final int numScans = scanNumbers.l... | /**
* Correct the baselines (using TIC chromatograms).
*
* @param origDataFile
* dataFile of concern.
* @param writer
* data file writer.
* @param level
* the MS level.
* @param numBins
* number of m/z bins.
* @param par... | Correct the baselines (using TIC chromatograms) | correctTICBaselines | {
"repo_name": "DrewG/mzmine2",
"path": "src/main/java/net/sf/mzmine/modules/rawdatamethods/filtering/baselinecorrection/BaselineCorrector.java",
"license": "gpl-2.0",
"size": 23983
} | [
"java.io.IOException",
"net.sf.mzmine.datamodel.DataPoint",
"net.sf.mzmine.datamodel.RawDataFile",
"net.sf.mzmine.datamodel.RawDataFileWriter",
"net.sf.mzmine.datamodel.Scan",
"net.sf.mzmine.datamodel.impl.SimpleScan",
"net.sf.mzmine.parameters.ParameterSet",
"net.sf.mzmine.util.R"
] | import java.io.IOException; import net.sf.mzmine.datamodel.DataPoint; import net.sf.mzmine.datamodel.RawDataFile; import net.sf.mzmine.datamodel.RawDataFileWriter; import net.sf.mzmine.datamodel.Scan; import net.sf.mzmine.datamodel.impl.SimpleScan; import net.sf.mzmine.parameters.ParameterSet; import net.sf.mzmine.util... | import java.io.*; import net.sf.mzmine.datamodel.*; import net.sf.mzmine.datamodel.impl.*; import net.sf.mzmine.parameters.*; import net.sf.mzmine.util.*; | [
"java.io",
"net.sf.mzmine"
] | java.io; net.sf.mzmine; | 114,382 |
private String getEtag(String commentId, String loggedInUser){
String username = loggedInUser;
try {
String lastUpdatedTime = RestApiUtil.getConsumer(username).getLastUpdatedTimeOfComment(commentId);
return ETagUtils.generateETag(lastUpdatedTime);
} catch (APIManageme... | String function(String commentId, String loggedInUser){ String username = loggedInUser; try { String lastUpdatedTime = RestApiUtil.getConsumer(username).getLastUpdatedTimeOfComment(commentId); return ETagUtils.generateETag(lastUpdatedTime); } catch (APIManagementException e) { String errorMessage = STR + commentId; log... | /**
* Retrieves last updatedtime for a comment given the comment id
*
* @param commentId Comment ID
* @param loggedInUser
* @return Last updated time
*/ | Retrieves last updatedtime for a comment given the comment id | getEtag | {
"repo_name": "lakmali/carbon-apimgt",
"path": "components/apimgt/org.wso2.carbon.apimgt.rest.api.store/src/main/java/org/wso2/carbon/apimgt/rest/api/store/impl/ApisApiServiceImpl.java",
"license": "apache-2.0",
"size": 43185
} | [
"org.wso2.carbon.apimgt.core.exception.APIManagementException",
"org.wso2.carbon.apimgt.core.util.ETagUtils",
"org.wso2.carbon.apimgt.rest.api.common.util.RestApiUtil"
] | import org.wso2.carbon.apimgt.core.exception.APIManagementException; import org.wso2.carbon.apimgt.core.util.ETagUtils; import org.wso2.carbon.apimgt.rest.api.common.util.RestApiUtil; | import org.wso2.carbon.apimgt.core.exception.*; import org.wso2.carbon.apimgt.core.util.*; import org.wso2.carbon.apimgt.rest.api.common.util.*; | [
"org.wso2.carbon"
] | org.wso2.carbon; | 673,551 |
public EClass getAccountingUnit() {
if (accountingUnitEClass == null) {
accountingUnitEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(PaymentMeteringPackage.eNS_URI).getEClassifiers().get(5);
}
return accountingUnitEClass;
} | EClass function() { if (accountingUnitEClass == null) { accountingUnitEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(PaymentMeteringPackage.eNS_URI).getEClassifiers().get(5); } return accountingUnitEClass; } | /**
* Returns the meta object for class '{@link CIM15.IEC61968.PaymentMetering.AccountingUnit <em>Accounting Unit</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Accounting Unit</em>'.
* @see CIM15.IEC61968.PaymentMetering.AccountingUnit
* @generated
*/ | Returns the meta object for class '<code>CIM15.IEC61968.PaymentMetering.AccountingUnit Accounting Unit</code>'. | getAccountingUnit | {
"repo_name": "SES-fortiss/SmartGridCoSimulation",
"path": "core/cim15/src/CIM15/IEC61968/PaymentMetering/PaymentMeteringPackage.java",
"license": "apache-2.0",
"size": 290630
} | [
"org.eclipse.emf.ecore.EClass",
"org.eclipse.emf.ecore.EPackage"
] | import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EPackage; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,148,430 |
public RealVector mapDivideToSelf(double d){
return mapToSelf(FunctionUtils.fix2ndArgument(new Divide(), d));
} | RealVector function(double d){ return mapToSelf(FunctionUtils.fix2ndArgument(new Divide(), d)); } | /**
* Divide each entry by the argument.
* The instance is changed in-place.
*
* @param d Value to divide by.
* @return {@code this}.
*/ | Divide each entry by the argument. The instance is changed in-place | mapDivideToSelf | {
"repo_name": "SpoonLabs/astor",
"path": "examples/math_28/src/main/java/org/apache/commons/math3/linear/RealVector.java",
"license": "gpl-2.0",
"size": 50959
} | [
"org.apache.commons.math3.analysis.FunctionUtils",
"org.apache.commons.math3.analysis.function.Divide"
] | import org.apache.commons.math3.analysis.FunctionUtils; import org.apache.commons.math3.analysis.function.Divide; | import org.apache.commons.math3.analysis.*; import org.apache.commons.math3.analysis.function.*; | [
"org.apache.commons"
] | org.apache.commons; | 560,199 |
public int getHarvestLevel(IBlockState state)
{
return harvestLevel[getMetaFromState(state)];
} | int function(IBlockState state) { return harvestLevel[getMetaFromState(state)]; } | /**
* Queries the harvest level of this item stack for the specified tool class,
* Returns -1 if this tool is not of the specified type
*
* @param stack This item stack instance
* @return Harvest level, or -1 if not the specified tool type.
*/ | Queries the harvest level of this item stack for the specified tool class, Returns -1 if this tool is not of the specified type | getHarvestLevel | {
"repo_name": "aebert1/BigTransport",
"path": "build/tmp/recompileMc/sources/net/minecraft/block/Block.java",
"license": "gpl-3.0",
"size": 115325
} | [
"net.minecraft.block.state.IBlockState"
] | import net.minecraft.block.state.IBlockState; | import net.minecraft.block.state.*; | [
"net.minecraft.block"
] | net.minecraft.block; | 1,530,881 |
public double[ ][ ][ ] reverse( double[ ][ ][ ] spcHilb )
throws JWaveException {
int maxP = MathToolKit.getExponent( spcHilb.length );
int maxQ = MathToolKit.getExponent( spcHilb[ 0 ].length );
int maxR = MathToolKit.getExponent( spcHilb[ 0 ][ 0 ].length );
return reverse( spcHilb, maxP, maxQ,... | double[ ][ ][ ] function( double[ ][ ][ ] spcHilb ) throws JWaveException { int maxP = MathToolKit.getExponent( spcHilb.length ); int maxQ = MathToolKit.getExponent( spcHilb[ 0 ].length ); int maxR = MathToolKit.getExponent( spcHilb[ 0 ][ 0 ].length ); return reverse( spcHilb, maxP, maxQ, maxR ); } | /**
* Performs the 3-D reverse transform from frequency or Hilbert domain to time
* domain for a given space (3-D) depending on the used transform algorithm by
* inheritance.
*
* @author Christian Scheiblich (cscheiblich@gmail.com)
* @date 10.07.2010 18:09:54
* @param spcHilb
* @return
* @th... | Performs the 3-D reverse transform from frequency or Hilbert domain to time domain for a given space (3-D) depending on the used transform algorithm by inheritance | reverse | {
"repo_name": "RaineForest/ECG-Viewer",
"path": "JWave/src/math/jwave/transforms/BasicTransform.java",
"license": "gpl-2.0",
"size": 22386
} | [
"math.jwave.exceptions.JWaveException",
"math.jwave.tools.MathToolKit"
] | import math.jwave.exceptions.JWaveException; import math.jwave.tools.MathToolKit; | import math.jwave.exceptions.*; import math.jwave.tools.*; | [
"math.jwave.exceptions",
"math.jwave.tools"
] | math.jwave.exceptions; math.jwave.tools; | 1,483,446 |
@Override
public Adapter createPrimaryVersionSpecAdapter() {
if (primaryVersionSpecItemProvider == null)
{
primaryVersionSpecItemProvider = new PrimaryVersionSpecItemProvider(this);
}
return primaryVersionSpecItemProvider;
}
protected LogMessageItemProvider logMessageItemProvider; | Adapter function() { if (primaryVersionSpecItemProvider == null) { primaryVersionSpecItemProvider = new PrimaryVersionSpecItemProvider(this); } return primaryVersionSpecItemProvider; } protected LogMessageItemProvider logMessageItemProvider; | /**
* This creates an adapter for a
* {@link org.eclipse.emf.emfstore.internal.server.model.versioning.PrimaryVersionSpec} . <!--
* begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/ | This creates an adapter for a <code>org.eclipse.emf.emfstore.internal.server.model.versioning.PrimaryVersionSpec</code> . | createPrimaryVersionSpecAdapter | {
"repo_name": "edgarmueller/emfstore-rest",
"path": "bundles/org.eclipse.emf.emfstore.server.model.edit/src/org/eclipse/emf/emfstore/internal/server/model/versioning/provider/VersioningItemProviderAdapterFactory.java",
"license": "epl-1.0",
"size": 18587
} | [
"org.eclipse.emf.common.notify.Adapter"
] | import org.eclipse.emf.common.notify.Adapter; | import org.eclipse.emf.common.notify.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,904,558 |
public void setComposite(Composite comp) {
this.composite = comp;
if (comp instanceof AlphaComposite) {
AlphaComposite acomp = (AlphaComposite) comp;
int alpha = (int) (acomp.getAlpha()*0xFF);
this.gc.setAlpha(alpha);
}
else {
System.... | void function(Composite comp) { this.composite = comp; if (comp instanceof AlphaComposite) { AlphaComposite acomp = (AlphaComposite) comp; int alpha = (int) (acomp.getAlpha()*0xFF); this.gc.setAlpha(alpha); } else { System.out.println(STR); } } | /**
* Sets the current composite. This implementation currently supports
* only the {@link AlphaComposite} class.
*
* @param comp the composite.
*/ | Sets the current composite. This implementation currently supports only the <code>AlphaComposite</code> class | setComposite | {
"repo_name": "martingwhite/astor",
"path": "examples/chart_11/swt/org/jfree/experimental/swt/SWTGraphics2D.java",
"license": "gpl-2.0",
"size": 42572
} | [
"java.awt.AlphaComposite",
"java.awt.Composite"
] | import java.awt.AlphaComposite; import java.awt.Composite; | import java.awt.*; | [
"java.awt"
] | java.awt; | 632,079 |
public IAST[] filter(Predicate<? super IExpr> predicate); | IAST[] function(Predicate<? super IExpr> predicate); | /**
* Select all elements by applying the <code>predicate</code> to each argument in this <code>AST
* </code> and append the arguments which satisfy the predicate to the <code>0th element</code> of
* the result array, or otherwise append it to the <code>1st element</code> of the result array.
*
* @param ... | Select all elements by applying the <code>predicate</code> to each argument in this <code>AST </code> and append the arguments which satisfy the predicate to the <code>0th element</code> of the result array, or otherwise append it to the <code>1st element</code> of the result array | filter | {
"repo_name": "axkr/symja_android_library",
"path": "symja_android_library/matheclipse-core/src/main/java/org/matheclipse/core/interfaces/IAST.java",
"license": "gpl-3.0",
"size": 60090
} | [
"java.util.function.Predicate"
] | import java.util.function.Predicate; | import java.util.function.*; | [
"java.util"
] | java.util; | 1,548,970 |
public void setTransactionManager(PlatformTransactionManager transactionManager) {
this.transactionManager = transactionManager;
} | void function(PlatformTransactionManager transactionManager) { this.transactionManager = transactionManager; } | /**
* The Spring transaction manager to use.
*/ | The Spring transaction manager to use | setTransactionManager | {
"repo_name": "ekprayas/camel",
"path": "components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsConfiguration.java",
"license": "apache-2.0",
"size": 71287
} | [
"org.springframework.transaction.PlatformTransactionManager"
] | import org.springframework.transaction.PlatformTransactionManager; | import org.springframework.transaction.*; | [
"org.springframework.transaction"
] | org.springframework.transaction; | 1,329,594 |
private JMenu buildEditMenu()
{
JMenu menu = new JMenu();
initMenuItem(menu, TreeViewerWin.EDIT_MENU);
menu.add(cutElement);
menu.add(copyElement);
menu.add(pasteElement);
return menu;
}
| JMenu function() { JMenu menu = new JMenu(); initMenuItem(menu, TreeViewerWin.EDIT_MENU); menu.add(cutElement); menu.add(copyElement); menu.add(pasteElement); return menu; } | /**
* Creates the menu to edit the object.
*
* @return See above.
*/ | Creates the menu to edit the object | buildEditMenu | {
"repo_name": "jballanc/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/agents/treeviewer/view/PopupMenu.java",
"license": "gpl-2.0",
"size": 21934
} | [
"javax.swing.JMenu"
] | import javax.swing.JMenu; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 117,845 |
public static Expression regexReplaceAll(final Expression expression,
final String regex, final Expression replacementExpression) { | static Expression function(final Expression expression, final String regex, final Expression replacementExpression) { | /**
* Transforms the expression into a String then performs the regex
* replaceAll to transform the String and return the result
*/ | Transforms the expression into a String then performs the regex replaceAll to transform the String and return the result | regexReplaceAll | {
"repo_name": "atoulme/camel",
"path": "camel-core/src/main/java/org/apache/camel/builder/ExpressionBuilder.java",
"license": "apache-2.0",
"size": 76427
} | [
"org.apache.camel.Expression"
] | import org.apache.camel.Expression; | import org.apache.camel.*; | [
"org.apache.camel"
] | org.apache.camel; | 2,184,181 |
public void setXs(X[] xs) {
JodaBeanUtils.notNull(xs, "xs");
this._xs = xs;
} | void function(X[] xs) { JodaBeanUtils.notNull(xs, "xs"); this._xs = xs; } | /**
* Sets the x values.
* @param xs the new value of the property, not null
*/ | Sets the x values | setXs | {
"repo_name": "McLeodMoores/starling",
"path": "projects/core/src/main/java/com/opengamma/core/marketdatasnapshot/VolatilityCubeData.java",
"license": "apache-2.0",
"size": 29657
} | [
"org.joda.beans.JodaBeanUtils"
] | import org.joda.beans.JodaBeanUtils; | import org.joda.beans.*; | [
"org.joda.beans"
] | org.joda.beans; | 1,493,607 |
public List<PushApplication> getAllPushApplications(String... ldapReturnAttributes) {
return ldapEntryManager.findEntries(getDnForPushApplication(null), PushApplication.class, null, ldapReturnAttributes);
} | List<PushApplication> function(String... ldapReturnAttributes) { return ldapEntryManager.findEntries(getDnForPushApplication(null), PushApplication.class, null, ldapReturnAttributes); } | /**
* Get all oxPush applications
*
* @return List of oxPush applications
*/ | Get all oxPush applications | getAllPushApplications | {
"repo_name": "madumlao/oxTrust",
"path": "server/src/main/java/org/gluu/oxtrust/service/push/PushApplicationService.java",
"license": "mit",
"size": 5352
} | [
"java.util.List",
"org.gluu.oxtrust.model.push.PushApplication"
] | import java.util.List; import org.gluu.oxtrust.model.push.PushApplication; | import java.util.*; import org.gluu.oxtrust.model.push.*; | [
"java.util",
"org.gluu.oxtrust"
] | java.util; org.gluu.oxtrust; | 950,646 |
public boolean process(LocalWorld world, Random random, ChunkCoordinate chunkCoord); | boolean function(LocalWorld world, Random random, ChunkCoordinate chunkCoord); | /**
* Spawns the object one or more times in a chunk. The object can search a good y position by
* itself.
*
* @param world The world to spawn in.
* @param random Random number generator based on the world seed.
* @param chunkCoord The chunk to spawn the objects in.
* @return... | Spawns the object one or more times in a chunk. The object can search a good y position by itself | process | {
"repo_name": "whichonespink44/TerrainControl",
"path": "common/src/main/java/com/khorn/terraincontrol/customobjects/CustomObject.java",
"license": "mit",
"size": 4583
} | [
"com.khorn.terraincontrol.LocalWorld",
"com.khorn.terraincontrol.util.ChunkCoordinate",
"java.util.Random"
] | import com.khorn.terraincontrol.LocalWorld; import com.khorn.terraincontrol.util.ChunkCoordinate; import java.util.Random; | import com.khorn.terraincontrol.*; import com.khorn.terraincontrol.util.*; import java.util.*; | [
"com.khorn.terraincontrol",
"java.util"
] | com.khorn.terraincontrol; java.util; | 1,457,654 |
public void putBytes(long index, byte[] value, int off, int len)
{
while (len > 0)
{
ByteBuffer buf = buffer(index);
int count = Math.min(len, buf.remaining());
buf.put(value, off, count);
index += count;
off += count;
len -... | void function(long index, byte[] value, int off, int len) { while (len > 0) { ByteBuffer buf = buffer(index); int count = Math.min(len, buf.remaining()); buf.put(value, off, count); index += count; off += count; len -= count; } } | /**
* Stores a section of the passed byte array, defined by <code>off</code> and
* <code>len</code>, starting at the given index. Will span segments as needed.
*
* @param index starting index
* @param value bytes to store
* @param off starting offset
* @param len byte count
... | Stores a section of the passed byte array, defined by <code>off</code> and <code>len</code>, starting at the given index. Will span segments as needed | putBytes | {
"repo_name": "EntitypediaGames/games-common",
"path": "src/main/java/org/entitypedia/games/common/buffer/MappedFileBuffer.java",
"license": "mit",
"size": 14219
} | [
"java.nio.ByteBuffer"
] | import java.nio.ByteBuffer; | import java.nio.*; | [
"java.nio"
] | java.nio; | 82,748 |
public void setBaseItemLabelGenerator(XYItemLabelGenerator generator);
//// ITEM LABEL FONT ///////////////////////////////////////////////////////
| void function(XYItemLabelGenerator generator); | /**
* Sets the base item label generator and sends a
* {@link RendererChangeEvent} to all registered listeners.
*
* @param generator the generator (<code>null</code> permitted).
*
* @see #getBaseItemLabelGenerator()
*/ | Sets the base item label generator and sends a <code>RendererChangeEvent</code> to all registered listeners | setBaseItemLabelGenerator | {
"repo_name": "sebkur/JFreeChart",
"path": "src/main/java/org/jfree/chart/renderer/xy/XYItemRenderer.java",
"license": "lgpl-3.0",
"size": 64436
} | [
"org.jfree.chart.labels.XYItemLabelGenerator"
] | import org.jfree.chart.labels.XYItemLabelGenerator; | import org.jfree.chart.labels.*; | [
"org.jfree.chart"
] | org.jfree.chart; | 1,960,037 |
//------------------------- AUTOGENERATED START -------------------------
///CLOVER:OFF
public static InterpolatedCurveDefinition.Meta meta() {
return InterpolatedCurveDefinition.Meta.INSTANCE;
}
static {
JodaBeanUtils.registerMetaBean(InterpolatedCurveDefinition.Meta.INSTANCE);
} | static InterpolatedCurveDefinition.Meta function() { return InterpolatedCurveDefinition.Meta.INSTANCE; } static { JodaBeanUtils.registerMetaBean(InterpolatedCurveDefinition.Meta.INSTANCE); } | /**
* The meta-bean for {@code InterpolatedCurveDefinition}.
* @return the meta-bean, not null
*/ | The meta-bean for InterpolatedCurveDefinition | meta | {
"repo_name": "jeorme/OG-Platform",
"path": "projects/OG-Financial/src/main/java/com/opengamma/financial/analytics/curve/InterpolatedCurveDefinition.java",
"license": "apache-2.0",
"size": 12758
} | [
"org.joda.beans.JodaBeanUtils"
] | import org.joda.beans.JodaBeanUtils; | import org.joda.beans.*; | [
"org.joda.beans"
] | org.joda.beans; | 851,208 |
@Test
public void testReservedKeyLabels() throws Exception {
assertFalse(BuildType.Selector.isReservedLabel(Label.parseAbsolute("//condition:a")));
assertTrue(BuildType.Selector.isReservedLabel(
Label.parseAbsolute(BuildType.Selector.DEFAULT_CONDITION_KEY)));
} | void function() throws Exception { assertFalse(BuildType.Selector.isReservedLabel(Label.parseAbsolute(" assertTrue(BuildType.Selector.isReservedLabel( Label.parseAbsolute(BuildType.Selector.DEFAULT_CONDITION_KEY))); } | /**
* Tests for "reserved" key labels (i.e. not intended to map to actual targets).
*/ | Tests for "reserved" key labels (i.e. not intended to map to actual targets) | testReservedKeyLabels | {
"repo_name": "mrdomino/bazel",
"path": "src/test/java/com/google/devtools/build/lib/packages/BuildTypeTest.java",
"license": "apache-2.0",
"size": 17117
} | [
"com.google.devtools.build.lib.cmdline.Label",
"com.google.devtools.build.lib.packages.BuildType",
"org.junit.Assert"
] | import com.google.devtools.build.lib.cmdline.Label; import com.google.devtools.build.lib.packages.BuildType; import org.junit.Assert; | import com.google.devtools.build.lib.cmdline.*; import com.google.devtools.build.lib.packages.*; import org.junit.*; | [
"com.google.devtools",
"org.junit"
] | com.google.devtools; org.junit; | 1,067,292 |
public void setValue(Value[] values)
throws ValueFormatException,
VersionException,
LockException,
ConstraintViolationException,
RepositoryException
{
throw new UnsupportedOperationException(getClass().getName());
} | void function(Value[] values) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException { throw new UnsupportedOperationException(getClass().getName()); } | /**
* Sets the property value to a value array.
*/ | Sets the property value to a value array | setValue | {
"repo_name": "christianchristensen/resin",
"path": "modules/extra/src/com/caucho/jcr/base/BaseProperty.java",
"license": "gpl-2.0",
"size": 7072
} | [
"javax.jcr.RepositoryException",
"javax.jcr.Value",
"javax.jcr.ValueFormatException",
"javax.jcr.lock.LockException",
"javax.jcr.nodetype.ConstraintViolationException",
"javax.jcr.version.VersionException"
] | import javax.jcr.RepositoryException; import javax.jcr.Value; import javax.jcr.ValueFormatException; import javax.jcr.lock.LockException; import javax.jcr.nodetype.ConstraintViolationException; import javax.jcr.version.VersionException; | import javax.jcr.*; import javax.jcr.lock.*; import javax.jcr.nodetype.*; import javax.jcr.version.*; | [
"javax.jcr"
] | javax.jcr; | 2,565,752 |
Node<K, V> find(K key, boolean create) {
Comparator<? super K> comparator = this.comparator;
Node<K, V> nearest = root;
int comparison = 0;
if (nearest != null) {
// Micro-optimization: avoid polymorphic calls to Comparator.compare().
@SuppressWarnings("unchecked") // Throws a ClassCastEx... | Node<K, V> find(K key, boolean create) { Comparator<? super K> comparator = this.comparator; Node<K, V> nearest = root; int comparison = 0; if (nearest != null) { @SuppressWarnings(STR) Comparable<Object> comparableKey = (comparator == NATURAL_ORDER) ? (Comparable<Object>) key : null; while (true) { comparison = (compa... | /**
* Returns the node at or adjacent to the given key, creating it if requested.
*
* @throws ClassCastException if {@code key} and the tree's keys aren't
* mutually comparable.
*/ | Returns the node at or adjacent to the given key, creating it if requested | find | {
"repo_name": "LattEngineer/LattEngineerAPI",
"path": "src/main/java/io/lattengineer/LattEngineerAPI/gson/internal/LinkedTreeMap.java",
"license": "mit",
"size": 17874
} | [
"java.util.Comparator"
] | import java.util.Comparator; | import java.util.*; | [
"java.util"
] | java.util; | 1,914,313 |
public static RuleBuilder<Object, Object> create(Class<? extends Rule> ruleClass,
RuleChainActionType actionType) {
return new RuleBuilder<>(ruleClass, actionType);
} | static RuleBuilder<Object, Object> function(Class<? extends Rule> ruleClass, RuleChainActionType actionType) { return new RuleBuilder<>(ruleClass, actionType); } | /**
* Returns a new RuleBuilder for the specified Rule class.
* @param ruleClass the class of Rule to build
* @param actionType if STOP_ON_FAILURE, stops the rule chain if RuleState is BREAK only if the rule fails
* (for supported rule classes); if ERROR_ON_FAILURE, allows exceptions t... | Returns a new RuleBuilder for the specified Rule class | create | {
"repo_name": "rulebook-rules/rulebook",
"path": "rulebook-core/src/main/java/com/deliveredtechnologies/rulebook/lang/RuleBuilder.java",
"license": "apache-2.0",
"size": 11020
} | [
"com.deliveredtechnologies.rulebook.model.Rule",
"com.deliveredtechnologies.rulebook.model.RuleChainActionType"
] | import com.deliveredtechnologies.rulebook.model.Rule; import com.deliveredtechnologies.rulebook.model.RuleChainActionType; | import com.deliveredtechnologies.rulebook.model.*; | [
"com.deliveredtechnologies.rulebook"
] | com.deliveredtechnologies.rulebook; | 2,403,271 |
private Component getPlatformSensorClassesLeaf(PlatformIdent platformIdent, List<PlatformSensorTypeIdent> platformSensorTypeIdents, RepositoryDefinition definition) {
Component classesOverview = new Leaf();
boolean sensorTypeAvailable = false;
classesOverview.setName("Classes");
classesOverview.setImage(Insp... | Component function(PlatformIdent platformIdent, List<PlatformSensorTypeIdent> platformSensorTypeIdents, RepositoryDefinition definition) { Component classesOverview = new Leaf(); boolean sensorTypeAvailable = false; classesOverview.setName(STR); classesOverview.setImage(InspectIT.getDefault().getImage(InspectITImages.I... | /**
* Creates the platform sensor classes leaf.
*
* @param platformIdent
* The platform ident object.
*
* @param platformSensorTypeIdents
* The list of {@link PlatformSensorTypeIdent}.
* @param definition
* The {@link RepositoryDefinition} object.
* @return An inst... | Creates the platform sensor classes leaf | getPlatformSensorClassesLeaf | {
"repo_name": "kugelr/inspectIT",
"path": "inspectIT/src/info/novatec/inspectit/rcp/model/TreeModelManager.java",
"license": "agpl-3.0",
"size": 31321
} | [
"info.novatec.inspectit.cmr.model.PlatformIdent",
"info.novatec.inspectit.cmr.model.PlatformSensorTypeIdent",
"info.novatec.inspectit.rcp.InspectIT",
"info.novatec.inspectit.rcp.InspectITImages",
"info.novatec.inspectit.rcp.editor.inputdefinition.EditorPropertiesData",
"info.novatec.inspectit.rcp.editor.i... | import info.novatec.inspectit.cmr.model.PlatformIdent; import info.novatec.inspectit.cmr.model.PlatformSensorTypeIdent; import info.novatec.inspectit.rcp.InspectIT; import info.novatec.inspectit.rcp.InspectITImages; import info.novatec.inspectit.rcp.editor.inputdefinition.EditorPropertiesData; import info.novatec.inspe... | import info.novatec.inspectit.cmr.model.*; import info.novatec.inspectit.rcp.*; import info.novatec.inspectit.rcp.editor.inputdefinition.*; import info.novatec.inspectit.rcp.formatter.*; import info.novatec.inspectit.rcp.repository.*; import java.util.*; | [
"info.novatec.inspectit",
"java.util"
] | info.novatec.inspectit; java.util; | 2,112,216 |
private void openConnection(String url) {
try {
this.connection = new URL(url).openConnection();
}
catch (MalformedURLException e) {
e.printStackTrace();
}
catch (IOException e) {
e.printStackTrace();
}
} | void function(String url) { try { this.connection = new URL(url).openConnection(); } catch (MalformedURLException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } } | /**
* Method that opens the connection to the ThingSpeak feed
* @param url the URL to connect to
*/ | Method that opens the connection to the ThingSpeak feed | openConnection | {
"repo_name": "JohanBrunet/HighScoreProject",
"path": "HighScores/src/scores/HighScore1.java",
"license": "mit",
"size": 1798
} | [
"java.io.IOException",
"java.net.MalformedURLException"
] | import java.io.IOException; import java.net.MalformedURLException; | import java.io.*; import java.net.*; | [
"java.io",
"java.net"
] | java.io; java.net; | 1,504,517 |
HttpURLConnection getHTTPConnection(String pathInfo, String query, boolean preAuthHeader)
throws IOException, RepositoryException; | HttpURLConnection getHTTPConnection(String pathInfo, String query, boolean preAuthHeader) throws IOException, RepositoryException; | /**
* Creates a connection to the Server using the arguments.
*
* @param pathInfo
* should look like 'RAWS/...' without a '/' in front. Furthermore the pathInfo
* should NOT be encoded. This will be done by this function.
* @param query
* should look like this '?format=PAR... | Creates a connection to the Server using the arguments | getHTTPConnection | {
"repo_name": "boob-sbcm/3838438",
"path": "src/main/java/com/rapidminer/repository/internal/remote/RemoteRepository.java",
"license": "agpl-3.0",
"size": 7378
} | [
"com.rapidminer.repository.RepositoryException",
"java.io.IOException",
"java.net.HttpURLConnection"
] | import com.rapidminer.repository.RepositoryException; import java.io.IOException; import java.net.HttpURLConnection; | import com.rapidminer.repository.*; import java.io.*; import java.net.*; | [
"com.rapidminer.repository",
"java.io",
"java.net"
] | com.rapidminer.repository; java.io; java.net; | 2,230,798 |
@Override
public CqQueryVsdStats getVsdStats() {
return stats;
} | CqQueryVsdStats function() { return stats; } | /**
* Returns a reference to VSD stats of the CQ
*
* @return VSD stats of the CQ
*/ | Returns a reference to VSD stats of the CQ | getVsdStats | {
"repo_name": "davebarnes97/geode",
"path": "geode-cq/src/main/java/org/apache/geode/cache/query/cq/internal/CqQueryImpl.java",
"license": "apache-2.0",
"size": 11477
} | [
"org.apache.geode.cache.query.internal.CqQueryVsdStats"
] | import org.apache.geode.cache.query.internal.CqQueryVsdStats; | import org.apache.geode.cache.query.internal.*; | [
"org.apache.geode"
] | org.apache.geode; | 2,069,211 |
public boolean addGrinderRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, ItemStack aOutput4);
| boolean function(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, ItemStack aOutput4); | /**
* Adds a Grinder Recipe
* @param aInput1 must be != null
* @param aInput2 id for the Cell needed for this Recipe
* @param aOutput1 must be != null
* @param aOutput2 can be null
* @param aOutput3 can be null
* @param aOutput4 can be null
*/ | Adds a Grinder Recipe | addGrinderRecipe | {
"repo_name": "Foghrye4/ihl",
"path": "src/main/java/gregtech/api/interfaces/internal/IGT_RecipeAdder.java",
"license": "gpl-3.0",
"size": 15922
} | [
"net.minecraft.item.ItemStack"
] | import net.minecraft.item.ItemStack; | import net.minecraft.item.*; | [
"net.minecraft.item"
] | net.minecraft.item; | 983,319 |
ImmutableList<? extends RuntimeBundle> getBundles(); | ImmutableList<? extends RuntimeBundle> getBundles(); | /**
* Returns the bundles that constitute this repository.
*
* <p>Every repository implicitly contains the system bundle. The returned list only contains the explicit bundles,
* and not the system bundle.
*
* @return the bundles that constitute this repository, except for the system bundle... | Returns the bundles that constitute this repository. Every repository implicitly contains the system bundle. The returned list only contains the explicit bundles, and not the system bundle | getBundles | {
"repo_name": "fschopp/cloudkeeper",
"path": "cloudkeeper-core/cloudkeeper-model/src/main/java/xyz/cloudkeeper/model/runtime/element/RuntimeRepository.java",
"license": "apache-2.0",
"size": 2019
} | [
"xyz.cloudkeeper.model.util.ImmutableList"
] | import xyz.cloudkeeper.model.util.ImmutableList; | import xyz.cloudkeeper.model.util.*; | [
"xyz.cloudkeeper.model"
] | xyz.cloudkeeper.model; | 1,938,577 |
public boolean setVolume(INotifiableManager manager, int volume);
| boolean function(INotifiableManager manager, int volume); | /**
* Sets the volume as a percentage of the maximum possible.
* @param manager Manager reference
* @param volume New volume (0-100)
* @return true on success, false otherwise.
*/ | Sets the volume as a percentage of the maximum possible | setVolume | {
"repo_name": "murat8505/android-xbmcremote-1",
"path": "src/org/xbmc/api/data/IControlClient.java",
"license": "gpl-2.0",
"size": 10126
} | [
"org.xbmc.api.business.INotifiableManager"
] | import org.xbmc.api.business.INotifiableManager; | import org.xbmc.api.business.*; | [
"org.xbmc.api"
] | org.xbmc.api; | 2,498,406 |
@Override
Endpoint select(ClientRequestContext ctx); | Endpoint select(ClientRequestContext ctx); | /**
* Selects an {@link Endpoint} from this {@link EndpointGroup}.
*
* @return the {@link Endpoint} selected by the {@link EndpointSelectionStrategy},
* which was specified when constructing this {@link EndpointGroup}.
*/ | Selects an <code>Endpoint</code> from this <code>EndpointGroup</code> | select | {
"repo_name": "anuraaga/armeria",
"path": "core/src/main/java/com/linecorp/armeria/client/endpoint/EndpointGroup.java",
"license": "apache-2.0",
"size": 6799
} | [
"com.linecorp.armeria.client.ClientRequestContext",
"com.linecorp.armeria.client.Endpoint"
] | import com.linecorp.armeria.client.ClientRequestContext; import com.linecorp.armeria.client.Endpoint; | import com.linecorp.armeria.client.*; | [
"com.linecorp.armeria"
] | com.linecorp.armeria; | 2,706,635 |
protected static boolean parseAvailableResult(List<String> ret, boolean checkForRoot) {
if (ret == null)
return false;
// this is only one of many ways this can be done
boolean echo_seen = false;
for (String line : ret) {
if (line.contains("uid=")) {
... | static boolean function(List<String> ret, boolean checkForRoot) { if (ret == null) return false; boolean echo_seen = false; for (String line : ret) { if (line.contains("uid=")) { return !checkForRoot line.contains("uid=0"); } else if (line.contains("-BOC-")) { echo_seen = true; } } return echo_seen; } | /**
* See if the shell is alive, and if so, check the UID
*
* @param ret Standard output from running availableTestCommands
* @param checkForRoot true if we are expecting this shell to be running as
* root
* @return true on success, false on error
*/ | See if the shell is alive, and if so, check the UID | parseAvailableResult | {
"repo_name": "ycdev-fork/libsuperuser",
"path": "libsuperuser/src/eu/chainfire/libsuperuser/Shell.java",
"license": "apache-2.0",
"size": 69442
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 311,890 |
@Override void close() throws IOException; | @Override void close() throws IOException; | /**
* Closes this source and releases the resources held by this source. It is an
* error to read a closed source. It is safe to close a source more than once.
*/ | Closes this source and releases the resources held by this source. It is an error to read a closed source. It is safe to close a source more than once | close | {
"repo_name": "nfuller/okio",
"path": "okio/src/main/java/okio/Source.java",
"license": "apache-2.0",
"size": 3235
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 274,973 |
public void addProposalToEnd ( IContentProposal proposal ) {
fEndProposals.add ( proposal );
}
| void function ( IContentProposal proposal ) { fEndProposals.add ( proposal ); } | /**
* Add proposal to end.
*
* @param proposal
*/ | Add proposal to end | addProposalToEnd | {
"repo_name": "Drifftr/devstudio-tooling-bps",
"path": "plugins/org.eclipse.bpel.ui.noEmbeddedEditors/src/org/eclipse/bpel/ui/proposal/providers/ModelContentProposalProvider.java",
"license": "apache-2.0",
"size": 4974
} | [
"org.eclipse.jface.fieldassist.IContentProposal"
] | import org.eclipse.jface.fieldassist.IContentProposal; | import org.eclipse.jface.fieldassist.*; | [
"org.eclipse.jface"
] | org.eclipse.jface; | 2,175,282 |
public void putUsageStats(int intervalType, IntervalStats stats) throws IOException {
synchronized (mLock) {
if (intervalType < 0 || intervalType >= mIntervalDirs.length) {
throw new IllegalArgumentException("Bad interval type " + intervalType);
}
AtomicF... | void function(int intervalType, IntervalStats stats) throws IOException { synchronized (mLock) { if (intervalType < 0 intervalType >= mIntervalDirs.length) { throw new IllegalArgumentException(STR + intervalType); } AtomicFile f = mSortedStatFiles[intervalType].get(stats.beginTime); if (f == null) { f = new AtomicFile(... | /**
* Update the stats in the database. They may not be written to disk immediately.
*/ | Update the stats in the database. They may not be written to disk immediately | putUsageStats | {
"repo_name": "s20121035/rk3288_android5.1_repo",
"path": "frameworks/base/services/usage/java/com/android/server/usage/UsageStatsDatabase.java",
"license": "gpl-3.0",
"size": 19009
} | [
"android.util.AtomicFile",
"java.io.File",
"java.io.IOException"
] | import android.util.AtomicFile; import java.io.File; import java.io.IOException; | import android.util.*; import java.io.*; | [
"android.util",
"java.io"
] | android.util; java.io; | 1,636,018 |
public void extractFromSMILES( String smiles )
throws IncorrectInputException
{ compoundMol.Clear();
if( oechem.OEParseSmiles( compoundMol, smiles ) )
{ extract();
} else
{ String s = "SMILES string was invalid!" ;
Message msg = new Message( s, Message.Level.ERROR, null );
... | void function( String smiles ) throws IncorrectInputException { compoundMol.Clear(); if( oechem.OEParseSmiles( compoundMol, smiles ) ) { extract(); } else { String s = STR ; Message msg = new Message( s, Message.Level.ERROR, null ); throw new IncorrectInputException( msg ); } } | /**
* Extract the largest ring system and the basic ring systems from smiles.
*/ | Extract the largest ring system and the basic ring systems from smiles | extractFromSMILES | {
"repo_name": "chemalot/chemalot",
"path": "src/com/genentech/chemistry/openEye/RingSystemExtractor.java",
"license": "apache-2.0",
"size": 6638
} | [
"com.aestel.utility.Message",
"com.aestel.utility.exception.IncorrectInputException"
] | import com.aestel.utility.Message; import com.aestel.utility.exception.IncorrectInputException; | import com.aestel.utility.*; import com.aestel.utility.exception.*; | [
"com.aestel.utility"
] | com.aestel.utility; | 1,461,072 |
public IDataSet getDataSet() throws DataSetException, IOException {
URL url = LoginDatabaseHandler.class.getClassLoader().getResource("LoginDatabaseHandlerTest.xml");
FlatXmlDataSetBuilder builder = new FlatXmlDataSetBuilder();
builder.setColumnSensing(true);
return builder.build(url);
} | IDataSet function() throws DataSetException, IOException { URL url = LoginDatabaseHandler.class.getClassLoader().getResource(STR); FlatXmlDataSetBuilder builder = new FlatXmlDataSetBuilder(); builder.setColumnSensing(true); return builder.build(url); } | /**
* Load in a set of data from a (fixed for now) XML file
*
* @return data set to be provided to database tester (or used for
* comparison)
*/ | Load in a set of data from a (fixed for now) XML file | getDataSet | {
"repo_name": "UQdeco2800/minesim",
"path": "minesim/src/test/java/minesim/LoginDatabaseHandlerTests.java",
"license": "mit",
"size": 19606
} | [
"java.io.IOException",
"org.dbunit.dataset.DataSetException",
"org.dbunit.dataset.IDataSet",
"org.dbunit.dataset.xml.FlatXmlDataSetBuilder"
] | import java.io.IOException; import org.dbunit.dataset.DataSetException; import org.dbunit.dataset.IDataSet; import org.dbunit.dataset.xml.FlatXmlDataSetBuilder; | import java.io.*; import org.dbunit.dataset.*; import org.dbunit.dataset.xml.*; | [
"java.io",
"org.dbunit.dataset"
] | java.io; org.dbunit.dataset; | 287,906 |
public Identity loadIdentityByKey(Long identityKey); | Identity function(Long identityKey); | /**
* find an identity by the key instead of the username. Prefer this method as findByName will become deprecated soon.
*
* @param identityKey the key of the identity to load; may not be null or zero
* @return the identity or an exception if not found
*/ | find an identity by the key instead of the username. Prefer this method as findByName will become deprecated soon | loadIdentityByKey | {
"repo_name": "RLDevOps/Demo",
"path": "src/main/java/org/olat/basesecurity/BaseSecurity.java",
"license": "apache-2.0",
"size": 15856
} | [
"org.olat.core.id.Identity"
] | import org.olat.core.id.Identity; | import org.olat.core.id.*; | [
"org.olat.core"
] | org.olat.core; | 1,289,610 |
@Test
public void searchExplainWithTemplateGETTest() throws ApiException {
String type = null;
String id = null;
String template = null;
Object response = api.searchExplainWithTemplateGET(type, id, template);
// TODO: test validations
} | void function() throws ApiException { String type = null; String id = null; String template = null; Object response = api.searchExplainWithTemplateGET(type, id, template); } | /**
* Explain matches with a template
*
* This is a 1 to 1 mapping of a ElasticSearch call to _explain. Further information can be found at their <a href='https://www.elastic.co/guide/en/elasticsearch/reference/current/search-count.html'>API guide</a>. <br><br><b&... | Explain matches with a template This is a 1 to 1 mapping of a ElasticSearch call to _explain. Further information can be found at their <a href='HREF guide</a>. <br><br><b>Permissions Needed:</b> SEARCH_ADMIN | searchExplainWithTemplateGETTest | {
"repo_name": "knetikmedia/knetikcloud-java-client",
"path": "src/test/java/com/knetikcloud/api/SearchApiTest.java",
"license": "apache-2.0",
"size": 15531
} | [
"com.knetikcloud.client.ApiException"
] | import com.knetikcloud.client.ApiException; | import com.knetikcloud.client.*; | [
"com.knetikcloud.client"
] | com.knetikcloud.client; | 480,792 |
public Collection<Account> getAllAccounts(); | Collection<Account> function(); | /**
* Gets all the {@link Account}s in this {@code AccountService}. The {@link Account}s <em>MUST</em> have their
* ids and names one-to-one mapped.
* @return A collection of {@link Account}s.
*/ | Gets all the <code>Account</code>s in this AccountService. The <code>Account</code>s MUST have their ids and names one-to-one mapped | getAllAccounts | {
"repo_name": "xiahome/ambry",
"path": "ambry-api/src/main/java/com.github.ambry/account/AccountService.java",
"license": "apache-2.0",
"size": 4917
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 317,928 |
public static String printAst(IPyEdit edit, SimpleNode astToPrint) {
String str = null;
if (astToPrint != null) {
IIndentPrefs indentPrefs;
if (edit != null) {
indentPrefs = edit.getIndentPrefs();
} else {
indentPrefs = DefaultInden... | static String function(IPyEdit edit, SimpleNode astToPrint) { String str = null; if (astToPrint != null) { IIndentPrefs indentPrefs; if (edit != null) { indentPrefs = edit.getIndentPrefs(); } else { indentPrefs = DefaultIndentPrefs.get(null); } Str docStr = getNodeDocStringNode(astToPrint); if (docStr != null) { docStr... | /**
* Copied from {@link PyTextHover} when that class was deprecated.
*/ | Copied from <code>PyTextHover</code> when that class was deprecated | printAst | {
"repo_name": "akurtakov/Pydev",
"path": "plugins/org.python.pydev.parser/src/org/python/pydev/parser/visitors/NodeUtils.java",
"license": "epl-1.0",
"size": 79339
} | [
"java.io.IOException",
"org.python.pydev.core.IIndentPrefs",
"org.python.pydev.core.IPyEdit",
"org.python.pydev.core.autoedit.DefaultIndentPrefs",
"org.python.pydev.core.docutils.PyStringUtils",
"org.python.pydev.core.log.Log",
"org.python.pydev.parser.jython.SimpleNode",
"org.python.pydev.parser.jyth... | import java.io.IOException; import org.python.pydev.core.IIndentPrefs; import org.python.pydev.core.IPyEdit; import org.python.pydev.core.autoedit.DefaultIndentPrefs; import org.python.pydev.core.docutils.PyStringUtils; import org.python.pydev.core.log.Log; import org.python.pydev.parser.jython.SimpleNode; import org.p... | import java.io.*; import org.python.pydev.core.*; import org.python.pydev.core.autoedit.*; import org.python.pydev.core.docutils.*; import org.python.pydev.core.log.*; import org.python.pydev.parser.jython.*; import org.python.pydev.parser.jython.ast.*; import org.python.pydev.parser.prettyprinterv2.*; | [
"java.io",
"org.python.pydev"
] | java.io; org.python.pydev; | 181,138 |
public static byte[] generateSalt(boolean useForMac) {
byte[] saltValue = null;
try {
saltValue = generateNonce(16);
} catch (WSSecurityException ex) {
LOG.debug(ex.getMessage(), ex);
return null;
}
if (useForMac) {
saltValue[0]... | static byte[] function(boolean useForMac) { byte[] saltValue = null; try { saltValue = generateNonce(16); } catch (WSSecurityException ex) { LOG.debug(ex.getMessage(), ex); return null; } if (useForMac) { saltValue[0] = 0x01; } else { saltValue[0] = 0x02; } return saltValue; } | /**
* This static method generates a 128 bit salt value as defined in WSS
* Username Token Profile.
*
* @param useForMac If <code>true</code> define the Salt for use in a MAC
* @return Returns the 128 bit salt value as byte array
*/ | This static method generates a 128 bit salt value as defined in WSS Username Token Profile | generateSalt | {
"repo_name": "asoldano/wss4j",
"path": "ws-security-common/src/main/java/org/apache/wss4j/common/util/UsernameTokenUtil.java",
"license": "apache-2.0",
"size": 5302
} | [
"org.apache.wss4j.common.ext.WSSecurityException"
] | import org.apache.wss4j.common.ext.WSSecurityException; | import org.apache.wss4j.common.ext.*; | [
"org.apache.wss4j"
] | org.apache.wss4j; | 1,539,330 |
List<ColumnStatisticsObj> getPartitionColumnStatistics(String dbName, String tableName,
String partName, List<String> colNames)
throws Exception {
return client.getPartitionColumnStatistics(dbName, tableName,
... | List<ColumnStatisticsObj> getPartitionColumnStatistics(String dbName, String tableName, String partName, List<String> colNames) throws Exception { return client.getPartitionColumnStatistics(dbName, tableName, Collections.singletonList(partName), colNames, Constants.HIVE_ENGINE).get(0); } | /**
* Get statistics for a given partition of the given table in the given database.
* @param dbName - the database where the table resides
* @param tableName - name of the partitioned table in the database
* @param colNames - columns whose statistics is to be retrieved
* @return Map of partition name an... | Get statistics for a given partition of the given table in the given database | getPartitionColumnStatistics | {
"repo_name": "b-slim/hive",
"path": "itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/parse/WarehouseInstance.java",
"license": "apache-2.0",
"size": 26833
} | [
"java.util.Collections",
"java.util.List",
"org.apache.hadoop.hive.conf.Constants",
"org.apache.hadoop.hive.metastore.api.ColumnStatisticsObj"
] | import java.util.Collections; import java.util.List; import org.apache.hadoop.hive.conf.Constants; import org.apache.hadoop.hive.metastore.api.ColumnStatisticsObj; | import java.util.*; import org.apache.hadoop.hive.conf.*; import org.apache.hadoop.hive.metastore.api.*; | [
"java.util",
"org.apache.hadoop"
] | java.util; org.apache.hadoop; | 2,483,337 |
@Nullable
private Artifact getAnyCpuSpecificDsymPlist() {
for (Artifact dsymPlist : attributes.cpuSpecificDsymPlists().values()) {
// The plist files generated by the dsym tool are all equal, and don't really have any
// useful information. For now, just retrieving any one is OK, but ideally all of ... | Artifact function() { for (Artifact dsymPlist : attributes.cpuSpecificDsymPlists().values()) { return dsymPlist; } return null; } | /**
* Returns any available CPU specific dSYM plist file.
*/ | Returns any available CPU specific dSYM plist file | getAnyCpuSpecificDsymPlist | {
"repo_name": "mbrukman/bazel",
"path": "src/main/java/com/google/devtools/build/lib/rules/objc/ReleaseBundlingSupport.java",
"license": "apache-2.0",
"size": 59732
} | [
"com.google.devtools.build.lib.actions.Artifact"
] | import com.google.devtools.build.lib.actions.Artifact; | import com.google.devtools.build.lib.actions.*; | [
"com.google.devtools"
] | com.google.devtools; | 2,859,856 |
public static FluentProducerTemplate on(CamelContext context) {
return new FluentProducerTemplate(context);
} | static FluentProducerTemplate function(CamelContext context) { return new FluentProducerTemplate(context); } | /**
* Create the FluentProducerTemplate by setting the camel context
*
* @param context the camel context
* @return this FluentProducerTemplate instance
*/ | Create the FluentProducerTemplate by setting the camel context | on | {
"repo_name": "edigrid/camel",
"path": "camel-core/src/main/java/org/apache/camel/builder/FluentProducerTemplate.java",
"license": "apache-2.0",
"size": 10508
} | [
"org.apache.camel.CamelContext"
] | import org.apache.camel.CamelContext; | import org.apache.camel.*; | [
"org.apache.camel"
] | org.apache.camel; | 2,180,856 |
private void toggleDetailsArea() {
Point windowSize = getShell().getSize();
Point oldSize = getContents().computeSize(SWT.DEFAULT, SWT.DEFAULT);
if (detailsCreated) {
detailsComposite.dispose();
detailsCreated = false;
detailsButton.setText(IDialogConstants.SHOW_DETAILS_LABEL);
} el... | void function() { Point windowSize = getShell().getSize(); Point oldSize = getContents().computeSize(SWT.DEFAULT, SWT.DEFAULT); if (detailsCreated) { detailsComposite.dispose(); detailsCreated = false; detailsButton.setText(IDialogConstants.SHOW_DETAILS_LABEL); } else { detailsComposite = createDropDownDialogArea((Comp... | /**
* Toggles the unfolding of the details area. This is triggered by the user pressing the details
* button.
*/ | Toggles the unfolding of the details area. This is triggered by the user pressing the details button | toggleDetailsArea | {
"repo_name": "subclipse/subclipse",
"path": "bundles/subclipse.ui/src/org/tigris/subversion/subclipse/ui/util/DetailsDialog.java",
"license": "epl-1.0",
"size": 7962
} | [
"org.eclipse.jface.dialogs.IDialogConstants",
"org.eclipse.swt.graphics.Point",
"org.eclipse.swt.widgets.Composite"
] | import org.eclipse.jface.dialogs.IDialogConstants; import org.eclipse.swt.graphics.Point; import org.eclipse.swt.widgets.Composite; | import org.eclipse.jface.dialogs.*; import org.eclipse.swt.graphics.*; import org.eclipse.swt.widgets.*; | [
"org.eclipse.jface",
"org.eclipse.swt"
] | org.eclipse.jface; org.eclipse.swt; | 2,538,526 |
private void createTestDatabaseHsqlDb() throws Exception {
// create table containing identity
SQLTestUtils.executeUpdate("create table test_table1 (col1 int not null identity, col2 varchar(12) not null)", dataSource);
// create table without identity
SQLTestUtils.executeUpdate("... | void function() throws Exception { SQLTestUtils.executeUpdate(STR, dataSource); SQLTestUtils.executeUpdate(STR, dataSource); SQLTestUtils.executeUpdate(STR, dataSource); } | /**
* Creates all test database structures
*/ | Creates all test database structures | createTestDatabaseHsqlDb | {
"repo_name": "intouchfollowup/dbmaintain",
"path": "dbmaintain/src/test/java/org/dbmaintain/structure/SequenceUpdaterTest.java",
"license": "apache-2.0",
"size": 14056
} | [
"org.dbmaintain.util.SQLTestUtils"
] | import org.dbmaintain.util.SQLTestUtils; | import org.dbmaintain.util.*; | [
"org.dbmaintain.util"
] | org.dbmaintain.util; | 132,130 |
List<RecordElement> getAllElements(); | List<RecordElement> getAllElements(); | /**
* The list of elements configured in this section, whether they are enabled or not.
*
* @return an unmodifiable ordered list of {@link RecordElement elements}, empty if this section doesn't have any
* elements
*/ | The list of elements configured in this section, whether they are enabled or not | getAllElements | {
"repo_name": "phenotips/phenotips",
"path": "components/application-configuration/api/src/main/java/org/phenotips/configuration/RecordSection.java",
"license": "agpl-3.0",
"size": 3604
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,091,373 |
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this, JAXBToStringStyle.DEFAULT_STYLE);
} | String function() { return ToStringBuilder.reflectionToString(this, JAXBToStringStyle.DEFAULT_STYLE); } | /**
* Generates a String representation of the contents of this type.
* This is an extension method, produced by the 'ts' xjc plugin
*
*/ | Generates a String representation of the contents of this type. This is an extension method, produced by the 'ts' xjc plugin | toString | {
"repo_name": "fpompermaier/onvif",
"path": "onvif-ws-client/src/main/java/org/onvif/ver10/accessrules/wsdl/GetAccessProfileInfo.java",
"license": "apache-2.0",
"size": 2341
} | [
"org.apache.commons.lang3.builder.ToStringBuilder",
"org.apache.cxf.xjc.runtime.JAXBToStringStyle"
] | import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.cxf.xjc.runtime.JAXBToStringStyle; | import org.apache.commons.lang3.builder.*; import org.apache.cxf.xjc.runtime.*; | [
"org.apache.commons",
"org.apache.cxf"
] | org.apache.commons; org.apache.cxf; | 1,135,341 |
@RequestMapping(path = GET_DELTA, method = RequestMethod.GET)
@ApiImplicitParams({ @ApiImplicitParam(name = "app-id", required = true, dataType = "string", paramType = "path") })
public ResponseEntity<ApplicationChangeReport> getDeltaSince(@ApiIgnore @PathVariable("app-id") AppId aid, @RequestParam("since") String... | @RequestMapping(path = GET_DELTA, method = RequestMethod.GET) @ApiImplicitParams({ @ApiImplicitParam(name = STR, required = true, dataType = STR, paramType = "path") }) ResponseEntity<ApplicationChangeReport> function(@ApiIgnore @PathVariable(STR) AppId aid, @RequestParam("since") String since) { VersionOrTimestamp vot... | /**
* Gets a report holding the difference between the current application model and a date in the
* past.
*
* @param aid
* The app-id of the application model.
* @param since
* The date to compare against in the format {@link ApiFormats#DATE_FORMAT}.
* @return The delta report.
... | Gets a report holding the difference between the current application model and a date in the past | getDeltaSince | {
"repo_name": "ContinuITy-Project/ContinuITy",
"path": "continuity.service.idpa/src/main/java/org/continuity/idpa/controllers/ApplicationController.java",
"license": "apache-2.0",
"size": 17344
} | [
"io.swagger.annotations.ApiImplicitParam",
"io.swagger.annotations.ApiImplicitParams",
"java.text.ParseException",
"org.continuity.api.entities.report.ApplicationChangeReport",
"org.continuity.idpa.AppId",
"org.continuity.idpa.VersionOrTimestamp",
"org.springframework.http.ResponseEntity",
"org.spring... | import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; import java.text.ParseException; import org.continuity.api.entities.report.ApplicationChangeReport; import org.continuity.idpa.AppId; import org.continuity.idpa.VersionOrTimestamp; import org.springframework.http.ResponseEn... | import io.swagger.annotations.*; import java.text.*; import org.continuity.api.entities.report.*; import org.continuity.idpa.*; import org.springframework.http.*; import org.springframework.web.bind.annotation.*; | [
"io.swagger.annotations",
"java.text",
"org.continuity.api",
"org.continuity.idpa",
"org.springframework.http",
"org.springframework.web"
] | io.swagger.annotations; java.text; org.continuity.api; org.continuity.idpa; org.springframework.http; org.springframework.web; | 2,460,300 |
public Write<K, V> withProducerFactoryFn(
SerializableFunction<Map<String, Object>, Producer<K, V>> producerFactoryFn) {
return withWriteRecordsTransform(
getWriteRecordsTransform().withProducerFactoryFn(producerFactoryFn));
} | Write<K, V> function( SerializableFunction<Map<String, Object>, Producer<K, V>> producerFactoryFn) { return withWriteRecordsTransform( getWriteRecordsTransform().withProducerFactoryFn(producerFactoryFn)); } | /**
* Wrapper method over {@link WriteRecords#withProducerFactoryFn(SerializableFunction)}, used to
* keep the compatibility with old API based on KV type of element.
*/ | Wrapper method over <code>WriteRecords#withProducerFactoryFn(SerializableFunction)</code>, used to keep the compatibility with old API based on KV type of element | withProducerFactoryFn | {
"repo_name": "RyanSkraba/beam",
"path": "sdks/java/io/kafka/src/main/java/org/apache/beam/sdk/io/kafka/KafkaIO.java",
"license": "apache-2.0",
"size": 74037
} | [
"java.util.Map",
"org.apache.beam.sdk.transforms.SerializableFunction",
"org.apache.kafka.clients.producer.Producer"
] | import java.util.Map; import org.apache.beam.sdk.transforms.SerializableFunction; import org.apache.kafka.clients.producer.Producer; | import java.util.*; import org.apache.beam.sdk.transforms.*; import org.apache.kafka.clients.producer.*; | [
"java.util",
"org.apache.beam",
"org.apache.kafka"
] | java.util; org.apache.beam; org.apache.kafka; | 1,769,856 |
public void validateLogin(UserEntity userEntity, String userName) {
if (userEntity == null) {
LOG.info("User not found");
throw new UserNotFoundException(userName);
} else {
if (!userEntity.getActive()) {
LOG.info("User account is disabled: {}", userName);
throw new AccountDi... | void function(UserEntity userEntity, String userName) { if (userEntity == null) { LOG.info(STR); throw new UserNotFoundException(userName); } else { if (!userEntity.getActive()) { LOG.info(STR, userName); throw new AccountDisabledException(userName); } int maxConsecutiveFailures = configuration.getMaxAuthenticationFail... | /**
* Validates the user account such that the user is allowed to log in.
*
* @param userEntity the user entity
* @param userName the Ambari username
*/ | Validates the user account such that the user is allowed to log in | validateLogin | {
"repo_name": "sekikn/ambari",
"path": "ambari-server/src/main/java/org/apache/ambari/server/security/authorization/Users.java",
"license": "apache-2.0",
"size": 69453
} | [
"org.apache.ambari.server.orm.entities.UserEntity",
"org.apache.ambari.server.security.authentication.AccountDisabledException",
"org.apache.ambari.server.security.authentication.TooManyLoginFailuresException",
"org.apache.ambari.server.security.authentication.UserNotFoundException"
] | import org.apache.ambari.server.orm.entities.UserEntity; import org.apache.ambari.server.security.authentication.AccountDisabledException; import org.apache.ambari.server.security.authentication.TooManyLoginFailuresException; import org.apache.ambari.server.security.authentication.UserNotFoundException; | import org.apache.ambari.server.orm.entities.*; import org.apache.ambari.server.security.authentication.*; | [
"org.apache.ambari"
] | org.apache.ambari; | 2,578,211 |
protected void doApplyDatatype(YDatatype yDt) {
if (decimalField == null) {
return;
}
int oldPrecision = decimalField.getPrecision();
if (yDt == null) {
decimalField.setPrecision(2);
decimalField.setUseGrouping(true);
decimalField.setMarkNegative(true);
} else {
YDecimalDatatype yCasted = (... | void function(YDatatype yDt) { if (decimalField == null) { return; } int oldPrecision = decimalField.getPrecision(); if (yDt == null) { decimalField.setPrecision(2); decimalField.setUseGrouping(true); decimalField.setMarkNegative(true); } else { YDecimalDatatype yCasted = (YDecimalDatatype) yDt; decimalField.setPrecisi... | /**
* Applies the datatype options to the field.
*
* @param yDt
*/ | Applies the datatype options to the field | doApplyDatatype | {
"repo_name": "lunifera/lunifera-runtime-web",
"path": "org.lunifera.runtime.web.ecview.presentation.vaadin/src/org/lunifera/runtime/web/ecview/presentation/vaadin/internal/DecimalFieldPresentation.java",
"license": "epl-1.0",
"size": 9665
} | [
"org.lunifera.ecview.core.common.model.datatypes.YDatatype",
"org.lunifera.ecview.core.extension.model.datatypes.YDecimalDatatype"
] | import org.lunifera.ecview.core.common.model.datatypes.YDatatype; import org.lunifera.ecview.core.extension.model.datatypes.YDecimalDatatype; | import org.lunifera.ecview.core.common.model.datatypes.*; import org.lunifera.ecview.core.extension.model.datatypes.*; | [
"org.lunifera.ecview"
] | org.lunifera.ecview; | 750,567 |
private void showSplashScreen() {
mSplashImage = Utils.convertDrawableToBitmap(mActivity, mDrawableId);
if (mSplashImage == null) {
Log.w(TAG, "Failed to retrieve splash image from provided drawable id");
return;
}
ImageView view = new ImageView(mActivity);
... | void function() { mSplashImage = Utils.convertDrawableToBitmap(mActivity, mDrawableId); if (mSplashImage == null) { Log.w(TAG, STR); return; } ImageView view = new ImageView(mActivity); view.setLayoutParams(new ViewGroup.LayoutParams(MATCH_PARENT, MATCH_PARENT)); view.setImageBitmap(mSplashImage); view.setBackgroundCol... | /**
* Splash screen is shown both before the Trusted Web Activity is launched - in this activity,
* and for some time after that - in browser, on top of web page being loaded.
* This method shows the splash screen in the LauncherActivity.
*/ | Splash screen is shown both before the Trusted Web Activity is launched - in this activity, and for some time after that - in browser, on top of web page being loaded. This method shows the splash screen in the LauncherActivity | showSplashScreen | {
"repo_name": "GoogleChrome/android-browser-helper",
"path": "androidbrowserhelper/src/main/java/com/google/androidbrowserhelper/trusted/splashscreens/PwaWrapperSplashScreenStrategy.java",
"license": "apache-2.0",
"size": 9959
} | [
"android.util.Log",
"android.view.ViewGroup",
"android.widget.ImageView",
"com.google.androidbrowserhelper.trusted.Utils"
] | import android.util.Log; import android.view.ViewGroup; import android.widget.ImageView; import com.google.androidbrowserhelper.trusted.Utils; | import android.util.*; import android.view.*; import android.widget.*; import com.google.androidbrowserhelper.trusted.*; | [
"android.util",
"android.view",
"android.widget",
"com.google.androidbrowserhelper"
] | android.util; android.view; android.widget; com.google.androidbrowserhelper; | 1,576,504 |
private QueueTA getSelfData() {
String id = MainActivity.getUser().getId();
for (QueueTA ta : mQueue.getTAs())
if (ta.getId().equals(id))
return ta;
return null;
} | QueueTA function() { String id = MainActivity.getUser().getId(); for (QueueTA ta : mQueue.getTAs()) if (ta.getId().equals(id)) return ta; return null; } | /**
* Returns the QueueTA object of the user.
*/ | Returns the QueueTA object of the user | getSelfData | {
"repo_name": "greganderson/TAQueue",
"path": "app/src/main/java/com/familybiz/greg/taqueue/view/queue/TAQueueFragment.java",
"license": "mit",
"size": 6103
} | [
"com.familybiz.greg.taqueue.MainActivity",
"com.familybiz.greg.taqueue.model.queue.QueueTA"
] | import com.familybiz.greg.taqueue.MainActivity; import com.familybiz.greg.taqueue.model.queue.QueueTA; | import com.familybiz.greg.taqueue.*; import com.familybiz.greg.taqueue.model.queue.*; | [
"com.familybiz.greg"
] | com.familybiz.greg; | 2,351,170 |
return (Astivlet) factory.create(jcl, clazz);
} | return (Astivlet) factory.create(jcl, clazz); } | /**
* Get an instance of the class in the class loader.
*
* @param clazz class to return
* @return an instance of requested class.
*/ | Get an instance of the class in the class loader | getAstivletByClass | {
"repo_name": "ecabrerar/astivetoolkit",
"path": "server/atk-server-core/src/main/java/org/astivetoolkit/server/AstObj.java",
"license": "apache-2.0",
"size": 6458
} | [
"org.astivetoolkit.astivlet.Astivlet"
] | import org.astivetoolkit.astivlet.Astivlet; | import org.astivetoolkit.astivlet.*; | [
"org.astivetoolkit.astivlet"
] | org.astivetoolkit.astivlet; | 1,141,448 |
public void setArea(Shape area) {
if (area == null) {
throw new IllegalArgumentException("Null 'area' argument.");
}
this.area = area;
} | void function(Shape area) { if (area == null) { throw new IllegalArgumentException(STR); } this.area = area; } | /**
* Sets the area for the entity.
* <P>
* This class conveys information about chart entities back to a client.
* Setting this area doesn't change the entity (which has already been
* drawn).
*
* @param area the area (<code>null</code> not permitted).
*/ | Sets the area for the entity. This class conveys information about chart entities back to a client. Setting this area doesn't change the entity (which has already been drawn) | setArea | {
"repo_name": "JSansalone/JFreeChart",
"path": "source/org/jfree/chart/entity/ChartEntity.java",
"license": "lgpl-2.1",
"size": 14830
} | [
"java.awt.Shape"
] | import java.awt.Shape; | import java.awt.*; | [
"java.awt"
] | java.awt; | 2,272,127 |
@Deprecated
public static boolean postProtoBuf(String url, Message pb) throws ApiException {
return putOrPostProtoBuf("POST", url, pb);
} | static boolean function(String url, Message pb) throws ApiException { return putOrPostProtoBuf("POST", url, pb); } | /**
* Uses the "POST" HTTP method to post a protocol buffer at the given URL. This is useful when
* you don't expect a response (other than "200", success)
*/ | Uses the "POST" HTTP method to post a protocol buffer at the given URL. This is useful when you don't expect a response (other than "200", success) | postProtoBuf | {
"repo_name": "jife94/wwmmo",
"path": "client/src/main/java/au/com/codeka/warworlds/api/ApiClient.java",
"license": "mit",
"size": 5000
} | [
"com.google.protobuf.Message"
] | import com.google.protobuf.Message; | import com.google.protobuf.*; | [
"com.google.protobuf"
] | com.google.protobuf; | 1,114,199 |
public void testParseTemplateFailsToParseCompleteQueryAsSingleString() throws IOException {
String templateString = "{" + " \"inline\" : \"{ \\\"size\\\": \\\"{{size}}\\\", \\\"query\\\":{\\\"match_all\\\":{}}}\","
+ " \"params\":{" + " \"size\":2" + " }\n" + "}";
XContentPars... | void function() throws IOException { String templateString = "{" + STRinline\STR{ \\\STR: \\\STR, \\\STR:{\\\STR:{}}}\"," + STRparams\":{" + STRsize\":2" + STR + "}"; XContentParser templateSourceParser = XContentFactory.xContent(templateString).createParser(templateString); context.reset(templateSourceParser); Templat... | /**
* Test that the template query parser can parse and evaluate template
* expressed as a single string but still it expects only the query
* specification (thus this test should fail with specific exception).
*/ | Test that the template query parser can parse and evaluate template expressed as a single string but still it expects only the query specification (thus this test should fail with specific exception) | testParseTemplateFailsToParseCompleteQueryAsSingleString | {
"repo_name": "socialrank/elasticsearch",
"path": "core/src/test/java/org/elasticsearch/index/query/TemplateQueryParserTests.java",
"license": "apache-2.0",
"size": 10373
} | [
"java.io.IOException",
"org.elasticsearch.common.ParsingException",
"org.elasticsearch.common.xcontent.XContentFactory",
"org.elasticsearch.common.xcontent.XContentParser",
"org.hamcrest.Matchers"
] | import java.io.IOException; import org.elasticsearch.common.ParsingException; import org.elasticsearch.common.xcontent.XContentFactory; import org.elasticsearch.common.xcontent.XContentParser; import org.hamcrest.Matchers; | import java.io.*; import org.elasticsearch.common.*; import org.elasticsearch.common.xcontent.*; import org.hamcrest.*; | [
"java.io",
"org.elasticsearch.common",
"org.hamcrest"
] | java.io; org.elasticsearch.common; org.hamcrest; | 1,637,348 |
private static void addAttribute(final AttributesImpl attributes,
final String attrName,
final String attrValue) {
if (attrName == null) {
throw new IllegalArgumentException("attrName");
}
if (attrValue != ... | static void function(final AttributesImpl attributes, final String attrName, final String attrValue) { if (attrName == null) { throw new IllegalArgumentException(STR); } if (attrValue != null) { attributes.addAttribute(null, attrName, attrName, STR, attrValue); } } | /**
* Adds an non-namespace-qualified attribute to attribute list.
*
* @param attributes list of attributes.
* @param attrName attribute name, may not be null.
* @param attrValue attribute value, if null attribute is not added.
*/ | Adds an non-namespace-qualified attribute to attribute list | addAttribute | {
"repo_name": "dougm/ant-contrib-cpptasks",
"path": "src/main/java/net/sf/antcontrib/cpptasks/devstudio/VisualStudioNETProjectWriter.java",
"license": "apache-2.0",
"size": 32716
} | [
"org.xml.sax.helpers.AttributesImpl"
] | import org.xml.sax.helpers.AttributesImpl; | import org.xml.sax.helpers.*; | [
"org.xml.sax"
] | org.xml.sax; | 954,188 |
public AWSRequestMetrics getAWSRequestMetrics(); | AWSRequestMetrics function(); | /**
* Returns the request metrics.
*/ | Returns the request metrics | getAWSRequestMetrics | {
"repo_name": "trasa/aws-sdk-java",
"path": "aws-java-sdk-core/src/main/java/com/amazonaws/Request.java",
"license": "apache-2.0",
"size": 5414
} | [
"com.amazonaws.util.AWSRequestMetrics"
] | import com.amazonaws.util.AWSRequestMetrics; | import com.amazonaws.util.*; | [
"com.amazonaws.util"
] | com.amazonaws.util; | 631,331 |
public List<ProfileDto> getProfiles() {
if (!isCobblerOnly()) {
List<ProfileDto> profiles = ProfileManager.compatibleWithChannel(
this.ksdata.getKickstartDefaults().getKstree().getChannel(),
user.getOrg(), null);
return profiles;
}
... | List<ProfileDto> function() { if (!isCobblerOnly()) { List<ProfileDto> profiles = ProfileManager.compatibleWithChannel( this.ksdata.getKickstartDefaults().getKstree().getChannel(), user.getOrg(), null); return profiles; } return Collections.EMPTY_LIST; } | /**
* Get the DataResult list of com.redhat.rhn.frontend.dto.ProfileDto that are
* compatible with the BaseChannel for the selected KickstartData object.
*
* @return DataResult list
*/ | Get the DataResult list of com.redhat.rhn.frontend.dto.ProfileDto that are compatible with the BaseChannel for the selected KickstartData object | getProfiles | {
"repo_name": "davidhrbac/spacewalk",
"path": "java/code/src/com/redhat/rhn/manager/kickstart/KickstartScheduleCommand.java",
"license": "gpl-2.0",
"size": 56926
} | [
"com.redhat.rhn.frontend.dto.ProfileDto",
"com.redhat.rhn.manager.profile.ProfileManager",
"java.util.Collections",
"java.util.List"
] | import com.redhat.rhn.frontend.dto.ProfileDto; import com.redhat.rhn.manager.profile.ProfileManager; import java.util.Collections; import java.util.List; | import com.redhat.rhn.frontend.dto.*; import com.redhat.rhn.manager.profile.*; import java.util.*; | [
"com.redhat.rhn",
"java.util"
] | com.redhat.rhn; java.util; | 9,601 |
setupOnce(Permissions.PRIVATE);
ExperimenterGroup otherGroup = fixture.new_group();
Pixels pix = makePixels();
pix = iQuery.findByQuery("select p from Pixels p join fetch p.image " +
"where p.id = " + pix.getId(), null);
Image img = pix.getImage();
iAdm... | setupOnce(Permissions.PRIVATE); ExperimenterGroup otherGroup = fixture.new_group(); Pixels pix = makePixels(); pix = iQuery.findByQuery(STR + STR + pix.getId(), null); Image img = pix.getImage(); iAdmin.changeGroup(img, otherGroup.getName()); List<Object[]> rv = iQuery.projection(STR + STR + img.getId(), null); Object[... | /**
* Tests that the change group functionality works similar to the
* IDelete.deleteImage() functionality, i.e. that all attached
* objects are similarly moved.
*/ | Tests that the change group functionality works similar to the IDelete.deleteImage() functionality, i.e. that all attached objects are similarly moved | testChgrpImageMovesAllDeletedObjects | {
"repo_name": "simleo/openmicroscopy",
"path": "components/server/test/ome/server/itests/perms42/ChangeGroupTest.java",
"license": "gpl-2.0",
"size": 2919
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,700,664 |
public IMouseState createBackgroundPressedRightState(final MouseEvent event) {
final CBackgroundPressedRightState state = new CBackgroundPressedRightState(this, m_graph);
m_factory.createBackgroundPressedRightAction().execute(state, event);
return state;
} | IMouseState function(final MouseEvent event) { final CBackgroundPressedRightState state = new CBackgroundPressedRightState(this, m_graph); m_factory.createBackgroundPressedRightAction().execute(state, event); return state; } | /**
* Creates a new state object when the background is pressed with the left mouse button.
*
* @param event The mouse event that caused the state change.
*
* @return The state object that describes the mouse state.
*/ | Creates a new state object when the background is pressed with the left mouse button | createBackgroundPressedRightState | {
"repo_name": "guiquanz/binnavi",
"path": "src/main/java/com/google/security/zynamics/zylib/yfileswrap/gui/zygraph/editmode/CStateFactory.java",
"license": "apache-2.0",
"size": 24492
} | [
"com.google.security.zynamics.zylib.gui.zygraph.editmode.IMouseState",
"com.google.security.zynamics.zylib.gui.zygraph.editmode.states.CBackgroundPressedRightState",
"java.awt.event.MouseEvent"
] | import com.google.security.zynamics.zylib.gui.zygraph.editmode.IMouseState; import com.google.security.zynamics.zylib.gui.zygraph.editmode.states.CBackgroundPressedRightState; import java.awt.event.MouseEvent; | import com.google.security.zynamics.zylib.gui.zygraph.editmode.*; import com.google.security.zynamics.zylib.gui.zygraph.editmode.states.*; import java.awt.event.*; | [
"com.google.security",
"java.awt"
] | com.google.security; java.awt; | 1,889,447 |
void destroy(XQueryContext context, Sequence contextSequence); | void destroy(XQueryContext context, Sequence contextSequence); | /**
* Clean up any resources used by the items in this sequence.
*/ | Clean up any resources used by the items in this sequence | destroy | {
"repo_name": "kohsah/exist",
"path": "src/org/exist/xquery/value/Sequence.java",
"license": "lgpl-2.1",
"size": 8775
} | [
"org.exist.xquery.XQueryContext"
] | import org.exist.xquery.XQueryContext; | import org.exist.xquery.*; | [
"org.exist.xquery"
] | org.exist.xquery; | 1,123,168 |
public static boolean isFilenameValid(String filename) {
filename = filename.replaceFirst("/+", "/"); // normalize leading
// slashes
return filename.startsWith(Environment.getDownloadCacheDirectory().toString())
|| filename.startsWith(Environment.getExternalStorageDirectory(... | static boolean function(String filename) { filename = filename.replaceFirst("/+", "/"); return filename.startsWith(Environment.getDownloadCacheDirectory().toString()) filename.startsWith(Environment.getExternalStorageDirectory().toString()); } | /**
* Checks whether the filename looks legitimate
*/ | Checks whether the filename looks legitimate | isFilenameValid | {
"repo_name": "islamsamak/janadroid",
"path": "apk-expansion/src/main/java/com/jana/android/expansion/downloader/Helpers.java",
"license": "gpl-2.0",
"size": 11915
} | [
"android.os.Environment"
] | import android.os.Environment; | import android.os.*; | [
"android.os"
] | android.os; | 2,240,318 |
public void storeSubResult(SampleResult subResult, boolean renameSubResults) {
if (subResults == null) {
subResults = new ArrayList<>();
}
if (renameSubResults) {
subResult.setSampleLabel(getSampleLabel()+"-"+subResultIndex++);
}
subResults.add(subResu... | void function(SampleResult subResult, boolean renameSubResults) { if (subResults == null) { subResults = new ArrayList<>(); } if (renameSubResults) { subResult.setSampleLabel(getSampleLabel()+"-"+subResultIndex++); } subResults.add(subResult); subResult.setParent(this); } | /**
* Add a subresult read from a results file.
* <p>
* As for {@link SampleResult#addSubResult(SampleResult)
* addSubResult(SampleResult)}, except that the fields don't need to be
* accumulated
*
* @param subResult
* the {@link SampleResult} to be added
* @param ... | Add a subresult read from a results file. As for <code>SampleResult#addSubResult(SampleResult) addSubResult(SampleResult)</code>, except that the fields don't need to be accumulated | storeSubResult | {
"repo_name": "etnetera/jmeter",
"path": "src/core/src/main/java/org/apache/jmeter/samplers/SampleResult.java",
"license": "apache-2.0",
"size": 47643
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 435,291 |
@Override
public String getText(Object object) {
String label = ((DbmsType)object).getType();
return label == null || label.length() == 0 ?
getString("_UI_DbmsType_type") :
getString("_UI_DbmsType_type") + " " + label;
} | String function(Object object) { String label = ((DbmsType)object).getType(); return label == null label.length() == 0 ? getString(STR) : getString(STR) + " " + label; } | /**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This returns the label text for the adapted class. | getText | {
"repo_name": "dzonekl/LiquibaseEditor",
"path": "plugins/org.liquidbase.model.edit/src/org/liquibase/xml/ns/dbchangelog/provider/DbmsTypeItemProvider.java",
"license": "mit",
"size": 4586
} | [
"org.liquibase.xml.ns.dbchangelog.DbmsType"
] | import org.liquibase.xml.ns.dbchangelog.DbmsType; | import org.liquibase.xml.ns.dbchangelog.*; | [
"org.liquibase.xml"
] | org.liquibase.xml; | 2,749,993 |
private void printMoves(Iterator<Grain> it1, Iterator<Grain> it2, JTable tableDetails, int perpective) {
while (it1.hasNext() || it2.hasNext()) {
Grain grain1 = it1.next();
Grain grain2 = it2.next();
if (ComponentsFactory.verifyConditions(grain1, grain2, perpective)) {
... | void function(Iterator<Grain> it1, Iterator<Grain> it2, JTable tableDetails, int perpective) { while (it1.hasNext() it2.hasNext()) { Grain grain1 = it1.next(); Grain grain2 = it2.next(); if (ComponentsFactory.verifyConditions(grain1, grain2, perpective)) { ((DefaultTableModel) tableDetails.getModel()).addRow(new String... | /**
* Print Moves
* @param it1
* @param it2
* @param tableDetails
*/ | Print Moves | printMoves | {
"repo_name": "gems-uff/idiff",
"path": "src/main/java/gui/components/TableComponent.java",
"license": "mit",
"size": 5520
} | [
"java.awt.Color",
"java.util.Iterator",
"javax.swing.JTable",
"javax.swing.table.DefaultTableModel"
] | import java.awt.Color; import java.util.Iterator; import javax.swing.JTable; import javax.swing.table.DefaultTableModel; | import java.awt.*; import java.util.*; import javax.swing.*; import javax.swing.table.*; | [
"java.awt",
"java.util",
"javax.swing"
] | java.awt; java.util; javax.swing; | 2,027,965 |
public final native void startup() ;
public static class Parameters extends JavaScriptObject {
protected Parameters() {}
| final native void function() ; public static class Parameters extends JavaScriptObject { protected Parameters() {} | /**
* Finalizes the creation of the legend . Call startup() after creating the widget when you are
* ready for user interaction.
*/ | Finalizes the creation of the legend . Call startup() after creating the widget when you are ready for user interaction | startup | {
"repo_name": "CSTARS/gwt-esri",
"path": "src/main/java/edu/ucdavis/cstars/client/dijits/Legend.java",
"license": "lgpl-3.0",
"size": 6886
} | [
"com.google.gwt.core.client.JavaScriptObject"
] | import com.google.gwt.core.client.JavaScriptObject; | import com.google.gwt.core.client.*; | [
"com.google.gwt"
] | com.google.gwt; | 1,785,396 |
public List<ParameterType> getParameterTypes(ParameterHandler operator, InputPort inPort, int... valueTypes);
| List<ParameterType> function(ParameterHandler operator, InputPort inPort, int... valueTypes); | /**
* This method is used to get parameters needed by this AttributeFilter
*
* @param handler
* the parameter handler for defining dependencies
*/ | This method is used to get parameters needed by this AttributeFilter | getParameterTypes | {
"repo_name": "boob-sbcm/3838438",
"path": "src/main/java/com/rapidminer/operator/preprocessing/filter/attributes/AttributeFilterCondition.java",
"license": "agpl-3.0",
"size": 4838
} | [
"com.rapidminer.operator.ports.InputPort",
"com.rapidminer.parameter.ParameterHandler",
"com.rapidminer.parameter.ParameterType",
"java.util.List"
] | import com.rapidminer.operator.ports.InputPort; import com.rapidminer.parameter.ParameterHandler; import com.rapidminer.parameter.ParameterType; import java.util.List; | import com.rapidminer.operator.ports.*; import com.rapidminer.parameter.*; import java.util.*; | [
"com.rapidminer.operator",
"com.rapidminer.parameter",
"java.util"
] | com.rapidminer.operator; com.rapidminer.parameter; java.util; | 1,971,016 |
@ReportableProperty(order = 4, value = "Shapefile Record Count")
public long getShapefileRecordCount() {
return new Long(shapefileRecords.size());
}
| @ReportableProperty(order = 4, value = STR) long function() { return new Long(shapefileRecords.size()); } | /**
* Gets the shapefile record count.
*
* @return the shapefile record count
*/ | Gets the shapefile record count | getShapefileRecordCount | {
"repo_name": "opf-labs/jhove2",
"path": "src/main/java/org/jhove2/module/format/shapefile/ShapefileFeatures.java",
"license": "bsd-2-clause",
"size": 5664
} | [
"org.jhove2.annotation.ReportableProperty"
] | import org.jhove2.annotation.ReportableProperty; | import org.jhove2.annotation.*; | [
"org.jhove2.annotation"
] | org.jhove2.annotation; | 572,160 |
PagedIterable<IscsiTarget> listByDiskPool(String resourceGroupName, String diskPoolName, Context context); | PagedIterable<IscsiTarget> listByDiskPool(String resourceGroupName, String diskPoolName, Context context); | /**
* Get iSCSI Targets in a Disk pool.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param diskPoolName The name of the Disk Pool.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if pa... | Get iSCSI Targets in a Disk pool | listByDiskPool | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/IscsiTargets.java",
"license": "mit",
"size": 6874
} | [
"com.azure.core.http.rest.PagedIterable",
"com.azure.core.util.Context"
] | import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; | import com.azure.core.http.rest.*; import com.azure.core.util.*; | [
"com.azure.core"
] | com.azure.core; | 2,284,464 |
public static WorkerToken readWorkerToken(Map<String, String> credentials, WorkerTokenServiceType type) {
WorkerToken ret = null;
String key = workerTokenCredentialsKey(type);
String tokenStr = credentials.get(key);
if (tokenStr != null) {
ret = Utils.deserializeFromStrin... | static WorkerToken function(Map<String, String> credentials, WorkerTokenServiceType type) { WorkerToken ret = null; String key = workerTokenCredentialsKey(type); String tokenStr = credentials.get(key); if (tokenStr != null) { ret = Utils.deserializeFromString(tokenStr, WorkerToken.class); } return ret; } | /**
* Read a WorkerToken out of credentials for the given type.
*
* @param credentials the credentials map.
* @param type the type of service we are looking for.
* @return the deserialized WorkerToken or null if none could be found.
*/ | Read a WorkerToken out of credentials for the given type | readWorkerToken | {
"repo_name": "srdo/storm",
"path": "storm-client/src/jvm/org/apache/storm/security/auth/AuthUtils.java",
"license": "apache-2.0",
"size": 22188
} | [
"java.util.Map",
"org.apache.storm.generated.WorkerToken",
"org.apache.storm.generated.WorkerTokenServiceType",
"org.apache.storm.utils.Utils"
] | import java.util.Map; import org.apache.storm.generated.WorkerToken; import org.apache.storm.generated.WorkerTokenServiceType; import org.apache.storm.utils.Utils; | import java.util.*; import org.apache.storm.generated.*; import org.apache.storm.utils.*; | [
"java.util",
"org.apache.storm"
] | java.util; org.apache.storm; | 1,880,950 |
private void setActiveContext(final UIContext uic) {
resetContext();
UIContextHolder.pushContext(uic);
}
| void function(final UIContext uic) { resetContext(); UIContextHolder.pushContext(uic); } | /**
* Sets the given context to be the active one.
*
* @param uic the context to set as active.
*/ | Sets the given context to be the active one | setActiveContext | {
"repo_name": "Joshua-Barclay/wcomponents",
"path": "wcomponents-core/src/test/java/com/github/bordertech/wcomponents/util/TreeUtil_Test.java",
"license": "gpl-3.0",
"size": 15199
} | [
"com.github.bordertech.wcomponents.UIContext",
"com.github.bordertech.wcomponents.UIContextHolder"
] | import com.github.bordertech.wcomponents.UIContext; import com.github.bordertech.wcomponents.UIContextHolder; | import com.github.bordertech.wcomponents.*; | [
"com.github.bordertech"
] | com.github.bordertech; | 1,360,846 |
public Alias isHidden(@Nullable Boolean isHidden) {
this.isHidden = isHidden;
return this;
} | Alias function(@Nullable Boolean isHidden) { this.isHidden = isHidden; return this; } | /**
* Sets whether this alias is hidden
*/ | Sets whether this alias is hidden | isHidden | {
"repo_name": "gingerwizard/elasticsearch",
"path": "server/src/main/java/org/elasticsearch/action/admin/indices/alias/Alias.java",
"license": "apache-2.0",
"size": 10151
} | [
"org.elasticsearch.common.Nullable"
] | import org.elasticsearch.common.Nullable; | import org.elasticsearch.common.*; | [
"org.elasticsearch.common"
] | org.elasticsearch.common; | 2,873,571 |
CmsUUID getId(); | CmsUUID getId(); | /**
* Returns the unique id of this principal.<p>
*
* @return the unique id of this principal
*/ | Returns the unique id of this principal | getId | {
"repo_name": "ggiudetti/opencms-core",
"path": "src/org/opencms/security/I_CmsPrincipal.java",
"license": "lgpl-2.1",
"size": 6752
} | [
"org.opencms.util.CmsUUID"
] | import org.opencms.util.CmsUUID; | import org.opencms.util.*; | [
"org.opencms.util"
] | org.opencms.util; | 1,302,743 |
public List<PartitionInfo> partitionsForNode(int nodeId) {
return this.partitionsByNode.get(nodeId);
} | List<PartitionInfo> function(int nodeId) { return this.partitionsByNode.get(nodeId); } | /**
* Get the list of partitions whose leader is this node
* @param nodeId The node id
* @return A list of partitions
*/ | Get the list of partitions whose leader is this node | partitionsForNode | {
"repo_name": "lemonJun/TakinMQ",
"path": "takinmq-kclient/src/main/java/org/apache/kafka/common/Cluster.java",
"license": "apache-2.0",
"size": 10506
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 784,260 |
URL getUrl() throws MalformedURLException; | URL getUrl() throws MalformedURLException; | /**
* Returns a URL that can be used to load the archive.
* @return the archive URL
* @throws MalformedURLException if the URL is malformed
*/ | Returns a URL that can be used to load the archive | getUrl | {
"repo_name": "mdeinum/spring-boot",
"path": "spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/archive/Archive.java",
"license": "apache-2.0",
"size": 5466
} | [
"java.net.MalformedURLException"
] | import java.net.MalformedURLException; | import java.net.*; | [
"java.net"
] | java.net; | 1,289,633 |
public void setDataSource(DataSource dataSource) {
this.dataSource = dataSource;
} | void function(DataSource dataSource) { this.dataSource = dataSource; } | /**
* Sets the DataSource to use to communicate with the database.
*/ | Sets the DataSource to use to communicate with the database | setDataSource | {
"repo_name": "nikhilvibhav/camel",
"path": "components/camel-sql/src/main/java/org/apache/camel/component/sql/DefaultSqlEndpoint.java",
"license": "apache-2.0",
"size": 23190
} | [
"javax.sql.DataSource"
] | import javax.sql.DataSource; | import javax.sql.*; | [
"javax.sql"
] | javax.sql; | 1,389,307 |
public void init(IBasicQuery query, PropertyProvider propertyProvider)
throws BadQueryException
{
this.query = (IBasicQuery) query;
this.propertyProvider = propertyProvider;
} | void function(IBasicQuery query, PropertyProvider propertyProvider) throws BadQueryException { this.query = (IBasicQuery) query; this.propertyProvider = propertyProvider; } | /**
* called by BasicExpressionCompiler after construction.
*
* @param query the associated BasicQuery
* @param propertyProvider the PropertyProvider for this expression.
*
* @throws BadQueryException
*
*/ | called by BasicExpressionCompiler after construction | init | {
"repo_name": "integrated/jakarta-slide-server",
"path": "src/stores/org/apache/slide/search/basic/sample/BasicExpressionFactorySample.java",
"license": "apache-2.0",
"size": 5766
} | [
"org.apache.slide.search.BadQueryException",
"org.apache.slide.search.PropertyProvider",
"org.apache.slide.search.basic.IBasicQuery"
] | import org.apache.slide.search.BadQueryException; import org.apache.slide.search.PropertyProvider; import org.apache.slide.search.basic.IBasicQuery; | import org.apache.slide.search.*; import org.apache.slide.search.basic.*; | [
"org.apache.slide"
] | org.apache.slide; | 466,215 |
public InputStream openResource() throws IOException; | InputStream function() throws IOException; | /**
* Open an input stream reading from the resource.
*
* @return InputStream reading from the resource.
* @throws IOException if an error occurs reading from the resource
*/ | Open an input stream reading from the resource | openResource | {
"repo_name": "optivo-org/fingbugs-1.3.9-optivo",
"path": "src/java/edu/umd/cs/findbugs/classfile/ICodeBaseEntry.java",
"license": "lgpl-2.1",
"size": 2598
} | [
"java.io.IOException",
"java.io.InputStream"
] | import java.io.IOException; import java.io.InputStream; | import java.io.*; | [
"java.io"
] | java.io; | 1,529,463 |
@Test public void testLoadValidTemplateWithOverwrite() throws Exception {
testTemplate(TemplateParserGeneralFixture.VALID_TEMPLATE_MIN_XML.fileNameParameter, null);
testTemplate(TemplateParserGeneralFixture.VALID_TEMPLATE_OVERWRITE.fileNameParameter, null); // allowOverwrite=true
Ru... | @Test void function() throws Exception { testTemplate(TemplateParserGeneralFixture.VALID_TEMPLATE_MIN_XML.fileNameParameter, null); testTemplate(TemplateParserGeneralFixture.VALID_TEMPLATE_OVERWRITE.fileNameParameter, null); RuleTemplateBo template = KEWServiceLocator.getRuleTemplateService().findByRuleTemplateName(Tem... | /**
* Loads a "minimal" template definition and then updates/overwrites it
*/ | Loads a "minimal" template definition and then updates/overwrites it | testLoadValidTemplateWithOverwrite | {
"repo_name": "ua-eas/ksd-kc5.2.1-rice2.3.6-ua",
"path": "rice-middleware/it/kew/src/test/java/org/kuali/rice/kew/xml/RuleTemplateXmlParserTest.java",
"license": "apache-2.0",
"size": 30337
} | [
"org.junit.Test",
"org.kuali.rice.kew.rule.bo.RuleTemplateBo",
"org.kuali.rice.kew.service.KEWServiceLocator"
] | import org.junit.Test; import org.kuali.rice.kew.rule.bo.RuleTemplateBo; import org.kuali.rice.kew.service.KEWServiceLocator; | import org.junit.*; import org.kuali.rice.kew.rule.bo.*; import org.kuali.rice.kew.service.*; | [
"org.junit",
"org.kuali.rice"
] | org.junit; org.kuali.rice; | 742,764 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.