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
UrielCh/ovh-java-sdk
ovh-java-sdk-domain/src/main/java/net/minidev/ovh/api/ApiOvhDomain.java
ApiOvhDomain.serviceName_glueRecord_GET
public ArrayList<String> serviceName_glueRecord_GET(String serviceName, String host) throws IOException { """ List of glue record REST: GET /domain/{serviceName}/glueRecord @param host [required] Filter the value of host property (like) @param serviceName [required] The internal name of your domain """ ...
java
public ArrayList<String> serviceName_glueRecord_GET(String serviceName, String host) throws IOException { String qPath = "/domain/{serviceName}/glueRecord"; StringBuilder sb = path(qPath, serviceName); query(sb, "host", host); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, t2); ...
[ "public", "ArrayList", "<", "String", ">", "serviceName_glueRecord_GET", "(", "String", "serviceName", ",", "String", "host", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/domain/{serviceName}/glueRecord\"", ";", "StringBuilder", "sb", "=", "path", ...
List of glue record REST: GET /domain/{serviceName}/glueRecord @param host [required] Filter the value of host property (like) @param serviceName [required] The internal name of your domain
[ "List", "of", "glue", "record" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-domain/src/main/java/net/minidev/ovh/api/ApiOvhDomain.java#L1243-L1249
threerings/gwt-utils
src/main/java/com/threerings/gwt/util/Preconditions.java
Preconditions.checkNotNull
public static <T> T checkNotNull (T value, String param) { """ Checks that the supplied parameter is not null. Throws a {@link NullPointerException} if it is, using the supplied `param` string to include an informative error message. """ if (value == null) { throw new NullPointerException(...
java
public static <T> T checkNotNull (T value, String param) { if (value == null) { throw new NullPointerException("Must supply non-null '" + param + "'."); } return value; }
[ "public", "static", "<", "T", ">", "T", "checkNotNull", "(", "T", "value", ",", "String", "param", ")", "{", "if", "(", "value", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", "\"Must supply non-null '\"", "+", "param", "+", "\"'.\"",...
Checks that the supplied parameter is not null. Throws a {@link NullPointerException} if it is, using the supplied `param` string to include an informative error message.
[ "Checks", "that", "the", "supplied", "parameter", "is", "not", "null", ".", "Throws", "a", "{" ]
train
https://github.com/threerings/gwt-utils/blob/31b31a23b667f2a9c683160d77646db259f2aae5/src/main/java/com/threerings/gwt/util/Preconditions.java#L33-L39
trellis-ldp-archive/trellis-io-jena
src/main/java/org/trellisldp/io/impl/HtmlData.java
HtmlData.getCss
public List<String> getCss() { """ Get any CSS document URLs @return a list of any CSS documents """ return stream(properties.getOrDefault("css", "").split(",")) .map(String::trim).filter(x -> x.length() > 0).collect(toList()); }
java
public List<String> getCss() { return stream(properties.getOrDefault("css", "").split(",")) .map(String::trim).filter(x -> x.length() > 0).collect(toList()); }
[ "public", "List", "<", "String", ">", "getCss", "(", ")", "{", "return", "stream", "(", "properties", ".", "getOrDefault", "(", "\"css\"", ",", "\"\"", ")", ".", "split", "(", "\",\"", ")", ")", ".", "map", "(", "String", "::", "trim", ")", ".", "f...
Get any CSS document URLs @return a list of any CSS documents
[ "Get", "any", "CSS", "document", "URLs" ]
train
https://github.com/trellis-ldp-archive/trellis-io-jena/blob/3a06f8f8e7b6fc83fb659cb61217810f813967e8/src/main/java/org/trellisldp/io/impl/HtmlData.java#L80-L83
cybazeitalia/emaze-dysfunctional
src/main/java/net/emaze/dysfunctional/Searches.java
Searches.findLast
public static <E> E findLast(E[] array, Predicate<E> predicate) { """ Searches the last matching element returning it. @param <E> the element type parameter @param array the array to be searched @param predicate the predicate to be applied to each element @throws IllegalArgumentException if no element matche...
java
public static <E> E findLast(E[] array, Predicate<E> predicate) { final Iterator<E> filtered = new FilteringIterator<E>(new ArrayIterator<E>(array), predicate); return new LastElement<E>().apply(filtered); }
[ "public", "static", "<", "E", ">", "E", "findLast", "(", "E", "[", "]", "array", ",", "Predicate", "<", "E", ">", "predicate", ")", "{", "final", "Iterator", "<", "E", ">", "filtered", "=", "new", "FilteringIterator", "<", "E", ">", "(", "new", "Ar...
Searches the last matching element returning it. @param <E> the element type parameter @param array the array to be searched @param predicate the predicate to be applied to each element @throws IllegalArgumentException if no element matches @return the last element found
[ "Searches", "the", "last", "matching", "element", "returning", "it", "." ]
train
https://github.com/cybazeitalia/emaze-dysfunctional/blob/98115a436e35335c5e8831f9fdc12f6d93d524be/src/main/java/net/emaze/dysfunctional/Searches.java#L627-L630
before/quality-check
modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java
Check.matchesPattern
@ArgumentsChecked @Throws( { """ Ensures that a readable sequence of {@code char} values matches a specified pattern. If the given character sequence does not match against the passed pattern, an {@link IllegalPatternArgumentException} will be thrown. <p> We recommend to use the overloaded method {@link Chec...
java
@ArgumentsChecked @Throws({ IllegalNullArgumentException.class, IllegalPatternArgumentException.class }) public static <T extends CharSequence> T matchesPattern(@Nonnull final Pattern pattern, @Nonnull final T chars) { return matchesPattern(pattern, chars, EMPTY_ARGUMENT_NAME); }
[ "@", "ArgumentsChecked", "@", "Throws", "(", "{", "IllegalNullArgumentException", ".", "class", ",", "IllegalPatternArgumentException", ".", "class", "}", ")", "public", "static", "<", "T", "extends", "CharSequence", ">", "T", "matchesPattern", "(", "@", "Nonnull"...
Ensures that a readable sequence of {@code char} values matches a specified pattern. If the given character sequence does not match against the passed pattern, an {@link IllegalPatternArgumentException} will be thrown. <p> We recommend to use the overloaded method {@link Check#matchesPattern(Pattern, CharSequence, Str...
[ "Ensures", "that", "a", "readable", "sequence", "of", "{", "@code", "char", "}", "values", "matches", "a", "specified", "pattern", ".", "If", "the", "given", "character", "sequence", "does", "not", "match", "against", "the", "passed", "pattern", "an", "{", ...
train
https://github.com/before/quality-check/blob/a75c32c39434ddb1f89bece57acae0536724c15a/modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java#L1776-L1780
deeplearning4j/deeplearning4j
datavec/datavec-data/datavec-data-image/src/main/java/org/datavec/image/transform/PipelineImageTransform.java
PipelineImageTransform.doTransform
@Override protected ImageWritable doTransform(ImageWritable image, Random random) { """ Takes an image and executes a pipeline of combined transforms. @param image to transform, null == end of stream @param random object to use (or null for deterministic) @return transformed image """ if (shuf...
java
@Override protected ImageWritable doTransform(ImageWritable image, Random random) { if (shuffle) { Collections.shuffle(imageTransforms); } currentTransforms.clear(); // execute each item in the pipeline for (Pair<ImageTransform, Double> tuple : imageTransforms) ...
[ "@", "Override", "protected", "ImageWritable", "doTransform", "(", "ImageWritable", "image", ",", "Random", "random", ")", "{", "if", "(", "shuffle", ")", "{", "Collections", ".", "shuffle", "(", "imageTransforms", ")", ";", "}", "currentTransforms", ".", "cle...
Takes an image and executes a pipeline of combined transforms. @param image to transform, null == end of stream @param random object to use (or null for deterministic) @return transformed image
[ "Takes", "an", "image", "and", "executes", "a", "pipeline", "of", "combined", "transforms", "." ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/datavec/datavec-data/datavec-data-image/src/main/java/org/datavec/image/transform/PipelineImageTransform.java#L105-L123
moparisthebest/beehive
beehive-netui-tags/src/main/java/org/apache/beehive/netui/databinding/datagrid/api/DataGridStateFactory.java
DataGridStateFactory.getDataGridState
public final DataGridState getDataGridState(String name, DataGridConfig config) { """ <p> Lookup a {@link DataGridState} object given a data grid identifier and a specific {@link DataGridConfig} object. </p> @param name the name of the data grid @param config the {@link DataGridConfig} object to use when cr...
java
public final DataGridState getDataGridState(String name, DataGridConfig config) { if(config == null) throw new IllegalArgumentException(Bundle.getErrorString("DataGridStateFactory_nullDataGridConfig")); DataGridStateCodec codec = lookupCodec(name, config); DataGridState state = code...
[ "public", "final", "DataGridState", "getDataGridState", "(", "String", "name", ",", "DataGridConfig", "config", ")", "{", "if", "(", "config", "==", "null", ")", "throw", "new", "IllegalArgumentException", "(", "Bundle", ".", "getErrorString", "(", "\"DataGridStat...
<p> Lookup a {@link DataGridState} object given a data grid identifier and a specific {@link DataGridConfig} object. </p> @param name the name of the data grid @param config the {@link DataGridConfig} object to use when creating the grid's {@link DataGridState} object. @return the data grid state object
[ "<p", ">", "Lookup", "a", "{", "@link", "DataGridState", "}", "object", "given", "a", "data", "grid", "identifier", "and", "a", "specific", "{", "@link", "DataGridConfig", "}", "object", ".", "<", "/", "p", ">" ]
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-tags/src/main/java/org/apache/beehive/netui/databinding/datagrid/api/DataGridStateFactory.java#L115-L122
looly/hutool
hutool-core/src/main/java/cn/hutool/core/date/format/FastDateParser.java
FastDateParser.getStrategy
private Strategy getStrategy(final char f, final int width, final Calendar definingCalendar) { """ Obtain a Strategy given a field from a SimpleDateFormat pattern @param formatField A sub-sequence of the SimpleDateFormat pattern @param definingCalendar The calendar to obtain the short and long values @return ...
java
private Strategy getStrategy(final char f, final int width, final Calendar definingCalendar) { switch (f) { default: throw new IllegalArgumentException("Format '" + f + "' not supported"); case 'D': return DAY_OF_YEAR_STRATEGY; case 'E': return getLocaleSpecificStrategy(Calendar.DAY_OF_WEEK, defi...
[ "private", "Strategy", "getStrategy", "(", "final", "char", "f", ",", "final", "int", "width", ",", "final", "Calendar", "definingCalendar", ")", "{", "switch", "(", "f", ")", "{", "default", ":", "throw", "new", "IllegalArgumentException", "(", "\"Format '\""...
Obtain a Strategy given a field from a SimpleDateFormat pattern @param formatField A sub-sequence of the SimpleDateFormat pattern @param definingCalendar The calendar to obtain the short and long values @return The Strategy that will handle parsing for the field
[ "Obtain", "a", "Strategy", "given", "a", "field", "from", "a", "SimpleDateFormat", "pattern" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/date/format/FastDateParser.java#L396-L447
netty/netty
handler/src/main/java/io/netty/handler/ssl/JdkSslContext.java
JdkSslContext.toNegotiator
@SuppressWarnings("deprecation") static JdkApplicationProtocolNegotiator toNegotiator(ApplicationProtocolConfig config, boolean isServer) { """ Translate a {@link ApplicationProtocolConfig} object to a {@link JdkApplicationProtocolNegotiator} object. @param config The configuration which defines the translati...
java
@SuppressWarnings("deprecation") static JdkApplicationProtocolNegotiator toNegotiator(ApplicationProtocolConfig config, boolean isServer) { if (config == null) { return JdkDefaultApplicationProtocolNegotiator.INSTANCE; } switch(config.protocol()) { case NONE: ...
[ "@", "SuppressWarnings", "(", "\"deprecation\"", ")", "static", "JdkApplicationProtocolNegotiator", "toNegotiator", "(", "ApplicationProtocolConfig", "config", ",", "boolean", "isServer", ")", "{", "if", "(", "config", "==", "null", ")", "{", "return", "JdkDefaultAppl...
Translate a {@link ApplicationProtocolConfig} object to a {@link JdkApplicationProtocolNegotiator} object. @param config The configuration which defines the translation @param isServer {@code true} if a server {@code false} otherwise. @return The results of the translation
[ "Translate", "a", "{" ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/handler/src/main/java/io/netty/handler/ssl/JdkSslContext.java#L377-L434
abel533/Mapper
core/src/main/java/tk/mybatis/mapper/mapperhelper/SqlHelper.java
SqlHelper.whereLogicDelete
public static String whereLogicDelete(Class<?> entityClass, boolean isDeleted) { """ 逻辑删除的where条件,没有逻辑删除注解则返回空字符串 <br> AND column = value @param entityClass @param isDeleted true:已经逻辑删除,false:未逻辑删除 @return """ String value = logicDeleteColumnEqualsValue(entityClass, isDeleted); return ...
java
public static String whereLogicDelete(Class<?> entityClass, boolean isDeleted) { String value = logicDeleteColumnEqualsValue(entityClass, isDeleted); return "".equals(value) ? "" : " AND " + value; }
[ "public", "static", "String", "whereLogicDelete", "(", "Class", "<", "?", ">", "entityClass", ",", "boolean", "isDeleted", ")", "{", "String", "value", "=", "logicDeleteColumnEqualsValue", "(", "entityClass", ",", "isDeleted", ")", ";", "return", "\"\"", ".", ...
逻辑删除的where条件,没有逻辑删除注解则返回空字符串 <br> AND column = value @param entityClass @param isDeleted true:已经逻辑删除,false:未逻辑删除 @return
[ "逻辑删除的where条件,没有逻辑删除注解则返回空字符串", "<br", ">", "AND", "column", "=", "value" ]
train
https://github.com/abel533/Mapper/blob/45c3d716583cba3680e03f1f6790fab5e1f4f668/core/src/main/java/tk/mybatis/mapper/mapperhelper/SqlHelper.java#L723-L726
netty/netty
common/src/main/java/io/netty/util/internal/PromiseNotificationUtil.java
PromiseNotificationUtil.tryFailure
public static void tryFailure(Promise<?> p, Throwable cause, InternalLogger logger) { """ Try to mark the {@link Promise} as failure and log if {@code logger} is not {@code null} in case this fails. """ if (!p.tryFailure(cause) && logger != null) { Throwable err = p.cause(); if ...
java
public static void tryFailure(Promise<?> p, Throwable cause, InternalLogger logger) { if (!p.tryFailure(cause) && logger != null) { Throwable err = p.cause(); if (err == null) { logger.warn("Failed to mark a promise as failure because it has succeeded already: {}", p, cau...
[ "public", "static", "void", "tryFailure", "(", "Promise", "<", "?", ">", "p", ",", "Throwable", "cause", ",", "InternalLogger", "logger", ")", "{", "if", "(", "!", "p", ".", "tryFailure", "(", "cause", ")", "&&", "logger", "!=", "null", ")", "{", "Th...
Try to mark the {@link Promise} as failure and log if {@code logger} is not {@code null} in case this fails.
[ "Try", "to", "mark", "the", "{" ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/common/src/main/java/io/netty/util/internal/PromiseNotificationUtil.java#L63-L74
apache/flink
flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/functions/SqlDateTimeUtils.java
SqlDateTimeUtils.dateSub
public static String dateSub(String dateStr, int days, TimeZone tz) { """ Do subtraction on date string. @param dateStr formatted date string. @param days days count you want to subtract. @param tz time zone of the date time string @return datetime string. """ long ts = parseToTimeMillis(dateStr, tz); ...
java
public static String dateSub(String dateStr, int days, TimeZone tz) { long ts = parseToTimeMillis(dateStr, tz); if (ts == Long.MIN_VALUE) { return null; } return dateSub(ts, days, tz); }
[ "public", "static", "String", "dateSub", "(", "String", "dateStr", ",", "int", "days", ",", "TimeZone", "tz", ")", "{", "long", "ts", "=", "parseToTimeMillis", "(", "dateStr", ",", "tz", ")", ";", "if", "(", "ts", "==", "Long", ".", "MIN_VALUE", ")", ...
Do subtraction on date string. @param dateStr formatted date string. @param days days count you want to subtract. @param tz time zone of the date time string @return datetime string.
[ "Do", "subtraction", "on", "date", "string", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/functions/SqlDateTimeUtils.java#L755-L761
EdwardRaff/JSAT
JSAT/src/jsat/math/optimization/WolfeNWLineSearch.java
WolfeNWLineSearch.setC1
public void setC1(double c1) { """ Sets the constant used for the <i>sufficient decrease condition</i> f(x+&alpha; p) &le; f(x) + c<sub>1</sub> &alpha; p<sup>T</sup>&nabla;f(x) <br> <br> This value must always be less than {@link #setC2(double) } @param c1 the <i>sufficient decrease condition</i> """ ...
java
public void setC1(double c1) { if(c1 <= 0) throw new IllegalArgumentException("c1 must be greater than 0, not " + c1); else if(c1 >= c2) throw new IllegalArgumentException("c1 must be less than c2"); this.c1 = c1; }
[ "public", "void", "setC1", "(", "double", "c1", ")", "{", "if", "(", "c1", "<=", "0", ")", "throw", "new", "IllegalArgumentException", "(", "\"c1 must be greater than 0, not \"", "+", "c1", ")", ";", "else", "if", "(", "c1", ">=", "c2", ")", "throw", "ne...
Sets the constant used for the <i>sufficient decrease condition</i> f(x+&alpha; p) &le; f(x) + c<sub>1</sub> &alpha; p<sup>T</sup>&nabla;f(x) <br> <br> This value must always be less than {@link #setC2(double) } @param c1 the <i>sufficient decrease condition</i>
[ "Sets", "the", "constant", "used", "for", "the", "<i", ">", "sufficient", "decrease", "condition<", "/", "i", ">", "f", "(", "x", "+", "&alpha", ";", "p", ")", "&le", ";", "f", "(", "x", ")", "+", "c<sub", ">", "1<", "/", "sub", ">", "&alpha", ...
train
https://github.com/EdwardRaff/JSAT/blob/0ff53b7b39684b2379cc1da522f5b3a954b15cfb/JSAT/src/jsat/math/optimization/WolfeNWLineSearch.java#L66-L73
pac4j/pac4j
pac4j-core/src/main/java/org/pac4j/core/util/CommonHelper.java
CommonHelper.areEquals
public static boolean areEquals(final String s1, final String s2) { """ Compare two String to see if they are equals (both null is ok). @param s1 string @param s2 string @return if two String are equals """ return s1 == null ? s2 == null : s1.equals(s2); }
java
public static boolean areEquals(final String s1, final String s2) { return s1 == null ? s2 == null : s1.equals(s2); }
[ "public", "static", "boolean", "areEquals", "(", "final", "String", "s1", ",", "final", "String", "s2", ")", "{", "return", "s1", "==", "null", "?", "s2", "==", "null", ":", "s1", ".", "equals", "(", "s2", ")", ";", "}" ]
Compare two String to see if they are equals (both null is ok). @param s1 string @param s2 string @return if two String are equals
[ "Compare", "two", "String", "to", "see", "if", "they", "are", "equals", "(", "both", "null", "is", "ok", ")", "." ]
train
https://github.com/pac4j/pac4j/blob/d9cd029f8783792b31dd48bf1e32f80628f2c4a3/pac4j-core/src/main/java/org/pac4j/core/util/CommonHelper.java#L52-L54
mozilla/rhino
src/org/mozilla/javascript/Context.java
Context.newArray
public Scriptable newArray(Scriptable scope, int length) { """ Create an array with a specified initial length. <p> @param scope the scope to create the object in @param length the initial length (JavaScript arrays may have additional properties added dynamically). @return the new array object """ ...
java
public Scriptable newArray(Scriptable scope, int length) { NativeArray result = new NativeArray(length); ScriptRuntime.setBuiltinProtoAndParent(result, scope, TopLevel.Builtins.Array); return result; }
[ "public", "Scriptable", "newArray", "(", "Scriptable", "scope", ",", "int", "length", ")", "{", "NativeArray", "result", "=", "new", "NativeArray", "(", "length", ")", ";", "ScriptRuntime", ".", "setBuiltinProtoAndParent", "(", "result", ",", "scope", ",", "To...
Create an array with a specified initial length. <p> @param scope the scope to create the object in @param length the initial length (JavaScript arrays may have additional properties added dynamically). @return the new array object
[ "Create", "an", "array", "with", "a", "specified", "initial", "length", ".", "<p", ">" ]
train
https://github.com/mozilla/rhino/blob/fa8a86df11d37623f5faa8d445a5876612bc47b0/src/org/mozilla/javascript/Context.java#L1694-L1700
js-lib-com/commons
src/main/java/js/util/Classes.java
Classes.hasMethod
public static boolean hasMethod(Class<?> clazz, String methodName, Class<?>... parameterTypes) { """ Predicate to test if a class do possess a given method. Java language support for method discovery throws {@link NoSuchMethodException} if method not found. This method does not throws exception but returns a bool...
java
public static boolean hasMethod(Class<?> clazz, String methodName, Class<?>... parameterTypes) { try { clazz.getDeclaredMethod(methodName, parameterTypes); return true; } catch(SecurityException e) { throw new BugError(e); } catch(NoSuchMethodException expectable) { ...
[ "public", "static", "boolean", "hasMethod", "(", "Class", "<", "?", ">", "clazz", ",", "String", "methodName", ",", "Class", "<", "?", ">", "...", "parameterTypes", ")", "{", "try", "{", "clazz", ".", "getDeclaredMethod", "(", "methodName", ",", "parameter...
Predicate to test if a class do possess a given method. Java language support for method discovery throws {@link NoSuchMethodException} if method not found. This method does not throws exception but returns a boolean. @param clazz reflexive class, @param methodName method name, @param parameterTypes formal parameters ...
[ "Predicate", "to", "test", "if", "a", "class", "do", "possess", "a", "given", "method", ".", "Java", "language", "support", "for", "method", "discovery", "throws", "{", "@link", "NoSuchMethodException", "}", "if", "method", "not", "found", ".", "This", "meth...
train
https://github.com/js-lib-com/commons/blob/f8c64482142b163487745da74feb106f0765c16b/src/main/java/js/util/Classes.java#L509-L522
sdl/odata
odata_renderer/src/main/java/com/sdl/odata/unmarshaller/json/ODataJsonParser.java
ODataJsonParser.setEntityNavigationProperties
protected void setEntityNavigationProperties(Object entity, StructuredType entityType) throws ODataException { """ Sets the given entity with navigation links. @param entity entity @param entityType the entity type @throws ODataException If unable to set navigation properties """ for (Map.Entr...
java
protected void setEntityNavigationProperties(Object entity, StructuredType entityType) throws ODataException { for (Map.Entry<String, Object> entry : links.entrySet()) { String propertyName = entry.getKey(); Object entryLinks = entry.getValue(); LOG.debug("Found link for navi...
[ "protected", "void", "setEntityNavigationProperties", "(", "Object", "entity", ",", "StructuredType", "entityType", ")", "throws", "ODataException", "{", "for", "(", "Map", ".", "Entry", "<", "String", ",", "Object", ">", "entry", ":", "links", ".", "entrySet", ...
Sets the given entity with navigation links. @param entity entity @param entityType the entity type @throws ODataException If unable to set navigation properties
[ "Sets", "the", "given", "entity", "with", "navigation", "links", "." ]
train
https://github.com/sdl/odata/blob/eb747d73e9af0f4e59a25b82ed656e526a7e2189/odata_renderer/src/main/java/com/sdl/odata/unmarshaller/json/ODataJsonParser.java#L136-L168
lessthanoptimal/BoofCV
main/boofcv-sfm/src/main/java/boofcv/alg/sfm/overhead/CameraPlaneProjection.java
CameraPlaneProjection.normalToPlane
public boolean normalToPlane( double normX , double normY , Point2D_F64 plane ) { """ Given a pixel in normalized coordinates, find the point on the plane. Make sure invert was set to true in {@link #setPlaneToCamera(georegression.struct.se.Se3_F64, boolean)} @param normX (input) Image pixel in normalized coo...
java
public boolean normalToPlane( double normX , double normY , Point2D_F64 plane ) { // Ray pointing from camera center through pixel to ground in ground reference frame pointing.set(normX,normY,1); GeometryMath_F64.mult(cameraToPlane.getR(), pointing, pointing); double height = cameraToPlane.getY(); // If the...
[ "public", "boolean", "normalToPlane", "(", "double", "normX", ",", "double", "normY", ",", "Point2D_F64", "plane", ")", "{", "// Ray pointing from camera center through pixel to ground in ground reference frame", "pointing", ".", "set", "(", "normX", ",", "normY", ",", ...
Given a pixel in normalized coordinates, find the point on the plane. Make sure invert was set to true in {@link #setPlaneToCamera(georegression.struct.se.Se3_F64, boolean)} @param normX (input) Image pixel in normalized coordinates, x-axis @param normY (input) Image pixel in normalized coordinates, y-axis @param pla...
[ "Given", "a", "pixel", "in", "normalized", "coordinates", "find", "the", "point", "on", "the", "plane", ".", "Make", "sure", "invert", "was", "set", "to", "true", "in", "{", "@link", "#setPlaneToCamera", "(", "georegression", ".", "struct", ".", "se", ".",...
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-sfm/src/main/java/boofcv/alg/sfm/overhead/CameraPlaneProjection.java#L188-L207
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDBaseOps.java
SDBaseOps.oneHot
public SDVariable oneHot(String name, SDVariable indices, int depth) { """ Convert the array to a one-hot array with walues 0 and 1 for each entry<br> If input has shape [ a, ..., n] then output has shape [ a, ..., n, depth], with out[i, ..., j, in[i,...,j]] = 1 with other values being set to 0 @param name ...
java
public SDVariable oneHot(String name, SDVariable indices, int depth) { return oneHot(name, indices, depth, -1, 1.00, 0.00); }
[ "public", "SDVariable", "oneHot", "(", "String", "name", ",", "SDVariable", "indices", ",", "int", "depth", ")", "{", "return", "oneHot", "(", "name", ",", "indices", ",", "depth", ",", "-", "1", ",", "1.00", ",", "0.00", ")", ";", "}" ]
Convert the array to a one-hot array with walues 0 and 1 for each entry<br> If input has shape [ a, ..., n] then output has shape [ a, ..., n, depth], with out[i, ..., j, in[i,...,j]] = 1 with other values being set to 0 @param name Output variable name @param indices Indices - value 0 to depth-1 @param depth Num...
[ "Convert", "the", "array", "to", "a", "one", "-", "hot", "array", "with", "walues", "0", "and", "1", "for", "each", "entry<br", ">", "If", "input", "has", "shape", "[", "a", "...", "n", "]", "then", "output", "has", "shape", "[", "a", "...", "n", ...
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDBaseOps.java#L1505-L1507
biojava/biojava
biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/Utils.java
Utils.doesSequenceContainInvalidChar
public final static boolean doesSequenceContainInvalidChar(String sequence, Set<Character> cSet) { """ Checks if given sequence contains invalid characters. Returns true if invalid characters are found, else return false. Note that any characters are deemed as valid only if it is found in cSet. @param sequence...
java
public final static boolean doesSequenceContainInvalidChar(String sequence, Set<Character> cSet){ for(char c:sequence.toCharArray()){ if(!cSet.contains(c)) return true; } return false; }
[ "public", "final", "static", "boolean", "doesSequenceContainInvalidChar", "(", "String", "sequence", ",", "Set", "<", "Character", ">", "cSet", ")", "{", "for", "(", "char", "c", ":", "sequence", ".", "toCharArray", "(", ")", ")", "{", "if", "(", "!", "c...
Checks if given sequence contains invalid characters. Returns true if invalid characters are found, else return false. Note that any characters are deemed as valid only if it is found in cSet. @param sequence protein sequence to be check. @param cSet the set of characters that are deemed valid. @return true if invalid...
[ "Checks", "if", "given", "sequence", "contains", "invalid", "characters", ".", "Returns", "true", "if", "invalid", "characters", "are", "found", "else", "return", "false", ".", "Note", "that", "any", "characters", "are", "deemed", "as", "valid", "only", "if", ...
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-aa-prop/src/main/java/org/biojava/nbio/aaproperties/Utils.java#L70-L75
matthewhorridge/owlapi-gwt
owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLSymmetricObjectPropertyAxiomImpl_CustomFieldSerializer.java
OWLSymmetricObjectPropertyAxiomImpl_CustomFieldSerializer.serializeInstance
@Override public void serializeInstance(SerializationStreamWriter streamWriter, OWLSymmetricObjectPropertyAxiomImpl instance) throws SerializationException { """ Serializes the content of the object into the {@link com.google.gwt.user.client.rpc.SerializationStreamWriter}. @param streamWriter the {@link co...
java
@Override public void serializeInstance(SerializationStreamWriter streamWriter, OWLSymmetricObjectPropertyAxiomImpl instance) throws SerializationException { serialize(streamWriter, instance); }
[ "@", "Override", "public", "void", "serializeInstance", "(", "SerializationStreamWriter", "streamWriter", ",", "OWLSymmetricObjectPropertyAxiomImpl", "instance", ")", "throws", "SerializationException", "{", "serialize", "(", "streamWriter", ",", "instance", ")", ";", "}"...
Serializes the content of the object into the {@link com.google.gwt.user.client.rpc.SerializationStreamWriter}. @param streamWriter the {@link com.google.gwt.user.client.rpc.SerializationStreamWriter} to write the object's content to @param instance the object instance to serialize @throws com.google.gwt.user.clie...
[ "Serializes", "the", "content", "of", "the", "object", "into", "the", "{", "@link", "com", ".", "google", ".", "gwt", ".", "user", ".", "client", ".", "rpc", ".", "SerializationStreamWriter", "}", "." ]
train
https://github.com/matthewhorridge/owlapi-gwt/blob/7ab975fb6cef3c8947099983551672a3b5d4e2fd/owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLSymmetricObjectPropertyAxiomImpl_CustomFieldSerializer.java#L73-L76
reactor/reactor-netty
src/main/java/reactor/netty/tcp/InetSocketAddressUtil.java
InetSocketAddressUtil.createInetSocketAddress
public static InetSocketAddress createInetSocketAddress(String hostname, int port, boolean resolve) { """ Creates InetSocketAddress instance. Numeric IP addresses will be detected and resolved without doing reverse DNS lookups. @param hostname ip-address or hostname @param port port number @param resolve ...
java
public static InetSocketAddress createInetSocketAddress(String hostname, int port, boolean resolve) { InetSocketAddress inetAddressForIpString = createForIpString(hostname, port); if (inetAddressForIpString != null) { return inetAddressForIpString; } else { return resolve ? new InetSocketAddress(hostna...
[ "public", "static", "InetSocketAddress", "createInetSocketAddress", "(", "String", "hostname", ",", "int", "port", ",", "boolean", "resolve", ")", "{", "InetSocketAddress", "inetAddressForIpString", "=", "createForIpString", "(", "hostname", ",", "port", ")", ";", "...
Creates InetSocketAddress instance. Numeric IP addresses will be detected and resolved without doing reverse DNS lookups. @param hostname ip-address or hostname @param port port number @param resolve when true, resolve given hostname at instance creation time @return InetSocketAddress for given parameters
[ "Creates", "InetSocketAddress", "instance", ".", "Numeric", "IP", "addresses", "will", "be", "detected", "and", "resolved", "without", "doing", "reverse", "DNS", "lookups", "." ]
train
https://github.com/reactor/reactor-netty/blob/4ed14316e1d7fca3cecd18d6caa5f2251e159e49/src/main/java/reactor/netty/tcp/InetSocketAddressUtil.java#L72-L82
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/kml/KMLGeometry.java
KMLGeometry.toKMLPoint
public static void toKMLPoint(Point point, ExtrudeMode extrude, int altitudeModeEnum, StringBuilder sb) { """ A geographic location defined by longitude, latitude, and (optional) altitude. Syntax : <Point id="ID"> <!-- specific to Point --> <extrude>0</extrude> <!-- boolean --> <altitudeMode>clampToGroun...
java
public static void toKMLPoint(Point point, ExtrudeMode extrude, int altitudeModeEnum, StringBuilder sb) { sb.append("<Point>"); appendExtrude(extrude, sb); appendAltitudeMode(altitudeModeEnum, sb); sb.append("<coordinates>"); Coordinate coord = point.getCoordinate(); sb.a...
[ "public", "static", "void", "toKMLPoint", "(", "Point", "point", ",", "ExtrudeMode", "extrude", ",", "int", "altitudeModeEnum", ",", "StringBuilder", "sb", ")", "{", "sb", ".", "append", "(", "\"<Point>\"", ")", ";", "appendExtrude", "(", "extrude", ",", "sb...
A geographic location defined by longitude, latitude, and (optional) altitude. Syntax : <Point id="ID"> <!-- specific to Point --> <extrude>0</extrude> <!-- boolean --> <altitudeMode>clampToGround</altitudeMode> <!-- kml:altitudeModeEnum: clampToGround, relativeToGround, or absolute --> <!-- or, substitute gx:altitud...
[ "A", "geographic", "location", "defined", "by", "longitude", "latitude", "and", "(", "optional", ")", "altitude", "." ]
train
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/kml/KMLGeometry.java#L98-L109
groupon/robo-remote
RoboRemoteClientCommon/src/main/com/groupon/roboremote/roboremoteclientcommon/QueryBuilder.java
QueryBuilder.mapField
public QueryBuilder mapField(String query, String field_name) throws Exception { """ Used to get the value from a field @param query @param field_name @return @throws Exception """ JSONObject op = new JSONObject(); if (query != null) op.put(Constants.REQUEST_QUERY, query); ...
java
public QueryBuilder mapField(String query, String field_name) throws Exception { JSONObject op = new JSONObject(); if (query != null) op.put(Constants.REQUEST_QUERY, query); op.put(Constants.REQUEST_FIELD, field_name); JSONArray operations = (JSONArray) request.get(Constan...
[ "public", "QueryBuilder", "mapField", "(", "String", "query", ",", "String", "field_name", ")", "throws", "Exception", "{", "JSONObject", "op", "=", "new", "JSONObject", "(", ")", ";", "if", "(", "query", "!=", "null", ")", "op", ".", "put", "(", "Consta...
Used to get the value from a field @param query @param field_name @return @throws Exception
[ "Used", "to", "get", "the", "value", "from", "a", "field" ]
train
https://github.com/groupon/robo-remote/blob/12d242faad50bf90f98657ca9a0c0c3ae1993f07/RoboRemoteClientCommon/src/main/com/groupon/roboremote/roboremoteclientcommon/QueryBuilder.java#L58-L72
BranchMetrics/android-branch-deep-linking
Branch-SDK/src/io/branch/referral/PrefHelper.java
PrefHelper.setActionTotalCount
public void setActionTotalCount(String action, int count) { """ <p>Sets the count of total number of times that the specified action has been carried out during the current session, as defined in preferences.</p> @param action - A {@link String} value containing the name of the action to return the count for....
java
public void setActionTotalCount(String action, int count) { ArrayList<String> actions = getActions(); if (!actions.contains(action)) { actions.add(action); setActions(actions); } setInteger(KEY_TOTAL_BASE + action, count); }
[ "public", "void", "setActionTotalCount", "(", "String", "action", ",", "int", "count", ")", "{", "ArrayList", "<", "String", ">", "actions", "=", "getActions", "(", ")", ";", "if", "(", "!", "actions", ".", "contains", "(", "action", ")", ")", "{", "ac...
<p>Sets the count of total number of times that the specified action has been carried out during the current session, as defined in preferences.</p> @param action - A {@link String} value containing the name of the action to return the count for. @param count - An {@link Integer} value containing the total number of ...
[ "<p", ">", "Sets", "the", "count", "of", "total", "number", "of", "times", "that", "the", "specified", "action", "has", "been", "carried", "out", "during", "the", "current", "session", "as", "defined", "in", "preferences", ".", "<", "/", "p", ">" ]
train
https://github.com/BranchMetrics/android-branch-deep-linking/blob/e3bee2ccfcbf6d4bf1a5815b5b86666e4ff8f848/Branch-SDK/src/io/branch/referral/PrefHelper.java#L834-L841
jbundle/jbundle
thin/base/db/misc/src/main/java/org/jbundle/thin/base/db/client/SyncRemoteTable.java
SyncRemoteTable.remove
public void remove(Object data, int iOpenMode) throws DBException, RemoteException { """ Delete the current record. @param - This is a dummy param, because this call conflicts with a call in EJBHome. @exception DBException File exception. """ synchronized(m_objSync) { m_tableRemot...
java
public void remove(Object data, int iOpenMode) throws DBException, RemoteException { synchronized(m_objSync) { m_tableRemote.remove(data, iOpenMode); } }
[ "public", "void", "remove", "(", "Object", "data", ",", "int", "iOpenMode", ")", "throws", "DBException", ",", "RemoteException", "{", "synchronized", "(", "m_objSync", ")", "{", "m_tableRemote", ".", "remove", "(", "data", ",", "iOpenMode", ")", ";", "}", ...
Delete the current record. @param - This is a dummy param, because this call conflicts with a call in EJBHome. @exception DBException File exception.
[ "Delete", "the", "current", "record", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/db/misc/src/main/java/org/jbundle/thin/base/db/client/SyncRemoteTable.java#L148-L154
bitcoinj/bitcoinj
core/src/main/java/org/bitcoinj/wallet/WalletProtobufSerializer.java
WalletProtobufSerializer.readWallet
public Wallet readWallet(InputStream input, boolean forceReset, @Nullable WalletExtension[] extensions) throws UnreadableWalletException { """ <p>Loads wallet data from the given protocol buffer and inserts it into the given Wallet object. This is primarily useful when you wish to pre-register extension objects. ...
java
public Wallet readWallet(InputStream input, boolean forceReset, @Nullable WalletExtension[] extensions) throws UnreadableWalletException { try { Protos.Wallet walletProto = parseToProto(input); final String paramsID = walletProto.getNetworkIdentifier(); NetworkParameters para...
[ "public", "Wallet", "readWallet", "(", "InputStream", "input", ",", "boolean", "forceReset", ",", "@", "Nullable", "WalletExtension", "[", "]", "extensions", ")", "throws", "UnreadableWalletException", "{", "try", "{", "Protos", ".", "Wallet", "walletProto", "=", ...
<p>Loads wallet data from the given protocol buffer and inserts it into the given Wallet object. This is primarily useful when you wish to pre-register extension objects. Note that if loading fails the provided Wallet object may be in an indeterminate state and should be thrown away. Do not simply call this method agai...
[ "<p", ">", "Loads", "wallet", "data", "from", "the", "given", "protocol", "buffer", "and", "inserts", "it", "into", "the", "given", "Wallet", "object", ".", "This", "is", "primarily", "useful", "when", "you", "wish", "to", "pre", "-", "register", "extensio...
train
https://github.com/bitcoinj/bitcoinj/blob/9cf13d29315014ed59cf4fc5944e5f227e8df9a6/core/src/main/java/org/bitcoinj/wallet/WalletProtobufSerializer.java#L439-L454
apache/flink
flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/join/TimeBoundedStreamJoin.java
TimeBoundedStreamJoin.registerCleanUpTimer
private void registerCleanUpTimer(Context ctx, long rowTime, boolean leftRow) throws IOException { """ Register a timer for cleaning up rows in a specified time. @param ctx the context to register timer @param rowTime time for the input row @param leftRow whether this row comes from the left stream """ ...
java
private void registerCleanUpTimer(Context ctx, long rowTime, boolean leftRow) throws IOException { if (leftRow) { long cleanUpTime = rowTime + leftRelativeSize + minCleanUpInterval + allowedLateness + 1; registerTimer(ctx, cleanUpTime); rightTimerState.update(cleanUpTime); } else { long cleanUpTime = ro...
[ "private", "void", "registerCleanUpTimer", "(", "Context", "ctx", ",", "long", "rowTime", ",", "boolean", "leftRow", ")", "throws", "IOException", "{", "if", "(", "leftRow", ")", "{", "long", "cleanUpTime", "=", "rowTime", "+", "leftRelativeSize", "+", "minCle...
Register a timer for cleaning up rows in a specified time. @param ctx the context to register timer @param rowTime time for the input row @param leftRow whether this row comes from the left stream
[ "Register", "a", "timer", "for", "cleaning", "up", "rows", "in", "a", "specified", "time", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/join/TimeBoundedStreamJoin.java#L364-L374
sonyxperiadev/gerrit-events
src/main/java/com/sonymobile/tools/gerrit/gerritevents/ssh/SshConnectionImpl.java
SshConnectionImpl.waitForChannelClosure
private static void waitForChannelClosure(Channel channel, long timoutInMs) { """ Blocks until the given channel is close or the timout is reached @param channel the channel to wait for @param timoutInMs the timeout """ final long start = System.currentTimeMillis(); final long until = start...
java
private static void waitForChannelClosure(Channel channel, long timoutInMs) { final long start = System.currentTimeMillis(); final long until = start + timoutInMs; try { while (!channel.isClosed() && System.currentTimeMillis() < until) { Thread.sleep(CLOSURE_WAIT_INTE...
[ "private", "static", "void", "waitForChannelClosure", "(", "Channel", "channel", ",", "long", "timoutInMs", ")", "{", "final", "long", "start", "=", "System", ".", "currentTimeMillis", "(", ")", ";", "final", "long", "until", "=", "start", "+", "timoutInMs", ...
Blocks until the given channel is close or the timout is reached @param channel the channel to wait for @param timoutInMs the timeout
[ "Blocks", "until", "the", "given", "channel", "is", "close", "or", "the", "timout", "is", "reached" ]
train
https://github.com/sonyxperiadev/gerrit-events/blob/9a443d13dded85cc4709136ac33989f2bbb34fe2/src/main/java/com/sonymobile/tools/gerrit/gerritevents/ssh/SshConnectionImpl.java#L300-L314
liyiorg/weixin-popular
src/main/java/weixin/popular/api/PayMchAPI.java
PayMchAPI.payProfitsharingquery
public static PayProfitsharingqueryResult payProfitsharingquery(PayProfitsharingquery payProfitsharingquery,String key) { """ 分账-查询分账结果 @since 2.8.25 @param payProfitsharingquery payProfitsharingquery @param key key @return PayProfitsharingqueryResult """ Map<String,String> map = MapUtil.objectToMap(payP...
java
public static PayProfitsharingqueryResult payProfitsharingquery(PayProfitsharingquery payProfitsharingquery,String key){ Map<String,String> map = MapUtil.objectToMap(payProfitsharingquery); String sign = SignatureUtil.generateSign(map,payProfitsharingquery.getSign_type() == null? "HMAC-SHA256": payProfitsharingquer...
[ "public", "static", "PayProfitsharingqueryResult", "payProfitsharingquery", "(", "PayProfitsharingquery", "payProfitsharingquery", ",", "String", "key", ")", "{", "Map", "<", "String", ",", "String", ">", "map", "=", "MapUtil", ".", "objectToMap", "(", "payProfitshari...
分账-查询分账结果 @since 2.8.25 @param payProfitsharingquery payProfitsharingquery @param key key @return PayProfitsharingqueryResult
[ "分账", "-", "查询分账结果" ]
train
https://github.com/liyiorg/weixin-popular/blob/c64255292d41463bdb671938feaabf42a335d82c/src/main/java/weixin/popular/api/PayMchAPI.java#L799-L810
wildfly/wildfly-core
patching/src/main/java/org/jboss/as/patching/runner/IdentityPatchContext.java
IdentityPatchContext.writePatch
static void writePatch(final Patch rollbackPatch, final File file) throws IOException { """ Write the patch.xml @param rollbackPatch the patch @param file the target file @throws IOException """ final File parent = file.getParentFile(); if (!parent.isDirectory()) { if ...
java
static void writePatch(final Patch rollbackPatch, final File file) throws IOException { final File parent = file.getParentFile(); if (!parent.isDirectory()) { if (!parent.mkdirs() && !parent.exists()) { throw PatchLogger.ROOT_LOGGER.cannotCreateDirectory(file.getAbsolutePath(...
[ "static", "void", "writePatch", "(", "final", "Patch", "rollbackPatch", ",", "final", "File", "file", ")", "throws", "IOException", "{", "final", "File", "parent", "=", "file", ".", "getParentFile", "(", ")", ";", "if", "(", "!", "parent", ".", "isDirector...
Write the patch.xml @param rollbackPatch the patch @param file the target file @throws IOException
[ "Write", "the", "patch", ".", "xml" ]
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/patching/src/main/java/org/jboss/as/patching/runner/IdentityPatchContext.java#L1073-L1087
BBN-E/bue-common-open
common-core-open/src/main/java/com/bbn/bue/common/temporal/Timex2Time.java
Timex2Time.anchoredCopy
@Deprecated public Timex2Time anchoredCopy(final String anchorVal, final Symbol anchorDir) { """ Returns a copy of this Timex which is the same except with the anchor attributes set as specified. @deprecated Use {@link #copyBuilder()} and {@link Builder#withAnchorValue(Symbol)} and {@link Builder#withAnchor...
java
@Deprecated public Timex2Time anchoredCopy(final String anchorVal, final Symbol anchorDir) { return anchoredCopy(Symbol.from(checkNotNull(anchorVal)), checkNotNull(anchorDir)); }
[ "@", "Deprecated", "public", "Timex2Time", "anchoredCopy", "(", "final", "String", "anchorVal", ",", "final", "Symbol", "anchorDir", ")", "{", "return", "anchoredCopy", "(", "Symbol", ".", "from", "(", "checkNotNull", "(", "anchorVal", ")", ")", ",", "checkNot...
Returns a copy of this Timex which is the same except with the anchor attributes set as specified. @deprecated Use {@link #copyBuilder()} and {@link Builder#withAnchorValue(Symbol)} and {@link Builder#withAnchorDirection(Symbol)} instead
[ "Returns", "a", "copy", "of", "this", "Timex", "which", "is", "the", "same", "except", "with", "the", "anchor", "attributes", "set", "as", "specified", "." ]
train
https://github.com/BBN-E/bue-common-open/blob/d618652674d647867306e2e4b987a21b7c29c015/common-core-open/src/main/java/com/bbn/bue/common/temporal/Timex2Time.java#L211-L214
alkacon/opencms-core
src/org/opencms/ui/apps/git/CmsGitCheckin.java
CmsGitCheckin.zipRfsFolder
public static void zipRfsFolder(final File root, final OutputStream zipOutput) throws Exception { """ Creates ZIP file data from the files / subfolders of the given root folder, and sends it to the given stream.<p> The stream passed as an argument is closed after the data is written. @param root the folder t...
java
public static void zipRfsFolder(final File root, final OutputStream zipOutput) throws Exception { final ZipOutputStream zip = new ZipOutputStream(zipOutput); try { CmsFileUtil.walkFileSystem(root, new Closure() { @SuppressWarnings("resource") public void exe...
[ "public", "static", "void", "zipRfsFolder", "(", "final", "File", "root", ",", "final", "OutputStream", "zipOutput", ")", "throws", "Exception", "{", "final", "ZipOutputStream", "zip", "=", "new", "ZipOutputStream", "(", "zipOutput", ")", ";", "try", "{", "Cms...
Creates ZIP file data from the files / subfolders of the given root folder, and sends it to the given stream.<p> The stream passed as an argument is closed after the data is written. @param root the folder to zip @param zipOutput the output stream which the zip file data should be written to @throws Exception if som...
[ "Creates", "ZIP", "file", "data", "from", "the", "files", "/", "subfolders", "of", "the", "given", "root", "folder", "and", "sends", "it", "to", "the", "given", "stream", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/apps/git/CmsGitCheckin.java#L175-L212
Azure/azure-sdk-for-java
applicationinsights/resource-manager/v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/APIKeysInner.java
APIKeysInner.deleteAsync
public Observable<ApplicationInsightsComponentAPIKeyInner> deleteAsync(String resourceGroupName, String resourceName, String keyId) { """ Delete an API Key of an Application Insights component. @param resourceGroupName The name of the resource group. @param resourceName The name of the Application Insights com...
java
public Observable<ApplicationInsightsComponentAPIKeyInner> deleteAsync(String resourceGroupName, String resourceName, String keyId) { return deleteWithServiceResponseAsync(resourceGroupName, resourceName, keyId).map(new Func1<ServiceResponse<ApplicationInsightsComponentAPIKeyInner>, ApplicationInsightsComponent...
[ "public", "Observable", "<", "ApplicationInsightsComponentAPIKeyInner", ">", "deleteAsync", "(", "String", "resourceGroupName", ",", "String", "resourceName", ",", "String", "keyId", ")", "{", "return", "deleteWithServiceResponseAsync", "(", "resourceGroupName", ",", "res...
Delete an API Key of an Application Insights component. @param resourceGroupName The name of the resource group. @param resourceName The name of the Application Insights component resource. @param keyId The API Key ID. This is unique within a Application Insights component. @throws IllegalArgumentException thrown if p...
[ "Delete", "an", "API", "Key", "of", "an", "Application", "Insights", "component", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/applicationinsights/resource-manager/v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/APIKeysInner.java#L301-L308
liferay/com-liferay-commerce
commerce-tax-service/src/main/java/com/liferay/commerce/tax/service/persistence/impl/CommerceTaxMethodPersistenceImpl.java
CommerceTaxMethodPersistenceImpl.removeByG_E
@Override public CommerceTaxMethod removeByG_E(long groupId, String engineKey) throws NoSuchTaxMethodException { """ Removes the commerce tax method where groupId = &#63; and engineKey = &#63; from the database. @param groupId the group ID @param engineKey the engine key @return the commerce tax method tha...
java
@Override public CommerceTaxMethod removeByG_E(long groupId, String engineKey) throws NoSuchTaxMethodException { CommerceTaxMethod commerceTaxMethod = findByG_E(groupId, engineKey); return remove(commerceTaxMethod); }
[ "@", "Override", "public", "CommerceTaxMethod", "removeByG_E", "(", "long", "groupId", ",", "String", "engineKey", ")", "throws", "NoSuchTaxMethodException", "{", "CommerceTaxMethod", "commerceTaxMethod", "=", "findByG_E", "(", "groupId", ",", "engineKey", ")", ";", ...
Removes the commerce tax method where groupId = &#63; and engineKey = &#63; from the database. @param groupId the group ID @param engineKey the engine key @return the commerce tax method that was removed
[ "Removes", "the", "commerce", "tax", "method", "where", "groupId", "=", "&#63", ";", "and", "engineKey", "=", "&#63", ";", "from", "the", "database", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-tax-service/src/main/java/com/liferay/commerce/tax/service/persistence/impl/CommerceTaxMethodPersistenceImpl.java#L770-L776
twitter/chill
chill-java/src/main/java/com/twitter/chill/KryoPool.java
KryoPool.withBuffer
public static KryoPool withBuffer(int poolSize, final KryoInstantiator ki, final int outBufferMin, final int outBufferMax) { """ Output is created with new Output(outBufferMin, outBufferMax); """ return new KryoPool(poolSize) { protected SerDeState newInstance() { return new...
java
public static KryoPool withBuffer(int poolSize, final KryoInstantiator ki, final int outBufferMin, final int outBufferMax) { return new KryoPool(poolSize) { protected SerDeState newInstance() { return new SerDeState(ki.newKryo(), new Input(), new Output(outBufferMin, outBufferMax)); ...
[ "public", "static", "KryoPool", "withBuffer", "(", "int", "poolSize", ",", "final", "KryoInstantiator", "ki", ",", "final", "int", "outBufferMin", ",", "final", "int", "outBufferMax", ")", "{", "return", "new", "KryoPool", "(", "poolSize", ")", "{", "protected...
Output is created with new Output(outBufferMin, outBufferMax);
[ "Output", "is", "created", "with", "new", "Output", "(", "outBufferMin", "outBufferMax", ")", ";" ]
train
https://github.com/twitter/chill/blob/0919984ec3aeb320ff522911c726425e9f18ea41/chill-java/src/main/java/com/twitter/chill/KryoPool.java#L41-L50
line/centraldogma
server-auth/shiro/src/main/java/com/linecorp/centraldogma/server/auth/shiro/LoginService.java
LoginService.usernamePassword
private UsernamePasswordToken usernamePassword(ServiceRequestContext ctx, AggregatedHttpMessage req) { """ Returns {@link UsernamePasswordToken} which holds a username and a password. """ // check the Basic HTTP authentication first (https://tools.ietf.org/html/rfc7617) final BasicToken basicTo...
java
private UsernamePasswordToken usernamePassword(ServiceRequestContext ctx, AggregatedHttpMessage req) { // check the Basic HTTP authentication first (https://tools.ietf.org/html/rfc7617) final BasicToken basicToken = AuthTokenExtractors.BASIC.apply(req.headers()); if (basicToken != null) { ...
[ "private", "UsernamePasswordToken", "usernamePassword", "(", "ServiceRequestContext", "ctx", ",", "AggregatedHttpMessage", "req", ")", "{", "// check the Basic HTTP authentication first (https://tools.ietf.org/html/rfc7617)", "final", "BasicToken", "basicToken", "=", "AuthTokenExtrac...
Returns {@link UsernamePasswordToken} which holds a username and a password.
[ "Returns", "{" ]
train
https://github.com/line/centraldogma/blob/b9e46c67fbc26628c2186ce2f46e7fb303c831e9/server-auth/shiro/src/main/java/com/linecorp/centraldogma/server/auth/shiro/LoginService.java#L155-L181
kaazing/gateway
mina.core/core/src/main/java/org/apache/mina/filter/codec/textline/TextLineDecoder.java
TextLineDecoder.writeText
protected void writeText(IoSession session, String text, ProtocolDecoderOutput out) { """ By default, this method propagates the decoded line of text to {@code ProtocolDecoderOutput#write(Object)}. You may override this method to modify the default behavior. @param session the {@code IoSession} the received...
java
protected void writeText(IoSession session, String text, ProtocolDecoderOutput out) { out.write(text); }
[ "protected", "void", "writeText", "(", "IoSession", "session", ",", "String", "text", ",", "ProtocolDecoderOutput", "out", ")", "{", "out", ".", "write", "(", "text", ")", ";", "}" ]
By default, this method propagates the decoded line of text to {@code ProtocolDecoderOutput#write(Object)}. You may override this method to modify the default behavior. @param session the {@code IoSession} the received data. @param text the decoded text @param out the upstream {@code ProtocolDecoderOutput}.
[ "By", "default", "this", "method", "propagates", "the", "decoded", "line", "of", "text", "to", "{", "@code", "ProtocolDecoderOutput#write", "(", "Object", ")", "}", ".", "You", "may", "override", "this", "method", "to", "modify", "the", "default", "behavior", ...
train
https://github.com/kaazing/gateway/blob/06017b19273109b3b992e528e702586446168d57/mina.core/core/src/main/java/org/apache/mina/filter/codec/textline/TextLineDecoder.java#L298-L300
nguyenq/tess4j
src/main/java/net/sourceforge/tess4j/Tesseract1.java
Tesseract1.doOCR
@Override public String doOCR(int xsize, int ysize, ByteBuffer buf, Rectangle rect, int bpp) throws TesseractException { """ Performs OCR operation. Use <code>SetImage</code>, (optionally) <code>SetRectangle</code>, and one or more of the <code>Get*Text</code> functions. @param xsize width of image @para...
java
@Override public String doOCR(int xsize, int ysize, ByteBuffer buf, Rectangle rect, int bpp) throws TesseractException { return doOCR(xsize, ysize, buf, null, rect, bpp); }
[ "@", "Override", "public", "String", "doOCR", "(", "int", "xsize", ",", "int", "ysize", ",", "ByteBuffer", "buf", ",", "Rectangle", "rect", ",", "int", "bpp", ")", "throws", "TesseractException", "{", "return", "doOCR", "(", "xsize", ",", "ysize", ",", "...
Performs OCR operation. Use <code>SetImage</code>, (optionally) <code>SetRectangle</code>, and one or more of the <code>Get*Text</code> functions. @param xsize width of image @param ysize height of image @param buf pixel data @param rect the bounding rectangle defines the region of the image to be recognized. A rectan...
[ "Performs", "OCR", "operation", ".", "Use", "<code", ">", "SetImage<", "/", "code", ">", "(", "optionally", ")", "<code", ">", "SetRectangle<", "/", "code", ">", "and", "one", "or", "more", "of", "the", "<code", ">", "Get", "*", "Text<", "/", "code", ...
train
https://github.com/nguyenq/tess4j/blob/cfcd4a8a44042f150b4aaf7bdf5ffc485a2236e1/src/main/java/net/sourceforge/tess4j/Tesseract1.java#L364-L367
landawn/AbacusUtil
src/com/landawn/abacus/util/DateUtil.java
DateUtil.setYears
public static <T extends java.util.Date> T setYears(final T date, final int amount) { """ Copied from Apache Commons Lang under Apache License v2. <br /> Sets the years field to a date returning a new object. The original {@code Date} is unchanged. @param date the date, not null @param amount the amount ...
java
public static <T extends java.util.Date> T setYears(final T date, final int amount) { return set(date, Calendar.YEAR, amount); }
[ "public", "static", "<", "T", "extends", "java", ".", "util", ".", "Date", ">", "T", "setYears", "(", "final", "T", "date", ",", "final", "int", "amount", ")", "{", "return", "set", "(", "date", ",", "Calendar", ".", "YEAR", ",", "amount", ")", ";"...
Copied from Apache Commons Lang under Apache License v2. <br /> Sets the years field to a date returning a new object. The original {@code Date} is unchanged. @param date the date, not null @param amount the amount to set @return a new {@code Date} set with the specified value @throws IllegalArgumentException if the...
[ "Copied", "from", "Apache", "Commons", "Lang", "under", "Apache", "License", "v2", ".", "<br", "/", ">" ]
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/DateUtil.java#L696-L698
liferay/com-liferay-commerce
commerce-product-api/src/main/java/com/liferay/commerce/product/service/persistence/CPOptionCategoryUtil.java
CPOptionCategoryUtil.removeByUUID_G
public static CPOptionCategory removeByUUID_G(String uuid, long groupId) throws com.liferay.commerce.product.exception.NoSuchCPOptionCategoryException { """ Removes the cp option category where uuid = &#63; and groupId = &#63; from the database. @param uuid the uuid @param groupId the group ID @return the c...
java
public static CPOptionCategory removeByUUID_G(String uuid, long groupId) throws com.liferay.commerce.product.exception.NoSuchCPOptionCategoryException { return getPersistence().removeByUUID_G(uuid, groupId); }
[ "public", "static", "CPOptionCategory", "removeByUUID_G", "(", "String", "uuid", ",", "long", "groupId", ")", "throws", "com", ".", "liferay", ".", "commerce", ".", "product", ".", "exception", ".", "NoSuchCPOptionCategoryException", "{", "return", "getPersistence",...
Removes the cp option category where uuid = &#63; and groupId = &#63; from the database. @param uuid the uuid @param groupId the group ID @return the cp option category that was removed
[ "Removes", "the", "cp", "option", "category", "where", "uuid", "=", "&#63", ";", "and", "groupId", "=", "&#63", ";", "from", "the", "database", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-api/src/main/java/com/liferay/commerce/product/service/persistence/CPOptionCategoryUtil.java#L315-L318
mfornos/humanize
humanize-slim/src/main/java/humanize/Humanize.java
Humanize.pluralizeFormat
public static MessageFormat pluralizeFormat(final String template) { """ <p> Constructs a message with pluralization logic from the given template. </p> <h5>Examples:</h5> <pre> MessageFormat msg = pluralize(&quot;There {0} on {1}.::are no files::is one file::are {2} files&quot;); msg.render(0, &quot;d...
java
public static MessageFormat pluralizeFormat(final String template) { String[] tokens = template.split("\\s*\\:{2}\\s*"); if (tokens.length < 4) { if (tokens.length == 2) { tokens = new String[] { "{0}", tokens[1], tokens[0], tokens[1] }; }...
[ "public", "static", "MessageFormat", "pluralizeFormat", "(", "final", "String", "template", ")", "{", "String", "[", "]", "tokens", "=", "template", ".", "split", "(", "\"\\\\s*\\\\:{2}\\\\s*\"", ")", ";", "if", "(", "tokens", ".", "length", "<", "4", ")", ...
<p> Constructs a message with pluralization logic from the given template. </p> <h5>Examples:</h5> <pre> MessageFormat msg = pluralize(&quot;There {0} on {1}.::are no files::is one file::are {2} files&quot;); msg.render(0, &quot;disk&quot;); // == &quot;There are no files on disk.&quot; msg.render(1, &quot;disk&quot...
[ "<p", ">", "Constructs", "a", "message", "with", "pluralization", "logic", "from", "the", "given", "template", ".", "<", "/", "p", ">" ]
train
https://github.com/mfornos/humanize/blob/59fc103045de9d217c9e77dbcb7621f992f46c63/humanize-slim/src/main/java/humanize/Humanize.java#L2374-L2394
dain/leveldb
leveldb/src/main/java/org/iq80/leveldb/impl/LogReader.java
LogReader.reportCorruption
private void reportCorruption(long bytes, String reason) { """ Reports corruption to the monitor. The buffer must be updated to remove the dropped bytes prior to invocation. """ if (monitor != null) { monitor.corruption(bytes, reason); } }
java
private void reportCorruption(long bytes, String reason) { if (monitor != null) { monitor.corruption(bytes, reason); } }
[ "private", "void", "reportCorruption", "(", "long", "bytes", ",", "String", "reason", ")", "{", "if", "(", "monitor", "!=", "null", ")", "{", "monitor", ".", "corruption", "(", "bytes", ",", "reason", ")", ";", "}", "}" ]
Reports corruption to the monitor. The buffer must be updated to remove the dropped bytes prior to invocation.
[ "Reports", "corruption", "to", "the", "monitor", ".", "The", "buffer", "must", "be", "updated", "to", "remove", "the", "dropped", "bytes", "prior", "to", "invocation", "." ]
train
https://github.com/dain/leveldb/blob/7994065b48eada2ef29e7fefd172c2ad1e0110eb/leveldb/src/main/java/org/iq80/leveldb/impl/LogReader.java#L337-L342
mangstadt/biweekly
src/main/java/biweekly/component/VTodo.java
VTodo.addAttendee
public Attendee addAttendee(String email) { """ Adds a person who is involved in the to-do task. @param email the attendee's email address @return the property that was created @see <a href="http://tools.ietf.org/html/rfc5545#page-107">RFC 5545 p.107-9</a> @see <a href="http://tools.ietf.org/html/rfc2445#page...
java
public Attendee addAttendee(String email) { Attendee prop = new Attendee(null, email, null); addAttendee(prop); return prop; }
[ "public", "Attendee", "addAttendee", "(", "String", "email", ")", "{", "Attendee", "prop", "=", "new", "Attendee", "(", "null", ",", "email", ",", "null", ")", ";", "addAttendee", "(", "prop", ")", ";", "return", "prop", ";", "}" ]
Adds a person who is involved in the to-do task. @param email the attendee's email address @return the property that was created @see <a href="http://tools.ietf.org/html/rfc5545#page-107">RFC 5545 p.107-9</a> @see <a href="http://tools.ietf.org/html/rfc2445#page-102">RFC 2445 p.102-4</a> @see <a href="http://www.imc.or...
[ "Adds", "a", "person", "who", "is", "involved", "in", "the", "to", "-", "do", "task", "." ]
train
https://github.com/mangstadt/biweekly/blob/2e21350f85c13dfff52fdef98fdbebe2976fcf61/src/main/java/biweekly/component/VTodo.java#L1141-L1145
syphr42/prom
src/main/java/org/syphr/prom/PropertiesManager.java
PropertiesManager.isReferencing
public boolean isReferencing(T property1, T property2) { """ Determine whether or not one property holds references to another property. @param property1 the property to check for references @param property2 the target referenced property @return <code>true</code> if the first property references the second...
java
public boolean isReferencing(T property1, T property2) { return getEvaluator().isReferencing(getRawProperty(property1), getTranslator().getPropertyName(property2), getRetriever()); }
[ "public", "boolean", "isReferencing", "(", "T", "property1", ",", "T", "property2", ")", "{", "return", "getEvaluator", "(", ")", ".", "isReferencing", "(", "getRawProperty", "(", "property1", ")", ",", "getTranslator", "(", ")", ".", "getPropertyName", "(", ...
Determine whether or not one property holds references to another property. @param property1 the property to check for references @param property2 the target referenced property @return <code>true</code> if the first property references the second; <code>false</code> otherwise
[ "Determine", "whether", "or", "not", "one", "property", "holds", "references", "to", "another", "property", "." ]
train
https://github.com/syphr42/prom/blob/074d67c4ebb3afb0b163fcb0bc4826ee577ac803/src/main/java/org/syphr/prom/PropertiesManager.java#L709-L714
wcm-io/wcm-io-handler
media/src/main/java/io/wcm/handler/media/spi/MediaSource.java
MediaSource.resolveRenditions
protected final boolean resolveRenditions(Media media, Asset asset, MediaArgs mediaArgs) { """ Resolves single rendition (or multiple renditions if {@link MediaArgs#isMediaFormatsMandatory()} is true and sets the resolved rendition and the URL of the first (best-matching) rendition in the media object. @param me...
java
protected final boolean resolveRenditions(Media media, Asset asset, MediaArgs mediaArgs) { if (mediaArgs.getMediaFormats() != null && mediaArgs.getMediaFormats().length > 1 && (mediaArgs.isMediaFormatsMandatory() || mediaArgs.getImageSizes() != null || mediaArgs.getPictureSources() != null)) { return ...
[ "protected", "final", "boolean", "resolveRenditions", "(", "Media", "media", ",", "Asset", "asset", ",", "MediaArgs", "mediaArgs", ")", "{", "if", "(", "mediaArgs", ".", "getMediaFormats", "(", ")", "!=", "null", "&&", "mediaArgs", ".", "getMediaFormats", "(",...
Resolves single rendition (or multiple renditions if {@link MediaArgs#isMediaFormatsMandatory()} is true and sets the resolved rendition and the URL of the first (best-matching) rendition in the media object. @param media Media object @param asset Asset @param mediaArgs Media args @return true if all requested renditio...
[ "Resolves", "single", "rendition", "(", "or", "multiple", "renditions", "if", "{" ]
train
https://github.com/wcm-io/wcm-io-handler/blob/b0fc1c11a3ceb89efb73826dcfd480d6a00c19af/media/src/main/java/io/wcm/handler/media/spi/MediaSource.java#L301-L309
shrinkwrap/descriptors
metadata-parser/src/main/java/org/jboss/shrinkwrap/descriptor/metadata/Metadata.java
Metadata.addGroupReference
public void addGroupReference(final String groupName, final MetadataElement groupReference) { """ Adds a new reference to the specific group element class. If no group element class is found, then a new group element class. will be created. @param groupName the group class name of @param groupReference the ...
java
public void addGroupReference(final String groupName, final MetadataElement groupReference) { groupReference.setRef(getNamespaceValue(groupReference.getRef())); for (MetadataItem item : groupList) { if (item.getName().equals(groupName) && item.getNamespace().equals(getCurrentNamespace())) { ...
[ "public", "void", "addGroupReference", "(", "final", "String", "groupName", ",", "final", "MetadataElement", "groupReference", ")", "{", "groupReference", ".", "setRef", "(", "getNamespaceValue", "(", "groupReference", ".", "getRef", "(", ")", ")", ")", ";", "fo...
Adds a new reference to the specific group element class. If no group element class is found, then a new group element class. will be created. @param groupName the group class name of @param groupReference the new reference to be added.
[ "Adds", "a", "new", "reference", "to", "the", "specific", "group", "element", "class", ".", "If", "no", "group", "element", "class", "is", "found", "then", "a", "new", "group", "element", "class", ".", "will", "be", "created", "." ]
train
https://github.com/shrinkwrap/descriptors/blob/023ba080e6396b9f4dd8275dc4e5c0ebb6b5e6ba/metadata-parser/src/main/java/org/jboss/shrinkwrap/descriptor/metadata/Metadata.java#L169-L185
looly/hutool
hutool-json/src/main/java/cn/hutool/json/JSONGetter.java
JSONGetter.get
public <T> T get(K key, Class<T> type) throws ConvertException { """ 获取指定类型的对象<br> 转换失败或抛出异常 @param <T> 获取的对象类型 @param key 键 @param type 获取对象类型 @return 对象 @throws ConvertException 转换异常 @since 3.0.8 """ return get(key, type, false); }
java
public <T> T get(K key, Class<T> type) throws ConvertException{ return get(key, type, false); }
[ "public", "<", "T", ">", "T", "get", "(", "K", "key", ",", "Class", "<", "T", ">", "type", ")", "throws", "ConvertException", "{", "return", "get", "(", "key", ",", "type", ",", "false", ")", ";", "}" ]
获取指定类型的对象<br> 转换失败或抛出异常 @param <T> 获取的对象类型 @param key 键 @param type 获取对象类型 @return 对象 @throws ConvertException 转换异常 @since 3.0.8
[ "获取指定类型的对象<br", ">", "转换失败或抛出异常" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-json/src/main/java/cn/hutool/json/JSONGetter.java#L111-L113
puniverse/galaxy
src/main/java/co/paralleluniverse/common/io/Streamables.java
Streamables.fromByteArray
public static void fromByteArray(Streamable streamable, byte[] array, int offset) { """ Reads a {@link Streamable}'s serialized contents from a byte array. The serialized form begins in the given offset and extends to the end of the array. <p> Same as calling {@link #fromByteArray(co.paralleluniverse.common.io....
java
public static void fromByteArray(Streamable streamable, byte[] array, int offset) { fromByteArray(streamable, array, offset, array.length - offset); }
[ "public", "static", "void", "fromByteArray", "(", "Streamable", "streamable", ",", "byte", "[", "]", "array", ",", "int", "offset", ")", "{", "fromByteArray", "(", "streamable", ",", "array", ",", "offset", ",", "array", ".", "length", "-", "offset", ")", ...
Reads a {@link Streamable}'s serialized contents from a byte array. The serialized form begins in the given offset and extends to the end of the array. <p> Same as calling {@link #fromByteArray(co.paralleluniverse.common.io.Streamable, byte[], int, int) fromByteArray(streamable, array, offset, array.length - offset)}. ...
[ "Reads", "a", "{", "@link", "Streamable", "}", "s", "serialized", "contents", "from", "a", "byte", "array", ".", "The", "serialized", "form", "begins", "in", "the", "given", "offset", "and", "extends", "to", "the", "end", "of", "the", "array", ".", "<p",...
train
https://github.com/puniverse/galaxy/blob/1d077532c4a5bcd6c52ff670770c31e98420ff63/src/main/java/co/paralleluniverse/common/io/Streamables.java#L76-L78
geomajas/geomajas-project-server
plugin/print/print/src/main/java/org/geomajas/plugin/printing/command/print/LayoutAsSinglePageDoc.java
LayoutAsSinglePageDoc.execute
public static void execute(PrintGetTemplateExtRequest request, PrintGetTemplateExtResponse response, PrintDtoConverterService converterService, PrintService printService) throws GeomajasException { """ Perform the first step in generating a template-based printout of for instance the specified map view, the ...
java
public static void execute(PrintGetTemplateExtRequest request, PrintGetTemplateExtResponse response, PrintDtoConverterService converterService, PrintService printService) throws GeomajasException { PrintTemplateInfo template = request.getTemplate(); PageComponent page = (PageComponent) converterService.toInter...
[ "public", "static", "void", "execute", "(", "PrintGetTemplateExtRequest", "request", ",", "PrintGetTemplateExtResponse", "response", ",", "PrintDtoConverterService", "converterService", ",", "PrintService", "printService", ")", "throws", "GeomajasException", "{", "PrintTempla...
Perform the first step in generating a template-based printout of for instance the specified map view, the map's legend,.... @param request (Input) It specifies the template and the output format of the document @param response (Output) On return, it contains the id of the document (possibly the rendering step is not ...
[ "Perform", "the", "first", "step", "in", "generating", "a", "template", "-", "based", "printout", "of", "for", "instance", "the", "specified", "map", "view", "the", "map", "s", "legend", "...." ]
train
https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/plugin/print/print/src/main/java/org/geomajas/plugin/printing/command/print/LayoutAsSinglePageDoc.java#L62-L78
alkacon/opencms-core
src/org/opencms/cmis/CmsCmisRelationHelper.java
CmsCmisRelationHelper.parseRelationKey
protected RelationKey parseRelationKey(String id) { """ Extracts the source/target ids and the type from a relation id.<p> @param id the relation id @return the relation key object """ Matcher matcher = RELATION_PATTERN.matcher(id); matcher.find(); CmsUUID src = new CmsUUID(m...
java
protected RelationKey parseRelationKey(String id) { Matcher matcher = RELATION_PATTERN.matcher(id); matcher.find(); CmsUUID src = new CmsUUID(matcher.group(1)); CmsUUID tgt = new CmsUUID(matcher.group(2)); String tp = matcher.group(3); return new RelationKey(src, ...
[ "protected", "RelationKey", "parseRelationKey", "(", "String", "id", ")", "{", "Matcher", "matcher", "=", "RELATION_PATTERN", ".", "matcher", "(", "id", ")", ";", "matcher", ".", "find", "(", ")", ";", "CmsUUID", "src", "=", "new", "CmsUUID", "(", "matcher...
Extracts the source/target ids and the type from a relation id.<p> @param id the relation id @return the relation key object
[ "Extracts", "the", "source", "/", "target", "ids", "and", "the", "type", "from", "a", "relation", "id", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/cmis/CmsCmisRelationHelper.java#L583-L591
lessthanoptimal/BoofCV
main/boofcv-sfm/src/main/java/boofcv/factory/sfm/FactoryVisualOdometry.java
FactoryVisualOdometry.stereoDualTrackerPnP
public static <T extends ImageGray<T>, Desc extends TupleDesc> StereoVisualOdometry<T> stereoDualTrackerPnP(int thresholdAdd, int thresholdRetire, double inlierPixelTol, double epipolarPixelTol, int ransacIterations, int refineIterations, PointTracker<T>...
java
public static <T extends ImageGray<T>, Desc extends TupleDesc> StereoVisualOdometry<T> stereoDualTrackerPnP(int thresholdAdd, int thresholdRetire, double inlierPixelTol, double epipolarPixelTol, int ransacIterations, int refineIterations, PointTracker<T>...
[ "public", "static", "<", "T", "extends", "ImageGray", "<", "T", ">", ",", "Desc", "extends", "TupleDesc", ">", "StereoVisualOdometry", "<", "T", ">", "stereoDualTrackerPnP", "(", "int", "thresholdAdd", ",", "int", "thresholdRetire", ",", "double", "inlierPixelTo...
Creates a stereo visual odometry algorithm that independently tracks features in left and right camera. @see VisOdomDualTrackPnP @param thresholdAdd When the number of inliers is below this number new features are detected @param thresholdRetire When a feature has not been in the inlier list for this many ticks it is...
[ "Creates", "a", "stereo", "visual", "odometry", "algorithm", "that", "independently", "tracks", "features", "in", "left", "and", "right", "camera", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-sfm/src/main/java/boofcv/factory/sfm/FactoryVisualOdometry.java#L293-L340
codeprimate-software/cp-elements
src/main/java/org/cp/elements/lang/reflect/ReflectionUtils.java
ReflectionUtils.getValue
public static <T> T getValue(Object target, Field field, Class<T> type) { """ Gets the value of the field on the given object cast to the desired class type. If the "target" object is null, then this method assumes the field is a static (class) member field; otherwise the field is considered an instance (object...
java
public static <T> T getValue(Object target, Field field, Class<T> type) { try { boolean currentAccessible = field.isAccessible(); field.setAccessible(true); Object value = field.get(target); field.setAccessible(currentAccessible); return type.cast(value); } catch (NullPointerEx...
[ "public", "static", "<", "T", ">", "T", "getValue", "(", "Object", "target", ",", "Field", "field", ",", "Class", "<", "T", ">", "type", ")", "{", "try", "{", "boolean", "currentAccessible", "=", "field", ".", "isAccessible", "(", ")", ";", "field", ...
Gets the value of the field on the given object cast to the desired class type. If the "target" object is null, then this method assumes the field is a static (class) member field; otherwise the field is considered an instance (object) member field. This method is not null-safe! @param <T> the desired return type in...
[ "Gets", "the", "value", "of", "the", "field", "on", "the", "given", "object", "cast", "to", "the", "desired", "class", "type", ".", "If", "the", "target", "object", "is", "null", "then", "this", "method", "assumes", "the", "field", "is", "a", "static", ...
train
https://github.com/codeprimate-software/cp-elements/blob/f2163c149fbbef05015e688132064ebcac7c49ab/src/main/java/org/cp/elements/lang/reflect/ReflectionUtils.java#L151-L166
looly/hulu
src/main/java/com/xiaoleilu/hulu/Render.java
Render.renderFile
public static void renderFile(File file, String responseFileName, int bufferSize) { """ 响应文件<br> 文件过大将下载失败 @param file 文件对象 @param responseFileName 响应给客户端的文件名,如果为空则使用编码后的原文件名 @param bufferSize 缓存大小 """ new FileView(file, responseFileName, bufferSize).render(); }
java
public static void renderFile(File file, String responseFileName, int bufferSize) { new FileView(file, responseFileName, bufferSize).render(); }
[ "public", "static", "void", "renderFile", "(", "File", "file", ",", "String", "responseFileName", ",", "int", "bufferSize", ")", "{", "new", "FileView", "(", "file", ",", "responseFileName", ",", "bufferSize", ")", ".", "render", "(", ")", ";", "}" ]
响应文件<br> 文件过大将下载失败 @param file 文件对象 @param responseFileName 响应给客户端的文件名,如果为空则使用编码后的原文件名 @param bufferSize 缓存大小
[ "响应文件<br", ">", "文件过大将下载失败" ]
train
https://github.com/looly/hulu/blob/4072de684e2e2f28ac8a3a44c0d5a690b289ef28/src/main/java/com/xiaoleilu/hulu/Render.java#L175-L178
codeprimate-software/cp-elements
src/main/java/org/cp/elements/lang/ElementsExceptionsFactory.java
ElementsExceptionsFactory.newParseException
public static ParseException newParseException(String message, Object... args) { """ Constructs and initializes a new {@link ParseException} with the given {@link String message} formatted with the given {@link Object[] arguments}. @param message {@link String} describing the {@link ParseException exception}. ...
java
public static ParseException newParseException(String message, Object... args) { return newParseException(null, message, args); }
[ "public", "static", "ParseException", "newParseException", "(", "String", "message", ",", "Object", "...", "args", ")", "{", "return", "newParseException", "(", "null", ",", "message", ",", "args", ")", ";", "}" ]
Constructs and initializes a new {@link ParseException} with the given {@link String message} formatted with the given {@link Object[] arguments}. @param message {@link String} describing the {@link ParseException exception}. @param args {@link Object[] arguments} used to replace format placeholders in the {@link Stri...
[ "Constructs", "and", "initializes", "a", "new", "{", "@link", "ParseException", "}", "with", "the", "given", "{", "@link", "String", "message", "}", "formatted", "with", "the", "given", "{", "@link", "Object", "[]", "arguments", "}", "." ]
train
https://github.com/codeprimate-software/cp-elements/blob/f2163c149fbbef05015e688132064ebcac7c49ab/src/main/java/org/cp/elements/lang/ElementsExceptionsFactory.java#L731-L733
OpenLiberty/open-liberty
dev/com.ibm.ws.webcontainer/src/com/ibm/websphere/servlet/filter/ChainedResponse.java
ChainedResponse.getChainedRequest
@SuppressWarnings("unchecked") public HttpServletRequest getChainedRequest() throws IOException, ServletException { """ Returns a chained request that contains the data that was written to this response. """ if (super.containsError()) { throw super.getError(); } ...
java
@SuppressWarnings("unchecked") public HttpServletRequest getChainedRequest() throws IOException, ServletException{ if (super.containsError()) { throw super.getError(); } ChainedRequest req = new ChainedRequest(this, _req); //transfer any auto transfer headers ...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "HttpServletRequest", "getChainedRequest", "(", ")", "throws", "IOException", ",", "ServletException", "{", "if", "(", "super", ".", "containsError", "(", ")", ")", "{", "throw", "super", ".", "getErr...
Returns a chained request that contains the data that was written to this response.
[ "Returns", "a", "chained", "request", "that", "contains", "the", "data", "that", "was", "written", "to", "this", "response", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.webcontainer/src/com/ibm/websphere/servlet/filter/ChainedResponse.java#L66-L93
baidubce/bce-sdk-java
src/main/java/com/baidubce/services/vod/VodClient.java
VodClient.listMediaResources
public ListMediaResourceResponse listMediaResources(ListMediaResourceRequest request) { """ List the properties of all media resource managed by VOD service. <p> The caller <i>must</i> authenticate with a valid BCE Access Key / Private Key pair. @param request The request wrapper object containing all optio...
java
public ListMediaResourceResponse listMediaResources(ListMediaResourceRequest request) { checkIsTrue(request.getPageNo() > 0, "pageNo should greater than 0!"); InternalRequest internalRequest = createRequest(HttpMethodName.GET, request, PATH_MEDIA); internalRequest.addParameter(P...
[ "public", "ListMediaResourceResponse", "listMediaResources", "(", "ListMediaResourceRequest", "request", ")", "{", "checkIsTrue", "(", "request", ".", "getPageNo", "(", ")", ">", "0", ",", "\"pageNo should greater than 0!\"", ")", ";", "InternalRequest", "internalRequest"...
List the properties of all media resource managed by VOD service. <p> The caller <i>must</i> authenticate with a valid BCE Access Key / Private Key pair. @param request The request wrapper object containing all options. @return The properties of all specific media resources
[ "List", "the", "properties", "of", "all", "media", "resource", "managed", "by", "VOD", "service", "." ]
train
https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/vod/VodClient.java#L537-L558
lessthanoptimal/BoofCV
main/boofcv-geo/src/main/java/boofcv/alg/geo/h/HomographyTotalLeastSquares.java
HomographyTotalLeastSquares.computePPXP
static void computePPXP( DMatrixRMaj P , DMatrixRMaj P_plus, DMatrixRMaj X , int offsetX, DMatrixRMaj output ) { """ Computes P*P_plus*X*P. Takes in account the size of each matrix and does the multiplication in an order to minimize memory requirements. A naive implementation requires a temporary array of NxN @...
java
static void computePPXP( DMatrixRMaj P , DMatrixRMaj P_plus, DMatrixRMaj X , int offsetX, DMatrixRMaj output ) { final int N = P.numRows; output.reshape(N,2); // diag(X) * P <-- N x 2 for (int i = 0, index=0; i < N; i++, index += 2) { double x = -X.data[index+offsetX]; output.data[index] = x*P.data[inde...
[ "static", "void", "computePPXP", "(", "DMatrixRMaj", "P", ",", "DMatrixRMaj", "P_plus", ",", "DMatrixRMaj", "X", ",", "int", "offsetX", ",", "DMatrixRMaj", "output", ")", "{", "final", "int", "N", "=", "P", ".", "numRows", ";", "output", ".", "reshape", ...
Computes P*P_plus*X*P. Takes in account the size of each matrix and does the multiplication in an order to minimize memory requirements. A naive implementation requires a temporary array of NxN @param X A diagonal matrix
[ "Computes", "P", "*", "P_plus", "*", "X", "*", "P", ".", "Takes", "in", "account", "the", "size", "of", "each", "matrix", "and", "does", "the", "multiplication", "in", "an", "order", "to", "minimize", "memory", "requirements", ".", "A", "naive", "impleme...
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/h/HomographyTotalLeastSquares.java#L262-L287
eclipse/xtext-extras
org.eclipse.xtext.common.types/src/org/eclipse/xtext/common/types/access/binary/asm/SignatureUtil.java
SignatureUtil.scanTypeArgumentSignature
static int scanTypeArgumentSignature(String string, int start) { """ Scans the given string for a type argument signature starting at the given index and returns the index of the last character. <pre> TypeArgumentSignature: <b>&#42;</b> | <b>+</b> TypeSignature | <b>-</b> TypeSignature | TypeSignature <...
java
static int scanTypeArgumentSignature(String string, int start) { // need a minimum 1 char if (start >= string.length()) { throw new IllegalArgumentException(); } char c = string.charAt(start); switch (c) { case C_STAR : return start; case C_EXTENDS : case C_SUPER : return scanTypeBoundSign...
[ "static", "int", "scanTypeArgumentSignature", "(", "String", "string", ",", "int", "start", ")", "{", "// need a minimum 1 char", "if", "(", "start", ">=", "string", ".", "length", "(", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", ...
Scans the given string for a type argument signature starting at the given index and returns the index of the last character. <pre> TypeArgumentSignature: <b>&#42;</b> | <b>+</b> TypeSignature | <b>-</b> TypeSignature | TypeSignature </pre> Note that although base types are not allowed in type arguments, there is no...
[ "Scans", "the", "given", "string", "for", "a", "type", "argument", "signature", "starting", "at", "the", "given", "index", "and", "returns", "the", "index", "of", "the", "last", "character", ".", "<pre", ">", "TypeArgumentSignature", ":", "<b", ">", "&#42", ...
train
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.common.types/src/org/eclipse/xtext/common/types/access/binary/asm/SignatureUtil.java#L516-L531
Waikato/moa
moa/src/main/java/moa/classifiers/meta/AccuracyWeightedEnsemble.java
AccuracyWeightedEnsemble.computeWeight
protected double computeWeight(Classifier learner, Instances chunk) { """ Computes the weight of a given classifie. @param learner Classifier to calculate weight for. @param chunk Data chunk of examples. @param useMseR Determines whether to use the MSEr threshold. @return The given classifier's weight. "...
java
protected double computeWeight(Classifier learner, Instances chunk) { double mse_i = 0; double mse_r = 0; double f_ci; double voteSum; for (int i = 0; i < chunk.numInstances(); i++) { try { voteSum = 0; for (double element : learner.g...
[ "protected", "double", "computeWeight", "(", "Classifier", "learner", ",", "Instances", "chunk", ")", "{", "double", "mse_i", "=", "0", ";", "double", "mse_r", "=", "0", ";", "double", "f_ci", ";", "double", "voteSum", ";", "for", "(", "int", "i", "=", ...
Computes the weight of a given classifie. @param learner Classifier to calculate weight for. @param chunk Data chunk of examples. @param useMseR Determines whether to use the MSEr threshold. @return The given classifier's weight.
[ "Computes", "the", "weight", "of", "a", "given", "classifie", "." ]
train
https://github.com/Waikato/moa/blob/395982e5100bfe75a3a4d26115462ce2cc74cbb0/moa/src/main/java/moa/classifiers/meta/AccuracyWeightedEnsemble.java#L286-L315
spotbugs/spotbugs
eclipsePlugin/src/de/tobject/findbugs/FindbugsPlugin.java
FindbugsPlugin.getProjectPreferences
public static UserPreferences getProjectPreferences(IProject project, boolean forceRead) { """ Get project own preferences set. @param project must be non null, exist and be opened @param forceRead @return current project preferences, independently if project preferences are enabled or disabled for given pr...
java
public static UserPreferences getProjectPreferences(IProject project, boolean forceRead) { try { UserPreferences prefs = (UserPreferences) project.getSessionProperty(SESSION_PROPERTY_USERPREFS); if (prefs == null || forceRead) { prefs = readUserPreferences(project); ...
[ "public", "static", "UserPreferences", "getProjectPreferences", "(", "IProject", "project", ",", "boolean", "forceRead", ")", "{", "try", "{", "UserPreferences", "prefs", "=", "(", "UserPreferences", ")", "project", ".", "getSessionProperty", "(", "SESSION_PROPERTY_US...
Get project own preferences set. @param project must be non null, exist and be opened @param forceRead @return current project preferences, independently if project preferences are enabled or disabled for given project.
[ "Get", "project", "own", "preferences", "set", "." ]
train
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/eclipsePlugin/src/de/tobject/findbugs/FindbugsPlugin.java#L907-L922
chrisjenx/Calligraphy
calligraphy/src/main/java/uk/co/chrisjenx/calligraphy/CalligraphyFactory.java
CalligraphyFactory.onViewCreated
public View onViewCreated(View view, Context context, AttributeSet attrs) { """ Handle the created view @param view nullable. @param context shouldn't be null. @param attrs shouldn't be null. @return null if null is passed in. """ if (view != null && view.getTag(R.id.calligraphy_tag_id) != B...
java
public View onViewCreated(View view, Context context, AttributeSet attrs) { if (view != null && view.getTag(R.id.calligraphy_tag_id) != Boolean.TRUE) { onViewCreatedInternal(view, context, attrs); view.setTag(R.id.calligraphy_tag_id, Boolean.TRUE); } return view; }
[ "public", "View", "onViewCreated", "(", "View", "view", ",", "Context", "context", ",", "AttributeSet", "attrs", ")", "{", "if", "(", "view", "!=", "null", "&&", "view", ".", "getTag", "(", "R", ".", "id", ".", "calligraphy_tag_id", ")", "!=", "Boolean",...
Handle the created view @param view nullable. @param context shouldn't be null. @param attrs shouldn't be null. @return null if null is passed in.
[ "Handle", "the", "created", "view" ]
train
https://github.com/chrisjenx/Calligraphy/blob/085e441954d787bd4ef31f245afe5f2f2a311ea5/calligraphy/src/main/java/uk/co/chrisjenx/calligraphy/CalligraphyFactory.java#L108-L114
apache/spark
common/network-common/src/main/java/org/apache/spark/network/client/TransportClient.java
TransportClient.sendRpc
public long sendRpc(ByteBuffer message, RpcResponseCallback callback) { """ Sends an opaque message to the RpcHandler on the server-side. The callback will be invoked with the server's response or upon any failure. @param message The message to send. @param callback Callback to handle the RPC's reply. @retur...
java
public long sendRpc(ByteBuffer message, RpcResponseCallback callback) { if (logger.isTraceEnabled()) { logger.trace("Sending RPC to {}", getRemoteAddress(channel)); } long requestId = requestId(); handler.addRpcRequest(requestId, callback); RpcChannelListener listener = new RpcChannelListene...
[ "public", "long", "sendRpc", "(", "ByteBuffer", "message", ",", "RpcResponseCallback", "callback", ")", "{", "if", "(", "logger", ".", "isTraceEnabled", "(", ")", ")", "{", "logger", ".", "trace", "(", "\"Sending RPC to {}\"", ",", "getRemoteAddress", "(", "ch...
Sends an opaque message to the RpcHandler on the server-side. The callback will be invoked with the server's response or upon any failure. @param message The message to send. @param callback Callback to handle the RPC's reply. @return The RPC's id.
[ "Sends", "an", "opaque", "message", "to", "the", "RpcHandler", "on", "the", "server", "-", "side", ".", "The", "callback", "will", "be", "invoked", "with", "the", "server", "s", "response", "or", "upon", "any", "failure", "." ]
train
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/common/network-common/src/main/java/org/apache/spark/network/client/TransportClient.java#L187-L200
beanshell/beanshell
src/main/java/bsh/Operators.java
Operators.binaryOperation
public static Object binaryOperation( Object obj1, Object obj2, int kind) throws UtilEvalError { """ Perform a binary operation on two Primitives or wrapper types. If both original args were Primitives return a Primitive result else it was mixed (wrapper/primitive) return the wrapper type. The e...
java
public static Object binaryOperation( Object obj1, Object obj2, int kind) throws UtilEvalError { // keep track of the original types Class<?> lhsOrgType = obj1.getClass(); Class<?> rhsOrgType = obj2.getClass(); // Unwrap primitives obj1 = Primitive.unwrap(obj...
[ "public", "static", "Object", "binaryOperation", "(", "Object", "obj1", ",", "Object", "obj2", ",", "int", "kind", ")", "throws", "UtilEvalError", "{", "// keep track of the original types", "Class", "<", "?", ">", "lhsOrgType", "=", "obj1", ".", "getClass", "("...
Perform a binary operation on two Primitives or wrapper types. If both original args were Primitives return a Primitive result else it was mixed (wrapper/primitive) return the wrapper type. The exception is for boolean operations where we will return the primitive type either way.
[ "Perform", "a", "binary", "operation", "on", "two", "Primitives", "or", "wrapper", "types", ".", "If", "both", "original", "args", "were", "Primitives", "return", "a", "Primitive", "result", "else", "it", "was", "mixed", "(", "wrapper", "/", "primitive", ")"...
train
https://github.com/beanshell/beanshell/blob/fdddee3de948c9e6babb2d1337028f6fd0a2ba5c/src/main/java/bsh/Operators.java#L109-L150
real-logic/simple-binary-encoding
sbe-tool/src/main/java/uk/co/real_logic/sbe/xml/XmlSchemaParser.java
XmlSchemaParser.getAttributeValue
public static String getAttributeValue(final Node elementNode, final String attrName) { """ Helper function that throws an exception when the attribute is not set. @param elementNode that should have the attribute @param attrName that is to be looked up @return value of the attribute @throws IllegalArgume...
java
public static String getAttributeValue(final Node elementNode, final String attrName) { final Node attrNode = elementNode.getAttributes().getNamedItemNS(null, attrName); if (attrNode == null || "".equals(attrNode.getNodeValue())) { throw new IllegalStateException( ...
[ "public", "static", "String", "getAttributeValue", "(", "final", "Node", "elementNode", ",", "final", "String", "attrName", ")", "{", "final", "Node", "attrNode", "=", "elementNode", ".", "getAttributes", "(", ")", ".", "getNamedItemNS", "(", "null", ",", "att...
Helper function that throws an exception when the attribute is not set. @param elementNode that should have the attribute @param attrName that is to be looked up @return value of the attribute @throws IllegalArgumentException if the attribute is not present
[ "Helper", "function", "that", "throws", "an", "exception", "when", "the", "attribute", "is", "not", "set", "." ]
train
https://github.com/real-logic/simple-binary-encoding/blob/9a7be490c86d98f0e430e4189bc6c8c4fbef658b/sbe-tool/src/main/java/uk/co/real_logic/sbe/xml/XmlSchemaParser.java#L280-L291
fcrepo3/fcrepo
fcrepo-server/src/main/java/org/fcrepo/server/journal/JournalCreator.java
JournalCreator.modifyObject
public Date modifyObject(Context context, String pid, String state, String label, String ownerId, String logMessage, Date lastModifiedDate) throws...
java
public Date modifyObject(Context context, String pid, String state, String label, String ownerId, String logMessage, Date lastModifiedDate) throws...
[ "public", "Date", "modifyObject", "(", "Context", "context", ",", "String", "pid", ",", "String", "state", ",", "String", "label", ",", "String", "ownerId", ",", "String", "logMessage", ",", "Date", "lastModifiedDate", ")", "throws", "ServerException", "{", "t...
Create a journal entry, add the arguments, and invoke the method.
[ "Create", "a", "journal", "entry", "add", "the", "arguments", "and", "invoke", "the", "method", "." ]
train
https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/journal/JournalCreator.java#L123-L143
wdullaer/SwipeActionAdapter
library/src/main/java/com/wdullaer/swipeactionadapter/SwipeViewGroup.java
SwipeViewGroup.showBackground
public void showBackground(SwipeDirection direction, boolean dimBackground) { """ Show the View linked to a key. Don't do anything if the key is not found @param direction The key of the View to be shown @param dimBackground Indicates whether the background should be dimmed """ if(SwipeDirection.DI...
java
public void showBackground(SwipeDirection direction, boolean dimBackground){ if(SwipeDirection.DIRECTION_NEUTRAL != direction && mBackgroundMap.get(direction) == null) return; if(SwipeDirection.DIRECTION_NEUTRAL != visibleView) mBackgroundMap.get(visibleView).setVisibility(View.INVISIBLE); ...
[ "public", "void", "showBackground", "(", "SwipeDirection", "direction", ",", "boolean", "dimBackground", ")", "{", "if", "(", "SwipeDirection", ".", "DIRECTION_NEUTRAL", "!=", "direction", "&&", "mBackgroundMap", ".", "get", "(", "direction", ")", "==", "null", ...
Show the View linked to a key. Don't do anything if the key is not found @param direction The key of the View to be shown @param dimBackground Indicates whether the background should be dimmed
[ "Show", "the", "View", "linked", "to", "a", "key", ".", "Don", "t", "do", "anything", "if", "the", "key", "is", "not", "found" ]
train
https://github.com/wdullaer/SwipeActionAdapter/blob/24a7e2ed953ac11ea0d8875d375bba571ffeba55/library/src/main/java/com/wdullaer/swipeactionadapter/SwipeViewGroup.java#L91-L102
UrielCh/ovh-java-sdk
ovh-java-sdk-xdsl/src/main/java/net/minidev/ovh/api/ApiOvhXdsl.java
ApiOvhXdsl.serviceName_modem_portMappings_POST
public OvhPortMapping serviceName_modem_portMappings_POST(String serviceName, String allowedRemoteIp, String description, Long externalPortEnd, Long externalPortStart, String internalClient, Long internalPort, String name, OvhProtocolTypeEnum protocol) throws IOException { """ Add a port mapping REST: POST /xds...
java
public OvhPortMapping serviceName_modem_portMappings_POST(String serviceName, String allowedRemoteIp, String description, Long externalPortEnd, Long externalPortStart, String internalClient, Long internalPort, String name, OvhProtocolTypeEnum protocol) throws IOException { String qPath = "/xdsl/{serviceName}/modem/po...
[ "public", "OvhPortMapping", "serviceName_modem_portMappings_POST", "(", "String", "serviceName", ",", "String", "allowedRemoteIp", ",", "String", "description", ",", "Long", "externalPortEnd", ",", "Long", "externalPortStart", ",", "String", "internalClient", ",", "Long",...
Add a port mapping REST: POST /xdsl/{serviceName}/modem/portMappings @param protocol [required] Protocol of the port mapping (TCP / UDP) @param name [required] Name of the port mapping entry @param allowedRemoteIp [required] An ip which will access to the defined rule. Default : no restriction applied @param internalP...
[ "Add", "a", "port", "mapping" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-xdsl/src/main/java/net/minidev/ovh/api/ApiOvhXdsl.java#L1335-L1349
Deep-Symmetry/beat-link
src/main/java/org/deepsymmetry/beatlink/data/MetadataCache.java
MetadataCache.createMetadataCache
public static void createMetadataCache(SlotReference slot, int playlistId, File cache) throws Exception { """ Creates a metadata cache archive file of all tracks in the specified slot on the specified player. Any previous contents of the specified file will be replaced. @param slot the slot in which the media ...
java
public static void createMetadataCache(SlotReference slot, int playlistId, File cache) throws Exception { createMetadataCache(slot, playlistId, cache, null); }
[ "public", "static", "void", "createMetadataCache", "(", "SlotReference", "slot", ",", "int", "playlistId", ",", "File", "cache", ")", "throws", "Exception", "{", "createMetadataCache", "(", "slot", ",", "playlistId", ",", "cache", ",", "null", ")", ";", "}" ]
Creates a metadata cache archive file of all tracks in the specified slot on the specified player. Any previous contents of the specified file will be replaced. @param slot the slot in which the media to be cached can be found @param playlistId the id of playlist to be cached, or 0 of all tracks should be cached @para...
[ "Creates", "a", "metadata", "cache", "archive", "file", "of", "all", "tracks", "in", "the", "specified", "slot", "on", "the", "specified", "player", ".", "Any", "previous", "contents", "of", "the", "specified", "file", "will", "be", "replaced", "." ]
train
https://github.com/Deep-Symmetry/beat-link/blob/f958a2a70e8a87a31a75326d7b4db77c2f0b4212/src/main/java/org/deepsymmetry/beatlink/data/MetadataCache.java#L692-L694
mabe02/lanterna
src/main/java/com/googlecode/lanterna/TerminalTextUtils.java
TerminalTextUtils.getColumnIndex
public static int getColumnIndex(String s, int stringCharacterIndex) throws StringIndexOutOfBoundsException { """ Given a string and a character index inside that string, find out what the column index of that character would be if printed in a terminal. If the string only contains non-CJK characters then the ret...
java
public static int getColumnIndex(String s, int stringCharacterIndex) throws StringIndexOutOfBoundsException { return getColumnIndex(s, stringCharacterIndex, TabBehaviour.CONVERT_TO_FOUR_SPACES, -1); }
[ "public", "static", "int", "getColumnIndex", "(", "String", "s", ",", "int", "stringCharacterIndex", ")", "throws", "StringIndexOutOfBoundsException", "{", "return", "getColumnIndex", "(", "s", ",", "stringCharacterIndex", ",", "TabBehaviour", ".", "CONVERT_TO_FOUR_SPAC...
Given a string and a character index inside that string, find out what the column index of that character would be if printed in a terminal. If the string only contains non-CJK characters then the returned value will be same as {@code stringCharacterIndex}, but if there are CJK characters the value will be different du...
[ "Given", "a", "string", "and", "a", "character", "index", "inside", "that", "string", "find", "out", "what", "the", "column", "index", "of", "that", "character", "would", "be", "if", "printed", "in", "a", "terminal", ".", "If", "the", "string", "only", "...
train
https://github.com/mabe02/lanterna/blob/8dfd62206ff46ab10223b2ef2dbb0a2c51850954/src/main/java/com/googlecode/lanterna/TerminalTextUtils.java#L180-L182
redkale/redkale
src/org/redkale/util/ResourceFactory.java
ResourceFactory.register
public <A> A register(final Class<? extends A> clazz, final A rs) { """ 将对象指定类型且name=""注入到资源池中,并同步已被注入的资源 @param <A> 泛型 @param clazz 资源类型 @param rs 资源对象 @return 旧资源对象 """ return register(true, clazz, rs); }
java
public <A> A register(final Class<? extends A> clazz, final A rs) { return register(true, clazz, rs); }
[ "public", "<", "A", ">", "A", "register", "(", "final", "Class", "<", "?", "extends", "A", ">", "clazz", ",", "final", "A", "rs", ")", "{", "return", "register", "(", "true", ",", "clazz", ",", "rs", ")", ";", "}" ]
将对象指定类型且name=""注入到资源池中,并同步已被注入的资源 @param <A> 泛型 @param clazz 资源类型 @param rs 资源对象 @return 旧资源对象
[ "将对象指定类型且name", "=", "注入到资源池中,并同步已被注入的资源" ]
train
https://github.com/redkale/redkale/blob/ea5169b5c5ea7412fd762331c0c497165832e901/src/org/redkale/util/ResourceFactory.java#L120-L122
apache/groovy
src/main/java/org/codehaus/groovy/runtime/memoize/ConcurrentCommonCache.java
ConcurrentCommonCache.doWithWriteLock
private <R> R doWithWriteLock(Action<K, V, R> action) { """ deal with the backed cache guarded by write lock @param action the content to complete """ writeLock.lock(); try { return action.doWith(commonCache); } finally { writeLock.unlock(); } }
java
private <R> R doWithWriteLock(Action<K, V, R> action) { writeLock.lock(); try { return action.doWith(commonCache); } finally { writeLock.unlock(); } }
[ "private", "<", "R", ">", "R", "doWithWriteLock", "(", "Action", "<", "K", ",", "V", ",", "R", ">", "action", ")", "{", "writeLock", ".", "lock", "(", ")", ";", "try", "{", "return", "action", ".", "doWith", "(", "commonCache", ")", ";", "}", "fi...
deal with the backed cache guarded by write lock @param action the content to complete
[ "deal", "with", "the", "backed", "cache", "guarded", "by", "write", "lock" ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/runtime/memoize/ConcurrentCommonCache.java#L247-L254
ist-dresden/composum
sling/core/commons/src/main/java/com/composum/sling/clientlibs/handle/ClientlibResourceFolder.java
ClientlibResourceFolder.getChildren
public List<ClientlibElement> getChildren() { """ Returns all children - either {@link ClientlibResourceFolder} as well, or {@link ClientlibFile} . """ List<ClientlibElement> children = new ArrayList<>(); for (Resource child : resource.getChildren()) { if (isFile(child)) children.ad...
java
public List<ClientlibElement> getChildren() { List<ClientlibElement> children = new ArrayList<>(); for (Resource child : resource.getChildren()) { if (isFile(child)) children.add(new ClientlibFile(null, type, child, getAdditionalProperties())); else children.add(new ClientlibReso...
[ "public", "List", "<", "ClientlibElement", ">", "getChildren", "(", ")", "{", "List", "<", "ClientlibElement", ">", "children", "=", "new", "ArrayList", "<>", "(", ")", ";", "for", "(", "Resource", "child", ":", "resource", ".", "getChildren", "(", ")", ...
Returns all children - either {@link ClientlibResourceFolder} as well, or {@link ClientlibFile} .
[ "Returns", "all", "children", "-", "either", "{" ]
train
https://github.com/ist-dresden/composum/blob/ebc79f559f6022c935240c19102539bdfb1bd1e2/sling/core/commons/src/main/java/com/composum/sling/clientlibs/handle/ClientlibResourceFolder.java#L104-L111
playn/playn
core/src/playn/core/json/JsonObject.java
JsonObject.getInt
public int getInt(String key, int default_) { """ Returns the {@link Integer} at the given key, or the default if it does not exist or is the wrong type. """ Object o = get(key); return o instanceof Number ? ((Number) o).intValue() : default_; }
java
public int getInt(String key, int default_) { Object o = get(key); return o instanceof Number ? ((Number) o).intValue() : default_; }
[ "public", "int", "getInt", "(", "String", "key", ",", "int", "default_", ")", "{", "Object", "o", "=", "get", "(", "key", ")", ";", "return", "o", "instanceof", "Number", "?", "(", "(", "Number", ")", "o", ")", ".", "intValue", "(", ")", ":", "de...
Returns the {@link Integer} at the given key, or the default if it does not exist or is the wrong type.
[ "Returns", "the", "{" ]
train
https://github.com/playn/playn/blob/7e7a9d048ba6afe550dc0cdeaca3e1d5b0d01c66/core/src/playn/core/json/JsonObject.java#L123-L126
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/value/fs/operations/ValueFileIOHelper.java
ValueFileIOHelper.writeStreamedValue
protected long writeStreamedValue(File file, ValueData value) throws IOException { """ Write streamed value to a file. @param file File @param value ValueData @return size of wrote content @throws IOException if error occurs """ long size; // stream Value if (value instanceof St...
java
protected long writeStreamedValue(File file, ValueData value) throws IOException { long size; // stream Value if (value instanceof StreamPersistedValueData) { StreamPersistedValueData streamed = (StreamPersistedValueData)value; if (streamed.isPersisted()) ...
[ "protected", "long", "writeStreamedValue", "(", "File", "file", ",", "ValueData", "value", ")", "throws", "IOException", "{", "long", "size", ";", "// stream Value\r", "if", "(", "value", "instanceof", "StreamPersistedValueData", ")", "{", "StreamPersistedValueData", ...
Write streamed value to a file. @param file File @param value ValueData @return size of wrote content @throws IOException if error occurs
[ "Write", "streamed", "value", "to", "a", "file", "." ]
train
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/value/fs/operations/ValueFileIOHelper.java#L121-L176
landawn/AbacusUtil
src/com/landawn/abacus/util/DateUtil.java
DateUtil.addMonths
public static <T extends java.util.Date> T addMonths(final T date, final int amount) { """ Adds a number of months to a date returning a new object. The original {@code Date} is unchanged. @param date the date, not null @param amount the amount to add, may be negative @return the new {@code Date} with the ...
java
public static <T extends java.util.Date> T addMonths(final T date, final int amount) { return roll(date, amount, CalendarUnit.MONTH); }
[ "public", "static", "<", "T", "extends", "java", ".", "util", ".", "Date", ">", "T", "addMonths", "(", "final", "T", "date", ",", "final", "int", "amount", ")", "{", "return", "roll", "(", "date", ",", "amount", ",", "CalendarUnit", ".", "MONTH", ")"...
Adds a number of months to a date returning a new object. The original {@code Date} is unchanged. @param date the date, not null @param amount the amount to add, may be negative @return the new {@code Date} with the amount added @throws IllegalArgumentException if the date is null
[ "Adds", "a", "number", "of", "months", "to", "a", "date", "returning", "a", "new", "object", ".", "The", "original", "{", "@code", "Date", "}", "is", "unchanged", "." ]
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/DateUtil.java#L965-L967
buschmais/jqa-rdbms-plugin
src/main/java/com/buschmais/jqassistant/plugin/rdbms/impl/scanner/AbstractSchemaScannerPlugin.java
AbstractSchemaScannerPlugin.getOptions
private SchemaCrawlerOptions getOptions(String bundledDriverName, InfoLevel level) throws IOException { """ Loads the bundled driver options @param bundledDriverName The driver name. @param level The info level. @return The options or <code>null</code>. @throws java.io.IOException If loading fail...
java
private SchemaCrawlerOptions getOptions(String bundledDriverName, InfoLevel level) throws IOException { for (BundledDriver bundledDriver : BundledDriver.values()) { if (bundledDriver.name().toLowerCase().equals(bundledDriverName.toLowerCase())) { return bundledDriver.getOptions(level...
[ "private", "SchemaCrawlerOptions", "getOptions", "(", "String", "bundledDriverName", ",", "InfoLevel", "level", ")", "throws", "IOException", "{", "for", "(", "BundledDriver", "bundledDriver", ":", "BundledDriver", ".", "values", "(", ")", ")", "{", "if", "(", "...
Loads the bundled driver options @param bundledDriverName The driver name. @param level The info level. @return The options or <code>null</code>. @throws java.io.IOException If loading fails.
[ "Loads", "the", "bundled", "driver", "options" ]
train
https://github.com/buschmais/jqa-rdbms-plugin/blob/96c3919907deee00175cf5ab005867d76e01ba62/src/main/java/com/buschmais/jqassistant/plugin/rdbms/impl/scanner/AbstractSchemaScannerPlugin.java#L110-L117
comapi/comapi-sdk-android
COMAPI/foundation/src/main/java/com/comapi/internal/network/InternalService.java
InternalService.initialiseRestClient
public RestApi initialiseRestClient(int logLevelNet, APIConfig.BaseURIs baseURIs) { """ Initialise REST API client. @param logLevelNet {@link LogLevel} of for the network library. @param baseURIs API baseURIs. @return REST API client. """ AuthManager authManager = new AuthManager() { ...
java
public RestApi initialiseRestClient(int logLevelNet, APIConfig.BaseURIs baseURIs) { AuthManager authManager = new AuthManager() { @Override protected Observable<SessionData> restartSession() { return reAuthenticate(); } }; restClient = new Re...
[ "public", "RestApi", "initialiseRestClient", "(", "int", "logLevelNet", ",", "APIConfig", ".", "BaseURIs", "baseURIs", ")", "{", "AuthManager", "authManager", "=", "new", "AuthManager", "(", ")", "{", "@", "Override", "protected", "Observable", "<", "SessionData",...
Initialise REST API client. @param logLevelNet {@link LogLevel} of for the network library. @param baseURIs API baseURIs. @return REST API client.
[ "Initialise", "REST", "API", "client", "." ]
train
https://github.com/comapi/comapi-sdk-android/blob/53140a58d5a62afe196047ccc5120bfe090ef211/COMAPI/foundation/src/main/java/com/comapi/internal/network/InternalService.java#L121-L134
OpenLiberty/open-liberty
dev/com.ibm.ws.jsp/src/com/ibm/ws/jsp/translator/utils/JspTranslatorUtil.java
JspTranslatorUtil.isExpression
public static boolean isExpression(String token, boolean isXml, JspConfiguration jspConfig, boolean checkDeferred ) { """ /* Checks to see if the given attribute value represents a runtime or EL expression. """ boolean isExpression=JspTranslatorUtil.isExpression(token, isXml); boolean isELInput=Jsp...
java
public static boolean isExpression(String token, boolean isXml, JspConfiguration jspConfig, boolean checkDeferred ) { boolean isExpression=JspTranslatorUtil.isExpression(token, isXml); boolean isELInput=JspTranslatorUtil.isELInterpreterInput(token, jspConfig, checkDeferred); if (isExpression || isELIn...
[ "public", "static", "boolean", "isExpression", "(", "String", "token", ",", "boolean", "isXml", ",", "JspConfiguration", "jspConfig", ",", "boolean", "checkDeferred", ")", "{", "boolean", "isExpression", "=", "JspTranslatorUtil", ".", "isExpression", "(", "token", ...
/* Checks to see if the given attribute value represents a runtime or EL expression.
[ "/", "*", "Checks", "to", "see", "if", "the", "given", "attribute", "value", "represents", "a", "runtime", "or", "EL", "expression", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jsp/src/com/ibm/ws/jsp/translator/utils/JspTranslatorUtil.java#L503-L510
aws/aws-sdk-java
aws-java-sdk-codepipeline/src/main/java/com/amazonaws/services/codepipeline/model/ActionConfiguration.java
ActionConfiguration.withConfiguration
public ActionConfiguration withConfiguration(java.util.Map<String, String> configuration) { """ <p> The configuration data for the action. </p> @param configuration The configuration data for the action. @return Returns a reference to this object so that method calls can be chained together. """ ...
java
public ActionConfiguration withConfiguration(java.util.Map<String, String> configuration) { setConfiguration(configuration); return this; }
[ "public", "ActionConfiguration", "withConfiguration", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "configuration", ")", "{", "setConfiguration", "(", "configuration", ")", ";", "return", "this", ";", "}" ]
<p> The configuration data for the action. </p> @param configuration The configuration data for the action. @return Returns a reference to this object so that method calls can be chained together.
[ "<p", ">", "The", "configuration", "data", "for", "the", "action", ".", "<", "/", "p", ">" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-codepipeline/src/main/java/com/amazonaws/services/codepipeline/model/ActionConfiguration.java#L73-L76
google/closure-templates
java/src/com/google/template/soy/jbcsrc/restricted/BytecodeUtils.java
BytecodeUtils.nullCoalesce
public static void nullCoalesce(CodeBuilder builder, Label nullExit) { """ Outputs bytecode that will test the item at the top of the stack for null, and branch to {@code nullExit} if it is {@code null}. At {@code nullSafeExit} there will be a null value at the top of the stack. """ builder.dup(); La...
java
public static void nullCoalesce(CodeBuilder builder, Label nullExit) { builder.dup(); Label nonNull = new Label(); builder.ifNonNull(nonNull); // See http://mail.ow2.org/wws/arc/asm/2016-02/msg00001.html for a discussion of this pattern // but even though the value at the top of the stack here is nu...
[ "public", "static", "void", "nullCoalesce", "(", "CodeBuilder", "builder", ",", "Label", "nullExit", ")", "{", "builder", ".", "dup", "(", ")", ";", "Label", "nonNull", "=", "new", "Label", "(", ")", ";", "builder", ".", "ifNonNull", "(", "nonNull", ")",...
Outputs bytecode that will test the item at the top of the stack for null, and branch to {@code nullExit} if it is {@code null}. At {@code nullSafeExit} there will be a null value at the top of the stack.
[ "Outputs", "bytecode", "that", "will", "test", "the", "item", "at", "the", "top", "of", "the", "stack", "for", "null", "and", "branch", "to", "{" ]
train
https://github.com/google/closure-templates/blob/cc61e1dff70ae97f24f417a57410081bc498bd56/java/src/com/google/template/soy/jbcsrc/restricted/BytecodeUtils.java#L821-L832
yavijava/yavijava
src/main/java/com/vmware/vim25/mo/VirtualDiskManager.java
VirtualDiskManager.importUnmanagedSnapshot
public void importUnmanagedSnapshot(String vdisk, Datacenter datacenter, String vvolId) throws InvalidDatastore, NotFound, RuntimeFault, RemoteException { """ Import an unmanaged-snapshot from Virtual-Volume(VVol) enabled Storage Array. <p> Storage Array may support users to take snapshots indepedent of VMware s...
java
public void importUnmanagedSnapshot(String vdisk, Datacenter datacenter, String vvolId) throws InvalidDatastore, NotFound, RuntimeFault, RemoteException { getVimService().importUnmanagedSnapshot(getMOR(), vdisk, datacenter == null ? null : datacenter.getMOR(), vvolId); }
[ "public", "void", "importUnmanagedSnapshot", "(", "String", "vdisk", ",", "Datacenter", "datacenter", ",", "String", "vvolId", ")", "throws", "InvalidDatastore", ",", "NotFound", ",", "RuntimeFault", ",", "RemoteException", "{", "getVimService", "(", ")", ".", "im...
Import an unmanaged-snapshot from Virtual-Volume(VVol) enabled Storage Array. <p> Storage Array may support users to take snapshots indepedent of VMware stack. Such copies or snapshots are known as 'Unmanaged-Snapshots'. We are providing an ability to end-users to import such unmanaged-snapshots as Virtual Disks. <p> E...
[ "Import", "an", "unmanaged", "-", "snapshot", "from", "Virtual", "-", "Volume", "(", "VVol", ")", "enabled", "Storage", "Array", ".", "<p", ">", "Storage", "Array", "may", "support", "users", "to", "take", "snapshots", "indepedent", "of", "VMware", "stack", ...
train
https://github.com/yavijava/yavijava/blob/27fd2c5826115782d5eeb934f86e3e39240179cd/src/main/java/com/vmware/vim25/mo/VirtualDiskManager.java#L165-L167
bechte/junit-hierarchicalcontextrunner
src/main/java/de/bechte/junit/runners/context/statements/StatementExecutor.java
StatementExecutor.whenInitializationErrorIsRaised
protected void whenInitializationErrorIsRaised(final EachTestNotifier notifier, final InitializationError e) { """ Clients may override this method to add additional behavior when a {@link InitializationError} is raised. The call of this method is guaranteed. @param notifier the notifier @param e the error ...
java
protected void whenInitializationErrorIsRaised(final EachTestNotifier notifier, final InitializationError e) { notifier.addFailure(new MultipleFailureException(e.getCauses())); }
[ "protected", "void", "whenInitializationErrorIsRaised", "(", "final", "EachTestNotifier", "notifier", ",", "final", "InitializationError", "e", ")", "{", "notifier", ".", "addFailure", "(", "new", "MultipleFailureException", "(", "e", ".", "getCauses", "(", ")", ")"...
Clients may override this method to add additional behavior when a {@link InitializationError} is raised. The call of this method is guaranteed. @param notifier the notifier @param e the error
[ "Clients", "may", "override", "this", "method", "to", "add", "additional", "behavior", "when", "a", "{", "@link", "InitializationError", "}", "is", "raised", ".", "The", "call", "of", "this", "method", "is", "guaranteed", "." ]
train
https://github.com/bechte/junit-hierarchicalcontextrunner/blob/c11bb846613a3db730ec2dd812e16cd2aaefc924/src/main/java/de/bechte/junit/runners/context/statements/StatementExecutor.java#L56-L58
eduarddrenth/ConfigurableReports
src/main/java/com/vectorprint/report/itext/EventHelper.java
EventHelper.renderFooter
protected void renderFooter(PdfWriter writer, Document document) throws DocumentException, VectorPrintException, InstantiationException, IllegalAccessException { """ prints a footer table with a line at the top, a date and page numbering, second cell will be right aligned @see #PAGEFOOTERTABLEKEY @see #PAGEFOO...
java
protected void renderFooter(PdfWriter writer, Document document) throws DocumentException, VectorPrintException, InstantiationException, IllegalAccessException { if (!debugHereAfter && !failuresHereAfter) { PdfPTable footerTable = elementProducer.createElement(null, PdfPTable.class, getStylers(PAGEFOOTER...
[ "protected", "void", "renderFooter", "(", "PdfWriter", "writer", ",", "Document", "document", ")", "throws", "DocumentException", ",", "VectorPrintException", ",", "InstantiationException", ",", "IllegalAccessException", "{", "if", "(", "!", "debugHereAfter", "&&", "!...
prints a footer table with a line at the top, a date and page numbering, second cell will be right aligned @see #PAGEFOOTERTABLEKEY @see #PAGEFOOTERSTYLEKEY @param writer @param document @throws DocumentException @throws VectorPrintException
[ "prints", "a", "footer", "table", "with", "a", "line", "at", "the", "top", "a", "date", "and", "page", "numbering", "second", "cell", "will", "be", "right", "aligned" ]
train
https://github.com/eduarddrenth/ConfigurableReports/blob/b5fb7a89e16d9b35f557f3bf620594f821fa1552/src/main/java/com/vectorprint/report/itext/EventHelper.java#L354-L371
UrielCh/ovh-java-sdk
ovh-java-sdk-hostingweb/src/main/java/net/minidev/ovh/api/ApiOvhHostingweb.java
ApiOvhHostingweb.serviceName_requestBoost_POST
public OvhTask serviceName_requestBoost_POST(String serviceName, OvhOfferEnum offer) throws IOException { """ Allows you to boost your offer. REST: POST /hosting/web/{serviceName}/requestBoost @param offer [required] The boost offer of your choice. Set to null to disable boost. @param serviceName [required] T...
java
public OvhTask serviceName_requestBoost_POST(String serviceName, OvhOfferEnum offer) throws IOException { String qPath = "/hosting/web/{serviceName}/requestBoost"; StringBuilder sb = path(qPath, serviceName); HashMap<String, Object>o = new HashMap<String, Object>(); addBody(o, "offer", offer); String resp = e...
[ "public", "OvhTask", "serviceName_requestBoost_POST", "(", "String", "serviceName", ",", "OvhOfferEnum", "offer", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/hosting/web/{serviceName}/requestBoost\"", ";", "StringBuilder", "sb", "=", "path", "(", "qPa...
Allows you to boost your offer. REST: POST /hosting/web/{serviceName}/requestBoost @param offer [required] The boost offer of your choice. Set to null to disable boost. @param serviceName [required] The internal name of your hosting
[ "Allows", "you", "to", "boost", "your", "offer", "." ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-hostingweb/src/main/java/net/minidev/ovh/api/ApiOvhHostingweb.java#L1575-L1582
couchbase/couchbase-jvm-core
src/main/java/com/couchbase/client/core/env/Diagnostics.java
Diagnostics.gcInfo
public static void gcInfo(final Map<String, Object> infos) { """ Collects system information as delivered from the {@link GarbageCollectorMXBean}. @param infos a map where the infos are passed in. """ List<GarbageCollectorMXBean> mxBeans = ManagementFactory.getGarbageCollectorMXBeans(); for...
java
public static void gcInfo(final Map<String, Object> infos) { List<GarbageCollectorMXBean> mxBeans = ManagementFactory.getGarbageCollectorMXBeans(); for (GarbageCollectorMXBean mxBean : mxBeans) { infos.put("gc." + mxBean.getName().toLowerCase() + ".collectionCount", mxBean.getCollectionCoun...
[ "public", "static", "void", "gcInfo", "(", "final", "Map", "<", "String", ",", "Object", ">", "infos", ")", "{", "List", "<", "GarbageCollectorMXBean", ">", "mxBeans", "=", "ManagementFactory", ".", "getGarbageCollectorMXBeans", "(", ")", ";", "for", "(", "G...
Collects system information as delivered from the {@link GarbageCollectorMXBean}. @param infos a map where the infos are passed in.
[ "Collects", "system", "information", "as", "delivered", "from", "the", "{", "@link", "GarbageCollectorMXBean", "}", "." ]
train
https://github.com/couchbase/couchbase-jvm-core/blob/97f0427112c2168fee1d6499904f5fa0e24c6797/src/main/java/com/couchbase/client/core/env/Diagnostics.java#L84-L91
dadoonet/fscrawler
framework/src/main/java/fr/pilato/elasticsearch/crawler/fs/framework/MetaFileHandler.java
MetaFileHandler.readFile
protected String readFile(String subdir, String filename) throws IOException { """ Read a file in ~/.fscrawler/{subdir} dir @param subdir subdir where we can read the file (null if we read in the root dir) @param filename filename @return The String UTF-8 content @throws IOException in case of error while read...
java
protected String readFile(String subdir, String filename) throws IOException { Path dir = root; if (subdir != null) { dir = dir.resolve(subdir); } return new String(Files.readAllBytes(dir.resolve(filename)), StandardCharsets.UTF_8); }
[ "protected", "String", "readFile", "(", "String", "subdir", ",", "String", "filename", ")", "throws", "IOException", "{", "Path", "dir", "=", "root", ";", "if", "(", "subdir", "!=", "null", ")", "{", "dir", "=", "dir", ".", "resolve", "(", "subdir", ")...
Read a file in ~/.fscrawler/{subdir} dir @param subdir subdir where we can read the file (null if we read in the root dir) @param filename filename @return The String UTF-8 content @throws IOException in case of error while reading
[ "Read", "a", "file", "in", "~", "/", ".", "fscrawler", "/", "{", "subdir", "}", "dir" ]
train
https://github.com/dadoonet/fscrawler/blob/cca00a14e21ef9986aa30e19b160463aed6bf921/framework/src/main/java/fr/pilato/elasticsearch/crawler/fs/framework/MetaFileHandler.java#L49-L55
google/error-prone-javac
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/AnnotationTypeBuilder.java
AnnotationTypeBuilder.buildAnnotationTypeRequiredMemberDetails
public void buildAnnotationTypeRequiredMemberDetails(XMLNode node, Content memberDetailsTree) throws DocletException { """ Build the annotation type required member documentation. @param node the XML element that specifies which components to document @param memberDetailsTree the content tree to wh...
java
public void buildAnnotationTypeRequiredMemberDetails(XMLNode node, Content memberDetailsTree) throws DocletException { configuration.getBuilderFactory(). getAnnotationTypeRequiredMemberBuilder(writer).buildChildren(node, memberDetailsTree); }
[ "public", "void", "buildAnnotationTypeRequiredMemberDetails", "(", "XMLNode", "node", ",", "Content", "memberDetailsTree", ")", "throws", "DocletException", "{", "configuration", ".", "getBuilderFactory", "(", ")", ".", "getAnnotationTypeRequiredMemberBuilder", "(", "writer...
Build the annotation type required member documentation. @param node the XML element that specifies which components to document @param memberDetailsTree the content tree to which the documentation will be added @throws DocletException if there is a problem building the documentation
[ "Build", "the", "annotation", "type", "required", "member", "documentation", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/AnnotationTypeBuilder.java#L268-L272
KostyaSha/yet-another-docker-plugin
yet-another-docker-plugin/src/main/java/com/github/kostyasha/yad/utils/VariableUtils.java
VariableUtils.resolveVar
public static String resolveVar(String var, Run run, TaskListener taskListener) { """ Resolve on remoting side during execution. Because node may have some specific node vars. """ String resolvedVar = var; try { final EnvVars envVars = run.getEnvironment(taskListener); ...
java
public static String resolveVar(String var, Run run, TaskListener taskListener) { String resolvedVar = var; try { final EnvVars envVars = run.getEnvironment(taskListener); resolvedVar = envVars.expand(var); } catch (IOException | InterruptedException e) { LOG....
[ "public", "static", "String", "resolveVar", "(", "String", "var", ",", "Run", "run", ",", "TaskListener", "taskListener", ")", "{", "String", "resolvedVar", "=", "var", ";", "try", "{", "final", "EnvVars", "envVars", "=", "run", ".", "getEnvironment", "(", ...
Resolve on remoting side during execution. Because node may have some specific node vars.
[ "Resolve", "on", "remoting", "side", "during", "execution", ".", "Because", "node", "may", "have", "some", "specific", "node", "vars", "." ]
train
https://github.com/KostyaSha/yet-another-docker-plugin/blob/40b12e39ff94c3834cff7e028c3dd01c88e87d77/yet-another-docker-plugin/src/main/java/com/github/kostyasha/yad/utils/VariableUtils.java#L24-L33
aoindustries/aoweb-framework
src/main/java/com/aoindustries/website/framework/WebSiteRequest.java
WebSiteRequest.getURL
public String getURL(String url, Object optParam, boolean keepSettings) throws IOException { """ Gets the context-relative URL, optionally with the settings embedded. Parameters should already be URL encoded but not XML encoded. @param url the context-relative URL """ StringBuilder SB=new StringBuilder...
java
public String getURL(String url, Object optParam, boolean keepSettings) throws IOException { StringBuilder SB=new StringBuilder(); SB.append(url); List<String> finishedParams=new SortedArrayList<>(); boolean alreadyAppended=appendParams(SB, optParam, finishedParams, false); if(keepSettings) appendSettings(fin...
[ "public", "String", "getURL", "(", "String", "url", ",", "Object", "optParam", ",", "boolean", "keepSettings", ")", "throws", "IOException", "{", "StringBuilder", "SB", "=", "new", "StringBuilder", "(", ")", ";", "SB", ".", "append", "(", "url", ")", ";", ...
Gets the context-relative URL, optionally with the settings embedded. Parameters should already be URL encoded but not XML encoded. @param url the context-relative URL
[ "Gets", "the", "context", "-", "relative", "URL", "optionally", "with", "the", "settings", "embedded", ".", "Parameters", "should", "already", "be", "URL", "encoded", "but", "not", "XML", "encoded", "." ]
train
https://github.com/aoindustries/aoweb-framework/blob/8e58af4f5dd898cd2fdb855ffa810a1ca6973ae0/src/main/java/com/aoindustries/website/framework/WebSiteRequest.java#L383-L390
OpenLiberty/open-liberty
dev/com.ibm.ws.jsf.2.2/src/org/apache/myfaces/shared/util/MessageUtils.java
MessageUtils.getMessage
public static FacesMessage getMessage(String bundleBaseName, String messageId, Object params[]) { """ Retrieve the message from a specific bundle. It does not look on application message bundle or default message bundle. If it is required to look on those bundles use getMessageFromBundle instead @param bundleB...
java
public static FacesMessage getMessage(String bundleBaseName, String messageId, Object params[]) { return getMessage(bundleBaseName, getCurrentLocale(), messageId, params); }
[ "public", "static", "FacesMessage", "getMessage", "(", "String", "bundleBaseName", ",", "String", "messageId", ",", "Object", "params", "[", "]", ")", "{", "return", "getMessage", "(", "bundleBaseName", ",", "getCurrentLocale", "(", ")", ",", "messageId", ",", ...
Retrieve the message from a specific bundle. It does not look on application message bundle or default message bundle. If it is required to look on those bundles use getMessageFromBundle instead @param bundleBaseName baseName of ResourceBundle to load localized messages @param messageId id of message @param params par...
[ "Retrieve", "the", "message", "from", "a", "specific", "bundle", ".", "It", "does", "not", "look", "on", "application", "message", "bundle", "or", "default", "message", "bundle", ".", "If", "it", "is", "required", "to", "look", "on", "those", "bundles", "u...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jsf.2.2/src/org/apache/myfaces/shared/util/MessageUtils.java#L452-L455
banq/jdonframework
src/main/java/com/jdon/util/FileUtil.java
FileUtil.createFile
public static void createFile(String output, String content) throws Exception { """ write the content to a file; @param output @param content @throws Exception """ OutputStreamWriter fw = null; PrintWriter out = null; try { if (ENCODING == null) ENCODING = PropsUtil.ENCODING; fw = ...
java
public static void createFile(String output, String content) throws Exception { OutputStreamWriter fw = null; PrintWriter out = null; try { if (ENCODING == null) ENCODING = PropsUtil.ENCODING; fw = new OutputStreamWriter(new FileOutputStream(output), ENCODING); out = new PrintWriter(fw); ...
[ "public", "static", "void", "createFile", "(", "String", "output", ",", "String", "content", ")", "throws", "Exception", "{", "OutputStreamWriter", "fw", "=", "null", ";", "PrintWriter", "out", "=", "null", ";", "try", "{", "if", "(", "ENCODING", "==", "nu...
write the content to a file; @param output @param content @throws Exception
[ "write", "the", "content", "to", "a", "file", ";" ]
train
https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/util/FileUtil.java#L38-L57
lucee/Lucee
core/src/main/java/lucee/commons/io/FileUtil.java
FileUtil.toFile
public static File toFile(String parent, String path) { """ create a File from parent file and string @param parent @param path @return new File Object """ return new File(parent.replace(FILE_ANTI_SEPERATOR, FILE_SEPERATOR), path.replace(FILE_ANTI_SEPERATOR, FILE_SEPERATOR)); }
java
public static File toFile(String parent, String path) { return new File(parent.replace(FILE_ANTI_SEPERATOR, FILE_SEPERATOR), path.replace(FILE_ANTI_SEPERATOR, FILE_SEPERATOR)); }
[ "public", "static", "File", "toFile", "(", "String", "parent", ",", "String", "path", ")", "{", "return", "new", "File", "(", "parent", ".", "replace", "(", "FILE_ANTI_SEPERATOR", ",", "FILE_SEPERATOR", ")", ",", "path", ".", "replace", "(", "FILE_ANTI_SEPER...
create a File from parent file and string @param parent @param path @return new File Object
[ "create", "a", "File", "from", "parent", "file", "and", "string" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/commons/io/FileUtil.java#L89-L91
loldevs/riotapi
rest/src/main/java/net/boreeas/riotapi/rest/ThrottledApiHandler.java
ThrottledApiHandler.getItemList
public Future<ItemList> getItemList(ItemData data, String version, String locale) { """ <p> Get a listing of items in the game </p> This method does not count towards the rate limit and is not affected by the throttle @param version Data dragon version for returned data @param locale Locale code for returned ...
java
public Future<ItemList> getItemList(ItemData data, String version, String locale) { return new DummyFuture<>(handler.getItemList(data, version, locale)); }
[ "public", "Future", "<", "ItemList", ">", "getItemList", "(", "ItemData", "data", ",", "String", "version", ",", "String", "locale", ")", "{", "return", "new", "DummyFuture", "<>", "(", "handler", ".", "getItemList", "(", "data", ",", "version", ",", "loca...
<p> Get a listing of items in the game </p> This method does not count towards the rate limit and is not affected by the throttle @param version Data dragon version for returned data @param locale Locale code for returned data @param data Additional information to retrieve @return The list of items @see <a href=https:/...
[ "<p", ">", "Get", "a", "listing", "of", "items", "in", "the", "game", "<", "/", "p", ">", "This", "method", "does", "not", "count", "towards", "the", "rate", "limit", "and", "is", "not", "affected", "by", "the", "throttle" ]
train
https://github.com/loldevs/riotapi/blob/0b8aac407aa5289845f249024f9732332855544f/rest/src/main/java/net/boreeas/riotapi/rest/ThrottledApiHandler.java#L479-L481
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/filter/Filter.java
Filter.andExists
public final Filter<S> andExists(String propertyName, Filter<?> subFilter) { """ Returns a combined filter instance that accepts records which are only accepted by this filter and the "exists" test applied to a join. @param propertyName join property name, which may be a chained property @param subFilter sub-...
java
public final Filter<S> andExists(String propertyName, Filter<?> subFilter) { ChainedProperty<S> prop = new FilterParser<S>(mType, propertyName).parseChainedProperty(); return and(ExistsFilter.build(prop, subFilter, false)); }
[ "public", "final", "Filter", "<", "S", ">", "andExists", "(", "String", "propertyName", ",", "Filter", "<", "?", ">", "subFilter", ")", "{", "ChainedProperty", "<", "S", ">", "prop", "=", "new", "FilterParser", "<", "S", ">", "(", "mType", ",", "proper...
Returns a combined filter instance that accepts records which are only accepted by this filter and the "exists" test applied to a join. @param propertyName join property name, which may be a chained property @param subFilter sub-filter to apply to join, which may be null to test for any existing @return canonical Filt...
[ "Returns", "a", "combined", "filter", "instance", "that", "accepts", "records", "which", "are", "only", "accepted", "by", "this", "filter", "and", "the", "exists", "test", "applied", "to", "a", "join", "." ]
train
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/filter/Filter.java#L304-L307
Azure/azure-sdk-for-java
cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/implementation/ImageModerationsImpl.java
ImageModerationsImpl.oCRFileInput
public OCR oCRFileInput(String language, byte[] imageStream, OCRFileInputOptionalParameter oCRFileInputOptionalParameter) { """ Returns any text found in the image for the language specified. If no language is specified in input then the detection defaults to English. @param language Language of the terms. @pa...
java
public OCR oCRFileInput(String language, byte[] imageStream, OCRFileInputOptionalParameter oCRFileInputOptionalParameter) { return oCRFileInputWithServiceResponseAsync(language, imageStream, oCRFileInputOptionalParameter).toBlocking().single().body(); }
[ "public", "OCR", "oCRFileInput", "(", "String", "language", ",", "byte", "[", "]", "imageStream", ",", "OCRFileInputOptionalParameter", "oCRFileInputOptionalParameter", ")", "{", "return", "oCRFileInputWithServiceResponseAsync", "(", "language", ",", "imageStream", ",", ...
Returns any text found in the image for the language specified. If no language is specified in input then the detection defaults to English. @param language Language of the terms. @param imageStream The image file. @param oCRFileInputOptionalParameter the object representing the optional parameters to be set before ca...
[ "Returns", "any", "text", "found", "in", "the", "image", "for", "the", "language", "specified", ".", "If", "no", "language", "is", "specified", "in", "input", "then", "the", "detection", "defaults", "to", "English", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/implementation/ImageModerationsImpl.java#L1246-L1248
gosu-lang/gosu-lang
gosu-core-api/src/main/java/gw/util/GosuStringUtil.java
GosuStringUtil.replaceEach
public static String replaceEach(String text, String[] searchList, String[] replacementList) { """ <p> Replaces all occurrences of Strings within another String. </p> <p> A <code>null</code> reference passed to this method is a no-op, or if any "search string" or "string to replace" is null, that replace wi...
java
public static String replaceEach(String text, String[] searchList, String[] replacementList) { return replaceEach(text, searchList, replacementList, false, 0); }
[ "public", "static", "String", "replaceEach", "(", "String", "text", ",", "String", "[", "]", "searchList", ",", "String", "[", "]", "replacementList", ")", "{", "return", "replaceEach", "(", "text", ",", "searchList", ",", "replacementList", ",", "false", ",...
<p> Replaces all occurrences of Strings within another String. </p> <p> A <code>null</code> reference passed to this method is a no-op, or if any "search string" or "string to replace" is null, that replace will be ignored. This will not repeat. For repeating replaces, call the overloaded method. </p> <pre> GosuStrin...
[ "<p", ">", "Replaces", "all", "occurrences", "of", "Strings", "within", "another", "String", ".", "<", "/", "p", ">" ]
train
https://github.com/gosu-lang/gosu-lang/blob/d6e9261b137ce66fef3726cabe7826d4a1f946b7/gosu-core-api/src/main/java/gw/util/GosuStringUtil.java#L3490-L3492
lievendoclo/Valkyrie-RCP
valkyrie-rcp-core/src/main/java/org/valkyriercp/widget/table/PropertyColumnTableDescription.java
PropertyColumnTableDescription.addPropertyColumn
public void addPropertyColumn(String propertyName, Class propertyType, TableCellRenderer renderer) { """ WARNING: propertyType is discarded, it should be fetched from the entityType through introspection. @deprecated @see #addPropertyColumn(String) @see PropertyColumn#withRenderer(TableCellRenderer) """ ...
java
public void addPropertyColumn(String propertyName, Class propertyType, TableCellRenderer renderer) { addPropertyColumn(propertyName).withRenderer(renderer); }
[ "public", "void", "addPropertyColumn", "(", "String", "propertyName", ",", "Class", "propertyType", ",", "TableCellRenderer", "renderer", ")", "{", "addPropertyColumn", "(", "propertyName", ")", ".", "withRenderer", "(", "renderer", ")", ";", "}" ]
WARNING: propertyType is discarded, it should be fetched from the entityType through introspection. @deprecated @see #addPropertyColumn(String) @see PropertyColumn#withRenderer(TableCellRenderer)
[ "WARNING", ":", "propertyType", "is", "discarded", "it", "should", "be", "fetched", "from", "the", "entityType", "through", "introspection", "." ]
train
https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/widget/table/PropertyColumnTableDescription.java#L252-L255
twitter/cloudhopper-commons
ch-commons-xbean/src/main/java/com/cloudhopper/commons/xbean/util/PropertiesReplacementUtil.java
PropertiesReplacementUtil.replace
static public InputStream replace(File file, File props, Properties base, boolean env) throws IOException, SubstitutionException { """ Creates an InputStream containing the document resulting from replacing template parameters in the given file. @param file The template file @param props The properties file @p...
java
static public InputStream replace(File file, File props, Properties base, boolean env) throws IOException, SubstitutionException{ if (env) return replaceProperties(replaceEnv(file), loadProperties(base, props)); else return replaceProperties(file, loadProperties(base, props)); }
[ "static", "public", "InputStream", "replace", "(", "File", "file", ",", "File", "props", ",", "Properties", "base", ",", "boolean", "env", ")", "throws", "IOException", ",", "SubstitutionException", "{", "if", "(", "env", ")", "return", "replaceProperties", "(...
Creates an InputStream containing the document resulting from replacing template parameters in the given file. @param file The template file @param props The properties file @param base Properties that should override those loaded from the file @param env If properties from System.getenv should also be used @return An ...
[ "Creates", "an", "InputStream", "containing", "the", "document", "resulting", "from", "replacing", "template", "parameters", "in", "the", "given", "file", "." ]
train
https://github.com/twitter/cloudhopper-commons/blob/b5bc397dbec4537e8149e7ec0733c1d7ed477499/ch-commons-xbean/src/main/java/com/cloudhopper/commons/xbean/util/PropertiesReplacementUtil.java#L87-L90
gocd/gocd
server/src/main/java/com/thoughtworks/go/server/service/StageService.java
StageService.persistStage
private synchronized Stage persistStage(Pipeline pipeline, Stage stage) { """ need to synchronize this method call to make sure no concurrent issues. """ long pipelineId = pipeline.getId(); stage.setOrderId(resolveStageOrder(pipelineId, stage.getName())); Stage savedStage = stageDao.sav...
java
private synchronized Stage persistStage(Pipeline pipeline, Stage stage) { long pipelineId = pipeline.getId(); stage.setOrderId(resolveStageOrder(pipelineId, stage.getName())); Stage savedStage = stageDao.save(pipeline, stage); savedStage.setIdentifier(new StageIdentifier(pipeline.getNam...
[ "private", "synchronized", "Stage", "persistStage", "(", "Pipeline", "pipeline", ",", "Stage", "stage", ")", "{", "long", "pipelineId", "=", "pipeline", ".", "getId", "(", ")", ";", "stage", ".", "setOrderId", "(", "resolveStageOrder", "(", "pipelineId", ",", ...
need to synchronize this method call to make sure no concurrent issues.
[ "need", "to", "synchronize", "this", "method", "call", "to", "make", "sure", "no", "concurrent", "issues", "." ]
train
https://github.com/gocd/gocd/blob/59a8480e23d6c06de39127635108dff57603cb71/server/src/main/java/com/thoughtworks/go/server/service/StageService.java#L259-L269