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
zaproxy/zaproxy
src/org/parosproxy/paros/core/scanner/HostProcess.java
HostProcess.getRedirectionValidator
HttpRedirectionValidator getRedirectionValidator() { if (redirectionValidator == null) { redirectionValidator = redirection -> { if (!nodeInScope(redirection.getEscapedURI())) { if (log.isDebugEnabled()) { log.debug("Skipping redirecti...
java
HttpRedirectionValidator getRedirectionValidator() { if (redirectionValidator == null) { redirectionValidator = redirection -> { if (!nodeInScope(redirection.getEscapedURI())) { if (log.isDebugEnabled()) { log.debug("Skipping redirecti...
[ "HttpRedirectionValidator", "getRedirectionValidator", "(", ")", "{", "if", "(", "redirectionValidator", "==", "null", ")", "{", "redirectionValidator", "=", "redirection", "->", "{", "if", "(", "!", "nodeInScope", "(", "redirection", ".", "getEscapedURI", "(", ")...
Gets the redirection validator that ensures the followed redirections are in scan's scope. @return the redirection validator, never {@code null}. @since TODO add version @see #getRedirectRequestConfig()
[ "Gets", "the", "redirection", "validator", "that", "ensures", "the", "followed", "redirections", "are", "in", "scan", "s", "scope", "." ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/core/scanner/HostProcess.java#L822-L835
train
Gets the redirection validator.
Of course, here is the Java code you requested: ```java HttpRedirectionValidator getRedirectionValidator() { if (redirectionValidator == null) { redirectionValidator = redirection -> { if (!nodeInScope(redirection.getEscapedURI())) { if (log.isDebugEnabled())...
OpenBEL/openbel-framework
org.openbel.bel/src/main/java/org/openbel/bel/xbel/model/ObjectFactory.java
ObjectFactory.createCopyright
@XmlElementDecl(namespace = "http://belframework.org/schema/1.0/xbel", name = "copyright") public JAXBElement<String> createCopyright(String value) { return new JAXBElement<String>(_Copyright_QNAME, String.class, null, value); }
java
@XmlElementDecl(namespace = "http://belframework.org/schema/1.0/xbel", name = "copyright") public JAXBElement<String> createCopyright(String value) { return new JAXBElement<String>(_Copyright_QNAME, String.class, null, value); }
[ "@", "XmlElementDecl", "(", "namespace", "=", "\"http://belframework.org/schema/1.0/xbel\"", ",", "name", "=", "\"copyright\"", ")", "public", "JAXBElement", "<", "String", ">", "createCopyright", "(", "String", "value", ")", "{", "return", "new", "JAXBElement", "<"...
Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}}
[ "Create", "an", "instance", "of", "{", "@link", "JAXBElement", "}", "{", "@code", "<", "}", "{", "@link", "String", "}", "{", "@code", ">", "}}" ]
149f80b1d6eabb15ab15815b6f745b0afa9fd2d3
https://github.com/OpenBEL/openbel-framework/blob/149f80b1d6eabb15ab15815b6f745b0afa9fd2d3/org.openbel.bel/src/main/java/org/openbel/bel/xbel/model/ObjectFactory.java#L304-L309
train
Create an instance of a CBE License Copyright.
Of course, here is the Java code you requested: ```java @XmlElementDecl(namespace = "http://belframework.org/schema/1.0/xbel", name = "copyright") public JAXBElement<String> createCopyright(String value) { return new JAXBElement<String>(_Copyright_QNAME, String.class, null, valu...
vdmeer/skb-java-base
src/main/java/de/vandermeer/skb/base/shell/LineParser.java
LineParser.getArgs
public String getArgs(){ int count = (this.tokenPosition==0)?1:this.tokenPosition+1; String[] ar = StringUtils.split(this.line, null, count); if(ar!=null && ar.length>(this.tokenPosition)){ return StringUtils.trim(ar[this.tokenPosition]); } return null; }
java
public String getArgs(){ int count = (this.tokenPosition==0)?1:this.tokenPosition+1; String[] ar = StringUtils.split(this.line, null, count); if(ar!=null && ar.length>(this.tokenPosition)){ return StringUtils.trim(ar[this.tokenPosition]); } return null; }
[ "public", "String", "getArgs", "(", ")", "{", "int", "count", "=", "(", "this", ".", "tokenPosition", "==", "0", ")", "?", "1", ":", "this", ".", "tokenPosition", "+", "1", ";", "String", "[", "]", "ar", "=", "StringUtils", ".", "split", "(", "this...
Returns an string of all tokens that can be considered being command arguments, using the current token position. @return argument string
[ "Returns", "an", "string", "of", "all", "tokens", "that", "can", "be", "considered", "being", "command", "arguments", "using", "the", "current", "token", "position", "." ]
6d845bcc482aa9344d016e80c0c3455aeae13a13
https://github.com/vdmeer/skb-java-base/blob/6d845bcc482aa9344d016e80c0c3455aeae13a13/src/main/java/de/vandermeer/skb/base/shell/LineParser.java#L85-L92
train
Returns the argument list of the token.
Of course, here is the Java code you requested: ```java public String getArgs(){ int count = (this.tokenPosition==0)?1:this.tokenPosition+1; String[] ar = StringUtils.split(this.line, null, count); if(ar!=null && ar.length>(this.tokenPosition)){ return StringUtils.trim(ar[this.tokenPosition]); } return nu...
beangle/beangle3
commons/core/src/main/java/org/beangle/commons/collection/FastHashMap.java
FastHashMap.initialize
@SuppressWarnings("unchecked") private void initialize(int capacity) { // Find a power of 2 >= capacity int tableLength = 16; while (tableLength < capacity) { tableLength <<= 1; } // Allocates hash table. _entries = new EntryImpl[tableLength]; _mask = tableLength - 1; _capacity =...
java
@SuppressWarnings("unchecked") private void initialize(int capacity) { // Find a power of 2 >= capacity int tableLength = 16; while (tableLength < capacity) { tableLength <<= 1; } // Allocates hash table. _entries = new EntryImpl[tableLength]; _mask = tableLength - 1; _capacity =...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "private", "void", "initialize", "(", "int", "capacity", ")", "{", "// Find a power of 2 >= capacity", "int", "tableLength", "=", "16", ";", "while", "(", "tableLength", "<", "capacity", ")", "{", "tableLength", ...
Initializes this instance for the specified capacity. Once initialized, operations on this map should not create new objects (unless the map's size exceeds the specified capacity). @param capacity the initial capacity.
[ "Initializes", "this", "instance", "for", "the", "specified", "capacity", ".", "Once", "initialized", "operations", "on", "this", "map", "should", "not", "create", "new", "objects", "(", "unless", "the", "map", "s", "size", "exceeds", "the", "specified", "capa...
33df2873a5f38e28ac174a1d3b8144eb2f808e64
https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/commons/core/src/main/java/org/beangle/commons/collection/FastHashMap.java#L741-L767
train
Initializes the object.
Of course, here is the Java code you requested: ```java @SuppressWarnings("unchecked") private void initialize(int capacity) { // Find a power of 2 >= capacity int tableLength = 16; while (tableLength < capacity) { tableLength <<= 1; } // Allocates hash table. _entries = new EntryImpl[t...
eurekaclinical/eurekaclinical-common
src/main/java/org/eurekaclinical/common/comm/clients/EurekaClinicalClient.java
EurekaClinicalClient.doPostForm
protected void doPostForm(String path, MultivaluedMap<String, String> formParams) throws ClientException { doPostForm(path, formParams, null); }
java
protected void doPostForm(String path, MultivaluedMap<String, String> formParams) throws ClientException { doPostForm(path, formParams, null); }
[ "protected", "void", "doPostForm", "(", "String", "path", ",", "MultivaluedMap", "<", "String", ",", "String", ">", "formParams", ")", "throws", "ClientException", "{", "doPostForm", "(", "path", ",", "formParams", ",", "null", ")", ";", "}" ]
Submits a form. Adds appropriate Accepts and Content Type headers. @param path the API to call. @param formParams the form parameters to send. @throws ClientException if a status code other than 200 (OK) and 204 (No Content) is returned.
[ "Submits", "a", "form", ".", "Adds", "appropriate", "Accepts", "and", "Content", "Type", "headers", "." ]
1867102ff43fe94e519f76a074d5f5923e9be61c
https://github.com/eurekaclinical/eurekaclinical-common/blob/1867102ff43fe94e519f76a074d5f5923e9be61c/src/main/java/org/eurekaclinical/common/comm/clients/EurekaClinicalClient.java#L550-L552
train
Perform a POST form request.
Of course, here is the Java code you requested: ```java protected void doPostForm(String path, MultivaluedMap<String, String> formParams) throws ClientException { doPostForm(path, formParams, null); } ``` Hope this helps!
VoltDB/voltdb
third_party/java/src/org/apache/zookeeper_voltpatches/ZooKeeper.java
ZooKeeper.exists
public void exists(final String path, Watcher watcher, StatCallback cb, Object ctx) { verbotenThreadCheck(); final String clientPath = path; PathUtils.validatePath(clientPath); // the watch contains the un-chroot path WatchRegistration wcb = null; if (watcher...
java
public void exists(final String path, Watcher watcher, StatCallback cb, Object ctx) { verbotenThreadCheck(); final String clientPath = path; PathUtils.validatePath(clientPath); // the watch contains the un-chroot path WatchRegistration wcb = null; if (watcher...
[ "public", "void", "exists", "(", "final", "String", "path", ",", "Watcher", "watcher", ",", "StatCallback", "cb", ",", "Object", "ctx", ")", "{", "verbotenThreadCheck", "(", ")", ";", "final", "String", "clientPath", "=", "path", ";", "PathUtils", ".", "va...
The Asynchronous version of exists. The request doesn't actually until the asynchronous callback is called. @see #exists(String, boolean)
[ "The", "Asynchronous", "version", "of", "exists", ".", "The", "request", "doesn", "t", "actually", "until", "the", "asynchronous", "callback", "is", "called", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/apache/zookeeper_voltpatches/ZooKeeper.java#L884-L906
train
This method is called by the VFS when a file exists operation.
Of course, here is the Java code you requested: ```java public void exists(final String path, Watcher watcher, StatCallback cb, Object ctx) { verbotenThreadCheck(); final String clientPath = path; PathUtils.validatePath(clientPath); // the watch contains the un-chroot path ...
docusign/docusign-java-client
src/main/java/com/docusign/esign/api/EnvelopesApi.java
EnvelopesApi.getRecipientInitialsImage
public byte[] getRecipientInitialsImage(String accountId, String envelopeId, String recipientId) throws ApiException { return getRecipientInitialsImage(accountId, envelopeId, recipientId, null); }
java
public byte[] getRecipientInitialsImage(String accountId, String envelopeId, String recipientId) throws ApiException { return getRecipientInitialsImage(accountId, envelopeId, recipientId, null); }
[ "public", "byte", "[", "]", "getRecipientInitialsImage", "(", "String", "accountId", ",", "String", "envelopeId", ",", "String", "recipientId", ")", "throws", "ApiException", "{", "return", "getRecipientInitialsImage", "(", "accountId", ",", "envelopeId", ",", "reci...
Gets the initials image for a user. Retrieves the initials image for the specified user. The image is returned in the same format as it was uploaded. In the request you can specify if the chrome (the added line and identifier around the initial image) is returned with the image. The userId specified in the endpoint mu...
[ "Gets", "the", "initials", "image", "for", "a", "user", ".", "Retrieves", "the", "initials", "image", "for", "the", "specified", "user", ".", "The", "image", "is", "returned", "in", "the", "same", "format", "as", "it", "was", "uploaded", ".", "In", "the"...
17ae82ace0f023e98edf813be832950568212e34
https://github.com/docusign/docusign-java-client/blob/17ae82ace0f023e98edf813be832950568212e34/src/main/java/com/docusign/esign/api/EnvelopesApi.java#L3216-L3218
train
Get the initial image for a recipient
Of course, here is the Java code you requested: ```java public byte[] getRecipientInitialsImage(String accountId, String envelopeId, String recipientId) throws ApiException { return getRecipientInitialsImage(accountId, envelopeId, recipientId, null); } ``` Hope this helps!
fedups/com.obdobion.argument
src/main/java/com/obdobion/argument/variables/VariableAssigner.java
VariableAssigner.findFieldInAnyParentOrMyself
static public Field findFieldInAnyParentOrMyself( final ICmdLineArg<?> arg, final Class<?> targetClass, final String errMsg) throws ParseException { Field field = null; try { field = targetClass.getDeclaredField(arg.getVaria...
java
static public Field findFieldInAnyParentOrMyself( final ICmdLineArg<?> arg, final Class<?> targetClass, final String errMsg) throws ParseException { Field field = null; try { field = targetClass.getDeclaredField(arg.getVaria...
[ "static", "public", "Field", "findFieldInAnyParentOrMyself", "(", "final", "ICmdLineArg", "<", "?", ">", "arg", ",", "final", "Class", "<", "?", ">", "targetClass", ",", "final", "String", "errMsg", ")", "throws", "ParseException", "{", "Field", "field", "=", ...
<p> findFieldInAnyParentOrMyself. </p> @param arg a {@link com.obdobion.argument.type.ICmdLineArg} object. @param targetClass a {@link java.lang.Class} object. @param errMsg a {@link java.lang.String} object. @return a {@link java.lang.reflect.Field} object. @throws java.text.ParseException if any.
[ "<p", ">", "findFieldInAnyParentOrMyself", ".", "<", "/", "p", ">" ]
9679aebbeedaef4e592227842fa0e91410708a67
https://github.com/fedups/com.obdobion.argument/blob/9679aebbeedaef4e592227842fa0e91410708a67/src/main/java/com/obdobion/argument/variables/VariableAssigner.java#L291-L314
train
Find field in any parent class or super class.
Of course, here is the Java code you requested: ```java static public Field findFieldInAnyParentOrMyself( final ICmdLineArg<?> arg, final Class<?> targetClass, final String errMsg) throws ParseException { Field field = null; try { ...
strator-dev/greenpepper
greenpepper/greenpepper-client/src/main/java/com/greenpepper/server/rpc/xmlrpc/client/XmlRpcV2ClientImpl.java
XmlRpcV2ClientImpl.execute
public Object execute(String method, Vector params) throws XmlRpcClientExecutorException { LOGGER.debug("executing method {} , with params {}", method, params); try { return client.execute(method, params); } catch (XmlRpcException ex) { throw new XmlRpcClientExecutorException(CALL_FAILED, ex); ...
java
public Object execute(String method, Vector params) throws XmlRpcClientExecutorException { LOGGER.debug("executing method {} , with params {}", method, params); try { return client.execute(method, params); } catch (XmlRpcException ex) { throw new XmlRpcClientExecutorException(CALL_FAILED, ex); ...
[ "public", "Object", "execute", "(", "String", "method", ",", "Vector", "params", ")", "throws", "XmlRpcClientExecutorException", "{", "LOGGER", ".", "debug", "(", "\"executing method {} , with params {}\"", ",", "method", ",", "params", ")", ";", "try", "{", "retu...
{@inheritDoc}
[ "{" ]
2a61e6c179b74085babcc559d677490b0cad2d30
https://github.com/strator-dev/greenpepper/blob/2a61e6c179b74085babcc559d677490b0cad2d30/greenpepper/greenpepper-client/src/main/java/com/greenpepper/server/rpc/xmlrpc/client/XmlRpcV2ClientImpl.java#L68-L81
train
Execute an XML - RPC method.
Of course, here is the Java code you requested: ```java public Object execute(String method, Vector params) throws XmlRpcClientExecutorException { LOGGER.debug("executing method {} , with params {}", method, params); try { return client.execute(method, params); } catch (XmlRpcException ex) { th...
tvesalainen/util
util/src/main/java/org/vesalainen/nio/file/attribute/PosixHelp.java
PosixHelp.getMode
public static final short getMode(CharSequence perms) { if (perms.length() != 10) { throw new IllegalArgumentException(perms+" not permission"); } short mode = 0; for (int ii=0;ii<10;ii++) { int shift = 9-ii; switch (perms...
java
public static final short getMode(CharSequence perms) { if (perms.length() != 10) { throw new IllegalArgumentException(perms+" not permission"); } short mode = 0; for (int ii=0;ii<10;ii++) { int shift = 9-ii; switch (perms...
[ "public", "static", "final", "short", "getMode", "(", "CharSequence", "perms", ")", "{", "if", "(", "perms", ".", "length", "(", ")", "!=", "10", ")", "{", "throw", "new", "IllegalArgumentException", "(", "perms", "+", "\" not permission\"", ")", ";", "}",...
Returns mode from String. E.g. "-rwxr--r--" = 0100744. @param perms @return
[ "Returns", "mode", "from", "String", ".", "E", ".", "g", ".", "-", "rwxr", "--", "r", "--", "=", "0100744", "." ]
bba7a44689f638ffabc8be40a75bdc9a33676433
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/nio/file/attribute/PosixHelp.java#L360-L490
train
Returns the mode of COOKIE from the specified CharSequence.
Of course, here is the Java code you requested: ```java public static final short getMode(CharSequence perms) { if (perms.length() != 10) { throw new IllegalArgumentException(perms+" not permission"); } short mode = 0; for (int ii=0;ii<10;ii++) { ...
guardtime/ksi-java-sdk
ksi-common/src/main/java/com/guardtime/ksi/tlv/TLVElement.java
TLVElement.create
public static TLVElement create(int type, byte[] value) throws TLVParserException { TLVElement element = create(type); element.setContent(value); return element; }
java
public static TLVElement create(int type, byte[] value) throws TLVParserException { TLVElement element = create(type); element.setContent(value); return element; }
[ "public", "static", "TLVElement", "create", "(", "int", "type", ",", "byte", "[", "]", "value", ")", "throws", "TLVParserException", "{", "TLVElement", "element", "=", "create", "(", "type", ")", ";", "element", ".", "setContent", "(", "value", ")", ";", ...
Creates TLV element with byte array content. TLV element nonCritical and forwarded flags are set to false. @param type TLV element type. @param value value to be the content of the TLV element. @return {@link TLVElement} @throws TLVParserException
[ "Creates", "TLV", "element", "with", "byte", "array", "content", ".", "TLV", "element", "nonCritical", "and", "forwarded", "flags", "are", "set", "to", "false", "." ]
b2cd877050f0f392657c724452318d10a1002171
https://github.com/guardtime/ksi-java-sdk/blob/b2cd877050f0f392657c724452318d10a1002171/ksi-common/src/main/java/com/guardtime/ksi/tlv/TLVElement.java#L199-L203
train
Create a TLVElement with the specified type and content.
Of course, here is the Java code you requested: ```java public static TLVElement create(int type, byte[] value) throws TLVParserException { TLVElement element = create(type); element.setContent(value); return element; } ``` Hope this helps!
pedrovgs/DraggablePanel
sample/src/main/java/com/github/pedrovgs/sample/activity/PlacesSampleActivity.java
PlacesSampleActivity.initializeListView
private void initializeListView() { placesListView.setAdapter(placesAdapter); placesListView.setOnItemClickListener(new AdapterView.OnItemClickListener() { @Override public void onItemClick(AdapterView<?> adapterView, View view, int position, long id) { lastLoadedPlacePosition = position; ...
java
private void initializeListView() { placesListView.setAdapter(placesAdapter); placesListView.setOnItemClickListener(new AdapterView.OnItemClickListener() { @Override public void onItemClick(AdapterView<?> adapterView, View view, int position, long id) { lastLoadedPlacePosition = position; ...
[ "private", "void", "initializeListView", "(", ")", "{", "placesListView", ".", "setAdapter", "(", "placesAdapter", ")", ";", "placesListView", ".", "setOnItemClickListener", "(", "new", "AdapterView", ".", "OnItemClickListener", "(", ")", "{", "@", "Override", "pu...
Initialize places ListView using placesAdapter and configure OnItemClickListener.
[ "Initialize", "places", "ListView", "using", "placesAdapter", "and", "configure", "OnItemClickListener", "." ]
6b6d1806fa4140113f31307a2571bf02435aa53a
https://github.com/pedrovgs/DraggablePanel/blob/6b6d1806fa4140113f31307a2571bf02435aa53a/sample/src/main/java/com/github/pedrovgs/sample/activity/PlacesSampleActivity.java#L235-L244
train
Initialize the places list view.
Of course, here is the Java code you requested: ```java private void initializeListView() { placesListView.setAdapter(placesAdapter); placesListView.setOnItemClickListener(new AdapterView.OnItemClickListener() { @Override public void onItemClick(AdapterView<?> adapterView, View view, int position, ...
aws/aws-sdk-java
aws-java-sdk-chime/src/main/java/com/amazonaws/services/chime/model/Account.java
Account.withSupportedLicenses
public Account withSupportedLicenses(String... supportedLicenses) { if (this.supportedLicenses == null) { setSupportedLicenses(new java.util.ArrayList<String>(supportedLicenses.length)); } for (String ele : supportedLicenses) { this.supportedLicenses.add(ele); } ...
java
public Account withSupportedLicenses(String... supportedLicenses) { if (this.supportedLicenses == null) { setSupportedLicenses(new java.util.ArrayList<String>(supportedLicenses.length)); } for (String ele : supportedLicenses) { this.supportedLicenses.add(ele); } ...
[ "public", "Account", "withSupportedLicenses", "(", "String", "...", "supportedLicenses", ")", "{", "if", "(", "this", ".", "supportedLicenses", "==", "null", ")", "{", "setSupportedLicenses", "(", "new", "java", ".", "util", ".", "ArrayList", "<", "String", ">...
<p> Supported licenses for the Amazon Chime account. </p> <p> <b>NOTE:</b> This method appends the values to the existing list (if any). Use {@link #setSupportedLicenses(java.util.Collection)} or {@link #withSupportedLicenses(java.util.Collection)} if you want to override the existing values. </p> @param supportedLice...
[ "<p", ">", "Supported", "licenses", "for", "the", "Amazon", "Chime", "account", ".", "<", "/", "p", ">", "<p", ">", "<b", ">", "NOTE", ":", "<", "/", "b", ">", "This", "method", "appends", "the", "values", "to", "the", "existing", "list", "(", "if"...
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-chime/src/main/java/com/amazonaws/services/chime/model/Account.java#L418-L426
train
A list of the licenses supported by the application.
Of course, here is the Java code you requested: ```java public Account withSupportedLicenses(String... supportedLicenses) { if (this.supportedLicenses == null) { setSupportedLicenses(new java.util.ArrayList<String>(supportedLicenses.length)); } for (String ele : supportedLicenses) {...
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/TasksImpl.java
TasksImpl.updateAsync
public Observable<Void> updateAsync(String jobId, String taskId, TaskConstraints constraints, TaskUpdateOptions taskUpdateOptions) { return updateWithServiceResponseAsync(jobId, taskId, constraints, taskUpdateOptions).map(new Func1<ServiceResponseWithHeaders<Void, TaskUpdateHeaders>, Void>() { @Over...
java
public Observable<Void> updateAsync(String jobId, String taskId, TaskConstraints constraints, TaskUpdateOptions taskUpdateOptions) { return updateWithServiceResponseAsync(jobId, taskId, constraints, taskUpdateOptions).map(new Func1<ServiceResponseWithHeaders<Void, TaskUpdateHeaders>, Void>() { @Over...
[ "public", "Observable", "<", "Void", ">", "updateAsync", "(", "String", "jobId", ",", "String", "taskId", ",", "TaskConstraints", "constraints", ",", "TaskUpdateOptions", "taskUpdateOptions", ")", "{", "return", "updateWithServiceResponseAsync", "(", "jobId", ",", "...
Updates the properties of the specified task. @param jobId The ID of the job containing the task. @param taskId The ID of the task to update. @param constraints Constraints that apply to this task. If omitted, the task is given the default constraints. For multi-instance tasks, updating the retention time applies only...
[ "Updates", "the", "properties", "of", "the", "specified", "task", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/TasksImpl.java#L1511-L1518
train
Update a task. Update a task.
Of course, here is the Java code you requested: ```java public Observable<Void> updateAsync(String jobId, String taskId, TaskConstraints constraints, TaskUpdateOptions taskUpdateOptions) { return updateWithServiceResponseAsync(jobId, taskId, constraints, taskUpdateOptions).map(new Func1<ServiceResponseWithHead...
wisdom-framework/wisdom-jdbc
wisdom-jpa-manager/src/main/java/org/wisdom/framework/jpa/crud/AbstractJTACrud.java
AbstractJTACrud.delete
@Override public Iterable<T> delete(final Iterable<T> entities) { return inTransaction(new Callable<Iterable<T>>() { @Override public Iterable<T> call() throws Exception { for (T object : entities) { T attached = getAttached(object); ...
java
@Override public Iterable<T> delete(final Iterable<T> entities) { return inTransaction(new Callable<Iterable<T>>() { @Override public Iterable<T> call() throws Exception { for (T object : entities) { T attached = getAttached(object); ...
[ "@", "Override", "public", "Iterable", "<", "T", ">", "delete", "(", "final", "Iterable", "<", "T", ">", "entities", ")", "{", "return", "inTransaction", "(", "new", "Callable", "<", "Iterable", "<", "T", ">", ">", "(", ")", "{", "@", "Override", "pu...
Deletes the given entity instances. The instances are removed from the persistent layer. @param entities the entities to remove from the persistent layer @return the set of entity instances
[ "Deletes", "the", "given", "entity", "instances", ".", "The", "instances", "are", "removed", "from", "the", "persistent", "layer", "." ]
931f5acf0b2bcb0a8f3b683d60d326caafd09a72
https://github.com/wisdom-framework/wisdom-jdbc/blob/931f5acf0b2bcb0a8f3b683d60d326caafd09a72/wisdom-jpa-manager/src/main/java/org/wisdom/framework/jpa/crud/AbstractJTACrud.java#L349-L363
train
Delete the given entities.
Of course, here is the Java code you requested: ```java @Override public Iterable<T> delete(final Iterable<T> entities) { return inTransaction(new Callable<Iterable<T>>() { @Override public Iterable<T> call() throws Exception { for (T object : entities) { ...
aws/aws-sdk-java
aws-java-sdk-ssm/src/main/java/com/amazonaws/services/simplesystemsmanagement/AWSSimpleSystemsManagementClient.java
AWSSimpleSystemsManagementClient.listAssociationVersions
@Override public ListAssociationVersionsResult listAssociationVersions(ListAssociationVersionsRequest request) { request = beforeClientExecution(request); return executeListAssociationVersions(request); }
java
@Override public ListAssociationVersionsResult listAssociationVersions(ListAssociationVersionsRequest request) { request = beforeClientExecution(request); return executeListAssociationVersions(request); }
[ "@", "Override", "public", "ListAssociationVersionsResult", "listAssociationVersions", "(", "ListAssociationVersionsRequest", "request", ")", "{", "request", "=", "beforeClientExecution", "(", "request", ")", ";", "return", "executeListAssociationVersions", "(", "request", ...
<p> Retrieves all versions of an association for a specific association ID. </p> @param listAssociationVersionsRequest @return Result of the ListAssociationVersions operation returned by the service. @throws InternalServerErrorException An error occurred on the server side. @throws InvalidNextTokenException The specif...
[ "<p", ">", "Retrieves", "all", "versions", "of", "an", "association", "for", "a", "specific", "association", "ID", ".", "<", "/", "p", ">" ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-ssm/src/main/java/com/amazonaws/services/simplesystemsmanagement/AWSSimpleSystemsManagementClient.java#L5494-L5498
train
Lists the versions of an association.
Of course, here is the Java code you requested: ```java @Override public ListAssociationVersionsResult listAssociationVersions(ListAssociationVersionsRequest request) { request = beforeClientExecution(request); return executeListAssociationVersions(request); } ``` Hope this helps!
Azure/azure-storage-android
microsoft-azure-storage/src/com/microsoft/azure/storage/core/JsonUtilities.java
JsonUtilities.assertIsEndArrayJsonToken
public static void assertIsEndArrayJsonToken(final JsonParser parser) throws JsonParseException { if (!(parser.getCurrentToken() == JsonToken.END_ARRAY)) { throw new JsonParseException(SR.EXPECTED_END_ARRAY, parser.getCurrentLocation()); } }
java
public static void assertIsEndArrayJsonToken(final JsonParser parser) throws JsonParseException { if (!(parser.getCurrentToken() == JsonToken.END_ARRAY)) { throw new JsonParseException(SR.EXPECTED_END_ARRAY, parser.getCurrentLocation()); } }
[ "public", "static", "void", "assertIsEndArrayJsonToken", "(", "final", "JsonParser", "parser", ")", "throws", "JsonParseException", "{", "if", "(", "!", "(", "parser", ".", "getCurrentToken", "(", ")", "==", "JsonToken", ".", "END_ARRAY", ")", ")", "{", "throw...
* Reserved for internal use. Asserts that the token type of the parser is the end of an array. @param parser The {@link JsonParser} whose current token to check.
[ "*", "Reserved", "for", "internal", "use", ".", "Asserts", "that", "the", "token", "type", "of", "the", "parser", "is", "the", "end", "of", "an", "array", "." ]
2c643c37c6b8c9081058add284c601a2393afc93
https://github.com/Azure/azure-storage-android/blob/2c643c37c6b8c9081058add284c601a2393afc93/microsoft-azure-storage/src/com/microsoft/azure/storage/core/JsonUtilities.java#L107-L111
valid
Assert that the current token is an end array.
Of course, here is the Java code you requested: ```java public static void assertIsEndArrayJsonToken(final JsonParser parser) throws JsonParseException { if (!(parser.getCurrentToken() == JsonToken.END_ARRAY)) { throw new JsonParseException(SR.EXPECTED_END_ARRAY, parser.getCurrentLocation()); ...
alibaba/canal
client-adapter/elasticsearch/src/main/java/com/alibaba/otter/canal/client/adapter/es/support/ESTemplate.java
ESTemplate.commit
public void commit() { if (getBulk().numberOfActions() > 0) { BulkResponse response = getBulk().execute().actionGet(); if (response.hasFailures()) { for (BulkItemResponse itemResponse : response.getItems()) { if (!itemResponse.isFailed()) { ...
java
public void commit() { if (getBulk().numberOfActions() > 0) { BulkResponse response = getBulk().execute().actionGet(); if (response.hasFailures()) { for (BulkItemResponse itemResponse : response.getItems()) { if (!itemResponse.isFailed()) { ...
[ "public", "void", "commit", "(", ")", "{", "if", "(", "getBulk", "(", ")", ".", "numberOfActions", "(", ")", ">", "0", ")", "{", "BulkResponse", "response", "=", "getBulk", "(", ")", ".", "execute", "(", ")", ".", "actionGet", "(", ")", ";", "if", ...
提交批次
[ "提交批次" ]
8f088cddc0755f4350c5aaae95c6e4002d90a40f
https://github.com/alibaba/canal/blob/8f088cddc0755f4350c5aaae95c6e4002d90a40f/client-adapter/elasticsearch/src/main/java/com/alibaba/otter/canal/client/adapter/es/support/ESTemplate.java#L197-L214
train
Commit the bulk operation.
Of course, here is the Java code you requested: ```java public void commit() { if (getBulk().numberOfActions() > 0) { BulkResponse response = getBulk().execute().actionGet(); if (response.hasFailures()) { for (BulkItemResponse itemResponse : response.getItems()) { ...
moparisthebest/beehive
beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/requeststate/NameService.java
NameService.readObject
private synchronized void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); // the transient _nameMap is null after an instance of // NameService has been serialized. if (_nameMap == null) { _nameMap = new HashMap(); ...
java
private synchronized void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); // the transient _nameMap is null after an instance of // NameService has been serialized. if (_nameMap == null) { _nameMap = new HashMap(); ...
[ "private", "synchronized", "void", "readObject", "(", "ObjectInputStream", "in", ")", "throws", "IOException", ",", "ClassNotFoundException", "{", "in", ".", "defaultReadObject", "(", ")", ";", "// the transient _nameMap is null after an instance of", "// NameService has been...
Deserialize an instance of this class. @param in ObjectInputStream to deserialize from. @throws IOException @throws ClassNotFoundException
[ "Deserialize", "an", "instance", "of", "this", "class", "." ]
4246a0cc40ce3c05f1a02c2da2653ac622703d77
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/requeststate/NameService.java#L106-L114
train
Read the object from an ObjectInputStream.
Of course, here is the Java code you requested: ```java private synchronized void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); // the transient _nameMap is null after an instance of // NameService has been serialized. if (_nameMa...
jbundle/jbundle
thin/base/message/src/main/java/org/jbundle/thin/base/message/MessageFieldDesc.java
MessageFieldDesc.getPayloadPropertyNames
public Map<String, Class<?>> getPayloadPropertyNames(Map<String,Class<?>> mapPropertyNames) { mapPropertyNames = super.getPayloadPropertyNames(mapPropertyNames); if ((this.getKeyInformation() & STANDARD_PARAM) != 0) { // Add this name and class to the map of property names if (...
java
public Map<String, Class<?>> getPayloadPropertyNames(Map<String,Class<?>> mapPropertyNames) { mapPropertyNames = super.getPayloadPropertyNames(mapPropertyNames); if ((this.getKeyInformation() & STANDARD_PARAM) != 0) { // Add this name and class to the map of property names if (...
[ "public", "Map", "<", "String", ",", "Class", "<", "?", ">", ">", "getPayloadPropertyNames", "(", "Map", "<", "String", ",", "Class", "<", "?", ">", ">", "mapPropertyNames", ")", "{", "mapPropertyNames", "=", "super", ".", "getPayloadPropertyNames", "(", "...
Get the property names and classes that are part of the standard message payload. @param mapPropertyNames @return
[ "Get", "the", "property", "names", "and", "classes", "that", "are", "part", "of", "the", "standard", "message", "payload", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/message/src/main/java/org/jbundle/thin/base/message/MessageFieldDesc.java#L431-L441
train
Get the map of property names and class of the payload.
Of course, here is the Java code you requested: ```java public Map<String, Class<?>> getPayloadPropertyNames(Map<String,Class<?>> mapPropertyNames) { mapPropertyNames = super.getPayloadPropertyNames(mapPropertyNames); if ((this.getKeyInformation() & STANDARD_PARAM) != 0) { // Add this nam...
Azure/azure-sdk-for-java
network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/implementation/RoutesInner.java
RoutesInner.beginCreateOrUpdateAsync
public Observable<RouteInner> beginCreateOrUpdateAsync(String resourceGroupName, String routeTableName, String routeName, RouteInner routeParameters) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, routeTableName, routeName, routeParameters).map(new Func1<ServiceResponse<RouteInner>, Rou...
java
public Observable<RouteInner> beginCreateOrUpdateAsync(String resourceGroupName, String routeTableName, String routeName, RouteInner routeParameters) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, routeTableName, routeName, routeParameters).map(new Func1<ServiceResponse<RouteInner>, Rou...
[ "public", "Observable", "<", "RouteInner", ">", "beginCreateOrUpdateAsync", "(", "String", "resourceGroupName", ",", "String", "routeTableName", ",", "String", "routeName", ",", "RouteInner", "routeParameters", ")", "{", "return", "beginCreateOrUpdateWithServiceResponseAsyn...
Creates or updates a route in the specified route table. @param resourceGroupName The name of the resource group. @param routeTableName The name of the route table. @param routeName The name of the route. @param routeParameters Parameters supplied to the create or update route operation. @throws IllegalArgumentExcepti...
[ "Creates", "or", "updates", "a", "route", "in", "the", "specified", "route", "table", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/implementation/RoutesInner.java#L473-L480
train
Creates or updates a route.
Of course, here is the Java code you requested: ```java public Observable<RouteInner> beginCreateOrUpdateAsync(String resourceGroupName, String routeTableName, String routeName, RouteInner routeParameters) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, routeTableName, routeName, routeP...
jroyalty/jglm
src/main/java/com/hackoeur/jglm/support/FastMath.java
FastMath.pow
public static double pow(double d, int e) { if (e == 0) { return 1.0; } else if (e < 0) { e = -e; d = 1.0 / d; } // split d as two 26 bits numbers // beware the following expressions must NOT be simplified, they rely on floating point arithme...
java
public static double pow(double d, int e) { if (e == 0) { return 1.0; } else if (e < 0) { e = -e; d = 1.0 / d; } // split d as two 26 bits numbers // beware the following expressions must NOT be simplified, they rely on floating point arithme...
[ "public", "static", "double", "pow", "(", "double", "d", ",", "int", "e", ")", "{", "if", "(", "e", "==", "0", ")", "{", "return", "1.0", ";", "}", "else", "if", "(", "e", "<", "0", ")", "{", "e", "=", "-", "e", ";", "d", "=", "1.0", "/",...
Raise a double to an int power. @param d Number to raise. @param e Exponent. @return d<sup>e</sup> @since 3.1
[ "Raise", "a", "double", "to", "an", "int", "power", "." ]
9397c2fcf0d4d62844c64d0b14065ee7bf8cafc6
https://github.com/jroyalty/jglm/blob/9397c2fcf0d4d62844c64d0b14065ee7bf8cafc6/src/main/java/com/hackoeur/jglm/support/FastMath.java#L1651-L1708
train
pow - function for a double d and an int e
Of course, here is the Java code you requested: ```java public static double pow(double d, int e) { if (e == 0) { return 1.0; } else if (e < 0) { e = -e; d = 1.0 / d; } // split d as two 26 bits numbers // beware the following expressions mu...
groupon/monsoon
intf/src/main/java/com/groupon/lex/metrics/resolver/NamedResolverMap.java
NamedResolverMap.getGroupName
public GroupName getGroupName(@NonNull List<String> prefixPath, @NonNull Map<String, MetricValue> extraTags) { final Stream<String> suffixPath = data.entrySet().stream() .filter(entry -> entry.getKey().getLeft().isPresent()) // Only retain int keys. .sorted(Comparator.comparing(e...
java
public GroupName getGroupName(@NonNull List<String> prefixPath, @NonNull Map<String, MetricValue> extraTags) { final Stream<String> suffixPath = data.entrySet().stream() .filter(entry -> entry.getKey().getLeft().isPresent()) // Only retain int keys. .sorted(Comparator.comparing(e...
[ "public", "GroupName", "getGroupName", "(", "@", "NonNull", "List", "<", "String", ">", "prefixPath", ",", "@", "NonNull", "Map", "<", "String", ",", "MetricValue", ">", "extraTags", ")", "{", "final", "Stream", "<", "String", ">", "suffixPath", "=", "data...
Create a GroupName from this NamedResolverMap. @param prefixPath Additional path elements to put in front of the returned path. @param extraTags Additional tags to put in the tag set. The extraTags argument will override any values present in the NamedResolverMap. @return A group name derived from this NamedResolverMa...
[ "Create", "a", "GroupName", "from", "this", "NamedResolverMap", "." ]
eb68d72ba4c01fe018dc981097dbee033908f5c7
https://github.com/groupon/monsoon/blob/eb68d72ba4c01fe018dc981097dbee033908f5c7/intf/src/main/java/com/groupon/lex/metrics/resolver/NamedResolverMap.java#L240-L253
train
Gets the group name.
Of course, here is the Java code you requested: ```java public GroupName getGroupName(@NonNull List<String> prefixPath, @NonNull Map<String, MetricValue> extraTags) { final Stream<String> suffixPath = data.entrySet().stream() .filter(entry -> entry.getKey().getLeft().isPresent()) // Only retain...
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/functions/DifferentialFunction.java
DifferentialFunction.calculateOutputDataTypes
public List<org.nd4j.linalg.api.buffer.DataType> calculateOutputDataTypes(List<org.nd4j.linalg.api.buffer.DataType> dataTypes){ throw new UnsupportedOperationException("calculateOutputDataTypes() has not been implemented for " + getClass().getName()); }
java
public List<org.nd4j.linalg.api.buffer.DataType> calculateOutputDataTypes(List<org.nd4j.linalg.api.buffer.DataType> dataTypes){ throw new UnsupportedOperationException("calculateOutputDataTypes() has not been implemented for " + getClass().getName()); }
[ "public", "List", "<", "org", ".", "nd4j", ".", "linalg", ".", "api", ".", "buffer", ".", "DataType", ">", "calculateOutputDataTypes", "(", "List", "<", "org", ".", "nd4j", ".", "linalg", ".", "api", ".", "buffer", ".", "DataType", ">", "dataTypes", ")...
Calculate the data types for the output arrays. Though datatypes can also be inferred from {@link #calculateOutputShape()}, this method differs in that it does not require the input arrays to be populated. This is important as it allows us to do greedy datatype inference for the entire net - even if arrays are not avai...
[ "Calculate", "the", "data", "types", "for", "the", "output", "arrays", ".", "Though", "datatypes", "can", "also", "be", "inferred", "from", "{", "@link", "#calculateOutputShape", "()", "}", "this", "method", "differs", "in", "that", "it", "does", "not", "req...
effce52f2afd7eeb53c5bcca699fcd90bd06822f
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/functions/DifferentialFunction.java#L795-L797
train
This method is called to calculate the output data types for a given set of data types.
Of course, here is the Java code you requested: ```java public List<org.nd4j.linalg.api.buffer.DataType> calculateOutputDataTypes(List<org.nd4j.linalg.api.buffer.DataType> dataTypes){ throw new UnsupportedOperationException("calculateOutputDataTypes() has not been implemented for " + getClass().getName()); ...
jbundle/jbundle
main/msg/src/main/java/org/jbundle/main/msg/screen/MessageScreen.java
MessageScreen.createReplyMessage
public BaseMessage createReplyMessage(BaseMessage messageIn) { //ProductRequest productRequest = (ProductRequest)messageIn.getMessageDataDesc(null); BaseMessage replyMessage = (BaseMessage)this.getMessageProcessInfo().createReplyMessage(messageIn); //BaseProductResponse responseMess...
java
public BaseMessage createReplyMessage(BaseMessage messageIn) { //ProductRequest productRequest = (ProductRequest)messageIn.getMessageDataDesc(null); BaseMessage replyMessage = (BaseMessage)this.getMessageProcessInfo().createReplyMessage(messageIn); //BaseProductResponse responseMess...
[ "public", "BaseMessage", "createReplyMessage", "(", "BaseMessage", "messageIn", ")", "{", "//ProductRequest productRequest = (ProductRequest)messageIn.getMessageDataDesc(null);", "BaseMessage", "replyMessage", "=", "(", "BaseMessage", ")", "this", ".", "getMessageProcessInfo", "(...
Given this message in, create the reply message. @param messageIn The incomming message @return the (empty) reply message.
[ "Given", "this", "message", "in", "create", "the", "reply", "message", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/main/msg/src/main/java/org/jbundle/main/msg/screen/MessageScreen.java#L157-L169
train
Create the reply message.
Of course, here is the Java code you requested: ```java public BaseMessage createReplyMessage(BaseMessage messageIn) { //ProductRequest productRequest = (ProductRequest)messageIn.getMessageDataDesc(null); BaseMessage replyMessage = (BaseMessage)this.getMessageProcessInfo().createReplyMessage(messag...
killbilling/recurly-java-library
src/main/java/com/ning/billing/recurly/RecurlyClient.java
RecurlyClient.getCoupon
public Coupon getCoupon(final String couponCode) { if (couponCode == null || couponCode.isEmpty()) throw new RuntimeException("couponCode cannot be empty!"); return doGET(Coupon.COUPON_RESOURCE + "/" + couponCode, Coupon.class); }
java
public Coupon getCoupon(final String couponCode) { if (couponCode == null || couponCode.isEmpty()) throw new RuntimeException("couponCode cannot be empty!"); return doGET(Coupon.COUPON_RESOURCE + "/" + couponCode, Coupon.class); }
[ "public", "Coupon", "getCoupon", "(", "final", "String", "couponCode", ")", "{", "if", "(", "couponCode", "==", "null", "||", "couponCode", ".", "isEmpty", "(", ")", ")", "throw", "new", "RuntimeException", "(", "\"couponCode cannot be empty!\"", ")", ";", "re...
Get a Coupon <p> @param couponCode The code for the {@link Coupon} @return The {@link Coupon} object as identified by the passed in code
[ "Get", "a", "Coupon", "<p", ">" ]
5e05eedd91885a51e1aa8293bd41139d082cf7f4
https://github.com/killbilling/recurly-java-library/blob/5e05eedd91885a51e1aa8293bd41139d082cf7f4/src/main/java/com/ning/billing/recurly/RecurlyClient.java#L1556-L1561
train
Get a Coupon object by coupon code.
Of course, here is the Java code you requested: ```java public Coupon getCoupon(final String couponCode) { if (couponCode == null || couponCode.isEmpty()) throw new RuntimeException("couponCode cannot be empty!"); return doGET(Coupon.COUPON_RESOURCE + "/" + couponCode, Coupon.class); }...
Red5/red5-io
src/main/java/org/red5/io/matroska/parser/TagCrawler.java
TagCrawler.process
public void process(InputStream input) throws IOException, ConverterException { while (0 != input.available()) { Tag tag = ParserUtils.parseTag(input); TagHandler handler = getHandler(tag); if (null == handler) { skipHandler.handle(tag, input); } e...
java
public void process(InputStream input) throws IOException, ConverterException { while (0 != input.available()) { Tag tag = ParserUtils.parseTag(input); TagHandler handler = getHandler(tag); if (null == handler) { skipHandler.handle(tag, input); } e...
[ "public", "void", "process", "(", "InputStream", "input", ")", "throws", "IOException", ",", "ConverterException", "{", "while", "(", "0", "!=", "input", ".", "available", "(", ")", ")", "{", "Tag", "tag", "=", "ParserUtils", ".", "parseTag", "(", "input",...
Method to process the input stream given, will stop as soon as input stream will be empty @param input - input stream to process @throws IOException - in case of any IO errors @throws ConverterException - in case of any conversion errorss
[ "Method", "to", "process", "the", "input", "stream", "given", "will", "stop", "as", "soon", "as", "input", "stream", "will", "be", "empty" ]
9bbbc506423c5a8f18169d46d400df56c0072a33
https://github.com/Red5/red5-io/blob/9bbbc506423c5a8f18169d46d400df56c0072a33/src/main/java/org/red5/io/matroska/parser/TagCrawler.java#L121-L131
train
Process the input stream.
Of course, here is the Java code you requested: ```java public void process(InputStream input) throws IOException, ConverterException { while (0 != input.available()) { Tag tag = ParserUtils.parseTag(input); TagHandler handler = getHandler(tag); if (null == handler) { ...
ops4j/org.ops4j.pax.wicket
service/src/main/java/org/ops4j/pax/wicket/spi/support/AbstractPaxWicketInjector.java
AbstractPaxWicketInjector.countComponentContainPaxWicketBeanAnnotatedFieldsHierachical
protected Set<String> countComponentContainPaxWicketBeanAnnotatedFieldsHierachical(Class<?> component) { Set<String> foundAnnotation = new HashSet<String>(); Class<?> clazz = component; while (clazz != null && !isBoundaryClass(clazz)) { for (Field field : clazz.getDeclaredFields()) {...
java
protected Set<String> countComponentContainPaxWicketBeanAnnotatedFieldsHierachical(Class<?> component) { Set<String> foundAnnotation = new HashSet<String>(); Class<?> clazz = component; while (clazz != null && !isBoundaryClass(clazz)) { for (Field field : clazz.getDeclaredFields()) {...
[ "protected", "Set", "<", "String", ">", "countComponentContainPaxWicketBeanAnnotatedFieldsHierachical", "(", "Class", "<", "?", ">", "component", ")", "{", "Set", "<", "String", ">", "foundAnnotation", "=", "new", "HashSet", "<", "String", ">", "(", ")", ";", ...
<p>countComponentContainPaxWicketBeanAnnotatedFieldsHierachical.</p> @param component a {@link java.lang.Class} object. @return a {@link java.util.Set} object.
[ "<p", ">", "countComponentContainPaxWicketBeanAnnotatedFieldsHierachical", ".", "<", "/", "p", ">" ]
ef7cb4bdf918e9e61ec69789b9c690567616faa9
https://github.com/ops4j/org.ops4j.pax.wicket/blob/ef7cb4bdf918e9e61ec69789b9c690567616faa9/service/src/main/java/org/ops4j/pax/wicket/spi/support/AbstractPaxWicketInjector.java#L134-L146
train
Count the fields annotated with Inject. class in the component.
Of course, here is the Java code you requested: ```java protected Set<String> countComponentContainPaxWicketBeanAnnotatedFieldsHierachical(Class<?> component) { Set<String> foundAnnotation = new HashSet<String>(); Class<?> clazz = component; while (clazz != null && !isBoundaryClass(clazz)) { ...
CenturyLinkCloud/mdw
mdw-workflow/src/com/centurylink/mdw/workflow/adapter/socket/SocketAdapter.java
SocketAdapter.invoke
@Override public String invoke(Object connection, String request, int timeout, Map<String,String> metainfo) throws ConnectionException, AdapterException { String response; try{ if (timeout<=0) timeout = DEFAULT_TIMEOUT; SoccomClient client = (SoccomClient)connection; ...
java
@Override public String invoke(Object connection, String request, int timeout, Map<String,String> metainfo) throws ConnectionException, AdapterException { String response; try{ if (timeout<=0) timeout = DEFAULT_TIMEOUT; SoccomClient client = (SoccomClient)connection; ...
[ "@", "Override", "public", "String", "invoke", "(", "Object", "connection", ",", "String", "request", ",", "int", "timeout", ",", "Map", "<", "String", ",", "String", ">", "metainfo", ")", "throws", "ConnectionException", ",", "AdapterException", "{", "String"...
This method must be implemented for PoolableAdapter
[ "This", "method", "must", "be", "implemented", "for", "PoolableAdapter" ]
91167fe65a25a5d7022cdcf8b0fae8506f5b87ce
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-workflow/src/com/centurylink/mdw/workflow/adapter/socket/SocketAdapter.java#L89-L104
train
Invoke a request on a server.
Of course, here is the Java code you requested: ```java @Override public String invoke(Object connection, String request, int timeout, Map<String,String> metainfo) throws ConnectionException, AdapterException { String response; try{ if (timeout<=0) timeout = DEFAULT_TIMEOUT; ...
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/transformer/TransformerHandlerImpl.java
TransformerHandlerImpl.elementDecl
public void elementDecl(String name, String model) throws SAXException { if (DEBUG) System.out.println("TransformerHandlerImpl#elementDecl: " + name + ", " + model); if (null != m_declHandler) { m_declHandler.elementDecl(name, model); } }
java
public void elementDecl(String name, String model) throws SAXException { if (DEBUG) System.out.println("TransformerHandlerImpl#elementDecl: " + name + ", " + model); if (null != m_declHandler) { m_declHandler.elementDecl(name, model); } }
[ "public", "void", "elementDecl", "(", "String", "name", ",", "String", "model", ")", "throws", "SAXException", "{", "if", "(", "DEBUG", ")", "System", ".", "out", ".", "println", "(", "\"TransformerHandlerImpl#elementDecl: \"", "+", "name", "+", "\", \"", "+",...
Report an element type declaration. <p>The content model will consist of the string "EMPTY", the string "ANY", or a parenthesised group, optionally followed by an occurrence indicator. The model will be normalized so that all whitespace is removed,and will include the enclosing parentheses.</p> @param name The eleme...
[ "Report", "an", "element", "type", "declaration", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/transformer/TransformerHandlerImpl.java#L935-L946
train
Method called to process an element declaration.
Of course, here is the Java code you requested: ```java public void elementDecl(String name, String model) throws SAXException { if (DEBUG) System.out.println("TransformerHandlerImpl#elementDecl: " + name + ", " + model); if (null != m_declHandler) { m_declHandler.e...
cybazeitalia/emaze-dysfunctional
src/main/java/net/emaze/dysfunctional/Consumers.java
Consumers.first
public static <E> E first(E[] array) { return new FirstElement<E>().apply(new ArrayIterator<>(array)); }
java
public static <E> E first(E[] array) { return new FirstElement<E>().apply(new ArrayIterator<>(array)); }
[ "public", "static", "<", "E", ">", "E", "first", "(", "E", "[", "]", "array", ")", "{", "return", "new", "FirstElement", "<", "E", ">", "(", ")", ".", "apply", "(", "new", "ArrayIterator", "<>", "(", "array", ")", ")", ";", "}" ]
Yields the first element of the array. @param <E> the element type parameter @param array the array to be searched @throws IllegalArgumentException if no element matches @return the found element
[ "Yields", "the", "first", "element", "of", "the", "array", "." ]
98115a436e35335c5e8831f9fdc12f6d93d524be
https://github.com/cybazeitalia/emaze-dysfunctional/blob/98115a436e35335c5e8831f9fdc12f6d93d524be/src/main/java/net/emaze/dysfunctional/Consumers.java#L405-L407
train
Returns the first element of the array.
Of course, here is the Java code you requested: ```java public static <E> E first(E[] array) { return new FirstElement<E>().apply(new ArrayIterator<>(array)); } ``` Hope this helps!
UrielCh/ovh-java-sdk
ovh-java-sdk-xdsl/src/main/java/net/minidev/ovh/api/ApiOvhXdsl.java
ApiOvhXdsl.serviceName_modem_availableWLANChannel_GET
public ArrayList<Long> serviceName_modem_availableWLANChannel_GET(String serviceName, OvhWLANFrequencyEnum frequency) throws IOException { String qPath = "/xdsl/{serviceName}/modem/availableWLANChannel"; StringBuilder sb = path(qPath, serviceName); query(sb, "frequency", frequency); String resp = exec(qPath, "G...
java
public ArrayList<Long> serviceName_modem_availableWLANChannel_GET(String serviceName, OvhWLANFrequencyEnum frequency) throws IOException { String qPath = "/xdsl/{serviceName}/modem/availableWLANChannel"; StringBuilder sb = path(qPath, serviceName); query(sb, "frequency", frequency); String resp = exec(qPath, "G...
[ "public", "ArrayList", "<", "Long", ">", "serviceName_modem_availableWLANChannel_GET", "(", "String", "serviceName", ",", "OvhWLANFrequencyEnum", "frequency", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/xdsl/{serviceName}/modem/availableWLANChannel\"", ";",...
List available WLAN channel for this modem REST: GET /xdsl/{serviceName}/modem/availableWLANChannel @param frequency [required] WLAN frequency you want to retrieve channels @param serviceName [required] The internal name of your XDSL offer
[ "List", "available", "WLAN", "channel", "for", "this", "modem" ]
6d531a40e56e09701943e334c25f90f640c55701
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-xdsl/src/main/java/net/minidev/ovh/api/ApiOvhXdsl.java#L760-L766
train
List available WLAN channel
Of course, here is the Java code you requested: ```java public ArrayList<Long> serviceName_modem_availableWLANChannel_GET(String serviceName, OvhWLANFrequencyEnum frequency) throws IOException { String qPath = "/xdsl/{serviceName}/modem/availableWLANChannel"; StringBuilder sb = path(qPath, serviceName); query(sb...
aol/cyclops
cyclops-anym/src/main/java/cyclops/monads/transformers/StreamT.java
StreamT.sorted
@Override public StreamT<W,T> sorted(final Comparator<? super T> c) { return (StreamT<W,T>) FoldableTransformerSeq.super.sorted(c); }
java
@Override public StreamT<W,T> sorted(final Comparator<? super T> c) { return (StreamT<W,T>) FoldableTransformerSeq.super.sorted(c); }
[ "@", "Override", "public", "StreamT", "<", "W", ",", "T", ">", "sorted", "(", "final", "Comparator", "<", "?", "super", "T", ">", "c", ")", "{", "return", "(", "StreamT", "<", "W", ",", "T", ">", ")", "FoldableTransformerSeq", ".", "super", ".", "s...
/* (non-Javadoc) @see cyclops2.monads.transformers.values.ListT#sorted(java.util.Comparator)
[ "/", "*", "(", "non", "-", "Javadoc", ")" ]
59a9fde30190a4d1faeb9f6d9851d209d82b81dd
https://github.com/aol/cyclops/blob/59a9fde30190a4d1faeb9f6d9851d209d82b81dd/cyclops-anym/src/main/java/cyclops/monads/transformers/StreamT.java#L462-L466
train
Returns a new stream that is sorted by the given Comparator.
Of course, here is the Java code you requested: ```java @Override public StreamT<W,T> sorted(final Comparator<? super T> c) { return (StreamT<W,T>) FoldableTransformerSeq.super.sorted(c); } ``` Hope this helps!
leanix/leanix-sdk-java
src/main/java/net/leanix/api/GraphqlApi.java
GraphqlApi.processGraphQLMultipart
public GraphQLResult processGraphQLMultipart(String graphQLRequest, File file) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'graphQLRequest' is set if (graphQLRequest == null) { throw new ApiException(400, "Missing the required parameter 'graphQLRequest' ...
java
public GraphQLResult processGraphQLMultipart(String graphQLRequest, File file) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'graphQLRequest' is set if (graphQLRequest == null) { throw new ApiException(400, "Missing the required parameter 'graphQLRequest' ...
[ "public", "GraphQLResult", "processGraphQLMultipart", "(", "String", "graphQLRequest", ",", "File", "file", ")", "throws", "ApiException", "{", "Object", "localVarPostBody", "=", "null", ";", "// verify the required parameter 'graphQLRequest' is set", "if", "(", "graphQLReq...
processGraphQLMultipart Processes GraphQL requests, supporting multipart documents @param graphQLRequest (required) @param file (required) @return GraphQLResult @throws ApiException if fails to make API call
[ "processGraphQLMultipart", "Processes", "GraphQL", "requests", "supporting", "multipart", "documents" ]
9516ac593d6a8f73baccc516a45877b4e5920c47
https://github.com/leanix/leanix-sdk-java/blob/9516ac593d6a8f73baccc516a45877b4e5920c47/src/main/java/net/leanix/api/GraphqlApi.java#L88-L130
test
Process a GraphQLMultipart
Of course, here is the Java code you requested: ```java public GraphQLResult processGraphQLMultipart(String graphQLRequest, File file) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'graphQLRequest' is set if (graphQLRequest == null) { throw new ApiExcepti...
stratosphere/stratosphere
stratosphere-core/src/main/java/eu/stratosphere/api/common/operators/Ordering.java
Ordering.isMetBy
public boolean isMetBy(Ordering otherOrdering) { if (otherOrdering == null || this.indexes.size() > otherOrdering.indexes.size()) { return false; } for (int i = 0; i < this.indexes.size(); i++) { if (this.indexes.get(i) != otherOrdering.indexes.get(i)) { return false; } // if this one reque...
java
public boolean isMetBy(Ordering otherOrdering) { if (otherOrdering == null || this.indexes.size() > otherOrdering.indexes.size()) { return false; } for (int i = 0; i < this.indexes.size(); i++) { if (this.indexes.get(i) != otherOrdering.indexes.get(i)) { return false; } // if this one reque...
[ "public", "boolean", "isMetBy", "(", "Ordering", "otherOrdering", ")", "{", "if", "(", "otherOrdering", "==", "null", "||", "this", ".", "indexes", ".", "size", "(", ")", ">", "otherOrdering", ".", "indexes", ".", "size", "(", ")", ")", "{", "return", ...
--------------------------------------------------------------------------------------------
[ "--------------------------------------------------------------------------------------------" ]
c543a08f9676c5b2b0a7088123bd6e795a8ae0c8
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-core/src/main/java/eu/stratosphere/api/common/operators/Ordering.java#L135-L159
train
Checks if the two ordering objects are met by the other one.
Of course, here is the Java code you requested: ```java public boolean isMetBy(Ordering otherOrdering) { if (otherOrdering == null || this.indexes.size() > otherOrdering.indexes.size()) { return false; } for (int i = 0; i < this.indexes.size(); i++) { if (this.indexes.get(i) != otherOrdering.indexes.get...
kiegroup/droolsjbpm-tools
drools-eclipse/org.guvnor.eclipse.webdav/src/kernel/org/eclipse/webdav/internal/kernel/Precondition.java
Precondition.addCondition
public void addCondition(Condition condition) throws WebDAVException { // a Resource URI can only be specified once in a Precondition Enumeration conditions = getConditions(); if (condition.getResourceURI() != null) { while (conditions.hasMoreElements()) { Condition e...
java
public void addCondition(Condition condition) throws WebDAVException { // a Resource URI can only be specified once in a Precondition Enumeration conditions = getConditions(); if (condition.getResourceURI() != null) { while (conditions.hasMoreElements()) { Condition e...
[ "public", "void", "addCondition", "(", "Condition", "condition", ")", "throws", "WebDAVException", "{", "// a Resource URI can only be specified once in a Precondition", "Enumeration", "conditions", "=", "getConditions", "(", ")", ";", "if", "(", "condition", ".", "getRes...
Add a Condition to this Precondition. Conditions are OR'd together to check for a matching resource. @param condition the Condition to add @exception WebDAVException thrown if the precondition already contains this condition
[ "Add", "a", "Condition", "to", "this", "Precondition", ".", "Conditions", "are", "OR", "d", "together", "to", "check", "for", "a", "matching", "resource", "." ]
05e1f73c591178360a198dca29f99d73918991db
https://github.com/kiegroup/droolsjbpm-tools/blob/05e1f73c591178360a198dca29f99d73918991db/drools-eclipse/org.guvnor.eclipse.webdav/src/kernel/org/eclipse/webdav/internal/kernel/Precondition.java#L94-L105
test
Adds a new condition to the set of conditions.
Of course, here is the Java code you requested: ```java public void addCondition(Condition condition) throws WebDAVException { // a Resource URI can only be specified once in a Precondition Enumeration conditions = getConditions(); if (condition.getResourceURI() != null) { while (co...
Enterprise-Content-Management/infoarchive-sip-sdk
yaml/src/main/java/com/opentext/ia/yaml/configuration/zip/ZipBuilder.java
ZipBuilder.replace
public void replace(File file, boolean preserveExternalFileName, String text) { String path = entries.containsKey(file) ? entries.remove(file) : zipPathFor(file, preserveExternalFileName); entries.put(text, path); }
java
public void replace(File file, boolean preserveExternalFileName, String text) { String path = entries.containsKey(file) ? entries.remove(file) : zipPathFor(file, preserveExternalFileName); entries.put(text, path); }
[ "public", "void", "replace", "(", "File", "file", ",", "boolean", "preserveExternalFileName", ",", "String", "text", ")", "{", "String", "path", "=", "entries", ".", "containsKey", "(", "file", ")", "?", "entries", ".", "remove", "(", "file", ")", ":", "...
Replace the contents of a file with a different text. @param file The file for which to replace the content @param preserveExternalFileName Whether external file names are to be preserved as much as possible, or whether they should be replaced with unique numbers @param text The new content to include in the ZIP
[ "Replace", "the", "contents", "of", "a", "file", "with", "a", "different", "text", "." ]
3c84a4d9ce569139e9a442034526944d3e63436e
https://github.com/Enterprise-Content-Management/infoarchive-sip-sdk/blob/3c84a4d9ce569139e9a442034526944d3e63436e/yaml/src/main/java/com/opentext/ia/yaml/configuration/zip/ZipBuilder.java#L119-L122
test
Replaces the text of a file with a zip file.
Of course, here is the Java code you requested: ```java public void replace(File file, boolean preserveExternalFileName, String text) { String path = entries.containsKey(file) ? entries.remove(file) : zipPathFor(file, preserveExternalFileName); entries.put(text, path); } ``` Hope this helps!
eFaps/eFaps-WebApp
src/main/java/org/efaps/ui/wicket/behaviors/AjaxFieldUpdateBehavior.java
AjaxFieldUpdateBehavior.renderHead
@Override public void renderHead(final Component _component, final IHeaderResponse _response) { super.renderHead(_component, _response); _response.render(AbstractEFapsHeaderItem.forJavaScript(AjaxFieldUpdateBehavior.JS)); }
java
@Override public void renderHead(final Component _component, final IHeaderResponse _response) { super.renderHead(_component, _response); _response.render(AbstractEFapsHeaderItem.forJavaScript(AjaxFieldUpdateBehavior.JS)); }
[ "@", "Override", "public", "void", "renderHead", "(", "final", "Component", "_component", ",", "final", "IHeaderResponse", "_response", ")", "{", "super", ".", "renderHead", "(", "_component", ",", "_response", ")", ";", "_response", ".", "render", "(", "Abstr...
Render to the web response the eFapsContentReference. @param _response Response object
[ "Render", "to", "the", "web", "response", "the", "eFapsContentReference", "." ]
785c1aba0860dd65c673f123214fbe8c24ebdb17
https://github.com/eFaps/eFaps-WebApp/blob/785c1aba0860dd65c673f123214fbe8c24ebdb17/src/main/java/org/efaps/ui/wicket/behaviors/AjaxFieldUpdateBehavior.java#L130-L136
valid
Override renderHead to render the header.
Of course, here is the Java code you requested: ```java @Override public void renderHead(final Component _component, final IHeaderResponse _response) { super.renderHead(_component, _response); _response.render(AbstractEFapsHeaderItem.forJavaScript(AjaxFieldUpdateBehav...
w3c/epubcheck
src/main/java/org/idpf/epubcheck/util/css/CssReader.java
CssReader.at
int at(int n) throws IOException { Mark mark = mark(); List<Integer> cbuf = Lists.newArrayList(); for (int i = 0; i < n; i++) { cbuf.add(next()); if (curChar == -1) { break; } } unread(cbuf, mark); return cbuf.get(cbuf.size() - 1); }
java
int at(int n) throws IOException { Mark mark = mark(); List<Integer> cbuf = Lists.newArrayList(); for (int i = 0; i < n; i++) { cbuf.add(next()); if (curChar == -1) { break; } } unread(cbuf, mark); return cbuf.get(cbuf.size() - 1); }
[ "int", "at", "(", "int", "n", ")", "throws", "IOException", "{", "Mark", "mark", "=", "mark", "(", ")", ";", "List", "<", "Integer", ">", "cbuf", "=", "Lists", ".", "newArrayList", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<",...
Peek and return the character at position n from current position, or -1 if EOF is reached before or at that position.
[ "Peek", "and", "return", "the", "character", "at", "position", "n", "from", "current", "position", "or", "-", "1", "if", "EOF", "is", "reached", "before", "or", "at", "that", "position", "." ]
4d5a24d9f2878a2a5497eb11c036cc18fe2c0a78
https://github.com/w3c/epubcheck/blob/4d5a24d9f2878a2a5497eb11c036cc18fe2c0a78/src/main/java/org/idpf/epubcheck/util/css/CssReader.java#L223-L238
train
at n
Of course, here is the Java code you requested: ```java int at(int n) throws IOException { Mark mark = mark(); List<Integer> cbuf = Lists.newArrayList(); for (int i = 0; i < n; i++) { cbuf.add(next()); if (curChar == -1) { break; } } unread(cbuf, mark); ...
ricksbrown/cowsay
src/main/java/com/github/ricksbrown/cowsay/Cowsay.java
Cowsay.getCowFace
private static CowFace getCowFace(final CommandLine commandLine) { CowFace cowFace; cowFace = new CowFace(); if (commandLine.hasOption(CowsayCli.Opt.EYES.toString())) { cowFace.setEyes(commandLine.getOptionValue(CowsayCli.Opt.EYES.toString())); } if (commandLine.hasOption(CowsayCli.Opt.TONGUE.toString())) ...
java
private static CowFace getCowFace(final CommandLine commandLine) { CowFace cowFace; cowFace = new CowFace(); if (commandLine.hasOption(CowsayCli.Opt.EYES.toString())) { cowFace.setEyes(commandLine.getOptionValue(CowsayCli.Opt.EYES.toString())); } if (commandLine.hasOption(CowsayCli.Opt.TONGUE.toString())) ...
[ "private", "static", "CowFace", "getCowFace", "(", "final", "CommandLine", "commandLine", ")", "{", "CowFace", "cowFace", ";", "cowFace", "=", "new", "CowFace", "(", ")", ";", "if", "(", "commandLine", ".", "hasOption", "(", "CowsayCli", ".", "Opt", ".", "...
Get a regular cow face optionally formatted with custom eyes and tongue from the command line. @param commandLine The command line with user options. @return A regular cowface, possibly formatted with custom tongue and/or eyes.
[ "Get", "a", "regular", "cow", "face", "optionally", "formatted", "with", "custom", "eyes", "and", "tongue", "from", "the", "command", "line", "." ]
a18e4185090835e971d97fa178191ffc2e794b3c
https://github.com/ricksbrown/cowsay/blob/a18e4185090835e971d97fa178191ffc2e794b3c/src/main/java/com/github/ricksbrown/cowsay/Cowsay.java#L163-L173
valid
Get CowFace object from command line options.
Of course, here is the Java code you requested: ```java private static CowFace getCowFace(final CommandLine commandLine) { CowFace cowFace; cowFace = new CowFace(); if (commandLine.hasOption(CowsayCli.Opt.EYES.toString())) { cowFace.setEyes(commandLine.getOptionValue(CowsayCli.Opt.EYES.toString())); } if ...
RestComm/jain-slee.xcap
resources/xcap-client/api/src/main/java/org/restcomm/xcap/client/impl/XcapClientImpl.java
XcapClientImpl.get
public XcapResponse get(URI uri, Header[] additionalRequestHeaders, Credentials credentials) throws IOException { if (log.isDebugEnabled()) { log.debug("get(uri=" + uri + " , additionalRequestHeaders = ( " + Arrays.toString(additionalRequestHeaders) + " ) )"); } return execute(new HttpGet(uri...
java
public XcapResponse get(URI uri, Header[] additionalRequestHeaders, Credentials credentials) throws IOException { if (log.isDebugEnabled()) { log.debug("get(uri=" + uri + " , additionalRequestHeaders = ( " + Arrays.toString(additionalRequestHeaders) + " ) )"); } return execute(new HttpGet(uri...
[ "public", "XcapResponse", "get", "(", "URI", "uri", ",", "Header", "[", "]", "additionalRequestHeaders", ",", "Credentials", "credentials", ")", "throws", "IOException", "{", "if", "(", "log", ".", "isDebugEnabled", "(", ")", ")", "{", "log", ".", "debug", ...
/* (non-Javadoc) @see XcapClient#get(java.net.URI, Header[], Credentials)
[ "/", "*", "(", "non", "-", "Javadoc", ")" ]
0caa9ab481a545e52c31401f19e99bdfbbfb7bf0
https://github.com/RestComm/jain-slee.xcap/blob/0caa9ab481a545e52c31401f19e99bdfbbfb7bf0/resources/xcap-client/api/src/main/java/org/restcomm/xcap/client/impl/XcapClientImpl.java#L218-L227
train
Executes a GET request on the given URI.
Of course, here is the Java code you requested: ```java public XcapResponse get(URI uri, Header[] additionalRequestHeaders, Credentials credentials) throws IOException { if (log.isDebugEnabled()) { log.debug("get(uri=" + uri + " , additionalRequestHeaders = ( " + Arrays.toString(additionalRequestHea...
apptentive/apptentive-android
apptentive/src/main/java/com/apptentive/android/sdk/module/engagement/interaction/fragment/MessageCenterFragment.java
MessageCenterFragment.prepareMessages
private void prepareMessages(final List<MessageCenterListItem> originalItems) { assertMainThread(); listItems.clear(); unsentMessagesCount = 0; // Loop through each message item retrieved from database for (MessageCenterListItem item : originalItems) { if (item instanceof ApptentiveMessage) { Apptenti...
java
private void prepareMessages(final List<MessageCenterListItem> originalItems) { assertMainThread(); listItems.clear(); unsentMessagesCount = 0; // Loop through each message item retrieved from database for (MessageCenterListItem item : originalItems) { if (item instanceof ApptentiveMessage) { Apptenti...
[ "private", "void", "prepareMessages", "(", "final", "List", "<", "MessageCenterListItem", ">", "originalItems", ")", "{", "assertMainThread", "(", ")", ";", "listItems", ".", "clear", "(", ")", ";", "unsentMessagesCount", "=", "0", ";", "// Loop through each messa...
/* Messages returned from the database was sorted on KEY_ID, which was generated by server with seconds resolution. If messages were received by server within a second, messages may be out of order This method uses insertion sort to re-sort the messages retrieved from the database
[ "/", "*", "Messages", "returned", "from", "the", "database", "was", "sorted", "on", "KEY_ID", "which", "was", "generated", "by", "server", "with", "seconds", "resolution", ".", "If", "messages", "were", "received", "by", "server", "within", "a", "second", "m...
887c08d7bd5ae6488a90366dfb58f58938861a93
https://github.com/apptentive/apptentive-android/blob/887c08d7bd5ae6488a90366dfb58f58938861a93/apptentive/src/main/java/com/apptentive/android/sdk/module/engagement/interaction/fragment/MessageCenterFragment.java#L1275-L1318
train
Prepare the list of messages to be sent.
Of course, here is the Java code you requested: ```java private void prepareMessages(final List<MessageCenterListItem> originalItems) { assertMainThread(); listItems.clear(); unsentMessagesCount = 0; // Loop through each message item retrieved from database for (MessageCenterListItem item : originalItems) {...
datastax/java-driver
query-builder/src/main/java/com/datastax/oss/driver/api/querybuilder/QueryBuilder.java
QueryBuilder.remainder
@NonNull public static Term remainder(@NonNull Term left, @NonNull Term right) { return new BinaryArithmeticTerm(ArithmeticOperator.REMAINDER, left, right); }
java
@NonNull public static Term remainder(@NonNull Term left, @NonNull Term right) { return new BinaryArithmeticTerm(ArithmeticOperator.REMAINDER, left, right); }
[ "@", "NonNull", "public", "static", "Term", "remainder", "(", "@", "NonNull", "Term", "left", ",", "@", "NonNull", "Term", "right", ")", "{", "return", "new", "BinaryArithmeticTerm", "(", "ArithmeticOperator", ".", "REMAINDER", ",", "left", ",", "right", ")"...
The remainder of two terms, as in {@code WHERE k = left % right}.
[ "The", "remainder", "of", "two", "terms", "as", "in", "{" ]
612a63f2525618e2020e86c9ad75ab37adba6132
https://github.com/datastax/java-driver/blob/612a63f2525618e2020e86c9ad75ab37adba6132/query-builder/src/main/java/com/datastax/oss/driver/api/querybuilder/QueryBuilder.java#L213-L216
train
Returns the remainder of two tokens.
Of course, here is the Java code you requested: ```java @NonNull public static Term remainder(@NonNull Term left, @NonNull Term right) { return new BinaryArithmeticTerm(ArithmeticOperator.REMAINDER, left, right); } ``` Hope this helps!
kiegroup/drools
drools-templates/src/main/java/org/drools/template/DataProviderCompiler.java
DataProviderCompiler.compile
public String compile(final DataProvider dataProvider, final String template, boolean replaceOptionals) { final InputStream templateStream = this.getClass().getResourceAsStream(template); return compile(dataProvider, templateStre...
java
public String compile(final DataProvider dataProvider, final String template, boolean replaceOptionals) { final InputStream templateStream = this.getClass().getResourceAsStream(template); return compile(dataProvider, templateStre...
[ "public", "String", "compile", "(", "final", "DataProvider", "dataProvider", ",", "final", "String", "template", ",", "boolean", "replaceOptionals", ")", "{", "final", "InputStream", "templateStream", "=", "this", ".", "getClass", "(", ")", ".", "getResourceAsStre...
Generates DRL from a data provider for the spreadsheet data and templates. @param dataProvider the data provider for the spreadsheet data @param template the string containing the template resource name @return the generated DRL text as a String
[ "Generates", "DRL", "from", "a", "data", "provider", "for", "the", "spreadsheet", "data", "and", "templates", "." ]
22b0275d6dbe93070b8090948502cf46eda543c4
https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-templates/src/main/java/org/drools/template/DataProviderCompiler.java#L79-L85
train
Compile a template.
Of course, here is the Java code you requested: ```java public String compile(final DataProvider dataProvider, final String template, boolean replaceOptionals) { final InputStream templateStream = this.getClass().getResourceAsStream(template); return ...
knightliao/disconf
disconf-client/src/main/java/com/baidu/disconf/client/support/utils/StringUtil.java
StringUtil.defaultIfEmpty
public static String defaultIfEmpty(String str, String defaultStr) { return str == null || str.length() == 0 ? defaultStr : str; }
java
public static String defaultIfEmpty(String str, String defaultStr) { return str == null || str.length() == 0 ? defaultStr : str; }
[ "public", "static", "String", "defaultIfEmpty", "(", "String", "str", ",", "String", "defaultStr", ")", "{", "return", "str", "==", "null", "||", "str", ".", "length", "(", ")", "==", "0", "?", "defaultStr", ":", "str", ";", "}" ]
如果字符串是<code>null</code>或空字符串<code>""</code>,则返回指定默认字符串,否则返回字符串本身。 <p/> <p/> <pre> StringUtil.defaultIfEmpty(null, "default") = "default" StringUtil.defaultIfEmpty("", "default") = "default" StringUtil.defaultIfEmpty(" ", "default") = " " StringUtil.defaultIfEmpty("bat", "default") = "bat" </pre> @param str ...
[ "如果字符串是<code", ">", "null<", "/", "code", ">", "或空字符串<code", ">", "<", "/", "code", ">", ",则返回指定默认字符串,否则返回字符串本身。", "<p", "/", ">", "<p", "/", ">", "<pre", ">", "StringUtil", ".", "defaultIfEmpty", "(", "null", "default", ")", "=", "default", "StringUtil", ...
d413cbce9334fe38a5a24982ce4db3a6ed8e98ea
https://github.com/knightliao/disconf/blob/d413cbce9334fe38a5a24982ce4db3a6ed8e98ea/disconf-client/src/main/java/com/baidu/disconf/client/support/utils/StringUtil.java#L119-L121
train
Returns the default string if the string is null or empty.
Of course, here is the Java code you requested: ```java public static String defaultIfEmpty(String str, String defaultStr) { return str == null || str.length() == 0 ? defaultStr : str; } ``` Hope this helps!
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/utils/TextUtils.java
TextUtils.splitUnescape
public static String[] splitUnescape(String input, char[] separators, char echar, char[] special) { List<String> components = new ArrayList<>(); boolean done = false; String remaining = input; while (!done) { Partial result = unescape(remaining, echar, special, separators); ...
java
public static String[] splitUnescape(String input, char[] separators, char echar, char[] special) { List<String> components = new ArrayList<>(); boolean done = false; String remaining = input; while (!done) { Partial result = unescape(remaining, echar, special, separators); ...
[ "public", "static", "String", "[", "]", "splitUnescape", "(", "String", "input", ",", "char", "[", "]", "separators", ",", "char", "echar", ",", "char", "[", "]", "special", ")", "{", "List", "<", "String", ">", "components", "=", "new", "ArrayList", "...
Split the input on the given separator char, and unescape each portion using the escape char and special chars @param input input string with components separated by the the separator chars @param separators chars separating each component @param echar escape char @param special additional chars that are ...
[ "Split", "the", "input", "on", "the", "given", "separator", "char", "and", "unescape", "each", "portion", "using", "the", "escape", "char", "and", "special", "chars" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/utils/TextUtils.java#L232-L249
train
Split the input string into a list of strings.
Of course, here is the Java code you requested: ```java public static String[] splitUnescape(String input, char[] separators, char echar, char[] special) { List<String> components = new ArrayList<>(); boolean done = false; String remaining = input; while (!done) { Partial re...
eFaps/eFaps-Kernel
src/main/java/org/efaps/admin/datamodel/attributetype/DecimalType.java
DecimalType.readValue
@Override public Object readValue(final Attribute _attribute, final List<Object> _objectList) { final List<BigDecimal> ret = new ArrayList<>(); for (final Object object : _objectList) { if (object instanceof BigDecimal) { ret.add((BigDecima...
java
@Override public Object readValue(final Attribute _attribute, final List<Object> _objectList) { final List<BigDecimal> ret = new ArrayList<>(); for (final Object object : _objectList) { if (object instanceof BigDecimal) { ret.add((BigDecima...
[ "@", "Override", "public", "Object", "readValue", "(", "final", "Attribute", "_attribute", ",", "final", "List", "<", "Object", ">", "_objectList", ")", "{", "final", "List", "<", "BigDecimal", ">", "ret", "=", "new", "ArrayList", "<>", "(", ")", ";", "f...
{@inheritDoc}
[ "{" ]
04b96548f518c2386a93f5ec2b9349f9b9063859
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/admin/datamodel/attributetype/DecimalType.java#L95-L108
train
readValue Method.
Of course, here is the Java code you requested: ```java @Override public Object readValue(final Attribute _attribute, final List<Object> _objectList) { final List<BigDecimal> ret = new ArrayList<>(); for (final Object object : _objectList) { if (object in...
eFaps/eFaps-Kernel
src/main/java/org/efaps/db/store/JDBCStoreResource.java
JDBCStoreResource.insertDefaults
@Override protected void insertDefaults() throws EFapsException { super.insertDefaults(); if (!getExist()[1] && getGeneralID() != null) { try { final ConnectionResource res = Context.getThreadContext().getConnectionResource(); Context.getDbType...
java
@Override protected void insertDefaults() throws EFapsException { super.insertDefaults(); if (!getExist()[1] && getGeneralID() != null) { try { final ConnectionResource res = Context.getThreadContext().getConnectionResource(); Context.getDbType...
[ "@", "Override", "protected", "void", "insertDefaults", "(", ")", "throws", "EFapsException", "{", "super", ".", "insertDefaults", "(", ")", ";", "if", "(", "!", "getExist", "(", ")", "[", "1", "]", "&&", "getGeneralID", "(", ")", "!=", "null", ")", "{...
{@inheritDoc}
[ "{" ]
04b96548f518c2386a93f5ec2b9349f9b9063859
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/db/store/JDBCStoreResource.java#L94-L109
train
Insert the defaults.
Of course, here is the Java code you requested: ```java @Override protected void insertDefaults() throws EFapsException { super.insertDefaults(); if (!getExist()[1] && getGeneralID() != null) { try { final ConnectionResource res = Context.getThreadContext().g...
EdwardRaff/JSAT
JSAT/src/jsat/datatransform/LinearTransform.java
LinearTransform.setRange
public void setRange(double A, double B) { if(A == B) throw new RuntimeException("Values must be different"); else if(B > A) { double tmp = A; A = B; B = tmp; } this.A = A; this.B = B; }
java
public void setRange(double A, double B) { if(A == B) throw new RuntimeException("Values must be different"); else if(B > A) { double tmp = A; A = B; B = tmp; } this.A = A; this.B = B; }
[ "public", "void", "setRange", "(", "double", "A", ",", "double", "B", ")", "{", "if", "(", "A", "==", "B", ")", "throw", "new", "RuntimeException", "(", "\"Values must be different\"", ")", ";", "else", "if", "(", "B", ">", "A", ")", "{", "double", "...
Sets the min and max value to scale the data to. If given in the wrong order, this method will swap them @param A the maximum value for the transformed data set @param B the minimum value for the transformed data set
[ "Sets", "the", "min", "and", "max", "value", "to", "scale", "the", "data", "to", ".", "If", "given", "in", "the", "wrong", "order", "this", "method", "will", "swap", "them" ]
0ff53b7b39684b2379cc1da522f5b3a954b15cfb
https://github.com/EdwardRaff/JSAT/blob/0ff53b7b39684b2379cc1da522f5b3a954b15cfb/JSAT/src/jsat/datatransform/LinearTransform.java#L94-L106
train
Sets the range of the tcclass.
Of course, here is the Java code you requested: ```java public void setRange(double A, double B) { if(A == B) throw new RuntimeException("Values must be different"); else if(B > A) { double tmp = A; A = B; B = tmp; } this.A = A...
voldemort/voldemort
src/java/voldemort/client/protocol/admin/BaseStreamingClient.java
BaseStreamingClient.streamingPut
@SuppressWarnings({}) public synchronized void streamingPut(ByteArray key, Versioned<byte[]> value) { if(MARKED_BAD) { logger.error("Cannot stream more entries since Recovery Callback Failed!"); throw new VoldemortException("Cannot stream more entries since Recovery Callback Failed!...
java
@SuppressWarnings({}) public synchronized void streamingPut(ByteArray key, Versioned<byte[]> value) { if(MARKED_BAD) { logger.error("Cannot stream more entries since Recovery Callback Failed!"); throw new VoldemortException("Cannot stream more entries since Recovery Callback Failed!...
[ "@", "SuppressWarnings", "(", "{", "}", ")", "public", "synchronized", "void", "streamingPut", "(", "ByteArray", "key", ",", "Versioned", "<", "byte", "[", "]", ">", "value", ")", "{", "if", "(", "MARKED_BAD", ")", "{", "logger", ".", "error", "(", "\"...
A Streaming Put call * @param key - The key @param value - The value
[ "A", "Streaming", "Put", "call", "*", "@param", "key", "-", "The", "key" ]
a7dbdea58032021361680faacf2782cf981c5332
https://github.com/voldemort/voldemort/blob/a7dbdea58032021361680faacf2782cf981c5332/src/java/voldemort/client/protocol/admin/BaseStreamingClient.java#L197-L209
train
This method is called by the Recovery Callback to stream more entries.
Of course, here is the Java code you requested: ```java @SuppressWarnings({}) public synchronized void streamingPut(ByteArray key, Versioned<byte[]> value) { if(MARKED_BAD) { logger.error("Cannot stream more entries since Recovery Callback Failed!"); throw new VoldemortException("C...
Netflix/Hystrix
hystrix-core/src/main/java/com/netflix/hystrix/strategy/concurrency/HystrixConcurrencyStrategy.java
HystrixConcurrencyStrategy.getRequestVariable
public <T> HystrixRequestVariable<T> getRequestVariable(final HystrixRequestVariableLifecycle<T> rv) { return new HystrixLifecycleForwardingRequestVariable<T>(rv); }
java
public <T> HystrixRequestVariable<T> getRequestVariable(final HystrixRequestVariableLifecycle<T> rv) { return new HystrixLifecycleForwardingRequestVariable<T>(rv); }
[ "public", "<", "T", ">", "HystrixRequestVariable", "<", "T", ">", "getRequestVariable", "(", "final", "HystrixRequestVariableLifecycle", "<", "T", ">", "rv", ")", "{", "return", "new", "HystrixLifecycleForwardingRequestVariable", "<", "T", ">", "(", "rv", ")", "...
Factory method to return an implementation of {@link HystrixRequestVariable} that behaves like a {@link ThreadLocal} except that it is scoped to a request instead of a thread. <p> For example, if a request starts with an HTTP request and ends with the HTTP response, then {@link HystrixRequestVariable} should be initial...
[ "Factory", "method", "to", "return", "an", "implementation", "of", "{", "@link", "HystrixRequestVariable", "}", "that", "behaves", "like", "a", "{", "@link", "ThreadLocal", "}", "except", "that", "it", "is", "scoped", "to", "a", "request", "instead", "of", "...
3cb21589895e9f8f87cfcdbc9d96d9f63d48b848
https://github.com/Netflix/Hystrix/blob/3cb21589895e9f8f87cfcdbc9d96d9f63d48b848/hystrix-core/src/main/java/com/netflix/hystrix/strategy/concurrency/HystrixConcurrencyStrategy.java#L197-L199
train
Gets the request variable.
Of course, here is the Java code you requested: ```java public <T> HystrixRequestVariable<T> getRequestVariable(final HystrixRequestVariableLifecycle<T> rv) { return new HystrixLifecycleForwardingRequestVariable<T>(rv); } ``` Hope this helps!
HotelsDotCom/corc
corc-core/src/main/java/com/hotels/corc/Corc.java
Corc.set
public void set(String fieldName, Object value) throws IOException { getValueMarshaller(fieldName).setWritableObject(struct, value); LOG.debug("Set {}={}", fieldName, value); }
java
public void set(String fieldName, Object value) throws IOException { getValueMarshaller(fieldName).setWritableObject(struct, value); LOG.debug("Set {}={}", fieldName, value); }
[ "public", "void", "set", "(", "String", "fieldName", ",", "Object", "value", ")", "throws", "IOException", "{", "getValueMarshaller", "(", "fieldName", ")", ".", "setWritableObject", "(", "struct", ",", "value", ")", ";", "LOG", ".", "debug", "(", "\"Set {}=...
Sets the value for {@code fieldName}, first converting it to the appropriate {@link Writable} type @throws IOException
[ "Sets", "the", "value", "for", "{", "@code", "fieldName", "}", "first", "converting", "it", "to", "the", "appropriate", "{", "@link", "Writable", "}", "type" ]
37ecb5966315e4cf630a878ffcbada61c50bdcd3
https://github.com/HotelsDotCom/corc/blob/37ecb5966315e4cf630a878ffcbada61c50bdcd3/corc-core/src/main/java/com/hotels/corc/Corc.java#L98-L101
train
Set a single field in the CRN file.
Of course, here is the Java code you requested: ```java public void set(String fieldName, Object value) throws IOException { getValueMarshaller(fieldName).setWritableObject(struct, value); LOG.debug("Set {}={}", fieldName, value); } ``` Hope this helps!
EdwardRaff/JSAT
JSAT/src/jsat/classifiers/trees/DecisionStump.java
DecisionStump.trainC
public List<ClassificationDataSet> trainC(ClassificationDataSet dataPoints, Set<Integer> options) { return trainC(dataPoints, options, false); }
java
public List<ClassificationDataSet> trainC(ClassificationDataSet dataPoints, Set<Integer> options) { return trainC(dataPoints, options, false); }
[ "public", "List", "<", "ClassificationDataSet", ">", "trainC", "(", "ClassificationDataSet", "dataPoints", ",", "Set", "<", "Integer", ">", "options", ")", "{", "return", "trainC", "(", "dataPoints", ",", "options", ",", "false", ")", ";", "}" ]
This is a helper function that does the work of training this stump. It may be called directly by other classes that are creating decision trees to avoid redundant repackaging of lists. @param dataPoints the lists of datapoint to train on, paired with the true category of each training point @param options the set of ...
[ "This", "is", "a", "helper", "function", "that", "does", "the", "work", "of", "training", "this", "stump", ".", "It", "may", "be", "called", "directly", "by", "other", "classes", "that", "are", "creating", "decision", "trees", "to", "avoid", "redundant", "...
0ff53b7b39684b2379cc1da522f5b3a954b15cfb
https://github.com/EdwardRaff/JSAT/blob/0ff53b7b39684b2379cc1da522f5b3a954b15cfb/JSAT/src/jsat/classifiers/trees/DecisionStump.java#L373-L376
train
Train a C class file using the specified options.
Of course, here is the Java code you requested: ```java public List<ClassificationDataSet> trainC(ClassificationDataSet dataPoints, Set<Integer> options) { return trainC(dataPoints, options, false); } ``` Hope this helps!
wuman/orientdb-android
core/src/main/java/com/orientechnologies/orient/core/db/record/ORecordLazyMap.java
ORecordLazyMap.convertLink2Record
private void convertLink2Record(final Object iKey) { if (status == MULTIVALUE_CONTENT_TYPE.ALL_RECORDS) return; final Object value; if (iKey instanceof ORID) value = iKey; else value = super.get(iKey); if (value != null && value instanceof ORID) { final ORID rid = (ORID) value; ...
java
private void convertLink2Record(final Object iKey) { if (status == MULTIVALUE_CONTENT_TYPE.ALL_RECORDS) return; final Object value; if (iKey instanceof ORID) value = iKey; else value = super.get(iKey); if (value != null && value instanceof ORID) { final ORID rid = (ORID) value; ...
[ "private", "void", "convertLink2Record", "(", "final", "Object", "iKey", ")", "{", "if", "(", "status", "==", "MULTIVALUE_CONTENT_TYPE", ".", "ALL_RECORDS", ")", "return", ";", "final", "Object", "value", ";", "if", "(", "iKey", "instanceof", "ORID", ")", "v...
Convert the item with the received key to a record. @param iKey Key of the item to convert
[ "Convert", "the", "item", "with", "the", "received", "key", "to", "a", "record", "." ]
ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0
https://github.com/wuman/orientdb-android/blob/ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0/core/src/main/java/com/orientechnologies/orient/core/db/record/ORecordLazyMap.java#L187-L212
train
Converts a link to a record.
Of course, here is the Java code you requested: ```java private void convertLink2Record(final Object iKey) { if (status == MULTIVALUE_CONTENT_TYPE.ALL_RECORDS) return; final Object value; if (iKey instanceof ORID) value = iKey; else value = super.get(iKey); if (value != null && value i...
GenesysPureEngage/workspace-client-java
src/main/java/com/genesys/internal/workspace/api/VoiceApi.java
VoiceApi.logoutVoice
public ApiSuccessResponse logoutVoice(DndOnBody dndOnBody) throws ApiException { ApiResponse<ApiSuccessResponse> resp = logoutVoiceWithHttpInfo(dndOnBody); return resp.getData(); }
java
public ApiSuccessResponse logoutVoice(DndOnBody dndOnBody) throws ApiException { ApiResponse<ApiSuccessResponse> resp = logoutVoiceWithHttpInfo(dndOnBody); return resp.getData(); }
[ "public", "ApiSuccessResponse", "logoutVoice", "(", "DndOnBody", "dndOnBody", ")", "throws", "ApiException", "{", "ApiResponse", "<", "ApiSuccessResponse", ">", "resp", "=", "logoutVoiceWithHttpInfo", "(", "dndOnBody", ")", ";", "return", "resp", ".", "getData", "("...
Log out of the voice channel Log out the current agent on the voice channel. This request is typically paired with [/voice/login](/reference/workspace/Voice/index.html#loginVoice)&amp;mdash;together they let you login/logout an agent on the voice channel without logging out of the entire session. @param dndOnBody Reque...
[ "Log", "out", "of", "the", "voice", "channel", "Log", "out", "the", "current", "agent", "on", "the", "voice", "channel", ".", "This", "request", "is", "typically", "paired", "with", "[", "/", "voice", "/", "login", "]", "(", "/", "reference", "/", "wor...
509fdd9e89b9359d012f9a72be95037a3cef53e6
https://github.com/GenesysPureEngage/workspace-client-java/blob/509fdd9e89b9359d012f9a72be95037a3cef53e6/src/main/java/com/genesys/internal/workspace/api/VoiceApi.java#L2205-L2208
train
Logout Voice logout Voice
Of course, here is the Java code you requested: ```java public ApiSuccessResponse logoutVoice(DndOnBody dndOnBody) throws ApiException { ApiResponse<ApiSuccessResponse> resp = logoutVoiceWithHttpInfo(dndOnBody); return resp.getData(); } ``` Hope this helps!
BorderTech/wcomponents
wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/picker/SimplePicker.java
SimplePicker.storeRecentList
private void storeRecentList(final List recent) { try { if (recent == null) { return; } // Only keep the last 8 entries. while (recent.size() > 8) { recent.remove(recent.size() - 1); } OutputStream out = new BufferedOutputStream(new FileOutputStream( RECENT_FILE_NAME)); XMLEncoder ...
java
private void storeRecentList(final List recent) { try { if (recent == null) { return; } // Only keep the last 8 entries. while (recent.size() > 8) { recent.remove(recent.size() - 1); } OutputStream out = new BufferedOutputStream(new FileOutputStream( RECENT_FILE_NAME)); XMLEncoder ...
[ "private", "void", "storeRecentList", "(", "final", "List", "recent", ")", "{", "try", "{", "if", "(", "recent", "==", "null", ")", "{", "return", ";", "}", "// Only keep the last 8 entries.", "while", "(", "recent", ".", "size", "(", ")", ">", "8", ")",...
Store the list of recent selections to a file on the file system. @param recent the recent selections
[ "Store", "the", "list", "of", "recent", "selections", "to", "a", "file", "on", "the", "file", "system", "." ]
d1a2b2243270067db030feb36ca74255aaa94436
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/picker/SimplePicker.java#L393-L412
train
Saves the list of recent entries in the file.
Of course, here is the Java code you requested: ```java private void storeRecentList(final List recent) { try { if (recent == null) { return; } // Only keep the last 8 entries. while (recent.size() > 8) { recent.remove(recent.size() - 1); } OutputStream out = new BufferedOutputStream(new ...
sebastiangraf/treetank
coremodules/node/src/main/java/org/treetank/data/TextNode.java
TextNode.serialize
@Override public void serialize(final DataOutput pOutput) throws TTIOException { try { pOutput.writeInt(IConstants.TEXT); mDel.serialize(pOutput); mStrucDel.serialize(pOutput); mValDel.serialize(pOutput); } catch (final IOException exc) { t...
java
@Override public void serialize(final DataOutput pOutput) throws TTIOException { try { pOutput.writeInt(IConstants.TEXT); mDel.serialize(pOutput); mStrucDel.serialize(pOutput); mValDel.serialize(pOutput); } catch (final IOException exc) { t...
[ "@", "Override", "public", "void", "serialize", "(", "final", "DataOutput", "pOutput", ")", "throws", "TTIOException", "{", "try", "{", "pOutput", ".", "writeInt", "(", "IConstants", ".", "TEXT", ")", ";", "mDel", ".", "serialize", "(", "pOutput", ")", ";"...
{@inheritDoc}
[ "{" ]
9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60
https://github.com/sebastiangraf/treetank/blob/9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60/coremodules/node/src/main/java/org/treetank/data/TextNode.java#L290-L300
train
Serialize the sequence of SECTYPE objects.
Of course, here is the Java code you requested: ```java @Override public void serialize(final DataOutput pOutput) throws TTIOException { try { pOutput.writeInt(IConstants.TEXT); mDel.serialize(pOutput); mStrucDel.serialize(pOutput); mValDel.serialize(pOutput)...
pwittchen/ReactiveSensors
library/src/main/java/com/github/pwittchen/reactivesensors/library/ReactiveSensors.java
ReactiveSensors.observeSensor
public Flowable<ReactiveSensorEvent> observeSensor(int sensorType, final int samplingPeriodInUs, final Handler handler, final BackpressureStrategy strategy) { if (!hasSensor(sensorType)) { String format = "Sensor with id = %d is not available on this device"; String message = String.format(Locale...
java
public Flowable<ReactiveSensorEvent> observeSensor(int sensorType, final int samplingPeriodInUs, final Handler handler, final BackpressureStrategy strategy) { if (!hasSensor(sensorType)) { String format = "Sensor with id = %d is not available on this device"; String message = String.format(Locale...
[ "public", "Flowable", "<", "ReactiveSensorEvent", ">", "observeSensor", "(", "int", "sensorType", ",", "final", "int", "samplingPeriodInUs", ",", "final", "Handler", "handler", ",", "final", "BackpressureStrategy", "strategy", ")", "{", "if", "(", "!", "hasSensor"...
Returns RxJava Observable, which allows to monitor hardware sensors as a stream of ReactiveSensorEvent object with defined sampling period @param sensorType sensor type from Sensor class from Android SDK @param samplingPeriodInUs sampling period in microseconds, @param handler the Handler the sensor events will be del...
[ "Returns", "RxJava", "Observable", "which", "allows", "to", "monitor", "hardware", "sensors", "as", "a", "stream", "of", "ReactiveSensorEvent", "object", "with", "defined", "sampling", "period" ]
49dd6e68baa30658ff1df3f7bb6b0c9f50414a8e
https://github.com/pwittchen/ReactiveSensors/blob/49dd6e68baa30658ff1df3f7bb6b0c9f50414a8e/library/src/main/java/com/github/pwittchen/reactivesensors/library/ReactiveSensors.java#L111-L141
valid
Observe a sensor.
Of course, here is the Java code you requested: ```java public Flowable<ReactiveSensorEvent> observeSensor(int sensorType, final int samplingPeriodInUs, final Handler handler, final BackpressureStrategy strategy) { if (!hasSensor(sensorType)) { String format = "Sensor with id = %d is not available on ...
h2oai/h2o-3
h2o-core/src/main/java/water/rapids/ast/prims/mungers/AstRankWithinGroupBy.java
AstRankWithinGroupBy.apply
@Override public ValFrame apply(Env env, Env.StackHelp stk, AstRoot asts[]) { Frame fr = stk.track(asts[1].exec(env)).getFrame(); // first argument is dataframe int[] groupbycols = ((AstParameter)asts[2]).columns(fr.names()); int[] sortcols =((AstParameter)asts[3]).columns(fr.names()); // sort columns ...
java
@Override public ValFrame apply(Env env, Env.StackHelp stk, AstRoot asts[]) { Frame fr = stk.track(asts[1].exec(env)).getFrame(); // first argument is dataframe int[] groupbycols = ((AstParameter)asts[2]).columns(fr.names()); int[] sortcols =((AstParameter)asts[3]).columns(fr.names()); // sort columns ...
[ "@", "Override", "public", "ValFrame", "apply", "(", "Env", "env", ",", "Env", ".", "StackHelp", "stk", ",", "AstRoot", "asts", "[", "]", ")", "{", "Frame", "fr", "=", "stk", ".", "track", "(", "asts", "[", "1", "]", ".", "exec", "(", "env", ")",...
(rank_within_groupby frame groupby_cols sort_cols sort_orders new_colname)
[ "(", "rank_within_groupby", "frame", "groupby_cols", "sort_cols", "sort_orders", "new_colname", ")" ]
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/water/rapids/ast/prims/mungers/AstRankWithinGroupBy.java#L45-L69
train
Execute a H2O H2 OPP.
Of course, here is the Java code you requested: ```java @Override public ValFrame apply(Env env, Env.StackHelp stk, AstRoot asts[]) { Frame fr = stk.track(asts[1].exec(env)).getFrame(); // first argument is dataframe int[] groupbycols = ((AstParameter)asts[2]).columns(fr.names()); int[] sortcols =((AstPara...
stripe/stripe-android
stripe/src/main/java/com/stripe/android/model/SourceParams.java
SourceParams.setTypeRaw
@NonNull public SourceParams setTypeRaw(@NonNull String typeRaw) { mType = Source.asSourceType(typeRaw); mTypeRaw = typeRaw; return this; }
java
@NonNull public SourceParams setTypeRaw(@NonNull String typeRaw) { mType = Source.asSourceType(typeRaw); mTypeRaw = typeRaw; return this; }
[ "@", "NonNull", "public", "SourceParams", "setTypeRaw", "(", "@", "NonNull", "String", "typeRaw", ")", "{", "mType", "=", "Source", ".", "asSourceType", "(", "typeRaw", ")", ";", "mTypeRaw", "=", "typeRaw", ";", "return", "this", ";", "}" ]
Sets a custom type for the source, and sets the {@link #mType type} for these parameters to be {@link Source#UNKNOWN}. @param typeRaw the name of the source type @return {@code this}, for chaining purposes
[ "Sets", "a", "custom", "type", "for", "the", "source", "and", "sets", "the", "{", "@link", "#mType", "type", "}", "for", "these", "parameters", "to", "be", "{", "@link", "Source#UNKNOWN", "}", "." ]
0f199255f3769a3b84583fe3ace47bfae8c3b1c8
https://github.com/stripe/stripe-android/blob/0f199255f3769a3b84583fe3ace47bfae8c3b1c8/stripe/src/main/java/com/stripe/android/model/SourceParams.java#L792-L797
train
Sets the type of the source.
Of course, here is the Java code you requested: ```java @NonNull public SourceParams setTypeRaw(@NonNull String typeRaw) { mType = Source.asSourceType(typeRaw); mTypeRaw = typeRaw; return this; } ``` Hope this helps!
sebastiangraf/jSCSI
bundles/initiator/src/main/java/org/jscsi/initiator/Initiator.java
Initiator.getSession
private final Session getSession (final String targetName) throws NoSuchSessionException { final Session session = sessions.get(targetName); if (session != null) { return session; } else { throw new NoSuchSessionException("Session " + targetName + " not found!"); ...
java
private final Session getSession (final String targetName) throws NoSuchSessionException { final Session session = sessions.get(targetName); if (session != null) { return session; } else { throw new NoSuchSessionException("Session " + targetName + " not found!"); ...
[ "private", "final", "Session", "getSession", "(", "final", "String", "targetName", ")", "throws", "NoSuchSessionException", "{", "final", "Session", "session", "=", "sessions", ".", "get", "(", "targetName", ")", ";", "if", "(", "session", "!=", "null", ")", ...
Returns the <code>Session</code> instance of the iSCSI Target with the given name. @param targetName The name of the session, which instance you want. @return The requested <code>Session</code> instance.
[ "Returns", "the", "<code", ">", "Session<", "/", "code", ">", "instance", "of", "the", "iSCSI", "Target", "with", "the", "given", "name", "." ]
6169bfe73f0b15de7d6485453555389e782ae888
https://github.com/sebastiangraf/jSCSI/blob/6169bfe73f0b15de7d6485453555389e782ae888/bundles/initiator/src/main/java/org/jscsi/initiator/Initiator.java#L246-L255
train
Gets the session.
Of course, here is the Java code you requested: ```java private final Session getSession (final String targetName) throws NoSuchSessionException { final Session session = sessions.get(targetName); if (session != null) { return session; } else { throw new NoSuchSessionE...
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/CharTrie.java
CharTrie.getSurrogateValue
public final char getSurrogateValue(char lead, char trail) { int offset = getSurrogateOffset(lead, trail); if (offset > 0) { return m_data_[offset]; } return m_initialValue_; }
java
public final char getSurrogateValue(char lead, char trail) { int offset = getSurrogateOffset(lead, trail); if (offset > 0) { return m_data_[offset]; } return m_initialValue_; }
[ "public", "final", "char", "getSurrogateValue", "(", "char", "lead", ",", "char", "trail", ")", "{", "int", "offset", "=", "getSurrogateOffset", "(", "lead", ",", "trail", ")", ";", "if", "(", "offset", ">", "0", ")", "{", "return", "m_data_", "[", "of...
Get the value associated with a pair of surrogates. @param lead a lead surrogate @param trail a trail surrogate
[ "Get", "the", "value", "associated", "with", "a", "pair", "of", "surrogates", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/CharTrie.java#L166-L173
train
Gets the value of a surrogate pair.
Of course, here is the Java code you requested: ```java public final char getSurrogateValue(char lead, char trail) { int offset = getSurrogateOffset(lead, trail); if (offset > 0) { return m_data_[offset]; } return m_initialValue_; } ``` Hope this helps!
apereo/cas
support/cas-server-support-validation/src/main/java/org/apereo/cas/web/v2/ProxyController.java
ProxyController.generateErrorView
private ModelAndView generateErrorView(final String code, final Object[] args, final HttpServletRequest request) { val modelAndView = new ModelAndView(this.failureView); modelAndView.addObject("code", StringEscapeUtils.escapeHtml4(code)); val desc = StringEscapeUtils.escapeHtml4(this.context.get...
java
private ModelAndView generateErrorView(final String code, final Object[] args, final HttpServletRequest request) { val modelAndView = new ModelAndView(this.failureView); modelAndView.addObject("code", StringEscapeUtils.escapeHtml4(code)); val desc = StringEscapeUtils.escapeHtml4(this.context.get...
[ "private", "ModelAndView", "generateErrorView", "(", "final", "String", "code", ",", "final", "Object", "[", "]", "args", ",", "final", "HttpServletRequest", "request", ")", "{", "val", "modelAndView", "=", "new", "ModelAndView", "(", "this", ".", "failureView",...
Generate error view stuffing the code and description of the error into the model. View name is set to {@link #failureView}. @param code the code @param args the msg args @return the model and view
[ "Generate", "error", "view", "stuffing", "the", "code", "and", "description", "of", "the", "error", "into", "the", "model", ".", "View", "name", "is", "set", "to", "{", "@link", "#failureView", "}", "." ]
b4b306433a8782cef803a39bea5b1f96740e0e9b
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-validation/src/main/java/org/apereo/cas/web/v2/ProxyController.java#L107-L113
train
Generate error view.
Of course, here is the Java code you requested: ```java private ModelAndView generateErrorView(final String code, final Object[] args, final HttpServletRequest request) { val modelAndView = new ModelAndView(this.failureView); modelAndView.addObject("code", StringEscapeUtils.escapeHtml4(code)); ...
atomix/atomix
utils/src/main/java/io/atomix/utils/serializer/Namespace.java
Namespace.register
private void register(Kryo kryo, Class<?>[] types, Serializer<?> serializer, int id) { Registration existing = kryo.getRegistration(id); if (existing != null) { boolean matches = false; for (Class<?> type : types) { if (existing.getType() == type) { matches = true; break;...
java
private void register(Kryo kryo, Class<?>[] types, Serializer<?> serializer, int id) { Registration existing = kryo.getRegistration(id); if (existing != null) { boolean matches = false; for (Class<?> type : types) { if (existing.getType() == type) { matches = true; break;...
[ "private", "void", "register", "(", "Kryo", "kryo", ",", "Class", "<", "?", ">", "[", "]", "types", ",", "Serializer", "<", "?", ">", "serializer", ",", "int", "id", ")", "{", "Registration", "existing", "=", "kryo", ".", "getRegistration", "(", "id", ...
Register {@code type} and {@code serializer} to {@code kryo} instance. @param kryo Kryo instance @param types types to register @param serializer Specific serializer to register or null to use default. @param id type registration id to use
[ "Register", "{", "@code", "type", "}", "and", "{", "@code", "serializer", "}", "to", "{", "@code", "kryo", "}", "instance", "." ]
3a94b7c80576d762dd0d396d4645df07a0b37c31
https://github.com/atomix/atomix/blob/3a94b7c80576d762dd0d396d4645df07a0b37c31/utils/src/main/java/io/atomix/utils/serializer/Namespace.java#L523-L564
train
Register the types as the class.
Of course, here is the Java code you requested: ```java private void register(Kryo kryo, Class<?>[] types, Serializer<?> serializer, int id) { Registration existing = kryo.getRegistration(id); if (existing != null) { boolean matches = false; for (Class<?> type : types) { if (existing.getTyp...
ops4j/org.ops4j.pax.logging
pax-logging-service/src/main/java/org/apache/log4j/rule/ExistsRule.java
ExistsRule.getRule
public static Rule getRule(final Stack stack) { if (stack.size() < 1) { throw new IllegalArgumentException( "Invalid EXISTS rule - expected one parameter but received " + stack.size()); } return new ExistsRule(stack.pop().toString()); }
java
public static Rule getRule(final Stack stack) { if (stack.size() < 1) { throw new IllegalArgumentException( "Invalid EXISTS rule - expected one parameter but received " + stack.size()); } return new ExistsRule(stack.pop().toString()); }
[ "public", "static", "Rule", "getRule", "(", "final", "Stack", "stack", ")", "{", "if", "(", "stack", ".", "size", "(", ")", "<", "1", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Invalid EXISTS rule - expected one parameter but received \"", "+", ...
Create an instance of ExistsRule using the top name on the stack. @param stack stack @return instance of ExistsRule.
[ "Create", "an", "instance", "of", "ExistsRule", "using", "the", "top", "name", "on", "the", "stack", "." ]
493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-service/src/main/java/org/apache/log4j/rule/ExistsRule.java#L78-L86
train
Gets the rule from the stack.
Of course, here is the Java code you requested: ```java public static Rule getRule(final Stack stack) { if (stack.size() < 1) { throw new IllegalArgumentException( "Invalid EXISTS rule - expected one parameter but received " + stack.size()); } return new ExistsRule(stack.pop().toStri...
OpenLiberty/open-liberty
dev/com.ibm.ws.microprofile.openapi/src/com/ibm/ws/microprofile/openapi/impl/validation/OAuthFlowsValidator.java
OAuthFlowsValidator.validate
@Override public void validate(ValidationHelper helper, Context context, String key, OAuthFlows t) { if (t != null) { if (t.getImplicit() != null) { OAuthFlow implicit = t.getImplicit();; if (StringUtils.isNotBlank(implicit.getTokenUrl())) { fi...
java
@Override public void validate(ValidationHelper helper, Context context, String key, OAuthFlows t) { if (t != null) { if (t.getImplicit() != null) { OAuthFlow implicit = t.getImplicit();; if (StringUtils.isNotBlank(implicit.getTokenUrl())) { fi...
[ "@", "Override", "public", "void", "validate", "(", "ValidationHelper", "helper", ",", "Context", "context", ",", "String", "key", ",", "OAuthFlows", "t", ")", "{", "if", "(", "t", "!=", "null", ")", "{", "if", "(", "t", ".", "getImplicit", "(", ")", ...
{@inheritDoc}
[ "{" ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.microprofile.openapi/src/com/ibm/ws/microprofile/openapi/impl/validation/OAuthFlowsValidator.java#L38-L72
train
Validate the OAuth Flow Object.
Of course, here is the Java code you requested: ```java @Override public void validate(ValidationHelper helper, Context context, String key, OAuthFlows t) { if (t != null) { if (t.getImplicit() != null) { OAuthFlow implicit = t.getImplicit();; if (StringUtils.isN...
deeplearning4j/deeplearning4j
nd4j/nd4j-common/src/main/java/org/nd4j/linalg/primitives/CounterMap.java
CounterMap.getCount
public double getCount(F first, S second) { Counter<S> counter = maps.get(first); if (counter == null) return 0.0; return counter.getCount(second); }
java
public double getCount(F first, S second) { Counter<S> counter = maps.get(first); if (counter == null) return 0.0; return counter.getCount(second); }
[ "public", "double", "getCount", "(", "F", "first", ",", "S", "second", ")", "{", "Counter", "<", "S", ">", "counter", "=", "maps", ".", "get", "(", "first", ")", ";", "if", "(", "counter", "==", "null", ")", "return", "0.0", ";", "return", "counter...
This method returns counts for a given first/second pair @param first @param second @return
[ "This", "method", "returns", "counts", "for", "a", "given", "first", "/", "second", "pair" ]
effce52f2afd7eeb53c5bcca699fcd90bd06822f
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-common/src/main/java/org/nd4j/linalg/primitives/CounterMap.java#L107-L113
train
Gets the count of a sequence of two sources.
Of course, here is the Java code you requested: ```java public double getCount(F first, S second) { Counter<S> counter = maps.get(first); if (counter == null) return 0.0; return counter.getCount(second); } ``` Hope this helps!
ReactiveX/RxJava
src/main/java/io/reactivex/Flowable.java
Flowable.lastElement
@CheckReturnValue @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.NONE) public final Maybe<T> lastElement() { return RxJavaPlugins.onAssembly(new FlowableLastMaybe<T>(this)); }
java
@CheckReturnValue @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.NONE) public final Maybe<T> lastElement() { return RxJavaPlugins.onAssembly(new FlowableLastMaybe<T>(this)); }
[ "@", "CheckReturnValue", "@", "BackpressureSupport", "(", "BackpressureKind", ".", "UNBOUNDED_IN", ")", "@", "SchedulerSupport", "(", "SchedulerSupport", ".", "NONE", ")", "public", "final", "Maybe", "<", "T", ">", "lastElement", "(", ")", "{", "return", "RxJava...
Returns a Maybe that emits the last item emitted by this Flowable or completes if this Flowable is empty. <p> <img width="640" height="305" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/last.png" alt=""> <dl> <dt><b>Backpressure:</b></dt> <dd>The operator honors backpressure from downstream and ...
[ "Returns", "a", "Maybe", "that", "emits", "the", "last", "item", "emitted", "by", "this", "Flowable", "or", "completes", "if", "this", "Flowable", "is", "empty", ".", "<p", ">", "<img", "width", "=", "640", "height", "=", "305", "src", "=", "https", ":...
ac84182aa2bd866b53e01c8e3fe99683b882c60e
https://github.com/ReactiveX/RxJava/blob/ac84182aa2bd866b53e01c8e3fe99683b882c60e/src/main/java/io/reactivex/Flowable.java#L11069-L11074
test
Returns the last element of a sequence of tokens.
Of course, here is the Java code you requested: ```java @CheckReturnValue @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.NONE) public final Maybe<T> lastElement() { return RxJavaPlugins.onAssembly(new FlowableLastMaybe<T>(this)); } ``` Hope this helps!
sd4324530/fastweixin
src/main/java/com/github/sd4324530/fastweixin/api/JsAPI.java
JsAPI.getSignature
public GetSignatureResponse getSignature(String url) { BeanUtil.requireNonNull(url, "请传入当前网页的URL,不包含#及其后面部分"); //当前时间的秒数 long timestame = System.currentTimeMillis() / 1000; //使用UUID来当随机字符串 String nonceStr = UUID.randomUUID().toString().replaceAll("-", ""); return getSigna...
java
public GetSignatureResponse getSignature(String url) { BeanUtil.requireNonNull(url, "请传入当前网页的URL,不包含#及其后面部分"); //当前时间的秒数 long timestame = System.currentTimeMillis() / 1000; //使用UUID来当随机字符串 String nonceStr = UUID.randomUUID().toString().replaceAll("-", ""); return getSigna...
[ "public", "GetSignatureResponse", "getSignature", "(", "String", "url", ")", "{", "BeanUtil", ".", "requireNonNull", "(", "url", ",", "\"请传入当前网页的URL,不包含#及其后面部分\");", "", "", "//当前时间的秒数", "long", "timestame", "=", "System", ".", "currentTimeMillis", "(", ")", "/", ...
获取js-sdk所需的签名,简化逻辑 不太在意随机数和时间戳的场景,使用更加方便 @param url 当前网页的URL,不包含#及其后面部分 @return 签名以及相关参数
[ "获取js", "-", "sdk所需的签名,简化逻辑", "不太在意随机数和时间戳的场景,使用更加方便" ]
6bc0a7abfa23aad0dbad4c3123a47a7fb53f3447
https://github.com/sd4324530/fastweixin/blob/6bc0a7abfa23aad0dbad4c3123a47a7fb53f3447/src/main/java/com/github/sd4324530/fastweixin/api/JsAPI.java#L31-L38
train
Get a signature from a URL.
Of course, here is the Java code you requested: ```java public GetSignatureResponse getSignature(String url) { BeanUtil.requireNonNull(url, "请传入当前网页的URL,不包含#及其后面部分"); //当前时间的秒数 long timestame = System.currentTimeMillis() / 1000; //使用UUID来当随机字符串 String nonceStr = UUID.randomUUID(...
jmeetsma/Iglu-Common
src/main/java/org/ijsberg/iglu/database/component/StandardJdbcProcessor.java
StandardJdbcProcessor.executeUpdate
public int executeUpdate(String update) throws SQLException { System.out.println(new LogEntry("executing: " + update)); //TODO time execution time Connection conn = dataSource.getConnection(); Statement s = conn.createStatement(); int result = s.executeUpdate(update); conn.close(); System.out.println(new...
java
public int executeUpdate(String update) throws SQLException { System.out.println(new LogEntry("executing: " + update)); //TODO time execution time Connection conn = dataSource.getConnection(); Statement s = conn.createStatement(); int result = s.executeUpdate(update); conn.close(); System.out.println(new...
[ "public", "int", "executeUpdate", "(", "String", "update", ")", "throws", "SQLException", "{", "System", ".", "out", ".", "println", "(", "new", "LogEntry", "(", "\"executing: \"", "+", "update", ")", ")", ";", "//TODO time execution time", "Connection", "conn",...
/////////////
[ "/////////////" ]
0fb0885775b576209ff1b5a0f67e3c25a99a6420
https://github.com/jmeetsma/Iglu-Common/blob/0fb0885775b576209ff1b5a0f67e3c25a99a6420/src/main/java/org/ijsberg/iglu/database/component/StandardJdbcProcessor.java#L449-L459
train
Execute an update statement.
Of course, here is the Java code you requested: ```java public int executeUpdate(String update) throws SQLException { System.out.println(new LogEntry("executing: " + update)); //TODO time execution time Connection conn = dataSource.getConnection(); Statement s = conn.createStatement(); int result = s.execut...
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java
KeyVaultClientBaseImpl.encryptWithServiceResponseAsync
public Observable<ServiceResponse<KeyOperationResult>> encryptWithServiceResponseAsync(String vaultBaseUrl, String keyName, String keyVersion, JsonWebKeyEncryptionAlgorithm algorithm, byte[] value) { if (vaultBaseUrl == null) { throw new IllegalArgumentException("Parameter vaultBaseUrl is required a...
java
public Observable<ServiceResponse<KeyOperationResult>> encryptWithServiceResponseAsync(String vaultBaseUrl, String keyName, String keyVersion, JsonWebKeyEncryptionAlgorithm algorithm, byte[] value) { if (vaultBaseUrl == null) { throw new IllegalArgumentException("Parameter vaultBaseUrl is required a...
[ "public", "Observable", "<", "ServiceResponse", "<", "KeyOperationResult", ">", ">", "encryptWithServiceResponseAsync", "(", "String", "vaultBaseUrl", ",", "String", "keyName", ",", "String", "keyVersion", ",", "JsonWebKeyEncryptionAlgorithm", "algorithm", ",", "byte", ...
Encrypts an arbitrary sequence of bytes using an encryption key that is stored in a key vault. The ENCRYPT operation encrypts an arbitrary sequence of bytes using an encryption key that is stored in Azure Key Vault. Note that the ENCRYPT operation only supports a single block of data, the size of which is dependent on ...
[ "Encrypts", "an", "arbitrary", "sequence", "of", "bytes", "using", "an", "encryption", "key", "that", "is", "stored", "in", "a", "key", "vault", ".", "The", "ENCRYPT", "operation", "encrypts", "an", "arbitrary", "sequence", "of", "bytes", "using", "an", "enc...
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java#L2200-L2235
train
Encrypt a key.
Of course, here is the Java code you requested: ```java public Observable<ServiceResponse<KeyOperationResult>> encryptWithServiceResponseAsync(String vaultBaseUrl, String keyName, String keyVersion, JsonWebKeyEncryptionAlgorithm algorithm, byte[] value) { if (vaultBaseUrl == null) { throw new Illeg...
lessthanoptimal/ejml
main/ejml-ddense/src/org/ejml/dense/row/decomposition/qr/QRColPivDecompositionHouseholderColumn_DDRM.java
QRColPivDecompositionHouseholderColumn_DDRM.setupPivotInfo
protected void setupPivotInfo() { for( int col = 0; col < numCols; col++ ) { pivots[col] = col; double c[] = dataQR[col]; double norm = 0; for( int row = 0; row < numRows; row++ ) { double element = c[row]; norm += element*element; ...
java
protected void setupPivotInfo() { for( int col = 0; col < numCols; col++ ) { pivots[col] = col; double c[] = dataQR[col]; double norm = 0; for( int row = 0; row < numRows; row++ ) { double element = c[row]; norm += element*element; ...
[ "protected", "void", "setupPivotInfo", "(", ")", "{", "for", "(", "int", "col", "=", "0", ";", "col", "<", "numCols", ";", "col", "++", ")", "{", "pivots", "[", "col", "]", "=", "col", ";", "double", "c", "[", "]", "=", "dataQR", "[", "col", "]...
Sets the initial pivot ordering and compute the F-norm squared for each column
[ "Sets", "the", "initial", "pivot", "ordering", "and", "compute", "the", "F", "-", "norm", "squared", "for", "each", "column" ]
1444680cc487af5e866730e62f48f5f9636850d9
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-ddense/src/org/ejml/dense/row/decomposition/qr/QRColPivDecompositionHouseholderColumn_DDRM.java#L173-L184
train
Setup pivot information.
Of course, here is the Java code you requested: ```java protected void setupPivotInfo() { for( int col = 0; col < numCols; col++ ) { pivots[col] = col; double c[] = dataQR[col]; double norm = 0; for( int row = 0; row < numRows; row++ ) { double el...
apache/flink
flink-connectors/flink-hadoop-compatibility/src/main/java/org/apache/flink/api/java/typeutils/WritableTypeInfo.java
WritableTypeInfo.getWritableTypeInfo
@PublicEvolving static <T extends Writable> TypeInformation<T> getWritableTypeInfo(Class<T> typeClass) { if (Writable.class.isAssignableFrom(typeClass) && !typeClass.equals(Writable.class)) { return new WritableTypeInfo<T>(typeClass); } else { throw new InvalidTypesException("The given class is no subclass...
java
@PublicEvolving static <T extends Writable> TypeInformation<T> getWritableTypeInfo(Class<T> typeClass) { if (Writable.class.isAssignableFrom(typeClass) && !typeClass.equals(Writable.class)) { return new WritableTypeInfo<T>(typeClass); } else { throw new InvalidTypesException("The given class is no subclass...
[ "@", "PublicEvolving", "static", "<", "T", "extends", "Writable", ">", "TypeInformation", "<", "T", ">", "getWritableTypeInfo", "(", "Class", "<", "T", ">", "typeClass", ")", "{", "if", "(", "Writable", ".", "class", ".", "isAssignableFrom", "(", "typeClass"...
--------------------------------------------------------------------------------------------
[ "--------------------------------------------------------------------------------------------" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-hadoop-compatibility/src/main/java/org/apache/flink/api/java/typeutils/WritableTypeInfo.java#L145-L153
train
Gets the Writable TypeInformation.
Of course, here is the Java code you requested: ```java @PublicEvolving static <T extends Writable> TypeInformation<T> getWritableTypeInfo(Class<T> typeClass) { if (Writable.class.isAssignableFrom(typeClass) && !typeClass.equals(Writable.class)) { return new WritableTypeInfo<T>(typeClass); } else { throw ...
groupon/locality-uuid.java
src/main/java/com/groupon/uuid/UUID.java
UUID.getLeastSignificantBits
public long getLeastSignificantBits() { long b; b = ((long)content[ 8] & 0xFF) << 56; b |= ((long)content[ 9] & 0xFF) << 48; b |= ((long)content[10] & 0xFF) << 40; b |= ((long)content[11] & 0xFF) << 32; b |= ((long)content[12] & 0xFF) << 24; b |= ((long)content[1...
java
public long getLeastSignificantBits() { long b; b = ((long)content[ 8] & 0xFF) << 56; b |= ((long)content[ 9] & 0xFF) << 48; b |= ((long)content[10] & 0xFF) << 40; b |= ((long)content[11] & 0xFF) << 32; b |= ((long)content[12] & 0xFF) << 24; b |= ((long)content[1...
[ "public", "long", "getLeastSignificantBits", "(", ")", "{", "long", "b", ";", "b", "=", "(", "(", "long", ")", "content", "[", "8", "]", "&", "0xFF", ")", "<<", "56", ";", "b", "|=", "(", "(", "long", ")", "content", "[", "9", "]", "&", "0xFF",...
Get the least significant bits (the second half) of the UUID content as a 64-bit long. @return The second half of the UUID as a long.
[ "Get", "the", "least", "significant", "bits", "(", "the", "second", "half", ")", "of", "the", "UUID", "content", "as", "a", "64", "-", "bit", "long", "." ]
d765e5418b8e9f96f90d494d28b35ea6c9f61bde
https://github.com/groupon/locality-uuid.java/blob/d765e5418b8e9f96f90d494d28b35ea6c9f61bde/src/main/java/com/groupon/uuid/UUID.java#L450-L461
valid
Gets the least significant bits of the content.
Of course, here is the Java code you requested: ```java public long getLeastSignificantBits() { long b; b = ((long)content[ 8] & 0xFF) << 56; b |= ((long)content[ 9] & 0xFF) << 48; b |= ((long)content[10] & 0xFF) << 40; b |= ((long)content[11] & 0xFF) << 32; b |= ((long...
Bedework/bw-util
bw-util-xml/src/main/java/org/bedework/util/xml/XmlEmit.java
XmlEmit.setProperty
public void setProperty(final String name, final String val) { if (props == null) { props = new Properties(); } props.setProperty(name, val); }
java
public void setProperty(final String name, final String val) { if (props == null) { props = new Properties(); } props.setProperty(name, val); }
[ "public", "void", "setProperty", "(", "final", "String", "name", ",", "final", "String", "val", ")", "{", "if", "(", "props", "==", "null", ")", "{", "props", "=", "new", "Properties", "(", ")", ";", "}", "props", ".", "setProperty", "(", "name", ","...
Allows applications to provide parameters to methods using this object class, <p>For example, a parameter "full" with value "true" might indicate a full XML dump is required. @param name @param val
[ "Allows", "applications", "to", "provide", "parameters", "to", "methods", "using", "this", "object", "class" ]
f51de4af3d7eb88fe63a0e22be8898a16c6cc3ad
https://github.com/Bedework/bw-util/blob/f51de4af3d7eb88fe63a0e22be8898a16c6cc3ad/bw-util-xml/src/main/java/org/bedework/util/xml/XmlEmit.java#L141-L147
train
Sets a property.
Of course, here is the Java code you requested: ```java public void setProperty(final String name, final String val) { if (props == null) { props = new Properties(); } props.setProperty(name, val); } ``` Hope this helps!
blademainer/common_utils
common_log/src/main/java/com/xiongyingqi/Logger.java
Logger.debug
public static void debug(Object object, Object message) { Class clazz = object.getClass(); debug(clazz, message); }
java
public static void debug(Object object, Object message) { Class clazz = object.getClass(); debug(clazz, message); }
[ "public", "static", "void", "debug", "(", "Object", "object", ",", "Object", "message", ")", "{", "Class", "clazz", "=", "object", ".", "getClass", "(", ")", ";", "debug", "(", "clazz", ",", "message", ")", ";", "}" ]
---------------------------- debug ----------------------------
[ "----------------------------", "debug", "----------------------------" ]
ef6baf0367c16de95a28caab67a7d5842a6d13db
https://github.com/blademainer/common_utils/blob/ef6baf0367c16de95a28caab67a7d5842a6d13db/common_log/src/main/java/com/xiongyingqi/Logger.java#L13-L16
test
Debug method.
Of course, here is the Java code you requested: ```java public static void debug(Object object, Object message) { Class clazz = object.getClass(); debug(clazz, message); } ``` Hope this helps!
mongodb/stitch-android-sdk
core/sdk/src/main/java/com/mongodb/stitch/core/auth/providers/userapikey/internal/CoreUserApiKeyAuthProviderClient.java
CoreUserApiKeyAuthProviderClient.enableApiKeyInternal
protected void enableApiKeyInternal(final ObjectId id) { final StitchAuthRequest.Builder reqBuilder = new StitchAuthRequest.Builder(); reqBuilder .withMethod(Method.PUT) .withPath(routes.getApiKeyEnableRouteForId(id.toHexString())) .withRefreshToken(); getRequestClient()....
java
protected void enableApiKeyInternal(final ObjectId id) { final StitchAuthRequest.Builder reqBuilder = new StitchAuthRequest.Builder(); reqBuilder .withMethod(Method.PUT) .withPath(routes.getApiKeyEnableRouteForId(id.toHexString())) .withRefreshToken(); getRequestClient()....
[ "protected", "void", "enableApiKeyInternal", "(", "final", "ObjectId", "id", ")", "{", "final", "StitchAuthRequest", ".", "Builder", "reqBuilder", "=", "new", "StitchAuthRequest", ".", "Builder", "(", ")", ";", "reqBuilder", ".", "withMethod", "(", "Method", "."...
Enables a user API key associated with the current user. @param id The id of the API key to enable.
[ "Enables", "a", "user", "API", "key", "associated", "with", "the", "current", "user", "." ]
159b9334b1f1a827285544be5ee20cdf7b04e4cc
https://github.com/mongodb/stitch-android-sdk/blob/159b9334b1f1a827285544be5ee20cdf7b04e4cc/core/sdk/src/main/java/com/mongodb/stitch/core/auth/providers/userapikey/internal/CoreUserApiKeyAuthProviderClient.java#L120-L127
train
Enable the API key.
Of course, here is the Java code you requested: ```java protected void enableApiKeyInternal(final ObjectId id) { final StitchAuthRequest.Builder reqBuilder = new StitchAuthRequest.Builder(); reqBuilder .withMethod(Method.PUT) .withPath(routes.getApiKeyEnableRouteForId(id.toHexString()))...
TomasMikula/EasyBind
src/main/java/org/fxmisc/easybind/MonadicWrapper.java
MonadicWrapper.selectProperty
@Override public <U> PropertyBinding<U> selectProperty( Function<? super T, ? extends Property<U>> f) { return EasyBind.selectProperty(delegate, f); }
java
@Override public <U> PropertyBinding<U> selectProperty( Function<? super T, ? extends Property<U>> f) { return EasyBind.selectProperty(delegate, f); }
[ "@", "Override", "public", "<", "U", ">", "PropertyBinding", "<", "U", ">", "selectProperty", "(", "Function", "<", "?", "super", "T", ",", "?", "extends", "Property", "<", "U", ">", ">", "f", ")", "{", "return", "EasyBind", ".", "selectProperty", "(",...
More efficient than the default, eliminates this wrapper from the chain.
[ "More", "efficient", "than", "the", "default", "eliminates", "this", "wrapper", "from", "the", "chain", "." ]
516947dec9de4977d8a817b7d1dfd320cc644298
https://github.com/TomasMikula/EasyBind/blob/516947dec9de4977d8a817b7d1dfd320cc644298/src/main/java/org/fxmisc/easybind/MonadicWrapper.java#L57-L61
train
Select a property from the delegate.
Of course, here is the Java code you requested: ```java @Override public <U> PropertyBinding<U> selectProperty( Function<? super T, ? extends Property<U>> f) { return EasyBind.selectProperty(delegate, f); } ``` Hope this helps!
finmath/finmath-lib
src/main/java/net/finmath/marketdata/model/bond/Bond.java
Bond.getCouponPayment
public double getCouponPayment(int periodIndex, AnalyticModel model) { ForwardCurve forwardCurve = model.getForwardCurve(forwardCurveName); if(forwardCurve == null && forwardCurveName != null && forwardCurveName.length() > 0) { throw new IllegalArgumentException("No forward curve with name '" + forwardCurveName...
java
public double getCouponPayment(int periodIndex, AnalyticModel model) { ForwardCurve forwardCurve = model.getForwardCurve(forwardCurveName); if(forwardCurve == null && forwardCurveName != null && forwardCurveName.length() > 0) { throw new IllegalArgumentException("No forward curve with name '" + forwardCurveName...
[ "public", "double", "getCouponPayment", "(", "int", "periodIndex", ",", "AnalyticModel", "model", ")", "{", "ForwardCurve", "forwardCurve", "=", "model", ".", "getForwardCurve", "(", "forwardCurveName", ")", ";", "if", "(", "forwardCurve", "==", "null", "&&", "f...
Returns the coupon payment of the period with the given index. The analytic model is needed in case of floating bonds. @param periodIndex The index of the period of interest. @param model The model under which the product is valued. @return The value of the coupon payment in the given period.
[ "Returns", "the", "coupon", "payment", "of", "the", "period", "with", "the", "given", "index", ".", "The", "analytic", "model", "is", "needed", "in", "case", "of", "floating", "bonds", "." ]
a3c067d52dd33feb97d851df6cab130e4116759f
https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java/net/finmath/marketdata/model/bond/Bond.java#L209-L222
train
Gets the coupon payment of the period.
Of course, here is the Java code you requested: ```java public double getCouponPayment(int periodIndex, AnalyticModel model) { ForwardCurve forwardCurve = model.getForwardCurve(forwardCurveName); if(forwardCurve == null && forwardCurveName != null && forwardCurveName.length() > 0) { throw new IllegalArgumentEx...
marklogic/marklogic-contentpump
mapreduce/src/main/java/com/marklogic/dom/ElementImpl.java
ElementImpl.isDefaultNamespace
@Override public boolean isDefaultNamespace(String namespaceURI) { String namespace = this.getNamespaceURI(); String prefix = this.getPrefix(); if (prefix == null || prefix.length() == 0) { if (namespaceURI == null) { return (namespace == namespaceURI); ...
java
@Override public boolean isDefaultNamespace(String namespaceURI) { String namespace = this.getNamespaceURI(); String prefix = this.getPrefix(); if (prefix == null || prefix.length() == 0) { if (namespaceURI == null) { return (namespace == namespaceURI); ...
[ "@", "Override", "public", "boolean", "isDefaultNamespace", "(", "String", "namespaceURI", ")", "{", "String", "namespace", "=", "this", ".", "getNamespaceURI", "(", ")", ";", "String", "prefix", "=", "this", ".", "getPrefix", "(", ")", ";", "if", "(", "pr...
{@inheritDoc}
[ "{" ]
4c41e4a953301f81a4c655efb2a847603dee8afc
https://github.com/marklogic/marklogic-contentpump/blob/4c41e4a953301f81a4c655efb2a847603dee8afc/mapreduce/src/main/java/com/marklogic/dom/ElementImpl.java#L143-L175
train
Override isDefaultNamespace method.
Of course, here is the Java code you requested: ```java @Override public boolean isDefaultNamespace(String namespaceURI) { String namespace = this.getNamespaceURI(); String prefix = this.getPrefix(); if (prefix == null || prefix.length() == 0) { if (namespaceURI == null) { ...
GoSimpleLLC/nbvcxz
src/main/java/me/gosimple/nbvcxz/resources/CharacterCaseUtil.java
CharacterCaseUtil.fractionOfStringUppercase
public static double fractionOfStringUppercase(String input) { if (input == null) { return 0; } double upperCasableCharacters = 0; double upperCount = 0; for (int i = 0; i < input.length(); i++) { char c = input.charAt(i); ...
java
public static double fractionOfStringUppercase(String input) { if (input == null) { return 0; } double upperCasableCharacters = 0; double upperCount = 0; for (int i = 0; i < input.length(); i++) { char c = input.charAt(i); ...
[ "public", "static", "double", "fractionOfStringUppercase", "(", "String", "input", ")", "{", "if", "(", "input", "==", "null", ")", "{", "return", "0", ";", "}", "double", "upperCasableCharacters", "=", "0", ";", "double", "upperCount", "=", "0", ";", "for...
Of the characters in the string that have an uppercase form, how many are uppercased? @param input Input string. @return The fraction of uppercased characters, with {@code 0.0d} meaning that all uppercasable characters are in lowercase and {@code 1.0d} that all of them are in uppercase.
[ "Of", "the", "characters", "in", "the", "string", "that", "have", "an", "uppercase", "form", "how", "many", "are", "uppercased?" ]
a86fb24680e646efdf78d6fda9d68a5410145f56
https://github.com/GoSimpleLLC/nbvcxz/blob/a86fb24680e646efdf78d6fda9d68a5410145f56/src/main/java/me/gosimple/nbvcxz/resources/CharacterCaseUtil.java#L12-L41
train
Returns the fraction of uppercase characters in a string.
Of course, here is the Java code you requested: ```java public static double fractionOfStringUppercase(String input) { if (input == null) { return 0; } double upperCasableCharacters = 0; double upperCount = 0; for (int i = 0; i < input.length(); i++) ...
OpenLiberty/open-liberty
dev/com.ibm.ws.diagnostics/src/com/ibm/ws/diagnostics/AbstractMBeanIntrospector.java
AbstractMBeanIntrospector.getMBeanServers
Collection<MBeanServer> getMBeanServers() { Collection<MBeanServer> mbeanServers = new HashSet<MBeanServer>(); mbeanServers.add(ManagementFactory.getPlatformMBeanServer()); mbeanServers.addAll(MBeanServerFactory.findMBeanServer(null)); return mbeanServers; }
java
Collection<MBeanServer> getMBeanServers() { Collection<MBeanServer> mbeanServers = new HashSet<MBeanServer>(); mbeanServers.add(ManagementFactory.getPlatformMBeanServer()); mbeanServers.addAll(MBeanServerFactory.findMBeanServer(null)); return mbeanServers; }
[ "Collection", "<", "MBeanServer", ">", "getMBeanServers", "(", ")", "{", "Collection", "<", "MBeanServer", ">", "mbeanServers", "=", "new", "HashSet", "<", "MBeanServer", ">", "(", ")", ";", "mbeanServers", ".", "add", "(", "ManagementFactory", ".", "getPlatfo...
Get the set MBean servers that includes the platform MBean server and any that can be found with {@link MBeanServerFactory#findMBeanServer(String) findMBeanServer}. @return the set of discovered mbean servers
[ "Get", "the", "set", "MBean", "servers", "that", "includes", "the", "platform", "MBean", "server", "and", "any", "that", "can", "be", "found", "with", "{", "@link", "MBeanServerFactory#findMBeanServer", "(", "String", ")", "findMBeanServer", "}", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.diagnostics/src/com/ibm/ws/diagnostics/AbstractMBeanIntrospector.java#L71-L76
train
Get the list of MBeanServer objects.
Of course, here is the Java code you requested: ```java Collection<MBeanServer> getMBeanServers() { Collection<MBeanServer> mbeanServers = new HashSet<MBeanServer>(); mbeanServers.add(ManagementFactory.getPlatformMBeanServer()); mbeanServers.addAll(MBeanServerFactory.findMBeanServer(null)); ...
FudanNLP/fnlp
fnlp-core/src/main/java/org/fnlp/nlp/cn/ner/TimeNormalizer.java
TimeNormalizer.TimeEx
private TimeUnit[] TimeEx(String tar,String timebase) { Matcher match; int startline=-1,endline=-1; String [] temp = new String[99]; int rpointer=0; TimeUnit[] Time_Result = null; match=patterns.matcher(tar); boolean startmark=true; while(match.find()) { startline=match.start(); ...
java
private TimeUnit[] TimeEx(String tar,String timebase) { Matcher match; int startline=-1,endline=-1; String [] temp = new String[99]; int rpointer=0; TimeUnit[] Time_Result = null; match=patterns.matcher(tar); boolean startmark=true; while(match.find()) { startline=match.start(); ...
[ "private", "TimeUnit", "[", "]", "TimeEx", "(", "String", "tar", ",", "String", "timebase", ")", "{", "Matcher", "match", ";", "int", "startline", "=", "-", "1", ",", "endline", "=", "-", "1", ";", "String", "[", "]", "temp", "=", "new", "String", ...
有基准时间输入的时间表达式识别 这是时间表达式识别的主方法, 通过已经构建的正则表达式对字符串进行识别,并按照预先定义的基准时间进行规范化 将所有别识别并进行规范化的时间表达式进行返回, 时间表达式通过TimeUnit类进行定义 @param String 输入文本字符串 @param String 输入基准时间 @return TimeUnit[] 时间表达式类型数组
[ "有基准时间输入的时间表达式识别" ]
ce258f3e4a5add2ba0b5e4cbac7cab2190af6659
https://github.com/FudanNLP/fnlp/blob/ce258f3e4a5add2ba0b5e4cbac7cab2190af6659/fnlp-core/src/main/java/org/fnlp/nlp/cn/ner/TimeNormalizer.java#L169-L217
train
Creates a list of TimeUnit objects that are associated with a single file in the system.
Of course, here is the Java code you requested: ```java private TimeUnit[] TimeEx(String tar,String timebase) { Matcher match; int startline=-1,endline=-1; String [] temp = new String[99]; int rpointer=0; TimeUnit[] Time_Result = null; match=patterns.matcher(tar); boolean startmark=true; ...
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/gd/GuaranteedTargetStream.java
GuaranteedTargetStream.flush
@Override public void flush() { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "flush"); // Cleanup any pending NACK alarms. Since we're flushing we don't // care about these anymore. synchronized (pendingAlarms) { ...
java
@Override public void flush() { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "flush"); // Cleanup any pending NACK alarms. Since we're flushing we don't // care about these anymore. synchronized (pendingAlarms) { ...
[ "@", "Override", "public", "void", "flush", "(", ")", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isEntryEnabled", "(", ")", ")", "SibTr", ".", "entry", "(", "this", ",", "tc", ",", "\"flush\"", ")", ";", ...
Flush this stream by discarding any nacks we may be waiting on (all such ticks automatically become finality). When this process is complete, any persistent state for the stream may be discarded. @throws GDException if an error occurs in writeRange.
[ "Flush", "this", "stream", "by", "discarding", "any", "nacks", "we", "may", "be", "waiting", "on", "(", "all", "such", "ticks", "automatically", "become", "finality", ")", ".", "When", "this", "process", "is", "complete", "any", "persistent", "state", "for",...
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/gd/GuaranteedTargetStream.java#L1765-L1801
train
Flush the cache of a single page.
Of course, here is the Java code you requested: ```java @Override public void flush() { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "flush"); // Cleanup any pending NACK alarms. Since we're flushing we don't // care about these any...
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/runtime/impl/LocalSubscriptionControl.java
LocalSubscriptionControl.getTopicSpace
public SIMPTopicSpaceControllable getTopicSpace() { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) { SibTr.entry(tc, "getTopicSpace"); SibTr.exit(tc, "getTopicSpace", topicspaceControl); } return topicspaceControl; }
java
public SIMPTopicSpaceControllable getTopicSpace() { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) { SibTr.entry(tc, "getTopicSpace"); SibTr.exit(tc, "getTopicSpace", topicspaceControl); } return topicspaceControl; }
[ "public", "SIMPTopicSpaceControllable", "getTopicSpace", "(", ")", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isEntryEnabled", "(", ")", ")", "{", "SibTr", ".", "entry", "(", "tc", ",", "\"getTopicSpace\"", ")", ...
/* (non-Javadoc) @see com.ibm.ws.sib.processor.runtime.SIMPLocalSubscriptionControllable#getTopicSpace()
[ "/", "*", "(", "non", "-", "Javadoc", ")" ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/runtime/impl/LocalSubscriptionControl.java#L84-L92
train
Get the TopicSpace control object
Of course, here is the Java code you requested: ```java public SIMPTopicSpaceControllable getTopicSpace() { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) { SibTr.entry(tc, "getTopicSpace"); SibTr.exit(tc, "getTopicSpace", topicspaceControl); } return topicspaceControl; ...
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.msgstore/src/com/ibm/ws/objectManager/FileLogInput.java
FileLogInput.getLogFileSize
protected long getLogFileSize() { if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled()) trace.entry(this, cclass , "getLogFileSIze" ); long logFileSize = sectorValidatedInputStream.header.fileSize; if (Tracing.isAnyTrac...
java
protected long getLogFileSize() { if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled()) trace.entry(this, cclass , "getLogFileSIze" ); long logFileSize = sectorValidatedInputStream.header.fileSize; if (Tracing.isAnyTrac...
[ "protected", "long", "getLogFileSize", "(", ")", "{", "if", "(", "Tracing", ".", "isAnyTracingEnabled", "(", ")", "&&", "trace", ".", "isEntryEnabled", "(", ")", ")", "trace", ".", "entry", "(", "this", ",", "cclass", ",", "\"getLogFileSIze\"", ")", ";", ...
/* (non-Javadoc) @see com.ibm.ws.objectManager.LogInput#getLogFileSize()
[ "/", "*", "(", "non", "-", "Javadoc", ")" ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.msgstore/src/com/ibm/ws/objectManager/FileLogInput.java#L112-L127
train
Get the log file size of the sector validated input stream.
Of course, here is the Java code you requested: ```java protected long getLogFileSize() { if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled()) trace.entry(this, cclass , "getLogFileSIze" ); long logFileSize = sectorValidatedIn...
looly/hutool
hutool-core/src/main/java/cn/hutool/core/io/resource/ResourceUtil.java
ResourceUtil.getResources
public static List<URL> getResources(String resource) { final Enumeration<URL> resources; try { resources = ClassLoaderUtil.getClassLoader().getResources(resource); } catch (IOException e) { throw new IORuntimeException(e); } return CollectionUtil.newArrayList(resources); }
java
public static List<URL> getResources(String resource) { final Enumeration<URL> resources; try { resources = ClassLoaderUtil.getClassLoader().getResources(resource); } catch (IOException e) { throw new IORuntimeException(e); } return CollectionUtil.newArrayList(resources); }
[ "public", "static", "List", "<", "URL", ">", "getResources", "(", "String", "resource", ")", "{", "final", "Enumeration", "<", "URL", ">", "resources", ";", "try", "{", "resources", "=", "ClassLoaderUtil", ".", "getClassLoader", "(", ")", ".", "getResources"...
获取指定路径下的资源列表<br> 路径格式必须为目录格式,用/分隔,例如: <pre> config/a spring/xml </pre> @param resource 资源路径 @return 资源列表
[ "获取指定路径下的资源列表<br", ">", "路径格式必须为目录格式", "用", "/", "分隔,例如", ":" ]
bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/io/resource/ResourceUtil.java#L119-L127
train
Gets the resources of the specified resource.
Of course, here is the Java code you requested: ```java public static List<URL> getResources(String resource) { final Enumeration<URL> resources; try { resources = ClassLoaderUtil.getClassLoader().getResources(resource); } catch (IOException e) { throw new IORuntimeException(e); } return Collect...
lviggiano/owner
owner-java8-extras/src/main/java/org/aeonbits/owner/util/bytesize/ByteSize.java
ByteSize.getBytes
public BigInteger getBytes(){ return value.multiply(unit.getFactor()).setScale(0, RoundingMode.CEILING).toBigIntegerExact(); }
java
public BigInteger getBytes(){ return value.multiply(unit.getFactor()).setScale(0, RoundingMode.CEILING).toBigIntegerExact(); }
[ "public", "BigInteger", "getBytes", "(", ")", "{", "return", "value", ".", "multiply", "(", "unit", ".", "getFactor", "(", ")", ")", ".", "setScale", "(", "0", ",", "RoundingMode", ".", "CEILING", ")", ".", "toBigIntegerExact", "(", ")", ";", "}" ]
Returns the number of bytes that this byte size represents after multiplying the unit factor with the value. Since the value part can be a represented by a decimal, there is some possibility of a rounding error. Therefore, the result of multiplying the value and the unit factor are always rounded towards positive infi...
[ "Returns", "the", "number", "of", "bytes", "that", "this", "byte", "size", "represents", "after", "multiplying", "the", "unit", "factor", "with", "the", "value", "." ]
1223ecfbe3c275b3b7c5ec13e9238c9bb888754f
https://github.com/lviggiano/owner/blob/1223ecfbe3c275b3b7c5ec13e9238c9bb888754f/owner-java8-extras/src/main/java/org/aeonbits/owner/util/bytesize/ByteSize.java#L91-L93
train
Get the bytes of this unit.
Of course, here is the Java code you requested: ```java public BigInteger getBytes(){ return value.multiply(unit.getFactor()).setScale(0, RoundingMode.CEILING).toBigIntegerExact(); } ``` Hope this helps!
plume-lib/options
src/main/java/org/plumelib/options/Options.java
Options.getEnumValue
private <T extends Enum<T>> T getEnumValue(Class<T> enumType, String name) { T[] constants = enumType.getEnumConstants(); if (constants == null) { throw new IllegalArgumentException(enumType.getName() + " is not an enum type"); } for (T constant : constants) { if (constant.name().equalsIgnor...
java
private <T extends Enum<T>> T getEnumValue(Class<T> enumType, String name) { T[] constants = enumType.getEnumConstants(); if (constants == null) { throw new IllegalArgumentException(enumType.getName() + " is not an enum type"); } for (T constant : constants) { if (constant.name().equalsIgnor...
[ "private", "<", "T", "extends", "Enum", "<", "T", ">", ">", "T", "getEnumValue", "(", "Class", "<", "T", ">", "enumType", ",", "String", "name", ")", "{", "T", "[", "]", "constants", "=", "enumType", ".", "getEnumConstants", "(", ")", ";", "if", "(...
Behaves like {@link java.lang.Enum#valueOf}, except that {@code name} is case-insensitive and hyphen-insensitive (hyphens can be used in place of underscores). This allows for greater flexibility when specifying enum types as command-line arguments. @param <T> the enum type whose constant is to be returned @param enum...
[ "Behaves", "like", "{", "@link", "java", ".", "lang", ".", "Enum#valueOf", "}", "except", "that", "{", "@code", "name", "}", "is", "case", "-", "insensitive", "and", "hyphen", "-", "insensitive", "(", "hyphens", "can", "be", "used", "in", "place", "of", ...
1bdd0ac7a1794bdf9dd373e279f69d43395154f0
https://github.com/plume-lib/options/blob/1bdd0ac7a1794bdf9dd373e279f69d43395154f0/src/main/java/org/plumelib/options/Options.java#L1460-L1473
train
Get the value of an enumeration constant.
Of course, here is the Java code you requested: ```java private <T extends Enum<T>> T getEnumValue(Class<T> enumType, String name) { T[] constants = enumType.getEnumConstants(); if (constants == null) { throw new IllegalArgumentException(enumType.getName() + " is not an enum type"); } for (T cons...
HsiangLeekwok/hlklib
hlklib/src/main/java/com/hlk/hlklib/lib/view/ChatBalloon.java
ChatBalloon.gotRightArrowPath
private Path gotRightArrowPath(int width, int height) { Path path = new Path(); RectF rectF; // 左上角 int diameter = cornerSizeLeftTop * 2; if (cornerSizeLeftTop > 0) { // 左上角圆角起点 path.moveTo(0, cornerSizeLeftTop); rectF = new RectF(0, 0, diamet...
java
private Path gotRightArrowPath(int width, int height) { Path path = new Path(); RectF rectF; // 左上角 int diameter = cornerSizeLeftTop * 2; if (cornerSizeLeftTop > 0) { // 左上角圆角起点 path.moveTo(0, cornerSizeLeftTop); rectF = new RectF(0, 0, diamet...
[ "private", "Path", "gotRightArrowPath", "(", "int", "width", ",", "int", "height", ")", "{", "Path", "path", "=", "new", "Path", "(", ")", ";", "RectF", "rectF", ";", "// 左上角", "int", "diameter", "=", "cornerSizeLeftTop", "*", "2", ";", "if", "(", "cor...
箭头在右侧
[ "箭头在右侧" ]
b122f6dcab7cec60c8e5455e0c31613d08bec6ad
https://github.com/HsiangLeekwok/hlklib/blob/b122f6dcab7cec60c8e5455e0c31613d08bec6ad/hlklib/src/main/java/com/hlk/hlklib/lib/view/ChatBalloon.java#L245-L318
train
gotRightArrowPath Method.
Of course, here is the Java code you requested: ```java private Path gotRightArrowPath(int width, int height) { Path path = new Path(); RectF rectF; // 左上角 int diameter = cornerSizeLeftTop * 2; if (cornerSizeLeftTop > 0) { // 左上角圆角起点 path.moveTo(0, corne...
Stratio/deep-spark
deep-core/src/main/java/com/stratio/deep/core/extractor/client/ExtractorClientHandler.java
ExtractorClientHandler.channelRead0
@Override protected void channelRead0(ChannelHandlerContext ctx, Response msg) throws Exception { answer.add(msg); }
java
@Override protected void channelRead0(ChannelHandlerContext ctx, Response msg) throws Exception { answer.add(msg); }
[ "@", "Override", "protected", "void", "channelRead0", "(", "ChannelHandlerContext", "ctx", ",", "Response", "msg", ")", "throws", "Exception", "{", "answer", ".", "add", "(", "msg", ")", ";", "}" ]
/* (non-Javadoc) @see io.netty.channel.SimpleChannelInboundHandler#channelRead0(io.netty.channel.ChannelHandlerContext , java.lang.Object)
[ "/", "*", "(", "non", "-", "Javadoc", ")" ]
b9621c9b7a6d996f80fce1d073d696a157bed095
https://github.com/Stratio/deep-spark/blob/b9621c9b7a6d996f80fce1d073d696a157bed095/deep-core/src/main/java/com/stratio/deep/core/extractor/client/ExtractorClientHandler.java#L72-L75
train
This method is called by the channel read method.
Of course, here is the Java code you requested: ```java @Override protected void channelRead0(ChannelHandlerContext ctx, Response msg) throws Exception { answer.add(msg); } ``` Hope this helps!
yidongnan/grpc-spring-boot-starter
grpc-server-spring-boot-autoconfigure/src/main/java/net/devh/boot/grpc/server/security/check/AccessPredicateVoter.java
AccessPredicateVoter.find
private AccessPredicateConfigAttribute find(final Collection<ConfigAttribute> attributes) { for (final ConfigAttribute attribute : attributes) { if (attribute instanceof AccessPredicateConfigAttribute) { return (AccessPredicateConfigAttribute) attribute; } } ...
java
private AccessPredicateConfigAttribute find(final Collection<ConfigAttribute> attributes) { for (final ConfigAttribute attribute : attributes) { if (attribute instanceof AccessPredicateConfigAttribute) { return (AccessPredicateConfigAttribute) attribute; } } ...
[ "private", "AccessPredicateConfigAttribute", "find", "(", "final", "Collection", "<", "ConfigAttribute", ">", "attributes", ")", "{", "for", "(", "final", "ConfigAttribute", "attribute", ":", "attributes", ")", "{", "if", "(", "attribute", "instanceof", "AccessPredi...
Finds the first AccessPredicateConfigAttribute in the given collection. @param attributes The attributes to search in. @return The first found AccessPredicateConfigAttribute or null, if no such elements were found.
[ "Finds", "the", "first", "AccessPredicateConfigAttribute", "in", "the", "given", "collection", "." ]
07f8853cfafc9707584f2371aff012e590217b85
https://github.com/yidongnan/grpc-spring-boot-starter/blob/07f8853cfafc9707584f2371aff012e590217b85/grpc-server-spring-boot-autoconfigure/src/main/java/net/devh/boot/grpc/server/security/check/AccessPredicateVoter.java#L60-L67
train
Find access predicate attribute.
Of course, here is the Java code you requested: ```java private AccessPredicateConfigAttribute find(final Collection<ConfigAttribute> attributes) { for (final ConfigAttribute attribute : attributes) { if (attribute instanceof AccessPredicateConfigAttribute) { return (AccessPredicate...
VoltDB/voltdb
src/frontend/org/voltdb/expressions/ExpressionUtil.java
ExpressionUtil.eliminateDuplicates
public static AbstractExpression eliminateDuplicates(Collection<AbstractExpression> exprList) { // Eliminate duplicates by building the map of expression's ids, values. Map<String, AbstractExpression> subExprMap = new HashMap<String, AbstractExpression>(); for (AbstractExpression subExpr : exprL...
java
public static AbstractExpression eliminateDuplicates(Collection<AbstractExpression> exprList) { // Eliminate duplicates by building the map of expression's ids, values. Map<String, AbstractExpression> subExprMap = new HashMap<String, AbstractExpression>(); for (AbstractExpression subExpr : exprL...
[ "public", "static", "AbstractExpression", "eliminateDuplicates", "(", "Collection", "<", "AbstractExpression", ">", "exprList", ")", "{", "// Eliminate duplicates by building the map of expression's ids, values.", "Map", "<", "String", ",", "AbstractExpression", ">", "subExprMa...
Method to simplify an expression by eliminating identical subexpressions (same id) If the expression is a logical conjunction of the form e1 AND e2 AND e3 AND e4, and subexpression e1 is identical to the subexpression e2 the simplified expression is e1 AND e3 AND e4. @param expr to simplify @return simplified expressi...
[ "Method", "to", "simplify", "an", "expression", "by", "eliminating", "identical", "subexpressions", "(", "same", "id", ")", "If", "the", "expression", "is", "a", "logical", "conjunction", "of", "the", "form", "e1", "AND", "e2", "AND", "e3", "AND", "e4", "a...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/expressions/ExpressionUtil.java#L567-L575
train
Eliminate duplicates in a collection of expressions.
Of course, here is the Java code you requested: ```java public static AbstractExpression eliminateDuplicates(Collection<AbstractExpression> exprList) { // Eliminate duplicates by building the map of expression's ids, values. Map<String, AbstractExpression> subExprMap = new HashMap<String, AbstractExpre...
aws/aws-sdk-java
aws-java-sdk-greengrass/src/main/java/com/amazonaws/services/greengrass/model/ListGroupVersionsResult.java
ListGroupVersionsResult.withVersions
public ListGroupVersionsResult withVersions(VersionInformation... versions) { if (this.versions == null) { setVersions(new java.util.ArrayList<VersionInformation>(versions.length)); } for (VersionInformation ele : versions) { this.versions.add(ele); } retu...
java
public ListGroupVersionsResult withVersions(VersionInformation... versions) { if (this.versions == null) { setVersions(new java.util.ArrayList<VersionInformation>(versions.length)); } for (VersionInformation ele : versions) { this.versions.add(ele); } retu...
[ "public", "ListGroupVersionsResult", "withVersions", "(", "VersionInformation", "...", "versions", ")", "{", "if", "(", "this", ".", "versions", "==", "null", ")", "{", "setVersions", "(", "new", "java", ".", "util", ".", "ArrayList", "<", "VersionInformation", ...
Information about a version. <p> <b>NOTE:</b> This method appends the values to the existing list (if any). Use {@link #setVersions(java.util.Collection)} or {@link #withVersions(java.util.Collection)} if you want to override the existing values. </p> @param versions Information about a version. @return Returns a refe...
[ "Information", "about", "a", "version", ".", "<p", ">", "<b", ">", "NOTE", ":", "<", "/", "b", ">", "This", "method", "appends", "the", "values", "to", "the", "existing", "list", "(", "if", "any", ")", ".", "Use", "{", "@link", "#setVersions", "(", ...
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-greengrass/src/main/java/com/amazonaws/services/greengrass/model/ListGroupVersionsResult.java#L104-L112
train
A list of the ID and version information.
Of course, here is the Java code you requested: ```java public ListGroupVersionsResult withVersions(VersionInformation... versions) { if (this.versions == null) { setVersions(new java.util.ArrayList<VersionInformation>(versions.length)); } for (VersionInformation ele : versions) { ...
yan74/afplib
org.afplib/src/main/java/org/afplib/afplib/impl/AfplibPackageImpl.java
AfplibPackageImpl.getBPF
public EClass getBPF() { if (bpfEClass == null) { bpfEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(AfplibPackage.eNS_URI).getEClassifiers().get(216); } return bpfEClass; }
java
public EClass getBPF() { if (bpfEClass == null) { bpfEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(AfplibPackage.eNS_URI).getEClassifiers().get(216); } return bpfEClass; }
[ "public", "EClass", "getBPF", "(", ")", "{", "if", "(", "bpfEClass", "==", "null", ")", "{", "bpfEClass", "=", "(", "EClass", ")", "EPackage", ".", "Registry", ".", "INSTANCE", ".", "getEPackage", "(", "AfplibPackage", ".", "eNS_URI", ")", ".", "getEClas...
<!-- 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/AfplibPackageImpl.java#L4687-L4692
train
Get the BPFEClass
Of course, here is the Java code you requested: ```java public EClass getBPF() { if (bpfEClass == null) { bpfEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(AfplibPackage.eNS_URI).getEClassifiers().get(216); } return bpfEClass; } ``` Hope this helps!
jenkinsci/jenkins
core/src/main/java/jenkins/install/InstallState.java
InstallState.readResolve
@Deprecated protected Object readResolve() { // If we get invalid state from the configuration, fallback to unknown if (StringUtils.isBlank(name)) { LOGGER.log(Level.WARNING, "Read install state with blank name: ''{0}''. It will be ignored", name); return UNKNOWN; } ...
java
@Deprecated protected Object readResolve() { // If we get invalid state from the configuration, fallback to unknown if (StringUtils.isBlank(name)) { LOGGER.log(Level.WARNING, "Read install state with blank name: ''{0}''. It will be ignored", name); return UNKNOWN; } ...
[ "@", "Deprecated", "protected", "Object", "readResolve", "(", ")", "{", "// If we get invalid state from the configuration, fallback to unknown", "if", "(", "StringUtils", ".", "isBlank", "(", "name", ")", ")", "{", "LOGGER", ".", "log", "(", "Level", ".", "WARNING"...
The actual class name is irrelevant; this is functionally an enum. <p>Creating a {@code writeReplace} does not help much since XStream then just saves: {@code <installState class="jenkins.install.InstallState$CreateAdminUser" resolves-to="jenkins.install.InstallState">} @see #UNUSED_INNER_CLASSES @deprecated Should no ...
[ "The", "actual", "class", "name", "is", "irrelevant", ";", "this", "is", "functionally", "an", "enum", ".", "<p", ">", "Creating", "a", "{" ]
44c4d3989232082c254d27ae360aa810669f44b7
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/jenkins/install/InstallState.java#L253-L269
train
This method is called by the derived classes to read the result of the install state.
Of course, here is the Java code you requested: ```java @Deprecated protected Object readResolve() { // If we get invalid state from the configuration, fallback to unknown if (StringUtils.isBlank(name)) { LOGGER.log(Level.WARNING, "Read install state with blank name: ''{0}''. It will be...
icegem/icegem
icegem-core/src/main/java/com/googlecode/icegem/serialization/codegen/DataSerializerGenerator.java
DataSerializerGenerator.generateDataSerializerClasses
public static synchronized List<Class<?>> generateDataSerializerClasses(ClassLoader classLoader, List<Class<?>> classList, String outputDir) throws CannotCompileException, InvalidClassException { checkClassesValid(classList); List<CtClass> dataSerializerClassList = new ArrayList<CtClass>();...
java
public static synchronized List<Class<?>> generateDataSerializerClasses(ClassLoader classLoader, List<Class<?>> classList, String outputDir) throws CannotCompileException, InvalidClassException { checkClassesValid(classList); List<CtClass> dataSerializerClassList = new ArrayList<CtClass>();...
[ "public", "static", "synchronized", "List", "<", "Class", "<", "?", ">", ">", "generateDataSerializerClasses", "(", "ClassLoader", "classLoader", ",", "List", "<", "Class", "<", "?", ">", ">", "classList", ",", "String", "outputDir", ")", "throws", "CannotComp...
2-stage compilation scheme of group of classes: <p> hack from http://www.csg.is.titech.ac.jp/~chiba/javassist/tutorial/tutorial2.html#add <p> order of return of serializer-classes in response corresponds to order of arg-classes
[ "2", "-", "stage", "compilation", "scheme", "of", "group", "of", "classes", ":", "<p", ">", "hack", "from", "http", ":", "//", "www", ".", "csg", ".", "is", ".", "titech", ".", "ac", ".", "jp", "/", "~chiba", "/", "javassist", "/", "tutorial", "/",...
d5dbb82c4913f191738ad6aad9edd9c0a3bf0dfc
https://github.com/icegem/icegem/blob/d5dbb82c4913f191738ad6aad9edd9c0a3bf0dfc/icegem-core/src/main/java/com/googlecode/icegem/serialization/codegen/DataSerializerGenerator.java#L99-L187
valid
Generate data serializer classes.
Of course, here is the Java code you requested: ```java public static synchronized List<Class<?>> generateDataSerializerClasses(ClassLoader classLoader, List<Class<?>> classList, String outputDir) throws CannotCompileException, InvalidClassException { checkClassesValid(classList); List<CtC...
alkacon/opencms-core
src/org/opencms/workplace/explorer/CmsResourceUtil.java
CmsResourceUtil.isEditable
public boolean isEditable() { if (m_request == null) { return false; } CmsExplorerTypeSettings settings = OpenCms.getWorkplaceManager().getExplorerTypeSetting(getResourceTypeName()); if (settings != null) { String rightSite = OpenCms.getSiteManager().getSiteRoot(...
java
public boolean isEditable() { if (m_request == null) { return false; } CmsExplorerTypeSettings settings = OpenCms.getWorkplaceManager().getExplorerTypeSetting(getResourceTypeName()); if (settings != null) { String rightSite = OpenCms.getSiteManager().getSiteRoot(...
[ "public", "boolean", "isEditable", "(", ")", "{", "if", "(", "m_request", "==", "null", ")", "{", "return", "false", ";", "}", "CmsExplorerTypeSettings", "settings", "=", "OpenCms", ".", "getWorkplaceManager", "(", ")", ".", "getExplorerTypeSetting", "(", "get...
Returns <code>true</code> if the given resource is editable by the current user.<p> Returns <code>false</code> if no request context is set.<p> @return <code>true</code> if the given resource is editable by the current user
[ "Returns", "<code", ">", "true<", "/", "code", ">", "if", "the", "given", "resource", "is", "editable", "by", "the", "current", "user", ".", "<p", ">" ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/workplace/explorer/CmsResourceUtil.java#L1307-L1327
train
Checks if the resource is editable.
Of course, here is the Java code you requested: ```java public boolean isEditable() { if (m_request == null) { return false; } CmsExplorerTypeSettings settings = OpenCms.getWorkplaceManager().getExplorerTypeSetting(getResourceTypeName()); if (settings != null) { ...
ReactiveX/RxJava
src/main/java/io/reactivex/Observable.java
Observable.buffer
@CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final <U extends Collection<? super T>> Observable<U> buffer(int count, Callable<U> bufferSupplier) { return buffer(count, count, bufferSupplier); }
java
@CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final <U extends Collection<? super T>> Observable<U> buffer(int count, Callable<U> bufferSupplier) { return buffer(count, count, bufferSupplier); }
[ "@", "CheckReturnValue", "@", "SchedulerSupport", "(", "SchedulerSupport", ".", "NONE", ")", "public", "final", "<", "U", "extends", "Collection", "<", "?", "super", "T", ">", ">", "Observable", "<", "U", ">", "buffer", "(", "int", "count", ",", "Callable"...
Returns an Observable that emits buffers of items it collects from the source ObservableSource. The resulting ObservableSource emits connected, non-overlapping buffers, each containing {@code count} items. When the source ObservableSource completes, the resulting ObservableSource emits the current buffer and propagates...
[ "Returns", "an", "Observable", "that", "emits", "buffers", "of", "items", "it", "collects", "from", "the", "source", "ObservableSource", ".", "The", "resulting", "ObservableSource", "emits", "connected", "non", "-", "overlapping", "buffers", "each", "containing", ...
ac84182aa2bd866b53e01c8e3fe99683b882c60e
https://github.com/ReactiveX/RxJava/blob/ac84182aa2bd866b53e01c8e3fe99683b882c60e/src/main/java/io/reactivex/Observable.java#L5668-L5672
test
Creates a sequence of items from the source source.
Of course, here is the Java code you requested: ```java @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final <U extends Collection<? super T>> Observable<U> buffer(int count, Callable<U> bufferSupplier) { return buffer(count, count, bufferSupplier); } ``` Hope this helps!
liferay/com-liferay-commerce
commerce-tax-api/src/main/java/com/liferay/commerce/tax/service/CommerceTaxMethodLocalServiceWrapper.java
CommerceTaxMethodLocalServiceWrapper.getCommerceTaxMethods
@Override public java.util.List<com.liferay.commerce.tax.model.CommerceTaxMethod> getCommerceTaxMethods( int start, int end) { return _commerceTaxMethodLocalService.getCommerceTaxMethods(start, end); }
java
@Override public java.util.List<com.liferay.commerce.tax.model.CommerceTaxMethod> getCommerceTaxMethods( int start, int end) { return _commerceTaxMethodLocalService.getCommerceTaxMethods(start, end); }
[ "@", "Override", "public", "java", ".", "util", ".", "List", "<", "com", ".", "liferay", ".", "commerce", ".", "tax", ".", "model", ".", "CommerceTaxMethod", ">", "getCommerceTaxMethods", "(", "int", "start", ",", "int", "end", ")", "{", "return", "_comm...
Returns a range of all the commerce tax methods. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>...
[ "Returns", "a", "range", "of", "all", "the", "commerce", "tax", "methods", "." ]
9e54362d7f59531fc684016ba49ee7cdc3a2f22b
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-tax-api/src/main/java/com/liferay/commerce/tax/service/CommerceTaxMethodLocalServiceWrapper.java#L243-L247
train
Returns a range of commerce tax methods.
Of course, here is the Java code you requested: ```java @Override public java.util.List<com.liferay.commerce.tax.model.CommerceTaxMethod> getCommerceTaxMethods( int start, int end) { return _commerceTaxMethodLocalService.getCommerceTaxMethods(start, end); } ``` Hope this helps!