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
jcuda/jcuda
JCudaJava/src/main/java/jcuda/cuComplex.java
cuComplex.cuCadd
public static cuComplex cuCadd (cuComplex x, cuComplex y) { """ Returns a new complex number that is the sum of the given complex numbers. @param x The first addend @param y The second addend @return The sum of the given addends """ return cuCmplx (cuCreal(x) + cuCreal(y), cuCimag(x) + cuCimag(...
java
public static cuComplex cuCadd (cuComplex x, cuComplex y) { return cuCmplx (cuCreal(x) + cuCreal(y), cuCimag(x) + cuCimag(y)); }
[ "public", "static", "cuComplex", "cuCadd", "(", "cuComplex", "x", ",", "cuComplex", "y", ")", "{", "return", "cuCmplx", "(", "cuCreal", "(", "x", ")", "+", "cuCreal", "(", "y", ")", ",", "cuCimag", "(", "x", ")", "+", "cuCimag", "(", "y", ")", ")",...
Returns a new complex number that is the sum of the given complex numbers. @param x The first addend @param y The second addend @return The sum of the given addends
[ "Returns", "a", "new", "complex", "number", "that", "is", "the", "sum", "of", "the", "given", "complex", "numbers", "." ]
train
https://github.com/jcuda/jcuda/blob/468528b5b9b37dfceb6ed83fcfd889e9b359f984/JCudaJava/src/main/java/jcuda/cuComplex.java#L103-L106
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/map/impl/MapKeyLoaderUtil.java
MapKeyLoaderUtil.toBatches
static Iterator<Map<Integer, List<Data>>> toBatches(final Iterator<Entry<Integer, Data>> entries, final int maxBatch) { """ Transforms an iterator of entries to an iterator of entry batches where each batch is represented as a map from entry key to list of ...
java
static Iterator<Map<Integer, List<Data>>> toBatches(final Iterator<Entry<Integer, Data>> entries, final int maxBatch) { return new UnmodifiableIterator<Map<Integer, List<Data>>>() { @Override public boolean hasNext() { ...
[ "static", "Iterator", "<", "Map", "<", "Integer", ",", "List", "<", "Data", ">", ">", ">", "toBatches", "(", "final", "Iterator", "<", "Entry", "<", "Integer", ",", "Data", ">", ">", "entries", ",", "final", "int", "maxBatch", ")", "{", "return", "ne...
Transforms an iterator of entries to an iterator of entry batches where each batch is represented as a map from entry key to list of entry values. The maximum size of the entry value list in any batch is determined by the {@code maxBatch} parameter. Only one entry value list may have the {@code maxBatch} size, other li...
[ "Transforms", "an", "iterator", "of", "entries", "to", "an", "iterator", "of", "entry", "batches", "where", "each", "batch", "is", "represented", "as", "a", "map", "from", "entry", "key", "to", "list", "of", "entry", "values", ".", "The", "maximum", "size"...
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/map/impl/MapKeyLoaderUtil.java#L89-L105
trellis-ldp/trellis
components/webdav/src/main/java/org/trellisldp/webdav/impl/WebDAVUtils.java
WebDAVUtils.externalUrl
public static String externalUrl(final IRI identifier, final String baseUrl) { """ Generate an external URL for the given location and baseURL. @param identifier the resource identifier @param baseUrl the baseURL @return the external URL """ if (baseUrl.endsWith("/")) { return replaceO...
java
public static String externalUrl(final IRI identifier, final String baseUrl) { if (baseUrl.endsWith("/")) { return replaceOnce(identifier.getIRIString(), TRELLIS_DATA_PREFIX, baseUrl); } return replaceOnce(identifier.getIRIString(), TRELLIS_DATA_PREFIX, baseUrl + "/"); }
[ "public", "static", "String", "externalUrl", "(", "final", "IRI", "identifier", ",", "final", "String", "baseUrl", ")", "{", "if", "(", "baseUrl", ".", "endsWith", "(", "\"/\"", ")", ")", "{", "return", "replaceOnce", "(", "identifier", ".", "getIRIString", ...
Generate an external URL for the given location and baseURL. @param identifier the resource identifier @param baseUrl the baseURL @return the external URL
[ "Generate", "an", "external", "URL", "for", "the", "given", "location", "and", "baseURL", "." ]
train
https://github.com/trellis-ldp/trellis/blob/789fd7a3df86cab7ebba63e72bf4e58397e5f42d/components/webdav/src/main/java/org/trellisldp/webdav/impl/WebDAVUtils.java#L242-L247
lets-blade/blade
src/main/java/com/blade/kit/ReflectKit.java
ReflectKit.hasInterface
public static boolean hasInterface(Class<?> cls, Class<?> inter) { """ Determine whether CLS is an implementation of an inteface Type. @param cls @param inter @return """ return Stream.of(cls.getInterfaces()).anyMatch(c -> c.equals(inter)); }
java
public static boolean hasInterface(Class<?> cls, Class<?> inter) { return Stream.of(cls.getInterfaces()).anyMatch(c -> c.equals(inter)); }
[ "public", "static", "boolean", "hasInterface", "(", "Class", "<", "?", ">", "cls", ",", "Class", "<", "?", ">", "inter", ")", "{", "return", "Stream", ".", "of", "(", "cls", ".", "getInterfaces", "(", ")", ")", ".", "anyMatch", "(", "c", "->", "c",...
Determine whether CLS is an implementation of an inteface Type. @param cls @param inter @return
[ "Determine", "whether", "CLS", "is", "an", "implementation", "of", "an", "inteface", "Type", "." ]
train
https://github.com/lets-blade/blade/blob/60624ee528be12122c49a9ad1713e336b959e59a/src/main/java/com/blade/kit/ReflectKit.java#L230-L232
cdk/cdk
legacy/src/main/java/org/openscience/cdk/isomorphism/matchers/smarts/LogicalOperatorAtom.java
LogicalOperatorAtom.or
public static SMARTSAtom or(IQueryAtom left, IQueryAtom right) { """ Disjunction the provided expressions. @param left expression @param right expression @return disjunction of the left and right expressions """ return new Disjunction(left.getBuilder(), left, right); }
java
public static SMARTSAtom or(IQueryAtom left, IQueryAtom right) { return new Disjunction(left.getBuilder(), left, right); }
[ "public", "static", "SMARTSAtom", "or", "(", "IQueryAtom", "left", ",", "IQueryAtom", "right", ")", "{", "return", "new", "Disjunction", "(", "left", ".", "getBuilder", "(", ")", ",", "left", ",", "right", ")", ";", "}" ]
Disjunction the provided expressions. @param left expression @param right expression @return disjunction of the left and right expressions
[ "Disjunction", "the", "provided", "expressions", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/isomorphism/matchers/smarts/LogicalOperatorAtom.java#L162-L164
apache/groovy
subprojects/groovy-swing/src/main/java/org/codehaus/groovy/runtime/SwingGroovyMethods.java
SwingGroovyMethods.leftShift
public static JMenu leftShift(JMenu self, GString gstr) { """ Overloads the left shift operator to provide an easy way to add components to a menu.<p> @param self a JMenu @param gstr a GString to be added to the menu. @return same menu, after the value was added to it. @since 1.6.4 """ self.add(...
java
public static JMenu leftShift(JMenu self, GString gstr) { self.add(gstr.toString()); return self; }
[ "public", "static", "JMenu", "leftShift", "(", "JMenu", "self", ",", "GString", "gstr", ")", "{", "self", ".", "add", "(", "gstr", ".", "toString", "(", ")", ")", ";", "return", "self", ";", "}" ]
Overloads the left shift operator to provide an easy way to add components to a menu.<p> @param self a JMenu @param gstr a GString to be added to the menu. @return same menu, after the value was added to it. @since 1.6.4
[ "Overloads", "the", "left", "shift", "operator", "to", "provide", "an", "easy", "way", "to", "add", "components", "to", "a", "menu", ".", "<p", ">" ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/subprojects/groovy-swing/src/main/java/org/codehaus/groovy/runtime/SwingGroovyMethods.java#L823-L826
OpenLiberty/open-liberty
dev/com.ibm.ws.channelfw/src/com/ibm/wsspi/bytebuffer/WsByteBufferUtils.java
WsByteBufferUtils.putByteArrayValue
public static void putByteArrayValue(WsByteBuffer[] list, byte[] value, boolean bFlipLast) { """ Store a byte[] into a wsbb[]. This will fill out each wsbb until all of the bytes are written. It will throw an exception if there is not enough space. Users must pass in a boolean to determine whether or not to fli...
java
public static void putByteArrayValue(WsByteBuffer[] list, byte[] value, boolean bFlipLast) { if (null == list || null == value) { return; } if (value.length > getTotalCapacity(list)) { throw new IllegalArgumentException("Buffers not large enough"); } int r...
[ "public", "static", "void", "putByteArrayValue", "(", "WsByteBuffer", "[", "]", "list", ",", "byte", "[", "]", "value", ",", "boolean", "bFlipLast", ")", "{", "if", "(", "null", "==", "list", "||", "null", "==", "value", ")", "{", "return", ";", "}", ...
Store a byte[] into a wsbb[]. This will fill out each wsbb until all of the bytes are written. It will throw an exception if there is not enough space. Users must pass in a boolean to determine whether or not to flip() the last buffer -- i.e. pass in true if this is the only put you're doing, otherwise pass in false. A...
[ "Store", "a", "byte", "[]", "into", "a", "wsbb", "[]", ".", "This", "will", "fill", "out", "each", "wsbb", "until", "all", "of", "the", "bytes", "are", "written", ".", "It", "will", "throw", "an", "exception", "if", "there", "is", "not", "enough", "s...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.channelfw/src/com/ibm/wsspi/bytebuffer/WsByteBufferUtils.java#L417-L441
bazaarvoice/emodb
table/src/main/java/com/bazaarvoice/emodb/table/db/astyanax/AstyanaxTableDAO.java
AstyanaxTableDAO.purgeData
private void purgeData(TableJson json, Storage storage, int iteration, Runnable progress) { """ Purge a dropped table or facade. Executed twice, once for fast cleanup and again much later for stragglers. """ _log.info("Purging data for table '{}' and table uuid '{}' (facade={}, iteration={}).", ...
java
private void purgeData(TableJson json, Storage storage, int iteration, Runnable progress) { _log.info("Purging data for table '{}' and table uuid '{}' (facade={}, iteration={}).", json.getTable(), storage.getUuidString(), storage.isFacade(), iteration); // Cap the # of writes-per-second...
[ "private", "void", "purgeData", "(", "TableJson", "json", ",", "Storage", "storage", ",", "int", "iteration", ",", "Runnable", "progress", ")", "{", "_log", ".", "info", "(", "\"Purging data for table '{}' and table uuid '{}' (facade={}, iteration={}).\"", ",", "json", ...
Purge a dropped table or facade. Executed twice, once for fast cleanup and again much later for stragglers.
[ "Purge", "a", "dropped", "table", "or", "facade", ".", "Executed", "twice", "once", "for", "fast", "cleanup", "and", "again", "much", "later", "for", "stragglers", "." ]
train
https://github.com/bazaarvoice/emodb/blob/97ec7671bc78b47fc2a1c11298c0c872bd5ec7fb/table/src/main/java/com/bazaarvoice/emodb/table/db/astyanax/AstyanaxTableDAO.java#L746-L759
rterp/GMapsFX
GMapsFX/src/main/java/com/lynden/gmapsfx/shapes/ArcBuilder.java
ArcBuilder.buildArcPoints
public static final MVCArray buildArcPoints(LatLong center, double startBearing, double endBearing, double radius) { """ Generates the points for an arc based on two bearings from a centre point and a radius. @param center The LatLong point of the center. @param startBearing North is 0 degrees, East is 90 deg...
java
public static final MVCArray buildArcPoints(LatLong center, double startBearing, double endBearing, double radius) { int points = DEFAULT_ARC_POINTS; MVCArray res = new MVCArray(); if (startBearing > endBearing) { endBearing += 360.0; } double deltaBearing = endBear...
[ "public", "static", "final", "MVCArray", "buildArcPoints", "(", "LatLong", "center", ",", "double", "startBearing", ",", "double", "endBearing", ",", "double", "radius", ")", "{", "int", "points", "=", "DEFAULT_ARC_POINTS", ";", "MVCArray", "res", "=", "new", ...
Generates the points for an arc based on two bearings from a centre point and a radius. @param center The LatLong point of the center. @param startBearing North is 0 degrees, East is 90 degrees, etc. @param endBearing North is 0 degrees, East is 90 degrees, etc. @param radius In metres @return An array of LatLong poin...
[ "Generates", "the", "points", "for", "an", "arc", "based", "on", "two", "bearings", "from", "a", "centre", "point", "and", "a", "radius", "." ]
train
https://github.com/rterp/GMapsFX/blob/4623d3f768e8ad78fc50ee32dd204d236e01059f/GMapsFX/src/main/java/com/lynden/gmapsfx/shapes/ArcBuilder.java#L71-L87
carewebframework/carewebframework-core
org.carewebframework.shell/src/main/java/org/carewebframework/shell/CareWebUtil.java
CareWebUtil.showHelpTopic
public static void showHelpTopic(String module, String topic, String label) { """ Shows help topic in help viewer. @param module The id of the help module. @param topic The id of the desired topic. @param label The label to display for the topic. """ getShell().getHelpViewer(); HelpUtil.sh...
java
public static void showHelpTopic(String module, String topic, String label) { getShell().getHelpViewer(); HelpUtil.show(module, topic, label); }
[ "public", "static", "void", "showHelpTopic", "(", "String", "module", ",", "String", "topic", ",", "String", "label", ")", "{", "getShell", "(", ")", ".", "getHelpViewer", "(", ")", ";", "HelpUtil", ".", "show", "(", "module", ",", "topic", ",", "label",...
Shows help topic in help viewer. @param module The id of the help module. @param topic The id of the desired topic. @param label The label to display for the topic.
[ "Shows", "help", "topic", "in", "help", "viewer", "." ]
train
https://github.com/carewebframework/carewebframework-core/blob/fa3252d4f7541dbe151b92c3d4f6f91433cd1673/org.carewebframework.shell/src/main/java/org/carewebframework/shell/CareWebUtil.java#L111-L114
PunchThrough/bean-sdk-android
sdk/src/main/java/com/punchthrough/bean/sdk/Bean.java
Bean.addCallback
private void addCallback(BeanMessageID type, Callback<?> callback) { """ Add a callback for a Bean message type. @param type The {@link com.punchthrough.bean.sdk.internal.BeanMessageID} the callback will answer to @param callback The callback to store """ List<Callback<?>> callbacks = beanCa...
java
private void addCallback(BeanMessageID type, Callback<?> callback) { List<Callback<?>> callbacks = beanCallbacks.get(type); if (callbacks == null) { callbacks = new ArrayList<>(16); beanCallbacks.put(type, callbacks); } callbacks.add(callback); }
[ "private", "void", "addCallback", "(", "BeanMessageID", "type", ",", "Callback", "<", "?", ">", "callback", ")", "{", "List", "<", "Callback", "<", "?", ">", ">", "callbacks", "=", "beanCallbacks", ".", "get", "(", "type", ")", ";", "if", "(", "callbac...
Add a callback for a Bean message type. @param type The {@link com.punchthrough.bean.sdk.internal.BeanMessageID} the callback will answer to @param callback The callback to store
[ "Add", "a", "callback", "for", "a", "Bean", "message", "type", "." ]
train
https://github.com/PunchThrough/bean-sdk-android/blob/dc33e8cc9258d6e028e0788d74735c75b54d1133/sdk/src/main/java/com/punchthrough/bean/sdk/Bean.java#L684-L691
h2oai/h2o-3
h2o-core/src/main/java/hex/Distribution.java
Distribution.initFNum
public double initFNum(double w, double o, double y) { """ Contribution to numerator for initial value computation @param w weight @param o offset @param y response @return weighted contribution to numerator """ switch (distribution) { case AUTO: case gaussian: case bernoulli: c...
java
public double initFNum(double w, double o, double y) { switch (distribution) { case AUTO: case gaussian: case bernoulli: case quasibinomial: case multinomial: return w*(y-o); case poisson: return w*y; case gamma: return w*y*linkInv(-o); case tw...
[ "public", "double", "initFNum", "(", "double", "w", ",", "double", "o", ",", "double", "y", ")", "{", "switch", "(", "distribution", ")", "{", "case", "AUTO", ":", "case", "gaussian", ":", "case", "bernoulli", ":", "case", "quasibinomial", ":", "case", ...
Contribution to numerator for initial value computation @param w weight @param o offset @param y response @return weighted contribution to numerator
[ "Contribution", "to", "numerator", "for", "initial", "value", "computation" ]
train
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/hex/Distribution.java#L204-L223
jlinn/quartz-redis-jobstore
src/main/java/net/joelinn/quartz/jobstore/RedisStorage.java
RedisStorage.storeJob
@Override @SuppressWarnings("unchecked") public void storeJob(JobDetail jobDetail, boolean replaceExisting, Jedis jedis) throws ObjectAlreadyExistsException { """ Store a job in Redis @param jobDetail the {@link org.quartz.JobDetail} object to be stored @param replaceExisting if true, any existing job wi...
java
@Override @SuppressWarnings("unchecked") public void storeJob(JobDetail jobDetail, boolean replaceExisting, Jedis jedis) throws ObjectAlreadyExistsException { final String jobHashKey = redisSchema.jobHashKey(jobDetail.getKey()); final String jobDataMapHashKey = redisSchema.jobDataMapHashKey(jobD...
[ "@", "Override", "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "void", "storeJob", "(", "JobDetail", "jobDetail", ",", "boolean", "replaceExisting", ",", "Jedis", "jedis", ")", "throws", "ObjectAlreadyExistsException", "{", "final", "String", "jobHas...
Store a job in Redis @param jobDetail the {@link org.quartz.JobDetail} object to be stored @param replaceExisting if true, any existing job with the same group and name as the given job will be overwritten @param jedis a thread-safe Redis connection @throws org.quartz.ObjectAlreadyExistsException
[ "Store", "a", "job", "in", "Redis" ]
train
https://github.com/jlinn/quartz-redis-jobstore/blob/be9a52ee776d8a09866fe99fd9718bc13a0cb992/src/main/java/net/joelinn/quartz/jobstore/RedisStorage.java#L159-L180
looly/hutool
hutool-core/src/main/java/cn/hutool/core/img/ImgUtil.java
ImgUtil.cut
public static void cut(Image srcImage, File destFile, Rectangle rectangle) throws IORuntimeException { """ 图像切割(按指定起点坐标和宽高切割),此方法并不关闭流 @param srcImage 源图像 @param destFile 输出的文件 @param rectangle 矩形对象,表示矩形区域的x,y,width,height @since 3.2.2 @throws IORuntimeException IO异常 """ write(cut(srcImage, rectangle...
java
public static void cut(Image srcImage, File destFile, Rectangle rectangle) throws IORuntimeException { write(cut(srcImage, rectangle), destFile); }
[ "public", "static", "void", "cut", "(", "Image", "srcImage", ",", "File", "destFile", ",", "Rectangle", "rectangle", ")", "throws", "IORuntimeException", "{", "write", "(", "cut", "(", "srcImage", ",", "rectangle", ")", ",", "destFile", ")", ";", "}" ]
图像切割(按指定起点坐标和宽高切割),此方法并不关闭流 @param srcImage 源图像 @param destFile 输出的文件 @param rectangle 矩形对象,表示矩形区域的x,y,width,height @since 3.2.2 @throws IORuntimeException IO异常
[ "图像切割", "(", "按指定起点坐标和宽高切割", ")", ",此方法并不关闭流" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/img/ImgUtil.java#L293-L295
apache/groovy
src/main/java/org/codehaus/groovy/runtime/ResourceGroovyMethods.java
ResourceGroovyMethods.filterLine
public static Writable filterLine(URL self, @ClosureParams(value = SimpleType.class, options = "java.lang.String") Closure predicate) throws IOException { """ Filter lines from a URL using a closure predicate. The closure will be passed each line as a String, and it should return <code>true</code> if the line s...
java
public static Writable filterLine(URL self, @ClosureParams(value = SimpleType.class, options = "java.lang.String") Closure predicate) throws IOException { return IOGroovyMethods.filterLine(newReader(self), predicate); }
[ "public", "static", "Writable", "filterLine", "(", "URL", "self", ",", "@", "ClosureParams", "(", "value", "=", "SimpleType", ".", "class", ",", "options", "=", "\"java.lang.String\"", ")", "Closure", "predicate", ")", "throws", "IOException", "{", "return", "...
Filter lines from a URL using a closure predicate. The closure will be passed each line as a String, and it should return <code>true</code> if the line should be passed to the writer. @param self a URL @param predicate a closure which returns boolean and takes a line @return a writable which writes out the filte...
[ "Filter", "lines", "from", "a", "URL", "using", "a", "closure", "predicate", ".", "The", "closure", "will", "be", "passed", "each", "line", "as", "a", "String", "and", "it", "should", "return", "<code", ">", "true<", "/", "code", ">", "if", "the", "lin...
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/runtime/ResourceGroovyMethods.java#L2437-L2439
tvesalainen/util
util/src/main/java/org/vesalainen/bean/BeanHelper.java
BeanHelper.assignList
public static final <T> T assignList(Object bean, String property, String hint, BiFunction<Class<T>,String,T> factory) { """ Assign pattern item a new value using given factory (and hint) @param <T> @param bean @param property @param hint @param factory """ Class[] pt = getParameterTypes(bean, pr...
java
public static final <T> T assignList(Object bean, String property, String hint, BiFunction<Class<T>,String,T> factory) { Class[] pt = getParameterTypes(bean, prefix(property)); Class type = pt != null && pt.length > 0 ? pt[0] : null; T value = (T) factory.apply(type, hint); doFo...
[ "public", "static", "final", "<", "T", ">", "T", "assignList", "(", "Object", "bean", ",", "String", "property", ",", "String", "hint", ",", "BiFunction", "<", "Class", "<", "T", ">", ",", "String", ",", "T", ">", "factory", ")", "{", "Class", "[", ...
Assign pattern item a new value using given factory (and hint) @param <T> @param bean @param property @param hint @param factory
[ "Assign", "pattern", "item", "a", "new", "value", "using", "given", "factory", "(", "and", "hint", ")" ]
train
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/bean/BeanHelper.java#L622-L637
netscaler/sdx_nitro
src/main/java/com/citrix/sdx/nitro/resource/config/mps/syslog_ui_cmd.java
syslog_ui_cmd.get_nitro_bulk_response
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception { """ <pre> Converts API response of bulk operation into object and returns the object array in case of get request. </pre> """ syslog_ui_cmd_responses result = (syslog_ui_cmd_responses) service.get_...
java
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception { syslog_ui_cmd_responses result = (syslog_ui_cmd_responses) service.get_payload_formatter().string_to_resource(syslog_ui_cmd_responses.class, response); if(result.errorcode != 0) { if (result.error...
[ "protected", "base_resource", "[", "]", "get_nitro_bulk_response", "(", "nitro_service", "service", ",", "String", "response", ")", "throws", "Exception", "{", "syslog_ui_cmd_responses", "result", "=", "(", "syslog_ui_cmd_responses", ")", "service", ".", "get_payload_fo...
<pre> Converts API response of bulk operation into object and returns the object array in case of get request. </pre>
[ "<pre", ">", "Converts", "API", "response", "of", "bulk", "operation", "into", "object", "and", "returns", "the", "object", "array", "in", "case", "of", "get", "request", ".", "<", "/", "pre", ">" ]
train
https://github.com/netscaler/sdx_nitro/blob/c840919f1a8f7c0a5634c0f23d34fa14d1765ff1/src/main/java/com/citrix/sdx/nitro/resource/config/mps/syslog_ui_cmd.java#L562-L579
Azure/azure-sdk-for-java
network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/LoadBalancersInner.java
LoadBalancersInner.updateTagsAsync
public Observable<LoadBalancerInner> updateTagsAsync(String resourceGroupName, String loadBalancerName, Map<String, String> tags) { """ Updates a load balancer tags. @param resourceGroupName The name of the resource group. @param loadBalancerName The name of the load balancer. @param tags Resource tags. @thr...
java
public Observable<LoadBalancerInner> updateTagsAsync(String resourceGroupName, String loadBalancerName, Map<String, String> tags) { return updateTagsWithServiceResponseAsync(resourceGroupName, loadBalancerName, tags).map(new Func1<ServiceResponse<LoadBalancerInner>, LoadBalancerInner>() { @Override ...
[ "public", "Observable", "<", "LoadBalancerInner", ">", "updateTagsAsync", "(", "String", "resourceGroupName", ",", "String", "loadBalancerName", ",", "Map", "<", "String", ",", "String", ">", "tags", ")", "{", "return", "updateTagsWithServiceResponseAsync", "(", "re...
Updates a load balancer tags. @param resourceGroupName The name of the resource group. @param loadBalancerName The name of the load balancer. @param tags Resource tags. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable for the request
[ "Updates", "a", "load", "balancer", "tags", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/LoadBalancersInner.java#L708-L715
Metatavu/edelphi
smvcj/src/main/java/fi/metatavu/edelphi/smvcj/logging/Logging.java
Logging.logException
public static void logException(String message, Exception e) { """ Log an error message. @param message The error message. @param e The exception that produced the message. """ logger.log(Level.SEVERE, message, e); }
java
public static void logException(String message, Exception e) { logger.log(Level.SEVERE, message, e); }
[ "public", "static", "void", "logException", "(", "String", "message", ",", "Exception", "e", ")", "{", "logger", ".", "log", "(", "Level", ".", "SEVERE", ",", "message", ",", "e", ")", ";", "}" ]
Log an error message. @param message The error message. @param e The exception that produced the message.
[ "Log", "an", "error", "message", "." ]
train
https://github.com/Metatavu/edelphi/blob/d91a0b54f954b33b4ee674a1bdf03612d76c3305/smvcj/src/main/java/fi/metatavu/edelphi/smvcj/logging/Logging.java#L22-L24
classgraph/classgraph
src/main/java/nonapi/io/github/classgraph/utils/LogNode.java
LogNode.addChild
private LogNode addChild(final String sortKey, final String msg, final long elapsedTimeNanos) { """ Add a child log node for a message. @param sortKey the sort key @param msg the log message @param elapsedTimeNanos the elapsed time in nanos @return the log node """ return addChild(sortKey, msg...
java
private LogNode addChild(final String sortKey, final String msg, final long elapsedTimeNanos) { return addChild(sortKey, msg, elapsedTimeNanos, null); }
[ "private", "LogNode", "addChild", "(", "final", "String", "sortKey", ",", "final", "String", "msg", ",", "final", "long", "elapsedTimeNanos", ")", "{", "return", "addChild", "(", "sortKey", ",", "msg", ",", "elapsedTimeNanos", ",", "null", ")", ";", "}" ]
Add a child log node for a message. @param sortKey the sort key @param msg the log message @param elapsedTimeNanos the elapsed time in nanos @return the log node
[ "Add", "a", "child", "log", "node", "for", "a", "message", "." ]
train
https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/nonapi/io/github/classgraph/utils/LogNode.java#L284-L286
beihaifeiwu/dolphin
dolphin-common/src/main/java/com/freetmp/common/annotation/AnnotationUtils.java
AnnotationUtils.getAnnotationAttributes
public static AnnotationAttributes getAnnotationAttributes(Annotation annotation, boolean classValuesAsString, boolean nestedAnnotationsAsMap) { """ Retrieve the given annotation's attributes as an {@link AnnotationAttributes} map structure. @return the annotation attributes (a specialized Map) with attribute...
java
public static AnnotationAttributes getAnnotationAttributes(Annotation annotation, boolean classValuesAsString, boolean nestedAnnotationsAsMap) { AnnotationAttributes attrs = new AnnotationAttributes(); Method[] methods = annotation.annotationType().getDeclaredMethods(); for (Method method : methods) { if (...
[ "public", "static", "AnnotationAttributes", "getAnnotationAttributes", "(", "Annotation", "annotation", ",", "boolean", "classValuesAsString", ",", "boolean", "nestedAnnotationsAsMap", ")", "{", "AnnotationAttributes", "attrs", "=", "new", "AnnotationAttributes", "(", ")", ...
Retrieve the given annotation's attributes as an {@link AnnotationAttributes} map structure. @return the annotation attributes (a specialized Map) with attribute names as keys and corresponding attribute values as values @since 3.1.1
[ "Retrieve", "the", "given", "annotation", "s", "attributes", "as", "an", "{" ]
train
https://github.com/beihaifeiwu/dolphin/blob/b100579cc6986dce5eba5593ebb5fbae7bad9d1a/dolphin-common/src/main/java/com/freetmp/common/annotation/AnnotationUtils.java#L557-L574
looly/hutool
hutool-core/src/main/java/cn/hutool/core/util/ZipUtil.java
ZipUtil.addFile
private static void addFile(InputStream in, String path, ZipOutputStream out) throws UtilException { """ 添加文件流到压缩包,不关闭输入流 @param in 需要压缩的输入流 @param path 压缩的路径 @param out 压缩文件存储对象 @throws UtilException IO异常 """ if (null == in) { return; } try { out.putNextEntry(new ZipEntry(path)); Io...
java
private static void addFile(InputStream in, String path, ZipOutputStream out) throws UtilException { if (null == in) { return; } try { out.putNextEntry(new ZipEntry(path)); IoUtil.copy(in, out); } catch (IOException e) { throw new UtilException(e); } finally { closeEntry(out); } ...
[ "private", "static", "void", "addFile", "(", "InputStream", "in", ",", "String", "path", ",", "ZipOutputStream", "out", ")", "throws", "UtilException", "{", "if", "(", "null", "==", "in", ")", "{", "return", ";", "}", "try", "{", "out", ".", "putNextEntr...
添加文件流到压缩包,不关闭输入流 @param in 需要压缩的输入流 @param path 压缩的路径 @param out 压缩文件存储对象 @throws UtilException IO异常
[ "添加文件流到压缩包,不关闭输入流" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/ZipUtil.java#L820-L832
greenmail-mail-test/greenmail
greenmail-core/src/main/java/com/icegreen/greenmail/util/GreenMailUtil.java
GreenMailUtil.sendTextEmail
public static void sendTextEmail(String to, String from, String subject, String msg, final ServerSetup setup) { """ Sends a text message using given server setup for SMTP. @param to the to address. @param from the from address. @param subject the subject. @param msg the test message. @param setu...
java
public static void sendTextEmail(String to, String from, String subject, String msg, final ServerSetup setup) { sendMimeMessage(createTextEmail(to, from, subject, msg, setup)); }
[ "public", "static", "void", "sendTextEmail", "(", "String", "to", ",", "String", "from", ",", "String", "subject", ",", "String", "msg", ",", "final", "ServerSetup", "setup", ")", "{", "sendMimeMessage", "(", "createTextEmail", "(", "to", ",", "from", ",", ...
Sends a text message using given server setup for SMTP. @param to the to address. @param from the from address. @param subject the subject. @param msg the test message. @param setup the SMTP setup.
[ "Sends", "a", "text", "message", "using", "given", "server", "setup", "for", "SMTP", "." ]
train
https://github.com/greenmail-mail-test/greenmail/blob/6d19a62233d1ef6fedbbd1f6fdde2d28e713834a/greenmail-core/src/main/java/com/icegreen/greenmail/util/GreenMailUtil.java#L262-L264
ops4j/org.ops4j.base
ops4j-base-util/src/main/java/org/ops4j/util/i18n/Resources.java
Resources.getBoolean
public boolean getBoolean( String key, boolean defaultValue ) throws MissingResourceException { """ Retrieve a boolean from bundle. @param key the key of resource @param defaultValue the default value if key is missing @return the resource boolean @throws MissingResourceException if the ...
java
public boolean getBoolean( String key, boolean defaultValue ) throws MissingResourceException { try { return getBoolean( key ); } catch( MissingResourceException mre ) { return defaultValue; } }
[ "public", "boolean", "getBoolean", "(", "String", "key", ",", "boolean", "defaultValue", ")", "throws", "MissingResourceException", "{", "try", "{", "return", "getBoolean", "(", "key", ")", ";", "}", "catch", "(", "MissingResourceException", "mre", ")", "{", "...
Retrieve a boolean from bundle. @param key the key of resource @param defaultValue the default value if key is missing @return the resource boolean @throws MissingResourceException if the requested key is unknown
[ "Retrieve", "a", "boolean", "from", "bundle", "." ]
train
https://github.com/ops4j/org.ops4j.base/blob/b0e742c0d9511f6b19ca64da2ebaf30b7a47256a/ops4j-base-util/src/main/java/org/ops4j/util/i18n/Resources.java#L136-L147
alkacon/opencms-core
src/org/opencms/db/CmsSecurityManager.java
CmsSecurityManager.checkRoleForResource
public void checkRoleForResource(CmsDbContext dbc, CmsRole role, CmsResource resource) throws CmsRoleViolationException { """ Checks if the user of the current database context has permissions to impersonate the given role for the given resource.<p> @param dbc the current OpenCms users database context @p...
java
public void checkRoleForResource(CmsDbContext dbc, CmsRole role, CmsResource resource) throws CmsRoleViolationException { if (!hasRoleForResource(dbc, dbc.currentUser(), role, resource)) { throw role.createRoleViolationExceptionForResource(dbc.getRequestContext(), resource); } }
[ "public", "void", "checkRoleForResource", "(", "CmsDbContext", "dbc", ",", "CmsRole", "role", ",", "CmsResource", "resource", ")", "throws", "CmsRoleViolationException", "{", "if", "(", "!", "hasRoleForResource", "(", "dbc", ",", "dbc", ".", "currentUser", "(", ...
Checks if the user of the current database context has permissions to impersonate the given role for the given resource.<p> @param dbc the current OpenCms users database context @param role the role to check @param resource the resource to check the role for @throws CmsRoleViolationException if the user does not have...
[ "Checks", "if", "the", "user", "of", "the", "current", "database", "context", "has", "permissions", "to", "impersonate", "the", "given", "role", "for", "the", "given", "resource", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsSecurityManager.java#L606-L612
mojohaus/jaxb2-maven-plugin
src/main/java/org/codehaus/mojo/jaxb2/schemageneration/XsdGeneratorHelper.java
XsdGeneratorHelper.insertJavaDocAsAnnotations
public static int insertJavaDocAsAnnotations(final Log log, final String encoding, final File outputDir, final SearchableDocumentation docs, ...
java
public static int insertJavaDocAsAnnotations(final Log log, final String encoding, final File outputDir, final SearchableDocumentation docs, ...
[ "public", "static", "int", "insertJavaDocAsAnnotations", "(", "final", "Log", "log", ",", "final", "String", "encoding", ",", "final", "File", "outputDir", ",", "final", "SearchableDocumentation", "docs", ",", "final", "JavaDocRenderer", "renderer", ")", "{", "// ...
Inserts XML documentation annotations into all generated XSD files found within the supplied outputDir. @param log A Maven Log. @param outputDir The outputDir, where generated XSD files are found. @param docs The SearchableDocumentation for the source files within the compilation unit. @param renderer The ...
[ "Inserts", "XML", "documentation", "annotations", "into", "all", "generated", "XSD", "files", "found", "within", "the", "supplied", "outputDir", "." ]
train
https://github.com/mojohaus/jaxb2-maven-plugin/blob/e3c4e47943b15282e5a6e850bbfb1588d8452a0a/src/main/java/org/codehaus/mojo/jaxb2/schemageneration/XsdGeneratorHelper.java#L206-L252
crnk-project/crnk-framework
crnk-core/src/main/java/io/crnk/core/engine/internal/utils/ClassUtils.java
ClassUtils.findClassField
public static Field findClassField(Class<?> beanClass, String fieldName) { """ Tries to find a class fields. Supports inheritance and doesn't return synthetic fields. @param beanClass class to be searched for @param fieldName field name @return a list of found fields """ Class<?> currentClass = beanClas...
java
public static Field findClassField(Class<?> beanClass, String fieldName) { Class<?> currentClass = beanClass; while (currentClass != null && currentClass != Object.class) { for (Field field : currentClass.getDeclaredFields()) { if (field.isSynthetic()) { continue; } if (field.getName().equals(f...
[ "public", "static", "Field", "findClassField", "(", "Class", "<", "?", ">", "beanClass", ",", "String", "fieldName", ")", "{", "Class", "<", "?", ">", "currentClass", "=", "beanClass", ";", "while", "(", "currentClass", "!=", "null", "&&", "currentClass", ...
Tries to find a class fields. Supports inheritance and doesn't return synthetic fields. @param beanClass class to be searched for @param fieldName field name @return a list of found fields
[ "Tries", "to", "find", "a", "class", "fields", ".", "Supports", "inheritance", "and", "doesn", "t", "return", "synthetic", "fields", "." ]
train
https://github.com/crnk-project/crnk-framework/blob/2fd3ef9a991788d46fd2e83b43c8ea37cbaf8681/crnk-core/src/main/java/io/crnk/core/engine/internal/utils/ClassUtils.java#L103-L119
UrielCh/ovh-java-sdk
ovh-java-sdk-dbaastimeseries/src/main/java/net/minidev/ovh/api/ApiOvhDbaastimeseries.java
ApiOvhDbaastimeseries.serviceName_key_POST
public OvhKey serviceName_key_POST(String serviceName, String description, String[] permissions, OvhTag[] tags) throws IOException { """ Create a key for a project REST: POST /dbaas/timeseries/{serviceName}/key @param serviceName [required] Service Name @param description [required] Description @param permis...
java
public OvhKey serviceName_key_POST(String serviceName, String description, String[] permissions, OvhTag[] tags) throws IOException { String qPath = "/dbaas/timeseries/{serviceName}/key"; StringBuilder sb = path(qPath, serviceName); HashMap<String, Object>o = new HashMap<String, Object>(); addBody(o, "descriptio...
[ "public", "OvhKey", "serviceName_key_POST", "(", "String", "serviceName", ",", "String", "description", ",", "String", "[", "]", "permissions", ",", "OvhTag", "[", "]", "tags", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/dbaas/timeseries/{servic...
Create a key for a project REST: POST /dbaas/timeseries/{serviceName}/key @param serviceName [required] Service Name @param description [required] Description @param permissions [required] Permissions for this token @param tags [required] Descriptive tags @deprecated
[ "Create", "a", "key", "for", "a", "project" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-dbaastimeseries/src/main/java/net/minidev/ovh/api/ApiOvhDbaastimeseries.java#L187-L196
GenesysPureEngage/workspace-client-java
src/main/java/com/genesys/workspace/VoiceApi.java
VoiceApi.singleStepConference
public void singleStepConference(String connId, String destination) throws WorkspaceApiException { """ Perform a single-step conference to the specified destination. This adds the destination to the existing call, creating a conference if necessary. @param connId The connection ID of the call to conference. @pa...
java
public void singleStepConference(String connId, String destination) throws WorkspaceApiException { this.singleStepConference(connId, destination, null, null, null, null); }
[ "public", "void", "singleStepConference", "(", "String", "connId", ",", "String", "destination", ")", "throws", "WorkspaceApiException", "{", "this", ".", "singleStepConference", "(", "connId", ",", "destination", ",", "null", ",", "null", ",", "null", ",", "nul...
Perform a single-step conference to the specified destination. This adds the destination to the existing call, creating a conference if necessary. @param connId The connection ID of the call to conference. @param destination The number to add to the call.
[ "Perform", "a", "single", "-", "step", "conference", "to", "the", "specified", "destination", ".", "This", "adds", "the", "destination", "to", "the", "existing", "call", "creating", "a", "conference", "if", "necessary", "." ]
train
https://github.com/GenesysPureEngage/workspace-client-java/blob/509fdd9e89b9359d012f9a72be95037a3cef53e6/src/main/java/com/genesys/workspace/VoiceApi.java#L1003-L1006
jenetics/jpx
jpx/src/main/java/io/jenetics/jpx/GPX.java
GPX.toBuilder
public Builder toBuilder() { """ Convert the <em>immutable</em> GPX object into a <em>mutable</em> builder initialized with the current GPX values. @since 1.1 @return a new track builder initialized with the values of {@code this} GPX object """ return builder(_version, _creator) .metadata(_metada...
java
public Builder toBuilder() { return builder(_version, _creator) .metadata(_metadata) .wayPoints(_wayPoints) .routes(_routes) .tracks(_tracks); }
[ "public", "Builder", "toBuilder", "(", ")", "{", "return", "builder", "(", "_version", ",", "_creator", ")", ".", "metadata", "(", "_metadata", ")", ".", "wayPoints", "(", "_wayPoints", ")", ".", "routes", "(", "_routes", ")", ".", "tracks", "(", "_track...
Convert the <em>immutable</em> GPX object into a <em>mutable</em> builder initialized with the current GPX values. @since 1.1 @return a new track builder initialized with the values of {@code this} GPX object
[ "Convert", "the", "<em", ">", "immutable<", "/", "em", ">", "GPX", "object", "into", "a", "<em", ">", "mutable<", "/", "em", ">", "builder", "initialized", "with", "the", "current", "GPX", "values", "." ]
train
https://github.com/jenetics/jpx/blob/58fefc10580602d07f1480d6a5886d13a553ff8f/jpx/src/main/java/io/jenetics/jpx/GPX.java#L369-L375
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/ToTextStream.java
ToTextStream.endElement
public void endElement(String namespaceURI, String localName, String name) throws org.xml.sax.SAXException { """ Receive notification of the end of an element. <p>The SAX parser will invoke this method at the end of every element in the XML document; there will be a corresponding startElement() even...
java
public void endElement(String namespaceURI, String localName, String name) throws org.xml.sax.SAXException { if (m_tracer != null) super.fireEndElem(name); }
[ "public", "void", "endElement", "(", "String", "namespaceURI", ",", "String", "localName", ",", "String", "name", ")", "throws", "org", ".", "xml", ".", "sax", ".", "SAXException", "{", "if", "(", "m_tracer", "!=", "null", ")", "super", ".", "fireEndElem",...
Receive notification of the end of an element. <p>The SAX parser will invoke this method at the end of every element in the XML document; there will be a corresponding startElement() event for every endElement() event (even when the element is empty).</p> <p>If the element name has a namespace prefix, the prefix will...
[ "Receive", "notification", "of", "the", "end", "of", "an", "element", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/ToTextStream.java#L163-L168
baratine/baratine
kraken/src/main/java/com/caucho/v5/kraken/table/WatchServiceImpl.java
WatchServiceImpl.addForeignWatch
public void addForeignWatch(TableKraken table, byte []key, String serverId) { """ Adds a watch from a foreign server. Remote notifications will send a copy to the foreign server. """ WatchForeign watch = new WatchForeign(key, table, serverId); WatchTable watchTable = getWatchTable(table); wa...
java
public void addForeignWatch(TableKraken table, byte []key, String serverId) { WatchForeign watch = new WatchForeign(key, table, serverId); WatchTable watchTable = getWatchTable(table); watchTable.addWatchForeign(watch, key); }
[ "public", "void", "addForeignWatch", "(", "TableKraken", "table", ",", "byte", "[", "]", "key", ",", "String", "serverId", ")", "{", "WatchForeign", "watch", "=", "new", "WatchForeign", "(", "key", ",", "table", ",", "serverId", ")", ";", "WatchTable", "wa...
Adds a watch from a foreign server. Remote notifications will send a copy to the foreign server.
[ "Adds", "a", "watch", "from", "a", "foreign", "server", ".", "Remote", "notifications", "will", "send", "a", "copy", "to", "the", "foreign", "server", "." ]
train
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kraken/table/WatchServiceImpl.java#L197-L204
cdk/cdk
tool/builder3d/src/main/java/org/openscience/cdk/modeling/builder3d/AtomTetrahedralLigandPlacer3D.java
AtomTetrahedralLigandPlacer3D.rescaleBondLength
public Point3d rescaleBondLength(IAtom atom1, IAtom atom2, Point3d point2) { """ Rescales Point2 so that length 1-2 is sum of covalent radii. If covalent radii cannot be found, use bond length of 1.0 @param atom1 stationary atom @param atom2 movable atom @param point2 coordinates...
java
public Point3d rescaleBondLength(IAtom atom1, IAtom atom2, Point3d point2) { Point3d point1 = atom1.getPoint3d(); Double d1 = atom1.getCovalentRadius(); Double d2 = atom2.getCovalentRadius(); // in case we have no covalent radii, set to 1.0 double distance = (d1 == null || d2 == ...
[ "public", "Point3d", "rescaleBondLength", "(", "IAtom", "atom1", ",", "IAtom", "atom2", ",", "Point3d", "point2", ")", "{", "Point3d", "point1", "=", "atom1", ".", "getPoint3d", "(", ")", ";", "Double", "d1", "=", "atom1", ".", "getCovalentRadius", "(", ")...
Rescales Point2 so that length 1-2 is sum of covalent radii. If covalent radii cannot be found, use bond length of 1.0 @param atom1 stationary atom @param atom2 movable atom @param point2 coordinates for atom 2 @return new coordinates for atom 2
[ "Rescales", "Point2", "so", "that", "length", "1", "-", "2", "is", "sum", "of", "covalent", "radii", ".", "If", "covalent", "radii", "cannot", "be", "found", "use", "bond", "length", "of", "1", ".", "0" ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/builder3d/src/main/java/org/openscience/cdk/modeling/builder3d/AtomTetrahedralLigandPlacer3D.java#L131-L147
nyla-solutions/nyla
nyla.solutions.core/src/main/java/nyla/solutions/core/util/Organizer.java
Organizer.addAll
public static void addAll(Collection<Object> list, Object[] objects) { """ Add object to a list @param list where objects will be added @param objects the object add """ list.addAll(Arrays.asList(objects)); }
java
public static void addAll(Collection<Object> list, Object[] objects) { list.addAll(Arrays.asList(objects)); }
[ "public", "static", "void", "addAll", "(", "Collection", "<", "Object", ">", "list", ",", "Object", "[", "]", "objects", ")", "{", "list", ".", "addAll", "(", "Arrays", ".", "asList", "(", "objects", ")", ")", ";", "}" ]
Add object to a list @param list where objects will be added @param objects the object add
[ "Add", "object", "to", "a", "list" ]
train
https://github.com/nyla-solutions/nyla/blob/38d5b843c76eae9762bbca20453ed0f0ad8412a9/nyla.solutions.core/src/main/java/nyla/solutions/core/util/Organizer.java#L525-L528
apache/incubator-zipkin
zipkin-collector/core/src/main/java/zipkin2/collector/Collector.java
Collector.errorStoringSpans
RuntimeException errorStoringSpans(List<Span> spans, Throwable e) { """ When storing spans, an exception can be raised before or after the fact. This adds context of span ids to give logs more relevance. """ metrics.incrementSpansDropped(spans.size()); // The exception could be related to a span being...
java
RuntimeException errorStoringSpans(List<Span> spans, Throwable e) { metrics.incrementSpansDropped(spans.size()); // The exception could be related to a span being huge. Instead of filling logs, // print trace id, span id pairs StringBuilder msg = appendSpanIds(spans, new StringBuilder("Cannot store span...
[ "RuntimeException", "errorStoringSpans", "(", "List", "<", "Span", ">", "spans", ",", "Throwable", "e", ")", "{", "metrics", ".", "incrementSpansDropped", "(", "spans", ".", "size", "(", ")", ")", ";", "// The exception could be related to a span being huge. Instead o...
When storing spans, an exception can be raised before or after the fact. This adds context of span ids to give logs more relevance.
[ "When", "storing", "spans", "an", "exception", "can", "be", "raised", "before", "or", "after", "the", "fact", ".", "This", "adds", "context", "of", "span", "ids", "to", "give", "logs", "more", "relevance", "." ]
train
https://github.com/apache/incubator-zipkin/blob/89b2fab983fc626b3be32ce9d7cf64b3f01f1a87/zipkin-collector/core/src/main/java/zipkin2/collector/Collector.java#L211-L217
alkacon/opencms-core
src/org/opencms/file/CmsObject.java
CmsObject.getSubFolders
public List<CmsResource> getSubFolders(String resourcename) throws CmsException { """ Returns all folder resources contained in a folder.<p> The result is filtered according to the rules of the <code>{@link CmsResourceFilter#DEFAULT}</code> filter.<p> @param resourcename the full current site relative path ...
java
public List<CmsResource> getSubFolders(String resourcename) throws CmsException { return getSubFolders(resourcename, CmsResourceFilter.DEFAULT); }
[ "public", "List", "<", "CmsResource", ">", "getSubFolders", "(", "String", "resourcename", ")", "throws", "CmsException", "{", "return", "getSubFolders", "(", "resourcename", ",", "CmsResourceFilter", ".", "DEFAULT", ")", ";", "}" ]
Returns all folder resources contained in a folder.<p> The result is filtered according to the rules of the <code>{@link CmsResourceFilter#DEFAULT}</code> filter.<p> @param resourcename the full current site relative path of the resource to return the child resources for. @return a list of all child file as <code>{@...
[ "Returns", "all", "folder", "resources", "contained", "in", "a", "folder", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/file/CmsObject.java#L1834-L1837
revapi/revapi
revapi-maven-utils/src/main/java/org/revapi/maven/utils/ArtifactResolver.java
ArtifactResolver.resolveNewestMatching
public Artifact resolveNewestMatching(String gav, @Nullable String upToVersion, Pattern versionMatcher, boolean remoteOnly, boolean upToInclusive) throws VersionRangeResolutionException, ArtifactResolutionException { """ Tries to find the newest version of the ...
java
public Artifact resolveNewestMatching(String gav, @Nullable String upToVersion, Pattern versionMatcher, boolean remoteOnly, boolean upToInclusive) throws VersionRangeResolutionException, ArtifactResolutionException { Artifact artifact = new DefaultArtifact...
[ "public", "Artifact", "resolveNewestMatching", "(", "String", "gav", ",", "@", "Nullable", "String", "upToVersion", ",", "Pattern", "versionMatcher", ",", "boolean", "remoteOnly", ",", "boolean", "upToInclusive", ")", "throws", "VersionRangeResolutionException", ",", ...
Tries to find the newest version of the artifact that matches given regular expression. The found version will be older than the {@code upToVersion} or newest available if {@code upToVersion} is null. @param gav the coordinates of the artifact. The version part is ignored @param upToVersion the version up to which the...
[ "Tries", "to", "find", "the", "newest", "version", "of", "the", "artifact", "that", "matches", "given", "regular", "expression", ".", "The", "found", "version", "will", "be", "older", "than", "the", "{", "@code", "upToVersion", "}", "or", "newest", "availabl...
train
https://github.com/revapi/revapi/blob/e070b136d977441ab96fdce067a13e7e0423295b/revapi-maven-utils/src/main/java/org/revapi/maven/utils/ArtifactResolver.java#L99-L128
alb-i986/selenium-tinafw
src/main/java/me/alb_i986/selenium/tinafw/ui/PageHelper.java
PageHelper.assertExpectedCondition
public static <T> T assertExpectedCondition(ExpectedCondition<T> condition, WebDriver driver) { """ Explicitly wait until the given expected condition is met. Throw {@link AssertionError} if the wait times out. @param condition @param driver @return whatever #waitUntil returns @throws AssertionError if the ...
java
public static <T> T assertExpectedCondition(ExpectedCondition<T> condition, WebDriver driver) { try { return waitUntil(condition, driver); } catch(TimeoutException e) { throw new AssertionError("Explicit wait timed out. The condition '" + condition + "' was not met" , e); } }
[ "public", "static", "<", "T", ">", "T", "assertExpectedCondition", "(", "ExpectedCondition", "<", "T", ">", "condition", ",", "WebDriver", "driver", ")", "{", "try", "{", "return", "waitUntil", "(", "condition", ",", "driver", ")", ";", "}", "catch", "(", ...
Explicitly wait until the given expected condition is met. Throw {@link AssertionError} if the wait times out. @param condition @param driver @return whatever #waitUntil returns @throws AssertionError if the condition is not met
[ "Explicitly", "wait", "until", "the", "given", "expected", "condition", "is", "met", ".", "Throw", "{", "@link", "AssertionError", "}", "if", "the", "wait", "times", "out", "." ]
train
https://github.com/alb-i986/selenium-tinafw/blob/91c66720cda9f69751f96c58c0a0624b2222186e/src/main/java/me/alb_i986/selenium/tinafw/ui/PageHelper.java#L77-L83
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/MapUtils.java
MapUtils.isPointOnMultiPolygon
public static boolean isPointOnMultiPolygon(LatLng point, MultiPolygonOptions multiPolygon, boolean geodesic, double tolerance) { """ Is the point on the multi polygon @param point point @param multiPolygon multi polygon @param geodesic geodesic check flag @param tolerance distance tolerance @...
java
public static boolean isPointOnMultiPolygon(LatLng point, MultiPolygonOptions multiPolygon, boolean geodesic, double tolerance) { boolean near = false; for (PolygonOptions polygon : multiPolygon.getPolygonOptions()) { near = isPointOnPolygon(point, polygon, geodesic, tolerance); ...
[ "public", "static", "boolean", "isPointOnMultiPolygon", "(", "LatLng", "point", ",", "MultiPolygonOptions", "multiPolygon", ",", "boolean", "geodesic", ",", "double", "tolerance", ")", "{", "boolean", "near", "=", "false", ";", "for", "(", "PolygonOptions", "polyg...
Is the point on the multi polygon @param point point @param multiPolygon multi polygon @param geodesic geodesic check flag @param tolerance distance tolerance @return true if on the multi polygon
[ "Is", "the", "point", "on", "the", "multi", "polygon" ]
train
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/MapUtils.java#L384-L393
micronaut-projects/micronaut-core
runtime/src/main/java/io/micronaut/discovery/cloud/gcp/GoogleComputeInstanceMetadataResolver.java
GoogleComputeInstanceMetadataResolver.readGcMetadataUrl
@Deprecated protected JsonNode readGcMetadataUrl(URL url, int connectionTimeoutMs, int readTimeoutMs) throws IOException { """ Get instance Metadata JSON. @param url The metadata URL @param connectionTimeoutMs connection timeout in millis @param readTimeoutMs read timeout in millis ...
java
@Deprecated protected JsonNode readGcMetadataUrl(URL url, int connectionTimeoutMs, int readTimeoutMs) throws IOException { return readMetadataUrl(url, connectionTimeoutMs, readTimeoutMs, objectMapper, Collections.emptyMap()); }
[ "@", "Deprecated", "protected", "JsonNode", "readGcMetadataUrl", "(", "URL", "url", ",", "int", "connectionTimeoutMs", ",", "int", "readTimeoutMs", ")", "throws", "IOException", "{", "return", "readMetadataUrl", "(", "url", ",", "connectionTimeoutMs", ",", "readTime...
Get instance Metadata JSON. @param url The metadata URL @param connectionTimeoutMs connection timeout in millis @param readTimeoutMs read timeout in millis @return The Metadata JSON @throws IOException Failed or interrupted I/O operations while reading from input stream. @deprecated See {@link io...
[ "Get", "instance", "Metadata", "JSON", "." ]
train
https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/runtime/src/main/java/io/micronaut/discovery/cloud/gcp/GoogleComputeInstanceMetadataResolver.java#L211-L214
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/AjaxHelper.java
AjaxHelper.registerComponents
public static AjaxOperation registerComponents(final List<String> targetIds, final String triggerId) { """ Registers one or more components as being AJAX capable. @param targetIds the components to register. Each component will be re-painted when the trigger occurs. @param triggerId the id of the trigger that ...
java
public static AjaxOperation registerComponents(final List<String> targetIds, final String triggerId) { AjaxOperation operation = new AjaxOperation(triggerId, targetIds); registerAjaxOperation(operation); return operation; }
[ "public", "static", "AjaxOperation", "registerComponents", "(", "final", "List", "<", "String", ">", "targetIds", ",", "final", "String", "triggerId", ")", "{", "AjaxOperation", "operation", "=", "new", "AjaxOperation", "(", "triggerId", ",", "targetIds", ")", "...
Registers one or more components as being AJAX capable. @param targetIds the components to register. Each component will be re-painted when the trigger occurs. @param triggerId the id of the trigger that will cause the components to be painted. @return the AjaxOperation control configuration object.
[ "Registers", "one", "or", "more", "components", "as", "being", "AJAX", "capable", "." ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/AjaxHelper.java#L100-L104
apptentive/apptentive-android
apptentive/src/main/java/com/apptentive/android/sdk/util/Util.java
Util.generateCacheFileFullPath
public static String generateCacheFileFullPath(String url, File cacheDir) { """ /* Generate cached file name use md5 from image originalPath and image created time """ String fileName = md5(url); File cacheFile = new File(cacheDir, fileName); return cacheFile.getPath(); }
java
public static String generateCacheFileFullPath(String url, File cacheDir) { String fileName = md5(url); File cacheFile = new File(cacheDir, fileName); return cacheFile.getPath(); }
[ "public", "static", "String", "generateCacheFileFullPath", "(", "String", "url", ",", "File", "cacheDir", ")", "{", "String", "fileName", "=", "md5", "(", "url", ")", ";", "File", "cacheFile", "=", "new", "File", "(", "cacheDir", ",", "fileName", ")", ";",...
/* Generate cached file name use md5 from image originalPath and image created time
[ "/", "*", "Generate", "cached", "file", "name", "use", "md5", "from", "image", "originalPath", "and", "image", "created", "time" ]
train
https://github.com/apptentive/apptentive-android/blob/887c08d7bd5ae6488a90366dfb58f58938861a93/apptentive/src/main/java/com/apptentive/android/sdk/util/Util.java#L590-L594
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/stat/authentication/authenticationvserver_stats.java
authenticationvserver_stats.get
public static authenticationvserver_stats get(nitro_service service, String name) throws Exception { """ Use this API to fetch statistics of authenticationvserver_stats resource of given name . """ authenticationvserver_stats obj = new authenticationvserver_stats(); obj.set_name(name); authenticationvser...
java
public static authenticationvserver_stats get(nitro_service service, String name) throws Exception{ authenticationvserver_stats obj = new authenticationvserver_stats(); obj.set_name(name); authenticationvserver_stats response = (authenticationvserver_stats) obj.stat_resource(service); return response; }
[ "public", "static", "authenticationvserver_stats", "get", "(", "nitro_service", "service", ",", "String", "name", ")", "throws", "Exception", "{", "authenticationvserver_stats", "obj", "=", "new", "authenticationvserver_stats", "(", ")", ";", "obj", ".", "set_name", ...
Use this API to fetch statistics of authenticationvserver_stats resource of given name .
[ "Use", "this", "API", "to", "fetch", "statistics", "of", "authenticationvserver_stats", "resource", "of", "given", "name", "." ]
train
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/stat/authentication/authenticationvserver_stats.java#L249-L254
hypercube1024/firefly
firefly/src/main/java/com/firefly/codec/http2/model/MultiPartContentProvider.java
MultiPartContentProvider.addFieldPart
public void addFieldPart(String name, ContentProvider content, HttpFields fields) { """ <p>Adds a field part with the given {@code name} as field name, and the given {@code content} as part content.</p> @param name the part name @param content the part content @param fields the headers associated with th...
java
public void addFieldPart(String name, ContentProvider content, HttpFields fields) { addPart(new Part(name, null, "text/plain", content, fields)); }
[ "public", "void", "addFieldPart", "(", "String", "name", ",", "ContentProvider", "content", ",", "HttpFields", "fields", ")", "{", "addPart", "(", "new", "Part", "(", "name", ",", "null", ",", "\"text/plain\"", ",", "content", ",", "fields", ")", ")", ";",...
<p>Adds a field part with the given {@code name} as field name, and the given {@code content} as part content.</p> @param name the part name @param content the part content @param fields the headers associated with this part
[ "<p", ">", "Adds", "a", "field", "part", "with", "the", "given", "{", "@code", "name", "}", "as", "field", "name", "and", "the", "given", "{", "@code", "content", "}", "as", "part", "content", ".", "<", "/", "p", ">" ]
train
https://github.com/hypercube1024/firefly/blob/ed3fc75b7c54a65b1e7d8141d01b49144bb423a3/firefly/src/main/java/com/firefly/codec/http2/model/MultiPartContentProvider.java#L70-L72
theHilikus/Event-manager
src/main/java/com/github/thehilikus/events/event_manager/SubscriptionManager.java
SubscriptionManager.unsubscribe
public <T extends EventListener> void unsubscribe(EventPublisher source, T listener) { """ Unbinds a listener to a publisher @param source the event publisher @param listener the event receiver """ log.debug("[unsubscribe] Removing {} --> {}", source.getClass().getName(), listener.getClass().getName()); ...
java
public <T extends EventListener> void unsubscribe(EventPublisher source, T listener) { log.debug("[unsubscribe] Removing {} --> {}", source.getClass().getName(), listener.getClass().getName()); GenericEventDispatcher<T> dispatcher = (GenericEventDispatcher<T>) dispatchers.get(source); dispatcher.removeListener(liste...
[ "public", "<", "T", "extends", "EventListener", ">", "void", "unsubscribe", "(", "EventPublisher", "source", ",", "T", "listener", ")", "{", "log", ".", "debug", "(", "\"[unsubscribe] Removing {} --> {}\"", ",", "source", ".", "getClass", "(", ")", ".", "getNa...
Unbinds a listener to a publisher @param source the event publisher @param listener the event receiver
[ "Unbinds", "a", "listener", "to", "a", "publisher" ]
train
https://github.com/theHilikus/Event-manager/blob/c3dabf5a145e57b2a6de89c1910851b8a8ae6064/src/main/java/com/github/thehilikus/events/event_manager/SubscriptionManager.java#L59-L63
windup/windup
ui/addon/src/main/java/org/jboss/windup/ui/DistributionUpdater.java
DistributionUpdater.replaceWindupDirectoryWithDistribution
public void replaceWindupDirectoryWithDistribution(Coordinate distCoordinate) throws WindupException { """ Downloads the given artifact, extracts it and replaces current Windup directory (as given by PathUtil) with the content from the artifact (assuming it really is a Windup distribution zip). ""...
java
public void replaceWindupDirectoryWithDistribution(Coordinate distCoordinate) throws WindupException { try { final CoordinateBuilder coord = CoordinateBuilder.create(distCoordinate); File tempFolder = OperatingSystemUtils.createTempDir(); this.updater....
[ "public", "void", "replaceWindupDirectoryWithDistribution", "(", "Coordinate", "distCoordinate", ")", "throws", "WindupException", "{", "try", "{", "final", "CoordinateBuilder", "coord", "=", "CoordinateBuilder", ".", "create", "(", "distCoordinate", ")", ";", "File", ...
Downloads the given artifact, extracts it and replaces current Windup directory (as given by PathUtil) with the content from the artifact (assuming it really is a Windup distribution zip).
[ "Downloads", "the", "given", "artifact", "extracts", "it", "and", "replaces", "current", "Windup", "directory", "(", "as", "given", "by", "PathUtil", ")", "with", "the", "content", "from", "the", "artifact", "(", "assuming", "it", "really", "is", "a", "Windu...
train
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/ui/addon/src/main/java/org/jboss/windup/ui/DistributionUpdater.java#L52-L106
datumbox/datumbox-framework
datumbox-framework-core/src/main/java/com/datumbox/framework/core/mathematics/regularization/L1Regularizer.java
L1Regularizer.updateWeights
public static <K> void updateWeights(double l1, double learningRate, Map<K, Double> weights, Map<K, Double> newWeights) { """ Updates the weights by applying the L1 regularization. @param l1 @param learningRate @param weights @param newWeights @param <K> """ if(l1 > 0.0) { /* ...
java
public static <K> void updateWeights(double l1, double learningRate, Map<K, Double> weights, Map<K, Double> newWeights) { if(l1 > 0.0) { /* //SGD-L1 (Naive) for(Map.Entry<K, Double> e : weights.entrySet()) { K column = e.getKey(); newWeights.pu...
[ "public", "static", "<", "K", ">", "void", "updateWeights", "(", "double", "l1", ",", "double", "learningRate", ",", "Map", "<", "K", ",", "Double", ">", "weights", ",", "Map", "<", "K", ",", "Double", ">", "newWeights", ")", "{", "if", "(", "l1", ...
Updates the weights by applying the L1 regularization. @param l1 @param learningRate @param weights @param newWeights @param <K>
[ "Updates", "the", "weights", "by", "applying", "the", "L1", "regularization", "." ]
train
https://github.com/datumbox/datumbox-framework/blob/909dff0476e80834f05ecdde0624dd2390e9b0ca/datumbox-framework-core/src/main/java/com/datumbox/framework/core/mathematics/regularization/L1Regularizer.java#L39-L61
jtmelton/appsensor
appsensor-core/src/main/java/org/owasp/appsensor/core/util/DateUtils.java
DateUtils.fromString
public static DateTime fromString(String rfc3339Timestamp) { """ Helper for parsing rfc3339 compliant timestamp from string @param rfc3339Timestamp timestamp as string in rfc3339 format @return {@link DateTime} representing rfc3339 compliant timestamp from parameter """ if (rfc3339Timestamp == null) { ...
java
public static DateTime fromString(String rfc3339Timestamp) { if (rfc3339Timestamp == null) { return null; } DateTime dateTime = new DateTime(rfc3339Timestamp, DateTimeZone.UTC); return dateTime; }
[ "public", "static", "DateTime", "fromString", "(", "String", "rfc3339Timestamp", ")", "{", "if", "(", "rfc3339Timestamp", "==", "null", ")", "{", "return", "null", ";", "}", "DateTime", "dateTime", "=", "new", "DateTime", "(", "rfc3339Timestamp", ",", "DateTim...
Helper for parsing rfc3339 compliant timestamp from string @param rfc3339Timestamp timestamp as string in rfc3339 format @return {@link DateTime} representing rfc3339 compliant timestamp from parameter
[ "Helper", "for", "parsing", "rfc3339", "compliant", "timestamp", "from", "string" ]
train
https://github.com/jtmelton/appsensor/blob/c3b4e9ada50fdee974e0d618ec4bdfabc2163798/appsensor-core/src/main/java/org/owasp/appsensor/core/util/DateUtils.java#L36-L43
landawn/AbacusUtil
src/com/landawn/abacus/util/HBaseExecutor.java
HBaseExecutor.registerRowKeyProperty
public static void registerRowKeyProperty(final Class<?> cls, final String rowKeyPropertyName) { """ The row key property will be read from/write to the specified property @param cls entity classes with getter/setter methods @param rowKeyPropertyName """ if (ClassUtil.getPropGetMethod(cls, rowKeyP...
java
public static void registerRowKeyProperty(final Class<?> cls, final String rowKeyPropertyName) { if (ClassUtil.getPropGetMethod(cls, rowKeyPropertyName) == null || ClassUtil.getPropSetMethod(cls, rowKeyPropertyName) == null) { throw new IllegalArgumentException("The specified class: " + ClassUtil....
[ "public", "static", "void", "registerRowKeyProperty", "(", "final", "Class", "<", "?", ">", "cls", ",", "final", "String", "rowKeyPropertyName", ")", "{", "if", "(", "ClassUtil", ".", "getPropGetMethod", "(", "cls", ",", "rowKeyPropertyName", ")", "==", "null"...
The row key property will be read from/write to the specified property @param cls entity classes with getter/setter methods @param rowKeyPropertyName
[ "The", "row", "key", "property", "will", "be", "read", "from", "/", "write", "to", "the", "specified", "property" ]
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/HBaseExecutor.java#L113-L130
Stratio/stratio-cassandra
src/java/org/apache/cassandra/cql3/KeyspaceElementName.java
KeyspaceElementName.toInternalName
protected static String toInternalName(String name, boolean keepCase) { """ Converts the specified name into the name used internally. @param name the name @param keepCase <code>true</code> if the case must be kept, <code>false</code> otherwise. @return the name used internally. """ return keepCas...
java
protected static String toInternalName(String name, boolean keepCase) { return keepCase ? name : name.toLowerCase(Locale.US); }
[ "protected", "static", "String", "toInternalName", "(", "String", "name", ",", "boolean", "keepCase", ")", "{", "return", "keepCase", "?", "name", ":", "name", ".", "toLowerCase", "(", "Locale", ".", "US", ")", ";", "}" ]
Converts the specified name into the name used internally. @param name the name @param keepCase <code>true</code> if the case must be kept, <code>false</code> otherwise. @return the name used internally.
[ "Converts", "the", "specified", "name", "into", "the", "name", "used", "internally", "." ]
train
https://github.com/Stratio/stratio-cassandra/blob/f6416b43ad5309083349ad56266450fa8c6a2106/src/java/org/apache/cassandra/cql3/KeyspaceElementName.java#L64-L67
eduarddrenth/ConfigurableReports
src/main/java/com/vectorprint/report/itext/EventHelper.java
EventHelper.onCloseDocument
@Override public void onCloseDocument(PdfWriter writer, Document document) { """ calls {@link #printTotalPages(com.itextpdf.text.pdf.PdfTemplate, float, float) } with {@link #PAGEFOOTERSTYLE a font from setup}, document.right() and the calculated bottom of the footertable. Clears the layermanager. When appli...
java
@Override public void onCloseDocument(PdfWriter writer, Document document) { super.onCloseDocument(writer, document); if (getSettings().getBooleanProperty(Boolean.FALSE, ReportConstants.PRINTFOOTER)) { try { printTotalPages(template, document.right(), footerBottom); } catch ...
[ "@", "Override", "public", "void", "onCloseDocument", "(", "PdfWriter", "writer", ",", "Document", "document", ")", "{", "super", ".", "onCloseDocument", "(", "writer", ",", "document", ")", ";", "if", "(", "getSettings", "(", ")", ".", "getBooleanProperty", ...
calls {@link #printTotalPages(com.itextpdf.text.pdf.PdfTemplate, float, float) } with {@link #PAGEFOOTERSTYLE a font from setup}, document.right() and the calculated bottom of the footertable. Clears the layermanager. When applicable calls {@link #printFailureHeader(com.itextpdf.text.pdf.PdfTemplate, float, float) } ...
[ "calls", "{", "@link", "#printTotalPages", "(", "com", ".", "itextpdf", ".", "text", ".", "pdf", ".", "PdfTemplate", "float", "float", ")", "}", "with", "{", "@link", "#PAGEFOOTERSTYLE", "a", "font", "from", "setup", "}", "document", ".", "right", "()", ...
train
https://github.com/eduarddrenth/ConfigurableReports/blob/b5fb7a89e16d9b35f557f3bf620594f821fa1552/src/main/java/com/vectorprint/report/itext/EventHelper.java#L310-L323
Drivemode/TypefaceHelper
TypefaceHelper/src/main/java/com/drivemode/android/typeface/TypefaceHelper.java
TypefaceHelper.setTypeface
public <V extends ViewGroup> void setTypeface(V viewGroup, String typefaceName, int style) { """ Set the typeface to the all text views belong to the view group. Note that this method recursively trace the child view groups and set typeface for the text views. @param viewGroup the view group that contains text v...
java
public <V extends ViewGroup> void setTypeface(V viewGroup, String typefaceName, int style) { int count = viewGroup.getChildCount(); for (int i = 0; i < count; i++) { View child = viewGroup.getChildAt(i); if (child instanceof ViewGroup) { setTypeface((ViewGroup) child, typefaceName, style); continue; ...
[ "public", "<", "V", "extends", "ViewGroup", ">", "void", "setTypeface", "(", "V", "viewGroup", ",", "String", "typefaceName", ",", "int", "style", ")", "{", "int", "count", "=", "viewGroup", ".", "getChildCount", "(", ")", ";", "for", "(", "int", "i", ...
Set the typeface to the all text views belong to the view group. Note that this method recursively trace the child view groups and set typeface for the text views. @param viewGroup the view group that contains text views. @param typefaceName typeface name. @param style the typeface style. @param <V> view group paramete...
[ "Set", "the", "typeface", "to", "the", "all", "text", "views", "belong", "to", "the", "view", "group", ".", "Note", "that", "this", "method", "recursively", "trace", "the", "child", "view", "groups", "and", "set", "typeface", "for", "the", "text", "views",...
train
https://github.com/Drivemode/TypefaceHelper/blob/86bef9ce16b9626b7076559e846db1b9f043c008/TypefaceHelper/src/main/java/com/drivemode/android/typeface/TypefaceHelper.java#L163-L176
Abnaxos/markdown-doclet
doclet/jdk8/src/main/java/ch/raffael/mddoclet/mdtaglet/MarkdownTaglets.java
MarkdownTaglets.handleOptions
public boolean handleOptions(String[] options, DocErrorReporter errorReporter) { """ # Handle the (potential) markdown options. @param options the options @param errorReporter the error reporter @return {@code true} if a markdown option has been found, otherwise false @see MarkdownTaglet#OPT_MD_TAGLET_OPTI...
java
public boolean handleOptions(String[] options, DocErrorReporter errorReporter) { final String potentialMarkdownTagletOption = options[0]; if( potentialMarkdownTagletOption.startsWith(OPT_MD_TAGLET_OPTION_PREFIX) ) { storeMarkdownTagletOption(potentialMarkdownTagletOption, options[1]); ...
[ "public", "boolean", "handleOptions", "(", "String", "[", "]", "options", ",", "DocErrorReporter", "errorReporter", ")", "{", "final", "String", "potentialMarkdownTagletOption", "=", "options", "[", "0", "]", ";", "if", "(", "potentialMarkdownTagletOption", ".", "...
# Handle the (potential) markdown options. @param options the options @param errorReporter the error reporter @return {@code true} if a markdown option has been found, otherwise false @see MarkdownTaglet#OPT_MD_TAGLET_OPTION_PREFIX @see #optionLengths(String)
[ "#", "Handle", "the", "(", "potential", ")", "markdown", "options", "." ]
train
https://github.com/Abnaxos/markdown-doclet/blob/e98a9630206fc9c8d813cf2349ff594be8630054/doclet/jdk8/src/main/java/ch/raffael/mddoclet/mdtaglet/MarkdownTaglets.java#L121-L130
alkacon/opencms-core
src-gwt/org/opencms/gwt/client/ui/replace/CmsReplaceDialog.java
CmsReplaceDialog.startLoadingAnimation
private void startLoadingAnimation(final String msg, int delayMillis) { """ Starts the loading animation.<p> Used while client is loading files from hard disk into memory.<p> @param msg the message that should be displayed below the loading animation (can also be HTML as String) @param delayMillis the delay...
java
private void startLoadingAnimation(final String msg, int delayMillis) { m_loadingTimer = new Timer() { @Override public void run() { m_mainPanel.showLoadingAnimation(msg); } }; if (delayMillis > 0) { m_loadingTimer.sch...
[ "private", "void", "startLoadingAnimation", "(", "final", "String", "msg", ",", "int", "delayMillis", ")", "{", "m_loadingTimer", "=", "new", "Timer", "(", ")", "{", "@", "Override", "public", "void", "run", "(", ")", "{", "m_mainPanel", ".", "showLoadingAni...
Starts the loading animation.<p> Used while client is loading files from hard disk into memory.<p> @param msg the message that should be displayed below the loading animation (can also be HTML as String) @param delayMillis the delay to start the animation with
[ "Starts", "the", "loading", "animation", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/gwt/client/ui/replace/CmsReplaceDialog.java#L638-L653
neo4j-contrib/neo4j-apoc-procedures
src/main/java/apoc/algo/CoreGraphAlgorithms.java
CoreGraphAlgorithms.encode
private int encode(int x, int y, int r) { """ java code adapted from C code in the paper "Encoding and decoding the Hilbert order" by Xian Lu and Gunther Schrack, published in Software: Practice and Experience Vol. 26 pp 1335-46 (1996). """ int mask = (1 << r) - 1; int hodd = 0; int he...
java
private int encode(int x, int y, int r) { int mask = (1 << r) - 1; int hodd = 0; int heven = x ^ y; int notx = ~x & mask; int noty = ~y & mask; int temp = notx ^ y; int v0 = 0, v1 = 0; for (int k = 1; k < r; k++) { v1 = ((v1 & heven) | ((v0 ^...
[ "private", "int", "encode", "(", "int", "x", ",", "int", "y", ",", "int", "r", ")", "{", "int", "mask", "=", "(", "1", "<<", "r", ")", "-", "1", ";", "int", "hodd", "=", "0", ";", "int", "heven", "=", "x", "^", "y", ";", "int", "notx", "=...
java code adapted from C code in the paper "Encoding and decoding the Hilbert order" by Xian Lu and Gunther Schrack, published in Software: Practice and Experience Vol. 26 pp 1335-46 (1996).
[ "java", "code", "adapted", "from", "C", "code", "in", "the", "paper", "Encoding", "and", "decoding", "the", "Hilbert", "order", "by", "Xian", "Lu", "and", "Gunther", "Schrack", "published", "in", "Software", ":", "Practice", "and", "Experience", "Vol", ".", ...
train
https://github.com/neo4j-contrib/neo4j-apoc-procedures/blob/e8386975d1c512c0e4388a1a61f5496121c04f86/src/main/java/apoc/algo/CoreGraphAlgorithms.java#L63-L80
phax/ph-commons
ph-cli/src/main/java/com/helger/cli/HelpFormatter.java
HelpFormatter.printHelp
public void printHelp (@Nonnull @Nonempty final String sCmdLineSyntax, @Nonnull final Options aOptions) { """ Print the help for <code>options</code> with the specified command line syntax. This method prints help information to System.out. @param sCmdLineSyntax the syntax for this application @param aOption...
java
public void printHelp (@Nonnull @Nonempty final String sCmdLineSyntax, @Nonnull final Options aOptions) { printHelp (getWidth (), sCmdLineSyntax, null, aOptions, null, false); }
[ "public", "void", "printHelp", "(", "@", "Nonnull", "@", "Nonempty", "final", "String", "sCmdLineSyntax", ",", "@", "Nonnull", "final", "Options", "aOptions", ")", "{", "printHelp", "(", "getWidth", "(", ")", ",", "sCmdLineSyntax", ",", "null", ",", "aOption...
Print the help for <code>options</code> with the specified command line syntax. This method prints help information to System.out. @param sCmdLineSyntax the syntax for this application @param aOptions the Options instance
[ "Print", "the", "help", "for", "<code", ">", "options<", "/", "code", ">", "with", "the", "specified", "command", "line", "syntax", ".", "This", "method", "prints", "help", "information", "to", "System", ".", "out", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-cli/src/main/java/com/helger/cli/HelpFormatter.java#L397-L400
w3c/epubcheck
src/main/java/com/adobe/epubcheck/vocab/VocabUtil.java
VocabUtil.parsePropertyList
public static Set<Property> parsePropertyList(String value, Map<String, ? extends Vocab> vocabs, ValidationContext context, EPUBLocation location) { """ Parses a space-separated list of property values, and report validation errors on the fly. @param value the value to parse. @param vocabs a map of pr...
java
public static Set<Property> parsePropertyList(String value, Map<String, ? extends Vocab> vocabs, ValidationContext context, EPUBLocation location) { return parseProperties(value, vocabs, true, context, location); }
[ "public", "static", "Set", "<", "Property", ">", "parsePropertyList", "(", "String", "value", ",", "Map", "<", "String", ",", "?", "extends", "Vocab", ">", "vocabs", ",", "ValidationContext", "context", ",", "EPUBLocation", "location", ")", "{", "return", "p...
Parses a space-separated list of property values, and report validation errors on the fly. @param value the value to parse. @param vocabs a map of prefix to vocabularies. @param context the validation context (report, locale, path, etc). @param location the location in the validated file. @return
[ "Parses", "a", "space", "-", "separated", "list", "of", "property", "values", "and", "report", "validation", "errors", "on", "the", "fly", "." ]
train
https://github.com/w3c/epubcheck/blob/4d5a24d9f2878a2a5497eb11c036cc18fe2c0a78/src/main/java/com/adobe/epubcheck/vocab/VocabUtil.java#L76-L80
looly/hutool
hutool-poi/src/main/java/cn/hutool/poi/excel/ExcelUtil.java
ExcelUtil.read07BySax
public static Excel07SaxReader read07BySax(File file, int sheetIndex, RowHandler rowHandler) { """ Sax方式读取Excel07 @param file 文件 @param sheetIndex Sheet索引,-1表示全部Sheet, 0表示第一个Sheet @param rowHandler 行处理器 @return {@link Excel07SaxReader} @since 3.2.0 """ try { return new Excel07SaxReader(rowHandler...
java
public static Excel07SaxReader read07BySax(File file, int sheetIndex, RowHandler rowHandler) { try { return new Excel07SaxReader(rowHandler).read(file, sheetIndex); } catch (NoClassDefFoundError e) { throw new DependencyException(ObjectUtil.defaultIfNull(e.getCause(), e), PoiChecker.NO_POI_ERROR_MSG); ...
[ "public", "static", "Excel07SaxReader", "read07BySax", "(", "File", "file", ",", "int", "sheetIndex", ",", "RowHandler", "rowHandler", ")", "{", "try", "{", "return", "new", "Excel07SaxReader", "(", "rowHandler", ")", ".", "read", "(", "file", ",", "sheetIndex...
Sax方式读取Excel07 @param file 文件 @param sheetIndex Sheet索引,-1表示全部Sheet, 0表示第一个Sheet @param rowHandler 行处理器 @return {@link Excel07SaxReader} @since 3.2.0
[ "Sax方式读取Excel07" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-poi/src/main/java/cn/hutool/poi/excel/ExcelUtil.java#L106-L112
gallandarakhneorg/afc
core/vmutils/src/main/java/org/arakhne/afc/vmutil/locale/Locale.java
Locale.getString
@Pure public static String getString(ClassLoader classLoader, Class<?> resource, String key, Object... params) { """ Replies the text that corresponds to the specified resource. @param classLoader is the class loader to use. @param resource is the name of the resource file @param key is the name of the resou...
java
@Pure public static String getString(ClassLoader classLoader, Class<?> resource, String key, Object... params) { Class<?> res = detectResourceClass(resource); if (res == null) { return key; } String val = getStringWithDefaultFrom(classLoader, res.getCanonicalName(), key, null, params); if (val == null && ...
[ "@", "Pure", "public", "static", "String", "getString", "(", "ClassLoader", "classLoader", ",", "Class", "<", "?", ">", "resource", ",", "String", "key", ",", "Object", "...", "params", ")", "{", "Class", "<", "?", ">", "res", "=", "detectResourceClass", ...
Replies the text that corresponds to the specified resource. @param classLoader is the class loader to use. @param resource is the name of the resource file @param key is the name of the resource into the specified file @param params is the the list of parameters which will replaces the <code>#1</code>, <code>#2</code...
[ "Replies", "the", "text", "that", "corresponds", "to", "the", "specified", "resource", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/vmutils/src/main/java/org/arakhne/afc/vmutil/locale/Locale.java#L276-L296
ixa-ehu/ixa-pipe-ml
src/main/java/eus/ixa/ixa/pipe/ml/utils/IOUtils.java
IOUtils.readFileIntoMarkableStreamFactory
public static ObjectStream<String> readFileIntoMarkableStreamFactory( final String infile) { """ Read the file into an {@code ObjectStream}. @param infile the string pointing to the file @return the object stream """ InputStreamFactory inputStreamFactory = null; try { inputStreamFacto...
java
public static ObjectStream<String> readFileIntoMarkableStreamFactory( final String infile) { InputStreamFactory inputStreamFactory = null; try { inputStreamFactory = new MarkableFileInputStreamFactory(new File(infile)); } catch (final FileNotFoundException e) { e.printStackTrace(); } ...
[ "public", "static", "ObjectStream", "<", "String", ">", "readFileIntoMarkableStreamFactory", "(", "final", "String", "infile", ")", "{", "InputStreamFactory", "inputStreamFactory", "=", "null", ";", "try", "{", "inputStreamFactory", "=", "new", "MarkableFileInputStreamF...
Read the file into an {@code ObjectStream}. @param infile the string pointing to the file @return the object stream
[ "Read", "the", "file", "into", "an", "{", "@code", "ObjectStream", "}", "." ]
train
https://github.com/ixa-ehu/ixa-pipe-ml/blob/c817fa1e40e96ed15fc79d22c3a7c25f1a40d172/src/main/java/eus/ixa/ixa/pipe/ml/utils/IOUtils.java#L225-L241
apache/incubator-gobblin
gobblin-utility/src/main/java/org/apache/gobblin/util/AvroUtils.java
AvroUtils.serializeAsPath
public static Path serializeAsPath(GenericRecord record, boolean includeFieldNames, boolean replacePathSeparators) { """ Serialize a generic record as a relative {@link Path}. Useful for converting {@link GenericRecord} type keys into file system locations. For example {field1=v1, field2=v2} returns field1=v1/fie...
java
public static Path serializeAsPath(GenericRecord record, boolean includeFieldNames, boolean replacePathSeparators) { if (record == null) { return new Path(""); } List<String> tokens = Lists.newArrayList(); for (Schema.Field field : record.getSchema().getFields()) { String sanitizedName = Had...
[ "public", "static", "Path", "serializeAsPath", "(", "GenericRecord", "record", ",", "boolean", "includeFieldNames", ",", "boolean", "replacePathSeparators", ")", "{", "if", "(", "record", "==", "null", ")", "{", "return", "new", "Path", "(", "\"\"", ")", ";", ...
Serialize a generic record as a relative {@link Path}. Useful for converting {@link GenericRecord} type keys into file system locations. For example {field1=v1, field2=v2} returns field1=v1/field2=v2 if includeFieldNames is true, or v1/v2 if it is false. Illegal HDFS tokens such as ':' and '\\' will be replaced with '_...
[ "Serialize", "a", "generic", "record", "as", "a", "relative", "{", "@link", "Path", "}", ".", "Useful", "for", "converting", "{", "@link", "GenericRecord", "}", "type", "keys", "into", "file", "system", "locations", ".", "For", "example", "{", "field1", "=...
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-utility/src/main/java/org/apache/gobblin/util/AvroUtils.java#L816-L835
Azure/azure-sdk-for-java
compute/resource-manager/v2017_03_30/src/main/java/com/microsoft/azure/management/compute/v2017_03_30/implementation/VirtualMachineScaleSetsInner.java
VirtualMachineScaleSetsInner.beginUpdateInstances
public OperationStatusResponseInner beginUpdateInstances(String resourceGroupName, String vmScaleSetName, List<String> instanceIds) { """ Upgrades one or more virtual machines to the latest SKU set in the VM scale set model. @param resourceGroupName The name of the resource group. @param vmScaleSetName The nam...
java
public OperationStatusResponseInner beginUpdateInstances(String resourceGroupName, String vmScaleSetName, List<String> instanceIds) { return beginUpdateInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().single().body(); }
[ "public", "OperationStatusResponseInner", "beginUpdateInstances", "(", "String", "resourceGroupName", ",", "String", "vmScaleSetName", ",", "List", "<", "String", ">", "instanceIds", ")", "{", "return", "beginUpdateInstancesWithServiceResponseAsync", "(", "resourceGroupName",...
Upgrades one or more virtual machines to the latest SKU set in the VM scale set model. @param resourceGroupName The name of the resource group. @param vmScaleSetName The name of the VM scale set. @param instanceIds The virtual machine scale set instance ids. @throws IllegalArgumentException thrown if parameters fail t...
[ "Upgrades", "one", "or", "more", "virtual", "machines", "to", "the", "latest", "SKU", "set", "in", "the", "VM", "scale", "set", "model", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/compute/resource-manager/v2017_03_30/src/main/java/com/microsoft/azure/management/compute/v2017_03_30/implementation/VirtualMachineScaleSetsInner.java#L2793-L2795
alkacon/opencms-core
src/org/opencms/search/CmsVfsIndexer.java
CmsVfsIndexer.addResourceToUpdateData
protected void addResourceToUpdateData(CmsPublishedResource pubRes, CmsSearchIndexUpdateData updateData) { """ Adds a given published resource to the provided search index update data.<p> This method decides if the resource has to be included in the "update" or "delete" list.<p> @param pubRes the published r...
java
protected void addResourceToUpdateData(CmsPublishedResource pubRes, CmsSearchIndexUpdateData updateData) { if (pubRes.getState().isDeleted()) { // deleted resource just needs to be removed updateData.addResourceToDelete(pubRes); } else if (pubRes.getState().isNew() || pubRes.get...
[ "protected", "void", "addResourceToUpdateData", "(", "CmsPublishedResource", "pubRes", ",", "CmsSearchIndexUpdateData", "updateData", ")", "{", "if", "(", "pubRes", ".", "getState", "(", ")", ".", "isDeleted", "(", ")", ")", "{", "// deleted resource just needs to be ...
Adds a given published resource to the provided search index update data.<p> This method decides if the resource has to be included in the "update" or "delete" list.<p> @param pubRes the published resource to add @param updateData the search index update data to add the resource to
[ "Adds", "a", "given", "published", "resource", "to", "the", "provided", "search", "index", "update", "data", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/search/CmsVfsIndexer.java#L288-L296
mlhartme/sushi
src/main/java/net/oneandone/sushi/util/IntBitRelation.java
IntBitRelation.addRightWhere
public void addRightWhere(int left, IntBitSet result) { """ Returns all right values from the relation that have the left value specified. @param left left value required @param result where to return the result """ if (line[left] != null) { result.addAll(line[left]); } ...
java
public void addRightWhere(int left, IntBitSet result) { if (line[left] != null) { result.addAll(line[left]); } }
[ "public", "void", "addRightWhere", "(", "int", "left", ",", "IntBitSet", "result", ")", "{", "if", "(", "line", "[", "left", "]", "!=", "null", ")", "{", "result", ".", "addAll", "(", "line", "[", "left", "]", ")", ";", "}", "}" ]
Returns all right values from the relation that have the left value specified. @param left left value required @param result where to return the result
[ "Returns", "all", "right", "values", "from", "the", "relation", "that", "have", "the", "left", "value", "specified", "." ]
train
https://github.com/mlhartme/sushi/blob/4af33414b04bd58584d4febe5cc63ef6c7346a75/src/main/java/net/oneandone/sushi/util/IntBitRelation.java#L112-L116
duracloud/duracloud
chunk/src/main/java/org/duracloud/chunk/util/ChunksManifestVerifier.java
ChunksManifestVerifier.verifyAllChunks
public Results verifyAllChunks(String spaceId, ChunksManifest manifest) { """ Verifies the bytes and checksums of the chunks specified in the manifest match what is in DuraCloud and returns a listing of the chunks with a flag indicating whether the check was successful as well as an error message if it was not....
java
public Results verifyAllChunks(String spaceId, ChunksManifest manifest) { Results results = new Results(); for (ManifestEntry entry : manifest.getEntries()) { String chunkId = entry.getChunkId(); String checksum = entry.getChunkMD5(); long byteSize = entry.getByteSiz...
[ "public", "Results", "verifyAllChunks", "(", "String", "spaceId", ",", "ChunksManifest", "manifest", ")", "{", "Results", "results", "=", "new", "Results", "(", ")", ";", "for", "(", "ManifestEntry", "entry", ":", "manifest", ".", "getEntries", "(", ")", ")"...
Verifies the bytes and checksums of the chunks specified in the manifest match what is in DuraCloud and returns a listing of the chunks with a flag indicating whether the check was successful as well as an error message if it was not. You can use the result.isSuccess() method as a shortcut for determining whether all t...
[ "Verifies", "the", "bytes", "and", "checksums", "of", "the", "chunks", "specified", "in", "the", "manifest", "match", "what", "is", "in", "DuraCloud", "and", "returns", "a", "listing", "of", "the", "chunks", "with", "a", "flag", "indicating", "whether", "the...
train
https://github.com/duracloud/duracloud/blob/dc4f3a1716d43543cc3b2e1880605f9389849b66/chunk/src/main/java/org/duracloud/chunk/util/ChunksManifestVerifier.java#L50-L96
progolden/vraptor-boilerplate
vraptor-boilerplate-usercontrol/src/main/java/br/com/caelum/vraptor/boilerplate/user/UserBS.java
UserBS.resetPassword
public boolean resetPassword(String password, String token) { """ Trocar o password do usuário. @param password Novo password @param token Token de identificação do usuário. @return boolean true Troca de password do usuário ocorreu com sucesso. """ UserRecoverRequest req = this.retrieveRecoverRequest(...
java
public boolean resetPassword(String password, String token) { UserRecoverRequest req = this.retrieveRecoverRequest(token); if (req == null) return false; User user = req.getUser(); user.setPassword(CryptManager.passwordHash(password)); this.dao.persist(user); req.setRecover(new Date()); req.setRecoverI...
[ "public", "boolean", "resetPassword", "(", "String", "password", ",", "String", "token", ")", "{", "UserRecoverRequest", "req", "=", "this", ".", "retrieveRecoverRequest", "(", "token", ")", ";", "if", "(", "req", "==", "null", ")", "return", "false", ";", ...
Trocar o password do usuário. @param password Novo password @param token Token de identificação do usuário. @return boolean true Troca de password do usuário ocorreu com sucesso.
[ "Trocar", "o", "password", "do", "usuário", "." ]
train
https://github.com/progolden/vraptor-boilerplate/blob/3edf45cc0dc5aec61b16ca326b4d72c82d1d3e07/vraptor-boilerplate-usercontrol/src/main/java/br/com/caelum/vraptor/boilerplate/user/UserBS.java#L99-L111
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/nephele/managementgraph/ManagementGraphIterator.java
ManagementGraphIterator.currentGateLeadsToOtherStage
private boolean currentGateLeadsToOtherStage(final TraversalEntry te, final boolean forward) { """ Checks if the current gate leads to another stage or not. @param te the current traversal entry @param forward <code>true</code> if the graph should be traversed in correct order, <code>false</code> to traverse...
java
private boolean currentGateLeadsToOtherStage(final TraversalEntry te, final boolean forward) { final ManagementGroupVertex groupVertex = te.getManagementVertex().getGroupVertex(); if (forward) { if (te.getCurrentGate() >= groupVertex.getNumberOfForwardEdges()) { return false; } final ManagementGrou...
[ "private", "boolean", "currentGateLeadsToOtherStage", "(", "final", "TraversalEntry", "te", ",", "final", "boolean", "forward", ")", "{", "final", "ManagementGroupVertex", "groupVertex", "=", "te", ".", "getManagementVertex", "(", ")", ".", "getGroupVertex", "(", ")...
Checks if the current gate leads to another stage or not. @param te the current traversal entry @param forward <code>true</code> if the graph should be traversed in correct order, <code>false</code> to traverse it in reverse order @return <code>true</code> if current gate leads to another stage, otherwise <code>false<...
[ "Checks", "if", "the", "current", "gate", "leads", "to", "another", "stage", "or", "not", "." ]
train
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/managementgraph/ManagementGraphIterator.java#L414-L442
Azure/azure-sdk-for-java
network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/VirtualNetworkGatewaysInner.java
VirtualNetworkGatewaysInner.generatevpnclientpackageAsync
public Observable<String> generatevpnclientpackageAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParameters parameters) { """ Generates VPN client package for P2S client of the virtual network gateway in the specified resource group. @param resourceGroupName The name of the resource ...
java
public Observable<String> generatevpnclientpackageAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParameters parameters) { return generatevpnclientpackageWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, parameters).map(new Func1<ServiceResponse<String>, String>()...
[ "public", "Observable", "<", "String", ">", "generatevpnclientpackageAsync", "(", "String", "resourceGroupName", ",", "String", "virtualNetworkGatewayName", ",", "VpnClientParameters", "parameters", ")", "{", "return", "generatevpnclientpackageWithServiceResponseAsync", "(", ...
Generates VPN client package for P2S client of the virtual network gateway in the specified resource group. @param resourceGroupName The name of the resource group. @param virtualNetworkGatewayName The name of the virtual network gateway. @param parameters Parameters supplied to the generate virtual network gateway VP...
[ "Generates", "VPN", "client", "package", "for", "P2S", "client", "of", "the", "virtual", "network", "gateway", "in", "the", "specified", "resource", "group", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/VirtualNetworkGatewaysInner.java#L1492-L1499
ocelotds/ocelot
ocelot-core/src/main/java/org/ocelotds/messaging/JsTopicInterceptor.java
JsTopicInterceptor.getDynamicTopic
String getDynamicTopic(Method method, Object[] parameters) { """ Get dynamic topicname from parameter annotated @JsTopicName @param method @param parameters @return """ int idx = 0; // synchronise the two arrays, array of parameter and array of annotations Annotation[][] parametersAnnotations = meth...
java
String getDynamicTopic(Method method, Object[] parameters) { int idx = 0; // synchronise the two arrays, array of parameter and array of annotations Annotation[][] parametersAnnotations = method.getParameterAnnotations(); for (Annotation[] parameterAnnotations : parametersAnnotations) { // for each parameter ...
[ "String", "getDynamicTopic", "(", "Method", "method", ",", "Object", "[", "]", "parameters", ")", "{", "int", "idx", "=", "0", ";", "// synchronise the two arrays, array of parameter and array of annotations\r", "Annotation", "[", "]", "[", "]", "parametersAnnotations",...
Get dynamic topicname from parameter annotated @JsTopicName @param method @param parameters @return
[ "Get", "dynamic", "topicname", "from", "parameter", "annotated", "@JsTopicName" ]
train
https://github.com/ocelotds/ocelot/blob/5f0ac37afd8fa4dc9f7234a2aac8abbb522128e7/ocelot-core/src/main/java/org/ocelotds/messaging/JsTopicInterceptor.java#L82-L93
nobuoka/android-lib-ZXingCaptureActivity
src/main/java/info/vividcode/android/zxing/CaptureActivityIntents.java
CaptureActivityIntents.setPromptMessage
public static void setPromptMessage(Intent intent, String message) { """ Set prompt message onto {@code Intent}. @param intent Target intent. @param message Prompt message displayed on activity. """ intent.putExtra(Intents.Scan.PROMPT_MESSAGE, message); }
java
public static void setPromptMessage(Intent intent, String message) { intent.putExtra(Intents.Scan.PROMPT_MESSAGE, message); }
[ "public", "static", "void", "setPromptMessage", "(", "Intent", "intent", ",", "String", "message", ")", "{", "intent", ".", "putExtra", "(", "Intents", ".", "Scan", ".", "PROMPT_MESSAGE", ",", "message", ")", ";", "}" ]
Set prompt message onto {@code Intent}. @param intent Target intent. @param message Prompt message displayed on activity.
[ "Set", "prompt", "message", "onto", "{" ]
train
https://github.com/nobuoka/android-lib-ZXingCaptureActivity/blob/17aaa7cf75520d3f2e03db9796b7e8c1d1f1b1e6/src/main/java/info/vividcode/android/zxing/CaptureActivityIntents.java#L144-L146
lessthanoptimal/ddogleg
src/org/ddogleg/optimization/quasinewton/SearchInterpolate.java
SearchInterpolate.quadratic2
public static double quadratic2( double g0 , double x0 , double g1 , double x1 ) { """ <p> Quadratic interpolation using two derivatives. </p> @param g0 Derivative f'(x0) @param x0 First sample point @param g1 Derivative f'(x1) @param x1 Second sample point @return Interpolated point """ return x0...
java
public static double quadratic2( double g0 , double x0 , double g1 , double x1 ) { return x0 + (g0/(g0-g1))*(x1-x0); }
[ "public", "static", "double", "quadratic2", "(", "double", "g0", ",", "double", "x0", ",", "double", "g1", ",", "double", "x1", ")", "{", "return", "x0", "+", "(", "g0", "/", "(", "g0", "-", "g1", ")", ")", "*", "(", "x1", "-", "x0", ")", ";", ...
<p> Quadratic interpolation using two derivatives. </p> @param g0 Derivative f'(x0) @param x0 First sample point @param g1 Derivative f'(x1) @param x1 Second sample point @return Interpolated point
[ "<p", ">", "Quadratic", "interpolation", "using", "two", "derivatives", ".", "<", "/", "p", ">" ]
train
https://github.com/lessthanoptimal/ddogleg/blob/3786bf448ba23d0e04962dd08c34fa68de276029/src/org/ddogleg/optimization/quasinewton/SearchInterpolate.java#L69-L72
phax/ph-commons
ph-json/src/main/java/com/helger/json/serialize/JsonReader.java
JsonReader.readFromFile
@Nullable public static IJson readFromFile (@Nonnull final File aFile, @Nonnull final Charset aFallbackCharset) { """ Read the Json from the passed File. @param aFile The file containing the Json to be parsed. May not be <code>null</code>. @param aFallbackCharset The charset to be used in case no is BOM i...
java
@Nullable public static IJson readFromFile (@Nonnull final File aFile, @Nonnull final Charset aFallbackCharset) { return readFromFile (aFile, aFallbackCharset, null); }
[ "@", "Nullable", "public", "static", "IJson", "readFromFile", "(", "@", "Nonnull", "final", "File", "aFile", ",", "@", "Nonnull", "final", "Charset", "aFallbackCharset", ")", "{", "return", "readFromFile", "(", "aFile", ",", "aFallbackCharset", ",", "null", ")...
Read the Json from the passed File. @param aFile The file containing the Json to be parsed. May not be <code>null</code>. @param aFallbackCharset The charset to be used in case no is BOM is present. May not be <code>null</code>. @return <code>null</code> if reading failed, the Json declarations otherwise.
[ "Read", "the", "Json", "from", "the", "passed", "File", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-json/src/main/java/com/helger/json/serialize/JsonReader.java#L487-L491
facebookarchive/hadoop-20
src/contrib/raid/src/java/org/apache/hadoop/raid/DistRaid.java
DistRaid.createJobConf
private static JobConf createJobConf(Configuration conf) { """ create new job conf based on configuration passed. @param conf @return """ JobConf jobconf = new JobConf(conf, DistRaid.class); jobName = NAME + " " + dateForm.format(new Date(RaidNode.now())); jobconf.setUser(RaidNode.JOBUSER); ...
java
private static JobConf createJobConf(Configuration conf) { JobConf jobconf = new JobConf(conf, DistRaid.class); jobName = NAME + " " + dateForm.format(new Date(RaidNode.now())); jobconf.setUser(RaidNode.JOBUSER); jobconf.setJobName(jobName); jobconf.setMapSpeculativeExecution(false); RaidUtils.p...
[ "private", "static", "JobConf", "createJobConf", "(", "Configuration", "conf", ")", "{", "JobConf", "jobconf", "=", "new", "JobConf", "(", "conf", ",", "DistRaid", ".", "class", ")", ";", "jobName", "=", "NAME", "+", "\" \"", "+", "dateForm", ".", "format"...
create new job conf based on configuration passed. @param conf @return
[ "create", "new", "job", "conf", "based", "on", "configuration", "passed", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/raid/src/java/org/apache/hadoop/raid/DistRaid.java#L376-L392
Impetus/Kundera
src/kundera-cassandra/cassandra-core/src/main/java/com/impetus/client/cassandra/schemamanager/CassandraValidationClassMapper.java
CassandraValidationClassMapper.getValueTypeName
public static String getValueTypeName(Class<?> dataType, List<Class<?>> genericClasses, boolean isCql3Enabled) throws SyntaxException, ConfigurationException, IllegalArgumentException, IllegalAccessException, NoSuchFieldException, SecurityException { """ Gets the value type name. @param ...
java
public static String getValueTypeName(Class<?> dataType, List<Class<?>> genericClasses, boolean isCql3Enabled) throws SyntaxException, ConfigurationException, IllegalArgumentException, IllegalAccessException, NoSuchFieldException, SecurityException { String valueType; Class<...
[ "public", "static", "String", "getValueTypeName", "(", "Class", "<", "?", ">", "dataType", ",", "List", "<", "Class", "<", "?", ">", ">", "genericClasses", ",", "boolean", "isCql3Enabled", ")", "throws", "SyntaxException", ",", "ConfigurationException", ",", "...
Gets the value type name. @param dataType the data type @param genericClasses the generic classes @param isCql3Enabled the is cql3 enabled @return the value type name @throws SyntaxException the syntax exception @throws ConfigurationException the configuration exception @throws IllegalArgumentException the illegal arg...
[ "Gets", "the", "value", "type", "name", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/kundera-cassandra/cassandra-core/src/main/java/com/impetus/client/cassandra/schemamanager/CassandraValidationClassMapper.java#L264-L303
eduarddrenth/ConfigurableReports
src/main/java/com/vectorprint/report/itext/EventHelper.java
EventHelper.addDelayedStyler
public void addDelayedStyler(String tag, Collection<Advanced> advanced, Chunk chunk, Image img) { """ add a styler that will do its styling in {@link #onGenericTag(com.itextpdf.text.pdf.PdfWriter, com.itextpdf.text.Document, com.itextpdf.text.Rectangle, java.lang.String)}. @param tag @param advanced @param c...
java
public void addDelayedStyler(String tag, Collection<Advanced> advanced, Chunk chunk, Image img) { doOnGenericTag.put(tag, advanced); if (chunk != null && chunk.getImage() != null) { imageChunks.put(tag, chunk); } if (img != null) { rectangles.put(tag, img); } }
[ "public", "void", "addDelayedStyler", "(", "String", "tag", ",", "Collection", "<", "Advanced", ">", "advanced", ",", "Chunk", "chunk", ",", "Image", "img", ")", "{", "doOnGenericTag", ".", "put", "(", "tag", ",", "advanced", ")", ";", "if", "(", "chunk"...
add a styler that will do its styling in {@link #onGenericTag(com.itextpdf.text.pdf.PdfWriter, com.itextpdf.text.Document, com.itextpdf.text.Rectangle, java.lang.String)}. @param tag @param advanced @param chunk used when debugging, for placing debug info at the right position in the pdf @param img the value of rect @...
[ "add", "a", "styler", "that", "will", "do", "its", "styling", "in", "{", "@link", "#onGenericTag", "(", "com", ".", "itextpdf", ".", "text", ".", "pdf", ".", "PdfWriter", "com", ".", "itextpdf", ".", "text", ".", "Document", "com", ".", "itextpdf", "."...
train
https://github.com/eduarddrenth/ConfigurableReports/blob/b5fb7a89e16d9b35f557f3bf620594f821fa1552/src/main/java/com/vectorprint/report/itext/EventHelper.java#L586-L594
Impetus/Kundera
src/kundera-mongo/src/main/java/com/impetus/client/mongodb/utils/MongoDBUtils.java
MongoDBUtils.populateCompoundKey
public static void populateCompoundKey(DBObject dbObj, EntityMetadata m, MetamodelImpl metaModel, Object id) { """ Populate compound key. @param dbObj the db obj @param m the m @param metaModel the meta model @param id the id """ EmbeddableType compoundKey = metaModel.embeddable(m.getIdAttrib...
java
public static void populateCompoundKey(DBObject dbObj, EntityMetadata m, MetamodelImpl metaModel, Object id) { EmbeddableType compoundKey = metaModel.embeddable(m.getIdAttribute().getBindableJavaType()); // Iterator<Attribute> iter = compoundKey.getAttributes().iterator(); BasicDBObject comp...
[ "public", "static", "void", "populateCompoundKey", "(", "DBObject", "dbObj", ",", "EntityMetadata", "m", ",", "MetamodelImpl", "metaModel", ",", "Object", "id", ")", "{", "EmbeddableType", "compoundKey", "=", "metaModel", ".", "embeddable", "(", "m", ".", "getId...
Populate compound key. @param dbObj the db obj @param m the m @param metaModel the meta model @param id the id
[ "Populate", "compound", "key", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/kundera-mongo/src/main/java/com/impetus/client/mongodb/utils/MongoDBUtils.java#L73-L82
FitLayout/classify
src/main/java/org/fit/layout/classify/articles/ArticleFeatureExtractor.java
ArticleFeatureExtractor.lrAligned
private int lrAligned(Area a1, Area a2) { """ Checks if the areas are left- or right-aligned. @return 0 if not, 1 if yes, 2 if both left and right """ if (a1.getX1() == a2.getX1()) return (a1.getX2() == a2.getX2()) ? 2 : 1; else if (a1.getX2() == a2.getX2()) return 1; ...
java
private int lrAligned(Area a1, Area a2) { if (a1.getX1() == a2.getX1()) return (a1.getX2() == a2.getX2()) ? 2 : 1; else if (a1.getX2() == a2.getX2()) return 1; else return 0; }
[ "private", "int", "lrAligned", "(", "Area", "a1", ",", "Area", "a2", ")", "{", "if", "(", "a1", ".", "getX1", "(", ")", "==", "a2", ".", "getX1", "(", ")", ")", "return", "(", "a1", ".", "getX2", "(", ")", "==", "a2", ".", "getX2", "(", ")", ...
Checks if the areas are left- or right-aligned. @return 0 if not, 1 if yes, 2 if both left and right
[ "Checks", "if", "the", "areas", "are", "left", "-", "or", "right", "-", "aligned", "." ]
train
https://github.com/FitLayout/classify/blob/0b43ceb2f0be4e6d26263491893884d811f0d605/src/main/java/org/fit/layout/classify/articles/ArticleFeatureExtractor.java#L307-L315
box/box-java-sdk
src/main/java/com/box/sdk/BoxFolder.java
BoxFolder.addWebHook
public BoxWebHook.Info addWebHook(URL address, BoxWebHook.Trigger... triggers) { """ Adds new {@link BoxWebHook} to this {@link BoxFolder}. @param address {@link BoxWebHook.Info#getAddress()} @param triggers {@link BoxWebHook.Info#getTriggers()} @return created {@link BoxWebHook.Info} """ return ...
java
public BoxWebHook.Info addWebHook(URL address, BoxWebHook.Trigger... triggers) { return BoxWebHook.create(this, address, triggers); }
[ "public", "BoxWebHook", ".", "Info", "addWebHook", "(", "URL", "address", ",", "BoxWebHook", ".", "Trigger", "...", "triggers", ")", "{", "return", "BoxWebHook", ".", "create", "(", "this", ",", "address", ",", "triggers", ")", ";", "}" ]
Adds new {@link BoxWebHook} to this {@link BoxFolder}. @param address {@link BoxWebHook.Info#getAddress()} @param triggers {@link BoxWebHook.Info#getTriggers()} @return created {@link BoxWebHook.Info}
[ "Adds", "new", "{", "@link", "BoxWebHook", "}", "to", "this", "{", "@link", "BoxFolder", "}", "." ]
train
https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxFolder.java#L736-L738
brettwooldridge/SansOrm
src/main/java/com/zaxxer/sansorm/SqlClosureElf.java
SqlClosureElf.deleteObjectById
public static <T> int deleteObjectById(Class<T> clazz, Object... args) { """ Delete an object from the database by ID. @param clazz the class of the object to delete. @param args the IDs of the object, in order of appearance of declaration in the target object class. @param <T> The type of the object. @return ...
java
public static <T> int deleteObjectById(Class<T> clazz, Object... args) { return SqlClosure.sqlExecute(c -> OrmElf.deleteObjectById(c, clazz, args)); }
[ "public", "static", "<", "T", ">", "int", "deleteObjectById", "(", "Class", "<", "T", ">", "clazz", ",", "Object", "...", "args", ")", "{", "return", "SqlClosure", ".", "sqlExecute", "(", "c", "->", "OrmElf", ".", "deleteObjectById", "(", "c", ",", "cl...
Delete an object from the database by ID. @param clazz the class of the object to delete. @param args the IDs of the object, in order of appearance of declaration in the target object class. @param <T> The type of the object. @return the number of rows affected.
[ "Delete", "an", "object", "from", "the", "database", "by", "ID", "." ]
train
https://github.com/brettwooldridge/SansOrm/blob/ab22721db79c5f20c0e8483f09eda2844d596557/src/main/java/com/zaxxer/sansorm/SqlClosureElf.java#L101-L104
real-logic/agrona
agrona/src/main/java/org/agrona/SystemUtil.java
SystemUtil.getSizeAsLong
public static long getSizeAsLong(final String propertyName, final long defaultValue) { """ Get a size value as a long from a system property. Supports a 'g', 'm', and 'k' suffix to indicate gigabytes, megabytes, or kilobytes respectively. @param propertyName to lookup. @param defaultValue to be applied if the...
java
public static long getSizeAsLong(final String propertyName, final long defaultValue) { final String propertyValue = getProperty(propertyName); if (propertyValue != null) { final long value = parseSize(propertyName, propertyValue); if (value < 0) { ...
[ "public", "static", "long", "getSizeAsLong", "(", "final", "String", "propertyName", ",", "final", "long", "defaultValue", ")", "{", "final", "String", "propertyValue", "=", "getProperty", "(", "propertyName", ")", ";", "if", "(", "propertyValue", "!=", "null", ...
Get a size value as a long from a system property. Supports a 'g', 'm', and 'k' suffix to indicate gigabytes, megabytes, or kilobytes respectively. @param propertyName to lookup. @param defaultValue to be applied if the system property is not set. @return the long value. @throws NumberFormatException if the value is o...
[ "Get", "a", "size", "value", "as", "a", "long", "from", "a", "system", "property", ".", "Supports", "a", "g", "m", "and", "k", "suffix", "to", "indicate", "gigabytes", "megabytes", "or", "kilobytes", "respectively", "." ]
train
https://github.com/real-logic/agrona/blob/d1ea76e6e3598cd6a0d34879687652ef123f639b/agrona/src/main/java/org/agrona/SystemUtil.java#L258-L273
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/WApplication.java
WApplication.addCssFile
public ApplicationResource addCssFile(final String fileName) { """ Add custom CSS held as an internal resource to be used by the Application. @param fileName the CSS file name @return the application resource in which the resource details are held """ if (Util.empty(fileName)) { throw new IllegalArgum...
java
public ApplicationResource addCssFile(final String fileName) { if (Util.empty(fileName)) { throw new IllegalArgumentException("A file name must be provided."); } InternalResource resource = new InternalResource(fileName, fileName); ApplicationResource res = new ApplicationResource(resource); addCssResource...
[ "public", "ApplicationResource", "addCssFile", "(", "final", "String", "fileName", ")", "{", "if", "(", "Util", ".", "empty", "(", "fileName", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"A file name must be provided.\"", ")", ";", "}", "In...
Add custom CSS held as an internal resource to be used by the Application. @param fileName the CSS file name @return the application resource in which the resource details are held
[ "Add", "custom", "CSS", "held", "as", "an", "internal", "resource", "to", "be", "used", "by", "the", "Application", "." ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/WApplication.java#L260-L268
WolfgangFahl/Mediawiki-Japi
src/main/java/com/bitplan/mediawiki/japi/user/WikiUser.java
WikiUser.getUser
public static WikiUser getUser(String wikiId, String siteurl) { """ get the Wiki user for the given wikiid @param wikiId - the id of the wiki @param siteurl - the siteurl @return a Wikiuser for this site """ WikiUser result = null; try { Properties props = getProperties(wikiId); res...
java
public static WikiUser getUser(String wikiId, String siteurl) { WikiUser result = null; try { Properties props = getProperties(wikiId); result = new WikiUser(); result.setUsername(props.getProperty("user")); result.setEmail(props.getProperty("email")); Crypt pcf = new Crypt(props....
[ "public", "static", "WikiUser", "getUser", "(", "String", "wikiId", ",", "String", "siteurl", ")", "{", "WikiUser", "result", "=", "null", ";", "try", "{", "Properties", "props", "=", "getProperties", "(", "wikiId", ")", ";", "result", "=", "new", "WikiUse...
get the Wiki user for the given wikiid @param wikiId - the id of the wiki @param siteurl - the siteurl @return a Wikiuser for this site
[ "get", "the", "Wiki", "user", "for", "the", "given", "wikiid" ]
train
https://github.com/WolfgangFahl/Mediawiki-Japi/blob/78d0177ebfe02eb05da5550839727861f1e888a5/src/main/java/com/bitplan/mediawiki/japi/user/WikiUser.java#L134-L154
square/phrase
src/main/java/com/squareup/phrase/Phrase.java
Phrase.fromPlural
public static Phrase fromPlural(View v, @PluralsRes int patternResourceId, int quantity) { """ Entry point into this API. @throws IllegalArgumentException if pattern contains any syntax errors. """ return fromPlural(v.getResources(), patternResourceId, quantity); }
java
public static Phrase fromPlural(View v, @PluralsRes int patternResourceId, int quantity) { return fromPlural(v.getResources(), patternResourceId, quantity); }
[ "public", "static", "Phrase", "fromPlural", "(", "View", "v", ",", "@", "PluralsRes", "int", "patternResourceId", ",", "int", "quantity", ")", "{", "return", "fromPlural", "(", "v", ".", "getResources", "(", ")", ",", "patternResourceId", ",", "quantity", ")...
Entry point into this API. @throws IllegalArgumentException if pattern contains any syntax errors.
[ "Entry", "point", "into", "this", "API", "." ]
train
https://github.com/square/phrase/blob/d91f18e80790832db11b811c462f8e5cd492d97e/src/main/java/com/squareup/phrase/Phrase.java#L114-L116
EMCECS/nfs-client-java
src/main/java/com/emc/ecs/nfsclient/nfs/io/LinkTracker.java
LinkTracker.addResolvedPath
synchronized void addResolvedPath(String path, F file) { """ After each link is completely resolved, the linkTracker caller should call this method to store that resolved path so that it can be resolved directly the next time is is seen. @param path The path to the original symbolic link. @param file The f...
java
synchronized void addResolvedPath(String path, F file) { _resolvedPaths.put(path, file); _unresolvedPaths.remove(path); }
[ "synchronized", "void", "addResolvedPath", "(", "String", "path", ",", "F", "file", ")", "{", "_resolvedPaths", ".", "put", "(", "path", ",", "file", ")", ";", "_unresolvedPaths", ".", "remove", "(", "path", ")", ";", "}" ]
After each link is completely resolved, the linkTracker caller should call this method to store that resolved path so that it can be resolved directly the next time is is seen. @param path The path to the original symbolic link. @param file The file to which that link was finally resolved.
[ "After", "each", "link", "is", "completely", "resolved", "the", "linkTracker", "caller", "should", "call", "this", "method", "to", "store", "that", "resolved", "path", "so", "that", "it", "can", "be", "resolved", "directly", "the", "next", "time", "is", "is"...
train
https://github.com/EMCECS/nfs-client-java/blob/7ba25bad5052b95cd286052745327729288b2843/src/main/java/com/emc/ecs/nfsclient/nfs/io/LinkTracker.java#L95-L98
gallandarakhneorg/afc
advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/AbstractBusPrimitive.java
AbstractBusPrimitive.firePrimitiveChanged
protected final void firePrimitiveChanged(String propertyName, Object oldValue, Object newValue) { """ Fire the event that indicates this object has changed. @param propertyName is the name of the graphical property. @param oldValue is the old value of the property. @param newValue is the new value of the pro...
java
protected final void firePrimitiveChanged(String propertyName, Object oldValue, Object newValue) { final BusChangeEvent event = new BusChangeEvent( // source of the event this, // type of the event BusChangeEventType.change(getClass()), // subobject this, // index in parent indexInPare...
[ "protected", "final", "void", "firePrimitiveChanged", "(", "String", "propertyName", ",", "Object", "oldValue", ",", "Object", "newValue", ")", "{", "final", "BusChangeEvent", "event", "=", "new", "BusChangeEvent", "(", "// source of the event", "this", ",", "// typ...
Fire the event that indicates this object has changed. @param propertyName is the name of the graphical property. @param oldValue is the old value of the property. @param newValue is the new value of the property.
[ "Fire", "the", "event", "that", "indicates", "this", "object", "has", "changed", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/AbstractBusPrimitive.java#L225-L239
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/UTF16.java
UTF16.findCodePointOffset
public static int findCodePointOffset(char source[], int start, int limit, int offset16) { """ Returns the UTF-32 offset corresponding to the first UTF-32 boundary at the given UTF-16 offset. Used for random access. See the {@link UTF16 class description} for notes on roundtripping.<br> <i>Note: If the UTF-16 o...
java
public static int findCodePointOffset(char source[], int start, int limit, int offset16) { offset16 += start; if (offset16 > limit) { throw new StringIndexOutOfBoundsException(offset16); } int result = 0; char ch; boolean hadLeadSurrogate = false; fo...
[ "public", "static", "int", "findCodePointOffset", "(", "char", "source", "[", "]", ",", "int", "start", ",", "int", "limit", ",", "int", "offset16", ")", "{", "offset16", "+=", "start", ";", "if", "(", "offset16", ">", "limit", ")", "{", "throw", "new"...
Returns the UTF-32 offset corresponding to the first UTF-32 boundary at the given UTF-16 offset. Used for random access. See the {@link UTF16 class description} for notes on roundtripping.<br> <i>Note: If the UTF-16 offset is into the middle of a surrogate pair, then the UTF-32 offset of the <strong>lead</strong> of th...
[ "Returns", "the", "UTF", "-", "32", "offset", "corresponding", "to", "the", "first", "UTF", "-", "32", "boundary", "at", "the", "given", "UTF", "-", "16", "offset", ".", "Used", "for", "random", "access", ".", "See", "the", "{", "@link", "UTF16", "clas...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/UTF16.java#L935-L966
apache/groovy
src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java
DefaultGroovyMethods.collectAll
@Deprecated public static Collection collectAll(Collection self, Collection collector, Closure transform) { """ Deprecated alias for collectNested @deprecated Use collectNested instead @see #collectNested(Iterable, Collection, Closure) """ return collectNested((Iterable)self, collector, transfo...
java
@Deprecated public static Collection collectAll(Collection self, Collection collector, Closure transform) { return collectNested((Iterable)self, collector, transform); }
[ "@", "Deprecated", "public", "static", "Collection", "collectAll", "(", "Collection", "self", ",", "Collection", "collector", ",", "Closure", "transform", ")", "{", "return", "collectNested", "(", "(", "Iterable", ")", "self", ",", "collector", ",", "transform",...
Deprecated alias for collectNested @deprecated Use collectNested instead @see #collectNested(Iterable, Collection, Closure)
[ "Deprecated", "alias", "for", "collectNested" ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java#L3713-L3716
ReactiveX/RxJavaComputationExpressions
src/main/java/rx/Statement.java
Statement.switchCase
public static <K, R> Observable<R> switchCase(Func0<? extends K> caseSelector, Map<? super K, ? extends Observable<? extends R>> mapOfCases, Observable<? extends R> defaultCase) { """ Return a particular one of several possible Observables based on a case selector, or a default Observable ...
java
public static <K, R> Observable<R> switchCase(Func0<? extends K> caseSelector, Map<? super K, ? extends Observable<? extends R>> mapOfCases, Observable<? extends R> defaultCase) { return Observable.create(new OperatorSwitchCase<K, R>(caseSelector, mapOfCases, defaultCase)); }
[ "public", "static", "<", "K", ",", "R", ">", "Observable", "<", "R", ">", "switchCase", "(", "Func0", "<", "?", "extends", "K", ">", "caseSelector", ",", "Map", "<", "?", "super", "K", ",", "?", "extends", "Observable", "<", "?", "extends", "R", ">...
Return a particular one of several possible Observables based on a case selector, or a default Observable if the case selector does not map to a particular one. <p> <img width="640" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/switchCase.png" alt=""> @param <K> the case key type @param <R> the...
[ "Return", "a", "particular", "one", "of", "several", "possible", "Observables", "based", "on", "a", "case", "selector", "or", "a", "default", "Observable", "if", "the", "case", "selector", "does", "not", "map", "to", "a", "particular", "one", ".", "<p", ">...
train
https://github.com/ReactiveX/RxJavaComputationExpressions/blob/f9d04ab762223b36fad47402ac36ce7969320d69/src/main/java/rx/Statement.java#L101-L105
code4everything/util
src/main/java/com/zhazhapan/util/FileExecutor.java
FileExecutor.copyFiles
public static void copyFiles(String[] files, String[] destinationFiles) throws IOException { """ 批量复制文件,并重命名 @param files 文件路径数组 @param destinationFiles 目标文件路径数组,与文件路径数组一一对应 @throws IOException 异常 """ copyFiles(getFiles(files), getFiles(destinationFiles)); }
java
public static void copyFiles(String[] files, String[] destinationFiles) throws IOException { copyFiles(getFiles(files), getFiles(destinationFiles)); }
[ "public", "static", "void", "copyFiles", "(", "String", "[", "]", "files", ",", "String", "[", "]", "destinationFiles", ")", "throws", "IOException", "{", "copyFiles", "(", "getFiles", "(", "files", ")", ",", "getFiles", "(", "destinationFiles", ")", ")", ...
批量复制文件,并重命名 @param files 文件路径数组 @param destinationFiles 目标文件路径数组,与文件路径数组一一对应 @throws IOException 异常
[ "批量复制文件,并重命名" ]
train
https://github.com/code4everything/util/blob/1fc9f0ead1108f4d7208ba7c000df4244f708418/src/main/java/com/zhazhapan/util/FileExecutor.java#L448-L450
mapsforge/mapsforge
mapsforge-map-writer/src/main/java/org/mapsforge/map/writer/model/TileCoordinate.java
TileCoordinate.translateToZoomLevel
public List<TileCoordinate> translateToZoomLevel(byte zoomlevelNew) { """ Computes which tile on a lower zoom level covers this given tile or which tiles on a higher zoom level together cover this tile. @param zoomlevelNew the zoom level @return a list of tiles (represented by tile coordinates) which cover th...
java
public List<TileCoordinate> translateToZoomLevel(byte zoomlevelNew) { List<TileCoordinate> tiles = null; int zoomlevelDistance = zoomlevelNew - this.zoomlevel; int factor = (int) Math.pow(2, Math.abs(zoomlevelDistance)); if (zoomlevelDistance > 0) { tiles = new ArrayList<>((...
[ "public", "List", "<", "TileCoordinate", ">", "translateToZoomLevel", "(", "byte", "zoomlevelNew", ")", "{", "List", "<", "TileCoordinate", ">", "tiles", "=", "null", ";", "int", "zoomlevelDistance", "=", "zoomlevelNew", "-", "this", ".", "zoomlevel", ";", "in...
Computes which tile on a lower zoom level covers this given tile or which tiles on a higher zoom level together cover this tile. @param zoomlevelNew the zoom level @return a list of tiles (represented by tile coordinates) which cover this tile
[ "Computes", "which", "tile", "on", "a", "lower", "zoom", "level", "covers", "this", "given", "tile", "or", "which", "tiles", "on", "a", "higher", "zoom", "level", "together", "cover", "this", "tile", "." ]
train
https://github.com/mapsforge/mapsforge/blob/c49c83f7f727552f793dff15cefa532ade030842/mapsforge-map-writer/src/main/java/org/mapsforge/map/writer/model/TileCoordinate.java#L109-L128
davidcarboni/restolino
src/main/java/com/github/davidcarboni/restolino/helpers/QueryString.java
QueryString.toQueryString
public String toQueryString() { """ A value suitable for constructinng URIs with. This means that if there are no parameters, null will be returned. @return If the map is empty, null, otherwise an escaped query string. """ String result = null; List<String> parameters = new ArrayList<>();...
java
public String toQueryString() { String result = null; List<String> parameters = new ArrayList<>(); for (Map.Entry<String, String> entry : entrySet()) { // We don't encode the key because it could legitimately contain // things like underscores, e.g. "_escaped_fragment_"...
[ "public", "String", "toQueryString", "(", ")", "{", "String", "result", "=", "null", ";", "List", "<", "String", ">", "parameters", "=", "new", "ArrayList", "<>", "(", ")", ";", "for", "(", "Map", ".", "Entry", "<", "String", ",", "String", ">", "ent...
A value suitable for constructinng URIs with. This means that if there are no parameters, null will be returned. @return If the map is empty, null, otherwise an escaped query string.
[ "A", "value", "suitable", "for", "constructinng", "URIs", "with", ".", "This", "means", "that", "if", "there", "are", "no", "parameters", "null", "will", "be", "returned", "." ]
train
https://github.com/davidcarboni/restolino/blob/3f84ece1bd016fbb597c624d46fcca5a2580a33d/src/main/java/com/github/davidcarboni/restolino/helpers/QueryString.java#L72-L97
undertow-io/undertow
core/src/main/java/io/undertow/server/protocol/framed/AbstractFramedStreamSinkChannel.java
AbstractFramedStreamSinkChannel.getFrameHeader
final SendFrameHeader getFrameHeader() throws IOException { """ Returns the header for the current frame. This consists of the frame data, and also an integer specifying how much data is remaining in the buffer. If this is non-zero then this method must adjust the buffers limit accordingly. It is expected t...
java
final SendFrameHeader getFrameHeader() throws IOException { if (header == null) { header = createFrameHeader(); if (header == null) { header = new SendFrameHeader(0, null); } } return header; }
[ "final", "SendFrameHeader", "getFrameHeader", "(", ")", "throws", "IOException", "{", "if", "(", "header", "==", "null", ")", "{", "header", "=", "createFrameHeader", "(", ")", ";", "if", "(", "header", "==", "null", ")", "{", "header", "=", "new", "Send...
Returns the header for the current frame. This consists of the frame data, and also an integer specifying how much data is remaining in the buffer. If this is non-zero then this method must adjust the buffers limit accordingly. It is expected that this will be used when limits on the size of a data frame prevent the ...
[ "Returns", "the", "header", "for", "the", "current", "frame", "." ]
train
https://github.com/undertow-io/undertow/blob/87de0b856a7a4ba8faf5b659537b9af07b763263/core/src/main/java/io/undertow/server/protocol/framed/AbstractFramedStreamSinkChannel.java#L143-L151
elki-project/elki
elki-core-api/src/main/java/de/lmu/ifi/dbs/elki/data/VectorUtil.java
VectorUtil.angleSparse
public static double angleSparse(SparseNumberVector v1, SparseNumberVector v2) { """ Compute the angle for sparse vectors. @param v1 First vector @param v2 Second vector @return angle """ // TODO: exploit precomputed length, when available? double l1 = 0., l2 = 0., cross = 0.; int i1 = v1.iter...
java
public static double angleSparse(SparseNumberVector v1, SparseNumberVector v2) { // TODO: exploit precomputed length, when available? double l1 = 0., l2 = 0., cross = 0.; int i1 = v1.iter(), i2 = v2.iter(); while(v1.iterValid(i1) && v2.iterValid(i2)) { final int d1 = v1.iterDim(i1), d2 = v2.iterDi...
[ "public", "static", "double", "angleSparse", "(", "SparseNumberVector", "v1", ",", "SparseNumberVector", "v2", ")", "{", "// TODO: exploit precomputed length, when available?", "double", "l1", "=", "0.", ",", "l2", "=", "0.", ",", "cross", "=", "0.", ";", "int", ...
Compute the angle for sparse vectors. @param v1 First vector @param v2 Second vector @return angle
[ "Compute", "the", "angle", "for", "sparse", "vectors", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-api/src/main/java/de/lmu/ifi/dbs/elki/data/VectorUtil.java#L130-L170
twitter/hraven
hraven-core/src/main/java/com/twitter/hraven/datasource/JobHistoryService.java
JobHistoryService.getJobByJobID
public JobDetails getJobByJobID(String cluster, String jobId) throws IOException { """ Returns a specific job's data by job ID. This version does not populate the job's task data. @param cluster the cluster identifier @param cluster the job ID """ return getJobByJobID(cluster, jobId, false); }
java
public JobDetails getJobByJobID(String cluster, String jobId) throws IOException { return getJobByJobID(cluster, jobId, false); }
[ "public", "JobDetails", "getJobByJobID", "(", "String", "cluster", ",", "String", "jobId", ")", "throws", "IOException", "{", "return", "getJobByJobID", "(", "cluster", ",", "jobId", ",", "false", ")", ";", "}" ]
Returns a specific job's data by job ID. This version does not populate the job's task data. @param cluster the cluster identifier @param cluster the job ID
[ "Returns", "a", "specific", "job", "s", "data", "by", "job", "ID", ".", "This", "version", "does", "not", "populate", "the", "job", "s", "task", "data", "." ]
train
https://github.com/twitter/hraven/blob/e35996b6e2f016bcd18db0bad320be7c93d95208/hraven-core/src/main/java/com/twitter/hraven/datasource/JobHistoryService.java#L401-L404
OpenLiberty/open-liberty
dev/com.ibm.ws.transport.http/src/com/ibm/ws/genericbnf/internal/GenericUtils.java
GenericUtils.skipWhiteSpace
static public int skipWhiteSpace(byte[] data, int start) { """ Simple method to skip past any space characters from the starting index onwards, until it finds a non-space character or the end of the buffer. Returns the index it stopped on. @param data @param start @return int """ int index = sta...
java
static public int skipWhiteSpace(byte[] data, int start) { int index = start + 1; while (index < data.length && BNFHeaders.SPACE == data[index]) { index++; } return index; }
[ "static", "public", "int", "skipWhiteSpace", "(", "byte", "[", "]", "data", ",", "int", "start", ")", "{", "int", "index", "=", "start", "+", "1", ";", "while", "(", "index", "<", "data", ".", "length", "&&", "BNFHeaders", ".", "SPACE", "==", "data",...
Simple method to skip past any space characters from the starting index onwards, until it finds a non-space character or the end of the buffer. Returns the index it stopped on. @param data @param start @return int
[ "Simple", "method", "to", "skip", "past", "any", "space", "characters", "from", "the", "starting", "index", "onwards", "until", "it", "finds", "a", "non", "-", "space", "character", "or", "the", "end", "of", "the", "buffer", ".", "Returns", "the", "index",...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.transport.http/src/com/ibm/ws/genericbnf/internal/GenericUtils.java#L1128-L1134
google/error-prone
core/src/main/java/com/google/errorprone/bugpatterns/inject/InvalidTargetingOnScopingAnnotation.java
InvalidTargetingOnScopingAnnotation.replaceTargetAnnotation
private static Fix replaceTargetAnnotation( Target annotation, AnnotationTree targetAnnotationTree) { """ Rewrite the annotation with static imports, adding TYPE and METHOD to the @Target annotation value (and reordering them to their declaration order in ElementType). """ Set<ElementType> types = E...
java
private static Fix replaceTargetAnnotation( Target annotation, AnnotationTree targetAnnotationTree) { Set<ElementType> types = EnumSet.copyOf(REQUIRED_ELEMENT_TYPES); types.addAll(Arrays.asList(annotation.value())); return replaceTargetAnnotation(targetAnnotationTree, types); }
[ "private", "static", "Fix", "replaceTargetAnnotation", "(", "Target", "annotation", ",", "AnnotationTree", "targetAnnotationTree", ")", "{", "Set", "<", "ElementType", ">", "types", "=", "EnumSet", ".", "copyOf", "(", "REQUIRED_ELEMENT_TYPES", ")", ";", "types", "...
Rewrite the annotation with static imports, adding TYPE and METHOD to the @Target annotation value (and reordering them to their declaration order in ElementType).
[ "Rewrite", "the", "annotation", "with", "static", "imports", "adding", "TYPE", "and", "METHOD", "to", "the" ]
train
https://github.com/google/error-prone/blob/fe2e3cc2cf1958cb7c487bfe89852bb4c225ba9d/core/src/main/java/com/google/errorprone/bugpatterns/inject/InvalidTargetingOnScopingAnnotation.java#L98-L104
jboss/jboss-jsf-api_spec
src/main/java/javax/faces/application/ResourceHandlerWrapper.java
ResourceHandlerWrapper.createViewResource
@Override public ViewResource createViewResource(FacesContext context, String resourceName) { """ <p class="changed_added_2_2">The default behavior of this method is to call {@link ResourceHandler#createViewResource} on the wrapped {@link ResourceHandler} object.</p> """ return getWrapped().creat...
java
@Override public ViewResource createViewResource(FacesContext context, String resourceName) { return getWrapped().createViewResource(context, resourceName); }
[ "@", "Override", "public", "ViewResource", "createViewResource", "(", "FacesContext", "context", ",", "String", "resourceName", ")", "{", "return", "getWrapped", "(", ")", ".", "createViewResource", "(", "context", ",", "resourceName", ")", ";", "}" ]
<p class="changed_added_2_2">The default behavior of this method is to call {@link ResourceHandler#createViewResource} on the wrapped {@link ResourceHandler} object.</p>
[ "<p", "class", "=", "changed_added_2_2", ">", "The", "default", "behavior", "of", "this", "method", "is", "to", "call", "{" ]
train
https://github.com/jboss/jboss-jsf-api_spec/blob/cb33d215acbab847f2db5cdf2c6fe4d99c0a01c3/src/main/java/javax/faces/application/ResourceHandlerWrapper.java#L122-L125
UrielCh/ovh-java-sdk
ovh-java-sdk-me/src/main/java/net/minidev/ovh/api/ApiOvhMe.java
ApiOvhMe.payment_transaction_transactionId_GET
public OvhTransaction payment_transaction_transactionId_GET(Long transactionId) throws IOException { """ Get associated payment method transaction REST: GET /me/payment/transaction/{transactionId} @param transactionId [required] Payment method transaction ID API beta """ String qPath = "/me/payment/tr...
java
public OvhTransaction payment_transaction_transactionId_GET(Long transactionId) throws IOException { String qPath = "/me/payment/transaction/{transactionId}"; StringBuilder sb = path(qPath, transactionId); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, OvhTransaction.class); }
[ "public", "OvhTransaction", "payment_transaction_transactionId_GET", "(", "Long", "transactionId", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/me/payment/transaction/{transactionId}\"", ";", "StringBuilder", "sb", "=", "path", "(", "qPath", ",", "transa...
Get associated payment method transaction REST: GET /me/payment/transaction/{transactionId} @param transactionId [required] Payment method transaction ID API beta
[ "Get", "associated", "payment", "method", "transaction" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-me/src/main/java/net/minidev/ovh/api/ApiOvhMe.java#L1131-L1136
lievendoclo/Valkyrie-RCP
valkyrie-rcp-core/src/main/java/org/valkyriercp/form/FormGuard.java
FormGuard.addGuarded
public void addGuarded(Guarded newGuarded, int mask) { """ Adds a guarded object to be guarded by this FormGuard @param newGuarded object to be guarded @param mask indicating which state of the formModel should enable the guarded obhject """ this.guardedEntries.put(newGuarded, new Integer(mask));...
java
public void addGuarded(Guarded newGuarded, int mask) { this.guardedEntries.put(newGuarded, new Integer(mask)); newGuarded.setEnabled(stateMatchesMask(getFormModelState(), mask)); }
[ "public", "void", "addGuarded", "(", "Guarded", "newGuarded", ",", "int", "mask", ")", "{", "this", ".", "guardedEntries", ".", "put", "(", "newGuarded", ",", "new", "Integer", "(", "mask", ")", ")", ";", "newGuarded", ".", "setEnabled", "(", "stateMatches...
Adds a guarded object to be guarded by this FormGuard @param newGuarded object to be guarded @param mask indicating which state of the formModel should enable the guarded obhject
[ "Adds", "a", "guarded", "object", "to", "be", "guarded", "by", "this", "FormGuard" ]
train
https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/form/FormGuard.java#L163-L166
nlalevee/jsourcemap
jsourcemap/src/java/org/hibnet/jsourcemap/IndexedSourceMapConsumer.java
IndexedSourceMapConsumer.generatedPositionFor
@Override public GeneratedPosition generatedPositionFor(String source, int line, int column, Bias bias) { """ Returns the generated line and column information for the original source, line, and column positions provided. The only argument is an object with the following properties: <ul> <li>source: The fil...
java
@Override public GeneratedPosition generatedPositionFor(String source, int line, int column, Bias bias) { for (int i = 0; i < this._sections.size(); i++) { ParsedSection section = this._sections.get(i); // Only consider this section if the requested source is in the list of ...
[ "@", "Override", "public", "GeneratedPosition", "generatedPositionFor", "(", "String", "source", ",", "int", "line", ",", "int", "column", ",", "Bias", "bias", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "this", ".", "_sections", ".", "s...
Returns the generated line and column information for the original source, line, and column positions provided. The only argument is an object with the following properties: <ul> <li>source: The filename of the original source.</li> <li>line: The line number in the original source.</li> <li>column: The column number in...
[ "Returns", "the", "generated", "line", "and", "column", "information", "for", "the", "original", "source", "line", "and", "column", "positions", "provided", ".", "The", "only", "argument", "is", "an", "object", "with", "the", "following", "properties", ":", "<...
train
https://github.com/nlalevee/jsourcemap/blob/361a99c73d51c11afa5579dd83d477c4d0345599/jsourcemap/src/java/org/hibnet/jsourcemap/IndexedSourceMapConsumer.java#L223-L244