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
protected void doPut(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { if (readOnly) { resp.sendError(HttpServletResponse.SC_FORBIDDEN); return; } String path = getRelativePath(req); // Retrieve the r...
void function(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { if (readOnly) { resp.sendError(HttpServletResponse.SC_FORBIDDEN); return; } String path = getRelativePath(req); DirContext resources = getResources(); if (resources == null) { resp.sendError(HttpServletResponse.SC_INT...
/** * Process a POST request for the specified resource. * // * @param request The servlet request we are processing // * @param response The servlet response we are creating * * @exception IOException if an input/output error occurs * @exception ServletException if a servlet-spe...
Process a POST request for the specified resource
doPut
{ "repo_name": "c-rainstorm/jerrydog", "path": "src/main/java/org/apache/catalina/servlets/DefaultServlet.java", "license": "gpl-3.0", "size": 79068 }
[ "java.io.File", "java.io.FileInputStream", "java.io.IOException", "java.io.InputStream", "javax.naming.NamingException", "javax.naming.directory.DirContext", "javax.servlet.ServletException", "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse", "org.apache.naming.reso...
import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import javax.naming.NamingException; import javax.naming.directory.DirContext; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; ...
import java.io.*; import javax.naming.*; import javax.naming.directory.*; import javax.servlet.*; import javax.servlet.http.*; import org.apache.naming.resources.*;
[ "java.io", "javax.naming", "javax.servlet", "org.apache.naming" ]
java.io; javax.naming; javax.servlet; org.apache.naming;
62,108
protected native long av_probe_input_format(@Ptr long pd, int is_opened); public Pointer<AVInputFormat > av_probe_input_format2(Pointer<AVProbeData > pd, int is_opened, Pointer<Integer > score_max) { return (Pointer)Pointer.pointerToAddress(av_probe_input_format2(Pointer.getPeer(pd), is_opened, Pointer...
native long av_probe_input_format(@Ptr long pd, int is_opened); public Pointer<AVInputFormat > function(Pointer<AVProbeData > pd, int is_opened, Pointer<Integer > score_max) { return (Pointer)Pointer.pointerToAddress(av_probe_input_format2(Pointer.getPeer(pd), is_opened, Pointer.getPeer(score_max)), AVInputFormat.class...
/** * Guess the file format.<br> * @param pd data to be probed<br> * @param is_opened Whether the file is already opened; determines whether<br> * demuxers with or without AVFMT_NOFILE are probed.<br> * @param score_max A probe score larger that this is required to accep...
Guess the file format
av_probe_input_format2
{ "repo_name": "mutars/java_libav", "path": "wrapper/src/main/java/com/mutar/libav/bridge/avformat/AvformatLibrary.java", "license": "gpl-2.0", "size": 136321 }
[ "org.bridj.Pointer", "org.bridj.ann.Ptr" ]
import org.bridj.Pointer; import org.bridj.ann.Ptr;
import org.bridj.*; import org.bridj.ann.*;
[ "org.bridj", "org.bridj.ann" ]
org.bridj; org.bridj.ann;
1,917,319
@SuppressWarnings("unchecked") public Type log(LoggingLevel loggingLevel, String logName, String message) { LogDefinition answer = new LogDefinition(message); answer.setLoggingLevel(loggingLevel); answer.setLogName(logName); addOutput(answer); return (Type) this; ...
@SuppressWarnings(STR) Type function(LoggingLevel loggingLevel, String logName, String message) { LogDefinition answer = new LogDefinition(message); answer.setLoggingLevel(loggingLevel); answer.setLogName(logName); addOutput(answer); return (Type) this; }
/** * Creates a log message to be logged at the given level and name. * * @param loggingLevel the logging level to use * @param logName the log name to use * @param message the log message, (you can use {@link org.apache.camel.language.simple.SimpleLanguage} syntax) * @return the bui...
Creates a log message to be logged at the given level and name
log
{ "repo_name": "everttigchelaar/camel-svn", "path": "camel-core/src/main/java/org/apache/camel/model/ProcessorDefinition.java", "license": "apache-2.0", "size": 120346 }
[ "org.apache.camel.LoggingLevel" ]
import org.apache.camel.LoggingLevel;
import org.apache.camel.*;
[ "org.apache.camel" ]
org.apache.camel;
711,516
public void setAllowContentAccess(boolean allow) { if (TRACE) Log.i(LOGTAG, "setAllowContentAccess=" + allow); synchronized (mAwSettingsLock) { mAllowContentUrlAccess = allow; } }
void function(boolean allow) { if (TRACE) Log.i(LOGTAG, STR + allow); synchronized (mAwSettingsLock) { mAllowContentUrlAccess = allow; } }
/** * See {@link android.webkit.WebSettings#setAllowContentAccess}. */
See <code>android.webkit.WebSettings#setAllowContentAccess</code>
setAllowContentAccess
{ "repo_name": "ric2b/Vivaldi-browser", "path": "chromium/android_webview/java/src/org/chromium/android_webview/AwSettings.java", "license": "bsd-3-clause", "size": 65230 }
[ "android.util.Log" ]
import android.util.Log;
import android.util.*;
[ "android.util" ]
android.util;
1,318,875
public boolean bucketExists(GcsPath path) throws IOException { return bucketExists(path, new AttemptBoundedExponentialBackOff(4, 200), Sleeper.DEFAULT); }
boolean function(GcsPath path) throws IOException { return bucketExists(path, new AttemptBoundedExponentialBackOff(4, 200), Sleeper.DEFAULT); }
/** * Returns whether the GCS bucket exists. If the bucket exists, it must * be accessible otherwise the permissions exception will be propagated. */
Returns whether the GCS bucket exists. If the bucket exists, it must be accessible otherwise the permissions exception will be propagated
bucketExists
{ "repo_name": "joshualitt/DataflowJavaSDK", "path": "sdk/src/main/java/com/google/cloud/dataflow/sdk/util/GcsUtil.java", "license": "apache-2.0", "size": 20969 }
[ "com.google.api.client.util.Sleeper", "com.google.cloud.dataflow.sdk.util.gcsfs.GcsPath", "java.io.IOException" ]
import com.google.api.client.util.Sleeper; import com.google.cloud.dataflow.sdk.util.gcsfs.GcsPath; import java.io.IOException;
import com.google.api.client.util.*; import com.google.cloud.dataflow.sdk.util.gcsfs.*; import java.io.*;
[ "com.google.api", "com.google.cloud", "java.io" ]
com.google.api; com.google.cloud; java.io;
913,907
@Test public void noServiceConfigurationProvided_UsesVirtualAddressingWithStandardEndpoint() throws Exception { mockHttpClient.stubNextResponse(mockListObjectsResponse()); S3Client s3Client = buildClient(null); s3Client.listObjects(ListObjectsRequest.builder().bucket(BUCKET).build()); ...
void function() throws Exception { mockHttpClient.stubNextResponse(mockListObjectsResponse()); S3Client s3Client = buildClient(null); s3Client.listObjects(ListObjectsRequest.builder().bucket(BUCKET).build()); assertEndpointMatches(mockHttpClient.getLastRequest(), ENDPOINT_WITH_BUCKET); }
/** * By default we use virtual addressing when possible. */
By default we use virtual addressing when possible
noServiceConfigurationProvided_UsesVirtualAddressingWithStandardEndpoint
{ "repo_name": "aws/aws-sdk-java-v2", "path": "services/s3/src/test/java/software/amazon/awssdk/services/s3/S3EndpointResolutionTest.java", "license": "apache-2.0", "size": 40014 }
[ "software.amazon.awssdk.services.s3.model.ListObjectsRequest" ]
import software.amazon.awssdk.services.s3.model.ListObjectsRequest;
import software.amazon.awssdk.services.s3.model.*;
[ "software.amazon.awssdk" ]
software.amazon.awssdk;
1,381,949
public void deleteRoles(final Node node) throws RepositoryException;
void function(final Node node) throws RepositoryException;
/** * Deletes all roles assigned on this node and removes the mixin type. * * @param node the node to delete * @throws RepositoryException if delete failed */
Deletes all roles assigned on this node and removes the mixin type
deleteRoles
{ "repo_name": "peichman-umd/fcrepo-module-auth-rbacl", "path": "fcrepo-auth-roles-common/src/main/java/org/fcrepo/auth/roles/common/AccessRolesProvider.java", "license": "apache-2.0", "size": 2745 }
[ "javax.jcr.Node", "javax.jcr.RepositoryException" ]
import javax.jcr.Node; import javax.jcr.RepositoryException;
import javax.jcr.*;
[ "javax.jcr" ]
javax.jcr;
519,622
final void initBoundaryColor(Color4f boundaryColor) { this.boundaryColor.set(boundaryColor); }
final void initBoundaryColor(Color4f boundaryColor) { this.boundaryColor.set(boundaryColor); }
/** * Sets the texture boundary color for this texture object. The * texture boundary color is used when boundaryModeS or boundaryModeT * is set to CLAMP. * @param boundaryColor the new texture boundary color. */
Sets the texture boundary color for this texture object. The texture boundary color is used when boundaryModeS or boundaryModeT is set to CLAMP
initBoundaryColor
{ "repo_name": "gouessej/java3d-core", "path": "src/main/java/org/jogamp/java3d/TextureRetained.java", "license": "gpl-2.0", "size": 73834 }
[ "org.jogamp.vecmath.Color4f" ]
import org.jogamp.vecmath.Color4f;
import org.jogamp.vecmath.*;
[ "org.jogamp.vecmath" ]
org.jogamp.vecmath;
1,338,923
@Generated @Selector("setTitle:") public native void setTitle(String value);
@Selector(STR) native void function(String value);
/** * Primary title for this point of interest */
Primary title for this point of interest
setTitle
{ "repo_name": "multi-os-engine/moe-core", "path": "moe.apple/moe.platform.ios/src/main/java/apple/carplay/CPPointOfInterest.java", "license": "apache-2.0", "size": 10807 }
[ "org.moe.natj.objc.ann.Selector" ]
import org.moe.natj.objc.ann.Selector;
import org.moe.natj.objc.ann.*;
[ "org.moe.natj" ]
org.moe.natj;
464,114
@Schema(required = true, description = "Password of Active Directory administrative account") public String getServerAdminPassword() { return serverAdminPassword; }
@Schema(required = true, description = STR) String function() { return serverAdminPassword; }
/** * Password of Active Directory administrative account * @return serverAdminPassword **/
Password of Active Directory administrative account
getServerAdminPassword
{ "repo_name": "iterate-ch/cyberduck", "path": "dracoon/src/main/java/ch/cyberduck/core/sds/io/swagger/client/model/TestActiveDirectoryConfigRequest.java", "license": "gpl-3.0", "size": 7810 }
[ "io.swagger.v3.oas.annotations.media.Schema" ]
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.*;
[ "io.swagger.v3" ]
io.swagger.v3;
2,834,022
void setMetaConf(String key, String value) throws MetaException, TException;
void setMetaConf(String key, String value) throws MetaException, TException;
/** * set meta variable which is open to end users */
set meta variable which is open to end users
setMetaConf
{ "repo_name": "winningsix/hive", "path": "metastore/src/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java", "license": "apache-2.0", "size": 53383 }
[ "org.apache.hadoop.hive.metastore.api.MetaException", "org.apache.thrift.TException" ]
import org.apache.hadoop.hive.metastore.api.MetaException; import org.apache.thrift.TException;
import org.apache.hadoop.hive.metastore.api.*; import org.apache.thrift.*;
[ "org.apache.hadoop", "org.apache.thrift" ]
org.apache.hadoop; org.apache.thrift;
2,371,838
public int determineOutputFieldCount() { int result = 0; for (final AnalystField field : this.script.getNormalize() .getNormalizedFields()) { if (field.isOutput() && !field.isIgnored()) { result++; } } if( this.method instanceof BayesianNetwork ) { result++; } return result; }
int function() { int result = 0; for (final AnalystField field : this.script.getNormalize() .getNormalizedFields()) { if (field.isOutput() && !field.isIgnored()) { result++; } } if( this.method instanceof BayesianNetwork ) { result++; } return result; }
/** * Determine the number of output fields. Fields are higher * level than columns. * @return The output field count. */
Determine the number of output fields. Fields are higher level than columns
determineOutputFieldCount
{ "repo_name": "krzysztof-magosa/encog-java-core", "path": "src/main/java/org/encog/app/analyst/EncogAnalyst.java", "license": "apache-2.0", "size": 20388 }
[ "org.encog.app.analyst.script.normalize.AnalystField", "org.encog.ml.bayesian.BayesianNetwork" ]
import org.encog.app.analyst.script.normalize.AnalystField; import org.encog.ml.bayesian.BayesianNetwork;
import org.encog.app.analyst.script.normalize.*; import org.encog.ml.bayesian.*;
[ "org.encog.app", "org.encog.ml" ]
org.encog.app; org.encog.ml;
565,857
@Override public void enterExpressionCond(@NotNull BigDataScriptParser.ExpressionCondContext ctx) { }
@Override public void enterExpressionCond(@NotNull BigDataScriptParser.ExpressionCondContext ctx) { }
/** * {@inheritDoc} * * <p>The default implementation does nothing.</p> */
The default implementation does nothing
exitExpressionParen
{ "repo_name": "leepc12/BigDataScript", "path": "src/org/bds/antlr/BigDataScriptBaseListener.java", "license": "apache-2.0", "size": 36363 }
[ "org.antlr.v4.runtime.misc.NotNull" ]
import org.antlr.v4.runtime.misc.NotNull;
import org.antlr.v4.runtime.misc.*;
[ "org.antlr.v4" ]
org.antlr.v4;
449,878
@Test public void testIfThenElse() throws Exception { Object result = eval(jep, "if (2*2 == 4) then { 1; } else { 2; }"); assertEquals(BigDecimal.valueOf(1), result); result = eval(jep, "if (2*2 == 5) then { 1; } else { 2; }"); assertEquals(BigDecimal.valueOf(2), result); }
void function() throws Exception { Object result = eval(jep, STR); assertEquals(BigDecimal.valueOf(1), result); result = eval(jep, STR); assertEquals(BigDecimal.valueOf(2), result); }
/** * Test conditional with one operator in branches * @throws Exception */
Test conditional with one operator in branches
testIfThenElse
{ "repo_name": "xicmiah/jep-decimal", "path": "src/test/org/nfunk/jep/ConditionalsTest.java", "license": "gpl-3.0", "size": 3773 }
[ "java.math.BigDecimal", "org.junit.Assert" ]
import java.math.BigDecimal; import org.junit.Assert;
import java.math.*; import org.junit.*;
[ "java.math", "org.junit" ]
java.math; org.junit;
576,334
//------------------------------------------------------------------------- public void addExternalIds(final ExternalId... externalIds) { ArgumentChecker.notNull(externalIds, "externalIds"); final List<ExternalIdBundle> list = new ArrayList<>(); for (final ExternalId externalId : externalIds) { l...
void function(final ExternalId... externalIds) { ArgumentChecker.notNull(externalIds, STR); final List<ExternalIdBundle> list = new ArrayList<>(); for (final ExternalId externalId : externalIds) { list.add(ExternalIdBundle.of(externalId)); } getExternalIdBundles().addAll(list); }
/** * Adds an array of security external identifiers to the collection to load. * * @param externalIds the security identifiers to load, not null */
Adds an array of security external identifiers to the collection to load
addExternalIds
{ "repo_name": "McLeodMoores/starling", "path": "projects/provider/src/main/java/com/opengamma/provider/security/SecurityProviderRequest.java", "license": "apache-2.0", "size": 11514 }
[ "com.opengamma.id.ExternalId", "com.opengamma.id.ExternalIdBundle", "com.opengamma.util.ArgumentChecker", "java.util.ArrayList", "java.util.List" ]
import com.opengamma.id.ExternalId; import com.opengamma.id.ExternalIdBundle; import com.opengamma.util.ArgumentChecker; import java.util.ArrayList; import java.util.List;
import com.opengamma.id.*; import com.opengamma.util.*; import java.util.*;
[ "com.opengamma.id", "com.opengamma.util", "java.util" ]
com.opengamma.id; com.opengamma.util; java.util;
1,844,738
List<User> retrieveActiveEncoders();
List<User> retrieveActiveEncoders();
/** * Retrieves all active encoders according to agency then last name. * * @return the {@link List} of active encoders */
Retrieves all active encoders according to agency then last name
retrieveActiveEncoders
{ "repo_name": "rvbabilonia/openmpis", "path": "openmpis-user/src/main/java/nz/org/vincenzo/openmpis/user/dao/UserDAO.java", "license": "gpl-3.0", "size": 5215 }
[ "java.util.List", "nz.org.vincenzo.openmpis.user.model.User" ]
import java.util.List; import nz.org.vincenzo.openmpis.user.model.User;
import java.util.*; import nz.org.vincenzo.openmpis.user.model.*;
[ "java.util", "nz.org.vincenzo" ]
java.util; nz.org.vincenzo;
944,506
ConstExpression getDefaultValue();
ConstExpression getDefaultValue();
/** * Returns the value of the '<em><b>Default Value</b></em>' containment reference. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Default Value</em>' containment reference isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the va...
Returns the value of the 'Default Value' containment reference. If the meaning of the 'Default Value' containment reference isn't clear, there really should be more of a description here...
getDefaultValue
{ "repo_name": "perojonsson/bridgepoint", "path": "src/org.xtuml.bp.xtext.masl.parent/org.xtuml.bp.xtext.masl/emf-gen/org/xtuml/bp/xtext/masl/masl/types/StructureComponentDefinition.java", "license": "apache-2.0", "size": 2919 }
[ "org.xtuml.bp.xtext.masl.masl.behavior.ConstExpression" ]
import org.xtuml.bp.xtext.masl.masl.behavior.ConstExpression;
import org.xtuml.bp.xtext.masl.masl.behavior.*;
[ "org.xtuml.bp" ]
org.xtuml.bp;
867,748
public Email enterEmailShell(Email current) throws IOException { final EmailBuilder emailBuilder = new EmailBuilder(current); final Shell subShell = ShellBuilder.subshell((current == null ? "create" : "replace") + "-email", shell) .disableExitCommand() .addHandler(emailBuilder) .build(); output....
Email function(Email current) throws IOException { final EmailBuilder emailBuilder = new EmailBuilder(current); final Shell subShell = ShellBuilder.subshell((current == null ? STR : STR) + STR, shell) .disableExitCommand() .addHandler(emailBuilder) .build(); output.out() .normal(STRcommit\STR) .println(); subShell.comm...
/** * Enter a new subshell for creating an {@link Email}. * * @param current The current persisted {@link Email}. * @return The {@link Email}. Or null if the user interrupt the process. * @throws IOException */
Enter a new subshell for creating an <code>Email</code>
enterEmailShell
{ "repo_name": "rainu/osiam-shell", "path": "src/main/java/org/osiam/shell/command/builder/BuilderShellFactory.java", "license": "mit", "size": 10499 }
[ "de.raysha.lib.jsimpleshell.Shell", "de.raysha.lib.jsimpleshell.ShellBuilder", "java.io.IOException", "org.osiam.resources.scim.Email" ]
import de.raysha.lib.jsimpleshell.Shell; import de.raysha.lib.jsimpleshell.ShellBuilder; import java.io.IOException; import org.osiam.resources.scim.Email;
import de.raysha.lib.jsimpleshell.*; import java.io.*; import org.osiam.resources.scim.*;
[ "de.raysha.lib", "java.io", "org.osiam.resources" ]
de.raysha.lib; java.io; org.osiam.resources;
1,217,442
private ClassConstant parseClassConstant(int index) throws IOException { int nameIndex = readShort(); return new ClassConstant(_class.getConstantPool(), index, nameIndex); }
ClassConstant function(int index) throws IOException { int nameIndex = readShort(); return new ClassConstant(_class.getConstantPool(), index, nameIndex); }
/** * Parses a class constant pool entry. */
Parses a class constant pool entry
parseClassConstant
{ "repo_name": "baratine/baratine", "path": "core/src/main/java/com/caucho/v5/bytecode/ByteCodeParser.java", "license": "gpl-2.0", "size": 14660 }
[ "com.caucho.v5.bytecode.cpool.ClassConstant", "java.io.IOException" ]
import com.caucho.v5.bytecode.cpool.ClassConstant; import java.io.IOException;
import com.caucho.v5.bytecode.cpool.*; import java.io.*;
[ "com.caucho.v5", "java.io" ]
com.caucho.v5; java.io;
201,491
public Set<AuthRole> getRoles() { return roles; }
Set<AuthRole> function() { return roles; }
/** * Gets the roles. * * @return the roles */
Gets the roles
getRoles
{ "repo_name": "rockagen/gnext", "path": "src/main/java/com/rockagen/gnext/po/AuthUser.java", "license": "apache-2.0", "size": 7056 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
1,757,746
public Class<? extends CompressionCodec> getMapOutputCompressorClass(Class<? extends CompressionCodec> defaultValue) { Class<? extends CompressionCodec> codecClass = defaultValue; String name = get(JobContext.MAP_OUTPUT_COMPRESS_CODEC); if (name != null) { try { codecClass = getClassByNam...
Class<? extends CompressionCodec> function(Class<? extends CompressionCodec> defaultValue) { Class<? extends CompressionCodec> codecClass = defaultValue; String name = get(JobContext.MAP_OUTPUT_COMPRESS_CODEC); if (name != null) { try { codecClass = getClassByName(name).asSubclass(CompressionCodec.class); } catch (Clas...
/** * Get the {@link CompressionCodec} for compressing the map outputs. * * @param defaultValue the {@link CompressionCodec} to return if not set * @return the {@link CompressionCodec} class that should be used to compress the * map outputs. * @throws IllegalArgumentException if the class wa...
Get the <code>CompressionCodec</code> for compressing the map outputs
getMapOutputCompressorClass
{ "repo_name": "Microsoft-CISL/hadoop-prototype", "path": "hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/JobConf.java", "license": "apache-2.0", "size": 69457 }
[ "org.apache.hadoop.io.compress.CompressionCodec" ]
import org.apache.hadoop.io.compress.CompressionCodec;
import org.apache.hadoop.io.compress.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
775,488
protected static String toolsRepoExecPath(String execPath) { return TestConstants.TOOLS_REPOSITORY_PATH_PREFIX + execPath; }
static String function(String execPath) { return TestConstants.TOOLS_REPOSITORY_PATH_PREFIX + execPath; }
/** * Returns the full exec path string for exec paths of targets within the main tools repository. */
Returns the full exec path string for exec paths of targets within the main tools repository
toolsRepoExecPath
{ "repo_name": "dropbox/bazel", "path": "src/test/java/com/google/devtools/build/lib/rules/objc/ObjcRuleTestCase.java", "license": "apache-2.0", "size": 100511 }
[ "com.google.devtools.build.lib.testutil.TestConstants" ]
import com.google.devtools.build.lib.testutil.TestConstants;
import com.google.devtools.build.lib.testutil.*;
[ "com.google.devtools" ]
com.google.devtools;
2,192,665
protected boolean isJoinable( final JoinType joinType, final Set visitedAssociationKeys, final String lhsTable, final String[] lhsColumnNames, final AssociationType type, final int depth) { if ( joinType == JoinType.NONE ) { return false; } if ( joinType == JoinType.INNER_JOIN ) { ret...
boolean function( final JoinType joinType, final Set visitedAssociationKeys, final String lhsTable, final String[] lhsColumnNames, final AssociationType type, final int depth) { if ( joinType == JoinType.NONE ) { return false; } if ( joinType == JoinType.INNER_JOIN ) { return true; } Integer maxFetchDepth = getFactory(...
/** * Should we join this association? */
Should we join this association
isJoinable
{ "repo_name": "1fechner/FeatureExtractor", "path": "sources/FeatureExtractor/lib/hibernate-release-5.1.0.Final/project/hibernate-core/src/main/java/org/hibernate/loader/JoinWalker.java", "license": "lgpl-2.1", "size": 35107 }
[ "java.util.Set", "org.hibernate.sql.JoinType", "org.hibernate.type.AssociationType" ]
import java.util.Set; import org.hibernate.sql.JoinType; import org.hibernate.type.AssociationType;
import java.util.*; import org.hibernate.sql.*; import org.hibernate.type.*;
[ "java.util", "org.hibernate.sql", "org.hibernate.type" ]
java.util; org.hibernate.sql; org.hibernate.type;
1,689,080
@ModelChange(timings = { ModelValidator.TYPE_BEFORE_NEW }) public void processLoginRequest(final I_AD_User_Login loginRequest) { // // If already logged in (i.e. record was created from somewhere else) // => do nothing if (loginRequest.getAD_Session_ID() > 0) { return; } // // Parent context ...
@ModelChange(timings = { ModelValidator.TYPE_BEFORE_NEW }) void function(final I_AD_User_Login loginRequest) { if (loginRequest.getAD_Session_ID() > 0) { return; } final Properties ctx = InterfaceWrapperHelper.getCtx(loginRequest); if (Env.getAD_Session_ID(ctx) > 0) { throw new AdempiereException(STR + Env.getAD_Sessio...
/** * Actually this is doing the User Login for requests which are coming from replication. * * TODO: the exceptions don't make it to the client; instead of throwing exceptions, define a "loginResult" column, set its value an return it to the printing clients via export format. * * @param loginRequest * @...
Actually this is doing the User Login for requests which are coming from replication
processLoginRequest
{ "repo_name": "klst-com/metasfresh", "path": "de.metas.printing/de.metas.printing.base/src/main/java/de/metas/printing/model/validator/AD_User_Login.java", "license": "gpl-2.0", "size": 6187 }
[ "de.metas.hostkey.api.IHostKeyBL", "java.util.Properties", "java.util.Set", "org.adempiere.ad.modelvalidator.annotations.ModelChange", "org.adempiere.ad.session.ISessionBL", "org.adempiere.ad.session.MFSession", "org.adempiere.exceptions.AdempiereException", "org.adempiere.model.InterfaceWrapperHelper...
import de.metas.hostkey.api.IHostKeyBL; import java.util.Properties; import java.util.Set; import org.adempiere.ad.modelvalidator.annotations.ModelChange; import org.adempiere.ad.session.ISessionBL; import org.adempiere.ad.session.MFSession; import org.adempiere.exceptions.AdempiereException; import org.adempiere.model...
import de.metas.hostkey.api.*; import java.util.*; import org.adempiere.ad.modelvalidator.annotations.*; import org.adempiere.ad.session.*; import org.adempiere.exceptions.*; import org.adempiere.model.*; import org.adempiere.util.*; import org.compiere.model.*; import org.compiere.util.*;
[ "de.metas.hostkey", "java.util", "org.adempiere.ad", "org.adempiere.exceptions", "org.adempiere.model", "org.adempiere.util", "org.compiere.model", "org.compiere.util" ]
de.metas.hostkey; java.util; org.adempiere.ad; org.adempiere.exceptions; org.adempiere.model; org.adempiere.util; org.compiere.model; org.compiere.util;
1,784,987
private static BatchCreateVMReq configBatchCreateVMReq(String vpcID, String networkID, String vmLogicTemplID) { BatchCreateVMReq req = new BatchCreateVMReq(); // Virtual machine parameters bean VMParameterSet vmParameters = getVMParameters(vpcID, networkID); ...
static BatchCreateVMReq function(String vpcID, String networkID, String vmLogicTemplID) { BatchCreateVMReq req = new BatchCreateVMReq(); VMParameterSet vmParameters = getVMParameters(vpcID, networkID); req.setVmParameters(vmParameters); req.setVmLogicTemplID(vmLogicTemplID); req.setCount(3); req.getVmNames().add(STR); ...
/** * Configure the request bean of "BatchCreateVM" interface * @param vpcID A VPC's ID * @param networkID A network's ID * @param vmLogicTemplID A virtual machine logic template's ID * @return * @since eSDK Cloud V100R003C20 */
Configure the request bean of "BatchCreateVM" interface
configBatchCreateVMReq
{ "repo_name": "eSDK/esdk_cloud_fm_r3_native_java", "path": "test/demo/FM/EN/eSDK_FM_Native_Demo_JAVA/src/com/huawei/esdk/fusionmanager/demo/vm/BatchCreateVMDemo.java", "license": "apache-2.0", "size": 19659 }
[ "com.huawei.esdk.fusionmanager.local.bean.vm.BatchCreateVMReq", "com.huawei.esdk.fusionmanager.local.bean.vm.VMParameterSet" ]
import com.huawei.esdk.fusionmanager.local.bean.vm.BatchCreateVMReq; import com.huawei.esdk.fusionmanager.local.bean.vm.VMParameterSet;
import com.huawei.esdk.fusionmanager.local.bean.vm.*;
[ "com.huawei.esdk" ]
com.huawei.esdk;
2,546,248
boolean onLongPress(Keyboard.Key key); } private static final int NOT_A_KEY = -1; private static final int[] KEY_DELETE = { Keyboard.KEYCODE_DELETE }; private static final int[] LONG_PRESSABLE_STATE_SET = { android.R.attr.state_long_pressable }; private Keyboard mKeyboard; ...
boolean onLongPress(Keyboard.Key key); } private static final int NOT_A_KEY = -1; private static final int[] KEY_DELETE = { Keyboard.KEYCODE_DELETE }; private static final int[] LONG_PRESSABLE_STATE_SET = { android.R.attr.state_long_pressable }; private Keyboard mKeyboard; private int mCurrentKeyIndex = NOT_A_KEY; priv...
/** * Called when the user long presses a key. * @param popupKey the key that was long pressed * @return true if the long press is handled, false otherwise. */
Called when the user long presses a key
onLongPress
{ "repo_name": "s20121035/rk3288_android5.1_repo", "path": "packages/inputmethods/OpenWnn/src/jp/co/omronsoft/openwnn/KeyboardView.java", "license": "gpl-3.0", "size": 57498 }
[ "android.graphics.Bitmap", "android.graphics.Canvas", "android.graphics.Paint", "android.graphics.Rect", "android.graphics.drawable.Drawable", "android.view.GestureDetector", "android.view.View", "android.view.ViewConfiguration", "android.widget.PopupWindow", "android.widget.TextView", "java.uti...
import android.graphics.Bitmap; import android.graphics.Canvas; import android.graphics.Paint; import android.graphics.Rect; import android.graphics.drawable.Drawable; import android.view.GestureDetector; import android.view.View; import android.view.ViewConfiguration; import android.widget.PopupWindow; import android....
import android.graphics.*; import android.graphics.drawable.*; import android.view.*; import android.widget.*; import java.util.*; import jp.co.omronsoft.openwnn.*;
[ "android.graphics", "android.view", "android.widget", "java.util", "jp.co.omronsoft" ]
android.graphics; android.view; android.widget; java.util; jp.co.omronsoft;
2,384,652
public static void main(String[] args) throws Exception { if (args.length > 0) { PatternParser pp = new PatternParser(); PrintStream p = null; if (args.length > 1) { FileOutputStream f = new FileOutputStream(args[1]); p = new PrintStream(f,...
static void function(String[] args) throws Exception { if (args.length > 0) { PatternParser pp = new PatternParser(); PrintStream p = null; if (args.length > 1) { FileOutputStream f = new FileOutputStream(args[1]); p = new PrintStream(f, false, "utf-8"); pp.setTestOut(p); } pp.parse(args[0]); if (pp != null) { pp.close...
/** * Main entry point when used as an application. * @param args array of command line arguments * @throws Exception in case of uncaught exception */
Main entry point when used as an application
main
{ "repo_name": "pellcorp/fop", "path": "src/java/org/apache/fop/hyphenation/PatternParser.java", "license": "apache-2.0", "size": 15722 }
[ "java.io.FileOutputStream", "java.io.PrintStream" ]
import java.io.FileOutputStream; import java.io.PrintStream;
import java.io.*;
[ "java.io" ]
java.io;
1,727,455
public List<String> getTickLabelText() { List<String> strs = new ArrayList<>(); for (ChartText ct : this.tickLabels) { strs.add(ct.toString()); } return strs; }
List<String> function() { List<String> strs = new ArrayList<>(); for (ChartText ct : this.tickLabels) { strs.add(ct.toString()); } return strs; }
/** * Get tick label text * * @return Tick label text */
Get tick label text
getTickLabelText
{ "repo_name": "meteoinfo/meteoinfolib", "path": "src/org/meteoinfo/chart/axis/Axis.java", "license": "lgpl-3.0", "size": 53295 }
[ "java.util.ArrayList", "java.util.List", "org.meteoinfo.chart.ChartText" ]
import java.util.ArrayList; import java.util.List; import org.meteoinfo.chart.ChartText;
import java.util.*; import org.meteoinfo.chart.*;
[ "java.util", "org.meteoinfo.chart" ]
java.util; org.meteoinfo.chart;
403,336
private boolean isUserValid(AuthenticationDescriptor model, char[] password) { boolean valid = false; try { char[] hpwd = hashPassword(password); if (model != null) { char[] passwd = model.getPassword().toCharArray(); ...
boolean function(AuthenticationDescriptor model, char[] password) { boolean valid = false; try { char[] hpwd = hashPassword(password); if (model != null) { char[] passwd = model.getPassword().toCharArray(); if (HEX.equalsIgnoreCase(getProperty(PARAM_ENCODING))) { valid = true; if (hpwd.length == passwd.length) { for (i...
/** * Test if a user is valid * * @param model user's authentication model * @param password user's password * @return true if valid */
Test if a user is valid
isUserValid
{ "repo_name": "Sultry/glassfish-extension", "path": "src/main/java/com/glassfish/extension/auth/realm/rest/BasicSecuredRestRealm.java", "license": "gpl-2.0", "size": 13068 }
[ "java.util.Arrays", "java.util.logging.Level" ]
import java.util.Arrays; import java.util.logging.Level;
import java.util.*; import java.util.logging.*;
[ "java.util" ]
java.util;
1,389,959
public MobileButton getMultiTapButton() { MobileButton element = this.multiTapButton; if (element == null) { this.multiTapButton = MobileImplementationFinder.instantiate(getPlatform(), MobileButton.class, getObjectMap().get("multiTapButton")); } return...
MobileButton function() { MobileButton element = this.multiTapButton; if (element == null) { this.multiTapButton = MobileImplementationFinder.instantiate(getPlatform(), MobileButton.class, getObjectMap().get(STR)); } return this.multiTapButton; }
/** * Used to get multiTapButton in the page TapPage * * @return multiTapButton */
Used to get multiTapButton in the page TapPage
getMultiTapButton
{ "repo_name": "paypal/SeLion", "path": "client/src/test/java/com/paypal/selion/mobile/sample/pages/TapPage.java", "license": "apache-2.0", "size": 6812 }
[ "com.paypal.selion.platform.mobile.MobileImplementationFinder", "com.paypal.selion.platform.mobile.elements.MobileButton" ]
import com.paypal.selion.platform.mobile.MobileImplementationFinder; import com.paypal.selion.platform.mobile.elements.MobileButton;
import com.paypal.selion.platform.mobile.*; import com.paypal.selion.platform.mobile.elements.*;
[ "com.paypal.selion" ]
com.paypal.selion;
1,535,331
public static void e(String tag, String message, Exception exception) { if (sIsLogEnabled) { Log.e(tag, getContent(getCurrentStackTraceElement()) + "\n>" + exception.getMessage() + "\n>" + exception.getStackTrace() + " " + message); exception.printStackTrace(); } }
static void function(String tag, String message, Exception exception) { if (sIsLogEnabled) { Log.e(tag, getContent(getCurrentStackTraceElement()) + "\n>" + exception.getMessage() + "\n>" + exception.getStackTrace() + " " + message); exception.printStackTrace(); } }
/** * Send an ERROR log message. * * @param tag * @param message * @param exception */
Send an ERROR log message
e
{ "repo_name": "shuhonglin/LostAndFound", "path": "ultimaterecyclerview/src/main/java/com/marshalchen/ultimaterecyclerview/URLogs.java", "license": "apache-2.0", "size": 7011 }
[ "android.util.Log" ]
import android.util.Log;
import android.util.*;
[ "android.util" ]
android.util;
1,891,660
private void processStreamingBatch(SqlFieldsQueryEx qry, IgniteBiTuple<Integer, String> err) { try { assert cliCtx.isStream(); ctx.query().streamBatchedUpdateQuery( OdbcUtils.prepareSchema(qry.getSchema()), cliCtx, qry.getSql(), ...
void function(SqlFieldsQueryEx qry, IgniteBiTuple<Integer, String> err) { try { assert cliCtx.isStream(); ctx.query().streamBatchedUpdateQuery( OdbcUtils.prepareSchema(qry.getSchema()), cliCtx, qry.getSql(), qry.batchedArguments() ); } catch (Exception e) { U.error(log, STR + qry +']', e); extractBatchError(e, null, er...
/** * Executes query and updates result counters. * * @param qry Query. * @param err First error data - code and message. */
Executes query and updates result counters
processStreamingBatch
{ "repo_name": "shroman/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/odbc/OdbcRequestHandler.java", "license": "apache-2.0", "size": 35303 }
[ "org.apache.ignite.internal.processors.cache.query.SqlFieldsQueryEx", "org.apache.ignite.internal.util.typedef.internal.U", "org.apache.ignite.lang.IgniteBiTuple" ]
import org.apache.ignite.internal.processors.cache.query.SqlFieldsQueryEx; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.lang.IgniteBiTuple;
import org.apache.ignite.internal.processors.cache.query.*; import org.apache.ignite.internal.util.typedef.internal.*; import org.apache.ignite.lang.*;
[ "org.apache.ignite" ]
org.apache.ignite;
2,435,825
public void testBasicImportIgnores() throws Throwable { // create working copy OneTest thisTest = new OneTest("basicImportIgnores",getGreekTestConfig()); // create dir File dir = new File(thisTest.getWorkingCopy(), "dir"); dir.mkdir(); // create dir/foo.c File fileC = new File...
void function() throws Throwable { OneTest thisTest = new OneTest(STR,getGreekTestConfig()); File dir = new File(thisTest.getWorkingCopy(), "dir"); dir.mkdir(); File fileC = new File(dir, "foo.c"); new FileOutputStream(fileC).close(); File fileO = new File(dir, "foo.o"); new FileOutputStream(fileO).close(); client.doIm...
/** * test the basis SVNClient.import functionality with files that should be * ignored * @throws Throwable */
test the basis SVNClient.import functionality with files that should be ignored
testBasicImportIgnores
{ "repo_name": "subclipse/svnclientadapter", "path": "tests/org/tigris/subversion/svnclientadapter/basictests/ImportTest.java", "license": "apache-2.0", "size": 3898 }
[ "java.io.File", "java.io.FileOutputStream", "org.tigris.subversion.svnclientadapter.SVNRevision", "org.tigris.subversion.svnclientadapter.SVNUrl", "org.tigris.subversion.svnclientadapter.testUtils.FileUtils", "org.tigris.subversion.svnclientadapter.testUtils.OneTest" ]
import java.io.File; import java.io.FileOutputStream; import org.tigris.subversion.svnclientadapter.SVNRevision; import org.tigris.subversion.svnclientadapter.SVNUrl; import org.tigris.subversion.svnclientadapter.testUtils.FileUtils; import org.tigris.subversion.svnclientadapter.testUtils.OneTest;
import java.io.*; import org.tigris.subversion.svnclientadapter.*;
[ "java.io", "org.tigris.subversion" ]
java.io; org.tigris.subversion;
92,731
private void switchBottomActiveWithTopPending() { // move active first by setting it to pending. DownloadInfo bottomActive = mActiveList.get(mActiveList.size() - 1); bottomActive.changeStatusState(new PendingState(bottomActive)); // now the newly pending download will be added to the bottom of the pending qu...
void function() { DownloadInfo bottomActive = mActiveList.get(mActiveList.size() - 1); bottomActive.changeStatusState(new PendingState(bottomActive)); DownloadInfo bottomPending = mPendingList.get(mPendingList.size() - 1); mPendingList.add(0, bottomPending); mPendingList.remove(mPendingList.size() - 1); }
/** * Switch the bottommost active download object with the topmost pending download object. */
Switch the bottommost active download object with the topmost pending download object
switchBottomActiveWithTopPending
{ "repo_name": "Aptoide/aptoide-backup-apps", "path": "app/src/main/java/pt/aptoide/backupapps/download/DownloadManager.java", "license": "gpl-2.0", "size": 18835 }
[ "pt.aptoide.backupapps.download.state.PendingState" ]
import pt.aptoide.backupapps.download.state.PendingState;
import pt.aptoide.backupapps.download.state.*;
[ "pt.aptoide.backupapps" ]
pt.aptoide.backupapps;
770,852
@Test public final void testQuoting() { final ErrorBuffer errors = new ErrorBuffer(); final CommandlineParser parser = new CommandlineParser("where 'player 2'"); assertFalse(errors.hasError()); assertEquals("where", parser.getNextParameter(errors)); assertEquals("player 2", parser.getNextParameter(errors)...
final void function() { final ErrorBuffer errors = new ErrorBuffer(); final CommandlineParser parser = new CommandlineParser(STR); assertFalse(errors.hasError()); assertEquals("where", parser.getNextParameter(errors)); assertEquals(STR, parser.getNextParameter(errors)); assertEquals(null, parser.getNextParameter(errors...
/** * Tests for quoting. */
Tests for quoting
testQuoting
{ "repo_name": "nhnb/stendhal", "path": "tests/games/stendhal/common/CommandlineParserTest.java", "license": "gpl-2.0", "size": 3253 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
2,861,873
public Netty3JSONResponse setContent(ChannelBuffer channelBuffer) { if(channelOutputStream!=null) { throw new RuntimeException("Cannot set content. OutputStream already set"); } content = channelBuffer; //channelOutputStream = new ChannelBufferOutputStream(channelBuffer); return this; }
Netty3JSONResponse function(ChannelBuffer channelBuffer) { if(channelOutputStream!=null) { throw new RuntimeException(STR); } content = channelBuffer; return this; }
/** * Sets the payload content from the passed buffer * @param channelBuffer The buffer to set the content to * @return this json response */
Sets the payload content from the passed buffer
setContent
{ "repo_name": "nickman/HeliosStreams", "path": "web-rpc/src/main/java/com/heliosapm/webrpc/jsonservice/netty3/Netty3JSONResponse.java", "license": "apache-2.0", "size": 14910 }
[ "org.jboss.netty.buffer.ChannelBuffer" ]
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.buffer.*;
[ "org.jboss.netty" ]
org.jboss.netty;
2,822,806
protected PermissionFactory<FacesContextAdapter> getPermissionFactory() { return new JSFPermissionFactory(); }
PermissionFactory<FacesContextAdapter> function() { return new JSFPermissionFactory(); }
/** * return the PermissionFactory. * * @return */
return the PermissionFactory
getPermissionFactory
{ "repo_name": "clescot/jguard", "path": "jguard-jee-extras/src/main/java/net/sf/jguard/jsf/authentication/schemes/JSFLoginPasswordFormSchemeHandler.java", "license": "lgpl-2.1", "size": 7509 }
[ "net.sf.jguard.core.authorization.permissions.PermissionFactory", "net.sf.jguard.jsf.FacesContextAdapter", "net.sf.jguard.jsf.permissions.JSFPermissionFactory" ]
import net.sf.jguard.core.authorization.permissions.PermissionFactory; import net.sf.jguard.jsf.FacesContextAdapter; import net.sf.jguard.jsf.permissions.JSFPermissionFactory;
import net.sf.jguard.core.authorization.permissions.*; import net.sf.jguard.jsf.*; import net.sf.jguard.jsf.permissions.*;
[ "net.sf.jguard" ]
net.sf.jguard;
92,522
public void removeTag(long pk, long tagPK) throws SystemException { try { removeTag.remove(pk, tagPK); } catch (Exception e) { throw processException(e); } finally { FinderCacheUtil.clearCache(QuestionModelImpl.MAPPING_TABLE_QUICKANSWER_QUESTIONTAG_NAME); } }
void function(long pk, long tagPK) throws SystemException { try { removeTag.remove(pk, tagPK); } catch (Exception e) { throw processException(e); } finally { FinderCacheUtil.clearCache(QuestionModelImpl.MAPPING_TABLE_QUICKANSWER_QUESTIONTAG_NAME); } }
/** * Removes the association between the Question and the Tag. Also notifies the appropriate model listeners and clears the mapping table finder cache. * * @param pk the primary key of the Question * @param tagPK the primary key of the Tag * @throws SystemException if a system exception occurred */
Removes the association between the Question and the Tag. Also notifies the appropriate model listeners and clears the mapping table finder cache
removeTag
{ "repo_name": "p-gebhard/QuickAnswer", "path": "docroot/WEB-INF/src/it/gebhard/qa/service/persistence/QuestionPersistenceImpl.java", "license": "gpl-3.0", "size": 68642 }
[ "com.liferay.portal.kernel.dao.orm.FinderCacheUtil", "com.liferay.portal.kernel.exception.SystemException", "it.gebhard.qa.model.impl.QuestionModelImpl" ]
import com.liferay.portal.kernel.dao.orm.FinderCacheUtil; import com.liferay.portal.kernel.exception.SystemException; import it.gebhard.qa.model.impl.QuestionModelImpl;
import com.liferay.portal.kernel.dao.orm.*; import com.liferay.portal.kernel.exception.*; import it.gebhard.qa.model.impl.*;
[ "com.liferay.portal", "it.gebhard.qa" ]
com.liferay.portal; it.gebhard.qa;
1,769,509
static DataNode makeInstance(Collection<StorageLocation> dataDirs, Configuration conf, SecureResources resources) throws IOException { LocalFileSystem localFS = FileSystem.getLocal(conf); FsPermission permission = new FsPermission( conf.get(DFS_DATANODE_DATA_DIR_PERMISSION_KEY, ...
static DataNode makeInstance(Collection<StorageLocation> dataDirs, Configuration conf, SecureResources resources) throws IOException { LocalFileSystem localFS = FileSystem.getLocal(conf); FsPermission permission = new FsPermission( conf.get(DFS_DATANODE_DATA_DIR_PERMISSION_KEY, DFS_DATANODE_DATA_DIR_PERMISSION_DEFAULT)...
/** * Make an instance of DataNode after ensuring that at least one of the * given data directories (and their parent directories, if necessary) * can be created. * @param dataDirs List of directories, where the new DataNode instance should * keep its files. * @param conf Configuration instance to use...
Make an instance of DataNode after ensuring that at least one of the given data directories (and their parent directories, if necessary) can be created
makeInstance
{ "repo_name": "jth/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java", "license": "apache-2.0", "size": 120321 }
[ "java.io.IOException", "java.util.Collection", "java.util.List", "org.apache.hadoop.conf.Configuration", "org.apache.hadoop.fs.FileSystem", "org.apache.hadoop.fs.LocalFileSystem", "org.apache.hadoop.fs.permission.FsPermission", "org.apache.hadoop.hdfs.server.datanode.SecureDataNodeStarter", "org.apa...
import java.io.IOException; import java.util.Collection; import java.util.List; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.LocalFileSystem; import org.apache.hadoop.fs.permission.FsPermission; import org.apache.hadoop.hdfs.server.datanode.SecureDataN...
import java.io.*; import java.util.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.fs.permission.*; import org.apache.hadoop.hdfs.server.datanode.*; import org.apache.hadoop.metrics2.lib.*;
[ "java.io", "java.util", "org.apache.hadoop" ]
java.io; java.util; org.apache.hadoop;
1,337,148
public Iterable<NewsgroupInfo> iterateNewNewsgroups(NewGroupsOrNewsQuery query) throws IOException { return new NewsgroupIterator(iterateNewNewsgroupListing(query)); }
Iterable<NewsgroupInfo> function(NewGroupsOrNewsQuery query) throws IOException { return new NewsgroupIterator(iterateNewNewsgroupListing(query)); }
/** * List all new newsgroups added to the NNTP server since a particular * date subject to the conditions of the specified query. If no new * newsgroups were added, no entries will be returned. * This uses the "NEWGROUPS" command. * <p> * @param query The query restricting how to search...
List all new newsgroups added to the NNTP server since a particular date subject to the conditions of the specified query. If no new newsgroups were added, no entries will be returned. This uses the "NEWGROUPS" command.
iterateNewNewsgroups
{ "repo_name": "codolutions/commons-net", "path": "src/main/java/org/apache/commons/net/nntp/NNTPClient.java", "license": "apache-2.0", "size": 77301 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,609,093
@Test public void testView_3Args() { String filename = "pkg/foo.class"; String comment = "got milk"; byte[] extraData = { 1, 2, 3, 4, 5, 6, 7, 8}; int expSize = ZipInputStream.CENHDR + filename.getBytes(UTF_8).length + extraData.length + comment.getBytes(UTF_8).length; int expPos = 0; ...
void function() { String filename = STR; String comment = STR; byte[] extraData = { 1, 2, 3, 4, 5, 6, 7, 8}; int expSize = ZipInputStream.CENHDR + filename.getBytes(UTF_8).length + extraData.length + comment.getBytes(UTF_8).length; int expPos = 0; DirectoryEntry view = DirectoryEntry.allocate(filename, extraData, comme...
/** * Test of view method, of class DirectoryEntry. */
Test of view method, of class DirectoryEntry
testView_3Args
{ "repo_name": "vt09/bazel", "path": "src/test/java/com/google/devtools/build/android/ziputils/DirectoryEntryTest.java", "license": "apache-2.0", "size": 8030 }
[ "java.util.zip.ZipInputStream", "org.junit.Assert" ]
import java.util.zip.ZipInputStream; import org.junit.Assert;
import java.util.zip.*; import org.junit.*;
[ "java.util", "org.junit" ]
java.util; org.junit;
2,200,282
public void buildComponent(StructureComponent structurecomponent, List list, Random random) { }
void function(StructureComponent structurecomponent, List list, Random random) { }
/** * Initiates construction of the Structure Component picked, at the current Location of StructGen */
Initiates construction of the Structure Component picked, at the current Location of StructGen
buildComponent
{ "repo_name": "sethten/MoDesserts", "path": "mcp50/src/minecraft_server/net/minecraft/src/ComponentVillageHouse2.java", "license": "gpl-3.0", "size": 8887 }
[ "java.util.List", "java.util.Random" ]
import java.util.List; import java.util.Random;
import java.util.*;
[ "java.util" ]
java.util;
1,418,296
public Object eval(Reader reader) throws ScriptException;
Object function(Reader reader) throws ScriptException;
/** * Same as <code>eval(String)</code> except that the source of the script is * provided as a <code>Reader</code> * * @return The value returned by the script. * * @param reader The source of the script. * * @throws ScriptExcepion if an error occurrs. * @throws NullPointer...
Same as <code>eval(String)</code> except that the source of the script is provided as a <code>Reader</code>
eval
{ "repo_name": "cristiana214/cristianachavez214-cristianachavez", "path": "beanshell/src/engine/javax-src/javax/script/ScriptEngine.java", "license": "apache-2.0", "size": 12989 }
[ "java.io.Reader" ]
import java.io.Reader;
import java.io.*;
[ "java.io" ]
java.io;
1,608,291
private void initComponents(Icon userIcon) { sorter = new ViewerSorter(); cancel = new JButton("Cancel"); cancel.setToolTipText( UIUtilities.formatToolTipText(CANCEL_DESCRIPTION)); apply = new JButton("Apply"); //apply.setEnabled(false); apply.setToolTipText( UIUtilities.formatToolTipText(APPLY_...
void function(Icon userIcon) { sorter = new ViewerSorter(); cancel = new JButton(STR); cancel.setToolTipText( UIUtilities.formatToolTipText(CANCEL_DESCRIPTION)); apply = new JButton("Apply"); apply.setToolTipText( UIUtilities.formatToolTipText(APPLY_DESCRIPTION)); getRootPane().setDefaultButton(apply); members = new Se...
/** * Initializes the UI components. * * @param selectedGroup The group to display * @param userIcon The icon used to represent an user. */
Initializes the UI components
initComponents
{ "repo_name": "jballanc/openmicroscopy", "path": "components/insight/SRC/org/openmicroscopy/shoola/agents/util/ui/UserManagerDialog.java", "license": "gpl-2.0", "size": 12022 }
[ "javax.swing.Icon", "javax.swing.JButton", "org.openmicroscopy.shoola.agents.util.ViewerSorter", "org.openmicroscopy.shoola.util.ui.UIUtilities" ]
import javax.swing.Icon; import javax.swing.JButton; import org.openmicroscopy.shoola.agents.util.ViewerSorter; import org.openmicroscopy.shoola.util.ui.UIUtilities;
import javax.swing.*; import org.openmicroscopy.shoola.agents.util.*; import org.openmicroscopy.shoola.util.ui.*;
[ "javax.swing", "org.openmicroscopy.shoola" ]
javax.swing; org.openmicroscopy.shoola;
1,411,122
public static Object getDefaultValue(Annotation annotation, String attributeName) { return getDefaultValue(annotation.annotationType(), attributeName); }
static Object function(Annotation annotation, String attributeName) { return getDefaultValue(annotation.annotationType(), attributeName); }
/** * Retrieve the <em>default value</em> of a named Annotation attribute, * given an annotation instance. * @param annotation the annotation instance from which to retrieve * the default value * @param attributeName the name of the attribute value to retrieve * @return the default value of the named ...
Retrieve the default value of a named Annotation attribute, given an annotation instance
getDefaultValue
{ "repo_name": "besom/bbossgroups-mvn", "path": "bboss_util/src/main/java/org/frameworkset/util/annotations/AnnotationUtils.java", "license": "apache-2.0", "size": 16123 }
[ "java.lang.annotation.Annotation" ]
import java.lang.annotation.Annotation;
import java.lang.annotation.*;
[ "java.lang" ]
java.lang;
1,799,528
public void addRule ( Rule rule ) throws Exception { //Initialise the rule, if success add it to the filter Boolean initialized = rule.initialise( Config.CONTEXT ); if ( initialized ) { //Adding it the rule to the current filter configuration Conf conf = getConf(); ...
void function ( Rule rule ) throws Exception { Boolean initialized = rule.initialise( Config.CONTEXT ); if ( initialized ) { Conf conf = getConf(); conf.addRule( rule ); reload(); } else { throw new RuntimeException( STR ); } }
/** * Add a given Rule to this rewrite filter * * @param rule * @throws Exception */
Add a given Rule to this rewrite filter
addRule
{ "repo_name": "dotCMS/core-2.x", "path": "src/com/dotmarketing/filters/DotUrlRewriteFilter.java", "license": "gpl-3.0", "size": 3215 }
[ "com.dotmarketing.util.Config", "org.tuckey.web.filters.urlrewrite.Conf", "org.tuckey.web.filters.urlrewrite.Rule" ]
import com.dotmarketing.util.Config; import org.tuckey.web.filters.urlrewrite.Conf; import org.tuckey.web.filters.urlrewrite.Rule;
import com.dotmarketing.util.*; import org.tuckey.web.filters.urlrewrite.*;
[ "com.dotmarketing.util", "org.tuckey.web" ]
com.dotmarketing.util; org.tuckey.web;
2,172,834
@Test public void whenUpdateUserShouldUpdateUserInStorage() { User user = new User(); user.setName("admin"); int index = importUser.addUser(user); user.setName("root"); importUser.updateUser(user); assertThat(importUser.getUser(index), is(user)); }
void function() { User user = new User(); user.setName("admin"); int index = importUser.addUser(user); user.setName("root"); importUser.updateUser(user); assertThat(importUser.getUser(index), is(user)); }
/** * Test update method. */
Test update method
whenUpdateUserShouldUpdateUserInStorage
{ "repo_name": "roman-sd/java-a-to-z", "path": "chapter_011/IoC/src/test/java/ru/sdroman/springbeans/storages/MemoryStorageTest.java", "license": "apache-2.0", "size": 2703 }
[ "org.hamcrest.core.Is", "org.junit.Assert", "ru.sdroman.springbeans.models.User" ]
import org.hamcrest.core.Is; import org.junit.Assert; import ru.sdroman.springbeans.models.User;
import org.hamcrest.core.*; import org.junit.*; import ru.sdroman.springbeans.models.*;
[ "org.hamcrest.core", "org.junit", "ru.sdroman.springbeans" ]
org.hamcrest.core; org.junit; ru.sdroman.springbeans;
1,403,006
EAttribute getPassenger_TotalTimeWaited();
EAttribute getPassenger_TotalTimeWaited();
/** * Returns the meta object for the attribute '{@link com.paxelerate.model.agent.Passenger#getTotalTimeWaited <em>Total Time Waited</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the attribute '<em>Total Time Waited</em>'. * @see com.paxelerate.model.agent.Passenger#...
Returns the meta object for the attribute '<code>com.paxelerate.model.agent.Passenger#getTotalTimeWaited Total Time Waited</code>'.
getPassenger_TotalTimeWaited
{ "repo_name": "BauhausLuftfahrt/PAXelerate", "path": "com.paxelerate.model/src/com/paxelerate/model/agent/AgentPackage.java", "license": "epl-1.0", "size": 45860 }
[ "org.eclipse.emf.ecore.EAttribute" ]
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
793,581
public void testListDoesntCrash() { model.createReifiedStatement(SPO); model.createReifiedStatement(SPO2); Assert.assertTrue("should be non-empty", model.listReifiedStatements() .hasNext()); }
void function() { model.createReifiedStatement(SPO); model.createReifiedStatement(SPO2); Assert.assertTrue(STR, model.listReifiedStatements() .hasNext()); }
/** * this test appeared when TestStatementResources crashed using reified * statements as a step-0 implementation for asSubject()/asObject(). Looks * like there was a problem in modelReifier().getRS(), which we're fixing * ... */
this test appeared when TestStatementResources crashed using reified statements as a step-0 implementation for asSubject()/asObject(). Looks like there was a problem in modelReifier().getRS(), which we're fixing ..
testListDoesntCrash
{ "repo_name": "CesarPantoja/jena", "path": "jena-core/src/test/java/org/apache/jena/rdf/model/test/AbstractTestReifiedStatements.java", "license": "apache-2.0", "size": 14742 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
2,105,441
public static WorkspaceNavigation create(View view, WorkspaceNavigationSection<?>[] topSections, WorkspaceNavigationSection<?>[] bottomSections, WorkspaceNavigationToolBar navigationToolBar) { WorkspaceNavigation workspaceNavigation = new WorkspaceNavigation(view, navigationToolBar); for (Workspa...
static WorkspaceNavigation function(View view, WorkspaceNavigationSection<?>[] topSections, WorkspaceNavigationSection<?>[] bottomSections, WorkspaceNavigationToolBar navigationToolBar) { WorkspaceNavigation workspaceNavigation = new WorkspaceNavigation(view, navigationToolBar); for (WorkspaceNavigationSection<?> topSe...
/** * Static factory method for obtaining an instance of the WorkspaceNavigation. */
Static factory method for obtaining an instance of the WorkspaceNavigation
create
{ "repo_name": "WeTheInternet/collide", "path": "client/src/main/java/com/google/collide/client/code/WorkspaceNavigation.java", "license": "apache-2.0", "size": 8275 }
[ "com.google.gwt.resources.client.CssResource" ]
import com.google.gwt.resources.client.CssResource;
import com.google.gwt.resources.client.*;
[ "com.google.gwt" ]
com.google.gwt;
396,137
public void unregisterService(RaftServiceContext service) { services.remove(service.serviceName()); }
void function(RaftServiceContext service) { services.remove(service.serviceName()); }
/** * Unregisters the given service. * * @param service the service to unregister */
Unregisters the given service
unregisterService
{ "repo_name": "kuujo/copycat", "path": "protocols/raft/src/main/java/io/atomix/protocols/raft/impl/RaftServiceRegistry.java", "license": "apache-2.0", "size": 2043 }
[ "io.atomix.protocols.raft.service.RaftServiceContext" ]
import io.atomix.protocols.raft.service.RaftServiceContext;
import io.atomix.protocols.raft.service.*;
[ "io.atomix.protocols" ]
io.atomix.protocols;
526,395
void enterEnumConstantModifier(@NotNull Java8Parser.EnumConstantModifierContext ctx); void exitEnumConstantModifier(@NotNull Java8Parser.EnumConstantModifierContext ctx);
void enterEnumConstantModifier(@NotNull Java8Parser.EnumConstantModifierContext ctx); void exitEnumConstantModifier(@NotNull Java8Parser.EnumConstantModifierContext ctx);
/** * Exit a parse tree produced by {@link Java8Parser#enumConstantModifier}. * @param ctx the parse tree */
Exit a parse tree produced by <code>Java8Parser#enumConstantModifier</code>
exitEnumConstantModifier
{ "repo_name": "IsThisThePayneResidence/intellidots", "path": "src/main/java/ua/edu/hneu/ast/parsers/Java8Listener.java", "license": "gpl-3.0", "size": 95845 }
[ "org.antlr.v4.runtime.misc.NotNull" ]
import org.antlr.v4.runtime.misc.NotNull;
import org.antlr.v4.runtime.misc.*;
[ "org.antlr.v4" ]
org.antlr.v4;
608,420
@Override public void setErrorKeys(List errorKeys) { this.errorKeys = errorKeys; }
void function(List errorKeys) { this.errorKeys = errorKeys; }
/** * Sets the errorKeys attribute value. * * @param errorKeys The errorKeys to set. */
Sets the errorKeys attribute value
setErrorKeys
{ "repo_name": "quikkian-ua-devops/will-financials", "path": "kfs-core/src/main/java/org/kuali/kfs/sys/document/web/DefaultAccountingLineGroupImpl.java", "license": "agpl-3.0", "size": 19938 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,447,284
public static boolean pdf_add_weblink(Env env, @NotNull PDF pdf, double llx, double lly, double urx, double ury, ...
static boolean function(Env env, @NotNull PDF pdf, double llx, double lly, double urx, double ury, String url) { env.stub(STR); return false; }
/** * Adds a web link */
Adds a web link
pdf_add_weblink
{ "repo_name": "headius/quercus", "path": "src/main/java/com/caucho/quercus/lib/pdf/PDFModule.java", "license": "gpl-2.0", "size": 48781 }
[ "com.caucho.quercus.annotation.NotNull", "com.caucho.quercus.env.Env" ]
import com.caucho.quercus.annotation.NotNull; import com.caucho.quercus.env.Env;
import com.caucho.quercus.annotation.*; import com.caucho.quercus.env.*;
[ "com.caucho.quercus" ]
com.caucho.quercus;
1,396,712
@Override public void register(DOI doi, URI target, String metadata) throws DoiException { Objects.requireNonNull(doi, "DOI can't be registered without identifier"); Objects.requireNonNull(target, "DOI can't be registered without target URL"); Objects.requireNonNull(metadata, "DOI can't be registered wi...
void function(DOI doi, URI target, String metadata) throws DoiException { Objects.requireNonNull(doi, STR); Objects.requireNonNull(target, STR); Objects.requireNonNull(metadata, STR); DoiSimplifiedModel model = prepareDoiCreateModel(doi, metadata); model.setEvent(EventType.PUBLISH.getValue()); model.setUrl(target.toStr...
/** * Register a doi. Uses createDoi method with the event type 'PUBLISH'. * * @param doi the identifier * @param metadata the metadata to be associated with the doi */
Register a doi. Uses createDoi method with the event type 'PUBLISH'
register
{ "repo_name": "gbif/gbif-doi", "path": "src/main/java/org/gbif/doi/service/datacite/RestJsonApiDataCiteService.java", "license": "apache-2.0", "size": 13736 }
[ "com.github.jasminb.jsonapi.JSONAPIDocument", "java.util.Objects", "org.gbif.api.model.common.DoiData", "org.gbif.api.model.common.DoiStatus", "org.gbif.datacite.rest.client.model.DoiSimplifiedModel", "org.gbif.datacite.rest.client.model.EventType", "org.gbif.doi.service.DoiException", "org.gbif.doi.s...
import com.github.jasminb.jsonapi.JSONAPIDocument; import java.util.Objects; import org.gbif.api.model.common.DoiData; import org.gbif.api.model.common.DoiStatus; import org.gbif.datacite.rest.client.model.DoiSimplifiedModel; import org.gbif.datacite.rest.client.model.EventType; import org.gbif.doi.service.DoiException...
import com.github.jasminb.jsonapi.*; import java.util.*; import org.gbif.api.model.common.*; import org.gbif.datacite.rest.client.model.*; import org.gbif.doi.service.*;
[ "com.github.jasminb", "java.util", "org.gbif.api", "org.gbif.datacite", "org.gbif.doi" ]
com.github.jasminb; java.util; org.gbif.api; org.gbif.datacite; org.gbif.doi;
505,537
public void testValueToJava2D() { Rectangle2D plotArea = new Rectangle2D.Double(22, 33, 500, 500); RectangleEdge edge = RectangleEdge.BOTTOM; // set axis bounds to be both greater than 1 this.axis.setRange(10, 20); checkPointsToJava2D(edge, plotArea); ...
void function() { Rectangle2D plotArea = new Rectangle2D.Double(22, 33, 500, 500); RectangleEdge edge = RectangleEdge.BOTTOM; this.axis.setRange(10, 20); checkPointsToJava2D(edge, plotArea); this.axis.setRange(0.5, 10); checkPointsToJava2D(edge, plotArea); this.axis.setRange(0.2, 20); checkPointsToJava2D(edge, plotArea...
/** * Test of valueToJava2D method. */
Test of valueToJava2D method
testValueToJava2D
{ "repo_name": "ilyessou/jfreechart", "path": "tests/org/jfree/chart/axis/junit/LogarithmicAxisTests.java", "license": "lgpl-2.1", "size": 9957 }
[ "java.awt.geom.Rectangle2D", "org.jfree.chart.util.RectangleEdge" ]
import java.awt.geom.Rectangle2D; import org.jfree.chart.util.RectangleEdge;
import java.awt.geom.*; import org.jfree.chart.util.*;
[ "java.awt", "org.jfree.chart" ]
java.awt; org.jfree.chart;
548,833
@Deprecated public List<String> getAllUniqueMembersInGroup(int groupId, int voId);
List<String> function(int groupId, int voId);
/** * Get all 'uniqueMember' values of group in LDAP. * * @param groupId group Id * @param voId vo Id * @return list of uniqueMember values */
Get all 'uniqueMember' values of group in LDAP
getAllUniqueMembersInGroup
{ "repo_name": "zlamalp/perun", "path": "perun-ldapc/src/main/java/cz/metacentrum/perun/ldapc/model/PerunGroup.java", "license": "bsd-2-clause", "size": 3486 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
125,823
EList<String> getVal7();
EList<String> getVal7();
/** * Returns the value of the '<em><b>Val7</b></em>' attribute list. * The list contents are of type {@link java.lang.String}. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Val7</em>' attribute list isn't clear, * there really should be more of a description here... * </p> * <!--...
Returns the value of the 'Val7' attribute list. The list contents are of type <code>java.lang.String</code>. If the meaning of the 'Val7' attribute list isn't clear, there really should be more of a description here...
getVal7
{ "repo_name": "miklossy/xtext-core", "path": "org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/serializer/sequencertest/AlternativeMultiplicities.java", "license": "epl-1.0", "size": 5361 }
[ "org.eclipse.emf.common.util.EList" ]
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.common.util.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,147,664
public Sequence getSequence(InputStream is) { try { if (!is.markSupported()) { is = new BufferedInputStream(is); } Sequence s = MidiSystem.getSequence(is); is.close(); return s; } catch (InvalidMidiDataException ex) { ex.printStackTrace(); return null; } catch (IOException e...
Sequence function(InputStream is) { try { if (!is.markSupported()) { is = new BufferedInputStream(is); } Sequence s = MidiSystem.getSequence(is); is.close(); return s; } catch (InvalidMidiDataException ex) { ex.printStackTrace(); return null; } catch (IOException ex) { ex.printStackTrace(); return null; } }
/** * Loads a sequence from an input stream. Returns null if an error occurs. */
Loads a sequence from an input stream. Returns null if an error occurs
getSequence
{ "repo_name": "NickLW/JamSS", "path": "src/uk/ac/brighton/jamss/MidiPlayer.java", "license": "epl-1.0", "size": 4026 }
[ "java.io.BufferedInputStream", "java.io.IOException", "java.io.InputStream", "javax.sound.midi.InvalidMidiDataException", "javax.sound.midi.MidiSystem", "javax.sound.midi.Sequence" ]
import java.io.BufferedInputStream; import java.io.IOException; import java.io.InputStream; import javax.sound.midi.InvalidMidiDataException; import javax.sound.midi.MidiSystem; import javax.sound.midi.Sequence;
import java.io.*; import javax.sound.midi.*;
[ "java.io", "javax.sound" ]
java.io; javax.sound;
1,286,175
static Implementation getImplementation( String baseName, String algorithm) throws NoSuchAlgorithmException { Provider[] prov = Security.getProviders(); // // search every provider looking for the algorithm we want. // for (int i = 0; i ...
static Implementation getImplementation( String baseName, String algorithm) throws NoSuchAlgorithmException { Provider[] prov = Security.getProviders(); { if (imp != null) { return imp; } try { imp = getImplementation(baseName, algorithm, prov[i]); } catch (NoSuchAlgorithmException e) { } } throw new NoSuchAlgorithmExc...
/** * return an implementation for a given algorithm/provider. * If the provider is null, we grab the first avalaible who has the required algorithm. */
return an implementation for a given algorithm/provider. If the provider is null, we grab the first avalaible who has the required algorithm
getImplementation
{ "repo_name": "xdv/ripple-lib-java", "path": "ripple-bouncycastle/src/main/java/org/ripple/bouncycastle/x509/X509Util.java", "license": "isc", "size": 15281 }
[ "java.security.NoSuchAlgorithmException", "java.security.Provider", "java.security.Security" ]
import java.security.NoSuchAlgorithmException; import java.security.Provider; import java.security.Security;
import java.security.*;
[ "java.security" ]
java.security;
1,462,371
@Test public void test_validateLoginPageFormAction_nullActionAttribute() { try { mockery.checking(new Expectations() { { one(form).getActionAttribute(); will(returnValue(null)); } }); try { ...
void function() { try { mockery.checking(new Expectations() { { one(form).getActionAttribute(); will(returnValue(null)); } }); try { utils.validateLoginPageFormAction(form); fail(STR); } catch (Exception e) { verifyException(e, STR + Constants.J_SECURITY_CHECK); } } catch (Throwable t) { outputMgr.failWithThrowable(tes...
/** * Tests: * - Form action attribute: null * Expects: * - Exception should be thrown saying the action attribute is null or doesn't match expected action value */
Tests: - Form action attribute: null Expects: - Exception should be thrown saying the action attribute is null or doesn't match expected action value
test_validateLoginPageFormAction_nullActionAttribute
{ "repo_name": "OpenLiberty/open-liberty", "path": "dev/com.ibm.ws.security.fat.common/test/com/ibm/ws/security/fat/common/web/WebFormUtilsTest.java", "license": "epl-1.0", "size": 26977 }
[ "com.ibm.ws.security.fat.common.Constants", "org.jmock.Expectations", "org.junit.Assert" ]
import com.ibm.ws.security.fat.common.Constants; import org.jmock.Expectations; import org.junit.Assert;
import com.ibm.ws.security.fat.common.*; import org.jmock.*; import org.junit.*;
[ "com.ibm.ws", "org.jmock", "org.junit" ]
com.ibm.ws; org.jmock; org.junit;
2,083,373
public final Property<ZonedDateTimeBean> startDate() { return metaBean().startDate().createProperty(this); }
final Property<ZonedDateTimeBean> function() { return metaBean().startDate().createProperty(this); }
/** * Gets the the {@code startDate} property. * @return the property, not null */
Gets the the startDate property
startDate
{ "repo_name": "McLeodMoores/starling", "path": "projects/master-db/src/main/java/com/opengamma/masterdb/security/hibernate/cds/CDSSecurityBean.java", "license": "apache-2.0", "size": 33407 }
[ "com.opengamma.masterdb.security.hibernate.ZonedDateTimeBean", "org.joda.beans.Property" ]
import com.opengamma.masterdb.security.hibernate.ZonedDateTimeBean; import org.joda.beans.Property;
import com.opengamma.masterdb.security.hibernate.*; import org.joda.beans.*;
[ "com.opengamma.masterdb", "org.joda.beans" ]
com.opengamma.masterdb; org.joda.beans;
2,813,944
@JsonIgnore @Value.Derived public SkylarkImport getLoadPath() { String label = getRawImportLabel(); try { return SkylarkImport.create(label); } catch (SkylarkImport.SkylarkImportSyntaxException e) { throw new HumanReadableException(e, "Invalid implicit label provided: %s", label); } ...
@Value.Derived SkylarkImport function() { String label = getRawImportLabel(); try { return SkylarkImport.create(label); } catch (SkylarkImport.SkylarkImportSyntaxException e) { throw new HumanReadableException(e, STR, label); } }
/** * Returns the load path for the given path. SkylarkImport is used to eagerly compute fewer * objects up front and centralize error handling */
Returns the load path for the given path. SkylarkImport is used to eagerly compute fewer objects up front and centralize error handling
getLoadPath
{ "repo_name": "facebook/buck", "path": "src/com/facebook/buck/parser/implicit/ImplicitInclude.java", "license": "apache-2.0", "size": 5697 }
[ "com.facebook.buck.core.exceptions.HumanReadableException", "com.google.devtools.build.lib.syntax.SkylarkImport", "org.immutables.value.Value" ]
import com.facebook.buck.core.exceptions.HumanReadableException; import com.google.devtools.build.lib.syntax.SkylarkImport; import org.immutables.value.Value;
import com.facebook.buck.core.exceptions.*; import com.google.devtools.build.lib.syntax.*; import org.immutables.value.*;
[ "com.facebook.buck", "com.google.devtools", "org.immutables.value" ]
com.facebook.buck; com.google.devtools; org.immutables.value;
1,766,385
public ConfigurationBuilder setProxy(Proxy proxy) { mConfiguration.setProxy(proxy); return this; }
ConfigurationBuilder function(Proxy proxy) { mConfiguration.setProxy(proxy); return this; }
/** * Sets the proxy server settings. * * @param proxy The proxy server settings to set. * @see #setProxyUser(String) * @see #setProxyPassword(String) * @see Proxy * @see URL#openConnection(Proxy) */
Sets the proxy server settings
setProxy
{ "repo_name": "aoq/http-client", "path": "http/src/com/aokyu/dev/http/HttpClient.java", "license": "mit", "size": 16610 }
[ "java.net.Proxy" ]
import java.net.Proxy;
import java.net.*;
[ "java.net" ]
java.net;
478,004
@Override public void afterCommit() { final Set<RMAuditNode> auditedNodes = TransactionalResourceHelper.getSet(KEY_RM_AUDIT_NODE_RECORDS);
void function() { final Set<RMAuditNode> auditedNodes = TransactionalResourceHelper.getSet(KEY_RM_AUDIT_NODE_RECORDS);
/** * Get the action parameters from the transaction and audit them. */
Get the action parameters from the transaction and audit them
afterCommit
{ "repo_name": "dnacreative/records-management", "path": "rm-server/source/java/org/alfresco/module/org_alfresco_module_rm/audit/RecordsManagementAuditServiceImpl.java", "license": "lgpl-3.0", "size": 68917 }
[ "java.util.Set", "org.alfresco.repo.transaction.TransactionalResourceHelper" ]
import java.util.Set; import org.alfresco.repo.transaction.TransactionalResourceHelper;
import java.util.*; import org.alfresco.repo.transaction.*;
[ "java.util", "org.alfresco.repo" ]
java.util; org.alfresco.repo;
1,696,482
private void verifyPasswords(Connection c) throws SQLException { int pwIdx; if (getPhase() == PH_HARD_UPGRADE) { // Expect configurable hash scheme with key stretching in fully // upgraded databases. pwIdx = 5; } else if (oldAtLeast(10, 6)) { ...
void function(Connection c) throws SQLException { int pwIdx; if (getPhase() == PH_HARD_UPGRADE) { pwIdx = 5; } else if (oldAtLeast(10, 6)) { pwIdx = 4; } else { pwIdx = 3; } PreparedStatement ps = c.prepareStatement( STR); for (int i = 0; i < USERS.length; i++) { String expectedToken = USERS[i][pwIdx]; ps.setString(1, ...
/** * Verify that all passwords for the users in {@code USERS} are stored * as expected. Raise an assert failure on mismatch. * * @param c a connection to the database */
Verify that all passwords for the users in USERS are stored as expected. Raise an assert failure on mismatch
verifyPasswords
{ "repo_name": "apache/derby", "path": "java/org.apache.derby.tests/org/apache/derbyTesting/functionTests/tests/upgradeTests/Changes10_9.java", "license": "apache-2.0", "size": 40962 }
[ "java.sql.Connection", "java.sql.PreparedStatement", "java.sql.SQLException", "org.apache.derbyTesting.junit.JDBC" ]
import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.SQLException; import org.apache.derbyTesting.junit.JDBC;
import java.sql.*; import org.apache.*;
[ "java.sql", "org.apache" ]
java.sql; org.apache;
2,410,522
private void checkChart(JFreeChart chart) { Plot plot = chart.getPlot(); if (!(plot instanceof PolarPlot)) { throw new IllegalArgumentException("plot is not a PolarPlot"); } }
void function(JFreeChart chart) { Plot plot = chart.getPlot(); if (!(plot instanceof PolarPlot)) { throw new IllegalArgumentException(STR); } }
/** * Test that the chart is using an xy plot with time as the domain axis. * * @param chart the chart. */
Test that the chart is using an xy plot with time as the domain axis
checkChart
{ "repo_name": "sebkur/JFreeChart", "path": "src/main/java/org/jfree/chart/PolarChartPanel.java", "license": "lgpl-3.0", "size": 8781 }
[ "org.jfree.chart.plot.Plot", "org.jfree.chart.plot.PolarPlot" ]
import org.jfree.chart.plot.Plot; import org.jfree.chart.plot.PolarPlot;
import org.jfree.chart.plot.*;
[ "org.jfree.chart" ]
org.jfree.chart;
1,698,224
private void addNodes(Way way) { addNodes(way.firstNode()); addNodes(way.lastNode()); }
void function(Way way) { addNodes(way.firstNode()); addNodes(way.lastNode()); }
/** * Add the endpoints of the way to nodes, outerNodes * * @param way a way whose endpoints are added */
Add the endpoints of the way to nodes, outerNodes
addNodes
{ "repo_name": "CURocketry/Ground_Station_GUI", "path": "src/org/openstreetmap/josm/actions/SelectNonBranchingWaySequences.java", "license": "gpl-3.0", "size": 4640 }
[ "org.openstreetmap.josm.data.osm.Way" ]
import org.openstreetmap.josm.data.osm.Way;
import org.openstreetmap.josm.data.osm.*;
[ "org.openstreetmap.josm" ]
org.openstreetmap.josm;
1,192,558
public CarbonReaderBuilder withFileLists(List fileLists) { if (null == this.fileLists) { this.fileLists = fileLists; } else { this.fileLists.addAll(fileLists); } return this; }
CarbonReaderBuilder function(List fileLists) { if (null == this.fileLists) { this.fileLists = fileLists; } else { this.fileLists.addAll(fileLists); } return this; }
/** * set carbondata file lists * * @param fileLists carbondata file lists * @return CarbonReaderBuilder object */
set carbondata file lists
withFileLists
{ "repo_name": "jackylk/incubator-carbondata", "path": "sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/CarbonReaderBuilder.java", "license": "apache-2.0", "size": 15338 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,441,298
public void close() { done.set( true ); if (queryThread != null) { queryThread.setDone(); } // interrupt the take, if any this.interrupt(); // give time for db to finish any writes int countdown = 30; while ( this.isAlive() && countdown > 0...
void function() { done.set( true ); if (queryThread != null) { queryThread.setDone(); } this.interrupt(); int countdown = 30; while ( this.isAlive() && countdown > 0 ) { MainActivity.info( STR + countdown ); MainActivity.sleep( 100L ); countdown--; this.interrupt(); } countdown = 50; while ( db != null && db.isOpen() &...
/** * close db, shut down thread */
close db, shut down thread
close
{ "repo_name": "alexws54tk/wigle-wifi-wardriving", "path": "wiglewifiwardriving/src/main/java/net/wigle/wigleandroid/DatabaseHelper.java", "license": "bsd-3-clause", "size": 47173 }
[ "android.database.sqlite.SQLiteException" ]
import android.database.sqlite.SQLiteException;
import android.database.sqlite.*;
[ "android.database" ]
android.database;
77,597
IRegion findEnclosingPeerCharacters(IDocument document, int offset, int length);
IRegion findEnclosingPeerCharacters(IDocument document, int offset, int length);
/** * Starting at the given selection, the matcher searches for a pair of enclosing peer characters * and if it finds one, returns the minimal region of the document that contains the pair. * * @param document the document to work on * @param offset the start offset * @param length the selection length whi...
Starting at the given selection, the matcher searches for a pair of enclosing peer characters and if it finds one, returns the minimal region of the document that contains the pair
findEnclosingPeerCharacters
{ "repo_name": "brunyuriy/quick-fix-scout", "path": "org.eclipse.jface.text_3.8.1.v20120828-155502/src/org/eclipse/jface/text/source/ICharacterPairMatcherExtension.java", "license": "mit", "size": 4019 }
[ "org.eclipse.jface.text.IDocument", "org.eclipse.jface.text.IRegion" ]
import org.eclipse.jface.text.IDocument; import org.eclipse.jface.text.IRegion;
import org.eclipse.jface.text.*;
[ "org.eclipse.jface" ]
org.eclipse.jface;
964,232
@Override public XmlStringBuilder toXML() { XmlStringBuilder xml = new XmlStringBuilder(this); xml.rightAngleBracket(); xml.element(child); xml.closeElement(this); return xml; }
XmlStringBuilder function() { XmlStringBuilder xml = new XmlStringBuilder(this); xml.rightAngleBracket(); xml.element(child); xml.closeElement(this); return xml; }
/** * Returns string containing xml representation of this object. * * @return xml representation of this object */
Returns string containing xml representation of this object
toXML
{ "repo_name": "esl/Smack", "path": "smack-experimental/src/main/java/org/jivesoftware/smackx/hoxt/packet/AbstractHttpOverXmpp.java", "license": "apache-2.0", "size": 9964 }
[ "org.jivesoftware.smack.util.XmlStringBuilder" ]
import org.jivesoftware.smack.util.XmlStringBuilder;
import org.jivesoftware.smack.util.*;
[ "org.jivesoftware.smack" ]
org.jivesoftware.smack;
2,317,220
protected int addRepeatOfPreviousCode() throws IOException { if (previousCode == -1) { // can't have a repeat for the very first code throw new IOException("The first code can't be a reference to its preceding code"); } byte firstCharacter = 0; for (int last =...
int function() throws IOException { if (previousCode == -1) { throw new IOException(STR); } byte firstCharacter = 0; for (int last = previousCode; last >= 0; last = prefixes[last]) { firstCharacter = characters[last]; } return addEntry(previousCode, firstCharacter); }
/** * Add entry for repeat of previousCode we haven't added, yet. */
Add entry for repeat of previousCode we haven't added, yet
addRepeatOfPreviousCode
{ "repo_name": "eugenegardner/tenXMEIPolisher", "path": "src/org/apache/commons/compress/compressors/z/_internal_/InternalLZWInputStream.java", "license": "gpl-3.0", "size": 6366 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,020,925
public void testForwardScans() throws Throwable { rep = null; try { ArrayList<CheckWireRecord> expected = setupLog(10 ); VLSN lastVLSN = expected.get(expected.size() - 1).getVLSN(); for (int readBufferSize = 100; readBufferS...
void function() throws Throwable { rep = null; try { ArrayList<CheckWireRecord> expected = setupLog(10 ); VLSN lastVLSN = expected.get(expected.size() - 1).getVLSN(); for (int readBufferSize = 100; readBufferSize < 2000; readBufferSize += 100) { for (int i = 1; i <= lastVLSN.getSequence(); i++) { checkForwardScan(check...
/** * Check that we can retrieve the correct results when doing forward * scans. Create a log, and start forward scans at each VLSN. (i.e. VLSN 1, * VLSN2, etc.) */
Check that we can retrieve the correct results when doing forward scans. Create a log, and start forward scans at each VLSN. (i.e. VLSN 1, VLSN2, etc.)
testForwardScans
{ "repo_name": "bjorndm/prebake", "path": "code/third_party/bdb/test/com/sleepycat/je/rep/stream/FeederReaderTest.java", "license": "apache-2.0", "size": 26925 }
[ "com.sleepycat.je.rep.stream.VLSNTestUtils", "java.util.ArrayList" ]
import com.sleepycat.je.rep.stream.VLSNTestUtils; import java.util.ArrayList;
import com.sleepycat.je.rep.stream.*; import java.util.*;
[ "com.sleepycat.je", "java.util" ]
com.sleepycat.je; java.util;
2,040,755
private boolean updateSupplicantServiceRequest() { clearSupplicantServiceRequest(); StringBuffer sb = new StringBuffer(); for (ClientInfo c: mClientInfoList.values()) { int key; WifiP2pServiceRequest req; for (int i=0; i < c.mReqList.size(); i++) { ...
boolean function() { clearSupplicantServiceRequest(); StringBuffer sb = new StringBuffer(); for (ClientInfo c: mClientInfoList.values()) { int key; WifiP2pServiceRequest req; for (int i=0; i < c.mReqList.size(); i++) { req = c.mReqList.valueAt(i); if (req != null) { sb.append(req.getSupplicantQuery()); } } } if (sb.len...
/** * Update service discovery request to wpa_supplicant. */
Update service discovery request to wpa_supplicant
updateSupplicantServiceRequest
{ "repo_name": "JSDemos/android-sdk-20", "path": "src/android/net/wifi/p2p/WifiP2pService.java", "license": "apache-2.0", "size": 127662 }
[ "android.net.wifi.p2p.nsd.WifiP2pServiceRequest" ]
import android.net.wifi.p2p.nsd.WifiP2pServiceRequest;
import android.net.wifi.p2p.nsd.*;
[ "android.net" ]
android.net;
1,043,864
Configuration conf = new HdfsConfiguration(); MiniDFSCluster cluster = null; // Set aside fifth of the total capacity as reserved long reserved = 10000; conf.setLong(DFSConfigKeys.DFS_DATANODE_DU_RESERVED_KEY, reserved); try { cluster = new MiniDFSCluster.Builder(conf).build(); clu...
Configuration conf = new HdfsConfiguration(); MiniDFSCluster cluster = null; long reserved = 10000; conf.setLong(DFSConfigKeys.DFS_DATANODE_DU_RESERVED_KEY, reserved); try { cluster = new MiniDFSCluster.Builder(conf).build(); cluster.waitActive(); final FSNamesystem namesystem = cluster.getNamesystem(); final DatanodeM...
/** * The following test first creates a file. * It verifies the block information from a datanode. * Then, it updates the block with new information and verifies again. */
The following test first creates a file. It verifies the block information from a datanode. Then, it updates the block with new information and verifies again
testVolumeSize
{ "repo_name": "steveloughran/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestNamenodeCapacityReport.java", "license": "apache-2.0", "size": 16544 }
[ "java.util.ArrayList", "java.util.List", "org.apache.hadoop.conf.Configuration", "org.apache.hadoop.fs.Path", "org.apache.hadoop.hdfs.DFSConfigKeys", "org.apache.hadoop.hdfs.DFSOutputStream", "org.apache.hadoop.hdfs.DFSUtilClient", "org.apache.hadoop.hdfs.DistributedFileSystem", "org.apache.hadoop.h...
import java.util.ArrayList; import java.util.List; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hdfs.DFSConfigKeys; import org.apache.hadoop.hdfs.DFSOutputStream; import org.apache.hadoop.hdfs.DFSUtilClient; import org.apache.hadoop.hdfs.DistributedFileSystem; ...
import java.util.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.hdfs.*; import org.apache.hadoop.hdfs.server.blockmanagement.*; import org.junit.*;
[ "java.util", "org.apache.hadoop", "org.junit" ]
java.util; org.apache.hadoop; org.junit;
1,652,677
@Test(expected = IllegalArgumentException.class) public void testGetProfile() { service.getProfile(null).execute(); }
@Test(expected = IllegalArgumentException.class) void function() { service.getProfile(null).execute(); }
/** * Test get profile. */
Test get profile
testGetProfile
{ "repo_name": "supunucsc/java-sdk", "path": "dialog/src/test/java/com/ibm/watson/developer_cloud/dialog/v1/DialogServiceIT.java", "license": "apache-2.0", "size": 7886 }
[ "org.junit.Test" ]
import org.junit.Test;
import org.junit.*;
[ "org.junit" ]
org.junit;
2,830,402
public File getIconFile(String studyUID, String seriesUID, String instanceUID, String rows, String columns) { File file = this._getIconFile( rows+"-"+columns, studyUID, seriesUID, instanceUID ); if ( file.exists() ) { file.setLastModified( System.currentTimeMillis() ); //set last modified because File has onl...
File function(String studyUID, String seriesUID, String instanceUID, String rows, String columns) { File file = this._getIconFile( rows+"-"+columns, studyUID, seriesUID, instanceUID ); if ( file.exists() ) { file.setLastModified( System.currentTimeMillis() ); return file; } else { return null; } }
/** * Get an icon of special size from cache. * <p> * This method use a image size (rows and columns) to search on a special path of this cache. * * @param studyUID Unique identifier of the study. * @param seriesUID Unique identifier of the series. * @param instanceUID Unique identifier of the instance...
Get an icon of special size from cache. This method use a image size (rows and columns) to search on a special path of this cache
getIconFile
{ "repo_name": "medicayun/medicayundicom", "path": "dcm4jboss-all/tags/DCM4JBOSS_2_3/dcm4jboss-wado/src/java/org/dcm4chex/wado/mbean/cache/IconCacheImpl.java", "license": "apache-2.0", "size": 12451 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
98,511
return (ArrayList<HDLVariableDeclaration>) ports.clone(); }
return (ArrayList<HDLVariableDeclaration>) ports.clone(); }
/** * Get the ports field. Can be <code>null</code>. * * @return a clone of the field. Will never return <code>null</code>. */
Get the ports field. Can be <code>null</code>
getPorts
{ "repo_name": "pshdl/org.pshdl", "path": "model-gen/org/pshdl/model/impl/AbstractHDLInterface.java", "license": "gpl-3.0", "size": 14633 }
[ "java.util.ArrayList", "org.pshdl.model.HDLVariableDeclaration" ]
import java.util.ArrayList; import org.pshdl.model.HDLVariableDeclaration;
import java.util.*; import org.pshdl.model.*;
[ "java.util", "org.pshdl.model" ]
java.util; org.pshdl.model;
290,584
public static String svgPathFix_mToM(String insideD) { Pattern p = Pattern.compile(group(fromMtoZsimplified)); Matcher m = p.matcher(insideD); StringBuffer sb = new StringBuffer(""); Float mVal1 = Float.NaN, mVal2 = Float.NaN; try { // for intense svgs, throughs java.lang.StackOverflowError whi...
static String function(String insideD) { Pattern p = Pattern.compile(group(fromMtoZsimplified)); Matcher m = p.matcher(insideD); StringBuffer sb = new StringBuffer(STRMSTRm ?STRM STR,STR l 0,0 STRsvgPathFix_mToM threw a StackOverflowError"); } return sb.toString(); }
/** * example: (draws 2 rectangles) * assertTrue(SVGconverter.svgPathFix_mToM("M 10,10 l 0,10 10,0 0,-10 z m 0,10 0,10 10,0 0,-10 z") .equals("M 10,10 l 0,10 10,0 0,-10 zM 10.0,20.0 l 0,0 0,10 10,0 0,-10 z")); */
example: (draws 2 rectangles) assertTrue(SVGconverter.svgPathFix_mToM("M 10,10 l 0,10 10,0 0,-10 z m 0,10 0,10 10,0 0,-10 z")
svgPathFix_mToM
{ "repo_name": "rbyte/InteractionTraces", "path": "src/matt/setup/SVGconverter.java", "license": "agpl-3.0", "size": 7912 }
[ "java.util.regex.Matcher", "java.util.regex.Pattern" ]
import java.util.regex.Matcher; import java.util.regex.Pattern;
import java.util.regex.*;
[ "java.util" ]
java.util;
2,268,467
@Test public void testNonConcurrentAccesses() { SimpleArrayMap<String, String> map = new SimpleArrayMap<>(); for (int i = 0; i < 100000; i++) { try { map.put(String.format(Locale.US, "key %d", i++), "B_DONT_DO_THAT"); if (i % 500 == 0) { ...
void function() { SimpleArrayMap<String, String> map = new SimpleArrayMap<>(); for (int i = 0; i < 100000; i++) { try { map.put(String.format(Locale.US, STR, i++), STR); if (i % 500 == 0) { map.clear(); } } catch (ConcurrentModificationException e) { System.err.println(STR); e.printStackTrace(); fail(); } } }
/** * Check to make sure the same operations behave as expected in a single thread. */
Check to make sure the same operations behave as expected in a single thread
testNonConcurrentAccesses
{ "repo_name": "AndroidX/androidx", "path": "collection/collection/src/jvmTest/java/androidx/collection/SimpleArrayMapTest.java", "license": "apache-2.0", "size": 14670 }
[ "java.util.ConcurrentModificationException", "java.util.Locale", "org.junit.Assert" ]
import java.util.ConcurrentModificationException; import java.util.Locale; import org.junit.Assert;
import java.util.*; import org.junit.*;
[ "java.util", "org.junit" ]
java.util; org.junit;
1,421,297
protected void appendValidationStatus(StringBuilder buf, List<String> errorMessages, boolean notifyIfSuccessful, int numLeftPaddingSpaces) { String padding = StringUtils.leftPad("", numLeftPaddingSpaces, ' '); if (notifyIfSuccessful || !errorMessages.isEmpty()) { buf.append("\n").ap...
void function(StringBuilder buf, List<String> errorMessages, boolean notifyIfSuccessful, int numLeftPaddingSpaces) { String padding = StringUtils.leftPad(STR\nSTRReported Errors:\nSTR----- NO ERRORS TO REPORT -----\nThis file will be processed by the accounting cycle.\nSTR\nSTR\nSTR----- THIS FILE WAS NOT PROCESSED AND...
/** * Appends the validation status message to a buffer * * @param buf a StringBuilder to append error messages to * @param errorMessages a List of error messages encountered in the Collector process * @param notifyIfSuccessful true if a special message for the process running successfully...
Appends the validation status message to a buffer
appendValidationStatus
{ "repo_name": "ua-eas/ua-kfs-5.3", "path": "work/src/org/kuali/kfs/gl/batch/service/impl/CollectorReportServiceImpl.java", "license": "agpl-3.0", "size": 41646 }
[ "java.util.List", "org.apache.commons.lang.StringUtils" ]
import java.util.List; import org.apache.commons.lang.StringUtils;
import java.util.*; import org.apache.commons.lang.*;
[ "java.util", "org.apache.commons" ]
java.util; org.apache.commons;
1,417,174
public void setConfiguration(Map<String, ?> configuration) { if (configuration != null) { this.configuration = new HashMap<String, Object>(configuration); } }
void function(Map<String, ?> configuration) { if (configuration != null) { this.configuration = new HashMap<String, Object>(configuration); } }
/** * This method is used for setting the Map with configuration values of the {@link Module}. Key - id of the * {@link ConfigDescriptionParameter} Value - * the value of the corresponding property * * @param configuration new configuration values. */
This method is used for setting the Map with configuration values of the <code>Module</code>. Key - id of the <code>ConfigDescriptionParameter</code> Value - the value of the corresponding property
setConfiguration
{ "repo_name": "marinmitev/smarthome", "path": "bundles/automation/org.eclipse.smarthome.automation.api/src/main/java/org/eclipse/smarthome/automation/Module.java", "license": "epl-1.0", "size": 4972 }
[ "java.util.HashMap", "java.util.Map" ]
import java.util.HashMap; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
297
public static void reNameAllFileInDirectory(String path, String from, String to) { File f = new File(path); File[] fs = f.listFiles(); for (int i = 0; i < fs.length; ++i) { File fileTemp = fs[i]; if (fileTemp.isDirectory()) { reNameAllFileInDirectory(f...
static void function(String path, String from, String to) { File f = new File(path); File[] fs = f.listFiles(); for (int i = 0; i < fs.length; ++i) { File fileTemp = fs[i]; if (fileTemp.isDirectory()) { reNameAllFileInDirectory(fileTemp.getPath(), from, to); } else { String name = fileTemp.getName(); if (name.endsWith(...
/** * modified all file extension in folder * * @param path folder path * @param from The original extension (included '.') * @param to Suffix after the change (included '.') */
modified all file extension in folder
reNameAllFileInDirectory
{ "repo_name": "ChinaSunHZ/ProjectUtils", "path": "app/src/main/java/com/sunhz/projectutils/fileutils/FileUtils.java", "license": "apache-2.0", "size": 24009 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
2,165,712
public static String encodeValue(String segment, String[] encoding) { ArrayList<String> params = new ArrayList<String>(); boolean foundParam = false; StringBuffer newSegment = new StringBuffer(); if (savePathParams(segment, newSegment, params)) { foundParam = true; ...
static String function(String segment, String[] encoding) { ArrayList<String> params = new ArrayList<String>(); boolean foundParam = false; StringBuffer newSegment = new StringBuffer(); if (savePathParams(segment, newSegment, params)) { foundParam = true; segment = newSegment.toString(); } String result = encodeFromArr...
/** * Keep encoded values "%..." and template parameters intact i.e. "{x}" */
Keep encoded values "%..." and template parameters intact i.e. "{x}"
encodeValue
{ "repo_name": "mwunderlich/dkpro-lab", "path": "dkpro-lab-core/src/main/java/de/tudarmstadt/ukp/dkpro/lab/resteasy/Encode.java", "license": "apache-2.0", "size": 15200 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
1,245,641
@DoesServiceRequest public final void delete() throws StorageException, URISyntaxException { this.delete(null , null , null ); }
final void function() throws StorageException, URISyntaxException { this.delete(null , null , null ); }
/** * Deletes the file. * * @throws StorageException * If a storage service error occurred. * @throws URISyntaxException */
Deletes the file
delete
{ "repo_name": "Azure/azure-storage-android", "path": "microsoft-azure-storage/src/com/microsoft/azure/storage/file/CloudFile.java", "license": "apache-2.0", "size": 138711 }
[ "com.microsoft.azure.storage.StorageException", "java.net.URISyntaxException" ]
import com.microsoft.azure.storage.StorageException; import java.net.URISyntaxException;
import com.microsoft.azure.storage.*; import java.net.*;
[ "com.microsoft.azure", "java.net" ]
com.microsoft.azure; java.net;
1,610,073
protected void doHead(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // Process request without content. processRequest(request, response, false); }
void function(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response, false); }
/** * Process HEAD request. This returns the same headers as GET request, but without content. * @see HttpServlet#doHead(HttpServletRequest, HttpServletResponse). */
Process HEAD request. This returns the same headers as GET request, but without content
doHead
{ "repo_name": "credentials/irma_web_service", "path": "src/org/irmacard/web/fileserver/IRMATubeFileServlet.java", "license": "gpl-3.0", "size": 24413 }
[ "java.io.IOException", "javax.servlet.ServletException", "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse" ]
import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse;
import java.io.*; import javax.servlet.*; import javax.servlet.http.*;
[ "java.io", "javax.servlet" ]
java.io; javax.servlet;
444,765
@Override protected void fall(float p_70069_1_) { if (this.field_145809_g) { int i = MathHelper.ceiling_float_int(p_70069_1_ - 1.0F); if (i > 0) { ArrayList arraylist = new ArrayList(this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.boundingBox)); boolean flag = this.blo...
void function(float p_70069_1_) { if (this.field_145809_g) { int i = MathHelper.ceiling_float_int(p_70069_1_ - 1.0F); if (i > 0) { ArrayList arraylist = new ArrayList(this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.boundingBox)); boolean flag = this.block == Blocks.anvil; DamageSource damagesource = flag ...
/** * Called when the mob is falling. Calculates and applies fall damage. */
Called when the mob is falling. Calculates and applies fall damage
fall
{ "repo_name": "lipki/TFCNT", "path": "src/Common/com/bioxx/tfc/Entities/EntityFallingBlockTFC.java", "license": "gpl-3.0", "size": 10864 }
[ "java.util.ArrayList", "java.util.Iterator", "net.minecraft.entity.Entity", "net.minecraft.init.Blocks", "net.minecraft.util.DamageSource", "net.minecraft.util.MathHelper" ]
import java.util.ArrayList; import java.util.Iterator; import net.minecraft.entity.Entity; import net.minecraft.init.Blocks; import net.minecraft.util.DamageSource; import net.minecraft.util.MathHelper;
import java.util.*; import net.minecraft.entity.*; import net.minecraft.init.*; import net.minecraft.util.*;
[ "java.util", "net.minecraft.entity", "net.minecraft.init", "net.minecraft.util" ]
java.util; net.minecraft.entity; net.minecraft.init; net.minecraft.util;
215,336
public static void pushViewer(iViewer v, iTarget t, boolean disposible, Runnable popRunner) { WindowViewer w = Platform.getWindowViewer(); ActionBar ab = w.getActionBar(); if (popRunner != null) { v.setAttribute(POP_RUNNER_STACKENTRY_PROPERTY, popRunner); } if (actionbarIcon.getBacks()...
static void function(iViewer v, iTarget t, boolean disposible, Runnable popRunner) { WindowViewer w = Platform.getWindowViewer(); ActionBar ab = w.getActionBar(); if (popRunner != null) { v.setAttribute(POP_RUNNER_STACKENTRY_PROPERTY, popRunner); } if (actionbarIcon.getBacks() == 0) { if (UIScreen.isLargeScreen() && (t...
/** * Displays a new viewer in the specified target while saving the previous viewer * * @param v * the viewer * @param t the target for the viewer * @param disposible * true if the specified can be disposed when not being displayed; * false otherwise * * @param ...
Displays a new viewer in the specified target while saving the previous viewer
pushViewer
{ "repo_name": "sparseware/ccp-bellavista", "path": "shared/com/sparseware/bellavista/Utils.java", "license": "apache-2.0", "size": 94355 }
[ "com.appnativa.rare.Platform", "com.appnativa.rare.ui.ActionBar", "com.appnativa.rare.ui.UIScreen", "com.appnativa.rare.viewer.WindowViewer" ]
import com.appnativa.rare.Platform; import com.appnativa.rare.ui.ActionBar; import com.appnativa.rare.ui.UIScreen; import com.appnativa.rare.viewer.WindowViewer;
import com.appnativa.rare.*; import com.appnativa.rare.ui.*; import com.appnativa.rare.viewer.*;
[ "com.appnativa.rare" ]
com.appnativa.rare;
2,767,071
// <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code."> @Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); ...
void function(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); }
/** * Handles the HTTP <code>GET</code> method. * * @param request servlet request * @param response servlet response * @throws ServletException if a servlet-specific error occurs * @throws IOException if an I/O error occurs */
Handles the HTTP <code>GET</code> method
doGet
{ "repo_name": "sigurdtk/teamofa", "path": "Sprint1/slit-sprint-1/newServlet.java", "license": "gpl-3.0", "size": 3087 }
[ "java.io.IOException", "javax.servlet.ServletException", "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse" ]
import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse;
import java.io.*; import javax.servlet.*; import javax.servlet.http.*;
[ "java.io", "javax.servlet" ]
java.io; javax.servlet;
76,661
@Generated @ServiceMethod(returns = ReturnType.SINGLE) public Mono<Response<Void>> cancelPipelineRunWithResponse(String runId, Boolean isRecursive) { return this.serviceClient.cancelPipelineRunWithResponseAsync(runId, isRecursive); }
@ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<Void>> function(String runId, Boolean isRecursive) { return this.serviceClient.cancelPipelineRunWithResponseAsync(runId, isRecursive); }
/** * Cancel a pipeline run by its run ID. * * @param runId The pipeline run identifier. * @param isRecursive If true, cancel all the Child pipelines that are triggered by the current pipeline. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws CloudErro...
Cancel a pipeline run by its run ID
cancelPipelineRunWithResponse
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/synapse/azure-analytics-synapse-artifacts/src/main/java/com/azure/analytics/synapse/artifacts/PipelineRunAsyncClient.java", "license": "mit", "size": 8740 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.Response" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*;
[ "com.azure.core" ]
com.azure.core;
2,399,455
private CharStream getCharStreamWithLurk( InputSource source ) throws CSSException, IOException { if ( source.getCharacterStream() != null ) { // all encoding are supposed to be resolved by the user // return the reader return new Generic_CharStream( source.getCharacterStream(), 1, 1 ); ...
CharStream function( InputSource source ) throws CSSException, IOException { if ( source.getCharacterStream() != null ) { return new Generic_CharStream( source.getCharacterStream(), 1, 1 ); } else if ( source.getByteStream() == null ) { try { source.setByteStream( new URL( source.getURI() ).openStream() ); } catch ( Ex...
/** * Convert the source into a CharStream with encoding informations. The encoding can be found in the InputSource * or in * the CSS document. Since this method marks the reader and make a reset after looking for the charset declaration, * you'll find the charset declaration into the stream. */
Convert the source into a CharStream with encoding informations. The encoding can be found in the InputSource or in the CSS document. Since this method marks the reader and make a reset after looking for the charset declaration, you'll find the charset declaration into the stream
getCharStreamWithLurk
{ "repo_name": "EgorZhuk/pentaho-reporting", "path": "libraries/flute/src/main/java/org/w3c/flute/parser/Parser.java", "license": "lgpl-2.1", "size": 111660 }
[ "java.io.BufferedInputStream", "java.io.FileInputStream", "java.io.IOException", "java.io.InputStream", "java.io.InputStreamReader", "org.w3c.css.sac.CSSException", "org.w3c.css.sac.InputSource", "org.w3c.flute.util.Encoding" ]
import java.io.BufferedInputStream; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import org.w3c.css.sac.CSSException; import org.w3c.css.sac.InputSource; import org.w3c.flute.util.Encoding;
import java.io.*; import org.w3c.css.sac.*; import org.w3c.flute.util.*;
[ "java.io", "org.w3c.css", "org.w3c.flute" ]
java.io; org.w3c.css; org.w3c.flute;
466,867
public int nextToken(int start, int bound) { int pos = scanForward(start, bound, _nonWSDefaultPart); if (pos == NOT_FOUND) { return TokenEOF; } _pos++; if (Character.isJavaIdentifierPart(_char)) { // assume an ident or keyword int from = ...
int function(int start, int bound) { int pos = scanForward(start, bound, _nonWSDefaultPart); if (pos == NOT_FOUND) { return TokenEOF; } _pos++; if (Character.isJavaIdentifierPart(_char)) { int from = pos, to; pos = scanForward(pos + 1, bound, _nonIdent); if (pos == NOT_FOUND) { to = bound == UNBOUND ? _document.getLeng...
/** * Returns the next token in forward direction, starting at <code>start</code>, and not extending further than * <code>bound</code>. The return value is one of the constants defined in {@link SQLIndentSymbols}. After a call, * {@link #getPosition()}will return the position just after the scanned token...
Returns the next token in forward direction, starting at <code>start</code>, and not extending further than <code>bound</code>. The return value is one of the constants defined in <code>SQLIndentSymbols</code>. After a call, <code>#getPosition()</code>will return the position just after the scanned token (i.e. the next...
nextToken
{ "repo_name": "AndrewKhitrin/dbeaver", "path": "plugins/org.jkiss.dbeaver.ui.editors.sql/src/org/jkiss/dbeaver/ui/editors/sql/indent/SQLHeuristicScanner.java", "license": "apache-2.0", "size": 17859 }
[ "org.eclipse.jface.text.BadLocationException" ]
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.*;
[ "org.eclipse.jface" ]
org.eclipse.jface;
1,251,082
private TestableKinesisSupervisor getTestableSupervisorCustomIsTaskCurrent( int replicas, int taskCount, boolean useEarliestOffset, String duration, Period lateMessageRejectionPeriod, Period earlyMessageRejectionPeriod, boolean suspended, Integer recordsPerFetch, ...
TestableKinesisSupervisor function( int replicas, int taskCount, boolean useEarliestOffset, String duration, Period lateMessageRejectionPeriod, Period earlyMessageRejectionPeriod, boolean suspended, Integer recordsPerFetch, Integer fetchDelayMillis, boolean isTaskCurrentReturn ) { KinesisSupervisorIOConfig kinesisSuper...
/** * Use when you want to mock the return value of SeekableStreamSupervisor#isTaskCurrent() */
Use when you want to mock the return value of SeekableStreamSupervisor#isTaskCurrent()
getTestableSupervisorCustomIsTaskCurrent
{ "repo_name": "michaelschiff/druid", "path": "extensions-core/kinesis-indexing-service/src/test/java/org/apache/druid/indexing/kinesis/supervisor/KinesisSupervisorTest.java", "license": "apache-2.0", "size": 179674 }
[ "org.joda.time.Period" ]
import org.joda.time.Period;
import org.joda.time.*;
[ "org.joda.time" ]
org.joda.time;
514,552
public void exportProject(File file) throws FileNotFoundException, VdioException { ProductsExporter exporter = new ProductsExporter(); exporter.write(project, file); }
void function(File file) throws FileNotFoundException, VdioException { ProductsExporter exporter = new ProductsExporter(); exporter.write(project, file); }
/** * Export the project to a file. * * @param file - the file to export to * * @throws VdioException * @throws FileNotFoundException */
Export the project to a file
exportProject
{ "repo_name": "selfbus/development-tools-incubation", "path": "sbtools-products-editor/src/main/java/org/selfbus/sbtools/prodedit/model/ProjectService.java", "license": "gpl-3.0", "size": 10761 }
[ "java.io.File", "java.io.FileNotFoundException", "org.selfbus.sbtools.prodedit.vdio.ProductsExporter", "org.selfbus.sbtools.vdio.VdioException" ]
import java.io.File; import java.io.FileNotFoundException; import org.selfbus.sbtools.prodedit.vdio.ProductsExporter; import org.selfbus.sbtools.vdio.VdioException;
import java.io.*; import org.selfbus.sbtools.prodedit.vdio.*; import org.selfbus.sbtools.vdio.*;
[ "java.io", "org.selfbus.sbtools" ]
java.io; org.selfbus.sbtools;
2,318,335
public boolean execute(String action, JSONArray args, final CallbackContext callbackContext) throws JSONException { this.callbackContext = callbackContext; this.executeArgs = args; if (android.os.Build.VERSION.RELEASE.startsWith("1.")) { callbackContex...
boolean function(String action, JSONArray args, final CallbackContext callbackContext) throws JSONException { this.callbackContext = callbackContext; this.executeArgs = args; if (android.os.Build.VERSION.RELEASE.startsWith("1.")) { callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.ERROR, ContactMana...
/** * Executes the request and returns PluginResult. * * @param action The action to execute. * @param args JSONArray of arguments for the plugin. * @param callbackContext The callback context used when calling back into JavaScript. * @return True...
Executes the request and returns PluginResult
execute
{ "repo_name": "evernym/cordova-plugin-contacts", "path": "src/android/ContactManager.java", "license": "apache-2.0", "size": 8101 }
[ "org.apache.cordova.CallbackContext", "org.apache.cordova.PluginResult", "org.json.JSONArray", "org.json.JSONException" ]
import org.apache.cordova.CallbackContext; import org.apache.cordova.PluginResult; import org.json.JSONArray; import org.json.JSONException;
import org.apache.cordova.*; import org.json.*;
[ "org.apache.cordova", "org.json" ]
org.apache.cordova; org.json;
1,543,082
public ResponseEntity<List<BussLine>> getRoute(@RequestParam(required=false) String lat, @RequestParam(required=false) String lng, @RequestParam(required=false) String distance) { //TODO filter the open data here and do the distance calculations. return new ResponseEntity<List<BussLine>>(Busdata.get...
ResponseEntity<List<BussLine>> function(@RequestParam(required=false) String lat, @RequestParam(required=false) String lng, @RequestParam(required=false) String distance) { return new ResponseEntity<List<BussLine>>(Busdata.getData(), HttpStatus.OK); }
/** * GET /routes/:id -> get the "id" route. */
GET /routes/:id -> get the "id" route
getRoute
{ "repo_name": "arhs-cube-gameofcode/gameofcode", "path": "src/main/java/com/arhs/cube/thats/my/spot/web/rest/RouteResource.java", "license": "apache-2.0", "size": 1279 }
[ "com.arhs.cube.thats.my.spot.data.Busdata", "com.arhs.cube.thats.my.spot.domain.BussLine", "java.util.List", "org.springframework.http.HttpStatus", "org.springframework.http.ResponseEntity", "org.springframework.web.bind.annotation.RequestParam" ]
import com.arhs.cube.thats.my.spot.data.Busdata; import com.arhs.cube.thats.my.spot.domain.BussLine; import java.util.List; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.RequestParam;
import com.arhs.cube.thats.my.spot.data.*; import com.arhs.cube.thats.my.spot.domain.*; import java.util.*; import org.springframework.http.*; import org.springframework.web.bind.annotation.*;
[ "com.arhs.cube", "java.util", "org.springframework.http", "org.springframework.web" ]
com.arhs.cube; java.util; org.springframework.http; org.springframework.web;
1,241,342
public Set<DistalDendrite> getLearningSegments() { return learningSegments; }
Set<DistalDendrite> function() { return learningSegments; }
/** * Returns the Set of learning {@link DistalDendrite}s * @return */
Returns the Set of learning <code>DistalDendrite</code>s
getLearningSegments
{ "repo_name": "hgulcan/badr_htm", "path": "src/main/java/org/numenta/nupic/Connections.java", "license": "agpl-3.0", "size": 51299 }
[ "java.util.Set", "org.numenta.nupic.model.DistalDendrite" ]
import java.util.Set; import org.numenta.nupic.model.DistalDendrite;
import java.util.*; import org.numenta.nupic.model.*;
[ "java.util", "org.numenta.nupic" ]
java.util; org.numenta.nupic;
2,106,868
public static int getAxisFromStep( Compiler compiler, int stepOpCodePos) throws javax.xml.transform.TransformerException { int stepType = compiler.getOp(stepOpCodePos); switch (stepType) { case OpCodes.FROM_FOLLOWING : return Axis.FOLLOWING; case OpCodes.FROM_FOLLOW...
static int function( Compiler compiler, int stepOpCodePos) throws javax.xml.transform.TransformerException { int stepType = compiler.getOp(stepOpCodePos); switch (stepType) { case OpCodes.FROM_FOLLOWING : return Axis.FOLLOWING; case OpCodes.FROM_FOLLOWING_SIBLINGS : return Axis.FOLLOWINGSIBLING; case OpCodes.FROM_PRECE...
/** * Special purpose function to see if we can optimize the pattern for * a DescendantIterator. * * @param compiler non-null reference to compiler object that has processed * the XPath operations into an opcode map. * @param stepOpCodePos The opcode position for the step. * * @r...
Special purpose function to see if we can optimize the pattern for a DescendantIterator
getAxisFromStep
{ "repo_name": "md-5/jdk10", "path": "src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/WalkerFactory.java", "license": "gpl-2.0", "size": 60289 }
[ "com.sun.org.apache.xalan.internal.res.XSLMessages", "com.sun.org.apache.xml.internal.dtm.Axis", "com.sun.org.apache.xpath.internal.compiler.Compiler", "com.sun.org.apache.xpath.internal.compiler.OpCodes", "com.sun.org.apache.xpath.internal.res.XPATHErrorResources" ]
import com.sun.org.apache.xalan.internal.res.XSLMessages; import com.sun.org.apache.xml.internal.dtm.Axis; import com.sun.org.apache.xpath.internal.compiler.Compiler; import com.sun.org.apache.xpath.internal.compiler.OpCodes; import com.sun.org.apache.xpath.internal.res.XPATHErrorResources;
import com.sun.org.apache.xalan.internal.res.*; import com.sun.org.apache.xml.internal.dtm.*; import com.sun.org.apache.xpath.internal.compiler.*; import com.sun.org.apache.xpath.internal.res.*;
[ "com.sun.org" ]
com.sun.org;
2,413,539
public boolean isBundleOfBaseInstallation(String bundleID) { if (bundleID!=null && bundleID.isEmpty()==false) { ArrayList<String> featuresOfBundle = this.getFeaturesOfBundle(bundleID); if (featuresOfBundle!=null && featuresOfBundle.size()>0) { for (String featureID : this.getFeaturesOfBundle(bundleID...
boolean function(String bundleID) { if (bundleID!=null && bundleID.isEmpty()==false) { ArrayList<String> featuresOfBundle = this.getFeaturesOfBundle(bundleID); if (featuresOfBundle!=null && featuresOfBundle.size()>0) { for (String featureID : this.getFeaturesOfBundle(bundleID)) { if (this.isFeatureOfBaseInstallation(fe...
/** * Checks if the specified bundle is part of the base installation. * * @param bundleID the bundle ID * @return true, if is bundle of base installation */
Checks if the specified bundle is part of the base installation
isBundleOfBaseInstallation
{ "repo_name": "EnFlexIT/AgentWorkbench", "path": "eclipseProjects/org.agentgui/bundles/de.enflexit.common/src/de/enflexit/common/featureEvaluation/FeatureEvaluator.java", "license": "lgpl-2.1", "size": 22592 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
876,838