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
uber/rides-java-sdk
uber-core/src/main/java/com/uber/sdk/core/client/utils/Preconditions.java
Preconditions.checkNotNull
@Nonnull public static <T> T checkNotNull(T value, @Nonnull String errorMessage) { """ Ensures the value is not null. @param value value to be validated. @param errorMessage error message thrown if value is null. @param <T> type of value. @return value passed in if not null. """ if (value == ...
java
@Nonnull public static <T> T checkNotNull(T value, @Nonnull String errorMessage) { if (value == null) { throw new NullPointerException(errorMessage); } return value; }
[ "@", "Nonnull", "public", "static", "<", "T", ">", "T", "checkNotNull", "(", "T", "value", ",", "@", "Nonnull", "String", "errorMessage", ")", "{", "if", "(", "value", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", "errorMessage", "...
Ensures the value is not null. @param value value to be validated. @param errorMessage error message thrown if value is null. @param <T> type of value. @return value passed in if not null.
[ "Ensures", "the", "value", "is", "not", "null", "." ]
train
https://github.com/uber/rides-java-sdk/blob/6c75570ab7884f8ecafaad312ef471dd33f64c42/uber-core/src/main/java/com/uber/sdk/core/client/utils/Preconditions.java#L79-L85
alkacon/opencms-core
src-gwt/org/opencms/gwt/client/util/CmsDomUtil.java
CmsDomUtil.generateHiddenForm
public static FormElement generateHiddenForm( String action, Method method, Target target, Map<String, String> values) { """ Generates a form element with hidden input fields.<p> @param action the form action @param method the form method @param target the form target @param v...
java
public static FormElement generateHiddenForm( String action, Method method, Target target, Map<String, String> values) { return generateHiddenForm(action, method, target.getRepresentation(), values); }
[ "public", "static", "FormElement", "generateHiddenForm", "(", "String", "action", ",", "Method", "method", ",", "Target", "target", ",", "Map", "<", "String", ",", "String", ">", "values", ")", "{", "return", "generateHiddenForm", "(", "action", ",", "method",...
Generates a form element with hidden input fields.<p> @param action the form action @param method the form method @param target the form target @param values the input values @return the generated form element
[ "Generates", "a", "form", "element", "with", "hidden", "input", "fields", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/gwt/client/util/CmsDomUtil.java#L1095-L1102
couchbase/couchbase-java-client
src/main/java/com/couchbase/client/java/query/dsl/functions/DateFunctions.java
DateFunctions.dateDiffMillis
public static Expression dateDiffMillis(Expression expression1, Expression expression2, DatePart part) { """ Returned expression results in Date arithmetic. Returns the elapsed time between two UNIX timestamps as an integer whose unit is part. """ return x("DATE_DIFF_MILLIS(" + expression1.toString() ...
java
public static Expression dateDiffMillis(Expression expression1, Expression expression2, DatePart part) { return x("DATE_DIFF_MILLIS(" + expression1.toString() + ", " + expression2.toString() + ", \"" + part.toString() + "\")"); }
[ "public", "static", "Expression", "dateDiffMillis", "(", "Expression", "expression1", ",", "Expression", "expression2", ",", "DatePart", "part", ")", "{", "return", "x", "(", "\"DATE_DIFF_MILLIS(\"", "+", "expression1", ".", "toString", "(", ")", "+", "\", \"", ...
Returned expression results in Date arithmetic. Returns the elapsed time between two UNIX timestamps as an integer whose unit is part.
[ "Returned", "expression", "results", "in", "Date", "arithmetic", ".", "Returns", "the", "elapsed", "time", "between", "two", "UNIX", "timestamps", "as", "an", "integer", "whose", "unit", "is", "part", "." ]
train
https://github.com/couchbase/couchbase-java-client/blob/f36a0ee0c66923bdde47838ca543e50cbaa99e14/src/main/java/com/couchbase/client/java/query/dsl/functions/DateFunctions.java#L106-L109
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/field/DateTimeField.java
DateTimeField.doSetData
public int doSetData(Object vpData, boolean bDisplayOption, int iMoveMode) { """ Move this physical binary data to this field. Must be java Date type. @param data The physical data to move to this field (must be the correct raw data class). @param bDisplayOption If true, display after setting the data. @param ...
java
public int doSetData(Object vpData, boolean bDisplayOption, int iMoveMode) { if ((vpData != null) && (!(vpData instanceof java.util.Date))) return DBConstants.ERROR_RETURN; return super.doSetData(vpData, bDisplayOption, iMoveMode); }
[ "public", "int", "doSetData", "(", "Object", "vpData", ",", "boolean", "bDisplayOption", ",", "int", "iMoveMode", ")", "{", "if", "(", "(", "vpData", "!=", "null", ")", "&&", "(", "!", "(", "vpData", "instanceof", "java", ".", "util", ".", "Date", ")",...
Move this physical binary data to this field. Must be java Date type. @param data The physical data to move to this field (must be the correct raw data class). @param bDisplayOption If true, display after setting the data. @param iMoveMode The type of move. @return an error code (0 if success).
[ "Move", "this", "physical", "binary", "data", "to", "this", "field", ".", "Must", "be", "java", "Date", "type", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/DateTimeField.java#L475-L480
liyiorg/weixin-popular
src/main/java/weixin/popular/api/BizwifiAPI.java
BizwifiAPI.shopGet
public static ShopGetResult shopGet(String accessToken, ShopInfo shopInfo) { """ Wi-Fi门店管理-查询门店WiFi信息接口 @param accessToken accessToken @param shopInfo shopInfo @return BaseResult """ return shopGet(accessToken, JsonUtil.toJSONString(shopInfo)); }
java
public static ShopGetResult shopGet(String accessToken, ShopInfo shopInfo) { return shopGet(accessToken, JsonUtil.toJSONString(shopInfo)); }
[ "public", "static", "ShopGetResult", "shopGet", "(", "String", "accessToken", ",", "ShopInfo", "shopInfo", ")", "{", "return", "shopGet", "(", "accessToken", ",", "JsonUtil", ".", "toJSONString", "(", "shopInfo", ")", ")", ";", "}" ]
Wi-Fi门店管理-查询门店WiFi信息接口 @param accessToken accessToken @param shopInfo shopInfo @return BaseResult
[ "Wi", "-", "Fi门店管理", "-", "查询门店WiFi信息接口" ]
train
https://github.com/liyiorg/weixin-popular/blob/c64255292d41463bdb671938feaabf42a335d82c/src/main/java/weixin/popular/api/BizwifiAPI.java#L188-L190
osiam/connector4java
src/main/java/org/osiam/client/OsiamConnector.java
OsiamConnector.getUser
public User getUser(String id, AccessToken accessToken, String... attributes) { """ Retrieve a single User with the given id. If no user for the given id can be found a {@link NoResultException} is thrown. @param id the id of the wanted user @param accessToken the OSIAM access token from for the curr...
java
public User getUser(String id, AccessToken accessToken, String... attributes) { return getUserService().getUser(id, accessToken, attributes); }
[ "public", "User", "getUser", "(", "String", "id", ",", "AccessToken", "accessToken", ",", "String", "...", "attributes", ")", "{", "return", "getUserService", "(", ")", ".", "getUser", "(", "id", ",", "accessToken", ",", "attributes", ")", ";", "}" ]
Retrieve a single User with the given id. If no user for the given id can be found a {@link NoResultException} is thrown. @param id the id of the wanted user @param accessToken the OSIAM access token from for the current session @param attributes the attributes that should be returned in the response. If non...
[ "Retrieve", "a", "single", "User", "with", "the", "given", "id", ".", "If", "no", "user", "for", "the", "given", "id", "can", "be", "found", "a", "{", "@link", "NoResultException", "}", "is", "thrown", "." ]
train
https://github.com/osiam/connector4java/blob/a5e6ae1e706f4889d662a069fe2f3bf8e3848d12/src/main/java/org/osiam/client/OsiamConnector.java#L225-L227
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/SeaGlassStyle.java
SeaGlassStyle.contains
private boolean contains(String[] names, String name) { """ Simple utility method that searchs the given array of Strings for the given string. This method is only called from getExtendedState if the developer has specified a specific state for the component to be in (ie, has "wedged" the component in that stat...
java
private boolean contains(String[] names, String name) { assert name != null; for (int i = 0; i < names.length; i++) { if (name.equals(names[i])) { return true; } } return false; }
[ "private", "boolean", "contains", "(", "String", "[", "]", "names", ",", "String", "name", ")", "{", "assert", "name", "!=", "null", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "names", ".", "length", ";", "i", "++", ")", "{", "if", "...
Simple utility method that searchs the given array of Strings for the given string. This method is only called from getExtendedState if the developer has specified a specific state for the component to be in (ie, has "wedged" the component in that state) by specifying they client property "SeaGlass.State". @param nam...
[ "Simple", "utility", "method", "that", "searchs", "the", "given", "array", "of", "Strings", "for", "the", "given", "string", ".", "This", "method", "is", "only", "called", "from", "getExtendedState", "if", "the", "developer", "has", "specified", "a", "specific...
train
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/SeaGlassStyle.java#L1199-L1210
Arnauld/gutenberg
src/main/java/gutenberg/itext/TableOfContents.java
TableOfContents.onSection
@Override public void onSection(PdfWriter writer, Document document, float paragraphPosition, int depth, Paragraph title) { """ Called when a Section is written. <br> <CODE>position</CODE> will hold the height at which the section will be written to. @param writer the <CODE>PdfWriter</CODE> fo...
java
@Override public void onSection(PdfWriter writer, Document document, float paragraphPosition, int depth, Paragraph title) { String anchorDst = "w" + (anchorId++); defineLocalDestinationOnFirstChunk(title, anchorDst); addEntry(title.getContent(), depth, pageNumber.pageInfos(), anchorDst); ...
[ "@", "Override", "public", "void", "onSection", "(", "PdfWriter", "writer", ",", "Document", "document", ",", "float", "paragraphPosition", ",", "int", "depth", ",", "Paragraph", "title", ")", "{", "String", "anchorDst", "=", "\"w\"", "+", "(", "anchorId", "...
Called when a Section is written. <br> <CODE>position</CODE> will hold the height at which the section will be written to. @param writer the <CODE>PdfWriter</CODE> for this document @param document the document @param paragraphPosition the position the section will be written to @param depth ...
[ "Called", "when", "a", "Section", "is", "written", ".", "<br", ">", "<CODE", ">", "position<", "/", "CODE", ">", "will", "hold", "the", "height", "at", "which", "the", "section", "will", "be", "written", "to", "." ]
train
https://github.com/Arnauld/gutenberg/blob/18d761ddba378ee58a3f3dc6316f66742df8d985/src/main/java/gutenberg/itext/TableOfContents.java#L50-L55
keenon/loglinear
src/main/java/com/github/keenon/loglinear/model/ConcatVector.java
ConcatVector.setDenseComponent
public void setDenseComponent(int component, double[] values) { """ Sets a single component of the concat vector value as a dense vector. This will make a copy of you values array, so you're free to continue mutating it. @param component the index of the component to set @param values the array of dense va...
java
public void setDenseComponent(int component, double[] values) { if (component >= pointers.length) { increaseSizeTo(component + 1); } pointers[component] = values; sparse[component] = false; copyOnWrite[component] = true; }
[ "public", "void", "setDenseComponent", "(", "int", "component", ",", "double", "[", "]", "values", ")", "{", "if", "(", "component", ">=", "pointers", ".", "length", ")", "{", "increaseSizeTo", "(", "component", "+", "1", ")", ";", "}", "pointers", "[", ...
Sets a single component of the concat vector value as a dense vector. This will make a copy of you values array, so you're free to continue mutating it. @param component the index of the component to set @param values the array of dense values to put into the component
[ "Sets", "a", "single", "component", "of", "the", "concat", "vector", "value", "as", "a", "dense", "vector", ".", "This", "will", "make", "a", "copy", "of", "you", "values", "array", "so", "you", "re", "free", "to", "continue", "mutating", "it", "." ]
train
https://github.com/keenon/loglinear/blob/fa0c370ab6782015412f676ef2ab11c97be58e29/src/main/java/com/github/keenon/loglinear/model/ConcatVector.java#L87-L94
Whiley/WhileyCompiler
src/main/java/wyc/io/WhileyFileParser.java
WhileyFileParser.getIndent
private Indent getIndent() { """ Determine the indentation as given by the Indent token at this point (if any). If none, then <code>null</code> is returned. @return """ skipEmptyLines(); if (index < tokens.size()) { Token token = tokens.get(index); if (token.kind == Indent) { return new Inden...
java
private Indent getIndent() { skipEmptyLines(); if (index < tokens.size()) { Token token = tokens.get(index); if (token.kind == Indent) { return new Indent(token.text, token.start); } return null; } return null; }
[ "private", "Indent", "getIndent", "(", ")", "{", "skipEmptyLines", "(", ")", ";", "if", "(", "index", "<", "tokens", ".", "size", "(", ")", ")", "{", "Token", "token", "=", "tokens", ".", "get", "(", "index", ")", ";", "if", "(", "token", ".", "k...
Determine the indentation as given by the Indent token at this point (if any). If none, then <code>null</code> is returned. @return
[ "Determine", "the", "indentation", "as", "given", "by", "the", "Indent", "token", "at", "this", "point", "(", "if", "any", ")", ".", "If", "none", "then", "<code", ">", "null<", "/", "code", ">", "is", "returned", "." ]
train
https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyc/io/WhileyFileParser.java#L671-L681
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/DateIntervalFormat.java
DateIntervalFormat.getInstance
public static final DateIntervalFormat getInstance(String skeleton, DateIntervalInfo dtitvinf) { """ Construct a DateIntervalFormat from skeleton DateIntervalInfo, and the default <code>FORMAT</code> locale. This is a convenient override of getInstance(Strin...
java
public static final DateIntervalFormat getInstance(String skeleton, DateIntervalInfo dtitvinf) { return getInstance(skeleton, ULocale.getDefault(Category.FORMAT), dtitvinf); }
[ "public", "static", "final", "DateIntervalFormat", "getInstance", "(", "String", "skeleton", ",", "DateIntervalInfo", "dtitvinf", ")", "{", "return", "getInstance", "(", "skeleton", ",", "ULocale", ".", "getDefault", "(", "Category", ".", "FORMAT", ")", ",", "dt...
Construct a DateIntervalFormat from skeleton DateIntervalInfo, and the default <code>FORMAT</code> locale. This is a convenient override of getInstance(String skeleton, ULocale locale, DateIntervalInfo dtitvinf) with the locale value as default <code>FORMAT</code> locale. @param skeleton the skeleton on which interv...
[ "Construct", "a", "DateIntervalFormat", "from", "skeleton", "DateIntervalInfo", "and", "the", "default", "<code", ">", "FORMAT<", "/", "code", ">", "locale", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/DateIntervalFormat.java#L489-L493
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/objects/XStringForFSB.java
XStringForFSB.getChars
public void getChars(int srcBegin, int srcEnd, char dst[], int dstBegin) { """ Copies characters from this string into the destination character array. @param srcBegin index of the first character in the string to copy. @param srcEnd index after the last character in the string to copy. @pa...
java
public void getChars(int srcBegin, int srcEnd, char dst[], int dstBegin) { // %OPT% Need to call this on FSB when it is implemented. // %UNTESTED% (I don't think anyone calls this yet?) int n = srcEnd - srcBegin; if (n > m_length) n = m_length; if (n > (dst.length - dstBegin)) n = (...
[ "public", "void", "getChars", "(", "int", "srcBegin", ",", "int", "srcEnd", ",", "char", "dst", "[", "]", ",", "int", "dstBegin", ")", "{", "// %OPT% Need to call this on FSB when it is implemented.", "// %UNTESTED% (I don't think anyone calls this yet?)", "int", "n", "...
Copies characters from this string into the destination character array. @param srcBegin index of the first character in the string to copy. @param srcEnd index after the last character in the string to copy. @param dst the destination array. @param dstBegin the start offset in the d...
[ "Copies", "characters", "from", "this", "string", "into", "the", "destination", "character", "array", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/objects/XStringForFSB.java#L252-L273
mygreen/excel-cellformatter
src/main/java/com/github/mygreen/cellformatter/lang/MessageResolver.java
MessageResolver.getMessage
public String getMessage(final Locale locale, final String key, final String defaultValue) { """ 値がnullの場合、defaultValueの値を返す。 @param locale ロケール @param key メッセージキー @param defaultValue @return 該当するロケールのメッセージが見つからない場合は、引数で指定した'defaultValue'の値を返す。 """ String message = getMessage(locale, key); ...
java
public String getMessage(final Locale locale, final String key, final String defaultValue) { String message = getMessage(locale, key); return message == null ? defaultValue : message; }
[ "public", "String", "getMessage", "(", "final", "Locale", "locale", ",", "final", "String", "key", ",", "final", "String", "defaultValue", ")", "{", "String", "message", "=", "getMessage", "(", "locale", ",", "key", ")", ";", "return", "message", "==", "nu...
値がnullの場合、defaultValueの値を返す。 @param locale ロケール @param key メッセージキー @param defaultValue @return 該当するロケールのメッセージが見つからない場合は、引数で指定した'defaultValue'の値を返す。
[ "値がnullの場合、defaultValueの値を返す。" ]
train
https://github.com/mygreen/excel-cellformatter/blob/e802af273d49889500591e03799c9262cbf29185/src/main/java/com/github/mygreen/cellformatter/lang/MessageResolver.java#L323-L326
google/closure-compiler
src/com/google/javascript/jscomp/GenerateExports.java
GenerateExports.addExportMethod
private void addExportMethod(Map<String, Node> exports, String export, Node context) { """ Emits a call to either goog.exportProperty or goog.exportSymbol. <p>Attempts to optimize by creating a property export instead of a symbol export, because property exports are significantly simpler/faster. @param expo...
java
private void addExportMethod(Map<String, Node> exports, String export, Node context) { // We can export as a property if any of the following conditions holds: // a) ES6 class members, which the above `addExportForEs6Method` handles // b) this is a property on a name which is also being exported // c) t...
[ "private", "void", "addExportMethod", "(", "Map", "<", "String", ",", "Node", ">", "exports", ",", "String", "export", ",", "Node", "context", ")", "{", "// We can export as a property if any of the following conditions holds:", "// a) ES6 class members, which the above `addE...
Emits a call to either goog.exportProperty or goog.exportSymbol. <p>Attempts to optimize by creating a property export instead of a symbol export, because property exports are significantly simpler/faster. @param export The fully qualified name of the object we want to export @param context The node on which the @exp...
[ "Emits", "a", "call", "to", "either", "goog", ".", "exportProperty", "or", "goog", ".", "exportSymbol", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/GenerateExports.java#L135-L169
alkacon/opencms-core
src-setup/org/opencms/setup/CmsSetupDb.java
CmsSetupDb.executeSqlStatement
public CmsSetupDBWrapper executeSqlStatement(String query, Map<String, String> replacer) throws SQLException { """ Creates and executes a database statement from a String returning the result set.<p> @param query the query to execute @param replacer the replacements to perform in the script @return the resu...
java
public CmsSetupDBWrapper executeSqlStatement(String query, Map<String, String> replacer) throws SQLException { CmsSetupDBWrapper dbwrapper = new CmsSetupDBWrapper(m_con); dbwrapper.createStatement(); String queryToExecute = query; // Check if a map of replacements is given if ...
[ "public", "CmsSetupDBWrapper", "executeSqlStatement", "(", "String", "query", ",", "Map", "<", "String", ",", "String", ">", "replacer", ")", "throws", "SQLException", "{", "CmsSetupDBWrapper", "dbwrapper", "=", "new", "CmsSetupDBWrapper", "(", "m_con", ")", ";", ...
Creates and executes a database statement from a String returning the result set.<p> @param query the query to execute @param replacer the replacements to perform in the script @return the result set of the query @throws SQLException if something goes wrong
[ "Creates", "and", "executes", "a", "database", "statement", "from", "a", "String", "returning", "the", "result", "set", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-setup/org/opencms/setup/CmsSetupDb.java#L315-L332
hsiafan/apk-parser
src/main/java/net/dongliu/apk/parser/cert/asn1/Asn1BerParser.java
Asn1BerParser.parseImplicitSetOf
public static <T> List<T> parseImplicitSetOf(ByteBuffer encoded, Class<T> elementClass) throws Asn1DecodingException { """ Returns the implicit {@code SET OF} contained in the provided ASN.1 BER input. Implicit means that this method does not care whether the tag number of this data structure is {@co...
java
public static <T> List<T> parseImplicitSetOf(ByteBuffer encoded, Class<T> elementClass) throws Asn1DecodingException { BerDataValue containerDataValue; try { containerDataValue = new ByteBufferBerDataValueReader(encoded).readDataValue(); } catch (BerDataValueFormatExcepti...
[ "public", "static", "<", "T", ">", "List", "<", "T", ">", "parseImplicitSetOf", "(", "ByteBuffer", "encoded", ",", "Class", "<", "T", ">", "elementClass", ")", "throws", "Asn1DecodingException", "{", "BerDataValue", "containerDataValue", ";", "try", "{", "cont...
Returns the implicit {@code SET OF} contained in the provided ASN.1 BER input. Implicit means that this method does not care whether the tag number of this data structure is {@code SET OF} and whether the tag class is {@code UNIVERSAL}. <p> <p>Note: The returned type is {@link List} rather than {@link java.util.Set} be...
[ "Returns", "the", "implicit", "{", "@code", "SET", "OF", "}", "contained", "in", "the", "provided", "ASN", ".", "1", "BER", "input", ".", "Implicit", "means", "that", "this", "method", "does", "not", "care", "whether", "the", "tag", "number", "of", "this...
train
https://github.com/hsiafan/apk-parser/blob/8993ddd52017b37b8f2e784ae0a15417d9ede932/src/main/java/net/dongliu/apk/parser/cert/asn1/Asn1BerParser.java#L92-L104
mebigfatguy/fb-contrib
src/main/java/com/mebigfatguy/fbcontrib/detect/NonSymmetricEquals.java
NonSymmetricEquals.sawOpcode
@Override public void sawOpcode(int seen) { """ implements the visitor to look for checkcasts of the parameter to other types, and enter instances in a map for further processing in doReport. @param seen the opcode of the currently parsed instruction """ try { stack.precomputation(t...
java
@Override public void sawOpcode(int seen) { try { stack.precomputation(this); if ((seen == Const.CHECKCAST) && (stack.getStackDepth() > 0)) { OpcodeStack.Item item = stack.getStackItem(0); if (item.getRegisterNumber() == 1) { Strin...
[ "@", "Override", "public", "void", "sawOpcode", "(", "int", "seen", ")", "{", "try", "{", "stack", ".", "precomputation", "(", "this", ")", ";", "if", "(", "(", "seen", "==", "Const", ".", "CHECKCAST", ")", "&&", "(", "stack", ".", "getStackDepth", "...
implements the visitor to look for checkcasts of the parameter to other types, and enter instances in a map for further processing in doReport. @param seen the opcode of the currently parsed instruction
[ "implements", "the", "visitor", "to", "look", "for", "checkcasts", "of", "the", "parameter", "to", "other", "types", "and", "enter", "instances", "in", "a", "map", "for", "further", "processing", "in", "doReport", "." ]
train
https://github.com/mebigfatguy/fb-contrib/blob/3b5203196f627b399fbcea3c2ab2b1f4e56cc7b8/src/main/java/com/mebigfatguy/fbcontrib/detect/NonSymmetricEquals.java#L113-L144
FedericoPecora/meta-csp-framework
src/main/java/org/metacsp/multi/spatial/DE9IM/DE9IMRelation.java
DE9IMRelation.getRelations
public static Type[] getRelations(GeometricShapeVariable gv1, GeometricShapeVariable gv2) { """ Get the DE-9IM relation(s) existing between two {@link GeometricShapeVariable}s. @param gv1 The first {@link GeometricShapeVariable} (the source of the directed edge). @param gv2 The second {@link GeometricShapeVariab...
java
public static Type[] getRelations(GeometricShapeVariable gv1, GeometricShapeVariable gv2) { return getRelations(gv1, gv2, false); }
[ "public", "static", "Type", "[", "]", "getRelations", "(", "GeometricShapeVariable", "gv1", ",", "GeometricShapeVariable", "gv2", ")", "{", "return", "getRelations", "(", "gv1", ",", "gv2", ",", "false", ")", ";", "}" ]
Get the DE-9IM relation(s) existing between two {@link GeometricShapeVariable}s. @param gv1 The first {@link GeometricShapeVariable} (the source of the directed edge). @param gv2 The second {@link GeometricShapeVariable} (the destination of the directed edge). @return The DE-9IM relation(s) existing between the two giv...
[ "Get", "the", "DE", "-", "9IM", "relation", "(", "s", ")", "existing", "between", "two", "{" ]
train
https://github.com/FedericoPecora/meta-csp-framework/blob/42aaef2e2b76d0f738427f0dd9653c4f62b40517/src/main/java/org/metacsp/multi/spatial/DE9IM/DE9IMRelation.java#L57-L59
OpenTSDB/opentsdb
src/tree/TreeBuilder.java
TreeBuilder.processTimeseriesMeta
public Deferred<ArrayList<Boolean>> processTimeseriesMeta(final TSMeta meta) { """ Convenience overload of {@link #processTimeseriesMeta(TSMeta, boolean)} that sets the testing flag to false. Any changes processed from this method will be saved to storage @param meta The timeseries meta object to process @retu...
java
public Deferred<ArrayList<Boolean>> processTimeseriesMeta(final TSMeta meta) { if (tree == null || tree.getTreeId() < 1) { throw new IllegalArgumentException( "The tree has not been set or is invalid"); } return processTimeseriesMeta(meta, false); }
[ "public", "Deferred", "<", "ArrayList", "<", "Boolean", ">", ">", "processTimeseriesMeta", "(", "final", "TSMeta", "meta", ")", "{", "if", "(", "tree", "==", "null", "||", "tree", ".", "getTreeId", "(", ")", "<", "1", ")", "{", "throw", "new", "Illegal...
Convenience overload of {@link #processTimeseriesMeta(TSMeta, boolean)} that sets the testing flag to false. Any changes processed from this method will be saved to storage @param meta The timeseries meta object to process @return A list of deferreds to wait on for storage completion @throws IllegalArgumentException if...
[ "Convenience", "overload", "of", "{" ]
train
https://github.com/OpenTSDB/opentsdb/blob/3fc2d491c3c1ad397252c0a80203a69a3f9e3ef3/src/tree/TreeBuilder.java#L146-L152
alkacon/opencms-core
src/org/opencms/workplace/CmsWorkplaceSettings.java
CmsWorkplaceSettings.setTreeResource
public void setTreeResource(String type, String value) { """ Sets the tree resource uri for the specified tree type.<p> @param type the type of the tree @param value the resource uri to set for the type """ if (value == null) { return; } if (value.startsWith(CmsResource...
java
public void setTreeResource(String type, String value) { if (value == null) { return; } if (value.startsWith(CmsResource.VFS_FOLDER_SYSTEM + "/") && (!value.startsWith(m_currentSite))) { // restrict access to /system/ value = "/"; } m_treeType...
[ "public", "void", "setTreeResource", "(", "String", "type", ",", "String", "value", ")", "{", "if", "(", "value", "==", "null", ")", "{", "return", ";", "}", "if", "(", "value", ".", "startsWith", "(", "CmsResource", ".", "VFS_FOLDER_SYSTEM", "+", "\"/\"...
Sets the tree resource uri for the specified tree type.<p> @param type the type of the tree @param value the resource uri to set for the type
[ "Sets", "the", "tree", "resource", "uri", "for", "the", "specified", "tree", "type", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/workplace/CmsWorkplaceSettings.java#L751-L761
alkacon/opencms-core
src/org/opencms/db/CmsUserSettings.java
CmsUserSettings.setStartGalleriesSetting
public void setStartGalleriesSetting(Map<String, String> settings) { """ Sets the start galleries settings of the user.<p> @param settings the start galleries setting of the user """ m_startGalleriesSettings = new TreeMap<String, String>(settings); }
java
public void setStartGalleriesSetting(Map<String, String> settings) { m_startGalleriesSettings = new TreeMap<String, String>(settings); }
[ "public", "void", "setStartGalleriesSetting", "(", "Map", "<", "String", ",", "String", ">", "settings", ")", "{", "m_startGalleriesSettings", "=", "new", "TreeMap", "<", "String", ",", "String", ">", "(", "settings", ")", ";", "}" ]
Sets the start galleries settings of the user.<p> @param settings the start galleries setting of the user
[ "Sets", "the", "start", "galleries", "settings", "of", "the", "user", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsUserSettings.java#L2194-L2197
zaproxy/zaproxy
src/org/zaproxy/zap/extension/authorization/BasicAuthorizationDetectionMethod.java
BasicAuthorizationDetectionMethod.loadMethodFromSession
public static BasicAuthorizationDetectionMethod loadMethodFromSession(Session session, int contextId) throws DatabaseException { """ Creates a {@link BasicAuthorizationDetectionMethod} object based on data loaded from the session database for a given context. For proper results, data should have been saved to ...
java
public static BasicAuthorizationDetectionMethod loadMethodFromSession(Session session, int contextId) throws DatabaseException { int statusCode = NO_STATUS_CODE; try { List<String> statusCodeL = session.getContextDataStrings(contextId, RecordContext.TYPE_AUTHORIZATION_METHOD_FIELD_1); statusCode = In...
[ "public", "static", "BasicAuthorizationDetectionMethod", "loadMethodFromSession", "(", "Session", "session", ",", "int", "contextId", ")", "throws", "DatabaseException", "{", "int", "statusCode", "=", "NO_STATUS_CODE", ";", "try", "{", "List", "<", "String", ">", "s...
Creates a {@link BasicAuthorizationDetectionMethod} object based on data loaded from the session database for a given context. For proper results, data should have been saved to the session using the {@link #persistMethodToSession(Session, int)} method. @throws DatabaseException if an error occurred while reading from...
[ "Creates", "a", "{", "@link", "BasicAuthorizationDetectionMethod", "}", "object", "based", "on", "data", "loaded", "from", "the", "session", "database", "for", "a", "given", "context", ".", "For", "proper", "results", "data", "should", "have", "been", "saved", ...
train
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/authorization/BasicAuthorizationDetectionMethod.java#L154-L194
phax/ph-schedule
ph-mini-quartz/src/main/java/com/helger/quartz/SimpleScheduleBuilder.java
SimpleScheduleBuilder.repeatHourlyForTotalCount
@Nonnull public static SimpleScheduleBuilder repeatHourlyForTotalCount (final int nCount, final int nHours) { """ Create a SimpleScheduleBuilder set to repeat the given number of times - 1 with an interval of the given number of hours. <p> Note: Total count = 1 (at start time) + repeat count </p> @return ...
java
@Nonnull public static SimpleScheduleBuilder repeatHourlyForTotalCount (final int nCount, final int nHours) { ValueEnforcer.isGT0 (nCount, "Count"); return simpleSchedule ().withIntervalInHours (nHours).withRepeatCount (nCount - 1); }
[ "@", "Nonnull", "public", "static", "SimpleScheduleBuilder", "repeatHourlyForTotalCount", "(", "final", "int", "nCount", ",", "final", "int", "nHours", ")", "{", "ValueEnforcer", ".", "isGT0", "(", "nCount", ",", "\"Count\"", ")", ";", "return", "simpleSchedule", ...
Create a SimpleScheduleBuilder set to repeat the given number of times - 1 with an interval of the given number of hours. <p> Note: Total count = 1 (at start time) + repeat count </p> @return the new SimpleScheduleBuilder
[ "Create", "a", "SimpleScheduleBuilder", "set", "to", "repeat", "the", "given", "number", "of", "times", "-", "1", "with", "an", "interval", "of", "the", "given", "number", "of", "hours", ".", "<p", ">", "Note", ":", "Total", "count", "=", "1", "(", "at...
train
https://github.com/phax/ph-schedule/blob/b000790b46a9f8d23ad44cc20591f753d07c0229/ph-mini-quartz/src/main/java/com/helger/quartz/SimpleScheduleBuilder.java#L235-L240
Netflix/netflix-graph
src/main/java/com/netflix/nfgraph/build/NFBuildGraph.java
NFBuildGraph.getOrCreateNode
public NFBuildGraphNode getOrCreateNode(NFBuildGraphNodeList nodes, NFNodeSpec nodeSpec, int ordinal) { """ Creates an {@link com.netflix.nfgraph.build.NFBuildGraphNode} for <code>nodeSpec</code> and <code>ordinal</code> and adds it to <code>nodes</code>. If such a node exists in <code>nodes</code>, then that no...
java
public NFBuildGraphNode getOrCreateNode(NFBuildGraphNodeList nodes, NFNodeSpec nodeSpec, int ordinal) { return nodeCache.getNode(nodes, nodeSpec, ordinal); }
[ "public", "NFBuildGraphNode", "getOrCreateNode", "(", "NFBuildGraphNodeList", "nodes", ",", "NFNodeSpec", "nodeSpec", ",", "int", "ordinal", ")", "{", "return", "nodeCache", ".", "getNode", "(", "nodes", ",", "nodeSpec", ",", "ordinal", ")", ";", "}" ]
Creates an {@link com.netflix.nfgraph.build.NFBuildGraphNode} for <code>nodeSpec</code> and <code>ordinal</code> and adds it to <code>nodes</code>. If such a node exists in <code>nodes</code>, then that node is returned.
[ "Creates", "an", "{" ]
train
https://github.com/Netflix/netflix-graph/blob/ee129252a08a9f51dd296d6fca2f0b28b7be284e/src/main/java/com/netflix/nfgraph/build/NFBuildGraph.java#L109-L111
structlogging/structlogger
structlogger/src/main/java/com/github/structlogging/processor/service/POJOService.java
POJOService.addGetter
private void addGetter(final TypeSpec.Builder classBuilder, final String attributeName, final TypeName type) { """ adds getter for field to class @param classBuilder class to modify @param attributeName name of attribute to be referenced @param type type of attribue to be referenced """ final String...
java
private void addGetter(final TypeSpec.Builder classBuilder, final String attributeName, final TypeName type) { final String getterMethodName = "get" + attributeName.substring(0, 1).toUpperCase() + attributeName.substring(1); final MethodSpec.Builder getterBuilder = MethodSpec.methodBuilder(getterMethodN...
[ "private", "void", "addGetter", "(", "final", "TypeSpec", ".", "Builder", "classBuilder", ",", "final", "String", "attributeName", ",", "final", "TypeName", "type", ")", "{", "final", "String", "getterMethodName", "=", "\"get\"", "+", "attributeName", ".", "subs...
adds getter for field to class @param classBuilder class to modify @param attributeName name of attribute to be referenced @param type type of attribue to be referenced
[ "adds", "getter", "for", "field", "to", "class" ]
train
https://github.com/structlogging/structlogger/blob/1fcca4e962ef53cbdb94bd72cb556de7f5f9469f/structlogger/src/main/java/com/github/structlogging/processor/service/POJOService.java#L203-L211
paypal/SeLion
dataproviders/src/main/java/com/paypal/selion/platform/dataprovider/impl/ReflectionUtils.java
ReflectionUtils.instantiateWrapperArray
public static Object instantiateWrapperArray(Class<?> type, String[] values) { """ This helper method facilitates creation of wrapper arrays and pre-populates them with the set of String values provided. E.g., of wrapper arrays include Integer[], Character[], Boolean[] and so on. This method can also be used to ...
java
public static Object instantiateWrapperArray(Class<?> type, String[] values) { logger.entering(new Object[] { type, values }); validateParams(type, values); boolean condition = (isWrapperArray(type) || hasOneArgStringConstructor(type.getComponentType())); checkArgument(condition, type.ge...
[ "public", "static", "Object", "instantiateWrapperArray", "(", "Class", "<", "?", ">", "type", ",", "String", "[", "]", "values", ")", "{", "logger", ".", "entering", "(", "new", "Object", "[", "]", "{", "type", ",", "values", "}", ")", ";", "validatePa...
This helper method facilitates creation of wrapper arrays and pre-populates them with the set of String values provided. E.g., of wrapper arrays include Integer[], Character[], Boolean[] and so on. This method can also be used to create arrays of types which has a 1 argument String constructor defined. @param type The...
[ "This", "helper", "method", "facilitates", "creation", "of", "wrapper", "arrays", "and", "pre", "-", "populates", "them", "with", "the", "set", "of", "String", "values", "provided", ".", "E", ".", "g", ".", "of", "wrapper", "arrays", "include", "Integer", ...
train
https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/dataproviders/src/main/java/com/paypal/selion/platform/dataprovider/impl/ReflectionUtils.java#L222-L240
ow2-chameleon/fuchsia
importers/zwave/src/main/java/org/ow2/chameleon/fuchsia/importer/zwave/internal/commandclass/ZWaveMultiInstanceCommandClass.java
ZWaveMultiInstanceCommandClass.getMultiInstanceEncapMessage
public SerialMessage getMultiInstanceEncapMessage(SerialMessage serialMessage, int instance) { """ Gets a SerialMessage with the MULTI INSTANCE ENCAP command. Encapsulates a message for a specific instance. @param serialMessage the serial message to encapsulate @param instance the number of the instance to enca...
java
public SerialMessage getMultiInstanceEncapMessage(SerialMessage serialMessage, int instance) { logger.debug("Creating new message for application command MULTI_INSTANCE_ENCAP for node {} and instance {}", this.getNode().getNodeId(), instance); byte[] payload = serialMessage.getMessagePayload(); byte[] newP...
[ "public", "SerialMessage", "getMultiInstanceEncapMessage", "(", "SerialMessage", "serialMessage", ",", "int", "instance", ")", "{", "logger", ".", "debug", "(", "\"Creating new message for application command MULTI_INSTANCE_ENCAP for node {} and instance {}\"", ",", "this", ".", ...
Gets a SerialMessage with the MULTI INSTANCE ENCAP command. Encapsulates a message for a specific instance. @param serialMessage the serial message to encapsulate @param instance the number of the instance to encapsulate the message for. @return the encapsulated serial message.
[ "Gets", "a", "SerialMessage", "with", "the", "MULTI", "INSTANCE", "ENCAP", "command", ".", "Encapsulates", "a", "message", "for", "a", "specific", "instance", "." ]
train
https://github.com/ow2-chameleon/fuchsia/blob/4e9318eadbdeb945e529789f573b45386e619bed/importers/zwave/src/main/java/org/ow2/chameleon/fuchsia/importer/zwave/internal/commandclass/ZWaveMultiInstanceCommandClass.java#L457-L471
JadiraOrg/jadira
jms/src/main/java/org/jadira/jms/template/BatchedJmsTemplate.java
BatchedJmsTemplate.doReceive
private Message doReceive(MessageConsumer consumer, long timeout) throws JMSException { """ Method replicates the simple logic from JmsTemplate#doReceive(MessageConsumer, long) which is private and therefore cannot be accessed from this class @param consumer The consumer to use @param timeout The timeout to appl...
java
private Message doReceive(MessageConsumer consumer, long timeout) throws JMSException { if (timeout == RECEIVE_TIMEOUT_NO_WAIT) { return consumer.receiveNoWait(); } else if (timeout > 0) { return consumer.receive(timeout); } else { return consumer.receive(); ...
[ "private", "Message", "doReceive", "(", "MessageConsumer", "consumer", ",", "long", "timeout", ")", "throws", "JMSException", "{", "if", "(", "timeout", "==", "RECEIVE_TIMEOUT_NO_WAIT", ")", "{", "return", "consumer", ".", "receiveNoWait", "(", ")", ";", "}", ...
Method replicates the simple logic from JmsTemplate#doReceive(MessageConsumer, long) which is private and therefore cannot be accessed from this class @param consumer The consumer to use @param timeout The timeout to apply @return A Message @throws JMSException Indicates an error occurred
[ "Method", "replicates", "the", "simple", "logic", "from", "JmsTemplate#doReceive", "(", "MessageConsumer", "long", ")", "which", "is", "private", "and", "therefore", "cannot", "be", "accessed", "from", "this", "class" ]
train
https://github.com/JadiraOrg/jadira/blob/d55d0238395f0cb900531f1f08b4b2d87fa9a4f6/jms/src/main/java/org/jadira/jms/template/BatchedJmsTemplate.java#L535-L544
FrodeRanders/java-vopn
src/main/java/org/gautelis/vopn/lang/DynamicLoader.java
DynamicLoader.callMethodOn
public void callMethodOn(C object, String methodName, Object[] parameters) throws Throwable { """ Calls a method on an object. Beware that this version of callMethodOn() will assume the exact parameter types in the designated method as has the parameters to this call. <p> An effect of this is that if y...
java
public void callMethodOn(C object, String methodName, Object[] parameters) throws Throwable { // Dynamically determine parameter types Class[] parameterTypes = new Class[parameters.length]; for (int i=0; i < parameters.length; i++) { parameterTypes[i] = parameters[i].getClas...
[ "public", "void", "callMethodOn", "(", "C", "object", ",", "String", "methodName", ",", "Object", "[", "]", "parameters", ")", "throws", "Throwable", "{", "// Dynamically determine parameter types", "Class", "[", "]", "parameterTypes", "=", "new", "Class", "[", ...
Calls a method on an object. Beware that this version of callMethodOn() will assume the exact parameter types in the designated method as has the parameters to this call. <p> An effect of this is that if you call a method assuming a type T with an object of the derived type D, the method call will fail. In this case (w...
[ "Calls", "a", "method", "on", "an", "object", ".", "Beware", "that", "this", "version", "of", "callMethodOn", "()", "will", "assume", "the", "exact", "parameter", "types", "in", "the", "designated", "method", "as", "has", "the", "parameters", "to", "this", ...
train
https://github.com/FrodeRanders/java-vopn/blob/4c7b2f90201327af4eaa3cd46b3fee68f864e5cc/src/main/java/org/gautelis/vopn/lang/DynamicLoader.java#L383-L419
ACRA/acra
acra-mail/src/main/java/org/acra/sender/EmailIntentSender.java
EmailIntentSender.fillAttachmentList
protected boolean fillAttachmentList(@NonNull Context context, @NonNull String reportText, @NonNull List<Uri> attachments) { """ Adds all attachment uris into the given list @param context a context @param reportText the report content @param attachments the target list @return if the attachments ...
java
protected boolean fillAttachmentList(@NonNull Context context, @NonNull String reportText, @NonNull List<Uri> attachments) { final InstanceCreator instanceCreator = new InstanceCreator(); attachments.addAll(instanceCreator.create(config.attachmentUriProvider(), DefaultAttachmentProvider::new).getAttachm...
[ "protected", "boolean", "fillAttachmentList", "(", "@", "NonNull", "Context", "context", ",", "@", "NonNull", "String", "reportText", ",", "@", "NonNull", "List", "<", "Uri", ">", "attachments", ")", "{", "final", "InstanceCreator", "instanceCreator", "=", "new"...
Adds all attachment uris into the given list @param context a context @param reportText the report content @param attachments the target list @return if the attachments contain the content
[ "Adds", "all", "attachment", "uris", "into", "the", "given", "list" ]
train
https://github.com/ACRA/acra/blob/bfa3235ab110328c5ab2f792ddf8ee87be4a32d1/acra-mail/src/main/java/org/acra/sender/EmailIntentSender.java#L227-L238
ops4j/org.ops4j.pax.logging
pax-logging-log4j2/src/main/java/org/apache/logging/log4j/core/config/plugins/util/ResolverUtil.java
ResolverUtil.loadImplementationsInDirectory
private void loadImplementationsInDirectory(final Test test, final String parent, final File location) { """ Finds matches in a physical directory on a filesystem. Examines all files within a directory - if the File object is not a directory, and ends with <i>.class</i> the file is loaded and tested to see if it ...
java
private void loadImplementationsInDirectory(final Test test, final String parent, final File location) { final File[] files = location.listFiles(); if (files == null) { return; } StringBuilder builder; for (final File file : files) { builder = new StringB...
[ "private", "void", "loadImplementationsInDirectory", "(", "final", "Test", "test", ",", "final", "String", "parent", ",", "final", "File", "location", ")", "{", "final", "File", "[", "]", "files", "=", "location", ".", "listFiles", "(", ")", ";", "if", "("...
Finds matches in a physical directory on a filesystem. Examines all files within a directory - if the File object is not a directory, and ends with <i>.class</i> the file is loaded and tested to see if it is acceptable according to the Test. Operates recursively to find classes within a folder structure matching the pa...
[ "Finds", "matches", "in", "a", "physical", "directory", "on", "a", "filesystem", ".", "Examines", "all", "files", "within", "a", "directory", "-", "if", "the", "File", "object", "is", "not", "a", "directory", "and", "ends", "with", "<i", ">", ".", "class...
train
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-log4j2/src/main/java/org/apache/logging/log4j/core/config/plugins/util/ResolverUtil.java#L274-L292
voldemort/voldemort
src/java/voldemort/store/readonly/StoreVersionManager.java
StoreVersionManager.getDisabledMarkerFile
private File getDisabledMarkerFile(long version) throws PersistenceFailureException { """ Gets the '.disabled' file for a given version of this store. That file may or may not exist. @param version of the store for which to get the '.disabled' file. @return an instance of {@link File} pointing to the '.disabl...
java
private File getDisabledMarkerFile(long version) throws PersistenceFailureException { File[] versionDirArray = ReadOnlyUtils.getVersionDirs(rootDir, version, version); if (versionDirArray.length == 0) { throw new PersistenceFailureException("getDisabledMarkerFile did not find the requested v...
[ "private", "File", "getDisabledMarkerFile", "(", "long", "version", ")", "throws", "PersistenceFailureException", "{", "File", "[", "]", "versionDirArray", "=", "ReadOnlyUtils", ".", "getVersionDirs", "(", "rootDir", ",", "version", ",", "version", ")", ";", "if",...
Gets the '.disabled' file for a given version of this store. That file may or may not exist. @param version of the store for which to get the '.disabled' file. @return an instance of {@link File} pointing to the '.disabled' file. @throws PersistenceFailureException if the requested version cannot be found.
[ "Gets", "the", ".", "disabled", "file", "for", "a", "given", "version", "of", "this", "store", ".", "That", "file", "may", "or", "may", "not", "exist", "." ]
train
https://github.com/voldemort/voldemort/blob/a7dbdea58032021361680faacf2782cf981c5332/src/java/voldemort/store/readonly/StoreVersionManager.java#L244-L252
OpenTSDB/opentsdb
src/tools/UidManager.java
UidManager.findAndPrintRow
private static int findAndPrintRow(final HBaseClient client, final byte[] table, final byte[] key, final byte[] family, boolean formard) { """ Gets a given row in HBas...
java
private static int findAndPrintRow(final HBaseClient client, final byte[] table, final byte[] key, final byte[] family, boolean formard) { final GetRequest get = new Ge...
[ "private", "static", "int", "findAndPrintRow", "(", "final", "HBaseClient", "client", ",", "final", "byte", "[", "]", "table", ",", "final", "byte", "[", "]", "key", ",", "final", "byte", "[", "]", "family", ",", "boolean", "formard", ")", "{", "final", ...
Gets a given row in HBase and prints it on standard output. @param client The HBase client to use. @param table The name of the HBase table to use. @param key The row key to attempt to get from HBase. @param family The family in which we're interested. @return 0 if at least one cell was found and printed, 1 otherwise.
[ "Gets", "a", "given", "row", "in", "HBase", "and", "prints", "it", "on", "standard", "output", "." ]
train
https://github.com/OpenTSDB/opentsdb/blob/3fc2d491c3c1ad397252c0a80203a69a3f9e3ef3/src/tools/UidManager.java#L862-L880
osglworks/java-tool
src/main/java/org/osgl/util/BigLines.java
BigLines.preview
public List<String> preview(int limit, boolean noHeaderLine) { """ Returns first `limit` lines. @param limit the number of lines to be returned @param noHeaderLine if `false` then header line will be excluded in the return list @return the first `limit` lines. """ E.illegalArgumentIf(limit < 1, ...
java
public List<String> preview(int limit, boolean noHeaderLine) { E.illegalArgumentIf(limit < 1, "limit must be positive integer"); return fetch(noHeaderLine ? 1 : 0, limit); }
[ "public", "List", "<", "String", ">", "preview", "(", "int", "limit", ",", "boolean", "noHeaderLine", ")", "{", "E", ".", "illegalArgumentIf", "(", "limit", "<", "1", ",", "\"limit must be positive integer\"", ")", ";", "return", "fetch", "(", "noHeaderLine", ...
Returns first `limit` lines. @param limit the number of lines to be returned @param noHeaderLine if `false` then header line will be excluded in the return list @return the first `limit` lines.
[ "Returns", "first", "limit", "lines", "." ]
train
https://github.com/osglworks/java-tool/blob/8b6eee2bccb067eb32e6a7bc4a4dfef7a7d9008b/src/main/java/org/osgl/util/BigLines.java#L112-L115
opencb/java-common-libs
commons-datastore/commons-datastore-mongodb/src/main/java/org/opencb/commons/datastore/mongodb/GenericDocumentComplexConverter.java
GenericDocumentComplexConverter.restoreDots
public static Document restoreDots(Document document) { """ Restore all the dots in the keys where {@link #TO_REPLACE_DOTS} is found. @param document Document to modify @return Restored document """ return modifyKeys(document, key -> key.replace(TO_REPLACE_DOTS, "."), TO_REPLACE_DOT...
java
public static Document restoreDots(Document document) { return modifyKeys(document, key -> key.replace(TO_REPLACE_DOTS, "."), TO_REPLACE_DOTS); }
[ "public", "static", "Document", "restoreDots", "(", "Document", "document", ")", "{", "return", "modifyKeys", "(", "document", ",", "key", "->", "key", ".", "replace", "(", "TO_REPLACE_DOTS", ",", "\".\"", ")", ",", "TO_REPLACE_DOTS", ")", ";", "}" ]
Restore all the dots in the keys where {@link #TO_REPLACE_DOTS} is found. @param document Document to modify @return Restored document
[ "Restore", "all", "the", "dots", "in", "the", "keys", "where", "{" ]
train
https://github.com/opencb/java-common-libs/blob/5c97682530d0be55828e1e4e374ff01fceb5f198/commons-datastore/commons-datastore-mongodb/src/main/java/org/opencb/commons/datastore/mongodb/GenericDocumentComplexConverter.java#L118-L120
apache/spark
sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/operation/MetadataOperation.java
MetadataOperation.convertIdentifierPattern
protected String convertIdentifierPattern(final String pattern, boolean datanucleusFormat) { """ Convert wildchars and escape sequence from JDBC format to datanucleous/regex """ if (pattern == null) { return convertPattern("%", true); } else { return convertPattern(pattern, datanucleusForma...
java
protected String convertIdentifierPattern(final String pattern, boolean datanucleusFormat) { if (pattern == null) { return convertPattern("%", true); } else { return convertPattern(pattern, datanucleusFormat); } }
[ "protected", "String", "convertIdentifierPattern", "(", "final", "String", "pattern", ",", "boolean", "datanucleusFormat", ")", "{", "if", "(", "pattern", "==", "null", ")", "{", "return", "convertPattern", "(", "\"%\"", ",", "true", ")", ";", "}", "else", "...
Convert wildchars and escape sequence from JDBC format to datanucleous/regex
[ "Convert", "wildchars", "and", "escape", "sequence", "from", "JDBC", "format", "to", "datanucleous", "/", "regex" ]
train
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/operation/MetadataOperation.java#L64-L70
lucee/Lucee
core/src/main/java/lucee/runtime/text/xml/XMLCaster.java
XMLCaster.toElement
public static Element toElement(Document doc, Object o) throws PageException { """ casts a value to a XML Element @param doc XML Document @param o Object to cast @return XML Element Object @throws PageException """ if (o instanceof Element) return (Element) o; else if (o instanceof Node) throw new Expr...
java
public static Element toElement(Document doc, Object o) throws PageException { if (o instanceof Element) return (Element) o; else if (o instanceof Node) throw new ExpressionException("Object " + Caster.toClassName(o) + " must be a XML Element"); return doc.createElement(Caster.toString(o)); }
[ "public", "static", "Element", "toElement", "(", "Document", "doc", ",", "Object", "o", ")", "throws", "PageException", "{", "if", "(", "o", "instanceof", "Element", ")", "return", "(", "Element", ")", "o", ";", "else", "if", "(", "o", "instanceof", "Nod...
casts a value to a XML Element @param doc XML Document @param o Object to cast @return XML Element Object @throws PageException
[ "casts", "a", "value", "to", "a", "XML", "Element" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/text/xml/XMLCaster.java#L274-L278
vtatai/srec
core/src/main/java/com/github/srec/command/base/BaseCommand.java
BaseCommand.findObjectSymbol
protected Object findObjectSymbol(String name, ExecutionContext context) { """ Finds a symbol which should wrap a Java object. @param name The symbol name @param context The EC @return The object, if it was found by Jemmy returns the source """ CommandSymbol s = context.findSymbol(name); if (s == nu...
java
protected Object findObjectSymbol(String name, ExecutionContext context) { CommandSymbol s = context.findSymbol(name); if (s == null) throw new CommandExecutionException("Symbol cannot be null"); if (!(s instanceof VarCommand)) throw new CommandExecutionException("Symbol must be a variable"); Value value ...
[ "protected", "Object", "findObjectSymbol", "(", "String", "name", ",", "ExecutionContext", "context", ")", "{", "CommandSymbol", "s", "=", "context", ".", "findSymbol", "(", "name", ")", ";", "if", "(", "s", "==", "null", ")", "throw", "new", "CommandExecuti...
Finds a symbol which should wrap a Java object. @param name The symbol name @param context The EC @return The object, if it was found by Jemmy returns the source
[ "Finds", "a", "symbol", "which", "should", "wrap", "a", "Java", "object", "." ]
train
https://github.com/vtatai/srec/blob/87fa6754a6a5f8569ef628db4d149eea04062568/core/src/main/java/com/github/srec/command/base/BaseCommand.java#L120-L139
lucee/Lucee
core/src/main/java/lucee/runtime/jsr223/ScriptEngineImpl.java
ScriptEngineImpl.eval
@Override public Object eval(Reader reader, ScriptContext context) throws ScriptException { """ /////////// calling other methods of the same class ///////////////// """ try { return eval(IOUtil.toString(reader), context); } catch (IOException ioe) { throw toScriptException(ioe); } }
java
@Override public Object eval(Reader reader, ScriptContext context) throws ScriptException { try { return eval(IOUtil.toString(reader), context); } catch (IOException ioe) { throw toScriptException(ioe); } }
[ "@", "Override", "public", "Object", "eval", "(", "Reader", "reader", ",", "ScriptContext", "context", ")", "throws", "ScriptException", "{", "try", "{", "return", "eval", "(", "IOUtil", ".", "toString", "(", "reader", ")", ",", "context", ")", ";", "}", ...
/////////// calling other methods of the same class /////////////////
[ "///////////", "calling", "other", "methods", "of", "the", "same", "class", "/////////////////" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/jsr223/ScriptEngineImpl.java#L181-L189
bullhorn/sdk-rest
src/main/java/com/bullhornsdk/data/api/StandardBullhornData.java
StandardBullhornData.handleParseResumeText
protected <P extends ParsedResume> P handleParseResumeText(String resume, ResumeTextParseParams params) { """ Handles the parsing of a resume text. Contains retry logic. @param resume @param params @return """ Map<String, String> uriVariables = restUriVariablesFactory.getUriVariablesForResumeTextP...
java
protected <P extends ParsedResume> P handleParseResumeText(String resume, ResumeTextParseParams params) { Map<String, String> uriVariables = restUriVariablesFactory.getUriVariablesForResumeTextParse(params); String url = restUrlFactory.assembleParseResumeTextUrl(params); JSONObject resumeInfoTo...
[ "protected", "<", "P", "extends", "ParsedResume", ">", "P", "handleParseResumeText", "(", "String", "resume", ",", "ResumeTextParseParams", "params", ")", "{", "Map", "<", "String", ",", "String", ">", "uriVariables", "=", "restUriVariablesFactory", ".", "getUriVa...
Handles the parsing of a resume text. Contains retry logic. @param resume @param params @return
[ "Handles", "the", "parsing", "of", "a", "resume", "text", ".", "Contains", "retry", "logic", "." ]
train
https://github.com/bullhorn/sdk-rest/blob/0c75a141c768bb31510afc3a412c11bd101eca06/src/main/java/com/bullhornsdk/data/api/StandardBullhornData.java#L1312-L1328
elki-project/elki
elki/src/main/java/de/lmu/ifi/dbs/elki/result/KMLOutputHandler.java
KMLOutputHandler.makeDescription
private StringBuilder makeDescription(Collection<Relation<?>> relations, DBIDRef id) { """ Make an HTML description. @param relations Relations @param id Object ID @return Buffer """ StringBuilder buf = new StringBuilder(); for(Relation<?> rel : relations) { Object o = rel.get(id); if(...
java
private StringBuilder makeDescription(Collection<Relation<?>> relations, DBIDRef id) { StringBuilder buf = new StringBuilder(); for(Relation<?> rel : relations) { Object o = rel.get(id); if(o == null) { continue; } String s = o.toString(); // FIXME: strip html characters ...
[ "private", "StringBuilder", "makeDescription", "(", "Collection", "<", "Relation", "<", "?", ">", ">", "relations", ",", "DBIDRef", "id", ")", "{", "StringBuilder", "buf", "=", "new", "StringBuilder", "(", ")", ";", "for", "(", "Relation", "<", "?", ">", ...
Make an HTML description. @param relations Relations @param id Object ID @return Buffer
[ "Make", "an", "HTML", "description", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki/src/main/java/de/lmu/ifi/dbs/elki/result/KMLOutputHandler.java#L551-L568
aws/aws-sdk-java
aws-java-sdk-marketplacecommerceanalytics/src/main/java/com/amazonaws/services/marketplacecommerceanalytics/model/GenerateDataSetRequest.java
GenerateDataSetRequest.withCustomerDefinedValues
public GenerateDataSetRequest withCustomerDefinedValues(java.util.Map<String, String> customerDefinedValues) { """ (Optional) Key-value pairs which will be returned, unmodified, in the Amazon SNS notification message and the data set metadata file. These key-value pairs can be used to correlated responses with tr...
java
public GenerateDataSetRequest withCustomerDefinedValues(java.util.Map<String, String> customerDefinedValues) { setCustomerDefinedValues(customerDefinedValues); return this; }
[ "public", "GenerateDataSetRequest", "withCustomerDefinedValues", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "customerDefinedValues", ")", "{", "setCustomerDefinedValues", "(", "customerDefinedValues", ")", ";", "return", "this", ";", "}...
(Optional) Key-value pairs which will be returned, unmodified, in the Amazon SNS notification message and the data set metadata file. These key-value pairs can be used to correlated responses with tracking information from other systems. @param customerDefinedValues (Optional) Key-value pairs which will be returned, u...
[ "(", "Optional", ")", "Key", "-", "value", "pairs", "which", "will", "be", "returned", "unmodified", "in", "the", "Amazon", "SNS", "notification", "message", "and", "the", "data", "set", "metadata", "file", ".", "These", "key", "-", "value", "pairs", "can"...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-marketplacecommerceanalytics/src/main/java/com/amazonaws/services/marketplacecommerceanalytics/model/GenerateDataSetRequest.java#L1931-L1934
dlemmermann/CalendarFX
CalendarFXView/src/main/java/com/calendarfx/model/Interval.java
Interval.withEndDateTime
public Interval withEndDateTime(LocalDateTime dateTime) { """ Returns a new interval based on this interval but with a different end date and time. @param dateTime the new end date and time @return a new interval """ requireNonNull(dateTime); return new Interval(startDate, startTime, dateT...
java
public Interval withEndDateTime(LocalDateTime dateTime) { requireNonNull(dateTime); return new Interval(startDate, startTime, dateTime.toLocalDate(), dateTime.toLocalTime()); }
[ "public", "Interval", "withEndDateTime", "(", "LocalDateTime", "dateTime", ")", "{", "requireNonNull", "(", "dateTime", ")", ";", "return", "new", "Interval", "(", "startDate", ",", "startTime", ",", "dateTime", ".", "toLocalDate", "(", ")", ",", "dateTime", "...
Returns a new interval based on this interval but with a different end date and time. @param dateTime the new end date and time @return a new interval
[ "Returns", "a", "new", "interval", "based", "on", "this", "interval", "but", "with", "a", "different", "end", "date", "and", "time", "." ]
train
https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXView/src/main/java/com/calendarfx/model/Interval.java#L379-L382
aws/aws-cloudtrail-processing-library
src/main/java/com/amazonaws/services/cloudtrail/processinglibrary/utils/LibraryUtils.java
LibraryUtils.endToProcess
public static void endToProcess(ProgressReporter progressReporter, boolean processSuccess, ProgressStatus progressStatus, Object reportObject) { """ A wrapper function of reporting the result of the processing. @param progressReporter the {@link ProgressReporter} to report the end of process. @param processSucce...
java
public static void endToProcess(ProgressReporter progressReporter, boolean processSuccess, ProgressStatus progressStatus, Object reportObject) { progressStatus.getProgressInfo().setIsSuccess(processSuccess); progressReporter.reportEnd(progressStatus, reportObject); }
[ "public", "static", "void", "endToProcess", "(", "ProgressReporter", "progressReporter", ",", "boolean", "processSuccess", ",", "ProgressStatus", "progressStatus", ",", "Object", "reportObject", ")", "{", "progressStatus", ".", "getProgressInfo", "(", ")", ".", "setIs...
A wrapper function of reporting the result of the processing. @param progressReporter the {@link ProgressReporter} to report the end of process. @param processSuccess the result of process. @param progressStatus the current progress status {@link ProgressStatus}. @param reportObject the object to send, usually the obje...
[ "A", "wrapper", "function", "of", "reporting", "the", "result", "of", "the", "processing", "." ]
train
https://github.com/aws/aws-cloudtrail-processing-library/blob/411315808d8d3dc6b45e4182212e3e04d82e3782/src/main/java/com/amazonaws/services/cloudtrail/processinglibrary/utils/LibraryUtils.java#L192-L195
Jasig/uPortal
uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/utils/ConcurrentMapUtils.java
ConcurrentMapUtils.putIfAbsent
public static <K, V> V putIfAbsent(ConcurrentMap<K, V> map, K key, V value) { """ How putIfAbsent should work, returns the one value that actually ends up in the {@link ConcurrentMap} @param map The map @param key The key @param value The value to put @return The value that exists in the Map for this key at...
java
public static <K, V> V putIfAbsent(ConcurrentMap<K, V> map, K key, V value) { final V existingValue = map.putIfAbsent(key, value); if (existingValue == null) { return value; } return existingValue; }
[ "public", "static", "<", "K", ",", "V", ">", "V", "putIfAbsent", "(", "ConcurrentMap", "<", "K", ",", "V", ">", "map", ",", "K", "key", ",", "V", "value", ")", "{", "final", "V", "existingValue", "=", "map", ".", "putIfAbsent", "(", "key", ",", "...
How putIfAbsent should work, returns the one value that actually ends up in the {@link ConcurrentMap} @param map The map @param key The key @param value The value to put @return The value that exists in the Map for this key at the point in time that {@link ConcurrentMap#putIfAbsent(Object, Object)} is called
[ "How", "putIfAbsent", "should", "work", "returns", "the", "one", "value", "that", "actually", "ends", "up", "in", "the", "{", "@link", "ConcurrentMap", "}" ]
train
https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/utils/ConcurrentMapUtils.java#L35-L42
sdl/odata
odata_renderer/src/main/java/com/sdl/odata/unmarshaller/json/core/JsonPropertyExpander.java
JsonPropertyExpander.loadEntity
public Object loadEntity(String entityName) throws ODataUnmarshallingException { """ Creates the an entity based on its name. @param entityName The name of the entity @return the entity object @throws ODataUnmarshallingException If unable to load entity """ Object entity = null; if (entity...
java
public Object loadEntity(String entityName) throws ODataUnmarshallingException { Object entity = null; if (entityName != null) { try { StructuredType entityType = JsonParserUtils.getStructuredType(entityName, entityDataModel); if (entityType != null) { ...
[ "public", "Object", "loadEntity", "(", "String", "entityName", ")", "throws", "ODataUnmarshallingException", "{", "Object", "entity", "=", "null", ";", "if", "(", "entityName", "!=", "null", ")", "{", "try", "{", "StructuredType", "entityType", "=", "JsonParserU...
Creates the an entity based on its name. @param entityName The name of the entity @return the entity object @throws ODataUnmarshallingException If unable to load entity
[ "Creates", "the", "an", "entity", "based", "on", "its", "name", "." ]
train
https://github.com/sdl/odata/blob/eb747d73e9af0f4e59a25b82ed656e526a7e2189/odata_renderer/src/main/java/com/sdl/odata/unmarshaller/json/core/JsonPropertyExpander.java#L261-L278
wellner/jcarafe
jcarafe-core/src/main/java/cern/colt/list/DoubleArrayList.java
DoubleArrayList.set
public void set(int index, double element) { """ Replaces the element at the specified position in the receiver with the specified element. @param index index of element to replace. @param element element to be stored at the specified position. @exception IndexOutOfBoundsException index is out of range (index...
java
public void set(int index, double element) { // overridden for performance only. if (index >= size || index < 0) throw new IndexOutOfBoundsException("Index: "+index+", Size: "+size); elements[index] = element; }
[ "public", "void", "set", "(", "int", "index", ",", "double", "element", ")", "{", "// overridden for performance only.\r", "if", "(", "index", ">=", "size", "||", "index", "<", "0", ")", "throw", "new", "IndexOutOfBoundsException", "(", "\"Index: \"", "+", "in...
Replaces the element at the specified position in the receiver with the specified element. @param index index of element to replace. @param element element to be stored at the specified position. @exception IndexOutOfBoundsException index is out of range (index &lt; 0 || index &gt;= size()).
[ "Replaces", "the", "element", "at", "the", "specified", "position", "in", "the", "receiver", "with", "the", "specified", "element", "." ]
train
https://github.com/wellner/jcarafe/blob/ab8b0a83dbf600fe80c27711815c90bd3055b217/jcarafe-core/src/main/java/cern/colt/list/DoubleArrayList.java#L434-L439
liferay/com-liferay-commerce
commerce-product-type-virtual-order-service/src/main/java/com/liferay/commerce/product/type/virtual/order/service/persistence/impl/CommerceVirtualOrderItemPersistenceImpl.java
CommerceVirtualOrderItemPersistenceImpl.findByUuid
@Override public List<CommerceVirtualOrderItem> findByUuid(String uuid) { """ Returns all the commerce virtual order items where uuid = &#63;. @param uuid the uuid @return the matching commerce virtual order items """ return findByUuid(uuid, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); }
java
@Override public List<CommerceVirtualOrderItem> findByUuid(String uuid) { return findByUuid(uuid, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); }
[ "@", "Override", "public", "List", "<", "CommerceVirtualOrderItem", ">", "findByUuid", "(", "String", "uuid", ")", "{", "return", "findByUuid", "(", "uuid", ",", "QueryUtil", ".", "ALL_POS", ",", "QueryUtil", ".", "ALL_POS", ",", "null", ")", ";", "}" ]
Returns all the commerce virtual order items where uuid = &#63;. @param uuid the uuid @return the matching commerce virtual order items
[ "Returns", "all", "the", "commerce", "virtual", "order", "items", "where", "uuid", "=", "&#63", ";", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-type-virtual-order-service/src/main/java/com/liferay/commerce/product/type/virtual/order/service/persistence/impl/CommerceVirtualOrderItemPersistenceImpl.java#L126-L129
haraldk/TwelveMonkeys
sandbox/sandbox-common/src/main/java/com/twelvemonkeys/net/SimpleAuthenticator.java
SimpleAuthenticator.getPasswordAuthentication
protected PasswordAuthentication getPasswordAuthentication() { """ Gets the PasswordAuthentication for the request. Called when password authorization is needed. @return The PasswordAuthentication collected from the user, or null if none is provided. """ // Don't worry, this is just a hack to figu...
java
protected PasswordAuthentication getPasswordAuthentication() { // Don't worry, this is just a hack to figure out if we were able // to set this Authenticator through the setDefault method. if (!sInitialized && MAGIC.equals(getRequestingScheme()) && getRequestingPort() == FOURTYTWO) { ...
[ "protected", "PasswordAuthentication", "getPasswordAuthentication", "(", ")", "{", "// Don't worry, this is just a hack to figure out if we were able", "// to set this Authenticator through the setDefault method.", "if", "(", "!", "sInitialized", "&&", "MAGIC", ".", "equals", "(", ...
Gets the PasswordAuthentication for the request. Called when password authorization is needed. @return The PasswordAuthentication collected from the user, or null if none is provided.
[ "Gets", "the", "PasswordAuthentication", "for", "the", "request", ".", "Called", "when", "password", "authorization", "is", "needed", "." ]
train
https://github.com/haraldk/TwelveMonkeys/blob/7fad4d5cd8cb3a6728c7fd3f28a7b84d8ce0101d/sandbox/sandbox-common/src/main/java/com/twelvemonkeys/net/SimpleAuthenticator.java#L120-L151
sirthias/parboiled
parboiled-core/src/main/java/org/parboiled/support/Filters.java
Filters.rulesBelow
public static Predicate<Tuple2<Context<?>, Boolean>> rulesBelow(final Rule... rules) { """ A predicate usable as a filter (element) of a {@link org.parboiled.parserunners.TracingParseRunner}. Enables printing of rule tracing log messages for all sub rules of the given rules. @param rules the rules whose sub ru...
java
public static Predicate<Tuple2<Context<?>, Boolean>> rulesBelow(final Rule... rules) { return new Predicate<Tuple2<Context<?>, Boolean>>() { public boolean apply(Tuple2<Context<?>, Boolean> tuple) { MatcherPath path = tuple.a.getPath(); for (Rule rule : rules) { ...
[ "public", "static", "Predicate", "<", "Tuple2", "<", "Context", "<", "?", ">", ",", "Boolean", ">", ">", "rulesBelow", "(", "final", "Rule", "...", "rules", ")", "{", "return", "new", "Predicate", "<", "Tuple2", "<", "Context", "<", "?", ">", ",", "B...
A predicate usable as a filter (element) of a {@link org.parboiled.parserunners.TracingParseRunner}. Enables printing of rule tracing log messages for all sub rules of the given rules. @param rules the rules whose sub rules to generate tracing message for @return a predicate
[ "A", "predicate", "usable", "as", "a", "filter", "(", "element", ")", "of", "a", "{", "@link", "org", ".", "parboiled", ".", "parserunners", ".", "TracingParseRunner", "}", ".", "Enables", "printing", "of", "rule", "tracing", "log", "messages", "for", "all...
train
https://github.com/sirthias/parboiled/blob/84f3ed43e3e171b4c6ab5e6ca6297d264a9d686a/parboiled-core/src/main/java/org/parboiled/support/Filters.java#L172-L183
knowm/XChart
xchart/src/main/java/org/knowm/xchart/XYChart.java
XYChart.addSeries
private XYSeries addSeries( String seriesName, double[] xData, double[] yData, double[] errorBars, DataType dataType) { """ Add a series for a X-Y type chart using Lists with error bars @param seriesName @param xData the X-Axis data @param yData the Y-Axis data @param errorBars the error bar data @ret...
java
private XYSeries addSeries( String seriesName, double[] xData, double[] yData, double[] errorBars, DataType dataType) { // Sanity checks sanityCheck(seriesName, xData, yData, errorBars); XYSeries series; if (xData != null) { // Sanity check if (xData.length != yData.length) { ...
[ "private", "XYSeries", "addSeries", "(", "String", "seriesName", ",", "double", "[", "]", "xData", ",", "double", "[", "]", "yData", ",", "double", "[", "]", "errorBars", ",", "DataType", "dataType", ")", "{", "// Sanity checks", "sanityCheck", "(", "seriesN...
Add a series for a X-Y type chart using Lists with error bars @param seriesName @param xData the X-Axis data @param yData the Y-Axis data @param errorBars the error bar data @return A Series object that you can set properties on
[ "Add", "a", "series", "for", "a", "X", "-", "Y", "type", "chart", "using", "Lists", "with", "error", "bars" ]
train
https://github.com/knowm/XChart/blob/677a105753a855edf24782fab1bf1f5aec3e642b/xchart/src/main/java/org/knowm/xchart/XYChart.java#L283-L307
RestComm/media-core
rtp/src/main/java/org/restcomm/media/core/rtp/channels/MediaChannel.java
MediaChannel.enableICE
public void enableICE(String externalAddress, boolean rtcpMux) { """ Enables ICE on the channel. <p> An ICE-enabled channel will start an ICE Agent which gathers local candidates and listens to incoming STUN requests as a mean to select the proper address to be used during the call. </p> @param externalA...
java
public void enableICE(String externalAddress, boolean rtcpMux) { if (!this.ice) { this.ice = true; this.rtcpMux = rtcpMux; this.iceAuthenticator.generateIceCredentials(); // Enable ICE on RTP channels this.rtpChannel.enableIce(this.iceAuth...
[ "public", "void", "enableICE", "(", "String", "externalAddress", ",", "boolean", "rtcpMux", ")", "{", "if", "(", "!", "this", ".", "ice", ")", "{", "this", ".", "ice", "=", "true", ";", "this", ".", "rtcpMux", "=", "rtcpMux", ";", "this", ".", "iceAu...
Enables ICE on the channel. <p> An ICE-enabled channel will start an ICE Agent which gathers local candidates and listens to incoming STUN requests as a mean to select the proper address to be used during the call. </p> @param externalAddress The public address of the Media Server. Used for SRFLX candidates. @param r...
[ "Enables", "ICE", "on", "the", "channel", "." ]
train
https://github.com/RestComm/media-core/blob/07b8703343708599f60af66bae62aded77ee81b5/rtp/src/main/java/org/restcomm/media/core/rtp/channels/MediaChannel.java#L720-L736
ManfredTremmel/gwt-commons-lang3
src/main/java/org/apache/commons/lang3/time/DateUtils.java
DateUtils.getFragmentInMinutes
@GwtIncompatible("incompatible method") public static long getFragmentInMinutes(final Date date, final int fragment) { """ <p>Returns the number of minutes within the fragment. All datefields greater than the fragment will be ignored.</p> <p>Asking the minutes of any date will only return the number of min...
java
@GwtIncompatible("incompatible method") public static long getFragmentInMinutes(final Date date, final int fragment) { return getFragment(date, fragment, TimeUnit.MINUTES); }
[ "@", "GwtIncompatible", "(", "\"incompatible method\"", ")", "public", "static", "long", "getFragmentInMinutes", "(", "final", "Date", "date", ",", "final", "int", "fragment", ")", "{", "return", "getFragment", "(", "date", ",", "fragment", ",", "TimeUnit", ".",...
<p>Returns the number of minutes within the fragment. All datefields greater than the fragment will be ignored.</p> <p>Asking the minutes of any date will only return the number of minutes of the current hour (resulting in a number between 0 and 59). This method will retrieve the number of minutes for any fragment. Fo...
[ "<p", ">", "Returns", "the", "number", "of", "minutes", "within", "the", "fragment", ".", "All", "datefields", "greater", "than", "the", "fragment", "will", "be", "ignored", ".", "<", "/", "p", ">" ]
train
https://github.com/ManfredTremmel/gwt-commons-lang3/blob/9e2dfbbda3668cfa5d935fe76479d1426c294504/src/main/java/org/apache/commons/lang3/time/DateUtils.java#L1374-L1377
pebble/pebble-android-sdk
PebbleKit/PebbleKit/src/main/java/com/getpebble/android/kit/util/PebbleDictionary.java
PebbleDictionary.addInt16
public void addInt16(final int key, final short s) { """ Associate the specified signed short with the provided key in the dictionary. If another key-value pair with the same key is already present in the dictionary, it will be replaced. @param key key with which the specified value is associated @param s v...
java
public void addInt16(final int key, final short s) { PebbleTuple t = PebbleTuple.create(key, PebbleTuple.TupleType.INT, PebbleTuple.Width.SHORT, s); addTuple(t); }
[ "public", "void", "addInt16", "(", "final", "int", "key", ",", "final", "short", "s", ")", "{", "PebbleTuple", "t", "=", "PebbleTuple", ".", "create", "(", "key", ",", "PebbleTuple", ".", "TupleType", ".", "INT", ",", "PebbleTuple", ".", "Width", ".", ...
Associate the specified signed short with the provided key in the dictionary. If another key-value pair with the same key is already present in the dictionary, it will be replaced. @param key key with which the specified value is associated @param s value to be associated with the specified key
[ "Associate", "the", "specified", "signed", "short", "with", "the", "provided", "key", "in", "the", "dictionary", ".", "If", "another", "key", "-", "value", "pair", "with", "the", "same", "key", "is", "already", "present", "in", "the", "dictionary", "it", "...
train
https://github.com/pebble/pebble-android-sdk/blob/ddfc53ecf3950deebb62a1f205aa21fbe9bce45d/PebbleKit/PebbleKit/src/main/java/com/getpebble/android/kit/util/PebbleDictionary.java#L135-L138
alkacon/opencms-core
src/org/opencms/file/CmsProject.java
CmsProject.isInsideProject
public static boolean isInsideProject(List<String> projectResources, CmsResource resource) { """ Checks if the full resource name (including the site root) of a resource matches any of the project resources of a project.<p> @param projectResources a List of project resources as Strings @param resource the res...
java
public static boolean isInsideProject(List<String> projectResources, CmsResource resource) { String resourcename = resource.getRootPath(); return isInsideProject(projectResources, resourcename); }
[ "public", "static", "boolean", "isInsideProject", "(", "List", "<", "String", ">", "projectResources", ",", "CmsResource", "resource", ")", "{", "String", "resourcename", "=", "resource", ".", "getRootPath", "(", ")", ";", "return", "isInsideProject", "(", "proj...
Checks if the full resource name (including the site root) of a resource matches any of the project resources of a project.<p> @param projectResources a List of project resources as Strings @param resource the resource to check @return true, if the resource is "inside" the project resources
[ "Checks", "if", "the", "full", "resource", "name", "(", "including", "the", "site", "root", ")", "of", "a", "resource", "matches", "any", "of", "the", "project", "resources", "of", "a", "project", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/file/CmsProject.java#L226-L230
xcesco/kripton
kripton-orm/src/main/java/com/abubusoft/kripton/android/sqlite/SQLiteUpdateTaskHelper.java
SQLiteUpdateTaskHelper.renameTablesWithPrefix
public static void renameTablesWithPrefix(SQLiteDatabase db, final String prefix) { """ Add to all table a specifix prefix. @param db the db @param prefix the prefix """ Logger.info("MASSIVE TABLE RENAME OPERATION: ADD PREFIX " + prefix); query(db, null, QueryType.TABLE, new OnResultListener() { ...
java
public static void renameTablesWithPrefix(SQLiteDatabase db, final String prefix) { Logger.info("MASSIVE TABLE RENAME OPERATION: ADD PREFIX " + prefix); query(db, null, QueryType.TABLE, new OnResultListener() { @Override public void onRow(SQLiteDatabase db, String name, String sql) { sql = String.format(...
[ "public", "static", "void", "renameTablesWithPrefix", "(", "SQLiteDatabase", "db", ",", "final", "String", "prefix", ")", "{", "Logger", ".", "info", "(", "\"MASSIVE TABLE RENAME OPERATION: ADD PREFIX \"", "+", "prefix", ")", ";", "query", "(", "db", ",", "null", ...
Add to all table a specifix prefix. @param db the db @param prefix the prefix
[ "Add", "to", "all", "table", "a", "specifix", "prefix", "." ]
train
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-orm/src/main/java/com/abubusoft/kripton/android/sqlite/SQLiteUpdateTaskHelper.java#L161-L173
netty/netty
example/src/main/java/io/netty/example/http2/helloworld/multiplex/server/HelloWorldHttp2Handler.java
HelloWorldHttp2Handler.onHeadersRead
private static void onHeadersRead(ChannelHandlerContext ctx, Http2HeadersFrame headers) throws Exception { """ If receive a frame with end-of-stream set, send a pre-canned response. """ if (headers.isEndStream()) { ByteBuf content = ctx.alloc().buffer(); content.writ...
java
private static void onHeadersRead(ChannelHandlerContext ctx, Http2HeadersFrame headers) throws Exception { if (headers.isEndStream()) { ByteBuf content = ctx.alloc().buffer(); content.writeBytes(RESPONSE_BYTES.duplicate()); ByteBufUtil.writeAscii(content, " - via ...
[ "private", "static", "void", "onHeadersRead", "(", "ChannelHandlerContext", "ctx", ",", "Http2HeadersFrame", "headers", ")", "throws", "Exception", "{", "if", "(", "headers", ".", "isEndStream", "(", ")", ")", "{", "ByteBuf", "content", "=", "ctx", ".", "alloc...
If receive a frame with end-of-stream set, send a pre-canned response.
[ "If", "receive", "a", "frame", "with", "end", "-", "of", "-", "stream", "set", "send", "a", "pre", "-", "canned", "response", "." ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/example/src/main/java/io/netty/example/http2/helloworld/multiplex/server/HelloWorldHttp2Handler.java#L83-L91
lucee/Lucee
core/src/main/java/lucee/runtime/com/COMUtil.java
COMUtil.toObject
public static Object toObject(COMObject parent, Variant variant, String key, Object defaultValue) { """ translate a Variant Object to Object, when it is a Dispatch translate it to COMWrapper @param parent @param variant @param key @return Object from Variant """ try { return toObject(parent, varian...
java
public static Object toObject(COMObject parent, Variant variant, String key, Object defaultValue) { try { return toObject(parent, variant, key); } catch (ExpressionException ee) { return defaultValue; } }
[ "public", "static", "Object", "toObject", "(", "COMObject", "parent", ",", "Variant", "variant", ",", "String", "key", ",", "Object", "defaultValue", ")", "{", "try", "{", "return", "toObject", "(", "parent", ",", "variant", ",", "key", ")", ";", "}", "c...
translate a Variant Object to Object, when it is a Dispatch translate it to COMWrapper @param parent @param variant @param key @return Object from Variant
[ "translate", "a", "Variant", "Object", "to", "Object", "when", "it", "is", "a", "Dispatch", "translate", "it", "to", "COMWrapper" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/com/COMUtil.java#L44-L51
aws/aws-sdk-java
aws-java-sdk-lambda/src/main/java/com/amazonaws/services/lambda/model/AliasRoutingConfiguration.java
AliasRoutingConfiguration.withAdditionalVersionWeights
public AliasRoutingConfiguration withAdditionalVersionWeights(java.util.Map<String, Double> additionalVersionWeights) { """ <p> The name of the second alias, and the percentage of traffic that's routed to it. </p> @param additionalVersionWeights The name of the second alias, and the percentage of traffic tha...
java
public AliasRoutingConfiguration withAdditionalVersionWeights(java.util.Map<String, Double> additionalVersionWeights) { setAdditionalVersionWeights(additionalVersionWeights); return this; }
[ "public", "AliasRoutingConfiguration", "withAdditionalVersionWeights", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "Double", ">", "additionalVersionWeights", ")", "{", "setAdditionalVersionWeights", "(", "additionalVersionWeights", ")", ";", "return", "thi...
<p> The name of the second alias, and the percentage of traffic that's routed to it. </p> @param additionalVersionWeights The name of the second alias, and the percentage of traffic that's routed to it. @return Returns a reference to this object so that method calls can be chained together.
[ "<p", ">", "The", "name", "of", "the", "second", "alias", "and", "the", "percentage", "of", "traffic", "that", "s", "routed", "to", "it", ".", "<", "/", "p", ">" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-lambda/src/main/java/com/amazonaws/services/lambda/model/AliasRoutingConfiguration.java#L79-L82
apptik/jus
examples-android/src/main/java/io/apptik/comm/jus/examples/nav/NavigationDrawerFragment.java
NavigationDrawerFragment.setUp
public void setUp(int fragmentId, DrawerLayout drawerLayout) { """ Users of this fragment must call this method to set up the navigation drawer interactions. @param fragmentId The android:id of this fragment in its activity's layout. @param drawerLayout The DrawerLayout containing this fragment's UI. """...
java
public void setUp(int fragmentId, DrawerLayout drawerLayout) { mFragmentContainerView = getActivity().findViewById(fragmentId); mDrawerLayout = drawerLayout; mActionBarToolbar = (Toolbar) getActivity().findViewById(R.id.toolbar); // set a custom shadow that overlays the main content whe...
[ "public", "void", "setUp", "(", "int", "fragmentId", ",", "DrawerLayout", "drawerLayout", ")", "{", "mFragmentContainerView", "=", "getActivity", "(", ")", ".", "findViewById", "(", "fragmentId", ")", ";", "mDrawerLayout", "=", "drawerLayout", ";", "mActionBarTool...
Users of this fragment must call this method to set up the navigation drawer interactions. @param fragmentId The android:id of this fragment in its activity's layout. @param drawerLayout The DrawerLayout containing this fragment's UI.
[ "Users", "of", "this", "fragment", "must", "call", "this", "method", "to", "set", "up", "the", "navigation", "drawer", "interactions", "." ]
train
https://github.com/apptik/jus/blob/8a37a21b41f897d68eaeaab07368ec22a1e5a60e/examples-android/src/main/java/io/apptik/comm/jus/examples/nav/NavigationDrawerFragment.java#L138-L201
TheHortonMachine/hortonmachine
dbs/src/main/java/org/hortonmachine/ssh/SshUtilities.java
SshUtilities.killProcessByPid
public static void killProcessByPid( Session session, int pid ) throws Exception { """ Kills a process using its pid. <P><b>THIS WORKS ONLY ON LINUX HOSTS</b></p> @param session the session to use. @param pid the pid to use. @throws Exception """ String command = "kill -9 " + pid; Strin...
java
public static void killProcessByPid( Session session, int pid ) throws Exception { String command = "kill -9 " + pid; String remoteResponseStr = launchACommand(session, command); if (remoteResponseStr.length() == 0) { return; } else { new Exception(remoteResponseS...
[ "public", "static", "void", "killProcessByPid", "(", "Session", "session", ",", "int", "pid", ")", "throws", "Exception", "{", "String", "command", "=", "\"kill -9 \"", "+", "pid", ";", "String", "remoteResponseStr", "=", "launchACommand", "(", "session", ",", ...
Kills a process using its pid. <P><b>THIS WORKS ONLY ON LINUX HOSTS</b></p> @param session the session to use. @param pid the pid to use. @throws Exception
[ "Kills", "a", "process", "using", "its", "pid", "." ]
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/dbs/src/main/java/org/hortonmachine/ssh/SshUtilities.java#L142-L151
zaproxy/zaproxy
src/org/zaproxy/zap/extension/script/ExtensionScript.java
ExtensionScript.handleFailedScriptInterface
public void handleFailedScriptInterface(ScriptWrapper script, String errorMessage) { """ Handles a failed attempt to convert a script into an interface. <p> The given {@code errorMessage} will be written to the writer(s) associated with the given {@code script}, moreover it will be disabled and flagged that has...
java
public void handleFailedScriptInterface(ScriptWrapper script, String errorMessage) { handleUnspecifiedScriptError(script, getWriters(script), errorMessage); }
[ "public", "void", "handleFailedScriptInterface", "(", "ScriptWrapper", "script", ",", "String", "errorMessage", ")", "{", "handleUnspecifiedScriptError", "(", "script", ",", "getWriters", "(", "script", ")", ",", "errorMessage", ")", ";", "}" ]
Handles a failed attempt to convert a script into an interface. <p> The given {@code errorMessage} will be written to the writer(s) associated with the given {@code script}, moreover it will be disabled and flagged that has an error. @param script the script that resulted in an exception, must not be {@code null} @par...
[ "Handles", "a", "failed", "attempt", "to", "convert", "a", "script", "into", "an", "interface", ".", "<p", ">", "The", "given", "{", "@code", "errorMessage", "}", "will", "be", "written", "to", "the", "writer", "(", "s", ")", "associated", "with", "the",...
train
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/script/ExtensionScript.java#L1439-L1441
citrusframework/citrus
modules/citrus-ws/src/main/java/com/consol/citrus/ws/validation/AbstractSoapAttachmentValidator.java
AbstractSoapAttachmentValidator.validateAttachmentContentId
protected void validateAttachmentContentId(SoapAttachment receivedAttachment, SoapAttachment controlAttachment) { """ Validating SOAP attachment content id. @param receivedAttachment @param controlAttachment """ //in case contentId was not set in test case, skip validation if (!StringUtils.h...
java
protected void validateAttachmentContentId(SoapAttachment receivedAttachment, SoapAttachment controlAttachment) { //in case contentId was not set in test case, skip validation if (!StringUtils.hasText(controlAttachment.getContentId())) { return; } if (receivedAttachment.getContentId() ...
[ "protected", "void", "validateAttachmentContentId", "(", "SoapAttachment", "receivedAttachment", ",", "SoapAttachment", "controlAttachment", ")", "{", "//in case contentId was not set in test case, skip validation ", "if", "(", "!", "StringUtils", ".", "hasText", "(", "controlA...
Validating SOAP attachment content id. @param receivedAttachment @param controlAttachment
[ "Validating", "SOAP", "attachment", "content", "id", "." ]
train
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-ws/src/main/java/com/consol/citrus/ws/validation/AbstractSoapAttachmentValidator.java#L105-L127
SG-O/miIO
src/main/java/de/sg_o/app/miio/vacuum/Vacuum.java
Vacuum.setFanSpeed
public boolean setFanSpeed(int speed) throws CommandExecutionException { """ Set the vacuums fan speed setting. @param speed The new speed to set. @return True if the command has been received correctly. @throws CommandExecutionException When there has been a error during the communication or the response was i...
java
public boolean setFanSpeed(int speed) throws CommandExecutionException { if (speed < 0 || speed > 100) throw new CommandExecutionException(CommandExecutionException.Error.INVALID_PARAMETERS); JSONArray params = new JSONArray(); params.put(speed); return sendOk("set_custom_mode", params);...
[ "public", "boolean", "setFanSpeed", "(", "int", "speed", ")", "throws", "CommandExecutionException", "{", "if", "(", "speed", "<", "0", "||", "speed", ">", "100", ")", "throw", "new", "CommandExecutionException", "(", "CommandExecutionException", ".", "Error", "...
Set the vacuums fan speed setting. @param speed The new speed to set. @return True if the command has been received correctly. @throws CommandExecutionException When there has been a error during the communication or the response was invalid.
[ "Set", "the", "vacuums", "fan", "speed", "setting", "." ]
train
https://github.com/SG-O/miIO/blob/f352dbd2a699d2cdb1b412ca5e6cbb0c38ca779b/src/main/java/de/sg_o/app/miio/vacuum/Vacuum.java#L178-L183
gallandarakhneorg/afc
core/inputoutput/src/main/java/org/arakhne/afc/inputoutput/xml/XMLUtil.java
XMLUtil.getAttributeValue
@Pure public static String getAttributeValue(Node document, boolean casesSensitive, String... path) { """ Replies the value that corresponds to the specified attribute's path. <p>The path is an ordered list of tag's names and ended by the name of the attribute. @param document is the XML document to explor...
java
@Pure public static String getAttributeValue(Node document, boolean casesSensitive, String... path) { assert document != null : AssertMessages.notNullParameter(0); return getAttributeValue(document, casesSensitive, 0, path); }
[ "@", "Pure", "public", "static", "String", "getAttributeValue", "(", "Node", "document", ",", "boolean", "casesSensitive", ",", "String", "...", "path", ")", "{", "assert", "document", "!=", "null", ":", "AssertMessages", ".", "notNullParameter", "(", "0", ")"...
Replies the value that corresponds to the specified attribute's path. <p>The path is an ordered list of tag's names and ended by the name of the attribute. @param document is the XML document to explore. @param casesSensitive indicates of the {@code path}'s components are case sensitive. @param path is the list of an...
[ "Replies", "the", "value", "that", "corresponds", "to", "the", "specified", "attribute", "s", "path", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/inputoutput/src/main/java/org/arakhne/afc/inputoutput/xml/XMLUtil.java#L1235-L1239
pinterest/secor
src/main/java/com/pinterest/secor/util/ReflectionUtil.java
ReflectionUtil.createFileWriter
public static FileWriter createFileWriter(String className, LogFilePath logFilePath, CompressionCodec codec, SecorConfig config) throws Exception { """ Use the FileReaderWriterFactory specified by className to b...
java
public static FileWriter createFileWriter(String className, LogFilePath logFilePath, CompressionCodec codec, SecorConfig config) throws Exception { return createFileReaderWriterFactory(className, config).Buil...
[ "public", "static", "FileWriter", "createFileWriter", "(", "String", "className", ",", "LogFilePath", "logFilePath", ",", "CompressionCodec", "codec", ",", "SecorConfig", "config", ")", "throws", "Exception", "{", "return", "createFileReaderWriterFactory", "(", "classNa...
Use the FileReaderWriterFactory specified by className to build a FileWriter @param className the class name of a subclass of FileReaderWriterFactory to create a FileWriter from @param logFilePath the LogFilePath that the returned FileWriter should write to @param codec an instance CompressionCodec to compress the fil...
[ "Use", "the", "FileReaderWriterFactory", "specified", "by", "className", "to", "build", "a", "FileWriter" ]
train
https://github.com/pinterest/secor/blob/4099ff061db392f11044e57dedf46c1617895278/src/main/java/com/pinterest/secor/util/ReflectionUtil.java#L152-L157
OpenTSDB/opentsdb
src/uid/UniqueId.java
UniqueId.getName
public String getName(final byte[] id) throws NoSuchUniqueId, HBaseException { """ Finds the name associated with a given ID. <p> <strong>This method is blocking.</strong> Its use within OpenTSDB itself is discouraged, please use {@link #getNameAsync} instead. @param id The ID associated with that name. @see...
java
public String getName(final byte[] id) throws NoSuchUniqueId, HBaseException { try { return getNameAsync(id).joinUninterruptibly(); } catch (RuntimeException e) { throw e; } catch (Exception e) { throw new RuntimeException("Should never be here", e); } }
[ "public", "String", "getName", "(", "final", "byte", "[", "]", "id", ")", "throws", "NoSuchUniqueId", ",", "HBaseException", "{", "try", "{", "return", "getNameAsync", "(", "id", ")", ".", "joinUninterruptibly", "(", ")", ";", "}", "catch", "(", "RuntimeEx...
Finds the name associated with a given ID. <p> <strong>This method is blocking.</strong> Its use within OpenTSDB itself is discouraged, please use {@link #getNameAsync} instead. @param id The ID associated with that name. @see #getId(String) @see #getOrCreateId(String) @throws NoSuchUniqueId if the given ID is not ass...
[ "Finds", "the", "name", "associated", "with", "a", "given", "ID", ".", "<p", ">", "<strong", ">", "This", "method", "is", "blocking", ".", "<", "/", "strong", ">", "Its", "use", "within", "OpenTSDB", "itself", "is", "discouraged", "please", "use", "{" ]
train
https://github.com/OpenTSDB/opentsdb/blob/3fc2d491c3c1ad397252c0a80203a69a3f9e3ef3/src/uid/UniqueId.java#L340-L348
threerings/narya
core/src/main/java/com/threerings/presents/server/InvocationManager.java
InvocationManager.registerDispatcher
public <T extends InvocationMarshaller<?>> T registerDispatcher ( InvocationDispatcher<T> dispatcher) { """ Registers the supplied invocation dispatcher, returning a marshaller that can be used to send requests to the provider for whom the dispatcher is proxying. @param dispatcher the dispatcher to be ...
java
public <T extends InvocationMarshaller<?>> T registerDispatcher ( InvocationDispatcher<T> dispatcher) { return registerDispatcher(dispatcher, null); }
[ "public", "<", "T", "extends", "InvocationMarshaller", "<", "?", ">", ">", "T", "registerDispatcher", "(", "InvocationDispatcher", "<", "T", ">", "dispatcher", ")", "{", "return", "registerDispatcher", "(", "dispatcher", ",", "null", ")", ";", "}" ]
Registers the supplied invocation dispatcher, returning a marshaller that can be used to send requests to the provider for whom the dispatcher is proxying. @param dispatcher the dispatcher to be registered.
[ "Registers", "the", "supplied", "invocation", "dispatcher", "returning", "a", "marshaller", "that", "can", "be", "used", "to", "send", "requests", "to", "the", "provider", "for", "whom", "the", "dispatcher", "is", "proxying", "." ]
train
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/presents/server/InvocationManager.java#L241-L245
lessthanoptimal/BoofCV
main/boofcv-ip/src/main/java/boofcv/alg/transform/ii/DerivativeIntegralImage.java
DerivativeIntegralImage.kernelDerivY
public static IntegralKernel kernelDerivY( int r , IntegralKernel ret ) { """ Creates a kernel for a symmetric box derivative. @param r Radius of the box. width is 2*r+1 @return Kernel Kernel for derivative. """ if( ret == null ) ret = new IntegralKernel(2); ret.blocks[0].set(-r-1,-r-1,r,-1); re...
java
public static IntegralKernel kernelDerivY( int r , IntegralKernel ret ) { if( ret == null ) ret = new IntegralKernel(2); ret.blocks[0].set(-r-1,-r-1,r,-1); ret.blocks[1].set(-r-1,0,r,r); ret.scales[0] = -1; ret.scales[1] = 1; return ret; }
[ "public", "static", "IntegralKernel", "kernelDerivY", "(", "int", "r", ",", "IntegralKernel", "ret", ")", "{", "if", "(", "ret", "==", "null", ")", "ret", "=", "new", "IntegralKernel", "(", "2", ")", ";", "ret", ".", "blocks", "[", "0", "]", ".", "se...
Creates a kernel for a symmetric box derivative. @param r Radius of the box. width is 2*r+1 @return Kernel Kernel for derivative.
[ "Creates", "a", "kernel", "for", "a", "symmetric", "box", "derivative", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/alg/transform/ii/DerivativeIntegralImage.java#L53-L63
ReactiveX/RxJavaComputationExpressions
src/main/java/rx/Statement.java
Statement.ifThen
public static <R> Observable<R> ifThen(Func0<Boolean> condition, Observable<? extends R> then, Scheduler scheduler) { """ Return an Observable that emits the emissions from a specified Observable if a condition evaluates to true, otherwise return an empty Observable that runs on a specified Scheduler. <p> <img...
java
public static <R> Observable<R> ifThen(Func0<Boolean> condition, Observable<? extends R> then, Scheduler scheduler) { return ifThen(condition, then, Observable.<R> empty().subscribeOn(scheduler)); }
[ "public", "static", "<", "R", ">", "Observable", "<", "R", ">", "ifThen", "(", "Func0", "<", "Boolean", ">", "condition", ",", "Observable", "<", "?", "extends", "R", ">", "then", ",", "Scheduler", "scheduler", ")", "{", "return", "ifThen", "(", "condi...
Return an Observable that emits the emissions from a specified Observable if a condition evaluates to true, otherwise return an empty Observable that runs on a specified Scheduler. <p> <img width="640" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/ifThen.s.png" alt=""> @param <R> the result val...
[ "Return", "an", "Observable", "that", "emits", "the", "emissions", "from", "a", "specified", "Observable", "if", "a", "condition", "evaluates", "to", "true", "otherwise", "return", "an", "empty", "Observable", "that", "runs", "on", "a", "specified", "Scheduler",...
train
https://github.com/ReactiveX/RxJavaComputationExpressions/blob/f9d04ab762223b36fad47402ac36ce7969320d69/src/main/java/rx/Statement.java#L181-L183
hector-client/hector
core/src/main/java/me/prettyprint/cassandra/service/template/ColumnFamilyTemplate.java
ColumnFamilyTemplate.queryColumns
public <T> T queryColumns(K key, HSlicePredicate<N> predicate, ColumnFamilyRowMapper<K, N, T> mapper) { """ Queries a range of columns at the given key and maps them to an object of type OBJ using the given mapping object @param <T> @param key @param predicate The {@link HSlicePredicate} which can hold...
java
public <T> T queryColumns(K key, HSlicePredicate<N> predicate, ColumnFamilyRowMapper<K, N, T> mapper) { return doExecuteSlice(key, predicate, mapper); }
[ "public", "<", "T", ">", "T", "queryColumns", "(", "K", "key", ",", "HSlicePredicate", "<", "N", ">", "predicate", ",", "ColumnFamilyRowMapper", "<", "K", ",", "N", ",", "T", ">", "mapper", ")", "{", "return", "doExecuteSlice", "(", "key", ",", "predic...
Queries a range of columns at the given key and maps them to an object of type OBJ using the given mapping object @param <T> @param key @param predicate The {@link HSlicePredicate} which can hold specific column names or a range of columns @param mapper @return
[ "Queries", "a", "range", "of", "columns", "at", "the", "given", "key", "and", "maps", "them", "to", "an", "object", "of", "type", "OBJ", "using", "the", "given", "mapping", "object" ]
train
https://github.com/hector-client/hector/blob/a302e68ca8d91b45d332e8c9afd7d98030b54de1/core/src/main/java/me/prettyprint/cassandra/service/template/ColumnFamilyTemplate.java#L135-L138
jeremylong/DependencyCheck
core/src/main/java/org/owasp/dependencycheck/data/cwe/App.java
App.serializeCweData
private static void serializeCweData(Map<String, String> cwe, File out) { """ Writes the map of CWE data to disk. @param cwe the CWE data @param out the file output location """ try (FileOutputStream fout = new FileOutputStream(out); ObjectOutputStream objOut = new ObjectOutputStrea...
java
private static void serializeCweData(Map<String, String> cwe, File out) { try (FileOutputStream fout = new FileOutputStream(out); ObjectOutputStream objOut = new ObjectOutputStream(fout);) { System.out.println("Writing " + cwe.size() + " cwe entries."); objOut.writeObject...
[ "private", "static", "void", "serializeCweData", "(", "Map", "<", "String", ",", "String", ">", "cwe", ",", "File", "out", ")", "{", "try", "(", "FileOutputStream", "fout", "=", "new", "FileOutputStream", "(", "out", ")", ";", "ObjectOutputStream", "objOut",...
Writes the map of CWE data to disk. @param cwe the CWE data @param out the file output location
[ "Writes", "the", "map", "of", "CWE", "data", "to", "disk", "." ]
train
https://github.com/jeremylong/DependencyCheck/blob/6cc7690ea12e4ca1454210ceaa2e9a5523f0926c/core/src/main/java/org/owasp/dependencycheck/data/cwe/App.java#L101-L111
mangstadt/biweekly
src/main/java/biweekly/io/scribe/property/ICalPropertyScribe.java
ICalPropertyScribe._writeXml
protected void _writeXml(T property, XCalElement element, WriteContext context) { """ <p> Marshals a property's value to an XML element (xCal). </p> <p> This method should be overridden by child classes that wish to support xCal. The default implementation of this method will append one child element to the ...
java
protected void _writeXml(T property, XCalElement element, WriteContext context) { String value = writeText(property, context); ICalDataType dataType = dataType(property, ICalVersion.V2_0); element.append(dataType, value); }
[ "protected", "void", "_writeXml", "(", "T", "property", ",", "XCalElement", "element", ",", "WriteContext", "context", ")", "{", "String", "value", "=", "writeText", "(", "property", ",", "context", ")", ";", "ICalDataType", "dataType", "=", "dataType", "(", ...
<p> Marshals a property's value to an XML element (xCal). </p> <p> This method should be overridden by child classes that wish to support xCal. The default implementation of this method will append one child element to the property's XML element. The child element's name will be that of the property's data type (retrie...
[ "<p", ">", "Marshals", "a", "property", "s", "value", "to", "an", "XML", "element", "(", "xCal", ")", ".", "<", "/", "p", ">", "<p", ">", "This", "method", "should", "be", "overridden", "by", "child", "classes", "that", "wish", "to", "support", "xCal...
train
https://github.com/mangstadt/biweekly/blob/2e21350f85c13dfff52fdef98fdbebe2976fcf61/src/main/java/biweekly/io/scribe/property/ICalPropertyScribe.java#L372-L376
alkacon/opencms-core
src/org/opencms/db/CmsSecurityManager.java
CmsSecurityManager.writeAccessControlEntry
public void writeAccessControlEntry(CmsRequestContext context, CmsResource resource, CmsAccessControlEntry ace) throws CmsException, CmsSecurityException { """ Writes an access control entries to a given resource.<p> @param context the current request context @param resource the resource @param ace the en...
java
public void writeAccessControlEntry(CmsRequestContext context, CmsResource resource, CmsAccessControlEntry ace) throws CmsException, CmsSecurityException { CmsDbContext dbc = m_dbContextFactory.getDbContext(context); try { checkOfflineProject(dbc); checkPermissions(dbc, reso...
[ "public", "void", "writeAccessControlEntry", "(", "CmsRequestContext", "context", ",", "CmsResource", "resource", ",", "CmsAccessControlEntry", "ace", ")", "throws", "CmsException", ",", "CmsSecurityException", "{", "CmsDbContext", "dbc", "=", "m_dbContextFactory", ".", ...
Writes an access control entries to a given resource.<p> @param context the current request context @param resource the resource @param ace the entry to write @throws CmsSecurityException if the user has insufficient permission for the given resource ({@link CmsPermissionSet#ACCESS_CONTROL} required) @throws CmsExcep...
[ "Writes", "an", "access", "control", "entries", "to", "a", "given", "resource", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsSecurityManager.java#L6593-L6613
gwtplus/google-gin
src/main/java/com/google/gwt/inject/rebind/resolution/BindingInstaller.java
BindingInstaller.ensureAccessible
private void ensureAccessible(Key<?> key, GinjectorBindings parent, GinjectorBindings child) { """ Ensure that the binding for key which exists in the parent Ginjector is also available to the child Ginjector. """ // Parent will be null if it is was an optional dependency and it couldn't be created. i...
java
private void ensureAccessible(Key<?> key, GinjectorBindings parent, GinjectorBindings child) { // Parent will be null if it is was an optional dependency and it couldn't be created. if (parent != null && !child.equals(parent) && !child.isBound(key)) { PrettyPrinter.log(logger, TreeLogger.DEBUG, ...
[ "private", "void", "ensureAccessible", "(", "Key", "<", "?", ">", "key", ",", "GinjectorBindings", "parent", ",", "GinjectorBindings", "child", ")", "{", "// Parent will be null if it is was an optional dependency and it couldn't be created.", "if", "(", "parent", "!=", "...
Ensure that the binding for key which exists in the parent Ginjector is also available to the child Ginjector.
[ "Ensure", "that", "the", "binding", "for", "key", "which", "exists", "in", "the", "parent", "Ginjector", "is", "also", "available", "to", "the", "child", "Ginjector", "." ]
train
https://github.com/gwtplus/google-gin/blob/595e61ee0d2fa508815c016e924ec0e5cea2a2aa/src/main/java/com/google/gwt/inject/rebind/resolution/BindingInstaller.java#L116-L127
google/jimfs
jimfs/src/main/java/com/google/common/jimfs/FileSystemView.java
FileSystemView.getFileAttributeView
@Nullable public <V extends FileAttributeView> V getFileAttributeView(FileLookup lookup, Class<V> type) { """ Returns a file attribute view using the given lookup callback. """ return store.getFileAttributeView(lookup, type); }
java
@Nullable public <V extends FileAttributeView> V getFileAttributeView(FileLookup lookup, Class<V> type) { return store.getFileAttributeView(lookup, type); }
[ "@", "Nullable", "public", "<", "V", "extends", "FileAttributeView", ">", "V", "getFileAttributeView", "(", "FileLookup", "lookup", ",", "Class", "<", "V", ">", "type", ")", "{", "return", "store", ".", "getFileAttributeView", "(", "lookup", ",", "type", ")"...
Returns a file attribute view using the given lookup callback.
[ "Returns", "a", "file", "attribute", "view", "using", "the", "given", "lookup", "callback", "." ]
train
https://github.com/google/jimfs/blob/3eadff747a3afa7b498030f420d2d04ce700534a/jimfs/src/main/java/com/google/common/jimfs/FileSystemView.java#L695-L698
apereo/cas
support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/web/response/accesstoken/OAuth20DefaultTokenGenerator.java
OAuth20DefaultTokenGenerator.generateAccessTokenOAuthDeviceCodeResponseType
protected OAuth20TokenGeneratedResult generateAccessTokenOAuthDeviceCodeResponseType(final AccessTokenRequestDataHolder holder) { """ Generate access token OAuth device code response type OAuth token generated result. @param holder the holder @return the OAuth token generated result """ val deviceC...
java
protected OAuth20TokenGeneratedResult generateAccessTokenOAuthDeviceCodeResponseType(final AccessTokenRequestDataHolder holder) { val deviceCode = holder.getDeviceCode(); if (StringUtils.isNotBlank(deviceCode)) { val deviceCodeTicket = getDeviceTokenFromTicketRegistry(deviceCode); ...
[ "protected", "OAuth20TokenGeneratedResult", "generateAccessTokenOAuthDeviceCodeResponseType", "(", "final", "AccessTokenRequestDataHolder", "holder", ")", "{", "val", "deviceCode", "=", "holder", ".", "getDeviceCode", "(", ")", ";", "if", "(", "StringUtils", ".", "isNotBl...
Generate access token OAuth device code response type OAuth token generated result. @param holder the holder @return the OAuth token generated result
[ "Generate", "access", "token", "OAuth", "device", "code", "response", "type", "OAuth", "token", "generated", "result", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/web/response/accesstoken/OAuth20DefaultTokenGenerator.java#L86-L133
citrusframework/citrus
modules/citrus-ws/src/main/java/com/consol/citrus/ws/addressing/WsAddressingHeaders.java
WsAddressingHeaders.setReplyTo
public void setReplyTo(String replyTo) { """ Sets the reply to endpoint reference by string. @param replyTo the replyTo to set """ try { this.replyTo = new EndpointReference(new URI(replyTo)); } catch (URISyntaxException e) { throw new CitrusRuntimeException("Invalid re...
java
public void setReplyTo(String replyTo) { try { this.replyTo = new EndpointReference(new URI(replyTo)); } catch (URISyntaxException e) { throw new CitrusRuntimeException("Invalid replyTo uri", e); } }
[ "public", "void", "setReplyTo", "(", "String", "replyTo", ")", "{", "try", "{", "this", ".", "replyTo", "=", "new", "EndpointReference", "(", "new", "URI", "(", "replyTo", ")", ")", ";", "}", "catch", "(", "URISyntaxException", "e", ")", "{", "throw", ...
Sets the reply to endpoint reference by string. @param replyTo the replyTo to set
[ "Sets", "the", "reply", "to", "endpoint", "reference", "by", "string", "." ]
train
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-ws/src/main/java/com/consol/citrus/ws/addressing/WsAddressingHeaders.java#L202-L208
google/j2objc
jre_emul/android/frameworks/base/core/java/android/util/LruCache.java
LruCache.put
public final V put(K key, V value) { """ Caches {@code value} for {@code key}. The value is moved to the head of the queue. @return the previous value mapped by {@code key}. """ if (key == null || value == null) { throw new NullPointerException("key == null || value == null"); }...
java
public final V put(K key, V value) { if (key == null || value == null) { throw new NullPointerException("key == null || value == null"); } V previous; synchronized (this) { putCount++; size += safeSizeOf(key, value); previous = map.put(key...
[ "public", "final", "V", "put", "(", "K", "key", ",", "V", "value", ")", "{", "if", "(", "key", "==", "null", "||", "value", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", "\"key == null || value == null\"", ")", ";", "}", "V", "pr...
Caches {@code value} for {@code key}. The value is moved to the head of the queue. @return the previous value mapped by {@code key}.
[ "Caches", "{", "@code", "value", "}", "for", "{", "@code", "key", "}", ".", "The", "value", "is", "moved", "to", "the", "head", "of", "the", "queue", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/frameworks/base/core/java/android/util/LruCache.java#L165-L186
alkacon/opencms-core
src/org/opencms/db/CmsDriverManager.java
CmsDriverManager.readGroup
public CmsGroup readGroup(CmsDbContext dbc, CmsUUID groupId) throws CmsException { """ Reads a group based on its id.<p> @param dbc the current database context @param groupId the id of the group that is to be read @return the requested group @throws CmsException if operation was not successful """ ...
java
public CmsGroup readGroup(CmsDbContext dbc, CmsUUID groupId) throws CmsException { CmsGroup group = null; // try to read group from cache group = m_monitor.getCachedGroup(groupId.toString()); if (group == null) { group = getUserDriver(dbc).readGroup(dbc, groupId); ...
[ "public", "CmsGroup", "readGroup", "(", "CmsDbContext", "dbc", ",", "CmsUUID", "groupId", ")", "throws", "CmsException", "{", "CmsGroup", "group", "=", "null", ";", "// try to read group from cache", "group", "=", "m_monitor", ".", "getCachedGroup", "(", "groupId", ...
Reads a group based on its id.<p> @param dbc the current database context @param groupId the id of the group that is to be read @return the requested group @throws CmsException if operation was not successful
[ "Reads", "a", "group", "based", "on", "its", "id", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsDriverManager.java#L6905-L6915
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/plugins/JarPluginProviderLoader.java
JarPluginProviderLoader.matchesProviderDeclaration
static boolean matchesProviderDeclaration(final ProviderIdent ident, final Class<?> cls) throws PluginException { """ Return true if the ident matches the Plugin annotation for the class """ final Plugin annotation = getPluginMetadata(cls); return ident.getFirst().equals(annotation.service()) &...
java
static boolean matchesProviderDeclaration(final ProviderIdent ident, final Class<?> cls) throws PluginException { final Plugin annotation = getPluginMetadata(cls); return ident.getFirst().equals(annotation.service()) && ident.getSecond().equals(annotation.name()); }
[ "static", "boolean", "matchesProviderDeclaration", "(", "final", "ProviderIdent", "ident", ",", "final", "Class", "<", "?", ">", "cls", ")", "throws", "PluginException", "{", "final", "Plugin", "annotation", "=", "getPluginMetadata", "(", "cls", ")", ";", "retur...
Return true if the ident matches the Plugin annotation for the class
[ "Return", "true", "if", "the", "ident", "matches", "the", "Plugin", "annotation", "for", "the", "class" ]
train
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/plugins/JarPluginProviderLoader.java#L204-L207
GenesysPureEngage/authentication-client-java
src/main/java/com/genesys/internal/authentication/api/AuthenticationApi.java
AuthenticationApi.authorizeWithHttpInfo
public ApiResponse<Void> authorizeWithHttpInfo(String clientId, String redirectUri, String responseType, String authorization, Boolean hideTenant, String scope) throws ApiException { """ Perform authorization Perform authorization based on the code grant type &amp;mdash; either Authorization Code Grant or Implici...
java
public ApiResponse<Void> authorizeWithHttpInfo(String clientId, String redirectUri, String responseType, String authorization, Boolean hideTenant, String scope) throws ApiException { com.squareup.okhttp.Call call = authorizeValidateBeforeCall(clientId, redirectUri, responseType, authorization, hideTenant, scope...
[ "public", "ApiResponse", "<", "Void", ">", "authorizeWithHttpInfo", "(", "String", "clientId", ",", "String", "redirectUri", ",", "String", "responseType", ",", "String", "authorization", ",", "Boolean", "hideTenant", ",", "String", "scope", ")", "throws", "ApiExc...
Perform authorization Perform authorization based on the code grant type &amp;mdash; either Authorization Code Grant or Implicit Grant. For more information, see [Authorization Endpoint](https://tools.ietf.org/html/rfc6749#section-3.1). **Note:** For the optional **scope** parameter, the Authentication API supports onl...
[ "Perform", "authorization", "Perform", "authorization", "based", "on", "the", "code", "grant", "type", "&amp", ";", "mdash", ";", "either", "Authorization", "Code", "Grant", "or", "Implicit", "Grant", ".", "For", "more", "information", "see", "[", "Authorization...
train
https://github.com/GenesysPureEngage/authentication-client-java/blob/eb0d58343ee42ebd3c037163c1137f611dfcbb3a/src/main/java/com/genesys/internal/authentication/api/AuthenticationApi.java#L180-L183
k3po/k3po
driver/src/main/java/org/kaazing/k3po/driver/internal/behavior/handler/codec/http/QueryStringEncoder.java
QueryStringEncoder.addParam
public void addParam(String name, String value) { """ Adds a parameter with the specified name and value to this encoder. """ if (name == null) { throw new NullPointerException("name"); } if (value == null) { throw new NullPointerException("value"); } ...
java
public void addParam(String name, String value) { if (name == null) { throw new NullPointerException("name"); } if (value == null) { throw new NullPointerException("value"); } params.add(new Param(name, value)); }
[ "public", "void", "addParam", "(", "String", "name", ",", "String", "value", ")", "{", "if", "(", "name", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", "\"name\"", ")", ";", "}", "if", "(", "value", "==", "null", ")", "{", "thr...
Adds a parameter with the specified name and value to this encoder.
[ "Adds", "a", "parameter", "with", "the", "specified", "name", "and", "value", "to", "this", "encoder", "." ]
train
https://github.com/k3po/k3po/blob/3ca4fd31ab4a397893aa640c62ada0e485c8bbd4/driver/src/main/java/org/kaazing/k3po/driver/internal/behavior/handler/codec/http/QueryStringEncoder.java#L106-L114
netscaler/sdx_nitro
src/main/java/com/citrix/sdx/nitro/resource/base/base_resource.java
base_resource.get_resources
protected base_resource[] get_resources(nitro_service service, options option) throws Exception { """ Use this method to perform a get operation on MPS resource. @param service nitro_service object. @param option options class object. @return Array of API resources of specified type. @throws Exception API exce...
java
protected base_resource[] get_resources(nitro_service service, options option) throws Exception { if (!service.isLogin()) service.login(); String response = _get(service, option); return get_nitro_response(service, response); }
[ "protected", "base_resource", "[", "]", "get_resources", "(", "nitro_service", "service", ",", "options", "option", ")", "throws", "Exception", "{", "if", "(", "!", "service", ".", "isLogin", "(", ")", ")", "service", ".", "login", "(", ")", ";", "String",...
Use this method to perform a get operation on MPS resource. @param service nitro_service object. @param option options class object. @return Array of API resources of specified type. @throws Exception API exception is thrown.
[ "Use", "this", "method", "to", "perform", "a", "get", "operation", "on", "MPS", "resource", "." ]
train
https://github.com/netscaler/sdx_nitro/blob/c840919f1a8f7c0a5634c0f23d34fa14d1765ff1/src/main/java/com/citrix/sdx/nitro/resource/base/base_resource.java#L106-L112
nabedge/mixer2
src/main/java/org/mixer2/xhtml/AbstractJaxb.java
AbstractJaxb.setStyleByTreeMap
public <T extends AbstractJaxb> void setStyleByTreeMap( TreeMap<String, String> styleMap) { """ <p> write style attribute by TreeMap </p> <pre> // usage: TreeMap&lt;String, String&gt; styleMap = new TreeMap&lt;String, String&gt;(); styleMap.put(&quot;border-color&quot;, &quot;red&quot;); html....
java
public <T extends AbstractJaxb> void setStyleByTreeMap( TreeMap<String, String> styleMap) { String str = ""; for (String key : styleMap.keySet()) { str += key + ":" + styleMap.get(key) + "; "; } this.setStyle(str); }
[ "public", "<", "T", "extends", "AbstractJaxb", ">", "void", "setStyleByTreeMap", "(", "TreeMap", "<", "String", ",", "String", ">", "styleMap", ")", "{", "String", "str", "=", "\"\"", ";", "for", "(", "String", "key", ":", "styleMap", ".", "keySet", "(",...
<p> write style attribute by TreeMap </p> <pre> // usage: TreeMap&lt;String, String&gt; styleMap = new TreeMap&lt;String, String&gt;(); styleMap.put(&quot;border-color&quot;, &quot;red&quot;); html.getById(Div.class, &quot;hellomsg&quot;).setStyleByTreeMap(styleMap); // output: // &lt;div id=&quot;hellomsg&quot; style...
[ "<p", ">", "write", "style", "attribute", "by", "TreeMap", "<", "/", "p", ">" ]
train
https://github.com/nabedge/mixer2/blob/8c2db27cfcd65bf0b1e0242ef9362ebd8033777c/src/main/java/org/mixer2/xhtml/AbstractJaxb.java#L551-L558
apache/incubator-shardingsphere
sharding-core/sharding-core-merge/src/main/java/org/apache/shardingsphere/core/merge/MergeEngineFactory.java
MergeEngineFactory.newInstance
public static MergeEngine newInstance(final DatabaseType databaseType, final ShardingRule shardingRule, final SQLRouteResult routeResult, final ShardingTableMetaData shardingTableMetaData, final List<QueryResult> queryResults) throws SQLException { """ Create merge engine ...
java
public static MergeEngine newInstance(final DatabaseType databaseType, final ShardingRule shardingRule, final SQLRouteResult routeResult, final ShardingTableMetaData shardingTableMetaData, final List<QueryResult> queryResults) throws SQLException { if (routeResult.getSq...
[ "public", "static", "MergeEngine", "newInstance", "(", "final", "DatabaseType", "databaseType", ",", "final", "ShardingRule", "shardingRule", ",", "final", "SQLRouteResult", "routeResult", ",", "final", "ShardingTableMetaData", "shardingTableMetaData", ",", "final", "List...
Create merge engine instance. @param databaseType database type @param shardingRule sharding rule @param routeResult SQL route result @param shardingTableMetaData sharding table meta Data @param queryResults query results @return merge engine instance @throws SQLException SQL exception
[ "Create", "merge", "engine", "instance", "." ]
train
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-merge/src/main/java/org/apache/shardingsphere/core/merge/MergeEngineFactory.java#L55-L64
Samsung/GearVRf
GVRf/Extensions/script/src/main/java/org/gearvrf/script/GVRScriptManager.java
GVRScriptManager.bindBundleToSceneObject
public void bindBundleToSceneObject(GVRScriptBundle scriptBundle, GVRSceneObject rootSceneObject) throws IOException, GVRScriptException { """ Binds a script bundle to scene graph rooted at a scene object. @param scriptBundle The {@code GVRScriptBundle} object containing script binding information. ...
java
public void bindBundleToSceneObject(GVRScriptBundle scriptBundle, GVRSceneObject rootSceneObject) throws IOException, GVRScriptException { bindHelper(scriptBundle, rootSceneObject, BIND_MASK_SCENE_OBJECTS); }
[ "public", "void", "bindBundleToSceneObject", "(", "GVRScriptBundle", "scriptBundle", ",", "GVRSceneObject", "rootSceneObject", ")", "throws", "IOException", ",", "GVRScriptException", "{", "bindHelper", "(", "scriptBundle", ",", "rootSceneObject", ",", "BIND_MASK_SCENE_OBJE...
Binds a script bundle to scene graph rooted at a scene object. @param scriptBundle The {@code GVRScriptBundle} object containing script binding information. @param rootSceneObject The root of the scene object tree to which the scripts are bound. @throws IOException if script bundle file cannot be read. @throws GVRScrip...
[ "Binds", "a", "script", "bundle", "to", "scene", "graph", "rooted", "at", "a", "scene", "object", "." ]
train
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/script/src/main/java/org/gearvrf/script/GVRScriptManager.java#L328-L332
JodaOrg/joda-time
src/main/java/org/joda/time/tz/DateTimeZoneBuilder.java
DateTimeZoneBuilder.readFrom
public static DateTimeZone readFrom(InputStream in, String id) throws IOException { """ Decodes a built DateTimeZone from the given stream, as encoded by writeTo. @param in input stream to read encoded DateTimeZone from. @param id time zone id to assign """ if (in instanceof DataInput) { ...
java
public static DateTimeZone readFrom(InputStream in, String id) throws IOException { if (in instanceof DataInput) { return readFrom((DataInput)in, id); } else { return readFrom((DataInput)new DataInputStream(in), id); } }
[ "public", "static", "DateTimeZone", "readFrom", "(", "InputStream", "in", ",", "String", "id", ")", "throws", "IOException", "{", "if", "(", "in", "instanceof", "DataInput", ")", "{", "return", "readFrom", "(", "(", "DataInput", ")", "in", ",", "id", ")", ...
Decodes a built DateTimeZone from the given stream, as encoded by writeTo. @param in input stream to read encoded DateTimeZone from. @param id time zone id to assign
[ "Decodes", "a", "built", "DateTimeZone", "from", "the", "given", "stream", "as", "encoded", "by", "writeTo", "." ]
train
https://github.com/JodaOrg/joda-time/blob/bd79f1c4245e79b3c2c56d7b04fde2a6e191fa42/src/main/java/org/joda/time/tz/DateTimeZoneBuilder.java#L95-L101
lievendoclo/Valkyrie-RCP
valkyrie-rcp-core/src/main/java/org/valkyriercp/component/DefaultHyperlinkActivationHandler.java
DefaultHyperlinkActivationHandler.handleAnchorActivated
protected void handleAnchorActivated(HyperlinkEvent e, String anchor) { """ Called when the user clicks on an anchor e.g. <br> &lt;a href=&quot;#top&quot;&gt;Go to Top&lt;/a&gt;. <p> This default implementation will scroll the source pane so that the anchor target becomes visible. """ ((JTextPane)e...
java
protected void handleAnchorActivated(HyperlinkEvent e, String anchor) { ((JTextPane)e.getSource()).scrollToReference(anchor); }
[ "protected", "void", "handleAnchorActivated", "(", "HyperlinkEvent", "e", ",", "String", "anchor", ")", "{", "(", "(", "JTextPane", ")", "e", ".", "getSource", "(", ")", ")", ".", "scrollToReference", "(", "anchor", ")", ";", "}" ]
Called when the user clicks on an anchor e.g. <br> &lt;a href=&quot;#top&quot;&gt;Go to Top&lt;/a&gt;. <p> This default implementation will scroll the source pane so that the anchor target becomes visible.
[ "Called", "when", "the", "user", "clicks", "on", "an", "anchor", "e", ".", "g", ".", "<br", ">", "&lt", ";", "a", "href", "=", "&quot", ";", "#top&quot", ";", "&gt", ";", "Go", "to", "Top&lt", ";", "/", "a&gt", ";", ".", "<p", ">", "This", "def...
train
https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/component/DefaultHyperlinkActivationHandler.java#L42-L44
ManfredTremmel/gwt-bean-validators
mt-bean-validators/src/main/java/de/knightsoftnet/validators/shared/util/IbanUtil.java
IbanUtil.getBicOfIban
public static String getBicOfIban(final String pstring) { """ get bic of iban. @param pstring string with iban @return bic """ final String country = StringUtils.substring(pstring, 0, 2); final String bankNumber = getBankNumberOfIban(pstring); return BANK_ACCOINT_BIC_MAP.bankAccounts().get(new ...
java
public static String getBicOfIban(final String pstring) { final String country = StringUtils.substring(pstring, 0, 2); final String bankNumber = getBankNumberOfIban(pstring); return BANK_ACCOINT_BIC_MAP.bankAccounts().get(new CountryBankAccountData(country, bankNumber)); }
[ "public", "static", "String", "getBicOfIban", "(", "final", "String", "pstring", ")", "{", "final", "String", "country", "=", "StringUtils", ".", "substring", "(", "pstring", ",", "0", ",", "2", ")", ";", "final", "String", "bankNumber", "=", "getBankNumberO...
get bic of iban. @param pstring string with iban @return bic
[ "get", "bic", "of", "iban", "." ]
train
https://github.com/ManfredTremmel/gwt-bean-validators/blob/cff7a2c3d68c2d17bf9d3cc57c79cc16fa8b4d5c/mt-bean-validators/src/main/java/de/knightsoftnet/validators/shared/util/IbanUtil.java#L153-L157
Azure/azure-sdk-for-java
policyinsights/resource-manager/v2018_04_04/src/main/java/com/microsoft/azure/management/policyinsights/v2018_04_04/implementation/PolicyStatesInner.java
PolicyStatesInner.listQueryResultsForManagementGroup
public PolicyStatesQueryResultsInner listQueryResultsForManagementGroup(PolicyStatesResource policyStatesResource, String managementGroupName) { """ Queries policy states for the resources under the management group. @param policyStatesResource The virtual resource under PolicyStates resource type. In a given t...
java
public PolicyStatesQueryResultsInner listQueryResultsForManagementGroup(PolicyStatesResource policyStatesResource, String managementGroupName) { return listQueryResultsForManagementGroupWithServiceResponseAsync(policyStatesResource, managementGroupName).toBlocking().single().body(); }
[ "public", "PolicyStatesQueryResultsInner", "listQueryResultsForManagementGroup", "(", "PolicyStatesResource", "policyStatesResource", ",", "String", "managementGroupName", ")", "{", "return", "listQueryResultsForManagementGroupWithServiceResponseAsync", "(", "policyStatesResource", ","...
Queries policy states for the resources under the management group. @param policyStatesResource The virtual resource under PolicyStates resource type. In a given time range, 'latest' represents the latest policy state(s), whereas 'default' represents all policy state(s). Possible values include: 'default', 'latest' @p...
[ "Queries", "policy", "states", "for", "the", "resources", "under", "the", "management", "group", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/policyinsights/resource-manager/v2018_04_04/src/main/java/com/microsoft/azure/management/policyinsights/v2018_04_04/implementation/PolicyStatesInner.java#L139-L141
Jasig/uPortal
uPortal-spring/src/main/java/org/springframework/context/support/PortalPropertySourcesPlaceholderConfigurer.java
PortalPropertySourcesPlaceholderConfigurer.postProcessBeanFactory
@Override public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException { """ Override the postProcessing. The default PropertySourcesPlaceholderConfigurer does not inject local properties into the Environment object. It builds a local list of properties fil...
java
@Override public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException { if (propertyResolver == null) { try { MutablePropertySources sources = new MutablePropertySources(); PropertySource<?> localPropertySource...
[ "@", "Override", "public", "void", "postProcessBeanFactory", "(", "ConfigurableListableBeanFactory", "beanFactory", ")", "throws", "BeansException", "{", "if", "(", "propertyResolver", "==", "null", ")", "{", "try", "{", "MutablePropertySources", "sources", "=", "new"...
Override the postProcessing. The default PropertySourcesPlaceholderConfigurer does not inject local properties into the Environment object. It builds a local list of properties files and then uses a transient Resolver to resolve the @Value annotations. That means that you are unable to get to "local" properties (eg. po...
[ "Override", "the", "postProcessing", ".", "The", "default", "PropertySourcesPlaceholderConfigurer", "does", "not", "inject", "local", "properties", "into", "the", "Environment", "object", ".", "It", "builds", "a", "local", "list", "of", "properties", "files", "and",...
train
https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-spring/src/main/java/org/springframework/context/support/PortalPropertySourcesPlaceholderConfigurer.java#L113-L131
knowm/XChange
xchange-core/src/main/java/org/knowm/xchange/utils/DateUtils.java
DateUtils.fromRfc3339DateString
public static Date fromRfc3339DateString(String rfc3339FormattedDate) throws InvalidFormatException { """ Converts an RFC3339 formatted Date String to a Java Date RFC3339 format: yyyy-MM-dd HH:mm:ss @param rfc3339FormattedDate RFC3339 formatted Date @return an {@link Date} object @throws InvalidFormatEx...
java
public static Date fromRfc3339DateString(String rfc3339FormattedDate) throws InvalidFormatException { SimpleDateFormat rfc3339DateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); try { return rfc3339DateFormat.parse(rfc3339FormattedDate); } catch (ParseException e) { throw new Invali...
[ "public", "static", "Date", "fromRfc3339DateString", "(", "String", "rfc3339FormattedDate", ")", "throws", "InvalidFormatException", "{", "SimpleDateFormat", "rfc3339DateFormat", "=", "new", "SimpleDateFormat", "(", "\"yyyy-MM-dd HH:mm:ss\"", ")", ";", "try", "{", "return...
Converts an RFC3339 formatted Date String to a Java Date RFC3339 format: yyyy-MM-dd HH:mm:ss @param rfc3339FormattedDate RFC3339 formatted Date @return an {@link Date} object @throws InvalidFormatException the RFC3339 formatted Date is invalid or cannot be parsed. @see <a href="https://tools.ietf.org/html/rfc3339">The...
[ "Converts", "an", "RFC3339", "formatted", "Date", "String", "to", "a", "Java", "Date", "RFC3339", "format", ":", "yyyy", "-", "MM", "-", "dd", "HH", ":", "mm", ":", "ss" ]
train
https://github.com/knowm/XChange/blob/e45f437ac8e0b89cd66cdcb3258bdb1bf3d88186/xchange-core/src/main/java/org/knowm/xchange/utils/DateUtils.java#L115-L124
trellis-ldp/trellis
components/triplestore/src/main/java/org/trellisldp/triplestore/TriplestoreResource.java
TriplestoreResource.findResource
public static CompletableFuture<Resource> findResource(final RDFConnection rdfConnection, final IRI identifier) { """ Try to load a Trellis resource. @implSpec This method will load a {@link Resource}, initializing the object with all resource metadata used with {@link #getModified}, {@link #getInteractionMode...
java
public static CompletableFuture<Resource> findResource(final RDFConnection rdfConnection, final IRI identifier) { return supplyAsync(() -> { final TriplestoreResource res = new TriplestoreResource(rdfConnection, identifier); res.fetchData(); if (!res.exists()) { ...
[ "public", "static", "CompletableFuture", "<", "Resource", ">", "findResource", "(", "final", "RDFConnection", "rdfConnection", ",", "final", "IRI", "identifier", ")", "{", "return", "supplyAsync", "(", "(", ")", "->", "{", "final", "TriplestoreResource", "res", ...
Try to load a Trellis resource. @implSpec This method will load a {@link Resource}, initializing the object with all resource metadata used with {@link #getModified}, {@link #getInteractionModel} and other data fetched by the accessors. The resource content is fetched on demand via the {@link #stream} method. @param r...
[ "Try", "to", "load", "a", "Trellis", "resource", "." ]
train
https://github.com/trellis-ldp/trellis/blob/789fd7a3df86cab7ebba63e72bf4e58397e5f42d/components/triplestore/src/main/java/org/trellisldp/triplestore/TriplestoreResource.java#L103-L114
apache/groovy
src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java
DefaultGroovyMethods.takeWhile
public static <T> List<T> takeWhile(List<T> self, @ClosureParams(FirstParam.FirstGenericType.class) Closure condition) { """ Returns the longest prefix of this list where each element passed to the given closure condition evaluates to true. Similar to {@link #takeWhile(Iterable, groovy.lang.Closure)} except tha...
java
public static <T> List<T> takeWhile(List<T> self, @ClosureParams(FirstParam.FirstGenericType.class) Closure condition) { int num = 0; BooleanClosureWrapper bcw = new BooleanClosureWrapper(condition); for (T value : self) { if (bcw.call(value)) { num += 1; ...
[ "public", "static", "<", "T", ">", "List", "<", "T", ">", "takeWhile", "(", "List", "<", "T", ">", "self", ",", "@", "ClosureParams", "(", "FirstParam", ".", "FirstGenericType", ".", "class", ")", "Closure", "condition", ")", "{", "int", "num", "=", ...
Returns the longest prefix of this list where each element passed to the given closure condition evaluates to true. Similar to {@link #takeWhile(Iterable, groovy.lang.Closure)} except that it attempts to preserve the type of the original list. <pre class="groovyTestCase"> def nums = [ 1, 3, 2 ] assert nums.takeWhile{ i...
[ "Returns", "the", "longest", "prefix", "of", "this", "list", "where", "each", "element", "passed", "to", "the", "given", "closure", "condition", "evaluates", "to", "true", ".", "Similar", "to", "{", "@link", "#takeWhile", "(", "Iterable", "groovy", ".", "lan...
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java#L10885-L10896
aol/cyclops
cyclops-pure/src/main/java/cyclops/hkt/Active.java
Active.concreteConversion
public <S,R> Converter<S> concreteConversion(Function<? super Higher<W, T>,? extends S> narrow) { """ Convert this Active to a new type via the underlying concrete type e.g. Given an Active List <pre> {@code Active<list,Integer> active = Active.of(ListX.of(1,2,3), ListX.Instances.definitions()); } </pre> ...
java
public <S,R> Converter<S> concreteConversion(Function<? super Higher<W, T>,? extends S> narrow){ return new Converter<S>(){ @Override public <R> R to(Function<S, R> fn) { return fn.apply(narrow.apply(single)); } }; }
[ "public", "<", "S", ",", "R", ">", "Converter", "<", "S", ">", "concreteConversion", "(", "Function", "<", "?", "super", "Higher", "<", "W", ",", "T", ">", ",", "?", "extends", "S", ">", "narrow", ")", "{", "return", "new", "Converter", "<", "S", ...
Convert this Active to a new type via the underlying concrete type e.g. Given an Active List <pre> {@code Active<list,Integer> active = Active.of(ListX.of(1,2,3), ListX.Instances.definitions()); } </pre> We can convert it to a set via concreteConversion <pre> {@code SetX<Integer> set = active.concreteConversion(ListX...
[ "Convert", "this", "Active", "to", "a", "new", "type", "via", "the", "underlying", "concrete", "type", "e", ".", "g", ".", "Given", "an", "Active", "List", "<pre", ">", "{", "@code", "Active<list", "Integer", ">", "active", "=", "Active", ".", "of", "(...
train
https://github.com/aol/cyclops/blob/59a9fde30190a4d1faeb9f6d9851d209d82b81dd/cyclops-pure/src/main/java/cyclops/hkt/Active.java#L119-L128
d-sauer/JCalcAPI
src/main/java/org/jdice/calc/Num.java
Num.toBigDecimal
public BigDecimal toBigDecimal(int scale, Rounding roundingMode) { """ Return BigDecimal in defined scale with specified rounding mode. Use strip trailing zeros from properties @param scale @param roundingMode @return BigDecimal """ return toBigDecimal(scale, roundingMode, getProperties().hasStri...
java
public BigDecimal toBigDecimal(int scale, Rounding roundingMode) { return toBigDecimal(scale, roundingMode, getProperties().hasStripTrailingZeros()); }
[ "public", "BigDecimal", "toBigDecimal", "(", "int", "scale", ",", "Rounding", "roundingMode", ")", "{", "return", "toBigDecimal", "(", "scale", ",", "roundingMode", ",", "getProperties", "(", ")", ".", "hasStripTrailingZeros", "(", ")", ")", ";", "}" ]
Return BigDecimal in defined scale with specified rounding mode. Use strip trailing zeros from properties @param scale @param roundingMode @return BigDecimal
[ "Return", "BigDecimal", "in", "defined", "scale", "with", "specified", "rounding", "mode", ".", "Use", "strip", "trailing", "zeros", "from", "properties" ]
train
https://github.com/d-sauer/JCalcAPI/blob/36ae1f9adfe611a6f1bd8ef87cf1dc0ec88ac035/src/main/java/org/jdice/calc/Num.java#L406-L408
jenkinsci/jenkins
core/src/main/java/hudson/model/Job.java
Job.doBuildStatus
public void doBuildStatus(StaplerRequest req, StaplerResponse rsp) throws IOException { """ Returns the image that shows the current buildCommand status. """ rsp.sendRedirect2(req.getContextPath() + "/images/48x48/" + getBuildStatusUrl()); }
java
public void doBuildStatus(StaplerRequest req, StaplerResponse rsp) throws IOException { rsp.sendRedirect2(req.getContextPath() + "/images/48x48/" + getBuildStatusUrl()); }
[ "public", "void", "doBuildStatus", "(", "StaplerRequest", "req", ",", "StaplerResponse", "rsp", ")", "throws", "IOException", "{", "rsp", ".", "sendRedirect2", "(", "req", ".", "getContextPath", "(", ")", "+", "\"/images/48x48/\"", "+", "getBuildStatusUrl", "(", ...
Returns the image that shows the current buildCommand status.
[ "Returns", "the", "image", "that", "shows", "the", "current", "buildCommand", "status", "." ]
train
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/model/Job.java#L1401-L1404
structr/structr
structr-core/src/main/java/org/structr/schema/export/StructrSchema.java
StructrSchema.extendDatabaseSchema
public static void extendDatabaseSchema(final App app, final JsonSchema newSchema) throws FrameworkException, URISyntaxException { """ Extend the current Structr schema by the elements contained in the given new schema. @param app @param newSchema the new schema to add to the current Structr schema @throws ...
java
public static void extendDatabaseSchema(final App app, final JsonSchema newSchema) throws FrameworkException, URISyntaxException { try (final Tx tx = app.tx()) { newSchema.createDatabaseSchema(app, JsonSchema.ImportMode.extend); tx.success(); } }
[ "public", "static", "void", "extendDatabaseSchema", "(", "final", "App", "app", ",", "final", "JsonSchema", "newSchema", ")", "throws", "FrameworkException", ",", "URISyntaxException", "{", "try", "(", "final", "Tx", "tx", "=", "app", ".", "tx", "(", ")", ")...
Extend the current Structr schema by the elements contained in the given new schema. @param app @param newSchema the new schema to add to the current Structr schema @throws FrameworkException @throws URISyntaxException
[ "Extend", "the", "current", "Structr", "schema", "by", "the", "elements", "contained", "in", "the", "given", "new", "schema", "." ]
train
https://github.com/structr/structr/blob/c111a1d0c0201c7fea5574ed69aa5a5053185a97/structr-core/src/main/java/org/structr/schema/export/StructrSchema.java#L195-L203
3pillarlabs/spring-data-simpledb
spring-data-simpledb-impl/src/main/java/org/springframework/data/simpledb/core/domain/DomainManager.java
DomainManager.manageDomain
public synchronized boolean manageDomain(final String domainName, final DomainManagementPolicy policy, final AmazonSimpleDB sdb) { """ Creates a domain, based on the Domain Policy; The default is UPDATE(if it does not exist create it) @return true if the domain was successfuly managed, false if the domain has b...
java
public synchronized boolean manageDomain(final String domainName, final DomainManagementPolicy policy, final AmazonSimpleDB sdb) { Assert.notNull(sdb); if(! managedDomains.contains(domainName)) { try { if(policy == DomainManagementPolicy.UPDATE || policy == null) { createDomain(domainName, sdb); ...
[ "public", "synchronized", "boolean", "manageDomain", "(", "final", "String", "domainName", ",", "final", "DomainManagementPolicy", "policy", ",", "final", "AmazonSimpleDB", "sdb", ")", "{", "Assert", ".", "notNull", "(", "sdb", ")", ";", "if", "(", "!", "manag...
Creates a domain, based on the Domain Policy; The default is UPDATE(if it does not exist create it) @return true if the domain was successfuly managed, false if the domain has been managed before
[ "Creates", "a", "domain", "based", "on", "the", "Domain", "Policy", ";", "The", "default", "is", "UPDATE", "(", "if", "it", "does", "not", "exist", "create", "it", ")" ]
train
https://github.com/3pillarlabs/spring-data-simpledb/blob/f1e0eb4e48ec4674d3966e8f5bc04c95031f93ae/spring-data-simpledb-impl/src/main/java/org/springframework/data/simpledb/core/domain/DomainManager.java#L30-L54