repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
partition
stringclasses
1 value
astrapi69/mystic-crypt
crypt-core/src/main/java/de/alpharogroup/crypto/simple/SimpleCrypt.java
SimpleCrypt.decode
public static String decode(final String toDecode, final int relocate) { final StringBuffer sb = new StringBuffer(); final char[] encrypt = toDecode.toCharArray(); final int arraylength = encrypt.length; for (int i = 0; i < arraylength; i++) { final char a = (char)(encrypt[i] - relocate); sb.append(a);...
java
public static String decode(final String toDecode, final int relocate) { final StringBuffer sb = new StringBuffer(); final char[] encrypt = toDecode.toCharArray(); final int arraylength = encrypt.length; for (int i = 0; i < arraylength; i++) { final char a = (char)(encrypt[i] - relocate); sb.append(a);...
[ "public", "static", "String", "decode", "(", "final", "String", "toDecode", ",", "final", "int", "relocate", ")", "{", "final", "StringBuffer", "sb", "=", "new", "StringBuffer", "(", ")", ";", "final", "char", "[", "]", "encrypt", "=", "toDecode", ".", "...
Decrypt the given String. @param toDecode The String to decrypt. @param relocate How much places to switch. @return The decrypted String.
[ "Decrypt", "the", "given", "String", "." ]
7f51ef5e4457e24de7ff391f10bfc5609e6f1a34
https://github.com/astrapi69/mystic-crypt/blob/7f51ef5e4457e24de7ff391f10bfc5609e6f1a34/crypt-core/src/main/java/de/alpharogroup/crypto/simple/SimpleCrypt.java#L60-L71
train
astrapi69/mystic-crypt
crypt-core/src/main/java/de/alpharogroup/crypto/simple/SimpleCrypt.java
SimpleCrypt.encode
public static String encode(final String secret, final int relocate) { final StringBuffer sb = new StringBuffer(); final char[] encrypt = secret.toCharArray(); final int arraylength = encrypt.length; for (int i = 0; i < arraylength; i++) { final char a = (char)(encrypt[i] + relocate); sb.append(a); }...
java
public static String encode(final String secret, final int relocate) { final StringBuffer sb = new StringBuffer(); final char[] encrypt = secret.toCharArray(); final int arraylength = encrypt.length; for (int i = 0; i < arraylength; i++) { final char a = (char)(encrypt[i] + relocate); sb.append(a); }...
[ "public", "static", "String", "encode", "(", "final", "String", "secret", ",", "final", "int", "relocate", ")", "{", "final", "StringBuffer", "sb", "=", "new", "StringBuffer", "(", ")", ";", "final", "char", "[", "]", "encrypt", "=", "secret", ".", "toCh...
Encrypt the given String. @param secret The String to encrypt. @param relocate How much places to switch. @return The encrypted String.
[ "Encrypt", "the", "given", "String", "." ]
7f51ef5e4457e24de7ff391f10bfc5609e6f1a34
https://github.com/astrapi69/mystic-crypt/blob/7f51ef5e4457e24de7ff391f10bfc5609e6f1a34/crypt-core/src/main/java/de/alpharogroup/crypto/simple/SimpleCrypt.java#L94-L105
train
astrapi69/mystic-crypt
crypt-data/src/main/java/de/alpharogroup/crypto/key/reader/PublicKeyReader.java
PublicKeyReader.readPemPublicKey
public static PublicKey readPemPublicKey(final File file) throws IOException, NoSuchAlgorithmException, InvalidKeySpecException, NoSuchProviderException { final String publicKeyAsString = readPemFileAsBase64(file); final byte[] decoded = Base64.decodeBase64(publicKeyAsString); return readPublicKey(decoded); }
java
public static PublicKey readPemPublicKey(final File file) throws IOException, NoSuchAlgorithmException, InvalidKeySpecException, NoSuchProviderException { final String publicKeyAsString = readPemFileAsBase64(file); final byte[] decoded = Base64.decodeBase64(publicKeyAsString); return readPublicKey(decoded); }
[ "public", "static", "PublicKey", "readPemPublicKey", "(", "final", "File", "file", ")", "throws", "IOException", ",", "NoSuchAlgorithmException", ",", "InvalidKeySpecException", ",", "NoSuchProviderException", "{", "final", "String", "publicKeyAsString", "=", "readPemFile...
reads a public key from a file. @param file the file @return the public key @throws IOException Signals that an I/O exception has occurred. @throws NoSuchAlgorithmException is thrown if instantiation of the cypher object fails. @throws InvalidKeySpecException is thrown if generation of the SecretKey object fails. @thr...
[ "reads", "a", "public", "key", "from", "a", "file", "." ]
7f51ef5e4457e24de7ff391f10bfc5609e6f1a34
https://github.com/astrapi69/mystic-crypt/blob/7f51ef5e4457e24de7ff391f10bfc5609e6f1a34/crypt-data/src/main/java/de/alpharogroup/crypto/key/reader/PublicKeyReader.java#L141-L147
train
astrapi69/mystic-crypt
crypt-data/src/main/java/de/alpharogroup/crypto/key/PublicKeyExtensions.java
PublicKeyExtensions.toPemFormat
public static String toPemFormat(final PublicKey publicKey) { final String publicKeyAsBase64String = toBase64(publicKey); final List<String> parts = StringExtensions.splitByFixedLength(publicKeyAsBase64String, 64); final StringBuilder sb = new StringBuilder(); sb.append(PublicKeyReader.BEGIN_PUBLIC_KEY_PREFIX...
java
public static String toPemFormat(final PublicKey publicKey) { final String publicKeyAsBase64String = toBase64(publicKey); final List<String> parts = StringExtensions.splitByFixedLength(publicKeyAsBase64String, 64); final StringBuilder sb = new StringBuilder(); sb.append(PublicKeyReader.BEGIN_PUBLIC_KEY_PREFIX...
[ "public", "static", "String", "toPemFormat", "(", "final", "PublicKey", "publicKey", ")", "{", "final", "String", "publicKeyAsBase64String", "=", "toBase64", "(", "publicKey", ")", ";", "final", "List", "<", "String", ">", "parts", "=", "StringExtensions", ".", ...
Transform the public key in pem format. @param publicKey the public key @return the public key in pem format
[ "Transform", "the", "public", "key", "in", "pem", "format", "." ]
7f51ef5e4457e24de7ff391f10bfc5609e6f1a34
https://github.com/astrapi69/mystic-crypt/blob/7f51ef5e4457e24de7ff391f10bfc5609e6f1a34/crypt-data/src/main/java/de/alpharogroup/crypto/key/PublicKeyExtensions.java#L112-L127
train
phax/ph-web
ph-web/src/main/java/com/helger/web/fileupload/io/AbstractThresholdingOutputStream.java
AbstractThresholdingOutputStream.checkThreshold
protected void checkThreshold (final int nCount) throws IOException { if (!m_bThresholdExceeded && (m_nWritten + nCount > m_nThreshold)) { m_bThresholdExceeded = true; onThresholdReached (); } }
java
protected void checkThreshold (final int nCount) throws IOException { if (!m_bThresholdExceeded && (m_nWritten + nCount > m_nThreshold)) { m_bThresholdExceeded = true; onThresholdReached (); } }
[ "protected", "void", "checkThreshold", "(", "final", "int", "nCount", ")", "throws", "IOException", "{", "if", "(", "!", "m_bThresholdExceeded", "&&", "(", "m_nWritten", "+", "nCount", ">", "m_nThreshold", ")", ")", "{", "m_bThresholdExceeded", "=", "true", ";...
Checks to see if writing the specified number of bytes would cause the configured threshold to be exceeded. If so, triggers an event to allow a concrete implementation to take action on @param nCount The number of bytes about to be written to the underlying output stream. @exception IOException if an error occurs.
[ "Checks", "to", "see", "if", "writing", "the", "specified", "number", "of", "bytes", "would", "cause", "the", "configured", "threshold", "to", "be", "exceeded", ".", "If", "so", "triggers", "an", "event", "to", "allow", "a", "concrete", "implementation", "to...
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-web/src/main/java/com/helger/web/fileupload/io/AbstractThresholdingOutputStream.java#L208-L215
train
phax/ph-web
ph-servlet/src/main/java/com/helger/servlet/mock/MockHttpServletResponse.java
MockHttpServletResponse.getHeaders
@Nonnull public ICommonsList <String> getHeaders (@Nullable final String sName) { return new CommonsArrayList <> (m_aHeaders.get (_unifyHeaderName (sName))); }
java
@Nonnull public ICommonsList <String> getHeaders (@Nullable final String sName) { return new CommonsArrayList <> (m_aHeaders.get (_unifyHeaderName (sName))); }
[ "@", "Nonnull", "public", "ICommonsList", "<", "String", ">", "getHeaders", "(", "@", "Nullable", "final", "String", "sName", ")", "{", "return", "new", "CommonsArrayList", "<>", "(", "m_aHeaders", ".", "get", "(", "_unifyHeaderName", "(", "sName", ")", ")",...
Return all values for the given header as a List of value objects. @param sName the name of the header @return the associated header values, or an empty List if none
[ "Return", "all", "values", "for", "the", "given", "header", "as", "a", "List", "of", "value", "objects", "." ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-servlet/src/main/java/com/helger/servlet/mock/MockHttpServletResponse.java#L398-L402
train
phax/ph-web
ph-servlet/src/main/java/com/helger/servlet/session/SessionHelper.java
SessionHelper.safeInvalidateSession
@Nonnull public static EChange safeInvalidateSession (@Nullable final HttpSession aSession) { if (aSession != null) { try { if (LOGGER.isDebugEnabled ()) LOGGER.debug ("Invalidating session " + aSession.getId ()); aSession.invalidate (); return EChange.CHANGED; ...
java
@Nonnull public static EChange safeInvalidateSession (@Nullable final HttpSession aSession) { if (aSession != null) { try { if (LOGGER.isDebugEnabled ()) LOGGER.debug ("Invalidating session " + aSession.getId ()); aSession.invalidate (); return EChange.CHANGED; ...
[ "@", "Nonnull", "public", "static", "EChange", "safeInvalidateSession", "(", "@", "Nullable", "final", "HttpSession", "aSession", ")", "{", "if", "(", "aSession", "!=", "null", ")", "{", "try", "{", "if", "(", "LOGGER", ".", "isDebugEnabled", "(", ")", ")"...
Invalidate the session if the session is still active. @param aSession The session to be invalidated. May be <code>null</code>. @return {@link EChange#CHANGED} if the session was invalidated, {@link EChange#UNCHANGED} otherwise.
[ "Invalidate", "the", "session", "if", "the", "session", "is", "still", "active", "." ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-servlet/src/main/java/com/helger/servlet/session/SessionHelper.java#L60-L78
train
phax/ph-web
ph-servlet/src/main/java/com/helger/servlet/session/SessionHelper.java
SessionHelper.getAllAttributes
@Nonnull public static Enumeration <String> getAllAttributes (@Nonnull final HttpSession aSession) { ValueEnforcer.notNull (aSession, "Session"); try { return GenericReflection.uncheckedCast (aSession.getAttributeNames ()); } catch (final IllegalStateException ex) { // Session n...
java
@Nonnull public static Enumeration <String> getAllAttributes (@Nonnull final HttpSession aSession) { ValueEnforcer.notNull (aSession, "Session"); try { return GenericReflection.uncheckedCast (aSession.getAttributeNames ()); } catch (final IllegalStateException ex) { // Session n...
[ "@", "Nonnull", "public", "static", "Enumeration", "<", "String", ">", "getAllAttributes", "(", "@", "Nonnull", "final", "HttpSession", "aSession", ")", "{", "ValueEnforcer", ".", "notNull", "(", "aSession", ",", "\"Session\"", ")", ";", "try", "{", "return", ...
Get all attribute names present in the specified session. @param aSession The session to use. May not be <code>null</code>. @return Never <code>null</code>.
[ "Get", "all", "attribute", "names", "present", "in", "the", "specified", "session", "." ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-servlet/src/main/java/com/helger/servlet/session/SessionHelper.java#L87-L101
train
phax/ph-web
ph-sitemap/src/main/java/com/helger/sitemap/XMLSitemapIndex.java
XMLSitemapIndex.getAsDocument
@Nonnull public IMicroDocument getAsDocument (@Nonnull @Nonempty final String sFullContextPath) { final String sNamespaceURL = CXMLSitemap.XML_NAMESPACE_0_9; final IMicroDocument ret = new MicroDocument (); final IMicroElement eSitemapindex = ret.appendElement (sNamespaceURL, ELEMENT_SITEMAPINDEX); ...
java
@Nonnull public IMicroDocument getAsDocument (@Nonnull @Nonempty final String sFullContextPath) { final String sNamespaceURL = CXMLSitemap.XML_NAMESPACE_0_9; final IMicroDocument ret = new MicroDocument (); final IMicroElement eSitemapindex = ret.appendElement (sNamespaceURL, ELEMENT_SITEMAPINDEX); ...
[ "@", "Nonnull", "public", "IMicroDocument", "getAsDocument", "(", "@", "Nonnull", "@", "Nonempty", "final", "String", "sFullContextPath", ")", "{", "final", "String", "sNamespaceURL", "=", "CXMLSitemap", ".", "XML_NAMESPACE_0_9", ";", "final", "IMicroDocument", "ret...
Get the Index as a micro document. @param sFullContextPath Full context path like <code>scheme://server:port/context</code> or <code>scheme://server:port</code> for the ROOT context. @return The created micro document and never <code>null</code>.
[ "Get", "the", "Index", "as", "a", "micro", "document", "." ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-sitemap/src/main/java/com/helger/sitemap/XMLSitemapIndex.java#L181-L206
train
phax/ph-web
ph-web/src/main/java/com/helger/web/scope/singleton/AbstractSessionWebSingleton.java
AbstractSessionWebSingleton.getSessionSingleton
@Nonnull public static final <T extends AbstractSessionWebSingleton> T getSessionSingleton (@Nonnull final Class <T> aClass) { return getSingleton (_getStaticScope (true), aClass); }
java
@Nonnull public static final <T extends AbstractSessionWebSingleton> T getSessionSingleton (@Nonnull final Class <T> aClass) { return getSingleton (_getStaticScope (true), aClass); }
[ "@", "Nonnull", "public", "static", "final", "<", "T", "extends", "AbstractSessionWebSingleton", ">", "T", "getSessionSingleton", "(", "@", "Nonnull", "final", "Class", "<", "T", ">", "aClass", ")", "{", "return", "getSingleton", "(", "_getStaticScope", "(", "...
Get the singleton object in the current session web scope, using the passed class. If the singleton is not yet instantiated, a new instance is created. @param <T> The type to be returned @param aClass The class to be used. May not be <code>null</code>. The class must be public as needs to have a public no-argument con...
[ "Get", "the", "singleton", "object", "in", "the", "current", "session", "web", "scope", "using", "the", "passed", "class", ".", "If", "the", "singleton", "is", "not", "yet", "instantiated", "a", "new", "instance", "is", "created", "." ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-web/src/main/java/com/helger/web/scope/singleton/AbstractSessionWebSingleton.java#L79-L83
train
flow/caustic
api/src/main/java/com/flowpowered/caustic/api/GLImplementation.java
GLImplementation.load
@SuppressWarnings("unchecked") public static boolean load(GLImplementation implementation) { try { final Constructor<?> constructor = Class.forName(implementation.getContextName()).getDeclaredConstructor(); constructor.setAccessible(true); implementations.put(implementati...
java
@SuppressWarnings("unchecked") public static boolean load(GLImplementation implementation) { try { final Constructor<?> constructor = Class.forName(implementation.getContextName()).getDeclaredConstructor(); constructor.setAccessible(true); implementations.put(implementati...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "boolean", "load", "(", "GLImplementation", "implementation", ")", "{", "try", "{", "final", "Constructor", "<", "?", ">", "constructor", "=", "Class", ".", "forName", "(", "implementation",...
Loads the implementation, making it accessible. @param implementation The implementation to load @return Whether or not the loading succeeded
[ "Loads", "the", "implementation", "making", "it", "accessible", "." ]
88652fcf0621ce158a0e92ce4c570ed6b1f6fca9
https://github.com/flow/caustic/blob/88652fcf0621ce158a0e92ce4c570ed6b1f6fca9/api/src/main/java/com/flowpowered/caustic/api/GLImplementation.java#L81-L92
train
phax/ph-web
ph-servlet/src/main/java/com/helger/servlet/mock/MockServletPool.java
MockServletPool.registerServlet
public void registerServlet (@Nonnull final Class <? extends Servlet> aServletClass, @Nonnull @Nonempty final String sServletPath, @Nonnull @Nonempty final String sServletName) { registerServlet (aServletClass, sServletPath, sServletName, (Map <String,...
java
public void registerServlet (@Nonnull final Class <? extends Servlet> aServletClass, @Nonnull @Nonempty final String sServletPath, @Nonnull @Nonempty final String sServletName) { registerServlet (aServletClass, sServletPath, sServletName, (Map <String,...
[ "public", "void", "registerServlet", "(", "@", "Nonnull", "final", "Class", "<", "?", "extends", "Servlet", ">", "aServletClass", ",", "@", "Nonnull", "@", "Nonempty", "final", "String", "sServletPath", ",", "@", "Nonnull", "@", "Nonempty", "final", "String", ...
Register a new servlet without servlet init parameters @param aServletClass The class of the servlet to be registered. May not be <code>null</code>. @param sServletPath The path where the servlet should listen to requests. May neither be <code>null</code> nor empty. @param sServletName The name of the servlet. May nei...
[ "Register", "a", "new", "servlet", "without", "servlet", "init", "parameters" ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-servlet/src/main/java/com/helger/servlet/mock/MockServletPool.java#L139-L144
train
phax/ph-web
ph-servlet/src/main/java/com/helger/servlet/mock/MockServletPool.java
MockServletPool.registerServlet
public void registerServlet (@Nonnull final Class <? extends Servlet> aServletClass, @Nonnull @Nonempty final String sServletPath, @Nonnull @Nonempty final String sServletName, @Nullable final Map <String, String> aServletInitP...
java
public void registerServlet (@Nonnull final Class <? extends Servlet> aServletClass, @Nonnull @Nonempty final String sServletPath, @Nonnull @Nonempty final String sServletName, @Nullable final Map <String, String> aServletInitP...
[ "public", "void", "registerServlet", "(", "@", "Nonnull", "final", "Class", "<", "?", "extends", "Servlet", ">", "aServletClass", ",", "@", "Nonnull", "@", "Nonempty", "final", "String", "sServletPath", ",", "@", "Nonnull", "@", "Nonempty", "final", "String", ...
Register a new servlet @param aServletClass The class of the servlet to be registered. May not be <code>null</code>. @param sServletPath The path where the servlet should listen to requests. May neither be <code>null</code> nor empty. @param sServletName The name of the servlet. May neither be <code>null</code> nor em...
[ "Register", "a", "new", "servlet" ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-servlet/src/main/java/com/helger/servlet/mock/MockServletPool.java#L161-L206
train
phax/ph-web
ph-servlet/src/main/java/com/helger/servlet/mock/MockServletPool.java
MockServletPool.getServletOfPath
@Nullable public Servlet getServletOfPath (@Nullable final String sPath) { final ICommonsList <ServletItem> aMatchingItems = new CommonsArrayList <> (); if (StringHelper.hasText (sPath)) m_aServlets.findAll (aItem -> aItem.matchesPath (sPath), aMatchingItems::add); final int nMatchingItems = aMatc...
java
@Nullable public Servlet getServletOfPath (@Nullable final String sPath) { final ICommonsList <ServletItem> aMatchingItems = new CommonsArrayList <> (); if (StringHelper.hasText (sPath)) m_aServlets.findAll (aItem -> aItem.matchesPath (sPath), aMatchingItems::add); final int nMatchingItems = aMatc...
[ "@", "Nullable", "public", "Servlet", "getServletOfPath", "(", "@", "Nullable", "final", "String", "sPath", ")", "{", "final", "ICommonsList", "<", "ServletItem", ">", "aMatchingItems", "=", "new", "CommonsArrayList", "<>", "(", ")", ";", "if", "(", "StringHel...
Find the servlet matching the specified path. @param sPath The path, relative to the servlet context. May be <code>null</code>. @return <code>null</code> if no {@link Servlet} matching the specified path was found. If more than one matching servlet was found, the first one is returned.
[ "Find", "the", "servlet", "matching", "the", "specified", "path", "." ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-servlet/src/main/java/com/helger/servlet/mock/MockServletPool.java#L217-L230
train
phax/ph-web
ph-servlet/src/main/java/com/helger/servlet/mock/MockServletPool.java
MockServletPool.invalidate
public void invalidate () { if (m_bInvalidated) throw new IllegalArgumentException ("Servlet pool already invalidated!"); m_bInvalidated = true; // Destroy all servlets for (final ServletItem aServletItem : m_aServlets) try { aServletItem.getServlet ().destroy (); } ...
java
public void invalidate () { if (m_bInvalidated) throw new IllegalArgumentException ("Servlet pool already invalidated!"); m_bInvalidated = true; // Destroy all servlets for (final ServletItem aServletItem : m_aServlets) try { aServletItem.getServlet ().destroy (); } ...
[ "public", "void", "invalidate", "(", ")", "{", "if", "(", "m_bInvalidated", ")", "throw", "new", "IllegalArgumentException", "(", "\"Servlet pool already invalidated!\"", ")", ";", "m_bInvalidated", "=", "true", ";", "// Destroy all servlets", "for", "(", "final", "...
Invalidate the servlet pool, by destroying all contained servlets. Also the list of registered servlets is cleared.
[ "Invalidate", "the", "servlet", "pool", "by", "destroying", "all", "contained", "servlets", ".", "Also", "the", "list", "of", "registered", "servlets", "is", "cleared", "." ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-servlet/src/main/java/com/helger/servlet/mock/MockServletPool.java#L236-L255
train
googlegenomics/gatk-tools-java
src/main/java/com/google/cloud/genomics/gatk/htsjdk/GA4GHSamRecordIterator.java
GA4GHSamRecordIterator.queryNextInterval
ReadIteratorResource<Read, ReadGroupSet, Reference> queryNextInterval() { Stopwatch w = Stopwatch.createStarted(); if (!isAtEnd()) { intervalIndex++; } if (isAtEnd()) { return null; } ReadIteratorResource<Read, ReadGroupSet, Reference> result = queryForInterval(currentInter...
java
ReadIteratorResource<Read, ReadGroupSet, Reference> queryNextInterval() { Stopwatch w = Stopwatch.createStarted(); if (!isAtEnd()) { intervalIndex++; } if (isAtEnd()) { return null; } ReadIteratorResource<Read, ReadGroupSet, Reference> result = queryForInterval(currentInter...
[ "ReadIteratorResource", "<", "Read", ",", "ReadGroupSet", ",", "Reference", ">", "queryNextInterval", "(", ")", "{", "Stopwatch", "w", "=", "Stopwatch", ".", "createStarted", "(", ")", ";", "if", "(", "!", "isAtEnd", "(", ")", ")", "{", "intervalIndex", "+...
Re-queries the API for the next interval
[ "Re", "-", "queries", "the", "API", "for", "the", "next", "interval" ]
5521664e8d6274b113962659f2737c27cc361065
https://github.com/googlegenomics/gatk-tools-java/blob/5521664e8d6274b113962659f2737c27cc361065/src/main/java/com/google/cloud/genomics/gatk/htsjdk/GA4GHSamRecordIterator.java#L82-L95
train
googlegenomics/gatk-tools-java
src/main/java/com/google/cloud/genomics/gatk/htsjdk/GA4GHSamRecordIterator.java
GA4GHSamRecordIterator.queryForInterval
ReadIteratorResource<Read, ReadGroupSet, Reference> queryForInterval(GA4GHQueryInterval interval) { try { return dataSource.getReads(readSetId, interval.getSequence(), interval.getStart(), interval.getEnd()); } catch (Exception ex) { LOG.warning("Error getting data for interval " + ex.toSt...
java
ReadIteratorResource<Read, ReadGroupSet, Reference> queryForInterval(GA4GHQueryInterval interval) { try { return dataSource.getReads(readSetId, interval.getSequence(), interval.getStart(), interval.getEnd()); } catch (Exception ex) { LOG.warning("Error getting data for interval " + ex.toSt...
[ "ReadIteratorResource", "<", "Read", ",", "ReadGroupSet", ",", "Reference", ">", "queryForInterval", "(", "GA4GHQueryInterval", "interval", ")", "{", "try", "{", "return", "dataSource", ".", "getReads", "(", "readSetId", ",", "interval", ".", "getSequence", "(", ...
Queries the API for an interval and returns the iterator resource, or null if failed
[ "Queries", "the", "API", "for", "an", "interval", "and", "returns", "the", "iterator", "resource", "or", "null", "if", "failed" ]
5521664e8d6274b113962659f2737c27cc361065
https://github.com/googlegenomics/gatk-tools-java/blob/5521664e8d6274b113962659f2737c27cc361065/src/main/java/com/google/cloud/genomics/gatk/htsjdk/GA4GHSamRecordIterator.java#L98-L106
train
googlegenomics/gatk-tools-java
src/main/java/com/google/cloud/genomics/gatk/htsjdk/GA4GHSamRecordIterator.java
GA4GHSamRecordIterator.seekMatchingRead
void seekMatchingRead() { while (!isAtEnd()) { if (iterator == null || !iterator.hasNext()) { LOG.info("Getting " + (iterator == null ? "first" : "next") + " interval from the API"); // We have hit an end (or this is first time) so we need to go fish // to th...
java
void seekMatchingRead() { while (!isAtEnd()) { if (iterator == null || !iterator.hasNext()) { LOG.info("Getting " + (iterator == null ? "first" : "next") + " interval from the API"); // We have hit an end (or this is first time) so we need to go fish // to th...
[ "void", "seekMatchingRead", "(", ")", "{", "while", "(", "!", "isAtEnd", "(", ")", ")", "{", "if", "(", "iterator", "==", "null", "||", "!", "iterator", ".", "hasNext", "(", ")", ")", "{", "LOG", ".", "info", "(", "\"Getting \"", "+", "(", "iterato...
Ensures next returned read will match the currently requested interval. Since the API always returns overlapping reads we might need to skip some reads if the interval asks for "included" or "starts at" types. Also deals with the case of iterator being at an end and needing to query for the next interval.
[ "Ensures", "next", "returned", "read", "will", "match", "the", "currently", "requested", "interval", ".", "Since", "the", "API", "always", "returns", "overlapping", "reads", "we", "might", "need", "to", "skip", "some", "reads", "if", "the", "interval", "asks",...
5521664e8d6274b113962659f2737c27cc361065
https://github.com/googlegenomics/gatk-tools-java/blob/5521664e8d6274b113962659f2737c27cc361065/src/main/java/com/google/cloud/genomics/gatk/htsjdk/GA4GHSamRecordIterator.java#L115-L142
train
phax/ph-web
ph-http/src/main/java/com/helger/http/CacheControlBuilder.java
CacheControlBuilder.setMaxAge
@Nonnull public CacheControlBuilder setMaxAge (@Nonnull final TimeUnit eTimeUnit, final long nDuration) { return setMaxAgeSeconds (eTimeUnit.toSeconds (nDuration)); }
java
@Nonnull public CacheControlBuilder setMaxAge (@Nonnull final TimeUnit eTimeUnit, final long nDuration) { return setMaxAgeSeconds (eTimeUnit.toSeconds (nDuration)); }
[ "@", "Nonnull", "public", "CacheControlBuilder", "setMaxAge", "(", "@", "Nonnull", "final", "TimeUnit", "eTimeUnit", ",", "final", "long", "nDuration", ")", "{", "return", "setMaxAgeSeconds", "(", "eTimeUnit", ".", "toSeconds", "(", "nDuration", ")", ")", ";", ...
Set the maximum age relative to the request time @param eTimeUnit {@link TimeUnit} to use @param nDuration The duration in the passed unit @return this
[ "Set", "the", "maximum", "age", "relative", "to", "the", "request", "time" ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-http/src/main/java/com/helger/http/CacheControlBuilder.java#L93-L97
train
khmarbaise/sapm
src/main/java/com/soebes/subversion/sapm/Groups.java
Groups.hasGroup
public boolean hasGroup(String groupName) { boolean result = false; for (Group item : getGroupsList()) { if (item.getName().equals(groupName)) { result = true; } } return result; }
java
public boolean hasGroup(String groupName) { boolean result = false; for (Group item : getGroupsList()) { if (item.getName().equals(groupName)) { result = true; } } return result; }
[ "public", "boolean", "hasGroup", "(", "String", "groupName", ")", "{", "boolean", "result", "=", "false", ";", "for", "(", "Group", "item", ":", "getGroupsList", "(", ")", ")", "{", "if", "(", "item", ".", "getName", "(", ")", ".", "equals", "(", "gr...
Check if a group with the given groupName exists in the list or not. The check will be done case-sensitive. @param groupName The name we are searching for. @return true if the group has been found false otherwise.
[ "Check", "if", "a", "group", "with", "the", "given", "groupName", "exists", "in", "the", "list", "or", "not", ".", "The", "check", "will", "be", "done", "case", "-", "sensitive", "." ]
b5da5b0d8929324f03cb3a4233a3534813f93eea
https://github.com/khmarbaise/sapm/blob/b5da5b0d8929324f03cb3a4233a3534813f93eea/src/main/java/com/soebes/subversion/sapm/Groups.java#L66-L74
train
khmarbaise/sapm
src/main/java/com/soebes/subversion/sapm/Groups.java
Groups.getGroup
public Group getGroup(String groupName) { Group result = null; for (Group item : getGroupsList()) { if (item.getName().equals(groupName)) { result = item; } } return result; }
java
public Group getGroup(String groupName) { Group result = null; for (Group item : getGroupsList()) { if (item.getName().equals(groupName)) { result = item; } } return result; }
[ "public", "Group", "getGroup", "(", "String", "groupName", ")", "{", "Group", "result", "=", "null", ";", "for", "(", "Group", "item", ":", "getGroupsList", "(", ")", ")", "{", "if", "(", "item", ".", "getName", "(", ")", ".", "equals", "(", "groupNa...
Get the Group instance from the list by name. @param groupName The group for which will be searched. @return The Group instance for the given group name.
[ "Get", "the", "Group", "instance", "from", "the", "list", "by", "name", "." ]
b5da5b0d8929324f03cb3a4233a3534813f93eea
https://github.com/khmarbaise/sapm/blob/b5da5b0d8929324f03cb3a4233a3534813f93eea/src/main/java/com/soebes/subversion/sapm/Groups.java#L86-L94
train
jianlins/FastContext
src/main/java/edu/utah/bmi/nlp/fastcontext/ContextRuleProcessor.java
ContextRuleProcessor.processDigits
protected void processDigits(List<Span> contextTokens, char compare, HashMap rule, int matchBegin, int currentPosition, LinkedHashMap<String, ConTextSpan> matches) { mt = pdigit.matcher(contextTokens.get(currentPosition).text); if (mt.find()) { double thisDig...
java
protected void processDigits(List<Span> contextTokens, char compare, HashMap rule, int matchBegin, int currentPosition, LinkedHashMap<String, ConTextSpan> matches) { mt = pdigit.matcher(contextTokens.get(currentPosition).text); if (mt.find()) { double thisDig...
[ "protected", "void", "processDigits", "(", "List", "<", "Span", ">", "contextTokens", ",", "char", "compare", ",", "HashMap", "rule", ",", "int", "matchBegin", ",", "int", "currentPosition", ",", "LinkedHashMap", "<", "String", ",", "ConTextSpan", ">", "matche...
Because the digit regular expressions are revised into the format like "&gt; 13 days", the rulesMap need to be handled differently to the token matching rulesMap @param contextTokens The context tokens in an ArrayList of String @param compare great than or less than for numeric compare @param rule ...
[ "Because", "the", "digit", "regular", "expressions", "are", "revised", "into", "the", "format", "like", "&gt", ";", "13", "days", "the", "rulesMap", "need", "to", "be", "handled", "differently", "to", "the", "token", "matching", "rulesMap" ]
e3f7cfa7e6eb69bbeb49a51021d8ec5613654fc8
https://github.com/jianlins/FastContext/blob/e3f7cfa7e6eb69bbeb49a51021d8ec5613654fc8/src/main/java/edu/utah/bmi/nlp/fastcontext/ContextRuleProcessor.java#L260-L290
train
googlegenomics/gatk-tools-java
src/main/java/com/google/cloud/genomics/gatk/htsjdk/GA4GHQueryInterval.java
GA4GHQueryInterval.matches
public boolean matches(SAMRecord record) { int myEnd = end == 0 ? Integer.MAX_VALUE : end; switch (readPositionConstraint) { case OVERLAPPING: return CoordMath.overlaps(start, myEnd, record.getAlignmentStart(), record.getAlignmentEnd()); case CONTAINED: return CoordMath....
java
public boolean matches(SAMRecord record) { int myEnd = end == 0 ? Integer.MAX_VALUE : end; switch (readPositionConstraint) { case OVERLAPPING: return CoordMath.overlaps(start, myEnd, record.getAlignmentStart(), record.getAlignmentEnd()); case CONTAINED: return CoordMath....
[ "public", "boolean", "matches", "(", "SAMRecord", "record", ")", "{", "int", "myEnd", "=", "end", "==", "0", "?", "Integer", ".", "MAX_VALUE", ":", "end", ";", "switch", "(", "readPositionConstraint", ")", "{", "case", "OVERLAPPING", ":", "return", "CoordM...
Returns true iff the read specified by the record matches the interval given the interval's constraints and the read position.
[ "Returns", "true", "iff", "the", "read", "specified", "by", "the", "record", "matches", "the", "interval", "given", "the", "interval", "s", "constraints", "and", "the", "read", "position", "." ]
5521664e8d6274b113962659f2737c27cc361065
https://github.com/googlegenomics/gatk-tools-java/blob/5521664e8d6274b113962659f2737c27cc361065/src/main/java/com/google/cloud/genomics/gatk/htsjdk/GA4GHQueryInterval.java#L83-L96
train
phax/ph-web
ph-servlet/src/main/java/com/helger/servlet/ServletContextPathHolder.java
ServletContextPathHolder.clearContextPath
public static void clearContextPath () { if (s_sServletContextPath != null) { if (LOGGER.isInfoEnabled () && !isSilentMode ()) LOGGER.info ("The servlet context path '" + s_sServletContextPath + "' was cleared!"); s_sServletContextPath = null; } if (s_sCustomContextPath != null) ...
java
public static void clearContextPath () { if (s_sServletContextPath != null) { if (LOGGER.isInfoEnabled () && !isSilentMode ()) LOGGER.info ("The servlet context path '" + s_sServletContextPath + "' was cleared!"); s_sServletContextPath = null; } if (s_sCustomContextPath != null) ...
[ "public", "static", "void", "clearContextPath", "(", ")", "{", "if", "(", "s_sServletContextPath", "!=", "null", ")", "{", "if", "(", "LOGGER", ".", "isInfoEnabled", "(", ")", "&&", "!", "isSilentMode", "(", ")", ")", "LOGGER", ".", "info", "(", "\"The s...
Clears both servlet context and custom context path.
[ "Clears", "both", "servlet", "context", "and", "custom", "context", "path", "." ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-servlet/src/main/java/com/helger/servlet/ServletContextPathHolder.java#L195-L209
train
tanhaichao/leopard-data
leopard-jdbc/src/main/java/io/leopard/jdbc/JdbcDaoSupport.java
JdbcDaoSupport.setDataSource
public final void setDataSource(DataSource dataSource) { if (this.jdbcTemplate == null || dataSource != this.jdbcTemplate.getDataSource()) { this.jdbcTemplate = createJdbcTemplate(dataSource); initTemplateConfig(); } }
java
public final void setDataSource(DataSource dataSource) { if (this.jdbcTemplate == null || dataSource != this.jdbcTemplate.getDataSource()) { this.jdbcTemplate = createJdbcTemplate(dataSource); initTemplateConfig(); } }
[ "public", "final", "void", "setDataSource", "(", "DataSource", "dataSource", ")", "{", "if", "(", "this", ".", "jdbcTemplate", "==", "null", "||", "dataSource", "!=", "this", ".", "jdbcTemplate", ".", "getDataSource", "(", ")", ")", "{", "this", ".", "jdbc...
Set the JDBC DataSource to be used by this DAO.
[ "Set", "the", "JDBC", "DataSource", "to", "be", "used", "by", "this", "DAO", "." ]
2fae872f34f68ca6a23bcfe4554d47821b503281
https://github.com/tanhaichao/leopard-data/blob/2fae872f34f68ca6a23bcfe4554d47821b503281/leopard-jdbc/src/main/java/io/leopard/jdbc/JdbcDaoSupport.java#L22-L27
train
phax/ph-web
ph-http/src/main/java/com/helger/http/digestauth/HttpDigestAuth.java
HttpDigestAuth.getDigestAuthClientCredentials
@Nullable public static DigestAuthClientCredentials getDigestAuthClientCredentials (@Nullable final String sAuthHeader) { final ICommonsOrderedMap <String, String> aParams = getDigestAuthParams (sAuthHeader); if (aParams == null) return null; final String sUserName = aParams.remove ("username"); ...
java
@Nullable public static DigestAuthClientCredentials getDigestAuthClientCredentials (@Nullable final String sAuthHeader) { final ICommonsOrderedMap <String, String> aParams = getDigestAuthParams (sAuthHeader); if (aParams == null) return null; final String sUserName = aParams.remove ("username"); ...
[ "@", "Nullable", "public", "static", "DigestAuthClientCredentials", "getDigestAuthClientCredentials", "(", "@", "Nullable", "final", "String", "sAuthHeader", ")", "{", "final", "ICommonsOrderedMap", "<", "String", ",", "String", ">", "aParams", "=", "getDigestAuthParams...
Get the Digest authentication credentials from the passed HTTP header value. @param sAuthHeader The HTTP header value to be interpreted. May be <code>null</code>. @return <code>null</code> if the passed value is not a correct HTTP Digest Authentication header value.
[ "Get", "the", "Digest", "authentication", "credentials", "from", "the", "passed", "HTTP", "header", "value", "." ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-http/src/main/java/com/helger/http/digestauth/HttpDigestAuth.java#L237-L293
train
phax/ph-web
ph-http/src/main/java/com/helger/http/digestauth/HttpDigestAuth.java
HttpDigestAuth.createDigestAuthClientCredentials
@Nonnull public static DigestAuthClientCredentials createDigestAuthClientCredentials (@Nonnull final EHttpMethod eMethod, @Nonnull @Nonempty final String sDigestURI, ...
java
@Nonnull public static DigestAuthClientCredentials createDigestAuthClientCredentials (@Nonnull final EHttpMethod eMethod, @Nonnull @Nonempty final String sDigestURI, ...
[ "@", "Nonnull", "public", "static", "DigestAuthClientCredentials", "createDigestAuthClientCredentials", "(", "@", "Nonnull", "final", "EHttpMethod", "eMethod", ",", "@", "Nonnull", "@", "Nonempty", "final", "String", "sDigestURI", ",", "@", "Nonnull", "@", "Nonempty",...
Create HTTP Digest auth credentials for a client @param eMethod The HTTP method of the request. May not be <code>null</code>. @param sDigestURI The URI from Request-URI of the Request-Line; duplicated here because proxies are allowed to change the Request-Line in transit. May neither be <code>null</code> nor empty. @p...
[ "Create", "HTTP", "Digest", "auth", "credentials", "for", "a", "client" ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-http/src/main/java/com/helger/http/digestauth/HttpDigestAuth.java#L372-L455
train
flow/caustic
api/src/main/java/com/flowpowered/caustic/api/data/UniformHolder.java
UniformHolder.get
@SuppressWarnings("unchecked") public <U extends Uniform> U get(String name) { final Uniform uniform = uniforms.get(name); if (uniform == null) { return null; } return (U) uniform; }
java
@SuppressWarnings("unchecked") public <U extends Uniform> U get(String name) { final Uniform uniform = uniforms.get(name); if (uniform == null) { return null; } return (U) uniform; }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "<", "U", "extends", "Uniform", ">", "U", "get", "(", "String", "name", ")", "{", "final", "Uniform", "uniform", "=", "uniforms", ".", "get", "(", "name", ")", ";", "if", "(", "uniform", "==...
Returns the uniform with the provided name, or null if non can be found. @param name The name to lookup @return The uniform
[ "Returns", "the", "uniform", "with", "the", "provided", "name", "or", "null", "if", "non", "can", "be", "found", "." ]
88652fcf0621ce158a0e92ce4c570ed6b1f6fca9
https://github.com/flow/caustic/blob/88652fcf0621ce158a0e92ce4c570ed6b1f6fca9/api/src/main/java/com/flowpowered/caustic/api/data/UniformHolder.java#L72-L79
train
phax/ph-web
ph-web/src/main/java/com/helger/web/fileupload/parse/AbstractFileUploadBase.java
AbstractFileUploadBase._getFilename
@Nullable private static String _getFilename (@Nullable final String sContentDisposition) { String sFilename = null; if (sContentDisposition != null) { final String sContentDispositionLC = sContentDisposition.toLowerCase (Locale.US); if (sContentDispositionLC.startsWith (RequestHelper.FORM_D...
java
@Nullable private static String _getFilename (@Nullable final String sContentDisposition) { String sFilename = null; if (sContentDisposition != null) { final String sContentDispositionLC = sContentDisposition.toLowerCase (Locale.US); if (sContentDispositionLC.startsWith (RequestHelper.FORM_D...
[ "@", "Nullable", "private", "static", "String", "_getFilename", "(", "@", "Nullable", "final", "String", "sContentDisposition", ")", "{", "String", "sFilename", "=", "null", ";", "if", "(", "sContentDisposition", "!=", "null", ")", "{", "final", "String", "sCo...
Returns the given content-disposition headers file name. @param sContentDisposition The content-disposition headers value. @return The file name or <code>null</code>.
[ "Returns", "the", "given", "content", "-", "disposition", "headers", "file", "name", "." ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-web/src/main/java/com/helger/web/fileupload/parse/AbstractFileUploadBase.java#L385-L416
train
phax/ph-web
ph-web/src/main/java/com/helger/web/fileupload/parse/AbstractFileUploadBase.java
AbstractFileUploadBase._getFieldName
@Nullable private static String _getFieldName (@Nullable final String sContentDisposition) { String sFieldName = null; if (sContentDisposition != null && sContentDisposition.toLowerCase (Locale.US).startsWith (RequestHelper.FORM_DATA)) { // Parameter parser can handle null input final ICommo...
java
@Nullable private static String _getFieldName (@Nullable final String sContentDisposition) { String sFieldName = null; if (sContentDisposition != null && sContentDisposition.toLowerCase (Locale.US).startsWith (RequestHelper.FORM_DATA)) { // Parameter parser can handle null input final ICommo...
[ "@", "Nullable", "private", "static", "String", "_getFieldName", "(", "@", "Nullable", "final", "String", "sContentDisposition", ")", "{", "String", "sFieldName", "=", "null", ";", "if", "(", "sContentDisposition", "!=", "null", "&&", "sContentDisposition", ".", ...
Returns the field name, which is given by the content-disposition header. @param sContentDisposition The content-dispositions header value. @return The field name
[ "Returns", "the", "field", "name", "which", "is", "given", "by", "the", "content", "-", "disposition", "header", "." ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-web/src/main/java/com/helger/web/fileupload/parse/AbstractFileUploadBase.java#L438-L452
train
phax/ph-web
ph-web/src/main/java/com/helger/web/scope/impl/RequestWebScope.java
RequestWebScope.isForbiddenParamValueChar
public static boolean isForbiddenParamValueChar (final char c) { // INVALID_VALUE_CHAR_XML10 + 0x7f return (c >= 0x0 && c <= 0x8) || (c >= 0xb && c <= 0xc) || (c >= 0xe && c <= 0x1f) || (c == 0x7f) || (c >= 0xd800 && c <= 0xdfff) || (c >= 0xfffe && c <= 0...
java
public static boolean isForbiddenParamValueChar (final char c) { // INVALID_VALUE_CHAR_XML10 + 0x7f return (c >= 0x0 && c <= 0x8) || (c >= 0xb && c <= 0xc) || (c >= 0xe && c <= 0x1f) || (c == 0x7f) || (c >= 0xd800 && c <= 0xdfff) || (c >= 0xfffe && c <= 0...
[ "public", "static", "boolean", "isForbiddenParamValueChar", "(", "final", "char", "c", ")", "{", "// INVALID_VALUE_CHAR_XML10 + 0x7f", "return", "(", "c", ">=", "0x0", "&&", "c", "<=", "0x8", ")", "||", "(", "c", ">=", "0xb", "&&", "c", "<=", "0xc", ")", ...
Check if the provided char is forbidden in a request value or not. @param c Char to check @return <code>true</code> if it is forbidden, <code>false</code> if not. @see #getWithoutForbiddenChars(String) @since 9.0.6
[ "Check", "if", "the", "provided", "char", "is", "forbidden", "in", "a", "request", "value", "or", "not", "." ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-web/src/main/java/com/helger/web/scope/impl/RequestWebScope.java#L193-L202
train
phax/ph-web
ph-web/src/main/java/com/helger/web/scope/impl/RequestWebScope.java
RequestWebScope.getWithoutForbiddenChars
@Nullable public static String getWithoutForbiddenChars (@Nullable final String s) { if (s == null) return null; final StringBuilder aCleanValue = new StringBuilder (s.length ()); int nForbidden = 0; for (final char c : s.toCharArray ()) if (isForbiddenParamValueChar (c)) nForb...
java
@Nullable public static String getWithoutForbiddenChars (@Nullable final String s) { if (s == null) return null; final StringBuilder aCleanValue = new StringBuilder (s.length ()); int nForbidden = 0; for (final char c : s.toCharArray ()) if (isForbiddenParamValueChar (c)) nForb...
[ "@", "Nullable", "public", "static", "String", "getWithoutForbiddenChars", "(", "@", "Nullable", "final", "String", "s", ")", "{", "if", "(", "s", "==", "null", ")", "return", "null", ";", "final", "StringBuilder", "aCleanValue", "=", "new", "StringBuilder", ...
Remove all chars from the input that cannot be serialized as XML. @param s The source value. May be <code>null</code>. @return <code>null</code> if the source value is <code>null</code>. @see #isForbiddenParamValueChar(char) @since 9.0.4
[ "Remove", "all", "chars", "from", "the", "input", "that", "cannot", "be", "serialized", "as", "XML", "." ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-web/src/main/java/com/helger/web/scope/impl/RequestWebScope.java#L213-L238
train
flow/caustic
api/src/main/java/com/flowpowered/caustic/api/model/StringModel.java
StringModel.setString
public void setString(String string) { rawString = string; colorIndices.clear(); // Search for color codes final StringBuilder stringBuilder = new StringBuilder(string); final Matcher matcher = COLOR_PATTERN.matcher(string); int removedCount = 0; while (matcher.fi...
java
public void setString(String string) { rawString = string; colorIndices.clear(); // Search for color codes final StringBuilder stringBuilder = new StringBuilder(string); final Matcher matcher = COLOR_PATTERN.matcher(string); int removedCount = 0; while (matcher.fi...
[ "public", "void", "setString", "(", "String", "string", ")", "{", "rawString", "=", "string", ";", "colorIndices", ".", "clear", "(", ")", ";", "// Search for color codes", "final", "StringBuilder", "stringBuilder", "=", "new", "StringBuilder", "(", "string", ")...
Sets the string to render. @param string The string to render
[ "Sets", "the", "string", "to", "render", "." ]
88652fcf0621ce158a0e92ce4c570ed6b1f6fca9
https://github.com/flow/caustic/blob/88652fcf0621ce158a0e92ce4c570ed6b1f6fca9/api/src/main/java/com/flowpowered/caustic/api/model/StringModel.java#L230-L255
train
astrapi69/mystic-crypt
crypt-data/src/main/java/de/alpharogroup/crypto/key/reader/PrivateKeyReader.java
PrivateKeyReader.readPrivateKey
public static PrivateKey readPrivateKey(final File root, final String directory, final String fileName) throws NoSuchAlgorithmException, InvalidKeySpecException, NoSuchProviderException, IOException { final File privatekeyDir = new File(root, directory); final File privatekeyFile = new File(privatekeyDir, fil...
java
public static PrivateKey readPrivateKey(final File root, final String directory, final String fileName) throws NoSuchAlgorithmException, InvalidKeySpecException, NoSuchProviderException, IOException { final File privatekeyDir = new File(root, directory); final File privatekeyFile = new File(privatekeyDir, fil...
[ "public", "static", "PrivateKey", "readPrivateKey", "(", "final", "File", "root", ",", "final", "String", "directory", ",", "final", "String", "fileName", ")", "throws", "NoSuchAlgorithmException", ",", "InvalidKeySpecException", ",", "NoSuchProviderException", ",", "...
Constructs from the given root, parent directory and file name the file and reads the private key. @param root the root directory of the parent directory @param directory the parent directory of the private key file @param fileName the file name of the file that contains the private key @return the private key @throws...
[ "Constructs", "from", "the", "given", "root", "parent", "directory", "and", "file", "name", "the", "file", "and", "reads", "the", "private", "key", "." ]
7f51ef5e4457e24de7ff391f10bfc5609e6f1a34
https://github.com/astrapi69/mystic-crypt/blob/7f51ef5e4457e24de7ff391f10bfc5609e6f1a34/crypt-data/src/main/java/de/alpharogroup/crypto/key/reader/PrivateKeyReader.java#L365-L375
train
astrapi69/mystic-crypt
crypt-core/src/main/java/de/alpharogroup/crypto/core/AbstractCryptor.java
AbstractCryptor.newAlgorithm
protected String newAlgorithm() { if (getModel().getAlgorithm() == null) { return SunJCEAlgorithm.PBEWithMD5AndDES.getAlgorithm(); } return getModel().getAlgorithm().getAlgorithm(); }
java
protected String newAlgorithm() { if (getModel().getAlgorithm() == null) { return SunJCEAlgorithm.PBEWithMD5AndDES.getAlgorithm(); } return getModel().getAlgorithm().getAlgorithm(); }
[ "protected", "String", "newAlgorithm", "(", ")", "{", "if", "(", "getModel", "(", ")", ".", "getAlgorithm", "(", ")", "==", "null", ")", "{", "return", "SunJCEAlgorithm", ".", "PBEWithMD5AndDES", ".", "getAlgorithm", "(", ")", ";", "}", "return", "getModel...
Factory method for creating a new algorithm that will be used with the cipher object. Overwrite this method to provide a specific algorithm. @return the new algorithm that will be used with the cipher object.
[ "Factory", "method", "for", "creating", "a", "new", "algorithm", "that", "will", "be", "used", "with", "the", "cipher", "object", ".", "Overwrite", "this", "method", "to", "provide", "a", "specific", "algorithm", "." ]
7f51ef5e4457e24de7ff391f10bfc5609e6f1a34
https://github.com/astrapi69/mystic-crypt/blob/7f51ef5e4457e24de7ff391f10bfc5609e6f1a34/crypt-core/src/main/java/de/alpharogroup/crypto/core/AbstractCryptor.java#L136-L143
train
phax/ph-web
ph-xservlet/src/main/java/com/helger/xservlet/AbstractXServlet.java
AbstractXServlet.init
@Override public final void init (@Nonnull final ServletConfig aSC) throws ServletException { super.init (aSC); m_aStatusMgr.onServletInit (getClass ()); try { // Build init parameter map final ICommonsMap <String, String> aInitParams = new CommonsHashMap <> (); final Enumeration <...
java
@Override public final void init (@Nonnull final ServletConfig aSC) throws ServletException { super.init (aSC); m_aStatusMgr.onServletInit (getClass ()); try { // Build init parameter map final ICommonsMap <String, String> aInitParams = new CommonsHashMap <> (); final Enumeration <...
[ "@", "Override", "public", "final", "void", "init", "(", "@", "Nonnull", "final", "ServletConfig", "aSC", ")", "throws", "ServletException", "{", "super", ".", "init", "(", "aSC", ")", ";", "m_aStatusMgr", ".", "onServletInit", "(", "getClass", "(", ")", "...
A final overload of "init". Overload "init" instead.
[ "A", "final", "overload", "of", "init", ".", "Overload", "init", "instead", "." ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-xservlet/src/main/java/com/helger/xservlet/AbstractXServlet.java#L268-L291
train
phax/ph-web
ph-xservlet/src/main/java/com/helger/xservlet/AbstractXServlet.java
AbstractXServlet.service
@Override public final void service (@Nonnull final ServletRequest req, @Nonnull final ServletResponse res) throws ServletException, IOException { super.service (req, res); }
java
@Override public final void service (@Nonnull final ServletRequest req, @Nonnull final ServletResponse res) throws ServletException, IOException { super.service (req, res); }
[ "@", "Override", "public", "final", "void", "service", "(", "@", "Nonnull", "final", "ServletRequest", "req", ",", "@", "Nonnull", "final", "ServletResponse", "res", ")", "throws", "ServletException", ",", "IOException", "{", "super", ".", "service", "(", "req...
Avoid overloading in sub classes
[ "Avoid", "overloading", "in", "sub", "classes" ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-xservlet/src/main/java/com/helger/xservlet/AbstractXServlet.java#L583-L588
train
phax/ph-web
ph-httpclient/src/main/java/com/helger/httpclient/HttpDebugger.java
HttpDebugger.beforeRequest
public static void beforeRequest (@Nonnull final HttpUriRequest aRequest, @Nullable final HttpContext aHttpContext) { if (isEnabled ()) if (LOGGER.isInfoEnabled ()) LOGGER.info ("Before HTTP call: " + aRequest.getMethod () + " " + ...
java
public static void beforeRequest (@Nonnull final HttpUriRequest aRequest, @Nullable final HttpContext aHttpContext) { if (isEnabled ()) if (LOGGER.isInfoEnabled ()) LOGGER.info ("Before HTTP call: " + aRequest.getMethod () + " " + ...
[ "public", "static", "void", "beforeRequest", "(", "@", "Nonnull", "final", "HttpUriRequest", "aRequest", ",", "@", "Nullable", "final", "HttpContext", "aHttpContext", ")", "{", "if", "(", "isEnabled", "(", ")", ")", "if", "(", "LOGGER", ".", "isInfoEnabled", ...
Call before an invocation @param aRequest The request to be executed. May not be <code>null</code>. @param aHttpContext The special HTTP content for this call. May be <code>null</code>.
[ "Call", "before", "an", "invocation" ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-httpclient/src/main/java/com/helger/httpclient/HttpDebugger.java#L66-L75
train
phax/ph-web
ph-httpclient/src/main/java/com/helger/httpclient/HttpDebugger.java
HttpDebugger.afterRequest
public static void afterRequest (@Nonnull final HttpUriRequest aRequest, @Nullable final Object aResponse, @Nullable final Throwable aCaughtException) { if (isEnabled ()) if (LOGGER.isInfoEnabled ()) { final HttpResponseExce...
java
public static void afterRequest (@Nonnull final HttpUriRequest aRequest, @Nullable final Object aResponse, @Nullable final Throwable aCaughtException) { if (isEnabled ()) if (LOGGER.isInfoEnabled ()) { final HttpResponseExce...
[ "public", "static", "void", "afterRequest", "(", "@", "Nonnull", "final", "HttpUriRequest", "aRequest", ",", "@", "Nullable", "final", "Object", "aResponse", ",", "@", "Nullable", "final", "Throwable", "aCaughtException", ")", "{", "if", "(", "isEnabled", "(", ...
Call after an invocation. @param aRequest The source request. May not be modified internally. May not be <code>null</code>. @param aResponse The response object retrieved. May be anything including <code>null</code> (e.g. in case of exception). @param aCaughtException The caught exception. May be <code>null</code>. @s...
[ "Call", "after", "an", "invocation", "." ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-httpclient/src/main/java/com/helger/httpclient/HttpDebugger.java#L90-L105
train
hmsonline/json-transformer
src/main/java/com/hmsonline/json/transformer/JsonRule.java
JsonRule.transform
private void transform(JSONArray root) { for (int i = 0, size = root.size(); i < size; i++) { Object target = root.get(i); if (target instanceof JSONObject) this.transform((JSONObject)target); } }
java
private void transform(JSONArray root) { for (int i = 0, size = root.size(); i < size; i++) { Object target = root.get(i); if (target instanceof JSONObject) this.transform((JSONObject)target); } }
[ "private", "void", "transform", "(", "JSONArray", "root", ")", "{", "for", "(", "int", "i", "=", "0", ",", "size", "=", "root", ".", "size", "(", ")", ";", "i", "<", "size", ";", "i", "++", ")", "{", "Object", "target", "=", "root", ".", "get",...
Apply transform to each json object in the json array @param root
[ "Apply", "transform", "to", "each", "json", "object", "in", "the", "json", "array" ]
4c739170db8b30a166066436af71c14288c65a4e
https://github.com/hmsonline/json-transformer/blob/4c739170db8b30a166066436af71c14288c65a4e/src/main/java/com/hmsonline/json/transformer/JsonRule.java#L62-L69
train
astrapi69/mystic-crypt
crypt-core/src/main/java/de/alpharogroup/crypto/pw/PasswordEncryptor.java
PasswordEncryptor.hashAndHexPassword
public String hashAndHexPassword(final String password, final String salt) throws NoSuchAlgorithmException, InvalidKeyException, UnsupportedEncodingException, NoSuchPaddingException, IllegalBlockSizeException, BadPaddingException, InvalidKeySpecException, InvalidAlgorithmParameterException { return hashAndHexP...
java
public String hashAndHexPassword(final String password, final String salt) throws NoSuchAlgorithmException, InvalidKeyException, UnsupportedEncodingException, NoSuchPaddingException, IllegalBlockSizeException, BadPaddingException, InvalidKeySpecException, InvalidAlgorithmParameterException { return hashAndHexP...
[ "public", "String", "hashAndHexPassword", "(", "final", "String", "password", ",", "final", "String", "salt", ")", "throws", "NoSuchAlgorithmException", ",", "InvalidKeyException", ",", "UnsupportedEncodingException", ",", "NoSuchPaddingException", ",", "IllegalBlockSizeExc...
Hash and hex password with the given salt. @param password the password @param salt the salt @return the generated {@link String} object @throws NoSuchAlgorithmException is thrown if instantiation of the MessageDigest object fails. @throws UnsupportedEncodingException is thrown by get the byte array of the private key...
[ "Hash", "and", "hex", "password", "with", "the", "given", "salt", "." ]
7f51ef5e4457e24de7ff391f10bfc5609e6f1a34
https://github.com/astrapi69/mystic-crypt/blob/7f51ef5e4457e24de7ff391f10bfc5609e6f1a34/crypt-core/src/main/java/de/alpharogroup/crypto/pw/PasswordEncryptor.java#L148-L154
train
astrapi69/mystic-crypt
crypt-core/src/main/java/de/alpharogroup/crypto/pw/PasswordEncryptor.java
PasswordEncryptor.hashAndHexPassword
public String hashAndHexPassword(final String password, final String salt, final HashAlgorithm hashAlgorithm, final Charset charset) throws NoSuchAlgorithmException, InvalidKeyException, UnsupportedEncodingException, NoSuchPaddingException, IllegalBlockSizeException, BadPaddingException, InvalidKeySpecException...
java
public String hashAndHexPassword(final String password, final String salt, final HashAlgorithm hashAlgorithm, final Charset charset) throws NoSuchAlgorithmException, InvalidKeyException, UnsupportedEncodingException, NoSuchPaddingException, IllegalBlockSizeException, BadPaddingException, InvalidKeySpecException...
[ "public", "String", "hashAndHexPassword", "(", "final", "String", "password", ",", "final", "String", "salt", ",", "final", "HashAlgorithm", "hashAlgorithm", ",", "final", "Charset", "charset", ")", "throws", "NoSuchAlgorithmException", ",", "InvalidKeyException", ","...
Hash and hex the given password with the given salt, hash algorithm and charset. @param password the password @param salt the salt @param hashAlgorithm the hash algorithm @param charset the charset @return the generated {@link String} object @throws NoSuchAlgorithmException is thrown if instantiation of the MessageDig...
[ "Hash", "and", "hex", "the", "given", "password", "with", "the", "given", "salt", "hash", "algorithm", "and", "charset", "." ]
7f51ef5e4457e24de7ff391f10bfc5609e6f1a34
https://github.com/astrapi69/mystic-crypt/blob/7f51ef5e4457e24de7ff391f10bfc5609e6f1a34/crypt-core/src/main/java/de/alpharogroup/crypto/pw/PasswordEncryptor.java#L185-L193
train
astrapi69/mystic-crypt
crypt-core/src/main/java/de/alpharogroup/crypto/pw/PasswordEncryptor.java
PasswordEncryptor.hashPassword
public String hashPassword(final String password, final String salt, final HashAlgorithm hashAlgorithm, final Charset charset) throws NoSuchAlgorithmException { final String hashedPassword = HashExtensions.hash(password, salt, hashAlgorithm, charset); return hashedPassword; }
java
public String hashPassword(final String password, final String salt, final HashAlgorithm hashAlgorithm, final Charset charset) throws NoSuchAlgorithmException { final String hashedPassword = HashExtensions.hash(password, salt, hashAlgorithm, charset); return hashedPassword; }
[ "public", "String", "hashPassword", "(", "final", "String", "password", ",", "final", "String", "salt", ",", "final", "HashAlgorithm", "hashAlgorithm", ",", "final", "Charset", "charset", ")", "throws", "NoSuchAlgorithmException", "{", "final", "String", "hashedPass...
Hashes the given password with the given salt, hash algorithm and charset. @param password the password @param salt the salt @param hashAlgorithm the hash algorithm @param charset the charset @return the generated {@link String} object @throws NoSuchAlgorithmException the no such algorithm exception
[ "Hashes", "the", "given", "password", "with", "the", "given", "salt", "hash", "algorithm", "and", "charset", "." ]
7f51ef5e4457e24de7ff391f10bfc5609e6f1a34
https://github.com/astrapi69/mystic-crypt/blob/7f51ef5e4457e24de7ff391f10bfc5609e6f1a34/crypt-core/src/main/java/de/alpharogroup/crypto/pw/PasswordEncryptor.java#L210-L215
train
phax/ph-web
ph-web/src/main/java/com/helger/web/scope/singleton/AbstractGlobalWebSingleton.java
AbstractGlobalWebSingleton.getGlobalSingleton
@Nonnull public static final <T extends AbstractGlobalWebSingleton> T getGlobalSingleton (@Nonnull final Class <T> aClass) { return getSingleton (_getStaticScope (true), aClass); }
java
@Nonnull public static final <T extends AbstractGlobalWebSingleton> T getGlobalSingleton (@Nonnull final Class <T> aClass) { return getSingleton (_getStaticScope (true), aClass); }
[ "@", "Nonnull", "public", "static", "final", "<", "T", "extends", "AbstractGlobalWebSingleton", ">", "T", "getGlobalSingleton", "(", "@", "Nonnull", "final", "Class", "<", "T", ">", "aClass", ")", "{", "return", "getSingleton", "(", "_getStaticScope", "(", "tr...
Get the singleton object in the current global web scope, using the passed class. If the singleton is not yet instantiated, a new instance is created. @param <T> The type to be returned @param aClass The class to be used. May not be <code>null</code>. The class must be public as needs to have a public no-argument cons...
[ "Get", "the", "singleton", "object", "in", "the", "current", "global", "web", "scope", "using", "the", "passed", "class", ".", "If", "the", "singleton", "is", "not", "yet", "instantiated", "a", "new", "instance", "is", "created", "." ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-web/src/main/java/com/helger/web/scope/singleton/AbstractGlobalWebSingleton.java#L62-L66
train
phax/ph-web
ph-network/src/main/java/com/helger/network/dns/DNSHelper.java
DNSHelper.setDNSCacheTime
public static void setDNSCacheTime (final int nSeconds) { final String sValue = Integer.toString (nSeconds); Security.setProperty ("networkaddress.cache.ttl", sValue); Security.setProperty ("networkaddress.cache.negative.ttl", sValue); SystemProperties.setPropertyValue ("disableWSAddressCaching", nSec...
java
public static void setDNSCacheTime (final int nSeconds) { final String sValue = Integer.toString (nSeconds); Security.setProperty ("networkaddress.cache.ttl", sValue); Security.setProperty ("networkaddress.cache.negative.ttl", sValue); SystemProperties.setPropertyValue ("disableWSAddressCaching", nSec...
[ "public", "static", "void", "setDNSCacheTime", "(", "final", "int", "nSeconds", ")", "{", "final", "String", "sValue", "=", "Integer", ".", "toString", "(", "nSeconds", ")", ";", "Security", ".", "setProperty", "(", "\"networkaddress.cache.ttl\"", ",", "sValue",...
Set special DNS client properties that have influence on the DNS client behavior. This method should be called as soon as possible on startup. In most cases it may be beneficiary if the respective system properties are provided as system properties on the commandline! @param nSeconds DNS client caching time in seconds...
[ "Set", "special", "DNS", "client", "properties", "that", "have", "influence", "on", "the", "DNS", "client", "behavior", ".", "This", "method", "should", "be", "called", "as", "soon", "as", "possible", "on", "startup", ".", "In", "most", "cases", "it", "may...
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-network/src/main/java/com/helger/network/dns/DNSHelper.java#L44-L50
train
phax/ph-web
ph-http/src/main/java/com/helger/http/AcceptCharsetList.java
AcceptCharsetList.getQValueOfCharset
@Nonnull public QValue getQValueOfCharset (@Nonnull final String sCharset) { ValueEnforcer.notNull (sCharset, "Charset"); // Find charset direct QValue aQuality = m_aMap.get (_unify (sCharset)); if (aQuality == null) { // If not explicitly given, check for "*" aQuality = m_aMap.get ...
java
@Nonnull public QValue getQValueOfCharset (@Nonnull final String sCharset) { ValueEnforcer.notNull (sCharset, "Charset"); // Find charset direct QValue aQuality = m_aMap.get (_unify (sCharset)); if (aQuality == null) { // If not explicitly given, check for "*" aQuality = m_aMap.get ...
[ "@", "Nonnull", "public", "QValue", "getQValueOfCharset", "(", "@", "Nonnull", "final", "String", "sCharset", ")", "{", "ValueEnforcer", ".", "notNull", "(", "sCharset", ",", "\"Charset\"", ")", ";", "// Find charset direct", "QValue", "aQuality", "=", "m_aMap", ...
Return the associated quality of the given charset. @param sCharset The charset name to query. May not be <code>null</code>. @return The associated {@link QValue}.
[ "Return", "the", "associated", "quality", "of", "the", "given", "charset", "." ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-http/src/main/java/com/helger/http/AcceptCharsetList.java#L55-L73
train
flow/caustic
lwjgl/src/main/java/com/flowpowered/caustic/lwjgl/LWJGLUtil.java
LWJGLUtil.checkForGLError
public static void checkForGLError() { if (CausticUtil.isDebugEnabled()) { final int errorValue = GL11.glGetError(); if (errorValue != GL11.GL_NO_ERROR) { throw new GLException("GL ERROR: " + GLU.gluErrorString(errorValue)); } } }
java
public static void checkForGLError() { if (CausticUtil.isDebugEnabled()) { final int errorValue = GL11.glGetError(); if (errorValue != GL11.GL_NO_ERROR) { throw new GLException("GL ERROR: " + GLU.gluErrorString(errorValue)); } } }
[ "public", "static", "void", "checkForGLError", "(", ")", "{", "if", "(", "CausticUtil", ".", "isDebugEnabled", "(", ")", ")", "{", "final", "int", "errorValue", "=", "GL11", ".", "glGetError", "(", ")", ";", "if", "(", "errorValue", "!=", "GL11", ".", ...
Throws an exception if OpenGL reports an error. @throws GLException If OpenGL reports an error
[ "Throws", "an", "exception", "if", "OpenGL", "reports", "an", "error", "." ]
88652fcf0621ce158a0e92ce4c570ed6b1f6fca9
https://github.com/flow/caustic/blob/88652fcf0621ce158a0e92ce4c570ed6b1f6fca9/lwjgl/src/main/java/com/flowpowered/caustic/lwjgl/LWJGLUtil.java#L125-L132
train
astrapi69/mystic-crypt
crypt-data/src/main/java/de/alpharogroup/crypto/key/reader/PemObjectReader.java
PemObjectReader.getPemObject
public static PemObject getPemObject(final File file) throws IOException { PemObject pemObject; try (PemReader pemReader = new PemReader(new InputStreamReader(new FileInputStream(file)))) { pemObject = pemReader.readPemObject(); } return pemObject; }
java
public static PemObject getPemObject(final File file) throws IOException { PemObject pemObject; try (PemReader pemReader = new PemReader(new InputStreamReader(new FileInputStream(file)))) { pemObject = pemReader.readPemObject(); } return pemObject; }
[ "public", "static", "PemObject", "getPemObject", "(", "final", "File", "file", ")", "throws", "IOException", "{", "PemObject", "pemObject", ";", "try", "(", "PemReader", "pemReader", "=", "new", "PemReader", "(", "new", "InputStreamReader", "(", "new", "FileInpu...
Gets the pem object. @param file the file @return the pem object @throws IOException Signals that an I/O exception has occurred.
[ "Gets", "the", "pem", "object", "." ]
7f51ef5e4457e24de7ff391f10bfc5609e6f1a34
https://github.com/astrapi69/mystic-crypt/blob/7f51ef5e4457e24de7ff391f10bfc5609e6f1a34/crypt-data/src/main/java/de/alpharogroup/crypto/key/reader/PemObjectReader.java#L65-L73
train
phax/ph-web
ph-servlet/src/main/java/com/helger/servlet/mock/MockHttpSession.java
MockHttpSession.clearAttributes
public void clearAttributes () { for (final Map.Entry <String, Object> entry : m_aAttributes.entrySet ()) { final String sName = entry.getKey (); final Object aValue = entry.getValue (); if (aValue instanceof HttpSessionBindingListener) ((HttpSessionBindingListener) aValue).valueUnbo...
java
public void clearAttributes () { for (final Map.Entry <String, Object> entry : m_aAttributes.entrySet ()) { final String sName = entry.getKey (); final Object aValue = entry.getValue (); if (aValue instanceof HttpSessionBindingListener) ((HttpSessionBindingListener) aValue).valueUnbo...
[ "public", "void", "clearAttributes", "(", ")", "{", "for", "(", "final", "Map", ".", "Entry", "<", "String", ",", "Object", ">", "entry", ":", "m_aAttributes", ".", "entrySet", "(", ")", ")", "{", "final", "String", "sName", "=", "entry", ".", "getKey"...
Clear all of this session's attributes.
[ "Clear", "all", "of", "this", "session", "s", "attributes", "." ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-servlet/src/main/java/com/helger/servlet/mock/MockHttpSession.java#L218-L228
train
phax/ph-web
ph-servlet/src/main/java/com/helger/servlet/mock/MockHttpSession.java
MockHttpSession.serializeState
@Nonnull public Serializable serializeState () { final ICommonsMap <String, Object> aState = new CommonsHashMap <> (); for (final Map.Entry <String, Object> entry : m_aAttributes.entrySet ()) { final String sName = entry.getKey (); final Object aValue = entry.getValue (); if (aValue in...
java
@Nonnull public Serializable serializeState () { final ICommonsMap <String, Object> aState = new CommonsHashMap <> (); for (final Map.Entry <String, Object> entry : m_aAttributes.entrySet ()) { final String sName = entry.getKey (); final Object aValue = entry.getValue (); if (aValue in...
[ "@", "Nonnull", "public", "Serializable", "serializeState", "(", ")", "{", "final", "ICommonsMap", "<", "String", ",", "Object", ">", "aState", "=", "new", "CommonsHashMap", "<>", "(", ")", ";", "for", "(", "final", "Map", ".", "Entry", "<", "String", ",...
Serialize the attributes of this session into an object that can be turned into a byte array with standard Java serialization. @return a representation of this session's serialized state
[ "Serialize", "the", "attributes", "of", "this", "session", "into", "an", "object", "that", "can", "be", "turned", "into", "a", "byte", "array", "with", "standard", "Java", "serialization", "." ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-servlet/src/main/java/com/helger/servlet/mock/MockHttpSession.java#L264-L288
train
phax/ph-web
ph-servlet/src/main/java/com/helger/servlet/response/ResponseHelperSettings.java
ResponseHelperSettings.setAll
@Nonnull public static EChange setAll (final boolean bResponseCompressionEnabled, final boolean bResponseGzipEnabled, final boolean bResponseDeflateEnabled) { return s_aRWLock.writeLocked ( () -> { EChange eChange = EChange.UNCHANGED; i...
java
@Nonnull public static EChange setAll (final boolean bResponseCompressionEnabled, final boolean bResponseGzipEnabled, final boolean bResponseDeflateEnabled) { return s_aRWLock.writeLocked ( () -> { EChange eChange = EChange.UNCHANGED; i...
[ "@", "Nonnull", "public", "static", "EChange", "setAll", "(", "final", "boolean", "bResponseCompressionEnabled", ",", "final", "boolean", "bResponseGzipEnabled", ",", "final", "boolean", "bResponseDeflateEnabled", ")", "{", "return", "s_aRWLock", ".", "writeLocked", "...
Set all parameters at once as an atomic transaction @param bResponseCompressionEnabled <code>true</code> to overall enable the usage @param bResponseGzipEnabled <code>true</code> to enable GZip if compression is enabled @param bResponseDeflateEnabled <code>true</code> to enable Deflate if compression is enabled @retur...
[ "Set", "all", "parameters", "at", "once", "as", "an", "atomic", "transaction" ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-servlet/src/main/java/com/helger/servlet/response/ResponseHelperSettings.java#L169-L196
train
phax/ph-web
ph-servlet/src/main/java/com/helger/servlet/response/ResponseHelperSettings.java
ResponseHelperSettings.setExpirationSeconds
@Nonnull public static EChange setExpirationSeconds (final int nExpirationSeconds) { return s_aRWLock.writeLocked ( () -> { if (s_nExpirationSeconds == nExpirationSeconds) return EChange.UNCHANGED; s_nExpirationSeconds = nExpirationSeconds; LOGGER.info ("ResponseHelper expirationSecond...
java
@Nonnull public static EChange setExpirationSeconds (final int nExpirationSeconds) { return s_aRWLock.writeLocked ( () -> { if (s_nExpirationSeconds == nExpirationSeconds) return EChange.UNCHANGED; s_nExpirationSeconds = nExpirationSeconds; LOGGER.info ("ResponseHelper expirationSecond...
[ "@", "Nonnull", "public", "static", "EChange", "setExpirationSeconds", "(", "final", "int", "nExpirationSeconds", ")", "{", "return", "s_aRWLock", ".", "writeLocked", "(", "(", ")", "->", "{", "if", "(", "s_nExpirationSeconds", "==", "nExpirationSeconds", ")", "...
Set the default expiration settings to be used for objects that should use HTTP caching @param nExpirationSeconds The number of seconds for which the response should be cached @return {@link EChange}
[ "Set", "the", "default", "expiration", "settings", "to", "be", "used", "for", "objects", "that", "should", "use", "HTTP", "caching" ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-servlet/src/main/java/com/helger/servlet/response/ResponseHelperSettings.java#L206-L216
train
phax/ph-web
ph-web/src/main/java/com/helger/web/fileupload/parse/FileItemStream.java
FileItemStream.openStream
@Nonnull public InputStream openStream () throws IOException { if (m_aIS instanceof ICloseable && ((ICloseable) m_aIS).isClosed ()) throw new MultipartItemSkippedException (); return m_aIS; }
java
@Nonnull public InputStream openStream () throws IOException { if (m_aIS instanceof ICloseable && ((ICloseable) m_aIS).isClosed ()) throw new MultipartItemSkippedException (); return m_aIS; }
[ "@", "Nonnull", "public", "InputStream", "openStream", "(", ")", "throws", "IOException", "{", "if", "(", "m_aIS", "instanceof", "ICloseable", "&&", "(", "(", "ICloseable", ")", "m_aIS", ")", ".", "isClosed", "(", ")", ")", "throw", "new", "MultipartItemSkip...
Returns an input stream, which may be used to read the items contents. @return Opened input stream. @throws IOException An I/O error occurred.
[ "Returns", "an", "input", "stream", "which", "may", "be", "used", "to", "read", "the", "items", "contents", "." ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-web/src/main/java/com/helger/web/fileupload/parse/FileItemStream.java#L213-L219
train
shred/commons-xml
src/main/java/org/shredzone/commons/xml/XQuery.java
XQuery.text
public @Nonnull String text() { return new NodeListSpliterator(node.getChildNodes()).stream() .filter(it -> it instanceof Text) .map(it -> ((Text) it).getNodeValue()) .collect(joining()); }
java
public @Nonnull String text() { return new NodeListSpliterator(node.getChildNodes()).stream() .filter(it -> it instanceof Text) .map(it -> ((Text) it).getNodeValue()) .collect(joining()); }
[ "public", "@", "Nonnull", "String", "text", "(", ")", "{", "return", "new", "NodeListSpliterator", "(", "node", ".", "getChildNodes", "(", ")", ")", ".", "stream", "(", ")", ".", "filter", "(", "it", "->", "it", "instanceof", "Text", ")", ".", "map", ...
Returns the text content of this node. @return this {@link XQuery} node's text content, non recursively.
[ "Returns", "the", "text", "content", "of", "this", "node", "." ]
e0b928cc6db85d9a5fedacd7c06527ec0d98bb6f
https://github.com/shred/commons-xml/blob/e0b928cc6db85d9a5fedacd7c06527ec0d98bb6f/src/main/java/org/shredzone/commons/xml/XQuery.java#L276-L281
train
shred/commons-xml
src/main/java/org/shredzone/commons/xml/XQuery.java
XQuery.attr
public @Nonnull Map<String, String> attr() { synchronized (this) { if (attrMap.get() == null) { attrMap.set( Optional.ofNullable(node.getAttributes()) .map(XQuery::attributesToMap) .map(Collections::unmodifiableMap) ...
java
public @Nonnull Map<String, String> attr() { synchronized (this) { if (attrMap.get() == null) { attrMap.set( Optional.ofNullable(node.getAttributes()) .map(XQuery::attributesToMap) .map(Collections::unmodifiableMap) ...
[ "public", "@", "Nonnull", "Map", "<", "String", ",", "String", ">", "attr", "(", ")", "{", "synchronized", "(", "this", ")", "{", "if", "(", "attrMap", ".", "get", "(", ")", "==", "null", ")", "{", "attrMap", ".", "set", "(", "Optional", ".", "of...
Returns a map of attributes. @return a map of this node's attributes.
[ "Returns", "a", "map", "of", "attributes", "." ]
e0b928cc6db85d9a5fedacd7c06527ec0d98bb6f
https://github.com/shred/commons-xml/blob/e0b928cc6db85d9a5fedacd7c06527ec0d98bb6f/src/main/java/org/shredzone/commons/xml/XQuery.java#L297-L309
train
shred/commons-xml
src/main/java/org/shredzone/commons/xml/XQuery.java
XQuery.evaluate
private @Nonnull NodeList evaluate(String xpath) { try { XPathExpression expr = xpf.newXPath().compile(xpath); return (NodeList) expr.evaluate(node, XPathConstants.NODESET); } catch (XPathExpressionException ex) { throw new IllegalArgumentException("Invalid XPath '" +...
java
private @Nonnull NodeList evaluate(String xpath) { try { XPathExpression expr = xpf.newXPath().compile(xpath); return (NodeList) expr.evaluate(node, XPathConstants.NODESET); } catch (XPathExpressionException ex) { throw new IllegalArgumentException("Invalid XPath '" +...
[ "private", "@", "Nonnull", "NodeList", "evaluate", "(", "String", "xpath", ")", "{", "try", "{", "XPathExpression", "expr", "=", "xpf", ".", "newXPath", "(", ")", ".", "compile", "(", "xpath", ")", ";", "return", "(", "NodeList", ")", "expr", ".", "eva...
Evaluates the XPath expression and returns a list of nodes. @param xpath XPath expression @return {@link NodeList} matching the expression @throws IllegalArgumentException if the XPath expression was invalid
[ "Evaluates", "the", "XPath", "expression", "and", "returns", "a", "list", "of", "nodes", "." ]
e0b928cc6db85d9a5fedacd7c06527ec0d98bb6f
https://github.com/shred/commons-xml/blob/e0b928cc6db85d9a5fedacd7c06527ec0d98bb6f/src/main/java/org/shredzone/commons/xml/XQuery.java#L360-L367
train
shred/commons-xml
src/main/java/org/shredzone/commons/xml/XQuery.java
XQuery.findElement
private @Nonnull Optional<XQuery> findElement(Function<Node, Node> iterator) { Node it = node; do { it = iterator.apply(it); } while (it != null && !(it instanceof Element)); return Optional.ofNullable(it).map(XQuery::new); }
java
private @Nonnull Optional<XQuery> findElement(Function<Node, Node> iterator) { Node it = node; do { it = iterator.apply(it); } while (it != null && !(it instanceof Element)); return Optional.ofNullable(it).map(XQuery::new); }
[ "private", "@", "Nonnull", "Optional", "<", "XQuery", ">", "findElement", "(", "Function", "<", "Node", ",", "Node", ">", "iterator", ")", "{", "Node", "it", "=", "node", ";", "do", "{", "it", "=", "iterator", ".", "apply", "(", "it", ")", ";", "}"...
Finds an Element node by applying the iterator function until another Element was found. @param iterator Iterator to apply @return node that was found
[ "Finds", "an", "Element", "node", "by", "applying", "the", "iterator", "function", "until", "another", "Element", "was", "found", "." ]
e0b928cc6db85d9a5fedacd7c06527ec0d98bb6f
https://github.com/shred/commons-xml/blob/e0b928cc6db85d9a5fedacd7c06527ec0d98bb6f/src/main/java/org/shredzone/commons/xml/XQuery.java#L377-L383
train
phax/ph-web
ph-http/src/main/java/com/helger/http/digestauth/DigestAuthServerBuilder.java
DigestAuthServerBuilder.setOpaque
@Nonnull public DigestAuthServerBuilder setOpaque (@Nonnull final String sOpaque) { if (!HttpStringHelper.isQuotedTextContent (sOpaque)) throw new IllegalArgumentException ("opaque is invalid: " + sOpaque); m_sOpaque = sOpaque; return this; }
java
@Nonnull public DigestAuthServerBuilder setOpaque (@Nonnull final String sOpaque) { if (!HttpStringHelper.isQuotedTextContent (sOpaque)) throw new IllegalArgumentException ("opaque is invalid: " + sOpaque); m_sOpaque = sOpaque; return this; }
[ "@", "Nonnull", "public", "DigestAuthServerBuilder", "setOpaque", "(", "@", "Nonnull", "final", "String", "sOpaque", ")", "{", "if", "(", "!", "HttpStringHelper", ".", "isQuotedTextContent", "(", "sOpaque", ")", ")", "throw", "new", "IllegalArgumentException", "("...
A string of data, specified by the server, which should be returned by the client unchanged in the Authorization header of subsequent requests with URIs in the same protection space. It is recommended that this string be base64 or hexadecimal data. @param sOpaque The opaque value. May not be <code>null</code>. @return...
[ "A", "string", "of", "data", "specified", "by", "the", "server", "which", "should", "be", "returned", "by", "the", "client", "unchanged", "in", "the", "Authorization", "header", "of", "subsequent", "requests", "with", "URIs", "in", "the", "same", "protection",...
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-http/src/main/java/com/helger/http/digestauth/DigestAuthServerBuilder.java#L161-L169
train
phax/ph-web
ph-servlet/src/main/java/com/helger/servlet/ServletHelper.java
ServletHelper.getRequestPathInfo
@Nonnull public static String getRequestPathInfo (@Nullable final HttpServletRequest aRequest) { String ret = null; if (aRequest != null) try { // They may return null! if (aRequest.isAsyncSupported () && aRequest.isAsyncStarted ()) ret = (String) aRequest.getAttribute ...
java
@Nonnull public static String getRequestPathInfo (@Nullable final HttpServletRequest aRequest) { String ret = null; if (aRequest != null) try { // They may return null! if (aRequest.isAsyncSupported () && aRequest.isAsyncStarted ()) ret = (String) aRequest.getAttribute ...
[ "@", "Nonnull", "public", "static", "String", "getRequestPathInfo", "(", "@", "Nullable", "final", "HttpServletRequest", "aRequest", ")", "{", "String", "ret", "=", "null", ";", "if", "(", "aRequest", "!=", "null", ")", "try", "{", "// They may return null!", ...
Get the path info of an request, supporting sync and async requests. @param aRequest Source request. May be <code>null</code>. @return Empty string if request is <code>null</code> or a the path info.
[ "Get", "the", "path", "info", "of", "an", "request", "supporting", "sync", "and", "async", "requests", "." ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-servlet/src/main/java/com/helger/servlet/ServletHelper.java#L168-L193
train
phax/ph-web
ph-servlet/src/main/java/com/helger/servlet/ServletHelper.java
ServletHelper.getRequestRequestURI
@Nonnull public static String getRequestRequestURI (@Nullable final HttpServletRequest aRequest) { String ret = ""; if (aRequest != null) try { if (aRequest.isAsyncSupported () && aRequest.isAsyncStarted ()) ret = (String) aRequest.getAttribute (AsyncContext.ASYNC_REQUEST_URI);...
java
@Nonnull public static String getRequestRequestURI (@Nullable final HttpServletRequest aRequest) { String ret = ""; if (aRequest != null) try { if (aRequest.isAsyncSupported () && aRequest.isAsyncStarted ()) ret = (String) aRequest.getAttribute (AsyncContext.ASYNC_REQUEST_URI);...
[ "@", "Nonnull", "public", "static", "String", "getRequestRequestURI", "(", "@", "Nullable", "final", "HttpServletRequest", "aRequest", ")", "{", "String", "ret", "=", "\"\"", ";", "if", "(", "aRequest", "!=", "null", ")", "try", "{", "if", "(", "aRequest", ...
Get the request URI of an request, supporting sync and async requests. @param aRequest Source request. May be <code>null</code>. @return Empty string if request is <code>null</code> or the request URI.
[ "Get", "the", "request", "URI", "of", "an", "request", "supporting", "sync", "and", "async", "requests", "." ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-servlet/src/main/java/com/helger/servlet/ServletHelper.java#L238-L258
train
phax/ph-web
ph-servlet/src/main/java/com/helger/servlet/ServletHelper.java
ServletHelper.getRequestRequestURL
@Nonnull public static StringBuffer getRequestRequestURL (@Nullable final HttpServletRequest aRequest) { StringBuffer ret = null; if (aRequest != null) try { ret = aRequest.getRequestURL (); } catch (final Exception ex) { // fall through if (isLogExcepti...
java
@Nonnull public static StringBuffer getRequestRequestURL (@Nullable final HttpServletRequest aRequest) { StringBuffer ret = null; if (aRequest != null) try { ret = aRequest.getRequestURL (); } catch (final Exception ex) { // fall through if (isLogExcepti...
[ "@", "Nonnull", "public", "static", "StringBuffer", "getRequestRequestURL", "(", "@", "Nullable", "final", "HttpServletRequest", "aRequest", ")", "{", "StringBuffer", "ret", "=", "null", ";", "if", "(", "aRequest", "!=", "null", ")", "try", "{", "ret", "=", ...
Get the request URL of an request, supporting sync and async requests. @param aRequest Source request. May be <code>null</code>. @return Empty {@link StringBuffer} if request is <code>null</code> or the request URL.
[ "Get", "the", "request", "URL", "of", "an", "request", "supporting", "sync", "and", "async", "requests", "." ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-servlet/src/main/java/com/helger/servlet/ServletHelper.java#L268-L285
train
phax/ph-web
ph-servlet/src/main/java/com/helger/servlet/ServletHelper.java
ServletHelper.getRequestServletPath
@Nonnull public static String getRequestServletPath (@Nullable final HttpServletRequest aRequest) { String ret = ""; if (aRequest != null) try { if (aRequest.isAsyncSupported () && aRequest.isAsyncStarted ()) ret = (String) aRequest.getAttribute (AsyncContext.ASYNC_SERVLET_PATH...
java
@Nonnull public static String getRequestServletPath (@Nullable final HttpServletRequest aRequest) { String ret = ""; if (aRequest != null) try { if (aRequest.isAsyncSupported () && aRequest.isAsyncStarted ()) ret = (String) aRequest.getAttribute (AsyncContext.ASYNC_SERVLET_PATH...
[ "@", "Nonnull", "public", "static", "String", "getRequestServletPath", "(", "@", "Nullable", "final", "HttpServletRequest", "aRequest", ")", "{", "String", "ret", "=", "\"\"", ";", "if", "(", "aRequest", "!=", "null", ")", "try", "{", "if", "(", "aRequest", ...
Get the servlet path of an request, supporting sync and async requests. @param aRequest Source request. May be <code>null</code>. @return Empty string if request is <code>null</code> or the servlet path. @since 8.8.0
[ "Get", "the", "servlet", "path", "of", "an", "request", "supporting", "sync", "and", "async", "requests", "." ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-servlet/src/main/java/com/helger/servlet/ServletHelper.java#L295-L319
train
phax/ph-web
ph-http/src/main/java/com/helger/http/basicauth/BasicAuthServerBuilder.java
BasicAuthServerBuilder.setRealm
@Nonnull public BasicAuthServerBuilder setRealm (@Nonnull final String sRealm) { ValueEnforcer.isTrue (HttpStringHelper.isQuotedTextContent (sRealm), () -> "Realm is invalid: " + sRealm); m_sRealm = sRealm; return this; }
java
@Nonnull public BasicAuthServerBuilder setRealm (@Nonnull final String sRealm) { ValueEnforcer.isTrue (HttpStringHelper.isQuotedTextContent (sRealm), () -> "Realm is invalid: " + sRealm); m_sRealm = sRealm; return this; }
[ "@", "Nonnull", "public", "BasicAuthServerBuilder", "setRealm", "(", "@", "Nonnull", "final", "String", "sRealm", ")", "{", "ValueEnforcer", ".", "isTrue", "(", "HttpStringHelper", ".", "isQuotedTextContent", "(", "sRealm", ")", ",", "(", ")", "->", "\"Realm is ...
Set the realm to be used. @param sRealm The realm to be used. May not be <code>null</code> and should not be empty. @return this
[ "Set", "the", "realm", "to", "be", "used", "." ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-http/src/main/java/com/helger/http/basicauth/BasicAuthServerBuilder.java#L45-L52
train
khmarbaise/sapm
src/main/java/com/soebes/subversion/sapm/Path.java
Path.contains
public boolean contains(String path) { boolean result = false; FileName fn = new FileName(path); if (fn.getPath().startsWith(getPath())) { result = true; } return result; }
java
public boolean contains(String path) { boolean result = false; FileName fn = new FileName(path); if (fn.getPath().startsWith(getPath())) { result = true; } return result; }
[ "public", "boolean", "contains", "(", "String", "path", ")", "{", "boolean", "result", "=", "false", ";", "FileName", "fn", "=", "new", "FileName", "(", "path", ")", ";", "if", "(", "fn", ".", "getPath", "(", ")", ".", "startsWith", "(", "getPath", "...
This will check if the given path is part of the path which is represented by this instance. @see {@link PathTest} @param path The path to check for. @return true if the given path is contained in false otherwise.
[ "This", "will", "check", "if", "the", "given", "path", "is", "part", "of", "the", "path", "which", "is", "represented", "by", "this", "instance", "." ]
b5da5b0d8929324f03cb3a4233a3534813f93eea
https://github.com/khmarbaise/sapm/blob/b5da5b0d8929324f03cb3a4233a3534813f93eea/src/main/java/com/soebes/subversion/sapm/Path.java#L60-L67
train
astrapi69/mystic-crypt
crypt-core/src/main/java/de/alpharogroup/crypto/processors/wordlist/WordlistsProcessor.java
WordlistsProcessor.getCurrentAttempt
public String getCurrentAttempt() { if (currentIndex < words.size()) { final String currentAttempt = words.get(currentIndex); return currentAttempt; } return null; }
java
public String getCurrentAttempt() { if (currentIndex < words.size()) { final String currentAttempt = words.get(currentIndex); return currentAttempt; } return null; }
[ "public", "String", "getCurrentAttempt", "(", ")", "{", "if", "(", "currentIndex", "<", "words", ".", "size", "(", ")", ")", "{", "final", "String", "currentAttempt", "=", "words", ".", "get", "(", "currentIndex", ")", ";", "return", "currentAttempt", ";",...
Gets the current attempt. @return the current attempt
[ "Gets", "the", "current", "attempt", "." ]
7f51ef5e4457e24de7ff391f10bfc5609e6f1a34
https://github.com/astrapi69/mystic-crypt/blob/7f51ef5e4457e24de7ff391f10bfc5609e6f1a34/crypt-core/src/main/java/de/alpharogroup/crypto/processors/wordlist/WordlistsProcessor.java#L86-L94
train
astrapi69/mystic-crypt
crypt-core/src/main/java/de/alpharogroup/crypto/processors/wordlist/WordlistsProcessor.java
WordlistsProcessor.process
public boolean process() { boolean continueIterate = true; boolean found = false; String attempt = getCurrentAttempt(); while (continueIterate) { if (attempt.equals(toCheckAgainst)) { found = true; break; } attempt = getCurrentAttempt(); continueIterate = increment(); } return foun...
java
public boolean process() { boolean continueIterate = true; boolean found = false; String attempt = getCurrentAttempt(); while (continueIterate) { if (attempt.equals(toCheckAgainst)) { found = true; break; } attempt = getCurrentAttempt(); continueIterate = increment(); } return foun...
[ "public", "boolean", "process", "(", ")", "{", "boolean", "continueIterate", "=", "true", ";", "boolean", "found", "=", "false", ";", "String", "attempt", "=", "getCurrentAttempt", "(", ")", ";", "while", "(", "continueIterate", ")", "{", "if", "(", "attem...
Processes the word list. @return true, if successful
[ "Processes", "the", "word", "list", "." ]
7f51ef5e4457e24de7ff391f10bfc5609e6f1a34
https://github.com/astrapi69/mystic-crypt/blob/7f51ef5e4457e24de7ff391f10bfc5609e6f1a34/crypt-core/src/main/java/de/alpharogroup/crypto/processors/wordlist/WordlistsProcessor.java#L116-L132
train
phax/ph-web
ph-smtp/src/main/java/com/helger/smtp/failed/FailedMailQueue.java
FailedMailQueue.remove
@Nullable public FailedMailData remove (@Nullable final String sID) { if (StringHelper.hasNoText (sID)) return null; return m_aRWLock.writeLocked ( () -> internalRemove (sID)); }
java
@Nullable public FailedMailData remove (@Nullable final String sID) { if (StringHelper.hasNoText (sID)) return null; return m_aRWLock.writeLocked ( () -> internalRemove (sID)); }
[ "@", "Nullable", "public", "FailedMailData", "remove", "(", "@", "Nullable", "final", "String", "sID", ")", "{", "if", "(", "StringHelper", ".", "hasNoText", "(", "sID", ")", ")", "return", "null", ";", "return", "m_aRWLock", ".", "writeLocked", "(", "(", ...
Remove the failed mail at the given index. @param sID The ID of the failed mail data to be removed. @return <code>null</code> if no such data exists
[ "Remove", "the", "failed", "mail", "at", "the", "given", "index", "." ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-smtp/src/main/java/com/helger/smtp/failed/FailedMailQueue.java#L92-L99
train
phax/ph-web
ph-http/src/main/java/com/helger/http/basicauth/HttpBasicAuth.java
HttpBasicAuth.getBasicAuthClientCredentials
@Nullable public static BasicAuthClientCredentials getBasicAuthClientCredentials (@Nullable final String sAuthHeader) { final String sRealHeader = StringHelper.trim (sAuthHeader); if (StringHelper.hasNoText (sRealHeader)) return null; final String [] aElements = RegExHelper.getSplitToArray (sReal...
java
@Nullable public static BasicAuthClientCredentials getBasicAuthClientCredentials (@Nullable final String sAuthHeader) { final String sRealHeader = StringHelper.trim (sAuthHeader); if (StringHelper.hasNoText (sRealHeader)) return null; final String [] aElements = RegExHelper.getSplitToArray (sReal...
[ "@", "Nullable", "public", "static", "BasicAuthClientCredentials", "getBasicAuthClientCredentials", "(", "@", "Nullable", "final", "String", "sAuthHeader", ")", "{", "final", "String", "sRealHeader", "=", "StringHelper", ".", "trim", "(", "sAuthHeader", ")", ";", "i...
Get the Basic authentication credentials from the passed HTTP header value. @param sAuthHeader The HTTP header value to be interpreted. May be <code>null</code>. @return <code>null</code> if the passed value is not a correct HTTP Basic Authentication header value.
[ "Get", "the", "Basic", "authentication", "credentials", "from", "the", "passed", "HTTP", "header", "value", "." ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-http/src/main/java/com/helger/http/basicauth/HttpBasicAuth.java#L62-L100
train
phax/ph-web
ph-xservlet/src/main/java/com/helger/xservlet/servletstatus/ServletStatusManager.java
ServletStatusManager.onServletInit
public void onServletInit (@Nonnull final Class <? extends GenericServlet> aServletClass) { if (LOGGER.isDebugEnabled ()) LOGGER.debug ("onServletInit: " + aServletClass); _updateStatus (aServletClass, EServletStatus.INITED); }
java
public void onServletInit (@Nonnull final Class <? extends GenericServlet> aServletClass) { if (LOGGER.isDebugEnabled ()) LOGGER.debug ("onServletInit: " + aServletClass); _updateStatus (aServletClass, EServletStatus.INITED); }
[ "public", "void", "onServletInit", "(", "@", "Nonnull", "final", "Class", "<", "?", "extends", "GenericServlet", ">", "aServletClass", ")", "{", "if", "(", "LOGGER", ".", "isDebugEnabled", "(", ")", ")", "LOGGER", ".", "debug", "(", "\"onServletInit: \"", "+...
Invoked at the beginning of the servlet initialization. @param aServletClass Relevant servlet class. May not be <code>null</code>.
[ "Invoked", "at", "the", "beginning", "of", "the", "servlet", "initialization", "." ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-xservlet/src/main/java/com/helger/xservlet/servletstatus/ServletStatusManager.java#L122-L127
train
phax/ph-web
ph-xservlet/src/main/java/com/helger/xservlet/servletstatus/ServletStatusManager.java
ServletStatusManager.onServletInvocation
public void onServletInvocation (@Nonnull final Class <? extends GenericServlet> aServletClass) { m_aRWLock.writeLocked ( () -> _getOrCreateServletStatus (aServletClass).internalIncrementInvocationCount ()); }
java
public void onServletInvocation (@Nonnull final Class <? extends GenericServlet> aServletClass) { m_aRWLock.writeLocked ( () -> _getOrCreateServletStatus (aServletClass).internalIncrementInvocationCount ()); }
[ "public", "void", "onServletInvocation", "(", "@", "Nonnull", "final", "Class", "<", "?", "extends", "GenericServlet", ">", "aServletClass", ")", "{", "m_aRWLock", ".", "writeLocked", "(", "(", ")", "->", "_getOrCreateServletStatus", "(", "aServletClass", ")", "...
Invoked at the beginning of a servlet invocation @param aServletClass Servlet class invoked. May not be <code>null</code>.
[ "Invoked", "at", "the", "beginning", "of", "a", "servlet", "invocation" ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-xservlet/src/main/java/com/helger/xservlet/servletstatus/ServletStatusManager.java#L144-L147
train
phax/ph-web
ph-network/src/main/java/com/helger/network/port/NetworkPortHelper.java
NetworkPortHelper.checkPortOpen
@Nonnull public static ENetworkPortStatus checkPortOpen (@Nonnull @Nonempty final String sHostName, @Nonnegative final int nPort, @Nonnegative final int nTimeoutMillisecs) { ValueEnforcer.notEmpty (sHostName, "Ho...
java
@Nonnull public static ENetworkPortStatus checkPortOpen (@Nonnull @Nonempty final String sHostName, @Nonnegative final int nPort, @Nonnegative final int nTimeoutMillisecs) { ValueEnforcer.notEmpty (sHostName, "Ho...
[ "@", "Nonnull", "public", "static", "ENetworkPortStatus", "checkPortOpen", "(", "@", "Nonnull", "@", "Nonempty", "final", "String", "sHostName", ",", "@", "Nonnegative", "final", "int", "nPort", ",", "@", "Nonnegative", "final", "int", "nTimeoutMillisecs", ")", ...
Check the status of a remote port. @param sHostName Hostname or IP address to check. @param nPort Port number to check. @param nTimeoutMillisecs Connection timeout in milliseconds. @return Never <code>null</code>.
[ "Check", "the", "status", "of", "a", "remote", "port", "." ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-network/src/main/java/com/helger/network/port/NetworkPortHelper.java#L76-L118
train
phax/ph-web
ph-useragent/src/main/java/com/helger/useragent/UserAgentDecryptor.java
UserAgentDecryptor._decryptUserAgent
@Nonnull private static UserAgentElementList _decryptUserAgent (@Nonnull final String sUserAgent) { final UserAgentElementList ret = new UserAgentElementList (); final StringScanner aSS = new StringScanner (sUserAgent.trim ()); while (true) { aSS.skipWhitespaces (); final int nIndex = aS...
java
@Nonnull private static UserAgentElementList _decryptUserAgent (@Nonnull final String sUserAgent) { final UserAgentElementList ret = new UserAgentElementList (); final StringScanner aSS = new StringScanner (sUserAgent.trim ()); while (true) { aSS.skipWhitespaces (); final int nIndex = aS...
[ "@", "Nonnull", "private", "static", "UserAgentElementList", "_decryptUserAgent", "(", "@", "Nonnull", "final", "String", "sUserAgent", ")", "{", "final", "UserAgentElementList", "ret", "=", "new", "UserAgentElementList", "(", ")", ";", "final", "StringScanner", "aS...
Parse the passed user agent. @param sUserAgent The user agent string to parse. @return A list than can contain {@link ReadOnlyPair}, {@link String} and {@link ICommonsList} of String objects.
[ "Parse", "the", "passed", "user", "agent", "." ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-useragent/src/main/java/com/helger/useragent/UserAgentDecryptor.java#L58-L126
train
phax/ph-web
ph-useragent/src/main/java/com/helger/useragent/UserAgentDecryptor.java
UserAgentDecryptor.decryptUserAgentString
@Nonnull public static IUserAgent decryptUserAgentString (@Nonnull final String sUserAgent) { ValueEnforcer.notNull (sUserAgent, "UserAgent"); String sRealUserAgent = sUserAgent; // Check if surrounded with '"' or ''' if (sRealUserAgent.length () >= 2) { final char cFirst = sRealUserAgen...
java
@Nonnull public static IUserAgent decryptUserAgentString (@Nonnull final String sUserAgent) { ValueEnforcer.notNull (sUserAgent, "UserAgent"); String sRealUserAgent = sUserAgent; // Check if surrounded with '"' or ''' if (sRealUserAgent.length () >= 2) { final char cFirst = sRealUserAgen...
[ "@", "Nonnull", "public", "static", "IUserAgent", "decryptUserAgentString", "(", "@", "Nonnull", "final", "String", "sUserAgent", ")", "{", "ValueEnforcer", ".", "notNull", "(", "sUserAgent", ",", "\"UserAgent\"", ")", ";", "String", "sRealUserAgent", "=", "sUserA...
Decrypt the passed user agent string. @param sUserAgent The user agent string to decrypt. May not be <code>null</code>. @return The user agent object. Never <code>null</code>.
[ "Decrypt", "the", "passed", "user", "agent", "string", "." ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-useragent/src/main/java/com/helger/useragent/UserAgentDecryptor.java#L135-L155
train
phax/ph-web
ph-network/src/main/java/com/helger/network/proxy/AuthenticatorProxySettingsManager.java
AuthenticatorProxySettingsManager.requestProxyPasswordAuthentication
@Nullable public static PasswordAuthentication requestProxyPasswordAuthentication (@Nullable final String sHostName, @Nullable final int nPort, @Nullable final String s...
java
@Nullable public static PasswordAuthentication requestProxyPasswordAuthentication (@Nullable final String sHostName, @Nullable final int nPort, @Nullable final String s...
[ "@", "Nullable", "public", "static", "PasswordAuthentication", "requestProxyPasswordAuthentication", "(", "@", "Nullable", "final", "String", "sHostName", ",", "@", "Nullable", "final", "int", "nPort", ",", "@", "Nullable", "final", "String", "sProtocol", ")", "{", ...
Shortcut method for requesting proxy password authentication. This method can also be used, if this class is NOT the default Authenticator. @param sHostName Hostname to query @param nPort Port to query @param sProtocol Protocol to use @return <code>null</code> if nothing is found.
[ "Shortcut", "method", "for", "requesting", "proxy", "password", "authentication", ".", "This", "method", "can", "also", "be", "used", "if", "this", "class", "is", "NOT", "the", "default", "Authenticator", "." ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-network/src/main/java/com/helger/network/proxy/AuthenticatorProxySettingsManager.java#L130-L143
train
beothorn/webGrude
src/main/java/webGrude/Browser.java
Browser.get
public static <T> T get(final Class<T> pageClass, final String... params) { cryIfNotAnnotated(pageClass); try { final String pageUrl = pageClass.getAnnotation(Page.class).value(); return loadPage(pageUrl, pageClass, Arrays.asList(params)); } catch (final Exception e) { ...
java
public static <T> T get(final Class<T> pageClass, final String... params) { cryIfNotAnnotated(pageClass); try { final String pageUrl = pageClass.getAnnotation(Page.class).value(); return loadPage(pageUrl, pageClass, Arrays.asList(params)); } catch (final Exception e) { ...
[ "public", "static", "<", "T", ">", "T", "get", "(", "final", "Class", "<", "T", ">", "pageClass", ",", "final", "String", "...", "params", ")", "{", "cryIfNotAnnotated", "(", "pageClass", ")", ";", "try", "{", "final", "String", "pageUrl", "=", "pageCl...
Loads content from url from the Page annotation on pageClass onto an instance of pageClass. @param <T> A instance of the class with a {@literal @}Page annotantion @param pageClass A class with a {@literal @}Page annotantion @param params Optional, if the pageClass has a url with parameters @return The class i...
[ "Loads", "content", "from", "url", "from", "the", "Page", "annotation", "on", "pageClass", "onto", "an", "instance", "of", "pageClass", "." ]
e30f281723bf0edaf72bcbfc9582d67f8fe39c1f
https://github.com/beothorn/webGrude/blob/e30f281723bf0edaf72bcbfc9582d67f8fe39c1f/src/main/java/webGrude/Browser.java#L83-L91
train
phax/ph-web
ph-servlet/src/main/java/com/helger/servlet/request/RequestParamMap.java
RequestParamMap._getChildMapExceptLast
@Nullable private ICommonsOrderedMap <String, RequestParamMapItem> _getChildMapExceptLast (@Nonnull @Nonempty final String... aPath) { ValueEnforcer.notEmpty (aPath, "Path"); ICommonsOrderedMap <String, RequestParamMapItem> aMap = m_aMap; // Until the second last object for (int i = 0; i < aPath.le...
java
@Nullable private ICommonsOrderedMap <String, RequestParamMapItem> _getChildMapExceptLast (@Nonnull @Nonempty final String... aPath) { ValueEnforcer.notEmpty (aPath, "Path"); ICommonsOrderedMap <String, RequestParamMapItem> aMap = m_aMap; // Until the second last object for (int i = 0; i < aPath.le...
[ "@", "Nullable", "private", "ICommonsOrderedMap", "<", "String", ",", "RequestParamMapItem", ">", "_getChildMapExceptLast", "(", "@", "Nonnull", "@", "Nonempty", "final", "String", "...", "aPath", ")", "{", "ValueEnforcer", ".", "notEmpty", "(", "aPath", ",", "\...
Iterate the root map down to the map specified by the passed path except for the last element. @param aPath The path to iterate. May neither be <code>null</code> nor empty. @return The map. May be <code>null</code> if the path did not find such a child.
[ "Iterate", "the", "root", "map", "down", "to", "the", "map", "specified", "by", "the", "passed", "path", "except", "for", "the", "last", "element", "." ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-servlet/src/main/java/com/helger/servlet/request/RequestParamMap.java#L166-L180
train
phax/ph-web
ph-servlet/src/main/java/com/helger/servlet/request/RequestParamMap.java
RequestParamMap.getFieldName
@Nonnull @Nonempty @Deprecated public static String getFieldName (@Nonnull @Nonempty final String sBaseName) { ValueEnforcer.notEmpty (sBaseName, "BaseName"); return sBaseName; }
java
@Nonnull @Nonempty @Deprecated public static String getFieldName (@Nonnull @Nonempty final String sBaseName) { ValueEnforcer.notEmpty (sBaseName, "BaseName"); return sBaseName; }
[ "@", "Nonnull", "@", "Nonempty", "@", "Deprecated", "public", "static", "String", "getFieldName", "(", "@", "Nonnull", "@", "Nonempty", "final", "String", "sBaseName", ")", "{", "ValueEnforcer", ".", "notEmpty", "(", "sBaseName", ",", "\"BaseName\"", ")", ";",...
This method doesn't make sense but it should stay, so that it's easy to spot usage of this invalid method. @param sBaseName Base name @return Base name as is.
[ "This", "method", "doesn", "t", "make", "sense", "but", "it", "should", "stay", "so", "that", "it", "s", "easy", "to", "spot", "usage", "of", "this", "invalid", "method", "." ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-servlet/src/main/java/com/helger/servlet/request/RequestParamMap.java#L365-L373
train
phax/ph-web
ph-servlet/src/main/java/com/helger/servlet/request/RequestParamMap.java
RequestParamMap.setSeparators
public static void setSeparators (final char cOpen, final char cClose) { ValueEnforcer.isFalse (cOpen == cClose, "Open and closing element may not be identical!"); s_sOpen = Character.toString (cOpen); s_sClose = Character.toString (cClose); }
java
public static void setSeparators (final char cOpen, final char cClose) { ValueEnforcer.isFalse (cOpen == cClose, "Open and closing element may not be identical!"); s_sOpen = Character.toString (cOpen); s_sClose = Character.toString (cClose); }
[ "public", "static", "void", "setSeparators", "(", "final", "char", "cOpen", ",", "final", "char", "cClose", ")", "{", "ValueEnforcer", ".", "isFalse", "(", "cOpen", "==", "cClose", ",", "\"Open and closing element may not be identical!\"", ")", ";", "s_sOpen", "="...
Set the separator chars to use. @param cOpen Open char @param cClose Close char - must be different from open char!
[ "Set", "the", "separator", "chars", "to", "use", "." ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-servlet/src/main/java/com/helger/servlet/request/RequestParamMap.java#L415-L420
train
phax/ph-web
ph-servlet/src/main/java/com/helger/servlet/request/RequestParamMap.java
RequestParamMap.setSeparators
public static void setSeparators (@Nonnull @Nonempty final String sOpen, @Nonnull @Nonempty final String sClose) { ValueEnforcer.notEmpty (sOpen, "Open"); ValueEnforcer.notEmpty (sClose, "Close"); ValueEnforcer.isFalse (sOpen.contains (sClose), "open may not contain close"); ValueEnforcer.isFalse (sCl...
java
public static void setSeparators (@Nonnull @Nonempty final String sOpen, @Nonnull @Nonempty final String sClose) { ValueEnforcer.notEmpty (sOpen, "Open"); ValueEnforcer.notEmpty (sClose, "Close"); ValueEnforcer.isFalse (sOpen.contains (sClose), "open may not contain close"); ValueEnforcer.isFalse (sCl...
[ "public", "static", "void", "setSeparators", "(", "@", "Nonnull", "@", "Nonempty", "final", "String", "sOpen", ",", "@", "Nonnull", "@", "Nonempty", "final", "String", "sClose", ")", "{", "ValueEnforcer", ".", "notEmpty", "(", "sOpen", ",", "\"Open\"", ")", ...
Set the separators to use. @param sOpen Open string. May neither be <code>null</code> nor empty. @param sClose Close string. May neither be <code>null</code> nor empty.
[ "Set", "the", "separators", "to", "use", "." ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-servlet/src/main/java/com/helger/servlet/request/RequestParamMap.java#L430-L438
train
phax/ph-web
ph-servlet/src/main/java/com/helger/servlet/request/RequestHelper.java
RequestHelper.getWithoutSessionID
@Nonnull public static SimpleURL getWithoutSessionID (@Nonnull final ISimpleURL aURL) { ValueEnforcer.notNull (aURL, "URL"); // Strip the parameter from the path, but keep parameters and anchor intact! // Note: using URLData avoid parsing, since the data was already parsed! return new SimpleURL (new...
java
@Nonnull public static SimpleURL getWithoutSessionID (@Nonnull final ISimpleURL aURL) { ValueEnforcer.notNull (aURL, "URL"); // Strip the parameter from the path, but keep parameters and anchor intact! // Note: using URLData avoid parsing, since the data was already parsed! return new SimpleURL (new...
[ "@", "Nonnull", "public", "static", "SimpleURL", "getWithoutSessionID", "(", "@", "Nonnull", "final", "ISimpleURL", "aURL", ")", "{", "ValueEnforcer", ".", "notNull", "(", "aURL", ",", "\"URL\"", ")", ";", "// Strip the parameter from the path, but keep parameters and a...
Get the passed string without an eventually contained session ID like in "test.html;JSESSIONID=1234?param=value". @param aURL The value to strip the session ID from the path @return The value without a session ID or the original string.
[ "Get", "the", "passed", "string", "without", "an", "eventually", "contained", "session", "ID", "like", "in", "test", ".", "html", ";", "JSESSIONID", "=", "1234?param", "=", "value", "." ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-servlet/src/main/java/com/helger/servlet/request/RequestHelper.java#L155-L162
train
phax/ph-web
ph-servlet/src/main/java/com/helger/servlet/request/RequestHelper.java
RequestHelper.getPathWithinServletContext
@Nonnull public static String getPathWithinServletContext (@Nonnull final HttpServletRequest aHttpRequest) { ValueEnforcer.notNull (aHttpRequest, "HttpRequest"); final String sRequestURI = getRequestURI (aHttpRequest); if (StringHelper.hasNoText (sRequestURI)) { // Can e.g. happen for "Reques...
java
@Nonnull public static String getPathWithinServletContext (@Nonnull final HttpServletRequest aHttpRequest) { ValueEnforcer.notNull (aHttpRequest, "HttpRequest"); final String sRequestURI = getRequestURI (aHttpRequest); if (StringHelper.hasNoText (sRequestURI)) { // Can e.g. happen for "Reques...
[ "@", "Nonnull", "public", "static", "String", "getPathWithinServletContext", "(", "@", "Nonnull", "final", "HttpServletRequest", "aHttpRequest", ")", "{", "ValueEnforcer", ".", "notNull", "(", "aHttpRequest", ",", "\"HttpRequest\"", ")", ";", "final", "String", "sRe...
Return the URI of the request within the servlet context. @param aHttpRequest The HTTP request. May not be <code>null</code>. @return the path within the web application and never <code>null</code>. By default "/" is returned is an empty request URI is determined.
[ "Return", "the", "URI", "of", "the", "request", "within", "the", "servlet", "context", "." ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-servlet/src/main/java/com/helger/servlet/request/RequestHelper.java#L282-L304
train
phax/ph-web
ph-servlet/src/main/java/com/helger/servlet/request/RequestHelper.java
RequestHelper.getHttpVersion
@Nullable public static EHttpVersion getHttpVersion (@Nonnull final HttpServletRequest aHttpRequest) { ValueEnforcer.notNull (aHttpRequest, "HttpRequest"); final String sProtocol = aHttpRequest.getProtocol (); return EHttpVersion.getFromNameOrNull (sProtocol); }
java
@Nullable public static EHttpVersion getHttpVersion (@Nonnull final HttpServletRequest aHttpRequest) { ValueEnforcer.notNull (aHttpRequest, "HttpRequest"); final String sProtocol = aHttpRequest.getProtocol (); return EHttpVersion.getFromNameOrNull (sProtocol); }
[ "@", "Nullable", "public", "static", "EHttpVersion", "getHttpVersion", "(", "@", "Nonnull", "final", "HttpServletRequest", "aHttpRequest", ")", "{", "ValueEnforcer", ".", "notNull", "(", "aHttpRequest", ",", "\"HttpRequest\"", ")", ";", "final", "String", "sProtocol...
Get the HTTP version associated with the given HTTP request @param aHttpRequest The http request to query. May not be <code>null</code>. @return <code>null</code> if no supported HTTP version is contained
[ "Get", "the", "HTTP", "version", "associated", "with", "the", "given", "HTTP", "request" ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-servlet/src/main/java/com/helger/servlet/request/RequestHelper.java#L510-L517
train
phax/ph-web
ph-servlet/src/main/java/com/helger/servlet/request/RequestHelper.java
RequestHelper.getHttpMethod
@Nullable public static EHttpMethod getHttpMethod (@Nonnull final HttpServletRequest aHttpRequest) { ValueEnforcer.notNull (aHttpRequest, "HttpRequest"); final String sMethod = aHttpRequest.getMethod (); return EHttpMethod.getFromNameOrNull (sMethod); }
java
@Nullable public static EHttpMethod getHttpMethod (@Nonnull final HttpServletRequest aHttpRequest) { ValueEnforcer.notNull (aHttpRequest, "HttpRequest"); final String sMethod = aHttpRequest.getMethod (); return EHttpMethod.getFromNameOrNull (sMethod); }
[ "@", "Nullable", "public", "static", "EHttpMethod", "getHttpMethod", "(", "@", "Nonnull", "final", "HttpServletRequest", "aHttpRequest", ")", "{", "ValueEnforcer", ".", "notNull", "(", "aHttpRequest", ",", "\"HttpRequest\"", ")", ";", "final", "String", "sMethod", ...
Get the HTTP method associated with the given HTTP request @param aHttpRequest The http request to query. May not be <code>null</code>. @return <code>null</code> if no supported HTTP method is contained
[ "Get", "the", "HTTP", "method", "associated", "with", "the", "given", "HTTP", "request" ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-servlet/src/main/java/com/helger/servlet/request/RequestHelper.java#L526-L533
train
phax/ph-web
ph-servlet/src/main/java/com/helger/servlet/request/RequestHelper.java
RequestHelper.getRequestHeaderMap
@Nonnull @ReturnsMutableCopy public static HttpHeaderMap getRequestHeaderMap (@Nonnull final HttpServletRequest aHttpRequest) { ValueEnforcer.notNull (aHttpRequest, "HttpRequest"); final HttpHeaderMap ret = new HttpHeaderMap (); final Enumeration <String> aHeaders = aHttpRequest.getHeaderNames (); ...
java
@Nonnull @ReturnsMutableCopy public static HttpHeaderMap getRequestHeaderMap (@Nonnull final HttpServletRequest aHttpRequest) { ValueEnforcer.notNull (aHttpRequest, "HttpRequest"); final HttpHeaderMap ret = new HttpHeaderMap (); final Enumeration <String> aHeaders = aHttpRequest.getHeaderNames (); ...
[ "@", "Nonnull", "@", "ReturnsMutableCopy", "public", "static", "HttpHeaderMap", "getRequestHeaderMap", "(", "@", "Nonnull", "final", "HttpServletRequest", "aHttpRequest", ")", "{", "ValueEnforcer", ".", "notNull", "(", "aHttpRequest", ",", "\"HttpRequest\"", ")", ";",...
Get a complete request header map as a copy. @param aHttpRequest The source HTTP request. May not be <code>null</code>. @return Never <code>null</code>.
[ "Get", "a", "complete", "request", "header", "map", "as", "a", "copy", "." ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-servlet/src/main/java/com/helger/servlet/request/RequestHelper.java#L542-L561
train
phax/ph-web
ph-servlet/src/main/java/com/helger/servlet/request/RequestHelper.java
RequestHelper.getRequestClientCertificates
@Nullable public static X509Certificate [] getRequestClientCertificates (@Nonnull final HttpServletRequest aHttpRequest) { return _getRequestAttr (aHttpRequest, SERVLET_ATTR_CLIENT_CERTIFICATE, X509Certificate [].class); }
java
@Nullable public static X509Certificate [] getRequestClientCertificates (@Nonnull final HttpServletRequest aHttpRequest) { return _getRequestAttr (aHttpRequest, SERVLET_ATTR_CLIENT_CERTIFICATE, X509Certificate [].class); }
[ "@", "Nullable", "public", "static", "X509Certificate", "[", "]", "getRequestClientCertificates", "(", "@", "Nonnull", "final", "HttpServletRequest", "aHttpRequest", ")", "{", "return", "_getRequestAttr", "(", "aHttpRequest", ",", "SERVLET_ATTR_CLIENT_CERTIFICATE", ",", ...
Get the client certificates provided by a HTTP servlet request. @param aHttpRequest The HTTP servlet request to extract the information from. May not be <code>null</code>. @return <code>null</code> if the passed request does not contain any client certificate
[ "Get", "the", "client", "certificates", "provided", "by", "a", "HTTP", "servlet", "request", "." ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-servlet/src/main/java/com/helger/servlet/request/RequestHelper.java#L668-L672
train
phax/ph-web
ph-servlet/src/main/java/com/helger/servlet/request/RequestHelper.java
RequestHelper.getHttpUserAgentStringFromRequest
@Nullable public static String getHttpUserAgentStringFromRequest (@Nonnull final HttpServletRequest aHttpRequest) { // Use non-standard headers first String sUserAgent = aHttpRequest.getHeader (CHttpHeader.UA); if (sUserAgent == null) { sUserAgent = aHttpRequest.getHeader (CHttpHeader.X_DEVICE...
java
@Nullable public static String getHttpUserAgentStringFromRequest (@Nonnull final HttpServletRequest aHttpRequest) { // Use non-standard headers first String sUserAgent = aHttpRequest.getHeader (CHttpHeader.UA); if (sUserAgent == null) { sUserAgent = aHttpRequest.getHeader (CHttpHeader.X_DEVICE...
[ "@", "Nullable", "public", "static", "String", "getHttpUserAgentStringFromRequest", "(", "@", "Nonnull", "final", "HttpServletRequest", "aHttpRequest", ")", "{", "// Use non-standard headers first", "String", "sUserAgent", "=", "aHttpRequest", ".", "getHeader", "(", "CHtt...
Get the user agent from the given request. @param aHttpRequest The HTTP request to get the UA from. @return <code>null</code> if no user agent string is present
[ "Get", "the", "user", "agent", "from", "the", "given", "request", "." ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-servlet/src/main/java/com/helger/servlet/request/RequestHelper.java#L836-L848
train
phax/ph-web
ph-servlet/src/main/java/com/helger/servlet/request/RequestHelper.java
RequestHelper.getCheckBoxHiddenFieldName
@Nonnull @Nonempty public static String getCheckBoxHiddenFieldName (@Nonnull @Nonempty final String sFieldName) { ValueEnforcer.notEmpty (sFieldName, "FieldName"); return DEFAULT_CHECKBOX_HIDDEN_FIELD_PREFIX + sFieldName; }
java
@Nonnull @Nonempty public static String getCheckBoxHiddenFieldName (@Nonnull @Nonempty final String sFieldName) { ValueEnforcer.notEmpty (sFieldName, "FieldName"); return DEFAULT_CHECKBOX_HIDDEN_FIELD_PREFIX + sFieldName; }
[ "@", "Nonnull", "@", "Nonempty", "public", "static", "String", "getCheckBoxHiddenFieldName", "(", "@", "Nonnull", "@", "Nonempty", "final", "String", "sFieldName", ")", "{", "ValueEnforcer", ".", "notEmpty", "(", "sFieldName", ",", "\"FieldName\"", ")", ";", "re...
Get the name of the automatic hidden field associated with a check-box. @param sFieldName The name of the check-box. @return The name of the hidden field associated with the given check-box name.
[ "Get", "the", "name", "of", "the", "automatic", "hidden", "field", "associated", "with", "a", "check", "-", "box", "." ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-servlet/src/main/java/com/helger/servlet/request/RequestHelper.java#L926-L932
train
phax/ph-web
ph-servlet/src/main/java/com/helger/servlet/cookie/CookieHelper.java
CookieHelper.createCookie
@Nonnull public static Cookie createCookie (@Nonnull final String sName, @Nullable final String sValue, final String sPath, final boolean bExpireWhenBrowserIsClosed) { final Cookie aCookie = new Cookie...
java
@Nonnull public static Cookie createCookie (@Nonnull final String sName, @Nullable final String sValue, final String sPath, final boolean bExpireWhenBrowserIsClosed) { final Cookie aCookie = new Cookie...
[ "@", "Nonnull", "public", "static", "Cookie", "createCookie", "(", "@", "Nonnull", "final", "String", "sName", ",", "@", "Nullable", "final", "String", "sValue", ",", "final", "String", "sPath", ",", "final", "boolean", "bExpireWhenBrowserIsClosed", ")", "{", ...
Create a cookie that is bound on a certain path within the local web server. @param sName The cookie name. @param sValue The cookie value. @param sPath The path the cookie is valid for. @param bExpireWhenBrowserIsClosed <code>true</code> if this is a browser session cookie @return The created cookie object.
[ "Create", "a", "cookie", "that", "is", "bound", "on", "a", "certain", "path", "within", "the", "local", "web", "server", "." ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-servlet/src/main/java/com/helger/servlet/cookie/CookieHelper.java#L99-L112
train
phax/ph-web
ph-servlet/src/main/java/com/helger/servlet/cookie/CookieHelper.java
CookieHelper.removeCookie
public static void removeCookie (@Nonnull final HttpServletResponse aHttpResponse, @Nonnull final Cookie aCookie) { ValueEnforcer.notNull (aHttpResponse, "HttpResponse"); ValueEnforcer.notNull (aCookie, "aCookie"); // expire the cookie! aCookie.setMaxAge (0); aHttpResponse.addCookie (aCookie); ...
java
public static void removeCookie (@Nonnull final HttpServletResponse aHttpResponse, @Nonnull final Cookie aCookie) { ValueEnforcer.notNull (aHttpResponse, "HttpResponse"); ValueEnforcer.notNull (aCookie, "aCookie"); // expire the cookie! aCookie.setMaxAge (0); aHttpResponse.addCookie (aCookie); ...
[ "public", "static", "void", "removeCookie", "(", "@", "Nonnull", "final", "HttpServletResponse", "aHttpResponse", ",", "@", "Nonnull", "final", "Cookie", "aCookie", ")", "{", "ValueEnforcer", ".", "notNull", "(", "aHttpResponse", ",", "\"HttpResponse\"", ")", ";",...
Remove a cookie by setting the max age to 0. @param aHttpResponse The HTTP response. May not be <code>null</code>. @param aCookie The cookie to be removed. May not be <code>null</code>.
[ "Remove", "a", "cookie", "by", "setting", "the", "max", "age", "to", "0", "." ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-servlet/src/main/java/com/helger/servlet/cookie/CookieHelper.java#L135-L143
train
astrapi69/mystic-crypt
crypt-data/src/main/java/de/alpharogroup/crypto/key/reader/EncryptedPrivateKeyReader.java
EncryptedPrivateKeyReader.readPasswordProtectedPrivateKey
public static PrivateKey readPasswordProtectedPrivateKey(final byte[] encryptedPrivateKeyBytes, final String password, final String algorithm) throws IOException, NoSuchAlgorithmException, NoSuchPaddingException, InvalidKeySpecException, InvalidKeyException, InvalidAlgorithmParameterException { final Encrypted...
java
public static PrivateKey readPasswordProtectedPrivateKey(final byte[] encryptedPrivateKeyBytes, final String password, final String algorithm) throws IOException, NoSuchAlgorithmException, NoSuchPaddingException, InvalidKeySpecException, InvalidKeyException, InvalidAlgorithmParameterException { final Encrypted...
[ "public", "static", "PrivateKey", "readPasswordProtectedPrivateKey", "(", "final", "byte", "[", "]", "encryptedPrivateKeyBytes", ",", "final", "String", "password", ",", "final", "String", "algorithm", ")", "throws", "IOException", ",", "NoSuchAlgorithmException", ",", ...
Reads the given byte array that contains a password protected private key. @param encryptedPrivateKeyBytes the byte array that contains the password protected private key @param password the password @param algorithm the algorithm @return the {@link PrivateKey} object @throws IOException Signals that an I/O exception ...
[ "Reads", "the", "given", "byte", "array", "that", "contains", "a", "password", "protected", "private", "key", "." ]
7f51ef5e4457e24de7ff391f10bfc5609e6f1a34
https://github.com/astrapi69/mystic-crypt/blob/7f51ef5e4457e24de7ff391f10bfc5609e6f1a34/crypt-data/src/main/java/de/alpharogroup/crypto/key/reader/EncryptedPrivateKeyReader.java#L94-L112
train
phax/ph-web
ph-servlet/src/main/java/com/helger/servlet/async/ServletAsyncSpec.java
ServletAsyncSpec.createAsync
@Nonnull public static ServletAsyncSpec createAsync (@CheckForSigned final long nTimeoutMillis, @Nullable final Iterable <? extends AsyncListener> aAsyncListeners) { return new ServletAsyncSpec (true, nTimeoutMillis, aAsyncListeners); }
java
@Nonnull public static ServletAsyncSpec createAsync (@CheckForSigned final long nTimeoutMillis, @Nullable final Iterable <? extends AsyncListener> aAsyncListeners) { return new ServletAsyncSpec (true, nTimeoutMillis, aAsyncListeners); }
[ "@", "Nonnull", "public", "static", "ServletAsyncSpec", "createAsync", "(", "@", "CheckForSigned", "final", "long", "nTimeoutMillis", ",", "@", "Nullable", "final", "Iterable", "<", "?", "extends", "AsyncListener", ">", "aAsyncListeners", ")", "{", "return", "new"...
Create an async spec. @param nTimeoutMillis Timeout in milliseconds. Only value &gt; 0 are considered. @param aAsyncListeners The async listeners to use. May be <code>null</code>. @return A new {@link ServletAsyncSpec} and never <code>null</code>.
[ "Create", "an", "async", "spec", "." ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-servlet/src/main/java/com/helger/servlet/async/ServletAsyncSpec.java#L169-L174
train
bbqrob/merge-maven-plugin
src/main/java/org/zcore/maven/MergeMojo.java
MergeMojo.initOutput
protected OutputStream initOutput(final File file) throws MojoExecutionException { // stream to return final OutputStream stream; // plenty of things can go wrong... try { // directory? if (file.isDirectory()) { throw new MojoExecutionException...
java
protected OutputStream initOutput(final File file) throws MojoExecutionException { // stream to return final OutputStream stream; // plenty of things can go wrong... try { // directory? if (file.isDirectory()) { throw new MojoExecutionException...
[ "protected", "OutputStream", "initOutput", "(", "final", "File", "file", ")", "throws", "MojoExecutionException", "{", "// stream to return", "final", "OutputStream", "stream", ";", "// plenty of things can go wrong...", "try", "{", "// directory?", "if", "(", "file", "...
Opens an OutputStream, based on the supplied file @param target {@linkplain File} @return {@linkplain OutputStream} @throws MojoExecutionException
[ "Opens", "an", "OutputStream", "based", "on", "the", "supplied", "file" ]
7a0fa3b1bc0bff83ba56c601f8af0c0c2294767e
https://github.com/bbqrob/merge-maven-plugin/blob/7a0fa3b1bc0bff83ba56c601f8af0c0c2294767e/src/main/java/org/zcore/maven/MergeMojo.java#L54-L99
train
bbqrob/merge-maven-plugin
src/main/java/org/zcore/maven/MergeMojo.java
MergeMojo.initInput
protected InputStream initInput(final File file) throws MojoExecutionException { InputStream stream = null; try { if (file.isDirectory()) { throw new MojoExecutionException("File " + file.getAbsolutePath() + " is directory!"); ...
java
protected InputStream initInput(final File file) throws MojoExecutionException { InputStream stream = null; try { if (file.isDirectory()) { throw new MojoExecutionException("File " + file.getAbsolutePath() + " is directory!"); ...
[ "protected", "InputStream", "initInput", "(", "final", "File", "file", ")", "throws", "MojoExecutionException", "{", "InputStream", "stream", "=", "null", ";", "try", "{", "if", "(", "file", ".", "isDirectory", "(", ")", ")", "{", "throw", "new", "MojoExecut...
Opens an InputStream, based on the supplied file @param target {@linkplain File} @return {@linkplain InputStream} @throws MojoExecutionException
[ "Opens", "an", "InputStream", "based", "on", "the", "supplied", "file" ]
7a0fa3b1bc0bff83ba56c601f8af0c0c2294767e
https://github.com/bbqrob/merge-maven-plugin/blob/7a0fa3b1bc0bff83ba56c601f8af0c0c2294767e/src/main/java/org/zcore/maven/MergeMojo.java#L107-L128
train
bbqrob/merge-maven-plugin
src/main/java/org/zcore/maven/MergeMojo.java
MergeMojo.appendStream
protected void appendStream(final InputStream input, final OutputStream output) throws MojoExecutionException { // prebuffer int character; try { // get line seperator, based on system final String newLine = System.getProperty("line.separator"); // rea...
java
protected void appendStream(final InputStream input, final OutputStream output) throws MojoExecutionException { // prebuffer int character; try { // get line seperator, based on system final String newLine = System.getProperty("line.separator"); // rea...
[ "protected", "void", "appendStream", "(", "final", "InputStream", "input", ",", "final", "OutputStream", "output", ")", "throws", "MojoExecutionException", "{", "// prebuffer", "int", "character", ";", "try", "{", "// get line seperator, based on system", "final", "Stri...
Appends inputstream to outputstream @param input {@linkplain InputStream} @param output {@linkplain OutputStream} @throws MojoExecutionException
[ "Appends", "inputstream", "to", "outputstream" ]
7a0fa3b1bc0bff83ba56c601f8af0c0c2294767e
https://github.com/bbqrob/merge-maven-plugin/blob/7a0fa3b1bc0bff83ba56c601f8af0c0c2294767e/src/main/java/org/zcore/maven/MergeMojo.java#L178-L197
train
phax/ph-web
ph-web/src/main/java/com/helger/web/fileupload/io/DeferredFileOutputStream.java
DeferredFileOutputStream.onThresholdReached
@Override protected void onThresholdReached () throws IOException { FileOutputStream aFOS = null; try { aFOS = new FileOutputStream (m_aOutputFile); m_aMemoryOS.writeTo (aFOS); m_aCurrentOS = aFOS; // Explicitly close the stream (even though this is a no-op) StreamHelper.c...
java
@Override protected void onThresholdReached () throws IOException { FileOutputStream aFOS = null; try { aFOS = new FileOutputStream (m_aOutputFile); m_aMemoryOS.writeTo (aFOS); m_aCurrentOS = aFOS; // Explicitly close the stream (even though this is a no-op) StreamHelper.c...
[ "@", "Override", "protected", "void", "onThresholdReached", "(", ")", "throws", "IOException", "{", "FileOutputStream", "aFOS", "=", "null", ";", "try", "{", "aFOS", "=", "new", "FileOutputStream", "(", "m_aOutputFile", ")", ";", "m_aMemoryOS", ".", "writeTo", ...
Switches the underlying output stream from a memory based stream to one that is backed by disk. This is the point at which we realise that too much data is being written to keep in memory, so we elect to switch to disk-based storage. @exception IOException if an error occurs.
[ "Switches", "the", "underlying", "output", "stream", "from", "a", "memory", "based", "stream", "to", "one", "that", "is", "backed", "by", "disk", ".", "This", "is", "the", "point", "at", "which", "we", "realise", "that", "too", "much", "data", "is", "bei...
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-web/src/main/java/com/helger/web/fileupload/io/DeferredFileOutputStream.java#L117-L136
train
phax/ph-web
ph-web/src/main/java/com/helger/web/fileupload/io/DeferredFileOutputStream.java
DeferredFileOutputStream.writeTo
public void writeTo (@Nonnull @WillNotClose final OutputStream aOS) throws IOException { // we may only need to check if this is closed if we are working with a file // but we should force the habit of closing whether we are working with // a file or memory. if (!m_bClosed) throw new IOException...
java
public void writeTo (@Nonnull @WillNotClose final OutputStream aOS) throws IOException { // we may only need to check if this is closed if we are working with a file // but we should force the habit of closing whether we are working with // a file or memory. if (!m_bClosed) throw new IOException...
[ "public", "void", "writeTo", "(", "@", "Nonnull", "@", "WillNotClose", "final", "OutputStream", "aOS", ")", "throws", "IOException", "{", "// we may only need to check if this is closed if we are working with a file", "// but we should force the habit of closing whether we are workin...
Writes the data from this output stream to the specified output stream, after it has been closed. @param aOS output stream to write to. @exception IOException if this stream is not yet closed or an error occurs.
[ "Writes", "the", "data", "from", "this", "output", "stream", "to", "the", "specified", "output", "stream", "after", "it", "has", "been", "closed", "." ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-web/src/main/java/com/helger/web/fileupload/io/DeferredFileOutputStream.java#L233-L250
train
flow/caustic
api/src/main/java/com/flowpowered/caustic/api/util/MeshGenerator.java
MeshGenerator.generatePlane
public static VertexData generatePlane(Vector2f size) { final VertexData destination = new VertexData(); final VertexAttribute positionsAttribute = new VertexAttribute("positions", DataType.FLOAT, 3); destination.addAttribute(0, positionsAttribute); final TFloatList positions = new TFloa...
java
public static VertexData generatePlane(Vector2f size) { final VertexData destination = new VertexData(); final VertexAttribute positionsAttribute = new VertexAttribute("positions", DataType.FLOAT, 3); destination.addAttribute(0, positionsAttribute); final TFloatList positions = new TFloa...
[ "public", "static", "VertexData", "generatePlane", "(", "Vector2f", "size", ")", "{", "final", "VertexData", "destination", "=", "new", "VertexData", "(", ")", ";", "final", "VertexAttribute", "positionsAttribute", "=", "new", "VertexAttribute", "(", "\"positions\""...
Generates a plane on xy. The center is at the middle of the plane. @param size The size of the plane to generate, on x and y @return The vertex data
[ "Generates", "a", "plane", "on", "xy", ".", "The", "center", "is", "at", "the", "middle", "of", "the", "plane", "." ]
88652fcf0621ce158a0e92ce4c570ed6b1f6fca9
https://github.com/flow/caustic/blob/88652fcf0621ce158a0e92ce4c570ed6b1f6fca9/api/src/main/java/com/flowpowered/caustic/api/util/MeshGenerator.java#L593-L612
train
flow/caustic
api/src/main/java/com/flowpowered/caustic/api/util/MeshGenerator.java
MeshGenerator.generatePlane
public static void generatePlane(TFloatList positions, TFloatList normals, TFloatList textureCoords, TIntList indices, Vector2f size) { /* * 2-----3 * | | * | | * 0-----1 */ // Corner positions final Vector2f p = size.div(2); final Vec...
java
public static void generatePlane(TFloatList positions, TFloatList normals, TFloatList textureCoords, TIntList indices, Vector2f size) { /* * 2-----3 * | | * | | * 0-----1 */ // Corner positions final Vector2f p = size.div(2); final Vec...
[ "public", "static", "void", "generatePlane", "(", "TFloatList", "positions", ",", "TFloatList", "normals", ",", "TFloatList", "textureCoords", ",", "TIntList", "indices", ",", "Vector2f", "size", ")", "{", "/*\n * 2-----3\n * | |\n * | |\n ...
Generates a textured plane on xy. The center is at the middle of the plane. @param positions Where to save the position information @param normals Where to save the normal information, can be null to ignore the attribute @param textureCoords Where to save the texture coordinate information, can be null to ignore the a...
[ "Generates", "a", "textured", "plane", "on", "xy", ".", "The", "center", "is", "at", "the", "middle", "of", "the", "plane", "." ]
88652fcf0621ce158a0e92ce4c570ed6b1f6fca9
https://github.com/flow/caustic/blob/88652fcf0621ce158a0e92ce4c570ed6b1f6fca9/api/src/main/java/com/flowpowered/caustic/api/util/MeshGenerator.java#L623-L652
train
flow/caustic
api/src/main/java/com/flowpowered/caustic/api/util/MeshGenerator.java
MeshGenerator.generateCylinder
public static void generateCylinder(TFloatList positions, TFloatList normals, TIntList indices, float radius, float height) { // 0,0,0 will be halfway up the cylinder in the middle final float halfHeight = height / 2; // The positions at the rims of the cylinders final List<Vector3f> rim...
java
public static void generateCylinder(TFloatList positions, TFloatList normals, TIntList indices, float radius, float height) { // 0,0,0 will be halfway up the cylinder in the middle final float halfHeight = height / 2; // The positions at the rims of the cylinders final List<Vector3f> rim...
[ "public", "static", "void", "generateCylinder", "(", "TFloatList", "positions", ",", "TFloatList", "normals", ",", "TIntList", "indices", ",", "float", "radius", ",", "float", "height", ")", "{", "// 0,0,0 will be halfway up the cylinder in the middle", "final", "float"...
Generates a cylindrical solid mesh. The center is at middle of the of the cylinder. @param positions Where to save the position information @param normals Where to save the normal information, can be null to ignore the attribute @param indices Where to save the indices @param radius The radius of the base and top @par...
[ "Generates", "a", "cylindrical", "solid", "mesh", ".", "The", "center", "is", "at", "middle", "of", "the", "of", "the", "cylinder", "." ]
88652fcf0621ce158a0e92ce4c570ed6b1f6fca9
https://github.com/flow/caustic/blob/88652fcf0621ce158a0e92ce4c570ed6b1f6fca9/api/src/main/java/com/flowpowered/caustic/api/util/MeshGenerator.java#L941-L990
train
phax/ph-web
ph-servlet/src/main/java/com/helger/servlet/mock/MockEventListenerList.java
MockEventListenerList.setFrom
@Nonnull public EChange setFrom (@Nonnull final MockEventListenerList aList) { ValueEnforcer.notNull (aList, "List"); // Assigning this to this? if (this == aList) return EChange.UNCHANGED; // Get all listeners to assign final ICommonsList <EventListener> aOtherListeners = aList.getAllLi...
java
@Nonnull public EChange setFrom (@Nonnull final MockEventListenerList aList) { ValueEnforcer.notNull (aList, "List"); // Assigning this to this? if (this == aList) return EChange.UNCHANGED; // Get all listeners to assign final ICommonsList <EventListener> aOtherListeners = aList.getAllLi...
[ "@", "Nonnull", "public", "EChange", "setFrom", "(", "@", "Nonnull", "final", "MockEventListenerList", "aList", ")", "{", "ValueEnforcer", ".", "notNull", "(", "aList", ",", "\"List\"", ")", ";", "// Assigning this to this?", "if", "(", "this", "==", "aList", ...
Set all listeners from the passed list to this list @param aList The other list. May not be <code>null</code>. @return {@link EChange}
[ "Set", "all", "listeners", "from", "the", "passed", "list", "to", "this", "list" ]
d445fd25184605b62682c93c9782409acf0ae813
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-servlet/src/main/java/com/helger/servlet/mock/MockEventListenerList.java#L67-L86
train