repository_name
stringlengths
7
58
func_path_in_repository
stringlengths
11
218
func_name
stringlengths
4
140
whole_func_string
stringlengths
153
5.32k
language
stringclasses
1 value
func_code_string
stringlengths
72
4k
func_code_tokens
listlengths
20
832
func_documentation_string
stringlengths
61
2k
func_documentation_tokens
listlengths
1
647
split_name
stringclasses
1 value
func_code_url
stringlengths
102
339
foundation-runtime/service-directory
2.0/sd-api/src/main/java/com/cisco/oss/foundation/directory/connect/DirectoryConnection.java
DirectoryConnection.sendAdminPacket
private void sendAdminPacket(ProtocolHeader header, Protocol protocol) throws IOException { """ Send the packet to Directory Server directory. It doesn't queue the packet in the pendingQueue. It used internally to send administration Protocol. @param header @param protocol @throws IOException """ ...
java
private void sendAdminPacket(ProtocolHeader header, Protocol protocol) throws IOException{ clientSocket.sendPacket(header, protocol); }
[ "private", "void", "sendAdminPacket", "(", "ProtocolHeader", "header", ",", "Protocol", "protocol", ")", "throws", "IOException", "{", "clientSocket", ".", "sendPacket", "(", "header", ",", "protocol", ")", ";", "}" ]
Send the packet to Directory Server directory. It doesn't queue the packet in the pendingQueue. It used internally to send administration Protocol. @param header @param protocol @throws IOException
[ "Send", "the", "packet", "to", "Directory", "Server", "directory", "." ]
train
https://github.com/foundation-runtime/service-directory/blob/a7bdefe173dc99e75eff4a24e07e6407e62f2ed4/2.0/sd-api/src/main/java/com/cisco/oss/foundation/directory/connect/DirectoryConnection.java#L786-L788
rhuss/jolokia
agent/core/src/main/java/org/jolokia/http/AgentServlet.java
AgentServlet.doOptions
@Override protected void doOptions(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { """ OPTION requests are treated as CORS preflight requests @param req the original request @param resp the response the answer are written to """ Map<String,String> respon...
java
@Override protected void doOptions(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { Map<String,String> responseHeaders = requestHandler.handleCorsPreflightRequest( getOriginOrReferer(req), req.getHeader("...
[ "@", "Override", "protected", "void", "doOptions", "(", "HttpServletRequest", "req", ",", "HttpServletResponse", "resp", ")", "throws", "ServletException", ",", "IOException", "{", "Map", "<", "String", ",", "String", ">", "responseHeaders", "=", "requestHandler", ...
OPTION requests are treated as CORS preflight requests @param req the original request @param resp the response the answer are written to
[ "OPTION", "requests", "are", "treated", "as", "CORS", "preflight", "requests" ]
train
https://github.com/rhuss/jolokia/blob/dc95e7bef859b1829776c5a84c8f7738f5d7d9c3/agent/core/src/main/java/org/jolokia/http/AgentServlet.java#L293-L302
alibaba/ARouter
arouter-api/src/main/java/com/alibaba/android/arouter/facade/Postcard.java
Postcard.withObject
public Postcard withObject(@Nullable String key, @Nullable Object value) { """ Set object value, the value will be convert to string by 'Fastjson' @param key a String, or null @param value a Object, or null @return current """ serializationService = ARouter.getInstance().navigation(Serialization...
java
public Postcard withObject(@Nullable String key, @Nullable Object value) { serializationService = ARouter.getInstance().navigation(SerializationService.class); mBundle.putString(key, serializationService.object2Json(value)); return this; }
[ "public", "Postcard", "withObject", "(", "@", "Nullable", "String", "key", ",", "@", "Nullable", "Object", "value", ")", "{", "serializationService", "=", "ARouter", ".", "getInstance", "(", ")", ".", "navigation", "(", "SerializationService", ".", "class", ")...
Set object value, the value will be convert to string by 'Fastjson' @param key a String, or null @param value a Object, or null @return current
[ "Set", "object", "value", "the", "value", "will", "be", "convert", "to", "string", "by", "Fastjson" ]
train
https://github.com/alibaba/ARouter/blob/1a06912a6e14a57112db1204b43f81c43d721732/arouter-api/src/main/java/com/alibaba/android/arouter/facade/Postcard.java#L228-L232
Harium/keel
src/main/java/com/harium/keel/catalano/math/distance/Distance.java
Distance.KullbackLeiblerDivergence
public static double KullbackLeiblerDivergence(double[] p, double[] q) { """ Gets the Kullback Leibler divergence. @param p P vector. @param q Q vector. @return The Kullback Leibler divergence between u and v. """ boolean intersection = false; double k = 0; for (int i = 0; i < p.l...
java
public static double KullbackLeiblerDivergence(double[] p, double[] q) { boolean intersection = false; double k = 0; for (int i = 0; i < p.length; i++) { if (p[i] != 0 && q[i] != 0) { intersection = true; k += p[i] * Math.log(p[i] / q[i]); ...
[ "public", "static", "double", "KullbackLeiblerDivergence", "(", "double", "[", "]", "p", ",", "double", "[", "]", "q", ")", "{", "boolean", "intersection", "=", "false", ";", "double", "k", "=", "0", ";", "for", "(", "int", "i", "=", "0", ";", "i", ...
Gets the Kullback Leibler divergence. @param p P vector. @param q Q vector. @return The Kullback Leibler divergence between u and v.
[ "Gets", "the", "Kullback", "Leibler", "divergence", "." ]
train
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/math/distance/Distance.java#L560-L575
classgraph/classgraph
src/main/java/nonapi/io/github/classgraph/utils/LogNode.java
LogNode.addChild
private LogNode addChild(final String sortKey, final String msg, final long elapsedTimeNanos, final Throwable exception) { """ Add a child log node. @param sortKey the sort key @param msg the log message @param elapsedTimeNanos the elapsed time in nanos @param exception the exception that was...
java
private LogNode addChild(final String sortKey, final String msg, final long elapsedTimeNanos, final Throwable exception) { final String newSortKey = sortKeyPrefix + "\t" + (sortKey == null ? "" : sortKey) + "\t" + String.format("%09d", sortKeyUniqueSuffix.getAndIncrement()); ...
[ "private", "LogNode", "addChild", "(", "final", "String", "sortKey", ",", "final", "String", "msg", ",", "final", "long", "elapsedTimeNanos", ",", "final", "Throwable", "exception", ")", "{", "final", "String", "newSortKey", "=", "sortKeyPrefix", "+", "\"\\t\"",...
Add a child log node. @param sortKey the sort key @param msg the log message @param elapsedTimeNanos the elapsed time in nanos @param exception the exception that was thrown @return the log node
[ "Add", "a", "child", "log", "node", "." ]
train
https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/nonapi/io/github/classgraph/utils/LogNode.java#L261-L271
JOML-CI/JOML
src/org/joml/AABBf.java
AABBf.intersectRay
public boolean intersectRay(float originX, float originY, float originZ, float dirX, float dirY, float dirZ, Vector2f result) { """ Determine whether the given ray with the origin <code>(originX, originY, originZ)</code> and direction <code>(dirX, dirY, dirZ)</code> intersects this AABB, and return the values of ...
java
public boolean intersectRay(float originX, float originY, float originZ, float dirX, float dirY, float dirZ, Vector2f result) { return Intersectionf.intersectRayAab(originX, originY, originZ, dirX, dirY, dirZ, minX, minY, minZ, maxX, maxY, maxZ, result); }
[ "public", "boolean", "intersectRay", "(", "float", "originX", ",", "float", "originY", ",", "float", "originZ", ",", "float", "dirX", ",", "float", "dirY", ",", "float", "dirZ", ",", "Vector2f", "result", ")", "{", "return", "Intersectionf", ".", "intersectR...
Determine whether the given ray with the origin <code>(originX, originY, originZ)</code> and direction <code>(dirX, dirY, dirZ)</code> intersects this AABB, and return the values of the parameter <i>t</i> in the ray equation <i>p(t) = origin + t * dir</i> of the near and far point of intersection. <p> This method retur...
[ "Determine", "whether", "the", "given", "ray", "with", "the", "origin", "<code", ">", "(", "originX", "originY", "originZ", ")", "<", "/", "code", ">", "and", "direction", "<code", ">", "(", "dirX", "dirY", "dirZ", ")", "<", "/", "code", ">", "intersec...
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/AABBf.java#L453-L455
apache/flink
flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/util/SegmentsUtil.java
SegmentsUtil.getLong
public static long getLong(MemorySegment[] segments, int offset) { """ get long from segments. @param segments target segments. @param offset value offset. """ if (inFirstSegment(segments, offset, 8)) { return segments[0].getLong(offset); } else { return getLongMultiSegments(segments, offset); ...
java
public static long getLong(MemorySegment[] segments, int offset) { if (inFirstSegment(segments, offset, 8)) { return segments[0].getLong(offset); } else { return getLongMultiSegments(segments, offset); } }
[ "public", "static", "long", "getLong", "(", "MemorySegment", "[", "]", "segments", ",", "int", "offset", ")", "{", "if", "(", "inFirstSegment", "(", "segments", ",", "offset", ",", "8", ")", ")", "{", "return", "segments", "[", "0", "]", ".", "getLong"...
get long from segments. @param segments target segments. @param offset value offset.
[ "get", "long", "from", "segments", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/util/SegmentsUtil.java#L709-L715
jmeetsma/Iglu-Common
src/main/java/org/ijsberg/iglu/configuration/classloading/ExtendedClassPathClassLoader.java
ExtendedClassPathClassLoader.mapClassResourceEntry
private void mapClassResourceEntry(String fileName, Object location) { """ Maps (class) resources to files. @param fileName @param location """ Object previouslyFoundLocation = mixedResourceLocations.get(fileName); if (previouslyFoundLocation != null && !previouslyFoundLocation.equals(location)) { /...
java
private void mapClassResourceEntry(String fileName, Object location) { Object previouslyFoundLocation = mixedResourceLocations.get(fileName); if (previouslyFoundLocation != null && !previouslyFoundLocation.equals(location)) { //this may indicate a conflict //it occurs frequently for "/MANIFEST.MF" which shoul...
[ "private", "void", "mapClassResourceEntry", "(", "String", "fileName", ",", "Object", "location", ")", "{", "Object", "previouslyFoundLocation", "=", "mixedResourceLocations", ".", "get", "(", "fileName", ")", ";", "if", "(", "previouslyFoundLocation", "!=", "null",...
Maps (class) resources to files. @param fileName @param location
[ "Maps", "(", "class", ")", "resources", "to", "files", "." ]
train
https://github.com/jmeetsma/Iglu-Common/blob/0fb0885775b576209ff1b5a0f67e3c25a99a6420/src/main/java/org/ijsberg/iglu/configuration/classloading/ExtendedClassPathClassLoader.java#L235-L253
belaban/JGroups
src/org/jgroups/util/Bits.java
Bits.writeFloat
public static void writeFloat(float num, DataOutput out) throws IOException { """ Writes a float to an output stream @param num the float to be written @param out the output stream """ writeInt(Float.floatToIntBits(num), out); }
java
public static void writeFloat(float num, DataOutput out) throws IOException { writeInt(Float.floatToIntBits(num), out); }
[ "public", "static", "void", "writeFloat", "(", "float", "num", ",", "DataOutput", "out", ")", "throws", "IOException", "{", "writeInt", "(", "Float", ".", "floatToIntBits", "(", "num", ")", ",", "out", ")", ";", "}" ]
Writes a float to an output stream @param num the float to be written @param out the output stream
[ "Writes", "a", "float", "to", "an", "output", "stream" ]
train
https://github.com/belaban/JGroups/blob/bd3ca786aa57fed41dfbc10a94b1281e388be03b/src/org/jgroups/util/Bits.java#L490-L492
whitesource/agents
wss-agent-api/src/main/java/org/whitesource/agent/api/dispatch/RequestFactory.java
RequestFactory.newUpdateInventoryRequest
@Deprecated public UpdateInventoryRequest newUpdateInventoryRequest(String orgToken, Collection<AgentProjectInfo> projects, String userKey) { """ Create new Inventory Update request. @param orgToken WhiteSource organization token. @param projects Projects status statement to update. @param userKey user k...
java
@Deprecated public UpdateInventoryRequest newUpdateInventoryRequest(String orgToken, Collection<AgentProjectInfo> projects, String userKey) { return newUpdateInventoryRequest(orgToken, null, null, null, projects, userKey); }
[ "@", "Deprecated", "public", "UpdateInventoryRequest", "newUpdateInventoryRequest", "(", "String", "orgToken", ",", "Collection", "<", "AgentProjectInfo", ">", "projects", ",", "String", "userKey", ")", "{", "return", "newUpdateInventoryRequest", "(", "orgToken", ",", ...
Create new Inventory Update request. @param orgToken WhiteSource organization token. @param projects Projects status statement to update. @param userKey user key uniquely identifying the account at white source. @return Newly created request to update organization inventory.
[ "Create", "new", "Inventory", "Update", "request", "." ]
train
https://github.com/whitesource/agents/blob/8a947a3dbad257aff70f23f79fb3a55ca90b765f/wss-agent-api/src/main/java/org/whitesource/agent/api/dispatch/RequestFactory.java#L63-L66
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/AnycastOutputHandler.java
AnycastOutputHandler.persistLockAndTick
public final AOValue persistLockAndTick(TransactionCommon t, AOStream stream, long tick, SIMPMessage msg, int storagePolicy, long waitTime, long prevTick) throws Exception { """ Helper method called by the AOStream when to persistently lock a message and create a persistent tick in the protocol stream @par...
java
public final AOValue persistLockAndTick(TransactionCommon t, AOStream stream, long tick, SIMPMessage msg, int storagePolicy, long waitTime, long prevTick) throws Exception { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "persistLockAndTick", new Object[] {...
[ "public", "final", "AOValue", "persistLockAndTick", "(", "TransactionCommon", "t", ",", "AOStream", "stream", ",", "long", "tick", ",", "SIMPMessage", "msg", ",", "int", "storagePolicy", ",", "long", "waitTime", ",", "long", "prevTick", ")", "throws", "Exception...
Helper method called by the AOStream when to persistently lock a message and create a persistent tick in the protocol stream @param t the transaction @param stream the stream making this call @param tick the tick in the stream @param msg the message to be persistently locked (it is already non-persitently locked) @para...
[ "Helper", "method", "called", "by", "the", "AOStream", "when", "to", "persistently", "lock", "a", "message", "and", "create", "a", "persistent", "tick", "in", "the", "protocol", "stream" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/AnycastOutputHandler.java#L2626-L2662
graknlabs/grakn
server/src/graql/analytics/Utility.java
Utility.mayHaveResourceEdge
private static boolean mayHaveResourceEdge(TransactionOLTP graknGraph, ConceptId conceptId1, ConceptId conceptId2) { """ Check whether it is possible that there is a resource edge between the two given concepts. """ Concept concept1 = graknGraph.getConcept(conceptId1); Concept concept2 = graknG...
java
private static boolean mayHaveResourceEdge(TransactionOLTP graknGraph, ConceptId conceptId1, ConceptId conceptId2) { Concept concept1 = graknGraph.getConcept(conceptId1); Concept concept2 = graknGraph.getConcept(conceptId2); return concept1 != null && concept2 != null && (concept1.isAttribute() ...
[ "private", "static", "boolean", "mayHaveResourceEdge", "(", "TransactionOLTP", "graknGraph", ",", "ConceptId", "conceptId1", ",", "ConceptId", "conceptId2", ")", "{", "Concept", "concept1", "=", "graknGraph", ".", "getConcept", "(", "conceptId1", ")", ";", "Concept"...
Check whether it is possible that there is a resource edge between the two given concepts.
[ "Check", "whether", "it", "is", "possible", "that", "there", "is", "a", "resource", "edge", "between", "the", "two", "given", "concepts", "." ]
train
https://github.com/graknlabs/grakn/blob/6aaee75ea846202474d591f8809d62028262fac5/server/src/graql/analytics/Utility.java#L116-L120
Alluxio/alluxio
underfs/kodo/src/main/java/alluxio/underfs/kodo/KodoClient.java
KodoClient.copyObject
public void copyObject(String src, String dst) throws QiniuException { """ Copys object in Qiniu kodo. @param src source Object key @param dst destination Object Key """ mBucketManager.copy(mBucketName, src, mBucketName, dst); }
java
public void copyObject(String src, String dst) throws QiniuException { mBucketManager.copy(mBucketName, src, mBucketName, dst); }
[ "public", "void", "copyObject", "(", "String", "src", ",", "String", "dst", ")", "throws", "QiniuException", "{", "mBucketManager", ".", "copy", "(", "mBucketName", ",", "src", ",", "mBucketName", ",", "dst", ")", ";", "}" ]
Copys object in Qiniu kodo. @param src source Object key @param dst destination Object Key
[ "Copys", "object", "in", "Qiniu", "kodo", "." ]
train
https://github.com/Alluxio/alluxio/blob/af38cf3ab44613355b18217a3a4d961f8fec3a10/underfs/kodo/src/main/java/alluxio/underfs/kodo/KodoClient.java#L143-L145
thorstenwagner/TraJ
src/main/java/de/biomedical_imaging/traJ/simulation/ConfinedDiffusionSimulator.java
ConfinedDiffusionSimulator.nextConfinedPosition
private Point3d nextConfinedPosition(Point3d lastPosition) { """ Simulates a single step (for dt) of a confined diffusion inside of a circle. Therefore each step is split up in N substeps. A substep which collidates with an object is set to the previous position. @param Nsub number of substeps @return """ ...
java
private Point3d nextConfinedPosition(Point3d lastPosition){ double timelagSub = timelag / numberOfSubsteps; Point3d center = new Point3d(0, 0, 0); Point3d lastValidPosition = lastPosition; int validSteps = 0; while(validSteps<numberOfSubsteps){ double u = r.nextDouble(); double steplength = Math.sqrt...
[ "private", "Point3d", "nextConfinedPosition", "(", "Point3d", "lastPosition", ")", "{", "double", "timelagSub", "=", "timelag", "/", "numberOfSubsteps", ";", "Point3d", "center", "=", "new", "Point3d", "(", "0", ",", "0", ",", "0", ")", ";", "Point3d", "last...
Simulates a single step (for dt) of a confined diffusion inside of a circle. Therefore each step is split up in N substeps. A substep which collidates with an object is set to the previous position. @param Nsub number of substeps @return
[ "Simulates", "a", "single", "step", "(", "for", "dt", ")", "of", "a", "confined", "diffusion", "inside", "of", "a", "circle", ".", "Therefore", "each", "step", "is", "split", "up", "in", "N", "substeps", ".", "A", "substep", "which", "collidates", "with"...
train
https://github.com/thorstenwagner/TraJ/blob/505fafb1f2f77a2d67bb2a089a2fdebe2c9bc7cb/src/main/java/de/biomedical_imaging/traJ/simulation/ConfinedDiffusionSimulator.java#L73-L95
alkacon/opencms-core
src-gwt/org/opencms/ade/galleries/client/preview/util/CmsRectangle.java
CmsRectangle.fromPoints
public static CmsRectangle fromPoints(CmsPoint topLeft, CmsPoint bottomRight) { """ Creates a new rectangle from its top left and bottom right corner points.<p> @param topLeft the top left corner @param bottomRight the bottom right corner @return the new rectangle """ CmsRectangle result = new Cm...
java
public static CmsRectangle fromPoints(CmsPoint topLeft, CmsPoint bottomRight) { CmsRectangle result = new CmsRectangle(); result.m_left = topLeft.getX(); result.m_top = topLeft.getY(); result.m_width = bottomRight.getX() - topLeft.getX(); result.m_height = bottomRight.getY() - t...
[ "public", "static", "CmsRectangle", "fromPoints", "(", "CmsPoint", "topLeft", ",", "CmsPoint", "bottomRight", ")", "{", "CmsRectangle", "result", "=", "new", "CmsRectangle", "(", ")", ";", "result", ".", "m_left", "=", "topLeft", ".", "getX", "(", ")", ";", ...
Creates a new rectangle from its top left and bottom right corner points.<p> @param topLeft the top left corner @param bottomRight the bottom right corner @return the new rectangle
[ "Creates", "a", "new", "rectangle", "from", "its", "top", "left", "and", "bottom", "right", "corner", "points", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/ade/galleries/client/preview/util/CmsRectangle.java#L83-L91
waldheinz/fat32-lib
src/main/java/de/waldheinz/fs/fat/LittleEndian.java
LittleEndian.setInt16
public static void setInt16(byte[] dst, int offset, int value) { """ Sets a 16-bit integer in the given byte array at the given offset. """ assert (value & 0xffff) == value : "value out of range"; dst[offset + 0] = (byte) (value & 0xFF); dst[offset + 1] = (byte) ((value >>> 8) ...
java
public static void setInt16(byte[] dst, int offset, int value) { assert (value & 0xffff) == value : "value out of range"; dst[offset + 0] = (byte) (value & 0xFF); dst[offset + 1] = (byte) ((value >>> 8) & 0xFF); }
[ "public", "static", "void", "setInt16", "(", "byte", "[", "]", "dst", ",", "int", "offset", ",", "int", "value", ")", "{", "assert", "(", "value", "&", "0xffff", ")", "==", "value", ":", "\"value out of range\"", ";", "dst", "[", "offset", "+", "0", ...
Sets a 16-bit integer in the given byte array at the given offset.
[ "Sets", "a", "16", "-", "bit", "integer", "in", "the", "given", "byte", "array", "at", "the", "given", "offset", "." ]
train
https://github.com/waldheinz/fat32-lib/blob/3d8f1a986339573576e02eb0b6ea49bfdc9cce26/src/main/java/de/waldheinz/fs/fat/LittleEndian.java#L82-L87
jnidzwetzki/bitfinex-v2-wss-api-java
src/main/java/com/github/jnidzwetzki/bitfinex/v2/symbol/BitfinexSymbols.java
BitfinexSymbols.executedTrades
public static BitfinexExecutedTradeSymbol executedTrades(final String currency, final String profitCurrency) { """ Returns symbol for candlestick channel @param currency of trades channel @param profitCurrency of trades channel @return symbol """ final String currencyNonNull = O...
java
public static BitfinexExecutedTradeSymbol executedTrades(final String currency, final String profitCurrency) { final String currencyNonNull = Objects.requireNonNull(currency).toUpperCase(); final String profitCurrencyNonNull = Objects.requireNonNull(profitCurrency).toUpperCase(); ...
[ "public", "static", "BitfinexExecutedTradeSymbol", "executedTrades", "(", "final", "String", "currency", ",", "final", "String", "profitCurrency", ")", "{", "final", "String", "currencyNonNull", "=", "Objects", ".", "requireNonNull", "(", "currency", ")", ".", "toUp...
Returns symbol for candlestick channel @param currency of trades channel @param profitCurrency of trades channel @return symbol
[ "Returns", "symbol", "for", "candlestick", "channel" ]
train
https://github.com/jnidzwetzki/bitfinex-v2-wss-api-java/blob/2e6adf1eb6f8cd4c8722f1619f78ab2cc3c600ee/src/main/java/com/github/jnidzwetzki/bitfinex/v2/symbol/BitfinexSymbols.java#L92-L99
UrielCh/ovh-java-sdk
ovh-java-sdk-price/src/main/java/net/minidev/ovh/api/ApiOvhPrice.java
ApiOvhPrice.license_office_officeName_GET
public OvhPrice license_office_officeName_GET(net.minidev.ovh.api.price.license.OvhOfficeEnum officeName) throws IOException { """ Get the monthly price for an office license REST: GET /price/license/office/{officeName} @param officeName [required] Office """ String qPath = "/price/license/office/{office...
java
public OvhPrice license_office_officeName_GET(net.minidev.ovh.api.price.license.OvhOfficeEnum officeName) throws IOException { String qPath = "/price/license/office/{officeName}"; StringBuilder sb = path(qPath, officeName); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, OvhPrice.c...
[ "public", "OvhPrice", "license_office_officeName_GET", "(", "net", ".", "minidev", ".", "ovh", ".", "api", ".", "price", ".", "license", ".", "OvhOfficeEnum", "officeName", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/price/license/office/{officeNa...
Get the monthly price for an office license REST: GET /price/license/office/{officeName} @param officeName [required] Office
[ "Get", "the", "monthly", "price", "for", "an", "office", "license" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-price/src/main/java/net/minidev/ovh/api/ApiOvhPrice.java#L7269-L7274
unbescape/unbescape
src/main/java/org/unbescape/html/HtmlEscapeSymbols.java
HtmlEscapeSymbols.positionInList
private static int positionInList(final List<char[]> list, final char[] element) { """ /* Utility method, used for determining which of the different NCRs for the same codepoint (when there are many) was specified first, because that is the one we should be using for escaping. (Note all of the NCRs will be ava...
java
private static int positionInList(final List<char[]> list, final char[] element) { int i = 0; for (final char[] e : list) { if (Arrays.equals(e, element)) { return i; } i++; } return -1; }
[ "private", "static", "int", "positionInList", "(", "final", "List", "<", "char", "[", "]", ">", "list", ",", "final", "char", "[", "]", "element", ")", "{", "int", "i", "=", "0", ";", "for", "(", "final", "char", "[", "]", "e", ":", "list", ")", ...
/* Utility method, used for determining which of the different NCRs for the same codepoint (when there are many) was specified first, because that is the one we should be using for escaping. (Note all of the NCRs will be available for unescaping, obviously)
[ "/", "*", "Utility", "method", "used", "for", "determining", "which", "of", "the", "different", "NCRs", "for", "the", "same", "codepoint", "(", "when", "there", "are", "many", ")", "was", "specified", "first", "because", "that", "is", "the", "one", "we", ...
train
https://github.com/unbescape/unbescape/blob/ec5435fb3508c2eed25d8165dc27ded2602cae13/src/main/java/org/unbescape/html/HtmlEscapeSymbols.java#L329-L338
padrig64/ValidationFramework
validationframework-core/src/main/java/com/google/code/validationframework/base/property/AbstractReadableListProperty.java
AbstractReadableListProperty.doNotifyListenersOfRemovedValues
protected void doNotifyListenersOfRemovedValues(int startIndex, List<R> oldItems) { """ Notifies the change listeners that items have been removed. <p> Note that the specified list of items will be wrapped in an unmodifiable list before being passed to the listeners. @param startIndex Index of the first remo...
java
protected void doNotifyListenersOfRemovedValues(int startIndex, List<R> oldItems) { List<ListValueChangeListener<R>> listenersCopy = new ArrayList<ListValueChangeListener<R>>(listeners); List<R> unmodifiable = Collections.unmodifiableList(oldItems); for (ListValueChangeListener<R> listener : lis...
[ "protected", "void", "doNotifyListenersOfRemovedValues", "(", "int", "startIndex", ",", "List", "<", "R", ">", "oldItems", ")", "{", "List", "<", "ListValueChangeListener", "<", "R", ">>", "listenersCopy", "=", "new", "ArrayList", "<", "ListValueChangeListener", "...
Notifies the change listeners that items have been removed. <p> Note that the specified list of items will be wrapped in an unmodifiable list before being passed to the listeners. @param startIndex Index of the first removed item. @param oldItems Removed items.
[ "Notifies", "the", "change", "listeners", "that", "items", "have", "been", "removed", ".", "<p", ">", "Note", "that", "the", "specified", "list", "of", "items", "will", "be", "wrapped", "in", "an", "unmodifiable", "list", "before", "being", "passed", "to", ...
train
https://github.com/padrig64/ValidationFramework/blob/2dd3c7b3403993db366d24a927645f467ccd1dda/validationframework-core/src/main/java/com/google/code/validationframework/base/property/AbstractReadableListProperty.java#L127-L133
lessthanoptimal/ejml
main/ejml-ddense/src/org/ejml/dense/fixed/CommonOps_DDF2.java
CommonOps_DDF2.add
public static void add( DMatrix2 a , DMatrix2 b , DMatrix2 c ) { """ <p>Performs the following operation:<br> <br> c = a + b <br> c<sub>i</sub> = a<sub>i</sub> + b<sub>i</sub> <br> </p> <p> Vector C can be the same instance as Vector A and/or B. </p> @param a A Vector. Not modified. @param b A Vector....
java
public static void add( DMatrix2 a , DMatrix2 b , DMatrix2 c ) { c.a1 = a.a1 + b.a1; c.a2 = a.a2 + b.a2; }
[ "public", "static", "void", "add", "(", "DMatrix2", "a", ",", "DMatrix2", "b", ",", "DMatrix2", "c", ")", "{", "c", ".", "a1", "=", "a", ".", "a1", "+", "b", ".", "a1", ";", "c", ".", "a2", "=", "a", ".", "a2", "+", "b", ".", "a2", ";", "...
<p>Performs the following operation:<br> <br> c = a + b <br> c<sub>i</sub> = a<sub>i</sub> + b<sub>i</sub> <br> </p> <p> Vector C can be the same instance as Vector A and/or B. </p> @param a A Vector. Not modified. @param b A Vector. Not modified. @param c A Vector where the results are stored. Modified.
[ "<p", ">", "Performs", "the", "following", "operation", ":", "<br", ">", "<br", ">", "c", "=", "a", "+", "b", "<br", ">", "c<sub", ">", "i<", "/", "sub", ">", "=", "a<sub", ">", "i<", "/", "sub", ">", "+", "b<sub", ">", "i<", "/", "sub", ">",...
train
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-ddense/src/org/ejml/dense/fixed/CommonOps_DDF2.java#L69-L72
Stratio/deep-spark
deep-cassandra/src/main/java/com/stratio/deep/cassandra/extractor/CassandraExtractor.java
CassandraExtractor.initRecordReader
private DeepRecordReader initRecordReader(final DeepPartition dp, CassandraDeepJobConfig<T> config) { """ Instantiates a new deep record reader object associated to the provided partition. @param dp a spark deep partition @return the deep record reader associated ...
java
private DeepRecordReader initRecordReader(final DeepPartition dp, CassandraDeepJobConfig<T> config) { DeepRecordReader recordReader = new DeepRecordReader(config, dp.splitWrapper()); return recordReader; }
[ "private", "DeepRecordReader", "initRecordReader", "(", "final", "DeepPartition", "dp", ",", "CassandraDeepJobConfig", "<", "T", ">", "config", ")", "{", "DeepRecordReader", "recordReader", "=", "new", "DeepRecordReader", "(", "config", ",", "dp", ".", "splitWrapper...
Instantiates a new deep record reader object associated to the provided partition. @param dp a spark deep partition @return the deep record reader associated to the provided partition.
[ "Instantiates", "a", "new", "deep", "record", "reader", "object", "associated", "to", "the", "provided", "partition", "." ]
train
https://github.com/Stratio/deep-spark/blob/b9621c9b7a6d996f80fce1d073d696a157bed095/deep-cassandra/src/main/java/com/stratio/deep/cassandra/extractor/CassandraExtractor.java#L159-L166
Azure/azure-sdk-for-java
cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/VersionsImpl.java
VersionsImpl.deleteUnlabelledUtterance
public OperationStatus deleteUnlabelledUtterance(UUID appId, String versionId, String utterance) { """ Deleted an unlabelled utterance. @param appId The application ID. @param versionId The version ID. @param utterance The utterance text to delete. @throws IllegalArgumentException thrown if parameters fail t...
java
public OperationStatus deleteUnlabelledUtterance(UUID appId, String versionId, String utterance) { return deleteUnlabelledUtteranceWithServiceResponseAsync(appId, versionId, utterance).toBlocking().single().body(); }
[ "public", "OperationStatus", "deleteUnlabelledUtterance", "(", "UUID", "appId", ",", "String", "versionId", ",", "String", "utterance", ")", "{", "return", "deleteUnlabelledUtteranceWithServiceResponseAsync", "(", "appId", ",", "versionId", ",", "utterance", ")", ".", ...
Deleted an unlabelled utterance. @param appId The application ID. @param versionId The version ID. @param utterance The utterance text to delete. @throws IllegalArgumentException thrown if parameters fail the validation @throws ErrorResponseException thrown if the request is rejected by server @throws RuntimeException...
[ "Deleted", "an", "unlabelled", "utterance", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/VersionsImpl.java#L1044-L1046
kuali/ojb-1.0.4
src/java/org/apache/ojb/broker/accesslayer/ConnectionFactoryPooledImpl.java
ConnectionFactoryPooledImpl.createConnectionPool
public ObjectPool createConnectionPool(JdbcConnectionDescriptor jcd) { """ Create the pool for pooling the connections of the given connection descriptor. Override this method to implement your on {@link org.apache.commons.pool.ObjectPool}. """ if (log.isDebugEnabled()) log.debug("createPool was call...
java
public ObjectPool createConnectionPool(JdbcConnectionDescriptor jcd) { if (log.isDebugEnabled()) log.debug("createPool was called"); PoolableObjectFactory pof = new ConPoolFactory(this, jcd); GenericObjectPool.Config conf = jcd.getConnectionPoolDescriptor().getObjectPoolConfig(); ...
[ "public", "ObjectPool", "createConnectionPool", "(", "JdbcConnectionDescriptor", "jcd", ")", "{", "if", "(", "log", ".", "isDebugEnabled", "(", ")", ")", "log", ".", "debug", "(", "\"createPool was called\"", ")", ";", "PoolableObjectFactory", "pof", "=", "new", ...
Create the pool for pooling the connections of the given connection descriptor. Override this method to implement your on {@link org.apache.commons.pool.ObjectPool}.
[ "Create", "the", "pool", "for", "pooling", "the", "connections", "of", "the", "given", "connection", "descriptor", ".", "Override", "this", "method", "to", "implement", "your", "on", "{" ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/accesslayer/ConnectionFactoryPooledImpl.java#L130-L136
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/locale/message/BundleStringJsonifier.java
BundleStringJsonifier.addValuedKey
private void addValuedKey(final StringBuffer sb, String key, String fullKey) { """ Add a key and its value to the object literal. @param sb @param key @param fullKey """ sb.append(getJsonKey(key)).append(":").append(FUNC) .append(JavascriptStringUtil.quote(bundleValues.get(fullKey).toString())); }
java
private void addValuedKey(final StringBuffer sb, String key, String fullKey) { sb.append(getJsonKey(key)).append(":").append(FUNC) .append(JavascriptStringUtil.quote(bundleValues.get(fullKey).toString())); }
[ "private", "void", "addValuedKey", "(", "final", "StringBuffer", "sb", ",", "String", "key", ",", "String", "fullKey", ")", "{", "sb", ".", "append", "(", "getJsonKey", "(", "key", ")", ")", ".", "append", "(", "\":\"", ")", ".", "append", "(", "FUNC",...
Add a key and its value to the object literal. @param sb @param key @param fullKey
[ "Add", "a", "key", "and", "its", "value", "to", "the", "object", "literal", "." ]
train
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/locale/message/BundleStringJsonifier.java#L179-L183
wildfly/wildfly-core
controller/src/main/java/org/jboss/as/controller/persistence/ConfigurationFile.java
ConfigurationFile.deleteRecursive
private void deleteRecursive(final File file) { """ note, this just logs an error and doesn't throw as its only used to remove old configuration files, and shouldn't stop boot """ if (file.isDirectory()) { final String[] files = file.list(); if (files != null) { ...
java
private void deleteRecursive(final File file) { if (file.isDirectory()) { final String[] files = file.list(); if (files != null) { for (String name : files) { deleteRecursive(new File(file, name)); } } } if ...
[ "private", "void", "deleteRecursive", "(", "final", "File", "file", ")", "{", "if", "(", "file", ".", "isDirectory", "(", ")", ")", "{", "final", "String", "[", "]", "files", "=", "file", ".", "list", "(", ")", ";", "if", "(", "files", "!=", "null"...
note, this just logs an error and doesn't throw as its only used to remove old configuration files, and shouldn't stop boot
[ "note", "this", "just", "logs", "an", "error", "and", "doesn", "t", "throw", "as", "its", "only", "used", "to", "remove", "old", "configuration", "files", "and", "shouldn", "t", "stop", "boot" ]
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/persistence/ConfigurationFile.java#L714-L727
RuedigerMoeller/kontraktor
modules/reactive-streams/src/main/java/org/nustaq/kontraktor/reactivestreams/KxReactiveStreams.java
KxReactiveStreams.newAsyncProcessor
public <IN, OUT> Processor<IN, OUT> newAsyncProcessor(Function<IN, OUT> processingFunction) { """ create async processor. Usually not called directly (see EventSink+RxPublisher) @param processingFunction @param <IN> @param <OUT> @return """ return newAsyncProcessor(processingFunction, scheduler, ...
java
public <IN, OUT> Processor<IN, OUT> newAsyncProcessor(Function<IN, OUT> processingFunction) { return newAsyncProcessor(processingFunction, scheduler, batchSize); }
[ "public", "<", "IN", ",", "OUT", ">", "Processor", "<", "IN", ",", "OUT", ">", "newAsyncProcessor", "(", "Function", "<", "IN", ",", "OUT", ">", "processingFunction", ")", "{", "return", "newAsyncProcessor", "(", "processingFunction", ",", "scheduler", ",", ...
create async processor. Usually not called directly (see EventSink+RxPublisher) @param processingFunction @param <IN> @param <OUT> @return
[ "create", "async", "processor", ".", "Usually", "not", "called", "directly", "(", "see", "EventSink", "+", "RxPublisher", ")" ]
train
https://github.com/RuedigerMoeller/kontraktor/blob/d5f3817f9476f3786187b8ef00400b7a4f25a404/modules/reactive-streams/src/main/java/org/nustaq/kontraktor/reactivestreams/KxReactiveStreams.java#L344-L346
realtime-framework/RealtimeStorage-Android
library/src/main/java/co/realtime/storage/TableRef.java
TableRef.getItems
public TableRef getItems(final OnItemSnapshot onItemSnapshot, final OnError onError) { """ Get the items of this tableRef. <pre> StorageRef storage = new StorageRef("your_app_key", "your_token"); TableRef tableRef = storage.table("your_table"); tableRef.getItems(new OnItemSnapshot() { &#064;Override pu...
java
public TableRef getItems(final OnItemSnapshot onItemSnapshot, final OnError onError){ TableMetadata tm = context.getTableMeta(this.name); if(tm == null){ this.meta(new OnTableMetadata(){ @Override public void run(TableMetadata tableMetadata) { _getItems(onItemSnapshot, onError); } }, onEr...
[ "public", "TableRef", "getItems", "(", "final", "OnItemSnapshot", "onItemSnapshot", ",", "final", "OnError", "onError", ")", "{", "TableMetadata", "tm", "=", "context", ".", "getTableMeta", "(", "this", ".", "name", ")", ";", "if", "(", "tm", "==", "null", ...
Get the items of this tableRef. <pre> StorageRef storage = new StorageRef("your_app_key", "your_token"); TableRef tableRef = storage.table("your_table"); tableRef.getItems(new OnItemSnapshot() { &#064;Override public void run(ItemSnapshot itemSnapshot) { if (itemSnapshot != null) { Log.d("TableRef", "Item retrieved:...
[ "Get", "the", "items", "of", "this", "tableRef", "." ]
train
https://github.com/realtime-framework/RealtimeStorage-Android/blob/05816a6b7a6dcc83f9e7400ac3048494dadca302/library/src/main/java/co/realtime/storage/TableRef.java#L1104-L1117
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/field/BaseField.java
BaseField.convertIndexToField
public int convertIndexToField(int index, boolean bDisplayOption, int iMoveMode) { """ Convert the display's index to the field value and move to field. @param index The index to convert an set this field to. @param bDisplayOption If true, display the change in the converters. @param iMoveMove The type of move....
java
public int convertIndexToField(int index, boolean bDisplayOption, int iMoveMode) { String tempString = this.convertIndexToString(index); return this.setString(tempString, bDisplayOption, iMoveMode); // Move value to this field }
[ "public", "int", "convertIndexToField", "(", "int", "index", ",", "boolean", "bDisplayOption", ",", "int", "iMoveMode", ")", "{", "String", "tempString", "=", "this", ".", "convertIndexToString", "(", "index", ")", ";", "return", "this", ".", "setString", "(",...
Convert the display's index to the field value and move to field. @param index The index to convert an set this field to. @param bDisplayOption If true, display the change in the converters. @param iMoveMove The type of move.
[ "Convert", "the", "display", "s", "index", "to", "the", "field", "value", "and", "move", "to", "field", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/BaseField.java#L378-L382
ReactiveX/RxJavaAsyncUtil
src/main/java/rx/util/async/Async.java
Async.toAsyncThrowing
public static <R> FuncN<Observable<R>> toAsyncThrowing(final ThrowingFuncN<? extends R> func, final Scheduler scheduler) { """ Convert a synchronous function call into an asynchronous function call through an Observable. <p> <img width="640" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/t...
java
public static <R> FuncN<Observable<R>> toAsyncThrowing(final ThrowingFuncN<? extends R> func, final Scheduler scheduler) { return new FuncN<Observable<R>>() { @Override public Observable<R> call(Object... args) { return startCallable(ThrowingFunctions.toCallable(func, arg...
[ "public", "static", "<", "R", ">", "FuncN", "<", "Observable", "<", "R", ">", ">", "toAsyncThrowing", "(", "final", "ThrowingFuncN", "<", "?", "extends", "R", ">", "func", ",", "final", "Scheduler", "scheduler", ")", "{", "return", "new", "FuncN", "<", ...
Convert a synchronous function call into an asynchronous function call through an Observable. <p> <img width="640" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/toAsync.s.png" alt=""> @param <R> the result type @param func the function to convert @param scheduler the Scheduler used to call the ...
[ "Convert", "a", "synchronous", "function", "call", "into", "an", "asynchronous", "function", "call", "through", "an", "Observable", ".", "<p", ">", "<img", "width", "=", "640", "src", "=", "https", ":", "//", "raw", ".", "github", ".", "com", "/", "wiki"...
train
https://github.com/ReactiveX/RxJavaAsyncUtil/blob/6294e1da30e639df79f76399906229314c14e74d/src/main/java/rx/util/async/Async.java#L1679-L1686
elki-project/elki
elki-logging/src/main/java/de/lmu/ifi/dbs/elki/logging/LoggingConfiguration.java
LoggingConfiguration.privateReconfigureLogging
private void privateReconfigureLogging(String pkg, final String name) { """ Reconfigure logging. @param pkg Package name the configuration file comes from @param name File name. """ LogManager logManager = LogManager.getLogManager(); Logger logger = Logger.getLogger(LoggingConfiguration.class.getNa...
java
private void privateReconfigureLogging(String pkg, final String name) { LogManager logManager = LogManager.getLogManager(); Logger logger = Logger.getLogger(LoggingConfiguration.class.getName()); // allow null as package name. if(pkg == null) { pkg = ""; } // Load logging configuration fro...
[ "private", "void", "privateReconfigureLogging", "(", "String", "pkg", ",", "final", "String", "name", ")", "{", "LogManager", "logManager", "=", "LogManager", ".", "getLogManager", "(", ")", ";", "Logger", "logger", "=", "Logger", ".", "getLogger", "(", "Loggi...
Reconfigure logging. @param pkg Package name the configuration file comes from @param name File name.
[ "Reconfigure", "logging", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-logging/src/main/java/de/lmu/ifi/dbs/elki/logging/LoggingConfiguration.java#L107-L141
google/error-prone-javac
src/jdk.compiler/share/classes/com/sun/source/util/SimpleDocTreeVisitor.java
SimpleDocTreeVisitor.visitText
@Override public R visitText(TextTree node, P p) { """ {@inheritDoc} This implementation calls {@code defaultAction}. @param node {@inheritDoc} @param p {@inheritDoc} @return the result of {@code defaultAction} """ return defaultAction(node, p); }
java
@Override public R visitText(TextTree node, P p) { return defaultAction(node, p); }
[ "@", "Override", "public", "R", "visitText", "(", "TextTree", "node", ",", "P", "p", ")", "{", "return", "defaultAction", "(", "node", ",", "p", ")", ";", "}" ]
{@inheritDoc} This implementation calls {@code defaultAction}. @param node {@inheritDoc} @param p {@inheritDoc} @return the result of {@code defaultAction}
[ "{", "@inheritDoc", "}", "This", "implementation", "calls", "{", "@code", "defaultAction", "}", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.compiler/share/classes/com/sun/source/util/SimpleDocTreeVisitor.java#L405-L408
gallandarakhneorg/afc
core/maths/mathphysics/src/main/java/org/arakhne/afc/math/physics/MeasureUnitUtil.java
MeasureUnitUtil.toMeters
@Pure @SuppressWarnings("checkstyle:returncount") public static double toMeters(double value, SpaceUnit inputUnit) { """ Convert the given value expressed in the given unit to meters. @param value is the value to convert @param inputUnit is the unit of the {@code value} @return the result of the convertion....
java
@Pure @SuppressWarnings("checkstyle:returncount") public static double toMeters(double value, SpaceUnit inputUnit) { switch (inputUnit) { case TERAMETER: return value * 1e12; case GIGAMETER: return value * 1e9; case MEGAMETER: return value * 1e6; case KILOMETER: return value * 1e3; case HECTOM...
[ "@", "Pure", "@", "SuppressWarnings", "(", "\"checkstyle:returncount\"", ")", "public", "static", "double", "toMeters", "(", "double", "value", ",", "SpaceUnit", "inputUnit", ")", "{", "switch", "(", "inputUnit", ")", "{", "case", "TERAMETER", ":", "return", "...
Convert the given value expressed in the given unit to meters. @param value is the value to convert @param inputUnit is the unit of the {@code value} @return the result of the convertion.
[ "Convert", "the", "given", "value", "expressed", "in", "the", "given", "unit", "to", "meters", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathphysics/src/main/java/org/arakhne/afc/math/physics/MeasureUnitUtil.java#L422-L458
fabric8io/fabric8-forge
addons/utils/src/main/java/io/fabric8/forge/addon/utils/MavenHelpers.java
MavenHelpers.getConfigurationElement
public static ConfigurationElement getConfigurationElement(ConfigurationElement element, String... names) { """ Returns the plugin configuration element for the given set of element names """ ConfigurationElement e = element; for (String name : names) { if (e == null) { ...
java
public static ConfigurationElement getConfigurationElement(ConfigurationElement element, String... names) { ConfigurationElement e = element; for (String name : names) { if (e == null) { break; } e = findChildByName(e, name); } return e...
[ "public", "static", "ConfigurationElement", "getConfigurationElement", "(", "ConfigurationElement", "element", ",", "String", "...", "names", ")", "{", "ConfigurationElement", "e", "=", "element", ";", "for", "(", "String", "name", ":", "names", ")", "{", "if", ...
Returns the plugin configuration element for the given set of element names
[ "Returns", "the", "plugin", "configuration", "element", "for", "the", "given", "set", "of", "element", "names" ]
train
https://github.com/fabric8io/fabric8-forge/blob/a59871bae4d5c5d3ece10f1e8758e73663087f19/addons/utils/src/main/java/io/fabric8/forge/addon/utils/MavenHelpers.java#L298-L307
OpenLiberty/open-liberty
dev/com.ibm.ws.webcontainer.security/src/com/ibm/ws/webcontainer/security/internal/SSOAuthenticator.java
SSOAuthenticator.handleJwtSSO
private AuthenticationResult handleJwtSSO(HttpServletRequest req, HttpServletResponse res) { """ If there is no jwtSSOToken, we will return null. Otherwise, we will AuthenticationResult. @param cookies @return """ String jwtCookieName = JwtSSOTokenHelper.getJwtCookieName(); if (jwtCookieNam...
java
private AuthenticationResult handleJwtSSO(HttpServletRequest req, HttpServletResponse res) { String jwtCookieName = JwtSSOTokenHelper.getJwtCookieName(); if (jwtCookieName == null) { // jwtsso feature not active return null; } String encodedjwtssotoken = ssoCookieHelper.getJ...
[ "private", "AuthenticationResult", "handleJwtSSO", "(", "HttpServletRequest", "req", ",", "HttpServletResponse", "res", ")", "{", "String", "jwtCookieName", "=", "JwtSSOTokenHelper", ".", "getJwtCookieName", "(", ")", ";", "if", "(", "jwtCookieName", "==", "null", "...
If there is no jwtSSOToken, we will return null. Otherwise, we will AuthenticationResult. @param cookies @return
[ "If", "there", "is", "no", "jwtSSOToken", "we", "will", "return", "null", ".", "Otherwise", "we", "will", "AuthenticationResult", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.webcontainer.security/src/com/ibm/ws/webcontainer/security/internal/SSOAuthenticator.java#L168-L193
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/datetime/DateTimeFormatterCache.java
DateTimeFormatterCache.getDateTimeFormatterSmart
@Nonnull public static DateTimeFormatter getDateTimeFormatterSmart (@Nonnull @Nonempty final String sPattern) { """ Get the cached DateTimeFormatter using SMART resolving. @param sPattern The pattern to retrieve. May neither be <code>null</code> nor empty. @return The compiled DateTimeFormatter and never <c...
java
@Nonnull public static DateTimeFormatter getDateTimeFormatterSmart (@Nonnull @Nonempty final String sPattern) { return getDateTimeFormatter (sPattern, ResolverStyle.SMART); }
[ "@", "Nonnull", "public", "static", "DateTimeFormatter", "getDateTimeFormatterSmart", "(", "@", "Nonnull", "@", "Nonempty", "final", "String", "sPattern", ")", "{", "return", "getDateTimeFormatter", "(", "sPattern", ",", "ResolverStyle", ".", "SMART", ")", ";", "}...
Get the cached DateTimeFormatter using SMART resolving. @param sPattern The pattern to retrieve. May neither be <code>null</code> nor empty. @return The compiled DateTimeFormatter and never <code>null</code> . @throws IllegalArgumentException If the pattern is invalid
[ "Get", "the", "cached", "DateTimeFormatter", "using", "SMART", "resolving", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/datetime/DateTimeFormatterCache.java#L91-L95
nlalevee/jsourcemap
jsourcemap/src/java/org/hibnet/jsourcemap/IndexedSourceMapConsumer.java
IndexedSourceMapConsumer.sourceContentFor
@Override String sourceContentFor(String aSource, Boolean nullOnMissing) { """ Returns the original source content. The only argument is the url of the original source file. Returns null if no original source content is available. """ for (int i = 0; i < this._sections.size(); i++) { P...
java
@Override String sourceContentFor(String aSource, Boolean nullOnMissing) { for (int i = 0; i < this._sections.size(); i++) { ParsedSection section = this._sections.get(i); String content = section.consumer.sourceContentFor(aSource, true); if (content != null) { ...
[ "@", "Override", "String", "sourceContentFor", "(", "String", "aSource", ",", "Boolean", "nullOnMissing", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "this", ".", "_sections", ".", "size", "(", ")", ";", "i", "++", ")", "{", "ParsedSec...
Returns the original source content. The only argument is the url of the original source file. Returns null if no original source content is available.
[ "Returns", "the", "original", "source", "content", ".", "The", "only", "argument", "is", "the", "url", "of", "the", "original", "source", "file", ".", "Returns", "null", "if", "no", "original", "source", "content", "is", "available", "." ]
train
https://github.com/nlalevee/jsourcemap/blob/361a99c73d51c11afa5579dd83d477c4d0345599/jsourcemap/src/java/org/hibnet/jsourcemap/IndexedSourceMapConsumer.java#L193-L207
jenkinsci/java-client-api
jenkins-client/src/main/java/com/offbytwo/jenkins/JenkinsServer.java
JenkinsServer.updateJob
public JenkinsServer updateJob(FolderJob folder, String jobName, String jobXml, boolean crumbFlag) throws IOException { """ Update the xml description of an existing job @param folder the folder. @param jobName the name of the job. @param jobXml the job xml configuration. @param crumbFlag true/fa...
java
public JenkinsServer updateJob(FolderJob folder, String jobName, String jobXml, boolean crumbFlag) throws IOException { client.post_xml(UrlUtils.toJobBaseUrl(folder, jobName) + "/config.xml", jobXml, crumbFlag); return this; }
[ "public", "JenkinsServer", "updateJob", "(", "FolderJob", "folder", ",", "String", "jobName", ",", "String", "jobXml", ",", "boolean", "crumbFlag", ")", "throws", "IOException", "{", "client", ".", "post_xml", "(", "UrlUtils", ".", "toJobBaseUrl", "(", "folder",...
Update the xml description of an existing job @param folder the folder. @param jobName the name of the job. @param jobXml the job xml configuration. @param crumbFlag true/false. @throws IOException in case of an error.
[ "Update", "the", "xml", "description", "of", "an", "existing", "job" ]
train
https://github.com/jenkinsci/java-client-api/blob/c4f5953d3d4dda92cd946ad3bf2b811524c32da9/jenkins-client/src/main/java/com/offbytwo/jenkins/JenkinsServer.java#L633-L637
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nsweblogparam.java
nsweblogparam.get
public static nsweblogparam get(nitro_service service, options option) throws Exception { """ Use this API to fetch all the nsweblogparam resources that are configured on netscaler. """ nsweblogparam obj = new nsweblogparam(); nsweblogparam[] response = (nsweblogparam[])obj.get_resources(service,option); ...
java
public static nsweblogparam get(nitro_service service, options option) throws Exception{ nsweblogparam obj = new nsweblogparam(); nsweblogparam[] response = (nsweblogparam[])obj.get_resources(service,option); return response[0]; }
[ "public", "static", "nsweblogparam", "get", "(", "nitro_service", "service", ",", "options", "option", ")", "throws", "Exception", "{", "nsweblogparam", "obj", "=", "new", "nsweblogparam", "(", ")", ";", "nsweblogparam", "[", "]", "response", "=", "(", "nswebl...
Use this API to fetch all the nsweblogparam resources that are configured on netscaler.
[ "Use", "this", "API", "to", "fetch", "all", "the", "nsweblogparam", "resources", "that", "are", "configured", "on", "netscaler", "." ]
train
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nsweblogparam.java#L170-L174
jboss/jboss-el-api_spec
src/main/java/javax/el/BeanNameELResolver.java
BeanNameELResolver.getValue
@Override public Object getValue(ELContext context, Object base, Object property) { """ If the base object is <code>null</code> and the property is a name that is resolvable by the BeanNameResolver, returns the value resolved by the BeanNameResolver. <p>If name is resolved by the BeanNameResolver, the <c...
java
@Override public Object getValue(ELContext context, Object base, Object property) { if (context == null) { throw new NullPointerException(); } if (base == null && property instanceof String) { if (beanNameResolver.isNameResolved((String) property)) { c...
[ "@", "Override", "public", "Object", "getValue", "(", "ELContext", "context", ",", "Object", "base", ",", "Object", "property", ")", "{", "if", "(", "context", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", ")", ";", "}", "if", "(",...
If the base object is <code>null</code> and the property is a name that is resolvable by the BeanNameResolver, returns the value resolved by the BeanNameResolver. <p>If name is resolved by the BeanNameResolver, the <code>propertyResolved</code> property of the <code>ELContext</code> object must be set to <code>true</c...
[ "If", "the", "base", "object", "is", "<code", ">", "null<", "/", "code", ">", "and", "the", "property", "is", "a", "name", "that", "is", "resolvable", "by", "the", "BeanNameResolver", "returns", "the", "value", "resolved", "by", "the", "BeanNameResolver", ...
train
https://github.com/jboss/jboss-el-api_spec/blob/4cef117cae3ccf9f76439845687a8d219ad2eb43/src/main/java/javax/el/BeanNameELResolver.java#L100-L112
bsblabs/embed-for-vaadin
com.bsb.common.vaadin.embed/src/main/java/com/bsb/common/vaadin/embed/util/BrowserUtils.java
BrowserUtils.openBrowser
public static void openBrowser(String url) { """ Opens the specified <tt>url</tt> in the default browser. @param url the url to open """ logger.debug("Launching browser at [" + url + "]"); try { if (!openBrowserJava6(url)) { final String[] command = getOpenBrowse...
java
public static void openBrowser(String url) { logger.debug("Launching browser at [" + url + "]"); try { if (!openBrowserJava6(url)) { final String[] command = getOpenBrowserCommand(url); if (logger.isTraceEnabled()) { logger.trace("Using c...
[ "public", "static", "void", "openBrowser", "(", "String", "url", ")", "{", "logger", ".", "debug", "(", "\"Launching browser at [\"", "+", "url", "+", "\"]\"", ")", ";", "try", "{", "if", "(", "!", "openBrowserJava6", "(", "url", ")", ")", "{", "final", ...
Opens the specified <tt>url</tt> in the default browser. @param url the url to open
[ "Opens", "the", "specified", "<tt", ">", "url<", "/", "tt", ">", "in", "the", "default", "browser", "." ]
train
https://github.com/bsblabs/embed-for-vaadin/blob/f902e70def56ab54d287d2600f9c6eef9e66c225/com.bsb.common.vaadin.embed/src/main/java/com/bsb/common/vaadin/embed/util/BrowserUtils.java#L68-L83
vnesek/nmote-iim4j
src/main/java/com/nmote/iim4j/stream/SubIIMInputStream.java
SubIIMInputStream.setOffsetAndLength
protected void setOffsetAndLength(long offset, int length) throws IOException { """ This should be called from a subclass constructor, if offset or length are unknown at a time when SubIIMInputStream constructor is called. This method shouldn't be called more than once. @param offset byte offset @param leng...
java
protected void setOffsetAndLength(long offset, int length) throws IOException { this.offset = offset; this.length = length; this.position = 0; if (subStream.position() != offset) { subStream.seek(offset); } }
[ "protected", "void", "setOffsetAndLength", "(", "long", "offset", ",", "int", "length", ")", "throws", "IOException", "{", "this", ".", "offset", "=", "offset", ";", "this", ".", "length", "=", "length", ";", "this", ".", "position", "=", "0", ";", "if",...
This should be called from a subclass constructor, if offset or length are unknown at a time when SubIIMInputStream constructor is called. This method shouldn't be called more than once. @param offset byte offset @param length byte length @throws IOException if underlying stream can't be read
[ "This", "should", "be", "called", "from", "a", "subclass", "constructor", "if", "offset", "or", "length", "are", "unknown", "at", "a", "time", "when", "SubIIMInputStream", "constructor", "is", "called", ".", "This", "method", "shouldn", "t", "be", "called", ...
train
https://github.com/vnesek/nmote-iim4j/blob/ec55b02fc644cd722e93051ac0bdb96b00cb42a8/src/main/java/com/nmote/iim4j/stream/SubIIMInputStream.java#L64-L72
lessthanoptimal/ejml
main/ejml-ddense/src/org/ejml/dense/row/SingularOps_DDRM.java
SingularOps_DDRM.nullspaceQR
public static DMatrixRMaj nullspaceQR( DMatrixRMaj A , int totalSingular ) { """ Computes the null space using QR decomposition. This is much faster than using SVD @param A (Input) Matrix @param totalSingular Number of singular values @return Null space """ SolveNullSpaceQR_DDRM solver = new SolveNu...
java
public static DMatrixRMaj nullspaceQR( DMatrixRMaj A , int totalSingular ) { SolveNullSpaceQR_DDRM solver = new SolveNullSpaceQR_DDRM(); DMatrixRMaj nullspace = new DMatrixRMaj(1,1); if( !solver.process(A,totalSingular,nullspace)) throw new RuntimeException("Solver failed. try SVD ...
[ "public", "static", "DMatrixRMaj", "nullspaceQR", "(", "DMatrixRMaj", "A", ",", "int", "totalSingular", ")", "{", "SolveNullSpaceQR_DDRM", "solver", "=", "new", "SolveNullSpaceQR_DDRM", "(", ")", ";", "DMatrixRMaj", "nullspace", "=", "new", "DMatrixRMaj", "(", "1"...
Computes the null space using QR decomposition. This is much faster than using SVD @param A (Input) Matrix @param totalSingular Number of singular values @return Null space
[ "Computes", "the", "null", "space", "using", "QR", "decomposition", ".", "This", "is", "much", "faster", "than", "using", "SVD" ]
train
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-ddense/src/org/ejml/dense/row/SingularOps_DDRM.java#L434-L443
att/AAF
cadi/core/src/main/java/com/att/cadi/Hash.java
Hash.isEqual
public static boolean isEqual(byte ba1[], byte ba2[]) { """ Compare two byte arrays for equivalency @param ba1 @param ba2 @return """ if(ba1.length!=ba2.length)return false; for(int i = 0;i<ba1.length; ++i) { if(ba1[i]!=ba2[i])return false; } return true; }
java
public static boolean isEqual(byte ba1[], byte ba2[]) { if(ba1.length!=ba2.length)return false; for(int i = 0;i<ba1.length; ++i) { if(ba1[i]!=ba2[i])return false; } return true; }
[ "public", "static", "boolean", "isEqual", "(", "byte", "ba1", "[", "]", ",", "byte", "ba2", "[", "]", ")", "{", "if", "(", "ba1", ".", "length", "!=", "ba2", ".", "length", ")", "return", "false", ";", "for", "(", "int", "i", "=", "0", ";", "i"...
Compare two byte arrays for equivalency @param ba1 @param ba2 @return
[ "Compare", "two", "byte", "arrays", "for", "equivalency" ]
train
https://github.com/att/AAF/blob/090562e956c0035db972aafba844dc6d3fc948ee/cadi/core/src/main/java/com/att/cadi/Hash.java#L124-L130
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/field/event/ChangedByHandler.java
ChangedByHandler.init
public void init(BaseField field, String iMainFilesField) { """ Constructor. @param field The basefield owner of this listener (usually null and set on setOwner()). param iMainFilesField The field sequence of the "changed by" field in this field's record. """ super.init(field); m_iMainFilesFi...
java
public void init(BaseField field, String iMainFilesField) { super.init(field); m_iMainFilesFieldSeq = iMainFilesField; m_bReadMove = false; // Don't move on read! }
[ "public", "void", "init", "(", "BaseField", "field", ",", "String", "iMainFilesField", ")", "{", "super", ".", "init", "(", "field", ")", ";", "m_iMainFilesFieldSeq", "=", "iMainFilesField", ";", "m_bReadMove", "=", "false", ";", "// Don't move on read!", "}" ]
Constructor. @param field The basefield owner of this listener (usually null and set on setOwner()). param iMainFilesField The field sequence of the "changed by" field in this field's record.
[ "Constructor", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/event/ChangedByHandler.java#L53-L58
apache/groovy
src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java
DefaultGroovyMethods.getAt
@SuppressWarnings("unchecked") public static List<Integer> getAt(int[] array, Range range) { """ Support the subscript operator with a range for an int array @param array an int array @param range a range indicating the indices for the items to retrieve @return list of the ints at the given indices @sinc...
java
@SuppressWarnings("unchecked") public static List<Integer> getAt(int[] array, Range range) { return primitiveArrayGet(array, range); }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "List", "<", "Integer", ">", "getAt", "(", "int", "[", "]", "array", ",", "Range", "range", ")", "{", "return", "primitiveArrayGet", "(", "array", ",", "range", ")", ";", "}" ]
Support the subscript operator with a range for an int array @param array an int array @param range a range indicating the indices for the items to retrieve @return list of the ints at the given indices @since 1.0
[ "Support", "the", "subscript", "operator", "with", "a", "range", "for", "an", "int", "array" ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java#L13649-L13652
micronaut-projects/micronaut-core
core/src/main/java/io/micronaut/core/reflect/ReflectionUtils.java
ReflectionUtils.getMethod
public static Optional<Method> getMethod(Class type, String methodName, Class... argTypes) { """ Obtains a method. @param type The type @param methodName The method name @param argTypes The argument types @return An optional {@link Method} """ try { return Optional.of(type.get...
java
public static Optional<Method> getMethod(Class type, String methodName, Class... argTypes) { try { return Optional.of(type.getMethod(methodName, argTypes)); } catch (NoSuchMethodException e) { return findMethod(type, methodName, argTypes); } }
[ "public", "static", "Optional", "<", "Method", ">", "getMethod", "(", "Class", "type", ",", "String", "methodName", ",", "Class", "...", "argTypes", ")", "{", "try", "{", "return", "Optional", ".", "of", "(", "type", ".", "getMethod", "(", "methodName", ...
Obtains a method. @param type The type @param methodName The method name @param argTypes The argument types @return An optional {@link Method}
[ "Obtains", "a", "method", "." ]
train
https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/core/src/main/java/io/micronaut/core/reflect/ReflectionUtils.java#L162-L168
ggrandes/kvstore
src/main/java/org/javastack/kvstore/structures/btree/BplusTree.java
BplusTree.higherEntry
public synchronized TreeEntry<K, V> higherEntry(final K key) { """ Returns the least key strictly greater than the given key, or null if there is no such key. @param key the key @return the Entry with least key strictly greater than the given key, or null if there is no such key. """ // Retorna la clave ...
java
public synchronized TreeEntry<K, V> higherEntry(final K key) { // Retorna la clave mas cercana mayor a la clave indicada return getRoundEntry(key, true, false); }
[ "public", "synchronized", "TreeEntry", "<", "K", ",", "V", ">", "higherEntry", "(", "final", "K", "key", ")", "{", "// Retorna la clave mas cercana mayor a la clave indicada", "return", "getRoundEntry", "(", "key", ",", "true", ",", "false", ")", ";", "}" ]
Returns the least key strictly greater than the given key, or null if there is no such key. @param key the key @return the Entry with least key strictly greater than the given key, or null if there is no such key.
[ "Returns", "the", "least", "key", "strictly", "greater", "than", "the", "given", "key", "or", "null", "if", "there", "is", "no", "such", "key", "." ]
train
https://github.com/ggrandes/kvstore/blob/c79277f79f4604e0fec8349a98519838e3de38f0/src/main/java/org/javastack/kvstore/structures/btree/BplusTree.java#L671-L674
sawano/java-commons
src/main/java/se/sawano/java/commons/lang/validate/AbstractValidate.java
AbstractValidate.notEmpty
public <T extends Collection<?>> T notEmpty(final T collection, final String message, final Object... values) { """ <p>Validate that the specified argument collection is neither {@code null} nor a size of zero (no elements); otherwise throwing an exception with the specified message. </p> <pre>Validate.notEmpty(m...
java
public <T extends Collection<?>> T notEmpty(final T collection, final String message, final Object... values) { if (collection == null) { failNull(String.format(message, values)); } if (collection.isEmpty()) { fail(String.format(message, values)); } return...
[ "public", "<", "T", "extends", "Collection", "<", "?", ">", ">", "T", "notEmpty", "(", "final", "T", "collection", ",", "final", "String", "message", ",", "final", "Object", "...", "values", ")", "{", "if", "(", "collection", "==", "null", ")", "{", ...
<p>Validate that the specified argument collection is neither {@code null} nor a size of zero (no elements); otherwise throwing an exception with the specified message. </p> <pre>Validate.notEmpty(myCollection, "The collection must not be empty");</pre> @param <T> the collection type @param collection the collection t...
[ "<p", ">", "Validate", "that", "the", "specified", "argument", "collection", "is", "neither", "{", "@code", "null", "}", "nor", "a", "size", "of", "zero", "(", "no", "elements", ")", ";", "otherwise", "throwing", "an", "exception", "with", "the", "specifie...
train
https://github.com/sawano/java-commons/blob/6f219c9e8dec4401dbe528d17ae6ec1ef9c0d284/src/main/java/se/sawano/java/commons/lang/validate/AbstractValidate.java#L607-L615
sarl/sarl
main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/codebuilder/fragments/AbstractSubCodeBuilderFragment.java
AbstractSubCodeBuilderFragment.findAssignmentFromFeatureName
protected static Assignment findAssignmentFromFeatureName(EObject rule, String name) { """ Replies the first assignement with the given name in the given rule. @param rule the rule. @param name the name. @return the assignment or <code>null</code>. """ return IterableExtensions.findFirst(GrammarUtil.con...
java
protected static Assignment findAssignmentFromFeatureName(EObject rule, String name) { return IterableExtensions.findFirst(GrammarUtil.containedAssignments(rule), assignment -> name.equals(assignment.getFeature())); }
[ "protected", "static", "Assignment", "findAssignmentFromFeatureName", "(", "EObject", "rule", ",", "String", "name", ")", "{", "return", "IterableExtensions", ".", "findFirst", "(", "GrammarUtil", ".", "containedAssignments", "(", "rule", ")", ",", "assignment", "->...
Replies the first assignement with the given name in the given rule. @param rule the rule. @param name the name. @return the assignment or <code>null</code>.
[ "Replies", "the", "first", "assignement", "with", "the", "given", "name", "in", "the", "given", "rule", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/codebuilder/fragments/AbstractSubCodeBuilderFragment.java#L683-L686
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/db/util/ResourceTable.java
ResourceTable.syncTables
public Record syncTables(BaseTable tblAlt, Record recMain) throws DBException { """ Read the mirrored record. @param tblTarget The table to read the same record from. @param recSource Source record @return The target table's record. """ Record recAlt = super.syncTables(tblAlt, recMain); // Read the...
java
public Record syncTables(BaseTable tblAlt, Record recMain) throws DBException { Record recAlt = super.syncTables(tblAlt, recMain); // Read the mirrored record if (recAlt.getEditMode() == Constants.EDIT_CURRENT) this.syncRecords(recAlt, recMain); return recAlt; }
[ "public", "Record", "syncTables", "(", "BaseTable", "tblAlt", ",", "Record", "recMain", ")", "throws", "DBException", "{", "Record", "recAlt", "=", "super", ".", "syncTables", "(", "tblAlt", ",", "recMain", ")", ";", "// Read the mirrored record", "if", "(", "...
Read the mirrored record. @param tblTarget The table to read the same record from. @param recSource Source record @return The target table's record.
[ "Read", "the", "mirrored", "record", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/util/ResourceTable.java#L129-L135
thorntail/wildfly-config-api
generator/src/main/java/org/wildfly/swarm/config/generator/generator/ConsumerFactory.java
ConsumerFactory.create
public JavaType create(ClassIndex index, ClassPlan plan) { """ Base template for a resource representation. Covers the resource attributes @param index @param plan @return """ // base class JavaInterfaceSource type = Roaster.parse( JavaInterfaceSource.class, ...
java
public JavaType create(ClassIndex index, ClassPlan plan) { // base class JavaInterfaceSource type = Roaster.parse( JavaInterfaceSource.class, "public interface " + plan.getClassName() + "Consumer<T extends " + plan.getClassName() + "<T>> {}" ); type.setP...
[ "public", "JavaType", "create", "(", "ClassIndex", "index", ",", "ClassPlan", "plan", ")", "{", "// base class", "JavaInterfaceSource", "type", "=", "Roaster", ".", "parse", "(", "JavaInterfaceSource", ".", "class", ",", "\"public interface \"", "+", "plan", ".", ...
Base template for a resource representation. Covers the resource attributes @param index @param plan @return
[ "Base", "template", "for", "a", "resource", "representation", ".", "Covers", "the", "resource", "attributes" ]
train
https://github.com/thorntail/wildfly-config-api/blob/ddb3f3bcb7b85b22c6371415546f567bc44493db/generator/src/main/java/org/wildfly/swarm/config/generator/generator/ConsumerFactory.java#L28-L45
OpenTSDB/opentsdb
src/core/TSDB.java
TSDB.addHistogramPoint
public Deferred<Object> addHistogramPoint(final String metric, final long timestamp, final byte[] raw_data, final Map<String, String> tags) { """ Adds an encoded Histogram data point ...
java
public Deferred<Object> addHistogramPoint(final String metric, final long timestamp, final byte[] raw_data, final Map<String, String> tags) { if (raw_data == null || raw_data.length < ...
[ "public", "Deferred", "<", "Object", ">", "addHistogramPoint", "(", "final", "String", "metric", ",", "final", "long", "timestamp", ",", "final", "byte", "[", "]", "raw_data", ",", "final", "Map", "<", "String", ",", "String", ">", "tags", ")", "{", "if"...
Adds an encoded Histogram data point in the TSDB. @param metric A non-empty string. @param timestamp The timestamp associated with the value. @param raw_data The encoded data blob of the Histogram point. @param tags The tags on this series. This map must be non-empty. @return A deferred object that indicates the compl...
[ "Adds", "an", "encoded", "Histogram", "data", "point", "in", "the", "TSDB", "." ]
train
https://github.com/OpenTSDB/opentsdb/blob/3fc2d491c3c1ad397252c0a80203a69a3f9e3ef3/src/core/TSDB.java#L1124-L1140
mgm-tp/jfunk
jfunk-data-generator/src/main/java/com/mgmtp/jfunk/data/generator/field/FieldFactory.java
FieldFactory.getClassObject
private Class<? extends Field> getClassObject(final Element element) { """ This method returns the class object from which a new instance shall be generated. To achieve this the class attribute of the passed element is taken to determine the class name. """ String className = element.getAttributeValue(XMLT...
java
private Class<? extends Field> getClassObject(final Element element) { String className = element.getAttributeValue(XMLTags.CLASS); Class<? extends Field> classObject = null; try { className = className.indexOf('.') > 0 ? className : getClass().getPackage().getName() + '.' + className; classObject = Cl...
[ "private", "Class", "<", "?", "extends", "Field", ">", "getClassObject", "(", "final", "Element", "element", ")", "{", "String", "className", "=", "element", ".", "getAttributeValue", "(", "XMLTags", ".", "CLASS", ")", ";", "Class", "<", "?", "extends", "F...
This method returns the class object from which a new instance shall be generated. To achieve this the class attribute of the passed element is taken to determine the class name.
[ "This", "method", "returns", "the", "class", "object", "from", "which", "a", "new", "instance", "shall", "be", "generated", ".", "To", "achieve", "this", "the", "class", "attribute", "of", "the", "passed", "element", "is", "taken", "to", "determine", "the", ...
train
https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-data-generator/src/main/java/com/mgmtp/jfunk/data/generator/field/FieldFactory.java#L80-L90
baratine/baratine
core/src/main/java/com/caucho/v5/loader/EnvLoader.java
EnvLoader.setAttribute
public static Object setAttribute(String name, Object value) { """ Sets a local variable for the current environment. @param name the attribute name @param value the new attribute value @return the old attribute value """ ClassLoader loader = Thread.currentThread().getContextClassLoader(); retu...
java
public static Object setAttribute(String name, Object value) { ClassLoader loader = Thread.currentThread().getContextClassLoader(); return setAttribute(name, value, loader); }
[ "public", "static", "Object", "setAttribute", "(", "String", "name", ",", "Object", "value", ")", "{", "ClassLoader", "loader", "=", "Thread", ".", "currentThread", "(", ")", ".", "getContextClassLoader", "(", ")", ";", "return", "setAttribute", "(", "name", ...
Sets a local variable for the current environment. @param name the attribute name @param value the new attribute value @return the old attribute value
[ "Sets", "a", "local", "variable", "for", "the", "current", "environment", "." ]
train
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/loader/EnvLoader.java#L636-L641
OpenLiberty/open-liberty
dev/com.ibm.ws.microprofile.faulttolerance.cdi/src/com/ibm/ws/microprofile/faulttolerance/cdi/config/MethodFinder.java
MethodFinder.getClass
private static Class<?> getClass(Type type) { """ Convert a {@link Type} to a {@link Class} <p> Class instances are cast, ParameterizedType instances return the result of {@link ParameterizedType#getRawType()} @param type the type to convert @return the class @throws RuntimeException if Type does not repres...
java
private static Class<?> getClass(Type type) { if (type instanceof Class) { return (Class<?>) type; } else if (type instanceof ParameterizedType) { return getClass(((ParameterizedType) type).getRawType()); } throw new RuntimeException("Could not convert " + type + ...
[ "private", "static", "Class", "<", "?", ">", "getClass", "(", "Type", "type", ")", "{", "if", "(", "type", "instanceof", "Class", ")", "{", "return", "(", "Class", "<", "?", ">", ")", "type", ";", "}", "else", "if", "(", "type", "instanceof", "Para...
Convert a {@link Type} to a {@link Class} <p> Class instances are cast, ParameterizedType instances return the result of {@link ParameterizedType#getRawType()} @param type the type to convert @return the class @throws RuntimeException if Type does not represent something that can be converted to a {@link Class}
[ "Convert", "a", "{", "@link", "Type", "}", "to", "a", "{", "@link", "Class", "}", "<p", ">", "Class", "instances", "are", "cast", "ParameterizedType", "instances", "return", "the", "result", "of", "{", "@link", "ParameterizedType#getRawType", "()", "}" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.microprofile.faulttolerance.cdi/src/com/ibm/ws/microprofile/faulttolerance/cdi/config/MethodFinder.java#L296-L303
zxing/zxing
android-integration/src/main/java/com/google/zxing/integration/android/IntentIntegrator.java
IntentIntegrator.shareText
public final AlertDialog shareText(CharSequence text, CharSequence type) { """ Shares the given text by encoding it as a barcode, such that another user can scan the text off the screen of the device. @param text the text string to encode as a barcode @param type type of data to encode. See {@code com.google....
java
public final AlertDialog shareText(CharSequence text, CharSequence type) { Intent intent = new Intent(); intent.addCategory(Intent.CATEGORY_DEFAULT); intent.setAction(BS_PACKAGE + ".ENCODE"); intent.putExtra("ENCODE_TYPE", type); intent.putExtra("ENCODE_DATA", text); String targetAppPackage = fi...
[ "public", "final", "AlertDialog", "shareText", "(", "CharSequence", "text", ",", "CharSequence", "type", ")", "{", "Intent", "intent", "=", "new", "Intent", "(", ")", ";", "intent", ".", "addCategory", "(", "Intent", ".", "CATEGORY_DEFAULT", ")", ";", "inten...
Shares the given text by encoding it as a barcode, such that another user can scan the text off the screen of the device. @param text the text string to encode as a barcode @param type type of data to encode. See {@code com.google.zxing.client.android.Contents.Type} constants. @return the {@link AlertDialog} that was ...
[ "Shares", "the", "given", "text", "by", "encoding", "it", "as", "a", "barcode", "such", "that", "another", "user", "can", "scan", "the", "text", "off", "the", "screen", "of", "the", "device", "." ]
train
https://github.com/zxing/zxing/blob/653ac2a3beb11481eff82e7d5f2bab8a745f7fac/android-integration/src/main/java/com/google/zxing/integration/android/IntentIntegrator.java#L461-L481
jayantk/jklol
src/com/jayantkrish/jklol/util/Assignment.java
Assignment.fromUnsortedArrays
public static final Assignment fromUnsortedArrays(int[] vars, Object[] values) { """ Creates an {@code Assignment} mapping each variable in {@code vars} to the value at the corresponding index of {@code values}. {@code vars} does not need to be sorted in any order. This method does not copy {@code vars} or {@co...
java
public static final Assignment fromUnsortedArrays(int[] vars, Object[] values) { ArrayUtils.sortKeyValuePairs(vars, new Object[][] {values}, 0, vars.length); return fromSortedArrays(vars, values); }
[ "public", "static", "final", "Assignment", "fromUnsortedArrays", "(", "int", "[", "]", "vars", ",", "Object", "[", "]", "values", ")", "{", "ArrayUtils", ".", "sortKeyValuePairs", "(", "vars", ",", "new", "Object", "[", "]", "[", "]", "{", "values", "}",...
Creates an {@code Assignment} mapping each variable in {@code vars} to the value at the corresponding index of {@code values}. {@code vars} does not need to be sorted in any order. This method does not copy {@code vars} or {@code values} and may modify either array; the caller should not read or modify either of these ...
[ "Creates", "an", "{", "@code", "Assignment", "}", "mapping", "each", "variable", "in", "{", "@code", "vars", "}", "to", "the", "value", "at", "the", "corresponding", "index", "of", "{", "@code", "values", "}", ".", "{", "@code", "vars", "}", "does", "n...
train
https://github.com/jayantk/jklol/blob/d27532ca83e212d51066cf28f52621acc3fd44cc/src/com/jayantkrish/jklol/util/Assignment.java#L55-L58
baratine/baratine
kraken/src/main/java/com/caucho/v5/kelp/PageServiceImpl.java
PageServiceImpl.getStream
@Direct @Override public void getStream(RowCursor cursor, Result<GetStreamResult> result) { """ For cluster calls, returns a stream to the new value if the value has changed. """ long version = cursor.getVersion(); PageLeafImpl leaf = getLeafByCursor(cursor); ...
java
@Direct @Override public void getStream(RowCursor cursor, Result<GetStreamResult> result) { long version = cursor.getVersion(); PageLeafImpl leaf = getLeafByCursor(cursor); if (leaf == null) { result.ok(new GetStreamResult(false, null)); return; } ...
[ "@", "Direct", "@", "Override", "public", "void", "getStream", "(", "RowCursor", "cursor", ",", "Result", "<", "GetStreamResult", ">", "result", ")", "{", "long", "version", "=", "cursor", ".", "getVersion", "(", ")", ";", "PageLeafImpl", "leaf", "=", "get...
For cluster calls, returns a stream to the new value if the value has changed.
[ "For", "cluster", "calls", "returns", "a", "stream", "to", "the", "new", "value", "if", "the", "value", "has", "changed", "." ]
train
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kelp/PageServiceImpl.java#L232-L261
gallandarakhneorg/afc
core/vmutils/src/main/java/org/arakhne/afc/vmutil/VMCommandLine.java
VMCommandLine.saveVMParameters
public static void saveVMParameters(String classToLaunch, String... parameters) { """ Save parameters that permit to relaunch a VM with {@link #relaunchVM()}. @param classToLaunch is the class which contains a <code>main</code>. @param parameters is the parameters to pass to the <code>main</code>. @since 6.2...
java
public static void saveVMParameters(String classToLaunch, String... parameters) { classnameToLaunch = classToLaunch; commandLineParameters = parameters; if (commandLineOptions != null) { commandLineOptions.clear(); } commandLineOptions = null; analyzed = false; }
[ "public", "static", "void", "saveVMParameters", "(", "String", "classToLaunch", ",", "String", "...", "parameters", ")", "{", "classnameToLaunch", "=", "classToLaunch", ";", "commandLineParameters", "=", "parameters", ";", "if", "(", "commandLineOptions", "!=", "nul...
Save parameters that permit to relaunch a VM with {@link #relaunchVM()}. @param classToLaunch is the class which contains a <code>main</code>. @param parameters is the parameters to pass to the <code>main</code>. @since 6.2
[ "Save", "parameters", "that", "permit", "to", "relaunch", "a", "VM", "with", "{", "@link", "#relaunchVM", "()", "}", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/vmutils/src/main/java/org/arakhne/afc/vmutil/VMCommandLine.java#L325-L333
ginere/ginere-base
src/main/java/eu/ginere/base/util/file/FileUtils.java
FileUtils.createPathAndGetFile
public static File createPathAndGetFile(File root, String relativePathToCreate) { """ Crea el directorio y devuelve el objeto File asociado, devuelve null si no se ha podido crear @param root @param relativePathToCreate @return """ File target = new File(root, relativePathToCreate); if (!target.exis...
java
public static File createPathAndGetFile(File root, String relativePathToCreate) { File target = new File(root, relativePathToCreate); if (!target.exists()) { if (target.mkdirs()){ return target; } else { log.warn("No se ha podido crear el directorio:'"+target.getAbsolutePath()+"'"); retur...
[ "public", "static", "File", "createPathAndGetFile", "(", "File", "root", ",", "String", "relativePathToCreate", ")", "{", "File", "target", "=", "new", "File", "(", "root", ",", "relativePathToCreate", ")", ";", "if", "(", "!", "target", ".", "exists", "(", ...
Crea el directorio y devuelve el objeto File asociado, devuelve null si no se ha podido crear @param root @param relativePathToCreate @return
[ "Crea", "el", "directorio", "y", "devuelve", "el", "objeto", "File", "asociado", "devuelve", "null", "si", "no", "se", "ha", "podido", "crear" ]
train
https://github.com/ginere/ginere-base/blob/b1cc1c5834bd8a31df475c6f3fc0ee51273c5a24/src/main/java/eu/ginere/base/util/file/FileUtils.java#L224-L237
knowm/XChange
xchange-okcoin/src/main/java/org/knowm/xchange/okcoin/service/OkCoinTradeServiceRaw.java
OkCoinTradeServiceRaw.batchTrade
public OkCoinMoreTradeResult batchTrade(String symbol, String type, String ordersData) throws IOException { """ 批量下单 @param symbol @param type 限价单(buy/sell) @param ordersData "[{price:3,amount:5,type:'sell'},{price:3,amount:3,type:'buy'}]" 最终买卖类型由orders_data 中type 为准,如orders_data不设定type 则由上面type设置为准。 若...
java
public OkCoinMoreTradeResult batchTrade(String symbol, String type, String ordersData) throws IOException { OkCoinMoreTradeResult tradeResult = okCoin.batchTrade(apikey, symbol, type, ordersData, signatureCreator()); return returnOrThrow(tradeResult); }
[ "public", "OkCoinMoreTradeResult", "batchTrade", "(", "String", "symbol", ",", "String", "type", ",", "String", "ordersData", ")", "throws", "IOException", "{", "OkCoinMoreTradeResult", "tradeResult", "=", "okCoin", ".", "batchTrade", "(", "apikey", ",", "symbol", ...
批量下单 @param symbol @param type 限价单(buy/sell) @param ordersData "[{price:3,amount:5,type:'sell'},{price:3,amount:3,type:'buy'}]" 最终买卖类型由orders_data 中type 为准,如orders_data不设定type 则由上面type设置为准。 若,上面type没有设置,orderData 必须设置type @return @throws IOException
[ "批量下单" ]
train
https://github.com/knowm/XChange/blob/e45f437ac8e0b89cd66cdcb3258bdb1bf3d88186/xchange-okcoin/src/main/java/org/knowm/xchange/okcoin/service/OkCoinTradeServiceRaw.java#L76-L81
beanshell/beanshell
src/main/java/bsh/Reflect.java
Reflect.getObjectFieldValue
public static Object getObjectFieldValue( Object object, String fieldName ) throws UtilEvalError, ReflectError { """ Check for a field with the given name in a java object or scripted object if the field exists fetch the value, if not check for a property value. If neither is found return Primitive.V...
java
public static Object getObjectFieldValue( Object object, String fieldName ) throws UtilEvalError, ReflectError { if ( object instanceof This ) { return ((This) object).namespace.getVariable( fieldName ); } else if( object == Primitive.NULL ) { throw new UtilTargetErro...
[ "public", "static", "Object", "getObjectFieldValue", "(", "Object", "object", ",", "String", "fieldName", ")", "throws", "UtilEvalError", ",", "ReflectError", "{", "if", "(", "object", "instanceof", "This", ")", "{", "return", "(", "(", "This", ")", "object", ...
Check for a field with the given name in a java object or scripted object if the field exists fetch the value, if not check for a property value. If neither is found return Primitive.VOID.
[ "Check", "for", "a", "field", "with", "the", "given", "name", "in", "a", "java", "object", "or", "scripted", "object", "if", "the", "field", "exists", "fetch", "the", "value", "if", "not", "check", "for", "a", "property", "value", ".", "If", "neither", ...
train
https://github.com/beanshell/beanshell/blob/fdddee3de948c9e6babb2d1337028f6fd0a2ba5c/src/main/java/bsh/Reflect.java#L139-L158
nohana/Amalgam
amalgam/src/main/java/com/amalgam/os/BundleUtils.java
BundleUtils.optSizeF
@Nullable @TargetApi(Build.VERSION_CODES.LOLLIPOP) public static SizeF optSizeF(@Nullable Bundle bundle, @Nullable String key) { """ Returns a optional {@link android.util.SizeF} value. In other words, returns the value mapped by key if it exists and is a {@link android.util.SizeF}. The bundle argument is...
java
@Nullable @TargetApi(Build.VERSION_CODES.LOLLIPOP) public static SizeF optSizeF(@Nullable Bundle bundle, @Nullable String key) { return optSizeF(bundle, key, null); }
[ "@", "Nullable", "@", "TargetApi", "(", "Build", ".", "VERSION_CODES", ".", "LOLLIPOP", ")", "public", "static", "SizeF", "optSizeF", "(", "@", "Nullable", "Bundle", "bundle", ",", "@", "Nullable", "String", "key", ")", "{", "return", "optSizeF", "(", "bun...
Returns a optional {@link android.util.SizeF} value. In other words, returns the value mapped by key if it exists and is a {@link android.util.SizeF}. The bundle argument is allowed to be {@code null}. If the bundle is null, this method returns null. @param bundle a bundle. If the bundle is null, this method will retur...
[ "Returns", "a", "optional", "{" ]
train
https://github.com/nohana/Amalgam/blob/57809ddbfe7897e979cf507982ce0b3aa5e0ed8a/amalgam/src/main/java/com/amalgam/os/BundleUtils.java#L903-L907
jenkinsci/jenkins
core/src/main/java/jenkins/model/Jenkins.java
Jenkins.doDefaultJDKCheck
public FormValidation doDefaultJDKCheck(StaplerRequest request, @QueryParameter String value) { """ If the user chose the default JDK, make sure we got 'java' in PATH. """ if(!JDK.isDefaultName(value)) // assume the user configured named ones properly in system config --- // or ...
java
public FormValidation doDefaultJDKCheck(StaplerRequest request, @QueryParameter String value) { if(!JDK.isDefaultName(value)) // assume the user configured named ones properly in system config --- // or else system config should have reported form field validation errors. ret...
[ "public", "FormValidation", "doDefaultJDKCheck", "(", "StaplerRequest", "request", ",", "@", "QueryParameter", "String", "value", ")", "{", "if", "(", "!", "JDK", ".", "isDefaultName", "(", "value", ")", ")", "// assume the user configured named ones properly in system ...
If the user chose the default JDK, make sure we got 'java' in PATH.
[ "If", "the", "user", "chose", "the", "default", "JDK", "make", "sure", "we", "got", "java", "in", "PATH", "." ]
train
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/jenkins/model/Jenkins.java#L4512-L4523
enioka/jqm
jqm-all/jqm-engine/src/main/java/com/enioka/jqm/tools/Helpers.java
Helpers.sendMessage
@SuppressWarnings( { """ Send a mail message using a JNDI resource.<br> As JNDI resource providers are inside the EXT class loader, this uses reflection. This method is basically a bonus on top of the MailSessionFactory offered to payloads, making it accessible also to the engine. @param to @param subject @...
java
@SuppressWarnings({ "unchecked", "rawtypes" }) static void sendMessage(String to, String subject, String body, String mailSessionJndiAlias) { jqmlogger.debug("sending mail to " + to + " - subject is " + subject); ClassLoader extLoader = getExtClassLoader(); extLoader = extLoader == null ...
[ "@", "SuppressWarnings", "(", "{", "\"unchecked\"", ",", "\"rawtypes\"", "}", ")", "static", "void", "sendMessage", "(", "String", "to", ",", "String", "subject", ",", "String", "body", ",", "String", "mailSessionJndiAlias", ")", "{", "jqmlogger", ".", "debug"...
Send a mail message using a JNDI resource.<br> As JNDI resource providers are inside the EXT class loader, this uses reflection. This method is basically a bonus on top of the MailSessionFactory offered to payloads, making it accessible also to the engine. @param to @param subject @param body @param mailSessionJndiAli...
[ "Send", "a", "mail", "message", "using", "a", "JNDI", "resource", ".", "<br", ">", "As", "JNDI", "resource", "providers", "are", "inside", "the", "EXT", "class", "loader", "this", "uses", "reflection", ".", "This", "method", "is", "basically", "a", "bonus"...
train
https://github.com/enioka/jqm/blob/391733b8e291404b97c714c3727a241c4a861f98/jqm-all/jqm-engine/src/main/java/com/enioka/jqm/tools/Helpers.java#L551-L594
elki-project/elki
elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/optics/DeLiClu.java
DeLiClu.expandDirNodes
private void expandDirNodes(SpatialPrimitiveDistanceFunction<V> distFunction, DeLiCluNode node1, DeLiCluNode node2) { """ Expands the specified directory nodes. @param distFunction the spatial distance function of this algorithm @param node1 the first node @param node2 the second node """ if(LOG.isDeb...
java
private void expandDirNodes(SpatialPrimitiveDistanceFunction<V> distFunction, DeLiCluNode node1, DeLiCluNode node2) { if(LOG.isDebuggingFinest()) { LOG.debugFinest("ExpandDirNodes: " + node1.getPageID() + " + " + node2.getPageID()); } int numEntries_1 = node1.getNumEntries(); int numEntries_2 = no...
[ "private", "void", "expandDirNodes", "(", "SpatialPrimitiveDistanceFunction", "<", "V", ">", "distFunction", ",", "DeLiCluNode", "node1", ",", "DeLiCluNode", "node2", ")", "{", "if", "(", "LOG", ".", "isDebuggingFinest", "(", ")", ")", "{", "LOG", ".", "debugF...
Expands the specified directory nodes. @param distFunction the spatial distance function of this algorithm @param node1 the first node @param node2 the second node
[ "Expands", "the", "specified", "directory", "nodes", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/optics/DeLiClu.java#L230-L254
alkacon/opencms-core
src-gwt/org/opencms/ade/upload/client/ui/A_CmsUploadDialog.java
A_CmsUploadDialog.addFileToList
private void addFileToList(final CmsFileInfo file, boolean invalid, boolean existingDeleted, boolean isTooLarge) { """ Adds a file to the list.<p> @param file the file to add @param invalid signals if the filename is invalid @param existingDeleted in case of existing files marked as deleted @param isTooLarge...
java
private void addFileToList(final CmsFileInfo file, boolean invalid, boolean existingDeleted, boolean isTooLarge) { CmsListInfoBean infoBean = createInfoBean(file); CmsListItemWidget listItemWidget = new CmsListItemWidget(infoBean); listItemWidget.setIcon(CmsCoreProvider.get().getResourceTypeIco...
[ "private", "void", "addFileToList", "(", "final", "CmsFileInfo", "file", ",", "boolean", "invalid", ",", "boolean", "existingDeleted", ",", "boolean", "isTooLarge", ")", "{", "CmsListInfoBean", "infoBean", "=", "createInfoBean", "(", "file", ")", ";", "CmsListItem...
Adds a file to the list.<p> @param file the file to add @param invalid signals if the filename is invalid @param existingDeleted in case of existing files marked as deleted @param isTooLarge signals if the file size limit is exceeded
[ "Adds", "a", "file", "to", "the", "list", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/ade/upload/client/ui/A_CmsUploadDialog.java#L1056-L1102
voldemort/voldemort
src/java/voldemort/utils/ByteUtils.java
ByteUtils.expand
public static ByteBuffer expand(ByteBuffer buffer, int newCapacity) { """ If we have no more room in the current buffer, then double our capacity and copy the current buffer to the new one. <p/> Note: the new buffer is allocated using ByteBuffer.allocate. @param buffer The buffer from which to copy the conte...
java
public static ByteBuffer expand(ByteBuffer buffer, int newCapacity) { if(newCapacity < buffer.capacity()) throw new IllegalArgumentException("newCapacity (" + newCapacity + ") must be larger than existing capacity (" ...
[ "public", "static", "ByteBuffer", "expand", "(", "ByteBuffer", "buffer", ",", "int", "newCapacity", ")", "{", "if", "(", "newCapacity", "<", "buffer", ".", "capacity", "(", ")", ")", "throw", "new", "IllegalArgumentException", "(", "\"newCapacity (\"", "+", "n...
If we have no more room in the current buffer, then double our capacity and copy the current buffer to the new one. <p/> Note: the new buffer is allocated using ByteBuffer.allocate. @param buffer The buffer from which to copy the contents @param newCapacity The new capacity size
[ "If", "we", "have", "no", "more", "room", "in", "the", "current", "buffer", "then", "double", "our", "capacity", "and", "copy", "the", "current", "buffer", "to", "the", "new", "one", ".", "<p", "/", ">", "Note", ":", "the", "new", "buffer", "is", "al...
train
https://github.com/voldemort/voldemort/blob/a7dbdea58032021361680faacf2782cf981c5332/src/java/voldemort/utils/ByteUtils.java#L482-L494
Azure/azure-sdk-for-java
iothub/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/iothub/v2018_04_01/implementation/IotHubResourcesInner.java
IotHubResourcesInner.listKeysWithServiceResponseAsync
public Observable<ServiceResponse<Page<SharedAccessSignatureAuthorizationRuleInner>>> listKeysWithServiceResponseAsync(final String resourceGroupName, final String resourceName) { """ Get the security metadata for an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-secu...
java
public Observable<ServiceResponse<Page<SharedAccessSignatureAuthorizationRuleInner>>> listKeysWithServiceResponseAsync(final String resourceGroupName, final String resourceName) { return listKeysSinglePageAsync(resourceGroupName, resourceName) .concatMap(new Func1<ServiceResponse<Page<SharedAccessSi...
[ "public", "Observable", "<", "ServiceResponse", "<", "Page", "<", "SharedAccessSignatureAuthorizationRuleInner", ">", ">", ">", "listKeysWithServiceResponseAsync", "(", "final", "String", "resourceGroupName", ",", "final", "String", "resourceName", ")", "{", "return", "...
Get the security metadata for an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security. Get the security metadata for an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security. @param resourceGroupName The name of the reso...
[ "Get", "the", "security", "metadata", "for", "an", "IoT", "hub", ".", "For", "more", "information", "see", ":", "https", ":", "//", "docs", ".", "microsoft", ".", "com", "/", "azure", "/", "iot", "-", "hub", "/", "iot", "-", "hub", "-", "devguide", ...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/iothub/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/iothub/v2018_04_01/implementation/IotHubResourcesInner.java#L2901-L2913
drinkjava2/jDialects
core/src/main/java/com/github/drinkjava2/jdialects/TableModelUtils.java
TableModelUtils.bindGlobalModel
public static void bindGlobalModel(Class<?> entityClass, TableModel tableModel) { """ This method bind a tableModel to a entity class, this is a global setting """ TableModelUtilsOfEntity.globalTableModelCache.put(entityClass, tableModel); }
java
public static void bindGlobalModel(Class<?> entityClass, TableModel tableModel) { TableModelUtilsOfEntity.globalTableModelCache.put(entityClass, tableModel); }
[ "public", "static", "void", "bindGlobalModel", "(", "Class", "<", "?", ">", "entityClass", ",", "TableModel", "tableModel", ")", "{", "TableModelUtilsOfEntity", ".", "globalTableModelCache", ".", "put", "(", "entityClass", ",", "tableModel", ")", ";", "}" ]
This method bind a tableModel to a entity class, this is a global setting
[ "This", "method", "bind", "a", "tableModel", "to", "a", "entity", "class", "this", "is", "a", "global", "setting" ]
train
https://github.com/drinkjava2/jDialects/blob/1c165f09c6042a599b681c279024abcc1b848b88/core/src/main/java/com/github/drinkjava2/jdialects/TableModelUtils.java#L127-L129
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/model/ClassNameRewriterUtil.java
ClassNameRewriterUtil.convertFieldAnnotation
public static FieldAnnotation convertFieldAnnotation(ClassNameRewriter classNameRewriter, FieldAnnotation annotation) { """ Rewrite a FieldAnnotation to update the class name and field signature, if needed. @param classNameRewriter a ClassNameRewriter @param annotation a FieldAnnotation @return the possibl...
java
public static FieldAnnotation convertFieldAnnotation(ClassNameRewriter classNameRewriter, FieldAnnotation annotation) { if (classNameRewriter != IdentityClassNameRewriter.instance()) { annotation = new FieldAnnotation(classNameRewriter.rewriteClassName(annotation.getClassName()), ...
[ "public", "static", "FieldAnnotation", "convertFieldAnnotation", "(", "ClassNameRewriter", "classNameRewriter", ",", "FieldAnnotation", "annotation", ")", "{", "if", "(", "classNameRewriter", "!=", "IdentityClassNameRewriter", ".", "instance", "(", ")", ")", "{", "annot...
Rewrite a FieldAnnotation to update the class name and field signature, if needed. @param classNameRewriter a ClassNameRewriter @param annotation a FieldAnnotation @return the possibly-rewritten FieldAnnotation
[ "Rewrite", "a", "FieldAnnotation", "to", "update", "the", "class", "name", "and", "field", "signature", "if", "needed", "." ]
train
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/model/ClassNameRewriterUtil.java#L115-L123
Wikidata/Wikidata-Toolkit
wdtk-examples/src/main/java/org/wikidata/wdtk/examples/ClassPropertyUsageAnalyzer.java
ClassPropertyUsageAnalyzer.countPropertyReference
private void countPropertyReference(PropertyIdValue property, int count) { """ Counts additional occurrences of a property as property in references. @param property the property to count @param count the number of times to count the property """ PropertyRecord propertyRecord = getPropertyRecord(proper...
java
private void countPropertyReference(PropertyIdValue property, int count) { PropertyRecord propertyRecord = getPropertyRecord(property); propertyRecord.referenceCount = propertyRecord.referenceCount + count; }
[ "private", "void", "countPropertyReference", "(", "PropertyIdValue", "property", ",", "int", "count", ")", "{", "PropertyRecord", "propertyRecord", "=", "getPropertyRecord", "(", "property", ")", ";", "propertyRecord", ".", "referenceCount", "=", "propertyRecord", "."...
Counts additional occurrences of a property as property in references. @param property the property to count @param count the number of times to count the property
[ "Counts", "additional", "occurrences", "of", "a", "property", "as", "property", "in", "references", "." ]
train
https://github.com/Wikidata/Wikidata-Toolkit/blob/7732851dda47e1febff406fba27bfec023f4786e/wdtk-examples/src/main/java/org/wikidata/wdtk/examples/ClassPropertyUsageAnalyzer.java#L461-L464
hal/core
gui/src/main/java/org/jboss/as/console/client/shared/subsys/ws/WebServiceView.java
WebServiceView.updateConfig
public void updateConfig(AddressTemplate addressTemplate, ModelNode currentConfig) { """ Updates the child resources for a specific endpoint/client selected, when some opearation is performed in the properties, pre/post handlers. """ String configName = null; // update the editor endpoint/cli...
java
public void updateConfig(AddressTemplate addressTemplate, ModelNode currentConfig) { String configName = null; // update the editor endpoint/client configuration properties switch (addressTemplate.getResourceType()) { case WebServicesStore.ENDPOINT_CONFIG: endpointCo...
[ "public", "void", "updateConfig", "(", "AddressTemplate", "addressTemplate", ",", "ModelNode", "currentConfig", ")", "{", "String", "configName", "=", "null", ";", "// update the editor endpoint/client configuration properties", "switch", "(", "addressTemplate", ".", "getRe...
Updates the child resources for a specific endpoint/client selected, when some opearation is performed in the properties, pre/post handlers.
[ "Updates", "the", "child", "resources", "for", "a", "specific", "endpoint", "/", "client", "selected", "when", "some", "opearation", "is", "performed", "in", "the", "properties", "pre", "/", "post", "handlers", "." ]
train
https://github.com/hal/core/blob/d6d03f0bb128dc0470f5dc75fdb1ea1014400602/gui/src/main/java/org/jboss/as/console/client/shared/subsys/ws/WebServiceView.java#L225-L258
mapfish/mapfish-print
core/src/main/java/org/mapfish/print/attribute/ReflectiveAttribute.java
ReflectiveAttribute.printClientConfig
@Override public final void printClientConfig(final JSONWriter json, final Template template) throws JSONException { """ Uses reflection on the object created by {@link #createValue(Template)} to create the options. <p></p> The public final fields are written as the field name as the key and the value as th...
java
@Override public final void printClientConfig(final JSONWriter json, final Template template) throws JSONException { try { Set<Class> printed = new HashSet<>(); final Value exampleValue = createValue(template); json.key(JSON_NAME).value(this.configName); json....
[ "@", "Override", "public", "final", "void", "printClientConfig", "(", "final", "JSONWriter", "json", ",", "final", "Template", "template", ")", "throws", "JSONException", "{", "try", "{", "Set", "<", "Class", ">", "printed", "=", "new", "HashSet", "<>", "(",...
Uses reflection on the object created by {@link #createValue(Template)} to create the options. <p></p> The public final fields are written as the field name as the key and the value as the value. <p></p> The public (non-final) mandatory fields are written as part of clientParams and are written with the field name as t...
[ "Uses", "reflection", "on", "the", "object", "created", "by", "{", "@link", "#createValue", "(", "Template", ")", "}", "to", "create", "the", "options", ".", "<p", ">", "<", "/", "p", ">", "The", "public", "final", "fields", "are", "written", "as", "th...
train
https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/attribute/ReflectiveAttribute.java#L239-L260
alibaba/canal
client-adapter/common/src/main/java/com/alibaba/otter/canal/client/adapter/config/common/MutablePropertySources.java
MutablePropertySources.addBefore
public void addBefore(String relativePropertySourceName, PropertySource<?> propertySource) { """ Add the given property source object with precedence immediately higher than the named relative property source. """ if (logger.isDebugEnabled()) { logger.debug("Adding PropertySource '" + prop...
java
public void addBefore(String relativePropertySourceName, PropertySource<?> propertySource) { if (logger.isDebugEnabled()) { logger.debug("Adding PropertySource '" + propertySource.getName() + "' with search precedence immediately higher than '" + relativePropertySourceName +...
[ "public", "void", "addBefore", "(", "String", "relativePropertySourceName", ",", "PropertySource", "<", "?", ">", "propertySource", ")", "{", "if", "(", "logger", ".", "isDebugEnabled", "(", ")", ")", "{", "logger", ".", "debug", "(", "\"Adding PropertySource '\...
Add the given property source object with precedence immediately higher than the named relative property source.
[ "Add", "the", "given", "property", "source", "object", "with", "precedence", "immediately", "higher", "than", "the", "named", "relative", "property", "source", "." ]
train
https://github.com/alibaba/canal/blob/8f088cddc0755f4350c5aaae95c6e4002d90a40f/client-adapter/common/src/main/java/com/alibaba/otter/canal/client/adapter/config/common/MutablePropertySources.java#L104-L113
atomix/atomix
protocols/raft/src/main/java/io/atomix/protocols/raft/service/RaftServiceContext.java
RaftServiceContext.closeSession
public void closeSession(long index, long timestamp, RaftSession session, boolean expired) { """ Unregister the given session. @param index The index of the unregister. @param timestamp The timestamp of the unregister. @param session The session to unregister. @param expired Whether the session was e...
java
public void closeSession(long index, long timestamp, RaftSession session, boolean expired) { log.debug("Closing session {}", session.sessionId()); // Update the session's timestamp to prevent it from being expired. session.setLastUpdated(timestamp); // Update the state machine index/timestamp. tic...
[ "public", "void", "closeSession", "(", "long", "index", ",", "long", "timestamp", ",", "RaftSession", "session", ",", "boolean", "expired", ")", "{", "log", ".", "debug", "(", "\"Closing session {}\"", ",", "session", ".", "sessionId", "(", ")", ")", ";", ...
Unregister the given session. @param index The index of the unregister. @param timestamp The timestamp of the unregister. @param session The session to unregister. @param expired Whether the session was expired by the leader.
[ "Unregister", "the", "given", "session", "." ]
train
https://github.com/atomix/atomix/blob/3a94b7c80576d762dd0d396d4645df07a0b37c31/protocols/raft/src/main/java/io/atomix/protocols/raft/service/RaftServiceContext.java#L442-L471
VoltDB/voltdb
src/frontend/org/voltdb/jdbc/JDBC4DatabaseMetaData.java
JDBC4DatabaseMetaData.getPrimaryKeys
@Override public ResultSet getPrimaryKeys(String catalog, String schema, String table) throws SQLException { """ Retrieves a description of the given table's primary key columns. """ assert(table != null && !table.isEmpty()); checkClosed(); this.sysCatalog.setString(1, "PRIMARYKEYS"...
java
@Override public ResultSet getPrimaryKeys(String catalog, String schema, String table) throws SQLException { assert(table != null && !table.isEmpty()); checkClosed(); this.sysCatalog.setString(1, "PRIMARYKEYS"); JDBC4ResultSet res = (JDBC4ResultSet) this.sysCatalog.executeQuery()...
[ "@", "Override", "public", "ResultSet", "getPrimaryKeys", "(", "String", "catalog", ",", "String", "schema", ",", "String", "table", ")", "throws", "SQLException", "{", "assert", "(", "table", "!=", "null", "&&", "!", "table", ".", "isEmpty", "(", ")", ")"...
Retrieves a description of the given table's primary key columns.
[ "Retrieves", "a", "description", "of", "the", "given", "table", "s", "primary", "key", "columns", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jdbc/JDBC4DatabaseMetaData.java#L621-L637
Azure/azure-sdk-for-java
cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java
ModelsImpl.addCustomPrebuiltIntent
public UUID addCustomPrebuiltIntent(UUID appId, String versionId, PrebuiltDomainModelCreateObject prebuiltDomainModelCreateObject) { """ Adds a custom prebuilt intent model to the application. @param appId The application ID. @param versionId The version ID. @param prebuiltDomainModelCreateObject A model obje...
java
public UUID addCustomPrebuiltIntent(UUID appId, String versionId, PrebuiltDomainModelCreateObject prebuiltDomainModelCreateObject) { return addCustomPrebuiltIntentWithServiceResponseAsync(appId, versionId, prebuiltDomainModelCreateObject).toBlocking().single().body(); }
[ "public", "UUID", "addCustomPrebuiltIntent", "(", "UUID", "appId", ",", "String", "versionId", ",", "PrebuiltDomainModelCreateObject", "prebuiltDomainModelCreateObject", ")", "{", "return", "addCustomPrebuiltIntentWithServiceResponseAsync", "(", "appId", ",", "versionId", ","...
Adds a custom prebuilt intent model to the application. @param appId The application ID. @param versionId The version ID. @param prebuiltDomainModelCreateObject A model object containing the name of the custom prebuilt intent and the name of the domain to which this model belongs. @throws IllegalArgumentException thro...
[ "Adds", "a", "custom", "prebuilt", "intent", "model", "to", "the", "application", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java#L5713-L5715
fozziethebeat/S-Space
src/main/java/edu/ucla/sspace/common/DocumentVectorBuilder.java
DocumentVectorBuilder.add
void add(DoubleVector dest, Vector src, int factor) { """ Accumulates the content of {@code src} into {@code dest} using a scalar to adjust the values of {@code src}. """ if (src instanceof SparseVector) { int[] nonZeros = ((SparseVector) src).getNonZeroIndices(); for (int i : ...
java
void add(DoubleVector dest, Vector src, int factor) { if (src instanceof SparseVector) { int[] nonZeros = ((SparseVector) src).getNonZeroIndices(); for (int i : nonZeros) dest.add(i, factor * src.getValue(i).doubleValue()); } else { for (int i = 0; i <...
[ "void", "add", "(", "DoubleVector", "dest", ",", "Vector", "src", ",", "int", "factor", ")", "{", "if", "(", "src", "instanceof", "SparseVector", ")", "{", "int", "[", "]", "nonZeros", "=", "(", "(", "SparseVector", ")", "src", ")", ".", "getNonZeroInd...
Accumulates the content of {@code src} into {@code dest} using a scalar to adjust the values of {@code src}.
[ "Accumulates", "the", "content", "of", "{" ]
train
https://github.com/fozziethebeat/S-Space/blob/a608102737dfd3d59038a9ead33fe60356bc6029/src/main/java/edu/ucla/sspace/common/DocumentVectorBuilder.java#L150-L159
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/FetchActiveFlowDao.java
FetchActiveFlowDao.fetchActiveFlowByExecId
Pair<ExecutionReference, ExecutableFlow> fetchActiveFlowByExecId(final int execId) throws ExecutorManagerException { """ Fetch the flow that is dispatched and not yet finished by execution id. @return active flow pair @throws ExecutorManagerException the executor manager exception """ try { ...
java
Pair<ExecutionReference, ExecutableFlow> fetchActiveFlowByExecId(final int execId) throws ExecutorManagerException { try { return this.dbOperator.query(FetchActiveExecutableFlow .FETCH_ACTIVE_EXECUTABLE_FLOW_BY_EXEC_ID, new FetchActiveExecutableFlow(), execId); } catch (final...
[ "Pair", "<", "ExecutionReference", ",", "ExecutableFlow", ">", "fetchActiveFlowByExecId", "(", "final", "int", "execId", ")", "throws", "ExecutorManagerException", "{", "try", "{", "return", "this", ".", "dbOperator", ".", "query", "(", "FetchActiveExecutableFlow", ...
Fetch the flow that is dispatched and not yet finished by execution id. @return active flow pair @throws ExecutorManagerException the executor manager exception
[ "Fetch", "the", "flow", "that", "is", "dispatched", "and", "not", "yet", "finished", "by", "execution", "id", "." ]
train
https://github.com/azkaban/azkaban/blob/d258ea7d6e66807c6eff79c5325d6d3443618dff/azkaban-common/src/main/java/azkaban/executor/FetchActiveFlowDao.java#L161-L170
JDBDT/jdbdt
src/main/java/org/jdbdt/JDBDT.java
JDBDT.assertState
@SafeVarargs public static void assertState(String message, DataSet... dataSets) throws DBAssertionError { """ Assert that the database state matches the given data sets (error message variant) @param message Assertion error message. @param dataSets Data sets. @throws DBAssertionError if the assertion fails...
java
@SafeVarargs public static void assertState(String message, DataSet... dataSets) throws DBAssertionError { multipleStateAssertions(CallInfo.create(message), dataSets); }
[ "@", "SafeVarargs", "public", "static", "void", "assertState", "(", "String", "message", ",", "DataSet", "...", "dataSets", ")", "throws", "DBAssertionError", "{", "multipleStateAssertions", "(", "CallInfo", ".", "create", "(", "message", ")", ",", "dataSets", "...
Assert that the database state matches the given data sets (error message variant) @param message Assertion error message. @param dataSets Data sets. @throws DBAssertionError if the assertion fails. @see #assertState(String,DataSet) @see #assertEmpty(String,DataSource...) @since 1.2
[ "Assert", "that", "the", "database", "state", "matches", "the", "given", "data", "sets", "(", "error", "message", "variant", ")" ]
train
https://github.com/JDBDT/jdbdt/blob/7e32845ad41dfbc5d6fd0fd561e3613697186df4/src/main/java/org/jdbdt/JDBDT.java#L636-L639
derari/cthul
objects/src/main/java/org/cthul/objects/Boxing.java
Boxing.unboxAll
public static Object unboxAll(Class<?> type, Object src, int srcPos, int len) { """ Transforms any array into a primitive array. @param type target type @param src source array @param srcPos start position @param len length @return primitive array """ switch (tId(type)) { case I_BOOLEA...
java
public static Object unboxAll(Class<?> type, Object src, int srcPos, int len) { switch (tId(type)) { case I_BOOLEAN: return unboxBooleans(src, srcPos, len); case I_BYTE: return unboxBytes(src, srcPos, len); case I_CHARACTER: return unboxCharacters(src, srcPos, le...
[ "public", "static", "Object", "unboxAll", "(", "Class", "<", "?", ">", "type", ",", "Object", "src", ",", "int", "srcPos", ",", "int", "len", ")", "{", "switch", "(", "tId", "(", "type", ")", ")", "{", "case", "I_BOOLEAN", ":", "return", "unboxBoolea...
Transforms any array into a primitive array. @param type target type @param src source array @param srcPos start position @param len length @return primitive array
[ "Transforms", "any", "array", "into", "a", "primitive", "array", "." ]
train
https://github.com/derari/cthul/blob/74a31e3cb6a94f5f25cc5253d1dbd42e19a17ebc/objects/src/main/java/org/cthul/objects/Boxing.java#L183-L195
jayantk/jklol
src/com/jayantkrish/jklol/tensor/SparseTensorBuilder.java
SparseTensorBuilder.getFactory
public static TensorFactory getFactory() { """ Gets a {@code TensorFactory} which creates {@code SparseTensorBuilder}s. @return """ return new TensorFactory() { @Override public TensorBuilder getBuilder(int[] dimNums, int[] dimSizes) { return new SparseTensorBuilder(dimNums, dimSizes...
java
public static TensorFactory getFactory() { return new TensorFactory() { @Override public TensorBuilder getBuilder(int[] dimNums, int[] dimSizes) { return new SparseTensorBuilder(dimNums, dimSizes); } }; }
[ "public", "static", "TensorFactory", "getFactory", "(", ")", "{", "return", "new", "TensorFactory", "(", ")", "{", "@", "Override", "public", "TensorBuilder", "getBuilder", "(", "int", "[", "]", "dimNums", ",", "int", "[", "]", "dimSizes", ")", "{", "retur...
Gets a {@code TensorFactory} which creates {@code SparseTensorBuilder}s. @return
[ "Gets", "a", "{", "@code", "TensorFactory", "}", "which", "creates", "{", "@code", "SparseTensorBuilder", "}", "s", "." ]
train
https://github.com/jayantk/jklol/blob/d27532ca83e212d51066cf28f52621acc3fd44cc/src/com/jayantkrish/jklol/tensor/SparseTensorBuilder.java#L83-L90
op4j/op4j
src/main/java/org/op4j/functions/FnString.java
FnString.toBigInteger
public static final Function<String,BigInteger> toBigInteger(final RoundingMode roundingMode, final DecimalPoint decimalPoint) { """ <p> Converts a String into a BigInteger, using the specified decimal point configuration ({@link DecimalPoint}). Rounding mode is used for removing the decimal part of the number....
java
public static final Function<String,BigInteger> toBigInteger(final RoundingMode roundingMode, final DecimalPoint decimalPoint) { return new ToBigInteger(roundingMode, decimalPoint); }
[ "public", "static", "final", "Function", "<", "String", ",", "BigInteger", ">", "toBigInteger", "(", "final", "RoundingMode", "roundingMode", ",", "final", "DecimalPoint", "decimalPoint", ")", "{", "return", "new", "ToBigInteger", "(", "roundingMode", ",", "decima...
<p> Converts a String into a BigInteger, using the specified decimal point configuration ({@link DecimalPoint}). Rounding mode is used for removing the decimal part of the number. The target String should contain no thousand separators. Any fractional part of the input String will be removed. </p> @param roundingMode ...
[ "<p", ">", "Converts", "a", "String", "into", "a", "BigInteger", "using", "the", "specified", "decimal", "point", "configuration", "(", "{", "@link", "DecimalPoint", "}", ")", ".", "Rounding", "mode", "is", "used", "for", "removing", "the", "decimal", "part"...
train
https://github.com/op4j/op4j/blob/b577596dfe462089d3dd169666defc6de7ad289a/src/main/java/org/op4j/functions/FnString.java#L366-L368
rometools/rome
rome-modules/src/main/java/com/rometools/modules/mediarss/io/RSS20YahooParser.java
RSS20YahooParser.parseChannel
@Override protected WireFeed parseChannel(final Element rssRoot, final Locale locale) { """ After we parse the feed we put "rss_2.0" in it (so converters and generators work) this parser is a phantom. """ final WireFeed wFeed = super.parseChannel(rssRoot, locale); wFeed.setFeedType("rss_2....
java
@Override protected WireFeed parseChannel(final Element rssRoot, final Locale locale) { final WireFeed wFeed = super.parseChannel(rssRoot, locale); wFeed.setFeedType("rss_2.0"); return wFeed; }
[ "@", "Override", "protected", "WireFeed", "parseChannel", "(", "final", "Element", "rssRoot", ",", "final", "Locale", "locale", ")", "{", "final", "WireFeed", "wFeed", "=", "super", ".", "parseChannel", "(", "rssRoot", ",", "locale", ")", ";", "wFeed", ".", ...
After we parse the feed we put "rss_2.0" in it (so converters and generators work) this parser is a phantom.
[ "After", "we", "parse", "the", "feed", "we", "put", "rss_2", ".", "0", "in", "it", "(", "so", "converters", "and", "generators", "work", ")", "this", "parser", "is", "a", "phantom", "." ]
train
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-modules/src/main/java/com/rometools/modules/mediarss/io/RSS20YahooParser.java#L83-L89
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/parser/lexparser/AbstractTreebankParserParams.java
AbstractTreebankParserParams.unorderedTypedDependencyObjectify
public static Collection<List<String>> unorderedTypedDependencyObjectify(Tree t, HeadFinder hf, TreeTransformer collinizer) { """ Returns a collection of unordered (but directed!) typed word-word dependencies for the tree. """ return dependencyObjectify(t, hf, collinizer, new UnorderedTypedDependencyTyper...
java
public static Collection<List<String>> unorderedTypedDependencyObjectify(Tree t, HeadFinder hf, TreeTransformer collinizer) { return dependencyObjectify(t, hf, collinizer, new UnorderedTypedDependencyTyper(hf)); }
[ "public", "static", "Collection", "<", "List", "<", "String", ">", ">", "unorderedTypedDependencyObjectify", "(", "Tree", "t", ",", "HeadFinder", "hf", ",", "TreeTransformer", "collinizer", ")", "{", "return", "dependencyObjectify", "(", "t", ",", "hf", ",", "...
Returns a collection of unordered (but directed!) typed word-word dependencies for the tree.
[ "Returns", "a", "collection", "of", "unordered", "(", "but", "directed!", ")", "typed", "word", "-", "word", "dependencies", "for", "the", "tree", "." ]
train
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/parser/lexparser/AbstractTreebankParserParams.java#L365-L367
joniles/mpxj
src/main/java/net/sf/mpxj/CustomFieldContainer.java
CustomFieldContainer.registerAlias
void registerAlias(FieldType type, String alias) { """ When an alias for a field is added, index it here to allow lookup by alias and type. @param type field type @param alias field alias """ m_aliasMap.put(new Pair<FieldTypeClass, String>(type.getFieldTypeClass(), alias), type); }
java
void registerAlias(FieldType type, String alias) { m_aliasMap.put(new Pair<FieldTypeClass, String>(type.getFieldTypeClass(), alias), type); }
[ "void", "registerAlias", "(", "FieldType", "type", ",", "String", "alias", ")", "{", "m_aliasMap", ".", "put", "(", "new", "Pair", "<", "FieldTypeClass", ",", "String", ">", "(", "type", ".", "getFieldTypeClass", "(", ")", ",", "alias", ")", ",", "type",...
When an alias for a field is added, index it here to allow lookup by alias and type. @param type field type @param alias field alias
[ "When", "an", "alias", "for", "a", "field", "is", "added", "index", "it", "here", "to", "allow", "lookup", "by", "alias", "and", "type", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/CustomFieldContainer.java#L107-L110
kaazing/gateway
mina.core/core/src/main/java/org/apache/mina/handler/multiton/SingleSessionIoHandlerDelegate.java
SingleSessionIoHandlerDelegate.sessionIdle
public void sessionIdle(IoSession session, IdleStatus status) throws Exception { """ Delegates the method call to the {@link SingleSessionIoHandler#sessionIdle(IdleStatus)} method of the handler assigned to this session. """ SingleSessionIoHandler handler = (SingleSessionIoHandler) sessio...
java
public void sessionIdle(IoSession session, IdleStatus status) throws Exception { SingleSessionIoHandler handler = (SingleSessionIoHandler) session .getAttribute(HANDLER); handler.sessionIdle(status); }
[ "public", "void", "sessionIdle", "(", "IoSession", "session", ",", "IdleStatus", "status", ")", "throws", "Exception", "{", "SingleSessionIoHandler", "handler", "=", "(", "SingleSessionIoHandler", ")", "session", ".", "getAttribute", "(", "HANDLER", ")", ";", "han...
Delegates the method call to the {@link SingleSessionIoHandler#sessionIdle(IdleStatus)} method of the handler assigned to this session.
[ "Delegates", "the", "method", "call", "to", "the", "{" ]
train
https://github.com/kaazing/gateway/blob/06017b19273109b3b992e528e702586446168d57/mina.core/core/src/main/java/org/apache/mina/handler/multiton/SingleSessionIoHandlerDelegate.java#L112-L117
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/ch/Subtypes2.java
Subtypes2.computeFirstCommonSuperclassOfSameDimensionArrays
private ReferenceType computeFirstCommonSuperclassOfSameDimensionArrays(ArrayType aArrType, ArrayType bArrType) throws ClassNotFoundException { """ Get first common supertype of arrays with the same number of dimensions. @param aArrType an ArrayType @param bArrType another ArrayType with the same...
java
private ReferenceType computeFirstCommonSuperclassOfSameDimensionArrays(ArrayType aArrType, ArrayType bArrType) throws ClassNotFoundException { assert aArrType.getDimensions() == bArrType.getDimensions(); Type aBaseType = aArrType.getBasicType(); Type bBaseType = bArrType.getBasicTy...
[ "private", "ReferenceType", "computeFirstCommonSuperclassOfSameDimensionArrays", "(", "ArrayType", "aArrType", ",", "ArrayType", "bArrType", ")", "throws", "ClassNotFoundException", "{", "assert", "aArrType", ".", "getDimensions", "(", ")", "==", "bArrType", ".", "getDime...
Get first common supertype of arrays with the same number of dimensions. @param aArrType an ArrayType @param bArrType another ArrayType with the same number of dimensions @return first common supertype @throws ClassNotFoundException
[ "Get", "first", "common", "supertype", "of", "arrays", "with", "the", "same", "number", "of", "dimensions", "." ]
train
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/ch/Subtypes2.java#L598-L631
GoogleCloudPlatform/bigdata-interop
gcsio/src/main/java/com/google/cloud/hadoop/gcsio/PrefixMappedItemCache.java
PrefixMappedItemCache.getList
public synchronized List<GoogleCloudStorageItemInfo> getList( String bucket, @Nullable String objectNamePrefix) { """ Gets the cached list associated with the given bucket and object name prefix. @param bucket the bucket where the entries are being retrieved from. @param objectNamePrefix the object name ...
java
public synchronized List<GoogleCloudStorageItemInfo> getList( String bucket, @Nullable String objectNamePrefix) { PrefixKey key = new PrefixKey(bucket, objectNamePrefix); Entry<PrefixKey, CacheValue<Object>> entry = getParentEntry(prefixMap, key); if (entry == null) { return null; } if...
[ "public", "synchronized", "List", "<", "GoogleCloudStorageItemInfo", ">", "getList", "(", "String", "bucket", ",", "@", "Nullable", "String", "objectNamePrefix", ")", "{", "PrefixKey", "key", "=", "new", "PrefixKey", "(", "bucket", ",", "objectNamePrefix", ")", ...
Gets the cached list associated with the given bucket and object name prefix. @param bucket the bucket where the entries are being retrieved from. @param objectNamePrefix the object name prefix to match against. If this is empty string or null, it will match everything in the bucket. @return a list of items matching i...
[ "Gets", "the", "cached", "list", "associated", "with", "the", "given", "bucket", "and", "object", "name", "prefix", "." ]
train
https://github.com/GoogleCloudPlatform/bigdata-interop/blob/918d91c80a63e36046edb28972a5c65d3326a858/gcsio/src/main/java/com/google/cloud/hadoop/gcsio/PrefixMappedItemCache.java#L101-L116
agmip/agmip-common-functions
src/main/java/org/agmip/common/Functions.java
Functions.numericStringToBigInteger
public static BigInteger numericStringToBigInteger(String numeric, boolean round) { """ Converts a numeric string to a {@code BigInteger}. This function first converts to a {@code BigDecimal} to make sure the base number being used is accurate. If {@code round} is set to <strong>true</strong> this method uses...
java
public static BigInteger numericStringToBigInteger(String numeric, boolean round) { BigDecimal decimal; try { decimal = new BigDecimal(numeric); } catch (Exception ex) { return null; } if (round) { decimal = decimal.setScale(0, BigDecimal.ROU...
[ "public", "static", "BigInteger", "numericStringToBigInteger", "(", "String", "numeric", ",", "boolean", "round", ")", "{", "BigDecimal", "decimal", ";", "try", "{", "decimal", "=", "new", "BigDecimal", "(", "numeric", ")", ";", "}", "catch", "(", "Exception",...
Converts a numeric string to a {@code BigInteger}. This function first converts to a {@code BigDecimal} to make sure the base number being used is accurate. If {@code round} is set to <strong>true</strong> this method uses the {@code ROUND_HALF_UP} rounding method from {@code BigDecimal}. Otherwise the decimal part is...
[ "Converts", "a", "numeric", "string", "to", "a", "{", "@code", "BigInteger", "}", "." ]
train
https://github.com/agmip/agmip-common-functions/blob/4efa3042178841b026ca6fba9c96da02fbfb9a8e/src/main/java/org/agmip/common/Functions.java#L64-L78
liferay/com-liferay-commerce
commerce-tax-service/src/main/java/com/liferay/commerce/tax/service/persistence/impl/CommerceTaxMethodPersistenceImpl.java
CommerceTaxMethodPersistenceImpl.findByGroupId
@Override public List<CommerceTaxMethod> findByGroupId(long groupId) { """ Returns all the commerce tax methods where groupId = &#63;. @param groupId the group ID @return the matching commerce tax methods """ return findByGroupId(groupId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); }
java
@Override public List<CommerceTaxMethod> findByGroupId(long groupId) { return findByGroupId(groupId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); }
[ "@", "Override", "public", "List", "<", "CommerceTaxMethod", ">", "findByGroupId", "(", "long", "groupId", ")", "{", "return", "findByGroupId", "(", "groupId", ",", "QueryUtil", ".", "ALL_POS", ",", "QueryUtil", ".", "ALL_POS", ",", "null", ")", ";", "}" ]
Returns all the commerce tax methods where groupId = &#63;. @param groupId the group ID @return the matching commerce tax methods
[ "Returns", "all", "the", "commerce", "tax", "methods", "where", "groupId", "=", "&#63", ";", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-tax-service/src/main/java/com/liferay/commerce/tax/service/persistence/impl/CommerceTaxMethodPersistenceImpl.java#L125-L128
kohsuke/args4j
args4j/src/org/kohsuke/args4j/XmlParser.java
XmlParser.findMethodOrField
private AccessibleObject findMethodOrField(Object bean, String field, String method) throws SecurityException, NoSuchFieldException, NoSuchMethodException, ClassNotFoundException { """ Finds a {@link java.lang.reflect.Method} or {@link java.lang.reflect.Method} in the bean instance with the requested name. @para...
java
private AccessibleObject findMethodOrField(Object bean, String field, String method) throws SecurityException, NoSuchFieldException, NoSuchMethodException, ClassNotFoundException { AccessibleObject rv; if (field != null) { rv = bean.getClass().getDeclaredField(field); } else { String methodName = method.sub...
[ "private", "AccessibleObject", "findMethodOrField", "(", "Object", "bean", ",", "String", "field", ",", "String", "method", ")", "throws", "SecurityException", ",", "NoSuchFieldException", ",", "NoSuchMethodException", ",", "ClassNotFoundException", "{", "AccessibleObject...
Finds a {@link java.lang.reflect.Method} or {@link java.lang.reflect.Method} in the bean instance with the requested name. @param bean bean instance @param field name of the field (field XOR method must be specified) @param method name of the method (field XOR method must be specified) @return the reflection refe...
[ "Finds", "a", "{" ]
train
https://github.com/kohsuke/args4j/blob/dc2e7e265caf15a1a146e3389c1f16a8781f06cf/args4j/src/org/kohsuke/args4j/XmlParser.java#L71-L89
jtmelton/appsensor
analysis-engines/appsensor-analysis-rules/src/main/java/org/owasp/appsensor/analysis/AggregateEventAnalysisEngine.java
AggregateEventAnalysisEngine.checkClause
protected boolean checkClause(Clause clause, Queue<Notification> notifications) { """ Evaluates a {@link Clause}'s logic by checking if each {@link MonitorPoint} within the {@link Clause} is in the current "sliding window". Equivalent to checking "AND" logic between {@link RuleDetectionPoint}s. @param claus...
java
protected boolean checkClause(Clause clause, Queue<Notification> notifications) { Collection<DetectionPoint> windowDetectionPoints = new HashSet<DetectionPoint>(); for (Notification notification : notifications) { windowDetectionPoints.add(notification.getMonitorPoint()); } for (DetectionPoint detectionPoi...
[ "protected", "boolean", "checkClause", "(", "Clause", "clause", ",", "Queue", "<", "Notification", ">", "notifications", ")", "{", "Collection", "<", "DetectionPoint", ">", "windowDetectionPoints", "=", "new", "HashSet", "<", "DetectionPoint", ">", "(", ")", ";"...
Evaluates a {@link Clause}'s logic by checking if each {@link MonitorPoint} within the {@link Clause} is in the current "sliding window". Equivalent to checking "AND" logic between {@link RuleDetectionPoint}s. @param clause the {@link Clause} being evaluated @param notifications the {@link Notification}s in the curre...
[ "Evaluates", "a", "{", "@link", "Clause", "}", "s", "logic", "by", "checking", "if", "each", "{", "@link", "MonitorPoint", "}", "within", "the", "{", "@link", "Clause", "}", "is", "in", "the", "current", "sliding", "window", "." ]
train
https://github.com/jtmelton/appsensor/blob/c3b4e9ada50fdee974e0d618ec4bdfabc2163798/analysis-engines/appsensor-analysis-rules/src/main/java/org/owasp/appsensor/analysis/AggregateEventAnalysisEngine.java#L139-L153
caelum/timemachine
src/main/java/br/com/caelum/timemachine/TimeMachine.java
TimeMachine.getCurrentTimeMillisProvider
private MillisProvider getCurrentTimeMillisProvider() { """ Retrieves the {@link MillisProvider} in use for {@link DateTimeUtils} """ try { Field providerField = DateTimeUtils.class.getDeclaredField("cMillisProvider"); providerField.setAccessible(true); return (MillisProvider) providerField.get(null...
java
private MillisProvider getCurrentTimeMillisProvider() { try { Field providerField = DateTimeUtils.class.getDeclaredField("cMillisProvider"); providerField.setAccessible(true); return (MillisProvider) providerField.get(null); } catch (NoSuchFieldException e) { throw new UnsupportedClassVersionError("The ...
[ "private", "MillisProvider", "getCurrentTimeMillisProvider", "(", ")", "{", "try", "{", "Field", "providerField", "=", "DateTimeUtils", ".", "class", ".", "getDeclaredField", "(", "\"cMillisProvider\"", ")", ";", "providerField", ".", "setAccessible", "(", "true", "...
Retrieves the {@link MillisProvider} in use for {@link DateTimeUtils}
[ "Retrieves", "the", "{" ]
train
https://github.com/caelum/timemachine/blob/67327e67d93b7c64ac2cdcecf77c8919832cc8b9/src/main/java/br/com/caelum/timemachine/TimeMachine.java#L133-L145
sai-pullabhotla/catatumbo
src/main/java/com/jmethods/catatumbo/MapperFactory.java
MapperFactory.getMapper
public Mapper getMapper(Field field) { """ Returns the mapper for the given field. If the field has a custom mapper, a new instance of the specified mapper will be created and returned. Otherwise, one of the built-in mappers will be returned based on the field type. @param field the field @return the mapper...
java
public Mapper getMapper(Field field) { PropertyMapper propertyMapperAnnotation = field.getAnnotation(PropertyMapper.class); if (propertyMapperAnnotation != null) { return createCustomMapper(field, propertyMapperAnnotation); } Class<?> fieldType = field.getType(); if (fieldType.equals(BigDecima...
[ "public", "Mapper", "getMapper", "(", "Field", "field", ")", "{", "PropertyMapper", "propertyMapperAnnotation", "=", "field", ".", "getAnnotation", "(", "PropertyMapper", ".", "class", ")", ";", "if", "(", "propertyMapperAnnotation", "!=", "null", ")", "{", "ret...
Returns the mapper for the given field. If the field has a custom mapper, a new instance of the specified mapper will be created and returned. Otherwise, one of the built-in mappers will be returned based on the field type. @param field the field @return the mapper for the given field.
[ "Returns", "the", "mapper", "for", "the", "given", "field", ".", "If", "the", "field", "has", "a", "custom", "mapper", "a", "new", "instance", "of", "the", "specified", "mapper", "will", "be", "created", "and", "returned", ".", "Otherwise", "one", "of", ...
train
https://github.com/sai-pullabhotla/catatumbo/blob/96d4c6dce3a5009624f7112a398406914dd19165/src/main/java/com/jmethods/catatumbo/MapperFactory.java#L116-L132
pushtorefresh/storio
storio-sample-app/src/main/java/com/pushtorefresh/storio3/sample/db/resolvers/TweetWithUserGetResolver.java
TweetWithUserGetResolver.mapFromCursor
@NonNull @Override public TweetWithUser mapFromCursor(@NonNull StorIOSQLite storIOSQLite, @NonNull Cursor cursor) { """ We expect that cursor will contain both Tweet and User: SQL JOIN """ final Tweet tweet = Tweet.newTweet( cursor.getLong(cursor.getColumnIndexOrThrow(Relations....
java
@NonNull @Override public TweetWithUser mapFromCursor(@NonNull StorIOSQLite storIOSQLite, @NonNull Cursor cursor) { final Tweet tweet = Tweet.newTweet( cursor.getLong(cursor.getColumnIndexOrThrow(Relations.QUERY_COLUMN_TWEET_ID)), cursor.getString(cursor.getColumnIndexOrT...
[ "@", "NonNull", "@", "Override", "public", "TweetWithUser", "mapFromCursor", "(", "@", "NonNull", "StorIOSQLite", "storIOSQLite", ",", "@", "NonNull", "Cursor", "cursor", ")", "{", "final", "Tweet", "tweet", "=", "Tweet", ".", "newTweet", "(", "cursor", ".", ...
We expect that cursor will contain both Tweet and User: SQL JOIN
[ "We", "expect", "that", "cursor", "will", "contain", "both", "Tweet", "and", "User", ":", "SQL", "JOIN" ]
train
https://github.com/pushtorefresh/storio/blob/58f53d81bcc7b069c8bb271c46a90e37775abe8d/storio-sample-app/src/main/java/com/pushtorefresh/storio3/sample/db/resolvers/TweetWithUserGetResolver.java#L17-L32
scalecube/scalecube-services
services-transport-rsocket/src/main/java/io/scalecube/services/transport/rsocket/DelegatedLoopResources.java
DelegatedLoopResources.newServerLoopResources
public static DelegatedLoopResources newServerLoopResources(EventLoopGroup workerGroup) { """ Creates new loop resources for server side. @param workerGroup worker pool @return loop resources """ EventLoopGroup bossGroup = Epoll.isAvailable() ? new EpollEventLoopGroup(BOSS_THREADS_N...
java
public static DelegatedLoopResources newServerLoopResources(EventLoopGroup workerGroup) { EventLoopGroup bossGroup = Epoll.isAvailable() ? new EpollEventLoopGroup(BOSS_THREADS_NUM, BOSS_THREAD_FACTORY) : new NioEventLoopGroup(BOSS_THREADS_NUM, BOSS_THREAD_FACTORY); return new Del...
[ "public", "static", "DelegatedLoopResources", "newServerLoopResources", "(", "EventLoopGroup", "workerGroup", ")", "{", "EventLoopGroup", "bossGroup", "=", "Epoll", ".", "isAvailable", "(", ")", "?", "new", "EpollEventLoopGroup", "(", "BOSS_THREADS_NUM", ",", "BOSS_THRE...
Creates new loop resources for server side. @param workerGroup worker pool @return loop resources
[ "Creates", "new", "loop", "resources", "for", "server", "side", "." ]
train
https://github.com/scalecube/scalecube-services/blob/76c8de6019e5480a1436d12b37acf163f70eea47/services-transport-rsocket/src/main/java/io/scalecube/services/transport/rsocket/DelegatedLoopResources.java#L57-L63
atomix/atomix
cluster/src/main/java/io/atomix/cluster/messaging/impl/AbstractClientConnection.java
AbstractClientConnection.getTimeoutMillis
private long getTimeoutMillis(String type, Duration timeout) { """ Returns the timeout in milliseconds for the given timeout duration @param type the message type @param timeout the timeout duration or {@code null} if the timeout is dynamic @return the timeout in milliseconds """ return timeout != ...
java
private long getTimeoutMillis(String type, Duration timeout) { return timeout != null ? timeout.toMillis() : computeTimeoutMillis(type); }
[ "private", "long", "getTimeoutMillis", "(", "String", "type", ",", "Duration", "timeout", ")", "{", "return", "timeout", "!=", "null", "?", "timeout", ".", "toMillis", "(", ")", ":", "computeTimeoutMillis", "(", "type", ")", ";", "}" ]
Returns the timeout in milliseconds for the given timeout duration @param type the message type @param timeout the timeout duration or {@code null} if the timeout is dynamic @return the timeout in milliseconds
[ "Returns", "the", "timeout", "in", "milliseconds", "for", "the", "given", "timeout", "duration" ]
train
https://github.com/atomix/atomix/blob/3a94b7c80576d762dd0d396d4645df07a0b37c31/cluster/src/main/java/io/atomix/cluster/messaging/impl/AbstractClientConnection.java#L98-L100