repository_name
stringlengths
7
54
func_path_in_repository
stringlengths
18
218
func_name
stringlengths
5
140
whole_func_string
stringlengths
79
3.99k
language
stringclasses
1 value
func_code_string
stringlengths
79
3.99k
func_code_tokens
listlengths
20
624
func_documentation_string
stringlengths
61
1.96k
func_documentation_tokens
listlengths
1
478
split_name
stringclasses
1 value
func_code_url
stringlengths
107
339
cdk/cdk
base/standard/src/main/java/org/openscience/cdk/stereo/StereoTool.java
StereoTool.isColinear
public static boolean isColinear(Point3d ptA, Point3d ptB, Point3d ptC) { Vector3d vectorAB = new Vector3d(); Vector3d vectorAC = new Vector3d(); Vector3d normal = new Vector3d(); StereoTool.getRawNormal(ptA, ptB, ptC, normal, vectorAB, vectorAC); return isColinear(normal); ...
java
public static boolean isColinear(Point3d ptA, Point3d ptB, Point3d ptC) { Vector3d vectorAB = new Vector3d(); Vector3d vectorAC = new Vector3d(); Vector3d normal = new Vector3d(); StereoTool.getRawNormal(ptA, ptB, ptC, normal, vectorAB, vectorAC); return isColinear(normal); ...
[ "public", "static", "boolean", "isColinear", "(", "Point3d", "ptA", ",", "Point3d", "ptB", ",", "Point3d", "ptC", ")", "{", "Vector3d", "vectorAB", "=", "new", "Vector3d", "(", ")", ";", "Vector3d", "vectorAC", "=", "new", "Vector3d", "(", ")", ";", "Vec...
Checks the three supplied points to see if they fall on the same line. It does this by finding the normal to an arbitrary pair of lines between the points (in fact, A-B and A-C) and checking that its length is 0. @param ptA @param ptB @param ptC @return true if the tree points are on a straight line
[ "Checks", "the", "three", "supplied", "points", "to", "see", "if", "they", "fall", "on", "the", "same", "line", ".", "It", "does", "this", "by", "finding", "the", "normal", "to", "an", "arbitrary", "pair", "of", "lines", "between", "the", "points", "(", ...
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/standard/src/main/java/org/openscience/cdk/stereo/StereoTool.java#L344-L351
Cleveroad/BubbleAnimationLayout
library/src/main/java/com/cleveroad/bubbleanimation/DrawableUtils.java
DrawableUtils.between
public static boolean between(float value, float start, float end) { if (start > end) { float tmp = start; start = end; end = tmp; } return value >= start && value <= end; }
java
public static boolean between(float value, float start, float end) { if (start > end) { float tmp = start; start = end; end = tmp; } return value >= start && value <= end; }
[ "public", "static", "boolean", "between", "(", "float", "value", ",", "float", "start", ",", "float", "end", ")", "{", "if", "(", "start", ">", "end", ")", "{", "float", "tmp", "=", "start", ";", "start", "=", "end", ";", "end", "=", "tmp", ";", ...
Checks if value belongs to range <code>[start, end]</code> @param value value @param start start of range @param end end of range @return true if value belogs to range, false otherwise
[ "Checks", "if", "value", "belongs", "to", "range", "<code", ">", "[", "start", "end", "]", "<", "/", "code", ">" ]
train
https://github.com/Cleveroad/BubbleAnimationLayout/blob/6b2c3668e8c2bf415066474b46df7b87877e494b/library/src/main/java/com/cleveroad/bubbleanimation/DrawableUtils.java#L34-L41
javafxports/javafxmobile-plugin
src/main/java/org/javafxports/jfxmobile/plugin/android/task/ApkBuilder.java
ApkBuilder.sealApk
public void sealApk() throws ApkCreationException, SealedApkException { if (mIsSealed) { throw new SealedApkException("APK is already sealed"); } // close and sign the application package. try { mBuilder.close(); mIsSealed = true; } catch (Exc...
java
public void sealApk() throws ApkCreationException, SealedApkException { if (mIsSealed) { throw new SealedApkException("APK is already sealed"); } // close and sign the application package. try { mBuilder.close(); mIsSealed = true; } catch (Exc...
[ "public", "void", "sealApk", "(", ")", "throws", "ApkCreationException", ",", "SealedApkException", "{", "if", "(", "mIsSealed", ")", "{", "throw", "new", "SealedApkException", "(", "\"APK is already sealed\"", ")", ";", "}", "// close and sign the application package."...
Seals the APK, and signs it if necessary. @throws ApkCreationException @throws ApkCreationException if an error occurred @throws SealedApkException if the APK is already sealed.
[ "Seals", "the", "APK", "and", "signs", "it", "if", "necessary", "." ]
train
https://github.com/javafxports/javafxmobile-plugin/blob/a9bef513b7e1bfa85f9a668226e6943c6d9f847f/src/main/java/org/javafxports/jfxmobile/plugin/android/task/ApkBuilder.java#L841-L855
jenkinsci/ssh-slaves-plugin
src/main/java/hudson/plugins/sshslaves/SSHLauncher.java
SSHLauncher.reportTransportLoss
private boolean reportTransportLoss(Connection c, TaskListener listener) { Throwable cause = c.getReasonClosedCause(); if (cause != null) { cause.printStackTrace(listener.error("Socket connection to SSH server was lost")); } return cause != null; }
java
private boolean reportTransportLoss(Connection c, TaskListener listener) { Throwable cause = c.getReasonClosedCause(); if (cause != null) { cause.printStackTrace(listener.error("Socket connection to SSH server was lost")); } return cause != null; }
[ "private", "boolean", "reportTransportLoss", "(", "Connection", "c", ",", "TaskListener", "listener", ")", "{", "Throwable", "cause", "=", "c", ".", "getReasonClosedCause", "(", ")", ";", "if", "(", "cause", "!=", "null", ")", "{", "cause", ".", "printStackT...
If the SSH connection as a whole is lost, report that information.
[ "If", "the", "SSH", "connection", "as", "a", "whole", "is", "lost", "report", "that", "information", "." ]
train
https://github.com/jenkinsci/ssh-slaves-plugin/blob/95f528730fc1e01b25983459927b7516ead3ee00/src/main/java/hudson/plugins/sshslaves/SSHLauncher.java#L1014-L1021
Alluxio/alluxio
core/server/master/src/main/java/alluxio/master/file/meta/InodeLockManager.java
InodeLockManager.lockInode
public LockResource lockInode(InodeView inode, LockMode mode) { return mInodeLocks.get(inode.getId(), mode); }
java
public LockResource lockInode(InodeView inode, LockMode mode) { return mInodeLocks.get(inode.getId(), mode); }
[ "public", "LockResource", "lockInode", "(", "InodeView", "inode", ",", "LockMode", "mode", ")", "{", "return", "mInodeLocks", ".", "get", "(", "inode", ".", "getId", "(", ")", ",", "mode", ")", ";", "}" ]
Acquires an inode lock. @param inode the inode to lock @param mode the mode to lock in @return a lock resource which must be closed to release the lock
[ "Acquires", "an", "inode", "lock", "." ]
train
https://github.com/Alluxio/alluxio/blob/af38cf3ab44613355b18217a3a4d961f8fec3a10/core/server/master/src/main/java/alluxio/master/file/meta/InodeLockManager.java#L121-L123
igniterealtime/Smack
smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/Node.java
Node.getSubscriptionsAsOwner
public List<Subscription> getSubscriptionsAsOwner() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { return getSubscriptionsAsOwner(null, null); }
java
public List<Subscription> getSubscriptionsAsOwner() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { return getSubscriptionsAsOwner(null, null); }
[ "public", "List", "<", "Subscription", ">", "getSubscriptionsAsOwner", "(", ")", "throws", "NoResponseException", ",", "XMPPErrorException", ",", "NotConnectedException", ",", "InterruptedException", "{", "return", "getSubscriptionsAsOwner", "(", "null", ",", "null", ")...
Get the subscriptions currently associated with this node as owner. @return List of {@link Subscription} @throws XMPPErrorException @throws NoResponseException @throws NotConnectedException @throws InterruptedException @see #getSubscriptionsAsOwner(List, Collection) @since 4.1
[ "Get", "the", "subscriptions", "currently", "associated", "with", "this", "node", "as", "owner", "." ]
train
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/Node.java#L171-L174
lessthanoptimal/BoofCV
main/boofcv-geo/src/main/java/boofcv/factory/geo/FactoryMultiView.java
FactoryMultiView.pnp_N
public static EstimateNofPnP pnp_N(EnumPNP which , int numIterations ) { MotionTransformPoint<Se3_F64, Point3D_F64> motionFit = FitSpecialEuclideanOps_F64.fitPoints3D(); switch( which ) { case P3P_GRUNERT: P3PGrunert grunert = new P3PGrunert(PolynomialOps.createRootFinder(5, RootFinderType.STURM)); ret...
java
public static EstimateNofPnP pnp_N(EnumPNP which , int numIterations ) { MotionTransformPoint<Se3_F64, Point3D_F64> motionFit = FitSpecialEuclideanOps_F64.fitPoints3D(); switch( which ) { case P3P_GRUNERT: P3PGrunert grunert = new P3PGrunert(PolynomialOps.createRootFinder(5, RootFinderType.STURM)); ret...
[ "public", "static", "EstimateNofPnP", "pnp_N", "(", "EnumPNP", "which", ",", "int", "numIterations", ")", "{", "MotionTransformPoint", "<", "Se3_F64", ",", "Point3D_F64", ">", "motionFit", "=", "FitSpecialEuclideanOps_F64", ".", "fitPoints3D", "(", ")", ";", "swit...
Creates an estimator for the PnP problem that uses only three observations, which is the minimal case and known as P3P. <p>NOTE: Observations are in normalized image coordinates NOT pixels.</p> @param which The algorithm which is to be returned. @param numIterations Number of iterations. Only used by some algorithms ...
[ "Creates", "an", "estimator", "for", "the", "PnP", "problem", "that", "uses", "only", "three", "observations", "which", "is", "the", "minimal", "case", "and", "known", "as", "P3P", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/factory/geo/FactoryMultiView.java#L440-L463
OpenLiberty/open-liberty
dev/com.ibm.ws.security.wim.adapter.ldap/src/com/ibm/ws/security/wim/adapter/ldap/LdapConnection.java
LdapConnection.getAncestorDNs
public List<String> getAncestorDNs(String DN, int level) throws WIMException { if (DN == null || DN.trim().length() == 0) { return null; } try { NameParser nameParser = getNameParser(); Name name = nameParser.parse(DN); int size = name.size(); ...
java
public List<String> getAncestorDNs(String DN, int level) throws WIMException { if (DN == null || DN.trim().length() == 0) { return null; } try { NameParser nameParser = getNameParser(); Name name = nameParser.parse(DN); int size = name.size(); ...
[ "public", "List", "<", "String", ">", "getAncestorDNs", "(", "String", "DN", ",", "int", "level", ")", "throws", "WIMException", "{", "if", "(", "DN", "==", "null", "||", "DN", ".", "trim", "(", ")", ".", "length", "(", ")", "==", "0", ")", "{", ...
Get a list of all ancestor distinguished names for the input distinguished name. For example; if the input distinguished name was "uid=user,o=ibm,c=us" the results would be ["o=ibm,c=us", "c=us"]. @param DN The distinguished name to get the ancestor distinguished names for. @param level the number of levels to return....
[ "Get", "a", "list", "of", "all", "ancestor", "distinguished", "names", "for", "the", "input", "distinguished", "name", ".", "For", "example", ";", "if", "the", "input", "distinguished", "name", "was", "uid", "=", "user", "o", "=", "ibm", "c", "=", "us", ...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.wim.adapter.ldap/src/com/ibm/ws/security/wim/adapter/ldap/LdapConnection.java#L1932-L1955
code4everything/util
src/main/java/com/zhazhapan/util/FileExecutor.java
FileExecutor.renameFiles
public static void renameFiles(File[] filePath, String prefix, String suffix, int start) { String[] fileNames = new String[filePath.length]; for (int i = 0; i < fileNames.length; i++) { fileNames[i] = prefix + (start++) + suffix; } renameFiles(filePath, fileNames); }
java
public static void renameFiles(File[] filePath, String prefix, String suffix, int start) { String[] fileNames = new String[filePath.length]; for (int i = 0; i < fileNames.length; i++) { fileNames[i] = prefix + (start++) + suffix; } renameFiles(filePath, fileNames); }
[ "public", "static", "void", "renameFiles", "(", "File", "[", "]", "filePath", ",", "String", "prefix", ",", "String", "suffix", ",", "int", "start", ")", "{", "String", "[", "]", "fileNames", "=", "new", "String", "[", "filePath", ".", "length", "]", "...
批量重命名文件 @param filePath 文件数组 @param prefix 文件前缀 @param suffix 文件后缀 @param start 开始位置
[ "批量重命名文件" ]
train
https://github.com/code4everything/util/blob/1fc9f0ead1108f4d7208ba7c000df4244f708418/src/main/java/com/zhazhapan/util/FileExecutor.java#L619-L625
apache/flink
flink-container/src/main/java/org/apache/flink/container/entrypoint/JarManifestParser.java
JarManifestParser.findOnlyEntryClass
static JarFileWithEntryClass findOnlyEntryClass(Iterable<File> jarFiles) throws IOException { List<JarFileWithEntryClass> jarsWithEntryClasses = new ArrayList<>(); for (File jarFile : jarFiles) { findEntryClass(jarFile) .ifPresent(entryClass -> jarsWithEntryClasses.add(new JarFileWithEntryClass(jarFile, entr...
java
static JarFileWithEntryClass findOnlyEntryClass(Iterable<File> jarFiles) throws IOException { List<JarFileWithEntryClass> jarsWithEntryClasses = new ArrayList<>(); for (File jarFile : jarFiles) { findEntryClass(jarFile) .ifPresent(entryClass -> jarsWithEntryClasses.add(new JarFileWithEntryClass(jarFile, entr...
[ "static", "JarFileWithEntryClass", "findOnlyEntryClass", "(", "Iterable", "<", "File", ">", "jarFiles", ")", "throws", "IOException", "{", "List", "<", "JarFileWithEntryClass", ">", "jarsWithEntryClasses", "=", "new", "ArrayList", "<>", "(", ")", ";", "for", "(", ...
Returns a JAR file with its entry class as specified in the manifest. @param jarFiles JAR files to parse @throws NoSuchElementException if no JAR file contains an entry class attribute @throws IllegalArgumentException if multiple JAR files contain an entry class manifest attribute
[ "Returns", "a", "JAR", "file", "with", "its", "entry", "class", "as", "specified", "in", "the", "manifest", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-container/src/main/java/org/apache/flink/container/entrypoint/JarManifestParser.java#L72-L88
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/extension/coverage/CoverageDataCore.java
CoverageDataCore.pixelValueToValue
private Double pixelValueToValue(GriddedTile griddedTile, Double pixelValue) { Double value = pixelValue; if (griddedCoverage != null && griddedCoverage.getDataType() == GriddedCoverageDataType.INTEGER) { if (griddedTile != null) { value *= griddedTile.getScale(); value += griddedTile.getOffset();...
java
private Double pixelValueToValue(GriddedTile griddedTile, Double pixelValue) { Double value = pixelValue; if (griddedCoverage != null && griddedCoverage.getDataType() == GriddedCoverageDataType.INTEGER) { if (griddedTile != null) { value *= griddedTile.getScale(); value += griddedTile.getOffset();...
[ "private", "Double", "pixelValueToValue", "(", "GriddedTile", "griddedTile", ",", "Double", "pixelValue", ")", "{", "Double", "value", "=", "pixelValue", ";", "if", "(", "griddedCoverage", "!=", "null", "&&", "griddedCoverage", ".", "getDataType", "(", ")", "=="...
Convert integer coverage typed pixel value to a coverage data value through scales and offsets @param griddedTile gridded tile @param pixelValue pixel value @return coverage data value
[ "Convert", "integer", "coverage", "typed", "pixel", "value", "to", "a", "coverage", "data", "value", "through", "scales", "and", "offsets" ]
train
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/coverage/CoverageDataCore.java#L1453-L1470
uber/AutoDispose
autodispose/src/main/java/com/uber/autodispose/AutoDisposeEndConsumerHelper.java
AutoDisposeEndConsumerHelper.setOnce
public static boolean setOnce(AtomicReference<Subscription> upstream, Subscription next, Class<?> subscriber) { AutoDisposeUtil.checkNotNull(next, "next is null"); if (!upstream.compareAndSet(null, next)) { next.cancel(); if (upstream.get() != AutoSubscriptionHelper.CANCELLED) { reportDouble...
java
public static boolean setOnce(AtomicReference<Subscription> upstream, Subscription next, Class<?> subscriber) { AutoDisposeUtil.checkNotNull(next, "next is null"); if (!upstream.compareAndSet(null, next)) { next.cancel(); if (upstream.get() != AutoSubscriptionHelper.CANCELLED) { reportDouble...
[ "public", "static", "boolean", "setOnce", "(", "AtomicReference", "<", "Subscription", ">", "upstream", ",", "Subscription", "next", ",", "Class", "<", "?", ">", "subscriber", ")", "{", "AutoDisposeUtil", ".", "checkNotNull", "(", "next", ",", "\"next is null\""...
Atomically updates the target upstream AtomicReference from null to the non-null next Subscription, otherwise cancels next and reports a ProtocolViolationException if the AtomicReference doesn't contain the shared cancelled indicator. @param upstream the target AtomicReference to update @param next the Subscription to...
[ "Atomically", "updates", "the", "target", "upstream", "AtomicReference", "from", "null", "to", "the", "non", "-", "null", "next", "Subscription", "otherwise", "cancels", "next", "and", "reports", "a", "ProtocolViolationException", "if", "the", "AtomicReference", "do...
train
https://github.com/uber/AutoDispose/blob/1115b0274f7960354289bb3ae7ba75b0c5a47457/autodispose/src/main/java/com/uber/autodispose/AutoDisposeEndConsumerHelper.java#L73-L83
googleapis/google-api-java-client
google-api-client/src/main/java/com/google/api/client/googleapis/services/AbstractGoogleClientRequest.java
AbstractGoogleClientRequest.checkRequiredParameter
protected final void checkRequiredParameter(Object value, String name) { Preconditions.checkArgument( abstractGoogleClient.getSuppressRequiredParameterChecks() || value != null, "Required parameter %s must be specified", name); }
java
protected final void checkRequiredParameter(Object value, String name) { Preconditions.checkArgument( abstractGoogleClient.getSuppressRequiredParameterChecks() || value != null, "Required parameter %s must be specified", name); }
[ "protected", "final", "void", "checkRequiredParameter", "(", "Object", "value", ",", "String", "name", ")", "{", "Preconditions", ".", "checkArgument", "(", "abstractGoogleClient", ".", "getSuppressRequiredParameterChecks", "(", ")", "||", "value", "!=", "null", ","...
Ensures that the specified required parameter is not null or {@link AbstractGoogleClient#getSuppressRequiredParameterChecks()} is true. @param value the value of the required parameter @param name the name of the required parameter @throws IllegalArgumentException if the specified required parameter is null and {@link...
[ "Ensures", "that", "the", "specified", "required", "parameter", "is", "not", "null", "or", "{", "@link", "AbstractGoogleClient#getSuppressRequiredParameterChecks", "()", "}", "is", "true", "." ]
train
https://github.com/googleapis/google-api-java-client/blob/88decfd14fc40cae6eb6729a45c7d56a1132e450/google-api-client/src/main/java/com/google/api/client/googleapis/services/AbstractGoogleClientRequest.java#L701-L705
jsonld-java/jsonld-java
core/src/main/java/com/github/jsonldjava/utils/JsonUtils.java
JsonUtils.fromURL
public static Object fromURL(java.net.URL url, CloseableHttpClient httpClient) throws JsonParseException, IOException { final String protocol = url.getProtocol(); // We can only use the Apache HTTPClient for HTTP/HTTPS, so use the // native java client for the others Closeabl...
java
public static Object fromURL(java.net.URL url, CloseableHttpClient httpClient) throws JsonParseException, IOException { final String protocol = url.getProtocol(); // We can only use the Apache HTTPClient for HTTP/HTTPS, so use the // native java client for the others Closeabl...
[ "public", "static", "Object", "fromURL", "(", "java", ".", "net", ".", "URL", "url", ",", "CloseableHttpClient", "httpClient", ")", "throws", "JsonParseException", ",", "IOException", "{", "final", "String", "protocol", "=", "url", ".", "getProtocol", "(", ")"...
Parses a JSON-LD document, from the contents of the JSON resource resolved from the JsonLdUrl, to an object that can be used as input for the {@link JsonLdApi} and {@link JsonLdProcessor} methods. @param url The JsonLdUrl to resolve @param httpClient The {@link CloseableHttpClient} to use to resolve the URL. @return A...
[ "Parses", "a", "JSON", "-", "LD", "document", "from", "the", "contents", "of", "the", "JSON", "resource", "resolved", "from", "the", "JsonLdUrl", "to", "an", "object", "that", "can", "be", "used", "as", "input", "for", "the", "{", "@link", "JsonLdApi", "...
train
https://github.com/jsonld-java/jsonld-java/blob/efeef6ee96029a0011649633457035fa6be42da1/core/src/main/java/com/github/jsonldjava/utils/JsonUtils.java#L333-L372
cdk/cdk
tool/formula/src/main/java/org/openscience/cdk/tools/manipulator/MolecularFormulaManipulator.java
MolecularFormulaManipulator.multipleExtractor
private static String multipleExtractor(String formula) { String recentCompoundCount = "0"; String recentCompound = ""; boolean found = false; for (int f = 0; f < formula.length(); f++) { char thisChar = formula.charAt(f); if (thisChar >= '0' && thisChar <= '9') ...
java
private static String multipleExtractor(String formula) { String recentCompoundCount = "0"; String recentCompound = ""; boolean found = false; for (int f = 0; f < formula.length(); f++) { char thisChar = formula.charAt(f); if (thisChar >= '0' && thisChar <= '9') ...
[ "private", "static", "String", "multipleExtractor", "(", "String", "formula", ")", "{", "String", "recentCompoundCount", "=", "\"0\"", ";", "String", "recentCompound", "=", "\"\"", ";", "boolean", "found", "=", "false", ";", "for", "(", "int", "f", "=", "0",...
The starting with numeric value is used to show a quantity by which a formula is multiplied. For example: 2H2O really means that a H4O2 unit. @param formula Formula to correct @return Formula with the correction
[ "The", "starting", "with", "numeric", "value", "is", "used", "to", "show", "a", "quantity", "by", "which", "a", "formula", "is", "multiplied", ".", "For", "example", ":", "2H2O", "really", "means", "that", "a", "H4O2", "unit", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/formula/src/main/java/org/openscience/cdk/tools/manipulator/MolecularFormulaManipulator.java#L1403-L1422
deeplearning4j/deeplearning4j
deeplearning4j/deeplearning4j-nlp-parent/deeplearning4j-nlp/src/main/java/org/deeplearning4j/models/word2vec/wordstore/inmemory/InMemoryLookupCache.java
InMemoryLookupCache.incrementWordCount
@Override public synchronized void incrementWordCount(String word, int increment) { if (word == null || word.isEmpty()) throw new IllegalArgumentException("Word can't be empty or null"); wordFrequencies.incrementCount(word, increment); if (hasToken(word)) { VocabWord...
java
@Override public synchronized void incrementWordCount(String word, int increment) { if (word == null || word.isEmpty()) throw new IllegalArgumentException("Word can't be empty or null"); wordFrequencies.incrementCount(word, increment); if (hasToken(word)) { VocabWord...
[ "@", "Override", "public", "synchronized", "void", "incrementWordCount", "(", "String", "word", ",", "int", "increment", ")", "{", "if", "(", "word", "==", "null", "||", "word", ".", "isEmpty", "(", ")", ")", "throw", "new", "IllegalArgumentException", "(", ...
Increment the count for the given word by the amount increment @param word the word to increment the count for @param increment the amount to increment by
[ "Increment", "the", "count", "for", "the", "given", "word", "by", "the", "amount", "increment" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-nlp-parent/deeplearning4j-nlp/src/main/java/org/deeplearning4j/models/word2vec/wordstore/inmemory/InMemoryLookupCache.java#L120-L131
Samsung/GearVRf
GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/main/MainScene.java
MainScene.rotateToFaceCamera
public void rotateToFaceCamera(final GVRTransform transform) { //see http://stackoverflow.com/questions/5782658/extracting-yaw-from-a-quaternion final GVRTransform t = getMainCameraRig().getHeadTransform(); final Quaternionf q = new Quaternionf(0, t.getRotationY(), 0, t.getRotationW()).normalize...
java
public void rotateToFaceCamera(final GVRTransform transform) { //see http://stackoverflow.com/questions/5782658/extracting-yaw-from-a-quaternion final GVRTransform t = getMainCameraRig().getHeadTransform(); final Quaternionf q = new Quaternionf(0, t.getRotationY(), 0, t.getRotationW()).normalize...
[ "public", "void", "rotateToFaceCamera", "(", "final", "GVRTransform", "transform", ")", "{", "//see http://stackoverflow.com/questions/5782658/extracting-yaw-from-a-quaternion", "final", "GVRTransform", "t", "=", "getMainCameraRig", "(", ")", ".", "getHeadTransform", "(", ")"...
Apply the necessary rotation to the transform so that it is in front of the camera. @param transform The transform to modify.
[ "Apply", "the", "necessary", "rotation", "to", "the", "transform", "so", "that", "it", "is", "in", "front", "of", "the", "camera", "." ]
train
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/main/MainScene.java#L465-L471
Erudika/para
para-core/src/main/java/com/erudika/para/utils/Config.java
Config.getConfigParam
public static String getConfigParam(String key, String defaultValue) { if (config == null) { init(null); } if (StringUtils.isBlank(key)) { return defaultValue; } String keyVar = key.replaceAll("\\.", "_"); String env = System.getenv(keyVar) == null ? System.getenv(PARA + "_" + keyVar) : System.getenv(...
java
public static String getConfigParam(String key, String defaultValue) { if (config == null) { init(null); } if (StringUtils.isBlank(key)) { return defaultValue; } String keyVar = key.replaceAll("\\.", "_"); String env = System.getenv(keyVar) == null ? System.getenv(PARA + "_" + keyVar) : System.getenv(...
[ "public", "static", "String", "getConfigParam", "(", "String", "key", ",", "String", "defaultValue", ")", "{", "if", "(", "config", "==", "null", ")", "{", "init", "(", "null", ")", ";", "}", "if", "(", "StringUtils", ".", "isBlank", "(", "key", ")", ...
Returns the value of a configuration parameter or its default value. {@link System#getProperty(java.lang.String)} has precedence. @param key the param key @param defaultValue the default param value @return the value of a param
[ "Returns", "the", "value", "of", "a", "configuration", "parameter", "or", "its", "default", "value", ".", "{" ]
train
https://github.com/Erudika/para/blob/5ba096c477042ea7b18e9a0e8b5b1ee0f5bd6ce9/para-core/src/main/java/com/erudika/para/utils/Config.java#L355-L372
albfernandez/itext2
src/main/java/com/lowagie/text/pdf/PdfLayer.java
PdfLayer.setZoom
public void setZoom(float min, float max) { if (min <= 0 && max < 0) return; PdfDictionary usage = getUsage(); PdfDictionary dic = new PdfDictionary(); if (min > 0) dic.put(PdfName.MIN_LOWER_CASE, new PdfNumber(min)); if (max >= 0) dic.put(PdfN...
java
public void setZoom(float min, float max) { if (min <= 0 && max < 0) return; PdfDictionary usage = getUsage(); PdfDictionary dic = new PdfDictionary(); if (min > 0) dic.put(PdfName.MIN_LOWER_CASE, new PdfNumber(min)); if (max >= 0) dic.put(PdfN...
[ "public", "void", "setZoom", "(", "float", "min", ",", "float", "max", ")", "{", "if", "(", "min", "<=", "0", "&&", "max", "<", "0", ")", "return", ";", "PdfDictionary", "usage", "=", "getUsage", "(", ")", ";", "PdfDictionary", "dic", "=", "new", "...
Specifies a range of magnifications at which the content in this optional content group is best viewed. @param min the minimum recommended magnification factors at which the group should be ON. A negative value will set the default to 0 @param max the maximum recommended magnification factor at which the group should b...
[ "Specifies", "a", "range", "of", "magnifications", "at", "which", "the", "content", "in", "this", "optional", "content", "group", "is", "best", "viewed", "." ]
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/pdf/PdfLayer.java#L254-L264
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/lang/ServiceLoaderHelper.java
ServiceLoaderHelper.getFirstSPIImplementation
@Nullable public static <T> T getFirstSPIImplementation (@Nonnull final Class <T> aSPIClass, @Nonnull final ClassLoader aClassLoader) { return getFirstSPIImplementation (aSPIClass, aClassLoader, null); }
java
@Nullable public static <T> T getFirstSPIImplementation (@Nonnull final Class <T> aSPIClass, @Nonnull final ClassLoader aClassLoader) { return getFirstSPIImplementation (aSPIClass, aClassLoader, null); }
[ "@", "Nullable", "public", "static", "<", "T", ">", "T", "getFirstSPIImplementation", "(", "@", "Nonnull", "final", "Class", "<", "T", ">", "aSPIClass", ",", "@", "Nonnull", "final", "ClassLoader", "aClassLoader", ")", "{", "return", "getFirstSPIImplementation",...
Uses the {@link ServiceLoader} to load all SPI implementations of the passed class and return only the first instance. @param <T> The implementation type to be loaded @param aSPIClass The SPI interface class. May not be <code>null</code>. @param aClassLoader The class loader to use for the SPI loader. May not be <code...
[ "Uses", "the", "{", "@link", "ServiceLoader", "}", "to", "load", "all", "SPI", "implementations", "of", "the", "passed", "class", "and", "return", "only", "the", "first", "instance", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/lang/ServiceLoaderHelper.java#L205-L210
jbundle/webapp
upload-unjar/src/main/java/org/jbundle/util/webapp/upload/unjar/UploadServletUnjar.java
UploadServletUnjar.successfulFileUpload
public String successfulFileUpload(File file, Properties properties) { String strHTML = super.successfulFileUpload(file, properties); strHTML = "<a href=\"/\">Home</a>" + RETURN + strHTML; // Create a properties object to describe where to move these files String strPath = file.getPath(); // May as well us...
java
public String successfulFileUpload(File file, Properties properties) { String strHTML = super.successfulFileUpload(file, properties); strHTML = "<a href=\"/\">Home</a>" + RETURN + strHTML; // Create a properties object to describe where to move these files String strPath = file.getPath(); // May as well us...
[ "public", "String", "successfulFileUpload", "(", "File", "file", ",", "Properties", "properties", ")", "{", "String", "strHTML", "=", "super", ".", "successfulFileUpload", "(", "file", ",", "properties", ")", ";", "strHTML", "=", "\"<a href=\\\"/\\\">Home</a>\"", ...
The file was uploaded successfully, return an HTML string to display. NOTE: This is supplied to provide a convenient place to override this servlet and do some processing or supply a different (or no) return string.
[ "The", "file", "was", "uploaded", "successfully", "return", "an", "HTML", "string", "to", "display", ".", "NOTE", ":", "This", "is", "supplied", "to", "provide", "a", "convenient", "place", "to", "override", "this", "servlet", "and", "do", "some", "processin...
train
https://github.com/jbundle/webapp/blob/af2cf32bd92254073052f1f9b4bcd47c2f76ba7d/upload-unjar/src/main/java/org/jbundle/util/webapp/upload/unjar/UploadServletUnjar.java#L53-L72
Azure/azure-sdk-for-java
hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/implementation/ApplicationsInner.java
ApplicationsInner.listByClusterAsync
public Observable<Page<ApplicationInner>> listByClusterAsync(final String resourceGroupName, final String clusterName) { return listByClusterWithServiceResponseAsync(resourceGroupName, clusterName) .map(new Func1<ServiceResponse<Page<ApplicationInner>>, Page<ApplicationInner>>() { @O...
java
public Observable<Page<ApplicationInner>> listByClusterAsync(final String resourceGroupName, final String clusterName) { return listByClusterWithServiceResponseAsync(resourceGroupName, clusterName) .map(new Func1<ServiceResponse<Page<ApplicationInner>>, Page<ApplicationInner>>() { @O...
[ "public", "Observable", "<", "Page", "<", "ApplicationInner", ">", ">", "listByClusterAsync", "(", "final", "String", "resourceGroupName", ",", "final", "String", "clusterName", ")", "{", "return", "listByClusterWithServiceResponseAsync", "(", "resourceGroupName", ",", ...
Lists all of the applications for the HDInsight cluster. @param resourceGroupName The name of the resource group. @param clusterName The name of the cluster. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the PagedList&lt;ApplicationInner&gt; object
[ "Lists", "all", "of", "the", "applications", "for", "the", "HDInsight", "cluster", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/implementation/ApplicationsInner.java#L143-L151
aalmiray/Json-lib
src/main/java/net/sf/json/JSONArray.java
JSONArray.join
public String join( String separator, boolean stripQuotes ) { int len = size(); StringBuffer sb = new StringBuffer(); for( int i = 0; i < len; i += 1 ){ if( i > 0 ){ sb.append( separator ); } String value = JSONUtils.valueToString( this.elements.get( i ) ); ...
java
public String join( String separator, boolean stripQuotes ) { int len = size(); StringBuffer sb = new StringBuffer(); for( int i = 0; i < len; i += 1 ){ if( i > 0 ){ sb.append( separator ); } String value = JSONUtils.valueToString( this.elements.get( i ) ); ...
[ "public", "String", "join", "(", "String", "separator", ",", "boolean", "stripQuotes", ")", "{", "int", "len", "=", "size", "(", ")", ";", "StringBuffer", "sb", "=", "new", "StringBuffer", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", ...
Make a string from the contents of this JSONArray. The <code>separator</code> string is inserted between each element. Warning: This method assumes that the data structure is acyclical. @param separator A string that will be inserted between the elements. @return a string. @throws JSONException If the array contains a...
[ "Make", "a", "string", "from", "the", "contents", "of", "this", "JSONArray", ".", "The", "<code", ">", "separator<", "/", "code", ">", "string", "is", "inserted", "between", "each", "element", ".", "Warning", ":", "This", "method", "assumes", "that", "the"...
train
https://github.com/aalmiray/Json-lib/blob/9e2b3376ee8f511a48aa7ac05f75a7414e02280f/src/main/java/net/sf/json/JSONArray.java#L1911-L1923
Azure/azure-sdk-for-java
datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/implementation/AccountsInner.java
AccountsInner.getDataLakeStoreAccount
public DataLakeStoreAccountInfoInner getDataLakeStoreAccount(String resourceGroupName, String accountName, String dataLakeStoreAccountName) { return getDataLakeStoreAccountWithServiceResponseAsync(resourceGroupName, accountName, dataLakeStoreAccountName).toBlocking().single().body(); }
java
public DataLakeStoreAccountInfoInner getDataLakeStoreAccount(String resourceGroupName, String accountName, String dataLakeStoreAccountName) { return getDataLakeStoreAccountWithServiceResponseAsync(resourceGroupName, accountName, dataLakeStoreAccountName).toBlocking().single().body(); }
[ "public", "DataLakeStoreAccountInfoInner", "getDataLakeStoreAccount", "(", "String", "resourceGroupName", ",", "String", "accountName", ",", "String", "dataLakeStoreAccountName", ")", "{", "return", "getDataLakeStoreAccountWithServiceResponseAsync", "(", "resourceGroupName", ",",...
Gets the specified Data Lake Store account details in the specified Data Lake Analytics account. @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. @param accountName The name of the Data Lake Analytics account from which to retrieve the Data Lake Store account...
[ "Gets", "the", "specified", "Data", "Lake", "Store", "account", "details", "in", "the", "specified", "Data", "Lake", "Analytics", "account", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/implementation/AccountsInner.java#L947-L949
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/align/util/AlignmentTools.java
AlignmentTools.alignmentAsMap
public static Map<Integer, Integer> alignmentAsMap(AFPChain afpChain) throws StructureException { Map<Integer,Integer> map = new HashMap<Integer,Integer>(); if( afpChain.getAlnLength() < 1 ) { return map; } int[][][] optAln = afpChain.getOptAln(); int[] optLen = afpChain.getOptLen(); for(int block = 0; ...
java
public static Map<Integer, Integer> alignmentAsMap(AFPChain afpChain) throws StructureException { Map<Integer,Integer> map = new HashMap<Integer,Integer>(); if( afpChain.getAlnLength() < 1 ) { return map; } int[][][] optAln = afpChain.getOptAln(); int[] optLen = afpChain.getOptLen(); for(int block = 0; ...
[ "public", "static", "Map", "<", "Integer", ",", "Integer", ">", "alignmentAsMap", "(", "AFPChain", "afpChain", ")", "throws", "StructureException", "{", "Map", "<", "Integer", ",", "Integer", ">", "map", "=", "new", "HashMap", "<", "Integer", ",", "Integer",...
Creates a Map specifying the alignment as a mapping between residue indices of protein 1 and residue indices of protein 2. <p>For example,<pre> 1234 5678</pre> becomes<pre> 1->5 2->6 3->7 4->8</pre> @param afpChain An alignment @return A mapping from aligned residues of protein 1 to their partners in protein 2. @thro...
[ "Creates", "a", "Map", "specifying", "the", "alignment", "as", "a", "mapping", "between", "residue", "indices", "of", "protein", "1", "and", "residue", "indices", "of", "protein", "2", "." ]
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/align/util/AlignmentTools.java#L159-L178
Abnaxos/markdown-doclet
doclet/jdk8/src/main/java/ch/raffael/mddoclet/mdtaglet/argval/PredefinedArgumentValidators.java
PredefinedArgumentValidators.argumentTypeValidator
public static ArgumentValidator argumentTypeValidator(String description, IndexFilter indexFilter, ArgumentPredicate argumentPredicate) { return new EachArgumentTypeValidator(description, indexFilter, argumentPredicate); }
java
public static ArgumentValidator argumentTypeValidator(String description, IndexFilter indexFilter, ArgumentPredicate argumentPredicate) { return new EachArgumentTypeValidator(description, indexFilter, argumentPredicate); }
[ "public", "static", "ArgumentValidator", "argumentTypeValidator", "(", "String", "description", ",", "IndexFilter", "indexFilter", ",", "ArgumentPredicate", "argumentPredicate", ")", "{", "return", "new", "EachArgumentTypeValidator", "(", "description", ",", "indexFilter", ...
# Creates a {@link ArgumentValidator} which apply the {@link ArgumentPredicate} on all arguments an the accepting {@code indexFilter}. Example: ```java // Creates a {@link ArgumentValidator} which check's if 2nd and 3rd argument has an integer value // in range 3 to 7 argumentTypeValidator( "only 3..7 for 2nd and 3rd...
[ "#", "Creates", "a", "{", "@link", "ArgumentValidator", "}", "which", "apply", "the", "{", "@link", "ArgumentPredicate", "}", "on", "all", "arguments", "an", "the", "accepting", "{", "@code", "indexFilter", "}", "." ]
train
https://github.com/Abnaxos/markdown-doclet/blob/e98a9630206fc9c8d813cf2349ff594be8630054/doclet/jdk8/src/main/java/ch/raffael/mddoclet/mdtaglet/argval/PredefinedArgumentValidators.java#L372-L374
Mthwate/DatLib
src/main/java/com/mthwate/datlib/HashUtils.java
HashUtils.sha512Hex
public static String sha512Hex(String data, Charset charset) throws NoSuchAlgorithmException { return sha512Hex(data.getBytes(charset)); }
java
public static String sha512Hex(String data, Charset charset) throws NoSuchAlgorithmException { return sha512Hex(data.getBytes(charset)); }
[ "public", "static", "String", "sha512Hex", "(", "String", "data", ",", "Charset", "charset", ")", "throws", "NoSuchAlgorithmException", "{", "return", "sha512Hex", "(", "data", ".", "getBytes", "(", "charset", ")", ")", ";", "}" ]
Hashes a string using the SHA-512 algorithm. Returns a hexadecimal result. @since 1.1 @param data the string to hash @param charset the charset of the string @return the hexadecimal SHA-512 hash of the string @throws NoSuchAlgorithmException the algorithm is not supported by existing providers
[ "Hashes", "a", "string", "using", "the", "SHA", "-", "512", "algorithm", ".", "Returns", "a", "hexadecimal", "result", "." ]
train
https://github.com/Mthwate/DatLib/blob/f0b3a9f9cf6fdc773d4f86234ebd95986c9b6077/src/main/java/com/mthwate/datlib/HashUtils.java#L582-L584
albfernandez/itext2
src/main/java/com/lowagie/text/pdf/TrueTypeFont.java
TrueTypeFont.setKerning
public boolean setKerning(int char1, int char2, int kern) { int metrics[] = getMetricsTT(char1); if (metrics == null) return false; int c1 = metrics[0]; metrics = getMetricsTT(char2); if (metrics == null) return false; int c2 = metrics[0]; ...
java
public boolean setKerning(int char1, int char2, int kern) { int metrics[] = getMetricsTT(char1); if (metrics == null) return false; int c1 = metrics[0]; metrics = getMetricsTT(char2); if (metrics == null) return false; int c2 = metrics[0]; ...
[ "public", "boolean", "setKerning", "(", "int", "char1", ",", "int", "char2", ",", "int", "kern", ")", "{", "int", "metrics", "[", "]", "=", "getMetricsTT", "(", "char1", ")", ";", "if", "(", "metrics", "==", "null", ")", "return", "false", ";", "int"...
Sets the kerning between two Unicode chars. @param char1 the first char @param char2 the second char @param kern the kerning to apply in normalized 1000 units @return <code>true</code> if the kerning was applied, <code>false</code> otherwise
[ "Sets", "the", "kerning", "between", "two", "Unicode", "chars", "." ]
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/pdf/TrueTypeFont.java#L1515-L1526
audit4j/audit4j-core
src/main/java/org/audit4j/core/schedule/Schedulers.java
Schedulers.newThreadPoolScheduler
public static Schedulers newThreadPoolScheduler(int poolSize) { createSingleton(); Schedulers.increaseNoOfSchedullers(); ThreadPoolTaskScheduler scheduler = new ThreadPoolTaskScheduler(); CustomizableThreadFactory factory = new CustomizableThreadFactory(); scheduler.initializeExe...
java
public static Schedulers newThreadPoolScheduler(int poolSize) { createSingleton(); Schedulers.increaseNoOfSchedullers(); ThreadPoolTaskScheduler scheduler = new ThreadPoolTaskScheduler(); CustomizableThreadFactory factory = new CustomizableThreadFactory(); scheduler.initializeExe...
[ "public", "static", "Schedulers", "newThreadPoolScheduler", "(", "int", "poolSize", ")", "{", "createSingleton", "(", ")", ";", "Schedulers", ".", "increaseNoOfSchedullers", "(", ")", ";", "ThreadPoolTaskScheduler", "scheduler", "=", "new", "ThreadPoolTaskScheduler", ...
New thread pool scheduler. @param poolSize the pool size @return the schedulers
[ "New", "thread", "pool", "scheduler", "." ]
train
https://github.com/audit4j/audit4j-core/blob/dc8569108851e64cb0ecc7a39048db0ad070fba2/src/main/java/org/audit4j/core/schedule/Schedulers.java#L68-L82
HeidelTime/heideltime
src/jvntextpro/util/StringUtils.java
StringUtils.findFirstOf
public static int findFirstOf (String container, String chars, int begin){ int minIdx = -1; for (int i = 0; i < chars.length() && i >= 0; ++i){ int idx = container.indexOf(chars.charAt(i), begin); if ( (idx < minIdx && idx != -1) || minIdx == -1){ ...
java
public static int findFirstOf (String container, String chars, int begin){ int minIdx = -1; for (int i = 0; i < chars.length() && i >= 0; ++i){ int idx = container.indexOf(chars.charAt(i), begin); if ( (idx < minIdx && idx != -1) || minIdx == -1){ ...
[ "public", "static", "int", "findFirstOf", "(", "String", "container", ",", "String", "chars", ",", "int", "begin", ")", "{", "int", "minIdx", "=", "-", "1", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "chars", ".", "length", "(", ")", "...
Find the first occurrence . @param container the string on which we search @param chars the string which we search for the occurrence @param begin the start position to search from @return the position where chars first occur in the container
[ "Find", "the", "first", "occurrence", "." ]
train
https://github.com/HeidelTime/heideltime/blob/4ef5002eb5ecfeb818086ff7e394e792ee360335/src/jvntextpro/util/StringUtils.java#L50-L59
alkacon/opencms-core
src/org/opencms/gwt/shared/CmsListInfoBean.java
CmsListInfoBean.addAdditionalInfo
public void addAdditionalInfo(String name, String value) { getAdditionalInfo().add(new CmsAdditionalInfoBean(name, value, null)); }
java
public void addAdditionalInfo(String name, String value) { getAdditionalInfo().add(new CmsAdditionalInfoBean(name, value, null)); }
[ "public", "void", "addAdditionalInfo", "(", "String", "name", ",", "String", "value", ")", "{", "getAdditionalInfo", "(", ")", ".", "add", "(", "new", "CmsAdditionalInfoBean", "(", "name", ",", "value", ",", "null", ")", ")", ";", "}" ]
Sets a new additional info.<p> @param name the additional info name @param value the additional info value
[ "Sets", "a", "new", "additional", "info", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/gwt/shared/CmsListInfoBean.java#L135-L138
michael-rapp/AndroidUtil
library/src/main/java/de/mrapp/android/util/ElevationUtil.java
ElevationUtil.createElevationShadow
public static Bitmap createElevationShadow(@NonNull final Context context, final int elevation, @NonNull final Orientation orientation, final boolean parallelLight) { Condition.INSTANCE.ensureNotNull(context, "The cont...
java
public static Bitmap createElevationShadow(@NonNull final Context context, final int elevation, @NonNull final Orientation orientation, final boolean parallelLight) { Condition.INSTANCE.ensureNotNull(context, "The cont...
[ "public", "static", "Bitmap", "createElevationShadow", "(", "@", "NonNull", "final", "Context", "context", ",", "final", "int", "elevation", ",", "@", "NonNull", "final", "Orientation", "orientation", ",", "final", "boolean", "parallelLight", ")", "{", "Condition"...
Creates and returns a bitmap, which can be used to emulate a shadow of an elevated view on pre-Lollipop devices. This method furthermore allows to specify, whether parallel illumination of the view should be emulated, which causes the shadows at all of its sides to appear identically. @param context The context, which...
[ "Creates", "and", "returns", "a", "bitmap", "which", "can", "be", "used", "to", "emulate", "a", "shadow", "of", "an", "elevated", "view", "on", "pre", "-", "Lollipop", "devices", ".", "This", "method", "furthermore", "allows", "to", "specify", "whether", "...
train
https://github.com/michael-rapp/AndroidUtil/blob/67ec0e5732344eeb4d946dd1f96d782939e449f4/library/src/main/java/de/mrapp/android/util/ElevationUtil.java#L820-L843
jscep/jscep
src/main/java/org/jscep/client/Client.java
Client.getRevocationList
@SuppressWarnings("unchecked") public X509CRL getRevocationList(final X509Certificate identity, final PrivateKey key, final X500Principal issuer, final BigInteger serial, final String profile) throws ClientException, OperationFailureException { LOGGER.debug("Retriving CRL...
java
@SuppressWarnings("unchecked") public X509CRL getRevocationList(final X509Certificate identity, final PrivateKey key, final X500Principal issuer, final BigInteger serial, final String profile) throws ClientException, OperationFailureException { LOGGER.debug("Retriving CRL...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "X509CRL", "getRevocationList", "(", "final", "X509Certificate", "identity", ",", "final", "PrivateKey", "key", ",", "final", "X500Principal", "issuer", ",", "final", "BigInteger", "serial", ",", "final",...
Returns the certificate revocation list a given issuer and serial number. <p> This method requests a CRL for a certificate as identified by the issuer name and the certificate serial number. <p> This method provides support for SCEP servers with multiple profiles. @param identity the identity of the client. @param key...
[ "Returns", "the", "certificate", "revocation", "list", "a", "given", "issuer", "and", "serial", "number", ".", "<p", ">", "This", "method", "requests", "a", "CRL", "for", "a", "certificate", "as", "identified", "by", "the", "issuer", "name", "and", "the", ...
train
https://github.com/jscep/jscep/blob/d2c602f8b3adb774704c24eaf62f6b8654a40e35/src/main/java/org/jscep/client/Client.java#L425-L464
DataArt/CalculationEngine
calculation-engine/engine-converters/src/main/java/com/dataart/spreadsheetanalytics/engine/ConverterUtils.java
ConverterUtils.resolveCellValue
public static ICellValue resolveCellValue(Cell c) { if (c == null) { return CellValue.BLANK; } switch (c.getCellType()) { case CELL_TYPE_NUMERIC: { return CellValue.from(c.getNumericCellValue()); } case CELL_TYPE_STRING: { return CellValue.from(c.getStringCellValue()); }...
java
public static ICellValue resolveCellValue(Cell c) { if (c == null) { return CellValue.BLANK; } switch (c.getCellType()) { case CELL_TYPE_NUMERIC: { return CellValue.from(c.getNumericCellValue()); } case CELL_TYPE_STRING: { return CellValue.from(c.getStringCellValue()); }...
[ "public", "static", "ICellValue", "resolveCellValue", "(", "Cell", "c", ")", "{", "if", "(", "c", "==", "null", ")", "{", "return", "CellValue", ".", "BLANK", ";", "}", "switch", "(", "c", ".", "getCellType", "(", ")", ")", "{", "case", "CELL_TYPE_NUME...
Returns the new {@link CellValue} from provided {@link Cell}.
[ "Returns", "the", "new", "{" ]
train
https://github.com/DataArt/CalculationEngine/blob/34ce1d9c1f9b57a502906b274311d28580b134e5/calculation-engine/engine-converters/src/main/java/com/dataart/spreadsheetanalytics/engine/ConverterUtils.java#L171-L183
OpenLiberty/open-liberty
dev/com.ibm.ws.jmx.connector.client.rest/src/com/ibm/ws/jmx/connector/converter/JSONConverter.java
JSONConverter.writeObjectInstance
public void writeObjectInstance(OutputStream out, ObjectInstanceWrapper value) throws IOException { // ObjectInstance has no known sub-class. writeStartObject(out); writeObjectNameField(out, OM_OBJECTNAME, value.objectInstance.getObjectName()); writeStringField(out, OM_CLASSNAME, value.o...
java
public void writeObjectInstance(OutputStream out, ObjectInstanceWrapper value) throws IOException { // ObjectInstance has no known sub-class. writeStartObject(out); writeObjectNameField(out, OM_OBJECTNAME, value.objectInstance.getObjectName()); writeStringField(out, OM_CLASSNAME, value.o...
[ "public", "void", "writeObjectInstance", "(", "OutputStream", "out", ",", "ObjectInstanceWrapper", "value", ")", "throws", "IOException", "{", "// ObjectInstance has no known sub-class.", "writeStartObject", "(", "out", ")", ";", "writeObjectNameField", "(", "out", ",", ...
Encode an ObjectInstanceWrapper instance as JSON: { "objectName" : ObjectName, "className" : String, "URL" : URL, } @param out The stream to write JSON to @param value The ObjectInstanceWrapper instance to encode. The value and value.objectInstance can't be null. @throws IOException If an I/O error occurs @see #readOb...
[ "Encode", "an", "ObjectInstanceWrapper", "instance", "as", "JSON", ":", "{", "objectName", ":", "ObjectName", "className", ":", "String", "URL", ":", "URL", "}" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jmx.connector.client.rest/src/com/ibm/ws/jmx/connector/converter/JSONConverter.java#L1019-L1026
d-michail/jheaps
src/main/java/org/jheaps/tree/FibonacciHeap.java
FibonacciHeap.forceDecreaseKeyToMinimum
private void forceDecreaseKeyToMinimum(Node<K, V> n) { // if not root Node<K, V> y = n.parent; if (y != null) { cut(n, y); cascadingCut(y); } minRoot = n; }
java
private void forceDecreaseKeyToMinimum(Node<K, V> n) { // if not root Node<K, V> y = n.parent; if (y != null) { cut(n, y); cascadingCut(y); } minRoot = n; }
[ "private", "void", "forceDecreaseKeyToMinimum", "(", "Node", "<", "K", ",", "V", ">", "n", ")", "{", "// if not root", "Node", "<", "K", ",", "V", ">", "y", "=", "n", ".", "parent", ";", "if", "(", "y", "!=", "null", ")", "{", "cut", "(", "n", ...
/* Decrease the key of a node to the minimum. Helper function for performing a delete operation. Does not change the node's actual key, but behaves as the key is the minimum key in the heap.
[ "/", "*", "Decrease", "the", "key", "of", "a", "node", "to", "the", "minimum", ".", "Helper", "function", "for", "performing", "a", "delete", "operation", ".", "Does", "not", "change", "the", "node", "s", "actual", "key", "but", "behaves", "as", "the", ...
train
https://github.com/d-michail/jheaps/blob/7146451dd6591c2a8559dc564c9c40428c4a2c10/src/main/java/org/jheaps/tree/FibonacciHeap.java#L552-L560
jbundle/jbundle
thin/base/screen/util-misc/src/main/java/org/jbundle/thin/base/screen/util/html/JHelpPane.java
JHelpPane.doAction
public boolean doAction(String strAction, int iOptions) { if (Constants.CLOSE.equalsIgnoreCase(strAction)) { this.linkActivated(null, null); return true; // Don't let anyone else handle my actions } return super.doAction(strAction, iOptions); }
java
public boolean doAction(String strAction, int iOptions) { if (Constants.CLOSE.equalsIgnoreCase(strAction)) { this.linkActivated(null, null); return true; // Don't let anyone else handle my actions } return super.doAction(strAction, iOptions); }
[ "public", "boolean", "doAction", "(", "String", "strAction", ",", "int", "iOptions", ")", "{", "if", "(", "Constants", ".", "CLOSE", ".", "equalsIgnoreCase", "(", "strAction", ")", ")", "{", "this", ".", "linkActivated", "(", "null", ",", "null", ")", ";...
Process this action. Override this for functionality. @param strAction The action command or message. @return true if handled.
[ "Process", "this", "action", ".", "Override", "this", "for", "functionality", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/screen/util-misc/src/main/java/org/jbundle/thin/base/screen/util/html/JHelpPane.java#L120-L128
agmip/agmip-common-functions
src/main/java/org/agmip/functions/PTSaxton2006.java
PTSaxton2006.calcMoisture33Kpa
public static String calcMoisture33Kpa(String slsnd, String slcly, String omPct) { String ret; if ((slsnd = checkPctVal(slsnd)) == null || (slcly = checkPctVal(slcly)) == null || (omPct = checkPctVal(omPct)) == null) { LOG.error("Invalid input parameters for ...
java
public static String calcMoisture33Kpa(String slsnd, String slcly, String omPct) { String ret; if ((slsnd = checkPctVal(slsnd)) == null || (slcly = checkPctVal(slcly)) == null || (omPct = checkPctVal(omPct)) == null) { LOG.error("Invalid input parameters for ...
[ "public", "static", "String", "calcMoisture33Kpa", "(", "String", "slsnd", ",", "String", "slcly", ",", "String", "omPct", ")", "{", "String", "ret", ";", "if", "(", "(", "slsnd", "=", "checkPctVal", "(", "slsnd", ")", ")", "==", "null", "||", "(", "sl...
Equation 2 for 33 kPa moisture, normal density, %v @param slsnd Sand weight percentage by layer ([0,100]%) @param slcly Clay weight percentage by layer ([0,100]%) @param omPct Organic matter weight percentage by layer ([0,100]%), (= SLOC * 1.72)
[ "Equation", "2", "for", "33", "kPa", "moisture", "normal", "density", "%v" ]
train
https://github.com/agmip/agmip-common-functions/blob/4efa3042178841b026ca6fba9c96da02fbfb9a8e/src/main/java/org/agmip/functions/PTSaxton2006.java#L144-L158
square/picasso
picasso/src/main/java/com/squareup/picasso3/PicassoDrawable.java
PicassoDrawable.setPlaceholder
static void setPlaceholder(ImageView target, @Nullable Drawable placeholderDrawable) { target.setImageDrawable(placeholderDrawable); if (target.getDrawable() instanceof Animatable) { ((Animatable) target.getDrawable()).start(); } }
java
static void setPlaceholder(ImageView target, @Nullable Drawable placeholderDrawable) { target.setImageDrawable(placeholderDrawable); if (target.getDrawable() instanceof Animatable) { ((Animatable) target.getDrawable()).start(); } }
[ "static", "void", "setPlaceholder", "(", "ImageView", "target", ",", "@", "Nullable", "Drawable", "placeholderDrawable", ")", "{", "target", ".", "setImageDrawable", "(", "placeholderDrawable", ")", ";", "if", "(", "target", ".", "getDrawable", "(", ")", "instan...
Create or update the drawable on the target {@link ImageView} to display the supplied placeholder image.
[ "Create", "or", "update", "the", "drawable", "on", "the", "target", "{" ]
train
https://github.com/square/picasso/blob/89f55b76e3be2b65e5997b7698f782f16f8547e3/picasso/src/main/java/com/squareup/picasso3/PicassoDrawable.java#L73-L78
Azure/azure-sdk-for-java
eventgrid/resource-manager/v2018_05_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2018_05_01_preview/implementation/EventSubscriptionsInner.java
EventSubscriptionsInner.listGlobalByResourceGroupForTopicTypeAsync
public Observable<List<EventSubscriptionInner>> listGlobalByResourceGroupForTopicTypeAsync(String resourceGroupName, String topicTypeName) { return listGlobalByResourceGroupForTopicTypeWithServiceResponseAsync(resourceGroupName, topicTypeName).map(new Func1<ServiceResponse<List<EventSubscriptionInner>>, List<Ev...
java
public Observable<List<EventSubscriptionInner>> listGlobalByResourceGroupForTopicTypeAsync(String resourceGroupName, String topicTypeName) { return listGlobalByResourceGroupForTopicTypeWithServiceResponseAsync(resourceGroupName, topicTypeName).map(new Func1<ServiceResponse<List<EventSubscriptionInner>>, List<Ev...
[ "public", "Observable", "<", "List", "<", "EventSubscriptionInner", ">", ">", "listGlobalByResourceGroupForTopicTypeAsync", "(", "String", "resourceGroupName", ",", "String", "topicTypeName", ")", "{", "return", "listGlobalByResourceGroupForTopicTypeWithServiceResponseAsync", "...
List all global event subscriptions under a resource group for a topic type. List all global event subscriptions under a resource group for a specific topic type. @param resourceGroupName The name of the resource group within the user's subscription. @param topicTypeName Name of the topic type @throws IllegalArgumentE...
[ "List", "all", "global", "event", "subscriptions", "under", "a", "resource", "group", "for", "a", "topic", "type", ".", "List", "all", "global", "event", "subscriptions", "under", "a", "resource", "group", "for", "a", "specific", "topic", "type", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/eventgrid/resource-manager/v2018_05_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2018_05_01_preview/implementation/EventSubscriptionsInner.java#L1116-L1123
exoplatform/jcr
exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/RepositoryChainLogPathHelper.java
RepositoryChainLogPathHelper.getPath
public static String getPath(String relativePath, String backupDirCanonicalPath) throws MalformedURLException { String path = "file:" + backupDirCanonicalPath + "/" + relativePath; URL urlPath = new URL(resolveFileURL(path)); return urlPath.getFile(); }
java
public static String getPath(String relativePath, String backupDirCanonicalPath) throws MalformedURLException { String path = "file:" + backupDirCanonicalPath + "/" + relativePath; URL urlPath = new URL(resolveFileURL(path)); return urlPath.getFile(); }
[ "public", "static", "String", "getPath", "(", "String", "relativePath", ",", "String", "backupDirCanonicalPath", ")", "throws", "MalformedURLException", "{", "String", "path", "=", "\"file:\"", "+", "backupDirCanonicalPath", "+", "\"/\"", "+", "relativePath", ";", "...
Will be returned absolute path. @param relativePath String, relative path. @param backupDirCanonicalPath String, path to backup dir @return String Will be returned absolute path. @throws MalformedURLException
[ "Will", "be", "returned", "absolute", "path", "." ]
train
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/RepositoryChainLogPathHelper.java#L68-L75
infinispan/infinispan
client/hotrod-client/src/main/java/org/infinispan/client/hotrod/event/impl/ContinuousQueryImpl.java
ContinuousQueryImpl.addContinuousQueryListener
public <C> void addContinuousQueryListener(Query query, ContinuousQueryListener<K, C> listener) { addContinuousQueryListener(query.getQueryString(), query.getParameters(), listener); }
java
public <C> void addContinuousQueryListener(Query query, ContinuousQueryListener<K, C> listener) { addContinuousQueryListener(query.getQueryString(), query.getParameters(), listener); }
[ "public", "<", "C", ">", "void", "addContinuousQueryListener", "(", "Query", "query", ",", "ContinuousQueryListener", "<", "K", ",", "C", ">", "listener", ")", "{", "addContinuousQueryListener", "(", "query", ".", "getQueryString", "(", ")", ",", "query", ".",...
Registers a continuous query listener that uses a query DSL based filter. The listener will receive notifications when a cache entry joins or leaves the matching set defined by the query. @param listener the continuous query listener instance @param query the query to be used for determining the matching set
[ "Registers", "a", "continuous", "query", "listener", "that", "uses", "a", "query", "DSL", "based", "filter", ".", "The", "listener", "will", "receive", "notifications", "when", "a", "cache", "entry", "joins", "or", "leaves", "the", "matching", "set", "defined"...
train
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/client/hotrod-client/src/main/java/org/infinispan/client/hotrod/event/impl/ContinuousQueryImpl.java#L68-L70
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/TreeMap.java
TreeMap.colorOf
private static <K,V> boolean colorOf(TreeMapEntry<K,V> p) { return (p == null ? BLACK : p.color); }
java
private static <K,V> boolean colorOf(TreeMapEntry<K,V> p) { return (p == null ? BLACK : p.color); }
[ "private", "static", "<", "K", ",", "V", ">", "boolean", "colorOf", "(", "TreeMapEntry", "<", "K", ",", "V", ">", "p", ")", "{", "return", "(", "p", "==", "null", "?", "BLACK", ":", "p", ".", "color", ")", ";", "}" ]
Balancing operations. Implementations of rebalancings during insertion and deletion are slightly different than the CLR version. Rather than using dummy nilnodes, we use a set of accessors that deal properly with null. They are used to avoid messiness surrounding nullness checks in the main algorithms.
[ "Balancing", "operations", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/TreeMap.java#L2282-L2284
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/ToUnknownStream.java
ToUnknownStream.processingInstruction
public void processingInstruction(String target, String data) throws SAXException { if (m_firstTagNotEmitted) { flush(); } m_handler.processingInstruction(target, data); }
java
public void processingInstruction(String target, String data) throws SAXException { if (m_firstTagNotEmitted) { flush(); } m_handler.processingInstruction(target, data); }
[ "public", "void", "processingInstruction", "(", "String", "target", ",", "String", "data", ")", "throws", "SAXException", "{", "if", "(", "m_firstTagNotEmitted", ")", "{", "flush", "(", ")", ";", "}", "m_handler", ".", "processingInstruction", "(", "target", "...
Pass the call on to the underlying handler @see org.xml.sax.ContentHandler#processingInstruction(String, String)
[ "Pass", "the", "call", "on", "to", "the", "underlying", "handler" ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/ToUnknownStream.java#L853-L862
cdk/cdk
base/standard/src/main/java/org/openscience/cdk/graph/invariant/CanonicalLabeler.java
CanonicalLabeler.primeProduct
private void primeProduct(List<InvPair> v, IAtomContainer atomContainer) { Iterator<InvPair> it = v.iterator(); Iterator<IAtom> n; InvPair inv; IAtom a; long summ; while (it.hasNext()) { inv = (InvPair) it.next(); List<IAtom> neighbour = atomContai...
java
private void primeProduct(List<InvPair> v, IAtomContainer atomContainer) { Iterator<InvPair> it = v.iterator(); Iterator<IAtom> n; InvPair inv; IAtom a; long summ; while (it.hasNext()) { inv = (InvPair) it.next(); List<IAtom> neighbour = atomContai...
[ "private", "void", "primeProduct", "(", "List", "<", "InvPair", ">", "v", ",", "IAtomContainer", "atomContainer", ")", "{", "Iterator", "<", "InvPair", ">", "it", "=", "v", ".", "iterator", "(", ")", ";", "Iterator", "<", "IAtom", ">", "n", ";", "InvPa...
Calculates the product of the neighbouring primes. @param v the invariance pair vector
[ "Calculates", "the", "product", "of", "the", "neighbouring", "primes", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/standard/src/main/java/org/openscience/cdk/graph/invariant/CanonicalLabeler.java#L146-L165
aws/aws-sdk-java
aws-java-sdk-ssm/src/main/java/com/amazonaws/services/simplesystemsmanagement/model/AutomationExecutionMetadata.java
AutomationExecutionMetadata.setTargetMaps
public void setTargetMaps(java.util.Collection<java.util.Map<String, java.util.List<String>>> targetMaps) { if (targetMaps == null) { this.targetMaps = null; return; } this.targetMaps = new com.amazonaws.internal.SdkInternalList<java.util.Map<String, java.util.List<Strin...
java
public void setTargetMaps(java.util.Collection<java.util.Map<String, java.util.List<String>>> targetMaps) { if (targetMaps == null) { this.targetMaps = null; return; } this.targetMaps = new com.amazonaws.internal.SdkInternalList<java.util.Map<String, java.util.List<Strin...
[ "public", "void", "setTargetMaps", "(", "java", ".", "util", ".", "Collection", "<", "java", ".", "util", ".", "Map", "<", "String", ",", "java", ".", "util", ".", "List", "<", "String", ">", ">", ">", "targetMaps", ")", "{", "if", "(", "targetMaps",...
<p> The specified key-value mapping of document parameters to target resources. </p> @param targetMaps The specified key-value mapping of document parameters to target resources.
[ "<p", ">", "The", "specified", "key", "-", "value", "mapping", "of", "document", "parameters", "to", "target", "resources", ".", "<", "/", "p", ">" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-ssm/src/main/java/com/amazonaws/services/simplesystemsmanagement/model/AutomationExecutionMetadata.java#L951-L958
Harium/keel
src/main/java/com/harium/keel/catalano/math/distance/Distance.java
Distance.Chebyshev
public static double Chebyshev(IntPoint p, IntPoint q) { return Chebyshev(p.x, p.y, q.x, q.y); }
java
public static double Chebyshev(IntPoint p, IntPoint q) { return Chebyshev(p.x, p.y, q.x, q.y); }
[ "public", "static", "double", "Chebyshev", "(", "IntPoint", "p", ",", "IntPoint", "q", ")", "{", "return", "Chebyshev", "(", "p", ".", "x", ",", "p", ".", "y", ",", "q", ".", "x", ",", "q", ".", "y", ")", ";", "}" ]
Gets the Chebyshev distance between two points. @param p IntPoint with X and Y axis coordinates. @param q IntPoint with X and Y axis coordinates. @return The Chebyshev distance between x and y.
[ "Gets", "the", "Chebyshev", "distance", "between", "two", "points", "." ]
train
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/math/distance/Distance.java#L210-L212
benmccann/xero-java-client
xjc-plugin/src/main/java/com/connectifier/xeroclient/jaxb/PluginImpl.java
PluginImpl.updateArrayOfGetters
private void updateArrayOfGetters(ClassOutline co, JCodeModel model) { JDefinedClass implClass = co.implClass; List<JMethod> removedMethods = new ArrayList<>(); Iterator<JMethod> iter = implClass.methods().iterator(); while (iter.hasNext()) { JMethod method = iter.next(); if (method.type()....
java
private void updateArrayOfGetters(ClassOutline co, JCodeModel model) { JDefinedClass implClass = co.implClass; List<JMethod> removedMethods = new ArrayList<>(); Iterator<JMethod> iter = implClass.methods().iterator(); while (iter.hasNext()) { JMethod method = iter.next(); if (method.type()....
[ "private", "void", "updateArrayOfGetters", "(", "ClassOutline", "co", ",", "JCodeModel", "model", ")", "{", "JDefinedClass", "implClass", "=", "co", ".", "implClass", ";", "List", "<", "JMethod", ">", "removedMethods", "=", "new", "ArrayList", "<>", "(", ")", ...
Update getters to use Java List. For example: ArrayOfInvoices getInvoices() -> List<Invoice> getInvoices()
[ "Update", "getters", "to", "use", "Java", "List", ".", "For", "example", ":", "ArrayOfInvoices", "getInvoices", "()", "-", ">", "List<Invoice", ">", "getInvoices", "()" ]
train
https://github.com/benmccann/xero-java-client/blob/1c84acf36929ea2a4a3ac5f2527a4e9252229f18/xjc-plugin/src/main/java/com/connectifier/xeroclient/jaxb/PluginImpl.java#L54-L86
saxsys/SynchronizeFX
synchronizefx-core/src/main/java/de/saxsys/synchronizefx/core/metamodel/ModelWalkingSynchronizer.java
ModelWalkingSynchronizer.doWhenModelWalkerFinished
public void doWhenModelWalkerFinished(final ActionType type, final Runnable action) { memberLock.lock(); if (!modelWalkingInProgess) { memberLock.unlock(); action.run(); return; } CountDownLatch latch = new CountDownLatch(1); Set<CountDownLatch...
java
public void doWhenModelWalkerFinished(final ActionType type, final Runnable action) { memberLock.lock(); if (!modelWalkingInProgess) { memberLock.unlock(); action.run(); return; } CountDownLatch latch = new CountDownLatch(1); Set<CountDownLatch...
[ "public", "void", "doWhenModelWalkerFinished", "(", "final", "ActionType", "type", ",", "final", "Runnable", "action", ")", "{", "memberLock", ".", "lock", "(", ")", ";", "if", "(", "!", "modelWalkingInProgess", ")", "{", "memberLock", ".", "unlock", "(", ")...
Lets the current thread sleep until a currently running model walking thread has finished. <p> If no model walking is currently in progress, nothing happens. </p> @param type The type of the action that waits for model walking to finish. @param action The action that should be performed.
[ "Lets", "the", "current", "thread", "sleep", "until", "a", "currently", "running", "model", "walking", "thread", "has", "finished", "." ]
train
https://github.com/saxsys/SynchronizeFX/blob/f3683020e4749110b38514eb5bc73a247998b579/synchronizefx-core/src/main/java/de/saxsys/synchronizefx/core/metamodel/ModelWalkingSynchronizer.java#L133-L153
alkacon/opencms-core
src/org/opencms/ui/actions/CmsUserInfoDialogAction.java
CmsUserInfoDialogAction.handleUpload
void handleUpload(List<String> uploadedFiles, I_CmsDialogContext context) { CmsObject cms = context.getCms(); boolean success = OpenCms.getWorkplaceAppManager().getUserIconHelper().handleImageUpload(cms, uploadedFiles); if (success) { context.reload(); } }
java
void handleUpload(List<String> uploadedFiles, I_CmsDialogContext context) { CmsObject cms = context.getCms(); boolean success = OpenCms.getWorkplaceAppManager().getUserIconHelper().handleImageUpload(cms, uploadedFiles); if (success) { context.reload(); } }
[ "void", "handleUpload", "(", "List", "<", "String", ">", "uploadedFiles", ",", "I_CmsDialogContext", "context", ")", "{", "CmsObject", "cms", "=", "context", ".", "getCms", "(", ")", ";", "boolean", "success", "=", "OpenCms", ".", "getWorkplaceAppManager", "("...
Handles the user image file upload.<p> @param uploadedFiles the uploaded file names @param context the dialog context
[ "Handles", "the", "user", "image", "file", "upload", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/actions/CmsUserInfoDialogAction.java#L149-L156
Alluxio/alluxio
core/common/src/main/java/alluxio/grpc/GrpcSerializationUtils.java
GrpcSerializationUtils.addBuffersToStream
public static boolean addBuffersToStream(ByteBuf[] buffers, OutputStream stream) { if (!sZeroCopySendSupported || !stream.getClass().equals(sBufferList.getDeclaringClass())) { return false; } try { if (sCurrent.get(stream) != null) { return false; } for (ByteBuf buffer : buff...
java
public static boolean addBuffersToStream(ByteBuf[] buffers, OutputStream stream) { if (!sZeroCopySendSupported || !stream.getClass().equals(sBufferList.getDeclaringClass())) { return false; } try { if (sCurrent.get(stream) != null) { return false; } for (ByteBuf buffer : buff...
[ "public", "static", "boolean", "addBuffersToStream", "(", "ByteBuf", "[", "]", "buffers", ",", "OutputStream", "stream", ")", "{", "if", "(", "!", "sZeroCopySendSupported", "||", "!", "stream", ".", "getClass", "(", ")", ".", "equals", "(", "sBufferList", "....
Add the given buffers directly to the gRPC output stream. @param buffers the buffers to be added @param stream the output stream @return whether the buffers are added successfully
[ "Add", "the", "given", "buffers", "directly", "to", "the", "gRPC", "output", "stream", "." ]
train
https://github.com/Alluxio/alluxio/blob/af38cf3ab44613355b18217a3a4d961f8fec3a10/core/common/src/main/java/alluxio/grpc/GrpcSerializationUtils.java#L180-L200
apiman/apiman
manager/api/beans/src/main/java/io/apiman/manager/api/beans/audit/data/EntityUpdatedData.java
EntityUpdatedData.addChange
public void addChange(String name, String before, String after) { addChange(new EntityFieldChange(name, before, after)); }
java
public void addChange(String name, String before, String after) { addChange(new EntityFieldChange(name, before, after)); }
[ "public", "void", "addChange", "(", "String", "name", ",", "String", "before", ",", "String", "after", ")", "{", "addChange", "(", "new", "EntityFieldChange", "(", "name", ",", "before", ",", "after", ")", ")", ";", "}" ]
Adds a single change. @param name the name @param before the before state @param after the after state
[ "Adds", "a", "single", "change", "." ]
train
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/manager/api/beans/src/main/java/io/apiman/manager/api/beans/audit/data/EntityUpdatedData.java#L46-L48
couchbase/couchbase-lite-java-core
src/main/java/com/couchbase/lite/Manager.java
Manager.openDatabase
@InterfaceAudience.Public public Database openDatabase(String name, DatabaseOptions options) throws CouchbaseLiteException { if (options == null) options = getDefaultOptions(name); Database db = getDatabase(name, !options.isCreate()); if (db != null && !db.isOpen()) {...
java
@InterfaceAudience.Public public Database openDatabase(String name, DatabaseOptions options) throws CouchbaseLiteException { if (options == null) options = getDefaultOptions(name); Database db = getDatabase(name, !options.isCreate()); if (db != null && !db.isOpen()) {...
[ "@", "InterfaceAudience", ".", "Public", "public", "Database", "openDatabase", "(", "String", "name", ",", "DatabaseOptions", "options", ")", "throws", "CouchbaseLiteException", "{", "if", "(", "options", "==", "null", ")", "options", "=", "getDefaultOptions", "("...
Returns the database with the given name. If the database is not yet open, the options given will be applied; if it's already open, the options are ignored. Multiple calls with the same name will return the same {@link Database} instance. @param name The name of the database. May NOT contain capital letters! @param opt...
[ "Returns", "the", "database", "with", "the", "given", "name", ".", "If", "the", "database", "is", "not", "yet", "open", "the", "options", "given", "will", "be", "applied", ";", "if", "it", "s", "already", "open", "the", "options", "are", "ignored", ".", ...
train
https://github.com/couchbase/couchbase-lite-java-core/blob/3b275642e2d2f231fd155ad9def9c5e9eff3118e/src/main/java/com/couchbase/lite/Manager.java#L334-L345
facebook/fresco
drawee/src/main/java/com/facebook/drawee/generic/RoundingParams.java
RoundingParams.setBorder
public RoundingParams setBorder(@ColorInt int color, float width) { Preconditions.checkArgument(width >= 0, "the border width cannot be < 0"); mBorderWidth = width; mBorderColor = color; return this; }
java
public RoundingParams setBorder(@ColorInt int color, float width) { Preconditions.checkArgument(width >= 0, "the border width cannot be < 0"); mBorderWidth = width; mBorderColor = color; return this; }
[ "public", "RoundingParams", "setBorder", "(", "@", "ColorInt", "int", "color", ",", "float", "width", ")", "{", "Preconditions", ".", "checkArgument", "(", "width", ">=", "0", ",", "\"the border width cannot be < 0\"", ")", ";", "mBorderWidth", "=", "width", ";"...
Sets the border around the rounded drawable @param color of the border @param width of the width
[ "Sets", "the", "border", "around", "the", "rounded", "drawable" ]
train
https://github.com/facebook/fresco/blob/0b85879d51c5036d5e46e627a6651afefc0b971a/drawee/src/main/java/com/facebook/drawee/generic/RoundingParams.java#L227-L232
Nexmo/nexmo-java
src/main/java/com/nexmo/client/numbers/NumbersClient.java
NumbersClient.cancelNumber
public void cancelNumber(String country, String msisdn) throws IOException, NexmoClientException { this.cancelNumber.execute(new CancelNumberRequest(country, msisdn)); }
java
public void cancelNumber(String country, String msisdn) throws IOException, NexmoClientException { this.cancelNumber.execute(new CancelNumberRequest(country, msisdn)); }
[ "public", "void", "cancelNumber", "(", "String", "country", ",", "String", "msisdn", ")", "throws", "IOException", ",", "NexmoClientException", "{", "this", ".", "cancelNumber", ".", "execute", "(", "new", "CancelNumberRequest", "(", "country", ",", "msisdn", ")...
Stop renting a Nexmo Virtual Number. @param country A String containing a 2-character ISO country code. @param msisdn The phone number to be cancelled. @throws IOException if an error occurs contacting the Nexmo API @throws NexmoClientException if an error is returned by the server.
[ "Stop", "renting", "a", "Nexmo", "Virtual", "Number", "." ]
train
https://github.com/Nexmo/nexmo-java/blob/7427eff6d6baa5a5bd9197fa096bcf2564191cf5/src/main/java/com/nexmo/client/numbers/NumbersClient.java#L112-L114
lightblueseas/swing-components
src/main/java/de/alpharogroup/swing/img/ImageExtensions.java
ImageExtensions.weaveInto
public static BufferedImage weaveInto(final BufferedImage bufferedImage, final String message) { final int width = bufferedImage.getWidth(); final int height = bufferedImage.getHeight(); if (message.length() > 255) { throw new IllegalArgumentException("Given message is to large(max 255 characters)"); } ...
java
public static BufferedImage weaveInto(final BufferedImage bufferedImage, final String message) { final int width = bufferedImage.getWidth(); final int height = bufferedImage.getHeight(); if (message.length() > 255) { throw new IllegalArgumentException("Given message is to large(max 255 characters)"); } ...
[ "public", "static", "BufferedImage", "weaveInto", "(", "final", "BufferedImage", "bufferedImage", ",", "final", "String", "message", ")", "{", "final", "int", "width", "=", "bufferedImage", ".", "getWidth", "(", ")", ";", "final", "int", "height", "=", "buffer...
Weave the given secret message into the given {@link BufferedImage}. @param bufferedImage the buffered image @param message the secret message @return the buffered image with the secret message weaved in.
[ "Weave", "the", "given", "secret", "message", "into", "the", "given", "{", "@link", "BufferedImage", "}", "." ]
train
https://github.com/lightblueseas/swing-components/blob/4045e85cabd8f0ce985cbfff134c3c9873930c79/src/main/java/de/alpharogroup/swing/img/ImageExtensions.java#L432-L489
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/X509CertImpl.java
X509CertImpl.readRFC1421Cert
private DerValue readRFC1421Cert(InputStream in) throws IOException { DerValue der = null; String line = null; BufferedReader certBufferedReader = new BufferedReader(new InputStreamReader(in, "ASCII")); try { line = certBufferedReader.readLine(); } catch (...
java
private DerValue readRFC1421Cert(InputStream in) throws IOException { DerValue der = null; String line = null; BufferedReader certBufferedReader = new BufferedReader(new InputStreamReader(in, "ASCII")); try { line = certBufferedReader.readLine(); } catch (...
[ "private", "DerValue", "readRFC1421Cert", "(", "InputStream", "in", ")", "throws", "IOException", "{", "DerValue", "der", "=", "null", ";", "String", "line", "=", "null", ";", "BufferedReader", "certBufferedReader", "=", "new", "BufferedReader", "(", "new", "Inp...
read input stream as HEX-encoded DER-encoded bytes @param in InputStream to read @returns DerValue corresponding to decoded HEX-encoded bytes @throws IOException if stream can not be interpreted as RFC1421 encoded bytes
[ "read", "input", "stream", "as", "HEX", "-", "encoded", "DER", "-", "encoded", "bytes" ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/X509CertImpl.java#L254-L287
lucee/Lucee
core/src/main/java/lucee/commons/lang/ParserString.java
ParserString.subCFMLString
public ParserString subCFMLString(int start, int count) { return new ParserString(String.valueOf(text, start, count)); /* * NICE die untermenge direkter ermiiteln, das problem hierbei sind die lines * * int endPos=start+count; int LineFrom=-1; int LineTo=-1; for(int i=0;i<lines.length;i++) { if() } * * re...
java
public ParserString subCFMLString(int start, int count) { return new ParserString(String.valueOf(text, start, count)); /* * NICE die untermenge direkter ermiiteln, das problem hierbei sind die lines * * int endPos=start+count; int LineFrom=-1; int LineTo=-1; for(int i=0;i<lines.length;i++) { if() } * * re...
[ "public", "ParserString", "subCFMLString", "(", "int", "start", ",", "int", "count", ")", "{", "return", "new", "ParserString", "(", "String", ".", "valueOf", "(", "text", ",", "start", ",", "count", ")", ")", ";", "/*\n\t * NICE die untermenge direkter ermiitel...
Gibt eine Untermenge des CFMLString als CFMLString zurueck, ausgehend von start mit einer maximalen Laenge count. @param start Von wo aus die Untermenge ausgegeben werden soll. @param count Wie lange die zurueckgegebene Zeichenkette maximal sein darf. @return Untermenge als CFMLString
[ "Gibt", "eine", "Untermenge", "des", "CFMLString", "als", "CFMLString", "zurueck", "ausgehend", "von", "start", "mit", "einer", "maximalen", "Laenge", "count", "." ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/commons/lang/ParserString.java#L765-L775
ttddyy/datasource-proxy
src/main/java/net/ttddyy/dsproxy/support/ProxyDataSourceBuilder.java
ProxyDataSourceBuilder.beforeQuery
public ProxyDataSourceBuilder beforeQuery(final SingleQueryExecution callback) { QueryExecutionListener listener = new NoOpQueryExecutionListener() { @Override public void beforeQuery(ExecutionInfo execInfo, List<QueryInfo> queryInfoList) { callback.execute(execInfo, quer...
java
public ProxyDataSourceBuilder beforeQuery(final SingleQueryExecution callback) { QueryExecutionListener listener = new NoOpQueryExecutionListener() { @Override public void beforeQuery(ExecutionInfo execInfo, List<QueryInfo> queryInfoList) { callback.execute(execInfo, quer...
[ "public", "ProxyDataSourceBuilder", "beforeQuery", "(", "final", "SingleQueryExecution", "callback", ")", "{", "QueryExecutionListener", "listener", "=", "new", "NoOpQueryExecutionListener", "(", ")", "{", "@", "Override", "public", "void", "beforeQuery", "(", "Executio...
Add {@link QueryExecutionListener} that performs given lambda on {@link QueryExecutionListener#beforeQuery(ExecutionInfo, List)}. @param callback a lambda function executed on {@link QueryExecutionListener#beforeQuery(ExecutionInfo, List)} @return builder @since 1.4.3
[ "Add", "{", "@link", "QueryExecutionListener", "}", "that", "performs", "given", "lambda", "on", "{", "@link", "QueryExecutionListener#beforeQuery", "(", "ExecutionInfo", "List", ")", "}", "." ]
train
https://github.com/ttddyy/datasource-proxy/blob/62163ccf9a569a99aa3ad9f9151a32567447a62e/src/main/java/net/ttddyy/dsproxy/support/ProxyDataSourceBuilder.java#L567-L576
erlang/otp
lib/jinterface/java_src/com/ericsson/otp/erlang/OtpNode.java
OtpNode.ping
public boolean ping(final String anode, final long timeout) { if (anode.equals(node)) { return true; } else if (anode.indexOf('@', 0) < 0 && anode.equals(node.substring(0, node.indexOf('@', 0)))) { return true; } // other node OtpMbox mbox...
java
public boolean ping(final String anode, final long timeout) { if (anode.equals(node)) { return true; } else if (anode.indexOf('@', 0) < 0 && anode.equals(node.substring(0, node.indexOf('@', 0)))) { return true; } // other node OtpMbox mbox...
[ "public", "boolean", "ping", "(", "final", "String", "anode", ",", "final", "long", "timeout", ")", "{", "if", "(", "anode", ".", "equals", "(", "node", ")", ")", "{", "return", "true", ";", "}", "else", "if", "(", "anode", ".", "indexOf", "(", "'"...
/* internal info about the message formats... the request: -> REG_SEND {6,#Pid<bingo@aule.1.0>,'',net_kernel} {'$gen_call',{#Pid<bingo@aule.1.0>,#Ref<bingo@aule.2>},{is_auth,bingo@aule}} the reply: <- SEND {2,'',#Pid<bingo@aule.1.0>} {#Ref<bingo@aule.2>,yes}
[ "/", "*", "internal", "info", "about", "the", "message", "formats", "..." ]
train
https://github.com/erlang/otp/blob/ac6084fd83240355f72e94adbf303e57832d1fab/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpNode.java#L446-L469
openengsb/openengsb
api/edb/src/main/java/org/openengsb/core/edb/api/EDBObject.java
EDBObject.putEDBObjectEntry
public void putEDBObjectEntry(String key, Object value) { putEDBObjectEntry(key, value, value.getClass()); }
java
public void putEDBObjectEntry(String key, Object value) { putEDBObjectEntry(key, value, value.getClass()); }
[ "public", "void", "putEDBObjectEntry", "(", "String", "key", ",", "Object", "value", ")", "{", "putEDBObjectEntry", "(", "key", ",", "value", ",", "value", ".", "getClass", "(", ")", ")", ";", "}" ]
Adds an EDBObjectEntry to this EDBObject. It uses the type of the given object value as type parameter
[ "Adds", "an", "EDBObjectEntry", "to", "this", "EDBObject", ".", "It", "uses", "the", "type", "of", "the", "given", "object", "value", "as", "type", "parameter" ]
train
https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/api/edb/src/main/java/org/openengsb/core/edb/api/EDBObject.java#L192-L194
HadoopGenomics/Hadoop-BAM
src/main/java/org/seqdoop/hadoop_bam/util/ConfHelper.java
ConfHelper.parseBoolean
public static boolean parseBoolean(String value, boolean defaultValue) { if (value == null) return defaultValue; value = value.trim(); // any of the following will final String[] acceptedTrue = new String[]{ "yes", "true", "t", "y", "1" }; final String[] acceptedFalse = new String[]{ "no", "false", "f"...
java
public static boolean parseBoolean(String value, boolean defaultValue) { if (value == null) return defaultValue; value = value.trim(); // any of the following will final String[] acceptedTrue = new String[]{ "yes", "true", "t", "y", "1" }; final String[] acceptedFalse = new String[]{ "no", "false", "f"...
[ "public", "static", "boolean", "parseBoolean", "(", "String", "value", ",", "boolean", "defaultValue", ")", "{", "if", "(", "value", "==", "null", ")", "return", "defaultValue", ";", "value", "=", "value", ".", "trim", "(", ")", ";", "// any of the following...
Convert a string to a boolean. Accepted values: "yes", "true", "t", "y", "1" "no", "false", "f", "n", "0" All comparisons are case insensitive. If the value provided is null, defaultValue is returned. @exception IllegalArgumentException Thrown if value is not null and doesn't match any of the accepted strings.
[ "Convert", "a", "string", "to", "a", "boolean", "." ]
train
https://github.com/HadoopGenomics/Hadoop-BAM/blob/9f974cf635a8d72f69604021cc3d5f3469d38d2f/src/main/java/org/seqdoop/hadoop_bam/util/ConfHelper.java#L41-L64
banq/jdonframework
JdonAccessory/jdon-struts1x/src/main/java/com/jdon/strutsutil/FormBeanUtil.java
FormBeanUtil.validateAction
public static boolean validateAction(String actionName, ActionMapping mapping) { boolean res = true; int result = actionTransfer(actionName); // 如果没有使用规定名称 if (result == 0) res = false; if (mapping.findForward(actionName) == null) // 如果配置文件没有该名称 res = false; return res; }
java
public static boolean validateAction(String actionName, ActionMapping mapping) { boolean res = true; int result = actionTransfer(actionName); // 如果没有使用规定名称 if (result == 0) res = false; if (mapping.findForward(actionName) == null) // 如果配置文件没有该名称 res = false; return res; }
[ "public", "static", "boolean", "validateAction", "(", "String", "actionName", ",", "ActionMapping", "mapping", ")", "{", "boolean", "res", "=", "true", ";", "int", "result", "=", "actionTransfer", "(", "actionName", ")", ";", "// 如果没有使用规定名称\r", "if", "(", "res...
根据struts-config.xml配置立即创建ActionForm @param actionMapping ActionMapping @param actionForm ActionForm @param request HttpServletRequest @param moduleConfig ModuleConfig @return ModelForm @throws Exception private static ModelForm createModelFormNow(ActionMapping actionMapping, ActionForm actionForm, HttpServletRequest r...
[ "根据struts", "-", "config", ".", "xml配置立即创建ActionForm" ]
train
https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/JdonAccessory/jdon-struts1x/src/main/java/com/jdon/strutsutil/FormBeanUtil.java#L201-L212
integration-technology/amazon-mws-orders
src/main/java/com/amazonservices/mws/client/MwsXmlReader.java
MwsXmlReader.parseElement
@SuppressWarnings("unchecked") private <T> T parseElement(Element element, Class<T> cls) { T value; if (element == null) { value = null; } else if (MwsObject.class.isAssignableFrom(cls)) { value = MwsUtl.newInstance(cls); Element holdElement = currentEleme...
java
@SuppressWarnings("unchecked") private <T> T parseElement(Element element, Class<T> cls) { T value; if (element == null) { value = null; } else if (MwsObject.class.isAssignableFrom(cls)) { value = MwsUtl.newInstance(cls); Element holdElement = currentEleme...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "private", "<", "T", ">", "T", "parseElement", "(", "Element", "element", ",", "Class", "<", "T", ">", "cls", ")", "{", "T", "value", ";", "if", "(", "element", "==", "null", ")", "{", "value", "=",...
Read an element into a new instance of a class. @param element The element, if null returns null. @param cls The class to create an instance of. @return The new instance.
[ "Read", "an", "element", "into", "a", "new", "instance", "of", "a", "class", "." ]
train
https://github.com/integration-technology/amazon-mws-orders/blob/042e8cd5b10588a30150222bf9c91faf4f130b3c/src/main/java/com/amazonservices/mws/client/MwsXmlReader.java#L110-L130
Stratio/stratio-cassandra
src/java/org/apache/cassandra/db/ArrayBackedSortedColumns.java
ArrayBackedSortedColumns.reconcileWith
private void reconcileWith(int i, Cell cell) { cells[i] = cell.reconcile(cells[i]); }
java
private void reconcileWith(int i, Cell cell) { cells[i] = cell.reconcile(cells[i]); }
[ "private", "void", "reconcileWith", "(", "int", "i", ",", "Cell", "cell", ")", "{", "cells", "[", "i", "]", "=", "cell", ".", "reconcile", "(", "cells", "[", "i", "]", ")", ";", "}" ]
Reconcile with a cell at position i. Assume that i is a valid position.
[ "Reconcile", "with", "a", "cell", "at", "position", "i", ".", "Assume", "that", "i", "is", "a", "valid", "position", "." ]
train
https://github.com/Stratio/stratio-cassandra/blob/f6416b43ad5309083349ad56266450fa8c6a2106/src/java/org/apache/cassandra/db/ArrayBackedSortedColumns.java#L401-L404
overturetool/overture
core/pog/src/main/java/org/overture/pog/obligation/TypeCompatibilityObligation.java
TypeCompatibilityObligation.newInstance
public static TypeCompatibilityObligation newInstance(PExp exp, PType etype, PType atype, IPOContextStack ctxt, IPogAssistantFactory assistantFactory) throws AnalysisException { TypeCompatibilityObligation sto = new TypeCompatibilityObligation(exp, etype, atype, ctxt, assistantFactory); if (sto.getValueTree...
java
public static TypeCompatibilityObligation newInstance(PExp exp, PType etype, PType atype, IPOContextStack ctxt, IPogAssistantFactory assistantFactory) throws AnalysisException { TypeCompatibilityObligation sto = new TypeCompatibilityObligation(exp, etype, atype, ctxt, assistantFactory); if (sto.getValueTree...
[ "public", "static", "TypeCompatibilityObligation", "newInstance", "(", "PExp", "exp", ",", "PType", "etype", ",", "PType", "atype", ",", "IPOContextStack", "ctxt", ",", "IPogAssistantFactory", "assistantFactory", ")", "throws", "AnalysisException", "{", "TypeCompatibili...
Factory Method since we need to return null STOs (which should be discarded @param exp The expression to be checked @param etype The expected type @param atype The actual type @param ctxt Context Information @param assistantFactory @return @throws AnalysisException
[ "Factory", "Method", "since", "we", "need", "to", "return", "null", "STOs", "(", "which", "should", "be", "discarded" ]
train
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/pog/src/main/java/org/overture/pog/obligation/TypeCompatibilityObligation.java#L111-L123
phax/ph-css
ph-css/src/main/java/com/helger/css/utils/CSSURLHelper.java
CSSURLHelper.getAsCSSURL
@Nonnull @Nonempty public static String getAsCSSURL (@Nonnull final String sURL, final boolean bForceQuoteURL) { ValueEnforcer.notNull (sURL, "URL"); final StringBuilder aSB = new StringBuilder (CCSSValue.PREFIX_URL_OPEN); final boolean bAreQuotesRequired = bForceQuoteURL || isCSSURLRequiringQuotes (...
java
@Nonnull @Nonempty public static String getAsCSSURL (@Nonnull final String sURL, final boolean bForceQuoteURL) { ValueEnforcer.notNull (sURL, "URL"); final StringBuilder aSB = new StringBuilder (CCSSValue.PREFIX_URL_OPEN); final boolean bAreQuotesRequired = bForceQuoteURL || isCSSURLRequiringQuotes (...
[ "@", "Nonnull", "@", "Nonempty", "public", "static", "String", "getAsCSSURL", "(", "@", "Nonnull", "final", "String", "sURL", ",", "final", "boolean", "bForceQuoteURL", ")", "{", "ValueEnforcer", ".", "notNull", "(", "sURL", ",", "\"URL\"", ")", ";", "final"...
Surround the passed URL with the CSS "url(...)". When the passed URL contains characters that require quoting, quotes are automatically added! @param sURL URL to be wrapped. May not be <code>null</code> but maybe empty. @param bForceQuoteURL if <code>true</code> single quotes are added around the URL @return <code>url...
[ "Surround", "the", "passed", "URL", "with", "the", "CSS", "url", "(", "...", ")", ".", "When", "the", "passed", "URL", "contains", "characters", "that", "require", "quoting", "quotes", "are", "automatically", "added!" ]
train
https://github.com/phax/ph-css/blob/c9da5bb4decc681de6e27ce31712aad4c00adafa/ph-css/src/main/java/com/helger/css/utils/CSSURLHelper.java#L191-L215
lessthanoptimal/ejml
main/ejml-ddense/src/org/ejml/dense/row/CommonOps_DDRM.java
CommonOps_DDRM.minCols
public static DMatrixRMaj minCols(DMatrixRMaj input , DMatrixRMaj output ) { if( output == null ) { output = new DMatrixRMaj(1,input.numCols); } else { output.reshape(1,input.numCols); } for( int cols = 0; cols < input.numCols; cols++ ) { double minimu...
java
public static DMatrixRMaj minCols(DMatrixRMaj input , DMatrixRMaj output ) { if( output == null ) { output = new DMatrixRMaj(1,input.numCols); } else { output.reshape(1,input.numCols); } for( int cols = 0; cols < input.numCols; cols++ ) { double minimu...
[ "public", "static", "DMatrixRMaj", "minCols", "(", "DMatrixRMaj", "input", ",", "DMatrixRMaj", "output", ")", "{", "if", "(", "output", "==", "null", ")", "{", "output", "=", "new", "DMatrixRMaj", "(", "1", ",", "input", ".", "numCols", ")", ";", "}", ...
<p> Finds the element with the minimum value along column in the input matrix and returns the results in a vector:<br> <br> b<sub>j</sub> = min(i=1:m ; a<sub>ij</sub>) </p> @param input Input matrix @param output Optional storage for output. Reshaped into a row vector. Modified. @return Vector containing the minimum o...
[ "<p", ">", "Finds", "the", "element", "with", "the", "minimum", "value", "along", "column", "in", "the", "input", "matrix", "and", "returns", "the", "results", "in", "a", "vector", ":", "<br", ">", "<br", ">", "b<sub", ">", "j<", "/", "sub", ">", "="...
train
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-ddense/src/org/ejml/dense/row/CommonOps_DDRM.java#L1991-L2011
alkacon/opencms-core
src/org/opencms/loader/CmsMacroFormatterLoader.java
CmsMacroFormatterLoader.ensureElementFormatter
private void ensureElementFormatter(CmsResource resource, HttpServletRequest req) { CmsJspStandardContextBean contextBean = CmsJspStandardContextBean.getInstance(req); CmsContainerElementBean element = contextBean.getElement(); if (!resource.getStructureId().equals(element.getFormatterId())) { ...
java
private void ensureElementFormatter(CmsResource resource, HttpServletRequest req) { CmsJspStandardContextBean contextBean = CmsJspStandardContextBean.getInstance(req); CmsContainerElementBean element = contextBean.getElement(); if (!resource.getStructureId().equals(element.getFormatterId())) { ...
[ "private", "void", "ensureElementFormatter", "(", "CmsResource", "resource", ",", "HttpServletRequest", "req", ")", "{", "CmsJspStandardContextBean", "contextBean", "=", "CmsJspStandardContextBean", ".", "getInstance", "(", "req", ")", ";", "CmsContainerElementBean", "ele...
Ensure the element formatter id is set in the element bean.<p> @param resource the formatter resource @param req the request
[ "Ensure", "the", "element", "formatter", "id", "is", "set", "in", "the", "element", "bean", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/loader/CmsMacroFormatterLoader.java#L247-L254
UrielCh/ovh-java-sdk
ovh-java-sdk-cloud/src/main/java/net/minidev/ovh/api/ApiOvhCloud.java
ApiOvhCloud.project_serviceName_ip_failover_GET
public ArrayList<OvhFailoverIp> project_serviceName_ip_failover_GET(String serviceName) throws IOException { String qPath = "/cloud/project/{serviceName}/ip/failover"; StringBuilder sb = path(qPath, serviceName); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, t13); }
java
public ArrayList<OvhFailoverIp> project_serviceName_ip_failover_GET(String serviceName) throws IOException { String qPath = "/cloud/project/{serviceName}/ip/failover"; StringBuilder sb = path(qPath, serviceName); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, t13); }
[ "public", "ArrayList", "<", "OvhFailoverIp", ">", "project_serviceName_ip_failover_GET", "(", "String", "serviceName", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/cloud/project/{serviceName}/ip/failover\"", ";", "StringBuilder", "sb", "=", "path", "(", ...
Get failover ips REST: GET /cloud/project/{serviceName}/ip/failover @param serviceName [required] Project id
[ "Get", "failover", "ips" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-cloud/src/main/java/net/minidev/ovh/api/ApiOvhCloud.java#L1322-L1327
stapler/stapler
core/src/main/java/org/kohsuke/stapler/export/TypeUtil.java
TypeUtil.getBaseClass
public static Type getBaseClass(Type type, Class baseType) { return baseClassFinder.visit(type,baseType); }
java
public static Type getBaseClass(Type type, Class baseType) { return baseClassFinder.visit(type,baseType); }
[ "public", "static", "Type", "getBaseClass", "(", "Type", "type", ",", "Class", "baseType", ")", "{", "return", "baseClassFinder", ".", "visit", "(", "type", ",", "baseType", ")", ";", "}" ]
Gets the parameterization of the given base type. <p> For example, given the following <pre>{@code interface Foo<T> extends List<List<T>> {} interface Bar extends Foo<String> {} }</pre> This method works like this: <pre>{@code getBaseClass( Bar, List ) = List<List<String> getBaseClass( Bar, Foo ) = Foo<String> getBas...
[ "Gets", "the", "parameterization", "of", "the", "given", "base", "type", "." ]
train
https://github.com/stapler/stapler/blob/11ad5af185e062fb46e01bf9fbed66f3ebf2a8f7/core/src/main/java/org/kohsuke/stapler/export/TypeUtil.java#L296-L298
mozilla/rhino
src/org/mozilla/javascript/ScriptRuntime.java
ScriptRuntime.getElemFunctionAndThis
@Deprecated public static Callable getElemFunctionAndThis(Object obj, Object elem, Context cx) { return getElemFunctionAndThis(obj, elem, cx, getTopCallScope(cx)); }
java
@Deprecated public static Callable getElemFunctionAndThis(Object obj, Object elem, Context cx) { return getElemFunctionAndThis(obj, elem, cx, getTopCallScope(cx)); }
[ "@", "Deprecated", "public", "static", "Callable", "getElemFunctionAndThis", "(", "Object", "obj", ",", "Object", "elem", ",", "Context", "cx", ")", "{", "return", "getElemFunctionAndThis", "(", "obj", ",", "elem", ",", "cx", ",", "getTopCallScope", "(", "cx",...
Prepare for calling obj[id](...): return function corresponding to obj[id] and make obj properly converted to Scriptable available as ScriptRuntime.lastStoredScriptable() for consumption as thisObj. The caller must call ScriptRuntime.lastStoredScriptable() immediately after calling this method. @deprecated Use {@link ...
[ "Prepare", "for", "calling", "obj", "[", "id", "]", "(", "...", ")", ":", "return", "function", "corresponding", "to", "obj", "[", "id", "]", "and", "make", "obj", "properly", "converted", "to", "Scriptable", "available", "as", "ScriptRuntime", ".", "lastS...
train
https://github.com/mozilla/rhino/blob/fa8a86df11d37623f5faa8d445a5876612bc47b0/src/org/mozilla/javascript/ScriptRuntime.java#L2480-L2486
xqbase/util
util-jdk17/src/main/java/com/xqbase/util/Conf.java
Conf.openLogger
public static Logger openLogger(String name, int limit, int count) { Logger logger = Logger.getAnonymousLogger(); logger.setLevel(Level.ALL); logger.setUseParentHandlers(false); if (DEBUG) { ConsoleHandler handler = new ConsoleHandler(); handler.setLevel(Level.ALL); logger.addHandler(handler); ...
java
public static Logger openLogger(String name, int limit, int count) { Logger logger = Logger.getAnonymousLogger(); logger.setLevel(Level.ALL); logger.setUseParentHandlers(false); if (DEBUG) { ConsoleHandler handler = new ConsoleHandler(); handler.setLevel(Level.ALL); logger.addHandler(handler); ...
[ "public", "static", "Logger", "openLogger", "(", "String", "name", ",", "int", "limit", ",", "int", "count", ")", "{", "Logger", "logger", "=", "Logger", ".", "getAnonymousLogger", "(", ")", ";", "logger", ".", "setLevel", "(", "Level", ".", "ALL", ")", ...
Open a {@link Logger} with output file under folder <b>log_dir</b> (if defined in Conf.properties) or <b>logs/</b> relative to the current folder @param name logging output file with the pattern "${name}%g.log" @param limit the maximum number of bytes to write to any one file count the number of files to use @param co...
[ "Open", "a", "{", "@link", "Logger", "}", "with", "output", "file", "under", "folder", "<b", ">", "log_dir<", "/", "b", ">", "(", "if", "defined", "in", "Conf", ".", "properties", ")", "or", "<b", ">", "logs", "/", "<", "/", "b", ">", "relative", ...
train
https://github.com/xqbase/util/blob/e7b9167b6c701b9eec988a9d1e68446cef5ef420/util-jdk17/src/main/java/com/xqbase/util/Conf.java#L136-L159
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/edit/ST_AddPoint.java
ST_AddPoint.addPoint
public static Geometry addPoint(Geometry geometry, Point point) throws SQLException { return addPoint(geometry, point, PRECISION); }
java
public static Geometry addPoint(Geometry geometry, Point point) throws SQLException { return addPoint(geometry, point, PRECISION); }
[ "public", "static", "Geometry", "addPoint", "(", "Geometry", "geometry", ",", "Point", "point", ")", "throws", "SQLException", "{", "return", "addPoint", "(", "geometry", ",", "point", ",", "PRECISION", ")", ";", "}" ]
Returns a new geometry based on an existing one, with a specific point as a new vertex. A default distance 10E-6 is used to snap the input point. @param geometry @param point @return @throws SQLException
[ "Returns", "a", "new", "geometry", "based", "on", "an", "existing", "one", "with", "a", "specific", "point", "as", "a", "new", "vertex", ".", "A", "default", "distance", "10E", "-", "6", "is", "used", "to", "snap", "the", "input", "point", "." ]
train
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/edit/ST_AddPoint.java#L60-L62
Azure/azure-sdk-for-java
network/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/network/v2018_07_01/implementation/PublicIPAddressesInner.java
PublicIPAddressesInner.getVirtualMachineScaleSetPublicIPAddressAsync
public Observable<PublicIPAddressInner> getVirtualMachineScaleSetPublicIPAddressAsync(String resourceGroupName, String virtualMachineScaleSetName, String virtualmachineIndex, String networkInterfaceName, String ipConfigurationName, String publicIpAddressName) { return getVirtualMachineScaleSetPublicIPAddressWit...
java
public Observable<PublicIPAddressInner> getVirtualMachineScaleSetPublicIPAddressAsync(String resourceGroupName, String virtualMachineScaleSetName, String virtualmachineIndex, String networkInterfaceName, String ipConfigurationName, String publicIpAddressName) { return getVirtualMachineScaleSetPublicIPAddressWit...
[ "public", "Observable", "<", "PublicIPAddressInner", ">", "getVirtualMachineScaleSetPublicIPAddressAsync", "(", "String", "resourceGroupName", ",", "String", "virtualMachineScaleSetName", ",", "String", "virtualmachineIndex", ",", "String", "networkInterfaceName", ",", "String"...
Get the specified public IP address in a virtual machine scale set. @param resourceGroupName The name of the resource group. @param virtualMachineScaleSetName The name of the virtual machine scale set. @param virtualmachineIndex The virtual machine index. @param networkInterfaceName The name of the network interface. ...
[ "Get", "the", "specified", "public", "IP", "address", "in", "a", "virtual", "machine", "scale", "set", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/network/v2018_07_01/implementation/PublicIPAddressesInner.java#L1466-L1473
code4everything/util
src/main/java/com/zhazhapan/util/dialog/Alerts.java
Alerts.showInformation
public static Optional<ButtonType> showInformation(String title, String content) { return showInformation(title, null, content); }
java
public static Optional<ButtonType> showInformation(String title, String content) { return showInformation(title, null, content); }
[ "public", "static", "Optional", "<", "ButtonType", ">", "showInformation", "(", "String", "title", ",", "String", "content", ")", "{", "return", "showInformation", "(", "title", ",", "null", ",", "content", ")", ";", "}" ]
弹出信息框 @param title 标题 @param content 内容 @return {@link ButtonType}
[ "弹出信息框" ]
train
https://github.com/code4everything/util/blob/1fc9f0ead1108f4d7208ba7c000df4244f708418/src/main/java/com/zhazhapan/util/dialog/Alerts.java#L32-L34
Azure/azure-sdk-for-java
network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/implementation/ApplicationSecurityGroupsInner.java
ApplicationSecurityGroupsInner.getByResourceGroupAsync
public Observable<ApplicationSecurityGroupInner> getByResourceGroupAsync(String resourceGroupName, String applicationSecurityGroupName) { return getByResourceGroupWithServiceResponseAsync(resourceGroupName, applicationSecurityGroupName).map(new Func1<ServiceResponse<ApplicationSecurityGroupInner>, ApplicationSe...
java
public Observable<ApplicationSecurityGroupInner> getByResourceGroupAsync(String resourceGroupName, String applicationSecurityGroupName) { return getByResourceGroupWithServiceResponseAsync(resourceGroupName, applicationSecurityGroupName).map(new Func1<ServiceResponse<ApplicationSecurityGroupInner>, ApplicationSe...
[ "public", "Observable", "<", "ApplicationSecurityGroupInner", ">", "getByResourceGroupAsync", "(", "String", "resourceGroupName", ",", "String", "applicationSecurityGroupName", ")", "{", "return", "getByResourceGroupWithServiceResponseAsync", "(", "resourceGroupName", ",", "app...
Gets information about the specified application security group. @param resourceGroupName The name of the resource group. @param applicationSecurityGroupName The name of the application security group. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the ApplicationSe...
[ "Gets", "information", "about", "the", "specified", "application", "security", "group", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/implementation/ApplicationSecurityGroupsInner.java#L291-L298
eclipse/xtext-extras
org.eclipse.xtext.xbase/src-gen/org/eclipse/xtext/xbase/serializer/AbstractXbaseSemanticSequencer.java
AbstractXbaseSemanticSequencer.sequence_XNumberLiteral
protected void sequence_XNumberLiteral(ISerializationContext context, XNumberLiteral semanticObject) { if (errorAcceptor != null) { if (transientValues.isValueTransient(semanticObject, XbasePackage.Literals.XNUMBER_LITERAL__VALUE) == ValueTransient.YES) errorAcceptor.accept(diagnosticProvider.createFeatureValu...
java
protected void sequence_XNumberLiteral(ISerializationContext context, XNumberLiteral semanticObject) { if (errorAcceptor != null) { if (transientValues.isValueTransient(semanticObject, XbasePackage.Literals.XNUMBER_LITERAL__VALUE) == ValueTransient.YES) errorAcceptor.accept(diagnosticProvider.createFeatureValu...
[ "protected", "void", "sequence_XNumberLiteral", "(", "ISerializationContext", "context", ",", "XNumberLiteral", "semanticObject", ")", "{", "if", "(", "errorAcceptor", "!=", "null", ")", "{", "if", "(", "transientValues", ".", "isValueTransient", "(", "semanticObject"...
Contexts: XExpression returns XNumberLiteral XAssignment returns XNumberLiteral XAssignment.XBinaryOperation_1_1_0_0_0 returns XNumberLiteral XOrExpression returns XNumberLiteral XOrExpression.XBinaryOperation_1_0_0_0 returns XNumberLiteral XAndExpression returns XNumberLiteral XAndExpression.XBinaryOperation_1_0_0_0 r...
[ "Contexts", ":", "XExpression", "returns", "XNumberLiteral", "XAssignment", "returns", "XNumberLiteral", "XAssignment", ".", "XBinaryOperation_1_1_0_0_0", "returns", "XNumberLiteral", "XOrExpression", "returns", "XNumberLiteral", "XOrExpression", ".", "XBinaryOperation_1_0_0_0", ...
train
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/src-gen/org/eclipse/xtext/xbase/serializer/AbstractXbaseSemanticSequencer.java#L1200-L1208
Impetus/Kundera
src/kundera-couchdb/src/main/java/com/impetus/client/couchdb/CouchDBSchemaManager.java
CouchDBSchemaManager.createViewForSelectSpecificFields
private void createViewForSelectSpecificFields(Map<String, MapReduce> views) { if (views.get(CouchDBConstants.FIELDS) == null) { MapReduce mapr = new MapReduce(); mapr.setMap("function(doc){for(field in doc){emit(field, doc[field]);}}"); views.put(CouchDBConstants...
java
private void createViewForSelectSpecificFields(Map<String, MapReduce> views) { if (views.get(CouchDBConstants.FIELDS) == null) { MapReduce mapr = new MapReduce(); mapr.setMap("function(doc){for(field in doc){emit(field, doc[field]);}}"); views.put(CouchDBConstants...
[ "private", "void", "createViewForSelectSpecificFields", "(", "Map", "<", "String", ",", "MapReduce", ">", "views", ")", "{", "if", "(", "views", ".", "get", "(", "CouchDBConstants", ".", "FIELDS", ")", "==", "null", ")", "{", "MapReduce", "mapr", "=", "new...
Creates the view for select specific fields. @param views the views
[ "Creates", "the", "view", "for", "select", "specific", "fields", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/kundera-couchdb/src/main/java/com/impetus/client/couchdb/CouchDBSchemaManager.java#L490-L498
prestodb/presto
presto-spi/src/main/java/com/facebook/presto/spi/predicate/SortedRangeSet.java
SortedRangeSet.of
static SortedRangeSet of(Range first, Range... rest) { List<Range> rangeList = new ArrayList<>(rest.length + 1); rangeList.add(first); for (Range range : rest) { rangeList.add(range); } return copyOf(first.getType(), rangeList); }
java
static SortedRangeSet of(Range first, Range... rest) { List<Range> rangeList = new ArrayList<>(rest.length + 1); rangeList.add(first); for (Range range : rest) { rangeList.add(range); } return copyOf(first.getType(), rangeList); }
[ "static", "SortedRangeSet", "of", "(", "Range", "first", ",", "Range", "...", "rest", ")", "{", "List", "<", "Range", ">", "rangeList", "=", "new", "ArrayList", "<>", "(", "rest", ".", "length", "+", "1", ")", ";", "rangeList", ".", "add", "(", "firs...
Provided Ranges are unioned together to form the SortedRangeSet
[ "Provided", "Ranges", "are", "unioned", "together", "to", "form", "the", "SortedRangeSet" ]
train
https://github.com/prestodb/presto/blob/89de5e379d8f85e139d292b0add8c537a2a01a88/presto-spi/src/main/java/com/facebook/presto/spi/predicate/SortedRangeSet.java#L87-L95
tvesalainen/lpg
src/main/java/org/vesalainen/regex/Regex.java
Regex.isMatch
public boolean isMatch(PushbackReader input, int size) throws IOException { InputReader reader = Input.getInstance(input, size); return isMatch(reader); }
java
public boolean isMatch(PushbackReader input, int size) throws IOException { InputReader reader = Input.getInstance(input, size); return isMatch(reader); }
[ "public", "boolean", "isMatch", "(", "PushbackReader", "input", ",", "int", "size", ")", "throws", "IOException", "{", "InputReader", "reader", "=", "Input", ".", "getInstance", "(", "input", ",", "size", ")", ";", "return", "isMatch", "(", "reader", ")", ...
Return true if input matches the regex @param input @param size @return @throws IOException
[ "Return", "true", "if", "input", "matches", "the", "regex" ]
train
https://github.com/tvesalainen/lpg/blob/0917b8d295e9772b9f8a0affc258a08530cd567a/src/main/java/org/vesalainen/regex/Regex.java#L307-L311
jglobus/JGlobus
ssl-proxies/src/main/java/org/globus/common/CoGProperties.java
CoGProperties.getReverseDNSCacheType
public String getReverseDNSCacheType() { String value = System.getProperty(REVERSE_DNS_CACHETYPE); if (value != null) { return value; } return getProperty(REVERSE_DNS_CACHETYPE, THREADED_CACHE); }
java
public String getReverseDNSCacheType() { String value = System.getProperty(REVERSE_DNS_CACHETYPE); if (value != null) { return value; } return getProperty(REVERSE_DNS_CACHETYPE, THREADED_CACHE); }
[ "public", "String", "getReverseDNSCacheType", "(", ")", "{", "String", "value", "=", "System", ".", "getProperty", "(", "REVERSE_DNS_CACHETYPE", ")", ";", "if", "(", "value", "!=", "null", ")", "{", "return", "value", ";", "}", "return", "getProperty", "(", ...
Returns the reverse DNS cache type. Defaults to a threaded chache. @return the type of cache for reverse DNS requests
[ "Returns", "the", "reverse", "DNS", "cache", "type", ".", "Defaults", "to", "a", "threaded", "chache", "." ]
train
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/ssl-proxies/src/main/java/org/globus/common/CoGProperties.java#L645-L651
CenturyLinkCloud/clc-java-sdk
sdk/src/main/java/com/centurylink/cloud/sdk/server/services/dsl/InvoiceService.java
InvoiceService.getInvoice
public InvoiceData getInvoice(int year, int month, String pricingAccountAlias) { return client.getInvoice(year, month, pricingAccountAlias); }
java
public InvoiceData getInvoice(int year, int month, String pricingAccountAlias) { return client.getInvoice(year, month, pricingAccountAlias); }
[ "public", "InvoiceData", "getInvoice", "(", "int", "year", ",", "int", "month", ",", "String", "pricingAccountAlias", ")", "{", "return", "client", ".", "getInvoice", "(", "year", ",", "month", ",", "pricingAccountAlias", ")", ";", "}" ]
Gets a list of invoicing data for a given account alias for a given month. @param year Year of usage @param month Monthly period of usage @param pricingAccountAlias Short code of the account that sends the invoice for the accountAlias @return the invoice data
[ "Gets", "a", "list", "of", "invoicing", "data", "for", "a", "given", "account", "alias", "for", "a", "given", "month", "." ]
train
https://github.com/CenturyLinkCloud/clc-java-sdk/blob/c026322f077dea71b1acf9f2d665253d79d9bf85/sdk/src/main/java/com/centurylink/cloud/sdk/server/services/dsl/InvoiceService.java#L43-L45
coveo/fmt-maven-plugin
src/main/java/com/coveo/Check.java
Check.onNonComplyingFile
@Override protected void onNonComplyingFile(final File file, final String formatted) throws IOException { filesNotFormatted.add(file.getAbsolutePath()); }
java
@Override protected void onNonComplyingFile(final File file, final String formatted) throws IOException { filesNotFormatted.add(file.getAbsolutePath()); }
[ "@", "Override", "protected", "void", "onNonComplyingFile", "(", "final", "File", "file", ",", "final", "String", "formatted", ")", "throws", "IOException", "{", "filesNotFormatted", ".", "add", "(", "file", ".", "getAbsolutePath", "(", ")", ")", ";", "}" ]
Hook called when the processd file is not compliant with the formatter. @param file the file that is not compliant @param formatted the corresponding formatted of the file.
[ "Hook", "called", "when", "the", "processd", "file", "is", "not", "compliant", "with", "the", "formatter", "." ]
train
https://github.com/coveo/fmt-maven-plugin/blob/9368be6985ecc2126c875ff4aabe647c7e57ecca/src/main/java/com/coveo/Check.java#L73-L76
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/Grego.java
Grego.fieldsToDay
public static long fieldsToDay(int year, int month, int dom) { int y = year - 1; long julian = 365 * y + floorDivide(y, 4) + (JULIAN_1_CE - 3) + // Julian cal floorDivide(y, 400) - floorDivide(y, 100) + 2 + // => Gregorian cal DAYS_BEFORE[month + (isLeapYear(year...
java
public static long fieldsToDay(int year, int month, int dom) { int y = year - 1; long julian = 365 * y + floorDivide(y, 4) + (JULIAN_1_CE - 3) + // Julian cal floorDivide(y, 400) - floorDivide(y, 100) + 2 + // => Gregorian cal DAYS_BEFORE[month + (isLeapYear(year...
[ "public", "static", "long", "fieldsToDay", "(", "int", "year", ",", "int", "month", ",", "int", "dom", ")", "{", "int", "y", "=", "year", "-", "1", ";", "long", "julian", "=", "365", "*", "y", "+", "floorDivide", "(", "y", ",", "4", ")", "+", "...
Convert a year, month, and day-of-month, given in the proleptic Gregorian calendar, to 1970 epoch days. @param year Gregorian year, with 0 == 1 BCE, -1 == 2 BCE, etc. @param month 0-based month, with 0==Jan @param dom 1-based day of month @return the day number, with day 0 == Jan 1 1970
[ "Convert", "a", "year", "month", "and", "day", "-", "of", "-", "month", "given", "in", "the", "proleptic", "Gregorian", "calendar", "to", "1970", "epoch", "days", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/Grego.java#L97-L104
LearnLib/learnlib
oracles/filters/reuse/src/main/java/de/learnlib/filter/reuse/tree/ReuseNode.java
ReuseNode.addEdge
public void addEdge(int index, ReuseEdge<S, I, O> edge) { this.edges[index] = edge; }
java
public void addEdge(int index, ReuseEdge<S, I, O> edge) { this.edges[index] = edge; }
[ "public", "void", "addEdge", "(", "int", "index", ",", "ReuseEdge", "<", "S", ",", "I", ",", "O", ">", "edge", ")", "{", "this", ".", "edges", "[", "index", "]", "=", "edge", ";", "}" ]
Adds an outgoing {@link ReuseEdge} to this {@link ReuseNode}.
[ "Adds", "an", "outgoing", "{" ]
train
https://github.com/LearnLib/learnlib/blob/fa38a14adcc0664099f180d671ffa42480318d7b/oracles/filters/reuse/src/main/java/de/learnlib/filter/reuse/tree/ReuseNode.java#L95-L97
apache/groovy
src/main/groovy/groovy/util/GroovyScriptEngine.java
GroovyScriptEngine.createScript
public Script createScript(String scriptName, Binding binding) throws ResourceException, ScriptException { return InvokerHelper.createScript(loadScriptByName(scriptName), binding); }
java
public Script createScript(String scriptName, Binding binding) throws ResourceException, ScriptException { return InvokerHelper.createScript(loadScriptByName(scriptName), binding); }
[ "public", "Script", "createScript", "(", "String", "scriptName", ",", "Binding", "binding", ")", "throws", "ResourceException", ",", "ScriptException", "{", "return", "InvokerHelper", ".", "createScript", "(", "loadScriptByName", "(", "scriptName", ")", ",", "bindin...
Creates a Script with a given scriptName and binding. @param scriptName name of the script to run @param binding the binding to pass to the script @return the script object @throws ResourceException if there is a problem accessing the script @throws ScriptException if there is a problem parsing the script
[ "Creates", "a", "Script", "with", "a", "given", "scriptName", "and", "binding", "." ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/groovy/groovy/util/GroovyScriptEngine.java#L590-L592
geomajas/geomajas-project-client-gwt2
common-gwt/common-gwt/src/main/java/org/geomajas/gwt/client/util/Dom.java
Dom.createElementNS
public static Element createElementNS(String ns, String tag) { return IMPL.createElementNS(ns, tag); }
java
public static Element createElementNS(String ns, String tag) { return IMPL.createElementNS(ns, tag); }
[ "public", "static", "Element", "createElementNS", "(", "String", "ns", ",", "String", "tag", ")", "{", "return", "IMPL", ".", "createElementNS", "(", "ns", ",", "tag", ")", ";", "}" ]
<p> Creates a new DOM element in the given name-space. If the name-space is HTML, a normal element will be created. </p> <p> There is an exception when using Internet Explorer! For Internet Explorer a new element will be created of type "namespace:tag". </p> @param ns The name-space to be used in the element creation...
[ "<p", ">", "Creates", "a", "new", "DOM", "element", "in", "the", "given", "name", "-", "space", ".", "If", "the", "name", "-", "space", "is", "HTML", "a", "normal", "element", "will", "be", "created", ".", "<", "/", "p", ">", "<p", ">", "There", ...
train
https://github.com/geomajas/geomajas-project-client-gwt2/blob/bd8d7904e861fa80522eed7b83c4ea99844180c7/common-gwt/common-gwt/src/main/java/org/geomajas/gwt/client/util/Dom.java#L116-L118
apache/incubator-atlas
webapp/src/main/java/org/apache/atlas/web/filters/AtlasKnoxSSOAuthenticationFilter.java
AtlasKnoxSSOAuthenticationFilter.parseRSAPublicKey
public static RSAPublicKey parseRSAPublicKey(String pem) throws CertificateException, UnsupportedEncodingException, ServletException { String PEM_HEADER = "-----BEGIN CERTIFICATE-----\n"; String PEM_FOOTER = "\n-----END CERTIFICATE-----"; String fullPem = PEM_HEADER + pem...
java
public static RSAPublicKey parseRSAPublicKey(String pem) throws CertificateException, UnsupportedEncodingException, ServletException { String PEM_HEADER = "-----BEGIN CERTIFICATE-----\n"; String PEM_FOOTER = "\n-----END CERTIFICATE-----"; String fullPem = PEM_HEADER + pem...
[ "public", "static", "RSAPublicKey", "parseRSAPublicKey", "(", "String", "pem", ")", "throws", "CertificateException", ",", "UnsupportedEncodingException", ",", "ServletException", "{", "String", "PEM_HEADER", "=", "\"-----BEGIN CERTIFICATE-----\\n\"", ";", "String", "PEM_FO...
/* public static RSAPublicKey getPublicKeyFromFile(String filePath) throws IOException, CertificateException { FileUtils.readFileToString(new File(filePath)); getPublicKeyFromString(pemString); }
[ "/", "*", "public", "static", "RSAPublicKey", "getPublicKeyFromFile", "(", "String", "filePath", ")", "throws", "IOException", "CertificateException", "{", "FileUtils", ".", "readFileToString", "(", "new", "File", "(", "filePath", "))", ";", "getPublicKeyFromString", ...
train
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/webapp/src/main/java/org/apache/atlas/web/filters/AtlasKnoxSSOAuthenticationFilter.java#L450-L474
mapbox/mapbox-navigation-android
libandroid-navigation-ui/src/main/java/com/mapbox/services/android/navigation/ui/v5/instruction/AbbreviationCreator.java
AbbreviationCreator.addPriorityInfo
private void addPriorityInfo(BannerComponents bannerComponents, int index) { Integer abbreviationPriority = bannerComponents.abbreviationPriority(); if (abbreviations.get(abbreviationPriority) == null) { abbreviations.put(abbreviationPriority, new ArrayList<Integer>()); } abbreviations.get(abbrevi...
java
private void addPriorityInfo(BannerComponents bannerComponents, int index) { Integer abbreviationPriority = bannerComponents.abbreviationPriority(); if (abbreviations.get(abbreviationPriority) == null) { abbreviations.put(abbreviationPriority, new ArrayList<Integer>()); } abbreviations.get(abbrevi...
[ "private", "void", "addPriorityInfo", "(", "BannerComponents", "bannerComponents", ",", "int", "index", ")", "{", "Integer", "abbreviationPriority", "=", "bannerComponents", ".", "abbreviationPriority", "(", ")", ";", "if", "(", "abbreviations", ".", "get", "(", "...
Adds the given BannerComponents object to the list of abbreviations so that when the list of BannerComponentNodes is completed, text can be abbreviated properly to fit the specified TextView. @param bannerComponents object holding the abbreviation information @param index in the list of BannerComponentNodes
[ "Adds", "the", "given", "BannerComponents", "object", "to", "the", "list", "of", "abbreviations", "so", "that", "when", "the", "list", "of", "BannerComponentNodes", "is", "completed", "text", "can", "be", "abbreviated", "properly", "to", "fit", "the", "specified...
train
https://github.com/mapbox/mapbox-navigation-android/blob/375a89c017d360b9defc2c90d0c03468165162ec/libandroid-navigation-ui/src/main/java/com/mapbox/services/android/navigation/ui/v5/instruction/AbbreviationCreator.java#L47-L53
lessthanoptimal/ejml
main/ejml-core/src/org/ejml/ops/MatrixIO.java
MatrixIO.loadCSV
public static <T extends DMatrix>T loadCSV(String fileName , boolean doublePrecision ) throws IOException { FileInputStream fileStream = new FileInputStream(fileName); ReadMatrixCsv csv = new ReadMatrixCsv(fileStream); T ret; if( doublePrecision ) ret = csv.read6...
java
public static <T extends DMatrix>T loadCSV(String fileName , boolean doublePrecision ) throws IOException { FileInputStream fileStream = new FileInputStream(fileName); ReadMatrixCsv csv = new ReadMatrixCsv(fileStream); T ret; if( doublePrecision ) ret = csv.read6...
[ "public", "static", "<", "T", "extends", "DMatrix", ">", "T", "loadCSV", "(", "String", "fileName", ",", "boolean", "doublePrecision", ")", "throws", "IOException", "{", "FileInputStream", "fileStream", "=", "new", "FileInputStream", "(", "fileName", ")", ";", ...
Reads a matrix in which has been encoded using a Column Space Value (CSV) file format. The number of rows and columns are read in on the first line. Then each row is read in the subsequent lines. Works with dense and sparse matrices. @param fileName The file being loaded. @return DMatrix @throws IOException
[ "Reads", "a", "matrix", "in", "which", "has", "been", "encoded", "using", "a", "Column", "Space", "Value", "(", "CSV", ")", "file", "format", ".", "The", "number", "of", "rows", "and", "columns", "are", "read", "in", "on", "the", "first", "line", ".", ...
train
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-core/src/org/ejml/ops/MatrixIO.java#L178-L193
raydac/java-comment-preprocessor
jcp/src/main/java/com/igormaznitsa/meta/common/utils/Assertions.java
Assertions.assertIsValid
@Nullable public static <T> T assertIsValid(@Nullable T obj, @Nonnull Validator<T> validator) { if (assertNotNull(validator).isValid(obj)) { return obj; } else { final InvalidObjectError error = new InvalidObjectError("Detected invalid object", obj); MetaErrorListeners.fireError("Invalid obj...
java
@Nullable public static <T> T assertIsValid(@Nullable T obj, @Nonnull Validator<T> validator) { if (assertNotNull(validator).isValid(obj)) { return obj; } else { final InvalidObjectError error = new InvalidObjectError("Detected invalid object", obj); MetaErrorListeners.fireError("Invalid obj...
[ "@", "Nullable", "public", "static", "<", "T", ">", "T", "assertIsValid", "(", "@", "Nullable", "T", "obj", ",", "@", "Nonnull", "Validator", "<", "T", ">", "validator", ")", "{", "if", "(", "assertNotNull", "(", "validator", ")", ".", "isValid", "(", ...
Check an object by a validator. @param <T> object type @param obj object to be checked @param validator validator for the operation @return the object if it is valid @throws InvalidObjectError will be thrown if the object is invalid @since 1.0.2
[ "Check", "an", "object", "by", "a", "validator", "." ]
train
https://github.com/raydac/java-comment-preprocessor/blob/83ac87b575ac084914d77695a8c8673de3b8300c/jcp/src/main/java/com/igormaznitsa/meta/common/utils/Assertions.java#L291-L300
OpenLiberty/open-liberty
dev/com.ibm.ws.security.javaeesec/src/com/ibm/ws/security/javaeesec/identitystore/ELHelper.java
ELHelper.evaluateElExpression
@Trivial protected Object evaluateElExpression(String expression, boolean mask) { final String methodName = "evaluateElExpression"; if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) { Tr.entry(tc, methodName, new Object[] { (expression == null) ? null : mask ? OBFUSCATED_S...
java
@Trivial protected Object evaluateElExpression(String expression, boolean mask) { final String methodName = "evaluateElExpression"; if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) { Tr.entry(tc, methodName, new Object[] { (expression == null) ? null : mask ? OBFUSCATED_S...
[ "@", "Trivial", "protected", "Object", "evaluateElExpression", "(", "String", "expression", ",", "boolean", "mask", ")", "{", "final", "String", "methodName", "=", "\"evaluateElExpression\"", ";", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", ...
Evaluate a possible EL expression. @param expression The expression to evaluate. @param mask Set whether to mask the expression and result. Useful for when passwords might be contained in either the expression or the result. @return The evaluated expression.
[ "Evaluate", "a", "possible", "EL", "expression", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.javaeesec/src/com/ibm/ws/security/javaeesec/identitystore/ELHelper.java#L60-L74
lessthanoptimal/BoofCV
main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/qrcode/QrCodeDecoderImage.java
QrCodeDecoderImage.process
public void process(FastQueue<PositionPatternNode> pps , T gray ) { gridReader.setImage(gray); storageQR.reset(); successes.clear(); failures.clear(); for (int i = 0; i < pps.size; i++) { PositionPatternNode ppn = pps.get(i); for (int j = 3,k=0; k < 4; j=k,k++) { if( ppn.edges[j] != null && ppn.ed...
java
public void process(FastQueue<PositionPatternNode> pps , T gray ) { gridReader.setImage(gray); storageQR.reset(); successes.clear(); failures.clear(); for (int i = 0; i < pps.size; i++) { PositionPatternNode ppn = pps.get(i); for (int j = 3,k=0; k < 4; j=k,k++) { if( ppn.edges[j] != null && ppn.ed...
[ "public", "void", "process", "(", "FastQueue", "<", "PositionPatternNode", ">", "pps", ",", "T", "gray", ")", "{", "gridReader", ".", "setImage", "(", "gray", ")", ";", "storageQR", ".", "reset", "(", ")", ";", "successes", ".", "clear", "(", ")", ";",...
Detects QR Codes inside image using position pattern graph @param pps position pattern graph @param gray Gray input image
[ "Detects", "QR", "Codes", "inside", "image", "using", "position", "pattern", "graph" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/qrcode/QrCodeDecoderImage.java#L75-L102
BioPAX/Paxtools
paxtools-core/src/main/java/org/biopax/paxtools/converter/LevelUpgrader.java
LevelUpgrader.convertAndAddVocabulary
private ControlledVocabulary convertAndAddVocabulary(openControlledVocabulary value, Level2Element parent, Model newModel, PropertyEditor newEditor) { String id = ((BioPAXElement) value).getUri(); if (!newModel.containsID(id)) { if (newEditor != null) { newModel.addNew(newEditor.getRange(), id); // ...
java
private ControlledVocabulary convertAndAddVocabulary(openControlledVocabulary value, Level2Element parent, Model newModel, PropertyEditor newEditor) { String id = ((BioPAXElement) value).getUri(); if (!newModel.containsID(id)) { if (newEditor != null) { newModel.addNew(newEditor.getRange(), id); // ...
[ "private", "ControlledVocabulary", "convertAndAddVocabulary", "(", "openControlledVocabulary", "value", ",", "Level2Element", "parent", ",", "Model", "newModel", ",", "PropertyEditor", "newEditor", ")", "{", "String", "id", "=", "(", "(", "BioPAXElement", ")", "value"...
/* Creates a specific ControlledVocabulary subclass and adds to the new model
[ "/", "*", "Creates", "a", "specific", "ControlledVocabulary", "subclass", "and", "adds", "to", "the", "new", "model" ]
train
https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/paxtools-core/src/main/java/org/biopax/paxtools/converter/LevelUpgrader.java#L274-L290
nuun-io/kernel
core/src/main/java/io/nuun/kernel/core/internal/utils/AssertUtils.java
AssertUtils.hasAnnotationDeepRegex
public static boolean hasAnnotationDeepRegex(Class<?> memberDeclaringClass, String metaAnnotationRegex) { if (memberDeclaringClass.getName().matches(metaAnnotationRegex)) { return true; } for (Annotation anno : memberDeclaringClass.getAnnotations()) ...
java
public static boolean hasAnnotationDeepRegex(Class<?> memberDeclaringClass, String metaAnnotationRegex) { if (memberDeclaringClass.getName().matches(metaAnnotationRegex)) { return true; } for (Annotation anno : memberDeclaringClass.getAnnotations()) ...
[ "public", "static", "boolean", "hasAnnotationDeepRegex", "(", "Class", "<", "?", ">", "memberDeclaringClass", ",", "String", "metaAnnotationRegex", ")", "{", "if", "(", "memberDeclaringClass", ".", "getName", "(", ")", ".", "matches", "(", "metaAnnotationRegex", "...
Indicates if the class name or at least the name of one of its annotations matches the regex. <p> Notice that the classes with a package name starting with "java.lang" will be ignored. </p> @param memberDeclaringClass the class to check @param metaAnnotationRegex the regex to match @return true if the regex matches, fa...
[ "Indicates", "if", "the", "class", "name", "or", "at", "least", "the", "name", "of", "one", "of", "its", "annotations", "matches", "the", "regex", ".", "<p", ">", "Notice", "that", "the", "classes", "with", "a", "package", "name", "starting", "with", "ja...
train
https://github.com/nuun-io/kernel/blob/116a7664fe2a9323e280574803d273699a333732/core/src/main/java/io/nuun/kernel/core/internal/utils/AssertUtils.java#L118-L136
javafxports/javafxmobile-plugin
src/main/java/org/javafxports/jfxmobile/plugin/android/task/ApkBuilder.java
ApkBuilder.checkOutputFile
private void checkOutputFile(File file) throws ApkCreationException { if (file.isDirectory()) { throw new ApkCreationException("%s is a directory!", file); } if (file.exists()) { // will be a file in this case. if (!file.canWrite()) { throw new ApkCreatio...
java
private void checkOutputFile(File file) throws ApkCreationException { if (file.isDirectory()) { throw new ApkCreationException("%s is a directory!", file); } if (file.exists()) { // will be a file in this case. if (!file.canWrite()) { throw new ApkCreatio...
[ "private", "void", "checkOutputFile", "(", "File", "file", ")", "throws", "ApkCreationException", "{", "if", "(", "file", ".", "isDirectory", "(", ")", ")", "{", "throw", "new", "ApkCreationException", "(", "\"%s is a directory!\"", ",", "file", ")", ";", "}",...
Checks an output {@link File} object. This checks the following: - the file is not an existing directory. - if the file exists, that it can be modified. - if it doesn't exists, that a new file can be created. @param file the File to check @throws ApkCreationException If the check fails
[ "Checks", "an", "output", "{" ]
train
https://github.com/javafxports/javafxmobile-plugin/blob/a9bef513b7e1bfa85f9a668226e6943c6d9f847f/src/main/java/org/javafxports/jfxmobile/plugin/android/task/ApkBuilder.java#L950-L969
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/handler/ResourceBundlesHandlerImpl.java
ResourceBundlesHandlerImpl.executeGlobalPostProcessing
private void executeGlobalPostProcessing(boolean processBundleFlag, StopWatch stopWatch) { // Launch global postprocessing if (resourceTypePostprocessor != null) { if (stopWatch != null) { stopWatch.start("Global postprocessing"); } GlobalPostProcessingContext ctx = new GlobalPostProcessingContext(conf...
java
private void executeGlobalPostProcessing(boolean processBundleFlag, StopWatch stopWatch) { // Launch global postprocessing if (resourceTypePostprocessor != null) { if (stopWatch != null) { stopWatch.start("Global postprocessing"); } GlobalPostProcessingContext ctx = new GlobalPostProcessingContext(conf...
[ "private", "void", "executeGlobalPostProcessing", "(", "boolean", "processBundleFlag", ",", "StopWatch", "stopWatch", ")", "{", "// Launch global postprocessing", "if", "(", "resourceTypePostprocessor", "!=", "null", ")", "{", "if", "(", "stopWatch", "!=", "null", ")"...
Execute the global post processing @param processBundleFlag the flag indicating if the bundle should be processed @param stopWatch the stopWatch
[ "Execute", "the", "global", "post", "processing" ]
train
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/handler/ResourceBundlesHandlerImpl.java#L991-L1005
eclipse/hawkbit
hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/management/dstable/DistributionTable.java
DistributionTable.styleDistributionSetTable
public void styleDistributionSetTable(final Long installedDistItemId, final Long assignedDistTableItemId) { setCellStyleGenerator((source, itemId, propertyId) -> getPinnedDistributionStyle(installedDistItemId, assignedDistTableItemId, itemId)); }
java
public void styleDistributionSetTable(final Long installedDistItemId, final Long assignedDistTableItemId) { setCellStyleGenerator((source, itemId, propertyId) -> getPinnedDistributionStyle(installedDistItemId, assignedDistTableItemId, itemId)); }
[ "public", "void", "styleDistributionSetTable", "(", "final", "Long", "installedDistItemId", ",", "final", "Long", "assignedDistTableItemId", ")", "{", "setCellStyleGenerator", "(", "(", "source", ",", "itemId", ",", "propertyId", ")", "->", "getPinnedDistributionStyle",...
Added by Saumya Target pin listener. @param installedDistItemId Item ids of installed distribution set @param assignedDistTableItemId Item ids of assigned distribution set
[ "Added", "by", "Saumya", "Target", "pin", "listener", "." ]
train
https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/management/dstable/DistributionTable.java#L712-L715
morfologik/morfologik-stemming
morfologik-stemming/src/main/java/morfologik/stemming/BufferUtils.java
BufferUtils.bytesToChars
public static CharBuffer bytesToChars(CharsetDecoder decoder, ByteBuffer bytes, CharBuffer chars) { assert decoder.malformedInputAction() == CodingErrorAction.REPORT; chars = clearAndEnsureCapacity(chars, (int) (bytes.remaining() * decoder.maxCharsPerByte())); bytes.mark(); decoder.reset(); ...
java
public static CharBuffer bytesToChars(CharsetDecoder decoder, ByteBuffer bytes, CharBuffer chars) { assert decoder.malformedInputAction() == CodingErrorAction.REPORT; chars = clearAndEnsureCapacity(chars, (int) (bytes.remaining() * decoder.maxCharsPerByte())); bytes.mark(); decoder.reset(); ...
[ "public", "static", "CharBuffer", "bytesToChars", "(", "CharsetDecoder", "decoder", ",", "ByteBuffer", "bytes", ",", "CharBuffer", "chars", ")", "{", "assert", "decoder", ".", "malformedInputAction", "(", ")", "==", "CodingErrorAction", ".", "REPORT", ";", "chars"...
Convert byte buffer's content into characters. The input buffer's bytes are not consumed (mark is set and reset).
[ "Convert", "byte", "buffer", "s", "content", "into", "characters", ".", "The", "input", "buffer", "s", "bytes", "are", "not", "consumed", "(", "mark", "is", "set", "and", "reset", ")", "." ]
train
https://github.com/morfologik/morfologik-stemming/blob/9d9099cc5ec4155a0eb8dfecdc23d01cbd734f6e/morfologik-stemming/src/main/java/morfologik/stemming/BufferUtils.java#L121-L147