repository_name
stringlengths
7
58
func_path_in_repository
stringlengths
11
204
func_name
stringlengths
5
103
whole_func_string
stringlengths
87
3.44k
language
stringclasses
1 value
func_code_string
stringlengths
87
3.44k
func_code_tokens
listlengths
21
714
func_documentation_string
stringlengths
61
1.95k
func_documentation_tokens
listlengths
1
482
split_name
stringclasses
1 value
func_code_url
stringlengths
102
309
apiman/apiman
manager/api/es/src/main/java/io/apiman/manager/api/es/EsMarshalling.java
EsMarshalling.unmarshallApi
public static ApiBean unmarshallApi(Map<String, Object> source) { if (source == null) { return null; } ApiBean bean = new ApiBean(); bean.setId(asString(source.get("id"))); bean.setName(asString(source.get("name"))); bean.setDescription(asString(source.get("de...
java
public static ApiBean unmarshallApi(Map<String, Object> source) { if (source == null) { return null; } ApiBean bean = new ApiBean(); bean.setId(asString(source.get("id"))); bean.setName(asString(source.get("name"))); bean.setDescription(asString(source.get("de...
[ "public", "static", "ApiBean", "unmarshallApi", "(", "Map", "<", "String", ",", "Object", ">", "source", ")", "{", "if", "(", "source", "==", "null", ")", "{", "return", "null", ";", "}", "ApiBean", "bean", "=", "new", "ApiBean", "(", ")", ";", "bean...
Unmarshals the given map source into a bean. @param source the source @return the API
[ "Unmarshals", "the", "given", "map", "source", "into", "a", "bean", "." ]
train
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/manager/api/es/src/main/java/io/apiman/manager/api/es/EsMarshalling.java#L906-L919
vanilladb/vanillacore
src/main/java/org/vanilladb/core/storage/buffer/BufferPoolMgr.java
BufferPoolMgr.pinNew
Buffer pinNew(String fileName, PageFormatter fmtr) { // Only the txs acquiring to append the block on the same file will be blocked synchronized (prepareAnchor(fileName)) { // Choose Unpinned Buffer int lastReplacedBuff = this.lastReplacedBuff; int currBlk = (lastReplacedBuff + 1) % bufferPool.le...
java
Buffer pinNew(String fileName, PageFormatter fmtr) { // Only the txs acquiring to append the block on the same file will be blocked synchronized (prepareAnchor(fileName)) { // Choose Unpinned Buffer int lastReplacedBuff = this.lastReplacedBuff; int currBlk = (lastReplacedBuff + 1) % bufferPool.le...
[ "Buffer", "pinNew", "(", "String", "fileName", ",", "PageFormatter", "fmtr", ")", "{", "// Only the txs acquiring to append the block on the same file will be blocked\r", "synchronized", "(", "prepareAnchor", "(", "fileName", ")", ")", "{", "// Choose Unpinned Buffer\r", "int...
Allocates a new block in the specified file, and pins a buffer to it. Returns null (without allocating the block) if there are no available buffers. @param fileName the name of the file @param fmtr a pageformatter object, used to format the new block @return the pinned buffer
[ "Allocates", "a", "new", "block", "in", "the", "specified", "file", "and", "pins", "a", "buffer", "to", "it", ".", "Returns", "null", "(", "without", "allocating", "the", "block", ")", "if", "there", "are", "no", "available", "buffers", "." ]
train
https://github.com/vanilladb/vanillacore/blob/d9a34e876b1b83226036d1fa982a614bbef59bd1/src/main/java/org/vanilladb/core/storage/buffer/BufferPoolMgr.java#L191-L229
OpenLiberty/open-liberty
dev/com.ibm.ws.transport.http/src/com/ibm/ws/http/internal/HttpEndpointImpl.java
HttpEndpointImpl.modified
@Modified protected void modified(Map<String, Object> config) { boolean endpointEnabled = MetatypeUtils.parseBoolean(HttpServiceConstants.ENPOINT_FPID_ALIAS, HttpServiceConstants.ENABLED, ...
java
@Modified protected void modified(Map<String, Object> config) { boolean endpointEnabled = MetatypeUtils.parseBoolean(HttpServiceConstants.ENPOINT_FPID_ALIAS, HttpServiceConstants.ENABLED, ...
[ "@", "Modified", "protected", "void", "modified", "(", "Map", "<", "String", ",", "Object", ">", "config", ")", "{", "boolean", "endpointEnabled", "=", "MetatypeUtils", ".", "parseBoolean", "(", "HttpServiceConstants", ".", "ENPOINT_FPID_ALIAS", ",", "HttpServiceC...
Process new configuration: call updateChains to push out new configuration. @param config
[ "Process", "new", "configuration", ":", "call", "updateChains", "to", "push", "out", "new", "configuration", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.transport.http/src/com/ibm/ws/http/internal/HttpEndpointImpl.java#L270-L336
ironjacamar/ironjacamar
sjc/src/main/java/org/ironjacamar/sjc/SecurityActions.java
SecurityActions.setSystemProperty
static void setSystemProperty(final String name, final String value) { AccessController.doPrivileged(new PrivilegedAction<Object>() { public Object run() { System.setProperty(name, value); return null; } }); }
java
static void setSystemProperty(final String name, final String value) { AccessController.doPrivileged(new PrivilegedAction<Object>() { public Object run() { System.setProperty(name, value); return null; } }); }
[ "static", "void", "setSystemProperty", "(", "final", "String", "name", ",", "final", "String", "value", ")", "{", "AccessController", ".", "doPrivileged", "(", "new", "PrivilegedAction", "<", "Object", ">", "(", ")", "{", "public", "Object", "run", "(", ")",...
Set a system property @param name The property name @param value The property value
[ "Set", "a", "system", "property" ]
train
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/sjc/src/main/java/org/ironjacamar/sjc/SecurityActions.java#L110-L120
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/painter/TableHeaderRendererPainter.java
TableHeaderRendererPainter.getTableHeaderInteriorPaint
public Paint getTableHeaderInteriorPaint(Shape s, CommonControlState type, boolean isSorted) { return getCommonInteriorPaint(s, type); // FourColors colors = getTableHeaderColors(type, isSorted); // return createVerticalGradient(s, colors); }
java
public Paint getTableHeaderInteriorPaint(Shape s, CommonControlState type, boolean isSorted) { return getCommonInteriorPaint(s, type); // FourColors colors = getTableHeaderColors(type, isSorted); // return createVerticalGradient(s, colors); }
[ "public", "Paint", "getTableHeaderInteriorPaint", "(", "Shape", "s", ",", "CommonControlState", "type", ",", "boolean", "isSorted", ")", "{", "return", "getCommonInteriorPaint", "(", "s", ",", "type", ")", ";", "// FourColors colors = getTableHeaderColors(type, isS...
DOCUMENT ME! @param s DOCUMENT ME! @param type DOCUMENT ME! @param isSorted DOCUMENT ME! @return DOCUMENT ME!
[ "DOCUMENT", "ME!" ]
train
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/painter/TableHeaderRendererPainter.java#L159-L163
threerings/narya
tools/src/main/java/com/threerings/presents/tools/ImportSet.java
ImportSet.addMunged
public void addMunged (Class<?> clazz, String... replace) { String name = clazz.getName(); for (int ii = 0; ii < replace.length; ii += 2) { name = name.replace(replace[ii], replace[ii+1]); } _imports.add(name); }
java
public void addMunged (Class<?> clazz, String... replace) { String name = clazz.getName(); for (int ii = 0; ii < replace.length; ii += 2) { name = name.replace(replace[ii], replace[ii+1]); } _imports.add(name); }
[ "public", "void", "addMunged", "(", "Class", "<", "?", ">", "clazz", ",", "String", "...", "replace", ")", "{", "String", "name", "=", "clazz", ".", "getName", "(", ")", ";", "for", "(", "int", "ii", "=", "0", ";", "ii", "<", "replace", ".", "len...
Adds a class' name to the imports but first performs the given list of search/replaces as described above. @param clazz the class whose name is munged and added @param replace array of pairs to search/replace on the name before adding
[ "Adds", "a", "class", "name", "to", "the", "imports", "but", "first", "performs", "the", "given", "list", "of", "search", "/", "replaces", "as", "described", "above", "." ]
train
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/tools/src/main/java/com/threerings/presents/tools/ImportSet.java#L91-L98
google/truth
core/src/main/java/com/google/common/truth/MathUtil.java
MathUtil.notEqualWithinTolerance
public static boolean notEqualWithinTolerance(double left, double right, double tolerance) { if (Doubles.isFinite(left) && Doubles.isFinite(right)) { return Math.abs(left - right) > Math.abs(tolerance); } else { return false; } }
java
public static boolean notEqualWithinTolerance(double left, double right, double tolerance) { if (Doubles.isFinite(left) && Doubles.isFinite(right)) { return Math.abs(left - right) > Math.abs(tolerance); } else { return false; } }
[ "public", "static", "boolean", "notEqualWithinTolerance", "(", "double", "left", ",", "double", "right", ",", "double", "tolerance", ")", "{", "if", "(", "Doubles", ".", "isFinite", "(", "left", ")", "&&", "Doubles", ".", "isFinite", "(", "right", ")", ")"...
Returns true iff {@code left} and {@code right} are finite values not within {@code tolerance} of each other. Note that both this method and {@link #equalWithinTolerance} returns false if either {@code left} or {@code right} is infinite or NaN.
[ "Returns", "true", "iff", "{" ]
train
https://github.com/google/truth/blob/60eceffd2e8c3297655d33ed87d965cf5af51108/core/src/main/java/com/google/common/truth/MathUtil.java#L48-L54
beangle/beangle3
commons/core/src/main/java/org/beangle/commons/collection/FastHashMap.java
FastHashMap.putAll
public void putAll(Map<? extends K, ? extends V> map) { for (Map.Entry<? extends K, ? extends V> e : map.entrySet()) { addEntry(e.getKey(), e.getValue()); } }
java
public void putAll(Map<? extends K, ? extends V> map) { for (Map.Entry<? extends K, ? extends V> e : map.entrySet()) { addEntry(e.getKey(), e.getValue()); } }
[ "public", "void", "putAll", "(", "Map", "<", "?", "extends", "K", ",", "?", "extends", "V", ">", "map", ")", "{", "for", "(", "Map", ".", "Entry", "<", "?", "extends", "K", ",", "?", "extends", "V", ">", "e", ":", "map", ".", "entrySet", "(", ...
Copies all of the mappings from the specified map to this {@link FastMap}. @param map the mappings to be stored in this map. @throws NullPointerException the specified map is <code>null</code>, or the specified map contains <code>null</code> keys.
[ "Copies", "all", "of", "the", "mappings", "from", "the", "specified", "map", "to", "this", "{", "@link", "FastMap", "}", "." ]
train
https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/commons/core/src/main/java/org/beangle/commons/collection/FastHashMap.java#L243-L247
kyoken74/gwt-angular-site
gwt-angular-examples/Promise/src/main/java/com/asayama/gwt/angular/site/examples/client/service/GreetingService.java
GreetingService.getSalutation
public Promise<String> getSalutation() { final Deferred<String> d = q.defer(); Timer timer = new Timer() { @Override public void run() { d.progress(new TimerProgress("Loaded salutation", this)); d.resolve("Hello"); } ...
java
public Promise<String> getSalutation() { final Deferred<String> d = q.defer(); Timer timer = new Timer() { @Override public void run() { d.progress(new TimerProgress("Loaded salutation", this)); d.resolve("Hello"); } ...
[ "public", "Promise", "<", "String", ">", "getSalutation", "(", ")", "{", "final", "Deferred", "<", "String", ">", "d", "=", "q", ".", "defer", "(", ")", ";", "Timer", "timer", "=", "new", "Timer", "(", ")", "{", "@", "Override", "public", "void", "...
Returns a promise of salutation by simulating an asynchronous call with a time-out.
[ "Returns", "a", "promise", "of", "salutation", "by", "simulating", "an", "asynchronous", "call", "with", "a", "time", "-", "out", "." ]
train
https://github.com/kyoken74/gwt-angular-site/blob/12134f4910abe41145d0020e886620605eb03749/gwt-angular-examples/Promise/src/main/java/com/asayama/gwt/angular/site/examples/client/service/GreetingService.java#L34-L47
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/geom/GeoPackageGeometryData.java
GeoPackageGeometryData.readEnvelope
private GeometryEnvelope readEnvelope(int envelopeIndicator, ByteReader reader) { GeometryEnvelope envelope = null; if (envelopeIndicator > 0) { // Read x and y values and create envelope double minX = reader.readDouble(); double maxX = reader.readDouble(); double minY = reader.readDouble(); do...
java
private GeometryEnvelope readEnvelope(int envelopeIndicator, ByteReader reader) { GeometryEnvelope envelope = null; if (envelopeIndicator > 0) { // Read x and y values and create envelope double minX = reader.readDouble(); double maxX = reader.readDouble(); double minY = reader.readDouble(); do...
[ "private", "GeometryEnvelope", "readEnvelope", "(", "int", "envelopeIndicator", ",", "ByteReader", "reader", ")", "{", "GeometryEnvelope", "envelope", "=", "null", ";", "if", "(", "envelopeIndicator", ">", "0", ")", "{", "// Read x and y values and create envelope", "...
Read the envelope based upon the indicator value @param envelopeIndicator envelope indicator @param reader byte reader @return geometry envelope
[ "Read", "the", "envelope", "based", "upon", "the", "indicator", "value" ]
train
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/geom/GeoPackageGeometryData.java#L279-L333
Stratio/stratio-connector-commons
connector-commons/src/main/java/com/stratio/connector/commons/util/ManifestUtil.java
ManifestUtil.getConectorName
public static String getConectorName(String pathManifest) throws InitializationException { String connectionName = ""; try { Document document = getDocument(pathManifest); Object result = getResult(document, "//ConnectorName/text()"); connectionName = ((NodeList) re...
java
public static String getConectorName(String pathManifest) throws InitializationException { String connectionName = ""; try { Document document = getDocument(pathManifest); Object result = getResult(document, "//ConnectorName/text()"); connectionName = ((NodeList) re...
[ "public", "static", "String", "getConectorName", "(", "String", "pathManifest", ")", "throws", "InitializationException", "{", "String", "connectionName", "=", "\"\"", ";", "try", "{", "Document", "document", "=", "getDocument", "(", "pathManifest", ")", ";", "Obj...
Recovered the ConecrtorName form Manifest. @param pathManifest the manifest path. @return the ConectionName. @throws InitializationException if an error happens while XML is reading.
[ "Recovered", "the", "ConecrtorName", "form", "Manifest", "." ]
train
https://github.com/Stratio/stratio-connector-commons/blob/d7cc66cb9591344a13055962e87a91f01c3707d1/connector-commons/src/main/java/com/stratio/connector/commons/util/ManifestUtil.java#L86-L103
VoltDB/voltdb
src/frontend/org/voltdb/jdbc/JDBC4CallableStatement.java
JDBC4CallableStatement.getTime
@Override public Time getTime(String parameterName, Calendar cal) throws SQLException { checkClosed(); throw SQLError.noSupport(); }
java
@Override public Time getTime(String parameterName, Calendar cal) throws SQLException { checkClosed(); throw SQLError.noSupport(); }
[ "@", "Override", "public", "Time", "getTime", "(", "String", "parameterName", ",", "Calendar", "cal", ")", "throws", "SQLException", "{", "checkClosed", "(", ")", ";", "throw", "SQLError", ".", "noSupport", "(", ")", ";", "}" ]
Retrieves the value of a JDBC TIME parameter as a java.sql.Time object, using the given Calendar object to construct the time.
[ "Retrieves", "the", "value", "of", "a", "JDBC", "TIME", "parameter", "as", "a", "java", ".", "sql", ".", "Time", "object", "using", "the", "given", "Calendar", "object", "to", "construct", "the", "time", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jdbc/JDBC4CallableStatement.java#L463-L468
apache/groovy
src/main/java/org/codehaus/groovy/runtime/metaclass/MetaClassRegistryImpl.java
MetaClassRegistryImpl.setMetaClass
private void setMetaClass(Class theClass, MetaClass oldMc, MetaClass newMc) { final ClassInfo info = ClassInfo.getClassInfo(theClass); MetaClass mc = null; info.lock(); try { mc = info.getStrongMetaClass(); info.setStrongMetaClass(newMc); } finall...
java
private void setMetaClass(Class theClass, MetaClass oldMc, MetaClass newMc) { final ClassInfo info = ClassInfo.getClassInfo(theClass); MetaClass mc = null; info.lock(); try { mc = info.getStrongMetaClass(); info.setStrongMetaClass(newMc); } finall...
[ "private", "void", "setMetaClass", "(", "Class", "theClass", ",", "MetaClass", "oldMc", ",", "MetaClass", "newMc", ")", "{", "final", "ClassInfo", "info", "=", "ClassInfo", ".", "getClassInfo", "(", "theClass", ")", ";", "MetaClass", "mc", "=", "null", ";", ...
if oldMc is null, newMc will replace whatever meta class was used before. if oldMc is not null, then newMc will be used only if he stored mc is the same as oldMc
[ "if", "oldMc", "is", "null", "newMc", "will", "replace", "whatever", "meta", "class", "was", "used", "before", ".", "if", "oldMc", "is", "not", "null", "then", "newMc", "will", "be", "used", "only", "if", "he", "stored", "mc", "is", "the", "same", "as"...
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/runtime/metaclass/MetaClassRegistryImpl.java#L283-L297
FlyingHe/UtilsMaven
src/main/java/com/github/flyinghe/tools/WriteExcelUtils.java
WriteExcelUtils.writeWorkBook
public static <T> Workbook writeWorkBook(Workbook workbook, List<T> beans) { return WriteExcelUtils.writeWorkBook(workbook, beans, null); }
java
public static <T> Workbook writeWorkBook(Workbook workbook, List<T> beans) { return WriteExcelUtils.writeWorkBook(workbook, beans, null); }
[ "public", "static", "<", "T", ">", "Workbook", "writeWorkBook", "(", "Workbook", "workbook", ",", "List", "<", "T", ">", "beans", ")", "{", "return", "WriteExcelUtils", ".", "writeWorkBook", "(", "workbook", ",", "beans", ",", "null", ")", ";", "}" ]
将Beans写入WorkBook中,默认以bean中的所有属性作为标题且写入第0行,0-based @param workbook 指定工作簿 @param beans 指定写入的Beans(或者泛型为Map) @return 返回传入的WorkBook
[ "将Beans写入WorkBook中", "默认以bean中的所有属性作为标题且写入第0行,0", "-", "based" ]
train
https://github.com/FlyingHe/UtilsMaven/blob/d9605b7bfe0c28a05289252e12d163e114080b4a/src/main/java/com/github/flyinghe/tools/WriteExcelUtils.java#L353-L355
aNNiMON/Lightweight-Stream-API
stream/src/main/java/com/annimon/stream/RandomCompat.java
RandomCompat.ints
@NotNull public IntStream ints(long streamSize, final int randomNumberOrigin, final int randomNumberBound) { if (streamSize < 0L) throw new IllegalArgumentException(); if (streamSize == 0L) { return IntStream.empty(); } return ints(randomNumberOrigin, randomNumberBound).l...
java
@NotNull public IntStream ints(long streamSize, final int randomNumberOrigin, final int randomNumberBound) { if (streamSize < 0L) throw new IllegalArgumentException(); if (streamSize == 0L) { return IntStream.empty(); } return ints(randomNumberOrigin, randomNumberBound).l...
[ "@", "NotNull", "public", "IntStream", "ints", "(", "long", "streamSize", ",", "final", "int", "randomNumberOrigin", ",", "final", "int", "randomNumberBound", ")", "{", "if", "(", "streamSize", "<", "0L", ")", "throw", "new", "IllegalArgumentException", "(", "...
Returns a stream producing the given {@code streamSize} number of pseudorandom {@code int} values, each conforming to the given origin (inclusive) and bound (exclusive). @param streamSize the number of values to generate @param randomNumberOrigin the origin (inclusive) of each random value @param randomNumberBound t...
[ "Returns", "a", "stream", "producing", "the", "given", "{", "@code", "streamSize", "}", "number", "of", "pseudorandom", "{", "@code", "int", "}", "values", "each", "conforming", "to", "the", "given", "origin", "(", "inclusive", ")", "and", "bound", "(", "e...
train
https://github.com/aNNiMON/Lightweight-Stream-API/blob/f29fd57208c20252a4549b084d55ed082c3e58f0/stream/src/main/java/com/annimon/stream/RandomCompat.java#L190-L197
Harium/keel
src/main/java/com/harium/keel/catalano/core/DoublePoint.java
DoublePoint.Subtract
public DoublePoint Subtract(DoublePoint point1, DoublePoint point2) { DoublePoint result = new DoublePoint(point1); result.Subtract(point2); return result; }
java
public DoublePoint Subtract(DoublePoint point1, DoublePoint point2) { DoublePoint result = new DoublePoint(point1); result.Subtract(point2); return result; }
[ "public", "DoublePoint", "Subtract", "(", "DoublePoint", "point1", ",", "DoublePoint", "point2", ")", "{", "DoublePoint", "result", "=", "new", "DoublePoint", "(", "point1", ")", ";", "result", ".", "Subtract", "(", "point2", ")", ";", "return", "result", ";...
Subtract values of two points. @param point1 DoublePoint. @param point2 DoublePoint. @return A new DoublePoint with the subtraction operation.
[ "Subtract", "values", "of", "two", "points", "." ]
train
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/core/DoublePoint.java#L172-L176
EdwardRaff/JSAT
JSAT/src/jsat/parameters/Parameter.java
Parameter.toParameterMap
public static Map<String, Parameter> toParameterMap(List<Parameter> params) { Map<String, Parameter> map = new HashMap<String, Parameter>(params.size()); for(Parameter param : params) { if(map.put(param.getASCIIName(), param) != null) throw new RuntimeException("N...
java
public static Map<String, Parameter> toParameterMap(List<Parameter> params) { Map<String, Parameter> map = new HashMap<String, Parameter>(params.size()); for(Parameter param : params) { if(map.put(param.getASCIIName(), param) != null) throw new RuntimeException("N...
[ "public", "static", "Map", "<", "String", ",", "Parameter", ">", "toParameterMap", "(", "List", "<", "Parameter", ">", "params", ")", "{", "Map", "<", "String", ",", "Parameter", ">", "map", "=", "new", "HashMap", "<", "String", ",", "Parameter", ">", ...
Creates a map of all possible parameter names to their corresponding object. No two parameters may have the same name. @param params the list of parameters to create a map for @return a map of string names to their parameters @throws RuntimeException if two parameters have the same name
[ "Creates", "a", "map", "of", "all", "possible", "parameter", "names", "to", "their", "corresponding", "object", ".", "No", "two", "parameters", "may", "have", "the", "same", "name", "." ]
train
https://github.com/EdwardRaff/JSAT/blob/0ff53b7b39684b2379cc1da522f5b3a954b15cfb/JSAT/src/jsat/parameters/Parameter.java#L172-L184
authlete/authlete-java-common
src/main/java/com/authlete/common/dto/TokenRequest.java
TokenRequest.setParameters
public TokenRequest setParameters(Map<String, String[]> parameters) { return setParameters(URLCoder.formUrlEncode(parameters)); }
java
public TokenRequest setParameters(Map<String, String[]> parameters) { return setParameters(URLCoder.formUrlEncode(parameters)); }
[ "public", "TokenRequest", "setParameters", "(", "Map", "<", "String", ",", "String", "[", "]", ">", "parameters", ")", "{", "return", "setParameters", "(", "URLCoder", ".", "formUrlEncode", "(", "parameters", ")", ")", ";", "}" ]
Set the value of {@code parameters} which are the request parameters that the OAuth 2.0 token endpoint of the service implementation received from the client application. <p> This method converts the given map into a string in {@code x-www-form-urlencoded} and passes it to {@link #setParameters(String)} method. </p> ...
[ "Set", "the", "value", "of", "{", "@code", "parameters", "}", "which", "are", "the", "request", "parameters", "that", "the", "OAuth", "2", ".", "0", "token", "endpoint", "of", "the", "service", "implementation", "received", "from", "the", "client", "applicat...
train
https://github.com/authlete/authlete-java-common/blob/49c94c483713cbf5a04d805ff7dbd83766c9c964/src/main/java/com/authlete/common/dto/TokenRequest.java#L192-L195
javalite/activejdbc
activejdbc/src/main/java/org/javalite/activejdbc/Model.java
Model.validateRegexpOf
protected static ValidationBuilder validateRegexpOf(String attributeName, String pattern) { return ModelDelegate.validateRegexpOf(modelClass(), attributeName, pattern); }
java
protected static ValidationBuilder validateRegexpOf(String attributeName, String pattern) { return ModelDelegate.validateRegexpOf(modelClass(), attributeName, pattern); }
[ "protected", "static", "ValidationBuilder", "validateRegexpOf", "(", "String", "attributeName", ",", "String", "pattern", ")", "{", "return", "ModelDelegate", ".", "validateRegexpOf", "(", "modelClass", "(", ")", ",", "attributeName", ",", "pattern", ")", ";", "}"...
Validates an attribite format with a ree hand regular expression. @param attributeName attribute to validate. @param pattern regexp pattern which must match the value.
[ "Validates", "an", "attribite", "format", "with", "a", "ree", "hand", "regular", "expression", "." ]
train
https://github.com/javalite/activejdbc/blob/ffcf5457cace19622a8f71e856cbbbe9e7dd5fcc/activejdbc/src/main/java/org/javalite/activejdbc/Model.java#L2007-L2009
livetribe/livetribe-slp
osgi/bundle/src/main/java/org/livetribe/slp/osgi/ByServicePropertiesServiceTracker.java
ByServicePropertiesServiceTracker.removedService
@Override public void removedService(ServiceReference reference, Object service) { LOGGER.entering(CLASS_NAME, "removedService", new Object[]{reference, service}); context.ungetService(reference); ServiceInfo serviceInfo = (ServiceInfo)service; serviceAgent.deregister(serviceI...
java
@Override public void removedService(ServiceReference reference, Object service) { LOGGER.entering(CLASS_NAME, "removedService", new Object[]{reference, service}); context.ungetService(reference); ServiceInfo serviceInfo = (ServiceInfo)service; serviceAgent.deregister(serviceI...
[ "@", "Override", "public", "void", "removedService", "(", "ServiceReference", "reference", ",", "Object", "service", ")", "{", "LOGGER", ".", "entering", "(", "CLASS_NAME", ",", "\"removedService\"", ",", "new", "Object", "[", "]", "{", "reference", ",", "serv...
Deregister the instance of {@link ServiceInfo} from the {@link ServiceAgent}, effectively unregistering the SLP service URL. @param reference The reference to the OSGi service that implicitly registered the SLP service URL. @param service The instance of {@link ServiceInfo} to deregister. @see org.osgi.util.tracker....
[ "Deregister", "the", "instance", "of", "{", "@link", "ServiceInfo", "}", "from", "the", "{", "@link", "ServiceAgent", "}", "effectively", "unregistering", "the", "SLP", "service", "URL", "." ]
train
https://github.com/livetribe/livetribe-slp/blob/6cc13dbe81feab133fe3dd291ca081cbc6e1f591/osgi/bundle/src/main/java/org/livetribe/slp/osgi/ByServicePropertiesServiceTracker.java#L204-L216
Samsung/GearVRf
GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/Widget.java
Widget.addChild
protected boolean addChild(Widget child, int index, boolean preventLayout) { return addChild(child, child.getSceneObject(), index, preventLayout); }
java
protected boolean addChild(Widget child, int index, boolean preventLayout) { return addChild(child, child.getSceneObject(), index, preventLayout); }
[ "protected", "boolean", "addChild", "(", "Widget", "child", ",", "int", "index", ",", "boolean", "preventLayout", ")", "{", "return", "addChild", "(", "child", ",", "child", ".", "getSceneObject", "(", ")", ",", "index", ",", "preventLayout", ")", ";", "}"...
Add another {@link Widget} as a child of this one. Overload to intercept all child adds. @param child The {@code Widget} to add as a child. @param index Position at which to add the child. Pass -1 to add at end. @param preventLayout The {@code Widget} whether to call layout(). @return {@code True} if {@code child} was...
[ "Add", "another", "{", "@link", "Widget", "}", "as", "a", "child", "of", "this", "one", ".", "Overload", "to", "intercept", "all", "child", "adds", "." ]
train
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/Widget.java#L2919-L2921
opsmatters/newrelic-api
src/main/java/com/opsmatters/newrelic/api/services/HttpContext.java
HttpContext.handleResponseError
private void handleResponseError(String method, URI uri, Response response) { if(throwExceptions && response.getStatus() != 200 && response.getStatus() != 201 && response.getStatus() != 204) { ErrorResponse error = null; if(response.h...
java
private void handleResponseError(String method, URI uri, Response response) { if(throwExceptions && response.getStatus() != 200 && response.getStatus() != 201 && response.getStatus() != 204) { ErrorResponse error = null; if(response.h...
[ "private", "void", "handleResponseError", "(", "String", "method", ",", "URI", "uri", ",", "Response", "response", ")", "{", "if", "(", "throwExceptions", "&&", "response", ".", "getStatus", "(", ")", "!=", "200", "&&", "response", ".", "getStatus", "(", "...
Handle HTTP error responses if {@link #throwExceptions() throwExceptions} returns <CODE>true</CODE>. @param method The HTTP method type @param uri The URI used for the HTTP call @param response The HTTP call response
[ "Handle", "HTTP", "error", "responses", "if", "{" ]
train
https://github.com/opsmatters/newrelic-api/blob/5bc2ea62ec368db891e4fd5fe3dcdf529d086b5e/src/main/java/com/opsmatters/newrelic/api/services/HttpContext.java#L622-L635
super-csv/super-csv
super-csv/src/main/java/org/supercsv/cellprocessor/constraint/Strlen.java
Strlen.execute
public Object execute(final Object value, final CsvContext context) { validateInputNotNull(value, context); final String stringValue = value.toString(); final int length = stringValue.length(); if( !requiredLengths.contains(length) ) { throw new SuperCsvConstraintViolationException(String.format("the leng...
java
public Object execute(final Object value, final CsvContext context) { validateInputNotNull(value, context); final String stringValue = value.toString(); final int length = stringValue.length(); if( !requiredLengths.contains(length) ) { throw new SuperCsvConstraintViolationException(String.format("the leng...
[ "public", "Object", "execute", "(", "final", "Object", "value", ",", "final", "CsvContext", "context", ")", "{", "validateInputNotNull", "(", "value", ",", "context", ")", ";", "final", "String", "stringValue", "=", "value", ".", "toString", "(", ")", ";", ...
{@inheritDoc} @throws SuperCsvCellProcessorException if value is null @throws SuperCsvConstraintViolationException if the length of value isn't one of the required lengths
[ "{", "@inheritDoc", "}" ]
train
https://github.com/super-csv/super-csv/blob/f18db724674dc1c4116e25142c1b5403ebf43e96/super-csv/src/main/java/org/supercsv/cellprocessor/constraint/Strlen.java#L137-L148
JOML-CI/JOML
src/org/joml/Matrix3f.java
Matrix3f.scaling
public Matrix3f scaling(float x, float y, float z) { MemUtil.INSTANCE.zero(this); m00 = x; m11 = y; m22 = z; return this; }
java
public Matrix3f scaling(float x, float y, float z) { MemUtil.INSTANCE.zero(this); m00 = x; m11 = y; m22 = z; return this; }
[ "public", "Matrix3f", "scaling", "(", "float", "x", ",", "float", "y", ",", "float", "z", ")", "{", "MemUtil", ".", "INSTANCE", ".", "zero", "(", "this", ")", ";", "m00", "=", "x", ";", "m11", "=", "y", ";", "m22", "=", "z", ";", "return", "thi...
Set this matrix to be a simple scale matrix. @param x the scale in x @param y the scale in y @param z the scale in z @return this
[ "Set", "this", "matrix", "to", "be", "a", "simple", "scale", "matrix", "." ]
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Matrix3f.java#L1325-L1331
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/extension/NGAExtensions.java
NGAExtensions.deleteTileScaling
public static void deleteTileScaling(GeoPackageCore geoPackage, String table) { TileScalingDao tileScalingDao = geoPackage.getTileScalingDao(); ExtensionsDao extensionsDao = geoPackage.getExtensionsDao(); try { if (tileScalingDao.isTableExists()) { tileScalingDao.deleteById(table); } if (extensions...
java
public static void deleteTileScaling(GeoPackageCore geoPackage, String table) { TileScalingDao tileScalingDao = geoPackage.getTileScalingDao(); ExtensionsDao extensionsDao = geoPackage.getExtensionsDao(); try { if (tileScalingDao.isTableExists()) { tileScalingDao.deleteById(table); } if (extensions...
[ "public", "static", "void", "deleteTileScaling", "(", "GeoPackageCore", "geoPackage", ",", "String", "table", ")", "{", "TileScalingDao", "tileScalingDao", "=", "geoPackage", ".", "getTileScalingDao", "(", ")", ";", "ExtensionsDao", "extensionsDao", "=", "geoPackage",...
Delete the Tile Scaling extensions for the table @param geoPackage GeoPackage @param table table name @since 2.0.2
[ "Delete", "the", "Tile", "Scaling", "extensions", "for", "the", "table" ]
train
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/NGAExtensions.java#L195-L213
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/util/io/DirectoryHelper.java
DirectoryHelper.renameFile
public static void renameFile(File srcFile, File dstFile) throws IOException { // Rename the srcFile file to the new one. Unfortunately, the renameTo() // method does not work reliably under some JVMs. Therefore, if the // rename fails, we manually rename by copying the srcFile file to the new...
java
public static void renameFile(File srcFile, File dstFile) throws IOException { // Rename the srcFile file to the new one. Unfortunately, the renameTo() // method does not work reliably under some JVMs. Therefore, if the // rename fails, we manually rename by copying the srcFile file to the new...
[ "public", "static", "void", "renameFile", "(", "File", "srcFile", ",", "File", "dstFile", ")", "throws", "IOException", "{", "// Rename the srcFile file to the new one. Unfortunately, the renameTo()\r", "// method does not work reliably under some JVMs. Therefore, if the\r", "// ren...
Rename file. If file can't be renamed in standard way the coping data will be used instead. @param srcFile source file @param dstFile destination file @throws IOException if any exception occurred
[ "Rename", "file", ".", "If", "file", "can", "t", "be", "renamed", "in", "standard", "way", "the", "coping", "data", "will", "be", "used", "instead", "." ]
train
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/util/io/DirectoryHelper.java#L408-L446
Netflix/zeno
src/main/java/com/netflix/zeno/diff/history/DiffHistoryTracker.java
DiffHistoryTracker.addState
public void addState() { DiffHistoryDataState nextState = new DiffHistoryDataState(stateEngine, typeDiffInstructions); if(currentDataState != null) newHistoricalState(currentDataState, nextState); currentDataState = nextState; }
java
public void addState() { DiffHistoryDataState nextState = new DiffHistoryDataState(stateEngine, typeDiffInstructions); if(currentDataState != null) newHistoricalState(currentDataState, nextState); currentDataState = nextState; }
[ "public", "void", "addState", "(", ")", "{", "DiffHistoryDataState", "nextState", "=", "new", "DiffHistoryDataState", "(", "stateEngine", ",", "typeDiffInstructions", ")", ";", "if", "(", "currentDataState", "!=", "null", ")", "newHistoricalState", "(", "currentData...
Call this method after new data has been loaded by the FastBlobStateEngine. This will add a historical record of the differences between the previous state and this new state.
[ "Call", "this", "method", "after", "new", "data", "has", "been", "loaded", "by", "the", "FastBlobStateEngine", ".", "This", "will", "add", "a", "historical", "record", "of", "the", "differences", "between", "the", "previous", "state", "and", "this", "new", "...
train
https://github.com/Netflix/zeno/blob/e571a3f1e304942724d454408fe6417fe18c20fd/src/main/java/com/netflix/zeno/diff/history/DiffHistoryTracker.java#L76-L83
brunocvcunha/inutils4j
src/main/java/org/brunocvcunha/inutils4j/MyStringUtils.java
MyStringUtils.regexFindFirst
public static String regexFindFirst(String pattern, String str) { return regexFindFirst(Pattern.compile(pattern), str, 1); }
java
public static String regexFindFirst(String pattern, String str) { return regexFindFirst(Pattern.compile(pattern), str, 1); }
[ "public", "static", "String", "regexFindFirst", "(", "String", "pattern", ",", "String", "str", ")", "{", "return", "regexFindFirst", "(", "Pattern", ".", "compile", "(", "pattern", ")", ",", "str", ",", "1", ")", ";", "}" ]
Gets the first group of a regex @param pattern Pattern @param str String to find @return the matching group
[ "Gets", "the", "first", "group", "of", "a", "regex" ]
train
https://github.com/brunocvcunha/inutils4j/blob/223c4443c2cee662576ce644e552588fa114aa94/src/main/java/org/brunocvcunha/inutils4j/MyStringUtils.java#L490-L492
nostra13/Android-Universal-Image-Loader
library/src/main/java/com/nostra13/universalimageloader/cache/disc/impl/BaseDiskCache.java
BaseDiskCache.getFile
protected File getFile(String imageUri) { String fileName = fileNameGenerator.generate(imageUri); File dir = cacheDir; if (!cacheDir.exists() && !cacheDir.mkdirs()) { if (reserveCacheDir != null && (reserveCacheDir.exists() || reserveCacheDir.mkdirs())) { dir = reserveCacheDir; } } return new File(d...
java
protected File getFile(String imageUri) { String fileName = fileNameGenerator.generate(imageUri); File dir = cacheDir; if (!cacheDir.exists() && !cacheDir.mkdirs()) { if (reserveCacheDir != null && (reserveCacheDir.exists() || reserveCacheDir.mkdirs())) { dir = reserveCacheDir; } } return new File(d...
[ "protected", "File", "getFile", "(", "String", "imageUri", ")", "{", "String", "fileName", "=", "fileNameGenerator", ".", "generate", "(", "imageUri", ")", ";", "File", "dir", "=", "cacheDir", ";", "if", "(", "!", "cacheDir", ".", "exists", "(", ")", "&&...
Returns file object (not null) for incoming image URI. File object can reference to non-existing file.
[ "Returns", "file", "object", "(", "not", "null", ")", "for", "incoming", "image", "URI", ".", "File", "object", "can", "reference", "to", "non", "-", "existing", "file", "." ]
train
https://github.com/nostra13/Android-Universal-Image-Loader/blob/fc3c5f6779bb4f702e233653b61bd9d559e345cc/library/src/main/java/com/nostra13/universalimageloader/cache/disc/impl/BaseDiskCache.java#L166-L175
alkacon/opencms-core
src-modules/org/opencms/workplace/commons/CmsTouch.java
CmsTouch.hardTouch
private static void hardTouch(CmsObject cms, CmsResource resource) throws CmsException { CmsFile file = cms.readFile(resource); file.setContents(file.getContents()); cms.writeFile(file); }
java
private static void hardTouch(CmsObject cms, CmsResource resource) throws CmsException { CmsFile file = cms.readFile(resource); file.setContents(file.getContents()); cms.writeFile(file); }
[ "private", "static", "void", "hardTouch", "(", "CmsObject", "cms", ",", "CmsResource", "resource", ")", "throws", "CmsException", "{", "CmsFile", "file", "=", "cms", ".", "readFile", "(", "resource", ")", ";", "file", ".", "setContents", "(", "file", ".", ...
Rewrites the content of the given file.<p> @param resource the resource to rewrite the content for @throws CmsException if something goes wrong
[ "Rewrites", "the", "content", "of", "the", "given", "file", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-modules/org/opencms/workplace/commons/CmsTouch.java#L160-L165
davetcc/tcMenu
tcMenuExampleUI/src/main/java/com/thecoderscorner/menu/examples/simpleui/MainWindowController.java
MainWindowController.buildGrid
private int buildGrid(SubMenuItem subMenu, int inset, int gridPosition) { // inset is the amount of offset to apply to the left, to make the tree look realistic // gridPosition is the row in the grid we populating. // while there are more menuitems in the current level for (MenuItem it...
java
private int buildGrid(SubMenuItem subMenu, int inset, int gridPosition) { // inset is the amount of offset to apply to the left, to make the tree look realistic // gridPosition is the row in the grid we populating. // while there are more menuitems in the current level for (MenuItem it...
[ "private", "int", "buildGrid", "(", "SubMenuItem", "subMenu", ",", "int", "inset", ",", "int", "gridPosition", ")", "{", "// inset is the amount of offset to apply to the left, to make the tree look realistic", "// gridPosition is the row in the grid we populating.", "// while there ...
Here we go through all the menu items and populate a GridPane with controls to display and edit each item. We start at ROOT and through every item in all submenus. This is a recursive function that is repeatedly called on sub menu's until we've finished all items.
[ "Here", "we", "go", "through", "all", "the", "menu", "items", "and", "populate", "a", "GridPane", "with", "controls", "to", "display", "and", "edit", "each", "item", ".", "We", "start", "at", "ROOT", "and", "through", "every", "item", "in", "all", "subme...
train
https://github.com/davetcc/tcMenu/blob/61546e4b982b25ceaff384073fe9ec1fff55e64a/tcMenuExampleUI/src/main/java/com/thecoderscorner/menu/examples/simpleui/MainWindowController.java#L188-L219
gallandarakhneorg/afc
advanced/mathfx/src/main/java/org/arakhne/afc/math/geometry/d2/dfx/Triangle2dfx.java
Triangle2dfx.ccwProperty
@Pure public ReadOnlyBooleanProperty ccwProperty() { if (this.ccw == null) { this.ccw = new ReadOnlyBooleanWrapper(this, MathFXAttributeNames.CCW); this.ccw.bind(Bindings.createBooleanBinding(() -> Triangle2afp.isCCW( getX1(), getY1(), getX2(), getY2(), getX3(), getY3()), x1Property(), y1P...
java
@Pure public ReadOnlyBooleanProperty ccwProperty() { if (this.ccw == null) { this.ccw = new ReadOnlyBooleanWrapper(this, MathFXAttributeNames.CCW); this.ccw.bind(Bindings.createBooleanBinding(() -> Triangle2afp.isCCW( getX1(), getY1(), getX2(), getY2(), getX3(), getY3()), x1Property(), y1P...
[ "@", "Pure", "public", "ReadOnlyBooleanProperty", "ccwProperty", "(", ")", "{", "if", "(", "this", ".", "ccw", "==", "null", ")", "{", "this", ".", "ccw", "=", "new", "ReadOnlyBooleanWrapper", "(", "this", ",", "MathFXAttributeNames", ".", "CCW", ")", ";",...
Replies the property that indictes if the triangle's points are defined in a counter-clockwise order. @return the ccw property.
[ "Replies", "the", "property", "that", "indictes", "if", "the", "triangle", "s", "points", "are", "defined", "in", "a", "counter", "-", "clockwise", "order", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/mathfx/src/main/java/org/arakhne/afc/math/geometry/d2/dfx/Triangle2dfx.java#L305-L318
dnsjava/dnsjava
update.java
update.parseRR
Record parseRR(Tokenizer st, int classValue, long TTLValue) throws IOException { Name name = st.getName(zone); long ttl; int type; Record record; String s = st.getString(); try { ttl = TTL.parseTTL(s); s = st.getString(); } catch (NumberFormatException e) { ttl = TTLValue; } if (DClass.value(s) >= 0)...
java
Record parseRR(Tokenizer st, int classValue, long TTLValue) throws IOException { Name name = st.getName(zone); long ttl; int type; Record record; String s = st.getString(); try { ttl = TTL.parseTTL(s); s = st.getString(); } catch (NumberFormatException e) { ttl = TTLValue; } if (DClass.value(s) >= 0)...
[ "Record", "parseRR", "(", "Tokenizer", "st", ",", "int", "classValue", ",", "long", "TTLValue", ")", "throws", "IOException", "{", "Name", "name", "=", "st", ".", "getName", "(", "zone", ")", ";", "long", "ttl", ";", "int", "type", ";", "Record", "reco...
/* <name> [ttl] [class] <type> <data> Ignore the class, if present.
[ "/", "*", "<name", ">", "[", "ttl", "]", "[", "class", "]", "<type", ">", "<data", ">", "Ignore", "the", "class", "if", "present", "." ]
train
https://github.com/dnsjava/dnsjava/blob/d97b6a0685d59143372bb392ab591dd8dd840b61/update.java#L282-L314
Samsung/GearVRf
GVRf/Extensions/gvrf-physics/src/main/java/org/gearvrf/physics/GVRPhysicsLoader.java
GVRPhysicsLoader.loadPhysicsFile
public static void loadPhysicsFile(GVRContext gvrContext, String fileName, GVRScene scene) throws IOException { loadPhysicsFile(gvrContext, fileName, false, scene); }
java
public static void loadPhysicsFile(GVRContext gvrContext, String fileName, GVRScene scene) throws IOException { loadPhysicsFile(gvrContext, fileName, false, scene); }
[ "public", "static", "void", "loadPhysicsFile", "(", "GVRContext", "gvrContext", ",", "String", "fileName", ",", "GVRScene", "scene", ")", "throws", "IOException", "{", "loadPhysicsFile", "(", "gvrContext", ",", "fileName", ",", "false", ",", "scene", ")", ";", ...
Loads a physics settings file. @param gvrContext The context of the app. @param fileName Physics settings file name. @param scene The scene containing the objects to attach physics components.
[ "Loads", "a", "physics", "settings", "file", "." ]
train
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/gvrf-physics/src/main/java/org/gearvrf/physics/GVRPhysicsLoader.java#L49-L52
openbase/jul
communication/controller/src/main/java/org/openbase/jul/communication/controller/AbstractConfigurableRemote.java
AbstractConfigurableRemote.applyConfigUpdate
@Override public CONFIG applyConfigUpdate(final CONFIG config) throws CouldNotPerformException, InterruptedException { synchronized (CONFIG_LOCK) { try { this.config = config; configObservable.notifyObservers(config); // detect scope change if ins...
java
@Override public CONFIG applyConfigUpdate(final CONFIG config) throws CouldNotPerformException, InterruptedException { synchronized (CONFIG_LOCK) { try { this.config = config; configObservable.notifyObservers(config); // detect scope change if ins...
[ "@", "Override", "public", "CONFIG", "applyConfigUpdate", "(", "final", "CONFIG", "config", ")", "throws", "CouldNotPerformException", ",", "InterruptedException", "{", "synchronized", "(", "CONFIG_LOCK", ")", "{", "try", "{", "this", ".", "config", "=", "config",...
{@inheritDoc} @param config {@inheritDoc} @return {@inheritDoc} @throws CouldNotPerformException {@inheritDoc} @throws InterruptedException {@inheritDoc}
[ "{", "@inheritDoc", "}" ]
train
https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/communication/controller/src/main/java/org/openbase/jul/communication/controller/AbstractConfigurableRemote.java#L106-L133
percolate/caffeine
caffeine/src/main/java/com/percolate/caffeine/ViewUtils.java
ViewUtils.showKeyboard
public static void showKeyboard(Context context, View field){ try { field.requestFocus(); InputMethodManager imm = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE); imm.showSoftInput(field, InputMethodManager.SHOW_IMPLICIT); } catch (Excepti...
java
public static void showKeyboard(Context context, View field){ try { field.requestFocus(); InputMethodManager imm = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE); imm.showSoftInput(field, InputMethodManager.SHOW_IMPLICIT); } catch (Excepti...
[ "public", "static", "void", "showKeyboard", "(", "Context", "context", ",", "View", "field", ")", "{", "try", "{", "field", ".", "requestFocus", "(", ")", ";", "InputMethodManager", "imm", "=", "(", "InputMethodManager", ")", "context", ".", "getSystemService"...
Show the pop-up keyboard @param context Activity/Context. @param field field that requests focus.
[ "Show", "the", "pop", "-", "up", "keyboard" ]
train
https://github.com/percolate/caffeine/blob/e2265cab474a6397f4d75b1ed928c356a7b9672e/caffeine/src/main/java/com/percolate/caffeine/ViewUtils.java#L156-L164
albfernandez/itext2
src/main/java/com/lowagie/text/pdf/PdfLayer.java
PdfLayer.setCreatorInfo
public void setCreatorInfo(String creator, String subtype) { PdfDictionary usage = getUsage(); PdfDictionary dic = new PdfDictionary(); dic.put(PdfName.CREATOR, new PdfString(creator, PdfObject.TEXT_UNICODE)); dic.put(PdfName.SUBTYPE, new PdfName(subtype)); usage.put(PdfName.CREA...
java
public void setCreatorInfo(String creator, String subtype) { PdfDictionary usage = getUsage(); PdfDictionary dic = new PdfDictionary(); dic.put(PdfName.CREATOR, new PdfString(creator, PdfObject.TEXT_UNICODE)); dic.put(PdfName.SUBTYPE, new PdfName(subtype)); usage.put(PdfName.CREA...
[ "public", "void", "setCreatorInfo", "(", "String", "creator", ",", "String", "subtype", ")", "{", "PdfDictionary", "usage", "=", "getUsage", "(", ")", ";", "PdfDictionary", "dic", "=", "new", "PdfDictionary", "(", ")", ";", "dic", ".", "put", "(", "PdfName...
Used by the creating application to store application-specific data associated with this optional content group. @param creator a text string specifying the application that created the group @param subtype a string defining the type of content controlled by the group. Suggested values include but are not limited to <B...
[ "Used", "by", "the", "creating", "application", "to", "store", "application", "-", "specific", "data", "associated", "with", "this", "optional", "content", "group", "." ]
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/pdf/PdfLayer.java#L206-L212
UrielCh/ovh-java-sdk
ovh-java-sdk-sms/src/main/java/net/minidev/ovh/api/ApiOvhSms.java
ApiOvhSms.virtualNumbers_number_GET
public OvhVirtualNumberGenericService virtualNumbers_number_GET(String number) throws IOException { String qPath = "/sms/virtualNumbers/{number}"; StringBuilder sb = path(qPath, number); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, OvhVirtualNumberGenericService.class); }
java
public OvhVirtualNumberGenericService virtualNumbers_number_GET(String number) throws IOException { String qPath = "/sms/virtualNumbers/{number}"; StringBuilder sb = path(qPath, number); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, OvhVirtualNumberGenericService.class); }
[ "public", "OvhVirtualNumberGenericService", "virtualNumbers_number_GET", "(", "String", "number", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/sms/virtualNumbers/{number}\"", ";", "StringBuilder", "sb", "=", "path", "(", "qPath", ",", "number", ")", ...
Get this object properties REST: GET /sms/virtualNumbers/{number} @param number [required] Your virtual number
[ "Get", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-sms/src/main/java/net/minidev/ovh/api/ApiOvhSms.java#L1773-L1778
KostyaSha/yet-another-docker-plugin
yet-another-docker-its/src/main/java/com/github/kostyasha/it/rule/DockerRule.java
DockerRule.runFreshJenkinsContainer
public String runFreshJenkinsContainer(DockerImagePullStrategy pullStrategy, boolean forceRefresh) throws IOException, SettingsBuildingException, InterruptedException { LOG.debug("Entering run fresh jenkins container."); pullImage(pullStrategy, JENKINS_DEFAULT.getDockerImageName()); ...
java
public String runFreshJenkinsContainer(DockerImagePullStrategy pullStrategy, boolean forceRefresh) throws IOException, SettingsBuildingException, InterruptedException { LOG.debug("Entering run fresh jenkins container."); pullImage(pullStrategy, JENKINS_DEFAULT.getDockerImageName()); ...
[ "public", "String", "runFreshJenkinsContainer", "(", "DockerImagePullStrategy", "pullStrategy", ",", "boolean", "forceRefresh", ")", "throws", "IOException", ",", "SettingsBuildingException", ",", "InterruptedException", "{", "LOG", ".", "debug", "(", "\"Entering run fresh ...
Run, record and remove after test container with jenkins. @param forceRefresh enforce data container and data image refresh
[ "Run", "record", "and", "remove", "after", "test", "container", "with", "jenkins", "." ]
train
https://github.com/KostyaSha/yet-another-docker-plugin/blob/40b12e39ff94c3834cff7e028c3dd01c88e87d77/yet-another-docker-its/src/main/java/com/github/kostyasha/it/rule/DockerRule.java#L444-L488
tempodb/tempodb-java
src/main/java/com/tempodb/Client.java
Client.readSummary
public Result<Summary> readSummary(Series series, Interval interval) { checkNotNull(series); checkNotNull(interval); DateTimeZone timezone = interval.getStart().getChronology().getZone(); URI uri = null; try { URIBuilder builder = new URIBuilder(String.format("/%s/series/key/%s/summary/", API...
java
public Result<Summary> readSummary(Series series, Interval interval) { checkNotNull(series); checkNotNull(interval); DateTimeZone timezone = interval.getStart().getChronology().getZone(); URI uri = null; try { URIBuilder builder = new URIBuilder(String.format("/%s/series/key/%s/summary/", API...
[ "public", "Result", "<", "Summary", ">", "readSummary", "(", "Series", "series", ",", "Interval", "interval", ")", "{", "checkNotNull", "(", "series", ")", ";", "checkNotNull", "(", "interval", ")", ";", "DateTimeZone", "timezone", "=", "interval", ".", "get...
Reads summary statistics for a series for the specified interval. @param series The series to read from @param interval The interval of data to summarize @return A set of statistics for an interval of data @see SingleValue @since 1.1.0
[ "Reads", "summary", "statistics", "for", "a", "series", "for", "the", "specified", "interval", "." ]
train
https://github.com/tempodb/tempodb-java/blob/5733f204fe4c8dda48916ba1f67cf44f5a3f9c69/src/main/java/com/tempodb/Client.java#L575-L594
osglworks/java-tool
src/main/java/org/osgl/util/E.java
E.invalidConfiguration
public static ConfigurationException invalidConfiguration(Throwable cause, String message, Object... args) { throw new ConfigurationException(cause, message, args); }
java
public static ConfigurationException invalidConfiguration(Throwable cause, String message, Object... args) { throw new ConfigurationException(cause, message, args); }
[ "public", "static", "ConfigurationException", "invalidConfiguration", "(", "Throwable", "cause", ",", "String", "message", ",", "Object", "...", "args", ")", "{", "throw", "new", "ConfigurationException", "(", "cause", ",", "message", ",", "args", ")", ";", "}" ...
Throws out a {@link ConfigurationException} with cause and message specified. @param cause the cause of the configuration error. @param message the error message format pattern. @param args the error message format arguments.
[ "Throws", "out", "a", "{" ]
train
https://github.com/osglworks/java-tool/blob/8b6eee2bccb067eb32e6a7bc4a4dfef7a7d9008b/src/main/java/org/osgl/util/E.java#L299-L301
SonarSource/sonarqube
sonar-core/src/main/java/org/sonar/core/util/stream/MoreCollectors.java
MoreCollectors.unorderedIndex
public static <K, E> Collector<E, ImmutableSetMultimap.Builder<K, E>, ImmutableSetMultimap<K, E>> unorderedIndex(Function<? super E, K> keyFunction) { return unorderedIndex(keyFunction, Function.identity()); }
java
public static <K, E> Collector<E, ImmutableSetMultimap.Builder<K, E>, ImmutableSetMultimap<K, E>> unorderedIndex(Function<? super E, K> keyFunction) { return unorderedIndex(keyFunction, Function.identity()); }
[ "public", "static", "<", "K", ",", "E", ">", "Collector", "<", "E", ",", "ImmutableSetMultimap", ".", "Builder", "<", "K", ",", "E", ">", ",", "ImmutableSetMultimap", "<", "K", ",", "E", ">", ">", "unorderedIndex", "(", "Function", "<", "?", "super", ...
Creates an {@link com.google.common.collect.ImmutableSetMultimap} from the stream where the values are the values in the stream and the keys are the result of the provided {@link Function keyFunction} applied to each value in the stream. <p> Neither {@link Function keyFunction} nor {@link Function valueFunction} can r...
[ "Creates", "an", "{", "@link", "com", ".", "google", ".", "common", ".", "collect", ".", "ImmutableSetMultimap", "}", "from", "the", "stream", "where", "the", "values", "are", "the", "values", "in", "the", "stream", "and", "the", "keys", "are", "the", "r...
train
https://github.com/SonarSource/sonarqube/blob/2fffa4c2f79ae3714844d7742796e82822b6a98a/sonar-core/src/main/java/org/sonar/core/util/stream/MoreCollectors.java#L369-L371
Azure/azure-sdk-for-java
appservice/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/appservice/v2016_09_01/implementation/AppServiceEnvironmentsInner.java
AppServiceEnvironmentsInner.createOrUpdateAsync
public Observable<AppServiceEnvironmentResourceInner> createOrUpdateAsync(String resourceGroupName, String name, AppServiceEnvironmentResourceInner hostingEnvironmentEnvelope) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, name, hostingEnvironmentEnvelope).map(new Func1<ServiceResponse<AppSe...
java
public Observable<AppServiceEnvironmentResourceInner> createOrUpdateAsync(String resourceGroupName, String name, AppServiceEnvironmentResourceInner hostingEnvironmentEnvelope) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, name, hostingEnvironmentEnvelope).map(new Func1<ServiceResponse<AppSe...
[ "public", "Observable", "<", "AppServiceEnvironmentResourceInner", ">", "createOrUpdateAsync", "(", "String", "resourceGroupName", ",", "String", "name", ",", "AppServiceEnvironmentResourceInner", "hostingEnvironmentEnvelope", ")", "{", "return", "createOrUpdateWithServiceRespons...
Create or update an App Service Environment. Create or update an App Service Environment. @param resourceGroupName Name of the resource group to which the resource belongs. @param name Name of the App Service Environment. @param hostingEnvironmentEnvelope Configuration details of the App Service Environment. @throws I...
[ "Create", "or", "update", "an", "App", "Service", "Environment", ".", "Create", "or", "update", "an", "App", "Service", "Environment", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/appservice/v2016_09_01/implementation/AppServiceEnvironmentsInner.java#L715-L722
michel-kraemer/citeproc-java
citeproc-java/src/main/java/de/undercouch/citeproc/CSL.java
CSL.setConvertLinks
public void setConvertLinks(boolean convert) { try { runner.callMethod("setConvertLinks", engine, convert); } catch (ScriptRunnerException e) { throw new IllegalArgumentException("Could not set option", e); } }
java
public void setConvertLinks(boolean convert) { try { runner.callMethod("setConvertLinks", engine, convert); } catch (ScriptRunnerException e) { throw new IllegalArgumentException("Could not set option", e); } }
[ "public", "void", "setConvertLinks", "(", "boolean", "convert", ")", "{", "try", "{", "runner", ".", "callMethod", "(", "\"setConvertLinks\"", ",", "engine", ",", "convert", ")", ";", "}", "catch", "(", "ScriptRunnerException", "e", ")", "{", "throw", "new",...
Specifies if the processor should convert URLs and DOIs in the output to links. How links are created depends on the output format that has been set with {@link #setOutputFormat(String)} @param convert true if URLs and DOIs should be converted to links
[ "Specifies", "if", "the", "processor", "should", "convert", "URLs", "and", "DOIs", "in", "the", "output", "to", "links", ".", "How", "links", "are", "created", "depends", "on", "the", "output", "format", "that", "has", "been", "set", "with", "{" ]
train
https://github.com/michel-kraemer/citeproc-java/blob/1d5bf0e7bbb2bdc47309530babf0ecaba838bf10/citeproc-java/src/main/java/de/undercouch/citeproc/CSL.java#L579-L585
kkopacz/agiso-tempel
bundles/tempel-core/src/main/java/org/agiso/tempel/core/DefaultTemplateExecutor.java
DefaultTemplateExecutor.processParam
private Object processParam(TemplateParam<?, ?, ?> param, Map<String, Object> params, Template<?> template) { Object value = fetchParamValue(param, params, param.getFetcher()); value = convertParamValue(value, param.getType(), param.getConverter()); validateParamValue(value, param.getValidator()); return value;...
java
private Object processParam(TemplateParam<?, ?, ?> param, Map<String, Object> params, Template<?> template) { Object value = fetchParamValue(param, params, param.getFetcher()); value = convertParamValue(value, param.getType(), param.getConverter()); validateParamValue(value, param.getValidator()); return value;...
[ "private", "Object", "processParam", "(", "TemplateParam", "<", "?", ",", "?", ",", "?", ">", "param", ",", "Map", "<", "String", ",", "Object", ">", "params", ",", "Template", "<", "?", ">", "template", ")", "{", "Object", "value", "=", "fetchParamVal...
Przetwarzanie warości parametru (pobieranie, konwersja i walidacja) @param param @param params @param template @return
[ "Przetwarzanie", "warości", "parametru", "(", "pobieranie", "konwersja", "i", "walidacja", ")" ]
train
https://github.com/kkopacz/agiso-tempel/blob/ff7a96153153b6bc07212d776816b87d9538f6fa/bundles/tempel-core/src/main/java/org/agiso/tempel/core/DefaultTemplateExecutor.java#L384-L389
RoaringBitmap/RoaringBitmap
roaringbitmap/src/main/java/org/roaringbitmap/buffer/MappeableRunContainer.java
MappeableRunContainer.canPrependValueLength
private boolean canPrependValueLength(int value, int index) { if (index < this.nbrruns) { int nextValue = toIntUnsigned(getValue(index)); if (nextValue == value + 1) { return true; } } return false; }
java
private boolean canPrependValueLength(int value, int index) { if (index < this.nbrruns) { int nextValue = toIntUnsigned(getValue(index)); if (nextValue == value + 1) { return true; } } return false; }
[ "private", "boolean", "canPrependValueLength", "(", "int", "value", ",", "int", "index", ")", "{", "if", "(", "index", "<", "this", ".", "nbrruns", ")", "{", "int", "nextValue", "=", "toIntUnsigned", "(", "getValue", "(", "index", ")", ")", ";", "if", ...
To check if a value length can be prepended with a given value
[ "To", "check", "if", "a", "value", "length", "can", "be", "prepended", "with", "a", "given", "value" ]
train
https://github.com/RoaringBitmap/RoaringBitmap/blob/b26fd0a1330fd4d2877f4d74feb69ceb812e9efa/roaringbitmap/src/main/java/org/roaringbitmap/buffer/MappeableRunContainer.java#L676-L684
dnsjava/dnsjava
org/xbill/DNS/Record.java
Record.newRecord
public static Record newRecord(Name name, int type, int dclass, long ttl, int length, byte [] data) { if (!name.isAbsolute()) throw new RelativeNameException(name); Type.check(type); DClass.check(dclass); TTL.check(ttl); DNSInput in; if (data != null) in = new DNSInput(data); else in = null; try { retu...
java
public static Record newRecord(Name name, int type, int dclass, long ttl, int length, byte [] data) { if (!name.isAbsolute()) throw new RelativeNameException(name); Type.check(type); DClass.check(dclass); TTL.check(ttl); DNSInput in; if (data != null) in = new DNSInput(data); else in = null; try { retu...
[ "public", "static", "Record", "newRecord", "(", "Name", "name", ",", "int", "type", ",", "int", "dclass", ",", "long", "ttl", ",", "int", "length", ",", "byte", "[", "]", "data", ")", "{", "if", "(", "!", "name", ".", "isAbsolute", "(", ")", ")", ...
Creates a new record, with the given parameters. @param name The owner name of the record. @param type The record's type. @param dclass The record's class. @param ttl The record's time to live. @param length The length of the record's data. @param data The rdata of the record, in uncompressed DNS wire format. Only the...
[ "Creates", "a", "new", "record", "with", "the", "given", "parameters", "." ]
train
https://github.com/dnsjava/dnsjava/blob/d97b6a0685d59143372bb392ab591dd8dd840b61/org/xbill/DNS/Record.java#L107-L126
netty/netty
codec-http2/src/main/java/io/netty/handler/codec/http2/Http2ConnectionHandler.java
Http2ConnectionHandler.onHttpServerUpgrade
public void onHttpServerUpgrade(Http2Settings settings) throws Http2Exception { if (!connection().isServer()) { throw connectionError(PROTOCOL_ERROR, "Server-side HTTP upgrade requested for a client"); } if (!prefaceSent()) { // If the preface was not sent yet it most lik...
java
public void onHttpServerUpgrade(Http2Settings settings) throws Http2Exception { if (!connection().isServer()) { throw connectionError(PROTOCOL_ERROR, "Server-side HTTP upgrade requested for a client"); } if (!prefaceSent()) { // If the preface was not sent yet it most lik...
[ "public", "void", "onHttpServerUpgrade", "(", "Http2Settings", "settings", ")", "throws", "Http2Exception", "{", "if", "(", "!", "connection", "(", ")", ".", "isServer", "(", ")", ")", "{", "throw", "connectionError", "(", "PROTOCOL_ERROR", ",", "\"Server-side H...
Handles the server-side (cleartext) upgrade from HTTP to HTTP/2. @param settings the settings for the remote endpoint.
[ "Handles", "the", "server", "-", "side", "(", "cleartext", ")", "upgrade", "from", "HTTP", "to", "HTTP", "/", "2", "." ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-http2/src/main/java/io/netty/handler/codec/http2/Http2ConnectionHandler.java#L164-L182
JavaMoney/jsr354-ri-bp
src/main/java/org/javamoney/moneta/Money.java
Money.ofMinor
public static Money ofMinor(CurrencyUnit currency, long amountMinor, int factionDigits) { if(factionDigits < 0) { throw new IllegalArgumentException("The factionDigits cannot be negative"); } return of(BigDecimal.valueOf(amountMinor, factionDigits), currency); }
java
public static Money ofMinor(CurrencyUnit currency, long amountMinor, int factionDigits) { if(factionDigits < 0) { throw new IllegalArgumentException("The factionDigits cannot be negative"); } return of(BigDecimal.valueOf(amountMinor, factionDigits), currency); }
[ "public", "static", "Money", "ofMinor", "(", "CurrencyUnit", "currency", ",", "long", "amountMinor", ",", "int", "factionDigits", ")", "{", "if", "(", "factionDigits", "<", "0", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"The factionDigits cannot...
Obtains an instance of {@code Money} from an amount in minor units. For example, {@code ofMinor(USD, 1234, 2)} creates the instance {@code USD 12.34}. @param currency the currency, not null @param amountMinor the amount of money in the minor division of the currency @param factionDigits number of digits @return the m...
[ "Obtains", "an", "instance", "of", "{" ]
train
https://github.com/JavaMoney/jsr354-ri-bp/blob/9c147ef5623d8032a6dc4c0e5eefdfb41641a9a2/src/main/java/org/javamoney/moneta/Money.java#L829-L834
VoltDB/voltdb
src/frontend/org/voltdb/client/ClientImpl.java
ClientImpl.callProcedureWithClientTimeout
public ClientResponse callProcedureWithClientTimeout( int batchTimeout, boolean allPartition, String procName, long clientTimeout, TimeUnit unit, Object... parameters) throws IOException, NoConnectionsException, ProcCallExceptio...
java
public ClientResponse callProcedureWithClientTimeout( int batchTimeout, boolean allPartition, String procName, long clientTimeout, TimeUnit unit, Object... parameters) throws IOException, NoConnectionsException, ProcCallExceptio...
[ "public", "ClientResponse", "callProcedureWithClientTimeout", "(", "int", "batchTimeout", ",", "boolean", "allPartition", ",", "String", "procName", ",", "long", "clientTimeout", ",", "TimeUnit", "unit", ",", "Object", "...", "parameters", ")", "throws", "IOException"...
Synchronously invoke a procedure call blocking until a result is available. @param batchTimeout procedure invocation batch timeout. @param allPartition whether this is an all-partition invocation @param procName class name (not qualified by package) of the procedure to execute. @param clientTimeout timeout for the pro...
[ "Synchronously", "invoke", "a", "procedure", "call", "blocking", "until", "a", "result", "is", "available", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/client/ClientImpl.java#L311-L325
zaproxy/zaproxy
src/org/parosproxy/paros/extension/manualrequest/http/impl/HttpPanelSender.java
HttpPanelSender.notifyPersistentConnectionListener
private boolean notifyPersistentConnectionListener(HttpMessage httpMessage, Socket inSocket, ZapGetMethod method) { boolean keepSocketOpen = false; PersistentConnectionListener listener = null; synchronized (persistentConnectionListener) { for (int i = 0; i < persistentConnection...
java
private boolean notifyPersistentConnectionListener(HttpMessage httpMessage, Socket inSocket, ZapGetMethod method) { boolean keepSocketOpen = false; PersistentConnectionListener listener = null; synchronized (persistentConnectionListener) { for (int i = 0; i < persistentConnection...
[ "private", "boolean", "notifyPersistentConnectionListener", "(", "HttpMessage", "httpMessage", ",", "Socket", "inSocket", ",", "ZapGetMethod", "method", ")", "{", "boolean", "keepSocketOpen", "=", "false", ";", "PersistentConnectionListener", "listener", "=", "null", ";...
Go thru each listener and offer him to take over the connection. The first observer that returns true gets exclusive rights. @param httpMessage Contains HTTP request & response. @param inSocket Encapsulates the TCP connection to the browser. @param method Provides more power to process response. @return Boolean to in...
[ "Go", "thru", "each", "listener", "and", "offer", "him", "to", "take", "over", "the", "connection", ".", "The", "first", "observer", "that", "returns", "true", "gets", "exclusive", "rights", "." ]
train
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/extension/manualrequest/http/impl/HttpPanelSender.java#L172-L191
Azure/azure-sdk-for-java
appservice/resource-manager/v2016_03_01/src/main/java/com/microsoft/azure/management/appservice/v2016_03_01/implementation/DiagnosticsInner.java
DiagnosticsInner.getHostingEnvironmentDetectorResponseAsync
public Observable<DetectorResponseInner> getHostingEnvironmentDetectorResponseAsync(String resourceGroupName, String name, String detectorName) { return getHostingEnvironmentDetectorResponseWithServiceResponseAsync(resourceGroupName, name, detectorName).map(new Func1<ServiceResponse<DetectorResponseInner>, Dete...
java
public Observable<DetectorResponseInner> getHostingEnvironmentDetectorResponseAsync(String resourceGroupName, String name, String detectorName) { return getHostingEnvironmentDetectorResponseWithServiceResponseAsync(resourceGroupName, name, detectorName).map(new Func1<ServiceResponse<DetectorResponseInner>, Dete...
[ "public", "Observable", "<", "DetectorResponseInner", ">", "getHostingEnvironmentDetectorResponseAsync", "(", "String", "resourceGroupName", ",", "String", "name", ",", "String", "detectorName", ")", "{", "return", "getHostingEnvironmentDetectorResponseWithServiceResponseAsync", ...
Get Hosting Environment Detector Response. Get Hosting Environment Detector Response. @param resourceGroupName Name of the resource group to which the resource belongs. @param name App Service Environment Name @param detectorName Detector Resource Name @throws IllegalArgumentException thrown if parameters fail the val...
[ "Get", "Hosting", "Environment", "Detector", "Response", ".", "Get", "Hosting", "Environment", "Detector", "Response", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2016_03_01/src/main/java/com/microsoft/azure/management/appservice/v2016_03_01/implementation/DiagnosticsInner.java#L365-L372
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/util/ClassPathUtil.java
ClassPathUtil.findCodeBaseInClassPath
public static String findCodeBaseInClassPath(Pattern codeBaseNamePattern, String classPath) { if (classPath == null) { return null; } StringTokenizer tok = new StringTokenizer(classPath, File.pathSeparator); while (tok.hasMoreTokens()) { String t = tok.nextToken(...
java
public static String findCodeBaseInClassPath(Pattern codeBaseNamePattern, String classPath) { if (classPath == null) { return null; } StringTokenizer tok = new StringTokenizer(classPath, File.pathSeparator); while (tok.hasMoreTokens()) { String t = tok.nextToken(...
[ "public", "static", "String", "findCodeBaseInClassPath", "(", "Pattern", "codeBaseNamePattern", ",", "String", "classPath", ")", "{", "if", "(", "classPath", "==", "null", ")", "{", "return", "null", ";", "}", "StringTokenizer", "tok", "=", "new", "StringTokeniz...
Try to find a codebase matching the given pattern in the given class path string. @param codeBaseNamePattern pattern describing a codebase (e.g., compiled from the regex "findbugs\\.jar$") @param classPath a classpath @return full path of named codebase, or null if the codebase couldn't be found
[ "Try", "to", "find", "a", "codebase", "matching", "the", "given", "pattern", "in", "the", "given", "class", "path", "string", "." ]
train
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/util/ClassPathUtil.java#L75-L91
Azure/azure-sdk-for-java
cosmosdb/resource-manager/v2015_04_08/src/main/java/com/microsoft/azure/management/cosmosdb/v2015_04_08/implementation/DatabaseAccountsInner.java
DatabaseAccountsInner.beginPatchAsync
public Observable<DatabaseAccountInner> beginPatchAsync(String resourceGroupName, String accountName, DatabaseAccountPatchParameters updateParameters) { return beginPatchWithServiceResponseAsync(resourceGroupName, accountName, updateParameters).map(new Func1<ServiceResponse<DatabaseAccountInner>, DatabaseAccoun...
java
public Observable<DatabaseAccountInner> beginPatchAsync(String resourceGroupName, String accountName, DatabaseAccountPatchParameters updateParameters) { return beginPatchWithServiceResponseAsync(resourceGroupName, accountName, updateParameters).map(new Func1<ServiceResponse<DatabaseAccountInner>, DatabaseAccoun...
[ "public", "Observable", "<", "DatabaseAccountInner", ">", "beginPatchAsync", "(", "String", "resourceGroupName", ",", "String", "accountName", ",", "DatabaseAccountPatchParameters", "updateParameters", ")", "{", "return", "beginPatchWithServiceResponseAsync", "(", "resourceGr...
Patches the properties of an existing Azure Cosmos DB database account. @param resourceGroupName Name of an Azure resource group. @param accountName Cosmos DB database account name. @param updateParameters The tags parameter to patch for the current database account. @throws IllegalArgumentException thrown if paramete...
[ "Patches", "the", "properties", "of", "an", "existing", "Azure", "Cosmos", "DB", "database", "account", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cosmosdb/resource-manager/v2015_04_08/src/main/java/com/microsoft/azure/management/cosmosdb/v2015_04_08/implementation/DatabaseAccountsInner.java#L378-L385
elki-project/elki
elki-core-dbids/src/main/java/de/lmu/ifi/dbs/elki/database/datastore/DataStoreUtil.java
DataStoreUtil.makeDoubleStorage
public static WritableDoubleDataStore makeDoubleStorage(DBIDs ids, int hints) { return DataStoreFactory.FACTORY.makeDoubleStorage(ids, hints); }
java
public static WritableDoubleDataStore makeDoubleStorage(DBIDs ids, int hints) { return DataStoreFactory.FACTORY.makeDoubleStorage(ids, hints); }
[ "public", "static", "WritableDoubleDataStore", "makeDoubleStorage", "(", "DBIDs", "ids", ",", "int", "hints", ")", "{", "return", "DataStoreFactory", ".", "FACTORY", ".", "makeDoubleStorage", "(", "ids", ",", "hints", ")", ";", "}" ]
Make a new storage, to associate the given ids with an object of class dataclass. @param ids DBIDs to store data for @param hints Hints for the storage manager @return new data store
[ "Make", "a", "new", "storage", "to", "associate", "the", "given", "ids", "with", "an", "object", "of", "class", "dataclass", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-dbids/src/main/java/de/lmu/ifi/dbs/elki/database/datastore/DataStoreUtil.java#L87-L89
twilio/twilio-java
src/main/java/com/twilio/http/Request.java
Request.addQueryDateTimeRange
public void addQueryDateTimeRange(final String name, final Range<DateTime> range) { if (range.hasLowerBound()) { String value = range.lowerEndpoint().toString(QUERY_STRING_DATE_TIME_FORMAT); addQueryParam(name + ">", value); } if (range.hasUpperBound()) { Str...
java
public void addQueryDateTimeRange(final String name, final Range<DateTime> range) { if (range.hasLowerBound()) { String value = range.lowerEndpoint().toString(QUERY_STRING_DATE_TIME_FORMAT); addQueryParam(name + ">", value); } if (range.hasUpperBound()) { Str...
[ "public", "void", "addQueryDateTimeRange", "(", "final", "String", "name", ",", "final", "Range", "<", "DateTime", ">", "range", ")", "{", "if", "(", "range", ".", "hasLowerBound", "(", ")", ")", "{", "String", "value", "=", "range", ".", "lowerEndpoint", ...
Add query parameters for date ranges. @param name name of query parameter @param range date range
[ "Add", "query", "parameters", "for", "date", "ranges", "." ]
train
https://github.com/twilio/twilio-java/blob/0318974c0a6a152994af167d430255684d5e9b9f/src/main/java/com/twilio/http/Request.java#L171-L181
wonderpush/wonderpush-android-sdk
sdk/src/main/java/com/wonderpush/sdk/WonderPushRestClient.java
WonderPushRestClient.postEventually
protected static void postEventually(String resource, RequestParams params) { final Request request = new Request(WonderPushConfiguration.getUserId(), HttpMethod.POST, resource, params, null); WonderPushRequestVault.getDefaultVault().put(request, 0); }
java
protected static void postEventually(String resource, RequestParams params) { final Request request = new Request(WonderPushConfiguration.getUserId(), HttpMethod.POST, resource, params, null); WonderPushRequestVault.getDefaultVault().put(request, 0); }
[ "protected", "static", "void", "postEventually", "(", "String", "resource", ",", "RequestParams", "params", ")", "{", "final", "Request", "request", "=", "new", "Request", "(", "WonderPushConfiguration", ".", "getUserId", "(", ")", ",", "HttpMethod", ".", "POST"...
A POST request that is guaranteed to be executed when a network connection is present, surviving application reboot. The responseHandler will be called only if the network is present when the request is first run. @param resource The resource path, starting with / @param params AsyncHttpClient request parameters
[ "A", "POST", "request", "that", "is", "guaranteed", "to", "be", "executed", "when", "a", "network", "connection", "is", "present", "surviving", "application", "reboot", ".", "The", "responseHandler", "will", "be", "called", "only", "if", "the", "network", "is"...
train
https://github.com/wonderpush/wonderpush-android-sdk/blob/ba0a1568f705cdd6206639bfab1e5cf529084b59/sdk/src/main/java/com/wonderpush/sdk/WonderPushRestClient.java#L115-L118
Mozu/mozu-java
mozu-java-core/src/main/java/com/mozu/api/urls/platform/InstalledApplicationsUrl.java
InstalledApplicationsUrl.getApplicationUrl
public static MozuUrl getApplicationUrl(String appId, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/platform/applications/{appId}?responseFields={responseFields}"); formatter.formatUrl("appId", appId); formatter.formatUrl("responseFields", responseFields); return new MozuUrl(for...
java
public static MozuUrl getApplicationUrl(String appId, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/platform/applications/{appId}?responseFields={responseFields}"); formatter.formatUrl("appId", appId); formatter.formatUrl("responseFields", responseFields); return new MozuUrl(for...
[ "public", "static", "MozuUrl", "getApplicationUrl", "(", "String", "appId", ",", "String", "responseFields", ")", "{", "UrlFormatter", "formatter", "=", "new", "UrlFormatter", "(", "\"/api/platform/applications/{appId}?responseFields={responseFields}\"", ")", ";", "formatte...
Get Resource Url for GetApplication @param appId appId parameter description DOCUMENT_HERE @param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this pa...
[ "Get", "Resource", "Url", "for", "GetApplication" ]
train
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/platform/InstalledApplicationsUrl.java#L22-L28
shrinkwrap/shrinkwrap
impl-base/src/main/java/org/jboss/shrinkwrap/impl/base/MemoryMapArchiveBase.java
MemoryMapArchiveBase.startsWith
private boolean startsWith(ArchivePath fullPath, ArchivePath startingPath) { final String context = fullPath.get(); final String startingContext = startingPath.get(); return context.startsWith(startingContext); }
java
private boolean startsWith(ArchivePath fullPath, ArchivePath startingPath) { final String context = fullPath.get(); final String startingContext = startingPath.get(); return context.startsWith(startingContext); }
[ "private", "boolean", "startsWith", "(", "ArchivePath", "fullPath", ",", "ArchivePath", "startingPath", ")", "{", "final", "String", "context", "=", "fullPath", ".", "get", "(", ")", ";", "final", "String", "startingContext", "=", "startingPath", ".", "get", "...
Check to see if one path starts with another @param fullPath @param startingPath @return
[ "Check", "to", "see", "if", "one", "path", "starts", "with", "another" ]
train
https://github.com/shrinkwrap/shrinkwrap/blob/3f8a1a6d344651428c709a63ebb52d35343c5387/impl-base/src/main/java/org/jboss/shrinkwrap/impl/base/MemoryMapArchiveBase.java#L449-L454
UrielCh/ovh-java-sdk
ovh-java-sdk-cloud/src/main/java/net/minidev/ovh/api/ApiOvhCloud.java
ApiOvhCloud.project_serviceName_instance_instanceId_vnc_POST
public OvhInstanceVnc project_serviceName_instance_instanceId_vnc_POST(String serviceName, String instanceId) throws IOException { String qPath = "/cloud/project/{serviceName}/instance/{instanceId}/vnc"; StringBuilder sb = path(qPath, serviceName, instanceId); String resp = exec(qPath, "POST", sb.toString(), null...
java
public OvhInstanceVnc project_serviceName_instance_instanceId_vnc_POST(String serviceName, String instanceId) throws IOException { String qPath = "/cloud/project/{serviceName}/instance/{instanceId}/vnc"; StringBuilder sb = path(qPath, serviceName, instanceId); String resp = exec(qPath, "POST", sb.toString(), null...
[ "public", "OvhInstanceVnc", "project_serviceName_instance_instanceId_vnc_POST", "(", "String", "serviceName", ",", "String", "instanceId", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/cloud/project/{serviceName}/instance/{instanceId}/vnc\"", ";", "StringBuilder"...
Get VNC access to your instance REST: POST /cloud/project/{serviceName}/instance/{instanceId}/vnc @param instanceId [required] Instance id @param serviceName [required] Project id
[ "Get", "VNC", "access", "to", "your", "instance" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-cloud/src/main/java/net/minidev/ovh/api/ApiOvhCloud.java#L1987-L1992
lotaris/rox-client-junit
src/main/java/com/lotaris/rox/client/junit/AbstractRoxListener.java
AbstractRoxListener.getCategory
protected String getCategory(RoxableTestClass classAnnotation, RoxableTest methodAnnotation) { if (methodAnnotation != null && methodAnnotation.category() != null && !methodAnnotation.category().isEmpty()) { return methodAnnotation.category(); } else if (classAnnotation != null && classAnnotation.category() !=...
java
protected String getCategory(RoxableTestClass classAnnotation, RoxableTest methodAnnotation) { if (methodAnnotation != null && methodAnnotation.category() != null && !methodAnnotation.category().isEmpty()) { return methodAnnotation.category(); } else if (classAnnotation != null && classAnnotation.category() !=...
[ "protected", "String", "getCategory", "(", "RoxableTestClass", "classAnnotation", ",", "RoxableTest", "methodAnnotation", ")", "{", "if", "(", "methodAnnotation", "!=", "null", "&&", "methodAnnotation", ".", "category", "(", ")", "!=", "null", "&&", "!", "methodAn...
Retrieve the category to apply to the test @param classAnnotation The roxable class annotation to get the override category @param methodAnnotation The roxable annotation to get the override category @return The category found
[ "Retrieve", "the", "category", "to", "apply", "to", "the", "test" ]
train
https://github.com/lotaris/rox-client-junit/blob/1bc5fd99feb1a4467788128c9486737ad8e47bb8/src/main/java/com/lotaris/rox/client/junit/AbstractRoxListener.java#L202-L218
deeplearning4j/deeplearning4j
deeplearning4j/deeplearning4j-core/src/main/java/org/deeplearning4j/evaluation/EvaluationTools.java
EvaluationTools.rocChartToHtml
public static String rocChartToHtml(ROCMultiClass rocMultiClass, List<String> classNames) { int n = rocMultiClass.getNumClasses(); List<Component> components = new ArrayList<>(n); for (int i = 0; i < n; i++) { RocCurve roc = rocMultiClass.getRocCurve(i); String headerTe...
java
public static String rocChartToHtml(ROCMultiClass rocMultiClass, List<String> classNames) { int n = rocMultiClass.getNumClasses(); List<Component> components = new ArrayList<>(n); for (int i = 0; i < n; i++) { RocCurve roc = rocMultiClass.getRocCurve(i); String headerTe...
[ "public", "static", "String", "rocChartToHtml", "(", "ROCMultiClass", "rocMultiClass", ",", "List", "<", "String", ">", "classNames", ")", "{", "int", "n", "=", "rocMultiClass", ".", "getNumClasses", "(", ")", ";", "List", "<", "Component", ">", "components", ...
Given a {@link ROCMultiClass} instance and (optionally) names for each class, render the ROC chart to a stand-alone HTML file (returned as a String) @param rocMultiClass ROC to render @param classNames Names of the classes. May be null
[ "Given", "a", "{" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-core/src/main/java/org/deeplearning4j/evaluation/EvaluationTools.java#L166-L195
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/sun/misc/CharacterEncoder.java
CharacterEncoder.encodeBuffer
public void encodeBuffer(byte aBuffer[], OutputStream aStream) throws IOException { ByteArrayInputStream inStream = new ByteArrayInputStream(aBuffer); encodeBuffer(inStream, aStream); }
java
public void encodeBuffer(byte aBuffer[], OutputStream aStream) throws IOException { ByteArrayInputStream inStream = new ByteArrayInputStream(aBuffer); encodeBuffer(inStream, aStream); }
[ "public", "void", "encodeBuffer", "(", "byte", "aBuffer", "[", "]", ",", "OutputStream", "aStream", ")", "throws", "IOException", "{", "ByteArrayInputStream", "inStream", "=", "new", "ByteArrayInputStream", "(", "aBuffer", ")", ";", "encodeBuffer", "(", "inStream"...
Encode the buffer in <i>aBuffer</i> and write the encoded result to the OutputStream <i>aStream</i>.
[ "Encode", "the", "buffer", "in", "<i", ">", "aBuffer<", "/", "i", ">", "and", "write", "the", "encoded", "result", "to", "the", "OutputStream", "<i", ">", "aStream<", "/", "i", ">", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/misc/CharacterEncoder.java#L309-L313
jhy/jsoup
src/main/java/org/jsoup/nodes/Entities.java
Entities.canEncode
private static boolean canEncode(final CoreCharset charset, final char c, final CharsetEncoder fallback) { // todo add more charset tests if impacted by Android's bad perf in canEncode switch (charset) { case ascii: return c < 0x80; case utf: retur...
java
private static boolean canEncode(final CoreCharset charset, final char c, final CharsetEncoder fallback) { // todo add more charset tests if impacted by Android's bad perf in canEncode switch (charset) { case ascii: return c < 0x80; case utf: retur...
[ "private", "static", "boolean", "canEncode", "(", "final", "CoreCharset", "charset", ",", "final", "char", "c", ",", "final", "CharsetEncoder", "fallback", ")", "{", "// todo add more charset tests if impacted by Android's bad perf in canEncode", "switch", "(", "charset", ...
/* Provides a fast-path for Encoder.canEncode, which drastically improves performance on Android post JellyBean. After KitKat, the implementation of canEncode degrades to the point of being useless. For non ASCII or UTF, performance may be bad. We can add more encoders for common character sets that are impacted by per...
[ "/", "*", "Provides", "a", "fast", "-", "path", "for", "Encoder", ".", "canEncode", "which", "drastically", "improves", "performance", "on", "Android", "post", "JellyBean", ".", "After", "KitKat", "the", "implementation", "of", "canEncode", "degrades", "to", "...
train
https://github.com/jhy/jsoup/blob/68ff8cbe7ad847059737a09c567a501a7f1d251f/src/main/java/org/jsoup/nodes/Entities.java#L290-L300
hsiafan/requests
src/main/java/net/dongliu/requests/body/Part.java
Part.param
@Deprecated public static Part<String> param(String name, String value) { return text(name, value); }
java
@Deprecated public static Part<String> param(String name, String value) { return text(name, value); }
[ "@", "Deprecated", "public", "static", "Part", "<", "String", ">", "param", "(", "String", "name", ",", "String", "value", ")", "{", "return", "text", "(", "name", ",", "value", ")", ";", "}" ]
Create a (name, value) text multi-part field. This return a part equivalent to &lt;input type="text" /&gt; field in multi part form. @deprecated use {@link #text(String, String)} instead.
[ "Create", "a", "(", "name", "value", ")", "text", "multi", "-", "part", "field", ".", "This", "return", "a", "part", "equivalent", "to", "&lt", ";", "input", "type", "=", "text", "/", "&gt", ";", "field", "in", "multi", "part", "form", "." ]
train
https://github.com/hsiafan/requests/blob/a6cc6f8293e808cc937d3789aec2616a8383dee0/src/main/java/net/dongliu/requests/body/Part.java#L157-L160
landawn/AbacusUtil
src/com/landawn/abacus/util/FileSystemUtil.java
FileSystemUtil.freeSpaceOS
long freeSpaceOS(final String path, final int os, final boolean kb, final long timeout) throws IOException { if (path == null) { throw new IllegalArgumentException("Path must not be null"); } switch (os) { case WINDOWS: return kb ? freeSpaceWindows(p...
java
long freeSpaceOS(final String path, final int os, final boolean kb, final long timeout) throws IOException { if (path == null) { throw new IllegalArgumentException("Path must not be null"); } switch (os) { case WINDOWS: return kb ? freeSpaceWindows(p...
[ "long", "freeSpaceOS", "(", "final", "String", "path", ",", "final", "int", "os", ",", "final", "boolean", "kb", ",", "final", "long", "timeout", ")", "throws", "IOException", "{", "if", "(", "path", "==", "null", ")", "{", "throw", "new", "IllegalArgume...
Returns the free space on a drive or volume in a cross-platform manner. Note that some OS's are NOT currently supported, including OS/390. <pre> FileSystemUtils.freeSpace("C:"); // Windows FileSystemUtils.freeSpace("/volume"); // *nix </pre> The free space is calculated via the command line. It uses 'dir /-c' on Wind...
[ "Returns", "the", "free", "space", "on", "a", "drive", "or", "volume", "in", "a", "cross", "-", "platform", "manner", ".", "Note", "that", "some", "OS", "s", "are", "NOT", "currently", "supported", "including", "OS", "/", "390", ".", "<pre", ">", "File...
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/FileSystemUtil.java#L220-L236
KayLerch/alexa-skills-kit-tellask-java
src/main/java/io/klerch/alexa/tellask/model/wrapper/AlexaRequestStreamHandler.java
AlexaRequestStreamHandler.handleRequest
@Override public void handleRequest(final InputStream input, final OutputStream output, final Context context) throws IOException { byte[] serializedSpeechletRequest = IOUtils.toByteArray(input); final AlexaSpeechlet speechlet = AlexaSpeechletFactory.createSpeechletFromRequest(serializedSpeechletReq...
java
@Override public void handleRequest(final InputStream input, final OutputStream output, final Context context) throws IOException { byte[] serializedSpeechletRequest = IOUtils.toByteArray(input); final AlexaSpeechlet speechlet = AlexaSpeechletFactory.createSpeechletFromRequest(serializedSpeechletReq...
[ "@", "Override", "public", "void", "handleRequest", "(", "final", "InputStream", "input", ",", "final", "OutputStream", "output", ",", "final", "Context", "context", ")", "throws", "IOException", "{", "byte", "[", "]", "serializedSpeechletRequest", "=", "IOUtils",...
The handler method is called on a Lambda execution. @param input the input stream containing the Lambda request payload @param output the output stream containing the Lambda response payload @param context a context for a Lambda execution. @throws IOException exception is thrown on invalid request payload or on a provi...
[ "The", "handler", "method", "is", "called", "on", "a", "Lambda", "execution", "." ]
train
https://github.com/KayLerch/alexa-skills-kit-tellask-java/blob/2c19028e775c2512dd4649d12962c0b48bf7f2bc/src/main/java/io/klerch/alexa/tellask/model/wrapper/AlexaRequestStreamHandler.java#L82-L94
Azure/azure-sdk-for-java
network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/P2sVpnServerConfigurationsInner.java
P2sVpnServerConfigurationsInner.beginDelete
public void beginDelete(String resourceGroupName, String virtualWanName, String p2SVpnServerConfigurationName) { beginDeleteWithServiceResponseAsync(resourceGroupName, virtualWanName, p2SVpnServerConfigurationName).toBlocking().single().body(); }
java
public void beginDelete(String resourceGroupName, String virtualWanName, String p2SVpnServerConfigurationName) { beginDeleteWithServiceResponseAsync(resourceGroupName, virtualWanName, p2SVpnServerConfigurationName).toBlocking().single().body(); }
[ "public", "void", "beginDelete", "(", "String", "resourceGroupName", ",", "String", "virtualWanName", ",", "String", "p2SVpnServerConfigurationName", ")", "{", "beginDeleteWithServiceResponseAsync", "(", "resourceGroupName", ",", "virtualWanName", ",", "p2SVpnServerConfigurat...
Deletes a P2SVpnServerConfiguration. @param resourceGroupName The resource group name of the P2SVpnServerConfiguration. @param virtualWanName The name of the VirtualWan. @param p2SVpnServerConfigurationName The name of the P2SVpnServerConfiguration. @throws IllegalArgumentException thrown if parameters fail the valida...
[ "Deletes", "a", "P2SVpnServerConfiguration", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/P2sVpnServerConfigurationsInner.java#L450-L452
rundeck/rundeck
core/src/main/java/com/dtolabs/utils/Mapper.java
Mapper.makeMap
public static Map makeMap(Mapper mapper, Collection c) { return makeMap(mapper, c.iterator(), false); }
java
public static Map makeMap(Mapper mapper, Collection c) { return makeMap(mapper, c.iterator(), false); }
[ "public", "static", "Map", "makeMap", "(", "Mapper", "mapper", ",", "Collection", "c", ")", "{", "return", "makeMap", "(", "mapper", ",", "c", ".", "iterator", "(", ")", ",", "false", ")", ";", "}" ]
Create a new Map by using the collection objects as keys, and the mapping result as values. Discard keys which return null values from the mapper. @param mapper a Mapper to map the values @param c Collection of items @return a new Map with values mapped
[ "Create", "a", "new", "Map", "by", "using", "the", "collection", "objects", "as", "keys", "and", "the", "mapping", "result", "as", "values", ".", "Discard", "keys", "which", "return", "null", "values", "from", "the", "mapper", "." ]
train
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/utils/Mapper.java#L519-L521
unbescape/unbescape
src/main/java/org/unbescape/html/HtmlEscape.java
HtmlEscape.escapeHtml4Xml
public static void escapeHtml4Xml(final Reader reader, final Writer writer) throws IOException { escapeHtml(reader, writer, HtmlEscapeType.HTML4_NAMED_REFERENCES_DEFAULT_TO_DECIMAL, HtmlEscapeLevel.LEVEL_1_ONLY_MARKUP_SIGNIFICANT); }
java
public static void escapeHtml4Xml(final Reader reader, final Writer writer) throws IOException { escapeHtml(reader, writer, HtmlEscapeType.HTML4_NAMED_REFERENCES_DEFAULT_TO_DECIMAL, HtmlEscapeLevel.LEVEL_1_ONLY_MARKUP_SIGNIFICANT); }
[ "public", "static", "void", "escapeHtml4Xml", "(", "final", "Reader", "reader", ",", "final", "Writer", "writer", ")", "throws", "IOException", "{", "escapeHtml", "(", "reader", ",", "writer", ",", "HtmlEscapeType", ".", "HTML4_NAMED_REFERENCES_DEFAULT_TO_DECIMAL", ...
<p> Perform an HTML 4 level 1 (XML-style) <strong>escape</strong> operation on a <tt>Reader</tt> input, writing results to a <tt>Writer</tt>. </p> <p> <em>Level 1</em> means this method will only escape the five markup-significant characters: <tt>&lt;</tt>, <tt>&gt;</tt>, <tt>&amp;</tt>, <tt>&quot;</tt> and <tt>&#39;</...
[ "<p", ">", "Perform", "an", "HTML", "4", "level", "1", "(", "XML", "-", "style", ")", "<strong", ">", "escape<", "/", "strong", ">", "operation", "on", "a", "<tt", ">", "Reader<", "/", "tt", ">", "input", "writing", "results", "to", "a", "<tt", ">"...
train
https://github.com/unbescape/unbescape/blob/ec5435fb3508c2eed25d8165dc27ded2602cae13/src/main/java/org/unbescape/html/HtmlEscape.java#L771-L775
atomix/atomix
utils/src/main/java/io/atomix/utils/serializer/SerializerBuilder.java
SerializerBuilder.addSerializer
public SerializerBuilder addSerializer(com.esotericsoftware.kryo.Serializer serializer, Class<?>... types) { namespaceBuilder.register(serializer, types); return this; }
java
public SerializerBuilder addSerializer(com.esotericsoftware.kryo.Serializer serializer, Class<?>... types) { namespaceBuilder.register(serializer, types); return this; }
[ "public", "SerializerBuilder", "addSerializer", "(", "com", ".", "esotericsoftware", ".", "kryo", ".", "Serializer", "serializer", ",", "Class", "<", "?", ">", "...", "types", ")", "{", "namespaceBuilder", ".", "register", "(", "serializer", ",", "types", ")",...
Adds a serializer to the builder. @param serializer the serializer to add @param types the serializable types @return the serializer builder
[ "Adds", "a", "serializer", "to", "the", "builder", "." ]
train
https://github.com/atomix/atomix/blob/3a94b7c80576d762dd0d396d4645df07a0b37c31/utils/src/main/java/io/atomix/utils/serializer/SerializerBuilder.java#L117-L120
code4everything/util
src/main/java/com/zhazhapan/util/Checker.java
Checker.replace
public static String replace(String string, char oldChar, char newChar) { return checkNull(string).replace(oldChar, newChar); }
java
public static String replace(String string, char oldChar, char newChar) { return checkNull(string).replace(oldChar, newChar); }
[ "public", "static", "String", "replace", "(", "String", "string", ",", "char", "oldChar", ",", "char", "newChar", ")", "{", "return", "checkNull", "(", "string", ")", ".", "replace", "(", "oldChar", ",", "newChar", ")", ";", "}" ]
替换字符之前检查字符串是否为空 @param string 需要检测的字符串 @param oldChar 需要替换的字符 @param newChar 新的字符 @return {@link String}
[ "替换字符之前检查字符串是否为空" ]
train
https://github.com/code4everything/util/blob/1fc9f0ead1108f4d7208ba7c000df4244f708418/src/main/java/com/zhazhapan/util/Checker.java#L821-L823
jhalterman/failsafe
src/main/java/net/jodah/failsafe/CircuitBreaker.java
CircuitBreaker.withSuccessThreshold
public CircuitBreaker<R> withSuccessThreshold(int successThreshold) { Assert.isTrue(successThreshold >= 1, "successThreshold must be greater than or equal to 1"); return withSuccessThreshold(successThreshold, successThreshold); }
java
public CircuitBreaker<R> withSuccessThreshold(int successThreshold) { Assert.isTrue(successThreshold >= 1, "successThreshold must be greater than or equal to 1"); return withSuccessThreshold(successThreshold, successThreshold); }
[ "public", "CircuitBreaker", "<", "R", ">", "withSuccessThreshold", "(", "int", "successThreshold", ")", "{", "Assert", ".", "isTrue", "(", "successThreshold", ">=", "1", ",", "\"successThreshold must be greater than or equal to 1\"", ")", ";", "return", "withSuccessThre...
Sets the number of successive successful executions that must occur when in a half-open state in order to close the circuit, else the circuit is re-opened when a failure occurs. @throws IllegalArgumentException if {@code successThreshold} < 1
[ "Sets", "the", "number", "of", "successive", "successful", "executions", "that", "must", "occur", "when", "in", "a", "half", "-", "open", "state", "in", "order", "to", "close", "the", "circuit", "else", "the", "circuit", "is", "re", "-", "opened", "when", ...
train
https://github.com/jhalterman/failsafe/blob/65fcd3a82f7b232d2ff59bc525a59d693dd8e223/src/main/java/net/jodah/failsafe/CircuitBreaker.java#L328-L331
gallandarakhneorg/afc
core/inputoutput/src/main/java/org/arakhne/afc/inputoutput/xml/XMLUtil.java
XMLUtil.getAttributeEnum
@Pure public static <T extends Enum<T>> T getAttributeEnum(Node document, Class<T> type, boolean caseSensitive, String... path) { assert document != null : AssertMessages.notNullParameter(0); return getAttributeEnumWithDefault(document, type, caseSensitive, null, path); }
java
@Pure public static <T extends Enum<T>> T getAttributeEnum(Node document, Class<T> type, boolean caseSensitive, String... path) { assert document != null : AssertMessages.notNullParameter(0); return getAttributeEnumWithDefault(document, type, caseSensitive, null, path); }
[ "@", "Pure", "public", "static", "<", "T", "extends", "Enum", "<", "T", ">", ">", "T", "getAttributeEnum", "(", "Node", "document", ",", "Class", "<", "T", ">", "type", ",", "boolean", "caseSensitive", ",", "String", "...", "path", ")", "{", "assert", ...
Read an enumeration value. @param <T> is the type of the enumeration. @param document is the XML document to explore. @param type is the type of the enumeration. @param caseSensitive indicates of the {@code path}'s components are case sensitive. @param path is the list of and ended by the attribute's name. @return the...
[ "Read", "an", "enumeration", "value", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/inputoutput/src/main/java/org/arakhne/afc/inputoutput/xml/XMLUtil.java#L651-L655
Metatavu/edelphi
edelphi/src/main/java/fi/metatavu/edelphi/utils/GoogleDriveUtils.java
GoogleDriveUtils.exportSpreadsheet
public static DownloadResponse exportSpreadsheet(Drive drive, String fileId) throws IOException { try (InputStream inputStream = drive.files().export(fileId, "text/csv").executeAsInputStream()) { CSVRenderer csvRenderer = new CSVRenderer(inputStream, "google-spreadsheet", true); return new DownloadResponse...
java
public static DownloadResponse exportSpreadsheet(Drive drive, String fileId) throws IOException { try (InputStream inputStream = drive.files().export(fileId, "text/csv").executeAsInputStream()) { CSVRenderer csvRenderer = new CSVRenderer(inputStream, "google-spreadsheet", true); return new DownloadResponse...
[ "public", "static", "DownloadResponse", "exportSpreadsheet", "(", "Drive", "drive", ",", "String", "fileId", ")", "throws", "IOException", "{", "try", "(", "InputStream", "inputStream", "=", "drive", ".", "files", "(", ")", ".", "export", "(", "fileId", ",", ...
Exports a spreadsheet in HTML format @param drive drive client @param fileId file id for file to be exported @return Spreadsheet in HTML format @throws IOException thrown when exporting fails unexpectedly
[ "Exports", "a", "spreadsheet", "in", "HTML", "format" ]
train
https://github.com/Metatavu/edelphi/blob/d91a0b54f954b33b4ee674a1bdf03612d76c3305/edelphi/src/main/java/fi/metatavu/edelphi/utils/GoogleDriveUtils.java#L304-L309
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/stats/Counters.java
Counters.klDivergence
public static <E> double klDivergence(Counter<E> from, Counter<E> to) { double result = 0.0; double tot = (from.totalCount()); double tot2 = (to.totalCount()); // System.out.println("tot is " + tot + " tot2 is " + tot2); for (E key : from.keySet()) { double num = (from.getCount(key)); ...
java
public static <E> double klDivergence(Counter<E> from, Counter<E> to) { double result = 0.0; double tot = (from.totalCount()); double tot2 = (to.totalCount()); // System.out.println("tot is " + tot + " tot2 is " + tot2); for (E key : from.keySet()) { double num = (from.getCount(key)); ...
[ "public", "static", "<", "E", ">", "double", "klDivergence", "(", "Counter", "<", "E", ">", "from", ",", "Counter", "<", "E", ">", "to", ")", "{", "double", "result", "=", "0.0", ";", "double", "tot", "=", "(", "from", ".", "totalCount", "(", ")", ...
Calculates the KL divergence between the two counters. That is, it calculates KL(from || to). This method internally uses normalized counts (so they sum to one), but the value returned is meaningless if any of the counts are negative. In other words, how well can c1 be represented by c2. if there is some value in c1 th...
[ "Calculates", "the", "KL", "divergence", "between", "the", "two", "counters", ".", "That", "is", "it", "calculates", "KL", "(", "from", "||", "to", ")", ".", "This", "method", "internally", "uses", "normalized", "counts", "(", "so", "they", "sum", "to", ...
train
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/stats/Counters.java#L1205-L1226
amaembo/streamex
src/main/java/one/util/streamex/StreamEx.java
StreamEx.toMap
public <K, V> Map<K, V> toMap(Function<? super T, ? extends K> keyMapper, Function<? super T, ? extends V> valMapper) { Map<K, V> map = isParallel() ? new ConcurrentHashMap<>() : new HashMap<>(); return toMapThrowing(keyMapper, valMapper, map); }
java
public <K, V> Map<K, V> toMap(Function<? super T, ? extends K> keyMapper, Function<? super T, ? extends V> valMapper) { Map<K, V> map = isParallel() ? new ConcurrentHashMap<>() : new HashMap<>(); return toMapThrowing(keyMapper, valMapper, map); }
[ "public", "<", "K", ",", "V", ">", "Map", "<", "K", ",", "V", ">", "toMap", "(", "Function", "<", "?", "super", "T", ",", "?", "extends", "K", ">", "keyMapper", ",", "Function", "<", "?", "super", "T", ",", "?", "extends", "V", ">", "valMapper"...
Returns a {@link Map} whose keys and values are the result of applying the provided mapping functions to the input elements. <p> This is a <a href="package-summary.html#StreamOps">terminal</a> operation. <p> Returned {@code Map} is guaranteed to be modifiable. <p> For parallel stream the concurrent {@code Map} is cr...
[ "Returns", "a", "{", "@link", "Map", "}", "whose", "keys", "and", "values", "are", "the", "result", "of", "applying", "the", "provided", "mapping", "functions", "to", "the", "input", "elements", "." ]
train
https://github.com/amaembo/streamex/blob/936bbd1b7dfbcf64a3b990682bfc848213441d14/src/main/java/one/util/streamex/StreamEx.java#L961-L964
pwall567/jsonutil
src/main/java/net/pwall/json/JSONObject.java
JSONObject.putValue
public JSONObject putValue(String key, int value) { put(key, JSONInteger.valueOf(value)); return this; }
java
public JSONObject putValue(String key, int value) { put(key, JSONInteger.valueOf(value)); return this; }
[ "public", "JSONObject", "putValue", "(", "String", "key", ",", "int", "value", ")", "{", "put", "(", "key", ",", "JSONInteger", ".", "valueOf", "(", "value", ")", ")", ";", "return", "this", ";", "}" ]
Add a {@link JSONInteger} representing the supplied {@code int} to the {@code JSONObject}. @param key the key to use when storing the value @param value the value @return {@code this} (for chaining) @throws NullPointerException if key is {@code null}
[ "Add", "a", "{", "@link", "JSONInteger", "}", "representing", "the", "supplied", "{", "@code", "int", "}", "to", "the", "{", "@code", "JSONObject", "}", "." ]
train
https://github.com/pwall567/jsonutil/blob/dd5960b9b0bcc9acfe6c52b884fffd9ee5f422fe/src/main/java/net/pwall/json/JSONObject.java#L117-L120
googlearchive/firebase-simple-login-java
src/main/java/com/firebase/simplelogin/SimpleLogin.java
SimpleLogin.removeUser
public void removeUser(String email, String password, final SimpleLoginCompletionHandler handler) { final SimpleLoginAuthenticatedHandler authHandler = new SimpleLoginAuthenticatedHandler() { public void authenticated(FirebaseSimpleLoginError error, FirebaseSimpleLoginUser user) { handler.completed(er...
java
public void removeUser(String email, String password, final SimpleLoginCompletionHandler handler) { final SimpleLoginAuthenticatedHandler authHandler = new SimpleLoginAuthenticatedHandler() { public void authenticated(FirebaseSimpleLoginError error, FirebaseSimpleLoginUser user) { handler.completed(er...
[ "public", "void", "removeUser", "(", "String", "email", ",", "String", "password", ",", "final", "SimpleLoginCompletionHandler", "handler", ")", "{", "final", "SimpleLoginAuthenticatedHandler", "authHandler", "=", "new", "SimpleLoginAuthenticatedHandler", "(", ")", "{",...
Remove a Firebase "email/password" user. @param email Email address for user. @param password Password for user. @param handler Handler for asynchronous events.
[ "Remove", "a", "Firebase", "email", "/", "password", "user", "." ]
train
https://github.com/googlearchive/firebase-simple-login-java/blob/40498ad173b5fa69c869ba0d29cec187271fda13/src/main/java/com/firebase/simplelogin/SimpleLogin.java#L460-L502
tvesalainen/util
util/src/main/java/org/vesalainen/util/concurrent/RingbufferSupport.java
RingbufferSupport.getBuffers
public ByteBuffer[] getBuffers(int start, int len) { if (len == 0) { return ar0; } if (len > capacity) { throw new IllegalArgumentException("len="+len+" > capacity="+capacity); } int s = start % capacity; int e = (sta...
java
public ByteBuffer[] getBuffers(int start, int len) { if (len == 0) { return ar0; } if (len > capacity) { throw new IllegalArgumentException("len="+len+" > capacity="+capacity); } int s = start % capacity; int e = (sta...
[ "public", "ByteBuffer", "[", "]", "getBuffers", "(", "int", "start", ",", "int", "len", ")", "{", "if", "(", "len", "==", "0", ")", "{", "return", "ar0", ";", "}", "if", "(", "len", ">", "capacity", ")", "{", "throw", "new", "IllegalArgumentException...
Returns array of buffers that contains ringbuffers content in array of ByteBuffers ready for scattering read of gathering write @param start @param len @return @see java.nio.channels.ScatteringByteChannel @see java.nio.channels.GatheringByteChannel
[ "Returns", "array", "of", "buffers", "that", "contains", "ringbuffers", "content", "in", "array", "of", "ByteBuffers", "ready", "for", "scattering", "read", "of", "gathering", "write" ]
train
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/util/concurrent/RingbufferSupport.java#L59-L72
alkacon/opencms-core
src/org/opencms/xml/content/CmsDefaultXmlContentHandler.java
CmsDefaultXmlContentHandler.createSearchFieldMapping
private I_CmsSearchFieldMapping createSearchFieldMapping( CmsXmlContentDefinition contentDefinition, Element element, Locale locale) throws CmsXmlException { I_CmsSearchFieldMapping fieldMapping = null; String typeAsString = element.attributeValue(APPINFO_ATTR_TYPE); ...
java
private I_CmsSearchFieldMapping createSearchFieldMapping( CmsXmlContentDefinition contentDefinition, Element element, Locale locale) throws CmsXmlException { I_CmsSearchFieldMapping fieldMapping = null; String typeAsString = element.attributeValue(APPINFO_ATTR_TYPE); ...
[ "private", "I_CmsSearchFieldMapping", "createSearchFieldMapping", "(", "CmsXmlContentDefinition", "contentDefinition", ",", "Element", "element", ",", "Locale", "locale", ")", "throws", "CmsXmlException", "{", "I_CmsSearchFieldMapping", "fieldMapping", "=", "null", ";", "St...
Creates a search field mapping for the given mapping element and the locale.<p> @param contentDefinition the content definition @param element the mapping element configured in the schema @param locale the locale @return the created search field mapping @throws CmsXmlException if the dynamic field class could not be...
[ "Creates", "a", "search", "field", "mapping", "for", "the", "given", "mapping", "element", "and", "the", "locale", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/xml/content/CmsDefaultXmlContentHandler.java#L3923-L3970
xmlet/XsdAsmFaster
src/main/java/org/xmlet/xsdasmfaster/classes/infrastructure/RestrictionValidator.java
RestrictionValidator.validatePattern
public static void validatePattern(String pattern, String string){ if (!string.replaceAll(pattern, "").equals(string)){ throw new RestrictionViolationException("Violation of pattern restriction, the string doesn't math the acceptable pattern, which is " + pattern); } }
java
public static void validatePattern(String pattern, String string){ if (!string.replaceAll(pattern, "").equals(string)){ throw new RestrictionViolationException("Violation of pattern restriction, the string doesn't math the acceptable pattern, which is " + pattern); } }
[ "public", "static", "void", "validatePattern", "(", "String", "pattern", ",", "String", "string", ")", "{", "if", "(", "!", "string", ".", "replaceAll", "(", "pattern", ",", "\"\"", ")", ".", "equals", "(", "string", ")", ")", "{", "throw", "new", "Res...
Validates if the received {@code string} matches the pattern. @param pattern The restriction pattern. @param string The {@link String} that should match the restriction pattern.
[ "Validates", "if", "the", "received", "{" ]
train
https://github.com/xmlet/XsdAsmFaster/blob/ccb78f9dd4b957ad5ac1ca349eaf24338c421e94/src/main/java/org/xmlet/xsdasmfaster/classes/infrastructure/RestrictionValidator.java#L159-L163
hawkular/hawkular-apm
api/src/main/java/org/hawkular/apm/api/utils/PropertyUtil.java
PropertyUtil.getPropertyAsInteger
public static Integer getPropertyAsInteger(String name, Integer def) { String value = getProperty(name); if (value != null) { try { return Integer.parseInt(value); } catch (NumberFormatException e) { LOG.log(Level.WARNING, "Failed to convert proper...
java
public static Integer getPropertyAsInteger(String name, Integer def) { String value = getProperty(name); if (value != null) { try { return Integer.parseInt(value); } catch (NumberFormatException e) { LOG.log(Level.WARNING, "Failed to convert proper...
[ "public", "static", "Integer", "getPropertyAsInteger", "(", "String", "name", ",", "Integer", "def", ")", "{", "String", "value", "=", "getProperty", "(", "name", ")", ";", "if", "(", "value", "!=", "null", ")", "{", "try", "{", "return", "Integer", ".",...
This method returns the property as an integer value. @param name The property name @param def The optional default value @return The property as an integer, or null if not found
[ "This", "method", "returns", "the", "property", "as", "an", "integer", "value", "." ]
train
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/api/src/main/java/org/hawkular/apm/api/utils/PropertyUtil.java#L286-L296
OpenLiberty/open-liberty
dev/com.ibm.ws.config/src/com/ibm/ws/config/admin/internal/ConfigurationAdminImpl.java
ConfigurationAdminImpl.createFactoryConfiguration
@Override public ExtendedConfiguration createFactoryConfiguration(String factoryPid, String location) throws IOException { this.caFactory.checkConfigurationPermission(); ExtendedConfiguration config = caFactory.getConfigurationStore().createFactoryConfiguration(factoryPid, location); return ...
java
@Override public ExtendedConfiguration createFactoryConfiguration(String factoryPid, String location) throws IOException { this.caFactory.checkConfigurationPermission(); ExtendedConfiguration config = caFactory.getConfigurationStore().createFactoryConfiguration(factoryPid, location); return ...
[ "@", "Override", "public", "ExtendedConfiguration", "createFactoryConfiguration", "(", "String", "factoryPid", ",", "String", "location", ")", "throws", "IOException", "{", "this", ".", "caFactory", ".", "checkConfigurationPermission", "(", ")", ";", "ExtendedConfigurat...
/* @see org.osgi.service.cm.ConfigurationAdmin#createFactoryConfiguration(java. lang.String, java.lang.String) In this call, create Configuration objects bound to the specified location, instead of the location of the calling bundle. @param factoryPid @param location
[ "/", "*", "@see", "org", ".", "osgi", ".", "service", ".", "cm", ".", "ConfigurationAdmin#createFactoryConfiguration", "(", "java", ".", "lang", ".", "String", "java", ".", "lang", ".", "String", ")" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.config/src/com/ibm/ws/config/admin/internal/ConfigurationAdminImpl.java#L84-L89
liferay/com-liferay-commerce
commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPDefinitionSpecificationOptionValuePersistenceImpl.java
CPDefinitionSpecificationOptionValuePersistenceImpl.removeByC_COC
@Override public void removeByC_COC(long CPDefinitionId, long CPOptionCategoryId) { for (CPDefinitionSpecificationOptionValue cpDefinitionSpecificationOptionValue : findByC_COC( CPDefinitionId, CPOptionCategoryId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { remove(cpDefinitionSpecificationOptionValue);...
java
@Override public void removeByC_COC(long CPDefinitionId, long CPOptionCategoryId) { for (CPDefinitionSpecificationOptionValue cpDefinitionSpecificationOptionValue : findByC_COC( CPDefinitionId, CPOptionCategoryId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { remove(cpDefinitionSpecificationOptionValue);...
[ "@", "Override", "public", "void", "removeByC_COC", "(", "long", "CPDefinitionId", ",", "long", "CPOptionCategoryId", ")", "{", "for", "(", "CPDefinitionSpecificationOptionValue", "cpDefinitionSpecificationOptionValue", ":", "findByC_COC", "(", "CPDefinitionId", ",", "CPO...
Removes all the cp definition specification option values where CPDefinitionId = &#63; and CPOptionCategoryId = &#63; from the database. @param CPDefinitionId the cp definition ID @param CPOptionCategoryId the cp option category ID
[ "Removes", "all", "the", "cp", "definition", "specification", "option", "values", "where", "CPDefinitionId", "=", "&#63", ";", "and", "CPOptionCategoryId", "=", "&#63", ";", "from", "the", "database", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPDefinitionSpecificationOptionValuePersistenceImpl.java#L4134-L4141
lievendoclo/Valkyrie-RCP
valkyrie-rcp-core/src/main/java/org/valkyriercp/util/DialogFactory.java
DialogFactory.getDetailsAsHTML
private String getDetailsAsHTML(String title, Level level, Throwable e) { if (e != null) { // convert the stacktrace into a more pleasent bit of HTML StringBuffer html = new StringBuffer("<html>"); html.append("<h2>" + escapeXml(title) + "</h2>"); html.append("<HR...
java
private String getDetailsAsHTML(String title, Level level, Throwable e) { if (e != null) { // convert the stacktrace into a more pleasent bit of HTML StringBuffer html = new StringBuffer("<html>"); html.append("<h2>" + escapeXml(title) + "</h2>"); html.append("<HR...
[ "private", "String", "getDetailsAsHTML", "(", "String", "title", ",", "Level", "level", ",", "Throwable", "e", ")", "{", "if", "(", "e", "!=", "null", ")", "{", "// convert the stacktrace into a more pleasent bit of HTML", "StringBuffer", "html", "=", "new", "Stri...
Creates and returns HTML representing the details of this incident info. This method is only called if the details needs to be generated: ie: the detailed error message property of the incident info is null.
[ "Creates", "and", "returns", "HTML", "representing", "the", "details", "of", "this", "incident", "info", ".", "This", "method", "is", "only", "called", "if", "the", "details", "needs", "to", "be", "generated", ":", "ie", ":", "the", "detailed", "error", "m...
train
https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/util/DialogFactory.java#L108-L143
alexvasilkov/AndroidCommons
library/src/main/java/com/alexvasilkov/android/commons/ui/KeyboardHelper.java
KeyboardHelper.hideSoftKeyboard
public static void hideSoftKeyboard(@NonNull Context context, @Nullable View focusedView) { if (focusedView == null) { return; } final InputMethodManager manager = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE); manager.hideSoftI...
java
public static void hideSoftKeyboard(@NonNull Context context, @Nullable View focusedView) { if (focusedView == null) { return; } final InputMethodManager manager = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE); manager.hideSoftI...
[ "public", "static", "void", "hideSoftKeyboard", "(", "@", "NonNull", "Context", "context", ",", "@", "Nullable", "View", "focusedView", ")", "{", "if", "(", "focusedView", "==", "null", ")", "{", "return", ";", "}", "final", "InputMethodManager", "manager", ...
Uses given views to hide soft keyboard and to clear current focus. @param context Context @param focusedView Currently focused view
[ "Uses", "given", "views", "to", "hide", "soft", "keyboard", "and", "to", "clear", "current", "focus", "." ]
train
https://github.com/alexvasilkov/AndroidCommons/blob/aca9f6d5acfc6bd3694984b7f89956e1a0146ddb/library/src/main/java/com/alexvasilkov/android/commons/ui/KeyboardHelper.java#L34-L44
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/NFRule.java
NFRule.extractSubstitution
private NFSubstitution extractSubstitution(NFRuleSet owner, NFRule predecessor) { NFSubstitution result; int subStart; int subEnd; // search the rule's rule text for the first two characters of // a substi...
java
private NFSubstitution extractSubstitution(NFRuleSet owner, NFRule predecessor) { NFSubstitution result; int subStart; int subEnd; // search the rule's rule text for the first two characters of // a substi...
[ "private", "NFSubstitution", "extractSubstitution", "(", "NFRuleSet", "owner", ",", "NFRule", "predecessor", ")", "{", "NFSubstitution", "result", ";", "int", "subStart", ";", "int", "subEnd", ";", "// search the rule's rule text for the first two characters of", "// a subs...
Searches the rule's rule text for the first substitution token, creates a substitution based on it, and removes the token from the rule's rule text. @param owner The rule set containing this rule @param predecessor The rule preceding this one in the rule set's rule list @return The newly-created substitution. This is ...
[ "Searches", "the", "rule", "s", "rule", "text", "for", "the", "first", "substitution", "token", "creates", "a", "substitution", "based", "on", "it", "and", "removes", "the", "token", "from", "the", "rule", "s", "rule", "text", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/NFRule.java#L464-L516
MenoData/Time4J
base/src/main/java/net/time4j/range/DateInterval.java
DateInterval.streamDaily
public Stream<PlainDate> streamDaily() { if (this.isEmpty()) { return Stream.empty(); } DateInterval interval = this.toCanonical(); PlainDate start = interval.getStartAsCalendarDate(); PlainDate end = interval.getEndAsCalendarDate(); if ((start == null) || ...
java
public Stream<PlainDate> streamDaily() { if (this.isEmpty()) { return Stream.empty(); } DateInterval interval = this.toCanonical(); PlainDate start = interval.getStartAsCalendarDate(); PlainDate end = interval.getEndAsCalendarDate(); if ((start == null) || ...
[ "public", "Stream", "<", "PlainDate", ">", "streamDaily", "(", ")", "{", "if", "(", "this", ".", "isEmpty", "(", ")", ")", "{", "return", "Stream", ".", "empty", "(", ")", ";", "}", "DateInterval", "interval", "=", "this", ".", "toCanonical", "(", ")...
/*[deutsch] <p>Erzeugt einen {@code Stream}, der &uuml;ber jedes Kalenderdatum der kanonischen Form dieses Intervalls geht. </p> @return daily stream @throws IllegalStateException if this interval is infinite or if there is no canonical form @see #toCanonical() @see #streamDaily(PlainDate, PlainDate) @since ...
[ "/", "*", "[", "deutsch", "]", "<p", ">", "Erzeugt", "einen", "{", "@code", "Stream", "}", "der", "&uuml", ";", "ber", "jedes", "Kalenderdatum", "der", "kanonischen", "Form", "dieses", "Intervalls", "geht", ".", "<", "/", "p", ">" ]
train
https://github.com/MenoData/Time4J/blob/08b2eda6b2dbb140b92011cf7071bb087edd46a5/base/src/main/java/net/time4j/range/DateInterval.java#L797-L813
jhalterman/failsafe
src/main/java/net/jodah/failsafe/FailsafeExecutor.java
FailsafeExecutor.runAsync
public CompletableFuture<Void> runAsync(CheckedRunnable runnable) { return callAsync(execution -> Functions.promiseOf(runnable, execution), false); }
java
public CompletableFuture<Void> runAsync(CheckedRunnable runnable) { return callAsync(execution -> Functions.promiseOf(runnable, execution), false); }
[ "public", "CompletableFuture", "<", "Void", ">", "runAsync", "(", "CheckedRunnable", "runnable", ")", "{", "return", "callAsync", "(", "execution", "->", "Functions", ".", "promiseOf", "(", "runnable", ",", "execution", ")", ",", "false", ")", ";", "}" ]
Executes the {@code runnable} asynchronously until successful or until the configured policies are exceeded. <p> If a configured circuit breaker is open, the resulting future is completed with {@link CircuitBreakerOpenException}. @throws NullPointerException if the {@code runnable} is null @throws RejectedExecutionExc...
[ "Executes", "the", "{", "@code", "runnable", "}", "asynchronously", "until", "successful", "or", "until", "the", "configured", "policies", "are", "exceeded", ".", "<p", ">", "If", "a", "configured", "circuit", "breaker", "is", "open", "the", "resulting", "futu...
train
https://github.com/jhalterman/failsafe/blob/65fcd3a82f7b232d2ff59bc525a59d693dd8e223/src/main/java/net/jodah/failsafe/FailsafeExecutor.java#L241-L243
TheHortonMachine/hortonmachine
gears/src/main/java/org/hortonmachine/gears/libs/modules/HMModel.java
HMModel.dumpRaster
public void dumpRaster( GridCoverage2D raster, String source ) throws Exception { if (raster == null || source == null) return; OmsRasterWriter writer = new OmsRasterWriter(); writer.pm = pm; writer.inRaster = raster; writer.file = source; writer.process(); ...
java
public void dumpRaster( GridCoverage2D raster, String source ) throws Exception { if (raster == null || source == null) return; OmsRasterWriter writer = new OmsRasterWriter(); writer.pm = pm; writer.inRaster = raster; writer.file = source; writer.process(); ...
[ "public", "void", "dumpRaster", "(", "GridCoverage2D", "raster", ",", "String", "source", ")", "throws", "Exception", "{", "if", "(", "raster", "==", "null", "||", "source", "==", "null", ")", "return", ";", "OmsRasterWriter", "writer", "=", "new", "OmsRaste...
Fast default writing of raster to source. <p>Mind that if either raster or source are <code>null</code>, the method will return without warning.</p> @param raster the {@link GridCoverage2D} to write. @param source the source to which to write to. @throws Exception
[ "Fast", "default", "writing", "of", "raster", "to", "source", "." ]
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/gears/src/main/java/org/hortonmachine/gears/libs/modules/HMModel.java#L321-L329
lessthanoptimal/BoofCV
main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/qrcode/QrCodePositionPatternDetector.java
QrCodePositionPatternDetector.checkPositionPatternAppearance
boolean checkPositionPatternAppearance( Polygon2D_F64 square , float grayThreshold ) { return( checkLine(square,grayThreshold,0) || checkLine(square,grayThreshold,1)); }
java
boolean checkPositionPatternAppearance( Polygon2D_F64 square , float grayThreshold ) { return( checkLine(square,grayThreshold,0) || checkLine(square,grayThreshold,1)); }
[ "boolean", "checkPositionPatternAppearance", "(", "Polygon2D_F64", "square", ",", "float", "grayThreshold", ")", "{", "return", "(", "checkLine", "(", "square", ",", "grayThreshold", ",", "0", ")", "||", "checkLine", "(", "square", ",", "grayThreshold", ",", "1"...
Determines if the found polygon looks like a position pattern. A horizontal and vertical line are sampled. At each sample point it is marked if it is above or below the binary threshold for this square. Location of sample points is found by "removing" perspective distortion. @param square Position pattern square.
[ "Determines", "if", "the", "found", "polygon", "looks", "like", "a", "position", "pattern", ".", "A", "horizontal", "and", "vertical", "line", "are", "sampled", ".", "At", "each", "sample", "point", "it", "is", "marked", "if", "it", "is", "above", "or", ...
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/qrcode/QrCodePositionPatternDetector.java#L331-L333
phax/ph-masterdata
ph-masterdata/src/main/java/com/helger/masterdata/currency/CurrencyHelper.java
CurrencyHelper.parseCurrencyFormat
@Nullable public static BigDecimal parseCurrencyFormat (@Nullable final ECurrency eCurrency, @Nullable final String sTextValue, @Nullable final BigDecimal aDefault) { final PerCurrencySettings aPCS = getSettings (eCu...
java
@Nullable public static BigDecimal parseCurrencyFormat (@Nullable final ECurrency eCurrency, @Nullable final String sTextValue, @Nullable final BigDecimal aDefault) { final PerCurrencySettings aPCS = getSettings (eCu...
[ "@", "Nullable", "public", "static", "BigDecimal", "parseCurrencyFormat", "(", "@", "Nullable", "final", "ECurrency", "eCurrency", ",", "@", "Nullable", "final", "String", "sTextValue", ",", "@", "Nullable", "final", "BigDecimal", "aDefault", ")", "{", "final", ...
Try to parse a string value formatted by the {@link NumberFormat} object returned from {@link #getCurrencyFormat(ECurrency)}. E.g. <code>&euro; 5,00</code> @param eCurrency The currency it is about. If <code>null</code> is provided {@link #DEFAULT_CURRENCY} is used instead. @param sTextValue The string value. It will ...
[ "Try", "to", "parse", "a", "string", "value", "formatted", "by", "the", "{", "@link", "NumberFormat", "}", "object", "returned", "from", "{", "@link", "#getCurrencyFormat", "(", "ECurrency", ")", "}", ".", "E", ".", "g", ".", "<code", ">", "&euro", ";", ...
train
https://github.com/phax/ph-masterdata/blob/ca5e0b03c735b30b47930c018bfb5e71f00d0ff4/ph-masterdata/src/main/java/com/helger/masterdata/currency/CurrencyHelper.java#L466-L484
eclipse/xtext-extras
org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/typesystem/util/TypeParameterSubstitutor.java
TypeParameterSubstitutor.visitTypeArgument
protected LightweightTypeReference visitTypeArgument(LightweightTypeReference reference, Visiting visiting) { return visitTypeArgument(reference, visiting, false); }
java
protected LightweightTypeReference visitTypeArgument(LightweightTypeReference reference, Visiting visiting) { return visitTypeArgument(reference, visiting, false); }
[ "protected", "LightweightTypeReference", "visitTypeArgument", "(", "LightweightTypeReference", "reference", ",", "Visiting", "visiting", ")", "{", "return", "visitTypeArgument", "(", "reference", ",", "visiting", ",", "false", ")", ";", "}" ]
This is equivalent to {@code visitTypeArgument(reference, visiting, false)}. @see #visitTypeArgument(LightweightTypeReference, Object, boolean)
[ "This", "is", "equivalent", "to", "{", "@code", "visitTypeArgument", "(", "reference", "visiting", "false", ")", "}", "." ]
train
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/typesystem/util/TypeParameterSubstitutor.java#L95-L97
OpenTSDB/opentsdb
src/tree/TreeBuilder.java
TreeBuilder.processParsedValue
private void processParsedValue(final String parsed_value) { if (rule.getCompiledRegex() == null && (rule.getSeparator() == null || rule.getSeparator().isEmpty())) { // we don't have a regex and we don't need to separate, so just use the // name of the timseries setCurrentName(parsed_valu...
java
private void processParsedValue(final String parsed_value) { if (rule.getCompiledRegex() == null && (rule.getSeparator() == null || rule.getSeparator().isEmpty())) { // we don't have a regex and we don't need to separate, so just use the // name of the timseries setCurrentName(parsed_valu...
[ "private", "void", "processParsedValue", "(", "final", "String", "parsed_value", ")", "{", "if", "(", "rule", ".", "getCompiledRegex", "(", ")", "==", "null", "&&", "(", "rule", ".", "getSeparator", "(", ")", "==", "null", "||", "rule", ".", "getSeparator"...
Routes the parsed value to the proper processing method for altering the display name depending on the current rule. This can route to the regex handler or the split processor. Or if neither splits or regex are specified for the rule, the parsed value is set as the branch name. @param parsed_value The value parsed from...
[ "Routes", "the", "parsed", "value", "to", "the", "proper", "processing", "method", "for", "altering", "the", "display", "name", "depending", "on", "the", "current", "rule", ".", "This", "can", "route", "to", "the", "regex", "handler", "or", "the", "split", ...
train
https://github.com/OpenTSDB/opentsdb/blob/3fc2d491c3c1ad397252c0a80203a69a3f9e3ef3/src/tree/TreeBuilder.java#L932-L948
elki-project/elki
elki-database/src/main/java/de/lmu/ifi/dbs/elki/database/DatabaseEventManager.java
DatabaseEventManager.fireResultAdded
public void fireResultAdded(Result r, Result parent) { for(int i = resultListenerList.size(); --i >= 0;) { resultListenerList.get(i).resultAdded(r, parent); } }
java
public void fireResultAdded(Result r, Result parent) { for(int i = resultListenerList.size(); --i >= 0;) { resultListenerList.get(i).resultAdded(r, parent); } }
[ "public", "void", "fireResultAdded", "(", "Result", "r", ",", "Result", "parent", ")", "{", "for", "(", "int", "i", "=", "resultListenerList", ".", "size", "(", ")", ";", "--", "i", ">=", "0", ";", ")", "{", "resultListenerList", ".", "get", "(", "i"...
Informs all registered <code>ResultListener</code> that a new result was added. @param r New child result added @param parent Parent result that was added to
[ "Informs", "all", "registered", "<code", ">", "ResultListener<", "/", "code", ">", "that", "a", "new", "result", "was", "added", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-database/src/main/java/de/lmu/ifi/dbs/elki/database/DatabaseEventManager.java#L312-L316
Azure/azure-sdk-for-java
automation/resource-manager/v2015_10_31/src/main/java/com/microsoft/azure/management/automation/v2015_10_31/implementation/RunbookDraftsInner.java
RunbookDraftsInner.getAsync
public Observable<RunbookDraftInner> getAsync(String resourceGroupName, String automationAccountName, String runbookName) { return getWithServiceResponseAsync(resourceGroupName, automationAccountName, runbookName).map(new Func1<ServiceResponse<RunbookDraftInner>, RunbookDraftInner>() { @Override ...
java
public Observable<RunbookDraftInner> getAsync(String resourceGroupName, String automationAccountName, String runbookName) { return getWithServiceResponseAsync(resourceGroupName, automationAccountName, runbookName).map(new Func1<ServiceResponse<RunbookDraftInner>, RunbookDraftInner>() { @Override ...
[ "public", "Observable", "<", "RunbookDraftInner", ">", "getAsync", "(", "String", "resourceGroupName", ",", "String", "automationAccountName", ",", "String", "runbookName", ")", "{", "return", "getWithServiceResponseAsync", "(", "resourceGroupName", ",", "automationAccoun...
Retrieve the runbook draft identified by runbook name. @param resourceGroupName Name of an Azure Resource group. @param automationAccountName The name of the automation account. @param runbookName The runbook name. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the ...
[ "Retrieve", "the", "runbook", "draft", "identified", "by", "runbook", "name", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/automation/resource-manager/v2015_10_31/src/main/java/com/microsoft/azure/management/automation/v2015_10_31/implementation/RunbookDraftsInner.java#L400-L407
lecousin/java-framework-core
net.lecousin.core/src/main/java/net/lecousin/framework/concurrent/synch/JoinPoint.java
JoinPoint.timeout
public synchronized void timeout(long millis, Runnable callback) { if (isUnblocked()) return; Task<Void,NoException> task = new Task.Cpu<Void,NoException>("JoinPoint timeout", Task.PRIORITY_RATHER_LOW) { @Override public Void run() { synchronized (JoinPoint.this) { if (isUnblocked()) return nul...
java
public synchronized void timeout(long millis, Runnable callback) { if (isUnblocked()) return; Task<Void,NoException> task = new Task.Cpu<Void,NoException>("JoinPoint timeout", Task.PRIORITY_RATHER_LOW) { @Override public Void run() { synchronized (JoinPoint.this) { if (isUnblocked()) return nul...
[ "public", "synchronized", "void", "timeout", "(", "long", "millis", ",", "Runnable", "callback", ")", "{", "if", "(", "isUnblocked", "(", ")", ")", "return", ";", "Task", "<", "Void", ",", "NoException", ">", "task", "=", "new", "Task", ".", "Cpu", "<"...
Should be used only for debugging purpose, as a JoinPoint is supposed to always become unblocked.<br/> This method will wait for the given milliseconds, if at this time the JoinPoint is already unblocked, nothing is done, else we force it to become unblocked, and the given callback is called if any.
[ "Should", "be", "used", "only", "for", "debugging", "purpose", "as", "a", "JoinPoint", "is", "supposed", "to", "always", "become", "unblocked", ".", "<br", "/", ">", "This", "method", "will", "wait", "for", "the", "given", "milliseconds", "if", "at", "this...
train
https://github.com/lecousin/java-framework-core/blob/b0c893b44bfde2c03f90ea846a49ef5749d598f3/net.lecousin.core/src/main/java/net/lecousin/framework/concurrent/synch/JoinPoint.java#L143-L163
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-api-parent/nd4j-native-api/src/main/java/org/nd4j/rng/deallocator/NativeRandomDeallocator.java
NativeRandomDeallocator.trackStatePointer
public void trackStatePointer(NativePack random) { if (random.getStatePointer() != null) { GarbageStateReference reference = new GarbageStateReference(random, queue); referenceMap.put(random.getStatePointer().address(), reference); } }
java
public void trackStatePointer(NativePack random) { if (random.getStatePointer() != null) { GarbageStateReference reference = new GarbageStateReference(random, queue); referenceMap.put(random.getStatePointer().address(), reference); } }
[ "public", "void", "trackStatePointer", "(", "NativePack", "random", ")", "{", "if", "(", "random", ".", "getStatePointer", "(", ")", "!=", "null", ")", "{", "GarbageStateReference", "reference", "=", "new", "GarbageStateReference", "(", "random", ",", "queue", ...
This method is used internally from NativeRandom deallocators This method doesn't accept Random interface implementations intentionally. @param random
[ "This", "method", "is", "used", "internally", "from", "NativeRandom", "deallocators", "This", "method", "doesn", "t", "accept", "Random", "interface", "implementations", "intentionally", "." ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-native-api/src/main/java/org/nd4j/rng/deallocator/NativeRandomDeallocator.java#L65-L70
jglobus/JGlobus
gridftp/src/main/java/org/globus/ftp/dc/TransferThreadManager.java
TransferThreadManager.activeConnect
public void activeConnect(HostPort hp, int connections) { for (int i = 0; i < connections; i++) { SocketBox sbox = new ManagedSocketBox(); logger.debug("adding new empty socketBox to the socket pool"); socketPool.add(sbox); logger.debug( ...
java
public void activeConnect(HostPort hp, int connections) { for (int i = 0; i < connections; i++) { SocketBox sbox = new ManagedSocketBox(); logger.debug("adding new empty socketBox to the socket pool"); socketPool.add(sbox); logger.debug( ...
[ "public", "void", "activeConnect", "(", "HostPort", "hp", ",", "int", "connections", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "connections", ";", "i", "++", ")", "{", "SocketBox", "sbox", "=", "new", "ManagedSocketBox", "(", ")", ";...
Act as the active side. Connect to the server and store the newly connected sockets in the socketPool.
[ "Act", "as", "the", "active", "side", ".", "Connect", "to", "the", "server", "and", "store", "the", "newly", "connected", "sockets", "in", "the", "socketPool", "." ]
train
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gridftp/src/main/java/org/globus/ftp/dc/TransferThreadManager.java#L59-L81