repository_name
stringlengths
7
58
func_path_in_repository
stringlengths
11
218
func_name
stringlengths
4
140
whole_func_string
stringlengths
153
5.32k
language
stringclasses
1 value
func_code_string
stringlengths
72
4k
func_code_tokens
listlengths
20
832
func_documentation_string
stringlengths
61
2k
func_documentation_tokens
listlengths
1
647
split_name
stringclasses
1 value
func_code_url
stringlengths
102
339
JOML-CI/JOML
src/org/joml/Matrix3f.java
Matrix3f.obliqueZ
public Matrix3f obliqueZ(float a, float b) { """ Apply an oblique projection transformation to this matrix with the given values for <code>a</code> and <code>b</code>. <p> If <code>M</code> is <code>this</code> matrix and <code>O</code> the oblique transformation matrix, then the new matrix will be <code>M * O...
java
public Matrix3f obliqueZ(float a, float b) { this.m20 = m00 * a + m10 * b + m20; this.m21 = m01 * a + m11 * b + m21; this.m22 = m02 * a + m12 * b + m22; return this; }
[ "public", "Matrix3f", "obliqueZ", "(", "float", "a", ",", "float", "b", ")", "{", "this", ".", "m20", "=", "m00", "*", "a", "+", "m10", "*", "b", "+", "m20", ";", "this", ".", "m21", "=", "m01", "*", "a", "+", "m11", "*", "b", "+", "m21", "...
Apply an oblique projection transformation to this matrix with the given values for <code>a</code> and <code>b</code>. <p> If <code>M</code> is <code>this</code> matrix and <code>O</code> the oblique transformation matrix, then the new matrix will be <code>M * O</code>. So when transforming a vector <code>v</code> with...
[ "Apply", "an", "oblique", "projection", "transformation", "to", "this", "matrix", "with", "the", "given", "values", "for", "<code", ">", "a<", "/", "code", ">", "and", "<code", ">", "b<", "/", "code", ">", ".", "<p", ">", "If", "<code", ">", "M<", "/...
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Matrix3f.java#L4143-L4148
js-lib-com/commons
src/main/java/js/util/Strings.java
Strings.getMethodAccessor
public static String getMethodAccessor(String prefix, String memberName) throws IllegalArgumentException { """ Get Java accessor for a given member name. Returns the given <code>memberName</code> prefixed by <code>prefix</code>. If <code>memberName</code> is dashed case, that is, contains dash character convert i...
java
public static String getMethodAccessor(String prefix, String memberName) throws IllegalArgumentException { Params.notNullOrEmpty(prefix, "Prefix"); Params.notNullOrEmpty(memberName, "Member name"); StringBuilder builder = new StringBuilder(); builder.append(prefix); String[] parts = memb...
[ "public", "static", "String", "getMethodAccessor", "(", "String", "prefix", ",", "String", "memberName", ")", "throws", "IllegalArgumentException", "{", "Params", ".", "notNullOrEmpty", "(", "prefix", ",", "\"Prefix\"", ")", ";", "Params", ".", "notNullOrEmpty", "...
Get Java accessor for a given member name. Returns the given <code>memberName</code> prefixed by <code>prefix</code>. If <code>memberName</code> is dashed case, that is, contains dash character convert it to camel case. For example getter for <em>email-addresses</em> is <em>getEmailAddresses</em> and for <em>picture</e...
[ "Get", "Java", "accessor", "for", "a", "given", "member", "name", ".", "Returns", "the", "given", "<code", ">", "memberName<", "/", "code", ">", "prefixed", "by", "<code", ">", "prefix<", "/", "code", ">", ".", "If", "<code", ">", "memberName<", "/", "...
train
https://github.com/js-lib-com/commons/blob/f8c64482142b163487745da74feb106f0765c16b/src/main/java/js/util/Strings.java#L353-L369
Javacord/Javacord
javacord-core/src/main/java/org/javacord/core/entity/message/MessageSetImpl.java
MessageSetImpl.getMessagesBefore
public static CompletableFuture<MessageSet> getMessagesBefore(TextChannel channel, int limit, long before) { """ Gets up to a given amount of messages in the given channel before a given message in any channel. @param channel The channel of the messages. @param limit The limit of messages to get. @param befor...
java
public static CompletableFuture<MessageSet> getMessagesBefore(TextChannel channel, int limit, long before) { return getMessages(channel, limit, before, -1); }
[ "public", "static", "CompletableFuture", "<", "MessageSet", ">", "getMessagesBefore", "(", "TextChannel", "channel", ",", "int", "limit", ",", "long", "before", ")", "{", "return", "getMessages", "(", "channel", ",", "limit", ",", "before", ",", "-", "1", ")...
Gets up to a given amount of messages in the given channel before a given message in any channel. @param channel The channel of the messages. @param limit The limit of messages to get. @param before Get messages before the message with this id. @return The messages. @see #getMessagesBeforeAsStream(TextChannel, long)
[ "Gets", "up", "to", "a", "given", "amount", "of", "messages", "in", "the", "given", "channel", "before", "a", "given", "message", "in", "any", "channel", "." ]
train
https://github.com/Javacord/Javacord/blob/915aad084dc5e863284267529d0dccd625fc6886/javacord-core/src/main/java/org/javacord/core/entity/message/MessageSetImpl.java#L316-L318
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/security/cert/X509CertSelector.java
X509CertSelector.setIssuer
public void setIssuer(byte[] issuerDN) throws IOException { """ Sets the issuer criterion. The specified distinguished name must match the issuer distinguished name in the {@code X509Certificate}. If {@code null} is specified, the issuer criterion is disabled and any issuer distinguished name will do. <p> If...
java
public void setIssuer(byte[] issuerDN) throws IOException { try { issuer = (issuerDN == null ? null : new X500Principal(issuerDN)); } catch (IllegalArgumentException e) { throw new IOException("Invalid name", e); } }
[ "public", "void", "setIssuer", "(", "byte", "[", "]", "issuerDN", ")", "throws", "IOException", "{", "try", "{", "issuer", "=", "(", "issuerDN", "==", "null", "?", "null", ":", "new", "X500Principal", "(", "issuerDN", ")", ")", ";", "}", "catch", "(", ...
Sets the issuer criterion. The specified distinguished name must match the issuer distinguished name in the {@code X509Certificate}. If {@code null} is specified, the issuer criterion is disabled and any issuer distinguished name will do. <p> If {@code issuerDN} is not {@code null}, it should contain a single DER encod...
[ "Sets", "the", "issuer", "criterion", ".", "The", "specified", "distinguished", "name", "must", "match", "the", "issuer", "distinguished", "name", "in", "the", "{", "@code", "X509Certificate", "}", ".", "If", "{", "@code", "null", "}", "is", "specified", "th...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/security/cert/X509CertSelector.java#L277-L283
cqframework/clinical_quality_language
Src/java/elm/src/main/java/org/cqframework/cql/elm/visiting/ElmBaseVisitor.java
ElmBaseVisitor.visitIntervalTypeSpecifier
public T visitIntervalTypeSpecifier(IntervalTypeSpecifier elm, C context) { """ Visit a IntervalTypeSpecifier. This method will be called for every node in the tree that is a IntervalTypeSpecifier. @param elm the ELM tree @param context the context passed to the visitor @return the visitor result """...
java
public T visitIntervalTypeSpecifier(IntervalTypeSpecifier elm, C context) { visitElement(elm.getPointType(), context); return null; }
[ "public", "T", "visitIntervalTypeSpecifier", "(", "IntervalTypeSpecifier", "elm", ",", "C", "context", ")", "{", "visitElement", "(", "elm", ".", "getPointType", "(", ")", ",", "context", ")", ";", "return", "null", ";", "}" ]
Visit a IntervalTypeSpecifier. This method will be called for every node in the tree that is a IntervalTypeSpecifier. @param elm the ELM tree @param context the context passed to the visitor @return the visitor result
[ "Visit", "a", "IntervalTypeSpecifier", ".", "This", "method", "will", "be", "called", "for", "every", "node", "in", "the", "tree", "that", "is", "a", "IntervalTypeSpecifier", "." ]
train
https://github.com/cqframework/clinical_quality_language/blob/67459d1ef453e49db8d7c5c86e87278377ed0a0b/Src/java/elm/src/main/java/org/cqframework/cql/elm/visiting/ElmBaseVisitor.java#L71-L74
albfernandez/itext2
src/main/java/com/lowagie/text/rtf/parser/RtfParser.java
RtfParser.importRtfDocument
public void importRtfDocument(InputStream readerIn, RtfDocument rtfDoc) throws IOException { """ Imports a complete RTF document. @param readerIn The Reader to read the RTF document from. @param rtfDoc The RtfDocument to add the imported document to. @throws IOException On I/O errors. @since 2.1.3 """ ...
java
public void importRtfDocument(InputStream readerIn, RtfDocument rtfDoc) throws IOException { if(readerIn == null || rtfDoc == null) return; this.init(TYPE_IMPORT_FULL, rtfDoc, readerIn, this.document, null); this.setCurrentDestination(RtfDestinationMgr.DESTINATION_NULL); this.groupLevel = 0; try { th...
[ "public", "void", "importRtfDocument", "(", "InputStream", "readerIn", ",", "RtfDocument", "rtfDoc", ")", "throws", "IOException", "{", "if", "(", "readerIn", "==", "null", "||", "rtfDoc", "==", "null", ")", "return", ";", "this", ".", "init", "(", "TYPE_IMP...
Imports a complete RTF document. @param readerIn The Reader to read the RTF document from. @param rtfDoc The RtfDocument to add the imported document to. @throws IOException On I/O errors. @since 2.1.3
[ "Imports", "a", "complete", "RTF", "document", "." ]
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/rtf/parser/RtfParser.java#L482-L497
recommenders/rival
rival-evaluate/src/main/java/net/recommenders/rival/evaluation/metric/MultipleEvaluationMetricRunner.java
MultipleEvaluationMetricRunner.getAllPredictionFiles
public static void getAllPredictionFiles(final Set<String> predictionFiles, final File path, final String predictionPrefix) { """ Gets all prediction files. @param predictionFiles The prediction files. @param path The path where the splits are. @param predictionPrefix The prefix of the prediction files. "...
java
public static void getAllPredictionFiles(final Set<String> predictionFiles, final File path, final String predictionPrefix) { if (path == null) { return; } File[] files = path.listFiles(); if (files == null) { return; } for (File file : files) { ...
[ "public", "static", "void", "getAllPredictionFiles", "(", "final", "Set", "<", "String", ">", "predictionFiles", ",", "final", "File", "path", ",", "final", "String", "predictionPrefix", ")", "{", "if", "(", "path", "==", "null", ")", "{", "return", ";", "...
Gets all prediction files. @param predictionFiles The prediction files. @param path The path where the splits are. @param predictionPrefix The prefix of the prediction files.
[ "Gets", "all", "prediction", "files", "." ]
train
https://github.com/recommenders/rival/blob/6ee8223e91810ae1c6052899595af3906e0c34c6/rival-evaluate/src/main/java/net/recommenders/rival/evaluation/metric/MultipleEvaluationMetricRunner.java#L231-L246
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/utils/BlockVector.java
BlockVector.insertNullElementsAt
public final void insertNullElementsAt(int index, int count) { """ Inserts count null values at index, moving up all the components at index and greater. index cannot be greater than the size of the Vector. @exception ArrayIndexOutOfBoundsException if the index was invalid. """ if (tc.isEntryEnabl...
java
public final void insertNullElementsAt(int index, int count) { if (tc.isEntryEnabled()) SibTr.entry( tc, "insertNullElementsAt", new Object[] { new Integer(index), new Integer(count)}); for (int i = index; i < index + count; i++) add(i, null); if (tc.isEntryEnabled())...
[ "public", "final", "void", "insertNullElementsAt", "(", "int", "index", ",", "int", "count", ")", "{", "if", "(", "tc", ".", "isEntryEnabled", "(", ")", ")", "SibTr", ".", "entry", "(", "tc", ",", "\"insertNullElementsAt\"", ",", "new", "Object", "[", "]...
Inserts count null values at index, moving up all the components at index and greater. index cannot be greater than the size of the Vector. @exception ArrayIndexOutOfBoundsException if the index was invalid.
[ "Inserts", "count", "null", "values", "at", "index", "moving", "up", "all", "the", "components", "at", "index", "and", "greater", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/utils/BlockVector.java#L64-L77
kenyee/android-ddp-client
src/com/keysolutions/ddpclient/android/MeteorAuthCommands.java
MeteorAuthCommands.registerUser
public boolean registerUser(String username, String email, String password) { """ Register's user into Meteor's accounts-password system @param username user's username (this or email has to be specified) @param email user's email (this or username has to be specified) @param password password @ret...
java
public boolean registerUser(String username, String email, String password) { if (((username == null) && (email == null)) || (password == null)) { return false; } Object[] methodArgs = new Object[1]; Map<String,Object> options = new HashMap<>(); methodArgs...
[ "public", "boolean", "registerUser", "(", "String", "username", ",", "String", "email", ",", "String", "password", ")", "{", "if", "(", "(", "(", "username", "==", "null", ")", "&&", "(", "email", "==", "null", ")", ")", "||", "(", "password", "==", ...
Register's user into Meteor's accounts-password system @param username user's username (this or email has to be specified) @param email user's email (this or username has to be specified) @param password password @return true if create user called
[ "Register", "s", "user", "into", "Meteor", "s", "accounts", "-", "password", "system" ]
train
https://github.com/kenyee/android-ddp-client/blob/6ab416e415570a03f96c383497144dd742de3f08/src/com/keysolutions/ddpclient/android/MeteorAuthCommands.java#L80-L102
meltmedia/cadmium
core/src/main/java/com/meltmedia/cadmium/core/util/WarUtils.java
WarUtils.updateProperties
public static Properties updateProperties(ZipFile inZip, ZipEntry cadmiumPropertiesEntry, String repoUri, String branch, String configRepoUri, String configBranch) throws IOException { """ <p>Loads a properties file from a zip file and updates 2 properties in that properties file.</p> <p>The pr...
java
public static Properties updateProperties(ZipFile inZip, ZipEntry cadmiumPropertiesEntry, String repoUri, String branch, String configRepoUri, String configBranch) throws IOException { Properties cadmiumProps = new Properties(); cadmiumProps.load(inZip.getInputStream(cadmiumPropertiesEntry));...
[ "public", "static", "Properties", "updateProperties", "(", "ZipFile", "inZip", ",", "ZipEntry", "cadmiumPropertiesEntry", ",", "String", "repoUri", ",", "String", "branch", ",", "String", "configRepoUri", ",", "String", "configBranch", ")", "throws", "IOException", ...
<p>Loads a properties file from a zip file and updates 2 properties in that properties file.</p> <p>The properties file in the zip is not written back to the zip file with the updates.</p> @param inZip The zip file to load the properties file from. @param cadmiumPropertiesEntry The entry of a properties file in the zip...
[ "<p", ">", "Loads", "a", "properties", "file", "from", "a", "zip", "file", "and", "updates", "2", "properties", "in", "that", "properties", "file", ".", "<", "/", "p", ">", "<p", ">", "The", "properties", "file", "in", "the", "zip", "is", "not", "wri...
train
https://github.com/meltmedia/cadmium/blob/bca585030e141803a73b58abb128d130157b6ddf/core/src/main/java/com/meltmedia/cadmium/core/util/WarUtils.java#L474-L497
b3dgs/lionengine
lionengine-core/src/main/java/com/b3dgs/lionengine/UtilReflection.java
UtilReflection.checkInterfaces
private static void checkInterfaces(Class<?> base, Deque<Class<?>> currents, Deque<Class<?>> nexts) { """ Store all declared valid interfaces into next. @param base The minimum base interface. @param currents The current interfaces found. @param nexts The next interface to check. """ currents.str...
java
private static void checkInterfaces(Class<?> base, Deque<Class<?>> currents, Deque<Class<?>> nexts) { currents.stream() .map(Class::getInterfaces) .forEach(types -> Arrays.asList(types) .stream() ...
[ "private", "static", "void", "checkInterfaces", "(", "Class", "<", "?", ">", "base", ",", "Deque", "<", "Class", "<", "?", ">", ">", "currents", ",", "Deque", "<", "Class", "<", "?", ">", ">", "nexts", ")", "{", "currents", ".", "stream", "(", ")",...
Store all declared valid interfaces into next. @param base The minimum base interface. @param currents The current interfaces found. @param nexts The next interface to check.
[ "Store", "all", "declared", "valid", "interfaces", "into", "next", "." ]
train
https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-core/src/main/java/com/b3dgs/lionengine/UtilReflection.java#L396-L404
Azure/azure-sdk-for-java
labservices/resource-manager/v2018_10_15/src/main/java/com/microsoft/azure/management/labservices/v2018_10_15/implementation/LabAccountsInner.java
LabAccountsInner.getByResourceGroup
public LabAccountInner getByResourceGroup(String resourceGroupName, String labAccountName) { """ Get lab account. @param resourceGroupName The name of the resource group. @param labAccountName The name of the lab Account. @throws IllegalArgumentException thrown if parameters fail the validation @throws Cloud...
java
public LabAccountInner getByResourceGroup(String resourceGroupName, String labAccountName) { return getByResourceGroupWithServiceResponseAsync(resourceGroupName, labAccountName).toBlocking().single().body(); }
[ "public", "LabAccountInner", "getByResourceGroup", "(", "String", "resourceGroupName", ",", "String", "labAccountName", ")", "{", "return", "getByResourceGroupWithServiceResponseAsync", "(", "resourceGroupName", ",", "labAccountName", ")", ".", "toBlocking", "(", ")", "."...
Get lab account. @param resourceGroupName The name of the resource group. @param labAccountName The name of the lab Account. @throws IllegalArgumentException thrown if parameters fail the validation @throws CloudException thrown if the request is rejected by server @throws RuntimeException all other wrapped checked ex...
[ "Get", "lab", "account", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/labservices/resource-manager/v2018_10_15/src/main/java/com/microsoft/azure/management/labservices/v2018_10_15/implementation/LabAccountsInner.java#L605-L607
drinkjava2/jBeanBox
jbeanbox/src/main/java/com/github/drinkjava2/asm5_0_3/util/ASMifier.java
ASMifier.main
public static void main(final String[] args) throws Exception { """ Prints the ASM source code to generate the given class to the standard output. <p> Usage: ASMifier [-debug] &lt;binary class name or class file name&gt; @param args the command line arguments. @throws Exception if the class cannot be fo...
java
public static void main(final String[] args) throws Exception { int i = 0; int flags = ClassReader.SKIP_DEBUG; boolean ok = true; if (args.length < 1 || args.length > 2) { ok = false; } if (ok && "-debug".equals(args[0])) { i = 1; flag...
[ "public", "static", "void", "main", "(", "final", "String", "[", "]", "args", ")", "throws", "Exception", "{", "int", "i", "=", "0", ";", "int", "flags", "=", "ClassReader", ".", "SKIP_DEBUG", ";", "boolean", "ok", "=", "true", ";", "if", "(", "args"...
Prints the ASM source code to generate the given class to the standard output. <p> Usage: ASMifier [-debug] &lt;binary class name or class file name&gt; @param args the command line arguments. @throws Exception if the class cannot be found, or if an IO exception occurs.
[ "Prints", "the", "ASM", "source", "code", "to", "generate", "the", "given", "class", "to", "the", "standard", "output", ".", "<p", ">", "Usage", ":", "ASMifier", "[", "-", "debug", "]", "&lt", ";", "binary", "class", "name", "or", "class", "file", "nam...
train
https://github.com/drinkjava2/jBeanBox/blob/01c216599ffa2e5f2d9c01df2adaad0f45567c04/jbeanbox/src/main/java/com/github/drinkjava2/asm5_0_3/util/ASMifier.java#L128-L159
facebookarchive/hadoop-20
src/hdfs/org/apache/hadoop/hdfs/server/namenode/FSImage.java
FSImage.loadFSImage
protected void loadFSImage(ImageInputStream iis, File imageFile) throws IOException { """ Load the image namespace from the given image file, verifying it against the MD5 sum stored in its associated .md5 file. """ MD5Hash expectedMD5 = MD5FileUtils.readStoredMd5ForFile(imageFile); if (expectedMD5 == ...
java
protected void loadFSImage(ImageInputStream iis, File imageFile) throws IOException { MD5Hash expectedMD5 = MD5FileUtils.readStoredMd5ForFile(imageFile); if (expectedMD5 == null) { throw new IOException("No MD5 file found corresponding to image file " + imageFile); } iis.setImageDigest(e...
[ "protected", "void", "loadFSImage", "(", "ImageInputStream", "iis", ",", "File", "imageFile", ")", "throws", "IOException", "{", "MD5Hash", "expectedMD5", "=", "MD5FileUtils", ".", "readStoredMd5ForFile", "(", "imageFile", ")", ";", "if", "(", "expectedMD5", "==",...
Load the image namespace from the given image file, verifying it against the MD5 sum stored in its associated .md5 file.
[ "Load", "the", "image", "namespace", "from", "the", "given", "image", "file", "verifying", "it", "against", "the", "MD5", "sum", "stored", "in", "its", "associated", ".", "md5", "file", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/hdfs/org/apache/hadoop/hdfs/server/namenode/FSImage.java#L825-L833
OpenNTF/JavascriptAggregator
jaggr-core/src/main/java/com/ibm/jaggr/core/util/SignalUtil.java
SignalUtil.logResuming
static void logResuming(String callerClass, String callerMethod, Object waitObj, long start) { """ Logs a warning level message indicating that a thread which has previously been reported as stuck is now resuming. @param callerClass the class name of the caller @param callerMethod the method name of the cal...
java
static void logResuming(String callerClass, String callerMethod, Object waitObj, long start) { long elapsed = (System.currentTimeMillis() - start)/1000; log.logp(Level.WARNING, callerClass, callerMethod, Messages.SignalUtil_2, new Object[]{Thread.currentThread().getId(), elapsed, waitObj}); }
[ "static", "void", "logResuming", "(", "String", "callerClass", ",", "String", "callerMethod", ",", "Object", "waitObj", ",", "long", "start", ")", "{", "long", "elapsed", "=", "(", "System", ".", "currentTimeMillis", "(", ")", "-", "start", ")", "/", "1000...
Logs a warning level message indicating that a thread which has previously been reported as stuck is now resuming. @param callerClass the class name of the caller @param callerMethod the method name of the caller @param waitObj the object that is being waited on @param start the time that the wait began
[ "Logs", "a", "warning", "level", "message", "indicating", "that", "a", "thread", "which", "has", "previously", "been", "reported", "as", "stuck", "is", "now", "resuming", "." ]
train
https://github.com/OpenNTF/JavascriptAggregator/blob/9f47a96d778251638b1df9a368462176216d5b29/jaggr-core/src/main/java/com/ibm/jaggr/core/util/SignalUtil.java#L162-L166
phax/ph-commons
ph-xml/src/main/java/com/helger/xml/xpath/MapBasedXPathVariableResolverQName.java
MapBasedXPathVariableResolverQName.addUniqueVariable
@Nonnull public EChange addUniqueVariable (@Nonnull final QName aName, @Nonnull final Object aValue) { """ Add a new variable. @param aName The qualified name of the variable @param aValue The value to be used. @return {@link EChange} """ ValueEnforcer.notNull (aName, "Name"); ValueEnforcer.no...
java
@Nonnull public EChange addUniqueVariable (@Nonnull final QName aName, @Nonnull final Object aValue) { ValueEnforcer.notNull (aName, "Name"); ValueEnforcer.notNull (aValue, "Value"); if (m_aMap.containsKey (aName)) return EChange.UNCHANGED; m_aMap.put (aName, aValue); return EChange.CHANG...
[ "@", "Nonnull", "public", "EChange", "addUniqueVariable", "(", "@", "Nonnull", "final", "QName", "aName", ",", "@", "Nonnull", "final", "Object", "aValue", ")", "{", "ValueEnforcer", ".", "notNull", "(", "aName", ",", "\"Name\"", ")", ";", "ValueEnforcer", "...
Add a new variable. @param aName The qualified name of the variable @param aValue The value to be used. @return {@link EChange}
[ "Add", "a", "new", "variable", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-xml/src/main/java/com/helger/xml/xpath/MapBasedXPathVariableResolverQName.java#L93-L103
jbundle/jbundle
base/screen/control/servlet/src/main/java/org/jbundle/base/screen/control/servlet/ServletTask.java
ServletTask.doProcess
public void doProcess(BasicServlet servlet, HttpServletRequest req, HttpServletResponse res, PrintWriter outExt) throws ServletException, IOException { """ Process an HTML get or post. @exception ServletException From inherited class. @exception IOException From inherited class. """ ScreenModel...
java
public void doProcess(BasicServlet servlet, HttpServletRequest req, HttpServletResponse res, PrintWriter outExt) throws ServletException, IOException { ScreenModel screen = this.doProcessInput(servlet, req, res); this.doProcessOutput(servlet, req, res, outExt, screen); }
[ "public", "void", "doProcess", "(", "BasicServlet", "servlet", ",", "HttpServletRequest", "req", ",", "HttpServletResponse", "res", ",", "PrintWriter", "outExt", ")", "throws", "ServletException", ",", "IOException", "{", "ScreenModel", "screen", "=", "this", ".", ...
Process an HTML get or post. @exception ServletException From inherited class. @exception IOException From inherited class.
[ "Process", "an", "HTML", "get", "or", "post", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/screen/control/servlet/src/main/java/org/jbundle/base/screen/control/servlet/ServletTask.java#L99-L104
OpenLiberty/open-liberty
dev/com.ibm.ws.security.javaeesec_fat/fat/src/com/ibm/ws/security/javaeesec/fat_helper/FATHelper.java
FATHelper.reloadApplications
public static void reloadApplications(LibertyServer server, final Set<String> appIdsToReload) throws Exception { """ Reload select applications. @throws Exception If there was an error reloading the applications for some unforeseen reason. """ ServerConfiguration config = server.getServerConfigurati...
java
public static void reloadApplications(LibertyServer server, final Set<String> appIdsToReload) throws Exception { ServerConfiguration config = server.getServerConfiguration().clone(); /* * Get the apps to remove. */ ConfigElementList<Application> toRemove = new ConfigElementLis...
[ "public", "static", "void", "reloadApplications", "(", "LibertyServer", "server", ",", "final", "Set", "<", "String", ">", "appIdsToReload", ")", "throws", "Exception", "{", "ServerConfiguration", "config", "=", "server", ".", "getServerConfiguration", "(", ")", "...
Reload select applications. @throws Exception If there was an error reloading the applications for some unforeseen reason.
[ "Reload", "select", "applications", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.javaeesec_fat/fat/src/com/ibm/ws/security/javaeesec/fat_helper/FATHelper.java#L31-L50
SonarSource/sonarqube
server/sonar-server-common/src/main/java/org/sonar/server/qualitygate/ConditionEvaluator.java
ConditionEvaluator.evaluateCondition
private static Optional<EvaluatedCondition> evaluateCondition(Condition condition, ValueType type, Comparable value) { """ Evaluates the error condition. Returns empty if threshold or measure value is not defined. """ Comparable threshold = getThreshold(condition, type); if (reachThreshold(value, thre...
java
private static Optional<EvaluatedCondition> evaluateCondition(Condition condition, ValueType type, Comparable value) { Comparable threshold = getThreshold(condition, type); if (reachThreshold(value, threshold, condition)) { return of(new EvaluatedCondition(condition, EvaluationStatus.ERROR, value.toStrin...
[ "private", "static", "Optional", "<", "EvaluatedCondition", ">", "evaluateCondition", "(", "Condition", "condition", ",", "ValueType", "type", ",", "Comparable", "value", ")", "{", "Comparable", "threshold", "=", "getThreshold", "(", "condition", ",", "type", ")",...
Evaluates the error condition. Returns empty if threshold or measure value is not defined.
[ "Evaluates", "the", "error", "condition", ".", "Returns", "empty", "if", "threshold", "or", "measure", "value", "is", "not", "defined", "." ]
train
https://github.com/SonarSource/sonarqube/blob/2fffa4c2f79ae3714844d7742796e82822b6a98a/server/sonar-server-common/src/main/java/org/sonar/server/qualitygate/ConditionEvaluator.java#L69-L76
aNNiMON/Lightweight-Stream-API
stream/src/main/java/com/annimon/stream/LongStream.java
LongStream.scan
@NotNull public LongStream scan(final long identity, @NotNull final LongBinaryOperator accumulator) { """ Returns a {@code LongStream} produced by iterative application of a accumulation function to an initial element {@code identity} and next element of the current stream. Produce...
java
@NotNull public LongStream scan(final long identity, @NotNull final LongBinaryOperator accumulator) { Objects.requireNonNull(accumulator); return new LongStream(params, new LongScanIdentity(iterator, identity, accumulator)); }
[ "@", "NotNull", "public", "LongStream", "scan", "(", "final", "long", "identity", ",", "@", "NotNull", "final", "LongBinaryOperator", "accumulator", ")", "{", "Objects", ".", "requireNonNull", "(", "accumulator", ")", ";", "return", "new", "LongStream", "(", "...
Returns a {@code LongStream} produced by iterative application of a accumulation function to an initial element {@code identity} and next element of the current stream. Produces a {@code LongStream} consisting of {@code identity}, {@code acc(identity, value1)}, {@code acc(acc(identity, value1), value2)}, etc. <p>This ...
[ "Returns", "a", "{", "@code", "LongStream", "}", "produced", "by", "iterative", "application", "of", "a", "accumulation", "function", "to", "an", "initial", "element", "{", "@code", "identity", "}", "and", "next", "element", "of", "the", "current", "stream", ...
train
https://github.com/aNNiMON/Lightweight-Stream-API/blob/f29fd57208c20252a4549b084d55ed082c3e58f0/stream/src/main/java/com/annimon/stream/LongStream.java#L710-L715
UrielCh/ovh-java-sdk
ovh-java-sdk-metrics/src/main/java/net/minidev/ovh/api/ApiOvhMetrics.java
ApiOvhMetrics.serviceName_quota_PUT
public String serviceName_quota_PUT(String serviceName, Long quota) throws IOException { """ Set overquota REST: PUT /metrics/{serviceName}/quota @param serviceName [required] Name of your service @param quota [required] New value for overquota API beta """ String qPath = "/metrics/{serviceName}/quot...
java
public String serviceName_quota_PUT(String serviceName, Long quota) throws IOException { String qPath = "/metrics/{serviceName}/quota"; StringBuilder sb = path(qPath, serviceName); HashMap<String, Object>o = new HashMap<String, Object>(); addBody(o, "quota", quota); String resp = exec(qPath, "PUT", sb.toStrin...
[ "public", "String", "serviceName_quota_PUT", "(", "String", "serviceName", ",", "Long", "quota", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/metrics/{serviceName}/quota\"", ";", "StringBuilder", "sb", "=", "path", "(", "qPath", ",", "serviceName",...
Set overquota REST: PUT /metrics/{serviceName}/quota @param serviceName [required] Name of your service @param quota [required] New value for overquota API beta
[ "Set", "overquota" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-metrics/src/main/java/net/minidev/ovh/api/ApiOvhMetrics.java#L284-L291
westnordost/osmapi
src/main/java/de/westnordost/osmapi/user/UserPreferencesDao.java
UserPreferencesDao.get
public String get(String key) { """ @param key the preference to query @return the value of the given preference or null if the preference does not exist @throws OsmAuthorizationException if the application is not authenticated to read the user's preferences. (Permission.READ_PREFERENCES_AND_USER_DETAILS) ...
java
public String get(String key) { String urlKey = urlEncode(key); ApiResponseReader<String> reader = new ApiResponseReader<String>() { public String parse(InputStream in) throws Exception { InputStreamReader isr = new InputStreamReader(in, OsmConnection.CHARSET); BufferedReader reader = new BufferedR...
[ "public", "String", "get", "(", "String", "key", ")", "{", "String", "urlKey", "=", "urlEncode", "(", "key", ")", ";", "ApiResponseReader", "<", "String", ">", "reader", "=", "new", "ApiResponseReader", "<", "String", ">", "(", ")", "{", "public", "Strin...
@param key the preference to query @return the value of the given preference or null if the preference does not exist @throws OsmAuthorizationException if the application is not authenticated to read the user's preferences. (Permission.READ_PREFERENCES_AND_USER_DETAILS)
[ "@param", "key", "the", "preference", "to", "query", "@return", "the", "value", "of", "the", "given", "preference", "or", "null", "if", "the", "preference", "does", "not", "exist" ]
train
https://github.com/westnordost/osmapi/blob/dda6978fd12e117d0cf17812bc22037f61e22c4b/src/main/java/de/westnordost/osmapi/user/UserPreferencesDao.java#L50-L70
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.jms.common/src/com/ibm/ws/sib/ra/impl/SibRaConnection.java
SibRaConnection.createBrowserSession
@Override public BrowserSession createBrowserSession( final SIDestinationAddress destinationAddress, final DestinationType destType, final SelectionCriteria criteria, final St...
java
@Override public BrowserSession createBrowserSession( final SIDestinationAddress destinationAddress, final DestinationType destType, final SelectionCriteria criteria, final St...
[ "@", "Override", "public", "BrowserSession", "createBrowserSession", "(", "final", "SIDestinationAddress", "destinationAddress", ",", "final", "DestinationType", "destType", ",", "final", "SelectionCriteria", "criteria", ",", "final", "String", "alternateUser", ")", "thro...
Creates a browser session. Checks that the connection is valid and then delegates. Wraps the <code>BrowserSession</code> returned from the delegate in a <code>SibRaBrowserSession</code>. @param destinationAddress the address of the destination @param destType the destination type @param criteria the selection criteria...
[ "Creates", "a", "browser", "session", ".", "Checks", "that", "the", "connection", "is", "valid", "and", "then", "delegates", ".", "Wraps", "the", "<code", ">", "BrowserSession<", "/", "code", ">", "returned", "from", "the", "delegate", "in", "a", "<code", ...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.jms.common/src/com/ibm/ws/sib/ra/impl/SibRaConnection.java#L1530-L1549
jbundle/jbundle
thin/base/db/misc/src/main/java/org/jbundle/thin/base/db/client/SyncRemoteTable.java
SyncRemoteTable.doRemoteAction
public Object doRemoteAction(String strCommand, Map<String, Object> properties) throws DBException, RemoteException { """ Do a remote action. @param strCommand Command to perform remotely. @param properties Properties for this command (optional). @return boolean success. """ synchronized(m_objSync) ...
java
public Object doRemoteAction(String strCommand, Map<String, Object> properties) throws DBException, RemoteException { synchronized(m_objSync) { return m_tableRemote.doRemoteAction(strCommand, properties); } }
[ "public", "Object", "doRemoteAction", "(", "String", "strCommand", ",", "Map", "<", "String", ",", "Object", ">", "properties", ")", "throws", "DBException", ",", "RemoteException", "{", "synchronized", "(", "m_objSync", ")", "{", "return", "m_tableRemote", ".",...
Do a remote action. @param strCommand Command to perform remotely. @param properties Properties for this command (optional). @return boolean success.
[ "Do", "a", "remote", "action", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/db/misc/src/main/java/org/jbundle/thin/base/db/client/SyncRemoteTable.java#L251-L257
looly/hutool
hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java
FileUtil.getWriter
public static BufferedWriter getWriter(String path, Charset charset, boolean isAppend) throws IORuntimeException { """ 获得一个带缓存的写入对象 @param path 输出路径,绝对路径 @param charset 字符集 @param isAppend 是否追加 @return BufferedReader对象 @throws IORuntimeException IO异常 """ return getWriter(touch(path), charset, isAppen...
java
public static BufferedWriter getWriter(String path, Charset charset, boolean isAppend) throws IORuntimeException { return getWriter(touch(path), charset, isAppend); }
[ "public", "static", "BufferedWriter", "getWriter", "(", "String", "path", ",", "Charset", "charset", ",", "boolean", "isAppend", ")", "throws", "IORuntimeException", "{", "return", "getWriter", "(", "touch", "(", "path", ")", ",", "charset", ",", "isAppend", "...
获得一个带缓存的写入对象 @param path 输出路径,绝对路径 @param charset 字符集 @param isAppend 是否追加 @return BufferedReader对象 @throws IORuntimeException IO异常
[ "获得一个带缓存的写入对象" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java#L2598-L2600
line/armeria
core/src/main/java/com/linecorp/armeria/common/AbstractRequestContextBuilder.java
AbstractRequestContextBuilder.requestStartTime
public final B requestStartTime(long requestStartTimeNanos, long requestStartTimeMicros) { """ Sets the request start time of the request. @param requestStartTimeNanos the {@link System#nanoTime()} value when the request started. @param requestStartTimeMicros the number of microseconds since the epoch when the...
java
public final B requestStartTime(long requestStartTimeNanos, long requestStartTimeMicros) { this.requestStartTimeNanos = requestStartTimeNanos; this.requestStartTimeMicros = requestStartTimeMicros; requestStartTimeSet = true; return self(); }
[ "public", "final", "B", "requestStartTime", "(", "long", "requestStartTimeNanos", ",", "long", "requestStartTimeMicros", ")", "{", "this", ".", "requestStartTimeNanos", "=", "requestStartTimeNanos", ";", "this", ".", "requestStartTimeMicros", "=", "requestStartTimeMicros"...
Sets the request start time of the request. @param requestStartTimeNanos the {@link System#nanoTime()} value when the request started. @param requestStartTimeMicros the number of microseconds since the epoch when the request started.
[ "Sets", "the", "request", "start", "time", "of", "the", "request", "." ]
train
https://github.com/line/armeria/blob/67d29e019fd35a35f89c45cc8f9119ff9b12b44d/core/src/main/java/com/linecorp/armeria/common/AbstractRequestContextBuilder.java#L383-L388
josueeduardo/snappy
snappy/src/main/java/io/joshworks/snappy/SnappyServer.java
SnappyServer.add
public static void add(HttpString method, String url, HttpConsumer<HttpExchange> endpoint, MediaTypes... mediaTypes) { """ Define a REST endpoint mapped to the specified HTTP method with default path "/" as url @param method The HTTP method @param url The relative URL of the endpoint. @param endpoi...
java
public static void add(HttpString method, String url, HttpConsumer<HttpExchange> endpoint, MediaTypes... mediaTypes) { addResource(method, url, endpoint, mediaTypes); }
[ "public", "static", "void", "add", "(", "HttpString", "method", ",", "String", "url", ",", "HttpConsumer", "<", "HttpExchange", ">", "endpoint", ",", "MediaTypes", "...", "mediaTypes", ")", "{", "addResource", "(", "method", ",", "url", ",", "endpoint", ",",...
Define a REST endpoint mapped to the specified HTTP method with default path "/" as url @param method The HTTP method @param url The relative URL of the endpoint. @param endpoint The endpoint handler @param mediaTypes (Optional) The accepted and returned types for this endpoint
[ "Define", "a", "REST", "endpoint", "mapped", "to", "the", "specified", "HTTP", "method", "with", "default", "path", "/", "as", "url" ]
train
https://github.com/josueeduardo/snappy/blob/d95a9e811eda3c24a5e53086369208819884fa49/snappy/src/main/java/io/joshworks/snappy/SnappyServer.java#L486-L488
phax/ph-datetime
ph-holiday/src/main/java/com/helger/holiday/parser/RelativeToEasterSundayParser.java
RelativeToEasterSundayParser.addChrstianHoliday
protected final void addChrstianHoliday (final ChronoLocalDate aDate, final String sPropertiesKey, final IHolidayType aHolidayType, final HolidayMap holidays) { """ Adds the given day to...
java
protected final void addChrstianHoliday (final ChronoLocalDate aDate, final String sPropertiesKey, final IHolidayType aHolidayType, final HolidayMap holidays) { final LocalDate converte...
[ "protected", "final", "void", "addChrstianHoliday", "(", "final", "ChronoLocalDate", "aDate", ",", "final", "String", "sPropertiesKey", ",", "final", "IHolidayType", "aHolidayType", ",", "final", "HolidayMap", "holidays", ")", "{", "final", "LocalDate", "convertedDate...
Adds the given day to the list of holidays. @param aDate The day @param sPropertiesKey a {@link java.lang.String} object. @param aHolidayType a {@link HolidayType} object. @param holidays a {@link java.util.Set} object.
[ "Adds", "the", "given", "day", "to", "the", "list", "of", "holidays", "." ]
train
https://github.com/phax/ph-datetime/blob/cfaff01cb76d9affb934800ff55734b5a7d8983e/ph-holiday/src/main/java/com/helger/holiday/parser/RelativeToEasterSundayParser.java#L75-L82
b3dgs/lionengine
lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/collidable/ComponentCollision.java
ComponentCollision.checkOthers
private void checkOthers(Collidable objectA, Entry<Point, Set<Collidable>> current) { """ Check others element. @param objectA The collidable reference. @param current The current group to check. """ for (final Integer acceptedGroup : objectA.getAccepted()) { // Others to compar...
java
private void checkOthers(Collidable objectA, Entry<Point, Set<Collidable>> current) { for (final Integer acceptedGroup : objectA.getAccepted()) { // Others to compare only in accepted group if (collidables.containsKey(acceptedGroup)) { checkOthers(...
[ "private", "void", "checkOthers", "(", "Collidable", "objectA", ",", "Entry", "<", "Point", ",", "Set", "<", "Collidable", ">", ">", "current", ")", "{", "for", "(", "final", "Integer", "acceptedGroup", ":", "objectA", ".", "getAccepted", "(", ")", ")", ...
Check others element. @param objectA The collidable reference. @param current The current group to check.
[ "Check", "others", "element", "." ]
train
https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/collidable/ComponentCollision.java#L164-L174
actorapp/actor-platform
actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/util/images/ops/ImageLoading.java
ImageLoading.loadBitmapOptimized
public static Bitmap loadBitmapOptimized(String fileName, int limit) throws ImageLoadException { """ Loading bitmap with optimized loaded size less than specific pixels count @param fileName Image file name @param limit maximum pixels size @return loaded bitmap (always not null) @throws ImageLoadException...
java
public static Bitmap loadBitmapOptimized(String fileName, int limit) throws ImageLoadException { return loadBitmapOptimized(new FileSource(fileName), limit); }
[ "public", "static", "Bitmap", "loadBitmapOptimized", "(", "String", "fileName", ",", "int", "limit", ")", "throws", "ImageLoadException", "{", "return", "loadBitmapOptimized", "(", "new", "FileSource", "(", "fileName", ")", ",", "limit", ")", ";", "}" ]
Loading bitmap with optimized loaded size less than specific pixels count @param fileName Image file name @param limit maximum pixels size @return loaded bitmap (always not null) @throws ImageLoadException if it is unable to load file
[ "Loading", "bitmap", "with", "optimized", "loaded", "size", "less", "than", "specific", "pixels", "count" ]
train
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/util/images/ops/ImageLoading.java#L131-L133
keyboardsurfer/Crouton
library/src/main/java/de/keyboardsurfer/android/widget/crouton/Crouton.java
Crouton.showText
public static void showText(Activity activity, CharSequence text, Style style, int viewGroupResId) { """ Creates a {@link Crouton} with provided text and style for a given activity and displays it directly. @param activity The {@link Activity} that represents the context in which the Crouton should exist. @p...
java
public static void showText(Activity activity, CharSequence text, Style style, int viewGroupResId) { makeText(activity, text, style, (ViewGroup) activity.findViewById(viewGroupResId)).show(); }
[ "public", "static", "void", "showText", "(", "Activity", "activity", ",", "CharSequence", "text", ",", "Style", "style", ",", "int", "viewGroupResId", ")", "{", "makeText", "(", "activity", ",", "text", ",", "style", ",", "(", "ViewGroup", ")", "activity", ...
Creates a {@link Crouton} with provided text and style for a given activity and displays it directly. @param activity The {@link Activity} that represents the context in which the Crouton should exist. @param text The text you want to display. @param style The style that this {@link Crouton} should be created with. @p...
[ "Creates", "a", "{", "@link", "Crouton", "}", "with", "provided", "text", "and", "style", "for", "a", "given", "activity", "and", "displays", "it", "directly", "." ]
train
https://github.com/keyboardsurfer/Crouton/blob/7806b15e4d52793e1f5aeaa4a55b1e220289e619/library/src/main/java/de/keyboardsurfer/android/widget/crouton/Crouton.java#L411-L413
b3dgs/lionengine
lionengine-core/src/main/java/com/b3dgs/lionengine/graphic/drawable/Drawable.java
Drawable.loadSpriteTiled
public static SpriteTiled loadSpriteTiled(ImageBuffer surface, int tileWidth, int tileHeight) { """ Load a tiled sprite using an image reference, giving tile dimension (sharing the same surface). It may be useful in case of multiple tiled sprites. <p> {@link SpriteTiled#load()} must not be called as surface has...
java
public static SpriteTiled loadSpriteTiled(ImageBuffer surface, int tileWidth, int tileHeight) { return new SpriteTiledImpl(surface, tileWidth, tileHeight); }
[ "public", "static", "SpriteTiled", "loadSpriteTiled", "(", "ImageBuffer", "surface", ",", "int", "tileWidth", ",", "int", "tileHeight", ")", "{", "return", "new", "SpriteTiledImpl", "(", "surface", ",", "tileWidth", ",", "tileHeight", ")", ";", "}" ]
Load a tiled sprite using an image reference, giving tile dimension (sharing the same surface). It may be useful in case of multiple tiled sprites. <p> {@link SpriteTiled#load()} must not be called as surface has already been loaded. </p> @param surface The surface reference (must not be <code>null</code>). @param til...
[ "Load", "a", "tiled", "sprite", "using", "an", "image", "reference", "giving", "tile", "dimension", "(", "sharing", "the", "same", "surface", ")", ".", "It", "may", "be", "useful", "in", "case", "of", "multiple", "tiled", "sprites", ".", "<p", ">", "{", ...
train
https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-core/src/main/java/com/b3dgs/lionengine/graphic/drawable/Drawable.java#L232-L235
davidcarboni/restolino
src/main/java/com/github/davidcarboni/restolino/routes/DefaultIndexRedirect.java
DefaultIndexRedirect.get
@Override public Object get(HttpServletRequest req, HttpServletResponse res) throws IOException { """ Extending this class and implementing {@link Home} will make use of this method. """ res.sendRedirect(path); return null; }
java
@Override public Object get(HttpServletRequest req, HttpServletResponse res) throws IOException { res.sendRedirect(path); return null; }
[ "@", "Override", "public", "Object", "get", "(", "HttpServletRequest", "req", ",", "HttpServletResponse", "res", ")", "throws", "IOException", "{", "res", ".", "sendRedirect", "(", "path", ")", ";", "return", "null", ";", "}" ]
Extending this class and implementing {@link Home} will make use of this method.
[ "Extending", "this", "class", "and", "implementing", "{" ]
train
https://github.com/davidcarboni/restolino/blob/3f84ece1bd016fbb597c624d46fcca5a2580a33d/src/main/java/com/github/davidcarboni/restolino/routes/DefaultIndexRedirect.java#L38-L43
apache/incubator-shardingsphere
sharding-core/sharding-core-parse/sharding-core-parse-common/src/main/java/org/apache/shardingsphere/core/parse/old/parser/sql/dml/delete/DeleteParserFactory.java
DeleteParserFactory.newInstance
public static AbstractDeleteParser newInstance(final DatabaseType dbType, final ShardingRule shardingRule, final LexerEngine lexerEngine) { """ Create delete parser instance. @param dbType database type @param shardingRule databases and tables sharding rule @param lexerEngine lexical analysis engine. @return...
java
public static AbstractDeleteParser newInstance(final DatabaseType dbType, final ShardingRule shardingRule, final LexerEngine lexerEngine) { switch (dbType) { case H2: case MySQL: return new MySQLDeleteParser(shardingRule, lexerEngine); case Oracle: ...
[ "public", "static", "AbstractDeleteParser", "newInstance", "(", "final", "DatabaseType", "dbType", ",", "final", "ShardingRule", "shardingRule", ",", "final", "LexerEngine", "lexerEngine", ")", "{", "switch", "(", "dbType", ")", "{", "case", "H2", ":", "case", "...
Create delete parser instance. @param dbType database type @param shardingRule databases and tables sharding rule @param lexerEngine lexical analysis engine. @return delete parser instance
[ "Create", "delete", "parser", "instance", "." ]
train
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-parse/sharding-core-parse-common/src/main/java/org/apache/shardingsphere/core/parse/old/parser/sql/dml/delete/DeleteParserFactory.java#L46-L60
zaproxy/zaproxy
src/org/zaproxy/zap/extension/script/ScriptVars.java
ScriptVars.setScriptVarImpl
private static void setScriptVarImpl(String scriptName, String key, String value) { """ Internal method that sets a variable without validating the script name. @param scriptName the name of the script. @param key the key of the variable. @param value the value of the variable. """ validateKey(key); ...
java
private static void setScriptVarImpl(String scriptName, String key, String value) { validateKey(key); Map<String, String> scVars = scriptVars .computeIfAbsent(scriptName, k -> Collections.synchronizedMap(new HashMap<String, String>())); if (value == null) { scVars.remove(key); } else { validate...
[ "private", "static", "void", "setScriptVarImpl", "(", "String", "scriptName", ",", "String", "key", ",", "String", "value", ")", "{", "validateKey", "(", "key", ")", ";", "Map", "<", "String", ",", "String", ">", "scVars", "=", "scriptVars", ".", "computeI...
Internal method that sets a variable without validating the script name. @param scriptName the name of the script. @param key the key of the variable. @param value the value of the variable.
[ "Internal", "method", "that", "sets", "a", "variable", "without", "validating", "the", "script", "name", "." ]
train
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/script/ScriptVars.java#L212-L227
abego/treelayout
org.abego.treelayout/src/main/java/org/abego/treelayout/TreeLayout.java
TreeLayout.secondWalk
private void secondWalk(TreeNode v, double m, int level, double levelStart) { """ In difference to the original algorithm we also pass in extra level information. @param v @param m @param level @param levelStart """ // construct the position from the prelim and the level information // The rootLoca...
java
private void secondWalk(TreeNode v, double m, int level, double levelStart) { // construct the position from the prelim and the level information // The rootLocation affects the way how x and y are changed and in what // direction. double levelChangeSign = getLevelChangeSign(); boolean levelChangeOnYAxis = i...
[ "private", "void", "secondWalk", "(", "TreeNode", "v", ",", "double", "m", ",", "int", "level", ",", "double", "levelStart", ")", "{", "// construct the position from the prelim and the level information", "// The rootLocation affects the way how x and y are changed and in what",...
In difference to the original algorithm we also pass in extra level information. @param v @param m @param level @param levelStart
[ "In", "difference", "to", "the", "original", "algorithm", "we", "also", "pass", "in", "extra", "level", "information", "." ]
train
https://github.com/abego/treelayout/blob/aa73af5803c6ec30db0b4ad192c7cba55d0862d2/org.abego.treelayout/src/main/java/org/abego/treelayout/TreeLayout.java#L642-L684
alkacon/opencms-core
src/org/opencms/db/CmsSecurityManager.java
CmsSecurityManager.checkManagerOfProjectRole
public void checkManagerOfProjectRole(CmsDbContext dbc, CmsProject project) throws CmsRoleViolationException { """ Checks if the current user has management access to the given project.<p> @param dbc the current database context @param project the project to check @throws CmsRoleViolationException if the us...
java
public void checkManagerOfProjectRole(CmsDbContext dbc, CmsProject project) throws CmsRoleViolationException { boolean hasRole = false; try { if (hasRole(dbc, dbc.currentUser(), CmsRole.ROOT_ADMIN)) { return; } hasRole = m_driverManager.getAllManageab...
[ "public", "void", "checkManagerOfProjectRole", "(", "CmsDbContext", "dbc", ",", "CmsProject", "project", ")", "throws", "CmsRoleViolationException", "{", "boolean", "hasRole", "=", "false", ";", "try", "{", "if", "(", "hasRole", "(", "dbc", ",", "dbc", ".", "c...
Checks if the current user has management access to the given project.<p> @param dbc the current database context @param project the project to check @throws CmsRoleViolationException if the user does not have the required role permissions
[ "Checks", "if", "the", "current", "user", "has", "management", "access", "to", "the", "given", "project", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsSecurityManager.java#L382-L406
ManfredTremmel/gwt-bean-validators
mt-bean-validators/src/main/java/de/knightsoftnet/validators/shared/impl/LimitCharsetValidator.java
LimitCharsetValidator.isValid
@Override public final boolean isValid(final String pvalue, final ConstraintValidatorContext pcontext) { """ {@inheritDoc} check if given string is a valid mail. @see javax.validation.ConstraintValidator#isValid(java.lang.Object, javax.validation.ConstraintValidatorContext) """ if (StringUtils.isEmpt...
java
@Override public final boolean isValid(final String pvalue, final ConstraintValidatorContext pcontext) { if (StringUtils.isEmpty(pvalue)) { return true; } return charsetEncoder.canEncode(pvalue); }
[ "@", "Override", "public", "final", "boolean", "isValid", "(", "final", "String", "pvalue", ",", "final", "ConstraintValidatorContext", "pcontext", ")", "{", "if", "(", "StringUtils", ".", "isEmpty", "(", "pvalue", ")", ")", "{", "return", "true", ";", "}", ...
{@inheritDoc} check if given string is a valid mail. @see javax.validation.ConstraintValidator#isValid(java.lang.Object, javax.validation.ConstraintValidatorContext)
[ "{", "@inheritDoc", "}", "check", "if", "given", "string", "is", "a", "valid", "mail", "." ]
train
https://github.com/ManfredTremmel/gwt-bean-validators/blob/cff7a2c3d68c2d17bf9d3cc57c79cc16fa8b4d5c/mt-bean-validators/src/main/java/de/knightsoftnet/validators/shared/impl/LimitCharsetValidator.java#L57-L63
atomix/catalyst
serializer/src/main/java/io/atomix/catalyst/serializer/Serializer.java
Serializer.writeObject
public <T> OutputStream writeObject(T object, OutputStream outputStream) { """ Writes an object to the given output stream. <p> The given object must have a {@link Serializer#register(Class) registered} serializer or implement {@link java.io.Serializable}. If a serializable type ID was provided during registrat...
java
public <T> OutputStream writeObject(T object, OutputStream outputStream) { writeObject(object, new OutputStreamBufferOutput(outputStream)); return outputStream; }
[ "public", "<", "T", ">", "OutputStream", "writeObject", "(", "T", "object", ",", "OutputStream", "outputStream", ")", "{", "writeObject", "(", "object", ",", "new", "OutputStreamBufferOutput", "(", "outputStream", ")", ")", ";", "return", "outputStream", ";", ...
Writes an object to the given output stream. <p> The given object must have a {@link Serializer#register(Class) registered} serializer or implement {@link java.io.Serializable}. If a serializable type ID was provided during registration, the type ID will be written to the given {@link Buffer} in lieu of the class name....
[ "Writes", "an", "object", "to", "the", "given", "output", "stream", ".", "<p", ">", "The", "given", "object", "must", "have", "a", "{", "@link", "Serializer#register", "(", "Class", ")", "registered", "}", "serializer", "or", "implement", "{", "@link", "ja...
train
https://github.com/atomix/catalyst/blob/140e762cb975cd8ee1fd85119043c5b8bf917c5c/serializer/src/main/java/io/atomix/catalyst/serializer/Serializer.java#L777-L780
undertow-io/undertow
core/src/main/java/io/undertow/protocols/http2/Hpack.java
Hpack.encodeInteger
static void encodeInteger(ByteBuffer source, int value, int n) { """ Encodes an integer in the HPACK prefix format. <p> This method assumes that the buffer has already had the first 8-n bits filled. As such it will modify the last byte that is already present in the buffer, and potentially add more if required...
java
static void encodeInteger(ByteBuffer source, int value, int n) { int twoNminus1 = PREFIX_TABLE[n]; int pos = source.position() - 1; if (value < twoNminus1) { source.put(pos, (byte) (source.get(pos) | value)); } else { source.put(pos, (byte) (source.get(pos) | twoN...
[ "static", "void", "encodeInteger", "(", "ByteBuffer", "source", ",", "int", "value", ",", "int", "n", ")", "{", "int", "twoNminus1", "=", "PREFIX_TABLE", "[", "n", "]", ";", "int", "pos", "=", "source", ".", "position", "(", ")", "-", "1", ";", "if",...
Encodes an integer in the HPACK prefix format. <p> This method assumes that the buffer has already had the first 8-n bits filled. As such it will modify the last byte that is already present in the buffer, and potentially add more if required @param source The buffer that contains the integer @param value The integer...
[ "Encodes", "an", "integer", "in", "the", "HPACK", "prefix", "format", ".", "<p", ">", "This", "method", "assumes", "that", "the", "buffer", "has", "already", "had", "the", "first", "8", "-", "n", "bits", "filled", ".", "As", "such", "it", "will", "modi...
train
https://github.com/undertow-io/undertow/blob/87de0b856a7a4ba8faf5b659537b9af07b763263/core/src/main/java/io/undertow/protocols/http2/Hpack.java#L200-L214
wildfly/wildfly-maven-plugin
plugin/src/main/java/org/wildfly/plugin/repository/ArtifactNameBuilder.java
ArtifactNameBuilder.forRuntime
public static ArtifactNameBuilder forRuntime(final String artifact) { """ Creates an artifact builder based on the artifact. <p> If the {@link #setGroupId(String) groupId}, {@link #setArtifactId(String) artifactId}, {@link #setPackaging(String) packaging} or {@link #setVersion(String) version} is {@code null} d...
java
public static ArtifactNameBuilder forRuntime(final String artifact) { return new ArtifactNameBuilder(artifact) { @Override public ArtifactName build() { final ArtifactName delegate = super.build(); String groupId = delegate.getGroupId(); if...
[ "public", "static", "ArtifactNameBuilder", "forRuntime", "(", "final", "String", "artifact", ")", "{", "return", "new", "ArtifactNameBuilder", "(", "artifact", ")", "{", "@", "Override", "public", "ArtifactName", "build", "(", ")", "{", "final", "ArtifactName", ...
Creates an artifact builder based on the artifact. <p> If the {@link #setGroupId(String) groupId}, {@link #setArtifactId(String) artifactId}, {@link #setPackaging(String) packaging} or {@link #setVersion(String) version} is {@code null} defaults will be used. </p> @param artifact the artifact string in the {@code grou...
[ "Creates", "an", "artifact", "builder", "based", "on", "the", "artifact", ".", "<p", ">", "If", "the", "{", "@link", "#setGroupId", "(", "String", ")", "groupId", "}", "{", "@link", "#setArtifactId", "(", "String", ")", "artifactId", "}", "{", "@link", "...
train
https://github.com/wildfly/wildfly-maven-plugin/blob/c0e2d7ee28e511092561801959eae253b2b56def/plugin/src/main/java/org/wildfly/plugin/repository/ArtifactNameBuilder.java#L81-L105
jmeter-maven-plugin/jmeter-maven-plugin
src/main/java/com/lazerycode/jmeter/configuration/ArtifactHelpers.java
ArtifactHelpers.convertExclusionPatternIntoExclusion
static Exclusion convertExclusionPatternIntoExclusion(String exceptionPattern) throws MojoExecutionException { """ Convert an exclusion pattern into an Exclusion object @param exceptionPattern coords pattern in the format <groupId>:<artifactId>[:<extension>][:<classifier>] @return Exclusion object @throws Moj...
java
static Exclusion convertExclusionPatternIntoExclusion(String exceptionPattern) throws MojoExecutionException { Matcher matcher = COORDINATE_PATTERN.matcher(exceptionPattern); if (!matcher.matches()) { throw new MojoExecutionException(String.format("Bad artifact coordinates %s, expected forma...
[ "static", "Exclusion", "convertExclusionPatternIntoExclusion", "(", "String", "exceptionPattern", ")", "throws", "MojoExecutionException", "{", "Matcher", "matcher", "=", "COORDINATE_PATTERN", ".", "matcher", "(", "exceptionPattern", ")", ";", "if", "(", "!", "matcher",...
Convert an exclusion pattern into an Exclusion object @param exceptionPattern coords pattern in the format <groupId>:<artifactId>[:<extension>][:<classifier>] @return Exclusion object @throws MojoExecutionException if coords pattern is invalid
[ "Convert", "an", "exclusion", "pattern", "into", "an", "Exclusion", "object" ]
train
https://github.com/jmeter-maven-plugin/jmeter-maven-plugin/blob/63dc8b49cc6b9542deb681e25a2ada6025ddbf6b/src/main/java/com/lazerycode/jmeter/configuration/ArtifactHelpers.java#L84-L91
ravendb/ravendb-jvm-client
src/main/java/net/ravendb/client/documents/session/AbstractDocumentQuery.java
AbstractDocumentQuery._search
@Override public void _search(String fieldName, String searchTerms) { """ Perform a search for documents which fields that match the searchTerms. If there is more than a single term, each of them will be checked independently. @param fieldName Field name @param searchTerms Search terms """ _sear...
java
@Override public void _search(String fieldName, String searchTerms) { _search(fieldName, searchTerms, SearchOperator.OR); }
[ "@", "Override", "public", "void", "_search", "(", "String", "fieldName", ",", "String", "searchTerms", ")", "{", "_search", "(", "fieldName", ",", "searchTerms", ",", "SearchOperator", ".", "OR", ")", ";", "}" ]
Perform a search for documents which fields that match the searchTerms. If there is more than a single term, each of them will be checked independently. @param fieldName Field name @param searchTerms Search terms
[ "Perform", "a", "search", "for", "documents", "which", "fields", "that", "match", "the", "searchTerms", ".", "If", "there", "is", "more", "than", "a", "single", "term", "each", "of", "them", "will", "be", "checked", "independently", "." ]
train
https://github.com/ravendb/ravendb-jvm-client/blob/5a45727de507b541d1571e79ddd97c7d88bee787/src/main/java/net/ravendb/client/documents/session/AbstractDocumentQuery.java#L1022-L1025
box/box-android-sdk
box-content-sdk/src/main/java/com/box/androidsdk/content/utils/SdkUtils.java
SdkUtils.copyStream
public static void copyStream(final InputStream inputStream, final OutputStream outputStream) throws IOException, InterruptedException { """ Utility method to write given inputStream to given outputStream. @param inputStream the inputStream to copy from. @param outputStream the outputStream to wri...
java
public static void copyStream(final InputStream inputStream, final OutputStream outputStream) throws IOException, InterruptedException { copyStream(inputStream, outputStream, null); }
[ "public", "static", "void", "copyStream", "(", "final", "InputStream", "inputStream", ",", "final", "OutputStream", "outputStream", ")", "throws", "IOException", ",", "InterruptedException", "{", "copyStream", "(", "inputStream", ",", "outputStream", ",", "null", ")...
Utility method to write given inputStream to given outputStream. @param inputStream the inputStream to copy from. @param outputStream the outputStream to write to. @throws IOException thrown if there was a problem reading from inputStream or writing to outputStream. @throws InterruptedException thrown if the...
[ "Utility", "method", "to", "write", "given", "inputStream", "to", "given", "outputStream", "." ]
train
https://github.com/box/box-android-sdk/blob/a621ad5ddebf23067fec27529130d72718fc0e88/box-content-sdk/src/main/java/com/box/androidsdk/content/utils/SdkUtils.java#L74-L77
gallandarakhneorg/afc
maven/maventools/src/main/java/org/arakhne/maven/AbstractArakhneMojo.java
AbstractArakhneMojo.dirCopy
public final void dirCopy(File in, File out, boolean skipHiddenFiles) throws IOException { """ Copy a directory. @param in input directory. @param out output directory. @param skipHiddenFiles indicates if the hidden files should be ignored. @throws IOException on error. @since 3.3 """ assert in != nul...
java
public final void dirCopy(File in, File out, boolean skipHiddenFiles) throws IOException { assert in != null; assert out != null; getLog().debug(in.toString() + "->" + out.toString()); //$NON-NLS-1$ getLog().debug("Ignore hidden files: " + skipHiddenFiles); //$NON-NLS-1$ out.mkdirs(); final LinkedList<File>...
[ "public", "final", "void", "dirCopy", "(", "File", "in", ",", "File", "out", ",", "boolean", "skipHiddenFiles", ")", "throws", "IOException", "{", "assert", "in", "!=", "null", ";", "assert", "out", "!=", "null", ";", "getLog", "(", ")", ".", "debug", ...
Copy a directory. @param in input directory. @param out output directory. @param skipHiddenFiles indicates if the hidden files should be ignored. @throws IOException on error. @since 3.3
[ "Copy", "a", "directory", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/maven/maventools/src/main/java/org/arakhne/maven/AbstractArakhneMojo.java#L240-L270
knowm/XChange
xchange-exx/src/main/java/org/knowm/xchange/exx/EXXAdapters.java
EXXAdapters.adaptOrderBook
public static OrderBook adaptOrderBook(EXXOrderbook exxOrderbook, CurrencyPair currencyPair) { """ Adapts a to a OrderBook Object @param currencyPair (e.g. BTC/USD) @param timeScale polled order books provide a timestamp in seconds, stream in ms @return The XChange OrderBook """ List<LimitOrder> asks ...
java
public static OrderBook adaptOrderBook(EXXOrderbook exxOrderbook, CurrencyPair currencyPair) { List<LimitOrder> asks = new ArrayList<LimitOrder>(); List<LimitOrder> bids = new ArrayList<LimitOrder>(); for (BigDecimal[] exxAsk : exxOrderbook.getAsks()) { asks.add(new LimitOrder(OrderType.ASK, exxAsk[1...
[ "public", "static", "OrderBook", "adaptOrderBook", "(", "EXXOrderbook", "exxOrderbook", ",", "CurrencyPair", "currencyPair", ")", "{", "List", "<", "LimitOrder", ">", "asks", "=", "new", "ArrayList", "<", "LimitOrder", ">", "(", ")", ";", "List", "<", "LimitOr...
Adapts a to a OrderBook Object @param currencyPair (e.g. BTC/USD) @param timeScale polled order books provide a timestamp in seconds, stream in ms @return The XChange OrderBook
[ "Adapts", "a", "to", "a", "OrderBook", "Object" ]
train
https://github.com/knowm/XChange/blob/e45f437ac8e0b89cd66cdcb3258bdb1bf3d88186/xchange-exx/src/main/java/org/knowm/xchange/exx/EXXAdapters.java#L113-L126
pip-services3-java/pip-services3-commons-java
src/org/pipservices3/commons/data/AnyValueMap.java
AnyValueMap.getAsNullableType
public <T> T getAsNullableType(Class<T> type, String key) { """ Converts map element into a value defined by specied typecode. If conversion is not possible it returns null. @param type the Class type that defined the type of the result @param key a key of element to get. @return element value defined by th...
java
public <T> T getAsNullableType(Class<T> type, String key) { Object value = getAsObject(key); return TypeConverter.toNullableType(type, value); }
[ "public", "<", "T", ">", "T", "getAsNullableType", "(", "Class", "<", "T", ">", "type", ",", "String", "key", ")", "{", "Object", "value", "=", "getAsObject", "(", "key", ")", ";", "return", "TypeConverter", ".", "toNullableType", "(", "type", ",", "va...
Converts map element into a value defined by specied typecode. If conversion is not possible it returns null. @param type the Class type that defined the type of the result @param key a key of element to get. @return element value defined by the typecode or null if conversion is not supported. @see TypeConverter#toN...
[ "Converts", "map", "element", "into", "a", "value", "defined", "by", "specied", "typecode", ".", "If", "conversion", "is", "not", "possible", "it", "returns", "null", "." ]
train
https://github.com/pip-services3-java/pip-services3-commons-java/blob/a8a0c3e5ec58f0663c295aa855c6b3afad2af86a/src/org/pipservices3/commons/data/AnyValueMap.java#L463-L466
iipc/openwayback-access-control
access-control/src/main/java/org/archive/accesscontrol/robotstxt/RobotClient.java
RobotClient.isRobotPermitted
public boolean isRobotPermitted(String url, String userAgent) throws IOException, RobotsUnavailableException { """ Returns true if a robot with the given user-agent is allowed to access the given url. @param url @param userAgent @return @throws IOException @throws RobotsUnavailableException ...
java
public boolean isRobotPermitted(String url, String userAgent) throws IOException, RobotsUnavailableException { RobotRules rules = getRulesForUrl(url, userAgent); return !rules.blocksPathForUA(new LaxURI(url, false).getPath(), userAgent); }
[ "public", "boolean", "isRobotPermitted", "(", "String", "url", ",", "String", "userAgent", ")", "throws", "IOException", ",", "RobotsUnavailableException", "{", "RobotRules", "rules", "=", "getRulesForUrl", "(", "url", ",", "userAgent", ")", ";", "return", "!", ...
Returns true if a robot with the given user-agent is allowed to access the given url. @param url @param userAgent @return @throws IOException @throws RobotsUnavailableException
[ "Returns", "true", "if", "a", "robot", "with", "the", "given", "user", "-", "agent", "is", "allowed", "to", "access", "the", "given", "url", "." ]
train
https://github.com/iipc/openwayback-access-control/blob/4a0f70f200fd8d7b6e313624b7628656d834bf31/access-control/src/main/java/org/archive/accesscontrol/robotstxt/RobotClient.java#L27-L32
citrusframework/citrus
modules/citrus-jdbc/src/main/java/com/consol/citrus/jdbc/server/JdbcEndpointAdapterController.java
JdbcEndpointAdapterController.openConnection
@Override public void openConnection(Map<String, String> properties) throws JdbcServerException { """ Opens the connection with the given properties @param properties The properties to open the connection with @throws JdbcServerException In case that the maximum connections have been reached """ ...
java
@Override public void openConnection(Map<String, String> properties) throws JdbcServerException { if (!endpointConfiguration.isAutoConnect()) { List<OpenConnection.Property> propertyList = convertToPropertyList(properties); handleMessageAndCheckResponse(JdbcMessage.openConnection(pro...
[ "@", "Override", "public", "void", "openConnection", "(", "Map", "<", "String", ",", "String", ">", "properties", ")", "throws", "JdbcServerException", "{", "if", "(", "!", "endpointConfiguration", ".", "isAutoConnect", "(", ")", ")", "{", "List", "<", "Open...
Opens the connection with the given properties @param properties The properties to open the connection with @throws JdbcServerException In case that the maximum connections have been reached
[ "Opens", "the", "connection", "with", "the", "given", "properties" ]
train
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-jdbc/src/main/java/com/consol/citrus/jdbc/server/JdbcEndpointAdapterController.java#L134-L147
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/rights/UserManager.java
UserManager.getUser
public User getUser(String name, String password) { """ Returns the User object with the specified name and password from this object's set. """ if (name == null) { name = ""; } if (password == null) { password = ""; } User user = get(name); ...
java
public User getUser(String name, String password) { if (name == null) { name = ""; } if (password == null) { password = ""; } User user = get(name); user.checkPassword(password); return user; }
[ "public", "User", "getUser", "(", "String", "name", ",", "String", "password", ")", "{", "if", "(", "name", "==", "null", ")", "{", "name", "=", "\"\"", ";", "}", "if", "(", "password", "==", "null", ")", "{", "password", "=", "\"\"", ";", "}", "...
Returns the User object with the specified name and password from this object's set.
[ "Returns", "the", "User", "object", "with", "the", "specified", "name", "and", "password", "from", "this", "object", "s", "set", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/rights/UserManager.java#L159-L174
javagl/CommonUI
src/main/java/de/javagl/common/ui/table/CustomizedTableHeader.java
CustomizedTableHeader.setDefaultRenderer
@Override public void setDefaultRenderer(TableCellRenderer defaultRenderer) { """ {@inheritDoc} <br> <br> <b>Note:</b> This method is overridden in the CustomizedTableHeader. It will internally combine the given renderer with the one that reserves the space for the custom components. This means that cal...
java
@Override public void setDefaultRenderer(TableCellRenderer defaultRenderer) { if (spaceRenderer != null) { CompoundTableCellRenderer renderer = new CompoundTableCellRenderer(spaceRenderer, defaultRenderer); super.setDefaultRenderer(renderer); ...
[ "@", "Override", "public", "void", "setDefaultRenderer", "(", "TableCellRenderer", "defaultRenderer", ")", "{", "if", "(", "spaceRenderer", "!=", "null", ")", "{", "CompoundTableCellRenderer", "renderer", "=", "new", "CompoundTableCellRenderer", "(", "spaceRenderer", ...
{@inheritDoc} <br> <br> <b>Note:</b> This method is overridden in the CustomizedTableHeader. It will internally combine the given renderer with the one that reserves the space for the custom components. This means that calling {@link #getDefaultRenderer()} will return a different renderer than the one that was passed t...
[ "{" ]
train
https://github.com/javagl/CommonUI/blob/b2c7a7637d4e288271392ba148dc17e4c9780255/src/main/java/de/javagl/common/ui/table/CustomizedTableHeader.java#L222-L235
helun/Ektorp
org.ektorp/src/main/java/org/ektorp/support/DesignDocument.java
DesignDocument.mergeWith
public boolean mergeWith(DesignDocument dd, boolean updateOnDiff) { """ Merge this design document with the specified document, the result being stored in this design document. @param dd the design document to merge with @param updateOnDiff true to overwrite existing views/functions in this document with t...
java
public boolean mergeWith(DesignDocument dd, boolean updateOnDiff) { boolean changed = mergeViews(dd.views(), updateOnDiff); changed = mergeFunctions(lists(), dd.lists(), updateOnDiff) || changed; changed = mergeFunctions(shows(), dd.shows(), updateOnDiff) || changed; changed = mergeFunct...
[ "public", "boolean", "mergeWith", "(", "DesignDocument", "dd", ",", "boolean", "updateOnDiff", ")", "{", "boolean", "changed", "=", "mergeViews", "(", "dd", ".", "views", "(", ")", ",", "updateOnDiff", ")", ";", "changed", "=", "mergeFunctions", "(", "lists"...
Merge this design document with the specified document, the result being stored in this design document. @param dd the design document to merge with @param updateOnDiff true to overwrite existing views/functions in this document with the views/functions in the specified document; false will only add new views/function...
[ "Merge", "this", "design", "document", "with", "the", "specified", "document", "the", "result", "being", "stored", "in", "this", "design", "document", "." ]
train
https://github.com/helun/Ektorp/blob/b822c0d656aefb90a5e0cb5ec2de3daa969e3eaa/org.ektorp/src/main/java/org/ektorp/support/DesignDocument.java#L199-L206
jenkinsci/jenkins
core/src/main/java/hudson/Util.java
Util.createFileSet
@Nonnull public static FileSet createFileSet(@Nonnull File baseDir, @Nonnull String includes, @CheckForNull String excludes) { """ Creates Ant {@link FileSet} with the base dir and include pattern. <p> The difference with this and using {@link FileSet#setIncludes(String)} is that this method doesn't treat...
java
@Nonnull public static FileSet createFileSet(@Nonnull File baseDir, @Nonnull String includes, @CheckForNull String excludes) { FileSet fs = new FileSet(); fs.setDir(baseDir); fs.setProject(new Project()); StringTokenizer tokens; tokens = new StringTokenizer(includes,","); ...
[ "@", "Nonnull", "public", "static", "FileSet", "createFileSet", "(", "@", "Nonnull", "File", "baseDir", ",", "@", "Nonnull", "String", "includes", ",", "@", "CheckForNull", "String", "excludes", ")", "{", "FileSet", "fs", "=", "new", "FileSet", "(", ")", "...
Creates Ant {@link FileSet} with the base dir and include pattern. <p> The difference with this and using {@link FileSet#setIncludes(String)} is that this method doesn't treat whitespace as a pattern separator, which makes it impossible to use space in the file path. @param includes String like "foo/bar/*.xml" Multip...
[ "Creates", "Ant", "{", "@link", "FileSet", "}", "with", "the", "base", "dir", "and", "include", "pattern", "." ]
train
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/Util.java#L1143-L1164
lessthanoptimal/BoofCV
main/boofcv-ip/src/main/java/boofcv/alg/filter/stat/ImageLocalNormalization.java
ImageLocalNormalization.zeroMeanStdOne
public void zeroMeanStdOne( int radius , T input , double maxPixelValue , double delta , T output ) { """ /* <p>Normalizes the input image such that local statics are a zero mean and with standard deviation of 1. The image border is handled by truncating the kernel and renormalizing it so that it's sum is stil...
java
public void zeroMeanStdOne( int radius , T input , double maxPixelValue , double delta , T output ) { // check preconditions and initialize data structures initialize(input, output); // avoid overflow issues by ensuring that the max pixel value is 1 T adjusted = ensureMaxValueOfOne(input, maxPixelValue); //...
[ "public", "void", "zeroMeanStdOne", "(", "int", "radius", ",", "T", "input", ",", "double", "maxPixelValue", ",", "double", "delta", ",", "T", "output", ")", "{", "// check preconditions and initialize data structures", "initialize", "(", "input", ",", "output", "...
/* <p>Normalizes the input image such that local statics are a zero mean and with standard deviation of 1. The image border is handled by truncating the kernel and renormalizing it so that it's sum is still one.</p> <p>output[x,y] = (input[x,y]-mean[x,y])/(stdev[x,y] + delta)</p> @param input Input image @param maxP...
[ "/", "*", "<p", ">", "Normalizes", "the", "input", "image", "such", "that", "local", "statics", "are", "a", "zero", "mean", "and", "with", "standard", "deviation", "of", "1", ".", "The", "image", "border", "is", "handled", "by", "truncating", "the", "ker...
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/alg/filter/stat/ImageLocalNormalization.java#L132-L154
phax/ph-masterdata
ph-masterdata/src/main/java/com/helger/masterdata/swift/IBANCountryData.java
IBANCountryData.parseToElementValues
@Nonnull @ReturnsMutableCopy public ICommonsList <IBANElementValue> parseToElementValues (@Nonnull final String sIBAN) { """ Parse a given IBAN number string and convert it to elements according to this country's definition of IBAN numbers. @param sIBAN The IBAN number string to parse. May not be <code>nu...
java
@Nonnull @ReturnsMutableCopy public ICommonsList <IBANElementValue> parseToElementValues (@Nonnull final String sIBAN) { ValueEnforcer.notNull (sIBAN, "IBANString"); final String sRealIBAN = IBANManager.unifyIBAN (sIBAN); if (sRealIBAN.length () != m_nExpectedLength) throw new IllegalArgumentEx...
[ "@", "Nonnull", "@", "ReturnsMutableCopy", "public", "ICommonsList", "<", "IBANElementValue", ">", "parseToElementValues", "(", "@", "Nonnull", "final", "String", "sIBAN", ")", "{", "ValueEnforcer", ".", "notNull", "(", "sIBAN", ",", "\"IBANString\"", ")", ";", ...
Parse a given IBAN number string and convert it to elements according to this country's definition of IBAN numbers. @param sIBAN The IBAN number string to parse. May not be <code>null</code>. @return The list of parsed elements.
[ "Parse", "a", "given", "IBAN", "number", "string", "and", "convert", "it", "to", "elements", "according", "to", "this", "country", "s", "definition", "of", "IBAN", "numbers", "." ]
train
https://github.com/phax/ph-masterdata/blob/ca5e0b03c735b30b47930c018bfb5e71f00d0ff4/ph-masterdata/src/main/java/com/helger/masterdata/swift/IBANCountryData.java#L167-L189
RKumsher/utils
src/main/java/com/github/rkumsher/date/RandomDateUtils.java
RandomDateUtils.randomLocalTime
public static LocalTime randomLocalTime(LocalTime startInclusive, LocalTime endExclusive) { """ Returns a random {@link LocalTime} within the specified range. @param startInclusive the earliest {@link LocalTime} that can be returned @param endExclusive the upper bound (not included) @return the random {@link ...
java
public static LocalTime randomLocalTime(LocalTime startInclusive, LocalTime endExclusive) { checkArgument(startInclusive != null, "Start must be non-null"); checkArgument(endExclusive != null, "End must be non-null"); long nanoOfDay = random(NANO_OF_DAY, startInclusive.toNanoOfDay(), endExclusive.toNanoOfDa...
[ "public", "static", "LocalTime", "randomLocalTime", "(", "LocalTime", "startInclusive", ",", "LocalTime", "endExclusive", ")", "{", "checkArgument", "(", "startInclusive", "!=", "null", ",", "\"Start must be non-null\"", ")", ";", "checkArgument", "(", "endExclusive", ...
Returns a random {@link LocalTime} within the specified range. @param startInclusive the earliest {@link LocalTime} that can be returned @param endExclusive the upper bound (not included) @return the random {@link LocalTime} @throws IllegalArgumentException if startInclusive or endExclusive are null or if endExclusive...
[ "Returns", "a", "random", "{", "@link", "LocalTime", "}", "within", "the", "specified", "range", "." ]
train
https://github.com/RKumsher/utils/blob/fcdb190569cd0288249bf4b46fd418f8c01d1caf/src/main/java/com/github/rkumsher/date/RandomDateUtils.java#L534-L539
lucee/Lucee
core/src/main/java/lucee/commons/io/res/type/compress/Compress.java
Compress.getInstance
public static Compress getInstance(Resource zipFile, int format, boolean caseSensitive) throws IOException { """ return zip instance matching the zipfile, singelton instance only 1 zip for one file @param zipFile @param format @param caseSensitive @return @throws IOException """ ConfigImpl config = (Co...
java
public static Compress getInstance(Resource zipFile, int format, boolean caseSensitive) throws IOException { ConfigImpl config = (ConfigImpl) ThreadLocalPageContext.getConfig(); return config.getCompressInstance(zipFile, format, caseSensitive); }
[ "public", "static", "Compress", "getInstance", "(", "Resource", "zipFile", ",", "int", "format", ",", "boolean", "caseSensitive", ")", "throws", "IOException", "{", "ConfigImpl", "config", "=", "(", "ConfigImpl", ")", "ThreadLocalPageContext", ".", "getConfig", "(...
return zip instance matching the zipfile, singelton instance only 1 zip for one file @param zipFile @param format @param caseSensitive @return @throws IOException
[ "return", "zip", "instance", "matching", "the", "zipfile", "singelton", "instance", "only", "1", "zip", "for", "one", "file" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/commons/io/res/type/compress/Compress.java#L90-L93
GoogleCloudPlatform/appengine-mapreduce
java/src/main/java/com/google/appengine/tools/mapreduce/impl/sort/SortWorker.java
SortWorker.emitCurrentOrLeftover
private void emitCurrentOrLeftover(ByteBuffer key, List<ByteBuffer> values) { """ Writes out the provided key and value list. If the leftover item (which was not included in the sort) is lower lexicographically then it is emitted first. If the values are emitted the list will be cleared. If the leftover value ...
java
private void emitCurrentOrLeftover(ByteBuffer key, List<ByteBuffer> values) { if (leftover != null) { int leftOverCompare = LexicographicalComparator.compareBuffers(leftover.getKey(), key); if (leftOverCompare <= 0) { emit(leftover.getKey(), leftover.getValue()); leftover = null; }...
[ "private", "void", "emitCurrentOrLeftover", "(", "ByteBuffer", "key", ",", "List", "<", "ByteBuffer", ">", "values", ")", "{", "if", "(", "leftover", "!=", "null", ")", "{", "int", "leftOverCompare", "=", "LexicographicalComparator", ".", "compareBuffers", "(", ...
Writes out the provided key and value list. If the leftover item (which was not included in the sort) is lower lexicographically then it is emitted first. If the values are emitted the list will be cleared. If the leftover value is emitted the leftover value is cleared. @param key The key being asked to be emitted. (...
[ "Writes", "out", "the", "provided", "key", "and", "value", "list", ".", "If", "the", "leftover", "item", "(", "which", "was", "not", "included", "in", "the", "sort", ")", "is", "lower", "lexicographically", "then", "it", "is", "emitted", "first", "." ]
train
https://github.com/GoogleCloudPlatform/appengine-mapreduce/blob/2045eb3605b6ecb40c83d11dd5442a89fe5c5dd6/java/src/main/java/com/google/appengine/tools/mapreduce/impl/sort/SortWorker.java#L195-L207
TheHortonMachine/hortonmachine
hmachine/src/main/java/org/hortonmachine/hmachine/modules/hydrogeomorphology/hillshade/OmsHillshade.java
OmsHillshade.calchillshade
private void calchillshade( WritableRaster pitWR, WritableRaster hillshadeWR, WritableRaster gradientWR, double dx ) { """ Evaluate the hillshade. @param pitWR the raster of elevation. @param hillshadeWR the WR where store the result. @param gradientWR the raster of the gradient value of the dem. @param d...
java
private void calchillshade( WritableRaster pitWR, WritableRaster hillshadeWR, WritableRaster gradientWR, double dx ) { pAzimuth = Math.toRadians(pAzimuth); pElev = Math.toRadians(pElev); double[] sunVector = calcSunVector(); double[] normalSunVector = calcNormalSunVector(sunVector); ...
[ "private", "void", "calchillshade", "(", "WritableRaster", "pitWR", ",", "WritableRaster", "hillshadeWR", ",", "WritableRaster", "gradientWR", ",", "double", "dx", ")", "{", "pAzimuth", "=", "Math", ".", "toRadians", "(", "pAzimuth", ")", ";", "pElev", "=", "M...
Evaluate the hillshade. @param pitWR the raster of elevation. @param hillshadeWR the WR where store the result. @param gradientWR the raster of the gradient value of the dem. @param dx the resolution of the dem. .
[ "Evaluate", "the", "hillshade", "." ]
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/hmachine/src/main/java/org/hortonmachine/hmachine/modules/hydrogeomorphology/hillshade/OmsHillshade.java#L169-L194
baidubce/bce-sdk-java
src/main/java/com/baidubce/services/route/RouteClient.java
RouteClient.createRoute
public CreateRouteResponse createRoute(CreateRouteRequest request) throws BceClientException { """ Create a route with the specified options. You must fill the field of clientToken,which is especially for keeping idempotent. <p/> @param request The request containing all options for creating subne...
java
public CreateRouteResponse createRoute(CreateRouteRequest request) throws BceClientException { checkNotNull(request, "request should not be null."); if (Strings.isNullOrEmpty(request.getClientToken())) { request.setClientToken(this.generateClientToken()); } checkS...
[ "public", "CreateRouteResponse", "createRoute", "(", "CreateRouteRequest", "request", ")", "throws", "BceClientException", "{", "checkNotNull", "(", "request", ",", "\"request should not be null.\"", ")", ";", "if", "(", "Strings", ".", "isNullOrEmpty", "(", "request", ...
Create a route with the specified options. You must fill the field of clientToken,which is especially for keeping idempotent. <p/> @param request The request containing all options for creating subnet. @return List of subnetId newly created @throws BceClientException
[ "Create", "a", "route", "with", "the", "specified", "options", ".", "You", "must", "fill", "the", "field", "of", "clientToken", "which", "is", "especially", "for", "keeping", "idempotent", ".", "<p", "/", ">" ]
train
https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/route/RouteClient.java#L153-L168
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/SeaGlassStyle.java
SeaGlassStyle.getBackgroundPainter
public SeaGlassPainter getBackgroundPainter(SynthContext ctx) { """ Gets the appropriate background Painter, if there is one, for the state specified in the given SynthContext. This method does appropriate fallback searching, as described in #get. @param ctx The SynthContext. Must not be null. @return The...
java
public SeaGlassPainter getBackgroundPainter(SynthContext ctx) { Values v = getValues(ctx); int xstate = getExtendedState(ctx, v); SeaGlassPainter p = null; // check the cache tmpKey.init("backgroundPainter$$instance", xstate); p = (SeaGlassPainter) v.cache...
[ "public", "SeaGlassPainter", "getBackgroundPainter", "(", "SynthContext", "ctx", ")", "{", "Values", "v", "=", "getValues", "(", "ctx", ")", ";", "int", "xstate", "=", "getExtendedState", "(", "ctx", ",", "v", ")", ";", "SeaGlassPainter", "p", "=", "null", ...
Gets the appropriate background Painter, if there is one, for the state specified in the given SynthContext. This method does appropriate fallback searching, as described in #get. @param ctx The SynthContext. Must not be null. @return The background painter associated for the given state, or null if none could be fo...
[ "Gets", "the", "appropriate", "background", "Painter", "if", "there", "is", "one", "for", "the", "state", "specified", "in", "the", "given", "SynthContext", ".", "This", "method", "does", "appropriate", "fallback", "searching", "as", "described", "in", "#get", ...
train
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/SeaGlassStyle.java#L1047-L1080
Azure/azure-sdk-for-java
network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/VpnGatewaysInner.java
VpnGatewaysInner.createOrUpdate
public VpnGatewayInner createOrUpdate(String resourceGroupName, String gatewayName, VpnGatewayInner vpnGatewayParameters) { """ Creates a virtual wan vpn gateway if it doesn't exist else updates the existing gateway. @param resourceGroupName The resource group name of the VpnGateway. @param gatewayName The nam...
java
public VpnGatewayInner createOrUpdate(String resourceGroupName, String gatewayName, VpnGatewayInner vpnGatewayParameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, gatewayName, vpnGatewayParameters).toBlocking().last().body(); }
[ "public", "VpnGatewayInner", "createOrUpdate", "(", "String", "resourceGroupName", ",", "String", "gatewayName", ",", "VpnGatewayInner", "vpnGatewayParameters", ")", "{", "return", "createOrUpdateWithServiceResponseAsync", "(", "resourceGroupName", ",", "gatewayName", ",", ...
Creates a virtual wan vpn gateway if it doesn't exist else updates the existing gateway. @param resourceGroupName The resource group name of the VpnGateway. @param gatewayName The name of the gateway. @param vpnGatewayParameters Parameters supplied to create or Update a virtual wan vpn gateway. @throws IllegalArgument...
[ "Creates", "a", "virtual", "wan", "vpn", "gateway", "if", "it", "doesn", "t", "exist", "else", "updates", "the", "existing", "gateway", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/VpnGatewaysInner.java#L211-L213
JM-Lab/utils-java8
src/main/java/kr/jm/utils/datastructure/JMMap.java
JMMap.newFilteredMap
public static <K, V> Map<K, V> newFilteredMap(Map<K, V> map, Predicate<? super Entry<K, V>> filter) { """ New filtered map map. @param <K> the type parameter @param <V> the type parameter @param map the map @param filter the filter @return the map """ return getEntryStreamWi...
java
public static <K, V> Map<K, V> newFilteredMap(Map<K, V> map, Predicate<? super Entry<K, V>> filter) { return getEntryStreamWithFilter(map, filter) .collect(toMap(Entry::getKey, Entry::getValue)); }
[ "public", "static", "<", "K", ",", "V", ">", "Map", "<", "K", ",", "V", ">", "newFilteredMap", "(", "Map", "<", "K", ",", "V", ">", "map", ",", "Predicate", "<", "?", "super", "Entry", "<", "K", ",", "V", ">", ">", "filter", ")", "{", "return...
New filtered map map. @param <K> the type parameter @param <V> the type parameter @param map the map @param filter the filter @return the map
[ "New", "filtered", "map", "map", "." ]
train
https://github.com/JM-Lab/utils-java8/blob/9e407b3f28a7990418a1e877229fa8344f4d78a5/src/main/java/kr/jm/utils/datastructure/JMMap.java#L385-L389
cdk/cdk
tool/formula/src/main/java/org/openscience/cdk/tools/manipulator/MolecularFormulaManipulator.java
MolecularFormulaManipulator.containsElement
public static boolean containsElement(IMolecularFormula formula, IElement element) { """ True, if the MolecularFormula contains the given element as IIsotope object. @param formula IMolecularFormula molecularFormula @param element The element this MolecularFormula is searched for @return True,...
java
public static boolean containsElement(IMolecularFormula formula, IElement element) { for (IIsotope isotope : formula.isotopes()) { if (element.getSymbol().equals(isotope.getSymbol())) return true; } return false; }
[ "public", "static", "boolean", "containsElement", "(", "IMolecularFormula", "formula", ",", "IElement", "element", ")", "{", "for", "(", "IIsotope", "isotope", ":", "formula", ".", "isotopes", "(", ")", ")", "{", "if", "(", "element", ".", "getSymbol", "(", ...
True, if the MolecularFormula contains the given element as IIsotope object. @param formula IMolecularFormula molecularFormula @param element The element this MolecularFormula is searched for @return True, if the MolecularFormula contains the given element object
[ "True", "if", "the", "MolecularFormula", "contains", "the", "given", "element", "as", "IIsotope", "object", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/formula/src/main/java/org/openscience/cdk/tools/manipulator/MolecularFormulaManipulator.java#L206-L213
VoltDB/voltdb
src/frontend/org/voltdb/planner/ActivePlanRepository.java
ActivePlanRepository.loadOrAddRefPlanFragment
public static long loadOrAddRefPlanFragment(byte[] planHash, byte[] plan, String stmtText) { """ Get the site-local fragment id for a given plan identified by 20-byte sha-1 hash If the plan isn't known to this SPC, load it up. Otherwise addref it. """ Sha1Wrapper key = new Sha1Wrapper(planHash); ...
java
public static long loadOrAddRefPlanFragment(byte[] planHash, byte[] plan, String stmtText) { Sha1Wrapper key = new Sha1Wrapper(planHash); synchronized (FragInfo.class) { FragInfo frag = m_plansByHash.get(key); if (frag == null) { frag = new FragInfo(key, plan, m_n...
[ "public", "static", "long", "loadOrAddRefPlanFragment", "(", "byte", "[", "]", "planHash", ",", "byte", "[", "]", "plan", ",", "String", "stmtText", ")", "{", "Sha1Wrapper", "key", "=", "new", "Sha1Wrapper", "(", "planHash", ")", ";", "synchronized", "(", ...
Get the site-local fragment id for a given plan identified by 20-byte sha-1 hash If the plan isn't known to this SPC, load it up. Otherwise addref it.
[ "Get", "the", "site", "-", "local", "fragment", "id", "for", "a", "given", "plan", "identified", "by", "20", "-", "byte", "sha", "-", "1", "hash", "If", "the", "plan", "isn", "t", "known", "to", "this", "SPC", "load", "it", "up", ".", "Otherwise", ...
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/ActivePlanRepository.java#L100-L129
cache2k/cache2k
cache2k-core/src/main/java/org/cache2k/core/TimingHandler.java
TimingHandler.stopStartTimer
public long stopStartTimer(long _expiryTime, Entry<K,V> e) { """ Convert expiry value to the entry field value, essentially maps 0 to {@link Entry#EXPIRED} since 0 is a virgin entry. Restart the timer if needed. @param _expiryTime calculated expiry time @return sanitized nextRefreshTime for storage in the ent...
java
public long stopStartTimer(long _expiryTime, Entry<K,V> e) { if ((_expiryTime > 0 && _expiryTime < Long.MAX_VALUE) || _expiryTime < 0) { throw new IllegalArgumentException("invalid expiry time, cache is not initialized with expiry: " + Util.formatMillis(_expiryTime)); } return _expiryTime == 0 ? Entry...
[ "public", "long", "stopStartTimer", "(", "long", "_expiryTime", ",", "Entry", "<", "K", ",", "V", ">", "e", ")", "{", "if", "(", "(", "_expiryTime", ">", "0", "&&", "_expiryTime", "<", "Long", ".", "MAX_VALUE", ")", "||", "_expiryTime", "<", "0", ")"...
Convert expiry value to the entry field value, essentially maps 0 to {@link Entry#EXPIRED} since 0 is a virgin entry. Restart the timer if needed. @param _expiryTime calculated expiry time @return sanitized nextRefreshTime for storage in the entry.
[ "Convert", "expiry", "value", "to", "the", "entry", "field", "value", "essentially", "maps", "0", "to", "{", "@link", "Entry#EXPIRED", "}", "since", "0", "is", "a", "virgin", "entry", ".", "Restart", "the", "timer", "if", "needed", "." ]
train
https://github.com/cache2k/cache2k/blob/3c9ccff12608c598c387ec50957089784cc4b618/cache2k-core/src/main/java/org/cache2k/core/TimingHandler.java#L157-L162
i-net-software/jlessc
src/com/inet/lib/less/UrlUtils.java
UrlUtils.appendEncode
private static void appendEncode( CssFormatter formatter, byte[] bytes ) { """ Append the bytes URL encoded. @param formatter current formatter @param bytes the bytes """ for( byte b : bytes ) { if ((b >= 'a' && b <= 'z' ) || (b >= 'A' && b <= 'Z' ) || (b >= '0' && b <= '9' )) { ...
java
private static void appendEncode( CssFormatter formatter, byte[] bytes ) { for( byte b : bytes ) { if ((b >= 'a' && b <= 'z' ) || (b >= 'A' && b <= 'Z' ) || (b >= '0' && b <= '9' )) { formatter.append( (char )b ); } else { switch( b ) { ...
[ "private", "static", "void", "appendEncode", "(", "CssFormatter", "formatter", ",", "byte", "[", "]", "bytes", ")", "{", "for", "(", "byte", "b", ":", "bytes", ")", "{", "if", "(", "(", "b", ">=", "'", "'", "&&", "b", "<=", "'", "'", ")", "||", ...
Append the bytes URL encoded. @param formatter current formatter @param bytes the bytes
[ "Append", "the", "bytes", "URL", "encoded", "." ]
train
https://github.com/i-net-software/jlessc/blob/15b13e1637f6cc2e4d72df021e23ee0ca8d5e629/src/com/inet/lib/less/UrlUtils.java#L254-L273
Mozu/mozu-java
mozu-java-core/src/main/java/com/mozu/api/urls/commerce/orders/PaymentUrl.java
PaymentUrl.performPaymentActionUrl
public static MozuUrl performPaymentActionUrl(String orderId, String paymentId, String responseFields) { """ Get Resource Url for PerformPaymentAction @param orderId Unique identifier of the order. @param paymentId Unique identifier of the payment for which to perform the action. @param responseFields Filtering...
java
public static MozuUrl performPaymentActionUrl(String orderId, String paymentId, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/commerce/orders/{orderId}/payments/{paymentId}/actions?responseFields={responseFields}"); formatter.formatUrl("orderId", orderId); formatter.formatUrl("paym...
[ "public", "static", "MozuUrl", "performPaymentActionUrl", "(", "String", "orderId", ",", "String", "paymentId", ",", "String", "responseFields", ")", "{", "UrlFormatter", "formatter", "=", "new", "UrlFormatter", "(", "\"/api/commerce/orders/{orderId}/payments/{paymentId}/ac...
Get Resource Url for PerformPaymentAction @param orderId Unique identifier of the order. @param paymentId Unique identifier of the payment for which to perform the action. @param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parame...
[ "Get", "Resource", "Url", "for", "PerformPaymentAction" ]
train
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/orders/PaymentUrl.java#L67-L74
deeplearning4j/deeplearning4j
datavec/datavec-data/datavec-data-image/src/main/java/org/datavec/image/loader/Java2DNativeImageLoader.java
Java2DNativeImageLoader.asBufferedImage
public BufferedImage asBufferedImage(INDArray array, int dataType) { """ Converts an INDArray to a BufferedImage. Only intended for images with rank 3. @param array to convert @param dataType from JavaCV (DEPTH_FLOAT, DEPTH_UBYTE, etc), or -1 to use same type as the INDArray @return data copied to a Frame ...
java
public BufferedImage asBufferedImage(INDArray array, int dataType) { return converter2.convert(asFrame(array, dataType)); }
[ "public", "BufferedImage", "asBufferedImage", "(", "INDArray", "array", ",", "int", "dataType", ")", "{", "return", "converter2", ".", "convert", "(", "asFrame", "(", "array", ",", "dataType", ")", ")", ";", "}" ]
Converts an INDArray to a BufferedImage. Only intended for images with rank 3. @param array to convert @param dataType from JavaCV (DEPTH_FLOAT, DEPTH_UBYTE, etc), or -1 to use same type as the INDArray @return data copied to a Frame
[ "Converts", "an", "INDArray", "to", "a", "BufferedImage", ".", "Only", "intended", "for", "images", "with", "rank", "3", "." ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/datavec/datavec-data/datavec-data-image/src/main/java/org/datavec/image/loader/Java2DNativeImageLoader.java#L117-L119
sebastiangraf/perfidix
src/main/java/org/perfidix/ouput/CSVOutput.java
CSVOutput.setUpNewPrintStream
private PrintStream setUpNewPrintStream(final boolean visitorStream, final String... names) { """ Setting up a new {@link PrintStream}. @param visitorStream is the stream for the visitor? Because of line breaks after the results. @param names the elements of the filename @return a {@link PrintStream} ...
java
private PrintStream setUpNewPrintStream(final boolean visitorStream, final String... names) { PrintStream out = System.out; if (folder == null) { if (visitorStream) { out.println(); } } else { final File toWriteTo = new File(folder, buildFile...
[ "private", "PrintStream", "setUpNewPrintStream", "(", "final", "boolean", "visitorStream", ",", "final", "String", "...", "names", ")", "{", "PrintStream", "out", "=", "System", ".", "out", ";", "if", "(", "folder", "==", "null", ")", "{", "if", "(", "visi...
Setting up a new {@link PrintStream}. @param visitorStream is the stream for the visitor? Because of line breaks after the results. @param names the elements of the filename @return a {@link PrintStream} instance @throws FileNotFoundException if something goes wrong with the file
[ "Setting", "up", "a", "new", "{", "@link", "PrintStream", "}", "." ]
train
https://github.com/sebastiangraf/perfidix/blob/f13aa793b6a3055215ed4edbb946c1bb5d564886/src/main/java/org/perfidix/ouput/CSVOutput.java#L188-L214
lightblueseas/file-worker
src/main/java/de/alpharogroup/file/csv/CsvFileExtensions.java
CsvFileExtensions.getCvsAsListMap
public static List<Map<String, String>> getCvsAsListMap(final File input) throws IOException { """ Gets the given cvs file as list of maps. Every map has as key the header from the column and the corresponding value for this line. @param input the input @return the cvs as list map @throws IOException Signa...
java
public static List<Map<String, String>> getCvsAsListMap(final File input) throws IOException { return getCvsAsListMap(input, "ISO-8859-1"); }
[ "public", "static", "List", "<", "Map", "<", "String", ",", "String", ">", ">", "getCvsAsListMap", "(", "final", "File", "input", ")", "throws", "IOException", "{", "return", "getCvsAsListMap", "(", "input", ",", "\"ISO-8859-1\"", ")", ";", "}" ]
Gets the given cvs file as list of maps. Every map has as key the header from the column and the corresponding value for this line. @param input the input @return the cvs as list map @throws IOException Signals that an I/O exception has occurred.
[ "Gets", "the", "given", "cvs", "file", "as", "list", "of", "maps", ".", "Every", "map", "has", "as", "key", "the", "header", "from", "the", "column", "and", "the", "corresponding", "value", "for", "this", "line", "." ]
train
https://github.com/lightblueseas/file-worker/blob/2c81de10fb5d68de64c1abc3ed64ca681ce76da8/src/main/java/de/alpharogroup/file/csv/CsvFileExtensions.java#L161-L164
dbracewell/mango
src/main/java/com/davidbracewell/reflection/Reflect.java
Reflect.onClass
public static Reflect onClass(String clazz) throws Exception { """ Creates an instance of Reflect associated with a class @param clazz The class for reflection as string @return The Reflect object @throws Exception the exception """ return new Reflect(null, ReflectionUtils.getClassForName(clazz)); ...
java
public static Reflect onClass(String clazz) throws Exception { return new Reflect(null, ReflectionUtils.getClassForName(clazz)); }
[ "public", "static", "Reflect", "onClass", "(", "String", "clazz", ")", "throws", "Exception", "{", "return", "new", "Reflect", "(", "null", ",", "ReflectionUtils", ".", "getClassForName", "(", "clazz", ")", ")", ";", "}" ]
Creates an instance of Reflect associated with a class @param clazz The class for reflection as string @return The Reflect object @throws Exception the exception
[ "Creates", "an", "instance", "of", "Reflect", "associated", "with", "a", "class" ]
train
https://github.com/dbracewell/mango/blob/2cec08826f1fccd658694dd03abce10fc97618ec/src/main/java/com/davidbracewell/reflection/Reflect.java#L90-L92
sarl/sarl
main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/quickfix/SARLQuickfixProvider.java
SARLQuickfixProvider.removeExecutableFeature
public void removeExecutableFeature(EObject element, IModificationContext context) throws BadLocationException { """ Remove the exectuable feature. @param element the executable feature to remove. @param context the context of the change. @throws BadLocationException if there is a problem with the location of...
java
public void removeExecutableFeature(EObject element, IModificationContext context) throws BadLocationException { final ICompositeNode node; final SarlAction action = EcoreUtil2.getContainerOfType(element, SarlAction.class); if (action == null) { final XtendMember feature = EcoreUtil2.getContainerOfType(element...
[ "public", "void", "removeExecutableFeature", "(", "EObject", "element", ",", "IModificationContext", "context", ")", "throws", "BadLocationException", "{", "final", "ICompositeNode", "node", ";", "final", "SarlAction", "action", "=", "EcoreUtil2", ".", "getContainerOfTy...
Remove the exectuable feature. @param element the executable feature to remove. @param context the context of the change. @throws BadLocationException if there is a problem with the location of the element.
[ "Remove", "the", "exectuable", "feature", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/quickfix/SARLQuickfixProvider.java#L587-L599
alkacon/opencms-core
src/org/opencms/gwt/CmsIconUtil.java
CmsIconUtil.getFileTypeIconClass
private static String getFileTypeIconClass(String resourceTypeName, String fileName, boolean small) { """ Returns the CSS class for the given filename.<p> @param resourceTypeName the resource type name @param fileName the filename @param small if true, get the CSS class for the small icon, else for the bigges...
java
private static String getFileTypeIconClass(String resourceTypeName, String fileName, boolean small) { if ((fileName != null) && fileName.contains(".")) { int last = fileName.lastIndexOf("."); if (fileName.length() > (last + 1)) { String suffix = fileName.substring(fileNa...
[ "private", "static", "String", "getFileTypeIconClass", "(", "String", "resourceTypeName", ",", "String", "fileName", ",", "boolean", "small", ")", "{", "if", "(", "(", "fileName", "!=", "null", ")", "&&", "fileName", ".", "contains", "(", "\".\"", ")", ")", ...
Returns the CSS class for the given filename.<p> @param resourceTypeName the resource type name @param fileName the filename @param small if true, get the CSS class for the small icon, else for the biggest one available @return the CSS class
[ "Returns", "the", "CSS", "class", "for", "the", "given", "filename", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/gwt/CmsIconUtil.java#L470-L481
google/closure-compiler
src/com/google/debugging/sourcemap/SourceMapGeneratorV3.java
SourceMapGeneratorV3.appendTo
@Override public void appendTo(Appendable out, @Nullable String name) throws IOException { """ Writes out the source map in the following format (line numbers are for reference only and are not part of the format): <pre> 1. { 2. version: 3, 3. file: "out.js", 4. lineCount: 2, 5. sourceRoot:...
java
@Override public void appendTo(Appendable out, @Nullable String name) throws IOException { int maxLine = prepMappings() + 1; // Add the header fields. out.append("{\n"); appendFirstField(out, "version", "3"); if (name != null) { appendField(out, "file", escapeString(name)); } append...
[ "@", "Override", "public", "void", "appendTo", "(", "Appendable", "out", ",", "@", "Nullable", "String", "name", ")", "throws", "IOException", "{", "int", "maxLine", "=", "prepMappings", "(", ")", "+", "1", ";", "// Add the header fields.", "out", ".", "appe...
Writes out the source map in the following format (line numbers are for reference only and are not part of the format): <pre> 1. { 2. version: 3, 3. file: "out.js", 4. lineCount: 2, 5. sourceRoot: "", 6. sources: ["foo.js", "bar.js"], 7. sourcesContent: ["var foo", "var bar"], 8. names: ["src", "...
[ "Writes", "out", "the", "source", "map", "in", "the", "following", "format", "(", "line", "numbers", "are", "for", "reference", "only", "and", "are", "not", "part", "of", "the", "format", ")", ":" ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/debugging/sourcemap/SourceMapGeneratorV3.java#L369-L424
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/db/Record.java
Record.setHandle
public Record setHandle(Object bookmark, int iHandleType) throws DBException { """ Reposition to this record Using this bookmark. <br>NOTE: This is a table method, it is included here in Record for convience!!! @param bookmark The handle to use to position the record. @param iHandleType The type of handle bookm...
java
public Record setHandle(Object bookmark, int iHandleType) throws DBException { return (Record)this.getTable().setHandle(bookmark, iHandleType); }
[ "public", "Record", "setHandle", "(", "Object", "bookmark", ",", "int", "iHandleType", ")", "throws", "DBException", "{", "return", "(", "Record", ")", "this", ".", "getTable", "(", ")", ".", "setHandle", "(", "bookmark", ",", "iHandleType", ")", ";", "}" ...
Reposition to this record Using this bookmark. <br>NOTE: This is a table method, it is included here in Record for convience!!! @param bookmark The handle to use to position the record. @param iHandleType The type of handle bookmark is. @exception DBException FILE_NOT_OPEN. @return <code>valid record</code> - record f...
[ "Reposition", "to", "this", "record", "Using", "this", "bookmark", ".", "<br", ">", "NOTE", ":", "This", "is", "a", "table", "method", "it", "is", "included", "here", "in", "Record", "for", "convience!!!" ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/Record.java#L2604-L2607
vipshop/vjtools
vjkit/src/main/java/com/vip/vjtools/vjkit/text/WildcardMatcher.java
WildcardMatcher.matchPathOne
public static int matchPathOne(String platformDependentPath, String... patterns) { """ Matches path to at least one pattern. Returns index of matched pattern or <code>-1</code> otherwise. @see #matchPath(String, String, char) """ for (int i = 0; i < patterns.length; i++) { if (matchPath(platformDependent...
java
public static int matchPathOne(String platformDependentPath, String... patterns) { for (int i = 0; i < patterns.length; i++) { if (matchPath(platformDependentPath, patterns[i])) { return i; } } return -1; }
[ "public", "static", "int", "matchPathOne", "(", "String", "platformDependentPath", ",", "String", "...", "patterns", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "patterns", ".", "length", ";", "i", "++", ")", "{", "if", "(", "matchPath",...
Matches path to at least one pattern. Returns index of matched pattern or <code>-1</code> otherwise. @see #matchPath(String, String, char)
[ "Matches", "path", "to", "at", "least", "one", "pattern", ".", "Returns", "index", "of", "matched", "pattern", "or", "<code", ">", "-", "1<", "/", "code", ">", "otherwise", "." ]
train
https://github.com/vipshop/vjtools/blob/60c743da35913d72f37f2d79afa90ad2bf73cb89/vjkit/src/main/java/com/vip/vjtools/vjkit/text/WildcardMatcher.java#L162-L169
beangle/beangle3
ioc/spring/src/main/java/org/beangle/inject/spring/config/BeanDefinitionParser.java
BeanDefinitionParser.parseQualifierElement
public void parseQualifierElement(Element ele, AbstractBeanDefinition bd) { """ Parse a qualifier element. @param ele a {@link org.w3c.dom.Element} object. @param bd a {@link org.springframework.beans.factory.support.AbstractBeanDefinition} object. """ String typeName = ele.getAttribute(TYPE_ATTRIBUTE)...
java
public void parseQualifierElement(Element ele, AbstractBeanDefinition bd) { String typeName = ele.getAttribute(TYPE_ATTRIBUTE); if (!StringUtils.hasLength(typeName)) { error("Tag 'qualifier' must have a 'type' attribute", ele); return; } this.parseState.push(new QualifierEntry(typeName)); ...
[ "public", "void", "parseQualifierElement", "(", "Element", "ele", ",", "AbstractBeanDefinition", "bd", ")", "{", "String", "typeName", "=", "ele", ".", "getAttribute", "(", "TYPE_ATTRIBUTE", ")", ";", "if", "(", "!", "StringUtils", ".", "hasLength", "(", "type...
Parse a qualifier element. @param ele a {@link org.w3c.dom.Element} object. @param bd a {@link org.springframework.beans.factory.support.AbstractBeanDefinition} object.
[ "Parse", "a", "qualifier", "element", "." ]
train
https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/ioc/spring/src/main/java/org/beangle/inject/spring/config/BeanDefinitionParser.java#L548-L583
cdk/cdk
storage/io/src/main/java/org/openscience/cdk/io/cml/CMLResolver.java
CMLResolver.resolveEntity
public InputSource resolveEntity(String name, String publicId, String baseURI, String systemId) { """ Not implemented, but uses resolveEntity(String publicId, String systemId) instead. """ return resolveEntity(publicId, systemId); }
java
public InputSource resolveEntity(String name, String publicId, String baseURI, String systemId) { return resolveEntity(publicId, systemId); }
[ "public", "InputSource", "resolveEntity", "(", "String", "name", ",", "String", "publicId", ",", "String", "baseURI", ",", "String", "systemId", ")", "{", "return", "resolveEntity", "(", "publicId", ",", "systemId", ")", ";", "}" ]
Not implemented, but uses resolveEntity(String publicId, String systemId) instead.
[ "Not", "implemented", "but", "uses", "resolveEntity", "(", "String", "publicId", "String", "systemId", ")", "instead", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/storage/io/src/main/java/org/openscience/cdk/io/cml/CMLResolver.java#L58-L60
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/TimeZone.java
TimeZone.getDisplayName
public String getDisplayName(boolean daylight, int style, ULocale locale) { """ Returns a name of this time zone suitable for presentation to the user in the specified locale. If the display name is not available for the locale, then this method returns a string in the localized GMT offset format such as <code...
java
public String getDisplayName(boolean daylight, int style, ULocale locale) { if (style < SHORT || style > GENERIC_LOCATION) { throw new IllegalArgumentException("Illegal style: " + style); } return _getDisplayName(style, daylight, locale); }
[ "public", "String", "getDisplayName", "(", "boolean", "daylight", ",", "int", "style", ",", "ULocale", "locale", ")", "{", "if", "(", "style", "<", "SHORT", "||", "style", ">", "GENERIC_LOCATION", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\...
Returns a name of this time zone suitable for presentation to the user in the specified locale. If the display name is not available for the locale, then this method returns a string in the localized GMT offset format such as <code>GMT[+-]HH:mm</code>. @param daylight if true, return the daylight savings name. @param s...
[ "Returns", "a", "name", "of", "this", "time", "zone", "suitable", "for", "presentation", "to", "the", "user", "in", "the", "specified", "locale", ".", "If", "the", "display", "name", "is", "not", "available", "for", "the", "locale", "then", "this", "method...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/TimeZone.java#L460-L466
voldemort/voldemort
src/java/voldemort/server/protocol/admin/AdminServiceRequestHandler.java
AdminServiceRequestHandler.swapStore
private String swapStore(String storeName, String directory) throws VoldemortException { """ Given a read-only store name and a directory, swaps it in while returning the directory path being swapped out @param storeName The name of the read-only store @param directory The directory being swapped in @return ...
java
private String swapStore(String storeName, String directory) throws VoldemortException { ReadOnlyStorageEngine store = getReadOnlyStorageEngine(metadataStore, storeRepository, storeName...
[ "private", "String", "swapStore", "(", "String", "storeName", ",", "String", "directory", ")", "throws", "VoldemortException", "{", "ReadOnlyStorageEngine", "store", "=", "getReadOnlyStorageEngine", "(", "metadataStore", ",", "storeRepository", ",", "storeName", ")", ...
Given a read-only store name and a directory, swaps it in while returning the directory path being swapped out @param storeName The name of the read-only store @param directory The directory being swapped in @return The directory path which was swapped out @throws VoldemortException
[ "Given", "a", "read", "-", "only", "store", "name", "and", "a", "directory", "swaps", "it", "in", "while", "returning", "the", "directory", "path", "being", "swapped", "out" ]
train
https://github.com/voldemort/voldemort/blob/a7dbdea58032021361680faacf2782cf981c5332/src/java/voldemort/server/protocol/admin/AdminServiceRequestHandler.java#L996-L1015
lessthanoptimal/ejml
main/ejml-zdense/src/org/ejml/dense/row/RandomMatrices_ZDRM.java
RandomMatrices_ZDRM.fillUniform
public static void fillUniform(ZMatrixD1 mat , double min , double max , Random rand ) { """ <p> Sets each element in the matrix to a value drawn from an uniform distribution from 'min' to 'max' inclusive. </p> @param min The minimum value each element can be. @param max The maximum value each element can be...
java
public static void fillUniform(ZMatrixD1 mat , double min , double max , Random rand ) { double d[] = mat.getData(); int size = mat.getDataLength(); double r = max-min; for( int i = 0; i < size; i++ ) { d[i] = r*rand.nextDouble()+min; } }
[ "public", "static", "void", "fillUniform", "(", "ZMatrixD1", "mat", ",", "double", "min", ",", "double", "max", ",", "Random", "rand", ")", "{", "double", "d", "[", "]", "=", "mat", ".", "getData", "(", ")", ";", "int", "size", "=", "mat", ".", "ge...
<p> Sets each element in the matrix to a value drawn from an uniform distribution from 'min' to 'max' inclusive. </p> @param min The minimum value each element can be. @param max The maximum value each element can be. @param mat The matrix who is to be randomized. Modified. @param rand Random number generator used to ...
[ "<p", ">", "Sets", "each", "element", "in", "the", "matrix", "to", "a", "value", "drawn", "from", "an", "uniform", "distribution", "from", "min", "to", "max", "inclusive", ".", "<", "/", "p", ">" ]
train
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-zdense/src/org/ejml/dense/row/RandomMatrices_ZDRM.java#L91-L101
xwiki/xwiki-commons
xwiki-commons-core/xwiki-commons-cache/xwiki-commons-cache-infinispan/src/main/java/org/xwiki/cache/infinispan/internal/InfinispanCache.java
InfinispanCache.cacheEntryInserted
private void cacheEntryInserted(String key, T value) { """ Dispatch data insertion event. @param key the entry key. @param value the entry value. """ InfinispanCacheEntryEvent<T> event = new InfinispanCacheEntryEvent<>(new InfinispanCacheEntry<T>(this, key, value)); T previousV...
java
private void cacheEntryInserted(String key, T value) { InfinispanCacheEntryEvent<T> event = new InfinispanCacheEntryEvent<>(new InfinispanCacheEntry<T>(this, key, value)); T previousValue = this.preEventData.get(key); if (previousValue != null) { if (previousValue !...
[ "private", "void", "cacheEntryInserted", "(", "String", "key", ",", "T", "value", ")", "{", "InfinispanCacheEntryEvent", "<", "T", ">", "event", "=", "new", "InfinispanCacheEntryEvent", "<>", "(", "new", "InfinispanCacheEntry", "<", "T", ">", "(", "this", ",",...
Dispatch data insertion event. @param key the entry key. @param value the entry value.
[ "Dispatch", "data", "insertion", "event", "." ]
train
https://github.com/xwiki/xwiki-commons/blob/5374d8c6d966588c1eac7392c83da610dfb9f129/xwiki-commons-core/xwiki-commons-cache/xwiki-commons-cache-infinispan/src/main/java/org/xwiki/cache/infinispan/internal/InfinispanCache.java#L200-L216
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/xml/importing/BaseXmlImporter.java
BaseXmlImporter.isParent
private boolean isParent(ItemData data, ItemData parent) { """ Check if item <b>parent</b> is parent item of item <b>data</b>. @param data - Possible child ItemData. @param parent - Possible parent ItemData. @return True if parent of both ItemData the same. """ String id1 = data.getParentIdentifier(...
java
private boolean isParent(ItemData data, ItemData parent) { String id1 = data.getParentIdentifier(); String id2 = parent.getIdentifier(); if (id1 == id2) // NOSONAR return true; if (id1 == null && id2 != null) return false; return id1 != null && id1.equals(id2); }
[ "private", "boolean", "isParent", "(", "ItemData", "data", ",", "ItemData", "parent", ")", "{", "String", "id1", "=", "data", ".", "getParentIdentifier", "(", ")", ";", "String", "id2", "=", "parent", ".", "getIdentifier", "(", ")", ";", "if", "(", "id1"...
Check if item <b>parent</b> is parent item of item <b>data</b>. @param data - Possible child ItemData. @param parent - Possible parent ItemData. @return True if parent of both ItemData the same.
[ "Check", "if", "item", "<b", ">", "parent<", "/", "b", ">", "is", "parent", "item", "of", "item", "<b", ">", "data<", "/", "b", ">", "." ]
train
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/xml/importing/BaseXmlImporter.java#L667-L676
before/quality-check
modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java
Check.notNull
@Throws(IllegalNullArgumentException.class) public static <T> T notNull(@Nonnull final T reference, @Nullable final String name) { """ Ensures that an object reference passed as a parameter to the calling method is not {@code null}. @param reference an object reference @param name name of object reference (...
java
@Throws(IllegalNullArgumentException.class) public static <T> T notNull(@Nonnull final T reference, @Nullable final String name) { if (reference == null) { throw new IllegalNullArgumentException(name); } return reference; }
[ "@", "Throws", "(", "IllegalNullArgumentException", ".", "class", ")", "public", "static", "<", "T", ">", "T", "notNull", "(", "@", "Nonnull", "final", "T", "reference", ",", "@", "Nullable", "final", "String", "name", ")", "{", "if", "(", "reference", "...
Ensures that an object reference passed as a parameter to the calling method is not {@code null}. @param reference an object reference @param name name of object reference (in source code) @return the non-null reference that was validated @throws IllegalNullArgumentException if the given argument {@code reference} is ...
[ "Ensures", "that", "an", "object", "reference", "passed", "as", "a", "parameter", "to", "the", "calling", "method", "is", "not", "{", "@code", "null", "}", "." ]
train
https://github.com/before/quality-check/blob/a75c32c39434ddb1f89bece57acae0536724c15a/modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java#L2979-L2985
DV8FromTheWorld/JDA
src/main/java/net/dv8tion/jda/core/MessageBuilder.java
MessageBuilder.replaceLast
public MessageBuilder replaceLast(String target, String replacement) { """ Replaces the last substring that matches the target string with the specified replacement string. @param target the sequence of char values to be replaced @param replacement the replacement sequence of char values @return The Mes...
java
public MessageBuilder replaceLast(String target, String replacement) { int index = builder.lastIndexOf(target); if (index != -1) { builder.replace(index, index + target.length(), replacement); } return this; }
[ "public", "MessageBuilder", "replaceLast", "(", "String", "target", ",", "String", "replacement", ")", "{", "int", "index", "=", "builder", ".", "lastIndexOf", "(", "target", ")", ";", "if", "(", "index", "!=", "-", "1", ")", "{", "builder", ".", "replac...
Replaces the last substring that matches the target string with the specified replacement string. @param target the sequence of char values to be replaced @param replacement the replacement sequence of char values @return The MessageBuilder instance. Useful for chaining.
[ "Replaces", "the", "last", "substring", "that", "matches", "the", "target", "string", "with", "the", "specified", "replacement", "string", "." ]
train
https://github.com/DV8FromTheWorld/JDA/blob/8ecbbe354d03f6bf448411bba573d0d4c268b560/src/main/java/net/dv8tion/jda/core/MessageBuilder.java#L430-L438
percolate/caffeine
caffeine/src/main/java/com/percolate/caffeine/ViewUtils.java
ViewUtils.showView
public static void showView(Activity context, int id) { """ Sets visibility of the given view to <code>View.VISIBLE</code>. @param context The current Context or Activity that this method is called from. @param id R.id.xxxx value for the view to show. """ if (context != null) { Vie...
java
public static void showView(Activity context, int id) { if (context != null) { View view = context.findViewById(id); if (view != null) { view.setVisibility(View.VISIBLE); } else { Log.e("Caffeine", "View does not exist. Could not show it."); ...
[ "public", "static", "void", "showView", "(", "Activity", "context", ",", "int", "id", ")", "{", "if", "(", "context", "!=", "null", ")", "{", "View", "view", "=", "context", ".", "findViewById", "(", "id", ")", ";", "if", "(", "view", "!=", "null", ...
Sets visibility of the given view to <code>View.VISIBLE</code>. @param context The current Context or Activity that this method is called from. @param id R.id.xxxx value for the view to show.
[ "Sets", "visibility", "of", "the", "given", "view", "to", "<code", ">", "View", ".", "VISIBLE<", "/", "code", ">", "." ]
train
https://github.com/percolate/caffeine/blob/e2265cab474a6397f4d75b1ed928c356a7b9672e/caffeine/src/main/java/com/percolate/caffeine/ViewUtils.java#L266-L275
querydsl/querydsl
querydsl-core/src/main/java/com/querydsl/core/util/BeanMap.java
BeanMap.convertType
@SuppressWarnings( { """ Converts the given value to the given type. First, reflection is is used to find a public constructor declared by the given class that takes one argument, which must be the precise type of the given value. If such a constructor is found, a new object is created by passing the given v...
java
@SuppressWarnings({ "rawtypes", "unchecked" }) protected Object convertType(Class<?> newType, Object value) throws InstantiationException, IllegalAccessException, InvocationTargetException { // try call constructor Class<?>[] types = {value.getClass()}; try { Constructor<?> const...
[ "@", "SuppressWarnings", "(", "{", "\"rawtypes\"", ",", "\"unchecked\"", "}", ")", "protected", "Object", "convertType", "(", "Class", "<", "?", ">", "newType", ",", "Object", "value", ")", "throws", "InstantiationException", ",", "IllegalAccessException", ",", ...
Converts the given value to the given type. First, reflection is is used to find a public constructor declared by the given class that takes one argument, which must be the precise type of the given value. If such a constructor is found, a new object is created by passing the given value to that constructor, and the ...
[ "Converts", "the", "given", "value", "to", "the", "given", "type", ".", "First", "reflection", "is", "is", "used", "to", "find", "a", "public", "constructor", "declared", "by", "the", "given", "class", "that", "takes", "one", "argument", "which", "must", "...
train
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-core/src/main/java/com/querydsl/core/util/BeanMap.java#L700-L716
EdwardRaff/JSAT
JSAT/src/jsat/io/LIBSVMLoader.java
LIBSVMLoader.getWriter
public static DataWriter getWriter(OutputStream out, int dim, DataWriter.DataSetType type) throws IOException { """ Returns a DataWriter object which can be used to stream a set of arbitrary datapoints into the given output stream. This works in a thread safe manner.<br> Categorical information dose not need to...
java
public static DataWriter getWriter(OutputStream out, int dim, DataWriter.DataSetType type) throws IOException { DataWriter dw = new DataWriter(out, new CategoricalData[0], dim, type) { @Override protected void writeHeader(CategoricalData[] catInfo, int dim, DataWriter.DataSet...
[ "public", "static", "DataWriter", "getWriter", "(", "OutputStream", "out", ",", "int", "dim", ",", "DataWriter", ".", "DataSetType", "type", ")", "throws", "IOException", "{", "DataWriter", "dw", "=", "new", "DataWriter", "(", "out", ",", "new", "CategoricalDa...
Returns a DataWriter object which can be used to stream a set of arbitrary datapoints into the given output stream. This works in a thread safe manner.<br> Categorical information dose not need to be specified since LIBSVM files can't store categorical features. @param out the location to store all the data @param dim...
[ "Returns", "a", "DataWriter", "object", "which", "can", "be", "used", "to", "stream", "a", "set", "of", "arbitrary", "datapoints", "into", "the", "given", "output", "stream", ".", "This", "works", "in", "a", "thread", "safe", "manner", ".", "<br", ">", "...
train
https://github.com/EdwardRaff/JSAT/blob/0ff53b7b39684b2379cc1da522f5b3a954b15cfb/JSAT/src/jsat/io/LIBSVMLoader.java#L576-L614
lucee/Lucee
core/src/main/java/lucee/runtime/schedule/StorageUtil.java
StorageUtil.setFile
public void setFile(Element el, String key, Resource value) { """ sets a file value to a XML Element @param el Element to set value on it @param key key to set @param value value to set """ if (value != null && value.toString().length() > 0) el.setAttribute(key, value.getAbsolutePath()); }
java
public void setFile(Element el, String key, Resource value) { if (value != null && value.toString().length() > 0) el.setAttribute(key, value.getAbsolutePath()); }
[ "public", "void", "setFile", "(", "Element", "el", ",", "String", "key", ",", "Resource", "value", ")", "{", "if", "(", "value", "!=", "null", "&&", "value", ".", "toString", "(", ")", ".", "length", "(", ")", ">", "0", ")", "el", ".", "setAttribut...
sets a file value to a XML Element @param el Element to set value on it @param key key to set @param value value to set
[ "sets", "a", "file", "value", "to", "a", "XML", "Element" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/schedule/StorageUtil.java#L379-L381
tvesalainen/util
vfs/src/main/java/org/vesalainen/vfs/VirtualFile.java
VirtualFile.writeView
ByteBuffer writeView(int position, int needs) throws IOException { """ Returns view of content. @return ByteBuffer position set to given position limit is position+needs. """ int waterMark = position+needs; if (waterMark > content.capacity()) { if (refSet.containsKey(co...
java
ByteBuffer writeView(int position, int needs) throws IOException { int waterMark = position+needs; if (waterMark > content.capacity()) { if (refSet.containsKey(content)) { throw new IOException("cannot grow file because of writable mapping for c...
[ "ByteBuffer", "writeView", "(", "int", "position", ",", "int", "needs", ")", "throws", "IOException", "{", "int", "waterMark", "=", "position", "+", "needs", ";", "if", "(", "waterMark", ">", "content", ".", "capacity", "(", ")", ")", "{", "if", "(", "...
Returns view of content. @return ByteBuffer position set to given position limit is position+needs.
[ "Returns", "view", "of", "content", "." ]
train
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/vfs/src/main/java/org/vesalainen/vfs/VirtualFile.java#L336-L356
wuman/orientdb-android
core/src/main/java/com/orientechnologies/orient/core/storage/impl/local/OClusterLocal.java
OClusterLocal.updateDataSegmentPosition
public void updateDataSegmentPosition(long iPosition, final int iDataSegmentId, final long iDataSegmentPosition) throws IOException { """ Update position in data segment (usually on defrag) @throws IOException """ iPosition = iPosition * RECORD_SIZE; acquireExclusiveLock(); try { ...
java
public void updateDataSegmentPosition(long iPosition, final int iDataSegmentId, final long iDataSegmentPosition) throws IOException { iPosition = iPosition * RECORD_SIZE; acquireExclusiveLock(); try { final long[] pos = fileSegment.getRelativePosition(iPosition); final OFile f ...
[ "public", "void", "updateDataSegmentPosition", "(", "long", "iPosition", ",", "final", "int", "iDataSegmentId", ",", "final", "long", "iDataSegmentPosition", ")", "throws", "IOException", "{", "iPosition", "=", "iPosition", "*", "RECORD_SIZE", ";", "acquireExclusiveLo...
Update position in data segment (usually on defrag) @throws IOException
[ "Update", "position", "in", "data", "segment", "(", "usually", "on", "defrag", ")" ]
train
https://github.com/wuman/orientdb-android/blob/ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0/core/src/main/java/com/orientechnologies/orient/core/storage/impl/local/OClusterLocal.java#L227-L245
salesforce/Argus
ArgusWebServices/src/main/java/com/salesforce/dva/argus/ws/resources/DashboardResources.java
DashboardResources.updateDashboard
@PUT @Produces(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON) @Path("/ { """ Updates a dashboard having the given ID. @param req The HTTP request. @param dashboardId The dashboard ID to update. @param dashboardDto The updated date. @return The updated dashboard DTO...
java
@PUT @Produces(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON) @Path("/{dashboardId}") @Description("Updates a dashboard having the given ID.") public DashboardDto updateDashboard(@Context HttpServletRequest req, @PathParam("dashboardId") BigInteger dashboardId, DashboardDto dashboardDto) { ...
[ "@", "PUT", "@", "Produces", "(", "MediaType", ".", "APPLICATION_JSON", ")", "@", "Consumes", "(", "MediaType", ".", "APPLICATION_JSON", ")", "@", "Path", "(", "\"/{dashboardId}\"", ")", "@", "Description", "(", "\"Updates a dashboard having the given ID.\"", ")", ...
Updates a dashboard having the given ID. @param req The HTTP request. @param dashboardId The dashboard ID to update. @param dashboardDto The updated date. @return The updated dashboard DTO. @throws WebApplicationException If an error occurs.
[ "Updates", "a", "dashboard", "having", "the", "given", "ID", "." ]
train
https://github.com/salesforce/Argus/blob/121b59a268da264316cded6a3e9271366a23cd86/ArgusWebServices/src/main/java/com/salesforce/dva/argus/ws/resources/DashboardResources.java#L312-L336
structr/structr
structr-core/src/main/java/org/structr/core/graph/GraphObjectModificationState.java
GraphObjectModificationState.doInnerCallback
public boolean doInnerCallback(ModificationQueue modificationQueue, SecurityContext securityContext, ErrorBuffer errorBuffer) throws FrameworkException { """ Call beforeModification/Creation/Deletion methods. @param modificationQueue @param securityContext @param errorBuffer @return valid @throws FrameworkE...
java
public boolean doInnerCallback(ModificationQueue modificationQueue, SecurityContext securityContext, ErrorBuffer errorBuffer) throws FrameworkException { // check for modification propagation along the relationships if ((status & STATE_PROPAGATING_MODIFICATION) == STATE_PROPAGATING_MODIFICATION && object instanceo...
[ "public", "boolean", "doInnerCallback", "(", "ModificationQueue", "modificationQueue", ",", "SecurityContext", "securityContext", ",", "ErrorBuffer", "errorBuffer", ")", "throws", "FrameworkException", "{", "// check for modification propagation along the relationships", "if", "(...
Call beforeModification/Creation/Deletion methods. @param modificationQueue @param securityContext @param errorBuffer @return valid @throws FrameworkException
[ "Call", "beforeModification", "/", "Creation", "/", "Deletion", "methods", "." ]
train
https://github.com/structr/structr/blob/c111a1d0c0201c7fea5574ed69aa5a5053185a97/structr-core/src/main/java/org/structr/core/graph/GraphObjectModificationState.java#L284-L351
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/persist/HsqlProperties.java
HsqlProperties.argArrayToProps
public static HsqlProperties argArrayToProps(String[] arg, String type) { """ Creates and populates an HsqlProperties Object from the arguments array of a Main method. Properties are in the form of "-key value" pairs. Each key is prefixed with the type argument and a dot before being inserted into the propertie...
java
public static HsqlProperties argArrayToProps(String[] arg, String type) { HsqlProperties props = new HsqlProperties(); for (int i = 0; i < arg.length; i++) { String p = arg[i]; if (p.equals("--help") || p.equals("-help")) { props.addError(NO_VALUE_FOR_KEY, p.su...
[ "public", "static", "HsqlProperties", "argArrayToProps", "(", "String", "[", "]", "arg", ",", "String", "type", ")", "{", "HsqlProperties", "props", "=", "new", "HsqlProperties", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "arg", "....
Creates and populates an HsqlProperties Object from the arguments array of a Main method. Properties are in the form of "-key value" pairs. Each key is prefixed with the type argument and a dot before being inserted into the properties Object. <p> "--help" is treated as a key with no value and not inserted.
[ "Creates", "and", "populates", "an", "HsqlProperties", "Object", "from", "the", "arguments", "array", "of", "a", "Main", "method", ".", "Properties", "are", "in", "the", "form", "of", "-", "key", "value", "pairs", ".", "Each", "key", "is", "prefixed", "wit...
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/persist/HsqlProperties.java#L333-L360
apache/incubator-heron
heron/healthmgr/src/java/org/apache/heron/healthmgr/sensors/BufferSizeSensor.java
BufferSizeSensor.fetch
@Override public Collection<Measurement> fetch() { """ The buffer size as provided by tracker @return buffer size measurements """ Collection<Measurement> result = new ArrayList<>(); Instant now = context.checkpoint(); List<String> boltComponents = physicalPlanProvider.getBoltNames(); Dur...
java
@Override public Collection<Measurement> fetch() { Collection<Measurement> result = new ArrayList<>(); Instant now = context.checkpoint(); List<String> boltComponents = physicalPlanProvider.getBoltNames(); Duration duration = getDuration(); for (String component : boltComponents) { String[...
[ "@", "Override", "public", "Collection", "<", "Measurement", ">", "fetch", "(", ")", "{", "Collection", "<", "Measurement", ">", "result", "=", "new", "ArrayList", "<>", "(", ")", ";", "Instant", "now", "=", "context", ".", "checkpoint", "(", ")", ";", ...
The buffer size as provided by tracker @return buffer size measurements
[ "The", "buffer", "size", "as", "provided", "by", "tracker" ]
train
https://github.com/apache/incubator-heron/blob/776abe2b5a45b93a0eb957fd65cbc149d901a92a/heron/healthmgr/src/java/org/apache/heron/healthmgr/sensors/BufferSizeSensor.java#L61-L93
i-net-software/jlessc
src/com/inet/lib/less/CssFormatter.java
CssFormatter.appendHex
void appendHex( int value, int digits ) { """ Append an hex value to the output. @param value the value @param digits the digits to write. """ if( digits > 1 ) { appendHex( value >>> 4, digits-1 ); } output.append( DIGITS[ value & 0xF ] ); }
java
void appendHex( int value, int digits ) { if( digits > 1 ) { appendHex( value >>> 4, digits-1 ); } output.append( DIGITS[ value & 0xF ] ); }
[ "void", "appendHex", "(", "int", "value", ",", "int", "digits", ")", "{", "if", "(", "digits", ">", "1", ")", "{", "appendHex", "(", "value", ">>>", "4", ",", "digits", "-", "1", ")", ";", "}", "output", ".", "append", "(", "DIGITS", "[", "value"...
Append an hex value to the output. @param value the value @param digits the digits to write.
[ "Append", "an", "hex", "value", "to", "the", "output", "." ]
train
https://github.com/i-net-software/jlessc/blob/15b13e1637f6cc2e4d72df021e23ee0ca8d5e629/src/com/inet/lib/less/CssFormatter.java#L641-L646
google/closure-compiler
src/com/google/javascript/rhino/HamtPMap.java
HamtPMap.pivot
@SuppressWarnings("unchecked") private HamtPMap<K, V> pivot(K key, int hash) { """ Returns a new version of this map with the given key at the root, and the root element moved to some deeper node. If the key is not found, then value will be null. """ return pivot(key, hash, null, (V[]) new Object[1]); ...
java
@SuppressWarnings("unchecked") private HamtPMap<K, V> pivot(K key, int hash) { return pivot(key, hash, null, (V[]) new Object[1]); }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "private", "HamtPMap", "<", "K", ",", "V", ">", "pivot", "(", "K", "key", ",", "int", "hash", ")", "{", "return", "pivot", "(", "key", ",", "hash", ",", "null", ",", "(", "V", "[", "]", ")", "ne...
Returns a new version of this map with the given key at the root, and the root element moved to some deeper node. If the key is not found, then value will be null.
[ "Returns", "a", "new", "version", "of", "this", "map", "with", "the", "given", "key", "at", "the", "root", "and", "the", "root", "element", "moved", "to", "some", "deeper", "node", ".", "If", "the", "key", "is", "not", "found", "then", "value", "will",...
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/rhino/HamtPMap.java#L475-L478
Azure/azure-sdk-for-java
cognitiveservices/data-plane/vision/computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/implementation/ComputerVisionImpl.java
ComputerVisionImpl.analyzeImageByDomainWithServiceResponseAsync
public Observable<ServiceResponse<DomainModelResults>> analyzeImageByDomainWithServiceResponseAsync(String model, String url, AnalyzeImageByDomainOptionalParameter analyzeImageByDomainOptionalParameter) { """ This operation recognizes content within an image by applying a domain-specific model. The list of domain...
java
public Observable<ServiceResponse<DomainModelResults>> analyzeImageByDomainWithServiceResponseAsync(String model, String url, AnalyzeImageByDomainOptionalParameter analyzeImageByDomainOptionalParameter) { if (this.client.endpoint() == null) { throw new IllegalArgumentException("Parameter this.client...
[ "public", "Observable", "<", "ServiceResponse", "<", "DomainModelResults", ">", ">", "analyzeImageByDomainWithServiceResponseAsync", "(", "String", "model", ",", "String", "url", ",", "AnalyzeImageByDomainOptionalParameter", "analyzeImageByDomainOptionalParameter", ")", "{", ...
This operation recognizes content within an image by applying a domain-specific model. The list of domain-specific models that are supported by the Computer Vision API can be retrieved using the /models GET request. Currently, the API only provides a single domain-specific model: celebrities. Two input methods are su...
[ "This", "operation", "recognizes", "content", "within", "an", "image", "by", "applying", "a", "domain", "-", "specific", "model", ".", "The", "list", "of", "domain", "-", "specific", "models", "that", "are", "supported", "by", "the", "Computer", "Vision", "A...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/vision/computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/implementation/ComputerVisionImpl.java#L1459-L1472
census-instrumentation/opencensus-java
exporters/stats/stackdriver/src/main/java/io/opencensus/exporter/stats/stackdriver/StackdriverStatsExporter.java
StackdriverStatsExporter.createAndRegisterWithProjectId
@Deprecated public static void createAndRegisterWithProjectId(String projectId, Duration exportInterval) throws IOException { """ Creates a Stackdriver Stats exporter for an explicit project ID, with default Monitored Resource. <p>Only one Stackdriver exporter can be created. <p>This uses the defaul...
java
@Deprecated public static void createAndRegisterWithProjectId(String projectId, Duration exportInterval) throws IOException { checkNotNull(projectId, "projectId"); checkNotNull(exportInterval, "exportInterval"); createInternal( null, projectId, exportInterval, DEFAULT_RESOURCE, null, DEFAULT...
[ "@", "Deprecated", "public", "static", "void", "createAndRegisterWithProjectId", "(", "String", "projectId", ",", "Duration", "exportInterval", ")", "throws", "IOException", "{", "checkNotNull", "(", "projectId", ",", "\"projectId\"", ")", ";", "checkNotNull", "(", ...
Creates a Stackdriver Stats exporter for an explicit project ID, with default Monitored Resource. <p>Only one Stackdriver exporter can be created. <p>This uses the default application credentials. See {@link GoogleCredentials#getApplicationDefault}. <p>This is equivalent with: <pre>{@code StackdriverStatsExporter.c...
[ "Creates", "a", "Stackdriver", "Stats", "exporter", "for", "an", "explicit", "project", "ID", "with", "default", "Monitored", "Resource", "." ]
train
https://github.com/census-instrumentation/opencensus-java/blob/deefac9bed77e40a2297bff1ca5ec5aa48a5f755/exporters/stats/stackdriver/src/main/java/io/opencensus/exporter/stats/stackdriver/StackdriverStatsExporter.java#L164-L171