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
dbracewell/mango
src/main/java/com/davidbracewell/string/StringUtils.java
StringUtils.compare
public static int compare(String s1, String s2, boolean ignoreCase) { """ Null safe comparison of strings @param s1 string 1 @param s2 string 2 @param ignoreCase True perform case insensitive comparison, False perform case sensitive comparison @return as long as neither are null """ ...
java
public static int compare(String s1, String s2, boolean ignoreCase) { if (s1 == null && s2 == null) { return 0; } else if (s1 == null) { return -1; } else if (s2 == null) { return 1; } return ignoreCase ? s1.compareToIgnoreCase(s2) : s1.compareTo(s2); }
[ "public", "static", "int", "compare", "(", "String", "s1", ",", "String", "s2", ",", "boolean", "ignoreCase", ")", "{", "if", "(", "s1", "==", "null", "&&", "s2", "==", "null", ")", "{", "return", "0", ";", "}", "else", "if", "(", "s1", "==", "nu...
Null safe comparison of strings @param s1 string 1 @param s2 string 2 @param ignoreCase True perform case insensitive comparison, False perform case sensitive comparison @return as long as neither are null
[ "Null", "safe", "comparison", "of", "strings" ]
train
https://github.com/dbracewell/mango/blob/2cec08826f1fccd658694dd03abce10fc97618ec/src/main/java/com/davidbracewell/string/StringUtils.java#L132-L141
VoltDB/voltdb
src/frontend/org/voltdb/PostgreSQLBackend.java
PostgreSQLBackend.numOccurencesOfCharIn
static private int numOccurencesOfCharIn(String str, char ch) { """ Returns the number of occurrences of the specified character in the specified String, but ignoring those contained in single quotes. """ boolean inMiddleOfQuote = false; int num = 0, previousIndex = 0; for (int index =...
java
static private int numOccurencesOfCharIn(String str, char ch) { boolean inMiddleOfQuote = false; int num = 0, previousIndex = 0; for (int index = str.indexOf(ch); index >= 0 ; index = str.indexOf(ch, index+1)) { if (hasOddNumberOfSingleQuotes(str.substring(previousIndex, index))) { ...
[ "static", "private", "int", "numOccurencesOfCharIn", "(", "String", "str", ",", "char", "ch", ")", "{", "boolean", "inMiddleOfQuote", "=", "false", ";", "int", "num", "=", "0", ",", "previousIndex", "=", "0", ";", "for", "(", "int", "index", "=", "str", ...
Returns the number of occurrences of the specified character in the specified String, but ignoring those contained in single quotes.
[ "Returns", "the", "number", "of", "occurrences", "of", "the", "specified", "character", "in", "the", "specified", "String", "but", "ignoring", "those", "contained", "in", "single", "quotes", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/PostgreSQLBackend.java#L649-L662
OpenLiberty/open-liberty
dev/com.ibm.ws.ejbcontainer/src/com/ibm/ws/ejbcontainer/osgi/internal/NameSpaceBinderImpl.java
NameSpaceBinderImpl.createBindingObject
@Override public EJBBinding createBindingObject(HomeRecord hr, HomeWrapperSet homeSet, String interfaceName, int interfaceIndex, boolean local) { ...
java
@Override public EJBBinding createBindingObject(HomeRecord hr, HomeWrapperSet homeSet, String interfaceName, int interfaceIndex, boolean local) { ...
[ "@", "Override", "public", "EJBBinding", "createBindingObject", "(", "HomeRecord", "hr", ",", "HomeWrapperSet", "homeSet", ",", "String", "interfaceName", ",", "int", "interfaceIndex", ",", "boolean", "local", ")", "{", "return", "new", "EJBBinding", "(", "hr", ...
Store the binding information for later use. @see com.ibm.ws.ejbcontainer.runtime.NameSpaceBinder#createBindingObject(com.ibm.ejs.container.HomeRecord, com.ibm.websphere.csi.HomeWrapperSet, java.lang.String, boolean, boolean)
[ "Store", "the", "binding", "information", "for", "later", "use", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.ejbcontainer/src/com/ibm/ws/ejbcontainer/osgi/internal/NameSpaceBinderImpl.java#L54-L61
Guichaguri/MinimalFTP
src/main/java/com/guichaguri/minimalftp/FTPServer.java
FTPServer.listenSync
public void listenSync(InetAddress address, int port) throws IOException { """ Starts the FTP server synchronously, blocking the current thread. Connections to the server will still create new threads. @param address The server address or {@code null} for a local address @param port The server port or {@cod...
java
public void listenSync(InetAddress address, int port) throws IOException { if(auth == null) throw new NullPointerException("The Authenticator is null"); if(socket != null) throw new IOException("Server already started"); socket = Utils.createServer(port, 50, address, ssl, !explicitSecurity); ...
[ "public", "void", "listenSync", "(", "InetAddress", "address", ",", "int", "port", ")", "throws", "IOException", "{", "if", "(", "auth", "==", "null", ")", "throw", "new", "NullPointerException", "(", "\"The Authenticator is null\"", ")", ";", "if", "(", "sock...
Starts the FTP server synchronously, blocking the current thread. Connections to the server will still create new threads. @param address The server address or {@code null} for a local address @param port The server port or {@code 0} to automatically allocate the port @throws IOException When an error occurs while st...
[ "Starts", "the", "FTP", "server", "synchronously", "blocking", "the", "current", "thread", "." ]
train
https://github.com/Guichaguri/MinimalFTP/blob/ddd81e26ec88079ee4c37fe53d8efe420996e9b1/src/main/java/com/guichaguri/minimalftp/FTPServer.java#L229-L238
jfinal/jfinal
src/main/java/com/jfinal/plugin/activerecord/Db.java
Db.findById
public static Record findById(String tableName, Object idValue) { """ Find record by id with default primary key. <pre> Example: Record user = Db.findById("user", 15); </pre> @param tableName the table name of the table @param idValue the id value of the record """ return MAIN.findById(tableName, idVa...
java
public static Record findById(String tableName, Object idValue) { return MAIN.findById(tableName, idValue); }
[ "public", "static", "Record", "findById", "(", "String", "tableName", ",", "Object", "idValue", ")", "{", "return", "MAIN", ".", "findById", "(", "tableName", ",", "idValue", ")", ";", "}" ]
Find record by id with default primary key. <pre> Example: Record user = Db.findById("user", 15); </pre> @param tableName the table name of the table @param idValue the id value of the record
[ "Find", "record", "by", "id", "with", "default", "primary", "key", ".", "<pre", ">", "Example", ":", "Record", "user", "=", "Db", ".", "findById", "(", "user", "15", ")", ";", "<", "/", "pre", ">" ]
train
https://github.com/jfinal/jfinal/blob/fc07f0f5d56e85ccd3cfcdd587b56b8dd9c663e9/src/main/java/com/jfinal/plugin/activerecord/Db.java#L313-L315
ops4j/org.ops4j.pax.logging
pax-logging-api/src/main/java/org/apache/logging/log4j/message/ParameterizedMessageFactory.java
ParameterizedMessageFactory.newMessage
@Override public Message newMessage(final String message, final Object... params) { """ Creates {@link ParameterizedMessage} instances. @param message The message pattern. @param params The message parameters. @return The Message. @see MessageFactory#newMessage(String, Object...) """ return...
java
@Override public Message newMessage(final String message, final Object... params) { return new ParameterizedMessage(message, params); }
[ "@", "Override", "public", "Message", "newMessage", "(", "final", "String", "message", ",", "final", "Object", "...", "params", ")", "{", "return", "new", "ParameterizedMessage", "(", "message", ",", "params", ")", ";", "}" ]
Creates {@link ParameterizedMessage} instances. @param message The message pattern. @param params The message parameters. @return The Message. @see MessageFactory#newMessage(String, Object...)
[ "Creates", "{", "@link", "ParameterizedMessage", "}", "instances", "." ]
train
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/apache/logging/log4j/message/ParameterizedMessageFactory.java#L61-L64
fcrepo3/fcrepo
fcrepo-server/src/main/java/org/fcrepo/server/rest/DatastreamResource.java
DatastreamResource.getDatastreamHistory
@Path("/ { """ Invoke API-M.getDatastreamHistory(context,pid,dsId) GET /objects/{pid}/datastreams/{dsID}/history @param pid the PID of the digital object @param dsID the ID of the datastream @param format the desired format. Either html or "xml" @return the response, either in XML or XHTML format """...
java
@Path("/{dsID}/history") @GET public Response getDatastreamHistory(@PathParam(RestParam.PID) String pid, @PathParam(RestParam.DSID) String dsID, @QueryParam(RestParam.FORMAT) @DefaultValue(HTML) String format, ...
[ "@", "Path", "(", "\"/{dsID}/history\"", ")", "@", "GET", "public", "Response", "getDatastreamHistory", "(", "@", "PathParam", "(", "RestParam", ".", "PID", ")", "String", "pid", ",", "@", "PathParam", "(", "RestParam", ".", "DSID", ")", "String", "dsID", ...
Invoke API-M.getDatastreamHistory(context,pid,dsId) GET /objects/{pid}/datastreams/{dsID}/history @param pid the PID of the digital object @param dsID the ID of the datastream @param format the desired format. Either html or "xml" @return the response, either in XML or XHTML format
[ "Invoke", "API", "-", "M", ".", "getDatastreamHistory", "(", "context", "pid", "dsId", ")", "GET", "/", "objects", "/", "{", "pid", "}", "/", "datastreams", "/", "{", "dsID", "}", "/", "history" ]
train
https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/rest/DatastreamResource.java#L206-L249
threerings/narya
core/src/main/java/com/threerings/presents/client/ClientDObjectMgr.java
ClientDObjectMgr.dispatchEvent
protected void dispatchEvent (int remoteOid, DObject target, DEvent event) { """ Dispatches an event on an already resolved target object. @param remoteOid is specified explicitly because we will have already translated the event's target oid into our local object managers oid space if we're acting on behalf o...
java
protected void dispatchEvent (int remoteOid, DObject target, DEvent event) { try { // apply the event to the object boolean notify = event.applyToObject(target); // if this is an object destroyed event, we need to remove the object from our table if (event in...
[ "protected", "void", "dispatchEvent", "(", "int", "remoteOid", ",", "DObject", "target", ",", "DEvent", "event", ")", "{", "try", "{", "// apply the event to the object", "boolean", "notify", "=", "event", ".", "applyToObject", "(", "target", ")", ";", "// if th...
Dispatches an event on an already resolved target object. @param remoteOid is specified explicitly because we will have already translated the event's target oid into our local object managers oid space if we're acting on behalf of the peer manager.
[ "Dispatches", "an", "event", "on", "an", "already", "resolved", "target", "object", "." ]
train
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/presents/client/ClientDObjectMgr.java#L323-L344
mapsforge/mapsforge
mapsforge-map/src/main/java/org/mapsforge/map/rendertheme/rule/RenderTheme.java
RenderTheme.matchLinearWay
public void matchLinearWay(RenderCallback renderCallback, final RenderContext renderContext, PolylineContainer way) { """ Matches a linear way with the given parameters against this RenderTheme. @param renderCallback the callback implementation which will be executed on each match. @param renderContext @param...
java
public void matchLinearWay(RenderCallback renderCallback, final RenderContext renderContext, PolylineContainer way) { matchWay(renderCallback, renderContext, Closed.NO, way); }
[ "public", "void", "matchLinearWay", "(", "RenderCallback", "renderCallback", ",", "final", "RenderContext", "renderContext", ",", "PolylineContainer", "way", ")", "{", "matchWay", "(", "renderCallback", ",", "renderContext", ",", "Closed", ".", "NO", ",", "way", "...
Matches a linear way with the given parameters against this RenderTheme. @param renderCallback the callback implementation which will be executed on each match. @param renderContext @param way
[ "Matches", "a", "linear", "way", "with", "the", "given", "parameters", "against", "this", "RenderTheme", "." ]
train
https://github.com/mapsforge/mapsforge/blob/c49c83f7f727552f793dff15cefa532ade030842/mapsforge-map/src/main/java/org/mapsforge/map/rendertheme/rule/RenderTheme.java#L122-L124
vanilladb/vanillacore
src/main/java/org/vanilladb/core/query/algebra/SelectPlan.java
SelectPlan.constantRangeBucket
public static Bucket constantRangeBucket(Bucket bkt, ConstantRange cRange) { """ Creates a new bucket by keeping the statistics of records and values in the specified bucket falling within the specified search range. <p> Assumes that: <ul> <li>Equality selection always finds matching records</li> <li>Value...
java
public static Bucket constantRangeBucket(Bucket bkt, ConstantRange cRange) { ConstantRange newRange = bkt.valueRange().intersect(cRange); if (!newRange.isValid()) return null; double newDistVals = bkt.distinctValues(newRange); if (Double.compare(newDistVals, 1.0) < 0) return null; double newFreq ...
[ "public", "static", "Bucket", "constantRangeBucket", "(", "Bucket", "bkt", ",", "ConstantRange", "cRange", ")", "{", "ConstantRange", "newRange", "=", "bkt", ".", "valueRange", "(", ")", ".", "intersect", "(", "cRange", ")", ";", "if", "(", "!", "newRange", ...
Creates a new bucket by keeping the statistics of records and values in the specified bucket falling within the specified search range. <p> Assumes that: <ul> <li>Equality selection always finds matching records</li> <li>Values in a bucket have the same frequency (uniform frequency)</li> </ul> @param bkt the input bu...
[ "Creates", "a", "new", "bucket", "by", "keeping", "the", "statistics", "of", "records", "and", "values", "in", "the", "specified", "bucket", "falling", "within", "the", "specified", "search", "range", "." ]
train
https://github.com/vanilladb/vanillacore/blob/d9a34e876b1b83226036d1fa982a614bbef59bd1/src/main/java/org/vanilladb/core/query/algebra/SelectPlan.java#L181-L193
cdk/cdk
doc/javadoc/source/XMIDoclet.java
XMIDoclet.generateUMLClass
private void generateUMLClass(ClassDoc[] classes, String pkgname) throws IOException { """ Method that serializes ClassDoc objects into &lt;UML:Class> elements. @param pkgs an array of ClassDoc objects """ for (int i=0; i<classes.length; i++) { ClassDoc c = classes[i]; out.pr...
java
private void generateUMLClass(ClassDoc[] classes, String pkgname) throws IOException { for (int i=0; i<classes.length; i++) { ClassDoc c = classes[i]; out.println(" <UML:Class stereotype=\"\" " + "package=\"" + pkgname + "\" " + ...
[ "private", "void", "generateUMLClass", "(", "ClassDoc", "[", "]", "classes", ",", "String", "pkgname", ")", "throws", "IOException", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "classes", ".", "length", ";", "i", "++", ")", "{", "ClassDoc", ...
Method that serializes ClassDoc objects into &lt;UML:Class> elements. @param pkgs an array of ClassDoc objects
[ "Method", "that", "serializes", "ClassDoc", "objects", "into", "&lt", ";", "UML", ":", "Class", ">", "elements", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/doc/javadoc/source/XMIDoclet.java#L92-L115
meertensinstituut/mtas
src/main/java/mtas/codec/tree/MtasRBTree.java
MtasRBTree.addRange
private MtasRBTreeNode addRange(MtasRBTreeNode n, Integer left, Integer right, int additionalId, long additionalRef, Integer id, Long ref) { """ Adds the range. @param n the n @param left the left @param right the right @param additionalId the additional id @param additionalRef the additional ref @pa...
java
private MtasRBTreeNode addRange(MtasRBTreeNode n, Integer left, Integer right, int additionalId, long additionalRef, Integer id, Long ref) { MtasRBTreeNode localN = n; if (localN == null) { String key = left.toString() + "_" + right.toString(); localN = new MtasRBTreeNode(left, right, MtasRBTr...
[ "private", "MtasRBTreeNode", "addRange", "(", "MtasRBTreeNode", "n", ",", "Integer", "left", ",", "Integer", "right", ",", "int", "additionalId", ",", "long", "additionalRef", ",", "Integer", "id", ",", "Long", "ref", ")", "{", "MtasRBTreeNode", "localN", "=",...
Adds the range. @param n the n @param left the left @param right the right @param additionalId the additional id @param additionalRef the additional ref @param id the id @param ref the ref @return the mtas RB tree node
[ "Adds", "the", "range", "." ]
train
https://github.com/meertensinstituut/mtas/blob/f02ae730848616bd88b553efa7f9eddc32818e64/src/main/java/mtas/codec/tree/MtasRBTree.java#L86-L116
looly/hutool
hutool-poi/src/main/java/cn/hutool/poi/excel/cell/CellUtil.java
CellUtil.getCellValue
public static Object getCellValue(Cell cell, CellType cellType, CellEditor cellEditor) { """ 获取单元格值<br> 如果单元格值为数字格式,则判断其格式中是否有小数部分,无则返回Long类型,否则返回Double类型 @param cell {@link Cell}单元格 @param cellType 单元格值类型{@link CellType}枚举,如果为{@code null}默认使用cell的类型 @param cellEditor 单元格值编辑器。可以通过此编辑器对单元格值做自定义操作 @return 值,类...
java
public static Object getCellValue(Cell cell, CellType cellType, CellEditor cellEditor) { if (null == cell) { return null; } if (null == cellType) { cellType = cell.getCellTypeEnum(); } Object value; switch (cellType) { case NUMERIC: value = getNumericValue(cell); break; case BO...
[ "public", "static", "Object", "getCellValue", "(", "Cell", "cell", ",", "CellType", "cellType", ",", "CellEditor", "cellEditor", ")", "{", "if", "(", "null", "==", "cell", ")", "{", "return", "null", ";", "}", "if", "(", "null", "==", "cellType", ")", ...
获取单元格值<br> 如果单元格值为数字格式,则判断其格式中是否有小数部分,无则返回Long类型,否则返回Double类型 @param cell {@link Cell}单元格 @param cellType 单元格值类型{@link CellType}枚举,如果为{@code null}默认使用cell的类型 @param cellEditor 单元格值编辑器。可以通过此编辑器对单元格值做自定义操作 @return 值,类型可能为:Date、Double、Boolean、String
[ "获取单元格值<br", ">", "如果单元格值为数字格式,则判断其格式中是否有小数部分,无则返回Long类型,否则返回Double类型" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-poi/src/main/java/cn/hutool/poi/excel/cell/CellUtil.java#L78-L110
looly/hutool
hutool-core/src/main/java/cn/hutool/core/convert/Convert.java
Convert.toEnum
public static <E extends Enum<E>> E toEnum(Class<E> clazz, Object value, E defaultValue) { """ 转换为Enum对象<br> 如果给定的值为空,或者转换失败,返回默认值<br> @param <E> 枚举类型 @param clazz Enum的Class @param value 值 @param defaultValue 默认值 @return Enum """ return (new GenericEnumConverter<>(clazz)).convert(value, defaultValu...
java
public static <E extends Enum<E>> E toEnum(Class<E> clazz, Object value, E defaultValue) { return (new GenericEnumConverter<>(clazz)).convert(value, defaultValue); }
[ "public", "static", "<", "E", "extends", "Enum", "<", "E", ">", ">", "E", "toEnum", "(", "Class", "<", "E", ">", "clazz", ",", "Object", "value", ",", "E", "defaultValue", ")", "{", "return", "(", "new", "GenericEnumConverter", "<>", "(", "clazz", ")...
转换为Enum对象<br> 如果给定的值为空,或者转换失败,返回默认值<br> @param <E> 枚举类型 @param clazz Enum的Class @param value 值 @param defaultValue 默认值 @return Enum
[ "转换为Enum对象<br", ">", "如果给定的值为空,或者转换失败,返回默认值<br", ">" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/convert/Convert.java#L474-L476
nats-io/java-nats-streaming
src/main/java/io/nats/streaming/StreamingConnectionFactory.java
StreamingConnectionFactory.createConnection
public StreamingConnection createConnection() throws IOException, InterruptedException { """ Creates an active connection to a NATS Streaming server. @return the StreamingConnection. @throws IOException if a StreamingConnection cannot be established for some reason. @throws InterruptedException if th...
java
public StreamingConnection createConnection() throws IOException, InterruptedException { StreamingConnectionImpl conn = new StreamingConnectionImpl(clusterId, clientId, options()); conn.connect(); return conn; }
[ "public", "StreamingConnection", "createConnection", "(", ")", "throws", "IOException", ",", "InterruptedException", "{", "StreamingConnectionImpl", "conn", "=", "new", "StreamingConnectionImpl", "(", "clusterId", ",", "clientId", ",", "options", "(", ")", ")", ";", ...
Creates an active connection to a NATS Streaming server. @return the StreamingConnection. @throws IOException if a StreamingConnection cannot be established for some reason. @throws InterruptedException if the calling thread is interrupted before the connection can be established
[ "Creates", "an", "active", "connection", "to", "a", "NATS", "Streaming", "server", "." ]
train
https://github.com/nats-io/java-nats-streaming/blob/72f964e9093622875d7f1c85ce60820e028863e7/src/main/java/io/nats/streaming/StreamingConnectionFactory.java#L61-L65
bramp/ffmpeg-cli-wrapper
src/main/java/net/bramp/ffmpeg/builder/FFmpegBuilder.java
FFmpegBuilder.addOutput
public FFmpegOutputBuilder addOutput(String filename) { """ Adds new output file. @param filename output file path @return A new {@link FFmpegOutputBuilder} """ FFmpegOutputBuilder output = new FFmpegOutputBuilder(this, filename); outputs.add(output); return output; }
java
public FFmpegOutputBuilder addOutput(String filename) { FFmpegOutputBuilder output = new FFmpegOutputBuilder(this, filename); outputs.add(output); return output; }
[ "public", "FFmpegOutputBuilder", "addOutput", "(", "String", "filename", ")", "{", "FFmpegOutputBuilder", "output", "=", "new", "FFmpegOutputBuilder", "(", "this", ",", "filename", ")", ";", "outputs", ".", "add", "(", "output", ")", ";", "return", "output", "...
Adds new output file. @param filename output file path @return A new {@link FFmpegOutputBuilder}
[ "Adds", "new", "output", "file", "." ]
train
https://github.com/bramp/ffmpeg-cli-wrapper/blob/3819b155edf9132acc75bb6af66dcef1b98c64b2/src/main/java/net/bramp/ffmpeg/builder/FFmpegBuilder.java#L226-L230
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/SqlUtility.java
SqlUtility.extractParametersFromString
public static Pair<String, List<Pair<String, TypeName>>> extractParametersFromString(String value, SQLiteModelMethod method, SQLiteEntity entity) { """ Extract from value string every placeholder :{}, replace it with ? and then convert every field typeName with column typeName. The result is a pair: the first va...
java
public static Pair<String, List<Pair<String, TypeName>>> extractParametersFromString(String value, SQLiteModelMethod method, SQLiteEntity entity) { String whereStatement = value; Pair<String, List<Pair<String, TypeName>>> result = new Pair<String, List<Pair<String, TypeName>>>(); result.value1 = new ArrayList<Pai...
[ "public", "static", "Pair", "<", "String", ",", "List", "<", "Pair", "<", "String", ",", "TypeName", ">", ">", ">", "extractParametersFromString", "(", "String", "value", ",", "SQLiteModelMethod", "method", ",", "SQLiteEntity", "entity", ")", "{", "String", ...
Extract from value string every placeholder :{}, replace it with ? and then convert every field typeName with column typeName. The result is a pair: the first value is the elaborated string. The second is the list of parameters associated to ?. This second parameter is the list of parameters and replaced with ?. @para...
[ "Extract", "from", "value", "string", "every", "placeholder", ":", "{}", "replace", "it", "with", "?", "and", "then", "convert", "every", "field", "typeName", "with", "column", "typeName", ".", "The", "result", "is", "a", "pair", ":", "the", "first", "valu...
train
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/SqlUtility.java#L63-L110
twotoasters/JazzyListView
library/src/main/java/com/twotoasters/jazzylistview/JazzyHelper.java
JazzyHelper.notifyAdditionalOnScrollStateChangedListener
private void notifyAdditionalOnScrollStateChangedListener(AbsListView view, int scrollState) { """ Notifies the OnScrollListener of an onScrollStateChanged event, since JazzyListView is the primary listener for onScrollStateChanged events. """ if (mAdditionalOnScrollListener != null) { mAdd...
java
private void notifyAdditionalOnScrollStateChangedListener(AbsListView view, int scrollState) { if (mAdditionalOnScrollListener != null) { mAdditionalOnScrollListener.onScrollStateChanged(view, scrollState); } }
[ "private", "void", "notifyAdditionalOnScrollStateChangedListener", "(", "AbsListView", "view", ",", "int", "scrollState", ")", "{", "if", "(", "mAdditionalOnScrollListener", "!=", "null", ")", "{", "mAdditionalOnScrollListener", ".", "onScrollStateChanged", "(", "view", ...
Notifies the OnScrollListener of an onScrollStateChanged event, since JazzyListView is the primary listener for onScrollStateChanged events.
[ "Notifies", "the", "OnScrollListener", "of", "an", "onScrollStateChanged", "event", "since", "JazzyListView", "is", "the", "primary", "listener", "for", "onScrollStateChanged", "events", "." ]
train
https://github.com/twotoasters/JazzyListView/blob/4a69239f90374a71e7d4073448ca049bd074f7fe/library/src/main/java/com/twotoasters/jazzylistview/JazzyHelper.java#L305-L309
Azure/azure-sdk-for-java
cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java
ModelsImpl.createHierarchicalEntityRoleAsync
public Observable<UUID> createHierarchicalEntityRoleAsync(UUID appId, String versionId, UUID hEntityId, CreateHierarchicalEntityRoleOptionalParameter createHierarchicalEntityRoleOptionalParameter) { """ Create an entity role for an entity in the application. @param appId The application ID. @param versionId Th...
java
public Observable<UUID> createHierarchicalEntityRoleAsync(UUID appId, String versionId, UUID hEntityId, CreateHierarchicalEntityRoleOptionalParameter createHierarchicalEntityRoleOptionalParameter) { return createHierarchicalEntityRoleWithServiceResponseAsync(appId, versionId, hEntityId, createHierarchicalEntity...
[ "public", "Observable", "<", "UUID", ">", "createHierarchicalEntityRoleAsync", "(", "UUID", "appId", ",", "String", "versionId", ",", "UUID", "hEntityId", ",", "CreateHierarchicalEntityRoleOptionalParameter", "createHierarchicalEntityRoleOptionalParameter", ")", "{", "return"...
Create an entity role for an entity in the application. @param appId The application ID. @param versionId The version ID. @param hEntityId The hierarchical entity extractor ID. @param createHierarchicalEntityRoleOptionalParameter the object representing the optional parameters to be set before calling this API @throws...
[ "Create", "an", "entity", "role", "for", "an", "entity", "in", "the", "application", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java#L9461-L9468
atomix/copycat
server/src/main/java/io/atomix/copycat/server/state/ActiveState.java
ActiveState.isLogUpToDate
boolean isLogUpToDate(long lastIndex, long lastTerm, Request request) { """ Returns a boolean value indicating whether the given candidate's log is up-to-date. """ // If the log is empty then vote for the candidate. if (context.getLog().isEmpty()) { LOGGER.trace("{} - Accepted {}: candidate's log...
java
boolean isLogUpToDate(long lastIndex, long lastTerm, Request request) { // If the log is empty then vote for the candidate. if (context.getLog().isEmpty()) { LOGGER.trace("{} - Accepted {}: candidate's log is up-to-date", context.getCluster().member().address(), request); return true; } // ...
[ "boolean", "isLogUpToDate", "(", "long", "lastIndex", ",", "long", "lastTerm", ",", "Request", "request", ")", "{", "// If the log is empty then vote for the candidate.", "if", "(", "context", ".", "getLog", "(", ")", ".", "isEmpty", "(", ")", ")", "{", "LOGGER"...
Returns a boolean value indicating whether the given candidate's log is up-to-date.
[ "Returns", "a", "boolean", "value", "indicating", "whether", "the", "given", "candidate", "s", "log", "is", "up", "-", "to", "-", "date", "." ]
train
https://github.com/atomix/copycat/blob/c90b88ccd5c63d6ea0b49fb77c25e2f3272a7b10/server/src/main/java/io/atomix/copycat/server/state/ActiveState.java#L274-L305
strator-dev/greenpepper-open
extensions-external/php/src/main/java/com/greenpepper/phpsud/container/PHPClassPath.java
PHPClassPath.getClassDescriptor
public PHPClassDescriptor getClassDescriptor(String className, PHPContainer container) throws PHPException { """ <p>getClassDescriptor.</p> @param className a {@link java.lang.String} object. @param container a {@link com.greenpepper.phpsud.container.PHPContainer} object. @return a {@link com.greenpepper.phps...
java
public PHPClassDescriptor getClassDescriptor(String className, PHPContainer container) throws PHPException { return PHPClassDescriptor.getClassDescriptor(className, container, classCache); }
[ "public", "PHPClassDescriptor", "getClassDescriptor", "(", "String", "className", ",", "PHPContainer", "container", ")", "throws", "PHPException", "{", "return", "PHPClassDescriptor", ".", "getClassDescriptor", "(", "className", ",", "container", ",", "classCache", ")",...
<p>getClassDescriptor.</p> @param className a {@link java.lang.String} object. @param container a {@link com.greenpepper.phpsud.container.PHPContainer} object. @return a {@link com.greenpepper.phpsud.container.PHPClassDescriptor} object. @throws com.greenpepper.phpsud.exceptions.PHPException if any.
[ "<p", ">", "getClassDescriptor", ".", "<", "/", "p", ">" ]
train
https://github.com/strator-dev/greenpepper-open/blob/71fd244b4989e9cd2d07ae62dd954a1f2a269a92/extensions-external/php/src/main/java/com/greenpepper/phpsud/container/PHPClassPath.java#L54-L56
wildfly/wildfly-core
controller/src/main/java/org/jboss/as/controller/services/path/PathManagerService.java
PathManagerService.addRelativePathService
final ServiceController<?> addRelativePathService(final ServiceTarget serviceTarget, final String pathName, final String path, final boolean possiblyAbsolute, final String relativeTo) { """ Install an {@code Service<String>} for the given path. @param serviceT...
java
final ServiceController<?> addRelativePathService(final ServiceTarget serviceTarget, final String pathName, final String path, final boolean possiblyAbsolute, final String relativeTo) { if (possiblyAbsolute && AbstractPathService.isAbsoluteUnixOrWindowsPath(...
[ "final", "ServiceController", "<", "?", ">", "addRelativePathService", "(", "final", "ServiceTarget", "serviceTarget", ",", "final", "String", "pathName", ",", "final", "String", "path", ",", "final", "boolean", "possiblyAbsolute", ",", "final", "String", "relativeT...
Install an {@code Service<String>} for the given path. @param serviceTarget the service target associated with the management operation making this request. Cannot be {@code null} @param pathName the name of the relevant path. Cannot be {@code null} @param path the value of the path within the model. This is either an...
[ "Install", "an", "{" ]
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/services/path/PathManagerService.java#L273-L280
fozziethebeat/S-Space
src/main/java/edu/ucla/sspace/common/StaticSemanticSpace.java
StaticSemanticSpace.loadFromFormat
private void loadFromFormat(InputStream is, SSpaceFormat format) throws IOException { """ Loads the semantic space data from the specified stream, using the format to determine how the data is layed out internally within the stream. @param is the input stream from which the semantic space will be r...
java
private void loadFromFormat(InputStream is, SSpaceFormat format) throws IOException { // NOTE: Use a LinkedHashMap here because this will ensure that the // words are returned in the same row-order as the matrix. This // generates better disk I/O behavior for accessing the matrix si...
[ "private", "void", "loadFromFormat", "(", "InputStream", "is", ",", "SSpaceFormat", "format", ")", "throws", "IOException", "{", "// NOTE: Use a LinkedHashMap here because this will ensure that the", "// words are returned in the same row-order as the matrix. This", "// generates bett...
Loads the semantic space data from the specified stream, using the format to determine how the data is layed out internally within the stream. @param is the input stream from which the semantic space will be read @param format the internal data formatting of the semantic space
[ "Loads", "the", "semantic", "space", "data", "from", "the", "specified", "stream", "using", "the", "format", "to", "determine", "how", "the", "data", "is", "layed", "out", "internally", "within", "the", "stream", "." ]
train
https://github.com/fozziethebeat/S-Space/blob/a608102737dfd3d59038a9ead33fe60356bc6029/src/main/java/edu/ucla/sspace/common/StaticSemanticSpace.java#L161-L196
apache/incubator-gobblin
gobblin-modules/gobblin-azkaban/src/main/java/org/apache/gobblin/service/modules/orchestration/AzkabanAjaxAPIClient.java
AzkabanAjaxAPIClient.getScheduledTimeInAzkabanFormat
@edu.umd.cs.findbugs.annotations.SuppressWarnings( value = "DMI_RANDOM_USED_ONLY_ONCE", justification = "As expected for randomization") public static String getScheduledTimeInAzkabanFormat(int windowStartHour, int windowEndHour, int delayMinutes) { """ * Generate a random scheduled time between spe...
java
@edu.umd.cs.findbugs.annotations.SuppressWarnings( value = "DMI_RANDOM_USED_ONLY_ONCE", justification = "As expected for randomization") public static String getScheduledTimeInAzkabanFormat(int windowStartHour, int windowEndHour, int delayMinutes) { // Validate if (windowStartHour < 0 || windowEnd...
[ "@", "edu", ".", "umd", ".", "cs", ".", "findbugs", ".", "annotations", ".", "SuppressWarnings", "(", "value", "=", "\"DMI_RANDOM_USED_ONLY_ONCE\"", ",", "justification", "=", "\"As expected for randomization\"", ")", "public", "static", "String", "getScheduledTimeInA...
* Generate a random scheduled time between specified execution time window in the Azkaban compatible format which is: hh,mm,a,z Eg. ScheduleTime=12,00,PM,PDT @param windowStartHour Window start hour in 24 hr (HH) format (inclusive) @param windowEndHour Window end hour in 24 hr (HH) format (exclusive) @param delayMinut...
[ "*", "Generate", "a", "random", "scheduled", "time", "between", "specified", "execution", "time", "window", "in", "the", "Azkaban", "compatible", "format", "which", "is", ":", "hh", "mm", "a", "z", "Eg", ".", "ScheduleTime", "=", "12", "00", "PM", "PDT" ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-modules/gobblin-azkaban/src/main/java/org/apache/gobblin/service/modules/orchestration/AzkabanAjaxAPIClient.java#L427-L471
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/query/parse/BasicSqlQueryParser.java
BasicSqlQueryParser.removeBracketsAndQuotes
protected String removeBracketsAndQuotes( String text, Position position ) { """ Remove all leading and trailing single-quotes, double-quotes, or square brackets from the supplied text. If multiple, properly-paired quotes or brackets are found, they will all be remove...
java
protected String removeBracketsAndQuotes( String text, Position position ) { return removeBracketsAndQuotes(text, true, position); }
[ "protected", "String", "removeBracketsAndQuotes", "(", "String", "text", ",", "Position", "position", ")", "{", "return", "removeBracketsAndQuotes", "(", "text", ",", "true", ",", "position", ")", ";", "}" ]
Remove all leading and trailing single-quotes, double-quotes, or square brackets from the supplied text. If multiple, properly-paired quotes or brackets are found, they will all be removed. @param text the input text; may not be null @param position the position of the text; may not be null @return the text without le...
[ "Remove", "all", "leading", "and", "trailing", "single", "-", "quotes", "double", "-", "quotes", "or", "square", "brackets", "from", "the", "supplied", "text", ".", "If", "multiple", "properly", "-", "paired", "quotes", "or", "brackets", "are", "found", "the...
train
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/query/parse/BasicSqlQueryParser.java#L1353-L1356
OpenLiberty/open-liberty
dev/com.ibm.ws.kernel.feature.core/src/com/ibm/ws/kernel/feature/internal/PackageInspectorImpl.java
PackageInspectorImpl.listKernelBlackListApiPackages
public Iterator<String> listKernelBlackListApiPackages() { """ This iterator will walk the package index, returning only packages that indicate they are API packages and are included both by the kernel (core)feature and another enabled liberty feature or features. @see com.ibm.ws.kernel.provisioning.packages....
java
public Iterator<String> listKernelBlackListApiPackages() { ProductPackages index = packageIndex; if (index != null) { return index.packageIterator(new Filter<PackageInfo>() { @Override public boolean includeValue(String packageName, PackageInfo value) { ...
[ "public", "Iterator", "<", "String", ">", "listKernelBlackListApiPackages", "(", ")", "{", "ProductPackages", "index", "=", "packageIndex", ";", "if", "(", "index", "!=", "null", ")", "{", "return", "index", ".", "packageIterator", "(", "new", "Filter", "<", ...
This iterator will walk the package index, returning only packages that indicate they are API packages and are included both by the kernel (core)feature and another enabled liberty feature or features. @see com.ibm.ws.kernel.provisioning.packages.SharedPackageInspector#listKernelApiPackages()
[ "This", "iterator", "will", "walk", "the", "package", "index", "returning", "only", "packages", "that", "indicate", "they", "are", "API", "packages", "and", "are", "included", "both", "by", "the", "kernel", "(", "core", ")", "feature", "and", "another", "ena...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.kernel.feature.core/src/com/ibm/ws/kernel/feature/internal/PackageInspectorImpl.java#L475-L487
graknlabs/grakn
server/src/server/exception/TransactionException.java
TransactionException.hasNotAllowed
public static TransactionException hasNotAllowed(Thing thing, Attribute attribute) { """ Thrown when a Thing is not allowed to have Attribute of that AttributeType """ return create(HAS_INVALID.getMessage(thing.type().label(), attribute.type().label())); }
java
public static TransactionException hasNotAllowed(Thing thing, Attribute attribute) { return create(HAS_INVALID.getMessage(thing.type().label(), attribute.type().label())); }
[ "public", "static", "TransactionException", "hasNotAllowed", "(", "Thing", "thing", ",", "Attribute", "attribute", ")", "{", "return", "create", "(", "HAS_INVALID", ".", "getMessage", "(", "thing", ".", "type", "(", ")", ".", "label", "(", ")", ",", "attribu...
Thrown when a Thing is not allowed to have Attribute of that AttributeType
[ "Thrown", "when", "a", "Thing", "is", "not", "allowed", "to", "have", "Attribute", "of", "that", "AttributeType" ]
train
https://github.com/graknlabs/grakn/blob/6aaee75ea846202474d591f8809d62028262fac5/server/src/server/exception/TransactionException.java#L93-L95
pryzach/midao
midao-jdbc-core/src/main/java/org/midao/jdbc/core/metadata/BaseMetadataHandler.java
BaseMetadataHandler.processSchemaName
private String processSchemaName(String dbProductName, String userName, String schemaName) { """ Processes Schema name so it would be compatible with database @param dbProductName short database name @param userName user name @param schemaName schema name which would be processed @return processed sc...
java
private String processSchemaName(String dbProductName, String userName, String schemaName) { String result = null; if (schemaName != null) { result = schemaName.toUpperCase(); } else { if ("DB2".equals(dbProductName) == true || "Apache Derby".equals(dbProductName) ...
[ "private", "String", "processSchemaName", "(", "String", "dbProductName", ",", "String", "userName", ",", "String", "schemaName", ")", "{", "String", "result", "=", "null", ";", "if", "(", "schemaName", "!=", "null", ")", "{", "result", "=", "schemaName", "....
Processes Schema name so it would be compatible with database @param dbProductName short database name @param userName user name @param schemaName schema name which would be processed @return processed schema name
[ "Processes", "Schema", "name", "so", "it", "would", "be", "compatible", "with", "database" ]
train
https://github.com/pryzach/midao/blob/ed9048ed2c792a4794a2116a25779dfb84cd9447/midao-jdbc-core/src/main/java/org/midao/jdbc/core/metadata/BaseMetadataHandler.java#L252-L269
datacleaner/DataCleaner
engine/env/cluster/src/main/java/org/datacleaner/cluster/http/SlaveServletHelper.java
SlaveServletHelper.handleRequest
public void handleRequest(final HttpServletRequest request, final HttpServletResponse response) throws IOException { """ Completely handles a HTTP request and response. This method is functionally equivalent of calling these methods in sequence: {@link #readJob(HttpServletRequest)} {@link #runJob(AnalysisJo...
java
public void handleRequest(final HttpServletRequest request, final HttpServletResponse response) throws IOException { handleRequest(request, response, new AnalysisListener[0]); }
[ "public", "void", "handleRequest", "(", "final", "HttpServletRequest", "request", ",", "final", "HttpServletResponse", "response", ")", "throws", "IOException", "{", "handleRequest", "(", "request", ",", "response", ",", "new", "AnalysisListener", "[", "0", "]", "...
Completely handles a HTTP request and response. This method is functionally equivalent of calling these methods in sequence: {@link #readJob(HttpServletRequest)} {@link #runJob(AnalysisJob, String)} {@link #serializeResult(AnalysisResultFuture, String)} {@link #sendResponse(HttpServletResponse, Serializable)} @par...
[ "Completely", "handles", "a", "HTTP", "request", "and", "response", ".", "This", "method", "is", "functionally", "equivalent", "of", "calling", "these", "methods", "in", "sequence", ":" ]
train
https://github.com/datacleaner/DataCleaner/blob/9aa01fdac3560cef51c55df3cb2ac5c690b57639/engine/env/cluster/src/main/java/org/datacleaner/cluster/http/SlaveServletHelper.java#L142-L144
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/factory/H2GISFunctions.java
H2GISFunctions.registerH2GISFunctions
private static void registerH2GISFunctions(Connection connection, String packagePrepend) throws SQLException { """ Register all H2GIS functions @param connection JDBC Connection @param packagePrepend For OSGi environment only, use Bundle-SymbolicName:Bundle-Version: @throws SQLException """ State...
java
private static void registerH2GISFunctions(Connection connection, String packagePrepend) throws SQLException { Statement st = connection.createStatement(); for (Function function : getBuiltInsFunctions()) { try { registerFunction(st, function, packagePrepend); } c...
[ "private", "static", "void", "registerH2GISFunctions", "(", "Connection", "connection", ",", "String", "packagePrepend", ")", "throws", "SQLException", "{", "Statement", "st", "=", "connection", ".", "createStatement", "(", ")", ";", "for", "(", "Function", "funct...
Register all H2GIS functions @param connection JDBC Connection @param packagePrepend For OSGi environment only, use Bundle-SymbolicName:Bundle-Version: @throws SQLException
[ "Register", "all", "H2GIS", "functions" ]
train
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/factory/H2GISFunctions.java#L535-L545
inferred/FreeBuilder
src/main/java/org/inferred/freebuilder/processor/model/ModelUtils.java
ModelUtils.upperBound
public static TypeMirror upperBound(Elements elements, TypeMirror type) { """ Returns the upper bound of {@code type}.<ul> <li>T -> T <li>? -> Object <li>? extends T -> T <li>? super T -> Object </ul> """ if (type.getKind() == TypeKind.WILDCARD) { WildcardType wildcard = (WildcardType) type; ...
java
public static TypeMirror upperBound(Elements elements, TypeMirror type) { if (type.getKind() == TypeKind.WILDCARD) { WildcardType wildcard = (WildcardType) type; type = wildcard.getExtendsBound(); if (type == null) { type = elements.getTypeElement(Object.class.getName()).asType(); } ...
[ "public", "static", "TypeMirror", "upperBound", "(", "Elements", "elements", ",", "TypeMirror", "type", ")", "{", "if", "(", "type", ".", "getKind", "(", ")", "==", "TypeKind", ".", "WILDCARD", ")", "{", "WildcardType", "wildcard", "=", "(", "WildcardType", ...
Returns the upper bound of {@code type}.<ul> <li>T -> T <li>? -> Object <li>? extends T -> T <li>? super T -> Object </ul>
[ "Returns", "the", "upper", "bound", "of", "{" ]
train
https://github.com/inferred/FreeBuilder/blob/d5a222f90648aece135da4b971c55a60afe8649c/src/main/java/org/inferred/freebuilder/processor/model/ModelUtils.java#L321-L330
duracloud/duracloud
storageprovider/src/main/java/org/duracloud/storage/util/StorageProviderUtil.java
StorageProviderUtil.contains
public static boolean contains(Iterator<String> iterator, String value) { """ Determines if a String value is included in a Iterated list. The iteration is only run as far as necessary to determine if the value is included in the underlying list. @param iterator @param value @return """ if (iter...
java
public static boolean contains(Iterator<String> iterator, String value) { if (iterator == null || value == null) { return false; } while (iterator.hasNext()) { if (value.equals(iterator.next())) { return true; } } return false; ...
[ "public", "static", "boolean", "contains", "(", "Iterator", "<", "String", ">", "iterator", ",", "String", "value", ")", "{", "if", "(", "iterator", "==", "null", "||", "value", "==", "null", ")", "{", "return", "false", ";", "}", "while", "(", "iterat...
Determines if a String value is included in a Iterated list. The iteration is only run as far as necessary to determine if the value is included in the underlying list. @param iterator @param value @return
[ "Determines", "if", "a", "String", "value", "is", "included", "in", "a", "Iterated", "list", ".", "The", "iteration", "is", "only", "run", "as", "far", "as", "necessary", "to", "determine", "if", "the", "value", "is", "included", "in", "the", "underlying",...
train
https://github.com/duracloud/duracloud/blob/dc4f3a1716d43543cc3b2e1880605f9389849b66/storageprovider/src/main/java/org/duracloud/storage/util/StorageProviderUtil.java#L165-L175
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/properties/ST_GeometryN.java
ST_GeometryN.getGeometryN
public static Geometry getGeometryN(Geometry geometry, Integer n) throws SQLException { """ Return Geometry number n from the given GeometryCollection. @param geometry GeometryCollection @param n Index of Geometry number n in [1-N] @return Geometry number n or Null if parameter is null. @throws SQLExc...
java
public static Geometry getGeometryN(Geometry geometry, Integer n) throws SQLException { if (geometry == null) { return null; } if (n >= 1 && n <= geometry.getNumGeometries()) { return geometry.getGeometryN(n - 1); } else { throw new SQLException(OUT_OF...
[ "public", "static", "Geometry", "getGeometryN", "(", "Geometry", "geometry", ",", "Integer", "n", ")", "throws", "SQLException", "{", "if", "(", "geometry", "==", "null", ")", "{", "return", "null", ";", "}", "if", "(", "n", ">=", "1", "&&", "n", "<=",...
Return Geometry number n from the given GeometryCollection. @param geometry GeometryCollection @param n Index of Geometry number n in [1-N] @return Geometry number n or Null if parameter is null. @throws SQLException
[ "Return", "Geometry", "number", "n", "from", "the", "given", "GeometryCollection", "." ]
train
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/properties/ST_GeometryN.java#L61-L70
dmurph/jgoogleanalyticstracker
src/main/java/com/dmurph/tracking/JGoogleAnalyticsTracker.java
JGoogleAnalyticsTracker.trackPageViewFromSearch
public void trackPageViewFromSearch(String argPageURL, String argPageTitle, String argHostName, String argSearchSource, String argSearchKeywords) { """ Tracks a page view. @param argPageURL required, Google won't track without it. Ex: <code>"org/me/javaclass.java"</code>, or anything you want as the page url...
java
public void trackPageViewFromSearch(String argPageURL, String argPageTitle, String argHostName, String argSearchSource, String argSearchKeywords) { if (argPageURL == null) { throw new IllegalArgumentException("Page URL cannot be null, Google will not track the data."); } AnalyticsReq...
[ "public", "void", "trackPageViewFromSearch", "(", "String", "argPageURL", ",", "String", "argPageTitle", ",", "String", "argHostName", ",", "String", "argSearchSource", ",", "String", "argSearchKeywords", ")", "{", "if", "(", "argPageURL", "==", "null", ")", "{", ...
Tracks a page view. @param argPageURL required, Google won't track without it. Ex: <code>"org/me/javaclass.java"</code>, or anything you want as the page url. @param argPageTitle content title @param argHostName the host name for the url @param argSearchSource source of the search engine. ex: google @param argSearchKe...
[ "Tracks", "a", "page", "view", "." ]
train
https://github.com/dmurph/jgoogleanalyticstracker/blob/69f68caf8e09a53e6f6076477bf05b84bc80e386/src/main/java/com/dmurph/tracking/JGoogleAnalyticsTracker.java#L345-L355
feedzai/pdb
src/main/java/com/feedzai/commons/sql/abstraction/dml/dialect/SqlBuilder.java
SqlBuilder.notBetween
public static Between notBetween(final Expression exp1, final Expression exp2, final Expression exp3) { """ The NOT BETWEEN operator. @param exp1 The column. @param exp2 The first bound. @param exp3 The second bound. @return The between expression. """ return new Between(exp1, and(exp2, exp3)).no...
java
public static Between notBetween(final Expression exp1, final Expression exp2, final Expression exp3) { return new Between(exp1, and(exp2, exp3)).not(); }
[ "public", "static", "Between", "notBetween", "(", "final", "Expression", "exp1", ",", "final", "Expression", "exp2", ",", "final", "Expression", "exp3", ")", "{", "return", "new", "Between", "(", "exp1", ",", "and", "(", "exp2", ",", "exp3", ")", ")", "....
The NOT BETWEEN operator. @param exp1 The column. @param exp2 The first bound. @param exp3 The second bound. @return The between expression.
[ "The", "NOT", "BETWEEN", "operator", "." ]
train
https://github.com/feedzai/pdb/blob/fe07ca08417e0ddcd620a36aa1fdbca7f338be98/src/main/java/com/feedzai/commons/sql/abstraction/dml/dialect/SqlBuilder.java#L729-L731
Omertron/api-themoviedb
src/main/java/com/omertron/themoviedbapi/methods/TmdbEpisodes.java
TmdbEpisodes.getEpisodeAccountState
public MediaState getEpisodeAccountState(int tvID, int seasonNumber, int episodeNumber, String sessionID) throws MovieDbException { """ This method lets users get the status of whether or not the TV episode has been rated. A valid session id is required. @param tvID @param seasonNumber @param episodeNumbe...
java
public MediaState getEpisodeAccountState(int tvID, int seasonNumber, int episodeNumber, String sessionID) throws MovieDbException { TmdbParameters parameters = new TmdbParameters(); parameters.add(Param.ID, tvID); parameters.add(Param.SESSION_ID, sessionID); parameters.add(Param.SEASON_N...
[ "public", "MediaState", "getEpisodeAccountState", "(", "int", "tvID", ",", "int", "seasonNumber", ",", "int", "episodeNumber", ",", "String", "sessionID", ")", "throws", "MovieDbException", "{", "TmdbParameters", "parameters", "=", "new", "TmdbParameters", "(", ")",...
This method lets users get the status of whether or not the TV episode has been rated. A valid session id is required. @param tvID @param seasonNumber @param episodeNumber @param sessionID @return @throws MovieDbException
[ "This", "method", "lets", "users", "get", "the", "status", "of", "whether", "or", "not", "the", "TV", "episode", "has", "been", "rated", "." ]
train
https://github.com/Omertron/api-themoviedb/blob/bf132d7c7271734e13b58ba3bc92bba46f220118/src/main/java/com/omertron/themoviedbapi/methods/TmdbEpisodes.java#L122-L137
Azure/azure-sdk-for-java
network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/NetworkWatchersInner.java
NetworkWatchersInner.getTroubleshooting
public TroubleshootingResultInner getTroubleshooting(String resourceGroupName, String networkWatcherName, TroubleshootingParameters parameters) { """ Initiate troubleshooting on a specified resource. @param resourceGroupName The name of the resource group. @param networkWatcherName The name of the network watc...
java
public TroubleshootingResultInner getTroubleshooting(String resourceGroupName, String networkWatcherName, TroubleshootingParameters parameters) { return getTroubleshootingWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).toBlocking().last().body(); }
[ "public", "TroubleshootingResultInner", "getTroubleshooting", "(", "String", "resourceGroupName", ",", "String", "networkWatcherName", ",", "TroubleshootingParameters", "parameters", ")", "{", "return", "getTroubleshootingWithServiceResponseAsync", "(", "resourceGroupName", ",", ...
Initiate troubleshooting on a specified resource. @param resourceGroupName The name of the resource group. @param networkWatcherName The name of the network watcher resource. @param parameters Parameters that define the resource to troubleshoot. @throws IllegalArgumentException thrown if parameters fail the validation...
[ "Initiate", "troubleshooting", "on", "a", "specified", "resource", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/NetworkWatchersInner.java#L1464-L1466
alkacon/opencms-core
src/org/opencms/ui/apps/lists/CmsResultFacets.java
CmsResultFacets.selectFieldFacet
void selectFieldFacet(String field, String value) { """ Selects the given field facet.<p> @param field the field name @param value the value """ m_selectedFieldFacets.clear(); m_selectedRangeFacets.clear(); m_selectedFieldFacets.put(field, Collections.singletonList(value)); ...
java
void selectFieldFacet(String field, String value) { m_selectedFieldFacets.clear(); m_selectedRangeFacets.clear(); m_selectedFieldFacets.put(field, Collections.singletonList(value)); m_manager.search(m_selectedFieldFacets, m_selectedRangeFacets); }
[ "void", "selectFieldFacet", "(", "String", "field", ",", "String", "value", ")", "{", "m_selectedFieldFacets", ".", "clear", "(", ")", ";", "m_selectedRangeFacets", ".", "clear", "(", ")", ";", "m_selectedFieldFacets", ".", "put", "(", "field", ",", "Collectio...
Selects the given field facet.<p> @param field the field name @param value the value
[ "Selects", "the", "given", "field", "facet", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/apps/lists/CmsResultFacets.java#L193-L199
Alluxio/alluxio
core/common/src/main/java/alluxio/util/LogUtils.java
LogUtils.setLogLevel
public static LogInfo setLogLevel(String logName, String level) throws IOException { """ Gets a logger's level with specify name, if the level argument is not null, it will set to specify level first. @param logName logger's name @param level logger's level @return an entity object about the log info @throws ...
java
public static LogInfo setLogLevel(String logName, String level) throws IOException { LogInfo result = new LogInfo(); if (StringUtils.isNotBlank(logName)) { result.setLogName(logName); Log log = LogFactory.getLog(logName); Logger logger = LoggerFactory.getLogger(logName); if (log instance...
[ "public", "static", "LogInfo", "setLogLevel", "(", "String", "logName", ",", "String", "level", ")", "throws", "IOException", "{", "LogInfo", "result", "=", "new", "LogInfo", "(", ")", ";", "if", "(", "StringUtils", ".", "isNotBlank", "(", "logName", ")", ...
Gets a logger's level with specify name, if the level argument is not null, it will set to specify level first. @param logName logger's name @param level logger's level @return an entity object about the log info @throws IOException if an I/O error occurs
[ "Gets", "a", "logger", "s", "level", "with", "specify", "name", "if", "the", "level", "argument", "is", "not", "null", "it", "will", "set", "to", "specify", "level", "first", "." ]
train
https://github.com/Alluxio/alluxio/blob/af38cf3ab44613355b18217a3a4d961f8fec3a10/core/common/src/main/java/alluxio/util/LogUtils.java#L47-L73
BigBadaboom/androidsvg
androidsvg/src/main/java/com/caverock/androidsvg/SVGAndroidRenderer.java
SVGAndroidRenderer.findInheritFromAncestorState
private RendererState findInheritFromAncestorState(SvgObject obj) { """ /* Determine an elements style based on it's ancestors in the tree rather than it's render time ancestors. """ RendererState newState = new RendererState(); updateStyle(newState, Style.getDefaultStyle()); return fin...
java
private RendererState findInheritFromAncestorState(SvgObject obj) { RendererState newState = new RendererState(); updateStyle(newState, Style.getDefaultStyle()); return findInheritFromAncestorState(obj, newState); }
[ "private", "RendererState", "findInheritFromAncestorState", "(", "SvgObject", "obj", ")", "{", "RendererState", "newState", "=", "new", "RendererState", "(", ")", ";", "updateStyle", "(", "newState", ",", "Style", ".", "getDefaultStyle", "(", ")", ")", ";", "ret...
/* Determine an elements style based on it's ancestors in the tree rather than it's render time ancestors.
[ "/", "*", "Determine", "an", "elements", "style", "based", "on", "it", "s", "ancestors", "in", "the", "tree", "rather", "than", "it", "s", "render", "time", "ancestors", "." ]
train
https://github.com/BigBadaboom/androidsvg/blob/0d1614dd1a4da10ea4afe3b0cea1361a4ac6b45a/androidsvg/src/main/java/com/caverock/androidsvg/SVGAndroidRenderer.java#L3220-L3225
google/error-prone-javac
src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassWriter.java
ClassWriter.writeEnclosingMethodAttribute
protected int writeEnclosingMethodAttribute(Name attributeName, ClassSymbol c) { """ Write the EnclosingMethod attribute with a specified name. Returns the number of attributes written (0 or 1). """ if (c.owner.kind != MTH && // neither a local class c.name != names.empty) // nor anonymous...
java
protected int writeEnclosingMethodAttribute(Name attributeName, ClassSymbol c) { if (c.owner.kind != MTH && // neither a local class c.name != names.empty) // nor anonymous return 0; int alenIdx = writeAttr(attributeName); ClassSymbol enclClass = c.owner.enclClass(); ...
[ "protected", "int", "writeEnclosingMethodAttribute", "(", "Name", "attributeName", ",", "ClassSymbol", "c", ")", "{", "if", "(", "c", ".", "owner", ".", "kind", "!=", "MTH", "&&", "// neither a local class", "c", ".", "name", "!=", "names", ".", "empty", ")"...
Write the EnclosingMethod attribute with a specified name. Returns the number of attributes written (0 or 1).
[ "Write", "the", "EnclosingMethod", "attribute", "with", "a", "specified", "name", ".", "Returns", "the", "number", "of", "attributes", "written", "(", "0", "or", "1", ")", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassWriter.java#L546-L562
groovy/groovy-core
src/main/org/codehaus/groovy/runtime/StringGroovyMethods.java
StringGroovyMethods.asType
public static <T> T asType(CharSequence self, Class<T> c) { """ <p>Provides a method to perform custom 'dynamic' type conversion to the given class using the <code>as</code> operator. @param self a CharSequence @param c the desired class @return the converted object @see #asType(String, Class) @since 1....
java
public static <T> T asType(CharSequence self, Class<T> c) { return asType(self.toString(), c); }
[ "public", "static", "<", "T", ">", "T", "asType", "(", "CharSequence", "self", ",", "Class", "<", "T", ">", "c", ")", "{", "return", "asType", "(", "self", ".", "toString", "(", ")", ",", "c", ")", ";", "}" ]
<p>Provides a method to perform custom 'dynamic' type conversion to the given class using the <code>as</code> operator. @param self a CharSequence @param c the desired class @return the converted object @see #asType(String, Class) @since 1.8.2
[ "<p", ">", "Provides", "a", "method", "to", "perform", "custom", "dynamic", "type", "conversion", "to", "the", "given", "class", "using", "the", "<code", ">", "as<", "/", "code", ">", "operator", "." ]
train
https://github.com/groovy/groovy-core/blob/01309f9d4be34ddf93c4a9943b5a97843bff6181/src/main/org/codehaus/groovy/runtime/StringGroovyMethods.java#L139-L141
kuali/ojb-1.0.4
src/java/org/apache/ojb/broker/core/MtoNBroker.java
MtoNBroker.deleteMtoNImplementor
public void deleteMtoNImplementor(CollectionDescriptor cod, Object obj) { """ delete all rows from m:n table belonging to obj @param cod @param obj """ ClassDescriptor cld = pb.getDescriptorRepository().getDescriptorFor(obj.getClass()); ValueContainer[] pkValues = pb.serviceBrokerHelper()...
java
public void deleteMtoNImplementor(CollectionDescriptor cod, Object obj) { ClassDescriptor cld = pb.getDescriptorRepository().getDescriptorFor(obj.getClass()); ValueContainer[] pkValues = pb.serviceBrokerHelper().getKeyValues(cld, obj); String[] pkColumns = cod.getFksToThisClass(); ...
[ "public", "void", "deleteMtoNImplementor", "(", "CollectionDescriptor", "cod", ",", "Object", "obj", ")", "{", "ClassDescriptor", "cld", "=", "pb", ".", "getDescriptorRepository", "(", ")", ".", "getDescriptorFor", "(", "obj", ".", "getClass", "(", ")", ")", "...
delete all rows from m:n table belonging to obj @param cod @param obj
[ "delete", "all", "rows", "from", "m", ":", "n", "table", "belonging", "to", "obj" ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/core/MtoNBroker.java#L196-L204
Azure/azure-sdk-for-java
cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/PermissionsImpl.java
PermissionsImpl.addAsync
public Observable<OperationStatus> addAsync(UUID appId, AddPermissionsOptionalParameter addOptionalParameter) { """ Adds a user to the allowed list of users to access this LUIS application. Users are added using their email address. @param appId The application ID. @param addOptionalParameter the object repres...
java
public Observable<OperationStatus> addAsync(UUID appId, AddPermissionsOptionalParameter addOptionalParameter) { return addWithServiceResponseAsync(appId, addOptionalParameter).map(new Func1<ServiceResponse<OperationStatus>, OperationStatus>() { @Override public OperationStatus call(Servi...
[ "public", "Observable", "<", "OperationStatus", ">", "addAsync", "(", "UUID", "appId", ",", "AddPermissionsOptionalParameter", "addOptionalParameter", ")", "{", "return", "addWithServiceResponseAsync", "(", "appId", ",", "addOptionalParameter", ")", ".", "map", "(", "...
Adds a user to the allowed list of users to access this LUIS application. Users are added using their email address. @param appId The application ID. @param addOptionalParameter the object representing the optional parameters to be set before calling this API @throws IllegalArgumentException thrown if parameters fail ...
[ "Adds", "a", "user", "to", "the", "allowed", "list", "of", "users", "to", "access", "this", "LUIS", "application", ".", "Users", "are", "added", "using", "their", "email", "address", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/PermissionsImpl.java#L200-L207
couchbase/java-dcp-client
src/main/java/com/couchbase/client/dcp/transport/netty/DcpLoggingHandler.java
DcpLoggingHandler.formatByteBufHolder
protected String formatByteBufHolder(String eventName, ByteBufHolder msg) { """ Returns a String which contains all details to log the {@link ByteBufHolder}. <p> By default this method just delegates to {@link #formatByteBuf(String, ByteBuf)}, using the content of the {@link ByteBufHolder}. Sub-classes may over...
java
protected String formatByteBufHolder(String eventName, ByteBufHolder msg) { return formatByteBuf(eventName, msg.content()); }
[ "protected", "String", "formatByteBufHolder", "(", "String", "eventName", ",", "ByteBufHolder", "msg", ")", "{", "return", "formatByteBuf", "(", "eventName", ",", "msg", ".", "content", "(", ")", ")", ";", "}" ]
Returns a String which contains all details to log the {@link ByteBufHolder}. <p> By default this method just delegates to {@link #formatByteBuf(String, ByteBuf)}, using the content of the {@link ByteBufHolder}. Sub-classes may override this.
[ "Returns", "a", "String", "which", "contains", "all", "details", "to", "log", "the", "{" ]
train
https://github.com/couchbase/java-dcp-client/blob/75359d8c081d6c575f8087cf7c28d24ab24c6421/src/main/java/com/couchbase/client/dcp/transport/netty/DcpLoggingHandler.java#L114-L116
TheHortonMachine/hortonmachine
dbs/src/main/java/org/hortonmachine/dbs/mbtiles/MBTilesDb.java
MBTilesDb.getBounds
public Envelope getBounds() throws Exception { """ Get the db envelope. @return the Envelope of the dataset. @throws Exception """ checkMetadata(); String boundsWSEN = metadataMap.get("bounds"); String[] split = boundsWSEN.split(","); double w = Double.parseDouble(split[0]);...
java
public Envelope getBounds() throws Exception { checkMetadata(); String boundsWSEN = metadataMap.get("bounds"); String[] split = boundsWSEN.split(","); double w = Double.parseDouble(split[0]); double s = Double.parseDouble(split[1]); double e = Double.parseDouble(split[2])...
[ "public", "Envelope", "getBounds", "(", ")", "throws", "Exception", "{", "checkMetadata", "(", ")", ";", "String", "boundsWSEN", "=", "metadataMap", ".", "get", "(", "\"bounds\"", ")", ";", "String", "[", "]", "split", "=", "boundsWSEN", ".", "split", "(",...
Get the db envelope. @return the Envelope of the dataset. @throws Exception
[ "Get", "the", "db", "envelope", "." ]
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/dbs/src/main/java/org/hortonmachine/dbs/mbtiles/MBTilesDb.java#L294-L303
dita-ot/dita-ot
src/main/java/org/dita/dost/module/BranchFilterModule.java
BranchFilterModule.filterTopics
private void filterTopics(final Element topicref, final List<FilterUtils> filters) { """ Modify and filter topics for branches. These files use an existing file name. """ final List<FilterUtils> fs = combineFilterUtils(topicref, filters); final String href = topicref.getAttribute(ATTRIBUTE_NAM...
java
private void filterTopics(final Element topicref, final List<FilterUtils> filters) { final List<FilterUtils> fs = combineFilterUtils(topicref, filters); final String href = topicref.getAttribute(ATTRIBUTE_NAME_HREF); final Attr skipFilter = topicref.getAttributeNode(SKIP_FILTER); final ...
[ "private", "void", "filterTopics", "(", "final", "Element", "topicref", ",", "final", "List", "<", "FilterUtils", ">", "filters", ")", "{", "final", "List", "<", "FilterUtils", ">", "fs", "=", "combineFilterUtils", "(", "topicref", ",", "filters", ")", ";", ...
Modify and filter topics for branches. These files use an existing file name.
[ "Modify", "and", "filter", "topics", "for", "branches", ".", "These", "files", "use", "an", "existing", "file", "name", "." ]
train
https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/module/BranchFilterModule.java#L391-L428
voldemort/voldemort
src/java/voldemort/tools/admin/AdminParserUtils.java
AdminParserUtils.checkRequired
public static void checkRequired(OptionSet options, String opt1, String opt2) throws VoldemortException { """ Checks if there's exactly one option that exists among all possible opts. @param options OptionSet to checked @param opt1 Possible required option to check @param opt2 Possible required op...
java
public static void checkRequired(OptionSet options, String opt1, String opt2) throws VoldemortException { List<String> opts = Lists.newArrayList(); opts.add(opt1); opts.add(opt2); checkRequired(options, opts); }
[ "public", "static", "void", "checkRequired", "(", "OptionSet", "options", ",", "String", "opt1", ",", "String", "opt2", ")", "throws", "VoldemortException", "{", "List", "<", "String", ">", "opts", "=", "Lists", ".", "newArrayList", "(", ")", ";", "opts", ...
Checks if there's exactly one option that exists among all possible opts. @param options OptionSet to checked @param opt1 Possible required option to check @param opt2 Possible required option to check @throws VoldemortException
[ "Checks", "if", "there", "s", "exactly", "one", "option", "that", "exists", "among", "all", "possible", "opts", "." ]
train
https://github.com/voldemort/voldemort/blob/a7dbdea58032021361680faacf2782cf981c5332/src/java/voldemort/tools/admin/AdminParserUtils.java#L326-L332
arquillian/arquillian-core
container/spi/src/main/java/org/jboss/arquillian/container/spi/client/deployment/DeploymentScenario.java
DeploymentScenario.startupDeploymentsFor
public List<Deployment> startupDeploymentsFor(TargetDescription target) { """ Get all {@link DeploymentDescription} defined to be deployed during Test startup for a specific {@link TargetDescription} ordered. @param target The Target to filter on @return A List of found {@link DeploymentDescription}. Will ...
java
public List<Deployment> startupDeploymentsFor(TargetDescription target) { Validate.notNull(target, "Target must be specified"); List<Deployment> startupDeployments = new ArrayList<Deployment>(); for (Deployment deployment : deployments) { DeploymentDescription desc = deployment.getDe...
[ "public", "List", "<", "Deployment", ">", "startupDeploymentsFor", "(", "TargetDescription", "target", ")", "{", "Validate", ".", "notNull", "(", "target", ",", "\"Target must be specified\"", ")", ";", "List", "<", "Deployment", ">", "startupDeployments", "=", "n...
Get all {@link DeploymentDescription} defined to be deployed during Test startup for a specific {@link TargetDescription} ordered. @param target The Target to filter on @return A List of found {@link DeploymentDescription}. Will return a empty list if none are found.
[ "Get", "all", "{", "@link", "DeploymentDescription", "}", "defined", "to", "be", "deployed", "during", "Test", "startup", "for", "a", "specific", "{", "@link", "TargetDescription", "}", "ordered", "." ]
train
https://github.com/arquillian/arquillian-core/blob/a85b91789b80cc77e0f0c2e2abac65c2255c0a81/container/spi/src/main/java/org/jboss/arquillian/container/spi/client/deployment/DeploymentScenario.java#L123-L140
windup/windup
rules-java/api/src/main/java/org/jboss/windup/rules/apps/mavenize/ArchiveCoordinateService.java
ArchiveCoordinateService.findSingle
public ArchiveCoordinateModel findSingle(String groupId, String artifactId, String version) { """ Returns a single ArchiveCoordinateModel with given G:A:V. @return null if none found; Logs a WARNING if multiple are found. """ Iterable<ArchiveCoordinateModel> archives = findByGAV(groupId, artifactId,...
java
public ArchiveCoordinateModel findSingle(String groupId, String artifactId, String version) { Iterable<ArchiveCoordinateModel> archives = findByGAV(groupId, artifactId, version); Iterator<ArchiveCoordinateModel> it = archives.iterator(); if (!it.hasNext()) return null; Ar...
[ "public", "ArchiveCoordinateModel", "findSingle", "(", "String", "groupId", ",", "String", "artifactId", ",", "String", "version", ")", "{", "Iterable", "<", "ArchiveCoordinateModel", ">", "archives", "=", "findByGAV", "(", "groupId", ",", "artifactId", ",", "vers...
Returns a single ArchiveCoordinateModel with given G:A:V. @return null if none found; Logs a WARNING if multiple are found.
[ "Returns", "a", "single", "ArchiveCoordinateModel", "with", "given", "G", ":", "A", ":", "V", "." ]
train
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/rules-java/api/src/main/java/org/jboss/windup/rules/apps/mavenize/ArchiveCoordinateService.java#L43-L54
GoogleCloudPlatform/appengine-plugins-core
src/main/java/com/google/cloud/tools/managedcloudsdk/install/SdkInstaller.java
SdkInstaller.newInstaller
public static SdkInstaller newInstaller( Path managedSdkDirectory, Version version, OsInfo osInfo, String userAgentString, boolean usageReporting) { """ Configure and create a new Installer instance. @param managedSdkDirectory home directory of google cloud java managed cloud SDKs ...
java
public static SdkInstaller newInstaller( Path managedSdkDirectory, Version version, OsInfo osInfo, String userAgentString, boolean usageReporting) { DownloaderFactory downloaderFactory = new DownloaderFactory(userAgentString); ExtractorFactory extractorFactory = new ExtractorFactor...
[ "public", "static", "SdkInstaller", "newInstaller", "(", "Path", "managedSdkDirectory", ",", "Version", "version", ",", "OsInfo", "osInfo", ",", "String", "userAgentString", ",", "boolean", "usageReporting", ")", "{", "DownloaderFactory", "downloaderFactory", "=", "ne...
Configure and create a new Installer instance. @param managedSdkDirectory home directory of google cloud java managed cloud SDKs @param version version of the Cloud SDK we want to install @param osInfo target operating system for installation @param userAgentString user agent string for https requests @param usageRepo...
[ "Configure", "and", "create", "a", "new", "Installer", "instance", "." ]
train
https://github.com/GoogleCloudPlatform/appengine-plugins-core/blob/d22e9fa1103522409ab6fdfbf68c4a5a0bc5b97d/src/main/java/com/google/cloud/tools/managedcloudsdk/install/SdkInstaller.java#L145-L162
elki-project/elki
elki-clustering/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/initialization/LABInitialMeans.java
LABInitialMeans.getMinDist
protected static double getMinDist(DBIDArrayIter j, DistanceQuery<?> distQ, DBIDArrayIter mi, WritableDoubleDataStore mindist) { """ Get the minimum distance to previous medoids. @param j current object @param distQ distance query @param mi medoid iterator @param mindist distance storage @return minimum dis...
java
protected static double getMinDist(DBIDArrayIter j, DistanceQuery<?> distQ, DBIDArrayIter mi, WritableDoubleDataStore mindist) { double prev = mindist.doubleValue(j); if(Double.isNaN(prev)) { // NaN = unknown prev = Double.POSITIVE_INFINITY; for(mi.seek(0); mi.valid(); mi.advance()) { double...
[ "protected", "static", "double", "getMinDist", "(", "DBIDArrayIter", "j", ",", "DistanceQuery", "<", "?", ">", "distQ", ",", "DBIDArrayIter", "mi", ",", "WritableDoubleDataStore", "mindist", ")", "{", "double", "prev", "=", "mindist", ".", "doubleValue", "(", ...
Get the minimum distance to previous medoids. @param j current object @param distQ distance query @param mi medoid iterator @param mindist distance storage @return minimum distance
[ "Get", "the", "minimum", "distance", "to", "previous", "medoids", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-clustering/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/initialization/LABInitialMeans.java#L214-L225
baratine/baratine
kraken/src/main/java/com/caucho/v5/kelp/query/ObjectPathExprBuilder.java
ObjectPathExprBuilder.buildParentPath
@Override protected PathHessian buildParentPath(QueryBuilder builder) { """ /* @Override public PathBuilderH3 buildPathH3(QueryBuilder builder) { PathMapHessian pathMap = _parent.buildPathMap(builder); System.out.println("PM: " + pathMap + " " + _parent); return pathMap.field(_name); } """ PathM...
java
@Override protected PathHessian buildParentPath(QueryBuilder builder) { PathMapHessian pathMap = _parent.buildPathMap(builder); PathHessian subPath = pathMap.get(_name); if (subPath == null) { PathMapHessian pathMapSelf = buildPathMap(builder); subPath = new PathHessianField...
[ "@", "Override", "protected", "PathHessian", "buildParentPath", "(", "QueryBuilder", "builder", ")", "{", "PathMapHessian", "pathMap", "=", "_parent", ".", "buildPathMap", "(", "builder", ")", ";", "PathHessian", "subPath", "=", "pathMap", ".", "get", "(", "_nam...
/* @Override public PathBuilderH3 buildPathH3(QueryBuilder builder) { PathMapHessian pathMap = _parent.buildPathMap(builder); System.out.println("PM: " + pathMap + " " + _parent); return pathMap.field(_name); }
[ "/", "*", "@Override", "public", "PathBuilderH3", "buildPathH3", "(", "QueryBuilder", "builder", ")", "{", "PathMapHessian", "pathMap", "=", "_parent", ".", "buildPathMap", "(", "builder", ")", ";", "System", ".", "out", ".", "println", "(", "PM", ":", "+", ...
train
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kelp/query/ObjectPathExprBuilder.java#L121-L137
graphql-java/graphql-java
src/main/java/graphql/util/FpKit.java
FpKit.getByName
public static <T> Map<String, T> getByName(List<T> namedObjects, Function<T, String> nameFn) { """ From a list of named things, get a map of them by name, merging them first one added """ return getByName(namedObjects, nameFn, mergeFirst()); }
java
public static <T> Map<String, T> getByName(List<T> namedObjects, Function<T, String> nameFn) { return getByName(namedObjects, nameFn, mergeFirst()); }
[ "public", "static", "<", "T", ">", "Map", "<", "String", ",", "T", ">", "getByName", "(", "List", "<", "T", ">", "namedObjects", ",", "Function", "<", "T", ",", "String", ">", "nameFn", ")", "{", "return", "getByName", "(", "namedObjects", ",", "name...
From a list of named things, get a map of them by name, merging them first one added
[ "From", "a", "list", "of", "named", "things", "get", "a", "map", "of", "them", "by", "name", "merging", "them", "first", "one", "added" ]
train
https://github.com/graphql-java/graphql-java/blob/9214b6044317849388bd88a14b54fc1c18c9f29f/src/main/java/graphql/util/FpKit.java#L47-L49
facebookarchive/hadoop-20
src/contrib/hive-streaming/src/java/org/apache/hadoop/streaming/StreamUtil.java
StreamUtil.goodClassOrNull
public static Class goodClassOrNull(String className, String defaultPackage) { """ It may seem strange to silently switch behaviour when a String is not a classname; the reason is simplified Usage:<pre> -mapper [classname | program ] instead of the explicit Usage: [-mapper program | -javamapper classname], -ma...
java
public static Class goodClassOrNull(String className, String defaultPackage) { if (className.indexOf('.') == -1 && defaultPackage != null) { className = defaultPackage + "." + className; } Class clazz = null; try { clazz = Class.forName(className); } catch (ClassNotFoundException cnf) { ...
[ "public", "static", "Class", "goodClassOrNull", "(", "String", "className", ",", "String", "defaultPackage", ")", "{", "if", "(", "className", ".", "indexOf", "(", "'", "'", ")", "==", "-", "1", "&&", "defaultPackage", "!=", "null", ")", "{", "className", ...
It may seem strange to silently switch behaviour when a String is not a classname; the reason is simplified Usage:<pre> -mapper [classname | program ] instead of the explicit Usage: [-mapper program | -javamapper classname], -mapper and -javamapper are mutually exclusive. (repeat for -reducer, -combiner) </pre>
[ "It", "may", "seem", "strange", "to", "silently", "switch", "behaviour", "when", "a", "String", "is", "not", "a", "classname", ";", "the", "reason", "is", "simplified", "Usage", ":", "<pre", ">", "-", "mapper", "[", "classname", "|", "program", "]", "ins...
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/hive-streaming/src/java/org/apache/hadoop/streaming/StreamUtil.java#L49-L60
synchronoss/cpo-api
cpo-jdbc/src/main/java/org/synchronoss/cpo/jdbc/jta/JdbcCpoXaAdapter.java
JdbcCpoXaAdapter.persistObject
@Override public <T> long persistObject(String name, T bean) throws CpoException { """ Persists the Object into the datasource. The CpoAdapter will check to see if this object exists in the datasource. If it exists, the object is updated in the datasource If the object does not exist, then it is created in the ...
java
@Override public <T> long persistObject(String name, T bean) throws CpoException { return getCurrentResource().persistObject(name, bean); }
[ "@", "Override", "public", "<", "T", ">", "long", "persistObject", "(", "String", "name", ",", "T", "bean", ")", "throws", "CpoException", "{", "return", "getCurrentResource", "(", ")", ".", "persistObject", "(", "name", ",", "bean", ")", ";", "}" ]
Persists the Object into the datasource. The CpoAdapter will check to see if this object exists in the datasource. If it exists, the object is updated in the datasource If the object does not exist, then it is created in the datasource. This method stores the object in the datasource. <p> <pre>Example: <code> <p> class...
[ "Persists", "the", "Object", "into", "the", "datasource", ".", "The", "CpoAdapter", "will", "check", "to", "see", "if", "this", "object", "exists", "in", "the", "datasource", ".", "If", "it", "exists", "the", "object", "is", "updated", "in", "the", "dataso...
train
https://github.com/synchronoss/cpo-api/blob/dc745aca3b3206abf80b85d9689b0132f5baa694/cpo-jdbc/src/main/java/org/synchronoss/cpo/jdbc/jta/JdbcCpoXaAdapter.java#L1154-L1157
marklogic/marklogic-sesame
marklogic-sesame/src/main/java/com/marklogic/semantics/sesame/client/MarkLogicClient.java
MarkLogicClient.sendBooleanQuery
public boolean sendBooleanQuery(String queryString, SPARQLQueryBindingSet bindings, boolean includeInferred, String baseURI) throws IOException, RepositoryException, MalformedQueryException, QueryInterruptedException { """ BooleanQuery @param queryString @param bindings @param includeInferred @param baseU...
java
public boolean sendBooleanQuery(String queryString, SPARQLQueryBindingSet bindings, boolean includeInferred, String baseURI) throws IOException, RepositoryException, MalformedQueryException, QueryInterruptedException { return getClient().performBooleanQuery(queryString, bindings, this.tx, includeInferred, baseURI)...
[ "public", "boolean", "sendBooleanQuery", "(", "String", "queryString", ",", "SPARQLQueryBindingSet", "bindings", ",", "boolean", "includeInferred", ",", "String", "baseURI", ")", "throws", "IOException", ",", "RepositoryException", ",", "MalformedQueryException", ",", "...
BooleanQuery @param queryString @param bindings @param includeInferred @param baseURI @return @throws IOException @throws RepositoryException @throws MalformedQueryException @throws UnauthorizedException @throws QueryInterruptedException
[ "BooleanQuery" ]
train
https://github.com/marklogic/marklogic-sesame/blob/d5b668ed2b3d5e90c9f1d5096012813c272062a2/marklogic-sesame/src/main/java/com/marklogic/semantics/sesame/client/MarkLogicClient.java#L271-L274
alkacon/opencms-core
src-modules/org/opencms/workplace/explorer/CmsTree.java
CmsTree.initTree
public static String initTree(CmsObject cms, String encoding, String skinUri) { """ Returns the HTML for the tree initialization.<p> @param cms the CmsObject @param encoding the current encoding @param skinUri the current skin URI @return the HTML for the tree initialization """ StringBuffer ret...
java
public static String initTree(CmsObject cms, String encoding, String skinUri) { StringBuffer retValue = new StringBuffer(512); String servletUrl = OpenCms.getSystemInfo().getOpenCmsContext(); // get the localized workplace messages // TODO: Why a new message object, can it not be obtai...
[ "public", "static", "String", "initTree", "(", "CmsObject", "cms", ",", "String", "encoding", ",", "String", "skinUri", ")", "{", "StringBuffer", "retValue", "=", "new", "StringBuffer", "(", "512", ")", ";", "String", "servletUrl", "=", "OpenCms", ".", "getS...
Returns the HTML for the tree initialization.<p> @param cms the CmsObject @param encoding the current encoding @param skinUri the current skin URI @return the HTML for the tree initialization
[ "Returns", "the", "HTML", "for", "the", "tree", "initialization", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-modules/org/opencms/workplace/explorer/CmsTree.java#L162-L217
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.comms.server/src/com/ibm/ws/sib/comms/server/clientsupport/CATSyncAsynchReader.java
CATSyncAsynchReader.sendErrorToClient
protected void sendErrorToClient(Throwable e, String probeId) { """ This method sends an exception to the client and marks the reader that a response has been sent to the client. @param e The exception to send back @param probeId The probe id. """ if (TraceComponent.isAnyTracingEnabled() && tc.isE...
java
protected void sendErrorToClient(Throwable e, String probeId) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "sendErrorToClient", new Object[] { e, probeId }); setComplete(true); setCurrentlyDoingReceiveWithWait(false); StaticCATHel...
[ "protected", "void", "sendErrorToClient", "(", "Throwable", "e", ",", "String", "probeId", ")", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isEntryEnabled", "(", ")", ")", "SibTr", ".", "entry", "(", "this", ",...
This method sends an exception to the client and marks the reader that a response has been sent to the client. @param e The exception to send back @param probeId The probe id.
[ "This", "method", "sends", "an", "exception", "to", "the", "client", "and", "marks", "the", "reader", "that", "a", "response", "has", "been", "sent", "to", "the", "client", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.comms.server/src/com/ibm/ws/sib/comms/server/clientsupport/CATSyncAsynchReader.java#L694-L705
moparisthebest/beehive
beehive-netui-tags/src/main/java/org/apache/beehive/netui/tags/AbstractSimpleTag.java
AbstractSimpleTag.setRequiredValueAttribute
protected final String setRequiredValueAttribute(String attrValue, String attrName) throws JspException { """ Report an error if the value of <code>attrValue</code> is equal to the empty string, otherwise return that value. If <code>attrValue</code> is equal to the empty string, an error is registere...
java
protected final String setRequiredValueAttribute(String attrValue, String attrName) throws JspException { assert(attrValue != null) : "parameter '" + attrValue + "' must not be null"; assert(attrName != null) : "parameter '" + attrName + "' must not be null"; if ("".equals(attrV...
[ "protected", "final", "String", "setRequiredValueAttribute", "(", "String", "attrValue", ",", "String", "attrName", ")", "throws", "JspException", "{", "assert", "(", "attrValue", "!=", "null", ")", ":", "\"parameter '\"", "+", "attrValue", "+", "\"' must not be nul...
Report an error if the value of <code>attrValue</code> is equal to the empty string, otherwise return that value. If <code>attrValue</code> is equal to the empty string, an error is registered and null is returned. @param attrValue The value to be checked for the empty string @param attrName The name of the attribute...
[ "Report", "an", "error", "if", "the", "value", "of", "<code", ">", "attrValue<", "/", "code", ">", "is", "equal", "to", "the", "empty", "string", "otherwise", "return", "that", "value", ".", "If", "<code", ">", "attrValue<", "/", "code", ">", "is", "eq...
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-tags/src/main/java/org/apache/beehive/netui/tags/AbstractSimpleTag.java#L91-L103
GCRC/nunaliit
nunaliit2-couch-client/src/main/java/ca/carleton/gcrc/couch/fsentry/FSEntrySupport.java
FSEntrySupport.findDescendant
static public FSEntry findDescendant(FSEntry root, String path) throws Exception { """ Traverses a directory structure designated by root and looks for a descendant with the provided path. If found, the supporting instance of FSEntry for the path is returned. If not found, null is returned. @param root Root of...
java
static public FSEntry findDescendant(FSEntry root, String path) throws Exception { if( null == root ) { throw new Exception("root parameter should not be null"); } List<String> pathFrags = interpretPath(path); // Iterate through path fragments, navigating through // the offered children FSEntry see...
[ "static", "public", "FSEntry", "findDescendant", "(", "FSEntry", "root", ",", "String", "path", ")", "throws", "Exception", "{", "if", "(", "null", "==", "root", ")", "{", "throw", "new", "Exception", "(", "\"root parameter should not be null\"", ")", ";", "}"...
Traverses a directory structure designated by root and looks for a descendant with the provided path. If found, the supporting instance of FSEntry for the path is returned. If not found, null is returned. @param root Root of directory structure where the descendant is searched @param path Path of the seeked descendant ...
[ "Traverses", "a", "directory", "structure", "designated", "by", "root", "and", "looks", "for", "a", "descendant", "with", "the", "provided", "path", ".", "If", "found", "the", "supporting", "instance", "of", "FSEntry", "for", "the", "path", "is", "returned", ...
train
https://github.com/GCRC/nunaliit/blob/0b4abfc64eef2eb8b94f852ce697de2e851d8e67/nunaliit2-couch-client/src/main/java/ca/carleton/gcrc/couch/fsentry/FSEntrySupport.java#L35-L65
apache/spark
sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/thrift/ThriftHttpServlet.java
ThriftHttpServlet.doKerberosAuth
private String doKerberosAuth(HttpServletRequest request) throws HttpAuthenticationException { """ Do the GSS-API kerberos authentication. We already have a logged in subject in the form of serviceUGI, which GSS-API will extract information from. In case of a SPNego request we use the httpUGI, for the au...
java
private String doKerberosAuth(HttpServletRequest request) throws HttpAuthenticationException { // Try authenticating with the http/_HOST principal if (httpUGI != null) { try { return httpUGI.doAs(new HttpKerberosServerAction(request, httpUGI)); } catch (Exception e) { LOG.info(...
[ "private", "String", "doKerberosAuth", "(", "HttpServletRequest", "request", ")", "throws", "HttpAuthenticationException", "{", "// Try authenticating with the http/_HOST principal", "if", "(", "httpUGI", "!=", "null", ")", "{", "try", "{", "return", "httpUGI", ".", "do...
Do the GSS-API kerberos authentication. We already have a logged in subject in the form of serviceUGI, which GSS-API will extract information from. In case of a SPNego request we use the httpUGI, for the authenticating service tickets. @param request @return @throws HttpAuthenticationException
[ "Do", "the", "GSS", "-", "API", "kerberos", "authentication", ".", "We", "already", "have", "a", "logged", "in", "subject", "in", "the", "form", "of", "serviceUGI", "which", "GSS", "-", "API", "will", "extract", "information", "from", ".", "In", "case", ...
train
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/thrift/ThriftHttpServlet.java#L344-L363
jbundle/jbundle
main/screen/src/main/java/org/jbundle/main/properties/screen/PropertiesInputGridScreen.java
PropertiesInputGridScreen.doCommand
public boolean doCommand(String strCommand, ScreenField sourceSField, int iCommandOptions) { """ Process the command. <br />Step 1 - Process the command if possible and return true if processed. <br />Step 2 - If I can't process, pass to all children (with me as the source). <br />Step 3 - If children didn't pr...
java
public boolean doCommand(String strCommand, ScreenField sourceSField, int iCommandOptions) { if ((MenuConstants.FORMLINK.equalsIgnoreCase(strCommand)) || (MenuConstants.FORM.equalsIgnoreCase(strCommand))) return true; // Ignore these commands return super.doCommand(strCommand, sourceS...
[ "public", "boolean", "doCommand", "(", "String", "strCommand", ",", "ScreenField", "sourceSField", ",", "int", "iCommandOptions", ")", "{", "if", "(", "(", "MenuConstants", ".", "FORMLINK", ".", "equalsIgnoreCase", "(", "strCommand", ")", ")", "||", "(", "Menu...
Process the command. <br />Step 1 - Process the command if possible and return true if processed. <br />Step 2 - If I can't process, pass to all children (with me as the source). <br />Step 3 - If children didn't process, pass to parent (with me as the source). <br />Note: Never pass to a parent or child that matches t...
[ "Process", "the", "command", ".", "<br", "/", ">", "Step", "1", "-", "Process", "the", "command", "if", "possible", "and", "return", "true", "if", "processed", ".", "<br", "/", ">", "Step", "2", "-", "If", "I", "can", "t", "process", "pass", "to", ...
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/main/screen/src/main/java/org/jbundle/main/properties/screen/PropertiesInputGridScreen.java#L179-L184
Azure/azure-sdk-for-java
network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/NetworkWatchersInner.java
NetworkWatchersInner.beginListAvailableProvidersAsync
public Observable<AvailableProvidersListInner> beginListAvailableProvidersAsync(String resourceGroupName, String networkWatcherName, AvailableProvidersListParameters parameters) { """ Lists all available internet service providers for a specified Azure region. @param resourceGroupName The name of the network wa...
java
public Observable<AvailableProvidersListInner> beginListAvailableProvidersAsync(String resourceGroupName, String networkWatcherName, AvailableProvidersListParameters parameters) { return beginListAvailableProvidersWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).map(new Func1<ServiceR...
[ "public", "Observable", "<", "AvailableProvidersListInner", ">", "beginListAvailableProvidersAsync", "(", "String", "resourceGroupName", ",", "String", "networkWatcherName", ",", "AvailableProvidersListParameters", "parameters", ")", "{", "return", "beginListAvailableProvidersWit...
Lists all available internet service providers for a specified Azure region. @param resourceGroupName The name of the network watcher resource group. @param networkWatcherName The name of the network watcher resource. @param parameters Parameters that scope the list of available providers. @throws IllegalArgumentExcep...
[ "Lists", "all", "available", "internet", "service", "providers", "for", "a", "specified", "Azure", "region", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/NetworkWatchersInner.java#L2578-L2585
wmdietl/jsr308-langtools
src/share/classes/com/sun/tools/javac/code/TypeAnnotations.java
TypeAnnotations.organizeTypeAnnotationsSignatures
public void organizeTypeAnnotationsSignatures(final Env<AttrContext> env, final JCClassDecl tree) { """ Separate type annotations from declaration annotations and determine the correct positions for type annotations. This version only visits types in signatures and should be called from MemberEnter. The method...
java
public void organizeTypeAnnotationsSignatures(final Env<AttrContext> env, final JCClassDecl tree) { annotate.afterRepeated( new Worker() { @Override public void run() { JavaFileObject oldSource = log.useSource(env.toplevel.sourcefile); try { ...
[ "public", "void", "organizeTypeAnnotationsSignatures", "(", "final", "Env", "<", "AttrContext", ">", "env", ",", "final", "JCClassDecl", "tree", ")", "{", "annotate", ".", "afterRepeated", "(", "new", "Worker", "(", ")", "{", "@", "Override", "public", "void",...
Separate type annotations from declaration annotations and determine the correct positions for type annotations. This version only visits types in signatures and should be called from MemberEnter. The method takes the Annotate object as parameter and adds an Annotate.Worker to the correct Annotate queue for later proce...
[ "Separate", "type", "annotations", "from", "declaration", "annotations", "and", "determine", "the", "correct", "positions", "for", "type", "annotations", ".", "This", "version", "only", "visits", "types", "in", "signatures", "and", "should", "be", "called", "from"...
train
https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/javac/code/TypeAnnotations.java#L120-L133
b3log/latke
latke-core/src/main/java/org/json/XML.java
XML.toJSONObject
public static JSONObject toJSONObject(String string, boolean keepStrings) throws JSONException { """ Convert a well-formed (but not necessarily valid) XML string into a JSONObject. Some information may be lost in this transformation because JSON is a data format and XML is a document format. XML uses elements, ...
java
public static JSONObject toJSONObject(String string, boolean keepStrings) throws JSONException { return toJSONObject(new StringReader(string), keepStrings); }
[ "public", "static", "JSONObject", "toJSONObject", "(", "String", "string", ",", "boolean", "keepStrings", ")", "throws", "JSONException", "{", "return", "toJSONObject", "(", "new", "StringReader", "(", "string", ")", ",", "keepStrings", ")", ";", "}" ]
Convert a well-formed (but not necessarily valid) XML string into a JSONObject. Some information may be lost in this transformation because JSON is a data format and XML is a document format. XML uses elements, attributes, and content text, while JSON uses unordered collections of name/value pairs and arrays of values....
[ "Convert", "a", "well", "-", "formed", "(", "but", "not", "necessarily", "valid", ")", "XML", "string", "into", "a", "JSONObject", ".", "Some", "information", "may", "be", "lost", "in", "this", "transformation", "because", "JSON", "is", "a", "data", "forma...
train
https://github.com/b3log/latke/blob/f7e08a47eeecea5f7c94006382c24f353585de33/latke-core/src/main/java/org/json/XML.java#L547-L549
jbundle/jbundle
main/db/src/main/java/org/jbundle/main/user/db/UpdateGroupPermissionHandler.java
UpdateGroupPermissionHandler.doRecordChange
public int doRecordChange(FieldInfo field, int iChangeType, boolean bDisplayOption) { """ Called when a change is the record status is about to happen/has happened. @param field If this file change is due to a field, this is the field. @param iChangeType The type of change that occurred. @param bDisplayOption I...
java
public int doRecordChange(FieldInfo field, int iChangeType, boolean bDisplayOption) { if ((iChangeType == DBConstants.AFTER_UPDATE_TYPE) || (iChangeType == DBConstants.AFTER_ADD_TYPE) || (iChangeType == DBConstants.AFTER_DELETE_TYPE)) { int iGroupID = (int)this.ge...
[ "public", "int", "doRecordChange", "(", "FieldInfo", "field", ",", "int", "iChangeType", ",", "boolean", "bDisplayOption", ")", "{", "if", "(", "(", "iChangeType", "==", "DBConstants", ".", "AFTER_UPDATE_TYPE", ")", "||", "(", "iChangeType", "==", "DBConstants",...
Called when a change is the record status is about to happen/has happened. @param field If this file change is due to a field, this is the field. @param iChangeType The type of change that occurred. @param bDisplayOption If true, display any changes. @return an error code. ADD_TYPE - Before a write. UPDATE_TYPE - Befor...
[ "Called", "when", "a", "change", "is", "the", "record", "status", "is", "about", "to", "happen", "/", "has", "happened", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/main/db/src/main/java/org/jbundle/main/user/db/UpdateGroupPermissionHandler.java#L99-L112
UrielCh/ovh-java-sdk
ovh-java-sdk-cloud/src/main/java/net/minidev/ovh/api/ApiOvhCloud.java
ApiOvhCloud.project_serviceName_acl_accountId_DELETE
public void project_serviceName_acl_accountId_DELETE(String serviceName, String accountId) throws IOException { """ Delete ACL REST: DELETE /cloud/project/{serviceName}/acl/{accountId} @param serviceName [required] The project id @param accountId [required] OVH customer unique identifier """ String qPat...
java
public void project_serviceName_acl_accountId_DELETE(String serviceName, String accountId) throws IOException { String qPath = "/cloud/project/{serviceName}/acl/{accountId}"; StringBuilder sb = path(qPath, serviceName, accountId); exec(qPath, "DELETE", sb.toString(), null); }
[ "public", "void", "project_serviceName_acl_accountId_DELETE", "(", "String", "serviceName", ",", "String", "accountId", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/cloud/project/{serviceName}/acl/{accountId}\"", ";", "StringBuilder", "sb", "=", "path", ...
Delete ACL REST: DELETE /cloud/project/{serviceName}/acl/{accountId} @param serviceName [required] The project id @param accountId [required] OVH customer unique identifier
[ "Delete", "ACL" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-cloud/src/main/java/net/minidev/ovh/api/ApiOvhCloud.java#L334-L338
elki-project/elki
elki-index-rtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/spatial/rstarvariants/strategies/bulk/SortTileRecursiveBulkSplit.java
SortTileRecursiveBulkSplit.strPartition
protected <T extends SpatialComparable> void strPartition(List<T> objs, int start, int end, int depth, int dims, int maxEntries, SpatialSingleMeanComparator c, List<List<T>> ret) { """ Recursively partition. @param objs Object list @param start Subinterval start @param end Subinterval end @param depth Iterat...
java
protected <T extends SpatialComparable> void strPartition(List<T> objs, int start, int end, int depth, int dims, int maxEntries, SpatialSingleMeanComparator c, List<List<T>> ret) { final int p = (int) FastMath.ceil((end - start) / (double) maxEntries); final int s = (int) FastMath.ceil(FastMath.pow(p, 1.0 / (di...
[ "protected", "<", "T", "extends", "SpatialComparable", ">", "void", "strPartition", "(", "List", "<", "T", ">", "objs", ",", "int", "start", ",", "int", "end", ",", "int", "depth", ",", "int", "dims", ",", "int", "maxEntries", ",", "SpatialSingleMeanCompar...
Recursively partition. @param objs Object list @param start Subinterval start @param end Subinterval end @param depth Iteration depth (must be less than dimensionality!) @param dims Total number of dimensions @param maxEntries Maximum page size @param c Comparison helper @param ret Output list @param <T> data type
[ "Recursively", "partition", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-index-rtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/spatial/rstarvariants/strategies/bulk/SortTileRecursiveBulkSplit.java#L81-L103
JadiraOrg/jadira
jms/src/main/java/org/jadira/jms/template/BatchedJmsTemplate.java
BatchedJmsTemplate.receiveSelectedBatch
public List<Message> receiveSelectedBatch(final String destinationName, final String messageSelector, final int batchSize) throws JmsException { """ Receive a batch of up to batchSize for given destination name and message selector. Other than batching this method is the same as {@link JmsTemplate#rece...
java
public List<Message> receiveSelectedBatch(final String destinationName, final String messageSelector, final int batchSize) throws JmsException { return execute(new SessionCallback<List<Message>>() { public List<Message> doInJms(Session session) throws JMSException { Desti...
[ "public", "List", "<", "Message", ">", "receiveSelectedBatch", "(", "final", "String", "destinationName", ",", "final", "String", "messageSelector", ",", "final", "int", "batchSize", ")", "throws", "JmsException", "{", "return", "execute", "(", "new", "SessionCall...
Receive a batch of up to batchSize for given destination name and message selector. Other than batching this method is the same as {@link JmsTemplate#receiveSelected(String, String)} @return A list of {@link Message} @param destinationName The destination name @param messageSelector The Selector @param batchSize The ba...
[ "Receive", "a", "batch", "of", "up", "to", "batchSize", "for", "given", "destination", "name", "and", "message", "selector", ".", "Other", "than", "batching", "this", "method", "is", "the", "same", "as", "{" ]
train
https://github.com/JadiraOrg/jadira/blob/d55d0238395f0cb900531f1f08b4b2d87fa9a4f6/jms/src/main/java/org/jadira/jms/template/BatchedJmsTemplate.java#L257-L265
eclipse/xtext-extras
org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/scoping/batch/FeatureScopes.java
FeatureScopes.isValidFeatureCallArgument
protected boolean isValidFeatureCallArgument(XExpression expression, JvmIdentifiableElement linkedReceiver, IFeatureScopeSession session) { """ Returns <code>true</code> if the linked receiver may be passed as an argument. Basically everything could be passed as an argument except the linked receiver is null, a p...
java
protected boolean isValidFeatureCallArgument(XExpression expression, JvmIdentifiableElement linkedReceiver, IFeatureScopeSession session) { if (linkedReceiver instanceof JvmType) { IEObjectDescription knownSuperType = session.getLocalElement(SUPER); if (knownSuperType != null && linkedReceiver == knownSuperType...
[ "protected", "boolean", "isValidFeatureCallArgument", "(", "XExpression", "expression", ",", "JvmIdentifiableElement", "linkedReceiver", ",", "IFeatureScopeSession", "session", ")", "{", "if", "(", "linkedReceiver", "instanceof", "JvmType", ")", "{", "IEObjectDescription", ...
Returns <code>true</code> if the linked receiver may be passed as an argument. Basically everything could be passed as an argument except the linked receiver is null, a proxy or a reference to <code>super</code>.
[ "Returns", "<code", ">", "true<", "/", "code", ">", "if", "the", "linked", "receiver", "may", "be", "passed", "as", "an", "argument", ".", "Basically", "everything", "could", "be", "passed", "as", "an", "argument", "except", "the", "linked", "receiver", "i...
train
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/scoping/batch/FeatureScopes.java#L291-L299
spring-projects/spring-android
spring-android-core/src/main/java/org/springframework/util/NumberUtils.java
NumberUtils.parseNumber
public static <T extends Number> T parseNumber(String text, Class<T> targetClass, NumberFormat numberFormat) { """ Parse the given text into a number instance of the given target class, using the given NumberFormat. Trims the input {@code String} before attempting to parse the number. @param text the text to co...
java
public static <T extends Number> T parseNumber(String text, Class<T> targetClass, NumberFormat numberFormat) { if (numberFormat != null) { Assert.notNull(text, "Text must not be null"); Assert.notNull(targetClass, "Target class must not be null"); DecimalFormat decimalFormat = null; boolean resetBigDecima...
[ "public", "static", "<", "T", "extends", "Number", ">", "T", "parseNumber", "(", "String", "text", ",", "Class", "<", "T", ">", "targetClass", ",", "NumberFormat", "numberFormat", ")", "{", "if", "(", "numberFormat", "!=", "null", ")", "{", "Assert", "."...
Parse the given text into a number instance of the given target class, using the given NumberFormat. Trims the input {@code String} before attempting to parse the number. @param text the text to convert @param targetClass the target class to parse into @param numberFormat the NumberFormat to use for parsing (if {@code ...
[ "Parse", "the", "given", "text", "into", "a", "number", "instance", "of", "the", "given", "target", "class", "using", "the", "given", "NumberFormat", ".", "Trims", "the", "input", "{" ]
train
https://github.com/spring-projects/spring-android/blob/941296e152d49a40e0745a3e81628a974f72b7e4/spring-android-core/src/main/java/org/springframework/util/NumberUtils.java#L193-L222
Inbot/inbot-utils
src/main/java/io/inbot/utils/MiscUtils.java
MiscUtils.urlEncode
public static String urlEncode(String s) { """ Url encode a string and don't throw a checked exception. Uses UTF-8 as per RFC 3986. @param s a string @return url encoded string """ try { return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); } catch (UnsupportedEncodingExcept...
java
public static String urlEncode(String s) { try { return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); } catch (UnsupportedEncodingException e) { throw new IllegalStateException("get a jdk that actually supports utf-8", e); } }
[ "public", "static", "String", "urlEncode", "(", "String", "s", ")", "{", "try", "{", "return", "URLEncoder", ".", "encode", "(", "s", ",", "StandardCharsets", ".", "UTF_8", ".", "name", "(", ")", ")", ";", "}", "catch", "(", "UnsupportedEncodingException",...
Url encode a string and don't throw a checked exception. Uses UTF-8 as per RFC 3986. @param s a string @return url encoded string
[ "Url", "encode", "a", "string", "and", "don", "t", "throw", "a", "checked", "exception", ".", "Uses", "UTF", "-", "8", "as", "per", "RFC", "3986", "." ]
train
https://github.com/Inbot/inbot-utils/blob/3112bc08d4237e95fe0f8a219a5bbceb390d0505/src/main/java/io/inbot/utils/MiscUtils.java#L31-L37
OpenLiberty/open-liberty
dev/com.ibm.ws.concurrent.persistent/src/com/ibm/ws/concurrent/persistent/internal/ApplicationTracker.java
ApplicationTracker.deferTask
void deferTask(Runnable task, String appName, PersistentExecutorImpl persistentExecutor) { """ Defer task execution until the application/module becomes available. If, upon attempting to defer the task, we discover that the app has started, we submit the task for execution instead of deferring. """ A...
java
void deferTask(Runnable task, String appName, PersistentExecutorImpl persistentExecutor) { ApplicationState state; ExecutorService executor; lock.writeLock().lock(); try { executor = this.executor; state = appStates.get(appName); if (state != Applicati...
[ "void", "deferTask", "(", "Runnable", "task", ",", "String", "appName", ",", "PersistentExecutorImpl", "persistentExecutor", ")", "{", "ApplicationState", "state", ";", "ExecutorService", "executor", ";", "lock", ".", "writeLock", "(", ")", ".", "lock", "(", ")"...
Defer task execution until the application/module becomes available. If, upon attempting to defer the task, we discover that the app has started, we submit the task for execution instead of deferring.
[ "Defer", "task", "execution", "until", "the", "application", "/", "module", "becomes", "available", ".", "If", "upon", "attempting", "to", "defer", "the", "task", "we", "discover", "that", "the", "app", "has", "started", "we", "submit", "the", "task", "for",...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.concurrent.persistent/src/com/ibm/ws/concurrent/persistent/internal/ApplicationTracker.java#L120-L144
albfernandez/itext2
src/main/java/com/lowagie/text/pdf/Barcode.java
Barcode.createTemplateWithBarcode
public PdfTemplate createTemplateWithBarcode(PdfContentByte cb, Color barColor, Color textColor) { """ Creates a template with the barcode. @param cb the <CODE>PdfContentByte</CODE> to create the template. It serves no other use @param barColor the color of the bars. It can be <CODE>null</CODE> @param textColo...
java
public PdfTemplate createTemplateWithBarcode(PdfContentByte cb, Color barColor, Color textColor) { PdfTemplate tp = cb.createTemplate(0, 0); Rectangle rect = placeBarcode(tp, barColor, textColor); tp.setBoundingBox(rect); return tp; }
[ "public", "PdfTemplate", "createTemplateWithBarcode", "(", "PdfContentByte", "cb", ",", "Color", "barColor", ",", "Color", "textColor", ")", "{", "PdfTemplate", "tp", "=", "cb", ".", "createTemplate", "(", "0", ",", "0", ")", ";", "Rectangle", "rect", "=", "...
Creates a template with the barcode. @param cb the <CODE>PdfContentByte</CODE> to create the template. It serves no other use @param barColor the color of the bars. It can be <CODE>null</CODE> @param textColor the color of the text. It can be <CODE>null</CODE> @return the template @see #placeBarcode(PdfContentByte cb, ...
[ "Creates", "a", "template", "with", "the", "barcode", "." ]
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/pdf/Barcode.java#L407-L412
jeremylong/DependencyCheck
core/src/main/java/org/owasp/dependencycheck/reporting/ReportGenerator.java
ReportGenerator.pretifyJson
private void pretifyJson(String pathToJson) throws ReportException { """ Reformats the given JSON file. @param pathToJson the path to the JSON file to be reformatted @throws ReportException thrown if the given JSON file is malformed """ final String outputPath = pathToJson + ".pretty"; fina...
java
private void pretifyJson(String pathToJson) throws ReportException { final String outputPath = pathToJson + ".pretty"; final File in = new File(pathToJson); final File out = new File(outputPath); try (JsonReader reader = new JsonReader(new InputStreamReader(new FileInputStream(in), Stand...
[ "private", "void", "pretifyJson", "(", "String", "pathToJson", ")", "throws", "ReportException", "{", "final", "String", "outputPath", "=", "pathToJson", "+", "\".pretty\"", ";", "final", "File", "in", "=", "new", "File", "(", "pathToJson", ")", ";", "final", ...
Reformats the given JSON file. @param pathToJson the path to the JSON file to be reformatted @throws ReportException thrown if the given JSON file is malformed
[ "Reformats", "the", "given", "JSON", "file", "." ]
train
https://github.com/jeremylong/DependencyCheck/blob/6cc7690ea12e4ca1454210ceaa2e9a5523f0926c/core/src/main/java/org/owasp/dependencycheck/reporting/ReportGenerator.java#L400-L418
kubernetes-client/java
kubernetes/src/main/java/io/kubernetes/client/ApiClient.java
ApiClient.parameterToPair
public List<Pair> parameterToPair(String name, Object value) { """ Formats the specified query parameter to a list containing a single {@code Pair} object. Note that {@code value} must not be a collection. @param name The name of the parameter. @param value The value of the parameter. @return A list contai...
java
public List<Pair> parameterToPair(String name, Object value) { List<Pair> params = new ArrayList<Pair>(); // preconditions if (name == null || name.isEmpty() || value == null || value instanceof Collection) return params; params.add(new Pair(name, parameterToString(value))); re...
[ "public", "List", "<", "Pair", ">", "parameterToPair", "(", "String", "name", ",", "Object", "value", ")", "{", "List", "<", "Pair", ">", "params", "=", "new", "ArrayList", "<", "Pair", ">", "(", ")", ";", "// preconditions", "if", "(", "name", "==", ...
Formats the specified query parameter to a list containing a single {@code Pair} object. Note that {@code value} must not be a collection. @param name The name of the parameter. @param value The value of the parameter. @return A list containing a single {@code Pair} object.
[ "Formats", "the", "specified", "query", "parameter", "to", "a", "list", "containing", "a", "single", "{", "@code", "Pair", "}", "object", "." ]
train
https://github.com/kubernetes-client/java/blob/7413e98bd904f09d1ad00fb60e8c6ff787f3f560/kubernetes/src/main/java/io/kubernetes/client/ApiClient.java#L480-L488
apache/spark
common/network-common/src/main/java/org/apache/spark/network/client/TransportClient.java
TransportClient.uploadStream
public long uploadStream( ManagedBuffer meta, ManagedBuffer data, RpcResponseCallback callback) { """ Send data to the remote end as a stream. This differs from stream() in that this is a request to *send* data to the remote end, not to receive it from the remote. @param meta meta data assoc...
java
public long uploadStream( ManagedBuffer meta, ManagedBuffer data, RpcResponseCallback callback) { if (logger.isTraceEnabled()) { logger.trace("Sending RPC to {}", getRemoteAddress(channel)); } long requestId = requestId(); handler.addRpcRequest(requestId, callback); RpcChan...
[ "public", "long", "uploadStream", "(", "ManagedBuffer", "meta", ",", "ManagedBuffer", "data", ",", "RpcResponseCallback", "callback", ")", "{", "if", "(", "logger", ".", "isTraceEnabled", "(", ")", ")", "{", "logger", ".", "trace", "(", "\"Sending RPC to {}\"", ...
Send data to the remote end as a stream. This differs from stream() in that this is a request to *send* data to the remote end, not to receive it from the remote. @param meta meta data associated with the stream, which will be read completely on the receiving end before the stream itself. @param data this will be str...
[ "Send", "data", "to", "the", "remote", "end", "as", "a", "stream", ".", "This", "differs", "from", "stream", "()", "in", "that", "this", "is", "a", "request", "to", "*", "send", "*", "data", "to", "the", "remote", "end", "not", "to", "receive", "it",...
train
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/common/network-common/src/main/java/org/apache/spark/network/client/TransportClient.java#L213-L228
codeprimate-software/cp-elements
src/main/java/org/cp/elements/lang/MathUtils.java
MathUtils.cylinderSurfaceArea
public static double cylinderSurfaceArea(final double radius, final double height) { """ Calculates the surface area of a cylinder. @param radius a double value indicating the radius of the cylinder. @param height a double value indicating the height of the cylinder. @return the surface area of a cylinder giv...
java
public static double cylinderSurfaceArea(final double radius, final double height) { return ((2.0d * Math.PI * Math.pow(radius, 2)) + (2.0d * Math.PI * radius * height)); }
[ "public", "static", "double", "cylinderSurfaceArea", "(", "final", "double", "radius", ",", "final", "double", "height", ")", "{", "return", "(", "(", "2.0d", "*", "Math", ".", "PI", "*", "Math", ".", "pow", "(", "radius", ",", "2", ")", ")", "+", "(...
Calculates the surface area of a cylinder. @param radius a double value indicating the radius of the cylinder. @param height a double value indicating the height of the cylinder. @return the surface area of a cylinder given the radius and height. @see java.lang.Math#PI @see java.lang.Math#pow(double, double)
[ "Calculates", "the", "surface", "area", "of", "a", "cylinder", "." ]
train
https://github.com/codeprimate-software/cp-elements/blob/f2163c149fbbef05015e688132064ebcac7c49ab/src/main/java/org/cp/elements/lang/MathUtils.java#L115-L117
apache/incubator-atlas
webapp/src/main/java/org/apache/atlas/web/filters/AtlasKnoxSSOAuthenticationFilter.java
AtlasKnoxSSOAuthenticationFilter.constructLoginURL
protected String constructLoginURL(HttpServletRequest request, boolean isXMLRequest) { """ Create the URL to be used for authentication of the user in the absence of a JWT token within the incoming request. @param request for getting the original request URL @return url to use as login url for redirect ""...
java
protected String constructLoginURL(HttpServletRequest request, boolean isXMLRequest) { String delimiter = "?"; if (authenticationProviderUrl.contains("?")) { delimiter = "&"; } StringBuilder loginURL = new StringBuilder(); if (isXMLRequest) { String atlasA...
[ "protected", "String", "constructLoginURL", "(", "HttpServletRequest", "request", ",", "boolean", "isXMLRequest", ")", "{", "String", "delimiter", "=", "\"?\"", ";", "if", "(", "authenticationProviderUrl", ".", "contains", "(", "\"?\"", ")", ")", "{", "delimiter",...
Create the URL to be used for authentication of the user in the absence of a JWT token within the incoming request. @param request for getting the original request URL @return url to use as login url for redirect
[ "Create", "the", "URL", "to", "be", "used", "for", "authentication", "of", "the", "user", "in", "the", "absence", "of", "a", "JWT", "token", "within", "the", "incoming", "request", "." ]
train
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/webapp/src/main/java/org/apache/atlas/web/filters/AtlasKnoxSSOAuthenticationFilter.java#L290-L311
facebookarchive/hadoop-20
src/core/org/apache/hadoop/record/meta/StructTypeID.java
StructTypeID.genericReadTypeInfo
private FieldTypeInfo genericReadTypeInfo(RecordInput rin, String tag) throws IOException { """ generic reader: reads the next TypeInfo object from stream and returns it """ String fieldName = rin.readString(tag); TypeID id = genericReadTypeID(rin, tag); return new FieldTypeInfo(fieldName, id); }
java
private FieldTypeInfo genericReadTypeInfo(RecordInput rin, String tag) throws IOException { String fieldName = rin.readString(tag); TypeID id = genericReadTypeID(rin, tag); return new FieldTypeInfo(fieldName, id); }
[ "private", "FieldTypeInfo", "genericReadTypeInfo", "(", "RecordInput", "rin", ",", "String", "tag", ")", "throws", "IOException", "{", "String", "fieldName", "=", "rin", ".", "readString", "(", "tag", ")", ";", "TypeID", "id", "=", "genericReadTypeID", "(", "r...
generic reader: reads the next TypeInfo object from stream and returns it
[ "generic", "reader", ":", "reads", "the", "next", "TypeInfo", "object", "from", "stream", "and", "returns", "it" ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/core/org/apache/hadoop/record/meta/StructTypeID.java#L99-L103
j-easy/easy-random
easy-random-core/src/main/java/org/jeasy/random/randomizers/range/ZonedDateTimeRangeRandomizer.java
ZonedDateTimeRangeRandomizer.aNewZonedDateTimeRangeRandomizer
public static ZonedDateTimeRangeRandomizer aNewZonedDateTimeRangeRandomizer(final ZonedDateTime min, final ZonedDateTime max, final long seed) { """ Create a new {@link ZonedDateTimeRangeRandomizer}. @param min min value @param max max value @param seed initial seed @return a new {@link ZonedDateTimeRangeR...
java
public static ZonedDateTimeRangeRandomizer aNewZonedDateTimeRangeRandomizer(final ZonedDateTime min, final ZonedDateTime max, final long seed) { return new ZonedDateTimeRangeRandomizer(min, max, seed); }
[ "public", "static", "ZonedDateTimeRangeRandomizer", "aNewZonedDateTimeRangeRandomizer", "(", "final", "ZonedDateTime", "min", ",", "final", "ZonedDateTime", "max", ",", "final", "long", "seed", ")", "{", "return", "new", "ZonedDateTimeRangeRandomizer", "(", "min", ",", ...
Create a new {@link ZonedDateTimeRangeRandomizer}. @param min min value @param max max value @param seed initial seed @return a new {@link ZonedDateTimeRangeRandomizer}.
[ "Create", "a", "new", "{", "@link", "ZonedDateTimeRangeRandomizer", "}", "." ]
train
https://github.com/j-easy/easy-random/blob/816b0d6a74c7288af111e70ae1b0b57d7fe3b59d/easy-random-core/src/main/java/org/jeasy/random/randomizers/range/ZonedDateTimeRangeRandomizer.java#L76-L78
openengsb/openengsb
components/util/src/main/java/org/openengsb/core/util/CipherUtils.java
CipherUtils.verify
public static boolean verify(byte[] text, byte[] signatureValue, PublicKey key, String algorithm) throws SignatureException { """ verifies if the given data is valid for the given signature and public key. @throws SignatureException if the algorithm cannot be initialized """ Signature signat...
java
public static boolean verify(byte[] text, byte[] signatureValue, PublicKey key, String algorithm) throws SignatureException { Signature signature; try { signature = Signature.getInstance(algorithm); signature.initVerify(key); } catch (GeneralSecurityException e) {...
[ "public", "static", "boolean", "verify", "(", "byte", "[", "]", "text", ",", "byte", "[", "]", "signatureValue", ",", "PublicKey", "key", ",", "String", "algorithm", ")", "throws", "SignatureException", "{", "Signature", "signature", ";", "try", "{", "signat...
verifies if the given data is valid for the given signature and public key. @throws SignatureException if the algorithm cannot be initialized
[ "verifies", "if", "the", "given", "data", "is", "valid", "for", "the", "given", "signature", "and", "public", "key", "." ]
train
https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/components/util/src/main/java/org/openengsb/core/util/CipherUtils.java#L224-L235
astrapi69/jaulp-wicket
jaulp-wicket-components/src/main/java/de/alpharogroup/wicket/components/link/LinkUtils.java
LinkUtils.newBookmarkablePageLink
public static BookmarkablePageLink<String> newBookmarkablePageLink(final String linkId, final Class<? extends Page> pageClass, final String labelId, final ResourceBundleKey resourceModelKey, final Component component) { """ Creates the bookmarkable page link. @param linkId the link id @param pageClass ...
java
public static BookmarkablePageLink<String> newBookmarkablePageLink(final String linkId, final Class<? extends Page> pageClass, final String labelId, final ResourceBundleKey resourceModelKey, final Component component) { final BookmarkablePageLink<String> bookmarkablePageLink = new BookmarkablePageLink<>(link...
[ "public", "static", "BookmarkablePageLink", "<", "String", ">", "newBookmarkablePageLink", "(", "final", "String", "linkId", ",", "final", "Class", "<", "?", "extends", "Page", ">", "pageClass", ",", "final", "String", "labelId", ",", "final", "ResourceBundleKey",...
Creates the bookmarkable page link. @param linkId the link id @param pageClass the page class @param labelId the label id @param resourceModelKey the resource model key @param component the component @return the bookmarkable page link
[ "Creates", "the", "bookmarkable", "page", "link", "." ]
train
https://github.com/astrapi69/jaulp-wicket/blob/85d74368d00abd9bb97659b5794e38c0f8a013d4/jaulp-wicket-components/src/main/java/de/alpharogroup/wicket/components/link/LinkUtils.java#L52-L61
googleapis/google-cloud-java
google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/BigtableDataClient.java
BigtableDataClient.readRowsAsync
public void readRowsAsync(Query query, ResponseObserver<Row> observer) { """ Convenience method for asynchronously streaming the results of a {@link Query}. <p>Sample code: <pre>{@code try (BigtableDataClient bigtableDataClient = BigtableDataClient.create("[PROJECT]", "[INSTANCE]")) { String tableId = "[TA...
java
public void readRowsAsync(Query query, ResponseObserver<Row> observer) { readRowsCallable().call(query, observer); }
[ "public", "void", "readRowsAsync", "(", "Query", "query", ",", "ResponseObserver", "<", "Row", ">", "observer", ")", "{", "readRowsCallable", "(", ")", ".", "call", "(", "query", ",", "observer", ")", ";", "}" ]
Convenience method for asynchronously streaming the results of a {@link Query}. <p>Sample code: <pre>{@code try (BigtableDataClient bigtableDataClient = BigtableDataClient.create("[PROJECT]", "[INSTANCE]")) { String tableId = "[TABLE]"; Query query = Query.create(tableId) .range("[START KEY]", "[END KEY]") .filter(F...
[ "Convenience", "method", "for", "asynchronously", "streaming", "the", "results", "of", "a", "{", "@link", "Query", "}", "." ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/BigtableDataClient.java#L569-L571
google/error-prone-javac
src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symtab.java
Symtab.packageExists
public boolean packageExists(ModuleSymbol msym, Name fullname) { """ Check to see if a package exists, given its fully qualified name. """ Assert.checkNonNull(msym); return lookupPackage(msym, fullname).exists(); }
java
public boolean packageExists(ModuleSymbol msym, Name fullname) { Assert.checkNonNull(msym); return lookupPackage(msym, fullname).exists(); }
[ "public", "boolean", "packageExists", "(", "ModuleSymbol", "msym", ",", "Name", "fullname", ")", "{", "Assert", ".", "checkNonNull", "(", "msym", ")", ";", "return", "lookupPackage", "(", "msym", ",", "fullname", ")", ".", "exists", "(", ")", ";", "}" ]
Check to see if a package exists, given its fully qualified name.
[ "Check", "to", "see", "if", "a", "package", "exists", "given", "its", "fully", "qualified", "name", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symtab.java#L721-L724
mebigfatguy/fb-contrib
src/main/java/com/mebigfatguy/fbcontrib/detect/SloppyClassReflection.java
SloppyClassReflection.sawOpcode
@Override public void sawOpcode(int seen) { """ overrides the visitor to find class loading that is non obfuscation proof @param seen the opcode that is being visited """ switch (state) { case COLLECT: if ((seen == Const.INVOKESTATIC) || (seen == Const.INVOKEVIRTUAL)...
java
@Override public void sawOpcode(int seen) { switch (state) { case COLLECT: if ((seen == Const.INVOKESTATIC) || (seen == Const.INVOKEVIRTUAL) || (seen == Const.INVOKEINTERFACE) || (seen == Const.INVOKESPECIAL)) { refClasses.add(getClassConstantOperand()); ...
[ "@", "Override", "public", "void", "sawOpcode", "(", "int", "seen", ")", "{", "switch", "(", "state", ")", "{", "case", "COLLECT", ":", "if", "(", "(", "seen", "==", "Const", ".", "INVOKESTATIC", ")", "||", "(", "seen", "==", "Const", ".", "INVOKEVIR...
overrides the visitor to find class loading that is non obfuscation proof @param seen the opcode that is being visited
[ "overrides", "the", "visitor", "to", "find", "class", "loading", "that", "is", "non", "obfuscation", "proof" ]
train
https://github.com/mebigfatguy/fb-contrib/blob/3b5203196f627b399fbcea3c2ab2b1f4e56cc7b8/src/main/java/com/mebigfatguy/fbcontrib/detect/SloppyClassReflection.java#L138-L173
krummas/DrizzleJDBC
src/main/java/org/drizzle/jdbc/internal/common/packet/RawPacket.java
RawPacket.nextPacket
static RawPacket nextPacket(final InputStream is) throws IOException { """ Get the next packet from the stream @param is the input stream to read the next packet from @return The next packet from the stream, or NULL if the stream is closed @throws java.io.IOException if an error occurs while reading data ...
java
static RawPacket nextPacket(final InputStream is) throws IOException { byte[] lengthBuffer = readLengthSeq(is); int length = (lengthBuffer[0] & 0xff) + ((lengthBuffer[1] & 0xff) << 8) + ((lengthBuffer[2] & 0xff) << 16); if (length == -1) { return null; } if (length <...
[ "static", "RawPacket", "nextPacket", "(", "final", "InputStream", "is", ")", "throws", "IOException", "{", "byte", "[", "]", "lengthBuffer", "=", "readLengthSeq", "(", "is", ")", ";", "int", "length", "=", "(", "lengthBuffer", "[", "0", "]", "&", "0xff", ...
Get the next packet from the stream @param is the input stream to read the next packet from @return The next packet from the stream, or NULL if the stream is closed @throws java.io.IOException if an error occurs while reading data
[ "Get", "the", "next", "packet", "from", "the", "stream" ]
train
https://github.com/krummas/DrizzleJDBC/blob/716f31fd71f3cc289edf69844d8117deb86d98d6/src/main/java/org/drizzle/jdbc/internal/common/packet/RawPacket.java#L50-L72
Azure/azure-sdk-for-java
common/azure-common/src/main/java/com/azure/common/implementation/util/FluxUtil.java
FluxUtil.byteBufStreamFromFile
public static Flux<ByteBuf> byteBufStreamFromFile(AsynchronousFileChannel fileChannel, int chunkSize, long offset, long length) { """ Creates a {@link Flux} from an {@link AsynchronousFileChannel} which reads part of a file into chunks of the given size. @param fileChannel The file channel. @param chunkSize t...
java
public static Flux<ByteBuf> byteBufStreamFromFile(AsynchronousFileChannel fileChannel, int chunkSize, long offset, long length) { return new ByteBufStreamFromFile(fileChannel, chunkSize, offset, length); }
[ "public", "static", "Flux", "<", "ByteBuf", ">", "byteBufStreamFromFile", "(", "AsynchronousFileChannel", "fileChannel", ",", "int", "chunkSize", ",", "long", "offset", ",", "long", "length", ")", "{", "return", "new", "ByteBufStreamFromFile", "(", "fileChannel", ...
Creates a {@link Flux} from an {@link AsynchronousFileChannel} which reads part of a file into chunks of the given size. @param fileChannel The file channel. @param chunkSize the size of file chunks to read. @param offset The offset in the file to begin reading. @param length The number of bytes to read from the file....
[ "Creates", "a", "{", "@link", "Flux", "}", "from", "an", "{", "@link", "AsynchronousFileChannel", "}", "which", "reads", "part", "of", "a", "file", "into", "chunks", "of", "the", "given", "size", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/common/azure-common/src/main/java/com/azure/common/implementation/util/FluxUtil.java#L164-L166
paypal/SeLion
client/src/main/java/com/paypal/selion/internal/reports/runtimereport/JsonRuntimeReporterHelper.java
JsonRuntimeReporterHelper.writeJSON
public synchronized void writeJSON(String outputDirectory, boolean bForceWrite) { """ Generate the final report.json from the completed test and completed configuration temporary files. @param outputDirectory output directory @param bForceWrite setting true will forcibly generate the report.json """ ...
java
public synchronized void writeJSON(String outputDirectory, boolean bForceWrite) { logger.entering(new Object[] { outputDirectory, bForceWrite }); long currentTime = System.currentTimeMillis(); if (!bForceWrite && (currentTime - previousTime < ONE_MINUTE)) { return; } ...
[ "public", "synchronized", "void", "writeJSON", "(", "String", "outputDirectory", ",", "boolean", "bForceWrite", ")", "{", "logger", ".", "entering", "(", "new", "Object", "[", "]", "{", "outputDirectory", ",", "bForceWrite", "}", ")", ";", "long", "currentTime...
Generate the final report.json from the completed test and completed configuration temporary files. @param outputDirectory output directory @param bForceWrite setting true will forcibly generate the report.json
[ "Generate", "the", "final", "report", ".", "json", "from", "the", "completed", "test", "and", "completed", "configuration", "temporary", "files", "." ]
train
https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/client/src/main/java/com/paypal/selion/internal/reports/runtimereport/JsonRuntimeReporterHelper.java#L274-L288
google/closure-compiler
src/com/google/javascript/rhino/jstype/JSTypeRegistry.java
JSTypeRegistry.createTemplatizedType
public TemplatizedType createTemplatizedType(ObjectType baseType, JSType... templatizedTypes) { """ Creates a templatized instance of the specified type. Only ObjectTypes can currently be templatized; extend the logic in this function when more types can be templatized. @param baseType the type to be templatiz...
java
public TemplatizedType createTemplatizedType(ObjectType baseType, JSType... templatizedTypes) { return createTemplatizedType(baseType, ImmutableList.copyOf(templatizedTypes)); }
[ "public", "TemplatizedType", "createTemplatizedType", "(", "ObjectType", "baseType", ",", "JSType", "...", "templatizedTypes", ")", "{", "return", "createTemplatizedType", "(", "baseType", ",", "ImmutableList", ".", "copyOf", "(", "templatizedTypes", ")", ")", ";", ...
Creates a templatized instance of the specified type. Only ObjectTypes can currently be templatized; extend the logic in this function when more types can be templatized. @param baseType the type to be templatized. @param templatizedTypes a list of the template JSTypes. Will be matched by list order to the template ke...
[ "Creates", "a", "templatized", "instance", "of", "the", "specified", "type", ".", "Only", "ObjectTypes", "can", "currently", "be", "templatized", ";", "extend", "the", "logic", "in", "this", "function", "when", "more", "types", "can", "be", "templatized", "." ...
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/rhino/jstype/JSTypeRegistry.java#L1929-L1931
percolate/caffeine
caffeine/src/main/java/com/percolate/caffeine/ActivityUtils.java
ActivityUtils.launchActivity
public static void launchActivity(Activity context, Class<? extends Activity> activity, boolean closeCurrentActivity, Map<String, String> params) { """ Launch an Activity. @param context The current Context or Activity that this method is called from. @param activity The new Activity t...
java
public static void launchActivity(Activity context, Class<? extends Activity> activity, boolean closeCurrentActivity, Map<String, String> params) { Intent intent = new Intent(context, activity); if (params != null) { Bundle bundle = new Bundle(); for (Entry<String, String> param...
[ "public", "static", "void", "launchActivity", "(", "Activity", "context", ",", "Class", "<", "?", "extends", "Activity", ">", "activity", ",", "boolean", "closeCurrentActivity", ",", "Map", "<", "String", ",", "String", ">", "params", ")", "{", "Intent", "in...
Launch an Activity. @param context The current Context or Activity that this method is called from. @param activity The new Activity to open. @param closeCurrentActivity whether or not the current activity should close. @param params Parameters to add to the intent as a Bundle.
[ "Launch", "an", "Activity", "." ]
train
https://github.com/percolate/caffeine/blob/e2265cab474a6397f4d75b1ed928c356a7b9672e/caffeine/src/main/java/com/percolate/caffeine/ActivityUtils.java#L30-L45
VoltDB/voltdb
src/frontend/org/voltdb/client/ClientConfig.java
ClientConfig.setTrustStore
public void setTrustStore(String pathToTrustStore, String trustStorePassword) { """ Configure trust store @param pathToTrustStore file specification for the trust store @param trustStorePassword trust store key file password """ File tsFD = new File(pathToTrustStore != null && !pathToTrustStore.tri...
java
public void setTrustStore(String pathToTrustStore, String trustStorePassword) { File tsFD = new File(pathToTrustStore != null && !pathToTrustStore.trim().isEmpty() ? pathToTrustStore : ""); if (!tsFD.exists() || !tsFD.isFile() || !tsFD.canRead()) { throw new IllegalArgumentException("Trust s...
[ "public", "void", "setTrustStore", "(", "String", "pathToTrustStore", ",", "String", "trustStorePassword", ")", "{", "File", "tsFD", "=", "new", "File", "(", "pathToTrustStore", "!=", "null", "&&", "!", "pathToTrustStore", ".", "trim", "(", ")", ".", "isEmpty"...
Configure trust store @param pathToTrustStore file specification for the trust store @param trustStorePassword trust store key file password
[ "Configure", "trust", "store" ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/client/ClientConfig.java#L467-L473
eclipse/xtext-extras
org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/typesystem/override/RawResolvedFeatures.java
RawResolvedFeatures.createTypeReference
private static LightweightTypeReference createTypeReference(JvmDeclaredType type, CommonTypeComputationServices services) { """ Static helper method that is used from within the super call in the constructor of {@link RawResolvedFeatures}. """ StandardTypeReferenceOwner owner = new StandardTypeReferenceOwne...
java
private static LightweightTypeReference createTypeReference(JvmDeclaredType type, CommonTypeComputationServices services) { StandardTypeReferenceOwner owner = new StandardTypeReferenceOwner(services, type); return owner.newParameterizedTypeReference(type); }
[ "private", "static", "LightweightTypeReference", "createTypeReference", "(", "JvmDeclaredType", "type", ",", "CommonTypeComputationServices", "services", ")", "{", "StandardTypeReferenceOwner", "owner", "=", "new", "StandardTypeReferenceOwner", "(", "services", ",", "type", ...
Static helper method that is used from within the super call in the constructor of {@link RawResolvedFeatures}.
[ "Static", "helper", "method", "that", "is", "used", "from", "within", "the", "super", "call", "in", "the", "constructor", "of", "{" ]
train
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/typesystem/override/RawResolvedFeatures.java#L111-L114
jtrfp/javamod
src/main/java/de/quippy/javamod/multimedia/mod/mixer/BasicModMixer.java
BasicModMixer.setNewPlayerTuningFor
protected void setNewPlayerTuningFor(final ChannelMemory aktMemo, final int newPeriod) { """ This Method now takes the current Period (e.g. 856<<4) and calculates the playerTuning to be used. I.e. a value like 2, which means every second sample in the current instrument is to be played. A value of 0.5 means, eve...
java
protected void setNewPlayerTuningFor(final ChannelMemory aktMemo, final int newPeriod) { if (newPeriod<=0) aktMemo.currentTuning = 0; else if (frequencyTableType==Helpers.XM_LINEAR_TABLE) { final int xm_period_value = newPeriod>>2; int newFrequency = Helpers.lintab[xm_period_value % 768] >> (xm_perio...
[ "protected", "void", "setNewPlayerTuningFor", "(", "final", "ChannelMemory", "aktMemo", ",", "final", "int", "newPeriod", ")", "{", "if", "(", "newPeriod", "<=", "0", ")", "aktMemo", ".", "currentTuning", "=", "0", ";", "else", "if", "(", "frequencyTableType",...
This Method now takes the current Period (e.g. 856<<4) and calculates the playerTuning to be used. I.e. a value like 2, which means every second sample in the current instrument is to be played. A value of 0.5 means, every sample is played twice. As we use int-values, this again is shiftet. @param aktMemo @param newPer...
[ "This", "Method", "now", "takes", "the", "current", "Period", "(", "e", ".", "g", ".", "856<<4", ")", "and", "calculates", "the", "playerTuning", "to", "be", "used", ".", "I", ".", "e", ".", "a", "value", "like", "2", "which", "means", "every", "seco...
train
https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/multimedia/mod/mixer/BasicModMixer.java#L466-L479
walkmod/walkmod-core
src/main/java/org/walkmod/WalkModFacade.java
WalkModFacade.inspectPlugin
public List<BeanDefinition> inspectPlugin(PluginConfig plugin) { """ Retrieves the bean definitions that contains an specific plugin. @param plugin Plugin container of bean definitions. @return List of bean definitions. """ Configuration conf = new ConfigurationImpl(); Collection<PluginC...
java
public List<BeanDefinition> inspectPlugin(PluginConfig plugin) { Configuration conf = new ConfigurationImpl(); Collection<PluginConfig> plugins = new LinkedList<PluginConfig>(); plugins.add(plugin); conf.setPlugins(plugins); ConfigurationManager manager = new ConfigurationMa...
[ "public", "List", "<", "BeanDefinition", ">", "inspectPlugin", "(", "PluginConfig", "plugin", ")", "{", "Configuration", "conf", "=", "new", "ConfigurationImpl", "(", ")", ";", "Collection", "<", "PluginConfig", ">", "plugins", "=", "new", "LinkedList", "<", "...
Retrieves the bean definitions that contains an specific plugin. @param plugin Plugin container of bean definitions. @return List of bean definitions.
[ "Retrieves", "the", "bean", "definitions", "that", "contains", "an", "specific", "plugin", "." ]
train
https://github.com/walkmod/walkmod-core/blob/fa79b836894fa00ca4b3e2bd26326a44b778f46f/src/main/java/org/walkmod/WalkModFacade.java#L983-L991
apache/incubator-gobblin
gobblin-core/src/main/java/org/apache/gobblin/publisher/BaseDataPublisher.java
BaseDataPublisher.publishSingleTaskData
private void publishSingleTaskData(WorkUnitState state, int branchId) throws IOException { """ This method publishes output data for a single task based on the given {@link WorkUnitState}. Output data from other tasks won't be published even if they are in the same folder. """ publishData(state, bra...
java
private void publishSingleTaskData(WorkUnitState state, int branchId) throws IOException { publishData(state, branchId, true, new HashSet<Path>()); addLineageInfo(state, branchId); }
[ "private", "void", "publishSingleTaskData", "(", "WorkUnitState", "state", ",", "int", "branchId", ")", "throws", "IOException", "{", "publishData", "(", "state", ",", "branchId", ",", "true", ",", "new", "HashSet", "<", "Path", ">", "(", ")", ")", ";", "a...
This method publishes output data for a single task based on the given {@link WorkUnitState}. Output data from other tasks won't be published even if they are in the same folder.
[ "This", "method", "publishes", "output", "data", "for", "a", "single", "task", "based", "on", "the", "given", "{" ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-core/src/main/java/org/apache/gobblin/publisher/BaseDataPublisher.java#L346-L350
teatrove/teatrove
trove/src/main/java/org/teatrove/trove/classfile/Modifiers.java
Modifiers.setAbstract
public static int setAbstract(int modifier, boolean b) { """ When set abstract, the modifier is cleared from being final, volatile, transient, native, synchronized, and strictfp. When cleared from being abstract, the modifier is also cleared from being an interface. """ if (b) { return (m...
java
public static int setAbstract(int modifier, boolean b) { if (b) { return (modifier | ABSTRACT) & (~FINAL & ~VOLATILE & ~TRANSIENT & ~NATIVE & ~SYNCHRONIZED & ~STRICT); } else { return modifier & ~ABSTRACT & ~INTERFACE; } }
[ "public", "static", "int", "setAbstract", "(", "int", "modifier", ",", "boolean", "b", ")", "{", "if", "(", "b", ")", "{", "return", "(", "modifier", "|", "ABSTRACT", ")", "&", "(", "~", "FINAL", "&", "~", "VOLATILE", "&", "~", "TRANSIENT", "&", "~...
When set abstract, the modifier is cleared from being final, volatile, transient, native, synchronized, and strictfp. When cleared from being abstract, the modifier is also cleared from being an interface.
[ "When", "set", "abstract", "the", "modifier", "is", "cleared", "from", "being", "final", "volatile", "transient", "native", "synchronized", "and", "strictfp", ".", "When", "cleared", "from", "being", "abstract", "the", "modifier", "is", "also", "cleared", "from"...
train
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/trove/src/main/java/org/teatrove/trove/classfile/Modifiers.java#L162-L171
Azure/azure-sdk-for-java
notificationhubs/resource-manager/v2016_03_01/src/main/java/com/microsoft/azure/management/notificationhubs/v2016_03_01/implementation/NamespacesInner.java
NamespacesInner.createOrUpdateAuthorizationRuleAsync
public Observable<SharedAccessAuthorizationRuleResourceInner> createOrUpdateAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String authorizationRuleName, SharedAccessAuthorizationRuleCreateOrUpdateParameters parameters) { """ Creates an authorization rule for a namespace. @param resourceG...
java
public Observable<SharedAccessAuthorizationRuleResourceInner> createOrUpdateAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String authorizationRuleName, SharedAccessAuthorizationRuleCreateOrUpdateParameters parameters) { return createOrUpdateAuthorizationRuleWithServiceResponseAsync(reso...
[ "public", "Observable", "<", "SharedAccessAuthorizationRuleResourceInner", ">", "createOrUpdateAuthorizationRuleAsync", "(", "String", "resourceGroupName", ",", "String", "namespaceName", ",", "String", "authorizationRuleName", ",", "SharedAccessAuthorizationRuleCreateOrUpdateParamet...
Creates an authorization rule for a namespace. @param resourceGroupName The name of the resource group. @param namespaceName The namespace name. @param authorizationRuleName Aauthorization Rule Name. @param parameters The shared access authorization rule. @throws IllegalArgumentException thrown if parameters fail the ...
[ "Creates", "an", "authorization", "rule", "for", "a", "namespace", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/notificationhubs/resource-manager/v2016_03_01/src/main/java/com/microsoft/azure/management/notificationhubs/v2016_03_01/implementation/NamespacesInner.java#L695-L702
MariaDB/mariadb-connector-j
src/main/java/org/mariadb/jdbc/internal/com/read/resultset/rowprotocol/TextRowProtocol.java
TextRowProtocol.getInternalLocalTime
public LocalTime getInternalLocalTime(ColumnInformation columnInfo, TimeZone timeZone) throws SQLException { """ Get LocalTime format from raw text format. @param columnInfo column information @param timeZone time zone @return LocalTime value @throws SQLException if column type doesn't permit convers...
java
public LocalTime getInternalLocalTime(ColumnInformation columnInfo, TimeZone timeZone) throws SQLException { if (lastValueWasNull()) { return null; } if (length == 0) { lastValueNull |= BIT_LAST_FIELD_NULL; return null; } String raw = new String(buf, pos, length, StandardCha...
[ "public", "LocalTime", "getInternalLocalTime", "(", "ColumnInformation", "columnInfo", ",", "TimeZone", "timeZone", ")", "throws", "SQLException", "{", "if", "(", "lastValueWasNull", "(", ")", ")", "{", "return", "null", ";", "}", "if", "(", "length", "==", "0...
Get LocalTime format from raw text format. @param columnInfo column information @param timeZone time zone @return LocalTime value @throws SQLException if column type doesn't permit conversion
[ "Get", "LocalTime", "format", "from", "raw", "text", "format", "." ]
train
https://github.com/MariaDB/mariadb-connector-j/blob/d148c7cd347c4680617be65d9e511b289d38a30b/src/main/java/org/mariadb/jdbc/internal/com/read/resultset/rowprotocol/TextRowProtocol.java#L1023-L1061