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
jamesagnew/hapi-fhir
hapi-fhir-structures-dstu2.1/src/main/java/org/hl7/fhir/dstu2016may/utils/ProfileUtilities.java
ProfileUtilities.updateURLs
private ElementDefinition updateURLs(String url, ElementDefinition element) { """ Finds internal references in an Element's Binding and StructureDefinition references (in TypeRef) and bases them on the given url @param url - the base url to use to turn internal references into absolute references @param element ...
java
private ElementDefinition updateURLs(String url, ElementDefinition element) { if (element != null) { ElementDefinition defn = element; if (defn.hasBinding() && defn.getBinding().getValueSet() instanceof Reference && ((Reference)defn.getBinding().getValueSet()).getReference().startsWith("#")) ((R...
[ "private", "ElementDefinition", "updateURLs", "(", "String", "url", ",", "ElementDefinition", "element", ")", "{", "if", "(", "element", "!=", "null", ")", "{", "ElementDefinition", "defn", "=", "element", ";", "if", "(", "defn", ".", "hasBinding", "(", ")",...
Finds internal references in an Element's Binding and StructureDefinition references (in TypeRef) and bases them on the given url @param url - the base url to use to turn internal references into absolute references @param element - the Element to update @return - the updated Element
[ "Finds", "internal", "references", "in", "an", "Element", "s", "Binding", "and", "StructureDefinition", "references", "(", "in", "TypeRef", ")", "and", "bases", "them", "on", "the", "given", "url" ]
train
https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-structures-dstu2.1/src/main/java/org/hl7/fhir/dstu2016may/utils/ProfileUtilities.java#L1474-L1487
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/ValueEnforcer.java
ValueEnforcer.isEqual
public static void isEqual (final double dValue, final double dExpectedValue, final String sName) { """ Check that the passed value is the same as the provided expected value using <code>==</code> to check comparison. @param dValue The First value. @param dExpectedValue The expected value. @param sName Th...
java
public static void isEqual (final double dValue, final double dExpectedValue, final String sName) { if (isEnabled ()) isEqual (dValue, dExpectedValue, () -> sName); }
[ "public", "static", "void", "isEqual", "(", "final", "double", "dValue", ",", "final", "double", "dExpectedValue", ",", "final", "String", "sName", ")", "{", "if", "(", "isEnabled", "(", ")", ")", "isEqual", "(", "dValue", ",", "dExpectedValue", ",", "(", ...
Check that the passed value is the same as the provided expected value using <code>==</code> to check comparison. @param dValue The First value. @param dExpectedValue The expected value. @param sName The name of the value (e.g. the parameter name) @throws IllegalArgumentException if the passed value is not <code>null<...
[ "Check", "that", "the", "passed", "value", "is", "the", "same", "as", "the", "provided", "expected", "value", "using", "<code", ">", "==", "<", "/", "code", ">", "to", "check", "comparison", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/ValueEnforcer.java#L1626-L1630
knowm/XChart
xchart/src/main/java/org/knowm/xchart/internal/series/AxesChartSeriesNumericalNoErrorBars.java
AxesChartSeriesNumericalNoErrorBars.replaceData
public void replaceData(double[] newXData, double[] newYData, double[] newExtraValues) { """ This is an internal method which shouldn't be called from client code. Use XYChart.updateXYSeries or CategoryChart.updateXYSeries instead! @param newXData @param newYData @param newExtraValues """ // Sanity ...
java
public void replaceData(double[] newXData, double[] newYData, double[] newExtraValues) { // Sanity check if (newExtraValues != null && newExtraValues.length != newYData.length) { throw new IllegalArgumentException("error bars and Y-Axis sizes are not the same!!!"); } if (newXData.length != newYDa...
[ "public", "void", "replaceData", "(", "double", "[", "]", "newXData", ",", "double", "[", "]", "newYData", ",", "double", "[", "]", "newExtraValues", ")", "{", "// Sanity check", "if", "(", "newExtraValues", "!=", "null", "&&", "newExtraValues", ".", "length...
This is an internal method which shouldn't be called from client code. Use XYChart.updateXYSeries or CategoryChart.updateXYSeries instead! @param newXData @param newYData @param newExtraValues
[ "This", "is", "an", "internal", "method", "which", "shouldn", "t", "be", "called", "from", "client", "code", ".", "Use", "XYChart", ".", "updateXYSeries", "or", "CategoryChart", ".", "updateXYSeries", "instead!" ]
train
https://github.com/knowm/XChart/blob/677a105753a855edf24782fab1bf1f5aec3e642b/xchart/src/main/java/org/knowm/xchart/internal/series/AxesChartSeriesNumericalNoErrorBars.java#L62-L79
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.security/src/com/ibm/ws/messaging/security/utility/MessagingSecurityUtility.java
MessagingSecurityUtility.createAuthenticationData
public static AuthenticationData createAuthenticationData(String userName, String password) { """ Create AuthenticationData Object from the UserName and Password passed @param userName @param password @return """ if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) { SibTr....
java
public static AuthenticationData createAuthenticationData(String userName, String password) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) { SibTr.entry(tc, CLASS_NAME + "createAuthenticationData", new Object[] { userName, "Password Not Traced" }); } Authenticatio...
[ "public", "static", "AuthenticationData", "createAuthenticationData", "(", "String", "userName", ",", "String", "password", ")", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isEntryEnabled", "(", ")", ")", "{", "SibTr...
Create AuthenticationData Object from the UserName and Password passed @param userName @param password @return
[ "Create", "AuthenticationData", "Object", "from", "the", "UserName", "and", "Password", "passed" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.security/src/com/ibm/ws/messaging/security/utility/MessagingSecurityUtility.java#L106-L121
alkacon/opencms-core
src/org/opencms/jsp/search/config/parser/CmsJSONSearchConfigurationParser.java
CmsJSONSearchConfigurationParser.parseOptionalStringValue
protected static String parseOptionalStringValue(JSONObject json, String key) { """ Helper for reading an optional String value - returning <code>null</code> if parsing fails. @param json The JSON object where the value should be read from. @param key The key of the value to read. @return The value from the JSO...
java
protected static String parseOptionalStringValue(JSONObject json, String key) { try { return json.getString(key); } catch (JSONException e) { LOG.info(Messages.get().getBundle().key(Messages.LOG_OPTIONAL_STRING_MISSING_1, key), e); return null; } }
[ "protected", "static", "String", "parseOptionalStringValue", "(", "JSONObject", "json", ",", "String", "key", ")", "{", "try", "{", "return", "json", ".", "getString", "(", "key", ")", ";", "}", "catch", "(", "JSONException", "e", ")", "{", "LOG", ".", "...
Helper for reading an optional String value - returning <code>null</code> if parsing fails. @param json The JSON object where the value should be read from. @param key The key of the value to read. @return The value from the JSON, or <code>null</code> if the value does not exist.
[ "Helper", "for", "reading", "an", "optional", "String", "value", "-", "returning", "<code", ">", "null<", "/", "code", ">", "if", "parsing", "fails", "." ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/search/config/parser/CmsJSONSearchConfigurationParser.java#L299-L307
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/sax2dtm/SAX2DTM2.java
SAX2DTM2.endElement
public void endElement(String uri, String localName, String qName) throws SAXException { """ Receive notification of the end of an element. <p>By default, do nothing. Application writers may override this method in a subclass to take specific actions at the end of each element (such as finalising a...
java
public void endElement(String uri, String localName, String qName) throws SAXException { charactersFlush(); // If no one noticed, startPrefixMapping is a drag. // Pop the context for the last child (the one pushed by startElement) m_contextIndexes.quickPop(1); // Do it again for this o...
[ "public", "void", "endElement", "(", "String", "uri", ",", "String", "localName", ",", "String", "qName", ")", "throws", "SAXException", "{", "charactersFlush", "(", ")", ";", "// If no one noticed, startPrefixMapping is a drag.", "// Pop the context for the last child (the...
Receive notification of the end of an element. <p>By default, do nothing. Application writers may override this method in a subclass to take specific actions at the end of each element (such as finalising a tree node or writing output to a file).</p> @param uri The Namespace URI, or the empty string if the element h...
[ "Receive", "notification", "of", "the", "end", "of", "an", "element", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/sax2dtm/SAX2DTM2.java#L2226-L2244
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/gd/StreamSet.java
StreamSet.getStream
public Stream getStream(int priority, Reliability reliability) throws SIResourceException { """ Get a specific stream based on priority and reliability @param priority @param reliability @throws SIResourceException """ return getSubset(reliability).getStream(priority); }
java
public Stream getStream(int priority, Reliability reliability) throws SIResourceException { return getSubset(reliability).getStream(priority); }
[ "public", "Stream", "getStream", "(", "int", "priority", ",", "Reliability", "reliability", ")", "throws", "SIResourceException", "{", "return", "getSubset", "(", "reliability", ")", ".", "getStream", "(", "priority", ")", ";", "}" ]
Get a specific stream based on priority and reliability @param priority @param reliability @throws SIResourceException
[ "Get", "a", "specific", "stream", "based", "on", "priority", "and", "reliability" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/gd/StreamSet.java#L465-L468
Harium/keel
src/main/java/com/harium/keel/catalano/math/distance/Distance.java
Distance.Euclidean
public static double Euclidean(IntPoint p, IntPoint q) { """ Gets the Euclidean distance between two points. @param p IntPoint with X and Y axis coordinates. @param q IntPoint with X and Y axis coordinates. @return The Euclidean distance between x and y. """ return Euclidean(p.x, p.y, q.x, q.y); ...
java
public static double Euclidean(IntPoint p, IntPoint q) { return Euclidean(p.x, p.y, q.x, q.y); }
[ "public", "static", "double", "Euclidean", "(", "IntPoint", "p", ",", "IntPoint", "q", ")", "{", "return", "Euclidean", "(", "p", ".", "x", ",", "p", ".", "y", ",", "q", ".", "x", ",", "q", ".", "y", ")", ";", "}" ]
Gets the Euclidean distance between two points. @param p IntPoint with X and Y axis coordinates. @param q IntPoint with X and Y axis coordinates. @return The Euclidean distance between x and y.
[ "Gets", "the", "Euclidean", "distance", "between", "two", "points", "." ]
train
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/math/distance/Distance.java#L401-L403
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.beginStartAsync
public Observable<OperationStatusResponseInner> beginStartAsync(String resourceGroupName, String vmScaleSetName) { """ Starts one or more virtual machines in a VM scale set. @param resourceGroupName The name of the resource group. @param vmScaleSetName The name of the VM scale set. @throws IllegalArgumentExce...
java
public Observable<OperationStatusResponseInner> beginStartAsync(String resourceGroupName, String vmScaleSetName) { return beginStartWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1<ServiceResponse<OperationStatusResponseInner>, OperationStatusResponseInner>() { @Override ...
[ "public", "Observable", "<", "OperationStatusResponseInner", ">", "beginStartAsync", "(", "String", "resourceGroupName", ",", "String", "vmScaleSetName", ")", "{", "return", "beginStartWithServiceResponseAsync", "(", "resourceGroupName", ",", "vmScaleSetName", ")", ".", "...
Starts one or more virtual machines in a VM scale set. @param resourceGroupName The name of the resource group. @param vmScaleSetName The name of the VM scale set. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the OperationStatusResponseInner object
[ "Starts", "one", "or", "more", "virtual", "machines", "in", "a", "VM", "scale", "set", "." ]
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#L2559-L2566
elastic/elasticsearch-hadoop
mr/src/main/java/org/elasticsearch/hadoop/util/regex/Regex.java
Regex.simpleMatch
public static boolean simpleMatch(Collection<String> patterns, String str) { """ Match a String against the given patterns, supporting the following simple pattern styles: "xxx*", "*xxx", "*xxx*" and "xxx*yyy" matches (with an arbitrary number of pattern parts), as well as direct equality. @param patterns the...
java
public static boolean simpleMatch(Collection<String> patterns, String str) { if (patterns != null) { for (String pattern : patterns) { if (simpleMatch(pattern, str)) { return true; } } } return false; }
[ "public", "static", "boolean", "simpleMatch", "(", "Collection", "<", "String", ">", "patterns", ",", "String", "str", ")", "{", "if", "(", "patterns", "!=", "null", ")", "{", "for", "(", "String", "pattern", ":", "patterns", ")", "{", "if", "(", "simp...
Match a String against the given patterns, supporting the following simple pattern styles: "xxx*", "*xxx", "*xxx*" and "xxx*yyy" matches (with an arbitrary number of pattern parts), as well as direct equality. @param patterns the patterns to match against @param str the String to match @return whether the String ...
[ "Match", "a", "String", "against", "the", "given", "patterns", "supporting", "the", "following", "simple", "pattern", "styles", ":", "xxx", "*", "*", "xxx", "*", "xxx", "*", "and", "xxx", "*", "yyy", "matches", "(", "with", "an", "arbitrary", "number", "...
train
https://github.com/elastic/elasticsearch-hadoop/blob/f3acaba268ff96efae8eb946088c748c777c22cc/mr/src/main/java/org/elasticsearch/hadoop/util/regex/Regex.java#L90-L99
jglobus/JGlobus
gram/src/main/java/org/globus/rsl/VarRef.java
VarRef.toRSL
public void toRSL(StringBuffer buf, boolean explicitConcat) { """ Produces a RSL representation of this variable reference. @param buf buffer to add the RSL representation to. @param explicitConcat if true explicit concatination will be used in RSL strings. """ buf.append("$("); buf.append( value ); i...
java
public void toRSL(StringBuffer buf, boolean explicitConcat) { buf.append("$("); buf.append( value ); if (defValue != null) { buf.append(" "); defValue.toRSL(buf, explicitConcat); } buf.append(")"); if (concatValue == null) return; if (explicitConcat) buf.append(" # "); concatValue.toRSL(buf, expl...
[ "public", "void", "toRSL", "(", "StringBuffer", "buf", ",", "boolean", "explicitConcat", ")", "{", "buf", ".", "append", "(", "\"$(\"", ")", ";", "buf", ".", "append", "(", "value", ")", ";", "if", "(", "defValue", "!=", "null", ")", "{", "buf", ".",...
Produces a RSL representation of this variable reference. @param buf buffer to add the RSL representation to. @param explicitConcat if true explicit concatination will be used in RSL strings.
[ "Produces", "a", "RSL", "representation", "of", "this", "variable", "reference", "." ]
train
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gram/src/main/java/org/globus/rsl/VarRef.java#L123-L139
netscaler/sdx_nitro
src/main/java/com/citrix/sdx/nitro/resource/config/br/br_configurebandwidth6x.java
br_configurebandwidth6x.configurebandwidth6x
public static br_configurebandwidth6x configurebandwidth6x(nitro_service client, br_configurebandwidth6x resource) throws Exception { """ <pre> Use this operation to configure Repeater bandwidth of devices of version 6.x or later. </pre> """ return ((br_configurebandwidth6x[]) resource.perform_operation(c...
java
public static br_configurebandwidth6x configurebandwidth6x(nitro_service client, br_configurebandwidth6x resource) throws Exception { return ((br_configurebandwidth6x[]) resource.perform_operation(client, "configurebandwidth6x"))[0]; }
[ "public", "static", "br_configurebandwidth6x", "configurebandwidth6x", "(", "nitro_service", "client", ",", "br_configurebandwidth6x", "resource", ")", "throws", "Exception", "{", "return", "(", "(", "br_configurebandwidth6x", "[", "]", ")", "resource", ".", "perform_op...
<pre> Use this operation to configure Repeater bandwidth of devices of version 6.x or later. </pre>
[ "<pre", ">", "Use", "this", "operation", "to", "configure", "Repeater", "bandwidth", "of", "devices", "of", "version", "6", ".", "x", "or", "later", ".", "<", "/", "pre", ">" ]
train
https://github.com/netscaler/sdx_nitro/blob/c840919f1a8f7c0a5634c0f23d34fa14d1765ff1/src/main/java/com/citrix/sdx/nitro/resource/config/br/br_configurebandwidth6x.java#L126-L129
adamfisk/littleshoot-util
src/main/java/org/littleshoot/util/SecurityUtils.java
SecurityUtils.signAndEncode
public static String signAndEncode(final String accessKey, final String canonicalString) { """ Calculate the HMAC/SHA1 on a string. @param canonicalString Data to sign @param accessKey The secret access key to sign it with. @return The base64-encoded RFC 2104-compliant HMAC signature. @throws Runtim...
java
public static String signAndEncode(final String accessKey, final String canonicalString) { if (StringUtils.isBlank(accessKey)) { LOG.warn("Empty key!!"); throw new IllegalArgumentException("Empty key"); } // // Acquire an HMAC/SHA1...
[ "public", "static", "String", "signAndEncode", "(", "final", "String", "accessKey", ",", "final", "String", "canonicalString", ")", "{", "if", "(", "StringUtils", ".", "isBlank", "(", "accessKey", ")", ")", "{", "LOG", ".", "warn", "(", "\"Empty key!!\"", ")...
Calculate the HMAC/SHA1 on a string. @param canonicalString Data to sign @param accessKey The secret access key to sign it with. @return The base64-encoded RFC 2104-compliant HMAC signature. @throws RuntimeException If the algorithm does not exist or if the key is invalid -- both should never happen.
[ "Calculate", "the", "HMAC", "/", "SHA1", "on", "a", "string", "." ]
train
https://github.com/adamfisk/littleshoot-util/blob/3c0dc4955116b3382d6b0575d2f164b7508a4f73/src/main/java/org/littleshoot/util/SecurityUtils.java#L35-L75
eclipse/xtext-core
org.eclipse.xtext/src/org/eclipse/xtext/linking/lazy/LazyURIEncoder.java
LazyURIEncoder.getRelativePath
public void getRelativePath(StringBuilder result, INode parserNode, INode node) { """ ONLY public to be testable @noreference This method is not intended to be referenced by clients. """ if (parserNode == node) return; if (isAncestor(parserNode, node)) { ICompositeNode parent = node.getParent(); ...
java
public void getRelativePath(StringBuilder result, INode parserNode, INode node) { if (parserNode == node) return; if (isAncestor(parserNode, node)) { ICompositeNode parent = node.getParent(); getRelativePath(result, parserNode, parent); int idx = 0; INode child = parent.getFirstChild(); while(chil...
[ "public", "void", "getRelativePath", "(", "StringBuilder", "result", ",", "INode", "parserNode", ",", "INode", "node", ")", "{", "if", "(", "parserNode", "==", "node", ")", "return", ";", "if", "(", "isAncestor", "(", "parserNode", ",", "node", ")", ")", ...
ONLY public to be testable @noreference This method is not intended to be referenced by clients.
[ "ONLY", "public", "to", "be", "testable" ]
train
https://github.com/eclipse/xtext-core/blob/bac941cb75cb24706519845ec174cfef874d7557/org.eclipse.xtext/src/org/eclipse/xtext/linking/lazy/LazyURIEncoder.java#L194-L211
app55/app55-java
src/support/java/com/googlecode/openbeans/PrimitiveWrapperPersistenceDelegate.java
PrimitiveWrapperPersistenceDelegate.mutatesTo
@Override protected boolean mutatesTo(Object o1, Object o2) { """ /* Two wrapper objects are regarded mutatable if they are equal. """ if (null == o2) { return false; } return o1.equals(o2); }
java
@Override protected boolean mutatesTo(Object o1, Object o2) { if (null == o2) { return false; } return o1.equals(o2); }
[ "@", "Override", "protected", "boolean", "mutatesTo", "(", "Object", "o1", ",", "Object", "o2", ")", "{", "if", "(", "null", "==", "o2", ")", "{", "return", "false", ";", "}", "return", "o1", ".", "equals", "(", "o2", ")", ";", "}" ]
/* Two wrapper objects are regarded mutatable if they are equal.
[ "/", "*", "Two", "wrapper", "objects", "are", "regarded", "mutatable", "if", "they", "are", "equal", "." ]
train
https://github.com/app55/app55-java/blob/73e51d0f3141a859dfbd37ca9becef98477e553e/src/support/java/com/googlecode/openbeans/PrimitiveWrapperPersistenceDelegate.java#L54-L62
infinispan/infinispan
commons/src/main/java/org/infinispan/commons/util/BeanUtils.java
BeanUtils.getterMethod
public static Method getterMethod(Class<?> target, Class<?> componentClass) { """ Returns a Method object corresponding to a getter that retrieves an instance of componentClass from target. @param target class that the getter should exist on @param componentClass component to get @return Method object...
java
public static Method getterMethod(Class<?> target, Class<?> componentClass) { try { return target.getMethod(getterName(componentClass)); } catch (NoSuchMethodException e) { //if (log.isTraceEnabled()) log.trace("Unable to find method " + getterName(componentClass) + " in class " + ta...
[ "public", "static", "Method", "getterMethod", "(", "Class", "<", "?", ">", "target", ",", "Class", "<", "?", ">", "componentClass", ")", "{", "try", "{", "return", "target", ".", "getMethod", "(", "getterName", "(", "componentClass", ")", ")", ";", "}", ...
Returns a Method object corresponding to a getter that retrieves an instance of componentClass from target. @param target class that the getter should exist on @param componentClass component to get @return Method object, or null of one does not exist
[ "Returns", "a", "Method", "object", "corresponding", "to", "a", "getter", "that", "retrieves", "an", "instance", "of", "componentClass", "from", "target", "." ]
train
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/commons/src/main/java/org/infinispan/commons/util/BeanUtils.java#L81-L92
jingwei/krati
krati-main/src/main/java/krati/core/StoreConfig.java
StoreConfig.getBoolean
public boolean getBoolean(String pName, boolean defaultValue) { """ Gets a boolean property via a string property name. @param pName - the property name @param defaultValue - the default property value @return a boolean property """ String pValue = _properties.getProperty(pName); re...
java
public boolean getBoolean(String pName, boolean defaultValue) { String pValue = _properties.getProperty(pName); return parseBoolean(pName, pValue, defaultValue); }
[ "public", "boolean", "getBoolean", "(", "String", "pName", ",", "boolean", "defaultValue", ")", "{", "String", "pValue", "=", "_properties", ".", "getProperty", "(", "pName", ")", ";", "return", "parseBoolean", "(", "pName", ",", "pValue", ",", "defaultValue",...
Gets a boolean property via a string property name. @param pName - the property name @param defaultValue - the default property value @return a boolean property
[ "Gets", "a", "boolean", "property", "via", "a", "string", "property", "name", "." ]
train
https://github.com/jingwei/krati/blob/1ca0f994a7b0c8215b827eac9aaf95789ec08d21/krati-main/src/main/java/krati/core/StoreConfig.java#L459-L462
forge/core
ui/api/src/main/java/org/jboss/forge/addon/ui/util/InputComponents.java
InputComponents.getLabelFor
public static String getLabelFor(InputComponent<?, ?> input, boolean addColon) { """ Returns the label for this component @param input the input component @param addColon should a colon be added in the end of the label ? @return the label with a colon in the end if addColon is true """ String label ...
java
public static String getLabelFor(InputComponent<?, ?> input, boolean addColon) { String label = input.getLabel(); // If no label was provided, use name if (label == null) { label = input.getName(); } // if a colon is required, add it if (addColon && !label.endsWith(...
[ "public", "static", "String", "getLabelFor", "(", "InputComponent", "<", "?", ",", "?", ">", "input", ",", "boolean", "addColon", ")", "{", "String", "label", "=", "input", ".", "getLabel", "(", ")", ";", "// If no label was provided, use name", "if", "(", "...
Returns the label for this component @param input the input component @param addColon should a colon be added in the end of the label ? @return the label with a colon in the end if addColon is true
[ "Returns", "the", "label", "for", "this", "component" ]
train
https://github.com/forge/core/blob/e140eb03bbe2b3409478ad70c86c3edbef6d9a0c/ui/api/src/main/java/org/jboss/forge/addon/ui/util/InputComponents.java#L373-L387
OpenLiberty/open-liberty
dev/com.ibm.websphere.javaee.jsf.2.2/src/javax/faces/render/Renderer.java
Renderer.encodeChildren
public void encodeChildren(FacesContext context, UIComponent component) throws IOException { """ Render all children if there are any. Note: this will only be called if getRendersChildren() returns true. A component which has a renderer with getRendersChildren() set to true will typically contain the rendering...
java
public void encodeChildren(FacesContext context, UIComponent component) throws IOException { if (context == null) { throw new NullPointerException("context"); } if (component == null) { throw new NullPointerException("component"); } if...
[ "public", "void", "encodeChildren", "(", "FacesContext", "context", ",", "UIComponent", "component", ")", "throws", "IOException", "{", "if", "(", "context", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", "\"context\"", ")", ";", "}", "if...
Render all children if there are any. Note: this will only be called if getRendersChildren() returns true. A component which has a renderer with getRendersChildren() set to true will typically contain the rendering logic for its children in this method. @param context @param component @throws IOException
[ "Render", "all", "children", "if", "there", "are", "any", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.websphere.javaee.jsf.2.2/src/javax/faces/render/Renderer.java#L74-L98
OpenLiberty/open-liberty
dev/com.ibm.ws.ras.instrument/src/com/ibm/ws/ras/instrument/internal/main/LibertyJava8WorkaroundRuntimeTransformer.java
LibertyJava8WorkaroundRuntimeTransformer.transform
public static byte[] transform(byte[] bytes, boolean skipIfNotPreprocessed) throws IOException { """ Instrument the class at the current position in the specified input stream. @return instrumented class file or null if the class has already been instrumented. @throws IOException if an error is encountered ...
java
public static byte[] transform(byte[] bytes, boolean skipIfNotPreprocessed) throws IOException { if (detailedTransformTrace && tc.isEntryEnabled()) Tr.entry(tc, "transform"); ClassReader reader = new ClassReader(bytes); ClassWriter writer = new ClassWriter(reader...
[ "public", "static", "byte", "[", "]", "transform", "(", "byte", "[", "]", "bytes", ",", "boolean", "skipIfNotPreprocessed", ")", "throws", "IOException", "{", "if", "(", "detailedTransformTrace", "&&", "tc", ".", "isEntryEnabled", "(", ")", ")", "Tr", ".", ...
Instrument the class at the current position in the specified input stream. @return instrumented class file or null if the class has already been instrumented. @throws IOException if an error is encountered while reading from the <code>InputStream</code>
[ "Instrument", "the", "class", "at", "the", "current", "position", "in", "the", "specified", "input", "stream", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.ras.instrument/src/com/ibm/ws/ras/instrument/internal/main/LibertyJava8WorkaroundRuntimeTransformer.java#L269-L306
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/security/KeyStore.java
KeyStore.getInstance
public static KeyStore getInstance(String type, String provider) throws KeyStoreException, NoSuchProviderException { """ Returns a keystore object of the specified type. <p> A new KeyStore object encapsulating the KeyStoreSpi implementation from the specified provider is returned. The specified provi...
java
public static KeyStore getInstance(String type, String provider) throws KeyStoreException, NoSuchProviderException { if (provider == null || provider.length() == 0) throw new IllegalArgumentException("missing provider"); try { Object[] objs = Security.getImpl(type, "K...
[ "public", "static", "KeyStore", "getInstance", "(", "String", "type", ",", "String", "provider", ")", "throws", "KeyStoreException", ",", "NoSuchProviderException", "{", "if", "(", "provider", "==", "null", "||", "provider", ".", "length", "(", ")", "==", "0",...
Returns a keystore object of the specified type. <p> A new KeyStore object encapsulating the KeyStoreSpi implementation from the specified provider is returned. The specified provider must be registered in the security provider list. <p> Note that the list of registered providers may be retrieved via the {@link Secu...
[ "Returns", "a", "keystore", "object", "of", "the", "specified", "type", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/security/KeyStore.java#L697-L708
googleapis/google-cloud-java
google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/Query.java
Query.orderBy
@Nonnull public Query orderBy(@Nonnull FieldPath fieldPath) { """ Creates and returns a new Query that's additionally sorted by the specified field. @param fieldPath The field to sort by. @return The created Query. """ return orderBy(fieldPath, Direction.ASCENDING); }
java
@Nonnull public Query orderBy(@Nonnull FieldPath fieldPath) { return orderBy(fieldPath, Direction.ASCENDING); }
[ "@", "Nonnull", "public", "Query", "orderBy", "(", "@", "Nonnull", "FieldPath", "fieldPath", ")", "{", "return", "orderBy", "(", "fieldPath", ",", "Direction", ".", "ASCENDING", ")", ";", "}" ]
Creates and returns a new Query that's additionally sorted by the specified field. @param fieldPath The field to sort by. @return The created Query.
[ "Creates", "and", "returns", "a", "new", "Query", "that", "s", "additionally", "sorted", "by", "the", "specified", "field", "." ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/Query.java#L632-L635
Stratio/stratio-cassandra
src/java/org/apache/cassandra/io/sstable/AbstractSSTableSimpleWriter.java
AbstractSSTableSimpleWriter.addCounterColumn
public void addCounterColumn(ByteBuffer name, long value) throws IOException { """ Insert a new counter column to the current row (and super column if applicable). @param name the column name @param value the value of the counter """ addColumn(new BufferCounterCell(metadata.comparator.cellFromByteBuf...
java
public void addCounterColumn(ByteBuffer name, long value) throws IOException { addColumn(new BufferCounterCell(metadata.comparator.cellFromByteBuffer(name), CounterContext.instance().createGlobal(counterid, 1L, value), System.cu...
[ "public", "void", "addCounterColumn", "(", "ByteBuffer", "name", ",", "long", "value", ")", "throws", "IOException", "{", "addColumn", "(", "new", "BufferCounterCell", "(", "metadata", ".", "comparator", ".", "cellFromByteBuffer", "(", "name", ")", ",", "Counter...
Insert a new counter column to the current row (and super column if applicable). @param name the column name @param value the value of the counter
[ "Insert", "a", "new", "counter", "column", "to", "the", "current", "row", "(", "and", "super", "column", "if", "applicable", ")", "." ]
train
https://github.com/Stratio/stratio-cassandra/blob/f6416b43ad5309083349ad56266450fa8c6a2106/src/java/org/apache/cassandra/io/sstable/AbstractSSTableSimpleWriter.java#L166-L171
motown-io/motown
chargingstation-configuration/view-model/src/main/java/io/motown/chargingstationconfiguration/viewmodel/domain/DomainService.java
DomainService.updateManufacturer
public Manufacturer updateManufacturer(Long id, Manufacturer manufacturer) { """ Update a manufacturer. @param id the id of the entity to find. @param manufacturer the payload from the request. """ manufacturer.setId(id); return manufacturerRepository.createOrUpdate(manufacturer); }
java
public Manufacturer updateManufacturer(Long id, Manufacturer manufacturer) { manufacturer.setId(id); return manufacturerRepository.createOrUpdate(manufacturer); }
[ "public", "Manufacturer", "updateManufacturer", "(", "Long", "id", ",", "Manufacturer", "manufacturer", ")", "{", "manufacturer", ".", "setId", "(", "id", ")", ";", "return", "manufacturerRepository", ".", "createOrUpdate", "(", "manufacturer", ")", ";", "}" ]
Update a manufacturer. @param id the id of the entity to find. @param manufacturer the payload from the request.
[ "Update", "a", "manufacturer", "." ]
train
https://github.com/motown-io/motown/blob/783ccda7c28b273a529ddd47defe8673b1ea365b/chargingstation-configuration/view-model/src/main/java/io/motown/chargingstationconfiguration/viewmodel/domain/DomainService.java#L327-L330
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/application/ProcessApplicationContext.java
ProcessApplicationContext.withProcessApplicationContext
public static <T> T withProcessApplicationContext(Callable<T> callable, ProcessApplicationReference reference) throws Exception { """ <p>Takes a callable and executes all engine API invocations within that callable in the context of the given process application <p>Equivalent to <pre> try { ProcessApplicati...
java
public static <T> T withProcessApplicationContext(Callable<T> callable, ProcessApplicationReference reference) throws Exception { try { setCurrentProcessApplication(reference); return callable.call(); } finally { clear(); } }
[ "public", "static", "<", "T", ">", "T", "withProcessApplicationContext", "(", "Callable", "<", "T", ">", "callable", ",", "ProcessApplicationReference", "reference", ")", "throws", "Exception", "{", "try", "{", "setCurrentProcessApplication", "(", "reference", ")", ...
<p>Takes a callable and executes all engine API invocations within that callable in the context of the given process application <p>Equivalent to <pre> try { ProcessApplicationContext.setCurrentProcessApplication("someProcessApplication"); callable.call(); } finally { ProcessApplicationContext.clear(); } </pre> @para...
[ "<p", ">", "Takes", "a", "callable", "and", "executes", "all", "engine", "API", "invocations", "within", "that", "callable", "in", "the", "context", "of", "the", "given", "process", "application" ]
train
https://github.com/camunda/camunda-bpm-platform/blob/1a464fc887ef3760e53d6f91b9e5b871a0d77cc0/engine/src/main/java/org/camunda/bpm/application/ProcessApplicationContext.java#L147-L155
box/box-java-sdk
src/main/java/com/box/sdk/BoxRecents.java
BoxRecents.getRecentItems
public static BoxResourceIterable<BoxRecentItem> getRecentItems(final BoxAPIConnection api, int limit, String... fields) { """ Used to retrieve all collaborations associated with the item. @see <a href="http://google.com">https://developer.box....
java
public static BoxResourceIterable<BoxRecentItem> getRecentItems(final BoxAPIConnection api, int limit, String... fields) { QueryStringBuilder builder = new QueryStringBuilder(); if (fields.length > 0) { builder.appendParam("...
[ "public", "static", "BoxResourceIterable", "<", "BoxRecentItem", ">", "getRecentItems", "(", "final", "BoxAPIConnection", "api", ",", "int", "limit", ",", "String", "...", "fields", ")", "{", "QueryStringBuilder", "builder", "=", "new", "QueryStringBuilder", "(", ...
Used to retrieve all collaborations associated with the item. @see <a href="http://google.com">https://developer.box.com/reference#get-recent-items</a> @param api BoxAPIConnection from the associated file. @param limit limit of items to be retrieved. Default is 100. Maximum is 1000 @param fields the optional fiel...
[ "Used", "to", "retrieve", "all", "collaborations", "associated", "with", "the", "item", "." ]
train
https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxRecents.java#L30-L45
Gagravarr/VorbisJava
core/src/main/java/org/gagravarr/ogg/audio/OggAudioStreamHeaders.java
OggAudioStreamHeaders.create
public static OggAudioStreamHeaders create(OggPacket firstPacket) { """ Identifies the type, and returns a partially filled {@link OggAudioHeaders} for the new stream """ if (firstPacket.isBeginningOfStream() && firstPacket.getData() != null && firstPacket.getData().len...
java
public static OggAudioStreamHeaders create(OggPacket firstPacket) { if (firstPacket.isBeginningOfStream() && firstPacket.getData() != null && firstPacket.getData().length > 10) { int sid = firstPacket.getSid(); if (VorbisPacketFactory.isVorbisStream(firstP...
[ "public", "static", "OggAudioStreamHeaders", "create", "(", "OggPacket", "firstPacket", ")", "{", "if", "(", "firstPacket", ".", "isBeginningOfStream", "(", ")", "&&", "firstPacket", ".", "getData", "(", ")", "!=", "null", "&&", "firstPacket", ".", "getData", ...
Identifies the type, and returns a partially filled {@link OggAudioHeaders} for the new stream
[ "Identifies", "the", "type", "and", "returns", "a", "partially", "filled", "{" ]
train
https://github.com/Gagravarr/VorbisJava/blob/22b4d645b00386d59d17a336a2bc9d54db08df16/core/src/main/java/org/gagravarr/ogg/audio/OggAudioStreamHeaders.java#L53-L83
marvinlabs/android-intents
library/src/main/java/com/marvinlabs/intents/MediaIntents.java
MediaIntents.newPlayYouTubeVideoIntent
public static Intent newPlayYouTubeVideoIntent(String videoId) { """ Open a YouTube video. If the app is not installed, it opens it in the browser @param videoId The video ID @return the intent """ try { return new Intent(Intent.ACTION_VIEW, Uri.parse("vnd.youtube:" + videoId)); ...
java
public static Intent newPlayYouTubeVideoIntent(String videoId) { try { return new Intent(Intent.ACTION_VIEW, Uri.parse("vnd.youtube:" + videoId)); } catch (ActivityNotFoundException ex) { return new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.youtube.com/watch?v=" + videoId)...
[ "public", "static", "Intent", "newPlayYouTubeVideoIntent", "(", "String", "videoId", ")", "{", "try", "{", "return", "new", "Intent", "(", "Intent", ".", "ACTION_VIEW", ",", "Uri", ".", "parse", "(", "\"vnd.youtube:\"", "+", "videoId", ")", ")", ";", "}", ...
Open a YouTube video. If the app is not installed, it opens it in the browser @param videoId The video ID @return the intent
[ "Open", "a", "YouTube", "video", ".", "If", "the", "app", "is", "not", "installed", "it", "opens", "it", "in", "the", "browser" ]
train
https://github.com/marvinlabs/android-intents/blob/33e79c825188b6a97601869522533cc825801f6e/library/src/main/java/com/marvinlabs/intents/MediaIntents.java#L134-L140
infinispan/infinispan
core/src/main/java/org/infinispan/security/Security.java
Security.doAs
public static <T> T doAs(final Subject subject, final java.security.PrivilegedAction<T> action) { """ A "lightweight" implementation of {@link Subject#doAs(Subject, PrivilegedAction)} which uses a ThreadLocal {@link Subject} instead of modifying the current {@link AccessControlContext}. @see Subject#doAs(Subje...
java
public static <T> T doAs(final Subject subject, final java.security.PrivilegedAction<T> action) { Stack<Subject> stack = SUBJECT.get(); if (stack == null) { stack = new Stack<>(); SUBJECT.set(stack); } stack.push(subject); try { return action.run(); } final...
[ "public", "static", "<", "T", ">", "T", "doAs", "(", "final", "Subject", "subject", ",", "final", "java", ".", "security", ".", "PrivilegedAction", "<", "T", ">", "action", ")", "{", "Stack", "<", "Subject", ">", "stack", "=", "SUBJECT", ".", "get", ...
A "lightweight" implementation of {@link Subject#doAs(Subject, PrivilegedAction)} which uses a ThreadLocal {@link Subject} instead of modifying the current {@link AccessControlContext}. @see Subject#doAs(Subject, PrivilegedAction)
[ "A", "lightweight", "implementation", "of", "{", "@link", "Subject#doAs", "(", "Subject", "PrivilegedAction", ")", "}", "which", "uses", "a", "ThreadLocal", "{", "@link", "Subject", "}", "instead", "of", "modifying", "the", "current", "{", "@link", "AccessContro...
train
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/security/Security.java#L78-L93
intuit/QuickBooks-V3-Java-SDK
ipp-v3-java-devkit/src/main/java/com/intuit/ipp/services/DataService.java
DataService.sendEmailAsync
public <T extends IEntity> void sendEmailAsync(T entity, CallbackHandler callbackHandler) throws FMSException { """ Method to send the entity to default email for the given id in asynchronous fashion @param entity @param callbackHandler @param <T> @throws FMSException """ sendEmailAsync(entity,null...
java
public <T extends IEntity> void sendEmailAsync(T entity, CallbackHandler callbackHandler) throws FMSException { sendEmailAsync(entity,null,callbackHandler); }
[ "public", "<", "T", "extends", "IEntity", ">", "void", "sendEmailAsync", "(", "T", "entity", ",", "CallbackHandler", "callbackHandler", ")", "throws", "FMSException", "{", "sendEmailAsync", "(", "entity", ",", "null", ",", "callbackHandler", ")", ";", "}" ]
Method to send the entity to default email for the given id in asynchronous fashion @param entity @param callbackHandler @param <T> @throws FMSException
[ "Method", "to", "send", "the", "entity", "to", "default", "email", "for", "the", "given", "id", "in", "asynchronous", "fashion" ]
train
https://github.com/intuit/QuickBooks-V3-Java-SDK/blob/59f988d0776d46620d0b34711c411b2b5b1da06b/ipp-v3-java-devkit/src/main/java/com/intuit/ipp/services/DataService.java#L926-L928
michel-kraemer/citeproc-java
citeproc-java/src/main/java/de/undercouch/citeproc/BibliographyFileReader.java
BibliographyFileReader.determineFileFormat
public FileFormat determineFileFormat(File bibfile) throws FileNotFoundException, IOException { """ Reads the first 100 KB of the given bibliography file and tries to determine the file format @param bibfile the input file @return the file format (or {@link FileFormat#UNKNOWN} if the format could not be det...
java
public FileFormat determineFileFormat(File bibfile) throws FileNotFoundException, IOException { if (!bibfile.exists()) { throw new FileNotFoundException("Bibliography file `" + bibfile.getName() + "' does not exist"); } try (BufferedInputStream bis = new BufferedInputStream( new FileInputStream(bi...
[ "public", "FileFormat", "determineFileFormat", "(", "File", "bibfile", ")", "throws", "FileNotFoundException", ",", "IOException", "{", "if", "(", "!", "bibfile", ".", "exists", "(", ")", ")", "{", "throw", "new", "FileNotFoundException", "(", "\"Bibliography file...
Reads the first 100 KB of the given bibliography file and tries to determine the file format @param bibfile the input file @return the file format (or {@link FileFormat#UNKNOWN} if the format could not be determined) @throws FileNotFoundException if the input file was not found @throws IOException if the input file cou...
[ "Reads", "the", "first", "100", "KB", "of", "the", "given", "bibliography", "file", "and", "tries", "to", "determine", "the", "file", "format" ]
train
https://github.com/michel-kraemer/citeproc-java/blob/1d5bf0e7bbb2bdc47309530babf0ecaba838bf10/citeproc-java/src/main/java/de/undercouch/citeproc/BibliographyFileReader.java#L238-L248
jbundle/jbundle
base/db/jdbc/src/main/java/org/jbundle/base/db/jdbc/JdbcTable.java
JdbcTable.doRemove
public void doRemove() throws DBException { """ Delete this record (Always called from the record class). Do a SQL delete. @exception DBException INVALID_RECORD - Attempt to delete a record that is not current. """ Object bookmark = this.getRecord().getHandle(DBConstants.BOOKMARK_HANDLE); Str...
java
public void doRemove() throws DBException { Object bookmark = this.getRecord().getHandle(DBConstants.BOOKMARK_HANDLE); String strRecordset = this.getRecord().getSQLDelete(SQLParams.USE_INSERT_UPDATE_LITERALS); this.executeUpdate(strRecordset, DBConstants.SQL_DELETE_TYPE); if (m_iRow ...
[ "public", "void", "doRemove", "(", ")", "throws", "DBException", "{", "Object", "bookmark", "=", "this", ".", "getRecord", "(", ")", ".", "getHandle", "(", "DBConstants", ".", "BOOKMARK_HANDLE", ")", ";", "String", "strRecordset", "=", "this", ".", "getRecor...
Delete this record (Always called from the record class). Do a SQL delete. @exception DBException INVALID_RECORD - Attempt to delete a record that is not current.
[ "Delete", "this", "record", "(", "Always", "called", "from", "the", "record", "class", ")", ".", "Do", "a", "SQL", "delete", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/db/jdbc/src/main/java/org/jbundle/base/db/jdbc/JdbcTable.java#L559-L568
undertow-io/undertow
core/src/main/java/io/undertow/util/Headers.java
Headers.extractQuotedValueFromHeaderWithEncoding
public static String extractQuotedValueFromHeaderWithEncoding(final String header, final String key) { """ Extracts a quoted value from a header that has a given key. For instance if the header is <p> content-disposition=form-data; filename*="utf-8''test.txt" and the key is filename* then "test.txt" will be ret...
java
public static String extractQuotedValueFromHeaderWithEncoding(final String header, final String key) { String value = extractQuotedValueFromHeader(header, key); if (value != null) { return value; } value = extractQuotedValueFromHeader(header , key + "*"); if(value != ...
[ "public", "static", "String", "extractQuotedValueFromHeaderWithEncoding", "(", "final", "String", "header", ",", "final", "String", "key", ")", "{", "String", "value", "=", "extractQuotedValueFromHeader", "(", "header", ",", "key", ")", ";", "if", "(", "value", ...
Extracts a quoted value from a header that has a given key. For instance if the header is <p> content-disposition=form-data; filename*="utf-8''test.txt" and the key is filename* then "test.txt" will be returned after extracting character set and language (following RFC 2231) and performing URL decoding to the value usi...
[ "Extracts", "a", "quoted", "value", "from", "a", "header", "that", "has", "a", "given", "key", ".", "For", "instance", "if", "the", "header", "is", "<p", ">", "content", "-", "disposition", "=", "form", "-", "data", ";", "filename", "*", "=", "utf", ...
train
https://github.com/undertow-io/undertow/blob/87de0b856a7a4ba8faf5b659537b9af07b763263/core/src/main/java/io/undertow/util/Headers.java#L407-L425
lucee/Lucee
core/src/main/java/lucee/runtime/type/scope/ScopeContext.java
ScopeContext.getApplicationScope
public Application getApplicationScope(PageContext pc, RefBoolean isNew) { """ return the application Scope for this context (cfid,cftoken,contextname) @param pc PageContext @param isNew @return session matching the context @throws PageException """ ApplicationContext appContext = pc.getApplicationConte...
java
public Application getApplicationScope(PageContext pc, RefBoolean isNew) { ApplicationContext appContext = pc.getApplicationContext(); // getApplication Scope from Context ApplicationImpl application; Object objApp = applicationContexts.get(appContext.getName()); if (objApp != null) { application = (Applicati...
[ "public", "Application", "getApplicationScope", "(", "PageContext", "pc", ",", "RefBoolean", "isNew", ")", "{", "ApplicationContext", "appContext", "=", "pc", ".", "getApplicationContext", "(", ")", ";", "// getApplication Scope from Context", "ApplicationImpl", "applicat...
return the application Scope for this context (cfid,cftoken,contextname) @param pc PageContext @param isNew @return session matching the context @throws PageException
[ "return", "the", "application", "Scope", "for", "this", "context", "(", "cfid", "cftoken", "contextname", ")" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/type/scope/ScopeContext.java#L778-L799
overturetool/overture
core/interpreter/src/main/java/org/overture/interpreter/scheduler/SystemClock.java
SystemClock.internalToTime
public static Double internalToTime(TimeUnit unit, long internalTime) { """ Utility method to convert the internal time to the given unit. @param unit The unit to convert the internal time to @param internalTime The internal time @return The internal time representation of the parameter """ return Mat...
java
public static Double internalToTime(TimeUnit unit, long internalTime) { return Math.round(internalTime * TimeUnit.nanosecond.getValue() / unit.getValue() * PRECISION) / PRECISION; }
[ "public", "static", "Double", "internalToTime", "(", "TimeUnit", "unit", ",", "long", "internalTime", ")", "{", "return", "Math", ".", "round", "(", "internalTime", "*", "TimeUnit", ".", "nanosecond", ".", "getValue", "(", ")", "/", "unit", ".", "getValue", ...
Utility method to convert the internal time to the given unit. @param unit The unit to convert the internal time to @param internalTime The internal time @return The internal time representation of the parameter
[ "Utility", "method", "to", "convert", "the", "internal", "time", "to", "the", "given", "unit", "." ]
train
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/interpreter/src/main/java/org/overture/interpreter/scheduler/SystemClock.java#L130-L135
jbundle/jbundle
thin/base/thread/src/main/java/org/jbundle/thin/base/thread/AutoTask.java
AutoTask.init
public void init(App application, String strParams, Map<String, Object> properties) { """ Constructor. @param application The parent application. @param strParams The task properties. """ m_application = (App)application; if (m_application != null) m_application.addTask(this, null...
java
public void init(App application, String strParams, Map<String, Object> properties) { m_application = (App)application; if (m_application != null) m_application.addTask(this, null); // Add this task to the list if (properties != null) { if (...
[ "public", "void", "init", "(", "App", "application", ",", "String", "strParams", ",", "Map", "<", "String", ",", "Object", ">", "properties", ")", "{", "m_application", "=", "(", "App", ")", "application", ";", "if", "(", "m_application", "!=", "null", "...
Constructor. @param application The parent application. @param strParams The task properties.
[ "Constructor", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/thread/src/main/java/org/jbundle/thin/base/thread/AutoTask.java#L88-L107
voldemort/voldemort
src/java/voldemort/tools/admin/command/AdminCommandScheduled.java
AdminCommandScheduled.executeHelp
public static void executeHelp(String[] args, PrintStream stream) throws IOException { """ Parses command-line input and prints help menu. @throws IOException """ String subCmd = (args.length > 0) ? args[0] : ""; if(subCmd.equals("list")) { SubCommandScheduledList.printHelp(strea...
java
public static void executeHelp(String[] args, PrintStream stream) throws IOException { String subCmd = (args.length > 0) ? args[0] : ""; if(subCmd.equals("list")) { SubCommandScheduledList.printHelp(stream); } else if(subCmd.equals("stop")) { SubCommandScheduledStop.print...
[ "public", "static", "void", "executeHelp", "(", "String", "[", "]", "args", ",", "PrintStream", "stream", ")", "throws", "IOException", "{", "String", "subCmd", "=", "(", "args", ".", "length", ">", "0", ")", "?", "args", "[", "0", "]", ":", "\"\"", ...
Parses command-line input and prints help menu. @throws IOException
[ "Parses", "command", "-", "line", "input", "and", "prints", "help", "menu", "." ]
train
https://github.com/voldemort/voldemort/blob/a7dbdea58032021361680faacf2782cf981c5332/src/java/voldemort/tools/admin/command/AdminCommandScheduled.java#L78-L89
JadiraOrg/jadira
bindings/src/main/java/org/jadira/bindings/core/binder/BasicBinder.java
BasicBinder.registerMarshaller
public final <S, T> void registerMarshaller(Class<S> source, Class<T> target, ToMarshaller<S, T> converter, Class<? extends Annotation> qualifier) { """ Register a Marshaller with the given source and target class. The marshaller is used as follows: Instances of the source can be marshalled into the target class....
java
public final <S, T> void registerMarshaller(Class<S> source, Class<T> target, ToMarshaller<S, T> converter, Class<? extends Annotation> qualifier) { registerMarshaller(new ConverterKey<S,T>(source, target, qualifier == null ? DefaultBinding.class : qualifier), converter); }
[ "public", "final", "<", "S", ",", "T", ">", "void", "registerMarshaller", "(", "Class", "<", "S", ">", "source", ",", "Class", "<", "T", ">", "target", ",", "ToMarshaller", "<", "S", ",", "T", ">", "converter", ",", "Class", "<", "?", "extends", "A...
Register a Marshaller with the given source and target class. The marshaller is used as follows: Instances of the source can be marshalled into the target class. @param source The source (input) class @param target The target (output) class @param converter The ToMarshaller to be registered @param qualifier The qualifi...
[ "Register", "a", "Marshaller", "with", "the", "given", "source", "and", "target", "class", ".", "The", "marshaller", "is", "used", "as", "follows", ":", "Instances", "of", "the", "source", "can", "be", "marshalled", "into", "the", "target", "class", "." ]
train
https://github.com/JadiraOrg/jadira/blob/d55d0238395f0cb900531f1f08b4b2d87fa9a4f6/bindings/src/main/java/org/jadira/bindings/core/binder/BasicBinder.java#L645-L647
apache/groovy
src/main/java/org/codehaus/groovy/ast/tools/GenericsUtils.java
GenericsUtils.parameterizeType
public static ClassNode parameterizeType(final ClassNode hint, final ClassNode target) { """ Interface class nodes retrieved from {@link org.codehaus.groovy.ast.ClassNode#getInterfaces()} or {@link org.codehaus.groovy.ast.ClassNode#getAllInterfaces()} are returned with generic type arguments. This method allows ...
java
public static ClassNode parameterizeType(final ClassNode hint, final ClassNode target) { if (hint.isArray()) { if (target.isArray()) { return parameterizeType(hint.getComponentType(), target.getComponentType()).makeArray(); } return target; } i...
[ "public", "static", "ClassNode", "parameterizeType", "(", "final", "ClassNode", "hint", ",", "final", "ClassNode", "target", ")", "{", "if", "(", "hint", ".", "isArray", "(", ")", ")", "{", "if", "(", "target", ".", "isArray", "(", ")", ")", "{", "retu...
Interface class nodes retrieved from {@link org.codehaus.groovy.ast.ClassNode#getInterfaces()} or {@link org.codehaus.groovy.ast.ClassNode#getAllInterfaces()} are returned with generic type arguments. This method allows returning a parameterized interface given the parameterized class node which implements this interfa...
[ "Interface", "class", "nodes", "retrieved", "from", "{", "@link", "org", ".", "codehaus", ".", "groovy", ".", "ast", ".", "ClassNode#getInterfaces", "()", "}", "or", "{", "@link", "org", ".", "codehaus", ".", "groovy", ".", "ast", ".", "ClassNode#getAllInter...
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/ast/tools/GenericsUtils.java#L254-L276
bwkimmel/java-util
src/main/java/ca/eandb/util/args/ArgumentProcessor.java
ArgumentProcessor.processCommandField
private void processCommandField(final Field field, String key, String prompt) { """ Adds a command that passes control to the specified field. @param field The <code>Field</code> to pass control to. @param key The key that triggers the command. @param prompt The <code>String</code> to use to prompt the user fo...
java
private void processCommandField(final Field field, String key, String prompt) { String name = field.getName(); Class<?> type = field.getType(); if (key.equals("")) { key = name; } if (prompt != null && prompt.equals("")) { prompt = key; } final ArgumentProcessor<Object> argPr...
[ "private", "void", "processCommandField", "(", "final", "Field", "field", ",", "String", "key", ",", "String", "prompt", ")", "{", "String", "name", "=", "field", ".", "getName", "(", ")", ";", "Class", "<", "?", ">", "type", "=", "field", ".", "getTyp...
Adds a command that passes control to the specified field. @param field The <code>Field</code> to pass control to. @param key The key that triggers the command. @param prompt The <code>String</code> to use to prompt the user for input, or <code>null</code> if no shell should be used.
[ "Adds", "a", "command", "that", "passes", "control", "to", "the", "specified", "field", "." ]
train
https://github.com/bwkimmel/java-util/blob/0c03664d42f0e6b111f64447f222aa73c2819e5c/src/main/java/ca/eandb/util/args/ArgumentProcessor.java#L277-L305
alkacon/opencms-core
src/org/opencms/search/extractors/A_CmsTextExtractor.java
A_CmsTextExtractor.extractText
@SuppressWarnings("deprecation") protected CmsExtractionResult extractText(InputStream in, Parser parser) throws Exception { """ Parses the given input stream with the provided parser and returns the result as a map of content items.<p> @param in the input stream for the content to parse @param parser the ...
java
@SuppressWarnings("deprecation") protected CmsExtractionResult extractText(InputStream in, Parser parser) throws Exception { LinkedHashMap<String, String> contentItems = new LinkedHashMap<String, String>(); StringWriter writer = new StringWriter(); BodyContentHandler handler = new BodyCont...
[ "@", "SuppressWarnings", "(", "\"deprecation\"", ")", "protected", "CmsExtractionResult", "extractText", "(", "InputStream", "in", ",", "Parser", "parser", ")", "throws", "Exception", "{", "LinkedHashMap", "<", "String", ",", "String", ">", "contentItems", "=", "n...
Parses the given input stream with the provided parser and returns the result as a map of content items.<p> @param in the input stream for the content to parse @param parser the parser to use @return the result of the parsing as a map of content items @throws Exception in case something goes wrong
[ "Parses", "the", "given", "input", "stream", "with", "the", "provided", "parser", "and", "returns", "the", "result", "as", "a", "map", "of", "content", "items", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/search/extractors/A_CmsTextExtractor.java#L126-L184
sarl/sarl
sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/services/network/NetworkUtil.java
NetworkUtil.toInetSocketAddress
public static InetSocketAddress toInetSocketAddress(URI uri) { """ Extract an Inet address from an URI. @param uri the address. @return the address. """ final InetAddress adr = toInetAddress(uri); final int port = uri.getPort(); if (port <= 0) { throw new IllegalArgumentException(uri.toString()); ...
java
public static InetSocketAddress toInetSocketAddress(URI uri) { final InetAddress adr = toInetAddress(uri); final int port = uri.getPort(); if (port <= 0) { throw new IllegalArgumentException(uri.toString()); } return new InetSocketAddress(adr, port); }
[ "public", "static", "InetSocketAddress", "toInetSocketAddress", "(", "URI", "uri", ")", "{", "final", "InetAddress", "adr", "=", "toInetAddress", "(", "uri", ")", ";", "final", "int", "port", "=", "uri", ".", "getPort", "(", ")", ";", "if", "(", "port", ...
Extract an Inet address from an URI. @param uri the address. @return the address.
[ "Extract", "an", "Inet", "address", "from", "an", "URI", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/services/network/NetworkUtil.java#L229-L236
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientCustomImpl.java
KeyVaultClientCustomImpl.listCertificateVersions
public PagedList<CertificateItem> listCertificateVersions(final String vaultBaseUrl, final String certificateName) { """ List the versions of a certificate. @param vaultBaseUrl The vault name, e.g. https://myvault.vault.azure.net @param certificateName The name of the certificate @return the PagedList&lt;Ce...
java
public PagedList<CertificateItem> listCertificateVersions(final String vaultBaseUrl, final String certificateName) { return getCertificateVersions(vaultBaseUrl, certificateName); }
[ "public", "PagedList", "<", "CertificateItem", ">", "listCertificateVersions", "(", "final", "String", "vaultBaseUrl", ",", "final", "String", "certificateName", ")", "{", "return", "getCertificateVersions", "(", "vaultBaseUrl", ",", "certificateName", ")", ";", "}" ]
List the versions of a certificate. @param vaultBaseUrl The vault name, e.g. https://myvault.vault.azure.net @param certificateName The name of the certificate @return the PagedList&lt;CertificateItem&gt; if successful.
[ "List", "the", "versions", "of", "a", "certificate", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientCustomImpl.java#L1545-L1547
netheosgithub/pcs_api
java/src/main/java/net/netheos/pcsapi/providers/cloudme/CloudMe.java
CloudMe.getLongFromDom
private long getLongFromDom( Document dom, String tag ) { """ Retrieves a long value according to a Dom and a tag @param dom @param tag @return long value """ return Long.parseLong( dom.getElementsByTagName( tag ).item( 0 ).getTextContent() ); }
java
private long getLongFromDom( Document dom, String tag ) { return Long.parseLong( dom.getElementsByTagName( tag ).item( 0 ).getTextContent() ); }
[ "private", "long", "getLongFromDom", "(", "Document", "dom", ",", "String", "tag", ")", "{", "return", "Long", ".", "parseLong", "(", "dom", ".", "getElementsByTagName", "(", "tag", ")", ".", "item", "(", "0", ")", ".", "getTextContent", "(", ")", ")", ...
Retrieves a long value according to a Dom and a tag @param dom @param tag @return long value
[ "Retrieves", "a", "long", "value", "according", "to", "a", "Dom", "and", "a", "tag" ]
train
https://github.com/netheosgithub/pcs_api/blob/20691e52e144014f99ca75cb7dedc7ba0c18586c/java/src/main/java/net/netheos/pcsapi/providers/cloudme/CloudMe.java#L181-L184
ltearno/hexa.tools
hexa.binding/src/main/java/fr/lteconsulting/hexa/databinding/properties/Properties.java
Properties.getValue
public static <T> T getValue( Object object, String name ) { """ Gets the property's value from an object @param object The object @param name Property name @return """ return propertyValues.getValue(object, name); }
java
public static <T> T getValue( Object object, String name ) { return propertyValues.getValue(object, name); }
[ "public", "static", "<", "T", ">", "T", "getValue", "(", "Object", "object", ",", "String", "name", ")", "{", "return", "propertyValues", ".", "getValue", "(", "object", ",", "name", ")", ";", "}" ]
Gets the property's value from an object @param object The object @param name Property name @return
[ "Gets", "the", "property", "s", "value", "from", "an", "object" ]
train
https://github.com/ltearno/hexa.tools/blob/604c804901b1bb13fe10b3823cc4a639f8993363/hexa.binding/src/main/java/fr/lteconsulting/hexa/databinding/properties/Properties.java#L40-L43
phax/ph-commons
ph-security/src/main/java/com/helger/security/keystore/KeyStoreHelper.java
KeyStoreHelper.loadKeyStoreDirect
@Nonnull public static KeyStore loadKeyStoreDirect (@Nonnull final IKeyStoreType aKeyStoreType, @Nonnull final String sKeyStorePath, @Nullable final char [] aKeyStorePassword) throws GeneralSecurityException, ...
java
@Nonnull public static KeyStore loadKeyStoreDirect (@Nonnull final IKeyStoreType aKeyStoreType, @Nonnull final String sKeyStorePath, @Nullable final char [] aKeyStorePassword) throws GeneralSecurityException, ...
[ "@", "Nonnull", "public", "static", "KeyStore", "loadKeyStoreDirect", "(", "@", "Nonnull", "final", "IKeyStoreType", "aKeyStoreType", ",", "@", "Nonnull", "final", "String", "sKeyStorePath", ",", "@", "Nullable", "final", "char", "[", "]", "aKeyStorePassword", ")"...
Load a key store from a resource. @param aKeyStoreType Type of key store. May not be <code>null</code>. @param sKeyStorePath The path pointing to the key store. May not be <code>null</code>. @param aKeyStorePassword The key store password. May be <code>null</code> to indicate that no password is required. @return The ...
[ "Load", "a", "key", "store", "from", "a", "resource", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-security/src/main/java/com/helger/security/keystore/KeyStoreHelper.java#L133-L161
aNNiMON/Lightweight-Stream-API
stream/src/main/java/com/annimon/stream/IntStream.java
IntStream.iterate
@NotNull public static IntStream iterate( final int seed, @NotNull final IntPredicate predicate, @NotNull final IntUnaryOperator op) { """ Creates an {@code IntStream} by iterative application {@code IntUnaryOperator} function to an initial element {@code seed}, conditioned...
java
@NotNull public static IntStream iterate( final int seed, @NotNull final IntPredicate predicate, @NotNull final IntUnaryOperator op) { Objects.requireNonNull(predicate); return iterate(seed, op).takeWhile(predicate); }
[ "@", "NotNull", "public", "static", "IntStream", "iterate", "(", "final", "int", "seed", ",", "@", "NotNull", "final", "IntPredicate", "predicate", ",", "@", "NotNull", "final", "IntUnaryOperator", "op", ")", "{", "Objects", ".", "requireNonNull", "(", "predic...
Creates an {@code IntStream} by iterative application {@code IntUnaryOperator} function to an initial element {@code seed}, conditioned on satisfying the supplied predicate. <p>Example: <pre> seed: 0 predicate: (a) -&gt; a &lt; 20 f: (a) -&gt; a + 5 result: [0, 5, 10, 15] </pre> @param seed the initial value @param ...
[ "Creates", "an", "{", "@code", "IntStream", "}", "by", "iterative", "application", "{", "@code", "IntUnaryOperator", "}", "function", "to", "an", "initial", "element", "{", "@code", "seed", "}", "conditioned", "on", "satisfying", "the", "supplied", "predicate", ...
train
https://github.com/aNNiMON/Lightweight-Stream-API/blob/f29fd57208c20252a4549b084d55ed082c3e58f0/stream/src/main/java/com/annimon/stream/IntStream.java#L208-L215
jenkinsci/jenkins
core/src/main/java/hudson/util/jna/RegistryKey.java
RegistryKey.getValues
public TreeMap<String, Object> getValues() { """ Get all values under a key. @return TreeMap with name and value pairs """ int dwIndex, result; char[] lpValueName; byte[] lpData; IntByReference lpcchValueName, lpType, lpcbData; String name; TreeMap<String, Obj...
java
public TreeMap<String, Object> getValues() { int dwIndex, result; char[] lpValueName; byte[] lpData; IntByReference lpcchValueName, lpType, lpcbData; String name; TreeMap<String, Object> values = new TreeMap<>(String.CASE_INSENSITIVE_ORDER); lpValueName = new cha...
[ "public", "TreeMap", "<", "String", ",", "Object", ">", "getValues", "(", ")", "{", "int", "dwIndex", ",", "result", ";", "char", "[", "]", "lpValueName", ";", "byte", "[", "]", "lpData", ";", "IntByReference", "lpcchValueName", ",", "lpType", ",", "lpcb...
Get all values under a key. @return TreeMap with name and value pairs
[ "Get", "all", "values", "under", "a", "key", "." ]
train
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/util/jna/RegistryKey.java#L225-L276
alkacon/opencms-core
src/org/opencms/db/CmsSecurityManager.java
CmsSecurityManager.readIdForUrlName
public CmsUUID readIdForUrlName(CmsRequestContext context, String name) throws CmsException { """ Reads the structure id which is mapped to the given URL name, or null if the name is not mapped to any structure IDs.<p> @param context the request context @param name an URL name @return the structure ID whic...
java
public CmsUUID readIdForUrlName(CmsRequestContext context, String name) throws CmsException { CmsDbContext dbc = m_dbContextFactory.getDbContext(context); try { return m_driverManager.readIdForUrlName(dbc, name); } catch (Exception e) { CmsMessageContainer message = Mess...
[ "public", "CmsUUID", "readIdForUrlName", "(", "CmsRequestContext", "context", ",", "String", "name", ")", "throws", "CmsException", "{", "CmsDbContext", "dbc", "=", "m_dbContextFactory", ".", "getDbContext", "(", "context", ")", ";", "try", "{", "return", "m_drive...
Reads the structure id which is mapped to the given URL name, or null if the name is not mapped to any structure IDs.<p> @param context the request context @param name an URL name @return the structure ID which is mapped to the given name @throws CmsException if something goes wrong
[ "Reads", "the", "structure", "id", "which", "is", "mapped", "to", "the", "given", "URL", "name", "or", "null", "if", "the", "name", "is", "not", "mapped", "to", "any", "structure", "IDs", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsSecurityManager.java#L4518-L4531
looly/hutool
hutool-crypto/src/main/java/cn/hutool/crypto/digest/DigestUtil.java
DigestUtil.sha256Hex
public static String sha256Hex(String data, String charset) { """ 计算SHA-256摘要值,并转为16进制字符串 @param data 被摘要数据 @param charset 编码 @return SHA-256摘要的16进制表示 @since 3.0.8 """ return new Digester(DigestAlgorithm.SHA256).digestHex(data, charset); }
java
public static String sha256Hex(String data, String charset) { return new Digester(DigestAlgorithm.SHA256).digestHex(data, charset); }
[ "public", "static", "String", "sha256Hex", "(", "String", "data", ",", "String", "charset", ")", "{", "return", "new", "Digester", "(", "DigestAlgorithm", ".", "SHA256", ")", ".", "digestHex", "(", "data", ",", "charset", ")", ";", "}" ]
计算SHA-256摘要值,并转为16进制字符串 @param data 被摘要数据 @param charset 编码 @return SHA-256摘要的16进制表示 @since 3.0.8
[ "计算SHA", "-", "256摘要值,并转为16进制字符串" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-crypto/src/main/java/cn/hutool/crypto/digest/DigestUtil.java#L311-L313
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java
Utils.createNameForHiddenGuardEvaluatorMethod
public static String createNameForHiddenGuardEvaluatorMethod(String eventId, int handlerIndex) { """ Create the name of the hidden method that is containing the event guard evaluation. @param eventId the id of the event. @param handlerIndex the index of the handler in the container type. @return the method na...
java
public static String createNameForHiddenGuardEvaluatorMethod(String eventId, int handlerIndex) { return PREFIX_GUARD + fixHiddenMember(eventId) + HIDDEN_MEMBER_CHARACTER + handlerIndex; }
[ "public", "static", "String", "createNameForHiddenGuardEvaluatorMethod", "(", "String", "eventId", ",", "int", "handlerIndex", ")", "{", "return", "PREFIX_GUARD", "+", "fixHiddenMember", "(", "eventId", ")", "+", "HIDDEN_MEMBER_CHARACTER", "+", "handlerIndex", ";", "}...
Create the name of the hidden method that is containing the event guard evaluation. @param eventId the id of the event. @param handlerIndex the index of the handler in the container type. @return the method name.
[ "Create", "the", "name", "of", "the", "hidden", "method", "that", "is", "containing", "the", "event", "guard", "evaluation", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java#L463-L466
ops4j/org.ops4j.pax.logging
pax-logging-api/src/main/java/org/jboss/logging/Logger.java
Logger.infof
public void infof(Throwable t, String format, Object... params) { """ Issue a formatted log message with a level of INFO. @param t the throwable @param format the format string, as per {@link String#format(String, Object...)} @param params the parameters """ doLogf(Level.INFO, FQCN, format, params...
java
public void infof(Throwable t, String format, Object... params) { doLogf(Level.INFO, FQCN, format, params, t); }
[ "public", "void", "infof", "(", "Throwable", "t", ",", "String", "format", ",", "Object", "...", "params", ")", "{", "doLogf", "(", "Level", ".", "INFO", ",", "FQCN", ",", "format", ",", "params", ",", "t", ")", ";", "}" ]
Issue a formatted log message with a level of INFO. @param t the throwable @param format the format string, as per {@link String#format(String, Object...)} @param params the parameters
[ "Issue", "a", "formatted", "log", "message", "with", "a", "level", "of", "INFO", "." ]
train
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/jboss/logging/Logger.java#L1174-L1176
app55/app55-java
src/support/java/com/googlecode/openbeans/beancontext/BeanContextServicesSupport.java
BeanContextServicesSupport.childJustRemovedHook
protected void childJustRemovedHook(Object child, BCSChild bcsChild) { """ This method is called everytime a child is removed from this context. <p> The implementation releases all services requested by the child. </p> @see com.googlecode.openbeans.beancontext.BeanContextSupport#childJustRemovedHook(java.lan...
java
protected void childJustRemovedHook(Object child, BCSChild bcsChild) { if (bcsChild instanceof BCSSChild) { releaseServicesForChild((BCSSChild) bcsChild, false); } }
[ "protected", "void", "childJustRemovedHook", "(", "Object", "child", ",", "BCSChild", "bcsChild", ")", "{", "if", "(", "bcsChild", "instanceof", "BCSSChild", ")", "{", "releaseServicesForChild", "(", "(", "BCSSChild", ")", "bcsChild", ",", "false", ")", ";", "...
This method is called everytime a child is removed from this context. <p> The implementation releases all services requested by the child. </p> @see com.googlecode.openbeans.beancontext.BeanContextSupport#childJustRemovedHook(java.lang.Object, com.googlecode.openbeans.beancontext.BeanContextSupport.BCSChild)
[ "This", "method", "is", "called", "everytime", "a", "child", "is", "removed", "from", "this", "context", ".", "<p", ">", "The", "implementation", "releases", "all", "services", "requested", "by", "the", "child", ".", "<", "/", "p", ">" ]
train
https://github.com/app55/app55-java/blob/73e51d0f3141a859dfbd37ca9becef98477e553e/src/support/java/com/googlecode/openbeans/beancontext/BeanContextServicesSupport.java#L453-L459
kikinteractive/ice
ice/src/main/java/com/kik/config/ice/internal/ConfigDescriptorFactory.java
ConfigDescriptorFactory.buildDescriptor
public ConfigDescriptor buildDescriptor(Method method, Optional<String> scopeOpt) { """ Build a {@link ConfigDescriptor} for a specific Method, and given optional scope. @param method method to include in config descriptor @param scopeOpt optional scope for the config descriptor @return a {@link ConfigDescr...
java
public ConfigDescriptor buildDescriptor(Method method, Optional<String> scopeOpt) { return buildDescriptor(method, scopeOpt, Optional.empty()); }
[ "public", "ConfigDescriptor", "buildDescriptor", "(", "Method", "method", ",", "Optional", "<", "String", ">", "scopeOpt", ")", "{", "return", "buildDescriptor", "(", "method", ",", "scopeOpt", ",", "Optional", ".", "empty", "(", ")", ")", ";", "}" ]
Build a {@link ConfigDescriptor} for a specific Method, and given optional scope. @param method method to include in config descriptor @param scopeOpt optional scope for the config descriptor @return a {@link ConfigDescriptor} for the given method, to be used internally in the config system.
[ "Build", "a", "{", "@link", "ConfigDescriptor", "}", "for", "a", "specific", "Method", "and", "given", "optional", "scope", "." ]
train
https://github.com/kikinteractive/ice/blob/0c58d7bf2d9f6504892d0768d6022fcfa6df7514/ice/src/main/java/com/kik/config/ice/internal/ConfigDescriptorFactory.java#L110-L113
couchbase/couchbase-java-client
src/main/java/com/couchbase/client/java/util/Bootstrap.java
Bootstrap.fromDnsSrv
public static List<String> fromDnsSrv(final String serviceName, boolean full, boolean secure) throws NamingException { """ Fetch a bootstrap list from DNS SRV using default OS name resolution. @param serviceName the DNS SRV locator. @param full if the service name is the full one or needs to be enriched by the...
java
public static List<String> fromDnsSrv(final String serviceName, boolean full, boolean secure) throws NamingException { return fromDnsSrv(serviceName, full, secure, null); }
[ "public", "static", "List", "<", "String", ">", "fromDnsSrv", "(", "final", "String", "serviceName", ",", "boolean", "full", ",", "boolean", "secure", ")", "throws", "NamingException", "{", "return", "fromDnsSrv", "(", "serviceName", ",", "full", ",", "secure"...
Fetch a bootstrap list from DNS SRV using default OS name resolution. @param serviceName the DNS SRV locator. @param full if the service name is the full one or needs to be enriched by the couchbase prefixes. @param secure if the secure service prefix should be used. @return a list of DNS SRV records. @throws NamingEx...
[ "Fetch", "a", "bootstrap", "list", "from", "DNS", "SRV", "using", "default", "OS", "name", "resolution", "." ]
train
https://github.com/couchbase/couchbase-java-client/blob/f36a0ee0c66923bdde47838ca543e50cbaa99e14/src/main/java/com/couchbase/client/java/util/Bootstrap.java#L74-L76
rwl/CSparseJ
src/main/java/edu/emory/mathcs/csparsej/tfloat/Scs_scatter.java
Scs_scatter.cs_scatter
public static int cs_scatter(Scs A, int j, float beta, int[] w, float[] x, int mark, Scs C, int nz) { """ Scatters and sums a sparse vector A(:,j) into a dense vector, x = x + beta * A(:,j). @param A the sparse vector is A(:,j) @param j the column of A to use @param beta scalar multiplied by A(:,j) @para...
java
public static int cs_scatter(Scs A, int j, float beta, int[] w, float[] x, int mark, Scs C, int nz) { int i, p; int Ap[], Ai[], Ci[]; float[] Ax; if (!Scs_util.CS_CSC(A) || w == null || !Scs_util.CS_CSC(C)) return (-1); /* check inputs */ Ap = A.p; Ai =...
[ "public", "static", "int", "cs_scatter", "(", "Scs", "A", ",", "int", "j", ",", "float", "beta", ",", "int", "[", "]", "w", ",", "float", "[", "]", "x", ",", "int", "mark", ",", "Scs", "C", ",", "int", "nz", ")", "{", "int", "i", ",", "p", ...
Scatters and sums a sparse vector A(:,j) into a dense vector, x = x + beta * A(:,j). @param A the sparse vector is A(:,j) @param j the column of A to use @param beta scalar multiplied by A(:,j) @param w size m, node i is marked if w[i] = mark @param x size m, ignored if null @param mark mark value of w @param C patter...
[ "Scatters", "and", "sums", "a", "sparse", "vector", "A", "(", ":", "j", ")", "into", "a", "dense", "vector", "x", "=", "x", "+", "beta", "*", "A", "(", ":", "j", ")", "." ]
train
https://github.com/rwl/CSparseJ/blob/6a6f66bccce1558156a961494358952603b0ac84/src/main/java/edu/emory/mathcs/csparsej/tfloat/Scs_scatter.java#L59-L80
facebook/fresco
imagepipeline/src/main/java/com/facebook/imagepipeline/core/ProducerSequenceFactory.java
ProducerSequenceFactory.newBitmapCacheGetToLocalTransformSequence
private Producer<CloseableReference<CloseableImage>> newBitmapCacheGetToLocalTransformSequence( Producer<EncodedImage> inputProducer) { """ Creates a new fetch sequence that just needs the source producer. @param inputProducer the source producer @return the new sequence """ ThumbnailProducer<Encod...
java
private Producer<CloseableReference<CloseableImage>> newBitmapCacheGetToLocalTransformSequence( Producer<EncodedImage> inputProducer) { ThumbnailProducer<EncodedImage>[] defaultThumbnailProducers = new ThumbnailProducer[1]; defaultThumbnailProducers[0] = mProducerFactory.newLocalExifThumbnailProducer(); ...
[ "private", "Producer", "<", "CloseableReference", "<", "CloseableImage", ">", ">", "newBitmapCacheGetToLocalTransformSequence", "(", "Producer", "<", "EncodedImage", ">", "inputProducer", ")", "{", "ThumbnailProducer", "<", "EncodedImage", ">", "[", "]", "defaultThumbna...
Creates a new fetch sequence that just needs the source producer. @param inputProducer the source producer @return the new sequence
[ "Creates", "a", "new", "fetch", "sequence", "that", "just", "needs", "the", "source", "producer", "." ]
train
https://github.com/facebook/fresco/blob/0b85879d51c5036d5e46e627a6651afefc0b971a/imagepipeline/src/main/java/com/facebook/imagepipeline/core/ProducerSequenceFactory.java#L654-L659
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/ExpressionLogical.java
ExpressionLogical.compareValues
private Boolean compareValues(Session session, Object left, Object right) { """ For MATCH SIMPLE and FULL expressions, nulls in left are handled prior to calling this method """ if (left == null) { if (opType == OpTypes.NOT_DISTINCT) { return right == null; } ...
java
private Boolean compareValues(Session session, Object left, Object right) { if (left == null) { if (opType == OpTypes.NOT_DISTINCT) { return right == null; } return null; } if (right == null) { return (opType == OpTypes.NOT_DISTINC...
[ "private", "Boolean", "compareValues", "(", "Session", "session", ",", "Object", "left", ",", "Object", "right", ")", "{", "if", "(", "left", "==", "null", ")", "{", "if", "(", "opType", "==", "OpTypes", ".", "NOT_DISTINCT", ")", "{", "return", "right", ...
For MATCH SIMPLE and FULL expressions, nulls in left are handled prior to calling this method
[ "For", "MATCH", "SIMPLE", "and", "FULL", "expressions", "nulls", "in", "left", "are", "handled", "prior", "to", "calling", "this", "method" ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/ExpressionLogical.java#L990-L1034
icode/ameba
src/main/java/ameba/lib/Strands.java
Strands.parkUntil
public static void parkUntil(Object blocker, long deadline) { """ Disables the current strand for scheduling purposes, until the specified deadline, unless the permit is available. <p> <p> If the permit is available then it is consumed and the call returns immediately; otherwise the current strand becomes dis...
java
public static void parkUntil(Object blocker, long deadline) { try { Strand.parkUntil(blocker, deadline); } catch (SuspendExecution e) { throw RuntimeSuspendExecution.of(e); } }
[ "public", "static", "void", "parkUntil", "(", "Object", "blocker", ",", "long", "deadline", ")", "{", "try", "{", "Strand", ".", "parkUntil", "(", "blocker", ",", "deadline", ")", ";", "}", "catch", "(", "SuspendExecution", "e", ")", "{", "throw", "Runti...
Disables the current strand for scheduling purposes, until the specified deadline, unless the permit is available. <p> <p> If the permit is available then it is consumed and the call returns immediately; otherwise the current strand becomes disabled for scheduling purposes and lies dormant until one of four things happ...
[ "Disables", "the", "current", "strand", "for", "scheduling", "purposes", "until", "the", "specified", "deadline", "unless", "the", "permit", "is", "available", ".", "<p", ">", "<p", ">", "If", "the", "permit", "is", "available", "then", "it", "is", "consumed...
train
https://github.com/icode/ameba/blob/9d4956e935898e41331b2745e400ef869cd265e0/src/main/java/ameba/lib/Strands.java#L408-L414
Stratio/bdt
src/main/java/com/stratio/qa/specs/DatabaseSpec.java
DatabaseSpec.aMongoDataBaseContainsaTable
@Then("^a Mongo dataBase '(.+?)' doesnt contains a table '(.+?)'$") public void aMongoDataBaseContainsaTable(String database, String tableName) { """ Checks if a MongoDB database contains a table. @param database @param tableName """ commonspec.getMongoDBClient().connectToMongoDBDataBase(databa...
java
@Then("^a Mongo dataBase '(.+?)' doesnt contains a table '(.+?)'$") public void aMongoDataBaseContainsaTable(String database, String tableName) { commonspec.getMongoDBClient().connectToMongoDBDataBase(database); Set<String> collectionsNames = commonspec.getMongoDBClient().getMongoDBCollections(); ...
[ "@", "Then", "(", "\"^a Mongo dataBase '(.+?)' doesnt contains a table '(.+?)'$\"", ")", "public", "void", "aMongoDataBaseContainsaTable", "(", "String", "database", ",", "String", "tableName", ")", "{", "commonspec", ".", "getMongoDBClient", "(", ")", ".", "connectToMong...
Checks if a MongoDB database contains a table. @param database @param tableName
[ "Checks", "if", "a", "MongoDB", "database", "contains", "a", "table", "." ]
train
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/specs/DatabaseSpec.java#L801-L806
wmdietl/jsr308-langtools
src/share/classes/com/sun/tools/javac/util/Position.java
Position.makeLineMap
public static LineMap makeLineMap(char[] src, int max, boolean expandTabs) { """ A two-way map between line/column numbers and positions, derived from a scan done at creation time. Tab expansion is optionally supported via a character map. Text content is not retained. <p> Notes: The first character positi...
java
public static LineMap makeLineMap(char[] src, int max, boolean expandTabs) { LineMapImpl lineMap = expandTabs ? new LineTabMapImpl(max) : new LineMapImpl(); lineMap.build(src, max); return lineMap; }
[ "public", "static", "LineMap", "makeLineMap", "(", "char", "[", "]", "src", ",", "int", "max", ",", "boolean", "expandTabs", ")", "{", "LineMapImpl", "lineMap", "=", "expandTabs", "?", "new", "LineTabMapImpl", "(", "max", ")", ":", "new", "LineMapImpl", "(...
A two-way map between line/column numbers and positions, derived from a scan done at creation time. Tab expansion is optionally supported via a character map. Text content is not retained. <p> Notes: The first character position FIRSTPOS is at (FIRSTLINE,FIRSTCOLUMN). No account is taken of Unicode escapes. @param...
[ "A", "two", "-", "way", "map", "between", "line", "/", "column", "numbers", "and", "positions", "derived", "from", "a", "scan", "done", "at", "creation", "time", ".", "Tab", "expansion", "is", "optionally", "supported", "via", "a", "character", "map", ".",...
train
https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/javac/util/Position.java#L74-L79
Nexmo/nexmo-java
src/main/java/com/nexmo/client/numbers/NumbersClient.java
NumbersClient.buyNumber
public void buyNumber(String country, String msisdn) throws IOException, NexmoClientException { """ Start renting a Nexmo Virtual Number. @param country A String containing a 2-character ISO country code. @param msisdn The phone number to be bought. @throws IOException if an error occurs contacting ...
java
public void buyNumber(String country, String msisdn) throws IOException, NexmoClientException { this.buyNumber.execute(new BuyNumberRequest(country, msisdn)); }
[ "public", "void", "buyNumber", "(", "String", "country", ",", "String", "msisdn", ")", "throws", "IOException", ",", "NexmoClientException", "{", "this", ".", "buyNumber", ".", "execute", "(", "new", "BuyNumberRequest", "(", "country", ",", "msisdn", ")", ")",...
Start renting a Nexmo Virtual Number. @param country A String containing a 2-character ISO country code. @param msisdn The phone number to be bought. @throws IOException if an error occurs contacting the Nexmo API @throws NexmoClientException if an error is returned by the server.
[ "Start", "renting", "a", "Nexmo", "Virtual", "Number", "." ]
train
https://github.com/Nexmo/nexmo-java/blob/7427eff6d6baa5a5bd9197fa096bcf2564191cf5/src/main/java/com/nexmo/client/numbers/NumbersClient.java#L100-L102
alkacon/opencms-core
src/org/opencms/file/CmsObject.java
CmsObject.createProject
public CmsProject createProject(String name, String description, String groupname, String managergroupname) throws CmsException { """ Creates a new project.<p> @param name the name of the project to create @param description the description for the new project @param groupname the name of the project user...
java
public CmsProject createProject(String name, String description, String groupname, String managergroupname) throws CmsException { return m_securityManager.createProject( m_context, name, description, groupname, managergroupname, CmsPro...
[ "public", "CmsProject", "createProject", "(", "String", "name", ",", "String", "description", ",", "String", "groupname", ",", "String", "managergroupname", ")", "throws", "CmsException", "{", "return", "m_securityManager", ".", "createProject", "(", "m_context", ",...
Creates a new project.<p> @param name the name of the project to create @param description the description for the new project @param groupname the name of the project user group @param managergroupname the name of the project manager group @return the created project @throws CmsException if something goes wrong
[ "Creates", "a", "new", "project", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/file/CmsObject.java#L675-L685
alkacon/opencms-core
src/org/opencms/i18n/CmsVfsBundleManager.java
CmsVfsBundleManager.addXmlBundle
private void addXmlBundle(CmsResource xmlBundle) { """ Adds an XML based message bundle.<p> @param xmlBundle the XML content containing the message bundle data """ String name = xmlBundle.getName(); String path = xmlBundle.getRootPath(); m_bundleBaseNames.add(name); L...
java
private void addXmlBundle(CmsResource xmlBundle) { String name = xmlBundle.getName(); String path = xmlBundle.getRootPath(); m_bundleBaseNames.add(name); LOG.info(String.format("Adding property VFS bundle (path=%s, name=%s)", xmlBundle.getRootPath(), name)); for (Locale ...
[ "private", "void", "addXmlBundle", "(", "CmsResource", "xmlBundle", ")", "{", "String", "name", "=", "xmlBundle", ".", "getName", "(", ")", ";", "String", "path", "=", "xmlBundle", ".", "getRootPath", "(", ")", ";", "m_bundleBaseNames", ".", "add", "(", "n...
Adds an XML based message bundle.<p> @param xmlBundle the XML content containing the message bundle data
[ "Adds", "an", "XML", "based", "message", "bundle", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/i18n/CmsVfsBundleManager.java#L314-L331
Azure/azure-sdk-for-java
compute/resource-manager/v2017_12_01/src/main/java/com/microsoft/azure/management/compute/v2017_12_01/implementation/VirtualMachineScaleSetsInner.java
VirtualMachineScaleSetsInner.forceRecoveryServiceFabricPlatformUpdateDomainWalk
public RecoveryWalkResponseInner forceRecoveryServiceFabricPlatformUpdateDomainWalk(String resourceGroupName, String vmScaleSetName, int platformUpdateDomain) { """ Manual platform update domain walk to update virtual machines in a service fabric virtual machine scale set. @param resourceGroupName The name of t...
java
public RecoveryWalkResponseInner forceRecoveryServiceFabricPlatformUpdateDomainWalk(String resourceGroupName, String vmScaleSetName, int platformUpdateDomain) { return forceRecoveryServiceFabricPlatformUpdateDomainWalkWithServiceResponseAsync(resourceGroupName, vmScaleSetName, platformUpdateDomain).toBlocking()...
[ "public", "RecoveryWalkResponseInner", "forceRecoveryServiceFabricPlatformUpdateDomainWalk", "(", "String", "resourceGroupName", ",", "String", "vmScaleSetName", ",", "int", "platformUpdateDomain", ")", "{", "return", "forceRecoveryServiceFabricPlatformUpdateDomainWalkWithServiceRespon...
Manual platform update domain walk to update virtual machines in a service fabric virtual machine scale set. @param resourceGroupName The name of the resource group. @param vmScaleSetName The name of the VM scale set. @param platformUpdateDomain The platform update domain for which a manual recovery walk is requested ...
[ "Manual", "platform", "update", "domain", "walk", "to", "update", "virtual", "machines", "in", "a", "service", "fabric", "virtual", "machine", "scale", "set", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/compute/resource-manager/v2017_12_01/src/main/java/com/microsoft/azure/management/compute/v2017_12_01/implementation/VirtualMachineScaleSetsInner.java#L4357-L4359
aws/aws-sdk-java
aws-java-sdk-medialive/src/main/java/com/amazonaws/services/medialive/model/ChannelSummary.java
ChannelSummary.withTags
public ChannelSummary withTags(java.util.Map<String, String> tags) { """ A collection of key-value pairs. @param tags A collection of key-value pairs. @return Returns a reference to this object so that method calls can be chained together. """ setTags(tags); return this; }
java
public ChannelSummary withTags(java.util.Map<String, String> tags) { setTags(tags); return this; }
[ "public", "ChannelSummary", "withTags", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "tags", ")", "{", "setTags", "(", "tags", ")", ";", "return", "this", ";", "}" ]
A collection of key-value pairs. @param tags A collection of key-value pairs. @return Returns a reference to this object so that method calls can be chained together.
[ "A", "collection", "of", "key", "-", "value", "pairs", "." ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-medialive/src/main/java/com/amazonaws/services/medialive/model/ChannelSummary.java#L632-L635
redkale/redkale
src/org/redkale/util/Utility.java
Utility.binToHexString
public static String binToHexString(byte[] bytes, int offset, int len) { """ 将字节数组转换为16进制字符串 @param bytes 字节数组 @param offset 偏移量 @param len 长度 @return 16进制字符串 """ return new String(binToHex(bytes, offset, len)); }
java
public static String binToHexString(byte[] bytes, int offset, int len) { return new String(binToHex(bytes, offset, len)); }
[ "public", "static", "String", "binToHexString", "(", "byte", "[", "]", "bytes", ",", "int", "offset", ",", "int", "len", ")", "{", "return", "new", "String", "(", "binToHex", "(", "bytes", ",", "offset", ",", "len", ")", ")", ";", "}" ]
将字节数组转换为16进制字符串 @param bytes 字节数组 @param offset 偏移量 @param len 长度 @return 16进制字符串
[ "将字节数组转换为16进制字符串" ]
train
https://github.com/redkale/redkale/blob/ea5169b5c5ea7412fd762331c0c497165832e901/src/org/redkale/util/Utility.java#L1342-L1344
the-fascinator/plugin-subscriber-solrEventLog
src/main/java/com/googlecode/fascinator/subscriber/solrEventLog/SolrEventLogSubscriber.java
SolrEventLogSubscriber.setConfig
private void setConfig(JsonSimpleConfig config) throws SubscriberException { """ Initialization of Solr Access Control plugin @param config The configuration to use @throws AuthenticationException if fails to initialize """ try { // Find our solr index uri = new URI(config.g...
java
private void setConfig(JsonSimpleConfig config) throws SubscriberException { try { // Find our solr index uri = new URI(config.getString(null, "subscriber", getId(), "uri")); if (uri == null) { throw new SubscriberException("No Solr URI provided"); ...
[ "private", "void", "setConfig", "(", "JsonSimpleConfig", "config", ")", "throws", "SubscriberException", "{", "try", "{", "// Find our solr index", "uri", "=", "new", "URI", "(", "config", ".", "getString", "(", "null", ",", "\"subscriber\"", ",", "getId", "(", ...
Initialization of Solr Access Control plugin @param config The configuration to use @throws AuthenticationException if fails to initialize
[ "Initialization", "of", "Solr", "Access", "Control", "plugin" ]
train
https://github.com/the-fascinator/plugin-subscriber-solrEventLog/blob/2c9da188887a622a6d43d33ea9099aff53a0516d/src/main/java/com/googlecode/fascinator/subscriber/solrEventLog/SolrEventLogSubscriber.java#L238-L289
broadinstitute/barclay
src/main/java/org/broadinstitute/barclay/help/HelpDoclet.java
HelpDoclet.processWorkUnitTemplate
protected void processWorkUnitTemplate( final Configuration cfg, final DocWorkUnit workUnit, final List<Map<String, String>> indexByGroupMaps, final List<Map<String, String>> featureMaps) { """ High-level function that processes a single DocWorkUnit unit using its ha...
java
protected void processWorkUnitTemplate( final Configuration cfg, final DocWorkUnit workUnit, final List<Map<String, String>> indexByGroupMaps, final List<Map<String, String>> featureMaps) { try { // Merge data-model with template Templa...
[ "protected", "void", "processWorkUnitTemplate", "(", "final", "Configuration", "cfg", ",", "final", "DocWorkUnit", "workUnit", ",", "final", "List", "<", "Map", "<", "String", ",", "String", ">", ">", "indexByGroupMaps", ",", "final", "List", "<", "Map", "<", ...
High-level function that processes a single DocWorkUnit unit using its handler @param cfg @param workUnit @param featureMaps @throws IOException
[ "High", "-", "level", "function", "that", "processes", "a", "single", "DocWorkUnit", "unit", "using", "its", "handler" ]
train
https://github.com/broadinstitute/barclay/blob/7e56d725766b0da3baff23e79a31c3d01c3589c2/src/main/java/org/broadinstitute/barclay/help/HelpDoclet.java#L582-L627
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/PipelineApi.java
PipelineApi.getPipelineSchedule
public PipelineSchedule getPipelineSchedule(Object projectIdOrPath, Integer pipelineScheduleId) throws GitLabApiException { """ Get a specific pipeline schedule for project. <pre><code>GET /projects/:id/pipeline_schedules/:pipeline_schedule_id</code></pre> @param projectIdOrPath projectIdOrPath the project i...
java
public PipelineSchedule getPipelineSchedule(Object projectIdOrPath, Integer pipelineScheduleId) throws GitLabApiException { Response response = get(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "pipeline_schedules", pipelineScheduleId); return (response.readEntity(PipelineSc...
[ "public", "PipelineSchedule", "getPipelineSchedule", "(", "Object", "projectIdOrPath", ",", "Integer", "pipelineScheduleId", ")", "throws", "GitLabApiException", "{", "Response", "response", "=", "get", "(", "Response", ".", "Status", ".", "OK", ",", "null", ",", ...
Get a specific pipeline schedule for project. <pre><code>GET /projects/:id/pipeline_schedules/:pipeline_schedule_id</code></pre> @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required @param pipelineScheduleId the ID of the hook to get @return the...
[ "Get", "a", "specific", "pipeline", "schedule", "for", "project", "." ]
train
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/PipelineApi.java#L363-L366
whizzosoftware/WZWave
src/main/java/com/whizzosoftware/wzwave/commandclass/MeterCommandClass.java
MeterCommandClass.createGet
public DataFrame createGet(byte nodeId, Scale s) { """ Create a Get data frame. @param nodeId the target node ID @param s the scale (null for version 1) @return a DataFrame instance """ switch (getVersion()) { case 1: return createSendDataFrame("METER_GET", nodeId, ne...
java
public DataFrame createGet(byte nodeId, Scale s) { switch (getVersion()) { case 1: return createSendDataFrame("METER_GET", nodeId, new byte[]{MeterCommandClass.ID, METER_GET}, true); default: { byte scale = scaleToByte(s); byte b = (byte) (...
[ "public", "DataFrame", "createGet", "(", "byte", "nodeId", ",", "Scale", "s", ")", "{", "switch", "(", "getVersion", "(", ")", ")", "{", "case", "1", ":", "return", "createSendDataFrame", "(", "\"METER_GET\"", ",", "nodeId", ",", "new", "byte", "[", "]",...
Create a Get data frame. @param nodeId the target node ID @param s the scale (null for version 1) @return a DataFrame instance
[ "Create", "a", "Get", "data", "frame", "." ]
train
https://github.com/whizzosoftware/WZWave/blob/b9dfec6b55515226edf9d772a89933b336397501/src/main/java/com/whizzosoftware/wzwave/commandclass/MeterCommandClass.java#L180-L191
UrielCh/ovh-java-sdk
ovh-java-sdk-ipLoadbalancing/src/main/java/net/minidev/ovh/api/ApiOvhIpLoadbalancing.java
ApiOvhIpLoadbalancing.serviceName_tcp_farm_farmId_server_GET
public ArrayList<Long> serviceName_tcp_farm_farmId_server_GET(String serviceName, Long farmId, String address, OvhBackendCustomerServerStatusEnum status) throws IOException { """ TCP Farm's Servers REST: GET /ipLoadbalancing/{serviceName}/tcp/farm/{farmId}/server @param address [required] Filter the value of a...
java
public ArrayList<Long> serviceName_tcp_farm_farmId_server_GET(String serviceName, Long farmId, String address, OvhBackendCustomerServerStatusEnum status) throws IOException { String qPath = "/ipLoadbalancing/{serviceName}/tcp/farm/{farmId}/server"; StringBuilder sb = path(qPath, serviceName, farmId); query(sb, "a...
[ "public", "ArrayList", "<", "Long", ">", "serviceName_tcp_farm_farmId_server_GET", "(", "String", "serviceName", ",", "Long", "farmId", ",", "String", "address", ",", "OvhBackendCustomerServerStatusEnum", "status", ")", "throws", "IOException", "{", "String", "qPath", ...
TCP Farm's Servers REST: GET /ipLoadbalancing/{serviceName}/tcp/farm/{farmId}/server @param address [required] Filter the value of address property (=) @param status [required] Filter the value of status property (=) @param serviceName [required] The internal name of your IP load balancing @param farmId [required] Id ...
[ "TCP", "Farm", "s", "Servers" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-ipLoadbalancing/src/main/java/net/minidev/ovh/api/ApiOvhIpLoadbalancing.java#L1656-L1663
kkopacz/agiso-tempel
bundles/tempel-core/src/main/java/org/agiso/tempel/core/RecursiveTemplateVerifier.java
RecursiveTemplateVerifier.verifyTemplate
private void verifyTemplate(Template<?> template, LinkedHashSet<String> templates) { """ Weryfikuje poprawność szablonu, szablonu nadrzędnego i rekurencyjne sprawdza wszystkie szablony używane. Kontroluje, czy drzewie wywołań szablonów nie występuje zapętlenie. @param template Szablon do weryfikacji. @param ...
java
private void verifyTemplate(Template<?> template, LinkedHashSet<String> templates) { String id = template.getKey(); // Sprawdzanie, czy w gałęzi wywołań szablonów nie ma zapętlenia: if(templates.contains(id)) { // Wyświetlanie gałęzi z zapętleniem i wyrzucanie wyjątku: Iterator<String> t = templates.iterat...
[ "private", "void", "verifyTemplate", "(", "Template", "<", "?", ">", "template", ",", "LinkedHashSet", "<", "String", ">", "templates", ")", "{", "String", "id", "=", "template", ".", "getKey", "(", ")", ";", "// Sprawdzanie, czy w gałęzi wywołań szablonów nie ma ...
Weryfikuje poprawność szablonu, szablonu nadrzędnego i rekurencyjne sprawdza wszystkie szablony używane. Kontroluje, czy drzewie wywołań szablonów nie występuje zapętlenie. @param template Szablon do weryfikacji. @param templates Zbiór identyfikatorów szablonów gałęzi. Wykorzystywany do wykrywania zapętleń wywołań.
[ "Weryfikuje", "poprawność", "szablonu", "szablonu", "nadrzędnego", "i", "rekurencyjne", "sprawdza", "wszystkie", "szablony", "używane", ".", "Kontroluje", "czy", "drzewie", "wywołań", "szablonów", "nie", "występuje", "zapętlenie", "." ]
train
https://github.com/kkopacz/agiso-tempel/blob/ff7a96153153b6bc07212d776816b87d9538f6fa/bundles/tempel-core/src/main/java/org/agiso/tempel/core/RecursiveTemplateVerifier.java#L51-L76
pwittchen/ReactiveWiFi
library/src/main/java/com/github/pwittchen/reactivewifi/AccessRequester.java
AccessRequester.buildLocationAccessDialog
public static AlertDialog.Builder buildLocationAccessDialog(final Activity activity, final DialogInterface.OnClickListener onOkClickListener) { """ Creates dialog for accessing Location Services @param activity where dialog is build @param onOkClickListener implementation for action customisation @retur...
java
public static AlertDialog.Builder buildLocationAccessDialog(final Activity activity, final DialogInterface.OnClickListener onOkClickListener) { final Resources resources = activity.getResources(); final String title = resources.getString(R.string.requesting_location_access); final String message = res...
[ "public", "static", "AlertDialog", ".", "Builder", "buildLocationAccessDialog", "(", "final", "Activity", "activity", ",", "final", "DialogInterface", ".", "OnClickListener", "onOkClickListener", ")", "{", "final", "Resources", "resources", "=", "activity", ".", "getR...
Creates dialog for accessing Location Services @param activity where dialog is build @param onOkClickListener implementation for action customisation @return dialog builder
[ "Creates", "dialog", "for", "accessing", "Location", "Services" ]
train
https://github.com/pwittchen/ReactiveWiFi/blob/eb2048663c1593b1706cfafb876542a41a223a1f/library/src/main/java/com/github/pwittchen/reactivewifi/AccessRequester.java#L86-L92
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/ling/WordTagFactory.java
WordTagFactory.newLabel
public Label newLabel(String labelStr, int options) { """ Make a new label with this <code>String</code> as a value component. Any other fields of the label would normally be null. @param labelStr The String that will be used for value @param options what to make (use labelStr as word or tag) @return The ne...
java
public Label newLabel(String labelStr, int options) { if (options == TaggedWordFactory.TAG_LABEL) { return new WordTag(null, labelStr); } else { return new WordTag(labelStr); } }
[ "public", "Label", "newLabel", "(", "String", "labelStr", ",", "int", "options", ")", "{", "if", "(", "options", "==", "TaggedWordFactory", ".", "TAG_LABEL", ")", "{", "return", "new", "WordTag", "(", "null", ",", "labelStr", ")", ";", "}", "else", "{", ...
Make a new label with this <code>String</code> as a value component. Any other fields of the label would normally be null. @param labelStr The String that will be used for value @param options what to make (use labelStr as word or tag) @return The new WordTag (tag or word will be <code>null</code>)
[ "Make", "a", "new", "label", "with", "this", "<code", ">", "String<", "/", "code", ">", "as", "a", "value", "component", ".", "Any", "other", "fields", "of", "the", "label", "would", "normally", "be", "null", "." ]
train
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/ling/WordTagFactory.java#L61-L67
Azure/azure-sdk-for-java
network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/NetworkWatchersInner.java
NetworkWatchersInner.createOrUpdateAsync
public Observable<NetworkWatcherInner> createOrUpdateAsync(String resourceGroupName, String networkWatcherName, NetworkWatcherInner parameters) { """ Creates or updates a network watcher in the specified resource group. @param resourceGroupName The name of the resource group. @param networkWatcherName The name...
java
public Observable<NetworkWatcherInner> createOrUpdateAsync(String resourceGroupName, String networkWatcherName, NetworkWatcherInner parameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).map(new Func1<ServiceResponse<NetworkWatcherInner>, NetworkWatcherInn...
[ "public", "Observable", "<", "NetworkWatcherInner", ">", "createOrUpdateAsync", "(", "String", "resourceGroupName", ",", "String", "networkWatcherName", ",", "NetworkWatcherInner", "parameters", ")", "{", "return", "createOrUpdateWithServiceResponseAsync", "(", "resourceGroup...
Creates or updates a network watcher in the specified resource group. @param resourceGroupName The name of the resource group. @param networkWatcherName The name of the network watcher. @param parameters Parameters that define the network watcher resource. @throws IllegalArgumentException thrown if parameters fail the...
[ "Creates", "or", "updates", "a", "network", "watcher", "in", "the", "specified", "resource", "group", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/NetworkWatchersInner.java#L230-L237
igniterealtime/Smack
smack-core/src/main/java/org/jivesoftware/smack/util/dns/DNSResolver.java
DNSResolver.lookupHostAddress0
protected List<InetAddress> lookupHostAddress0(DnsName name, List<HostAddress> failedAddresses, DnssecMode dnssecMode) { """ Lookup the IP addresses of a given host name. Returns <code>null</code> if there was an error, in which the error reason will be added in form of a <code>HostAddress</code> to <code>failedA...
java
protected List<InetAddress> lookupHostAddress0(DnsName name, List<HostAddress> failedAddresses, DnssecMode dnssecMode) { // Default implementation of a DNS name lookup for A/AAAA records. It is assumed that this method does never // support DNSSEC. Subclasses are free to override this method. if...
[ "protected", "List", "<", "InetAddress", ">", "lookupHostAddress0", "(", "DnsName", "name", ",", "List", "<", "HostAddress", ">", "failedAddresses", ",", "DnssecMode", "dnssecMode", ")", "{", "// Default implementation of a DNS name lookup for A/AAAA records. It is assumed th...
Lookup the IP addresses of a given host name. Returns <code>null</code> if there was an error, in which the error reason will be added in form of a <code>HostAddress</code> to <code>failedAddresses</code>. Returns a empty list in case the DNS name exists but has no associated A or AAAA resource records. Otherwise, if t...
[ "Lookup", "the", "IP", "addresses", "of", "a", "given", "host", "name", ".", "Returns", "<code", ">", "null<", "/", "code", ">", "if", "there", "was", "an", "error", "in", "which", "the", "error", "reason", "will", "be", "added", "in", "form", "of", ...
train
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-core/src/main/java/org/jivesoftware/smack/util/dns/DNSResolver.java#L81-L97
google/error-prone-javac
src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java
HtmlDocletWriter.getDocLink
public Content getDocLink(LinkInfoImpl.Kind context, MemberDoc doc, String label) { """ Get the link for the given member. @param context the id of the context where the link will be added @param doc the member being linked to @param label the label for the link @return a content tree for the doc link ""...
java
public Content getDocLink(LinkInfoImpl.Kind context, MemberDoc doc, String label) { return getDocLink(context, doc.containingClass(), doc, new StringContent(label)); }
[ "public", "Content", "getDocLink", "(", "LinkInfoImpl", ".", "Kind", "context", ",", "MemberDoc", "doc", ",", "String", "label", ")", "{", "return", "getDocLink", "(", "context", ",", "doc", ".", "containingClass", "(", ")", ",", "doc", ",", "new", "String...
Get the link for the given member. @param context the id of the context where the link will be added @param doc the member being linked to @param label the label for the link @return a content tree for the doc link
[ "Get", "the", "link", "for", "the", "given", "member", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java#L1174-L1177
DDTH/ddth-kafka
src/main/java/com/github/ddth/kafka/internal/KafkaMsgConsumer.java
KafkaMsgConsumer.removeMessageListener
public boolean removeMessageListener(String topic, IKafkaMessageListener msgListener) { """ Removes a topic message listener. @param topic @param msgListener @return {@code true} if successful, {@code false} otherwise (the topic may have no such listener added before) """ synchronized (topicMsgLi...
java
public boolean removeMessageListener(String topic, IKafkaMessageListener msgListener) { synchronized (topicMsgListeners) { if (topicMsgListeners.remove(topic, msgListener)) { if (topicMsgListeners.get(topic).isEmpty()) { // no more listener, stop worker ...
[ "public", "boolean", "removeMessageListener", "(", "String", "topic", ",", "IKafkaMessageListener", "msgListener", ")", "{", "synchronized", "(", "topicMsgListeners", ")", "{", "if", "(", "topicMsgListeners", ".", "remove", "(", "topic", ",", "msgListener", ")", "...
Removes a topic message listener. @param topic @param msgListener @return {@code true} if successful, {@code false} otherwise (the topic may have no such listener added before)
[ "Removes", "a", "topic", "message", "listener", "." ]
train
https://github.com/DDTH/ddth-kafka/blob/aaeb8536e28a109ac0b69022f0ea4bbf5696b76f/src/main/java/com/github/ddth/kafka/internal/KafkaMsgConsumer.java#L537-L551
apache/incubator-atlas
repository/src/main/java/org/apache/atlas/gremlin/optimizer/ExpandOrsOptimization.java
ExpandOrsOptimization.addCallToUpdateResultVariable
private GroovyExpression addCallToUpdateResultVariable(GroovyExpression expr,List<LiteralExpression> aliasNames, OptimizationContext context) { """ This method adds steps to the end of the initial traversal to add the vertices that were found into an intermediate variable (defined as a Set). If there is one alia...
java
private GroovyExpression addCallToUpdateResultVariable(GroovyExpression expr,List<LiteralExpression> aliasNames, OptimizationContext context) { GroovyExpression result = expr; // If there is one range expression in the unoptimized gremlin, // add a range expression here so that the intermediate...
[ "private", "GroovyExpression", "addCallToUpdateResultVariable", "(", "GroovyExpression", "expr", ",", "List", "<", "LiteralExpression", ">", "aliasNames", ",", "OptimizationContext", "context", ")", "{", "GroovyExpression", "result", "=", "expr", ";", "// If there is one ...
This method adds steps to the end of the initial traversal to add the vertices that were found into an intermediate variable (defined as a Set). If there is one alias, this set will contain the vertices associated with that Alias. If there are multiple aliases, the values in the set will be alias->vertex maps that ha...
[ "This", "method", "adds", "steps", "to", "the", "end", "of", "the", "initial", "traversal", "to", "add", "the", "vertices", "that", "were", "found", "into", "an", "intermediate", "variable", "(", "defined", "as", "a", "Set", ")", ".", "If", "there", "is"...
train
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/repository/src/main/java/org/apache/atlas/gremlin/optimizer/ExpandOrsOptimization.java#L325-L340
mygreen/xlsmapper
src/main/java/com/gh/mygreen/xlsmapper/XlsMapper.java
XlsMapper.save
public void save(final InputStream templateXlsIn, final OutputStream xlsOut, final Object beanObj) throws XlsMapperException, IOException { """ JavaのオブジェクトをExeclファイルに出力する。 <p>出力するファイルは、引数で指定した雛形となるテンプレート用のExcelファイルをもとに出力する。</p> @param templateXlsIn 雛形となるExcelファイルの入力 @param xlsOut 出力先のストリーム @param beanObj 書き込...
java
public void save(final InputStream templateXlsIn, final OutputStream xlsOut, final Object beanObj) throws XlsMapperException, IOException { saver.save(templateXlsIn, xlsOut, beanObj); }
[ "public", "void", "save", "(", "final", "InputStream", "templateXlsIn", ",", "final", "OutputStream", "xlsOut", ",", "final", "Object", "beanObj", ")", "throws", "XlsMapperException", ",", "IOException", "{", "saver", ".", "save", "(", "templateXlsIn", ",", "xls...
JavaのオブジェクトをExeclファイルに出力する。 <p>出力するファイルは、引数で指定した雛形となるテンプレート用のExcelファイルをもとに出力する。</p> @param templateXlsIn 雛形となるExcelファイルの入力 @param xlsOut 出力先のストリーム @param beanObj 書き込むBeanオブジェクト @throws IllegalArgumentException {@literal templateXlsIn == null or xlsOut == null or beanObj == null} @throws XlsMapperException マッピングに失敗した場合...
[ "JavaのオブジェクトをExeclファイルに出力する。", "<p", ">", "出力するファイルは、引数で指定した雛形となるテンプレート用のExcelファイルをもとに出力する。<", "/", "p", ">" ]
train
https://github.com/mygreen/xlsmapper/blob/a0c6b25c622e5f3a50b199ef685d2ee46ad5483c/src/main/java/com/gh/mygreen/xlsmapper/XlsMapper.java#L332-L334
Azure/azure-sdk-for-java
network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/LocalNetworkGatewaysInner.java
LocalNetworkGatewaysInner.updateTags
public LocalNetworkGatewayInner updateTags(String resourceGroupName, String localNetworkGatewayName, Map<String, String> tags) { """ Updates a local network gateway tags. @param resourceGroupName The name of the resource group. @param localNetworkGatewayName The name of the local network gateway. @param tags ...
java
public LocalNetworkGatewayInner updateTags(String resourceGroupName, String localNetworkGatewayName, Map<String, String> tags) { return updateTagsWithServiceResponseAsync(resourceGroupName, localNetworkGatewayName, tags).toBlocking().last().body(); }
[ "public", "LocalNetworkGatewayInner", "updateTags", "(", "String", "resourceGroupName", ",", "String", "localNetworkGatewayName", ",", "Map", "<", "String", ",", "String", ">", "tags", ")", "{", "return", "updateTagsWithServiceResponseAsync", "(", "resourceGroupName", "...
Updates a local network gateway tags. @param resourceGroupName The name of the resource group. @param localNetworkGatewayName The name of the local network gateway. @param tags Resource tags. @throws IllegalArgumentException thrown if parameters fail the validation @throws CloudException thrown if the request is rejec...
[ "Updates", "a", "local", "network", "gateway", "tags", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/LocalNetworkGatewaysInner.java#L590-L592
atomix/atomix
utils/src/main/java/io/atomix/utils/config/ConfigMapper.java
ConfigMapper.loadFiles
public <T> T loadFiles(Class<T> type, List<File> files, List<String> resources) { """ Loads the given configuration file using the mapper, falling back to the given resources. @param type the type to load @param files the files to load @param resources the resources to which to fall back @param <T> ...
java
public <T> T loadFiles(Class<T> type, List<File> files, List<String> resources) { if (files == null) { return loadResources(type, resources); } Config config = ConfigFactory.systemProperties(); for (File file : files) { config = config.withFallback(ConfigFactory.parseFile(file, ConfigParseO...
[ "public", "<", "T", ">", "T", "loadFiles", "(", "Class", "<", "T", ">", "type", ",", "List", "<", "File", ">", "files", ",", "List", "<", "String", ">", "resources", ")", "{", "if", "(", "files", "==", "null", ")", "{", "return", "loadResources", ...
Loads the given configuration file using the mapper, falling back to the given resources. @param type the type to load @param files the files to load @param resources the resources to which to fall back @param <T> the resulting type @return the loaded configuration
[ "Loads", "the", "given", "configuration", "file", "using", "the", "mapper", "falling", "back", "to", "the", "given", "resources", "." ]
train
https://github.com/atomix/atomix/blob/3a94b7c80576d762dd0d396d4645df07a0b37c31/utils/src/main/java/io/atomix/utils/config/ConfigMapper.java#L76-L90
apache/incubator-atlas
common/src/main/java/org/apache/atlas/utils/ParamChecker.java
ParamChecker.notNull
public static <T> T notNull(T obj, String name) { """ Check that a value is not null. If null throws an IllegalArgumentException. @param obj value. @param name parameter name for the exception message. @return the given value. """ if (obj == null) { throw new IllegalArgumentException(n...
java
public static <T> T notNull(T obj, String name) { if (obj == null) { throw new IllegalArgumentException(name + " cannot be null"); } return obj; }
[ "public", "static", "<", "T", ">", "T", "notNull", "(", "T", "obj", ",", "String", "name", ")", "{", "if", "(", "obj", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "name", "+", "\" cannot be null\"", ")", ";", "}", "return",...
Check that a value is not null. If null throws an IllegalArgumentException. @param obj value. @param name parameter name for the exception message. @return the given value.
[ "Check", "that", "a", "value", "is", "not", "null", ".", "If", "null", "throws", "an", "IllegalArgumentException", "." ]
train
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/common/src/main/java/org/apache/atlas/utils/ParamChecker.java#L38-L43
ppiastucki/recast4j
detourcrowd/src/main/java/org/recast4j/detour/crowd/PathCorridor.java
PathCorridor.optimizePathTopology
boolean optimizePathTopology(NavMeshQuery navquery, QueryFilter filter) { """ Attempts to optimize the path using a local area search. (Partial replanning.) Inaccurate locomotion or dynamic obstacle avoidance can force the agent position significantly outside the original corridor. Over time this can result in...
java
boolean optimizePathTopology(NavMeshQuery navquery, QueryFilter filter) { if (m_path.size() < 3) { return false; } final int MAX_ITER = 32; navquery.initSlicedFindPath(m_path.get(0), m_path.get(m_path.size() - 1), m_pos, m_target, filter, 0); navquery.updateSlicedFi...
[ "boolean", "optimizePathTopology", "(", "NavMeshQuery", "navquery", ",", "QueryFilter", "filter", ")", "{", "if", "(", "m_path", ".", "size", "(", ")", "<", "3", ")", "{", "return", "false", ";", "}", "final", "int", "MAX_ITER", "=", "32", ";", "navquery...
Attempts to optimize the path using a local area search. (Partial replanning.) Inaccurate locomotion or dynamic obstacle avoidance can force the agent position significantly outside the original corridor. Over time this can result in the formation of a non-optimal corridor. This function will use a local area path sea...
[ "Attempts", "to", "optimize", "the", "path", "using", "a", "local", "area", "search", ".", "(", "Partial", "replanning", ".", ")" ]
train
https://github.com/ppiastucki/recast4j/blob/a414dc34f16b87c95fb4e0f46c28a7830d421788/detourcrowd/src/main/java/org/recast4j/detour/crowd/PathCorridor.java#L311-L328
graphhopper/graphhopper
core/src/main/java/com/graphhopper/routing/Path.java
Path.processEdge
protected void processEdge(int edgeId, int adjNode, int prevEdgeId) { """ Calculates the distance and time of the specified edgeId. Also it adds the edgeId to the path list. @param prevEdgeId here the edge that comes before edgeId is necessary. I.e. for the reverse search we need the next edge. """ ...
java
protected void processEdge(int edgeId, int adjNode, int prevEdgeId) { EdgeIteratorState iter = graph.getEdgeIteratorState(edgeId, adjNode); distance += iter.getDistance(); time += weighting.calcMillis(iter, false, prevEdgeId); addEdge(edgeId); }
[ "protected", "void", "processEdge", "(", "int", "edgeId", ",", "int", "adjNode", ",", "int", "prevEdgeId", ")", "{", "EdgeIteratorState", "iter", "=", "graph", ".", "getEdgeIteratorState", "(", "edgeId", ",", "adjNode", ")", ";", "distance", "+=", "iter", "....
Calculates the distance and time of the specified edgeId. Also it adds the edgeId to the path list. @param prevEdgeId here the edge that comes before edgeId is necessary. I.e. for the reverse search we need the next edge.
[ "Calculates", "the", "distance", "and", "time", "of", "the", "specified", "edgeId", ".", "Also", "it", "adds", "the", "edgeId", "to", "the", "path", "list", "." ]
train
https://github.com/graphhopper/graphhopper/blob/c235e306e6e823043cadcc41ead0e685bdebf737/core/src/main/java/com/graphhopper/routing/Path.java#L240-L245
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/map/impl/MapContainer.java
MapContainer.hasPublisherWithMerkleTreeSync
private boolean hasPublisherWithMerkleTreeSync(Config config, String wanReplicationRefName) { """ Returns {@code true} if at least one of the WAN publishers has Merkle tree consistency check configured for the given WAN replication configuration @param config configuration @param wanReplicatio...
java
private boolean hasPublisherWithMerkleTreeSync(Config config, String wanReplicationRefName) { WanReplicationConfig replicationConfig = config.getWanReplicationConfig(wanReplicationRefName); if (replicationConfig != null) { for (WanPublisherConfig publisherConfig : replicationConfig.getWanPub...
[ "private", "boolean", "hasPublisherWithMerkleTreeSync", "(", "Config", "config", ",", "String", "wanReplicationRefName", ")", "{", "WanReplicationConfig", "replicationConfig", "=", "config", ".", "getWanReplicationConfig", "(", "wanReplicationRefName", ")", ";", "if", "("...
Returns {@code true} if at least one of the WAN publishers has Merkle tree consistency check configured for the given WAN replication configuration @param config configuration @param wanReplicationRefName The name of the WAN replication @return {@code true} if there is at least one publisher has Merkle ...
[ "Returns", "{", "@code", "true", "}", "if", "at", "least", "one", "of", "the", "WAN", "publishers", "has", "Merkle", "tree", "consistency", "check", "configured", "for", "the", "given", "WAN", "replication", "configuration" ]
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/map/impl/MapContainer.java#L283-L295
mgledi/DRUMS
src/main/java/com/unister/semweb/drums/bucket/hashfunction/util/RangeHashSorter.java
RangeHashSorter.quickSort
public void quickSort(int left, int right) { """ Quicksort for ranges. The bounds specify which part of the array is to be sorted.<br /> <br /> Algorithm of O( n*log(n) ) asymptotic upper bound. <br /> This version of quicksort also allows for bounds to be put in to specify what part of the array will be sorted...
java
public void quickSort(int left, int right) { if (left + 10 <= right) { int partitionIndex = partition(left, right); quickSort(left, partitionIndex - 1); quickSort(partitionIndex, right); } else { // Do an insertion sort on the subarray insertio...
[ "public", "void", "quickSort", "(", "int", "left", ",", "int", "right", ")", "{", "if", "(", "left", "+", "10", "<=", "right", ")", "{", "int", "partitionIndex", "=", "partition", "(", "left", ",", "right", ")", ";", "quickSort", "(", "left", ",", ...
Quicksort for ranges. The bounds specify which part of the array is to be sorted.<br /> <br /> Algorithm of O( n*log(n) ) asymptotic upper bound. <br /> This version of quicksort also allows for bounds to be put in to specify what part of the array will be sorted. <br /> The part of the array that lies between <b>left<...
[ "Quicksort", "for", "ranges", ".", "The", "bounds", "specify", "which", "part", "of", "the", "array", "is", "to", "be", "sorted", ".", "<br", "/", ">", "<br", "/", ">", "Algorithm", "of", "O", "(", "n", "*", "log", "(", "n", ")", ")", "asymptotic",...
train
https://github.com/mgledi/DRUMS/blob/a670f17a2186c9a15725f26617d77ce8e444e072/src/main/java/com/unister/semweb/drums/bucket/hashfunction/util/RangeHashSorter.java#L67-L76
mebigfatguy/fb-contrib
src/main/java/com/mebigfatguy/fbcontrib/detect/SpoiledChildInterfaceImplementor.java
SpoiledChildInterfaceImplementor.buildMethodSet
private static Set<QMethod> buildMethodSet(JavaClass cls) { """ builds a set of all non constructor or static initializer method/signatures @param cls the class to build the method set from @return a set of method names/signatures """ Set<QMethod> methods = new HashSet<>(); boolean isInte...
java
private static Set<QMethod> buildMethodSet(JavaClass cls) { Set<QMethod> methods = new HashSet<>(); boolean isInterface = cls.isInterface(); for (Method m : cls.getMethods()) { boolean isDefaultInterfaceMethod = isInterface && !m.isAbstract(); boolean isSyntheticForPar...
[ "private", "static", "Set", "<", "QMethod", ">", "buildMethodSet", "(", "JavaClass", "cls", ")", "{", "Set", "<", "QMethod", ">", "methods", "=", "new", "HashSet", "<>", "(", ")", ";", "boolean", "isInterface", "=", "cls", ".", "isInterface", "(", ")", ...
builds a set of all non constructor or static initializer method/signatures @param cls the class to build the method set from @return a set of method names/signatures
[ "builds", "a", "set", "of", "all", "non", "constructor", "or", "static", "initializer", "method", "/", "signatures" ]
train
https://github.com/mebigfatguy/fb-contrib/blob/3b5203196f627b399fbcea3c2ab2b1f4e56cc7b8/src/main/java/com/mebigfatguy/fbcontrib/detect/SpoiledChildInterfaceImplementor.java#L139-L169
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/gpx/model/GPXTablesFactory.java
GPXTablesFactory.createTrackSegmentsTable
public static PreparedStatement createTrackSegmentsTable(Connection connection, String trackSegementsTableName,boolean isH2) throws SQLException { """ Create the track segments table to store the segments of a track @param connection @param trackSegementsTableName @param isH2 set true if it's an H2 database ...
java
public static PreparedStatement createTrackSegmentsTable(Connection connection, String trackSegementsTableName,boolean isH2) throws SQLException { try (Statement stmt = connection.createStatement()) { StringBuilder sb = new StringBuilder("CREATE TABLE "); sb.append(trackSegementsTableNam...
[ "public", "static", "PreparedStatement", "createTrackSegmentsTable", "(", "Connection", "connection", ",", "String", "trackSegementsTableName", ",", "boolean", "isH2", ")", "throws", "SQLException", "{", "try", "(", "Statement", "stmt", "=", "connection", ".", "create...
Create the track segments table to store the segments of a track @param connection @param trackSegementsTableName @param isH2 set true if it's an H2 database @return @throws SQLException
[ "Create", "the", "track", "segments", "table", "to", "store", "the", "segments", "of", "a", "track" ]
train
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/gpx/model/GPXTablesFactory.java#L244-L266
finmath/finmath-lib
src/main/java6/net/finmath/montecarlo/interestrate/products/Caplet.java
Caplet.getValue
@Override public RandomVariableInterface getValue(double evaluationTime, LIBORModelMonteCarloSimulationInterface model) throws CalculationException { """ This method returns the value random variable of the product within the specified model, evaluated at a given evalutationTime. Note: For a lattice this is ofte...
java
@Override public RandomVariableInterface getValue(double evaluationTime, LIBORModelMonteCarloSimulationInterface model) throws CalculationException { // This is on the LIBOR discretization double paymentDate = maturity+periodLength; // Get random variables RandomVariableInterface libor = model.getLIBOR(ma...
[ "@", "Override", "public", "RandomVariableInterface", "getValue", "(", "double", "evaluationTime", ",", "LIBORModelMonteCarloSimulationInterface", "model", ")", "throws", "CalculationException", "{", "// This is on the LIBOR discretization", "double", "paymentDate", "=", "matur...
This method returns the value random variable of the product within the specified model, evaluated at a given evalutationTime. Note: For a lattice this is often the value conditional to evalutationTime, for a Monte-Carlo simulation this is the (sum of) value discounted to evaluation time. Cashflows prior evaluationTime...
[ "This", "method", "returns", "the", "value", "random", "variable", "of", "the", "product", "within", "the", "specified", "model", "evaluated", "at", "a", "given", "evalutationTime", ".", "Note", ":", "For", "a", "lattice", "this", "is", "often", "the", "valu...
train
https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java6/net/finmath/montecarlo/interestrate/products/Caplet.java#L114-L168
baidubce/bce-sdk-java
src/main/java/com/baidubce/services/lss/LssClient.java
LssClient.listPresets
public ListPresetsResponse listPresets() { """ List all your live presets. @return The list of all your live presets """ ListPresetsRequest request = new ListPresetsRequest(); InternalRequest internalRequest = createRequest(HttpMethodName.GET, request, LIVE_PRESET); return invokeHttp...
java
public ListPresetsResponse listPresets() { ListPresetsRequest request = new ListPresetsRequest(); InternalRequest internalRequest = createRequest(HttpMethodName.GET, request, LIVE_PRESET); return invokeHttpClient(internalRequest, ListPresetsResponse.class); }
[ "public", "ListPresetsResponse", "listPresets", "(", ")", "{", "ListPresetsRequest", "request", "=", "new", "ListPresetsRequest", "(", ")", ";", "InternalRequest", "internalRequest", "=", "createRequest", "(", "HttpMethodName", ".", "GET", ",", "request", ",", "LIVE...
List all your live presets. @return The list of all your live presets
[ "List", "all", "your", "live", "presets", "." ]
train
https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/lss/LssClient.java#L393-L397
google/error-prone-javac
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDocletWriter.java
HtmlDocletWriter.getTargetModulePackageLink
public Content getTargetModulePackageLink(PackageElement pkg, String target, Content label, ModuleElement mdle) { """ Get Module Package link, with target frame. @param pkg the PackageElement @param target name of the target frame @param label tag for the link @param mdle the module being documen...
java
public Content getTargetModulePackageLink(PackageElement pkg, String target, Content label, ModuleElement mdle) { return getHyperLink(pathString(pkg, DocPaths.PACKAGE_SUMMARY), label, "", target); }
[ "public", "Content", "getTargetModulePackageLink", "(", "PackageElement", "pkg", ",", "String", "target", ",", "Content", "label", ",", "ModuleElement", "mdle", ")", "{", "return", "getHyperLink", "(", "pathString", "(", "pkg", ",", "DocPaths", ".", "PACKAGE_SUMMA...
Get Module Package link, with target frame. @param pkg the PackageElement @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 packages link
[ "Get", "Module", "Package", "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#L372-L376
ops4j/org.ops4j.base
ops4j-base-util/src/main/java/org/ops4j/util/i18n/Resources.java
Resources.getDate
public Date getDate( String key, Date defaultValue ) throws MissingResourceException { """ Retrieve a date from bundle. @param key the key of resource @param defaultValue the default value if key is missing @return the resource date @throws MissingResourceException if the requested key i...
java
public Date getDate( String key, Date defaultValue ) throws MissingResourceException { try { return getDate( key ); } catch( MissingResourceException mre ) { return defaultValue; } }
[ "public", "Date", "getDate", "(", "String", "key", ",", "Date", "defaultValue", ")", "throws", "MissingResourceException", "{", "try", "{", "return", "getDate", "(", "key", ")", ";", "}", "catch", "(", "MissingResourceException", "mre", ")", "{", "return", "...
Retrieve a date from bundle. @param key the key of resource @param defaultValue the default value if key is missing @return the resource date @throws MissingResourceException if the requested key is unknown
[ "Retrieve", "a", "date", "from", "bundle", "." ]
train
https://github.com/ops4j/org.ops4j.base/blob/b0e742c0d9511f6b19ca64da2ebaf30b7a47256a/ops4j-base-util/src/main/java/org/ops4j/util/i18n/Resources.java#L527-L538
UrielCh/ovh-java-sdk
ovh-java-sdk-emailexchange/src/main/java/net/minidev/ovh/api/ApiOvhEmailexchange.java
ApiOvhEmailexchange.organizationName_service_exchangeService_device_identity_PUT
public void organizationName_service_exchangeService_device_identity_PUT(String organizationName, String exchangeService, String identity, OvhExchangeServiceDevice body) throws IOException { """ Alter this object properties REST: PUT /email/exchange/{organizationName}/service/{exchangeService}/device/{identity}...
java
public void organizationName_service_exchangeService_device_identity_PUT(String organizationName, String exchangeService, String identity, OvhExchangeServiceDevice body) throws IOException { String qPath = "/email/exchange/{organizationName}/service/{exchangeService}/device/{identity}"; StringBuilder sb = path(qPat...
[ "public", "void", "organizationName_service_exchangeService_device_identity_PUT", "(", "String", "organizationName", ",", "String", "exchangeService", ",", "String", "identity", ",", "OvhExchangeServiceDevice", "body", ")", "throws", "IOException", "{", "String", "qPath", "...
Alter this object properties REST: PUT /email/exchange/{organizationName}/service/{exchangeService}/device/{identity} @param body [required] New object properties @param organizationName [required] The internal name of your exchange organization @param exchangeService [required] The internal name of your exchange serv...
[ "Alter", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-emailexchange/src/main/java/net/minidev/ovh/api/ApiOvhEmailexchange.java#L2234-L2238
phax/ph-oton
ph-oton-html/src/main/java/com/helger/html/js/JSEventMap.java
JSEventMap.setHandler
public void setHandler (@Nonnull final EJSEvent eJSEvent, @Nonnull final IHasJSCode aNewHandler) { """ Set a handler for the given JS event. If an existing handler is present, it is automatically overridden. @param eJSEvent The JS event. May not be <code>null</code>. @param aNewHandler The new handler to be...
java
public void setHandler (@Nonnull final EJSEvent eJSEvent, @Nonnull final IHasJSCode aNewHandler) { ValueEnforcer.notNull (eJSEvent, "JSEvent"); ValueEnforcer.notNull (aNewHandler, "NewHandler"); // Set only the new handler and remove any existing handler m_aEvents.put (eJSEvent, new CollectingJSCodeP...
[ "public", "void", "setHandler", "(", "@", "Nonnull", "final", "EJSEvent", "eJSEvent", ",", "@", "Nonnull", "final", "IHasJSCode", "aNewHandler", ")", "{", "ValueEnforcer", ".", "notNull", "(", "eJSEvent", ",", "\"JSEvent\"", ")", ";", "ValueEnforcer", ".", "no...
Set a handler for the given JS event. If an existing handler is present, it is automatically overridden. @param eJSEvent The JS event. May not be <code>null</code>. @param aNewHandler The new handler to be added. May not be <code>null</code>.
[ "Set", "a", "handler", "for", "the", "given", "JS", "event", ".", "If", "an", "existing", "handler", "is", "present", "it", "is", "automatically", "overridden", "." ]
train
https://github.com/phax/ph-oton/blob/f3aaacbbc02a9f3e4f32fe8db8e4adf7b9c1d3ef/ph-oton-html/src/main/java/com/helger/html/js/JSEventMap.java#L99-L106
aws/aws-sdk-java
aws-java-sdk-core/src/main/java/com/amazonaws/auth/policy/internal/JsonPolicyWriter.java
JsonPolicyWriter.writeJsonKeyValue
private void writeJsonKeyValue(String fieldName, String value) throws JsonGenerationException, IOException { """ Writes the given field and the value to the JsonGenerator @param fieldName the JSON field name @param value value for the field """ generator.writeStringField(fieldName, va...
java
private void writeJsonKeyValue(String fieldName, String value) throws JsonGenerationException, IOException { generator.writeStringField(fieldName, value); }
[ "private", "void", "writeJsonKeyValue", "(", "String", "fieldName", ",", "String", "value", ")", "throws", "JsonGenerationException", ",", "IOException", "{", "generator", ".", "writeStringField", "(", "fieldName", ",", "value", ")", ";", "}" ]
Writes the given field and the value to the JsonGenerator @param fieldName the JSON field name @param value value for the field
[ "Writes", "the", "given", "field", "and", "the", "value", "to", "the", "JsonGenerator" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-core/src/main/java/com/amazonaws/auth/policy/internal/JsonPolicyWriter.java#L407-L410
aws/aws-sdk-java
aws-java-sdk-api-gateway/src/main/java/com/amazonaws/services/apigateway/model/UpdateUsageResult.java
UpdateUsageResult.setItems
public void setItems(java.util.Map<String, java.util.List<java.util.List<Long>>> items) { """ <p> The usage data, as daily logs of used and remaining quotas, over the specified time interval indexed over the API keys in a usage plan. For example, <code>{..., "values" : { "{api_key}" : [ [0, 100], [10, 90], [100...
java
public void setItems(java.util.Map<String, java.util.List<java.util.List<Long>>> items) { this.items = items; }
[ "public", "void", "setItems", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "java", ".", "util", ".", "List", "<", "java", ".", "util", ".", "List", "<", "Long", ">", ">", ">", "items", ")", "{", "this", ".", "items", "=", "items", ...
<p> The usage data, as daily logs of used and remaining quotas, over the specified time interval indexed over the API keys in a usage plan. For example, <code>{..., "values" : { "{api_key}" : [ [0, 100], [10, 90], [100, 10]]}</code>, where <code>{api_key}</code> stands for an API key value and the daily log entry is of...
[ "<p", ">", "The", "usage", "data", "as", "daily", "logs", "of", "used", "and", "remaining", "quotas", "over", "the", "specified", "time", "interval", "indexed", "over", "the", "API", "keys", "in", "a", "usage", "plan", ".", "For", "example", "<code", ">"...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-api-gateway/src/main/java/com/amazonaws/services/apigateway/model/UpdateUsageResult.java#L242-L244
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/io/mmcif/MMCIFFileTools.java
MMCIFFileTools.convertAtomToAtomSite
public static AtomSite convertAtomToAtomSite(Atom a, int model, String chainName, String chainId) { """ Converts an Atom object to an {@link AtomSite} object. @param a @param model the model number for the output AtomSites @param chainName the chain identifier (author id) for the output AtomSites @param chainI...
java
public static AtomSite convertAtomToAtomSite(Atom a, int model, String chainName, String chainId) { return convertAtomToAtomSite(a, model, chainName, chainId, a.getPDBserial()); }
[ "public", "static", "AtomSite", "convertAtomToAtomSite", "(", "Atom", "a", ",", "int", "model", ",", "String", "chainName", ",", "String", "chainId", ")", "{", "return", "convertAtomToAtomSite", "(", "a", ",", "model", ",", "chainName", ",", "chainId", ",", ...
Converts an Atom object to an {@link AtomSite} object. @param a @param model the model number for the output AtomSites @param chainName the chain identifier (author id) for the output AtomSites @param chainId the internal chain identifier (asym id) for the output AtomSites @return
[ "Converts", "an", "Atom", "object", "to", "an", "{" ]
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/io/mmcif/MMCIFFileTools.java#L343-L345
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.listMetricDefinitionsAsync
public Observable<MetricDefinitionInner> listMetricDefinitionsAsync(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 be...
java
public Observable<MetricDefinitionInner> listMetricDefinitionsAsync(String resourceGroupName, String name) { return listMetricDefinitionsWithServiceResponseAsync(resourceGroupName, name).map(new Func1<ServiceResponse<MetricDefinitionInner>, MetricDefinitionInner>() { @Override public Met...
[ "public", "Observable", "<", "MetricDefinitionInner", ">", "listMetricDefinitionsAsync", "(", "String", "resourceGroupName", ",", "String", "name", ")", "{", "return", "listMetricDefinitionsWithServiceResponseAsync", "(", "resourceGroupName", ",", "name", ")", ".", "map",...
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#L1730-L1737