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
wildfly/wildfly-core
server/src/main/java/org/jboss/as/server/deployment/DeploymentResourceSupport.java
DeploymentResourceSupport.getDeploymentSubModel
public ModelNode getDeploymentSubModel(final String subsystemName, final PathAddress address) { """ Gets the sub-model for a components from the deployment itself. Operations, metrics and descriptions have to be registered as part of the subsystem registration {@link org.jboss.as.controller.ExtensionContext} and ...
java
public ModelNode getDeploymentSubModel(final String subsystemName, final PathAddress address) { assert subsystemName != null : "The subsystemName cannot be null"; assert address != null : "The address cannot be null"; return getDeploymentSubModel(subsystemName, address, null, deploymentUnit); ...
[ "public", "ModelNode", "getDeploymentSubModel", "(", "final", "String", "subsystemName", ",", "final", "PathAddress", "address", ")", "{", "assert", "subsystemName", "!=", "null", ":", "\"The subsystemName cannot be null\"", ";", "assert", "address", "!=", "null", ":"...
Gets the sub-model for a components from the deployment itself. Operations, metrics and descriptions have to be registered as part of the subsystem registration {@link org.jboss.as.controller.ExtensionContext} and {@link org.jboss.as.controller.SubsystemRegistration#registerDeploymentModel(org.jboss.as.controller.Resou...
[ "Gets", "the", "sub", "-", "model", "for", "a", "components", "from", "the", "deployment", "itself", ".", "Operations", "metrics", "and", "descriptions", "have", "to", "be", "registered", "as", "part", "of", "the", "subsystem", "registration", "{", "@link", ...
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/server/src/main/java/org/jboss/as/server/deployment/DeploymentResourceSupport.java#L176-L180
defei/codelogger-utils
src/main/java/org/codelogger/utils/DateUtils.java
DateUtils.subMinutes
public static long subMinutes(final Date date1, final Date date2) { """ Get how many minutes between two date. @param date1 date to be tested. @param date2 date to be tested. @return how many minutes between two date. """ return subTime(date1, date2, DatePeriod.MINUTE); }
java
public static long subMinutes(final Date date1, final Date date2) { return subTime(date1, date2, DatePeriod.MINUTE); }
[ "public", "static", "long", "subMinutes", "(", "final", "Date", "date1", ",", "final", "Date", "date2", ")", "{", "return", "subTime", "(", "date1", ",", "date2", ",", "DatePeriod", ".", "MINUTE", ")", ";", "}" ]
Get how many minutes between two date. @param date1 date to be tested. @param date2 date to be tested. @return how many minutes between two date.
[ "Get", "how", "many", "minutes", "between", "two", "date", "." ]
train
https://github.com/defei/codelogger-utils/blob/d906f5d217b783c7ae3e53442cd6fb87b20ecc0a/src/main/java/org/codelogger/utils/DateUtils.java#L423-L426
radkovo/CSSBox
src/main/java/org/fit/cssbox/demo/SimpleBrowser.java
SimpleBrowser.initComponents
private void initComponents(URL baseurl) { """ Creates and initializes the GUI components @param baseurl The base URL of the document used for completing the relative paths """ documentScroll = new javax.swing.JScrollPane(); //Create the browser canvas browserCanvas = new Brow...
java
private void initComponents(URL baseurl) { documentScroll = new javax.swing.JScrollPane(); //Create the browser canvas browserCanvas = new BrowserCanvas(docroot, decoder, new java.awt.Dimension(1000, 600), baseurl); //A simple mouse listener that displays the coordinates c...
[ "private", "void", "initComponents", "(", "URL", "baseurl", ")", "{", "documentScroll", "=", "new", "javax", ".", "swing", ".", "JScrollPane", "(", ")", ";", "//Create the browser canvas", "browserCanvas", "=", "new", "BrowserCanvas", "(", "docroot", ",", "decod...
Creates and initializes the GUI components @param baseurl The base URL of the document used for completing the relative paths
[ "Creates", "and", "initializes", "the", "GUI", "components" ]
train
https://github.com/radkovo/CSSBox/blob/38aaf8f22d233d7b4dbc12a56cdbc72b447bc559/src/main/java/org/fit/cssbox/demo/SimpleBrowser.java#L78-L109
RKumsher/utils
src/main/java/com/github/rkumsher/number/RandomNumberUtils.java
RandomNumberUtils.randomLongGreaterThan
public static long randomLongGreaterThan(long minExclusive) { """ Returns a random long that is greater than the given long. @param minExclusive the value that returned long must be greater than @return the random long @throws IllegalArgumentException if minExclusive is greater than or equal to {@link Long#M...
java
public static long randomLongGreaterThan(long minExclusive) { checkArgument( minExclusive < Long.MAX_VALUE, "Cannot produce long greater than %s", Long.MAX_VALUE); return randomLong(minExclusive + 1, Long.MAX_VALUE); }
[ "public", "static", "long", "randomLongGreaterThan", "(", "long", "minExclusive", ")", "{", "checkArgument", "(", "minExclusive", "<", "Long", ".", "MAX_VALUE", ",", "\"Cannot produce long greater than %s\"", ",", "Long", ".", "MAX_VALUE", ")", ";", "return", "rando...
Returns a random long that is greater than the given long. @param minExclusive the value that returned long must be greater than @return the random long @throws IllegalArgumentException if minExclusive is greater than or equal to {@link Long#MAX_VALUE}
[ "Returns", "a", "random", "long", "that", "is", "greater", "than", "the", "given", "long", "." ]
train
https://github.com/RKumsher/utils/blob/fcdb190569cd0288249bf4b46fd418f8c01d1caf/src/main/java/com/github/rkumsher/number/RandomNumberUtils.java#L139-L143
ManfredTremmel/gwt-commons-lang3
src/main/java/org/apache/commons/lang3/builder/EqualsBuilder.java
EqualsBuilder.isRegistered
@GwtIncompatible("incompatible method") static boolean isRegistered(final Object lhs, final Object rhs) { """ <p> Returns <code>true</code> if the registry contains the given object pair. Used by the reflection methods to avoid infinite loops. Objects might be swapped therefore a check is needed if the obje...
java
@GwtIncompatible("incompatible method") static boolean isRegistered(final Object lhs, final Object rhs) { final Set<Pair<IDKey, IDKey>> registry = getRegistry(); final Pair<IDKey, IDKey> pair = getRegisterPair(lhs, rhs); final Pair<IDKey, IDKey> swappedPair = Pair.of(pair.getRight(), pair.ge...
[ "@", "GwtIncompatible", "(", "\"incompatible method\"", ")", "static", "boolean", "isRegistered", "(", "final", "Object", "lhs", ",", "final", "Object", "rhs", ")", "{", "final", "Set", "<", "Pair", "<", "IDKey", ",", "IDKey", ">", ">", "registry", "=", "g...
<p> Returns <code>true</code> if the registry contains the given object pair. Used by the reflection methods to avoid infinite loops. Objects might be swapped therefore a check is needed if the object pair is registered in given or swapped order. </p> @param lhs <code>this</code> object to lookup in registry @param rh...
[ "<p", ">", "Returns", "<code", ">", "true<", "/", "code", ">", "if", "the", "registry", "contains", "the", "given", "object", "pair", ".", "Used", "by", "the", "reflection", "methods", "to", "avoid", "infinite", "loops", ".", "Objects", "might", "be", "s...
train
https://github.com/ManfredTremmel/gwt-commons-lang3/blob/9e2dfbbda3668cfa5d935fe76479d1426c294504/src/main/java/org/apache/commons/lang3/builder/EqualsBuilder.java#L161-L169
openengsb/openengsb
components/edb/src/main/java/org/openengsb/core/edb/jpa/internal/Diff.java
Diff.addNewObjects
private void addNewObjects(List<EDBObject> tempList) { """ add all new object to the diff collection. As base to indicate if an object is new, the list of elements from the end state which are left is taken. """ for (EDBObject b : tempList) { String oid = b.getOID(); ObjectDiff...
java
private void addNewObjects(List<EDBObject> tempList) { for (EDBObject b : tempList) { String oid = b.getOID(); ObjectDiff odiff = new ObjectDiff(this.startCommit, this.endCommit, null, b); if (odiff.getDifferenceCount() > 0) { diff.put(oid, odiff); ...
[ "private", "void", "addNewObjects", "(", "List", "<", "EDBObject", ">", "tempList", ")", "{", "for", "(", "EDBObject", "b", ":", "tempList", ")", "{", "String", "oid", "=", "b", ".", "getOID", "(", ")", ";", "ObjectDiff", "odiff", "=", "new", "ObjectDi...
add all new object to the diff collection. As base to indicate if an object is new, the list of elements from the end state which are left is taken.
[ "add", "all", "new", "object", "to", "the", "diff", "collection", ".", "As", "base", "to", "indicate", "if", "an", "object", "is", "new", "the", "list", "of", "elements", "from", "the", "end", "state", "which", "are", "left", "is", "taken", "." ]
train
https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/components/edb/src/main/java/org/openengsb/core/edb/jpa/internal/Diff.java#L93-L101
JodaOrg/joda-time
src/main/java/org/joda/time/format/DateTimeFormat.java
DateTimeFormat.isNumericToken
private static boolean isNumericToken(String token) { """ Returns true if token should be parsed as a numeric field. @param token the token to parse @return true if numeric field """ int tokenLen = token.length(); if (tokenLen > 0) { char c = token.charAt(0); switch...
java
private static boolean isNumericToken(String token) { int tokenLen = token.length(); if (tokenLen > 0) { char c = token.charAt(0); switch (c) { case 'c': // century (number) case 'C': // century of era (number) case 'x': // weekyear (number) ...
[ "private", "static", "boolean", "isNumericToken", "(", "String", "token", ")", "{", "int", "tokenLen", "=", "token", ".", "length", "(", ")", ";", "if", "(", "tokenLen", ">", "0", ")", "{", "char", "c", "=", "token", ".", "charAt", "(", "0", ")", "...
Returns true if token should be parsed as a numeric field. @param token the token to parse @return true if numeric field
[ "Returns", "true", "if", "token", "should", "be", "parsed", "as", "a", "numeric", "field", "." ]
train
https://github.com/JodaOrg/joda-time/blob/bd79f1c4245e79b3c2c56d7b04fde2a6e191fa42/src/main/java/org/joda/time/format/DateTimeFormat.java#L638-L670
comapi/comapi-sdk-android
COMAPI/foundation/src/main/java/com/comapi/internal/log/AppenderFile.java
AppenderFile.mergeFiles
private void mergeFiles(@NonNull File mergedFile) throws IOException { """ Merged content of internal log files. @param mergedFile Instance of a file to merge logs into. """ Context context = appContextRef.get(); if (context != null) { FileWriter fw; BufferedWriter...
java
private void mergeFiles(@NonNull File mergedFile) throws IOException { Context context = appContextRef.get(); if (context != null) { FileWriter fw; BufferedWriter bw; fw = new FileWriter(mergedFile, true); bw = new BufferedWriter(fw); File ...
[ "private", "void", "mergeFiles", "(", "@", "NonNull", "File", "mergedFile", ")", "throws", "IOException", "{", "Context", "context", "=", "appContextRef", ".", "get", "(", ")", ";", "if", "(", "context", "!=", "null", ")", "{", "FileWriter", "fw", ";", "...
Merged content of internal log files. @param mergedFile Instance of a file to merge logs into.
[ "Merged", "content", "of", "internal", "log", "files", "." ]
train
https://github.com/comapi/comapi-sdk-android/blob/53140a58d5a62afe196047ccc5120bfe090ef211/COMAPI/foundation/src/main/java/com/comapi/internal/log/AppenderFile.java#L284-L324
spotbugs/spotbugs
spotbugs/src/gui/main/edu/umd/cs/findbugs/gui2/BugLoader.java
BugLoader.doAnalysis
public static BugCollection doAnalysis(@Nonnull Project p, FindBugsProgress progressCallback) throws IOException, InterruptedException { """ Performs an analysis and returns the BugSet created @param p The Project to run the analysis on @param progressCallback the progressCallBack is supposed to be suppl...
java
public static BugCollection doAnalysis(@Nonnull Project p, FindBugsProgress progressCallback) throws IOException, InterruptedException { StringWriter stringWriter = new StringWriter(); BugCollectionBugReporter pcb = new BugCollectionBugReporter(p, new PrintWriter(stringWriter, true)); pcb.se...
[ "public", "static", "BugCollection", "doAnalysis", "(", "@", "Nonnull", "Project", "p", ",", "FindBugsProgress", "progressCallback", ")", "throws", "IOException", ",", "InterruptedException", "{", "StringWriter", "stringWriter", "=", "new", "StringWriter", "(", ")", ...
Performs an analysis and returns the BugSet created @param p The Project to run the analysis on @param progressCallback the progressCallBack is supposed to be supplied by analyzing dialog, FindBugs supplies progress information while it runs the analysis @return the bugs found @throws InterruptedException @throws IOEx...
[ "Performs", "an", "analysis", "and", "returns", "the", "BugSet", "created" ]
train
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/gui/main/edu/umd/cs/findbugs/gui2/BugLoader.java#L90-L113
apache/flink
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/operators/InternalTimerServiceImpl.java
InternalTimerServiceImpl.restoreTimersForKeyGroup
@SuppressWarnings("unchecked") public void restoreTimersForKeyGroup(InternalTimersSnapshot<?, ?> restoredSnapshot, int keyGroupIdx) { """ Restore the timers (both processing and event time ones) for a given {@code keyGroupIdx}. @param restoredSnapshot the restored snapshot containing the key-group's timers, a...
java
@SuppressWarnings("unchecked") public void restoreTimersForKeyGroup(InternalTimersSnapshot<?, ?> restoredSnapshot, int keyGroupIdx) { this.restoredTimersSnapshot = (InternalTimersSnapshot<K, N>) restoredSnapshot; TypeSerializer<K> restoredKeySerializer = restoredTimersSnapshot.getKeySerializerSnapshot().restoreSe...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "void", "restoreTimersForKeyGroup", "(", "InternalTimersSnapshot", "<", "?", ",", "?", ">", "restoredSnapshot", ",", "int", "keyGroupIdx", ")", "{", "this", ".", "restoredTimersSnapshot", "=", "(", "Int...
Restore the timers (both processing and event time ones) for a given {@code keyGroupIdx}. @param restoredSnapshot the restored snapshot containing the key-group's timers, and the serializers that were used to write them @param keyGroupIdx the id of the key-group to be put in the snapshot.
[ "Restore", "the", "timers", "(", "both", "processing", "and", "event", "time", "ones", ")", "for", "a", "given", "{", "@code", "keyGroupIdx", "}", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/operators/InternalTimerServiceImpl.java#L288-L312
osglworks/java-tool
src/main/java/org/osgl/util/E.java
E.invalidStateIf
public static void invalidStateIf(boolean tester, String msg, Object... args) { """ Throws out an {@link InvalidStateException} when `tester` evaluated to `true`. @param tester when `true` then an {@link InvalidStateException} will be thrown out. @param msg the message format template @param args the messa...
java
public static void invalidStateIf(boolean tester, String msg, Object... args) { if (tester) { invalidState(msg, args); } }
[ "public", "static", "void", "invalidStateIf", "(", "boolean", "tester", ",", "String", "msg", ",", "Object", "...", "args", ")", "{", "if", "(", "tester", ")", "{", "invalidState", "(", "msg", ",", "args", ")", ";", "}", "}" ]
Throws out an {@link InvalidStateException} when `tester` evaluated to `true`. @param tester when `true` then an {@link InvalidStateException} will be thrown out. @param msg the message format template @param args the message format arguments
[ "Throws", "out", "an", "{", "@link", "InvalidStateException", "}", "when", "tester", "evaluated", "to", "true", "." ]
train
https://github.com/osglworks/java-tool/blob/8b6eee2bccb067eb32e6a7bc4a4dfef7a7d9008b/src/main/java/org/osgl/util/E.java#L92-L96
s1-platform/s1
s1-core/src/java/org/s1/format/json/org_json_simple/JSONArray.java
JSONArray.writeJSONString
public static void writeJSONString(Collection collection, Writer out) throws IOException { """ Encode a list into JSON text and write it to out. If this list is also a JSONStreamAware or a JSONAware, JSONStreamAware and JSONAware specific behaviours will be ignored at this top level. @see org.json.simple.JSONV...
java
public static void writeJSONString(Collection collection, Writer out) throws IOException{ if(collection == null){ out.write("null"); return; } boolean first = true; Iterator iter=collection.iterator(); out.write('['); while(iter.hasNext()){ if(first) first = fal...
[ "public", "static", "void", "writeJSONString", "(", "Collection", "collection", ",", "Writer", "out", ")", "throws", "IOException", "{", "if", "(", "collection", "==", "null", ")", "{", "out", ".", "write", "(", "\"null\"", ")", ";", "return", ";", "}", ...
Encode a list into JSON text and write it to out. If this list is also a JSONStreamAware or a JSONAware, JSONStreamAware and JSONAware specific behaviours will be ignored at this top level. @see org.json.simple.JSONValue#writeJSONString(Object, java.io.Writer) @param collection @param out
[ "Encode", "a", "list", "into", "JSON", "text", "and", "write", "it", "to", "out", ".", "If", "this", "list", "is", "also", "a", "JSONStreamAware", "or", "a", "JSONAware", "JSONStreamAware", "and", "JSONAware", "specific", "behaviours", "will", "be", "ignored...
train
https://github.com/s1-platform/s1/blob/370101c13fef01af524bc171bcc1a97e5acc76e8/s1-core/src/java/org/s1/format/json/org_json_simple/JSONArray.java#L64-L89
looly/hutool
hutool-core/src/main/java/cn/hutool/core/convert/NumberChineseFormater.java
NumberChineseFormater.toChinese
private static String toChinese(int amountPart, boolean isUseTraditional) { """ 把一个 0~9999 之间的整数转换为汉字的字符串,如果是 0 则返回 "" @param amountPart 数字部分 @param isUseTraditional 是否使用繁体单位 @return 转换后的汉字 """ // if (amountPart < 0 || amountPart > 10000) { // throw new IllegalArgumentException("Number must 0 < num < 1...
java
private static String toChinese(int amountPart, boolean isUseTraditional) { // if (amountPart < 0 || amountPart > 10000) { // throw new IllegalArgumentException("Number must 0 < num < 10000!"); // } String[] numArray = isUseTraditional ? traditionalDigits : simpleDigits; String[] units = isUseTraditional ? tra...
[ "private", "static", "String", "toChinese", "(", "int", "amountPart", ",", "boolean", "isUseTraditional", ")", "{", "//\t\tif (amountPart < 0 || amountPart > 10000) {", "//\t\t\tthrow new IllegalArgumentException(\"Number must 0 < num < 10000!\");", "//\t\t}", "String", "[", "]", ...
把一个 0~9999 之间的整数转换为汉字的字符串,如果是 0 则返回 "" @param amountPart 数字部分 @param isUseTraditional 是否使用繁体单位 @return 转换后的汉字
[ "把一个", "0~9999", "之间的整数转换为汉字的字符串,如果是", "0", "则返回" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/convert/NumberChineseFormater.java#L140-L171
trellis-ldp/trellis
core/http/src/main/java/org/trellisldp/http/TrellisHttpResource.java
TrellisHttpResource.updateResource
@PATCH @Timed public void updateResource(@Suspended final AsyncResponse response, @Context final Request request, @Context final UriInfo uriInfo, @Context final HttpHeaders headers, @Context final SecurityContext secContext, final String body) { """ Perform a PATCH operation on an L...
java
@PATCH @Timed public void updateResource(@Suspended final AsyncResponse response, @Context final Request request, @Context final UriInfo uriInfo, @Context final HttpHeaders headers, @Context final SecurityContext secContext, final String body) { final TrellisRequest req = new Tre...
[ "@", "PATCH", "@", "Timed", "public", "void", "updateResource", "(", "@", "Suspended", "final", "AsyncResponse", "response", ",", "@", "Context", "final", "Request", "request", ",", "@", "Context", "final", "UriInfo", "uriInfo", ",", "@", "Context", "final", ...
Perform a PATCH operation on an LDP Resource. @param response the async response @param uriInfo the URI info @param secContext the security context @param headers the HTTP headers @param request the request @param body the body
[ "Perform", "a", "PATCH", "operation", "on", "an", "LDP", "Resource", "." ]
train
https://github.com/trellis-ldp/trellis/blob/789fd7a3df86cab7ebba63e72bf4e58397e5f42d/core/http/src/main/java/org/trellisldp/http/TrellisHttpResource.java#L261-L274
b3dgs/lionengine
lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/tile/map/transition/circuit/CircuitsConfig.java
CircuitsConfig.exports
public static void exports(Media media, Map<Circuit, Collection<TileRef>> circuits) { """ Export all circuits to an XML file. @param media The export output (must not be <code>null</code>). @param circuits The circuits reference (must not be <code>null</code>). @throws LionEngineException If error on export. ...
java
public static void exports(Media media, Map<Circuit, Collection<TileRef>> circuits) { Check.notNull(media); Check.notNull(circuits); final Xml nodeCircuits = new Xml(NODE_CIRCUITS); for (final Map.Entry<Circuit, Collection<TileRef>> entry : circuits.entrySet()) { ...
[ "public", "static", "void", "exports", "(", "Media", "media", ",", "Map", "<", "Circuit", ",", "Collection", "<", "TileRef", ">", ">", "circuits", ")", "{", "Check", ".", "notNull", "(", "media", ")", ";", "Check", ".", "notNull", "(", "circuits", ")",...
Export all circuits to an XML file. @param media The export output (must not be <code>null</code>). @param circuits The circuits reference (must not be <code>null</code>). @throws LionEngineException If error on export.
[ "Export", "all", "circuits", "to", "an", "XML", "file", "." ]
train
https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/tile/map/transition/circuit/CircuitsConfig.java#L119-L138
spotbugs/spotbugs
eclipsePlugin/src/edu/umd/cs/findbugs/plugin/eclipse/quickfix/util/ASTUtil.java
ASTUtil.getTypeDeclaration
public static TypeDeclaration getTypeDeclaration(CompilationUnit compilationUnit, ClassAnnotation classAnno) throws TypeDeclarationNotFoundException { """ Returns the <CODE>TypeDeclaration</CODE> for the specified <CODE>ClassAnnotation</CODE>. The type has to be declared in the specified <CODE>Compil...
java
public static TypeDeclaration getTypeDeclaration(CompilationUnit compilationUnit, ClassAnnotation classAnno) throws TypeDeclarationNotFoundException { requireNonNull(classAnno, "class annotation"); return getTypeDeclaration(compilationUnit, classAnno.getClassName()); }
[ "public", "static", "TypeDeclaration", "getTypeDeclaration", "(", "CompilationUnit", "compilationUnit", ",", "ClassAnnotation", "classAnno", ")", "throws", "TypeDeclarationNotFoundException", "{", "requireNonNull", "(", "classAnno", ",", "\"class annotation\"", ")", ";", "r...
Returns the <CODE>TypeDeclaration</CODE> for the specified <CODE>ClassAnnotation</CODE>. The type has to be declared in the specified <CODE>CompilationUnit</CODE>. @param compilationUnit The <CODE>CompilationUnit</CODE>, where the <CODE>TypeDeclaration</CODE> is declared in. @param classAnno The <CODE>ClassAnnotation<...
[ "Returns", "the", "<CODE", ">", "TypeDeclaration<", "/", "CODE", ">", "for", "the", "specified", "<CODE", ">", "ClassAnnotation<", "/", "CODE", ">", ".", "The", "type", "has", "to", "be", "declared", "in", "the", "specified", "<CODE", ">", "CompilationUnit<"...
train
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/eclipsePlugin/src/edu/umd/cs/findbugs/plugin/eclipse/quickfix/util/ASTUtil.java#L228-L232
haraldk/TwelveMonkeys
common/common-image/src/main/java/com/twelvemonkeys/image/CopyDither.java
CopyDither.filter
public final WritableRaster filter(final Raster pSource, WritableRaster pDest) { """ Performs a single-input/single-output dither operation, applying basic Floyd-Steinberg error-diffusion to the image. @param pSource @param pDest @return the destination raster, or a new raster, if {@code pDest} was {@code...
java
public final WritableRaster filter(final Raster pSource, WritableRaster pDest) { return filter(pSource, pDest, getICM(pSource)); }
[ "public", "final", "WritableRaster", "filter", "(", "final", "Raster", "pSource", ",", "WritableRaster", "pDest", ")", "{", "return", "filter", "(", "pSource", ",", "pDest", ",", "getICM", "(", "pSource", ")", ")", ";", "}" ]
Performs a single-input/single-output dither operation, applying basic Floyd-Steinberg error-diffusion to the image. @param pSource @param pDest @return the destination raster, or a new raster, if {@code pDest} was {@code null}.
[ "Performs", "a", "single", "-", "input", "/", "single", "-", "output", "dither", "operation", "applying", "basic", "Floyd", "-", "Steinberg", "error", "-", "diffusion", "to", "the", "image", "." ]
train
https://github.com/haraldk/TwelveMonkeys/blob/7fad4d5cd8cb3a6728c7fd3f28a7b84d8ce0101d/common/common-image/src/main/java/com/twelvemonkeys/image/CopyDither.java#L220-L222
ag-gipp/MathMLTools
mathml-similarity/src/main/java/com/formulasearchengine/mathmltools/similarity/distances/Distances.java
Distances.cleanupHistogram
private static void cleanupHistogram(String tagName, Map<String, Double> histogram) { """ this cleanup is necessary due to errors in the xslt conversion script (contentmathmml to strict cmml) @param tagName @param histogram """ switch (tagName) { case "csymbol": histogra...
java
private static void cleanupHistogram(String tagName, Map<String, Double> histogram) { switch (tagName) { case "csymbol": histogram.remove("based_integer"); for (String key : ValidCSymbols.VALID_CSYMBOLS) { histogram.remove(key); } ...
[ "private", "static", "void", "cleanupHistogram", "(", "String", "tagName", ",", "Map", "<", "String", ",", "Double", ">", "histogram", ")", "{", "switch", "(", "tagName", ")", "{", "case", "\"csymbol\"", ":", "histogram", ".", "remove", "(", "\"based_integer...
this cleanup is necessary due to errors in the xslt conversion script (contentmathmml to strict cmml) @param tagName @param histogram
[ "this", "cleanup", "is", "necessary", "due", "to", "errors", "in", "the", "xslt", "conversion", "script", "(", "contentmathmml", "to", "strict", "cmml", ")" ]
train
https://github.com/ag-gipp/MathMLTools/blob/77c69b6366a5b8720796d1cd9d155ba26c2f1b20/mathml-similarity/src/main/java/com/formulasearchengine/mathmltools/similarity/distances/Distances.java#L220-L245
Azure/azure-sdk-for-java
cognitiveservices/data-plane/vision/faceapi/src/main/java/com/microsoft/azure/cognitiveservices/vision/faceapi/implementation/FacesImpl.java
FacesImpl.identifyWithServiceResponseAsync
public Observable<ServiceResponse<List<IdentifyResult>>> identifyWithServiceResponseAsync(String personGroupId, List<UUID> faceIds, IdentifyOptionalParameter identifyOptionalParameter) { """ Identify unknown faces from a person group. @param personGroupId PersonGroupId of the target person group, created by Per...
java
public Observable<ServiceResponse<List<IdentifyResult>>> identifyWithServiceResponseAsync(String personGroupId, List<UUID> faceIds, IdentifyOptionalParameter identifyOptionalParameter) { if (this.client.azureRegion() == null) { throw new IllegalArgumentException("Parameter this.client.azureRegion() ...
[ "public", "Observable", "<", "ServiceResponse", "<", "List", "<", "IdentifyResult", ">", ">", ">", "identifyWithServiceResponseAsync", "(", "String", "personGroupId", ",", "List", "<", "UUID", ">", "faceIds", ",", "IdentifyOptionalParameter", "identifyOptionalParameter"...
Identify unknown faces from a person group. @param personGroupId PersonGroupId of the target person group, created by PersonGroups.Create @param faceIds Array of query faces faceIds, created by the Face - Detect. Each of the faces are identified independently. The valid number of faceIds is between [1, 10]. @param ide...
[ "Identify", "unknown", "faces", "from", "a", "person", "group", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/vision/faceapi/src/main/java/com/microsoft/azure/cognitiveservices/vision/faceapi/implementation/FacesImpl.java#L431-L446
roskart/dropwizard-jaxws
dropwizard-jaxws/src/main/java/com/roskart/dropwizard/jaxws/JAXWSBundle.java
JAXWSBundle.publishEndpoint
public Endpoint publishEndpoint(String path, Object service, BasicAuthentication auth, SessionFactory sessionFactory) { """ Publish JAX-WS protected endpoint using Dropwizard BasicAuthentication with Dropwizard Hibernate Bundle integration. Service is scanned for @UnitOfWork annota...
java
public Endpoint publishEndpoint(String path, Object service, BasicAuthentication auth, SessionFactory sessionFactory) { checkArgument(service != null, "Service is null"); checkArgument(path != null, "Path is null"); checkArgument((path).trim().length() > 0, "Path ...
[ "public", "Endpoint", "publishEndpoint", "(", "String", "path", ",", "Object", "service", ",", "BasicAuthentication", "auth", ",", "SessionFactory", "sessionFactory", ")", "{", "checkArgument", "(", "service", "!=", "null", ",", "\"Service is null\"", ")", ";", "c...
Publish JAX-WS protected endpoint using Dropwizard BasicAuthentication with Dropwizard Hibernate Bundle integration. Service is scanned for @UnitOfWork annotations. EndpointBuilder is published relative to the CXF servlet path. @param path Relative endpoint path. @param service Service implementation. @param auth Basic...
[ "Publish", "JAX", "-", "WS", "protected", "endpoint", "using", "Dropwizard", "BasicAuthentication", "with", "Dropwizard", "Hibernate", "Bundle", "integration", ".", "Service", "is", "scanned", "for", "@UnitOfWork", "annotations", ".", "EndpointBuilder", "is", "publish...
train
https://github.com/roskart/dropwizard-jaxws/blob/972eb63ba9626f3282d4a1d6127dc2b60b28f2bc/dropwizard-jaxws/src/main/java/com/roskart/dropwizard/jaxws/JAXWSBundle.java#L140-L149
OpenLiberty/open-liberty
dev/com.ibm.ws.dynacache/src/com/ibm/ws/cache/InvalidationAuditDaemon.java
InvalidationAuditDaemon.filterEntryList
public ArrayList filterEntryList(String cacheName, ArrayList incomingList) { """ This ensures all incoming CacheEntrys have not been invalidated. @param incomingList The unfiltered list of CacheEntrys. @return The filtered list of CacheEntrys. """ InvalidationTableList invalidationTableList = getInvalida...
java
public ArrayList filterEntryList(String cacheName, ArrayList incomingList) { InvalidationTableList invalidationTableList = getInvalidationTableList(cacheName); try { invalidationTableList.readWriteLock.readLock().lock(); Iterator it = incomingList.iterator(); while (it.hasNext()) { Object obj = it.next...
[ "public", "ArrayList", "filterEntryList", "(", "String", "cacheName", ",", "ArrayList", "incomingList", ")", "{", "InvalidationTableList", "invalidationTableList", "=", "getInvalidationTableList", "(", "cacheName", ")", ";", "try", "{", "invalidationTableList", ".", "re...
This ensures all incoming CacheEntrys have not been invalidated. @param incomingList The unfiltered list of CacheEntrys. @return The filtered list of CacheEntrys.
[ "This", "ensures", "all", "incoming", "CacheEntrys", "have", "not", "been", "invalidated", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.dynacache/src/com/ibm/ws/cache/InvalidationAuditDaemon.java#L170-L192
sebastiangraf/treetank
interfacemodules/xml/src/main/java/org/treetank/service/xml/xpath/parser/XPathParser.java
XPathParser.parseRelativePathExpr
private void parseRelativePathExpr() throws TTXPathException { """ Parses the the rule RelativePathExpr according to the following production rule: <p> [26] RelativePathExpr ::= StepExpr (("/" | "//") StepExpr)* . </p> @throws TTXPathException """ parseStepExpr(); while (mToken.getType...
java
private void parseRelativePathExpr() throws TTXPathException { parseStepExpr(); while (mToken.getType() == TokenType.SLASH || mToken.getType() == TokenType.DESC_STEP) { if (is(TokenType.DESC_STEP, true)) { final AbsAxis mAxis = new DescendantAxis(getTransaction(), true); ...
[ "private", "void", "parseRelativePathExpr", "(", ")", "throws", "TTXPathException", "{", "parseStepExpr", "(", ")", ";", "while", "(", "mToken", ".", "getType", "(", ")", "==", "TokenType", ".", "SLASH", "||", "mToken", ".", "getType", "(", ")", "==", "Tok...
Parses the the rule RelativePathExpr according to the following production rule: <p> [26] RelativePathExpr ::= StepExpr (("/" | "//") StepExpr)* . </p> @throws TTXPathException
[ "Parses", "the", "the", "rule", "RelativePathExpr", "according", "to", "the", "following", "production", "rule", ":", "<p", ">", "[", "26", "]", "RelativePathExpr", "::", "=", "StepExpr", "((", "/", "|", "//", ")", "StepExpr", ")", "*", ".", "<", "/", ...
train
https://github.com/sebastiangraf/treetank/blob/9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60/interfacemodules/xml/src/main/java/org/treetank/service/xml/xpath/parser/XPathParser.java#L722-L739
google/closure-compiler
src/com/google/javascript/jscomp/NodeUtil.java
NodeUtil.tryMergeBlock
public static boolean tryMergeBlock(Node block, boolean alwaysMerge) { """ Merge a block with its parent block. @return Whether the block was removed. """ checkState(block.isBlock()); Node parent = block.getParent(); boolean canMerge = alwaysMerge || canMergeBlock(block); // Try to remove the ...
java
public static boolean tryMergeBlock(Node block, boolean alwaysMerge) { checkState(block.isBlock()); Node parent = block.getParent(); boolean canMerge = alwaysMerge || canMergeBlock(block); // Try to remove the block if its parent is a block/script or if its // parent is label and it has exactly one ...
[ "public", "static", "boolean", "tryMergeBlock", "(", "Node", "block", ",", "boolean", "alwaysMerge", ")", "{", "checkState", "(", "block", ".", "isBlock", "(", ")", ")", ";", "Node", "parent", "=", "block", ".", "getParent", "(", ")", ";", "boolean", "ca...
Merge a block with its parent block. @return Whether the block was removed.
[ "Merge", "a", "block", "with", "its", "parent", "block", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/NodeUtil.java#L2920-L2938
cdk/cdk
base/standard/src/main/java/org/openscience/cdk/stereo/StereoTool.java
StereoTool.getHandedness
public static TetrahedralSign getHandedness(IAtom baseAtomA, IAtom baseAtomB, IAtom baseAtomC, IAtom apexAtom) { """ Gets the tetrahedral handedness of four atoms - three of which form the 'base' of the tetrahedron, and the other the apex. Note that it assumes a right-handed coordinate system, and that the point...
java
public static TetrahedralSign getHandedness(IAtom baseAtomA, IAtom baseAtomB, IAtom baseAtomC, IAtom apexAtom) { Point3d pointA = baseAtomA.getPoint3d(); Point3d pointB = baseAtomB.getPoint3d(); Point3d pointC = baseAtomC.getPoint3d(); Point3d pointD = apexAtom.getPoint3d(); retu...
[ "public", "static", "TetrahedralSign", "getHandedness", "(", "IAtom", "baseAtomA", ",", "IAtom", "baseAtomB", ",", "IAtom", "baseAtomC", ",", "IAtom", "apexAtom", ")", "{", "Point3d", "pointA", "=", "baseAtomA", ".", "getPoint3d", "(", ")", ";", "Point3d", "po...
Gets the tetrahedral handedness of four atoms - three of which form the 'base' of the tetrahedron, and the other the apex. Note that it assumes a right-handed coordinate system, and that the points {A,B,C} are in a counter-clockwise order in the plane they share. @param baseAtomA the first atom in the base of the tetr...
[ "Gets", "the", "tetrahedral", "handedness", "of", "four", "atoms", "-", "three", "of", "which", "form", "the", "base", "of", "the", "tetrahedron", "and", "the", "other", "the", "apex", ".", "Note", "that", "it", "assumes", "a", "right", "-", "handed", "c...
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/standard/src/main/java/org/openscience/cdk/stereo/StereoTool.java#L305-L311
svenkubiak/mangooio
mangooio-core/src/main/java/io/mangoo/routing/bindings/Validator.java
Validator.expectIpv6
public void expectIpv6(String name, String message) { """ Validates a field to be a valid IPv6 address @param name The field to check @param message A custom error message instead of the default one """ String value = Optional.ofNullable(get(name)).orElse(""); if (!InetAddressValidator.get...
java
public void expectIpv6(String name, String message) { String value = Optional.ofNullable(get(name)).orElse(""); if (!InetAddressValidator.getInstance().isValidInet6Address(value)) { addError(name, Optional.ofNullable(message).orElse(messages.get(Validation.IPV6_KEY.name(), name))); ...
[ "public", "void", "expectIpv6", "(", "String", "name", ",", "String", "message", ")", "{", "String", "value", "=", "Optional", ".", "ofNullable", "(", "get", "(", "name", ")", ")", ".", "orElse", "(", "\"\"", ")", ";", "if", "(", "!", "InetAddressValid...
Validates a field to be a valid IPv6 address @param name The field to check @param message A custom error message instead of the default one
[ "Validates", "a", "field", "to", "be", "a", "valid", "IPv6", "address" ]
train
https://github.com/svenkubiak/mangooio/blob/b3beb6d09510dbbab0ed947d5069c463e1fda6e7/mangooio-core/src/main/java/io/mangoo/routing/bindings/Validator.java#L326-L332
dustin/java-memcached-client
src/main/java/net/spy/memcached/MemcachedClient.java
MemcachedClient.asyncGets
@Override public OperationFuture<CASValue<Object>> asyncGets(final String key) { """ Gets (with CAS support) the given key asynchronously and decode using the default transcoder. @param key the key to fetch @return a future that will hold the return value of the fetch @throws IllegalStateException in the r...
java
@Override public OperationFuture<CASValue<Object>> asyncGets(final String key) { return asyncGets(key, transcoder); }
[ "@", "Override", "public", "OperationFuture", "<", "CASValue", "<", "Object", ">", ">", "asyncGets", "(", "final", "String", "key", ")", "{", "return", "asyncGets", "(", "key", ",", "transcoder", ")", ";", "}" ]
Gets (with CAS support) the given key asynchronously and decode using the default transcoder. @param key the key to fetch @return a future that will hold the return value of the fetch @throws IllegalStateException in the rare circumstance where queue is too full to accept any more requests
[ "Gets", "(", "with", "CAS", "support", ")", "the", "given", "key", "asynchronously", "and", "decode", "using", "the", "default", "transcoder", "." ]
train
https://github.com/dustin/java-memcached-client/blob/c232307ad8e0c7ccc926e495dd7d5aad2d713318/src/main/java/net/spy/memcached/MemcachedClient.java#L1116-L1119
algolia/instantsearch-android
ui/src/main/java/com/algolia/instantsearch/ui/databinding/RenderingHelper.java
RenderingHelper.shouldSnippet
public boolean shouldSnippet(@NonNull View view, @NonNull String attribute) { """ Checks if an attribute should be snippetted in a view. @param view the view using this attribute. @param attribute the attribute's name. @return {@code true} if the attribute was marked for snippeting. """ retur...
java
public boolean shouldSnippet(@NonNull View view, @NonNull String attribute) { return snippettedAttributes.contains(new Pair<>(view.getId(), attribute)); }
[ "public", "boolean", "shouldSnippet", "(", "@", "NonNull", "View", "view", ",", "@", "NonNull", "String", "attribute", ")", "{", "return", "snippettedAttributes", ".", "contains", "(", "new", "Pair", "<>", "(", "view", ".", "getId", "(", ")", ",", "attribu...
Checks if an attribute should be snippetted in a view. @param view the view using this attribute. @param attribute the attribute's name. @return {@code true} if the attribute was marked for snippeting.
[ "Checks", "if", "an", "attribute", "should", "be", "snippetted", "in", "a", "view", "." ]
train
https://github.com/algolia/instantsearch-android/blob/12092ec30140df9ffc2bf916339b433372034616/ui/src/main/java/com/algolia/instantsearch/ui/databinding/RenderingHelper.java#L97-L99
prestodb/presto
presto-hive/src/main/java/com/facebook/presto/hive/HiveColumnHandle.java
HiveColumnHandle.bucketColumnHandle
public static HiveColumnHandle bucketColumnHandle() { """ The column indicating the bucket id. When table bucketing differs from partition bucketing, this column indicates what bucket the row will fall in under the table bucketing scheme. """ return new HiveColumnHandle(BUCKET_COLUMN_NAME, BUCKET_HIV...
java
public static HiveColumnHandle bucketColumnHandle() { return new HiveColumnHandle(BUCKET_COLUMN_NAME, BUCKET_HIVE_TYPE, BUCKET_TYPE_SIGNATURE, BUCKET_COLUMN_INDEX, SYNTHESIZED, Optional.empty()); }
[ "public", "static", "HiveColumnHandle", "bucketColumnHandle", "(", ")", "{", "return", "new", "HiveColumnHandle", "(", "BUCKET_COLUMN_NAME", ",", "BUCKET_HIVE_TYPE", ",", "BUCKET_TYPE_SIGNATURE", ",", "BUCKET_COLUMN_INDEX", ",", "SYNTHESIZED", ",", "Optional", ".", "emp...
The column indicating the bucket id. When table bucketing differs from partition bucketing, this column indicates what bucket the row will fall in under the table bucketing scheme.
[ "The", "column", "indicating", "the", "bucket", "id", ".", "When", "table", "bucketing", "differs", "from", "partition", "bucketing", "this", "column", "indicates", "what", "bucket", "the", "row", "will", "fall", "in", "under", "the", "table", "bucketing", "sc...
train
https://github.com/prestodb/presto/blob/89de5e379d8f85e139d292b0add8c537a2a01a88/presto-hive/src/main/java/com/facebook/presto/hive/HiveColumnHandle.java#L183-L186
jbehave/jbehave-core
jbehave-core/src/main/java/org/jbehave/core/io/StoryFinder.java
StoryFinder.findPaths
public List<String> findPaths(String searchIn, String[] includes, String[] excludes) { """ Finds paths from a source path, allowing for include/exclude patterns. Paths found are normalised by {@link StoryFinder#normalise(List<String>)} @param searchIn the source path to search in @param includes the Array of ...
java
public List<String> findPaths(String searchIn, String[] includes, String[] excludes) { return findPaths(searchIn, asList(includes), asList(excludes)); }
[ "public", "List", "<", "String", ">", "findPaths", "(", "String", "searchIn", ",", "String", "[", "]", "includes", ",", "String", "[", "]", "excludes", ")", "{", "return", "findPaths", "(", "searchIn", ",", "asList", "(", "includes", ")", ",", "asList", ...
Finds paths from a source path, allowing for include/exclude patterns. Paths found are normalised by {@link StoryFinder#normalise(List<String>)} @param searchIn the source path to search in @param includes the Array of include patterns, or <code>null</code> if none @param excludes the Array of exclude patterns, or <co...
[ "Finds", "paths", "from", "a", "source", "path", "allowing", "for", "include", "/", "exclude", "patterns", ".", "Paths", "found", "are", "normalised", "by", "{", "@link", "StoryFinder#normalise", "(", "List<String", ">", ")", "}" ]
train
https://github.com/jbehave/jbehave-core/blob/bdd6a6199528df3c35087e72d4644870655b23e6/jbehave-core/src/main/java/org/jbehave/core/io/StoryFinder.java#L119-L121
apiman/apiman
gateway/engine/es/src/main/java/io/apiman/gateway/engine/es/AbstractClientFactory.java
AbstractClientFactory.initializeClient
protected void initializeClient(JestClient client, String indexName, String defaultIndexName) { """ Called to initialize the storage. @param client the jest client @param indexName the name of the ES index to initialize @param defaultIndexName the default ES index - used to determine which -settings.json file t...
java
protected void initializeClient(JestClient client, String indexName, String defaultIndexName) { try { client.execute(new Health.Builder().build()); Action<JestResult> action = new IndicesExists.Builder(indexName).build(); // There was occasions where a race occurred here when...
[ "protected", "void", "initializeClient", "(", "JestClient", "client", ",", "String", "indexName", ",", "String", "defaultIndexName", ")", "{", "try", "{", "client", ".", "execute", "(", "new", "Health", ".", "Builder", "(", ")", ".", "build", "(", ")", ")"...
Called to initialize the storage. @param client the jest client @param indexName the name of the ES index to initialize @param defaultIndexName the default ES index - used to determine which -settings.json file to use
[ "Called", "to", "initialize", "the", "storage", "." ]
train
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/gateway/engine/es/src/main/java/io/apiman/gateway/engine/es/AbstractClientFactory.java#L63-L78
BorderTech/wcomponents
wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/theme/WCheckBoxSelectExample.java
WCheckBoxSelectExample.addDisabledExamples
private void addDisabledExamples() { """ Examples of disabled state. You should use {@link WSubordinateControl} to set and manage the disabled state unless there is no facility for the user to enable a control. """ add(new WHeading(HeadingLevel.H2, "Disabled WCheckBoxSelect examples")); WFieldLayout layou...
java
private void addDisabledExamples() { add(new WHeading(HeadingLevel.H2, "Disabled WCheckBoxSelect examples")); WFieldLayout layout = new WFieldLayout(); add(layout); WCheckBoxSelect select = new WCheckBoxSelect("australian_state"); select.setDisabled(true); layout.addField("Disabled with no default selectio...
[ "private", "void", "addDisabledExamples", "(", ")", "{", "add", "(", "new", "WHeading", "(", "HeadingLevel", ".", "H2", ",", "\"Disabled WCheckBoxSelect examples\"", ")", ")", ";", "WFieldLayout", "layout", "=", "new", "WFieldLayout", "(", ")", ";", "add", "("...
Examples of disabled state. You should use {@link WSubordinateControl} to set and manage the disabled state unless there is no facility for the user to enable a control.
[ "Examples", "of", "disabled", "state", ".", "You", "should", "use", "{" ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/theme/WCheckBoxSelectExample.java#L377-L400
hdecarne/java-default
src/main/java/de/carne/io/Closeables.java
Closeables.safeClose
public static void safeClose(Throwable exception, @Nullable Object object) { """ Close potential {@linkplain Closeable}. <p> An {@linkplain IOException} caused by {@linkplain Closeable#close()} is suppressed and added to the given outer exception. @param exception the currently handled outer exception. @par...
java
public static void safeClose(Throwable exception, @Nullable Object object) { if (object instanceof Closeable) { try { ((Closeable) object).close(); } catch (IOException e) { exception.addSuppressed(e); } } }
[ "public", "static", "void", "safeClose", "(", "Throwable", "exception", ",", "@", "Nullable", "Object", "object", ")", "{", "if", "(", "object", "instanceof", "Closeable", ")", "{", "try", "{", "(", "(", "Closeable", ")", "object", ")", ".", "close", "("...
Close potential {@linkplain Closeable}. <p> An {@linkplain IOException} caused by {@linkplain Closeable#close()} is suppressed and added to the given outer exception. @param exception the currently handled outer exception. @param object the object to check and close.
[ "Close", "potential", "{", "@linkplain", "Closeable", "}", ".", "<p", ">", "An", "{", "@linkplain", "IOException", "}", "caused", "by", "{", "@linkplain", "Closeable#close", "()", "}", "is", "suppressed", "and", "added", "to", "the", "given", "outer", "excep...
train
https://github.com/hdecarne/java-default/blob/ca16f6fdb0436e90e9e2df3106055e320bb3c9e3/src/main/java/de/carne/io/Closeables.java#L107-L115
petergeneric/stdlib
stdlib/src/main/java/com/peterphi/std/threading/Deadline.java
Deadline.getTimeoutLeft
public Timeout getTimeoutLeft() { """ Determines the amount of time leftuntil the deadline and returns it as a timeout @return a timeout representing the amount of time remaining until this deadline expires """ final long left = getTimeLeft(); if (left != 0) return new Timeout(left, TimeUnit.MILLISE...
java
public Timeout getTimeoutLeft() { final long left = getTimeLeft(); if (left != 0) return new Timeout(left, TimeUnit.MILLISECONDS); else return Timeout.ZERO; }
[ "public", "Timeout", "getTimeoutLeft", "(", ")", "{", "final", "long", "left", "=", "getTimeLeft", "(", ")", ";", "if", "(", "left", "!=", "0", ")", "return", "new", "Timeout", "(", "left", ",", "TimeUnit", ".", "MILLISECONDS", ")", ";", "else", "retur...
Determines the amount of time leftuntil the deadline and returns it as a timeout @return a timeout representing the amount of time remaining until this deadline expires
[ "Determines", "the", "amount", "of", "time", "leftuntil", "the", "deadline", "and", "returns", "it", "as", "a", "timeout" ]
train
https://github.com/petergeneric/stdlib/blob/d4025d2f881bc0542b1e004c5f65a1ccaf895836/stdlib/src/main/java/com/peterphi/std/threading/Deadline.java#L120-L128
nguillaumin/slick2d-maven
slick2d-core/src/main/java/org/newdawn/slick/openal/SoundStore.java
SoundStore.getMOD
public Audio getMOD(String ref, InputStream in) throws IOException { """ Get a MOD sound (mod/xm etc) @param ref The stream to the MOD to load @param in The stream to the MOD to load @return The sound for play back @throws IOException Indicates a failure to read the data """ if (!soundWorks) { ret...
java
public Audio getMOD(String ref, InputStream in) throws IOException { if (!soundWorks) { return new NullAudio(); } if (!inited) { throw new RuntimeException("Can't load sounds until SoundStore is init(). Use the container init() method."); } if (deferred) { return new DeferredSound(ref, in, De...
[ "public", "Audio", "getMOD", "(", "String", "ref", ",", "InputStream", "in", ")", "throws", "IOException", "{", "if", "(", "!", "soundWorks", ")", "{", "return", "new", "NullAudio", "(", ")", ";", "}", "if", "(", "!", "inited", ")", "{", "throw", "ne...
Get a MOD sound (mod/xm etc) @param ref The stream to the MOD to load @param in The stream to the MOD to load @return The sound for play back @throws IOException Indicates a failure to read the data
[ "Get", "a", "MOD", "sound", "(", "mod", "/", "xm", "etc", ")" ]
train
https://github.com/nguillaumin/slick2d-maven/blob/8251f88a0ed6a70e726d2468842455cd1f80893f/slick2d-core/src/main/java/org/newdawn/slick/openal/SoundStore.java#L574-L586
structurizr/java
structurizr-core/src/com/structurizr/documentation/ViewpointsAndPerspectivesDocumentationTemplate.java
ViewpointsAndPerspectivesDocumentationTemplate.addArchitecturalForcesSection
public Section addArchitecturalForcesSection(SoftwareSystem softwareSystem, File... files) throws IOException { """ Adds an "Architectural Forces" section relating to a {@link SoftwareSystem} from one or more files. @param softwareSystem the {@link SoftwareSystem} the documentation content relates to @param...
java
public Section addArchitecturalForcesSection(SoftwareSystem softwareSystem, File... files) throws IOException { return addSection(softwareSystem, "Architectural Forces", files); }
[ "public", "Section", "addArchitecturalForcesSection", "(", "SoftwareSystem", "softwareSystem", ",", "File", "...", "files", ")", "throws", "IOException", "{", "return", "addSection", "(", "softwareSystem", ",", "\"Architectural Forces\"", ",", "files", ")", ";", "}" ]
Adds an "Architectural Forces" section relating to a {@link SoftwareSystem} from one or more files. @param softwareSystem the {@link SoftwareSystem} the documentation content relates to @param files one or more File objects that point to the documentation content @return a documentation...
[ "Adds", "an", "Architectural", "Forces", "section", "relating", "to", "a", "{", "@link", "SoftwareSystem", "}", "from", "one", "or", "more", "files", "." ]
train
https://github.com/structurizr/java/blob/4b204f077877a24bcac363f5ecf0e129a0f9f4c5/structurizr-core/src/com/structurizr/documentation/ViewpointsAndPerspectivesDocumentationTemplate.java#L116-L118
facebookarchive/hadoop-20
src/contrib/corona/src/java/org/apache/hadoop/corona/Utilities.java
Utilities.removeReference
public static Object removeReference(List l, Object o) { """ Remove the object o from the list l. Different from l.remove(o) because this method only removes it if it is the same object @param l the list to remove from @param o the object to remove @return removed object if it was found in the list, null other...
java
public static Object removeReference(List l, Object o) { Iterator iter = l.iterator(); while (iter.hasNext()) { Object no = iter.next(); if (no == o) { iter.remove(); return o; } } return null; }
[ "public", "static", "Object", "removeReference", "(", "List", "l", ",", "Object", "o", ")", "{", "Iterator", "iter", "=", "l", ".", "iterator", "(", ")", ";", "while", "(", "iter", ".", "hasNext", "(", ")", ")", "{", "Object", "no", "=", "iter", "....
Remove the object o from the list l. Different from l.remove(o) because this method only removes it if it is the same object @param l the list to remove from @param o the object to remove @return removed object if it was found in the list, null otherwise
[ "Remove", "the", "object", "o", "from", "the", "list", "l", ".", "Different", "from", "l", ".", "remove", "(", "o", ")", "because", "this", "method", "only", "removes", "it", "if", "it", "is", "the", "same", "object" ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/corona/src/java/org/apache/hadoop/corona/Utilities.java#L112-L122
apache/groovy
subprojects/groovy-nio/src/main/java/org/codehaus/groovy/runtime/NioGroovyMethods.java
NioGroovyMethods.newPrintWriter
public static PrintWriter newPrintWriter(Path self, String charset) throws IOException { """ Create a new PrintWriter for this file, using specified charset. @param self a Path @param charset the charset @return a PrintWriter @throws java.io.IOException if an IOException occurs. @since 2.3.0 """ ...
java
public static PrintWriter newPrintWriter(Path self, String charset) throws IOException { return new GroovyPrintWriter(newWriter(self, charset)); }
[ "public", "static", "PrintWriter", "newPrintWriter", "(", "Path", "self", ",", "String", "charset", ")", "throws", "IOException", "{", "return", "new", "GroovyPrintWriter", "(", "newWriter", "(", "self", ",", "charset", ")", ")", ";", "}" ]
Create a new PrintWriter for this file, using specified charset. @param self a Path @param charset the charset @return a PrintWriter @throws java.io.IOException if an IOException occurs. @since 2.3.0
[ "Create", "a", "new", "PrintWriter", "for", "this", "file", "using", "specified", "charset", "." ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/subprojects/groovy-nio/src/main/java/org/codehaus/groovy/runtime/NioGroovyMethods.java#L1747-L1749
hmsonline/cassandra-triggers
src/main/java/com/hmsonline/cassandra/triggers/CassandraServerTriggerAspect.java
CassandraServerTriggerAspect.logErrorFromThrownException
@AfterThrowing(pointcut = "execution(* org.apache.cassandra.thrift.CassandraServer.doInsert(..))", throwing = "throwable") public void logErrorFromThrownException(final JoinPoint joinPoint, final Throwable throwable) { """ Logs an error message for unhandled exception thrown from the target method. @param j...
java
@AfterThrowing(pointcut = "execution(* org.apache.cassandra.thrift.CassandraServer.doInsert(..))", throwing = "throwable") public void logErrorFromThrownException(final JoinPoint joinPoint, final Throwable throwable) { final String className = joinPoint.getTarget().getClass().getName(); final String...
[ "@", "AfterThrowing", "(", "pointcut", "=", "\"execution(* org.apache.cassandra.thrift.CassandraServer.doInsert(..))\"", ",", "throwing", "=", "\"throwable\"", ")", "public", "void", "logErrorFromThrownException", "(", "final", "JoinPoint", "joinPoint", ",", "final", "Throwab...
Logs an error message for unhandled exception thrown from the target method. @param joinPoint - the joint point cut that contains information about the target @param throwable - the cause of the exception from the target method invocation
[ "Logs", "an", "error", "message", "for", "unhandled", "exception", "thrown", "from", "the", "target", "method", "." ]
train
https://github.com/hmsonline/cassandra-triggers/blob/022862c7e4bbdd3423b5926f360ea9bf8f81c8b7/src/main/java/com/hmsonline/cassandra/triggers/CassandraServerTriggerAspect.java#L56-L62
spockframework/spock
spock-core/src/main/java/org/spockframework/runtime/SpockRuntime.java
SpockRuntime.verifyMethodCondition
public static void verifyMethodCondition(@Nullable ErrorCollector errorCollector, @Nullable ValueRecorder recorder, @Nullable String text, int line, int column, @Nullable Object message, Object target, String method, Object[] args, boolean safe, boolean explicit, int lastVariableNum) { """ method calls with ...
java
public static void verifyMethodCondition(@Nullable ErrorCollector errorCollector, @Nullable ValueRecorder recorder, @Nullable String text, int line, int column, @Nullable Object message, Object target, String method, Object[] args, boolean safe, boolean explicit, int lastVariableNum) { MatcherCondition matche...
[ "public", "static", "void", "verifyMethodCondition", "(", "@", "Nullable", "ErrorCollector", "errorCollector", ",", "@", "Nullable", "ValueRecorder", "recorder", ",", "@", "Nullable", "String", "text", ",", "int", "line", ",", "int", "column", ",", "@", "Nullabl...
method calls with spread-dot operator are not rewritten, hence this method doesn't have to care about spread-dot
[ "method", "calls", "with", "spread", "-", "dot", "operator", "are", "not", "rewritten", "hence", "this", "method", "doesn", "t", "have", "to", "care", "about", "spread", "-", "dot" ]
train
https://github.com/spockframework/spock/blob/d751a0abd8d5a2ec5338aa10bc2d19371b3b3ad9/spock-core/src/main/java/org/spockframework/runtime/SpockRuntime.java#L96-L119
olivergondza/dumpling
core/src/main/java/com/github/olivergondza/dumpling/model/StackTrace.java
StackTrace.nativeElement
public static StackTraceElement nativeElement(String declaringClass, String methodName, String fileName) { """ Get {@link StackTraceElement} for native method. Some native method {@link StackTraceElement}s have filename, even though it is not shown. """ return new StackTraceElement(declaringClass, m...
java
public static StackTraceElement nativeElement(String declaringClass, String methodName, String fileName) { return new StackTraceElement(declaringClass, methodName, fileName, -2); }
[ "public", "static", "StackTraceElement", "nativeElement", "(", "String", "declaringClass", ",", "String", "methodName", ",", "String", "fileName", ")", "{", "return", "new", "StackTraceElement", "(", "declaringClass", ",", "methodName", ",", "fileName", ",", "-", ...
Get {@link StackTraceElement} for native method. Some native method {@link StackTraceElement}s have filename, even though it is not shown.
[ "Get", "{", "@link", "StackTraceElement", "}", "for", "native", "method", "." ]
train
https://github.com/olivergondza/dumpling/blob/ac698735fcc7c023db0c1637cc1f522cb3576c7f/core/src/main/java/com/github/olivergondza/dumpling/model/StackTrace.java#L71-L73
alipay/sofa-rpc
core/api/src/main/java/com/alipay/sofa/rpc/common/utils/NetUtils.java
NetUtils.canTelnet
public static boolean canTelnet(String ip, int port, int timeout) { """ 是否可以telnet @param ip 远程地址 @param port 远程端口 @param timeout 连接超时 @return 是否可连接 """ Socket socket = null; try { socket = new Socket(); socket.connect(new InetSocketAddress(ip, port), timeo...
java
public static boolean canTelnet(String ip, int port, int timeout) { Socket socket = null; try { socket = new Socket(); socket.connect(new InetSocketAddress(ip, port), timeout); return socket.isConnected() && !socket.isClosed(); } catch (Exception e) { ...
[ "public", "static", "boolean", "canTelnet", "(", "String", "ip", ",", "int", "port", ",", "int", "timeout", ")", "{", "Socket", "socket", "=", "null", ";", "try", "{", "socket", "=", "new", "Socket", "(", ")", ";", "socket", ".", "connect", "(", "new...
是否可以telnet @param ip 远程地址 @param port 远程端口 @param timeout 连接超时 @return 是否可连接
[ "是否可以telnet" ]
train
https://github.com/alipay/sofa-rpc/blob/a31406410291e56696185a29c3ba4bd1f54488fd/core/api/src/main/java/com/alipay/sofa/rpc/common/utils/NetUtils.java#L486-L497
lestard/advanced-bindings
src/main/java/eu/lestard/advanced_bindings/api/CollectionBindings.java
CollectionBindings.join
public static StringBinding join(final ObservableList<?> items, final ObservableValue<String> delimiter) { """ Creates a string binding that constructs a sequence of characters separated by a delimiter. @param items the observable list of items. @param delimiter the sequence of characters to be used betwee...
java
public static StringBinding join(final ObservableList<?> items, final ObservableValue<String> delimiter) { return Bindings.createStringBinding(() -> items.stream().map(String::valueOf).collect(Collectors.joining(delimiter.getValue())), items, delimiter); }
[ "public", "static", "StringBinding", "join", "(", "final", "ObservableList", "<", "?", ">", "items", ",", "final", "ObservableValue", "<", "String", ">", "delimiter", ")", "{", "return", "Bindings", ".", "createStringBinding", "(", "(", ")", "->", "items", "...
Creates a string binding that constructs a sequence of characters separated by a delimiter. @param items the observable list of items. @param delimiter the sequence of characters to be used between each element. @return a string binding.
[ "Creates", "a", "string", "binding", "that", "constructs", "a", "sequence", "of", "characters", "separated", "by", "a", "delimiter", "." ]
train
https://github.com/lestard/advanced-bindings/blob/054a5dde261c29f862b971765fa3da3704a13ab4/src/main/java/eu/lestard/advanced_bindings/api/CollectionBindings.java#L136-L138
kenyee/android-ddp-client
src/com/keysolutions/ddpclient/android/MeteorAuthCommands.java
MeteorAuthCommands.forgotPassword
public void forgotPassword(String email) { """ Sends password reset mail to specified email address @param email email address of user """ if (email == null) { return; } Object[] methodArgs = new Object[1]; Map<String,Object> options = new HashMap<>(); metho...
java
public void forgotPassword(String email) { if (email == null) { return; } Object[] methodArgs = new Object[1]; Map<String,Object> options = new HashMap<>(); methodArgs[0] = options; options.put("email", email); getDDP().call("forgotPassword", metho...
[ "public", "void", "forgotPassword", "(", "String", "email", ")", "{", "if", "(", "email", "==", "null", ")", "{", "return", ";", "}", "Object", "[", "]", "methodArgs", "=", "new", "Object", "[", "1", "]", ";", "Map", "<", "String", ",", "Object", "...
Sends password reset mail to specified email address @param email email address of user
[ "Sends", "password", "reset", "mail", "to", "specified", "email", "address" ]
train
https://github.com/kenyee/android-ddp-client/blob/6ab416e415570a03f96c383497144dd742de3f08/src/com/keysolutions/ddpclient/android/MeteorAuthCommands.java#L108-L123
lucee/Lucee
loader/src/main/java/lucee/loader/engine/CFMLEngineFactorySupport.java
CFMLEngineFactorySupport.toVersion
public static Version toVersion(String version, final Version defaultValue) { """ cast a lucee string version to a int version @param version @return int version """ // remove extension if there is any final int rIndex = version.lastIndexOf(".lco"); if (rIndex != -1) version = version.substring(0, rInde...
java
public static Version toVersion(String version, final Version defaultValue) { // remove extension if there is any final int rIndex = version.lastIndexOf(".lco"); if (rIndex != -1) version = version.substring(0, rIndex); try { return Version.parseVersion(version); } catch (final IllegalArgumentException iae)...
[ "public", "static", "Version", "toVersion", "(", "String", "version", ",", "final", "Version", "defaultValue", ")", "{", "// remove extension if there is any", "final", "int", "rIndex", "=", "version", ".", "lastIndexOf", "(", "\".lco\"", ")", ";", "if", "(", "r...
cast a lucee string version to a int version @param version @return int version
[ "cast", "a", "lucee", "string", "version", "to", "a", "int", "version" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/loader/src/main/java/lucee/loader/engine/CFMLEngineFactorySupport.java#L106-L117
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMNamedNodeMap.java
DTMNamedNodeMap.getNamedItemNS
public Node getNamedItemNS(String namespaceURI, String localName) { """ Retrieves a node specified by local name and namespace URI. HTML-only DOM implementations do not need to implement this method. @param namespaceURI The namespace URI of the node to retrieve. @param localName The local name of the node to re...
java
public Node getNamedItemNS(String namespaceURI, String localName) { Node retNode = null; for (int n = dtm.getFirstAttribute(element); n != DTM.NULL; n = dtm.getNextAttribute(n)) { if (localName.equals(dtm.getLocalName(n))) { String nsURI = dtm.g...
[ "public", "Node", "getNamedItemNS", "(", "String", "namespaceURI", ",", "String", "localName", ")", "{", "Node", "retNode", "=", "null", ";", "for", "(", "int", "n", "=", "dtm", ".", "getFirstAttribute", "(", "element", ")", ";", "n", "!=", "DTM", ".", ...
Retrieves a node specified by local name and namespace URI. HTML-only DOM implementations do not need to implement this method. @param namespaceURI The namespace URI of the node to retrieve. @param localName The local name of the node to retrieve. @return A <code>Node</code> (of any type) with the specified local name...
[ "Retrieves", "a", "node", "specified", "by", "local", "name", "and", "namespace", "URI", ".", "HTML", "-", "only", "DOM", "implementations", "do", "not", "need", "to", "implement", "this", "method", ".", "@param", "namespaceURI", "The", "namespace", "URI", "...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMNamedNodeMap.java#L197-L215
intendia-oss/rxjava-gwt
src/main/modified/io/reactivex/super/io/reactivex/Flowable.java
Flowable.repeatWhen
@CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable<T> repeatWhen(final Function<? super Flowable<Object>, ? extends Publisher<?>> handler) { """ Returns a Flowable that emits the same values as the source Publisher with the excep...
java
@CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable<T> repeatWhen(final Function<? super Flowable<Object>, ? extends Publisher<?>> handler) { ObjectHelper.requireNonNull(handler, "handler is null"); return RxJavaPlugins...
[ "@", "CheckReturnValue", "@", "BackpressureSupport", "(", "BackpressureKind", ".", "FULL", ")", "@", "SchedulerSupport", "(", "SchedulerSupport", ".", "NONE", ")", "public", "final", "Flowable", "<", "T", ">", "repeatWhen", "(", "final", "Function", "<", "?", ...
Returns a Flowable that emits the same values as the source Publisher with the exception of an {@code onComplete}. An {@code onComplete} notification from the source will result in the emission of a {@code void} item to the Publisher provided as an argument to the {@code notificationHandler} function. If that Publisher...
[ "Returns", "a", "Flowable", "that", "emits", "the", "same", "values", "as", "the", "source", "Publisher", "with", "the", "exception", "of", "an", "{", "@code", "onComplete", "}", ".", "An", "{", "@code", "onComplete", "}", "notification", "from", "the", "s...
train
https://github.com/intendia-oss/rxjava-gwt/blob/8d5635b12ce40da99e76b59dc6bfe6fc2fffc1fa/src/main/modified/io/reactivex/super/io/reactivex/Flowable.java#L12389-L12395
jaxio/javaee-lab
javaee7-jpa-query-by-example/src/main/java/com/jaxio/jpa/querybyexample/DefaultLuceneQueryBuilder.java
DefaultLuceneQueryBuilder.escapeForFuzzy
private String escapeForFuzzy(String word) { """ Apply same filtering as "custom" analyzer. Lowercase is done by QueryParser for fuzzy search. @param word word @return word escaped """ int length = word.length(); char[] tmp = new char[length * 4]; length = ASCIIFoldingFilter.foldToA...
java
private String escapeForFuzzy(String word) { int length = word.length(); char[] tmp = new char[length * 4]; length = ASCIIFoldingFilter.foldToASCII(word.toCharArray(), 0, tmp, 0, length); return new String(tmp, 0, length); }
[ "private", "String", "escapeForFuzzy", "(", "String", "word", ")", "{", "int", "length", "=", "word", ".", "length", "(", ")", ";", "char", "[", "]", "tmp", "=", "new", "char", "[", "length", "*", "4", "]", ";", "length", "=", "ASCIIFoldingFilter", "...
Apply same filtering as "custom" analyzer. Lowercase is done by QueryParser for fuzzy search. @param word word @return word escaped
[ "Apply", "same", "filtering", "as", "custom", "analyzer", ".", "Lowercase", "is", "done", "by", "QueryParser", "for", "fuzzy", "search", "." ]
train
https://github.com/jaxio/javaee-lab/blob/61238b967952446d81cc68424a4e809093a77fcf/javaee7-jpa-query-by-example/src/main/java/com/jaxio/jpa/querybyexample/DefaultLuceneQueryBuilder.java#L163-L168
oehf/ipf-oht-atna
auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/XDSConsumerAuditor.java
XDSConsumerAuditor.auditRetrieveDocumentEvent
public void auditRetrieveDocumentEvent(RFC3881EventOutcomeCodes eventOutcome, String repositoryRetrieveUri, String userName, String documentUniqueId, String patientId) { """ Audits an ITI-17 Retrieve Document event for XDS.a Document Consumer actors. @param eventOutcome The event outcome in...
java
public void auditRetrieveDocumentEvent(RFC3881EventOutcomeCodes eventOutcome, String repositoryRetrieveUri, String userName, String documentUniqueId, String patientId) { if (!isAuditorEnabled()) { return; } ImportEvent importEvent = new ImportEvent(false, eventOutcome, new IHETransactionE...
[ "public", "void", "auditRetrieveDocumentEvent", "(", "RFC3881EventOutcomeCodes", "eventOutcome", ",", "String", "repositoryRetrieveUri", ",", "String", "userName", ",", "String", "documentUniqueId", ",", "String", "patientId", ")", "{", "if", "(", "!", "isAuditorEnabled...
Audits an ITI-17 Retrieve Document event for XDS.a Document Consumer actors. @param eventOutcome The event outcome indicator @param repositoryRetrieveUri The URI of the document being retrieved @param documentUniqueId The Document Entry Unique ID of the document being retrieved (if known) @param patientId The patient ...
[ "Audits", "an", "ITI", "-", "17", "Retrieve", "Document", "event", "for", "XDS", ".", "a", "Document", "Consumer", "actors", "." ]
train
https://github.com/oehf/ipf-oht-atna/blob/25ed1e926825169c94923a2c89a4618f60478ae8/auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/XDSConsumerAuditor.java#L132-L154
wiselenium/wiselenium
wiselenium-factory/src/main/java/com/github/wiselenium/factory/RootInjector.java
RootInjector.rootDriver
public static <E> void rootDriver(WebDriver root, E page) { """ Injects the webdriver into a page. @param root The webdriver. @param element The element. @since 0.3.0 """ if (page == null || root == null) return; for (Class<?> clazz = page.getClass(); !clazz.equals(Object.class); clazz = clazz.ge...
java
public static <E> void rootDriver(WebDriver root, E page) { if (page == null || root == null) return; for (Class<?> clazz = page.getClass(); !clazz.equals(Object.class); clazz = clazz.getSuperclass()) { if (Enhancer.isEnhanced(clazz)) continue; Field[] fields = clazz.getDeclaredFields(); for...
[ "public", "static", "<", "E", ">", "void", "rootDriver", "(", "WebDriver", "root", ",", "E", "page", ")", "{", "if", "(", "page", "==", "null", "||", "root", "==", "null", ")", "return", ";", "for", "(", "Class", "<", "?", ">", "clazz", "=", "pag...
Injects the webdriver into a page. @param root The webdriver. @param element The element. @since 0.3.0
[ "Injects", "the", "webdriver", "into", "a", "page", "." ]
train
https://github.com/wiselenium/wiselenium/blob/15de6484d8f516b3d02391d3bd6a56a03e632706/wiselenium-factory/src/main/java/com/github/wiselenium/factory/RootInjector.java#L72-L85
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/ISPNCacheWorkspaceStorageCache.java
ISPNCacheWorkspaceStorageCache.putNode
protected ItemData putNode(NodeData node, ModifyChildOption modifyListsOfChild) { """ Internal put Node. @param node, NodeData, new data to put in the cache @return NodeData, previous data or null """ if (node.getParentIdentifier() != null) { if (modifyListsOfChild == ModifyChildOpt...
java
protected ItemData putNode(NodeData node, ModifyChildOption modifyListsOfChild) { if (node.getParentIdentifier() != null) { if (modifyListsOfChild == ModifyChildOption.NOT_MODIFY) { cache.putIfAbsent(new CacheQPath(getOwnerId(), node.getParentIdentifier(), node.getQPat...
[ "protected", "ItemData", "putNode", "(", "NodeData", "node", ",", "ModifyChildOption", "modifyListsOfChild", ")", "{", "if", "(", "node", ".", "getParentIdentifier", "(", ")", "!=", "null", ")", "{", "if", "(", "modifyListsOfChild", "==", "ModifyChildOption", "....
Internal put Node. @param node, NodeData, new data to put in the cache @return NodeData, previous data or null
[ "Internal", "put", "Node", "." ]
train
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/infinispan/ISPNCacheWorkspaceStorageCache.java#L1318-L1352
tropo/tropo-webapi-java
src/main/java/com/voxeo/tropo/Key.java
Key.JOIN_PROMPT
public static Key JOIN_PROMPT(String value, Voice voice) { """ Defines a prompt that plays to all participants of a conference when someone joins the conference.It's possible to define either TTS or an audio URL using additional attributes value and voice @param value value is used to play simple TTS and/or ...
java
public static Key JOIN_PROMPT(String value, Voice voice) { Map<String, String> map = new HashMap<String, String>(); map.put("value", value); if (voice != null) { map.put("voice", voice.toString()); } return createKey("joinPrompt", map); }
[ "public", "static", "Key", "JOIN_PROMPT", "(", "String", "value", ",", "Voice", "voice", ")", "{", "Map", "<", "String", ",", "String", ">", "map", "=", "new", "HashMap", "<", "String", ",", "String", ">", "(", ")", ";", "map", ".", "put", "(", "\"...
Defines a prompt that plays to all participants of a conference when someone joins the conference.It's possible to define either TTS or an audio URL using additional attributes value and voice @param value value is used to play simple TTS and/or an audio URL, and supports SSML @param voice voice is used to define whic...
[ "Defines", "a", "prompt", "that", "plays", "to", "all", "participants", "of", "a", "conference", "when", "someone", "joins", "the", "conference", ".", "It", "s", "possible", "to", "define", "either", "TTS", "or", "an", "audio", "URL", "using", "additional", ...
train
https://github.com/tropo/tropo-webapi-java/blob/96af1fa292c1d4b6321d85a559d9718d33eec7e0/src/main/java/com/voxeo/tropo/Key.java#L421-L430
apache/flink
flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/generator/GraphGeneratorUtils.java
GraphGeneratorUtils.vertexSequence
public static DataSet<Vertex<LongValue, NullValue>> vertexSequence(ExecutionEnvironment env, int parallelism, long vertexCount) { """ Generates {@link Vertex Vertices} with sequential, numerical labels. @param env the Flink execution environment. @param parallelism operator parallelism @param vertexCount numb...
java
public static DataSet<Vertex<LongValue, NullValue>> vertexSequence(ExecutionEnvironment env, int parallelism, long vertexCount) { Preconditions.checkArgument(vertexCount >= 0, "Vertex count must be non-negative"); if (vertexCount == 0) { return env .fromCollection(Collections.emptyList(), TypeInformation.of...
[ "public", "static", "DataSet", "<", "Vertex", "<", "LongValue", ",", "NullValue", ">", ">", "vertexSequence", "(", "ExecutionEnvironment", "env", ",", "int", "parallelism", ",", "long", "vertexCount", ")", "{", "Preconditions", ".", "checkArgument", "(", "vertex...
Generates {@link Vertex Vertices} with sequential, numerical labels. @param env the Flink execution environment. @param parallelism operator parallelism @param vertexCount number of sequential vertex labels @return {@link DataSet} of sequentially labeled {@link Vertex vertices}
[ "Generates", "{", "@link", "Vertex", "Vertices", "}", "with", "sequential", "numerical", "labels", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/generator/GraphGeneratorUtils.java#L56-L77
kaazing/gateway
service/http.proxy/src/main/java/org/kaazing/gateway/service/http/proxy/HttpProxyServiceHandler.java
HttpProxyServiceHandler.processHopByHopHeaders
private static boolean processHopByHopHeaders(HttpSession src, HttpSession dest) { """ /* Write all (except hop-by-hop) headers from source session to destination session. If the header is an upgrade one, let the Upgrade header go through as this service supports upgrade """ Set<String> hopByHopHea...
java
private static boolean processHopByHopHeaders(HttpSession src, HttpSession dest) { Set<String> hopByHopHeaders = getHopByHopHeaders(src); boolean upgrade = src.getReadHeader(HEADER_UPGRADE) != null; if (upgrade) { hopByHopHeaders.remove(HEADER_UPGRADE); } // Add sour...
[ "private", "static", "boolean", "processHopByHopHeaders", "(", "HttpSession", "src", ",", "HttpSession", "dest", ")", "{", "Set", "<", "String", ">", "hopByHopHeaders", "=", "getHopByHopHeaders", "(", "src", ")", ";", "boolean", "upgrade", "=", "src", ".", "ge...
/* Write all (except hop-by-hop) headers from source session to destination session. If the header is an upgrade one, let the Upgrade header go through as this service supports upgrade
[ "/", "*", "Write", "all", "(", "except", "hop", "-", "by", "-", "hop", ")", "headers", "from", "source", "session", "to", "destination", "session", "." ]
train
https://github.com/kaazing/gateway/blob/06017b19273109b3b992e528e702586446168d57/service/http.proxy/src/main/java/org/kaazing/gateway/service/http/proxy/HttpProxyServiceHandler.java#L444-L462
couchbase/couchbase-lite-java-core
src/main/java/com/couchbase/lite/util/Utils.java
Utils.shutdownAndAwaitTermination
public static void shutdownAndAwaitTermination(ExecutorService pool, long timeToWait4ShutDown, long timeToWait4ShutDownNow) { """ The following method shuts down an ExecutorService in two phases, first by calling...
java
public static void shutdownAndAwaitTermination(ExecutorService pool, long timeToWait4ShutDown, long timeToWait4ShutDownNow) { synchronized (pool) { // Disable new tasks from being submitted ...
[ "public", "static", "void", "shutdownAndAwaitTermination", "(", "ExecutorService", "pool", ",", "long", "timeToWait4ShutDown", ",", "long", "timeToWait4ShutDownNow", ")", "{", "synchronized", "(", "pool", ")", "{", "// Disable new tasks from being submitted", "pool", ".",...
The following method shuts down an ExecutorService in two phases, first by calling shutdown to reject incoming tasks, and then calling shutdownNow, if necessary, to cancel any lingering tasks: http://docs.oracle.com/javase/6/docs/api/java/util/concurrent/ExecutorService.html @param timeToWait4ShutDown - Seconds @pa...
[ "The", "following", "method", "shuts", "down", "an", "ExecutorService", "in", "two", "phases", "first", "by", "calling", "shutdown", "to", "reject", "incoming", "tasks", "and", "then", "calling", "shutdownNow", "if", "necessary", "to", "cancel", "any", "lingerin...
train
https://github.com/couchbase/couchbase-lite-java-core/blob/3b275642e2d2f231fd155ad9def9c5e9eff3118e/src/main/java/com/couchbase/lite/util/Utils.java#L315-L341
Mozu/mozu-java
mozu-java-core/src/main/java/com/mozu/api/urls/commerce/customer/accounts/CardUrl.java
CardUrl.deleteAccountCardUrl
public static MozuUrl deleteAccountCardUrl(Integer accountId, String cardId) { """ Get Resource Url for DeleteAccountCard @param accountId Unique identifier of the customer account. @param cardId Unique identifier of the card associated with the customer account billing contact. @return String Resource Url ...
java
public static MozuUrl deleteAccountCardUrl(Integer accountId, String cardId) { UrlFormatter formatter = new UrlFormatter("/api/commerce/customer/accounts/{accountId}/cards/{cardId}"); formatter.formatUrl("accountId", accountId); formatter.formatUrl("cardId", cardId); return new MozuUrl(formatter.getResour...
[ "public", "static", "MozuUrl", "deleteAccountCardUrl", "(", "Integer", "accountId", ",", "String", "cardId", ")", "{", "UrlFormatter", "formatter", "=", "new", "UrlFormatter", "(", "\"/api/commerce/customer/accounts/{accountId}/cards/{cardId}\"", ")", ";", "formatter", "....
Get Resource Url for DeleteAccountCard @param accountId Unique identifier of the customer account. @param cardId Unique identifier of the card associated with the customer account billing contact. @return String Resource Url
[ "Get", "Resource", "Url", "for", "DeleteAccountCard" ]
train
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/customer/accounts/CardUrl.java#L82-L88
xhsun/gw2wrapper
src/main/java/me/xhsun/guildwars2wrapper/SynchronousRequest.java
SynchronousRequest.getTPTransaction
public List<Transaction> getTPTransaction(String API, Transaction.Time time, Transaction.Type type) throws GuildWars2Exception { """ For more info on Transaction API go <a href="https://wiki.guildwars2.com/wiki/API:2/commerce/transactions">here</a><br/> Get transaction info linked to given API key @param API ...
java
public List<Transaction> getTPTransaction(String API, Transaction.Time time, Transaction.Type type) throws GuildWars2Exception { isParamValid(new ParamChecker(ParamType.API, API)); if (time == null || type == null) throw new GuildWars2Exception(ErrorCode.TransTime, "Transaction time/type cannot be empty"); try...
[ "public", "List", "<", "Transaction", ">", "getTPTransaction", "(", "String", "API", ",", "Transaction", ".", "Time", "time", ",", "Transaction", ".", "Type", "type", ")", "throws", "GuildWars2Exception", "{", "isParamValid", "(", "new", "ParamChecker", "(", "...
For more info on Transaction API go <a href="https://wiki.guildwars2.com/wiki/API:2/commerce/transactions">here</a><br/> Get transaction info linked to given API key @param API API key @param time current | History @param type buy | sell @return list of transaction base on the selection, if there is nothing, return e...
[ "For", "more", "info", "on", "Transaction", "API", "go", "<a", "href", "=", "https", ":", "//", "wiki", ".", "guildwars2", ".", "com", "/", "wiki", "/", "API", ":", "2", "/", "commerce", "/", "transactions", ">", "here<", "/", "a", ">", "<br", "/",...
train
https://github.com/xhsun/gw2wrapper/blob/c8a43b51f363b032074fb152ee6efe657e33e525/src/main/java/me/xhsun/guildwars2wrapper/SynchronousRequest.java#L1330-L1341
saxsys/SynchronizeFX
synchronizefx-core/src/main/java/de/saxsys/synchronizefx/core/metamodel/executors/lists/RemoveFromListRepairer.java
RemoveFromListRepairer.repairCommand
public List<RemoveFromList> repairCommand(final RemoveFromList toRepair, final RemoveFromList repairAgainst) { """ Repairs a {@link RemoveFromList} in relation to a {@link RemoveFromList} command. @param toRepair The command to repair. @param repairAgainst The command to repair against. @return The repaired...
java
public List<RemoveFromList> repairCommand(final RemoveFromList toRepair, final RemoveFromList repairAgainst) { if (toRepair.getStartPosition() + toRepair.getRemoveCount() <= repairAgainst.getStartPosition()) { return asList(toRepair); } if (toRepair.getStartPosition() >= repairAgains...
[ "public", "List", "<", "RemoveFromList", ">", "repairCommand", "(", "final", "RemoveFromList", "toRepair", ",", "final", "RemoveFromList", "repairAgainst", ")", "{", "if", "(", "toRepair", ".", "getStartPosition", "(", ")", "+", "toRepair", ".", "getRemoveCount", ...
Repairs a {@link RemoveFromList} in relation to a {@link RemoveFromList} command. @param toRepair The command to repair. @param repairAgainst The command to repair against. @return The repaired command.
[ "Repairs", "a", "{", "@link", "RemoveFromList", "}", "in", "relation", "to", "a", "{", "@link", "RemoveFromList", "}", "command", "." ]
train
https://github.com/saxsys/SynchronizeFX/blob/f3683020e4749110b38514eb5bc73a247998b579/synchronizefx-core/src/main/java/de/saxsys/synchronizefx/core/metamodel/executors/lists/RemoveFromListRepairer.java#L69-L91
javafxports/javafxmobile-plugin
src/main/java/org/javafxports/jfxmobile/plugin/android/task/ApkBuilder.java
ApkBuilder.checkFileForPackaging
public static boolean checkFileForPackaging(String fileName, String extension) { """ Checks a file to make sure it should be packaged as standard resources. @param fileName the name of the file (including extension) @param extension the extension of the file (excluding '.') @return true if the file should be pa...
java
public static boolean checkFileForPackaging(String fileName, String extension) { // ignore hidden files and backup files if (fileName.charAt(0) == '.' || fileName.charAt(fileName.length()-1) == '~') { return false; } return !"aidl".equalsIgnoreCase(extension) && //...
[ "public", "static", "boolean", "checkFileForPackaging", "(", "String", "fileName", ",", "String", "extension", ")", "{", "// ignore hidden files and backup files", "if", "(", "fileName", ".", "charAt", "(", "0", ")", "==", "'", "'", "||", "fileName", ".", "charA...
Checks a file to make sure it should be packaged as standard resources. @param fileName the name of the file (including extension) @param extension the extension of the file (excluding '.') @return true if the file should be packaged as standard java resources.
[ "Checks", "a", "file", "to", "make", "sure", "it", "should", "be", "packaged", "as", "standard", "resources", "." ]
train
https://github.com/javafxports/javafxmobile-plugin/blob/a9bef513b7e1bfa85f9a668226e6943c6d9f847f/src/main/java/org/javafxports/jfxmobile/plugin/android/task/ApkBuilder.java#L1036-L1056
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/Vector.java
Vector.setElementAt
public synchronized void setElementAt(E obj, int index) { """ Sets the component at the specified {@code index} of this vector to be the specified object. The previous component at that position is discarded. <p>The index must be a value greater than or equal to {@code 0} and less than the current size of th...
java
public synchronized void setElementAt(E obj, int index) { if (index >= elementCount) { throw new ArrayIndexOutOfBoundsException(index + " >= " + elementCount); } elementData[index] = obj; }
[ "public", "synchronized", "void", "setElementAt", "(", "E", "obj", ",", "int", "index", ")", "{", "if", "(", "index", ">=", "elementCount", ")", "{", "throw", "new", "ArrayIndexOutOfBoundsException", "(", "index", "+", "\" >= \"", "+", "elementCount", ")", "...
Sets the component at the specified {@code index} of this vector to be the specified object. The previous component at that position is discarded. <p>The index must be a value greater than or equal to {@code 0} and less than the current size of the vector. <p>This method is identical in functionality to the {@link #s...
[ "Sets", "the", "component", "at", "the", "specified", "{", "@code", "index", "}", "of", "this", "vector", "to", "be", "the", "specified", "object", ".", "The", "previous", "component", "at", "that", "position", "is", "discarded", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/Vector.java#L528-L534
yatechorg/jedis-utils
src/main/java/org/yatech/jedis/collections/JedisCollections.java
JedisCollections.getSortedSet
public JedisSortedSet getSortedSet(int db, String key, ScoreProvider scoreProvider) { """ Get a {@link java.util.Set} abstraction of a sorted set redis value in the specified database index and key. @param db the database index where the key with the sorted set value is / should be stored. @param key the key of ...
java
public JedisSortedSet getSortedSet(int db, String key, ScoreProvider scoreProvider) { return new JedisSortedSet(jedisPool, db, key, scoreProvider); }
[ "public", "JedisSortedSet", "getSortedSet", "(", "int", "db", ",", "String", "key", ",", "ScoreProvider", "scoreProvider", ")", "{", "return", "new", "JedisSortedSet", "(", "jedisPool", ",", "db", ",", "key", ",", "scoreProvider", ")", ";", "}" ]
Get a {@link java.util.Set} abstraction of a sorted set redis value in the specified database index and key. @param db the database index where the key with the sorted set value is / should be stored. @param key the key of the sorted set value in redis @param scoreProvider the provider to use for assigning scores when ...
[ "Get", "a", "{" ]
train
https://github.com/yatechorg/jedis-utils/blob/1951609fa6697df4f69be76e7d66b9284924bd97/src/main/java/org/yatech/jedis/collections/JedisCollections.java#L131-L133
UrielCh/ovh-java-sdk
ovh-java-sdk-ipLoadbalancing/src/main/java/net/minidev/ovh/api/ApiOvhIpLoadbalancing.java
ApiOvhIpLoadbalancing.serviceName_task_GET
public ArrayList<Long> serviceName_task_GET(String serviceName, OvhTaskActionEnum action, Date creationDate_from, Date creationDate_to, Date doneDate_from, Date doneDate_to, OvhTaskStatusEnum status) throws IOException { """ Task for this iplb REST: GET /ipLoadbalancing/{serviceName}/task @param doneDate_to [r...
java
public ArrayList<Long> serviceName_task_GET(String serviceName, OvhTaskActionEnum action, Date creationDate_from, Date creationDate_to, Date doneDate_from, Date doneDate_to, OvhTaskStatusEnum status) throws IOException { String qPath = "/ipLoadbalancing/{serviceName}/task"; StringBuilder sb = path(qPath, serviceNam...
[ "public", "ArrayList", "<", "Long", ">", "serviceName_task_GET", "(", "String", "serviceName", ",", "OvhTaskActionEnum", "action", ",", "Date", "creationDate_from", ",", "Date", "creationDate_to", ",", "Date", "doneDate_from", ",", "Date", "doneDate_to", ",", "OvhTa...
Task for this iplb REST: GET /ipLoadbalancing/{serviceName}/task @param doneDate_to [required] Filter the value of doneDate property (<=) @param doneDate_from [required] Filter the value of doneDate property (>=) @param action [required] Filter the value of action property (=) @param creationDate_to [required] Filter ...
[ "Task", "for", "this", "iplb" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-ipLoadbalancing/src/main/java/net/minidev/ovh/api/ApiOvhIpLoadbalancing.java#L1068-L1079
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/internal/serialization/impl/SerializationUtil.java
SerializationUtil.writeNullableList
public static <T> void writeNullableList(List<T> items, ObjectDataOutput out) throws IOException { """ Writes a list to an {@link ObjectDataOutput}. The list's size is written to the data output, then each object in the list is serialized. The list is allowed to be null. @param items list of items to be seria...
java
public static <T> void writeNullableList(List<T> items, ObjectDataOutput out) throws IOException { writeNullableCollection(items, out); }
[ "public", "static", "<", "T", ">", "void", "writeNullableList", "(", "List", "<", "T", ">", "items", ",", "ObjectDataOutput", "out", ")", "throws", "IOException", "{", "writeNullableCollection", "(", "items", ",", "out", ")", ";", "}" ]
Writes a list to an {@link ObjectDataOutput}. The list's size is written to the data output, then each object in the list is serialized. The list is allowed to be null. @param items list of items to be serialized @param out data output to write to @param <T> type of items @throws IOException when an error occurs w...
[ "Writes", "a", "list", "to", "an", "{", "@link", "ObjectDataOutput", "}", ".", "The", "list", "s", "size", "is", "written", "to", "the", "data", "output", "then", "each", "object", "in", "the", "list", "is", "serialized", ".", "The", "list", "is", "all...
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/serialization/impl/SerializationUtil.java#L234-L236
OpenBEL/openbel-framework
org.openbel.framework.core/src/main/java/org/openbel/framework/core/df/cache/DefaultCacheableResourceService.java
DefaultCacheableResourceService.hashCompare
private HashState hashCompare(String location, File resource) throws ResourceDownloadError { """ Compare hashes of the remote resource to the local resource. The comparison can result in the following: <ul> <li>If the resource's remote hash does not exist then return {@link HashState#MISSING_REMOTE...
java
private HashState hashCompare(String location, File resource) throws ResourceDownloadError { String tmpPath = getSystemConfiguration().getCacheDirectory() .getAbsolutePath(); String remoteHashLocation = location + SHA256_EXTENSION; String tempHashPath = asPath( ...
[ "private", "HashState", "hashCompare", "(", "String", "location", ",", "File", "resource", ")", "throws", "ResourceDownloadError", "{", "String", "tmpPath", "=", "getSystemConfiguration", "(", ")", ".", "getCacheDirectory", "(", ")", ".", "getAbsolutePath", "(", "...
Compare hashes of the remote resource to the local resource. The comparison can result in the following: <ul> <li>If the resource's remote hash does not exist then return {@link HashState#MISSING_REMOTE_HASH}.</li> <li>If the resource's remote hash matches the local resource's hash then return {@link HashState#HASH_MAT...
[ "Compare", "hashes", "of", "the", "remote", "resource", "to", "the", "local", "resource", ".", "The", "comparison", "can", "result", "in", "the", "following", ":", "<ul", ">", "<li", ">", "If", "the", "resource", "s", "remote", "hash", "does", "not", "ex...
train
https://github.com/OpenBEL/openbel-framework/blob/149f80b1d6eabb15ab15815b6f745b0afa9fd2d3/org.openbel.framework.core/src/main/java/org/openbel/framework/core/df/cache/DefaultCacheableResourceService.java#L140-L185
guardtime/ksi-java-sdk
ksi-common/src/main/java/com/guardtime/ksi/util/Base16.java
Base16.encodeWithColons
public static String encodeWithColons(byte[] in) { """ Encodes the given bytes into a base-16 string, inserting colons after every 2 characters of output. @param in the bytes to encode. @return The formatted base-16 string, or null if {@code in} is null. """ if (in == null) { return...
java
public static String encodeWithColons(byte[] in) { if (in == null) { return null; } return encodeWithColons(in, 0, in.length); }
[ "public", "static", "String", "encodeWithColons", "(", "byte", "[", "]", "in", ")", "{", "if", "(", "in", "==", "null", ")", "{", "return", "null", ";", "}", "return", "encodeWithColons", "(", "in", ",", "0", ",", "in", ".", "length", ")", ";", "}"...
Encodes the given bytes into a base-16 string, inserting colons after every 2 characters of output. @param in the bytes to encode. @return The formatted base-16 string, or null if {@code in} is null.
[ "Encodes", "the", "given", "bytes", "into", "a", "base", "-", "16", "string", "inserting", "colons", "after", "every", "2", "characters", "of", "output", "." ]
train
https://github.com/guardtime/ksi-java-sdk/blob/b2cd877050f0f392657c724452318d10a1002171/ksi-common/src/main/java/com/guardtime/ksi/util/Base16.java#L75-L80
box/box-android-sdk
box-content-sdk/src/main/java/com/box/androidsdk/content/BoxApiFolder.java
BoxApiFolder.getCopyRequest
public BoxRequestsFolder.CopyFolder getCopyRequest(String id, String parentId) { """ Gets a request that copies a folder @param id id of folder to copy @param parentId id of parent folder to copy folder into @return request to copy a folder """ BoxRequestsFolder.CopyFolder request = n...
java
public BoxRequestsFolder.CopyFolder getCopyRequest(String id, String parentId) { BoxRequestsFolder.CopyFolder request = new BoxRequestsFolder.CopyFolder(id, parentId, getFolderCopyUrl(id), mSession); return request; }
[ "public", "BoxRequestsFolder", ".", "CopyFolder", "getCopyRequest", "(", "String", "id", ",", "String", "parentId", ")", "{", "BoxRequestsFolder", ".", "CopyFolder", "request", "=", "new", "BoxRequestsFolder", ".", "CopyFolder", "(", "id", ",", "parentId", ",", ...
Gets a request that copies a folder @param id id of folder to copy @param parentId id of parent folder to copy folder into @return request to copy a folder
[ "Gets", "a", "request", "that", "copies", "a", "folder" ]
train
https://github.com/box/box-android-sdk/blob/a621ad5ddebf23067fec27529130d72718fc0e88/box-content-sdk/src/main/java/com/box/androidsdk/content/BoxApiFolder.java#L170-L173
JOML-CI/JOML
src/org/joml/Matrix4f.java
Matrix4f.translationRotateScale
public Matrix4f translationRotateScale(float tx, float ty, float tz, float qx, float qy, float qz, float qw, float scale) { """ Set <code>this</code> matrix to <code>T * R * S</code>, where <code>T</code> is a translation by th...
java
public Matrix4f translationRotateScale(float tx, float ty, float tz, float qx, float qy, float qz, float qw, float scale) { return translationRotateScale(tx, ty, tz, qx, qy, qz, qw, scale, scale, scale); }
[ "public", "Matrix4f", "translationRotateScale", "(", "float", "tx", ",", "float", "ty", ",", "float", "tz", ",", "float", "qx", ",", "float", "qy", ",", "float", "qz", ",", "float", "qw", ",", "float", "scale", ")", "{", "return", "translationRotateScale",...
Set <code>this</code> matrix to <code>T * R * S</code>, where <code>T</code> is a translation by the given <code>(tx, ty, tz)</code>, <code>R</code> is a rotation transformation specified by the quaternion <code>(qx, qy, qz, qw)</code>, and <code>S</code> is a scaling transformation which scales all three axes by <code...
[ "Set", "<code", ">", "this<", "/", "code", ">", "matrix", "to", "<code", ">", "T", "*", "R", "*", "S<", "/", "code", ">", "where", "<code", ">", "T<", "/", "code", ">", "is", "a", "translation", "by", "the", "given", "<code", ">", "(", "tx", "t...
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Matrix4f.java#L4107-L4111
couchbase/couchbase-java-client
src/main/java/com/couchbase/client/java/subdoc/MutateInBuilder.java
MutateInBuilder.arrayInsert
public <T> MutateInBuilder arrayInsert(String path, T value) { """ Insert into an existing array at a specific position (denoted in the path, eg. "sub.array[2]"). @param path the path (including array position) where to insert the value. @param value the value to insert in the array. """ asyncBuil...
java
public <T> MutateInBuilder arrayInsert(String path, T value) { asyncBuilder.arrayInsert(path, value); return this; }
[ "public", "<", "T", ">", "MutateInBuilder", "arrayInsert", "(", "String", "path", ",", "T", "value", ")", "{", "asyncBuilder", ".", "arrayInsert", "(", "path", ",", "value", ")", ";", "return", "this", ";", "}" ]
Insert into an existing array at a specific position (denoted in the path, eg. "sub.array[2]"). @param path the path (including array position) where to insert the value. @param value the value to insert in the array.
[ "Insert", "into", "an", "existing", "array", "at", "a", "specific", "position", "(", "denoted", "in", "the", "path", "eg", ".", "sub", ".", "array", "[", "2", "]", ")", "." ]
train
https://github.com/couchbase/couchbase-java-client/blob/f36a0ee0c66923bdde47838ca543e50cbaa99e14/src/main/java/com/couchbase/client/java/subdoc/MutateInBuilder.java#L911-L914
carewebframework/carewebframework-core
org.carewebframework.shell/src/main/java/org/carewebframework/shell/layout/LayoutUtil.java
LayoutUtil.copyAttributes
public static void copyAttributes(Map<String, String> source, Element dest) { """ Copy attributes from a map to a DOM node. @param source Source map. @param dest DOM node. """ for (Entry<String, String> entry : source.entrySet()) { dest.setAttribute(entry.getKey(), entry.getValue()); ...
java
public static void copyAttributes(Map<String, String> source, Element dest) { for (Entry<String, String> entry : source.entrySet()) { dest.setAttribute(entry.getKey(), entry.getValue()); } }
[ "public", "static", "void", "copyAttributes", "(", "Map", "<", "String", ",", "String", ">", "source", ",", "Element", "dest", ")", "{", "for", "(", "Entry", "<", "String", ",", "String", ">", "entry", ":", "source", ".", "entrySet", "(", ")", ")", "...
Copy attributes from a map to a DOM node. @param source Source map. @param dest DOM node.
[ "Copy", "attributes", "from", "a", "map", "to", "a", "DOM", "node", "." ]
train
https://github.com/carewebframework/carewebframework-core/blob/fa3252d4f7541dbe151b92c3d4f6f91433cd1673/org.carewebframework.shell/src/main/java/org/carewebframework/shell/layout/LayoutUtil.java#L164-L168
google/closure-templates
java/src/com/google/template/soy/pysrc/restricted/PyExprUtils.java
PyExprUtils.genPyNotNullCheck
public static PyExpr genPyNotNullCheck(PyExpr pyExpr) { """ Generates a Python not null (None) check expression for the given {@link PyExpr}. """ ImmutableList<PyExpr> exprs = ImmutableList.of(pyExpr, new PyExpr("None", Integer.MAX_VALUE)); // Note: is/is not is Python's identity comparison. It's used ...
java
public static PyExpr genPyNotNullCheck(PyExpr pyExpr) { ImmutableList<PyExpr> exprs = ImmutableList.of(pyExpr, new PyExpr("None", Integer.MAX_VALUE)); // Note: is/is not is Python's identity comparison. It's used for None checks for performance. String conditionalExpr = genExprWithNewToken(Operator.NOT_EQUA...
[ "public", "static", "PyExpr", "genPyNotNullCheck", "(", "PyExpr", "pyExpr", ")", "{", "ImmutableList", "<", "PyExpr", ">", "exprs", "=", "ImmutableList", ".", "of", "(", "pyExpr", ",", "new", "PyExpr", "(", "\"None\"", ",", "Integer", ".", "MAX_VALUE", ")", ...
Generates a Python not null (None) check expression for the given {@link PyExpr}.
[ "Generates", "a", "Python", "not", "null", "(", "None", ")", "check", "expression", "for", "the", "given", "{" ]
train
https://github.com/google/closure-templates/blob/cc61e1dff70ae97f24f417a57410081bc498bd56/java/src/com/google/template/soy/pysrc/restricted/PyExprUtils.java#L129-L134
sebastiangraf/treetank
interfacemodules/filelistener/src/main/java/org/treetank/filelistener/file/Filelistener.java
Filelistener.addFilelistener
public static boolean addFilelistener(String pResourcename, String pListenerPath) throws FileNotFoundException, IOException, ClassNotFoundException { """ Add a new filelistener to the system. @param pResourcename @param pListenerPath @return return true if there has been a success. @throws FileNotFou...
java
public static boolean addFilelistener(String pResourcename, String pListenerPath) throws FileNotFoundException, IOException, ClassNotFoundException { mFilelistenerToPaths = new HashMap<String, String>(); File listenerFilePaths = new File(StorageManager.ROOT_PATH + File.separator + "mapping.data...
[ "public", "static", "boolean", "addFilelistener", "(", "String", "pResourcename", ",", "String", "pListenerPath", ")", "throws", "FileNotFoundException", ",", "IOException", ",", "ClassNotFoundException", "{", "mFilelistenerToPaths", "=", "new", "HashMap", "<", "String"...
Add a new filelistener to the system. @param pResourcename @param pListenerPath @return return true if there has been a success. @throws FileNotFoundException @throws IOException @throws ClassNotFoundException
[ "Add", "a", "new", "filelistener", "to", "the", "system", "." ]
train
https://github.com/sebastiangraf/treetank/blob/9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60/interfacemodules/filelistener/src/main/java/org/treetank/filelistener/file/Filelistener.java#L487-L507
lessthanoptimal/BoofCV
main/boofcv-ip/src/main/java/boofcv/alg/color/ColorYuv.java
ColorYuv.rgbToYCbCr
public static void rgbToYCbCr( int r , int g , int b , byte yuv[] ) { """ Conversion from RGB to YCbCr. See [Jack07]. @param r Red [0 to 255] @param g Green [0 to 255] @param b Blue [0 to 255] """ // multiply coefficients in book by 1024, which is 2^10 yuv[0] = (byte)((( 187*r + 629*g + 63*b ) >> 10)...
java
public static void rgbToYCbCr( int r , int g , int b , byte yuv[] ) { // multiply coefficients in book by 1024, which is 2^10 yuv[0] = (byte)((( 187*r + 629*g + 63*b ) >> 10) + 16); yuv[1] = (byte)(((-103*r - 346*g + 450*b) >> 10) + 128); yuv[2] = (byte)((( 450*r - 409*g - 41*b ) >> 10) + 128); }
[ "public", "static", "void", "rgbToYCbCr", "(", "int", "r", ",", "int", "g", ",", "int", "b", ",", "byte", "yuv", "[", "]", ")", "{", "// multiply coefficients in book by 1024, which is 2^10", "yuv", "[", "0", "]", "=", "(", "byte", ")", "(", "(", "(", ...
Conversion from RGB to YCbCr. See [Jack07]. @param r Red [0 to 255] @param g Green [0 to 255] @param b Blue [0 to 255]
[ "Conversion", "from", "RGB", "to", "YCbCr", ".", "See", "[", "Jack07", "]", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/alg/color/ColorYuv.java#L104-L109
whitfin/siphash-java
src/main/java/io/whitfin/siphash/SipHasher.java
SipHasher.bytesToLong
static long bytesToLong(byte[] bytes, int offset) { """ Converts a chunk of 8 bytes to a number in little endian. Accepts an offset to determine where the chunk begins. @param bytes the byte array containing our bytes to convert. @param offset the index to start at when chunking bytes. @return a long re...
java
static long bytesToLong(byte[] bytes, int offset) { long m = 0; for (int i = 0; i < 8; i++) { m |= ((((long) bytes[i + offset]) & 0xff) << (8 * i)); } return m; }
[ "static", "long", "bytesToLong", "(", "byte", "[", "]", "bytes", ",", "int", "offset", ")", "{", "long", "m", "=", "0", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "8", ";", "i", "++", ")", "{", "m", "|=", "(", "(", "(", "(", "l...
Converts a chunk of 8 bytes to a number in little endian. Accepts an offset to determine where the chunk begins. @param bytes the byte array containing our bytes to convert. @param offset the index to start at when chunking bytes. @return a long representation, in little endian.
[ "Converts", "a", "chunk", "of", "8", "bytes", "to", "a", "number", "in", "little", "endian", "." ]
train
https://github.com/whitfin/siphash-java/blob/0744d68238bf6d0258154a8152bf2f4537b3cbb8/src/main/java/io/whitfin/siphash/SipHasher.java#L189-L195
AzureAD/azure-activedirectory-library-for-java
src/samples/web-app-samples-for-adal4j/src/main/java/com/microsoft/aad/adal4jsample/HttpClientHelper.java
HttpClientHelper.processResponse
public static JSONObject processResponse(int responseCode, String errorCode, String errorMsg) throws JSONException { """ for bad response, whose responseCode is not 200 level @param responseCode @param errorCode @param errorMsg @return @throws JSONException """ JSONObject response = new JSONObj...
java
public static JSONObject processResponse(int responseCode, String errorCode, String errorMsg) throws JSONException { JSONObject response = new JSONObject(); response.put("responseCode", responseCode); response.put("errorCode", errorCode); response.put("errorMsg", errorMsg); ...
[ "public", "static", "JSONObject", "processResponse", "(", "int", "responseCode", ",", "String", "errorCode", ",", "String", "errorMsg", ")", "throws", "JSONException", "{", "JSONObject", "response", "=", "new", "JSONObject", "(", ")", ";", "response", ".", "put"...
for bad response, whose responseCode is not 200 level @param responseCode @param errorCode @param errorMsg @return @throws JSONException
[ "for", "bad", "response", "whose", "responseCode", "is", "not", "200", "level" ]
train
https://github.com/AzureAD/azure-activedirectory-library-for-java/blob/7f0004fee6faee5818e75623113993a267ceb1c4/src/samples/web-app-samples-for-adal4j/src/main/java/com/microsoft/aad/adal4jsample/HttpClientHelper.java#L115-L122
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/core/AssertKripton.java
AssertKripton.assertTrueOrUnknownClassInJQLException
public static void assertTrueOrUnknownClassInJQLException(boolean expression, SQLiteModelMethod method, String className) { """ Assert true or unknown class in JQL exception. @param expression the expression @param method the method @param className the class name """ if (!expression) { throw (...
java
public static void assertTrueOrUnknownClassInJQLException(boolean expression, SQLiteModelMethod method, String className) { if (!expression) { throw (new UnknownClassInJQLException(method, className)); } }
[ "public", "static", "void", "assertTrueOrUnknownClassInJQLException", "(", "boolean", "expression", ",", "SQLiteModelMethod", "method", ",", "String", "className", ")", "{", "if", "(", "!", "expression", ")", "{", "throw", "(", "new", "UnknownClassInJQLException", "...
Assert true or unknown class in JQL exception. @param expression the expression @param method the method @param className the class name
[ "Assert", "true", "or", "unknown", "class", "in", "JQL", "exception", "." ]
train
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/core/AssertKripton.java#L275-L280
apache/flink
flink-queryable-state/flink-queryable-state-client-java/src/main/java/org/apache/flink/queryablestate/client/QueryableStateClient.java
QueryableStateClient.getKvState
@PublicEvolving public <K, S extends State, V> CompletableFuture<S> getKvState( final JobID jobId, final String queryableStateName, final K key, final TypeHint<K> keyTypeHint, final StateDescriptor<S, V> stateDescriptor) { """ Returns a future holding the request result. @param jobId ...
java
@PublicEvolving public <K, S extends State, V> CompletableFuture<S> getKvState( final JobID jobId, final String queryableStateName, final K key, final TypeHint<K> keyTypeHint, final StateDescriptor<S, V> stateDescriptor) { Preconditions.checkNotNull(keyTypeHint); TypeInformation<K> keyTypeInfo = k...
[ "@", "PublicEvolving", "public", "<", "K", ",", "S", "extends", "State", ",", "V", ">", "CompletableFuture", "<", "S", ">", "getKvState", "(", "final", "JobID", "jobId", ",", "final", "String", "queryableStateName", ",", "final", "K", "key", ",", "final", ...
Returns a future holding the request result. @param jobId JobID of the job the queryable state belongs to. @param queryableStateName Name under which the state is queryable. @param key The key we are interested in. @param keyTypeHint A {@link TypeHint} used to extract the typ...
[ "Returns", "a", "future", "holding", "the", "request", "result", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-queryable-state/flink-queryable-state-client-java/src/main/java/org/apache/flink/queryablestate/client/QueryableStateClient.java#L196-L208
moparisthebest/beehive
beehive-ejb-control/src/main/java/org/apache/beehive/controls/system/ejb/internal/DomUtils.java
DomUtils.getChildElementText
static String getChildElementText(Element parent, String name) { """ <p>Returns the text value of a child element. Returns <code>null</code> if there is no child element found.</p> @param parent parent element @param name name of the child element @return text value """ // Get children ...
java
static String getChildElementText(Element parent, String name) { // Get children List list = DomUtils.getChildElementsByName(parent, name); if (list.size() == 1) { Element child = (Element) list.get(0); StringBuffer buf = new StringBuffer(); NodeList childr...
[ "static", "String", "getChildElementText", "(", "Element", "parent", ",", "String", "name", ")", "{", "// Get children", "List", "list", "=", "DomUtils", ".", "getChildElementsByName", "(", "parent", ",", "name", ")", ";", "if", "(", "list", ".", "size", "("...
<p>Returns the text value of a child element. Returns <code>null</code> if there is no child element found.</p> @param parent parent element @param name name of the child element @return text value
[ "<p", ">", "Returns", "the", "text", "value", "of", "a", "child", "element", ".", "Returns", "<code", ">", "null<", "/", "code", ">", "if", "there", "is", "no", "child", "element", "found", ".", "<", "/", "p", ">" ]
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-ejb-control/src/main/java/org/apache/beehive/controls/system/ejb/internal/DomUtils.java#L94-L117
liferay/com-liferay-commerce
commerce-discount-service/src/main/java/com/liferay/commerce/discount/service/persistence/impl/CommerceDiscountPersistenceImpl.java
CommerceDiscountPersistenceImpl.findByUUID_G
@Override public CommerceDiscount findByUUID_G(String uuid, long groupId) throws NoSuchDiscountException { """ Returns the commerce discount where uuid = &#63; and groupId = &#63; or throws a {@link NoSuchDiscountException} if it could not be found. @param uuid the uuid @param groupId the group ID @return ...
java
@Override public CommerceDiscount findByUUID_G(String uuid, long groupId) throws NoSuchDiscountException { CommerceDiscount commerceDiscount = fetchByUUID_G(uuid, groupId); if (commerceDiscount == null) { StringBundler msg = new StringBundler(6); msg.append(_NO_SUCH_ENTITY_WITH_KEY); msg.append("uuid...
[ "@", "Override", "public", "CommerceDiscount", "findByUUID_G", "(", "String", "uuid", ",", "long", "groupId", ")", "throws", "NoSuchDiscountException", "{", "CommerceDiscount", "commerceDiscount", "=", "fetchByUUID_G", "(", "uuid", ",", "groupId", ")", ";", "if", ...
Returns the commerce discount where uuid = &#63; and groupId = &#63; or throws a {@link NoSuchDiscountException} if it could not be found. @param uuid the uuid @param groupId the group ID @return the matching commerce discount @throws NoSuchDiscountException if a matching commerce discount could not be found
[ "Returns", "the", "commerce", "discount", "where", "uuid", "=", "&#63", ";", "and", "groupId", "=", "&#63", ";", "or", "throws", "a", "{", "@link", "NoSuchDiscountException", "}", "if", "it", "could", "not", "be", "found", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-discount-service/src/main/java/com/liferay/commerce/discount/service/persistence/impl/CommerceDiscountPersistenceImpl.java#L670-L696
j-a-w-r/jawr-main-repo
jawr-tools/jawr-bundle-processor/src/main/java/net/jawr/web/bundle/processor/renderer/BasicBundleRenderer.java
BasicBundleRenderer.createBundleLink
protected String createBundleLink(String bundleId, String contextPath) { """ Creates a link to a bundle in the page. @param bundleId the bundle id @param contextPath the context path @return the link to a bundle in the page """ // When debug mode is on and the resource is generated the path must ...
java
protected String createBundleLink(String bundleId, String contextPath) { // When debug mode is on and the resource is generated the path must include a parameter JawrConfig config = bundler.getConfig(); if( config.isDebugModeOn() && config.getGeneratorRegistry().isPathGenerated(bundleId)) { ...
[ "protected", "String", "createBundleLink", "(", "String", "bundleId", ",", "String", "contextPath", ")", "{", "// When debug mode is on and the resource is generated the path must include a parameter", "JawrConfig", "config", "=", "bundler", ".", "getConfig", "(", ")", ";", ...
Creates a link to a bundle in the page. @param bundleId the bundle id @param contextPath the context path @return the link to a bundle in the page
[ "Creates", "a", "link", "to", "a", "bundle", "in", "the", "page", "." ]
train
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr-tools/jawr-bundle-processor/src/main/java/net/jawr/web/bundle/processor/renderer/BasicBundleRenderer.java#L95-L107
casbin/jcasbin
src/main/java/org/casbin/jcasbin/model/Policy.java
Policy.addPolicy
public boolean addPolicy(String sec, String ptype, List<String> rule) { """ addPolicy adds a policy rule to the model. @param sec the section, "p" or "g". @param ptype the policy type, "p", "p2", .. or "g", "g2", .. @param rule the policy rule. @return succeeds or not. """ if (!hasPolicy(sec, pty...
java
public boolean addPolicy(String sec, String ptype, List<String> rule) { if (!hasPolicy(sec, ptype, rule)) { model.get(sec).get(ptype).policy.add(rule); return true; } return false; }
[ "public", "boolean", "addPolicy", "(", "String", "sec", ",", "String", "ptype", ",", "List", "<", "String", ">", "rule", ")", "{", "if", "(", "!", "hasPolicy", "(", "sec", ",", "ptype", ",", "rule", ")", ")", "{", "model", ".", "get", "(", "sec", ...
addPolicy adds a policy rule to the model. @param sec the section, "p" or "g". @param ptype the policy type, "p", "p2", .. or "g", "g2", .. @param rule the policy rule. @return succeeds or not.
[ "addPolicy", "adds", "a", "policy", "rule", "to", "the", "model", "." ]
train
https://github.com/casbin/jcasbin/blob/b46d7a756b6c39cdb17e0600607e5fcdc66edd11/src/main/java/org/casbin/jcasbin/model/Policy.java#L147-L153
lessthanoptimal/BoofCV
main/boofcv-sfm/src/main/java/boofcv/alg/sfm/d3/direct/VisOdomDirectColorDepth.java
VisOdomDirectColorDepth.setKeyFrame
void setKeyFrame(Planar<I> input, ImagePixelTo3D pixelTo3D) { """ Set's the keyframe. This is the image which motion is estimated relative to. The 3D location of points in the keyframe must be known. @param input Image which is to be used as the key frame @param pixelTo3D Used to compute 3D points from pixe...
java
void setKeyFrame(Planar<I> input, ImagePixelTo3D pixelTo3D) { InputSanityCheck.checkSameShape(derivX,input); wrapI.wrap(input); keypixels.reset(); for (int y = 0; y < input.height; y++) { for (int x = 0; x < input.width; x++) { // See if there's a valid 3D point at this location if( !pixelTo3D.proce...
[ "void", "setKeyFrame", "(", "Planar", "<", "I", ">", "input", ",", "ImagePixelTo3D", "pixelTo3D", ")", "{", "InputSanityCheck", ".", "checkSameShape", "(", "derivX", ",", "input", ")", ";", "wrapI", ".", "wrap", "(", "input", ")", ";", "keypixels", ".", ...
Set's the keyframe. This is the image which motion is estimated relative to. The 3D location of points in the keyframe must be known. @param input Image which is to be used as the key frame @param pixelTo3D Used to compute 3D points from pixels in key frame
[ "Set", "s", "the", "keyframe", ".", "This", "is", "the", "image", "which", "motion", "is", "estimated", "relative", "to", ".", "The", "3D", "location", "of", "points", "in", "the", "keyframe", "must", "be", "known", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-sfm/src/main/java/boofcv/alg/sfm/d3/direct/VisOdomDirectColorDepth.java#L192-L223
albfernandez/itext2
src/main/java/com/lowagie/text/pdf/PdfContentByte.java
PdfContentByte.setAction
public void setAction(PdfAction action, float llx, float lly, float urx, float ury) { """ Implements an action in an area. @param action the <CODE>PdfAction</CODE> @param llx the lower left x corner of the activation area @param lly the lower left y corner of the activation area @param urx the upper right x co...
java
public void setAction(PdfAction action, float llx, float lly, float urx, float ury) { pdf.setAction(action, llx, lly, urx, ury); }
[ "public", "void", "setAction", "(", "PdfAction", "action", ",", "float", "llx", ",", "float", "lly", ",", "float", "urx", ",", "float", "ury", ")", "{", "pdf", ".", "setAction", "(", "action", ",", "llx", ",", "lly", ",", "urx", ",", "ury", ")", ";...
Implements an action in an area. @param action the <CODE>PdfAction</CODE> @param llx the lower left x corner of the activation area @param lly the lower left y corner of the activation area @param urx the upper right x corner of the activation area @param ury the upper right y corner of the activation area
[ "Implements", "an", "action", "in", "an", "area", "." ]
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/pdf/PdfContentByte.java#L2616-L2618
opsmatters/newrelic-api
src/main/java/com/opsmatters/newrelic/api/httpclient/GsonMessageBodyHandler.java
GsonMessageBodyHandler.writeTo
@Override public void writeTo(Object object, Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String, Object> httpHeaders, OutputStream entityStream) throws IOException, WebApplicationException { """ Write a type to a HTTP message. @param object Th...
java
@Override public void writeTo(Object object, Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String, Object> httpHeaders, OutputStream entityStream) throws IOException, WebApplicationException { OutputStreamWriter outputStreamWriter = null; ...
[ "@", "Override", "public", "void", "writeTo", "(", "Object", "object", ",", "Class", "<", "?", ">", "type", ",", "Type", "genericType", ",", "Annotation", "[", "]", "annotations", ",", "MediaType", "mediaType", ",", "MultivaluedMap", "<", "String", ",", "O...
Write a type to a HTTP message. @param object The instance to write @param type The class of instance that is to be written @param genericType The type of instance to be written @param annotations An array of the annotations attached to the message entity instance @param mediaType The media type of the HTTP entity @par...
[ "Write", "a", "type", "to", "a", "HTTP", "message", "." ]
train
https://github.com/opsmatters/newrelic-api/blob/5bc2ea62ec368db891e4fd5fe3dcdf529d086b5e/src/main/java/com/opsmatters/newrelic/api/httpclient/GsonMessageBodyHandler.java#L325-L346
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.jms.2.0/src/com/ibm/ws/sib/api/jms/impl/MsgDestEncodingUtilsImpl.java
MsgDestEncodingUtilsImpl.getMessageRepresentationFromDest
public final byte[] getMessageRepresentationFromDest(JmsDestination dest, EncodingLevel encodingLevel) throws JMSException { """ /* @see com.ibm.ws.sib.api.jms.MessageDestEncodingUtils#getMessageRepresentationFromDest(com.ibm.websphere.sib.api.jms.JmsDestination) Returns the efficient byte[] representation of ...
java
public final byte[] getMessageRepresentationFromDest(JmsDestination dest, EncodingLevel encodingLevel) throws JMSException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "getMessageRepresentationFromDest", new Object[]{dest, encodingLevel}); boolean isTopic = false; byt...
[ "public", "final", "byte", "[", "]", "getMessageRepresentationFromDest", "(", "JmsDestination", "dest", ",", "EncodingLevel", "encodingLevel", ")", "throws", "JMSException", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "...
/* @see com.ibm.ws.sib.api.jms.MessageDestEncodingUtils#getMessageRepresentationFromDest(com.ibm.websphere.sib.api.jms.JmsDestination) Returns the efficient byte[] representation of the parameter destination that can be stored in the message for transmission. The boolean parameter indicates whether a full (normal dest...
[ "/", "*", "@see", "com", ".", "ibm", ".", "ws", ".", "sib", ".", "api", ".", "jms", ".", "MessageDestEncodingUtils#getMessageRepresentationFromDest", "(", "com", ".", "ibm", ".", "websphere", ".", "sib", ".", "api", ".", "jms", ".", "JmsDestination", ")" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.jms.2.0/src/com/ibm/ws/sib/api/jms/impl/MsgDestEncodingUtilsImpl.java#L183-L223
duracloud/management-console
account-management-monitor/src/main/java/org/duracloud/account/monitor/duplication/DuplicationMonitor.java
DuplicationMonitor.getStoreManager
private ContentStoreManager getStoreManager(String host) throws DBNotFoundException { """ /* Create the store manager to connect to this DuraCloud account instance """ ContentStoreManager storeManager = new ContentStoreManagerImpl(host, PORT, CONTEXT); Credential credential...
java
private ContentStoreManager getStoreManager(String host) throws DBNotFoundException { ContentStoreManager storeManager = new ContentStoreManagerImpl(host, PORT, CONTEXT); Credential credential = getRootCredential(); storeManager.login(credential); return storeManager;...
[ "private", "ContentStoreManager", "getStoreManager", "(", "String", "host", ")", "throws", "DBNotFoundException", "{", "ContentStoreManager", "storeManager", "=", "new", "ContentStoreManagerImpl", "(", "host", ",", "PORT", ",", "CONTEXT", ")", ";", "Credential", "cred...
/* Create the store manager to connect to this DuraCloud account instance
[ "/", "*", "Create", "the", "store", "manager", "to", "connect", "to", "this", "DuraCloud", "account", "instance" ]
train
https://github.com/duracloud/management-console/blob/7331015c01f9ac5cc5c0aa8ae9a2a1a77e9f4ac6/account-management-monitor/src/main/java/org/duracloud/account/monitor/duplication/DuplicationMonitor.java#L107-L114
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/Hierarchy.java
Hierarchy.resolveMethodCallTargets
public static Set<JavaClassAndMethod> resolveMethodCallTargets(ReferenceType receiverType, InvokeInstruction invokeInstruction, ConstantPoolGen cpg) throws ClassNotFoundException { """ Resolve possible instance method call targets. Assumes that invokevirtual and invokeinterface methods may call any su...
java
public static Set<JavaClassAndMethod> resolveMethodCallTargets(ReferenceType receiverType, InvokeInstruction invokeInstruction, ConstantPoolGen cpg) throws ClassNotFoundException { return resolveMethodCallTargets(receiverType, invokeInstruction, cpg, false); }
[ "public", "static", "Set", "<", "JavaClassAndMethod", ">", "resolveMethodCallTargets", "(", "ReferenceType", "receiverType", ",", "InvokeInstruction", "invokeInstruction", ",", "ConstantPoolGen", "cpg", ")", "throws", "ClassNotFoundException", "{", "return", "resolveMethodC...
Resolve possible instance method call targets. Assumes that invokevirtual and invokeinterface methods may call any subtype of the receiver class. @param receiverType type of the receiver object @param invokeInstruction the InvokeInstruction @param cpg the ConstantPoolGen @return Set of methods which might be called @t...
[ "Resolve", "possible", "instance", "method", "call", "targets", ".", "Assumes", "that", "invokevirtual", "and", "invokeinterface", "methods", "may", "call", "any", "subtype", "of", "the", "receiver", "class", "." ]
train
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/Hierarchy.java#L774-L777
wuman/JReadability
src/main/java/com/wuman/jreadability/Readability.java
Readability.getElementsByTag
private static Elements getElementsByTag(Element e, String tag) { """ Jsoup's Element.getElementsByTag(Element e) includes e itself, which is different from W3C standards. This utility function is exclusive of the Element e. @param e @param tag @return """ Elements es = e.getElementsByTag(tag); ...
java
private static Elements getElementsByTag(Element e, String tag) { Elements es = e.getElementsByTag(tag); es.remove(e); return es; }
[ "private", "static", "Elements", "getElementsByTag", "(", "Element", "e", ",", "String", "tag", ")", "{", "Elements", "es", "=", "e", ".", "getElementsByTag", "(", "tag", ")", ";", "es", ".", "remove", "(", "e", ")", ";", "return", "es", ";", "}" ]
Jsoup's Element.getElementsByTag(Element e) includes e itself, which is different from W3C standards. This utility function is exclusive of the Element e. @param e @param tag @return
[ "Jsoup", "s", "Element", ".", "getElementsByTag", "(", "Element", "e", ")", "includes", "e", "itself", "which", "is", "different", "from", "W3C", "standards", ".", "This", "utility", "function", "is", "exclusive", "of", "the", "Element", "e", "." ]
train
https://github.com/wuman/JReadability/blob/16c18c42402bd13c6e024c2fd3a86dd28ba53e74/src/main/java/com/wuman/jreadability/Readability.java#L880-L884
apereo/cas
support/cas-server-support-saml-idp-web/src/main/java/org/apereo/cas/support/saml/web/idp/profile/artifact/Saml1ArtifactResolutionProfileHandlerController.java
Saml1ArtifactResolutionProfileHandlerController.handlePostRequest
@PostMapping(path = SamlIdPConstants.ENDPOINT_SAML1_SOAP_ARTIFACT_RESOLUTION) protected void handlePostRequest(final HttpServletResponse response, final HttpServletRequest request) { """ Handle post request. @param response the response @param request the request "...
java
@PostMapping(path = SamlIdPConstants.ENDPOINT_SAML1_SOAP_ARTIFACT_RESOLUTION) protected void handlePostRequest(final HttpServletResponse response, final HttpServletRequest request) { val ctx = decodeSoapRequest(request); val artifactMsg = (ArtifactResolve) ctx.ge...
[ "@", "PostMapping", "(", "path", "=", "SamlIdPConstants", ".", "ENDPOINT_SAML1_SOAP_ARTIFACT_RESOLUTION", ")", "protected", "void", "handlePostRequest", "(", "final", "HttpServletResponse", "response", ",", "final", "HttpServletRequest", "request", ")", "{", "val", "ctx...
Handle post request. @param response the response @param request the request
[ "Handle", "post", "request", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-saml-idp-web/src/main/java/org/apereo/cas/support/saml/web/idp/profile/artifact/Saml1ArtifactResolutionProfileHandlerController.java#L37-L67
btrplace/scheduler
btrpsl/src/main/java/org/btrplace/btrpsl/tree/BtrPlaceTree.java
BtrPlaceTree.ignoreError
public IgnorableOperand ignoreError(Token t, String msg) { """ Add an error message to a given error @param t the token that points to the error @param msg the error message @return {@link IgnorableOperand} to indicate to skip the operand """ append(t, msg); return IgnorableOperand.getIn...
java
public IgnorableOperand ignoreError(Token t, String msg) { append(t, msg); return IgnorableOperand.getInstance(); }
[ "public", "IgnorableOperand", "ignoreError", "(", "Token", "t", ",", "String", "msg", ")", "{", "append", "(", "t", ",", "msg", ")", ";", "return", "IgnorableOperand", ".", "getInstance", "(", ")", ";", "}" ]
Add an error message to a given error @param t the token that points to the error @param msg the error message @return {@link IgnorableOperand} to indicate to skip the operand
[ "Add", "an", "error", "message", "to", "a", "given", "error" ]
train
https://github.com/btrplace/scheduler/blob/611063aad0b47a016e57ebf36fa4dfdf24de09e8/btrpsl/src/main/java/org/btrplace/btrpsl/tree/BtrPlaceTree.java#L102-L105
kite-sdk/kite
kite-morphlines/kite-morphlines-core/src/main/java/org/kitesdk/morphline/base/Validator.java
Validator.validateEnum
public <T extends Enum<T>> T validateEnum(Config config, String value, Class<T> type, T... choices) { """ Validates that an enum of the given type with the given value exists, and that this enum is contained in the given list of permitted choices; finally returns that enum object. """ if (choices.length ...
java
public <T extends Enum<T>> T validateEnum(Config config, String value, Class<T> type, T... choices) { if (choices.length == 0) { choices = type.getEnumConstants(); } Preconditions.checkArgument(choices.length > 0); try { T result = Enum.valueOf(type, value); if (!Arrays.asList(choices...
[ "public", "<", "T", "extends", "Enum", "<", "T", ">", ">", "T", "validateEnum", "(", "Config", "config", ",", "String", "value", ",", "Class", "<", "T", ">", "type", ",", "T", "...", "choices", ")", "{", "if", "(", "choices", ".", "length", "==", ...
Validates that an enum of the given type with the given value exists, and that this enum is contained in the given list of permitted choices; finally returns that enum object.
[ "Validates", "that", "an", "enum", "of", "the", "given", "type", "with", "the", "given", "value", "exists", "and", "that", "this", "enum", "is", "contained", "in", "the", "given", "list", "of", "permitted", "choices", ";", "finally", "returns", "that", "en...
train
https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-morphlines/kite-morphlines-core/src/main/java/org/kitesdk/morphline/base/Validator.java#L50-L68
jferard/fastods
fastods/src/main/java/com/github/jferard/fastods/TextBuilder.java
TextBuilder.styledLink
public TextBuilder styledLink(final String text, final TextStyle ts, final URL url) { """ Create a styled link in the current paragraph. @param text the text @param ts the style @param url the destination @return this for fluent style """ this.curParagraphBuilder.styledLink(text, ts, url); ...
java
public TextBuilder styledLink(final String text, final TextStyle ts, final URL url) { this.curParagraphBuilder.styledLink(text, ts, url); return this; }
[ "public", "TextBuilder", "styledLink", "(", "final", "String", "text", ",", "final", "TextStyle", "ts", ",", "final", "URL", "url", ")", "{", "this", ".", "curParagraphBuilder", ".", "styledLink", "(", "text", ",", "ts", ",", "url", ")", ";", "return", "...
Create a styled link in the current paragraph. @param text the text @param ts the style @param url the destination @return this for fluent style
[ "Create", "a", "styled", "link", "in", "the", "current", "paragraph", "." ]
train
https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/TextBuilder.java#L176-L179
cdk/cdk
tool/sdg/src/main/java/org/openscience/cdk/layout/OverlapResolver.java
OverlapResolver.getBondOverlapScore
public double getBondOverlapScore(IAtomContainer ac, Vector overlappingBonds) { """ Calculates a score based on the intersection of bonds. @param ac The Atomcontainer to work on @param overlappingBonds Description of the Parameter @return The overlapScore value """ ...
java
public double getBondOverlapScore(IAtomContainer ac, Vector overlappingBonds) { overlappingBonds.removeAllElements(); double overlapScore = 0; IBond bond1 = null; IBond bond2 = null; double bondLength = GeometryUtil.getBondLengthAverage(ac);; double overlapCutoff = bondLe...
[ "public", "double", "getBondOverlapScore", "(", "IAtomContainer", "ac", ",", "Vector", "overlappingBonds", ")", "{", "overlappingBonds", ".", "removeAllElements", "(", ")", ";", "double", "overlapScore", "=", "0", ";", "IBond", "bond1", "=", "null", ";", "IBond"...
Calculates a score based on the intersection of bonds. @param ac The Atomcontainer to work on @param overlappingBonds Description of the Parameter @return The overlapScore value
[ "Calculates", "a", "score", "based", "on", "the", "intersection", "of", "bonds", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/sdg/src/main/java/org/openscience/cdk/layout/OverlapResolver.java#L215-L236
mikepenz/FastAdapter
library-core/src/main/java/com/mikepenz/fastadapter/items/AbstractItem.java
AbstractItem.generateView
@Override public View generateView(Context ctx) { """ generates a view by the defined LayoutRes @param ctx @return """ VH viewHolder = getViewHolder(createView(ctx, null)); //as we already know the type of our ViewHolder cast it to our type bindView(viewHolder, Collections.EMPT...
java
@Override public View generateView(Context ctx) { VH viewHolder = getViewHolder(createView(ctx, null)); //as we already know the type of our ViewHolder cast it to our type bindView(viewHolder, Collections.EMPTY_LIST); //return the bound view return viewHolder.itemView; ...
[ "@", "Override", "public", "View", "generateView", "(", "Context", "ctx", ")", "{", "VH", "viewHolder", "=", "getViewHolder", "(", "createView", "(", "ctx", ",", "null", ")", ")", ";", "//as we already know the type of our ViewHolder cast it to our type", "bindView", ...
generates a view by the defined LayoutRes @param ctx @return
[ "generates", "a", "view", "by", "the", "defined", "LayoutRes" ]
train
https://github.com/mikepenz/FastAdapter/blob/3b2412abe001ba58422e0125846b704d4dba4ae9/library-core/src/main/java/com/mikepenz/fastadapter/items/AbstractItem.java#L256-L265
Impetus/Kundera
src/jpa-engine/core/src/main/java/com/impetus/kundera/query/QueryImpl.java
QueryImpl.setHint
@Override public Query setHint(String hintName, Object value) { """ Sets hint name and value into hints map and returns instance of {@link Query}. @param hintName the hint name @param value the value @return the query """ hints.put(hintName, value); return this; }
java
@Override public Query setHint(String hintName, Object value) { hints.put(hintName, value); return this; }
[ "@", "Override", "public", "Query", "setHint", "(", "String", "hintName", ",", "Object", "value", ")", "{", "hints", ".", "put", "(", "hintName", ",", "value", ")", ";", "return", "this", ";", "}" ]
Sets hint name and value into hints map and returns instance of {@link Query}. @param hintName the hint name @param value the value @return the query
[ "Sets", "hint", "name", "and", "value", "into", "hints", "map", "and", "returns", "instance", "of", "{", "@link", "Query", "}", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/jpa-engine/core/src/main/java/com/impetus/kundera/query/QueryImpl.java#L805-L810
DiUS/pact-jvm
pact-jvm-consumer/src/main/java/au/com/dius/pact/consumer/dsl/PactDslJsonArray.java
PactDslJsonArray.arrayMinLike
public static PactDslJsonBody arrayMinLike(int minSize, int numberExamples) { """ Array with a minimum size where each item must match the following example @param minSize minimum size @param numberExamples Number of examples to generate """ if (numberExamples < minSize) { throw new IllegalArgument...
java
public static PactDslJsonBody arrayMinLike(int minSize, int numberExamples) { if (numberExamples < minSize) { throw new IllegalArgumentException(String.format("Number of example %d is less than the minimum size of %d", numberExamples, minSize)); } PactDslJsonArray parent = new PactDslJsonArray...
[ "public", "static", "PactDslJsonBody", "arrayMinLike", "(", "int", "minSize", ",", "int", "numberExamples", ")", "{", "if", "(", "numberExamples", "<", "minSize", ")", "{", "throw", "new", "IllegalArgumentException", "(", "String", ".", "format", "(", "\"Number ...
Array with a minimum size where each item must match the following example @param minSize minimum size @param numberExamples Number of examples to generate
[ "Array", "with", "a", "minimum", "size", "where", "each", "item", "must", "match", "the", "following", "example" ]
train
https://github.com/DiUS/pact-jvm/blob/2f447e9dd4ac152a6a36b7fcf8962d07de9ef3ef/pact-jvm-consumer/src/main/java/au/com/dius/pact/consumer/dsl/PactDslJsonArray.java#L778-L787
landawn/AbacusUtil
src/com/landawn/abacus/util/N.java
N.checkArgument
public static void checkArgument(boolean b, String errorMessageTemplate, double p) { """ Ensures the truth of an expression involving one or more parameters to the calling method. <p>See {@link #checkArgument(boolean, String, Object...)} for details. """ if (!b) { throw new IllegalArgu...
java
public static void checkArgument(boolean b, String errorMessageTemplate, double p) { if (!b) { throw new IllegalArgumentException(format(errorMessageTemplate, p)); } }
[ "public", "static", "void", "checkArgument", "(", "boolean", "b", ",", "String", "errorMessageTemplate", ",", "double", "p", ")", "{", "if", "(", "!", "b", ")", "{", "throw", "new", "IllegalArgumentException", "(", "format", "(", "errorMessageTemplate", ",", ...
Ensures the truth of an expression involving one or more parameters to the calling method. <p>See {@link #checkArgument(boolean, String, Object...)} for details.
[ "Ensures", "the", "truth", "of", "an", "expression", "involving", "one", "or", "more", "parameters", "to", "the", "calling", "method", "." ]
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/N.java#L5471-L5475
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/vpn/vpnsessionpolicy.java
vpnsessionpolicy.get
public static vpnsessionpolicy get(nitro_service service, String name) throws Exception { """ Use this API to fetch vpnsessionpolicy resource of given name . """ vpnsessionpolicy obj = new vpnsessionpolicy(); obj.set_name(name); vpnsessionpolicy response = (vpnsessionpolicy) obj.get_resource(service); ...
java
public static vpnsessionpolicy get(nitro_service service, String name) throws Exception{ vpnsessionpolicy obj = new vpnsessionpolicy(); obj.set_name(name); vpnsessionpolicy response = (vpnsessionpolicy) obj.get_resource(service); return response; }
[ "public", "static", "vpnsessionpolicy", "get", "(", "nitro_service", "service", ",", "String", "name", ")", "throws", "Exception", "{", "vpnsessionpolicy", "obj", "=", "new", "vpnsessionpolicy", "(", ")", ";", "obj", ".", "set_name", "(", "name", ")", ";", "...
Use this API to fetch vpnsessionpolicy resource of given name .
[ "Use", "this", "API", "to", "fetch", "vpnsessionpolicy", "resource", "of", "given", "name", "." ]
train
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/vpn/vpnsessionpolicy.java#L324-L329
OpenLiberty/open-liberty
dev/com.ibm.ws.jsf.2.2/src/org/apache/myfaces/shared/renderkit/html/HtmlLinkRendererBase.java
HtmlLinkRendererBase.getStyle
protected String getStyle(FacesContext facesContext, UIComponent link) { """ Can be overwritten by derived classes to overrule the style to be used. """ if (link instanceof HtmlCommandLink) { return ((HtmlCommandLink)link).getStyle(); } return (String)link.getAttrib...
java
protected String getStyle(FacesContext facesContext, UIComponent link) { if (link instanceof HtmlCommandLink) { return ((HtmlCommandLink)link).getStyle(); } return (String)link.getAttributes().get(HTML.STYLE_ATTR); }
[ "protected", "String", "getStyle", "(", "FacesContext", "facesContext", ",", "UIComponent", "link", ")", "{", "if", "(", "link", "instanceof", "HtmlCommandLink", ")", "{", "return", "(", "(", "HtmlCommandLink", ")", "link", ")", ".", "getStyle", "(", ")", ";...
Can be overwritten by derived classes to overrule the style to be used.
[ "Can", "be", "overwritten", "by", "derived", "classes", "to", "overrule", "the", "style", "to", "be", "used", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jsf.2.2/src/org/apache/myfaces/shared/renderkit/html/HtmlLinkRendererBase.java#L161-L170
pryzach/midao
midao-jdbc-core/src/main/java/org/midao/jdbc/core/handlers/type/TypeHandlerUtils.java
TypeHandlerUtils.convertClob
public static Object convertClob(Connection conn, InputStream input) throws SQLException { """ Transfers data from InputStream into sql.Clob <p/> Using default locale. If different locale is required see {@link #convertClob(java.sql.Connection, String)} @param conn connection for which sql.Clob object would...
java
public static Object convertClob(Connection conn, InputStream input) throws SQLException { return convertClob(conn, toByteArray(input)); }
[ "public", "static", "Object", "convertClob", "(", "Connection", "conn", ",", "InputStream", "input", ")", "throws", "SQLException", "{", "return", "convertClob", "(", "conn", ",", "toByteArray", "(", "input", ")", ")", ";", "}" ]
Transfers data from InputStream into sql.Clob <p/> Using default locale. If different locale is required see {@link #convertClob(java.sql.Connection, String)} @param conn connection for which sql.Clob object would be created @param input InputStream @return sql.Clob from InputStream @throws SQLException
[ "Transfers", "data", "from", "InputStream", "into", "sql", ".", "Clob", "<p", "/", ">", "Using", "default", "locale", ".", "If", "different", "locale", "is", "required", "see", "{", "@link", "#convertClob", "(", "java", ".", "sql", ".", "Connection", "Stri...
train
https://github.com/pryzach/midao/blob/ed9048ed2c792a4794a2116a25779dfb84cd9447/midao-jdbc-core/src/main/java/org/midao/jdbc/core/handlers/type/TypeHandlerUtils.java#L204-L206
fcrepo3/fcrepo
fcrepo-server/src/main/java/org/fcrepo/server/journal/readerwriter/multifile/JournalOutputFile.java
JournalOutputFile.createTempFilename
private File createTempFilename(File permanentFile, File journalDirectory) { """ The "temporary" filename is the permanent name preceded by an underscore. """ String tempFilename = "_" + permanentFile.getName(); File file2 = new File(journalDirectory, tempFilename); return file2; }
java
private File createTempFilename(File permanentFile, File journalDirectory) { String tempFilename = "_" + permanentFile.getName(); File file2 = new File(journalDirectory, tempFilename); return file2; }
[ "private", "File", "createTempFilename", "(", "File", "permanentFile", ",", "File", "journalDirectory", ")", "{", "String", "tempFilename", "=", "\"_\"", "+", "permanentFile", ".", "getName", "(", ")", ";", "File", "file2", "=", "new", "File", "(", "journalDir...
The "temporary" filename is the permanent name preceded by an underscore.
[ "The", "temporary", "filename", "is", "the", "permanent", "name", "preceded", "by", "an", "underscore", "." ]
train
https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/journal/readerwriter/multifile/JournalOutputFile.java#L131-L135
grpc/grpc-java
core/src/main/java/io/grpc/internal/Rescheduler.java
Rescheduler.reschedule
void reschedule(long delay, TimeUnit timeUnit) { """ /* must be called from the {@link #serializingExecutor} originally passed in. """ long delayNanos = timeUnit.toNanos(delay); long newRunAtNanos = nanoTime() + delayNanos; enabled = true; if (newRunAtNanos - runAtNanos < 0 || wakeUp == null) {...
java
void reschedule(long delay, TimeUnit timeUnit) { long delayNanos = timeUnit.toNanos(delay); long newRunAtNanos = nanoTime() + delayNanos; enabled = true; if (newRunAtNanos - runAtNanos < 0 || wakeUp == null) { if (wakeUp != null) { wakeUp.cancel(false); } wakeUp = scheduler.sch...
[ "void", "reschedule", "(", "long", "delay", ",", "TimeUnit", "timeUnit", ")", "{", "long", "delayNanos", "=", "timeUnit", ".", "toNanos", "(", "delay", ")", ";", "long", "newRunAtNanos", "=", "nanoTime", "(", ")", "+", "delayNanos", ";", "enabled", "=", ...
/* must be called from the {@link #serializingExecutor} originally passed in.
[ "/", "*", "must", "be", "called", "from", "the", "{" ]
train
https://github.com/grpc/grpc-java/blob/973885457f9609de232d2553b82c67f6c3ff57bf/core/src/main/java/io/grpc/internal/Rescheduler.java#L55-L66