repo
stringlengths
7
59
path
stringlengths
3
222
func_name
stringlengths
3
127
original_string
stringlengths
0
466k
language
stringclasses
1 value
code
stringlengths
0
466k
code_tokens
listlengths
0
68.3k
docstring
stringlengths
0
21.3k
docstring_tokens
listlengths
0
1.93k
sha
stringlengths
0
40
url
stringlengths
0
339
partition
stringclasses
3 values
summary
stringlengths
0
250
instruction
stringlengths
38
3.13k
input
stringclasses
1 value
output
stringlengths
146
466k
atomix/atomix
protocols/raft/src/main/java/io/atomix/protocols/raft/impl/RaftServiceManager.java
RaftServiceManager.applyQuery
private CompletableFuture<OperationResult> applyQuery(Indexed<QueryEntry> entry) { RaftSession session = raft.getSessions().getSession(entry.entry().session()); // If the session is null then that indicates that the session already timed out or it never existed. // Return with an UnknownSessionException. ...
java
private CompletableFuture<OperationResult> applyQuery(Indexed<QueryEntry> entry) { RaftSession session = raft.getSessions().getSession(entry.entry().session()); // If the session is null then that indicates that the session already timed out or it never existed. // Return with an UnknownSessionException. ...
[ "private", "CompletableFuture", "<", "OperationResult", ">", "applyQuery", "(", "Indexed", "<", "QueryEntry", ">", "entry", ")", "{", "RaftSession", "session", "=", "raft", ".", "getSessions", "(", ")", ".", "getSession", "(", "entry", ".", "entry", "(", ")"...
Applies a query entry to the state machine. <p> Query entries are applied to the user {@link PrimitiveService} for read-only operations. Because queries are read-only, they may only be applied on a single server in the cluster, and query entries do not go through the Raft log. Thus, it is critical that measures be take...
[ "Applies", "a", "query", "entry", "to", "the", "state", "machine", ".", "<p", ">", "Query", "entries", "are", "applied", "to", "the", "user", "{" ]
3a94b7c80576d762dd0d396d4645df07a0b37c31
https://github.com/atomix/atomix/blob/3a94b7c80576d762dd0d396d4645df07a0b37c31/protocols/raft/src/main/java/io/atomix/protocols/raft/impl/RaftServiceManager.java#L832-L850
train
Apply a query to the state machine.
Create a Java method that does the following: "Apply a query to the state machine.".
Of course, here is the Java code you requested: ```java private CompletableFuture<OperationResult> applyQuery(Indexed<QueryEntry> entry) { RaftSession session = raft.getSessions().getSession(entry.entry().session()); // If the session is null then that indicates that the session already timed out or it never ...
eclipse/xtext-core
org.eclipse.xtext.xtext.generator/xtend-gen/org/eclipse/xtext/xtext/generator/model/ManifestAccess.java
ManifestAccess.merge
public boolean merge(final ManifestAccess other) { boolean _xblockexpression = false; { String _path = this.getPath(); String _path_1 = other.getPath(); boolean _notEquals = (!Objects.equal(_path, _path_1)); if (_notEquals) { String _path_2 = this.getPath(); String _plus ...
java
public boolean merge(final ManifestAccess other) { boolean _xblockexpression = false; { String _path = this.getPath(); String _path_1 = other.getPath(); boolean _notEquals = (!Objects.equal(_path, _path_1)); if (_notEquals) { String _path_2 = this.getPath(); String _plus ...
[ "public", "boolean", "merge", "(", "final", "ManifestAccess", "other", ")", "{", "boolean", "_xblockexpression", "=", "false", ";", "{", "String", "_path", "=", "this", ".", "getPath", "(", ")", ";", "String", "_path_1", "=", "other", ".", "getPath", "(", ...
Merge the contents of the given manifest into this one.
[ "Merge", "the", "contents", "of", "the", "given", "manifest", "into", "this", "one", "." ]
bac941cb75cb24706519845ec174cfef874d7557
https://github.com/eclipse/xtext-core/blob/bac941cb75cb24706519845ec174cfef874d7557/org.eclipse.xtext.xtext.generator/xtend-gen/org/eclipse/xtext/xtext/generator/model/ManifestAccess.java#L66-L125
train
Merge two ManifestAccess objects into this one.
Create a Java method that does the following: "Merge two ManifestAccess objects into this one.".
Of course, here is the Java code you requested: ```java public boolean merge(final ManifestAccess other) { boolean _xblockexpression = false; { String _path = this.getPath(); String _path_1 = other.getPath(); boolean _notEquals = (!Objects.equal(_path, _path_1)); if (_notEquals) { ...
Azure/azure-sdk-for-java
mediaservices/data-plane/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/DefaultEntityTypeActionOperation.java
DefaultEntityTypeActionOperation.addQueryParameter
@Override public DefaultEntityTypeActionOperation<T> addQueryParameter(String key, String value) { this.queryParameters.add(key, value); return this; }
java
@Override public DefaultEntityTypeActionOperation<T> addQueryParameter(String key, String value) { this.queryParameters.add(key, value); return this; }
[ "@", "Override", "public", "DefaultEntityTypeActionOperation", "<", "T", ">", "addQueryParameter", "(", "String", "key", ",", "String", "value", ")", "{", "this", ".", "queryParameters", ".", "add", "(", "key", ",", "value", ")", ";", "return", "this", ";", ...
/* (non-Javadoc) @see com.microsoft.windowsazure.services.media.entityoperations. EntityTypeActionOperation#addQueryParameter(java.lang.String, java.lang.String)
[ "/", "*", "(", "non", "-", "Javadoc", ")" ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/mediaservices/data-plane/src/main/java/com/microsoft/windowsazure/services/media/entityoperations/DefaultEntityTypeActionOperation.java#L184-L189
train
Add a query parameter to the operation.
Create a Java method that does the following: "Add a query parameter to the operation.".
Of course, here is the Java code you requested: ```java @Override public DefaultEntityTypeActionOperation<T> addQueryParameter(String key, String value) { this.queryParameters.add(key, value); return this; } ``` Hope this helps!
savoirtech/hecate
pojo/src/main/java/com/savoirtech/hecate/pojo/dao/listener/CreateSchemaListener.java
CreateSchemaListener.pojoDaoCreated
@Override public <P> void pojoDaoCreated(PojoDaoFactoryEvent<P> event) { Schema schema = new Schema(); event.getPojoBinding().describe(schema.createTable(event.getTableName()), schema); List<SchemaStatement> statements = schema.items().map(SchemaItem::createStatement).collect(Collectors.toLi...
java
@Override public <P> void pojoDaoCreated(PojoDaoFactoryEvent<P> event) { Schema schema = new Schema(); event.getPojoBinding().describe(schema.createTable(event.getTableName()), schema); List<SchemaStatement> statements = schema.items().map(SchemaItem::createStatement).collect(Collectors.toLi...
[ "@", "Override", "public", "<", "P", ">", "void", "pojoDaoCreated", "(", "PojoDaoFactoryEvent", "<", "P", ">", "event", ")", "{", "Schema", "schema", "=", "new", "Schema", "(", ")", ";", "event", ".", "getPojoBinding", "(", ")", ".", "describe", "(", "...
----------------------------------------------------------------------------------------------------------------------
[ "----------------------------------------------------------------------------------------------------------------------" ]
74e6fd15805fb441f0b5af00ccf963385fbfdee6
https://github.com/savoirtech/hecate/blob/74e6fd15805fb441f0b5af00ccf963385fbfdee6/pojo/src/main/java/com/savoirtech/hecate/pojo/dao/listener/CreateSchemaListener.java#L52-L61
train
This method is called when a pojo dao is created.
Create a Java method that does the following: "This method is called when a pojo dao is created.".
Of course, here is the Java code you requested: ```java @Override public <P> void pojoDaoCreated(PojoDaoFactoryEvent<P> event) { Schema schema = new Schema(); event.getPojoBinding().describe(schema.createTable(event.getTableName()), schema); List<SchemaStatement> statements = schema.items()...
BigBadaboom/androidsvg
androidsvg/src/main/java/com/caverock/androidsvg/SVGAndroidRenderer.java
SVGAndroidRenderer.makePathAndBoundingBox
private Path makePathAndBoundingBox(Line obj) { float x1 = (obj.x1 == null) ? 0 : obj.x1.floatValueX(this); float y1 = (obj.y1 == null) ? 0 : obj.y1.floatValueY(this); float x2 = (obj.x2 == null) ? 0 : obj.x2.floatValueX(this); float y2 = (obj.y2 == null) ? 0 : obj.y2.floatValueY(this);...
java
private Path makePathAndBoundingBox(Line obj) { float x1 = (obj.x1 == null) ? 0 : obj.x1.floatValueX(this); float y1 = (obj.y1 == null) ? 0 : obj.y1.floatValueY(this); float x2 = (obj.x2 == null) ? 0 : obj.x2.floatValueX(this); float y2 = (obj.y2 == null) ? 0 : obj.y2.floatValueY(this);...
[ "private", "Path", "makePathAndBoundingBox", "(", "Line", "obj", ")", "{", "float", "x1", "=", "(", "obj", ".", "x1", "==", "null", ")", "?", "0", ":", "obj", ".", "x1", ".", "floatValueX", "(", "this", ")", ";", "float", "y1", "=", "(", "obj", "...
==============================================================================
[ "==============================================================================" ]
0d1614dd1a4da10ea4afe3b0cea1361a4ac6b45a
https://github.com/BigBadaboom/androidsvg/blob/0d1614dd1a4da10ea4afe3b0cea1361a4ac6b45a/androidsvg/src/main/java/com/caverock/androidsvg/SVGAndroidRenderer.java#L4152-L4167
train
Create a Path object and the bounding box.
Create a Java method that does the following: "Create a Path object and the bounding box.".
Of course, here is the Java code you requested: ```java private Path makePathAndBoundingBox(Line obj) { float x1 = (obj.x1 == null) ? 0 : obj.x1.floatValueX(this); float y1 = (obj.y1 == null) ? 0 : obj.y1.floatValueY(this); float x2 = (obj.x2 == null) ? 0 : obj.x2.floatValueX(this); fl...
voldemort/voldemort
src/java/voldemort/store/readonly/chunk/ChunkedFileSet.java
ChunkedFileSet.reset
private void reset() { this.numChunks = 0; this.baseDir = null; this.indexFileSizes.clear(); this.dataFileSizes.clear(); this.fileNames.clear(); this.indexFiles.clear(); this.mappedIndexFileReader.clear(); this.dataFiles.clear(); this.chunkIdToChu...
java
private void reset() { this.numChunks = 0; this.baseDir = null; this.indexFileSizes.clear(); this.dataFileSizes.clear(); this.fileNames.clear(); this.indexFiles.clear(); this.mappedIndexFileReader.clear(); this.dataFiles.clear(); this.chunkIdToChu...
[ "private", "void", "reset", "(", ")", "{", "this", ".", "numChunks", "=", "0", ";", "this", ".", "baseDir", "=", "null", ";", "this", ".", "indexFileSizes", ".", "clear", "(", ")", ";", "this", ".", "dataFileSizes", ".", "clear", "(", ")", ";", "th...
/* Ideally all methods after the close should throw an Exception if called, but that will involve changing a lot of code ( this file and callers ) and testing. So reseting most of the collections so that the read returns empty data. Before this method was introduced JVM used to crash when the memory mapped file was acc...
[ "/", "*", "Ideally", "all", "methods", "after", "the", "close", "should", "throw", "an", "Exception", "if", "called", "but", "that", "will", "involve", "changing", "a", "lot", "of", "code", "(", "this", "file", "and", "callers", ")", "and", "testing", "....
a7dbdea58032021361680faacf2782cf981c5332
https://github.com/voldemort/voldemort/blob/a7dbdea58032021361680faacf2782cf981c5332/src/java/voldemort/store/readonly/chunk/ChunkedFileSet.java#L475-L488
train
Resets the internal state of the class.
Create a Java method that does the following: "Resets the internal state of the class.".
Of course, here is the Java code you requested: ```java private void reset() { this.numChunks = 0; this.baseDir = null; this.indexFileSizes.clear(); this.dataFileSizes.clear(); this.fileNames.clear(); this.indexFiles.clear(); this.mappedIndexFileReader.clear(); ...
teatrove/teatrove
trove/src/main/java/org/teatrove/trove/classfile/ClassFile.java
ClassFile.getMethods
public MethodInfo[] getMethods() { int size = mMethods.size(); List<MethodInfo> methodsOnly = new ArrayList<MethodInfo>(size); for (int i=0; i<size; i++) { MethodInfo method = mMethods.get(i); String name = method.getName(); if (!"<init>".equals(name) && !"<c...
java
public MethodInfo[] getMethods() { int size = mMethods.size(); List<MethodInfo> methodsOnly = new ArrayList<MethodInfo>(size); for (int i=0; i<size; i++) { MethodInfo method = mMethods.get(i); String name = method.getName(); if (!"<init>".equals(name) && !"<c...
[ "public", "MethodInfo", "[", "]", "getMethods", "(", ")", "{", "int", "size", "=", "mMethods", ".", "size", "(", ")", ";", "List", "<", "MethodInfo", ">", "methodsOnly", "=", "new", "ArrayList", "<", "MethodInfo", ">", "(", "size", ")", ";", "for", "...
Returns all the methods defined in this class, not including constructors and static initializers.
[ "Returns", "all", "the", "methods", "defined", "in", "this", "class", "not", "including", "constructors", "and", "static", "initializers", "." ]
7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/trove/src/main/java/org/teatrove/trove/classfile/ClassFile.java#L227-L241
train
Gets the methods of this class.
Create a Java method that does the following: "Gets the methods of this class.".
Of course, here is the Java code you requested: ```java public MethodInfo[] getMethods() { int size = mMethods.size(); List<MethodInfo> methodsOnly = new ArrayList<MethodInfo>(size); for (int i=0; i<size; i++) { MethodInfo method = mMethods.get(i); String name = method....
kohsuke/com4j
runtime/src/main/java/com4j/Wrapper.java
Wrapper.create
static <T extends Com4jObject> T create( Class<T> primaryInterface, long ptr ) { Wrapper w = new Wrapper(ptr); T r = primaryInterface.cast(Proxy.newProxyInstance( primaryInterface.getClassLoader(), new Class<?>[]{primaryInterface}, w)); return r; }
java
static <T extends Com4jObject> T create( Class<T> primaryInterface, long ptr ) { Wrapper w = new Wrapper(ptr); T r = primaryInterface.cast(Proxy.newProxyInstance( primaryInterface.getClassLoader(), new Class<?>[]{primaryInterface}, w)); return r; }
[ "static", "<", "T", "extends", "Com4jObject", ">", "T", "create", "(", "Class", "<", "T", ">", "primaryInterface", ",", "long", "ptr", ")", "{", "Wrapper", "w", "=", "new", "Wrapper", "(", "ptr", ")", ";", "T", "r", "=", "primaryInterface", ".", "cas...
Creates a new proxy object to a given COM pointer. <p> Must be run from a {@link ComThread}. This method doesn't do AddRef.
[ "Creates", "a", "new", "proxy", "object", "to", "a", "given", "COM", "pointer", ".", "<p", ">", "Must", "be", "run", "from", "a", "{" ]
1e690b805fb0e4e9ef61560e20a56335aecb0b24
https://github.com/kohsuke/com4j/blob/1e690b805fb0e4e9ef61560e20a56335aecb0b24/runtime/src/main/java/com4j/Wrapper.java#L96-L104
train
Create a new instance of a CRA SECTYPE class.
Create a Java method that does the following: "Create a new instance of a CRA SECTYPE class.".
Of course, here is the Java code you requested: ```java static <T extends Com4jObject> T create( Class<T> primaryInterface, long ptr ) { Wrapper w = new Wrapper(ptr); T r = primaryInterface.cast(Proxy.newProxyInstance( primaryInterface.getClassLoader(), new Class<?>[]{primar...
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/factory/GeoPackageCoreImpl.java
GeoPackageCoreImpl.createMetadataTable
@Override public boolean createMetadataTable() { verifyWritable(); boolean created = false; MetadataDao dao = getMetadataDao(); try { if (!dao.isTableExists()) { created = tableCreator.createMetadata() > 0; if (created) { // Create the metadata extension record MetadataExtension metadataE...
java
@Override public boolean createMetadataTable() { verifyWritable(); boolean created = false; MetadataDao dao = getMetadataDao(); try { if (!dao.isTableExists()) { created = tableCreator.createMetadata() > 0; if (created) { // Create the metadata extension record MetadataExtension metadataE...
[ "@", "Override", "public", "boolean", "createMetadataTable", "(", ")", "{", "verifyWritable", "(", ")", ";", "boolean", "created", "=", "false", ";", "MetadataDao", "dao", "=", "getMetadataDao", "(", ")", ";", "try", "{", "if", "(", "!", "dao", ".", "isT...
{@inheritDoc}
[ "{" ]
6431c3b041a45b7f3802904ea4156b4082a72daa
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/factory/GeoPackageCoreImpl.java#L984-L1006
train
Create the metadata table
Create a Java method that does the following: "Create the metadata table".
Of course, here is the Java code you requested: ```java @Override public boolean createMetadataTable() { verifyWritable(); boolean created = false; MetadataDao dao = getMetadataDao(); try { if (!dao.isTableExists()) { created = tableCreator.createMetadata() > 0; if (created) { // Create the m...
aws/aws-sdk-java
aws-java-sdk-ec2/src/main/java/com/amazonaws/services/ec2/model/DisassociateSubnetCidrBlockRequest.java
DisassociateSubnetCidrBlockRequest.getDryRunRequest
@Override public Request<DisassociateSubnetCidrBlockRequest> getDryRunRequest() { Request<DisassociateSubnetCidrBlockRequest> request = new DisassociateSubnetCidrBlockRequestMarshaller().marshall(this); request.addParameter("DryRun", Boolean.toString(true)); return request; }
java
@Override public Request<DisassociateSubnetCidrBlockRequest> getDryRunRequest() { Request<DisassociateSubnetCidrBlockRequest> request = new DisassociateSubnetCidrBlockRequestMarshaller().marshall(this); request.addParameter("DryRun", Boolean.toString(true)); return request; }
[ "@", "Override", "public", "Request", "<", "DisassociateSubnetCidrBlockRequest", ">", "getDryRunRequest", "(", ")", "{", "Request", "<", "DisassociateSubnetCidrBlockRequest", ">", "request", "=", "new", "DisassociateSubnetCidrBlockRequestMarshaller", "(", ")", ".", "marsh...
This method is intended for internal use only. Returns the marshaled request configured with additional parameters to enable operation dry-run.
[ "This", "method", "is", "intended", "for", "internal", "use", "only", ".", "Returns", "the", "marshaled", "request", "configured", "with", "additional", "parameters", "to", "enable", "operation", "dry", "-", "run", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-ec2/src/main/java/com/amazonaws/services/ec2/model/DisassociateSubnetCidrBlockRequest.java#L80-L85
train
Gets the request that will be used to delete a CIDR block from a resource.
Create a Java method that does the following: "Gets the request that will be used to delete a CIDR block from a resource.".
Of course, here is the Java code you requested: ```java @Override public Request<DisassociateSubnetCidrBlockRequest> getDryRunRequest() { Request<DisassociateSubnetCidrBlockRequest> request = new DisassociateSubnetCidrBlockRequestMarshaller().marshall(this); request.addParameter("DryRun", Boolean.t...
grails/grails-core
grails-web/src/main/groovy/org/grails/web/servlet/context/GrailsConfigUtils.java
GrailsConfigUtils.executeGrailsBootstraps
@Deprecated public static void executeGrailsBootstraps(GrailsApplication application, WebApplicationContext webContext, ServletContext servletContext) { executeGrailsBootstraps(application, webContext, servletContext, null); }
java
@Deprecated public static void executeGrailsBootstraps(GrailsApplication application, WebApplicationContext webContext, ServletContext servletContext) { executeGrailsBootstraps(application, webContext, servletContext, null); }
[ "@", "Deprecated", "public", "static", "void", "executeGrailsBootstraps", "(", "GrailsApplication", "application", ",", "WebApplicationContext", "webContext", ",", "ServletContext", "servletContext", ")", "{", "executeGrailsBootstraps", "(", "application", ",", "webContext"...
Executes Grails bootstrap classes @param application The Grails ApplicationContext instance @param webContext The WebApplicationContext instance @param servletContext The ServletContext instance
[ "Executes", "Grails", "bootstrap", "classes" ]
c0b08aa995b0297143b75d05642abba8cb7b4122
https://github.com/grails/grails-core/blob/c0b08aa995b0297143b75d05642abba8cb7b4122/grails-web/src/main/groovy/org/grails/web/servlet/context/GrailsConfigUtils.java#L45-L49
train
Execute the Grails bootstraps.
Create a Java method that does the following: "Execute the Grails bootstraps.".
Of course, here is the Java code you requested: ```java @Deprecated public static void executeGrailsBootstraps(GrailsApplication application, WebApplicationContext webContext, ServletContext servletContext) { executeGrailsBootstraps(application, webContext, se...
Stratio/deep-spark
deep-jdbc/src/main/java/com/stratio/deep/jdbc/config/JdbcDeepJobConfig.java
JdbcDeepJobConfig.sort
@Override public JdbcDeepJobConfig<T> sort(String sort) { if(dbTable != null) { this.sort = new DbColumn(dbTable, sort, "",null,null); } return this; }
java
@Override public JdbcDeepJobConfig<T> sort(String sort) { if(dbTable != null) { this.sort = new DbColumn(dbTable, sort, "",null,null); } return this; }
[ "@", "Override", "public", "JdbcDeepJobConfig", "<", "T", ">", "sort", "(", "String", "sort", ")", "{", "if", "(", "dbTable", "!=", "null", ")", "{", "this", ".", "sort", "=", "new", "DbColumn", "(", "dbTable", ",", "sort", ",", "\"\"", ",", "null", ...
{@inheritDoc}
[ "{" ]
b9621c9b7a6d996f80fce1d073d696a157bed095
https://github.com/Stratio/deep-spark/blob/b9621c9b7a6d996f80fce1d073d696a157bed095/deep-jdbc/src/main/java/com/stratio/deep/jdbc/config/JdbcDeepJobConfig.java#L330-L336
train
Sets the sort column.
Create a Java method that does the following: "Sets the sort column.".
Of course, here is the Java code you requested: ```java @Override public JdbcDeepJobConfig<T> sort(String sort) { if(dbTable != null) { this.sort = new DbColumn(dbTable, sort, "",null,null); } return this; } ``` Hope this helps!
phax/ph-commons
ph-xml/src/main/java/com/helger/xml/xpath/MapBasedXPathVariableResolverQName.java
MapBasedXPathVariableResolverQName.addAllFrom
@Nonnull public EChange addAllFrom (@Nonnull final MapBasedXPathVariableResolver aOther, final boolean bOverwrite) { ValueEnforcer.notNull (aOther, "Other"); EChange eChange = EChange.UNCHANGED; for (final Map.Entry <String, ?> aEntry : aOther.getAllVariables ().entrySet ()) { // Local part on...
java
@Nonnull public EChange addAllFrom (@Nonnull final MapBasedXPathVariableResolver aOther, final boolean bOverwrite) { ValueEnforcer.notNull (aOther, "Other"); EChange eChange = EChange.UNCHANGED; for (final Map.Entry <String, ?> aEntry : aOther.getAllVariables ().entrySet ()) { // Local part on...
[ "@", "Nonnull", "public", "EChange", "addAllFrom", "(", "@", "Nonnull", "final", "MapBasedXPathVariableResolver", "aOther", ",", "final", "boolean", "bOverwrite", ")", "{", "ValueEnforcer", ".", "notNull", "(", "aOther", ",", "\"Other\"", ")", ";", "EChange", "e...
Add all variables from the other variable resolver into this resolver. This methods creates a QName with an empty namespace URI. @param aOther The variable resolver to import the variable from. May not be <code>null</code>. @param bOverwrite if <code>true</code> existing variables will be overwritten with the new vari...
[ "Add", "all", "variables", "from", "the", "other", "variable", "resolver", "into", "this", "resolver", ".", "This", "methods", "creates", "a", "QName", "with", "an", "empty", "namespace", "URI", "." ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-xml/src/main/java/com/helger/xml/xpath/MapBasedXPathVariableResolverQName.java#L142-L159
train
Add all variables from another variable resolver.
Create a Java method that does the following: "Add all variables from another variable resolver.".
Of course, here is the Java code you requested: ```java @Nonnull public EChange addAllFrom (@Nonnull final MapBasedXPathVariableResolver aOther, final boolean bOverwrite) { ValueEnforcer.notNull (aOther, "Other"); EChange eChange = EChange.UNCHANGED; for (final Map.Entry <String, ?> aEntry : aOther.get...
fcrepo4/fcrepo4
fcrepo-kernel-modeshape/src/main/java/org/fcrepo/kernel/modeshape/identifiers/NamespaceConverter.java
NamespaceConverter.doForward
@Override protected String doForward(final String inputId) { LOGGER.trace("Converting identifier {} from internal to external...", inputId); String result = inputId; for (final String jcrNamespace : jcrNamespacesToRDFNamespaces.keySet()) { LOGGER.trace("Replacing namespace: {} wi...
java
@Override protected String doForward(final String inputId) { LOGGER.trace("Converting identifier {} from internal to external...", inputId); String result = inputId; for (final String jcrNamespace : jcrNamespacesToRDFNamespaces.keySet()) { LOGGER.trace("Replacing namespace: {} wi...
[ "@", "Override", "protected", "String", "doForward", "(", "final", "String", "inputId", ")", "{", "LOGGER", ".", "trace", "(", "\"Converting identifier {} from internal to external...\"", ",", "inputId", ")", ";", "String", "result", "=", "inputId", ";", "for", "(...
/* (non-Javadoc) @see org.fcrepo.kernel.api.identifiers.InternalIdentifierConverter#doForward( java.lang.String)
[ "/", "*", "(", "non", "-", "Javadoc", ")" ]
7489ad5bc8fb44e2442c93eceb7d97ac54553ab6
https://github.com/fcrepo4/fcrepo4/blob/7489ad5bc8fb44e2442c93eceb7d97ac54553ab6/fcrepo-kernel-modeshape/src/main/java/org/fcrepo/kernel/modeshape/identifiers/NamespaceConverter.java#L44-L55
train
Convert from internal to external.
Create a Java method that does the following: "Convert from internal to external.".
Of course, here is the Java code you requested: ```java @Override protected String doForward(final String inputId) { LOGGER.trace("Converting identifier {} from internal to external...", inputId); String result = inputId; for (final String jcrNamespace : jcrNamespacesToRDFNamespaces.keySet(...
facebookarchive/hadoop-20
src/hdfs/org/apache/hadoop/hdfs/server/namenode/InitialReportWorker.java
InitialReportWorker.insertCurrentStoredBlockIntoList
private void insertCurrentStoredBlockIntoList() { // index < 0 - block is already in the DN's list if (currentStoredBlock == null || currentStoredBlockIndex < 0) return; if (head == null) { // local list is empty, // make head and tail point to the input block head = currentStoredBl...
java
private void insertCurrentStoredBlockIntoList() { // index < 0 - block is already in the DN's list if (currentStoredBlock == null || currentStoredBlockIndex < 0) return; if (head == null) { // local list is empty, // make head and tail point to the input block head = currentStoredBl...
[ "private", "void", "insertCurrentStoredBlockIntoList", "(", ")", "{", "// index < 0 - block is already in the DN's list", "if", "(", "currentStoredBlock", "==", "null", "||", "currentStoredBlockIndex", "<", "0", ")", "return", ";", "if", "(", "head", "==", "null", ")"...
Insert the current stored block into the local list of blocks belonging to the datanode descriptor.
[ "Insert", "the", "current", "stored", "block", "into", "the", "local", "list", "of", "blocks", "belonging", "to", "the", "datanode", "descriptor", "." ]
2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/hdfs/org/apache/hadoop/hdfs/server/namenode/InitialReportWorker.java#L159-L190
train
Insert the current stored block into the local list.
Create a Java method that does the following: "Insert the current stored block into the local list.".
Of course, here is the Java code you requested: ```java private void insertCurrentStoredBlockIntoList() { // index < 0 - block is already in the DN's list if (currentStoredBlock == null || currentStoredBlockIndex < 0) return; if (head == null) { // local list is empty, // make head and t...
yan74/afplib
org.afplib/src/main/java/org/afplib/afplib/impl/FNCImpl.java
FNCImpl.eIsSet
@Override public boolean eIsSet(int featureID) { switch (featureID) { case AfplibPackage.FNC__RETIRED: return RETIRED_EDEFAULT == null ? retired != null : !RETIRED_EDEFAULT.equals(retired); case AfplibPackage.FNC__PAT_TECH: return PAT_TECH_EDEFAULT == null ? patTech != null : !PAT_TECH_EDEFAULT.equals(...
java
@Override public boolean eIsSet(int featureID) { switch (featureID) { case AfplibPackage.FNC__RETIRED: return RETIRED_EDEFAULT == null ? retired != null : !RETIRED_EDEFAULT.equals(retired); case AfplibPackage.FNC__PAT_TECH: return PAT_TECH_EDEFAULT == null ? patTech != null : !PAT_TECH_EDEFAULT.equals(...
[ "@", "Override", "public", "boolean", "eIsSet", "(", "int", "featureID", ")", "{", "switch", "(", "featureID", ")", "{", "case", "AfplibPackage", ".", "FNC__RETIRED", ":", "return", "RETIRED_EDEFAULT", "==", "null", "?", "retired", "!=", "null", ":", "!", ...
<!-- begin-user-doc --> <!-- end-user-doc --> @generated
[ "<!", "--", "begin", "-", "user", "-", "doc", "--", ">", "<!", "--", "end", "-", "user", "-", "doc", "--", ">" ]
9ff0513f9448bdf8c0b0e31dc4910c094c48fb2f
https://github.com/yan74/afplib/blob/9ff0513f9448bdf8c0b0e31dc4910c094c48fb2f/org.afplib/src/main/java/org/afplib/afplib/impl/FNCImpl.java#L1397-L1454
train
Replies if the feature ID is contained in this CBE feature.
Create a Java method that does the following: "Replies if the feature ID is contained in this CBE feature.".
Of course, here is the Java code you requested: ```java @Override public boolean eIsSet(int featureID) { switch (featureID) { case AfplibPackage.FNC__RETIRED: return RETIRED_EDEFAULT == null ? retired != null : !RETIRED_EDEFAULT.equals(retired); case AfplibPackage.FNC__PAT_TECH: return PAT_TECH_EDEFAU...
nguillaumin/slick2d-maven
slick2d-hiero/src/main/java/org/newdawn/slick/tools/hiero/truetype/TTFSubSetFile.java
TTFSubSetFile.createDirectory
private void createDirectory() { int numTables = 9; // Create the TrueType header writeByte((byte)0); writeByte((byte)1); writeByte((byte)0); writeByte((byte)0); realSize += 4; writeUShort(numTables); realSize += 2; // Create searchRange,...
java
private void createDirectory() { int numTables = 9; // Create the TrueType header writeByte((byte)0); writeByte((byte)1); writeByte((byte)0); writeByte((byte)0); realSize += 4; writeUShort(numTables); realSize += 2; // Create searchRange,...
[ "private", "void", "createDirectory", "(", ")", "{", "int", "numTables", "=", "9", ";", "// Create the TrueType header", "writeByte", "(", "(", "byte", ")", "0", ")", ";", "writeByte", "(", "(", "byte", ")", "1", ")", ";", "writeByte", "(", "(", "byte", ...
Create the directory table
[ "Create", "the", "directory", "table" ]
8251f88a0ed6a70e726d2468842455cd1f80893f
https://github.com/nguillaumin/slick2d-maven/blob/8251f88a0ed6a70e726d2468842455cd1f80893f/slick2d-hiero/src/main/java/org/newdawn/slick/tools/hiero/truetype/TTFSubSetFile.java#L113-L184
train
Create the directory for the TrueType Table EntrySet.
Create a Java method that does the following: "Create the directory for the TrueType Table EntrySet.".
Of course, here is the Java code you requested: ```java private void createDirectory() { int numTables = 9; // Create the TrueType header writeByte((byte)0); writeByte((byte)1); writeByte((byte)0); writeByte((byte)0); realSize += 4; writeUShort(numTables...
GCRC/nunaliit
nunaliit2-dbWeb/src/main/java/ca/carleton/gcrc/dbWeb/DbWebServlet.java
DbWebServlet.parseRecordSelector
private RecordSelector parseRecordSelector(String recordSelectorString) throws Exception { if (null == recordSelectorString || "" == recordSelectorString) { return null; } { Matcher matcher = patternSearchString.matcher(recordSelectorString); if( matcher.matches() ) { String[] fieldNames = matcher...
java
private RecordSelector parseRecordSelector(String recordSelectorString) throws Exception { if (null == recordSelectorString || "" == recordSelectorString) { return null; } { Matcher matcher = patternSearchString.matcher(recordSelectorString); if( matcher.matches() ) { String[] fieldNames = matcher...
[ "private", "RecordSelector", "parseRecordSelector", "(", "String", "recordSelectorString", ")", "throws", "Exception", "{", "if", "(", "null", "==", "recordSelectorString", "||", "\"\"", "==", "recordSelectorString", ")", "{", "return", "null", ";", "}", "{", "Mat...
/* eq(<column>)<value> ne(<column>)<value> ge(<column>)<value> le(<column>)<value> gt(<column>)<value> lt(<column>)<value> null(<column>) notNull(<column>) search(<columnName>,<columnName>,...)<string>
[ "/", "*", "eq", "(", "<column", ">", ")", "<value", ">", "ne", "(", "<column", ">", ")", "<value", ">", "ge", "(", "<column", ">", ")", "<value", ">", "le", "(", "<column", ">", ")", "<value", ">", "gt", "(", "<column", ">", ")", "<value", ">",...
0b4abfc64eef2eb8b94f852ce697de2e851d8e67
https://github.com/GCRC/nunaliit/blob/0b4abfc64eef2eb8b94f852ce697de2e851d8e67/nunaliit2-dbWeb/src/main/java/ca/carleton/gcrc/dbWeb/DbWebServlet.java#L599-L710
train
Parses the record selector string.
Create a Java method that does the following: "Parses the record selector string.".
Of course, here is the Java code you requested: ```java private RecordSelector parseRecordSelector(String recordSelectorString) throws Exception { if (null == recordSelectorString || "" == recordSelectorString) { return null; } { Matcher matcher = patternSearchString.matcher(recordSelectorString); if...
JavaMoney/jsr354-api
src/main/java/javax/money/Monetary.java
Monetary.monetaryAmountsSingletonQuerySpi
private static MonetaryAmountsSingletonQuerySpi monetaryAmountsSingletonQuerySpi() { try { return Bootstrap.getService(MonetaryAmountsSingletonQuerySpi.class); } catch (Exception e) { Logger.getLogger(Monetary.class.getName()).log(Level.SEVERE, "Failed to load " + ...
java
private static MonetaryAmountsSingletonQuerySpi monetaryAmountsSingletonQuerySpi() { try { return Bootstrap.getService(MonetaryAmountsSingletonQuerySpi.class); } catch (Exception e) { Logger.getLogger(Monetary.class.getName()).log(Level.SEVERE, "Failed to load " + ...
[ "private", "static", "MonetaryAmountsSingletonQuerySpi", "monetaryAmountsSingletonQuerySpi", "(", ")", "{", "try", "{", "return", "Bootstrap", ".", "getService", "(", "MonetaryAmountsSingletonQuerySpi", ".", "class", ")", ";", "}", "catch", "(", "Exception", "e", ")",...
The used {@link javax.money.spi.MonetaryAmountsSingletonSpi} instance.
[ "The", "used", "{" ]
49a7ae436eaf45cac1040879185531ef22de5525
https://github.com/JavaMoney/jsr354-api/blob/49a7ae436eaf45cac1040879185531ef22de5525/src/main/java/javax/money/Monetary.java#L72-L82
train
Get the instance of the MonetaryAmountsSingletonQuerySpi.
Create a Java method that does the following: "Get the instance of the MonetaryAmountsSingletonQuerySpi.".
Of course, here is the Java code you requested: ```java private static MonetaryAmountsSingletonQuerySpi monetaryAmountsSingletonQuerySpi() { try { return Bootstrap.getService(MonetaryAmountsSingletonQuerySpi.class); } catch (Exception e) { Logger.getLogger(Monetary.class.getName...
undertow-io/undertow
core/src/main/java9/io/undertow/util/FastConcurrentDirectDeque.java
FastConcurrentDirectDeque.contains
public boolean contains(Object o) { if (o != null) { for (Node<E> p = first(); p != null; p = succ(p)) { final E item; if ((item = p.item) != null && o.equals(item)) return true; } } return false; }
java
public boolean contains(Object o) { if (o != null) { for (Node<E> p = first(); p != null; p = succ(p)) { final E item; if ((item = p.item) != null && o.equals(item)) return true; } } return false; }
[ "public", "boolean", "contains", "(", "Object", "o", ")", "{", "if", "(", "o", "!=", "null", ")", "{", "for", "(", "Node", "<", "E", ">", "p", "=", "first", "(", ")", ";", "p", "!=", "null", ";", "p", "=", "succ", "(", "p", ")", ")", "{", ...
Returns {@code true} if this deque contains the specified element. More formally, returns {@code true} if and only if this deque contains at least one element {@code e} such that {@code o.equals(e)}. @param o element whose presence in this deque is to be tested @return {@code true} if this deque contains the specified...
[ "Returns", "{", "@code", "true", "}", "if", "this", "deque", "contains", "the", "specified", "element", ".", "More", "formally", "returns", "{", "@code", "true", "}", "if", "and", "only", "if", "this", "deque", "contains", "at", "least", "one", "element", ...
87de0b856a7a4ba8faf5b659537b9af07b763263
https://github.com/undertow-io/undertow/blob/87de0b856a7a4ba8faf5b659537b9af07b763263/core/src/main/java9/io/undertow/util/FastConcurrentDirectDeque.java#L1072-L1081
train
Check if the node contains the object o.
Create a Java method that does the following: "Check if the node contains the object o.".
Of course, here is the Java code you requested: ```java public boolean contains(Object o) { if (o != null) { for (Node<E> p = first(); p != null; p = succ(p)) { final E item; if ((item = p.item) != null && o.equals(item)) return true; ...
JM-Lab/utils-java8
src/main/java/kr/jm/utils/helper/JMThread.java
JMThread.buildCallableWithLogging
public static <V> Callable<V> buildCallableWithLogging(String name, Callable<V> callable, Object... params) { return () -> supplyAsync(() -> { try { JMLog.debug(log, name, System.currentTimeMillis(), params); return callable.call(); } catch (Ex...
java
public static <V> Callable<V> buildCallableWithLogging(String name, Callable<V> callable, Object... params) { return () -> supplyAsync(() -> { try { JMLog.debug(log, name, System.currentTimeMillis(), params); return callable.call(); } catch (Ex...
[ "public", "static", "<", "V", ">", "Callable", "<", "V", ">", "buildCallableWithLogging", "(", "String", "name", ",", "Callable", "<", "V", ">", "callable", ",", "Object", "...", "params", ")", "{", "return", "(", ")", "->", "supplyAsync", "(", "(", ")...
Build callable with logging callable. @param <V> the type parameter @param name the name @param callable the callable @param params the params @return the callable
[ "Build", "callable", "with", "logging", "callable", "." ]
9e407b3f28a7990418a1e877229fa8344f4d78a5
https://github.com/JM-Lab/utils-java8/blob/9e407b3f28a7990418a1e877229fa8344f4d78a5/src/main/java/kr/jm/utils/helper/JMThread.java#L300-L311
train
Build callable with logging.
Create a Java method that does the following: "Build callable with logging.".
Of course, here is the Java code you requested: ```java public static <V> Callable<V> buildCallableWithLogging(String name, Callable<V> callable, Object... params) { return () -> supplyAsync(() -> { try { JMLog.debug(log, name, System.currentTimeMillis(), params); ...
google/closure-compiler
src/com/google/javascript/jscomp/GlobalNamespace.java
GlobalNamespace.isGlobalVarReference
private boolean isGlobalVarReference(String name, Scope s) { Var v = s.getVar(name); if (v == null && externsScope != null) { v = externsScope.getVar(name); } return v != null && !v.isLocal(); }
java
private boolean isGlobalVarReference(String name, Scope s) { Var v = s.getVar(name); if (v == null && externsScope != null) { v = externsScope.getVar(name); } return v != null && !v.isLocal(); }
[ "private", "boolean", "isGlobalVarReference", "(", "String", "name", ",", "Scope", "s", ")", "{", "Var", "v", "=", "s", ".", "getVar", "(", "name", ")", ";", "if", "(", "v", "==", "null", "&&", "externsScope", "!=", "null", ")", "{", "v", "=", "ext...
Determines whether a variable name reference in a particular scope is a global variable reference. @param name A variable name (e.g. "a") @param s The scope in which the name is referenced @return Whether the name reference is a global variable reference
[ "Determines", "whether", "a", "variable", "name", "reference", "in", "a", "particular", "scope", "is", "a", "global", "variable", "reference", "." ]
d81e36740f6a9e8ac31a825ee8758182e1dc5aae
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/GlobalNamespace.java#L304-L310
train
Checks if a variable reference is a global variable reference.
Create a Java method that does the following: "Checks if a variable reference is a global variable reference.".
Of course, here is the Java code you requested: ```java private boolean isGlobalVarReference(String name, Scope s) { Var v = s.getVar(name); if (v == null && externsScope != null) { v = externsScope.getVar(name); } return v != null && !v.isLocal(); } ``` Hope this helps!
opentelecoms-org/zrtp-java
src/zorg/SRTP.java
SRTP.setTxMasterKey
public boolean setTxMasterKey(byte[] key) { boolean res = false; if ((key.length == MASTER_KEY_SIZE_32_BYTES) || (key.length == MASTER_KEY_SIZE_16_BYTES)) { txMasterKey = null; txMasterKey = platform.getUtils().copy(key); res = true; logDebug("setTxMasterKey " + platform.getUtils().byteToHexStr...
java
public boolean setTxMasterKey(byte[] key) { boolean res = false; if ((key.length == MASTER_KEY_SIZE_32_BYTES) || (key.length == MASTER_KEY_SIZE_16_BYTES)) { txMasterKey = null; txMasterKey = platform.getUtils().copy(key); res = true; logDebug("setTxMasterKey " + platform.getUtils().byteToHexStr...
[ "public", "boolean", "setTxMasterKey", "(", "byte", "[", "]", "key", ")", "{", "boolean", "res", "=", "false", ";", "if", "(", "(", "key", ".", "length", "==", "MASTER_KEY_SIZE_32_BYTES", ")", "||", "(", "key", ".", "length", "==", "MASTER_KEY_SIZE_16_BYTE...
Sets the Master Key to be used for generating the Transmit session keys (only 256 bit keys supported - see PrivateGSM Tech Spec, 5.4.3) @param key Master Key string @return true if successfully set, false otherwise (invalid key length)
[ "Sets", "the", "Master", "Key", "to", "be", "used", "for", "generating", "the", "Transmit", "session", "keys", "(", "only", "256", "bit", "keys", "supported", "-", "see", "PrivateGSM", "Tech", "Spec", "5", ".", "4", ".", "3", ")" ]
10a0c77866c5d1b1504df161db9a447f5069ed54
https://github.com/opentelecoms-org/zrtp-java/blob/10a0c77866c5d1b1504df161db9a447f5069ed54/src/zorg/SRTP.java#L728-L741
train
Set the transaction master key.
Create a Java method that does the following: "Set the transaction master key.".
Of course, here is the Java code you requested: ```java public boolean setTxMasterKey(byte[] key) { boolean res = false; if ((key.length == MASTER_KEY_SIZE_32_BYTES) || (key.length == MASTER_KEY_SIZE_16_BYTES)) { txMasterKey = null; txMasterKey = platform.getUtils().copy(key); res = true; logDebug(...
paypal/SeLion
server/src/main/java/com/paypal/selion/grid/AbstractBaseProcessLauncher.java
AbstractBaseProcessLauncher.getJavaClassPathArguments
String[] getJavaClassPathArguments(String jarNamePrefix, String mainClass) { LOGGER.entering(); Set<String> uniqueClassPathEntries = new LinkedHashSet<>(); // find all jars in the SELION_HOME_DIR if (getLauncherOptions().isIncludeJarsInSeLionHomeDir()) { Collection<File> hom...
java
String[] getJavaClassPathArguments(String jarNamePrefix, String mainClass) { LOGGER.entering(); Set<String> uniqueClassPathEntries = new LinkedHashSet<>(); // find all jars in the SELION_HOME_DIR if (getLauncherOptions().isIncludeJarsInSeLionHomeDir()) { Collection<File> hom...
[ "String", "[", "]", "getJavaClassPathArguments", "(", "String", "jarNamePrefix", ",", "String", "mainClass", ")", "{", "LOGGER", ".", "entering", "(", ")", ";", "Set", "<", "String", ">", "uniqueClassPathEntries", "=", "new", "LinkedHashSet", "<>", "(", ")", ...
Get the classpath for the child process. Determines all jars from CWD and SELION_HOME_DIR. Does not recurse into sub directories. Filters out duplicates. @param jarNamePrefix when adding jars from the {@link SeLionConstants#SELION_HOME_DIR}, only consider jars whose names start with this prefix. If <code>null</code>, ...
[ "Get", "the", "classpath", "for", "the", "child", "process", ".", "Determines", "all", "jars", "from", "CWD", "and", "SELION_HOME_DIR", ".", "Does", "not", "recurse", "into", "sub", "directories", ".", "Filters", "out", "duplicates", "." ]
694d12d0df76db48d0360b16192770c6a4fbdfd2
https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/server/src/main/java/com/paypal/selion/grid/AbstractBaseProcessLauncher.java#L372-L415
train
Get the java classpath arguments for the specified class.
Create a Java method that does the following: "Get the java classpath arguments for the specified class.".
Of course, here is the Java code you requested: ```java String[] getJavaClassPathArguments(String jarNamePrefix, String mainClass) { LOGGER.entering(); Set<String> uniqueClassPathEntries = new LinkedHashSet<>(); // find all jars in the SELION_HOME_DIR if (getLauncherOptions().isInclude...
sirthias/parboiled
parboiled-core/src/main/java/org/parboiled/common/Preconditions.java
Preconditions.checkArgNotNull
public static <T> T checkArgNotNull(T reference, String parameterName) { if (reference == null) { throw new NullPointerException(format("Argument '%s' must not be null", parameterName)); } return reference; }
java
public static <T> T checkArgNotNull(T reference, String parameterName) { if (reference == null) { throw new NullPointerException(format("Argument '%s' must not be null", parameterName)); } return reference; }
[ "public", "static", "<", "T", ">", "T", "checkArgNotNull", "(", "T", "reference", ",", "String", "parameterName", ")", "{", "if", "(", "reference", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", "format", "(", "\"Argument '%s' must not be...
Ensures that an object reference passed as a parameter to the calling method is not null. @param reference an object reference @param parameterName the parameter name @return the non-null reference that was validated @throws NullPointerException if {@code reference} is null
[ "Ensures", "that", "an", "object", "reference", "passed", "as", "a", "parameter", "to", "the", "calling", "method", "is", "not", "null", "." ]
84f3ed43e3e171b4c6ab5e6ca6297d264a9d686a
https://github.com/sirthias/parboiled/blob/84f3ed43e3e171b4c6ab5e6ca6297d264a9d686a/parboiled-core/src/main/java/org/parboiled/common/Preconditions.java#L206-L211
train
CheckArgNotNull.
Create a Java method that does the following: "CheckArgNotNull.".
Of course, here is the Java code you requested: ```java public static <T> T checkArgNotNull(T reference, String parameterName) { if (reference == null) { throw new NullPointerException(format("Argument '%s' must not be null", parameterName)); } return reference; } ``` Hope this...
jenkinsci/pipeline-maven-plugin
jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/publishers/MavenLinkerPublisher2.java
MavenLinkerPublisher2.process
@Override public synchronized void process(StepContext context, Element mavenSpyLogsElt) throws IOException, InterruptedException { Run<?, ?> run = context.get(Run.class); // we replace instead of because we want to refresh the cache org.jenkinsci.plugins.pipeline.maven.publishers.MavenReport.getGen...
java
@Override public synchronized void process(StepContext context, Element mavenSpyLogsElt) throws IOException, InterruptedException { Run<?, ?> run = context.get(Run.class); // we replace instead of because we want to refresh the cache org.jenkinsci.plugins.pipeline.maven.publishers.MavenReport.getGen...
[ "@", "Override", "public", "synchronized", "void", "process", "(", "StepContext", "context", ",", "Element", "mavenSpyLogsElt", ")", "throws", "IOException", ",", "InterruptedException", "{", "Run", "<", "?", ",", "?", ">", "run", "=", "context", ".", "get", ...
Synchronize because {@link Run#addOrReplaceAction(hudson.model.Action)} is not thread safe
[ "Synchronize", "because", "{" ]
685d7dbb894fb4c976dbfa922e3caba8e8d5bed8
https://github.com/jenkinsci/pipeline-maven-plugin/blob/685d7dbb894fb4c976dbfa922e3caba8e8d5bed8/jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/publishers/MavenLinkerPublisher2.java#L42-L47
train
This method is called by the step processor to process the generated artifacts of the generated artifacts.
Create a Java method that does the following: "This method is called by the step processor to process the generated artifacts of the generated artifacts.".
Of course, here is the Java code you requested: ```java @Override public synchronized void process(StepContext context, Element mavenSpyLogsElt) throws IOException, InterruptedException { Run<?, ?> run = context.get(Run.class); // we replace instead of because we want to refresh the cache org.jenki...
jhy/jsoup
src/main/java/org/jsoup/nodes/Node.java
Node.after
public Node after(Node node) { Validate.notNull(node); Validate.notNull(parentNode); parentNode.addChildren(siblingIndex + 1, node); return this; }
java
public Node after(Node node) { Validate.notNull(node); Validate.notNull(parentNode); parentNode.addChildren(siblingIndex + 1, node); return this; }
[ "public", "Node", "after", "(", "Node", "node", ")", "{", "Validate", ".", "notNull", "(", "node", ")", ";", "Validate", ".", "notNull", "(", "parentNode", ")", ";", "parentNode", ".", "addChildren", "(", "siblingIndex", "+", "1", ",", "node", ")", ";"...
Insert the specified node into the DOM after this node (i.e. as a following sibling). @param node to add after this node @return this node, for chaining @see #before(Node)
[ "Insert", "the", "specified", "node", "into", "the", "DOM", "after", "this", "node", "(", "i", ".", "e", ".", "as", "a", "following", "sibling", ")", "." ]
68ff8cbe7ad847059737a09c567a501a7f1d251f
https://github.com/jhy/jsoup/blob/68ff8cbe7ad847059737a09c567a501a7f1d251f/src/main/java/org/jsoup/nodes/Node.java#L322-L328
train
Add a node after this node.
Create a Java method that does the following: "Add a node after this node.".
Of course, here is the Java code you requested: ```java public Node after(Node node) { Validate.notNull(node); Validate.notNull(parentNode); parentNode.addChildren(siblingIndex + 1, node); return this; } ``` Hope this helps!
javagl/Common
src/main/java/de/javagl/common/collections/Maps.java
Maps.fromIterable
public static <T> Map<Integer, T> fromIterable( Iterable<? extends T> iterable) { Map<Integer, T> map = new LinkedHashMap<Integer, T>(); int i = 0; for (T t : iterable) { map.put(i, t); i++; } return map; }
java
public static <T> Map<Integer, T> fromIterable( Iterable<? extends T> iterable) { Map<Integer, T> map = new LinkedHashMap<Integer, T>(); int i = 0; for (T t : iterable) { map.put(i, t); i++; } return map; }
[ "public", "static", "<", "T", ">", "Map", "<", "Integer", ",", "T", ">", "fromIterable", "(", "Iterable", "<", "?", "extends", "T", ">", "iterable", ")", "{", "Map", "<", "Integer", ",", "T", ">", "map", "=", "new", "LinkedHashMap", "<", "Integer", ...
Creates a map that maps consecutive integer values to the elements in the given sequence, in the order in which they appear. @param <T> The value type @param iterable The sequence @return The map
[ "Creates", "a", "map", "that", "maps", "consecutive", "integer", "values", "to", "the", "elements", "in", "the", "given", "sequence", "in", "the", "order", "in", "which", "they", "appear", "." ]
5a4876b48c3a2dc61d21324733cf37512d721c33
https://github.com/javagl/Common/blob/5a4876b48c3a2dc61d21324733cf37512d721c33/src/main/java/de/javagl/common/collections/Maps.java#L214-L225
train
Creates a map from an iterable of class T.
Create a Java method that does the following: "Creates a map from an iterable of class T.".
Of course, here is the Java code you requested: ```java public static <T> Map<Integer, T> fromIterable( Iterable<? extends T> iterable) { Map<Integer, T> map = new LinkedHashMap<Integer, T>(); int i = 0; for (T t : iterable) { map.put(i, t); i...
SonarSource/sonarqube
server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/step/LoadReportAnalysisMetadataHolderStep.java
LoadReportAnalysisMetadataHolderStep.checkQualityProfilesConsistency
private void checkQualityProfilesConsistency(ScannerReport.Metadata metadata, Organization organization) { List<String> profileKeys = metadata.getQprofilesPerLanguage().values().stream() .map(QProfile::getKey) .collect(toList(metadata.getQprofilesPerLanguage().size())); try (DbSession dbSession = db...
java
private void checkQualityProfilesConsistency(ScannerReport.Metadata metadata, Organization organization) { List<String> profileKeys = metadata.getQprofilesPerLanguage().values().stream() .map(QProfile::getKey) .collect(toList(metadata.getQprofilesPerLanguage().size())); try (DbSession dbSession = db...
[ "private", "void", "checkQualityProfilesConsistency", "(", "ScannerReport", ".", "Metadata", "metadata", ",", "Organization", "organization", ")", "{", "List", "<", "String", ">", "profileKeys", "=", "metadata", ".", "getQprofilesPerLanguage", "(", ")", ".", "values...
Check that the Quality profiles sent by scanner correctly relate to the project organization.
[ "Check", "that", "the", "Quality", "profiles", "sent", "by", "scanner", "correctly", "relate", "to", "the", "project", "organization", "." ]
2fffa4c2f79ae3714844d7742796e82822b6a98a
https://github.com/SonarSource/sonarqube/blob/2fffa4c2f79ae3714844d7742796e82822b6a98a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/step/LoadReportAnalysisMetadataHolderStep.java#L177-L191
train
Check if the quality profiles are consistent
Create a Java method that does the following: "Check if the quality profiles are consistent".
Of course, here is the Java code you requested: ```java private void checkQualityProfilesConsistency(ScannerReport.Metadata metadata, Organization organization) { List<String> profileKeys = metadata.getQprofilesPerLanguage().values().stream() .map(QProfile::getKey) .collect(toList(metadata.getQprofiles...
baidubce/bce-sdk-java
src/main/java/com/baidubce/services/bcc/BccClient.java
BccClient.listZones
public ListZonesResponse listZones(AbstractBceRequest request) { InternalRequest internalRequest = this.createRequest(request, HttpMethodName.GET, ZONE); return invokeHttpClient(internalRequest, ListZonesResponse.class); }
java
public ListZonesResponse listZones(AbstractBceRequest request) { InternalRequest internalRequest = this.createRequest(request, HttpMethodName.GET, ZONE); return invokeHttpClient(internalRequest, ListZonesResponse.class); }
[ "public", "ListZonesResponse", "listZones", "(", "AbstractBceRequest", "request", ")", "{", "InternalRequest", "internalRequest", "=", "this", ".", "createRequest", "(", "request", ",", "HttpMethodName", ".", "GET", ",", "ZONE", ")", ";", "return", "invokeHttpClient...
listing zones within current region @param request use withRequestCredentials @return The response with list of zones
[ "listing", "zones", "within", "current", "region" ]
f7140f28dd82121515c88ded7bfe769a37d0ec4a
https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/bcc/BccClient.java#L1621-L1624
train
List the list of zones owned by the authenticated user.
Create a Java method that does the following: "List the list of zones owned by the authenticated user.".
Of course, here is the Java code you requested: ```java public ListZonesResponse listZones(AbstractBceRequest request) { InternalRequest internalRequest = this.createRequest(request, HttpMethodName.GET, ZONE); return invokeHttpClient(internalRequest, ListZonesResponse.class); } ``` Hope this helps...
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/validation/OpValidation.java
OpValidation.excludedFromGradientCheckCoverage
private static Set<Class> excludedFromGradientCheckCoverage() { List list = Arrays.asList( //Exclude misc DynamicCustomOp.class, EqualsWithEps.class, ConfusionMatrix.class, Eye.class, OneHot.class, Bi...
java
private static Set<Class> excludedFromGradientCheckCoverage() { List list = Arrays.asList( //Exclude misc DynamicCustomOp.class, EqualsWithEps.class, ConfusionMatrix.class, Eye.class, OneHot.class, Bi...
[ "private", "static", "Set", "<", "Class", ">", "excludedFromGradientCheckCoverage", "(", ")", "{", "List", "list", "=", "Arrays", ".", "asList", "(", "//Exclude misc", "DynamicCustomOp", ".", "class", ",", "EqualsWithEps", ".", "class", ",", "ConfusionMatrix", "...
Returns a list of classes that are not gradient checkable. An operation may not be gradient checkable due to, for example: (a) Having no real-valued arguments<br> (b) Having random output (dropout, for example)<br> <p> Note that hawving non-real-valued output is OK - we still want to test these, as they should pass bac...
[ "Returns", "a", "list", "of", "classes", "that", "are", "not", "gradient", "checkable", ".", "An", "operation", "may", "not", "be", "gradient", "checkable", "due", "to", "for", "example", ":", "(", "a", ")", "Having", "no", "real", "-", "valued", "argume...
effce52f2afd7eeb53c5bcca699fcd90bd06822f
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/validation/OpValidation.java#L874-L934
train
Exclude from gradient check coverage.
Create a Java method that does the following: "Exclude from gradient check coverage.".
Of course, here is the Java code you requested: ```java private static Set<Class> excludedFromGradientCheckCoverage() { List list = Arrays.asList( //Exclude misc DynamicCustomOp.class, EqualsWithEps.class, ConfusionMatrix.class, Ey...
OpenLiberty/open-liberty
dev/com.ibm.ws.ejbcontainer.remote.portable.core/src/com/ibm/ejs/container/finder/FinderResultClientCollection.java
FinderResultClientCollection.writeObject
private void writeObject(java.io.ObjectOutputStream out) throws IOException { out.defaultWriteObject(); // write out the header information out.write(eyecatcher); out.writeShort(platform); out.writeShort(versionID); // write out the data o...
java
private void writeObject(java.io.ObjectOutputStream out) throws IOException { out.defaultWriteObject(); // write out the header information out.write(eyecatcher); out.writeShort(platform); out.writeShort(versionID); // write out the data o...
[ "private", "void", "writeObject", "(", "java", ".", "io", ".", "ObjectOutputStream", "out", ")", "throws", "IOException", "{", "out", ".", "defaultWriteObject", "(", ")", ";", "// write out the header information", "out", ".", "write", "(", "eyecatcher", ")", ";...
/* d113380 readObject and writeObject implementations
[ "/", "*", "d113380", "readObject", "and", "writeObject", "implementations" ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.ejbcontainer.remote.portable.core/src/com/ibm/ejs/container/finder/FinderResultClientCollection.java#L174-L187
train
Write the object in the CRAID record.
Create a Java method that does the following: "Write the object in the CRAID record.".
Of course, here is the Java code you requested: ```java private void writeObject(java.io.ObjectOutputStream out) throws IOException { out.defaultWriteObject(); // write out the header information out.write(eyecatcher); out.writeShort(platform); out.writeS...
teatrove/teatrove
teaservlet/src/main/java/org/teatrove/teaservlet/util/cluster/ClusterManager.java
ClusterManager.launchAuto
public void launchAuto(AutomaticClusterManagementThread auto) { killAuto(); if (mSock != null) { mAuto = auto; if (mAuto != null) { mAuto.start(); } } }
java
public void launchAuto(AutomaticClusterManagementThread auto) { killAuto(); if (mSock != null) { mAuto = auto; if (mAuto != null) { mAuto.start(); } } }
[ "public", "void", "launchAuto", "(", "AutomaticClusterManagementThread", "auto", ")", "{", "killAuto", "(", ")", ";", "if", "(", "mSock", "!=", "null", ")", "{", "mAuto", "=", "auto", ";", "if", "(", "mAuto", "!=", "null", ")", "{", "mAuto", ".", "star...
permits the AutomaticClusterManagementThread to be subclassed and used into the ClusterManager.
[ "permits", "the", "AutomaticClusterManagementThread", "to", "be", "subclassed", "and", "used", "into", "the", "ClusterManager", "." ]
7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/teaservlet/src/main/java/org/teatrove/teaservlet/util/cluster/ClusterManager.java#L461-L469
train
Launch an automatic cluster management thread.
Create a Java method that does the following: "Launch an automatic cluster management thread.".
Of course, here is the Java code you requested: ```java public void launchAuto(AutomaticClusterManagementThread auto) { killAuto(); if (mSock != null) { mAuto = auto; if (mAuto != null) { mAuto.start(); } } } ``` Hope this helps!
dickschoeller/gedbrowser
gedbrowserng/src/main/java/org/schoellerfamily/gedbrowser/api/datamodel/ApiExtraLists.java
ApiExtraLists.addAttribute
@Override public final void addAttribute(final ApiAttribute attribute) { if (attribute.isType("fams")) { fams.add(attribute); return; } if (attribute.isType("famc")) { famc.add(attribute); return; } if (attribute.isType("Changed...
java
@Override public final void addAttribute(final ApiAttribute attribute) { if (attribute.isType("fams")) { fams.add(attribute); return; } if (attribute.isType("famc")) { famc.add(attribute); return; } if (attribute.isType("Changed...
[ "@", "Override", "public", "final", "void", "addAttribute", "(", "final", "ApiAttribute", "attribute", ")", "{", "if", "(", "attribute", ".", "isType", "(", "\"fams\"", ")", ")", "{", "fams", ".", "add", "(", "attribute", ")", ";", "return", ";", "}", ...
{@inheritDoc}
[ "{" ]
e3e10b1ff3a34ebde9b7edcbfafcd5fe6fb3b3e1
https://github.com/dickschoeller/gedbrowser/blob/e3e10b1ff3a34ebde9b7edcbfafcd5fe6fb3b3e1/gedbrowserng/src/main/java/org/schoellerfamily/gedbrowser/api/datamodel/ApiExtraLists.java#L105-L130
train
Add an attribute to the attribute list.
Create a Java method that does the following: "Add an attribute to the attribute list.".
Of course, here is the Java code you requested: ```java @Override public final void addAttribute(final ApiAttribute attribute) { if (attribute.isType("fams")) { fams.add(attribute); return; } if (attribute.isType("famc")) { famc.add(attribute); ...
grails/gorm-hibernate5
grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/HibernateMappingContextConfiguration.java
HibernateMappingContextConfiguration.matchesFilter
protected boolean matchesFilter(MetadataReader reader, MetadataReaderFactory readerFactory) throws IOException { for (TypeFilter filter : ENTITY_TYPE_FILTERS) { if (filter.match(reader, readerFactory)) { return true; } } return false; }
java
protected boolean matchesFilter(MetadataReader reader, MetadataReaderFactory readerFactory) throws IOException { for (TypeFilter filter : ENTITY_TYPE_FILTERS) { if (filter.match(reader, readerFactory)) { return true; } } return false; }
[ "protected", "boolean", "matchesFilter", "(", "MetadataReader", "reader", ",", "MetadataReaderFactory", "readerFactory", ")", "throws", "IOException", "{", "for", "(", "TypeFilter", "filter", ":", "ENTITY_TYPE_FILTERS", ")", "{", "if", "(", "filter", ".", "match", ...
Check whether any of the configured entity type filters matches the current class descriptor contained in the metadata reader.
[ "Check", "whether", "any", "of", "the", "configured", "entity", "type", "filters", "matches", "the", "current", "class", "descriptor", "contained", "in", "the", "metadata", "reader", "." ]
0ebb80cd769ef2bea955723d4543828a3e9542ef
https://github.com/grails/gorm-hibernate5/blob/0ebb80cd769ef2bea955723d4543828a3e9542ef/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/HibernateMappingContextConfiguration.java#L181-L188
train
Checks if the reader matches any of the configured filters.
Create a Java method that does the following: "Checks if the reader matches any of the configured filters.".
Of course, here is the Java code you requested: ```java protected boolean matchesFilter(MetadataReader reader, MetadataReaderFactory readerFactory) throws IOException { for (TypeFilter filter : ENTITY_TYPE_FILTERS) { if (filter.match(reader, readerFactory)) { return true; ...
OpenLiberty/open-liberty
dev/com.ibm.ws.jaxrs.2.0.common/src/org/apache/cxf/jaxrs/model/ProviderInfo.java
ProviderInfo.setProvider
public void setProvider(Object pObj) { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { Tr.debug(tc, "setProvider pre: pObj(class)=" + pObj.getClass() + " isProxy=" + Proxy.isProxyClass(pObj.getClass()) + " provider=" + (provider==null?"null":provider.getClass()) + ...
java
public void setProvider(Object pObj) { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { Tr.debug(tc, "setProvider pre: pObj(class)=" + pObj.getClass() + " isProxy=" + Proxy.isProxyClass(pObj.getClass()) + " provider=" + (provider==null?"null":provider.getClass()) + ...
[ "public", "void", "setProvider", "(", "Object", "pObj", ")", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isDebugEnabled", "(", ")", ")", "{", "Tr", ".", "debug", "(", "tc", ",", "\"setProvider pre: pObj(class)=\"...
we need use this interface to replace the provider object @param pObj
[ "we", "need", "use", "this", "interface", "to", "replace", "the", "provider", "object" ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jaxrs.2.0.common/src/org/apache/cxf/jaxrs/model/ProviderInfo.java#L122-L136
train
Set the provider object.
Create a Java method that does the following: "Set the provider object.".
Of course, here is the Java code you requested: ```java public void setProvider(Object pObj) { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { Tr.debug(tc, "setProvider pre: pObj(class)=" + pObj.getClass() + " isProxy=" + Proxy.isProxyClass(pObj.getClass()) + " provider=" + (pro...
querydsl/querydsl
querydsl-codegen/src/main/java/com/querydsl/codegen/ClassPathUtils.java
ClassPathUtils.scanPackage
public static Set<Class<?>> scanPackage(ClassLoader classLoader, Package pkg) throws IOException { return scanPackage(classLoader, pkg.getName()); }
java
public static Set<Class<?>> scanPackage(ClassLoader classLoader, Package pkg) throws IOException { return scanPackage(classLoader, pkg.getName()); }
[ "public", "static", "Set", "<", "Class", "<", "?", ">", ">", "scanPackage", "(", "ClassLoader", "classLoader", ",", "Package", "pkg", ")", "throws", "IOException", "{", "return", "scanPackage", "(", "classLoader", ",", "pkg", ".", "getName", "(", ")", ")",...
Return the classes from the given package and subpackages using the supplied classloader @param classLoader classloader to be used @param pkg package to scan @return set of found classes @throws IOException
[ "Return", "the", "classes", "from", "the", "given", "package", "and", "subpackages", "using", "the", "supplied", "classloader" ]
2bf234caf78549813a1e0f44d9c30ecc5ef734e3
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-codegen/src/main/java/com/querydsl/codegen/ClassPathUtils.java#L40-L42
train
Scan a package for classes.
Create a Java method that does the following: "Scan a package for classes.".
Of course, here is the Java code you requested: ```java public static Set<Class<?>> scanPackage(ClassLoader classLoader, Package pkg) throws IOException { return scanPackage(classLoader, pkg.getName()); } ``` Hope this helps!
undertow-io/undertow
core/src/main/java/io/undertow/util/DateUtils.java
DateUtils.handleIfUnmodifiedSince
public static boolean handleIfUnmodifiedSince(final HttpServerExchange exchange, final Date lastModified) { return handleIfUnmodifiedSince(exchange.getRequestHeaders().getFirst(Headers.IF_UNMODIFIED_SINCE), lastModified); }
java
public static boolean handleIfUnmodifiedSince(final HttpServerExchange exchange, final Date lastModified) { return handleIfUnmodifiedSince(exchange.getRequestHeaders().getFirst(Headers.IF_UNMODIFIED_SINCE), lastModified); }
[ "public", "static", "boolean", "handleIfUnmodifiedSince", "(", "final", "HttpServerExchange", "exchange", ",", "final", "Date", "lastModified", ")", "{", "return", "handleIfUnmodifiedSince", "(", "exchange", ".", "getRequestHeaders", "(", ")", ".", "getFirst", "(", ...
Handles the if-unmodified-since header. returns true if the request should proceed, false otherwise @param exchange the exchange @param lastModified The last modified date @return
[ "Handles", "the", "if", "-", "unmodified", "-", "since", "header", ".", "returns", "true", "if", "the", "request", "should", "proceed", "false", "otherwise" ]
87de0b856a7a4ba8faf5b659537b9af07b763263
https://github.com/undertow-io/undertow/blob/87de0b856a7a4ba8faf5b659537b9af07b763263/core/src/main/java/io/undertow/util/DateUtils.java#L212-L214
train
Handle if unmodified since.
Create a Java method that does the following: "Handle if unmodified since.".
Of course, here is the Java code you requested: ```java public static boolean handleIfUnmodifiedSince(final HttpServerExchange exchange, final Date lastModified) { return handleIfUnmodifiedSince(exchange.getRequestHeaders().getFirst(Headers.IF_UNMODIFIED_SINCE), lastModified); } ``` Hope this helps!
jakenjarvis/Android-OrmLiteContentProvider
ormlite-content-provider-library/src/com/tojc/ormlite/android/framework/MatcherPattern.java
MatcherPattern.setContentUri
public MatcherPattern setContentUri(String authority, String path) { return this.setContentUri(new ContentUriInfo(authority, path)); }
java
public MatcherPattern setContentUri(String authority, String path) { return this.setContentUri(new ContentUriInfo(authority, path)); }
[ "public", "MatcherPattern", "setContentUri", "(", "String", "authority", ",", "String", "path", ")", "{", "return", "this", ".", "setContentUri", "(", "new", "ContentUriInfo", "(", "authority", ",", "path", ")", ")", ";", "}" ]
Set the ContentUri. This is used when you are not using the DefaultContentUri annotation, or want to override the setting of the DefaultContentUri annotation. This method can not be called after MatcherController#hasPreinitialized(). @see com.tojc.ormlite.android.annotation.AdditionalAnnotation.DefaultContentUri @see c...
[ "Set", "the", "ContentUri", ".", "This", "is", "used", "when", "you", "are", "not", "using", "the", "DefaultContentUri", "annotation", "or", "want", "to", "override", "the", "setting", "of", "the", "DefaultContentUri", "annotation", ".", "This", "method", "can...
8f102f0743b308c9f58d43639e98f832fd951985
https://github.com/jakenjarvis/Android-OrmLiteContentProvider/blob/8f102f0743b308c9f58d43639e98f832fd951985/ormlite-content-provider-library/src/com/tojc/ormlite/android/framework/MatcherPattern.java#L156-L158
train
Sets the content URI.
Create a Java method that does the following: "Sets the content URI.".
Of course, here is the Java code you requested: ```java public MatcherPattern setContentUri(String authority, String path) { return this.setContentUri(new ContentUriInfo(authority, path)); } ``` Hope this helps!
goldmansachs/reladomo
reladomo/src/main/java/com/gs/fw/common/mithra/cache/TransactionalSemiUniqueDatedIndex.java
TransactionalSemiUniqueDatedIndex.getFromSemiUnique
public Object getFromSemiUnique(Object dataHolder, List extractors) { Object result = null; TransactionLocalStorage txStorage = (TransactionLocalStorage) perTransactionStorage.get(MithraManagerProvider.getMithraManager().zGetCurrentTransactionWithNoCheck()); FullSemiUniqueDatedIndex perT...
java
public Object getFromSemiUnique(Object dataHolder, List extractors) { Object result = null; TransactionLocalStorage txStorage = (TransactionLocalStorage) perTransactionStorage.get(MithraManagerProvider.getMithraManager().zGetCurrentTransactionWithNoCheck()); FullSemiUniqueDatedIndex perT...
[ "public", "Object", "getFromSemiUnique", "(", "Object", "dataHolder", ",", "List", "extractors", ")", "{", "Object", "result", "=", "null", ";", "TransactionLocalStorage", "txStorage", "=", "(", "TransactionLocalStorage", ")", "perTransactionStorage", ".", "get", "(...
new to differentiate
[ "new", "to", "differentiate" ]
e9a069452eece7a6ef9551caf81a69d3d9a3d990
https://github.com/goldmansachs/reladomo/blob/e9a069452eece7a6ef9551caf81a69d3d9a3d990/reladomo/src/main/java/com/gs/fw/common/mithra/cache/TransactionalSemiUniqueDatedIndex.java#L597-L628
train
Gets the related information from the SEMI - Unique table.
Create a Java method that does the following: "Gets the related information from the SEMI - Unique table.".
Of course, here is the Java code you requested: ```java public Object getFromSemiUnique(Object dataHolder, List extractors) { Object result = null; TransactionLocalStorage txStorage = (TransactionLocalStorage) perTransactionStorage.get(MithraManagerProvider.getMithraManager().zGetCurrentTransact...
mockito/mockito
src/main/java/org/mockito/internal/util/reflection/GenericMetadataSupport.java
GenericMetadataSupport.resolveGenericReturnType
public GenericMetadataSupport resolveGenericReturnType(Method method) { Type genericReturnType = method.getGenericReturnType(); // logger.log("Method '" + method.toGenericString() + "' has return type : " + genericReturnType.getClass().getInterfaces()[0].getSimpleName() + " : " + genericReturnType); ...
java
public GenericMetadataSupport resolveGenericReturnType(Method method) { Type genericReturnType = method.getGenericReturnType(); // logger.log("Method '" + method.toGenericString() + "' has return type : " + genericReturnType.getClass().getInterfaces()[0].getSimpleName() + " : " + genericReturnType); ...
[ "public", "GenericMetadataSupport", "resolveGenericReturnType", "(", "Method", "method", ")", "{", "Type", "genericReturnType", "=", "method", ".", "getGenericReturnType", "(", ")", ";", "// logger.log(\"Method '\" + method.toGenericString() + \"' has return type : \" + genericRetu...
Resolve current method generic return type to a {@link GenericMetadataSupport}. @param method Method to resolve the return type. @return {@link GenericMetadataSupport} representing this generic return type.
[ "Resolve", "current", "method", "generic", "return", "type", "to", "a", "{", "@link", "GenericMetadataSupport", "}", "." ]
c5e2b80af76e3192cae7c9550b70c4d1ab312034
https://github.com/mockito/mockito/blob/c5e2b80af76e3192cae7c9550b70c4d1ab312034/src/main/java/org/mockito/internal/util/reflection/GenericMetadataSupport.java#L270-L286
train
Resolves the generic return type of the given method.
Create a Java method that does the following: "Resolves the generic return type of the given method.".
Of course, here is the Java code you requested: ```java public GenericMetadataSupport resolveGenericReturnType(Method method) { Type genericReturnType = method.getGenericReturnType(); // logger.log("Method '" + method.toGenericString() + "' has return type : " + genericReturnType.getClass().getInterfac...
aws/aws-sdk-java
aws-java-sdk-core/src/main/java/com/amazonaws/AmazonWebServiceClient.java
AmazonWebServiceClient.beforeClientExecution
protected final <T extends AmazonWebServiceRequest> T beforeClientExecution(T request) { T local = request; for (RequestHandler2 handler : requestHandler2s) { local = (T) handler.beforeExecution(local); } return local; }
java
protected final <T extends AmazonWebServiceRequest> T beforeClientExecution(T request) { T local = request; for (RequestHandler2 handler : requestHandler2s) { local = (T) handler.beforeExecution(local); } return local; }
[ "protected", "final", "<", "T", "extends", "AmazonWebServiceRequest", ">", "T", "beforeClientExecution", "(", "T", "request", ")", "{", "T", "local", "=", "request", ";", "for", "(", "RequestHandler2", "handler", ":", "requestHandler2s", ")", "{", "local", "="...
Notify request handlers that we are about to start execution.
[ "Notify", "request", "handlers", "that", "we", "are", "about", "to", "start", "execution", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-core/src/main/java/com/amazonaws/AmazonWebServiceClient.java#L753-L759
train
Returns the request object that was passed to the service.
Create a Java method that does the following: "Returns the request object that was passed to the service.".
Of course, here is the Java code you requested: ```java protected final <T extends AmazonWebServiceRequest> T beforeClientExecution(T request) { T local = request; for (RequestHandler2 handler : requestHandler2s) { local = (T) handler.beforeExecution(local); } return local; ...
OpenLiberty/open-liberty
dev/com.ibm.ws.security/src/com/ibm/ws/security/internal/SecurityServiceImpl.java
SecurityServiceImpl.getAuthenticationService
private AuthenticationService getAuthenticationService(String id) { AuthenticationService service = authentication.getService(id); if (service == null) { throwIllegalArgumentExceptionInvalidAttributeValue(SecurityConfiguration.CFG_KEY_AUTHENTICATION_REF, id); } return service...
java
private AuthenticationService getAuthenticationService(String id) { AuthenticationService service = authentication.getService(id); if (service == null) { throwIllegalArgumentExceptionInvalidAttributeValue(SecurityConfiguration.CFG_KEY_AUTHENTICATION_REF, id); } return service...
[ "private", "AuthenticationService", "getAuthenticationService", "(", "String", "id", ")", "{", "AuthenticationService", "service", "=", "authentication", ".", "getService", "(", "id", ")", ";", "if", "(", "service", "==", "null", ")", "{", "throwIllegalArgumentExcep...
Retrieve the AuthenticationService for the specified id. @param id AuthenticationService id to retrieve @return A non-null AuthenticationService instance.
[ "Retrieve", "the", "AuthenticationService", "for", "the", "specified", "id", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security/src/com/ibm/ws/security/internal/SecurityServiceImpl.java#L444-L450
train
Gets the AuthenticationService.
Create a Java method that does the following: "Gets the AuthenticationService.".
Of course, here is the Java code you requested: ```java private AuthenticationService getAuthenticationService(String id) { AuthenticationService service = authentication.getService(id); if (service == null) { throwIllegalArgumentExceptionInvalidAttributeValue(SecurityConfiguration.CFG_KEY_...
Wadpam/guja
guja-contact/src/main/java/com/wadpam/guja/dao/GeneratedDContactDaoImpl.java
GeneratedDContactDaoImpl.queryByLatitude
public Iterable<DContact> queryByLatitude(Object parent, java.lang.Float latitude) { return queryByField(parent, DContactMapper.Field.LATITUDE.getFieldName(), latitude); }
java
public Iterable<DContact> queryByLatitude(Object parent, java.lang.Float latitude) { return queryByField(parent, DContactMapper.Field.LATITUDE.getFieldName(), latitude); }
[ "public", "Iterable", "<", "DContact", ">", "queryByLatitude", "(", "Object", "parent", ",", "java", ".", "lang", ".", "Float", "latitude", ")", "{", "return", "queryByField", "(", "parent", ",", "DContactMapper", ".", "Field", ".", "LATITUDE", ".", "getFiel...
query-by method for field latitude @param latitude the specified attribute @return an Iterable of DContacts for the specified latitude
[ "query", "-", "by", "method", "for", "field", "latitude" ]
eb8ba8e6794a96ea0dd9744cada4f9ad9618f114
https://github.com/Wadpam/guja/blob/eb8ba8e6794a96ea0dd9744cada4f9ad9618f114/guja-contact/src/main/java/com/wadpam/guja/dao/GeneratedDContactDaoImpl.java#L196-L198
train
query - by method for field latitude
Create a Java method that does the following: "query - by method for field latitude".
Of course, here is the Java code you requested: ```java public Iterable<DContact> queryByLatitude(Object parent, java.lang.Float latitude) { return queryByField(parent, DContactMapper.Field.LATITUDE.getFieldName(), latitude); } ``` Hope this helps!
LearnLib/automatalib
util/src/main/java/net/automatalib/util/tries/SuffixTrie.java
SuffixTrie.add
public SuffixTrieNode<I> add(I symbol, SuffixTrieNode<I> parent) { SuffixTrieNode<I> n = new SuffixTrieNode<>(symbol, parent); if (nodes != null) { nodes.add(n); } return n; }
java
public SuffixTrieNode<I> add(I symbol, SuffixTrieNode<I> parent) { SuffixTrieNode<I> n = new SuffixTrieNode<>(symbol, parent); if (nodes != null) { nodes.add(n); } return n; }
[ "public", "SuffixTrieNode", "<", "I", ">", "add", "(", "I", "symbol", ",", "SuffixTrieNode", "<", "I", ">", "parent", ")", "{", "SuffixTrieNode", "<", "I", ">", "n", "=", "new", "SuffixTrieNode", "<>", "(", "symbol", ",", "parent", ")", ";", "if", "(...
Adds a word to the trie. @param symbol the first symbol of the word. @param parent the remaining suffix of the word. @return a trie node corresponding to the inserted word.
[ "Adds", "a", "word", "to", "the", "trie", "." ]
8a462ec52f6eaab9f8996e344f2163a72cb8aa6e
https://github.com/LearnLib/automatalib/blob/8a462ec52f6eaab9f8996e344f2163a72cb8aa6e/util/src/main/java/net/automatalib/util/tries/SuffixTrie.java#L142-L148
train
Add a new suffix trie node to the set.
Create a Java method that does the following: "Add a new suffix trie node to the set.".
Of course, here is the Java code you requested: ```java public SuffixTrieNode<I> add(I symbol, SuffixTrieNode<I> parent) { SuffixTrieNode<I> n = new SuffixTrieNode<>(symbol, parent); if (nodes != null) { nodes.add(n); } return n; } ``` Hope this helps!
liferay/com-liferay-commerce
commerce-product-service/src/main/java/com/liferay/commerce/product/service/base/CProductLocalServiceBaseImpl.java
CProductLocalServiceBaseImpl.updateCProduct
@Indexable(type = IndexableType.REINDEX) @Override public CProduct updateCProduct(CProduct cProduct) { return cProductPersistence.update(cProduct); }
java
@Indexable(type = IndexableType.REINDEX) @Override public CProduct updateCProduct(CProduct cProduct) { return cProductPersistence.update(cProduct); }
[ "@", "Indexable", "(", "type", "=", "IndexableType", ".", "REINDEX", ")", "@", "Override", "public", "CProduct", "updateCProduct", "(", "CProduct", "cProduct", ")", "{", "return", "cProductPersistence", ".", "update", "(", "cProduct", ")", ";", "}" ]
Updates the c product in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. @param cProduct the c product @return the c product that was updated
[ "Updates", "the", "c", "product", "in", "the", "database", "or", "adds", "it", "if", "it", "does", "not", "yet", "exist", ".", "Also", "notifies", "the", "appropriate", "model", "listeners", "." ]
9e54362d7f59531fc684016ba49ee7cdc3a2f22b
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-service/src/main/java/com/liferay/commerce/product/service/base/CProductLocalServiceBaseImpl.java#L445-L449
train
Updates the c product in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
Create a Java method that does the following: "Updates the c product in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.".
Of course, here is the Java code you requested: ```java @Indexable(type = IndexableType.REINDEX) @Override public CProduct updateCProduct(CProduct cProduct) { return cProductPersistence.update(cProduct); } ``` Hope this helps!
apache/incubator-zipkin
zipkin-server/src/main/java/zipkin2/server/internal/prometheus/ZipkinPrometheusMetricsConfiguration.java
ZipkinPrometheusMetricsConfiguration.notFoundMetricCollector
@Bean @Order(1) ArmeriaServerConfigurator notFoundMetricCollector() { // Use glob instead of catch-all to avoid adding it to the trie router. return sb -> sb.service(PathMapping.ofGlob("/**"), (ctx, req) -> HttpResponse.of(HttpStatus.NOT_FOUND)); }
java
@Bean @Order(1) ArmeriaServerConfigurator notFoundMetricCollector() { // Use glob instead of catch-all to avoid adding it to the trie router. return sb -> sb.service(PathMapping.ofGlob("/**"), (ctx, req) -> HttpResponse.of(HttpStatus.NOT_FOUND)); }
[ "@", "Bean", "@", "Order", "(", "1", ")", "ArmeriaServerConfigurator", "notFoundMetricCollector", "(", ")", "{", "// Use glob instead of catch-all to avoid adding it to the trie router.", "return", "sb", "->", "sb", ".", "service", "(", "PathMapping", ".", "ofGlob", "("...
service is handled by this.
[ "service", "is", "handled", "by", "this", "." ]
89b2fab983fc626b3be32ce9d7cf64b3f01f1a87
https://github.com/apache/incubator-zipkin/blob/89b2fab983fc626b3be32ce9d7cf64b3f01f1a87/zipkin-server/src/main/java/zipkin2/server/internal/prometheus/ZipkinPrometheusMetricsConfiguration.java#L75-L80
train
A service to serve the not found metric.
Create a Java method that does the following: "A service to serve the not found metric.".
Of course, here is the Java code you requested: ```java @Bean @Order(1) ArmeriaServerConfigurator notFoundMetricCollector() { // Use glob instead of catch-all to avoid adding it to the trie router. return sb -> sb.service(PathMapping.ofGlob("/**"), (ctx, req) -> HttpResponse.of(HttpStatus.NOT_FOUND)); } ...
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/HSQLInterface.java
HSQLInterface.runDDLCommand
public void runDDLCommand(String ddl) throws HSQLParseException { sessionProxy.clearLocalTables(); Result result = sessionProxy.executeDirectStatement(ddl); if (result.hasError()) { throw new HSQLParseException(result.getMainString()); } }
java
public void runDDLCommand(String ddl) throws HSQLParseException { sessionProxy.clearLocalTables(); Result result = sessionProxy.executeDirectStatement(ddl); if (result.hasError()) { throw new HSQLParseException(result.getMainString()); } }
[ "public", "void", "runDDLCommand", "(", "String", "ddl", ")", "throws", "HSQLParseException", "{", "sessionProxy", ".", "clearLocalTables", "(", ")", ";", "Result", "result", "=", "sessionProxy", ".", "executeDirectStatement", "(", "ddl", ")", ";", "if", "(", ...
Modify the current schema with a SQL DDL command. @param ddl The SQL DDL statement to be run. @throws HSQLParseException Throws exception if SQL parse error is encountered.
[ "Modify", "the", "current", "schema", "with", "a", "SQL", "DDL", "command", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/HSQLInterface.java#L291-L297
train
Run DDL command.
Create a Java method that does the following: "Run DDL command.".
Of course, here is the Java code you requested: ```java public void runDDLCommand(String ddl) throws HSQLParseException { sessionProxy.clearLocalTables(); Result result = sessionProxy.executeDirectStatement(ddl); if (result.hasError()) { throw new HSQLParseException(result.getMainSt...
kejunxia/AndroidMvc
library/android-mvc-core/src/main/java/com/shipdream/lib/android/mvc/MvcGraph.java
MvcGraph.clearMonitors
public void clearMonitors() { if (uiThreadRunner.isOnUiThread()) { graph.clearMonitors(); } else { uiThreadRunner.post(new Runnable() { @Override public void run() { graph.clearMonitors(); } }); ...
java
public void clearMonitors() { if (uiThreadRunner.isOnUiThread()) { graph.clearMonitors(); } else { uiThreadRunner.post(new Runnable() { @Override public void run() { graph.clearMonitors(); } }); ...
[ "public", "void", "clearMonitors", "(", ")", "{", "if", "(", "uiThreadRunner", ".", "isOnUiThread", "(", ")", ")", "{", "graph", ".", "clearMonitors", "(", ")", ";", "}", "else", "{", "uiThreadRunner", ".", "post", "(", "new", "Runnable", "(", ")", "{"...
Clear {@link Graph.Monitor} which will be called the graph is about to inject or release an object
[ "Clear", "{" ]
c7893f0a13119d64297b9eb2988f7323b7da5bbc
https://github.com/kejunxia/AndroidMvc/blob/c7893f0a13119d64297b9eb2988f7323b7da5bbc/library/android-mvc-core/src/main/java/com/shipdream/lib/android/mvc/MvcGraph.java#L135-L146
train
Clear the forest monitoring.
Create a Java method that does the following: "Clear the forest monitoring.".
Of course, here is the Java code you requested: ```java public void clearMonitors() { if (uiThreadRunner.isOnUiThread()) { graph.clearMonitors(); } else { uiThreadRunner.post(new Runnable() { @Override public void run() { graph...
igniterealtime/Smack
smack-experimental/src/main/java/org/jivesoftware/smackx/eme/element/ExplicitMessageEncryptionElement.java
ExplicitMessageEncryptionElement.hasProtocol
public static boolean hasProtocol(Message message, String protocolNamespace) { List<ExtensionElement> extensionElements = message.getExtensions( ExplicitMessageEncryptionElement.ELEMENT, ExplicitMessageEncryptionElement.NAMESPACE); for (ExtensionElement extensionElement ...
java
public static boolean hasProtocol(Message message, String protocolNamespace) { List<ExtensionElement> extensionElements = message.getExtensions( ExplicitMessageEncryptionElement.ELEMENT, ExplicitMessageEncryptionElement.NAMESPACE); for (ExtensionElement extensionElement ...
[ "public", "static", "boolean", "hasProtocol", "(", "Message", "message", ",", "String", "protocolNamespace", ")", "{", "List", "<", "ExtensionElement", ">", "extensionElements", "=", "message", ".", "getExtensions", "(", "ExplicitMessageEncryptionElement", ".", "ELEME...
Return true, if the {@code message} already contains an EME element with the specified {@code protocolNamespace}. @param message message @param protocolNamespace namespace @return true if message has EME element for that namespace, otherwise false
[ "Return", "true", "if", "the", "{", "@code", "message", "}", "already", "contains", "an", "EME", "element", "with", "the", "specified", "{", "@code", "protocolNamespace", "}", "." ]
870756997faec1e1bfabfac0cd6c2395b04da873
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-experimental/src/main/java/org/jivesoftware/smackx/eme/element/ExplicitMessageEncryptionElement.java#L157-L170
train
Check if the message has a protocol with the given namespace.
Create a Java method that does the following: "Check if the message has a protocol with the given namespace.".
Of course, here is the Java code you requested: ```java public static boolean hasProtocol(Message message, String protocolNamespace) { List<ExtensionElement> extensionElements = message.getExtensions( ExplicitMessageEncryptionElement.ELEMENT, ExplicitMessageEncryptionElement.NAM...
scireum/parsii
src/main/java/parsii/eval/Parser.java
Parser.product
protected Expression product() { Expression left = power(); if (tokenizer.current().isSymbol("*")) { tokenizer.consume(); Expression right = product(); return reOrder(left, right, BinaryOperation.Op.MULTIPLY); } if (tokenizer.current().isSymbol("/")) {...
java
protected Expression product() { Expression left = power(); if (tokenizer.current().isSymbol("*")) { tokenizer.consume(); Expression right = product(); return reOrder(left, right, BinaryOperation.Op.MULTIPLY); } if (tokenizer.current().isSymbol("/")) {...
[ "protected", "Expression", "product", "(", ")", "{", "Expression", "left", "=", "power", "(", ")", ";", "if", "(", "tokenizer", ".", "current", "(", ")", ".", "isSymbol", "(", "\"*\"", ")", ")", "{", "tokenizer", ".", "consume", "(", ")", ";", "Expre...
Parser rule for parsing a product. <p> A product is a <tt>power</tt> which might be followed by *, / or % as operator and another <tt>product</tt>. @return a product parsed from the given input
[ "Parser", "rule", "for", "parsing", "a", "product", ".", "<p", ">", "A", "product", "is", "a", "<tt", ">", "power<", "/", "tt", ">", "which", "might", "be", "followed", "by", "*", "/", "or", "%", "as", "operator", "and", "another", "<tt", ">", "pro...
fbf686155b1147b9e07ae21dcd02820b15c79a8c
https://github.com/scireum/parsii/blob/fbf686155b1147b9e07ae21dcd02820b15c79a8c/src/main/java/parsii/eval/Parser.java#L275-L293
train
Product a single integer.
Create a Java method that does the following: "Product a single integer.".
Of course, here is the Java code you requested: ```java protected Expression product() { Expression left = power(); if (tokenizer.current().isSymbol("*")) { tokenizer.consume(); Expression right = product(); return reOrder(left, right, BinaryOperation.Op.MULTIPLY); ...
apache/groovy
src/main/java/org/codehaus/groovy/runtime/IOGroovyMethods.java
IOGroovyMethods.withCloseable
public static <T, U extends AutoCloseable> T withCloseable(U self, @ClosureParams(value=FirstParam.class) Closure<T> action) throws Exception { Throwable thrown = null; try { return action.call(self); } catch (Throwable e) { thrown = e; throw e; } fina...
java
public static <T, U extends AutoCloseable> T withCloseable(U self, @ClosureParams(value=FirstParam.class) Closure<T> action) throws Exception { Throwable thrown = null; try { return action.call(self); } catch (Throwable e) { thrown = e; throw e; } fina...
[ "public", "static", "<", "T", ",", "U", "extends", "AutoCloseable", ">", "T", "withCloseable", "(", "U", "self", ",", "@", "ClosureParams", "(", "value", "=", "FirstParam", ".", "class", ")", "Closure", "<", "T", ">", "action", ")", "throws", "Exception"...
Allows this AutoCloseable to be used within the closure, ensuring that it is closed once the closure has been executed and before this method returns. <p> As with the try-with-resources statement, if multiple exceptions are thrown the exception from the closure will be returned and the exception from closing will be ad...
[ "Allows", "this", "AutoCloseable", "to", "be", "used", "within", "the", "closure", "ensuring", "that", "it", "is", "closed", "once", "the", "closure", "has", "been", "executed", "and", "before", "this", "method", "returns", ".", "<p", ">", "As", "with", "t...
71cf20addb611bb8d097a59e395fd20bc7f31772
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/runtime/IOGroovyMethods.java#L1638-L1655
train
A method that takes an AutoCloseable object and a closure that will close the AutoCloseable object.
Create a Java method that does the following: "A method that takes an AutoCloseable object and a closure that will close the AutoCloseable object.".
Of course, here is the Java code you requested: ```java public static <T, U extends AutoCloseable> T withCloseable(U self, @ClosureParams(value=FirstParam.class) Closure<T> action) throws Exception { Throwable thrown = null; try { return action.call(self); } catch (Throwable e) { ...
eldur/jwbf
src/main/java/net/sourceforge/jwbf/mediawiki/actions/queries/ImageUsageTitles.java
ImageUsageTitles.parseElements
@Override protected ImmutableList<String> parseElements(String s) { ImmutableList.Builder<String> titleCollection = ImmutableList.builder(); Optional<XmlElement> childOpt = XmlConverter.getChildOpt(s, "query", "imageusage"); if (childOpt.isPresent()) { for (XmlElement element : childOpt.get().getChi...
java
@Override protected ImmutableList<String> parseElements(String s) { ImmutableList.Builder<String> titleCollection = ImmutableList.builder(); Optional<XmlElement> childOpt = XmlConverter.getChildOpt(s, "query", "imageusage"); if (childOpt.isPresent()) { for (XmlElement element : childOpt.get().getChi...
[ "@", "Override", "protected", "ImmutableList", "<", "String", ">", "parseElements", "(", "String", "s", ")", "{", "ImmutableList", ".", "Builder", "<", "String", ">", "titleCollection", "=", "ImmutableList", ".", "builder", "(", ")", ";", "Optional", "<", "X...
picks the article name from a MediaWiki api response. @param s text for parsing
[ "picks", "the", "article", "name", "from", "a", "MediaWiki", "api", "response", "." ]
ee17ea2fa5a26f17c8332a094b2db86dd596d1ff
https://github.com/eldur/jwbf/blob/ee17ea2fa5a26f17c8332a094b2db86dd596d1ff/src/main/java/net/sourceforge/jwbf/mediawiki/actions/queries/ImageUsageTitles.java#L90-L100
train
Override this method to parse the XML elements of the query tag.
Create a Java method that does the following: "Override this method to parse the XML elements of the query tag.".
Of course, here is the Java code you requested: ```java @Override protected ImmutableList<String> parseElements(String s) { ImmutableList.Builder<String> titleCollection = ImmutableList.builder(); Optional<XmlElement> childOpt = XmlConverter.getChildOpt(s, "query", "imageusage"); if (childOpt.isPresent()...
aws/aws-sdk-java
aws-java-sdk-cloudwatch/src/main/java/com/amazonaws/services/cloudwatch/model/PutMetricDataRequest.java
PutMetricDataRequest.getMetricData
public java.util.List<MetricDatum> getMetricData() { if (metricData == null) { metricData = new com.amazonaws.internal.SdkInternalList<MetricDatum>(); } return metricData; }
java
public java.util.List<MetricDatum> getMetricData() { if (metricData == null) { metricData = new com.amazonaws.internal.SdkInternalList<MetricDatum>(); } return metricData; }
[ "public", "java", ".", "util", ".", "List", "<", "MetricDatum", ">", "getMetricData", "(", ")", "{", "if", "(", "metricData", "==", "null", ")", "{", "metricData", "=", "new", "com", ".", "amazonaws", ".", "internal", ".", "SdkInternalList", "<", "Metric...
<p> The data for the metric. The array can include no more than 20 metrics per call. </p> @return The data for the metric. The array can include no more than 20 metrics per call.
[ "<p", ">", "The", "data", "for", "the", "metric", ".", "The", "array", "can", "include", "no", "more", "than", "20", "metrics", "per", "call", ".", "<", "/", "p", ">" ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-cloudwatch/src/main/java/com/amazonaws/services/cloudwatch/model/PutMetricDataRequest.java#L114-L119
train
Gets the value of the metricData property.
Create a Java method that does the following: "Gets the value of the metricData property.".
Of course, here is the Java code you requested: ```java public java.util.List<MetricDatum> getMetricData() { if (metricData == null) { metricData = new com.amazonaws.internal.SdkInternalList<MetricDatum>(); } return metricData; } ``` Hope this helps!
yan74/afplib
org.afplib/src/main/java/org/afplib/afplib/impl/BRGImpl.java
BRGImpl.eIsSet
@Override public boolean eIsSet(int featureID) { switch (featureID) { case AfplibPackage.BRG__RGRP_NAME: return RGRP_NAME_EDEFAULT == null ? rGrpName != null : !RGRP_NAME_EDEFAULT.equals(rGrpName); case AfplibPackage.BRG__TRIPLETS: return triplets != null && !triplets.isEmpty(); } return super.eIsS...
java
@Override public boolean eIsSet(int featureID) { switch (featureID) { case AfplibPackage.BRG__RGRP_NAME: return RGRP_NAME_EDEFAULT == null ? rGrpName != null : !RGRP_NAME_EDEFAULT.equals(rGrpName); case AfplibPackage.BRG__TRIPLETS: return triplets != null && !triplets.isEmpty(); } return super.eIsS...
[ "@", "Override", "public", "boolean", "eIsSet", "(", "int", "featureID", ")", "{", "switch", "(", "featureID", ")", "{", "case", "AfplibPackage", ".", "BRG__RGRP_NAME", ":", "return", "RGRP_NAME_EDEFAULT", "==", "null", "?", "rGrpName", "!=", "null", ":", "!...
<!-- begin-user-doc --> <!-- end-user-doc --> @generated
[ "<!", "--", "begin", "-", "user", "-", "doc", "--", ">", "<!", "--", "end", "-", "user", "-", "doc", "--", ">" ]
9ff0513f9448bdf8c0b0e31dc4910c094c48fb2f
https://github.com/yan74/afplib/blob/9ff0513f9448bdf8c0b0e31dc4910c094c48fb2f/org.afplib/src/main/java/org/afplib/afplib/impl/BRGImpl.java#L197-L206
train
Replies if the feature is set to a value.
Create a Java method that does the following: "Replies if the feature is set to a value.".
Of course, here is the Java code you requested: ```java @Override public boolean eIsSet(int featureID) { switch (featureID) { case AfplibPackage.BRG__RGRP_NAME: return RGRP_NAME_EDEFAULT == null ? rGrpName != null : !RGRP_NAME_EDEFAULT.equals(rGrpName); case AfplibPackage.BRG__TRIPLETS: return triplet...
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WTableRenderer.java
WTableRenderer.paintSelectionDetails
private void paintSelectionDetails(final WTable table, final XmlStringBuilder xml) { boolean multiple = table.getSelectMode() == SelectMode.MULTIPLE; xml.appendTagOpen("ui:rowselection"); xml.appendOptionalAttribute("multiple", multiple, "true"); boolean toggleSubRows = multiple && table.isToggleSubRowSelectio...
java
private void paintSelectionDetails(final WTable table, final XmlStringBuilder xml) { boolean multiple = table.getSelectMode() == SelectMode.MULTIPLE; xml.appendTagOpen("ui:rowselection"); xml.appendOptionalAttribute("multiple", multiple, "true"); boolean toggleSubRows = multiple && table.isToggleSubRowSelectio...
[ "private", "void", "paintSelectionDetails", "(", "final", "WTable", "table", ",", "final", "XmlStringBuilder", "xml", ")", "{", "boolean", "multiple", "=", "table", ".", "getSelectMode", "(", ")", "==", "SelectMode", ".", "MULTIPLE", ";", "xml", ".", "appendTa...
Paint the row selection aspects of the table. @param table the WDataTable being rendered @param xml the string builder in use
[ "Paint", "the", "row", "selection", "aspects", "of", "the", "table", "." ]
d1a2b2243270067db030feb36ca74255aaa94436
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WTableRenderer.java#L185-L209
train
Paint the selection details.
Create a Java method that does the following: "Paint the selection details.".
Of course, here is the Java code you requested: ```java private void paintSelectionDetails(final WTable table, final XmlStringBuilder xml) { boolean multiple = table.getSelectMode() == SelectMode.MULTIPLE; xml.appendTagOpen("ui:rowselection"); xml.appendOptionalAttribute("multiple", multiple, "true"); boolean...
RestComm/jss7
management/shell-transport/src/main/java/org/restcomm/ss7/management/transceiver/Message.java
Message.encode
protected void encode(ByteBuffer txBuffer) { txBuffer.position(4); // Length int txBuffer.put(data); int length = txBuffer.position(); txBuffer.rewind(); txBuffer.putInt(length); txBuffer.position(length); }
java
protected void encode(ByteBuffer txBuffer) { txBuffer.position(4); // Length int txBuffer.put(data); int length = txBuffer.position(); txBuffer.rewind(); txBuffer.putInt(length); txBuffer.position(length); }
[ "protected", "void", "encode", "(", "ByteBuffer", "txBuffer", ")", "{", "txBuffer", ".", "position", "(", "4", ")", ";", "// Length int", "txBuffer", ".", "put", "(", "data", ")", ";", "int", "length", "=", "txBuffer", ".", "position", "(", ")", ";", "...
Encodes this message. The protocol is first 4 bytes are length of this command followed by the byte stream of command @param txBuffer
[ "Encodes", "this", "message", ".", "The", "protocol", "is", "first", "4", "bytes", "are", "length", "of", "this", "command", "followed", "by", "the", "byte", "stream", "of", "command" ]
402b4b3984e581c581e309cb5f6a858fde6dbc33
https://github.com/RestComm/jss7/blob/402b4b3984e581c581e309cb5f6a858fde6dbc33/management/shell-transport/src/main/java/org/restcomm/ss7/management/transceiver/Message.java#L70-L82
train
Encode the data into the given byte buffer.
Create a Java method that does the following: "Encode the data into the given byte buffer.".
Of course, here is the Java code you requested: ```java protected void encode(ByteBuffer txBuffer) { txBuffer.position(4); // Length int txBuffer.put(data); int length = txBuffer.position(); txBuffer.rewind(); txBuffer.putInt(length); txBuffer.position(length); ...
apache/flink
flink-core/src/main/java/org/apache/flink/types/StringValue.java
StringValue.setValue
public void setValue(char[] chars, int offset, int len) { checkNotNull(chars); if (offset < 0 || len < 0 || offset > chars.length - len) { throw new IndexOutOfBoundsException(); } ensureSize(len); System.arraycopy(chars, offset, this.value, 0, len); this.len = len; this.hashCode = 0; }
java
public void setValue(char[] chars, int offset, int len) { checkNotNull(chars); if (offset < 0 || len < 0 || offset > chars.length - len) { throw new IndexOutOfBoundsException(); } ensureSize(len); System.arraycopy(chars, offset, this.value, 0, len); this.len = len; this.hashCode = 0; }
[ "public", "void", "setValue", "(", "char", "[", "]", "chars", ",", "int", "offset", ",", "int", "len", ")", "{", "checkNotNull", "(", "chars", ")", ";", "if", "(", "offset", "<", "0", "||", "len", "<", "0", "||", "offset", ">", "chars", ".", "len...
Sets the value of the StringValue to a substring of the given value. @param chars The new string value (as a character array). @param offset The position to start the substring. @param len The length of the substring.
[ "Sets", "the", "value", "of", "the", "StringValue", "to", "a", "substring", "of", "the", "given", "value", "." ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/types/StringValue.java#L221-L231
train
Sets the value of this object from the specified char array.
Create a Java method that does the following: "Sets the value of this object from the specified char array.".
Of course, here is the Java code you requested: ```java public void setValue(char[] chars, int offset, int len) { checkNotNull(chars); if (offset < 0 || len < 0 || offset > chars.length - len) { throw new IndexOutOfBoundsException(); } ensureSize(len); System.arraycopy(chars, offset, this.value, 0, len);...
braintree/braintree_android
Braintree/src/main/java/com/braintreepayments/api/LocalPayment.java
LocalPayment.approvePayment
public static void approvePayment(BraintreeFragment fragment, LocalPaymentRequest request) { fragment.browserSwitch(BraintreeRequestCodes.LOCAL_PAYMENT, request.getApprovalUrl()); fragment.sendAnalyticsEvent(paymentTypeForAnalytics() + ".local-payment.webswitch.initiate.succeeded"); }
java
public static void approvePayment(BraintreeFragment fragment, LocalPaymentRequest request) { fragment.browserSwitch(BraintreeRequestCodes.LOCAL_PAYMENT, request.getApprovalUrl()); fragment.sendAnalyticsEvent(paymentTypeForAnalytics() + ".local-payment.webswitch.initiate.succeeded"); }
[ "public", "static", "void", "approvePayment", "(", "BraintreeFragment", "fragment", ",", "LocalPaymentRequest", "request", ")", "{", "fragment", ".", "browserSwitch", "(", "BraintreeRequestCodes", ".", "LOCAL_PAYMENT", ",", "request", ".", "getApprovalUrl", "(", ")", ...
Initiates the browser switch for a payment flow by opening a browser where the customer can authenticate with their bank. @param fragment {@link BraintreeFragment} @param request {@link LocalPaymentRequest} which has already been sent to {@link #startPayment(BraintreeFragment, LocalPaymentRequest, BraintreeResponseLis...
[ "Initiates", "the", "browser", "switch", "for", "a", "payment", "flow", "by", "opening", "a", "browser", "where", "the", "customer", "can", "authenticate", "with", "their", "bank", "." ]
07b32e6fad73f9fb8432971b0e79fc8c94b11873
https://github.com/braintree/braintree_android/blob/07b32e6fad73f9fb8432971b0e79fc8c94b11873/Braintree/src/main/java/com/braintreepayments/api/LocalPayment.java#L107-L110
test
Approve a local payment.
Create a Java method that does the following: "Approve a local payment.".
Of course, here is the Java code you requested: ```java public static void approvePayment(BraintreeFragment fragment, LocalPaymentRequest request) { fragment.browserSwitch(BraintreeRequestCodes.LOCAL_PAYMENT, request.getApprovalUrl()); fragment.sendAnalyticsEvent(paymentTypeForAnalytics() + ".local-pay...
lightblue-platform/lightblue-migrator
facade/src/main/java/com/redhat/lightblue/migrator/facade/ServiceFacade.java
ServiceFacade.getWithTimeout
private <T> T getWithTimeout(ListenableFuture<T> listenableFuture, String methodName, FacadeOperation facadeOperation, int destinationCallTimeout) throws InterruptedException, ExecutionException, TimeoutException { // not reading from source/legacy means this is either proxy or kinda proxy phase // in t...
java
private <T> T getWithTimeout(ListenableFuture<T> listenableFuture, String methodName, FacadeOperation facadeOperation, int destinationCallTimeout) throws InterruptedException, ExecutionException, TimeoutException { // not reading from source/legacy means this is either proxy or kinda proxy phase // in t...
[ "private", "<", "T", ">", "T", "getWithTimeout", "(", "ListenableFuture", "<", "T", ">", "listenableFuture", ",", "String", "methodName", ",", "FacadeOperation", "facadeOperation", ",", "int", "destinationCallTimeout", ")", "throws", "InterruptedException", ",", "Ex...
Call destination (lightblue) using a timeout in dual read/write phases. Do not use facade timeout during lightblue proxy and kinda proxy phases (when reading from source is disabled). @param listenableFuture @param methodName method name is used to read method specific timeout configuration @param destinationCallTimeo...
[ "Call", "destination", "(", "lightblue", ")", "using", "a", "timeout", "in", "dual", "read", "/", "write", "phases", ".", "Do", "not", "use", "facade", "timeout", "during", "lightblue", "proxy", "and", "kinda", "proxy", "phases", "(", "when", "reading", "f...
ec20748557b40d1f7851e1816d1b76dae48d2027
https://github.com/lightblue-platform/lightblue-migrator/blob/ec20748557b40d1f7851e1816d1b76dae48d2027/facade/src/main/java/com/redhat/lightblue/migrator/facade/ServiceFacade.java#L198-L206
train
Get with timeout.
Create a Java method that does the following: "Get with timeout.".
Of course, here is the Java code you requested: ```java private <T> T getWithTimeout(ListenableFuture<T> listenableFuture, String methodName, FacadeOperation facadeOperation, int destinationCallTimeout) throws InterruptedException, ExecutionException, TimeoutException { // not reading from source/legacy means ...
datacleaner/DataCleaner
engine/core/src/main/java/org/datacleaner/util/PreviewUtils.java
PreviewUtils.createRelevantAnalysisJobBuildersList
private static List<AnalysisJobBuilder> createRelevantAnalysisJobBuildersList(AnalysisJobBuilder ajb) { final List<AnalysisJobBuilder> relevantAnalysisJobBuilders = new LinkedList<>(); relevantAnalysisJobBuilders.add(ajb); while (!ajb.isRootJobBuilder()) { ajb = ajb.getParentJobBuild...
java
private static List<AnalysisJobBuilder> createRelevantAnalysisJobBuildersList(AnalysisJobBuilder ajb) { final List<AnalysisJobBuilder> relevantAnalysisJobBuilders = new LinkedList<>(); relevantAnalysisJobBuilders.add(ajb); while (!ajb.isRootJobBuilder()) { ajb = ajb.getParentJobBuild...
[ "private", "static", "List", "<", "AnalysisJobBuilder", ">", "createRelevantAnalysisJobBuildersList", "(", "AnalysisJobBuilder", "ajb", ")", "{", "final", "List", "<", "AnalysisJobBuilder", ">", "relevantAnalysisJobBuilders", "=", "new", "LinkedList", "<>", "(", ")", ...
Creates a list with _just_ the relevant {@link AnalysisJobBuilder}s to include in the preview job @param ajb @return
[ "Creates", "a", "list", "with", "_just_", "the", "relevant", "{", "@link", "AnalysisJobBuilder", "}", "s", "to", "include", "in", "the", "preview", "job" ]
9aa01fdac3560cef51c55df3cb2ac5c690b57639
https://github.com/datacleaner/DataCleaner/blob/9aa01fdac3560cef51c55df3cb2ac5c690b57639/engine/core/src/main/java/org/datacleaner/util/PreviewUtils.java#L146-L153
train
Create relevant analysis job builders list.
Create a Java method that does the following: "Create relevant analysis job builders list.".
Of course, here is the Java code you requested: ```java private static List<AnalysisJobBuilder> createRelevantAnalysisJobBuildersList(AnalysisJobBuilder ajb) { final List<AnalysisJobBuilder> relevantAnalysisJobBuilders = new LinkedList<>(); relevantAnalysisJobBuilders.add(ajb); while (!ajb.isRo...
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/csv/CSVReader.java
CSVReader._getNextLine
@Nullable private String _getNextLine () throws IOException { if (_isClosed ()) { m_bHasNext = false; return null; } if (!m_bLinesSkiped) { // Perform skip of lines exactly once for (int i = 0; i < m_nSkipLines; i++) m_aLineReader.readLine (); m_bLinesSkipe...
java
@Nullable private String _getNextLine () throws IOException { if (_isClosed ()) { m_bHasNext = false; return null; } if (!m_bLinesSkiped) { // Perform skip of lines exactly once for (int i = 0; i < m_nSkipLines; i++) m_aLineReader.readLine (); m_bLinesSkipe...
[ "@", "Nullable", "private", "String", "_getNextLine", "(", ")", "throws", "IOException", "{", "if", "(", "_isClosed", "(", ")", ")", "{", "m_bHasNext", "=", "false", ";", "return", "null", ";", "}", "if", "(", "!", "m_bLinesSkiped", ")", "{", "// Perform...
Reads the next line from the file. @return the next line from the file without trailing newline @throws IOException if bad things happen during the read
[ "Reads", "the", "next", "line", "from", "the", "file", "." ]
d28c03565f44a0b804d96028d0969f9bb38c4313
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/csv/CSVReader.java#L416-L441
train
Get the next line from the file.
Create a Java method that does the following: "Get the next line from the file.".
Of course, here is the Java code you requested: ```java @Nullable private String _getNextLine () throws IOException { if (_isClosed ()) { m_bHasNext = false; return null; } if (!m_bLinesSkiped) { // Perform skip of lines exactly once for (int i = 0; i < m_nSkipLines; i+...
NessComputing/migratory
migratory-core/src/main/java/com/nesscomputing/migratory/Migratory.java
Migratory.dbValidate
public Map<String, ValidationResult> dbValidate(final Collection<String> personalities, final MigratoryOption ... options) throws MigratoryException { init(); final InternalValidator validator = new InternalValidator(this); return validator.validate(personalities, options); }
java
public Map<String, ValidationResult> dbValidate(final Collection<String> personalities, final MigratoryOption ... options) throws MigratoryException { init(); final InternalValidator validator = new InternalValidator(this); return validator.validate(personalities, options); }
[ "public", "Map", "<", "String", ",", "ValidationResult", ">", "dbValidate", "(", "final", "Collection", "<", "String", ">", "personalities", ",", "final", "MigratoryOption", "...", "options", ")", "throws", "MigratoryException", "{", "init", "(", ")", ";", "fi...
Run validation on the database. Make sure that all the changes recorded in the database are the same as the ones that should be applied.
[ "Run", "validation", "on", "the", "database", ".", "Make", "sure", "that", "all", "the", "changes", "recorded", "in", "the", "database", "are", "the", "same", "as", "the", "ones", "that", "should", "be", "applied", "." ]
73ca862e79ee2588f1cc4101cd70b0a8b1c88398
https://github.com/NessComputing/migratory/blob/73ca862e79ee2588f1cc4101cd70b0a8b1c88398/migratory-core/src/main/java/com/nesscomputing/migratory/Migratory.java#L170-L175
valid
Validate a collection of personalities.
Create a Java method that does the following: "Validate a collection of personalities.".
Of course, here is the Java code you requested: ```java public Map<String, ValidationResult> dbValidate(final Collection<String> personalities, final MigratoryOption ... options) throws MigratoryException { init(); final InternalValidator validator = new InternalValidator(this); return vali...
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/nephele/jobmanager/splitassigner/LocatableInputSplitList.java
LocatableInputSplitList.getInstanceSplitList
private Queue<QueueElem> getInstanceSplitList(final AbstractInstance instance) { Queue<QueueElem> instanceSplitList = this.instanceMap.get(instance); if (instanceSplitList == null) { // Create and populate instance specific split list instanceSplitList = new PriorityQueue<LocatableInputSplitList.QueueElem>(...
java
private Queue<QueueElem> getInstanceSplitList(final AbstractInstance instance) { Queue<QueueElem> instanceSplitList = this.instanceMap.get(instance); if (instanceSplitList == null) { // Create and populate instance specific split list instanceSplitList = new PriorityQueue<LocatableInputSplitList.QueueElem>(...
[ "private", "Queue", "<", "QueueElem", ">", "getInstanceSplitList", "(", "final", "AbstractInstance", "instance", ")", "{", "Queue", "<", "QueueElem", ">", "instanceSplitList", "=", "this", ".", "instanceMap", ".", "get", "(", "instance", ")", ";", "if", "(", ...
Returns a list of locatable input splits specifically ordered for the given {@link AbstractInstance}. When the list is initially created, it contains all the unconsumed located input splits at that point in time, ascendingly ordered by the minimum distance between the input splits' storage locations and the given {@lin...
[ "Returns", "a", "list", "of", "locatable", "input", "splits", "specifically", "ordered", "for", "the", "given", "{", "@link", "AbstractInstance", "}", ".", "When", "the", "list", "is", "initially", "created", "it", "contains", "all", "the", "unconsumed", "loca...
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/jobmanager/splitassigner/LocatableInputSplitList.java#L169-L205
train
Gets the instance split list.
Create a Java method that does the following: "Gets the instance split list.".
Of course, here is the Java code you requested: ```java private Queue<QueueElem> getInstanceSplitList(final AbstractInstance instance) { Queue<QueueElem> instanceSplitList = this.instanceMap.get(instance); if (instanceSplitList == null) { // Create and populate instance specific split list instanceSplitLis...
OpenLiberty/open-liberty
dev/com.ibm.ws.security.openidconnect.clients.common/src/com/ibm/ws/security/openidconnect/token/JWSHeader.java
JWSHeader.setJwkUrl
public JWSHeader setJwkUrl(String jwkUrl) { this.jwkUrl = jwkUrl; this.put(HeaderConstants.JWK_URL, jwkUrl); return this; }
java
public JWSHeader setJwkUrl(String jwkUrl) { this.jwkUrl = jwkUrl; this.put(HeaderConstants.JWK_URL, jwkUrl); return this; }
[ "public", "JWSHeader", "setJwkUrl", "(", "String", "jwkUrl", ")", "{", "this", ".", "jwkUrl", "=", "jwkUrl", ";", "this", ".", "put", "(", "HeaderConstants", ".", "JWK_URL", ",", "jwkUrl", ")", ";", "return", "this", ";", "}" ]
Sets the JSON Web Key URL header parameter that is an absolute URL that refers to a resource for a set of JSON-encoded public keys, one of which corresponds to the key that was used to digitally sign the JWS or {@code null} for none. <p> Overriding is only supported for the purpose of calling the super implementation ...
[ "Sets", "the", "JSON", "Web", "Key", "URL", "header", "parameter", "that", "is", "an", "absolute", "URL", "that", "refers", "to", "a", "resource", "for", "a", "set", "of", "JSON", "-", "encoded", "public", "keys", "one", "of", "which", "corresponds", "to...
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.openidconnect.clients.common/src/com/ibm/ws/security/openidconnect/token/JWSHeader.java#L134-L138
train
Sets the JWK URL.
Create a Java method that does the following: "Sets the JWK URL.".
Of course, here is the Java code you requested: ```java public JWSHeader setJwkUrl(String jwkUrl) { this.jwkUrl = jwkUrl; this.put(HeaderConstants.JWK_URL, jwkUrl); return this; } ``` Hope this helps!
hypercube1024/firefly
firefly-common/src/main/java/com/firefly/utils/collection/ConcurrentLinkedHashMap.java
ConcurrentLinkedHashMap.entrySet
@Override public Set<java.util.Map.Entry<K, V>> entrySet() { try { lockAllSegments(); Set<java.util.Map.Entry<K, V>> set = new HashSet<>(); for (LinkedHashMapSegment<K, V> seg : segments) { set.addAll(seg.entrySet()); } return set; ...
java
@Override public Set<java.util.Map.Entry<K, V>> entrySet() { try { lockAllSegments(); Set<java.util.Map.Entry<K, V>> set = new HashSet<>(); for (LinkedHashMapSegment<K, V> seg : segments) { set.addAll(seg.entrySet()); } return set; ...
[ "@", "Override", "public", "Set", "<", "java", ".", "util", ".", "Map", ".", "Entry", "<", "K", ",", "V", ">", ">", "entrySet", "(", ")", "{", "try", "{", "lockAllSegments", "(", ")", ";", "Set", "<", "java", ".", "util", ".", "Map", ".", "Entr...
Returns a {@link Set} view of the mappings contained in this map. @return a set view of the mappings contained in this map
[ "Returns", "a", "{", "@link", "Set", "}", "view", "of", "the", "mappings", "contained", "in", "this", "map", "." ]
ed3fc75b7c54a65b1e7d8141d01b49144bb423a3
https://github.com/hypercube1024/firefly/blob/ed3fc75b7c54a65b1e7d8141d01b49144bb423a3/firefly-common/src/main/java/com/firefly/utils/collection/ConcurrentLinkedHashMap.java#L442-L454
train
Get a set of all entries in this map.
Create a Java method that does the following: "Get a set of all entries in this map.".
Of course, here is the Java code you requested: ```java @Override public Set<java.util.Map.Entry<K, V>> entrySet() { try { lockAllSegments(); Set<java.util.Map.Entry<K, V>> set = new HashSet<>(); for (LinkedHashMapSegment<K, V> seg : segments) { set.addAl...
clanie/clanie-core
src/main/java/dk/clanie/io/IOUtil.java
IOUtil.sha1
public static String sha1(URL url) { InputStream is = null; try { is = url.openStream(); return sha1(is); } catch (IOException ioe) { log.warn("Error occourred while reading from URL: " + url, ioe); throw new RuntimeIOException(ioe); } finally { if (is != null) { try { is.close(); } ...
java
public static String sha1(URL url) { InputStream is = null; try { is = url.openStream(); return sha1(is); } catch (IOException ioe) { log.warn("Error occourred while reading from URL: " + url, ioe); throw new RuntimeIOException(ioe); } finally { if (is != null) { try { is.close(); } ...
[ "public", "static", "String", "sha1", "(", "URL", "url", ")", "{", "InputStream", "is", "=", "null", ";", "try", "{", "is", "=", "url", ".", "openStream", "(", ")", ";", "return", "sha1", "(", "is", ")", ";", "}", "catch", "(", "IOException", "ioe"...
Calculates SHA1 for the contents referred to by the supplied URL. @param url URL @return String with SHA1 calculated from the contents referred to by <code>url</code>. @throws RuntimeIOException
[ "Calculates", "SHA1", "for", "the", "contents", "referred", "to", "by", "the", "supplied", "URL", "." ]
ac8a655b93127f0e281b741c4d53f429be2816ad
https://github.com/clanie/clanie-core/blob/ac8a655b93127f0e281b741c4d53f429be2816ad/src/main/java/dk/clanie/io/IOUtil.java#L234-L252
train
Returns the SHA1 of the contents of the given URL.
Create a Java method that does the following: "Returns the SHA1 of the contents of the given URL.".
Of course, here is the Java code you requested: ```java public static String sha1(URL url) { InputStream is = null; try { is = url.openStream(); return sha1(is); } catch (IOException ioe) { log.warn("Error occourred while reading from URL: " + url, ioe); throw new RuntimeIOException(ioe); } finally...
kiegroup/droolsjbpm-tools
drools-eclipse/org.drools.eclipse/src/main/java/org/drools/eclipse/editors/DRLRuleEditorActionContributor.java
DRLRuleEditorActionContributor.setActiveEditor
public void setActiveEditor(IEditorPart part) { super.setActiveEditor( part ); if ( part instanceof DRLRuleEditor2 ) { DRLRuleEditor2 p = (DRLRuleEditor2) part; p.setZoomComboContributionItem( zitem ); p.setZoomInAction( zoomIn ); p.setZoomOutAction( zoomO...
java
public void setActiveEditor(IEditorPart part) { super.setActiveEditor( part ); if ( part instanceof DRLRuleEditor2 ) { DRLRuleEditor2 p = (DRLRuleEditor2) part; p.setZoomComboContributionItem( zitem ); p.setZoomInAction( zoomIn ); p.setZoomOutAction( zoomO...
[ "public", "void", "setActiveEditor", "(", "IEditorPart", "part", ")", "{", "super", ".", "setActiveEditor", "(", "part", ")", ";", "if", "(", "part", "instanceof", "DRLRuleEditor2", ")", "{", "DRLRuleEditor2", "p", "=", "(", "DRLRuleEditor2", ")", "part", ";...
In addition to @link org.eclipse.ui.part.MultiPageEditorActionBarContributor#setActiveEditor(org.eclipse.ui.IEditorPart) it sets contribution items to DRLRuleEditor2 for later use when multipageditor tabs are switched.
[ "In", "addition", "to" ]
05e1f73c591178360a198dca29f99d73918991db
https://github.com/kiegroup/droolsjbpm-tools/blob/05e1f73c591178360a198dca29f99d73918991db/drools-eclipse/org.drools.eclipse/src/main/java/org/drools/eclipse/editors/DRLRuleEditorActionContributor.java#L70-L78
test
Set the active editor.
Create a Java method that does the following: "Set the active editor.".
Of course, here is the Java code you requested: ```java public void setActiveEditor(IEditorPart part) { super.setActiveEditor( part ); if ( part instanceof DRLRuleEditor2 ) { DRLRuleEditor2 p = (DRLRuleEditor2) part; p.setZoomComboContributionItem( zitem ); p.setZoom...
orientechnologies/orientdb
core/src/main/java/com/orientechnologies/common/parser/OBaseParser.java
OBaseParser.parserOptionalWord
protected String parserOptionalWord(final boolean iUpperCase) { parserPreviousPos = parserCurrentPos; parserNextWord(iUpperCase); if (parserLastWord.length() == 0) return null; return parserLastWord.toString(); }
java
protected String parserOptionalWord(final boolean iUpperCase) { parserPreviousPos = parserCurrentPos; parserNextWord(iUpperCase); if (parserLastWord.length() == 0) return null; return parserLastWord.toString(); }
[ "protected", "String", "parserOptionalWord", "(", "final", "boolean", "iUpperCase", ")", "{", "parserPreviousPos", "=", "parserCurrentPos", ";", "parserNextWord", "(", "iUpperCase", ")", ";", "if", "(", "parserLastWord", ".", "length", "(", ")", "==", "0", ")", ...
Parses the next word. It returns the word parsed if any. @param iUpperCase True if must return UPPERCASE, otherwise false @return The word parsed if any, otherwise null
[ "Parses", "the", "next", "word", ".", "It", "returns", "the", "word", "parsed", "if", "any", "." ]
d970b12033f0462f0239ea0ad8ed41207e6e26f1
https://github.com/orientechnologies/orientdb/blob/d970b12033f0462f0239ea0ad8ed41207e6e26f1/core/src/main/java/com/orientechnologies/common/parser/OBaseParser.java#L205-L212
test
Parses the next word.
Create a Java method that does the following: "Parses the next word.".
Of course, here is the Java code you requested: ```java protected String parserOptionalWord(final boolean iUpperCase) { parserPreviousPos = parserCurrentPos; parserNextWord(iUpperCase); if (parserLastWord.length() == 0) return null; return parserLastWord.toString(); } ``` Hope this helps!
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/GroupApi.java
GroupApi.getGroups
public List<Group> getGroups(GroupFilter filter) throws GitLabApiException { return (getGroups(filter, getDefaultPerPage()).all()); }
java
public List<Group> getGroups(GroupFilter filter) throws GitLabApiException { return (getGroups(filter, getDefaultPerPage()).all()); }
[ "public", "List", "<", "Group", ">", "getGroups", "(", "GroupFilter", "filter", ")", "throws", "GitLabApiException", "{", "return", "(", "getGroups", "(", "filter", ",", "getDefaultPerPage", "(", ")", ")", ".", "all", "(", ")", ")", ";", "}" ]
Get a list of visible groups for the authenticated user using the provided filter. <pre><code>GitLab Endpoint: GET /groups</code></pre> @param filter the GroupFilter to match against @return a List&lt;Group&gt; of the matching groups @throws GitLabApiException if any exception occurs
[ "Get", "a", "list", "of", "visible", "groups", "for", "the", "authenticated", "user", "using", "the", "provided", "filter", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/GroupApi.java#L142-L144
train
Get a list of all groups accessible by the authenticated user.
Create a Java method that does the following: "Get a list of all groups accessible by the authenticated user.".
Of course, here is the Java code you requested: ```java public List<Group> getGroups(GroupFilter filter) throws GitLabApiException { return (getGroups(filter, getDefaultPerPage()).all()); } ``` Hope this helps!
aws/aws-sdk-java
aws-java-sdk-elasticloadbalancingv2/src/main/java/com/amazonaws/services/elasticloadbalancingv2/model/ModifyTargetGroupAttributesRequest.java
ModifyTargetGroupAttributesRequest.withAttributes
public ModifyTargetGroupAttributesRequest withAttributes(TargetGroupAttribute... attributes) { if (this.attributes == null) { setAttributes(new java.util.ArrayList<TargetGroupAttribute>(attributes.length)); } for (TargetGroupAttribute ele : attributes) { this.attributes.a...
java
public ModifyTargetGroupAttributesRequest withAttributes(TargetGroupAttribute... attributes) { if (this.attributes == null) { setAttributes(new java.util.ArrayList<TargetGroupAttribute>(attributes.length)); } for (TargetGroupAttribute ele : attributes) { this.attributes.a...
[ "public", "ModifyTargetGroupAttributesRequest", "withAttributes", "(", "TargetGroupAttribute", "...", "attributes", ")", "{", "if", "(", "this", ".", "attributes", "==", "null", ")", "{", "setAttributes", "(", "new", "java", ".", "util", ".", "ArrayList", "<", "...
<p> The attributes. </p> <p> <b>NOTE:</b> This method appends the values to the existing list (if any). Use {@link #setAttributes(java.util.Collection)} or {@link #withAttributes(java.util.Collection)} if you want to override the existing values. </p> @param attributes The attributes. @return Returns a reference to th...
[ "<p", ">", "The", "attributes", ".", "<", "/", "p", ">", "<p", ">", "<b", ">", "NOTE", ":", "<", "/", "b", ">", "This", "method", "appends", "the", "values", "to", "the", "existing", "list", "(", "if", "any", ")", ".", "Use", "{", "@link", "#se...
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-elasticloadbalancingv2/src/main/java/com/amazonaws/services/elasticloadbalancingv2/model/ModifyTargetGroupAttributesRequest.java#L126-L134
train
A list of target group attributes.
Create a Java method that does the following: "A list of target group attributes.".
Of course, here is the Java code you requested: ```java public ModifyTargetGroupAttributesRequest withAttributes(TargetGroupAttribute... attributes) { if (this.attributes == null) { setAttributes(new java.util.ArrayList<TargetGroupAttribute>(attributes.length)); } for (TargetGroupAt...
gallandarakhneorg/afc
advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusNetwork.java
BusNetwork.addBusHub
public BusHub addBusHub(String name, BusStop... stops) { // Do not set immediatly the container to // avoid event firing when adding the stops final BusHub hub = new BusHub(null, name); for (final BusStop stop : stops) { hub.addBusStop(stop, false); } if (addBusHub(hub)) { return hub; } return nul...
java
public BusHub addBusHub(String name, BusStop... stops) { // Do not set immediatly the container to // avoid event firing when adding the stops final BusHub hub = new BusHub(null, name); for (final BusStop stop : stops) { hub.addBusStop(stop, false); } if (addBusHub(hub)) { return hub; } return nul...
[ "public", "BusHub", "addBusHub", "(", "String", "name", ",", "BusStop", "...", "stops", ")", "{", "// Do not set immediatly the container to", "// avoid event firing when adding the stops", "final", "BusHub", "hub", "=", "new", "BusHub", "(", "null", ",", "name", ")",...
Add a bus hub in this network. At least, one bus stop must be given to create a hub if you pass a <code>null</code> name. @param name is the name of the hub. @param stops are the bus stops to put inside the hub. @return the create bus hub, or <code>null</code> if not created.
[ "Add", "a", "bus", "hub", "in", "this", "network", ".", "At", "least", "one", "bus", "stop", "must", "be", "given", "to", "create", "a", "hub", "if", "you", "pass", "a", "<code", ">", "null<", "/", "code", ">", "name", "." ]
0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusNetwork.java#L1070-L1081
train
Add a bus hub to the container.
Create a Java method that does the following: "Add a bus hub to the container.".
Of course, here is the Java code you requested: ```java public BusHub addBusHub(String name, BusStop... stops) { // Do not set immediatly the container to // avoid event firing when adding the stops final BusHub hub = new BusHub(null, name); for (final BusStop stop : stops) { hub.addBusStop(stop, false); ...
real-logic/aeron
aeron-client/src/main/java/io/aeron/logbuffer/FrameDescriptor.java
FrameDescriptor.frameType
public static void frameType(final UnsafeBuffer buffer, final int termOffset, final int type) { buffer.putShort(typeOffset(termOffset), (short)type, LITTLE_ENDIAN); }
java
public static void frameType(final UnsafeBuffer buffer, final int termOffset, final int type) { buffer.putShort(typeOffset(termOffset), (short)type, LITTLE_ENDIAN); }
[ "public", "static", "void", "frameType", "(", "final", "UnsafeBuffer", "buffer", ",", "final", "int", "termOffset", ",", "final", "int", "type", ")", "{", "buffer", ".", "putShort", "(", "typeOffset", "(", "termOffset", ")", ",", "(", "short", ")", "type",...
Write the type field for a frame. @param buffer containing the frame. @param termOffset at which a frame begins. @param type type value for the frame.
[ "Write", "the", "type", "field", "for", "a", "frame", "." ]
045c32f0256d1ea35d562520216affc281a41239
https://github.com/real-logic/aeron/blob/045c32f0256d1ea35d562520216affc281a41239/aeron-client/src/main/java/io/aeron/logbuffer/FrameDescriptor.java#L290-L293
test
Write the type of a sequence of words in a block of bytes.
Create a Java method that does the following: "Write the type of a sequence of words in a block of bytes.".
Of course, here is the Java code you requested: ```java public static void frameType(final UnsafeBuffer buffer, final int termOffset, final int type) { buffer.putShort(typeOffset(termOffset), (short)type, LITTLE_ENDIAN); } ``` Hope this helps!
meertensinstituut/mtas
src/main/java/mtas/codec/util/collector/MtasDataBasic.java
MtasDataBasic.merge
@Override public void merge(MtasDataCollector<?, ?> newDataCollector, Map<MtasDataCollector<?, ?>, MtasDataCollector<?, ?>> map, boolean increaseSourceNumber) throws IOException { closeNewList(); if (!collectorType.equals(newDataCollector.getCollectorType()) || !dataType.equals(newDataColl...
java
@Override public void merge(MtasDataCollector<?, ?> newDataCollector, Map<MtasDataCollector<?, ?>, MtasDataCollector<?, ?>> map, boolean increaseSourceNumber) throws IOException { closeNewList(); if (!collectorType.equals(newDataCollector.getCollectorType()) || !dataType.equals(newDataColl...
[ "@", "Override", "public", "void", "merge", "(", "MtasDataCollector", "<", "?", ",", "?", ">", "newDataCollector", ",", "Map", "<", "MtasDataCollector", "<", "?", ",", "?", ">", ",", "MtasDataCollector", "<", "?", ",", "?", ">", ">", "map", ",", "boole...
/* (non-Javadoc) @see mtas.codec.util.DataCollector.MtasDataCollector#merge(mtas.codec.util. DataCollector.MtasDataCollector)
[ "/", "*", "(", "non", "-", "Javadoc", ")" ]
f02ae730848616bd88b553efa7f9eddc32818e64
https://github.com/meertensinstituut/mtas/blob/f02ae730848616bd88b553efa7f9eddc32818e64/src/main/java/mtas/codec/util/collector/MtasDataBasic.java#L315-L367
train
Merge the data collector.
Create a Java method that does the following: "Merge the data collector.".
Of course, here is the Java code you requested: ```java @Override public void merge(MtasDataCollector<?, ?> newDataCollector, Map<MtasDataCollector<?, ?>, MtasDataCollector<?, ?>> map, boolean increaseSourceNumber) throws IOException { closeNewList(); if (!collectorType.equals(newDataCollector.ge...
pippo-java/pippo
pippo-core/src/main/java/ro/pippo/core/Messages.java
Messages.getWithDefault
public String getWithDefault(String key, String defaultMessage, RouteContext routeContext, Object... args) { String language = languages.getLanguageOrDefault(routeContext); return getWithDefault(key, defaultMessage, language, args); }
java
public String getWithDefault(String key, String defaultMessage, RouteContext routeContext, Object... args) { String language = languages.getLanguageOrDefault(routeContext); return getWithDefault(key, defaultMessage, language, args); }
[ "public", "String", "getWithDefault", "(", "String", "key", ",", "String", "defaultMessage", ",", "RouteContext", "routeContext", ",", "Object", "...", "args", ")", "{", "String", "language", "=", "languages", ".", "getLanguageOrDefault", "(", "routeContext", ")",...
Gets the requested localized message. <p/> <p> The current Request and Response are used to help determine the messages resource to use. <ol> <li>Exact locale match, return the registered locale message <li>Language match, but not a locale match, return the registered language message <li>Return the supplied default me...
[ "Gets", "the", "requested", "localized", "message", ".", "<p", "/", ">", "<p", ">", "The", "current", "Request", "and", "Response", "are", "used", "to", "help", "determine", "the", "messages", "resource", "to", "use", ".", "<ol", ">", "<li", ">", "Exact"...
cb5ccb453bffcc3cf386adc660674812d10b9726
https://github.com/pippo-java/pippo/blob/cb5ccb453bffcc3cf386adc660674812d10b9726/pippo-core/src/main/java/ro/pippo/core/Messages.java#L151-L154
train
Get a value from the cache or return the default value if the key is not found.
Create a Java method that does the following: "Get a value from the cache or return the default value if the key is not found.".
Of course, here is the Java code you requested: ```java public String getWithDefault(String key, String defaultMessage, RouteContext routeContext, Object... args) { String language = languages.getLanguageOrDefault(routeContext); return getWithDefault(key, defaultMessage, language, args); } ``` Hop...
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/core/reflect/AnnotationUtility.java
AnnotationUtility.extractAsArrayOfClassName
static List<String> extractAsArrayOfClassName(String value) { Matcher matcher = classPattern.matcher(value); List<String> result = new ArrayList<String>(); while (matcher.find()) { result.add(matcher.group(1)); } return result; }
java
static List<String> extractAsArrayOfClassName(String value) { Matcher matcher = classPattern.matcher(value); List<String> result = new ArrayList<String>(); while (matcher.find()) { result.add(matcher.group(1)); } return result; }
[ "static", "List", "<", "String", ">", "extractAsArrayOfClassName", "(", "String", "value", ")", "{", "Matcher", "matcher", "=", "classPattern", ".", "matcher", "(", "value", ")", ";", "List", "<", "String", ">", "result", "=", "new", "ArrayList", "<", "Str...
Extract as array of class name. @param value the value @return the list
[ "Extract", "as", "array", "of", "class", "name", "." ]
90de2c0523d39b99e81b8d38aa996898762f594a
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/core/reflect/AnnotationUtility.java#L64-L74
train
Extract an array of class name from a string value.
Create a Java method that does the following: "Extract an array of class name from a string value.".
Of course, here is the Java code you requested: ```java static List<String> extractAsArrayOfClassName(String value) { Matcher matcher = classPattern.matcher(value); List<String> result = new ArrayList<String>(); while (matcher.find()) { result.add(matcher.group(1)); } return result; } ``` Hope this h...
opensourceBIM/BIMserver
PluginBase/generated/org/bimserver/models/ifc4/impl/Ifc4PackageImpl.java
Ifc4PackageImpl.getIfcDerivedProfileDef
@Override public EClass getIfcDerivedProfileDef() { if (ifcDerivedProfileDefEClass == null) { ifcDerivedProfileDefEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc4Package.eNS_URI) .getEClassifiers().get(171); } return ifcDerivedProfileDefEClass; }
java
@Override public EClass getIfcDerivedProfileDef() { if (ifcDerivedProfileDefEClass == null) { ifcDerivedProfileDefEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc4Package.eNS_URI) .getEClassifiers().get(171); } return ifcDerivedProfileDefEClass; }
[ "@", "Override", "public", "EClass", "getIfcDerivedProfileDef", "(", ")", "{", "if", "(", "ifcDerivedProfileDefEClass", "==", "null", ")", "{", "ifcDerivedProfileDefEClass", "=", "(", "EClass", ")", "EPackage", ".", "Registry", ".", "INSTANCE", ".", "getEPackage",...
<!-- begin-user-doc --> <!-- end-user-doc --> @generated
[ "<!", "--", "begin", "-", "user", "-", "doc", "--", ">", "<!", "--", "end", "-", "user", "-", "doc", "--", ">" ]
116803c3047d1b32217366757cee1bb3880fda63
https://github.com/opensourceBIM/BIMserver/blob/116803c3047d1b32217366757cee1bb3880fda63/PluginBase/generated/org/bimserver/models/ifc4/impl/Ifc4PackageImpl.java#L14874-L14881
train
Get the IfcDerivedProfileDefEClass attribute of the class.
Create a Java method that does the following: "Get the IfcDerivedProfileDefEClass attribute of the class.".
Of course, here is the Java code you requested: ```java @Override public EClass getIfcDerivedProfileDef() { if (ifcDerivedProfileDefEClass == null) { ifcDerivedProfileDefEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc4Package.eNS_URI) .getEClassifiers().get(171); } return ifcDerivedPr...
haifengl/smile
math/src/main/java/smile/math/Math.java
Math.rowMax
public static double[] rowMax(double[][] data) { double[] x = new double[data.length]; for (int i = 0; i < x.length; i++) { x[i] = max(data[i]); } return x; }
java
public static double[] rowMax(double[][] data) { double[] x = new double[data.length]; for (int i = 0; i < x.length; i++) { x[i] = max(data[i]); } return x; }
[ "public", "static", "double", "[", "]", "rowMax", "(", "double", "[", "]", "[", "]", "data", ")", "{", "double", "[", "]", "x", "=", "new", "double", "[", "data", ".", "length", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "x", ...
Returns the row maximum for a matrix.
[ "Returns", "the", "row", "maximum", "for", "a", "matrix", "." ]
e27e43e90fbaacce3f99d30120cf9dd6a764c33d
https://github.com/haifengl/smile/blob/e27e43e90fbaacce3f99d30120cf9dd6a764c33d/math/src/main/java/smile/math/Math.java#L1546-L1554
train
Get the row max.
Create a Java method that does the following: "Get the row max.".
Of course, here is the Java code you requested: ```java public static double[] rowMax(double[][] data) { double[] x = new double[data.length]; for (int i = 0; i < x.length; i++) { x[i] = max(data[i]); } return x; } ``` Hope this helps!
eclipse/xtext-extras
org.eclipse.xtext.xbase/src-gen/org/eclipse/xtext/xbase/parser/antlr/internal/InternalXtypeParser.java
InternalXtypeParser.ruleQualifiedNameInStaticImport
public final AntlrDatatypeRuleToken ruleQualifiedNameInStaticImport() throws RecognitionException { AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken(); Token kw=null; AntlrDatatypeRuleToken this_ValidID_0 = null; enterRule(); try { // InternalXtype.g:...
java
public final AntlrDatatypeRuleToken ruleQualifiedNameInStaticImport() throws RecognitionException { AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken(); Token kw=null; AntlrDatatypeRuleToken this_ValidID_0 = null; enterRule(); try { // InternalXtype.g:...
[ "public", "final", "AntlrDatatypeRuleToken", "ruleQualifiedNameInStaticImport", "(", ")", "throws", "RecognitionException", "{", "AntlrDatatypeRuleToken", "current", "=", "new", "AntlrDatatypeRuleToken", "(", ")", ";", "Token", "kw", "=", "null", ";", "AntlrDatatypeRuleTo...
InternalXtype.g:1028:1: ruleQualifiedNameInStaticImport returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] : (this_ValidID_0= ruleValidID kw= '.' )+ ;
[ "InternalXtype", ".", "g", ":", "1028", ":", "1", ":", "ruleQualifiedNameInStaticImport", "returns", "[", "AntlrDatatypeRuleToken", "current", "=", "new", "AntlrDatatypeRuleToken", "()", "]", ":", "(", "this_ValidID_0", "=", "ruleValidID", "kw", "=", ".", ")", "...
451359541295323a29f5855e633f770cec02069a
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/src-gen/org/eclipse/xtext/xbase/parser/antlr/internal/InternalXtypeParser.java#L2943-L3037
train
Use this method to enter the qualified name in static import
Create a Java method that does the following: "Use this method to enter the qualified name in static import".
Of course, here is the Java code you requested: ```java public final AntlrDatatypeRuleToken ruleQualifiedNameInStaticImport() throws RecognitionException { AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken(); Token kw=null; AntlrDatatypeRuleToken this_ValidID_0 = null; en...
jenkinsci/jenkins
core/src/main/java/hudson/slaves/ComputerRetentionWork.java
ComputerRetentionWork.doRun
@SuppressWarnings("unchecked") @Override protected void doRun() { final long startRun = System.currentTimeMillis(); for (final Computer c : Jenkins.get().getComputers()) { Queue.withLock(new Runnable() { @Override public void run() { ...
java
@SuppressWarnings("unchecked") @Override protected void doRun() { final long startRun = System.currentTimeMillis(); for (final Computer c : Jenkins.get().getComputers()) { Queue.withLock(new Runnable() { @Override public void run() { ...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "@", "Override", "protected", "void", "doRun", "(", ")", "{", "final", "long", "startRun", "=", "System", ".", "currentTimeMillis", "(", ")", ";", "for", "(", "final", "Computer", "c", ":", "Jenkins", "."...
{@inheritDoc}
[ "{" ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/slaves/ComputerRetentionWork.java#L59-L79
train
Run the sequence of tasks.
Create a Java method that does the following: "Run the sequence of tasks.".
Of course, here is the Java code you requested: ```java @SuppressWarnings("unchecked") @Override protected void doRun() { final long startRun = System.currentTimeMillis(); for (final Computer c : Jenkins.get().getComputers()) { Queue.withLock(new Runnable() { @Overri...
kocakosm/pitaya
src/org/kocakosm/pitaya/collection/ImmutableSet.java
ImmutableSet.copyOf
public static <E> Set<E> copyOf(Collection<? extends E> c) { return new ImmutableSet<E>(new LinkedHashSet<E>(c)); }
java
public static <E> Set<E> copyOf(Collection<? extends E> c) { return new ImmutableSet<E>(new LinkedHashSet<E>(c)); }
[ "public", "static", "<", "E", ">", "Set", "<", "E", ">", "copyOf", "(", "Collection", "<", "?", "extends", "E", ">", "c", ")", "{", "return", "new", "ImmutableSet", "<", "E", ">", "(", "new", "LinkedHashSet", "<", "E", ">", "(", "c", ")", ")", ...
Creates a new {@code ImmutableSet} from the given {@code Collection}. @param <E> the type of the {@code Set}'s elements. @param c the source {@code Collection}. @return the created {@code ImmutableSet}. @throws NullPointerException if {@code c} is {@code null}.
[ "Creates", "a", "new", "{", "@code", "ImmutableSet", "}", "from", "the", "given", "{", "@code", "Collection", "}", "." ]
f2b203b6cdb32723bd1249a1325a3bb5918bf99a
https://github.com/kocakosm/pitaya/blob/f2b203b6cdb32723bd1249a1325a3bb5918bf99a/src/org/kocakosm/pitaya/collection/ImmutableSet.java#L122-L125
test
Creates an immutable set containing all elements in the given collection.
Create a Java method that does the following: "Creates an immutable set containing all elements in the given collection.".
Of course, here is the Java code you requested: ```java public static <E> Set<E> copyOf(Collection<? extends E> c) { return new ImmutableSet<E>(new LinkedHashSet<E>(c)); } ``` Hope this helps!
OpenLiberty/open-liberty
dev/com.ibm.ws.webcontainer/src/com/ibm/wsspi/webcontainer/util/BufferedServletOutputStream.java
BufferedServletOutputStream.reset
public void reset() { if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE)) { //306998.15 logger.logp(Level.FINE, CLASS_NAME,"reset", "reset"); } out = null; // obs = null; count = 0; total = 0; limit = -1; length = -1; committed = false; _hasWritten = ...
java
public void reset() { if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE)) { //306998.15 logger.logp(Level.FINE, CLASS_NAME,"reset", "reset"); } out = null; // obs = null; count = 0; total = 0; limit = -1; length = -1; committed = false; _hasWritten = ...
[ "public", "void", "reset", "(", ")", "{", "if", "(", "com", ".", "ibm", ".", "ejs", ".", "ras", ".", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "logger", ".", "isLoggable", "(", "Level", ".", "FINE", ")", ")", "{", "//306998.15", "...
Resets the output stream for a new connection.
[ "Resets", "the", "output", "stream", "for", "a", "new", "connection", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.webcontainer/src/com/ibm/wsspi/webcontainer/util/BufferedServletOutputStream.java#L174-L192
train
Resets the object containing the content of the exception page.
Create a Java method that does the following: "Resets the object containing the content of the exception page.".
Of course, here is the Java code you requested: ```java public void reset() { if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE)) { //306998.15 logger.logp(Level.FINE, CLASS_NAME,"reset", "reset"); } out = null; // obs = null; count = 0; total = 0; limit =...
allure-framework/allure1
allure-java-adaptor-api/src/main/java/ru/yandex/qatools/allure/utils/AnnotationManager.java
AnnotationManager.withExecutorInfo
public static TestCaseStartedEvent withExecutorInfo(TestCaseStartedEvent event) { event.getLabels().add(createHostLabel(getHostname())); event.getLabels().add(createThreadLabel(format("%s.%s(%s)", ManagementFactory.getRuntimeMXBean().getName(), Thread.curr...
java
public static TestCaseStartedEvent withExecutorInfo(TestCaseStartedEvent event) { event.getLabels().add(createHostLabel(getHostname())); event.getLabels().add(createThreadLabel(format("%s.%s(%s)", ManagementFactory.getRuntimeMXBean().getName(), Thread.curr...
[ "public", "static", "TestCaseStartedEvent", "withExecutorInfo", "(", "TestCaseStartedEvent", "event", ")", "{", "event", ".", "getLabels", "(", ")", ".", "add", "(", "createHostLabel", "(", "getHostname", "(", ")", ")", ")", ";", "event", ".", "getLabels", "("...
Add information about host and thread to specified test case started event @param event given event to update @return updated event
[ "Add", "information", "about", "host", "and", "thread", "to", "specified", "test", "case", "started", "event" ]
9a816fa05d8b894a917b7ebb7fd1a4056dee4693
https://github.com/allure-framework/allure1/blob/9a816fa05d8b894a917b7ebb7fd1a4056dee4693/allure-java-adaptor-api/src/main/java/ru/yandex/qatools/allure/utils/AnnotationManager.java#L193-L201
train
Add the host and thread labels to the event.
Create a Java method that does the following: "Add the host and thread labels to the event.".
Of course, here is the Java code you requested: ```java public static TestCaseStartedEvent withExecutorInfo(TestCaseStartedEvent event) { event.getLabels().add(createHostLabel(getHostname())); event.getLabels().add(createThreadLabel(format("%s.%s(%s)", ManagementFactory.getRunti...
metamx/extendedset
src/main/java/it/uniroma3/mat/extendedset/utilities/random/MersenneTwister.java
MersenneTwister.nextLong
public long nextLong(final long n) { if (n<=0) throw new IllegalArgumentException("n must be > 0"); long bits, val; do { bits = (nextLong() >>> 1); val = bits % n; } while(bits - val + (n-1) < 0); ret...
java
public long nextLong(final long n) { if (n<=0) throw new IllegalArgumentException("n must be > 0"); long bits, val; do { bits = (nextLong() >>> 1); val = bits % n; } while(bits - val + (n-1) < 0); ret...
[ "public", "long", "nextLong", "(", "final", "long", "n", ")", "{", "if", "(", "n", "<=", "0", ")", "throw", "new", "IllegalArgumentException", "(", "\"n must be > 0\"", ")", ";", "long", "bits", ",", "val", ";", "do", "{", "bits", "=", "(", "nextLong",...
This method is for completness' sake. Returns a long drawn uniformly from 0 to n-1. Suffice it to say, n must be > 0, or an IllegalArgumentException is raised. @param n @return ?
[ "This", "method", "is", "for", "completness", "sake", ".", "Returns", "a", "long", "drawn", "uniformly", "from", "0", "to", "n", "-", "1", ".", "Suffice", "it", "to", "say", "n", "must", "be", ">", "0", "or", "an", "IllegalArgumentException", "is", "ra...
0f77c28057fac9c1bd6d79fbe5425b8efe5742a8
https://github.com/metamx/extendedset/blob/0f77c28057fac9c1bd6d79fbe5425b8efe5742a8/src/main/java/it/uniroma3/mat/extendedset/utilities/random/MersenneTwister.java#L470-L483
train
Returns the next n - bit long.
Create a Java method that does the following: "Returns the next n - bit long.".
Of course, here is the Java code you requested: ```java public long nextLong(final long n) { if (n<=0) throw new IllegalArgumentException("n must be > 0"); long bits, val; do { bits = (nextLong() >>> 1); val = bits % n; ...
netplex/json-smart-v2
json-smart/src/main/java/net/minidev/json/parser/JSONParser.java
JSONParser.parse
public <T> T parse(Reader in, JsonReaderI<T> mapper) throws ParseException { return getPStream().parse(in, mapper); }
java
public <T> T parse(Reader in, JsonReaderI<T> mapper) throws ParseException { return getPStream().parse(in, mapper); }
[ "public", "<", "T", ">", "T", "parse", "(", "Reader", "in", ",", "JsonReaderI", "<", "T", ">", "mapper", ")", "throws", "ParseException", "{", "return", "getPStream", "(", ")", ".", "parse", "(", "in", ",", "mapper", ")", ";", "}" ]
use to return Primitive Type, or String, Or JsonObject or JsonArray generated by a ContainerFactory
[ "use", "to", "return", "Primitive", "Type", "or", "String", "Or", "JsonObject", "or", "JsonArray", "generated", "by", "a", "ContainerFactory" ]
bfb3daef039e22a7bbff5f76bf14ea23330cd70e
https://github.com/netplex/json-smart-v2/blob/bfb3daef039e22a7bbff5f76bf14ea23330cd70e/json-smart/src/main/java/net/minidev/json/parser/JSONParser.java#L246-L248
train
Parse the input stream using the given mapper.
Create a Java method that does the following: "Parse the input stream using the given mapper.".
Of course, here is the Java code you requested: ```java public <T> T parse(Reader in, JsonReaderI<T> mapper) throws ParseException { return getPStream().parse(in, mapper); } ``` Hope this helps!
lettuce-io/lettuce-core
src/main/java/io/lettuce/core/RedisClient.java
RedisClient.connectPubSub
public <K, V> StatefulRedisPubSubConnection<K, V> connectPubSub(RedisCodec<K, V> codec, RedisURI redisURI) { assertNotNull(redisURI); return getConnection(connectPubSubAsync(codec, redisURI, redisURI.getTimeout())); }
java
public <K, V> StatefulRedisPubSubConnection<K, V> connectPubSub(RedisCodec<K, V> codec, RedisURI redisURI) { assertNotNull(redisURI); return getConnection(connectPubSubAsync(codec, redisURI, redisURI.getTimeout())); }
[ "public", "<", "K", ",", "V", ">", "StatefulRedisPubSubConnection", "<", "K", ",", "V", ">", "connectPubSub", "(", "RedisCodec", "<", "K", ",", "V", ">", "codec", ",", "RedisURI", "redisURI", ")", "{", "assertNotNull", "(", "redisURI", ")", ";", "return"...
Open a new pub/sub connection to the Redis server using the supplied {@link RedisURI} and use the supplied {@link RedisCodec codec} to encode/decode keys and values. @param codec Use this codec to encode/decode keys and values, must not be {@literal null} @param redisURI the Redis server to connect to, must not be {@l...
[ "Open", "a", "new", "pub", "/", "sub", "connection", "to", "the", "Redis", "server", "using", "the", "supplied", "{", "@link", "RedisURI", "}", "and", "use", "the", "supplied", "{", "@link", "RedisCodec", "codec", "}", "to", "encode", "/", "decode", "key...
b6de74e384dea112e3656684ca3f50cdfd6c8e0d
https://github.com/lettuce-io/lettuce-core/blob/b6de74e384dea112e3656684ca3f50cdfd6c8e0d/src/main/java/io/lettuce/core/RedisClient.java#L396-L400
train
Create a new StatefulRedisPubSubConnection.
Create a Java method that does the following: "Create a new StatefulRedisPubSubConnection.".
Of course, here is the Java code you requested: ```java public <K, V> StatefulRedisPubSubConnection<K, V> connectPubSub(RedisCodec<K, V> codec, RedisURI redisURI) { assertNotNull(redisURI); return getConnection(connectPubSubAsync(codec, redisURI, redisURI.getTimeout())); } ``` Hope this helps!
aws/aws-sdk-java
aws-java-sdk-guardduty/src/main/java/com/amazonaws/services/guardduty/model/ListDetectorsResult.java
ListDetectorsResult.withDetectorIds
public ListDetectorsResult withDetectorIds(String... detectorIds) { if (this.detectorIds == null) { setDetectorIds(new java.util.ArrayList<String>(detectorIds.length)); } for (String ele : detectorIds) { this.detectorIds.add(ele); } return this; }
java
public ListDetectorsResult withDetectorIds(String... detectorIds) { if (this.detectorIds == null) { setDetectorIds(new java.util.ArrayList<String>(detectorIds.length)); } for (String ele : detectorIds) { this.detectorIds.add(ele); } return this; }
[ "public", "ListDetectorsResult", "withDetectorIds", "(", "String", "...", "detectorIds", ")", "{", "if", "(", "this", ".", "detectorIds", "==", "null", ")", "{", "setDetectorIds", "(", "new", "java", ".", "util", ".", "ArrayList", "<", "String", ">", "(", ...
<p> <b>NOTE:</b> This method appends the values to the existing list (if any). Use {@link #setDetectorIds(java.util.Collection)} or {@link #withDetectorIds(java.util.Collection)} if you want to override the existing values. </p> @param detectorIds @return Returns a reference to this object so that method calls can be ...
[ "<p", ">", "<b", ">", "NOTE", ":", "<", "/", "b", ">", "This", "method", "appends", "the", "values", "to", "the", "existing", "list", "(", "if", "any", ")", ".", "Use", "{", "@link", "#setDetectorIds", "(", "java", ".", "util", ".", "Collection", "...
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-guardduty/src/main/java/com/amazonaws/services/guardduty/model/ListDetectorsResult.java#L62-L70
train
A list of detector IDs.
Create a Java method that does the following: "A list of detector IDs.".
Of course, here is the Java code you requested: ```java public ListDetectorsResult withDetectorIds(String... detectorIds) { if (this.detectorIds == null) { setDetectorIds(new java.util.ArrayList<String>(detectorIds.length)); } for (String ele : detectorIds) { this.detect...
chhh/MSFTBX
MSFileToolbox/src/main/java/umich/ms/datatypes/LCMSDataSubset.java
LCMSDataSubset.contains
public boolean contains(LCMSDataSubset other) { // compare ms levels Set<Integer> msLvlsThis = getMsLvls(); Set<Integer> msLvlsThat = other.getMsLvls(); // if ms levels are null, this definitely matches any other subset // so we need to check msLevelsThis frist! if (msLvlsThis != null && msLvls...
java
public boolean contains(LCMSDataSubset other) { // compare ms levels Set<Integer> msLvlsThis = getMsLvls(); Set<Integer> msLvlsThat = other.getMsLvls(); // if ms levels are null, this definitely matches any other subset // so we need to check msLevelsThis frist! if (msLvlsThis != null && msLvls...
[ "public", "boolean", "contains", "(", "LCMSDataSubset", "other", ")", "{", "// compare ms levels", "Set", "<", "Integer", ">", "msLvlsThis", "=", "getMsLvls", "(", ")", ";", "Set", "<", "Integer", ">", "msLvlsThat", "=", "other", ".", "getMsLvls", "(", ")", ...
Checks if data ranges described by this subset fully contain ranges specified in another set. According to this definition, for example {@link #WHOLE_RUN} contains any other subset, including itself.
[ "Checks", "if", "data", "ranges", "described", "by", "this", "subset", "fully", "contain", "ranges", "specified", "in", "another", "set", ".", "According", "to", "this", "definition", "for", "example", "{" ]
e53ae6be982e2de3123292be7d5297715bec70bb
https://github.com/chhh/MSFTBX/blob/e53ae6be982e2de3123292be7d5297715bec70bb/MSFileToolbox/src/main/java/umich/ms/datatypes/LCMSDataSubset.java#L189-L227
train
Checks if this data subset contains another data subset.
Create a Java method that does the following: "Checks if this data subset contains another data subset.".
Of course, here is the Java code you requested: ```java public boolean contains(LCMSDataSubset other) { // compare ms levels Set<Integer> msLvlsThis = getMsLvls(); Set<Integer> msLvlsThat = other.getMsLvls(); // if ms levels are null, this definitely matches any other subset // so we need to check...
kuali/kc-s2sgen
coeus-s2sgen-impl/src/main/java/org/kuali/coeus/s2sgen/impl/generate/support/RRFedNonFedBudget10V1_1Generator.java
RRFedNonFedBudget10V1_1Generator.getRRFedNonFedBudget
private RRFedNonFedBudget10Document getRRFedNonFedBudget() { RRFedNonFedBudget10Document rrFedNonFedBudgetDocument = RRFedNonFedBudget10Document.Factory.newInstance(); RRFedNonFedBudget10 rrFedNonFedBudget = RRFedNonFedBudget10.Factory.newInstance(); rrFedNonFedBudget.setFormVersion(FormVersion....
java
private RRFedNonFedBudget10Document getRRFedNonFedBudget() { RRFedNonFedBudget10Document rrFedNonFedBudgetDocument = RRFedNonFedBudget10Document.Factory.newInstance(); RRFedNonFedBudget10 rrFedNonFedBudget = RRFedNonFedBudget10.Factory.newInstance(); rrFedNonFedBudget.setFormVersion(FormVersion....
[ "private", "RRFedNonFedBudget10Document", "getRRFedNonFedBudget", "(", ")", "{", "RRFedNonFedBudget10Document", "rrFedNonFedBudgetDocument", "=", "RRFedNonFedBudget10Document", ".", "Factory", ".", "newInstance", "(", ")", ";", "RRFedNonFedBudget10", "rrFedNonFedBudget", "=", ...
This method returns RRFedNonFedBudgetDocument object based on proposal development document which contains the informations such as DUNSID,OrganizationName,BudgetType,BudgetYear and BudgetSummary. @return rrFedNonFedBudgetDocument {@link XmlObject} of type RRFedNonFedBudgetDocument.
[ "This", "method", "returns", "RRFedNonFedBudgetDocument", "object", "based", "on", "proposal", "development", "document", "which", "contains", "the", "informations", "such", "as", "DUNSID", "OrganizationName", "BudgetType", "BudgetYear", "and", "BudgetSummary", "." ]
2886380e1e3cb8bdd732ba99b2afa6ffc630bb37
https://github.com/kuali/kc-s2sgen/blob/2886380e1e3cb8bdd732ba99b2afa6ffc630bb37/coeus-s2sgen-impl/src/main/java/org/kuali/coeus/s2sgen/impl/generate/support/RRFedNonFedBudget10V1_1Generator.java#L119-L155
train
This method gets the RRFedNonFedBudget10Document object and sets the required fields to RRFedNonFedBudget10Document objects.
Create a Java method that does the following: "This method gets the RRFedNonFedBudget10Document object and sets the required fields to RRFedNonFedBudget10Document objects.".
Of course, here is the Java code you requested: ```java private RRFedNonFedBudget10Document getRRFedNonFedBudget() { RRFedNonFedBudget10Document rrFedNonFedBudgetDocument = RRFedNonFedBudget10Document.Factory.newInstance(); RRFedNonFedBudget10 rrFedNonFedBudget = RRFedNonFedBudget10.Factory.newInstance...
fozziethebeat/S-Space
src/main/java/edu/ucla/sspace/matrix/MatrixIO.java
MatrixIO.svdlibcSparseBinaryToMatlab
private static void svdlibcSparseBinaryToMatlab(File input, File output, boolean transpose) throws IOException { DataInputStream dis = new DataInputStream( new BufferedInputStream(new FileInputStream(input))); PrintWr...
java
private static void svdlibcSparseBinaryToMatlab(File input, File output, boolean transpose) throws IOException { DataInputStream dis = new DataInputStream( new BufferedInputStream(new FileInputStream(input))); PrintWr...
[ "private", "static", "void", "svdlibcSparseBinaryToMatlab", "(", "File", "input", ",", "File", "output", ",", "boolean", "transpose", ")", "throws", "IOException", "{", "DataInputStream", "dis", "=", "new", "DataInputStream", "(", "new", "BufferedInputStream", "(", ...
Reads in a matrix in the {@link Format#SVDLIBC_SPARSE_BINARY} format and writes it to the output file in the {@link Format#MATLAB_SPARSE} format.
[ "Reads", "in", "a", "matrix", "in", "the", "{" ]
a608102737dfd3d59038a9ead33fe60356bc6029
https://github.com/fozziethebeat/S-Space/blob/a608102737dfd3d59038a9ead33fe60356bc6029/src/main/java/edu/ucla/sspace/matrix/MatrixIO.java#L651-L682
train
This method converts a SVDLIBC sparse binary file to Matlab format.
Create a Java method that does the following: "This method converts a SVDLIBC sparse binary file to Matlab format.".
Of course, here is the Java code you requested: ```java private static void svdlibcSparseBinaryToMatlab(File input, File output, boolean transpose) throws IOException { DataInputStream dis = new DataInputStream( new BufferedI...
alkacon/opencms-core
src/org/opencms/workplace/tools/CmsToolManager.java
CmsToolManager.jspForwardPage
public void jspForwardPage(CmsWorkplace wp, String pagePath, Map<String, String[]> params) throws IOException, ServletException { Map<String, String[]> newParams = createToolParams(wp, pagePath, params); if (pagePath.indexOf("?") > 0) { pagePath = pagePath.substring(0, pagePath.indexOf(...
java
public void jspForwardPage(CmsWorkplace wp, String pagePath, Map<String, String[]> params) throws IOException, ServletException { Map<String, String[]> newParams = createToolParams(wp, pagePath, params); if (pagePath.indexOf("?") > 0) { pagePath = pagePath.substring(0, pagePath.indexOf(...
[ "public", "void", "jspForwardPage", "(", "CmsWorkplace", "wp", ",", "String", "pagePath", ",", "Map", "<", "String", ",", "String", "[", "]", ">", "params", ")", "throws", "IOException", ",", "ServletException", "{", "Map", "<", "String", ",", "String", "[...
Redirects to the given page with the given parameters.<p> @param wp the workplace object @param pagePath the path to the page to redirect to @param params the parameters to send @throws IOException in case of errors during forwarding @throws ServletException in case of errors during forwarding
[ "Redirects", "to", "the", "given", "page", "with", "the", "given", "parameters", ".", "<p", ">" ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/workplace/tools/CmsToolManager.java#L475-L490
train
Forward the requested page to the requested page path.
Create a Java method that does the following: "Forward the requested page to the requested page path.".
Of course, here is the Java code you requested: ```java public void jspForwardPage(CmsWorkplace wp, String pagePath, Map<String, String[]> params) throws IOException, ServletException { Map<String, String[]> newParams = createToolParams(wp, pagePath, params); if (pagePath.indexOf("?") > 0) { ...
OpenLiberty/open-liberty
dev/com.ibm.ws.javaee.7.0_fat/fat/src/com/ibm/ws/javaee/v70/fat/FATServerHelper.java
FATServerHelper.addWarToServer
public static boolean addWarToServer( LibertyServer targetServer, String targetDir, String warName, String[] warPackageNames, boolean addWarResources) throws Exception { String earName = null; boolean addEarResources = DO_NOT_ADD_RESOURCES; String jarName = null; boolea...
java
public static boolean addWarToServer( LibertyServer targetServer, String targetDir, String warName, String[] warPackageNames, boolean addWarResources) throws Exception { String earName = null; boolean addEarResources = DO_NOT_ADD_RESOURCES; String jarName = null; boolea...
[ "public", "static", "boolean", "addWarToServer", "(", "LibertyServer", "targetServer", ",", "String", "targetDir", ",", "String", "warName", ",", "String", "[", "]", "warPackageNames", ",", "boolean", "addWarResources", ")", "throws", "Exception", "{", "String", "...
Package a WAR and add it to a server. The rules of {@link #addToServer} are followed, using a null EAR name and a null JAR name. @param targetServer The server to which to add the EAR or WAR. @param targetDir The directory of the server in which to place the EAR or WAR. @param warName The name of the WAR which is to ...
[ "Package", "a", "WAR", "and", "add", "it", "to", "a", "server", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.javaee.7.0_fat/fat/src/com/ibm/ws/javaee/v70/fat/FATServerHelper.java#L47-L63
train
Add a war to the LibertyServer.
Create a Java method that does the following: "Add a war to the LibertyServer.".
Of course, here is the Java code you requested: ```java public static boolean addWarToServer( LibertyServer targetServer, String targetDir, String warName, String[] warPackageNames, boolean addWarResources) throws Exception { String earName = null; boolean addEarResources = DO_NOT_ADD_...
shrinkwrap/shrinkwrap
impl-base/src/main/java/org/jboss/shrinkwrap/impl/base/asset/AssetUtil.java
AssetUtil.getFullPathForClassResource
public static ArchivePath getFullPathForClassResource(Class<?> clazz) { String classResourceDelimiter = clazz.getName().replaceAll(DELIMITER_CLASS_NAME_PATH, DELIMITER_RESOURCE_PATH); String classFullPath = classResourceDelimiter + EXTENSION_CLASS; return new BasicPath(classFullPath); }
java
public static ArchivePath getFullPathForClassResource(Class<?> clazz) { String classResourceDelimiter = clazz.getName().replaceAll(DELIMITER_CLASS_NAME_PATH, DELIMITER_RESOURCE_PATH); String classFullPath = classResourceDelimiter + EXTENSION_CLASS; return new BasicPath(classFullPath); }
[ "public", "static", "ArchivePath", "getFullPathForClassResource", "(", "Class", "<", "?", ">", "clazz", ")", "{", "String", "classResourceDelimiter", "=", "clazz", ".", "getName", "(", ")", ".", "replaceAll", "(", "DELIMITER_CLASS_NAME_PATH", ",", "DELIMITER_RESOURC...
Helper to extract a ClassResources full path. <br/> <br/> ie: package.MyClass = package/MyClass.class @param clazz @return
[ "Helper", "to", "extract", "a", "ClassResources", "full", "path", ".", "<br", "/", ">", "<br", "/", ">", "ie", ":", "package", ".", "MyClass", "=", "package", "/", "MyClass", ".", "class" ]
3f8a1a6d344651428c709a63ebb52d35343c5387
https://github.com/shrinkwrap/shrinkwrap/blob/3f8a1a6d344651428c709a63ebb52d35343c5387/impl-base/src/main/java/org/jboss/shrinkwrap/impl/base/asset/AssetUtil.java#L124-L128
train
Gets the full path for the resource.
Create a Java method that does the following: "Gets the full path for the resource.".
Of course, here is the Java code you requested: ```java public static ArchivePath getFullPathForClassResource(Class<?> clazz) { String classResourceDelimiter = clazz.getName().replaceAll(DELIMITER_CLASS_NAME_PATH, DELIMITER_RESOURCE_PATH); String classFullPath = classResourceDelimiter + EXTENSION_CLASS...
comapi/comapi-sdk-android
COMAPI/foundation/src/main/java/com/comapi/RxComapi.java
RxComapi.initialiseShared
public static Observable<RxComapiClient> initialiseShared(@NonNull Application app, @NonNull ComapiConfig config) { String error = checkIfCanInitialise(app, config, true); if (error != null) { return Observable.error(new Exception(error)); } RxComapiClient client = createSha...
java
public static Observable<RxComapiClient> initialiseShared(@NonNull Application app, @NonNull ComapiConfig config) { String error = checkIfCanInitialise(app, config, true); if (error != null) { return Observable.error(new Exception(error)); } RxComapiClient client = createSha...
[ "public", "static", "Observable", "<", "RxComapiClient", ">", "initialiseShared", "(", "@", "NonNull", "Application", "app", ",", "@", "NonNull", "ComapiConfig", "config", ")", "{", "String", "error", "=", "checkIfCanInitialise", "(", "app", ",", "config", ",", ...
Build SDK client. Can be called only once in onCreate callback on Application class.
[ "Build", "SDK", "client", ".", "Can", "be", "called", "only", "once", "in", "onCreate", "callback", "on", "Application", "class", "." ]
53140a58d5a62afe196047ccc5120bfe090ef211
https://github.com/comapi/comapi-sdk-android/blob/53140a58d5a62afe196047ccc5120bfe090ef211/COMAPI/foundation/src/main/java/com/comapi/RxComapi.java#L61-L69
train
Initialise the shared application.
Create a Java method that does the following: "Initialise the shared application.".
Of course, here is the Java code you requested: ```java public static Observable<RxComapiClient> initialiseShared(@NonNull Application app, @NonNull ComapiConfig config) { String error = checkIfCanInitialise(app, config, true); if (error != null) { return Observable.error(new Exception(erro...
eclipse/packagedrone
bundles/org.apache.jasper.glassfish/src/org/apache/jasper/compiler/ErrorDispatcher.java
ErrorDispatcher.javacError
public void javacError(String errorReport, Exception e) throws JasperException { errHandler.javacError(errorReport, e); }
java
public void javacError(String errorReport, Exception e) throws JasperException { errHandler.javacError(errorReport, e); }
[ "public", "void", "javacError", "(", "String", "errorReport", ",", "Exception", "e", ")", "throws", "JasperException", "{", "errHandler", ".", "javacError", "(", "errorReport", ",", "e", ")", ";", "}" ]
/* Dispatches the given compilation error report and exception to the configured error handler. @param errorReport Compilation error report @param e Compilation exception
[ "/", "*", "Dispatches", "the", "given", "compilation", "error", "report", "and", "exception", "to", "the", "configured", "error", "handler", "." ]
3869c1643cdc6f7cb8b26097a7b6994683b13d7e
https://github.com/eclipse/packagedrone/blob/3869c1643cdc6f7cb8b26097a7b6994683b13d7e/bundles/org.apache.jasper.glassfish/src/org/apache/jasper/compiler/ErrorDispatcher.java#L310-L314
test
Called by the errorReport method.
Create a Java method that does the following: "Called by the errorReport method.".
Of course, here is the Java code you requested: ```java public void javacError(String errorReport, Exception e) throws JasperException { errHandler.javacError(errorReport, e); } ``` Hope this helps!
reactor/reactor-core
reactor-core/src/main/java/reactor/core/publisher/RingBuffer.java
RingBuffer.createMultiProducer
static <E> RingBuffer<E> createMultiProducer(Supplier<E> factory, int bufferSize, WaitStrategy waitStrategy, Runnable spinObserver) { if (hasUnsafe()) { MultiProducerRingBuffer sequencer = new MultiProducerRingBuffer(bufferSize, waitStrategy, spinObserver); return new UnsafeRingBuffer<>(factory, sequenc...
java
static <E> RingBuffer<E> createMultiProducer(Supplier<E> factory, int bufferSize, WaitStrategy waitStrategy, Runnable spinObserver) { if (hasUnsafe()) { MultiProducerRingBuffer sequencer = new MultiProducerRingBuffer(bufferSize, waitStrategy, spinObserver); return new UnsafeRingBuffer<>(factory, sequenc...
[ "static", "<", "E", ">", "RingBuffer", "<", "E", ">", "createMultiProducer", "(", "Supplier", "<", "E", ">", "factory", ",", "int", "bufferSize", ",", "WaitStrategy", "waitStrategy", ",", "Runnable", "spinObserver", ")", "{", "if", "(", "hasUnsafe", "(", "...
Create a new multiple producer RingBuffer with the specified wait strategy. <p>See {@code MultiProducerRingBuffer}. @param <E> the element type @param factory used to create the events within the ring buffer. @param bufferSize number of elements to create within the ring buffer. @param waitStrategy used to determine ho...
[ "Create", "a", "new", "multiple", "producer", "RingBuffer", "with", "the", "specified", "wait", "strategy", ".", "<p", ">", "See", "{" ]
df2eba4ab7d2393e1a942ce972c3307fbbd47ff9
https://github.com/reactor/reactor-core/blob/df2eba4ab7d2393e1a942ce972c3307fbbd47ff9/reactor-core/src/main/java/reactor/core/publisher/RingBuffer.java#L120-L132
valid
Creates a multi - producer ring buffer.
Create a Java method that does the following: "Creates a multi - producer ring buffer.".
Of course, here is the Java code you requested: ```java static <E> RingBuffer<E> createMultiProducer(Supplier<E> factory, int bufferSize, WaitStrategy waitStrategy, Runnable spinObserver) { if (hasUnsafe()) { MultiProducerRingBuffer sequencer = new MultiProducerRingBuffer(bufferSize, waitStrategy, spinObse...
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/VersionInfo.java
VersionInfo.getInstance
public static VersionInfo getInstance(int major, int minor, int milli, int micro) { // checks if it is in the hashmap // else if (major < 0 || major > 255 || minor < 0 || minor > 255 || milli < 0 || milli > 255 || micro < 0 || micro > 255...
java
public static VersionInfo getInstance(int major, int minor, int milli, int micro) { // checks if it is in the hashmap // else if (major < 0 || major > 255 || minor < 0 || minor > 255 || milli < 0 || milli > 255 || micro < 0 || micro > 255...
[ "public", "static", "VersionInfo", "getInstance", "(", "int", "major", ",", "int", "minor", ",", "int", "milli", ",", "int", "micro", ")", "{", "// checks if it is in the hashmap", "// else", "if", "(", "major", "<", "0", "||", "major", ">", "255", "||", "...
Returns an instance of VersionInfo with the argument version. @param major major version, non-negative number &lt;= 255. @param minor minor version, non-negative number &lt;= 255. @param milli milli version, non-negative number &lt;= 255. @param micro micro version, non-negative number &lt;= 255. @exception IllegalArgu...
[ "Returns", "an", "instance", "of", "VersionInfo", "with", "the", "argument", "version", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/VersionInfo.java#L253-L273
train
Get a VersionInfo object from the version number.
Create a Java method that does the following: "Get a VersionInfo object from the version number.".
Of course, here is the Java code you requested: ```java public static VersionInfo getInstance(int major, int minor, int milli, int micro) { // checks if it is in the hashmap // else if (major < 0 || major > 255 || minor < 0 || minor > 255 || ...
Esri/geometry-api-java
src/main/java/com/esri/core/geometry/Treap.java
Treap.addUniqueElement
public int addUniqueElement(int element, int treap) { int treap_; if (treap == -1) { if (m_defaultTreap == nullNode()) m_defaultTreap = createTreap(-1); treap_ = m_defaultTreap; } else { treap_ = treap; } return addElement_(element, 1, treap_); }
java
public int addUniqueElement(int element, int treap) { int treap_; if (treap == -1) { if (m_defaultTreap == nullNode()) m_defaultTreap = createTreap(-1); treap_ = m_defaultTreap; } else { treap_ = treap; } return addElement_(element, 1, treap_); }
[ "public", "int", "addUniqueElement", "(", "int", "element", ",", "int", "treap", ")", "{", "int", "treap_", ";", "if", "(", "treap", "==", "-", "1", ")", "{", "if", "(", "m_defaultTreap", "==", "nullNode", "(", ")", ")", "m_defaultTreap", "=", "createT...
the already existing element equal to element.
[ "the", "already", "existing", "element", "equal", "to", "element", "." ]
494da8ec953d76e7c6072afbc081abfe48ff07cf
https://github.com/Esri/geometry-api-java/blob/494da8ec953d76e7c6072afbc081abfe48ff07cf/src/main/java/com/esri/core/geometry/Treap.java#L144-L155
train
Add an element to the list.
Create a Java method that does the following: "Add an element to the list.".
Of course, here is the Java code you requested: ```java public int addUniqueElement(int element, int treap) { int treap_; if (treap == -1) { if (m_defaultTreap == nullNode()) m_defaultTreap = createTreap(-1); treap_ = m_defaultTreap; } else { treap_ = treap; } return addElement_(element, 1, tre...
google/error-prone-javac
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/HtmlTree.java
HtmlTree.A
public static HtmlTree A(String ref, Content body) { HtmlTree htmltree = new HtmlTree(HtmlTag.A, nullCheck(body)); htmltree.addAttr(HtmlAttr.HREF, encodeURL(ref)); return htmltree; }
java
public static HtmlTree A(String ref, Content body) { HtmlTree htmltree = new HtmlTree(HtmlTag.A, nullCheck(body)); htmltree.addAttr(HtmlAttr.HREF, encodeURL(ref)); return htmltree; }
[ "public", "static", "HtmlTree", "A", "(", "String", "ref", ",", "Content", "body", ")", "{", "HtmlTree", "htmltree", "=", "new", "HtmlTree", "(", "HtmlTag", ".", "A", ",", "nullCheck", "(", "body", ")", ")", ";", "htmltree", ".", "addAttr", "(", "HtmlA...
Generates an HTML anchor tag. @param ref reference url for the anchor tag @param body content for the anchor tag @return an HtmlTree object
[ "Generates", "an", "HTML", "anchor", "tag", "." ]
a53d069bbdb2c60232ed3811c19b65e41c3e60e0
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/HtmlTree.java#L229-L233
train
Generates an HTML anchor tag with a ref attribute and some content.
Create a Java method that does the following: "Generates an HTML anchor tag with a ref attribute and some content.".
Of course, here is the Java code you requested: ```java public static HtmlTree A(String ref, Content body) { HtmlTree htmltree = new HtmlTree(HtmlTag.A, nullCheck(body)); htmltree.addAttr(HtmlAttr.HREF, encodeURL(ref)); return htmltree; } ``` Hope this helps!
aws/aws-sdk-java
aws-java-sdk-api-gateway/src/main/java/com/amazonaws/services/apigateway/model/transform/DeleteUsagePlanRequestMarshaller.java
DeleteUsagePlanRequestMarshaller.marshall
public void marshall(DeleteUsagePlanRequest deleteUsagePlanRequest, ProtocolMarshaller protocolMarshaller) { if (deleteUsagePlanRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(deleteUsagePl...
java
public void marshall(DeleteUsagePlanRequest deleteUsagePlanRequest, ProtocolMarshaller protocolMarshaller) { if (deleteUsagePlanRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(deleteUsagePl...
[ "public", "void", "marshall", "(", "DeleteUsagePlanRequest", "deleteUsagePlanRequest", ",", "ProtocolMarshaller", "protocolMarshaller", ")", "{", "if", "(", "deleteUsagePlanRequest", "==", "null", ")", "{", "throw", "new", "SdkClientException", "(", "\"Invalid argument pa...
Marshall the given parameter object.
[ "Marshall", "the", "given", "parameter", "object", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-api-gateway/src/main/java/com/amazonaws/services/apigateway/model/transform/DeleteUsagePlanRequestMarshaller.java#L42-L53
train
marshalls the given deleteUsagePlanRequest to the given protocolMarshaller.
Create a Java method that does the following: "marshalls the given deleteUsagePlanRequest to the given protocolMarshaller.".
Of course, here is the Java code you requested: ```java public void marshall(DeleteUsagePlanRequest deleteUsagePlanRequest, ProtocolMarshaller protocolMarshaller) { if (deleteUsagePlanRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } tr...