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
liyiorg/weixin-popular
src/main/java/weixin/popular/api/BizwifiAPI.java
BizwifiAPI.deviceAdd
public static BaseResult deviceAdd(String accessToken, ShopInfo shopInfo) { """ Wi-Fi设备管理-添加密码型设备 @param accessToken accessToken @param shopInfo shopInfo @return BaseResult """ return deviceAdd(accessToken, JsonUtil.toJSONString(shopInfo)); }
java
public static BaseResult deviceAdd(String accessToken, ShopInfo shopInfo) { return deviceAdd(accessToken, JsonUtil.toJSONString(shopInfo)); }
[ "public", "static", "BaseResult", "deviceAdd", "(", "String", "accessToken", ",", "ShopInfo", "shopInfo", ")", "{", "return", "deviceAdd", "(", "accessToken", ",", "JsonUtil", ".", "toJSONString", "(", "shopInfo", ")", ")", ";", "}" ]
Wi-Fi设备管理-添加密码型设备 @param accessToken accessToken @param shopInfo shopInfo @return BaseResult
[ "Wi", "-", "Fi设备管理", "-", "添加密码型设备" ]
train
https://github.com/liyiorg/weixin-popular/blob/c64255292d41463bdb671938feaabf42a335d82c/src/main/java/weixin/popular/api/BizwifiAPI.java#L316-L318
rollbar/rollbar-java
rollbar-android/src/main/java/com/rollbar/android/Rollbar.java
Rollbar.setPersonData
public void setPersonData(final String id, final String username, final String email) { """ Set the person data to include with future items. @param id an identifier for this user. @param username the username of the user. @param email the email of this user. """ this.rollbar.configure(new ConfigProvi...
java
public void setPersonData(final String id, final String username, final String email) { this.rollbar.configure(new ConfigProvider() { @Override public Config provide(ConfigBuilder builder) { return builder .person(new PersonProvider(id, username, email)) .build(); }...
[ "public", "void", "setPersonData", "(", "final", "String", "id", ",", "final", "String", "username", ",", "final", "String", "email", ")", "{", "this", ".", "rollbar", ".", "configure", "(", "new", "ConfigProvider", "(", ")", "{", "@", "Override", "public"...
Set the person data to include with future items. @param id an identifier for this user. @param username the username of the user. @param email the email of this user.
[ "Set", "the", "person", "data", "to", "include", "with", "future", "items", "." ]
train
https://github.com/rollbar/rollbar-java/blob/5eb4537d1363722b51cfcce55b427cbd8489f17b/rollbar-android/src/main/java/com/rollbar/android/Rollbar.java#L301-L310
hankcs/HanLP
src/main/java/com/hankcs/hanlp/seg/common/CWSEvaluator.java
CWSEvaluator.evaluate
public static CWSEvaluator.Result evaluate(Segment segment, String testFile, String outputPath, String goldFile, String dictPath) throws IOException { """ 标准化评测分词器 @param segment 分词器 @param testFile 测试集raw text @param outputPath 分词预测输出文件 @param goldFile 测试集segmented file @param dictPath 训练集单词列表 @r...
java
public static CWSEvaluator.Result evaluate(Segment segment, String testFile, String outputPath, String goldFile, String dictPath) throws IOException { return evaluate(segment, outputPath, goldFile, dictPath); }
[ "public", "static", "CWSEvaluator", ".", "Result", "evaluate", "(", "Segment", "segment", ",", "String", "testFile", ",", "String", "outputPath", ",", "String", "goldFile", ",", "String", "dictPath", ")", "throws", "IOException", "{", "return", "evaluate", "(", ...
标准化评测分词器 @param segment 分词器 @param testFile 测试集raw text @param outputPath 分词预测输出文件 @param goldFile 测试集segmented file @param dictPath 训练集单词列表 @return 一个储存准确率的结构 @throws IOException
[ "标准化评测分词器" ]
train
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/seg/common/CWSEvaluator.java#L223-L226
jfoenixadmin/JFoenix
jfoenix/src/main/java/com/jfoenix/svg/SVGGlyphLoader.java
SVGGlyphLoader.loadGlyph
public static SVGGlyph loadGlyph(URL url) throws IOException { """ load a single svg icon from a file @param url of the svg icon @return SVGGLyph node @throws IOException """ String urlString = url.toString(); String filename = urlString.substring(urlString.lastIndexOf('/') + 1); ...
java
public static SVGGlyph loadGlyph(URL url) throws IOException { String urlString = url.toString(); String filename = urlString.substring(urlString.lastIndexOf('/') + 1); int startPos = 0; int endPos = 0; while (endPos < filename.length() && filename.charAt(endPos) != '-') { ...
[ "public", "static", "SVGGlyph", "loadGlyph", "(", "URL", "url", ")", "throws", "IOException", "{", "String", "urlString", "=", "url", ".", "toString", "(", ")", ";", "String", "filename", "=", "urlString", ".", "substring", "(", "urlString", ".", "lastIndexO...
load a single svg icon from a file @param url of the svg icon @return SVGGLyph node @throws IOException
[ "load", "a", "single", "svg", "icon", "from", "a", "file" ]
train
https://github.com/jfoenixadmin/JFoenix/blob/53235b5f561da4a515ef716059b8a8df5239ffa1/jfoenix/src/main/java/com/jfoenix/svg/SVGGlyphLoader.java#L176-L194
nyla-solutions/nyla
nyla.solutions.core/src/main/java/nyla/solutions/core/ds/ActiveDirectory.java
ActiveDirectory.setupBasicProperties
private Hashtable<?,?> setupBasicProperties(Hashtable<String,Object> env) throws NamingException { """ Sets basic LDAP connection properties in env. @param env The LDAP security environment @param url The LDAP URL @param tracing LDAP tracing level. Output to System.err @param referralType Referral ty...
java
private Hashtable<?,?> setupBasicProperties(Hashtable<String,Object> env) throws NamingException { return setupBasicProperties(env,this.fullUrl); }
[ "private", "Hashtable", "<", "?", ",", "?", ">", "setupBasicProperties", "(", "Hashtable", "<", "String", ",", "Object", ">", "env", ")", "throws", "NamingException", "{", "return", "setupBasicProperties", "(", "env", ",", "this", ".", "fullUrl", ")", ";", ...
Sets basic LDAP connection properties in env. @param env The LDAP security environment @param url The LDAP URL @param tracing LDAP tracing level. Output to System.err @param referralType Referral type: follow, ignore, or throw @param aliasType Alias type: finding, searching, etc. @throws NamingException Thrown if the ...
[ "Sets", "basic", "LDAP", "connection", "properties", "in", "env", "." ]
train
https://github.com/nyla-solutions/nyla/blob/38d5b843c76eae9762bbca20453ed0f0ad8412a9/nyla.solutions.core/src/main/java/nyla/solutions/core/ds/ActiveDirectory.java#L200-L204
galenframework/galen
galen-core/src/main/java/com/galenframework/specs/page/PageSpec.java
PageSpec.setObjectGroups
public void setObjectGroups(Map<String, List<String>> objectGroups) { """ Clears the current object groups list and sets new group list @param objectGroups """ this.objectGroups.clear(); if (objectGroups != null) { this.objectGroups.putAll(objectGroups); } }
java
public void setObjectGroups(Map<String, List<String>> objectGroups) { this.objectGroups.clear(); if (objectGroups != null) { this.objectGroups.putAll(objectGroups); } }
[ "public", "void", "setObjectGroups", "(", "Map", "<", "String", ",", "List", "<", "String", ">", ">", "objectGroups", ")", "{", "this", ".", "objectGroups", ".", "clear", "(", ")", ";", "if", "(", "objectGroups", "!=", "null", ")", "{", "this", ".", ...
Clears the current object groups list and sets new group list @param objectGroups
[ "Clears", "the", "current", "object", "groups", "list", "and", "sets", "new", "group", "list" ]
train
https://github.com/galenframework/galen/blob/6c7dc1f11d097e6aa49c45d6a77ee688741657a4/galen-core/src/main/java/com/galenframework/specs/page/PageSpec.java#L63-L68
calimero-project/calimero-core
src/tuwien/auto/calimero/serial/usb/HidReport.java
HidReport.createFeatureService
public static HidReport createFeatureService(final BusAccessServerService service, final BusAccessServerFeature feature, final byte[] frame) { """ Creates a new report for use with the Bus Access Server feature service. @param service Bus Access Server service @param feature feature ID @param frame feature ...
java
public static HidReport createFeatureService(final BusAccessServerService service, final BusAccessServerFeature feature, final byte[] frame) { return new HidReport(service, feature, frame); }
[ "public", "static", "HidReport", "createFeatureService", "(", "final", "BusAccessServerService", "service", ",", "final", "BusAccessServerFeature", "feature", ",", "final", "byte", "[", "]", "frame", ")", "{", "return", "new", "HidReport", "(", "service", ",", "fe...
Creates a new report for use with the Bus Access Server feature service. @param service Bus Access Server service @param feature feature ID @param frame feature protocol data @return the created HID report
[ "Creates", "a", "new", "report", "for", "use", "with", "the", "Bus", "Access", "Server", "feature", "service", "." ]
train
https://github.com/calimero-project/calimero-core/blob/7e6f547c6bd75fa985bfeb5b47ba671df2ea01e8/src/tuwien/auto/calimero/serial/usb/HidReport.java#L126-L130
httpcache4j/httpcache4j
httpcache4j-api/src/main/java/org/codehaus/httpcache4j/util/DirectivesParser.java
DirectivesParser.createParameter
static Parameter createParameter(final String name, final String value) { """ Creates a Parameter @param name the name @param value the value, or <code>null</code> @return a name-value pair representing the arguments """ if (value != null && isQuoted(value)) { return new QuotedParamet...
java
static Parameter createParameter(final String name, final String value) { if (value != null && isQuoted(value)) { return new QuotedParameter(name, value); } return new Parameter(name, value); }
[ "static", "Parameter", "createParameter", "(", "final", "String", "name", ",", "final", "String", "value", ")", "{", "if", "(", "value", "!=", "null", "&&", "isQuoted", "(", "value", ")", ")", "{", "return", "new", "QuotedParameter", "(", "name", ",", "v...
Creates a Parameter @param name the name @param value the value, or <code>null</code> @return a name-value pair representing the arguments
[ "Creates", "a", "Parameter" ]
train
https://github.com/httpcache4j/httpcache4j/blob/9c07ebd63cd104a99eb9e771f760f14efa4fe0f6/httpcache4j-api/src/main/java/org/codehaus/httpcache4j/util/DirectivesParser.java#L256-L261
spring-projects/spring-hateoas
src/main/java/org/springframework/hateoas/mediatype/PropertyUtils.java
PropertyUtils.descriptorToBeIgnoredByJackson
private static boolean descriptorToBeIgnoredByJackson(Class<?> clazz, PropertyDescriptor descriptor) { """ Check if a given {@link PropertyDescriptor} has {@link JsonIgnore} applied to the field declaration. @param clazz @param descriptor @return """ Field descriptorField = ReflectionUtils.findField(cl...
java
private static boolean descriptorToBeIgnoredByJackson(Class<?> clazz, PropertyDescriptor descriptor) { Field descriptorField = ReflectionUtils.findField(clazz, descriptor.getName()); return descriptorField == null // ? false // : toBeIgnoredByJackson(AnnotationUtils.getAnnotations(descriptorField)); }
[ "private", "static", "boolean", "descriptorToBeIgnoredByJackson", "(", "Class", "<", "?", ">", "clazz", ",", "PropertyDescriptor", "descriptor", ")", "{", "Field", "descriptorField", "=", "ReflectionUtils", ".", "findField", "(", "clazz", ",", "descriptor", ".", "...
Check if a given {@link PropertyDescriptor} has {@link JsonIgnore} applied to the field declaration. @param clazz @param descriptor @return
[ "Check", "if", "a", "given", "{", "@link", "PropertyDescriptor", "}", "has", "{", "@link", "JsonIgnore", "}", "applied", "to", "the", "field", "declaration", "." ]
train
https://github.com/spring-projects/spring-hateoas/blob/70ebff9309f086cd8d6a97daf67e0dc215c87d9c/src/main/java/org/springframework/hateoas/mediatype/PropertyUtils.java#L165-L172
groovy/groovy-core
src/main/org/codehaus/groovy/util/ManagedConcurrentValueMap.java
ManagedConcurrentValueMap.put
public void put(final K key, V value) { """ Sets a new value for a given key. an older value is overwritten. @param key a non null key @param value the new value """ ManagedReference<V> ref = new ManagedReference<V>(bundle, value) { @Override public void finalizeReference() { ...
java
public void put(final K key, V value) { ManagedReference<V> ref = new ManagedReference<V>(bundle, value) { @Override public void finalizeReference() { super.finalizeReference(); internalMap.remove(key, get()); } }; internalMap.p...
[ "public", "void", "put", "(", "final", "K", "key", ",", "V", "value", ")", "{", "ManagedReference", "<", "V", ">", "ref", "=", "new", "ManagedReference", "<", "V", ">", "(", "bundle", ",", "value", ")", "{", "@", "Override", "public", "void", "finali...
Sets a new value for a given key. an older value is overwritten. @param key a non null key @param value the new value
[ "Sets", "a", "new", "value", "for", "a", "given", "key", ".", "an", "older", "value", "is", "overwritten", "." ]
train
https://github.com/groovy/groovy-core/blob/01309f9d4be34ddf93c4a9943b5a97843bff6181/src/main/org/codehaus/groovy/util/ManagedConcurrentValueMap.java#L66-L75
petergeneric/stdlib
util/carbon-client/src/main/java/com/peterphi/carbon/type/XMLWrapper.java
XMLWrapper.setAttribute
public void setAttribute(String name, String value) { """ Helper method to set the value of an attribute on this Element @param name the attribute name @param value the value to set - if null the attribute is removed """ if (value != null) getElement().setAttribute(name, value); else getElement...
java
public void setAttribute(String name, String value) { if (value != null) getElement().setAttribute(name, value); else getElement().removeAttribute(name); }
[ "public", "void", "setAttribute", "(", "String", "name", ",", "String", "value", ")", "{", "if", "(", "value", "!=", "null", ")", "getElement", "(", ")", ".", "setAttribute", "(", "name", ",", "value", ")", ";", "else", "getElement", "(", ")", ".", "...
Helper method to set the value of an attribute on this Element @param name the attribute name @param value the value to set - if null the attribute is removed
[ "Helper", "method", "to", "set", "the", "value", "of", "an", "attribute", "on", "this", "Element" ]
train
https://github.com/petergeneric/stdlib/blob/d4025d2f881bc0542b1e004c5f65a1ccaf895836/util/carbon-client/src/main/java/com/peterphi/carbon/type/XMLWrapper.java#L40-L46
prestodb/presto
presto-main/src/main/java/com/facebook/presto/server/smile/SmileCodec.java
SmileCodec.fromSmile
public T fromSmile(byte[] bytes) throws IllegalArgumentException { """ Converts the specified smile bytes (UTF-8) into an instance of type T. @param bytes the bytes (UTF-8) to parse @return parsed response; never null @throws IllegalArgumentException if the bytes bytes can not be converted to the ...
java
public T fromSmile(byte[] bytes) throws IllegalArgumentException { try { return mapper.readValue(bytes, javaType); } catch (IOException e) { throw new IllegalArgumentException(format("Invalid SMILE bytes for %s", javaType), e); } }
[ "public", "T", "fromSmile", "(", "byte", "[", "]", "bytes", ")", "throws", "IllegalArgumentException", "{", "try", "{", "return", "mapper", ".", "readValue", "(", "bytes", ",", "javaType", ")", ";", "}", "catch", "(", "IOException", "e", ")", "{", "throw...
Converts the specified smile bytes (UTF-8) into an instance of type T. @param bytes the bytes (UTF-8) to parse @return parsed response; never null @throws IllegalArgumentException if the bytes bytes can not be converted to the type T
[ "Converts", "the", "specified", "smile", "bytes", "(", "UTF", "-", "8", ")", "into", "an", "instance", "of", "type", "T", "." ]
train
https://github.com/prestodb/presto/blob/89de5e379d8f85e139d292b0add8c537a2a01a88/presto-main/src/main/java/com/facebook/presto/server/smile/SmileCodec.java#L127-L136
gwtbootstrap3/gwtbootstrap3-extras
src/main/java/org/gwtbootstrap3/extras/animate/client/ui/Animate.java
Animate.styleElement
private static <T extends UIObject> String styleElement(Element element, String animation, int count, int duration, int delay) { """ Styles element with animation class. New class name is generated to customize count, duration and delay. Style is removed on animation end (if not set to infinite). @param elemen...
java
private static <T extends UIObject> String styleElement(Element element, String animation, int count, int duration, int delay) { if (!usedStyles.contains(animation + " " + getStyleNameFromAnimation(animation,count,duration,delay))) { String styleSheet = "." + getStyleNameFromAnimation(animation, c...
[ "private", "static", "<", "T", "extends", "UIObject", ">", "String", "styleElement", "(", "Element", "element", ",", "String", "animation", ",", "int", "count", ",", "int", "duration", ",", "int", "delay", ")", "{", "if", "(", "!", "usedStyles", ".", "co...
Styles element with animation class. New class name is generated to customize count, duration and delay. Style is removed on animation end (if not set to infinite). @param element Element to apply animation to. @param animation Type of animation to apply. @param count Number of animation repeats. 0 disables animation,...
[ "Styles", "element", "with", "animation", "class", ".", "New", "class", "name", "is", "generated", "to", "customize", "count", "duration", "and", "delay", ".", "Style", "is", "removed", "on", "animation", "end", "(", "if", "not", "set", "to", "infinite", "...
train
https://github.com/gwtbootstrap3/gwtbootstrap3-extras/blob/8e42aaffd2a082e9cb23a14c37a3c87b7cbdfa94/src/main/java/org/gwtbootstrap3/extras/animate/client/ui/Animate.java#L235-L299
infinispan/infinispan
core/src/main/java/org/infinispan/factories/AbstractComponentRegistry.java
AbstractComponentRegistry.getRegisteredComponents
public Set<Component> getRegisteredComponents() { """ Returns an immutable set containing all the components that exists in the repository at this moment. @return a set of components """ Set<Component> set = new HashSet<>(); for (ComponentRef<?> c : basicComponentRegistry.getRegisteredComponents...
java
public Set<Component> getRegisteredComponents() { Set<Component> set = new HashSet<>(); for (ComponentRef<?> c : basicComponentRegistry.getRegisteredComponents()) { ComponentMetadata metadata = c.wired() != null ? componentMetadataRepo.getComponentMetadata(c.wi...
[ "public", "Set", "<", "Component", ">", "getRegisteredComponents", "(", ")", "{", "Set", "<", "Component", ">", "set", "=", "new", "HashSet", "<>", "(", ")", ";", "for", "(", "ComponentRef", "<", "?", ">", "c", ":", "basicComponentRegistry", ".", "getReg...
Returns an immutable set containing all the components that exists in the repository at this moment. @return a set of components
[ "Returns", "an", "immutable", "set", "containing", "all", "the", "components", "that", "exists", "in", "the", "repository", "at", "this", "moment", "." ]
train
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/factories/AbstractComponentRegistry.java#L445-L454
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/classify/PRCurve.java
PRCurve.fmeasure
public double fmeasure(int numleft, int numright) { """ the f-measure if we just guess as negativ the first numleft and guess as poitive the last numright """ int tp = 0, fp = 0, fn = 0; tp = numpositive[numright]; fp = numright - tp; fn = numleft - numnegative[numleft]; return f1(tp, ...
java
public double fmeasure(int numleft, int numright) { int tp = 0, fp = 0, fn = 0; tp = numpositive[numright]; fp = numright - tp; fn = numleft - numnegative[numleft]; return f1(tp, fp, fn); }
[ "public", "double", "fmeasure", "(", "int", "numleft", ",", "int", "numright", ")", "{", "int", "tp", "=", "0", ",", "fp", "=", "0", ",", "fn", "=", "0", ";", "tp", "=", "numpositive", "[", "numright", "]", ";", "fp", "=", "numright", "-", "tp", ...
the f-measure if we just guess as negativ the first numleft and guess as poitive the last numright
[ "the", "f", "-", "measure", "if", "we", "just", "guess", "as", "negativ", "the", "first", "numleft", "and", "guess", "as", "poitive", "the", "last", "numright" ]
train
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/classify/PRCurve.java#L181-L187
elki-project/elki
elki-core-api/src/main/java/de/lmu/ifi/dbs/elki/data/spatial/SpatialUtil.java
SpatialUtil.intersects
public static boolean intersects(SpatialComparable box1, SpatialComparable box2) { """ Returns true if the two SpatialComparables intersect, false otherwise. @param box1 the first SpatialComparable @param box2 the first SpatialComparable @return true if the SpatialComparables intersect, false otherwise ""...
java
public static boolean intersects(SpatialComparable box1, SpatialComparable box2) { final int dim = assertSameDimensionality(box1, box2); for(int i = 0; i < dim; i++) { if(box2.getMax(i) < box1.getMin(i) || box1.getMax(i) < box2.getMin(i)) { return false; } } return true; }
[ "public", "static", "boolean", "intersects", "(", "SpatialComparable", "box1", ",", "SpatialComparable", "box2", ")", "{", "final", "int", "dim", "=", "assertSameDimensionality", "(", "box1", ",", "box2", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i...
Returns true if the two SpatialComparables intersect, false otherwise. @param box1 the first SpatialComparable @param box2 the first SpatialComparable @return true if the SpatialComparables intersect, false otherwise
[ "Returns", "true", "if", "the", "two", "SpatialComparables", "intersect", "false", "otherwise", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-api/src/main/java/de/lmu/ifi/dbs/elki/data/spatial/SpatialUtil.java#L100-L108
overturetool/overture
core/interpreter/src/main/java/org/overture/interpreter/assistant/expression/PExpAssistantInterpreter.java
PExpAssistantInterpreter.getValues
public ValueList getValues(PExp exp, ObjectContext ctxt) { """ Return a list of all the updatable values read by the expression. This is used to add listeners to values that affect permission guards, so that the guard may be efficiently re-evaluated when the values change. @param exp @param ctxt The context ...
java
public ValueList getValues(PExp exp, ObjectContext ctxt) { try { return exp.apply(af.getExpressionValueCollector(), ctxt);// FIXME: should we handle exceptions like this } catch (AnalysisException e) { return null; // Most have none } }
[ "public", "ValueList", "getValues", "(", "PExp", "exp", ",", "ObjectContext", "ctxt", ")", "{", "try", "{", "return", "exp", ".", "apply", "(", "af", ".", "getExpressionValueCollector", "(", ")", ",", "ctxt", ")", ";", "// FIXME: should we handle exceptions like...
Return a list of all the updatable values read by the expression. This is used to add listeners to values that affect permission guards, so that the guard may be efficiently re-evaluated when the values change. @param exp @param ctxt The context in which to search for values. @return A list of values read by the expre...
[ "Return", "a", "list", "of", "all", "the", "updatable", "values", "read", "by", "the", "expression", ".", "This", "is", "used", "to", "add", "listeners", "to", "values", "that", "affect", "permission", "guards", "so", "that", "the", "guard", "may", "be", ...
train
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/interpreter/src/main/java/org/overture/interpreter/assistant/expression/PExpAssistantInterpreter.java#L35-L44
apache/flink
flink-core/src/main/java/org/apache/flink/util/PropertiesUtil.java
PropertiesUtil.getBoolean
public static boolean getBoolean(Properties config, String key, boolean defaultValue) { """ Get boolean from properties. This method returns {@code true} iff the parsed value is "true". @param config Properties @param key key in Properties @param defaultValue default value if value is not set @return defaul...
java
public static boolean getBoolean(Properties config, String key, boolean defaultValue) { String val = config.getProperty(key); if (val == null) { return defaultValue; } else { return Boolean.parseBoolean(val); } }
[ "public", "static", "boolean", "getBoolean", "(", "Properties", "config", ",", "String", "key", ",", "boolean", "defaultValue", ")", "{", "String", "val", "=", "config", ".", "getProperty", "(", "key", ")", ";", "if", "(", "val", "==", "null", ")", "{", ...
Get boolean from properties. This method returns {@code true} iff the parsed value is "true". @param config Properties @param key key in Properties @param defaultValue default value if value is not set @return default or value of key
[ "Get", "boolean", "from", "properties", ".", "This", "method", "returns", "{", "@code", "true", "}", "iff", "the", "parsed", "value", "is", "true", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/util/PropertiesUtil.java#L102-L109
KyoriPowered/text
api/src/main/java/net/kyori/text/event/ClickEvent.java
ClickEvent.changePage
public static @NonNull ClickEvent changePage(final @NonNull String page) { """ Creates a click event that changes to a page. @param page the page to change to @return a click event """ return new ClickEvent(Action.CHANGE_PAGE, page); }
java
public static @NonNull ClickEvent changePage(final @NonNull String page) { return new ClickEvent(Action.CHANGE_PAGE, page); }
[ "public", "static", "@", "NonNull", "ClickEvent", "changePage", "(", "final", "@", "NonNull", "String", "page", ")", "{", "return", "new", "ClickEvent", "(", "Action", ".", "CHANGE_PAGE", ",", "page", ")", ";", "}" ]
Creates a click event that changes to a page. @param page the page to change to @return a click event
[ "Creates", "a", "click", "event", "that", "changes", "to", "a", "page", "." ]
train
https://github.com/KyoriPowered/text/blob/4496c593bf89e8fb036dd6efe26f8ac60f7655c9/api/src/main/java/net/kyori/text/event/ClickEvent.java#L106-L108
sporniket/core
sporniket-core-lang/src/main/java/com/sporniket/libre/lang/DataTools.java
DataTools.matchSequence
public static final boolean matchSequence(byte[] sequence, byte[] buffer, int offset) { """ Verify that each byte of a buffer match the corresponding byte of a given sequence, starting from an offset. @param sequence the sequence of bytes to match. @param buffer the buffer to test. @param offset the offset...
java
public static final boolean matchSequence(byte[] sequence, byte[] buffer, int offset) { boolean _result = (sequence.length < (buffer.length - offset)); if (_result) { for (int _index = 0; _index < sequence.length; _index++) { if (buffer[_index] != sequence[_index]) { _result = false; brea...
[ "public", "static", "final", "boolean", "matchSequence", "(", "byte", "[", "]", "sequence", ",", "byte", "[", "]", "buffer", ",", "int", "offset", ")", "{", "boolean", "_result", "=", "(", "sequence", ".", "length", "<", "(", "buffer", ".", "length", "...
Verify that each byte of a buffer match the corresponding byte of a given sequence, starting from an offset. @param sequence the sequence of bytes to match. @param buffer the buffer to test. @param offset the offset. @return <code>true</code> if the first bytes of buffer starting from offset are the same as the provid...
[ "Verify", "that", "each", "byte", "of", "a", "buffer", "match", "the", "corresponding", "byte", "of", "a", "given", "sequence", "starting", "from", "an", "offset", "." ]
train
https://github.com/sporniket/core/blob/3480ebd72a07422fcc09971be2607ee25efb2c26/sporniket-core-lang/src/main/java/com/sporniket/libre/lang/DataTools.java#L51-L66
jenkinsci/jenkins
core/src/main/java/hudson/XmlFile.java
XmlFile.replaceIfNotAtTopLevel
public static Object replaceIfNotAtTopLevel(Object o, Supplier<Object> replacement) { """ Provides an XStream replacement for an object unless a call to {@link #write} is currently in progress. As per JENKINS-45892 this may be used by any class which expects to be written at top level to an XML file but which ca...
java
public static Object replaceIfNotAtTopLevel(Object o, Supplier<Object> replacement) { File currentlyWriting = writing.get(); if (beingWritten.containsKey(o) || currentlyWriting == null) { return o; } else { LOGGER.log(Level.WARNING, "JENKINS-45892: reference to " + o + " ...
[ "public", "static", "Object", "replaceIfNotAtTopLevel", "(", "Object", "o", ",", "Supplier", "<", "Object", ">", "replacement", ")", "{", "File", "currentlyWriting", "=", "writing", ".", "get", "(", ")", ";", "if", "(", "beingWritten", ".", "containsKey", "(...
Provides an XStream replacement for an object unless a call to {@link #write} is currently in progress. As per JENKINS-45892 this may be used by any class which expects to be written at top level to an XML file but which cannot safely be serialized as a nested object (for example, because it expects some {@code onLoad}...
[ "Provides", "an", "XStream", "replacement", "for", "an", "object", "unless", "a", "call", "to", "{" ]
train
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/XmlFile.java#L217-L225
paymill/paymill-java
src/main/java/com/paymill/services/PreauthorizationService.java
PreauthorizationService.createWithToken
public Preauthorization createWithToken( final String token, final Integer amount, final String currency ) { """ Creates Use either a token or an existing payment to Authorizes the given amount with the given token. @param token The identifier of a token. @param amount Amount (in cents) which will be charged. ...
java
public Preauthorization createWithToken( final String token, final Integer amount, final String currency ) { return this.createWithToken( token, amount, currency, null ); }
[ "public", "Preauthorization", "createWithToken", "(", "final", "String", "token", ",", "final", "Integer", "amount", ",", "final", "String", "currency", ")", "{", "return", "this", ".", "createWithToken", "(", "token", ",", "amount", ",", "currency", ",", "nul...
Creates Use either a token or an existing payment to Authorizes the given amount with the given token. @param token The identifier of a token. @param amount Amount (in cents) which will be charged. @param currency ISO 4217 formatted currency code. @return {@link Transaction} object with the {@link Preauthorization} as ...
[ "Creates", "Use", "either", "a", "token", "or", "an", "existing", "payment", "to", "Authorizes", "the", "given", "amount", "with", "the", "given", "token", "." ]
train
https://github.com/paymill/paymill-java/blob/17281a0d4376c76f1711af9f09bfc138c90ba65a/src/main/java/com/paymill/services/PreauthorizationService.java#L109-L111
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java
KeyVaultClientBaseImpl.getDeletedSecret
public DeletedSecretBundle getDeletedSecret(String vaultBaseUrl, String secretName) { """ Gets the specified deleted secret. The Get Deleted Secret operation returns the specified deleted secret along with its attributes. This operation requires the secrets/get permission. @param vaultBaseUrl The vault name, f...
java
public DeletedSecretBundle getDeletedSecret(String vaultBaseUrl, String secretName) { return getDeletedSecretWithServiceResponseAsync(vaultBaseUrl, secretName).toBlocking().single().body(); }
[ "public", "DeletedSecretBundle", "getDeletedSecret", "(", "String", "vaultBaseUrl", ",", "String", "secretName", ")", "{", "return", "getDeletedSecretWithServiceResponseAsync", "(", "vaultBaseUrl", ",", "secretName", ")", ".", "toBlocking", "(", ")", ".", "single", "(...
Gets the specified deleted secret. The Get Deleted Secret operation returns the specified deleted secret along with its attributes. This operation requires the secrets/get permission. @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. @param secretName The name of the secret. @throws Ille...
[ "Gets", "the", "specified", "deleted", "secret", ".", "The", "Get", "Deleted", "Secret", "operation", "returns", "the", "specified", "deleted", "secret", "along", "with", "its", "attributes", ".", "This", "operation", "requires", "the", "secrets", "/", "get", ...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java#L4643-L4645
facebookarchive/hadoop-20
src/core/org/apache/hadoop/io/compress/Lz4hcCodec.java
Lz4hcCodec.createCompressor
@Override public Compressor createCompressor() { """ Create a new {@link Compressor} for use by this {@link CompressionCodec}. @return a new compressor for use by this codec """ if (!isNativeCodeLoaded()) { throw new RuntimeException("native lz4 library not available"); } int bufferSize ...
java
@Override public Compressor createCompressor() { if (!isNativeCodeLoaded()) { throw new RuntimeException("native lz4 library not available"); } int bufferSize = conf.getInt( IO_COMPRESSION_CODEC_LZ4_BUFFERSIZE_KEY, IO_COMPRESSION_CODEC_LZ4_BUFFERSIZE_DEFAULT); System.out.println(...
[ "@", "Override", "public", "Compressor", "createCompressor", "(", ")", "{", "if", "(", "!", "isNativeCodeLoaded", "(", ")", ")", "{", "throw", "new", "RuntimeException", "(", "\"native lz4 library not available\"", ")", ";", "}", "int", "bufferSize", "=", "conf"...
Create a new {@link Compressor} for use by this {@link CompressionCodec}. @return a new compressor for use by this codec
[ "Create", "a", "new", "{", "@link", "Compressor", "}", "for", "use", "by", "this", "{", "@link", "CompressionCodec", "}", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/core/org/apache/hadoop/io/compress/Lz4hcCodec.java#L41-L51
JoeKerouac/utils
src/main/java/com/joe/utils/secure/impl/AsymmetricCipher.java
AsymmetricCipher.buildInstance
public static CipherUtil buildInstance(byte[] privateKey, byte[] publicKey) { """ 非对称加密构造器 @param privateKey PKCS8格式的私钥(BASE64 encode过的) @param publicKey X509格式的公钥(BASE64 encode过的) @return AsymmetricCipher """ PrivateKey priKey = KeyTools.getPrivateKeyFromPKCS8(Algorithms.RSA.name(), ...
java
public static CipherUtil buildInstance(byte[] privateKey, byte[] publicKey) { PrivateKey priKey = KeyTools.getPrivateKeyFromPKCS8(Algorithms.RSA.name(), new ByteArrayInputStream(privateKey)); PublicKey pubKey = KeyTools.getPublicKeyFromX509(Algorithms.RSA.name(), new ByteArrayInp...
[ "public", "static", "CipherUtil", "buildInstance", "(", "byte", "[", "]", "privateKey", ",", "byte", "[", "]", "publicKey", ")", "{", "PrivateKey", "priKey", "=", "KeyTools", ".", "getPrivateKeyFromPKCS8", "(", "Algorithms", ".", "RSA", ".", "name", "(", ")"...
非对称加密构造器 @param privateKey PKCS8格式的私钥(BASE64 encode过的) @param publicKey X509格式的公钥(BASE64 encode过的) @return AsymmetricCipher
[ "非对称加密构造器" ]
train
https://github.com/JoeKerouac/utils/blob/45e1b2dc4d736956674fc4dcbe6cf84eaee69278/src/main/java/com/joe/utils/secure/impl/AsymmetricCipher.java#L54-L60
relayrides/pushy
pushy/src/main/java/com/turo/pushy/apns/P12Util.java
P12Util.getFirstPrivateKeyEntryFromP12InputStream
public static PrivateKeyEntry getFirstPrivateKeyEntryFromP12InputStream(final InputStream p12InputStream, final String password) throws KeyStoreException, IOException { """ Returns the first private key entry found in the given keystore. If more than one private key is present, the key that is returned is undefin...
java
public static PrivateKeyEntry getFirstPrivateKeyEntryFromP12InputStream(final InputStream p12InputStream, final String password) throws KeyStoreException, IOException { Objects.requireNonNull(password, "Password may be blank, but must not be null."); final KeyStore keyStore = KeyStore.getInstance("PKCS...
[ "public", "static", "PrivateKeyEntry", "getFirstPrivateKeyEntryFromP12InputStream", "(", "final", "InputStream", "p12InputStream", ",", "final", "String", "password", ")", "throws", "KeyStoreException", ",", "IOException", "{", "Objects", ".", "requireNonNull", "(", "pass...
Returns the first private key entry found in the given keystore. If more than one private key is present, the key that is returned is undefined. @param p12InputStream an input stream for a PKCS#12 keystore @param password the password to be used to load the keystore and its entries; may be blank, but must not be {@cod...
[ "Returns", "the", "first", "private", "key", "entry", "found", "in", "the", "given", "keystore", ".", "If", "more", "than", "one", "private", "key", "is", "present", "the", "key", "that", "is", "returned", "is", "undefined", "." ]
train
https://github.com/relayrides/pushy/blob/1f6f9a0e07d785c815d74c2320a8d87c80231d36/pushy/src/main/java/com/turo/pushy/apns/P12Util.java#L56-L91
GCRC/nunaliit
nunaliit2-utils/src/main/java/ca/carleton/gcrc/utils/StreamUtils.java
StreamUtils.copyStream
static public void copyStream(InputStream is, OutputStream os, int transferBufferSize) throws IOException { """ Copy all the bytes from an input stream to an output stream. @param is Stream to read bytes from @param os Stream to write bytes to @param transferBufferSize Size of buffer used to transfer bytes from...
java
static public void copyStream(InputStream is, OutputStream os, int transferBufferSize) throws IOException { if( transferBufferSize < 1 ) { throw new IOException("Transfer buffer size can not be smaller than 1"); } byte[] buffer = new byte[transferBufferSize]; int bytesRead = is.read(buffer); while( bytes...
[ "static", "public", "void", "copyStream", "(", "InputStream", "is", ",", "OutputStream", "os", ",", "int", "transferBufferSize", ")", "throws", "IOException", "{", "if", "(", "transferBufferSize", "<", "1", ")", "{", "throw", "new", "IOException", "(", "\"Tran...
Copy all the bytes from an input stream to an output stream. @param is Stream to read bytes from @param os Stream to write bytes to @param transferBufferSize Size of buffer used to transfer bytes from one stream to the other @throws IOException
[ "Copy", "all", "the", "bytes", "from", "an", "input", "stream", "to", "an", "output", "stream", "." ]
train
https://github.com/GCRC/nunaliit/blob/0b4abfc64eef2eb8b94f852ce697de2e851d8e67/nunaliit2-utils/src/main/java/ca/carleton/gcrc/utils/StreamUtils.java#L31-L44
graphhopper/graphhopper
core/src/main/java/com/graphhopper/routing/util/EncodingManager.java
EncodingManager.handleWayTags
public IntsRef handleWayTags(ReaderWay way, AcceptWay acceptWay, long relationFlags) { """ Processes way properties of different kind to determine speed and direction. Properties are directly encoded in 8 bytes. @param relationFlags The preprocessed relation flags is used to influence the way properties. "...
java
public IntsRef handleWayTags(ReaderWay way, AcceptWay acceptWay, long relationFlags) { IntsRef edgeFlags = createEdgeFlags(); // return if way or ferry Access access = acceptWay.getAccess(); for (TagParser parser : sharedEncodedValueMap.values()) { parser.handleWayTags(edgeFl...
[ "public", "IntsRef", "handleWayTags", "(", "ReaderWay", "way", ",", "AcceptWay", "acceptWay", ",", "long", "relationFlags", ")", "{", "IntsRef", "edgeFlags", "=", "createEdgeFlags", "(", ")", ";", "// return if way or ferry", "Access", "access", "=", "acceptWay", ...
Processes way properties of different kind to determine speed and direction. Properties are directly encoded in 8 bytes. @param relationFlags The preprocessed relation flags is used to influence the way properties.
[ "Processes", "way", "properties", "of", "different", "kind", "to", "determine", "speed", "and", "direction", ".", "Properties", "are", "directly", "encoded", "in", "8", "bytes", "." ]
train
https://github.com/graphhopper/graphhopper/blob/c235e306e6e823043cadcc41ead0e685bdebf737/core/src/main/java/com/graphhopper/routing/util/EncodingManager.java#L471-L482
OpenLiberty/open-liberty
dev/com.ibm.ws.logging.hpel/src/com/ibm/ws/logging/hpel/impl/LogRecordBrowser.java
LogRecordBrowser.recordsInProcess
public OnePidRecordListImpl recordsInProcess(RepositoryPointer after, long max, final LogRecordFilter filter) { """ Returns records belonging to a process and satisfying the filter. @param after the location of a record we need to restart iteration after. @param max the upper time limit (the youngest log recor...
java
public OnePidRecordListImpl recordsInProcess(RepositoryPointer after, long max, final LogRecordFilter filter) { return restartRecordsInProcess(after, max, filter==null ? new AllAcceptVerifier() : new FullFilterVerifier(filter)); }
[ "public", "OnePidRecordListImpl", "recordsInProcess", "(", "RepositoryPointer", "after", ",", "long", "max", ",", "final", "LogRecordFilter", "filter", ")", "{", "return", "restartRecordsInProcess", "(", "after", ",", "max", ",", "filter", "==", "null", "?", "new"...
Returns records belonging to a process and satisfying the filter. @param after the location of a record we need to restart iteration after. @param max the upper time limit (the youngest log record). @param filter criteria to filter logs records on. @return the iterable list of records.
[ "Returns", "records", "belonging", "to", "a", "process", "and", "satisfying", "the", "filter", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.logging.hpel/src/com/ibm/ws/logging/hpel/impl/LogRecordBrowser.java#L77-L79
jamesagnew/hapi-fhir
hapi-fhir-osgi-core/src/main/java/ca/uhn/fhir/osgi/impl/FhirServerManager.java
FhirServerManager.unregisterFhirServer
public void unregisterFhirServer (FhirServer server, Map<String,Object> props) throws FhirConfigurationException { """ This method will be called when a FHIR Server OSGi service is being removed from the container. This normally will only occur when its bundle is stopped because it is being removed or updated. ...
java
public void unregisterFhirServer (FhirServer server, Map<String,Object> props) throws FhirConfigurationException { if (server != null) { String serverName = (String)props.get(FhirServer.SVCPROP_SERVICE_NAME); if (serverName != null) { FhirServer service = registeredServers.get(serverName); if (service !...
[ "public", "void", "unregisterFhirServer", "(", "FhirServer", "server", ",", "Map", "<", "String", ",", "Object", ">", "props", ")", "throws", "FhirConfigurationException", "{", "if", "(", "server", "!=", "null", ")", "{", "String", "serverName", "=", "(", "S...
This method will be called when a FHIR Server OSGi service is being removed from the container. This normally will only occur when its bundle is stopped because it is being removed or updated. @param server OSGi service implementing the FhirService interface @param props the <service-properties> for that service @thr...
[ "This", "method", "will", "be", "called", "when", "a", "FHIR", "Server", "OSGi", "service", "is", "being", "removed", "from", "the", "container", ".", "This", "normally", "will", "only", "occur", "when", "its", "bundle", "is", "stopped", "because", "it", "...
train
https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-osgi-core/src/main/java/ca/uhn/fhir/osgi/impl/FhirServerManager.java#L130-L155
liyiorg/weixin-popular
src/main/java/weixin/popular/api/SemanticAPI.java
SemanticAPI.addvoicetorecofortext
public static BaseResult addvoicetorecofortext(String accessToken, String voiceId, String lang, File voice) { """ 提交语音 @param accessToken 接口调用凭证 @param voiceId 语音唯一标识 @param lang 语言,zh_CN 或 en_US,默认中文 @param voice 文件格式 只支持mp3,16k,单声道,最大1M @return BaseResult @since 2.8.22 """ H...
java
public static BaseResult addvoicetorecofortext(String accessToken, String voiceId, String lang, File voice) { HttpPost httpPost = new HttpPost(BASE_URI + "/cgi-bin/media/voice/addvoicetorecofortext"); FileBody bin = new FileBody(voice); HttpEntity reqEntity = MultipartEntityBuilder.create() ...
[ "public", "static", "BaseResult", "addvoicetorecofortext", "(", "String", "accessToken", ",", "String", "voiceId", ",", "String", "lang", ",", "File", "voice", ")", "{", "HttpPost", "httpPost", "=", "new", "HttpPost", "(", "BASE_URI", "+", "\"/cgi-bin/media/voice/...
提交语音 @param accessToken 接口调用凭证 @param voiceId 语音唯一标识 @param lang 语言,zh_CN 或 en_US,默认中文 @param voice 文件格式 只支持mp3,16k,单声道,最大1M @return BaseResult @since 2.8.22
[ "提交语音" ]
train
https://github.com/liyiorg/weixin-popular/blob/c64255292d41463bdb671938feaabf42a335d82c/src/main/java/weixin/popular/api/SemanticAPI.java#L124-L137
netty/netty
common/src/main/java/io/netty/util/internal/PlatformDependent.java
PlatformDependent.hashCodeAsciiSanitizeShort
private static int hashCodeAsciiSanitizeShort(CharSequence value, int offset) { """ Identical to {@link PlatformDependent0#hashCodeAsciiSanitize(short)} but for {@link CharSequence}. """ if (BIG_ENDIAN_NATIVE_ORDER) { // mimic a unsafe.getShort call on a big endian machine retur...
java
private static int hashCodeAsciiSanitizeShort(CharSequence value, int offset) { if (BIG_ENDIAN_NATIVE_ORDER) { // mimic a unsafe.getShort call on a big endian machine return (value.charAt(offset + 1) & 0x1f) | (value.charAt(offset) & 0x1f) << 8; } retu...
[ "private", "static", "int", "hashCodeAsciiSanitizeShort", "(", "CharSequence", "value", ",", "int", "offset", ")", "{", "if", "(", "BIG_ENDIAN_NATIVE_ORDER", ")", "{", "// mimic a unsafe.getShort call on a big endian machine", "return", "(", "value", ".", "charAt", "(",...
Identical to {@link PlatformDependent0#hashCodeAsciiSanitize(short)} but for {@link CharSequence}.
[ "Identical", "to", "{" ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/common/src/main/java/io/netty/util/internal/PlatformDependent.java#L538-L546
alkacon/opencms-core
src/org/opencms/site/xmlsitemap/CmsXmlSitemapUrlBean.java
CmsXmlSitemapUrlBean.writeElement
public void writeElement(StringBuffer buffer, String tag, String content) { """ Writes a single XML element with text content to a string buffer.<p> @param buffer the string buffer to write to @param tag the XML tag name @param content the content of the XML element """ buffer.append("<" + tag ...
java
public void writeElement(StringBuffer buffer, String tag, String content) { buffer.append("<" + tag + ">"); buffer.append(CmsEncoder.escapeXml(content)); buffer.append("</" + tag + ">"); }
[ "public", "void", "writeElement", "(", "StringBuffer", "buffer", ",", "String", "tag", ",", "String", "content", ")", "{", "buffer", ".", "append", "(", "\"<\"", "+", "tag", "+", "\">\"", ")", ";", "buffer", ".", "append", "(", "CmsEncoder", ".", "escape...
Writes a single XML element with text content to a string buffer.<p> @param buffer the string buffer to write to @param tag the XML tag name @param content the content of the XML element
[ "Writes", "a", "single", "XML", "element", "with", "text", "content", "to", "a", "string", "buffer", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/site/xmlsitemap/CmsXmlSitemapUrlBean.java#L265-L270
galenframework/galen
galen-core/src/main/java/com/galenframework/javascript/GalenJsApi.java
GalenJsApi.checkPageSpecLayout
public static LayoutReport checkPageSpecLayout(WebDriver driver, PageSpec pageSpec, String[]includedTags, String[]excludedTags, String screenshotFilePath) throws IOException { """ Used in GalenApi.js @param driver @param pageSpec @param includedTags @param excludedTag...
java
public static LayoutReport checkPageSpecLayout(WebDriver driver, PageSpec pageSpec, String[]includedTags, String[]excludedTags, String screenshotFilePath) throws IOException { TestSession session = TestSession.current(); if (session == null) { throw...
[ "public", "static", "LayoutReport", "checkPageSpecLayout", "(", "WebDriver", "driver", ",", "PageSpec", "pageSpec", ",", "String", "[", "]", "includedTags", ",", "String", "[", "]", "excludedTags", ",", "String", "screenshotFilePath", ")", "throws", "IOException", ...
Used in GalenApi.js @param driver @param pageSpec @param includedTags @param excludedTags @param screenshotFilePath @return @throws IOException
[ "Used", "in", "GalenApi", ".", "js" ]
train
https://github.com/galenframework/galen/blob/6c7dc1f11d097e6aa49c45d6a77ee688741657a4/galen-core/src/main/java/com/galenframework/javascript/GalenJsApi.java#L125-L156
cloudant/java-cloudant
cloudant-client/src/main/java/com/cloudant/client/api/CloudantClient.java
CloudantClient.getActiveTasks
public List<Task> getActiveTasks() { """ Get the list of active tasks from the server. @return List of tasks @see <a href="https://console.bluemix.net/docs/services/Cloudant/api/active_tasks.html"> Active tasks</a> """ InputStream response = null; URI uri = new URIBase(getBaseUri()).path("...
java
public List<Task> getActiveTasks() { InputStream response = null; URI uri = new URIBase(getBaseUri()).path("_active_tasks").build(); try { response = couchDbClient.get(uri); return getResponseList(response, couchDbClient.getGson(), DeserializationTypes.TASKS); } f...
[ "public", "List", "<", "Task", ">", "getActiveTasks", "(", ")", "{", "InputStream", "response", "=", "null", ";", "URI", "uri", "=", "new", "URIBase", "(", "getBaseUri", "(", ")", ")", ".", "path", "(", "\"_active_tasks\"", ")", ".", "build", "(", ")",...
Get the list of active tasks from the server. @return List of tasks @see <a href="https://console.bluemix.net/docs/services/Cloudant/api/active_tasks.html"> Active tasks</a>
[ "Get", "the", "list", "of", "active", "tasks", "from", "the", "server", "." ]
train
https://github.com/cloudant/java-cloudant/blob/42c438654945361bded2cc0827afc046d535b31b/cloudant-client/src/main/java/com/cloudant/client/api/CloudantClient.java#L180-L189
alipay/sofa-rpc
core/common/src/main/java/com/alipay/sofa/rpc/common/utils/DateUtils.java
DateUtils.strToDate
public static Date strToDate(String dateStr, String format) throws ParseException { """ 字符串转时间 @param dateStr 时间字符串 @param format 格式化格式 @return 时间字符串 @throws ParseException 解析异常 """ return new SimpleDateFormat(format).parse(dateStr); }
java
public static Date strToDate(String dateStr, String format) throws ParseException { return new SimpleDateFormat(format).parse(dateStr); }
[ "public", "static", "Date", "strToDate", "(", "String", "dateStr", ",", "String", "format", ")", "throws", "ParseException", "{", "return", "new", "SimpleDateFormat", "(", "format", ")", ".", "parse", "(", "dateStr", ")", ";", "}" ]
字符串转时间 @param dateStr 时间字符串 @param format 格式化格式 @return 时间字符串 @throws ParseException 解析异常
[ "字符串转时间" ]
train
https://github.com/alipay/sofa-rpc/blob/a31406410291e56696185a29c3ba4bd1f54488fd/core/common/src/main/java/com/alipay/sofa/rpc/common/utils/DateUtils.java#L126-L128
nohana/Amalgam
amalgam/src/main/java/com/amalgam/app/SupportProgressDialogFragment.java
SupportProgressDialogFragment.newInstance
public static final SupportProgressDialogFragment newInstance(String title, String message, boolean indeterminate) { """ Create a new instance of the {@link com.amalgam.app.SupportProgressDialogFragment}. @param title the title text, can be null @param message the message text, must not be null. ...
java
public static final SupportProgressDialogFragment newInstance(String title, String message, boolean indeterminate) { SupportProgressDialogFragment fragment = new SupportProgressDialogFragment(); Bundle args = new Bundle(); args.putString(ARGS_TITLE, title); args.putString(ARGS_MESSAGE, m...
[ "public", "static", "final", "SupportProgressDialogFragment", "newInstance", "(", "String", "title", ",", "String", "message", ",", "boolean", "indeterminate", ")", "{", "SupportProgressDialogFragment", "fragment", "=", "new", "SupportProgressDialogFragment", "(", ")", ...
Create a new instance of the {@link com.amalgam.app.SupportProgressDialogFragment}. @param title the title text, can be null @param message the message text, must not be null. @param indeterminate indeterminate progress or not. @return the instance of the {@link com.amalgam.app.SupportProgressDialogFragm...
[ "Create", "a", "new", "instance", "of", "the", "{", "@link", "com", ".", "amalgam", ".", "app", ".", "SupportProgressDialogFragment", "}", "." ]
train
https://github.com/nohana/Amalgam/blob/57809ddbfe7897e979cf507982ce0b3aa5e0ed8a/amalgam/src/main/java/com/amalgam/app/SupportProgressDialogFragment.java#L63-L71
UrielCh/ovh-java-sdk
ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java
ApiOvhOrder.overTheBox_new_duration_POST
public OvhOrder overTheBox_new_duration_POST(String duration, String deviceId, String offer, String voucher) throws IOException { """ Create order REST: POST /order/overTheBox/new/{duration} @param offer [required] Offer name @param deviceId [required] The id of the device @param voucher [required] An option...
java
public OvhOrder overTheBox_new_duration_POST(String duration, String deviceId, String offer, String voucher) throws IOException { String qPath = "/order/overTheBox/new/{duration}"; StringBuilder sb = path(qPath, duration); HashMap<String, Object>o = new HashMap<String, Object>(); addBody(o, "deviceId", deviceId...
[ "public", "OvhOrder", "overTheBox_new_duration_POST", "(", "String", "duration", ",", "String", "deviceId", ",", "String", "offer", ",", "String", "voucher", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/order/overTheBox/new/{duration}\"", ";", "Strin...
Create order REST: POST /order/overTheBox/new/{duration} @param offer [required] Offer name @param deviceId [required] The id of the device @param voucher [required] An optional voucher @param duration [required] Duration
[ "Create", "order" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java#L3103-L3112
intendia-oss/rxjava-gwt
src/main/modified/io/reactivex/super/io/reactivex/Maybe.java
Maybe.onExceptionResumeNext
@CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Maybe<T> onExceptionResumeNext(final MaybeSource<? extends T> next) { """ Instructs a Maybe to pass control to another MaybeSource rather than invoking {@link MaybeObserver#onError onError} if it encounters an {@link java.lang.Excepti...
java
@CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Maybe<T> onExceptionResumeNext(final MaybeSource<? extends T> next) { ObjectHelper.requireNonNull(next, "next is null"); return RxJavaPlugins.onAssembly(new MaybeOnErrorNext<T>(this, Functions.justFunction(next), false)); ...
[ "@", "CheckReturnValue", "@", "SchedulerSupport", "(", "SchedulerSupport", ".", "NONE", ")", "public", "final", "Maybe", "<", "T", ">", "onExceptionResumeNext", "(", "final", "MaybeSource", "<", "?", "extends", "T", ">", "next", ")", "{", "ObjectHelper", ".", ...
Instructs a Maybe to pass control to another MaybeSource rather than invoking {@link MaybeObserver#onError onError} if it encounters an {@link java.lang.Exception}. <p> This differs from {@link #onErrorResumeNext} in that this one does not handle {@link java.lang.Throwable} or {@link java.lang.Error} but lets those con...
[ "Instructs", "a", "Maybe", "to", "pass", "control", "to", "another", "MaybeSource", "rather", "than", "invoking", "{", "@link", "MaybeObserver#onError", "onError", "}", "if", "it", "encounters", "an", "{", "@link", "java", ".", "lang", ".", "Exception", "}", ...
train
https://github.com/intendia-oss/rxjava-gwt/blob/8d5635b12ce40da99e76b59dc6bfe6fc2fffc1fa/src/main/modified/io/reactivex/super/io/reactivex/Maybe.java#L3713-L3718
apache/flink
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/StreamExecutionEnvironment.java
StreamExecutionEnvironment.fromParallelCollection
public <OUT> DataStreamSource<OUT> fromParallelCollection(SplittableIterator<OUT> iterator, Class<OUT> type) { """ Creates a new data stream that contains elements in the iterator. The iterator is splittable, allowing the framework to create a parallel data stream source that returns the elements in the iterator...
java
public <OUT> DataStreamSource<OUT> fromParallelCollection(SplittableIterator<OUT> iterator, Class<OUT> type) { return fromParallelCollection(iterator, TypeExtractor.getForClass(type)); }
[ "public", "<", "OUT", ">", "DataStreamSource", "<", "OUT", ">", "fromParallelCollection", "(", "SplittableIterator", "<", "OUT", ">", "iterator", ",", "Class", "<", "OUT", ">", "type", ")", "{", "return", "fromParallelCollection", "(", "iterator", ",", "TypeEx...
Creates a new data stream that contains elements in the iterator. The iterator is splittable, allowing the framework to create a parallel data stream source that returns the elements in the iterator. <p>Because the iterator will remain unmodified until the actual execution happens, the type of data returned by the ite...
[ "Creates", "a", "new", "data", "stream", "that", "contains", "elements", "in", "the", "iterator", ".", "The", "iterator", "is", "splittable", "allowing", "the", "framework", "to", "create", "a", "parallel", "data", "stream", "source", "that", "returns", "the",...
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/StreamExecutionEnvironment.java#L888-L890
apereo/cas
core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/EncodingUtils.java
EncodingUtils.urlEncode
@SneakyThrows public static String urlEncode(final String value, final String encoding) { """ Url encode a value. @param value the value to encode @param encoding the encoding @return the encoded value """ return URLEncoder.encode(value, encoding); }
java
@SneakyThrows public static String urlEncode(final String value, final String encoding) { return URLEncoder.encode(value, encoding); }
[ "@", "SneakyThrows", "public", "static", "String", "urlEncode", "(", "final", "String", "value", ",", "final", "String", "encoding", ")", "{", "return", "URLEncoder", ".", "encode", "(", "value", ",", "encoding", ")", ";", "}" ]
Url encode a value. @param value the value to encode @param encoding the encoding @return the encoded value
[ "Url", "encode", "a", "value", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/EncodingUtils.java#L240-L243
gsi-upm/Shanks
shanks-core/src/main/java/es/upm/dit/gsi/shanks/agent/capability/movement/Location.java
Location.isNearTo
public boolean isNearTo(Double3D location, double distance) { """ Compare two locations and return if the locations are near or not @param location Location to compare with @param distance The distance between two locations @return true is the real distance is lower or equals than the distance parameter "...
java
public boolean isNearTo(Double3D location, double distance) { if (this.is3DLocation()) { return this.getLocation3D().distance(location) < distance; } else { return false; } }
[ "public", "boolean", "isNearTo", "(", "Double3D", "location", ",", "double", "distance", ")", "{", "if", "(", "this", ".", "is3DLocation", "(", ")", ")", "{", "return", "this", ".", "getLocation3D", "(", ")", ".", "distance", "(", "location", ")", "<", ...
Compare two locations and return if the locations are near or not @param location Location to compare with @param distance The distance between two locations @return true is the real distance is lower or equals than the distance parameter
[ "Compare", "two", "locations", "and", "return", "if", "the", "locations", "are", "near", "or", "not" ]
train
https://github.com/gsi-upm/Shanks/blob/35d87a81c22731f4f83bbd0571c9c6d466bd16be/shanks-core/src/main/java/es/upm/dit/gsi/shanks/agent/capability/movement/Location.java#L168-L174
Bandwidth/java-bandwidth
src/main/java/com/bandwidth/sdk/model/PhoneNumber.java
PhoneNumber.create
public static PhoneNumber create(final BandwidthClient client, final Map<String, Object> params) throws Exception { """ Factory method to allocate a phone number given a set of params. Note that this assumes that the phone number has been previously search for as an AvailableNumber @param client the client @par...
java
public static PhoneNumber create(final BandwidthClient client, final Map<String, Object> params) throws Exception { final String uri = client.getUserResourceUri(BandwidthConstants.PHONE_NUMBER_URI_PATH); final RestResponse createResponse = client.post(uri, params); final RestResponse getResponse...
[ "public", "static", "PhoneNumber", "create", "(", "final", "BandwidthClient", "client", ",", "final", "Map", "<", "String", ",", "Object", ">", "params", ")", "throws", "Exception", "{", "final", "String", "uri", "=", "client", ".", "getUserResourceUri", "(", ...
Factory method to allocate a phone number given a set of params. Note that this assumes that the phone number has been previously search for as an AvailableNumber @param client the client @param params the params @return the PhoneNumber @throws IOException unexpected error.
[ "Factory", "method", "to", "allocate", "a", "phone", "number", "given", "a", "set", "of", "params", ".", "Note", "that", "this", "assumes", "that", "the", "phone", "number", "has", "been", "previously", "search", "for", "as", "an", "AvailableNumber" ]
train
https://github.com/Bandwidth/java-bandwidth/blob/2124c85148ad6a54d2f2949cb952eb3985830e2a/src/main/java/com/bandwidth/sdk/model/PhoneNumber.java#L80-L86
apache/incubator-gobblin
gobblin-core/src/main/java/org/apache/gobblin/converter/initializer/ConverterInitializerFactory.java
ConverterInitializerFactory.newInstance
public static ConverterInitializer newInstance(State state, WorkUnitStream workUnits) { """ Provides WriterInitializer based on the writer. Mostly writer is decided by the Writer builder (and destination) that user passes. If there's more than one branch, it will instantiate same number of WriterInitializer insta...
java
public static ConverterInitializer newInstance(State state, WorkUnitStream workUnits) { int branches = state.getPropAsInt(ConfigurationKeys.FORK_BRANCHES_KEY, 1); if (branches == 1) { return newInstance(state, workUnits, branches, 0); } List<ConverterInitializer> cis = Lists.newArrayList(); f...
[ "public", "static", "ConverterInitializer", "newInstance", "(", "State", "state", ",", "WorkUnitStream", "workUnits", ")", "{", "int", "branches", "=", "state", ".", "getPropAsInt", "(", "ConfigurationKeys", ".", "FORK_BRANCHES_KEY", ",", "1", ")", ";", "if", "(...
Provides WriterInitializer based on the writer. Mostly writer is decided by the Writer builder (and destination) that user passes. If there's more than one branch, it will instantiate same number of WriterInitializer instance as number of branches and combine it into MultiWriterInitializer. @param state @return Writer...
[ "Provides", "WriterInitializer", "based", "on", "the", "writer", ".", "Mostly", "writer", "is", "decided", "by", "the", "Writer", "builder", "(", "and", "destination", ")", "that", "user", "passes", ".", "If", "there", "s", "more", "than", "one", "branch", ...
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-core/src/main/java/org/apache/gobblin/converter/initializer/ConverterInitializerFactory.java#L43-L54
Azure/azure-sdk-for-java
eventgrid/resource-manager/v2018_09_15_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2018_09_15_preview/implementation/DomainsInner.java
DomainsInner.getByResourceGroupAsync
public Observable<DomainInner> getByResourceGroupAsync(String resourceGroupName, String domainName) { """ Get a domain. Get properties of a domain. @param resourceGroupName The name of the resource group within the user's subscription. @param domainName Name of the domain @throws IllegalArgumentException thr...
java
public Observable<DomainInner> getByResourceGroupAsync(String resourceGroupName, String domainName) { return getByResourceGroupWithServiceResponseAsync(resourceGroupName, domainName).map(new Func1<ServiceResponse<DomainInner>, DomainInner>() { @Override public DomainInner call(ServiceRes...
[ "public", "Observable", "<", "DomainInner", ">", "getByResourceGroupAsync", "(", "String", "resourceGroupName", ",", "String", "domainName", ")", "{", "return", "getByResourceGroupWithServiceResponseAsync", "(", "resourceGroupName", ",", "domainName", ")", ".", "map", "...
Get a domain. Get properties of a domain. @param resourceGroupName The name of the resource group within the user's subscription. @param domainName Name of the domain @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the DomainInner object
[ "Get", "a", "domain", ".", "Get", "properties", "of", "a", "domain", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/eventgrid/resource-manager/v2018_09_15_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2018_09_15_preview/implementation/DomainsInner.java#L153-L160
maven-nar/nar-maven-plugin
src/main/java/com/github/maven_nar/cpptasks/apple/XcodeProjectWriter.java
XcodeProjectWriter.createPBXGroup
private static PBXObjectRef createPBXGroup(final String name, final String sourceTree, final List children) { """ Create PBXGroup. @param name group name. @param sourceTree source tree. @param children list of PBXFileReferences. @return group. """ final Map map = new HashMap(); map.put("isa", ...
java
private static PBXObjectRef createPBXGroup(final String name, final String sourceTree, final List children) { final Map map = new HashMap(); map.put("isa", "PBXGroup"); map.put("name", name); map.put("sourceTree", sourceTree); map.put("children", children); return new PBXObjectRef(map); }
[ "private", "static", "PBXObjectRef", "createPBXGroup", "(", "final", "String", "name", ",", "final", "String", "sourceTree", ",", "final", "List", "children", ")", "{", "final", "Map", "map", "=", "new", "HashMap", "(", ")", ";", "map", ".", "put", "(", ...
Create PBXGroup. @param name group name. @param sourceTree source tree. @param children list of PBXFileReferences. @return group.
[ "Create", "PBXGroup", "." ]
train
https://github.com/maven-nar/nar-maven-plugin/blob/3c622e2024296b4203431bbae3bde290a01dac00/src/main/java/com/github/maven_nar/cpptasks/apple/XcodeProjectWriter.java#L245-L252
googleapis/google-cloud-java
google-cloud-clients/google-cloud-iot/src/main/java/com/google/cloud/iot/v1/DeviceManagerClient.java
DeviceManagerClient.modifyCloudToDeviceConfig
public final DeviceConfig modifyCloudToDeviceConfig(DeviceName name, ByteString binaryData) { """ Modifies the configuration for the device, which is eventually sent from the Cloud IoT Core servers. Returns the modified configuration version and its metadata. <p>Sample code: <pre><code> try (DeviceManagerC...
java
public final DeviceConfig modifyCloudToDeviceConfig(DeviceName name, ByteString binaryData) { ModifyCloudToDeviceConfigRequest request = ModifyCloudToDeviceConfigRequest.newBuilder() .setName(name == null ? null : name.toString()) .setBinaryData(binaryData) .build(); ...
[ "public", "final", "DeviceConfig", "modifyCloudToDeviceConfig", "(", "DeviceName", "name", ",", "ByteString", "binaryData", ")", "{", "ModifyCloudToDeviceConfigRequest", "request", "=", "ModifyCloudToDeviceConfigRequest", ".", "newBuilder", "(", ")", ".", "setName", "(", ...
Modifies the configuration for the device, which is eventually sent from the Cloud IoT Core servers. Returns the modified configuration version and its metadata. <p>Sample code: <pre><code> try (DeviceManagerClient deviceManagerClient = DeviceManagerClient.create()) { DeviceName name = DeviceName.of("[PROJECT]", "[LO...
[ "Modifies", "the", "configuration", "for", "the", "device", "which", "is", "eventually", "sent", "from", "the", "Cloud", "IoT", "Core", "servers", ".", "Returns", "the", "modified", "configuration", "version", "and", "its", "metadata", "." ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-iot/src/main/java/com/google/cloud/iot/v1/DeviceManagerClient.java#L1210-L1218
playn/playn
core/src/playn/core/TextBlock.java
TextBlock.toCanvas
public Canvas toCanvas(Graphics gfx, Align align, int fillColor) { """ Creates a canvas image large enough to accommodate this text block and renders the lines into it. The image will include padding around the edge to ensure that antialiasing has a bit of extra space to do its work. """ float pad = 1/gf...
java
public Canvas toCanvas(Graphics gfx, Align align, int fillColor) { float pad = 1/gfx.scale().factor; Canvas canvas = gfx.createCanvas(bounds.width()+2*pad, bounds.height()+2*pad); canvas.setFillColor(fillColor); fill(canvas, align, pad, pad); return canvas; }
[ "public", "Canvas", "toCanvas", "(", "Graphics", "gfx", ",", "Align", "align", ",", "int", "fillColor", ")", "{", "float", "pad", "=", "1", "/", "gfx", ".", "scale", "(", ")", ".", "factor", ";", "Canvas", "canvas", "=", "gfx", ".", "createCanvas", "...
Creates a canvas image large enough to accommodate this text block and renders the lines into it. The image will include padding around the edge to ensure that antialiasing has a bit of extra space to do its work.
[ "Creates", "a", "canvas", "image", "large", "enough", "to", "accommodate", "this", "text", "block", "and", "renders", "the", "lines", "into", "it", ".", "The", "image", "will", "include", "padding", "around", "the", "edge", "to", "ensure", "that", "antialias...
train
https://github.com/playn/playn/blob/7e7a9d048ba6afe550dc0cdeaca3e1d5b0d01c66/core/src/playn/core/TextBlock.java#L137-L143
ironjacamar/ironjacamar
web/src/main/java/org/ironjacamar/web/console/HtmlAdaptorServlet.java
HtmlAdaptorServlet.invokeOp
private void invokeOp(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { """ Invoke a MBean operation given the index into the MBeanOperationInfo{} array of the mbean. @param request The HTTP request @param response The HTTP response @exception ServletExcepti...
java
private void invokeOp(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String reqname = request.getParameter("name"); String name = URLDecoder.decode(reqname, "UTF-8"); if (trace) log.trace("invokeOp, name=" + name); String[] a...
[ "private", "void", "invokeOp", "(", "HttpServletRequest", "request", ",", "HttpServletResponse", "response", ")", "throws", "ServletException", ",", "IOException", "{", "String", "reqname", "=", "request", ".", "getParameter", "(", "\"name\"", ")", ";", "String", ...
Invoke a MBean operation given the index into the MBeanOperationInfo{} array of the mbean. @param request The HTTP request @param response The HTTP response @exception ServletException Thrown if an error occurs @exception IOException Thrown if an I/O error occurs
[ "Invoke", "a", "MBean", "operation", "given", "the", "index", "into", "the", "MBeanOperationInfo", "{}", "array", "of", "the", "mbean", "." ]
train
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/web/src/main/java/org/ironjacamar/web/console/HtmlAdaptorServlet.java#L256-L285
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/collection/impl/queue/QueueContainer.java
QueueContainer.pollBackup
public void pollBackup(long itemId) { """ Polls an item on the backup replica. The item ID is predetermined when executing the poll operation on the partition owner. Executed on the backup replica @param itemId the item ID as determined by the primary replica """ QueueItem item = getBackupMap().re...
java
public void pollBackup(long itemId) { QueueItem item = getBackupMap().remove(itemId); if (item != null) { // for stats age(item, Clock.currentTimeMillis()); } }
[ "public", "void", "pollBackup", "(", "long", "itemId", ")", "{", "QueueItem", "item", "=", "getBackupMap", "(", ")", ".", "remove", "(", "itemId", ")", ";", "if", "(", "item", "!=", "null", ")", "{", "// for stats", "age", "(", "item", ",", "Clock", ...
Polls an item on the backup replica. The item ID is predetermined when executing the poll operation on the partition owner. Executed on the backup replica @param itemId the item ID as determined by the primary replica
[ "Polls", "an", "item", "on", "the", "backup", "replica", ".", "The", "item", "ID", "is", "predetermined", "when", "executing", "the", "poll", "operation", "on", "the", "partition", "owner", ".", "Executed", "on", "the", "backup", "replica" ]
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/collection/impl/queue/QueueContainer.java#L574-L580
Azure/azure-sdk-for-java
appservice/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/appservice/v2018_02_01/implementation/TopLevelDomainsInner.java
TopLevelDomainsInner.listAgreementsAsync
public Observable<Page<TldLegalAgreementInner>> listAgreementsAsync(final String name, final TopLevelDomainAgreementOption agreementOption) { """ Gets all legal agreements that user needs to accept before purchasing a domain. Gets all legal agreements that user needs to accept before purchasing a domain. @para...
java
public Observable<Page<TldLegalAgreementInner>> listAgreementsAsync(final String name, final TopLevelDomainAgreementOption agreementOption) { return listAgreementsWithServiceResponseAsync(name, agreementOption) .map(new Func1<ServiceResponse<Page<TldLegalAgreementInner>>, Page<TldLegalAgreementInner...
[ "public", "Observable", "<", "Page", "<", "TldLegalAgreementInner", ">", ">", "listAgreementsAsync", "(", "final", "String", "name", ",", "final", "TopLevelDomainAgreementOption", "agreementOption", ")", "{", "return", "listAgreementsWithServiceResponseAsync", "(", "name"...
Gets all legal agreements that user needs to accept before purchasing a domain. Gets all legal agreements that user needs to accept before purchasing a domain. @param name Name of the top-level domain. @param agreementOption Domain agreement options. @throws IllegalArgumentException thrown if parameters fail the valid...
[ "Gets", "all", "legal", "agreements", "that", "user", "needs", "to", "accept", "before", "purchasing", "a", "domain", ".", "Gets", "all", "legal", "agreements", "that", "user", "needs", "to", "accept", "before", "purchasing", "a", "domain", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/appservice/v2018_02_01/implementation/TopLevelDomainsInner.java#L333-L341
santhosh-tekuri/jlibs
core/src/main/java/jlibs/core/lang/BeanUtil.java
BeanUtil.getProperty
@SuppressWarnings( { """ Returns the value of the specified <code>property</code> in given <code>bean</code> @param bean bean object @param property property name whose value needs to be returned @return value of the property. @throws InvocationTargetException if method invocation fails @throws N...
java
@SuppressWarnings({"unchecked"}) public static <T> T getProperty(Object bean, String property) throws InvocationTargetException{ try{ return (T)getGetterMethod(bean.getClass(), property).invoke(bean); }catch(IllegalAccessException ex){ throw new ImpossibleException(ex); // be...
[ "@", "SuppressWarnings", "(", "{", "\"unchecked\"", "}", ")", "public", "static", "<", "T", ">", "T", "getProperty", "(", "Object", "bean", ",", "String", "property", ")", "throws", "InvocationTargetException", "{", "try", "{", "return", "(", "T", ")", "ge...
Returns the value of the specified <code>property</code> in given <code>bean</code> @param bean bean object @param property property name whose value needs to be returned @return value of the property. @throws InvocationTargetException if method invocation fails @throws NullPointerException if <code>property<...
[ "Returns", "the", "value", "of", "the", "specified", "<code", ">", "property<", "/", "code", ">", "in", "given", "<code", ">", "bean<", "/", "code", ">" ]
train
https://github.com/santhosh-tekuri/jlibs/blob/59c28719f054123cf778278154e1b92e943ad232/core/src/main/java/jlibs/core/lang/BeanUtil.java#L205-L212
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/http/HttpHeaderMap.java
HttpHeaderMap.setHeader
public void setHeader (@Nonnull @Nonempty final String sName, @Nullable final String sValue) { """ Set the passed header as is. @param sName Header name. May neither be <code>null</code> nor empty. @param sValue The value to be set. May be <code>null</code> in which case nothing happens. """ if (sVa...
java
public void setHeader (@Nonnull @Nonempty final String sName, @Nullable final String sValue) { if (sValue != null) _setHeader (sName, sValue); }
[ "public", "void", "setHeader", "(", "@", "Nonnull", "@", "Nonempty", "final", "String", "sName", ",", "@", "Nullable", "final", "String", "sValue", ")", "{", "if", "(", "sValue", "!=", "null", ")", "_setHeader", "(", "sName", ",", "sValue", ")", ";", "...
Set the passed header as is. @param sName Header name. May neither be <code>null</code> nor empty. @param sValue The value to be set. May be <code>null</code> in which case nothing happens.
[ "Set", "the", "passed", "header", "as", "is", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/http/HttpHeaderMap.java#L190-L194
Ellzord/JALSE
src/main/java/jalse/entities/DefaultEntityProxyFactory.java
DefaultEntityProxyFactory.uncacheProxyOfEntity
public void uncacheProxyOfEntity(final Entity e, final Class<? extends Entity> type) { """ Uncaches the specific type proxy for an entity. @param e Entity to uncache for. @param type Proxy type. """ cache.invalidateType(e, type); }
java
public void uncacheProxyOfEntity(final Entity e, final Class<? extends Entity> type) { cache.invalidateType(e, type); }
[ "public", "void", "uncacheProxyOfEntity", "(", "final", "Entity", "e", ",", "final", "Class", "<", "?", "extends", "Entity", ">", "type", ")", "{", "cache", ".", "invalidateType", "(", "e", ",", "type", ")", ";", "}" ]
Uncaches the specific type proxy for an entity. @param e Entity to uncache for. @param type Proxy type.
[ "Uncaches", "the", "specific", "type", "proxy", "for", "an", "entity", "." ]
train
https://github.com/Ellzord/JALSE/blob/43fc6572de9b16eb8474aa21a88b6b2d11291615/src/main/java/jalse/entities/DefaultEntityProxyFactory.java#L277-L279
UrielCh/ovh-java-sdk
ovh-java-sdk-emailexchange/src/main/java/net/minidev/ovh/api/ApiOvhEmailexchange.java
ApiOvhEmailexchange.organizationName_service_exchangeService_serviceInfos_PUT
public void organizationName_service_exchangeService_serviceInfos_PUT(String organizationName, String exchangeService, OvhService body) throws IOException { """ Alter this object properties REST: PUT /email/exchange/{organizationName}/service/{exchangeService}/serviceInfos @param body [required] New object pro...
java
public void organizationName_service_exchangeService_serviceInfos_PUT(String organizationName, String exchangeService, OvhService body) throws IOException { String qPath = "/email/exchange/{organizationName}/service/{exchangeService}/serviceInfos"; StringBuilder sb = path(qPath, organizationName, exchangeService); ...
[ "public", "void", "organizationName_service_exchangeService_serviceInfos_PUT", "(", "String", "organizationName", ",", "String", "exchangeService", ",", "OvhService", "body", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/email/exchange/{organizationName}/servic...
Alter this object properties REST: PUT /email/exchange/{organizationName}/service/{exchangeService}/serviceInfos @param body [required] New object properties @param organizationName [required] The internal name of your exchange organization @param exchangeService [required] The internal name of your exchange service
[ "Alter", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-emailexchange/src/main/java/net/minidev/ovh/api/ApiOvhEmailexchange.java#L351-L355
looly/hutool
hutool-core/src/main/java/cn/hutool/core/util/ReflectUtil.java
ReflectUtil.getMethodByName
public static Method getMethodByName(Class<?> clazz, String methodName) throws SecurityException { """ 按照方法名查找指定方法名的方法,只返回匹配到的第一个方法,如果找不到对应的方法则返回<code>null</code> <p> 此方法只检查方法名是否一致,并不检查参数的一致性。 </p> @param clazz 类,如果为{@code null}返回{@code null} @param methodName 方法名,如果为空字符串返回{@code null} @return 方法 @throw...
java
public static Method getMethodByName(Class<?> clazz, String methodName) throws SecurityException { return getMethodByName(clazz, false, methodName); }
[ "public", "static", "Method", "getMethodByName", "(", "Class", "<", "?", ">", "clazz", ",", "String", "methodName", ")", "throws", "SecurityException", "{", "return", "getMethodByName", "(", "clazz", ",", "false", ",", "methodName", ")", ";", "}" ]
按照方法名查找指定方法名的方法,只返回匹配到的第一个方法,如果找不到对应的方法则返回<code>null</code> <p> 此方法只检查方法名是否一致,并不检查参数的一致性。 </p> @param clazz 类,如果为{@code null}返回{@code null} @param methodName 方法名,如果为空字符串返回{@code null} @return 方法 @throws SecurityException 无权访问抛出异常 @since 4.3.2
[ "按照方法名查找指定方法名的方法,只返回匹配到的第一个方法,如果找不到对应的方法则返回<code", ">", "null<", "/", "code", ">" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/ReflectUtil.java#L481-L483
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.jms.2.0/src/com/ibm/ws/sib/api/jms/impl/JmsBytesMessageImpl.java
JmsBytesMessageImpl.writeBytes
@Override public void writeBytes(byte[] value, int offset, int length) throws JMSException { """ Write a portion of a byte array to the stream message. @param value the byte array value to be written. @param offset the initial offset within the byte array. @param length the number of bytes to use. @exc...
java
@Override public void writeBytes(byte[] value, int offset, int length) throws JMSException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "writeBytes", new Object[] { value, offset, length }); try { // Check if the producer has promi...
[ "@", "Override", "public", "void", "writeBytes", "(", "byte", "[", "]", "value", ",", "int", "offset", ",", "int", "length", ")", "throws", "JMSException", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isEntryEna...
Write a portion of a byte array to the stream message. @param value the byte array value to be written. @param offset the initial offset within the byte array. @param length the number of bytes to use. @exception MessageNotWriteableException if message in read-only mode. @exception JMSException if JMS fails to write ...
[ "Write", "a", "portion", "of", "a", "byte", "array", "to", "the", "stream", "message", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.jms.2.0/src/com/ibm/ws/sib/api/jms/impl/JmsBytesMessageImpl.java#L1200-L1239
lucee/Lucee
core/src/main/java/lucee/transformer/cfml/script/AbstrCFMLScriptTransformer.java
AbstrCFMLScriptTransformer.switchBlock
private final void switchBlock(Data data, Body body) throws TemplateException { """ Liest ein Switch Block ein @param block @throws TemplateException """ while (data.srcCode.isValidIndex()) { comments(data); if (data.srcCode.isCurrent("case ") || data.srcCode.isCurrent("default", ':') || data.sr...
java
private final void switchBlock(Data data, Body body) throws TemplateException { while (data.srcCode.isValidIndex()) { comments(data); if (data.srcCode.isCurrent("case ") || data.srcCode.isCurrent("default", ':') || data.srcCode.isCurrent('}')) return; Body prior = data.setParent(body); statement(d...
[ "private", "final", "void", "switchBlock", "(", "Data", "data", ",", "Body", "body", ")", "throws", "TemplateException", "{", "while", "(", "data", ".", "srcCode", ".", "isValidIndex", "(", ")", ")", "{", "comments", "(", "data", ")", ";", "if", "(", "...
Liest ein Switch Block ein @param block @throws TemplateException
[ "Liest", "ein", "Switch", "Block", "ein" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/transformer/cfml/script/AbstrCFMLScriptTransformer.java#L534-L543
jhunters/jprotobuf
v3/src/main/java/com/baidu/bjf/remoting/protobuf/utils/CodePrinter.java
CodePrinter.printCode
public static void printCode(String code, String desc) { """ print code to console @param code code in string @param desc code description """ System.out.println("--------------------------" + desc + " begin--------------------------"); System.out.println(code); System.out.printl...
java
public static void printCode(String code, String desc) { System.out.println("--------------------------" + desc + " begin--------------------------"); System.out.println(code); System.out.println("--------------------------" + desc + " end--------------------------"); }
[ "public", "static", "void", "printCode", "(", "String", "code", ",", "String", "desc", ")", "{", "System", ".", "out", ".", "println", "(", "\"--------------------------\"", "+", "desc", "+", "\" begin--------------------------\"", ")", ";", "System", ".", "out"...
print code to console @param code code in string @param desc code description
[ "print", "code", "to", "console" ]
train
https://github.com/jhunters/jprotobuf/blob/55832c9b4792afb128e5b35139d8a3891561d8a3/v3/src/main/java/com/baidu/bjf/remoting/protobuf/utils/CodePrinter.java#L33-L37
cojen/Cojen
src/main/java/org/cojen/classfile/MethodDesc.java
MethodDesc.toMethodSignature
public String toMethodSignature(String name, boolean varargs) { """ Returns this in Java method signature syntax. @param name method name @param varargs request that the last argument, if it is an array, to be formatted in varargs syntax. """ StringBuffer buf = new StringBuffer(); buf.appe...
java
public String toMethodSignature(String name, boolean varargs) { StringBuffer buf = new StringBuffer(); buf.append(mRetType.getFullName()); buf.append(' '); buf.append(name); buf.append('('); TypeDesc[] params = mParams; for (int i=0; i<params.length; i++) { ...
[ "public", "String", "toMethodSignature", "(", "String", "name", ",", "boolean", "varargs", ")", "{", "StringBuffer", "buf", "=", "new", "StringBuffer", "(", ")", ";", "buf", ".", "append", "(", "mRetType", ".", "getFullName", "(", ")", ")", ";", "buf", "...
Returns this in Java method signature syntax. @param name method name @param varargs request that the last argument, if it is an array, to be formatted in varargs syntax.
[ "Returns", "this", "in", "Java", "method", "signature", "syntax", "." ]
train
https://github.com/cojen/Cojen/blob/ddee9a0fde83870b97e0ed04c58270aa665f3a62/src/main/java/org/cojen/classfile/MethodDesc.java#L202-L224
goldmansachs/gs-collections
collections/src/main/java/com/gs/collections/impl/utility/ListIterate.java
ListIterate.forEachInBoth
public static <T1, T2> void forEachInBoth(List<T1> list1, List<T2> list2, Procedure2<? super T1, ? super T2> procedure) { """ Iterates over both lists together, evaluating Procedure2 with the current element from each list. """ if (list1 != null && list2 != null) { if (list1.size() ...
java
public static <T1, T2> void forEachInBoth(List<T1> list1, List<T2> list2, Procedure2<? super T1, ? super T2> procedure) { if (list1 != null && list2 != null) { if (list1.size() == list2.size()) { if (list1 instanceof RandomAccess && list2 instanceof RandomAcce...
[ "public", "static", "<", "T1", ",", "T2", ">", "void", "forEachInBoth", "(", "List", "<", "T1", ">", "list1", ",", "List", "<", "T2", ">", "list2", ",", "Procedure2", "<", "?", "super", "T1", ",", "?", "super", "T2", ">", "procedure", ")", "{", "...
Iterates over both lists together, evaluating Procedure2 with the current element from each list.
[ "Iterates", "over", "both", "lists", "together", "evaluating", "Procedure2", "with", "the", "current", "element", "from", "each", "list", "." ]
train
https://github.com/goldmansachs/gs-collections/blob/fa8bf3e103689efa18bca2ab70203e71cde34b52/collections/src/main/java/com/gs/collections/impl/utility/ListIterate.java#L806-L835
Azure/azure-sdk-for-java
cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java
ModelsImpl.listHierarchicalEntitiesWithServiceResponseAsync
public Observable<ServiceResponse<List<HierarchicalEntityExtractor>>> listHierarchicalEntitiesWithServiceResponseAsync(UUID appId, String versionId, ListHierarchicalEntitiesOptionalParameter listHierarchicalEntitiesOptionalParameter) { """ Gets information about the hierarchical entity models. @param appId The ...
java
public Observable<ServiceResponse<List<HierarchicalEntityExtractor>>> listHierarchicalEntitiesWithServiceResponseAsync(UUID appId, String versionId, ListHierarchicalEntitiesOptionalParameter listHierarchicalEntitiesOptionalParameter) { if (this.client.endpoint() == null) { throw new IllegalArgumentE...
[ "public", "Observable", "<", "ServiceResponse", "<", "List", "<", "HierarchicalEntityExtractor", ">", ">", ">", "listHierarchicalEntitiesWithServiceResponseAsync", "(", "UUID", "appId", ",", "String", "versionId", ",", "ListHierarchicalEntitiesOptionalParameter", "listHierarc...
Gets information about the hierarchical entity models. @param appId The application ID. @param versionId The version ID. @param listHierarchicalEntitiesOptionalParameter the object representing the optional parameters to be set before calling this API @throws IllegalArgumentException thrown if parameters fail the vali...
[ "Gets", "information", "about", "the", "hierarchical", "entity", "models", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java#L1418-L1432
camunda/camunda-bpmn-model
src/main/java/org/camunda/bpm/model/bpmn/builder/AbstractUserTaskBuilder.java
AbstractUserTaskBuilder.camundaTaskListenerClass
@SuppressWarnings("rawtypes") public B camundaTaskListenerClass(String eventName, Class listenerClass) { """ Add a class based task listener with specified event name @param eventName - event names to listen to @param fullQualifiedClassName - a string representing a class @return the builder object """ ...
java
@SuppressWarnings("rawtypes") public B camundaTaskListenerClass(String eventName, Class listenerClass) { return camundaTaskListenerClass(eventName, listenerClass.getName()); }
[ "@", "SuppressWarnings", "(", "\"rawtypes\"", ")", "public", "B", "camundaTaskListenerClass", "(", "String", "eventName", ",", "Class", "listenerClass", ")", "{", "return", "camundaTaskListenerClass", "(", "eventName", ",", "listenerClass", ".", "getName", "(", ")",...
Add a class based task listener with specified event name @param eventName - event names to listen to @param fullQualifiedClassName - a string representing a class @return the builder object
[ "Add", "a", "class", "based", "task", "listener", "with", "specified", "event", "name" ]
train
https://github.com/camunda/camunda-bpmn-model/blob/debcadf041d10fa62b799de0307b832cea84e5d4/src/main/java/org/camunda/bpm/model/bpmn/builder/AbstractUserTaskBuilder.java#L189-L192
jferard/fastods
fastods/src/main/java/com/github/jferard/fastods/odselement/OdsElements.java
OdsElements.writeImmutableElements
public void writeImmutableElements(final XMLUtil xmlUtil, final ZipUTF8Writer writer) throws IOException { """ Write the mimetype and manifest elements to a writer. @param xmlUtil the xml util @param writer the writer @throws IOException if write fails """ this.logger.log(Level.FINER, "Writing o...
java
public void writeImmutableElements(final XMLUtil xmlUtil, final ZipUTF8Writer writer) throws IOException { this.logger.log(Level.FINER, "Writing odselement: mimeTypeEntry to zip file"); this.mimetypeElement.write(xmlUtil, writer); this.logger.log(Level.FINER, "Writing odselement: manifestElem...
[ "public", "void", "writeImmutableElements", "(", "final", "XMLUtil", "xmlUtil", ",", "final", "ZipUTF8Writer", "writer", ")", "throws", "IOException", "{", "this", ".", "logger", ".", "log", "(", "Level", ".", "FINER", ",", "\"Writing odselement: mimeTypeEntry to zi...
Write the mimetype and manifest elements to a writer. @param xmlUtil the xml util @param writer the writer @throws IOException if write fails
[ "Write", "the", "mimetype", "and", "manifest", "elements", "to", "a", "writer", "." ]
train
https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/odselement/OdsElements.java#L385-L390
Azure/azure-sdk-for-java
containerregistry/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/containerregistry/v2017_10_01/implementation/RegistriesInner.java
RegistriesInner.beginUpdatePoliciesAsync
public Observable<RegistryPoliciesInner> beginUpdatePoliciesAsync(String resourceGroupName, String registryName, RegistryPoliciesInner registryPoliciesUpdateParameters) { """ Updates the policies for the specified container registry. @param resourceGroupName The name of the resource group to which the container...
java
public Observable<RegistryPoliciesInner> beginUpdatePoliciesAsync(String resourceGroupName, String registryName, RegistryPoliciesInner registryPoliciesUpdateParameters) { return beginUpdatePoliciesWithServiceResponseAsync(resourceGroupName, registryName, registryPoliciesUpdateParameters).map(new Func1<ServiceRe...
[ "public", "Observable", "<", "RegistryPoliciesInner", ">", "beginUpdatePoliciesAsync", "(", "String", "resourceGroupName", ",", "String", "registryName", ",", "RegistryPoliciesInner", "registryPoliciesUpdateParameters", ")", "{", "return", "beginUpdatePoliciesWithServiceResponseA...
Updates the policies for the specified container registry. @param resourceGroupName The name of the resource group to which the container registry belongs. @param registryName The name of the container registry. @param registryPoliciesUpdateParameters The parameters for updating policies of a container registry. @thro...
[ "Updates", "the", "policies", "for", "the", "specified", "container", "registry", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/containerregistry/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/containerregistry/v2017_10_01/implementation/RegistriesInner.java#L1682-L1689
m-m-m/util
nls/src/main/java/net/sf/mmm/util/nls/base/AbstractNlsTemplate.java
AbstractNlsTemplate.createFormatter
protected NlsMessageFormatter createFormatter(String messageTemplate, Locale locale, NlsDependencies nlsDependencies) { """ This method creates an {@link NlsMessageFormatter} for the given {@code messageTemplate} and {@code locale}. @param messageTemplate is the template of the message for the given {@code loca...
java
protected NlsMessageFormatter createFormatter(String messageTemplate, Locale locale, NlsDependencies nlsDependencies) { return nlsDependencies.getMessageFormatterFactory().create(messageTemplate); }
[ "protected", "NlsMessageFormatter", "createFormatter", "(", "String", "messageTemplate", ",", "Locale", "locale", ",", "NlsDependencies", "nlsDependencies", ")", "{", "return", "nlsDependencies", ".", "getMessageFormatterFactory", "(", ")", ".", "create", "(", "messageT...
This method creates an {@link NlsMessageFormatter} for the given {@code messageTemplate} and {@code locale}. @param messageTemplate is the template of the message for the given {@code locale}. @param locale is the locale to use. The implementation may ignore it here because it is also supplied to {@link net.sf.mmm.uti...
[ "This", "method", "creates", "an", "{", "@link", "NlsMessageFormatter", "}", "for", "the", "given", "{", "@code", "messageTemplate", "}", "and", "{", "@code", "locale", "}", "." ]
train
https://github.com/m-m-m/util/blob/f0e4e084448f8dfc83ca682a9e1618034a094ce6/nls/src/main/java/net/sf/mmm/util/nls/base/AbstractNlsTemplate.java#L41-L44
apache/flink
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/AsyncDataStream.java
AsyncDataStream.unorderedWait
public static <IN, OUT> SingleOutputStreamOperator<OUT> unorderedWait( DataStream<IN> in, AsyncFunction<IN, OUT> func, long timeout, TimeUnit timeUnit, int capacity) { """ Add an AsyncWaitOperator. The order of output stream records may be reordered. @param in Input {@link DataStream} @param fun...
java
public static <IN, OUT> SingleOutputStreamOperator<OUT> unorderedWait( DataStream<IN> in, AsyncFunction<IN, OUT> func, long timeout, TimeUnit timeUnit, int capacity) { return addOperator(in, func, timeUnit.toMillis(timeout), capacity, OutputMode.UNORDERED); }
[ "public", "static", "<", "IN", ",", "OUT", ">", "SingleOutputStreamOperator", "<", "OUT", ">", "unorderedWait", "(", "DataStream", "<", "IN", ">", "in", ",", "AsyncFunction", "<", "IN", ",", "OUT", ">", "func", ",", "long", "timeout", ",", "TimeUnit", "t...
Add an AsyncWaitOperator. The order of output stream records may be reordered. @param in Input {@link DataStream} @param func {@link AsyncFunction} @param timeout for the asynchronous operation to complete @param timeUnit of the given timeout @param capacity The max number of async i/o operation that can be triggered ...
[ "Add", "an", "AsyncWaitOperator", ".", "The", "order", "of", "output", "stream", "records", "may", "be", "reordered", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/AsyncDataStream.java#L102-L109
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/ValueEnforcer.java
ValueEnforcer.notEmpty
@CodingStyleguideUnaware public static <T extends Collection <?>> T notEmpty (final T aValue, final String sName) { """ Check that the passed {@link Collection} is neither <code>null</code> nor empty. @param <T> Type to be checked and returned @param aValue The String to check. @param sName The name of ...
java
@CodingStyleguideUnaware public static <T extends Collection <?>> T notEmpty (final T aValue, final String sName) { if (isEnabled ()) return notEmpty (aValue, () -> sName); return aValue; }
[ "@", "CodingStyleguideUnaware", "public", "static", "<", "T", "extends", "Collection", "<", "?", ">", ">", "T", "notEmpty", "(", "final", "T", "aValue", ",", "final", "String", "sName", ")", "{", "if", "(", "isEnabled", "(", ")", ")", "return", "notEmpty...
Check that the passed {@link Collection} is neither <code>null</code> nor empty. @param <T> Type to be checked and returned @param aValue The String to check. @param sName The name of the value (e.g. the parameter name) @return The passed value. @throws IllegalArgumentException if the passed value is empty
[ "Check", "that", "the", "passed", "{", "@link", "Collection", "}", "is", "neither", "<code", ">", "null<", "/", "code", ">", "nor", "empty", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/ValueEnforcer.java#L735-L741
GenesysPureEngage/provisioning-client-java
src/main/java/com/genesys/internal/provisioning/api/UsersApi.java
UsersApi.getCurrentUserWithHttpInfo
public ApiResponse<GetUsersSuccessResponse> getCurrentUserWithHttpInfo() throws ApiException { """ Get the logged in user. Get the [CfgPerson](https://docs.genesys.com/Documentation/PSDK/latest/ConfigLayerRef/CfgPerson) object for the currently logged in user. @return ApiResponse&lt;GetUsersSuccessResponse&gt; ...
java
public ApiResponse<GetUsersSuccessResponse> getCurrentUserWithHttpInfo() throws ApiException { com.squareup.okhttp.Call call = getCurrentUserValidateBeforeCall(null, null); Type localVarReturnType = new TypeToken<GetUsersSuccessResponse>(){}.getType(); return apiClient.execute(call, localVarRetu...
[ "public", "ApiResponse", "<", "GetUsersSuccessResponse", ">", "getCurrentUserWithHttpInfo", "(", ")", "throws", "ApiException", "{", "com", ".", "squareup", ".", "okhttp", ".", "Call", "call", "=", "getCurrentUserValidateBeforeCall", "(", "null", ",", "null", ")", ...
Get the logged in user. Get the [CfgPerson](https://docs.genesys.com/Documentation/PSDK/latest/ConfigLayerRef/CfgPerson) object for the currently logged in user. @return ApiResponse&lt;GetUsersSuccessResponse&gt; @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
[ "Get", "the", "logged", "in", "user", ".", "Get", "the", "[", "CfgPerson", "]", "(", "https", ":", "//", "docs", ".", "genesys", ".", "com", "/", "Documentation", "/", "PSDK", "/", "latest", "/", "ConfigLayerRef", "/", "CfgPerson", ")", "object", "for"...
train
https://github.com/GenesysPureEngage/provisioning-client-java/blob/1ad594c3767cec83052168e350994f922a26f75e/src/main/java/com/genesys/internal/provisioning/api/UsersApi.java#L387-L391
baidubce/bce-sdk-java
src/main/java/com/baidubce/services/media/MediaClient.java
MediaClient.getMediaInfoOfFile
public GetMediaInfoOfFileResponse getMediaInfoOfFile(GetMediaInfoOfFileRequest request) { """ Retrieve the media information of an object in Bos bucket. @param request The request object containing all options for retrieving media information. @return The media information of an object in Bos bucket. """...
java
public GetMediaInfoOfFileResponse getMediaInfoOfFile(GetMediaInfoOfFileRequest request) { checkNotNull(request, "The parameter request should NOT be null."); checkStringNotEmpty(request.getBucket(), "The parameter bucket should NOT be null or empty string."); checkStringNotEmpty(request.getKey()...
[ "public", "GetMediaInfoOfFileResponse", "getMediaInfoOfFile", "(", "GetMediaInfoOfFileRequest", "request", ")", "{", "checkNotNull", "(", "request", ",", "\"The parameter request should NOT be null.\"", ")", ";", "checkStringNotEmpty", "(", "request", ".", "getBucket", "(", ...
Retrieve the media information of an object in Bos bucket. @param request The request object containing all options for retrieving media information. @return The media information of an object in Bos bucket.
[ "Retrieve", "the", "media", "information", "of", "an", "object", "in", "Bos", "bucket", "." ]
train
https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/media/MediaClient.java#L1015-L1023
pgjdbc/pgjdbc
pgjdbc/src/main/java/org/postgresql/jdbc/PgPreparedStatement.java
PgPreparedStatement.bindString
private void bindString(int paramIndex, String s, int oid) throws SQLException { """ This version is for values that should turn into strings e.g. setString directly calls bindString with no escaping; the per-protocol ParameterList does escaping as needed. @param paramIndex parameter index @param s value @pa...
java
private void bindString(int paramIndex, String s, int oid) throws SQLException { preparedParameters.setStringParameter(paramIndex, s, oid); }
[ "private", "void", "bindString", "(", "int", "paramIndex", ",", "String", "s", ",", "int", "oid", ")", "throws", "SQLException", "{", "preparedParameters", ".", "setStringParameter", "(", "paramIndex", ",", "s", ",", "oid", ")", ";", "}" ]
This version is for values that should turn into strings e.g. setString directly calls bindString with no escaping; the per-protocol ParameterList does escaping as needed. @param paramIndex parameter index @param s value @param oid type oid @throws SQLException if something goes wrong
[ "This", "version", "is", "for", "values", "that", "should", "turn", "into", "strings", "e", ".", "g", ".", "setString", "directly", "calls", "bindString", "with", "no", "escaping", ";", "the", "per", "-", "protocol", "ParameterList", "does", "escaping", "as"...
train
https://github.com/pgjdbc/pgjdbc/blob/95ba7b261e39754674c5817695ae5ebf9a341fae/pgjdbc/src/main/java/org/postgresql/jdbc/PgPreparedStatement.java#L1001-L1003
JodaOrg/joda-time
src/main/java/org/joda/time/DateMidnight.java
DateMidnight.withZoneRetainFields
public DateMidnight withZoneRetainFields(DateTimeZone newZone) { """ Returns a copy of this date with a different time zone, preserving the day The returned object will have a local time of midnight in the new zone on the same day as the original instant. @param newZone the new time zone, null means default ...
java
public DateMidnight withZoneRetainFields(DateTimeZone newZone) { newZone = DateTimeUtils.getZone(newZone); DateTimeZone originalZone = DateTimeUtils.getZone(getZone()); if (newZone == originalZone) { return this; } long millis = originalZone.getMillisKeepLoca...
[ "public", "DateMidnight", "withZoneRetainFields", "(", "DateTimeZone", "newZone", ")", "{", "newZone", "=", "DateTimeUtils", ".", "getZone", "(", "newZone", ")", ";", "DateTimeZone", "originalZone", "=", "DateTimeUtils", ".", "getZone", "(", "getZone", "(", ")", ...
Returns a copy of this date with a different time zone, preserving the day The returned object will have a local time of midnight in the new zone on the same day as the original instant. @param newZone the new time zone, null means default @return a copy of this instant with a different time zone
[ "Returns", "a", "copy", "of", "this", "date", "with", "a", "different", "time", "zone", "preserving", "the", "day", "The", "returned", "object", "will", "have", "a", "local", "time", "of", "midnight", "in", "the", "new", "zone", "on", "the", "same", "day...
train
https://github.com/JodaOrg/joda-time/blob/bd79f1c4245e79b3c2c56d7b04fde2a6e191fa42/src/main/java/org/joda/time/DateMidnight.java#L414-L423
mapbox/mapbox-plugins-android
plugin-localization/src/main/java/com/mapbox/mapboxsdk/plugins/localization/LocalizationPlugin.java
LocalizationPlugin.setCameraToLocaleCountry
public void setCameraToLocaleCountry(Locale locale, int padding) { """ If you'd like to manually set the camera position to a specific map region or country, pass in the locale (which must have a paired }{@link MapLocale}) to work properly @param locale a {@link Locale} which has a complementary {@link MapLoc...
java
public void setCameraToLocaleCountry(Locale locale, int padding) { MapLocale mapLocale = MapLocale.getMapLocale(locale, false); if (mapLocale != null) { setCameraToLocaleCountry(mapLocale, padding); } else { Timber.e("Couldn't match Locale %s to a MapLocale", locale.getDisplayName()); } }
[ "public", "void", "setCameraToLocaleCountry", "(", "Locale", "locale", ",", "int", "padding", ")", "{", "MapLocale", "mapLocale", "=", "MapLocale", ".", "getMapLocale", "(", "locale", ",", "false", ")", ";", "if", "(", "mapLocale", "!=", "null", ")", "{", ...
If you'd like to manually set the camera position to a specific map region or country, pass in the locale (which must have a paired }{@link MapLocale}) to work properly @param locale a {@link Locale} which has a complementary {@link MapLocale} for it @param padding camera padding @since 0.1.0
[ "If", "you", "d", "like", "to", "manually", "set", "the", "camera", "position", "to", "a", "specific", "map", "region", "or", "country", "pass", "in", "the", "locale", "(", "which", "must", "have", "a", "paired", "}", "{", "@link", "MapLocale", "}", ")...
train
https://github.com/mapbox/mapbox-plugins-android/blob/c683cad4d8306945d71838d96fae73b8cbe2e6c9/plugin-localization/src/main/java/com/mapbox/mapboxsdk/plugins/localization/LocalizationPlugin.java#L327-L334
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/raw/CustomStorableCodecFactory.java
CustomStorableCodecFactory.createCodec
protected <S extends Storable> CustomStorableCodec<S> createCodec(Class<S> type, boolean isMaster, Layout layout, RawSupport support) throws SupportException { """ Note: This factory method is not abstract for backwards compatibility. """ return createCodec(type, isMaster, layout); ...
java
protected <S extends Storable> CustomStorableCodec<S> createCodec(Class<S> type, boolean isMaster, Layout layout, RawSupport support) throws SupportException { return createCodec(type, isMaster, layout); }
[ "protected", "<", "S", "extends", "Storable", ">", "CustomStorableCodec", "<", "S", ">", "createCodec", "(", "Class", "<", "S", ">", "type", ",", "boolean", "isMaster", ",", "Layout", "layout", ",", "RawSupport", "support", ")", "throws", "SupportException", ...
Note: This factory method is not abstract for backwards compatibility.
[ "Note", ":", "This", "factory", "method", "is", "not", "abstract", "for", "backwards", "compatibility", "." ]
train
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/raw/CustomStorableCodecFactory.java#L106-L111
rnorth/visible-assertions
src/main/java/org/rnorth/visibleassertions/VisibleAssertions.java
VisibleAssertions.assertSame
public static void assertSame(String message, Object expected, Object actual) { """ Assert that an actual value is the same object as an expected value. <p> Sameness is tested with the == operator. <p> If the assertion passes, a green tick will be shown. If the assertion fails, a red cross will be shown. @p...
java
public static void assertSame(String message, Object expected, Object actual) { String expectedInQuotes = inQuotesIfNotNull(expected); String actualInQuotes = inQuotesIfNotNull(actual); if (expected == actual) { pass(message); } else { fail(message, actualInQuot...
[ "public", "static", "void", "assertSame", "(", "String", "message", ",", "Object", "expected", ",", "Object", "actual", ")", "{", "String", "expectedInQuotes", "=", "inQuotesIfNotNull", "(", "expected", ")", ";", "String", "actualInQuotes", "=", "inQuotesIfNotNull...
Assert that an actual value is the same object as an expected value. <p> Sameness is tested with the == operator. <p> If the assertion passes, a green tick will be shown. If the assertion fails, a red cross will be shown. @param message message to display alongside the assertion outcome @param expected the expected v...
[ "Assert", "that", "an", "actual", "value", "is", "the", "same", "object", "as", "an", "expected", "value", ".", "<p", ">", "Sameness", "is", "tested", "with", "the", "==", "operator", ".", "<p", ">", "If", "the", "assertion", "passes", "a", "green", "t...
train
https://github.com/rnorth/visible-assertions/blob/6d7a7724db40ac0e9f87279553f814b790310b3b/src/main/java/org/rnorth/visibleassertions/VisibleAssertions.java#L314-L324
UrielCh/ovh-java-sdk
ovh-java-sdk-me/src/main/java/net/minidev/ovh/api/ApiOvhMe.java
ApiOvhMe.fidelityAccount_movements_movementId_GET
public OvhFidelityMovement fidelityAccount_movements_movementId_GET(Long movementId) throws IOException { """ Get this object properties REST: GET /me/fidelityAccount/movements/{movementId} @param movementId [required] """ String qPath = "/me/fidelityAccount/movements/{movementId}"; StringBuilder sb = ...
java
public OvhFidelityMovement fidelityAccount_movements_movementId_GET(Long movementId) throws IOException { String qPath = "/me/fidelityAccount/movements/{movementId}"; StringBuilder sb = path(qPath, movementId); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, OvhFidelityMovement.cla...
[ "public", "OvhFidelityMovement", "fidelityAccount_movements_movementId_GET", "(", "Long", "movementId", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/me/fidelityAccount/movements/{movementId}\"", ";", "StringBuilder", "sb", "=", "path", "(", "qPath", ",", ...
Get this object properties REST: GET /me/fidelityAccount/movements/{movementId} @param movementId [required]
[ "Get", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-me/src/main/java/net/minidev/ovh/api/ApiOvhMe.java#L1705-L1710
jayantk/jklol
src/com/jayantkrish/jklol/models/dynamic/DynamicVariableSet.java
DynamicVariableSet.instantiateVariables
public VariableNumMap instantiateVariables(DynamicAssignment assignment) { """ Gets a {@code VariableNumMap} by replicating the plates in {@code this}. {@code assignment} must contain a value (list of assignments) for all plates in {@code this}; these values determine how many times each plate is replicated in ...
java
public VariableNumMap instantiateVariables(DynamicAssignment assignment) { List<String> varNames = Lists.newArrayList(); List<Variable> variables = Lists.newArrayList(); List<Integer> variableInds = Lists.newArrayList(); instantiateVariablesHelper(assignment, varNames, variables, variableInds, "", 0); ...
[ "public", "VariableNumMap", "instantiateVariables", "(", "DynamicAssignment", "assignment", ")", "{", "List", "<", "String", ">", "varNames", "=", "Lists", ".", "newArrayList", "(", ")", ";", "List", "<", "Variable", ">", "variables", "=", "Lists", ".", "newAr...
Gets a {@code VariableNumMap} by replicating the plates in {@code this}. {@code assignment} must contain a value (list of assignments) for all plates in {@code this}; these values determine how many times each plate is replicated in the returned {@code VariableNumMap}. If two assignments have the same number of replica...
[ "Gets", "a", "{", "@code", "VariableNumMap", "}", "by", "replicating", "the", "plates", "in", "{", "@code", "this", "}", ".", "{", "@code", "assignment", "}", "must", "contain", "a", "value", "(", "list", "of", "assignments", ")", "for", "all", "plates",...
train
https://github.com/jayantk/jklol/blob/d27532ca83e212d51066cf28f52621acc3fd44cc/src/com/jayantkrish/jklol/models/dynamic/DynamicVariableSet.java#L179-L187
elki-project/elki
elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/statistics/dependence/DistanceCorrelationDependenceMeasure.java
DistanceCorrelationDependenceMeasure.doubleCenterMatrix
public static void doubleCenterMatrix(double[] dMatrix, int size) { """ Computes the distance variance matrix of one axis. @param dMatrix distance matrix of the axis @param size Dimensionality """ double[] rowMean = new double[size]; // row sum for(int i = 0, c = 0; i < size; i++) { for(i...
java
public static void doubleCenterMatrix(double[] dMatrix, int size) { double[] rowMean = new double[size]; // row sum for(int i = 0, c = 0; i < size; i++) { for(int j = 0; j < i; j++) { double v = dMatrix[c++]; rowMean[i] += v; rowMean[j] += v; } assert (dMatrix[c] ==...
[ "public", "static", "void", "doubleCenterMatrix", "(", "double", "[", "]", "dMatrix", ",", "int", "size", ")", "{", "double", "[", "]", "rowMean", "=", "new", "double", "[", "size", "]", ";", "// row sum", "for", "(", "int", "i", "=", "0", ",", "c", ...
Computes the distance variance matrix of one axis. @param dMatrix distance matrix of the axis @param size Dimensionality
[ "Computes", "the", "distance", "variance", "matrix", "of", "one", "axis", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/statistics/dependence/DistanceCorrelationDependenceMeasure.java#L141-L167
stephenc/simple-java-mail
src/main/java/org/codemonkey/simplejavamail/Mailer.java
Mailer.setTexts
private void setTexts(final Email email, final MimeMultipart multipartAlternativeMessages) throws MessagingException { """ Fills the {@link Message} instance with the content bodies (text and html). @param email The message in which the content is defined. @param multipartAlternativeMessages See {@link Mim...
java
private void setTexts(final Email email, final MimeMultipart multipartAlternativeMessages) throws MessagingException { if (email.getText() != null) { final MimeBodyPart messagePart = new MimeBodyPart(); messagePart.setText(email.getText(), "UTF-8"); multipartAlternativeMessages.addBodyPart(messagePar...
[ "private", "void", "setTexts", "(", "final", "Email", "email", ",", "final", "MimeMultipart", "multipartAlternativeMessages", ")", "throws", "MessagingException", "{", "if", "(", "email", ".", "getText", "(", ")", "!=", "null", ")", "{", "final", "MimeBodyPart",...
Fills the {@link Message} instance with the content bodies (text and html). @param email The message in which the content is defined. @param multipartAlternativeMessages See {@link MimeMultipart#addBodyPart(BodyPart)} @throws MessagingException See {@link BodyPart#setText(String)}, {@link BodyPart#setContent(Object, S...
[ "Fills", "the", "{", "@link", "Message", "}", "instance", "with", "the", "content", "bodies", "(", "text", "and", "html", ")", "." ]
train
https://github.com/stephenc/simple-java-mail/blob/8c5897e6bbc23c11e7c7eb5064f407625c653923/src/main/java/org/codemonkey/simplejavamail/Mailer.java#L322-L334
cdk/cdk
base/standard/src/main/java/org/openscience/cdk/graph/invariant/InvariantRanker.java
InvariantRanker.sortBy
void sortBy(int[] vs, int lo, int len, long[] curr, long[] prev) { """ Sort the values (using merge sort) in {@code vs} from {@code lo} (until {@code len}) by the {@code prev[]} and then {@code curr[]} invariants to determine rank. The values in {@code vs} are indices into the invariant arrays. @param vs v...
java
void sortBy(int[] vs, int lo, int len, long[] curr, long[] prev) { if (len < INSERTION_SORT_THRESHOLD) { insertionSortBy(vs, lo, len, curr, prev); return; } int split = len / 2; sortBy(vs, lo, split, curr, prev); sortBy(vs, lo + split, len - split, curr...
[ "void", "sortBy", "(", "int", "[", "]", "vs", ",", "int", "lo", ",", "int", "len", ",", "long", "[", "]", "curr", ",", "long", "[", "]", "prev", ")", "{", "if", "(", "len", "<", "INSERTION_SORT_THRESHOLD", ")", "{", "insertionSortBy", "(", "vs", ...
Sort the values (using merge sort) in {@code vs} from {@code lo} (until {@code len}) by the {@code prev[]} and then {@code curr[]} invariants to determine rank. The values in {@code vs} are indices into the invariant arrays. @param vs values (indices) @param lo the first value to start sorting from @param len the...
[ "Sort", "the", "values", "(", "using", "merge", "sort", ")", "in", "{", "@code", "vs", "}", "from", "{", "@code", "lo", "}", "(", "until", "{", "@code", "len", "}", ")", "by", "the", "{", "@code", "prev", "[]", "}", "and", "then", "{", "@code", ...
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/standard/src/main/java/org/openscience/cdk/graph/invariant/InvariantRanker.java#L136-L152
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/pipeline/LabeledChunkIdentifier.java
LabeledChunkIdentifier.getAnnotatedChunks
@SuppressWarnings("unchecked") public List<CoreMap> getAnnotatedChunks(List<CoreLabel> tokens, int totalTokensOffset, Class textKey, Class labelKey, Class tokenChunkKey, Class tokenLabelKey) { """ Find and annotate chunks. Re...
java
@SuppressWarnings("unchecked") public List<CoreMap> getAnnotatedChunks(List<CoreLabel> tokens, int totalTokensOffset, Class textKey, Class labelKey, Class tokenChunkKey, Class tokenLabelKey) { List<CoreMap> chunks = new Arr...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "List", "<", "CoreMap", ">", "getAnnotatedChunks", "(", "List", "<", "CoreLabel", ">", "tokens", ",", "int", "totalTokensOffset", ",", "Class", "textKey", ",", "Class", "labelKey", ",", "Class", "to...
Find and annotate chunks. Returns list of CoreMap (Annotation) objects each representing a chunk with the following annotations set: CharacterOffsetBeginAnnotation - set to CharacterOffsetBeginAnnotation of first token in chunk CharacterOffsetEndAnnotation - set to CharacterOffsetEndAnnotation of last token in chunk T...
[ "Find", "and", "annotate", "chunks", ".", "Returns", "list", "of", "CoreMap", "(", "Annotation", ")", "objects", "each", "representing", "a", "chunk", "with", "the", "following", "annotations", "set", ":", "CharacterOffsetBeginAnnotation", "-", "set", "to", "Cha...
train
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/pipeline/LabeledChunkIdentifier.java#L83-L119
Netflix/Nicobar
nicobar-core/src/main/java/com/netflix/nicobar/core/utils/ClassPathUtils.java
ClassPathUtils.scanClassPathWithIncludes
public static Set<String> scanClassPathWithIncludes(final String classPath, final Set<String> excludeJarSet, final Set<String> includePrefixes) { """ Scan the classpath string provided, and collect a set of package paths found in jars and classes on the path, including only those that match a set of include prefi...
java
public static Set<String> scanClassPathWithIncludes(final String classPath, final Set<String> excludeJarSet, final Set<String> includePrefixes) { final Set<String> pathSet = new HashSet<String>(); // Defer to JDKPaths to do the actual classpath scanning. __JDKPaths.processClassPathItem(classPath...
[ "public", "static", "Set", "<", "String", ">", "scanClassPathWithIncludes", "(", "final", "String", "classPath", ",", "final", "Set", "<", "String", ">", "excludeJarSet", ",", "final", "Set", "<", "String", ">", "includePrefixes", ")", "{", "final", "Set", "...
Scan the classpath string provided, and collect a set of package paths found in jars and classes on the path, including only those that match a set of include prefixes. @param classPath the classpath string @param excludeJarSet a set of jars to exclude from scanning @param includePrefixes a set of path prefixes that d...
[ "Scan", "the", "classpath", "string", "provided", "and", "collect", "a", "set", "of", "package", "paths", "found", "in", "jars", "and", "classes", "on", "the", "path", "including", "only", "those", "that", "match", "a", "set", "of", "include", "prefixes", ...
train
https://github.com/Netflix/Nicobar/blob/507173dcae4a86a955afc3df222a855862fab8d7/nicobar-core/src/main/java/com/netflix/nicobar/core/utils/ClassPathUtils.java#L233-L239
alkacon/opencms-core
src/org/opencms/staticexport/CmsLinkManager.java
CmsLinkManager.getRelativeUri
public static String getRelativeUri(String fromUri, String toUri) { """ Calculates a relative URI from "fromUri" to "toUri", both URI must be absolute.<p> @param fromUri the URI to start @param toUri the URI to calculate a relative path to @return a relative URI from "fromUri" to "toUri" """ Str...
java
public static String getRelativeUri(String fromUri, String toUri) { StringBuffer result = new StringBuffer(); int pos = 0; while (true) { int i = fromUri.indexOf('/', pos); int j = toUri.indexOf('/', pos); if ((i == -1) || (i != j) || !fromUri.regionMatches(...
[ "public", "static", "String", "getRelativeUri", "(", "String", "fromUri", ",", "String", "toUri", ")", "{", "StringBuffer", "result", "=", "new", "StringBuffer", "(", ")", ";", "int", "pos", "=", "0", ";", "while", "(", "true", ")", "{", "int", "i", "=...
Calculates a relative URI from "fromUri" to "toUri", both URI must be absolute.<p> @param fromUri the URI to start @param toUri the URI to calculate a relative path to @return a relative URI from "fromUri" to "toUri"
[ "Calculates", "a", "relative", "URI", "from", "fromUri", "to", "toUri", "both", "URI", "must", "be", "absolute", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/staticexport/CmsLinkManager.java#L148-L176
lessthanoptimal/BoofCV
integration/boofcv-openkinect/src/main/java/boofcv/openkinect/UtilOpenKinect.java
UtilOpenKinect.bufferRgbToMsU8
public static void bufferRgbToMsU8( byte []input , Planar<GrayU8> output ) { """ Converts byte array that contains RGB data into a 3-channel Planar image @param input Input array @param output Output depth image """ GrayU8 band0 = output.getBand(0); GrayU8 band1 = output.getBand(1); GrayU8 band2 = outp...
java
public static void bufferRgbToMsU8( byte []input , Planar<GrayU8> output ) { GrayU8 band0 = output.getBand(0); GrayU8 band1 = output.getBand(1); GrayU8 band2 = output.getBand(2); int indexIn = 0; for( int y = 0; y < output.height; y++ ) { int indexOut = output.startIndex + y*output.stride; for( int x =...
[ "public", "static", "void", "bufferRgbToMsU8", "(", "byte", "[", "]", "input", ",", "Planar", "<", "GrayU8", ">", "output", ")", "{", "GrayU8", "band0", "=", "output", ".", "getBand", "(", "0", ")", ";", "GrayU8", "band1", "=", "output", ".", "getBand"...
Converts byte array that contains RGB data into a 3-channel Planar image @param input Input array @param output Output depth image
[ "Converts", "byte", "array", "that", "contains", "RGB", "data", "into", "a", "3", "-", "channel", "Planar", "image" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/integration/boofcv-openkinect/src/main/java/boofcv/openkinect/UtilOpenKinect.java#L116-L130
chhh/MSFTBX
MSFileToolbox/src/main/java/umich/ms/util/SpectrumUtils.java
SpectrumUtils.isWithinPpm
public static boolean isWithinPpm(double mz1, double mz2, double ppm) { """ Check if the 2nd m/z value is within some PPM distance from the 1st one. PPM will be calculated based on the 1st m/z value. @param mz1 PPM tolerance will be calculated relative to this value @param mz2 the value to check for being wit...
java
public static boolean isWithinPpm(double mz1, double mz2, double ppm) { return Math.abs(amu2ppm(mz1, mz1 - mz2)) <= ppm; }
[ "public", "static", "boolean", "isWithinPpm", "(", "double", "mz1", ",", "double", "mz2", ",", "double", "ppm", ")", "{", "return", "Math", ".", "abs", "(", "amu2ppm", "(", "mz1", ",", "mz1", "-", "mz2", ")", ")", "<=", "ppm", ";", "}" ]
Check if the 2nd m/z value is within some PPM distance from the 1st one. PPM will be calculated based on the 1st m/z value. @param mz1 PPM tolerance will be calculated relative to this value @param mz2 the value to check for being within some PPM range
[ "Check", "if", "the", "2nd", "m", "/", "z", "value", "is", "within", "some", "PPM", "distance", "from", "the", "1st", "one", ".", "PPM", "will", "be", "calculated", "based", "on", "the", "1st", "m", "/", "z", "value", "." ]
train
https://github.com/chhh/MSFTBX/blob/e53ae6be982e2de3123292be7d5297715bec70bb/MSFileToolbox/src/main/java/umich/ms/util/SpectrumUtils.java#L57-L59
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-backend-impls/nd4j-cuda/src/main/java/org/nd4j/jita/allocator/impl/AtomicAllocator.java
AtomicAllocator.allocateMemory
@Override public AllocationPoint allocateMemory(DataBuffer buffer, AllocationShape requiredMemory, boolean initialize) { """ This method allocates required chunk of memory @param requiredMemory """ // by default we allocate on initial location AllocationPoint point = null; if (c...
java
@Override public AllocationPoint allocateMemory(DataBuffer buffer, AllocationShape requiredMemory, boolean initialize) { // by default we allocate on initial location AllocationPoint point = null; if (configuration.getMemoryModel() == Configuration.MemoryModel.IMMEDIATE) { point...
[ "@", "Override", "public", "AllocationPoint", "allocateMemory", "(", "DataBuffer", "buffer", ",", "AllocationShape", "requiredMemory", ",", "boolean", "initialize", ")", "{", "// by default we allocate on initial location", "AllocationPoint", "point", "=", "null", ";", "i...
This method allocates required chunk of memory @param requiredMemory
[ "This", "method", "allocates", "required", "chunk", "of", "memory" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-backend-impls/nd4j-cuda/src/main/java/org/nd4j/jita/allocator/impl/AtomicAllocator.java#L422-L435
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/extension/properties/PropertiesCoreExtension.java
PropertiesCoreExtension.addValue
public boolean addValue(String property, String value) { """ Add a property value, creating the extension if needed @param property property name @param value value @return true if added, false if already existed """ if (!has()) { getOrCreate(); } boolean added = false; if (!hasValue(property...
java
public boolean addValue(String property, String value) { if (!has()) { getOrCreate(); } boolean added = false; if (!hasValue(property, value)) { TRow row = newRow(); row.setValue(COLUMN_PROPERTY, property); row.setValue(COLUMN_VALUE, value); getDao().insert(row); added = true; } return add...
[ "public", "boolean", "addValue", "(", "String", "property", ",", "String", "value", ")", "{", "if", "(", "!", "has", "(", ")", ")", "{", "getOrCreate", "(", ")", ";", "}", "boolean", "added", "=", "false", ";", "if", "(", "!", "hasValue", "(", "pro...
Add a property value, creating the extension if needed @param property property name @param value value @return true if added, false if already existed
[ "Add", "a", "property", "value", "creating", "the", "extension", "if", "needed" ]
train
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/properties/PropertiesCoreExtension.java#L307-L320
Impetus/Kundera
src/kundera-kudu/src/main/java/com/impetus/client/kudu/KuduDBClient.java
KuduDBClient.deleteByColumn
@Override public void deleteByColumn(String schemaName, String tableName, String columnName, Object columnValue) { """ Delete by column. @param schemaName the schema name @param tableName the table name @param columnName the column name @param columnValue the column value """ // TODO Auto-generat...
java
@Override public void deleteByColumn(String schemaName, String tableName, String columnName, Object columnValue) { // TODO Auto-generated method stub }
[ "@", "Override", "public", "void", "deleteByColumn", "(", "String", "schemaName", ",", "String", "tableName", ",", "String", "columnName", ",", "Object", "columnValue", ")", "{", "// TODO Auto-generated method stub", "}" ]
Delete by column. @param schemaName the schema name @param tableName the table name @param columnName the column name @param columnValue the column value
[ "Delete", "by", "column", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/kundera-kudu/src/main/java/com/impetus/client/kudu/KuduDBClient.java#L515-L519
bitcoinj/bitcoinj
core/src/main/java/org/bitcoinj/core/ECKey.java
ECKey.signedMessageToKey
public static ECKey signedMessageToKey(String message, String signatureBase64) throws SignatureException { """ Given an arbitrary piece of text and a Bitcoin-format message signature encoded in base64, returns an ECKey containing the public key that was used to sign it. This can then be compared to the expected p...
java
public static ECKey signedMessageToKey(String message, String signatureBase64) throws SignatureException { byte[] signatureEncoded; try { signatureEncoded = Base64.decode(signatureBase64); } catch (RuntimeException e) { // This is what you get back from Bouncy Castle if b...
[ "public", "static", "ECKey", "signedMessageToKey", "(", "String", "message", ",", "String", "signatureBase64", ")", "throws", "SignatureException", "{", "byte", "[", "]", "signatureEncoded", ";", "try", "{", "signatureEncoded", "=", "Base64", ".", "decode", "(", ...
Given an arbitrary piece of text and a Bitcoin-format message signature encoded in base64, returns an ECKey containing the public key that was used to sign it. This can then be compared to the expected public key to determine if the signature was correct. These sorts of signatures are compatible with the Bitcoin-Qt/bit...
[ "Given", "an", "arbitrary", "piece", "of", "text", "and", "a", "Bitcoin", "-", "format", "message", "signature", "encoded", "in", "base64", "returns", "an", "ECKey", "containing", "the", "public", "key", "that", "was", "used", "to", "sign", "it", ".", "Thi...
train
https://github.com/bitcoinj/bitcoinj/blob/9cf13d29315014ed59cf4fc5944e5f227e8df9a6/core/src/main/java/org/bitcoinj/core/ECKey.java#L896-L929
UrielCh/ovh-java-sdk
ovh-java-sdk-sms/src/main/java/net/minidev/ovh/api/ApiOvhSms.java
ApiOvhSms.serviceName_receivers_slotId_clean_POST
public OvhReceiversAsynchronousCleanReport serviceName_receivers_slotId_clean_POST(String serviceName, Long slotId, Boolean freemium, Boolean priceOnly) throws IOException { """ Clean the invalid and inactive receivers in the document by requesting HLR on each receiver. A report is sent by e-mail at the end of the...
java
public OvhReceiversAsynchronousCleanReport serviceName_receivers_slotId_clean_POST(String serviceName, Long slotId, Boolean freemium, Boolean priceOnly) throws IOException { String qPath = "/sms/{serviceName}/receivers/{slotId}/clean"; StringBuilder sb = path(qPath, serviceName, slotId); HashMap<String, Object>o ...
[ "public", "OvhReceiversAsynchronousCleanReport", "serviceName_receivers_slotId_clean_POST", "(", "String", "serviceName", ",", "Long", "slotId", ",", "Boolean", "freemium", ",", "Boolean", "priceOnly", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/sms/{se...
Clean the invalid and inactive receivers in the document by requesting HLR on each receiver. A report is sent by e-mail at the end of the operation. REST: POST /sms/{serviceName}/receivers/{slotId}/clean @param freemium [required] Limit checks to syntaxical validation @param priceOnly [required] Only get action's pric...
[ "Clean", "the", "invalid", "and", "inactive", "receivers", "in", "the", "document", "by", "requesting", "HLR", "on", "each", "receiver", ".", "A", "report", "is", "sent", "by", "e", "-", "mail", "at", "the", "end", "of", "the", "operation", "." ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-sms/src/main/java/net/minidev/ovh/api/ApiOvhSms.java#L528-L536
carewebframework/carewebframework-core
org.carewebframework.api-parent/org.carewebframework.api.core/src/main/java/org/carewebframework/api/context/ContextItems.java
ContextItems.setDate
public void setDate(String itemName, Date date) { """ Saves a date item object as a context item. @param itemName Item name @param date Date value """ if (date == null) { setItem(itemName, null); } else { setItem(itemName, DateUtil.toHL7(date)); } }
java
public void setDate(String itemName, Date date) { if (date == null) { setItem(itemName, null); } else { setItem(itemName, DateUtil.toHL7(date)); } }
[ "public", "void", "setDate", "(", "String", "itemName", ",", "Date", "date", ")", "{", "if", "(", "date", "==", "null", ")", "{", "setItem", "(", "itemName", ",", "null", ")", ";", "}", "else", "{", "setItem", "(", "itemName", ",", "DateUtil", ".", ...
Saves a date item object as a context item. @param itemName Item name @param date Date value
[ "Saves", "a", "date", "item", "object", "as", "a", "context", "item", "." ]
train
https://github.com/carewebframework/carewebframework-core/blob/fa3252d4f7541dbe151b92c3d4f6f91433cd1673/org.carewebframework.api-parent/org.carewebframework.api.core/src/main/java/org/carewebframework/api/context/ContextItems.java#L284-L290
Harium/keel
src/main/java/com/harium/keel/catalano/statistics/HistogramStatistics.java
HistogramStatistics.Skewness
public static double Skewness(int[] values, double mean, double stdDeviation) { """ Calculate Skewness value. @param values Values. @param mean Specified mean. @param stdDeviation Specified standard deviation. @return Returns skewness value of the specified histogram array. """ double n = 0; ...
java
public static double Skewness(int[] values, double mean, double stdDeviation){ double n = 0; for (int i = 0; i < values.length; i++) n += values[i]; double part1 = n / (n - 1) * (n - 2); double part2 = 0; for (int i = 0; i < values.length; i++) { ...
[ "public", "static", "double", "Skewness", "(", "int", "[", "]", "values", ",", "double", "mean", ",", "double", "stdDeviation", ")", "{", "double", "n", "=", "0", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "values", ".", "length", ";", ...
Calculate Skewness value. @param values Values. @param mean Specified mean. @param stdDeviation Specified standard deviation. @return Returns skewness value of the specified histogram array.
[ "Calculate", "Skewness", "value", "." ]
train
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/statistics/HistogramStatistics.java#L233-L246
looly/hutool
hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java
FileUtil.readUtf8Lines
public static List<String> readUtf8Lines(String path) throws IORuntimeException { """ 从文件中读取每一行数据,编码为UTF-8 @param path 文件路径 @return 文件中的每行内容的集合List @throws IORuntimeException IO异常 @since 3.1.1 """ return readLines(path, CharsetUtil.CHARSET_UTF_8); }
java
public static List<String> readUtf8Lines(String path) throws IORuntimeException { return readLines(path, CharsetUtil.CHARSET_UTF_8); }
[ "public", "static", "List", "<", "String", ">", "readUtf8Lines", "(", "String", "path", ")", "throws", "IORuntimeException", "{", "return", "readLines", "(", "path", ",", "CharsetUtil", ".", "CHARSET_UTF_8", ")", ";", "}" ]
从文件中读取每一行数据,编码为UTF-8 @param path 文件路径 @return 文件中的每行内容的集合List @throws IORuntimeException IO异常 @since 3.1.1
[ "从文件中读取每一行数据,编码为UTF", "-", "8" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java#L2331-L2333
grpc/grpc-java
core/src/main/java/io/grpc/internal/GrpcUtil.java
GrpcUtil.getThreadFactory
public static ThreadFactory getThreadFactory(String nameFormat, boolean daemon) { """ Get a {@link ThreadFactory} suitable for use in the current environment. @param nameFormat to apply to threads created by the factory. @param daemon {@code true} if the threads the factory creates are daemon threads, {@code fal...
java
public static ThreadFactory getThreadFactory(String nameFormat, boolean daemon) { if (IS_RESTRICTED_APPENGINE) { @SuppressWarnings("BetaApi") ThreadFactory factory = MoreExecutors.platformThreadFactory(); return factory; } else { return new ThreadFactoryBuilder() .setDaemon(dae...
[ "public", "static", "ThreadFactory", "getThreadFactory", "(", "String", "nameFormat", ",", "boolean", "daemon", ")", "{", "if", "(", "IS_RESTRICTED_APPENGINE", ")", "{", "@", "SuppressWarnings", "(", "\"BetaApi\"", ")", "ThreadFactory", "factory", "=", "MoreExecutor...
Get a {@link ThreadFactory} suitable for use in the current environment. @param nameFormat to apply to threads created by the factory. @param daemon {@code true} if the threads the factory creates are daemon threads, {@code false} otherwise. @return a {@link ThreadFactory}.
[ "Get", "a", "{" ]
train
https://github.com/grpc/grpc-java/blob/973885457f9609de232d2553b82c67f6c3ff57bf/core/src/main/java/io/grpc/internal/GrpcUtil.java#L576-L587
UrielCh/ovh-java-sdk
ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java
ApiOvhOrder.license_sqlserver_serviceName_upgrade_duration_GET
public OvhOrder license_sqlserver_serviceName_upgrade_duration_GET(String serviceName, String duration, OvhSqlServerVersionEnum version) throws IOException { """ Get prices and contracts information REST: GET /order/license/sqlserver/{serviceName}/upgrade/{duration} @param version [required] This license versi...
java
public OvhOrder license_sqlserver_serviceName_upgrade_duration_GET(String serviceName, String duration, OvhSqlServerVersionEnum version) throws IOException { String qPath = "/order/license/sqlserver/{serviceName}/upgrade/{duration}"; StringBuilder sb = path(qPath, serviceName, duration); query(sb, "version", vers...
[ "public", "OvhOrder", "license_sqlserver_serviceName_upgrade_duration_GET", "(", "String", "serviceName", ",", "String", "duration", ",", "OvhSqlServerVersionEnum", "version", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/order/license/sqlserver/{serviceName}/u...
Get prices and contracts information REST: GET /order/license/sqlserver/{serviceName}/upgrade/{duration} @param version [required] This license version @param serviceName [required] The name of your SQL Server license @param duration [required] Duration
[ "Get", "prices", "and", "contracts", "information" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java#L1411-L1417
bazaarvoice/jolt
jolt-core/src/main/java/com/bazaarvoice/jolt/traversr/Traversr.java
Traversr.remove
public Optional<DataType> remove( Object tree, List<String> keys ) { """ Note : Calling this method MAY modify the tree object by adding new Maps and Lists as needed for the traversal. This is determined by the behavior of the implementations of the abstract methods of this class. """ if ( keys.siz...
java
public Optional<DataType> remove( Object tree, List<String> keys ) { if ( keys.size() != traversalLength ) { throw new TraversrException( "Traversal Path and number of keys mismatch, traversalLength:" + traversalLength + " numKeys:" + keys.size() ); } if ( tree == null ) { ...
[ "public", "Optional", "<", "DataType", ">", "remove", "(", "Object", "tree", ",", "List", "<", "String", ">", "keys", ")", "{", "if", "(", "keys", ".", "size", "(", ")", "!=", "traversalLength", ")", "{", "throw", "new", "TraversrException", "(", "\"Tr...
Note : Calling this method MAY modify the tree object by adding new Maps and Lists as needed for the traversal. This is determined by the behavior of the implementations of the abstract methods of this class.
[ "Note", ":", "Calling", "this", "method", "MAY", "modify", "the", "tree", "object", "by", "adding", "new", "Maps", "and", "Lists", "as", "needed", "for", "the", "traversal", ".", "This", "is", "determined", "by", "the", "behavior", "of", "the", "implementa...
train
https://github.com/bazaarvoice/jolt/blob/4cf866a9f4222142da41b50dbcccce022a956bff/jolt-core/src/main/java/com/bazaarvoice/jolt/traversr/Traversr.java#L156-L167
GenesysPureEngage/workspace-client-java
src/main/java/com/genesys/internal/workspace/api/StandardResponsesApi.java
StandardResponsesApi.getCategoryDetails
public ApiSuccessResponse getCategoryDetails(String id, GetCategoryData getCategoryData) throws ApiException { """ Get the details of a Category. Get details of a Category including category sub tree. Only &#39;id&#39;, &#39;standardResponseId&#39;, and &#39;name&#39; attributes are returned for each Standard Res...
java
public ApiSuccessResponse getCategoryDetails(String id, GetCategoryData getCategoryData) throws ApiException { ApiResponse<ApiSuccessResponse> resp = getCategoryDetailsWithHttpInfo(id, getCategoryData); return resp.getData(); }
[ "public", "ApiSuccessResponse", "getCategoryDetails", "(", "String", "id", ",", "GetCategoryData", "getCategoryData", ")", "throws", "ApiException", "{", "ApiResponse", "<", "ApiSuccessResponse", ">", "resp", "=", "getCategoryDetailsWithHttpInfo", "(", "id", ",", "getCa...
Get the details of a Category. Get details of a Category including category sub tree. Only &#39;id&#39;, &#39;standardResponseId&#39;, and &#39;name&#39; attributes are returned for each Standard Response. @param id id of the Category (required) @param getCategoryData (required) @return ApiSuccessResponse @throws ApiE...
[ "Get", "the", "details", "of", "a", "Category", ".", "Get", "details", "of", "a", "Category", "including", "category", "sub", "tree", ".", "Only", "&#39", ";", "id&#39", ";", "&#39", ";", "standardResponseId&#39", ";", "and", "&#39", ";", "name&#39", ";", ...
train
https://github.com/GenesysPureEngage/workspace-client-java/blob/509fdd9e89b9359d012f9a72be95037a3cef53e6/src/main/java/com/genesys/internal/workspace/api/StandardResponsesApi.java#L517-L520
ehcache/ehcache3
impl/src/main/java/org/ehcache/config/builders/CacheConfigurationBuilder.java
CacheConfigurationBuilder.withLoaderWriter
public CacheConfigurationBuilder<K, V> withLoaderWriter(CacheLoaderWriter<K, V> loaderWriter) { """ Adds a {@link CacheLoaderWriter} to the configured builder. <p> Configuration of a {@link CacheLoaderWriter} is what enables cache-through patterns. @param loaderWriter the loaderwriter to use @return a new bu...
java
public CacheConfigurationBuilder<K, V> withLoaderWriter(CacheLoaderWriter<K, V> loaderWriter) { return addOrReplaceConfiguration(new DefaultCacheLoaderWriterConfiguration(requireNonNull(loaderWriter, "Null loaderWriter"))); }
[ "public", "CacheConfigurationBuilder", "<", "K", ",", "V", ">", "withLoaderWriter", "(", "CacheLoaderWriter", "<", "K", ",", "V", ">", "loaderWriter", ")", "{", "return", "addOrReplaceConfiguration", "(", "new", "DefaultCacheLoaderWriterConfiguration", "(", "requireNo...
Adds a {@link CacheLoaderWriter} to the configured builder. <p> Configuration of a {@link CacheLoaderWriter} is what enables cache-through patterns. @param loaderWriter the loaderwriter to use @return a new builder with the added loaderwriter configuration
[ "Adds", "a", "{", "@link", "CacheLoaderWriter", "}", "to", "the", "configured", "builder", ".", "<p", ">", "Configuration", "of", "a", "{", "@link", "CacheLoaderWriter", "}", "is", "what", "enables", "cache", "-", "through", "patterns", "." ]
train
https://github.com/ehcache/ehcache3/blob/3cceda57185e522f8d241ddb75146d67ee2af898/impl/src/main/java/org/ehcache/config/builders/CacheConfigurationBuilder.java#L337-L339
h2oai/h2o-3
h2o-genmodel/src/main/java/hex/genmodel/AbstractMojoWriter.java
AbstractMojoWriter.writekv
protected final void writekv(String key, Object value) throws IOException { """ Write a simple value to the model.ini/[info] section. Here "simple" means a value that can be stringified with .toString(), and its stringified version does not span multiple lines. """ String valStr = value == null ? "null" :...
java
protected final void writekv(String key, Object value) throws IOException { String valStr = value == null ? "null" : value.toString(); if (valStr.contains("\n")) throw new IOException("The `value` must not contain newline characters, got: " + valStr); if (lkv.containsKey(key)) throw new IOExcept...
[ "protected", "final", "void", "writekv", "(", "String", "key", ",", "Object", "value", ")", "throws", "IOException", "{", "String", "valStr", "=", "value", "==", "null", "?", "\"null\"", ":", "value", ".", "toString", "(", ")", ";", "if", "(", "valStr", ...
Write a simple value to the model.ini/[info] section. Here "simple" means a value that can be stringified with .toString(), and its stringified version does not span multiple lines.
[ "Write", "a", "simple", "value", "to", "the", "model", ".", "ini", "/", "[", "info", "]", "section", ".", "Here", "simple", "means", "a", "value", "that", "can", "be", "stringified", "with", ".", "toString", "()", "and", "its", "stringified", "version", ...
train
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-genmodel/src/main/java/hex/genmodel/AbstractMojoWriter.java#L58-L65
googleapis/google-cloud-java
google-cloud-clients/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/NotificationChannelServiceClient.java
NotificationChannelServiceClient.deleteNotificationChannel
public final void deleteNotificationChannel(String name, boolean force) { """ Deletes a notification channel. <p>Sample code: <pre><code> try (NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.create()) { NotificationChannelName name = NotificationChannelN...
java
public final void deleteNotificationChannel(String name, boolean force) { DeleteNotificationChannelRequest request = DeleteNotificationChannelRequest.newBuilder().setName(name).setForce(force).build(); deleteNotificationChannel(request); }
[ "public", "final", "void", "deleteNotificationChannel", "(", "String", "name", ",", "boolean", "force", ")", "{", "DeleteNotificationChannelRequest", "request", "=", "DeleteNotificationChannelRequest", ".", "newBuilder", "(", ")", ".", "setName", "(", "name", ")", "...
Deletes a notification channel. <p>Sample code: <pre><code> try (NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.create()) { NotificationChannelName name = NotificationChannelName.of("[PROJECT]", "[NOTIFICATION_CHANNEL]"); boolean force = false; notificationChannel...
[ "Deletes", "a", "notification", "channel", "." ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/NotificationChannelServiceClient.java#L936-L941