repository_name
stringlengths
7
58
func_path_in_repository
stringlengths
11
218
func_name
stringlengths
4
140
whole_func_string
stringlengths
153
5.32k
language
stringclasses
1 value
func_code_string
stringlengths
72
4k
func_code_tokens
listlengths
20
832
func_documentation_string
stringlengths
61
2k
func_documentation_tokens
listlengths
1
647
split_name
stringclasses
1 value
func_code_url
stringlengths
102
339
google/error-prone-javac
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractExecutableMemberWriter.java
AbstractExecutableMemberWriter.addParameters
protected void addParameters(ExecutableElement member, Content htmltree, int indentSize) { """ Add all the parameters for the executable member. @param member the member to write parameters for. @param htmltree the content tree to which the parameters information will be added. """ addParameters(me...
java
protected void addParameters(ExecutableElement member, Content htmltree, int indentSize) { addParameters(member, true, htmltree, indentSize); }
[ "protected", "void", "addParameters", "(", "ExecutableElement", "member", ",", "Content", "htmltree", ",", "int", "indentSize", ")", "{", "addParameters", "(", "member", ",", "true", ",", "htmltree", ",", "indentSize", ")", ";", "}" ]
Add all the parameters for the executable member. @param member the member to write parameters for. @param htmltree the content tree to which the parameters information will be added.
[ "Add", "all", "the", "parameters", "for", "the", "executable", "member", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractExecutableMemberWriter.java#L189-L191
lucee/Lucee
core/src/main/java/lucee/runtime/op/date/DateCaster.java
DateCaster.toDateAdvanced
public static DateTime toDateAdvanced(String str, TimeZone timezone) throws PageException { """ converts a Object to a DateTime Object (Advanced but slower) @param str String to Convert @param timezone @return Date Time Object @throws PageException """ DateTime dt = toDateAdvanced(str, timezone, null); ...
java
public static DateTime toDateAdvanced(String str, TimeZone timezone) throws PageException { DateTime dt = toDateAdvanced(str, timezone, null); if (dt == null) throw new ExpressionException("can't cast [" + str + "] to date value"); return dt; }
[ "public", "static", "DateTime", "toDateAdvanced", "(", "String", "str", ",", "TimeZone", "timezone", ")", "throws", "PageException", "{", "DateTime", "dt", "=", "toDateAdvanced", "(", "str", ",", "timezone", ",", "null", ")", ";", "if", "(", "dt", "==", "n...
converts a Object to a DateTime Object (Advanced but slower) @param str String to Convert @param timezone @return Date Time Object @throws PageException
[ "converts", "a", "Object", "to", "a", "DateTime", "Object", "(", "Advanced", "but", "slower", ")" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/op/date/DateCaster.java#L104-L108
sarl/sarl
main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/keywords/GrammarKeywordAccessFragment2.java
GrammarKeywordAccessFragment2.generateMembersFromConfig
protected StringConcatenationClient generateMembersFromConfig(Set<String> addedKeywords, Map<String, String> getters) { """ Generate the members of the accessors. @param addedKeywords the set of keywords that are added to the output. @param getters filled by this function with the getters' names. @return the ...
java
protected StringConcatenationClient generateMembersFromConfig(Set<String> addedKeywords, Map<String, String> getters) { final List<StringConcatenationClient> clients = new ArrayList<>(); for (final String keyword : this.configuration.getKeywords()) { final String id = keyword.toLowerCase(); if (!addedKeywords...
[ "protected", "StringConcatenationClient", "generateMembersFromConfig", "(", "Set", "<", "String", ">", "addedKeywords", ",", "Map", "<", "String", ",", "String", ">", "getters", ")", "{", "final", "List", "<", "StringConcatenationClient", ">", "clients", "=", "new...
Generate the members of the accessors. @param addedKeywords the set of keywords that are added to the output. @param getters filled by this function with the getters' names. @return the content.
[ "Generate", "the", "members", "of", "the", "accessors", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/keywords/GrammarKeywordAccessFragment2.java#L200-L224
networknt/light-4j
client/src/main/java/org/apache/hc/core5/util/copied/ByteArrayBuffer.java
ByteArrayBuffer.indexOf
public int indexOf(final byte b, final int from, final int to) { """ Returns the index within this buffer of the first occurrence of the specified byte, starting the search at the specified {@code beginIndex} and finishing at {@code endIndex}. If no such byte occurs in this buffer within the specified bounds, ...
java
public int indexOf(final byte b, final int from, final int to) { int beginIndex = from; if (beginIndex < 0) { beginIndex = 0; } int endIndex = to; if (endIndex > this.len) { endIndex = this.len; } if (beginIndex > endIndex) { re...
[ "public", "int", "indexOf", "(", "final", "byte", "b", ",", "final", "int", "from", ",", "final", "int", "to", ")", "{", "int", "beginIndex", "=", "from", ";", "if", "(", "beginIndex", "<", "0", ")", "{", "beginIndex", "=", "0", ";", "}", "int", ...
Returns the index within this buffer of the first occurrence of the specified byte, starting the search at the specified {@code beginIndex} and finishing at {@code endIndex}. If no such byte occurs in this buffer within the specified bounds, {@code -1} is returned. <p> There is no restriction on the value of {@code beg...
[ "Returns", "the", "index", "within", "this", "buffer", "of", "the", "first", "occurrence", "of", "the", "specified", "byte", "starting", "the", "search", "at", "the", "specified", "{", "@code", "beginIndex", "}", "and", "finishing", "at", "{", "@code", "endI...
train
https://github.com/networknt/light-4j/blob/2a60257c60663684c8f6dc8b5ea3cf184e534db6/client/src/main/java/org/apache/hc/core5/util/copied/ByteArrayBuffer.java#L309-L327
jtmelton/appsensor
appsensor-core/src/main/java/org/owasp/appsensor/core/util/XmlUtils.java
XmlUtils.getElementQualifiedName
public static String getElementQualifiedName(XMLStreamReader xmlReader, Map<String, String> namespaces) { """ Helper method for getting qualified name from stax reader given a set of specified schema namespaces @param xmlReader stax reader @param namespaces specified schema namespaces @return qualified elemen...
java
public static String getElementQualifiedName(XMLStreamReader xmlReader, Map<String, String> namespaces) { String namespaceUri = null; String localName = null; switch(xmlReader.getEventType()) { case XMLStreamConstants.START_ELEMENT: case XMLStreamConstants.END_ELEMENT: namespaceUri = xmlReader.getNam...
[ "public", "static", "String", "getElementQualifiedName", "(", "XMLStreamReader", "xmlReader", ",", "Map", "<", "String", ",", "String", ">", "namespaces", ")", "{", "String", "namespaceUri", "=", "null", ";", "String", "localName", "=", "null", ";", "switch", ...
Helper method for getting qualified name from stax reader given a set of specified schema namespaces @param xmlReader stax reader @param namespaces specified schema namespaces @return qualified element name
[ "Helper", "method", "for", "getting", "qualified", "name", "from", "stax", "reader", "given", "a", "set", "of", "specified", "schema", "namespaces" ]
train
https://github.com/jtmelton/appsensor/blob/c3b4e9ada50fdee974e0d618ec4bdfabc2163798/appsensor-core/src/main/java/org/owasp/appsensor/core/util/XmlUtils.java#L97-L113
baidubce/bce-sdk-java
src/main/java/com/baidubce/services/bos/model/CompleteMultipartUploadRequest.java
CompleteMultipartUploadRequest.setPartETags
public void setPartETags(List<PartETag> partETags) { """ Sets the list of part numbers and ETags that identify the individual parts of the multipart upload to complete. @param partETags The list of part numbers and ETags that identify the individual parts of the multipart upload to complete. """ c...
java
public void setPartETags(List<PartETag> partETags) { checkNotNull(partETags, "partETags should not be null."); for (int i = 0; i < partETags.size(); ++i) { PartETag partETag = partETags.get(i); checkNotNull(partETag, "partETags[%s] should not be null.", i); int partNu...
[ "public", "void", "setPartETags", "(", "List", "<", "PartETag", ">", "partETags", ")", "{", "checkNotNull", "(", "partETags", ",", "\"partETags should not be null.\"", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "partETags", ".", "size", "("...
Sets the list of part numbers and ETags that identify the individual parts of the multipart upload to complete. @param partETags The list of part numbers and ETags that identify the individual parts of the multipart upload to complete.
[ "Sets", "the", "list", "of", "part", "numbers", "and", "ETags", "that", "identify", "the", "individual", "parts", "of", "the", "multipart", "upload", "to", "complete", "." ]
train
https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/bos/model/CompleteMultipartUploadRequest.java#L170-L192
skyscreamer/JSONassert
src/main/java/org/skyscreamer/jsonassert/JSONAssert.java
JSONAssert.assertEquals
public static void assertEquals(String expectedStr, JSONObject actual, JSONCompareMode compareMode) throws JSONException { """ Asserts that the JSONObject provided matches the expected string. If it isn't it throws an {@link AssertionError}. @param expectedStr Expected JSON string @param actual J...
java
public static void assertEquals(String expectedStr, JSONObject actual, JSONCompareMode compareMode) throws JSONException { assertEquals("", expectedStr, actual, compareMode); }
[ "public", "static", "void", "assertEquals", "(", "String", "expectedStr", ",", "JSONObject", "actual", ",", "JSONCompareMode", "compareMode", ")", "throws", "JSONException", "{", "assertEquals", "(", "\"\"", ",", "expectedStr", ",", "actual", ",", "compareMode", "...
Asserts that the JSONObject provided matches the expected string. If it isn't it throws an {@link AssertionError}. @param expectedStr Expected JSON string @param actual JSONObject to compare @param compareMode Specifies which comparison mode to use @throws JSONException JSON parsing error
[ "Asserts", "that", "the", "JSONObject", "provided", "matches", "the", "expected", "string", ".", "If", "it", "isn", "t", "it", "throws", "an", "{", "@link", "AssertionError", "}", "." ]
train
https://github.com/skyscreamer/JSONassert/blob/830efcf546d07f955d8a213cc5c8a1db34d78f04/src/main/java/org/skyscreamer/jsonassert/JSONAssert.java#L126-L129
intendia-oss/rxjava-gwt
src/main/modified/io/reactivex/super/io/reactivex/plugins/RxJavaPlugins.java
RxJavaPlugins.createNewThreadScheduler
@NonNull @GwtIncompatible public static Scheduler createNewThreadScheduler(@NonNull ThreadFactory threadFactory) { """ Create an instance of the default {@link Scheduler} used for {@link Schedulers#newThread()} except using {@code threadFactory} for thread creation. <p>History: 2.0.5 - experimental @par...
java
@NonNull @GwtIncompatible public static Scheduler createNewThreadScheduler(@NonNull ThreadFactory threadFactory) { return new NewThreadScheduler(ObjectHelper.requireNonNull(threadFactory, "threadFactory is null")); }
[ "@", "NonNull", "@", "GwtIncompatible", "public", "static", "Scheduler", "createNewThreadScheduler", "(", "@", "NonNull", "ThreadFactory", "threadFactory", ")", "{", "return", "new", "NewThreadScheduler", "(", "ObjectHelper", ".", "requireNonNull", "(", "threadFactory",...
Create an instance of the default {@link Scheduler} used for {@link Schedulers#newThread()} except using {@code threadFactory} for thread creation. <p>History: 2.0.5 - experimental @param threadFactory thread factory to use for creating worker threads. Note that this takes precedence over any system properties for conf...
[ "Create", "an", "instance", "of", "the", "default", "{" ]
train
https://github.com/intendia-oss/rxjava-gwt/blob/8d5635b12ce40da99e76b59dc6bfe6fc2fffc1fa/src/main/modified/io/reactivex/super/io/reactivex/plugins/RxJavaPlugins.java#L1239-L1243
julianhyde/sqlline
src/main/java/sqlline/SqlLine.java
SqlLine.mainWithInputRedirection
public static Status mainWithInputRedirection(String[] args, InputStream inputStream) throws IOException { """ Starts the program with redirected input. <p>For redirected output, use {@link #setOutputStream} and {@link #setErrorStream}. <p>Exits with 0 on success, 1 on invalid arguments, and 2 on any ...
java
public static Status mainWithInputRedirection(String[] args, InputStream inputStream) throws IOException { return start(args, inputStream, false); }
[ "public", "static", "Status", "mainWithInputRedirection", "(", "String", "[", "]", "args", ",", "InputStream", "inputStream", ")", "throws", "IOException", "{", "return", "start", "(", "args", ",", "inputStream", ",", "false", ")", ";", "}" ]
Starts the program with redirected input. <p>For redirected output, use {@link #setOutputStream} and {@link #setErrorStream}. <p>Exits with 0 on success, 1 on invalid arguments, and 2 on any other error. @param args same as main() @param inputStream redirected input, or null to use standard input @return Stat...
[ "Starts", "the", "program", "with", "redirected", "input", "." ]
train
https://github.com/julianhyde/sqlline/blob/7577f3ebaca0897a9ff01d1553d4576487e1d2c3/src/main/java/sqlline/SqlLine.java#L218-L221
pippo-java/pippo
pippo-core/src/main/java/ro/pippo/core/Messages.java
Messages.getWithDefault
public String getWithDefault(String key, String defaultMessage, String language, Object... args) { """ Gets the requested localized message. <p/> <p> The current Request and Response are used to help determine the messages resource to use. <ol> <li>Exact locale match, return the registered locale message <l...
java
public String getWithDefault(String key, String defaultMessage, String language, Object... args) { String value = get(key, language, args); if (value.equals(key)) { // key does not exist, format default message value = formatMessage(defaultMessage, language, args); } ...
[ "public", "String", "getWithDefault", "(", "String", "key", ",", "String", "defaultMessage", ",", "String", "language", ",", "Object", "...", "args", ")", "{", "String", "value", "=", "get", "(", "key", ",", "language", ",", "args", ")", ";", "if", "(", ...
Gets the requested localized message. <p/> <p> The current Request and Response are used to help determine the messages resource to use. <ol> <li>Exact locale match, return the registered locale message <li>Language match, but not a locale match, return the registered language message <li>Return supplied default messag...
[ "Gets", "the", "requested", "localized", "message", ".", "<p", "/", ">", "<p", ">", "The", "current", "Request", "and", "Response", "are", "used", "to", "help", "determine", "the", "messages", "resource", "to", "use", ".", "<ol", ">", "<li", ">", "Exact"...
train
https://github.com/pippo-java/pippo/blob/cb5ccb453bffcc3cf386adc660674812d10b9726/pippo-core/src/main/java/ro/pippo/core/Messages.java#L178-L186
baidubce/bce-sdk-java
src/main/java/com/baidubce/services/bcc/BccClient.java
BccClient.attachVolume
public AttachVolumeResponse attachVolume(String volumeId, String instanceId) { """ Attaching the specified volume to a specified instance. You can attach the specified volume to a specified instance only when the volume is Available and the instance is Running or Stopped , otherwise,it's will get <code>409</c...
java
public AttachVolumeResponse attachVolume(String volumeId, String instanceId) { return attachVolume(new AttachVolumeRequest().withVolumeId(volumeId).withInstanceId(instanceId)); }
[ "public", "AttachVolumeResponse", "attachVolume", "(", "String", "volumeId", ",", "String", "instanceId", ")", "{", "return", "attachVolume", "(", "new", "AttachVolumeRequest", "(", ")", ".", "withVolumeId", "(", "volumeId", ")", ".", "withInstanceId", "(", "insta...
Attaching the specified volume to a specified instance. You can attach the specified volume to a specified instance only when the volume is Available and the instance is Running or Stopped , otherwise,it's will get <code>409</code> errorCode. @param volumeId The id of the volume which will be attached to specified in...
[ "Attaching", "the", "specified", "volume", "to", "a", "specified", "instance", "." ]
train
https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/bcc/BccClient.java#L963-L965
lightblueseas/file-worker
src/main/java/de/alpharogroup/file/search/PathFinder.java
PathFinder.getRelativePathTo
public static File getRelativePathTo(File parent, final List<String> folders) { """ Gets the file or directory from the given parent File object and the relative path given over the list as String objects. @param parent The parent directory. @param folders The list with the directories and optional a filena...
java
public static File getRelativePathTo(File parent, final List<String> folders) { for (final String string : folders) { final File nextFolder = new File(parent, string); parent = nextFolder; } return parent; }
[ "public", "static", "File", "getRelativePathTo", "(", "File", "parent", ",", "final", "List", "<", "String", ">", "folders", ")", "{", "for", "(", "final", "String", "string", ":", "folders", ")", "{", "final", "File", "nextFolder", "=", "new", "File", "...
Gets the file or directory from the given parent File object and the relative path given over the list as String objects. @param parent The parent directory. @param folders The list with the directories and optional a filename. @return the resulted file or directory from the given arguments.
[ "Gets", "the", "file", "or", "directory", "from", "the", "given", "parent", "File", "object", "and", "the", "relative", "path", "given", "over", "the", "list", "as", "String", "objects", "." ]
train
https://github.com/lightblueseas/file-worker/blob/2c81de10fb5d68de64c1abc3ed64ca681ce76da8/src/main/java/de/alpharogroup/file/search/PathFinder.java#L138-L146
derari/cthul
objects/src/main/java/org/cthul/objects/Boxing.java
Boxing.deepBox
public static Object deepBox(Object src) { """ Returns any multidimensional array into an array of boxed values. @param src source array @return multidimensional array """ Class<?> resultType = arrayBoxingType(src.getClass()); return deepBox(resultType, src); }
java
public static Object deepBox(Object src) { Class<?> resultType = arrayBoxingType(src.getClass()); return deepBox(resultType, src); }
[ "public", "static", "Object", "deepBox", "(", "Object", "src", ")", "{", "Class", "<", "?", ">", "resultType", "=", "arrayBoxingType", "(", "src", ".", "getClass", "(", ")", ")", ";", "return", "deepBox", "(", "resultType", ",", "src", ")", ";", "}" ]
Returns any multidimensional array into an array of boxed values. @param src source array @return multidimensional array
[ "Returns", "any", "multidimensional", "array", "into", "an", "array", "of", "boxed", "values", "." ]
train
https://github.com/derari/cthul/blob/74a31e3cb6a94f5f25cc5253d1dbd42e19a17ebc/objects/src/main/java/org/cthul/objects/Boxing.java#L713-L716
Azure/azure-sdk-for-java
compute/resource-manager/v2017_03_30/src/main/java/com/microsoft/azure/management/compute/v2017_03_30/implementation/VirtualMachineScaleSetsInner.java
VirtualMachineScaleSetsInner.powerOffAsync
public Observable<OperationStatusResponseInner> powerOffAsync(String resourceGroupName, String vmScaleSetName) { """ Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still attached and you are getting charged for the resources. Instead, use deallocate to release resources an...
java
public Observable<OperationStatusResponseInner> powerOffAsync(String resourceGroupName, String vmScaleSetName) { return powerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1<ServiceResponse<OperationStatusResponseInner>, OperationStatusResponseInner>() { @Override ...
[ "public", "Observable", "<", "OperationStatusResponseInner", ">", "powerOffAsync", "(", "String", "resourceGroupName", ",", "String", "vmScaleSetName", ")", "{", "return", "powerOffWithServiceResponseAsync", "(", "resourceGroupName", ",", "vmScaleSetName", ")", ".", "map"...
Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still attached and you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. @param resourceGroupName The name of the resource group. @param vmScaleSetName The name of the VM scale ...
[ "Power", "off", "(", "stop", ")", "one", "or", "more", "virtual", "machines", "in", "a", "VM", "scale", "set", ".", "Note", "that", "resources", "are", "still", "attached", "and", "you", "are", "getting", "charged", "for", "the", "resources", ".", "Inste...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/compute/resource-manager/v2017_03_30/src/main/java/com/microsoft/azure/management/compute/v2017_03_30/implementation/VirtualMachineScaleSetsInner.java#L1751-L1758
augustd/burp-suite-utils
src/main/java/com/codemagi/burp/parser/HttpRequest.java
HttpRequest.setParameter
public void setParameter(String name, String value) { """ Sets a parameter value based on its name. @param name The parameter name to set @param value The parameter value to set """ sortedParams = null; parameters.add(new Parameter(name, value)); }
java
public void setParameter(String name, String value) { sortedParams = null; parameters.add(new Parameter(name, value)); }
[ "public", "void", "setParameter", "(", "String", "name", ",", "String", "value", ")", "{", "sortedParams", "=", "null", ";", "parameters", ".", "add", "(", "new", "Parameter", "(", "name", ",", "value", ")", ")", ";", "}" ]
Sets a parameter value based on its name. @param name The parameter name to set @param value The parameter value to set
[ "Sets", "a", "parameter", "value", "based", "on", "its", "name", "." ]
train
https://github.com/augustd/burp-suite-utils/blob/5e34a6b9147f5705382f98049dd9e4f387b78629/src/main/java/com/codemagi/burp/parser/HttpRequest.java#L309-L312
GerdHolz/TOVAL
src/de/invation/code/toval/os/OSUtils.java
OSUtils.runCommand
public void runCommand(String[] command, GenericHandler<BufferedReader> inputHandler, GenericHandler<BufferedReader> errorHandler) throws OSException { """ Runs a command on the operating system. @param command String array of command parts. The parts are concatenated with spaces between the parts. The single ...
java
public void runCommand(String[] command, GenericHandler<BufferedReader> inputHandler, GenericHandler<BufferedReader> errorHandler) throws OSException { Validate.notNull(command); try { Process p = Runtime.getRuntime().exec(command); BufferedReader in = new BufferedReader(new Inp...
[ "public", "void", "runCommand", "(", "String", "[", "]", "command", ",", "GenericHandler", "<", "BufferedReader", ">", "inputHandler", ",", "GenericHandler", "<", "BufferedReader", ">", "errorHandler", ")", "throws", "OSException", "{", "Validate", ".", "notNull",...
Runs a command on the operating system. @param command String array of command parts. The parts are concatenated with spaces between the parts. The single command parts should not contain whitespaces. @param inputHandler {@link GenericHandler} to handle the process input stream {@link BufferedReader}. @param errorHand...
[ "Runs", "a", "command", "on", "the", "operating", "system", "." ]
train
https://github.com/GerdHolz/TOVAL/blob/036922cdfd710fa53b18e5dbe1e07f226f731fde/src/de/invation/code/toval/os/OSUtils.java#L170-L191
alkacon/opencms-core
src-gwt/org/opencms/gwt/client/util/CmsDomUtil.java
CmsDomUtil.positionElement
public static void positionElement(Element elem, Element referenceElement, int dx, int dy) { """ Positions an element in the DOM relative to another element.<p> @param elem the element to position @param referenceElement the element relative to which the first element should be positioned @param dx the x offs...
java
public static void positionElement(Element elem, Element referenceElement, int dx, int dy) { com.google.gwt.dom.client.Style style = elem.getStyle(); style.setLeft(0, Unit.PX); style.setTop(0, Unit.PX); int myX = elem.getAbsoluteLeft(); int myY = elem.getAbsoluteTop(); i...
[ "public", "static", "void", "positionElement", "(", "Element", "elem", ",", "Element", "referenceElement", ",", "int", "dx", ",", "int", "dy", ")", "{", "com", ".", "google", ".", "gwt", ".", "dom", ".", "client", ".", "Style", "style", "=", "elem", "....
Positions an element in the DOM relative to another element.<p> @param elem the element to position @param referenceElement the element relative to which the first element should be positioned @param dx the x offset relative to the reference element @param dy the y offset relative to the reference element
[ "Positions", "an", "element", "in", "the", "DOM", "relative", "to", "another", "element", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/gwt/client/util/CmsDomUtil.java#L1766-L1779
OpenLiberty/open-liberty
dev/com.ibm.ws.webcontainer.security/src/com/ibm/ws/webcontainer/security/internal/FormLoginAuthenticator.java
FormLoginAuthenticator.allowToAddCookieToResponse
private boolean allowToAddCookieToResponse(WebAppSecurityConfig config, HttpServletRequest req) { """ This method checks the following conditions: 1) If SSO requires SSL is true and NOT HTTPs request, returns false. 2) Otherwise returns true. @param req @return """ boolean secureRequest = req.isS...
java
private boolean allowToAddCookieToResponse(WebAppSecurityConfig config, HttpServletRequest req) { boolean secureRequest = req.isSecure(); if (config.getSSORequiresSSL() && !secureRequest) { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { Tr.debug(tc, "SSO r...
[ "private", "boolean", "allowToAddCookieToResponse", "(", "WebAppSecurityConfig", "config", ",", "HttpServletRequest", "req", ")", "{", "boolean", "secureRequest", "=", "req", ".", "isSecure", "(", ")", ";", "if", "(", "config", ".", "getSSORequiresSSL", "(", ")", ...
This method checks the following conditions: 1) If SSO requires SSL is true and NOT HTTPs request, returns false. 2) Otherwise returns true. @param req @return
[ "This", "method", "checks", "the", "following", "conditions", ":", "1", ")", "If", "SSO", "requires", "SSL", "is", "true", "and", "NOT", "HTTPs", "request", "returns", "false", ".", "2", ")", "Otherwise", "returns", "true", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.webcontainer.security/src/com/ibm/ws/webcontainer/security/internal/FormLoginAuthenticator.java#L229-L238
appium/java-client
src/main/java/io/appium/java_client/events/EventFiringObjectFactory.java
EventFiringObjectFactory.getEventFiringObject
public static <T> T getEventFiringObject(T t, WebDriver driver, Listener ... listeners) { """ This method makes an event firing object. @param t an original {@link Object} that is supposed to be listenable @param driver an instance of {@link org.openqa.selenium.WebDriver} @param listeners is an array of {@li...
java
public static <T> T getEventFiringObject(T t, WebDriver driver, Listener ... listeners) { return getEventFiringObject(t, driver, Arrays.asList(listeners)); }
[ "public", "static", "<", "T", ">", "T", "getEventFiringObject", "(", "T", "t", ",", "WebDriver", "driver", ",", "Listener", "...", "listeners", ")", "{", "return", "getEventFiringObject", "(", "t", ",", "driver", ",", "Arrays", ".", "asList", "(", "listene...
This method makes an event firing object. @param t an original {@link Object} that is supposed to be listenable @param driver an instance of {@link org.openqa.selenium.WebDriver} @param listeners is an array of {@link io.appium.java_client.events.api.Listener} that is supposed to be used for the event firing @param <...
[ "This", "method", "makes", "an", "event", "firing", "object", "." ]
train
https://github.com/appium/java-client/blob/5a17759b05d6fda8ef425b3ab6e766c73ed2e8df/src/main/java/io/appium/java_client/events/EventFiringObjectFactory.java#L70-L72
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/ClassContext.java
ClassContext.getBytecodeSet
@CheckForNull static public BitSet getBytecodeSet(JavaClass clazz, Method method) { """ Get a BitSet representing the bytecodes that are used in the given method. This is useful for prescreening a method for the existence of particular instructions. Because this step doesn't require building a MethodGen, it...
java
@CheckForNull static public BitSet getBytecodeSet(JavaClass clazz, Method method) { XMethod xmethod = XFactory.createXMethod(clazz, method); if (cachedBitsets().containsKey(xmethod)) { return cachedBitsets().get(xmethod); } Code code = method.getCode(); if (code ...
[ "@", "CheckForNull", "static", "public", "BitSet", "getBytecodeSet", "(", "JavaClass", "clazz", ",", "Method", "method", ")", "{", "XMethod", "xmethod", "=", "XFactory", ".", "createXMethod", "(", "clazz", ",", "method", ")", ";", "if", "(", "cachedBitsets", ...
Get a BitSet representing the bytecodes that are used in the given method. This is useful for prescreening a method for the existence of particular instructions. Because this step doesn't require building a MethodGen, it is very fast and memory-efficient. It may allow a Detector to avoid some very expensive analysis, w...
[ "Get", "a", "BitSet", "representing", "the", "bytecodes", "that", "are", "used", "in", "the", "given", "method", ".", "This", "is", "useful", "for", "prescreening", "a", "method", "for", "the", "existence", "of", "particular", "instructions", ".", "Because", ...
train
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/ClassContext.java#L428-L456
VoltDB/voltdb
src/frontend/org/voltdb/iv2/InitiatorMailbox.java
InitiatorMailbox.repairReplicasWith
void repairReplicasWith(List<Long> needsRepair, VoltMessage repairWork) { """ Create a real repair message from the msg repair log contents and instruct the message handler to execute a repair. Single partition work needs to do duplicate counting; MPI can simply broadcast the repair to the needs repair units --...
java
void repairReplicasWith(List<Long> needsRepair, VoltMessage repairWork) { //For an SpInitiator the lock should already have been acquire since //this method is reach via SpPromoteAlgo.deliver which is reached by InitiatorMailbox.deliver //which should already have acquire the lock as...
[ "void", "repairReplicasWith", "(", "List", "<", "Long", ">", "needsRepair", ",", "VoltMessage", "repairWork", ")", "{", "//For an SpInitiator the lock should already have been acquire since", "//this method is reach via SpPromoteAlgo.deliver which is reached by InitiatorMailbox.deliver",...
Create a real repair message from the msg repair log contents and instruct the message handler to execute a repair. Single partition work needs to do duplicate counting; MPI can simply broadcast the repair to the needs repair units -- where the SP will do the rest.
[ "Create", "a", "real", "repair", "message", "from", "the", "msg", "repair", "log", "contents", "and", "instruct", "the", "message", "handler", "to", "execute", "a", "repair", ".", "Single", "partition", "work", "needs", "to", "do", "duplicate", "counting", "...
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/InitiatorMailbox.java#L591-L598
jOOQ/jOOL
jOOL-java-8/src/main/java/org/jooq/lambda/Unchecked.java
Unchecked.biConsumer
public static <T, U> BiConsumer<T, U> biConsumer(CheckedBiConsumer<T, U> consumer) { """ Wrap a {@link org.jooq.lambda.fi.util.function.CheckedBiConsumer} in a {@link BiConsumer}. <p> Example: <code><pre> map.forEach(Unchecked.biConsumer((k, v) -> { if (k == null || v == null) throw new Exception("No nulls a...
java
public static <T, U> BiConsumer<T, U> biConsumer(CheckedBiConsumer<T, U> consumer) { return biConsumer(consumer, THROWABLE_TO_RUNTIME_EXCEPTION); }
[ "public", "static", "<", "T", ",", "U", ">", "BiConsumer", "<", "T", ",", "U", ">", "biConsumer", "(", "CheckedBiConsumer", "<", "T", ",", "U", ">", "consumer", ")", "{", "return", "biConsumer", "(", "consumer", ",", "THROWABLE_TO_RUNTIME_EXCEPTION", ")", ...
Wrap a {@link org.jooq.lambda.fi.util.function.CheckedBiConsumer} in a {@link BiConsumer}. <p> Example: <code><pre> map.forEach(Unchecked.biConsumer((k, v) -> { if (k == null || v == null) throw new Exception("No nulls allowed in map"); })); </pre></code>
[ "Wrap", "a", "{" ]
train
https://github.com/jOOQ/jOOL/blob/889d87c85ca57bafd4eddd78e0f7ae2804d2ee86/jOOL-java-8/src/main/java/org/jooq/lambda/Unchecked.java#L210-L212
jtrfp/javamod
src/main/java/de/quippy/javamod/multimedia/mp3/id3/MP3FileID3Controller.java
MP3FileID3Controller.setTrack
public void setTrack(int track, int type) { """ Set the track number of this mp3. @param track the track number of this mp3 """ if (allow(type&ID3V1)) { id3v1.setTrack(track); } if (allow(type&ID3V2)) { id3v2.setTextFrame(ID3v2Frames.TRACK_NUMBER, String.valueOf(track)); } }
java
public void setTrack(int track, int type) { if (allow(type&ID3V1)) { id3v1.setTrack(track); } if (allow(type&ID3V2)) { id3v2.setTextFrame(ID3v2Frames.TRACK_NUMBER, String.valueOf(track)); } }
[ "public", "void", "setTrack", "(", "int", "track", ",", "int", "type", ")", "{", "if", "(", "allow", "(", "type", "&", "ID3V1", ")", ")", "{", "id3v1", ".", "setTrack", "(", "track", ")", ";", "}", "if", "(", "allow", "(", "type", "&", "ID3V2", ...
Set the track number of this mp3. @param track the track number of this mp3
[ "Set", "the", "track", "number", "of", "this", "mp3", "." ]
train
https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/multimedia/mp3/id3/MP3FileID3Controller.java#L261-L271
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/time/format/DateTimeFormatter.java
DateTimeFormatter.ofPattern
public static DateTimeFormatter ofPattern(String pattern, Locale locale) { """ Creates a formatter using the specified pattern and locale. <p> This method will create a formatter based on a simple <a href="#patterns">pattern of letters and symbols</a> as described in the class documentation. For example, {@co...
java
public static DateTimeFormatter ofPattern(String pattern, Locale locale) { return new DateTimeFormatterBuilder().appendPattern(pattern).toFormatter(locale); }
[ "public", "static", "DateTimeFormatter", "ofPattern", "(", "String", "pattern", ",", "Locale", "locale", ")", "{", "return", "new", "DateTimeFormatterBuilder", "(", ")", ".", "appendPattern", "(", "pattern", ")", ".", "toFormatter", "(", "locale", ")", ";", "}...
Creates a formatter using the specified pattern and locale. <p> This method will create a formatter based on a simple <a href="#patterns">pattern of letters and symbols</a> as described in the class documentation. For example, {@code d MMM uuuu} will format 2011-12-03 as '3 Dec 2011'. <p> The formatter will use the spe...
[ "Creates", "a", "formatter", "using", "the", "specified", "pattern", "and", "locale", ".", "<p", ">", "This", "method", "will", "create", "a", "formatter", "based", "on", "a", "simple", "<a", "href", "=", "#patterns", ">", "pattern", "of", "letters", "and"...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/time/format/DateTimeFormatter.java#L559-L561
alkacon/opencms-core
src-setup/org/opencms/setup/CmsSetupDb.java
CmsSetupDb.replaceTokens
private String replaceTokens(String sql, Map<String, String> replacers) { """ Replaces tokens "${xxx}" in a specified SQL query.<p> @param sql a SQL query @param replacers a Map with values keyed by "${xxx}" tokens @return the SQl query with all "${xxx}" tokens replaced """ Iterator<Map.Entry<Str...
java
private String replaceTokens(String sql, Map<String, String> replacers) { Iterator<Map.Entry<String, String>> keys = replacers.entrySet().iterator(); while (keys.hasNext()) { Map.Entry<String, String> entry = keys.next(); String key = entry.getKey(); String value = ...
[ "private", "String", "replaceTokens", "(", "String", "sql", ",", "Map", "<", "String", ",", "String", ">", "replacers", ")", "{", "Iterator", "<", "Map", ".", "Entry", "<", "String", ",", "String", ">", ">", "keys", "=", "replacers", ".", "entrySet", "...
Replaces tokens "${xxx}" in a specified SQL query.<p> @param sql a SQL query @param replacers a Map with values keyed by "${xxx}" tokens @return the SQl query with all "${xxx}" tokens replaced
[ "Replaces", "tokens", "$", "{", "xxx", "}", "in", "a", "specified", "SQL", "query", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-setup/org/opencms/setup/CmsSetupDb.java#L774-L787
Azure/azure-sdk-for-java
compute/resource-manager/v2017_03_30/src/main/java/com/microsoft/azure/management/compute/v2017_03_30/implementation/VirtualMachineScaleSetsInner.java
VirtualMachineScaleSetsInner.reimageAllAsync
public Observable<OperationStatusResponseInner> reimageAllAsync(String resourceGroupName, String vmScaleSetName) { """ Reimages all the disks ( including data disks ) in the virtual machines in a VM scale set. This operation is only supported for managed disks. @param resourceGroupName The name of the resource ...
java
public Observable<OperationStatusResponseInner> reimageAllAsync(String resourceGroupName, String vmScaleSetName) { return reimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1<ServiceResponse<OperationStatusResponseInner>, OperationStatusResponseInner>() { @Override ...
[ "public", "Observable", "<", "OperationStatusResponseInner", ">", "reimageAllAsync", "(", "String", "resourceGroupName", ",", "String", "vmScaleSetName", ")", "{", "return", "reimageAllWithServiceResponseAsync", "(", "resourceGroupName", ",", "vmScaleSetName", ")", ".", "...
Reimages all the disks ( including data disks ) in the virtual machines in a VM scale set. This operation is only supported for managed disks. @param resourceGroupName The name of the resource group. @param vmScaleSetName The name of the VM scale set. @throws IllegalArgumentException thrown if parameters fail the vali...
[ "Reimages", "all", "the", "disks", "(", "including", "data", "disks", ")", "in", "the", "virtual", "machines", "in", "a", "VM", "scale", "set", ".", "This", "operation", "is", "only", "supported", "for", "managed", "disks", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/compute/resource-manager/v2017_03_30/src/main/java/com/microsoft/azure/management/compute/v2017_03_30/implementation/VirtualMachineScaleSetsInner.java#L3243-L3250
Azure/azure-sdk-for-java
appservice/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/appservice/v2016_09_01/implementation/AppServiceEnvironmentsInner.java
AppServiceEnvironmentsInner.listMetricDefinitions
public MetricDefinitionInner listMetricDefinitions(String resourceGroupName, String name) { """ Get global metric definitions of an App Service Environment. Get global metric definitions of an App Service Environment. @param resourceGroupName Name of the resource group to which the resource belongs. @param na...
java
public MetricDefinitionInner listMetricDefinitions(String resourceGroupName, String name) { return listMetricDefinitionsWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); }
[ "public", "MetricDefinitionInner", "listMetricDefinitions", "(", "String", "resourceGroupName", ",", "String", "name", ")", "{", "return", "listMetricDefinitionsWithServiceResponseAsync", "(", "resourceGroupName", ",", "name", ")", ".", "toBlocking", "(", ")", ".", "sin...
Get global metric definitions of an App Service Environment. Get global metric definitions of an App Service Environment. @param resourceGroupName Name of the resource group to which the resource belongs. @param name Name of the App Service Environment. @throws IllegalArgumentException thrown if parameters fail the va...
[ "Get", "global", "metric", "definitions", "of", "an", "App", "Service", "Environment", ".", "Get", "global", "metric", "definitions", "of", "an", "App", "Service", "Environment", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/appservice/v2016_09_01/implementation/AppServiceEnvironmentsInner.java#L1703-L1705
Netflix/eureka
eureka-core/src/main/java/com/netflix/eureka/EurekaBootStrap.java
EurekaBootStrap.contextInitialized
@Override public void contextInitialized(ServletContextEvent event) { """ Initializes Eureka, including syncing up with other Eureka peers and publishing the registry. @see javax.servlet.ServletContextListener#contextInitialized(javax.servlet.ServletContextEvent) """ try { initEurek...
java
@Override public void contextInitialized(ServletContextEvent event) { try { initEurekaEnvironment(); initEurekaServerContext(); ServletContext sc = event.getServletContext(); sc.setAttribute(EurekaServerContext.class.getName(), serverContext); } catch...
[ "@", "Override", "public", "void", "contextInitialized", "(", "ServletContextEvent", "event", ")", "{", "try", "{", "initEurekaEnvironment", "(", ")", ";", "initEurekaServerContext", "(", ")", ";", "ServletContext", "sc", "=", "event", ".", "getServletContext", "(...
Initializes Eureka, including syncing up with other Eureka peers and publishing the registry. @see javax.servlet.ServletContextListener#contextInitialized(javax.servlet.ServletContextEvent)
[ "Initializes", "Eureka", "including", "syncing", "up", "with", "other", "Eureka", "peers", "and", "publishing", "the", "registry", "." ]
train
https://github.com/Netflix/eureka/blob/48446d956be09df6650a3c00b7ebd7e2d1e1544f/eureka-core/src/main/java/com/netflix/eureka/EurekaBootStrap.java#L110-L122
jtablesaw/tablesaw
core/src/main/java/tech/tablesaw/conversion/smile/SmileConverter.java
SmileConverter.nominalDataset
public AttributeDataset nominalDataset(int responseColIndex, int... variablesColIndices) { """ Returns a dataset where the response column is nominal. E.g. to be used for a classification """ return dataset(table.numberColumn(responseColIndex), AttributeType.NOMINAL, table.columns(variablesColIndices))...
java
public AttributeDataset nominalDataset(int responseColIndex, int... variablesColIndices) { return dataset(table.numberColumn(responseColIndex), AttributeType.NOMINAL, table.columns(variablesColIndices)); }
[ "public", "AttributeDataset", "nominalDataset", "(", "int", "responseColIndex", ",", "int", "...", "variablesColIndices", ")", "{", "return", "dataset", "(", "table", ".", "numberColumn", "(", "responseColIndex", ")", ",", "AttributeType", ".", "NOMINAL", ",", "ta...
Returns a dataset where the response column is nominal. E.g. to be used for a classification
[ "Returns", "a", "dataset", "where", "the", "response", "column", "is", "nominal", ".", "E", ".", "g", ".", "to", "be", "used", "for", "a", "classification" ]
train
https://github.com/jtablesaw/tablesaw/blob/68a75b4098ac677e9486df5572cf13ec39f9f701/core/src/main/java/tech/tablesaw/conversion/smile/SmileConverter.java#L63-L65
ThreeTen/threeten-extra
src/main/java/org/threeten/extra/chrono/AccountingChronology.java
AccountingChronology.dateYearDay
@Override public AccountingDate dateYearDay(Era era, int yearOfEra, int dayOfYear) { """ Obtains a local date in Accounting calendar system from the era, year-of-era and day-of-year fields. @param era the Accounting era, not null @param yearOfEra the year-of-era @param dayOfYear the day-of-year @retu...
java
@Override public AccountingDate dateYearDay(Era era, int yearOfEra, int dayOfYear) { return dateYearDay(prolepticYear(era, yearOfEra), dayOfYear); }
[ "@", "Override", "public", "AccountingDate", "dateYearDay", "(", "Era", "era", ",", "int", "yearOfEra", ",", "int", "dayOfYear", ")", "{", "return", "dateYearDay", "(", "prolepticYear", "(", "era", ",", "yearOfEra", ")", ",", "dayOfYear", ")", ";", "}" ]
Obtains a local date in Accounting calendar system from the era, year-of-era and day-of-year fields. @param era the Accounting era, not null @param yearOfEra the year-of-era @param dayOfYear the day-of-year @return the Accounting local date, not null @throws DateTimeException if unable to create the date @throws Cl...
[ "Obtains", "a", "local", "date", "in", "Accounting", "calendar", "system", "from", "the", "era", "year", "-", "of", "-", "era", "and", "day", "-", "of", "-", "year", "fields", "." ]
train
https://github.com/ThreeTen/threeten-extra/blob/e94ecd3592ef70e54d6eea21095239ea9ffbab78/src/main/java/org/threeten/extra/chrono/AccountingChronology.java#L323-L326
ops4j/org.ops4j.pax.exam1
pax-exam-container-rbc-client/src/main/java/org/ops4j/pax/exam/rbc/client/RemoteBundleContextClient.java
RemoteBundleContextClient.getService
@SuppressWarnings( "unchecked" ) public <T> T getService( final Class<T> serviceType, final long timeoutInMillis ) { """ {@inheritDoc} Returns a dynamic proxy in place of the actual service, forwarding the calls via the remote bundle context. """ return (T) Proxy.newPr...
java
@SuppressWarnings( "unchecked" ) public <T> T getService( final Class<T> serviceType, final long timeoutInMillis ) { return (T) Proxy.newProxyInstance( getClass().getClassLoader(), new Class<?>[]{ serviceType }, new InvocationHandler() ...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "<", "T", ">", "T", "getService", "(", "final", "Class", "<", "T", ">", "serviceType", ",", "final", "long", "timeoutInMillis", ")", "{", "return", "(", "T", ")", "Proxy", ".", "newProxyInstance...
{@inheritDoc} Returns a dynamic proxy in place of the actual service, forwarding the calls via the remote bundle context.
[ "{" ]
train
https://github.com/ops4j/org.ops4j.pax.exam1/blob/7c8742208117ff91bd24bcd3a185d2d019f7000f/pax-exam-container-rbc-client/src/main/java/org/ops4j/pax/exam/rbc/client/RemoteBundleContextClient.java#L91-L134
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/appfw/appfwpolicylabel_binding.java
appfwpolicylabel_binding.get
public static appfwpolicylabel_binding get(nitro_service service, String labelname) throws Exception { """ Use this API to fetch appfwpolicylabel_binding resource of given name . """ appfwpolicylabel_binding obj = new appfwpolicylabel_binding(); obj.set_labelname(labelname); appfwpolicylabel_binding resp...
java
public static appfwpolicylabel_binding get(nitro_service service, String labelname) throws Exception{ appfwpolicylabel_binding obj = new appfwpolicylabel_binding(); obj.set_labelname(labelname); appfwpolicylabel_binding response = (appfwpolicylabel_binding) obj.get_resource(service); return response; }
[ "public", "static", "appfwpolicylabel_binding", "get", "(", "nitro_service", "service", ",", "String", "labelname", ")", "throws", "Exception", "{", "appfwpolicylabel_binding", "obj", "=", "new", "appfwpolicylabel_binding", "(", ")", ";", "obj", ".", "set_labelname", ...
Use this API to fetch appfwpolicylabel_binding resource of given name .
[ "Use", "this", "API", "to", "fetch", "appfwpolicylabel_binding", "resource", "of", "given", "name", "." ]
train
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/appfw/appfwpolicylabel_binding.java#L114-L119
h2oai/h2o-3
h2o-genmodel/src/main/java/hex/genmodel/algos/tree/SharedTreeNode.java
SharedTreeNode.printDotNodesAtLevel
void printDotNodesAtLevel(PrintStream os, int levelToPrint, boolean detail, PrintMojo.PrintTreeOptions treeOptions) { """ Recursively print nodes at a particular depth level in the tree. Useful to group them so they render properly. @param os output stream @param levelToPrint level number @param detail include...
java
void printDotNodesAtLevel(PrintStream os, int levelToPrint, boolean detail, PrintMojo.PrintTreeOptions treeOptions) { if (getDepth() == levelToPrint) { printDotNode(os, detail, treeOptions); return; } assert (getDepth() < levelToPrint); if (leftChild != null) { leftChild.printDotNode...
[ "void", "printDotNodesAtLevel", "(", "PrintStream", "os", ",", "int", "levelToPrint", ",", "boolean", "detail", ",", "PrintMojo", ".", "PrintTreeOptions", "treeOptions", ")", "{", "if", "(", "getDepth", "(", ")", "==", "levelToPrint", ")", "{", "printDotNode", ...
Recursively print nodes at a particular depth level in the tree. Useful to group them so they render properly. @param os output stream @param levelToPrint level number @param detail include additional node detail information
[ "Recursively", "print", "nodes", "at", "a", "particular", "depth", "level", "in", "the", "tree", ".", "Useful", "to", "group", "them", "so", "they", "render", "properly", "." ]
train
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-genmodel/src/main/java/hex/genmodel/algos/tree/SharedTreeNode.java#L344-L358
micronaut-projects/micronaut-core
inject/src/main/java/io/micronaut/context/DefaultBeanContext.java
DefaultBeanContext.getBean
public @Nonnull <T> T getBean(@Nullable BeanResolutionContext resolutionContext, @Nonnull Class<T> beanType, @Nullable Qualifier<T> qualifier) { """ Get a bean of the given type and qualifier. @param resolutionContext The bean context resolution @param beanType The bean type @param qualifier ...
java
public @Nonnull <T> T getBean(@Nullable BeanResolutionContext resolutionContext, @Nonnull Class<T> beanType, @Nullable Qualifier<T> qualifier) { ArgumentUtils.requireNonNull("beanType", beanType); return getBeanInternal(resolutionContext, beanType, qualifier, true, true); }
[ "public", "@", "Nonnull", "<", "T", ">", "T", "getBean", "(", "@", "Nullable", "BeanResolutionContext", "resolutionContext", ",", "@", "Nonnull", "Class", "<", "T", ">", "beanType", ",", "@", "Nullable", "Qualifier", "<", "T", ">", "qualifier", ")", "{", ...
Get a bean of the given type and qualifier. @param resolutionContext The bean context resolution @param beanType The bean type @param qualifier The qualifier @param <T> The bean type parameter @return The found bean
[ "Get", "a", "bean", "of", "the", "given", "type", "and", "qualifier", "." ]
train
https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/inject/src/main/java/io/micronaut/context/DefaultBeanContext.java#L1011-L1014
tanhaichao/leopard-lang
leopard-servlet/src/main/java/io/leopard/web/servlet/CookieUtil.java
CookieUtil.deleteCookie
public static void deleteCookie(String name, HttpServletRequest request, HttpServletResponse response) { """ 删除cookie</br> @param name cookie名称 @param request http请求 @param response http响应 """ if (name == null || name.length() == 0) { throw new IllegalArgumentException("cookie名称不能为空."); } CookieU...
java
public static void deleteCookie(String name, HttpServletRequest request, HttpServletResponse response) { if (name == null || name.length() == 0) { throw new IllegalArgumentException("cookie名称不能为空."); } CookieUtil.setCookie(name, "", -1, false, request, response); }
[ "public", "static", "void", "deleteCookie", "(", "String", "name", ",", "HttpServletRequest", "request", ",", "HttpServletResponse", "response", ")", "{", "if", "(", "name", "==", "null", "||", "name", ".", "length", "(", ")", "==", "0", ")", "{", "throw",...
删除cookie</br> @param name cookie名称 @param request http请求 @param response http响应
[ "删除cookie<", "/", "br", ">" ]
train
https://github.com/tanhaichao/leopard-lang/blob/8ab110f6ca4ea84484817a3d752253ac69ea268b/leopard-servlet/src/main/java/io/leopard/web/servlet/CookieUtil.java#L124-L129
alkacon/opencms-core
src/org/opencms/search/solr/CmsSolrIndex.java
CmsSolrIndex.getLocaleForResource
@Override public Locale getLocaleForResource(CmsObject cms, CmsResource resource, List<Locale> availableLocales) { """ Returns the language locale for the given resource in this index.<p> @param cms the current OpenCms user context @param resource the resource to check @param availableLocales a list of l...
java
@Override public Locale getLocaleForResource(CmsObject cms, CmsResource resource, List<Locale> availableLocales) { Locale result = null; List<Locale> defaultLocales = OpenCms.getLocaleManager().getDefaultLocales(cms, resource); if ((availableLocales != null) && (availableLocales.size()...
[ "@", "Override", "public", "Locale", "getLocaleForResource", "(", "CmsObject", "cms", ",", "CmsResource", "resource", ",", "List", "<", "Locale", ">", "availableLocales", ")", "{", "Locale", "result", "=", "null", ";", "List", "<", "Locale", ">", "defaultLocal...
Returns the language locale for the given resource in this index.<p> @param cms the current OpenCms user context @param resource the resource to check @param availableLocales a list of locales supported by the resource @return the language locale for the given resource in this index
[ "Returns", "the", "language", "locale", "for", "the", "given", "resource", "in", "this", "index", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/search/solr/CmsSolrIndex.java#L598-L615
undertow-io/undertow
core/src/main/java/io/undertow/server/handlers/proxy/mod_cluster/ModClusterContainer.java
ModClusterContainer.addNode
public synchronized boolean addNode(final NodeConfig config, final Balancer.BalancerBuilder balancerConfig, final XnioIoThread ioThread, final ByteBufferPool bufferPool) { """ Register a new node. @param config the node configuration @param balancerConfig the balancer configuration @param ioThread ...
java
public synchronized boolean addNode(final NodeConfig config, final Balancer.BalancerBuilder balancerConfig, final XnioIoThread ioThread, final ByteBufferPool bufferPool) { final String jvmRoute = config.getJvmRoute(); final Node existing = nodes.get(jvmRoute); if (existing != null) { ...
[ "public", "synchronized", "boolean", "addNode", "(", "final", "NodeConfig", "config", ",", "final", "Balancer", ".", "BalancerBuilder", "balancerConfig", ",", "final", "XnioIoThread", "ioThread", ",", "final", "ByteBufferPool", "bufferPool", ")", "{", "final", "Stri...
Register a new node. @param config the node configuration @param balancerConfig the balancer configuration @param ioThread the associated I/O thread @param bufferPool the buffer pool @return whether the node could be created or not
[ "Register", "a", "new", "node", "." ]
train
https://github.com/undertow-io/undertow/blob/87de0b856a7a4ba8faf5b659537b9af07b763263/core/src/main/java/io/undertow/server/handlers/proxy/mod_cluster/ModClusterContainer.java#L167-L205
albfernandez/itext2
src/main/java/com/lowagie/text/rtf/parser/RtfImportMgr.java
RtfImportMgr.importColor
public void importColor(String colorNr, Color color) { """ Imports a color value. The color number for the color defined by its red, green and blue values is determined and then the resulting mapping is added. @param colorNr The original color number. @param color The color to import. """ RtfColo...
java
public void importColor(String colorNr, Color color) { RtfColor rtfColor = new RtfColor(this.rtfDoc, color); this.importColorMapping.put(colorNr, Integer.toString(rtfColor.getColorNumber())); }
[ "public", "void", "importColor", "(", "String", "colorNr", ",", "Color", "color", ")", "{", "RtfColor", "rtfColor", "=", "new", "RtfColor", "(", "this", ".", "rtfDoc", ",", "color", ")", ";", "this", ".", "importColorMapping", ".", "put", "(", "colorNr", ...
Imports a color value. The color number for the color defined by its red, green and blue values is determined and then the resulting mapping is added. @param colorNr The original color number. @param color The color to import.
[ "Imports", "a", "color", "value", ".", "The", "color", "number", "for", "the", "color", "defined", "by", "its", "red", "green", "and", "blue", "values", "is", "determined", "and", "then", "the", "resulting", "mapping", "is", "added", "." ]
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/rtf/parser/RtfImportMgr.java#L193-L196
Stratio/bdt
src/main/java/com/stratio/qa/specs/DatabaseSpec.java
DatabaseSpec.saveElasticCluster
@Given("^I obtain elasticsearch cluster name in '([^:]+?)(:.+?)?' and save it in variable '(.+?)'?$") public void saveElasticCluster(String host, String port, String envVar) throws Exception { """ Save clustername of elasticsearch in an environment varible for future use. @param host elasticsearch connect...
java
@Given("^I obtain elasticsearch cluster name in '([^:]+?)(:.+?)?' and save it in variable '(.+?)'?$") public void saveElasticCluster(String host, String port, String envVar) throws Exception { commonspec.setRestProtocol("http://"); commonspec.setRestHost(host); commonspec.setRestPort(port);...
[ "@", "Given", "(", "\"^I obtain elasticsearch cluster name in '([^:]+?)(:.+?)?' and save it in variable '(.+?)'?$\"", ")", "public", "void", "saveElasticCluster", "(", "String", "host", ",", "String", "port", ",", "String", "envVar", ")", "throws", "Exception", "{", "common...
Save clustername of elasticsearch in an environment varible for future use. @param host elasticsearch connection @param port elasticsearch port @param envVar thread variable where to store the value @throws IllegalAccessException exception @throws IllegalArgumentException exception @throws SecurityException ...
[ "Save", "clustername", "of", "elasticsearch", "in", "an", "environment", "varible", "for", "future", "use", "." ]
train
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/specs/DatabaseSpec.java#L229-L254
FasterXML/woodstox
src/main/java/com/ctc/wstx/dtd/FullDTDReader.java
FullDTDReader.flattenExternalSubset
public static DTDSubset flattenExternalSubset(WstxInputSource src, Writer flattenWriter, boolean inclComments, boolean inclConditionals, boolean inclPEs) throws IOException, XMLStreamException { """ Method t...
java
public static DTDSubset flattenExternalSubset(WstxInputSource src, Writer flattenWriter, boolean inclComments, boolean inclConditionals, boolean inclPEs) throws IOException, XMLStreamException { Reade...
[ "public", "static", "DTDSubset", "flattenExternalSubset", "(", "WstxInputSource", "src", ",", "Writer", "flattenWriter", ",", "boolean", "inclComments", ",", "boolean", "inclConditionals", ",", "boolean", "inclPEs", ")", "throws", "IOException", ",", "XMLStreamException...
Method that will parse, process and output contents of an external DTD subset. It will do processing similar to {@link #readExternalSubset}, but additionally will copy its processed ("flattened") input to specified writer. @param src Input source used to read the main external subset @param flattenWriter Writer to out...
[ "Method", "that", "will", "parse", "process", "and", "output", "contents", "of", "an", "external", "DTD", "subset", ".", "It", "will", "do", "processing", "similar", "to", "{", "@link", "#readExternalSubset", "}", "but", "additionally", "will", "copy", "its", ...
train
https://github.com/FasterXML/woodstox/blob/ffcaabdc06672d9564c48c25d601d029b7fd6548/src/main/java/com/ctc/wstx/dtd/FullDTDReader.java#L466-L485
soulwarelabs/jCommons-API
src/main/java/com/soulwarelabs/jcommons/data/Version.java
Version.append
public Version append(int number, String label) { """ Adds a new version number. @param number version number (not negative). @param label version number label (optional). @return version descriptor. @throws IllegalArgumentException if version number is illegal. @since v1.1.0 """ validateNumbe...
java
public Version append(int number, String label) { validateNumber(number); return appendNumber(number, label); }
[ "public", "Version", "append", "(", "int", "number", ",", "String", "label", ")", "{", "validateNumber", "(", "number", ")", ";", "return", "appendNumber", "(", "number", ",", "label", ")", ";", "}" ]
Adds a new version number. @param number version number (not negative). @param label version number label (optional). @return version descriptor. @throws IllegalArgumentException if version number is illegal. @since v1.1.0
[ "Adds", "a", "new", "version", "number", "." ]
train
https://github.com/soulwarelabs/jCommons-API/blob/57795ae28aea144e68502149506ec99dd67f0c67/src/main/java/com/soulwarelabs/jcommons/data/Version.java#L408-L411
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/ObjectOutputStream.java
ObjectOutputStream.writeNewString
private int writeNewString(String object, boolean unshared) throws IOException { """ Write String {@code object} into the receiver. It is assumed the String has not been dumped yet. Returns the handle for this object (String) which is dumped here. Strings are saved encoded with {@link DataInput modified UTF-8}. ...
java
private int writeNewString(String object, boolean unshared) throws IOException { long count = ModifiedUtf8.countBytes(object, false); byte[] buffer; int offset = 0; if (count <= 0xffff) { buffer = new byte[1 + SizeOf.SHORT + (int) count]; buffer[offset++] = TC_STR...
[ "private", "int", "writeNewString", "(", "String", "object", ",", "boolean", "unshared", ")", "throws", "IOException", "{", "long", "count", "=", "ModifiedUtf8", ".", "countBytes", "(", "object", ",", "false", ")", ";", "byte", "[", "]", "buffer", ";", "in...
Write String {@code object} into the receiver. It is assumed the String has not been dumped yet. Returns the handle for this object (String) which is dumped here. Strings are saved encoded with {@link DataInput modified UTF-8}. @param object the string to dump. @return the handle assigned to the String being dumped @...
[ "Write", "String", "{", "@code", "object", "}", "into", "the", "receiver", ".", "It", "is", "assumed", "the", "String", "has", "not", "been", "dumped", "yet", ".", "Returns", "the", "handle", "for", "this", "object", "(", "String", ")", "which", "is", ...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/ObjectOutputStream.java#L1411-L1435
jbundle/jbundle
thin/base/db/misc/src/main/java/org/jbundle/thin/base/db/client/RemoteFieldTable.java
RemoteFieldTable.init
public void init(Rec record, RemoteTable tableRemote, Object syncObject) { """ Constructor. @param record The record to handle. @param tableRemote The remote table. @param server The remote server (only used for synchronization). """ super.init(record); this.setRemoteTable(tableRemote, syncO...
java
public void init(Rec record, RemoteTable tableRemote, Object syncObject) { super.init(record); this.setRemoteTable(tableRemote, syncObject); }
[ "public", "void", "init", "(", "Rec", "record", ",", "RemoteTable", "tableRemote", ",", "Object", "syncObject", ")", "{", "super", ".", "init", "(", "record", ")", ";", "this", ".", "setRemoteTable", "(", "tableRemote", ",", "syncObject", ")", ";", "}" ]
Constructor. @param record The record to handle. @param tableRemote The remote table. @param server The remote server (only used for synchronization).
[ "Constructor", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/db/misc/src/main/java/org/jbundle/thin/base/db/client/RemoteFieldTable.java#L77-L81
google/error-prone-javac
src/jdk.compiler/share/classes/com/sun/tools/javac/code/ClassFinder.java
ClassFinder.loadClass
public ClassSymbol loadClass(ModuleSymbol msym, Name flatname) throws CompletionFailure { """ Load a toplevel class with given fully qualified name The class is entered into `classes' only if load was successful. """ Assert.checkNonNull(msym); Name packageName = Convert.packagePart(flatname); ...
java
public ClassSymbol loadClass(ModuleSymbol msym, Name flatname) throws CompletionFailure { Assert.checkNonNull(msym); Name packageName = Convert.packagePart(flatname); PackageSymbol ps = syms.lookupPackage(msym, packageName); Assert.checkNonNull(ps.modle, () -> "msym=" + msym + "; flatNa...
[ "public", "ClassSymbol", "loadClass", "(", "ModuleSymbol", "msym", ",", "Name", "flatname", ")", "throws", "CompletionFailure", "{", "Assert", ".", "checkNonNull", "(", "msym", ")", ";", "Name", "packageName", "=", "Convert", ".", "packagePart", "(", "flatname",...
Load a toplevel class with given fully qualified name The class is entered into `classes' only if load was successful.
[ "Load", "a", "toplevel", "class", "with", "given", "fully", "qualified", "name", "The", "class", "is", "entered", "into", "classes", "only", "if", "load", "was", "successful", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.compiler/share/classes/com/sun/tools/javac/code/ClassFinder.java#L399-L418
janus-project/guava.janusproject.io
guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/FluentIterable.java
FluentIterable.append
@Beta @CheckReturnValue public final FluentIterable<E> append(E... elements) { """ Returns a fluent iterable whose iterators traverse first the elements of this fluent iterable, followed by {@code elements}. @since 18.0 """ return from(Iterables.concat(iterable, Arrays.asList(elements))); }
java
@Beta @CheckReturnValue public final FluentIterable<E> append(E... elements) { return from(Iterables.concat(iterable, Arrays.asList(elements))); }
[ "@", "Beta", "@", "CheckReturnValue", "public", "final", "FluentIterable", "<", "E", ">", "append", "(", "E", "...", "elements", ")", "{", "return", "from", "(", "Iterables", ".", "concat", "(", "iterable", ",", "Arrays", ".", "asList", "(", "elements", ...
Returns a fluent iterable whose iterators traverse first the elements of this fluent iterable, followed by {@code elements}. @since 18.0
[ "Returns", "a", "fluent", "iterable", "whose", "iterators", "traverse", "first", "the", "elements", "of", "this", "fluent", "iterable", "followed", "by", "{", "@code", "elements", "}", "." ]
train
https://github.com/janus-project/guava.janusproject.io/blob/1c48fb672c9fdfddf276970570f703fa1115f588/guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/FluentIterable.java#L186-L190
astrapi69/jaulp-wicket
jaulp-wicket-base/src/main/java/de/alpharogroup/wicket/base/util/resource/ResourceModelFactory.java
ResourceModelFactory.newResourceModel
public static IModel<String> newResourceModel(final String resourceKey, final Component component) { """ Factory method to create a new {@link StringResourceModel} from the given resource key and given component. @param resourceKey the resource key @param component the component @return a new {@link Stri...
java
public static IModel<String> newResourceModel(final String resourceKey, final Component component) { return newResourceModel(resourceKey, component, null, ""); }
[ "public", "static", "IModel", "<", "String", ">", "newResourceModel", "(", "final", "String", "resourceKey", ",", "final", "Component", "component", ")", "{", "return", "newResourceModel", "(", "resourceKey", ",", "component", ",", "null", ",", "\"\"", ")", ";...
Factory method to create a new {@link StringResourceModel} from the given resource key and given component. @param resourceKey the resource key @param component the component @return a new {@link StringResourceModel} as an {@link IModel}
[ "Factory", "method", "to", "create", "a", "new", "{", "@link", "StringResourceModel", "}", "from", "the", "given", "resource", "key", "and", "given", "component", "." ]
train
https://github.com/astrapi69/jaulp-wicket/blob/85d74368d00abd9bb97659b5794e38c0f8a013d4/jaulp-wicket-base/src/main/java/de/alpharogroup/wicket/base/util/resource/ResourceModelFactory.java#L127-L131
looly/hutool
hutool-core/src/main/java/cn/hutool/core/date/DateUtil.java
DateUtil.between
public static long between(Date beginDate, Date endDate, DateUnit unit) { """ 判断两个日期相差的时长,只保留绝对值 @param beginDate 起始日期 @param endDate 结束日期 @param unit 相差的单位:相差 天{@link DateUnit#DAY}、小时{@link DateUnit#HOUR} 等 @return 日期差 """ return between(beginDate, endDate, unit, true); }
java
public static long between(Date beginDate, Date endDate, DateUnit unit) { return between(beginDate, endDate, unit, true); }
[ "public", "static", "long", "between", "(", "Date", "beginDate", ",", "Date", "endDate", ",", "DateUnit", "unit", ")", "{", "return", "between", "(", "beginDate", ",", "endDate", ",", "unit", ",", "true", ")", ";", "}" ]
判断两个日期相差的时长,只保留绝对值 @param beginDate 起始日期 @param endDate 结束日期 @param unit 相差的单位:相差 天{@link DateUnit#DAY}、小时{@link DateUnit#HOUR} 等 @return 日期差
[ "判断两个日期相差的时长,只保留绝对值" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/date/DateUtil.java#L1228-L1230
kiswanij/jk-util
src/main/java/com/jk/util/locale/JKMessage.java
JKMessage.addLables
public void addLables(JKLocale locale, String fileName) { """ Adds the lables. @param locale the locale @param fileName the file name """ addLables(locale, JKIOUtil.readPropertiesFile(fileName)); }
java
public void addLables(JKLocale locale, String fileName) { addLables(locale, JKIOUtil.readPropertiesFile(fileName)); }
[ "public", "void", "addLables", "(", "JKLocale", "locale", ",", "String", "fileName", ")", "{", "addLables", "(", "locale", ",", "JKIOUtil", ".", "readPropertiesFile", "(", "fileName", ")", ")", ";", "}" ]
Adds the lables. @param locale the locale @param fileName the file name
[ "Adds", "the", "lables", "." ]
train
https://github.com/kiswanij/jk-util/blob/8e0c85818423406f769444c76194a748e0a0fc0a/src/main/java/com/jk/util/locale/JKMessage.java#L284-L286
apereo/cas
core/cas-server-core-tickets-api/src/main/java/org/apereo/cas/ticket/factory/DefaultTicketGrantingTicketFactory.java
DefaultTicketGrantingTicketFactory.produceTicket
protected <T extends TicketGrantingTicket> T produceTicket(final Authentication authentication, final String tgtId, final Class<T> clazz) { """ Produce ticket. @param <T> the type parameter @param authentication the authentication @para...
java
protected <T extends TicketGrantingTicket> T produceTicket(final Authentication authentication, final String tgtId, final Class<T> clazz) { val result = new TicketGrantingTicketImpl(tgtId, authentication, this.ticketGrantingTicketExpirationPolicy); ...
[ "protected", "<", "T", "extends", "TicketGrantingTicket", ">", "T", "produceTicket", "(", "final", "Authentication", "authentication", ",", "final", "String", "tgtId", ",", "final", "Class", "<", "T", ">", "clazz", ")", "{", "val", "result", "=", "new", "Tic...
Produce ticket. @param <T> the type parameter @param authentication the authentication @param tgtId the tgt id @param clazz the clazz @return the ticket.
[ "Produce", "ticket", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-tickets-api/src/main/java/org/apereo/cas/ticket/factory/DefaultTicketGrantingTicketFactory.java#L64-L73
netscaler/sdx_nitro
src/main/java/com/citrix/sdx/nitro/resource/config/xen/xen_health_disk.java
xen_health_disk.get_nitro_bulk_response
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception { """ <pre> Converts API response of bulk operation into object and returns the object array in case of get request. </pre> """ xen_health_disk_responses result = (xen_health_disk_responses) service....
java
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception { xen_health_disk_responses result = (xen_health_disk_responses) service.get_payload_formatter().string_to_resource(xen_health_disk_responses.class, response); if(result.errorcode != 0) { if (result...
[ "protected", "base_resource", "[", "]", "get_nitro_bulk_response", "(", "nitro_service", "service", ",", "String", "response", ")", "throws", "Exception", "{", "xen_health_disk_responses", "result", "=", "(", "xen_health_disk_responses", ")", "service", ".", "get_payloa...
<pre> Converts API response of bulk operation into object and returns the object array in case of get request. </pre>
[ "<pre", ">", "Converts", "API", "response", "of", "bulk", "operation", "into", "object", "and", "returns", "the", "object", "array", "in", "case", "of", "get", "request", ".", "<", "/", "pre", ">" ]
train
https://github.com/netscaler/sdx_nitro/blob/c840919f1a8f7c0a5634c0f23d34fa14d1765ff1/src/main/java/com/citrix/sdx/nitro/resource/config/xen/xen_health_disk.java#L397-L414
Azure/azure-sdk-for-java
network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/VpnConnectionsInner.java
VpnConnectionsInner.createOrUpdate
public VpnConnectionInner createOrUpdate(String resourceGroupName, String gatewayName, String connectionName, VpnConnectionInner vpnConnectionParameters) { """ Creates a vpn connection to a scalable vpn gateway if it doesn't exist else updates the existing connection. @param resourceGroupName The resource group...
java
public VpnConnectionInner createOrUpdate(String resourceGroupName, String gatewayName, String connectionName, VpnConnectionInner vpnConnectionParameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, gatewayName, connectionName, vpnConnectionParameters).toBlocking().last().body(); }
[ "public", "VpnConnectionInner", "createOrUpdate", "(", "String", "resourceGroupName", ",", "String", "gatewayName", ",", "String", "connectionName", ",", "VpnConnectionInner", "vpnConnectionParameters", ")", "{", "return", "createOrUpdateWithServiceResponseAsync", "(", "resou...
Creates a vpn connection to a scalable vpn gateway if it doesn't exist else updates the existing connection. @param resourceGroupName The resource group name of the VpnGateway. @param gatewayName The name of the gateway. @param connectionName The name of the connection. @param vpnConnectionParameters Parameters suppli...
[ "Creates", "a", "vpn", "connection", "to", "a", "scalable", "vpn", "gateway", "if", "it", "doesn", "t", "exist", "else", "updates", "the", "existing", "connection", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/VpnConnectionsInner.java#L197-L199
Appendium/objectlabkit
utils/src/main/java/net/objectlab/kit/util/StringUtil.java
StringUtil.wrapText
public static String wrapText(final String inString, final String newline, final int wrapColumn) { """ Takes a block of text which might have long lines in it and wraps the long lines based on the supplied wrapColumn parameter. It was initially implemented for use by VelocityEmail. If there are tabs in inString...
java
public static String wrapText(final String inString, final String newline, final int wrapColumn) { if (inString == null) { return null; } final StringTokenizer lineTokenizer = new StringTokenizer(inString, newline, true); final StringBuilder builder = new StringBuilder()...
[ "public", "static", "String", "wrapText", "(", "final", "String", "inString", ",", "final", "String", "newline", ",", "final", "int", "wrapColumn", ")", "{", "if", "(", "inString", "==", "null", ")", "{", "return", "null", ";", "}", "final", "StringTokeniz...
Takes a block of text which might have long lines in it and wraps the long lines based on the supplied wrapColumn parameter. It was initially implemented for use by VelocityEmail. If there are tabs in inString, you are going to get results that are a bit strange, since tabs are a single character but are displayed as 4...
[ "Takes", "a", "block", "of", "text", "which", "might", "have", "long", "lines", "in", "it", "and", "wraps", "the", "long", "lines", "based", "on", "the", "supplied", "wrapColumn", "parameter", ".", "It", "was", "initially", "implemented", "for", "use", "by...
train
https://github.com/Appendium/objectlabkit/blob/cd649bce7a32e4e926520e62cb765f3b1d451594/utils/src/main/java/net/objectlab/kit/util/StringUtil.java#L183-L207
lucee/Lucee
core/src/main/java/lucee/runtime/tag/Lock.java
Lock.setName
public void setName(String name) throws ApplicationException { """ set the value name @param name value to set @throws ApplicationException """ if (name == null) return; this.name = name.trim(); if (name.length() == 0) throw new ApplicationException("invalid attribute definition", "attribute [name] can'...
java
public void setName(String name) throws ApplicationException { if (name == null) return; this.name = name.trim(); if (name.length() == 0) throw new ApplicationException("invalid attribute definition", "attribute [name] can't be a empty string"); }
[ "public", "void", "setName", "(", "String", "name", ")", "throws", "ApplicationException", "{", "if", "(", "name", "==", "null", ")", "return", ";", "this", ".", "name", "=", "name", ".", "trim", "(", ")", ";", "if", "(", "name", ".", "length", "(", ...
set the value name @param name value to set @throws ApplicationException
[ "set", "the", "value", "name" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/tag/Lock.java#L195-L199
Wadpam/guja
guja-core/src/main/java/com/wadpam/guja/oauth2/dao/GeneratedDFactoryDaoImpl.java
GeneratedDFactoryDaoImpl.queryByUpdatedBy
public Iterable<DFactory> queryByUpdatedBy(java.lang.String updatedBy) { """ query-by method for field updatedBy @param updatedBy the specified attribute @return an Iterable of DFactorys for the specified updatedBy """ return queryByField(null, DFactoryMapper.Field.UPDATEDBY.getFieldName(), updatedBy); ...
java
public Iterable<DFactory> queryByUpdatedBy(java.lang.String updatedBy) { return queryByField(null, DFactoryMapper.Field.UPDATEDBY.getFieldName(), updatedBy); }
[ "public", "Iterable", "<", "DFactory", ">", "queryByUpdatedBy", "(", "java", ".", "lang", ".", "String", "updatedBy", ")", "{", "return", "queryByField", "(", "null", ",", "DFactoryMapper", ".", "Field", ".", "UPDATEDBY", ".", "getFieldName", "(", ")", ",", ...
query-by method for field updatedBy @param updatedBy the specified attribute @return an Iterable of DFactorys for the specified updatedBy
[ "query", "-", "by", "method", "for", "field", "updatedBy" ]
train
https://github.com/Wadpam/guja/blob/eb8ba8e6794a96ea0dd9744cada4f9ad9618f114/guja-core/src/main/java/com/wadpam/guja/oauth2/dao/GeneratedDFactoryDaoImpl.java#L115-L117
osiam/connector4java
src/main/java/org/osiam/client/OsiamConnector.java
OsiamConnector.updateUser
@Deprecated public User updateUser(String id, UpdateUser updateUser, AccessToken accessToken) { """ update the user of the given id with the values given in the User Object. For more detailed information how to set new field, update Fields or to delete Fields please look in the documentation. This method is ...
java
@Deprecated public User updateUser(String id, UpdateUser updateUser, AccessToken accessToken) { return getUserService().updateUser(id, updateUser, accessToken); }
[ "@", "Deprecated", "public", "User", "updateUser", "(", "String", "id", ",", "UpdateUser", "updateUser", ",", "AccessToken", "accessToken", ")", "{", "return", "getUserService", "(", ")", ".", "updateUser", "(", "id", ",", "updateUser", ",", "accessToken", ")"...
update the user of the given id with the values given in the User Object. For more detailed information how to set new field, update Fields or to delete Fields please look in the documentation. This method is not compatible with OSIAM 3.x. @param id if of the User to be updated @param updateUser all Fields t...
[ "update", "the", "user", "of", "the", "given", "id", "with", "the", "values", "given", "in", "the", "User", "Object", ".", "For", "more", "detailed", "information", "how", "to", "set", "new", "field", "update", "Fields", "or", "to", "delete", "Fields", "...
train
https://github.com/osiam/connector4java/blob/a5e6ae1e706f4889d662a069fe2f3bf8e3848d12/src/main/java/org/osiam/client/OsiamConnector.java#L524-L527
jmchilton/galaxy-bootstrap
src/main/java/com/github/jmchilton/galaxybootstrap/DownloadProperties.java
DownloadProperties.forGalaxyDist
@Deprecated public static DownloadProperties forGalaxyDist(final File destination, String revision) { """ Builds a new DownloadProperties for downloading Galaxy from galaxy-dist. @param destination The destination directory to store Galaxy, null if a directory should be chosen by default. @param revision The ...
java
@Deprecated public static DownloadProperties forGalaxyDist(final File destination, String revision) { return new DownloadProperties(GALAXY_DIST_REPOSITORY_URL, BRANCH_STABLE, revision, destination); }
[ "@", "Deprecated", "public", "static", "DownloadProperties", "forGalaxyDist", "(", "final", "File", "destination", ",", "String", "revision", ")", "{", "return", "new", "DownloadProperties", "(", "GALAXY_DIST_REPOSITORY_URL", ",", "BRANCH_STABLE", ",", "revision", ","...
Builds a new DownloadProperties for downloading Galaxy from galaxy-dist. @param destination The destination directory to store Galaxy, null if a directory should be chosen by default. @param revision The revision to use for Galaxy. @return A new DownloadProperties for downloading Galaxy from galaxy-dist.
[ "Builds", "a", "new", "DownloadProperties", "for", "downloading", "Galaxy", "from", "galaxy", "-", "dist", "." ]
train
https://github.com/jmchilton/galaxy-bootstrap/blob/4a899f5e6ec0c9f6f4b9b21d5a0320e5925ec649/src/main/java/com/github/jmchilton/galaxybootstrap/DownloadProperties.java#L326-L329
trellis-ldp/trellis
core/http/src/main/java/org/trellisldp/http/impl/HttpUtils.java
HttpUtils.closeInputStreamAsync
public static BiConsumer<Object, Throwable> closeInputStreamAsync(final InputStream input) { """ Close an input stream in an async chain. @param input the input stream @return a bifunction that closes the stream """ return (val, err) -> { try { input.close(); }...
java
public static BiConsumer<Object, Throwable> closeInputStreamAsync(final InputStream input) { return (val, err) -> { try { input.close(); } catch (final IOException ex) { throw new UncheckedIOException("Error closing input stream", ex); } ...
[ "public", "static", "BiConsumer", "<", "Object", ",", "Throwable", ">", "closeInputStreamAsync", "(", "final", "InputStream", "input", ")", "{", "return", "(", "val", ",", "err", ")", "->", "{", "try", "{", "input", ".", "close", "(", ")", ";", "}", "c...
Close an input stream in an async chain. @param input the input stream @return a bifunction that closes the stream
[ "Close", "an", "input", "stream", "in", "an", "async", "chain", "." ]
train
https://github.com/trellis-ldp/trellis/blob/789fd7a3df86cab7ebba63e72bf4e58397e5f42d/core/http/src/main/java/org/trellisldp/http/impl/HttpUtils.java#L234-L242
elastic/elasticsearch-hadoop
mr/src/main/java/org/elasticsearch/hadoop/rest/bulk/BulkProcessor.java
BulkProcessor.initFlushOperation
private void initFlushOperation(String bulkLoggingID, boolean retryOperation, long retriedDocs, long waitTime) { """ Logs flushing messages and performs backoff waiting if there is a wait time for retry. """ if (retryOperation) { if (waitTime > 0L) { debugLog(bulkLoggingID, ...
java
private void initFlushOperation(String bulkLoggingID, boolean retryOperation, long retriedDocs, long waitTime) { if (retryOperation) { if (waitTime > 0L) { debugLog(bulkLoggingID, "Retrying [%d] entries after backing off for [%s] ms", retriedDocs, TimeValue.ti...
[ "private", "void", "initFlushOperation", "(", "String", "bulkLoggingID", ",", "boolean", "retryOperation", ",", "long", "retriedDocs", ",", "long", "waitTime", ")", "{", "if", "(", "retryOperation", ")", "{", "if", "(", "waitTime", ">", "0L", ")", "{", "debu...
Logs flushing messages and performs backoff waiting if there is a wait time for retry.
[ "Logs", "flushing", "messages", "and", "performs", "backoff", "waiting", "if", "there", "is", "a", "wait", "time", "for", "retry", "." ]
train
https://github.com/elastic/elasticsearch-hadoop/blob/f3acaba268ff96efae8eb946088c748c777c22cc/mr/src/main/java/org/elasticsearch/hadoop/rest/bulk/BulkProcessor.java#L471-L488
j-a-w-r/jawr-main-repo
jawr-dwr2.x/jawr-dwr2.x-extension/src/main/java/net/jawr/web/resource/bundle/generator/dwr/DWRBeanGenerator.java
DWRBeanGenerator.getInterfaceScript
@SuppressWarnings("unchecked") private StringBuffer getInterfaceScript(String scriptName,ServletContext servletContext) { """ Returns a script with a specified DWR interface @param basePath @return """ StringBuffer sb = new StringBuffer(ENGINE_INIT); // List all containers to find all DWR interfaces ...
java
@SuppressWarnings("unchecked") private StringBuffer getInterfaceScript(String scriptName,ServletContext servletContext) { StringBuffer sb = new StringBuffer(ENGINE_INIT); // List all containers to find all DWR interfaces List<Container> containers = ContainerUtil.getAllPublishedContainers(servletContext); boo...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "private", "StringBuffer", "getInterfaceScript", "(", "String", "scriptName", ",", "ServletContext", "servletContext", ")", "{", "StringBuffer", "sb", "=", "new", "StringBuffer", "(", "ENGINE_INIT", ")", ";", "// L...
Returns a script with a specified DWR interface @param basePath @return
[ "Returns", "a", "script", "with", "a", "specified", "DWR", "interface" ]
train
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr-dwr2.x/jawr-dwr2.x-extension/src/main/java/net/jawr/web/resource/bundle/generator/dwr/DWRBeanGenerator.java#L246-L276
Javen205/IJPay
src/main/java/com/jpay/unionpay/AcpService.java
AcpService.validateBySecureKey
public static boolean validateBySecureKey(Map<String, String> rspData, String secureKey, String encoding) { """ 多密钥验签(通过传入密钥签名)<br> @param resData 返回报文数据<br> @param encoding 上送请求报文域encoding字段的值<br> @return true 通过 false 未通过<br> """ return SDKUtil.validateBySecureKey(rspData, secureKey, encoding); }
java
public static boolean validateBySecureKey(Map<String, String> rspData, String secureKey, String encoding) { return SDKUtil.validateBySecureKey(rspData, secureKey, encoding); }
[ "public", "static", "boolean", "validateBySecureKey", "(", "Map", "<", "String", ",", "String", ">", "rspData", ",", "String", "secureKey", ",", "String", "encoding", ")", "{", "return", "SDKUtil", ".", "validateBySecureKey", "(", "rspData", ",", "secureKey", ...
多密钥验签(通过传入密钥签名)<br> @param resData 返回报文数据<br> @param encoding 上送请求报文域encoding字段的值<br> @return true 通过 false 未通过<br>
[ "多密钥验签", "(", "通过传入密钥签名", ")", "<br", ">" ]
train
https://github.com/Javen205/IJPay/blob/78da6be4b70675abc6a41df74817532fa257ef29/src/main/java/com/jpay/unionpay/AcpService.java#L75-L77
Activiti/Activiti
activiti-engine/src/main/java/org/activiti/engine/impl/persistence/entity/VariableScopeImpl.java
VariableScopeImpl.createVariableLocal
protected void createVariableLocal(String variableName, Object value, ExecutionEntity sourceActivityExecution) { """ only called when a new variable is created on this variable scope. This method is also responsible for propagating the creation of this variable to the history. """ ensureVariableInstancesIn...
java
protected void createVariableLocal(String variableName, Object value, ExecutionEntity sourceActivityExecution) { ensureVariableInstancesInitialized(); if (variableInstances.containsKey(variableName)) { throw new ActivitiException("variable '" + variableName + "' already exists. Use setVariableLocal if yo...
[ "protected", "void", "createVariableLocal", "(", "String", "variableName", ",", "Object", "value", ",", "ExecutionEntity", "sourceActivityExecution", ")", "{", "ensureVariableInstancesInitialized", "(", ")", ";", "if", "(", "variableInstances", ".", "containsKey", "(", ...
only called when a new variable is created on this variable scope. This method is also responsible for propagating the creation of this variable to the history.
[ "only", "called", "when", "a", "new", "variable", "is", "created", "on", "this", "variable", "scope", ".", "This", "method", "is", "also", "responsible", "for", "propagating", "the", "creation", "of", "this", "variable", "to", "the", "history", "." ]
train
https://github.com/Activiti/Activiti/blob/82e2b2cd2083b2f734ca0efc7815389c0f2517d9/activiti-engine/src/main/java/org/activiti/engine/impl/persistence/entity/VariableScopeImpl.java#L782-L790
VoltDB/voltdb
third_party/java/src/org/apache/zookeeper_voltpatches/ZooKeeper.java
ZooKeeper.getChildren
public List<String> getChildren(final String path, Watcher watcher, Stat stat) throws KeeperException, InterruptedException { """ For the given znode path return the stat and children list. <p> If the watch is non-null and the call is successful (no exception is thrown), a watch will be left on the ...
java
public List<String> getChildren(final String path, Watcher watcher, Stat stat) throws KeeperException, InterruptedException { verbotenThreadCheck(); final String clientPath = path; PathUtils.validatePath(clientPath); // the watch contains the un-chroot path WatchRegi...
[ "public", "List", "<", "String", ">", "getChildren", "(", "final", "String", "path", ",", "Watcher", "watcher", ",", "Stat", "stat", ")", "throws", "KeeperException", ",", "InterruptedException", "{", "verbotenThreadCheck", "(", ")", ";", "final", "String", "c...
For the given znode path return the stat and children list. <p> If the watch is non-null and the call is successful (no exception is thrown), a watch will be left on the node with the given path. The watch willbe triggered by a successful operation that deletes the node of the given path or creates/delete a child under...
[ "For", "the", "given", "znode", "path", "return", "the", "stat", "and", "children", "list", ".", "<p", ">", "If", "the", "watch", "is", "non", "-", "null", "and", "the", "call", "is", "successful", "(", "no", "exception", "is", "thrown", ")", "a", "w...
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/apache/zookeeper_voltpatches/ZooKeeper.java#L1410-L1439
easymock/objenesis
tck/src/main/java/org/objenesis/tck/TCK.java
TCK.registerCandidate
public void registerCandidate(Class<?> candidateClass, String description, Candidate.CandidateType type) { """ Register a candidate class to attempt to instantiate. @param candidateClass Class to attempt to instantiate @param description Description of the class """ Candidate candidate = new Candidat...
java
public void registerCandidate(Class<?> candidateClass, String description, Candidate.CandidateType type) { Candidate candidate = new Candidate(candidateClass, description, type); int index = candidates.indexOf(candidate); if(index >= 0) { Candidate existingCandidate = candidates.get(index); ...
[ "public", "void", "registerCandidate", "(", "Class", "<", "?", ">", "candidateClass", ",", "String", "description", ",", "Candidate", ".", "CandidateType", "type", ")", "{", "Candidate", "candidate", "=", "new", "Candidate", "(", "candidateClass", ",", "descript...
Register a candidate class to attempt to instantiate. @param candidateClass Class to attempt to instantiate @param description Description of the class
[ "Register", "a", "candidate", "class", "to", "attempt", "to", "instantiate", "." ]
train
https://github.com/easymock/objenesis/blob/8f601c8ba1aa20bbc640e2c2bc48d55df52c489f/tck/src/main/java/org/objenesis/tck/TCK.java#L91-L104
hdbeukel/james-core
src/main/java/org/jamesframework/core/subset/neigh/SingleAdditionNeighbourhood.java
SingleAdditionNeighbourhood.getRandomMove
@Override public SubsetMove getRandomMove(SubsetSolution solution, Random rnd) { """ Generates a random addition move for the given subset solution that adds a single ID to the selection. Possible fixed IDs are not considered to be added and the maximum subset size is taken into account. If no addition move ...
java
@Override public SubsetMove getRandomMove(SubsetSolution solution, Random rnd) { // check size limit if(maxSizeReached(solution)){ // size limit would be exceeded return null; } // get set of candidate IDs for addition (possibly fixed IDs are discarded) ...
[ "@", "Override", "public", "SubsetMove", "getRandomMove", "(", "SubsetSolution", "solution", ",", "Random", "rnd", ")", "{", "// check size limit", "if", "(", "maxSizeReached", "(", "solution", ")", ")", "{", "// size limit would be exceeded", "return", "null", ";",...
Generates a random addition move for the given subset solution that adds a single ID to the selection. Possible fixed IDs are not considered to be added and the maximum subset size is taken into account. If no addition move can be generated, <code>null</code> is returned. @param solution solution for which a random ad...
[ "Generates", "a", "random", "addition", "move", "for", "the", "given", "subset", "solution", "that", "adds", "a", "single", "ID", "to", "the", "selection", ".", "Possible", "fixed", "IDs", "are", "not", "considered", "to", "be", "added", "and", "the", "max...
train
https://github.com/hdbeukel/james-core/blob/4e85c20c142902373e5b5e8b5d12a2558650f66d/src/main/java/org/jamesframework/core/subset/neigh/SingleAdditionNeighbourhood.java#L104-L121
Azure/azure-sdk-for-java
automation/resource-manager/v2015_10_31/src/main/java/com/microsoft/azure/management/automation/v2015_10_31/implementation/DscCompilationJobStreamsInner.java
DscCompilationJobStreamsInner.listByJob
public JobStreamListResultInner listByJob(String resourceGroupName, String automationAccountName, UUID jobId) { """ Retrieve all the job streams for the compilation Job. @param resourceGroupName Name of an Azure Resource group. @param automationAccountName The name of the automation account. @param jobId The ...
java
public JobStreamListResultInner listByJob(String resourceGroupName, String automationAccountName, UUID jobId) { return listByJobWithServiceResponseAsync(resourceGroupName, automationAccountName, jobId).toBlocking().single().body(); }
[ "public", "JobStreamListResultInner", "listByJob", "(", "String", "resourceGroupName", ",", "String", "automationAccountName", ",", "UUID", "jobId", ")", "{", "return", "listByJobWithServiceResponseAsync", "(", "resourceGroupName", ",", "automationAccountName", ",", "jobId"...
Retrieve all the job streams for the compilation Job. @param resourceGroupName Name of an Azure Resource group. @param automationAccountName The name of the automation account. @param jobId The job id. @throws IllegalArgumentException thrown if parameters fail the validation @throws ErrorResponseException thrown if th...
[ "Retrieve", "all", "the", "job", "streams", "for", "the", "compilation", "Job", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/automation/resource-manager/v2015_10_31/src/main/java/com/microsoft/azure/management/automation/v2015_10_31/implementation/DscCompilationJobStreamsInner.java#L72-L74
VoltDB/voltdb
src/frontend/org/voltcore/messaging/HostMessenger.java
HostMessenger.cutLink
public void cutLink(int hostIdA, int hostIdB) { """ Cut the network connection between two hostids immediately Useful for simulating network partitions """ if (m_localHostId == hostIdA) { Iterator<ForeignHost> it = m_foreignHosts.get(hostIdB).iterator(); while (it.hasNext()) { ...
java
public void cutLink(int hostIdA, int hostIdB) { if (m_localHostId == hostIdA) { Iterator<ForeignHost> it = m_foreignHosts.get(hostIdB).iterator(); while (it.hasNext()) { ForeignHost fh = it.next(); fh.cutLink(); } } if (m_localH...
[ "public", "void", "cutLink", "(", "int", "hostIdA", ",", "int", "hostIdB", ")", "{", "if", "(", "m_localHostId", "==", "hostIdA", ")", "{", "Iterator", "<", "ForeignHost", ">", "it", "=", "m_foreignHosts", ".", "get", "(", "hostIdB", ")", ".", "iterator"...
Cut the network connection between two hostids immediately Useful for simulating network partitions
[ "Cut", "the", "network", "connection", "between", "two", "hostids", "immediately", "Useful", "for", "simulating", "network", "partitions" ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/messaging/HostMessenger.java#L1869-L1884
graphhopper/graphhopper
core/src/main/java/com/graphhopper/geohash/LinearKeyAlgo.java
LinearKeyAlgo.encode
@Override public final long encode(double lat, double lon) { """ Take latitude and longitude as input. <p> @return the linear key """ lat = Math.min(Math.max(lat, bounds.minLat), bounds.maxLat); lon = Math.min(Math.max(lon, bounds.minLon), bounds.maxLon); // introduce a minor co...
java
@Override public final long encode(double lat, double lon) { lat = Math.min(Math.max(lat, bounds.minLat), bounds.maxLat); lon = Math.min(Math.max(lon, bounds.minLon), bounds.maxLon); // introduce a minor correction to round to lower grid entry! long latIndex = (long) ((lat - bounds.m...
[ "@", "Override", "public", "final", "long", "encode", "(", "double", "lat", ",", "double", "lon", ")", "{", "lat", "=", "Math", ".", "min", "(", "Math", ".", "max", "(", "lat", ",", "bounds", ".", "minLat", ")", ",", "bounds", ".", "maxLat", ")", ...
Take latitude and longitude as input. <p> @return the linear key
[ "Take", "latitude", "and", "longitude", "as", "input", ".", "<p", ">" ]
train
https://github.com/graphhopper/graphhopper/blob/c235e306e6e823043cadcc41ead0e685bdebf737/core/src/main/java/com/graphhopper/geohash/LinearKeyAlgo.java#L80-L88
google/error-prone-javac
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDocletWriter.java
HtmlDocletWriter.getTargetModuleLink
public Content getTargetModuleLink(String target, Content label, ModuleElement mdle) { """ Get Module link, with target frame. @param target name of the target frame @param label tag for the link @param mdle the module being documented @return a content for the target module link """ return getHy...
java
public Content getTargetModuleLink(String target, Content label, ModuleElement mdle) { return getHyperLink(pathToRoot.resolve( DocPaths.moduleSummary(mdle)), label, "", target); }
[ "public", "Content", "getTargetModuleLink", "(", "String", "target", ",", "Content", "label", ",", "ModuleElement", "mdle", ")", "{", "return", "getHyperLink", "(", "pathToRoot", ".", "resolve", "(", "DocPaths", ".", "moduleSummary", "(", "mdle", ")", ")", ","...
Get Module link, with target frame. @param target name of the target frame @param label tag for the link @param mdle the module being documented @return a content for the target module link
[ "Get", "Module", "link", "with", "target", "frame", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDocletWriter.java#L386-L389
RestComm/media-core
scheduler/src/main/java/org/restcomm/media/core/scheduler/PriorityQueueScheduler.java
PriorityQueueScheduler.submit
public void submit(Task task,Integer index) { """ Queues task for execution according to its priority. @param task the task to be executed. """ task.activate(false); taskQueues[index].accept(task); }
java
public void submit(Task task,Integer index) { task.activate(false); taskQueues[index].accept(task); }
[ "public", "void", "submit", "(", "Task", "task", ",", "Integer", "index", ")", "{", "task", ".", "activate", "(", "false", ")", ";", "taskQueues", "[", "index", "]", ".", "accept", "(", "task", ")", ";", "}" ]
Queues task for execution according to its priority. @param task the task to be executed.
[ "Queues", "task", "for", "execution", "according", "to", "its", "priority", "." ]
train
https://github.com/RestComm/media-core/blob/07b8703343708599f60af66bae62aded77ee81b5/scheduler/src/main/java/org/restcomm/media/core/scheduler/PriorityQueueScheduler.java#L149-L152
jbundle/jbundle
base/screen/view/data/src/main/java/org/jbundle/base/screen/view/data/DTableAccessScreen.java
DTableAccessScreen.sendData
public void sendData(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { """ Process an HTML get or post. @param req The servlet request. @param res The servlet response object. @exception ServletException From inherited class. @exception IOException From inherited ...
java
public void sendData(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { //? res.setContentType("text/html"); //x OutputStream out = res.getOutputStream(); String strRecordClass = this.getProperty(NDatabase.RECORD_CLASS); String strTableName = ...
[ "public", "void", "sendData", "(", "HttpServletRequest", "req", ",", "HttpServletResponse", "res", ")", "throws", "ServletException", ",", "IOException", "{", "//? res.setContentType(\"text/html\");", "//x OutputStream out = res.getOutputStream();", "String", "strRecor...
Process an HTML get or post. @param req The servlet request. @param res The servlet response object. @exception ServletException From inherited class. @exception IOException From inherited class.
[ "Process", "an", "HTML", "get", "or", "post", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/screen/view/data/src/main/java/org/jbundle/base/screen/view/data/DTableAccessScreen.java#L79-L88
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/base64/Base64.java
Base64.encodeFileToFile
public static void encodeFileToFile (@Nonnull final String infile, @Nonnull final File aFile) throws IOException { """ Reads <code>infile</code> and encodes it to <code>outfile</code>. @param infile Input file @param aFile Output file @throws IOException if there is an error @since 2.2 """ final S...
java
public static void encodeFileToFile (@Nonnull final String infile, @Nonnull final File aFile) throws IOException { final String encoded = encodeFromFile (infile); try (final OutputStream out = FileHelper.getBufferedOutputStream (aFile)) { // Strict, 7-bit output. out.write (encoded.getBytes (P...
[ "public", "static", "void", "encodeFileToFile", "(", "@", "Nonnull", "final", "String", "infile", ",", "@", "Nonnull", "final", "File", "aFile", ")", "throws", "IOException", "{", "final", "String", "encoded", "=", "encodeFromFile", "(", "infile", ")", ";", ...
Reads <code>infile</code> and encodes it to <code>outfile</code>. @param infile Input file @param aFile Output file @throws IOException if there is an error @since 2.2
[ "Reads", "<code", ">", "infile<", "/", "code", ">", "and", "encodes", "it", "to", "<code", ">", "outfile<", "/", "code", ">", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/base64/Base64.java#L2498-L2506
xebia-france/xebia-logfilter-extras
src/main/java/fr/xebia/extras/filters/logfilters/RequestLoggerFilter.java
RequestLoggerFilter.doFilter
@Override public void doFilter(final ServletRequest servletRequest, final ServletResponse servletResponse, final FilterChain filterChain) throws IOException, ServletException { """ This is where the work is done. @param servletRequest @param servletResponse @param filterChain @throws IOException @throws...
java
@Override public void doFilter(final ServletRequest servletRequest, final ServletResponse servletResponse, final FilterChain filterChain) throws IOException, ServletException { ServletRequest request = servletRequest; ServletResponse response = servletResponse; int id = 0; // Genera...
[ "@", "Override", "public", "void", "doFilter", "(", "final", "ServletRequest", "servletRequest", ",", "final", "ServletResponse", "servletResponse", ",", "final", "FilterChain", "filterChain", ")", "throws", "IOException", ",", "ServletException", "{", "ServletRequest",...
This is where the work is done. @param servletRequest @param servletResponse @param filterChain @throws IOException @throws ServletException
[ "This", "is", "where", "the", "work", "is", "done", "." ]
train
https://github.com/xebia-france/xebia-logfilter-extras/blob/b1112329816d7f28fdba214425da8f15338a7157/src/main/java/fr/xebia/extras/filters/logfilters/RequestLoggerFilter.java#L106-L131
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WRadioButtonRenderer.java
WRadioButtonRenderer.doRender
@Override public void doRender(final WComponent component, final WebXmlRenderContext renderContext) { """ Paints the given WRadioButton. @param component the WRadioButton to paint. @param renderContext the RenderContext to paint to. """ WRadioButton button = (WRadioButton) component; XmlStringBuilder...
java
@Override public void doRender(final WComponent component, final WebXmlRenderContext renderContext) { WRadioButton button = (WRadioButton) component; XmlStringBuilder xml = renderContext.getWriter(); boolean readOnly = button.isReadOnly(); String value = button.getValue(); xml.appendTagOpen("ui:radiobutton...
[ "@", "Override", "public", "void", "doRender", "(", "final", "WComponent", "component", ",", "final", "WebXmlRenderContext", "renderContext", ")", "{", "WRadioButton", "button", "=", "(", "WRadioButton", ")", "component", ";", "XmlStringBuilder", "xml", "=", "rend...
Paints the given WRadioButton. @param component the WRadioButton to paint. @param renderContext the RenderContext to paint to.
[ "Paints", "the", "given", "WRadioButton", "." ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WRadioButtonRenderer.java#L24-L53
querydsl/querydsl
querydsl-jpa/src/main/java/com/querydsl/jpa/hibernate/HibernateUpdateClause.java
HibernateUpdateClause.setLockMode
@SuppressWarnings("unchecked") public HibernateUpdateClause setLockMode(Path<?> path, LockMode lockMode) { """ Set the lock mode for the given path. @return the current object """ lockModes.put(path, lockMode); return this; }
java
@SuppressWarnings("unchecked") public HibernateUpdateClause setLockMode(Path<?> path, LockMode lockMode) { lockModes.put(path, lockMode); return this; }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "HibernateUpdateClause", "setLockMode", "(", "Path", "<", "?", ">", "path", ",", "LockMode", "lockMode", ")", "{", "lockModes", ".", "put", "(", "path", ",", "lockMode", ")", ";", "return", "this"...
Set the lock mode for the given path. @return the current object
[ "Set", "the", "lock", "mode", "for", "the", "given", "path", "." ]
train
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-jpa/src/main/java/com/querydsl/jpa/hibernate/HibernateUpdateClause.java#L143-L147
Azure/azure-sdk-for-java
servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/primitives/Util.java
Util.convertDotNetBytesToUUID
public static UUID convertDotNetBytesToUUID(byte[] dotNetBytes) { """ First 4 bytes are in reverse order, 5th and 6th bytes are in reverse order, 7th and 8th bytes are also in reverse order """ if(dotNetBytes == null || dotNetBytes.length != GUIDSIZE) { return new UUID(0l, 0l); } byte[] reOrdered...
java
public static UUID convertDotNetBytesToUUID(byte[] dotNetBytes) { if(dotNetBytes == null || dotNetBytes.length != GUIDSIZE) { return new UUID(0l, 0l); } byte[] reOrderedBytes = new byte[GUIDSIZE]; for(int i=0; i<GUIDSIZE; i++) { int indexInReorderedBytes; switch(i) { case 0: indexIn...
[ "public", "static", "UUID", "convertDotNetBytesToUUID", "(", "byte", "[", "]", "dotNetBytes", ")", "{", "if", "(", "dotNetBytes", "==", "null", "||", "dotNetBytes", ".", "length", "!=", "GUIDSIZE", ")", "{", "return", "new", "UUID", "(", "0l", ",", "0l", ...
First 4 bytes are in reverse order, 5th and 6th bytes are in reverse order, 7th and 8th bytes are also in reverse order
[ "First", "4", "bytes", "are", "in", "reverse", "order", "5th", "and", "6th", "bytes", "are", "in", "reverse", "order", "7th", "and", "8th", "bytes", "are", "also", "in", "reverse", "order" ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/primitives/Util.java#L215-L263
pip-services3-java/pip-services3-commons-java
src/org/pipservices3/commons/convert/TypeConverter.java
TypeConverter.toTypeWithDefault
public static <T> T toTypeWithDefault(Class<T> type, Object value, T defaultValue) { """ Converts value into an object type specified by Type Code or returns default value when conversion is not possible. @param type the Class type for the data type into which 'value' is to be converted. @param value ...
java
public static <T> T toTypeWithDefault(Class<T> type, Object value, T defaultValue) { T result = toNullableType(type, value); return result != null ? result : defaultValue; }
[ "public", "static", "<", "T", ">", "T", "toTypeWithDefault", "(", "Class", "<", "T", ">", "type", ",", "Object", "value", ",", "T", "defaultValue", ")", "{", "T", "result", "=", "toNullableType", "(", "type", ",", "value", ")", ";", "return", "result",...
Converts value into an object type specified by Type Code or returns default value when conversion is not possible. @param type the Class type for the data type into which 'value' is to be converted. @param value the value to convert. @param defaultValue the default value to return if conversion is not ...
[ "Converts", "value", "into", "an", "object", "type", "specified", "by", "Type", "Code", "or", "returns", "default", "value", "when", "conversion", "is", "not", "possible", "." ]
train
https://github.com/pip-services3-java/pip-services3-commons-java/blob/a8a0c3e5ec58f0663c295aa855c6b3afad2af86a/src/org/pipservices3/commons/convert/TypeConverter.java#L193-L196
hypercube1024/firefly
firefly-db/src/main/java/com/firefly/db/init/ScriptUtils.java
ScriptUtils.splitSqlScript
public static void splitSqlScript(String script, String separator, List<String> statements) throws ScriptException { """ Split an SQL script into separate statements delimited by the provided separator string. Each individual statement will be added to the provided {@code List}. <p> Within the script, {@value ...
java
public static void splitSqlScript(String script, String separator, List<String> statements) throws ScriptException { splitSqlScript(null, script, separator, DEFAULT_COMMENT_PREFIX, DEFAULT_BLOCK_COMMENT_START_DELIMITER, DEFAULT_BLOCK_COMMENT_END_DELIMITER, statements); }
[ "public", "static", "void", "splitSqlScript", "(", "String", "script", ",", "String", "separator", ",", "List", "<", "String", ">", "statements", ")", "throws", "ScriptException", "{", "splitSqlScript", "(", "null", ",", "script", ",", "separator", ",", "DEFAU...
Split an SQL script into separate statements delimited by the provided separator string. Each individual statement will be added to the provided {@code List}. <p> Within the script, {@value #DEFAULT_COMMENT_PREFIX} will be used as the comment prefix; any text beginning with the comment prefix and extending to the end o...
[ "Split", "an", "SQL", "script", "into", "separate", "statements", "delimited", "by", "the", "provided", "separator", "string", ".", "Each", "individual", "statement", "will", "be", "added", "to", "the", "provided", "{", "@code", "List", "}", ".", "<p", ">", ...
train
https://github.com/hypercube1024/firefly/blob/ed3fc75b7c54a65b1e7d8141d01b49144bb423a3/firefly-db/src/main/java/com/firefly/db/init/ScriptUtils.java#L123-L126
TheHortonMachine/hortonmachine
gears/src/main/java/org/hortonmachine/gears/modules/utils/fileiterator/OmsFileIterator.java
OmsFileIterator.addPrj
public static void addPrj( String folder, String epsg ) throws Exception { """ Utility to add to all found files in a given folder the prj file following the supplied epsg. @param folder the folder to browse. @param epsg the epsg from which to take the prj. @throws Exception """ OmsFileIterator fi...
java
public static void addPrj( String folder, String epsg ) throws Exception { OmsFileIterator fiter = new OmsFileIterator(); fiter.inFolder = folder; fiter.pCode = epsg; fiter.process(); }
[ "public", "static", "void", "addPrj", "(", "String", "folder", ",", "String", "epsg", ")", "throws", "Exception", "{", "OmsFileIterator", "fiter", "=", "new", "OmsFileIterator", "(", ")", ";", "fiter", ".", "inFolder", "=", "folder", ";", "fiter", ".", "pC...
Utility to add to all found files in a given folder the prj file following the supplied epsg. @param folder the folder to browse. @param epsg the epsg from which to take the prj. @throws Exception
[ "Utility", "to", "add", "to", "all", "found", "files", "in", "a", "given", "folder", "the", "prj", "file", "following", "the", "supplied", "epsg", "." ]
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/gears/src/main/java/org/hortonmachine/gears/modules/utils/fileiterator/OmsFileIterator.java#L181-L186
twitter/hraven
hraven-core/src/main/java/com/twitter/hraven/util/ByteUtil.java
ByteUtil.getValueAsInt
public static int getValueAsInt(byte[] key, Map<byte[], byte[]> infoValues) { """ get value from a map as an int @param key @param infoValues @return int """ byte[] value = infoValues.get(key); if (value != null) { try { int retValue = Bytes.toInt(value); return retValue; ...
java
public static int getValueAsInt(byte[] key, Map<byte[], byte[]> infoValues) { byte[] value = infoValues.get(key); if (value != null) { try { int retValue = Bytes.toInt(value); return retValue; } catch (NumberFormatException nfe) { LOG.error("Caught NFE while converting to int...
[ "public", "static", "int", "getValueAsInt", "(", "byte", "[", "]", "key", ",", "Map", "<", "byte", "[", "]", ",", "byte", "[", "]", ">", "infoValues", ")", "{", "byte", "[", "]", "value", "=", "infoValues", ".", "get", "(", "key", ")", ";", "if",...
get value from a map as an int @param key @param infoValues @return int
[ "get", "value", "from", "a", "map", "as", "an", "int" ]
train
https://github.com/twitter/hraven/blob/e35996b6e2f016bcd18db0bad320be7c93d95208/hraven-core/src/main/java/com/twitter/hraven/util/ByteUtil.java#L316-L334
gitblit/fathom
fathom-rest-swagger/src/main/java/fathom/rest/swagger/SwaggerBuilder.java
SwaggerBuilder.registerResponses
protected void registerResponses(Swagger swagger, Operation operation, Method method) { """ Registers the declared responses for the operation. @param swagger @param operation @param method """ for (Return aReturn : ControllerUtil.getReturns(method)) { registerResponse(swagger, operati...
java
protected void registerResponses(Swagger swagger, Operation operation, Method method) { for (Return aReturn : ControllerUtil.getReturns(method)) { registerResponse(swagger, operation, aReturn); } }
[ "protected", "void", "registerResponses", "(", "Swagger", "swagger", ",", "Operation", "operation", ",", "Method", "method", ")", "{", "for", "(", "Return", "aReturn", ":", "ControllerUtil", ".", "getReturns", "(", "method", ")", ")", "{", "registerResponse", ...
Registers the declared responses for the operation. @param swagger @param operation @param method
[ "Registers", "the", "declared", "responses", "for", "the", "operation", "." ]
train
https://github.com/gitblit/fathom/blob/f2f820eb16e9fea1e36ad4eda4ed51b35f056538/fathom-rest-swagger/src/main/java/fathom/rest/swagger/SwaggerBuilder.java#L446-L450
oehf/ipf-oht-atna
auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/context/AuditorModuleContext.java
AuditorModuleContext.getAuditor
public IHEAuditor getAuditor(String className, boolean useContextAuditorRegistry) { """ Get an IHE Auditor instance from a fully-qualified class name @param className Auditor class to use @param useContextAuditorRegistry Whether to reuse cached auditors from context @return Auditor instance """ return g...
java
public IHEAuditor getAuditor(String className, boolean useContextAuditorRegistry) { return getAuditor(AuditorFactory.getAuditorClassForClassName(className),useContextAuditorRegistry); }
[ "public", "IHEAuditor", "getAuditor", "(", "String", "className", ",", "boolean", "useContextAuditorRegistry", ")", "{", "return", "getAuditor", "(", "AuditorFactory", ".", "getAuditorClassForClassName", "(", "className", ")", ",", "useContextAuditorRegistry", ")", ";",...
Get an IHE Auditor instance from a fully-qualified class name @param className Auditor class to use @param useContextAuditorRegistry Whether to reuse cached auditors from context @return Auditor instance
[ "Get", "an", "IHE", "Auditor", "instance", "from", "a", "fully", "-", "qualified", "class", "name" ]
train
https://github.com/oehf/ipf-oht-atna/blob/25ed1e926825169c94923a2c89a4618f60478ae8/auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/context/AuditorModuleContext.java#L287-L290
googleads/googleads-java-lib
modules/ads_lib/src/main/java/com/google/api/ads/common/lib/auth/OfflineCredentials.java
OfflineCredentials.generateCredential
public Credential generateCredential() throws OAuthException { """ Generates a new offline credential and immediately refreshes it. @return a newly refreshed offline credential. @throws OAuthException if the credential could not be refreshed. """ GoogleCredential credential = Strings.isNullOrEmpty(this...
java
public Credential generateCredential() throws OAuthException { GoogleCredential credential = Strings.isNullOrEmpty(this.jsonKeyFilePath) ? generateCredentialFromClientSecrets() : generateCredentialFromKeyFile(); try { if (!oAuth2Helper.callRefreshToken(credential)) { throw new OAut...
[ "public", "Credential", "generateCredential", "(", ")", "throws", "OAuthException", "{", "GoogleCredential", "credential", "=", "Strings", ".", "isNullOrEmpty", "(", "this", ".", "jsonKeyFilePath", ")", "?", "generateCredentialFromClientSecrets", "(", ")", ":", "gener...
Generates a new offline credential and immediately refreshes it. @return a newly refreshed offline credential. @throws OAuthException if the credential could not be refreshed.
[ "Generates", "a", "new", "offline", "credential", "and", "immediately", "refreshes", "it", "." ]
train
https://github.com/googleads/googleads-java-lib/blob/967957cc4f6076514e3a7926fe653e4f1f7cc9c9/modules/ads_lib/src/main/java/com/google/api/ads/common/lib/auth/OfflineCredentials.java#L229-L243
google/closure-compiler
src/com/google/javascript/jscomp/parsing/TypeTransformationParser.java
TypeTransformationParser.validBooleanExpression
private boolean validBooleanExpression(Node expr) { """ A boolean expression must be a boolean predicate or a boolean type predicate """ if (isBooleanOperation(expr)) { return validBooleanOperation(expr); } if (!isOperation(expr)) { warnInvalidExpression("boolean", expr); return...
java
private boolean validBooleanExpression(Node expr) { if (isBooleanOperation(expr)) { return validBooleanOperation(expr); } if (!isOperation(expr)) { warnInvalidExpression("boolean", expr); return false; } if (!isValidPredicate(getCallName(expr))) { warnInvalid("boolean predic...
[ "private", "boolean", "validBooleanExpression", "(", "Node", "expr", ")", "{", "if", "(", "isBooleanOperation", "(", "expr", ")", ")", "{", "return", "validBooleanOperation", "(", "expr", ")", ";", "}", "if", "(", "!", "isOperation", "(", "expr", ")", ")",...
A boolean expression must be a boolean predicate or a boolean type predicate
[ "A", "boolean", "expression", "must", "be", "a", "boolean", "predicate", "or", "a", "boolean", "type", "predicate" ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/parsing/TypeTransformationParser.java#L572-L599
spotify/docker-client
src/main/java/com/spotify/docker/client/DockerHost.java
DockerHost.fromEnv
public static DockerHost fromEnv() { """ Create a {@link DockerHost} from DOCKER_HOST and DOCKER_PORT env vars. @return The DockerHost object. """ final String host = endpointFromEnv(); final String certPath = certPathFromEnv(); return new DockerHost(host, certPath); }
java
public static DockerHost fromEnv() { final String host = endpointFromEnv(); final String certPath = certPathFromEnv(); return new DockerHost(host, certPath); }
[ "public", "static", "DockerHost", "fromEnv", "(", ")", "{", "final", "String", "host", "=", "endpointFromEnv", "(", ")", ";", "final", "String", "certPath", "=", "certPathFromEnv", "(", ")", ";", "return", "new", "DockerHost", "(", "host", ",", "certPath", ...
Create a {@link DockerHost} from DOCKER_HOST and DOCKER_PORT env vars. @return The DockerHost object.
[ "Create", "a", "{", "@link", "DockerHost", "}", "from", "DOCKER_HOST", "and", "DOCKER_PORT", "env", "vars", "." ]
train
https://github.com/spotify/docker-client/blob/f297361891f3bb6a2980b08057eede628d681791/src/main/java/com/spotify/docker/client/DockerHost.java#L169-L173
i-net-software/jlessc
src/com/inet/lib/less/FunctionExpression.java
FunctionExpression.getColor
private double getColor( Expression exp, CssFormatter formatter ) { """ Get a color value from the expression. And set the type variable. @param exp the expression @param formatter current formatter @return the the color value @throws ParameterOutOfBoundsException if the parameter with the index does not e...
java
private double getColor( Expression exp, CssFormatter formatter ) { type = exp.getDataType( formatter ); switch( type ) { case COLOR: case RGBA: return exp.doubleValue( formatter ); } throw new ParameterOutOfBoundsException(); }
[ "private", "double", "getColor", "(", "Expression", "exp", ",", "CssFormatter", "formatter", ")", "{", "type", "=", "exp", ".", "getDataType", "(", "formatter", ")", ";", "switch", "(", "type", ")", "{", "case", "COLOR", ":", "case", "RGBA", ":", "return...
Get a color value from the expression. And set the type variable. @param exp the expression @param formatter current formatter @return the the color value @throws ParameterOutOfBoundsException if the parameter with the index does not exists
[ "Get", "a", "color", "value", "from", "the", "expression", ".", "And", "set", "the", "type", "variable", "." ]
train
https://github.com/i-net-software/jlessc/blob/15b13e1637f6cc2e4d72df021e23ee0ca8d5e629/src/com/inet/lib/less/FunctionExpression.java#L993-L1001
wcm-io/wcm-io-handler
link/src/main/java/io/wcm/handler/link/type/MediaLinkType.java
MediaLinkType.getSyntheticLinkResource
public static @NotNull Resource getSyntheticLinkResource(@NotNull ResourceResolver resourceResolver, @NotNull String mediaRef) { """ Get synthetic link resource for this link type. @param resourceResolver Resource resolver @param mediaRef Media asset reference @return Synthetic link resource """ Map<Str...
java
public static @NotNull Resource getSyntheticLinkResource(@NotNull ResourceResolver resourceResolver, @NotNull String mediaRef) { Map<String, Object> map = new HashMap<>(); map.put(LinkNameConstants.PN_LINK_TYPE, ID); map.put(LinkNameConstants.PN_LINK_MEDIA_REF, mediaRef); return new SyntheticLinkResourc...
[ "public", "static", "@", "NotNull", "Resource", "getSyntheticLinkResource", "(", "@", "NotNull", "ResourceResolver", "resourceResolver", ",", "@", "NotNull", "String", "mediaRef", ")", "{", "Map", "<", "String", ",", "Object", ">", "map", "=", "new", "HashMap", ...
Get synthetic link resource for this link type. @param resourceResolver Resource resolver @param mediaRef Media asset reference @return Synthetic link resource
[ "Get", "synthetic", "link", "resource", "for", "this", "link", "type", "." ]
train
https://github.com/wcm-io/wcm-io-handler/blob/b0fc1c11a3ceb89efb73826dcfd480d6a00c19af/link/src/main/java/io/wcm/handler/link/type/MediaLinkType.java#L140-L145
Azure/azure-sdk-for-java
edgegateway/resource-manager/v2019_03_01/src/main/java/com/microsoft/azure/management/edgegateway/v2019_03_01/implementation/BandwidthSchedulesInner.java
BandwidthSchedulesInner.createOrUpdateAsync
public Observable<BandwidthScheduleInner> createOrUpdateAsync(String deviceName, String name, String resourceGroupName, BandwidthScheduleInner parameters) { """ Creates or updates a bandwidth schedule. @param deviceName The device name. @param name The bandwidth schedule name which needs to be added/updated. ...
java
public Observable<BandwidthScheduleInner> createOrUpdateAsync(String deviceName, String name, String resourceGroupName, BandwidthScheduleInner parameters) { return createOrUpdateWithServiceResponseAsync(deviceName, name, resourceGroupName, parameters).map(new Func1<ServiceResponse<BandwidthScheduleInner>, Bandw...
[ "public", "Observable", "<", "BandwidthScheduleInner", ">", "createOrUpdateAsync", "(", "String", "deviceName", ",", "String", "name", ",", "String", "resourceGroupName", ",", "BandwidthScheduleInner", "parameters", ")", "{", "return", "createOrUpdateWithServiceResponseAsyn...
Creates or updates a bandwidth schedule. @param deviceName The device name. @param name The bandwidth schedule name which needs to be added/updated. @param resourceGroupName The resource group name. @param parameters The bandwidth schedule to be added or updated. @throws IllegalArgumentException thrown if parameters f...
[ "Creates", "or", "updates", "a", "bandwidth", "schedule", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/edgegateway/resource-manager/v2019_03_01/src/main/java/com/microsoft/azure/management/edgegateway/v2019_03_01/implementation/BandwidthSchedulesInner.java#L351-L358
datasalt/pangool
core/src/main/java/com/datasalt/pangool/io/Mutator.java
Mutator.superSetOf
public static Schema superSetOf(String newName, Schema schema, Field... newFields) { """ Creates a superset of the input Schema, taking all the Fields in the input schema and adding some new ones. The new fields are fully specified in a Field class. The name of the schema is also specified as a parameter. ""...
java
public static Schema superSetOf(String newName, Schema schema, Field... newFields) { List<Field> newSchema = new ArrayList<Field>(); newSchema.addAll(schema.getFields()); for(Field newField: newFields) { newSchema.add(newField); } return new Schema(newName, newSchema); }
[ "public", "static", "Schema", "superSetOf", "(", "String", "newName", ",", "Schema", "schema", ",", "Field", "...", "newFields", ")", "{", "List", "<", "Field", ">", "newSchema", "=", "new", "ArrayList", "<", "Field", ">", "(", ")", ";", "newSchema", "."...
Creates a superset of the input Schema, taking all the Fields in the input schema and adding some new ones. The new fields are fully specified in a Field class. The name of the schema is also specified as a parameter.
[ "Creates", "a", "superset", "of", "the", "input", "Schema", "taking", "all", "the", "Fields", "in", "the", "input", "schema", "and", "adding", "some", "new", "ones", ".", "The", "new", "fields", "are", "fully", "specified", "in", "a", "Field", "class", "...
train
https://github.com/datasalt/pangool/blob/bfd312dd78cba03febaf7988ae96a3d4bc585408/core/src/main/java/com/datasalt/pangool/io/Mutator.java#L82-L89
aol/cyclops
cyclops/src/main/java/cyclops/function/Predicates.java
Predicates.valuePresent
public static <T> Predicate<T> valuePresent() { """ <pre> {@code import static cyclops2.function.Predicates.valuePresent; Seq.of(Maybe.ofNullable(null),Maybe.just(1),null) .filter(valuePresent()); //Seq[Maybe[1]] } </pre> @return A Predicate that checks if it's input is a cyclops2-react Value (which al...
java
public static <T> Predicate<T> valuePresent() { return t -> t instanceof Value ? ((Value) t).toMaybe() .isPresent() : false; }
[ "public", "static", "<", "T", ">", "Predicate", "<", "T", ">", "valuePresent", "(", ")", "{", "return", "t", "->", "t", "instanceof", "Value", "?", "(", "(", "Value", ")", "t", ")", ".", "toMaybe", "(", ")", ".", "isPresent", "(", ")", ":", "fals...
<pre> {@code import static cyclops2.function.Predicates.valuePresent; Seq.of(Maybe.ofNullable(null),Maybe.just(1),null) .filter(valuePresent()); //Seq[Maybe[1]] } </pre> @return A Predicate that checks if it's input is a cyclops2-react Value (which also contains a present value)
[ "<pre", ">", "{", "@code", "import", "static", "cyclops2", ".", "function", ".", "Predicates", ".", "valuePresent", ";" ]
train
https://github.com/aol/cyclops/blob/59a9fde30190a4d1faeb9f6d9851d209d82b81dd/cyclops/src/main/java/cyclops/function/Predicates.java#L119-L123
elki-project/elki
elki-outlier/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/subspace/AggarwalYuEvolutionary.java
AggarwalYuEvolutionary.run
public OutlierResult run(Database database, Relation<V> relation) { """ Performs the evolutionary algorithm on the given database. @param database Database @param relation Relation @return Result """ final int dbsize = relation.size(); ArrayList<ArrayList<DBIDs>> ranges = buildRanges(relation); ...
java
public OutlierResult run(Database database, Relation<V> relation) { final int dbsize = relation.size(); ArrayList<ArrayList<DBIDs>> ranges = buildRanges(relation); Heap<Individuum>.UnorderedIter individuums = (new EvolutionarySearch(relation, ranges, m, rnd.getSingleThreadedRandom())).run(); WritableD...
[ "public", "OutlierResult", "run", "(", "Database", "database", ",", "Relation", "<", "V", ">", "relation", ")", "{", "final", "int", "dbsize", "=", "relation", ".", "size", "(", ")", ";", "ArrayList", "<", "ArrayList", "<", "DBIDs", ">", ">", "ranges", ...
Performs the evolutionary algorithm on the given database. @param database Database @param relation Relation @return Result
[ "Performs", "the", "evolutionary", "algorithm", "on", "the", "given", "database", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-outlier/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/subspace/AggarwalYuEvolutionary.java#L133-L162
Domo42/saga-lib
saga-lib/src/main/java/com/codebullets/sagalib/processing/invocation/SagaExecutionErrorsException.java
SagaExecutionErrorsException.rethrowOrThrowIfMultiple
public static void rethrowOrThrowIfMultiple(final String message, final Collection<Exception> errors) throws Exception { """ Checks the provided errors list for the number of instances. If no error is reported does nothing. In case of a single error the original exception is thrown, in case multiple errors, enca...
java
public static void rethrowOrThrowIfMultiple(final String message, final Collection<Exception> errors) throws Exception { int exceptionsCount = errors.size(); switch (exceptionsCount) { case 0: // no error -> do nothing break; case 1: ...
[ "public", "static", "void", "rethrowOrThrowIfMultiple", "(", "final", "String", "message", ",", "final", "Collection", "<", "Exception", ">", "errors", ")", "throws", "Exception", "{", "int", "exceptionsCount", "=", "errors", ".", "size", "(", ")", ";", "switc...
Checks the provided errors list for the number of instances. If no error is reported does nothing. In case of a single error the original exception is thrown, in case multiple errors, encapsulate the list into a new thrown {@link SagaExecutionErrorsException} @throws Exception Throws the original exception or a new {@...
[ "Checks", "the", "provided", "errors", "list", "for", "the", "number", "of", "instances", ".", "If", "no", "error", "is", "reported", "does", "nothing", ".", "In", "case", "of", "a", "single", "error", "the", "original", "exception", "is", "thrown", "in", ...
train
https://github.com/Domo42/saga-lib/blob/c8f232e2a51fcb6a3fe0082cfbf105c1e6bf90ef/saga-lib/src/main/java/com/codebullets/sagalib/processing/invocation/SagaExecutionErrorsException.java#L73-L85
VoltDB/voltdb
src/frontend/org/voltdb/messaging/FastDeserializer.java
FastDeserializer.readString
public String readString() throws IOException { """ Read a string in the standard VoltDB way. That is, four bytes of length info followed by the bytes of characters encoded in UTF-8. @return The String value read from the stream. @throws IOException Rethrows any IOExceptions. """ final int len = ...
java
public String readString() throws IOException { final int len = readInt(); // check for null string if (len == VoltType.NULL_STRING_LENGTH) { return null; } if (len < VoltType.NULL_STRING_LENGTH) { throw new IOException("String length is negative " + len...
[ "public", "String", "readString", "(", ")", "throws", "IOException", "{", "final", "int", "len", "=", "readInt", "(", ")", ";", "// check for null string", "if", "(", "len", "==", "VoltType", ".", "NULL_STRING_LENGTH", ")", "{", "return", "null", ";", "}", ...
Read a string in the standard VoltDB way. That is, four bytes of length info followed by the bytes of characters encoded in UTF-8. @return The String value read from the stream. @throws IOException Rethrows any IOExceptions.
[ "Read", "a", "string", "in", "the", "standard", "VoltDB", "way", ".", "That", "is", "four", "bytes", "of", "length", "info", "followed", "by", "the", "bytes", "of", "characters", "encoded", "in", "UTF", "-", "8", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/messaging/FastDeserializer.java#L182-L201
alkacon/opencms-core
src/org/opencms/site/xmlsitemap/CmsXmlSitemapGenerator.java
CmsXmlSitemapGenerator.getLocale
private Locale getLocale(CmsResource resource, List<CmsProperty> propertyList) { """ Gets the locale to use for the given resource.<p> @param resource the resource @param propertyList the properties of the resource @return the locale to use for the given resource """ return OpenCms.getLocaleM...
java
private Locale getLocale(CmsResource resource, List<CmsProperty> propertyList) { return OpenCms.getLocaleManager().getDefaultLocale(m_guestCms, m_guestCms.getSitePath(resource)); }
[ "private", "Locale", "getLocale", "(", "CmsResource", "resource", ",", "List", "<", "CmsProperty", ">", "propertyList", ")", "{", "return", "OpenCms", ".", "getLocaleManager", "(", ")", ".", "getDefaultLocale", "(", "m_guestCms", ",", "m_guestCms", ".", "getSite...
Gets the locale to use for the given resource.<p> @param resource the resource @param propertyList the properties of the resource @return the locale to use for the given resource
[ "Gets", "the", "locale", "to", "use", "for", "the", "given", "resource", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/site/xmlsitemap/CmsXmlSitemapGenerator.java#L753-L756
albfernandez/itext2
src/main/java/com/lowagie/text/rtf/text/RtfSection.java
RtfSection.updateIndentation
private void updateIndentation(float indentLeft, float indentRight, float indentContent) { """ Updates the left, right and content indentation of all RtfParagraph and RtfSection elements that this RtfSection contains. @param indentLeft The left indentation to add. @param indentRight The right indentation to a...
java
private void updateIndentation(float indentLeft, float indentRight, float indentContent) { if(this.title != null) { this.title.setIndentLeft((int) (this.title.getIndentLeft() + indentLeft * RtfElement.TWIPS_FACTOR)); this.title.setIndentRight((int) (this.title.getIndentRight() + indentRi...
[ "private", "void", "updateIndentation", "(", "float", "indentLeft", ",", "float", "indentRight", ",", "float", "indentContent", ")", "{", "if", "(", "this", ".", "title", "!=", "null", ")", "{", "this", ".", "title", ".", "setIndentLeft", "(", "(", "int", ...
Updates the left, right and content indentation of all RtfParagraph and RtfSection elements that this RtfSection contains. @param indentLeft The left indentation to add. @param indentRight The right indentation to add. @param indentContent The content indentation to add.
[ "Updates", "the", "left", "right", "and", "content", "indentation", "of", "all", "RtfParagraph", "and", "RtfSection", "elements", "that", "this", "RtfSection", "contains", "." ]
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/rtf/text/RtfSection.java#L183-L197
lievendoclo/Valkyrie-RCP
valkyrie-rcp-core/src/main/java/org/valkyriercp/form/builder/AbstractFormBuilder.java
AbstractFormBuilder.createLabelFor
protected JLabel createLabelFor(String fieldName, JComponent component) { """ Create a label for the property. @param fieldName the name of the property. @param component the component of the property which is related to the label. @return a {@link JLabel} for the property. """ JLabel label = getCompon...
java
protected JLabel createLabelFor(String fieldName, JComponent component) { JLabel label = getComponentFactory().createLabel(""); getFormModel().getFieldFace(fieldName).configure(label); label.setLabelFor(component); FormComponentInterceptor interceptor = getFormComponentInterceptor(); if (interceptor != null)...
[ "protected", "JLabel", "createLabelFor", "(", "String", "fieldName", ",", "JComponent", "component", ")", "{", "JLabel", "label", "=", "getComponentFactory", "(", ")", ".", "createLabel", "(", "\"\"", ")", ";", "getFormModel", "(", ")", ".", "getFieldFace", "(...
Create a label for the property. @param fieldName the name of the property. @param component the component of the property which is related to the label. @return a {@link JLabel} for the property.
[ "Create", "a", "label", "for", "the", "property", "." ]
train
https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/form/builder/AbstractFormBuilder.java#L184-L195
salesforce/Argus
ArgusCore/src/main/java/com/salesforce/dva/argus/service/tsdb/CachedTSDBService.java
CachedTSDBService.constructMetricQueryKey
private String constructMetricQueryKey(Long startTimeStampBoundary, Metric metric, MetricQuery query) { """ Constructs a cache key from start time stamp boundary, returned metric tags and metric query. @param startTimeStampBoundary The start time stamp boundary. @param metric The metric t...
java
private String constructMetricQueryKey(Long startTimeStampBoundary, Metric metric, MetricQuery query) { StringBuilder sb = new StringBuilder(); sb.append(startTimeStampBoundary).append(":"); sb.append(query.getNamespace()).append(":"); sb.append(query.getScope()).append(":"); sb...
[ "private", "String", "constructMetricQueryKey", "(", "Long", "startTimeStampBoundary", ",", "Metric", "metric", ",", "MetricQuery", "query", ")", "{", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";", "sb", ".", "append", "(", "startTimeStampBound...
Constructs a cache key from start time stamp boundary, returned metric tags and metric query. @param startTimeStampBoundary The start time stamp boundary. @param metric The metric to construct the cache key for. @param query The query to use to construct the cache key. @retur...
[ "Constructs", "a", "cache", "key", "from", "start", "time", "stamp", "boundary", "returned", "metric", "tags", "and", "metric", "query", "." ]
train
https://github.com/salesforce/Argus/blob/121b59a268da264316cded6a3e9271366a23cd86/ArgusCore/src/main/java/com/salesforce/dva/argus/service/tsdb/CachedTSDBService.java#L280-L296
jmapper-framework/jmapper-core
JMapper Framework/src/main/java/com/googlecode/jmapper/generation/MapperConstructor.java
MapperConstructor.isNullSetting
private boolean isNullSetting(boolean makeDest,MappingType mtd,MappingType mts,StringBuilder result) { """ if it is a null setting returns the null mapping @param makeDest true if destination is a new instance @param mtd mapping type of destination @param mts mapping type of source @param result StringBuilder ...
java
private boolean isNullSetting(boolean makeDest,MappingType mtd,MappingType mts,StringBuilder result){ if( makeDest && (mtd == ALL_FIELDS||mtd == ONLY_VALUED_FIELDS) && mts == ONLY_NULL_FIELDS){ result.append(" "+stringOfSetDestination+"(null);"+newLine); return true; } return false; }
[ "private", "boolean", "isNullSetting", "(", "boolean", "makeDest", ",", "MappingType", "mtd", ",", "MappingType", "mts", ",", "StringBuilder", "result", ")", "{", "if", "(", "makeDest", "&&", "(", "mtd", "==", "ALL_FIELDS", "||", "mtd", "==", "ONLY_VALUED_FIEL...
if it is a null setting returns the null mapping @param makeDest true if destination is a new instance @param mtd mapping type of destination @param mts mapping type of source @param result StringBuilder used for mapping @return true if operation is a null setting, false otherwise
[ "if", "it", "is", "a", "null", "setting", "returns", "the", "null", "mapping" ]
train
https://github.com/jmapper-framework/jmapper-core/blob/b48fd3527f35055b8b4a30f53a51136f183acc90/JMapper Framework/src/main/java/com/googlecode/jmapper/generation/MapperConstructor.java#L206-L214
francisdb/serviceloader-maven-plugin
src/main/java/eu/somatik/maven/serviceloader/ServiceloaderMojo.java
ServiceloaderMojo.loadServiceClasses
private List<Class<?>> loadServiceClasses(ClassLoader loader) throws MojoExecutionException { """ Loads all interfaces using the provided ClassLoader @param loader the classloader @return thi List of Interface classes @throws MojoExecutionException is the interfaces are not interfaces or can not ...
java
private List<Class<?>> loadServiceClasses(ClassLoader loader) throws MojoExecutionException { List<Class<?>> serviceClasses = new ArrayList<Class<?>>(); for (String serviceClassName : getServices()) { try { Class<?> serviceClass = loader.loadClass(serviceClassName...
[ "private", "List", "<", "Class", "<", "?", ">", ">", "loadServiceClasses", "(", "ClassLoader", "loader", ")", "throws", "MojoExecutionException", "{", "List", "<", "Class", "<", "?", ">", ">", "serviceClasses", "=", "new", "ArrayList", "<", "Class", "<", "...
Loads all interfaces using the provided ClassLoader @param loader the classloader @return thi List of Interface classes @throws MojoExecutionException is the interfaces are not interfaces or can not be found on the classpath
[ "Loads", "all", "interfaces", "using", "the", "provided", "ClassLoader" ]
train
https://github.com/francisdb/serviceloader-maven-plugin/blob/521a467ed5c00636749f6c6531be85ddf296565e/src/main/java/eu/somatik/maven/serviceloader/ServiceloaderMojo.java#L178-L190
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/db/Record.java
Record.getField
public BaseField getField(String strTableName, int iFieldSeq) // Lookup this field { """ Get this field in the table/record. @param strTableName the name of the table this field is in. @param iFieldSeq The sequence of the field in the record. @return The field. """ if (this.getRecord(strTableName)...
java
public BaseField getField(String strTableName, int iFieldSeq) // Lookup this field { if (this.getRecord(strTableName) != this) return null; return this.getField(iFieldSeq); }
[ "public", "BaseField", "getField", "(", "String", "strTableName", ",", "int", "iFieldSeq", ")", "// Lookup this field", "{", "if", "(", "this", ".", "getRecord", "(", "strTableName", ")", "!=", "this", ")", "return", "null", ";", "return", "this", ".", "getF...
Get this field in the table/record. @param strTableName the name of the table this field is in. @param iFieldSeq The sequence of the field in the record. @return The field.
[ "Get", "this", "field", "in", "the", "table", "/", "record", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/Record.java#L1003-L1008
auth0/Auth0.Android
auth0/src/main/java/com/auth0/android/provider/PermissionHandler.java
PermissionHandler.areAllPermissionsGranted
public boolean areAllPermissionsGranted(@NonNull Activity activity, @NonNull String[] permissions) { """ Checks if the given Android Manifest Permissions have been granted by the user to this application before. @param activity the caller activity @param permissions to check availability for @return true i...
java
public boolean areAllPermissionsGranted(@NonNull Activity activity, @NonNull String[] permissions) { for (String p : permissions) { if (!isPermissionGranted(activity, p)) { return false; } } return true; }
[ "public", "boolean", "areAllPermissionsGranted", "(", "@", "NonNull", "Activity", "activity", ",", "@", "NonNull", "String", "[", "]", "permissions", ")", "{", "for", "(", "String", "p", ":", "permissions", ")", "{", "if", "(", "!", "isPermissionGranted", "(...
Checks if the given Android Manifest Permissions have been granted by the user to this application before. @param activity the caller activity @param permissions to check availability for @return true if all the Android Manifest Permissions are currently granted, false otherwise.
[ "Checks", "if", "the", "given", "Android", "Manifest", "Permissions", "have", "been", "granted", "by", "the", "user", "to", "this", "application", "before", "." ]
train
https://github.com/auth0/Auth0.Android/blob/ee37b7f94d989c1fbab2cb1378c87fdcaf7a8156/auth0/src/main/java/com/auth0/android/provider/PermissionHandler.java#L67-L74