repository_name
stringlengths
7
58
func_path_in_repository
stringlengths
18
194
func_name
stringlengths
6
111
whole_func_string
stringlengths
80
3.8k
language
stringclasses
1 value
func_code_string
stringlengths
80
3.8k
func_code_tokens
listlengths
20
697
func_documentation_string
stringlengths
61
2k
func_documentation_tokens
listlengths
1
434
split_name
stringclasses
1 value
func_code_url
stringlengths
111
308
openengsb/openengsb
components/util/src/main/java/org/openengsb/core/util/OsgiUtils.java
OsgiUtils.getFilterForLocation
public static Filter getFilterForLocation(Class<?> clazz, String location, String context) throws IllegalArgumentException { String filter = makeLocationFilterString(location, context); return FilterUtils.makeFilter(clazz, filter); }
java
public static Filter getFilterForLocation(Class<?> clazz, String location, String context) throws IllegalArgumentException { String filter = makeLocationFilterString(location, context); return FilterUtils.makeFilter(clazz, filter); }
[ "public", "static", "Filter", "getFilterForLocation", "(", "Class", "<", "?", ">", "clazz", ",", "String", "location", ",", "String", "context", ")", "throws", "IllegalArgumentException", "{", "String", "filter", "=", "makeLocationFilterString", "(", "location", "...
returns a filter that matches services with the given class and location in both the given context and the root-context @throws IllegalArgumentException if the location contains special characters that prevent the filter from compiling
[ "returns", "a", "filter", "that", "matches", "services", "with", "the", "given", "class", "and", "location", "in", "both", "the", "given", "context", "and", "the", "root", "-", "context" ]
train
https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/components/util/src/main/java/org/openengsb/core/util/OsgiUtils.java#L40-L44
Azure/azure-sdk-for-java
network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/AzureFirewallsInner.java
AzureFirewallsInner.getByResourceGroup
public AzureFirewallInner getByResourceGroup(String resourceGroupName, String azureFirewallName) { return getByResourceGroupWithServiceResponseAsync(resourceGroupName, azureFirewallName).toBlocking().single().body(); }
java
public AzureFirewallInner getByResourceGroup(String resourceGroupName, String azureFirewallName) { return getByResourceGroupWithServiceResponseAsync(resourceGroupName, azureFirewallName).toBlocking().single().body(); }
[ "public", "AzureFirewallInner", "getByResourceGroup", "(", "String", "resourceGroupName", ",", "String", "azureFirewallName", ")", "{", "return", "getByResourceGroupWithServiceResponseAsync", "(", "resourceGroupName", ",", "azureFirewallName", ")", ".", "toBlocking", "(", "...
Gets the specified Azure Firewall. @param resourceGroupName The name of the resource group. @param azureFirewallName The name of the Azure Firewall. @throws IllegalArgumentException thrown if parameters fail the validation @throws CloudException thrown if the request is rejected by server @throws RuntimeException all ...
[ "Gets", "the", "specified", "Azure", "Firewall", "." ]
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/AzureFirewallsInner.java#L266-L268
Azure/azure-sdk-for-java
automation/resource-manager/v2015_10_31/src/main/java/com/microsoft/azure/management/automation/v2015_10_31/implementation/DscNodesInner.java
DscNodesInner.updateAsync
public Observable<DscNodeInner> updateAsync(String resourceGroupName, String automationAccountName, String nodeId, DscNodeUpdateParameters parameters) { return updateWithServiceResponseAsync(resourceGroupName, automationAccountName, nodeId, parameters).map(new Func1<ServiceResponse<DscNodeInner>, DscNodeInner>(...
java
public Observable<DscNodeInner> updateAsync(String resourceGroupName, String automationAccountName, String nodeId, DscNodeUpdateParameters parameters) { return updateWithServiceResponseAsync(resourceGroupName, automationAccountName, nodeId, parameters).map(new Func1<ServiceResponse<DscNodeInner>, DscNodeInner>(...
[ "public", "Observable", "<", "DscNodeInner", ">", "updateAsync", "(", "String", "resourceGroupName", ",", "String", "automationAccountName", ",", "String", "nodeId", ",", "DscNodeUpdateParameters", "parameters", ")", "{", "return", "updateWithServiceResponseAsync", "(", ...
Update the dsc node. @param resourceGroupName Name of an Azure Resource group. @param automationAccountName The name of the automation account. @param nodeId Parameters supplied to the update dsc node. @param parameters Parameters supplied to the update dsc node. @throws IllegalArgumentException thrown if parameters f...
[ "Update", "the", "dsc", "node", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/automation/resource-manager/v2015_10_31/src/main/java/com/microsoft/azure/management/automation/v2015_10_31/implementation/DscNodesInner.java#L310-L317
albfernandez/itext2
src/main/java/com/lowagie/text/pdf/PdfAction.java
PdfAction.gotoEmbedded
public static PdfAction gotoEmbedded(String filename, PdfTargetDictionary target, String dest, boolean isName, boolean newWindow) { if (isName) return gotoEmbedded(filename, target, new PdfName(dest), newWindow); else return gotoEmbedded(filename, target, new PdfString(dest, null...
java
public static PdfAction gotoEmbedded(String filename, PdfTargetDictionary target, String dest, boolean isName, boolean newWindow) { if (isName) return gotoEmbedded(filename, target, new PdfName(dest), newWindow); else return gotoEmbedded(filename, target, new PdfString(dest, null...
[ "public", "static", "PdfAction", "gotoEmbedded", "(", "String", "filename", ",", "PdfTargetDictionary", "target", ",", "String", "dest", ",", "boolean", "isName", ",", "boolean", "newWindow", ")", "{", "if", "(", "isName", ")", "return", "gotoEmbedded", "(", "...
Creates a GoToE action to an embedded file. @param filename the root document of the target (null if the target is in the same document) @param dest the named destination @param isName if true sets the destination as a name, if false sets it as a String @return a GoToE action
[ "Creates", "a", "GoToE", "action", "to", "an", "embedded", "file", "." ]
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/pdf/PdfAction.java#L508-L513
jbossws/jbossws-common
src/main/java/org/jboss/ws/common/injection/finders/ReflectionUtils.java
ReflectionUtils.assertNotStatic
public static void assertNotStatic(final Field field, Class<? extends Annotation> annotation) { if (Modifier.isStatic(field.getModifiers())) { throw annotation == null ? MESSAGES.fieldCannotBeStaticOrFinal(field) : MESSAGES.fieldCannotBeStaticOrFinal2(field, annotation); } }
java
public static void assertNotStatic(final Field field, Class<? extends Annotation> annotation) { if (Modifier.isStatic(field.getModifiers())) { throw annotation == null ? MESSAGES.fieldCannotBeStaticOrFinal(field) : MESSAGES.fieldCannotBeStaticOrFinal2(field, annotation); } }
[ "public", "static", "void", "assertNotStatic", "(", "final", "Field", "field", ",", "Class", "<", "?", "extends", "Annotation", ">", "annotation", ")", "{", "if", "(", "Modifier", ".", "isStatic", "(", "field", ".", "getModifiers", "(", ")", ")", ")", "{...
Asserts field is not static. @param field to validate @param annotation annotation to propagate in exception message
[ "Asserts", "field", "is", "not", "static", "." ]
train
https://github.com/jbossws/jbossws-common/blob/fcff8a3ef9bfe046d6fa8c855a3fe4f62841add7/src/main/java/org/jboss/ws/common/injection/finders/ReflectionUtils.java#L229-L235
looly/hutool
hutool-core/src/main/java/cn/hutool/core/util/XmlUtil.java
XmlUtil.transform
public static void transform(Source source, Result result, String charset, int indent) { final TransformerFactory factory = TransformerFactory.newInstance(); try { final Transformer xformer = factory.newTransformer(); if (indent > 0) { xformer.setOutputProperty(OutputKeys.INDENT, "yes"); xformer...
java
public static void transform(Source source, Result result, String charset, int indent) { final TransformerFactory factory = TransformerFactory.newInstance(); try { final Transformer xformer = factory.newTransformer(); if (indent > 0) { xformer.setOutputProperty(OutputKeys.INDENT, "yes"); xformer...
[ "public", "static", "void", "transform", "(", "Source", "source", ",", "Result", "result", ",", "String", "charset", ",", "int", "indent", ")", "{", "final", "TransformerFactory", "factory", "=", "TransformerFactory", ".", "newInstance", "(", ")", ";", "try", ...
将XML文档写出<br> 格式化输出逻辑参考:https://stackoverflow.com/questions/139076/how-to-pretty-print-xml-from-java @param source 源 @param result 目标 @param charset 编码 @param indent 格式化输出中缩进量,小于1表示不格式化输出 @since 4.0.9
[ "将XML文档写出<br", ">", "格式化输出逻辑参考:https", ":", "//", "stackoverflow", ".", "com", "/", "questions", "/", "139076", "/", "how", "-", "to", "-", "pretty", "-", "print", "-", "xml", "-", "from", "-", "java" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/XmlUtil.java#L351-L366
h2oai/h2o-3
h2o-persist-s3/src/main/java/water/persist/PersistS3.java
PersistS3.getObjectForKey
private static S3Object getObjectForKey(Key k, long offset, long length) throws IOException { String[] bk = decodeKey(k); GetObjectRequest r = new GetObjectRequest(bk[0], bk[1]); r.setRange(offset, offset + length - 1); // Range is *inclusive* according to docs??? return getClient().getObject(r); }
java
private static S3Object getObjectForKey(Key k, long offset, long length) throws IOException { String[] bk = decodeKey(k); GetObjectRequest r = new GetObjectRequest(bk[0], bk[1]); r.setRange(offset, offset + length - 1); // Range is *inclusive* according to docs??? return getClient().getObject(r); }
[ "private", "static", "S3Object", "getObjectForKey", "(", "Key", "k", ",", "long", "offset", ",", "long", "length", ")", "throws", "IOException", "{", "String", "[", "]", "bk", "=", "decodeKey", "(", "k", ")", ";", "GetObjectRequest", "r", "=", "new", "Ge...
Gets the S3 object associated with the key that can read length bytes from offset
[ "Gets", "the", "S3", "object", "associated", "with", "the", "key", "that", "can", "read", "length", "bytes", "from", "offset" ]
train
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-persist-s3/src/main/java/water/persist/PersistS3.java#L336-L341
lessthanoptimal/ejml
main/ejml-core/src/org/ejml/ops/ComplexMath_F64.java
ComplexMath_F64.multiply
public static void multiply(Complex_F64 a, Complex_F64 b, Complex_F64 result) { result.real = a.real * b.real - a.imaginary*b.imaginary; result.imaginary = a.real*b.imaginary + a.imaginary*b.real; }
java
public static void multiply(Complex_F64 a, Complex_F64 b, Complex_F64 result) { result.real = a.real * b.real - a.imaginary*b.imaginary; result.imaginary = a.real*b.imaginary + a.imaginary*b.real; }
[ "public", "static", "void", "multiply", "(", "Complex_F64", "a", ",", "Complex_F64", "b", ",", "Complex_F64", "result", ")", "{", "result", ".", "real", "=", "a", ".", "real", "*", "b", ".", "real", "-", "a", ".", "imaginary", "*", "b", ".", "imagina...
<p> Multiplication: result = a * b </p> @param a Complex number. Not modified. @param b Complex number. Not modified. @param result Storage for output
[ "<p", ">", "Multiplication", ":", "result", "=", "a", "*", "b", "<", "/", "p", ">" ]
train
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-core/src/org/ejml/ops/ComplexMath_F64.java#L80-L83
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/deref/UnconditionalValueDerefAnalysis.java
UnconditionalValueDerefAnalysis.findValueKnownNonnullOnBranch
private @CheckForNull ValueNumber findValueKnownNonnullOnBranch(UnconditionalValueDerefSet fact, Edge edge) { IsNullValueFrame invFrame = invDataflow.getResultFact(edge.getSource()); if (!invFrame.isValid()) { return null; } IsNullConditionDecision decision = invFrame.ge...
java
private @CheckForNull ValueNumber findValueKnownNonnullOnBranch(UnconditionalValueDerefSet fact, Edge edge) { IsNullValueFrame invFrame = invDataflow.getResultFact(edge.getSource()); if (!invFrame.isValid()) { return null; } IsNullConditionDecision decision = invFrame.ge...
[ "private", "@", "CheckForNull", "ValueNumber", "findValueKnownNonnullOnBranch", "(", "UnconditionalValueDerefSet", "fact", ",", "Edge", "edge", ")", "{", "IsNullValueFrame", "invFrame", "=", "invDataflow", ".", "getResultFact", "(", "edge", ".", "getSource", "(", ")",...
Clear deref sets of values if this edge is the non-null branch of an if comparison. @param fact a datflow fact @param edge edge to check @return possibly-modified dataflow fact
[ "Clear", "deref", "sets", "of", "values", "if", "this", "edge", "is", "the", "non", "-", "null", "branch", "of", "an", "if", "comparison", "." ]
train
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/deref/UnconditionalValueDerefAnalysis.java#L909-L931
kuali/kc-s2sgen
coeus-s2sgen-impl/src/main/java/org/kuali/coeus/s2sgen/impl/generate/support/PHS398FellowshipSupplementalV1_2Generator.java
PHS398FellowshipSupplementalV1_2Generator.getInstitutionalBaseSalary
private void getInstitutionalBaseSalary(Budget budget, Map<Integer, String> budgetMap) { InstitutionalBaseSalary institutionalBaseSalary = InstitutionalBaseSalary.Factory.newInstance(); if (budgetMap.get(SENIOR_FELL) != null && budgetMap.get(SENIOR_FELL).equals(YnqConstant.YES.code())) { if ...
java
private void getInstitutionalBaseSalary(Budget budget, Map<Integer, String> budgetMap) { InstitutionalBaseSalary institutionalBaseSalary = InstitutionalBaseSalary.Factory.newInstance(); if (budgetMap.get(SENIOR_FELL) != null && budgetMap.get(SENIOR_FELL).equals(YnqConstant.YES.code())) { if ...
[ "private", "void", "getInstitutionalBaseSalary", "(", "Budget", "budget", ",", "Map", "<", "Integer", ",", "String", ">", "budgetMap", ")", "{", "InstitutionalBaseSalary", "institutionalBaseSalary", "=", "InstitutionalBaseSalary", ".", "Factory", ".", "newInstance", "...
/* This method is used to set data to InstitutionalBaseSalary XMLObject from budgetMap data for Budget
[ "/", "*", "This", "method", "is", "used", "to", "set", "data", "to", "InstitutionalBaseSalary", "XMLObject", "from", "budgetMap", "data", "for", "Budget" ]
train
https://github.com/kuali/kc-s2sgen/blob/2886380e1e3cb8bdd732ba99b2afa6ffc630bb37/coeus-s2sgen-impl/src/main/java/org/kuali/coeus/s2sgen/impl/generate/support/PHS398FellowshipSupplementalV1_2Generator.java#L600-L614
codeprimate-software/cp-elements
src/main/java/org/cp/elements/util/ArrayUtils.java
ArrayUtils.indexOf
@NullSafe public static <T> int indexOf(T[] array, T element) { for (int index = 0, length = nullSafeLength(array); index < length; index++) { if (equalsIgnoreNull(array[index], element)) { return index; } } return -1; }
java
@NullSafe public static <T> int indexOf(T[] array, T element) { for (int index = 0, length = nullSafeLength(array); index < length; index++) { if (equalsIgnoreNull(array[index], element)) { return index; } } return -1; }
[ "@", "NullSafe", "public", "static", "<", "T", ">", "int", "indexOf", "(", "T", "[", "]", "array", ",", "T", "element", ")", "{", "for", "(", "int", "index", "=", "0", ",", "length", "=", "nullSafeLength", "(", "array", ")", ";", "index", "<", "l...
Null-safe method to find the index of the given {@code element} in the given {@code array}. @param <T> {@link Class} type of elements in the array. @param array array used to search for {@code element}. @param element {@link Object} element to search for in the given {@code array}. @return the index of the given {@cod...
[ "Null", "-", "safe", "method", "to", "find", "the", "index", "of", "the", "given", "{", "@code", "element", "}", "in", "the", "given", "{", "@code", "array", "}", "." ]
train
https://github.com/codeprimate-software/cp-elements/blob/f2163c149fbbef05015e688132064ebcac7c49ab/src/main/java/org/cp/elements/util/ArrayUtils.java#L510-L520
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/user/UserCoreDao.java
UserCoreDao.buildColumnsAs
public String[] buildColumnsAs(String[] columns, String value) { String[] values = new String[columns.length]; for (int i = 0; i < columns.length; i++) { values[i] = value; } return buildColumnsAs(columns, values); }
java
public String[] buildColumnsAs(String[] columns, String value) { String[] values = new String[columns.length]; for (int i = 0; i < columns.length; i++) { values[i] = value; } return buildColumnsAs(columns, values); }
[ "public", "String", "[", "]", "buildColumnsAs", "(", "String", "[", "]", "columns", ",", "String", "value", ")", "{", "String", "[", "]", "values", "=", "new", "String", "[", "columns", ".", "length", "]", ";", "for", "(", "int", "i", "=", "0", ";"...
Build "columns as" values for the table columns with the specified columns as the specified value @param columns columns to include as value @param value "columns as" value for specified columns @return "columns as" values @since 2.0.0
[ "Build", "columns", "as", "values", "for", "the", "table", "columns", "with", "the", "specified", "columns", "as", "the", "specified", "value" ]
train
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/user/UserCoreDao.java#L1584-L1592
intuit/QuickBooks-V3-Java-SDK
ipp-v3-java-devkit/src/main/java/com/intuit/ipp/interceptors/CallbackHandlerInterceptor.java
CallbackHandlerInterceptor.getDownloadedFile
private InputStream getDownloadedFile(String response) throws FMSException { if (response != null) { try { URL url = new URL(response); return url.openStream(); } catch (Exception e) { throw new FMSException("Exception while downloading the file from URL.", e); } } return null; }
java
private InputStream getDownloadedFile(String response) throws FMSException { if (response != null) { try { URL url = new URL(response); return url.openStream(); } catch (Exception e) { throw new FMSException("Exception while downloading the file from URL.", e); } } return null; }
[ "private", "InputStream", "getDownloadedFile", "(", "String", "response", ")", "throws", "FMSException", "{", "if", "(", "response", "!=", "null", ")", "{", "try", "{", "URL", "url", "=", "new", "URL", "(", "response", ")", ";", "return", "url", ".", "op...
Method to get the input stream from the download URL returned from service @param response the download URL string @return InputStream the downloaded file @throws FMSException
[ "Method", "to", "get", "the", "input", "stream", "from", "the", "download", "URL", "returned", "from", "service" ]
train
https://github.com/intuit/QuickBooks-V3-Java-SDK/blob/59f988d0776d46620d0b34711c411b2b5b1da06b/ipp-v3-java-devkit/src/main/java/com/intuit/ipp/interceptors/CallbackHandlerInterceptor.java#L309-L320
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/spi/LobEngine.java
LobEngine.setClobValue
public void setClobValue(long locator, Clob data) throws PersistException, IOException { if (data == null) { deleteLob(locator); return; } if (locator == 0) { throw new IllegalArgumentException("Cannot use locator zero"); } if (data...
java
public void setClobValue(long locator, Clob data) throws PersistException, IOException { if (data == null) { deleteLob(locator); return; } if (locator == 0) { throw new IllegalArgumentException("Cannot use locator zero"); } if (data...
[ "public", "void", "setClobValue", "(", "long", "locator", ",", "Clob", "data", ")", "throws", "PersistException", ",", "IOException", "{", "if", "(", "data", "==", "null", ")", "{", "deleteLob", "(", "locator", ")", ";", "return", ";", "}", "if", "(", ...
Stores a value into a Clob, replacing anything that was there before. Passing null deletes the Clob, which is a convenience for auto-generated code that may call this method. @param locator lob locator as created by createNewClob @param data source of data for Clob, which may be null to delete @throws IllegalArgumentE...
[ "Stores", "a", "value", "into", "a", "Clob", "replacing", "anything", "that", "was", "there", "before", ".", "Passing", "null", "deletes", "the", "Clob", "which", "is", "a", "convenience", "for", "auto", "-", "generated", "code", "that", "may", "call", "th...
train
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/spi/LobEngine.java#L333-L356
amaembo/streamex
src/main/java/one/util/streamex/IntStreamEx.java
IntStreamEx.minByDouble
public OptionalInt minByDouble(IntToDoubleFunction keyExtractor) { return collect(PrimitiveBox::new, (box, i) -> { double key = keyExtractor.applyAsDouble(i); if (!box.b || Double.compare(box.d, key) > 0) { box.b = true; box.d = key; box.i ...
java
public OptionalInt minByDouble(IntToDoubleFunction keyExtractor) { return collect(PrimitiveBox::new, (box, i) -> { double key = keyExtractor.applyAsDouble(i); if (!box.b || Double.compare(box.d, key) > 0) { box.b = true; box.d = key; box.i ...
[ "public", "OptionalInt", "minByDouble", "(", "IntToDoubleFunction", "keyExtractor", ")", "{", "return", "collect", "(", "PrimitiveBox", "::", "new", ",", "(", "box", ",", "i", ")", "->", "{", "double", "key", "=", "keyExtractor", ".", "applyAsDouble", "(", "...
Returns the minimum element of this stream according to the provided key extractor function. <p> This is a terminal operation. @param keyExtractor a non-interfering, stateless function @return an {@code OptionalInt} describing some element of this stream for which the lowest value was returned by key extractor, or an...
[ "Returns", "the", "minimum", "element", "of", "this", "stream", "according", "to", "the", "provided", "key", "extractor", "function", "." ]
train
https://github.com/amaembo/streamex/blob/936bbd1b7dfbcf64a3b990682bfc848213441d14/src/main/java/one/util/streamex/IntStreamEx.java#L1061-L1070
tweea/matrixjavalib-main-web
src/main/java/net/matrix/web/html/HTMLs.java
HTMLs.fitToLength
public static String fitToLength(final String html, final int length) { if (html == null) { return StringUtils.repeat(SPACE, length); } int len = html.length(); if (len >= length) { return html; } StringBuilder sb = new StringBuilder(); sb.append(html); for (int i = 0; i < length - len; i++) { ...
java
public static String fitToLength(final String html, final int length) { if (html == null) { return StringUtils.repeat(SPACE, length); } int len = html.length(); if (len >= length) { return html; } StringBuilder sb = new StringBuilder(); sb.append(html); for (int i = 0; i < length - len; i++) { ...
[ "public", "static", "String", "fitToLength", "(", "final", "String", "html", ",", "final", "int", "length", ")", "{", "if", "(", "html", "==", "null", ")", "{", "return", "StringUtils", ".", "repeat", "(", "SPACE", ",", "length", ")", ";", "}", "int", ...
将 HTML 文本适配到指定长度。 @param html HTML 文本 @param length 目标长度 @return 适配结果
[ "将", "HTML", "文本适配到指定长度。" ]
train
https://github.com/tweea/matrixjavalib-main-web/blob/c3386e728e6f97ff3a3d2cd94769e82840b1266f/src/main/java/net/matrix/web/html/HTMLs.java#L33-L48
io7m/jaffirm
com.io7m.jaffirm.core/src/main/java/com/io7m/jaffirm/core/Postconditions.java
Postconditions.checkPostconditionsD
public static double checkPostconditionsD( final double value, final ContractDoubleConditionType... conditions) throws PostconditionViolationException { final Violations violations = innerCheckAllDouble(value, conditions); if (violations != null) { throw failed(null, Double.valueOf(value), v...
java
public static double checkPostconditionsD( final double value, final ContractDoubleConditionType... conditions) throws PostconditionViolationException { final Violations violations = innerCheckAllDouble(value, conditions); if (violations != null) { throw failed(null, Double.valueOf(value), v...
[ "public", "static", "double", "checkPostconditionsD", "(", "final", "double", "value", ",", "final", "ContractDoubleConditionType", "...", "conditions", ")", "throws", "PostconditionViolationException", "{", "final", "Violations", "violations", "=", "innerCheckAllDouble", ...
A {@code double} specialized version of {@link #checkPostconditions(Object, ContractConditionType[])} @param value The value @param conditions The conditions the value must obey @return value @throws PostconditionViolationException If any of the conditions are false
[ "A", "{", "@code", "double", "}", "specialized", "version", "of", "{", "@link", "#checkPostconditions", "(", "Object", "ContractConditionType", "[]", ")", "}" ]
train
https://github.com/io7m/jaffirm/blob/c97d246242d381e48832838737418cfe4cb57b4d/com.io7m.jaffirm.core/src/main/java/com/io7m/jaffirm/core/Postconditions.java#L146-L156
ow2-chameleon/fuchsia
bases/knx/calimero/src/main/java/tuwien/auto/calimero/dptxlator/TranslatorTypes.java
TranslatorTypes.createTranslator
public static DPTXlator createTranslator(int mainNumber, String dptID) throws KNXException { try { final int main = getMainNumber(mainNumber, dptID); final MainType type = (MainType) map.get(new Integer(main)); if (type != null) return type.createTranslator(dptID); } catch (final NumberFo...
java
public static DPTXlator createTranslator(int mainNumber, String dptID) throws KNXException { try { final int main = getMainNumber(mainNumber, dptID); final MainType type = (MainType) map.get(new Integer(main)); if (type != null) return type.createTranslator(dptID); } catch (final NumberFo...
[ "public", "static", "DPTXlator", "createTranslator", "(", "int", "mainNumber", ",", "String", "dptID", ")", "throws", "KNXException", "{", "try", "{", "final", "int", "main", "=", "getMainNumber", "(", "mainNumber", ",", "dptID", ")", ";", "final", "MainType",...
Creates a DPT translator for the given datapoint type ID. <p> The translation behavior of a DPT translator instance is uniquely defined by the supplied datapoint type ID. <p> If the <code>dptID</code> argument is built up the recommended way, that is "<i>main number</i>.<i>sub number</i>", the <code>mainNumber</code> a...
[ "Creates", "a", "DPT", "translator", "for", "the", "given", "datapoint", "type", "ID", ".", "<p", ">", "The", "translation", "behavior", "of", "a", "DPT", "translator", "instance", "is", "uniquely", "defined", "by", "the", "supplied", "datapoint", "type", "I...
train
https://github.com/ow2-chameleon/fuchsia/blob/4e9318eadbdeb945e529789f573b45386e619bed/bases/knx/calimero/src/main/java/tuwien/auto/calimero/dptxlator/TranslatorTypes.java#L460-L471
joelittlejohn/jsonschema2pojo
jsonschema2pojo-core/src/main/java/org/jsonschema2pojo/rules/PropertiesRule.java
PropertiesRule.apply
@Override public JDefinedClass apply(String nodeName, JsonNode node, JsonNode parent, JDefinedClass jclass, Schema schema) { if (node == null) { node = JsonNodeFactory.instance.objectNode(); } for (Iterator<String> properties = node.fieldNames(); properties.hasNext(); ) { ...
java
@Override public JDefinedClass apply(String nodeName, JsonNode node, JsonNode parent, JDefinedClass jclass, Schema schema) { if (node == null) { node = JsonNodeFactory.instance.objectNode(); } for (Iterator<String> properties = node.fieldNames(); properties.hasNext(); ) { ...
[ "@", "Override", "public", "JDefinedClass", "apply", "(", "String", "nodeName", ",", "JsonNode", "node", ",", "JsonNode", "parent", ",", "JDefinedClass", "jclass", ",", "Schema", "schema", ")", "{", "if", "(", "node", "==", "null", ")", "{", "node", "=", ...
Applies this schema rule to take the required code generation steps. <p> For each property present within the properties node, this rule will invoke the 'property' rule provided by the given schema mapper. @param nodeName the name of the node for which properties are being added @param node the properties node, contai...
[ "Applies", "this", "schema", "rule", "to", "take", "the", "required", "code", "generation", "steps", ".", "<p", ">", "For", "each", "property", "present", "within", "the", "properties", "node", "this", "rule", "will", "invoke", "the", "property", "rule", "pr...
train
https://github.com/joelittlejohn/jsonschema2pojo/blob/0552b80db93214eb186e4ae45b40866cc1e7eb84/jsonschema2pojo-core/src/main/java/org/jsonschema2pojo/rules/PropertiesRule.java#L61-L80
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/features/StyleCache.java
StyleCache.setFeatureStyle
public boolean setFeatureStyle(PolygonOptions polygonOptions, FeatureStyle featureStyle) { return StyleUtils.setFeatureStyle(polygonOptions, featureStyle, density); }
java
public boolean setFeatureStyle(PolygonOptions polygonOptions, FeatureStyle featureStyle) { return StyleUtils.setFeatureStyle(polygonOptions, featureStyle, density); }
[ "public", "boolean", "setFeatureStyle", "(", "PolygonOptions", "polygonOptions", ",", "FeatureStyle", "featureStyle", ")", "{", "return", "StyleUtils", ".", "setFeatureStyle", "(", "polygonOptions", ",", "featureStyle", ",", "density", ")", ";", "}" ]
Set the feature style into the polygon options @param polygonOptions polygon options @param featureStyle feature style @return true if style was set into the polygon options
[ "Set", "the", "feature", "style", "into", "the", "polygon", "options" ]
train
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/features/StyleCache.java#L313-L315
Alluxio/alluxio
core/server/common/src/main/java/alluxio/cli/validation/Utils.java
Utils.isMountingPoint
public static boolean isMountingPoint(String path, String[] fsTypes) throws IOException { List<UnixMountInfo> infoList = ShellUtils.getUnixMountInfo(); for (UnixMountInfo info : infoList) { Optional<String> mountPoint = info.getMountPoint(); Optional<String> fsType = info.getFsType(); if (moun...
java
public static boolean isMountingPoint(String path, String[] fsTypes) throws IOException { List<UnixMountInfo> infoList = ShellUtils.getUnixMountInfo(); for (UnixMountInfo info : infoList) { Optional<String> mountPoint = info.getMountPoint(); Optional<String> fsType = info.getFsType(); if (moun...
[ "public", "static", "boolean", "isMountingPoint", "(", "String", "path", ",", "String", "[", "]", "fsTypes", ")", "throws", "IOException", "{", "List", "<", "UnixMountInfo", ">", "infoList", "=", "ShellUtils", ".", "getUnixMountInfo", "(", ")", ";", "for", "...
Checks whether a path is the mounting point of a RAM disk volume. @param path a string represents the path to be checked @param fsTypes an array of strings represents expected file system type @return true if the path is the mounting point of volume with one of the given fsTypes, false otherwise @throws IOException i...
[ "Checks", "whether", "a", "path", "is", "the", "mounting", "point", "of", "a", "RAM", "disk", "volume", "." ]
train
https://github.com/Alluxio/alluxio/blob/af38cf3ab44613355b18217a3a4d961f8fec3a10/core/server/common/src/main/java/alluxio/cli/validation/Utils.java#L115-L129
aspectran/aspectran
core/src/main/java/com/aspectran/core/context/rule/ExceptionRule.java
ExceptionRule.getMatchedDepth
private int getMatchedDepth(String exceptionType, Throwable ex) { Throwable t = ex.getCause(); if (t != null) { return getMatchedDepth(exceptionType, t); } else { return getMatchedDepth(exceptionType, ex.getClass(), 0); } }
java
private int getMatchedDepth(String exceptionType, Throwable ex) { Throwable t = ex.getCause(); if (t != null) { return getMatchedDepth(exceptionType, t); } else { return getMatchedDepth(exceptionType, ex.getClass(), 0); } }
[ "private", "int", "getMatchedDepth", "(", "String", "exceptionType", ",", "Throwable", "ex", ")", "{", "Throwable", "t", "=", "ex", ".", "getCause", "(", ")", ";", "if", "(", "t", "!=", "null", ")", "{", "return", "getMatchedDepth", "(", "exceptionType", ...
Returns the matched depth. @param exceptionType the exception type @param ex the throwable exception @return the matched depth
[ "Returns", "the", "matched", "depth", "." ]
train
https://github.com/aspectran/aspectran/blob/2d758a2a28b71ee85b42823c12dc44674d7f2c70/core/src/main/java/com/aspectran/core/context/rule/ExceptionRule.java#L98-L105
raydac/java-comment-preprocessor
jcp/src/main/java/com/igormaznitsa/jcp/context/PreprocessorContext.java
PreprocessorContext.setSharedResource
public void setSharedResource(@Nonnull final String name, @Nonnull final Object obj) { assertNotNull("Name is null", name); assertNotNull("Object is null", obj); sharedResources.put(name, obj); }
java
public void setSharedResource(@Nonnull final String name, @Nonnull final Object obj) { assertNotNull("Name is null", name); assertNotNull("Object is null", obj); sharedResources.put(name, obj); }
[ "public", "void", "setSharedResource", "(", "@", "Nonnull", "final", "String", "name", ",", "@", "Nonnull", "final", "Object", "obj", ")", "{", "assertNotNull", "(", "\"Name is null\"", ",", "name", ")", ";", "assertNotNull", "(", "\"Object is null\"", ",", "o...
Set a shared source, it is an object saved into the inside map for a name @param name the name for the saved project, must not be null @param obj the object to be saved in, must not be null
[ "Set", "a", "shared", "source", "it", "is", "an", "object", "saved", "into", "the", "inside", "map", "for", "a", "name" ]
train
https://github.com/raydac/java-comment-preprocessor/blob/83ac87b575ac084914d77695a8c8673de3b8300c/jcp/src/main/java/com/igormaznitsa/jcp/context/PreprocessorContext.java#L332-L337
forge/core
projects/api/src/main/java/org/jboss/forge/addon/projects/ui/AbstractProjectCommand.java
AbstractProjectCommand.filterValueChoicesFromStack
protected <T extends ProjectFacet> boolean filterValueChoicesFromStack(Project project, UISelectOne<T> select) { boolean result = true; Optional<Stack> stackOptional = project.getStack(); // Filtering only supported facets if (stackOptional.isPresent()) { Stack stack = stackOpt...
java
protected <T extends ProjectFacet> boolean filterValueChoicesFromStack(Project project, UISelectOne<T> select) { boolean result = true; Optional<Stack> stackOptional = project.getStack(); // Filtering only supported facets if (stackOptional.isPresent()) { Stack stack = stackOpt...
[ "protected", "<", "T", "extends", "ProjectFacet", ">", "boolean", "filterValueChoicesFromStack", "(", "Project", "project", ",", "UISelectOne", "<", "T", ">", "select", ")", "{", "boolean", "result", "=", "true", ";", "Optional", "<", "Stack", ">", "stackOptio...
Filters the given value choices according the current enabled stack @param select the {@link SelectComponent} containing the value choices to be filtered @return <code>true</code> if it should be displayed in the UI
[ "Filters", "the", "given", "value", "choices", "according", "the", "current", "enabled", "stack" ]
train
https://github.com/forge/core/blob/e140eb03bbe2b3409478ad70c86c3edbef6d9a0c/projects/api/src/main/java/org/jboss/forge/addon/projects/ui/AbstractProjectCommand.java#L102-L129
JodaOrg/joda-time
src/main/java/org/joda/time/format/PeriodFormatterBuilder.java
PeriodFormatterBuilder.appendPrefix
private PeriodFormatterBuilder appendPrefix(PeriodFieldAffix prefix) { if (prefix == null) { throw new IllegalArgumentException(); } if (iPrefix != null) { prefix = new CompositeAffix(iPrefix, prefix); } iPrefix = prefix; return this; }
java
private PeriodFormatterBuilder appendPrefix(PeriodFieldAffix prefix) { if (prefix == null) { throw new IllegalArgumentException(); } if (iPrefix != null) { prefix = new CompositeAffix(iPrefix, prefix); } iPrefix = prefix; return this; }
[ "private", "PeriodFormatterBuilder", "appendPrefix", "(", "PeriodFieldAffix", "prefix", ")", "{", "if", "(", "prefix", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "if", "(", "iPrefix", "!=", "null", ")", "{", "pref...
Append a field prefix which applies only to the next appended field. If the field is not printed, neither is the prefix. @param prefix custom prefix @return this PeriodFormatterBuilder @see #appendSuffix
[ "Append", "a", "field", "prefix", "which", "applies", "only", "to", "the", "next", "appended", "field", ".", "If", "the", "field", "is", "not", "printed", "neither", "is", "the", "prefix", "." ]
train
https://github.com/JodaOrg/joda-time/blob/bd79f1c4245e79b3c2c56d7b04fde2a6e191fa42/src/main/java/org/joda/time/format/PeriodFormatterBuilder.java#L432-L441
geomajas/geomajas-project-client-gwt2
common-gwt/command/src/main/java/org/geomajas/gwt/client/util/Log.java
Log.logError
public static void logError(String message, Throwable t) { logError(message + SEP + getMessage(t)); }
java
public static void logError(String message, Throwable t) { logError(message + SEP + getMessage(t)); }
[ "public", "static", "void", "logError", "(", "String", "message", ",", "Throwable", "t", ")", "{", "logError", "(", "message", "+", "SEP", "+", "getMessage", "(", "t", ")", ")", ";", "}" ]
Error logging with cause. @param message message @param t cause
[ "Error", "logging", "with", "cause", "." ]
train
https://github.com/geomajas/geomajas-project-client-gwt2/blob/bd8d7904e861fa80522eed7b83c4ea99844180c7/common-gwt/command/src/main/java/org/geomajas/gwt/client/util/Log.java#L129-L131
recommenders/rival
rival-evaluate/src/main/java/net/recommenders/rival/evaluation/metric/ranking/PopularityStratifiedRecall.java
PopularityStratifiedRecall.getValueAt
@Override public double getValueAt(final U user, final int at) { if (userRecallAtCutoff.containsKey(at) && userRecallAtCutoff.get(at).containsKey(user)) { return userRecallAtCutoff.get(at).get(user) / userTotalRecall.get(user); } return Double.NaN; }
java
@Override public double getValueAt(final U user, final int at) { if (userRecallAtCutoff.containsKey(at) && userRecallAtCutoff.get(at).containsKey(user)) { return userRecallAtCutoff.get(at).get(user) / userTotalRecall.get(user); } return Double.NaN; }
[ "@", "Override", "public", "double", "getValueAt", "(", "final", "U", "user", ",", "final", "int", "at", ")", "{", "if", "(", "userRecallAtCutoff", ".", "containsKey", "(", "at", ")", "&&", "userRecallAtCutoff", ".", "get", "(", "at", ")", ".", "contains...
Method to return the recall value at a particular cutoff level for a given user. @param user the user @param at cutoff level @return the recall corresponding to the requested user at the cutoff level
[ "Method", "to", "return", "the", "recall", "value", "at", "a", "particular", "cutoff", "level", "for", "a", "given", "user", "." ]
train
https://github.com/recommenders/rival/blob/6ee8223e91810ae1c6052899595af3906e0c34c6/rival-evaluate/src/main/java/net/recommenders/rival/evaluation/metric/ranking/PopularityStratifiedRecall.java#L224-L230
knowm/Yank
src/main/java/org/knowm/yank/Yank.java
Yank.queryColumn
public static <T> List<T> queryColumn( String sql, String columnName, Class<T> columnType, Object[] params) throws YankSQLException { return queryColumn(YankPoolManager.DEFAULT_POOL_NAME, sql, columnName, columnType, params); }
java
public static <T> List<T> queryColumn( String sql, String columnName, Class<T> columnType, Object[] params) throws YankSQLException { return queryColumn(YankPoolManager.DEFAULT_POOL_NAME, sql, columnName, columnType, params); }
[ "public", "static", "<", "T", ">", "List", "<", "T", ">", "queryColumn", "(", "String", "sql", ",", "String", "columnName", ",", "Class", "<", "T", ">", "columnType", ",", "Object", "[", "]", "params", ")", "throws", "YankSQLException", "{", "return", ...
Return a List of Objects from a single table column given an SQL statement using the default connection pool. @param <T> @param sql The SQL statement @param params The replacement parameters @param columnType The Class of the desired return Objects matching the table @return The Column as a List
[ "Return", "a", "List", "of", "Objects", "from", "a", "single", "table", "column", "given", "an", "SQL", "statement", "using", "the", "default", "connection", "pool", "." ]
train
https://github.com/knowm/Yank/blob/b2071dcd94da99db6904355f9557456b8b292a6b/src/main/java/org/knowm/yank/Yank.java#L565-L569
deeplearning4j/deeplearning4j
deeplearning4j/deeplearning4j-nearestneighbors-parent/nearestneighbor-core/src/main/java/org/deeplearning4j/clustering/randomprojection/RPUtils.java
RPUtils.scanForLeaves
public static void scanForLeaves(List<RPNode> nodes,RPTree scan) { scanForLeaves(nodes,scan.getRoot()); }
java
public static void scanForLeaves(List<RPNode> nodes,RPTree scan) { scanForLeaves(nodes,scan.getRoot()); }
[ "public", "static", "void", "scanForLeaves", "(", "List", "<", "RPNode", ">", "nodes", ",", "RPTree", "scan", ")", "{", "scanForLeaves", "(", "nodes", ",", "scan", ".", "getRoot", "(", ")", ")", ";", "}" ]
Scan for leaves accumulating the nodes in the passed in list @param nodes the nodes so far @param scan the tree to scan
[ "Scan", "for", "leaves", "accumulating", "the", "nodes", "in", "the", "passed", "in", "list" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-nearestneighbors-parent/nearestneighbor-core/src/main/java/org/deeplearning4j/clustering/randomprojection/RPUtils.java#L451-L453
pravega/pravega
segmentstore/server/src/main/java/io/pravega/segmentstore/server/logs/OperationMetadataUpdater.java
OperationMetadataUpdater.fromMetadata
private <T> T fromMetadata(Function<ContainerMetadata, T> getter) { ContainerMetadataUpdateTransaction txn = getActiveTransaction(); return getter.apply(txn == null ? this.metadata : txn); }
java
private <T> T fromMetadata(Function<ContainerMetadata, T> getter) { ContainerMetadataUpdateTransaction txn = getActiveTransaction(); return getter.apply(txn == null ? this.metadata : txn); }
[ "private", "<", "T", ">", "T", "fromMetadata", "(", "Function", "<", "ContainerMetadata", ",", "T", ">", "getter", ")", "{", "ContainerMetadataUpdateTransaction", "txn", "=", "getActiveTransaction", "(", ")", ";", "return", "getter", ".", "apply", "(", "txn", ...
Returns the result of the given function applied either to the current UpdateTransaction (if any), or the base metadata, if no UpdateTransaction exists. @param getter The Function to apply. @param <T> Result type. @return The result of the given Function.
[ "Returns", "the", "result", "of", "the", "given", "function", "applied", "either", "to", "the", "current", "UpdateTransaction", "(", "if", "any", ")", "or", "the", "base", "metadata", "if", "no", "UpdateTransaction", "exists", "." ]
train
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/segmentstore/server/src/main/java/io/pravega/segmentstore/server/logs/OperationMetadataUpdater.java#L251-L254
xvik/generics-resolver
src/main/java/ru/vyarus/java/generics/resolver/util/TypeToStringUtils.java
TypeToStringUtils.toStringConstructor
public static String toStringConstructor(final Constructor constructor, final Map<String, Type> generics) { return String.format("%s(%s)", constructor.getDeclaringClass().getSimpleName(), toStringTypes(constructor.getGenericParameterTypes(), generics)); }
java
public static String toStringConstructor(final Constructor constructor, final Map<String, Type> generics) { return String.format("%s(%s)", constructor.getDeclaringClass().getSimpleName(), toStringTypes(constructor.getGenericParameterTypes(), generics)); }
[ "public", "static", "String", "toStringConstructor", "(", "final", "Constructor", "constructor", ",", "final", "Map", "<", "String", ",", "Type", ">", "generics", ")", "{", "return", "String", ".", "format", "(", "\"%s(%s)\"", ",", "constructor", ".", "getDecl...
<pre>{@code class B extends A<Long> {} class A<T> { A(T arg); } Constructor method = A.class.getConstructor(Object.class); Map<String, Type> generics = (context of B).method().visibleGenericsMap(); TypeToStringUtils.toStringConstructor(constructor, generics) == "A(Long)" }</pre>. @param constructor constructor @param...
[ "<pre", ">", "{", "@code", "class", "B", "extends", "A<Long", ">", "{}", "class", "A<T", ">", "{", "A", "(", "T", "arg", ")", ";", "}" ]
train
https://github.com/xvik/generics-resolver/blob/d7d9d2783265df1178230e8f0b7cb6d853b67a7b/src/main/java/ru/vyarus/java/generics/resolver/util/TypeToStringUtils.java#L214-L218
lucmoreau/ProvToolbox
prov-model/src/main/java/org/openprovenance/prov/model/ProvFactory.java
ProvFactory.newWasInvalidatedBy
public WasInvalidatedBy newWasInvalidatedBy(QualifiedName id, QualifiedName entity, QualifiedName activity) { WasInvalidatedBy res = of.createWasInvalidatedBy(); res.setId(id); res.setEntity(entity); res.setActivity(activity); return res; }
java
public WasInvalidatedBy newWasInvalidatedBy(QualifiedName id, QualifiedName entity, QualifiedName activity) { WasInvalidatedBy res = of.createWasInvalidatedBy(); res.setId(id); res.setEntity(entity); res.setActivity(activity); return res; }
[ "public", "WasInvalidatedBy", "newWasInvalidatedBy", "(", "QualifiedName", "id", ",", "QualifiedName", "entity", ",", "QualifiedName", "activity", ")", "{", "WasInvalidatedBy", "res", "=", "of", ".", "createWasInvalidatedBy", "(", ")", ";", "res", ".", "setId", "(...
A factory method to create an instance of an invalidation {@link WasInvalidatedBy} @param id an optional identifier for a usage @param entity an identifier for the created <a href="http://www.w3.org/TR/prov-dm/#invalidation.entity">entity</a> @param activity an optional identifier for the <a href="http://www.w3.org/TR...
[ "A", "factory", "method", "to", "create", "an", "instance", "of", "an", "invalidation", "{" ]
train
https://github.com/lucmoreau/ProvToolbox/blob/f865952868ffb69432937b08728c86bebbe4678a/prov-model/src/main/java/org/openprovenance/prov/model/ProvFactory.java#L1459-L1465
vdmeer/asciitable
src/main/java/de/vandermeer/asciitable/CWC_LongestLine.java
CWC_LongestLine.add
public CWC_LongestLine add(final int minWidth, final int maxWidth) { this.minWidths = ArrayUtils.add(this.minWidths, minWidth); this.maxWidths = ArrayUtils.add(this.maxWidths, maxWidth); return this; }
java
public CWC_LongestLine add(final int minWidth, final int maxWidth) { this.minWidths = ArrayUtils.add(this.minWidths, minWidth); this.maxWidths = ArrayUtils.add(this.maxWidths, maxWidth); return this; }
[ "public", "CWC_LongestLine", "add", "(", "final", "int", "minWidth", ",", "final", "int", "maxWidth", ")", "{", "this", ".", "minWidths", "=", "ArrayUtils", ".", "add", "(", "this", ".", "minWidths", ",", "minWidth", ")", ";", "this", ".", "maxWidths", "...
Creates a new width object. @param minWidth minimum column width as number of characters @param maxWidth maximum column width as number of characters @return self to allow for chaining
[ "Creates", "a", "new", "width", "object", "." ]
train
https://github.com/vdmeer/asciitable/blob/b6a73710271c89f9c749603be856ba84a969ed5f/src/main/java/de/vandermeer/asciitable/CWC_LongestLine.java#L51-L55
UrielCh/ovh-java-sdk
ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java
ApiOvhTelephony.billingAccount_rsva_serviceName_allowedRateCodes_GET
public ArrayList<OvhRateCodeInformation> billingAccount_rsva_serviceName_allowedRateCodes_GET(String billingAccount, String serviceName) throws IOException { String qPath = "/telephony/{billingAccount}/rsva/{serviceName}/allowedRateCodes"; StringBuilder sb = path(qPath, billingAccount, serviceName); String resp =...
java
public ArrayList<OvhRateCodeInformation> billingAccount_rsva_serviceName_allowedRateCodes_GET(String billingAccount, String serviceName) throws IOException { String qPath = "/telephony/{billingAccount}/rsva/{serviceName}/allowedRateCodes"; StringBuilder sb = path(qPath, billingAccount, serviceName); String resp =...
[ "public", "ArrayList", "<", "OvhRateCodeInformation", ">", "billingAccount_rsva_serviceName_allowedRateCodes_GET", "(", "String", "billingAccount", ",", "String", "serviceName", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/telephony/{billingAccount}/rsva/{serv...
Compatible rate codes related to this value added service REST: GET /telephony/{billingAccount}/rsva/{serviceName}/allowedRateCodes @param billingAccount [required] The name of your billingAccount @param serviceName [required]
[ "Compatible", "rate", "codes", "related", "to", "this", "value", "added", "service" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java#L6008-L6013
crawljax/crawljax
core/src/main/java/com/crawljax/condition/eventablecondition/EventableConditionChecker.java
EventableConditionChecker.checkXpathStartsWithXpathEventableCondition
public boolean checkXpathStartsWithXpathEventableCondition(Document dom, EventableCondition eventableCondition, String xpath) throws XPathExpressionException { if (eventableCondition == null || Strings .isNullOrEmpty(eventableCondition.getInXPath())) { throw new CrawljaxException("Eventable has no XPath con...
java
public boolean checkXpathStartsWithXpathEventableCondition(Document dom, EventableCondition eventableCondition, String xpath) throws XPathExpressionException { if (eventableCondition == null || Strings .isNullOrEmpty(eventableCondition.getInXPath())) { throw new CrawljaxException("Eventable has no XPath con...
[ "public", "boolean", "checkXpathStartsWithXpathEventableCondition", "(", "Document", "dom", ",", "EventableCondition", "eventableCondition", ",", "String", "xpath", ")", "throws", "XPathExpressionException", "{", "if", "(", "eventableCondition", "==", "null", "||", "Strin...
Checks whether an XPath expression starts with an XPath eventable condition. @param dom The DOM String. @param eventableCondition The eventable condition. @param xpath The XPath. @return boolean whether xpath starts with xpath location of eventable condition xpath condition @throws XPathExp...
[ "Checks", "whether", "an", "XPath", "expression", "starts", "with", "an", "XPath", "eventable", "condition", "." ]
train
https://github.com/crawljax/crawljax/blob/d339f4f622ca902ccd35322065821e52a62ec543/core/src/main/java/com/crawljax/condition/eventablecondition/EventableConditionChecker.java#L66-L76
nguillaumin/slick2d-maven
slick2d-core/src/main/java/org/newdawn/slick/Color.java
Color.scaleCopy
public Color scaleCopy(float value) { Color copy = new Color(r,g,b,a); copy.r *= value; copy.g *= value; copy.b *= value; copy.a *= value; return copy; }
java
public Color scaleCopy(float value) { Color copy = new Color(r,g,b,a); copy.r *= value; copy.g *= value; copy.b *= value; copy.a *= value; return copy; }
[ "public", "Color", "scaleCopy", "(", "float", "value", ")", "{", "Color", "copy", "=", "new", "Color", "(", "r", ",", "g", ",", "b", ",", "a", ")", ";", "copy", ".", "r", "*=", "value", ";", "copy", ".", "g", "*=", "value", ";", "copy", ".", ...
Scale the components of the colour by the given value @param value The value to scale by @return The copy which has been scaled
[ "Scale", "the", "components", "of", "the", "colour", "by", "the", "given", "value" ]
train
https://github.com/nguillaumin/slick2d-maven/blob/8251f88a0ed6a70e726d2468842455cd1f80893f/slick2d-core/src/main/java/org/newdawn/slick/Color.java#L383-L391
line/armeria
core/src/main/java/com/linecorp/armeria/server/file/HttpFileServiceBuilder.java
HttpFileServiceBuilder.cacheControl
public HttpFileServiceBuilder cacheControl(CharSequence cacheControl) { requireNonNull(cacheControl, "cacheControl"); return setHeader(HttpHeaderNames.CACHE_CONTROL, cacheControl); }
java
public HttpFileServiceBuilder cacheControl(CharSequence cacheControl) { requireNonNull(cacheControl, "cacheControl"); return setHeader(HttpHeaderNames.CACHE_CONTROL, cacheControl); }
[ "public", "HttpFileServiceBuilder", "cacheControl", "(", "CharSequence", "cacheControl", ")", "{", "requireNonNull", "(", "cacheControl", ",", "\"cacheControl\"", ")", ";", "return", "setHeader", "(", "HttpHeaderNames", ".", "CACHE_CONTROL", ",", "cacheControl", ")", ...
Sets the {@code "cache-control"} header. This method is a shortcut of: <pre>{@code builder.setHeader(HttpHeaderNames.CACHE_CONTROL, cacheControl); }</pre>
[ "Sets", "the", "{" ]
train
https://github.com/line/armeria/blob/67d29e019fd35a35f89c45cc8f9119ff9b12b44d/core/src/main/java/com/linecorp/armeria/server/file/HttpFileServiceBuilder.java#L217-L220
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/instance/NodeExtensionFactory.java
NodeExtensionFactory.create
public static NodeExtension create(Node node, List<String> extensionPriorityList) { try { ClassLoader classLoader = node.getConfigClassLoader(); Class<NodeExtension> chosenExtension = null; int chosenPriority = Integer.MAX_VALUE; for (Iterator<Class<NodeExtension>...
java
public static NodeExtension create(Node node, List<String> extensionPriorityList) { try { ClassLoader classLoader = node.getConfigClassLoader(); Class<NodeExtension> chosenExtension = null; int chosenPriority = Integer.MAX_VALUE; for (Iterator<Class<NodeExtension>...
[ "public", "static", "NodeExtension", "create", "(", "Node", "node", ",", "List", "<", "String", ">", "extensionPriorityList", ")", "{", "try", "{", "ClassLoader", "classLoader", "=", "node", ".", "getConfigClassLoader", "(", ")", ";", "Class", "<", "NodeExtens...
Uses the Hazelcast ServiceLoader to discover all registered {@link NodeExtension} classes and identify the one to instantiate and use as the provided {@code node}'s extension. It chooses the class based on the provided priority list of class names, these are the rules: <ol><li> A class's priority is its zero-based inde...
[ "Uses", "the", "Hazelcast", "ServiceLoader", "to", "discover", "all", "registered", "{", "@link", "NodeExtension", "}", "classes", "and", "identify", "the", "one", "to", "instantiate", "and", "use", "as", "the", "provided", "{", "@code", "node", "}", "s", "e...
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/instance/NodeExtensionFactory.java#L65-L93
susom/database
src/main/java/com/github/susom/database/DatabaseProviderVertx.java
DatabaseProviderVertx.fromPool
@CheckReturnValue public static Builder fromPool(Vertx vertx, Pool pool) { WorkerExecutor executor = vertx.createSharedWorkerExecutor("DbWorker-" + poolNameCounter.getAndAdd(1), pool.size); return new BuilderImpl(executor, () -> { try { executor.close(); } catch (Exception e) { log...
java
@CheckReturnValue public static Builder fromPool(Vertx vertx, Pool pool) { WorkerExecutor executor = vertx.createSharedWorkerExecutor("DbWorker-" + poolNameCounter.getAndAdd(1), pool.size); return new BuilderImpl(executor, () -> { try { executor.close(); } catch (Exception e) { log...
[ "@", "CheckReturnValue", "public", "static", "Builder", "fromPool", "(", "Vertx", "vertx", ",", "Pool", "pool", ")", "{", "WorkerExecutor", "executor", "=", "vertx", ".", "createSharedWorkerExecutor", "(", "\"DbWorker-\"", "+", "poolNameCounter", ".", "getAndAdd", ...
Use an externally configured DataSource, Flavor, and optionally a shutdown hook. The shutdown hook may be null if you don't want calls to Builder.close() to attempt any shutdown. The DataSource and Flavor are mandatory.
[ "Use", "an", "externally", "configured", "DataSource", "Flavor", "and", "optionally", "a", "shutdown", "hook", ".", "The", "shutdown", "hook", "may", "be", "null", "if", "you", "don", "t", "want", "calls", "to", "Builder", ".", "close", "()", "to", "attemp...
train
https://github.com/susom/database/blob/25add9e08ad863712f9b5e319b6cb826f6f97640/src/main/java/com/github/susom/database/DatabaseProviderVertx.java#L111-L130
square/dagger
compiler/src/main/java/dagger/internal/codegen/Util.java
Util.typeToString
public static void typeToString(final TypeMirror type, final StringBuilder result, final char innerClassSeparator) { type.accept(new SimpleTypeVisitor6<Void, Void>() { @Override public Void visitDeclared(DeclaredType declaredType, Void v) { TypeElement typeElement = (TypeElement) declaredType.as...
java
public static void typeToString(final TypeMirror type, final StringBuilder result, final char innerClassSeparator) { type.accept(new SimpleTypeVisitor6<Void, Void>() { @Override public Void visitDeclared(DeclaredType declaredType, Void v) { TypeElement typeElement = (TypeElement) declaredType.as...
[ "public", "static", "void", "typeToString", "(", "final", "TypeMirror", "type", ",", "final", "StringBuilder", "result", ",", "final", "char", "innerClassSeparator", ")", "{", "type", ".", "accept", "(", "new", "SimpleTypeVisitor6", "<", "Void", ",", "Void", "...
Appends a string for {@code type} to {@code result}. Primitive types are always boxed. @param innerClassSeparator either '.' or '$', which will appear in a class name like "java.lang.Map.Entry" or "java.lang.Map$Entry". Use '.' for references to existing types in code. Use '$' to define new class names and for strings...
[ "Appends", "a", "string", "for", "{", "@code", "type", "}", "to", "{", "@code", "result", "}", ".", "Primitive", "types", "are", "always", "boxed", "." ]
train
https://github.com/square/dagger/blob/572cdd2fe97fc3c148fb3d8e1b2ce7beb4dcbcde/compiler/src/main/java/dagger/internal/codegen/Util.java#L123-L179
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/util/Text.java
Text.getRelativeParent
public static String getRelativeParent(String path, int level) { int idx = path.length(); while (level > 0) { idx = path.lastIndexOf('/', idx - 1); if (idx < 0) { return ""; } level--; } return (idx == 0) ? "/" : path.substring(0,...
java
public static String getRelativeParent(String path, int level) { int idx = path.length(); while (level > 0) { idx = path.lastIndexOf('/', idx - 1); if (idx < 0) { return ""; } level--; } return (idx == 0) ? "/" : path.substring(0,...
[ "public", "static", "String", "getRelativeParent", "(", "String", "path", ",", "int", "level", ")", "{", "int", "idx", "=", "path", ".", "length", "(", ")", ";", "while", "(", "level", ">", "0", ")", "{", "idx", "=", "path", ".", "lastIndexOf", "(", ...
Returns the n<sup>th</sup> relative parent of the path, where n=level. <p> Example:<br> <code> Text.getRelativeParent("/foo/bar/test", 1) == "/foo/bar" </code> @param path the path of the page @param level the level of the parent @return String relative parent
[ "Returns", "the", "n<sup", ">", "th<", "/", "sup", ">", "relative", "parent", "of", "the", "path", "where", "n", "=", "level", ".", "<p", ">", "Example", ":", "<br", ">", "<code", ">", "Text", ".", "getRelativeParent", "(", "/", "foo", "/", "bar", ...
train
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/util/Text.java#L760-L773
iovation/launchkey-java
sdk/src/main/java/com/iovation/launchkey/sdk/crypto/JCECrypto.java
JCECrypto.getRSAPrivateKeyFromPEM
public static RSAPrivateKey getRSAPrivateKeyFromPEM(Provider provider, String pem) { try { KeyFactory keyFactory = KeyFactory.getInstance("RSA", provider); return (RSAPrivateKey) keyFactory.generatePrivate(new PKCS8EncodedKeySpec(getKeyBytesFromPEM(pem))); } catch (NoSuchAlgorith...
java
public static RSAPrivateKey getRSAPrivateKeyFromPEM(Provider provider, String pem) { try { KeyFactory keyFactory = KeyFactory.getInstance("RSA", provider); return (RSAPrivateKey) keyFactory.generatePrivate(new PKCS8EncodedKeySpec(getKeyBytesFromPEM(pem))); } catch (NoSuchAlgorith...
[ "public", "static", "RSAPrivateKey", "getRSAPrivateKeyFromPEM", "(", "Provider", "provider", ",", "String", "pem", ")", "{", "try", "{", "KeyFactory", "keyFactory", "=", "KeyFactory", ".", "getInstance", "(", "\"RSA\"", ",", "provider", ")", ";", "return", "(", ...
Get an RSA private key utilizing the provided provider and PEM formatted string @param provider Provider to generate the key @param pem PEM formatted key string @return RSA private key
[ "Get", "an", "RSA", "private", "key", "utilizing", "the", "provided", "provider", "and", "PEM", "formatted", "string" ]
train
https://github.com/iovation/launchkey-java/blob/ceecc70b9b04af07ddc14c57d4bcc933a4e0379c/sdk/src/main/java/com/iovation/launchkey/sdk/crypto/JCECrypto.java#L96-L105
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/util/FileUtils.java
FileUtils.copyFileToDirectory
public static void copyFileToDirectory(File srcFile, File destDir, boolean preserveFileDate) throws IOException { if (destDir == null) { throw new IllegalArgumentException("Destination must not be null"); } if (destDir.exists() && destDir.isDirectory() == false) { throw new IllegalArgumentException("Destina...
java
public static void copyFileToDirectory(File srcFile, File destDir, boolean preserveFileDate) throws IOException { if (destDir == null) { throw new IllegalArgumentException("Destination must not be null"); } if (destDir.exists() && destDir.isDirectory() == false) { throw new IllegalArgumentException("Destina...
[ "public", "static", "void", "copyFileToDirectory", "(", "File", "srcFile", ",", "File", "destDir", ",", "boolean", "preserveFileDate", ")", "throws", "IOException", "{", "if", "(", "destDir", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(...
Copies a file to a directory optionally preserving the file date. <p> This method copies the contents of the specified source file to a file of the same name in the specified destination directory. The destination directory is created if it does not exist. If the destination file exists, then this method will overwrite...
[ "Copies", "a", "file", "to", "a", "directory", "optionally", "preserving", "the", "file", "date", ".", "<p", ">", "This", "method", "copies", "the", "contents", "of", "the", "specified", "source", "file", "to", "a", "file", "of", "the", "same", "name", "...
train
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/util/FileUtils.java#L130-L138
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/stats/Counters.java
Counters.addInPlace
public static <E> void addInPlace(Counter<E> target, Collection<E> arg) { for (E key : arg) { target.incrementCount(key, 1); } }
java
public static <E> void addInPlace(Counter<E> target, Collection<E> arg) { for (E key : arg) { target.incrementCount(key, 1); } }
[ "public", "static", "<", "E", ">", "void", "addInPlace", "(", "Counter", "<", "E", ">", "target", ",", "Collection", "<", "E", ">", "arg", ")", "{", "for", "(", "E", "key", ":", "arg", ")", "{", "target", ".", "incrementCount", "(", "key", ",", "...
Sets each value of target to be target[k]+ num-of-times-it-occurs-in-collection if the key is present in the arg collection.
[ "Sets", "each", "value", "of", "target", "to", "be", "target", "[", "k", "]", "+", "num", "-", "of", "-", "times", "-", "it", "-", "occurs", "-", "in", "-", "collection", "if", "the", "key", "is", "present", "in", "the", "arg", "collection", "." ]
train
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/stats/Counters.java#L373-L377
tvesalainen/util
util/src/main/java/org/vesalainen/lang/Primitives.java
Primitives.parseUnsignedInt
public static final int parseUnsignedInt(CharSequence cs, int radix, int beginIndex, int endIndex) { check(cs, radix, NumberRanges.UnsignedIntRange, beginIndex, endIndex); int end = endIndex; int result = 0; int index = beginIndex; int cp = Character.codePointAt(cs, ind...
java
public static final int parseUnsignedInt(CharSequence cs, int radix, int beginIndex, int endIndex) { check(cs, radix, NumberRanges.UnsignedIntRange, beginIndex, endIndex); int end = endIndex; int result = 0; int index = beginIndex; int cp = Character.codePointAt(cs, ind...
[ "public", "static", "final", "int", "parseUnsignedInt", "(", "CharSequence", "cs", ",", "int", "radix", ",", "int", "beginIndex", ",", "int", "endIndex", ")", "{", "check", "(", "cs", ",", "radix", ",", "NumberRanges", ".", "UnsignedIntRange", ",", "beginInd...
Parses unsigned int from input. <p>Input can start with '+'. <p>Numeric value is according to radix @param cs @param radix A value between Character.MIN_RADIX and Character.MAX_RADIX or -2 @param beginIndex the index to the first char of the text range. @param endIndex the index after the last char of the text range. @...
[ "Parses", "unsigned", "int", "from", "input", ".", "<p", ">", "Input", "can", "start", "with", "+", ".", "<p", ">", "Numeric", "value", "is", "according", "to", "radix" ]
train
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/lang/Primitives.java#L1489-L1524
intive-FDV/DynamicJasper
src/main/java/ar/com/fdvs/dj/domain/chart/builder/DJBar3DChartBuilder.java
DJBar3DChartBuilder.addSerie
public DJBar3DChartBuilder addSerie(AbstractColumn column, String label) { getDataset().addSerie(column, label); return this; }
java
public DJBar3DChartBuilder addSerie(AbstractColumn column, String label) { getDataset().addSerie(column, label); return this; }
[ "public", "DJBar3DChartBuilder", "addSerie", "(", "AbstractColumn", "column", ",", "String", "label", ")", "{", "getDataset", "(", ")", ".", "addSerie", "(", "column", ",", "label", ")", ";", "return", "this", ";", "}" ]
Adds the specified serie column to the dataset with custom label. @param column the serie column @param label column the custom label
[ "Adds", "the", "specified", "serie", "column", "to", "the", "dataset", "with", "custom", "label", "." ]
train
https://github.com/intive-FDV/DynamicJasper/blob/63919574cc401ae40574d13129f628e66d1682a3/src/main/java/ar/com/fdvs/dj/domain/chart/builder/DJBar3DChartBuilder.java#L366-L369
unbescape/unbescape
src/main/java/org/unbescape/uri/UriEscape.java
UriEscape.escapeUriFragmentId
public static String escapeUriFragmentId(final String text, final String encoding) { if (encoding == null) { throw new IllegalArgumentException("Argument 'encoding' cannot be null"); } return UriEscapeUtil.escape(text, UriEscapeUtil.UriEscapeType.FRAGMENT_ID, encoding); }
java
public static String escapeUriFragmentId(final String text, final String encoding) { if (encoding == null) { throw new IllegalArgumentException("Argument 'encoding' cannot be null"); } return UriEscapeUtil.escape(text, UriEscapeUtil.UriEscapeType.FRAGMENT_ID, encoding); }
[ "public", "static", "String", "escapeUriFragmentId", "(", "final", "String", "text", ",", "final", "String", "encoding", ")", "{", "if", "(", "encoding", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Argument 'encoding' cannot be null\"...
<p> Perform am URI fragment identifier <strong>escape</strong> operation on a <tt>String</tt> input. </p> <p> The following are the only allowed chars in an URI fragment identifier (will not be escaped): </p> <ul> <li><tt>A-Z a-z 0-9</tt></li> <li><tt>- . _ ~</tt></li> <li><tt>! $ &amp; ' ( ) * + , ; =</tt></li> <li><t...
[ "<p", ">", "Perform", "am", "URI", "fragment", "identifier", "<strong", ">", "escape<", "/", "strong", ">", "operation", "on", "a", "<tt", ">", "String<", "/", "tt", ">", "input", ".", "<", "/", "p", ">", "<p", ">", "The", "following", "are", "the", ...
train
https://github.com/unbescape/unbescape/blob/ec5435fb3508c2eed25d8165dc27ded2602cae13/src/main/java/org/unbescape/uri/UriEscape.java#L402-L407
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/query/impl/Indexes.java
Indexes.addOrGetIndex
public synchronized InternalIndex addOrGetIndex(String name, boolean ordered) { InternalIndex index = indexesByName.get(name); if (index != null) { return index; } String[] components = PredicateUtils.parseOutCompositeIndexComponents(name); if (components == null) { ...
java
public synchronized InternalIndex addOrGetIndex(String name, boolean ordered) { InternalIndex index = indexesByName.get(name); if (index != null) { return index; } String[] components = PredicateUtils.parseOutCompositeIndexComponents(name); if (components == null) { ...
[ "public", "synchronized", "InternalIndex", "addOrGetIndex", "(", "String", "name", ",", "boolean", "ordered", ")", "{", "InternalIndex", "index", "=", "indexesByName", ".", "get", "(", "name", ")", ";", "if", "(", "index", "!=", "null", ")", "{", "return", ...
Obtains the existing index or creates a new one (if an index doesn't exist yet) for the given name in this indexes instance. @param name the name of the index; the passed value might not represent a canonical index name (as specified by {@link Index#getName()), in this case the method canonicalizes it. @param order...
[ "Obtains", "the", "existing", "index", "or", "creates", "a", "new", "one", "(", "if", "an", "index", "doesn", "t", "exist", "yet", ")", "for", "the", "given", "name", "in", "this", "indexes", "instance", "." ]
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/query/impl/Indexes.java#L121-L154
james-hu/jabb-core
src/main/java/net/sf/jabb/util/db/ConnectionUtility.java
ConnectionUtility.createDataSource
public static DataSource createDataSource(String source, String jndiName){ DataSource ds = createDataSource(source); if (ds != null && jndiName != null){ InitialContext ic; try { ic = new InitialContext(); ic.bind(jndiName, ds); } catch (NamingException e) { log.error("Failed to bind da...
java
public static DataSource createDataSource(String source, String jndiName){ DataSource ds = createDataSource(source); if (ds != null && jndiName != null){ InitialContext ic; try { ic = new InitialContext(); ic.bind(jndiName, ds); } catch (NamingException e) { log.error("Failed to bind da...
[ "public", "static", "DataSource", "createDataSource", "(", "String", "source", ",", "String", "jndiName", ")", "{", "DataSource", "ds", "=", "createDataSource", "(", "source", ")", ";", "if", "(", "ds", "!=", "null", "&&", "jndiName", "!=", "null", ")", "{...
Create DataSource and bind it to JNDI @param source configuration @param jndiName JNDI name that the DataSource needs to be bind to @return The DataSource created
[ "Create", "DataSource", "and", "bind", "it", "to", "JNDI" ]
train
https://github.com/james-hu/jabb-core/blob/bceed441595c5e5195a7418795f03b69fa7b61e4/src/main/java/net/sf/jabb/util/db/ConnectionUtility.java#L246-L258
joniles/mpxj
src/main/java/net/sf/mpxj/primavera/PrimaveraReader.java
PrimaveraReader.processCalendarHours
private void processCalendarHours(ProjectCalendar calendar, Record dayRecord) { // ... for each day of the week Day day = Day.getInstance(Integer.parseInt(dayRecord.getField())); // Get hours List<Record> recHours = dayRecord.getChildren(); if (recHours.size() == 0) { // ...
java
private void processCalendarHours(ProjectCalendar calendar, Record dayRecord) { // ... for each day of the week Day day = Day.getInstance(Integer.parseInt(dayRecord.getField())); // Get hours List<Record> recHours = dayRecord.getChildren(); if (recHours.size() == 0) { // ...
[ "private", "void", "processCalendarHours", "(", "ProjectCalendar", "calendar", ",", "Record", "dayRecord", ")", "{", "// ... for each day of the week", "Day", "day", "=", "Day", ".", "getInstance", "(", "Integer", ".", "parseInt", "(", "dayRecord", ".", "getField", ...
Process hours in a working day. @param calendar project calendar @param dayRecord working day data
[ "Process", "hours", "in", "a", "working", "day", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/PrimaveraReader.java#L381-L402
google/error-prone-javac
src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavacParser.java
JavacParser.syntaxError
protected JCErroneous syntaxError(String key, TokenKind arg) { return syntaxError(token.pos, key, arg); }
java
protected JCErroneous syntaxError(String key, TokenKind arg) { return syntaxError(token.pos, key, arg); }
[ "protected", "JCErroneous", "syntaxError", "(", "String", "key", ",", "TokenKind", "arg", ")", "{", "return", "syntaxError", "(", "token", ".", "pos", ",", "key", ",", "arg", ")", ";", "}" ]
Generate a syntax error at current position unless one was already reported at the same position.
[ "Generate", "a", "syntax", "error", "at", "current", "position", "unless", "one", "was", "already", "reported", "at", "the", "same", "position", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavacParser.java#L499-L501
JodaOrg/joda-time
src/main/java/org/joda/time/format/DateTimeFormatterBuilder.java
DateTimeFormatterBuilder.appendDecimal
public DateTimeFormatterBuilder appendDecimal( DateTimeFieldType fieldType, int minDigits, int maxDigits) { if (fieldType == null) { throw new IllegalArgumentException("Field type must not be null"); } if (maxDigits < minDigits) { maxDigits = minDigits; ...
java
public DateTimeFormatterBuilder appendDecimal( DateTimeFieldType fieldType, int minDigits, int maxDigits) { if (fieldType == null) { throw new IllegalArgumentException("Field type must not be null"); } if (maxDigits < minDigits) { maxDigits = minDigits; ...
[ "public", "DateTimeFormatterBuilder", "appendDecimal", "(", "DateTimeFieldType", "fieldType", ",", "int", "minDigits", ",", "int", "maxDigits", ")", "{", "if", "(", "fieldType", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Field type m...
Instructs the printer to emit a field value as a decimal number, and the parser to expect an unsigned decimal number. @param fieldType type of field to append @param minDigits minimum number of digits to <i>print</i> @param maxDigits maximum number of digits to <i>parse</i>, or the estimated maximum number of digit...
[ "Instructs", "the", "printer", "to", "emit", "a", "field", "value", "as", "a", "decimal", "number", "and", "the", "parser", "to", "expect", "an", "unsigned", "decimal", "number", "." ]
train
https://github.com/JodaOrg/joda-time/blob/bd79f1c4245e79b3c2c56d7b04fde2a6e191fa42/src/main/java/org/joda/time/format/DateTimeFormatterBuilder.java#L433-L449
webmetrics/browsermob-proxy
src/main/java/org/browsermob/proxy/jetty/http/handler/ProxyHandler.java
ProxyHandler.customizeConnection
protected void customizeConnection(String pathInContext, String pathParams, HttpRequest request, URLConnection connection) throws IOException { }
java
protected void customizeConnection(String pathInContext, String pathParams, HttpRequest request, URLConnection connection) throws IOException { }
[ "protected", "void", "customizeConnection", "(", "String", "pathInContext", ",", "String", "pathParams", ",", "HttpRequest", "request", ",", "URLConnection", "connection", ")", "throws", "IOException", "{", "}" ]
Customize proxy URL connection. Method to allow derived handlers to customize the connection.
[ "Customize", "proxy", "URL", "connection", ".", "Method", "to", "allow", "derived", "handlers", "to", "customize", "the", "connection", "." ]
train
https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/http/handler/ProxyHandler.java#L539-L541
alkacon/opencms-core
src/org/opencms/db/CmsDriverManager.java
CmsDriverManager.countUsers
long countUsers(CmsDbContext dbc, CmsUserSearchParameters searchParams) throws CmsDataAccessException { return getUserDriver(dbc).countUsers(dbc, searchParams); }
java
long countUsers(CmsDbContext dbc, CmsUserSearchParameters searchParams) throws CmsDataAccessException { return getUserDriver(dbc).countUsers(dbc, searchParams); }
[ "long", "countUsers", "(", "CmsDbContext", "dbc", ",", "CmsUserSearchParameters", "searchParams", ")", "throws", "CmsDataAccessException", "{", "return", "getUserDriver", "(", "dbc", ")", ".", "countUsers", "(", "dbc", ",", "searchParams", ")", ";", "}" ]
Counts the total number of users which fit the given criteria.<p> @param dbc the database context @param searchParams the user search criteria @return the total number of users matching the criteria @throws CmsDataAccessException if something goes wrong
[ "Counts", "the", "total", "number", "of", "users", "which", "fit", "the", "given", "criteria", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsDriverManager.java#L10637-L10640
google/error-prone-javac
src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/AbstractIndexWriter.java
AbstractIndexWriter.addMemberDesc
protected void addMemberDesc(MemberDoc member, Content contentTree) { ClassDoc containing = member.containingClass(); String classdesc = utils.getTypeName( configuration, containing, true) + " "; if (member.isField()) { if (member.isStatic()) { content...
java
protected void addMemberDesc(MemberDoc member, Content contentTree) { ClassDoc containing = member.containingClass(); String classdesc = utils.getTypeName( configuration, containing, true) + " "; if (member.isField()) { if (member.isStatic()) { content...
[ "protected", "void", "addMemberDesc", "(", "MemberDoc", "member", ",", "Content", "contentTree", ")", "{", "ClassDoc", "containing", "=", "member", ".", "containingClass", "(", ")", ";", "String", "classdesc", "=", "utils", ".", "getTypeName", "(", "configuratio...
Add description about the Static Varible/Method/Constructor for a member. @param member MemberDoc for the member within the Class Kind @param contentTree the content tree to which the member description will be added
[ "Add", "description", "about", "the", "Static", "Varible", "/", "Method", "/", "Constructor", "for", "a", "member", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/AbstractIndexWriter.java#L327-L353
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.msgstore/src/com/ibm/ws/sib/msgstore/impl/ItemLinkMap.java
ItemLinkMap.put
public final void put(long key, AbstractItemLink link) { // 666212 starts // we do not want to contest the monitor. If the lockObject is null we // will lazily initialize it. if (null == _entry) { // we need to synchronize on the monitor to ensure that we are not...
java
public final void put(long key, AbstractItemLink link) { // 666212 starts // we do not want to contest the monitor. If the lockObject is null we // will lazily initialize it. if (null == _entry) { // we need to synchronize on the monitor to ensure that we are not...
[ "public", "final", "void", "put", "(", "long", "key", ",", "AbstractItemLink", "link", ")", "{", "// 666212 starts", "// we do not want to contest the monitor. If the lockObject is null we", "// will lazily initialize it.", "if", "(", "null", "==", "_entry", ")", "{", "//...
Associates the specified value with the specified key in this map. If the map previously contained a mapping for this key, the old value is replaced. @param key key with which the specified value is to be associated. @param link link to be associated with the specified key.
[ "Associates", "the", "specified", "value", "with", "the", "specified", "key", "in", "this", "map", ".", "If", "the", "map", "previously", "contained", "a", "mapping", "for", "this", "key", "the", "old", "value", "is", "replaced", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.msgstore/src/com/ibm/ws/sib/msgstore/impl/ItemLinkMap.java#L256-L285
Metatavu/edelphi
edelphi/src/main/java/fi/metatavu/edelphi/utils/AuthUtils.java
AuthUtils.purgeOAuthAccessTokens
public static void purgeOAuthAccessTokens(RequestContext requestContext, String provider) { String key = String.format(PROVIDER_ACCESS_TOKENS, provider); HttpSession session = requestContext.getRequest().getSession(); OAuthAccessToken[] accessTokens = (OAuthAccessToken[]) session.getAttribute(key); if (...
java
public static void purgeOAuthAccessTokens(RequestContext requestContext, String provider) { String key = String.format(PROVIDER_ACCESS_TOKENS, provider); HttpSession session = requestContext.getRequest().getSession(); OAuthAccessToken[] accessTokens = (OAuthAccessToken[]) session.getAttribute(key); if (...
[ "public", "static", "void", "purgeOAuthAccessTokens", "(", "RequestContext", "requestContext", ",", "String", "provider", ")", "{", "String", "key", "=", "String", ".", "format", "(", "PROVIDER_ACCESS_TOKENS", ",", "provider", ")", ";", "HttpSession", "session", "...
Purges all OAuth tokens from given provider @param requestContext request context @param provider provider
[ "Purges", "all", "OAuth", "tokens", "from", "given", "provider" ]
train
https://github.com/Metatavu/edelphi/blob/d91a0b54f954b33b4ee674a1bdf03612d76c3305/edelphi/src/main/java/fi/metatavu/edelphi/utils/AuthUtils.java#L138-L145
xiaosunzhu/resource-utils
src/main/java/net/sunyijun/resource/config/Configs.java
Configs.setDebugConfigs
public static void setDebugConfigs(OneProperties debugConfigsObj, String debugConfigAbsoluteClassPath) { if (debugConfigsObj != null) { Configs.debugConfigs = debugConfigsObj; } if (debugConfigAbsoluteClassPath != null) { Configs.debugConfigAbsoluteClassPath = debugC...
java
public static void setDebugConfigs(OneProperties debugConfigsObj, String debugConfigAbsoluteClassPath) { if (debugConfigsObj != null) { Configs.debugConfigs = debugConfigsObj; } if (debugConfigAbsoluteClassPath != null) { Configs.debugConfigAbsoluteClassPath = debugC...
[ "public", "static", "void", "setDebugConfigs", "(", "OneProperties", "debugConfigsObj", ",", "String", "debugConfigAbsoluteClassPath", ")", "{", "if", "(", "debugConfigsObj", "!=", "null", ")", "{", "Configs", ".", "debugConfigs", "=", "debugConfigsObj", ";", "}", ...
<p>Set self define debug configs.</p> Can use self debug configs path or self class extends {@link OneProperties}. @param debugConfigsObj self class extends {@link OneProperties}. If null means not use self class. @param debugConfigAbsoluteClassPath self system configs path. If null means use default path...
[ "<p", ">", "Set", "self", "define", "debug", "configs", ".", "<", "/", "p", ">", "Can", "use", "self", "debug", "configs", "path", "or", "self", "class", "extends", "{", "@link", "OneProperties", "}", "." ]
train
https://github.com/xiaosunzhu/resource-utils/blob/4f2bf3f36df10195a978f122ed682ba1eb0462b5/src/main/java/net/sunyijun/resource/config/Configs.java#L641-L651
Swagger2Markup/swagger2markup
src/main/java/io/github/swagger2markup/Swagger2MarkupProperties.java
Swagger2MarkupProperties.getRequiredURI
public URI getRequiredURI(String key) { Optional<String> property = getString(key); if (property.isPresent()) { return URIUtils.create(property.get()); } else { throw new IllegalStateException(String.format("required key [%s] not found", key)); } }
java
public URI getRequiredURI(String key) { Optional<String> property = getString(key); if (property.isPresent()) { return URIUtils.create(property.get()); } else { throw new IllegalStateException(String.format("required key [%s] not found", key)); } }
[ "public", "URI", "getRequiredURI", "(", "String", "key", ")", "{", "Optional", "<", "String", ">", "property", "=", "getString", "(", "key", ")", ";", "if", "(", "property", ".", "isPresent", "(", ")", ")", "{", "return", "URIUtils", ".", "create", "("...
Return the URI property value associated with the given key (never {@code null}). @return The URI property @throws IllegalStateException if the key cannot be resolved
[ "Return", "the", "URI", "property", "value", "associated", "with", "the", "given", "key", "(", "never", "{", "@code", "null", "}", ")", "." ]
train
https://github.com/Swagger2Markup/swagger2markup/blob/da83465f19a2f8a0f1fba873b5762bca8587896b/src/main/java/io/github/swagger2markup/Swagger2MarkupProperties.java#L201-L208
elki-project/elki
elki-outlier/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/intrinsic/IDOS.java
IDOS.computeIDs
protected DoubleDataStore computeIDs(DBIDs ids, KNNQuery<O> knnQ) { WritableDoubleDataStore intDims = DataStoreUtil.makeDoubleStorage(ids, DataStoreFactory.HINT_HOT | DataStoreFactory.HINT_TEMP); FiniteProgress prog = LOG.isVerbose() ? new FiniteProgress("Intrinsic dimensionality", ids.size(), LOG) : null; ...
java
protected DoubleDataStore computeIDs(DBIDs ids, KNNQuery<O> knnQ) { WritableDoubleDataStore intDims = DataStoreUtil.makeDoubleStorage(ids, DataStoreFactory.HINT_HOT | DataStoreFactory.HINT_TEMP); FiniteProgress prog = LOG.isVerbose() ? new FiniteProgress("Intrinsic dimensionality", ids.size(), LOG) : null; ...
[ "protected", "DoubleDataStore", "computeIDs", "(", "DBIDs", "ids", ",", "KNNQuery", "<", "O", ">", "knnQ", ")", "{", "WritableDoubleDataStore", "intDims", "=", "DataStoreUtil", ".", "makeDoubleStorage", "(", "ids", ",", "DataStoreFactory", ".", "HINT_HOT", "|", ...
Computes all IDs @param ids the DBIDs to process @param knnQ the KNN query @return The computed intrinsic dimensionalities.
[ "Computes", "all", "IDs" ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-outlier/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/intrinsic/IDOS.java#L153-L169
cucumber/cucumber-jvm
java/src/main/java/cucumber/runtime/java/JavaBackend.java
JavaBackend.loadGlue
public void loadGlue(Glue glue, Method method, Class<?> glueCodeClass) { this.glue = glue; methodScanner.scan(this, method, glueCodeClass); }
java
public void loadGlue(Glue glue, Method method, Class<?> glueCodeClass) { this.glue = glue; methodScanner.scan(this, method, glueCodeClass); }
[ "public", "void", "loadGlue", "(", "Glue", "glue", ",", "Method", "method", ",", "Class", "<", "?", ">", "glueCodeClass", ")", "{", "this", ".", "glue", "=", "glue", ";", "methodScanner", ".", "scan", "(", "this", ",", "method", ",", "glueCodeClass", "...
Convenience method for frameworks that wish to load glue from methods explicitly (possibly found with a different mechanism than Cucumber's built-in classpath scanning). @param glue where stepdefs and hooks will be added. @param method a candidate method. @param glueCodeClass the class implementing the...
[ "Convenience", "method", "for", "frameworks", "that", "wish", "to", "load", "glue", "from", "methods", "explicitly", "(", "possibly", "found", "with", "a", "different", "mechanism", "than", "Cucumber", "s", "built", "-", "in", "classpath", "scanning", ")", "."...
train
https://github.com/cucumber/cucumber-jvm/blob/437bb3a1f1d91b56f44059c835765b395eefc777/java/src/main/java/cucumber/runtime/java/JavaBackend.java#L107-L110
Appendium/objectlabkit
utils/src/main/java/net/objectlab/kit/util/BigDecimalUtil.java
BigDecimalUtil.forceNegativeIfTrue
public static BigDecimal forceNegativeIfTrue(final boolean condition, final BigDecimal amount) { return condition ? BigDecimalUtil.negate(BigDecimalUtil.abs(amount)) : BigDecimalUtil.abs(amount); }
java
public static BigDecimal forceNegativeIfTrue(final boolean condition, final BigDecimal amount) { return condition ? BigDecimalUtil.negate(BigDecimalUtil.abs(amount)) : BigDecimalUtil.abs(amount); }
[ "public", "static", "BigDecimal", "forceNegativeIfTrue", "(", "final", "boolean", "condition", ",", "final", "BigDecimal", "amount", ")", "{", "return", "condition", "?", "BigDecimalUtil", ".", "negate", "(", "BigDecimalUtil", ".", "abs", "(", "amount", ")", ")"...
Return a negative amount based on amount if true, otherwise return the ABS.
[ "Return", "a", "negative", "amount", "based", "on", "amount", "if", "true", "otherwise", "return", "the", "ABS", "." ]
train
https://github.com/Appendium/objectlabkit/blob/cd649bce7a32e4e926520e62cb765f3b1d451594/utils/src/main/java/net/objectlab/kit/util/BigDecimalUtil.java#L708-L710
netty/netty
codec-http2/src/main/java/io/netty/handler/codec/http2/Http2Exception.java
Http2Exception.closedStreamError
public static Http2Exception closedStreamError(Http2Error error, String fmt, Object... args) { return new ClosedStreamCreationException(error, String.format(fmt, args)); }
java
public static Http2Exception closedStreamError(Http2Error error, String fmt, Object... args) { return new ClosedStreamCreationException(error, String.format(fmt, args)); }
[ "public", "static", "Http2Exception", "closedStreamError", "(", "Http2Error", "error", ",", "String", "fmt", ",", "Object", "...", "args", ")", "{", "return", "new", "ClosedStreamCreationException", "(", "error", ",", "String", ".", "format", "(", "fmt", ",", ...
Use if an error has occurred which can not be isolated to a single stream, but instead applies to the entire connection. @param error The type of error as defined by the HTTP/2 specification. @param fmt String with the content and format for the additional debug data. @param args Objects which fit into the format defin...
[ "Use", "if", "an", "error", "has", "occurred", "which", "can", "not", "be", "isolated", "to", "a", "single", "stream", "but", "instead", "applies", "to", "the", "entire", "connection", "." ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-http2/src/main/java/io/netty/handler/codec/http2/Http2Exception.java#L110-L112
rey5137/material
material/src/main/java/com/rey/material/widget/FloatingActionButton.java
FloatingActionButton.setLineMorphingState
public void setLineMorphingState(int state, boolean animation){ if(mIcon != null && mIcon instanceof LineMorphingDrawable) ((LineMorphingDrawable)mIcon).switchLineState(state, animation); }
java
public void setLineMorphingState(int state, boolean animation){ if(mIcon != null && mIcon instanceof LineMorphingDrawable) ((LineMorphingDrawable)mIcon).switchLineState(state, animation); }
[ "public", "void", "setLineMorphingState", "(", "int", "state", ",", "boolean", "animation", ")", "{", "if", "(", "mIcon", "!=", "null", "&&", "mIcon", "instanceof", "LineMorphingDrawable", ")", "(", "(", "LineMorphingDrawable", ")", "mIcon", ")", ".", "switchL...
Set the line state of LineMorphingDrawable that is used as this button's icon. @param state The line state. @param animation Indicate should show animation when switch line state or not.
[ "Set", "the", "line", "state", "of", "LineMorphingDrawable", "that", "is", "used", "as", "this", "button", "s", "icon", "." ]
train
https://github.com/rey5137/material/blob/1bbcac2686a0023ef7720d3fe455bb116d115af8/material/src/main/java/com/rey/material/widget/FloatingActionButton.java#L253-L256
vladmihalcea/flexy-pool
flexy-pool-core/src/main/java/com/vladmihalcea/flexypool/util/ReflectionUtils.java
ReflectionUtils.handleException
private static ReflectionException handleException(String methodName, NoSuchMethodException e) { LOGGER.error("Couldn't find method " + methodName, e); return new ReflectionException(e); }
java
private static ReflectionException handleException(String methodName, NoSuchMethodException e) { LOGGER.error("Couldn't find method " + methodName, e); return new ReflectionException(e); }
[ "private", "static", "ReflectionException", "handleException", "(", "String", "methodName", ",", "NoSuchMethodException", "e", ")", "{", "LOGGER", ".", "error", "(", "\"Couldn't find method \"", "+", "methodName", ",", "e", ")", ";", "return", "new", "ReflectionExce...
Handle {@link NoSuchMethodException} by logging it and rethrown it as a {@link ReflectionException} @param methodName method name @param e exception @return wrapped exception
[ "Handle", "{", "@link", "NoSuchMethodException", "}", "by", "logging", "it", "and", "rethrown", "it", "as", "a", "{", "@link", "ReflectionException", "}" ]
train
https://github.com/vladmihalcea/flexy-pool/blob/d763d359e68299c2b4e28e4b67770581ae083431/flexy-pool-core/src/main/java/com/vladmihalcea/flexypool/util/ReflectionUtils.java#L172-L175
languagetool-org/languagetool
languagetool-core/src/main/java/org/languagetool/rules/spelling/symspell/implementation/SymSpell.java
SymSpell.loadDictionary
public boolean loadDictionary(InputStream corpus, int termIndex, int countIndex) { if (corpus == null) { return false; } BufferedReader br = new BufferedReader(new InputStreamReader(corpus, StandardCharsets.UTF_8)); return loadDictionary(br, termIndex, countIndex); }
java
public boolean loadDictionary(InputStream corpus, int termIndex, int countIndex) { if (corpus == null) { return false; } BufferedReader br = new BufferedReader(new InputStreamReader(corpus, StandardCharsets.UTF_8)); return loadDictionary(br, termIndex, countIndex); }
[ "public", "boolean", "loadDictionary", "(", "InputStream", "corpus", ",", "int", "termIndex", ",", "int", "countIndex", ")", "{", "if", "(", "corpus", "==", "null", ")", "{", "return", "false", ";", "}", "BufferedReader", "br", "=", "new", "BufferedReader", ...
/ <returns>True if file loaded, or false if file not found.</returns>
[ "/", "<returns", ">", "True", "if", "file", "loaded", "or", "false", "if", "file", "not", "found", ".", "<", "/", "returns", ">" ]
train
https://github.com/languagetool-org/languagetool/blob/b7a3d63883d242fb2525877c6382681c57a0a142/languagetool-core/src/main/java/org/languagetool/rules/spelling/symspell/implementation/SymSpell.java#L210-L216
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/util/ZooKeeperUtils.java
ZooKeeperUtils.createCheckpointIDCounter
public static ZooKeeperCheckpointIDCounter createCheckpointIDCounter( CuratorFramework client, Configuration configuration, JobID jobId) { String checkpointIdCounterPath = configuration.getString( HighAvailabilityOptions.HA_ZOOKEEPER_CHECKPOINT_COUNTER_PATH); checkpointIdCounterPath += ZooKeeperSubmi...
java
public static ZooKeeperCheckpointIDCounter createCheckpointIDCounter( CuratorFramework client, Configuration configuration, JobID jobId) { String checkpointIdCounterPath = configuration.getString( HighAvailabilityOptions.HA_ZOOKEEPER_CHECKPOINT_COUNTER_PATH); checkpointIdCounterPath += ZooKeeperSubmi...
[ "public", "static", "ZooKeeperCheckpointIDCounter", "createCheckpointIDCounter", "(", "CuratorFramework", "client", ",", "Configuration", "configuration", ",", "JobID", "jobId", ")", "{", "String", "checkpointIdCounterPath", "=", "configuration", ".", "getString", "(", "H...
Creates a {@link ZooKeeperCheckpointIDCounter} instance. @param client The {@link CuratorFramework} ZooKeeper client to use @param configuration {@link Configuration} object @param jobId ID of job to create the instance for @return {@link ZooKeeperCheckpointIDCounter} instance
[ "Creates", "a", "{", "@link", "ZooKeeperCheckpointIDCounter", "}", "instance", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/util/ZooKeeperUtils.java#L331-L342
cloudant/java-cloudant
cloudant-client/src/main/java/com/cloudant/client/internal/DatabaseURIHelper.java
DatabaseURIHelper.documentUri
public URI documentUri(String documentId, Params params) { return this.documentId(documentId).query(params).build(); }
java
public URI documentUri(String documentId, Params params) { return this.documentId(documentId).query(params).build(); }
[ "public", "URI", "documentUri", "(", "String", "documentId", ",", "Params", "params", ")", "{", "return", "this", ".", "documentId", "(", "documentId", ")", ".", "query", "(", "params", ")", ".", "build", "(", ")", ";", "}" ]
Returns URI for {@code documentId} with {@code query} key and value.
[ "Returns", "URI", "for", "{" ]
train
https://github.com/cloudant/java-cloudant/blob/42c438654945361bded2cc0827afc046d535b31b/cloudant-client/src/main/java/com/cloudant/client/internal/DatabaseURIHelper.java#L141-L143
jbundle/jbundle
thin/base/screen/util/src/main/java/org/jbundle/thin/base/screen/util/JDescTextField.java
JDescTextField.init
public void init(int cols, String strDescription, ActionListener actionListener) { m_strDescription = strDescription; m_actionListener = actionListener; this.setText(null); this.addFocusListener(new FocusAdapter() { // Make sure a tab with a changed field triggers action perf...
java
public void init(int cols, String strDescription, ActionListener actionListener) { m_strDescription = strDescription; m_actionListener = actionListener; this.setText(null); this.addFocusListener(new FocusAdapter() { // Make sure a tab with a changed field triggers action perf...
[ "public", "void", "init", "(", "int", "cols", ",", "String", "strDescription", ",", "ActionListener", "actionListener", ")", "{", "m_strDescription", "=", "strDescription", ";", "m_actionListener", "=", "actionListener", ";", "this", ".", "setText", "(", "null", ...
Constructor. @param cols The columns for this text field. @param strDescription The description to display when this component is blank. @param actionListener The action listener for this field (must be removed and return added for this to work).
[ "Constructor", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/screen/util/src/main/java/org/jbundle/thin/base/screen/util/JDescTextField.java#L79-L106
jferard/fastods
fastods/src/main/java/com/github/jferard/fastods/TableBuilder.java
TableBuilder.setColumnStyle
public void setColumnStyle(final int col, final TableColumnStyle ts) throws FastOdsException { TableBuilder.checkCol(col); this.stylesContainer.addContentFontFaceContainerStyle(ts); ts.addToContentStyles(this.stylesContainer); this.columnStyles.set(col, ts); }
java
public void setColumnStyle(final int col, final TableColumnStyle ts) throws FastOdsException { TableBuilder.checkCol(col); this.stylesContainer.addContentFontFaceContainerStyle(ts); ts.addToContentStyles(this.stylesContainer); this.columnStyles.set(col, ts); }
[ "public", "void", "setColumnStyle", "(", "final", "int", "col", ",", "final", "TableColumnStyle", "ts", ")", "throws", "FastOdsException", "{", "TableBuilder", ".", "checkCol", "(", "col", ")", ";", "this", ".", "stylesContainer", ".", "addContentFontFaceContainer...
Set the style of a column. @param col The column number @param ts The style to be used, make sure the style is of type TableFamilyStyle.STYLEFAMILY_TABLECOLUMN @throws FastOdsException Thrown if col has an invalid value.
[ "Set", "the", "style", "of", "a", "column", "." ]
train
https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/TableBuilder.java#L369-L374
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/sun/util/calendar/CalendarUtils.java
CalendarUtils.floorDivide
public static final int floorDivide(int n, int d, int[] r) { if (n >= 0) { r[0] = n % d; return n / d; } int q = ((n + 1) / d) - 1; r[0] = n - (q * d); return q; }
java
public static final int floorDivide(int n, int d, int[] r) { if (n >= 0) { r[0] = n % d; return n / d; } int q = ((n + 1) / d) - 1; r[0] = n - (q * d); return q; }
[ "public", "static", "final", "int", "floorDivide", "(", "int", "n", ",", "int", "d", ",", "int", "[", "]", "r", ")", "{", "if", "(", "n", ">=", "0", ")", "{", "r", "[", "0", "]", "=", "n", "%", "d", ";", "return", "n", "/", "d", ";", "}",...
Divides two integers and returns the floor of the quotient and the modulus remainder. For example, <code>floorDivide(-1,4)</code> returns <code>-1</code> with <code>3</code> as its remainder, while <code>-1/4</code> is <code>0</code> and <code>-1%4</code> is <code>-1</code>. @param n the numerator @param d a divisor ...
[ "Divides", "two", "integers", "and", "returns", "the", "floor", "of", "the", "quotient", "and", "the", "modulus", "remainder", ".", "For", "example", "<code", ">", "floorDivide", "(", "-", "1", "4", ")", "<", "/", "code", ">", "returns", "<code", ">", ...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/util/calendar/CalendarUtils.java#L102-L110
mgledi/DRUMS
src/main/java/com/unister/semweb/drums/util/KeyUtils.java
KeyUtils.compareKey
public static int compareKey(byte[] key1, byte[] key2) { return compareKey(key1, key2, Math.min(key1.length, key2.length)); }
java
public static int compareKey(byte[] key1, byte[] key2) { return compareKey(key1, key2, Math.min(key1.length, key2.length)); }
[ "public", "static", "int", "compareKey", "(", "byte", "[", "]", "key1", ",", "byte", "[", "]", "key2", ")", "{", "return", "compareKey", "(", "key1", ",", "key2", ",", "Math", ".", "min", "(", "key1", ".", "length", ",", "key2", ".", "length", ")",...
Compares the two byte-arrays on the basis of unsigned bytes. The array will be compared by each element up to the length of the smaller array. If all elements are equal and the array are not equal sized, the larger array is seen as larger. @param key1 @param key2 @return <0 if key1 < key2<br> 0 if key1 == key2<br> >0...
[ "Compares", "the", "two", "byte", "-", "arrays", "on", "the", "basis", "of", "unsigned", "bytes", ".", "The", "array", "will", "be", "compared", "by", "each", "element", "up", "to", "the", "length", "of", "the", "smaller", "array", ".", "If", "all", "e...
train
https://github.com/mgledi/DRUMS/blob/a670f17a2186c9a15725f26617d77ce8e444e072/src/main/java/com/unister/semweb/drums/util/KeyUtils.java#L88-L90
OpenLiberty/open-liberty
dev/com.ibm.ws.dynacache/src/com/ibm/ws/cache/CacheProviderWrapper.java
CacheProviderWrapper.internalInvalidateByDepId
@Override public void internalInvalidateByDepId(Object id, int causeOfInvalidation, int source, boolean bFireIL) { final String methodName = "internalInvalidateByDepId()"; if (tc.isDebugEnabled()) { Tr.debug(tc, methodName + " cacheName=" + cacheName + " id=" + id); } thi...
java
@Override public void internalInvalidateByDepId(Object id, int causeOfInvalidation, int source, boolean bFireIL) { final String methodName = "internalInvalidateByDepId()"; if (tc.isDebugEnabled()) { Tr.debug(tc, methodName + " cacheName=" + cacheName + " id=" + id); } thi...
[ "@", "Override", "public", "void", "internalInvalidateByDepId", "(", "Object", "id", ",", "int", "causeOfInvalidation", ",", "int", "source", ",", "boolean", "bFireIL", ")", "{", "final", "String", "methodName", "=", "\"internalInvalidateByDepId()\"", ";", "if", "...
This invalidates all entries in this Cache having a dependency on this dependency id. @param id dependency id. @param causeOfInvalidation The cause of invalidation @param source The source of invalidation (local or remote) @param bFireIL True to fire invalidation event
[ "This", "invalidates", "all", "entries", "in", "this", "Cache", "having", "a", "dependency", "on", "this", "dependency", "id", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.dynacache/src/com/ibm/ws/cache/CacheProviderWrapper.java#L466-L474
schallee/alib4j
servlet/src/main/java/net/darkmist/alib/servlet/SerializableRequestDispatcher.java
SerializableRequestDispatcher.readObject
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { // this should set servlet... in.defaultReadObject(); try { init(); } catch(ServletException e) { // This could happen if it is deserialized in // a container where the name or path does not // exist. I ca...
java
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { // this should set servlet... in.defaultReadObject(); try { init(); } catch(ServletException e) { // This could happen if it is deserialized in // a container where the name or path does not // exist. I ca...
[ "private", "void", "readObject", "(", "ObjectInputStream", "in", ")", "throws", "IOException", ",", "ClassNotFoundException", "{", "// this should set servlet...", "in", ".", "defaultReadObject", "(", ")", ";", "try", "{", "init", "(", ")", ";", "}", "catch", "(...
Custom deserialization. This handles setting transient fields through @{link #init()}.
[ "Custom", "deserialization", ".", "This", "handles", "setting", "transient", "fields", "through" ]
train
https://github.com/schallee/alib4j/blob/0e0718aee574bbb62268e1cf58e99286529ce529/servlet/src/main/java/net/darkmist/alib/servlet/SerializableRequestDispatcher.java#L102-L117
netscaler/sdx_nitro
src/main/java/com/citrix/sdx/nitro/resource/config/xen/xen_health_resource_sw.java
xen_health_resource_sw.get_nitro_bulk_response
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception { xen_health_resource_sw_responses result = (xen_health_resource_sw_responses) service.get_payload_formatter().string_to_resource(xen_health_resource_sw_responses.class, response); if(result.errorcode != 0...
java
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception { xen_health_resource_sw_responses result = (xen_health_resource_sw_responses) service.get_payload_formatter().string_to_resource(xen_health_resource_sw_responses.class, response); if(result.errorcode != 0...
[ "protected", "base_resource", "[", "]", "get_nitro_bulk_response", "(", "nitro_service", "service", ",", "String", "response", ")", "throws", "Exception", "{", "xen_health_resource_sw_responses", "result", "=", "(", "xen_health_resource_sw_responses", ")", "service", ".",...
<pre> Converts API response of bulk operation into object and returns the object array in case of get request. </pre>
[ "<pre", ">", "Converts", "API", "response", "of", "bulk", "operation", "into", "object", "and", "returns", "the", "object", "array", "in", "case", "of", "get", "request", ".", "<", "/", "pre", ">" ]
train
https://github.com/netscaler/sdx_nitro/blob/c840919f1a8f7c0a5634c0f23d34fa14d1765ff1/src/main/java/com/citrix/sdx/nitro/resource/config/xen/xen_health_resource_sw.java#L173-L190
bsblabs/embed-for-vaadin
com.bsb.common.vaadin.embed/src/main/java/com/bsb/common/vaadin/embed/EmbedVaadinConfig.java
EmbedVaadinConfig.buildUrl
static String buildUrl(int httpPort, String context) { final StringBuilder sb = new StringBuilder(); sb.append("http://localhost:"); if (httpPort == PORT_AUTO) { sb.append("[auto]"); } else { sb.append(httpPort); } sb.append(context); retu...
java
static String buildUrl(int httpPort, String context) { final StringBuilder sb = new StringBuilder(); sb.append("http://localhost:"); if (httpPort == PORT_AUTO) { sb.append("[auto]"); } else { sb.append(httpPort); } sb.append(context); retu...
[ "static", "String", "buildUrl", "(", "int", "httpPort", ",", "String", "context", ")", "{", "final", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";", "sb", ".", "append", "(", "\"http://localhost:\"", ")", ";", "if", "(", "httpPort", "=="...
Build a url for the specified port and context. <p/> If the <tt>httpPort</tt> is equal to {@link #PORT_AUTO}, the returned url is not used as is because no http port has been allocated yet. @param httpPort the http port to use @param context the context of the url @return a <tt>localhost</tt> url for the specified por...
[ "Build", "a", "url", "for", "the", "specified", "port", "and", "context", ".", "<p", "/", ">", "If", "the", "<tt", ">", "httpPort<", "/", "tt", ">", "is", "equal", "to", "{", "@link", "#PORT_AUTO", "}", "the", "returned", "url", "is", "not", "used", ...
train
https://github.com/bsblabs/embed-for-vaadin/blob/f902e70def56ab54d287d2600f9c6eef9e66c225/com.bsb.common.vaadin.embed/src/main/java/com/bsb/common/vaadin/embed/EmbedVaadinConfig.java#L417-L428
citrusframework/citrus
modules/citrus-vertx/src/main/java/com/consol/citrus/vertx/endpoint/VertxSyncConsumer.java
VertxSyncConsumer.saveReplyDestination
public void saveReplyDestination(Message receivedMessage, TestContext context) { if (receivedMessage.getHeader(CitrusVertxMessageHeaders.VERTX_REPLY_ADDRESS) != null) { String correlationKeyName = endpointConfiguration.getCorrelator().getCorrelationKeyName(getName()); String correlationK...
java
public void saveReplyDestination(Message receivedMessage, TestContext context) { if (receivedMessage.getHeader(CitrusVertxMessageHeaders.VERTX_REPLY_ADDRESS) != null) { String correlationKeyName = endpointConfiguration.getCorrelator().getCorrelationKeyName(getName()); String correlationK...
[ "public", "void", "saveReplyDestination", "(", "Message", "receivedMessage", ",", "TestContext", "context", ")", "{", "if", "(", "receivedMessage", ".", "getHeader", "(", "CitrusVertxMessageHeaders", ".", "VERTX_REPLY_ADDRESS", ")", "!=", "null", ")", "{", "String",...
Store the reply address either straight forward or with a given message correlation key. @param receivedMessage @param context
[ "Store", "the", "reply", "address", "either", "straight", "forward", "or", "with", "a", "given", "message", "correlation", "key", "." ]
train
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-vertx/src/main/java/com/consol/citrus/vertx/endpoint/VertxSyncConsumer.java#L97-L107
UrielCh/ovh-java-sdk
ovh-java-sdk-core/src/main/java/net/minidev/ovh/core/ApiOvhUtils.java
ApiOvhUtils.convertTo
public static <T> T convertTo(String in, TypeReference<T> mapTo) throws IOException { try { return mapper.readValue(in, mapTo); } catch (Exception e) { log.error("Can not convert:{} to {}", in, mapTo, e); throw new OvhServiceException("local", "conversion Error to " + mapTo); } }
java
public static <T> T convertTo(String in, TypeReference<T> mapTo) throws IOException { try { return mapper.readValue(in, mapTo); } catch (Exception e) { log.error("Can not convert:{} to {}", in, mapTo, e); throw new OvhServiceException("local", "conversion Error to " + mapTo); } }
[ "public", "static", "<", "T", ">", "T", "convertTo", "(", "String", "in", ",", "TypeReference", "<", "T", ">", "mapTo", ")", "throws", "IOException", "{", "try", "{", "return", "mapper", ".", "readValue", "(", "in", ",", "mapTo", ")", ";", "}", "catc...
Convert JSON String to a POJO java @param in @param mapTo @return POJO Object @throws IOException
[ "Convert", "JSON", "String", "to", "a", "POJO", "java" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-core/src/main/java/net/minidev/ovh/core/ApiOvhUtils.java#L41-L48
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/JobsImpl.java
JobsImpl.patchAsync
public Observable<Void> patchAsync(String jobId, JobPatchParameter jobPatchParameter, JobPatchOptions jobPatchOptions) { return patchWithServiceResponseAsync(jobId, jobPatchParameter, jobPatchOptions).map(new Func1<ServiceResponseWithHeaders<Void, JobPatchHeaders>, Void>() { @Override pu...
java
public Observable<Void> patchAsync(String jobId, JobPatchParameter jobPatchParameter, JobPatchOptions jobPatchOptions) { return patchWithServiceResponseAsync(jobId, jobPatchParameter, jobPatchOptions).map(new Func1<ServiceResponseWithHeaders<Void, JobPatchHeaders>, Void>() { @Override pu...
[ "public", "Observable", "<", "Void", ">", "patchAsync", "(", "String", "jobId", ",", "JobPatchParameter", "jobPatchParameter", ",", "JobPatchOptions", "jobPatchOptions", ")", "{", "return", "patchWithServiceResponseAsync", "(", "jobId", ",", "jobPatchParameter", ",", ...
Updates the properties of the specified job. This replaces only the job properties specified in the request. For example, if the job has constraints, and a request does not specify the constraints element, then the job keeps the existing constraints. @param jobId The ID of the job whose properties you want to update. ...
[ "Updates", "the", "properties", "of", "the", "specified", "job", ".", "This", "replaces", "only", "the", "job", "properties", "specified", "in", "the", "request", ".", "For", "example", "if", "the", "job", "has", "constraints", "and", "a", "request", "does",...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/JobsImpl.java#L961-L968
SonarSource/sonarqube
server/sonar-db-dao/src/main/java/org/sonar/db/webhook/WebhookDeliveryDao.java
WebhookDeliveryDao.selectOrderedByCeTaskUuid
public List<WebhookDeliveryLiteDto> selectOrderedByCeTaskUuid(DbSession dbSession, String ceTaskUuid, int offset, int limit) { return mapper(dbSession).selectOrderedByCeTaskUuid(ceTaskUuid, new RowBounds(offset, limit)); }
java
public List<WebhookDeliveryLiteDto> selectOrderedByCeTaskUuid(DbSession dbSession, String ceTaskUuid, int offset, int limit) { return mapper(dbSession).selectOrderedByCeTaskUuid(ceTaskUuid, new RowBounds(offset, limit)); }
[ "public", "List", "<", "WebhookDeliveryLiteDto", ">", "selectOrderedByCeTaskUuid", "(", "DbSession", "dbSession", ",", "String", "ceTaskUuid", ",", "int", "offset", ",", "int", "limit", ")", "{", "return", "mapper", "(", "dbSession", ")", ".", "selectOrderedByCeTa...
All the deliveries for the specified CE task. Results are ordered by descending date.
[ "All", "the", "deliveries", "for", "the", "specified", "CE", "task", ".", "Results", "are", "ordered", "by", "descending", "date", "." ]
train
https://github.com/SonarSource/sonarqube/blob/2fffa4c2f79ae3714844d7742796e82822b6a98a/server/sonar-db-dao/src/main/java/org/sonar/db/webhook/WebhookDeliveryDao.java#L67-L69
cdk/cdk
descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/XLogPDescriptor.java
XLogPDescriptor.getAromaticCarbonsCount
private int getAromaticCarbonsCount(IAtomContainer ac, IAtom atom) { List<IAtom> neighbours = ac.getConnectedAtomsList(atom); int carocounter = 0; for (IAtom neighbour : neighbours) { if (neighbour.getSymbol().equals("C") && neighbour.getFlag(CDKConstants.ISAROMATIC)) { ...
java
private int getAromaticCarbonsCount(IAtomContainer ac, IAtom atom) { List<IAtom> neighbours = ac.getConnectedAtomsList(atom); int carocounter = 0; for (IAtom neighbour : neighbours) { if (neighbour.getSymbol().equals("C") && neighbour.getFlag(CDKConstants.ISAROMATIC)) { ...
[ "private", "int", "getAromaticCarbonsCount", "(", "IAtomContainer", "ac", ",", "IAtom", "atom", ")", "{", "List", "<", "IAtom", ">", "neighbours", "=", "ac", ".", "getConnectedAtomsList", "(", "atom", ")", ";", "int", "carocounter", "=", "0", ";", "for", "...
Gets the aromaticCarbonsCount attribute of the XLogPDescriptor object. @param ac Description of the Parameter @param atom Description of the Parameter @return The aromaticCarbonsCount value
[ "Gets", "the", "aromaticCarbonsCount", "attribute", "of", "the", "XLogPDescriptor", "object", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/XLogPDescriptor.java#L1074-L1083
TheBlackChamber/commons-encryption
src/main/java/net/theblackchamber/crypto/implementations/FileEncryptor.java
FileEncryptor.encryptFile
public void encryptFile(File file, boolean replace) throws MissingParameterException, IOException { if(file == null || !file.exists()){ throw new MissingParameterException("File not specified or file does not exist."); } FileInputStream fis = new FileInputStream(file); ByteArrayOutputStream baos = new...
java
public void encryptFile(File file, boolean replace) throws MissingParameterException, IOException { if(file == null || !file.exists()){ throw new MissingParameterException("File not specified or file does not exist."); } FileInputStream fis = new FileInputStream(file); ByteArrayOutputStream baos = new...
[ "public", "void", "encryptFile", "(", "File", "file", ",", "boolean", "replace", ")", "throws", "MissingParameterException", ",", "IOException", "{", "if", "(", "file", "==", "null", "||", "!", "file", ".", "exists", "(", ")", ")", "{", "throw", "new", "...
Encrypt a file. @param file The file to encrypt @param replace True - Replace the specified file with the encrypted version. False - Keep the unencrypted file. @throws MissingParameterException @throws IOException
[ "Encrypt", "a", "file", "." ]
train
https://github.com/TheBlackChamber/commons-encryption/blob/0cbbf7c07ae3c133cc82b6dde7ab7af91ddf64d0/src/main/java/net/theblackchamber/crypto/implementations/FileEncryptor.java#L85-L129
pippo-java/pippo
pippo-core/src/main/java/ro/pippo/core/route/Route.java
Route.PUT
public static Route PUT(String uriPattern, RouteHandler routeHandler) { return new Route(HttpConstants.Method.PUT, uriPattern, routeHandler); }
java
public static Route PUT(String uriPattern, RouteHandler routeHandler) { return new Route(HttpConstants.Method.PUT, uriPattern, routeHandler); }
[ "public", "static", "Route", "PUT", "(", "String", "uriPattern", ",", "RouteHandler", "routeHandler", ")", "{", "return", "new", "Route", "(", "HttpConstants", ".", "Method", ".", "PUT", ",", "uriPattern", ",", "routeHandler", ")", ";", "}" ]
Create a {@code PUT} route. @param uriPattern @param routeHandler @return
[ "Create", "a", "{", "@code", "PUT", "}", "route", "." ]
train
https://github.com/pippo-java/pippo/blob/cb5ccb453bffcc3cf386adc660674812d10b9726/pippo-core/src/main/java/ro/pippo/core/route/Route.java#L114-L116
samskivert/samskivert
src/main/java/com/samskivert/swing/util/DialogUtil.java
DialogUtil.createDialog
public static JInternalDialog createDialog (JFrame frame, JPanel content) { return createDialog(frame, null, content); }
java
public static JInternalDialog createDialog (JFrame frame, JPanel content) { return createDialog(frame, null, content); }
[ "public", "static", "JInternalDialog", "createDialog", "(", "JFrame", "frame", ",", "JPanel", "content", ")", "{", "return", "createDialog", "(", "frame", ",", "null", ",", "content", ")", ";", "}" ]
Creates and shows an internal dialog with the specified panel.
[ "Creates", "and", "shows", "an", "internal", "dialog", "with", "the", "specified", "panel", "." ]
train
https://github.com/samskivert/samskivert/blob/a64d9ef42b69819bdb2c66bddac6a64caef928b6/src/main/java/com/samskivert/swing/util/DialogUtil.java#L25-L28
BioPAX/Paxtools
paxtools-query/src/main/java/org/biopax/paxtools/query/QueryExecuter.java
QueryExecuter.prepareSingleNodeSetFromSets
public static Set<Node> prepareSingleNodeSetFromSets(Set<Set<BioPAXElement>> sets, Graph graph) { Set<BioPAXElement> elements = new HashSet<BioPAXElement>(); for (Set<BioPAXElement> set : sets) { elements.addAll(set); } return prepareSingleNodeSet(elements, graph); }
java
public static Set<Node> prepareSingleNodeSetFromSets(Set<Set<BioPAXElement>> sets, Graph graph) { Set<BioPAXElement> elements = new HashSet<BioPAXElement>(); for (Set<BioPAXElement> set : sets) { elements.addAll(set); } return prepareSingleNodeSet(elements, graph); }
[ "public", "static", "Set", "<", "Node", ">", "prepareSingleNodeSetFromSets", "(", "Set", "<", "Set", "<", "BioPAXElement", ">", ">", "sets", ",", "Graph", "graph", ")", "{", "Set", "<", "BioPAXElement", ">", "elements", "=", "new", "HashSet", "<", "BioPAXE...
Gets the related wrappers of the given elements in the sets. @param sets Sets of elements to get the related wrappers @param graph Owner graph @return Related wrappers in a set
[ "Gets", "the", "related", "wrappers", "of", "the", "given", "elements", "in", "the", "sets", "." ]
train
https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/paxtools-query/src/main/java/org/biopax/paxtools/query/QueryExecuter.java#L525-L533
icode/ameba
src/main/java/ameba/websocket/internal/LocalizationMessages.java
LocalizationMessages.ENDPOINT_UNKNOWN_PARAMS
public static String ENDPOINT_UNKNOWN_PARAMS(Object arg0, Object arg1, Object arg2) { return localizer.localize(localizableENDPOINT_UNKNOWN_PARAMS(arg0, arg1, arg2)); }
java
public static String ENDPOINT_UNKNOWN_PARAMS(Object arg0, Object arg1, Object arg2) { return localizer.localize(localizableENDPOINT_UNKNOWN_PARAMS(arg0, arg1, arg2)); }
[ "public", "static", "String", "ENDPOINT_UNKNOWN_PARAMS", "(", "Object", "arg0", ",", "Object", "arg1", ",", "Object", "arg2", ")", "{", "return", "localizer", ".", "localize", "(", "localizableENDPOINT_UNKNOWN_PARAMS", "(", "arg0", ",", "arg1", ",", "arg2", ")",...
Unknown parameter(s) for {0}.{1} method annotated with @OnError annotation: {2}. This method will be ignored.
[ "Unknown", "parameter", "(", "s", ")", "for", "{", "0", "}", ".", "{", "1", "}", "method", "annotated", "with" ]
train
https://github.com/icode/ameba/blob/9d4956e935898e41331b2745e400ef869cd265e0/src/main/java/ameba/websocket/internal/LocalizationMessages.java#L66-L68
UrielCh/ovh-java-sdk
ovh-java-sdk-emailexchange/src/main/java/net/minidev/ovh/api/ApiOvhEmailexchange.java
ApiOvhEmailexchange.organizationName_service_exchangeService_domain_POST
public OvhTask organizationName_service_exchangeService_domain_POST(String organizationName, String exchangeService, Boolean configureAutodiscover, Boolean configureMx, Boolean main, String mxRelay, String name, String organization2010, OvhDomainTypeEnum type) throws IOException { String qPath = "/email/exchange/{org...
java
public OvhTask organizationName_service_exchangeService_domain_POST(String organizationName, String exchangeService, Boolean configureAutodiscover, Boolean configureMx, Boolean main, String mxRelay, String name, String organization2010, OvhDomainTypeEnum type) throws IOException { String qPath = "/email/exchange/{org...
[ "public", "OvhTask", "organizationName_service_exchangeService_domain_POST", "(", "String", "organizationName", ",", "String", "exchangeService", ",", "Boolean", "configureAutodiscover", ",", "Boolean", "configureMx", ",", "Boolean", "main", ",", "String", "mxRelay", ",", ...
Create new domain in exchange services REST: POST /email/exchange/{organizationName}/service/{exchangeService}/domain @param configureMx [required] If you host domain in OVH we can configure mx record automatically @param type [required] Type of domain that You want to install @param name [required] Domain to install ...
[ "Create", "new", "domain", "in", "exchange", "services" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-emailexchange/src/main/java/net/minidev/ovh/api/ApiOvhEmailexchange.java#L445-L458
Azure/azure-sdk-for-java
cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/CheckSkuAvailabilitysInner.java
CheckSkuAvailabilitysInner.listAsync
public Observable<CheckSkuAvailabilityResultListInner> listAsync(String location, List<SkuName> skus, Kind kind, String type) { return listWithServiceResponseAsync(location, skus, kind, type).map(new Func1<ServiceResponse<CheckSkuAvailabilityResultListInner>, CheckSkuAvailabilityResultListInner>() { ...
java
public Observable<CheckSkuAvailabilityResultListInner> listAsync(String location, List<SkuName> skus, Kind kind, String type) { return listWithServiceResponseAsync(location, skus, kind, type).map(new Func1<ServiceResponse<CheckSkuAvailabilityResultListInner>, CheckSkuAvailabilityResultListInner>() { ...
[ "public", "Observable", "<", "CheckSkuAvailabilityResultListInner", ">", "listAsync", "(", "String", "location", ",", "List", "<", "SkuName", ">", "skus", ",", "Kind", "kind", ",", "String", "type", ")", "{", "return", "listWithServiceResponseAsync", "(", "locatio...
Check available SKUs. @param location Resource location. @param skus The SKU of the resource. @param kind The Kind of the resource. Possible values include: 'Bing.Autosuggest.v7', 'Bing.CustomSearch', 'Bing.Search.v7', 'Bing.Speech', 'Bing.SpellCheck.v7', 'ComputerVision', 'ContentModerator', 'CustomSpeech', 'CustomVi...
[ "Check", "available", "SKUs", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/CheckSkuAvailabilitysInner.java#L107-L114
facebookarchive/hadoop-20
src/contrib/highavailability/src/java/org/apache/hadoop/hdfs/DistributedAvatarFileSystem.java
DistributedAvatarFileSystem.getFileStatus
public FileStatus getFileStatus(final Path f, final boolean useStandby) throws IOException { return new StandbyCaller<FileStatus>() { @Override FileStatus call(DistributedFileSystem fs) throws IOException { return fs.getFileStatus(f); } }.callFS(useStandby); }
java
public FileStatus getFileStatus(final Path f, final boolean useStandby) throws IOException { return new StandbyCaller<FileStatus>() { @Override FileStatus call(DistributedFileSystem fs) throws IOException { return fs.getFileStatus(f); } }.callFS(useStandby); }
[ "public", "FileStatus", "getFileStatus", "(", "final", "Path", "f", ",", "final", "boolean", "useStandby", ")", "throws", "IOException", "{", "return", "new", "StandbyCaller", "<", "FileStatus", ">", "(", ")", "{", "@", "Override", "FileStatus", "call", "(", ...
Return the stat information about a file. @param f path @param useStandby flag indicating whether to read from standby avatar @throws FileNotFoundException if the file does not exist.
[ "Return", "the", "stat", "information", "about", "a", "file", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/highavailability/src/java/org/apache/hadoop/hdfs/DistributedAvatarFileSystem.java#L464-L472
moparisthebest/beehive
beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/PageFlowManagedObject.java
PageFlowManagedObject.reinitializeIfNecessary
void reinitializeIfNecessary(HttpServletRequest request, HttpServletResponse response, ServletContext servletContext) { if (_servletContext == null) { reinitialize(request, response, servletContext); } }
java
void reinitializeIfNecessary(HttpServletRequest request, HttpServletResponse response, ServletContext servletContext) { if (_servletContext == null) { reinitialize(request, response, servletContext); } }
[ "void", "reinitializeIfNecessary", "(", "HttpServletRequest", "request", ",", "HttpServletResponse", "response", ",", "ServletContext", "servletContext", ")", "{", "if", "(", "_servletContext", "==", "null", ")", "{", "reinitialize", "(", "request", ",", "response", ...
Internal method to reinitialize only if necessary. The test is whether the ServletContext reference has been lost.
[ "Internal", "method", "to", "reinitialize", "only", "if", "necessary", ".", "The", "test", "is", "whether", "the", "ServletContext", "reference", "has", "been", "lost", "." ]
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/PageFlowManagedObject.java#L80-L85
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/NamespaceDataPersister.java
NamespaceDataPersister.addNamespaces
public void addNamespaces(Map<String, String> namespaceMap) throws RepositoryException { if (!started) { log.warn("Unable save namespaces in to the storage. Storage not initialized"); return; } PlainChangesLog changesLog = new PlainChangesLogImpl(); for (Map.Entry<Str...
java
public void addNamespaces(Map<String, String> namespaceMap) throws RepositoryException { if (!started) { log.warn("Unable save namespaces in to the storage. Storage not initialized"); return; } PlainChangesLog changesLog = new PlainChangesLogImpl(); for (Map.Entry<Str...
[ "public", "void", "addNamespaces", "(", "Map", "<", "String", ",", "String", ">", "namespaceMap", ")", "throws", "RepositoryException", "{", "if", "(", "!", "started", ")", "{", "log", ".", "warn", "(", "\"Unable save namespaces in to the storage. Storage not initia...
Add new namespace. @param namespaceMap @throws RepositoryException Repository error
[ "Add", "new", "namespace", "." ]
train
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/NamespaceDataPersister.java#L137-L160
JOML-CI/JOML
src/org/joml/Matrix4f.java
Matrix4f.rotationTowards
public Matrix4f rotationTowards(Vector3fc dir, Vector3fc up) { return rotationTowards(dir.x(), dir.y(), dir.z(), up.x(), up.y(), up.z()); }
java
public Matrix4f rotationTowards(Vector3fc dir, Vector3fc up) { return rotationTowards(dir.x(), dir.y(), dir.z(), up.x(), up.y(), up.z()); }
[ "public", "Matrix4f", "rotationTowards", "(", "Vector3fc", "dir", ",", "Vector3fc", "up", ")", "{", "return", "rotationTowards", "(", "dir", ".", "x", "(", ")", ",", "dir", ".", "y", "(", ")", ",", "dir", ".", "z", "(", ")", ",", "up", ".", "x", ...
Set this matrix to a model transformation for a right-handed coordinate system, that aligns the local <code>-z</code> axis with <code>dir</code>. <p> In order to apply the rotation transformation to a previous existing transformation, use {@link #rotateTowards(float, float, float, float, float, float) rotateTowards}. <...
[ "Set", "this", "matrix", "to", "a", "model", "transformation", "for", "a", "right", "-", "handed", "coordinate", "system", "that", "aligns", "the", "local", "<code", ">", "-", "z<", "/", "code", ">", "axis", "with", "<code", ">", "dir<", "/", "code", "...
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Matrix4f.java#L14306-L14308
looly/hutool
hutool-captcha/src/main/java/cn/hutool/captcha/ShearCaptcha.java
ShearCaptcha.shearY
private void shearY(Graphics g, int w1, int h1, Color color) { int period = RandomUtil.randomInt(40) + 10; // 50; boolean borderGap = true; int frames = 20; int phase = 7; for (int i = 0; i < w1; i++) { double d = (double) (period >> 1) * Math.sin((double) i / (double) period + (6.283185307179586...
java
private void shearY(Graphics g, int w1, int h1, Color color) { int period = RandomUtil.randomInt(40) + 10; // 50; boolean borderGap = true; int frames = 20; int phase = 7; for (int i = 0; i < w1; i++) { double d = (double) (period >> 1) * Math.sin((double) i / (double) period + (6.283185307179586...
[ "private", "void", "shearY", "(", "Graphics", "g", ",", "int", "w1", ",", "int", "h1", ",", "Color", "color", ")", "{", "int", "period", "=", "RandomUtil", ".", "randomInt", "(", "40", ")", "+", "10", ";", "// 50;\r", "boolean", "borderGap", "=", "tr...
X坐标扭曲 @param g {@link Graphics} @param w1 w1 @param h1 h1 @param color 颜色
[ "X坐标扭曲" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-captcha/src/main/java/cn/hutool/captcha/ShearCaptcha.java#L150-L168
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/collection/impl/queue/QueueContainer.java
QueueContainer.txnOfferBackupReserve
public void txnOfferBackupReserve(long itemId, String transactionId) { TxQueueItem o = txnOfferReserveInternal(itemId, transactionId); if (o != null) { logger.severe("txnOfferBackupReserve operation-> Item exists already at txMap for itemId: " + itemId); } }
java
public void txnOfferBackupReserve(long itemId, String transactionId) { TxQueueItem o = txnOfferReserveInternal(itemId, transactionId); if (o != null) { logger.severe("txnOfferBackupReserve operation-> Item exists already at txMap for itemId: " + itemId); } }
[ "public", "void", "txnOfferBackupReserve", "(", "long", "itemId", ",", "String", "transactionId", ")", "{", "TxQueueItem", "o", "=", "txnOfferReserveInternal", "(", "itemId", ",", "transactionId", ")", ";", "if", "(", "o", "!=", "null", ")", "{", "logger", "...
Reserves an ID for a future queue item and associates it with the given {@code transactionId}. The item is not yet visible in the queue, it is just reserved for future insertion. @param transactionId the ID of the transaction offering this item @param itemId the ID of the item being reserved
[ "Reserves", "an", "ID", "for", "a", "future", "queue", "item", "and", "associates", "it", "with", "the", "given", "{", "@code", "transactionId", "}", ".", "The", "item", "is", "not", "yet", "visible", "in", "the", "queue", "it", "is", "just", "reserved",...
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/collection/impl/queue/QueueContainer.java#L319-L324
OpenTSDB/opentsdb
src/uid/UniqueId.java
UniqueId.hbaseGet
private Deferred<byte[]> hbaseGet(final byte[] key, final byte[] family) { final GetRequest get = new GetRequest(table, key); get.family(family).qualifier(kind); class GetCB implements Callback<byte[], ArrayList<KeyValue>> { public byte[] call(final ArrayList<KeyValue> row) { if (row == null |...
java
private Deferred<byte[]> hbaseGet(final byte[] key, final byte[] family) { final GetRequest get = new GetRequest(table, key); get.family(family).qualifier(kind); class GetCB implements Callback<byte[], ArrayList<KeyValue>> { public byte[] call(final ArrayList<KeyValue> row) { if (row == null |...
[ "private", "Deferred", "<", "byte", "[", "]", ">", "hbaseGet", "(", "final", "byte", "[", "]", "key", ",", "final", "byte", "[", "]", "family", ")", "{", "final", "GetRequest", "get", "=", "new", "GetRequest", "(", "table", ",", "key", ")", ";", "g...
Returns the cell of the specified row key, using family:kind.
[ "Returns", "the", "cell", "of", "the", "specified", "row", "key", "using", "family", ":", "kind", "." ]
train
https://github.com/OpenTSDB/opentsdb/blob/3fc2d491c3c1ad397252c0a80203a69a3f9e3ef3/src/uid/UniqueId.java#L1338-L1350
fcrepo4/fcrepo4
fcrepo-kernel-modeshape/src/main/java/org/fcrepo/kernel/modeshape/services/NodeServiceImpl.java
NodeServiceImpl.copyObject
@Override public void copyObject(final FedoraSession session, final String source, final String destination) { final Session jcrSession = getJcrSession(session); try { jcrSession.getWorkspace().copy(source, destination); touchLdpMembershipResource(getJcrNode(find(session, des...
java
@Override public void copyObject(final FedoraSession session, final String source, final String destination) { final Session jcrSession = getJcrSession(session); try { jcrSession.getWorkspace().copy(source, destination); touchLdpMembershipResource(getJcrNode(find(session, des...
[ "@", "Override", "public", "void", "copyObject", "(", "final", "FedoraSession", "session", ",", "final", "String", "source", ",", "final", "String", "destination", ")", "{", "final", "Session", "jcrSession", "=", "getJcrSession", "(", "session", ")", ";", "try...
Copy an existing object from the source path to the destination path @param session a JCR session @param source the source path @param destination the destination path
[ "Copy", "an", "existing", "object", "from", "the", "source", "path", "to", "the", "destination", "path" ]
train
https://github.com/fcrepo4/fcrepo4/blob/7489ad5bc8fb44e2442c93eceb7d97ac54553ab6/fcrepo-kernel-modeshape/src/main/java/org/fcrepo/kernel/modeshape/services/NodeServiceImpl.java#L92-L101
Netflix/conductor
client/src/main/java/com/netflix/conductor/client/http/ClientBase.java
ClientBase.downloadFromExternalStorage
@SuppressWarnings("unchecked") protected Map<String, Object> downloadFromExternalStorage(ExternalPayloadStorage.PayloadType payloadType, String path) { Preconditions.checkArgument(StringUtils.isNotBlank(path), "uri cannot be blank"); ExternalStorageLocation externalStorageLocation = payloadStorage.g...
java
@SuppressWarnings("unchecked") protected Map<String, Object> downloadFromExternalStorage(ExternalPayloadStorage.PayloadType payloadType, String path) { Preconditions.checkArgument(StringUtils.isNotBlank(path), "uri cannot be blank"); ExternalStorageLocation externalStorageLocation = payloadStorage.g...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "protected", "Map", "<", "String", ",", "Object", ">", "downloadFromExternalStorage", "(", "ExternalPayloadStorage", ".", "PayloadType", "payloadType", ",", "String", "path", ")", "{", "Preconditions", ".", "checkA...
Uses the {@link PayloadStorage} for downloading large payloads to be used by the client. Gets the uri of the payload fom the server and then downloads from this location. @param payloadType the {@link com.netflix.conductor.common.utils.ExternalPayloadStorage.PayloadType} to be downloaded @param path the relativ...
[ "Uses", "the", "{", "@link", "PayloadStorage", "}", "for", "downloading", "large", "payloads", "to", "be", "used", "by", "the", "client", ".", "Gets", "the", "uri", "of", "the", "payload", "fom", "the", "server", "and", "then", "downloads", "from", "this",...
train
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/client/src/main/java/com/netflix/conductor/client/http/ClientBase.java#L219-L230
SahaginOrg/sahagin-java
src/main/java/org/sahagin/runlib/runresultsgen/RunResultsGenerateHookSetter.java
RunResultsGenerateHookSetter.beforeHookInsertLine
private int beforeHookInsertLine(TestMethod method, int codeLineIndex) { if (!isLineLastStament(method, codeLineIndex)) { // don't insert the beforeHook since afterHook does not inserted to this line return -1; } // so that not to insert the hook to the middle of the lin...
java
private int beforeHookInsertLine(TestMethod method, int codeLineIndex) { if (!isLineLastStament(method, codeLineIndex)) { // don't insert the beforeHook since afterHook does not inserted to this line return -1; } // so that not to insert the hook to the middle of the lin...
[ "private", "int", "beforeHookInsertLine", "(", "TestMethod", "method", ",", "int", "codeLineIndex", ")", "{", "if", "(", "!", "isLineLastStament", "(", "method", ",", "codeLineIndex", ")", ")", "{", "// don't insert the beforeHook since afterHook does not inserted to this...
Returns -1 if beforeHook for the codeLineIndex should not be inserted
[ "Returns", "-", "1", "if", "beforeHook", "for", "the", "codeLineIndex", "should", "not", "be", "inserted" ]
train
https://github.com/SahaginOrg/sahagin-java/blob/7ace428adebe3466ceb5826bc9681f8e3d52be68/src/main/java/org/sahagin/runlib/runresultsgen/RunResultsGenerateHookSetter.java#L128-L145
UrielCh/ovh-java-sdk
ovh-java-sdk-freefax/src/main/java/net/minidev/ovh/api/ApiOvhFreefax.java
ApiOvhFreefax.serviceName_voicemail_changeRouting_POST
public void serviceName_voicemail_changeRouting_POST(String serviceName, OvhVoicefaxRoutingEnum routing) throws IOException { String qPath = "/freefax/{serviceName}/voicemail/changeRouting"; StringBuilder sb = path(qPath, serviceName); HashMap<String, Object>o = new HashMap<String, Object>(); addBody(o, "routin...
java
public void serviceName_voicemail_changeRouting_POST(String serviceName, OvhVoicefaxRoutingEnum routing) throws IOException { String qPath = "/freefax/{serviceName}/voicemail/changeRouting"; StringBuilder sb = path(qPath, serviceName); HashMap<String, Object>o = new HashMap<String, Object>(); addBody(o, "routin...
[ "public", "void", "serviceName_voicemail_changeRouting_POST", "(", "String", "serviceName", ",", "OvhVoicefaxRoutingEnum", "routing", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/freefax/{serviceName}/voicemail/changeRouting\"", ";", "StringBuilder", "sb", "...
Disable/Enable voicemail. Available only if the line has fax capabilities REST: POST /freefax/{serviceName}/voicemail/changeRouting @param routing [required] Activate or Desactivate voicemail on the line @param serviceName [required] Freefax number
[ "Disable", "/", "Enable", "voicemail", ".", "Available", "only", "if", "the", "line", "has", "fax", "capabilities" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-freefax/src/main/java/net/minidev/ovh/api/ApiOvhFreefax.java#L126-L132
pravega/pravega
segmentstore/storage/impl/src/main/java/io/pravega/segmentstore/storage/impl/bookkeeper/BookKeeperLog.java
BookKeeperLog.initialize
@Override public void initialize(Duration timeout) throws DurableDataLogException { List<Long> ledgersToDelete; LogMetadata newMetadata; synchronized (this.lock) { Preconditions.checkState(this.writeLedger == null, "BookKeeperLog is already initialized."); assert this...
java
@Override public void initialize(Duration timeout) throws DurableDataLogException { List<Long> ledgersToDelete; LogMetadata newMetadata; synchronized (this.lock) { Preconditions.checkState(this.writeLedger == null, "BookKeeperLog is already initialized."); assert this...
[ "@", "Override", "public", "void", "initialize", "(", "Duration", "timeout", ")", "throws", "DurableDataLogException", "{", "List", "<", "Long", ">", "ledgersToDelete", ";", "LogMetadata", "newMetadata", ";", "synchronized", "(", "this", ".", "lock", ")", "{", ...
Open-Fences this BookKeeper log using the following protocol: 1. Read Log Metadata from ZooKeeper. 2. Fence at least the last 2 ledgers in the Ledger List. 3. Create a new Ledger. 3.1 If any of the steps so far fails, the process is interrupted at the point of failure, and no cleanup is attempted. 4. Update Log Metadat...
[ "Open", "-", "Fences", "this", "BookKeeper", "log", "using", "the", "following", "protocol", ":", "1", ".", "Read", "Log", "Metadata", "from", "ZooKeeper", ".", "2", ".", "Fence", "at", "least", "the", "last", "2", "ledgers", "in", "the", "Ledger", "List...
train
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/segmentstore/storage/impl/src/main/java/io/pravega/segmentstore/storage/impl/bookkeeper/BookKeeperLog.java#L205-L253