repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
partition
stringclasses
1 value
eFaps/eFaps-Kernel
src/main/java/org/efaps/init/Util.java
Util.bind
public static void bind(final Context _ctx, final String _nameStr, final Object _object) throws NamingException { final Name names = _ctx.getNameParser("").parse(_nameStr); if (names.size() > 0) { Context subCtx = _ctx; ...
java
public static void bind(final Context _ctx, final String _nameStr, final Object _object) throws NamingException { final Name names = _ctx.getNameParser("").parse(_nameStr); if (names.size() > 0) { Context subCtx = _ctx; ...
[ "public", "static", "void", "bind", "(", "final", "Context", "_ctx", ",", "final", "String", "_nameStr", ",", "final", "Object", "_object", ")", "throws", "NamingException", "{", "final", "Name", "names", "=", "_ctx", ".", "getNameParser", "(", "\"\"", ")", ...
Bing given object at the given name path within given name context. @param _ctx naming context @param _nameStr string with complete name path @param _object object to bind @throws NamingException if bind failed
[ "Bing", "given", "object", "at", "the", "given", "name", "path", "within", "given", "name", "context", "." ]
04b96548f518c2386a93f5ec2b9349f9b9063859
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/init/Util.java#L58-L85
train
eFaps/eFaps-Kernel
src/main/java/org/efaps/db/store/JCRStoreResource.java
JCRStoreResource.getSession
protected Session getSession() throws EFapsException { if (this.session == null) { try { String username = getProperties().get(JCRStoreResource.PROPERTY_USERNAME); if (username == null) { username = Context.getThreadContext().getPerson(...
java
protected Session getSession() throws EFapsException { if (this.session == null) { try { String username = getProperties().get(JCRStoreResource.PROPERTY_USERNAME); if (username == null) { username = Context.getThreadContext().getPerson(...
[ "protected", "Session", "getSession", "(", ")", "throws", "EFapsException", "{", "if", "(", "this", ".", "session", "==", "null", ")", "{", "try", "{", "String", "username", "=", "getProperties", "(", ")", ".", "get", "(", "JCRStoreResource", ".", "PROPERT...
Gets the session for JCR access. @return the session for JCR access @throws EFapsException on error
[ "Gets", "the", "session", "for", "JCR", "access", "." ]
04b96548f518c2386a93f5ec2b9349f9b9063859
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/db/store/JCRStoreResource.java#L155-L179
train
eFaps/eFaps-Kernel
src/main/java/org/efaps/db/store/JCRStoreResource.java
JCRStoreResource.getFolderNode
protected Node getFolderNode() throws EFapsException, RepositoryException { Node ret = getSession().getRootNode(); if (getProperties().containsKey(JCRStoreResource.PROPERTY_BASEFOLDER)) { if (ret.hasNode(getProperties().get(JCRStoreResource.PROPERTY_BASEFOLDER))) { ...
java
protected Node getFolderNode() throws EFapsException, RepositoryException { Node ret = getSession().getRootNode(); if (getProperties().containsKey(JCRStoreResource.PROPERTY_BASEFOLDER)) { if (ret.hasNode(getProperties().get(JCRStoreResource.PROPERTY_BASEFOLDER))) { ...
[ "protected", "Node", "getFolderNode", "(", ")", "throws", "EFapsException", ",", "RepositoryException", "{", "Node", "ret", "=", "getSession", "(", ")", ".", "getRootNode", "(", ")", ";", "if", "(", "getProperties", "(", ")", ".", "containsKey", "(", "JCRSto...
Gets the folder node. @return the folder node @throws EFapsException on error @throws RepositoryException the repository exception
[ "Gets", "the", "folder", "node", "." ]
04b96548f518c2386a93f5ec2b9349f9b9063859
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/db/store/JCRStoreResource.java#L281-L299
train
eFaps/eFaps-Kernel
src/main/java/org/efaps/db/store/JCRStoreResource.java
JCRStoreResource.getBinary
protected Binary getBinary(final InputStream _in) throws EFapsException { Binary ret = null; try { ret = SerialValueFactory.getInstance().createBinary(_in); } catch (final RepositoryException e) { throw new EFapsException("RepositoryException", e); } ...
java
protected Binary getBinary(final InputStream _in) throws EFapsException { Binary ret = null; try { ret = SerialValueFactory.getInstance().createBinary(_in); } catch (final RepositoryException e) { throw new EFapsException("RepositoryException", e); } ...
[ "protected", "Binary", "getBinary", "(", "final", "InputStream", "_in", ")", "throws", "EFapsException", "{", "Binary", "ret", "=", "null", ";", "try", "{", "ret", "=", "SerialValueFactory", ".", "getInstance", "(", ")", ".", "createBinary", "(", "_in", ")",...
Gets the binary. @param _in the in @return the binary @throws EFapsException on error
[ "Gets", "the", "binary", "." ]
04b96548f518c2386a93f5ec2b9349f9b9063859
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/db/store/JCRStoreResource.java#L308-L318
train
eFaps/eFaps-Kernel
src/main/java/org/efaps/db/store/JCRStoreResource.java
JCRStoreResource.setIdentifer
protected void setIdentifer(final String _identifier) throws EFapsException { if (!_identifier.equals(this.identifier)) { ConnectionResource res = null; try { res = Context.getThreadContext().getConnectionResource(); final StringBuffer cmd = ...
java
protected void setIdentifer(final String _identifier) throws EFapsException { if (!_identifier.equals(this.identifier)) { ConnectionResource res = null; try { res = Context.getThreadContext().getConnectionResource(); final StringBuffer cmd = ...
[ "protected", "void", "setIdentifer", "(", "final", "String", "_identifier", ")", "throws", "EFapsException", "{", "if", "(", "!", "_identifier", ".", "equals", "(", "this", ".", "identifier", ")", ")", "{", "ConnectionResource", "res", "=", "null", ";", "try...
Set the identifier in the eFaps DataBase. @param _identifier identifer to set @throws EFapsException on error
[ "Set", "the", "identifier", "in", "the", "eFaps", "DataBase", "." ]
04b96548f518c2386a93f5ec2b9349f9b9063859
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/db/store/JCRStoreResource.java#L326-L354
train
eFaps/eFaps-Kernel
src/main/java/org/efaps/db/store/JCRStoreResource.java
JCRStoreResource.rollback
@Override public void rollback(final Xid _xid) throws XAException { try { getSession().logout(); } catch (final EFapsException e) { throw new XAException("EFapsException"); } }
java
@Override public void rollback(final Xid _xid) throws XAException { try { getSession().logout(); } catch (final EFapsException e) { throw new XAException("EFapsException"); } }
[ "@", "Override", "public", "void", "rollback", "(", "final", "Xid", "_xid", ")", "throws", "XAException", "{", "try", "{", "getSession", "(", ")", ".", "logout", "(", ")", ";", "}", "catch", "(", "final", "EFapsException", "e", ")", "{", "throw", "new"...
On rollback no save is send to the session.. @param _xid global transaction identifier (not used, because each file with the file id gets a new VFS store resource instance) @throws XAException if any exception occurs (catch on {@link java.lang.Throwable})
[ "On", "rollback", "no", "save", "is", "send", "to", "the", "session", ".." ]
04b96548f518c2386a93f5ec2b9349f9b9063859
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/db/store/JCRStoreResource.java#L522-L531
train
eFaps/eFaps-Kernel
src/main/java/org/efaps/jaas/xml/XMLUserLoginModule.java
XMLUserLoginModule.initialize
@Override public final void initialize(final Subject _subject, final CallbackHandler _callbackHandler, final Map < String, ? > _sharedState, final Map < String, ? > _options) { XMLUserLoginModule.LOG.debug...
java
@Override public final void initialize(final Subject _subject, final CallbackHandler _callbackHandler, final Map < String, ? > _sharedState, final Map < String, ? > _options) { XMLUserLoginModule.LOG.debug...
[ "@", "Override", "public", "final", "void", "initialize", "(", "final", "Subject", "_subject", ",", "final", "CallbackHandler", "_callbackHandler", ",", "final", "Map", "<", "String", ",", "?", ">", "_sharedState", ",", "final", "Map", "<", "String", ",", "?...
Initialize this LoginModule. <p> This method is called by the <code>LoginContext</code> after this <code>LoginModule</code> has been instantiated. The purpose of this method is to initialize this <code>LoginModule</code> with the relevant information. If this <code>LoginModule</code> does not understand any of the dat...
[ "Initialize", "this", "LoginModule", "." ]
04b96548f518c2386a93f5ec2b9349f9b9063859
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/jaas/xml/XMLUserLoginModule.java#L106-L116
train
eFaps/eFaps-Kernel
src/main/java/org/efaps/jaas/xml/XMLUserLoginModule.java
XMLUserLoginModule.readPersons
@SuppressWarnings("unchecked") private void readPersons(final String _fileName) { try { final File file = new File(_fileName); final Digester digester = new Digester(); digester.setValidating(false); digester.addObjectCreate("persons", ArrayList.class); ...
java
@SuppressWarnings("unchecked") private void readPersons(final String _fileName) { try { final File file = new File(_fileName); final Digester digester = new Digester(); digester.setValidating(false); digester.addObjectCreate("persons", ArrayList.class); ...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "private", "void", "readPersons", "(", "final", "String", "_fileName", ")", "{", "try", "{", "final", "File", "file", "=", "new", "File", "(", "_fileName", ")", ";", "final", "Digester", "digester", "=", ...
The name of the XML is store in this instance variable. The XML file holds all allowed persons and their related roles and groups. @param _fileName name of the XML file with the user data
[ "The", "name", "of", "the", "XML", "is", "store", "in", "this", "instance", "variable", ".", "The", "XML", "file", "holds", "all", "allowed", "persons", "and", "their", "related", "roles", "and", "groups", "." ]
04b96548f518c2386a93f5ec2b9349f9b9063859
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/jaas/xml/XMLUserLoginModule.java#L325-L382
train
eFaps/eFaps-Kernel
src/main/java/org/efaps/admin/access/AccessSet.java
AccessSet.getAccessSetFromDB
private static boolean getAccessSetFromDB(final String _sql, final Object _criteria) throws CacheReloadException { boolean ret = false; Connection con = null; try { AccessSet accessSet = null; con = Context.getConn...
java
private static boolean getAccessSetFromDB(final String _sql, final Object _criteria) throws CacheReloadException { boolean ret = false; Connection con = null; try { AccessSet accessSet = null; con = Context.getConn...
[ "private", "static", "boolean", "getAccessSetFromDB", "(", "final", "String", "_sql", ",", "final", "Object", "_criteria", ")", "throws", "CacheReloadException", "{", "boolean", "ret", "=", "false", ";", "Connection", "con", "=", "null", ";", "try", "{", "Acce...
Read the AccessSet from the DataBase. @param _sql SQL Statement to be executed @param _criteria filter criteria @return true if founr @throws CacheReloadException on error
[ "Read", "the", "AccessSet", "from", "the", "DataBase", "." ]
04b96548f518c2386a93f5ec2b9349f9b9063859
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/admin/access/AccessSet.java#L567-L619
train
eFaps/eFaps-Kernel
src/main/java/org/efaps/admin/ui/Table.java
Table.cloneTable
public Table cloneTable() { Table ret = null; try { ret = (Table) super.clone(); } catch (final CloneNotSupportedException e) { e.printStackTrace(); } return ret; }
java
public Table cloneTable() { Table ret = null; try { ret = (Table) super.clone(); } catch (final CloneNotSupportedException e) { e.printStackTrace(); } return ret; }
[ "public", "Table", "cloneTable", "(", ")", "{", "Table", "ret", "=", "null", ";", "try", "{", "ret", "=", "(", "Table", ")", "super", ".", "clone", "(", ")", ";", "}", "catch", "(", "final", "CloneNotSupportedException", "e", ")", "{", "e", ".", "p...
Creates and returns a copy of this table object. @return cloned table
[ "Creates", "and", "returns", "a", "copy", "of", "this", "table", "object", "." ]
04b96548f518c2386a93f5ec2b9349f9b9063859
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/admin/ui/Table.java#L66-L75
train
tvesalainen/lpg
src/main/java/org/vesalainen/grammar/math/MethodExpressionHandler.java
MethodExpressionHandler.setIndex
@Override public void setIndex(boolean b) { if (b) { assert safe == null; safe = type; type = Typ.Int; } else { assert type.getKind() == TypeKind.INT; assert safe != null; type = safe; ...
java
@Override public void setIndex(boolean b) { if (b) { assert safe == null; safe = type; type = Typ.Int; } else { assert type.getKind() == TypeKind.INT; assert safe != null; type = safe; ...
[ "@", "Override", "public", "void", "setIndex", "(", "boolean", "b", ")", "{", "if", "(", "b", ")", "{", "assert", "safe", "==", "null", ";", "safe", "=", "type", ";", "type", "=", "Typ", ".", "Int", ";", "}", "else", "{", "assert", "type", ".", ...
Set index parsing mode. In true mode we are parsing inside bracket where index type must be int. @param b
[ "Set", "index", "parsing", "mode", ".", "In", "true", "mode", "we", "are", "parsing", "inside", "bracket", "where", "index", "type", "must", "be", "int", "." ]
0917b8d295e9772b9f8a0affc258a08530cd567a
https://github.com/tvesalainen/lpg/blob/0917b8d295e9772b9f8a0affc258a08530cd567a/src/main/java/org/vesalainen/grammar/math/MethodExpressionHandler.java#L165-L181
train
eFaps/eFaps-Kernel
src/main/java/org/efaps/util/cache/AbstractCache.java
AbstractCache.hasEntries
public boolean hasEntries() { return (getCache4Id() != null && !getCache4Id().isEmpty()) || (getCache4Name() != null && !getCache4Name().isEmpty()) || (getCache4UUID() != null && !getCache4UUID().isEmpty()); }
java
public boolean hasEntries() { return (getCache4Id() != null && !getCache4Id().isEmpty()) || (getCache4Name() != null && !getCache4Name().isEmpty()) || (getCache4UUID() != null && !getCache4UUID().isEmpty()); }
[ "public", "boolean", "hasEntries", "(", ")", "{", "return", "(", "getCache4Id", "(", ")", "!=", "null", "&&", "!", "getCache4Id", "(", ")", ".", "isEmpty", "(", ")", ")", "||", "(", "getCache4Name", "(", ")", "!=", "null", "&&", "!", "getCache4Name", ...
The method tests, if the cache has stored some entries. @return <i>true</i> if the cache has some entries, otherwise <i>false</i>
[ "The", "method", "tests", "if", "the", "cache", "has", "stored", "some", "entries", "." ]
04b96548f518c2386a93f5ec2b9349f9b9063859
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/util/cache/AbstractCache.java#L182-L187
train
eFaps/eFaps-Kernel
src/main/java/org/efaps/util/cache/AbstractCache.java
AbstractCache.initialize
public void initialize(final Class<?> _initializer) { this.initializer = _initializer.getName(); synchronized (this) { try { readCache(); } catch (final CacheReloadException e) { AbstractCache.LOG.error("Unexpected error while initializing Cach...
java
public void initialize(final Class<?> _initializer) { this.initializer = _initializer.getName(); synchronized (this) { try { readCache(); } catch (final CacheReloadException e) { AbstractCache.LOG.error("Unexpected error while initializing Cach...
[ "public", "void", "initialize", "(", "final", "Class", "<", "?", ">", "_initializer", ")", "{", "this", ".", "initializer", "=", "_initializer", ".", "getName", "(", ")", ";", "synchronized", "(", "this", ")", "{", "try", "{", "readCache", "(", ")", ";...
The method initialize the cache. @param _initializer class name of the class initializing
[ "The", "method", "initialize", "the", "cache", "." ]
04b96548f518c2386a93f5ec2b9349f9b9063859
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/util/cache/AbstractCache.java#L195-L205
train
eFaps/eFaps-Kernel
src/main/java/org/efaps/util/cache/AbstractCache.java
AbstractCache.clear
public void clear() { if (getCache4Id() != null) { getCache4Id().clear(); } if (getCache4Name() != null) { getCache4Name().clear(); } if (getCache4UUID() != null) { getCache4UUID().clear(); } }
java
public void clear() { if (getCache4Id() != null) { getCache4Id().clear(); } if (getCache4Name() != null) { getCache4Name().clear(); } if (getCache4UUID() != null) { getCache4UUID().clear(); } }
[ "public", "void", "clear", "(", ")", "{", "if", "(", "getCache4Id", "(", ")", "!=", "null", ")", "{", "getCache4Id", "(", ")", ".", "clear", "(", ")", ";", "}", "if", "(", "getCache4Name", "(", ")", "!=", "null", ")", "{", "getCache4Name", "(", "...
Clear all values of this Cache.
[ "Clear", "all", "values", "of", "this", "Cache", "." ]
04b96548f518c2386a93f5ec2b9349f9b9063859
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/util/cache/AbstractCache.java#L375-L386
train
eFaps/eFaps-Kernel
src/main/java/org/efaps/util/cache/AbstractCache.java
AbstractCache.clearCaches
public static void clearCaches() { synchronized (AbstractCache.CACHES) { for (final AbstractCache<?> cache : AbstractCache.CACHES) { cache.getCache4Id().clear(); cache.getCache4Name().clear(); cache.getCache4UUID().clear(); } } ...
java
public static void clearCaches() { synchronized (AbstractCache.CACHES) { for (final AbstractCache<?> cache : AbstractCache.CACHES) { cache.getCache4Id().clear(); cache.getCache4Name().clear(); cache.getCache4UUID().clear(); } } ...
[ "public", "static", "void", "clearCaches", "(", ")", "{", "synchronized", "(", "AbstractCache", ".", "CACHES", ")", "{", "for", "(", "final", "AbstractCache", "<", "?", ">", "cache", ":", "AbstractCache", ".", "CACHES", ")", "{", "cache", ".", "getCache4Id...
The static method removes all values in all caches.
[ "The", "static", "method", "removes", "all", "values", "in", "all", "caches", "." ]
04b96548f518c2386a93f5ec2b9349f9b9063859
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/util/cache/AbstractCache.java#L391-L400
train
mistraltechnologies/smog
src/main/java/com/mistraltech/smog/core/CompositePropertyMatcher.java
CompositePropertyMatcher.registerPropertyMatcher
@Override public void registerPropertyMatcher(PropertyMatcher<?> propertyMatcher) { if (propertyMatcher.getPathProvider() == null) { propertyMatcher.setPathProvider(this); } propertyMatcherList.add(propertyMatcher); }
java
@Override public void registerPropertyMatcher(PropertyMatcher<?> propertyMatcher) { if (propertyMatcher.getPathProvider() == null) { propertyMatcher.setPathProvider(this); } propertyMatcherList.add(propertyMatcher); }
[ "@", "Override", "public", "void", "registerPropertyMatcher", "(", "PropertyMatcher", "<", "?", ">", "propertyMatcher", ")", "{", "if", "(", "propertyMatcher", ".", "getPathProvider", "(", ")", "==", "null", ")", "{", "propertyMatcher", ".", "setPathProvider", "...
Register a PropertyMatcher instance. Registered property matchers are used to generate the describeTo text. If a given property matcher does not have an assigned path provider, this instance will be assigned. @param propertyMatcher the PropertyMatcher instances
[ "Register", "a", "PropertyMatcher", "instance", ".", "Registered", "property", "matchers", "are", "used", "to", "generate", "the", "describeTo", "text", ".", "If", "a", "given", "property", "matcher", "does", "not", "have", "an", "assigned", "path", "provider", ...
bd561520f79476b96467f554daa59e51875ce027
https://github.com/mistraltechnologies/smog/blob/bd561520f79476b96467f554daa59e51875ce027/src/main/java/com/mistraltech/smog/core/CompositePropertyMatcher.java#L44-L51
train
iobeam/iobeam-client-java
src/main/java/com/iobeam/api/service/DeviceService.java
DeviceService.add
@Deprecated public Add add(long projectId, String deviceId, String deviceName, String deviceType, Date created) { return add(projectId, new Device.Spec(deviceId, deviceName, deviceType), created); }
java
@Deprecated public Add add(long projectId, String deviceId, String deviceName, String deviceType, Date created) { return add(projectId, new Device.Spec(deviceId, deviceName, deviceType), created); }
[ "@", "Deprecated", "public", "Add", "add", "(", "long", "projectId", ",", "String", "deviceId", ",", "String", "deviceName", ",", "String", "deviceType", ",", "Date", "created", ")", "{", "return", "add", "(", "projectId", ",", "new", "Device", ".", "Spec"...
Creates an Add API request for a new Device with the provided data. @param projectId Project this device belongs to [required]. @param deviceId Desired device ID. If invalid or <tt>null</tt>, a random one will be generated. @param deviceName Project-unique name (optional). @param deviceType Device type description ...
[ "Creates", "an", "Add", "API", "request", "for", "a", "new", "Device", "with", "the", "provided", "data", "." ]
06e7aeb2a313503392358a3671de7d28628d0e33
https://github.com/iobeam/iobeam-client-java/blob/06e7aeb2a313503392358a3671de7d28628d0e33/src/main/java/com/iobeam/api/service/DeviceService.java#L103-L107
train
eFaps/eFaps-Kernel
src/main/java/org/efaps/jaas/efaps/UserLoginModule.java
UserLoginModule.abort
public final boolean abort() { boolean ret = false; if (UserLoginModule.LOG.isDebugEnabled()) { UserLoginModule.LOG.debug("Abort of " + this.principal); } // If our authentication was successful, just return false if (this.principal != null) { // Cl...
java
public final boolean abort() { boolean ret = false; if (UserLoginModule.LOG.isDebugEnabled()) { UserLoginModule.LOG.debug("Abort of " + this.principal); } // If our authentication was successful, just return false if (this.principal != null) { // Cl...
[ "public", "final", "boolean", "abort", "(", ")", "{", "boolean", "ret", "=", "false", ";", "if", "(", "UserLoginModule", ".", "LOG", ".", "isDebugEnabled", "(", ")", ")", "{", "UserLoginModule", ".", "LOG", ".", "debug", "(", "\"Abort of \"", "+", "this"...
Abort the login. @return true if abort was successful
[ "Abort", "the", "login", "." ]
04b96548f518c2386a93f5ec2b9349f9b9063859
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/jaas/efaps/UserLoginModule.java#L237-L257
train
eFaps/eFaps-Kernel
src/main/java/org/efaps/update/AbstractUpdate.java
AbstractUpdate.readXML
@Override public void readXML(final List<String> _tags, final Map<String, String> _attributes, final String _text) throws SAXException, EFapsException { if (_tags.size() == 1) { final String value = _tags.get(0); if ("uuid"....
java
@Override public void readXML(final List<String> _tags, final Map<String, String> _attributes, final String _text) throws SAXException, EFapsException { if (_tags.size() == 1) { final String value = _tags.get(0); if ("uuid"....
[ "@", "Override", "public", "void", "readXML", "(", "final", "List", "<", "String", ">", "_tags", ",", "final", "Map", "<", "String", ",", "String", ">", "_attributes", ",", "final", "String", "_text", ")", "throws", "SAXException", ",", "EFapsException", "...
Read event for given tags path with attributes and text. @param _tags tags path as list @param _attributes map of attributes for current tag @param _text content text of this tags path TODO: error could not be thrown because db properties is not read correctly @throws SAXException on error @throws EFapsException on er...
[ "Read", "event", "for", "given", "tags", "path", "with", "attributes", "and", "text", "." ]
04b96548f518c2386a93f5ec2b9349f9b9063859
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/update/AbstractUpdate.java#L167-L188
train
eFaps/eFaps-Kernel
src/main/java/org/efaps/update/AbstractUpdate.java
AbstractUpdate.registerRevision
protected void registerRevision(final String _application, final InstallFile _installFile, final Instance _objInst) throws InstallationException { try { if (CIAdminCommon.Application.getType() != null ...
java
protected void registerRevision(final String _application, final InstallFile _installFile, final Instance _objInst) throws InstallationException { try { if (CIAdminCommon.Application.getType() != null ...
[ "protected", "void", "registerRevision", "(", "final", "String", "_application", ",", "final", "InstallFile", "_installFile", ",", "final", "Instance", "_objInst", ")", "throws", "InstallationException", "{", "try", "{", "if", "(", "CIAdminCommon", ".", "Application...
Register revision. @param _application the application @param _installFile the install file @param _objInst the obj inst @throws InstallationException the installation exception
[ "Register", "revision", "." ]
04b96548f518c2386a93f5ec2b9349f9b9063859
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/update/AbstractUpdate.java#L269-L319
train
rometools/rome-propono
src/main/java/com/rometools/propono/blogclient/BlogConnectionFactory.java
BlogConnectionFactory.getBlogConnection
public static BlogConnection getBlogConnection(final String type, final String url, final String username, final String password) throws BlogClientException { BlogConnection blogConnection = null; if (type == null || type.equals("metaweblog")) { blogConnection = createBlogConnect...
java
public static BlogConnection getBlogConnection(final String type, final String url, final String username, final String password) throws BlogClientException { BlogConnection blogConnection = null; if (type == null || type.equals("metaweblog")) { blogConnection = createBlogConnect...
[ "public", "static", "BlogConnection", "getBlogConnection", "(", "final", "String", "type", ",", "final", "String", "url", ",", "final", "String", "username", ",", "final", "String", "password", ")", "throws", "BlogClientException", "{", "BlogConnection", "blogConnec...
Create a connection to a blog server. @param type Connection type, must be "atom" or "metaweblog" @param url End-point URL to connect to @param username Username for login to blog server @param password Password for login to blog server
[ "Create", "a", "connection", "to", "a", "blog", "server", "." ]
721de8d5a47998f92969d1ee3db80bdaa3f26fb2
https://github.com/rometools/rome-propono/blob/721de8d5a47998f92969d1ee3db80bdaa3f26fb2/src/main/java/com/rometools/propono/blogclient/BlogConnectionFactory.java#L42-L53
train
javactic/javactic
src/main/java/com/github/javactic/futures/ExecutionContext.java
ExecutionContext.future
@SuppressWarnings("unchecked") public <G> OrFuture<G, BAD> future(CheckedFunction0<? extends Or<? extends G, ? extends BAD>> task) { OrFutureImpl<G, BAD> future = new OrFutureImpl<>(this); executor.execute(() -> { try { future.complete((Or<G, BAD>) task.apply()); } catch (Throwable t) { ...
java
@SuppressWarnings("unchecked") public <G> OrFuture<G, BAD> future(CheckedFunction0<? extends Or<? extends G, ? extends BAD>> task) { OrFutureImpl<G, BAD> future = new OrFutureImpl<>(this); executor.execute(() -> { try { future.complete((Or<G, BAD>) task.apply()); } catch (Throwable t) { ...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "<", "G", ">", "OrFuture", "<", "G", ",", "BAD", ">", "future", "(", "CheckedFunction0", "<", "?", "extends", "Or", "<", "?", "extends", "G", ",", "?", "extends", "BAD", ">", ">", "task", ...
Creates an OrFuture that will execute the given task using this context's executor. @param task asynchronous computation to execute @param <G> the good type @return a new future that completes with the result of the supplied task, or if the execution of the task throws an exception, that exception will be handled with...
[ "Creates", "an", "OrFuture", "that", "will", "execute", "the", "given", "task", "using", "this", "context", "s", "executor", "." ]
dfa040062178c259c3067fd9b59cb4498022d8bc
https://github.com/javactic/javactic/blob/dfa040062178c259c3067fd9b59cb4498022d8bc/src/main/java/com/github/javactic/futures/ExecutionContext.java#L85-L96
train
javactic/javactic
src/main/java/com/github/javactic/futures/ExecutionContext.java
ExecutionContext.when
@SafeVarargs public final <G, ERR> OrFuture<G, Every<ERR>> when(OrFuture<? extends G, ? extends Every<? extends ERR>> or, Function<? super G, ? extends Validation<ERR>>... validations) { OrPromise<G, Every<ERR>> promise = promise(); or.onComplete(o -> promise.complete(Accumulation.when(o, validation...
java
@SafeVarargs public final <G, ERR> OrFuture<G, Every<ERR>> when(OrFuture<? extends G, ? extends Every<? extends ERR>> or, Function<? super G, ? extends Validation<ERR>>... validations) { OrPromise<G, Every<ERR>> promise = promise(); or.onComplete(o -> promise.complete(Accumulation.when(o, validation...
[ "@", "SafeVarargs", "public", "final", "<", "G", ",", "ERR", ">", "OrFuture", "<", "G", ",", "Every", "<", "ERR", ">", ">", "when", "(", "OrFuture", "<", "?", "extends", "G", ",", "?", "extends", "Every", "<", "?", "extends", "ERR", ">", ">", "or...
Enables further validation on an existing accumulating OrFuture by passing validation functions. @param <G> the Good type of the argument OrFuture @param <ERR> the type of the error message contained in the accumulating failure @param or the accumulating OrFuture @param validations the validatio...
[ "Enables", "further", "validation", "on", "an", "existing", "accumulating", "OrFuture", "by", "passing", "validation", "functions", "." ]
dfa040062178c259c3067fd9b59cb4498022d8bc
https://github.com/javactic/javactic/blob/dfa040062178c259c3067fd9b59cb4498022d8bc/src/main/java/com/github/javactic/futures/ExecutionContext.java#L206-L214
train
javactic/javactic
src/main/java/com/github/javactic/futures/ExecutionContext.java
ExecutionContext.withGood
public <A, B, ERR, RESULT> OrFuture<RESULT, Every<ERR>> withGood(OrFuture<? extends A, ? extends Every<? extends ERR>> fa, OrFuture<? extends B, ? extends Every<? extends ERR>> fb, BiFunction<? super A, ? super B, ? extends RESULT> function) { return withPromise(this, promise -> fa.on...
java
public <A, B, ERR, RESULT> OrFuture<RESULT, Every<ERR>> withGood(OrFuture<? extends A, ? extends Every<? extends ERR>> fa, OrFuture<? extends B, ? extends Every<? extends ERR>> fb, BiFunction<? super A, ? super B, ? extends RESULT> function) { return withPromise(this, promise -> fa.on...
[ "public", "<", "A", ",", "B", ",", "ERR", ",", "RESULT", ">", "OrFuture", "<", "RESULT", ",", "Every", "<", "ERR", ">", ">", "withGood", "(", "OrFuture", "<", "?", "extends", "A", ",", "?", "extends", "Every", "<", "?", "extends", "ERR", ">", ">"...
Combines two accumulating OrFutures into a single one using the given function. The resulting OrFuture will complete with a Good if both OrFutures complete with Goods, otherwise it will complete with a Bad containing every error in the Bads. @param <A> the success type @param <B> the success type @param <ERR...
[ "Combines", "two", "accumulating", "OrFutures", "into", "a", "single", "one", "using", "the", "given", "function", ".", "The", "resulting", "OrFuture", "will", "complete", "with", "a", "Good", "if", "both", "OrFutures", "complete", "with", "Goods", "otherwise", ...
dfa040062178c259c3067fd9b59cb4498022d8bc
https://github.com/javactic/javactic/blob/dfa040062178c259c3067fd9b59cb4498022d8bc/src/main/java/com/github/javactic/futures/ExecutionContext.java#L235-L244
train
javactic/javactic
src/main/java/com/github/javactic/futures/ExecutionContext.java
ExecutionContext.firstCompletedOf
public <G, ERR> OrFuture<G, ERR> firstCompletedOf(Iterable<? extends OrFuture<? extends G, ? extends ERR>> input) { OrPromise<G, ERR> promise = promise(); input.forEach(future -> future.onComplete(promise::tryComplete)); return promise.future(); }
java
public <G, ERR> OrFuture<G, ERR> firstCompletedOf(Iterable<? extends OrFuture<? extends G, ? extends ERR>> input) { OrPromise<G, ERR> promise = promise(); input.forEach(future -> future.onComplete(promise::tryComplete)); return promise.future(); }
[ "public", "<", "G", ",", "ERR", ">", "OrFuture", "<", "G", ",", "ERR", ">", "firstCompletedOf", "(", "Iterable", "<", "?", "extends", "OrFuture", "<", "?", "extends", "G", ",", "?", "extends", "ERR", ">", ">", "input", ")", "{", "OrPromise", "<", "...
Returns an OrFuture that will complete as soon as the first OrFuture from the given Iterable completes. @param input an Iterable of OrFutures @param <G> the good type of the future @param <ERR> the bad type of the future @return the first future to complete
[ "Returns", "an", "OrFuture", "that", "will", "complete", "as", "soon", "as", "the", "first", "OrFuture", "from", "the", "given", "Iterable", "completes", "." ]
dfa040062178c259c3067fd9b59cb4498022d8bc
https://github.com/javactic/javactic/blob/dfa040062178c259c3067fd9b59cb4498022d8bc/src/main/java/com/github/javactic/futures/ExecutionContext.java#L367-L372
train
javactic/javactic
src/main/java/com/github/javactic/futures/ExecutionContext.java
ExecutionContext.zip
public <A, B, ERR> OrFuture<Tuple2<A, B>, Every<ERR>> zip(OrFuture<? extends A, ? extends Every<? extends ERR>> a, OrFuture<? extends B, ? extends Every<? extends ERR>> b) { return withGood(a, b, Tuple::of); }
java
public <A, B, ERR> OrFuture<Tuple2<A, B>, Every<ERR>> zip(OrFuture<? extends A, ? extends Every<? extends ERR>> a, OrFuture<? extends B, ? extends Every<? extends ERR>> b) { return withGood(a, b, Tuple::of); }
[ "public", "<", "A", ",", "B", ",", "ERR", ">", "OrFuture", "<", "Tuple2", "<", "A", ",", "B", ">", ",", "Every", "<", "ERR", ">", ">", "zip", "(", "OrFuture", "<", "?", "extends", "A", ",", "?", "extends", "Every", "<", "?", "extends", "ERR", ...
Zips two accumulating OrFutures together. If both complete with Goods, returns an OrFuture that completes with a Good tuple containing both original Good values. Otherwise returns an OrFuture that completes with a Bad containing every error message. @param <A> the success type @param <B> the success type @param <E...
[ "Zips", "two", "accumulating", "OrFutures", "together", ".", "If", "both", "complete", "with", "Goods", "returns", "an", "OrFuture", "that", "completes", "with", "a", "Good", "tuple", "containing", "both", "original", "Good", "values", ".", "Otherwise", "returns...
dfa040062178c259c3067fd9b59cb4498022d8bc
https://github.com/javactic/javactic/blob/dfa040062178c259c3067fd9b59cb4498022d8bc/src/main/java/com/github/javactic/futures/ExecutionContext.java#L515-L519
train
javactic/javactic
src/main/java/com/github/javactic/futures/ExecutionContext.java
ExecutionContext.zip3
public <A, B, C, ERR> OrFuture<Tuple3<A, B, C>, Every<ERR>> zip3(OrFuture<? extends A, ? extends Every<? extends ERR>> a, OrFuture<? extends B, ? extends Every<? extends ERR>> b, OrFuture<? extends C, ? extends Every<? extends ERR>> c) { return withGood(a, b, c, Tuple::of); }
java
public <A, B, C, ERR> OrFuture<Tuple3<A, B, C>, Every<ERR>> zip3(OrFuture<? extends A, ? extends Every<? extends ERR>> a, OrFuture<? extends B, ? extends Every<? extends ERR>> b, OrFuture<? extends C, ? extends Every<? extends ERR>> c) { return withGood(a, b, c, Tuple::of); }
[ "public", "<", "A", ",", "B", ",", "C", ",", "ERR", ">", "OrFuture", "<", "Tuple3", "<", "A", ",", "B", ",", "C", ">", ",", "Every", "<", "ERR", ">", ">", "zip3", "(", "OrFuture", "<", "?", "extends", "A", ",", "?", "extends", "Every", "<", ...
Zips three accumulating OrFutures together. If all complete with Goods, returns an OrFuture that completes with a Good tuple containing all original Good values. Otherwise returns an OrFuture that completes with a Bad containing every error message. @param <A> the success type @param <B> the success type @param <C...
[ "Zips", "three", "accumulating", "OrFutures", "together", ".", "If", "all", "complete", "with", "Goods", "returns", "an", "OrFuture", "that", "completes", "with", "a", "Good", "tuple", "containing", "all", "original", "Good", "values", ".", "Otherwise", "returns...
dfa040062178c259c3067fd9b59cb4498022d8bc
https://github.com/javactic/javactic/blob/dfa040062178c259c3067fd9b59cb4498022d8bc/src/main/java/com/github/javactic/futures/ExecutionContext.java#L536-L541
train
eFaps/eFaps-Kernel
src/main/java/org/efaps/db/databases/OracleDatabaseWithAutoSequence.java
OracleDatabaseWithAutoSequence.getNewId
@Override public long getNewId(final ConnectionResource _con, final String _table, final String _column) throws SQLException { throw new SQLException("The database driver uses auto generated keys and " + "a new id c...
java
@Override public long getNewId(final ConnectionResource _con, final String _table, final String _column) throws SQLException { throw new SQLException("The database driver uses auto generated keys and " + "a new id c...
[ "@", "Override", "public", "long", "getNewId", "(", "final", "ConnectionResource", "_con", ",", "final", "String", "_table", ",", "final", "String", "_column", ")", "throws", "SQLException", "{", "throw", "new", "SQLException", "(", "\"The database driver uses auto ...
This method normally returns for given table and column a new id. Because this database driver support auto generated keys, an SQL exception is always thrown. @param _con sql connection @param _table sql table for which a new id must returned @param _column sql table column for which a new id mus...
[ "This", "method", "normally", "returns", "for", "given", "table", "and", "column", "a", "new", "id", ".", "Because", "this", "database", "driver", "support", "auto", "generated", "keys", "an", "SQL", "exception", "is", "always", "thrown", "." ]
04b96548f518c2386a93f5ec2b9349f9b9063859
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/db/databases/OracleDatabaseWithAutoSequence.java#L169-L178
train
eFaps/eFaps-Kernel
src/main/java/org/efaps/db/Checkout.java
Checkout.execute
public void execute(final OutputStream _out) throws EFapsException { final boolean hasAccess = super.getInstance().getType().hasAccess(super.getInstance(), AccessTypeEnums.CHECKOUT.getAccessType()); if (!hasAccess) { ...
java
public void execute(final OutputStream _out) throws EFapsException { final boolean hasAccess = super.getInstance().getType().hasAccess(super.getInstance(), AccessTypeEnums.CHECKOUT.getAccessType()); if (!hasAccess) { ...
[ "public", "void", "execute", "(", "final", "OutputStream", "_out", ")", "throws", "EFapsException", "{", "final", "boolean", "hasAccess", "=", "super", ".", "getInstance", "(", ")", ".", "getType", "(", ")", ".", "hasAccess", "(", "super", ".", "getInstance"...
Executes the checkout with an output stream. @param _out output stream where to write the file @throws EFapsException if the current context user has now access to checkout the file out of the eFaps object
[ "Executes", "the", "checkout", "with", "an", "output", "stream", "." ]
04b96548f518c2386a93f5ec2b9349f9b9063859
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/db/Checkout.java#L92-L101
train
eFaps/eFaps-Kernel
src/main/java/org/efaps/db/Checkout.java
Checkout.executeWithoutTrigger
public void executeWithoutTrigger(final OutputStream _out) throws EFapsException { Resource storeRsrc = null; try { storeRsrc = Context.getThreadContext().getStoreResource(getInstance(), Resource.StoreEvent.READ); storeRsrc.read(_out); this.fileLength = st...
java
public void executeWithoutTrigger(final OutputStream _out) throws EFapsException { Resource storeRsrc = null; try { storeRsrc = Context.getThreadContext().getStoreResource(getInstance(), Resource.StoreEvent.READ); storeRsrc.read(_out); this.fileLength = st...
[ "public", "void", "executeWithoutTrigger", "(", "final", "OutputStream", "_out", ")", "throws", "EFapsException", "{", "Resource", "storeRsrc", "=", "null", ";", "try", "{", "storeRsrc", "=", "Context", ".", "getThreadContext", "(", ")", ".", "getStoreResource", ...
Executes the checkout for output streams without checking the access rights and without triggers. @param _out output stream where to write the file @throws EFapsException if checkout action fails
[ "Executes", "the", "checkout", "for", "output", "streams", "without", "checking", "the", "access", "rights", "and", "without", "triggers", "." ]
04b96548f518c2386a93f5ec2b9349f9b9063859
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/db/Checkout.java#L134-L147
train
eFaps/eFaps-Kernel
src/main/java/org/efaps/util/DateTimeUtil.java
DateTimeUtil.getCurrentTimeFromDB
public static Timestamp getCurrentTimeFromDB() throws EFapsException { Timestamp now = null; final ConnectionResource rsrc = Context.getThreadContext().getConnectionResource(); final Statement stmt; try { stmt = rsrc.createStatement(); final ResultSet resultse...
java
public static Timestamp getCurrentTimeFromDB() throws EFapsException { Timestamp now = null; final ConnectionResource rsrc = Context.getThreadContext().getConnectionResource(); final Statement stmt; try { stmt = rsrc.createStatement(); final ResultSet resultse...
[ "public", "static", "Timestamp", "getCurrentTimeFromDB", "(", ")", "throws", "EFapsException", "{", "Timestamp", "now", "=", "null", ";", "final", "ConnectionResource", "rsrc", "=", "Context", ".", "getThreadContext", "(", ")", ".", "getConnectionResource", "(", "...
Static method to get the current time stamp from the eFaps database. @return time stamp containing the current time of the eFaps database @throws EFapsException on error
[ "Static", "method", "to", "get", "the", "current", "time", "stamp", "from", "the", "eFaps", "database", "." ]
04b96548f518c2386a93f5ec2b9349f9b9063859
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/util/DateTimeUtil.java#L65-L81
train
casmi/casmi
src/main/java/casmi/tween/TweenAnimation.java
TweenAnimation.start
void start(long currentTime) { this.readyTime = currentTime; this.startTime = this.readyTime + this.delayTime; this.endTime = this.startTime + getDuration(); this.status = TweenAnimationStatus.RUNNING; }
java
void start(long currentTime) { this.readyTime = currentTime; this.startTime = this.readyTime + this.delayTime; this.endTime = this.startTime + getDuration(); this.status = TweenAnimationStatus.RUNNING; }
[ "void", "start", "(", "long", "currentTime", ")", "{", "this", ".", "readyTime", "=", "currentTime", ";", "this", ".", "startTime", "=", "this", ".", "readyTime", "+", "this", ".", "delayTime", ";", "this", ".", "endTime", "=", "this", ".", "startTime", ...
Starts and Restart the interpolation. Using this method can lead to some side-effects if you call it multiple times.
[ "Starts", "and", "Restart", "the", "interpolation", ".", "Using", "this", "method", "can", "lead", "to", "some", "side", "-", "effects", "if", "you", "call", "it", "multiple", "times", "." ]
90f6514a9cbce0685186e7a92beb69e22a3b11c4
https://github.com/casmi/casmi/blob/90f6514a9cbce0685186e7a92beb69e22a3b11c4/src/main/java/casmi/tween/TweenAnimation.java#L98-L103
train
casmi/casmi
src/main/java/casmi/tween/TweenAnimation.java
TweenAnimation.render
final void render(long currentTime) { if (this.getStatus() != TweenAnimationStatus.RUNNING) { return; } if (currentTime >= endTime && this.getStatus() != TweenAnimationStatus.WAIT) { this.status = TweenAnimationStatus.WAIT; return; } value = ...
java
final void render(long currentTime) { if (this.getStatus() != TweenAnimationStatus.RUNNING) { return; } if (currentTime >= endTime && this.getStatus() != TweenAnimationStatus.WAIT) { this.status = TweenAnimationStatus.WAIT; return; } value = ...
[ "final", "void", "render", "(", "long", "currentTime", ")", "{", "if", "(", "this", ".", "getStatus", "(", ")", "!=", "TweenAnimationStatus", ".", "RUNNING", ")", "{", "return", ";", "}", "if", "(", "currentTime", ">=", "endTime", "&&", "this", ".", "g...
Updates the tween state. Using this method can be unsafe if tween pooling was first enabled.
[ "Updates", "the", "tween", "state", ".", "Using", "this", "method", "can", "be", "unsafe", "if", "tween", "pooling", "was", "first", "enabled", "." ]
90f6514a9cbce0685186e7a92beb69e22a3b11c4
https://github.com/casmi/casmi/blob/90f6514a9cbce0685186e7a92beb69e22a3b11c4/src/main/java/casmi/tween/TweenAnimation.java#L109-L120
train
rometools/rome-propono
src/main/java/com/rometools/propono/blogclient/atomprotocol/AtomEntryIterator.java
AtomEntryIterator.next
@Override public BlogEntry next() { try { final ClientEntry entry = iterator.next(); if (entry instanceof ClientMediaEntry) { return new AtomResource(collection, (ClientMediaEntry) entry); } else { return new AtomEntry(collection, entry); ...
java
@Override public BlogEntry next() { try { final ClientEntry entry = iterator.next(); if (entry instanceof ClientMediaEntry) { return new AtomResource(collection, (ClientMediaEntry) entry); } else { return new AtomEntry(collection, entry); ...
[ "@", "Override", "public", "BlogEntry", "next", "(", ")", "{", "try", "{", "final", "ClientEntry", "entry", "=", "iterator", ".", "next", "(", ")", ";", "if", "(", "entry", "instanceof", "ClientMediaEntry", ")", "{", "return", "new", "AtomResource", "(", ...
Get next entry.
[ "Get", "next", "entry", "." ]
721de8d5a47998f92969d1ee3db80bdaa3f26fb2
https://github.com/rometools/rome-propono/blob/721de8d5a47998f92969d1ee3db80bdaa3f26fb2/src/main/java/com/rometools/propono/blogclient/atomprotocol/AtomEntryIterator.java#L58-L71
train
eFaps/eFaps-Kernel
src/main/java/org/efaps/db/print/Phrase.java
Phrase.getPhraseValue
public String getPhraseValue(final Instance _instance) throws EFapsException { final StringBuilder buf = new StringBuilder(); boolean added = false; for (final Token token : this.valueList.getTokens()) { switch (token.getType()) { case EXPRESSION: ...
java
public String getPhraseValue(final Instance _instance) throws EFapsException { final StringBuilder buf = new StringBuilder(); boolean added = false; for (final Token token : this.valueList.getTokens()) { switch (token.getType()) { case EXPRESSION: ...
[ "public", "String", "getPhraseValue", "(", "final", "Instance", "_instance", ")", "throws", "EFapsException", "{", "final", "StringBuilder", "buf", "=", "new", "StringBuilder", "(", ")", ";", "boolean", "added", "=", "false", ";", "for", "(", "final", "Token",...
Method to get the parsed value for this phrase. @param _instance Instance the phrase is build on @return parsed value @throws EFapsException on error
[ "Method", "to", "get", "the", "parsed", "value", "for", "this", "phrase", "." ]
04b96548f518c2386a93f5ec2b9349f9b9063859
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/db/print/Phrase.java#L79-L109
train
eFaps/eFaps-Kernel
src/main/java/org/efaps/admin/index/Indexer.java
Indexer.index
public static void index() throws EFapsException { final List<IndexDefinition> defs = IndexDefinition.get(); for (final IndexDefinition def : defs) { final QueryBuilder queryBldr = new QueryBuilder(def.getUUID()); final InstanceQuery query = queryBldr.getQuery(); ...
java
public static void index() throws EFapsException { final List<IndexDefinition> defs = IndexDefinition.get(); for (final IndexDefinition def : defs) { final QueryBuilder queryBldr = new QueryBuilder(def.getUUID()); final InstanceQuery query = queryBldr.getQuery(); ...
[ "public", "static", "void", "index", "(", ")", "throws", "EFapsException", "{", "final", "List", "<", "IndexDefinition", ">", "defs", "=", "IndexDefinition", ".", "get", "(", ")", ";", "for", "(", "final", "IndexDefinition", "def", ":", "defs", ")", "{", ...
Index or reindex using the Indexdefinitions. @throws EFapsException the e faps exception
[ "Index", "or", "reindex", "using", "the", "Indexdefinitions", "." ]
04b96548f518c2386a93f5ec2b9349f9b9063859
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/admin/index/Indexer.java#L115-L124
train
navnorth/LRJavaLib
src/com/navnorth/learningregistry/LRVerify.java
LRVerify.VerifyStrings
public static boolean VerifyStrings(String signature, String message, String publicKey) throws LRException { // Check that none of the inputs are null if (signature == null || message == null || publicKey == null) { throw new LRException(LRException.NULL_FIELD); } // Convert all inputs into input stream...
java
public static boolean VerifyStrings(String signature, String message, String publicKey) throws LRException { // Check that none of the inputs are null if (signature == null || message == null || publicKey == null) { throw new LRException(LRException.NULL_FIELD); } // Convert all inputs into input stream...
[ "public", "static", "boolean", "VerifyStrings", "(", "String", "signature", ",", "String", "message", ",", "String", "publicKey", ")", "throws", "LRException", "{", "// Check that none of the inputs are null", "if", "(", "signature", "==", "null", "||", "message", "...
Converts input strings to input streams for the main verify function @param signature String of the signature @param message String of the message @param publicKey String of the public key @return true if signing is verified, false if not @throws LRException NULL_FIELD if any field is null, INPUT_STREAM_FAILED if any ...
[ "Converts", "input", "strings", "to", "input", "streams", "for", "the", "main", "verify", "function" ]
27af28b9f80d772273592414e7d0dccffaac09e1
https://github.com/navnorth/LRJavaLib/blob/27af28b9f80d772273592414e7d0dccffaac09e1/src/com/navnorth/learningregistry/LRVerify.java#L69-L95
train
navnorth/LRJavaLib
src/com/navnorth/learningregistry/LRVerify.java
LRVerify.Verify
private static boolean Verify(InputStream isSignature, InputStream isMessage, InputStream isPublicKey) throws LRException { // Get the public key ring collection from the public key input stream PGPPublicKeyRingCollection pgpRings = null; try { pgpRings = new PGPPublicKeyRingCollection(PGPUtil.getDec...
java
private static boolean Verify(InputStream isSignature, InputStream isMessage, InputStream isPublicKey) throws LRException { // Get the public key ring collection from the public key input stream PGPPublicKeyRingCollection pgpRings = null; try { pgpRings = new PGPPublicKeyRingCollection(PGPUtil.getDec...
[ "private", "static", "boolean", "Verify", "(", "InputStream", "isSignature", ",", "InputStream", "isMessage", ",", "InputStream", "isPublicKey", ")", "throws", "LRException", "{", "// Get the public key ring collection from the public key input stream", "PGPPublicKeyRingCollectio...
Verfies that the provided message and signature using the public key @param isSignature InputStream of the signature @param isMessage InputStream of the message @param isPublicKey InputStream of the public key @throws LRException
[ "Verfies", "that", "the", "provided", "message", "and", "signature", "using", "the", "public", "key" ]
27af28b9f80d772273592414e7d0dccffaac09e1
https://github.com/navnorth/LRJavaLib/blob/27af28b9f80d772273592414e7d0dccffaac09e1/src/com/navnorth/learningregistry/LRVerify.java#L105-L181
train
impossibl/stencil
engine/src/main/java/com/impossibl/stencil/engine/StencilEngine.java
StencilEngine.setGlobalScopes
public void setGlobalScopes(Iterable<GlobalScope> globalScopes) { this.globalScopes = Lists.newArrayList(Iterables.concat(globalScopes, serviceGlobalScopes)); }
java
public void setGlobalScopes(Iterable<GlobalScope> globalScopes) { this.globalScopes = Lists.newArrayList(Iterables.concat(globalScopes, serviceGlobalScopes)); }
[ "public", "void", "setGlobalScopes", "(", "Iterable", "<", "GlobalScope", ">", "globalScopes", ")", "{", "this", ".", "globalScopes", "=", "Lists", ".", "newArrayList", "(", "Iterables", ".", "concat", "(", "globalScopes", ",", "serviceGlobalScopes", ")", ")", ...
Sets the active global scopes @param globalScopes New active global scopes
[ "Sets", "the", "active", "global", "scopes" ]
4aac1be605542b4248be95bf8916be4e2f755d1c
https://github.com/impossibl/stencil/blob/4aac1be605542b4248be95bf8916be4e2f755d1c/engine/src/main/java/com/impossibl/stencil/engine/StencilEngine.java#L144-L146
train
impossibl/stencil
engine/src/main/java/com/impossibl/stencil/engine/StencilEngine.java
StencilEngine.render
public void render(String path, Map<String, Object> parameters, Writer out, GlobalScope... extraGlobalScopes) throws IOException, ParseException { render(load(path), parameters, out); }
java
public void render(String path, Map<String, Object> parameters, Writer out, GlobalScope... extraGlobalScopes) throws IOException, ParseException { render(load(path), parameters, out); }
[ "public", "void", "render", "(", "String", "path", ",", "Map", "<", "String", ",", "Object", ">", "parameters", ",", "Writer", "out", ",", "GlobalScope", "...", "extraGlobalScopes", ")", "throws", "IOException", ",", "ParseException", "{", "render", "(", "lo...
Renders template loaded from the given path with provided parameters to the given character stream. @param path Path to load template from @param parameters Parameters to pass to template @param out Character stream to write to @param extraGlobalScopes Any extra global scopes to make available @throws IOException @thr...
[ "Renders", "template", "loaded", "from", "the", "given", "path", "with", "provided", "parameters", "to", "the", "given", "character", "stream", "." ]
4aac1be605542b4248be95bf8916be4e2f755d1c
https://github.com/impossibl/stencil/blob/4aac1be605542b4248be95bf8916be4e2f755d1c/engine/src/main/java/com/impossibl/stencil/engine/StencilEngine.java#L159-L161
train
impossibl/stencil
engine/src/main/java/com/impossibl/stencil/engine/StencilEngine.java
StencilEngine.renderInline
public void renderInline(String text, Map<String, Object> parameters, Writer out, GlobalScope... extraGlobalScopes) throws IOException, ParseException { render(loadInline(text), parameters, out, extraGlobalScopes); }
java
public void renderInline(String text, Map<String, Object> parameters, Writer out, GlobalScope... extraGlobalScopes) throws IOException, ParseException { render(loadInline(text), parameters, out, extraGlobalScopes); }
[ "public", "void", "renderInline", "(", "String", "text", ",", "Map", "<", "String", ",", "Object", ">", "parameters", ",", "Writer", "out", ",", "GlobalScope", "...", "extraGlobalScopes", ")", "throws", "IOException", ",", "ParseException", "{", "render", "(",...
Renders given text with the provided parameters to the given character stream. @param text Template text to render @param parameters Parameters to pass to template @param out Character stream to write to @param extraGlobalScopes Any extra global scopes to make available @throws IOException @throws ParseException
[ "Renders", "given", "text", "with", "the", "provided", "parameters", "to", "the", "given", "character", "stream", "." ]
4aac1be605542b4248be95bf8916be4e2f755d1c
https://github.com/impossibl/stencil/blob/4aac1be605542b4248be95bf8916be4e2f755d1c/engine/src/main/java/com/impossibl/stencil/engine/StencilEngine.java#L174-L176
train
impossibl/stencil
engine/src/main/java/com/impossibl/stencil/engine/StencilEngine.java
StencilEngine.render
public void render(Template template, Map<String, Object> parameters, Writer out, GlobalScope... extraGlobalScopes) throws IOException { newInterpreter(extraGlobalScopes).declare(parameters).process((TemplateImpl) template, out); }
java
public void render(Template template, Map<String, Object> parameters, Writer out, GlobalScope... extraGlobalScopes) throws IOException { newInterpreter(extraGlobalScopes).declare(parameters).process((TemplateImpl) template, out); }
[ "public", "void", "render", "(", "Template", "template", ",", "Map", "<", "String", ",", "Object", ">", "parameters", ",", "Writer", "out", ",", "GlobalScope", "...", "extraGlobalScopes", ")", "throws", "IOException", "{", "newInterpreter", "(", "extraGlobalScop...
Renders given template with provided parameters to the given character stream. @param template Previously loaded template to render @param parameters Parameters to pass to template @param out Character stream to write to @param extraGlobalScopes Any extra global scopes to make available @throws IOException
[ "Renders", "given", "template", "with", "provided", "parameters", "to", "the", "given", "character", "stream", "." ]
4aac1be605542b4248be95bf8916be4e2f755d1c
https://github.com/impossibl/stencil/blob/4aac1be605542b4248be95bf8916be4e2f755d1c/engine/src/main/java/com/impossibl/stencil/engine/StencilEngine.java#L188-L190
train
impossibl/stencil
engine/src/main/java/com/impossibl/stencil/engine/StencilEngine.java
StencilEngine.render
public void render(Template template, Writer out, GlobalScope... extraGlobalScopes) throws IOException { newInterpreter(extraGlobalScopes).process((TemplateImpl) template, out); }
java
public void render(Template template, Writer out, GlobalScope... extraGlobalScopes) throws IOException { newInterpreter(extraGlobalScopes).process((TemplateImpl) template, out); }
[ "public", "void", "render", "(", "Template", "template", ",", "Writer", "out", ",", "GlobalScope", "...", "extraGlobalScopes", ")", "throws", "IOException", "{", "newInterpreter", "(", "extraGlobalScopes", ")", ".", "process", "(", "(", "TemplateImpl", ")", "tem...
Renders given template to the given character stream. @param template Previously loaded template to render @param out Character stream to write to @param extraGlobalScopes Any extra global scopes to make available @throws IOException
[ "Renders", "given", "template", "to", "the", "given", "character", "stream", "." ]
4aac1be605542b4248be95bf8916be4e2f755d1c
https://github.com/impossibl/stencil/blob/4aac1be605542b4248be95bf8916be4e2f755d1c/engine/src/main/java/com/impossibl/stencil/engine/StencilEngine.java#L228-L230
train
impossibl/stencil
engine/src/main/java/com/impossibl/stencil/engine/StencilEngine.java
StencilEngine.render
public String render(Template template, Map<String, Object> parameters, GlobalScope... extraGlobalScopes) throws IOException { StringWriter out = new StringWriter(); render(template, parameters, out, extraGlobalScopes); return out.toString(); }
java
public String render(Template template, Map<String, Object> parameters, GlobalScope... extraGlobalScopes) throws IOException { StringWriter out = new StringWriter(); render(template, parameters, out, extraGlobalScopes); return out.toString(); }
[ "public", "String", "render", "(", "Template", "template", ",", "Map", "<", "String", ",", "Object", ">", "parameters", ",", "GlobalScope", "...", "extraGlobalScopes", ")", "throws", "IOException", "{", "StringWriter", "out", "=", "new", "StringWriter", "(", "...
Renders given template with the provided parameters and returns the rendered text. @param template Previously loaded template to render @param parameters Parameters to pass to template @param extraGlobalScopes Any extra global scopes to make available @return Rendered text @throws IOException
[ "Renders", "given", "template", "with", "the", "provided", "parameters", "and", "returns", "the", "rendered", "text", "." ]
4aac1be605542b4248be95bf8916be4e2f755d1c
https://github.com/impossibl/stencil/blob/4aac1be605542b4248be95bf8916be4e2f755d1c/engine/src/main/java/com/impossibl/stencil/engine/StencilEngine.java#L271-L275
train
impossibl/stencil
engine/src/main/java/com/impossibl/stencil/engine/StencilEngine.java
StencilEngine.render
public String render(String path, GlobalScope... extraGlobalScopes) throws IOException, ParseException { return render(load(path), extraGlobalScopes); }
java
public String render(String path, GlobalScope... extraGlobalScopes) throws IOException, ParseException { return render(load(path), extraGlobalScopes); }
[ "public", "String", "render", "(", "String", "path", ",", "GlobalScope", "...", "extraGlobalScopes", ")", "throws", "IOException", ",", "ParseException", "{", "return", "render", "(", "load", "(", "path", ")", ",", "extraGlobalScopes", ")", ";", "}" ]
Renders template loaded from path and returns rendered text. @param path Path to load template from @param extraGlobalScopes Any extra global scopes to make available @return Rendered text @throws IOException @throws ParseException
[ "Renders", "template", "loaded", "from", "path", "and", "returns", "rendered", "text", "." ]
4aac1be605542b4248be95bf8916be4e2f755d1c
https://github.com/impossibl/stencil/blob/4aac1be605542b4248be95bf8916be4e2f755d1c/engine/src/main/java/com/impossibl/stencil/engine/StencilEngine.java#L286-L288
train
impossibl/stencil
engine/src/main/java/com/impossibl/stencil/engine/StencilEngine.java
StencilEngine.renderInline
public String renderInline(String text, GlobalScope... extraGlobalScopes) throws IOException, ParseException { return render(loadInline(text), extraGlobalScopes); }
java
public String renderInline(String text, GlobalScope... extraGlobalScopes) throws IOException, ParseException { return render(loadInline(text), extraGlobalScopes); }
[ "public", "String", "renderInline", "(", "String", "text", ",", "GlobalScope", "...", "extraGlobalScopes", ")", "throws", "IOException", ",", "ParseException", "{", "return", "render", "(", "loadInline", "(", "text", ")", ",", "extraGlobalScopes", ")", ";", "}" ...
Renders given text and returns rendered text. @param text Template text to render @param extraGlobalScopes Any extra global scopes to make available @return Rendered text @throws IOException @throws ParseException
[ "Renders", "given", "text", "and", "returns", "rendered", "text", "." ]
4aac1be605542b4248be95bf8916be4e2f755d1c
https://github.com/impossibl/stencil/blob/4aac1be605542b4248be95bf8916be4e2f755d1c/engine/src/main/java/com/impossibl/stencil/engine/StencilEngine.java#L299-L301
train
impossibl/stencil
engine/src/main/java/com/impossibl/stencil/engine/StencilEngine.java
StencilEngine.render
public String render(Template template, GlobalScope... extraGlobalScopes) throws IOException { StringWriter out = new StringWriter(); render(template, out, extraGlobalScopes); return out.toString(); }
java
public String render(Template template, GlobalScope... extraGlobalScopes) throws IOException { StringWriter out = new StringWriter(); render(template, out, extraGlobalScopes); return out.toString(); }
[ "public", "String", "render", "(", "Template", "template", ",", "GlobalScope", "...", "extraGlobalScopes", ")", "throws", "IOException", "{", "StringWriter", "out", "=", "new", "StringWriter", "(", ")", ";", "render", "(", "template", ",", "out", ",", "extraGl...
Renders given template and returns rendered text. @param template Previously loaded template to render @param extraGlobalScopes Any extra global scopes to make available @return Rendered text @throws IOException
[ "Renders", "given", "template", "and", "returns", "rendered", "text", "." ]
4aac1be605542b4248be95bf8916be4e2f755d1c
https://github.com/impossibl/stencil/blob/4aac1be605542b4248be95bf8916be4e2f755d1c/engine/src/main/java/com/impossibl/stencil/engine/StencilEngine.java#L311-L315
train
impossibl/stencil
engine/src/main/java/com/impossibl/stencil/engine/StencilEngine.java
StencilEngine.loadInline
public Template loadInline(String text) throws IOException, ParseException { try(InlineTemplateSource templateSource = new InlineTemplateSource(text)) { return load("inline", templateSource); } }
java
public Template loadInline(String text) throws IOException, ParseException { try(InlineTemplateSource templateSource = new InlineTemplateSource(text)) { return load("inline", templateSource); } }
[ "public", "Template", "loadInline", "(", "String", "text", ")", "throws", "IOException", ",", "ParseException", "{", "try", "(", "InlineTemplateSource", "templateSource", "=", "new", "InlineTemplateSource", "(", "text", ")", ")", "{", "return", "load", "(", "\"i...
Loads the given text as a template @param text Template text @return Loaded template @throws IOException @throws ParseException
[ "Loads", "the", "given", "text", "as", "a", "template" ]
4aac1be605542b4248be95bf8916be4e2f755d1c
https://github.com/impossibl/stencil/blob/4aac1be605542b4248be95bf8916be4e2f755d1c/engine/src/main/java/com/impossibl/stencil/engine/StencilEngine.java#L324-L331
train
impossibl/stencil
engine/src/main/java/com/impossibl/stencil/engine/StencilEngine.java
StencilEngine.load
public Template load(String path) throws IOException, ParseException { try(TemplateSource source = sourceLoader.find(path)) { if (source != null) { return load(path, source); } } return null; }
java
public Template load(String path) throws IOException, ParseException { try(TemplateSource source = sourceLoader.find(path)) { if (source != null) { return load(path, source); } } return null; }
[ "public", "Template", "load", "(", "String", "path", ")", "throws", "IOException", ",", "ParseException", "{", "try", "(", "TemplateSource", "source", "=", "sourceLoader", ".", "find", "(", "path", ")", ")", "{", "if", "(", "source", "!=", "null", ")", "...
Loads a template from the given path @param path Path to load template from @return Loaded template @throws IOException @throws ParseException
[ "Loads", "a", "template", "from", "the", "given", "path" ]
4aac1be605542b4248be95bf8916be4e2f755d1c
https://github.com/impossibl/stencil/blob/4aac1be605542b4248be95bf8916be4e2f755d1c/engine/src/main/java/com/impossibl/stencil/engine/StencilEngine.java#L341-L353
train
eFaps/eFaps-Kernel
src/main/java/org/efaps/db/MultiPrintQuery.java
MultiPrintQuery.next
public boolean next() throws EFapsException { boolean ret = false; if (this.iterator == null) { this.iterator = this.instances.iterator(); } if (this.iterator.hasNext()) { this.current = this.iterator.next(); ret = true; } i...
java
public boolean next() throws EFapsException { boolean ret = false; if (this.iterator == null) { this.iterator = this.instances.iterator(); } if (this.iterator.hasNext()) { this.current = this.iterator.next(); ret = true; } i...
[ "public", "boolean", "next", "(", ")", "throws", "EFapsException", "{", "boolean", "ret", "=", "false", ";", "if", "(", "this", ".", "iterator", "==", "null", ")", "{", "this", ".", "iterator", "=", "this", ".", "instances", ".", "iterator", "(", ")", ...
Method to move the iterator to the next value. @return true if the iterator was moved successfully to the next value @throws EFapsException on error
[ "Method", "to", "move", "the", "iterator", "to", "the", "next", "value", "." ]
04b96548f518c2386a93f5ec2b9349f9b9063859
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/db/MultiPrintQuery.java#L192-L212
train
eFaps/eFaps-Kernel
src/main/java/org/efaps/admin/datamodel/ui/UIValue.java
UIValue.executeEvents
protected Object executeEvents(final EventType _eventType, final TargetMode _targetMode) throws EFapsException { Object ret = null; if (this.fieldId > 0 && getField().hasEvents(_eventType)) { final List<EventDefinition> events = getField().getE...
java
protected Object executeEvents(final EventType _eventType, final TargetMode _targetMode) throws EFapsException { Object ret = null; if (this.fieldId > 0 && getField().hasEvents(_eventType)) { final List<EventDefinition> events = getField().getE...
[ "protected", "Object", "executeEvents", "(", "final", "EventType", "_eventType", ",", "final", "TargetMode", "_targetMode", ")", "throws", "EFapsException", "{", "Object", "ret", "=", "null", ";", "if", "(", "this", ".", "fieldId", ">", "0", "&&", "getField", ...
Executes the field value events for a field. @param _eventType type of event to be executed @param _targetMode targetmode @throws EFapsException on error @return string from called field value events or <code>null</code> if no field value event is defined
[ "Executes", "the", "field", "value", "events", "for", "a", "field", "." ]
04b96548f518c2386a93f5ec2b9349f9b9063859
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/admin/datamodel/ui/UIValue.java#L298-L341
train
casmi/casmi
src/main/java/casmi/graphics/element/Element.java
Element.setPosition
public void setPosition(double x, double y, double z) { this.x = x; this.y = y; this.z = z; }
java
public void setPosition(double x, double y, double z) { this.x = x; this.y = y; this.z = z; }
[ "public", "void", "setPosition", "(", "double", "x", ",", "double", "y", ",", "double", "z", ")", "{", "this", ".", "x", "=", "x", ";", "this", ".", "y", "=", "y", ";", "this", ".", "z", "=", "z", ";", "}" ]
Sets the position of the Element in 3D. @param x x-coordinate @param y y-coordinate @param z z-coordinate
[ "Sets", "the", "position", "of", "the", "Element", "in", "3D", "." ]
90f6514a9cbce0685186e7a92beb69e22a3b11c4
https://github.com/casmi/casmi/blob/90f6514a9cbce0685186e7a92beb69e22a3b11c4/src/main/java/casmi/graphics/element/Element.java#L436-L440
train
casmi/casmi
src/main/java/casmi/graphics/element/Element.java
Element.setPosition
public void setPosition(Vector3D v) { this.x = v.getX(); this.y = v.getY(); this.z = v.getZ(); }
java
public void setPosition(Vector3D v) { this.x = v.getX(); this.y = v.getY(); this.z = v.getZ(); }
[ "public", "void", "setPosition", "(", "Vector3D", "v", ")", "{", "this", ".", "x", "=", "v", ".", "getX", "(", ")", ";", "this", ".", "y", "=", "v", ".", "getY", "(", ")", ";", "this", ".", "z", "=", "v", ".", "getZ", "(", ")", ";", "}" ]
Sets the position of the Element in 2D. @param v the vertex of the position of the Element
[ "Sets", "the", "position", "of", "the", "Element", "in", "2D", "." ]
90f6514a9cbce0685186e7a92beb69e22a3b11c4
https://github.com/casmi/casmi/blob/90f6514a9cbce0685186e7a92beb69e22a3b11c4/src/main/java/casmi/graphics/element/Element.java#L447-L451
train
casmi/casmi
src/main/java/casmi/graphics/element/Element.java
Element.setRotation
public void setRotation(double angle, double x, double y, double z) { this.rotateX = angle * x; this.rotateY = angle * y; this.rotate = angle * z; }
java
public void setRotation(double angle, double x, double y, double z) { this.rotateX = angle * x; this.rotateY = angle * y; this.rotate = angle * z; }
[ "public", "void", "setRotation", "(", "double", "angle", ",", "double", "x", ",", "double", "y", ",", "double", "z", ")", "{", "this", ".", "rotateX", "=", "angle", "*", "x", ";", "this", ".", "rotateY", "=", "angle", "*", "y", ";", "this", ".", ...
Sets the rotation angle of the Element. This method wraps the glRotate method. @param angle The angle of rotation @param x The rate of rotation angle round x-axis @param y The rate of rotation angle round x-axis @param z The rate of rotation angle round x-axis
[ "Sets", "the", "rotation", "angle", "of", "the", "Element", ".", "This", "method", "wraps", "the", "glRotate", "method", "." ]
90f6514a9cbce0685186e7a92beb69e22a3b11c4
https://github.com/casmi/casmi/blob/90f6514a9cbce0685186e7a92beb69e22a3b11c4/src/main/java/casmi/graphics/element/Element.java#L496-L500
train
casmi/casmi
src/main/java/casmi/graphics/element/Element.java
Element.setScale
public void setScale(double scaleX, double scaleY, double scaleZ) { this.scaleX = scaleX; this.scaleY = scaleY; this.scaleZ = scaleZ; }
java
public void setScale(double scaleX, double scaleY, double scaleZ) { this.scaleX = scaleX; this.scaleY = scaleY; this.scaleZ = scaleZ; }
[ "public", "void", "setScale", "(", "double", "scaleX", ",", "double", "scaleY", ",", "double", "scaleZ", ")", "{", "this", ".", "scaleX", "=", "scaleX", ";", "this", ".", "scaleY", "=", "scaleY", ";", "this", ".", "scaleZ", "=", "scaleZ", ";", "}" ]
Sets the scale of the Element @param scaleX The scale of the Element of x-axis direction @param scaleY The scale of the Element of y-axis direction @param scaleZ The scale of the Element of z-axis direction
[ "Sets", "the", "scale", "of", "the", "Element" ]
90f6514a9cbce0685186e7a92beb69e22a3b11c4
https://github.com/casmi/casmi/blob/90f6514a9cbce0685186e7a92beb69e22a3b11c4/src/main/java/casmi/graphics/element/Element.java#L627-L631
train
casmi/casmi
src/main/java/casmi/graphics/element/Element.java
Element.addMouseEventCallback
public void addMouseEventCallback(MouseEventCallback callback) { if (mouseEventCallbacks == null) { mouseEventCallbacks = new ArrayList<MouseEventCallback>(); } mouseEventCallbacks.add(callback); }
java
public void addMouseEventCallback(MouseEventCallback callback) { if (mouseEventCallbacks == null) { mouseEventCallbacks = new ArrayList<MouseEventCallback>(); } mouseEventCallbacks.add(callback); }
[ "public", "void", "addMouseEventCallback", "(", "MouseEventCallback", "callback", ")", "{", "if", "(", "mouseEventCallbacks", "==", "null", ")", "{", "mouseEventCallbacks", "=", "new", "ArrayList", "<", "MouseEventCallback", ">", "(", ")", ";", "}", "mouseEventCal...
Add a mouse event callback to a element @param callback mouseEventCallback
[ "Add", "a", "mouse", "event", "callback", "to", "a", "element" ]
90f6514a9cbce0685186e7a92beb69e22a3b11c4
https://github.com/casmi/casmi/blob/90f6514a9cbce0685186e7a92beb69e22a3b11c4/src/main/java/casmi/graphics/element/Element.java#L758-L763
train
owetterau/neo4j-websockets
client/src/main/java/de/oliverwetterau/neo4j/websockets/client/DatabaseService.java
DatabaseService.writeDataWithResult
@SuppressWarnings("unchecked") protected Result<JsonNode> writeDataWithResult(final ObjectNode message, final ObjectMapper objectMapper) { Result<JsonNode> result; byte[] binaryResultMessage = null; String textResultMessage = null; // convert json into map try { ...
java
@SuppressWarnings("unchecked") protected Result<JsonNode> writeDataWithResult(final ObjectNode message, final ObjectMapper objectMapper) { Result<JsonNode> result; byte[] binaryResultMessage = null; String textResultMessage = null; // convert json into map try { ...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "protected", "Result", "<", "JsonNode", ">", "writeDataWithResult", "(", "final", "ObjectNode", "message", ",", "final", "ObjectMapper", "objectMapper", ")", "{", "Result", "<", "JsonNode", ">", "result", ";", ...
Sends a write message to a Neo4j cluster and returns the data server's answer. @param message service name, method name, language settingsa and method parameters in one json node @param objectMapper json object mapper used for serialization @return data server's answer
[ "Sends", "a", "write", "message", "to", "a", "Neo4j", "cluster", "and", "returns", "the", "data", "server", "s", "answer", "." ]
ca3481066819d01169873aeb145ab3bf5c736afe
https://github.com/owetterau/neo4j-websockets/blob/ca3481066819d01169873aeb145ab3bf5c736afe/client/src/main/java/de/oliverwetterau/neo4j/websockets/client/DatabaseService.java#L221-L260
train
tvesalainen/lpg
src/main/java/org/vesalainen/grammar/Grammar.java
Grammar.addSyntheticRule
public void addSyntheticRule(ExecutableElement reducer, String nonterminal, String... rhs) { addRule(reducer, nonterminal, "", true, Arrays.asList(rhs)); }
java
public void addSyntheticRule(ExecutableElement reducer, String nonterminal, String... rhs) { addRule(reducer, nonterminal, "", true, Arrays.asList(rhs)); }
[ "public", "void", "addSyntheticRule", "(", "ExecutableElement", "reducer", ",", "String", "nonterminal", ",", "String", "...", "rhs", ")", "{", "addRule", "(", "reducer", ",", "nonterminal", ",", "\"\"", ",", "true", ",", "Arrays", ".", "asList", "(", "rhs",...
Adds new rule if the same rule doesn't exist already. Rhs is added as-is. Sequences, choices or quantifiers are not parsed. @param nonterminal Left hand side of the rule. @param rhs @see BnfGrammarFactory
[ "Adds", "new", "rule", "if", "the", "same", "rule", "doesn", "t", "exist", "already", ".", "Rhs", "is", "added", "as", "-", "is", ".", "Sequences", "choices", "or", "quantifiers", "are", "not", "parsed", "." ]
0917b8d295e9772b9f8a0affc258a08530cd567a
https://github.com/tvesalainen/lpg/blob/0917b8d295e9772b9f8a0affc258a08530cd567a/src/main/java/org/vesalainen/grammar/Grammar.java#L251-L254
train
tvesalainen/lpg
src/main/java/org/vesalainen/grammar/Grammar.java
Grammar.addAnonymousTerminal
public void addAnonymousTerminal(String expression, Option... options) { addTerminal(null, "'"+expression+"'", expression, "", 0, 10, options); }
java
public void addAnonymousTerminal(String expression, Option... options) { addTerminal(null, "'"+expression+"'", expression, "", 0, 10, options); }
[ "public", "void", "addAnonymousTerminal", "(", "String", "expression", ",", "Option", "...", "options", ")", "{", "addTerminal", "(", "null", ",", "\"'\"", "+", "expression", "+", "\"'\"", ",", "expression", ",", "\"\"", ",", "0", ",", "10", ",", "options"...
Adds anonymous terminal. Anonymous terminals name is 'expression' @param expression @param options
[ "Adds", "anonymous", "terminal", ".", "Anonymous", "terminals", "name", "is", "expression" ]
0917b8d295e9772b9f8a0affc258a08530cd567a
https://github.com/tvesalainen/lpg/blob/0917b8d295e9772b9f8a0affc258a08530cd567a/src/main/java/org/vesalainen/grammar/Grammar.java#L348-L351
train
tvesalainen/lpg
src/main/java/org/vesalainen/grammar/Grammar.java
Grammar.getParserGenerator
public LALRKParserGenerator getParserGenerator(ParseMethod parseMethod) { Grammar g = new Grammar(parseMethod.start(), this, parseMethod.eof(), parseMethod.whiteSpace()); try { return g.createParserGenerator(parseMethod.start(), ParserFeature.get(parseMethod)); } ...
java
public LALRKParserGenerator getParserGenerator(ParseMethod parseMethod) { Grammar g = new Grammar(parseMethod.start(), this, parseMethod.eof(), parseMethod.whiteSpace()); try { return g.createParserGenerator(parseMethod.start(), ParserFeature.get(parseMethod)); } ...
[ "public", "LALRKParserGenerator", "getParserGenerator", "(", "ParseMethod", "parseMethod", ")", "{", "Grammar", "g", "=", "new", "Grammar", "(", "parseMethod", ".", "start", "(", ")", ",", "this", ",", "parseMethod", ".", "eof", "(", ")", ",", "parseMethod", ...
Return a parser generator from grammar. The same grammar can produce different parsers depending for example on start rhs. @return
[ "Return", "a", "parser", "generator", "from", "grammar", ".", "The", "same", "grammar", "can", "produce", "different", "parsers", "depending", "for", "example", "on", "start", "rhs", "." ]
0917b8d295e9772b9f8a0affc258a08530cd567a
https://github.com/tvesalainen/lpg/blob/0917b8d295e9772b9f8a0affc258a08530cd567a/src/main/java/org/vesalainen/grammar/Grammar.java#L394-L405
train
tvesalainen/lpg
src/main/java/org/vesalainen/regex/RangeSet.java
RangeSet.add
public void add(CharRange cond) { if (set.isEmpty()) { set.add(cond); } else { List<CharRange> remlist = new ArrayList<CharRange>(); List<CharRange> addlist = new ArrayList<CharRange>(); boolean is = false; ...
java
public void add(CharRange cond) { if (set.isEmpty()) { set.add(cond); } else { List<CharRange> remlist = new ArrayList<CharRange>(); List<CharRange> addlist = new ArrayList<CharRange>(); boolean is = false; ...
[ "public", "void", "add", "(", "CharRange", "cond", ")", "{", "if", "(", "set", ".", "isEmpty", "(", ")", ")", "{", "set", ".", "add", "(", "cond", ")", ";", "}", "else", "{", "List", "<", "CharRange", ">", "remlist", "=", "new", "ArrayList", "<",...
Adds a CharRange @param cond
[ "Adds", "a", "CharRange" ]
0917b8d295e9772b9f8a0affc258a08530cd567a
https://github.com/tvesalainen/lpg/blob/0917b8d295e9772b9f8a0affc258a08530cd567a/src/main/java/org/vesalainen/regex/RangeSet.java#L116-L143
train
tvesalainen/lpg
src/main/java/org/vesalainen/regex/RangeSet.java
RangeSet.split
public static RangeSet split(Collection<RangeSet> rangeSets) { RangeSet result = new RangeSet(); SortedSet<Integer> ss = new TreeSet<Integer>(); for (RangeSet rs : rangeSets) { for (CharRange r : rs) { ss.add(r.getFrom()); ...
java
public static RangeSet split(Collection<RangeSet> rangeSets) { RangeSet result = new RangeSet(); SortedSet<Integer> ss = new TreeSet<Integer>(); for (RangeSet rs : rangeSets) { for (CharRange r : rs) { ss.add(r.getFrom()); ...
[ "public", "static", "RangeSet", "split", "(", "Collection", "<", "RangeSet", ">", "rangeSets", ")", "{", "RangeSet", "result", "=", "new", "RangeSet", "(", ")", ";", "SortedSet", "<", "Integer", ">", "ss", "=", "new", "TreeSet", "<", "Integer", ">", "(",...
Converts a possibly overlapping collection of RangesSet's into a non overlapping RangeSet that accepts the same characters. @param rangeSets @return
[ "Converts", "a", "possibly", "overlapping", "collection", "of", "RangesSet", "s", "into", "a", "non", "overlapping", "RangeSet", "that", "accepts", "the", "same", "characters", "." ]
0917b8d295e9772b9f8a0affc258a08530cd567a
https://github.com/tvesalainen/lpg/blob/0917b8d295e9772b9f8a0affc258a08530cd567a/src/main/java/org/vesalainen/regex/RangeSet.java#L217-L251
train
tvesalainen/lpg
src/main/java/org/vesalainen/regex/RangeSet.java
RangeSet.isIntersecting
public boolean isIntersecting(Collection<RangeSet> rangeSets) { for (RangeSet rs : rangeSets) { for (CharRange r1 : rs) { for (CharRange r2 : this) { if (r1.intersect(r2)) { ...
java
public boolean isIntersecting(Collection<RangeSet> rangeSets) { for (RangeSet rs : rangeSets) { for (CharRange r1 : rs) { for (CharRange r2 : this) { if (r1.intersect(r2)) { ...
[ "public", "boolean", "isIntersecting", "(", "Collection", "<", "RangeSet", ">", "rangeSets", ")", "{", "for", "(", "RangeSet", "rs", ":", "rangeSets", ")", "{", "for", "(", "CharRange", "r1", ":", "rs", ")", "{", "for", "(", "CharRange", "r2", ":", "th...
Returns true only if any two of RangeSet's is intersecting with each other. @param rangeSets @return
[ "Returns", "true", "only", "if", "any", "two", "of", "RangeSet", "s", "is", "intersecting", "with", "each", "other", "." ]
0917b8d295e9772b9f8a0affc258a08530cd567a
https://github.com/tvesalainen/lpg/blob/0917b8d295e9772b9f8a0affc258a08530cd567a/src/main/java/org/vesalainen/regex/RangeSet.java#L266-L282
train
tvesalainen/lpg
src/main/java/org/vesalainen/regex/RangeSet.java
RangeSet.merge
public static RangeSet merge(RangeSet rs) { RangeSet result = new RangeSet(); int from = -1; int to = -1; for (CharRange r : rs) { if (from == -1) // first { from = r.getFrom(); to = r.getTo(); } ...
java
public static RangeSet merge(RangeSet rs) { RangeSet result = new RangeSet(); int from = -1; int to = -1; for (CharRange r : rs) { if (from == -1) // first { from = r.getFrom(); to = r.getTo(); } ...
[ "public", "static", "RangeSet", "merge", "(", "RangeSet", "rs", ")", "{", "RangeSet", "result", "=", "new", "RangeSet", "(", ")", ";", "int", "from", "=", "-", "1", ";", "int", "to", "=", "-", "1", ";", "for", "(", "CharRange", "r", ":", "rs", ")...
Returns a new RangeSet that accepts the same characters as argument. Ranges that are followinf each other are concatenated. @param rs @return
[ "Returns", "a", "new", "RangeSet", "that", "accepts", "the", "same", "characters", "as", "argument", ".", "Ranges", "that", "are", "followinf", "each", "other", "are", "concatenated", "." ]
0917b8d295e9772b9f8a0affc258a08530cd567a
https://github.com/tvesalainen/lpg/blob/0917b8d295e9772b9f8a0affc258a08530cd567a/src/main/java/org/vesalainen/regex/RangeSet.java#L345-L373
train
tvesalainen/lpg
src/main/java/org/vesalainen/regex/RangeSet.java
RangeSet.complement
public RangeSet complement() { SortedSet<CharRange> nset = new TreeSet<CharRange>(); int from = 0; for (CharRange r : set) { int to = r.getFrom(); if (from < to) { nset.add(new CharRange(from, to)); } ...
java
public RangeSet complement() { SortedSet<CharRange> nset = new TreeSet<CharRange>(); int from = 0; for (CharRange r : set) { int to = r.getFrom(); if (from < to) { nset.add(new CharRange(from, to)); } ...
[ "public", "RangeSet", "complement", "(", ")", "{", "SortedSet", "<", "CharRange", ">", "nset", "=", "new", "TreeSet", "<", "CharRange", ">", "(", ")", ";", "int", "from", "=", "0", ";", "for", "(", "CharRange", "r", ":", "set", ")", "{", "int", "to...
Return a complement RangeSet. In other words a RangeSet doesn't accept any of this rangesets characters and accepts all other characters. @return
[ "Return", "a", "complement", "RangeSet", ".", "In", "other", "words", "a", "RangeSet", "doesn", "t", "accept", "any", "of", "this", "rangesets", "characters", "and", "accepts", "all", "other", "characters", "." ]
0917b8d295e9772b9f8a0affc258a08530cd567a
https://github.com/tvesalainen/lpg/blob/0917b8d295e9772b9f8a0affc258a08530cd567a/src/main/java/org/vesalainen/regex/RangeSet.java#L394-L412
train
eFaps/eFaps-Kernel
src/main/java/org/efaps/db/wrapper/TableIndexer.java
TableIndexer.getTableIdx
public TableIdx getTableIdx(final String _tableName, final String... _keys) { TableIdx ret = null; final String key = _tableName + "-" + StringUtils.join(_keys, "-"); final Optional<TableIdx> val = this.tableidxs.stream().filter(t -> t.getKey().equals(key)).fi...
java
public TableIdx getTableIdx(final String _tableName, final String... _keys) { TableIdx ret = null; final String key = _tableName + "-" + StringUtils.join(_keys, "-"); final Optional<TableIdx> val = this.tableidxs.stream().filter(t -> t.getKey().equals(key)).fi...
[ "public", "TableIdx", "getTableIdx", "(", "final", "String", "_tableName", ",", "final", "String", "...", "_keys", ")", "{", "TableIdx", "ret", "=", "null", ";", "final", "String", "key", "=", "_tableName", "+", "\"-\"", "+", "StringUtils", ".", "join", "(...
Gets the table idx. @param _tableName the table name @param _keys the key @return the table idx
[ "Gets", "the", "table", "idx", "." ]
04b96548f518c2386a93f5ec2b9349f9b9063859
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/db/wrapper/TableIndexer.java#L46-L60
train
eFaps/eFaps-Kernel
src/main/java/org/efaps/update/schema/program/staticsource/AbstractStaticSourceCompiler.java
AbstractStaticSourceCompiler.compileAll
public static void compileAll(final List<String> _classPathElements) throws EFapsException { new JasperReportCompiler(_classPathElements).compile(); new CSSCompiler().compile(); new JavaScriptCompiler().compile(); new WikiCompiler().compile(); }
java
public static void compileAll(final List<String> _classPathElements) throws EFapsException { new JasperReportCompiler(_classPathElements).compile(); new CSSCompiler().compile(); new JavaScriptCompiler().compile(); new WikiCompiler().compile(); }
[ "public", "static", "void", "compileAll", "(", "final", "List", "<", "String", ">", "_classPathElements", ")", "throws", "EFapsException", "{", "new", "JasperReportCompiler", "(", "_classPathElements", ")", ".", "compile", "(", ")", ";", "new", "CSSCompiler", "(...
Static Method that executes the method compile for the SubClasses CSSCompiler and JavaScriptCompiler. @param _classPathElements elements on the classpath @throws EFapsException on error
[ "Static", "Method", "that", "executes", "the", "method", "compile", "for", "the", "SubClasses", "CSSCompiler", "and", "JavaScriptCompiler", "." ]
04b96548f518c2386a93f5ec2b9349f9b9063859
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/update/schema/program/staticsource/AbstractStaticSourceCompiler.java#L61-L68
train
eFaps/eFaps-Kernel
src/main/java/org/efaps/update/schema/program/staticsource/AbstractStaticSourceCompiler.java
AbstractStaticSourceCompiler.readCompiledSources
protected Map<String, String> readCompiledSources() throws EFapsException { final Map<String, String> ret = new HashMap<>(); final QueryBuilder queryBldr = new QueryBuilder(getClassName4TypeCompiled()); final MultiPrintQuery multi = queryBldr.getPrint(); multi.addAttribute(CI...
java
protected Map<String, String> readCompiledSources() throws EFapsException { final Map<String, String> ret = new HashMap<>(); final QueryBuilder queryBldr = new QueryBuilder(getClassName4TypeCompiled()); final MultiPrintQuery multi = queryBldr.getPrint(); multi.addAttribute(CI...
[ "protected", "Map", "<", "String", ",", "String", ">", "readCompiledSources", "(", ")", "throws", "EFapsException", "{", "final", "Map", "<", "String", ",", "String", ">", "ret", "=", "new", "HashMap", "<>", "(", ")", ";", "final", "QueryBuilder", "queryBl...
This method reads all compiled Sources from the eFaps-DataBase and returns a map with name to oid relation. @return Map with name to oid of the compiled source @throws EFapsException on error
[ "This", "method", "reads", "all", "compiled", "Sources", "from", "the", "eFaps", "-", "DataBase", "and", "returns", "a", "map", "with", "name", "to", "oid", "relation", "." ]
04b96548f518c2386a93f5ec2b9349f9b9063859
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/update/schema/program/staticsource/AbstractStaticSourceCompiler.java#L176-L189
train
eFaps/eFaps-Kernel
src/main/java/org/efaps/update/schema/program/staticsource/AbstractStaticSourceCompiler.java
AbstractStaticSourceCompiler.readSources
protected List<T> readSources() throws EFapsException { final List<T> ret = new ArrayList<>(); final QueryBuilder queryBldr = new QueryBuilder(getClassName4Type()); final MultiPrintQuery multi = queryBldr.getPrint(); multi.addAttribute(CIAdminProgram.Abstract.Name); m...
java
protected List<T> readSources() throws EFapsException { final List<T> ret = new ArrayList<>(); final QueryBuilder queryBldr = new QueryBuilder(getClassName4Type()); final MultiPrintQuery multi = queryBldr.getPrint(); multi.addAttribute(CIAdminProgram.Abstract.Name); m...
[ "protected", "List", "<", "T", ">", "readSources", "(", ")", "throws", "EFapsException", "{", "final", "List", "<", "T", ">", "ret", "=", "new", "ArrayList", "<>", "(", ")", ";", "final", "QueryBuilder", "queryBldr", "=", "new", "QueryBuilder", "(", "get...
This method reads all Sources from the eFapsDataBase and returns for each Source a Instance of AbstractSource in a List. @return List with AbstractSources @throws EFapsException on error
[ "This", "method", "reads", "all", "Sources", "from", "the", "eFapsDataBase", "and", "returns", "for", "each", "Source", "a", "Instance", "of", "AbstractSource", "in", "a", "List", "." ]
04b96548f518c2386a93f5ec2b9349f9b9063859
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/update/schema/program/staticsource/AbstractStaticSourceCompiler.java#L198-L211
train
eFaps/eFaps-Kernel
src/main/java/org/efaps/update/schema/program/staticsource/AbstractStaticSourceCompiler.java
AbstractStaticSourceCompiler.getSuper
protected List<Instance> getSuper(final Instance _instance) throws EFapsException { final List<Instance> ret = new ArrayList<>(); final QueryBuilder queryBldr = new QueryBuilder(getClassName4Type2Type()); queryBldr.addWhereAttrEqValue(CIAdminProgram.Program2Program.From, _instance.ge...
java
protected List<Instance> getSuper(final Instance _instance) throws EFapsException { final List<Instance> ret = new ArrayList<>(); final QueryBuilder queryBldr = new QueryBuilder(getClassName4Type2Type()); queryBldr.addWhereAttrEqValue(CIAdminProgram.Program2Program.From, _instance.ge...
[ "protected", "List", "<", "Instance", ">", "getSuper", "(", "final", "Instance", "_instance", ")", "throws", "EFapsException", "{", "final", "List", "<", "Instance", ">", "ret", "=", "new", "ArrayList", "<>", "(", ")", ";", "final", "QueryBuilder", "queryBld...
Recursive method that searches the SuperSource for the current Instance identified by the oid. @param _instance Instance the Super Instance will be searched @return List of SuperSources in reverse order @throws EFapsException error
[ "Recursive", "method", "that", "searches", "the", "SuperSource", "for", "the", "current", "Instance", "identified", "by", "the", "oid", "." ]
04b96548f518c2386a93f5ec2b9349f9b9063859
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/update/schema/program/staticsource/AbstractStaticSourceCompiler.java#L221-L237
train
JavaKoan/koan-annotations
src/main/java/com/javakoan/fixture/io/KoanReader.java
KoanReader.getSourceByClass
public static String getSourceByClass(Class<?> koanClass) { File file = new File(getKoanFileLocation(koanClass)); StringBuilder contents = new StringBuilder(); BufferedReader reader = null; try { reader = new BufferedReader(new FileReader(file)); String text = null; while ((t...
java
public static String getSourceByClass(Class<?> koanClass) { File file = new File(getKoanFileLocation(koanClass)); StringBuilder contents = new StringBuilder(); BufferedReader reader = null; try { reader = new BufferedReader(new FileReader(file)); String text = null; while ((t...
[ "public", "static", "String", "getSourceByClass", "(", "Class", "<", "?", ">", "koanClass", ")", "{", "File", "file", "=", "new", "File", "(", "getKoanFileLocation", "(", "koanClass", ")", ")", ";", "StringBuilder", "contents", "=", "new", "StringBuilder", "...
Gets source for a class. @param koanClass the koan class @return the source code as a string
[ "Gets", "source", "for", "a", "class", "." ]
e3c4872ae57051a0b74b2efa6f15f4ee9e37d263
https://github.com/JavaKoan/koan-annotations/blob/e3c4872ae57051a0b74b2efa6f15f4ee9e37d263/src/main/java/com/javakoan/fixture/io/KoanReader.java#L52-L77
train
JavaKoan/koan-annotations
src/main/java/com/javakoan/fixture/io/KoanReader.java
KoanReader.getInputStreamByClass
public static FileInputStream getInputStreamByClass(Class<?> koanClass) { FileInputStream in = null; try { in = new FileInputStream(getKoanFileLocation(koanClass)); } catch (FileNotFoundException e) { e.printStackTrace(); } return in; }
java
public static FileInputStream getInputStreamByClass(Class<?> koanClass) { FileInputStream in = null; try { in = new FileInputStream(getKoanFileLocation(koanClass)); } catch (FileNotFoundException e) { e.printStackTrace(); } return in; }
[ "public", "static", "FileInputStream", "getInputStreamByClass", "(", "Class", "<", "?", ">", "koanClass", ")", "{", "FileInputStream", "in", "=", "null", ";", "try", "{", "in", "=", "new", "FileInputStream", "(", "getKoanFileLocation", "(", "koanClass", ")", "...
Gets an input stream by class. @param koanClass the koan class @return the input stream relating to the class file
[ "Gets", "an", "input", "stream", "by", "class", "." ]
e3c4872ae57051a0b74b2efa6f15f4ee9e37d263
https://github.com/JavaKoan/koan-annotations/blob/e3c4872ae57051a0b74b2efa6f15f4ee9e37d263/src/main/java/com/javakoan/fixture/io/KoanReader.java#L85-L94
train
JavaKoan/koan-annotations
src/main/java/com/javakoan/fixture/io/KoanReader.java
KoanReader.getSolutionFromFile
public static String getSolutionFromFile(Class<?> koanClass, String methodName){ return getSourceFromFile(koanClass, methodName, SOLUTION_EXTENSION); }
java
public static String getSolutionFromFile(Class<?> koanClass, String methodName){ return getSourceFromFile(koanClass, methodName, SOLUTION_EXTENSION); }
[ "public", "static", "String", "getSolutionFromFile", "(", "Class", "<", "?", ">", "koanClass", ",", "String", "methodName", ")", "{", "return", "getSourceFromFile", "(", "koanClass", ",", "methodName", ",", "SOLUTION_EXTENSION", ")", ";", "}" ]
Gets solution for a koan by method name. @param koanClass the koan class @param methodName the method name of the solution required @return the solution content to be inserted between the koan start and end markers
[ "Gets", "solution", "for", "a", "koan", "by", "method", "name", "." ]
e3c4872ae57051a0b74b2efa6f15f4ee9e37d263
https://github.com/JavaKoan/koan-annotations/blob/e3c4872ae57051a0b74b2efa6f15f4ee9e37d263/src/main/java/com/javakoan/fixture/io/KoanReader.java#L103-L105
train
JavaKoan/koan-annotations
src/main/java/com/javakoan/fixture/io/KoanReader.java
KoanReader.getProblemFromFile
public static String getProblemFromFile(Class<?> koanClass, String methodName) { return getSourceFromFile(koanClass, methodName, PROBLEM_EXTENSION); }
java
public static String getProblemFromFile(Class<?> koanClass, String methodName) { return getSourceFromFile(koanClass, methodName, PROBLEM_EXTENSION); }
[ "public", "static", "String", "getProblemFromFile", "(", "Class", "<", "?", ">", "koanClass", ",", "String", "methodName", ")", "{", "return", "getSourceFromFile", "(", "koanClass", ",", "methodName", ",", "PROBLEM_EXTENSION", ")", ";", "}" ]
Gets problem for a koan by method name. @param koanClass the koan class @param methodName the method name of the problem required @return the problem content to be inserted between the koan start and end markers
[ "Gets", "problem", "for", "a", "koan", "by", "method", "name", "." ]
e3c4872ae57051a0b74b2efa6f15f4ee9e37d263
https://github.com/JavaKoan/koan-annotations/blob/e3c4872ae57051a0b74b2efa6f15f4ee9e37d263/src/main/java/com/javakoan/fixture/io/KoanReader.java#L114-L116
train
eFaps/eFaps-Kernel
src/main/java/org/efaps/update/event/Event.java
Event.updateInDB
public Instance updateInDB(final Instance _instance, final String _typeName) { Instance ret = null; try { final long typeID = _instance.getId(); final long progID = getProgID(_typeName); final QueryBuilder queryBldr = new QueryBuild...
java
public Instance updateInDB(final Instance _instance, final String _typeName) { Instance ret = null; try { final long typeID = _instance.getId(); final long progID = getProgID(_typeName); final QueryBuilder queryBldr = new QueryBuild...
[ "public", "Instance", "updateInDB", "(", "final", "Instance", "_instance", ",", "final", "String", "_typeName", ")", "{", "Instance", "ret", "=", "null", ";", "try", "{", "final", "long", "typeID", "=", "_instance", ".", "getId", "(", ")", ";", "final", ...
For given type defined with the instance parameter, this trigger is searched by typeID and index position. If the trigger exists, the trigger is updated. Otherwise the trigger is created. @param _instance type instance to update with this attribute @param _typeName name of the type to update @return Instance of th...
[ "For", "given", "type", "defined", "with", "the", "instance", "parameter", "this", "trigger", "is", "searched", "by", "typeID", "and", "index", "position", ".", "If", "the", "trigger", "exists", "the", "trigger", "is", "updated", ".", "Otherwise", "the", "tr...
04b96548f518c2386a93f5ec2b9349f9b9063859
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/update/event/Event.java#L120-L157
train
eFaps/eFaps-Kernel
src/main/java/org/efaps/update/event/Event.java
Event.getProgID
private long getProgID(final String _typeName) throws EFapsException { long id = 0; final QueryBuilder queryBldr = new QueryBuilder(CIAdminProgram.Java); queryBldr.addWhereAttrEqValue(CIAdminProgram.Java.Name, this.program); final InstanceQuery query = queryBldr.getQuery(); ...
java
private long getProgID(final String _typeName) throws EFapsException { long id = 0; final QueryBuilder queryBldr = new QueryBuilder(CIAdminProgram.Java); queryBldr.addWhereAttrEqValue(CIAdminProgram.Java.Name, this.program); final InstanceQuery query = queryBldr.getQuery(); ...
[ "private", "long", "getProgID", "(", "final", "String", "_typeName", ")", "throws", "EFapsException", "{", "long", "id", "=", "0", ";", "final", "QueryBuilder", "queryBldr", "=", "new", "QueryBuilder", "(", "CIAdminProgram", ".", "Java", ")", ";", "queryBldr",...
Get the id of the program. @param _typeName name of the type @return id of the program, 0 if not found @throws EFapsException if id of the program could not be fetched
[ "Get", "the", "id", "of", "the", "program", "." ]
04b96548f518c2386a93f5ec2b9349f9b9063859
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/update/event/Event.java#L166-L180
train
eFaps/eFaps-Kernel
src/main/java/org/efaps/update/event/Event.java
Event.addPropertiesOverwrite
public void addPropertiesOverwrite(final String _sytemConfig, final String _attribute) { this.properties.put(Overwrite.SYSTEMCONFIG.value(), _sytemConfig); this.properties.put(Overwrite.ATTRIBUTE.value(), _attribute); }
java
public void addPropertiesOverwrite(final String _sytemConfig, final String _attribute) { this.properties.put(Overwrite.SYSTEMCONFIG.value(), _sytemConfig); this.properties.put(Overwrite.ATTRIBUTE.value(), _attribute); }
[ "public", "void", "addPropertiesOverwrite", "(", "final", "String", "_sytemConfig", ",", "final", "String", "_attribute", ")", "{", "this", ".", "properties", ".", "put", "(", "Overwrite", ".", "SYSTEMCONFIG", ".", "value", "(", ")", ",", "_sytemConfig", ")", ...
Adds the properties overwrite. @param _sytemConfig the sytem config @param _attribute the attribute
[ "Adds", "the", "properties", "overwrite", "." ]
04b96548f518c2386a93f5ec2b9349f9b9063859
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/update/event/Event.java#L212-L217
train
navnorth/LRJavaLib
src/com/navnorth/learningregistry/LRException.java
LRException.getMessage
public String getMessage() { if (code == NO_DATA) return "A document cannot be added without resource data."; else if (code == NO_LOCATOR) return "A document cannot be added without a resource locator."; else if (code == INVALID_JSON) return "The provided ...
java
public String getMessage() { if (code == NO_DATA) return "A document cannot be added without resource data."; else if (code == NO_LOCATOR) return "A document cannot be added without a resource locator."; else if (code == INVALID_JSON) return "The provided ...
[ "public", "String", "getMessage", "(", ")", "{", "if", "(", "code", "==", "NO_DATA", ")", "return", "\"A document cannot be added without resource data.\"", ";", "else", "if", "(", "code", "==", "NO_LOCATOR", ")", "return", "\"A document cannot be added without a resour...
Get the message attached to the exception @return Text of the message of the exception
[ "Get", "the", "message", "attached", "to", "the", "exception" ]
27af28b9f80d772273592414e7d0dccffaac09e1
https://github.com/navnorth/LRJavaLib/blob/27af28b9f80d772273592414e7d0dccffaac09e1/src/com/navnorth/learningregistry/LRException.java#L93-L139
train
comapi/comapi-chat-sdk-android
COMAPI/chat/src/main/java/com/comapi/chat/database/Database.java
Database.resetDatabase
public void resetDatabase() { String dropOrphanedEvents = "DROP TABLE IF EXISTS " + DbOrphanedEvent.TABLE_NAME; SQLiteDatabase writable = dbHelper.getWritableDatabase(); writable.beginTransaction(); try { writable.execSQL(dropOrphanedEvents); writable.execSQL...
java
public void resetDatabase() { String dropOrphanedEvents = "DROP TABLE IF EXISTS " + DbOrphanedEvent.TABLE_NAME; SQLiteDatabase writable = dbHelper.getWritableDatabase(); writable.beginTransaction(); try { writable.execSQL(dropOrphanedEvents); writable.execSQL...
[ "public", "void", "resetDatabase", "(", ")", "{", "String", "dropOrphanedEvents", "=", "\"DROP TABLE IF EXISTS \"", "+", "DbOrphanedEvent", ".", "TABLE_NAME", ";", "SQLiteDatabase", "writable", "=", "dbHelper", ".", "getWritableDatabase", "(", ")", ";", "writable", ...
Recreates empty database.
[ "Recreates", "empty", "database", "." ]
388f37bfacb7793ce30c92ab70e5f32848bbe460
https://github.com/comapi/comapi-chat-sdk-android/blob/388f37bfacb7793ce30c92ab70e5f32848bbe460/COMAPI/chat/src/main/java/com/comapi/chat/database/Database.java#L196-L214
train
javabits/yar
yar-guice/src/main/java/org/javabits/yar/guice/GuiceWatchableRegistrationContainer.java
GuiceWatchableRegistrationContainer.getWatcherRegistrations
@SuppressWarnings("unchecked") private <T> List<WatcherRegistration<T>> getWatcherRegistrations(Id<T> id) { return (List<WatcherRegistration<T>>)((Container)watcherRegistry).getAll(id.type()); }
java
@SuppressWarnings("unchecked") private <T> List<WatcherRegistration<T>> getWatcherRegistrations(Id<T> id) { return (List<WatcherRegistration<T>>)((Container)watcherRegistry).getAll(id.type()); }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "private", "<", "T", ">", "List", "<", "WatcherRegistration", "<", "T", ">", ">", "getWatcherRegistrations", "(", "Id", "<", "T", ">", "id", ")", "{", "return", "(", "List", "<", "WatcherRegistration", "<...
returns all the watchers associated to the type of the given id.
[ "returns", "all", "the", "watchers", "associated", "to", "the", "type", "of", "the", "given", "id", "." ]
e146a86611ca4831e8334c9a98fd7086cee9c03e
https://github.com/javabits/yar/blob/e146a86611ca4831e8334c9a98fd7086cee9c03e/yar-guice/src/main/java/org/javabits/yar/guice/GuiceWatchableRegistrationContainer.java#L157-L160
train
eFaps/eFaps-Kernel
src/main/java/org/efaps/db/AbstractObjectQuery.java
AbstractObjectQuery.getIndex4SqlTable
public Integer getIndex4SqlTable(final SQLTable _sqlTable) { final Integer ret; if (this.sqlTable2Index.containsKey(_sqlTable)) { ret = this.sqlTable2Index.get(_sqlTable); } else { Integer max = 0; for (final Integer index : this.sqlTable2Index.values()) {...
java
public Integer getIndex4SqlTable(final SQLTable _sqlTable) { final Integer ret; if (this.sqlTable2Index.containsKey(_sqlTable)) { ret = this.sqlTable2Index.get(_sqlTable); } else { Integer max = 0; for (final Integer index : this.sqlTable2Index.values()) {...
[ "public", "Integer", "getIndex4SqlTable", "(", "final", "SQLTable", "_sqlTable", ")", "{", "final", "Integer", "ret", ";", "if", "(", "this", ".", "sqlTable2Index", ".", "containsKey", "(", "_sqlTable", ")", ")", "{", "ret", "=", "this", ".", "sqlTable2Index...
Get the index for a SQLTable if the table is not existing the table is added and a new index given. @param _sqlTable SQLTable the index is wanted for @return index of the SQLTable
[ "Get", "the", "index", "for", "a", "SQLTable", "if", "the", "table", "is", "not", "existing", "the", "table", "is", "added", "and", "a", "new", "index", "given", "." ]
04b96548f518c2386a93f5ec2b9349f9b9063859
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/db/AbstractObjectQuery.java#L191-L207
train
eFaps/eFaps-Kernel
src/main/java/org/efaps/db/AbstractObjectQuery.java
AbstractObjectQuery.next
public boolean next() { if (this.iter == null) { this.iter = new ArrayList<>(this.values).iterator(); } final boolean ret = this.iter.hasNext(); if (ret) { this.current = this.iter.next(); } return ret; }
java
public boolean next() { if (this.iter == null) { this.iter = new ArrayList<>(this.values).iterator(); } final boolean ret = this.iter.hasNext(); if (ret) { this.current = this.iter.next(); } return ret; }
[ "public", "boolean", "next", "(", ")", "{", "if", "(", "this", ".", "iter", "==", "null", ")", "{", "this", ".", "iter", "=", "new", "ArrayList", "<>", "(", "this", ".", "values", ")", ".", "iterator", "(", ")", ";", "}", "final", "boolean", "ret...
Move the current instance to the next instance in the list. @return true if the instance was set to the next value, else false
[ "Move", "the", "current", "instance", "to", "the", "next", "instance", "in", "the", "list", "." ]
04b96548f518c2386a93f5ec2b9349f9b9063859
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/db/AbstractObjectQuery.java#L287-L297
train
eFaps/eFaps-Kernel
src/main/java/org/efaps/admin/program/esjp/EFapsClassLoader.java
EFapsClassLoader.findResource
@Override public URL findResource(final String _name) { URL ret = null; final String name = _name.replaceAll(System.getProperty("file.separator"), ".").replaceAll(".class", ""); final byte[] data = loadClassData(name); if (data != null && data.length > 0) { final File...
java
@Override public URL findResource(final String _name) { URL ret = null; final String name = _name.replaceAll(System.getProperty("file.separator"), ".").replaceAll(".class", ""); final byte[] data = loadClassData(name); if (data != null && data.length > 0) { final File...
[ "@", "Override", "public", "URL", "findResource", "(", "final", "String", "_name", ")", "{", "URL", "ret", "=", "null", ";", "final", "String", "name", "=", "_name", ".", "replaceAll", "(", "System", ".", "getProperty", "(", "\"file.separator\"", ")", ",",...
In case of jbpm this is necessary for compiling, because they search the classes with URL. @param _name filename as url @return URL if found
[ "In", "case", "of", "jbpm", "this", "is", "necessary", "for", "compiling", "because", "they", "search", "the", "classes", "with", "URL", "." ]
04b96548f518c2386a93f5ec2b9349f9b9063859
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/admin/program/esjp/EFapsClassLoader.java#L127-L145
train
eFaps/eFaps-Kernel
src/main/java/org/efaps/admin/program/esjp/EFapsClassLoader.java
EFapsClassLoader.loadClassData
protected byte[] loadClassData(final String _resourceName) { EFapsClassLoader.LOG.debug("Loading Class '{}' from Database.", _resourceName); final byte[] x = read(_resourceName); return x; }
java
protected byte[] loadClassData(final String _resourceName) { EFapsClassLoader.LOG.debug("Loading Class '{}' from Database.", _resourceName); final byte[] x = read(_resourceName); return x; }
[ "protected", "byte", "[", "]", "loadClassData", "(", "final", "String", "_resourceName", ")", "{", "EFapsClassLoader", ".", "LOG", ".", "debug", "(", "\"Loading Class '{}' from Database.\"", ",", "_resourceName", ")", ";", "final", "byte", "[", "]", "x", "=", ...
Loads the wanted Resource with the EFapsResourceStore into a byte-Array to pass it on to findClass. @param _resourceName name of the Resource to load @return byte[] containing the compiled javaclass
[ "Loads", "the", "wanted", "Resource", "with", "the", "EFapsResourceStore", "into", "a", "byte", "-", "Array", "to", "pass", "it", "on", "to", "findClass", "." ]
04b96548f518c2386a93f5ec2b9349f9b9063859
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/admin/program/esjp/EFapsClassLoader.java#L154-L159
train
labai/ted
ted-driver/src/main/java/ted/driver/sys/TaskManager.java
TaskManager.sendTaskListToChannels
void sendTaskListToChannels(List<TaskRec> tasks) { // group by type // Map<String, List<TaskRec>> grouped = new HashMap<String, List<TaskRec>>(); for (TaskRec taskRec : tasks) { List<TaskRec> tlist = grouped.get(taskRec.name); if (tlist == null) { tlist = new ArrayList<TaskRec>(); grouped.put(task...
java
void sendTaskListToChannels(List<TaskRec> tasks) { // group by type // Map<String, List<TaskRec>> grouped = new HashMap<String, List<TaskRec>>(); for (TaskRec taskRec : tasks) { List<TaskRec> tlist = grouped.get(taskRec.name); if (tlist == null) { tlist = new ArrayList<TaskRec>(); grouped.put(task...
[ "void", "sendTaskListToChannels", "(", "List", "<", "TaskRec", ">", "tasks", ")", "{", "// group by type", "//", "Map", "<", "String", ",", "List", "<", "TaskRec", ">", ">", "grouped", "=", "new", "HashMap", "<", "String", ",", "List", "<", "TaskRec", ">...
will send task to their channels for execution
[ "will", "send", "task", "to", "their", "channels", "for", "execution" ]
2ee197246a78d842c18d6780c48fd903b00608a6
https://github.com/labai/ted/blob/2ee197246a78d842c18d6780c48fd903b00608a6/ted-driver/src/main/java/ted/driver/sys/TaskManager.java#L194-L234
train
labai/ted
ted-driver/src/main/java/ted/driver/sys/TaskManager.java
TaskManager.handleUnknownTasks
void handleUnknownTasks(List<TaskRec> taskRecList) { long nowMs = System.currentTimeMillis(); for (TaskRec taskRec : taskRecList) { if (taskRec.createTs.getTime() < nowMs - UNKNOWN_TASK_CANCEL_AFTER_MS) { logger.warn("Task is unknown and was not processed during 24 hours, mark as error: {}", taskRec); ch...
java
void handleUnknownTasks(List<TaskRec> taskRecList) { long nowMs = System.currentTimeMillis(); for (TaskRec taskRec : taskRecList) { if (taskRec.createTs.getTime() < nowMs - UNKNOWN_TASK_CANCEL_AFTER_MS) { logger.warn("Task is unknown and was not processed during 24 hours, mark as error: {}", taskRec); ch...
[ "void", "handleUnknownTasks", "(", "List", "<", "TaskRec", ">", "taskRecList", ")", "{", "long", "nowMs", "=", "System", ".", "currentTimeMillis", "(", ")", ";", "for", "(", "TaskRec", "taskRec", ":", "taskRecList", ")", "{", "if", "(", "taskRec", ".", "...
can be called from eventQueue also
[ "can", "be", "called", "from", "eventQueue", "also" ]
2ee197246a78d842c18d6780c48fd903b00608a6
https://github.com/labai/ted/blob/2ee197246a78d842c18d6780c48fd903b00608a6/ted-driver/src/main/java/ted/driver/sys/TaskManager.java#L237-L248
train
labai/ted
ted-driver/src/main/java/ted/driver/sys/TaskManager.java
TaskManager.calcChannelsStats
private void calcChannelsStats(List<TaskRec> tasks) { for (ChannelWorkContext wc : channelContextMap.values()) { wc.lastGotCount = 0; } for (TaskRec taskRec : tasks) { ChannelWorkContext wc = channelContextMap.get(taskRec.channel); if (wc == null) { wc = new ChannelWorkContext(taskRec.channel); c...
java
private void calcChannelsStats(List<TaskRec> tasks) { for (ChannelWorkContext wc : channelContextMap.values()) { wc.lastGotCount = 0; } for (TaskRec taskRec : tasks) { ChannelWorkContext wc = channelContextMap.get(taskRec.channel); if (wc == null) { wc = new ChannelWorkContext(taskRec.channel); c...
[ "private", "void", "calcChannelsStats", "(", "List", "<", "TaskRec", ">", "tasks", ")", "{", "for", "(", "ChannelWorkContext", "wc", ":", "channelContextMap", ".", "values", "(", ")", ")", "{", "wc", ".", "lastGotCount", "=", "0", ";", "}", "for", "(", ...
refresh channels work info. is not thread safe
[ "refresh", "channels", "work", "info", ".", "is", "not", "thread", "safe" ]
2ee197246a78d842c18d6780c48fd903b00608a6
https://github.com/labai/ted/blob/2ee197246a78d842c18d6780c48fd903b00608a6/ted-driver/src/main/java/ted/driver/sys/TaskManager.java#L319-L340
train
JavaKoan/koan-annotations
src/koan/java/com/javakoan/fixture/SampleKoan.java
SampleKoan.makeTheProductOfIAndJ
@Koan public void makeTheProductOfIAndJ(){ int i = 10; int j = 5; int product = 0; /* (@_@) */ product = i * j; /* (^_^) */ assertThat(product, is(50)); }
java
@Koan public void makeTheProductOfIAndJ(){ int i = 10; int j = 5; int product = 0; /* (@_@) */ product = i * j; /* (^_^) */ assertThat(product, is(50)); }
[ "@", "Koan", "public", "void", "makeTheProductOfIAndJ", "(", ")", "{", "int", "i", "=", "10", ";", "int", "j", "=", "5", ";", "int", "product", "=", "0", ";", "/* (@_@) */", "product", "=", "i", "*", "j", ";", "/* (^_^) */", "assertThat", "(", "produ...
In this exercise students will learn how to use the multiplication operator in Java
[ "In", "this", "exercise", "students", "will", "learn", "how", "to", "use", "the", "multiplication", "operator", "in", "Java" ]
e3c4872ae57051a0b74b2efa6f15f4ee9e37d263
https://github.com/JavaKoan/koan-annotations/blob/e3c4872ae57051a0b74b2efa6f15f4ee9e37d263/src/koan/java/com/javakoan/fixture/SampleKoan.java#L35-L46
train
JavaKoan/koan-annotations
src/koan/java/com/javakoan/fixture/SampleKoan.java
SampleKoan.provideTheStartingProblemForCalculatingAFibonacciNumberUsingALoop
@Koan @Vex public void provideTheStartingProblemForCalculatingAFibonacciNumberUsingALoop(){ int seventhFibonacciNumber = 0; /* (@_@) */ int previous1 = 1; int previous2 = 1; int currentFibonacci = 1; for(int i= 3; i<= 7; i++){ } seventhFibonacciN...
java
@Koan @Vex public void provideTheStartingProblemForCalculatingAFibonacciNumberUsingALoop(){ int seventhFibonacciNumber = 0; /* (@_@) */ int previous1 = 1; int previous2 = 1; int currentFibonacci = 1; for(int i= 3; i<= 7; i++){ } seventhFibonacciN...
[ "@", "Koan", "@", "Vex", "public", "void", "provideTheStartingProblemForCalculatingAFibonacciNumberUsingALoop", "(", ")", "{", "int", "seventhFibonacciNumber", "=", "0", ";", "/* (@_@) */", "int", "previous1", "=", "1", ";", "int", "previous2", "=", "1", ";", "int...
In this exercise students will learn how to use @Vex annotation from the koan-annotation framework
[ "In", "this", "exercise", "students", "will", "learn", "how", "to", "use" ]
e3c4872ae57051a0b74b2efa6f15f4ee9e37d263
https://github.com/JavaKoan/koan-annotations/blob/e3c4872ae57051a0b74b2efa6f15f4ee9e37d263/src/koan/java/com/javakoan/fixture/SampleKoan.java#L67-L86
train
isisaddons-legacy/isis-module-audit
fixture/src/main/java/org/isisaddons/module/audit/fixture/dom/notaudited/SomeNotAuditedObject.java
SomeNotAuditedObject.updateNameAndNumber
@Action() public SomeNotAuditedObject updateNameAndNumber( @ParameterLayout(named = "Name") final String name, @Parameter(optionality = Optionality.OPTIONAL) @ParameterLayout(named = "Number") final Integer number) { setName(name); setNumbe...
java
@Action() public SomeNotAuditedObject updateNameAndNumber( @ParameterLayout(named = "Name") final String name, @Parameter(optionality = Optionality.OPTIONAL) @ParameterLayout(named = "Number") final Integer number) { setName(name); setNumbe...
[ "@", "Action", "(", ")", "public", "SomeNotAuditedObject", "updateNameAndNumber", "(", "@", "ParameterLayout", "(", "named", "=", "\"Name\"", ")", "final", "String", "name", ",", "@", "Parameter", "(", "optionality", "=", "Optionality", ".", "OPTIONAL", ")", "...
region > updateNameAndNumber
[ "region", ">", "updateNameAndNumber" ]
0afd945342508a0ee41d585f4f758bcf8c529328
https://github.com/isisaddons-legacy/isis-module-audit/blob/0afd945342508a0ee41d585f4f758bcf8c529328/fixture/src/main/java/org/isisaddons/module/audit/fixture/dom/notaudited/SomeNotAuditedObject.java#L56-L66
train
casmi/casmi
src/main/java/casmi/graphics/element/Quad.java
Quad.setCorner
public void setCorner(int index, double x, double y) { if (index <= 0) { this.x1 = x; this.y1 = y; } else if (index == 1) { this.x2 = x; this.y2 = y; } else if (index == 2) { this.x3 = x; this.y3 = y; } else if (inde...
java
public void setCorner(int index, double x, double y) { if (index <= 0) { this.x1 = x; this.y1 = y; } else if (index == 1) { this.x2 = x; this.y2 = y; } else if (index == 2) { this.x3 = x; this.y3 = y; } else if (inde...
[ "public", "void", "setCorner", "(", "int", "index", ",", "double", "x", ",", "double", "y", ")", "{", "if", "(", "index", "<=", "0", ")", "{", "this", ".", "x1", "=", "x", ";", "this", ".", "y1", "=", "y", ";", "}", "else", "if", "(", "index"...
Sets x,y-coordinate of a corner. @param index The index of a corner. @param x The x-coordinate of a corner. @param y The y-coordinate of a corner.
[ "Sets", "x", "y", "-", "coordinate", "of", "a", "corner", "." ]
90f6514a9cbce0685186e7a92beb69e22a3b11c4
https://github.com/casmi/casmi/blob/90f6514a9cbce0685186e7a92beb69e22a3b11c4/src/main/java/casmi/graphics/element/Quad.java#L151-L166
train
casmi/casmi
src/main/java/casmi/graphics/element/Quad.java
Quad.setConer
public void setConer(int index, Vector3D v) { if (index <= 0) { this.x1 = v.getX(); this.y1 = v.getY(); } else if (index == 1) { this.x2 = v.getX(); this.y2 = v.getY(); } else if (index == 2) { this.x3 = v.getX(); this.y3 = ...
java
public void setConer(int index, Vector3D v) { if (index <= 0) { this.x1 = v.getX(); this.y1 = v.getY(); } else if (index == 1) { this.x2 = v.getX(); this.y2 = v.getY(); } else if (index == 2) { this.x3 = v.getX(); this.y3 = ...
[ "public", "void", "setConer", "(", "int", "index", ",", "Vector3D", "v", ")", "{", "if", "(", "index", "<=", "0", ")", "{", "this", ".", "x1", "=", "v", ".", "getX", "(", ")", ";", "this", ".", "y1", "=", "v", ".", "getY", "(", ")", ";", "}...
Sets coordinates of a corner. @param index The index of a corner. @param v The coordinates of a corner.
[ "Sets", "coordinates", "of", "a", "corner", "." ]
90f6514a9cbce0685186e7a92beb69e22a3b11c4
https://github.com/casmi/casmi/blob/90f6514a9cbce0685186e7a92beb69e22a3b11c4/src/main/java/casmi/graphics/element/Quad.java#L199-L214
train
casmi/casmi
src/main/java/casmi/graphics/element/Quad.java
Quad.getConer
public Vector3D getConer(int index) { Vector3D v = new Vector3D(0, 0, 0); if (index <= 0) { v.set(this.x1, this.y1); } else if (index == 1) { v.set(this.x2, this.y2); } else if (index == 2) { v.set(this.x3, this.y3); } else if (3 <= index) { ...
java
public Vector3D getConer(int index) { Vector3D v = new Vector3D(0, 0, 0); if (index <= 0) { v.set(this.x1, this.y1); } else if (index == 1) { v.set(this.x2, this.y2); } else if (index == 2) { v.set(this.x3, this.y3); } else if (3 <= index) { ...
[ "public", "Vector3D", "getConer", "(", "int", "index", ")", "{", "Vector3D", "v", "=", "new", "Vector3D", "(", "0", ",", "0", ",", "0", ")", ";", "if", "(", "index", "<=", "0", ")", "{", "v", ".", "set", "(", "this", ".", "x1", ",", "this", "...
Gets coordinates of a corner. @param index The index of a corner.
[ "Gets", "coordinates", "of", "a", "corner", "." ]
90f6514a9cbce0685186e7a92beb69e22a3b11c4
https://github.com/casmi/casmi/blob/90f6514a9cbce0685186e7a92beb69e22a3b11c4/src/main/java/casmi/graphics/element/Quad.java#L221-L234
train
casmi/casmi
src/main/java/casmi/graphics/element/Quad.java
Quad.setCornerColor
public void setCornerColor(int index, Color color) { if (!isGradation()) { for (int i = 0; i < 4; i++) { cornerColor[i] = new RGBColor(0.0, 0.0, 0.0); cornerColor[i] = this.fillColor; } setGradation(true); } cornerColor[index] =...
java
public void setCornerColor(int index, Color color) { if (!isGradation()) { for (int i = 0; i < 4; i++) { cornerColor[i] = new RGBColor(0.0, 0.0, 0.0); cornerColor[i] = this.fillColor; } setGradation(true); } cornerColor[index] =...
[ "public", "void", "setCornerColor", "(", "int", "index", ",", "Color", "color", ")", "{", "if", "(", "!", "isGradation", "(", ")", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "4", ";", "i", "++", ")", "{", "cornerColor", "[", "i"...
Sets the color of a corner for gradation. @param index The index of a corner. @param color The color of a corner.
[ "Sets", "the", "color", "of", "a", "corner", "for", "gradation", "." ]
90f6514a9cbce0685186e7a92beb69e22a3b11c4
https://github.com/casmi/casmi/blob/90f6514a9cbce0685186e7a92beb69e22a3b11c4/src/main/java/casmi/graphics/element/Quad.java#L346-L355
train
eFaps/eFaps-Kernel
src/main/java/org/efaps/db/QueryBuilder.java
QueryBuilder.getValue
private AbstractQValue getValue(final Object _value) throws EFapsException { AbstractQValue ret = null; if (_value == null) { ret = new QNullValue(); } else if (_value instanceof Number) { ret = new QNumberValue((Number) _value); } else if (_value inst...
java
private AbstractQValue getValue(final Object _value) throws EFapsException { AbstractQValue ret = null; if (_value == null) { ret = new QNullValue(); } else if (_value instanceof Number) { ret = new QNumberValue((Number) _value); } else if (_value inst...
[ "private", "AbstractQValue", "getValue", "(", "final", "Object", "_value", ")", "throws", "EFapsException", "{", "AbstractQValue", "ret", "=", "null", ";", "if", "(", "_value", "==", "null", ")", "{", "ret", "=", "new", "QNullValue", "(", ")", ";", "}", ...
Get the QAbstractValue for a value. @param _value value the QAbstractValue is wanted for @return QAbstractValue @throws EFapsException on error
[ "Get", "the", "QAbstractValue", "for", "a", "value", "." ]
04b96548f518c2386a93f5ec2b9349f9b9063859
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/db/QueryBuilder.java#L860-L897
train
eFaps/eFaps-Kernel
src/main/java/org/efaps/db/QueryBuilder.java
QueryBuilder.getAttributeQuery
public AttributeQuery getAttributeQuery(final String _attributeName) { if (this.query == null) { try { final String attribute = getAttr4Select(_attributeName); this.query = new AttributeQuery(this.typeUUID, attribute.isEmpty() ? _attributeName : attribute) ...
java
public AttributeQuery getAttributeQuery(final String _attributeName) { if (this.query == null) { try { final String attribute = getAttr4Select(_attributeName); this.query = new AttributeQuery(this.typeUUID, attribute.isEmpty() ? _attributeName : attribute) ...
[ "public", "AttributeQuery", "getAttributeQuery", "(", "final", "String", "_attributeName", ")", "{", "if", "(", "this", ".", "query", "==", "null", ")", "{", "try", "{", "final", "String", "attribute", "=", "getAttr4Select", "(", "_attributeName", ")", ";", ...
Method to get an Attribute Query. @param _attributeName name of the attribute the value is wanted for, if null the id attribute will be used automatically @return Attribute Query
[ "Method", "to", "get", "an", "Attribute", "Query", "." ]
04b96548f518c2386a93f5ec2b9349f9b9063859
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/db/QueryBuilder.java#L1040-L1053
train
eFaps/eFaps-Kernel
src/main/java/org/efaps/db/QueryBuilder.java
QueryBuilder.getAttributeQuery
protected AttributeQuery getAttributeQuery() throws EFapsException { AttributeQuery ret = this.getAttributeQuery(getSelectAttributeName()); // check if in the linkto chain is one before this one if (!this.attrQueryBldrs.isEmpty()) { final QueryBuilder queryBldr = this.att...
java
protected AttributeQuery getAttributeQuery() throws EFapsException { AttributeQuery ret = this.getAttributeQuery(getSelectAttributeName()); // check if in the linkto chain is one before this one if (!this.attrQueryBldrs.isEmpty()) { final QueryBuilder queryBldr = this.att...
[ "protected", "AttributeQuery", "getAttributeQuery", "(", ")", "throws", "EFapsException", "{", "AttributeQuery", "ret", "=", "this", ".", "getAttributeQuery", "(", "getSelectAttributeName", "(", ")", ")", ";", "// check if in the linkto chain is one before this one", "if", ...
Method to get an Attribute Query in case of a Select where criteria. @return Attribute Query @throws EFapsException on error
[ "Method", "to", "get", "an", "Attribute", "Query", "in", "case", "of", "a", "Select", "where", "criteria", "." ]
04b96548f518c2386a93f5ec2b9349f9b9063859
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/db/QueryBuilder.java#L1061-L1072
train
eFaps/eFaps-Kernel
src/main/java/org/efaps/db/QueryBuilder.java
QueryBuilder.prepareQuery
private void prepareQuery() throws EFapsException { for (final QueryBuilder queryBldr : this.attrQueryBldrs.values()) { final AttributeQuery attrQuery = queryBldr.getAttributeQuery(); this.addWhereAttrInQuery(queryBldr.getLinkAttributeName(), attrQuery); } if...
java
private void prepareQuery() throws EFapsException { for (final QueryBuilder queryBldr : this.attrQueryBldrs.values()) { final AttributeQuery attrQuery = queryBldr.getAttributeQuery(); this.addWhereAttrInQuery(queryBldr.getLinkAttributeName(), attrQuery); } if...
[ "private", "void", "prepareQuery", "(", ")", "throws", "EFapsException", "{", "for", "(", "final", "QueryBuilder", "queryBldr", ":", "this", ".", "attrQueryBldrs", ".", "values", "(", ")", ")", "{", "final", "AttributeQuery", "attrQuery", "=", "queryBldr", "."...
Prepare the Query. @throws EFapsException on error
[ "Prepare", "the", "Query", "." ]
04b96548f518c2386a93f5ec2b9349f9b9063859
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/db/QueryBuilder.java#L1078-L1113
train
eFaps/eFaps-Kernel
src/main/java/org/efaps/db/QueryBuilder.java
QueryBuilder.getCachedPrint
public CachedMultiPrintQuery getCachedPrint(final String _key) throws EFapsException { return new CachedMultiPrintQuery(getCachedQuery(_key).execute(), _key); }
java
public CachedMultiPrintQuery getCachedPrint(final String _key) throws EFapsException { return new CachedMultiPrintQuery(getCachedQuery(_key).execute(), _key); }
[ "public", "CachedMultiPrintQuery", "getCachedPrint", "(", "final", "String", "_key", ")", "throws", "EFapsException", "{", "return", "new", "CachedMultiPrintQuery", "(", "getCachedQuery", "(", "_key", ")", ".", "execute", "(", ")", ",", "_key", ")", ";", "}" ]
Method to get a CachedMultiPrintQuery. @param _key key used for Caching @return MultiPrintQuery based on the InstanceQuery @throws EFapsException on error
[ "Method", "to", "get", "a", "CachedMultiPrintQuery", "." ]
04b96548f518c2386a93f5ec2b9349f9b9063859
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/db/QueryBuilder.java#L1132-L1136
train
eFaps/eFaps-Kernel
src/main/java/org/efaps/db/QueryBuilder.java
QueryBuilder.getQPart
public static AbstractQPart getQPart(final AbstractWhere _where) throws EFapsException { AbstractQPart ret = null; if (_where instanceof SelectWhere) { switch (_where.getComparison()) { case EQUAL: final QueryBuilder queryBldr = new QueryBuilde...
java
public static AbstractQPart getQPart(final AbstractWhere _where) throws EFapsException { AbstractQPart ret = null; if (_where instanceof SelectWhere) { switch (_where.getComparison()) { case EQUAL: final QueryBuilder queryBldr = new QueryBuilde...
[ "public", "static", "AbstractQPart", "getQPart", "(", "final", "AbstractWhere", "_where", ")", "throws", "EFapsException", "{", "AbstractQPart", "ret", "=", "null", ";", "if", "(", "_where", "instanceof", "SelectWhere", ")", "{", "switch", "(", "_where", ".", ...
Gets the q part. @param _where the where @return the q part @throws EFapsException on error
[ "Gets", "the", "q", "part", "." ]
04b96548f518c2386a93f5ec2b9349f9b9063859
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/db/QueryBuilder.java#L1327-L1343
train