repo
stringlengths
7
59
path
stringlengths
17
234
func_name
stringlengths
3
117
original_string
stringlengths
63
281k
language
stringclasses
1 value
code
stringlengths
63
281k
code_tokens
listlengths
20
16.3k
docstring
stringlengths
1
34k
docstring_tokens
listlengths
1
3.44k
sha
stringlengths
40
40
url
stringlengths
106
339
partition
stringclasses
3 values
summary
stringlengths
3
248
output
stringlengths
142
281k
line/armeria
core/src/main/java/com/linecorp/armeria/common/util/SystemInfo.java
SystemInfo.currentTimeMicros
public static long currentTimeMicros() { if (javaVersion() == 8) { return TimeUnit.MILLISECONDS.toMicros(System.currentTimeMillis()); } else { // Java 9+ support higher precision wall time. final Instant now = Clock.systemUTC().instant(); return TimeUnit.S...
java
public static long currentTimeMicros() { if (javaVersion() == 8) { return TimeUnit.MILLISECONDS.toMicros(System.currentTimeMillis()); } else { // Java 9+ support higher precision wall time. final Instant now = Clock.systemUTC().instant(); return TimeUnit.S...
[ "public", "static", "long", "currentTimeMicros", "(", ")", "{", "if", "(", "javaVersion", "(", ")", "==", "8", ")", "{", "return", "TimeUnit", ".", "MILLISECONDS", ".", "toMicros", "(", "System", ".", "currentTimeMillis", "(", ")", ")", ";", "}", "else",...
Returns the number of microseconds since the epoch (00:00:00, 01-Jan-1970, GMT). The precision of the returned value may vary depending on {@linkplain #javaVersion() Java version}. Currently, Java 9 or above is required for microsecond precision. {@code System.currentTimeMillis() * 1000} is returned on Java 8.
[ "Returns", "the", "number", "of", "microseconds", "since", "the", "epoch", "(", "00", ":", "00", ":", "00", "01", "-", "Jan", "-", "1970", "GMT", ")", ".", "The", "precision", "of", "the", "returned", "value", "may", "vary", "depending", "on", "{" ]
67d29e019fd35a35f89c45cc8f9119ff9b12b44d
https://github.com/line/armeria/blob/67d29e019fd35a35f89c45cc8f9119ff9b12b44d/core/src/main/java/com/linecorp/armeria/common/util/SystemInfo.java#L131-L140
train
Get the current time in microseconds.
Of course, here is the Java code you requested: ```java public static long currentTimeMicros() { if (javaVersion() == 8) { return TimeUnit.MILLISECONDS.toMicros(System.currentTimeMillis()); } else { // Java 9+ support higher precision wall time. final Instant now = C...
jboss/jboss-jstl-api_spec
src/main/java/org/apache/taglibs/standard/tag/el/xml/TransformTag.java
TransformTag.evaluateExpressions
private void evaluateExpressions() throws JspException { /* * Note: we don't check for type mismatches here; we assume * the expression evaluator will return the expected type * (by virtue of knowledge we give it about what that type is). * A ClassCastException here is truly...
java
private void evaluateExpressions() throws JspException { /* * Note: we don't check for type mismatches here; we assume * the expression evaluator will return the expected type * (by virtue of knowledge we give it about what that type is). * A ClassCastException here is truly...
[ "private", "void", "evaluateExpressions", "(", ")", "throws", "JspException", "{", "/* \n * Note: we don't check for type mismatches here; we assume\n * the expression evaluator will return the expected type\n * (by virtue of knowledge we give it about what that type is).\n ...
/* Evaluates expressions as necessary
[ "/", "*", "Evaluates", "expressions", "as", "necessary" ]
4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/org/apache/taglibs/standard/tag/el/xml/TransformTag.java#L130-L153
train
Evaluate the expressions.
Of course, here is the Java code you requested: ```java private void evaluateExpressions() throws JspException { /* * Note: we don't check for type mismatches here; we assume * the expression evaluator will return the expected type * (by virtue of knowledge we give it about what tha...
SeaCloudsEU/SeaCloudsPlatform
dashboard/src/main/java/eu/seaclouds/platform/dashboard/proxy/SlaProxy.java
SlaProxy.getAgreement
public Agreement getAgreement(String agreementId) { return getJerseyClient().target(getEndpoint() + "/agreements/" + agreementId).request() .header("Accept", MediaType.APPLICATION_JSON) .header("Content-Type", MediaType.APPLICATION_JSON) .buildGet().invoke().readE...
java
public Agreement getAgreement(String agreementId) { return getJerseyClient().target(getEndpoint() + "/agreements/" + agreementId).request() .header("Accept", MediaType.APPLICATION_JSON) .header("Content-Type", MediaType.APPLICATION_JSON) .buildGet().invoke().readE...
[ "public", "Agreement", "getAgreement", "(", "String", "agreementId", ")", "{", "return", "getJerseyClient", "(", ")", ".", "target", "(", "getEndpoint", "(", ")", "+", "\"/agreements/\"", "+", "agreementId", ")", ".", "request", "(", ")", ".", "header", "(",...
Creates proxied HTTP GET request to SeaClouds SLA core which retrieves the Agreement details @param agreementId of the desired agreement. This ID may differ from SeaClouds Application ID @return the Agreement
[ "Creates", "proxied", "HTTP", "GET", "request", "to", "SeaClouds", "SLA", "core", "which", "retrieves", "the", "Agreement", "details" ]
b199fe6de2c63b808cb248d3aca947d802375df8
https://github.com/SeaCloudsEU/SeaCloudsPlatform/blob/b199fe6de2c63b808cb248d3aca947d802375df8/dashboard/src/main/java/eu/seaclouds/platform/dashboard/proxy/SlaProxy.java#L102-L107
train
Get a single agreement
Of course, here is the Java code you requested: ```java public Agreement getAgreement(String agreementId) { return getJerseyClient().target(getEndpoint() + "/agreements/" + agreementId).request() .header("Accept", MediaType.APPLICATION_JSON) .header("Content-Type", MediaType.APP...
Alluxio/alluxio
core/client/hdfs/src/main/java/alluxio/hadoop/AbstractFileSystem.java
AbstractFileSystem.setOwner
@Override public void setOwner(Path path, final String username, final String groupname) throws IOException { LOG.debug("setOwner({},{},{})", path, username, groupname); AlluxioURI uri = new AlluxioURI(HadoopUtils.getPathWithoutScheme(path)); SetAttributePOptions.Builder optionsBuilder = SetAttribut...
java
@Override public void setOwner(Path path, final String username, final String groupname) throws IOException { LOG.debug("setOwner({},{},{})", path, username, groupname); AlluxioURI uri = new AlluxioURI(HadoopUtils.getPathWithoutScheme(path)); SetAttributePOptions.Builder optionsBuilder = SetAttribut...
[ "@", "Override", "public", "void", "setOwner", "(", "Path", "path", ",", "final", "String", "username", ",", "final", "String", "groupname", ")", "throws", "IOException", "{", "LOG", ".", "debug", "(", "\"setOwner({},{},{})\"", ",", "path", ",", "username", ...
Changes owner or group of a path (i.e. a file or a directory). If username is null, the original username remains unchanged. Same as groupname. If username and groupname are non-null, both of them will be changed. @param path path to set owner or group @param username username to be set @param groupname groupname to b...
[ "Changes", "owner", "or", "group", "of", "a", "path", "(", "i", ".", "e", ".", "a", "file", "or", "a", "directory", ")", ".", "If", "username", "is", "null", "the", "original", "username", "remains", "unchanged", ".", "Same", "as", "groupname", ".", ...
af38cf3ab44613355b18217a3a4d961f8fec3a10
https://github.com/Alluxio/alluxio/blob/af38cf3ab44613355b18217a3a4d961f8fec3a10/core/client/hdfs/src/main/java/alluxio/hadoop/AbstractFileSystem.java#L374-L396
train
Override the owner method.
Of course, here is the Java code you requested: ```java @Override public void setOwner(Path path, final String username, final String groupname) throws IOException { LOG.debug("setOwner({},{},{})", path, username, groupname); AlluxioURI uri = new AlluxioURI(HadoopUtils.getPathWithoutScheme(path)); ...
kikinteractive/ice
ice/src/main/java/com/kik/config/ice/internal/ConfigBuilder.java
ConfigBuilder.configModule
public static <C> Module configModule(final Class<C> configInterface, final Optional<Named> nameOpt) { checkNotNull(configInterface); checkNotNull(nameOpt); final Optional<String> nameStrOpt = nameOpt.map(Named::value); // Build config descriptors for the given config interface ...
java
public static <C> Module configModule(final Class<C> configInterface, final Optional<Named> nameOpt) { checkNotNull(configInterface); checkNotNull(nameOpt); final Optional<String> nameStrOpt = nameOpt.map(Named::value); // Build config descriptors for the given config interface ...
[ "public", "static", "<", "C", ">", "Module", "configModule", "(", "final", "Class", "<", "C", ">", "configInterface", ",", "final", "Optional", "<", "Named", ">", "nameOpt", ")", "{", "checkNotNull", "(", "configInterface", ")", ";", "checkNotNull", "(", "...
Intended for use by {@link ConfigSystem} only. @param <C> the config interface class being configured @param configInterface a reference to the interface class being configured @param nameOpt an optional {@link Named} used to provide a scope for the generated config module @return a Guice Module wh...
[ "Intended", "for", "use", "by", "{", "@link", "ConfigSystem", "}", "only", "." ]
0c58d7bf2d9f6504892d0768d6022fcfa6df7514
https://github.com/kikinteractive/ice/blob/0c58d7bf2d9f6504892d0768d6022fcfa6df7514/ice/src/main/java/com/kik/config/ice/internal/ConfigBuilder.java#L89-L190
train
Create a module that can be used to configure the configuration class.
Of course, here is the Java code you requested: ```java public static <C> Module configModule(final Class<C> configInterface, final Optional<Named> nameOpt) { checkNotNull(configInterface); checkNotNull(nameOpt); final Optional<String> nameStrOpt = nameOpt.map(Named::value); // Bui...
Impetus/Kundera
src/jpa-engine/core/src/main/java/com/impetus/kundera/persistence/KunderaCriteriaBuilder.java
KunderaCriteriaBuilder.count
@Override public Expression<Long> count(Expression<?> arg0) { // TODO Auto-generated method stub String arg1 = "Count("+arg0.getAlias()+")"; return new AggregateExpression(arg0, arg1); }
java
@Override public Expression<Long> count(Expression<?> arg0) { // TODO Auto-generated method stub String arg1 = "Count("+arg0.getAlias()+")"; return new AggregateExpression(arg0, arg1); }
[ "@", "Override", "public", "Expression", "<", "Long", ">", "count", "(", "Expression", "<", "?", ">", "arg0", ")", "{", "// TODO Auto-generated method stub", "String", "arg1", "=", "\"Count(\"", "+", "arg0", ".", "getAlias", "(", ")", "+", "\")\"", ";", "r...
/* (non-Javadoc) @see javax.persistence.criteria.CriteriaBuilder#count(javax.persistence.criteria .Expression)
[ "/", "*", "(", "non", "-", "Javadoc", ")" ]
268958ab1ec09d14ec4d9184f0c8ded7a9158908
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/jpa-engine/core/src/main/java/com/impetus/kundera/persistence/KunderaCriteriaBuilder.java#L328-L334
train
Create an aggregate expression for a count of a single record set.
Of course, here is the Java code you requested: ```java @Override public Expression<Long> count(Expression<?> arg0) { // TODO Auto-generated method stub String arg1 = "Count("+arg0.getAlias()+")"; return new AggregateExpression(arg0, arg1); } ``` Hope this helps!
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/LinkedWorkspaceStorageCacheImpl.java
LinkedWorkspaceStorageCacheImpl.addChildProperties
public void addChildProperties(final NodeData parentData, final List<PropertyData> childItems) { if (enabled && parentData != null && childItems != null) { String logInfo = null; if (LOG.isDebugEnabled()) { logInfo = "parent: " + parentData.getQPath...
java
public void addChildProperties(final NodeData parentData, final List<PropertyData> childItems) { if (enabled && parentData != null && childItems != null) { String logInfo = null; if (LOG.isDebugEnabled()) { logInfo = "parent: " + parentData.getQPath...
[ "public", "void", "addChildProperties", "(", "final", "NodeData", "parentData", ",", "final", "List", "<", "PropertyData", ">", "childItems", ")", "{", "if", "(", "enabled", "&&", "parentData", "!=", "null", "&&", "childItems", "!=", "null", ")", "{", "Strin...
{@inheritDoc}
[ "{" ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/LinkedWorkspaceStorageCacheImpl.java#L1109-L1168
train
Add child properties.
Of course, here is the Java code you requested: ```java public void addChildProperties(final NodeData parentData, final List<PropertyData> childItems) { if (enabled && parentData != null && childItems != null) { String logInfo = null; if (LOG.isDebugEnabled()) { lo...
vznet/mongo-jackson-mapper
src/main/java/net/vz/mongodb/jackson/DBQuery.java
DBQuery.in
public static Query in(String field, Collection<?> values) { return new Query().in(field, values); }
java
public static Query in(String field, Collection<?> values) { return new Query().in(field, values); }
[ "public", "static", "Query", "in", "(", "String", "field", ",", "Collection", "<", "?", ">", "values", ")", "{", "return", "new", "Query", "(", ")", ".", "in", "(", "field", ",", "values", ")", ";", "}" ]
The field is in the given set of values @param field The field to compare @param values The value to compare to @return the query
[ "The", "field", "is", "in", "the", "given", "set", "of", "values" ]
ecd189aefa89636cddf70fb383f5d676be347976
https://github.com/vznet/mongo-jackson-mapper/blob/ecd189aefa89636cddf70fb383f5d676be347976/src/main/java/net/vz/mongodb/jackson/DBQuery.java#L128-L130
train
Create a query that returns objects that are in the given field
Of course, here is the Java code you requested: ```java public static Query in(String field, Collection<?> values) { return new Query().in(field, values); } ``` Hope this helps!
Azure/azure-sdk-for-java
resources/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/resources/v2018_02_01/implementation/ResourcesInner.java
ResourcesInner.getWithServiceResponseAsync
public Observable<ServiceResponse<GenericResourceInner>> getWithServiceResponseAsync(String resourceGroupName, String resourceProviderNamespace, String parentResourcePath, String resourceType, String resourceName, String apiVersion) { if (resourceGroupName == null) { throw new IllegalArgumentExcepti...
java
public Observable<ServiceResponse<GenericResourceInner>> getWithServiceResponseAsync(String resourceGroupName, String resourceProviderNamespace, String parentResourcePath, String resourceType, String resourceName, String apiVersion) { if (resourceGroupName == null) { throw new IllegalArgumentExcepti...
[ "public", "Observable", "<", "ServiceResponse", "<", "GenericResourceInner", ">", ">", "getWithServiceResponseAsync", "(", "String", "resourceGroupName", ",", "String", "resourceProviderNamespace", ",", "String", "parentResourcePath", ",", "String", "resourceType", ",", "...
Gets a resource. @param resourceGroupName The name of the resource group containing the resource to get. The name is case insensitive. @param resourceProviderNamespace The namespace of the resource provider. @param parentResourcePath The parent resource identity. @param resourceType The resource type of the resource. ...
[ "Gets", "a", "resource", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/resources/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/resources/v2018_02_01/implementation/ResourcesInner.java#L1792-L1826
train
Gets a specific image in an App Service Environment.
Of course, here is the Java code you requested: ```java public Observable<ServiceResponse<GenericResourceInner>> getWithServiceResponseAsync(String resourceGroupName, String resourceProviderNamespace, String parentResourcePath, String resourceType, String resourceName, String apiVersion) { if (resourceGroupNam...
rupertlssmith/lojix
base/common/src/main/com/thesett/common/util/concurrent/BaseUnaryCondition.java
BaseUnaryCondition.await
public boolean await(T t, long timeout, TimeUnit unit) throws InterruptedException { synchronized (monitor) { // Holds the absolute time when the timeout expires. long expiryTimeNanos = System.nanoTime() + unit.toNanos(timeout); // Used to hold the estimated wait...
java
public boolean await(T t, long timeout, TimeUnit unit) throws InterruptedException { synchronized (monitor) { // Holds the absolute time when the timeout expires. long expiryTimeNanos = System.nanoTime() + unit.toNanos(timeout); // Used to hold the estimated wait...
[ "public", "boolean", "await", "(", "T", "t", ",", "long", "timeout", ",", "TimeUnit", "unit", ")", "throws", "InterruptedException", "{", "synchronized", "(", "monitor", ")", "{", "// Holds the absolute time when the timeout expires.", "long", "expiryTimeNanos", "=", ...
Wait for up to a timeout limit for the predicate to become true on the specified object. @param t The object to test for predicate membership. @param timeout The amount of time to wait. @param unit The units of time used. @return <tt>true</tt> if the predicate became true before the timeout expired, <tt>f...
[ "Wait", "for", "up", "to", "a", "timeout", "limit", "for", "the", "predicate", "to", "become", "true", "on", "the", "specified", "object", "." ]
ad494dc8bce2345567de7689d42291d4b30fbd51
https://github.com/rupertlssmith/lojix/blob/ad494dc8bce2345567de7689d42291d4b30fbd51/base/common/src/main/com/thesett/common/util/concurrent/BaseUnaryCondition.java#L84-L122
test
Await for the condition.
Of course, here is the Java code you requested: ```java public boolean await(T t, long timeout, TimeUnit unit) throws InterruptedException { synchronized (monitor) { // Holds the absolute time when the timeout expires. long expiryTimeNanos = System.nanoTime() + unit.toNanos(...
salesforce/Argus
ArgusWebServices/src/main/java/com/salesforce/dva/argus/ws/exception/WebApplicationExceptionMapper.java
WebApplicationExceptionMapper.toResponse
@Override public Response toResponse(WebApplicationException ex) { return Response.status(ex.getResponse().getStatus()).entity(new ErrorMessage(ex.getResponse().getStatus(), ex.getMessage())).type( MediaType.APPLICATION_JSON_TYPE).build(); }
java
@Override public Response toResponse(WebApplicationException ex) { return Response.status(ex.getResponse().getStatus()).entity(new ErrorMessage(ex.getResponse().getStatus(), ex.getMessage())).type( MediaType.APPLICATION_JSON_TYPE).build(); }
[ "@", "Override", "public", "Response", "toResponse", "(", "WebApplicationException", "ex", ")", "{", "return", "Response", ".", "status", "(", "ex", ".", "getResponse", "(", ")", ".", "getStatus", "(", ")", ")", ".", "entity", "(", "new", "ErrorMessage", "...
~ Methods **************************************************************************************************************************************
[ "~", "Methods", "**************************************************************************************************************************************" ]
121b59a268da264316cded6a3e9271366a23cd86
https://github.com/salesforce/Argus/blob/121b59a268da264316cded6a3e9271366a23cd86/ArgusWebServices/src/main/java/com/salesforce/dva/argus/ws/exception/WebApplicationExceptionMapper.java#L50-L54
train
Override toResponse to return a response object for a banner exception.
Of course, here is the Java code you requested: ```java @Override public Response toResponse(WebApplicationException ex) { return Response.status(ex.getResponse().getStatus()).entity(new ErrorMessage(ex.getResponse().getStatus(), ex.getMessage())).type( MediaType.APPLICATION_JSON_TYPE).build();...
alkacon/opencms-core
src/org/opencms/jsp/CmsJspTagJQuery.java
CmsJspTagJQuery.doStartTag
@Override public int doStartTag() throws JspException { ServletRequest req = pageContext.getRequest(); // This will always be true if the page is called through OpenCms if (!CmsFlexController.isCmsRequest(req)) { return SKIP_BODY; } if (getJs() == null) { ...
java
@Override public int doStartTag() throws JspException { ServletRequest req = pageContext.getRequest(); // This will always be true if the page is called through OpenCms if (!CmsFlexController.isCmsRequest(req)) { return SKIP_BODY; } if (getJs() == null) { ...
[ "@", "Override", "public", "int", "doStartTag", "(", ")", "throws", "JspException", "{", "ServletRequest", "req", "=", "pageContext", ".", "getRequest", "(", ")", ";", "// This will always be true if the page is called through OpenCms", "if", "(", "!", "CmsFlexControlle...
Opens the direct edit tag, if manual mode is set then the next start HTML for the direct edit buttons is printed to the page.<p> @return {@link #EVAL_BODY_INCLUDE} @throws JspException in case something goes wrong
[ "Opens", "the", "direct", "edit", "tag", "if", "manual", "mode", "is", "set", "then", "the", "next", "start", "HTML", "for", "the", "direct", "edit", "buttons", "is", "printed", "to", "the", "page", ".", "<p", ">" ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/CmsJspTagJQuery.java#L96-L179
train
OverrideStartTag to provide the JS code for the cms calendar.
Of course, here is the Java code you requested: ```java @Override public int doStartTag() throws JspException { ServletRequest req = pageContext.getRequest(); // This will always be true if the page is called through OpenCms if (!CmsFlexController.isCmsRequest(req)) { return S...
DDTH/ddth-commons
ddth-commons-core/src/main/java/com/github/ddth/commons/jsonrpc/HttpJsonRpcClient.java
HttpJsonRpcClient.buildHttpClient
protected OkHttpClient buildHttpClient() { OkHttpClient.Builder builder = new OkHttpClient.Builder() .readTimeout(readTimeoutMs, TimeUnit.MILLISECONDS) .writeTimeout(writeTimeoutMs, TimeUnit.MILLISECONDS); OkHttpClient client = builder.build(); return client; ...
java
protected OkHttpClient buildHttpClient() { OkHttpClient.Builder builder = new OkHttpClient.Builder() .readTimeout(readTimeoutMs, TimeUnit.MILLISECONDS) .writeTimeout(writeTimeoutMs, TimeUnit.MILLISECONDS); OkHttpClient client = builder.build(); return client; ...
[ "protected", "OkHttpClient", "buildHttpClient", "(", ")", "{", "OkHttpClient", ".", "Builder", "builder", "=", "new", "OkHttpClient", ".", "Builder", "(", ")", ".", "readTimeout", "(", "readTimeoutMs", ",", "TimeUnit", ".", "MILLISECONDS", ")", ".", "writeTimeou...
Create a new instance of {@link OkHttpClient}. Sub-class my override this method to customize the {@link OkHttpClient} instance. @return @since 0.9.1.6
[ "Create", "a", "new", "instance", "of", "{", "@link", "OkHttpClient", "}", ".", "Sub", "-", "class", "my", "override", "this", "method", "to", "customize", "the", "{", "@link", "OkHttpClient", "}", "instance", "." ]
734f0e77321d41eeca78a557be9884df9874e46e
https://github.com/DDTH/ddth-commons/blob/734f0e77321d41eeca78a557be9884df9874e46e/ddth-commons-core/src/main/java/com/github/ddth/commons/jsonrpc/HttpJsonRpcClient.java#L38-L44
train
Build OkHttpClient
Of course, here is the Java code you requested: ```java protected OkHttpClient buildHttpClient() { OkHttpClient.Builder builder = new OkHttpClient.Builder() .readTimeout(readTimeoutMs, TimeUnit.MILLISECONDS) .writeTimeout(writeTimeoutMs, TimeUnit.MILLISECONDS); OkHttpCli...
lucee/Lucee
core/src/main/java/lucee/runtime/monitor/RequestMonitorProImpl.java
RequestMonitorProImpl.init
@Override public void init(PageContext pc) throws IOException { if (init != null) { try { init.invoke(monitor, new Object[] { pc }); } catch (Exception e) { throw ExceptionUtil.toIOException(e); } } }
java
@Override public void init(PageContext pc) throws IOException { if (init != null) { try { init.invoke(monitor, new Object[] { pc }); } catch (Exception e) { throw ExceptionUtil.toIOException(e); } } }
[ "@", "Override", "public", "void", "init", "(", "PageContext", "pc", ")", "throws", "IOException", "{", "if", "(", "init", "!=", "null", ")", "{", "try", "{", "init", ".", "invoke", "(", "monitor", ",", "new", "Object", "[", "]", "{", "pc", "}", ")...
/* (non-Javadoc) @see lucee.runtime.monitor.RequestMonitorPro#init(lucee.runtime.PageContext)
[ "/", "*", "(", "non", "-", "Javadoc", ")" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/monitor/RequestMonitorProImpl.java#L64-L74
train
Initializes the page context.
Of course, here is the Java code you requested: ```java @Override public void init(PageContext pc) throws IOException { if (init != null) { try { init.invoke(monitor, new Object[] { pc }); } catch (Exception e) { throw ExceptionUtil.toIOException(e); } } } ``` Hope this helps!
apache/incubator-gobblin
gobblin-runtime/src/main/java/org/apache/gobblin/runtime/scheduler/AbstractJobSpecScheduler.java
AbstractJobSpecScheduler.scheduleOnce
@Override public JobSpecSchedule scheduleOnce(JobSpec jobSpec, Runnable jobRunnable) { _log.info("Scheduling once JobSpec " + jobSpec); Runnable runOnceRunnable = new RunOnceRunnable(jobSpec.getUri(), jobRunnable); return scheduleJob(jobSpec, runOnceRunnable); }
java
@Override public JobSpecSchedule scheduleOnce(JobSpec jobSpec, Runnable jobRunnable) { _log.info("Scheduling once JobSpec " + jobSpec); Runnable runOnceRunnable = new RunOnceRunnable(jobSpec.getUri(), jobRunnable); return scheduleJob(jobSpec, runOnceRunnable); }
[ "@", "Override", "public", "JobSpecSchedule", "scheduleOnce", "(", "JobSpec", "jobSpec", ",", "Runnable", "jobRunnable", ")", "{", "_log", ".", "info", "(", "\"Scheduling once JobSpec \"", "+", "jobSpec", ")", ";", "Runnable", "runOnceRunnable", "=", "new", "RunOn...
{@inheritDoc}
[ "{" ]
f029b4c0fea0fe4aa62f36dda2512344ff708bae
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-runtime/src/main/java/org/apache/gobblin/runtime/scheduler/AbstractJobSpecScheduler.java#L104-L108
train
Schedules a Runnable to be run once.
Of course, here is the Java code you requested: ```java @Override public JobSpecSchedule scheduleOnce(JobSpec jobSpec, Runnable jobRunnable) { _log.info("Scheduling once JobSpec " + jobSpec); Runnable runOnceRunnable = new RunOnceRunnable(jobSpec.getUri(), jobRunnable); return scheduleJob(jobSpec, runOnceR...
facebookarchive/hadoop-20
src/hdfs/org/apache/hadoop/hdfs/DFSOutputStreamPacketInlineChecksum.java
DFSOutputStreamPacketInlineChecksum.getBuffer
ByteBuffer getBuffer() throws IOException { /* * Once this is called, no more data can be added to the packet. setting * 'buf' to null ensures that. This is called only when the packet is ready * to be sent. */ if (buffer != null) { return buffer; } int pktLen = DFSClient.SIZE...
java
ByteBuffer getBuffer() throws IOException { /* * Once this is called, no more data can be added to the packet. setting * 'buf' to null ensures that. This is called only when the packet is ready * to be sent. */ if (buffer != null) { return buffer; } int pktLen = DFSClient.SIZE...
[ "ByteBuffer", "getBuffer", "(", ")", "throws", "IOException", "{", "/*\n * Once this is called, no more data can be added to the packet. setting\n * 'buf' to null ensures that. This is called only when the packet is ready\n * to be sent.\n */", "if", "(", "buffer", "!=", "nul...
Returns ByteBuffer that contains one full packet, including header. Packet format: +----------------------------+ | size of payload | +----------------------------+ | packetVersion* | +----------------------------+ | offset of data in block | +----------------------------+ | packet's seq I...
[ "Returns", "ByteBuffer", "that", "contains", "one", "full", "packet", "including", "header", "." ]
2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/hdfs/org/apache/hadoop/hdfs/DFSOutputStreamPacketInlineChecksum.java#L154-L195
train
Get the buffer to be used for the data.
Of course, here is the Java code you requested: ```java ByteBuffer getBuffer() throws IOException { /* * Once this is called, no more data can be added to the packet. setting * 'buf' to null ensures that. This is called only when the packet is ready * to be sent. */ if (buffer != null) { ...
google/guice
core/src/com/google/inject/internal/Annotations.java
Annotations.annotationToString
private static String annotationToString( Class<? extends Annotation> type, Map<String, Object> members) throws Exception { StringBuilder sb = new StringBuilder().append("@").append(type.getName()).append("("); JOINER.appendTo( sb, Maps.transformValues( members, arg...
java
private static String annotationToString( Class<? extends Annotation> type, Map<String, Object> members) throws Exception { StringBuilder sb = new StringBuilder().append("@").append(type.getName()).append("("); JOINER.appendTo( sb, Maps.transformValues( members, arg...
[ "private", "static", "String", "annotationToString", "(", "Class", "<", "?", "extends", "Annotation", ">", "type", ",", "Map", "<", "String", ",", "Object", ">", "members", ")", "throws", "Exception", "{", "StringBuilder", "sb", "=", "new", "StringBuilder", ...
Implements {@link Annotation#toString}.
[ "Implements", "{" ]
a0552a16d813ead98fe73737fb001db336650251
https://github.com/google/guice/blob/a0552a16d813ead98fe73737fb001db336650251/core/src/com/google/inject/internal/Annotations.java#L158-L170
test
Convert an annotation to a string.
Of course, here is the Java code you requested: ```java private static String annotationToString( Class<? extends Annotation> type, Map<String, Object> members) throws Exception { StringBuilder sb = new StringBuilder().append("@").append(type.getName()).append("("); JOINER.appendTo( sb, M...
ldriscoll/ektorplucene
src/main/java/com/github/ldriscoll/ektorplucene/designdocument/LuceneDefaults.java
LuceneDefaults.fromAnnotation
public static LuceneDefaults fromAnnotation(Defaults defaults) { LuceneDefaults lid = new LuceneDefaults(); boolean hasValues = false; if (!StringUtils.isBlank(defaults.field())) { lid.setField(defaults.field()); hasValues = true; } if (!StringUtils.isBla...
java
public static LuceneDefaults fromAnnotation(Defaults defaults) { LuceneDefaults lid = new LuceneDefaults(); boolean hasValues = false; if (!StringUtils.isBlank(defaults.field())) { lid.setField(defaults.field()); hasValues = true; } if (!StringUtils.isBla...
[ "public", "static", "LuceneDefaults", "fromAnnotation", "(", "Defaults", "defaults", ")", "{", "LuceneDefaults", "lid", "=", "new", "LuceneDefaults", "(", ")", ";", "boolean", "hasValues", "=", "false", ";", "if", "(", "!", "StringUtils", ".", "isBlank", "(", ...
Create a {@link LuceneDefaults} from a {@link Defaults} annotation. Returns null if no values are set.
[ "Create", "a", "{" ]
b81e78cad27e1c9e0a6c9a7cf2698310112de24e
https://github.com/ldriscoll/ektorplucene/blob/b81e78cad27e1c9e0a6c9a7cf2698310112de24e/src/main/java/com/github/ldriscoll/ektorplucene/designdocument/LuceneDefaults.java#L20-L41
train
This method is used to create LuceneDefaults object from a Annotation object.
Of course, here is the Java code you requested: ```java public static LuceneDefaults fromAnnotation(Defaults defaults) { LuceneDefaults lid = new LuceneDefaults(); boolean hasValues = false; if (!StringUtils.isBlank(defaults.field())) { lid.setField(defaults.field()); h...
aws/aws-sdk-java
aws-java-sdk-quicksight/src/main/java/com/amazonaws/services/quicksight/model/transform/DeleteUserRequestMarshaller.java
DeleteUserRequestMarshaller.marshall
public void marshall(DeleteUserRequest deleteUserRequest, ProtocolMarshaller protocolMarshaller) { if (deleteUserRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(deleteUserRequest.getUserNam...
java
public void marshall(DeleteUserRequest deleteUserRequest, ProtocolMarshaller protocolMarshaller) { if (deleteUserRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(deleteUserRequest.getUserNam...
[ "public", "void", "marshall", "(", "DeleteUserRequest", "deleteUserRequest", ",", "ProtocolMarshaller", "protocolMarshaller", ")", "{", "if", "(", "deleteUserRequest", "==", "null", ")", "{", "throw", "new", "SdkClientException", "(", "\"Invalid argument passed to marshal...
Marshall the given parameter object.
[ "Marshall", "the", "given", "parameter", "object", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-quicksight/src/main/java/com/amazonaws/services/quicksight/model/transform/DeleteUserRequestMarshaller.java#L46-L59
train
marshalls the given DeleteUserRequest object to the JSON object.
Of course, here is the Java code you requested: ```java public void marshall(DeleteUserRequest deleteUserRequest, ProtocolMarshaller protocolMarshaller) { if (deleteUserRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { ...
fozziethebeat/S-Space
src/main/java/edu/ucla/sspace/mains/FixedDurationTemporalRandomIndexingMain.java
FixedDurationTemporalRandomIndexingMain.writeNeighborComparison
private static void writeNeighborComparison(File neighborFile, MultiMap<Double,String> mostSimilar, SemanticSpace sspace) throws IOException { PrintWriter pw = new PrintWriter(neighborFile); // print out the hea...
java
private static void writeNeighborComparison(File neighborFile, MultiMap<Double,String> mostSimilar, SemanticSpace sspace) throws IOException { PrintWriter pw = new PrintWriter(neighborFile); // print out the hea...
[ "private", "static", "void", "writeNeighborComparison", "(", "File", "neighborFile", ",", "MultiMap", "<", "Double", ",", "String", ">", "mostSimilar", ",", "SemanticSpace", "sspace", ")", "throws", "IOException", "{", "PrintWriter", "pw", "=", "new", "PrintWriter...
Write to the {@code neighborFile} the previously computed results of an N x N similarity comparison of all the neighbors for word. @param neighborFile the file to which the results of the comparison should be written @param mostSimilar a mapping from the similarity value to the neighbors of an interesting word that ha...
[ "Write", "to", "the", "{", "@code", "neighborFile", "}", "the", "previously", "computed", "results", "of", "an", "N", "x", "N", "similarity", "comparison", "of", "all", "the", "neighbors", "for", "word", "." ]
a608102737dfd3d59038a9ead33fe60356bc6029
https://github.com/fozziethebeat/S-Space/blob/a608102737dfd3d59038a9ead33fe60356bc6029/src/main/java/edu/ucla/sspace/mains/FixedDurationTemporalRandomIndexingMain.java#L720-L755
train
Write the neighbor comparison table.
Of course, here is the Java code you requested: ```java private static void writeNeighborComparison(File neighborFile, MultiMap<Double,String> mostSimilar, SemanticSpace sspace) throws IOException { PrintWriter pw = new PrintWr...
cogroo/cogroo4
cogroo-nlp/src/main/java/org/cogroo/tools/featurizer/DefaultFeaturizerContextGenerator.java
DefaultFeaturizerContextGenerator.create3WindowFeats
private void create3WindowFeats(int i, String[] toks, String[] tags, String[] preds, List<String> feats) { // Words in a 5-word window String w_1, w0, w1; // Tags in a 5-word window String t_1, t0, t1; // Previous predictions String p_2, p_1; w0 = w1 = null; t_1 = t0 = t1 = nul...
java
private void create3WindowFeats(int i, String[] toks, String[] tags, String[] preds, List<String> feats) { // Words in a 5-word window String w_1, w0, w1; // Tags in a 5-word window String t_1, t0, t1; // Previous predictions String p_2, p_1; w0 = w1 = null; t_1 = t0 = t1 = nul...
[ "private", "void", "create3WindowFeats", "(", "int", "i", ",", "String", "[", "]", "toks", ",", "String", "[", "]", "tags", ",", "String", "[", "]", "preds", ",", "List", "<", "String", ">", "feats", ")", "{", "// Words in a 5-word window", "String", "w_...
0.9670307770871996
[ "0", ".", "9670307770871996" ]
b6228900c20c6b37eac10a03708a9669dd562f52
https://github.com/cogroo/cogroo4/blob/b6228900c20c6b37eac10a03708a9669dd562f52/cogroo-nlp/src/main/java/org/cogroo/tools/featurizer/DefaultFeaturizerContextGenerator.java#L320-L390
train
Create 3 - window features.
Of course, here is the Java code you requested: ```java private void create3WindowFeats(int i, String[] toks, String[] tags, String[] preds, List<String> feats) { // Words in a 5-word window String w_1, w0, w1; // Tags in a 5-word window String t_1, t0, t1; // Previous predictions Stri...
ehcache/ehcache3
impl/src/main/java/org/ehcache/impl/internal/resilience/RobustLoaderWriterResilienceStrategy.java
RobustLoaderWriterResilienceStrategy.putIfAbsentFailure
@Override public V putIfAbsentFailure(K key, V value, StoreAccessException e) { // FIXME: Should I care about useLoaderInAtomics? try { try { V loaded = loaderWriter.load(key); if (loaded != null) { return loaded; } } catch (Exception e1) { throw Exception...
java
@Override public V putIfAbsentFailure(K key, V value, StoreAccessException e) { // FIXME: Should I care about useLoaderInAtomics? try { try { V loaded = loaderWriter.load(key); if (loaded != null) { return loaded; } } catch (Exception e1) { throw Exception...
[ "@", "Override", "public", "V", "putIfAbsentFailure", "(", "K", "key", ",", "V", "value", ",", "StoreAccessException", "e", ")", "{", "// FIXME: Should I care about useLoaderInAtomics?", "try", "{", "try", "{", "V", "loaded", "=", "loaderWriter", ".", "load", "(...
Write the value to the loader-writer if it doesn't already exist in it. Note that the load and write pair is not atomic. This atomicity, if needed, should be handled by the something else. @param key the key being put @param value the value being put @param e the triggered failure @return the existing value or null if...
[ "Write", "the", "value", "to", "the", "loader", "-", "writer", "if", "it", "doesn", "t", "already", "exist", "in", "it", ".", "Note", "that", "the", "load", "and", "write", "pair", "is", "not", "atomic", ".", "This", "atomicity", "if", "needed", "shoul...
3cceda57185e522f8d241ddb75146d67ee2af898
https://github.com/ehcache/ehcache3/blob/3cceda57185e522f8d241ddb75146d67ee2af898/impl/src/main/java/org/ehcache/impl/internal/resilience/RobustLoaderWriterResilienceStrategy.java#L133-L154
train
Override the putIfAbsentFailure method to handle the case where the cache is not empty.
Of course, here is the Java code you requested: ```java @Override public V putIfAbsentFailure(K key, V value, StoreAccessException e) { // FIXME: Should I care about useLoaderInAtomics? try { try { V loaded = loaderWriter.load(key); if (loaded != null) { return loaded; ...
MKLab-ITI/multimedia-indexing
src/main/java/gr/iti/mklab/visual/utilities/FeatureIO.java
FeatureIO.readBinary
public static ArrayList<double[]> readBinary(String featuresFileName, int featureLength) throws Exception { ArrayList<double[]> features = new ArrayList<double[]>(); DataInputStream in = new DataInputStream(new BufferedInputStream( new FileInputStream(featuresFileName))); int counter = 0; double[] de...
java
public static ArrayList<double[]> readBinary(String featuresFileName, int featureLength) throws Exception { ArrayList<double[]> features = new ArrayList<double[]>(); DataInputStream in = new DataInputStream(new BufferedInputStream( new FileInputStream(featuresFileName))); int counter = 0; double[] de...
[ "public", "static", "ArrayList", "<", "double", "[", "]", ">", "readBinary", "(", "String", "featuresFileName", ",", "int", "featureLength", ")", "throws", "Exception", "{", "ArrayList", "<", "double", "[", "]", ">", "features", "=", "new", "ArrayList", "<",...
Reads features from a binary file and returns them in an ArrayList<double[]>. @param featuresFileName The binary file containing the features. @param featureLength The length of each feature. @return @throws Exception
[ "Reads", "features", "from", "a", "binary", "file", "and", "returns", "them", "in", "an", "ArrayList<double", "[]", ">", "." ]
f82e8e517da706651f4b7a719805401f3102e135
https://github.com/MKLab-ITI/multimedia-indexing/blob/f82e8e517da706651f4b7a719805401f3102e135/src/main/java/gr/iti/mklab/visual/utilities/FeatureIO.java#L36-L58
train
Reads a binary file containing features from a file name and returns the features in a list of double arrays.
Of course, here is the Java code you requested: ```java public static ArrayList<double[]> readBinary(String featuresFileName, int featureLength) throws Exception { ArrayList<double[]> features = new ArrayList<double[]>(); DataInputStream in = new DataInputStream(new BufferedInputStream( new FileInputStream(...
amaembo/streamex
src/main/java/one/util/streamex/StreamEx.java
StreamEx.partitioningBy
public Map<Boolean, List<T>> partitioningBy(Predicate<? super T> predicate) { return collect(Collectors.partitioningBy(predicate)); }
java
public Map<Boolean, List<T>> partitioningBy(Predicate<? super T> predicate) { return collect(Collectors.partitioningBy(predicate)); }
[ "public", "Map", "<", "Boolean", ",", "List", "<", "T", ">", ">", "partitioningBy", "(", "Predicate", "<", "?", "super", "T", ">", "predicate", ")", "{", "return", "collect", "(", "Collectors", ".", "partitioningBy", "(", "predicate", ")", ")", ";", "}...
Returns a {@code Map<Boolean, List<T>>} which contains two partitions of the input elements according to a {@code Predicate}. <p> This is a <a href="package-summary.html#StreamOps">terminal</a> operation. <p> There are no guarantees on the type, mutability, serializability, or thread-safety of the {@code Map} returne...
[ "Returns", "a", "{", "@code", "Map<Boolean", "List<T", ">>", "}", "which", "contains", "two", "partitions", "of", "the", "input", "elements", "according", "to", "a", "{", "@code", "Predicate", "}", "." ]
936bbd1b7dfbcf64a3b990682bfc848213441d14
https://github.com/amaembo/streamex/blob/936bbd1b7dfbcf64a3b990682bfc848213441d14/src/main/java/one/util/streamex/StreamEx.java#L666-L668
train
Partition the result set by the given predicate.
Of course, here is the Java code you requested: ```java public Map<Boolean, List<T>> partitioningBy(Predicate<? super T> predicate) { return collect(Collectors.partitioningBy(predicate)); } ``` Hope this helps!
astrapi69/mystic-crypt
crypt-data/src/main/java/de/alpharogroup/crypto/key/reader/PublicKeyReader.java
PublicKeyReader.readPublicKey
public static PublicKey readPublicKey(final byte[] publicKeyBytes) throws NoSuchAlgorithmException, InvalidKeySpecException, NoSuchProviderException { return readPublicKey(publicKeyBytes, KeyPairGeneratorAlgorithm.RSA.getAlgorithm()); }
java
public static PublicKey readPublicKey(final byte[] publicKeyBytes) throws NoSuchAlgorithmException, InvalidKeySpecException, NoSuchProviderException { return readPublicKey(publicKeyBytes, KeyPairGeneratorAlgorithm.RSA.getAlgorithm()); }
[ "public", "static", "PublicKey", "readPublicKey", "(", "final", "byte", "[", "]", "publicKeyBytes", ")", "throws", "NoSuchAlgorithmException", ",", "InvalidKeySpecException", ",", "NoSuchProviderException", "{", "return", "readPublicKey", "(", "publicKeyBytes", ",", "Ke...
Read public key. @param publicKeyBytes the public key bytes @return the public key @throws NoSuchAlgorithmException is thrown if instantiation of the cypher object fails. @throws InvalidKeySpecException is thrown if generation of the SecretKey object fails. @throws NoSuchProviderException is thrown if the specified pr...
[ "Read", "public", "key", "." ]
7f51ef5e4457e24de7ff391f10bfc5609e6f1a34
https://github.com/astrapi69/mystic-crypt/blob/7f51ef5e4457e24de7ff391f10bfc5609e6f1a34/crypt-data/src/main/java/de/alpharogroup/crypto/key/reader/PublicKeyReader.java#L94-L98
train
Reads a public key from the given byte array.
Of course, here is the Java code you requested: ```java public static PublicKey readPublicKey(final byte[] publicKeyBytes) throws NoSuchAlgorithmException, InvalidKeySpecException, NoSuchProviderException { return readPublicKey(publicKeyBytes, KeyPairGeneratorAlgorithm.RSA.getAlgorithm()); } ``` Hope this helps...
jcuda/jcublas
JCublasJava/src/main/java/jcuda/jcublas/JCublas.java
JCublas.cublasDasum
public static double cublasDasum(int n, Pointer x, int incx) { double result = cublasDasumNative(n, x, incx); checkResultBLAS(); return result; }
java
public static double cublasDasum(int n, Pointer x, int incx) { double result = cublasDasumNative(n, x, incx); checkResultBLAS(); return result; }
[ "public", "static", "double", "cublasDasum", "(", "int", "n", ",", "Pointer", "x", ",", "int", "incx", ")", "{", "double", "result", "=", "cublasDasumNative", "(", "n", ",", "x", ",", "incx", ")", ";", "checkResultBLAS", "(", ")", ";", "return", "resul...
<pre> double cublasDasum (int n, const double *x, int incx) computes the sum of the absolute values of the elements of double precision vector x; that is, the result is the sum from i = 0 to n - 1 of abs(x[1 + i * incx]). Input ----- n number of elements in input vector x double-precision vector with n elem...
[ "<pre", ">", "double", "cublasDasum", "(", "int", "n", "const", "double", "*", "x", "int", "incx", ")" ]
80875235d24562073f4d66651dd17263f306427d
https://github.com/jcuda/jcublas/blob/80875235d24562073f4d66651dd17263f306427d/JCublasJava/src/main/java/jcuda/jcublas/JCublas.java#L7050-L7055
test
Dasum for a Cublas segment.
Of course, here is the Java code you requested: ```java public static double cublasDasum(int n, Pointer x, int incx) { double result = cublasDasumNative(n, x, incx); checkResultBLAS(); return result; } ``` Hope this helps!
brettwooldridge/SansOrm
src/main/java/com/zaxxer/sansorm/internal/Introspected.java
Introspected.getColumnNameForProperty
public String getColumnNameForProperty(final String propertyName) { return Optional.ofNullable(propertyToField.get(propertyName)) .map(fcInfo -> fcInfo.getDelimitedColumnName()) .orElse(null); }
java
public String getColumnNameForProperty(final String propertyName) { return Optional.ofNullable(propertyToField.get(propertyName)) .map(fcInfo -> fcInfo.getDelimitedColumnName()) .orElse(null); }
[ "public", "String", "getColumnNameForProperty", "(", "final", "String", "propertyName", ")", "{", "return", "Optional", ".", "ofNullable", "(", "propertyToField", ".", "get", "(", "propertyName", ")", ")", ".", "map", "(", "fcInfo", "->", "fcInfo", ".", "getDe...
Get the delimited column name for the specified property name, or {@code null} if no such property exists. CLARIFY Must be public? @return the delimited column name or {@code null}
[ "Get", "the", "delimited", "column", "name", "for", "the", "specified", "property", "name", "or", "{", "@code", "null", "}", "if", "no", "such", "property", "exists", "." ]
ab22721db79c5f20c0e8483f09eda2844d596557
https://github.com/brettwooldridge/SansOrm/blob/ab22721db79c5f20c0e8483f09eda2844d596557/src/main/java/com/zaxxer/sansorm/internal/Introspected.java#L470-L475
train
Gets the column name for the property.
Of course, here is the Java code you requested: ```java public String getColumnNameForProperty(final String propertyName) { return Optional.ofNullable(propertyToField.get(propertyName)) .map(fcInfo -> fcInfo.getDelimitedColumnName()) .orElse(null); } ``` Hope this he...
googleads/googleads-java-lib
modules/adwords_axis/src/main/java/com/google/api/ads/adwords/axis/v201809/cm/PromotionFeedItem.java
PromotionFeedItem.setMoneyAmountOff
public void setMoneyAmountOff(com.google.api.ads.adwords.axis.v201809.cm.MoneyWithCurrency moneyAmountOff) { this.moneyAmountOff = moneyAmountOff; }
java
public void setMoneyAmountOff(com.google.api.ads.adwords.axis.v201809.cm.MoneyWithCurrency moneyAmountOff) { this.moneyAmountOff = moneyAmountOff; }
[ "public", "void", "setMoneyAmountOff", "(", "com", ".", "google", ".", "api", ".", "ads", ".", "adwords", ".", "axis", ".", "v201809", ".", "cm", ".", "MoneyWithCurrency", "moneyAmountOff", ")", "{", "this", ".", "moneyAmountOff", "=", "moneyAmountOff", ";",...
Sets the moneyAmountOff value for this PromotionFeedItem. @param moneyAmountOff * Money amount off. Either percentOff or moneyAmountOff is required. Cannot set both moneyAmountOff and percentOff.
[ "Sets", "the", "moneyAmountOff", "value", "for", "this", "PromotionFeedItem", "." ]
967957cc4f6076514e3a7926fe653e4f1f7cc9c9
https://github.com/googleads/googleads-java-lib/blob/967957cc4f6076514e3a7926fe653e4f1f7cc9c9/modules/adwords_axis/src/main/java/com/google/api/ads/adwords/axis/v201809/cm/PromotionFeedItem.java#L325-L327
train
Sets the moneyAmountOff value for this CMA.
Of course, here is the Java code you requested: ```java public void setMoneyAmountOff(com.google.api.ads.adwords.axis.v201809.cm.MoneyWithCurrency moneyAmountOff) { this.moneyAmountOff = moneyAmountOff; } ``` Hope this helps!
Azure/azure-sdk-for-java
network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/VirtualNetworksInner.java
VirtualNetworksInner.beginUpdateTagsAsync
public Observable<VirtualNetworkInner> beginUpdateTagsAsync(String resourceGroupName, String virtualNetworkName, Map<String, String> tags) { return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkName, tags).map(new Func1<ServiceResponse<VirtualNetworkInner>, VirtualNetworkInner>() { ...
java
public Observable<VirtualNetworkInner> beginUpdateTagsAsync(String resourceGroupName, String virtualNetworkName, Map<String, String> tags) { return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkName, tags).map(new Func1<ServiceResponse<VirtualNetworkInner>, VirtualNetworkInner>() { ...
[ "public", "Observable", "<", "VirtualNetworkInner", ">", "beginUpdateTagsAsync", "(", "String", "resourceGroupName", ",", "String", "virtualNetworkName", ",", "Map", "<", "String", ",", "String", ">", "tags", ")", "{", "return", "beginUpdateTagsWithServiceResponseAsync"...
Updates a virtual network tags. @param resourceGroupName The name of the resource group. @param virtualNetworkName The name of the virtual network. @param tags Resource tags. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the VirtualNetworkInner object
[ "Updates", "a", "virtual", "network", "tags", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/VirtualNetworksInner.java#L874-L881
train
Updates the tags on a virtual network.
Of course, here is the Java code you requested: ```java public Observable<VirtualNetworkInner> beginUpdateTagsAsync(String resourceGroupName, String virtualNetworkName, Map<String, String> tags) { return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkName, tags).map(new Func1<ServiceR...
OpenLiberty/open-liberty
dev/com.ibm.ws.logging/src/com/ibm/ws/logging/internal/impl/LoggingConfigUtils.java
LoggingConfigUtils.getLogDirectory
static File getLogDirectory(Object newValue, File defaultDirectory) { File newDirectory = defaultDirectory; // If a value was specified, try creating a file with it if (newValue != null && newValue instanceof String) { newDirectory = new File((String) newValue); } ...
java
static File getLogDirectory(Object newValue, File defaultDirectory) { File newDirectory = defaultDirectory; // If a value was specified, try creating a file with it if (newValue != null && newValue instanceof String) { newDirectory = new File((String) newValue); } ...
[ "static", "File", "getLogDirectory", "(", "Object", "newValue", ",", "File", "defaultDirectory", ")", "{", "File", "newDirectory", "=", "defaultDirectory", ";", "// If a value was specified, try creating a file with it", "if", "(", "newValue", "!=", "null", "&&", "newVa...
Find, create, and validate the log directory. @param newValue New parameter value to parse/evaluate @param defaultValue Starting/Previous log directory-- this value might *also* be null. @return defaultValue if the newValue is null or is was badly formatted, or the converted new value
[ "Find", "create", "and", "validate", "the", "log", "directory", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.logging/src/com/ibm/ws/logging/internal/impl/LoggingConfigUtils.java#L40-L65
train
Get the directory to use for the log file.
Of course, here is the Java code you requested: ```java static File getLogDirectory(Object newValue, File defaultDirectory) { File newDirectory = defaultDirectory; // If a value was specified, try creating a file with it if (newValue != null && newValue instanceof String) { newDir...
ontop/ontop
core/model/src/main/java/it/unibz/inf/ontop/substitution/impl/SubstitutionImpl.java
SubstitutionImpl.applySingletonSubstitution
private static boolean applySingletonSubstitution(Function functionalTerm, SingletonSubstitution substitution) { List<Term> innerTerms = functionalTerm.getTerms(); boolean innerchanges = false; // TODO this ways of changing inner terms in functions is not // optimal, modify for ...
java
private static boolean applySingletonSubstitution(Function functionalTerm, SingletonSubstitution substitution) { List<Term> innerTerms = functionalTerm.getTerms(); boolean innerchanges = false; // TODO this ways of changing inner terms in functions is not // optimal, modify for ...
[ "private", "static", "boolean", "applySingletonSubstitution", "(", "Function", "functionalTerm", ",", "SingletonSubstitution", "substitution", ")", "{", "List", "<", "Term", ">", "innerTerms", "=", "functionalTerm", ".", "getTerms", "(", ")", ";", "boolean", "innerc...
May alter the functionalTerm (mutable style) Recursive
[ "May", "alter", "the", "functionalTerm", "(", "mutable", "style", ")" ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/core/model/src/main/java/it/unibz/inf/ontop/substitution/impl/SubstitutionImpl.java#L177-L196
train
This method is used to apply a singleton substitution to a functional term.
Of course, here is the Java code you requested: ```java private static boolean applySingletonSubstitution(Function functionalTerm, SingletonSubstitution substitution) { List<Term> innerTerms = functionalTerm.getTerms(); boolean innerchanges = false; // TODO this ways of changing inner terms in ...
ineunetOS/knife-commons
knife-commons-utils/src/main/java/com/ineunet/knife/util/StringUtils.java
StringUtils.containsOnly
public static boolean containsOnly(String str, char[] valid) { // All these pre-checks are to maintain API with an older version if ((valid == null) || (str == null)) { return false; } if (str.length() == 0) { return true; } if (valid.length == 0) ...
java
public static boolean containsOnly(String str, char[] valid) { // All these pre-checks are to maintain API with an older version if ((valid == null) || (str == null)) { return false; } if (str.length() == 0) { return true; } if (valid.length == 0) ...
[ "public", "static", "boolean", "containsOnly", "(", "String", "str", ",", "char", "[", "]", "valid", ")", "{", "// All these pre-checks are to maintain API with an older version", "if", "(", "(", "valid", "==", "null", ")", "||", "(", "str", "==", "null", ")", ...
<p>Checks if the String contains only certain characters.</p> <p>A <code>null</code> String will return <code>false</code>. A <code>null</code> valid character array will return <code>false</code>. An empty String (length()=0) always returns <code>true</code>.</p> <pre> StringUtils.containsOnly(null, *) = false...
[ "<p", ">", "Checks", "if", "the", "String", "contains", "only", "certain", "characters", ".", "<", "/", "p", ">" ]
eae9e59afa020a00ae8977c10d43ac8ae46ae236
https://github.com/ineunetOS/knife-commons/blob/eae9e59afa020a00ae8977c10d43ac8ae46ae236/knife-commons-utils/src/main/java/com/ineunet/knife/util/StringUtils.java#L1565-L1577
train
Checks if the string contains only the valid characters.
Of course, here is the Java code you requested: ```java public static boolean containsOnly(String str, char[] valid) { // All these pre-checks are to maintain API with an older version if ((valid == null) || (str == null)) { return false; } if (str.length() == 0) { ...
Azure/azure-sdk-for-java
servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/ClientFactory.java
ClientFactory.createMessageReceiverFromConnectionStringAsync
public static CompletableFuture<IMessageReceiver> createMessageReceiverFromConnectionStringAsync(String amqpConnectionString, ReceiveMode receiveMode) { Utils.assertNonNull("amqpConnectionString", amqpConnectionString); return createMessageReceiverFromConnectionStringBuilderAsync(new ConnectionStringBui...
java
public static CompletableFuture<IMessageReceiver> createMessageReceiverFromConnectionStringAsync(String amqpConnectionString, ReceiveMode receiveMode) { Utils.assertNonNull("amqpConnectionString", amqpConnectionString); return createMessageReceiverFromConnectionStringBuilderAsync(new ConnectionStringBui...
[ "public", "static", "CompletableFuture", "<", "IMessageReceiver", ">", "createMessageReceiverFromConnectionStringAsync", "(", "String", "amqpConnectionString", ",", "ReceiveMode", "receiveMode", ")", "{", "Utils", ".", "assertNonNull", "(", "\"amqpConnectionString\"", ",", ...
Create {@link IMessageReceiver} in default {@link ReceiveMode#PEEKLOCK} mode asynchronously from connection string with <a href="https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-sas">Shared Access Signatures</a> @param amqpConnectionString the connection string @param receiveMode {@lin...
[ "Create", "{", "@link", "IMessageReceiver", "}", "in", "default", "{", "@link", "ReceiveMode#PEEKLOCK", "}", "mode", "asynchronously", "from", "connection", "string", "with", "<a", "href", "=", "https", ":", "//", "docs", ".", "microsoft", ".", "com", "/", "...
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/ClientFactory.java#L372-L375
train
Create a message receiver asynchronously from a connection string.
Of course, here is the Java code you requested: ```java public static CompletableFuture<IMessageReceiver> createMessageReceiverFromConnectionStringAsync(String amqpConnectionString, ReceiveMode receiveMode) { Utils.assertNonNull("amqpConnectionString", amqpConnectionString); return createMessageReceive...
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java
Shape.elementWiseStride
public static int elementWiseStride(DataBuffer buffer) { int length2 = shapeInfoLength(buffer.getInt(0)); return buffer.getInt(length2 - 2); }
java
public static int elementWiseStride(DataBuffer buffer) { int length2 = shapeInfoLength(buffer.getInt(0)); return buffer.getInt(length2 - 2); }
[ "public", "static", "int", "elementWiseStride", "(", "DataBuffer", "buffer", ")", "{", "int", "length2", "=", "shapeInfoLength", "(", "buffer", ".", "getInt", "(", "0", ")", ")", ";", "return", "buffer", ".", "getInt", "(", "length2", "-", "2", ")", ";",...
Get the element wise stride for the shape info buffer @param buffer the buffer to get the element wise stride from @return the element wise stride for the buffer
[ "Get", "the", "element", "wise", "stride", "for", "the", "shape", "info", "buffer" ]
effce52f2afd7eeb53c5bcca699fcd90bd06822f
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java#L3036-L3039
train
Get the element - wise stride of the image.
Of course, here is the Java code you requested: ```java public static int elementWiseStride(DataBuffer buffer) { int length2 = shapeInfoLength(buffer.getInt(0)); return buffer.getInt(length2 - 2); } ``` Hope this helps!
hazelcast/hazelcast-simulator
simulator/src/main/java/com/hazelcast/simulator/utils/ExceptionReporter.java
ExceptionReporter.report
public static void report(String testId, Throwable cause) { if (cause == null) { LOGGER.fatal("Can't call report with a null exception"); return; } long exceptionCount = FAILURE_ID.incrementAndGet(); if (exceptionCount > MAX_EXCEPTION_COUNT) { LOGGER...
java
public static void report(String testId, Throwable cause) { if (cause == null) { LOGGER.fatal("Can't call report with a null exception"); return; } long exceptionCount = FAILURE_ID.incrementAndGet(); if (exceptionCount > MAX_EXCEPTION_COUNT) { LOGGER...
[ "public", "static", "void", "report", "(", "String", "testId", ",", "Throwable", "cause", ")", "{", "if", "(", "cause", "==", "null", ")", "{", "LOGGER", ".", "fatal", "(", "\"Can't call report with a null exception\"", ")", ";", "return", ";", "}", "long", ...
Writes the cause to file. @param testId the id of the test that caused the exception. Is allowed to be <tt>null</tt> if it is not known which test caused the problem. @param cause the Throwable that should be reported.
[ "Writes", "the", "cause", "to", "file", "." ]
231ecd05c2f33a5406d2104f74dd8a8065402034
https://github.com/hazelcast/hazelcast-simulator/blob/231ecd05c2f33a5406d2104f74dd8a8065402034/simulator/src/main/java/com/hazelcast/simulator/utils/ExceptionReporter.java#L51-L85
test
Report an exception to the Agent.
Of course, here is the Java code you requested: ```java public static void report(String testId, Throwable cause) { if (cause == null) { LOGGER.fatal("Can't call report with a null exception"); return; } long exceptionCount = FAILURE_ID.incrementAndGet(); if (e...
Azure/azure-sdk-for-java
network/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/network/v2018_07_01/implementation/RouteFilterRulesInner.java
RouteFilterRulesInner.listByRouteFilterNextAsync
public Observable<Page<RouteFilterRuleInner>> listByRouteFilterNextAsync(final String nextPageLink) { return listByRouteFilterNextWithServiceResponseAsync(nextPageLink) .map(new Func1<ServiceResponse<Page<RouteFilterRuleInner>>, Page<RouteFilterRuleInner>>() { @Override ...
java
public Observable<Page<RouteFilterRuleInner>> listByRouteFilterNextAsync(final String nextPageLink) { return listByRouteFilterNextWithServiceResponseAsync(nextPageLink) .map(new Func1<ServiceResponse<Page<RouteFilterRuleInner>>, Page<RouteFilterRuleInner>>() { @Override ...
[ "public", "Observable", "<", "Page", "<", "RouteFilterRuleInner", ">", ">", "listByRouteFilterNextAsync", "(", "final", "String", "nextPageLink", ")", "{", "return", "listByRouteFilterNextWithServiceResponseAsync", "(", "nextPageLink", ")", ".", "map", "(", "new", "Fu...
Gets all RouteFilterRules in a route filter. @param nextPageLink The NextLink from the previous successful call to List operation. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the PagedList&lt;RouteFilterRuleInner&gt; object
[ "Gets", "all", "RouteFilterRules", "in", "a", "route", "filter", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/network/v2018_07_01/implementation/RouteFilterRulesInner.java#L891-L899
train
Gets a list of craveic acctic rules.
Of course, here is the Java code you requested: ```java public Observable<Page<RouteFilterRuleInner>> listByRouteFilterNextAsync(final String nextPageLink) { return listByRouteFilterNextWithServiceResponseAsync(nextPageLink) .map(new Func1<ServiceResponse<Page<RouteFilterRuleInner>>, Page<RouteFilt...
mangstadt/biweekly
src/main/java/biweekly/component/ICalComponent.java
ICalComponent.removeProperties
public <T extends ICalProperty> List<T> removeProperties(Class<T> clazz) { List<ICalProperty> removed = properties.removeAll(clazz); return castList(removed, clazz); }
java
public <T extends ICalProperty> List<T> removeProperties(Class<T> clazz) { List<ICalProperty> removed = properties.removeAll(clazz); return castList(removed, clazz); }
[ "public", "<", "T", "extends", "ICalProperty", ">", "List", "<", "T", ">", "removeProperties", "(", "Class", "<", "T", ">", "clazz", ")", "{", "List", "<", "ICalProperty", ">", "removed", "=", "properties", ".", "removeAll", "(", "clazz", ")", ";", "re...
Removes all properties of a given class from this component. @param clazz the class of the properties to remove (e.g. "DateStart.class") @param <T> the property class @return the removed properties (this list is immutable)
[ "Removes", "all", "properties", "of", "a", "given", "class", "from", "this", "component", "." ]
2e21350f85c13dfff52fdef98fdbebe2976fcf61
https://github.com/mangstadt/biweekly/blob/2e21350f85c13dfff52fdef98fdbebe2976fcf61/src/main/java/biweekly/component/ICalComponent.java#L154-L157
train
Removes all properties of the given class from this property list.
Of course, here is the Java code you requested: ```java public <T extends ICalProperty> List<T> removeProperties(Class<T> clazz) { List<ICalProperty> removed = properties.removeAll(clazz); return castList(removed, clazz); } ``` Hope this helps!
osiam/connector4java
src/main/java/org/osiam/client/OsiamConnector.java
OsiamConnector.getAllUsers
public List<User> getAllUsers(AccessToken accessToken, String... attributes) { return getUserService().getAllUsers(accessToken, attributes); }
java
public List<User> getAllUsers(AccessToken accessToken, String... attributes) { return getUserService().getAllUsers(accessToken, attributes); }
[ "public", "List", "<", "User", ">", "getAllUsers", "(", "AccessToken", "accessToken", ",", "String", "...", "attributes", ")", "{", "return", "getUserService", "(", ")", ".", "getAllUsers", "(", "accessToken", ",", "attributes", ")", ";", "}" ]
Retrieve a list of the of all {@link User} resources saved in the OSIAM service. If you need to have all User but the number is very large, this method can be slow. In this case you can also use Query.Builder with no filter to split the number of User returned @param accessToken A valid AccessToken @param attributes ...
[ "Retrieve", "a", "list", "of", "the", "of", "all", "{", "@link", "User", "}", "resources", "saved", "in", "the", "OSIAM", "service", ".", "If", "you", "need", "to", "have", "all", "User", "but", "the", "number", "is", "very", "large", "this", "method",...
a5e6ae1e706f4889d662a069fe2f3bf8e3848d12
https://github.com/osiam/connector4java/blob/a5e6ae1e706f4889d662a069fe2f3bf8e3848d12/src/main/java/org/osiam/client/OsiamConnector.java#L242-L244
train
Get a list of all users.
Of course, here is the Java code you requested: ```java public List<User> getAllUsers(AccessToken accessToken, String... attributes) { return getUserService().getAllUsers(accessToken, attributes); } ``` Hope this helps!
js-lib-com/template.xhtml
src/main/java/js/template/xhtml/Content.java
Content.getString
String getString(Object scope, String propertyPath) throws TemplateException { return getString(scope, propertyPath, null); }
java
String getString(Object scope, String propertyPath) throws TemplateException { return getString(scope, propertyPath, null); }
[ "String", "getString", "(", "Object", "scope", ",", "String", "propertyPath", ")", "throws", "TemplateException", "{", "return", "getString", "(", "scope", ",", "propertyPath", ",", "null", ")", ";", "}" ]
Convenient method to call {@link #getString(Object, String, Format)} with null formatter. @param scope object scope, @param propertyPath object property path. @return content value as string, possible null. @throws TemplateException if requested value is undefined.
[ "Convenient", "method", "to", "call", "{", "@link", "#getString", "(", "Object", "String", "Format", ")", "}", "with", "null", "formatter", "." ]
d50cec08aca9ab9680baebe2a26a341c096564fb
https://github.com/js-lib-com/template.xhtml/blob/d50cec08aca9ab9680baebe2a26a341c096564fb/src/main/java/js/template/xhtml/Content.java#L228-L231
train
Gets a string value from a property path.
Of course, here is the Java code you requested: ```java String getString(Object scope, String propertyPath) throws TemplateException { return getString(scope, propertyPath, null); } ``` Hope this helps!
feedzai/fos-weka
src/main/java/com/feedzai/fos/impl/weka/config/WekaModelConfig.java
WekaModelConfig.update
public void update(ModelConfig modelConfig) throws FOSException { checkNotNull(modelConfig); this.dirty = true; // The class index should be reset everytime a model config is updated. // TODO: Refactor the classIndex to be in ModelConfig. this.modelConfig.getProperties().remove...
java
public void update(ModelConfig modelConfig) throws FOSException { checkNotNull(modelConfig); this.dirty = true; // The class index should be reset everytime a model config is updated. // TODO: Refactor the classIndex to be in ModelConfig. this.modelConfig.getProperties().remove...
[ "public", "void", "update", "(", "ModelConfig", "modelConfig", ")", "throws", "FOSException", "{", "checkNotNull", "(", "modelConfig", ")", ";", "this", ".", "dirty", "=", "true", ";", "// The class index should be reset everytime a model config is updated.", "// TODO: Re...
Updates the underlying <code>ModelConfig</code> using <code>ModelConfig.update</code>. @param modelConfig the model config with the new settings
[ "Updates", "the", "underlying", "<code", ">", "ModelConfig<", "/", "code", ">", "using", "<code", ">", "ModelConfig", ".", "update<", "/", "code", ">", "." ]
130213aa58dfef770382a59727afb9e5f7bc4a3c
https://github.com/feedzai/fos-weka/blob/130213aa58dfef770382a59727afb9e5f7bc4a3c/src/main/java/com/feedzai/fos/impl/weka/config/WekaModelConfig.java#L294-L305
valid
Updates the record with the given model config.
Of course, here is the Java code you requested: ```java public void update(ModelConfig modelConfig) throws FOSException { checkNotNull(modelConfig); this.dirty = true; // The class index should be reset everytime a model config is updated. // TODO: Refactor the classIndex to be in Mod...
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/RBBISetBuilder.java
RBBISetBuilder.build
void build() { RangeDescriptor rlRange; if (fRB.fDebugEnv!=null && fRB.fDebugEnv.indexOf("usets")>=0) {printSets();} // Initialize the process by creating a single range encompassing all characters // that is in no sets. // fRangeList = new RangeDescrip...
java
void build() { RangeDescriptor rlRange; if (fRB.fDebugEnv!=null && fRB.fDebugEnv.indexOf("usets")>=0) {printSets();} // Initialize the process by creating a single range encompassing all characters // that is in no sets. // fRangeList = new RangeDescrip...
[ "void", "build", "(", ")", "{", "RangeDescriptor", "rlRange", ";", "if", "(", "fRB", ".", "fDebugEnv", "!=", "null", "&&", "fRB", ".", "fDebugEnv", ".", "indexOf", "(", "\"usets\"", ")", ">=", "0", ")", "{", "printSets", "(", ")", ";", "}", "// Init...
------------------------------------------------------------------------
[ "------------------------------------------------------------------------" ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/RBBISetBuilder.java#L160-L299
train
Build the set of unicode sets.
Of course, here is the Java code you requested: ```java void build() { RangeDescriptor rlRange; if (fRB.fDebugEnv!=null && fRB.fDebugEnv.indexOf("usets")>=0) {printSets();} // Initialize the process by creating a single range encompassing all characters // that is in no sets. ...
OpenLiberty/open-liberty
dev/com.ibm.ws.ras.instrument/src/com/ibm/ws/ras/instrument/internal/main/LibertyTracePreprocessInstrumentation.java
LibertyTracePreprocessInstrumentation.getClassNode
private ClassNode getClassNode(InputStream inputStream, int flags) { ClassNode cn = new ClassNode(); try { ClassReader reader = new ClassReader(inputStream); reader.accept(cn, flags); inputStream.close(); } catch (IOException e) { cn = null; ...
java
private ClassNode getClassNode(InputStream inputStream, int flags) { ClassNode cn = new ClassNode(); try { ClassReader reader = new ClassReader(inputStream); reader.accept(cn, flags); inputStream.close(); } catch (IOException e) { cn = null; ...
[ "private", "ClassNode", "getClassNode", "(", "InputStream", "inputStream", ",", "int", "flags", ")", "{", "ClassNode", "cn", "=", "new", "ClassNode", "(", ")", ";", "try", "{", "ClassReader", "reader", "=", "new", "ClassReader", "(", "inputStream", ")", ";",...
Read an input stream to populate a {@code ClassNode}. @param inputStream the input stream containing the byte code @param flags flags to pass to the class reader @return the {@code ClassNode} or {@code null} if an error ocurred
[ "Read", "an", "input", "stream", "to", "populate", "a", "{", "@code", "ClassNode", "}", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.ras.instrument/src/com/ibm/ws/ras/instrument/internal/main/LibertyTracePreprocessInstrumentation.java#L593-L603
train
Get a ClassNode from an input stream.
Of course, here is the Java code you requested: ```java private ClassNode getClassNode(InputStream inputStream, int flags) { ClassNode cn = new ClassNode(); try { ClassReader reader = new ClassReader(inputStream); reader.accept(cn, flags); inputStream.close(); ...
eclipse/xtext-extras
org.eclipse.xtext.generator/src-gen/org/eclipse/xtext/generator/parser/antlr/debug/parser/antlr/internal/InternalSimpleAntlrParser.java
InternalSimpleAntlrParser.ruleAndExpression
public final EObject ruleAndExpression() throws RecognitionException { EObject current = null; Token otherlv_2=null; EObject this_NotExpression_0 = null; EObject lv_right_3_0 = null; enterRule(); try { // InternalSimpleAntlr.g:1025:28: ( (th...
java
public final EObject ruleAndExpression() throws RecognitionException { EObject current = null; Token otherlv_2=null; EObject this_NotExpression_0 = null; EObject lv_right_3_0 = null; enterRule(); try { // InternalSimpleAntlr.g:1025:28: ( (th...
[ "public", "final", "EObject", "ruleAndExpression", "(", ")", "throws", "RecognitionException", "{", "EObject", "current", "=", "null", ";", "Token", "otherlv_2", "=", "null", ";", "EObject", "this_NotExpression_0", "=", "null", ";", "EObject", "lv_right_3_0", "=",...
InternalSimpleAntlr.g:1022:1: ruleAndExpression returns [EObject current=null] : (this_NotExpression_0= ruleNotExpression ( () otherlv_2= '&&' ( (lv_right_3_0= ruleNotExpression ) ) )* ) ;
[ "InternalSimpleAntlr", ".", "g", ":", "1022", ":", "1", ":", "ruleAndExpression", "returns", "[", "EObject", "current", "=", "null", "]", ":", "(", "this_NotExpression_0", "=", "ruleNotExpression", "(", "()", "otherlv_2", "=", "&&", "(", "(", "lv_right_3_0", ...
451359541295323a29f5855e633f770cec02069a
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.generator/src-gen/org/eclipse/xtext/generator/parser/antlr/debug/parser/antlr/internal/InternalSimpleAntlrParser.java#L2865-L3005
train
Use this method to enter the AndExpression
Of course, here is the Java code you requested: ```java public final EObject ruleAndExpression() throws RecognitionException { EObject current = null; Token otherlv_2=null; EObject this_NotExpression_0 = null; EObject lv_right_3_0 = null; enterRule(); ...
josueeduardo/snappy
plugin-parent/snappy-loader/src/main/java/io/joshworks/snappy/loader/LaunchedURLClassLoader.java
LaunchedURLClassLoader.loadClass
@Override protected Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException { synchronized (LaunchedURLClassLoader.LOCK_PROVIDER.getLock(this, name)) { Class<?> loadedClass = findLoadedClass(name); if (loadedClass == null) { Handler....
java
@Override protected Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException { synchronized (LaunchedURLClassLoader.LOCK_PROVIDER.getLock(this, name)) { Class<?> loadedClass = findLoadedClass(name); if (loadedClass == null) { Handler....
[ "@", "Override", "protected", "Class", "<", "?", ">", "loadClass", "(", "String", "name", ",", "boolean", "resolve", ")", "throws", "ClassNotFoundException", "{", "synchronized", "(", "LaunchedURLClassLoader", ".", "LOCK_PROVIDER", ".", "getLock", "(", "this", "...
Attempt to load classes from the URLs before delegating to the parent loader.
[ "Attempt", "to", "load", "classes", "from", "the", "URLs", "before", "delegating", "to", "the", "parent", "loader", "." ]
d95a9e811eda3c24a5e53086369208819884fa49
https://github.com/josueeduardo/snappy/blob/d95a9e811eda3c24a5e53086369208819884fa49/plugin-parent/snappy-loader/src/main/java/io/joshworks/snappy/loader/LaunchedURLClassLoader.java#L140-L158
train
Load a class from the URL classloader.
Of course, here is the Java code you requested: ```java @Override protected Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException { synchronized (LaunchedURLClassLoader.LOCK_PROVIDER.getLock(this, name)) { Class<?> loadedClass = findLoadedClass(name); ...
jenetics/jenetics
jenetics.ext/src/main/java/io/jenetics/ext/engine/ConcatEngine.java
ConcatEngine.of
@SafeVarargs public static <G extends Gene<?, G>, C extends Comparable<? super C>> ConcatEngine<G, C> of(final EvolutionStreamable<G, C>... engines) { return new ConcatEngine<>(Arrays.asList(engines)); }
java
@SafeVarargs public static <G extends Gene<?, G>, C extends Comparable<? super C>> ConcatEngine<G, C> of(final EvolutionStreamable<G, C>... engines) { return new ConcatEngine<>(Arrays.asList(engines)); }
[ "@", "SafeVarargs", "public", "static", "<", "G", "extends", "Gene", "<", "?", ",", "G", ">", ",", "C", "extends", "Comparable", "<", "?", "super", "C", ">", ">", "ConcatEngine", "<", "G", ",", "C", ">", "of", "(", "final", "EvolutionStreamable", "<"...
Create a new concatenating evolution engine with the given array of engines. @param engines the engines which are concatenated to <em>one</em> engine @param <G> the gene type @param <C> the fitness type @return a new concatenating evolution engine @throws NullPointerException if the {@code engines} or one of it's elem...
[ "Create", "a", "new", "concatenating", "evolution", "engine", "with", "the", "given", "array", "of", "engines", "." ]
ee516770c65ef529b27deb283f071c85f344eff4
https://github.com/jenetics/jenetics/blob/ee516770c65ef529b27deb283f071c85f344eff4/jenetics.ext/src/main/java/io/jenetics/ext/engine/ConcatEngine.java#L225-L229
train
Creates a new concat engine from the given list of engines.
Of course, here is the Java code you requested: ```java @SafeVarargs public static <G extends Gene<?, G>, C extends Comparable<? super C>> ConcatEngine<G, C> of(final EvolutionStreamable<G, C>... engines) { return new ConcatEngine<>(Arrays.asList(engines)); } ``` Hope this helps!
OpenTSDB/opentsdb
src/tsd/client/QueryUi.java
QueryUi.onModuleLoad
public void onModuleLoad() { asyncGetJson(AGGREGATORS_URL, new GotJsonCallback() { public void got(final JSONValue json) { // Do we need more manual type checking? Not sure what will happen // in the browser if something other than an array is returned. final JSONArray aggs = json.isA...
java
public void onModuleLoad() { asyncGetJson(AGGREGATORS_URL, new GotJsonCallback() { public void got(final JSONValue json) { // Do we need more manual type checking? Not sure what will happen // in the browser if something other than an array is returned. final JSONArray aggs = json.isA...
[ "public", "void", "onModuleLoad", "(", ")", "{", "asyncGetJson", "(", "AGGREGATORS_URL", ",", "new", "GotJsonCallback", "(", ")", "{", "public", "void", "got", "(", "final", "JSONValue", "json", ")", "{", "// Do we need more manual type checking? Not sure what will h...
This is the entry point method.
[ "This", "is", "the", "entry", "point", "method", "." ]
3fc2d491c3c1ad397252c0a80203a69a3f9e3ef3
https://github.com/OpenTSDB/opentsdb/blob/3fc2d491c3c1ad397252c0a80203a69a3f9e3ef3/src/tsd/client/QueryUi.java#L244-L493
train
On module load.
Of course, here is the Java code you requested: ```java public void onModuleLoad() { asyncGetJson(AGGREGATORS_URL, new GotJsonCallback() { public void got(final JSONValue json) { // Do we need more manual type checking? Not sure what will happen // in the browser if something other than an a...
datumbox/datumbox-framework
datumbox-framework-core/src/main/java/com/datumbox/framework/core/statistics/nonparametrics/onesample/Lilliefors.java
Lilliefors.normalDistributionGetParams
public static AssociativeArray normalDistributionGetParams(FlatDataCollection flatDataCollection) { AssociativeArray params = new AssociativeArray(); params.put("mean", Descriptives.mean(flatDataCollection)); params.put("variance", Descriptives.variance(flatDataCollection, true)); return...
java
public static AssociativeArray normalDistributionGetParams(FlatDataCollection flatDataCollection) { AssociativeArray params = new AssociativeArray(); params.put("mean", Descriptives.mean(flatDataCollection)); params.put("variance", Descriptives.variance(flatDataCollection, true)); return...
[ "public", "static", "AssociativeArray", "normalDistributionGetParams", "(", "FlatDataCollection", "flatDataCollection", ")", "{", "AssociativeArray", "params", "=", "new", "AssociativeArray", "(", ")", ";", "params", ".", "put", "(", "\"mean\"", ",", "Descriptives", "...
Estimate Parameters of Normal based on Sample. This method is called via reflection. @param flatDataCollection @return
[ "Estimate", "Parameters", "of", "Normal", "based", "on", "Sample", ".", "This", "method", "is", "called", "via", "reflection", "." ]
909dff0476e80834f05ecdde0624dd2390e9b0ca
https://github.com/datumbox/datumbox-framework/blob/909dff0476e80834f05ecdde0624dd2390e9b0ca/datumbox-framework-core/src/main/java/com/datumbox/framework/core/statistics/nonparametrics/onesample/Lilliefors.java#L112-L117
train
Get the parameters for a normal distribution
Of course, here is the Java code you requested: ```java public static AssociativeArray normalDistributionGetParams(FlatDataCollection flatDataCollection) { AssociativeArray params = new AssociativeArray(); params.put("mean", Descriptives.mean(flatDataCollection)); params.put("variance", Descrip...
forge/javaee-descriptors
impl/src/main/java/org/jboss/shrinkwrap/descriptor/impl/ejbjar31/EjbRelationTypeImpl.java
EjbRelationTypeImpl.getOrCreateEjbRelationshipRole
public EjbRelationshipRoleType<EjbRelationType<T>> getOrCreateEjbRelationshipRole() { List<Node> nodeList = childNode.get("ejb-relationship-role"); if (nodeList != null && nodeList.size() > 0) { return new EjbRelationshipRoleTypeImpl<EjbRelationType<T>>(this, "ejb-relationship-role", chil...
java
public EjbRelationshipRoleType<EjbRelationType<T>> getOrCreateEjbRelationshipRole() { List<Node> nodeList = childNode.get("ejb-relationship-role"); if (nodeList != null && nodeList.size() > 0) { return new EjbRelationshipRoleTypeImpl<EjbRelationType<T>>(this, "ejb-relationship-role", chil...
[ "public", "EjbRelationshipRoleType", "<", "EjbRelationType", "<", "T", ">", ">", "getOrCreateEjbRelationshipRole", "(", ")", "{", "List", "<", "Node", ">", "nodeList", "=", "childNode", ".", "get", "(", "\"ejb-relationship-role\"", ")", ";", "if", "(", "nodeList...
If not already created, a new <code>ejb-relationship-role</code> element will be created and returned. Otherwise, the first existing <code>ejb-relationship-role</code> element will be returned. @return the instance defined for the element <code>ejb-relationship-role</code>
[ "If", "not", "already", "created", "a", "new", "<code", ">", "ejb", "-", "relationship", "-", "role<", "/", "code", ">", "element", "will", "be", "created", "and", "returned", ".", "Otherwise", "the", "first", "existing", "<code", ">", "ejb", "-", "relat...
cb914330a1a0b04bfc1d0f199bd9cde3bbf0b3ed
https://github.com/forge/javaee-descriptors/blob/cb914330a1a0b04bfc1d0f199bd9cde3bbf0b3ed/impl/src/main/java/org/jboss/shrinkwrap/descriptor/impl/ejbjar31/EjbRelationTypeImpl.java#L141-L149
train
Gets the ejb - relationship - role.
Of course, here is the Java code you requested: ```java public EjbRelationshipRoleType<EjbRelationType<T>> getOrCreateEjbRelationshipRole() { List<Node> nodeList = childNode.get("ejb-relationship-role"); if (nodeList != null && nodeList.size() > 0) { return new EjbRelationshipRoleTypeImp...
ACRA/acra
acra-core/src/main/java/org/acra/attachment/AcraContentProvider.java
AcraContentProvider.query
@Nullable @Override public Cursor query(@NonNull Uri uri, @Nullable String[] projection, @Nullable String selection, @Nullable String[] selectionArgs, @Nullable String sortOrder) { if (ACRA.DEV_LOGGING) ACRA.log.d(ACRA.LOG_TAG, "Query: " + uri); final File file = getFileForUri(uri); if (...
java
@Nullable @Override public Cursor query(@NonNull Uri uri, @Nullable String[] projection, @Nullable String selection, @Nullable String[] selectionArgs, @Nullable String sortOrder) { if (ACRA.DEV_LOGGING) ACRA.log.d(ACRA.LOG_TAG, "Query: " + uri); final File file = getFileForUri(uri); if (...
[ "@", "Nullable", "@", "Override", "public", "Cursor", "query", "(", "@", "NonNull", "Uri", "uri", ",", "@", "Nullable", "String", "[", "]", "projection", ",", "@", "Nullable", "String", "selection", ",", "@", "Nullable", "String", "[", "]", "selectionArgs"...
Provides file metadata @param uri the file uri @param projection any combination of {@link OpenableColumns#DISPLAY_NAME} and {@link OpenableColumns#SIZE} @param selection ignored @param selectionArgs ignored @param sortOrder ignored @return file metadata in a cursor with a single row
[ "Provides", "file", "metadata" ]
bfa3235ab110328c5ab2f792ddf8ee87be4a32d1
https://github.com/ACRA/acra/blob/bfa3235ab110328c5ab2f792ddf8ee87be4a32d1/acra-core/src/main/java/org/acra/attachment/AcraContentProvider.java#L78-L100
train
Query for a single entity in a database.
Of course, here is the Java code you requested: ```java @Nullable @Override public Cursor query(@NonNull Uri uri, @Nullable String[] projection, @Nullable String selection, @Nullable String[] selectionArgs, @Nullable String sortOrder) { if (ACRA.DEV_LOGGING) ACRA.log.d(ACRA.LOG_TAG, "Query: " + uri); ...
blinkfox/zealot
src/main/java/com/blinkfox/zealot/core/ZealotKhala.java
ZealotKhala.doNormal
private ZealotKhala doNormal(String prefix, String field, Object value, String suffix, boolean match) { if (match) { SqlInfoBuilder.newInstace(this.source.setPrefix(prefix)).buildNormalSql(field, value, suffix); this.source.resetPrefix(); } return this; }
java
private ZealotKhala doNormal(String prefix, String field, Object value, String suffix, boolean match) { if (match) { SqlInfoBuilder.newInstace(this.source.setPrefix(prefix)).buildNormalSql(field, value, suffix); this.source.resetPrefix(); } return this; }
[ "private", "ZealotKhala", "doNormal", "(", "String", "prefix", ",", "String", "field", ",", "Object", "value", ",", "String", "suffix", ",", "boolean", "match", ")", "{", "if", "(", "match", ")", "{", "SqlInfoBuilder", ".", "newInstace", "(", "this", ".", ...
执行生成等值查询SQL片段的方法. @param prefix 前缀 @param field 数据库字段 @param value 值 @param suffix 后缀 @param match 是否匹配 @return ZealotKhala实例的当前实例
[ "执行生成等值查询SQL片段的方法", "." ]
21b00fa3e4ed42188eef3116d494e112e7a4194c
https://github.com/blinkfox/zealot/blob/21b00fa3e4ed42188eef3116d494e112e7a4194c/src/main/java/com/blinkfox/zealot/core/ZealotKhala.java#L375-L381
train
Zealot khala doNormal.
Of course, here is the Java code you requested: ```java private ZealotKhala doNormal(String prefix, String field, Object value, String suffix, boolean match) { if (match) { SqlInfoBuilder.newInstace(this.source.setPrefix(prefix)).buildNormalSql(field, value, suffix); this.source.resetPr...
atomix/atomix
core/src/main/java/io/atomix/core/tree/DocumentPath.java
DocumentPath.parent
public DocumentPath parent() { if (pathElements.size() <= 1) { return null; } return new DocumentPath(this.pathElements.subList(0, pathElements.size() - 1)); }
java
public DocumentPath parent() { if (pathElements.size() <= 1) { return null; } return new DocumentPath(this.pathElements.subList(0, pathElements.size() - 1)); }
[ "public", "DocumentPath", "parent", "(", ")", "{", "if", "(", "pathElements", ".", "size", "(", ")", "<=", "1", ")", "{", "return", "null", ";", "}", "return", "new", "DocumentPath", "(", "this", ".", "pathElements", ".", "subList", "(", "0", ",", "p...
Returns a path for the parent of this node. @return parent node path. If this path is for the root, returns {@code null}.
[ "Returns", "a", "path", "for", "the", "parent", "of", "this", "node", "." ]
3a94b7c80576d762dd0d396d4645df07a0b37c31
https://github.com/atomix/atomix/blob/3a94b7c80576d762dd0d396d4645df07a0b37c31/core/src/main/java/io/atomix/core/tree/DocumentPath.java#L163-L168
train
Gets the parent of this path.
Of course, here is the Java code you requested: ```java public DocumentPath parent() { if (pathElements.size() <= 1) { return null; } return new DocumentPath(this.pathElements.subList(0, pathElements.size() - 1)); } ``` Hope this helps!
OpenLiberty/open-liberty
dev/com.ibm.ws.transport.http/src/com/ibm/ws/http/internal/HttpDateFormatImpl.java
HttpDateFormatImpl.parseRFC1123Time
@Override public Date parseRFC1123Time(String input) throws ParseException { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { Tr.debug(tc, "rfc1123 parsing [" + input + "]"); } Date d = attemptParse(getFormat().get1123Parse(), input); if (null == d) { ...
java
@Override public Date parseRFC1123Time(String input) throws ParseException { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { Tr.debug(tc, "rfc1123 parsing [" + input + "]"); } Date d = attemptParse(getFormat().get1123Parse(), input); if (null == d) { ...
[ "@", "Override", "public", "Date", "parseRFC1123Time", "(", "String", "input", ")", "throws", "ParseException", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isDebugEnabled", "(", ")", ")", "{", "Tr", ".", "debug",...
/* @see com.ibm.websphere.http.HttpDateFormat#parseRFC1123Time(java.lang.String)
[ "/", "*" ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.transport.http/src/com/ibm/ws/http/internal/HttpDateFormatImpl.java#L292-L302
train
This method is used to parse the input string as an RFC1123 time.
Of course, here is the Java code you requested: ```java @Override public Date parseRFC1123Time(String input) throws ParseException { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { Tr.debug(tc, "rfc1123 parsing [" + input + "]"); } Date d = attemptParse(getFor...
alkacon/opencms-core
src/org/opencms/db/CmsSecurityManager.java
CmsSecurityManager.readStaticExportPublishedResourceParameters
public String readStaticExportPublishedResourceParameters(CmsRequestContext context, String rfsName) throws CmsException { CmsDbContext dbc = m_dbContextFactory.getDbContext(context); String result = null; try { result = m_driverManager.readStaticExportPublishedResourceParameter...
java
public String readStaticExportPublishedResourceParameters(CmsRequestContext context, String rfsName) throws CmsException { CmsDbContext dbc = m_dbContextFactory.getDbContext(context); String result = null; try { result = m_driverManager.readStaticExportPublishedResourceParameter...
[ "public", "String", "readStaticExportPublishedResourceParameters", "(", "CmsRequestContext", "context", ",", "String", "rfsName", ")", "throws", "CmsException", "{", "CmsDbContext", "dbc", "=", "m_dbContextFactory", ".", "getDbContext", "(", "context", ")", ";", "String...
Returns the parameters of a resource in the table of all published template resources.<p> @param context the current request context @param rfsName the rfs name of the resource @return the parameter string of the requested resource @throws CmsException if something goes wrong
[ "Returns", "the", "parameters", "of", "a", "resource", "in", "the", "table", "of", "all", "published", "template", "resources", ".", "<p", ">" ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsSecurityManager.java#L5290-L5306
train
Reads the static export published resource parameters.
Of course, here is the Java code you requested: ```java public String readStaticExportPublishedResourceParameters(CmsRequestContext context, String rfsName) throws CmsException { CmsDbContext dbc = m_dbContextFactory.getDbContext(context); String result = null; try { result = m...
jparsec/jparsec
jparsec/src/main/java/org/jparsec/Lexicon.java
Lexicon.phrase
public Parser<?> phrase(String... tokenNames) { Parser<?>[] wordParsers = new Parser<?>[tokenNames.length]; for (int i = 0; i < tokenNames.length; i++) { wordParsers[i] = token(tokenNames[i]); } String phrase = Strings.join(" ", tokenNames); return Parsers.sequence(wordParsers).atomic().retn(p...
java
public Parser<?> phrase(String... tokenNames) { Parser<?>[] wordParsers = new Parser<?>[tokenNames.length]; for (int i = 0; i < tokenNames.length; i++) { wordParsers[i] = token(tokenNames[i]); } String phrase = Strings.join(" ", tokenNames); return Parsers.sequence(wordParsers).atomic().retn(p...
[ "public", "Parser", "<", "?", ">", "phrase", "(", "String", "...", "tokenNames", ")", "{", "Parser", "<", "?", ">", "[", "]", "wordParsers", "=", "new", "Parser", "<", "?", ">", "[", "tokenNames", ".", "length", "]", ";", "for", "(", "int", "i", ...
A {@link Parser} that recognizes a sequence of tokens identified by {@code tokenNames}, as an atomic step.
[ "A", "{" ]
df1280259f5da9eb5ffc537437569dddba66cb94
https://github.com/jparsec/jparsec/blob/df1280259f5da9eb5ffc537437569dddba66cb94/jparsec/src/main/java/org/jparsec/Lexicon.java#L56-L63
train
Create a phrase from a list of tokens
Of course, here is the Java code you requested: ```java public Parser<?> phrase(String... tokenNames) { Parser<?>[] wordParsers = new Parser<?>[tokenNames.length]; for (int i = 0; i < tokenNames.length; i++) { wordParsers[i] = token(tokenNames[i]); } String phrase = Strings.join(" ", tokenNames);...
eclipse/xtext-core
org.eclipse.xtext/src-gen/org/eclipse/xtext/parser/antlr/internal/InternalXtextParser.java
InternalXtextParser.ruleConditionalBranch
public final EObject ruleConditionalBranch() throws RecognitionException { EObject current = null; Token otherlv_2=null; Token otherlv_4=null; EObject this_UnorderedGroup_0 = null; EObject lv_guardCondition_3_0 = null; EObject lv_elements_5_0 = null; enterR...
java
public final EObject ruleConditionalBranch() throws RecognitionException { EObject current = null; Token otherlv_2=null; Token otherlv_4=null; EObject this_UnorderedGroup_0 = null; EObject lv_guardCondition_3_0 = null; EObject lv_elements_5_0 = null; enterR...
[ "public", "final", "EObject", "ruleConditionalBranch", "(", ")", "throws", "RecognitionException", "{", "EObject", "current", "=", "null", ";", "Token", "otherlv_2", "=", "null", ";", "Token", "otherlv_4", "=", "null", ";", "EObject", "this_UnorderedGroup_0", "=",...
InternalXtext.g:1042:1: ruleConditionalBranch returns [EObject current=null] : (this_UnorderedGroup_0= ruleUnorderedGroup | ( () otherlv_2= '<' ( (lv_guardCondition_3_0= ruleDisjunction ) ) otherlv_4= '>' ( (lv_elements_5_0= ruleAbstractToken ) )+ ) ) ;
[ "InternalXtext", ".", "g", ":", "1042", ":", "1", ":", "ruleConditionalBranch", "returns", "[", "EObject", "current", "=", "null", "]", ":", "(", "this_UnorderedGroup_0", "=", "ruleUnorderedGroup", "|", "(", "()", "otherlv_2", "=", "<", "(", "(", "lv_guardCo...
bac941cb75cb24706519845ec174cfef874d7557
https://github.com/eclipse/xtext-core/blob/bac941cb75cb24706519845ec174cfef874d7557/org.eclipse.xtext/src-gen/org/eclipse/xtext/parser/antlr/internal/InternalXtextParser.java#L2698-L2886
train
Generates a ConditionalBranch exception
Of course, here is the Java code you requested: ```java public final EObject ruleConditionalBranch() throws RecognitionException { EObject current = null; Token otherlv_2=null; Token otherlv_4=null; EObject this_UnorderedGroup_0 = null; EObject lv_guardCondition_3_0 = null; ...
dlemmermann/CalendarFX
CalendarFXView/src/main/java/com/calendarfx/util/Util.java
Util.adjustToFirstDayOfWeek
public static LocalDate adjustToFirstDayOfWeek(LocalDate date, DayOfWeek firstDayOfWeek) { LocalDate newDate = date.with(DAY_OF_WEEK, firstDayOfWeek.getValue()); if (newDate.isAfter(date)) { newDate = newDate.minusWeeks(1); } return newDate; }
java
public static LocalDate adjustToFirstDayOfWeek(LocalDate date, DayOfWeek firstDayOfWeek) { LocalDate newDate = date.with(DAY_OF_WEEK, firstDayOfWeek.getValue()); if (newDate.isAfter(date)) { newDate = newDate.minusWeeks(1); } return newDate; }
[ "public", "static", "LocalDate", "adjustToFirstDayOfWeek", "(", "LocalDate", "date", ",", "DayOfWeek", "firstDayOfWeek", ")", "{", "LocalDate", "newDate", "=", "date", ".", "with", "(", "DAY_OF_WEEK", ",", "firstDayOfWeek", ".", "getValue", "(", ")", ")", ";", ...
Adjusts the given date to a new date that marks the beginning of the week where the given date is located. If "Monday" is the first day of the week and the given date is a "Wednesday" then this method will return a date that is two days earlier than the given date. @param date the date to adjust @param first...
[ "Adjusts", "the", "given", "date", "to", "a", "new", "date", "that", "marks", "the", "beginning", "of", "the", "week", "where", "the", "given", "date", "is", "located", ".", "If", "Monday", "is", "the", "first", "day", "of", "the", "week", "and", "the"...
f2b91c2622c3f29d004485b6426b23b86c331f96
https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXView/src/main/java/com/calendarfx/util/Util.java#L272-L279
train
Adjust to first day of week.
Of course, here is the Java code you requested: ```java public static LocalDate adjustToFirstDayOfWeek(LocalDate date, DayOfWeek firstDayOfWeek) { LocalDate newDate = date.with(DAY_OF_WEEK, firstDayOfWeek.getValue()); if (newDate.isAfter(date)) { newDate = newDate.minusWeeks(1); } ...
aws/aws-sdk-java
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/DynamoDBTableMapper.java
DynamoDBTableMapper.createTable
public TableDescription createTable(ProvisionedThroughput throughput) { final CreateTableRequest request = mapper.generateCreateTableRequest(model.targetType()); request.setProvisionedThroughput(throughput); if (request.getGlobalSecondaryIndexes() != null) { for (final GlobalSecondar...
java
public TableDescription createTable(ProvisionedThroughput throughput) { final CreateTableRequest request = mapper.generateCreateTableRequest(model.targetType()); request.setProvisionedThroughput(throughput); if (request.getGlobalSecondaryIndexes() != null) { for (final GlobalSecondar...
[ "public", "TableDescription", "createTable", "(", "ProvisionedThroughput", "throughput", ")", "{", "final", "CreateTableRequest", "request", "=", "mapper", ".", "generateCreateTableRequest", "(", "model", ".", "targetType", "(", ")", ")", ";", "request", ".", "setPr...
Creates the table with the specified throughput; also populates the same throughput for all global secondary indexes. @param throughput The provisioned throughput. @return The table decription. @see com.amazonaws.services.dynamodbv2.AmazonDynamoDB#createTable @see com.amazonaws.services.dynamodbv2.model.CreateTableRequ...
[ "Creates", "the", "table", "with", "the", "specified", "throughput", ";", "also", "populates", "the", "same", "throughput", "for", "all", "global", "secondary", "indexes", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/DynamoDBTableMapper.java#L485-L494
train
Create a table.
Of course, here is the Java code you requested: ```java public TableDescription createTable(ProvisionedThroughput throughput) { final CreateTableRequest request = mapper.generateCreateTableRequest(model.targetType()); request.setProvisionedThroughput(throughput); if (request.getGlobalSecondaryI...
alkacon/opencms-core
src-gwt/org/opencms/gwt/client/ui/history/CmsResourceHistoryTable.java
CmsResourceHistoryTable.addColumn
private void addColumn(String label, int width, Column<CmsHistoryResourceBean, ?> col) { addColumn(col, label); setColumnWidth(col, width, Unit.PX); }
java
private void addColumn(String label, int width, Column<CmsHistoryResourceBean, ?> col) { addColumn(col, label); setColumnWidth(col, width, Unit.PX); }
[ "private", "void", "addColumn", "(", "String", "label", ",", "int", "width", ",", "Column", "<", "CmsHistoryResourceBean", ",", "?", ">", "col", ")", "{", "addColumn", "(", "col", ",", "label", ")", ";", "setColumnWidth", "(", "col", ",", "width", ",", ...
Helper method for adding a table column with a given width and label.<p> @param label the column label @param width the column width in pixels @param col the column to add
[ "Helper", "method", "for", "adding", "a", "table", "column", "with", "a", "given", "width", "and", "label", ".", "<p", ">" ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/gwt/client/ui/history/CmsResourceHistoryTable.java#L132-L136
train
Add a column to the table.
Of course, here is the Java code you requested: ```java private void addColumn(String label, int width, Column<CmsHistoryResourceBean, ?> col) { addColumn(col, label); setColumnWidth(col, width, Unit.PX); } ``` Hope this helps!
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/itemfilters/ExactQPathEntryFilter.java
ExactQPathEntryFilter.accept
public boolean accept(ItemData item) { QPathEntry itemEntry = item.getQPath().getEntries()[item.getQPath().getDepth()]; return entry.equals(itemEntry); }
java
public boolean accept(ItemData item) { QPathEntry itemEntry = item.getQPath().getEntries()[item.getQPath().getDepth()]; return entry.equals(itemEntry); }
[ "public", "boolean", "accept", "(", "ItemData", "item", ")", "{", "QPathEntry", "itemEntry", "=", "item", ".", "getQPath", "(", ")", ".", "getEntries", "(", ")", "[", "item", ".", "getQPath", "(", ")", ".", "getDepth", "(", ")", "]", ";", "return", "...
{@inheritDoc}
[ "{" ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/itemfilters/ExactQPathEntryFilter.java#L67-L71
train
Checks if the item is a duplicate of the existing one.
Of course, here is the Java code you requested: ```java public boolean accept(ItemData item) { QPathEntry itemEntry = item.getQPath().getEntries()[item.getQPath().getDepth()]; return entry.equals(itemEntry); } ``` Hope this helps!
EasyinnovaSL/Tiff-Library-4J
src/main/java/com/easyinnova/tiff/reader/IfdReader.java
IfdReader.readImage
public void readImage() { if (ifd.containsTagId(TiffTags.getTagId("StripOffsets")) || ifd.containsTagId(TiffTags.getTagId("StripBYTECount"))) { readStrips(); } if (ifd.containsTagId(TiffTags.getTagId("TileOffsets")) || ifd.containsTagId(TiffTags.getTagId("TileBYTECounts"))) { rea...
java
public void readImage() { if (ifd.containsTagId(TiffTags.getTagId("StripOffsets")) || ifd.containsTagId(TiffTags.getTagId("StripBYTECount"))) { readStrips(); } if (ifd.containsTagId(TiffTags.getTagId("TileOffsets")) || ifd.containsTagId(TiffTags.getTagId("TileBYTECounts"))) { rea...
[ "public", "void", "readImage", "(", ")", "{", "if", "(", "ifd", ".", "containsTagId", "(", "TiffTags", ".", "getTagId", "(", "\"StripOffsets\"", ")", ")", "||", "ifd", ".", "containsTagId", "(", "TiffTags", ".", "getTagId", "(", "\"StripBYTECount\"", ")", ...
Reads the image, which can be stored in strips and/or in tiles.
[ "Reads", "the", "image", "which", "can", "be", "stored", "in", "strips", "and", "/", "or", "in", "tiles", "." ]
682605d3ed207a66213278c054c98f1b909472b7
https://github.com/EasyinnovaSL/Tiff-Library-4J/blob/682605d3ed207a66213278c054c98f1b909472b7/src/main/java/com/easyinnova/tiff/reader/IfdReader.java#L81-L90
train
Read image.
Of course, here is the Java code you requested: ```java public void readImage() { if (ifd.containsTagId(TiffTags.getTagId("StripOffsets")) || ifd.containsTagId(TiffTags.getTagId("StripBYTECount"))) { readStrips(); } if (ifd.containsTagId(TiffTags.getTagId("TileOffsets")) || ifd.contai...
dustin/java-memcached-client
src/main/java/net/spy/memcached/MemcachedClient.java
MemcachedClient.asyncCAS
@Override public OperationFuture<CASResponse> asyncCAS(String key, long casId, Object value) { return asyncCAS(key, casId, value, transcoder); }
java
@Override public OperationFuture<CASResponse> asyncCAS(String key, long casId, Object value) { return asyncCAS(key, casId, value, transcoder); }
[ "@", "Override", "public", "OperationFuture", "<", "CASResponse", ">", "asyncCAS", "(", "String", "key", ",", "long", "casId", ",", "Object", "value", ")", "{", "return", "asyncCAS", "(", "key", ",", "casId", ",", "value", ",", "transcoder", ")", ";", "}...
Asynchronous CAS operation using the default transcoder. @param key the key @param casId the CAS identifier (from a gets operation) @param value the new value @return a future that will indicate the status of the CAS @throws IllegalStateException in the rare circumstance where queue is too full to accept any more requ...
[ "Asynchronous", "CAS", "operation", "using", "the", "default", "transcoder", "." ]
c232307ad8e0c7ccc926e495dd7d5aad2d713318
https://github.com/dustin/java-memcached-client/blob/c232307ad8e0c7ccc926e495dd7d5aad2d713318/src/main/java/net/spy/memcached/MemcachedClient.java#L667-L671
train
Asyn CAS operation.
Of course, here is the Java code you requested: ```java @Override public OperationFuture<CASResponse> asyncCAS(String key, long casId, Object value) { return asyncCAS(key, casId, value, transcoder); } ``` Hope this helps!
roboconf/roboconf-platform
miscellaneous/roboconf-doc-generator/src/main/java/net/roboconf/doc/generator/internal/renderers/HtmlRenderer.java
HtmlRenderer.applyLink
@Override protected String applyLink( String text, String linkId ) { String link; if( this.options.containsKey( DocConstants.OPTION_HTML_EXPLODED )) link = "components/" + linkId + ".html".replace( " ", "%20" ); else link = "#" + createId( linkId ); return text.replaceAll( Pattern.quote( text ), "<a hr...
java
@Override protected String applyLink( String text, String linkId ) { String link; if( this.options.containsKey( DocConstants.OPTION_HTML_EXPLODED )) link = "components/" + linkId + ".html".replace( " ", "%20" ); else link = "#" + createId( linkId ); return text.replaceAll( Pattern.quote( text ), "<a hr...
[ "@", "Override", "protected", "String", "applyLink", "(", "String", "text", ",", "String", "linkId", ")", "{", "String", "link", ";", "if", "(", "this", ".", "options", ".", "containsKey", "(", "DocConstants", ".", "OPTION_HTML_EXPLODED", ")", ")", "link", ...
/* (non-Javadoc) @see net.roboconf.doc.generator.internal.AbstractStructuredRenderer #applyLink(java.lang.String, java.lang.String)
[ "/", "*", "(", "non", "-", "Javadoc", ")" ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/miscellaneous/roboconf-doc-generator/src/main/java/net/roboconf/doc/generator/internal/renderers/HtmlRenderer.java#L304-L314
train
Override the link method to apply the link.
Of course, here is the Java code you requested: ```java @Override protected String applyLink( String text, String linkId ) { String link; if( this.options.containsKey( DocConstants.OPTION_HTML_EXPLODED )) link = "components/" + linkId + ".html".replace( " ", "%20" ); else link = "#" + createId( linkId );...
spring-projects/spring-android
spring-android-core/src/main/java/org/springframework/core/BridgeMethodResolver.java
BridgeMethodResolver.searchCandidates
private static Method searchCandidates(List<Method> candidateMethods, Method bridgeMethod) { if (candidateMethods.isEmpty()) { return null; } Map<TypeVariable, Type> typeParameterMap = GenericTypeResolver.getTypeVariableMap(bridgeMethod.getDeclaringClass()); Method previousMethod = null; boolean sameSig = ...
java
private static Method searchCandidates(List<Method> candidateMethods, Method bridgeMethod) { if (candidateMethods.isEmpty()) { return null; } Map<TypeVariable, Type> typeParameterMap = GenericTypeResolver.getTypeVariableMap(bridgeMethod.getDeclaringClass()); Method previousMethod = null; boolean sameSig = ...
[ "private", "static", "Method", "searchCandidates", "(", "List", "<", "Method", ">", "candidateMethods", ",", "Method", "bridgeMethod", ")", "{", "if", "(", "candidateMethods", ".", "isEmpty", "(", ")", ")", "{", "return", "null", ";", "}", "Map", "<", "Typ...
Searches for the bridged method in the given candidates. @param candidateMethods the List of candidate Methods @param bridgeMethod the bridge method @return the bridged method, or {@code null} if none found
[ "Searches", "for", "the", "bridged", "method", "in", "the", "given", "candidates", "." ]
941296e152d49a40e0745a3e81628a974f72b7e4
https://github.com/spring-projects/spring-android/blob/941296e152d49a40e0745a3e81628a974f72b7e4/spring-android-core/src/main/java/org/springframework/core/BridgeMethodResolver.java#L95-L113
train
Search candidates for bridge method.
Of course, here is the Java code you requested: ```java private static Method searchCandidates(List<Method> candidateMethods, Method bridgeMethod) { if (candidateMethods.isEmpty()) { return null; } Map<TypeVariable, Type> typeParameterMap = GenericTypeResolver.getTypeVariableMap(bridgeMethod.getDeclaringClass...
Commonjava/indy
api/src/main/java/org/commonjava/indy/content/IndyLocationExpander.java
IndyLocationExpander.expand
@Override public VirtualResource expand( final Resource resource ) throws TransferException { List<Location> locations; if ( resource instanceof VirtualResource ) { final List<ConcreteResource> concrete = ( (VirtualResource) resource ).toConcreteResources(); ...
java
@Override public VirtualResource expand( final Resource resource ) throws TransferException { List<Location> locations; if ( resource instanceof VirtualResource ) { final List<ConcreteResource> concrete = ( (VirtualResource) resource ).toConcreteResources(); ...
[ "@", "Override", "public", "VirtualResource", "expand", "(", "final", "Resource", "resource", ")", "throws", "TransferException", "{", "List", "<", "Location", ">", "locations", ";", "if", "(", "resource", "instanceof", "VirtualResource", ")", "{", "final", "Lis...
Using the same basic logic as {@link IndyLocationExpander#expand(Collection)}, convert the specified {@link Resource} into a {@link VirtualResource} that contains references to the expanded {@link Location} list. @see IndyLocationExpander#expand(Collection)
[ "Using", "the", "same", "basic", "logic", "as", "{", "@link", "IndyLocationExpander#expand", "(", "Collection", ")", "}", "convert", "the", "specified", "{", "@link", "Resource", "}", "into", "a", "{", "@link", "VirtualResource", "}", "that", "contains", "refe...
38bf28dfce3bc25745ed239a5cd74efc56cf5c01
https://github.com/Commonjava/indy/blob/38bf28dfce3bc25745ed239a5cd74efc56cf5c01/api/src/main/java/org/commonjava/indy/content/IndyLocationExpander.java#L154-L181
valid
Expand a VirtualResource.
Of course, here is the Java code you requested: ```java @Override public VirtualResource expand( final Resource resource ) throws TransferException { List<Location> locations; if ( resource instanceof VirtualResource ) { final List<ConcreteResource> concrete = ( (Vir...
threerings/narya
core/src/main/java/com/threerings/presents/client/ClientDObjectMgr.java
ClientDObjectMgr.registerFlushDelay
public void registerFlushDelay (Class<?> objclass, long delay) { _delays.put(objclass, Long.valueOf(delay)); }
java
public void registerFlushDelay (Class<?> objclass, long delay) { _delays.put(objclass, Long.valueOf(delay)); }
[ "public", "void", "registerFlushDelay", "(", "Class", "<", "?", ">", "objclass", ",", "long", "delay", ")", "{", "_delays", ".", "put", "(", "objclass", ",", "Long", ".", "valueOf", "(", "delay", ")", ")", ";", "}" ]
Registers an object flush delay. @see Client#registerFlushDelay
[ "Registers", "an", "object", "flush", "delay", "." ]
5b01edc8850ed0c32d004b4049e1ac4a02027ede
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/presents/client/ClientDObjectMgr.java#L159-L162
train
Registers a flush delay for a class.
Of course, here is the Java code you requested: ```java public void registerFlushDelay (Class<?> objclass, long delay) { _delays.put(objclass, Long.valueOf(delay)); } ``` Hope this helps!
headius/invokebinder
src/main/java/com/headius/invokebinder/Signature.java
Signature.appendArg
public Signature appendArg(String name, Class<?> type) { String[] newArgNames = new String[argNames.length + 1]; System.arraycopy(argNames, 0, newArgNames, 0, argNames.length); newArgNames[argNames.length] = name; MethodType newMethodType = methodType.appendParameterTypes(type); ...
java
public Signature appendArg(String name, Class<?> type) { String[] newArgNames = new String[argNames.length + 1]; System.arraycopy(argNames, 0, newArgNames, 0, argNames.length); newArgNames[argNames.length] = name; MethodType newMethodType = methodType.appendParameterTypes(type); ...
[ "public", "Signature", "appendArg", "(", "String", "name", ",", "Class", "<", "?", ">", "type", ")", "{", "String", "[", "]", "newArgNames", "=", "new", "String", "[", "argNames", ".", "length", "+", "1", "]", ";", "System", ".", "arraycopy", "(", "a...
Append an argument (name + type) to the signature. @param name the name of the argument @param type the type of the argument @return a new signature with the added arguments
[ "Append", "an", "argument", "(", "name", "+", "type", ")", "to", "the", "signature", "." ]
ce6bfeb8e33265480daa7b797989dd915d51238d
https://github.com/headius/invokebinder/blob/ce6bfeb8e33265480daa7b797989dd915d51238d/src/main/java/com/headius/invokebinder/Signature.java#L187-L193
train
Append an argument to the signature.
Of course, here is the Java code you requested: ```java public Signature appendArg(String name, Class<?> type) { String[] newArgNames = new String[argNames.length + 1]; System.arraycopy(argNames, 0, newArgNames, 0, argNames.length); newArgNames[argNames.length] = name; MethodType newMet...
citygml4j/citygml4j
src-gen/main/java/net/opengis/gml/ObjectFactory.java
ObjectFactory.createFile
@XmlElementDecl(namespace = "http://www.opengis.net/gml", name = "File") public JAXBElement<FileType> createFile(FileType value) { return new JAXBElement<FileType>(_File_QNAME, FileType.class, null, value); }
java
@XmlElementDecl(namespace = "http://www.opengis.net/gml", name = "File") public JAXBElement<FileType> createFile(FileType value) { return new JAXBElement<FileType>(_File_QNAME, FileType.class, null, value); }
[ "@", "XmlElementDecl", "(", "namespace", "=", "\"http://www.opengis.net/gml\"", ",", "name", "=", "\"File\"", ")", "public", "JAXBElement", "<", "FileType", ">", "createFile", "(", "FileType", "value", ")", "{", "return", "new", "JAXBElement", "<", "FileType", "...
Create an instance of {@link JAXBElement }{@code <}{@link FileType }{@code >} @param value Java instance representing xml element's value. @return the new instance of {@link JAXBElement }{@code <}{@link FileType }{@code >}
[ "Create", "an", "instance", "of", "{", "@link", "JAXBElement", "}", "{", "@code", "<", "}", "{", "@link", "FileType", "}", "{", "@code", ">", "}" ]
9155997d5ecf7e8f19411a02ba047f13375b97b9
https://github.com/citygml4j/citygml4j/blob/9155997d5ecf7e8f19411a02ba047f13375b97b9/src-gen/main/java/net/opengis/gml/ObjectFactory.java#L6369-L6372
train
Create an instance of a File specification.
Of course, here is the Java code you requested: ```java @XmlElementDecl(namespace = "http://www.opengis.net/gml", name = "File") public JAXBElement<FileType> createFile(FileType value) { return new JAXBElement<FileType>(_File_QNAME, FileType.class, null, value); } ``` Hope this helps!
RestComm/media-core
scheduler/src/main/java/org/restcomm/media/core/scheduler/OrderedTaskQueue.java
OrderedTaskQueue.poll
public Task poll() { Task result=null; if(activeIndex==0) { result=taskList[0].poll(); if(result!=null) result.removeFromQueue0(); } else { result=taskList[1].poll(); if(result!=null) result.removeFromQueue1(); } return result; ...
java
public Task poll() { Task result=null; if(activeIndex==0) { result=taskList[0].poll(); if(result!=null) result.removeFromQueue0(); } else { result=taskList[1].poll(); if(result!=null) result.removeFromQueue1(); } return result; ...
[ "public", "Task", "poll", "(", ")", "{", "Task", "result", "=", "null", ";", "if", "(", "activeIndex", "==", "0", ")", "{", "result", "=", "taskList", "[", "0", "]", ".", "poll", "(", ")", ";", "if", "(", "result", "!=", "null", ")", "result", ...
Retrieves the task with earliest dead line and removes it from queue. @return task which has earliest dead line
[ "Retrieves", "the", "task", "with", "earliest", "dead", "line", "and", "removes", "it", "from", "queue", "." ]
07b8703343708599f60af66bae62aded77ee81b5
https://github.com/RestComm/media-core/blob/07b8703343708599f60af66bae62aded77ee81b5/scheduler/src/main/java/org/restcomm/media/core/scheduler/OrderedTaskQueue.java#L75-L91
train
Poll the queue.
Of course, here is the Java code you requested: ```java public Task poll() { Task result=null; if(activeIndex==0) { result=taskList[0].poll(); if(result!=null) result.removeFromQueue0(); } else { result=taskList[1].poll(); if(result!=null) resul...
tvbarthel/Cheerleader
library/src/main/java/fr/tvbarthel/cheerleader/library/player/CheerleaderPlayer.java
CheerleaderPlayer.play
public void play(int position) { checkState(); ArrayList<SoundCloudTrack> tracks = mPlayerPlaylist.getPlaylist().getTracks(); if (position >= 0 && position < tracks.size()) { SoundCloudTrack trackToPlay = tracks.get(position); mPlayerPlaylist.setPlayingTrack(position); ...
java
public void play(int position) { checkState(); ArrayList<SoundCloudTrack> tracks = mPlayerPlaylist.getPlaylist().getTracks(); if (position >= 0 && position < tracks.size()) { SoundCloudTrack trackToPlay = tracks.get(position); mPlayerPlaylist.setPlayingTrack(position); ...
[ "public", "void", "play", "(", "int", "position", ")", "{", "checkState", "(", ")", ";", "ArrayList", "<", "SoundCloudTrack", ">", "tracks", "=", "mPlayerPlaylist", ".", "getPlaylist", "(", ")", ".", "getTracks", "(", ")", ";", "if", "(", "position", ">=...
Play a track at a given position in the player playlist. @param position position of the track in the playlist.
[ "Play", "a", "track", "at", "a", "given", "position", "in", "the", "player", "playlist", "." ]
f61527e4cc44fcd0ed2e1e98aca285f8c236f24e
https://github.com/tvbarthel/Cheerleader/blob/f61527e4cc44fcd0ed2e1e98aca285f8c236f24e/library/src/main/java/fr/tvbarthel/cheerleader/library/player/CheerleaderPlayer.java#L187-L196
train
Play the specified sound.
Of course, here is the Java code you requested: ```java public void play(int position) { checkState(); ArrayList<SoundCloudTrack> tracks = mPlayerPlaylist.getPlaylist().getTracks(); if (position >= 0 && position < tracks.size()) { SoundCloudTrack trackToPlay = tracks.get(position); ...
googleads/googleads-java-lib
modules/adwords_axis/src/main/java/com/google/api/ads/adwords/axis/v201809/cm/SharedSet.java
SharedSet.getType
public com.google.api.ads.adwords.axis.v201809.cm.SharedSetType getType() { return type; }
java
public com.google.api.ads.adwords.axis.v201809.cm.SharedSetType getType() { return type; }
[ "public", "com", ".", "google", ".", "api", ".", "ads", ".", "adwords", ".", "axis", ".", "v201809", ".", "cm", ".", "SharedSetType", "getType", "(", ")", "{", "return", "type", ";", "}" ]
Gets the type value for this SharedSet. @return type * <span class="constraint ReadOnly">This field is read only and will be ignored when sent to the API for the following {@link Operator}s: REMOVE and SET.</span> <span class="constraint Required">This field is required and should not be {@code null} when it is cont...
[ "Gets", "the", "type", "value", "for", "this", "SharedSet", "." ]
967957cc4f6076514e3a7926fe653e4f1f7cc9c9
https://github.com/googleads/googleads-java-lib/blob/967957cc4f6076514e3a7926fe653e4f1f7cc9c9/modules/adwords_axis/src/main/java/com/google/api/ads/adwords/axis/v201809/cm/SharedSet.java#L167-L169
train
Gets the type value for this CdnSharedSet.
Of course, here is the Java code you requested: ```java public com.google.api.ads.adwords.axis.v201809.cm.SharedSetType getType() { return type; } ``` Hope this helps!
netscaler/sdx_nitro
src/main/java/com/citrix/sdx/nitro/resource/config/mps/current_hostname.java
current_hostname.modify
public static current_hostname modify(nitro_service client, current_hostname resource) throws Exception { resource.validate("modify"); return ((current_hostname[]) resource.update_resource(client))[0]; }
java
public static current_hostname modify(nitro_service client, current_hostname resource) throws Exception { resource.validate("modify"); return ((current_hostname[]) resource.update_resource(client))[0]; }
[ "public", "static", "current_hostname", "modify", "(", "nitro_service", "client", ",", "current_hostname", "resource", ")", "throws", "Exception", "{", "resource", ".", "validate", "(", "\"modify\"", ")", ";", "return", "(", "(", "current_hostname", "[", "]", ")...
<pre> Use this operation to modify current hostname. </pre>
[ "<pre", ">", "Use", "this", "operation", "to", "modify", "current", "hostname", ".", "<", "/", "pre", ">" ]
c840919f1a8f7c0a5634c0f23d34fa14d1765ff1
https://github.com/netscaler/sdx_nitro/blob/c840919f1a8f7c0a5634c0f23d34fa14d1765ff1/src/main/java/com/citrix/sdx/nitro/resource/config/mps/current_hostname.java#L97-L101
train
Use this API to modify current_hostname.
Of course, here is the Java code you requested: ```java public static current_hostname modify(nitro_service client, current_hostname resource) throws Exception { resource.validate("modify"); return ((current_hostname[]) resource.update_resource(client))[0]; } ``` Hope this helps!
apache/flink
flink-core/src/main/java/org/apache/flink/core/fs/Path.java
Path.read
@Override public void read(DataInputView in) throws IOException { final boolean isNotNull = in.readBoolean(); if (isNotNull) { final String scheme = StringUtils.readNullableString(in); final String userInfo = StringUtils.readNullableString(in); final String host = StringUtils.readNullableString(in); fi...
java
@Override public void read(DataInputView in) throws IOException { final boolean isNotNull = in.readBoolean(); if (isNotNull) { final String scheme = StringUtils.readNullableString(in); final String userInfo = StringUtils.readNullableString(in); final String host = StringUtils.readNullableString(in); fi...
[ "@", "Override", "public", "void", "read", "(", "DataInputView", "in", ")", "throws", "IOException", "{", "final", "boolean", "isNotNull", "=", "in", ".", "readBoolean", "(", ")", ";", "if", "(", "isNotNull", ")", "{", "final", "String", "scheme", "=", "...
------------------------------------------------------------------------
[ "------------------------------------------------------------------------" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/core/fs/Path.java#L465-L483
train
Read the content of the CIDENTENTENTENT XML.
Of course, here is the Java code you requested: ```java @Override public void read(DataInputView in) throws IOException { final boolean isNotNull = in.readBoolean(); if (isNotNull) { final String scheme = StringUtils.readNullableString(in); final String userInfo = StringUtils.readNullableString(in); fina...
Jasig/uPortal
uPortal-api/uPortal-api-rest/src/main/java/org/apereo/portal/layout/dlm/remoting/UpdatePreferencesServlet.java
UpdatePreferencesServlet.removeByFName
@RequestMapping(method = RequestMethod.POST, params = "action=removeByFName") public ModelAndView removeByFName( HttpServletRequest request, HttpServletResponse response, @RequestParam(value = "fname") String fname) throws IOException { IUserInstance ui = use...
java
@RequestMapping(method = RequestMethod.POST, params = "action=removeByFName") public ModelAndView removeByFName( HttpServletRequest request, HttpServletResponse response, @RequestParam(value = "fname") String fname) throws IOException { IUserInstance ui = use...
[ "@", "RequestMapping", "(", "method", "=", "RequestMethod", ".", "POST", ",", "params", "=", "\"action=removeByFName\"", ")", "public", "ModelAndView", "removeByFName", "(", "HttpServletRequest", "request", ",", "HttpServletResponse", "response", ",", "@", "RequestPar...
Remove the first element with the provided fname from the layout. @param request HttpServletRequest @param response HttpServletResponse @param fname fname of the portlet to remove from the layout @return json response @throws IOException if the person cannot be retrieved
[ "Remove", "the", "first", "element", "with", "the", "provided", "fname", "from", "the", "layout", "." ]
c1986542abb9acd214268f2df21c6305ad2f262b
https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-api/uPortal-api-rest/src/main/java/org/apereo/portal/layout/dlm/remoting/UpdatePreferencesServlet.java#L216-L261
train
Remove an element from the user s layout by fname.
Of course, here is the Java code you requested: ```java @RequestMapping(method = RequestMethod.POST, params = "action=removeByFName") public ModelAndView removeByFName( HttpServletRequest request, HttpServletResponse response, @RequestParam(value = "fname") String fname) ...
overturetool/overture
ide/ui/src/main/java/org/overture/ide/ui/utility/ast/AstLocationSearcher2.java
AstLocationSearcher2.caseILexLocation
@Override public void caseILexLocation(ILexLocation node) throws AnalysisException { AstLocation location = new AstLocation(current, node); if (reference.contains(node.getStartOffset(), node.getEndOffset(), node.getFile()))// we need to do set some // upper limit on the ...
java
@Override public void caseILexLocation(ILexLocation node) throws AnalysisException { AstLocation location = new AstLocation(current, node); if (reference.contains(node.getStartOffset(), node.getEndOffset(), node.getFile()))// we need to do set some // upper limit on the ...
[ "@", "Override", "public", "void", "caseILexLocation", "(", "ILexLocation", "node", ")", "throws", "AnalysisException", "{", "AstLocation", "location", "=", "new", "AstLocation", "(", "current", ",", "node", ")", ";", "if", "(", "reference", ".", "contains", "...
Never called by analysis from super
[ "Never", "called", "by", "analysis", "from", "super" ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/ide/ui/src/main/java/org/overture/ide/ui/utility/ast/AstLocationSearcher2.java#L133-L149
train
implement the default implementation of the ILexLocation interface.
Of course, here is the Java code you requested: ```java @Override public void caseILexLocation(ILexLocation node) throws AnalysisException { AstLocation location = new AstLocation(current, node); if (reference.contains(node.getStartOffset(), node.getEndOffset(), node.getFile()))// we need to do set some ...
spring-projects/spring-security
web/src/main/java/org/springframework/security/web/server/util/matcher/ServerWebExchangeMatchers.java
ServerWebExchangeMatchers.pathMatchers
public static ServerWebExchangeMatcher pathMatchers(HttpMethod method, String... patterns) { List<ServerWebExchangeMatcher> matchers = new ArrayList<>(patterns.length); for (String pattern : patterns) { matchers.add(new PathPatternParserServerWebExchangeMatcher(pattern, method)); } return new OrServerWebExch...
java
public static ServerWebExchangeMatcher pathMatchers(HttpMethod method, String... patterns) { List<ServerWebExchangeMatcher> matchers = new ArrayList<>(patterns.length); for (String pattern : patterns) { matchers.add(new PathPatternParserServerWebExchangeMatcher(pattern, method)); } return new OrServerWebExch...
[ "public", "static", "ServerWebExchangeMatcher", "pathMatchers", "(", "HttpMethod", "method", ",", "String", "...", "patterns", ")", "{", "List", "<", "ServerWebExchangeMatcher", ">", "matchers", "=", "new", "ArrayList", "<>", "(", "patterns", ".", "length", ")", ...
Creates a matcher that matches on the specific method and any of the provided patterns. @param method the method to match on. If null, any method will be matched @param patterns the patterns to match on @return the matcher to use
[ "Creates", "a", "matcher", "that", "matches", "on", "the", "specific", "method", "and", "any", "of", "the", "provided", "patterns", "." ]
98a8467e4c2ae05b3e09c67ece856944fa48ed23
https://github.com/spring-projects/spring-security/blob/98a8467e4c2ae05b3e09c67ece856944fa48ed23/web/src/main/java/org/springframework/security/web/server/util/matcher/ServerWebExchangeMatchers.java#L38-L44
test
Create a path matcher from a list of pattern strings.
Of course, here is the Java code you requested: ```java public static ServerWebExchangeMatcher pathMatchers(HttpMethod method, String... patterns) { List<ServerWebExchangeMatcher> matchers = new ArrayList<>(patterns.length); for (String pattern : patterns) { matchers.add(new PathPatternParserServerWebExchangeMa...
JOML-CI/JOML
src/org/joml/Matrix4x3d.java
Matrix4x3d.rotation
public Matrix4x3d rotation(double angle, Vector3dc axis) { return rotation(angle, axis.x(), axis.y(), axis.z()); }
java
public Matrix4x3d rotation(double angle, Vector3dc axis) { return rotation(angle, axis.x(), axis.y(), axis.z()); }
[ "public", "Matrix4x3d", "rotation", "(", "double", "angle", ",", "Vector3dc", "axis", ")", "{", "return", "rotation", "(", "angle", ",", "axis", ".", "x", "(", ")", ",", "axis", ".", "y", "(", ")", ",", "axis", ".", "z", "(", ")", ")", ";", "}" ]
Set this matrix to a rotation matrix which rotates the given radians about a given axis. <p> The axis described by the <code>axis</code> vector needs to be a unit vector. <p> When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when view...
[ "Set", "this", "matrix", "to", "a", "rotation", "matrix", "which", "rotates", "the", "given", "radians", "about", "a", "given", "axis", ".", "<p", ">", "The", "axis", "described", "by", "the", "<code", ">", "axis<", "/", "code", ">", "vector", "needs", ...
ce2652fc236b42bda3875c591f8e6645048a678f
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Matrix4x3d.java#L2867-L2869
train
Create a rotation matrix that rotates the given axis.
Of course, here is the Java code you requested: ```java public Matrix4x3d rotation(double angle, Vector3dc axis) { return rotation(angle, axis.x(), axis.y(), axis.z()); } ``` Hope this helps!
jbundle/jbundle
thin/base/db/base/src/main/java/org/jbundle/thin/base/db/FieldList.java
FieldList.setKeyArea
public KeyAreaInfo setKeyArea(String strKeyName) { KeyAreaInfo keyArea = null; if (strKeyName == null) strKeyName = Constants.PRIMARY_KEY; for (m_iDefaultOrder = Constants.MAIN_KEY_AREA; m_iDefaultOrder < this.getKeyAreaCount() - Constants.MAIN_KEY_AREA; m_iDefaultOrder++) ...
java
public KeyAreaInfo setKeyArea(String strKeyName) { KeyAreaInfo keyArea = null; if (strKeyName == null) strKeyName = Constants.PRIMARY_KEY; for (m_iDefaultOrder = Constants.MAIN_KEY_AREA; m_iDefaultOrder < this.getKeyAreaCount() - Constants.MAIN_KEY_AREA; m_iDefaultOrder++) ...
[ "public", "KeyAreaInfo", "setKeyArea", "(", "String", "strKeyName", ")", "{", "KeyAreaInfo", "keyArea", "=", "null", ";", "if", "(", "strKeyName", "==", "null", ")", "strKeyName", "=", "Constants", ".", "PRIMARY_KEY", ";", "for", "(", "m_iDefaultOrder", "=", ...
Set the default key order. @param String strKeyName the current index. @return The new default key area (null if not found).
[ "Set", "the", "default", "key", "order", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/db/base/src/main/java/org/jbundle/thin/base/db/FieldList.java#L621-L639
train
Set the key area.
Of course, here is the Java code you requested: ```java public KeyAreaInfo setKeyArea(String strKeyName) { KeyAreaInfo keyArea = null; if (strKeyName == null) strKeyName = Constants.PRIMARY_KEY; for (m_iDefaultOrder = Constants.MAIN_KEY_AREA; m_iDefaultOrder < this.getKeyAreaCou...
aws/aws-sdk-java
aws-java-sdk-greengrass/src/main/java/com/amazonaws/services/greengrass/model/transform/GetDeploymentStatusRequestMarshaller.java
GetDeploymentStatusRequestMarshaller.marshall
public void marshall(GetDeploymentStatusRequest getDeploymentStatusRequest, ProtocolMarshaller protocolMarshaller) { if (getDeploymentStatusRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(g...
java
public void marshall(GetDeploymentStatusRequest getDeploymentStatusRequest, ProtocolMarshaller protocolMarshaller) { if (getDeploymentStatusRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(g...
[ "public", "void", "marshall", "(", "GetDeploymentStatusRequest", "getDeploymentStatusRequest", ",", "ProtocolMarshaller", "protocolMarshaller", ")", "{", "if", "(", "getDeploymentStatusRequest", "==", "null", ")", "{", "throw", "new", "SdkClientException", "(", "\"Invalid...
Marshall the given parameter object.
[ "Marshall", "the", "given", "parameter", "object", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-greengrass/src/main/java/com/amazonaws/services/greengrass/model/transform/GetDeploymentStatusRequestMarshaller.java#L44-L56
train
marshalls the given GetDeploymentStatusRequest to the JSON object.
Of course, here is the Java code you requested: ```java public void marshall(GetDeploymentStatusRequest getDeploymentStatusRequest, ProtocolMarshaller protocolMarshaller) { if (getDeploymentStatusRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); }...
Netflix/ndbench
ndbench-dyno-plugins/src/main/java/com/netflix/ndbench/plugin/dyno/DynoJedisUtils.java
DynoJedisUtils.pipelineWrite
public String pipelineWrite(String key, DataGenerator dataGenerator, int max_pipe_keys, int min_pipe_keys) throws Exception { // Create a random key between [0,MAX_PIPE_KEYS] int pipe_keys = randomGenerator.nextInt(max_pipe_keys); // Make sure that the number of keys in the pipeline...
java
public String pipelineWrite(String key, DataGenerator dataGenerator, int max_pipe_keys, int min_pipe_keys) throws Exception { // Create a random key between [0,MAX_PIPE_KEYS] int pipe_keys = randomGenerator.nextInt(max_pipe_keys); // Make sure that the number of keys in the pipeline...
[ "public", "String", "pipelineWrite", "(", "String", "key", ",", "DataGenerator", "dataGenerator", ",", "int", "max_pipe_keys", ",", "int", "min_pipe_keys", ")", "throws", "Exception", "{", "// Create a random key between [0,MAX_PIPE_KEYS]", "int", "pipe_keys", "=", "ran...
pipelined version of the write @param key @return "key_n"
[ "pipelined", "version", "of", "the", "write" ]
8d664244b5f9d01395248a296b86a3c822e6d764
https://github.com/Netflix/ndbench/blob/8d664244b5f9d01395248a296b86a3c822e6d764/ndbench-dyno-plugins/src/main/java/com/netflix/ndbench/plugin/dyno/DynoJedisUtils.java#L181-L209
train
This method is a pipeline write method.
Of course, here is the Java code you requested: ```java public String pipelineWrite(String key, DataGenerator dataGenerator, int max_pipe_keys, int min_pipe_keys) throws Exception { // Create a random key between [0,MAX_PIPE_KEYS] int pipe_keys = randomGenerator.nextInt(max_pipe_keys); ...
OpenLiberty/open-liberty
dev/com.ibm.ws.security.authorization.builtin/src/com/ibm/ws/security/authorization/builtin/AbstractSecurityAuthorizationTable.java
AbstractSecurityAuthorizationTable.getUserAccessId
private String getUserAccessId(String userName) { try { SecurityService securityService = securityServiceRef.getService(); UserRegistryService userRegistryService = securityService.getUserRegistryService(); UserRegistry userRegistry = userRegistryService.getUserRegistry(); ...
java
private String getUserAccessId(String userName) { try { SecurityService securityService = securityServiceRef.getService(); UserRegistryService userRegistryService = securityService.getUserRegistryService(); UserRegistry userRegistry = userRegistryService.getUserRegistry(); ...
[ "private", "String", "getUserAccessId", "(", "String", "userName", ")", "{", "try", "{", "SecurityService", "securityService", "=", "securityServiceRef", ".", "getService", "(", ")", ";", "UserRegistryService", "userRegistryService", "=", "securityService", ".", "getU...
Get the access id for a user by performing a looking up in the user registry. @param userName the user for which to create an access id @return the access id of the userName specified, otherwise null when a registry error occurs or the entry is not found
[ "Get", "the", "access", "id", "for", "a", "user", "by", "performing", "a", "looking", "up", "in", "the", "user", "registry", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.authorization.builtin/src/com/ibm/ws/security/authorization/builtin/AbstractSecurityAuthorizationTable.java#L317-L338
train
Gets the access id for a user.
Of course, here is the Java code you requested: ```java private String getUserAccessId(String userName) { try { SecurityService securityService = securityServiceRef.getService(); UserRegistryService userRegistryService = securityService.getUserRegistryService(); UserRegistr...
baratine/baratine
framework/src/main/java/com/caucho/v5/javac/JavaWriter.java
JavaWriter.print
public void print(String s) throws IOException { if (_startLine) printIndent(); if (s == null) { _lastCr = false; _os.print("null"); return; } int len = s.length(); for (int i = 0; i < len; i++) { int ch = s.charAt(i); if (ch == '\n' && !_lastCr) _de...
java
public void print(String s) throws IOException { if (_startLine) printIndent(); if (s == null) { _lastCr = false; _os.print("null"); return; } int len = s.length(); for (int i = 0; i < len; i++) { int ch = s.charAt(i); if (ch == '\n' && !_lastCr) _de...
[ "public", "void", "print", "(", "String", "s", ")", "throws", "IOException", "{", "if", "(", "_startLine", ")", "printIndent", "(", ")", ";", "if", "(", "s", "==", "null", ")", "{", "_lastCr", "=", "false", ";", "_os", ".", "print", "(", "\"null\"", ...
Prints a string
[ "Prints", "a", "string" ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/javac/JavaWriter.java#L237-L262
train
Print a string to the output stream.
Of course, here is the Java code you requested: ```java public void print(String s) throws IOException { if (_startLine) printIndent(); if (s == null) { _lastCr = false; _os.print("null"); return; } int len = s.length(); for (int i = 0; i < len; i++) { int ch = s....
seedstack/business
core/src/main/java/org/seedstack/business/internal/utils/PluginUtils.java
PluginUtils.associateInterfaceToImplementations
public static <T> Map<Key<T>, Class<? extends T>> associateInterfaceToImplementations(Class<T> anInterface, Collection<Class<? extends T>> implementations, boolean overridingMode) { return BindingUtils.resolveBindingDefinitions(anInterface, implementations.stream() .filter(overriding...
java
public static <T> Map<Key<T>, Class<? extends T>> associateInterfaceToImplementations(Class<T> anInterface, Collection<Class<? extends T>> implementations, boolean overridingMode) { return BindingUtils.resolveBindingDefinitions(anInterface, implementations.stream() .filter(overriding...
[ "public", "static", "<", "T", ">", "Map", "<", "Key", "<", "T", ">", ",", "Class", "<", "?", "extends", "T", ">", ">", "associateInterfaceToImplementations", "(", "Class", "<", "T", ">", "anInterface", ",", "Collection", "<", "Class", "<", "?", "extend...
Associates scanned interfaces to their implementations. It also handles qualified bindings in the case where there is multiple implementation for the same interface. <p> This is the "default mode" for binding in the business framework. </p> @param <T> the class of the interface. @param anInterface the ...
[ "Associates", "scanned", "interfaces", "to", "their", "implementations", ".", "It", "also", "handles", "qualified", "bindings", "in", "the", "case", "where", "there", "is", "multiple", "implementation", "for", "the", "same", "interface", ".", "<p", ">", "This", ...
55b3e861fe152e9b125ebc69daa91a682deeae8a
https://github.com/seedstack/business/blob/55b3e861fe152e9b125ebc69daa91a682deeae8a/core/src/main/java/org/seedstack/business/internal/utils/PluginUtils.java#L106-L111
train
Associate the given interface with the given implementation classes.
Of course, here is the Java code you requested: ```java public static <T> Map<Key<T>, Class<? extends T>> associateInterfaceToImplementations(Class<T> anInterface, Collection<Class<? extends T>> implementations, boolean overridingMode) { return BindingUtils.resolveBindingDefinitions(anInterface, im...
weld/core
environments/se/core/src/main/java/org/jboss/weld/environment/se/WeldContainer.java
WeldContainer.current
public static WeldContainer current() { List<String> ids = WeldContainer.getRunningContainerIds(); if (ids.size() == 1) { return WeldContainer.instance(ids.get(0)); } else { // if there is either no container or multiple containers we want to throw exception /...
java
public static WeldContainer current() { List<String> ids = WeldContainer.getRunningContainerIds(); if (ids.size() == 1) { return WeldContainer.instance(ids.get(0)); } else { // if there is either no container or multiple containers we want to throw exception /...
[ "public", "static", "WeldContainer", "current", "(", ")", "{", "List", "<", "String", ">", "ids", "=", "WeldContainer", ".", "getRunningContainerIds", "(", ")", ";", "if", "(", "ids", ".", "size", "(", ")", "==", "1", ")", "{", "return", "WeldContainer",...
A convenient method for {@link CDI.current()}. Returns current {@link WeldContainer} instance if there is exactly one instance running. Throws {@link IllegalStateException} in any other case. @return Current {@link WeldContainer} instance if and only if exactly one instance exists @throws {@link IllegalStateException} ...
[ "A", "convenient", "method", "for", "{" ]
567a2eaf95b168597d23a56be89bf05a7834b2aa
https://github.com/weld/core/blob/567a2eaf95b168597d23a56be89bf05a7834b2aa/environments/se/core/src/main/java/org/jboss/weld/environment/se/WeldContainer.java#L134-L143
train
Get the current container
Of course, here is the Java code you requested: ```java public static WeldContainer current() { List<String> ids = WeldContainer.getRunningContainerIds(); if (ids.size() == 1) { return WeldContainer.instance(ids.get(0)); } else { // if there is either no container or mul...
couchbase/couchbase-lite-java
src/main/java/com/couchbase/lite/Expression.java
Expression.notEqualTo
@NonNull public Expression notEqualTo(@NonNull Expression expression) { if (expression == null) { throw new IllegalArgumentException("expression cannot be null."); } return new BinaryExpression(this, expression, BinaryExpression.OpType.NotEqualTo); }
java
@NonNull public Expression notEqualTo(@NonNull Expression expression) { if (expression == null) { throw new IllegalArgumentException("expression cannot be null."); } return new BinaryExpression(this, expression, BinaryExpression.OpType.NotEqualTo); }
[ "@", "NonNull", "public", "Expression", "notEqualTo", "(", "@", "NonNull", "Expression", "expression", ")", "{", "if", "(", "expression", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"expression cannot be null.\"", ")", ";", "}", "r...
Create a NOT equal to expression that evaluates whether or not the current expression is not equal to the given expression. @param expression the expression to compare with the current expression. @return a NOT equal to exprssion.
[ "Create", "a", "NOT", "equal", "to", "expression", "that", "evaluates", "whether", "or", "not", "the", "current", "expression", "is", "not", "equal", "to", "the", "given", "expression", "." ]
cb72c44186456e6191a9ad0a7feb310011d0b081
https://github.com/couchbase/couchbase-lite-java/blob/cb72c44186456e6191a9ad0a7feb310011d0b081/src/main/java/com/couchbase/lite/Expression.java#L692-L698
train
Method to construct the Not Equal To expression for a Sequence Class.
Of course, here is the Java code you requested: ```java @NonNull public Expression notEqualTo(@NonNull Expression expression) { if (expression == null) { throw new IllegalArgumentException("expression cannot be null."); } return new BinaryExpression(this, expression, BinaryExpre...
cosysoft/device
device-api/src/main/java/com/github/cosysoft/device/android/impl/AbstractDevice.java
AbstractDevice.cleanTemp
public void cleanTemp() { CommandLine dumpcommand = adbCommand("shell", "rm", "-r", "/data/local/tmp/local/tmp/dump.xml"); executeCommandQuietly(dumpcommand); try { // give it a second to recover from the activity start Thread.sleep(1000); } catch (InterruptedException ie) { th...
java
public void cleanTemp() { CommandLine dumpcommand = adbCommand("shell", "rm", "-r", "/data/local/tmp/local/tmp/dump.xml"); executeCommandQuietly(dumpcommand); try { // give it a second to recover from the activity start Thread.sleep(1000); } catch (InterruptedException ie) { th...
[ "public", "void", "cleanTemp", "(", ")", "{", "CommandLine", "dumpcommand", "=", "adbCommand", "(", "\"shell\"", ",", "\"rm\"", ",", "\"-r\"", ",", "\"/data/local/tmp/local/tmp/dump.xml\"", ")", ";", "executeCommandQuietly", "(", "dumpcommand", ")", ";", "try", "{...
clean file dump.xml, qian.xml, uidump.xml in tmp folder
[ "clean", "file", "dump", ".", "xml", "qian", ".", "xml", "uidump", ".", "xml", "in", "tmp", "folder" ]
d5cd0b713a47aba4d5f3f5d918578336f44ddb9e
https://github.com/cosysoft/device/blob/d5cd0b713a47aba4d5f3f5d918578336f44ddb9e/device-api/src/main/java/com/github/cosysoft/device/android/impl/AbstractDevice.java#L410-L441
test
Clean up the temp files
Of course, here is the Java code you requested: ```java public void cleanTemp() { CommandLine dumpcommand = adbCommand("shell", "rm", "-r", "/data/local/tmp/local/tmp/dump.xml"); executeCommandQuietly(dumpcommand); try { // give it a second to recover from the activity start Thread.slee...
yidongnan/grpc-spring-boot-starter
grpc-server-spring-boot-autoconfigure/src/main/java/net/devh/boot/grpc/server/autoconfigure/GrpcServerFactoryAutoConfiguration.java
GrpcServerFactoryAutoConfiguration.shadedNettyGrpcServerFactory
@ConditionalOnClass(name = {"io.grpc.netty.shaded.io.netty.channel.Channel", "io.grpc.netty.shaded.io.grpc.netty.NettyServerBuilder"}) @Bean public ShadedNettyGrpcServerFactory shadedNettyGrpcServerFactory(final GrpcServerProperties properties, final GrpcServiceDiscoverer serviceDiscover...
java
@ConditionalOnClass(name = {"io.grpc.netty.shaded.io.netty.channel.Channel", "io.grpc.netty.shaded.io.grpc.netty.NettyServerBuilder"}) @Bean public ShadedNettyGrpcServerFactory shadedNettyGrpcServerFactory(final GrpcServerProperties properties, final GrpcServiceDiscoverer serviceDiscover...
[ "@", "ConditionalOnClass", "(", "name", "=", "{", "\"io.grpc.netty.shaded.io.netty.channel.Channel\"", ",", "\"io.grpc.netty.shaded.io.grpc.netty.NettyServerBuilder\"", "}", ")", "@", "Bean", "public", "ShadedNettyGrpcServerFactory", "shadedNettyGrpcServerFactory", "(", "final", ...
Creates a GrpcServerFactory using the shaded netty. This is the recommended default for gRPC. @param properties The properties used to configure the server. @param serviceDiscoverer The discoverer used to identify the services that should be served. @param serverConfigurers The server configurers that contain addition...
[ "Creates", "a", "GrpcServerFactory", "using", "the", "shaded", "netty", ".", "This", "is", "the", "recommended", "default", "for", "gRPC", "." ]
07f8853cfafc9707584f2371aff012e590217b85
https://github.com/yidongnan/grpc-spring-boot-starter/blob/07f8853cfafc9707584f2371aff012e590217b85/grpc-server-spring-boot-autoconfigure/src/main/java/net/devh/boot/grpc/server/autoconfigure/GrpcServerFactoryAutoConfiguration.java#L60-L70
train
Shaded Netty Grpc Server Factory.
Of course, here is the Java code you requested: ```java @ConditionalOnClass(name = {"io.grpc.netty.shaded.io.netty.channel.Channel", "io.grpc.netty.shaded.io.grpc.netty.NettyServerBuilder"}) @Bean public ShadedNettyGrpcServerFactory shadedNettyGrpcServerFactory(final GrpcServerProperties properties...
google/guava
guava/src/com/google/common/io/BaseEncoding.java
BaseEncoding.decodeChecked
final byte[] decodeChecked(CharSequence chars) throws DecodingException { chars = trimTrailingPadding(chars); byte[] tmp = new byte[maxDecodedSize(chars.length())]; int len = decodeTo(tmp, chars); return extract(tmp, len); }
java
final byte[] decodeChecked(CharSequence chars) throws DecodingException { chars = trimTrailingPadding(chars); byte[] tmp = new byte[maxDecodedSize(chars.length())]; int len = decodeTo(tmp, chars); return extract(tmp, len); }
[ "final", "byte", "[", "]", "decodeChecked", "(", "CharSequence", "chars", ")", "throws", "DecodingException", "{", "chars", "=", "trimTrailingPadding", "(", "chars", ")", ";", "byte", "[", "]", "tmp", "=", "new", "byte", "[", "maxDecodedSize", "(", "chars", ...
Decodes the specified character sequence, and returns the resulting {@code byte[]}. This is the inverse operation to {@link #encode(byte[])}. @throws DecodingException if the input is not a valid encoded string according to this encoding.
[ "Decodes", "the", "specified", "character", "sequence", "and", "returns", "the", "resulting", "{", "@code", "byte", "[]", "}", ".", "This", "is", "the", "inverse", "operation", "to", "{", "@link", "#encode", "(", "byte", "[]", ")", "}", "." ]
7155d12b70a2406fa84d94d4b8b3bc108e89abfd
https://github.com/google/guava/blob/7155d12b70a2406fa84d94d4b8b3bc108e89abfd/guava/src/com/google/common/io/BaseEncoding.java#L229-L235
valid
Decode a UTF - 8 encoded sequence of bytes.
Of course, here is the Java code you requested: ```java final byte[] decodeChecked(CharSequence chars) throws DecodingException { chars = trimTrailingPadding(chars); byte[] tmp = new byte[maxDecodedSize(chars.length())]; int len = decodeTo(tmp, chars); return extract(tmp, len); } ``` Hope this...
apache/predictionio-sdk-java
client/src/main/java/org/apache/predictionio/sdk/java/EventClient.java
EventClient.userActionItem
public String userActionItem(String action, String uid, String iid, Map<String, Object> properties, DateTime eventTime) throws ExecutionException, InterruptedException, IOException { return createEvent(userActionItemAsFuture(action, uid, iid, properties, eventTime)); }
java
public String userActionItem(String action, String uid, String iid, Map<String, Object> properties, DateTime eventTime) throws ExecutionException, InterruptedException, IOException { return createEvent(userActionItemAsFuture(action, uid, iid, properties, eventTime)); }
[ "public", "String", "userActionItem", "(", "String", "action", ",", "String", "uid", ",", "String", "iid", ",", "Map", "<", "String", ",", "Object", ">", "properties", ",", "DateTime", "eventTime", ")", "throws", "ExecutionException", ",", "InterruptedException"...
Records a user-action-on-item event. @param action name of the action performed @param uid ID of the user @param iid ID of the item @param properties a map of properties associated with this action @param eventTime timestamp of the event @return ID of this event
[ "Records", "a", "user", "-", "action", "-", "on", "-", "item", "event", "." ]
16052c96b136340c175c3f9c2692e720850df219
https://github.com/apache/predictionio-sdk-java/blob/16052c96b136340c175c3f9c2692e720850df219/client/src/main/java/org/apache/predictionio/sdk/java/EventClient.java#L646-L650
train
UserActionItem Method.
Of course, here is the Java code you requested: ```java public String userActionItem(String action, String uid, String iid, Map<String, Object> properties, DateTime eventTime) throws ExecutionException, InterruptedException, IOException { return createEvent(userActionItemAsFuture(action, uid, iid, prop...
naver/nbase-arc
api/java/src/main/java/com/navercorp/redis/cluster/triples/TriplesRedisClusterClient.java
TriplesRedisClusterClient.slcount
public void slcount(final String keyspace, final String uid) { slcount(SafeEncoder.encode(keyspace), SafeEncoder.encode(uid)); }
java
public void slcount(final String keyspace, final String uid) { slcount(SafeEncoder.encode(keyspace), SafeEncoder.encode(uid)); }
[ "public", "void", "slcount", "(", "final", "String", "keyspace", ",", "final", "String", "uid", ")", "{", "slcount", "(", "SafeEncoder", ".", "encode", "(", "keyspace", ")", ",", "SafeEncoder", ".", "encode", "(", "uid", ")", ")", ";", "}" ]
Slcount. @param keyspace the keyspace @param uid the uid
[ "Slcount", "." ]
d4ce8a258527160c09b55e34acc1542651a8bbb3
https://github.com/naver/nbase-arc/blob/d4ce8a258527160c09b55e34acc1542651a8bbb3/api/java/src/main/java/com/navercorp/redis/cluster/triples/TriplesRedisClusterClient.java#L235-L237
valid
Count the number of nodes in a keyspace.
Of course, here is the Java code you requested: ```java public void slcount(final String keyspace, final String uid) { slcount(SafeEncoder.encode(keyspace), SafeEncoder.encode(uid)); } ``` Hope this helps!
yan74/afplib
org.afplib/src/main/java/org/afplib/afplib/impl/FNNRG2Impl.java
FNNRG2Impl.eIsSet
@Override public boolean eIsSet(int featureID) { switch (featureID) { case AfplibPackage.FNNRG2__TSID_LEN: return TSID_LEN_EDEFAULT == null ? tsidLen != null : !TSID_LEN_EDEFAULT.equals(tsidLen); case AfplibPackage.FNNRG2__TSID: return TSID_EDEFAULT == null ? tsid != null : !TSID_EDEFAULT.equals(tsid);...
java
@Override public boolean eIsSet(int featureID) { switch (featureID) { case AfplibPackage.FNNRG2__TSID_LEN: return TSID_LEN_EDEFAULT == null ? tsidLen != null : !TSID_LEN_EDEFAULT.equals(tsidLen); case AfplibPackage.FNNRG2__TSID: return TSID_EDEFAULT == null ? tsid != null : !TSID_EDEFAULT.equals(tsid);...
[ "@", "Override", "public", "boolean", "eIsSet", "(", "int", "featureID", ")", "{", "switch", "(", "featureID", ")", "{", "case", "AfplibPackage", ".", "FNNRG2__TSID_LEN", ":", "return", "TSID_LEN_EDEFAULT", "==", "null", "?", "tsidLen", "!=", "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/FNNRG2Impl.java#L189-L198
train
Replies if the featureID 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.FNNRG2__TSID_LEN: return TSID_LEN_EDEFAULT == null ? tsidLen != null : !TSID_LEN_EDEFAULT.equals(tsidLen); case AfplibPackage.FNNRG2__TSID: return TSID_EDEFA...
mikepenz/MaterialDrawer
library/src/main/java/com/mikepenz/materialdrawer/model/BaseDrawerItem.java
BaseDrawerItem.getColor
protected int getColor(Context ctx) { int color; if (this.isEnabled()) { color = ColorHolder.color(getTextColor(), ctx, R.attr.material_drawer_primary_text, R.color.material_drawer_primary_text); } else { color = ColorHolder.color(getDisabledTextColor(), ctx, R.attr.mater...
java
protected int getColor(Context ctx) { int color; if (this.isEnabled()) { color = ColorHolder.color(getTextColor(), ctx, R.attr.material_drawer_primary_text, R.color.material_drawer_primary_text); } else { color = ColorHolder.color(getDisabledTextColor(), ctx, R.attr.mater...
[ "protected", "int", "getColor", "(", "Context", "ctx", ")", "{", "int", "color", ";", "if", "(", "this", ".", "isEnabled", "(", ")", ")", "{", "color", "=", "ColorHolder", ".", "color", "(", "getTextColor", "(", ")", ",", "ctx", ",", "R", ".", "att...
helper method to decide for the correct color @param ctx @return
[ "helper", "method", "to", "decide", "for", "the", "correct", "color" ]
f4fb31635767edead0a01cee7b7588942b89d8d9
https://github.com/mikepenz/MaterialDrawer/blob/f4fb31635767edead0a01cee7b7588942b89d8d9/library/src/main/java/com/mikepenz/materialdrawer/model/BaseDrawerItem.java#L289-L297
train
Get the color of the image.
Of course, here is the Java code you requested: ```java protected int getColor(Context ctx) { int color; if (this.isEnabled()) { color = ColorHolder.color(getTextColor(), ctx, R.attr.material_drawer_primary_text, R.color.material_drawer_primary_text); } else { color = Co...
classgraph/classgraph
src/main/java/io/github/classgraph/Resource.java
Resource.inputStreamToByteBuffer
protected ByteBuffer inputStreamToByteBuffer() throws IOException { return byteBuffer == null ? byteBuffer = ByteBuffer.wrap(inputStreamToByteArray()) : byteBuffer; }
java
protected ByteBuffer inputStreamToByteBuffer() throws IOException { return byteBuffer == null ? byteBuffer = ByteBuffer.wrap(inputStreamToByteArray()) : byteBuffer; }
[ "protected", "ByteBuffer", "inputStreamToByteBuffer", "(", ")", "throws", "IOException", "{", "return", "byteBuffer", "==", "null", "?", "byteBuffer", "=", "ByteBuffer", ".", "wrap", "(", "inputStreamToByteArray", "(", ")", ")", ":", "byteBuffer", ";", "}" ]
Create a {@link ByteBuffer} from an {@link InputStream}. @return the byte buffer @throws IOException if an I/O exception occurs.
[ "Create", "a", "{", "@link", "ByteBuffer", "}", "from", "an", "{", "@link", "InputStream", "}", "." ]
c8c8b2ca1eb76339f69193fdac33d735c864215c
https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/io/github/classgraph/Resource.java#L109-L111
train
This method is used to convert the input stream to a ByteBuffer.
Of course, here is the Java code you requested: ```java protected ByteBuffer inputStreamToByteBuffer() throws IOException { return byteBuffer == null ? byteBuffer = ByteBuffer.wrap(inputStreamToByteArray()) : byteBuffer; } ``` Hope this helps!
VoltDB/voltdb
src/frontend/org/voltdb/OpsAgent.java
OpsAgent.sendClientResponse
protected void sendClientResponse(PendingOpsRequest request) { byte statusCode = ClientResponse.SUCCESS; String statusString = null; /* * It is possible not to receive a table response if a feature is not enabled */ // All of the null/empty table handling/detecting/gene...
java
protected void sendClientResponse(PendingOpsRequest request) { byte statusCode = ClientResponse.SUCCESS; String statusString = null; /* * It is possible not to receive a table response if a feature is not enabled */ // All of the null/empty table handling/detecting/gene...
[ "protected", "void", "sendClientResponse", "(", "PendingOpsRequest", "request", ")", "{", "byte", "statusCode", "=", "ClientResponse", ".", "SUCCESS", ";", "String", "statusString", "=", "null", ";", "/*\n * It is possible not to receive a table response if a feature ...
Send the final response stored in the PendingOpsRequest to the client which initiated the action. Will be called automagically after aggregating cluster-wide responses, but may be called directly by subclasses if necessary.
[ "Send", "the", "final", "response", "stored", "in", "the", "PendingOpsRequest", "to", "the", "client", "which", "initiated", "the", "action", ".", "Will", "be", "called", "automagically", "after", "aggregating", "cluster", "-", "wide", "responses", "but", "may",...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/OpsAgent.java#L379-L404
train
Send a client response to the client.
Of course, here is the Java code you requested: ```java protected void sendClientResponse(PendingOpsRequest request) { byte statusCode = ClientResponse.SUCCESS; String statusString = null; /* * It is possible not to receive a table response if a feature is not enabled */ ...
jboss/jboss-jsf-api_spec
src/main/java/javax/faces/component/SelectUtils.java
SelectUtils.matchValue
static boolean matchValue(FacesContext ctx, UIComponent component, Object value, Iterator<SelectItem> items, Converter converter) { while (items.hasNext()) { SelectItem item = ite...
java
static boolean matchValue(FacesContext ctx, UIComponent component, Object value, Iterator<SelectItem> items, Converter converter) { while (items.hasNext()) { SelectItem item = ite...
[ "static", "boolean", "matchValue", "(", "FacesContext", "ctx", ",", "UIComponent", "component", ",", "Object", "value", ",", "Iterator", "<", "SelectItem", ">", "items", ",", "Converter", "converter", ")", "{", "while", "(", "items", ".", "hasNext", "(", ")"...
<p>Return <code>true</code> if the specified value matches one of the available options, performing a recursive search if if a {@link javax.faces.model.SelectItemGroup} instance is detected.</p> @param ctx {@link FacesContext} for the current request @param value {@link UIComponent} value to be tested ...
[ "<p", ">", "Return", "<code", ">", "true<", "/", "code", ">", "if", "the", "specified", "value", "matches", "one", "of", "the", "available", "options", "performing", "a", "recursive", "search", "if", "if", "a", "{", "@link", "javax", ".", "faces", ".", ...
cb33d215acbab847f2db5cdf2c6fe4d99c0a01c3
https://github.com/jboss/jboss-jsf-api_spec/blob/cb33d215acbab847f2db5cdf2c6fe4d99c0a01c3/src/main/java/javax/faces/component/SelectUtils.java#L79-L116
train
Match value.
Of course, here is the Java code you requested: ```java static boolean matchValue(FacesContext ctx, UIComponent component, Object value, Iterator<SelectItem> items, Converter converter) { wh...
jbundle/jbundle
thin/base/message/src/main/java/org/jbundle/thin/base/message/TreeMessage.java
TreeMessage.getNode
private Node getNode(Node nodeStart, String key, CreateMode createMode, boolean bReturnTextNode) { if (key.indexOf('/') != -1) { String strKeyParent = key.substring(0, key.indexOf('/')); CreateMode createModeParent = createMode; if (createModeParent == CreateMode....
java
private Node getNode(Node nodeStart, String key, CreateMode createMode, boolean bReturnTextNode) { if (key.indexOf('/') != -1) { String strKeyParent = key.substring(0, key.indexOf('/')); CreateMode createModeParent = createMode; if (createModeParent == CreateMode....
[ "private", "Node", "getNode", "(", "Node", "nodeStart", ",", "String", "key", ",", "CreateMode", "createMode", ",", "boolean", "bReturnTextNode", ")", "{", "if", "(", "key", ".", "indexOf", "(", "'", "'", ")", "!=", "-", "1", ")", "{", "String", "strKe...
Convenience method to cast data to a map. and create a map if one doesn't exist. @return The data map.
[ "Convenience", "method", "to", "cast", "data", "to", "a", "map", ".", "and", "create", "a", "map", "if", "one", "doesn", "t", "exist", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/message/src/main/java/org/jbundle/thin/base/message/TreeMessage.java#L229-L293
train
Get the node with the specified key.
Of course, here is the Java code you requested: ```java private Node getNode(Node nodeStart, String key, CreateMode createMode, boolean bReturnTextNode) { if (key.indexOf('/') != -1) { String strKeyParent = key.substring(0, key.indexOf('/')); CreateMode createModeParent = cr...
Stratio/bdt
src/main/java/com/stratio/qa/specs/SeleniumSpec.java
SeleniumSpec.seleniumDoubleClick
@When("^I double click on the element on index '(\\d+?)'$") public void seleniumDoubleClick(Integer index) throws InterruptedException { Actions action = new Actions(commonspec.getDriver()); try { assertThat(this.commonspec, commonspec.getPreviousWebElements()).as("There are less found e...
java
@When("^I double click on the element on index '(\\d+?)'$") public void seleniumDoubleClick(Integer index) throws InterruptedException { Actions action = new Actions(commonspec.getDriver()); try { assertThat(this.commonspec, commonspec.getPreviousWebElements()).as("There are less found e...
[ "@", "When", "(", "\"^I double click on the element on index '(\\\\d+?)'$\"", ")", "public", "void", "seleniumDoubleClick", "(", "Integer", "index", ")", "throws", "InterruptedException", "{", "Actions", "action", "=", "new", "Actions", "(", "commonspec", ".", "getDrive...
Double Click on an numbered {@code url} previously found element. @param index @throws InterruptedException
[ "Double", "Click", "on", "an", "numbered", "{", "@code", "url", "}", "previously", "found", "element", "." ]
55324d19e7497764ad3dd7139923e13eb9841d75
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/specs/SeleniumSpec.java#L217-L231
train
Selenium double click action.
Of course, here is the Java code you requested: ```java @When("^I double click on the element on index '(\\d+?)'$") public void seleniumDoubleClick(Integer index) throws InterruptedException { Actions action = new Actions(commonspec.getDriver()); try { assertThat(this.commonspec, common...
lucee/Lucee
core/src/main/java/lucee/runtime/op/date/DateCaster.java
DateCaster.toDateAdvanced
public static DateTime toDateAdvanced(Object o, TimeZone timeZone, DateTime defaultValue) { if (o instanceof DateTime) return (DateTime) o; else if (o instanceof Date) return new DateTimeImpl((Date) o); else if (o instanceof Castable) { return ((Castable) o).castToDateTime(defaultValue); } else if (o instance...
java
public static DateTime toDateAdvanced(Object o, TimeZone timeZone, DateTime defaultValue) { if (o instanceof DateTime) return (DateTime) o; else if (o instanceof Date) return new DateTimeImpl((Date) o); else if (o instanceof Castable) { return ((Castable) o).castToDateTime(defaultValue); } else if (o instance...
[ "public", "static", "DateTime", "toDateAdvanced", "(", "Object", "o", ",", "TimeZone", "timeZone", ",", "DateTime", "defaultValue", ")", "{", "if", "(", "o", "instanceof", "DateTime", ")", "return", "(", "DateTime", ")", "o", ";", "else", "if", "(", "o", ...
converts a Object to a DateTime Object (Advanced but slower), returns null if invalid string @param o Object to Convert @param timeZone @param defaultValue @return Date Time Object
[ "converts", "a", "Object", "to", "a", "DateTime", "Object", "(", "Advanced", "but", "slower", ")", "returns", "null", "if", "invalid", "string" ]
29b153fc4e126e5edb97da937f2ee2e231b87593
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/op/date/DateCaster.java#L118-L131
train
Convert an object to a DateTime using the default value.
Of course, here is the Java code you requested: ```java public static DateTime toDateAdvanced(Object o, TimeZone timeZone, DateTime defaultValue) { if (o instanceof DateTime) return (DateTime) o; else if (o instanceof Date) return new DateTimeImpl((Date) o); else if (o instanceof Castable) { return ((Castable)...
aws/aws-sdk-java
aws-java-sdk-iot/src/main/java/com/amazonaws/services/iot/model/ListStreamsResult.java
ListStreamsResult.setStreams
public void setStreams(java.util.Collection<StreamSummary> streams) { if (streams == null) { this.streams = null; return; } this.streams = new java.util.ArrayList<StreamSummary>(streams); }
java
public void setStreams(java.util.Collection<StreamSummary> streams) { if (streams == null) { this.streams = null; return; } this.streams = new java.util.ArrayList<StreamSummary>(streams); }
[ "public", "void", "setStreams", "(", "java", ".", "util", ".", "Collection", "<", "StreamSummary", ">", "streams", ")", "{", "if", "(", "streams", "==", "null", ")", "{", "this", ".", "streams", "=", "null", ";", "return", ";", "}", "this", ".", "str...
<p> A list of streams. </p> @param streams A list of streams.
[ "<p", ">", "A", "list", "of", "streams", ".", "<", "/", "p", ">" ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-iot/src/main/java/com/amazonaws/services/iot/model/ListStreamsResult.java#L55-L62
train
Sets the value of the streams property.
Of course, here is the Java code you requested: ```java public void setStreams(java.util.Collection<StreamSummary> streams) { if (streams == null) { this.streams = null; return; } this.streams = new java.util.ArrayList<StreamSummary>(streams); } ``` Hope this helps...
CloudSlang/cs-actions
cs-database/src/main/java/io/cloudslang/content/database/utils/SQLUtils.java
SQLUtils.computeSessionId
@NotNull public static String computeSessionId(@NotNull final String aString) { final byte[] byteData = DigestUtils.sha256(aString.getBytes()); final StringBuilder sb = new StringBuilder("SQLQuery:"); for (final byte aByteData : byteData) { final String hex = Integer.toHex...
java
@NotNull public static String computeSessionId(@NotNull final String aString) { final byte[] byteData = DigestUtils.sha256(aString.getBytes()); final StringBuilder sb = new StringBuilder("SQLQuery:"); for (final byte aByteData : byteData) { final String hex = Integer.toHex...
[ "@", "NotNull", "public", "static", "String", "computeSessionId", "(", "@", "NotNull", "final", "String", "aString", ")", "{", "final", "byte", "[", "]", "byteData", "=", "DigestUtils", ".", "sha256", "(", "aString", ".", "getBytes", "(", ")", ")", ";", ...
compute session id for JDBC operations
[ "compute", "session", "id", "for", "JDBC", "operations" ]
9a1be1e99ad88286a6c153d5f2275df6ae1a57a1
https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-database/src/main/java/io/cloudslang/content/database/utils/SQLUtils.java#L93-L106
train
Compute the session id from a string.
Of course, here is the Java code you requested: ```java @NotNull public static String computeSessionId(@NotNull final String aString) { final byte[] byteData = DigestUtils.sha256(aString.getBytes()); final StringBuilder sb = new StringBuilder("SQLQuery:"); for (final byte aByteData : ...
zaproxy/zaproxy
src/org/parosproxy/paros/network/HttpRequestHeader.java
HttpRequestHeader.setCookies
public void setCookies(List<HttpCookie> cookies) { if (cookies.isEmpty()) { setHeader(HttpHeader.COOKIE, null); } StringBuilder sbData = new StringBuilder(); for (HttpCookie c : cookies) { sbData.append(c.getName()); sbData.append('='); ...
java
public void setCookies(List<HttpCookie> cookies) { if (cookies.isEmpty()) { setHeader(HttpHeader.COOKIE, null); } StringBuilder sbData = new StringBuilder(); for (HttpCookie c : cookies) { sbData.append(c.getName()); sbData.append('='); ...
[ "public", "void", "setCookies", "(", "List", "<", "HttpCookie", ">", "cookies", ")", "{", "if", "(", "cookies", ".", "isEmpty", "(", ")", ")", "{", "setHeader", "(", "HttpHeader", ".", "COOKIE", ",", "null", ")", ";", "}", "StringBuilder", "sbData", "=...
Construct new "Cookie:" line in request header based on HttpCookies. @param cookies the new cookies
[ "Construct", "new", "Cookie", ":", "line", "in", "request", "header", "based", "on", "HttpCookies", "." ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/network/HttpRequestHeader.java#L729-L750
train
Sets the HTTP cookies.
Of course, here is the Java code you requested: ```java public void setCookies(List<HttpCookie> cookies) { if (cookies.isEmpty()) { setHeader(HttpHeader.COOKIE, null); } StringBuilder sbData = new StringBuilder(); for (HttpCookie c : cookies) { sbData.a...