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
elki-project/elki
addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/style/marker/PrettyMarkers.java
PrettyMarkers.plotUncolored
protected void plotUncolored(SVGPlot plot, Element parent, double x, double y, double size) { """ Plot a replacement marker when no color is set; usually black @param plot Plot to draw to @param parent Parent element @param x X position @param y Y position @param size Size """ Element marker = plot....
java
protected void plotUncolored(SVGPlot plot, Element parent, double x, double y, double size) { Element marker = plot.svgCircle(x, y, size * .5); SVGUtil.setStyle(marker, SVGConstants.CSS_FILL_PROPERTY + ":" + dotcolor); parent.appendChild(marker); }
[ "protected", "void", "plotUncolored", "(", "SVGPlot", "plot", ",", "Element", "parent", ",", "double", "x", ",", "double", "y", ",", "double", "size", ")", "{", "Element", "marker", "=", "plot", ".", "svgCircle", "(", "x", ",", "y", ",", "size", "*", ...
Plot a replacement marker when no color is set; usually black @param plot Plot to draw to @param parent Parent element @param x X position @param y Y position @param size Size
[ "Plot", "a", "replacement", "marker", "when", "no", "color", "is", "set", ";", "usually", "black" ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/style/marker/PrettyMarkers.java#L266-L270
Mozu/mozu-java
mozu-java-core/src/main/java/com/mozu/api/urls/commerce/checkouts/AppliedDiscountUrl.java
AppliedDiscountUrl.applyCouponUrl
public static MozuUrl applyCouponUrl(String checkoutId, String couponCode, String responseFields) { """ Get Resource Url for ApplyCoupon @param checkoutId The unique identifier of the checkout. @param couponCode Code associated with the coupon to remove from the cart. @param responseFields Filtering syntax appe...
java
public static MozuUrl applyCouponUrl(String checkoutId, String couponCode, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/commerce/checkouts/{checkoutId}/coupons/{couponCode}?responseFields={responseFields}"); formatter.formatUrl("checkoutId", checkoutId); formatter.formatUrl("coupo...
[ "public", "static", "MozuUrl", "applyCouponUrl", "(", "String", "checkoutId", ",", "String", "couponCode", ",", "String", "responseFields", ")", "{", "UrlFormatter", "formatter", "=", "new", "UrlFormatter", "(", "\"/api/commerce/checkouts/{checkoutId}/coupons/{couponCode}?r...
Get Resource Url for ApplyCoupon @param checkoutId The unique identifier of the checkout. @param couponCode Code associated with the coupon to remove from the cart. @param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter sho...
[ "Get", "Resource", "Url", "for", "ApplyCoupon" ]
train
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/checkouts/AppliedDiscountUrl.java#L23-L30
Esri/spatial-framework-for-hadoop
hive/src/main/java/com/esri/hadoop/hive/BinUtils.java
BinUtils.queryEnvelope
public void queryEnvelope(long binId, Envelope envelope) { """ Gets the envelope for the bin ID. @param binId @param envelope """ long down = binId / numCols; long over = binId % numCols; double xmin = extentMin + (over * binSize); double xmax = xmin + binSize; double ymax = extentMax - ...
java
public void queryEnvelope(long binId, Envelope envelope) { long down = binId / numCols; long over = binId % numCols; double xmin = extentMin + (over * binSize); double xmax = xmin + binSize; double ymax = extentMax - (down * binSize); double ymin = ymax - binSize; envelope.setCoords(xmin, y...
[ "public", "void", "queryEnvelope", "(", "long", "binId", ",", "Envelope", "envelope", ")", "{", "long", "down", "=", "binId", "/", "numCols", ";", "long", "over", "=", "binId", "%", "numCols", ";", "double", "xmin", "=", "extentMin", "+", "(", "over", ...
Gets the envelope for the bin ID. @param binId @param envelope
[ "Gets", "the", "envelope", "for", "the", "bin", "ID", "." ]
train
https://github.com/Esri/spatial-framework-for-hadoop/blob/00959d6b4465313c934aaa8aaf17b52d6c9c60d4/hive/src/main/java/com/esri/hadoop/hive/BinUtils.java#L46-L56
google/error-prone-javac
src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/builders/FieldBuilder.java
FieldBuilder.buildFieldComments
public void buildFieldComments(XMLNode node, Content fieldDocTree) { """ Build the comments for the field. Do nothing if {@link Configuration#nocomment} is set to true. @param node the XML element that specifies which components to document @param fieldDocTree the content tree to which the documentation will...
java
public void buildFieldComments(XMLNode node, Content fieldDocTree) { if (!configuration.nocomment) { writer.addComments((FieldDoc) fields.get(currentFieldIndex), fieldDocTree); } }
[ "public", "void", "buildFieldComments", "(", "XMLNode", "node", ",", "Content", "fieldDocTree", ")", "{", "if", "(", "!", "configuration", ".", "nocomment", ")", "{", "writer", ".", "addComments", "(", "(", "FieldDoc", ")", "fields", ".", "get", "(", "curr...
Build the comments for the field. Do nothing if {@link Configuration#nocomment} is set to true. @param node the XML element that specifies which components to document @param fieldDocTree the content tree to which the documentation will be added
[ "Build", "the", "comments", "for", "the", "field", ".", "Do", "nothing", "if", "{", "@link", "Configuration#nocomment", "}", "is", "set", "to", "true", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/builders/FieldBuilder.java#L204-L208
pressgang-ccms/PressGangCCMSBuilder
src/main/java/org/jboss/pressgang/ccms/contentspec/builder/DocBookXMLPreProcessor.java
DocBookXMLPreProcessor.processSeeAlsoInjections
public void processSeeAlsoInjections(final SpecNodeWithRelationships specNode, final Document doc, final boolean useFixedUrls) { """ Insert a itemized list into the end of the topic with any RELATED relationships that exists for the Spec Topic. The title for the list is set to "See Also:". @param specNode ...
java
public void processSeeAlsoInjections(final SpecNodeWithRelationships specNode, final Document doc, final boolean useFixedUrls) { processSeeAlsoInjections(specNode, doc, doc.getDocumentElement(), useFixedUrls); }
[ "public", "void", "processSeeAlsoInjections", "(", "final", "SpecNodeWithRelationships", "specNode", ",", "final", "Document", "doc", ",", "final", "boolean", "useFixedUrls", ")", "{", "processSeeAlsoInjections", "(", "specNode", ",", "doc", ",", "doc", ".", "getDoc...
Insert a itemized list into the end of the topic with any RELATED relationships that exists for the Spec Topic. The title for the list is set to "See Also:". @param specNode The content spec node to process the injection for. @param doc The DOM Document object that represents the topics ...
[ "Insert", "a", "itemized", "list", "into", "the", "end", "of", "the", "topic", "with", "any", "RELATED", "relationships", "that", "exists", "for", "the", "Spec", "Topic", ".", "The", "title", "for", "the", "list", "is", "set", "to", "See", "Also", ":", ...
train
https://github.com/pressgang-ccms/PressGangCCMSBuilder/blob/5436d36ba1b3c5baa246b270e5fc350e6778bce8/src/main/java/org/jboss/pressgang/ccms/contentspec/builder/DocBookXMLPreProcessor.java#L954-L956
jbossws/jbossws-cxf
modules/server/src/main/java/org/jboss/wsf/stack/cxf/addressRewrite/SEDProcessor.java
SEDProcessor.findWhitespace
private static int findWhitespace(CharSequence s, int start) { """ Finds and returns the first whitespace character in the given sequence at or after start. Returns the length of the string if no whitespace is found. @param s the character sequence @param start the first index to consider in the char seque...
java
private static int findWhitespace(CharSequence s, int start) { final int len = s.length(); for (int i = start; i < len; i++) { if (Character.isWhitespace(s.charAt(i))) { return i; } } return len; }
[ "private", "static", "int", "findWhitespace", "(", "CharSequence", "s", ",", "int", "start", ")", "{", "final", "int", "len", "=", "s", ".", "length", "(", ")", ";", "for", "(", "int", "i", "=", "start", ";", "i", "<", "len", ";", "i", "++", ")",...
Finds and returns the first whitespace character in the given sequence at or after start. Returns the length of the string if no whitespace is found. @param s the character sequence @param start the first index to consider in the char sequence @return the index containing the first whitespace character at or after sta...
[ "Finds", "and", "returns", "the", "first", "whitespace", "character", "in", "the", "given", "sequence", "at", "or", "after", "start", ".", "Returns", "the", "length", "of", "the", "string", "if", "no", "whitespace", "is", "found", "." ]
train
https://github.com/jbossws/jbossws-cxf/blob/e1d5df3664cbc2482ebc83cafd355a4d60d12150/modules/server/src/main/java/org/jboss/wsf/stack/cxf/addressRewrite/SEDProcessor.java#L382-L393
biojava/biojava
biojava-ws/src/main/java/org/biojava/nbio/ws/alignment/qblast/NCBIQBlastAlignmentProperties.java
NCBIQBlastAlignmentProperties.setBlastGapCosts
public void setBlastGapCosts(int gapCreation, int gapExtension) { """ Sets the GAPCOSTS parameter @param gapCreation integer to use as gap creation value @param gapExtension integer to use as gap extension value """ String gc = Integer.toString(gapCreation); String ge = Integer.toString(gapExtension); ...
java
public void setBlastGapCosts(int gapCreation, int gapExtension) { String gc = Integer.toString(gapCreation); String ge = Integer.toString(gapExtension); setAlignmentOption(GAPCOSTS, gc + "+" + ge); }
[ "public", "void", "setBlastGapCosts", "(", "int", "gapCreation", ",", "int", "gapExtension", ")", "{", "String", "gc", "=", "Integer", ".", "toString", "(", "gapCreation", ")", ";", "String", "ge", "=", "Integer", ".", "toString", "(", "gapExtension", ")", ...
Sets the GAPCOSTS parameter @param gapCreation integer to use as gap creation value @param gapExtension integer to use as gap extension value
[ "Sets", "the", "GAPCOSTS", "parameter" ]
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-ws/src/main/java/org/biojava/nbio/ws/alignment/qblast/NCBIQBlastAlignmentProperties.java#L266-L270
h2oai/h2o-3
h2o-core/src/main/java/water/api/RequestServer.java
RequestServer.registerEndpoint
public static Route registerEndpoint(String method_uri, Class<? extends RestApiHandler> handler_clz) { """ Register an HTTP request handler for the given URL pattern. @param method_uri combined method/url pattern of the endpoint, for example: {@code "GET /3/Jobs/{job_id}"} @param handler_clz class of the hand...
java
public static Route registerEndpoint(String method_uri, Class<? extends RestApiHandler> handler_clz) { try { RestApiHandler handler = handler_clz.newInstance(); return registerEndpoint(handler.name(), method_uri, handler_clz, null, handler.help()); } catch (Exception e) { throw H2O.fail(e.getM...
[ "public", "static", "Route", "registerEndpoint", "(", "String", "method_uri", ",", "Class", "<", "?", "extends", "RestApiHandler", ">", "handler_clz", ")", "{", "try", "{", "RestApiHandler", "handler", "=", "handler_clz", ".", "newInstance", "(", ")", ";", "re...
Register an HTTP request handler for the given URL pattern. @param method_uri combined method/url pattern of the endpoint, for example: {@code "GET /3/Jobs/{job_id}"} @param handler_clz class of the handler (should inherit from {@link RestApiHandler}).
[ "Register", "an", "HTTP", "request", "handler", "for", "the", "given", "URL", "pattern", "." ]
train
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/water/api/RequestServer.java#L238-L245
knowm/Datasets
datasets-reuters-21578/src/main/java/org/knowm/datasets/reuters21578/RawData2DB.java
RawData2DB.extractTextBetweenTags
protected String extractTextBetweenTags(String stringContainingText, String tagname) { """ Given some stringContainingText, extracts the String between the tags @param stringContainingText @param tagname @return """ String openTag = "<" + tagname.toUpperCase() + ">"; String closeTag = "</" + tagn...
java
protected String extractTextBetweenTags(String stringContainingText, String tagname) { String openTag = "<" + tagname.toUpperCase() + ">"; String closeTag = "</" + tagname.toUpperCase() + ">"; StringBuilder buf = new StringBuilder(); boolean record = false; for (int i = 0; i < stringContainingText....
[ "protected", "String", "extractTextBetweenTags", "(", "String", "stringContainingText", ",", "String", "tagname", ")", "{", "String", "openTag", "=", "\"<\"", "+", "tagname", ".", "toUpperCase", "(", ")", "+", "\">\"", ";", "String", "closeTag", "=", "\"</\"", ...
Given some stringContainingText, extracts the String between the tags @param stringContainingText @param tagname @return
[ "Given", "some", "stringContainingText", "extracts", "the", "String", "between", "the", "tags" ]
train
https://github.com/knowm/Datasets/blob/4ea16ccda1d4190a551accff78bbbe05c9c38c79/datasets-reuters-21578/src/main/java/org/knowm/datasets/reuters21578/RawData2DB.java#L260-L284
martint/jmxutils
src/main/java/org/weakref/jmx/ObjectNames.java
ObjectNames.generatedNameOf
public static String generatedNameOf(Class<?> clazz, Annotation annotation) { """ Produce a generated JMX object name. @return JMX object name of the form "[package_name]:type=[class_name],name=[ann_class_name]" """ return builder(clazz, annotation).build(); }
java
public static String generatedNameOf(Class<?> clazz, Annotation annotation) { return builder(clazz, annotation).build(); }
[ "public", "static", "String", "generatedNameOf", "(", "Class", "<", "?", ">", "clazz", ",", "Annotation", "annotation", ")", "{", "return", "builder", "(", "clazz", ",", "annotation", ")", ".", "build", "(", ")", ";", "}" ]
Produce a generated JMX object name. @return JMX object name of the form "[package_name]:type=[class_name],name=[ann_class_name]"
[ "Produce", "a", "generated", "JMX", "object", "name", "." ]
train
https://github.com/martint/jmxutils/blob/f2770ba1f3c126fb841c388d631456afd68dbf25/src/main/java/org/weakref/jmx/ObjectNames.java#L29-L32
h2oai/h2o-3
h2o-core/src/main/java/jsr166y/ForkJoinTask.java
ForkJoinTask.compareAndSetForkJoinTaskTag
public final boolean compareAndSetForkJoinTaskTag(short e, short tag) { """ Atomically conditionally sets the tag value for this task. Among other applications, tags can be used as visit markers in tasks operating on graphs, as in methods that check: {@code if (task.compareAndSetForkJoinTaskTag((short)0, (short...
java
public final boolean compareAndSetForkJoinTaskTag(short e, short tag) { for (int s;;) { if ((short)(s = status) != e) return false; if (U.compareAndSwapInt(this, STATUS, s, (s & ~SMASK) | (tag & SMASK))) return true; ...
[ "public", "final", "boolean", "compareAndSetForkJoinTaskTag", "(", "short", "e", ",", "short", "tag", ")", "{", "for", "(", "int", "s", ";", ";", ")", "{", "if", "(", "(", "short", ")", "(", "s", "=", "status", ")", "!=", "e", ")", "return", "false...
Atomically conditionally sets the tag value for this task. Among other applications, tags can be used as visit markers in tasks operating on graphs, as in methods that check: {@code if (task.compareAndSetForkJoinTaskTag((short)0, (short)1))} before processing, otherwise exiting because the node has already been visited...
[ "Atomically", "conditionally", "sets", "the", "tag", "value", "for", "this", "task", ".", "Among", "other", "applications", "tags", "can", "be", "used", "as", "visit", "markers", "in", "tasks", "operating", "on", "graphs", "as", "in", "methods", "that", "che...
train
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/jsr166y/ForkJoinTask.java#L1383-L1391
yanzhenjie/AndServer
api/src/main/java/com/yanzhenjie/andserver/util/StringUtils.java
StringUtils.deleteAny
public static String deleteAny(String inString, String charsToDelete) { """ Delete any character in a given {@code String}. @param inString the original {@code String}. @param charsToDelete a set of characters to delete. E.g. "az\n" will delete 'a's, 'z's and new lines. @return the resulting {@code String}....
java
public static String deleteAny(String inString, String charsToDelete) { if (!hasLength(inString) || !hasLength(charsToDelete)) { return inString; } StringBuilder sb = new StringBuilder(inString.length()); for (int i = 0; i < inString.length(); i++) { char c = inS...
[ "public", "static", "String", "deleteAny", "(", "String", "inString", ",", "String", "charsToDelete", ")", "{", "if", "(", "!", "hasLength", "(", "inString", ")", "||", "!", "hasLength", "(", "charsToDelete", ")", ")", "{", "return", "inString", ";", "}", ...
Delete any character in a given {@code String}. @param inString the original {@code String}. @param charsToDelete a set of characters to delete. E.g. "az\n" will delete 'a's, 'z's and new lines. @return the resulting {@code String}.
[ "Delete", "any", "character", "in", "a", "given", "{", "@code", "String", "}", "." ]
train
https://github.com/yanzhenjie/AndServer/blob/f95f316cdfa5755d6a3fec3c6a1b5df783b81517/api/src/main/java/com/yanzhenjie/andserver/util/StringUtils.java#L411-L424
fhoeben/hsac-fitnesse-fixtures
src/main/java/nl/hsac/fitnesse/fixture/util/selenium/by/BestMatchBy.java
BestMatchBy.findElement
public static <T extends WebElement> T findElement(By by, SearchContext context) { """ Returns 'best' result from by. If there is no result: returns null, if there is just one that is best, otherwise the 'bestFunction' is applied to all results to determine best. @param by by to use to find elements. @param c...
java
public static <T extends WebElement> T findElement(By by, SearchContext context) { WebElement element = null; List<WebElement> elements = context.findElements(by); if (elements.size() == 1) { element = elements.get(0); } else if (elements.size() > 1) { element = B...
[ "public", "static", "<", "T", "extends", "WebElement", ">", "T", "findElement", "(", "By", "by", ",", "SearchContext", "context", ")", "{", "WebElement", "element", "=", "null", ";", "List", "<", "WebElement", ">", "elements", "=", "context", ".", "findEle...
Returns 'best' result from by. If there is no result: returns null, if there is just one that is best, otherwise the 'bestFunction' is applied to all results to determine best. @param by by to use to find elements. @param context context to search in. @param <T> type of element expected. @return 'best' element, will be...
[ "Returns", "best", "result", "from", "by", ".", "If", "there", "is", "no", "result", ":", "returns", "null", "if", "there", "is", "just", "one", "that", "is", "best", "otherwise", "the", "bestFunction", "is", "applied", "to", "all", "results", "to", "det...
train
https://github.com/fhoeben/hsac-fitnesse-fixtures/blob/4e9018d7386a9aa65bfcbf07eb28ae064edd1732/src/main/java/nl/hsac/fitnesse/fixture/util/selenium/by/BestMatchBy.java#L47-L56
dita-ot/dita-ot
src/main/java/org/dita/dost/util/FileUtils.java
FileUtils.setFragment
@Deprecated public static String setFragment(final String path, final String fragment) { """ Set fragment @param path path @param fragment new fragment, may be {@code null} @return path with new fragment """ final int i = path.indexOf(SHARP); final String p = i != -1 ? path.substring(0, ...
java
@Deprecated public static String setFragment(final String path, final String fragment) { final int i = path.indexOf(SHARP); final String p = i != -1 ? path.substring(0, i) : path; return p + (fragment != null ? (SHARP + fragment) : ""); }
[ "@", "Deprecated", "public", "static", "String", "setFragment", "(", "final", "String", "path", ",", "final", "String", "fragment", ")", "{", "final", "int", "i", "=", "path", ".", "indexOf", "(", "SHARP", ")", ";", "final", "String", "p", "=", "i", "!...
Set fragment @param path path @param fragment new fragment, may be {@code null} @return path with new fragment
[ "Set", "fragment" ]
train
https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/util/FileUtils.java#L567-L572
OpenLiberty/open-liberty
dev/com.ibm.ws.monitor/src/com/ibm/ws/monitor/internal/ProbeManagerImpl.java
ProbeManagerImpl.addProbesByListener
synchronized void addProbesByListener(ProbeListener listener, Collection<ProbeImpl> probes) { """ Associate the specified collection of probes with the specified listener. @param listener the listener that probes are fired to @param probes the probes fired to the listener """ Set<ProbeImpl> listene...
java
synchronized void addProbesByListener(ProbeListener listener, Collection<ProbeImpl> probes) { Set<ProbeImpl> listenerProbes = probesByListener.get(listener); if (listenerProbes == null) { listenerProbes = new HashSet<ProbeImpl>(); probesByListener.put(listener, listenerProbes); ...
[ "synchronized", "void", "addProbesByListener", "(", "ProbeListener", "listener", ",", "Collection", "<", "ProbeImpl", ">", "probes", ")", "{", "Set", "<", "ProbeImpl", ">", "listenerProbes", "=", "probesByListener", ".", "get", "(", "listener", ")", ";", "if", ...
Associate the specified collection of probes with the specified listener. @param listener the listener that probes are fired to @param probes the probes fired to the listener
[ "Associate", "the", "specified", "collection", "of", "probes", "with", "the", "specified", "listener", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.monitor/src/com/ibm/ws/monitor/internal/ProbeManagerImpl.java#L749-L756
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/jsr305/DirectlyRelevantTypeQualifiersDatabase.java
DirectlyRelevantTypeQualifiersDatabase.setDirectlyRelevantTypeQualifiers
public void setDirectlyRelevantTypeQualifiers(MethodDescriptor methodDescriptor, Collection<TypeQualifierValue<?>> qualifiers) { """ Set the collection of directly-relevant type qualifiers for a given method. @param methodDescriptor MethodDescriptor identifying a method @param qualifiers collection of direc...
java
public void setDirectlyRelevantTypeQualifiers(MethodDescriptor methodDescriptor, Collection<TypeQualifierValue<?>> qualifiers) { methodToDirectlyRelevantQualifiersMap.put(methodDescriptor, qualifiers); allKnownQualifiers.addAll(qualifiers); }
[ "public", "void", "setDirectlyRelevantTypeQualifiers", "(", "MethodDescriptor", "methodDescriptor", ",", "Collection", "<", "TypeQualifierValue", "<", "?", ">", ">", "qualifiers", ")", "{", "methodToDirectlyRelevantQualifiersMap", ".", "put", "(", "methodDescriptor", ",",...
Set the collection of directly-relevant type qualifiers for a given method. @param methodDescriptor MethodDescriptor identifying a method @param qualifiers collection of directly-relevant type qualifiers for the method
[ "Set", "the", "collection", "of", "directly", "-", "relevant", "type", "qualifiers", "for", "a", "given", "method", "." ]
train
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/jsr305/DirectlyRelevantTypeQualifiersDatabase.java#L84-L87
rythmengine/rythmengine
src/main/java/org/rythmengine/toString/ToStringStyle.java
ToStringStyle.appendToString
public void appendToString(StringBuilder buffer, String toString) { """ <p>Append to the <code>toString</code> another toString.</p> <p>NOTE: It assumes that the toString has been created from the same ToStringStyle. </p> <p/> <p>A <code>null</code> <code>toString</code> is ignored.</p> @param buffer the <...
java
public void appendToString(StringBuilder buffer, String toString) { if (toString != null) { int pos1 = toString.indexOf(contentStart) + contentStart.length(); int pos2 = toString.lastIndexOf(contentEnd); if (pos1 != pos2 && pos1 >= 0 && pos2 >= 0) { String dat...
[ "public", "void", "appendToString", "(", "StringBuilder", "buffer", ",", "String", "toString", ")", "{", "if", "(", "toString", "!=", "null", ")", "{", "int", "pos1", "=", "toString", ".", "indexOf", "(", "contentStart", ")", "+", "contentStart", ".", "len...
<p>Append to the <code>toString</code> another toString.</p> <p>NOTE: It assumes that the toString has been created from the same ToStringStyle. </p> <p/> <p>A <code>null</code> <code>toString</code> is ignored.</p> @param buffer the <code>StringBuilder</code> to populate @param toString the additional <code>toStrin...
[ "<p", ">", "Append", "to", "the", "<code", ">", "toString<", "/", "code", ">", "another", "toString", ".", "<", "/", "p", ">", "<p", ">", "NOTE", ":", "It", "assumes", "that", "the", "toString", "has", "been", "created", "from", "the", "same", "ToStr...
train
https://github.com/rythmengine/rythmengine/blob/064b565f08d9da07378bf77a9dd856ea5831cc92/src/main/java/org/rythmengine/toString/ToStringStyle.java#L348-L361
JavaMoney/jsr354-ri-bp
src/main/java/org/javamoney/moneta/spi/base/BaseMonetaryRoundingsSingletonSpi.java
BaseMonetaryRoundingsSingletonSpi.isRoundingAvailable
public boolean isRoundingAvailable(String roundingId, String... providers) { """ Checks if a {@link javax.money.MonetaryRounding} is available given a roundingId. @param roundingId The rounding identifier. @param providers the providers and ordering to be used. By default providers and ordering as defined in ...
java
public boolean isRoundingAvailable(String roundingId, String... providers) { return isRoundingAvailable( RoundingQueryBuilder.of().setProviderNames(providers).setRoundingName(roundingId).build()); }
[ "public", "boolean", "isRoundingAvailable", "(", "String", "roundingId", ",", "String", "...", "providers", ")", "{", "return", "isRoundingAvailable", "(", "RoundingQueryBuilder", ".", "of", "(", ")", ".", "setProviderNames", "(", "providers", ")", ".", "setRoundi...
Checks if a {@link javax.money.MonetaryRounding} is available given a roundingId. @param roundingId The rounding identifier. @param providers the providers and ordering to be used. By default providers and ordering as defined in #getDefaultProviders is used. @return true, if a corresponding {@link javax.money.Monetar...
[ "Checks", "if", "a", "{", "@link", "javax", ".", "money", ".", "MonetaryRounding", "}", "is", "available", "given", "a", "roundingId", "." ]
train
https://github.com/JavaMoney/jsr354-ri-bp/blob/9c147ef5623d8032a6dc4c0e5eefdfb41641a9a2/src/main/java/org/javamoney/moneta/spi/base/BaseMonetaryRoundingsSingletonSpi.java#L111-L114
owetterau/neo4j-websockets
client/src/main/java/de/oliverwetterau/neo4j/websockets/client/web/WebSocketHandler.java
WebSocketHandler.afterConnectionClosed
@Override public void afterConnectionClosed(final WebSocketSession webSocketSession, final CloseStatus status) { """ Is called after a websocket session was closed. @param webSocketSession websocket session that was closed @param status status of the websocket session """ logger.debug("[afterConn...
java
@Override public void afterConnectionClosed(final WebSocketSession webSocketSession, final CloseStatus status) { logger.debug("[afterConnectionClosed] id = ", webSocketSession.getId()); this.session = null; if (connectionListener != null) { connectionListener.onConnectionClosed(...
[ "@", "Override", "public", "void", "afterConnectionClosed", "(", "final", "WebSocketSession", "webSocketSession", ",", "final", "CloseStatus", "status", ")", "{", "logger", ".", "debug", "(", "\"[afterConnectionClosed] id = \"", ",", "webSocketSession", ".", "getId", ...
Is called after a websocket session was closed. @param webSocketSession websocket session that was closed @param status status of the websocket session
[ "Is", "called", "after", "a", "websocket", "session", "was", "closed", "." ]
train
https://github.com/owetterau/neo4j-websockets/blob/ca3481066819d01169873aeb145ab3bf5c736afe/client/src/main/java/de/oliverwetterau/neo4j/websockets/client/web/WebSocketHandler.java#L95-L103
alipay/sofa-rpc
extension-impl/extension-common/src/main/java/com/alipay/sofa/rpc/common/SofaConfigs.java
SofaConfigs.getStringValue
public static String getStringValue(String key, String defaultValue) { """ 通用 获取方法 <p> 与没有 appName 的方法相比,该方法不需要传入 appName <p> @param key 配置项 @param defaultValue 默认值 @return 配置 """ return getStringValue(null, key, defaultValue); }
java
public static String getStringValue(String key, String defaultValue) { return getStringValue(null, key, defaultValue); }
[ "public", "static", "String", "getStringValue", "(", "String", "key", ",", "String", "defaultValue", ")", "{", "return", "getStringValue", "(", "null", ",", "key", ",", "defaultValue", ")", ";", "}" ]
通用 获取方法 <p> 与没有 appName 的方法相比,该方法不需要传入 appName <p> @param key 配置项 @param defaultValue 默认值 @return 配置
[ "通用", "获取方法", "<p", ">", "与没有", "appName", "的方法相比,该方法不需要传入", "appName", "<p", ">" ]
train
https://github.com/alipay/sofa-rpc/blob/a31406410291e56696185a29c3ba4bd1f54488fd/extension-impl/extension-common/src/main/java/com/alipay/sofa/rpc/common/SofaConfigs.java#L159-L161
apache/groovy
src/main/groovy/groovy/lang/MetaClassImpl.java
MetaClassImpl.getAttribute
public Object getAttribute(Class sender, Object object, String attribute, boolean useSuper, boolean fromInsideClass) { """ Retrieves the value of an attribute (field). This method is to support the Groovy runtime and not for general client API usage. @param sender The class of the object that requested the attr...
java
public Object getAttribute(Class sender, Object object, String attribute, boolean useSuper, boolean fromInsideClass) { checkInitalised(); boolean isStatic = theClass != Class.class && object instanceof Class; if (isStatic && object != theClass) { MetaClass mc = registry.getMetaClass...
[ "public", "Object", "getAttribute", "(", "Class", "sender", ",", "Object", "object", ",", "String", "attribute", ",", "boolean", "useSuper", ",", "boolean", "fromInsideClass", ")", "{", "checkInitalised", "(", ")", ";", "boolean", "isStatic", "=", "theClass", ...
Retrieves the value of an attribute (field). This method is to support the Groovy runtime and not for general client API usage. @param sender The class of the object that requested the attribute @param object The instance the attribute is to be retrieved from @param attribute The name of the attribute @param useSuper ...
[ "Retrieves", "the", "value", "of", "an", "attribute", "(", "field", ")", ".", "This", "method", "is", "to", "support", "the", "Groovy", "runtime", "and", "not", "for", "general", "client", "API", "usage", "." ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/groovy/groovy/lang/MetaClassImpl.java#L2912-L2937
JodaOrg/joda-time
src/main/java/org/joda/time/MutableInterval.java
MutableInterval.setInterval
public void setInterval(ReadableInstant start, ReadableInstant end) { """ Sets this interval from two instants, replacing the chronology with that from the start instant. @param start the start of the time interval @param end the start of the time interval @throws IllegalArgumentException if the end is bef...
java
public void setInterval(ReadableInstant start, ReadableInstant end) { if (start == null && end == null) { long now = DateTimeUtils.currentTimeMillis(); setInterval(now, now); } else { long startMillis = DateTimeUtils.getInstantMillis(start); long endMillis...
[ "public", "void", "setInterval", "(", "ReadableInstant", "start", ",", "ReadableInstant", "end", ")", "{", "if", "(", "start", "==", "null", "&&", "end", "==", "null", ")", "{", "long", "now", "=", "DateTimeUtils", ".", "currentTimeMillis", "(", ")", ";", ...
Sets this interval from two instants, replacing the chronology with that from the start instant. @param start the start of the time interval @param end the start of the time interval @throws IllegalArgumentException if the end is before the start
[ "Sets", "this", "interval", "from", "two", "instants", "replacing", "the", "chronology", "with", "that", "from", "the", "start", "instant", "." ]
train
https://github.com/JodaOrg/joda-time/blob/bd79f1c4245e79b3c2c56d7b04fde2a6e191fa42/src/main/java/org/joda/time/MutableInterval.java#L244-L254
spring-projects/spring-boot
spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/jar/Handler.java
Handler.addToRootFileCache
static void addToRootFileCache(File sourceFile, JarFile jarFile) { """ Add the given {@link JarFile} to the root file cache. @param sourceFile the source file to add @param jarFile the jar file. """ Map<File, JarFile> cache = rootFileCache.get(); if (cache == null) { cache = new ConcurrentHashMap<>();...
java
static void addToRootFileCache(File sourceFile, JarFile jarFile) { Map<File, JarFile> cache = rootFileCache.get(); if (cache == null) { cache = new ConcurrentHashMap<>(); rootFileCache = new SoftReference<>(cache); } cache.put(sourceFile, jarFile); }
[ "static", "void", "addToRootFileCache", "(", "File", "sourceFile", ",", "JarFile", "jarFile", ")", "{", "Map", "<", "File", ",", "JarFile", ">", "cache", "=", "rootFileCache", ".", "get", "(", ")", ";", "if", "(", "cache", "==", "null", ")", "{", "cach...
Add the given {@link JarFile} to the root file cache. @param sourceFile the source file to add @param jarFile the jar file.
[ "Add", "the", "given", "{" ]
train
https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/jar/Handler.java#L333-L340
liyiorg/weixin-popular
src/main/java/weixin/popular/api/ComponentAPI.java
ComponentAPI.safeBindcomponent
public static String safeBindcomponent(String component_appid, String pre_auth_code, String redirect_uri, String auth_type) { """ 生成移动端快速授权URL @since 2.8.22 @param component_appid 第三方平台ID @param pre_auth_code 预授权码 @param redirect_uri 重定向URI @param auth_type 要授权的帐号类型 <br> 1 则商户扫码后,手机端仅展示公众号 <br> 2...
java
public static String safeBindcomponent(String component_appid, String pre_auth_code, String redirect_uri, String auth_type) { try { StringBuilder sb = new StringBuilder(); sb.append(MP_URI + "/safe/bindcomponent?") .append("action=").append("bindcomponent") ...
[ "public", "static", "String", "safeBindcomponent", "(", "String", "component_appid", ",", "String", "pre_auth_code", ",", "String", "redirect_uri", ",", "String", "auth_type", ")", "{", "try", "{", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";...
生成移动端快速授权URL @since 2.8.22 @param component_appid 第三方平台ID @param pre_auth_code 预授权码 @param redirect_uri 重定向URI @param auth_type 要授权的帐号类型 <br> 1 则商户扫码后,手机端仅展示公众号 <br> 2 表示仅展示小程序 <br> 3 表示公众号和小程序都展示。<br> 如果为未制定,则默认小程序和公众号都展示。第三方平台开发者可以使用本字段来控制授权的帐号类型。 @return URL
[ "生成移动端快速授权URL" ]
train
https://github.com/liyiorg/weixin-popular/blob/c64255292d41463bdb671938feaabf42a335d82c/src/main/java/weixin/popular/api/ComponentAPI.java#L82-L98
alkacon/opencms-core
src-gwt/org/opencms/ade/galleries/client/ui/CmsCategoriesTab.java
CmsCategoriesTab.updateContentTree
@SuppressWarnings("unchecked") public void updateContentTree(List<CmsCategoryTreeEntry> treeEntries, List<String> selectedCategories) { """ Updates the content of th categories tree.<p> @param treeEntries the root category entry @param selectedCategories the categories to select after update """ ...
java
@SuppressWarnings("unchecked") public void updateContentTree(List<CmsCategoryTreeEntry> treeEntries, List<String> selectedCategories) { clearList(); if (m_categories == null) { m_categories = new HashMap<String, CmsCategoryBean>(); } if ((treeEntries != null) && !treeEnt...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "void", "updateContentTree", "(", "List", "<", "CmsCategoryTreeEntry", ">", "treeEntries", ",", "List", "<", "String", ">", "selectedCategories", ")", "{", "clearList", "(", ")", ";", "if", "(", "m_...
Updates the content of th categories tree.<p> @param treeEntries the root category entry @param selectedCategories the categories to select after update
[ "Updates", "the", "content", "of", "th", "categories", "tree", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/ade/galleries/client/ui/CmsCategoriesTab.java#L255-L275
ben-manes/caffeine
simulator/src/main/java/com/github/benmanes/caffeine/cache/simulator/membership/bloom/BloomFilter.java
BloomFilter.seeded
static int seeded(int item, int i) { """ Applies the independent hash function for the given seed index. @param item the element's hash @param i the hash seed index @return the table index """ long hash = SEED[i] * item; hash += hash >>> 32; return (int) hash; }
java
static int seeded(int item, int i) { long hash = SEED[i] * item; hash += hash >>> 32; return (int) hash; }
[ "static", "int", "seeded", "(", "int", "item", ",", "int", "i", ")", "{", "long", "hash", "=", "SEED", "[", "i", "]", "*", "item", ";", "hash", "+=", "hash", ">>>", "32", ";", "return", "(", "int", ")", "hash", ";", "}" ]
Applies the independent hash function for the given seed index. @param item the element's hash @param i the hash seed index @return the table index
[ "Applies", "the", "independent", "hash", "function", "for", "the", "given", "seed", "index", "." ]
train
https://github.com/ben-manes/caffeine/blob/4cf6d6e6a18ea2e8088f166261e5949343b0f2eb/simulator/src/main/java/com/github/benmanes/caffeine/cache/simulator/membership/bloom/BloomFilter.java#L140-L144
Graylog2/gelfclient
src/main/java/org/graylog2/gelfclient/GelfMessageBuilder.java
GelfMessageBuilder.additionalField
public GelfMessageBuilder additionalField(final String key, final Object value) { """ Add an additional field (key-/value-pair) to the {@link GelfMessage}. @param key the key of the additional field @param value the value of the additional field @return {@code this} instance """ fields.put(key, ...
java
public GelfMessageBuilder additionalField(final String key, final Object value) { fields.put(key, value); return this; }
[ "public", "GelfMessageBuilder", "additionalField", "(", "final", "String", "key", ",", "final", "Object", "value", ")", "{", "fields", ".", "put", "(", "key", ",", "value", ")", ";", "return", "this", ";", "}" ]
Add an additional field (key-/value-pair) to the {@link GelfMessage}. @param key the key of the additional field @param value the value of the additional field @return {@code this} instance
[ "Add", "an", "additional", "field", "(", "key", "-", "/", "value", "-", "pair", ")", "to", "the", "{", "@link", "GelfMessage", "}", "." ]
train
https://github.com/Graylog2/gelfclient/blob/87cf261e81addaf4e8c93f75020def0c32f9e69f/src/main/java/org/graylog2/gelfclient/GelfMessageBuilder.java#L140-L143
Azure/azure-sdk-for-java
applicationinsights/resource-manager/v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/WorkItemConfigurationsInner.java
WorkItemConfigurationsInner.getDefaultAsync
public Observable<WorkItemConfigurationInner> getDefaultAsync(String resourceGroupName, String resourceName) { """ Gets default work item configurations that exist for the application. @param resourceGroupName The name of the resource group. @param resourceName The name of the Application Insights component re...
java
public Observable<WorkItemConfigurationInner> getDefaultAsync(String resourceGroupName, String resourceName) { return getDefaultWithServiceResponseAsync(resourceGroupName, resourceName).map(new Func1<ServiceResponse<WorkItemConfigurationInner>, WorkItemConfigurationInner>() { @Override p...
[ "public", "Observable", "<", "WorkItemConfigurationInner", ">", "getDefaultAsync", "(", "String", "resourceGroupName", ",", "String", "resourceName", ")", "{", "return", "getDefaultWithServiceResponseAsync", "(", "resourceGroupName", ",", "resourceName", ")", ".", "map", ...
Gets default work item configurations that exist for the application. @param resourceGroupName The name of the resource group. @param resourceName The name of the Application Insights component resource. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the WorkItemCon...
[ "Gets", "default", "work", "item", "configurations", "that", "exist", "for", "the", "application", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/applicationinsights/resource-manager/v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/WorkItemConfigurationsInner.java#L299-L306
apache/groovy
src/main/java/org/codehaus/groovy/transform/stc/StaticTypeCheckingVisitor.java
StaticTypeCheckingVisitor.checkGroovyStyleConstructor
@Deprecated protected void checkGroovyStyleConstructor(final ClassNode node, final ClassNode[] arguments) { """ Checks that a constructor style expression is valid regarding the number of arguments and the argument types. @param node the class node for which we will try to find a matching constructor ...
java
@Deprecated protected void checkGroovyStyleConstructor(final ClassNode node, final ClassNode[] arguments) { checkGroovyStyleConstructor(node, arguments, typeCheckingContext.getEnclosingClassNode()); }
[ "@", "Deprecated", "protected", "void", "checkGroovyStyleConstructor", "(", "final", "ClassNode", "node", ",", "final", "ClassNode", "[", "]", "arguments", ")", "{", "checkGroovyStyleConstructor", "(", "node", ",", "arguments", ",", "typeCheckingContext", ".", "getE...
Checks that a constructor style expression is valid regarding the number of arguments and the argument types. @param node the class node for which we will try to find a matching constructor @param arguments the constructor arguments @deprecated use {@link #checkGroovyStyleConstructor(org.codehaus.groovy.ast.Class...
[ "Checks", "that", "a", "constructor", "style", "expression", "is", "valid", "regarding", "the", "number", "of", "arguments", "and", "the", "argument", "types", "." ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/transform/stc/StaticTypeCheckingVisitor.java#L1446-L1449
osmdroid/osmdroid
osmdroid-android/src/main/java/org/osmdroid/util/TileSystem.java
TileSystem.getLongitudeFromX01
public double getLongitudeFromX01(final double pX01, boolean wrapEnabled) { """ Converts a "X01" value into longitude "X01" is a double between 0 and 1 for the whole longitude range MinLongitude:0 ... MaxLongitude:1 @since 6.0.0 """ final double longitude = getLongitudeFromX01(wrapEnabled ? Clip(pX0...
java
public double getLongitudeFromX01(final double pX01, boolean wrapEnabled) { final double longitude = getLongitudeFromX01(wrapEnabled ? Clip(pX01, 0, 1) : pX01); return wrapEnabled ? Clip(longitude, getMinLongitude(), getMaxLongitude()) : longitude; }
[ "public", "double", "getLongitudeFromX01", "(", "final", "double", "pX01", ",", "boolean", "wrapEnabled", ")", "{", "final", "double", "longitude", "=", "getLongitudeFromX01", "(", "wrapEnabled", "?", "Clip", "(", "pX01", ",", "0", ",", "1", ")", ":", "pX01"...
Converts a "X01" value into longitude "X01" is a double between 0 and 1 for the whole longitude range MinLongitude:0 ... MaxLongitude:1 @since 6.0.0
[ "Converts", "a", "X01", "value", "into", "longitude", "X01", "is", "a", "double", "between", "0", "and", "1", "for", "the", "whole", "longitude", "range", "MinLongitude", ":", "0", "...", "MaxLongitude", ":", "1" ]
train
https://github.com/osmdroid/osmdroid/blob/3b178b2f078497dd88c137110e87aafe45ad2b16/osmdroid-android/src/main/java/org/osmdroid/util/TileSystem.java#L518-L521
elki-project/elki
elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/correlation/cash/ParameterizationFunction.java
ParameterizationFunction.sinusProduct
public static double sinusProduct(int start, int end, double[] alpha) { """ Computes the product of all sinus values of the specified angles from start to end index. @param start the index to start @param end the index to end @param alpha the array of angles @return the product of all sinus values of the sp...
java
public static double sinusProduct(int start, int end, double[] alpha) { double result = 1; for(int j = start; j < end; j++) { result *= FastMath.sin(alpha[j]); } return result; }
[ "public", "static", "double", "sinusProduct", "(", "int", "start", ",", "int", "end", ",", "double", "[", "]", "alpha", ")", "{", "double", "result", "=", "1", ";", "for", "(", "int", "j", "=", "start", ";", "j", "<", "end", ";", "j", "++", ")", ...
Computes the product of all sinus values of the specified angles from start to end index. @param start the index to start @param end the index to end @param alpha the array of angles @return the product of all sinus values of the specified angles from start to end index
[ "Computes", "the", "product", "of", "all", "sinus", "values", "of", "the", "specified", "angles", "from", "start", "to", "end", "index", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/correlation/cash/ParameterizationFunction.java#L428-L434
overturetool/overture
core/interpreter/src/main/java/org/overture/interpreter/runtime/ModuleInterpreter.java
ModuleInterpreter.execute
@Override public Value execute(String line, DBGPReader dbgp) throws Exception { """ Parse the line passed, type check it and evaluate it as an expression in the initial module context (with default module's state). @param line A VDM expression. @return The value of the expression. @throws Exception Parser...
java
@Override public Value execute(String line, DBGPReader dbgp) throws Exception { PExp expr = parseExpression(line, getDefaultName()); Environment env = getGlobalEnvironment(); typeCheck(expr, env); Context mainContext = new StateContext(assistantFactory, defaultModule.getName().getLocation(), "module scope", ...
[ "@", "Override", "public", "Value", "execute", "(", "String", "line", ",", "DBGPReader", "dbgp", ")", "throws", "Exception", "{", "PExp", "expr", "=", "parseExpression", "(", "line", ",", "getDefaultName", "(", ")", ")", ";", "Environment", "env", "=", "ge...
Parse the line passed, type check it and evaluate it as an expression in the initial module context (with default module's state). @param line A VDM expression. @return The value of the expression. @throws Exception Parser, type checking or runtime errors.
[ "Parse", "the", "line", "passed", "type", "check", "it", "and", "evaluate", "it", "as", "an", "expression", "in", "the", "initial", "module", "context", "(", "with", "default", "module", "s", "state", ")", "." ]
train
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/interpreter/src/main/java/org/overture/interpreter/runtime/ModuleInterpreter.java#L257-L280
MenoData/Time4J
base/src/main/java/net/time4j/range/Weeks.java
Weeks.between
public static <T extends TimePoint<? super CalendarUnit, T>> Weeks between(T t1, T t2) { """ /*[deutsch] <p>Bestimmt die gregorianische Wochendifferenz zwischen den angegebenen Zeitpunkten. </p> @param <T> generic type of time-points @param t1 first time-point @param t2 second time-point @re...
java
public static <T extends TimePoint<? super CalendarUnit, T>> Weeks between(T t1, T t2) { long delta = CalendarUnit.WEEKS.between(t1, t2); return Weeks.of(MathUtils.safeCast(delta)); }
[ "public", "static", "<", "T", "extends", "TimePoint", "<", "?", "super", "CalendarUnit", ",", "T", ">", ">", "Weeks", "between", "(", "T", "t1", ",", "T", "t2", ")", "{", "long", "delta", "=", "CalendarUnit", ".", "WEEKS", ".", "between", "(", "t1", ...
/*[deutsch] <p>Bestimmt die gregorianische Wochendifferenz zwischen den angegebenen Zeitpunkten. </p> @param <T> generic type of time-points @param t1 first time-point @param t2 second time-point @return result of week difference @see net.time4j.PlainDate @see net.time4j.PlainTimestamp
[ "/", "*", "[", "deutsch", "]", "<p", ">", "Bestimmt", "die", "gregorianische", "Wochendifferenz", "zwischen", "den", "angegebenen", "Zeitpunkten", ".", "<", "/", "p", ">" ]
train
https://github.com/MenoData/Time4J/blob/08b2eda6b2dbb140b92011cf7071bb087edd46a5/base/src/main/java/net/time4j/range/Weeks.java#L119-L124
icode/ameba
src/main/java/ameba/mvc/template/internal/TemplateHelper.java
TemplateHelper.getBasePath
public static String getBasePath(Map<String, Object> properties, String cfgSuffix) { """ <p>getBasePath.</p> @param properties a {@link java.util.Map} object. @param cfgSuffix a {@link java.lang.String} object. @return a {@link java.lang.String} object. """ String basePath = PropertiesHelper.getVa...
java
public static String getBasePath(Map<String, Object> properties, String cfgSuffix) { String basePath = PropertiesHelper.getValue(properties, MvcFeature.TEMPLATE_BASE_PATH + "." + cfgSuffix, String.class, null); if (basePath == null) { basePath = PropertiesHelper.getValue(prop...
[ "public", "static", "String", "getBasePath", "(", "Map", "<", "String", ",", "Object", ">", "properties", ",", "String", "cfgSuffix", ")", "{", "String", "basePath", "=", "PropertiesHelper", ".", "getValue", "(", "properties", ",", "MvcFeature", ".", "TEMPLATE...
<p>getBasePath.</p> @param properties a {@link java.util.Map} object. @param cfgSuffix a {@link java.lang.String} object. @return a {@link java.lang.String} object.
[ "<p", ">", "getBasePath", ".", "<", "/", "p", ">" ]
train
https://github.com/icode/ameba/blob/9d4956e935898e41331b2745e400ef869cd265e0/src/main/java/ameba/mvc/template/internal/TemplateHelper.java#L259-L266
rundeck/rundeck
core/src/main/java/com/dtolabs/utils/Mapper.java
Mapper.zip
public static Map zip(List keys, List values) { """ Creates a map where the object at index N from the first List is the key for the object at index N of the second List. <br> By default discards both key and value if either one is null. @param keys List of keys @param values List of values @return map ...
java
public static Map zip(List keys, List values) { return zip(keys, values, false); }
[ "public", "static", "Map", "zip", "(", "List", "keys", ",", "List", "values", ")", "{", "return", "zip", "(", "keys", ",", "values", ",", "false", ")", ";", "}" ]
Creates a map where the object at index N from the first List is the key for the object at index N of the second List. <br> By default discards both key and value if either one is null. @param keys List of keys @param values List of values @return map
[ "Creates", "a", "map", "where", "the", "object", "at", "index", "N", "from", "the", "first", "List", "is", "the", "key", "for", "the", "object", "at", "index", "N", "of", "the", "second", "List", ".", "<br", ">", "By", "default", "discards", "both", ...
train
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/utils/Mapper.java#L166-L168
netty/netty
codec-http2/src/main/java/io/netty/handler/codec/http2/HpackEncoder.java
HpackEncoder.encodeInteger
private static void encodeInteger(ByteBuf out, int mask, int n, int i) { """ Encode integer according to <a href="https://tools.ietf.org/html/rfc7541#section-5.1">Section 5.1</a>. """ encodeInteger(out, mask, n, (long) i); }
java
private static void encodeInteger(ByteBuf out, int mask, int n, int i) { encodeInteger(out, mask, n, (long) i); }
[ "private", "static", "void", "encodeInteger", "(", "ByteBuf", "out", ",", "int", "mask", ",", "int", "n", ",", "int", "i", ")", "{", "encodeInteger", "(", "out", ",", "mask", ",", "n", ",", "(", "long", ")", "i", ")", ";", "}" ]
Encode integer according to <a href="https://tools.ietf.org/html/rfc7541#section-5.1">Section 5.1</a>.
[ "Encode", "integer", "according", "to", "<a", "href", "=", "https", ":", "//", "tools", ".", "ietf", ".", "org", "/", "html", "/", "rfc7541#section", "-", "5", ".", "1", ">", "Section", "5", ".", "1<", "/", "a", ">", "." ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-http2/src/main/java/io/netty/handler/codec/http2/HpackEncoder.java#L227-L229
OpenLiberty/open-liberty
dev/com.ibm.ws.kernel.feature.core/src/com/ibm/ws/kernel/feature/internal/Provisioner.java
Provisioner.preStartBundles
@FFDCIgnore(BundleException.class) public BundleLifecycleStatus preStartBundles(List<Bundle> installedBundles) { """ Start all previously installed bundles, but defer (or not) the ACTIVATION of those bundles based on the Bundle-ActivationPolicy value set in MANIFEST.MF. Perform the resolve operation befor...
java
@FFDCIgnore(BundleException.class) public BundleLifecycleStatus preStartBundles(List<Bundle> installedBundles) { BundleLifecycleStatus startStatus = new BundleLifecycleStatus(); if (installedBundles == null || installedBundles.size() == 0) return startStatus; for (Bundle b : in...
[ "@", "FFDCIgnore", "(", "BundleException", ".", "class", ")", "public", "BundleLifecycleStatus", "preStartBundles", "(", "List", "<", "Bundle", ">", "installedBundles", ")", "{", "BundleLifecycleStatus", "startStatus", "=", "new", "BundleLifecycleStatus", "(", ")", ...
Start all previously installed bundles, but defer (or not) the ACTIVATION of those bundles based on the Bundle-ActivationPolicy value set in MANIFEST.MF. Perform the resolve operation before starting bundles to avoid intermittent issues with BundleException.STATECHANGED during Bundle start as other bundles resolve asy...
[ "Start", "all", "previously", "installed", "bundles", "but", "defer", "(", "or", "not", ")", "the", "ACTIVATION", "of", "those", "bundles", "based", "on", "the", "Bundle", "-", "ActivationPolicy", "value", "set", "in", "MANIFEST", ".", "MF", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.kernel.feature.core/src/com/ibm/ws/kernel/feature/internal/Provisioner.java#L498-L525
infinispan/infinispan
lucene/directory-provider/src/main/java/org/infinispan/hibernate/search/util/impl/JNDIHelper.java
JNDIHelper.addJNDIProperties
private static Properties addJNDIProperties(Properties properties, String prefix, HashSet<String> specialProps) { """ Creates a new {@code Properties} instance with all properties from {@code properties} which start with the given @param properties the original properties @param prefix the prefix indic...
java
private static Properties addJNDIProperties(Properties properties, String prefix, HashSet<String> specialProps) { Properties result = new Properties(); for (Object property : properties.keySet()) { if (property instanceof String) { String s = (String) property; if (s.indexOf...
[ "private", "static", "Properties", "addJNDIProperties", "(", "Properties", "properties", ",", "String", "prefix", ",", "HashSet", "<", "String", ">", "specialProps", ")", "{", "Properties", "result", "=", "new", "Properties", "(", ")", ";", "for", "(", "Object...
Creates a new {@code Properties} instance with all properties from {@code properties} which start with the given @param properties the original properties @param prefix the prefix indicating JNDI specific properties @param specialProps a set of property names to ignore @return Creates a new {@code Properties} ...
[ "Creates", "a", "new", "{", "@code", "Properties", "}", "instance", "with", "all", "properties", "from", "{", "@code", "properties", "}", "which", "start", "with", "the", "given" ]
train
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/lucene/directory-provider/src/main/java/org/infinispan/hibernate/search/util/impl/JNDIHelper.java#L44-L55
spring-projects/spring-flex
spring-flex-core/src/main/java/org/springframework/flex/messaging/MessageServiceConfigProcessor.java
MessageServiceConfigProcessor.findDefaultChannel
@Override public void findDefaultChannel(MessageBroker broker, Service service) { """ Tries to find a sensible default AMF channel for the default MessageService If a application-level default is set on the MessageBroker, that will be used. Otherwise will use the first AMFEndpoint from services-config.xml ...
java
@Override public void findDefaultChannel(MessageBroker broker, Service service) { if (!CollectionUtils.isEmpty(broker.getDefaultChannels())) { return; } Iterator<String> channels = broker.getChannelIds().iterator(); while (channels.hasNext()) { Endpoint endpo...
[ "@", "Override", "public", "void", "findDefaultChannel", "(", "MessageBroker", "broker", ",", "Service", "service", ")", "{", "if", "(", "!", "CollectionUtils", ".", "isEmpty", "(", "broker", ".", "getDefaultChannels", "(", ")", ")", ")", "{", "return", ";",...
Tries to find a sensible default AMF channel for the default MessageService If a application-level default is set on the MessageBroker, that will be used. Otherwise will use the first AMFEndpoint from services-config.xml that it finds with polling enabled. @param broker @param service
[ "Tries", "to", "find", "a", "sensible", "default", "AMF", "channel", "for", "the", "default", "MessageService" ]
train
https://github.com/spring-projects/spring-flex/blob/85f2bff300d74e2d77d565f97a09d12d18e19adc/spring-flex-core/src/main/java/org/springframework/flex/messaging/MessageServiceConfigProcessor.java#L63-L79
sculptor/sculptor
sculptor-generator/sculptor-generator-core/src/main/java/org/sculptor/generator/util/FactoryHelper.java
FactoryHelper.newInstanceFromName
public static Object newInstanceFromName(Object enclosingObject, String className) { """ Creates an instance from a String class name. @param genericAccessObjectManager @param className full class name @param classLoader the class will be loaded with this ClassLoader @return new instance of the class @thr...
java
public static Object newInstanceFromName(Object enclosingObject, String className) { return newInstanceFromName(enclosingObject, className, FactoryHelper.class.getClassLoader()); }
[ "public", "static", "Object", "newInstanceFromName", "(", "Object", "enclosingObject", ",", "String", "className", ")", "{", "return", "newInstanceFromName", "(", "enclosingObject", ",", "className", ",", "FactoryHelper", ".", "class", ".", "getClassLoader", "(", ")...
Creates an instance from a String class name. @param genericAccessObjectManager @param className full class name @param classLoader the class will be loaded with this ClassLoader @return new instance of the class @throws RuntimeException if class not found or could not be instantiated
[ "Creates", "an", "instance", "from", "a", "String", "class", "name", ".", "@param", "genericAccessObjectManager" ]
train
https://github.com/sculptor/sculptor/blob/38df06ceb7e40f5f52dbd53b1cd1d07ee11aade5/sculptor-generator/sculptor-generator-core/src/main/java/org/sculptor/generator/util/FactoryHelper.java#L49-L51
Azure/azure-sdk-for-java
recoveryservices/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/implementation/VaultsInner.java
VaultsInner.getByResourceGroupAsync
public Observable<VaultInner> getByResourceGroupAsync(String resourceGroupName, String vaultName) { """ Get the Vault details. @param resourceGroupName The name of the resource group where the recovery services vault is present. @param vaultName The name of the recovery services vault. @throws IllegalArgument...
java
public Observable<VaultInner> getByResourceGroupAsync(String resourceGroupName, String vaultName) { return getByResourceGroupWithServiceResponseAsync(resourceGroupName, vaultName).map(new Func1<ServiceResponse<VaultInner>, VaultInner>() { @Override public VaultInner call(ServiceResponse<...
[ "public", "Observable", "<", "VaultInner", ">", "getByResourceGroupAsync", "(", "String", "resourceGroupName", ",", "String", "vaultName", ")", "{", "return", "getByResourceGroupWithServiceResponseAsync", "(", "resourceGroupName", ",", "vaultName", ")", ".", "map", "(",...
Get the Vault details. @param resourceGroupName The name of the resource group where the recovery services vault is present. @param vaultName The name of the recovery services vault. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the VaultInner object
[ "Get", "the", "Vault", "details", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/recoveryservices/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/implementation/VaultsInner.java#L360-L367
fcrepo3/fcrepo
fcrepo-server/src/main/java/org/fcrepo/server/Parameterized.java
Parameterized.getParameter
public String getParameter(String name, boolean asAbsolutePath) { """ Gets the value of a named configuration parameter. Same as getParameter(String name) but prepends the location of FEDORA_HOME if asAbsolutePath is true and the parameter location does not already specify an absolute pathname. @param name ...
java
public String getParameter(String name, boolean asAbsolutePath) { if (!m_parameters.containsKey(name)) return null; String paramValue = m_parameters.get(name).getValue(); if (asAbsolutePath && paramValue != null) { File f = new File(paramValue); if (!f.isAbsolute()) { ...
[ "public", "String", "getParameter", "(", "String", "name", ",", "boolean", "asAbsolutePath", ")", "{", "if", "(", "!", "m_parameters", ".", "containsKey", "(", "name", ")", ")", "return", "null", ";", "String", "paramValue", "=", "m_parameters", ".", "get", ...
Gets the value of a named configuration parameter. Same as getParameter(String name) but prepends the location of FEDORA_HOME if asAbsolutePath is true and the parameter location does not already specify an absolute pathname. @param name The parameter name. @param asAbsolutePath Whether to return the parameter value a...
[ "Gets", "the", "value", "of", "a", "named", "configuration", "parameter", ".", "Same", "as", "getParameter", "(", "String", "name", ")", "but", "prepends", "the", "location", "of", "FEDORA_HOME", "if", "asAbsolutePath", "is", "true", "and", "the", "parameter",...
train
https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/Parameterized.java#L102-L113
nguillaumin/slick2d-maven
slick2d-core/src/main/java/org/newdawn/slick/opengl/TextureLoader.java
TextureLoader.getTexture
public static Texture getTexture(String format, InputStream in, int filter) throws IOException { """ Load a texture with a given format from the supplied input stream @param format The format of the texture to be loaded (something like "PNG" or "TGA") @param in The input stream from which the image data will b...
java
public static Texture getTexture(String format, InputStream in, int filter) throws IOException { return getTexture(format, in, false, filter); }
[ "public", "static", "Texture", "getTexture", "(", "String", "format", ",", "InputStream", "in", ",", "int", "filter", ")", "throws", "IOException", "{", "return", "getTexture", "(", "format", ",", "in", ",", "false", ",", "filter", ")", ";", "}" ]
Load a texture with a given format from the supplied input stream @param format The format of the texture to be loaded (something like "PNG" or "TGA") @param in The input stream from which the image data will be read @param filter The GL texture filter to use for scaling up and down @return The newly created texture @...
[ "Load", "a", "texture", "with", "a", "given", "format", "from", "the", "supplied", "input", "stream" ]
train
https://github.com/nguillaumin/slick2d-maven/blob/8251f88a0ed6a70e726d2468842455cd1f80893f/slick2d-core/src/main/java/org/newdawn/slick/opengl/TextureLoader.java#L49-L51
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.addCompositeEntityAsync
public Observable<UUID> addCompositeEntityAsync(UUID appId, String versionId, CompositeEntityModel compositeModelCreateObject) { """ Adds a composite entity extractor to the application. @param appId The application ID. @param versionId The version ID. @param compositeModelCreateObject A model containing the ...
java
public Observable<UUID> addCompositeEntityAsync(UUID appId, String versionId, CompositeEntityModel compositeModelCreateObject) { return addCompositeEntityWithServiceResponseAsync(appId, versionId, compositeModelCreateObject).map(new Func1<ServiceResponse<UUID>, UUID>() { @Override public...
[ "public", "Observable", "<", "UUID", ">", "addCompositeEntityAsync", "(", "UUID", "appId", ",", "String", "versionId", ",", "CompositeEntityModel", "compositeModelCreateObject", ")", "{", "return", "addCompositeEntityWithServiceResponseAsync", "(", "appId", ",", "versionI...
Adds a composite entity extractor to the application. @param appId The application ID. @param versionId The version ID. @param compositeModelCreateObject A model containing the name and children of the new entity extractor. @throws IllegalArgumentException thrown if parameters fail the validation @return the observabl...
[ "Adds", "a", "composite", "entity", "extractor", "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#L1577-L1584
mikepenz/FastAdapter
library-core/src/main/java/com/mikepenz/fastadapter/FastAdapter.java
FastAdapter.getHolderAdapterItem
@SuppressWarnings("unchecked") public static <Item extends IItem> Item getHolderAdapterItem(@Nullable RecyclerView.ViewHolder holder, int position) { """ convenient helper method to get the Item from a holder @param holder the ViewHolder for which we want to retrieve the item @param position the position...
java
@SuppressWarnings("unchecked") public static <Item extends IItem> Item getHolderAdapterItem(@Nullable RecyclerView.ViewHolder holder, int position) { if (holder != null) { Object tag = holder.itemView.getTag(com.mikepenz.fastadapter.R.id.fastadapter_item_adapter); if (tag instanceof ...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "<", "Item", "extends", "IItem", ">", "Item", "getHolderAdapterItem", "(", "@", "Nullable", "RecyclerView", ".", "ViewHolder", "holder", ",", "int", "position", ")", "{", "if", "(", "holde...
convenient helper method to get the Item from a holder @param holder the ViewHolder for which we want to retrieve the item @param position the position for which we want to retrieve the item @return the Item found for the given position and that ViewHolder
[ "convenient", "helper", "method", "to", "get", "the", "Item", "from", "a", "holder" ]
train
https://github.com/mikepenz/FastAdapter/blob/3b2412abe001ba58422e0125846b704d4dba4ae9/library-core/src/main/java/com/mikepenz/fastadapter/FastAdapter.java#L1403-L1412
Impetus/Kundera
src/jpa-engine/core/src/main/java/com/impetus/kundera/persistence/IdGenerator.java
IdGenerator.onTableGenerator
private Object onTableGenerator(EntityMetadata m, Client<?> client, IdDiscriptor keyValue, Object e) { """ Generate Id when given table generation strategy. @param m @param client @param keyValue @param e """ Object tablegenerator = getAutoGenClazz(client); if (tablegenerator instanceo...
java
private Object onTableGenerator(EntityMetadata m, Client<?> client, IdDiscriptor keyValue, Object e) { Object tablegenerator = getAutoGenClazz(client); if (tablegenerator instanceof TableGenerator) { Object generatedId = ((TableGenerator) tablegenerator).generate(keyValue.getT...
[ "private", "Object", "onTableGenerator", "(", "EntityMetadata", "m", ",", "Client", "<", "?", ">", "client", ",", "IdDiscriptor", "keyValue", ",", "Object", "e", ")", "{", "Object", "tablegenerator", "=", "getAutoGenClazz", "(", "client", ")", ";", "if", "("...
Generate Id when given table generation strategy. @param m @param client @param keyValue @param e
[ "Generate", "Id", "when", "given", "table", "generation", "strategy", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/jpa-engine/core/src/main/java/com/impetus/kundera/persistence/IdGenerator.java#L203-L226
codeprimate-software/cp-elements
src/main/java/org/cp/elements/lang/ElementsExceptionsFactory.java
ElementsExceptionsFactory.newRuleException
public static RuleException newRuleException(String message, Object... args) { """ Constructs and initializes a new {@link RuleException} with the given {@link String message} formatted with the given {@link Object[] arguments}. @param message {@link String} describing the {@link RuleException exception}. @pa...
java
public static RuleException newRuleException(String message, Object... args) { return newRuleException(null, message, args); }
[ "public", "static", "RuleException", "newRuleException", "(", "String", "message", ",", "Object", "...", "args", ")", "{", "return", "newRuleException", "(", "null", ",", "message", ",", "args", ")", ";", "}" ]
Constructs and initializes a new {@link RuleException} with the given {@link String message} formatted with the given {@link Object[] arguments}. @param message {@link String} describing the {@link RuleException exception}. @param args {@link Object[] arguments} used to replace format placeholders in the {@link String...
[ "Constructs", "and", "initializes", "a", "new", "{", "@link", "RuleException", "}", "with", "the", "given", "{", "@link", "String", "message", "}", "formatted", "with", "the", "given", "{", "@link", "Object", "[]", "arguments", "}", "." ]
train
https://github.com/codeprimate-software/cp-elements/blob/f2163c149fbbef05015e688132064ebcac7c49ab/src/main/java/org/cp/elements/lang/ElementsExceptionsFactory.java#L93-L95
BranchMetrics/android-branch-deep-linking
Branch-SDK/src/io/branch/referral/Branch.java
Branch.showInstallPrompt
public static boolean showInstallPrompt(@NonNull Activity activity, int requestCode) { """ Method shows play store install prompt for the full app. Thi passes the referrer to the installed application. The same deep link params as the instant app are provided to the full app up on Branch#initSession() @param a...
java
public static boolean showInstallPrompt(@NonNull Activity activity, int requestCode) { String installReferrerString = ""; if (Branch.getInstance() != null) { JSONObject latestReferringParams = Branch.getInstance().getLatestReferringParams(); String referringLinkKey = "~" + Define...
[ "public", "static", "boolean", "showInstallPrompt", "(", "@", "NonNull", "Activity", "activity", ",", "int", "requestCode", ")", "{", "String", "installReferrerString", "=", "\"\"", ";", "if", "(", "Branch", ".", "getInstance", "(", ")", "!=", "null", ")", "...
Method shows play store install prompt for the full app. Thi passes the referrer to the installed application. The same deep link params as the instant app are provided to the full app up on Branch#initSession() @param activity Current activity @param requestCode Request code for the activity to receive the result ...
[ "Method", "shows", "play", "store", "install", "prompt", "for", "the", "full", "app", ".", "Thi", "passes", "the", "referrer", "to", "the", "installed", "application", ".", "The", "same", "deep", "link", "params", "as", "the", "instant", "app", "are", "pro...
train
https://github.com/BranchMetrics/android-branch-deep-linking/blob/e3bee2ccfcbf6d4bf1a5815b5b86666e4ff8f848/Branch-SDK/src/io/branch/referral/Branch.java#L3972-L3992
googleapis/google-cloud-java
google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/deprecated/RegionOperationId.java
RegionOperationId.of
public static RegionOperationId of(RegionId regionId, String operation) { """ Returns a region operation identity given the region identity and the operation name. """ return new RegionOperationId(regionId.getProject(), regionId.getRegion(), operation); }
java
public static RegionOperationId of(RegionId regionId, String operation) { return new RegionOperationId(regionId.getProject(), regionId.getRegion(), operation); }
[ "public", "static", "RegionOperationId", "of", "(", "RegionId", "regionId", ",", "String", "operation", ")", "{", "return", "new", "RegionOperationId", "(", "regionId", ".", "getProject", "(", ")", ",", "regionId", ".", "getRegion", "(", ")", ",", "operation",...
Returns a region operation identity given the region identity and the operation name.
[ "Returns", "a", "region", "operation", "identity", "given", "the", "region", "identity", "and", "the", "operation", "name", "." ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/deprecated/RegionOperationId.java#L91-L93
JoeKerouac/utils
src/main/java/com/joe/utils/common/LunarCalendar.java
LunarCalendar.calElement
public static int[] calElement(int year, int month, int day) { """ 计算指定年月日对应的农历年月日 @param year 指定年 @param month 指定月 @param day 指定日 @return 农历的年月日数组,数组第一个为年,第二个为月,第三个为日 """ int[] nongDate = new int[3]; int i, temp = 0, leap; // Date baseDate = new Date(0, 0, 31); Date ba...
java
public static int[] calElement(int year, int month, int day) { int[] nongDate = new int[3]; int i, temp = 0, leap; // Date baseDate = new Date(0, 0, 31); Date baseDate = new GregorianCalendar(1900, 0, 31).getTime(); // Date objDate = new Date(y - 1900, m - 1, d); Date obj...
[ "public", "static", "int", "[", "]", "calElement", "(", "int", "year", ",", "int", "month", ",", "int", "day", ")", "{", "int", "[", "]", "nongDate", "=", "new", "int", "[", "3", "]", ";", "int", "i", ",", "temp", "=", "0", ",", "leap", ";", ...
计算指定年月日对应的农历年月日 @param year 指定年 @param month 指定月 @param day 指定日 @return 农历的年月日数组,数组第一个为年,第二个为月,第三个为日
[ "计算指定年月日对应的农历年月日" ]
train
https://github.com/JoeKerouac/utils/blob/45e1b2dc4d736956674fc4dcbe6cf84eaee69278/src/main/java/com/joe/utils/common/LunarCalendar.java#L92-L131
opencb/biodata
biodata-tools/src/main/java/org/opencb/biodata/tools/variant/metadata/VariantMetadataUtils.java
VariantMetadataUtils.readVariantFileMetadata
public static VariantFileMetadata readVariantFileMetadata(Path path, VariantFileMetadata fileMetadata) throws IOException { """ Reads the VariantSource from a Vcf file given a file Path @param path Path to the Vcf file @param fileMetadata Optional fileMetadata to fill up @return The read variant fi...
java
public static VariantFileMetadata readVariantFileMetadata(Path path, VariantFileMetadata fileMetadata) throws IOException { Objects.requireNonNull(path); try (InputStream is = FileUtils.newInputStream(path)) { return readVariantFileMetadata(new VariantVcfHtsjdkReader(is, fileMetadata.toVaria...
[ "public", "static", "VariantFileMetadata", "readVariantFileMetadata", "(", "Path", "path", ",", "VariantFileMetadata", "fileMetadata", ")", "throws", "IOException", "{", "Objects", ".", "requireNonNull", "(", "path", ")", ";", "try", "(", "InputStream", "is", "=", ...
Reads the VariantSource from a Vcf file given a file Path @param path Path to the Vcf file @param fileMetadata Optional fileMetadata to fill up @return The read variant fileMetadata @throws IOException if an I/O error occurs
[ "Reads", "the", "VariantSource", "from", "a", "Vcf", "file", "given", "a", "file", "Path" ]
train
https://github.com/opencb/biodata/blob/21b3d51d71f578efab908422aca4bab7a73097b1/biodata-tools/src/main/java/org/opencb/biodata/tools/variant/metadata/VariantMetadataUtils.java#L61-L66
aol/cyclops
cyclops/src/main/java/cyclops/companion/Streams.java
Streams.splitBy
public final static <T> Tuple2<Stream<T>, Stream<T>> splitBy(final Stream<T> stream, final Predicate<T> splitter) { """ Split stream at point where predicate no longer holds <pre> {@code ReactiveSeq.of(1, 2, 3, 4, 5, 6).splitBy(i->i<4) //Stream[1,2,3] Stream[4,5,6] } </pre> """ final Tuple2<Str...
java
public final static <T> Tuple2<Stream<T>, Stream<T>> splitBy(final Stream<T> stream, final Predicate<T> splitter) { final Tuple2<Stream<T>, Stream<T>> Tuple2 = duplicate(stream); return Tuple.tuple( takeWhile(Tuple2._1(), splitter), dropWhile(Tuple2._2(), splitter)); }
[ "public", "final", "static", "<", "T", ">", "Tuple2", "<", "Stream", "<", "T", ">", ",", "Stream", "<", "T", ">", ">", "splitBy", "(", "final", "Stream", "<", "T", ">", "stream", ",", "final", "Predicate", "<", "T", ">", "splitter", ")", "{", "fi...
Split stream at point where predicate no longer holds <pre> {@code ReactiveSeq.of(1, 2, 3, 4, 5, 6).splitBy(i->i<4) //Stream[1,2,3] Stream[4,5,6] } </pre>
[ "Split", "stream", "at", "point", "where", "predicate", "no", "longer", "holds", "<pre", ">", "{", "@code", "ReactiveSeq", ".", "of", "(", "1", "2", "3", "4", "5", "6", ")", ".", "splitBy", "(", "i", "-", ">", "i<4", ")" ]
train
https://github.com/aol/cyclops/blob/59a9fde30190a4d1faeb9f6d9851d209d82b81dd/cyclops/src/main/java/cyclops/companion/Streams.java#L843-L847
facebook/fresco
drawee/src/main/java/com/facebook/drawee/drawable/DrawableUtils.java
DrawableUtils.multiplyColorAlpha
public static int multiplyColorAlpha(int color, int alpha) { """ Multiplies the color with the given alpha. @param color color to be multiplied @param alpha value between 0 and 255 @return multiplied color """ if (alpha == 255) { return color; } if (alpha == 0) { return color & 0x00F...
java
public static int multiplyColorAlpha(int color, int alpha) { if (alpha == 255) { return color; } if (alpha == 0) { return color & 0x00FFFFFF; } alpha = alpha + (alpha >> 7); // make it 0..256 int colorAlpha = color >>> 24; int multipliedAlpha = colorAlpha * alpha >> 8; return...
[ "public", "static", "int", "multiplyColorAlpha", "(", "int", "color", ",", "int", "alpha", ")", "{", "if", "(", "alpha", "==", "255", ")", "{", "return", "color", ";", "}", "if", "(", "alpha", "==", "0", ")", "{", "return", "color", "&", "0x00FFFFFF"...
Multiplies the color with the given alpha. @param color color to be multiplied @param alpha value between 0 and 255 @return multiplied color
[ "Multiplies", "the", "color", "with", "the", "given", "alpha", "." ]
train
https://github.com/facebook/fresco/blob/0b85879d51c5036d5e46e627a6651afefc0b971a/drawee/src/main/java/com/facebook/drawee/drawable/DrawableUtils.java#L90-L101
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/IDNA.java
IDNA.convertIDNToUnicode
@Deprecated public static StringBuffer convertIDNToUnicode(StringBuffer src, int options) throws StringPrepParseException { """ IDNA2003: Convenience function that implements the IDNToUnicode operation as defined in the IDNA RFC. This operation is done on complete domain names, e.g: "www.example.com"....
java
@Deprecated public static StringBuffer convertIDNToUnicode(StringBuffer src, int options) throws StringPrepParseException{ return convertIDNToUnicode(src.toString(), options); }
[ "@", "Deprecated", "public", "static", "StringBuffer", "convertIDNToUnicode", "(", "StringBuffer", "src", ",", "int", "options", ")", "throws", "StringPrepParseException", "{", "return", "convertIDNToUnicode", "(", "src", ".", "toString", "(", ")", ",", "options", ...
IDNA2003: Convenience function that implements the IDNToUnicode operation as defined in the IDNA RFC. This operation is done on complete domain names, e.g: "www.example.com". <b>Note:</b> IDNA RFC specifies that a conformant application should divide a domain name into separate labels, decide whether to apply allowUna...
[ "IDNA2003", ":", "Convenience", "function", "that", "implements", "the", "IDNToUnicode", "operation", "as", "defined", "in", "the", "IDNA", "RFC", ".", "This", "operation", "is", "done", "on", "complete", "domain", "names", "e", ".", "g", ":", "www", ".", ...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/IDNA.java#L813-L817
jamesagnew/hapi-fhir
hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/index/DaoSearchParamSynchronizer.java
DaoSearchParamSynchronizer.tryToReuseIndexEntities
private <T extends BaseResourceIndex> void tryToReuseIndexEntities(List<T> theIndexesToRemove, List<T> theIndexesToAdd) { """ The logic here is that often times when we update a resource we are dropping one index row and adding another. This method tries to reuse rows that would otherwise have been deleted by up...
java
private <T extends BaseResourceIndex> void tryToReuseIndexEntities(List<T> theIndexesToRemove, List<T> theIndexesToAdd) { for (int addIndex = 0; addIndex < theIndexesToAdd.size(); addIndex++) { // If there are no more rows to remove, there's nothing we can reuse if (theIndexesToRemove.isEmpty()) { break; ...
[ "private", "<", "T", "extends", "BaseResourceIndex", ">", "void", "tryToReuseIndexEntities", "(", "List", "<", "T", ">", "theIndexesToRemove", ",", "List", "<", "T", ">", "theIndexesToAdd", ")", "{", "for", "(", "int", "addIndex", "=", "0", ";", "addIndex", ...
The logic here is that often times when we update a resource we are dropping one index row and adding another. This method tries to reuse rows that would otherwise have been deleted by updating them with the contents of rows that would have otherwise been added. In other words, we're trying to replace "one delete + one...
[ "The", "logic", "here", "is", "that", "often", "times", "when", "we", "update", "a", "resource", "we", "are", "dropping", "one", "index", "row", "and", "adding", "another", ".", "This", "method", "tries", "to", "reuse", "rows", "that", "would", "otherwise"...
train
https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/index/DaoSearchParamSynchronizer.java#L83-L100
phax/ph-web
ph-servlet/src/main/java/com/helger/servlet/response/UnifiedResponse.java
UnifiedResponse.setAllowMimeSniffing
@Nonnull public final UnifiedResponse setAllowMimeSniffing (final boolean bAllow) { """ When specifying <code>false</code>, this method uses a special response header to prevent certain browsers from MIME-sniffing a response away from the declared content-type. When passing <code>true</code>, that header is r...
java
@Nonnull public final UnifiedResponse setAllowMimeSniffing (final boolean bAllow) { if (bAllow) removeCustomResponseHeaders (CHttpHeader.X_CONTENT_TYPE_OPTIONS); else setCustomResponseHeader (CHttpHeader.X_CONTENT_TYPE_OPTIONS, CHttpHeader.VALUE_NOSNIFF); return this; }
[ "@", "Nonnull", "public", "final", "UnifiedResponse", "setAllowMimeSniffing", "(", "final", "boolean", "bAllow", ")", "{", "if", "(", "bAllow", ")", "removeCustomResponseHeaders", "(", "CHttpHeader", ".", "X_CONTENT_TYPE_OPTIONS", ")", ";", "else", "setCustomResponseH...
When specifying <code>false</code>, this method uses a special response header to prevent certain browsers from MIME-sniffing a response away from the declared content-type. When passing <code>true</code>, that header is removed. @param bAllow Whether or not sniffing should be allowed (default is <code>true</code>). @...
[ "When", "specifying", "<code", ">", "false<", "/", "code", ">", "this", "method", "uses", "a", "special", "response", "header", "to", "prevent", "certain", "browsers", "from", "MIME", "-", "sniffing", "a", "response", "away", "from", "the", "declared", "cont...
train
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-servlet/src/main/java/com/helger/servlet/response/UnifiedResponse.java#L1036-L1044
wkgcass/Style
src/main/java/net/cassite/style/aggregation/MapFuncSup.java
MapFuncSup.forEach
@SuppressWarnings("unchecked") public <R> R forEach(VFunc2<K, V> func) { """ define a function to deal with each entry in the map @param func a function takes in each entry from map @return return 'last loop value'.<br> check <a href="https://github.com/wkgcass/Style/">tutorial</a> for more info abo...
java
@SuppressWarnings("unchecked") public <R> R forEach(VFunc2<K, V> func) { return (R) forEach(Style.$(func)); }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "<", "R", ">", "R", "forEach", "(", "VFunc2", "<", "K", ",", "V", ">", "func", ")", "{", "return", "(", "R", ")", "forEach", "(", "Style", ".", "$", "(", "func", ")", ")", ";", "}" ]
define a function to deal with each entry in the map @param func a function takes in each entry from map @return return 'last loop value'.<br> check <a href="https://github.com/wkgcass/Style/">tutorial</a> for more info about 'last loop value'
[ "define", "a", "function", "to", "deal", "with", "each", "entry", "in", "the", "map" ]
train
https://github.com/wkgcass/Style/blob/db3ea64337251f46f734279480e365293bececbd/src/main/java/net/cassite/style/aggregation/MapFuncSup.java#L37-L40
apereo/cas
support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/util/OAuth20Utils.java
OAuth20Utils.getRegisteredOAuthServiceByClientId
public static OAuthRegisteredService getRegisteredOAuthServiceByClientId(final ServicesManager servicesManager, final String clientId) { """ Locate the requested instance of {@link OAuthRegisteredService} by the given clientId. @param servicesManager the service registry DAO instance. @param clientId th...
java
public static OAuthRegisteredService getRegisteredOAuthServiceByClientId(final ServicesManager servicesManager, final String clientId) { return getRegisteredOAuthServiceByPredicate(servicesManager, s -> s.getClientId().equals(clientId)); }
[ "public", "static", "OAuthRegisteredService", "getRegisteredOAuthServiceByClientId", "(", "final", "ServicesManager", "servicesManager", ",", "final", "String", "clientId", ")", "{", "return", "getRegisteredOAuthServiceByPredicate", "(", "servicesManager", ",", "s", "->", "...
Locate the requested instance of {@link OAuthRegisteredService} by the given clientId. @param servicesManager the service registry DAO instance. @param clientId the client id by which the {@link OAuthRegisteredService} is to be located. @return null, or the located {@link OAuthRegisteredService} instance in the...
[ "Locate", "the", "requested", "instance", "of", "{", "@link", "OAuthRegisteredService", "}", "by", "the", "given", "clientId", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/util/OAuth20Utils.java#L76-L78
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/map/impl/event/AbstractFilteringStrategy.java
AbstractFilteringStrategy.evaluateQueryEventFilter
protected boolean evaluateQueryEventFilter(EventFilter filter, Data dataKey, Object testValue, String mapNameOrNull) { """ Evalues the {@code filter} using a {@link CachedQueryEntry} together with the value {@link Extractors} configured for this map. The filter must be of {@link QueryEventFilter} type. @param ...
java
protected boolean evaluateQueryEventFilter(EventFilter filter, Data dataKey, Object testValue, String mapNameOrNull) { Extractors extractors = getExtractorsForMapName(mapNameOrNull); QueryEventFilter queryEventFilter = (QueryEventFilter) filter; QueryableEntry entry = new CachedQueryEntry(serial...
[ "protected", "boolean", "evaluateQueryEventFilter", "(", "EventFilter", "filter", ",", "Data", "dataKey", ",", "Object", "testValue", ",", "String", "mapNameOrNull", ")", "{", "Extractors", "extractors", "=", "getExtractorsForMapName", "(", "mapNameOrNull", ")", ";", ...
Evalues the {@code filter} using a {@link CachedQueryEntry} together with the value {@link Extractors} configured for this map. The filter must be of {@link QueryEventFilter} type. @param filter a {@link QueryEventFilter} filter @param dataKey the entry key @param testValue the value used to evaluate ...
[ "Evalues", "the", "{", "@code", "filter", "}", "using", "a", "{", "@link", "CachedQueryEntry", "}", "together", "with", "the", "value", "{", "@link", "Extractors", "}", "configured", "for", "this", "map", ".", "The", "filter", "must", "be", "of", "{", "@...
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/map/impl/event/AbstractFilteringStrategy.java#L72-L78
google/error-prone-javac
src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/util/Utils.java
Utils.replaceTabs
public String replaceTabs(Configuration configuration, String text) { """ Replace all tabs in a string with the appropriate number of spaces. The string may be a multi-line string. @param configuration the doclet configuration defining the setting for the tab length. @param text the text for which the tabs sho...
java
public String replaceTabs(Configuration configuration, String text) { if (!text.contains("\t")) return text; final int tabLength = configuration.sourcetab; final String whitespace = configuration.tabSpaces; final int textLength = text.length(); StringBuilder result =...
[ "public", "String", "replaceTabs", "(", "Configuration", "configuration", ",", "String", "text", ")", "{", "if", "(", "!", "text", ".", "contains", "(", "\"\\t\"", ")", ")", "return", "text", ";", "final", "int", "tabLength", "=", "configuration", ".", "so...
Replace all tabs in a string with the appropriate number of spaces. The string may be a multi-line string. @param configuration the doclet configuration defining the setting for the tab length. @param text the text for which the tabs should be expanded @return the text with all tabs expanded
[ "Replace", "all", "tabs", "in", "a", "string", "with", "the", "appropriate", "number", "of", "spaces", ".", "The", "string", "may", "be", "a", "multi", "-", "line", "string", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/util/Utils.java#L606-L635
apache/incubator-gobblin
gobblin-cluster/src/main/java/org/apache/gobblin/cluster/GobblinHelixDistributeJobExecutionLauncher.java
GobblinHelixDistributeJobExecutionLauncher.submitJobToHelix
private void submitJobToHelix(String jobName, String jobId, JobConfig.Builder jobConfigBuilder) throws Exception { """ Submit a planning job to helix so that it can launched from a remote node. @param jobName A planning job name which has prefix {@link GobblinClusterConfigurationKeys#PLANNING_JOB_NAME_PREFIX}. @...
java
private void submitJobToHelix(String jobName, String jobId, JobConfig.Builder jobConfigBuilder) throws Exception { TaskDriver taskDriver = new TaskDriver(this.planningJobHelixManager); HelixUtils.submitJobToWorkFlow(jobConfigBuilder, jobName, jobId, taskDriver, this.planningJobHe...
[ "private", "void", "submitJobToHelix", "(", "String", "jobName", ",", "String", "jobId", ",", "JobConfig", ".", "Builder", "jobConfigBuilder", ")", "throws", "Exception", "{", "TaskDriver", "taskDriver", "=", "new", "TaskDriver", "(", "this", ".", "planningJobHeli...
Submit a planning job to helix so that it can launched from a remote node. @param jobName A planning job name which has prefix {@link GobblinClusterConfigurationKeys#PLANNING_JOB_NAME_PREFIX}. @param jobId A planning job id created by {@link GobblinHelixDistributeJobExecutionLauncher#getPlanningJobId}. @param jobConf...
[ "Submit", "a", "planning", "job", "to", "helix", "so", "that", "it", "can", "launched", "from", "a", "remote", "node", "." ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-cluster/src/main/java/org/apache/gobblin/cluster/GobblinHelixDistributeJobExecutionLauncher.java#L252-L261
btrplace/scheduler
choco/src/main/java/org/btrplace/scheduler/choco/extensions/pack/VectorPackingPropagator.java
VectorPackingPropagator.assignItem
protected void assignItem(int item, int bin) throws ContradictionException { """ apply rule 2 (binLoad >= binAssignedLoad) when an item has been assign to the bin @throws ContradictionException if a contradiction (rule 2) is raised """ for (int d = 0; d < nbDims; d++) { filterLoadInf(d...
java
protected void assignItem(int item, int bin) throws ContradictionException { for (int d = 0; d < nbDims; d++) { filterLoadInf(d, bin, assignedLoad[d][bin].add(iSizes[d][item])); } if (decoKPSimple != null) { decoKPSimple.postAssignItem(item, bin); } }
[ "protected", "void", "assignItem", "(", "int", "item", ",", "int", "bin", ")", "throws", "ContradictionException", "{", "for", "(", "int", "d", "=", "0", ";", "d", "<", "nbDims", ";", "d", "++", ")", "{", "filterLoadInf", "(", "d", ",", "bin", ",", ...
apply rule 2 (binLoad >= binAssignedLoad) when an item has been assign to the bin @throws ContradictionException if a contradiction (rule 2) is raised
[ "apply", "rule", "2", "(", "binLoad", ">", "=", "binAssignedLoad", ")", "when", "an", "item", "has", "been", "assign", "to", "the", "bin" ]
train
https://github.com/btrplace/scheduler/blob/611063aad0b47a016e57ebf36fa4dfdf24de09e8/choco/src/main/java/org/btrplace/scheduler/choco/extensions/pack/VectorPackingPropagator.java#L326-L333
osmdroid/osmdroid
osmdroid-geopackage/src/main/java/org/osmdroid/gpkg/overlay/features/SphericalUtil.java
SphericalUtil.havDistance
static double havDistance(double lat1, double lat2, double dLng) { """ Returns hav() of distance from (lat1, lng1) to (lat2, lng2) on the unit sphere. """ return hav(lat1 - lat2) + hav(dLng) * cos(lat1) * cos(lat2); }
java
static double havDistance(double lat1, double lat2, double dLng) { return hav(lat1 - lat2) + hav(dLng) * cos(lat1) * cos(lat2); }
[ "static", "double", "havDistance", "(", "double", "lat1", ",", "double", "lat2", ",", "double", "dLng", ")", "{", "return", "hav", "(", "lat1", "-", "lat2", ")", "+", "hav", "(", "dLng", ")", "*", "cos", "(", "lat1", ")", "*", "cos", "(", "lat2", ...
Returns hav() of distance from (lat1, lng1) to (lat2, lng2) on the unit sphere.
[ "Returns", "hav", "()", "of", "distance", "from", "(", "lat1", "lng1", ")", "to", "(", "lat2", "lng2", ")", "on", "the", "unit", "sphere", "." ]
train
https://github.com/osmdroid/osmdroid/blob/3b178b2f078497dd88c137110e87aafe45ad2b16/osmdroid-geopackage/src/main/java/org/osmdroid/gpkg/overlay/features/SphericalUtil.java#L125-L127
goldmansachs/reladomo
reladomo/src/main/java/com/gs/fw/common/mithra/portal/MithraTransactionalPortal.java
MithraTransactionalPortal.checkTransactionParticipationAndWaitForOtherTransactions
private List checkTransactionParticipationAndWaitForOtherTransactions(List list, MithraTransaction tx) { """ /* returns null if the members of the list are not all participating in the transaction """ if (list == null) return null; List result = list; if (this.getTxParticipationMode(...
java
private List checkTransactionParticipationAndWaitForOtherTransactions(List list, MithraTransaction tx) { if (list == null) return null; List result = list; if (this.getTxParticipationMode(tx).mustParticipateInTxOnRead()) { for(int i=0;i<list.size();i++) ...
[ "private", "List", "checkTransactionParticipationAndWaitForOtherTransactions", "(", "List", "list", ",", "MithraTransaction", "tx", ")", "{", "if", "(", "list", "==", "null", ")", "return", "null", ";", "List", "result", "=", "list", ";", "if", "(", "this", "....
/* returns null if the members of the list are not all participating in the transaction
[ "/", "*", "returns", "null", "if", "the", "members", "of", "the", "list", "are", "not", "all", "participating", "in", "the", "transaction" ]
train
https://github.com/goldmansachs/reladomo/blob/e9a069452eece7a6ef9551caf81a69d3d9a3d990/reladomo/src/main/java/com/gs/fw/common/mithra/portal/MithraTransactionalPortal.java#L346-L363
jtrfp/javamod
src/main/java/de/quippy/javamod/multimedia/mp3/id3/MP3FileID3Controller.java
MP3FileID3Controller.setGenre
public void setGenre(String genre, int type) { """ Set the genre of this mp3. @param genre the genre of the mp3 """ if (allow(type&ID3V1)) { id3v1.setGenreString(genre); } if (allow(type&ID3V2)) { id3v2.setTextFrame(ID3v2Frames.CONTENT_TYPE, genre); } }
java
public void setGenre(String genre, int type) { if (allow(type&ID3V1)) { id3v1.setGenreString(genre); } if (allow(type&ID3V2)) { id3v2.setTextFrame(ID3v2Frames.CONTENT_TYPE, genre); } }
[ "public", "void", "setGenre", "(", "String", "genre", ",", "int", "type", ")", "{", "if", "(", "allow", "(", "type", "&", "ID3V1", ")", ")", "{", "id3v1", ".", "setGenreString", "(", "genre", ")", ";", "}", "if", "(", "allow", "(", "type", "&", "...
Set the genre of this mp3. @param genre the genre of the mp3
[ "Set", "the", "genre", "of", "this", "mp3", "." ]
train
https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/multimedia/mp3/id3/MP3FileID3Controller.java#L227-L237
lessthanoptimal/BoofCV
main/boofcv-feature/src/main/java/boofcv/alg/tracker/klt/KltTracker.java
KltTracker.computeGandE_border
protected int computeGandE_border(KltFeature feature, float cx, float cy) { """ When part of the region is outside the image G and E need to be recomputed """ computeSubImageBounds(feature, cx, cy); ImageMiscOps.fill(currDesc, Float.NaN); currDesc.subimage(dstX0, dstY0, dstX1, dstY1, subimage); inter...
java
protected int computeGandE_border(KltFeature feature, float cx, float cy) { computeSubImageBounds(feature, cx, cy); ImageMiscOps.fill(currDesc, Float.NaN); currDesc.subimage(dstX0, dstY0, dstX1, dstY1, subimage); interpInput.setImage(image); interpInput.region(srcX0, srcY0, subimage); int total = 0; G...
[ "protected", "int", "computeGandE_border", "(", "KltFeature", "feature", ",", "float", "cx", ",", "float", "cy", ")", "{", "computeSubImageBounds", "(", "feature", ",", "cx", ",", "cy", ")", ";", "ImageMiscOps", ".", "fill", "(", "currDesc", ",", "Float", ...
When part of the region is outside the image G and E need to be recomputed
[ "When", "part", "of", "the", "region", "is", "outside", "the", "image", "G", "and", "E", "need", "to", "be", "recomputed" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/tracker/klt/KltTracker.java#L379-L419
undertow-io/undertow
core/src/main/java/io/undertow/client/http/HttpResponseParser.java
HttpResponseParser.handleStatusCode
@SuppressWarnings("unused") final void handleStatusCode(ByteBuffer buffer, ResponseParseState state, HttpResponseBuilder builder) { """ Parses the status code. This is called from the generated bytecode. @param buffer The buffer @param state The current state @param builder The exchange builder ...
java
@SuppressWarnings("unused") final void handleStatusCode(ByteBuffer buffer, ResponseParseState state, HttpResponseBuilder builder) { StringBuilder stringBuilder = state.stringBuilder; while (buffer.hasRemaining()) { final char next = (char) buffer.get(); if (next == ' ' || nex...
[ "@", "SuppressWarnings", "(", "\"unused\"", ")", "final", "void", "handleStatusCode", "(", "ByteBuffer", "buffer", ",", "ResponseParseState", "state", ",", "HttpResponseBuilder", "builder", ")", "{", "StringBuilder", "stringBuilder", "=", "state", ".", "stringBuilder"...
Parses the status code. This is called from the generated bytecode. @param buffer The buffer @param state The current state @param builder The exchange builder @return The number of bytes remaining
[ "Parses", "the", "status", "code", ".", "This", "is", "called", "from", "the", "generated", "bytecode", "." ]
train
https://github.com/undertow-io/undertow/blob/87de0b856a7a4ba8faf5b659537b9af07b763263/core/src/main/java/io/undertow/client/http/HttpResponseParser.java#L175-L192
transloadit/java-sdk
src/main/java/com/transloadit/sdk/Template.java
Template.save
public Response save() throws RequestException, LocalOperationException { """ Submits the configured template to Transloadit. @return {@link Response} @throws RequestException if request to transloadit server fails. @throws LocalOperationException if something goes wrong while running non-http operations. ...
java
public Response save() throws RequestException, LocalOperationException { Map<String, Object> templateData = new HashMap<String, Object>(); templateData.put("name", name); options.put("steps", steps.toMap()); templateData.put("template", options); Request request = new Request(...
[ "public", "Response", "save", "(", ")", "throws", "RequestException", ",", "LocalOperationException", "{", "Map", "<", "String", ",", "Object", ">", "templateData", "=", "new", "HashMap", "<", "String", ",", "Object", ">", "(", ")", ";", "templateData", ".",...
Submits the configured template to Transloadit. @return {@link Response} @throws RequestException if request to transloadit server fails. @throws LocalOperationException if something goes wrong while running non-http operations.
[ "Submits", "the", "configured", "template", "to", "Transloadit", "." ]
train
https://github.com/transloadit/java-sdk/blob/9326c540a66f77b3d907d0b2c05bff1145ca14f7/src/main/java/com/transloadit/sdk/Template.java#L62-L71
mapbox/mapbox-navigation-android
libandroid-navigation/src/main/java/com/mapbox/services/android/navigation/v5/utils/MeasurementUtils.java
MeasurementUtils.userTrueDistanceFromStep
public static double userTrueDistanceFromStep(Point usersRawLocation, LegStep step) { """ Calculates the distance between the users current raw {@link android.location.Location} object to the closest {@link Point} in the {@link LegStep}. @param usersRawLocation {@link Point} the raw location where the user is ...
java
public static double userTrueDistanceFromStep(Point usersRawLocation, LegStep step) { // Check that the leg step contains geometry. if (TextUtils.isEmpty(step.geometry())) { return 0; } // Get the lineString from the step geometry. LineString lineString = LineString.fromPolyline(step.geometry...
[ "public", "static", "double", "userTrueDistanceFromStep", "(", "Point", "usersRawLocation", ",", "LegStep", "step", ")", "{", "// Check that the leg step contains geometry.", "if", "(", "TextUtils", ".", "isEmpty", "(", "step", ".", "geometry", "(", ")", ")", ")", ...
Calculates the distance between the users current raw {@link android.location.Location} object to the closest {@link Point} in the {@link LegStep}. @param usersRawLocation {@link Point} the raw location where the user is currently located @param step {@link LegStep} to calculate the closest point on the st...
[ "Calculates", "the", "distance", "between", "the", "users", "current", "raw", "{", "@link", "android", ".", "location", ".", "Location", "}", "object", "to", "the", "closest", "{", "@link", "Point", "}", "in", "the", "{", "@link", "LegStep", "}", "." ]
train
https://github.com/mapbox/mapbox-navigation-android/blob/375a89c017d360b9defc2c90d0c03468165162ec/libandroid-navigation/src/main/java/com/mapbox/services/android/navigation/v5/utils/MeasurementUtils.java#L31-L65
Azure/azure-sdk-for-java
appservice/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/appservice/v2018_02_01/implementation/AppServiceCertificateOrdersInner.java
AppServiceCertificateOrdersInner.listCertificatesAsync
public Observable<Page<AppServiceCertificateResourceInner>> listCertificatesAsync(final String resourceGroupName, final String certificateOrderName) { """ List all certificates associated with a certificate order. List all certificates associated with a certificate order. @param resourceGroupName Name of the r...
java
public Observable<Page<AppServiceCertificateResourceInner>> listCertificatesAsync(final String resourceGroupName, final String certificateOrderName) { return listCertificatesWithServiceResponseAsync(resourceGroupName, certificateOrderName) .map(new Func1<ServiceResponse<Page<AppServiceCertificateRes...
[ "public", "Observable", "<", "Page", "<", "AppServiceCertificateResourceInner", ">", ">", "listCertificatesAsync", "(", "final", "String", "resourceGroupName", ",", "final", "String", "certificateOrderName", ")", "{", "return", "listCertificatesWithServiceResponseAsync", "(...
List all certificates associated with a certificate order. List all certificates associated with a certificate order. @param resourceGroupName Name of the resource group to which the resource belongs. @param certificateOrderName Name of the certificate order. @throws IllegalArgumentException thrown if parameters fail ...
[ "List", "all", "certificates", "associated", "with", "a", "certificate", "order", ".", "List", "all", "certificates", "associated", "with", "a", "certificate", "order", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/appservice/v2018_02_01/implementation/AppServiceCertificateOrdersInner.java#L1003-L1011
meltmedia/cadmium
cli/src/main/java/com/meltmedia/cadmium/cli/BranchCreator.java
BranchCreator.createNewBranch
private void createNewBranch(String prefix, String basename, boolean empty, Logger log) throws Exception { """ Creates a new branch with the name formatted as <i>prefix</i>-<i>basename</i> if prefix is null then just the basename is used. If empty is true then the new branch will be empty otherwise it will creat...
java
private void createNewBranch(String prefix, String basename, boolean empty, Logger log) throws Exception { String currentBranch = clonedRemote.getBranchName(); String newBranchName = (StringUtils.isNotBlank(prefix)?prefix.trim()+"-":"")+basename.trim(); String oldBranchName = (StringUtils.isNotBlank(prefix)...
[ "private", "void", "createNewBranch", "(", "String", "prefix", ",", "String", "basename", ",", "boolean", "empty", ",", "Logger", "log", ")", "throws", "Exception", "{", "String", "currentBranch", "=", "clonedRemote", ".", "getBranchName", "(", ")", ";", "Stri...
Creates a new branch with the name formatted as <i>prefix</i>-<i>basename</i> if prefix is null then just the basename is used. If empty is true then the new branch will be empty otherwise it will created from a branch with the same formatted name but a basename of master. @param prefix @param basename @param empty @p...
[ "Creates", "a", "new", "branch", "with", "the", "name", "formatted", "as", "<i", ">", "prefix<", "/", "i", ">", "-", "<i", ">", "basename<", "/", "i", ">", "if", "prefix", "is", "null", "then", "just", "the", "basename", "is", "used", ".", "If", "e...
train
https://github.com/meltmedia/cadmium/blob/bca585030e141803a73b58abb128d130157b6ddf/cli/src/main/java/com/meltmedia/cadmium/cli/BranchCreator.java#L96-L116
sagiegurari/fax4j
src/main/java/org/fax4j/common/ApacheCommonsLogger.java
ApacheCommonsLogger.logImpl
@Override protected void logImpl(LogLevel level,Object[] message,Throwable throwable) { """ Logs the provided data. @param level The log level @param message The message parts (may be null) @param throwable The error (may be null) """ //format log message (without exception) S...
java
@Override protected void logImpl(LogLevel level,Object[] message,Throwable throwable) { //format log message (without exception) String text=this.formatLogMessage(level,message,null); //get log level int levelValue=level.getValue(); switch(levelValue) { ...
[ "@", "Override", "protected", "void", "logImpl", "(", "LogLevel", "level", ",", "Object", "[", "]", "message", ",", "Throwable", "throwable", ")", "{", "//format log message (without exception)", "String", "text", "=", "this", ".", "formatLogMessage", "(", "level"...
Logs the provided data. @param level The log level @param message The message parts (may be null) @param throwable The error (may be null)
[ "Logs", "the", "provided", "data", "." ]
train
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/common/ApacheCommonsLogger.java#L54-L75
alkacon/opencms-core
src/org/opencms/jsp/CmsJspTagPdfThumbnail.java
CmsJspTagPdfThumbnail.pdfTagAction
public static String pdfTagAction(ServletRequest request, String file, int width, int height, String format) throws CmsException { """ The implementation of the tag.<p> @param request the current request @param file the path to the PDF @param width the thumbnail width @param height the thumbnail height ...
java
public static String pdfTagAction(ServletRequest request, String file, int width, int height, String format) throws CmsException { CmsFlexController controller = CmsFlexController.getController(request); CmsObject cms = controller.getCmsObject(); CmsResource pdfRes = cms.readResource(file);...
[ "public", "static", "String", "pdfTagAction", "(", "ServletRequest", "request", ",", "String", "file", ",", "int", "width", ",", "int", "height", ",", "String", "format", ")", "throws", "CmsException", "{", "CmsFlexController", "controller", "=", "CmsFlexControlle...
The implementation of the tag.<p> @param request the current request @param file the path to the PDF @param width the thumbnail width @param height the thumbnail height @param format the image format @throws CmsException if something goes wrong @return the link to the PDF thumbnail
[ "The", "implementation", "of", "the", "tag", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/CmsJspTagPdfThumbnail.java#L72-L80
elki-project/elki
addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/svg/SVGHyperCube.java
SVGHyperCube.drawFilled
public static Element drawFilled(SVGPlot svgp, String cls, Projection2D proj, SpatialComparable box) { """ Filled hypercube. @param svgp SVG Plot @param cls CSS class to use. @param proj Visualization projection @param box Bounding box @return group element """ Element group = svgp.svgElement(SVGCon...
java
public static Element drawFilled(SVGPlot svgp, String cls, Projection2D proj, SpatialComparable box) { Element group = svgp.svgElement(SVGConstants.SVG_G_TAG); ArrayList<double[]> edges = getVisibleEdges(proj, box); final int dim = box.getDimensionality(); double[] min = new double[dim]; for(int i =...
[ "public", "static", "Element", "drawFilled", "(", "SVGPlot", "svgp", ",", "String", "cls", ",", "Projection2D", "proj", ",", "SpatialComparable", "box", ")", "{", "Element", "group", "=", "svgp", ".", "svgElement", "(", "SVGConstants", ".", "SVG_G_TAG", ")", ...
Filled hypercube. @param svgp SVG Plot @param cls CSS class to use. @param proj Visualization projection @param box Bounding box @return group element
[ "Filled", "hypercube", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/svg/SVGHyperCube.java#L152-L163
haifengl/smile
math/src/main/java/smile/math/Math.java
Math.JensenShannonDivergence
public static double JensenShannonDivergence(SparseArray x, SparseArray y) { """ Jensen-Shannon divergence JS(P||Q) = (KL(P||M) + KL(Q||M)) / 2, where M = (P+Q)/2. The Jensen-Shannon divergence is a popular method of measuring the similarity between two probability distributions. It is also known as information...
java
public static double JensenShannonDivergence(SparseArray x, SparseArray y) { if (x.isEmpty()) { throw new IllegalArgumentException("List x is empty."); } if (y.isEmpty()) { throw new IllegalArgumentException("List y is empty."); } Iterator<SparseArray.En...
[ "public", "static", "double", "JensenShannonDivergence", "(", "SparseArray", "x", ",", "SparseArray", "y", ")", "{", "if", "(", "x", ".", "isEmpty", "(", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"List x is empty.\"", ")", ";", "}", "...
Jensen-Shannon divergence JS(P||Q) = (KL(P||M) + KL(Q||M)) / 2, where M = (P+Q)/2. The Jensen-Shannon divergence is a popular method of measuring the similarity between two probability distributions. It is also known as information radius or total divergence to the average. It is based on the Kullback-Leibler divergenc...
[ "Jensen", "-", "Shannon", "divergence", "JS", "(", "P||Q", ")", "=", "(", "KL", "(", "P||M", ")", "+", "KL", "(", "Q||M", "))", "/", "2", "where", "M", "=", "(", "P", "+", "Q", ")", "/", "2", ".", "The", "Jensen", "-", "Shannon", "divergence", ...
train
https://github.com/haifengl/smile/blob/e27e43e90fbaacce3f99d30120cf9dd6a764c33d/math/src/main/java/smile/math/Math.java#L2413-L2449
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/StringSearch.java
StringSearch.initializePatternPCETable
private int initializePatternPCETable() { """ Initializing the pce table for a pattern. Stores non-ignorable collation keys. Table size will be estimated by the size of the pattern text. Table expansion will be perform as we go along. Adding 1 to ensure that the table size definitely increases. @return total ...
java
private int initializePatternPCETable() { long[] pcetable = new long[INITIAL_ARRAY_SIZE_]; int pcetablesize = pcetable.length; int patternlength = pattern_.text_.length(); CollationElementIterator coleiter = utilIter_; if (coleiter == null) { coleiter = new Collation...
[ "private", "int", "initializePatternPCETable", "(", ")", "{", "long", "[", "]", "pcetable", "=", "new", "long", "[", "INITIAL_ARRAY_SIZE_", "]", ";", "int", "pcetablesize", "=", "pcetable", ".", "length", ";", "int", "patternlength", "=", "pattern_", ".", "t...
Initializing the pce table for a pattern. Stores non-ignorable collation keys. Table size will be estimated by the size of the pattern text. Table expansion will be perform as we go along. Adding 1 to ensure that the table size definitely increases. @return total number of expansions
[ "Initializing", "the", "pce", "table", "for", "a", "pattern", ".", "Stores", "non", "-", "ignorable", "collation", "keys", ".", "Table", "size", "will", "be", "estimated", "by", "the", "size", "of", "the", "pattern", "text", ".", "Table", "expansion", "wil...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/StringSearch.java#L733-L766
apache/groovy
subprojects/groovy-sql/src/main/java/groovy/sql/Sql.java
Sql.firstRow
public GroovyRowResult firstRow(String sql, List<Object> params) throws SQLException { """ Performs the given SQL query and return the first row of the result set. The query may contain placeholder question marks which match the given list of parameters. <p> Example usages: <pre> def ans = sql.firstRow("selec...
java
public GroovyRowResult firstRow(String sql, List<Object> params) throws SQLException { List<GroovyRowResult> rows = null; try { rows = rows(sql, params, 1, 1, null); } //should be SQLFeatureNotSupportedException instead once we move to Java 1.6 catch (SQLException fea...
[ "public", "GroovyRowResult", "firstRow", "(", "String", "sql", ",", "List", "<", "Object", ">", "params", ")", "throws", "SQLException", "{", "List", "<", "GroovyRowResult", ">", "rows", "=", "null", ";", "try", "{", "rows", "=", "rows", "(", "sql", ",",...
Performs the given SQL query and return the first row of the result set. The query may contain placeholder question marks which match the given list of parameters. <p> Example usages: <pre> def ans = sql.firstRow("select * from PERSON where lastname like ?", ['%a%']) println ans.firstname </pre> If your database return...
[ "Performs", "the", "given", "SQL", "query", "and", "return", "the", "first", "row", "of", "the", "result", "set", ".", "The", "query", "may", "contain", "placeholder", "question", "marks", "which", "match", "the", "given", "list", "of", "parameters", ".", ...
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/subprojects/groovy-sql/src/main/java/groovy/sql/Sql.java#L2249-L2260
teatrove/teatrove
teaapps/src/main/java/org/teatrove/teaapps/contexts/CryptoContext.java
CryptoContext.calculateRFC2104HMAC
public String calculateRFC2104HMAC(String data, String key) throws java.security.SignatureException { """ Computes RFC 2104-compliant HMAC signature. @param data The data to be signed. @param key The signing key. @return The Base64-encoded RFC 2104-compliant HMAC signature. @throws java.security....
java
public String calculateRFC2104HMAC(String data, String key) throws java.security.SignatureException { String result; try { // get an hmac_sha1 key from the raw key bytes SecretKeySpec signingKey = new SecretKeySpec(key.getBytes(), HMAC_SHA1_ALGOR...
[ "public", "String", "calculateRFC2104HMAC", "(", "String", "data", ",", "String", "key", ")", "throws", "java", ".", "security", ".", "SignatureException", "{", "String", "result", ";", "try", "{", "// get an hmac_sha1 key from the raw key bytes", "SecretKeySpec", "si...
Computes RFC 2104-compliant HMAC signature. @param data The data to be signed. @param key The signing key. @return The Base64-encoded RFC 2104-compliant HMAC signature. @throws java.security.SignatureException when signature generation fails
[ "Computes", "RFC", "2104", "-", "compliant", "HMAC", "signature", "." ]
train
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/teaapps/src/main/java/org/teatrove/teaapps/contexts/CryptoContext.java#L97-L121
casbin/jcasbin
src/main/java/org/casbin/jcasbin/main/Enforcer.java
Enforcer.getPermissionsForUserInDomain
public List<List<String>> getPermissionsForUserInDomain(String user, String domain) { """ getPermissionsForUserInDomain gets permissions for a user or role inside a domain. @param user the user. @param domain the domain. @return the permissions, a permission is usually like (obj, act). It is actually the rule...
java
public List<List<String>> getPermissionsForUserInDomain(String user, String domain) { return getFilteredPolicy(0, user, domain); }
[ "public", "List", "<", "List", "<", "String", ">", ">", "getPermissionsForUserInDomain", "(", "String", "user", ",", "String", "domain", ")", "{", "return", "getFilteredPolicy", "(", "0", ",", "user", ",", "domain", ")", ";", "}" ]
getPermissionsForUserInDomain gets permissions for a user or role inside a domain. @param user the user. @param domain the domain. @return the permissions, a permission is usually like (obj, act). It is actually the rule without the subject.
[ "getPermissionsForUserInDomain", "gets", "permissions", "for", "a", "user", "or", "role", "inside", "a", "domain", "." ]
train
https://github.com/casbin/jcasbin/blob/b46d7a756b6c39cdb17e0600607e5fcdc66edd11/src/main/java/org/casbin/jcasbin/main/Enforcer.java#L374-L376
hypercube1024/firefly
firefly-common/src/main/java/com/firefly/utils/function/Actions.java
Actions.toFunc
public static <T1, T2, T3, T4, T5, T6> Func6<T1, T2, T3, T4, T5, T6, Void> toFunc( final Action6<T1, T2, T3, T4, T5, T6> action) { """ Converts an {@link Action6} to a function that calls the action and returns {@code null}. @param action the {@link Action6} to convert @return a {@link Func6} that ...
java
public static <T1, T2, T3, T4, T5, T6> Func6<T1, T2, T3, T4, T5, T6, Void> toFunc( final Action6<T1, T2, T3, T4, T5, T6> action) { return toFunc(action, (Void) null); }
[ "public", "static", "<", "T1", ",", "T2", ",", "T3", ",", "T4", ",", "T5", ",", "T6", ">", "Func6", "<", "T1", ",", "T2", ",", "T3", ",", "T4", ",", "T5", ",", "T6", ",", "Void", ">", "toFunc", "(", "final", "Action6", "<", "T1", ",", "T2",...
Converts an {@link Action6} to a function that calls the action and returns {@code null}. @param action the {@link Action6} to convert @return a {@link Func6} that calls {@code action} and returns {@code null}
[ "Converts", "an", "{", "@link", "Action6", "}", "to", "a", "function", "that", "calls", "the", "action", "and", "returns", "{", "@code", "null", "}", "." ]
train
https://github.com/hypercube1024/firefly/blob/ed3fc75b7c54a65b1e7d8141d01b49144bb423a3/firefly-common/src/main/java/com/firefly/utils/function/Actions.java#L146-L149
JodaOrg/joda-beans
src/main/java/org/joda/beans/ser/json/AbstractJsonReader.java
AbstractJsonReader.parseRoot
<T> T parseRoot(JsonInput input, Class<T> declaredType) throws Exception { """ Parses the root bean. @param input the JSON input @param declaredType the declared type, not null @return the bean, not null @throws Exception if an error occurs """ this.input = input; Object parsed = parseO...
java
<T> T parseRoot(JsonInput input, Class<T> declaredType) throws Exception { this.input = input; Object parsed = parseObject(input.acceptEvent(JsonEvent.OBJECT), declaredType, null, null, null, true); return declaredType.cast(parsed); }
[ "<", "T", ">", "T", "parseRoot", "(", "JsonInput", "input", ",", "Class", "<", "T", ">", "declaredType", ")", "throws", "Exception", "{", "this", ".", "input", "=", "input", ";", "Object", "parsed", "=", "parseObject", "(", "input", ".", "acceptEvent", ...
Parses the root bean. @param input the JSON input @param declaredType the declared type, not null @return the bean, not null @throws Exception if an error occurs
[ "Parses", "the", "root", "bean", "." ]
train
https://github.com/JodaOrg/joda-beans/blob/f07dbe42947150b23a173f35984c6ab33c5529bf/src/main/java/org/joda/beans/ser/json/AbstractJsonReader.java#L84-L88
looly/hutool
hutool-db/src/main/java/cn/hutool/db/StatementUtil.java
StatementUtil.prepareStatement
public static PreparedStatement prepareStatement(Connection conn, SqlBuilder sqlBuilder) throws SQLException { """ 创建{@link PreparedStatement} @param conn 数据库连接 @param sqlBuilder {@link SqlBuilder}包括SQL语句和参数 @return {@link PreparedStatement} @throws SQLException SQL异常 @since 4.1.3 """ return prepareS...
java
public static PreparedStatement prepareStatement(Connection conn, SqlBuilder sqlBuilder) throws SQLException { return prepareStatement(conn, sqlBuilder.build(), sqlBuilder.getParamValueArray()); }
[ "public", "static", "PreparedStatement", "prepareStatement", "(", "Connection", "conn", ",", "SqlBuilder", "sqlBuilder", ")", "throws", "SQLException", "{", "return", "prepareStatement", "(", "conn", ",", "sqlBuilder", ".", "build", "(", ")", ",", "sqlBuilder", "....
创建{@link PreparedStatement} @param conn 数据库连接 @param sqlBuilder {@link SqlBuilder}包括SQL语句和参数 @return {@link PreparedStatement} @throws SQLException SQL异常 @since 4.1.3
[ "创建", "{", "@link", "PreparedStatement", "}" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-db/src/main/java/cn/hutool/db/StatementUtil.java#L110-L112
molgenis/molgenis
molgenis-data-postgresql/src/main/java/org/molgenis/data/postgresql/PostgreSqlExceptionTranslator.java
PostgreSqlExceptionTranslator.translateUniqueKeyViolation
MolgenisValidationException translateUniqueKeyViolation(PSQLException pSqlException) { """ Package private for testability @param pSqlException PostgreSQL exception @return translated validation exception """ ServerErrorMessage serverErrorMessage = pSqlException.getServerErrorMessage(); String tabl...
java
MolgenisValidationException translateUniqueKeyViolation(PSQLException pSqlException) { ServerErrorMessage serverErrorMessage = pSqlException.getServerErrorMessage(); String tableName = serverErrorMessage.getTable(); String detailMessage = serverErrorMessage.getDetail(); Matcher matcher = Pattern...
[ "MolgenisValidationException", "translateUniqueKeyViolation", "(", "PSQLException", "pSqlException", ")", "{", "ServerErrorMessage", "serverErrorMessage", "=", "pSqlException", ".", "getServerErrorMessage", "(", ")", ";", "String", "tableName", "=", "serverErrorMessage", ".",...
Package private for testability @param pSqlException PostgreSQL exception @return translated validation exception
[ "Package", "private", "for", "testability" ]
train
https://github.com/molgenis/molgenis/blob/b4d0d6b27e6f6c8d7505a3863dc03b589601f987/molgenis-data-postgresql/src/main/java/org/molgenis/data/postgresql/PostgreSqlExceptionTranslator.java#L391-L456
JodaOrg/joda-time
src/main/java/org/joda/time/Interval.java
Interval.withDurationAfterStart
public Interval withDurationAfterStart(ReadableDuration duration) { """ Creates a new interval with the specified duration after the start instant. @param duration the duration to add to the start to get the new end instant, null means zero @return an interval with the start from this interval and a calculate...
java
public Interval withDurationAfterStart(ReadableDuration duration) { long durationMillis = DateTimeUtils.getDurationMillis(duration); if (durationMillis == toDurationMillis()) { return this; } Chronology chrono = getChronology(); long startMillis = getStartMillis(); ...
[ "public", "Interval", "withDurationAfterStart", "(", "ReadableDuration", "duration", ")", "{", "long", "durationMillis", "=", "DateTimeUtils", ".", "getDurationMillis", "(", "duration", ")", ";", "if", "(", "durationMillis", "==", "toDurationMillis", "(", ")", ")", ...
Creates a new interval with the specified duration after the start instant. @param duration the duration to add to the start to get the new end instant, null means zero @return an interval with the start from this interval and a calculated end @throws IllegalArgumentException if the duration is negative
[ "Creates", "a", "new", "interval", "with", "the", "specified", "duration", "after", "the", "start", "instant", "." ]
train
https://github.com/JodaOrg/joda-time/blob/bd79f1c4245e79b3c2c56d7b04fde2a6e191fa42/src/main/java/org/joda/time/Interval.java#L498-L507
googolmo/OkVolley
sample/src/main/java/im/amomo/volley/sample/DrawerFragment.java
DrawerFragment.setUp
public void setUp(int fragmentId, DrawerLayout drawerLayout) { """ Users of this fragment must call this method to set up the navigation drawer interactions. @param fragmentId The android:id of this fragment in its activity's layout. @param drawerLayout The DrawerLayout containing this fragment's UI. """...
java
public void setUp(int fragmentId, DrawerLayout drawerLayout) { mFragmentContainerView = getActivity().findViewById(fragmentId); mDrawerLayout = drawerLayout; // set a custom shadow that overlays the main content when the drawer opens mDrawerLayout.setDrawerShadow(R.drawable.drawer_shado...
[ "public", "void", "setUp", "(", "int", "fragmentId", ",", "DrawerLayout", "drawerLayout", ")", "{", "mFragmentContainerView", "=", "getActivity", "(", ")", ".", "findViewById", "(", "fragmentId", ")", ";", "mDrawerLayout", "=", "drawerLayout", ";", "// set a custo...
Users of this fragment must call this method to set up the navigation drawer interactions. @param fragmentId The android:id of this fragment in its activity's layout. @param drawerLayout The DrawerLayout containing this fragment's UI.
[ "Users", "of", "this", "fragment", "must", "call", "this", "method", "to", "set", "up", "the", "navigation", "drawer", "interactions", "." ]
train
https://github.com/googolmo/OkVolley/blob/5c41df7cf1a8156c85e179a3c4af8a1c1485ffec/sample/src/main/java/im/amomo/volley/sample/DrawerFragment.java#L87-L138
VoltDB/voltdb
src/frontend/org/voltdb/utils/PersistentBinaryDeque.java
PersistentBinaryDeque.getSegmentFileName
private String getSegmentFileName(long currentId, long previousId) { """ Return a segment file name from m_nonce and current + previous segment ids. @see parseFiles for file name structure @param currentId current segment id @param previousId previous segment id @return segment file name """ ...
java
private String getSegmentFileName(long currentId, long previousId) { return PbdSegmentName.createName(m_nonce, currentId, previousId, false); }
[ "private", "String", "getSegmentFileName", "(", "long", "currentId", ",", "long", "previousId", ")", "{", "return", "PbdSegmentName", ".", "createName", "(", "m_nonce", ",", "currentId", ",", "previousId", ",", "false", ")", ";", "}" ]
Return a segment file name from m_nonce and current + previous segment ids. @see parseFiles for file name structure @param currentId current segment id @param previousId previous segment id @return segment file name
[ "Return", "a", "segment", "file", "name", "from", "m_nonce", "and", "current", "+", "previous", "segment", "ids", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/PersistentBinaryDeque.java#L463-L465
imsweb/naaccr-xml
src/main/java/com/imsweb/naaccrxml/SpecificationVersion.java
SpecificationVersion.compareSpecifications
public static int compareSpecifications(String spec1, String spec2) { """ Compare the two provided specifications. Result is undefined if any of them is not supported. @param spec1 first version to compare @param spec2 second version to compare @return negative integer if first version is smaller, 0 if they are...
java
public static int compareSpecifications(String spec1, String spec2) { String[] parts1 = StringUtils.split(spec1, '.'); Integer major1 = Integer.valueOf(parts1[0]); Integer minor1 = Integer.valueOf(parts1[1]); String[] parts2 = StringUtils.split(spec2, '.'); Integer major2 = Inte...
[ "public", "static", "int", "compareSpecifications", "(", "String", "spec1", ",", "String", "spec2", ")", "{", "String", "[", "]", "parts1", "=", "StringUtils", ".", "split", "(", "spec1", ",", "'", "'", ")", ";", "Integer", "major1", "=", "Integer", ".",...
Compare the two provided specifications. Result is undefined if any of them is not supported. @param spec1 first version to compare @param spec2 second version to compare @return negative integer if first version is smaller, 0 if they are the same, positive integer otherwise
[ "Compare", "the", "two", "provided", "specifications", ".", "Result", "is", "undefined", "if", "any", "of", "them", "is", "not", "supported", "." ]
train
https://github.com/imsweb/naaccr-xml/blob/a3a501faa2a0c3411dd5248b2c1379f279131696/src/main/java/com/imsweb/naaccrxml/SpecificationVersion.java#L43-L55
Azure/azure-sdk-for-java
logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/WorkflowRunActionsInner.java
WorkflowRunActionsInner.listExpressionTraces
public List<ExpressionRootInner> listExpressionTraces(String resourceGroupName, String workflowName, String runName, String actionName) { """ Lists a workflow run expression trace. @param resourceGroupName The resource group name. @param workflowName The workflow name. @param runName The workflow run name. @...
java
public List<ExpressionRootInner> listExpressionTraces(String resourceGroupName, String workflowName, String runName, String actionName) { return listExpressionTracesWithServiceResponseAsync(resourceGroupName, workflowName, runName, actionName).toBlocking().single().body(); }
[ "public", "List", "<", "ExpressionRootInner", ">", "listExpressionTraces", "(", "String", "resourceGroupName", ",", "String", "workflowName", ",", "String", "runName", ",", "String", "actionName", ")", "{", "return", "listExpressionTracesWithServiceResponseAsync", "(", ...
Lists a workflow run expression trace. @param resourceGroupName The resource group name. @param workflowName The workflow name. @param runName The workflow run name. @param actionName The workflow action name. @throws IllegalArgumentException thrown if parameters fail the validation @throws CloudException thrown if th...
[ "Lists", "a", "workflow", "run", "expression", "trace", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/WorkflowRunActionsInner.java#L458-L460
google/closure-templates
java/src/com/google/template/soy/sharedpasses/render/EvalVisitor.java
EvalVisitor.computeFunctionHelper
@ForOverride protected SoyValue computeFunctionHelper( SoyJavaSourceFunction fn, List<SoyValue> args, final FunctionNode fnNode) { """ Protected helper for {@code computeFunction}. @param fn The function object. @param args The arguments to the function. @param fnNode The function node. Only used for ...
java
@ForOverride protected SoyValue computeFunctionHelper( SoyJavaSourceFunction fn, List<SoyValue> args, final FunctionNode fnNode) { try { return new TofuValueFactory(fnNode, pluginInstances).computeForJava(fn, args, context); } catch (Exception e) { throw RenderException.create( "Wh...
[ "@", "ForOverride", "protected", "SoyValue", "computeFunctionHelper", "(", "SoyJavaSourceFunction", "fn", ",", "List", "<", "SoyValue", ">", "args", ",", "final", "FunctionNode", "fnNode", ")", "{", "try", "{", "return", "new", "TofuValueFactory", "(", "fnNode", ...
Protected helper for {@code computeFunction}. @param fn The function object. @param args The arguments to the function. @param fnNode The function node. Only used for error reporting. @return The result of the function called on the given arguments.
[ "Protected", "helper", "for", "{", "@code", "computeFunction", "}", "." ]
train
https://github.com/google/closure-templates/blob/cc61e1dff70ae97f24f417a57410081bc498bd56/java/src/com/google/template/soy/sharedpasses/render/EvalVisitor.java#L733-L742
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java
Utils.getFirstContainerForPredicate
public static EObject getFirstContainerForPredicate(EObject element, Function1<? super EObject, ? extends Boolean> predicate) { """ Returns the closest {@link EObject#eContainer() container object} that is validating the predicate. @param element the element to start from. @param predicate the predicate to tes...
java
public static EObject getFirstContainerForPredicate(EObject element, Function1<? super EObject, ? extends Boolean> predicate) { if (predicate == null || element == null) { return null; } EObject elt = element.eContainer(); while (elt != null) { if (predicate.apply(elt)) { return elt; } elt = elt...
[ "public", "static", "EObject", "getFirstContainerForPredicate", "(", "EObject", "element", ",", "Function1", "<", "?", "super", "EObject", ",", "?", "extends", "Boolean", ">", "predicate", ")", "{", "if", "(", "predicate", "==", "null", "||", "element", "==", ...
Returns the closest {@link EObject#eContainer() container object} that is validating the predicate. @param element the element to start from. @param predicate the predicate to test. @return the container or {@code null}. @since 0.5 @see EcoreUtil2#getContainerOfType(EObject, Class)
[ "Returns", "the", "closest", "{", "@link", "EObject#eContainer", "()", "container", "object", "}", "that", "is", "validating", "the", "predicate", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/Utils.java#L1323-L1335
google/error-prone-javac
src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java
HtmlDocletWriter.addSummaryComment
public void addSummaryComment(Doc doc, Content htmltree) { """ Adds the summary content. @param doc the doc for which the summary will be generated @param htmltree the documentation tree to which the summary will be added """ addSummaryComment(doc, doc.firstSentenceTags(), htmltree); }
java
public void addSummaryComment(Doc doc, Content htmltree) { addSummaryComment(doc, doc.firstSentenceTags(), htmltree); }
[ "public", "void", "addSummaryComment", "(", "Doc", "doc", ",", "Content", "htmltree", ")", "{", "addSummaryComment", "(", "doc", ",", "doc", ".", "firstSentenceTags", "(", ")", ",", "htmltree", ")", ";", "}" ]
Adds the summary content. @param doc the doc for which the summary will be generated @param htmltree the documentation tree to which the summary will be added
[ "Adds", "the", "summary", "content", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java#L1440-L1442
ReactiveX/RxJavaAsyncUtil
src/main/java/rx/util/async/Async.java
Async.toAsyncThrowing
public static <T1, R> Func1<T1, Observable<R>> toAsyncThrowing(ThrowingFunc1<? super T1, ? extends R> func) { """ 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.png" a...
java
public static <T1, R> Func1<T1, Observable<R>> toAsyncThrowing(ThrowingFunc1<? super T1, ? extends R> func) { return toAsyncThrowing(func, Schedulers.computation()); }
[ "public", "static", "<", "T1", ",", "R", ">", "Func1", "<", "T1", ",", "Observable", "<", "R", ">", ">", "toAsyncThrowing", "(", "ThrowingFunc1", "<", "?", "super", "T1", ",", "?", "extends", "R", ">", "func", ")", "{", "return", "toAsyncThrowing", "...
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.png" alt=""> @param <T1> first parameter type of the action @param <R> the result type @param func the function to convert @re...
[ "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#L223-L225
Bedework/bw-util
bw-util-directory/src/main/java/org/bedework/util/directory/common/DirRecord.java
DirRecord.attrValCompare
public int attrValCompare(Object val, String attrName, boolean ignoreCase) throws NamingException { """ Extract the target attribute from this record then compare the given single value with the attribute value(s). @param val @param attrName @param ignoreCase @return -2 for not e...
java
public int attrValCompare(Object val, String attrName, boolean ignoreCase) throws NamingException { Attribute a = findAttr(attrName); if (a == null) { return -2; } return attrValCompare(val, a, ignoreCase); }
[ "public", "int", "attrValCompare", "(", "Object", "val", ",", "String", "attrName", ",", "boolean", "ignoreCase", ")", "throws", "NamingException", "{", "Attribute", "a", "=", "findAttr", "(", "attrName", ")", ";", "if", "(", "a", "==", "null", ")", "{", ...
Extract the target attribute from this record then compare the given single value with the attribute value(s). @param val @param attrName @param ignoreCase @return -2 for not equal or not present in multi-valued attribute -1 for val &lt; that 0 for val = that 1 for val &gt; that 2 for val present in multi-valued attr ...
[ "Extract", "the", "target", "attribute", "from", "this", "record", "then", "compare", "the", "given", "single", "value", "with", "the", "attribute", "value", "(", "s", ")", "." ]
train
https://github.com/Bedework/bw-util/blob/f51de4af3d7eb88fe63a0e22be8898a16c6cc3ad/bw-util-directory/src/main/java/org/bedework/util/directory/common/DirRecord.java#L418-L426
eclipse/hawkbit
hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/components/SPUIComponentProvider.java
SPUIComponentProvider.createLastModifiedByLabel
public static Label createLastModifiedByLabel(final VaadinMessageSource i18n, final BaseEntity baseEntity) { """ Create label which represents the {@link BaseEntity#getLastModifiedBy()} by user name @param i18n the i18n @param baseEntity the entity @return the label """ return createUsernameLab...
java
public static Label createLastModifiedByLabel(final VaadinMessageSource i18n, final BaseEntity baseEntity) { return createUsernameLabel(i18n.getMessage("label.modified.by"), baseEntity == null ? "" : baseEntity.getLastModifiedBy()); }
[ "public", "static", "Label", "createLastModifiedByLabel", "(", "final", "VaadinMessageSource", "i18n", ",", "final", "BaseEntity", "baseEntity", ")", "{", "return", "createUsernameLabel", "(", "i18n", ".", "getMessage", "(", "\"label.modified.by\"", ")", ",", "baseEnt...
Create label which represents the {@link BaseEntity#getLastModifiedBy()} by user name @param i18n the i18n @param baseEntity the entity @return the label
[ "Create", "label", "which", "represents", "the", "{", "@link", "BaseEntity#getLastModifiedBy", "()", "}", "by", "user", "name" ]
train
https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/components/SPUIComponentProvider.java#L248-L251
crawljax/crawljax
core/src/main/java/com/crawljax/core/state/StateMachine.java
StateMachine.addStateToCurrentState
private StateVertex addStateToCurrentState(StateVertex newState, Eventable eventable) { """ Adds the newState and the edge between the currentState and the newState on the SFG. @param newState the new state. @param eventable the clickable causing the new state. @return the clone state iff newState is a clone...
java
private StateVertex addStateToCurrentState(StateVertex newState, Eventable eventable) { LOGGER.debug("addStateToCurrentState currentState: {} newState {}", currentState.getName(), newState.getName()); // Add the state to the stateFlowGraph. Store the result StateVertex cloneState = stateFlowGraph.putIfAbsent...
[ "private", "StateVertex", "addStateToCurrentState", "(", "StateVertex", "newState", ",", "Eventable", "eventable", ")", "{", "LOGGER", ".", "debug", "(", "\"addStateToCurrentState currentState: {} newState {}\"", ",", "currentState", ".", "getName", "(", ")", ",", "newS...
Adds the newState and the edge between the currentState and the newState on the SFG. @param newState the new state. @param eventable the clickable causing the new state. @return the clone state iff newState is a clone, else returns null
[ "Adds", "the", "newState", "and", "the", "edge", "between", "the", "currentState", "and", "the", "newState", "on", "the", "SFG", "." ]
train
https://github.com/crawljax/crawljax/blob/d339f4f622ca902ccd35322065821e52a62ec543/core/src/main/java/com/crawljax/core/state/StateMachine.java#L97-L121
OpenLiberty/open-liberty
dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ws/traceinfo/ejbcontainer/TEEJBInvocationInfoBase.java
TEEJBInvocationInfoBase.writeDeployedSupportInfo
protected static void writeDeployedSupportInfo(EJSDeployedSupport s, StringBuffer sbuf, EJSWrapperBase wrapper, Throwable t) { """ Collects all the method call information from the input EJSDeploySupport, EJSWrapperBase and Throwable objects, converts them to their textual representation and write it out to the ...
java
protected static void writeDeployedSupportInfo(EJSDeployedSupport s, StringBuffer sbuf, EJSWrapperBase wrapper, Throwable t) { BeanId beanId = wrapper.beanId; // d163197 EJBMethodInfoImpl mInfo = s.getEJBMethodInfoImpl(); ContainerTx containerTx = s.getCurrentTx(); sbuf ...
[ "protected", "static", "void", "writeDeployedSupportInfo", "(", "EJSDeployedSupport", "s", ",", "StringBuffer", "sbuf", ",", "EJSWrapperBase", "wrapper", ",", "Throwable", "t", ")", "{", "BeanId", "beanId", "=", "wrapper", ".", "beanId", ";", "// d163197", "EJBMet...
Collects all the method call information from the input EJSDeploySupport, EJSWrapperBase and Throwable objects, converts them to their textual representation and write it out to the input <i>sbuf</i>.
[ "Collects", "all", "the", "method", "call", "information", "from", "the", "input", "EJSDeploySupport", "EJSWrapperBase", "and", "Throwable", "objects", "converts", "them", "to", "their", "textual", "representation", "and", "write", "it", "out", "to", "the", "input...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ws/traceinfo/ejbcontainer/TEEJBInvocationInfoBase.java#L53-L77
jcuda/jcusparse
JCusparseJava/src/main/java/jcuda/jcusparse/JCusparse.java
JCusparse.cusparseSgtsv_nopivot
public static int cusparseSgtsv_nopivot( cusparseHandle handle, int m, int n, Pointer dl, Pointer d, Pointer du, Pointer B, int ldb) { """ <pre> Description: Solution of tridiagonal linear system A * X = B, with multiple right-hand-si...
java
public static int cusparseSgtsv_nopivot( cusparseHandle handle, int m, int n, Pointer dl, Pointer d, Pointer du, Pointer B, int ldb) { return checkResult(cusparseSgtsv_nopivotNative(handle, m, n, dl, d, du, B, ldb)); }
[ "public", "static", "int", "cusparseSgtsv_nopivot", "(", "cusparseHandle", "handle", ",", "int", "m", ",", "int", "n", ",", "Pointer", "dl", ",", "Pointer", "d", ",", "Pointer", "du", ",", "Pointer", "B", ",", "int", "ldb", ")", "{", "return", "checkResu...
<pre> Description: Solution of tridiagonal linear system A * X = B, with multiple right-hand-sides. The coefficient matrix A is composed of lower (dl), main (d) and upper (du) diagonals, and the right-hand-sides B are overwritten with the solution X. These routine does not use pivoting. </pre>
[ "<pre", ">", "Description", ":", "Solution", "of", "tridiagonal", "linear", "system", "A", "*", "X", "=", "B", "with", "multiple", "right", "-", "hand", "-", "sides", ".", "The", "coefficient", "matrix", "A", "is", "composed", "of", "lower", "(", "dl", ...
train
https://github.com/jcuda/jcusparse/blob/7687a62a4ef6b76cb91cf7da93d4cf5ade96a791/JCusparseJava/src/main/java/jcuda/jcusparse/JCusparse.java#L8318-L8329
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/jobexecutor/ExecuteJobHelper.java
ExecuteJobHelper.callFailedJobListenerWithRetries
private static OptimisticLockingException callFailedJobListenerWithRetries(CommandExecutor commandExecutor, FailedJobListener failedJobListener) { """ Calls FailedJobListener, in case of OptimisticLockException retries configured amount of times. @return exception or null if succeeded """ try { co...
java
private static OptimisticLockingException callFailedJobListenerWithRetries(CommandExecutor commandExecutor, FailedJobListener failedJobListener) { try { commandExecutor.execute(failedJobListener); return null; } catch (OptimisticLockingException ex) { failedJobListener.incrementCountRetries();...
[ "private", "static", "OptimisticLockingException", "callFailedJobListenerWithRetries", "(", "CommandExecutor", "commandExecutor", ",", "FailedJobListener", "failedJobListener", ")", "{", "try", "{", "commandExecutor", ".", "execute", "(", "failedJobListener", ")", ";", "ret...
Calls FailedJobListener, in case of OptimisticLockException retries configured amount of times. @return exception or null if succeeded
[ "Calls", "FailedJobListener", "in", "case", "of", "OptimisticLockException", "retries", "configured", "amount", "of", "times", "." ]
train
https://github.com/camunda/camunda-bpm-platform/blob/1a464fc887ef3760e53d6f91b9e5b871a0d77cc0/engine/src/main/java/org/camunda/bpm/engine/impl/jobexecutor/ExecuteJobHelper.java#L93-L104
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/NodeSet.java
NodeSet.addNodes
public void addNodes(NodeIterator iterator) { """ Copy NodeList members into this nodelist, adding in document order. Null references are not added. @param iterator NodeIterator which yields the nodes to be added. @throws RuntimeException thrown if this NodeSet is not of a mutable type. """ if (!m_...
java
public void addNodes(NodeIterator iterator) { if (!m_mutable) throw new RuntimeException(XSLMessages.createXPATHMessage(XPATHErrorResources.ER_NODESET_NOT_MUTABLE, null)); //"This NodeSet is not mutable!"); if (null != iterator) // defensive to fix a bug that Sanjiva reported. { Node obj; ...
[ "public", "void", "addNodes", "(", "NodeIterator", "iterator", ")", "{", "if", "(", "!", "m_mutable", ")", "throw", "new", "RuntimeException", "(", "XSLMessages", ".", "createXPATHMessage", "(", "XPATHErrorResources", ".", "ER_NODESET_NOT_MUTABLE", ",", "null", ")...
Copy NodeList members into this nodelist, adding in document order. Null references are not added. @param iterator NodeIterator which yields the nodes to be added. @throws RuntimeException thrown if this NodeSet is not of a mutable type.
[ "Copy", "NodeList", "members", "into", "this", "nodelist", "adding", "in", "document", "order", ".", "Null", "references", "are", "not", "added", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/NodeSet.java#L488-L505
jmurty/java-xmlbuilder
src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java
BaseXMLBuilder.insertInstructionImpl
protected void insertInstructionImpl(String target, String data) { """ Insert an instruction before the element represented by this builder node. @param target the target value for the instruction. @param data the data value for the instruction """ getDocument().insertBefore( getDocum...
java
protected void insertInstructionImpl(String target, String data) { getDocument().insertBefore( getDocument().createProcessingInstruction(target, data), xmlNode); }
[ "protected", "void", "insertInstructionImpl", "(", "String", "target", ",", "String", "data", ")", "{", "getDocument", "(", ")", ".", "insertBefore", "(", "getDocument", "(", ")", ".", "createProcessingInstruction", "(", "target", ",", "data", ")", ",", "xmlNo...
Insert an instruction before the element represented by this builder node. @param target the target value for the instruction. @param data the data value for the instruction
[ "Insert", "an", "instruction", "before", "the", "element", "represented", "by", "this", "builder", "node", "." ]
train
https://github.com/jmurty/java-xmlbuilder/blob/7c224b8e8ed79808509322cb141dab5a88dd3cec/src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java#L893-L897