id
int32
0
165k
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
149,600
javagl/Common
src/main/java/de/javagl/common/beans/BeanUtils.java
BeanUtils.getMutablePropertyNamesOptional
public static List<String> getMutablePropertyNamesOptional( Class<?> beanClass) { List<PropertyDescriptor> propertyDescriptors = getPropertyDescriptorsOptional(beanClass); List<String> result = new ArrayList<String>(); for (PropertyDescriptor propertyDescriptor : pr...
java
public static List<String> getMutablePropertyNamesOptional( Class<?> beanClass) { List<PropertyDescriptor> propertyDescriptors = getPropertyDescriptorsOptional(beanClass); List<String> result = new ArrayList<String>(); for (PropertyDescriptor propertyDescriptor : pr...
[ "public", "static", "List", "<", "String", ">", "getMutablePropertyNamesOptional", "(", "Class", "<", "?", ">", "beanClass", ")", "{", "List", "<", "PropertyDescriptor", ">", "propertyDescriptors", "=", "getPropertyDescriptorsOptional", "(", "beanClass", ")", ";", ...
Returns an unmodifiable list of all property names of the given bean class for which a read method and a write method exists. If the bean class can not be introspected, an empty list will be returned. @param beanClass The bean class @return The property names
[ "Returns", "an", "unmodifiable", "list", "of", "all", "property", "names", "of", "the", "given", "bean", "class", "for", "which", "a", "read", "method", "and", "a", "write", "method", "exists", ".", "If", "the", "bean", "class", "can", "not", "be", "intr...
5a4876b48c3a2dc61d21324733cf37512d721c33
https://github.com/javagl/Common/blob/5a4876b48c3a2dc61d21324733cf37512d721c33/src/main/java/de/javagl/common/beans/BeanUtils.java#L257-L276
149,601
javagl/Common
src/main/java/de/javagl/common/beans/BeanUtils.java
BeanUtils.getWriteMethodOptional
public static Method getWriteMethodOptional( Class<?> beanClass, String propertyName) { PropertyDescriptor propertyDescriptor = getPropertyDescriptorOptional(beanClass, propertyName); if (propertyDescriptor == null) { return null; } re...
java
public static Method getWriteMethodOptional( Class<?> beanClass, String propertyName) { PropertyDescriptor propertyDescriptor = getPropertyDescriptorOptional(beanClass, propertyName); if (propertyDescriptor == null) { return null; } re...
[ "public", "static", "Method", "getWriteMethodOptional", "(", "Class", "<", "?", ">", "beanClass", ",", "String", "propertyName", ")", "{", "PropertyDescriptor", "propertyDescriptor", "=", "getPropertyDescriptorOptional", "(", "beanClass", ",", "propertyName", ")", ";"...
Returns the write method for the property with the given name in the given bean class. @param beanClass The bean class @param propertyName The property name @return The write method, or <code>null</code> if no appropriate write method is found.
[ "Returns", "the", "write", "method", "for", "the", "property", "with", "the", "given", "name", "in", "the", "given", "bean", "class", "." ]
5a4876b48c3a2dc61d21324733cf37512d721c33
https://github.com/javagl/Common/blob/5a4876b48c3a2dc61d21324733cf37512d721c33/src/main/java/de/javagl/common/beans/BeanUtils.java#L314-L324
149,602
javagl/Common
src/main/java/de/javagl/common/beans/BeanUtils.java
BeanUtils.getReadMethodOptional
public static Method getReadMethodOptional( Class<?> beanClass, String propertyName) { PropertyDescriptor propertyDescriptor = getPropertyDescriptorOptional(beanClass, propertyName); if (propertyDescriptor == null) { return null; } ret...
java
public static Method getReadMethodOptional( Class<?> beanClass, String propertyName) { PropertyDescriptor propertyDescriptor = getPropertyDescriptorOptional(beanClass, propertyName); if (propertyDescriptor == null) { return null; } ret...
[ "public", "static", "Method", "getReadMethodOptional", "(", "Class", "<", "?", ">", "beanClass", ",", "String", "propertyName", ")", "{", "PropertyDescriptor", "propertyDescriptor", "=", "getPropertyDescriptorOptional", "(", "beanClass", ",", "propertyName", ")", ";",...
Returns the read method for the property with the given name in the given bean class. @param beanClass The bean class @param propertyName The property name @return The read method for the property, or <code>null</code> if no appropriate read method is found.
[ "Returns", "the", "read", "method", "for", "the", "property", "with", "the", "given", "name", "in", "the", "given", "bean", "class", "." ]
5a4876b48c3a2dc61d21324733cf37512d721c33
https://github.com/javagl/Common/blob/5a4876b48c3a2dc61d21324733cf37512d721c33/src/main/java/de/javagl/common/beans/BeanUtils.java#L335-L345
149,603
Viascom/groundwork
foxhttp/src/main/java/ch/viascom/groundwork/foxhttp/authorization/DefaultAuthorizationStrategy.java
DefaultAuthorizationStrategy.getAuthorization
@Override public List<FoxHttpAuthorization> getAuthorization(URLConnection connection, FoxHttpAuthorizationScope foxHttpAuthorizationScope, FoxHttpClient foxHttpClient) { ArrayList<FoxHttpAuthorization> foxHttpAuthorizationList = new ArrayList<>(); for (Map.Entry<String, ArrayList<FoxHttpAuthorizat...
java
@Override public List<FoxHttpAuthorization> getAuthorization(URLConnection connection, FoxHttpAuthorizationScope foxHttpAuthorizationScope, FoxHttpClient foxHttpClient) { ArrayList<FoxHttpAuthorization> foxHttpAuthorizationList = new ArrayList<>(); for (Map.Entry<String, ArrayList<FoxHttpAuthorizat...
[ "@", "Override", "public", "List", "<", "FoxHttpAuthorization", ">", "getAuthorization", "(", "URLConnection", "connection", ",", "FoxHttpAuthorizationScope", "foxHttpAuthorizationScope", ",", "FoxHttpClient", "foxHttpClient", ")", "{", "ArrayList", "<", "FoxHttpAuthorizati...
Returns a list of matching FoxHttpAuthorizations based on the given FoxHttpAuthorizationScope @param connection connection of the request @param foxHttpAuthorizationScope looking for scope @return
[ "Returns", "a", "list", "of", "matching", "FoxHttpAuthorizations", "based", "on", "the", "given", "FoxHttpAuthorizationScope" ]
d3f7d0df65e2e75861fc7db938090683f2cdf919
https://github.com/Viascom/groundwork/blob/d3f7d0df65e2e75861fc7db938090683f2cdf919/foxhttp/src/main/java/ch/viascom/groundwork/foxhttp/authorization/DefaultAuthorizationStrategy.java#L36-L51
149,604
Viascom/groundwork
foxhttp/src/main/java/ch/viascom/groundwork/foxhttp/authorization/DefaultAuthorizationStrategy.java
DefaultAuthorizationStrategy.addAuthorization
@Override public void addAuthorization(FoxHttpAuthorizationScope foxHttpAuthorizationScope, FoxHttpAuthorization foxHttpAuthorization) { if (foxHttpAuthorizations.containsKey(foxHttpAuthorizationScope.toString())) { foxHttpAuthorizations.get(foxHttpAuthorizationScope.toString()).add(foxHttpAutho...
java
@Override public void addAuthorization(FoxHttpAuthorizationScope foxHttpAuthorizationScope, FoxHttpAuthorization foxHttpAuthorization) { if (foxHttpAuthorizations.containsKey(foxHttpAuthorizationScope.toString())) { foxHttpAuthorizations.get(foxHttpAuthorizationScope.toString()).add(foxHttpAutho...
[ "@", "Override", "public", "void", "addAuthorization", "(", "FoxHttpAuthorizationScope", "foxHttpAuthorizationScope", ",", "FoxHttpAuthorization", "foxHttpAuthorization", ")", "{", "if", "(", "foxHttpAuthorizations", ".", "containsKey", "(", "foxHttpAuthorizationScope", ".", ...
Add a new FoxHttpAuthorization to the AuthorizationStrategy @param foxHttpAuthorizationScope scope in which the authorization is used @param foxHttpAuthorization authorization itself
[ "Add", "a", "new", "FoxHttpAuthorization", "to", "the", "AuthorizationStrategy" ]
d3f7d0df65e2e75861fc7db938090683f2cdf919
https://github.com/Viascom/groundwork/blob/d3f7d0df65e2e75861fc7db938090683f2cdf919/foxhttp/src/main/java/ch/viascom/groundwork/foxhttp/authorization/DefaultAuthorizationStrategy.java#L59-L67
149,605
Viascom/groundwork
foxhttp/src/main/java/ch/viascom/groundwork/foxhttp/authorization/DefaultAuthorizationStrategy.java
DefaultAuthorizationStrategy.removeAuthorization
@Override public void removeAuthorization(FoxHttpAuthorizationScope foxHttpAuthorizationScope, FoxHttpAuthorization foxHttpAuthorization) { ArrayList<FoxHttpAuthorization> authorizations = foxHttpAuthorizations.get(foxHttpAuthorizationScope.toString()); ArrayList<FoxHttpAuthorization> cleandAuthoriz...
java
@Override public void removeAuthorization(FoxHttpAuthorizationScope foxHttpAuthorizationScope, FoxHttpAuthorization foxHttpAuthorization) { ArrayList<FoxHttpAuthorization> authorizations = foxHttpAuthorizations.get(foxHttpAuthorizationScope.toString()); ArrayList<FoxHttpAuthorization> cleandAuthoriz...
[ "@", "Override", "public", "void", "removeAuthorization", "(", "FoxHttpAuthorizationScope", "foxHttpAuthorizationScope", ",", "FoxHttpAuthorization", "foxHttpAuthorization", ")", "{", "ArrayList", "<", "FoxHttpAuthorization", ">", "authorizations", "=", "foxHttpAuthorizations",...
Remove a defined FoxHttpAuthorization from the AuthorizationStrategy @param foxHttpAuthorizationScope scope in which the authorization is used @param foxHttpAuthorization object of the same authorization
[ "Remove", "a", "defined", "FoxHttpAuthorization", "from", "the", "AuthorizationStrategy" ]
d3f7d0df65e2e75861fc7db938090683f2cdf919
https://github.com/Viascom/groundwork/blob/d3f7d0df65e2e75861fc7db938090683f2cdf919/foxhttp/src/main/java/ch/viascom/groundwork/foxhttp/authorization/DefaultAuthorizationStrategy.java#L75-L85
149,606
Viascom/groundwork
service-result/src/main/java/ch/viascom/groundwork/serviceresult/ServiceResult.java
ServiceResult.setContent
public ServiceResult<T> setContent(T serviceResultContent) { content = serviceResultContent; setHash(ObjectHasher.hash(content)); return this; }
java
public ServiceResult<T> setContent(T serviceResultContent) { content = serviceResultContent; setHash(ObjectHasher.hash(content)); return this; }
[ "public", "ServiceResult", "<", "T", ">", "setContent", "(", "T", "serviceResultContent", ")", "{", "content", "=", "serviceResultContent", ";", "setHash", "(", "ObjectHasher", ".", "hash", "(", "content", ")", ")", ";", "return", "this", ";", "}" ]
Set the content of the ServiceResult @param serviceResultContent @return
[ "Set", "the", "content", "of", "the", "ServiceResult" ]
d3f7d0df65e2e75861fc7db938090683f2cdf919
https://github.com/Viascom/groundwork/blob/d3f7d0df65e2e75861fc7db938090683f2cdf919/service-result/src/main/java/ch/viascom/groundwork/serviceresult/ServiceResult.java#L63-L67
149,607
Viascom/groundwork
service-result/src/main/java/ch/viascom/groundwork/serviceresult/ServiceResult.java
ServiceResult.addMetadata
public ServiceResult<T> addMetadata(String key, Metadata metadata) { this.getMetadata().put(key, metadata); return this; }
java
public ServiceResult<T> addMetadata(String key, Metadata metadata) { this.getMetadata().put(key, metadata); return this; }
[ "public", "ServiceResult", "<", "T", ">", "addMetadata", "(", "String", "key", ",", "Metadata", "metadata", ")", "{", "this", ".", "getMetadata", "(", ")", ".", "put", "(", "key", ",", "metadata", ")", ";", "return", "this", ";", "}" ]
Add a new set of Metadata @param key @param metadata @return
[ "Add", "a", "new", "set", "of", "Metadata" ]
d3f7d0df65e2e75861fc7db938090683f2cdf919
https://github.com/Viascom/groundwork/blob/d3f7d0df65e2e75861fc7db938090683f2cdf919/service-result/src/main/java/ch/viascom/groundwork/serviceresult/ServiceResult.java#L76-L79
149,608
pryzach/midao
midao-jdbc-core/src/main/java/org/midao/jdbc/core/handlers/output/BeanOutputHandler.java
BeanOutputHandler.handle
public T handle(List<QueryParameters> outputList) throws MjdbcException { return (T) this.outputProcessor.toBean(outputList, this.type); }
java
public T handle(List<QueryParameters> outputList) throws MjdbcException { return (T) this.outputProcessor.toBean(outputList, this.type); }
[ "public", "T", "handle", "(", "List", "<", "QueryParameters", ">", "outputList", ")", "throws", "MjdbcException", "{", "return", "(", "T", ")", "this", ".", "outputProcessor", ".", "toBean", "(", "outputList", ",", "this", ".", "type", ")", ";", "}" ]
Converts first row of query output into Bean @param outputList Query output @return Bean converted from first row of query output @throws org.midao.jdbc.core.exception.MjdbcException
[ "Converts", "first", "row", "of", "query", "output", "into", "Bean" ]
ed9048ed2c792a4794a2116a25779dfb84cd9447
https://github.com/pryzach/midao/blob/ed9048ed2c792a4794a2116a25779dfb84cd9447/midao-jdbc-core/src/main/java/org/midao/jdbc/core/handlers/output/BeanOutputHandler.java#L67-L69
149,609
cloudbees/bees-maven-components
src/main/java/com/cloudbees/sdk/maven/RepositoryService.java
RepositoryService.resolveArtifact
public ArtifactResult resolveArtifact( Artifact artifact ) throws ArtifactResolutionException { return resolveArtifact(new ArtifactRequest(artifact,remoteRepositories,null)); }
java
public ArtifactResult resolveArtifact( Artifact artifact ) throws ArtifactResolutionException { return resolveArtifact(new ArtifactRequest(artifact,remoteRepositories,null)); }
[ "public", "ArtifactResult", "resolveArtifact", "(", "Artifact", "artifact", ")", "throws", "ArtifactResolutionException", "{", "return", "resolveArtifact", "(", "new", "ArtifactRequest", "(", "artifact", ",", "remoteRepositories", ",", "null", ")", ")", ";", "}" ]
Resolves a single artifact and returns it.
[ "Resolves", "a", "single", "artifact", "and", "returns", "it", "." ]
b4410c4826c38a83c209286dad847f3bdfad682a
https://github.com/cloudbees/bees-maven-components/blob/b4410c4826c38a83c209286dad847f3bdfad682a/src/main/java/com/cloudbees/sdk/maven/RepositoryService.java#L217-L219
149,610
cloudbees/bees-maven-components
src/main/java/com/cloudbees/sdk/maven/RepositoryService.java
RepositoryService.resolveArtifacts
public List<ArtifactResult> resolveArtifacts( Collection<? extends ArtifactRequest> requests ) throws ArtifactResolutionException { return repository.resolveArtifacts(session, requests); }
java
public List<ArtifactResult> resolveArtifacts( Collection<? extends ArtifactRequest> requests ) throws ArtifactResolutionException { return repository.resolveArtifacts(session, requests); }
[ "public", "List", "<", "ArtifactResult", ">", "resolveArtifacts", "(", "Collection", "<", "?", "extends", "ArtifactRequest", ">", "requests", ")", "throws", "ArtifactResolutionException", "{", "return", "repository", ".", "resolveArtifacts", "(", "session", ",", "re...
Resolves the paths for a collection of artifacts. Artifacts will be downloaded if necessary. Artifacts that are already resolved will be skipped and are not re-resolved. Note that this method assumes that any relocations have already been processed. @param requests The resolution requests, must not be {@code null} @re...
[ "Resolves", "the", "paths", "for", "a", "collection", "of", "artifacts", ".", "Artifacts", "will", "be", "downloaded", "if", "necessary", ".", "Artifacts", "that", "are", "already", "resolved", "will", "be", "skipped", "and", "are", "not", "re", "-", "resolv...
b4410c4826c38a83c209286dad847f3bdfad682a
https://github.com/cloudbees/bees-maven-components/blob/b4410c4826c38a83c209286dad847f3bdfad682a/src/main/java/com/cloudbees/sdk/maven/RepositoryService.java#L231-L233
149,611
cloudbees/bees-maven-components
src/main/java/com/cloudbees/sdk/maven/RepositoryService.java
RepositoryService.resolveMetadata
public List<MetadataResult> resolveMetadata( Collection<? extends MetadataRequest> requests ) { return repository.resolveMetadata(session, requests); }
java
public List<MetadataResult> resolveMetadata( Collection<? extends MetadataRequest> requests ) { return repository.resolveMetadata(session, requests); }
[ "public", "List", "<", "MetadataResult", ">", "resolveMetadata", "(", "Collection", "<", "?", "extends", "MetadataRequest", ">", "requests", ")", "{", "return", "repository", ".", "resolveMetadata", "(", "session", ",", "requests", ")", ";", "}" ]
Resolves the paths for a collection of metadata. Metadata will be downloaded if necessary. @param requests The resolution requests, must not be {@code null} @return The resolution results (in request order), never {@code null}. @see org.sonatype.aether.metadata.Metadata#getFile()
[ "Resolves", "the", "paths", "for", "a", "collection", "of", "metadata", ".", "Metadata", "will", "be", "downloaded", "if", "necessary", "." ]
b4410c4826c38a83c209286dad847f3bdfad682a
https://github.com/cloudbees/bees-maven-components/blob/b4410c4826c38a83c209286dad847f3bdfad682a/src/main/java/com/cloudbees/sdk/maven/RepositoryService.java#L242-L244
149,612
pryzach/midao
midao-jdbc-core/src/main/java/org/midao/jdbc/core/handlers/xml/XmlRepositoryFactory.java
XmlRepositoryFactory.addAll
public static void addAll(Document document) { List<Element> elementList = getElements(document); List<String> elementIds = getElementsId(elementList); addAll(elementList); }
java
public static void addAll(Document document) { List<Element> elementList = getElements(document); List<String> elementIds = getElementsId(elementList); addAll(elementList); }
[ "public", "static", "void", "addAll", "(", "Document", "document", ")", "{", "List", "<", "Element", ">", "elementList", "=", "getElements", "(", "document", ")", ";", "List", "<", "String", ">", "elementIds", "=", "getElementsId", "(", "elementList", ")", ...
Adds all queries from XML file into Repository @param document document which would be read
[ "Adds", "all", "queries", "from", "XML", "file", "into", "Repository" ]
ed9048ed2c792a4794a2116a25779dfb84cd9447
https://github.com/pryzach/midao/blob/ed9048ed2c792a4794a2116a25779dfb84cd9447/midao-jdbc-core/src/main/java/org/midao/jdbc/core/handlers/xml/XmlRepositoryFactory.java#L196-L202
149,613
pryzach/midao
midao-jdbc-core/src/main/java/org/midao/jdbc/core/handlers/xml/XmlRepositoryFactory.java
XmlRepositoryFactory.removeAll
public static void removeAll(Document document) { List<String> elementsId = null; elementsId = getElementsId(document); removeAll(elementsId); }
java
public static void removeAll(Document document) { List<String> elementsId = null; elementsId = getElementsId(document); removeAll(elementsId); }
[ "public", "static", "void", "removeAll", "(", "Document", "document", ")", "{", "List", "<", "String", ">", "elementsId", "=", "null", ";", "elementsId", "=", "getElementsId", "(", "document", ")", ";", "removeAll", "(", "elementsId", ")", ";", "}" ]
Removes all queries in the XML file from the Repository @param document document which would be used as source for query names to remove from repository
[ "Removes", "all", "queries", "in", "the", "XML", "file", "from", "the", "Repository" ]
ed9048ed2c792a4794a2116a25779dfb84cd9447
https://github.com/pryzach/midao/blob/ed9048ed2c792a4794a2116a25779dfb84cd9447/midao-jdbc-core/src/main/java/org/midao/jdbc/core/handlers/xml/XmlRepositoryFactory.java#L230-L236
149,614
pryzach/midao
midao-jdbc-core/src/main/java/org/midao/jdbc/core/handlers/xml/XmlRepositoryFactory.java
XmlRepositoryFactory.getElementsId
private static List<String> getElementsId(Document document) { List<String> result = new ArrayList<String>(); List<Element> elementList = getElements(document); result = getElementsId(elementList); return result; }
java
private static List<String> getElementsId(Document document) { List<String> result = new ArrayList<String>(); List<Element> elementList = getElements(document); result = getElementsId(elementList); return result; }
[ "private", "static", "List", "<", "String", ">", "getElementsId", "(", "Document", "document", ")", "{", "List", "<", "String", ">", "result", "=", "new", "ArrayList", "<", "String", ">", "(", ")", ";", "List", "<", "Element", ">", "elementList", "=", ...
Reads XML document and returns it content as list of query names @param document document which would be read @return list of queries names
[ "Reads", "XML", "document", "and", "returns", "it", "content", "as", "list", "of", "query", "names" ]
ed9048ed2c792a4794a2116a25779dfb84cd9447
https://github.com/pryzach/midao/blob/ed9048ed2c792a4794a2116a25779dfb84cd9447/midao-jdbc-core/src/main/java/org/midao/jdbc/core/handlers/xml/XmlRepositoryFactory.java#L362-L370
149,615
pryzach/midao
midao-jdbc-core/src/main/java/org/midao/jdbc/core/handlers/xml/XmlRepositoryFactory.java
XmlRepositoryFactory.createBeanOutputHandler
private static OutputHandler createBeanOutputHandler(AbstractXmlInputOutputHandler inputHandler, String className) { OutputHandler result = null; Constructor constructor = null; try { Class clazz = Class.forName(className); Class outputClass = inputHandler.getOutpu...
java
private static OutputHandler createBeanOutputHandler(AbstractXmlInputOutputHandler inputHandler, String className) { OutputHandler result = null; Constructor constructor = null; try { Class clazz = Class.forName(className); Class outputClass = inputHandler.getOutpu...
[ "private", "static", "OutputHandler", "createBeanOutputHandler", "(", "AbstractXmlInputOutputHandler", "inputHandler", ",", "String", "className", ")", "{", "OutputHandler", "result", "=", "null", ";", "Constructor", "constructor", "=", "null", ";", "try", "{", "Class...
Unlike standard output handlers - beans output handlers require bean type via constructor, hence cannot be prototyped. This function is invoked to create new instance of Bean output handler @param inputHandler XML input/output handler for which {@link OutputHandler} is constructed @param className Bean output handl...
[ "Unlike", "standard", "output", "handlers", "-", "beans", "output", "handlers", "require", "bean", "type", "via", "constructor", "hence", "cannot", "be", "prototyped", ".", "This", "function", "is", "invoked", "to", "create", "new", "instance", "of", "Bean", "...
ed9048ed2c792a4794a2116a25779dfb84cd9447
https://github.com/pryzach/midao/blob/ed9048ed2c792a4794a2116a25779dfb84cd9447/midao-jdbc-core/src/main/java/org/midao/jdbc/core/handlers/xml/XmlRepositoryFactory.java#L449-L469
149,616
Omertron/api-fanarttv
src/main/java/com/omertron/fanarttvapi/tools/ApiBuilder.java
ApiBuilder.getImageUrl
public URL getImageUrl(BaseType baseType, String id) throws FanartTvException { StringBuilder url = getBaseUrl(baseType); // Add the ID url.append(id); // Add the API Key url.append(DELIMITER_APIKEY).append(apiKey); // Add the client API Key if (StringUtils.isN...
java
public URL getImageUrl(BaseType baseType, String id) throws FanartTvException { StringBuilder url = getBaseUrl(baseType); // Add the ID url.append(id); // Add the API Key url.append(DELIMITER_APIKEY).append(apiKey); // Add the client API Key if (StringUtils.isN...
[ "public", "URL", "getImageUrl", "(", "BaseType", "baseType", ",", "String", "id", ")", "throws", "FanartTvException", "{", "StringBuilder", "url", "=", "getBaseUrl", "(", "baseType", ")", ";", "// Add the ID", "url", ".", "append", "(", "id", ")", ";", "// A...
Generate the URL for the artwork requests @param baseType @param id @return @throws FanartTvException
[ "Generate", "the", "URL", "for", "the", "artwork", "requests" ]
2a1854c840d8111935d0f6abe5232e2c3c3f318b
https://github.com/Omertron/api-fanarttv/blob/2a1854c840d8111935d0f6abe5232e2c3c3f318b/src/main/java/com/omertron/fanarttvapi/tools/ApiBuilder.java#L103-L118
149,617
Omertron/api-fanarttv
src/main/java/com/omertron/fanarttvapi/tools/ApiBuilder.java
ApiBuilder.convertUrl
private URL convertUrl(StringBuilder searchUrl) throws FanartTvException { try { LOG.trace("URL: {}", searchUrl.toString()); return new URL(searchUrl.toString()); } catch (MalformedURLException ex) { LOG.warn(FAILED_TO_CREATE_URL, searchUrl.toString(), ex.toString());...
java
private URL convertUrl(StringBuilder searchUrl) throws FanartTvException { try { LOG.trace("URL: {}", searchUrl.toString()); return new URL(searchUrl.toString()); } catch (MalformedURLException ex) { LOG.warn(FAILED_TO_CREATE_URL, searchUrl.toString(), ex.toString());...
[ "private", "URL", "convertUrl", "(", "StringBuilder", "searchUrl", ")", "throws", "FanartTvException", "{", "try", "{", "LOG", ".", "trace", "(", "\"URL: {}\"", ",", "searchUrl", ".", "toString", "(", ")", ")", ";", "return", "new", "URL", "(", "searchUrl", ...
Convert the string into a URL @param searchUrl @return @throws FanartTvException
[ "Convert", "the", "string", "into", "a", "URL" ]
2a1854c840d8111935d0f6abe5232e2c3c3f318b
https://github.com/Omertron/api-fanarttv/blob/2a1854c840d8111935d0f6abe5232e2c3c3f318b/src/main/java/com/omertron/fanarttvapi/tools/ApiBuilder.java#L154-L162
149,618
greese/dasein-util
src/main/java/org/dasein/attributes/DataType.java
DataType.getParameters
public final Collection<String> getParameters() { ArrayList<String> params = new ArrayList<String>(); if( parameters == null ) { return params; } // we copy to guarantee that the caller does not screw up our internal storage params.addAll(Arrays.asList(parame...
java
public final Collection<String> getParameters() { ArrayList<String> params = new ArrayList<String>(); if( parameters == null ) { return params; } // we copy to guarantee that the caller does not screw up our internal storage params.addAll(Arrays.asList(parame...
[ "public", "final", "Collection", "<", "String", ">", "getParameters", "(", ")", "{", "ArrayList", "<", "String", ">", "params", "=", "new", "ArrayList", "<", "String", ">", "(", ")", ";", "if", "(", "parameters", "==", "null", ")", "{", "return", "para...
Type parameters tell a data type how to constrain values. What these parameters are and how they are interpreted are left entirely up to the implementing classes. @return the constraining parameters for this data type
[ "Type", "parameters", "tell", "a", "data", "type", "how", "to", "constrain", "values", ".", "What", "these", "parameters", "are", "and", "how", "they", "are", "interpreted", "are", "left", "entirely", "up", "to", "the", "implementing", "classes", "." ]
648606dcb4bd382e3287a6c897a32e65d553dc47
https://github.com/greese/dasein-util/blob/648606dcb4bd382e3287a6c897a32e65d553dc47/src/main/java/org/dasein/attributes/DataType.java#L230-L239
149,619
greese/dasein-util
src/main/java/org/dasein/attributes/DataType.java
DataType.getValues
@SuppressWarnings("unchecked") public Collection<V> getValues(Object src) { ArrayList<V> values = new ArrayList<V>(); if( src instanceof String ) { String[] words = ((String)src).split(","); if( words.length < 1 ) { values.add(getValue(sr...
java
@SuppressWarnings("unchecked") public Collection<V> getValues(Object src) { ArrayList<V> values = new ArrayList<V>(); if( src instanceof String ) { String[] words = ((String)src).split(","); if( words.length < 1 ) { values.add(getValue(sr...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "Collection", "<", "V", ">", "getValues", "(", "Object", "src", ")", "{", "ArrayList", "<", "V", ">", "values", "=", "new", "ArrayList", "<", "V", ">", "(", ")", ";", "if", "(", "src", "in...
When a data type is multi-valued, this method is called to convert raw data into a collection of values matching this data type. If the raw value is a string, this method assumes that the string represents a comma-delimited, multi-value attribute. @param src the raw source value @return the converted value
[ "When", "a", "data", "type", "is", "multi", "-", "valued", "this", "method", "is", "called", "to", "convert", "raw", "data", "into", "a", "collection", "of", "values", "matching", "this", "data", "type", ".", "If", "the", "raw", "value", "is", "a", "st...
648606dcb4bd382e3287a6c897a32e65d553dc47
https://github.com/greese/dasein-util/blob/648606dcb4bd382e3287a6c897a32e65d553dc47/src/main/java/org/dasein/attributes/DataType.java#L293-L317
149,620
jboss/jboss-jad-api_spec
src/main/java/javax/enterprise/deploy/shared/ModuleType.java
ModuleType.getModuleExtension
public String getModuleExtension() { if (value >= moduleExtensions.length) return Integer.toString(value); return moduleExtensions[value]; }
java
public String getModuleExtension() { if (value >= moduleExtensions.length) return Integer.toString(value); return moduleExtensions[value]; }
[ "public", "String", "getModuleExtension", "(", ")", "{", "if", "(", "value", ">=", "moduleExtensions", ".", "length", ")", "return", "Integer", ".", "toString", "(", "value", ")", ";", "return", "moduleExtensions", "[", "value", "]", ";", "}" ]
Get the file extension for this module @return the file extension
[ "Get", "the", "file", "extension", "for", "this", "module" ]
b5ebffc7082aadf327023d81a799ae6567d20cef
https://github.com/jboss/jboss-jad-api_spec/blob/b5ebffc7082aadf327023d81a799ae6567d20cef/src/main/java/javax/enterprise/deploy/shared/ModuleType.java#L106-L111
149,621
workplacesystems/queuj
src/main/java/com/workplacesystems/queuj/Resilience.java
Resilience.createRunOnceResilience
public static Resilience createRunOnceResilience(int retry_count, int retry_interval) { Resilience resilience = new RunOnlyOnce(); RunFiniteTimes failure_occurrence = new RunFiniteTimes(retry_count); resilience.setFailureSchedule(failure_occurrence); for (int i=0 ; i < retry_count ;...
java
public static Resilience createRunOnceResilience(int retry_count, int retry_interval) { Resilience resilience = new RunOnlyOnce(); RunFiniteTimes failure_occurrence = new RunFiniteTimes(retry_count); resilience.setFailureSchedule(failure_occurrence); for (int i=0 ; i < retry_count ;...
[ "public", "static", "Resilience", "createRunOnceResilience", "(", "int", "retry_count", ",", "int", "retry_interval", ")", "{", "Resilience", "resilience", "=", "new", "RunOnlyOnce", "(", ")", ";", "RunFiniteTimes", "failure_occurrence", "=", "new", "RunFiniteTimes", ...
create a simple Resilience object so process can restart - runs once, with retries as parameters
[ "create", "a", "simple", "Resilience", "object", "so", "process", "can", "restart", "-", "runs", "once", "with", "retries", "as", "parameters" ]
4293116b412b4a20ead99963b9b05a135812c501
https://github.com/workplacesystems/queuj/blob/4293116b412b4a20ead99963b9b05a135812c501/src/main/java/com/workplacesystems/queuj/Resilience.java#L57-L71
149,622
pryzach/midao
midao-jdbc-core/src/main/java/org/midao/jdbc/core/handlers/output/ScalarOutputHandler.java
ScalarOutputHandler.handle
public T handle(List<QueryParameters> output) { T result = null; String parameterName = null; Object parameterValue = null; if (output.size() > 1) { if (this.columnName == null) { parameterName = output.get(1).getNameByPosition(columnIndex); p...
java
public T handle(List<QueryParameters> output) { T result = null; String parameterName = null; Object parameterValue = null; if (output.size() > 1) { if (this.columnName == null) { parameterName = output.get(1).getNameByPosition(columnIndex); p...
[ "public", "T", "handle", "(", "List", "<", "QueryParameters", ">", "output", ")", "{", "T", "result", "=", "null", ";", "String", "parameterName", "=", "null", ";", "Object", "parameterValue", "=", "null", ";", "if", "(", "output", ".", "size", "(", ")...
Reads specified column of first row of Query output @param output Query output @return Value returned from specified (via constructor) column of first row of query output
[ "Reads", "specified", "column", "of", "first", "row", "of", "Query", "output" ]
ed9048ed2c792a4794a2116a25779dfb84cd9447
https://github.com/pryzach/midao/blob/ed9048ed2c792a4794a2116a25779dfb84cd9447/midao-jdbc-core/src/main/java/org/midao/jdbc/core/handlers/output/ScalarOutputHandler.java#L82-L101
149,623
matthewhorridge/binaryowl
src/main/java/org/semanticweb/binaryowl/BinaryOWLMetadata.java
BinaryOWLMetadata.setValue
private <O> void setValue(Map<String, O> nameValueMap, String name, O value) { checkForNull(name, value); nameValueMap.put(name, value); }
java
private <O> void setValue(Map<String, O> nameValueMap, String name, O value) { checkForNull(name, value); nameValueMap.put(name, value); }
[ "private", "<", "O", ">", "void", "setValue", "(", "Map", "<", "String", ",", "O", ">", "nameValueMap", ",", "String", "name", ",", "O", "value", ")", "{", "checkForNull", "(", "name", ",", "value", ")", ";", "nameValueMap", ".", "put", "(", "name", ...
Sets the value of an attribute. @param nameValueMap A map which maps attribute names to attribute values. @param name The name of the attribute. Not null. @param value The value of the attribute. Not null. @throws NullPointerException if name is null, or value is null.
[ "Sets", "the", "value", "of", "an", "attribute", "." ]
7fccfe804120f86b38ca855ddbb569a81a042257
https://github.com/matthewhorridge/binaryowl/blob/7fccfe804120f86b38ca855ddbb569a81a042257/src/main/java/org/semanticweb/binaryowl/BinaryOWLMetadata.java#L148-L151
149,624
matthewhorridge/binaryowl
src/main/java/org/semanticweb/binaryowl/BinaryOWLMetadata.java
BinaryOWLMetadata.getValue
private <O> O getValue(Map<String, O> nameValueMap, String attributeName, O defaultValue) { if(attributeName == null) { throw new NullPointerException("name must not be null"); } if(nameValueMap == null) { return defaultValue; } O value = nameValueMap.get(...
java
private <O> O getValue(Map<String, O> nameValueMap, String attributeName, O defaultValue) { if(attributeName == null) { throw new NullPointerException("name must not be null"); } if(nameValueMap == null) { return defaultValue; } O value = nameValueMap.get(...
[ "private", "<", "O", ">", "O", "getValue", "(", "Map", "<", "String", ",", "O", ">", "nameValueMap", ",", "String", "attributeName", ",", "O", "defaultValue", ")", "{", "if", "(", "attributeName", "==", "null", ")", "{", "throw", "new", "NullPointerExcep...
Gets the value, or default value, of an attribute. @param nameValueMap The name attribute value map which maps attribute names to attribute values. @param attributeName The name of the attribute to retrieve. @param defaultValue A default value, which will be returned if there is no set value for the specified attribute...
[ "Gets", "the", "value", "or", "default", "value", "of", "an", "attribute", "." ]
7fccfe804120f86b38ca855ddbb569a81a042257
https://github.com/matthewhorridge/binaryowl/blob/7fccfe804120f86b38ca855ddbb569a81a042257/src/main/java/org/semanticweb/binaryowl/BinaryOWLMetadata.java#L178-L190
149,625
matthewhorridge/binaryowl
src/main/java/org/semanticweb/binaryowl/BinaryOWLMetadata.java
BinaryOWLMetadata.createCopy
public BinaryOWLMetadata createCopy() { BinaryOWLMetadata copy = new BinaryOWLMetadata(); copy.stringAttributes.putAll(stringAttributes); copy.intAttributes.putAll(intAttributes); copy.longAttributes.putAll(longAttributes); copy.doubleAttributes.putAll(doubleAttributes); ...
java
public BinaryOWLMetadata createCopy() { BinaryOWLMetadata copy = new BinaryOWLMetadata(); copy.stringAttributes.putAll(stringAttributes); copy.intAttributes.putAll(intAttributes); copy.longAttributes.putAll(longAttributes); copy.doubleAttributes.putAll(doubleAttributes); ...
[ "public", "BinaryOWLMetadata", "createCopy", "(", ")", "{", "BinaryOWLMetadata", "copy", "=", "new", "BinaryOWLMetadata", "(", ")", ";", "copy", ".", "stringAttributes", ".", "putAll", "(", "stringAttributes", ")", ";", "copy", ".", "intAttributes", ".", "putAll...
Creates a copy of this metadata object. Modifications to this object don't affect the copy, and vice versa. @return A copy of this metadata object.
[ "Creates", "a", "copy", "of", "this", "metadata", "object", ".", "Modifications", "to", "this", "object", "don", "t", "affect", "the", "copy", "and", "vice", "versa", "." ]
7fccfe804120f86b38ca855ddbb569a81a042257
https://github.com/matthewhorridge/binaryowl/blob/7fccfe804120f86b38ca855ddbb569a81a042257/src/main/java/org/semanticweb/binaryowl/BinaryOWLMetadata.java#L204-L217
149,626
matthewhorridge/binaryowl
src/main/java/org/semanticweb/binaryowl/BinaryOWLMetadata.java
BinaryOWLMetadata.getStringAttribute
public String getStringAttribute(String name, String defaultValue) { return getValue(stringAttributes, name, defaultValue); }
java
public String getStringAttribute(String name, String defaultValue) { return getValue(stringAttributes, name, defaultValue); }
[ "public", "String", "getStringAttribute", "(", "String", "name", ",", "String", "defaultValue", ")", "{", "return", "getValue", "(", "stringAttributes", ",", "name", ",", "defaultValue", ")", ";", "}" ]
Gets the string value of an attribute. @param name The name of the attribute. Not null. @param defaultValue The default value for the attribute. May be null. This value will be returned if this metadata object does not contain a string value for the specified attribute name. @return Either the string value of the at...
[ "Gets", "the", "string", "value", "of", "an", "attribute", "." ]
7fccfe804120f86b38ca855ddbb569a81a042257
https://github.com/matthewhorridge/binaryowl/blob/7fccfe804120f86b38ca855ddbb569a81a042257/src/main/java/org/semanticweb/binaryowl/BinaryOWLMetadata.java#L247-L249
149,627
matthewhorridge/binaryowl
src/main/java/org/semanticweb/binaryowl/BinaryOWLMetadata.java
BinaryOWLMetadata.getIntAttribute
public Integer getIntAttribute(String name, Integer defaultValue) { return getValue(intAttributes, name, defaultValue); }
java
public Integer getIntAttribute(String name, Integer defaultValue) { return getValue(intAttributes, name, defaultValue); }
[ "public", "Integer", "getIntAttribute", "(", "String", "name", ",", "Integer", "defaultValue", ")", "{", "return", "getValue", "(", "intAttributes", ",", "name", ",", "defaultValue", ")", ";", "}" ]
Gets the int value of an attribute. @param name The name of the attribute. Not null. @param defaultValue The default value for the attribute. May be null. This value will be returned if this metadata object does not contain an int value for the specified attribute name. @return Either the int value of the attribute ...
[ "Gets", "the", "int", "value", "of", "an", "attribute", "." ]
7fccfe804120f86b38ca855ddbb569a81a042257
https://github.com/matthewhorridge/binaryowl/blob/7fccfe804120f86b38ca855ddbb569a81a042257/src/main/java/org/semanticweb/binaryowl/BinaryOWLMetadata.java#L289-L291
149,628
matthewhorridge/binaryowl
src/main/java/org/semanticweb/binaryowl/BinaryOWLMetadata.java
BinaryOWLMetadata.getLongAttribute
public Long getLongAttribute(String name, Long defaultValue) { return getValue(longAttributes, name, defaultValue); }
java
public Long getLongAttribute(String name, Long defaultValue) { return getValue(longAttributes, name, defaultValue); }
[ "public", "Long", "getLongAttribute", "(", "String", "name", ",", "Long", "defaultValue", ")", "{", "return", "getValue", "(", "longAttributes", ",", "name", ",", "defaultValue", ")", ";", "}" ]
Gets the long value of an attribute. @param name The name of the attribute. Not null. @param defaultValue The default value for the attribute. May be null. This value will be returned if this metadata object does not contain a long value for the specified attribute name. @return Either the long value of the attribut...
[ "Gets", "the", "long", "value", "of", "an", "attribute", "." ]
7fccfe804120f86b38ca855ddbb569a81a042257
https://github.com/matthewhorridge/binaryowl/blob/7fccfe804120f86b38ca855ddbb569a81a042257/src/main/java/org/semanticweb/binaryowl/BinaryOWLMetadata.java#L323-L325
149,629
matthewhorridge/binaryowl
src/main/java/org/semanticweb/binaryowl/BinaryOWLMetadata.java
BinaryOWLMetadata.getBooleanAttribute
public Boolean getBooleanAttribute(String name, Boolean defaultValue) { return getValue(booleanAttributes, name, defaultValue); }
java
public Boolean getBooleanAttribute(String name, Boolean defaultValue) { return getValue(booleanAttributes, name, defaultValue); }
[ "public", "Boolean", "getBooleanAttribute", "(", "String", "name", ",", "Boolean", "defaultValue", ")", "{", "return", "getValue", "(", "booleanAttributes", ",", "name", ",", "defaultValue", ")", ";", "}" ]
Gets the boolean value of an attribute. @param name The name of the attribute. Not null. @param defaultValue The default value for the attribute. May be null. This value will be returned if this metadata object does not contain a boolean value for the specified attribute name. @return Either the boolean value of the...
[ "Gets", "the", "boolean", "value", "of", "an", "attribute", "." ]
7fccfe804120f86b38ca855ddbb569a81a042257
https://github.com/matthewhorridge/binaryowl/blob/7fccfe804120f86b38ca855ddbb569a81a042257/src/main/java/org/semanticweb/binaryowl/BinaryOWLMetadata.java#L356-L358
149,630
matthewhorridge/binaryowl
src/main/java/org/semanticweb/binaryowl/BinaryOWLMetadata.java
BinaryOWLMetadata.getDoubleAttribute
public Double getDoubleAttribute(String name, Double defaultValue) { return getValue(doubleAttributes, name, defaultValue); }
java
public Double getDoubleAttribute(String name, Double defaultValue) { return getValue(doubleAttributes, name, defaultValue); }
[ "public", "Double", "getDoubleAttribute", "(", "String", "name", ",", "Double", "defaultValue", ")", "{", "return", "getValue", "(", "doubleAttributes", ",", "name", ",", "defaultValue", ")", ";", "}" ]
Gets the double value of an attribute. @param name The name of the attribute. Not null. @param defaultValue The default value for the attribute. May be null. This value will be returned if this metadata object does not contain a double value for the specified attribute name. @return Either the double value of the at...
[ "Gets", "the", "double", "value", "of", "an", "attribute", "." ]
7fccfe804120f86b38ca855ddbb569a81a042257
https://github.com/matthewhorridge/binaryowl/blob/7fccfe804120f86b38ca855ddbb569a81a042257/src/main/java/org/semanticweb/binaryowl/BinaryOWLMetadata.java#L390-L392
149,631
mike10004/common-helper
native-helper/src/main/java/com/github/mike10004/nativehelper/subprocess/ProcessMissionControl.java
ProcessMissionControl.waitFor
@Nullable private Integer waitFor(Process process) { try { return process.waitFor(); } catch (InterruptedException e) { log.info("interrupted in Process.waitFor"); return null; } }
java
@Nullable private Integer waitFor(Process process) { try { return process.waitFor(); } catch (InterruptedException e) { log.info("interrupted in Process.waitFor"); return null; } }
[ "@", "Nullable", "private", "Integer", "waitFor", "(", "Process", "process", ")", "{", "try", "{", "return", "process", ".", "waitFor", "(", ")", ";", "}", "catch", "(", "InterruptedException", "e", ")", "{", "log", ".", "info", "(", "\"interrupted in Proc...
Wait for a given process. @param process the process one wants to wait for.
[ "Wait", "for", "a", "given", "process", "." ]
744f82d9b0768a9ad9c63a57a37ab2c93bf408f4
https://github.com/mike10004/common-helper/blob/744f82d9b0768a9ad9c63a57a37ab2c93bf408f4/native-helper/src/main/java/com/github/mike10004/nativehelper/subprocess/ProcessMissionControl.java#L201-L209
149,632
cloudbees/bees-maven-components
src/main/java/com/cloudbees/sdk/maven/ResolvedDependenciesCache.java
ResolvedDependenciesCache.loadFromCache
private List<File> loadFromCache(Properties props) { String ts = props.getProperty("timestamp"); if (ts==null) return null; long timestamp = Long.valueOf(ts); if (isStale(timestamp)) return null; List<File> files = new ArrayList<File>(); for (Object k : p...
java
private List<File> loadFromCache(Properties props) { String ts = props.getProperty("timestamp"); if (ts==null) return null; long timestamp = Long.valueOf(ts); if (isStale(timestamp)) return null; List<File> files = new ArrayList<File>(); for (Object k : p...
[ "private", "List", "<", "File", ">", "loadFromCache", "(", "Properties", "props", ")", "{", "String", "ts", "=", "props", ".", "getProperty", "(", "\"timestamp\"", ")", ";", "if", "(", "ts", "==", "null", ")", "return", "null", ";", "long", "timestamp", ...
Loads a list of jars from the cache, with up-to-date check. @return null if the data is stale
[ "Loads", "a", "list", "of", "jars", "from", "the", "cache", "with", "up", "-", "to", "-", "date", "check", "." ]
b4410c4826c38a83c209286dad847f3bdfad682a
https://github.com/cloudbees/bees-maven-components/blob/b4410c4826c38a83c209286dad847f3bdfad682a/src/main/java/com/cloudbees/sdk/maven/ResolvedDependenciesCache.java#L138-L164
149,633
io7m/jcanephora
com.io7m.jcanephora.core/src/main/java/com/io7m/jcanephora/core/JCGLResources.java
JCGLResources.checkNotDeleted
public static <R extends JCGLResourceUsableType> R checkNotDeleted( final R r) throws JCGLExceptionDeleted { NullCheck.notNull(r, "Resource"); if (r.isDeleted()) { throw new JCGLExceptionDeleted( String.format( "Cannot perform operation: OpenGL object %s has been deleted.", r)...
java
public static <R extends JCGLResourceUsableType> R checkNotDeleted( final R r) throws JCGLExceptionDeleted { NullCheck.notNull(r, "Resource"); if (r.isDeleted()) { throw new JCGLExceptionDeleted( String.format( "Cannot perform operation: OpenGL object %s has been deleted.", r)...
[ "public", "static", "<", "R", "extends", "JCGLResourceUsableType", ">", "R", "checkNotDeleted", "(", "final", "R", "r", ")", "throws", "JCGLExceptionDeleted", "{", "NullCheck", ".", "notNull", "(", "r", ",", "\"Resource\"", ")", ";", "if", "(", "r", ".", "...
Check that the current object has not been deleted. @param r The object. @param <R> A deletable object. @return The object. @throws JCGLExceptionDeleted If the object has been deleted. @see JCGLResourceUsableType#isDeleted()
[ "Check", "that", "the", "current", "object", "has", "not", "been", "deleted", "." ]
0004c1744b7f0969841d04cd4fa693f402b10980
https://github.com/io7m/jcanephora/blob/0004c1744b7f0969841d04cd4fa693f402b10980/com.io7m.jcanephora.core/src/main/java/com/io7m/jcanephora/core/JCGLResources.java#L45-L58
149,634
craterdog/java-general-utilities
src/main/java/craterdog/utils/UniversalHashFunction.java
UniversalHashFunction.hashValue
public int hashValue(Object object) { int x; // make sure the hash value is consistent across JVM invocations if (object instanceof Boolean || object instanceof Character || object instanceof String || object instanceof Number || object instanceof Date) { x = object.hashCode(); ...
java
public int hashValue(Object object) { int x; // make sure the hash value is consistent across JVM invocations if (object instanceof Boolean || object instanceof Character || object instanceof String || object instanceof Number || object instanceof Date) { x = object.hashCode(); ...
[ "public", "int", "hashValue", "(", "Object", "object", ")", "{", "int", "x", ";", "// make sure the hash value is consistent across JVM invocations", "if", "(", "object", "instanceof", "Boolean", "||", "object", "instanceof", "Character", "||", "object", "instanceof", ...
This method generates a hash value for the specified object using the universal hash function parameters specified in the constructor. The result will be a hash value containing the hash width number of bits. @param object The object to be hashed. @return A universal hash of the object.
[ "This", "method", "generates", "a", "hash", "value", "for", "the", "specified", "object", "using", "the", "universal", "hash", "function", "parameters", "specified", "in", "the", "constructor", ".", "The", "result", "will", "be", "a", "hash", "value", "contain...
a3ff45eaa00c2b8ed5c53efe9fe5166065fc1f57
https://github.com/craterdog/java-general-utilities/blob/a3ff45eaa00c2b8ed5c53efe9fe5166065fc1f57/src/main/java/craterdog/utils/UniversalHashFunction.java#L87-L100
149,635
seedstack/jms-addon
src/main/java/org/seedstack/jms/internal/ManagedSession.java
ManagedSession.reset
void reset() { sessionLock.writeLock().lock(); try { LOGGER.debug("Resetting managed JMS session {}", this); session = null; for (ManagedMessageConsumer managedMessageConsumer : messageConsumers) { managedMessageConsumer.reset(); } ...
java
void reset() { sessionLock.writeLock().lock(); try { LOGGER.debug("Resetting managed JMS session {}", this); session = null; for (ManagedMessageConsumer managedMessageConsumer : messageConsumers) { managedMessageConsumer.reset(); } ...
[ "void", "reset", "(", ")", "{", "sessionLock", ".", "writeLock", "(", ")", ".", "lock", "(", ")", ";", "try", "{", "LOGGER", ".", "debug", "(", "\"Resetting managed JMS session {}\"", ",", "this", ")", ";", "session", "=", "null", ";", "for", "(", "Man...
Reset the session and the message consumers in cascade.
[ "Reset", "the", "session", "and", "the", "message", "consumers", "in", "cascade", "." ]
d6014811daaac29f591b32bfd2358500fb25d804
https://github.com/seedstack/jms-addon/blob/d6014811daaac29f591b32bfd2358500fb25d804/src/main/java/org/seedstack/jms/internal/ManagedSession.java#L80-L91
149,636
mlhartme/mork
src/main/java/net/oneandone/mork/mapping/Path.java
Path.translate
public static void translate(Syntax syntax, Definition source, Definition target) throws GenericException { List<Definition> targets; IntBitSet stopper; targets = new ArrayList<Definition>(); targets.add(target); stopper = new IntBitSet(); stopper.add(target.getAttribute...
java
public static void translate(Syntax syntax, Definition source, Definition target) throws GenericException { List<Definition> targets; IntBitSet stopper; targets = new ArrayList<Definition>(); targets.add(target); stopper = new IntBitSet(); stopper.add(target.getAttribute...
[ "public", "static", "void", "translate", "(", "Syntax", "syntax", ",", "Definition", "source", ",", "Definition", "target", ")", "throws", "GenericException", "{", "List", "<", "Definition", ">", "targets", ";", "IntBitSet", "stopper", ";", "targets", "=", "ne...
Creates a path with no steps
[ "Creates", "a", "path", "with", "no", "steps" ]
a069b087750c4133bfeebaf1f599c3bc96762113
https://github.com/mlhartme/mork/blob/a069b087750c4133bfeebaf1f599c3bc96762113/src/main/java/net/oneandone/mork/mapping/Path.java#L58-L67
149,637
mlhartme/mork
src/main/java/net/oneandone/mork/mapping/Path.java
Path.translate
public static void translate(Syntax syntax, Definition source, int[] moves, int[] symbols, Definition target, int modifier) throws GenericException { IntBitSet[] stoppers; List<Definition> targets; int i; if (moves.length - 1 != symbols.length) { throw new Illega...
java
public static void translate(Syntax syntax, Definition source, int[] moves, int[] symbols, Definition target, int modifier) throws GenericException { IntBitSet[] stoppers; List<Definition> targets; int i; if (moves.length - 1 != symbols.length) { throw new Illega...
[ "public", "static", "void", "translate", "(", "Syntax", "syntax", ",", "Definition", "source", ",", "int", "[", "]", "moves", ",", "int", "[", "]", "symbols", ",", "Definition", "target", ",", "int", "modifier", ")", "throws", "GenericException", "{", "Int...
Creates a path with 1+ steps
[ "Creates", "a", "path", "with", "1", "+", "steps" ]
a069b087750c4133bfeebaf1f599c3bc96762113
https://github.com/mlhartme/mork/blob/a069b087750c4133bfeebaf1f599c3bc96762113/src/main/java/net/oneandone/mork/mapping/Path.java#L72-L93
149,638
mlhartme/mork
src/main/java/net/oneandone/mork/mapping/Path.java
Path.translate
private static void translate(Syntax syntax, int modifier, Definition source, List<Definition> targets, int[] moves, IntBitSet[] stoppers) throws GenericException { Path path; int count; path = new Path(syntax.getGrammar(), modifier, source, targets, moves, stoppers); count ...
java
private static void translate(Syntax syntax, int modifier, Definition source, List<Definition> targets, int[] moves, IntBitSet[] stoppers) throws GenericException { Path path; int count; path = new Path(syntax.getGrammar(), modifier, source, targets, moves, stoppers); count ...
[ "private", "static", "void", "translate", "(", "Syntax", "syntax", ",", "int", "modifier", ",", "Definition", "source", ",", "List", "<", "Definition", ">", "targets", ",", "int", "[", "]", "moves", ",", "IntBitSet", "[", "]", "stoppers", ")", "throws", ...
The method actually doing the work
[ "The", "method", "actually", "doing", "the", "work" ]
a069b087750c4133bfeebaf1f599c3bc96762113
https://github.com/mlhartme/mork/blob/a069b087750c4133bfeebaf1f599c3bc96762113/src/main/java/net/oneandone/mork/mapping/Path.java#L98-L109
149,639
Terradue/jcatalogue-client
impl/src/main/java/com/terradue/jcatalogue/ChecksumUtils.java
ChecksumUtils.calc
public static Map<String, String> calc( File dataFile, String...algos ) throws IOException { Map<String, String> results = new LinkedHashMap<String, String>(); Map<String, MessageDigest> digests = new LinkedHashMap<String, MessageDigest>(); for ( String algo : algos ) { ...
java
public static Map<String, String> calc( File dataFile, String...algos ) throws IOException { Map<String, String> results = new LinkedHashMap<String, String>(); Map<String, MessageDigest> digests = new LinkedHashMap<String, MessageDigest>(); for ( String algo : algos ) { ...
[ "public", "static", "Map", "<", "String", ",", "String", ">", "calc", "(", "File", "dataFile", ",", "String", "...", "algos", ")", "throws", "IOException", "{", "Map", "<", "String", ",", "String", ">", "results", "=", "new", "LinkedHashMap", "<", "Strin...
Calculates checksums for the specified file. @param dataFile The file for which to calculate checksums, must not be {@code null}. @param algos The names of checksum algorithms (cf. {@link MessageDigest#getInstance(String)} to use, must not be {@code null}. @return The calculated checksums, indexed by algorithm name, o...
[ "Calculates", "checksums", "for", "the", "specified", "file", "." ]
1f24c4da952d8ad2373c4fa97eed48b0b8a88d21
https://github.com/Terradue/jcatalogue-client/blob/1f24c4da952d8ad2373c4fa97eed48b0b8a88d21/impl/src/main/java/com/terradue/jcatalogue/ChecksumUtils.java#L104-L151
149,640
eurekaclinical/datastore
src/main/java/org/eurekaclinical/datastore/bdb/BdbUtil.java
BdbUtil.uniqueEnvironment
public static String uniqueEnvironment(String prefix, String suffix, File directory) throws IOException { File tmpDir = UNIQUE_DIRECTORY_CREATOR.create(prefix, suffix, directory); String randomFilename = UUID.randomUUID().toString(); File envNameAsFile = new File(tm...
java
public static String uniqueEnvironment(String prefix, String suffix, File directory) throws IOException { File tmpDir = UNIQUE_DIRECTORY_CREATOR.create(prefix, suffix, directory); String randomFilename = UUID.randomUUID().toString(); File envNameAsFile = new File(tm...
[ "public", "static", "String", "uniqueEnvironment", "(", "String", "prefix", ",", "String", "suffix", ",", "File", "directory", ")", "throws", "IOException", "{", "File", "tmpDir", "=", "UNIQUE_DIRECTORY_CREATOR", ".", "create", "(", "prefix", ",", "suffix", ",",...
Creates a unique directory for housing a BDB environment, and returns its name. @param prefix a prefix for the temporary directory's name. Cannot be <code>null</code>. @param suffix a suffix for the temporary directory's name. @return the environment name to use. @param directory the parent directory to use. @throws ...
[ "Creates", "a", "unique", "directory", "for", "housing", "a", "BDB", "environment", "and", "returns", "its", "name", "." ]
a03a70819bb562ba45eac66ca49f778035ee45e0
https://github.com/eurekaclinical/datastore/blob/a03a70819bb562ba45eac66ca49f778035ee45e0/src/main/java/org/eurekaclinical/datastore/bdb/BdbUtil.java#L48-L55
149,641
mlhartme/mork
src/main/java/net/oneandone/mork/scanner/FA.java
FA.add
public int add(Object label) { ensureCapacity(used); states[used] = new State(label); return used++; }
java
public int add(Object label) { ensureCapacity(used); states[used] = new State(label); return used++; }
[ "public", "int", "add", "(", "Object", "label", ")", "{", "ensureCapacity", "(", "used", ")", ";", "states", "[", "used", "]", "=", "new", "State", "(", "label", ")", ";", "return", "used", "++", ";", "}" ]
Inserts a new states to the automaton. New states are allocated at the end. @param label label for the state created.
[ "Inserts", "a", "new", "states", "to", "the", "automaton", ".", "New", "states", "are", "allocated", "at", "the", "end", "." ]
a069b087750c4133bfeebaf1f599c3bc96762113
https://github.com/mlhartme/mork/blob/a069b087750c4133bfeebaf1f599c3bc96762113/src/main/java/net/oneandone/mork/scanner/FA.java#L99-L103
149,642
mlhartme/mork
src/main/java/net/oneandone/mork/scanner/FA.java
FA.not
public void not() { IntBitSet tmp; tmp = new IntBitSet(); tmp.addRange(0, used - 1); tmp.removeAll(ends); ends = tmp; }
java
public void not() { IntBitSet tmp; tmp = new IntBitSet(); tmp.addRange(0, used - 1); tmp.removeAll(ends); ends = tmp; }
[ "public", "void", "not", "(", ")", "{", "IntBitSet", "tmp", ";", "tmp", "=", "new", "IntBitSet", "(", ")", ";", "tmp", ".", "addRange", "(", "0", ",", "used", "-", "1", ")", ";", "tmp", ".", "removeAll", "(", "ends", ")", ";", "ends", "=", "tmp...
Negates normal states and end states. If the automaton is deterministic, the accepted language is negated.
[ "Negates", "normal", "states", "and", "end", "states", ".", "If", "the", "automaton", "is", "deterministic", "the", "accepted", "language", "is", "negated", "." ]
a069b087750c4133bfeebaf1f599c3bc96762113
https://github.com/mlhartme/mork/blob/a069b087750c4133bfeebaf1f599c3bc96762113/src/main/java/net/oneandone/mork/scanner/FA.java#L257-L264
149,643
mlhartme/mork
src/main/java/net/oneandone/mork/scanner/FA.java
FA.append
private int append(FA add) { int relocation; int idx; relocation = used; ensureCapacity(used + add.used); for (idx = 0; idx < add.used; idx++) { states[relocation + idx] = new State(add.states[idx], relocation); } used += add.used; ...
java
private int append(FA add) { int relocation; int idx; relocation = used; ensureCapacity(used + add.used); for (idx = 0; idx < add.used; idx++) { states[relocation + idx] = new State(add.states[idx], relocation); } used += add.used; ...
[ "private", "int", "append", "(", "FA", "add", ")", "{", "int", "relocation", ";", "int", "idx", ";", "relocation", "=", "used", ";", "ensureCapacity", "(", "used", "+", "add", ".", "used", ")", ";", "for", "(", "idx", "=", "0", ";", "idx", "<", "...
Adds a copy of all states and transitions from the automaton specified. No transition is added between old and new states. States and transitions are relocated with the offsets specified.
[ "Adds", "a", "copy", "of", "all", "states", "and", "transitions", "from", "the", "automaton", "specified", ".", "No", "transition", "is", "added", "between", "old", "and", "new", "states", ".", "States", "and", "transitions", "are", "relocated", "with", "the...
a069b087750c4133bfeebaf1f599c3bc96762113
https://github.com/mlhartme/mork/blob/a069b087750c4133bfeebaf1f599c3bc96762113/src/main/java/net/oneandone/mork/scanner/FA.java#L271-L283
149,644
mlhartme/mork
src/main/java/net/oneandone/mork/scanner/FA.java
FA.epsilonClosures
public IntBitSet[] epsilonClosures() { int si; int nextSize; IntBitSet[] result; IntBitSet tmp; int[] size; boolean repeat; result = new IntBitSet[used]; size = new int[used]; for (si = 0; si < used; si++) { tmp = new IntBitSet(); ...
java
public IntBitSet[] epsilonClosures() { int si; int nextSize; IntBitSet[] result; IntBitSet tmp; int[] size; boolean repeat; result = new IntBitSet[used]; size = new int[used]; for (si = 0; si < used; si++) { tmp = new IntBitSet(); ...
[ "public", "IntBitSet", "[", "]", "epsilonClosures", "(", ")", "{", "int", "si", ";", "int", "nextSize", ";", "IntBitSet", "[", "]", "result", ";", "IntBitSet", "tmp", ";", "int", "[", "]", "size", ";", "boolean", "repeat", ";", "result", "=", "new", ...
Its too expensive to compute a single epsilong closure.
[ "Its", "too", "expensive", "to", "compute", "a", "single", "epsilong", "closure", "." ]
a069b087750c4133bfeebaf1f599c3bc96762113
https://github.com/mlhartme/mork/blob/a069b087750c4133bfeebaf1f599c3bc96762113/src/main/java/net/oneandone/mork/scanner/FA.java#L290-L320
149,645
bwkimmel/jdcp
jdcp-console/src/main/java/ca/eandb/jdcp/client/SynchronizeCommand.java
SynchronizeCommand.synchronize
private void synchronize(String pkg, File path, Configuration conf) { if (!path.isDirectory()) { throw new IllegalArgumentException(path.getAbsolutePath().concat(" is not a directory.")); } for (File file : path.listFiles()) { if (file.isDirectory()) { synchronize(combine(pkg, file.getN...
java
private void synchronize(String pkg, File path, Configuration conf) { if (!path.isDirectory()) { throw new IllegalArgumentException(path.getAbsolutePath().concat(" is not a directory.")); } for (File file : path.listFiles()) { if (file.isDirectory()) { synchronize(combine(pkg, file.getN...
[ "private", "void", "synchronize", "(", "String", "pkg", ",", "File", "path", ",", "Configuration", "conf", ")", "{", "if", "(", "!", "path", ".", "isDirectory", "(", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", "path", ".", "getAbsoluteP...
Synchronizes all classes in the given directory tree to the server. @param pkg The name of the package associated with the root of the directory tree. @param path The <code>File</code> indicating the root of the directory tree. @param conf The application command line options.
[ "Synchronizes", "all", "classes", "in", "the", "given", "directory", "tree", "to", "the", "server", "." ]
630c5150c245054e2556ff370f4bad2ec793dfb7
https://github.com/bwkimmel/jdcp/blob/630c5150c245054e2556ff370f4bad2ec793dfb7/jdcp-console/src/main/java/ca/eandb/jdcp/client/SynchronizeCommand.java#L62-L99
149,646
bwkimmel/jdcp
jdcp-console/src/main/java/ca/eandb/jdcp/client/SynchronizeCommand.java
SynchronizeCommand.combine
private String combine(String parent, String child) { if (parent.length() > 0) { return parent.concat(".").concat(child); } else { return child; } }
java
private String combine(String parent, String child) { if (parent.length() > 0) { return parent.concat(".").concat(child); } else { return child; } }
[ "private", "String", "combine", "(", "String", "parent", ",", "String", "child", ")", "{", "if", "(", "parent", ".", "length", "(", ")", ">", "0", ")", "{", "return", "parent", ".", "concat", "(", "\".\"", ")", ".", "concat", "(", "child", ")", ";"...
Combines package path. @param parent The parent package. @param child The name of the child package. @return The combined package name.
[ "Combines", "package", "path", "." ]
630c5150c245054e2556ff370f4bad2ec793dfb7
https://github.com/bwkimmel/jdcp/blob/630c5150c245054e2556ff370f4bad2ec793dfb7/jdcp-console/src/main/java/ca/eandb/jdcp/client/SynchronizeCommand.java#L122-L128
149,647
Metrink/croquet
croquet-examples/src/main/java/com/metrink/croquet/examples/crm/pages/AbstractFormPage.java
AbstractFormPage.createNewBean
protected T createNewBean() throws InstantiationException { try { return beanClass.getConstructor().newInstance(); } catch (final InstantiationException | IllegalAccessException | IllegalArgumentException | InvocationTargetException | ...
java
protected T createNewBean() throws InstantiationException { try { return beanClass.getConstructor().newInstance(); } catch (final InstantiationException | IllegalAccessException | IllegalArgumentException | InvocationTargetException | ...
[ "protected", "T", "createNewBean", "(", ")", "throws", "InstantiationException", "{", "try", "{", "return", "beanClass", ".", "getConstructor", "(", ")", ".", "newInstance", "(", ")", ";", "}", "catch", "(", "final", "InstantiationException", "|", "IllegalAccess...
Creates a new bean. @return a new bean. @throws InstantiationException if anything goes wrong.
[ "Creates", "a", "new", "bean", "." ]
1b0ed1327a104cf1f809ce4c3c5bf30a3d95384b
https://github.com/Metrink/croquet/blob/1b0ed1327a104cf1f809ce4c3c5bf30a3d95384b/croquet-examples/src/main/java/com/metrink/croquet/examples/crm/pages/AbstractFormPage.java#L166-L178
149,648
Metrink/croquet
croquet-examples/src/main/java/com/metrink/croquet/examples/crm/pages/AbstractFormPage.java
AbstractFormPage.setForm
protected void setForm(final T bean, final AjaxRequestTarget target) { LOG.debug("Setting form to {}", bean); // update the model with the new bean formModel.setObject(bean); // add the form to the target target.add(form); // update the button updateSaveButton....
java
protected void setForm(final T bean, final AjaxRequestTarget target) { LOG.debug("Setting form to {}", bean); // update the model with the new bean formModel.setObject(bean); // add the form to the target target.add(form); // update the button updateSaveButton....
[ "protected", "void", "setForm", "(", "final", "T", "bean", ",", "final", "AjaxRequestTarget", "target", ")", "{", "LOG", ".", "debug", "(", "\"Setting form to {}\"", ",", "bean", ")", ";", "// update the model with the new bean", "formModel", ".", "setObject", "("...
Sets the form to the bean passed in, updating the form via AJAX. @param bean the bean to set the form to. @param target the target of whatever triggers the form fill action.
[ "Sets", "the", "form", "to", "the", "bean", "passed", "in", "updating", "the", "form", "via", "AJAX", "." ]
1b0ed1327a104cf1f809ce4c3c5bf30a3d95384b
https://github.com/Metrink/croquet/blob/1b0ed1327a104cf1f809ce4c3c5bf30a3d95384b/croquet-examples/src/main/java/com/metrink/croquet/examples/crm/pages/AbstractFormPage.java#L185-L197
149,649
mlhartme/mork
src/main/java/net/oneandone/mork/compiler/MorkMapper.java
MorkMapper.invokeMapper
private Object invokeMapper(File source) throws IOException { Object[] results; String name; Reader src; name = source.getPath(); mork.output.verbose("mapping " + name); results = run(name); mork.output.verbose("finished mapping " + name); if (results == ...
java
private Object invokeMapper(File source) throws IOException { Object[] results; String name; Reader src; name = source.getPath(); mork.output.verbose("mapping " + name); results = run(name); mork.output.verbose("finished mapping " + name); if (results == ...
[ "private", "Object", "invokeMapper", "(", "File", "source", ")", "throws", "IOException", "{", "Object", "[", "]", "results", ";", "String", "name", ";", "Reader", "src", ";", "name", "=", "source", ".", "getPath", "(", ")", ";", "mork", ".", "output", ...
Read input. Wraps mapper.read with Mork-specific error handling. Return type depends on the mapper actually used. @return null if an error has been reported
[ "Read", "input", ".", "Wraps", "mapper", ".", "read", "with", "Mork", "-", "specific", "error", "handling", ".", "Return", "type", "depends", "on", "the", "mapper", "actually", "used", "." ]
a069b087750c4133bfeebaf1f599c3bc96762113
https://github.com/mlhartme/mork/blob/a069b087750c4133bfeebaf1f599c3bc96762113/src/main/java/net/oneandone/mork/compiler/MorkMapper.java#L75-L89
149,650
vikingbrain/thedavidbox-client4j
src/main/java/com/vikingbrain/nmt/responses/system/ResponseGetNmtServiceStatus.java
ResponseGetNmtServiceStatus.getServiceStatus
public final ServiceStatusType getServiceStatus(){ //Initial value for status just in case "true" of "false" is not found ServiceStatusType serviceStatus = ServiceStatusType.UNKNOWN; if ("true".equals(status)){ serviceStatus = ServiceStatusType.RUNNING; } else if ("false".equals(status)){ s...
java
public final ServiceStatusType getServiceStatus(){ //Initial value for status just in case "true" of "false" is not found ServiceStatusType serviceStatus = ServiceStatusType.UNKNOWN; if ("true".equals(status)){ serviceStatus = ServiceStatusType.RUNNING; } else if ("false".equals(status)){ s...
[ "public", "final", "ServiceStatusType", "getServiceStatus", "(", ")", "{", "//Initial value for status just in case \"true\" of \"false\" is not found", "ServiceStatusType", "serviceStatus", "=", "ServiceStatusType", ".", "UNKNOWN", ";", "if", "(", "\"true\"", ".", "equals", ...
Get the service status. @return serviceStatusType RUNNING, STOPPED or UNKNOWN
[ "Get", "the", "service", "status", "." ]
b2375a59b30fc3bd5dae34316bda68e01d006535
https://github.com/vikingbrain/thedavidbox-client4j/blob/b2375a59b30fc3bd5dae34316bda68e01d006535/src/main/java/com/vikingbrain/nmt/responses/system/ResponseGetNmtServiceStatus.java#L50-L59
149,651
mlhartme/mork
src/main/java/net/oneandone/mork/classfile/InstructionType.java
InstructionType.ofsToIdx
public void ofsToIdx(Code context, int ofs, Object[] argValues) { int i; IntArrayList branchesW; switch (encoding) { case TS: i = ((Integer) argValues[0]).intValue(); argValues[0] = new Integer(context.findIdx(ofs + i)); branchesW = (IntArrayList) arg...
java
public void ofsToIdx(Code context, int ofs, Object[] argValues) { int i; IntArrayList branchesW; switch (encoding) { case TS: i = ((Integer) argValues[0]).intValue(); argValues[0] = new Integer(context.findIdx(ofs + i)); branchesW = (IntArrayList) arg...
[ "public", "void", "ofsToIdx", "(", "Code", "context", ",", "int", "ofs", ",", "Object", "[", "]", "argValues", ")", "{", "int", "i", ";", "IntArrayList", "branchesW", ";", "switch", "(", "encoding", ")", "{", "case", "TS", ":", "i", "=", "(", "(", ...
Fixup. Turn ofs into idx.
[ "Fixup", ".", "Turn", "ofs", "into", "idx", "." ]
a069b087750c4133bfeebaf1f599c3bc96762113
https://github.com/mlhartme/mork/blob/a069b087750c4133bfeebaf1f599c3bc96762113/src/main/java/net/oneandone/mork/classfile/InstructionType.java#L238-L268
149,652
mlhartme/mork
src/main/java/net/oneandone/mork/scanner/Pages.java
Pages.fillLast
private boolean fillLast() throws IOException { int count; if (lastFilled == pageSize) { throw new IllegalStateException(); } count = src.read(pages[lastNo], lastFilled, pageSize - lastFilled); if (count <= 0) { if (count == 0) { throw new...
java
private boolean fillLast() throws IOException { int count; if (lastFilled == pageSize) { throw new IllegalStateException(); } count = src.read(pages[lastNo], lastFilled, pageSize - lastFilled); if (count <= 0) { if (count == 0) { throw new...
[ "private", "boolean", "fillLast", "(", ")", "throws", "IOException", "{", "int", "count", ";", "if", "(", "lastFilled", "==", "pageSize", ")", "{", "throw", "new", "IllegalStateException", "(", ")", ";", "}", "count", "=", "src", ".", "read", "(", "pages...
Reads bytes to fill the last page. @return false for eof
[ "Reads", "bytes", "to", "fill", "the", "last", "page", "." ]
a069b087750c4133bfeebaf1f599c3bc96762113
https://github.com/mlhartme/mork/blob/a069b087750c4133bfeebaf1f599c3bc96762113/src/main/java/net/oneandone/mork/scanner/Pages.java#L99-L114
149,653
mlhartme/mork
src/main/java/net/oneandone/mork/scanner/Pages.java
Pages.grow
private void grow() { char[][] newPages; if (lastFilled != pageSize) { throw new IllegalStateException(); } lastNo++; if (lastNo >= pages.length) { newPages = new char[lastNo * 5 / 2][]; System.arraycopy(pages, 0, newPages, 0, lastNo); ...
java
private void grow() { char[][] newPages; if (lastFilled != pageSize) { throw new IllegalStateException(); } lastNo++; if (lastNo >= pages.length) { newPages = new char[lastNo * 5 / 2][]; System.arraycopy(pages, 0, newPages, 0, lastNo); ...
[ "private", "void", "grow", "(", ")", "{", "char", "[", "]", "[", "]", "newPages", ";", "if", "(", "lastFilled", "!=", "pageSize", ")", "{", "throw", "new", "IllegalStateException", "(", ")", ";", "}", "lastNo", "++", ";", "if", "(", "lastNo", ">=", ...
Adds a page at the end
[ "Adds", "a", "page", "at", "the", "end" ]
a069b087750c4133bfeebaf1f599c3bc96762113
https://github.com/mlhartme/mork/blob/a069b087750c4133bfeebaf1f599c3bc96762113/src/main/java/net/oneandone/mork/scanner/Pages.java#L117-L133
149,654
mlhartme/mork
src/main/java/net/oneandone/mork/scanner/Pages.java
Pages.shrink
public void shrink(int count) { char[] keepAllocated; if (count == 0) { throw new IllegalArgumentException(); } if (count > lastNo) { throw new IllegalArgumentException(count + " vs " + lastNo); } lastNo -= count; keepAllocated = pages[0];...
java
public void shrink(int count) { char[] keepAllocated; if (count == 0) { throw new IllegalArgumentException(); } if (count > lastNo) { throw new IllegalArgumentException(count + " vs " + lastNo); } lastNo -= count; keepAllocated = pages[0];...
[ "public", "void", "shrink", "(", "int", "count", ")", "{", "char", "[", "]", "keepAllocated", ";", "if", "(", "count", "==", "0", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "if", "(", "count", ">", "lastNo", ")", "{", ...
Remove count pages from the beginning
[ "Remove", "count", "pages", "from", "the", "beginning" ]
a069b087750c4133bfeebaf1f599c3bc96762113
https://github.com/mlhartme/mork/blob/a069b087750c4133bfeebaf1f599c3bc96762113/src/main/java/net/oneandone/mork/scanner/Pages.java#L136-L152
149,655
mlhartme/mork
src/main/java/net/oneandone/mork/scanner/FABuilder.java
FABuilder.run
public static FABuilder run(Rule[] rules, IntBitSet terminals, StringArrayList symbolTable, PrintWriter verbose) throws ActionException { FA alt; int i; Expander expander; FABuilder builder; Label label; RegExpr expanded; Minimizer minimizer; ...
java
public static FABuilder run(Rule[] rules, IntBitSet terminals, StringArrayList symbolTable, PrintWriter verbose) throws ActionException { FA alt; int i; Expander expander; FABuilder builder; Label label; RegExpr expanded; Minimizer minimizer; ...
[ "public", "static", "FABuilder", "run", "(", "Rule", "[", "]", "rules", ",", "IntBitSet", "terminals", ",", "StringArrayList", "symbolTable", ",", "PrintWriter", "verbose", ")", "throws", "ActionException", "{", "FA", "alt", ";", "int", "i", ";", "Expander", ...
Translates only those rules where the left-hand.side is contained in the specified terminals set. The remaining rules are used for inlining.
[ "Translates", "only", "those", "rules", "where", "the", "left", "-", "hand", ".", "side", "is", "contained", "in", "the", "specified", "terminals", "set", ".", "The", "remaining", "rules", "are", "used", "for", "inlining", "." ]
a069b087750c4133bfeebaf1f599c3bc96762113
https://github.com/mlhartme/mork/blob/a069b087750c4133bfeebaf1f599c3bc96762113/src/main/java/net/oneandone/mork/scanner/FABuilder.java#L35-L82
149,656
Waikato/jclasslocator
src/main/java/nz/ac/waikato/cms/locator/ClassCache.java
ClassCache.getLogger
public synchronized Logger getLogger() { if (m_Logger == null) { m_Logger = Logger.getLogger(getClass().getName()); m_Logger.setLevel(LoggingHelper.getLevel(getClass())); } return m_Logger; }
java
public synchronized Logger getLogger() { if (m_Logger == null) { m_Logger = Logger.getLogger(getClass().getName()); m_Logger.setLevel(LoggingHelper.getLevel(getClass())); } return m_Logger; }
[ "public", "synchronized", "Logger", "getLogger", "(", ")", "{", "if", "(", "m_Logger", "==", "null", ")", "{", "m_Logger", "=", "Logger", ".", "getLogger", "(", "getClass", "(", ")", ".", "getName", "(", ")", ")", ";", "m_Logger", ".", "setLevel", "(",...
Returns the logger in use. @return the logger
[ "Returns", "the", "logger", "in", "use", "." ]
c899072fff607a56ee7f8c2d01fbeb15157ad144
https://github.com/Waikato/jclasslocator/blob/c899072fff607a56ee7f8c2d01fbeb15157ad144/src/main/java/nz/ac/waikato/cms/locator/ClassCache.java#L152-L158
149,657
Waikato/jclasslocator
src/main/java/nz/ac/waikato/cms/locator/ClassCache.java
ClassCache.remove
public boolean remove(String classname) { String pkgname; HashSet<String> names; classname = ClassPathTraversal.cleanUp(classname); pkgname = ClassPathTraversal.extractPackage(classname); names = m_NameCache.get(pkgname); if (names != null) return names.remove(classname); else ...
java
public boolean remove(String classname) { String pkgname; HashSet<String> names; classname = ClassPathTraversal.cleanUp(classname); pkgname = ClassPathTraversal.extractPackage(classname); names = m_NameCache.get(pkgname); if (names != null) return names.remove(classname); else ...
[ "public", "boolean", "remove", "(", "String", "classname", ")", "{", "String", "pkgname", ";", "HashSet", "<", "String", ">", "names", ";", "classname", "=", "ClassPathTraversal", ".", "cleanUp", "(", "classname", ")", ";", "pkgname", "=", "ClassPathTraversal"...
Removes the classname from the cache. @param classname the classname to remove @return true if the removal changed the cache
[ "Removes", "the", "classname", "from", "the", "cache", "." ]
c899072fff607a56ee7f8c2d01fbeb15157ad144
https://github.com/Waikato/jclasslocator/blob/c899072fff607a56ee7f8c2d01fbeb15157ad144/src/main/java/nz/ac/waikato/cms/locator/ClassCache.java#L166-L177
149,658
Waikato/jclasslocator
src/main/java/nz/ac/waikato/cms/locator/ClassCache.java
ClassCache.getClassnames
public HashSet<String> getClassnames(String pkgname) { if (m_NameCache.containsKey(pkgname)) return m_NameCache.get(pkgname); else return new HashSet<>(); }
java
public HashSet<String> getClassnames(String pkgname) { if (m_NameCache.containsKey(pkgname)) return m_NameCache.get(pkgname); else return new HashSet<>(); }
[ "public", "HashSet", "<", "String", ">", "getClassnames", "(", "String", "pkgname", ")", "{", "if", "(", "m_NameCache", ".", "containsKey", "(", "pkgname", ")", ")", "return", "m_NameCache", ".", "get", "(", "pkgname", ")", ";", "else", "return", "new", ...
Returns all the classes for the given package. @param pkgname the package to get the classes for @return the classes (sorted by name)
[ "Returns", "all", "the", "classes", "for", "the", "given", "package", "." ]
c899072fff607a56ee7f8c2d01fbeb15157ad144
https://github.com/Waikato/jclasslocator/blob/c899072fff607a56ee7f8c2d01fbeb15157ad144/src/main/java/nz/ac/waikato/cms/locator/ClassCache.java#L194-L199
149,659
Waikato/jclasslocator
src/main/java/nz/ac/waikato/cms/locator/ClassCache.java
ClassCache.initialize
protected void initialize(ClassTraversal traversal) { Listener listener; listener = new Listener(); traversal.traverse(listener); m_NameCache = listener.getNameCache(); }
java
protected void initialize(ClassTraversal traversal) { Listener listener; listener = new Listener(); traversal.traverse(listener); m_NameCache = listener.getNameCache(); }
[ "protected", "void", "initialize", "(", "ClassTraversal", "traversal", ")", "{", "Listener", "listener", ";", "listener", "=", "new", "Listener", "(", ")", ";", "traversal", ".", "traverse", "(", "listener", ")", ";", "m_NameCache", "=", "listener", ".", "ge...
Initializes the cache.
[ "Initializes", "the", "cache", "." ]
c899072fff607a56ee7f8c2d01fbeb15157ad144
https://github.com/Waikato/jclasslocator/blob/c899072fff607a56ee7f8c2d01fbeb15157ad144/src/main/java/nz/ac/waikato/cms/locator/ClassCache.java#L204-L211
149,660
thiagohp/tapestry-url-rewriter
src/main/java/org/apache/tapestry5/services/UrlRewriterModule.java
UrlRewriterModule.contributeRequestHandler
public void contributeRequestHandler( OrderedConfiguration<RequestFilter> configuration, URLRewriter urlRewriter) { // we just need the URLRewriterRequestFilter if we have URL rewriter // rules, of course. if (urlRewriter.hasRequestRules()) { URLRewriterRequestFilter urlRewriterRequestFilter = new URLR...
java
public void contributeRequestHandler( OrderedConfiguration<RequestFilter> configuration, URLRewriter urlRewriter) { // we just need the URLRewriterRequestFilter if we have URL rewriter // rules, of course. if (urlRewriter.hasRequestRules()) { URLRewriterRequestFilter urlRewriterRequestFilter = new URLR...
[ "public", "void", "contributeRequestHandler", "(", "OrderedConfiguration", "<", "RequestFilter", ">", "configuration", ",", "URLRewriter", "urlRewriter", ")", "{", "// we just need the URLRewriterRequestFilter if we have URL rewriter", "// rules, of course.", "if", "(", "urlRewri...
Contributes the URL rewriter request filter if there are URL rewriter rules. @param configuration an {@link OrderedConfiguration}. @param urlRewriter an {@link URLRewriter}.
[ "Contributes", "the", "URL", "rewriter", "request", "filter", "if", "there", "are", "URL", "rewriter", "rules", "." ]
adec4fe43eb36e75c6ba199abdf7d23db66479ed
https://github.com/thiagohp/tapestry-url-rewriter/blob/adec4fe43eb36e75c6ba199abdf7d23db66479ed/src/main/java/org/apache/tapestry5/services/UrlRewriterModule.java#L36-L50
149,661
bwkimmel/jdcp
jdcp-server-app/src/main/java/ca/eandb/jdcp/server/JobServerMain.java
JobServerMain.main
public static void main(String[] args) throws IOException { Properties props = new Properties(System.getProperties()); props.load(JobServerMain.class.getResourceAsStream("system.properties")); System.setProperties(props); javax.swing.SwingUtilities.invokeLater(new Runnable() { public void run() { ...
java
public static void main(String[] args) throws IOException { Properties props = new Properties(System.getProperties()); props.load(JobServerMain.class.getResourceAsStream("system.properties")); System.setProperties(props); javax.swing.SwingUtilities.invokeLater(new Runnable() { public void run() { ...
[ "public", "static", "void", "main", "(", "String", "[", "]", "args", ")", "throws", "IOException", "{", "Properties", "props", "=", "new", "Properties", "(", "System", ".", "getProperties", "(", ")", ")", ";", "props", ".", "load", "(", "JobServerMain", ...
Runs the JDCP server application. @param args Command line arguments. @throws IOException if an I/O error occurs while running the application
[ "Runs", "the", "JDCP", "server", "application", "." ]
630c5150c245054e2556ff370f4bad2ec793dfb7
https://github.com/bwkimmel/jdcp/blob/630c5150c245054e2556ff370f4bad2ec793dfb7/jdcp-server-app/src/main/java/ca/eandb/jdcp/server/JobServerMain.java#L62-L71
149,662
bwkimmel/jdcp
jdcp-server-app/src/main/java/ca/eandb/jdcp/server/JobServerMain.java
JobServerMain.startServer
private static void startServer() { try { JdcpUtil.initialize(); Class.forName("org.apache.derby.jdbc.EmbeddedDriver"); EmbeddedDataSource ds = new EmbeddedDataSource(); ds.setConnectionAttributes("create=true"); ds.setDatabaseName("classes"); System.err.print("Initializing p...
java
private static void startServer() { try { JdcpUtil.initialize(); Class.forName("org.apache.derby.jdbc.EmbeddedDriver"); EmbeddedDataSource ds = new EmbeddedDataSource(); ds.setConnectionAttributes("create=true"); ds.setDatabaseName("classes"); System.err.print("Initializing p...
[ "private", "static", "void", "startServer", "(", ")", "{", "try", "{", "JdcpUtil", ".", "initialize", "(", ")", ";", "Class", ".", "forName", "(", "\"org.apache.derby.jdbc.EmbeddedDriver\"", ")", ";", "EmbeddedDataSource", "ds", "=", "new", "EmbeddedDataSource", ...
Starts the JDCP server.
[ "Starts", "the", "JDCP", "server", "." ]
630c5150c245054e2556ff370f4bad2ec793dfb7
https://github.com/bwkimmel/jdcp/blob/630c5150c245054e2556ff370f4bad2ec793dfb7/jdcp-server-app/src/main/java/ca/eandb/jdcp/server/JobServerMain.java#L76-L153
149,663
eurekaclinical/javautil
src/main/java/org/arp/javautil/stat/UpdatingVarCalc.java
UpdatingVarCalc.addValue
public void addValue(double val) { numItems++; double valMinusMean = val - mean; sumsq += valMinusMean * valMinusMean * (numItems - 1) / numItems; mean += valMinusMean / numItems; }
java
public void addValue(double val) { numItems++; double valMinusMean = val - mean; sumsq += valMinusMean * valMinusMean * (numItems - 1) / numItems; mean += valMinusMean / numItems; }
[ "public", "void", "addValue", "(", "double", "val", ")", "{", "numItems", "++", ";", "double", "valMinusMean", "=", "val", "-", "mean", ";", "sumsq", "+=", "valMinusMean", "*", "valMinusMean", "*", "(", "numItems", "-", "1", ")", "/", "numItems", ";", ...
Update the variance with a new value. @param val a new value.
[ "Update", "the", "variance", "with", "a", "new", "value", "." ]
779bbc5bf096c75f8eed4f99ca45b99c1d44df43
https://github.com/eurekaclinical/javautil/blob/779bbc5bf096c75f8eed4f99ca45b99c1d44df43/src/main/java/org/arp/javautil/stat/UpdatingVarCalc.java#L53-L58
149,664
vikingbrain/thedavidbox-client4j
src/main/java/com/vikingbrain/nmt/operations/TheDavidboxOperationFactory.java
TheDavidboxOperationFactory.execute
protected <T extends DavidBoxResponse> T execute(DavidBoxOperation operation, Class<T> responseTargetClass) throws TheDavidBoxClientException{ //Build the additional http arguments for the operation if there is additioanl http parameters LinkedHashMap<String, String> operationArguments = operation.buildHttpArgume...
java
protected <T extends DavidBoxResponse> T execute(DavidBoxOperation operation, Class<T> responseTargetClass) throws TheDavidBoxClientException{ //Build the additional http arguments for the operation if there is additioanl http parameters LinkedHashMap<String, String> operationArguments = operation.buildHttpArgume...
[ "protected", "<", "T", "extends", "DavidBoxResponse", ">", "T", "execute", "(", "DavidBoxOperation", "operation", ",", "Class", "<", "T", ">", "responseTargetClass", ")", "throws", "TheDavidBoxClientException", "{", "//Build the additional http arguments for the operation i...
It executes a davidbox operation. Builds the http get request, sends, receive and fit the response in the response target object @param operation the davidbox operation @param responseTargetClass the response target class @return the response object with the result of the operation @throws TheDavidBoxClientException ex...
[ "It", "executes", "a", "davidbox", "operation", ".", "Builds", "the", "http", "get", "request", "sends", "receive", "and", "fit", "the", "response", "in", "the", "response", "target", "object" ]
b2375a59b30fc3bd5dae34316bda68e01d006535
https://github.com/vikingbrain/thedavidbox-client4j/blob/b2375a59b30fc3bd5dae34316bda68e01d006535/src/main/java/com/vikingbrain/nmt/operations/TheDavidboxOperationFactory.java#L92-L101
149,665
vikingbrain/thedavidbox-client4j
src/main/java/com/vikingbrain/nmt/operations/TheDavidboxOperationFactory.java
TheDavidboxOperationFactory.sendAndParse
private <T extends DavidBoxResponse> T sendAndParse(String urlGet, Class<T> responseTargetClass) throws TheDavidBoxClientException{ logger.debug("urlGet: " + urlGet); //Notify the listener about the request notifyRequest(urlGet); // Call the davidbox service to get the xml response String xmlR...
java
private <T extends DavidBoxResponse> T sendAndParse(String urlGet, Class<T> responseTargetClass) throws TheDavidBoxClientException{ logger.debug("urlGet: " + urlGet); //Notify the listener about the request notifyRequest(urlGet); // Call the davidbox service to get the xml response String xmlR...
[ "private", "<", "T", "extends", "DavidBoxResponse", ">", "T", "sendAndParse", "(", "String", "urlGet", ",", "Class", "<", "T", ">", "responseTargetClass", ")", "throws", "TheDavidBoxClientException", "{", "logger", ".", "debug", "(", "\"urlGet: \"", "+", "urlGet...
It sends the url get to the service and parse the response in the desired response target class. @param urlGet the url to send to the service @param responseTargetClass the response target class @return the response object filled with the xml result @throws TheDavidBoxClientException exception in the client
[ "It", "sends", "the", "url", "get", "to", "the", "service", "and", "parse", "the", "response", "in", "the", "desired", "response", "target", "class", "." ]
b2375a59b30fc3bd5dae34316bda68e01d006535
https://github.com/vikingbrain/thedavidbox-client4j/blob/b2375a59b30fc3bd5dae34316bda68e01d006535/src/main/java/com/vikingbrain/nmt/operations/TheDavidboxOperationFactory.java#L110-L137
149,666
Metrink/croquet
croquet-core/src/main/java/com/metrink/croquet/CroquetRest.java
CroquetRest.getPUNameProvider
protected Provider<String> getPUNameProvider() { final String puName = settings.getDatabaseSettings().getPersistenceUnit(); return Providers.<String>of(puName == null ? "croquet" : puName); }
java
protected Provider<String> getPUNameProvider() { final String puName = settings.getDatabaseSettings().getPersistenceUnit(); return Providers.<String>of(puName == null ? "croquet" : puName); }
[ "protected", "Provider", "<", "String", ">", "getPUNameProvider", "(", ")", "{", "final", "String", "puName", "=", "settings", ".", "getDatabaseSettings", "(", ")", ".", "getPersistenceUnit", "(", ")", ";", "return", "Providers", ".", "<", "String", ">", "of...
Provides the name of the persistence unit. @return the name of the persistence unit.
[ "Provides", "the", "name", "of", "the", "persistence", "unit", "." ]
1b0ed1327a104cf1f809ce4c3c5bf30a3d95384b
https://github.com/Metrink/croquet/blob/1b0ed1327a104cf1f809ce4c3c5bf30a3d95384b/croquet-core/src/main/java/com/metrink/croquet/CroquetRest.java#L144-L148
149,667
Metrink/croquet
croquet-core/src/main/java/com/metrink/croquet/CroquetRest.java
CroquetRest.createAndStartModules
protected List<ManagedModule> createAndStartModules() { final List<ManagedModule> managedModuleInstances = new ArrayList<>(); // create and start each managed module for(final Class<? extends ManagedModule> module:managedModules) { final ManagedModule mm = injector.getInstance(modul...
java
protected List<ManagedModule> createAndStartModules() { final List<ManagedModule> managedModuleInstances = new ArrayList<>(); // create and start each managed module for(final Class<? extends ManagedModule> module:managedModules) { final ManagedModule mm = injector.getInstance(modul...
[ "protected", "List", "<", "ManagedModule", ">", "createAndStartModules", "(", ")", "{", "final", "List", "<", "ManagedModule", ">", "managedModuleInstances", "=", "new", "ArrayList", "<>", "(", ")", ";", "// create and start each managed module", "for", "(", "final"...
Creates and starts all the managed modules. @return a list of the managed module instances.
[ "Creates", "and", "starts", "all", "the", "managed", "modules", "." ]
1b0ed1327a104cf1f809ce4c3c5bf30a3d95384b
https://github.com/Metrink/croquet/blob/1b0ed1327a104cf1f809ce4c3c5bf30a3d95384b/croquet-core/src/main/java/com/metrink/croquet/CroquetRest.java#L170-L181
149,668
Metrink/croquet
croquet-core/src/main/java/com/metrink/croquet/CroquetRest.java
CroquetRest.run
@SuppressFBWarnings("DM_EXIT") public void run() { status = CroquetStatus.STARTING; // create the injector createInjector(); // configure the Jetty server jettyServer = configureJetty(settings.getPort()); // add a life-cycle listener to remove drop the PID ...
java
@SuppressFBWarnings("DM_EXIT") public void run() { status = CroquetStatus.STARTING; // create the injector createInjector(); // configure the Jetty server jettyServer = configureJetty(settings.getPort()); // add a life-cycle listener to remove drop the PID ...
[ "@", "SuppressFBWarnings", "(", "\"DM_EXIT\"", ")", "public", "void", "run", "(", ")", "{", "status", "=", "CroquetStatus", ".", "STARTING", ";", "// create the injector", "createInjector", "(", ")", ";", "// configure the Jetty server", "jettyServer", "=", "configu...
Starts the Croquet framework.
[ "Starts", "the", "Croquet", "framework", "." ]
1b0ed1327a104cf1f809ce4c3c5bf30a3d95384b
https://github.com/Metrink/croquet/blob/1b0ed1327a104cf1f809ce4c3c5bf30a3d95384b/croquet-core/src/main/java/com/metrink/croquet/CroquetRest.java#L211-L287
149,669
seedstack/audit-addon
specs/src/main/java/org/seedstack/audit/AuditEvent.java
AuditEvent.getFormattedDate
public String getFormattedDate(String format) { SimpleDateFormat dateFormat = new SimpleDateFormat(format); return dateFormat.format(date); }
java
public String getFormattedDate(String format) { SimpleDateFormat dateFormat = new SimpleDateFormat(format); return dateFormat.format(date); }
[ "public", "String", "getFormattedDate", "(", "String", "format", ")", "{", "SimpleDateFormat", "dateFormat", "=", "new", "SimpleDateFormat", "(", "format", ")", ";", "return", "dateFormat", ".", "format", "(", "date", ")", ";", "}" ]
Formats the date of the event with the given format @param format the format @return the formatted date
[ "Formats", "the", "date", "of", "the", "event", "with", "the", "given", "format" ]
a2a91da236727eecd9fcc3df328ae2081cfe115b
https://github.com/seedstack/audit-addon/blob/a2a91da236727eecd9fcc3df328ae2081cfe115b/specs/src/main/java/org/seedstack/audit/AuditEvent.java#L56-L59
149,670
agmip/dome
src/main/java/org/agmip/dome/Command.java
Command.getPathOr
public static String getPathOr(String var, String def) { String path = AcePathfinder.INSTANCE.getPath(var); if (path == null) { path = def; } return path; }
java
public static String getPathOr(String var, String def) { String path = AcePathfinder.INSTANCE.getPath(var); if (path == null) { path = def; } return path; }
[ "public", "static", "String", "getPathOr", "(", "String", "var", ",", "String", "def", ")", "{", "String", "path", "=", "AcePathfinder", ".", "INSTANCE", ".", "getPath", "(", "var", ")", ";", "if", "(", "path", "==", "null", ")", "{", "path", "=", "d...
Get a valid path from the pathfiner, or if not found, a user-specified path.
[ "Get", "a", "valid", "path", "from", "the", "pathfiner", "or", "if", "not", "found", "a", "user", "-", "specified", "path", "." ]
ca7c15bf2bae09bb7e8d51160e77592bbda9343d
https://github.com/agmip/dome/blob/ca7c15bf2bae09bb7e8d51160e77592bbda9343d/src/main/java/org/agmip/dome/Command.java#L115-L121
149,671
leadware/jpersistence-tools
jpersistence-tools-api/src/main/java/net/leadware/persistence/tools/api/utils/OrderContainer.java
OrderContainer.add
public OrderContainer add(String property, OrderType orderType) { // Si la ppt est nulle if(property == null || property.trim().length() == 0) return this; // Si le Type d'ordre est null if(orderType == null) return this; // Ajout orders.put(property.trim(), orderType); // On retour...
java
public OrderContainer add(String property, OrderType orderType) { // Si la ppt est nulle if(property == null || property.trim().length() == 0) return this; // Si le Type d'ordre est null if(orderType == null) return this; // Ajout orders.put(property.trim(), orderType); // On retour...
[ "public", "OrderContainer", "add", "(", "String", "property", ",", "OrderType", "orderType", ")", "{", "// Si la ppt est nulle\r", "if", "(", "property", "==", "null", "||", "property", ".", "trim", "(", ")", ".", "length", "(", ")", "==", "0", ")", "retur...
Methode d'ajout d'un ordre de tri @param property Propriete a ordonner @param orderType Type d'ordre @return Conteneur d'ordre de tri
[ "Methode", "d", "ajout", "d", "un", "ordre", "de", "tri" ]
4c15372993584579d7dbb9b23dd4c0c0fdc9e789
https://github.com/leadware/jpersistence-tools/blob/4c15372993584579d7dbb9b23dd4c0c0fdc9e789/jpersistence-tools-api/src/main/java/net/leadware/persistence/tools/api/utils/OrderContainer.java#L62-L75
149,672
Waikato/jclasslocator
src/main/java/nz/ac/waikato/cms/locator/ClassPathTraversal.java
ClassPathTraversal.traverse
public void traverse(String classname, TraversalState state) { classname = cleanUp(classname); state.getListener().traversing(classname, state.getURL()); }
java
public void traverse(String classname, TraversalState state) { classname = cleanUp(classname); state.getListener().traversing(classname, state.getURL()); }
[ "public", "void", "traverse", "(", "String", "classname", ",", "TraversalState", "state", ")", "{", "classname", "=", "cleanUp", "(", "classname", ")", ";", "state", ".", "getListener", "(", ")", ".", "traversing", "(", "classname", ",", "state", ".", "get...
Traverses the class, calls the listener available through the state. @param classname the classname, automatically removes ".class" and turns "/" or "\" into "." @param state the traversal state
[ "Traverses", "the", "class", "calls", "the", "listener", "available", "through", "the", "state", "." ]
c899072fff607a56ee7f8c2d01fbeb15157ad144
https://github.com/Waikato/jclasslocator/blob/c899072fff607a56ee7f8c2d01fbeb15157ad144/src/main/java/nz/ac/waikato/cms/locator/ClassPathTraversal.java#L148-L151
149,673
Waikato/jclasslocator
src/main/java/nz/ac/waikato/cms/locator/ClassPathTraversal.java
ClassPathTraversal.traverseManifest
protected void traverseManifest(Manifest manifest, TraversalState state) { Attributes atts; String cp; String[] parts; if (manifest == null) return; atts = manifest.getMainAttributes(); cp = atts.getValue("Class-Path"); if (cp == null) return; parts = cp.split(" "); ...
java
protected void traverseManifest(Manifest manifest, TraversalState state) { Attributes atts; String cp; String[] parts; if (manifest == null) return; atts = manifest.getMainAttributes(); cp = atts.getValue("Class-Path"); if (cp == null) return; parts = cp.split(" "); ...
[ "protected", "void", "traverseManifest", "(", "Manifest", "manifest", ",", "TraversalState", "state", ")", "{", "Attributes", "atts", ";", "String", "cp", ";", "String", "[", "]", "parts", ";", "if", "(", "manifest", "==", "null", ")", "return", ";", "atts...
Analyzes the MANIFEST.MF file of a jar whether additional jars are listed in the "Class-Path" key. @param manifest the manifest to analyze @param state the traversal state
[ "Analyzes", "the", "MANIFEST", ".", "MF", "file", "of", "a", "jar", "whether", "additional", "jars", "are", "listed", "in", "the", "Class", "-", "Path", "key", "." ]
c899072fff607a56ee7f8c2d01fbeb15157ad144
https://github.com/Waikato/jclasslocator/blob/c899072fff607a56ee7f8c2d01fbeb15157ad144/src/main/java/nz/ac/waikato/cms/locator/ClassPathTraversal.java#L205-L225
149,674
Waikato/jclasslocator
src/main/java/nz/ac/waikato/cms/locator/ClassPathTraversal.java
ClassPathTraversal.traverseJar
protected void traverseJar(File file, TraversalState state) { JarFile jar; JarEntry entry; Enumeration enm; if (isLoggingEnabled()) getLogger().log(Level.INFO, "Analyzing jar: " + file); if (!file.exists()) { getLogger().log(Level.WARNING, "Jar does not exist: " + file); retur...
java
protected void traverseJar(File file, TraversalState state) { JarFile jar; JarEntry entry; Enumeration enm; if (isLoggingEnabled()) getLogger().log(Level.INFO, "Analyzing jar: " + file); if (!file.exists()) { getLogger().log(Level.WARNING, "Jar does not exist: " + file); retur...
[ "protected", "void", "traverseJar", "(", "File", "file", ",", "TraversalState", "state", ")", "{", "JarFile", "jar", ";", "JarEntry", "entry", ";", "Enumeration", "enm", ";", "if", "(", "isLoggingEnabled", "(", ")", ")", "getLogger", "(", ")", ".", "log", ...
Fills the class cache with classes from the specified jar. @param file the jar to inspect @param state the traversal state
[ "Fills", "the", "class", "cache", "with", "classes", "from", "the", "specified", "jar", "." ]
c899072fff607a56ee7f8c2d01fbeb15157ad144
https://github.com/Waikato/jclasslocator/blob/c899072fff607a56ee7f8c2d01fbeb15157ad144/src/main/java/nz/ac/waikato/cms/locator/ClassPathTraversal.java#L233-L259
149,675
Waikato/jclasslocator
src/main/java/nz/ac/waikato/cms/locator/ClassPathTraversal.java
ClassPathTraversal.traverseClasspathPart
protected void traverseClasspathPart(String part, TraversalState state) { File file; file = null; if (part.startsWith("file:")) { part = part.replace(" ", "%20"); try { file = new File(new java.net.URI(part)); } catch (URISyntaxException e) { getLogger().log(Level.SEVERE, "Failed...
java
protected void traverseClasspathPart(String part, TraversalState state) { File file; file = null; if (part.startsWith("file:")) { part = part.replace(" ", "%20"); try { file = new File(new java.net.URI(part)); } catch (URISyntaxException e) { getLogger().log(Level.SEVERE, "Failed...
[ "protected", "void", "traverseClasspathPart", "(", "String", "part", ",", "TraversalState", "state", ")", "{", "File", "file", ";", "file", "=", "null", ";", "if", "(", "part", ".", "startsWith", "(", "\"file:\"", ")", ")", "{", "part", "=", "part", ".",...
Analyzes a part of the classpath. @param part the part to analyze @param state the traversal state
[ "Analyzes", "a", "part", "of", "the", "classpath", "." ]
c899072fff607a56ee7f8c2d01fbeb15157ad144
https://github.com/Waikato/jclasslocator/blob/c899072fff607a56ee7f8c2d01fbeb15157ad144/src/main/java/nz/ac/waikato/cms/locator/ClassPathTraversal.java#L267-L294
149,676
eurekaclinical/javautil
src/main/java/org/arp/javautil/arrays/Arrays.java
Arrays.contains
public static boolean contains(Object[] arr, Object obj) { if (arr != null) { for (int i = 0; i < arr.length; i++) { Object arri = arr[i]; if (arri == obj || (arri != null && arri.equals(obj))) { return true; } } ...
java
public static boolean contains(Object[] arr, Object obj) { if (arr != null) { for (int i = 0; i < arr.length; i++) { Object arri = arr[i]; if (arri == obj || (arri != null && arri.equals(obj))) { return true; } } ...
[ "public", "static", "boolean", "contains", "(", "Object", "[", "]", "arr", ",", "Object", "obj", ")", "{", "if", "(", "arr", "!=", "null", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "arr", ".", "length", ";", "i", "++", ")", "...
Returns where an object is in a given array. @param arr the <code>Object[]</code> to search. @param obj the <code>Object</code> to search for. @return <code>true</code> of <code>obj</code> is in <code>arr</code>, <code>false</code> otherwise. Returns <code>false</code> if <code>arr</code> is <code>null</code>.
[ "Returns", "where", "an", "object", "is", "in", "a", "given", "array", "." ]
779bbc5bf096c75f8eed4f99ca45b99c1d44df43
https://github.com/eurekaclinical/javautil/blob/779bbc5bf096c75f8eed4f99ca45b99c1d44df43/src/main/java/org/arp/javautil/arrays/Arrays.java#L85-L95
149,677
eurekaclinical/javautil
src/main/java/org/arp/javautil/arrays/Arrays.java
Arrays.addAll
@SafeVarargs public static <E> void addAll(Collection<E> collection, E[]... arr) { if (collection == null) { throw new IllegalArgumentException("collection cannot be null"); } for (E[] oarr : arr) { for (E o : oarr) { collection.add(o); } ...
java
@SafeVarargs public static <E> void addAll(Collection<E> collection, E[]... arr) { if (collection == null) { throw new IllegalArgumentException("collection cannot be null"); } for (E[] oarr : arr) { for (E o : oarr) { collection.add(o); } ...
[ "@", "SafeVarargs", "public", "static", "<", "E", ">", "void", "addAll", "(", "Collection", "<", "E", ">", "collection", ",", "E", "[", "]", "...", "arr", ")", "{", "if", "(", "collection", "==", "null", ")", "{", "throw", "new", "IllegalArgumentExcept...
Adds the contents of one or more arrays to a collection. @param collection a {@link Collection}. Cannot be <code>null</code>. @param arr zero or more <code>E[]</code>.
[ "Adds", "the", "contents", "of", "one", "or", "more", "arrays", "to", "a", "collection", "." ]
779bbc5bf096c75f8eed4f99ca45b99c1d44df43
https://github.com/eurekaclinical/javautil/blob/779bbc5bf096c75f8eed4f99ca45b99c1d44df43/src/main/java/org/arp/javautil/arrays/Arrays.java#L121-L131
149,678
eurekaclinical/javautil
src/main/java/org/arp/javautil/arrays/Arrays.java
Arrays.asList
@SafeVarargs public static <E> List<E> asList(E[]... arrs) { int size = 0; for (E[] arr : arrs) { if (arr == null) { throw new IllegalArgumentException("Null arrays not allowed"); } size += arr.length; } List<E> result = new ArrayLi...
java
@SafeVarargs public static <E> List<E> asList(E[]... arrs) { int size = 0; for (E[] arr : arrs) { if (arr == null) { throw new IllegalArgumentException("Null arrays not allowed"); } size += arr.length; } List<E> result = new ArrayLi...
[ "@", "SafeVarargs", "public", "static", "<", "E", ">", "List", "<", "E", ">", "asList", "(", "E", "[", "]", "...", "arrs", ")", "{", "int", "size", "=", "0", ";", "for", "(", "E", "[", "]", "arr", ":", "arrs", ")", "{", "if", "(", "arr", "=...
Returns a newly created random access list with the contents of the provided arrays. @param <E> any class. @param arrs one or more <code>E[]</code>. @return a newly created random access {@link List}.
[ "Returns", "a", "newly", "created", "random", "access", "list", "with", "the", "contents", "of", "the", "provided", "arrays", "." ]
779bbc5bf096c75f8eed4f99ca45b99c1d44df43
https://github.com/eurekaclinical/javautil/blob/779bbc5bf096c75f8eed4f99ca45b99c1d44df43/src/main/java/org/arp/javautil/arrays/Arrays.java#L141-L153
149,679
bwkimmel/jdcp
jdcp-server/src/main/java/ca/eandb/jdcp/server/classmanager/FileClassManager.java
FileClassManager.moveClass
private void moveClass(File fromDirectory, String name, File toDirectory) { String baseName = getBaseFileName(name); File fromClassFile = new File(fromDirectory, baseName + CLASS_EXTENSION); File toClassFile = new File(toDirectory, baseName + CLASS_EXTENSION); File fromDigestFile = new File(fromDirector...
java
private void moveClass(File fromDirectory, String name, File toDirectory) { String baseName = getBaseFileName(name); File fromClassFile = new File(fromDirectory, baseName + CLASS_EXTENSION); File toClassFile = new File(toDirectory, baseName + CLASS_EXTENSION); File fromDigestFile = new File(fromDirector...
[ "private", "void", "moveClass", "(", "File", "fromDirectory", ",", "String", "name", ",", "File", "toDirectory", ")", "{", "String", "baseName", "=", "getBaseFileName", "(", "name", ")", ";", "File", "fromClassFile", "=", "new", "File", "(", "fromDirectory", ...
Moves a class definition from the specified directory tree to another specified directory tree. @param fromDirectory The root of the directory tree from which to move the class definition. @param name The fully qualified name of the class to move. @param toDirectory The root of the directory tree to move the class defi...
[ "Moves", "a", "class", "definition", "from", "the", "specified", "directory", "tree", "to", "another", "specified", "directory", "tree", "." ]
630c5150c245054e2556ff370f4bad2ec793dfb7
https://github.com/bwkimmel/jdcp/blob/630c5150c245054e2556ff370f4bad2ec793dfb7/jdcp-server/src/main/java/ca/eandb/jdcp/server/classmanager/FileClassManager.java#L202-L213
149,680
bwkimmel/jdcp
jdcp-server/src/main/java/ca/eandb/jdcp/server/classmanager/FileClassManager.java
FileClassManager.classExists
private boolean classExists(File directory, String name) { String baseName = getBaseFileName(name); File classFile = new File(directory, baseName + CLASS_EXTENSION); File digestFile = new File(directory, baseName + DIGEST_EXTENSION); return classFile.isFile() && digestFile.isFile(); }
java
private boolean classExists(File directory, String name) { String baseName = getBaseFileName(name); File classFile = new File(directory, baseName + CLASS_EXTENSION); File digestFile = new File(directory, baseName + DIGEST_EXTENSION); return classFile.isFile() && digestFile.isFile(); }
[ "private", "boolean", "classExists", "(", "File", "directory", ",", "String", "name", ")", "{", "String", "baseName", "=", "getBaseFileName", "(", "name", ")", ";", "File", "classFile", "=", "new", "File", "(", "directory", ",", "baseName", "+", "CLASS_EXTEN...
Determines if the specified class exists in the specified directory tree. @param directory The root of the directory tree to examine. @param name The fully qualified name of the class. @return A value indicating if the class exists in the given directory tree.
[ "Determines", "if", "the", "specified", "class", "exists", "in", "the", "specified", "directory", "tree", "." ]
630c5150c245054e2556ff370f4bad2ec793dfb7
https://github.com/bwkimmel/jdcp/blob/630c5150c245054e2556ff370f4bad2ec793dfb7/jdcp-server/src/main/java/ca/eandb/jdcp/server/classmanager/FileClassManager.java#L223-L229
149,681
bwkimmel/jdcp
jdcp-server/src/main/java/ca/eandb/jdcp/server/classmanager/FileClassManager.java
FileClassManager.getFileContents
private byte[] getFileContents(File file) { if (file.exists()) { try { return FileUtil.getFileContents(file); } catch (IOException e) { e.printStackTrace(); } } return null; }
java
private byte[] getFileContents(File file) { if (file.exists()) { try { return FileUtil.getFileContents(file); } catch (IOException e) { e.printStackTrace(); } } return null; }
[ "private", "byte", "[", "]", "getFileContents", "(", "File", "file", ")", "{", "if", "(", "file", ".", "exists", "(", ")", ")", "{", "try", "{", "return", "FileUtil", ".", "getFileContents", "(", "file", ")", ";", "}", "catch", "(", "IOException", "e...
Gets the contents of the specified file, or null if the file does not exist. @param file The <code>File</code> whose contents to obtain. @return The file contents, or null if the file does not exist.
[ "Gets", "the", "contents", "of", "the", "specified", "file", "or", "null", "if", "the", "file", "does", "not", "exist", "." ]
630c5150c245054e2556ff370f4bad2ec793dfb7
https://github.com/bwkimmel/jdcp/blob/630c5150c245054e2556ff370f4bad2ec793dfb7/jdcp-server/src/main/java/ca/eandb/jdcp/server/classmanager/FileClassManager.java#L237-L246
149,682
bwkimmel/jdcp
jdcp-server/src/main/java/ca/eandb/jdcp/server/classmanager/FileClassManager.java
FileClassManager.getClassDigest
private byte[] getClassDigest(File directory, String name) { String baseName = getBaseFileName(name); File digestFile = new File(directory, baseName + DIGEST_EXTENSION); return getFileContents(digestFile); }
java
private byte[] getClassDigest(File directory, String name) { String baseName = getBaseFileName(name); File digestFile = new File(directory, baseName + DIGEST_EXTENSION); return getFileContents(digestFile); }
[ "private", "byte", "[", "]", "getClassDigest", "(", "File", "directory", ",", "String", "name", ")", "{", "String", "baseName", "=", "getBaseFileName", "(", "name", ")", ";", "File", "digestFile", "=", "new", "File", "(", "directory", ",", "baseName", "+",...
Gets the MD5 digest of a class definition. @param directory The root of the directory tree containing the class. @param name The fully qualified name of the class. @return The MD5 digest of the class definition.
[ "Gets", "the", "MD5", "digest", "of", "a", "class", "definition", "." ]
630c5150c245054e2556ff370f4bad2ec793dfb7
https://github.com/bwkimmel/jdcp/blob/630c5150c245054e2556ff370f4bad2ec793dfb7/jdcp-server/src/main/java/ca/eandb/jdcp/server/classmanager/FileClassManager.java#L254-L258
149,683
bwkimmel/jdcp
jdcp-server/src/main/java/ca/eandb/jdcp/server/classmanager/FileClassManager.java
FileClassManager.getClassDefinition
private ByteBuffer getClassDefinition(File directory, String name) { String baseName = getBaseFileName(name); File digestFile = new File(directory, baseName + CLASS_EXTENSION); return ByteBuffer.wrap(getFileContents(digestFile)); }
java
private ByteBuffer getClassDefinition(File directory, String name) { String baseName = getBaseFileName(name); File digestFile = new File(directory, baseName + CLASS_EXTENSION); return ByteBuffer.wrap(getFileContents(digestFile)); }
[ "private", "ByteBuffer", "getClassDefinition", "(", "File", "directory", ",", "String", "name", ")", "{", "String", "baseName", "=", "getBaseFileName", "(", "name", ")", ";", "File", "digestFile", "=", "new", "File", "(", "directory", ",", "baseName", "+", "...
Gets the definition of a class. @param directory The root of the directory tree containing the class definition. @param name The fully qualified name of the class. @return A <code>ByteBuffer</code> containing the class definition.
[ "Gets", "the", "definition", "of", "a", "class", "." ]
630c5150c245054e2556ff370f4bad2ec793dfb7
https://github.com/bwkimmel/jdcp/blob/630c5150c245054e2556ff370f4bad2ec793dfb7/jdcp-server/src/main/java/ca/eandb/jdcp/server/classmanager/FileClassManager.java#L267-L271
149,684
bwkimmel/jdcp
jdcp-server/src/main/java/ca/eandb/jdcp/server/classmanager/FileClassManager.java
FileClassManager.computeClassDigest
private byte[] computeClassDigest(ByteBuffer def) { try { MessageDigest alg = MessageDigest.getInstance(DIGEST_ALGORITHM); def.mark(); alg.update(def); def.reset(); return alg.digest(); } catch (NoSuchAlgorithmException e) { throw new UnexpectedException(e); } }
java
private byte[] computeClassDigest(ByteBuffer def) { try { MessageDigest alg = MessageDigest.getInstance(DIGEST_ALGORITHM); def.mark(); alg.update(def); def.reset(); return alg.digest(); } catch (NoSuchAlgorithmException e) { throw new UnexpectedException(e); } }
[ "private", "byte", "[", "]", "computeClassDigest", "(", "ByteBuffer", "def", ")", "{", "try", "{", "MessageDigest", "alg", "=", "MessageDigest", ".", "getInstance", "(", "DIGEST_ALGORITHM", ")", ";", "def", ".", "mark", "(", ")", ";", "alg", ".", "update",...
Computes the MD5 digest of the given class definition. @param def A <code>ByteBuffer</code> containing the class definition. @return The MD5 digest of the class definition.
[ "Computes", "the", "MD5", "digest", "of", "the", "given", "class", "definition", "." ]
630c5150c245054e2556ff370f4bad2ec793dfb7
https://github.com/bwkimmel/jdcp/blob/630c5150c245054e2556ff370f4bad2ec793dfb7/jdcp-server/src/main/java/ca/eandb/jdcp/server/classmanager/FileClassManager.java#L278-L288
149,685
eurekaclinical/javautil
src/main/java/org/arp/javautil/sql/DataSourceConnectionSpec.java
DataSourceConnectionSpec.getOrCreate
@Override public Connection getOrCreate() throws SQLException { Connection con; if (this.user == null && this.password == null) { con = this.dataSource.getConnection(); } else { con = this.dataSource.getConnection(this.user, this.password); } con.setAu...
java
@Override public Connection getOrCreate() throws SQLException { Connection con; if (this.user == null && this.password == null) { con = this.dataSource.getConnection(); } else { con = this.dataSource.getConnection(this.user, this.password); } con.setAu...
[ "@", "Override", "public", "Connection", "getOrCreate", "(", ")", "throws", "SQLException", "{", "Connection", "con", ";", "if", "(", "this", ".", "user", "==", "null", "&&", "this", ".", "password", "==", "null", ")", "{", "con", "=", "this", ".", "da...
Creates a database connection or gets an existing connection with the JNDI name, username and password specified in the constructor. @return a {@link Connection}. @throws SQLException if an error occurred creating/getting a {@link Connection}, possibly because the JNDI name, username and/or password are invalid.
[ "Creates", "a", "database", "connection", "or", "gets", "an", "existing", "connection", "with", "the", "JNDI", "name", "username", "and", "password", "specified", "in", "the", "constructor", "." ]
779bbc5bf096c75f8eed4f99ca45b99c1d44df43
https://github.com/eurekaclinical/javautil/blob/779bbc5bf096c75f8eed4f99ca45b99c1d44df43/src/main/java/org/arp/javautil/sql/DataSourceConnectionSpec.java#L126-L136
149,686
bwkimmel/jdcp
jdcp-core/src/main/java/ca/eandb/jdcp/JdcpUtil.java
JdcpUtil.connect
public static JobService connect(String host, String username, String password) throws RemoteException, NotBoundException, LoginException, ProtocolVersionException { Registry registry = LocateRegistry.getRegistry(host, DEFAULT_PORT); AuthenticationService auth = (AuthenticationService) registry.look...
java
public static JobService connect(String host, String username, String password) throws RemoteException, NotBoundException, LoginException, ProtocolVersionException { Registry registry = LocateRegistry.getRegistry(host, DEFAULT_PORT); AuthenticationService auth = (AuthenticationService) registry.look...
[ "public", "static", "JobService", "connect", "(", "String", "host", ",", "String", "username", ",", "String", "password", ")", "throws", "RemoteException", ",", "NotBoundException", ",", "LoginException", ",", "ProtocolVersionException", "{", "Registry", "registry", ...
Connects to a JDCP server. @param host The host name of the server to send the job to. @param username The user name to use to authenticate with the server. @param password The password to use to authenticate with the server. @return The <code>JobService</code> to use to communicate with the server. @throws RemoteExcep...
[ "Connects", "to", "a", "JDCP", "server", "." ]
630c5150c245054e2556ff370f4bad2ec793dfb7
https://github.com/bwkimmel/jdcp/blob/630c5150c245054e2556ff370f4bad2ec793dfb7/jdcp-core/src/main/java/ca/eandb/jdcp/JdcpUtil.java#L79-L85
149,687
bwkimmel/jdcp
jdcp-core/src/main/java/ca/eandb/jdcp/JdcpUtil.java
JdcpUtil.submitJob
public static UUID submitJob(ParallelizableJob job, String description, String host, String username, String password) throws SecurityException, RemoteException, ClassNotFoundException, JobExecutionException, LoginException, NotBoundException, ProtocolVersionException { Serialized<ParallelizableJ...
java
public static UUID submitJob(ParallelizableJob job, String description, String host, String username, String password) throws SecurityException, RemoteException, ClassNotFoundException, JobExecutionException, LoginException, NotBoundException, ProtocolVersionException { Serialized<ParallelizableJ...
[ "public", "static", "UUID", "submitJob", "(", "ParallelizableJob", "job", ",", "String", "description", ",", "String", "host", ",", "String", "username", ",", "String", "password", ")", "throws", "SecurityException", ",", "RemoteException", ",", "ClassNotFoundExcept...
Submits a job to a server for processing. @param job The <code>ParallelizableJob</code> to be processed. @param description A description of the job. @param host The host name of the server to send the job to. @param username The user name to use to authenticate with the server. @param password The password to use to a...
[ "Submits", "a", "job", "to", "a", "server", "for", "processing", "." ]
630c5150c245054e2556ff370f4bad2ec793dfb7
https://github.com/bwkimmel/jdcp/blob/630c5150c245054e2556ff370f4bad2ec793dfb7/jdcp-core/src/main/java/ca/eandb/jdcp/JdcpUtil.java#L109-L119
149,688
bwkimmel/jdcp
jdcp-core/src/main/java/ca/eandb/jdcp/JdcpUtil.java
JdcpUtil.registerTaskService
public static void registerTaskService(String name, TaskService taskService, String host, String username, String password) throws SecurityException, RemoteException, ClassNotFoundException, JobExecutionException, LoginException, NotBoundException, ProtocolVersionException { JobService service = ...
java
public static void registerTaskService(String name, TaskService taskService, String host, String username, String password) throws SecurityException, RemoteException, ClassNotFoundException, JobExecutionException, LoginException, NotBoundException, ProtocolVersionException { JobService service = ...
[ "public", "static", "void", "registerTaskService", "(", "String", "name", ",", "TaskService", "taskService", ",", "String", "host", ",", "String", "username", ",", "String", "password", ")", "throws", "SecurityException", ",", "RemoteException", ",", "ClassNotFoundE...
Connects to a job server and provides a source of tasks to be processed. @param name The name to assign to the <code>TaskService</code>. This may be used to manage this <code>TaskService</code> in later calls. @param taskService The <code>TaskService</code> to submit. @param host The host name of the server to send th...
[ "Connects", "to", "a", "job", "server", "and", "provides", "a", "source", "of", "tasks", "to", "be", "processed", "." ]
630c5150c245054e2556ff370f4bad2ec793dfb7
https://github.com/bwkimmel/jdcp/blob/630c5150c245054e2556ff370f4bad2ec793dfb7/jdcp-core/src/main/java/ca/eandb/jdcp/JdcpUtil.java#L143-L151
149,689
bwkimmel/jdcp
jdcp-core/src/main/java/ca/eandb/jdcp/JdcpUtil.java
JdcpUtil.initialize
public static void initialize() { String homeDirName = System.getProperty("jdcp.home"); File homeDir; if (homeDirName != null) { homeDir = new File(homeDirName); } else { homeDir = FileUtil.getApplicationDataDirectory("jdcp"); System.setProperty("jdcp.home", homeDir.getPath()); } ...
java
public static void initialize() { String homeDirName = System.getProperty("jdcp.home"); File homeDir; if (homeDirName != null) { homeDir = new File(homeDirName); } else { homeDir = FileUtil.getApplicationDataDirectory("jdcp"); System.setProperty("jdcp.home", homeDir.getPath()); } ...
[ "public", "static", "void", "initialize", "(", ")", "{", "String", "homeDirName", "=", "System", ".", "getProperty", "(", "\"jdcp.home\"", ")", ";", "File", "homeDir", ";", "if", "(", "homeDirName", "!=", "null", ")", "{", "homeDir", "=", "new", "File", ...
Performs initialization for the currently running JDCP application.
[ "Performs", "initialization", "for", "the", "currently", "running", "JDCP", "application", "." ]
630c5150c245054e2556ff370f4bad2ec793dfb7
https://github.com/bwkimmel/jdcp/blob/630c5150c245054e2556ff370f4bad2ec793dfb7/jdcp-core/src/main/java/ca/eandb/jdcp/JdcpUtil.java#L176-L189
149,690
Waikato/jclasslocator
src/main/java/nz/ac/waikato/cms/locator/ClassLocator.java
ClassLocator.findPackages
public List<String> findPackages() { List<String> result; Iterator<String> packages; result = new ArrayList<>(); packages = m_Cache.packages(); while (packages.hasNext()) result.add(packages.next()); Collections.sort(result, new StringCompare()); return result; }
java
public List<String> findPackages() { List<String> result; Iterator<String> packages; result = new ArrayList<>(); packages = m_Cache.packages(); while (packages.hasNext()) result.add(packages.next()); Collections.sort(result, new StringCompare()); return result; }
[ "public", "List", "<", "String", ">", "findPackages", "(", ")", "{", "List", "<", "String", ">", "result", ";", "Iterator", "<", "String", ">", "packages", ";", "result", "=", "new", "ArrayList", "<>", "(", ")", ";", "packages", "=", "m_Cache", ".", ...
Lists all packages it can find in the classpath. @return a list with all the found packages
[ "Lists", "all", "packages", "it", "can", "find", "in", "the", "classpath", "." ]
c899072fff607a56ee7f8c2d01fbeb15157ad144
https://github.com/Waikato/jclasslocator/blob/c899072fff607a56ee7f8c2d01fbeb15157ad144/src/main/java/nz/ac/waikato/cms/locator/ClassLocator.java#L450-L461
149,691
Waikato/jclasslocator
src/main/java/nz/ac/waikato/cms/locator/ClassLocator.java
ClassLocator.initCache
protected void initCache(ClassTraversal traversal) { if (m_CacheNames == null) m_CacheNames = new HashMap<>(); if (m_CacheClasses == null) m_CacheClasses = new HashMap<>(); if (m_BlackListed == null) m_BlackListed = new HashSet<>(); if (m_Cache == null) m_Cache = newClassCache(tr...
java
protected void initCache(ClassTraversal traversal) { if (m_CacheNames == null) m_CacheNames = new HashMap<>(); if (m_CacheClasses == null) m_CacheClasses = new HashMap<>(); if (m_BlackListed == null) m_BlackListed = new HashSet<>(); if (m_Cache == null) m_Cache = newClassCache(tr...
[ "protected", "void", "initCache", "(", "ClassTraversal", "traversal", ")", "{", "if", "(", "m_CacheNames", "==", "null", ")", "m_CacheNames", "=", "new", "HashMap", "<>", "(", ")", ";", "if", "(", "m_CacheClasses", "==", "null", ")", "m_CacheClasses", "=", ...
initializes the cache for the classnames. @param traversal how to traverse the classes, can be null
[ "initializes", "the", "cache", "for", "the", "classnames", "." ]
c899072fff607a56ee7f8c2d01fbeb15157ad144
https://github.com/Waikato/jclasslocator/blob/c899072fff607a56ee7f8c2d01fbeb15157ad144/src/main/java/nz/ac/waikato/cms/locator/ClassLocator.java#L478-L487
149,692
Waikato/jclasslocator
src/main/java/nz/ac/waikato/cms/locator/ClassLocator.java
ClassLocator.addCache
protected void addCache(Class cls, String pkgname, List<String> classnames, List<Class> classes) { m_CacheNames.put(cls.getName() + "-" + pkgname, classnames); m_CacheClasses.put(cls.getName() + "-" + pkgname, classes); }
java
protected void addCache(Class cls, String pkgname, List<String> classnames, List<Class> classes) { m_CacheNames.put(cls.getName() + "-" + pkgname, classnames); m_CacheClasses.put(cls.getName() + "-" + pkgname, classes); }
[ "protected", "void", "addCache", "(", "Class", "cls", ",", "String", "pkgname", ",", "List", "<", "String", ">", "classnames", ",", "List", "<", "Class", ">", "classes", ")", "{", "m_CacheNames", ".", "put", "(", "cls", ".", "getName", "(", ")", "+", ...
adds the list of classnames to the cache. @param cls the class to cache the classnames for @param pkgname the package name the classes were found in @param classnames the list of classnames to cache
[ "adds", "the", "list", "of", "classnames", "to", "the", "cache", "." ]
c899072fff607a56ee7f8c2d01fbeb15157ad144
https://github.com/Waikato/jclasslocator/blob/c899072fff607a56ee7f8c2d01fbeb15157ad144/src/main/java/nz/ac/waikato/cms/locator/ClassLocator.java#L496-L499
149,693
Waikato/jclasslocator
src/main/java/nz/ac/waikato/cms/locator/ClassLocator.java
ClassLocator.getNameCache
protected List<String> getNameCache(Class cls, String pkgname) { return m_CacheNames.get(cls.getName() + "-" + pkgname); }
java
protected List<String> getNameCache(Class cls, String pkgname) { return m_CacheNames.get(cls.getName() + "-" + pkgname); }
[ "protected", "List", "<", "String", ">", "getNameCache", "(", "Class", "cls", ",", "String", "pkgname", ")", "{", "return", "m_CacheNames", ".", "get", "(", "cls", ".", "getName", "(", ")", "+", "\"-\"", "+", "pkgname", ")", ";", "}" ]
returns the list of classnames associated with this class and package, if available, otherwise null. @param cls the class to get the classnames for @param pkgname the package name for the classes @return the classnames if found, otherwise null
[ "returns", "the", "list", "of", "classnames", "associated", "with", "this", "class", "and", "package", "if", "available", "otherwise", "null", "." ]
c899072fff607a56ee7f8c2d01fbeb15157ad144
https://github.com/Waikato/jclasslocator/blob/c899072fff607a56ee7f8c2d01fbeb15157ad144/src/main/java/nz/ac/waikato/cms/locator/ClassLocator.java#L509-L511
149,694
Waikato/jclasslocator
src/main/java/nz/ac/waikato/cms/locator/ClassLocator.java
ClassLocator.getClassCache
protected List<Class> getClassCache(Class cls, String pkgname) { return m_CacheClasses.get(cls.getName() + "-" + pkgname); }
java
protected List<Class> getClassCache(Class cls, String pkgname) { return m_CacheClasses.get(cls.getName() + "-" + pkgname); }
[ "protected", "List", "<", "Class", ">", "getClassCache", "(", "Class", "cls", ",", "String", "pkgname", ")", "{", "return", "m_CacheClasses", ".", "get", "(", "cls", ".", "getName", "(", ")", "+", "\"-\"", "+", "pkgname", ")", ";", "}" ]
returns the list of classes associated with this class and package, if available, otherwise null. @param cls the class to get the classes for @param pkgname the package name for the classes @return the classes if found, otherwise null
[ "returns", "the", "list", "of", "classes", "associated", "with", "this", "class", "and", "package", "if", "available", "otherwise", "null", "." ]
c899072fff607a56ee7f8c2d01fbeb15157ad144
https://github.com/Waikato/jclasslocator/blob/c899072fff607a56ee7f8c2d01fbeb15157ad144/src/main/java/nz/ac/waikato/cms/locator/ClassLocator.java#L521-L523
149,695
mlhartme/mork
src/main/java/net/oneandone/mork/reflect/Function.java
Function.matches
public boolean matches(Class<?>[] args) { int i; Class<?>[] paras; paras = getParameterTypes(); if (args.length != paras.length) { return false; } for (i = 0; i < args.length; i++) { if (!paras[i].isAssignableFrom(args[i])) { retur...
java
public boolean matches(Class<?>[] args) { int i; Class<?>[] paras; paras = getParameterTypes(); if (args.length != paras.length) { return false; } for (i = 0; i < args.length; i++) { if (!paras[i].isAssignableFrom(args[i])) { retur...
[ "public", "boolean", "matches", "(", "Class", "<", "?", ">", "[", "]", "args", ")", "{", "int", "i", ";", "Class", "<", "?", ">", "[", "]", "paras", ";", "paras", "=", "getParameterTypes", "(", ")", ";", "if", "(", "args", ".", "length", "!=", ...
Tests if the functions can be called with arguments of the specified types. @param args arguement types @return true, if the function can be called with these types
[ "Tests", "if", "the", "functions", "can", "be", "called", "with", "arguments", "of", "the", "specified", "types", "." ]
a069b087750c4133bfeebaf1f599c3bc96762113
https://github.com/mlhartme/mork/blob/a069b087750c4133bfeebaf1f599c3bc96762113/src/main/java/net/oneandone/mork/reflect/Function.java#L96-L110
149,696
leadware/jpersistence-tools
jpersistence-tools-core/src/main/java/net/leadware/persistence/tools/validator/base/AbstractExpressionBasedDAOValidatorRule.java
AbstractExpressionBasedDAOValidatorRule.buildQuery
protected Query buildQuery(Object target) { // Si le modele est null if(expressionModel == null) return null; // Instanciation de la requete Query query = this.entityManager.createQuery(expressionModel.getComputedExpression()); // MAP des parametres Map<String, String> parameters = express...
java
protected Query buildQuery(Object target) { // Si le modele est null if(expressionModel == null) return null; // Instanciation de la requete Query query = this.entityManager.createQuery(expressionModel.getComputedExpression()); // MAP des parametres Map<String, String> parameters = express...
[ "protected", "Query", "buildQuery", "(", "Object", "target", ")", "{", "// Si le modele est null\r", "if", "(", "expressionModel", "==", "null", ")", "return", "null", ";", "// Instanciation de la requete\r", "Query", "query", "=", "this", ".", "entityManager", ".",...
Methode de construction de la requete @param target Objet cible @return Requete
[ "Methode", "de", "construction", "de", "la", "requete" ]
4c15372993584579d7dbb9b23dd4c0c0fdc9e789
https://github.com/leadware/jpersistence-tools/blob/4c15372993584579d7dbb9b23dd4c0c0fdc9e789/jpersistence-tools-core/src/main/java/net/leadware/persistence/tools/validator/base/AbstractExpressionBasedDAOValidatorRule.java#L119-L146
149,697
leadware/jpersistence-tools
jpersistence-tools-core/src/main/java/net/leadware/persistence/tools/validator/base/AbstractExpressionBasedDAOValidatorRule.java
AbstractExpressionBasedDAOValidatorRule.isProcessable
protected boolean isProcessable() { // Comparaison des modes boolean correctMode = DAOValidatorHelper.arraryContains(getAnnotationMode(), this.systemDAOMode); // Comparaison des instants d'evaluation boolean correctTime = DAOValidatorHelper.arraryContains(getAnnotationEvaluationTime(), this.systemEv...
java
protected boolean isProcessable() { // Comparaison des modes boolean correctMode = DAOValidatorHelper.arraryContains(getAnnotationMode(), this.systemDAOMode); // Comparaison des instants d'evaluation boolean correctTime = DAOValidatorHelper.arraryContains(getAnnotationEvaluationTime(), this.systemEv...
[ "protected", "boolean", "isProcessable", "(", ")", "{", "// Comparaison des modes\r", "boolean", "correctMode", "=", "DAOValidatorHelper", ".", "arraryContains", "(", "getAnnotationMode", "(", ")", ",", "this", ".", "systemDAOMode", ")", ";", "// Comparaison des instant...
methode permettant de tester si l'annotation doit-etre executee @return Etat d'execution de l'annotation
[ "methode", "permettant", "de", "tester", "si", "l", "annotation", "doit", "-", "etre", "executee" ]
4c15372993584579d7dbb9b23dd4c0c0fdc9e789
https://github.com/leadware/jpersistence-tools/blob/4c15372993584579d7dbb9b23dd4c0c0fdc9e789/jpersistence-tools-core/src/main/java/net/leadware/persistence/tools/validator/base/AbstractExpressionBasedDAOValidatorRule.java#L152-L162
149,698
craterdog/java-general-utilities
src/main/java/craterdog/utils/Base32Utils.java
Base32Utils.encode
static public String encode(byte[] bytes, String indentation) { StringBuilder result = new StringBuilder(); int length = bytes.length; if (length == 0) return ""; // empty byte array if (indentation != null) result.append(indentation); encodeBytes(bytes[0], bytes[0], 0, result);...
java
static public String encode(byte[] bytes, String indentation) { StringBuilder result = new StringBuilder(); int length = bytes.length; if (length == 0) return ""; // empty byte array if (indentation != null) result.append(indentation); encodeBytes(bytes[0], bytes[0], 0, result);...
[ "static", "public", "String", "encode", "(", "byte", "[", "]", "bytes", ",", "String", "indentation", ")", "{", "StringBuilder", "result", "=", "new", "StringBuilder", "(", ")", ";", "int", "length", "=", "bytes", ".", "length", ";", "if", "(", "length",...
This function encodes a byte array using base 32 with a specific indentation of new lines. @param bytes The byte array to be encoded. @param indentation The indentation string to be inserted before each new line. @return The base 32 encoded string.
[ "This", "function", "encodes", "a", "byte", "array", "using", "base", "32", "with", "a", "specific", "indentation", "of", "new", "lines", "." ]
a3ff45eaa00c2b8ed5c53efe9fe5166065fc1f57
https://github.com/craterdog/java-general-utilities/blob/a3ff45eaa00c2b8ed5c53efe9fe5166065fc1f57/src/main/java/craterdog/utils/Base32Utils.java#L39-L55
149,699
craterdog/java-general-utilities
src/main/java/craterdog/utils/Base32Utils.java
Base32Utils.decode
static public byte[] decode(String base32) { String string = base32.replaceAll("\\s", ""); // remove all white space int length = string.length(); byte[] bytes = new byte[(int) (length * 5.0 / 8.0)]; for (int i = 0; i < length - 1; i++) { char character = string.charAt(i); ...
java
static public byte[] decode(String base32) { String string = base32.replaceAll("\\s", ""); // remove all white space int length = string.length(); byte[] bytes = new byte[(int) (length * 5.0 / 8.0)]; for (int i = 0; i < length - 1; i++) { char character = string.charAt(i); ...
[ "static", "public", "byte", "[", "]", "decode", "(", "String", "base32", ")", "{", "String", "string", "=", "base32", ".", "replaceAll", "(", "\"\\\\s\"", ",", "\"\"", ")", ";", "// remove all white space", "int", "length", "=", "string", ".", "length", "(...
This function decodes a base 32 string into its corresponding byte array. @param base32 The base 32 encoded string. @return The corresponding byte array.
[ "This", "function", "decodes", "a", "base", "32", "string", "into", "its", "corresponding", "byte", "array", "." ]
a3ff45eaa00c2b8ed5c53efe9fe5166065fc1f57
https://github.com/craterdog/java-general-utilities/blob/a3ff45eaa00c2b8ed5c53efe9fe5166065fc1f57/src/main/java/craterdog/utils/Base32Utils.java#L64-L81