repository_name
stringlengths
7
58
func_path_in_repository
stringlengths
11
218
func_name
stringlengths
4
140
whole_func_string
stringlengths
153
5.32k
language
stringclasses
1 value
func_code_string
stringlengths
72
4k
func_code_tokens
listlengths
20
832
func_documentation_string
stringlengths
61
2k
func_documentation_tokens
listlengths
1
647
split_name
stringclasses
1 value
func_code_url
stringlengths
102
339
apache/spark
sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/thrift/ThriftHttpServlet.java
ThriftHttpServlet.createCookie
private Cookie createCookie(String str) throws UnsupportedEncodingException { """ Generate a server side cookie given the cookie value as the input. @param str Input string token. @return The generated cookie. @throws UnsupportedEncodingException """ if (LOG.isDebugEnabled()) { LOG.debug("Cookie n...
java
private Cookie createCookie(String str) throws UnsupportedEncodingException { if (LOG.isDebugEnabled()) { LOG.debug("Cookie name = " + AUTH_COOKIE + " value = " + str); } Cookie cookie = new Cookie(AUTH_COOKIE, str); cookie.setMaxAge(cookieMaxAge); if (cookieDomain != null) { cookie.set...
[ "private", "Cookie", "createCookie", "(", "String", "str", ")", "throws", "UnsupportedEncodingException", "{", "if", "(", "LOG", ".", "isDebugEnabled", "(", ")", ")", "{", "LOG", ".", "debug", "(", "\"Cookie name = \"", "+", "AUTH_COOKIE", "+", "\" value = \"", ...
Generate a server side cookie given the cookie value as the input. @param str Input string token. @return The generated cookie. @throws UnsupportedEncodingException
[ "Generate", "a", "server", "side", "cookie", "given", "the", "cookie", "value", "as", "the", "input", "." ]
train
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/thrift/ThriftHttpServlet.java#L281-L296
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/WebUtilities.java
WebUtilities.updateBeanValue
public static void updateBeanValue(final WComponent component, final boolean visibleOnly) { """ Updates the bean value with the current value of the component and all its bean-bound children. @param component the component whose contents need to be copied to the bean. @param visibleOnly - whether to include vi...
java
public static void updateBeanValue(final WComponent component, final boolean visibleOnly) { // Do not process if component is invisble and ignore visible is true. Will ignore entire branch from this point. if (!component.isVisible() && visibleOnly) { return; } if (component instanceof WBeanComponent) { (...
[ "public", "static", "void", "updateBeanValue", "(", "final", "WComponent", "component", ",", "final", "boolean", "visibleOnly", ")", "{", "// Do not process if component is invisble and ignore visible is true. Will ignore entire branch from this point.", "if", "(", "!", "componen...
Updates the bean value with the current value of the component and all its bean-bound children. @param component the component whose contents need to be copied to the bean. @param visibleOnly - whether to include visible components only.
[ "Updates", "the", "bean", "value", "with", "the", "current", "value", "of", "the", "component", "and", "all", "its", "bean", "-", "bound", "children", "." ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/WebUtilities.java#L672-L693
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/Locale.java
Locale.createConstant
private static Locale createConstant(String lang, String country) { """ This method must be called only for creating the Locale.* constants due to making shortcuts. """ BaseLocale base = BaseLocale.createInstance(lang, country); return getInstance(base, null); }
java
private static Locale createConstant(String lang, String country) { BaseLocale base = BaseLocale.createInstance(lang, country); return getInstance(base, null); }
[ "private", "static", "Locale", "createConstant", "(", "String", "lang", ",", "String", "country", ")", "{", "BaseLocale", "base", "=", "BaseLocale", ".", "createInstance", "(", "lang", ",", "country", ")", ";", "return", "getInstance", "(", "base", ",", "nul...
This method must be called only for creating the Locale.* constants due to making shortcuts.
[ "This", "method", "must", "be", "called", "only", "for", "creating", "the", "Locale", ".", "*", "constants", "due", "to", "making", "shortcuts", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/Locale.java#L709-L712
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/multimap/impl/ValueCollectionFactory.java
ValueCollectionFactory.createCollection
public static <T> Collection<T> createCollection(Collection collection) { """ Creates a same type collection with the given collection depending on the {@link com.hazelcast.config.MultiMapConfig#valueCollectionType}. @param collection to be asked to return a new appropriate implementation instance according t...
java
public static <T> Collection<T> createCollection(Collection collection) { MultiMapConfig.ValueCollectionType collectionType = findCollectionType(collection); if (collection.isEmpty()) { return emptyCollection(collectionType); } return createCollection(collectionType, collecti...
[ "public", "static", "<", "T", ">", "Collection", "<", "T", ">", "createCollection", "(", "Collection", "collection", ")", "{", "MultiMapConfig", ".", "ValueCollectionType", "collectionType", "=", "findCollectionType", "(", "collection", ")", ";", "if", "(", "col...
Creates a same type collection with the given collection depending on the {@link com.hazelcast.config.MultiMapConfig#valueCollectionType}. @param collection to be asked to return a new appropriate implementation instance according to {@link MultiMapConfig.ValueCollectionType} @return {@link java.util.Set} or {@link ja...
[ "Creates", "a", "same", "type", "collection", "with", "the", "given", "collection", "depending", "on", "the", "{", "@link", "com", ".", "hazelcast", ".", "config", ".", "MultiMapConfig#valueCollectionType", "}", "." ]
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/multimap/impl/ValueCollectionFactory.java#L59-L65
apache/incubator-gobblin
gobblin-metrics-libs/gobblin-metrics/src/main/java/org/apache/gobblin/metrics/GobblinMetrics.java
GobblinMetrics.getMeter
public Meter getMeter(String prefix, String... suffixes) { """ Get a {@link Meter} with the given name prefix and suffixes. @param prefix the given name prefix @param suffixes the given name suffixes @return a {@link Meter} with the given name prefix and suffixes """ return this.metricContext.meter(Me...
java
public Meter getMeter(String prefix, String... suffixes) { return this.metricContext.meter(MetricRegistry.name(prefix, suffixes)); }
[ "public", "Meter", "getMeter", "(", "String", "prefix", ",", "String", "...", "suffixes", ")", "{", "return", "this", ".", "metricContext", ".", "meter", "(", "MetricRegistry", ".", "name", "(", "prefix", ",", "suffixes", ")", ")", ";", "}" ]
Get a {@link Meter} with the given name prefix and suffixes. @param prefix the given name prefix @param suffixes the given name suffixes @return a {@link Meter} with the given name prefix and suffixes
[ "Get", "a", "{", "@link", "Meter", "}", "with", "the", "given", "name", "prefix", "and", "suffixes", "." ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-metrics-libs/gobblin-metrics/src/main/java/org/apache/gobblin/metrics/GobblinMetrics.java#L312-L314
datumbox/datumbox-framework
datumbox-framework-core/src/main/java/com/datumbox/framework/core/common/text/parsers/URLParser.java
URLParser.toAbsolute
public static URL toAbsolute(URL baseURL, String relative) { """ Converts a relative URL to absolute URL. @param baseURL @param relative @return """ try { return new URL(baseURL, relative); } catch (MalformedURLException ex) { throw new RuntimeException(ex)...
java
public static URL toAbsolute(URL baseURL, String relative) { try { return new URL(baseURL, relative); } catch (MalformedURLException ex) { throw new RuntimeException(ex); } }
[ "public", "static", "URL", "toAbsolute", "(", "URL", "baseURL", ",", "String", "relative", ")", "{", "try", "{", "return", "new", "URL", "(", "baseURL", ",", "relative", ")", ";", "}", "catch", "(", "MalformedURLException", "ex", ")", "{", "throw", "new"...
Converts a relative URL to absolute URL. @param baseURL @param relative @return
[ "Converts", "a", "relative", "URL", "to", "absolute", "URL", "." ]
train
https://github.com/datumbox/datumbox-framework/blob/909dff0476e80834f05ecdde0624dd2390e9b0ca/datumbox-framework-core/src/main/java/com/datumbox/framework/core/common/text/parsers/URLParser.java#L115-L122
JOML-CI/JOML
src/org/joml/Matrix4d.java
Matrix4d.scaleAround
public Matrix4d scaleAround(double factor, double ox, double oy, double oz) { """ Apply scaling to this matrix by scaling all three base axes by the given <code>factor</code> while using <code>(ox, oy, oz)</code> as the scaling origin. <p> If <code>M</code> is <code>this</code> matrix and <code>S</code> the sca...
java
public Matrix4d scaleAround(double factor, double ox, double oy, double oz) { return scaleAround(factor, factor, factor, ox, oy, oz, this); }
[ "public", "Matrix4d", "scaleAround", "(", "double", "factor", ",", "double", "ox", ",", "double", "oy", ",", "double", "oz", ")", "{", "return", "scaleAround", "(", "factor", ",", "factor", ",", "factor", ",", "ox", ",", "oy", ",", "oz", ",", "this", ...
Apply scaling to this matrix by scaling all three base axes by the given <code>factor</code> while using <code>(ox, oy, oz)</code> as the scaling origin. <p> If <code>M</code> is <code>this</code> matrix and <code>S</code> the scaling matrix, then the new matrix will be <code>M * S</code>. So when transforming a vector...
[ "Apply", "scaling", "to", "this", "matrix", "by", "scaling", "all", "three", "base", "axes", "by", "the", "given", "<code", ">", "factor<", "/", "code", ">", "while", "using", "<code", ">", "(", "ox", "oy", "oz", ")", "<", "/", "code", ">", "as", "...
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Matrix4d.java#L4503-L4505
xmlet/XsdAsmFaster
src/main/java/org/xmlet/xsdasmfaster/classes/XsdAsmInterfaces.java
XsdAsmInterfaces.createSequence
private void createSequence(ClassWriter classWriter, Stream<XsdAbstractElement> xsdElements, String className, int interfaceIndex, String apiName, String groupName) { """ Obtains sequence information and creates all the required classes and methods. @param classWriter The {@link ClassWriter} of the class that con...
java
private void createSequence(ClassWriter classWriter, Stream<XsdAbstractElement> xsdElements, String className, int interfaceIndex, String apiName, String groupName) { SequenceMethodInfo sequenceInfo = getSequenceInfo(xsdElements, className, interfaceIndex, 0, apiName, groupName); List<XsdAbstractElement...
[ "private", "void", "createSequence", "(", "ClassWriter", "classWriter", ",", "Stream", "<", "XsdAbstractElement", ">", "xsdElements", ",", "String", "className", ",", "int", "interfaceIndex", ",", "String", "apiName", ",", "String", "groupName", ")", "{", "Sequenc...
Obtains sequence information and creates all the required classes and methods. @param classWriter The {@link ClassWriter} of the class that contains the sequence. @param xsdElements A {@link Stream} of {@link XsdElement}, ordered, that represent the sequence. @param className The className of the element which contains...
[ "Obtains", "sequence", "information", "and", "creates", "all", "the", "required", "classes", "and", "methods", "." ]
train
https://github.com/xmlet/XsdAsmFaster/blob/ccb78f9dd4b957ad5ac1ca349eaf24338c421e94/src/main/java/org/xmlet/xsdasmfaster/classes/XsdAsmInterfaces.java#L383-L413
jferard/fastods
fastods/src/main/java/com/github/jferard/fastods/style/TableCellStyleBuilder.java
TableCellStyleBuilder.borderLeft
public TableCellStyleBuilder borderLeft(final Length size, final Color borderColor, final BorderAttribute.Style style) { """ Add a border style for the left border of this cell. @param size the size of the line @param borderColor the color to be used in format...
java
public TableCellStyleBuilder borderLeft(final Length size, final Color borderColor, final BorderAttribute.Style style) { final BorderAttribute bs = new BorderAttribute(size, borderColor, style); this.bordersBuilder.left(bs); return this; }
[ "public", "TableCellStyleBuilder", "borderLeft", "(", "final", "Length", "size", ",", "final", "Color", "borderColor", ",", "final", "BorderAttribute", ".", "Style", "style", ")", "{", "final", "BorderAttribute", "bs", "=", "new", "BorderAttribute", "(", "size", ...
Add a border style for the left border of this cell. @param size the size of the line @param borderColor the color to be used in format #rrggbb e.g. '#ff0000' for a red border @param style the style of the border line, either BorderAttribute.BORDER_SOLID or BorderAttribute.BORDER_DOUBLE @return this for f...
[ "Add", "a", "border", "style", "for", "the", "left", "border", "of", "this", "cell", "." ]
train
https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/style/TableCellStyleBuilder.java#L128-L133
elki-project/elki
elki-core-api/src/main/java/de/lmu/ifi/dbs/elki/data/spatial/SpatialUtil.java
SpatialUtil.volumeUnionScaled
public static double volumeUnionScaled(SpatialComparable box1, SpatialComparable box2, double scale) { """ Compute the volume (area) of the union of two MBRs. @param box1 First object @param box2 Second object @param scale Scaling factor @return Volume of union """ final int dim = assertSameDimension...
java
public static double volumeUnionScaled(SpatialComparable box1, SpatialComparable box2, double scale) { final int dim = assertSameDimensionality(box1, box2); double volume = 1.; for(int i = 0; i < dim; i++) { final double min = Math.min(box1.getMin(i), box2.getMin(i)); final double max = Math.max...
[ "public", "static", "double", "volumeUnionScaled", "(", "SpatialComparable", "box1", ",", "SpatialComparable", "box2", ",", "double", "scale", ")", "{", "final", "int", "dim", "=", "assertSameDimensionality", "(", "box1", ",", "box2", ")", ";", "double", "volume...
Compute the volume (area) of the union of two MBRs. @param box1 First object @param box2 Second object @param scale Scaling factor @return Volume of union
[ "Compute", "the", "volume", "(", "area", ")", "of", "the", "union", "of", "two", "MBRs", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-api/src/main/java/de/lmu/ifi/dbs/elki/data/spatial/SpatialUtil.java#L217-L226
SeleniumHQ/selenium
java/client/src/org/openqa/selenium/interactions/Actions.java
Actions.keyUp
public Actions keyUp(CharSequence key) { """ Performs a modifier key release. Releasing a non-depressed modifier key will yield undefined behaviour. @param key Either {@link Keys#SHIFT}, {@link Keys#ALT} or {@link Keys#CONTROL}. @return A self reference. """ if (isBuildingActions()) { action.add...
java
public Actions keyUp(CharSequence key) { if (isBuildingActions()) { action.addAction(new KeyUpAction(jsonKeyboard, jsonMouse, asKeys(key))); } return addKeyAction(key, codePoint -> tick(defaultKeyboard.createKeyUp(codePoint))); }
[ "public", "Actions", "keyUp", "(", "CharSequence", "key", ")", "{", "if", "(", "isBuildingActions", "(", ")", ")", "{", "action", ".", "addAction", "(", "new", "KeyUpAction", "(", "jsonKeyboard", ",", "jsonMouse", ",", "asKeys", "(", "key", ")", ")", ")"...
Performs a modifier key release. Releasing a non-depressed modifier key will yield undefined behaviour. @param key Either {@link Keys#SHIFT}, {@link Keys#ALT} or {@link Keys#CONTROL}. @return A self reference.
[ "Performs", "a", "modifier", "key", "release", ".", "Releasing", "a", "non", "-", "depressed", "modifier", "key", "will", "yield", "undefined", "behaviour", "." ]
train
https://github.com/SeleniumHQ/selenium/blob/7af172729f17b20269c8ca4ea6f788db48616535/java/client/src/org/openqa/selenium/interactions/Actions.java#L119-L125
looly/hutool
hutool-db/src/main/java/cn/hutool/db/dialect/impl/AnsiSqlDialect.java
AnsiSqlDialect.wrapPageSql
protected SqlBuilder wrapPageSql(SqlBuilder find, Page page) { """ 根据不同数据库在查询SQL语句基础上包装其分页的语句<br> 各自数据库通过重写此方法实现最小改动情况下修改分页语句 @param find 标准查询语句 @param page 分页对象 @return 分页语句 @since 3.2.3 """ // limit A offset B 表示:A就是你需要多少行,B就是查询的起点位置。 return find.append(" limit ").append(page.getPageSize()).append...
java
protected SqlBuilder wrapPageSql(SqlBuilder find, Page page) { // limit A offset B 表示:A就是你需要多少行,B就是查询的起点位置。 return find.append(" limit ").append(page.getPageSize()).append(" offset ").append(page.getStartPosition()); }
[ "protected", "SqlBuilder", "wrapPageSql", "(", "SqlBuilder", "find", ",", "Page", "page", ")", "{", "// limit A offset B 表示:A就是你需要多少行,B就是查询的起点位置。", "return", "find", ".", "append", "(", "\" limit \"", ")", ".", "append", "(", "page", ".", "getPageSize", "(", ")", ...
根据不同数据库在查询SQL语句基础上包装其分页的语句<br> 各自数据库通过重写此方法实现最小改动情况下修改分页语句 @param find 标准查询语句 @param page 分页对象 @return 分页语句 @since 3.2.3
[ "根据不同数据库在查询SQL语句基础上包装其分页的语句<br", ">", "各自数据库通过重写此方法实现最小改动情况下修改分页语句" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-db/src/main/java/cn/hutool/db/dialect/impl/AnsiSqlDialect.java#L134-L137
Azure/azure-sdk-for-java
labservices/resource-manager/v2018_10_15/src/main/java/com/microsoft/azure/management/labservices/v2018_10_15/implementation/LabAccountsInner.java
LabAccountsInner.createLab
public void createLab(String resourceGroupName, String labAccountName, CreateLabProperties createLabProperties) { """ Create a lab in a lab account. @param resourceGroupName The name of the resource group. @param labAccountName The name of the lab Account. @param createLabProperties Properties for creating a ...
java
public void createLab(String resourceGroupName, String labAccountName, CreateLabProperties createLabProperties) { createLabWithServiceResponseAsync(resourceGroupName, labAccountName, createLabProperties).toBlocking().single().body(); }
[ "public", "void", "createLab", "(", "String", "resourceGroupName", ",", "String", "labAccountName", ",", "CreateLabProperties", "createLabProperties", ")", "{", "createLabWithServiceResponseAsync", "(", "resourceGroupName", ",", "labAccountName", ",", "createLabProperties", ...
Create a lab in a lab account. @param resourceGroupName The name of the resource group. @param labAccountName The name of the lab Account. @param createLabProperties Properties for creating a managed lab and a default environment setting @throws IllegalArgumentException thrown if parameters fail the validation @throws...
[ "Create", "a", "lab", "in", "a", "lab", "account", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/labservices/resource-manager/v2018_10_15/src/main/java/com/microsoft/azure/management/labservices/v2018_10_15/implementation/LabAccountsInner.java#L1118-L1120
spotbugs/spotbugs
eclipsePlugin/src/edu/umd/cs/findbugs/plugin/eclipse/quickfix/util/ASTUtil.java
ASTUtil.getStatement
public static Statement getStatement(CompilationUnit compilationUnit, MethodDeclaration method, int startLine, int endLine) throws StatementNotFoundException { """ Return the first <CODE>Statement</CODE> found, that is between the specified start and end line. @param compilationUnit @param method ...
java
public static Statement getStatement(CompilationUnit compilationUnit, MethodDeclaration method, int startLine, int endLine) throws StatementNotFoundException { requireNonNull(compilationUnit, "compilation unit"); requireNonNull(method, "method declaration"); Statement statement = se...
[ "public", "static", "Statement", "getStatement", "(", "CompilationUnit", "compilationUnit", ",", "MethodDeclaration", "method", ",", "int", "startLine", ",", "int", "endLine", ")", "throws", "StatementNotFoundException", "{", "requireNonNull", "(", "compilationUnit", ",...
Return the first <CODE>Statement</CODE> found, that is between the specified start and end line. @param compilationUnit @param method @param startLine @param endLine @return @throws StatementNotFoundException @throws StatementNotFoundException
[ "Return", "the", "first", "<CODE", ">", "Statement<", "/", "CODE", ">", "found", "that", "is", "between", "the", "specified", "start", "and", "end", "line", "." ]
train
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/eclipsePlugin/src/edu/umd/cs/findbugs/plugin/eclipse/quickfix/util/ASTUtil.java#L394-L404
ironjacamar/ironjacamar
codegenerator/src/main/java/org/ironjacamar/codegenerator/code/CciConnFactoryCodeGen.java
CciConnFactoryCodeGen.writeClassBody
@Override public void writeClassBody(Definition def, Writer out) throws IOException { """ Output class code @param def definition @param out Writer @throws IOException ioException """ out.write("public class " + getClassName(def) + " implements ConnectionFactory"); writeLeftCurlyBracket(ou...
java
@Override public void writeClassBody(Definition def, Writer out) throws IOException { out.write("public class " + getClassName(def) + " implements ConnectionFactory"); writeLeftCurlyBracket(out, 0); int indent = 1; writeWithIndent(out, indent, "private Reference reference;\n\n"); ...
[ "@", "Override", "public", "void", "writeClassBody", "(", "Definition", "def", ",", "Writer", "out", ")", "throws", "IOException", "{", "out", ".", "write", "(", "\"public class \"", "+", "getClassName", "(", "def", ")", "+", "\" implements ConnectionFactory\"", ...
Output class code @param def definition @param out Writer @throws IOException ioException
[ "Output", "class", "code" ]
train
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/codegenerator/src/main/java/org/ironjacamar/codegenerator/code/CciConnFactoryCodeGen.java#L43-L71
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/ElemTemplateElement.java
ElemTemplateElement.unexecuteNSDecls
void unexecuteNSDecls(TransformerImpl transformer, String ignorePrefix) throws TransformerException { """ Send endPrefixMapping events to the result tree handler for all declared prefix mappings in the stylesheet. @param transformer non-null reference to the the current transform-time state. @param ignorePref...
java
void unexecuteNSDecls(TransformerImpl transformer, String ignorePrefix) throws TransformerException { try { if (null != m_prefixTable) { SerializationHandler rhandler = transformer.getResultTreeHandler(); int n = m_prefixTable.size(); for (int i = 0; i < n; i++) ...
[ "void", "unexecuteNSDecls", "(", "TransformerImpl", "transformer", ",", "String", "ignorePrefix", ")", "throws", "TransformerException", "{", "try", "{", "if", "(", "null", "!=", "m_prefixTable", ")", "{", "SerializationHandler", "rhandler", "=", "transformer", ".",...
Send endPrefixMapping events to the result tree handler for all declared prefix mappings in the stylesheet. @param transformer non-null reference to the the current transform-time state. @param ignorePrefix string prefix to not endPrefixMapping @throws TransformerException
[ "Send", "endPrefixMapping", "events", "to", "the", "result", "tree", "handler", "for", "all", "declared", "prefix", "mappings", "in", "the", "stylesheet", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/ElemTemplateElement.java#L1226-L1251
hypercube1024/firefly
firefly-common/src/main/java/com/firefly/utils/retry/WaitStrategies.java
WaitStrategies.exponentialWait
public static <V> Action1<TaskContext<V>> exponentialWait(long initTime, TimeUnit timeUnit) { """ The exponential increase sleep time. @param initTime The first sleep time. @param timeUnit The time unit. @param <V> The return value type. @return The wait strategy action. """ return exponenti...
java
public static <V> Action1<TaskContext<V>> exponentialWait(long initTime, TimeUnit timeUnit) { return exponentialWait(initTime, Long.MAX_VALUE, timeUnit); }
[ "public", "static", "<", "V", ">", "Action1", "<", "TaskContext", "<", "V", ">", ">", "exponentialWait", "(", "long", "initTime", ",", "TimeUnit", "timeUnit", ")", "{", "return", "exponentialWait", "(", "initTime", ",", "Long", ".", "MAX_VALUE", ",", "time...
The exponential increase sleep time. @param initTime The first sleep time. @param timeUnit The time unit. @param <V> The return value type. @return The wait strategy action.
[ "The", "exponential", "increase", "sleep", "time", "." ]
train
https://github.com/hypercube1024/firefly/blob/ed3fc75b7c54a65b1e7d8141d01b49144bb423a3/firefly-common/src/main/java/com/firefly/utils/retry/WaitStrategies.java#L67-L69
aboutsip/pkts
pkts-sdp/src/main/java/io/pkts/sdp/impl/SDPWrapper.java
SDPWrapper.processMediaDescription
private RTPInfo processMediaDescription(final Connection connection, final MediaDescription md) throws SdpParseException { """ Convenience method for creating a new {@link RTPInfo} object. @param connection the connection (the c-field) information from the SDP or null if there were none. @param m...
java
private RTPInfo processMediaDescription(final Connection connection, final MediaDescription md) throws SdpParseException { final Media m = md.getMedia(); if ("RTP/AVP".equalsIgnoreCase(m.getProtocol())) { final Connection c = md.getConnection() != null ? null : connection; ...
[ "private", "RTPInfo", "processMediaDescription", "(", "final", "Connection", "connection", ",", "final", "MediaDescription", "md", ")", "throws", "SdpParseException", "{", "final", "Media", "m", "=", "md", ".", "getMedia", "(", ")", ";", "if", "(", "\"RTP/AVP\""...
Convenience method for creating a new {@link RTPInfo} object. @param connection the connection (the c-field) information from the SDP or null if there were none. @param md the media description from the SDP @return a new {@link RTPInfo} object if the {@link MediaDescription} was of type "RTP/AVP", otherwise null. @thr...
[ "Convenience", "method", "for", "creating", "a", "new", "{", "@link", "RTPInfo", "}", "object", "." ]
train
https://github.com/aboutsip/pkts/blob/0f06bb0dac76c812187829f580a8d476ca99a1a1/pkts-sdp/src/main/java/io/pkts/sdp/impl/SDPWrapper.java#L73-L81
appium/java-client
src/main/java/io/appium/java_client/service/local/AppiumServiceBuilder.java
AppiumServiceBuilder.withStartUpTimeOut
public AppiumServiceBuilder withStartUpTimeOut(long time, TimeUnit timeUnit) { """ Sets start up timeout. @param time a time value for the service starting up. @param timeUnit a time unit for the service starting up. @return self-reference. """ checkNotNull(timeUnit); checkArgument(tim...
java
public AppiumServiceBuilder withStartUpTimeOut(long time, TimeUnit timeUnit) { checkNotNull(timeUnit); checkArgument(time > 0, "Time value should be greater than zero", time); this.startupTimeout = time; this.timeUnit = timeUnit; return this; }
[ "public", "AppiumServiceBuilder", "withStartUpTimeOut", "(", "long", "time", ",", "TimeUnit", "timeUnit", ")", "{", "checkNotNull", "(", "timeUnit", ")", ";", "checkArgument", "(", "time", ">", "0", ",", "\"Time value should be greater than zero\"", ",", "time", ")"...
Sets start up timeout. @param time a time value for the service starting up. @param timeUnit a time unit for the service starting up. @return self-reference.
[ "Sets", "start", "up", "timeout", "." ]
train
https://github.com/appium/java-client/blob/5a17759b05d6fda8ef425b3ab6e766c73ed2e8df/src/main/java/io/appium/java_client/service/local/AppiumServiceBuilder.java#L320-L326
google/j2objc
translator/src/main/java/com/google/devtools/j2objc/translate/Functionizer.java
Functionizer.makeFunction
private FunctionDeclaration makeFunction(MethodDeclaration method) { """ Create an equivalent function declaration for a given method. """ ExecutableElement elem = method.getExecutableElement(); TypeElement declaringClass = ElementUtil.getDeclaringClass(elem); boolean isInstanceMethod = !ElementUti...
java
private FunctionDeclaration makeFunction(MethodDeclaration method) { ExecutableElement elem = method.getExecutableElement(); TypeElement declaringClass = ElementUtil.getDeclaringClass(elem); boolean isInstanceMethod = !ElementUtil.isStatic(elem) && !ElementUtil.isConstructor(elem); FunctionDeclaration ...
[ "private", "FunctionDeclaration", "makeFunction", "(", "MethodDeclaration", "method", ")", "{", "ExecutableElement", "elem", "=", "method", ".", "getExecutableElement", "(", ")", ";", "TypeElement", "declaringClass", "=", "ElementUtil", ".", "getDeclaringClass", "(", ...
Create an equivalent function declaration for a given method.
[ "Create", "an", "equivalent", "function", "declaration", "for", "a", "given", "method", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/translate/Functionizer.java#L408-L451
geomajas/geomajas-project-server
plugin/layer-hibernate/hibernate/src/main/java/org/geomajas/layer/hibernate/CriteriaVisitor.java
CriteriaVisitor.parsePropertyName
private String parsePropertyName(String orgPropertyName, Object userData) { """ Go through the property name to see if it is a complex one. If it is, aliases must be declared. @param orgPropertyName The propertyName. Can be complex. @param userData The userData object that is passed in each method of the Fil...
java
private String parsePropertyName(String orgPropertyName, Object userData) { // try to assure the correct separator is used String propertyName = orgPropertyName.replace(HibernateLayerUtil.XPATH_SEPARATOR, HibernateLayerUtil.SEPARATOR); // split the path (separator is defined in the HibernateLayerUtil) String[]...
[ "private", "String", "parsePropertyName", "(", "String", "orgPropertyName", ",", "Object", "userData", ")", "{", "// try to assure the correct separator is used", "String", "propertyName", "=", "orgPropertyName", ".", "replace", "(", "HibernateLayerUtil", ".", "XPATH_SEPARA...
Go through the property name to see if it is a complex one. If it is, aliases must be declared. @param orgPropertyName The propertyName. Can be complex. @param userData The userData object that is passed in each method of the FilterVisitor. Should always be of the info "Criteria". @return property name
[ "Go", "through", "the", "property", "name", "to", "see", "if", "it", "is", "a", "complex", "one", ".", "If", "it", "is", "aliases", "must", "be", "declared", "." ]
train
https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/plugin/layer-hibernate/hibernate/src/main/java/org/geomajas/layer/hibernate/CriteriaVisitor.java#L534-L562
bullhorn/sdk-rest
src/main/java/com/bullhornsdk/data/api/StandardBullhornData.java
StandardBullhornData.handleQueryForEntityEditHistoryFieldChange
protected <T extends EditHistoryEntity> FieldChangeListWrapper handleQueryForEntityEditHistoryFieldChange(Class<T> entityType, String where, Set<String> fieldSet, QueryParams params) { """ Makes the "query" api call for EditHistoryFieldChange <p> <p> HTTP Method: GET @param entityType the EditHistoryEntity t...
java
protected <T extends EditHistoryEntity> FieldChangeListWrapper handleQueryForEntityEditHistoryFieldChange(Class<T> entityType, String where, Set<String> fieldSet, QueryParams params) { Map<String, String> uriVariables = restUriVariablesFactory.getUriVariablesForEditHistoryFieldChangeQuery(BullhornEntityInfo.get...
[ "protected", "<", "T", "extends", "EditHistoryEntity", ">", "FieldChangeListWrapper", "handleQueryForEntityEditHistoryFieldChange", "(", "Class", "<", "T", ">", "entityType", ",", "String", "where", ",", "Set", "<", "String", ">", "fieldSet", ",", "QueryParams", "pa...
Makes the "query" api call for EditHistoryFieldChange <p> <p> HTTP Method: GET @param entityType the EditHistoryEntity type @param where a SQL type where clause @param fieldSet the fields to return, if null or emtpy will default to "*" all @param params optional QueryParams. @return a FieldChangeWrapper con...
[ "Makes", "the", "query", "api", "call", "for", "EditHistoryFieldChange", "<p", ">", "<p", ">", "HTTP", "Method", ":", "GET" ]
train
https://github.com/bullhorn/sdk-rest/blob/0c75a141c768bb31510afc3a412c11bd101eca06/src/main/java/com/bullhornsdk/data/api/StandardBullhornData.java#L983-L989
TheCoder4eu/BootsFaces-OSP
src/main/java/net/bootsfaces/component/selectOneMenu/SelectOneMenuRenderer.java
SelectOneMenuRenderer.renderSelectTag
protected void renderSelectTag(ResponseWriter rw, SelectOneMenu menu) throws IOException { """ Renders the start of the input tag. This method is protected in order to allow third-party frameworks to derive from it. @param rw the response writer @throws IOException may be thrown by the response writer "...
java
protected void renderSelectTag(ResponseWriter rw, SelectOneMenu menu) throws IOException { rw.write("\n"); rw.startElement("select", menu); }
[ "protected", "void", "renderSelectTag", "(", "ResponseWriter", "rw", ",", "SelectOneMenu", "menu", ")", "throws", "IOException", "{", "rw", ".", "write", "(", "\"\\n\"", ")", ";", "rw", ".", "startElement", "(", "\"select\"", ",", "menu", ")", ";", "}" ]
Renders the start of the input tag. This method is protected in order to allow third-party frameworks to derive from it. @param rw the response writer @throws IOException may be thrown by the response writer
[ "Renders", "the", "start", "of", "the", "input", "tag", ".", "This", "method", "is", "protected", "in", "order", "to", "allow", "third", "-", "party", "frameworks", "to", "derive", "from", "it", "." ]
train
https://github.com/TheCoder4eu/BootsFaces-OSP/blob/d1a70952bc240979b5272fa4fe1c7f100873add0/src/main/java/net/bootsfaces/component/selectOneMenu/SelectOneMenuRenderer.java#L529-L532
mapsforge/mapsforge
mapsforge-core/src/main/java/org/mapsforge/core/util/MercatorProjection.java
MercatorProjection.pixelYToTileY
public static int pixelYToTileY(double pixelY, byte zoomLevel, int tileSize) { """ Converts a pixel Y coordinate to the tile Y number. @param pixelY the pixel Y coordinate that should be converted. @param zoomLevel the zoom level at which the coordinate should be converted. @return the tile Y number. "...
java
public static int pixelYToTileY(double pixelY, byte zoomLevel, int tileSize) { return (int) Math.min(Math.max(pixelY / tileSize, 0), Math.pow(2, zoomLevel) - 1); }
[ "public", "static", "int", "pixelYToTileY", "(", "double", "pixelY", ",", "byte", "zoomLevel", ",", "int", "tileSize", ")", "{", "return", "(", "int", ")", "Math", ".", "min", "(", "Math", ".", "max", "(", "pixelY", "/", "tileSize", ",", "0", ")", ",...
Converts a pixel Y coordinate to the tile Y number. @param pixelY the pixel Y coordinate that should be converted. @param zoomLevel the zoom level at which the coordinate should be converted. @return the tile Y number.
[ "Converts", "a", "pixel", "Y", "coordinate", "to", "the", "tile", "Y", "number", "." ]
train
https://github.com/mapsforge/mapsforge/blob/c49c83f7f727552f793dff15cefa532ade030842/mapsforge-core/src/main/java/org/mapsforge/core/util/MercatorProjection.java#L433-L435
BlueBrain/bluima
modules/bluima_typesystem/src/main/java/ch/epfl/bbp/uima/types/FeatureTokens.java
FeatureTokens.setBeginnings
public void setBeginnings(int i, int v) { """ indexed setter for beginnings - sets an indexed value - @generated @param i index in the array to set @param v value to set into the array """ if (FeatureTokens_Type.featOkTst && ((FeatureTokens_Type)jcasType).casFeat_beginnings == null) jcasType.jcas...
java
public void setBeginnings(int i, int v) { if (FeatureTokens_Type.featOkTst && ((FeatureTokens_Type)jcasType).casFeat_beginnings == null) jcasType.jcas.throwFeatMissing("beginnings", "ch.epfl.bbp.uima.types.FeatureTokens"); jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((FeatureToken...
[ "public", "void", "setBeginnings", "(", "int", "i", ",", "int", "v", ")", "{", "if", "(", "FeatureTokens_Type", ".", "featOkTst", "&&", "(", "(", "FeatureTokens_Type", ")", "jcasType", ")", ".", "casFeat_beginnings", "==", "null", ")", "jcasType", ".", "jc...
indexed setter for beginnings - sets an indexed value - @generated @param i index in the array to set @param v value to set into the array
[ "indexed", "setter", "for", "beginnings", "-", "sets", "an", "indexed", "value", "-" ]
train
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/ch/epfl/bbp/uima/types/FeatureTokens.java#L162-L166
apache/incubator-gobblin
gobblin-config-management/gobblin-config-client/src/main/java/org/apache/gobblin/config/client/ConfigClientUtils.java
ConfigClientUtils.isAncestorOrSame
public static boolean isAncestorOrSame(URI descendant, URI ancestor) { """ Utility method to check whether one URI is the ancestor of the other return true iff both URI's scheme/authority name match and ancestor's path is the prefix of the descendant's path @param descendant: the descendant URI to check @para...
java
public static boolean isAncestorOrSame(URI descendant, URI ancestor) { Preconditions.checkNotNull(descendant, "input can not be null"); Preconditions.checkNotNull(ancestor, "input can not be null"); if (!stringSame(descendant.getScheme(), ancestor.getScheme())) { return false; } if (!stringS...
[ "public", "static", "boolean", "isAncestorOrSame", "(", "URI", "descendant", ",", "URI", "ancestor", ")", "{", "Preconditions", ".", "checkNotNull", "(", "descendant", ",", "\"input can not be null\"", ")", ";", "Preconditions", ".", "checkNotNull", "(", "ancestor",...
Utility method to check whether one URI is the ancestor of the other return true iff both URI's scheme/authority name match and ancestor's path is the prefix of the descendant's path @param descendant: the descendant URI to check @param ancestor : the ancestor URI to check @return
[ "Utility", "method", "to", "check", "whether", "one", "URI", "is", "the", "ancestor", "of", "the", "other" ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-config-management/gobblin-config-client/src/main/java/org/apache/gobblin/config/client/ConfigClientUtils.java#L156-L169
att/openstacksdk
openstack-java-sdk/heat-model/src/main/java/com/woorea/openstack/heat/model/Stack.java
Stack.getOutputValue
public <T> T getOutputValue (String key, Class<T> type) { """ /* Return a stack output as a Json-mapped Object of the provided type. This is useful for json-object stack outputs. """ try { String s = mapper.writeValueAsString(_findOutputValue(key)); return (mapper.readValue(s, type)); } catch (IO...
java
public <T> T getOutputValue (String key, Class<T> type) { try { String s = mapper.writeValueAsString(_findOutputValue(key)); return (mapper.readValue(s, type)); } catch (IOException e) { return null; } }
[ "public", "<", "T", ">", "T", "getOutputValue", "(", "String", "key", ",", "Class", "<", "T", ">", "type", ")", "{", "try", "{", "String", "s", "=", "mapper", ".", "writeValueAsString", "(", "_findOutputValue", "(", "key", ")", ")", ";", "return", "(...
/* Return a stack output as a Json-mapped Object of the provided type. This is useful for json-object stack outputs.
[ "/", "*", "Return", "a", "stack", "output", "as", "a", "Json", "-", "mapped", "Object", "of", "the", "provided", "type", ".", "This", "is", "useful", "for", "json", "-", "object", "stack", "outputs", "." ]
train
https://github.com/att/openstacksdk/blob/16a81c460a7186ebe1ea63b7682486ba147208b9/openstack-java-sdk/heat-model/src/main/java/com/woorea/openstack/heat/model/Stack.java#L203-L212
roboconf/roboconf-platform
core/roboconf-target-api/src/main/java/net/roboconf/target/api/AbstractThreadedTargetHandler.java
AbstractThreadedTargetHandler.submitMachineConfiguratorUseWithCaution
protected void submitMachineConfiguratorUseWithCaution( String machineId, MachineConfigurator configurator ) { """ Submits a machine configurator. <p> Most of the subclasses will never use this method. It is already invoked from the {@link #configureMachine(TargetHandlerParameters, String, Instance)} method. <...
java
protected void submitMachineConfiguratorUseWithCaution( String machineId, MachineConfigurator configurator ) { if( configurator != null ) { this.logger.fine( "Configuring machine '" + machineId + "' (" + configurator.getClass().getSimpleName() + ")." ); this.machineIdToConfigurators.put( machineId, configurator...
[ "protected", "void", "submitMachineConfiguratorUseWithCaution", "(", "String", "machineId", ",", "MachineConfigurator", "configurator", ")", "{", "if", "(", "configurator", "!=", "null", ")", "{", "this", ".", "logger", ".", "fine", "(", "\"Configuring machine '\"", ...
Submits a machine configurator. <p> Most of the subclasses will never use this method. It is already invoked from the {@link #configureMachine(TargetHandlerParameters, String, Instance)} method. </p> <p> Most of target handlers only have long-running configurations but short terminations. In some cases though, terminat...
[ "Submits", "a", "machine", "configurator", ".", "<p", ">", "Most", "of", "the", "subclasses", "will", "never", "use", "this", "method", ".", "It", "is", "already", "invoked", "from", "the", "{", "@link", "#configureMachine", "(", "TargetHandlerParameters", "St...
train
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-target-api/src/main/java/net/roboconf/target/api/AbstractThreadedTargetHandler.java#L157-L162
fcrepo4/fcrepo4
fcrepo-kernel-modeshape/src/main/java/org/fcrepo/kernel/modeshape/utils/FedoraTypesUtils.java
FedoraTypesUtils.isMultivaluedProperty
public static boolean isMultivaluedProperty(final Node node, final String propertyName) throws RepositoryException { """ Determine if a given JCR property name is single- or multi- valued. If unsure, choose the least restrictive option (multivalued = true) @param node the JCR node to check @param ...
java
public static boolean isMultivaluedProperty(final Node node, final String propertyName) throws RepositoryException { return getDefinitionForPropertyName(node, propertyName).map(PropertyDefinition::isMultiple).orElse(true); }
[ "public", "static", "boolean", "isMultivaluedProperty", "(", "final", "Node", "node", ",", "final", "String", "propertyName", ")", "throws", "RepositoryException", "{", "return", "getDefinitionForPropertyName", "(", "node", ",", "propertyName", ")", ".", "map", "(",...
Determine if a given JCR property name is single- or multi- valued. If unsure, choose the least restrictive option (multivalued = true) @param node the JCR node to check @param propertyName the property name (which may or may not already exist) @return true if the property is multivalued @throws RepositoryException if...
[ "Determine", "if", "a", "given", "JCR", "property", "name", "is", "single", "-", "or", "multi", "-", "valued", ".", "If", "unsure", "choose", "the", "least", "restrictive", "option", "(", "multivalued", "=", "true", ")" ]
train
https://github.com/fcrepo4/fcrepo4/blob/7489ad5bc8fb44e2442c93eceb7d97ac54553ab6/fcrepo-kernel-modeshape/src/main/java/org/fcrepo/kernel/modeshape/utils/FedoraTypesUtils.java#L273-L276
SeaCloudsEU/SeaCloudsPlatform
sla/sla-core/sla-service/src/main/java/eu/atos/sla/service/rest/ProviderRestEntity.java
ProviderRestEntity.createProvider
@POST public Response createProvider(@Context UriInfo uriInfo, @RequestBody Provider provider) throws ConflictException, InternalException { """ Creates a new provider <pre> POST /providers Request: POST /providers HTTP/1.1 Accept: application/xml Response: {@code <provider> <uu...
java
@POST public Response createProvider(@Context UriInfo uriInfo, @RequestBody Provider provider) throws ConflictException, InternalException { logger.debug("StartOf createProvider - REQUEST Insert /providers"); ProviderHelperE providerRestHelper = getProviderHelper(); Str...
[ "@", "POST", "public", "Response", "createProvider", "(", "@", "Context", "UriInfo", "uriInfo", ",", "@", "RequestBody", "Provider", "provider", ")", "throws", "ConflictException", ",", "InternalException", "{", "logger", ".", "debug", "(", "\"StartOf createProvider...
Creates a new provider <pre> POST /providers Request: POST /providers HTTP/1.1 Accept: application/xml Response: {@code <provider> <uuid>fc993580-03fe-41eb-8a21-a56709f9370f</uuid> <name>provider-3</name> </provider> } </pre> Example: <li>curl -H "Content-type: application/xml" -X POST -d @provider.xml localhos...
[ "Creates", "a", "new", "provider" ]
train
https://github.com/SeaCloudsEU/SeaCloudsPlatform/blob/b199fe6de2c63b808cb248d3aca947d802375df8/sla/sla-core/sla-service/src/main/java/eu/atos/sla/service/rest/ProviderRestEntity.java#L209-L234
pravega/pravega
bindings/src/main/java/io/pravega/storage/hdfs/HDFSStorage.java
HDFSStorage.findStatusForSegment
private FileStatus findStatusForSegment(String segmentName, boolean enforceExistence) throws IOException { """ Gets the filestatus representing the segment. @param segmentName The name of the Segment to retrieve for. @param enforceExistence If true, it will throw a FileNotFoundException if no files are fo...
java
private FileStatus findStatusForSegment(String segmentName, boolean enforceExistence) throws IOException { FileStatus[] rawFiles = findAllRaw(segmentName); if (rawFiles == null || rawFiles.length == 0) { if (enforceExistence) { throw HDFSExceptionHelpers.segmentNotExistsExcep...
[ "private", "FileStatus", "findStatusForSegment", "(", "String", "segmentName", ",", "boolean", "enforceExistence", ")", "throws", "IOException", "{", "FileStatus", "[", "]", "rawFiles", "=", "findAllRaw", "(", "segmentName", ")", ";", "if", "(", "rawFiles", "==", ...
Gets the filestatus representing the segment. @param segmentName The name of the Segment to retrieve for. @param enforceExistence If true, it will throw a FileNotFoundException if no files are found, otherwise null is returned. @return FileStatus of the HDFS file. @throws IOException If an exception occurred.
[ "Gets", "the", "filestatus", "representing", "the", "segment", "." ]
train
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/bindings/src/main/java/io/pravega/storage/hdfs/HDFSStorage.java#L563-L577
jkrasnay/sqlbuilder
src/main/java/ca/krasnay/sqlbuilder/orm/ReflectionUtils.java
ReflectionUtils.getFieldValueWithPath
public static Object getFieldValueWithPath(Object object, String path) { """ Returns the value of a field identified using a path from the parent. @param object Parent object. @param path Path to identify the field. May contain one or more dots, e.g. "address.city". @return The value of the field, or null ...
java
public static Object getFieldValueWithPath(Object object, String path) { int lastDot = path.lastIndexOf('.'); if (lastDot > -1) { String parentPath = path.substring(0, lastDot); String field = path.substring(lastDot + 1); Object parentObject = getFieldValueWithPat...
[ "public", "static", "Object", "getFieldValueWithPath", "(", "Object", "object", ",", "String", "path", ")", "{", "int", "lastDot", "=", "path", ".", "lastIndexOf", "(", "'", "'", ")", ";", "if", "(", "lastDot", ">", "-", "1", ")", "{", "String", "paren...
Returns the value of a field identified using a path from the parent. @param object Parent object. @param path Path to identify the field. May contain one or more dots, e.g. "address.city". @return The value of the field, or null if any of the path components are null.
[ "Returns", "the", "value", "of", "a", "field", "identified", "using", "a", "path", "from", "the", "parent", "." ]
train
https://github.com/jkrasnay/sqlbuilder/blob/8e6acedc51cfad0527263376af51e1ef052f7147/src/main/java/ca/krasnay/sqlbuilder/orm/ReflectionUtils.java#L106-L126
airlift/slice
src/main/java/io/airlift/slice/Slices.java
Slices.wrappedBuffer
public static Slice wrappedBuffer(byte[] array, int offset, int length) { """ Creates a slice over the specified array range. @param offset the array position at which the slice begins @param length the number of array positions to include in the slice """ if (length == 0) { return EMPT...
java
public static Slice wrappedBuffer(byte[] array, int offset, int length) { if (length == 0) { return EMPTY_SLICE; } return new Slice(array, offset, length); }
[ "public", "static", "Slice", "wrappedBuffer", "(", "byte", "[", "]", "array", ",", "int", "offset", ",", "int", "length", ")", "{", "if", "(", "length", "==", "0", ")", "{", "return", "EMPTY_SLICE", ";", "}", "return", "new", "Slice", "(", "array", "...
Creates a slice over the specified array range. @param offset the array position at which the slice begins @param length the number of array positions to include in the slice
[ "Creates", "a", "slice", "over", "the", "specified", "array", "range", "." ]
train
https://github.com/airlift/slice/blob/7166cb0319e3655f8ba15f5a7ccf3d2f721c1242/src/main/java/io/airlift/slice/Slices.java#L149-L155
b3dgs/lionengine
lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/tile/map/transition/MapTileTransitionModel.java
MapTileTransitionModel.updateNeigbor
private void updateNeigbor(Collection<Tile> resolved, Collection<Tile> toResolve, Tile tile, Tile neighbor, int ox, int oy) { """ Update neighbor. @para...
java
private void updateNeigbor(Collection<Tile> resolved, Collection<Tile> toResolve, Tile tile, Tile neighbor, int ox, int oy) { final String group =...
[ "private", "void", "updateNeigbor", "(", "Collection", "<", "Tile", ">", "resolved", ",", "Collection", "<", "Tile", ">", "toResolve", ",", "Tile", "tile", ",", "Tile", "neighbor", ",", "int", "ox", ",", "int", "oy", ")", "{", "final", "String", "group",...
Update neighbor. @param resolved The resolved tiles. @param toResolve Tiles to resolve after. @param tile The tile reference. @param neighbor The neighbor reference. @param ox The horizontal offset to update. @param oy The vertical offset to update.
[ "Update", "neighbor", "." ]
train
https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/tile/map/transition/MapTileTransitionModel.java#L220-L245
ben-manes/caffeine
jcache/src/main/java/com/github/benmanes/caffeine/jcache/CacheProxy.java
CacheProxy.tryClose
private static @Nullable Throwable tryClose(Object o, @Nullable Throwable outer) { """ Attempts to close the resource. If an error occurs and an outermost exception is set, then adds the error to the suppression list. @param o the resource to close if Closeable @param outer the outermost error, or null if uns...
java
private static @Nullable Throwable tryClose(Object o, @Nullable Throwable outer) { if (o instanceof Closeable) { try { ((Closeable) o).close(); } catch (Throwable t) { if (outer == null) { return t; } outer.addSuppressed(t); return outer; } } ...
[ "private", "static", "@", "Nullable", "Throwable", "tryClose", "(", "Object", "o", ",", "@", "Nullable", "Throwable", "outer", ")", "{", "if", "(", "o", "instanceof", "Closeable", ")", "{", "try", "{", "(", "(", "Closeable", ")", "o", ")", ".", "close"...
Attempts to close the resource. If an error occurs and an outermost exception is set, then adds the error to the suppression list. @param o the resource to close if Closeable @param outer the outermost error, or null if unset @return the outermost error, or null if unset and successful
[ "Attempts", "to", "close", "the", "resource", ".", "If", "an", "error", "occurs", "and", "an", "outermost", "exception", "is", "set", "then", "adds", "the", "error", "to", "the", "suppression", "list", "." ]
train
https://github.com/ben-manes/caffeine/blob/4cf6d6e6a18ea2e8088f166261e5949343b0f2eb/jcache/src/main/java/com/github/benmanes/caffeine/jcache/CacheProxy.java#L915-L928
aerogear/aerogear-unifiedpush-server
push-sender/src/main/java/org/jboss/aerogear/unifiedpush/message/NotificationRouter.java
NotificationRouter.submit
@TransactionAttribute(TransactionAttributeType.REQUIRED) public void submit(PushApplication pushApplication, InternalUnifiedPushMessage message) { """ Receives a request for sending a {@link UnifiedPushMessage} and queues one message per variant type, both in one transaction. Once this method returns, messa...
java
@TransactionAttribute(TransactionAttributeType.REQUIRED) public void submit(PushApplication pushApplication, InternalUnifiedPushMessage message) { logger.debug("Processing send request with '{}' payload", message.getMessage()); // collections for all the different variants: final VariantMap...
[ "@", "TransactionAttribute", "(", "TransactionAttributeType", ".", "REQUIRED", ")", "public", "void", "submit", "(", "PushApplication", "pushApplication", ",", "InternalUnifiedPushMessage", "message", ")", "{", "logger", ".", "debug", "(", "\"Processing send request with ...
Receives a request for sending a {@link UnifiedPushMessage} and queues one message per variant type, both in one transaction. Once this method returns, message is recorded and will be eventually delivered in the future. @param pushApplication the push application @param message the message
[ "Receives", "a", "request", "for", "sending", "a", "{", "@link", "UnifiedPushMessage", "}", "and", "queues", "one", "message", "per", "variant", "type", "both", "in", "one", "transaction", "." ]
train
https://github.com/aerogear/aerogear-unifiedpush-server/blob/c7b798f085449117d84345d8c378b27165cad32b/push-sender/src/main/java/org/jboss/aerogear/unifiedpush/message/NotificationRouter.java#L76-L123
wmdietl/jsr308-langtools
src/share/classes/com/sun/tools/sjavac/comp/ResolveWithDeps.java
ResolveWithDeps.reportDependence
@Override public void reportDependence(Symbol from, Symbol to) { """ Collect dependencies in the enclosing class @param from The enclosing class sym @param to The enclosing classes references this sym. """ // Capture dependencies between the packages. deps.collect(from.packge().fullname...
java
@Override public void reportDependence(Symbol from, Symbol to) { // Capture dependencies between the packages. deps.collect(from.packge().fullname, to.packge().fullname); }
[ "@", "Override", "public", "void", "reportDependence", "(", "Symbol", "from", ",", "Symbol", "to", ")", "{", "// Capture dependencies between the packages.", "deps", ".", "collect", "(", "from", ".", "packge", "(", ")", ".", "fullname", ",", "to", ".", "packge...
Collect dependencies in the enclosing class @param from The enclosing class sym @param to The enclosing classes references this sym.
[ "Collect", "dependencies", "in", "the", "enclosing", "class" ]
train
https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/sjavac/comp/ResolveWithDeps.java#L62-L66
apache/groovy
src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java
DefaultGroovyMethods.findResult
public static <S, T, U extends T, V extends T> T findResult(Iterable<S> self, U defaultResult, @ClosureParams(FirstParam.FirstGenericType.class) Closure<V> condition) { """ Iterates through the Iterable calling the given closure condition for each item but stopping once the first non-null result is found and retu...
java
public static <S, T, U extends T, V extends T> T findResult(Iterable<S> self, U defaultResult, @ClosureParams(FirstParam.FirstGenericType.class) Closure<V> condition) { T result = findResult(self, condition); if (result == null) return defaultResult; return result; }
[ "public", "static", "<", "S", ",", "T", ",", "U", "extends", "T", ",", "V", "extends", "T", ">", "T", "findResult", "(", "Iterable", "<", "S", ">", "self", ",", "U", "defaultResult", ",", "@", "ClosureParams", "(", "FirstParam", ".", "FirstGenericType"...
Iterates through the Iterable calling the given closure condition for each item but stopping once the first non-null result is found and returning that result. If all are null, the defaultResult is returned. <p> Examples: <pre class="groovyTestCase"> def list = [1,2,3] assert "Found 2" == list.findResult("default") { i...
[ "Iterates", "through", "the", "Iterable", "calling", "the", "given", "closure", "condition", "for", "each", "item", "but", "stopping", "once", "the", "first", "non", "-", "null", "result", "is", "found", "and", "returning", "that", "result", ".", "If", "all"...
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java#L4532-L4536
kiegroup/drools
drools-examples/src/main/java/org/drools/examples/sudoku/Cell.java
Cell.makeReferences
public void makeReferences(CellRow row, CellCol col, CellSqr sqr) { """ Set references to all cell groups containing this cell. @param row the cell group for the row @param col the cell group for the column @param sqr the cell group for the square 3x3 area """ this.cellRow = row; this.cellCo...
java
public void makeReferences(CellRow row, CellCol col, CellSqr sqr) { this.cellRow = row; this.cellCol = col; this.cellSqr = sqr; this.exCells = new HashSet<Cell>(); this.exCells.addAll(this.cellRow.getCells()); this.exCells.addAll(this.cellCol.getCells()); this.exC...
[ "public", "void", "makeReferences", "(", "CellRow", "row", ",", "CellCol", "col", ",", "CellSqr", "sqr", ")", "{", "this", ".", "cellRow", "=", "row", ";", "this", ".", "cellCol", "=", "col", ";", "this", ".", "cellSqr", "=", "sqr", ";", "this", ".",...
Set references to all cell groups containing this cell. @param row the cell group for the row @param col the cell group for the column @param sqr the cell group for the square 3x3 area
[ "Set", "references", "to", "all", "cell", "groups", "containing", "this", "cell", "." ]
train
https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-examples/src/main/java/org/drools/examples/sudoku/Cell.java#L46-L55
OpenLiberty/open-liberty
dev/com.ibm.ws.jmx.connector.client.rest/src/com/ibm/ws/jmx/connector/converter/JSONConverter.java
JSONConverter.writeInvocation
public void writeInvocation(OutputStream out, Invocation value) throws IOException { """ Encode an Invocation instance as JSON: { "params" : [ POJO* ], "signature" : [ String* ] } @param out The stream to write JSON to @param value The Invocation instance to encode. Can't be null. @throws IOException If a...
java
public void writeInvocation(OutputStream out, Invocation value) throws IOException { writeStartObject(out); writePOJOArrayField(out, OM_PARAMS, value.params); writeStringArrayField(out, OM_SIGNATURE, value.signature); writeEndObject(out); }
[ "public", "void", "writeInvocation", "(", "OutputStream", "out", ",", "Invocation", "value", ")", "throws", "IOException", "{", "writeStartObject", "(", "out", ")", ";", "writePOJOArrayField", "(", "out", ",", "OM_PARAMS", ",", "value", ".", "params", ")", ";"...
Encode an Invocation instance as JSON: { "params" : [ POJO* ], "signature" : [ String* ] } @param out The stream to write JSON to @param value The Invocation instance to encode. Can't be null. @throws IOException If an I/O error occurs @see #readInvocation(InputStream)
[ "Encode", "an", "Invocation", "instance", "as", "JSON", ":", "{", "params", ":", "[", "POJO", "*", "]", "signature", ":", "[", "String", "*", "]", "}" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jmx.connector.client.rest/src/com/ibm/ws/jmx/connector/converter/JSONConverter.java#L1402-L1407
nats-io/java-nats
src/main/java/io/nats/client/NKey.java
NKey.createUser
public static NKey createUser(SecureRandom random) throws IOException, NoSuchProviderException, NoSuchAlgorithmException { """ Create a User NKey from the provided random number generator. If no random is provided, SecureRandom.getInstance("SHA1PRNG", "SUN") will be used to creat eone. The new NK...
java
public static NKey createUser(SecureRandom random) throws IOException, NoSuchProviderException, NoSuchAlgorithmException { return createPair(Type.USER, random); }
[ "public", "static", "NKey", "createUser", "(", "SecureRandom", "random", ")", "throws", "IOException", ",", "NoSuchProviderException", ",", "NoSuchAlgorithmException", "{", "return", "createPair", "(", "Type", ".", "USER", ",", "random", ")", ";", "}" ]
Create a User NKey from the provided random number generator. If no random is provided, SecureRandom.getInstance("SHA1PRNG", "SUN") will be used to creat eone. The new NKey contains the private seed, which should be saved in a secure location. @param random A secure random provider @return the new Nkey @throws IOExc...
[ "Create", "a", "User", "NKey", "from", "the", "provided", "random", "number", "generator", "." ]
train
https://github.com/nats-io/java-nats/blob/5f291048fd30192ba39b3fe2925ecd60aaad6b48/src/main/java/io/nats/client/NKey.java#L551-L554
UrielCh/ovh-java-sdk
ovh-java-sdk-vps/src/main/java/net/minidev/ovh/api/ApiOvhVps.java
ApiOvhVps.serviceName_option_option_GET
public OvhOption serviceName_option_option_GET(String serviceName, net.minidev.ovh.api.vps.OvhVpsOptionEnum option) throws IOException { """ Get this object properties REST: GET /vps/{serviceName}/option/{option} @param serviceName [required] The internal name of your VPS offer @param option [required] The op...
java
public OvhOption serviceName_option_option_GET(String serviceName, net.minidev.ovh.api.vps.OvhVpsOptionEnum option) throws IOException { String qPath = "/vps/{serviceName}/option/{option}"; StringBuilder sb = path(qPath, serviceName, option); String resp = exec(qPath, "GET", sb.toString(), null); return convert...
[ "public", "OvhOption", "serviceName_option_option_GET", "(", "String", "serviceName", ",", "net", ".", "minidev", ".", "ovh", ".", "api", ".", "vps", ".", "OvhVpsOptionEnum", "option", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/vps/{serviceName...
Get this object properties REST: GET /vps/{serviceName}/option/{option} @param serviceName [required] The internal name of your VPS offer @param option [required] The option name
[ "Get", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-vps/src/main/java/net/minidev/ovh/api/ApiOvhVps.java#L1050-L1055
geomajas/geomajas-project-server
plugin/staticsecurity/staticsecurity/src/main/java/org/geomajas/plugin/staticsecurity/security/AuthenticationTokenService.java
AuthenticationTokenService.invalidateOldTokens
@Scheduled(fixedRate = 60000) // run every minute public void invalidateOldTokens() { """ Invalidate tokens which have passed their lifetime. Note that tokens are also checked when the authentication is fetched in {@link #getAuthentication(String)}. """ List<String> invalidTokens = new ArrayList<String>();...
java
@Scheduled(fixedRate = 60000) // run every minute public void invalidateOldTokens() { List<String> invalidTokens = new ArrayList<String>(); // tokens to invalidate for (Map.Entry<String, TokenContainer> entry : tokens.entrySet()) { if (!entry.getValue().isValid()) { invalidTokens.add(entry.getKey()); } ...
[ "@", "Scheduled", "(", "fixedRate", "=", "60000", ")", "// run every minute", "public", "void", "invalidateOldTokens", "(", ")", "{", "List", "<", "String", ">", "invalidTokens", "=", "new", "ArrayList", "<", "String", ">", "(", ")", ";", "// tokens to invalid...
Invalidate tokens which have passed their lifetime. Note that tokens are also checked when the authentication is fetched in {@link #getAuthentication(String)}.
[ "Invalidate", "tokens", "which", "have", "passed", "their", "lifetime", ".", "Note", "that", "tokens", "are", "also", "checked", "when", "the", "authentication", "is", "fetched", "in", "{" ]
train
https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/plugin/staticsecurity/staticsecurity/src/main/java/org/geomajas/plugin/staticsecurity/security/AuthenticationTokenService.java#L106-L117
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/lossfunctions/impl/LossMixtureDensity.java
LossMixtureDensity.computeScoreArray
@Override public INDArray computeScoreArray(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask) { """ This method returns the score for each of the given outputs against the given set of labels. For a mixture density network, this is done by extracting the "alpha", "mu", and "sigma...
java
@Override public INDArray computeScoreArray(INDArray labels, INDArray preOutput, IActivation activationFn, INDArray mask) { labels = labels.castTo(preOutput.dataType()); //No-op if already correct dtype INDArray output = activationFn.getActivation(preOutput.dup(), false); MixtureDensityCom...
[ "@", "Override", "public", "INDArray", "computeScoreArray", "(", "INDArray", "labels", ",", "INDArray", "preOutput", ",", "IActivation", "activationFn", ",", "INDArray", "mask", ")", "{", "labels", "=", "labels", ".", "castTo", "(", "preOutput", ".", "dataType",...
This method returns the score for each of the given outputs against the given set of labels. For a mixture density network, this is done by extracting the "alpha", "mu", and "sigma" components of each gaussian and computing the negative log likelihood that the labels fall within a linear combination of these gaussian ...
[ "This", "method", "returns", "the", "score", "for", "each", "of", "the", "given", "outputs", "against", "the", "given", "set", "of", "labels", ".", "For", "a", "mixture", "density", "network", "this", "is", "done", "by", "extracting", "the", "alpha", "mu",...
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/lossfunctions/impl/LossMixtureDensity.java#L203-L215
joniles/mpxj
src/main/java/net/sf/mpxj/ProjectProperties.java
ProjectProperties.getCachedCharValue
private char getCachedCharValue(FieldType field, char defaultValue) { """ Handles retrieval of primitive char type. @param field required field @param defaultValue default value if field is missing @return char value """ Character c = (Character) getCachedValue(field); return c == null ? defau...
java
private char getCachedCharValue(FieldType field, char defaultValue) { Character c = (Character) getCachedValue(field); return c == null ? defaultValue : c.charValue(); }
[ "private", "char", "getCachedCharValue", "(", "FieldType", "field", ",", "char", "defaultValue", ")", "{", "Character", "c", "=", "(", "Character", ")", "getCachedValue", "(", "field", ")", ";", "return", "c", "==", "null", "?", "defaultValue", ":", "c", "...
Handles retrieval of primitive char type. @param field required field @param defaultValue default value if field is missing @return char value
[ "Handles", "retrieval", "of", "primitive", "char", "type", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ProjectProperties.java#L2690-L2694
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/common/UpdateUtils.java
UpdateUtils.updateFileFromFile
public static void updateFileFromFile(final File sourceFile, final String destinationFilePath) throws UpdateException { """ Get the source File and store it to a destination file path @param sourceFile source @param destinationFilePath destination @throws UpdateException on error """ if ...
java
public static void updateFileFromFile(final File sourceFile, final String destinationFilePath) throws UpdateException { if (!sourceFile.exists()) { throw new UpdateException("Source file does not exist: " + sourceFile); } if (!sourceFile.isFile()) { throw new Upda...
[ "public", "static", "void", "updateFileFromFile", "(", "final", "File", "sourceFile", ",", "final", "String", "destinationFilePath", ")", "throws", "UpdateException", "{", "if", "(", "!", "sourceFile", ".", "exists", "(", ")", ")", "{", "throw", "new", "Update...
Get the source File and store it to a destination file path @param sourceFile source @param destinationFilePath destination @throws UpdateException on error
[ "Get", "the", "source", "File", "and", "store", "it", "to", "a", "destination", "file", "path" ]
train
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/common/UpdateUtils.java#L70-L87
DiUS/pact-jvm
pact-jvm-consumer/src/main/java/au/com/dius/pact/consumer/dsl/PactDslJsonRootValue.java
PactDslJsonRootValue.stringMatcher
public static PactDslJsonRootValue stringMatcher(String regex, String value) { """ Value that must match the regular expression @param regex regular expression @param value example value to use for generated bodies """ if (!value.matches(regex)) { throw new InvalidMatcherException(EXAMPLE + value +...
java
public static PactDslJsonRootValue stringMatcher(String regex, String value) { if (!value.matches(regex)) { throw new InvalidMatcherException(EXAMPLE + value + "\" does not match regular expression \"" + regex + "\""); } PactDslJsonRootValue rootValue = new PactDslJsonRootValue(); rootValu...
[ "public", "static", "PactDslJsonRootValue", "stringMatcher", "(", "String", "regex", ",", "String", "value", ")", "{", "if", "(", "!", "value", ".", "matches", "(", "regex", ")", ")", "{", "throw", "new", "InvalidMatcherException", "(", "EXAMPLE", "+", "valu...
Value that must match the regular expression @param regex regular expression @param value example value to use for generated bodies
[ "Value", "that", "must", "match", "the", "regular", "expression" ]
train
https://github.com/DiUS/pact-jvm/blob/2f447e9dd4ac152a6a36b7fcf8962d07de9ef3ef/pact-jvm-consumer/src/main/java/au/com/dius/pact/consumer/dsl/PactDslJsonRootValue.java#L412-L421
OpenLiberty/open-liberty
dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ejs/container/activator/Activator.java
Activator.discardObject
@Override public void discardObject(EJBCache cache, Object key, Object object) throws RemoteException { """ Called by the cache after it evicts an object from the cache. Passivates the bean. <p> @param cache The cache from which the object was evicted @param key The key for the object...
java
@Override public void discardObject(EJBCache cache, Object key, Object object) throws RemoteException { BeanO bean = (BeanO) object; bean.getActivationStrategy().atDiscard(bean); }
[ "@", "Override", "public", "void", "discardObject", "(", "EJBCache", "cache", ",", "Object", "key", ",", "Object", "object", ")", "throws", "RemoteException", "{", "BeanO", "bean", "=", "(", "BeanO", ")", "object", ";", "bean", ".", "getActivationStrategy", ...
Called by the cache after it evicts an object from the cache. Passivates the bean. <p> @param cache The cache from which the object was evicted @param key The key for the object which was evicted @param object The object which was evicted
[ "Called", "by", "the", "cache", "after", "it", "evicts", "an", "object", "from", "the", "cache", ".", "Passivates", "the", "bean", ".", "<p", ">" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ejs/container/activator/Activator.java#L522-L528
raydac/java-binary-block-parser
jbbp/src/main/java/com/igormaznitsa/jbbp/mapper/JBBPMapper.java
JBBPMapper.getFieldValue
private static Object getFieldValue(final Object classInstance, final Field classField) { """ Get a value of a field from a class instance. @param classInstance a class instance object @param classField a class field which value must be returned, must not be null @return the field value for the class inst...
java
private static Object getFieldValue(final Object classInstance, final Field classField) { try { return classField.get(classInstance); } catch (IllegalArgumentException ex) { throw new JBBPMapperException("Can't set get value from a mapping field", null, classInstance.getClass(), classField, ex); ...
[ "private", "static", "Object", "getFieldValue", "(", "final", "Object", "classInstance", ",", "final", "Field", "classField", ")", "{", "try", "{", "return", "classField", ".", "get", "(", "classInstance", ")", ";", "}", "catch", "(", "IllegalArgumentException",...
Get a value of a field from a class instance. @param classInstance a class instance object @param classField a class field which value must be returned, must not be null @return the field value for the class instance
[ "Get", "a", "value", "of", "a", "field", "from", "a", "class", "instance", "." ]
train
https://github.com/raydac/java-binary-block-parser/blob/6d98abcab01e0c72d525ebcc9e7b694f9ce49f5b/jbbp/src/main/java/com/igormaznitsa/jbbp/mapper/JBBPMapper.java#L489-L497
jtrfp/javamod
src/main/java/de/quippy/jflac/FixedPredictor.java
FixedPredictor.restoreSignal
public static void restoreSignal(int[] residual, int dataLen, int order, int[] data, int startAt) { """ Restore the signal from the fixed predictor. @param residual The residual data @param dataLen The length of residual data @param order The preicate order @param data The restored signal (output) ...
java
public static void restoreSignal(int[] residual, int dataLen, int order, int[] data, int startAt) { int idataLen = (int) dataLen; switch (order) { case 0 : for (int i = 0; i < idataLen; i++) { data[i + startAt] = residual[i]; } ...
[ "public", "static", "void", "restoreSignal", "(", "int", "[", "]", "residual", ",", "int", "dataLen", ",", "int", "order", ",", "int", "[", "]", "data", ",", "int", "startAt", ")", "{", "int", "idataLen", "=", "(", "int", ")", "dataLen", ";", "switch...
Restore the signal from the fixed predictor. @param residual The residual data @param dataLen The length of residual data @param order The preicate order @param data The restored signal (output) @param startAt The starting position in the data array
[ "Restore", "the", "signal", "from", "the", "fixed", "predictor", "." ]
train
https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/jflac/FixedPredictor.java#L207-L241
centic9/commons-dost
src/main/java/org/dstadler/commons/metrics/MetricsUtils.java
MetricsUtils.sendDocument
public static void sendDocument(String json, CloseableHttpClient httpClient, String url) throws IOException { """ Send the given document to the given Elasticsearch URL/Index Authentication can be provided via the configured {@link HttpClient} instance. @param json The json-string to store as document @para...
java
public static void sendDocument(String json, CloseableHttpClient httpClient, String url) throws IOException { final HttpPut httpPut = new HttpPut(url); httpPut.addHeader("Content-Type", NanoHTTPD.MIME_JSON); httpPut.setEntity(new StringEntity( json, ContentType.APPLICATION_JSON))...
[ "public", "static", "void", "sendDocument", "(", "String", "json", ",", "CloseableHttpClient", "httpClient", ",", "String", "url", ")", "throws", "IOException", "{", "final", "HttpPut", "httpPut", "=", "new", "HttpPut", "(", "url", ")", ";", "httpPut", ".", ...
Send the given document to the given Elasticsearch URL/Index Authentication can be provided via the configured {@link HttpClient} instance. @param json The json-string to store as document @param httpClient The HTTP Client that can be used to send metrics. This can also contain credentials for basic authentication if...
[ "Send", "the", "given", "document", "to", "the", "given", "Elasticsearch", "URL", "/", "Index" ]
train
https://github.com/centic9/commons-dost/blob/f6fa4e3e0b943ff103f918824319d8abf33d0e0f/src/main/java/org/dstadler/commons/metrics/MetricsUtils.java#L100-L116
tango-controls/JTango
server/src/main/java/org/tango/logging/LoggingManager.java
LoggingManager.setLoggingLevel
public void setLoggingLevel(final String deviceName, final int loggingLevel) { """ Set the logging level of a device @param deviceName the device name @param loggingLevel the level """ System.out.println("set logging level " + deviceName + "-" + LoggingLevel.getLevelFromInt(loggingLevel)); ...
java
public void setLoggingLevel(final String deviceName, final int loggingLevel) { System.out.println("set logging level " + deviceName + "-" + LoggingLevel.getLevelFromInt(loggingLevel)); logger.debug("set logging level to {} on {}", LoggingLevel.getLevelFromInt(loggingLevel), deviceName); if (root...
[ "public", "void", "setLoggingLevel", "(", "final", "String", "deviceName", ",", "final", "int", "loggingLevel", ")", "{", "System", ".", "out", ".", "println", "(", "\"set logging level \"", "+", "deviceName", "+", "\"-\"", "+", "LoggingLevel", ".", "getLevelFro...
Set the logging level of a device @param deviceName the device name @param loggingLevel the level
[ "Set", "the", "logging", "level", "of", "a", "device" ]
train
https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/server/src/main/java/org/tango/logging/LoggingManager.java#L103-L123
alkacon/opencms-core
src/org/opencms/file/types/A_CmsResourceType.java
A_CmsResourceType.replaceResource
@Deprecated public void replaceResource( CmsObject cms, CmsSecurityManager securityManager, CmsResource resource, int type, byte[] content, List<CmsProperty> properties) throws CmsException { """ @see org.opencms.file.types.I_CmsResourceType#replaceResource(o...
java
@Deprecated public void replaceResource( CmsObject cms, CmsSecurityManager securityManager, CmsResource resource, int type, byte[] content, List<CmsProperty> properties) throws CmsException { securityManager.replaceResource(cms.getRequestContext(), resour...
[ "@", "Deprecated", "public", "void", "replaceResource", "(", "CmsObject", "cms", ",", "CmsSecurityManager", "securityManager", ",", "CmsResource", "resource", ",", "int", "type", ",", "byte", "[", "]", "content", ",", "List", "<", "CmsProperty", ">", "properties...
@see org.opencms.file.types.I_CmsResourceType#replaceResource(org.opencms.file.CmsObject, CmsSecurityManager, CmsResource, int, byte[], List) @deprecated Use {@link #replaceResource(CmsObject, CmsSecurityManager, CmsResource, I_CmsResourceType, byte[], List)} instead. Resource types should always be referenced either ...
[ "@see", "org", ".", "opencms", ".", "file", ".", "types", ".", "I_CmsResourceType#replaceResource", "(", "org", ".", "opencms", ".", "file", ".", "CmsObject", "CmsSecurityManager", "CmsResource", "int", "byte", "[]", "List", ")" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/file/types/A_CmsResourceType.java#L822-L835
MariaDB/mariadb-connector-j
src/main/java/org/mariadb/jdbc/MariaDbClob.java
MariaDbClob.getSubString
public String getSubString(long pos, int length) throws SQLException { """ Get sub string. @param pos position @param length length of sub string @return substring @throws SQLException if pos is less than 1 or length is less than 0 """ if (pos < 1) { throw ExceptionMapper.getSqlException("p...
java
public String getSubString(long pos, int length) throws SQLException { if (pos < 1) { throw ExceptionMapper.getSqlException("position must be >= 1"); } if (length < 0) { throw ExceptionMapper.getSqlException("length must be > 0"); } try { String val = toString(); return va...
[ "public", "String", "getSubString", "(", "long", "pos", ",", "int", "length", ")", "throws", "SQLException", "{", "if", "(", "pos", "<", "1", ")", "{", "throw", "ExceptionMapper", ".", "getSqlException", "(", "\"position must be >= 1\"", ")", ";", "}", "if",...
Get sub string. @param pos position @param length length of sub string @return substring @throws SQLException if pos is less than 1 or length is less than 0
[ "Get", "sub", "string", "." ]
train
https://github.com/MariaDB/mariadb-connector-j/blob/d148c7cd347c4680617be65d9e511b289d38a30b/src/main/java/org/mariadb/jdbc/MariaDbClob.java#L118-L134
Deep-Symmetry/beat-link
src/main/java/org/deepsymmetry/beatlink/data/SlotReference.java
SlotReference.getSlotReference
@SuppressWarnings("WeakerAccess") public static SlotReference getSlotReference(DataReference dataReference) { """ Get a unique reference to the media slot on the network from which the specified data was loaded. @param dataReference the data whose media slot is of interest @return the instance that will ...
java
@SuppressWarnings("WeakerAccess") public static SlotReference getSlotReference(DataReference dataReference) { return getSlotReference(dataReference.player, dataReference.slot); }
[ "@", "SuppressWarnings", "(", "\"WeakerAccess\"", ")", "public", "static", "SlotReference", "getSlotReference", "(", "DataReference", "dataReference", ")", "{", "return", "getSlotReference", "(", "dataReference", ".", "player", ",", "dataReference", ".", "slot", ")", ...
Get a unique reference to the media slot on the network from which the specified data was loaded. @param dataReference the data whose media slot is of interest @return the instance that will always represent the slot associated with the specified data
[ "Get", "a", "unique", "reference", "to", "the", "media", "slot", "on", "the", "network", "from", "which", "the", "specified", "data", "was", "loaded", "." ]
train
https://github.com/Deep-Symmetry/beat-link/blob/f958a2a70e8a87a31a75326d7b4db77c2f0b4212/src/main/java/org/deepsymmetry/beatlink/data/SlotReference.java#L78-L81
GenesysPureEngage/workspace-client-java
src/main/java/com/genesys/internal/workspace/api/MediaApi.java
MediaApi.updateMediaUserData
public ApiSuccessResponse updateMediaUserData(String mediatype, String id, UserDataOperationId userData) throws ApiException { """ Update user data for an interaction Update the interaction with the provided key/value pairs. This replaces any existing key/value pairs with the same keys. @param mediatype The medi...
java
public ApiSuccessResponse updateMediaUserData(String mediatype, String id, UserDataOperationId userData) throws ApiException { ApiResponse<ApiSuccessResponse> resp = updateMediaUserDataWithHttpInfo(mediatype, id, userData); return resp.getData(); }
[ "public", "ApiSuccessResponse", "updateMediaUserData", "(", "String", "mediatype", ",", "String", "id", ",", "UserDataOperationId", "userData", ")", "throws", "ApiException", "{", "ApiResponse", "<", "ApiSuccessResponse", ">", "resp", "=", "updateMediaUserDataWithHttpInfo...
Update user data for an interaction Update the interaction with the provided key/value pairs. This replaces any existing key/value pairs with the same keys. @param mediatype The media channel. (required) @param id The ID of the interaction. (required) @param userData The data to update. This is an array of objects with...
[ "Update", "user", "data", "for", "an", "interaction", "Update", "the", "interaction", "with", "the", "provided", "key", "/", "value", "pairs", ".", "This", "replaces", "any", "existing", "key", "/", "value", "pairs", "with", "the", "same", "keys", "." ]
train
https://github.com/GenesysPureEngage/workspace-client-java/blob/509fdd9e89b9359d012f9a72be95037a3cef53e6/src/main/java/com/genesys/internal/workspace/api/MediaApi.java#L4483-L4486
fabric8io/kubernetes-client
kubernetes-client/src/main/java/io/fabric8/kubernetes/client/internal/KubeConfigUtils.java
KubeConfigUtils.getUserToken
public static String getUserToken(Config config, Context context) { """ Returns the current user token for the config and current context @param config Config object @param context Context object @return returns current user based upon provided parameters. """ AuthInfo authInfo = getUserAuthInfo(confi...
java
public static String getUserToken(Config config, Context context) { AuthInfo authInfo = getUserAuthInfo(config, context); if (authInfo != null) { return authInfo.getToken(); } return null; }
[ "public", "static", "String", "getUserToken", "(", "Config", "config", ",", "Context", "context", ")", "{", "AuthInfo", "authInfo", "=", "getUserAuthInfo", "(", "config", ",", "context", ")", ";", "if", "(", "authInfo", "!=", "null", ")", "{", "return", "a...
Returns the current user token for the config and current context @param config Config object @param context Context object @return returns current user based upon provided parameters.
[ "Returns", "the", "current", "user", "token", "for", "the", "config", "and", "current", "context" ]
train
https://github.com/fabric8io/kubernetes-client/blob/141668a882ed8e902c045a5cd0a80f14bd17d132/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/internal/KubeConfigUtils.java#L78-L84
MariaDB/mariadb-connector-j
src/main/java/org/mariadb/jdbc/internal/protocol/tls/HostnameVerifierImpl.java
HostnameVerifierImpl.matchDns
private static boolean matchDns(String hostname, String tlsDnsPattern) throws SSLException { """ DNS verification : Matching is performed using the matching rules specified by [RFC2459]. If more than one identity of a given type is present in the certificate (e.g., more than one dNSName name, a match in any one...
java
private static boolean matchDns(String hostname, String tlsDnsPattern) throws SSLException { boolean hostIsIp = Utils.isIPv4(hostname) || Utils.isIPv6(hostname); StringTokenizer hostnameSt = new StringTokenizer(hostname.toLowerCase(Locale.ROOT), "."); StringTokenizer templateSt = new StringTokenizer(tlsDnsP...
[ "private", "static", "boolean", "matchDns", "(", "String", "hostname", ",", "String", "tlsDnsPattern", ")", "throws", "SSLException", "{", "boolean", "hostIsIp", "=", "Utils", ".", "isIPv4", "(", "hostname", ")", "||", "Utils", ".", "isIPv6", "(", "hostname", ...
DNS verification : Matching is performed using the matching rules specified by [RFC2459]. If more than one identity of a given type is present in the certificate (e.g., more than one dNSName name, a match in any one of the set is considered acceptable.) Names may contain the wildcard character * which is considered to...
[ "DNS", "verification", ":", "Matching", "is", "performed", "using", "the", "matching", "rules", "specified", "by", "[", "RFC2459", "]", ".", "If", "more", "than", "one", "identity", "of", "a", "given", "type", "is", "present", "in", "the", "certificate", "...
train
https://github.com/MariaDB/mariadb-connector-j/blob/d148c7cd347c4680617be65d9e511b289d38a30b/src/main/java/org/mariadb/jdbc/internal/protocol/tls/HostnameVerifierImpl.java#L40-L60
Azure/azure-sdk-for-java
appservice/resource-manager/v2016_03_01/src/main/java/com/microsoft/azure/management/appservice/v2016_03_01/implementation/ResourceHealthMetadatasInner.java
ResourceHealthMetadatasInner.getBySiteSlotAsync
public Observable<ResourceHealthMetadataInner> getBySiteSlotAsync(String resourceGroupName, String name, String slot) { """ Gets the category of ResourceHealthMetadata to use for the given site. Gets the category of ResourceHealthMetadata to use for the given site. @param resourceGroupName Name of the resource...
java
public Observable<ResourceHealthMetadataInner> getBySiteSlotAsync(String resourceGroupName, String name, String slot) { return getBySiteSlotWithServiceResponseAsync(resourceGroupName, name, slot).map(new Func1<ServiceResponse<ResourceHealthMetadataInner>, ResourceHealthMetadataInner>() { @Override ...
[ "public", "Observable", "<", "ResourceHealthMetadataInner", ">", "getBySiteSlotAsync", "(", "String", "resourceGroupName", ",", "String", "name", ",", "String", "slot", ")", "{", "return", "getBySiteSlotWithServiceResponseAsync", "(", "resourceGroupName", ",", "name", "...
Gets the category of ResourceHealthMetadata to use for the given site. Gets the category of ResourceHealthMetadata to use for the given site. @param resourceGroupName Name of the resource group to which the resource belongs. @param name Name of web app @param slot Name of web app slot. If not specified then will defau...
[ "Gets", "the", "category", "of", "ResourceHealthMetadata", "to", "use", "for", "the", "given", "site", ".", "Gets", "the", "category", "of", "ResourceHealthMetadata", "to", "use", "for", "the", "given", "site", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2016_03_01/src/main/java/com/microsoft/azure/management/appservice/v2016_03_01/implementation/ResourceHealthMetadatasInner.java#L730-L737
neo4j/neo4j-java-driver
driver/src/main/java/org/neo4j/driver/internal/security/TrustOnFirstUseTrustManager.java
TrustOnFirstUseTrustManager.checkServerTrusted
public void checkServerTrusted( X509Certificate[] chain, String authType ) throws CertificateException { """ /* Trust the cert if it is seen first time for this server or it is the same with the one registered. """ X509Certificate certificate = chain[0]; String cert = fingerprint(...
java
public void checkServerTrusted( X509Certificate[] chain, String authType ) throws CertificateException { X509Certificate certificate = chain[0]; String cert = fingerprint( certificate ); if ( this.fingerprint == null ) { try { sav...
[ "public", "void", "checkServerTrusted", "(", "X509Certificate", "[", "]", "chain", ",", "String", "authType", ")", "throws", "CertificateException", "{", "X509Certificate", "certificate", "=", "chain", "[", "0", "]", ";", "String", "cert", "=", "fingerprint", "(...
/* Trust the cert if it is seen first time for this server or it is the same with the one registered.
[ "/", "*", "Trust", "the", "cert", "if", "it", "is", "seen", "first", "time", "for", "this", "server", "or", "it", "is", "the", "same", "with", "the", "one", "registered", "." ]
train
https://github.com/neo4j/neo4j-java-driver/blob/8dad6c48251fa1ab7017e72d9998a24fa2337a22/driver/src/main/java/org/neo4j/driver/internal/security/TrustOnFirstUseTrustManager.java#L161-L197
geomajas/geomajas-project-server
impl/src/main/java/org/geomajas/internal/layer/feature/AttributeService.java
AttributeService.setAttributeEditable
public void setAttributeEditable(Attribute attribute, boolean editable) { """ Set editable state on an attribute. This needs to also set the state on the associated attributes. @param attribute attribute for which the editable state needs to be set @param editable new editable state """ attribute.setEdit...
java
public void setAttributeEditable(Attribute attribute, boolean editable) { attribute.setEditable(editable); if (!(attribute instanceof LazyAttribute)) { // should not instantiate lazy attributes! if (attribute instanceof ManyToOneAttribute) { setAttributeEditable(((ManyToOneAttribute) attribute).getValue(), e...
[ "public", "void", "setAttributeEditable", "(", "Attribute", "attribute", ",", "boolean", "editable", ")", "{", "attribute", ".", "setEditable", "(", "editable", ")", ";", "if", "(", "!", "(", "attribute", "instanceof", "LazyAttribute", ")", ")", "{", "// shoul...
Set editable state on an attribute. This needs to also set the state on the associated attributes. @param attribute attribute for which the editable state needs to be set @param editable new editable state
[ "Set", "editable", "state", "on", "an", "attribute", ".", "This", "needs", "to", "also", "set", "the", "state", "on", "the", "associated", "attributes", "." ]
train
https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/impl/src/main/java/org/geomajas/internal/layer/feature/AttributeService.java#L124-L136
OpenLiberty/open-liberty
dev/com.ibm.ws.security.csiv2.common/src/com/ibm/ws/transport/iiop/asn1/pkcs/PrivateKeyInfo.java
PrivateKeyInfo.toASN1Object
public DERObject toASN1Object() { """ write out an RSA private key with it's asscociated information as described in PKCS8. <pre> PrivateKeyInfo ::= SEQUENCE { version Version, privateKeyAlgorithm AlgorithmIdentifier {{PrivateKeyAlgorithms}}, privateKey PrivateKey, attributes [0] IMPLICIT Attributes OPTIONA...
java
public DERObject toASN1Object() { ASN1EncodableVector v = new ASN1EncodableVector(); v.add(new DERInteger(0)); v.add(algId); v.add(new DEROctetString(privKey)); if (attributes != null) { v.add(new DERTaggedObject(false, 0, attributes)); } ...
[ "public", "DERObject", "toASN1Object", "(", ")", "{", "ASN1EncodableVector", "v", "=", "new", "ASN1EncodableVector", "(", ")", ";", "v", ".", "add", "(", "new", "DERInteger", "(", "0", ")", ")", ";", "v", ".", "add", "(", "algId", ")", ";", "v", ".",...
write out an RSA private key with it's asscociated information as described in PKCS8. <pre> PrivateKeyInfo ::= SEQUENCE { version Version, privateKeyAlgorithm AlgorithmIdentifier {{PrivateKeyAlgorithms}}, privateKey PrivateKey, attributes [0] IMPLICIT Attributes OPTIONAL } Version ::= INTEGER {v1(0)} (v1,...) PrivateK...
[ "write", "out", "an", "RSA", "private", "key", "with", "it", "s", "asscociated", "information", "as", "described", "in", "PKCS8", ".", "<pre", ">", "PrivateKeyInfo", "::", "=", "SEQUENCE", "{", "version", "Version", "privateKeyAlgorithm", "AlgorithmIdentifier", ...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.csiv2.common/src/com/ibm/ws/transport/iiop/asn1/pkcs/PrivateKeyInfo.java#L136-L150
voldemort/voldemort
src/java/voldemort/store/stats/ClientSocketStats.java
ClientSocketStats.recordResourceRequestQueueLength
public void recordResourceRequestQueueLength(SocketDestination dest, int queueLength) { """ Record the resource request queue length @param dest Destination of the socket for which resource request is enqueued. Will actually record if null. Otherwise will call this on self and corresponding child with this pa...
java
public void recordResourceRequestQueueLength(SocketDestination dest, int queueLength) { if(dest != null) { getOrCreateNodeStats(dest).recordResourceRequestQueueLength(null, queueLength); recordResourceRequestQueueLength(null, queueLength); } else { this.resourceReques...
[ "public", "void", "recordResourceRequestQueueLength", "(", "SocketDestination", "dest", ",", "int", "queueLength", ")", "{", "if", "(", "dest", "!=", "null", ")", "{", "getOrCreateNodeStats", "(", "dest", ")", ".", "recordResourceRequestQueueLength", "(", "null", ...
Record the resource request queue length @param dest Destination of the socket for which resource request is enqueued. Will actually record if null. Otherwise will call this on self and corresponding child with this param null. @param queueLength The number of entries in the "asynchronous" resource request queue.
[ "Record", "the", "resource", "request", "queue", "length" ]
train
https://github.com/voldemort/voldemort/blob/a7dbdea58032021361680faacf2782cf981c5332/src/java/voldemort/store/stats/ClientSocketStats.java#L321-L329
liferay/com-liferay-commerce
commerce-wish-list-service/src/main/java/com/liferay/commerce/wish/list/service/persistence/impl/CommerceWishListPersistenceImpl.java
CommerceWishListPersistenceImpl.findByG_U_D
@Override public List<CommerceWishList> findByG_U_D(long groupId, long userId, boolean defaultWishList, int start, int end) { """ Returns a range of all the commerce wish lists where groupId = &#63; and userId = &#63; and defaultWishList = &#63;. <p> Useful when paginating results. Returns a maximum of <cod...
java
@Override public List<CommerceWishList> findByG_U_D(long groupId, long userId, boolean defaultWishList, int start, int end) { return findByG_U_D(groupId, userId, defaultWishList, start, end, null); }
[ "@", "Override", "public", "List", "<", "CommerceWishList", ">", "findByG_U_D", "(", "long", "groupId", ",", "long", "userId", ",", "boolean", "defaultWishList", ",", "int", "start", ",", "int", "end", ")", "{", "return", "findByG_U_D", "(", "groupId", ",", ...
Returns a range of all the commerce wish lists where groupId = &#63; and userId = &#63; and defaultWishList = &#63;. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code...
[ "Returns", "a", "range", "of", "all", "the", "commerce", "wish", "lists", "where", "groupId", "=", "&#63", ";", "and", "userId", "=", "&#63", ";", "and", "defaultWishList", "=", "&#63", ";", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-wish-list-service/src/main/java/com/liferay/commerce/wish/list/service/persistence/impl/CommerceWishListPersistenceImpl.java#L3673-L3677
badamowicz/sonar-hla
sonar-hla/src/main/java/com/github/badamowicz/sonar/hla/impl/SonarHLAFactory.java
SonarHLAFactory.getExtractor
public static ISonarExtractor getExtractor(String hostURL, String userName, String password) { """ Create an instance of an {@link ISonarExtractor} type. @param hostURL The host URL pointing to SonarQube. @param userName The user name. @param password The password for the given user. Beware that it will not b...
java
public static ISonarExtractor getExtractor(String hostURL, String userName, String password) { return new DefaultSonarExtractor(hostURL, userName, password); }
[ "public", "static", "ISonarExtractor", "getExtractor", "(", "String", "hostURL", ",", "String", "userName", ",", "String", "password", ")", "{", "return", "new", "DefaultSonarExtractor", "(", "hostURL", ",", "userName", ",", "password", ")", ";", "}" ]
Create an instance of an {@link ISonarExtractor} type. @param hostURL The host URL pointing to SonarQube. @param userName The user name. @param password The password for the given user. Beware that it will not be handled in a safe way. So better use a kind of technical user or, if possible, use {@link #getExtractor(St...
[ "Create", "an", "instance", "of", "an", "{", "@link", "ISonarExtractor", "}", "type", "." ]
train
https://github.com/badamowicz/sonar-hla/blob/21bd8a853d81966b47e96b518430abbc07ccd5f3/sonar-hla/src/main/java/com/github/badamowicz/sonar/hla/impl/SonarHLAFactory.java#L88-L91
rwl/CSparseJ
src/main/java/edu/emory/mathcs/csparsej/tdcomplex/DZcs_gaxpy.java
DZcs_gaxpy.cs_gaxpy
public static boolean cs_gaxpy (DZcs A, DZcsa x, DZcsa y) { """ Sparse matrix times dense column vector, y = A*x+y. @param A column-compressed matrix @param x size n, vector x @param y size m, vector y @return true if successful, false on error """ int p, j, n, Ap[], Ai[] ; DZcsa Ax = new DZcsa(...
java
public static boolean cs_gaxpy (DZcs A, DZcsa x, DZcsa y) { int p, j, n, Ap[], Ai[] ; DZcsa Ax = new DZcsa() ; if (!CS_CSC (A) || x == null || y == null) return (false) ; /* check inputs */ n = A.n ; Ap = A.p ; Ai = A.i ; Ax.x = A.x ; for (j = 0 ; j < n ; j++) { for (p = Ap [j] ; p < Ap [j+1] ; ...
[ "public", "static", "boolean", "cs_gaxpy", "(", "DZcs", "A", ",", "DZcsa", "x", ",", "DZcsa", "y", ")", "{", "int", "p", ",", "j", ",", "n", ",", "Ap", "[", "]", ",", "Ai", "[", "]", ";", "DZcsa", "Ax", "=", "new", "DZcsa", "(", ")", ";", "...
Sparse matrix times dense column vector, y = A*x+y. @param A column-compressed matrix @param x size n, vector x @param y size m, vector y @return true if successful, false on error
[ "Sparse", "matrix", "times", "dense", "column", "vector", "y", "=", "A", "*", "x", "+", "y", "." ]
train
https://github.com/rwl/CSparseJ/blob/6a6f66bccce1558156a961494358952603b0ac84/src/main/java/edu/emory/mathcs/csparsej/tdcomplex/DZcs_gaxpy.java#L54-L68
CenturyLinkCloud/mdw
mdw-workflow/src/com/centurylink/mdw/workflow/adapter/rest/MultiRestServiceAdapter.java
MultiRestServiceAdapter.getEndpointUris
protected List<String> getEndpointUris() throws AdapterException { """ Returns the endpoint URLs for the RESTful service. Supports property specifiers via the syntax for {@link #AdapterActivityBase.getAttributeValueSmart(String)}. @throws ActivityException """ List<String> urlmap = new ArrayList<Str...
java
protected List<String> getEndpointUris() throws AdapterException { List<String> urlmap = new ArrayList<String>(); try { String map = getAttributeValue(ENDPOINT_URI); List<String[]> urlmaparray; if (map==null) urlmaparray = new ArrayList<String[]>(); ...
[ "protected", "List", "<", "String", ">", "getEndpointUris", "(", ")", "throws", "AdapterException", "{", "List", "<", "String", ">", "urlmap", "=", "new", "ArrayList", "<", "String", ">", "(", ")", ";", "try", "{", "String", "map", "=", "getAttributeValue"...
Returns the endpoint URLs for the RESTful service. Supports property specifiers via the syntax for {@link #AdapterActivityBase.getAttributeValueSmart(String)}. @throws ActivityException
[ "Returns", "the", "endpoint", "URLs", "for", "the", "RESTful", "service", ".", "Supports", "property", "specifiers", "via", "the", "syntax", "for", "{" ]
train
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-workflow/src/com/centurylink/mdw/workflow/adapter/rest/MultiRestServiceAdapter.java#L96-L113
lievendoclo/Valkyrie-RCP
valkyrie-rcp-core/src/main/java/org/valkyriercp/binding/form/support/DefaultFieldMetadata.java
DefaultFieldMetadata.setUserMetadata
public void setUserMetadata(final String key, final Object value) { """ Sets custom metadata to be associated with this property. A property change event will be fired (from this FieldMetadata, not from the associated form property) if <code>value</code> differs from the current value of the specified <code>ke...
java
public void setUserMetadata(final String key, final Object value) { final Object old = userMetadata.put(key, value); firePropertyChange(key, old, value); }
[ "public", "void", "setUserMetadata", "(", "final", "String", "key", ",", "final", "Object", "value", ")", "{", "final", "Object", "old", "=", "userMetadata", ".", "put", "(", "key", ",", "value", ")", ";", "firePropertyChange", "(", "key", ",", "old", ",...
Sets custom metadata to be associated with this property. A property change event will be fired (from this FieldMetadata, not from the associated form property) if <code>value</code> differs from the current value of the specified <code>key</code>. The property change event will use the value of <code>key</code> as t...
[ "Sets", "custom", "metadata", "to", "be", "associated", "with", "this", "property", ".", "A", "property", "change", "event", "will", "be", "fired", "(", "from", "this", "FieldMetadata", "not", "from", "the", "associated", "form", "property", ")", "if", "<cod...
train
https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/binding/form/support/DefaultFieldMetadata.java#L137-L140
lessthanoptimal/BoofCV
main/boofcv-feature/src/main/java/boofcv/factory/feature/detect/interest/FactoryDetectPoint.java
FactoryDetectPoint.createHessian
public static <T extends ImageGray<T>, D extends ImageGray<D>> GeneralFeatureDetector<T, D> createHessian(HessianBlobIntensity.Type type, @Nullable ConfigGeneralDetector configDetector, Class<D> derivType) { """ Creates a Hessian based blob detector. Minimums and Maximums. @param type ...
java
public static <T extends ImageGray<T>, D extends ImageGray<D>> GeneralFeatureDetector<T, D> createHessian(HessianBlobIntensity.Type type, @Nullable ConfigGeneralDetector configDetector, Class<D> derivType) { if( configDetector == null) configDetector = new ConfigGeneralDetector(); GeneralFeatureI...
[ "public", "static", "<", "T", "extends", "ImageGray", "<", "T", ">", ",", "D", "extends", "ImageGray", "<", "D", ">", ">", "GeneralFeatureDetector", "<", "T", ",", "D", ">", "createHessian", "(", "HessianBlobIntensity", ".", "Type", "type", ",", "@", "Nu...
Creates a Hessian based blob detector. Minimums and Maximums. @param type The type of Hessian based blob detector to use. DETERMINANT often works well. @param configDetector Configuration for feature detector. @param derivType Type of derivative image. @see HessianBlobIntensity
[ "Creates", "a", "Hessian", "based", "blob", "detector", ".", "Minimums", "and", "Maximums", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/factory/feature/detect/interest/FactoryDetectPoint.java#L188-L196
Stratio/stratio-cassandra
src/java/org/apache/cassandra/db/ArrayBackedSortedColumns.java
ArrayBackedSortedColumns.binarySearch
private int binarySearch(int fromIndex, int toIndex, Composite name, Comparator<Composite> comparator) { """ Simple binary search for a given cell name. The return value has the exact same meaning that the one of Collections.binarySearch(). (We don't use Collections.binarySearch() directly because it would requi...
java
private int binarySearch(int fromIndex, int toIndex, Composite name, Comparator<Composite> comparator) { int low = fromIndex; int mid = toIndex; int high = mid - 1; int result = -1; while (low <= high) { mid = (low + high) >> 1; if ((result = c...
[ "private", "int", "binarySearch", "(", "int", "fromIndex", ",", "int", "toIndex", ",", "Composite", "name", ",", "Comparator", "<", "Composite", ">", "comparator", ")", "{", "int", "low", "=", "fromIndex", ";", "int", "mid", "=", "toIndex", ";", "int", "...
Simple binary search for a given cell name. The return value has the exact same meaning that the one of Collections.binarySearch(). (We don't use Collections.binarySearch() directly because it would require us to create a fake Cell (as well as an Cell comparator) to do the search, which is ugly.
[ "Simple", "binary", "search", "for", "a", "given", "cell", "name", ".", "The", "return", "value", "has", "the", "exact", "same", "meaning", "that", "the", "one", "of", "Collections", ".", "binarySearch", "()", ".", "(", "We", "don", "t", "use", "Collecti...
train
https://github.com/Stratio/stratio-cassandra/blob/f6416b43ad5309083349ad56266450fa8c6a2106/src/java/org/apache/cassandra/db/ArrayBackedSortedColumns.java#L417-L434
OpenLiberty/open-liberty
dev/com.ibm.ws.cdi.weld/src/com/ibm/ws/cdi/impl/DiscoveredBdas.java
DiscoveredBdas.isAlreadyAccessible
public boolean isAlreadyAccessible(ArchiveType archiveType, CDIArchive archive) throws CDIException { """ Returns true if the given archive is accessible to all modules of the given module type <ul> <li>EAR and shared libraries are available to all modules</li> <li>EJB and RAR modules are accessible to all othe...
java
public boolean isAlreadyAccessible(ArchiveType archiveType, CDIArchive archive) throws CDIException { String path = archive.getPath(); if (libraryPaths.contains(path)) { return true; } else if (archiveType == ArchiveType.EAR_LIB || archiveType == ArchiveType.RAR_MODULE || archiveType...
[ "public", "boolean", "isAlreadyAccessible", "(", "ArchiveType", "archiveType", ",", "CDIArchive", "archive", ")", "throws", "CDIException", "{", "String", "path", "=", "archive", ".", "getPath", "(", ")", ";", "if", "(", "libraryPaths", ".", "contains", "(", "...
Returns true if the given archive is accessible to all modules of the given module type <ul> <li>EAR and shared libraries are available to all modules</li> <li>EJB and RAR modules are accessible to all other EJB modules, RAR modules and Web modules</li> <li>Web and App Client modules are not accessible to other modules...
[ "Returns", "true", "if", "the", "given", "archive", "is", "accessible", "to", "all", "modules", "of", "the", "given", "module", "type", "<ul", ">", "<li", ">", "EAR", "and", "shared", "libraries", "are", "available", "to", "all", "modules<", "/", "li", "...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.cdi.weld/src/com/ibm/ws/cdi/impl/DiscoveredBdas.java#L71-L81
powermock/powermock
powermock-reflect/src/main/java/org/powermock/reflect/internal/WhiteboxImpl.java
WhiteboxImpl.createInstance
private static <T> T createInstance(Constructor<T> constructor, Object... arguments) throws Exception { """ Creates the instance. @param <T> the generic type @param constructor the constructor @param arguments the arguments @return the t @throws Exception the exception """ if (construc...
java
private static <T> T createInstance(Constructor<T> constructor, Object... arguments) throws Exception { if (constructor == null) { throw new IllegalArgumentException("Constructor cannot be null"); } constructor.setAccessible(true); T createdObject = null; try { ...
[ "private", "static", "<", "T", ">", "T", "createInstance", "(", "Constructor", "<", "T", ">", "constructor", ",", "Object", "...", "arguments", ")", "throws", "Exception", "{", "if", "(", "constructor", "==", "null", ")", "{", "throw", "new", "IllegalArgum...
Creates the instance. @param <T> the generic type @param constructor the constructor @param arguments the arguments @return the t @throws Exception the exception
[ "Creates", "the", "instance", "." ]
train
https://github.com/powermock/powermock/blob/e8cd68026c284c6a7efe66959809eeebd8d1f9ad/powermock-reflect/src/main/java/org/powermock/reflect/internal/WhiteboxImpl.java#L1396-L1425
deeplearning4j/deeplearning4j
nd4j/nd4j-serde/nd4j-grpc/src/main/java/org/nd4j/graph/GraphInferenceGrpcClient.java
GraphInferenceGrpcClient.output
public <T> T output(long graphId, T value, OperandsAdapter<T> adapter) { """ This method is suited for use of custom OperandsAdapters @param adapter @param <T> @return """ return adapter.output(this.output(graphId, adapter.input(value))); }
java
public <T> T output(long graphId, T value, OperandsAdapter<T> adapter) { return adapter.output(this.output(graphId, adapter.input(value))); }
[ "public", "<", "T", ">", "T", "output", "(", "long", "graphId", ",", "T", "value", ",", "OperandsAdapter", "<", "T", ">", "adapter", ")", "{", "return", "adapter", ".", "output", "(", "this", ".", "output", "(", "graphId", ",", "adapter", ".", "input...
This method is suited for use of custom OperandsAdapters @param adapter @param <T> @return
[ "This", "method", "is", "suited", "for", "use", "of", "custom", "OperandsAdapters" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-serde/nd4j-grpc/src/main/java/org/nd4j/graph/GraphInferenceGrpcClient.java#L127-L129
openengsb/openengsb
components/ekb/transformation-wonderland/src/main/java/org/openengsb/core/ekb/transformation/wonderland/internal/operation/SplitOperation.java
SplitOperation.performSplitting
private String performSplitting(String source, String splitString, String indexString) throws TransformationOperationException { """ Performs the actual splitting operation. Throws a TransformationOperationException if the index string is not a number or causes an IndexOutOfBoundsException. """ ...
java
private String performSplitting(String source, String splitString, String indexString) throws TransformationOperationException { try { Integer index = Integer.parseInt(indexString); return source.split(splitString)[index]; } catch (NumberFormatException e) { t...
[ "private", "String", "performSplitting", "(", "String", "source", ",", "String", "splitString", ",", "String", "indexString", ")", "throws", "TransformationOperationException", "{", "try", "{", "Integer", "index", "=", "Integer", ".", "parseInt", "(", "indexString",...
Performs the actual splitting operation. Throws a TransformationOperationException if the index string is not a number or causes an IndexOutOfBoundsException.
[ "Performs", "the", "actual", "splitting", "operation", ".", "Throws", "a", "TransformationOperationException", "if", "the", "index", "string", "is", "not", "a", "number", "or", "causes", "an", "IndexOutOfBoundsException", "." ]
train
https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/components/ekb/transformation-wonderland/src/main/java/org/openengsb/core/ekb/transformation/wonderland/internal/operation/SplitOperation.java#L71-L82
OpenLiberty/open-liberty
dev/com.ibm.ws.webservices.javaee.common/src/com/ibm/ws/webservices/javaee/common/internal/JaxWsDDHelper.java
JaxWsDDHelper.getPortComponentByEJBLink
static PortComponent getPortComponentByEJBLink(String ejbLink, Adaptable containerToAdapt) throws UnableToAdaptException { """ Get the PortComponent by ejb-link. @param ejbLink @param containerToAdapt @return @throws UnableToAdaptException """ return getHighLevelElementByServiceImplBean(ejbLink, ...
java
static PortComponent getPortComponentByEJBLink(String ejbLink, Adaptable containerToAdapt) throws UnableToAdaptException { return getHighLevelElementByServiceImplBean(ejbLink, containerToAdapt, PortComponent.class, LinkType.EJB); }
[ "static", "PortComponent", "getPortComponentByEJBLink", "(", "String", "ejbLink", ",", "Adaptable", "containerToAdapt", ")", "throws", "UnableToAdaptException", "{", "return", "getHighLevelElementByServiceImplBean", "(", "ejbLink", ",", "containerToAdapt", ",", "PortComponent...
Get the PortComponent by ejb-link. @param ejbLink @param containerToAdapt @return @throws UnableToAdaptException
[ "Get", "the", "PortComponent", "by", "ejb", "-", "link", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.webservices.javaee.common/src/com/ibm/ws/webservices/javaee/common/internal/JaxWsDDHelper.java#L44-L46
groupon/odo
proxylib/src/main/java/com/groupon/odo/proxylib/PathOverrideService.java
PathOverrideService.removeOverride
public void removeOverride(int groupId, String methodName, String className) { """ Remove an override from a group by method/classname @param groupId ID of group @param methodName name of method @param className name of class """ String statementString = "DELETE FROM " + Constants.DB_TABLE_OVERRID...
java
public void removeOverride(int groupId, String methodName, String className) { String statementString = "DELETE FROM " + Constants.DB_TABLE_OVERRIDE + " WHERE " + Constants.OVERRIDE_GROUP_ID + " = ? AND " + Constants.OVERRIDE_CLASS_NAME + " = ? AND " + Constants.OVERRIDE_METHOD_NAME + " = ?"; ...
[ "public", "void", "removeOverride", "(", "int", "groupId", ",", "String", "methodName", ",", "String", "className", ")", "{", "String", "statementString", "=", "\"DELETE FROM \"", "+", "Constants", ".", "DB_TABLE_OVERRIDE", "+", "\" WHERE \"", "+", "Constants", "....
Remove an override from a group by method/classname @param groupId ID of group @param methodName name of method @param className name of class
[ "Remove", "an", "override", "from", "a", "group", "by", "method", "/", "classname" ]
train
https://github.com/groupon/odo/blob/3bae43d5eca8ace036775e5b2d3ed9af1a9ff9b1/proxylib/src/main/java/com/groupon/odo/proxylib/PathOverrideService.java#L613-L631
UrielCh/ovh-java-sdk
ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java
ApiOvhOrder.license_windows_new_duration_POST
public OvhOrder license_windows_new_duration_POST(String duration, String ip, OvhLicenseTypeEnum serviceType, OvhWindowsSqlVersionEnum sqlVersion, OvhWindowsOsVersionEnum version) throws IOException { """ Create order REST: POST /order/license/windows/new/{duration} @param serviceType [required] # DEPRECATED #...
java
public OvhOrder license_windows_new_duration_POST(String duration, String ip, OvhLicenseTypeEnum serviceType, OvhWindowsSqlVersionEnum sqlVersion, OvhWindowsOsVersionEnum version) throws IOException { String qPath = "/order/license/windows/new/{duration}"; StringBuilder sb = path(qPath, duration); HashMap<String,...
[ "public", "OvhOrder", "license_windows_new_duration_POST", "(", "String", "duration", ",", "String", "ip", ",", "OvhLicenseTypeEnum", "serviceType", ",", "OvhWindowsSqlVersionEnum", "sqlVersion", ",", "OvhWindowsOsVersionEnum", "version", ")", "throws", "IOException", "{", ...
Create order REST: POST /order/license/windows/new/{duration} @param serviceType [required] # DEPRECATED # The kind of service on which this license will be used # Will not be used, keeped only for compatibility # @param sqlVersion [required] The SQL Server version to enable on this license Windows license @param vers...
[ "Create", "order" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java#L1280-L1290
Azure/azure-sdk-for-java
cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java
ModelsImpl.getExplicitListItemAsync
public Observable<ExplicitListItem> getExplicitListItemAsync(UUID appId, String versionId, UUID entityId, long itemId) { """ Get the explicit list of the pattern.any entity. @param appId The application ID. @param versionId The version ID. @param entityId The Pattern.Any entity Id. @param itemId The explicit...
java
public Observable<ExplicitListItem> getExplicitListItemAsync(UUID appId, String versionId, UUID entityId, long itemId) { return getExplicitListItemWithServiceResponseAsync(appId, versionId, entityId, itemId).map(new Func1<ServiceResponse<ExplicitListItem>, ExplicitListItem>() { @Override ...
[ "public", "Observable", "<", "ExplicitListItem", ">", "getExplicitListItemAsync", "(", "UUID", "appId", ",", "String", "versionId", ",", "UUID", "entityId", ",", "long", "itemId", ")", "{", "return", "getExplicitListItemWithServiceResponseAsync", "(", "appId", ",", ...
Get the explicit list of the pattern.any entity. @param appId The application ID. @param versionId The version ID. @param entityId The Pattern.Any entity Id. @param itemId The explicit list item Id. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the ExplicitListItem...
[ "Get", "the", "explicit", "list", "of", "the", "pattern", ".", "any", "entity", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java#L13995-L14002
apache/groovy
subprojects/groovy-swing/src/main/java/org/codehaus/groovy/runtime/SwingGroovyMethods.java
SwingGroovyMethods.setMnemonic
public static void setMnemonic(AbstractButton button, String mnemonic) { """ Allows the usage of a one-element string for a mnemonic @param button a AbstractButton @param mnemonic the String @since 2.3.7 """ char c = ShortTypeHandling.castToChar(mnemonic); button.setMnemonic(c); }
java
public static void setMnemonic(AbstractButton button, String mnemonic) { char c = ShortTypeHandling.castToChar(mnemonic); button.setMnemonic(c); }
[ "public", "static", "void", "setMnemonic", "(", "AbstractButton", "button", ",", "String", "mnemonic", ")", "{", "char", "c", "=", "ShortTypeHandling", ".", "castToChar", "(", "mnemonic", ")", ";", "button", ".", "setMnemonic", "(", "c", ")", ";", "}" ]
Allows the usage of a one-element string for a mnemonic @param button a AbstractButton @param mnemonic the String @since 2.3.7
[ "Allows", "the", "usage", "of", "a", "one", "-", "element", "string", "for", "a", "mnemonic" ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/subprojects/groovy-swing/src/main/java/org/codehaus/groovy/runtime/SwingGroovyMethods.java#L1058-L1061
Azure/azure-sdk-for-java
network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/NetworkWatchersInner.java
NetworkWatchersInner.beginGetFlowLogStatus
public FlowLogInformationInner beginGetFlowLogStatus(String resourceGroupName, String networkWatcherName, String targetResourceId) { """ Queries status of flow log on a specified resource. @param resourceGroupName The name of the network watcher resource group. @param networkWatcherName The name of the network...
java
public FlowLogInformationInner beginGetFlowLogStatus(String resourceGroupName, String networkWatcherName, String targetResourceId) { return beginGetFlowLogStatusWithServiceResponseAsync(resourceGroupName, networkWatcherName, targetResourceId).toBlocking().single().body(); }
[ "public", "FlowLogInformationInner", "beginGetFlowLogStatus", "(", "String", "resourceGroupName", ",", "String", "networkWatcherName", ",", "String", "targetResourceId", ")", "{", "return", "beginGetFlowLogStatusWithServiceResponseAsync", "(", "resourceGroupName", ",", "network...
Queries status of flow log on a specified resource. @param resourceGroupName The name of the network watcher resource group. @param networkWatcherName The name of the network watcher resource. @param targetResourceId The target resource where getting the flow logging status. @throws IllegalArgumentException thrown if ...
[ "Queries", "status", "of", "flow", "log", "on", "a", "specified", "resource", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/NetworkWatchersInner.java#L2046-L2048
alkacon/opencms-core
src/org/opencms/db/generic/CmsUserDriver.java
CmsUserDriver.internalCreateAce
protected CmsAccessControlEntry internalCreateAce(ResultSet res, CmsUUID newId) throws SQLException { """ Internal helper method to create an access control entry from a database record.<p> @param res resultset of the current query @param newId the id of the new access control entry @return a new {@link Cms...
java
protected CmsAccessControlEntry internalCreateAce(ResultSet res, CmsUUID newId) throws SQLException { return new CmsAccessControlEntry( newId, new CmsUUID(res.getString(m_sqlManager.readQuery("C_ACCESS_PRINCIPAL_ID_0"))), res.getInt(m_sqlManager.readQuery("C_ACCESS_ACCESS_AL...
[ "protected", "CmsAccessControlEntry", "internalCreateAce", "(", "ResultSet", "res", ",", "CmsUUID", "newId", ")", "throws", "SQLException", "{", "return", "new", "CmsAccessControlEntry", "(", "newId", ",", "new", "CmsUUID", "(", "res", ".", "getString", "(", "m_sq...
Internal helper method to create an access control entry from a database record.<p> @param res resultset of the current query @param newId the id of the new access control entry @return a new {@link CmsAccessControlEntry} initialized with the values from the current database record @throws SQLException if something ...
[ "Internal", "helper", "method", "to", "create", "an", "access", "control", "entry", "from", "a", "database", "record", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/generic/CmsUserDriver.java#L2179-L2187
oboehm/jfachwert
src/main/java/de/jfachwert/bank/GeldbetragFactory.java
GeldbetragFactory.create
@Override public Geldbetrag create() { """ Erzeugt einen neuen {@link Geldbetrag} anhand der eingestellten Daten. @return den entsprechenden {@link Geldbetrag}. @see #getAmountType() """ if (currency == null) { throw new LocalizedMonetaryException("currency missing", number); ...
java
@Override public Geldbetrag create() { if (currency == null) { throw new LocalizedMonetaryException("currency missing", number); } return Geldbetrag.valueOf(number, currency, context); }
[ "@", "Override", "public", "Geldbetrag", "create", "(", ")", "{", "if", "(", "currency", "==", "null", ")", "{", "throw", "new", "LocalizedMonetaryException", "(", "\"currency missing\"", ",", "number", ")", ";", "}", "return", "Geldbetrag", ".", "valueOf", ...
Erzeugt einen neuen {@link Geldbetrag} anhand der eingestellten Daten. @return den entsprechenden {@link Geldbetrag}. @see #getAmountType()
[ "Erzeugt", "einen", "neuen", "{", "@link", "Geldbetrag", "}", "anhand", "der", "eingestellten", "Daten", "." ]
train
https://github.com/oboehm/jfachwert/blob/67b513d29e3114c7aee65cd1ea7a5b7e540b0d1b/src/main/java/de/jfachwert/bank/GeldbetragFactory.java#L165-L171
js-lib-com/template.xhtml
src/main/java/js/template/xhtml/NumberingOperator.java
NumberingOperator.doExec
@Override protected Object doExec(Element element, Object scope, String format, Object... arguments) throws IOException { """ Insert formatted numbering as element text content. If serializer indexes stack is empty throws templates exception; anyway, validation tool running on build catches numbering operator ...
java
@Override protected Object doExec(Element element, Object scope, String format, Object... arguments) throws IOException { Stack<Index> indexes = this.serializer.getIndexes(); if(indexes.size() == 0) { throw new TemplateException("Required ordered collection index is missing. Numbering operator ca...
[ "@", "Override", "protected", "Object", "doExec", "(", "Element", "element", ",", "Object", "scope", ",", "String", "format", ",", "Object", "...", "arguments", ")", "throws", "IOException", "{", "Stack", "<", "Index", ">", "indexes", "=", "this", ".", "se...
Insert formatted numbering as element text content. If serializer indexes stack is empty throws templates exception; anyway, validation tool running on build catches numbering operator without surrounding ordered list. @param element element declaring numbering operator, @param scope scope object, @param format number...
[ "Insert", "formatted", "numbering", "as", "element", "text", "content", ".", "If", "serializer", "indexes", "stack", "is", "empty", "throws", "templates", "exception", ";", "anyway", "validation", "tool", "running", "on", "build", "catches", "numbering", "operator...
train
https://github.com/js-lib-com/template.xhtml/blob/d50cec08aca9ab9680baebe2a26a341c096564fb/src/main/java/js/template/xhtml/NumberingOperator.java#L94-L103
apache/groovy
src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java
DefaultGroovyMethods.setMetaClass
public static void setMetaClass(GroovyObject self, MetaClass metaClass) { """ Set the metaclass for a GroovyObject. @param self the object whose metaclass we want to set @param metaClass the new metaclass value @since 2.0.0 """ // this method was introduced as to prevent from a stack overflow, descr...
java
public static void setMetaClass(GroovyObject self, MetaClass metaClass) { // this method was introduced as to prevent from a stack overflow, described in GROOVY-5285 if (metaClass instanceof HandleMetaClass) metaClass = ((HandleMetaClass)metaClass).getAdaptee(); self.setMetaClass(me...
[ "public", "static", "void", "setMetaClass", "(", "GroovyObject", "self", ",", "MetaClass", "metaClass", ")", "{", "// this method was introduced as to prevent from a stack overflow, described in GROOVY-5285", "if", "(", "metaClass", "instanceof", "HandleMetaClass", ")", "metaCl...
Set the metaclass for a GroovyObject. @param self the object whose metaclass we want to set @param metaClass the new metaclass value @since 2.0.0
[ "Set", "the", "metaclass", "for", "a", "GroovyObject", "." ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java#L17309-L17316
terrestris/shogun-core
src/shogun-core-main/src/main/java/de/terrestris/shoguncore/service/ImageFileService.java
ImageFileService.saveImage
@PreAuthorize("isAuthenticated()") public E saveImage(MultipartFile file, boolean createThumbnail, Integer thumbnailTargetSize) throws Exception { """ Method persists a given Image as a bytearray in the database @param file @param createThumbnail @param thumbnailTargetSize @throws Exception "...
java
@PreAuthorize("isAuthenticated()") public E saveImage(MultipartFile file, boolean createThumbnail, Integer thumbnailTargetSize) throws Exception { InputStream is = null; ByteArrayInputStream bais = null; E imageToPersist = null; try { is = file.getInputStream();...
[ "@", "PreAuthorize", "(", "\"isAuthenticated()\"", ")", "public", "E", "saveImage", "(", "MultipartFile", "file", ",", "boolean", "createThumbnail", ",", "Integer", "thumbnailTargetSize", ")", "throws", "Exception", "{", "InputStream", "is", "=", "null", ";", "Byt...
Method persists a given Image as a bytearray in the database @param file @param createThumbnail @param thumbnailTargetSize @throws Exception
[ "Method", "persists", "a", "given", "Image", "as", "a", "bytearray", "in", "the", "database" ]
train
https://github.com/terrestris/shogun-core/blob/3dbabda35ae63235265913c865dba389b050b6e6/src/shogun-core-main/src/main/java/de/terrestris/shoguncore/service/ImageFileService.java#L98-L148
aws/aws-sdk-java
aws-java-sdk-backup/src/main/java/com/amazonaws/services/backup/model/BackupRule.java
BackupRule.withRecoveryPointTags
public BackupRule withRecoveryPointTags(java.util.Map<String, String> recoveryPointTags) { """ <p> An array of key-value pair strings that are assigned to resources that are associated with this rule when restored from backup. </p> @param recoveryPointTags An array of key-value pair strings that are assigne...
java
public BackupRule withRecoveryPointTags(java.util.Map<String, String> recoveryPointTags) { setRecoveryPointTags(recoveryPointTags); return this; }
[ "public", "BackupRule", "withRecoveryPointTags", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "recoveryPointTags", ")", "{", "setRecoveryPointTags", "(", "recoveryPointTags", ")", ";", "return", "this", ";", "}" ]
<p> An array of key-value pair strings that are assigned to resources that are associated with this rule when restored from backup. </p> @param recoveryPointTags An array of key-value pair strings that are assigned to resources that are associated with this rule when restored from backup. @return Returns a reference t...
[ "<p", ">", "An", "array", "of", "key", "-", "value", "pair", "strings", "that", "are", "assigned", "to", "resources", "that", "are", "associated", "with", "this", "rule", "when", "restored", "from", "backup", ".", "<", "/", "p", ">" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-backup/src/main/java/com/amazonaws/services/backup/model/BackupRule.java#L432-L435
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/SeaGlassLookAndFeel.java
SeaGlassLookAndFeel.getSeaGlassStyle
SynthStyle getSeaGlassStyle(JComponent c, Region r) { """ Locate the style associated with the given region and component. This is called from SeaGlassLookAndFeel in the SynthStyleFactory implementation. <p>Lookup occurs as follows:<br/> Check the map of styles <code>styleMap</code>. If the map contains no s...
java
SynthStyle getSeaGlassStyle(JComponent c, Region r) { // validate method arguments if (c == null || r == null) { throw new IllegalArgumentException("Neither comp nor r may be null"); } // if there are no lazy styles registered for the region r, then return // the def...
[ "SynthStyle", "getSeaGlassStyle", "(", "JComponent", "c", ",", "Region", "r", ")", "{", "// validate method arguments", "if", "(", "c", "==", "null", "||", "r", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Neither comp nor r may be n...
Locate the style associated with the given region and component. This is called from SeaGlassLookAndFeel in the SynthStyleFactory implementation. <p>Lookup occurs as follows:<br/> Check the map of styles <code>styleMap</code>. If the map contains no styles at all, then simply return the defaultStyle. If the map contai...
[ "Locate", "the", "style", "associated", "with", "the", "given", "region", "and", "component", ".", "This", "is", "called", "from", "SeaGlassLookAndFeel", "in", "the", "SynthStyleFactory", "implementation", "." ]
train
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/SeaGlassLookAndFeel.java#L2680-L2718
jmurty/java-xmlbuilder
src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java
BaseXMLBuilder.xpathQuery
public Object xpathQuery(String xpath, QName type) throws XPathExpressionException { """ Return the result of evaluating an XPath query on the builder's DOM. Returns null if the query finds nothing, or finds a node that does not match the type specified by returnType. @param xpath an XPath expression...
java
public Object xpathQuery(String xpath, QName type) throws XPathExpressionException { return xpathQuery(xpath, type, null); }
[ "public", "Object", "xpathQuery", "(", "String", "xpath", ",", "QName", "type", ")", "throws", "XPathExpressionException", "{", "return", "xpathQuery", "(", "xpath", ",", "type", ",", "null", ")", ";", "}" ]
Return the result of evaluating an XPath query on the builder's DOM. Returns null if the query finds nothing, or finds a node that does not match the type specified by returnType. @param xpath an XPath expression @param type the type the XPath is expected to resolve to, e.g: {@link XPathConstants#NODE}, {@link XPathCo...
[ "Return", "the", "result", "of", "evaluating", "an", "XPath", "query", "on", "the", "builder", "s", "DOM", ".", "Returns", "null", "if", "the", "query", "finds", "nothing", "or", "finds", "a", "node", "that", "does", "not", "match", "the", "type", "speci...
train
https://github.com/jmurty/java-xmlbuilder/blob/7c224b8e8ed79808509322cb141dab5a88dd3cec/src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java#L434-L437
Baidu-AIP/java-sdk
src/main/java/com/baidu/aip/bodyanalysis/AipBodyAnalysis.java
AipBodyAnalysis.convert
public static void convert(String labelmapBase64, int realWidth, int realHeight, String outPath) { """ 针对人像分割接口,将返回的二值图转化为灰度图,存储为jpg格式 @param labelmapBase64 人像分割接口返回的二值图base64 @param realWidth 图片原始宽度 @param realHeight 图片原始高度 @param outPath 灰度图输出路径 """ try { byte[] bytes = Base64Util.de...
java
public static void convert(String labelmapBase64, int realWidth, int realHeight, String outPath) { try { byte[] bytes = Base64Util.decode(labelmapBase64); InputStream is = new ByteArrayInputStream(bytes); BufferedImage image = ImageIO.read(is); BufferedImage newI...
[ "public", "static", "void", "convert", "(", "String", "labelmapBase64", ",", "int", "realWidth", ",", "int", "realHeight", ",", "String", "outPath", ")", "{", "try", "{", "byte", "[", "]", "bytes", "=", "Base64Util", ".", "decode", "(", "labelmapBase64", "...
针对人像分割接口,将返回的二值图转化为灰度图,存储为jpg格式 @param labelmapBase64 人像分割接口返回的二值图base64 @param realWidth 图片原始宽度 @param realHeight 图片原始高度 @param outPath 灰度图输出路径
[ "针对人像分割接口,将返回的二值图转化为灰度图", "存储为jpg格式" ]
train
https://github.com/Baidu-AIP/java-sdk/blob/16bb8b7bb8f9bbcb7c8af62d0a67a1e79eecad90/src/main/java/com/baidu/aip/bodyanalysis/AipBodyAnalysis.java#L373-L392
duracloud/mill
workman/src/main/java/org/duracloud/mill/dup/DuplicationTaskProcessor.java
DuplicationTaskProcessor.duplicateContent
private void duplicateContent(final String spaceId, final String contentId, final String sourceChecksum, final Map<String, String> sourceProperties) throws TaskExecutionFailedException { """ Copies a conte...
java
private void duplicateContent(final String spaceId, final String contentId, final String sourceChecksum, final Map<String, String> sourceProperties) throws TaskExecutionFailedException { log.info("Dupli...
[ "private", "void", "duplicateContent", "(", "final", "String", "spaceId", ",", "final", "String", "contentId", ",", "final", "String", "sourceChecksum", ",", "final", "Map", "<", "String", ",", "String", ">", "sourceProperties", ")", "throws", "TaskExecutionFailed...
Copies a content item from the source store to the destination store @param spaceId @param contentId
[ "Copies", "a", "content", "item", "from", "the", "source", "store", "to", "the", "destination", "store" ]
train
https://github.com/duracloud/mill/blob/854ac6edcba7fa2cab60993f172e82c2d1dad4bd/workman/src/main/java/org/duracloud/mill/dup/DuplicationTaskProcessor.java#L381-L431
google/closure-compiler
src/com/google/javascript/jscomp/VarCheck.java
VarCheck.createScopeCreator
private Es6SyntacticScopeCreator createScopeCreator() { """ Creates the scope creator used by this pass. If not in validity check mode, use a {@link RedeclarationCheckHandler} to check var redeclarations. """ if (validityCheck) { return new Es6SyntacticScopeCreator(compiler); } else { dupH...
java
private Es6SyntacticScopeCreator createScopeCreator() { if (validityCheck) { return new Es6SyntacticScopeCreator(compiler); } else { dupHandler = new RedeclarationCheckHandler(); return new Es6SyntacticScopeCreator(compiler, dupHandler); } }
[ "private", "Es6SyntacticScopeCreator", "createScopeCreator", "(", ")", "{", "if", "(", "validityCheck", ")", "{", "return", "new", "Es6SyntacticScopeCreator", "(", "compiler", ")", ";", "}", "else", "{", "dupHandler", "=", "new", "RedeclarationCheckHandler", "(", ...
Creates the scope creator used by this pass. If not in validity check mode, use a {@link RedeclarationCheckHandler} to check var redeclarations.
[ "Creates", "the", "scope", "creator", "used", "by", "this", "pass", ".", "If", "not", "in", "validity", "check", "mode", "use", "a", "{" ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/VarCheck.java#L123-L130
oboehm/jfachwert
src/main/java/de/jfachwert/pruefung/exception/InvalidValueException.java
InvalidValueException.getLocalizedMessage
@Override public String getLocalizedMessage() { """ Im Gegensatz {@code getMessage()} wird hier die Beschreibung auf deutsch zurueckgegeben, wenn die Loacale auf Deutsch steht. @return lokalisierte Beschreibung """ String localizedContext = getLocalizedString(context); if (value == null...
java
@Override public String getLocalizedMessage() { String localizedContext = getLocalizedString(context); if (value == null) { return getLocalizedMessage("pruefung.missingvalue.exception.message", localizedContext); } if (range == null) { return getLocalizedMessa...
[ "@", "Override", "public", "String", "getLocalizedMessage", "(", ")", "{", "String", "localizedContext", "=", "getLocalizedString", "(", "context", ")", ";", "if", "(", "value", "==", "null", ")", "{", "return", "getLocalizedMessage", "(", "\"pruefung.missingvalue...
Im Gegensatz {@code getMessage()} wird hier die Beschreibung auf deutsch zurueckgegeben, wenn die Loacale auf Deutsch steht. @return lokalisierte Beschreibung
[ "Im", "Gegensatz", "{", "@code", "getMessage", "()", "}", "wird", "hier", "die", "Beschreibung", "auf", "deutsch", "zurueckgegeben", "wenn", "die", "Loacale", "auf", "Deutsch", "steht", "." ]
train
https://github.com/oboehm/jfachwert/blob/67b513d29e3114c7aee65cd1ea7a5b7e540b0d1b/src/main/java/de/jfachwert/pruefung/exception/InvalidValueException.java#L96-L106
tango-controls/JTango
server/src/main/java/org/tango/logging/LoggingManager.java
LoggingManager.addDeviceAppender
public void addDeviceAppender(final String deviceTargetName, final Class<?> deviceClassName, final String loggingDeviceName) throws DevFailed { """ Logging of device sent to logviewer device @param deviceTargetName @param deviceClassName @param loggingDeviceName @throws DevFailed """ ...
java
public void addDeviceAppender(final String deviceTargetName, final Class<?> deviceClassName, final String loggingDeviceName) throws DevFailed { if (rootLoggerBack != null) { logger.debug("add device appender {} on {}", deviceTargetName, loggingDeviceName); final DeviceAppende...
[ "public", "void", "addDeviceAppender", "(", "final", "String", "deviceTargetName", ",", "final", "Class", "<", "?", ">", "deviceClassName", ",", "final", "String", "loggingDeviceName", ")", "throws", "DevFailed", "{", "if", "(", "rootLoggerBack", "!=", "null", "...
Logging of device sent to logviewer device @param deviceTargetName @param deviceClassName @param loggingDeviceName @throws DevFailed
[ "Logging", "of", "device", "sent", "to", "logviewer", "device" ]
train
https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/server/src/main/java/org/tango/logging/LoggingManager.java#L176-L188
albfernandez/itext2
src/main/java/com/lowagie/text/pdf/PdfAction.java
PdfAction.createLaunch
public static PdfAction createLaunch(String application, String parameters, String operation, String defaultDir) { """ Launches an application or a document. @param application the application to be launched or the document to be opened or printed. @param parameters (Windows-specific) A parameter string to be pa...
java
public static PdfAction createLaunch(String application, String parameters, String operation, String defaultDir) { return new PdfAction(application, parameters, operation, defaultDir); }
[ "public", "static", "PdfAction", "createLaunch", "(", "String", "application", ",", "String", "parameters", ",", "String", "operation", ",", "String", "defaultDir", ")", "{", "return", "new", "PdfAction", "(", "application", ",", "parameters", ",", "operation", ...
Launches an application or a document. @param application the application to be launched or the document to be opened or printed. @param parameters (Windows-specific) A parameter string to be passed to the application. It can be <CODE>null</CODE>. @param operation (Windows-specific) the operation to perform: "open" - O...
[ "Launches", "an", "application", "or", "a", "document", "." ]
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/pdf/PdfAction.java#L261-L263
btrplace/scheduler
api/src/main/java/org/btrplace/model/constraint/migration/Precedence.java
Precedence.newPrecedence
public static List<Precedence> newPrecedence(Collection<VM> vmsBefore, VM vmAfter) { """ Instantiate discrete constraints to force a single VM to migrate after a set of VMs. @param vmsBefore the VMs to migrate before the other one {@see vmAfter} @param vmAfter the (single) VM to migrate after the others {@se...
java
public static List<Precedence> newPrecedence(Collection<VM> vmsBefore, VM vmAfter) { return newPrecedence(vmsBefore, Collections.singleton(vmAfter)); }
[ "public", "static", "List", "<", "Precedence", ">", "newPrecedence", "(", "Collection", "<", "VM", ">", "vmsBefore", ",", "VM", "vmAfter", ")", "{", "return", "newPrecedence", "(", "vmsBefore", ",", "Collections", ".", "singleton", "(", "vmAfter", ")", ")", ...
Instantiate discrete constraints to force a single VM to migrate after a set of VMs. @param vmsBefore the VMs to migrate before the other one {@see vmAfter} @param vmAfter the (single) VM to migrate after the others {@see vmsBefore} @return the associated list of constraints
[ "Instantiate", "discrete", "constraints", "to", "force", "a", "single", "VM", "to", "migrate", "after", "a", "set", "of", "VMs", "." ]
train
https://github.com/btrplace/scheduler/blob/611063aad0b47a016e57ebf36fa4dfdf24de09e8/api/src/main/java/org/btrplace/model/constraint/migration/Precedence.java#L114-L116
jbundle/jbundle
thin/base/db/misc/src/main/java/org/jbundle/thin/base/db/mem/memory/MKeyArea.java
MKeyArea.insertCurrent
public void insertCurrent(FieldTable vectorTable, KeyAreaInfo keyArea, BaseBuffer bufferNew, int iRelPosition) throws DBException { """ Insert this record at the current location. @param table The basetable. @param keyArea The key area. @param bufferNew The buffer to add. @param iRelPosition relative position ...
java
public void insertCurrent(FieldTable vectorTable, KeyAreaInfo keyArea, BaseBuffer bufferNew, int iRelPosition) throws DBException { m_iIndex += iRelPosition; m_VectorObjects.insertElementAt(bufferNew, m_iIndex); m_iIndex = -1; // The index can't be used in caches anymore. }
[ "public", "void", "insertCurrent", "(", "FieldTable", "vectorTable", ",", "KeyAreaInfo", "keyArea", ",", "BaseBuffer", "bufferNew", ",", "int", "iRelPosition", ")", "throws", "DBException", "{", "m_iIndex", "+=", "iRelPosition", ";", "m_VectorObjects", ".", "insertE...
Insert this record at the current location. @param table The basetable. @param keyArea The key area. @param bufferNew The buffer to add. @param iRelPosition relative position to add the record. @exception DBException File exception.
[ "Insert", "this", "record", "at", "the", "current", "location", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/db/misc/src/main/java/org/jbundle/thin/base/db/mem/memory/MKeyArea.java#L338-L343
webmetrics/browsermob-proxy
src/main/java/org/browsermob/proxy/jetty/util/IO.java
IO.copyThread
public static void copyThread(Reader in, Writer out) { """ Copy Stream in to Stream out until EOF or exception in own thread """ try { instance().run(new Job(in,out)); } catch(InterruptedException e) { log.warn(LogSupport.EXCEPTION,e); } ...
java
public static void copyThread(Reader in, Writer out) { try { instance().run(new Job(in,out)); } catch(InterruptedException e) { log.warn(LogSupport.EXCEPTION,e); } }
[ "public", "static", "void", "copyThread", "(", "Reader", "in", ",", "Writer", "out", ")", "{", "try", "{", "instance", "(", ")", ".", "run", "(", "new", "Job", "(", "in", ",", "out", ")", ")", ";", "}", "catch", "(", "InterruptedException", "e", ")...
Copy Stream in to Stream out until EOF or exception in own thread
[ "Copy", "Stream", "in", "to", "Stream", "out", "until", "EOF", "or", "exception", "in", "own", "thread" ]
train
https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/util/IO.java#L110-L120
OpenLiberty/open-liberty
dev/com.ibm.ws.channelfw/src/com/ibm/io/async/Timer.java
Timer.createTimeoutRequest
public TimerWorkItem createTimeoutRequest(long timeoutTime, TimerCallback _callback, IAbstractAsyncFuture _future) { """ Creates a work item and puts it on the work queue for requesting a timeout to be started. @param timeoutTime how long this timeout is for in milliseconds. @param _callback the routine to ...
java
public TimerWorkItem createTimeoutRequest(long timeoutTime, TimerCallback _callback, IAbstractAsyncFuture _future) { TimerWorkItem wi = new TimerWorkItem(timeoutTime, _callback, _future, _future.getReuseCount()); _future.setTimeoutWorkItem(wi); // put this to the Timer's work queue. Use the q...
[ "public", "TimerWorkItem", "createTimeoutRequest", "(", "long", "timeoutTime", ",", "TimerCallback", "_callback", ",", "IAbstractAsyncFuture", "_future", ")", "{", "TimerWorkItem", "wi", "=", "new", "TimerWorkItem", "(", "timeoutTime", ",", "_callback", ",", "_future"...
Creates a work item and puts it on the work queue for requesting a timeout to be started. @param timeoutTime how long this timeout is for in milliseconds. @param _callback the routine to be called when/if the timeout triggers @param _future attachment to be passed to the callback routine @return the work item that was...
[ "Creates", "a", "work", "item", "and", "puts", "it", "on", "the", "work", "queue", "for", "requesting", "a", "timeout", "to", "be", "started", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.channelfw/src/com/ibm/io/async/Timer.java#L108-L129
kuali/ojb-1.0.4
src/xdoclet/java/src/xdoclet/modules/ojb/OjbTagsHandler.java
OjbTagsHandler.ifHasName
public void ifHasName(String template, Properties attributes) throws XDocletException { """ Processes the template if the current object on the specified level has a non-empty name. @param attributes The attributes of the tag @return The property value @exception XDocletExcepti...
java
public void ifHasName(String template, Properties attributes) throws XDocletException { String name = getDefForLevel(attributes.getProperty(ATTRIBUTE_LEVEL)).getName(); if ((name != null) && (name.length() > 0)) { generate(template); } }
[ "public", "void", "ifHasName", "(", "String", "template", ",", "Properties", "attributes", ")", "throws", "XDocletException", "{", "String", "name", "=", "getDefForLevel", "(", "attributes", ".", "getProperty", "(", "ATTRIBUTE_LEVEL", ")", ")", ".", "getName", "...
Processes the template if the current object on the specified level has a non-empty name. @param attributes The attributes of the tag @return The property value @exception XDocletException If an error occurs @doc.tag type="block" @doc.param name="l...
[ "Processes", "the", "template", "if", "the", "current", "object", "on", "the", "specified", "level", "has", "a", "non", "-", "empty", "name", "." ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/xdoclet/java/src/xdoclet/modules/ojb/OjbTagsHandler.java#L1468-L1476
moparisthebest/beehive
beehive-jdbc-control/src/main/java/org/apache/beehive/controls/system/jdbc/DefaultObjectResultSetMapper.java
DefaultObjectResultSetMapper.mapToResultType
public Object mapToResultType(ControlBeanContext context, Method m, ResultSet resultSet, Calendar cal) { """ Map the ResultSet to the method's return type. The object type returned is defined by the return type of the method. @param context A ControlBeanContext instance, see Beehive controls javadoc for addit...
java
public Object mapToResultType(ControlBeanContext context, Method m, ResultSet resultSet, Calendar cal) { final Class returnType = m.getReturnType(); final boolean isArray = returnType.isArray(); try { if (isArray) { final SQL methodSQL = context.getMethodPropertySet...
[ "public", "Object", "mapToResultType", "(", "ControlBeanContext", "context", ",", "Method", "m", ",", "ResultSet", "resultSet", ",", "Calendar", "cal", ")", "{", "final", "Class", "returnType", "=", "m", ".", "getReturnType", "(", ")", ";", "final", "boolean",...
Map the ResultSet to the method's return type. The object type returned is defined by the return type of the method. @param context A ControlBeanContext instance, see Beehive controls javadoc for additional information @param m Method assoicated with this call. @param resultSet Result set to map. @param cal ...
[ "Map", "the", "ResultSet", "to", "the", "method", "s", "return", "type", ".", "The", "object", "type", "returned", "is", "defined", "by", "the", "return", "type", "of", "the", "method", "." ]
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-jdbc-control/src/main/java/org/apache/beehive/controls/system/jdbc/DefaultObjectResultSetMapper.java#L53-L71