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
sebastiangraf/treetank
interfacemodules/xml/src/main/java/org/treetank/service/xml/xpath/parser/XPathScanner.java
XPathScanner.scanComment
private void scanComment() { final char input = mQuery.charAt(mPos + 1); if (mInput == ':') { // check if is end of comment, indicated by ':)' if (input == ')') { mCommentCount--; if (mCommentCount == 0) { mState = State.START; ...
java
private void scanComment() { final char input = mQuery.charAt(mPos + 1); if (mInput == ':') { // check if is end of comment, indicated by ':)' if (input == ')') { mCommentCount--; if (mCommentCount == 0) { mState = State.START; ...
[ "private", "void", "scanComment", "(", ")", "{", "final", "char", "input", "=", "mQuery", ".", "charAt", "(", "mPos", "+", "1", ")", ";", "if", "(", "mInput", "==", "'", "'", ")", "{", "// check if is end of comment, indicated by ':)'", "if", "(", "input",...
Scans comments.
[ "Scans", "comments", "." ]
9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60
https://github.com/sebastiangraf/treetank/blob/9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60/interfacemodules/xml/src/main/java/org/treetank/service/xml/xpath/parser/XPathScanner.java#L438-L460
train
sebastiangraf/treetank
interfacemodules/xml/src/main/java/org/treetank/service/xml/xpath/parser/XPathScanner.java
XPathScanner.isLetter
private boolean isLetter(final char paramInput) { return (paramInput >= '0' && paramInput <= '9') || (paramInput >= 'a' && paramInput <= 'z') || (paramInput >= 'A' && paramInput <= 'Z') || (paramInput == '_') || (paramInput == '-') || (paramInput == '.'); }
java
private boolean isLetter(final char paramInput) { return (paramInput >= '0' && paramInput <= '9') || (paramInput >= 'a' && paramInput <= 'z') || (paramInput >= 'A' && paramInput <= 'Z') || (paramInput == '_') || (paramInput == '-') || (paramInput == '.'); }
[ "private", "boolean", "isLetter", "(", "final", "char", "paramInput", ")", "{", "return", "(", "paramInput", ">=", "'", "'", "&&", "paramInput", "<=", "'", "'", ")", "||", "(", "paramInput", ">=", "'", "'", "&&", "paramInput", "<=", "'", "'", ")", "|...
Checks if the given character is a letter. @param paramInput The character to check. @return Returns true, if the character is a letter.
[ "Checks", "if", "the", "given", "character", "is", "a", "letter", "." ]
9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60
https://github.com/sebastiangraf/treetank/blob/9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60/interfacemodules/xml/src/main/java/org/treetank/service/xml/xpath/parser/XPathScanner.java#L469-L475
train
sebastiangraf/treetank
interfacemodules/jax-rx/src/main/java/org/treetank/service/jaxrx/implementation/NodeIdRepresentation.java
NodeIdRepresentation.getResource
public StreamingOutput getResource(final String resourceName, final long nodeId, final Map<QueryParameter, String> queryParams) throws JaxRxException { final StreamingOutput sOutput = new StreamingOutput() { @Override public void write(final OutputStream output) throws IOExceptio...
java
public StreamingOutput getResource(final String resourceName, final long nodeId, final Map<QueryParameter, String> queryParams) throws JaxRxException { final StreamingOutput sOutput = new StreamingOutput() { @Override public void write(final OutputStream output) throws IOExceptio...
[ "public", "StreamingOutput", "getResource", "(", "final", "String", "resourceName", ",", "final", "long", "nodeId", ",", "final", "Map", "<", "QueryParameter", ",", "String", ">", "queryParams", ")", "throws", "JaxRxException", "{", "final", "StreamingOutput", "sO...
This method is responsible to deliver the whole XML resource addressed by a unique node id. @param resourceName The name of the database, where the node id belongs. @param nodeId The unique node id of the requested resource. @param queryParams The optional query parameters. @return The whole XML resource addressed by ...
[ "This", "method", "is", "responsible", "to", "deliver", "the", "whole", "XML", "resource", "addressed", "by", "a", "unique", "node", "id", "." ]
9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60
https://github.com/sebastiangraf/treetank/blob/9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60/interfacemodules/jax-rx/src/main/java/org/treetank/service/jaxrx/implementation/NodeIdRepresentation.java#L117-L135
train
sebastiangraf/treetank
interfacemodules/jax-rx/src/main/java/org/treetank/service/jaxrx/implementation/NodeIdRepresentation.java
NodeIdRepresentation.performQueryOnResource
public StreamingOutput performQueryOnResource(final String resourceName, final long nodeId, final String query, final Map<QueryParameter, String> queryParams) { final StreamingOutput sOutput = new StreamingOutput() { @Override public void write(final OutputStream output) throws ...
java
public StreamingOutput performQueryOnResource(final String resourceName, final long nodeId, final String query, final Map<QueryParameter, String> queryParams) { final StreamingOutput sOutput = new StreamingOutput() { @Override public void write(final OutputStream output) throws ...
[ "public", "StreamingOutput", "performQueryOnResource", "(", "final", "String", "resourceName", ",", "final", "long", "nodeId", ",", "final", "String", "query", ",", "final", "Map", "<", "QueryParameter", ",", "String", ">", "queryParams", ")", "{", "final", "Str...
This method is responsible to perform a XPath query expression on the XML resource which is addressed through a unique node id. @param resourceName The name of the database, the node id belongs to. @param nodeId The node id of the requested resource. @param query The XPath expression. @param queryParams The optional q...
[ "This", "method", "is", "responsible", "to", "perform", "a", "XPath", "query", "expression", "on", "the", "XML", "resource", "which", "is", "addressed", "through", "a", "unique", "node", "id", "." ]
9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60
https://github.com/sebastiangraf/treetank/blob/9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60/interfacemodules/jax-rx/src/main/java/org/treetank/service/jaxrx/implementation/NodeIdRepresentation.java#L188-L212
train
sebastiangraf/treetank
interfacemodules/jax-rx/src/main/java/org/treetank/service/jaxrx/implementation/NodeIdRepresentation.java
NodeIdRepresentation.modifyResource
public void modifyResource(final String resourceName, final long nodeId, final InputStream newValue) throws JaxRxException { synchronized (resourceName) { ISession session = null; INodeWriteTrx wtx = null; boolean abort = false; if (mDatabase.existsResourc...
java
public void modifyResource(final String resourceName, final long nodeId, final InputStream newValue) throws JaxRxException { synchronized (resourceName) { ISession session = null; INodeWriteTrx wtx = null; boolean abort = false; if (mDatabase.existsResourc...
[ "public", "void", "modifyResource", "(", "final", "String", "resourceName", ",", "final", "long", "nodeId", ",", "final", "InputStream", "newValue", ")", "throws", "JaxRxException", "{", "synchronized", "(", "resourceName", ")", "{", "ISession", "session", "=", ...
This method is responsible to modify the XML resource, which is addressed through a unique node id. @param resourceName The name of the database, where the node id belongs to. @param nodeId The node id. @param newValue The new value of the node that has to be replaced. @throws JaxRxException The exception occurred.
[ "This", "method", "is", "responsible", "to", "modify", "the", "XML", "resource", "which", "is", "addressed", "through", "a", "unique", "node", "id", "." ]
9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60
https://github.com/sebastiangraf/treetank/blob/9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60/interfacemodules/jax-rx/src/main/java/org/treetank/service/jaxrx/implementation/NodeIdRepresentation.java#L274-L313
train
sebastiangraf/treetank
interfacemodules/jax-rx/src/main/java/org/treetank/service/jaxrx/implementation/NodeIdRepresentation.java
NodeIdRepresentation.addSubResource
public void addSubResource(final String resourceName, final long nodeId, final InputStream input, final EIdAccessType type) throws JaxRxException { ISession session = null; INodeWriteTrx wtx = null; synchronized (resourceName) { boolean abort; if (mDatabase.exists...
java
public void addSubResource(final String resourceName, final long nodeId, final InputStream input, final EIdAccessType type) throws JaxRxException { ISession session = null; INodeWriteTrx wtx = null; synchronized (resourceName) { boolean abort; if (mDatabase.exists...
[ "public", "void", "addSubResource", "(", "final", "String", "resourceName", ",", "final", "long", "nodeId", ",", "final", "InputStream", "input", ",", "final", "EIdAccessType", "type", ")", "throws", "JaxRxException", "{", "ISession", "session", "=", "null", ";"...
This method is responsible to perform a POST request to a node id. This method adds a new XML subtree as first child or as right sibling to the node which is addressed through a node id. @param resourceName The name of the database, the node id belongs to. @param nodeId The node id. @param input The new XML subtree. @...
[ "This", "method", "is", "responsible", "to", "perform", "a", "POST", "request", "to", "a", "node", "id", ".", "This", "method", "adds", "a", "new", "XML", "subtree", "as", "first", "child", "or", "as", "right", "sibling", "to", "the", "node", "which", ...
9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60
https://github.com/sebastiangraf/treetank/blob/9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60/interfacemodules/jax-rx/src/main/java/org/treetank/service/jaxrx/implementation/NodeIdRepresentation.java#L332-L389
train
sebastiangraf/treetank
interfacemodules/jax-rx/src/main/java/org/treetank/service/jaxrx/implementation/NodeIdRepresentation.java
NodeIdRepresentation.serialize
private void serialize(final String resource, final long nodeId, final Long revision, final boolean doNodeId, final OutputStream output, final boolean wrapResult) { if (mDatabase.existsResource(resource)) { ISession session = null; try { session = mDatabase.getSes...
java
private void serialize(final String resource, final long nodeId, final Long revision, final boolean doNodeId, final OutputStream output, final boolean wrapResult) { if (mDatabase.existsResource(resource)) { ISession session = null; try { session = mDatabase.getSes...
[ "private", "void", "serialize", "(", "final", "String", "resource", ",", "final", "long", "nodeId", ",", "final", "Long", "revision", ",", "final", "boolean", "doNodeId", ",", "final", "OutputStream", "output", ",", "final", "boolean", "wrapResult", ")", "{", ...
This method serializes requested resource @param resource The requested resource @param nodeId The node id of the requested resource. @param revision The revision of the requested resource. @param doNodeId Specifies whether the node id's have to be shown in the result. @param output The output stream to be written. @p...
[ "This", "method", "serializes", "requested", "resource" ]
9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60
https://github.com/sebastiangraf/treetank/blob/9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60/interfacemodules/jax-rx/src/main/java/org/treetank/service/jaxrx/implementation/NodeIdRepresentation.java#L409-L463
train
sebastiangraf/treetank
interfacemodules/xml/src/main/java/org/treetank/service/xml/xpath/comparators/AbsComparator.java
AbsComparator.getComparator
public static final AbsComparator getComparator(final INodeReadTrx paramRtx, final AbsAxis paramOperandOne, final AbsAxis paramOperandTwo, final CompKind paramKind, final String paramVal) { if ("eq".equals(paramVal) || "lt".equals(paramVal) || "le".equals(paramVal) || "gt".equals(paramVal) ...
java
public static final AbsComparator getComparator(final INodeReadTrx paramRtx, final AbsAxis paramOperandOne, final AbsAxis paramOperandTwo, final CompKind paramKind, final String paramVal) { if ("eq".equals(paramVal) || "lt".equals(paramVal) || "le".equals(paramVal) || "gt".equals(paramVal) ...
[ "public", "static", "final", "AbsComparator", "getComparator", "(", "final", "INodeReadTrx", "paramRtx", ",", "final", "AbsAxis", "paramOperandOne", ",", "final", "AbsAxis", "paramOperandTwo", ",", "final", "CompKind", "paramKind", ",", "final", "String", "paramVal", ...
Factory method to implement the comparator. @param paramRtx rtx for accessing data @param paramOperandOne operand one to be compared @param paramOperandTwo operand two to be compared @param paramKind kind of comparison @param paramVal string value to estimate @return AbsComparator the comparator of two axis
[ "Factory", "method", "to", "implement", "the", "comparator", "." ]
9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60
https://github.com/sebastiangraf/treetank/blob/9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60/interfacemodules/xml/src/main/java/org/treetank/service/xml/xpath/comparators/AbsComparator.java#L227-L240
train
Bedework/bw-util
bw-util-struts/src/main/java/org/bedework/util/struts/Request.java
Request.getIntReqPar
public Integer getIntReqPar(final String name, final String errProp) throws Throwable { try { return super.getIntReqPar(name); } catch (final Throwable t) { getErr().emit(errProp, getReqPar(name)); return null; } }
java
public Integer getIntReqPar(final String name, final String errProp) throws Throwable { try { return super.getIntReqPar(name); } catch (final Throwable t) { getErr().emit(errProp, getReqPar(name)); return null; } }
[ "public", "Integer", "getIntReqPar", "(", "final", "String", "name", ",", "final", "String", "errProp", ")", "throws", "Throwable", "{", "try", "{", "return", "super", ".", "getIntReqPar", "(", "name", ")", ";", "}", "catch", "(", "final", "Throwable", "t"...
Get an Integer request parameter or null. Emit error for non-null and non integer @param name name of parameter @param errProp error to emit @return Integer value or null @throws Throwable on error
[ "Get", "an", "Integer", "request", "parameter", "or", "null", ".", "Emit", "error", "for", "non", "-", "null", "and", "non", "integer" ]
f51de4af3d7eb88fe63a0e22be8898a16c6cc3ad
https://github.com/Bedework/bw-util/blob/f51de4af3d7eb88fe63a0e22be8898a16c6cc3ad/bw-util-struts/src/main/java/org/bedework/util/struts/Request.java#L267-L275
train
centic9/commons-dost
src/main/java/org/dstadler/commons/net/UrlUtils.java
UrlUtils.retrieveData
public static String retrieveData(String sUrl, int timeout) throws IOException { return retrieveData(sUrl, null, timeout); }
java
public static String retrieveData(String sUrl, int timeout) throws IOException { return retrieveData(sUrl, null, timeout); }
[ "public", "static", "String", "retrieveData", "(", "String", "sUrl", ",", "int", "timeout", ")", "throws", "IOException", "{", "return", "retrieveData", "(", "sUrl", ",", "null", ",", "timeout", ")", ";", "}" ]
Download data from an URL. @param sUrl The full URL used to download the content. @param timeout The timeout in milliseconds that is used for both connection timeout and read timeout. @return The resulting data, e.g. a HTML string. @throws IOException If accessing the resource fails.
[ "Download", "data", "from", "an", "URL", "." ]
f6fa4e3e0b943ff103f918824319d8abf33d0e0f
https://github.com/centic9/commons-dost/blob/f6fa4e3e0b943ff103f918824319d8abf33d0e0f/src/main/java/org/dstadler/commons/net/UrlUtils.java#L48-L50
train
centic9/commons-dost
src/main/java/org/dstadler/commons/net/UrlUtils.java
UrlUtils.retrieveData
public static String retrieveData(String sUrl, String encoding, int timeout, SSLSocketFactory sslFactory) throws IOException { byte[] rawData = retrieveRawData(sUrl, timeout, sslFactory); if(encoding == null) { return new String(rawData); // NOSONAR } return new String(rawD...
java
public static String retrieveData(String sUrl, String encoding, int timeout, SSLSocketFactory sslFactory) throws IOException { byte[] rawData = retrieveRawData(sUrl, timeout, sslFactory); if(encoding == null) { return new String(rawData); // NOSONAR } return new String(rawD...
[ "public", "static", "String", "retrieveData", "(", "String", "sUrl", ",", "String", "encoding", ",", "int", "timeout", ",", "SSLSocketFactory", "sslFactory", ")", "throws", "IOException", "{", "byte", "[", "]", "rawData", "=", "retrieveRawData", "(", "sUrl", "...
Download data from an URL, if necessary converting from a character encoding. @param sUrl The full URL used to download the content. @param encoding An encoding, e.g. UTF-8, ISO-8859-15. Can be null. @param timeout The timeout in milliseconds that is used for both connection timeout and read timeout. @param sslFactory...
[ "Download", "data", "from", "an", "URL", "if", "necessary", "converting", "from", "a", "character", "encoding", "." ]
f6fa4e3e0b943ff103f918824319d8abf33d0e0f
https://github.com/centic9/commons-dost/blob/f6fa4e3e0b943ff103f918824319d8abf33d0e0f/src/main/java/org/dstadler/commons/net/UrlUtils.java#L81-L88
train
centic9/commons-dost
src/main/java/org/dstadler/commons/net/UrlUtils.java
UrlUtils.retrieveRawData
public static byte[] retrieveRawData(String sUrl, int timeout, SSLSocketFactory sslFactory) throws IOException { URL url = new URL(sUrl); LOGGER.fine("Using the following URL for retrieving the data: " + url.toString()); HttpURLConnection conn = (HttpURLConnection) url.openConnection(); ...
java
public static byte[] retrieveRawData(String sUrl, int timeout, SSLSocketFactory sslFactory) throws IOException { URL url = new URL(sUrl); LOGGER.fine("Using the following URL for retrieving the data: " + url.toString()); HttpURLConnection conn = (HttpURLConnection) url.openConnection(); ...
[ "public", "static", "byte", "[", "]", "retrieveRawData", "(", "String", "sUrl", ",", "int", "timeout", ",", "SSLSocketFactory", "sslFactory", ")", "throws", "IOException", "{", "URL", "url", "=", "new", "URL", "(", "sUrl", ")", ";", "LOGGER", ".", "fine", ...
Download data from an URL and return the raw bytes. @param sUrl The full URL used to download the content. @param timeout The timeout in milliseconds that is used for both connection timeout and read timeout. @param sslFactory The SSLFactory to use for the connection, this allows to support custom SSL certificates @r...
[ "Download", "data", "from", "an", "URL", "and", "return", "the", "raw", "bytes", "." ]
f6fa4e3e0b943ff103f918824319d8abf33d0e0f
https://github.com/centic9/commons-dost/blob/f6fa4e3e0b943ff103f918824319d8abf33d0e0f/src/main/java/org/dstadler/commons/net/UrlUtils.java#L117-L175
train
sebastiangraf/treetank
interfacemodules/xml/src/main/java/org/treetank/service/xml/xpath/operators/AbsObAxis.java
AbsObAxis.atomize
private AtomicValue atomize(final AbsAxis mOperand) { int type = getNode().getTypeKey(); AtomicValue atom; if (XPATH_10_COMP) { atom = new AtomicValue(((ITreeValData)getNode()).getRawValue(), getNode().getTypeKey()); } else { // unatomicType is cast to double ...
java
private AtomicValue atomize(final AbsAxis mOperand) { int type = getNode().getTypeKey(); AtomicValue atom; if (XPATH_10_COMP) { atom = new AtomicValue(((ITreeValData)getNode()).getRawValue(), getNode().getTypeKey()); } else { // unatomicType is cast to double ...
[ "private", "AtomicValue", "atomize", "(", "final", "AbsAxis", "mOperand", ")", "{", "int", "type", "=", "getNode", "(", ")", ".", "getTypeKey", "(", ")", ";", "AtomicValue", "atom", ";", "if", "(", "XPATH_10_COMP", ")", "{", "atom", "=", "new", "AtomicVa...
Atomizes an operand according to the rules specified in the XPath specification. @param mOperand the operand to atomize @return the atomized operand. (always an atomic value)
[ "Atomizes", "an", "operand", "according", "to", "the", "rules", "specified", "in", "the", "XPath", "specification", "." ]
9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60
https://github.com/sebastiangraf/treetank/blob/9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60/interfacemodules/xml/src/main/java/org/treetank/service/xml/xpath/operators/AbsObAxis.java#L152-L175
train
Bedework/bw-util
bw-util-directory/src/main/java/org/bedework/util/directory/ldap/LdapDirectory.java
LdapDirectory.checkProp
public String checkProp(final Properties pr, final String name, final String defaultVal) { String val = pr.getProperty(name); if (val == null) { pr.put(name, defaultVal); val = defaultVal; } return val; }
java
public String checkProp(final Properties pr, final String name, final String defaultVal) { String val = pr.getProperty(name); if (val == null) { pr.put(name, defaultVal); val = defaultVal; } return val; }
[ "public", "String", "checkProp", "(", "final", "Properties", "pr", ",", "final", "String", "name", ",", "final", "String", "defaultVal", ")", "{", "String", "val", "=", "pr", ".", "getProperty", "(", "name", ")", ";", "if", "(", "val", "==", "null", ")...
If the named property is present and has a value use that. Otherwise, set the value to the given default and use that. @param pr @param name @param defaultVal @return String
[ "If", "the", "named", "property", "is", "present", "and", "has", "a", "value", "use", "that", ".", "Otherwise", "set", "the", "value", "to", "the", "given", "default", "and", "use", "that", "." ]
f51de4af3d7eb88fe63a0e22be8898a16c6cc3ad
https://github.com/Bedework/bw-util/blob/f51de4af3d7eb88fe63a0e22be8898a16c6cc3ad/bw-util-directory/src/main/java/org/bedework/util/directory/ldap/LdapDirectory.java#L305-L314
train
sebastiangraf/treetank
interfacemodules/xml/src/main/java/org/treetank/service/xml/xpath/PipelineBuilder.java
PipelineBuilder.finishExpr
public void finishExpr(final INodeReadTrx mTransaction, final int mNum) { // all singleExpression that are on the stack will be combined in the // sequence, so the number of singleExpressions in the sequence and the // size // of the stack containing these SingleExpressions have to be t...
java
public void finishExpr(final INodeReadTrx mTransaction, final int mNum) { // all singleExpression that are on the stack will be combined in the // sequence, so the number of singleExpressions in the sequence and the // size // of the stack containing these SingleExpressions have to be t...
[ "public", "void", "finishExpr", "(", "final", "INodeReadTrx", "mTransaction", ",", "final", "int", "mNum", ")", "{", "// all singleExpression that are on the stack will be combined in the", "// sequence, so the number of singleExpressions in the sequence and the", "// size", "// of t...
Ends an expression. This means that the currently used pipeline stack will be emptied and the singleExpressions that were on the stack are combined by a sequence expression, which is lated added to the next pipeline stack. @param mTransaction transaction to operate on @param mNum number of singleExpressions that will ...
[ "Ends", "an", "expression", ".", "This", "means", "that", "the", "currently", "used", "pipeline", "stack", "will", "be", "emptied", "and", "the", "singleExpressions", "that", "were", "on", "the", "stack", "are", "combined", "by", "a", "sequence", "expression",...
9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60
https://github.com/sebastiangraf/treetank/blob/9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60/interfacemodules/xml/src/main/java/org/treetank/service/xml/xpath/PipelineBuilder.java#L131-L190
train
sebastiangraf/treetank
interfacemodules/xml/src/main/java/org/treetank/service/xml/xpath/PipelineBuilder.java
PipelineBuilder.addIfExpression
public void addIfExpression(final INodeReadTrx mTransaction) { assert getPipeStack().size() >= 3; final INodeReadTrx rtx = mTransaction; final AbsAxis elseExpr = getPipeStack().pop().getExpr(); final AbsAxis thenExpr = getPipeStack().pop().getExpr(); final AbsAxis ifExpr = get...
java
public void addIfExpression(final INodeReadTrx mTransaction) { assert getPipeStack().size() >= 3; final INodeReadTrx rtx = mTransaction; final AbsAxis elseExpr = getPipeStack().pop().getExpr(); final AbsAxis thenExpr = getPipeStack().pop().getExpr(); final AbsAxis ifExpr = get...
[ "public", "void", "addIfExpression", "(", "final", "INodeReadTrx", "mTransaction", ")", "{", "assert", "getPipeStack", "(", ")", ".", "size", "(", ")", ">=", "3", ";", "final", "INodeReadTrx", "rtx", "=", "mTransaction", ";", "final", "AbsAxis", "elseExpr", ...
Adds a if expression to the pipeline. @param mTransaction Transaction to operate with.
[ "Adds", "a", "if", "expression", "to", "the", "pipeline", "." ]
9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60
https://github.com/sebastiangraf/treetank/blob/9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60/interfacemodules/xml/src/main/java/org/treetank/service/xml/xpath/PipelineBuilder.java#L250-L265
train
sebastiangraf/treetank
interfacemodules/xml/src/main/java/org/treetank/service/xml/xpath/PipelineBuilder.java
PipelineBuilder.addCompExpression
public void addCompExpression(final INodeReadTrx mTransaction, final String mComp) { assert getPipeStack().size() >= 2; final INodeReadTrx rtx = mTransaction; final AbsAxis paramOperandTwo = getPipeStack().pop().getExpr(); final AbsAxis paramOperandOne = getPipeStack().pop().getExpr()...
java
public void addCompExpression(final INodeReadTrx mTransaction, final String mComp) { assert getPipeStack().size() >= 2; final INodeReadTrx rtx = mTransaction; final AbsAxis paramOperandTwo = getPipeStack().pop().getExpr(); final AbsAxis paramOperandOne = getPipeStack().pop().getExpr()...
[ "public", "void", "addCompExpression", "(", "final", "INodeReadTrx", "mTransaction", ",", "final", "String", "mComp", ")", "{", "assert", "getPipeStack", "(", ")", ".", "size", "(", ")", ">=", "2", ";", "final", "INodeReadTrx", "rtx", "=", "mTransaction", ";...
Adds a comparison expression to the pipeline. @param mTransaction Transaction to operate with. @param mComp Comparator type.
[ "Adds", "a", "comparison", "expression", "to", "the", "pipeline", "." ]
9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60
https://github.com/sebastiangraf/treetank/blob/9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60/interfacemodules/xml/src/main/java/org/treetank/service/xml/xpath/PipelineBuilder.java#L275-L346
train
sebastiangraf/treetank
interfacemodules/xml/src/main/java/org/treetank/service/xml/xpath/PipelineBuilder.java
PipelineBuilder.addOperatorExpression
public void addOperatorExpression(final INodeReadTrx mTransaction, final String mOperator) { assert getPipeStack().size() >= 1; final INodeReadTrx rtx = mTransaction; final AbsAxis mOperand2 = getPipeStack().pop().getExpr(); // the unary operation only has one operator final ...
java
public void addOperatorExpression(final INodeReadTrx mTransaction, final String mOperator) { assert getPipeStack().size() >= 1; final INodeReadTrx rtx = mTransaction; final AbsAxis mOperand2 = getPipeStack().pop().getExpr(); // the unary operation only has one operator final ...
[ "public", "void", "addOperatorExpression", "(", "final", "INodeReadTrx", "mTransaction", ",", "final", "String", "mOperator", ")", "{", "assert", "getPipeStack", "(", ")", ".", "size", "(", ")", ">=", "1", ";", "final", "INodeReadTrx", "rtx", "=", "mTransactio...
Adds an operator expression to the pipeline. @param mTransaction Transaction to operate with. @param mOperator Operator type.
[ "Adds", "an", "operator", "expression", "to", "the", "pipeline", "." ]
9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60
https://github.com/sebastiangraf/treetank/blob/9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60/interfacemodules/xml/src/main/java/org/treetank/service/xml/xpath/PipelineBuilder.java#L356-L393
train
sebastiangraf/treetank
interfacemodules/xml/src/main/java/org/treetank/service/xml/xpath/PipelineBuilder.java
PipelineBuilder.addUnionExpression
public void addUnionExpression(final INodeReadTrx mTransaction) { assert getPipeStack().size() >= 2; final AbsAxis mOperand2 = getPipeStack().pop().getExpr(); final AbsAxis mOperand1 = getPipeStack().pop().getExpr(); if (getPipeStack().empty() || getExpression().getSize() != 0) { ...
java
public void addUnionExpression(final INodeReadTrx mTransaction) { assert getPipeStack().size() >= 2; final AbsAxis mOperand2 = getPipeStack().pop().getExpr(); final AbsAxis mOperand1 = getPipeStack().pop().getExpr(); if (getPipeStack().empty() || getExpression().getSize() != 0) { ...
[ "public", "void", "addUnionExpression", "(", "final", "INodeReadTrx", "mTransaction", ")", "{", "assert", "getPipeStack", "(", ")", ".", "size", "(", ")", ">=", "2", ";", "final", "AbsAxis", "mOperand2", "=", "getPipeStack", "(", ")", ".", "pop", "(", ")",...
Adds a union expression to the pipeline. @param mTransaction Transaction to operate with.
[ "Adds", "a", "union", "expression", "to", "the", "pipeline", "." ]
9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60
https://github.com/sebastiangraf/treetank/blob/9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60/interfacemodules/xml/src/main/java/org/treetank/service/xml/xpath/PipelineBuilder.java#L401-L412
train
sebastiangraf/treetank
interfacemodules/xml/src/main/java/org/treetank/service/xml/xpath/PipelineBuilder.java
PipelineBuilder.addAndExpression
public void addAndExpression(final INodeReadTrx mTransaction) { assert getPipeStack().size() >= 2; final AbsAxis mOperand2 = getPipeStack().pop().getExpr(); final AbsAxis operand1 = getPipeStack().pop().getExpr(); if (getPipeStack().empty() || getExpression().getSize() != 0) { ...
java
public void addAndExpression(final INodeReadTrx mTransaction) { assert getPipeStack().size() >= 2; final AbsAxis mOperand2 = getPipeStack().pop().getExpr(); final AbsAxis operand1 = getPipeStack().pop().getExpr(); if (getPipeStack().empty() || getExpression().getSize() != 0) { ...
[ "public", "void", "addAndExpression", "(", "final", "INodeReadTrx", "mTransaction", ")", "{", "assert", "getPipeStack", "(", ")", ".", "size", "(", ")", ">=", "2", ";", "final", "AbsAxis", "mOperand2", "=", "getPipeStack", "(", ")", ".", "pop", "(", ")", ...
Adds a and expression to the pipeline. @param mTransaction Transaction to operate with.
[ "Adds", "a", "and", "expression", "to", "the", "pipeline", "." ]
9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60
https://github.com/sebastiangraf/treetank/blob/9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60/interfacemodules/xml/src/main/java/org/treetank/service/xml/xpath/PipelineBuilder.java#L420-L429
train
sebastiangraf/treetank
interfacemodules/xml/src/main/java/org/treetank/service/xml/xpath/PipelineBuilder.java
PipelineBuilder.addOrExpression
public void addOrExpression(final INodeReadTrx mTransaction) { assert getPipeStack().size() >= 2; final AbsAxis mOperand2 = getPipeStack().pop().getExpr(); final AbsAxis mOperand1 = getPipeStack().pop().getExpr(); if (getPipeStack().empty() || getExpression().getSize() != 0) { ...
java
public void addOrExpression(final INodeReadTrx mTransaction) { assert getPipeStack().size() >= 2; final AbsAxis mOperand2 = getPipeStack().pop().getExpr(); final AbsAxis mOperand1 = getPipeStack().pop().getExpr(); if (getPipeStack().empty() || getExpression().getSize() != 0) { ...
[ "public", "void", "addOrExpression", "(", "final", "INodeReadTrx", "mTransaction", ")", "{", "assert", "getPipeStack", "(", ")", ".", "size", "(", ")", ">=", "2", ";", "final", "AbsAxis", "mOperand2", "=", "getPipeStack", "(", ")", ".", "pop", "(", ")", ...
Adds a or expression to the pipeline. @param mTransaction Transaction to operate with.
[ "Adds", "a", "or", "expression", "to", "the", "pipeline", "." ]
9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60
https://github.com/sebastiangraf/treetank/blob/9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60/interfacemodules/xml/src/main/java/org/treetank/service/xml/xpath/PipelineBuilder.java#L437-L448
train
sebastiangraf/treetank
interfacemodules/xml/src/main/java/org/treetank/service/xml/xpath/PipelineBuilder.java
PipelineBuilder.addIntExcExpression
public void addIntExcExpression(final INodeReadTrx mTransaction, final boolean mIsIntersect) { assert getPipeStack().size() >= 2; final INodeReadTrx rtx = mTransaction; final AbsAxis mOperand2 = getPipeStack().pop().getExpr(); final AbsAxis mOperand1 = getPipeStack().pop().getExpr(); ...
java
public void addIntExcExpression(final INodeReadTrx mTransaction, final boolean mIsIntersect) { assert getPipeStack().size() >= 2; final INodeReadTrx rtx = mTransaction; final AbsAxis mOperand2 = getPipeStack().pop().getExpr(); final AbsAxis mOperand1 = getPipeStack().pop().getExpr(); ...
[ "public", "void", "addIntExcExpression", "(", "final", "INodeReadTrx", "mTransaction", ",", "final", "boolean", "mIsIntersect", ")", "{", "assert", "getPipeStack", "(", ")", ".", "size", "(", ")", ">=", "2", ";", "final", "INodeReadTrx", "rtx", "=", "mTransact...
Adds a intersect or a exception expression to the pipeline. @param mTransaction Transaction to operate with. @param mIsIntersect true, if expression is an intersection
[ "Adds", "a", "intersect", "or", "a", "exception", "expression", "to", "the", "pipeline", "." ]
9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60
https://github.com/sebastiangraf/treetank/blob/9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60/interfacemodules/xml/src/main/java/org/treetank/service/xml/xpath/PipelineBuilder.java#L458-L475
train
sebastiangraf/treetank
interfacemodules/xml/src/main/java/org/treetank/service/xml/xpath/PipelineBuilder.java
PipelineBuilder.addLiteral
public void addLiteral(final INodeReadTrx pTrans, final AtomicValue pVal) { getExpression().add(new LiteralExpr(pTrans, AbsAxis.addAtomicToItemList(pTrans, pVal))); }
java
public void addLiteral(final INodeReadTrx pTrans, final AtomicValue pVal) { getExpression().add(new LiteralExpr(pTrans, AbsAxis.addAtomicToItemList(pTrans, pVal))); }
[ "public", "void", "addLiteral", "(", "final", "INodeReadTrx", "pTrans", ",", "final", "AtomicValue", "pVal", ")", "{", "getExpression", "(", ")", ".", "add", "(", "new", "LiteralExpr", "(", "pTrans", ",", "AbsAxis", ".", "addAtomicToItemList", "(", "pTrans", ...
Adds a literal expression to the pipeline. @param pTrans Transaction to operate with. @param pVal key of the literal expression.
[ "Adds", "a", "literal", "expression", "to", "the", "pipeline", "." ]
9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60
https://github.com/sebastiangraf/treetank/blob/9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60/interfacemodules/xml/src/main/java/org/treetank/service/xml/xpath/PipelineBuilder.java#L485-L487
train
sebastiangraf/treetank
interfacemodules/xml/src/main/java/org/treetank/service/xml/xpath/PipelineBuilder.java
PipelineBuilder.addStep
public void addStep(final AbsAxis axis, final AbsFilter mFilter) { getExpression().add(new FilterAxis(axis, mRtx, mFilter)); }
java
public void addStep(final AbsAxis axis, final AbsFilter mFilter) { getExpression().add(new FilterAxis(axis, mRtx, mFilter)); }
[ "public", "void", "addStep", "(", "final", "AbsAxis", "axis", ",", "final", "AbsFilter", "mFilter", ")", "{", "getExpression", "(", ")", ".", "add", "(", "new", "FilterAxis", "(", "axis", ",", "mRtx", ",", "mFilter", ")", ")", ";", "}" ]
Adds a step to the pipeline. @param axis the axis step to add to the pipeline. @param mFilter the node test to add to the pipeline.
[ "Adds", "a", "step", "to", "the", "pipeline", "." ]
9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60
https://github.com/sebastiangraf/treetank/blob/9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60/interfacemodules/xml/src/main/java/org/treetank/service/xml/xpath/PipelineBuilder.java#L508-L511
train
sebastiangraf/treetank
interfacemodules/xml/src/main/java/org/treetank/service/xml/xpath/PipelineBuilder.java
PipelineBuilder.getPipeline
public AbsAxis getPipeline() { assert getPipeStack().size() <= 1; if (getPipeStack().size() == 1 && mExprStack.size() == 1) { return getPipeStack().pop().getExpr(); } else { throw new IllegalStateException("Query was not build correctly."); } }
java
public AbsAxis getPipeline() { assert getPipeStack().size() <= 1; if (getPipeStack().size() == 1 && mExprStack.size() == 1) { return getPipeStack().pop().getExpr(); } else { throw new IllegalStateException("Query was not build correctly."); } }
[ "public", "AbsAxis", "getPipeline", "(", ")", "{", "assert", "getPipeStack", "(", ")", ".", "size", "(", ")", "<=", "1", ";", "if", "(", "getPipeStack", "(", ")", ".", "size", "(", ")", "==", "1", "&&", "mExprStack", ".", "size", "(", ")", "==", ...
Returns a queue of all pipelines build so far and empties the pipeline stack. @return all build pipelines
[ "Returns", "a", "queue", "of", "all", "pipelines", "build", "so", "far", "and", "empties", "the", "pipeline", "stack", "." ]
9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60
https://github.com/sebastiangraf/treetank/blob/9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60/interfacemodules/xml/src/main/java/org/treetank/service/xml/xpath/PipelineBuilder.java#L519-L529
train
sebastiangraf/treetank
interfacemodules/xml/src/main/java/org/treetank/service/xml/xpath/PipelineBuilder.java
PipelineBuilder.addPredicate
public void addPredicate(final INodeReadTrx mTransaction) { assert getPipeStack().size() >= 2; final AbsAxis mPredicate = getPipeStack().pop().getExpr(); if (mPredicate instanceof LiteralExpr) { mPredicate.hasNext(); // if is numeric literal -> abbrev for position() ...
java
public void addPredicate(final INodeReadTrx mTransaction) { assert getPipeStack().size() >= 2; final AbsAxis mPredicate = getPipeStack().pop().getExpr(); if (mPredicate instanceof LiteralExpr) { mPredicate.hasNext(); // if is numeric literal -> abbrev for position() ...
[ "public", "void", "addPredicate", "(", "final", "INodeReadTrx", "mTransaction", ")", "{", "assert", "getPipeStack", "(", ")", ".", "size", "(", ")", ">=", "2", ";", "final", "AbsAxis", "mPredicate", "=", "getPipeStack", "(", ")", ".", "pop", "(", ")", "....
Adds a predicate to the pipeline. @param mTransaction Transaction to operate with.
[ "Adds", "a", "predicate", "to", "the", "pipeline", "." ]
9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60
https://github.com/sebastiangraf/treetank/blob/9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60/interfacemodules/xml/src/main/java/org/treetank/service/xml/xpath/PipelineBuilder.java#L537-L582
train
sebastiangraf/treetank
interfacemodules/xml/src/main/java/org/treetank/service/xml/xpath/PipelineBuilder.java
PipelineBuilder.addQuantifierExpr
public void addQuantifierExpr(final INodeReadTrx mTransaction, final boolean mIsSome, final int mVarNum) { assert getPipeStack().size() >= (mVarNum + 1); final AbsAxis satisfy = getPipeStack().pop().getExpr(); final List<AbsAxis> vars = new ArrayList<AbsAxis>(); int num = mVarNum; ...
java
public void addQuantifierExpr(final INodeReadTrx mTransaction, final boolean mIsSome, final int mVarNum) { assert getPipeStack().size() >= (mVarNum + 1); final AbsAxis satisfy = getPipeStack().pop().getExpr(); final List<AbsAxis> vars = new ArrayList<AbsAxis>(); int num = mVarNum; ...
[ "public", "void", "addQuantifierExpr", "(", "final", "INodeReadTrx", "mTransaction", ",", "final", "boolean", "mIsSome", ",", "final", "int", "mVarNum", ")", "{", "assert", "getPipeStack", "(", ")", ".", "size", "(", ")", ">=", "(", "mVarNum", "+", "1", ")...
Adds a SomeExpression or an EveryExpression to the pipeline, depending on the parameter isSome. @param mTransaction Transaction to operate with. @param mIsSome defines whether a some- or an EveryExpression is used. @param mVarNum number of binding variables
[ "Adds", "a", "SomeExpression", "or", "an", "EveryExpression", "to", "the", "pipeline", "depending", "on", "the", "parameter", "isSome", "." ]
9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60
https://github.com/sebastiangraf/treetank/blob/9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60/interfacemodules/xml/src/main/java/org/treetank/service/xml/xpath/PipelineBuilder.java#L595-L615
train
sebastiangraf/treetank
interfacemodules/xml/src/main/java/org/treetank/service/xml/xpath/PipelineBuilder.java
PipelineBuilder.addCastableExpr
public void addCastableExpr(final INodeReadTrx mTransaction, final SingleType mSingleType) { assert getPipeStack().size() >= 1; final AbsAxis candidate = getPipeStack().pop().getExpr(); final AbsAxis axis = new CastableExpr(mTransaction, candidate, mSingleType); if (getPipeStack().emp...
java
public void addCastableExpr(final INodeReadTrx mTransaction, final SingleType mSingleType) { assert getPipeStack().size() >= 1; final AbsAxis candidate = getPipeStack().pop().getExpr(); final AbsAxis axis = new CastableExpr(mTransaction, candidate, mSingleType); if (getPipeStack().emp...
[ "public", "void", "addCastableExpr", "(", "final", "INodeReadTrx", "mTransaction", ",", "final", "SingleType", "mSingleType", ")", "{", "assert", "getPipeStack", "(", ")", ".", "size", "(", ")", ">=", "1", ";", "final", "AbsAxis", "candidate", "=", "getPipeSta...
Adds a castable expression to the pipeline. @param mTransaction Transaction to operate with. @param mSingleType single type the context item will be casted to.
[ "Adds", "a", "castable", "expression", "to", "the", "pipeline", "." ]
9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60
https://github.com/sebastiangraf/treetank/blob/9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60/interfacemodules/xml/src/main/java/org/treetank/service/xml/xpath/PipelineBuilder.java#L625-L637
train
sebastiangraf/treetank
interfacemodules/xml/src/main/java/org/treetank/service/xml/xpath/PipelineBuilder.java
PipelineBuilder.addRangeExpr
public void addRangeExpr(final INodeReadTrx mTransaction) { assert getPipeStack().size() >= 2; final AbsAxis mOperand2 = getPipeStack().pop().getExpr(); final AbsAxis mOperand1 = getPipeStack().pop().getExpr(); final AbsAxis axis = new RangeAxis(mTransaction, mOperand1, mOperand2); ...
java
public void addRangeExpr(final INodeReadTrx mTransaction) { assert getPipeStack().size() >= 2; final AbsAxis mOperand2 = getPipeStack().pop().getExpr(); final AbsAxis mOperand1 = getPipeStack().pop().getExpr(); final AbsAxis axis = new RangeAxis(mTransaction, mOperand1, mOperand2); ...
[ "public", "void", "addRangeExpr", "(", "final", "INodeReadTrx", "mTransaction", ")", "{", "assert", "getPipeStack", "(", ")", ".", "size", "(", ")", ">=", "2", ";", "final", "AbsAxis", "mOperand2", "=", "getPipeStack", "(", ")", ".", "pop", "(", ")", "."...
Adds a range expression to the pipeline. @param mTransaction Transaction to operate with.
[ "Adds", "a", "range", "expression", "to", "the", "pipeline", "." ]
9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60
https://github.com/sebastiangraf/treetank/blob/9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60/interfacemodules/xml/src/main/java/org/treetank/service/xml/xpath/PipelineBuilder.java#L645-L658
train
sebastiangraf/treetank
interfacemodules/xml/src/main/java/org/treetank/service/xml/xpath/PipelineBuilder.java
PipelineBuilder.addInstanceOfExpr
public void addInstanceOfExpr(final INodeReadTrx mTransaction, final SequenceType mSequenceType) { assert getPipeStack().size() >= 1; final AbsAxis candidate = getPipeStack().pop().getExpr(); final AbsAxis axis = new InstanceOfExpr(mTransaction, candidate, mSequenceType); if (getPipeS...
java
public void addInstanceOfExpr(final INodeReadTrx mTransaction, final SequenceType mSequenceType) { assert getPipeStack().size() >= 1; final AbsAxis candidate = getPipeStack().pop().getExpr(); final AbsAxis axis = new InstanceOfExpr(mTransaction, candidate, mSequenceType); if (getPipeS...
[ "public", "void", "addInstanceOfExpr", "(", "final", "INodeReadTrx", "mTransaction", ",", "final", "SequenceType", "mSequenceType", ")", "{", "assert", "getPipeStack", "(", ")", ".", "size", "(", ")", ">=", "1", ";", "final", "AbsAxis", "candidate", "=", "getP...
Adds a instance of expression to the pipeline. @param mTransaction Transaction to operate with. @param mSequenceType sequence type the context item should match.
[ "Adds", "a", "instance", "of", "expression", "to", "the", "pipeline", "." ]
9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60
https://github.com/sebastiangraf/treetank/blob/9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60/interfacemodules/xml/src/main/java/org/treetank/service/xml/xpath/PipelineBuilder.java#L668-L680
train
sebastiangraf/treetank
interfacemodules/xml/src/main/java/org/treetank/service/xml/xpath/PipelineBuilder.java
PipelineBuilder.addVariableExpr
public void addVariableExpr(final INodeReadTrx mTransaction, final String mVarName) { assert getPipeStack().size() >= 1; final AbsAxis bindingSeq = getPipeStack().pop().getExpr(); final AbsAxis axis = new VariableAxis(mTransaction, bindingSeq); mVarRefMap.put(mVarName, axis); ...
java
public void addVariableExpr(final INodeReadTrx mTransaction, final String mVarName) { assert getPipeStack().size() >= 1; final AbsAxis bindingSeq = getPipeStack().pop().getExpr(); final AbsAxis axis = new VariableAxis(mTransaction, bindingSeq); mVarRefMap.put(mVarName, axis); ...
[ "public", "void", "addVariableExpr", "(", "final", "INodeReadTrx", "mTransaction", ",", "final", "String", "mVarName", ")", "{", "assert", "getPipeStack", "(", ")", ".", "size", "(", ")", ">=", "1", ";", "final", "AbsAxis", "bindingSeq", "=", "getPipeStack", ...
Adds a variable expression to the pipeline. Adds the expression that will evaluate the results the variable holds. @param mTransaction Transaction to operate with. @param mVarName name of the variable
[ "Adds", "a", "variable", "expression", "to", "the", "pipeline", ".", "Adds", "the", "expression", "that", "will", "evaluate", "the", "results", "the", "variable", "holds", "." ]
9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60
https://github.com/sebastiangraf/treetank/blob/9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60/interfacemodules/xml/src/main/java/org/treetank/service/xml/xpath/PipelineBuilder.java#L705-L718
train
sebastiangraf/treetank
interfacemodules/xml/src/main/java/org/treetank/service/xml/xpath/PipelineBuilder.java
PipelineBuilder.addFunction
public void addFunction(final INodeReadTrx mTransaction, final String mFuncName, final int mNum) throws TTXPathException { assert getPipeStack().size() >= mNum; final List<AbsAxis> args = new ArrayList<AbsAxis>(mNum); // arguments are stored on the stack in reverse order -> invert arg ...
java
public void addFunction(final INodeReadTrx mTransaction, final String mFuncName, final int mNum) throws TTXPathException { assert getPipeStack().size() >= mNum; final List<AbsAxis> args = new ArrayList<AbsAxis>(mNum); // arguments are stored on the stack in reverse order -> invert arg ...
[ "public", "void", "addFunction", "(", "final", "INodeReadTrx", "mTransaction", ",", "final", "String", "mFuncName", ",", "final", "int", "mNum", ")", "throws", "TTXPathException", "{", "assert", "getPipeStack", "(", ")", ".", "size", "(", ")", ">=", "mNum", ...
Adds a function to the pipeline. @param mTransaction Transaction to operate with. @param mFuncName The name of the function @param mNum The number of arguments that are passed to the function @throws TTXPathException if function can't be added
[ "Adds", "a", "function", "to", "the", "pipeline", "." ]
9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60
https://github.com/sebastiangraf/treetank/blob/9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60/interfacemodules/xml/src/main/java/org/treetank/service/xml/xpath/PipelineBuilder.java#L732-L785
train
sebastiangraf/treetank
interfacemodules/xml/src/main/java/org/treetank/service/xml/xpath/PipelineBuilder.java
PipelineBuilder.addVarRefExpr
public void addVarRefExpr(final INodeReadTrx mTransaction, final String mVarName) { final VariableAxis axis = (VariableAxis)mVarRefMap.get(mVarName); if (axis != null) { getExpression().add(new VarRefExpr(mTransaction, axis)); } else { throw new IllegalStateException("Va...
java
public void addVarRefExpr(final INodeReadTrx mTransaction, final String mVarName) { final VariableAxis axis = (VariableAxis)mVarRefMap.get(mVarName); if (axis != null) { getExpression().add(new VarRefExpr(mTransaction, axis)); } else { throw new IllegalStateException("Va...
[ "public", "void", "addVarRefExpr", "(", "final", "INodeReadTrx", "mTransaction", ",", "final", "String", "mVarName", ")", "{", "final", "VariableAxis", "axis", "=", "(", "VariableAxis", ")", "mVarRefMap", ".", "get", "(", "mVarName", ")", ";", "if", "(", "ax...
Adds a VarRefExpr to the pipeline. This Expression holds a reference to the current context item of the specified variable. @param mTransaction the transaction to operate on. @param mVarName the name of the variable
[ "Adds", "a", "VarRefExpr", "to", "the", "pipeline", ".", "This", "Expression", "holds", "a", "reference", "to", "the", "current", "context", "item", "of", "the", "specified", "variable", "." ]
9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60
https://github.com/sebastiangraf/treetank/blob/9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60/interfacemodules/xml/src/main/java/org/treetank/service/xml/xpath/PipelineBuilder.java#L796-L805
train
Bedework/bw-util
bw-util-misc/src/main/java/org/bedework/util/misc/AbstractProcessorThread.java
AbstractProcessorThread.stopProcess
public static boolean stopProcess(final AbstractProcessorThread proc) { proc.info("************************************************************"); proc.info(" * Stopping " + proc.getName()); proc.info("************************************************************"); proc.setRunning(false); proc.int...
java
public static boolean stopProcess(final AbstractProcessorThread proc) { proc.info("************************************************************"); proc.info(" * Stopping " + proc.getName()); proc.info("************************************************************"); proc.setRunning(false); proc.int...
[ "public", "static", "boolean", "stopProcess", "(", "final", "AbstractProcessorThread", "proc", ")", "{", "proc", ".", "info", "(", "\"************************************************************\"", ")", ";", "proc", ".", "info", "(", "\" * Stopping \"", "+", "proc", ...
Shut down a running process. @param proc the thread process @return false for exception or timeout
[ "Shut", "down", "a", "running", "process", "." ]
f51de4af3d7eb88fe63a0e22be8898a16c6cc3ad
https://github.com/Bedework/bw-util/blob/f51de4af3d7eb88fe63a0e22be8898a16c6cc3ad/bw-util-misc/src/main/java/org/bedework/util/misc/AbstractProcessorThread.java#L140-L165
train
sebastiangraf/treetank
coremodules/node/src/main/java/org/treetank/axis/AbsAxis.java
AbsAxis.reset
public void reset(final long paramNodeKey) { mStartKey = paramNodeKey; mKey = paramNodeKey; mNext = false; lastPointer.remove(mRTX); }
java
public void reset(final long paramNodeKey) { mStartKey = paramNodeKey; mKey = paramNodeKey; mNext = false; lastPointer.remove(mRTX); }
[ "public", "void", "reset", "(", "final", "long", "paramNodeKey", ")", "{", "mStartKey", "=", "paramNodeKey", ";", "mKey", "=", "paramNodeKey", ";", "mNext", "=", "false", ";", "lastPointer", ".", "remove", "(", "mRTX", ")", ";", "}" ]
Resetting the nodekey of this axis to a given nodekey. @param paramNodeKey the nodekey where the reset should occur to.
[ "Resetting", "the", "nodekey", "of", "this", "axis", "to", "a", "given", "nodekey", "." ]
9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60
https://github.com/sebastiangraf/treetank/blob/9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60/coremodules/node/src/main/java/org/treetank/axis/AbsAxis.java#L140-L145
train
sebastiangraf/treetank
coremodules/node/src/main/java/org/treetank/axis/AbsAxis.java
AbsAxis.moveTo
public boolean moveTo(final long pKey) { try { if (pKey < 0 || mRTX.moveTo(pKey)) { lastPointer.put(mRTX, pKey); return true; } else { return false; } } catch (TTIOException exc) { throw new RuntimeException(...
java
public boolean moveTo(final long pKey) { try { if (pKey < 0 || mRTX.moveTo(pKey)) { lastPointer.put(mRTX, pKey); return true; } else { return false; } } catch (TTIOException exc) { throw new RuntimeException(...
[ "public", "boolean", "moveTo", "(", "final", "long", "pKey", ")", "{", "try", "{", "if", "(", "pKey", "<", "0", "||", "mRTX", ".", "moveTo", "(", "pKey", ")", ")", "{", "lastPointer", ".", "put", "(", "mRTX", ",", "pKey", ")", ";", "return", "tru...
Move cursor to a node by its node key. @param pKey Key of node to select. @return True if the node with the given node key is selected.
[ "Move", "cursor", "to", "a", "node", "by", "its", "node", "key", "." ]
9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60
https://github.com/sebastiangraf/treetank/blob/9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60/coremodules/node/src/main/java/org/treetank/axis/AbsAxis.java#L154-L165
train
sebastiangraf/treetank
coremodules/node/src/main/java/org/treetank/axis/AbsAxis.java
AbsAxis.close
public void close() throws TTException { atomics.remove(mRTX); lastPointer.remove(mRTX); mRTX.close(); }
java
public void close() throws TTException { atomics.remove(mRTX); lastPointer.remove(mRTX); mRTX.close(); }
[ "public", "void", "close", "(", ")", "throws", "TTException", "{", "atomics", ".", "remove", "(", "mRTX", ")", ";", "lastPointer", ".", "remove", "(", "mRTX", ")", ";", "mRTX", ".", "close", "(", ")", ";", "}" ]
Closing the Transaction @throws TTException
[ "Closing", "the", "Transaction" ]
9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60
https://github.com/sebastiangraf/treetank/blob/9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60/coremodules/node/src/main/java/org/treetank/axis/AbsAxis.java#L172-L176
train
sebastiangraf/treetank
coremodules/node/src/main/java/org/treetank/axis/AbsAxis.java
AbsAxis.getItemList
public ItemList getItemList() { if (!atomics.containsKey(mRTX)) { atomics.put(mRTX, new ItemList()); } return atomics.get(mRTX); }
java
public ItemList getItemList() { if (!atomics.containsKey(mRTX)) { atomics.put(mRTX, new ItemList()); } return atomics.get(mRTX); }
[ "public", "ItemList", "getItemList", "(", ")", "{", "if", "(", "!", "atomics", ".", "containsKey", "(", "mRTX", ")", ")", "{", "atomics", ".", "put", "(", "mRTX", ",", "new", "ItemList", "(", ")", ")", ";", "}", "return", "atomics", ".", "get", "("...
Getting the ItemList. @return the Itemlist
[ "Getting", "the", "ItemList", "." ]
9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60
https://github.com/sebastiangraf/treetank/blob/9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60/coremodules/node/src/main/java/org/treetank/axis/AbsAxis.java#L248-L253
train
sebastiangraf/treetank
coremodules/node/src/main/java/org/treetank/axis/AbsAxis.java
AbsAxis.addAtomicToItemList
public static int addAtomicToItemList(final INodeReadTrx pRtx, final AtomicValue pVal) { if (!atomics.containsKey(pRtx)) { atomics.put(pRtx, new ItemList()); } return atomics.get(pRtx).addItem(pVal); }
java
public static int addAtomicToItemList(final INodeReadTrx pRtx, final AtomicValue pVal) { if (!atomics.containsKey(pRtx)) { atomics.put(pRtx, new ItemList()); } return atomics.get(pRtx).addItem(pVal); }
[ "public", "static", "int", "addAtomicToItemList", "(", "final", "INodeReadTrx", "pRtx", ",", "final", "AtomicValue", "pVal", ")", "{", "if", "(", "!", "atomics", ".", "containsKey", "(", "pRtx", ")", ")", "{", "atomics", ".", "put", "(", "pRtx", ",", "ne...
Adding any AtomicVal to any ItemList staticly. @param pRtx as key @param pVal to be added @return the index in the ItemList
[ "Adding", "any", "AtomicVal", "to", "any", "ItemList", "staticly", "." ]
9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60
https://github.com/sebastiangraf/treetank/blob/9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60/coremodules/node/src/main/java/org/treetank/axis/AbsAxis.java#L264-L270
train
Bedework/bw-util
bw-util-directory/src/main/java/org/bedework/util/directory/ldif/Ldif.java
Ldif.nextRecord
public DirRecord nextRecord() throws NamingException { if (inp == null) { if (in == null) { throw new NamingException("No ldif input stream"); } inp = new LdifRecord.Input(); inp.init(new InputStreamReader(in)); } else if (inp.eof) { return null; } LdifRecord ldr ...
java
public DirRecord nextRecord() throws NamingException { if (inp == null) { if (in == null) { throw new NamingException("No ldif input stream"); } inp = new LdifRecord.Input(); inp.init(new InputStreamReader(in)); } else if (inp.eof) { return null; } LdifRecord ldr ...
[ "public", "DirRecord", "nextRecord", "(", ")", "throws", "NamingException", "{", "if", "(", "inp", "==", "null", ")", "{", "if", "(", "in", "==", "null", ")", "{", "throw", "new", "NamingException", "(", "\"No ldif input stream\"", ")", ";", "}", "inp", ...
Return the next record in the input stream.
[ "Return", "the", "next", "record", "in", "the", "input", "stream", "." ]
f51de4af3d7eb88fe63a0e22be8898a16c6cc3ad
https://github.com/Bedework/bw-util/blob/f51de4af3d7eb88fe63a0e22be8898a16c6cc3ad/bw-util-directory/src/main/java/org/bedework/util/directory/ldif/Ldif.java#L90-L109
train
Bedework/bw-util
bw-util-directory/src/main/java/org/bedework/util/directory/ldif/Ldif.java
Ldif.dumpLdif
public static void dumpLdif(LdifOut lo, DirRecord rec) throws NamingException { if (rec == null) { throw new NamingException("dumpLdif: No record supplied"); } String dn = rec.getDn(); if (dn == null) { throw new NamingException("Unable to get dn"); } lo.out("dn: " + dn); int ...
java
public static void dumpLdif(LdifOut lo, DirRecord rec) throws NamingException { if (rec == null) { throw new NamingException("dumpLdif: No record supplied"); } String dn = rec.getDn(); if (dn == null) { throw new NamingException("Unable to get dn"); } lo.out("dn: " + dn); int ...
[ "public", "static", "void", "dumpLdif", "(", "LdifOut", "lo", ",", "DirRecord", "rec", ")", "throws", "NamingException", "{", "if", "(", "rec", "==", "null", ")", "{", "throw", "new", "NamingException", "(", "\"dumpLdif: No record supplied\"", ")", ";", "}", ...
dumpLdif write the entire record as ldif.
[ "dumpLdif", "write", "the", "entire", "record", "as", "ldif", "." ]
f51de4af3d7eb88fe63a0e22be8898a16c6cc3ad
https://github.com/Bedework/bw-util/blob/f51de4af3d7eb88fe63a0e22be8898a16c6cc3ad/bw-util-directory/src/main/java/org/bedework/util/directory/ldif/Ldif.java#L135-L197
train
Bedework/bw-util
bw-util-servlet-filters/src/main/java/org/bedework/util/servlet/filters/XSLTFilterConfigInfo.java
XSLTFilterConfigInfo.makeLocale
public static String makeLocale(String lang, String country) { if ((lang == null) || (lang.length() == 0)) { return localeInfoDefaultDefault; } if ((country == null) || (country.length() == 0)) { return localeInfoDefaultDefault; } return lang + "_" + country; }
java
public static String makeLocale(String lang, String country) { if ((lang == null) || (lang.length() == 0)) { return localeInfoDefaultDefault; } if ((country == null) || (country.length() == 0)) { return localeInfoDefaultDefault; } return lang + "_" + country; }
[ "public", "static", "String", "makeLocale", "(", "String", "lang", ",", "String", "country", ")", "{", "if", "(", "(", "lang", "==", "null", ")", "||", "(", "lang", ".", "length", "(", ")", "==", "0", ")", ")", "{", "return", "localeInfoDefaultDefault"...
If either the lang or country is null we provide a default value for the whole locale. Otherwise we construct one. @param lang @param country @return locale
[ "If", "either", "the", "lang", "or", "country", "is", "null", "we", "provide", "a", "default", "value", "for", "the", "whole", "locale", ".", "Otherwise", "we", "construct", "one", "." ]
f51de4af3d7eb88fe63a0e22be8898a16c6cc3ad
https://github.com/Bedework/bw-util/blob/f51de4af3d7eb88fe63a0e22be8898a16c6cc3ad/bw-util-servlet-filters/src/main/java/org/bedework/util/servlet/filters/XSLTFilterConfigInfo.java#L355-L365
train
sebastiangraf/treetank
interfacemodules/jax-rx/src/main/java/org/jaxrx/resource/AResource.java
AResource.createOutput
private StreamingOutput createOutput(final JaxRx impl, final ResourcePath path) { // check for command parameter String qu = path.getValue(QueryParameter.COMMAND); if (qu != null) { return impl.command(qu, path); } // check for run parameter qu = pa...
java
private StreamingOutput createOutput(final JaxRx impl, final ResourcePath path) { // check for command parameter String qu = path.getValue(QueryParameter.COMMAND); if (qu != null) { return impl.command(qu, path); } // check for run parameter qu = pa...
[ "private", "StreamingOutput", "createOutput", "(", "final", "JaxRx", "impl", ",", "final", "ResourcePath", "path", ")", "{", "// check for command parameter\r", "String", "qu", "=", "path", ".", "getValue", "(", "QueryParameter", ".", "COMMAND", ")", ";", "if", ...
Returns a stream output, depending on the query parameters. @param impl implementation @param path path info @return parameter map
[ "Returns", "a", "stream", "output", "depending", "on", "the", "query", "parameters", "." ]
9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60
https://github.com/sebastiangraf/treetank/blob/9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60/interfacemodules/jax-rx/src/main/java/org/jaxrx/resource/AResource.java#L81-L103
train
sebastiangraf/treetank
interfacemodules/jax-rx/src/main/java/org/jaxrx/resource/AResource.java
AResource.createResponse
Response createResponse(final JaxRx impl, final ResourcePath path) { final StreamingOutput out = createOutput(impl, path); // change media type, dependent on WRAP value final boolean wrap = path.getValue(QueryParameter.WRAP) == null || path.getValue(QueryParameter.WRAP).equals(...
java
Response createResponse(final JaxRx impl, final ResourcePath path) { final StreamingOutput out = createOutput(impl, path); // change media type, dependent on WRAP value final boolean wrap = path.getValue(QueryParameter.WRAP) == null || path.getValue(QueryParameter.WRAP).equals(...
[ "Response", "createResponse", "(", "final", "JaxRx", "impl", ",", "final", "ResourcePath", "path", ")", "{", "final", "StreamingOutput", "out", "=", "createOutput", "(", "impl", ",", "path", ")", ";", "// change media type, dependent on WRAP value\r", "final", "bool...
Returns a result, depending on the query parameters. @param impl implementation @param path path info @return parameter map
[ "Returns", "a", "result", "depending", "on", "the", "query", "parameters", "." ]
9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60
https://github.com/sebastiangraf/treetank/blob/9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60/interfacemodules/jax-rx/src/main/java/org/jaxrx/resource/AResource.java#L115-L151
train
sebastiangraf/treetank
interfacemodules/jax-rx/src/main/java/org/jaxrx/resource/AResource.java
AResource.getParameters
protected Map<QueryParameter, String> getParameters(final UriInfo uri, final JaxRx jaxrx) { final MultivaluedMap<String, String> params = uri.getQueryParameters(); final Map<QueryParameter, String> newParam = createMap(); final Set<QueryParameter> impl = jaxrx.getParameters(); fo...
java
protected Map<QueryParameter, String> getParameters(final UriInfo uri, final JaxRx jaxrx) { final MultivaluedMap<String, String> params = uri.getQueryParameters(); final Map<QueryParameter, String> newParam = createMap(); final Set<QueryParameter> impl = jaxrx.getParameters(); fo...
[ "protected", "Map", "<", "QueryParameter", ",", "String", ">", "getParameters", "(", "final", "UriInfo", "uri", ",", "final", "JaxRx", "jaxrx", ")", "{", "final", "MultivaluedMap", "<", "String", ",", "String", ">", "params", "=", "uri", ".", "getQueryParame...
Extracts and returns query parameters from the specified map. If a parameter is specified multiple times, its values will be separated with tab characters. @param uri uri info with query parameters @param jaxrx JAX-RX implementation @return The parameters as {@link Map}.
[ "Extracts", "and", "returns", "query", "parameters", "from", "the", "specified", "map", ".", "If", "a", "parameter", "is", "specified", "multiple", "times", "its", "values", "will", "be", "separated", "with", "tab", "characters", "." ]
9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60
https://github.com/sebastiangraf/treetank/blob/9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60/interfacemodules/jax-rx/src/main/java/org/jaxrx/resource/AResource.java#L164-L176
train
sebastiangraf/treetank
interfacemodules/jax-rx/src/main/java/org/jaxrx/resource/AResource.java
AResource.createMap
private Map<QueryParameter, String> createMap() { final Map<QueryParameter, String> params = new HashMap<QueryParameter, String>(); final Properties props = System.getProperties(); for (final Map.Entry<Object, Object> set : props.entrySet()) { final String key = set.getKey().to...
java
private Map<QueryParameter, String> createMap() { final Map<QueryParameter, String> params = new HashMap<QueryParameter, String>(); final Properties props = System.getProperties(); for (final Map.Entry<Object, Object> set : props.entrySet()) { final String key = set.getKey().to...
[ "private", "Map", "<", "QueryParameter", ",", "String", ">", "createMap", "(", ")", "{", "final", "Map", "<", "QueryParameter", ",", "String", ">", "params", "=", "new", "HashMap", "<", "QueryParameter", ",", "String", ">", "(", ")", ";", "final", "Prope...
Returns a fresh parameter map. This map contains all parameters as defaults which have been specified by the user via system properties with the pattern "org.jaxrx.parameter.KEY" as key. @return parameter map
[ "Returns", "a", "fresh", "parameter", "map", ".", "This", "map", "contains", "all", "parameters", "as", "defaults", "which", "have", "been", "specified", "by", "the", "user", "via", "system", "properties", "with", "the", "pattern", "org", ".", "jaxrx", ".", ...
9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60
https://github.com/sebastiangraf/treetank/blob/9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60/interfacemodules/jax-rx/src/main/java/org/jaxrx/resource/AResource.java#L274-L290
train
sebastiangraf/treetank
interfacemodules/iscsi/src/main/java/org/treetank/iscsi/jscsi/TreetankStorageModule.java
TreetankStorageModule.prefetch
private void prefetch(long storageIndex) { long startIndex = storageIndex / BYTES_IN_DATA; // Inc to next bucket startIndex += 128; if (mPrefetchedBuckets.contains(startIndex)) { mPrefetchedBuckets.remove(startIndex); return; } for (int...
java
private void prefetch(long storageIndex) { long startIndex = storageIndex / BYTES_IN_DATA; // Inc to next bucket startIndex += 128; if (mPrefetchedBuckets.contains(startIndex)) { mPrefetchedBuckets.remove(startIndex); return; } for (int...
[ "private", "void", "prefetch", "(", "long", "storageIndex", ")", "{", "long", "startIndex", "=", "storageIndex", "/", "BYTES_IN_DATA", ";", "// Inc to next bucket\r", "startIndex", "+=", "128", ";", "if", "(", "mPrefetchedBuckets", ".", "contains", "(", "startInde...
Prefetch buckets if necessary
[ "Prefetch", "buckets", "if", "necessary" ]
9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60
https://github.com/sebastiangraf/treetank/blob/9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60/interfacemodules/iscsi/src/main/java/org/treetank/iscsi/jscsi/TreetankStorageModule.java#L310-L328
train
sebastiangraf/treetank
interfacemodules/jax-rx/src/main/java/org/jaxrx/core/SchemaChecker.java
SchemaChecker.check
public Document check(final InputStream input) { Document document; try { final DocumentBuilder docBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); document = docBuilder.parse(input); final InputStream is = getClass().getResourceAsStream(xslSchema...
java
public Document check(final InputStream input) { Document document; try { final DocumentBuilder docBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); document = docBuilder.parse(input); final InputStream is = getClass().getResourceAsStream(xslSchema...
[ "public", "Document", "check", "(", "final", "InputStream", "input", ")", "{", "Document", "document", ";", "try", "{", "final", "DocumentBuilder", "docBuilder", "=", "DocumentBuilderFactory", ".", "newInstance", "(", ")", ".", "newDocumentBuilder", "(", ")", ";...
This method parses an XML input with a W3C DOM implementation and validates it then with the available XML schema. @param input The input stream containing the XML query. @return The parsed XML source as {@link Document}.
[ "This", "method", "parses", "an", "XML", "input", "with", "a", "W3C", "DOM", "implementation", "and", "validates", "it", "then", "with", "the", "available", "XML", "schema", "." ]
9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60
https://github.com/sebastiangraf/treetank/blob/9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60/interfacemodules/jax-rx/src/main/java/org/jaxrx/core/SchemaChecker.java#L77-L94
train
sebastiangraf/treetank
interfacemodules/jax-rx/src/main/java/org/jaxrx/core/SchemaChecker.java
SchemaChecker.checkIsValid
private void checkIsValid(final Document document, final Source source) throws SAXException, IOException { final SchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI); final Schema schema = schemaFactory.newSchema(source); final Validator validator = schema...
java
private void checkIsValid(final Document document, final Source source) throws SAXException, IOException { final SchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI); final Schema schema = schemaFactory.newSchema(source); final Validator validator = schema...
[ "private", "void", "checkIsValid", "(", "final", "Document", "document", ",", "final", "Source", "source", ")", "throws", "SAXException", ",", "IOException", "{", "final", "SchemaFactory", "schemaFactory", "=", "SchemaFactory", ".", "newInstance", "(", "XMLConstants...
This method checks the parsed document if it is valid to a given XML schema. If not, an exception is thrown @param document The parsed document. @param source The {@link String} representation of the XML schema file. @throws SAXException if the document is invalid @throws IOException if the input cannot be read
[ "This", "method", "checks", "the", "parsed", "document", "if", "it", "is", "valid", "to", "a", "given", "XML", "schema", ".", "If", "not", "an", "exception", "is", "thrown" ]
9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60
https://github.com/sebastiangraf/treetank/blob/9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60/interfacemodules/jax-rx/src/main/java/org/jaxrx/core/SchemaChecker.java#L109-L115
train
Bedework/bw-util
bw-util-misc/src/main/java/org/bedework/util/misc/Uid.java
Uid.getUid
public static String getUid() { /* Unique down to millisecond */ short hiTime = (short)(System.currentTimeMillis() >>> 32); int loTime = (int)System.currentTimeMillis(); int ct; synchronized(Uid.class) { if (counter < 0) { counter = 0; } ct = counter++; } retur...
java
public static String getUid() { /* Unique down to millisecond */ short hiTime = (short)(System.currentTimeMillis() >>> 32); int loTime = (int)System.currentTimeMillis(); int ct; synchronized(Uid.class) { if (counter < 0) { counter = 0; } ct = counter++; } retur...
[ "public", "static", "String", "getUid", "(", ")", "{", "/* Unique down to millisecond */", "short", "hiTime", "=", "(", "short", ")", "(", "System", ".", "currentTimeMillis", "(", ")", ">>>", "32", ")", ";", "int", "loTime", "=", "(", "int", ")", "System",...
Code copied and modified from hibernate UUIDHexGenerator. Generates a unique 36 character key of hex + separators. @return String uid.
[ "Code", "copied", "and", "modified", "from", "hibernate", "UUIDHexGenerator", ".", "Generates", "a", "unique", "36", "character", "key", "of", "hex", "+", "separators", "." ]
f51de4af3d7eb88fe63a0e22be8898a16c6cc3ad
https://github.com/Bedework/bw-util/blob/f51de4af3d7eb88fe63a0e22be8898a16c6cc3ad/bw-util-misc/src/main/java/org/bedework/util/misc/Uid.java#L57-L80
train
Bedework/bw-util
bw-util-misc/src/main/java/org/bedework/util/misc/Uid.java
Uid.toInt
public static int toInt(byte[] bytes ) { int result = 0; for (int i = 0; i < 4; i++) { result = (result << 8) - Byte.MIN_VALUE + (int)bytes[i]; } return result; }
java
public static int toInt(byte[] bytes ) { int result = 0; for (int i = 0; i < 4; i++) { result = (result << 8) - Byte.MIN_VALUE + (int)bytes[i]; } return result; }
[ "public", "static", "int", "toInt", "(", "byte", "[", "]", "bytes", ")", "{", "int", "result", "=", "0", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "4", ";", "i", "++", ")", "{", "result", "=", "(", "result", "<<", "8", ")", "-",...
From hibernate.util @param bytes @return int
[ "From", "hibernate", ".", "util" ]
f51de4af3d7eb88fe63a0e22be8898a16c6cc3ad
https://github.com/Bedework/bw-util/blob/f51de4af3d7eb88fe63a0e22be8898a16c6cc3ad/bw-util-misc/src/main/java/org/bedework/util/misc/Uid.java#L103-L110
train
Bedework/bw-util
bw-util-directory/src/main/java/org/bedework/util/directory/common/Directory.java
Directory.search
public boolean search(String base, String filter) throws NamingException { return search(base, filter, scopeSub); }
java
public boolean search(String base, String filter) throws NamingException { return search(base, filter, scopeSub); }
[ "public", "boolean", "search", "(", "String", "base", ",", "String", "filter", ")", "throws", "NamingException", "{", "return", "search", "(", "base", ",", "filter", ",", "scopeSub", ")", ";", "}" ]
Carry out a subtree search @param base @param filter @return DirSearchResult @throws NamingException
[ "Carry", "out", "a", "subtree", "search" ]
f51de4af3d7eb88fe63a0e22be8898a16c6cc3ad
https://github.com/Bedework/bw-util/blob/f51de4af3d7eb88fe63a0e22be8898a16c6cc3ad/bw-util-directory/src/main/java/org/bedework/util/directory/common/Directory.java#L84-L86
train
Bedework/bw-util
bw-util-directory/src/main/java/org/bedework/util/directory/common/Directory.java
Directory.searchBase
public boolean searchBase(String base, String filter) throws NamingException { return search(base, filter, scopeBase); }
java
public boolean searchBase(String base, String filter) throws NamingException { return search(base, filter, scopeBase); }
[ "public", "boolean", "searchBase", "(", "String", "base", ",", "String", "filter", ")", "throws", "NamingException", "{", "return", "search", "(", "base", ",", "filter", ",", "scopeBase", ")", ";", "}" ]
Carry out a base level search. This should be the default if the scope is not specified. @param base @param filter @return DirSearchResult or null @throws NamingException
[ "Carry", "out", "a", "base", "level", "search", ".", "This", "should", "be", "the", "default", "if", "the", "scope", "is", "not", "specified", "." ]
f51de4af3d7eb88fe63a0e22be8898a16c6cc3ad
https://github.com/Bedework/bw-util/blob/f51de4af3d7eb88fe63a0e22be8898a16c6cc3ad/bw-util-directory/src/main/java/org/bedework/util/directory/common/Directory.java#L96-L98
train
Bedework/bw-util
bw-util-directory/src/main/java/org/bedework/util/directory/common/Directory.java
Directory.searchOne
public boolean searchOne(String base, String filter) throws NamingException { return search(base, filter, scopeOne); }
java
public boolean searchOne(String base, String filter) throws NamingException { return search(base, filter, scopeOne); }
[ "public", "boolean", "searchOne", "(", "String", "base", ",", "String", "filter", ")", "throws", "NamingException", "{", "return", "search", "(", "base", ",", "filter", ",", "scopeOne", ")", ";", "}" ]
Carry out a one level search @param base @param filter @return DirSearchResult @throws NamingException
[ "Carry", "out", "a", "one", "level", "search" ]
f51de4af3d7eb88fe63a0e22be8898a16c6cc3ad
https://github.com/Bedework/bw-util/blob/f51de4af3d7eb88fe63a0e22be8898a16c6cc3ad/bw-util-directory/src/main/java/org/bedework/util/directory/common/Directory.java#L107-L109
train
Bedework/bw-util
bw-util-directory/src/main/java/org/bedework/util/directory/common/Directory.java
Directory.newRecord
public DirRecord newRecord(String entryDn) throws NamingException { DirRecord rec = new BasicDirRecord(); rec.setDn(entryDn); return rec; }
java
public DirRecord newRecord(String entryDn) throws NamingException { DirRecord rec = new BasicDirRecord(); rec.setDn(entryDn); return rec; }
[ "public", "DirRecord", "newRecord", "(", "String", "entryDn", ")", "throws", "NamingException", "{", "DirRecord", "rec", "=", "new", "BasicDirRecord", "(", ")", ";", "rec", ".", "setDn", "(", "entryDn", ")", ";", "return", "rec", ";", "}" ]
newRecord - Return a record which can have attribute values added. create should be called to create the directory entry. @param entryDn @return DirRecord @throws NamingException
[ "newRecord", "-", "Return", "a", "record", "which", "can", "have", "attribute", "values", "added", ".", "create", "should", "be", "called", "to", "create", "the", "directory", "entry", "." ]
f51de4af3d7eb88fe63a0e22be8898a16c6cc3ad
https://github.com/Bedework/bw-util/blob/f51de4af3d7eb88fe63a0e22be8898a16c6cc3ad/bw-util-directory/src/main/java/org/bedework/util/directory/common/Directory.java#L131-L135
train
sebastiangraf/treetank
coremodules/core/src/main/java/org/treetank/io/LRULog.java
LRULog.getIterator
public LogIterator getIterator() { Set<Entry<LogKey, LogValue>> entries = mCache.asMap().entrySet(); for (Entry<LogKey, LogValue> entry : entries) { insertIntoBDB(entry.getKey(), entry.getValue()); } return new LogIterator(); }
java
public LogIterator getIterator() { Set<Entry<LogKey, LogValue>> entries = mCache.asMap().entrySet(); for (Entry<LogKey, LogValue> entry : entries) { insertIntoBDB(entry.getKey(), entry.getValue()); } return new LogIterator(); }
[ "public", "LogIterator", "getIterator", "(", ")", "{", "Set", "<", "Entry", "<", "LogKey", ",", "LogValue", ">", ">", "entries", "=", "mCache", ".", "asMap", "(", ")", ".", "entrySet", "(", ")", ";", "for", "(", "Entry", "<", "LogKey", ",", "LogValue...
Returning all elements as Iterator. @return new LogIterator-instance
[ "Returning", "all", "elements", "as", "Iterator", "." ]
9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60
https://github.com/sebastiangraf/treetank/blob/9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60/coremodules/core/src/main/java/org/treetank/io/LRULog.java#L254-L261
train
Bedework/bw-util
bw-util-directory/src/main/java/org/bedework/util/directory/ldif/LdifRecord.java
LdifRecord.read
public boolean read(Input in) throws NamingException { clear(); this.in = in; // somedata = false; haveControls = false; crec = null; for (;;) { int alen = -1; try { crec = in.readFullLine(); } catch (Exception e) { throwmsg(e.getMessage()); } int...
java
public boolean read(Input in) throws NamingException { clear(); this.in = in; // somedata = false; haveControls = false; crec = null; for (;;) { int alen = -1; try { crec = in.readFullLine(); } catch (Exception e) { throwmsg(e.getMessage()); } int...
[ "public", "boolean", "read", "(", "Input", "in", ")", "throws", "NamingException", "{", "clear", "(", ")", ";", "this", ".", "in", "=", "in", ";", "// somedata = false;", "haveControls", "=", "false", ";", "crec", "=", "null", ";", "for", "(", ";", ...
Read an entire ldif record from an input stream @param in Input object to read from input stream @return boolean true if we read some ldif data. false if there was no data
[ "Read", "an", "entire", "ldif", "record", "from", "an", "input", "stream" ]
f51de4af3d7eb88fe63a0e22be8898a16c6cc3ad
https://github.com/Bedework/bw-util/blob/f51de4af3d7eb88fe63a0e22be8898a16c6cc3ad/bw-util-directory/src/main/java/org/bedework/util/directory/ldif/LdifRecord.java#L228-L317
train
Bedework/bw-util
bw-util-directory/src/main/java/org/bedework/util/directory/ldif/LdifRecord.java
LdifRecord.writeInputData
public boolean writeInputData(Writer wtr) throws Throwable { if ((ldifData == null) || (ldifData.size() == 0)) { return false; } synchronized (wtr) { for (int i = 0; i < ldifData.size(); i++) { String str = (String)ldifData.elementAt(i); wtr.write(str); wtr.write('\n');...
java
public boolean writeInputData(Writer wtr) throws Throwable { if ((ldifData == null) || (ldifData.size() == 0)) { return false; } synchronized (wtr) { for (int i = 0; i < ldifData.size(); i++) { String str = (String)ldifData.elementAt(i); wtr.write(str); wtr.write('\n');...
[ "public", "boolean", "writeInputData", "(", "Writer", "wtr", ")", "throws", "Throwable", "{", "if", "(", "(", "ldifData", "==", "null", ")", "||", "(", "ldifData", ".", "size", "(", ")", "==", "0", ")", ")", "{", "return", "false", ";", "}", "synchro...
Write the data we built this from @param wtr Writer to write to @return boolean false for no data
[ "Write", "the", "data", "we", "built", "this", "from" ]
f51de4af3d7eb88fe63a0e22be8898a16c6cc3ad
https://github.com/Bedework/bw-util/blob/f51de4af3d7eb88fe63a0e22be8898a16c6cc3ad/bw-util-directory/src/main/java/org/bedework/util/directory/ldif/LdifRecord.java#L358-L377
train
Bedework/bw-util
bw-util-directory/src/main/java/org/bedework/util/directory/ldif/LdifRecord.java
LdifRecord.write
public void write(Writer wtr) throws Throwable { // First we need the dn wtr.write(getDn()); wtr.write('\n'); throw new Exception("Incomplete"); }
java
public void write(Writer wtr) throws Throwable { // First we need the dn wtr.write(getDn()); wtr.write('\n'); throw new Exception("Incomplete"); }
[ "public", "void", "write", "(", "Writer", "wtr", ")", "throws", "Throwable", "{", "// First we need the dn", "wtr", ".", "write", "(", "getDn", "(", ")", ")", ";", "wtr", ".", "write", "(", "'", "'", ")", ";", "throw", "new", "Exception", "(", "\"Incom...
Write an ldif record representing this object @param wtr Writer to write to
[ "Write", "an", "ldif", "record", "representing", "this", "object" ]
f51de4af3d7eb88fe63a0e22be8898a16c6cc3ad
https://github.com/Bedework/bw-util/blob/f51de4af3d7eb88fe63a0e22be8898a16c6cc3ad/bw-util-directory/src/main/java/org/bedework/util/directory/ldif/LdifRecord.java#L383-L390
train
Bedework/bw-util
bw-util-directory/src/main/java/org/bedework/util/directory/ldif/LdifRecord.java
LdifRecord.addAttrVal
private void addAttrVal(String attr, String val, boolean encoded, boolean url) throws NamingException { // System.out.println("addAttr " + attr + " = " + val); if (state == stateNeedDn) { // Only version or dn here if (attr.equals("version")) { if (version != null) throwmsg("Repeated ve...
java
private void addAttrVal(String attr, String val, boolean encoded, boolean url) throws NamingException { // System.out.println("addAttr " + attr + " = " + val); if (state == stateNeedDn) { // Only version or dn here if (attr.equals("version")) { if (version != null) throwmsg("Repeated ve...
[ "private", "void", "addAttrVal", "(", "String", "attr", ",", "String", "val", ",", "boolean", "encoded", ",", "boolean", "url", ")", "throws", "NamingException", "{", "// System.out.println(\"addAttr \" + attr + \" = \" + val);", "if", "(", "state", "==", "stateNeedD...
For all record types we expect an optional version spec first. After that comes the dn. After that, for content records we expect attrval-spec. for change record we have optional controls followed by changes.
[ "For", "all", "record", "types", "we", "expect", "an", "optional", "version", "spec", "first", ".", "After", "that", "comes", "the", "dn", ".", "After", "that", "for", "content", "records", "we", "expect", "attrval", "-", "spec", ".", "for", "change", "r...
f51de4af3d7eb88fe63a0e22be8898a16c6cc3ad
https://github.com/Bedework/bw-util/blob/f51de4af3d7eb88fe63a0e22be8898a16c6cc3ad/bw-util-directory/src/main/java/org/bedework/util/directory/ldif/LdifRecord.java#L410-L505
train
sebastiangraf/treetank
interfacemodules/xml/src/main/java/org/treetank/service/xml/xpath/ExpressionSingle.java
ExpressionSingle.add
public void add(final AbsAxis mAx) { AbsAxis axis = mAx; if (isDupOrd(axis)) { axis = new DupFilterAxis(mRtx, axis); DupState.nodup = true; } switch (mNumber) { case 0: mFirstAxis = axis; mNumber++; break; case...
java
public void add(final AbsAxis mAx) { AbsAxis axis = mAx; if (isDupOrd(axis)) { axis = new DupFilterAxis(mRtx, axis); DupState.nodup = true; } switch (mNumber) { case 0: mFirstAxis = axis; mNumber++; break; case...
[ "public", "void", "add", "(", "final", "AbsAxis", "mAx", ")", "{", "AbsAxis", "axis", "=", "mAx", ";", "if", "(", "isDupOrd", "(", "axis", ")", ")", "{", "axis", "=", "new", "DupFilterAxis", "(", "mRtx", ",", "axis", ")", ";", "DupState", ".", "nod...
Adds a new Axis to the expression chain. The first axis that is added has to be stored till a second axis is added. When the second axis is added, it is nested with the first one and builds the execution chain. @param mAx ach The axis to add.
[ "Adds", "a", "new", "Axis", "to", "the", "expression", "chain", ".", "The", "first", "axis", "that", "is", "added", "has", "to", "be", "stored", "till", "a", "second", "axis", "is", "added", ".", "When", "the", "second", "axis", "is", "added", "it", ...
9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60
https://github.com/sebastiangraf/treetank/blob/9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60/interfacemodules/xml/src/main/java/org/treetank/service/xml/xpath/ExpressionSingle.java#L96-L118
train
danielnorberg/rut
rut/src/main/java/io/norberg/rut/Encoding.java
Encoding.decodePercent
private static int decodePercent(final CharSequence s, final int length, final int i) { if (i + 2 >= length) { return INVALID; } final char n1 = s.charAt(i + 1); final char n2 = s.charAt(i + 2); return decodeNibbles(n1, n2); }
java
private static int decodePercent(final CharSequence s, final int length, final int i) { if (i + 2 >= length) { return INVALID; } final char n1 = s.charAt(i + 1); final char n2 = s.charAt(i + 2); return decodeNibbles(n1, n2); }
[ "private", "static", "int", "decodePercent", "(", "final", "CharSequence", "s", ",", "final", "int", "length", ",", "final", "int", "i", ")", "{", "if", "(", "i", "+", "2", ">=", "length", ")", "{", "return", "INVALID", ";", "}", "final", "char", "n1...
Decode a percent encoded byte. E.g. "%3F" -> 63.
[ "Decode", "a", "percent", "encoded", "byte", ".", "E", ".", "g", ".", "%3F", "-", ">", "63", "." ]
6cd99e0d464da934d446b554ab5bbecaf294fcdc
https://github.com/danielnorberg/rut/blob/6cd99e0d464da934d446b554ab5bbecaf294fcdc/rut/src/main/java/io/norberg/rut/Encoding.java#L121-L128
train
danielnorberg/rut
rut/src/main/java/io/norberg/rut/Encoding.java
Encoding.decodeNibbles
private static int decodeNibbles(final char c1, final char c2) { final int n1 = decodeHex(c1); if (n1 == INVALID) { return INVALID; } final int n2 = decodeHex(c2); if (n2 == INVALID) { return INVALID; } return (((n1 & 0xf) << 4) | (n2 & 0xf)); }
java
private static int decodeNibbles(final char c1, final char c2) { final int n1 = decodeHex(c1); if (n1 == INVALID) { return INVALID; } final int n2 = decodeHex(c2); if (n2 == INVALID) { return INVALID; } return (((n1 & 0xf) << 4) | (n2 & 0xf)); }
[ "private", "static", "int", "decodeNibbles", "(", "final", "char", "c1", ",", "final", "char", "c2", ")", "{", "final", "int", "n1", "=", "decodeHex", "(", "c1", ")", ";", "if", "(", "n1", "==", "INVALID", ")", "{", "return", "INVALID", ";", "}", "...
Decode two hex nibbles to a byte. E.g. '3' and 'F' -> 63.
[ "Decode", "two", "hex", "nibbles", "to", "a", "byte", ".", "E", ".", "g", ".", "3", "and", "F", "-", ">", "63", "." ]
6cd99e0d464da934d446b554ab5bbecaf294fcdc
https://github.com/danielnorberg/rut/blob/6cd99e0d464da934d446b554ab5bbecaf294fcdc/rut/src/main/java/io/norberg/rut/Encoding.java#L133-L143
train
danielnorberg/rut
rut/src/main/java/io/norberg/rut/Encoding.java
Encoding.decodeHex
private static int decodeHex(final char c) { if (c < '0') { return INVALID; } if (c <= '9') { return c - '0'; } if (c < 'A') { return INVALID; } if (c <= 'F') { return c - 'A' + 10; } if (c < 'a') { return INVALID; } if (c <= 'f') { return ...
java
private static int decodeHex(final char c) { if (c < '0') { return INVALID; } if (c <= '9') { return c - '0'; } if (c < 'A') { return INVALID; } if (c <= 'F') { return c - 'A' + 10; } if (c < 'a') { return INVALID; } if (c <= 'f') { return ...
[ "private", "static", "int", "decodeHex", "(", "final", "char", "c", ")", "{", "if", "(", "c", "<", "'", "'", ")", "{", "return", "INVALID", ";", "}", "if", "(", "c", "<=", "'", "'", ")", "{", "return", "c", "-", "'", "'", ";", "}", "if", "(...
Decode a hex nibble. E.g. '3' -> 3 and 'F' -> 15.
[ "Decode", "a", "hex", "nibble", ".", "E", ".", "g", ".", "3", "-", ">", "3", "and", "F", "-", ">", "15", "." ]
6cd99e0d464da934d446b554ab5bbecaf294fcdc
https://github.com/danielnorberg/rut/blob/6cd99e0d464da934d446b554ab5bbecaf294fcdc/rut/src/main/java/io/norberg/rut/Encoding.java#L148-L168
train
danielnorberg/rut
rut/src/main/java/io/norberg/rut/Encoding.java
Encoding.utf8Read3
private static int utf8Read3(int cu1, int cu2, int cu3) { if ((cu2 & 0xC0) != 0x80) { return INVALID; } if (cu1 == 0xE0 && cu2 < 0xA0) { // overlong return INVALID; } if ((cu3 & 0xC0) != 0x80) { return INVALID; } return (cu1 << 12) + (cu2 << 6) + cu3 - 0xE2080; }
java
private static int utf8Read3(int cu1, int cu2, int cu3) { if ((cu2 & 0xC0) != 0x80) { return INVALID; } if (cu1 == 0xE0 && cu2 < 0xA0) { // overlong return INVALID; } if ((cu3 & 0xC0) != 0x80) { return INVALID; } return (cu1 << 12) + (cu2 << 6) + cu3 - 0xE2080; }
[ "private", "static", "int", "utf8Read3", "(", "int", "cu1", ",", "int", "cu2", ",", "int", "cu3", ")", "{", "if", "(", "(", "cu2", "&", "0xC0", ")", "!=", "0x80", ")", "{", "return", "INVALID", ";", "}", "if", "(", "cu1", "==", "0xE0", "&&", "c...
Read a 3 byte UTF8 sequence. @return the resulting code point or {@link #INVALID} if invalid.
[ "Read", "a", "3", "byte", "UTF8", "sequence", "." ]
6cd99e0d464da934d446b554ab5bbecaf294fcdc
https://github.com/danielnorberg/rut/blob/6cd99e0d464da934d446b554ab5bbecaf294fcdc/rut/src/main/java/io/norberg/rut/Encoding.java#L224-L236
train
danielnorberg/rut
rut/src/main/java/io/norberg/rut/Encoding.java
Encoding.utf8Read4
private static int utf8Read4(int cu1, int cu2, int cu3, int cu4) { if ((cu2 & 0xC0) != 0x80) { return INVALID; } if (cu1 == 0xF0 && cu2 < 0x90) { return INVALID; // overlong } if (cu1 == 0xF4 && cu2 >= 0x90) { return INVALID; // > U+10FFFF } if ((cu3 & 0xC0) != 0x80) { ...
java
private static int utf8Read4(int cu1, int cu2, int cu3, int cu4) { if ((cu2 & 0xC0) != 0x80) { return INVALID; } if (cu1 == 0xF0 && cu2 < 0x90) { return INVALID; // overlong } if (cu1 == 0xF4 && cu2 >= 0x90) { return INVALID; // > U+10FFFF } if ((cu3 & 0xC0) != 0x80) { ...
[ "private", "static", "int", "utf8Read4", "(", "int", "cu1", ",", "int", "cu2", ",", "int", "cu3", ",", "int", "cu4", ")", "{", "if", "(", "(", "cu2", "&", "0xC0", ")", "!=", "0x80", ")", "{", "return", "INVALID", ";", "}", "if", "(", "cu1", "==...
Read a 4 byte UTF8 sequence. @return the resulting code point or {@link #INVALID} if invalid.
[ "Read", "a", "4", "byte", "UTF8", "sequence", "." ]
6cd99e0d464da934d446b554ab5bbecaf294fcdc
https://github.com/danielnorberg/rut/blob/6cd99e0d464da934d446b554ab5bbecaf294fcdc/rut/src/main/java/io/norberg/rut/Encoding.java#L243-L260
train
Bedework/bw-util
bw-util-jms/src/main/java/org/bedework/util/jms/listeners/JmsSysEventListener.java
JmsSysEventListener.close
public void close() { if (consumer != null) { try { consumer.close(); } catch (Throwable t) { warn(t.getMessage()); } } conn.close(); }
java
public void close() { if (consumer != null) { try { consumer.close(); } catch (Throwable t) { warn(t.getMessage()); } } conn.close(); }
[ "public", "void", "close", "(", ")", "{", "if", "(", "consumer", "!=", "null", ")", "{", "try", "{", "consumer", ".", "close", "(", ")", ";", "}", "catch", "(", "Throwable", "t", ")", "{", "warn", "(", "t", ".", "getMessage", "(", ")", ")", ";"...
Close and release resources.
[ "Close", "and", "release", "resources", "." ]
f51de4af3d7eb88fe63a0e22be8898a16c6cc3ad
https://github.com/Bedework/bw-util/blob/f51de4af3d7eb88fe63a0e22be8898a16c6cc3ad/bw-util-jms/src/main/java/org/bedework/util/jms/listeners/JmsSysEventListener.java#L66-L76
train
Bedework/bw-util
bw-util-jms/src/main/java/org/bedework/util/jms/listeners/JmsSysEventListener.java
JmsSysEventListener.process
public void process(final boolean asynch) throws NotificationException { if (asynch) { try { consumer.setMessageListener(this); return; } catch (final JMSException je) { throw new NotificationException(je); } } while (running) { final Message m = co...
java
public void process(final boolean asynch) throws NotificationException { if (asynch) { try { consumer.setMessageListener(this); return; } catch (final JMSException je) { throw new NotificationException(je); } } while (running) { final Message m = co...
[ "public", "void", "process", "(", "final", "boolean", "asynch", ")", "throws", "NotificationException", "{", "if", "(", "asynch", ")", "{", "try", "{", "consumer", ".", "setMessageListener", "(", "this", ")", ";", "return", ";", "}", "catch", "(", "final",...
For asynch we do the onMessage listener style. Otherwise we wait synchronously for incoming messages. @param asynch true if we just want to set the listener @throws NotificationException
[ "For", "asynch", "we", "do", "the", "onMessage", "listener", "style", ".", "Otherwise", "we", "wait", "synchronously", "for", "incoming", "messages", "." ]
f51de4af3d7eb88fe63a0e22be8898a16c6cc3ad
https://github.com/Bedework/bw-util/blob/f51de4af3d7eb88fe63a0e22be8898a16c6cc3ad/bw-util-jms/src/main/java/org/bedework/util/jms/listeners/JmsSysEventListener.java#L85-L105
train
centic9/commons-dost
src/main/java/org/dstadler/commons/http/Utils.java
Utils.getURL
public static boolean getURL(final String sUrl, final AtomicInteger gCount, long start) { int count = gCount.incrementAndGet(); if(count % 100 == 0) { long diff = (System.currentTimeMillis() - start)/1000; logger.info("Count: " + count + " IPS: " + count/diff); } final URL url; try { url = new URL(s...
java
public static boolean getURL(final String sUrl, final AtomicInteger gCount, long start) { int count = gCount.incrementAndGet(); if(count % 100 == 0) { long diff = (System.currentTimeMillis() - start)/1000; logger.info("Count: " + count + " IPS: " + count/diff); } final URL url; try { url = new URL(s...
[ "public", "static", "boolean", "getURL", "(", "final", "String", "sUrl", ",", "final", "AtomicInteger", "gCount", ",", "long", "start", ")", "{", "int", "count", "=", "gCount", ".", "incrementAndGet", "(", ")", ";", "if", "(", "count", "%", "100", "==", ...
Test URL and report if it can be read. @param sUrl The URL to test @param gCount A counter which is incremented for each call and is used for reporting rate of calls @param start Start-timestamp for reporting rate of calls. @return true if the URL is valid and can be read, false if an error occurs when reading from i...
[ "Test", "URL", "and", "report", "if", "it", "can", "be", "read", "." ]
f6fa4e3e0b943ff103f918824319d8abf33d0e0f
https://github.com/centic9/commons-dost/blob/f6fa4e3e0b943ff103f918824319d8abf33d0e0f/src/main/java/org/dstadler/commons/http/Utils.java#L159-L202
train
sebastiangraf/treetank
interfacemodules/xml/src/main/java/org/treetank/service/xml/diff/algorithm/fmes/FMESVisitor.java
FMESVisitor.fillDataStructures
private void fillDataStructures() { final ITreeData treeData = mRtx.getNode(); mInOrder.put(treeData, true); mDescendants.put(treeData, 1L); }
java
private void fillDataStructures() { final ITreeData treeData = mRtx.getNode(); mInOrder.put(treeData, true); mDescendants.put(treeData, 1L); }
[ "private", "void", "fillDataStructures", "(", ")", "{", "final", "ITreeData", "treeData", "=", "mRtx", ".", "getNode", "(", ")", ";", "mInOrder", ".", "put", "(", "treeData", ",", "true", ")", ";", "mDescendants", ".", "put", "(", "treeData", ",", "1L", ...
Fill data structures.
[ "Fill", "data", "structures", "." ]
9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60
https://github.com/sebastiangraf/treetank/blob/9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60/interfacemodules/xml/src/main/java/org/treetank/service/xml/diff/algorithm/fmes/FMESVisitor.java#L106-L110
train
centic9/commons-dost
src/main/java/org/dstadler/commons/net/SocketUtils.java
SocketUtils.getNextFreePort
@SuppressForbidden(reason = "We want to bind to any address here when checking for free ports") public static int getNextFreePort(int portRangeStart, int portRangeEnd) throws IOException { for (int port = portRangeStart; port <= portRangeEnd; port++) { try (ServerSocket sock = new ServerSocket()) { sock.setRe...
java
@SuppressForbidden(reason = "We want to bind to any address here when checking for free ports") public static int getNextFreePort(int portRangeStart, int portRangeEnd) throws IOException { for (int port = portRangeStart; port <= portRangeEnd; port++) { try (ServerSocket sock = new ServerSocket()) { sock.setRe...
[ "@", "SuppressForbidden", "(", "reason", "=", "\"We want to bind to any address here when checking for free ports\"", ")", "public", "static", "int", "getNextFreePort", "(", "int", "portRangeStart", ",", "int", "portRangeEnd", ")", "throws", "IOException", "{", "for", "("...
Method that is used to find the next available port. It used the two constants PORT_RANGE_START and PORT_RANGE_END defined above to limit the range of ports that are tried. @param portRangeStart The first port that is tried @param portRangeEnd The last port that is tried @return A port number that can be used. @throw...
[ "Method", "that", "is", "used", "to", "find", "the", "next", "available", "port", ".", "It", "used", "the", "two", "constants", "PORT_RANGE_START", "and", "PORT_RANGE_END", "defined", "above", "to", "limit", "the", "range", "of", "ports", "that", "are", "tri...
f6fa4e3e0b943ff103f918824319d8abf33d0e0f
https://github.com/centic9/commons-dost/blob/f6fa4e3e0b943ff103f918824319d8abf33d0e0f/src/main/java/org/dstadler/commons/net/SocketUtils.java#L34-L49
train
Bedework/bw-util
bw-util-timezones/src/main/java/org/bedework/util/timezones/TimezonesImpl.java
TimezonesImpl.fetchTimeZone
protected TimeZone fetchTimeZone(final String id) throws TimezonesException { final TaggedTimeZone ttz = fetchTimeZone(id, null); if (ttz == null) { return null; } register(id, ttz.tz); return ttz.tz; }
java
protected TimeZone fetchTimeZone(final String id) throws TimezonesException { final TaggedTimeZone ttz = fetchTimeZone(id, null); if (ttz == null) { return null; } register(id, ttz.tz); return ttz.tz; }
[ "protected", "TimeZone", "fetchTimeZone", "(", "final", "String", "id", ")", "throws", "TimezonesException", "{", "final", "TaggedTimeZone", "ttz", "=", "fetchTimeZone", "(", "id", ",", "null", ")", ";", "if", "(", "ttz", "==", "null", ")", "{", "return", ...
Fetch a timezone object from the server given the id. @param id the tzid @return TimeZone with id or null @throws TimezonesException on error
[ "Fetch", "a", "timezone", "object", "from", "the", "server", "given", "the", "id", "." ]
f51de4af3d7eb88fe63a0e22be8898a16c6cc3ad
https://github.com/Bedework/bw-util/blob/f51de4af3d7eb88fe63a0e22be8898a16c6cc3ad/bw-util-timezones/src/main/java/org/bedework/util/timezones/TimezonesImpl.java#L400-L410
train
sebastiangraf/treetank
interfacemodules/xml/src/main/java/org/treetank/service/xml/diff/AbsDiff.java
AbsDiff.diffMovement
void diffMovement() throws TTException { assert mHashKind != null; assert mNewRtx != null; assert mOldRtx != null; assert mDiff != null; assert mDiffKind != null; // Check first nodes. if (mNewRtx.getNode().getKind() != ROOT) { if (mHashKind == HashKi...
java
void diffMovement() throws TTException { assert mHashKind != null; assert mNewRtx != null; assert mOldRtx != null; assert mDiff != null; assert mDiffKind != null; // Check first nodes. if (mNewRtx.getNode().getKind() != ROOT) { if (mHashKind == HashKi...
[ "void", "diffMovement", "(", ")", "throws", "TTException", "{", "assert", "mHashKind", "!=", "null", ";", "assert", "mNewRtx", "!=", "null", ";", "assert", "mOldRtx", "!=", "null", ";", "assert", "mDiff", "!=", "null", ";", "assert", "mDiffKind", "!=", "nu...
Do the diff. @throws TTException if setting up transactions failes
[ "Do", "the", "diff", "." ]
9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60
https://github.com/sebastiangraf/treetank/blob/9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60/interfacemodules/xml/src/main/java/org/treetank/service/xml/diff/AbsDiff.java#L137-L183
train
sebastiangraf/treetank
interfacemodules/xml/src/main/java/org/treetank/service/xml/diff/AbsDiff.java
AbsDiff.moveCursor
boolean moveCursor(final INodeReadTrx paramRtx, final ERevision paramRevision) throws TTIOException { assert paramRtx != null; boolean moved = false; final ITreeStructData node = ((ITreeStructData)paramRtx.getNode()); if (node.hasFirstChild()) { if (node.getKind() != ROOT &...
java
boolean moveCursor(final INodeReadTrx paramRtx, final ERevision paramRevision) throws TTIOException { assert paramRtx != null; boolean moved = false; final ITreeStructData node = ((ITreeStructData)paramRtx.getNode()); if (node.hasFirstChild()) { if (node.getKind() != ROOT &...
[ "boolean", "moveCursor", "(", "final", "INodeReadTrx", "paramRtx", ",", "final", "ERevision", "paramRevision", ")", "throws", "TTIOException", "{", "assert", "paramRtx", "!=", "null", ";", "boolean", "moved", "=", "false", ";", "final", "ITreeStructData", "node", ...
Move cursor one node forward in pre order. @param paramRtx the {@link IReadTransaction} to use @param paramRevision the {@link ERevision} constant @return true, if cursor moved, false otherwise @throws TTIOException
[ "Move", "cursor", "one", "node", "forward", "in", "pre", "order", "." ]
9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60
https://github.com/sebastiangraf/treetank/blob/9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60/interfacemodules/xml/src/main/java/org/treetank/service/xml/diff/AbsDiff.java#L195-L233
train
sebastiangraf/treetank
interfacemodules/xml/src/main/java/org/treetank/service/xml/diff/AbsDiff.java
AbsDiff.moveToFollowingNode
private boolean moveToFollowingNode(final INodeReadTrx paramRtx, final ERevision paramRevision) throws TTIOException { boolean moved = false; while (!((ITreeStructData)paramRtx.getNode()).hasRightSibling() && ((ITreeStructData)paramRtx.getNode()).hasParent() && paramRtx.getNode().get...
java
private boolean moveToFollowingNode(final INodeReadTrx paramRtx, final ERevision paramRevision) throws TTIOException { boolean moved = false; while (!((ITreeStructData)paramRtx.getNode()).hasRightSibling() && ((ITreeStructData)paramRtx.getNode()).hasParent() && paramRtx.getNode().get...
[ "private", "boolean", "moveToFollowingNode", "(", "final", "INodeReadTrx", "paramRtx", ",", "final", "ERevision", "paramRevision", ")", "throws", "TTIOException", "{", "boolean", "moved", "=", "false", ";", "while", "(", "!", "(", "(", "ITreeStructData", ")", "p...
Move to next following node. @param paramRtx the {@link IReadTransaction} to use @param paramRevision the {@link ERevision} constant @return true, if cursor moved, false otherwise @throws TTIOException
[ "Move", "to", "next", "following", "node", "." ]
9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60
https://github.com/sebastiangraf/treetank/blob/9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60/interfacemodules/xml/src/main/java/org/treetank/service/xml/diff/AbsDiff.java#L245-L269
train
sebastiangraf/treetank
interfacemodules/xml/src/main/java/org/treetank/service/xml/diff/AbsDiff.java
AbsDiff.diff
EDiff diff(final INodeReadTrx paramNewRtx, final INodeReadTrx paramOldRtx, final DepthCounter paramDepth, final EFireDiff paramFireDiff) throws TTIOException { assert paramNewRtx != null; assert paramOldRtx != null; assert paramDepth != null; EDiff diff = EDiff.SAME; //...
java
EDiff diff(final INodeReadTrx paramNewRtx, final INodeReadTrx paramOldRtx, final DepthCounter paramDepth, final EFireDiff paramFireDiff) throws TTIOException { assert paramNewRtx != null; assert paramOldRtx != null; assert paramDepth != null; EDiff diff = EDiff.SAME; //...
[ "EDiff", "diff", "(", "final", "INodeReadTrx", "paramNewRtx", ",", "final", "INodeReadTrx", "paramOldRtx", ",", "final", "DepthCounter", "paramDepth", ",", "final", "EFireDiff", "paramFireDiff", ")", "throws", "TTIOException", "{", "assert", "paramNewRtx", "!=", "nu...
Diff of nodes. @param paramNewRtx {@link IReadTransaction} on new revision @param paramOldRtx {@link IReadTransaction} on old revision @param paramDepth {@link DepthCounter} container for current depths of both transaction cursors @param paramFireDiff determines if a diff should be fired @return kind of difference @th...
[ "Diff", "of", "nodes", "." ]
9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60
https://github.com/sebastiangraf/treetank/blob/9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60/interfacemodules/xml/src/main/java/org/treetank/service/xml/diff/AbsDiff.java#L286-L312
train
sebastiangraf/treetank
interfacemodules/xml/src/main/java/org/treetank/service/xml/diff/AbsDiff.java
AbsDiff.optimizedDiff
EDiff optimizedDiff(final INodeReadTrx paramNewRtx, final INodeReadTrx paramOldRtx, final DepthCounter paramDepth, final EFireDiff paramFireDiff) throws TTIOException { assert paramNewRtx != null; assert paramOldRtx != null; assert paramDepth != null; EDiff diff = EDiff.SAMEHASH...
java
EDiff optimizedDiff(final INodeReadTrx paramNewRtx, final INodeReadTrx paramOldRtx, final DepthCounter paramDepth, final EFireDiff paramFireDiff) throws TTIOException { assert paramNewRtx != null; assert paramOldRtx != null; assert paramDepth != null; EDiff diff = EDiff.SAMEHASH...
[ "EDiff", "optimizedDiff", "(", "final", "INodeReadTrx", "paramNewRtx", ",", "final", "INodeReadTrx", "paramOldRtx", ",", "final", "DepthCounter", "paramDepth", ",", "final", "EFireDiff", "paramFireDiff", ")", "throws", "TTIOException", "{", "assert", "paramNewRtx", "!...
Optimized diff, which skips unnecessary comparsions. @param paramNewRtx {@link IReadTransaction} on new revision @param paramOldRtx {@link IReadTransaction} on old revision @param paramDepth {@link DepthCounter} container for current depths of both transaction cursors @param paramFireDiff determines if a diff should b...
[ "Optimized", "diff", "which", "skips", "unnecessary", "comparsions", "." ]
9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60
https://github.com/sebastiangraf/treetank/blob/9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60/interfacemodules/xml/src/main/java/org/treetank/service/xml/diff/AbsDiff.java#L329-L366
train
sebastiangraf/treetank
interfacemodules/xml/src/main/java/org/treetank/service/xml/diff/AbsDiff.java
AbsDiff.diffAlgorithm
private EDiff diffAlgorithm(final INodeReadTrx paramNewRtx, final INodeReadTrx paramOldRtx, final DepthCounter paramDepth) throws TTIOException { EDiff diff = null; // Check if node has been deleted. if (paramDepth.getOldDepth() > paramDepth.getNewDepth()) { diff = EDiff.DEL...
java
private EDiff diffAlgorithm(final INodeReadTrx paramNewRtx, final INodeReadTrx paramOldRtx, final DepthCounter paramDepth) throws TTIOException { EDiff diff = null; // Check if node has been deleted. if (paramDepth.getOldDepth() > paramDepth.getNewDepth()) { diff = EDiff.DEL...
[ "private", "EDiff", "diffAlgorithm", "(", "final", "INodeReadTrx", "paramNewRtx", ",", "final", "INodeReadTrx", "paramOldRtx", ",", "final", "DepthCounter", "paramDepth", ")", "throws", "TTIOException", "{", "EDiff", "diff", "=", "null", ";", "// Check if node has bee...
Main algorithm to compute diffs between two nodes. @param paramNewRtx {@link IReadTransaction} on new revision @param paramOldRtx {@link IReadTransaction} on old revision @param paramDepth {@link DepthCounter} container for current depths of both transaction cursors @return kind of diff @throws TTIOException
[ "Main", "algorithm", "to", "compute", "diffs", "between", "two", "nodes", "." ]
9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60
https://github.com/sebastiangraf/treetank/blob/9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60/interfacemodules/xml/src/main/java/org/treetank/service/xml/diff/AbsDiff.java#L381-L410
train
sebastiangraf/treetank
interfacemodules/xml/src/main/java/org/treetank/service/xml/diff/AbsDiff.java
AbsDiff.checkUpdate
boolean checkUpdate(final INodeReadTrx paramNewRtx, final INodeReadTrx paramOldRtx) throws TTIOException { assert paramNewRtx != null; assert paramOldRtx != null; boolean updated = false; final long newKey = paramNewRtx.getNode().getDataKey(); boolean movedNewRtx = paramNewRtx.mo...
java
boolean checkUpdate(final INodeReadTrx paramNewRtx, final INodeReadTrx paramOldRtx) throws TTIOException { assert paramNewRtx != null; assert paramOldRtx != null; boolean updated = false; final long newKey = paramNewRtx.getNode().getDataKey(); boolean movedNewRtx = paramNewRtx.mo...
[ "boolean", "checkUpdate", "(", "final", "INodeReadTrx", "paramNewRtx", ",", "final", "INodeReadTrx", "paramOldRtx", ")", "throws", "TTIOException", "{", "assert", "paramNewRtx", "!=", "null", ";", "assert", "paramOldRtx", "!=", "null", ";", "boolean", "updated", "...
Check for an update of a node. @param paramNewRtx first {@link IReadTransaction} instance @param paramOldRtx second {@link IReadTransaction} instance @return kind of diff @throws TTIOException
[ "Check", "for", "an", "update", "of", "a", "node", "." ]
9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60
https://github.com/sebastiangraf/treetank/blob/9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60/interfacemodules/xml/src/main/java/org/treetank/service/xml/diff/AbsDiff.java#L466-L490
train
centic9/commons-dost
src/main/java/org/dstadler/commons/metrics/MovingAverage.java
MovingAverage.checkArgument
private void checkArgument(boolean argument, String msg, Object... args) { if (!argument) { throw new IllegalArgumentException(String.format(msg, args)); } }
java
private void checkArgument(boolean argument, String msg, Object... args) { if (!argument) { throw new IllegalArgumentException(String.format(msg, args)); } }
[ "private", "void", "checkArgument", "(", "boolean", "argument", ",", "String", "msg", ",", "Object", "...", "args", ")", "{", "if", "(", "!", "argument", ")", "{", "throw", "new", "IllegalArgumentException", "(", "String", ".", "format", "(", "msg", ",", ...
copy of Guava to avoid including Guava in this core library
[ "copy", "of", "Guava", "to", "avoid", "including", "Guava", "in", "this", "core", "library" ]
f6fa4e3e0b943ff103f918824319d8abf33d0e0f
https://github.com/centic9/commons-dost/blob/f6fa4e3e0b943ff103f918824319d8abf33d0e0f/src/main/java/org/dstadler/commons/metrics/MovingAverage.java#L106-L110
train
Bedework/bw-util
bw-util-jms/src/main/java/org/bedework/util/jms/JmsConnectionHandler.java
JmsConnectionHandler.open
public void open(final String queueName) throws NotificationException { try { final ConnectionFactory connFactory; final Context ctx = new InitialContext(pr); /* try { Context jcectx = (Context)ctx.lookup("java:comp/env/"); // Still here - use that if (jcectx != nul...
java
public void open(final String queueName) throws NotificationException { try { final ConnectionFactory connFactory; final Context ctx = new InitialContext(pr); /* try { Context jcectx = (Context)ctx.lookup("java:comp/env/"); // Still here - use that if (jcectx != nul...
[ "public", "void", "open", "(", "final", "String", "queueName", ")", "throws", "NotificationException", "{", "try", "{", "final", "ConnectionFactory", "connFactory", ";", "final", "Context", "ctx", "=", "new", "InitialContext", "(", "pr", ")", ";", "/*\n try...
Open a connection to the named queue ready to create a producer or consumer. @param queueName the queue @throws NotificationException
[ "Open", "a", "connection", "to", "the", "named", "queue", "ready", "to", "create", "a", "producer", "or", "consumer", "." ]
f51de4af3d7eb88fe63a0e22be8898a16c6cc3ad
https://github.com/Bedework/bw-util/blob/f51de4af3d7eb88fe63a0e22be8898a16c6cc3ad/bw-util-jms/src/main/java/org/bedework/util/jms/JmsConnectionHandler.java#L71-L136
train
centic9/commons-dost
src/main/java/org/dstadler/commons/graphviz/DotUtils.java
DotUtils.writeln
public static void writeln(final Writer writer, final String string, int indentLevel) throws IOException { writer.write(StringUtils.repeat("\t", indentLevel) + string); writer.write("\n"); }
java
public static void writeln(final Writer writer, final String string, int indentLevel) throws IOException { writer.write(StringUtils.repeat("\t", indentLevel) + string); writer.write("\n"); }
[ "public", "static", "void", "writeln", "(", "final", "Writer", "writer", ",", "final", "String", "string", ",", "int", "indentLevel", ")", "throws", "IOException", "{", "writer", ".", "write", "(", "StringUtils", ".", "repeat", "(", "\"\\t\"", ",", "indentLe...
Write out the string and a newline, appending a number of tabs to properly indent the resulting text-file. @param writer The writer for the .dot-file @param string The text to write @param indentLevel How much to indent the line @throws IOException if writing to the Writer fails
[ "Write", "out", "the", "string", "and", "a", "newline", "appending", "a", "number", "of", "tabs", "to", "properly", "indent", "the", "resulting", "text", "-", "file", "." ]
f6fa4e3e0b943ff103f918824319d8abf33d0e0f
https://github.com/centic9/commons-dost/blob/f6fa4e3e0b943ff103f918824319d8abf33d0e0f/src/main/java/org/dstadler/commons/graphviz/DotUtils.java#L45-L48
train
centic9/commons-dost
src/main/java/org/dstadler/commons/graphviz/DotUtils.java
DotUtils.writeHeader
public static void writeHeader(Writer writer, int dpi, String rankDir, String id, List<String> attribLines) throws IOException { // Default settings if (attribLines == null) { attribLines = new ArrayList<>(); } else { attribLines = new ArrayList<>(attribLines); } ...
java
public static void writeHeader(Writer writer, int dpi, String rankDir, String id, List<String> attribLines) throws IOException { // Default settings if (attribLines == null) { attribLines = new ArrayList<>(); } else { attribLines = new ArrayList<>(attribLines); } ...
[ "public", "static", "void", "writeHeader", "(", "Writer", "writer", ",", "int", "dpi", ",", "String", "rankDir", ",", "String", "id", ",", "List", "<", "String", ">", "attribLines", ")", "throws", "IOException", "{", "// Default settings", "if", "(", "attrib...
Write the header structure. @param writer A writer where the header is written to. @param dpi The resulting resolution, can be 0 for using the default DPI-setting of dot @param rankDir The direction of the graph, can be null @param id The id of the graph, cannot be null, needs to start with a alphabetical character, c...
[ "Write", "the", "header", "structure", "." ]
f6fa4e3e0b943ff103f918824319d8abf33d0e0f
https://github.com/centic9/commons-dost/blob/f6fa4e3e0b943ff103f918824319d8abf33d0e0f/src/main/java/org/dstadler/commons/graphviz/DotUtils.java#L61-L84
train
centic9/commons-dost
src/main/java/org/dstadler/commons/graphviz/DotUtils.java
DotUtils.renderGraph
public static void renderGraph(File dotfile, File resultfile) throws IOException { // call graphviz-dot via commons-exec CommandLine cmdLine = new CommandLine(DOT_EXE); cmdLine.addArgument("-T" + StringUtils.substringAfterLast(resultfile.getAbsolutePath(), ".")); cmdLine.addArgument(dotfile.getAbsolutePath()); ...
java
public static void renderGraph(File dotfile, File resultfile) throws IOException { // call graphviz-dot via commons-exec CommandLine cmdLine = new CommandLine(DOT_EXE); cmdLine.addArgument("-T" + StringUtils.substringAfterLast(resultfile.getAbsolutePath(), ".")); cmdLine.addArgument(dotfile.getAbsolutePath()); ...
[ "public", "static", "void", "renderGraph", "(", "File", "dotfile", ",", "File", "resultfile", ")", "throws", "IOException", "{", "// call graphviz-dot via commons-exec", "CommandLine", "cmdLine", "=", "new", "CommandLine", "(", "DOT_EXE", ")", ";", "cmdLine", ".", ...
Call graphviz-dot to convert the .dot-file to a rendered graph. The file extension of the specified result file is being used as the filetype of the rendering. @param dotfile The dot {@code File} used for the graph generation @param resultfile The {@code File} to which should be written @throws IOException if writi...
[ "Call", "graphviz", "-", "dot", "to", "convert", "the", ".", "dot", "-", "file", "to", "a", "rendered", "graph", "." ]
f6fa4e3e0b943ff103f918824319d8abf33d0e0f
https://github.com/centic9/commons-dost/blob/f6fa4e3e0b943ff103f918824319d8abf33d0e0f/src/main/java/org/dstadler/commons/graphviz/DotUtils.java#L109-L134
train
centic9/commons-dost
src/main/java/org/dstadler/commons/graphviz/DotUtils.java
DotUtils.checkDot
public static boolean checkDot() throws IOException { // call graphviz-dot via commons-exec CommandLine cmdLine = new CommandLine(DOT_EXE); cmdLine.addArgument("-V"); DefaultExecutor executor = new DefaultExecutor(); executor.setExitValue(0); ExecuteWatchdog watchdog = new ExecuteWatchdog(60000); executor...
java
public static boolean checkDot() throws IOException { // call graphviz-dot via commons-exec CommandLine cmdLine = new CommandLine(DOT_EXE); cmdLine.addArgument("-V"); DefaultExecutor executor = new DefaultExecutor(); executor.setExitValue(0); ExecuteWatchdog watchdog = new ExecuteWatchdog(60000); executor...
[ "public", "static", "boolean", "checkDot", "(", ")", "throws", "IOException", "{", "// call graphviz-dot via commons-exec", "CommandLine", "cmdLine", "=", "new", "CommandLine", "(", "DOT_EXE", ")", ";", "cmdLine", ".", "addArgument", "(", "\"-V\"", ")", ";", "Defa...
Verify if dot can be started and print out the version to stdout. @return True if "dot -V" ran successfully, false otherwise @throws IOException If running dot fails.
[ "Verify", "if", "dot", "can", "be", "started", "and", "print", "out", "the", "version", "to", "stdout", "." ]
f6fa4e3e0b943ff103f918824319d8abf33d0e0f
https://github.com/centic9/commons-dost/blob/f6fa4e3e0b943ff103f918824319d8abf33d0e0f/src/main/java/org/dstadler/commons/graphviz/DotUtils.java#L143-L159
train
sebastiangraf/treetank
interfacemodules/jax-rx/src/main/java/org/treetank/service/jaxrx/util/WorkerHelper.java
WorkerHelper.shredInputStream
public static void shredInputStream(final INodeWriteTrx wtx, final InputStream value, final EShredderInsert child) { final XMLInputFactory factory = XMLInputFactory.newInstance(); factory.setProperty(XMLInputFactory.SUPPORT_DTD, false); XMLEventReader parser; try { pa...
java
public static void shredInputStream(final INodeWriteTrx wtx, final InputStream value, final EShredderInsert child) { final XMLInputFactory factory = XMLInputFactory.newInstance(); factory.setProperty(XMLInputFactory.SUPPORT_DTD, false); XMLEventReader parser; try { pa...
[ "public", "static", "void", "shredInputStream", "(", "final", "INodeWriteTrx", "wtx", ",", "final", "InputStream", "value", ",", "final", "EShredderInsert", "child", ")", "{", "final", "XMLInputFactory", "factory", "=", "XMLInputFactory", ".", "newInstance", "(", ...
Shreds a given InputStream @param wtx current write transaction reference @param value InputStream to be shred
[ "Shreds", "a", "given", "InputStream" ]
9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60
https://github.com/sebastiangraf/treetank/blob/9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60/interfacemodules/jax-rx/src/main/java/org/treetank/service/jaxrx/util/WorkerHelper.java#L91-L108
train
sebastiangraf/treetank
interfacemodules/jax-rx/src/main/java/org/treetank/service/jaxrx/util/WorkerHelper.java
WorkerHelper.closeWTX
public static void closeWTX(final boolean abortTransaction, final INodeWriteTrx wtx, final ISession ses) throws TTException { synchronized (ses) { if (abortTransaction) { wtx.abort(); } ses.close(); } }
java
public static void closeWTX(final boolean abortTransaction, final INodeWriteTrx wtx, final ISession ses) throws TTException { synchronized (ses) { if (abortTransaction) { wtx.abort(); } ses.close(); } }
[ "public", "static", "void", "closeWTX", "(", "final", "boolean", "abortTransaction", ",", "final", "INodeWriteTrx", "wtx", ",", "final", "ISession", "ses", ")", "throws", "TTException", "{", "synchronized", "(", "ses", ")", "{", "if", "(", "abortTransaction", ...
This method closes all open treetank connections concerning a NodeWriteTrx. @param abortTransaction <code>true</code> if the transaction has to be aborted, <code>false</code> otherwise. @param wtx INodeWriteTrx to be closed @param ses ISession to be closed @throws TreetankException
[ "This", "method", "closes", "all", "open", "treetank", "connections", "concerning", "a", "NodeWriteTrx", "." ]
9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60
https://github.com/sebastiangraf/treetank/blob/9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60/interfacemodules/jax-rx/src/main/java/org/treetank/service/jaxrx/util/WorkerHelper.java#L195-L203
train
Bedework/bw-util
bw-util-struts/src/main/java/org/bedework/util/struts/UtilAbstractAction.java
UtilAbstractAction.getContentName
public String getContentName(final Request req) throws Throwable { UtilActionForm form = req.getForm(); PresentationState ps = getPresentationState(req); String contentName = ps.getContentName(); form.setContentName(contentName); return contentName; }
java
public String getContentName(final Request req) throws Throwable { UtilActionForm form = req.getForm(); PresentationState ps = getPresentationState(req); String contentName = ps.getContentName(); form.setContentName(contentName); return contentName; }
[ "public", "String", "getContentName", "(", "final", "Request", "req", ")", "throws", "Throwable", "{", "UtilActionForm", "form", "=", "req", ".", "getForm", "(", ")", ";", "PresentationState", "ps", "=", "getPresentationState", "(", "req", ")", ";", "String", ...
Override this to get the contentName from different sources @param req @return String name of content @throws Throwable
[ "Override", "this", "to", "get", "the", "contentName", "from", "different", "sources" ]
f51de4af3d7eb88fe63a0e22be8898a16c6cc3ad
https://github.com/Bedework/bw-util/blob/f51de4af3d7eb88fe63a0e22be8898a16c6cc3ad/bw-util-struts/src/main/java/org/bedework/util/struts/UtilAbstractAction.java#L395-L403
train
Bedework/bw-util
bw-util-struts/src/main/java/org/bedework/util/struts/UtilAbstractAction.java
UtilAbstractAction.checkLogOut
protected String checkLogOut(final HttpServletRequest request, final UtilActionForm form) throws Throwable { final String reqUser = request.getRemoteUser(); final boolean forceLogout = !Util.equalsString(reqUser, form.getCurrentUser()); final Strin...
java
protected String checkLogOut(final HttpServletRequest request, final UtilActionForm form) throws Throwable { final String reqUser = request.getRemoteUser(); final boolean forceLogout = !Util.equalsString(reqUser, form.getCurrentUser()); final Strin...
[ "protected", "String", "checkLogOut", "(", "final", "HttpServletRequest", "request", ",", "final", "UtilActionForm", "form", ")", "throws", "Throwable", "{", "final", "String", "reqUser", "=", "request", ".", "getRemoteUser", "(", ")", ";", "final", "boolean", "...
Check for logout request. @param request HttpServletRequest @param form @return null for continue, forwardLoggedOut to end session. @throws Throwable
[ "Check", "for", "logout", "request", "." ]
f51de4af3d7eb88fe63a0e22be8898a16c6cc3ad
https://github.com/Bedework/bw-util/blob/f51de4af3d7eb88fe63a0e22be8898a16c6cc3ad/bw-util-struts/src/main/java/org/bedework/util/struts/UtilAbstractAction.java#L511-L532
train
Bedework/bw-util
bw-util-struts/src/main/java/org/bedework/util/struts/UtilAbstractAction.java
UtilAbstractAction.setRefreshInterval
public void setRefreshInterval(final HttpServletRequest request, final HttpServletResponse response, final int refreshInterval, final String refreshAction, final UtilActionForm form) { ...
java
public void setRefreshInterval(final HttpServletRequest request, final HttpServletResponse response, final int refreshInterval, final String refreshAction, final UtilActionForm form) { ...
[ "public", "void", "setRefreshInterval", "(", "final", "HttpServletRequest", "request", ",", "final", "HttpServletResponse", "response", ",", "final", "int", "refreshInterval", ",", "final", "String", "refreshAction", ",", "final", "UtilActionForm", "form", ")", "{", ...
Check request for refresh interval @param request @param response @param refreshInterval @param refreshAction @param form
[ "Check", "request", "for", "refresh", "interval" ]
f51de4af3d7eb88fe63a0e22be8898a16c6cc3ad
https://github.com/Bedework/bw-util/blob/f51de4af3d7eb88fe63a0e22be8898a16c6cc3ad/bw-util-struts/src/main/java/org/bedework/util/struts/UtilAbstractAction.java#L638-L655
train
Bedework/bw-util
bw-util-struts/src/main/java/org/bedework/util/struts/UtilAbstractAction.java
UtilAbstractAction.setAppVar
public boolean setAppVar(final String name, final String val, final HashMap<String, String> appVars) { if (val == null) { appVars.remove(name); return true; } if (appVars.size() > maxAppVars) { return false; } appVars.put(name, val); return true; ...
java
public boolean setAppVar(final String name, final String val, final HashMap<String, String> appVars) { if (val == null) { appVars.remove(name); return true; } if (appVars.size() > maxAppVars) { return false; } appVars.put(name, val); return true; ...
[ "public", "boolean", "setAppVar", "(", "final", "String", "name", ",", "final", "String", "val", ",", "final", "HashMap", "<", "String", ",", "String", ">", "appVars", ")", "{", "if", "(", "val", "==", "null", ")", "{", "appVars", ".", "remove", "(", ...
Called to set an application variable to a value @param name name of variable @param val new value of variable - null means remove. @param appVars @return boolean True if ok - false for too many vars
[ "Called", "to", "set", "an", "application", "variable", "to", "a", "value" ]
f51de4af3d7eb88fe63a0e22be8898a16c6cc3ad
https://github.com/Bedework/bw-util/blob/f51de4af3d7eb88fe63a0e22be8898a16c6cc3ad/bw-util-struts/src/main/java/org/bedework/util/struts/UtilAbstractAction.java#L739-L752
train
Bedework/bw-util
bw-util-struts/src/main/java/org/bedework/util/struts/UtilAbstractAction.java
UtilAbstractAction.checkConfirmationId
protected String checkConfirmationId(final HttpServletRequest request, final UtilActionForm form) throws Throwable { String reqpar = request.getParameter("confirmationid"); if (reqpar == null) { return null; } if (!reqpar.equals(form.getConfirmati...
java
protected String checkConfirmationId(final HttpServletRequest request, final UtilActionForm form) throws Throwable { String reqpar = request.getParameter("confirmationid"); if (reqpar == null) { return null; } if (!reqpar.equals(form.getConfirmati...
[ "protected", "String", "checkConfirmationId", "(", "final", "HttpServletRequest", "request", ",", "final", "UtilActionForm", "form", ")", "throws", "Throwable", "{", "String", "reqpar", "=", "request", ".", "getParameter", "(", "\"confirmationid\"", ")", ";", "if", ...
Check for a confirmation id. This is a random string embedded in some requests to confirm that the incoming request came from a page we generated. Not all pages will have such an id but if we do it must match. We expect the request parameter to be of the form<br/> confirmationid=id<p>. @param request Needed to locat...
[ "Check", "for", "a", "confirmation", "id", ".", "This", "is", "a", "random", "string", "embedded", "in", "some", "requests", "to", "confirm", "that", "the", "incoming", "request", "came", "from", "a", "page", "we", "generated", ".", "Not", "all", "pages", ...
f51de4af3d7eb88fe63a0e22be8898a16c6cc3ad
https://github.com/Bedework/bw-util/blob/f51de4af3d7eb88fe63a0e22be8898a16c6cc3ad/bw-util-struts/src/main/java/org/bedework/util/struts/UtilAbstractAction.java#L788-L802
train
Bedework/bw-util
bw-util-struts/src/main/java/org/bedework/util/struts/UtilAbstractAction.java
UtilAbstractAction.getReqPar
protected String getReqPar(final HttpServletRequest req, final String name) throws Throwable { return Util.checkNull(req.getParameter(name)); }
java
protected String getReqPar(final HttpServletRequest req, final String name) throws Throwable { return Util.checkNull(req.getParameter(name)); }
[ "protected", "String", "getReqPar", "(", "final", "HttpServletRequest", "req", ",", "final", "String", "name", ")", "throws", "Throwable", "{", "return", "Util", ".", "checkNull", "(", "req", ".", "getParameter", "(", "name", ")", ")", ";", "}" ]
Get a request parameter stripped of white space. Return null for zero length. @param req @param name name of parameter @return String value @throws Throwable
[ "Get", "a", "request", "parameter", "stripped", "of", "white", "space", ".", "Return", "null", "for", "zero", "length", "." ]
f51de4af3d7eb88fe63a0e22be8898a16c6cc3ad
https://github.com/Bedework/bw-util/blob/f51de4af3d7eb88fe63a0e22be8898a16c6cc3ad/bw-util-struts/src/main/java/org/bedework/util/struts/UtilAbstractAction.java#L981-L983
train
danielnorberg/rut
rut/src/main/java/io/norberg/rut/Router.java
Router.route
public Status route(final CharSequence method, final CharSequence path, final Result<T> result) { result.captor.optionalTrailingSlash(optionalTrailingSlash); final RouteTarget<T> route = trie.lookup(path, result.captor); if (route == null) { return result.notFound().status(); } final Target<T>...
java
public Status route(final CharSequence method, final CharSequence path, final Result<T> result) { result.captor.optionalTrailingSlash(optionalTrailingSlash); final RouteTarget<T> route = trie.lookup(path, result.captor); if (route == null) { return result.notFound().status(); } final Target<T>...
[ "public", "Status", "route", "(", "final", "CharSequence", "method", ",", "final", "CharSequence", "path", ",", "final", "Result", "<", "T", ">", "result", ")", "{", "result", ".", "captor", ".", "optionalTrailingSlash", "(", "optionalTrailingSlash", ")", ";",...
Route a request. @param method The request method. E.g. {@code GET, PUT, POST, DELETE}, etc. @param path The request path. E.g. {@code /foo/baz/bar}. @param result A {@link Result} for storing the routing result, target and captured parameters. The {@link Result} should have enough capacity to store all captured par...
[ "Route", "a", "request", "." ]
6cd99e0d464da934d446b554ab5bbecaf294fcdc
https://github.com/danielnorberg/rut/blob/6cd99e0d464da934d446b554ab5bbecaf294fcdc/rut/src/main/java/io/norberg/rut/Router.java#L49-L61
train
sebastiangraf/treetank
coremodules/node/src/main/java/org/treetank/access/NodeWriteTrx.java
NodeWriteTrx.insertName
private int insertName(final String pName) throws TTException { final String string = (pName == null ? "" : pName); final int nameKey = NamePageHash.generateHashForString(string); NodeMetaPageFactory.MetaKey key = new NodeMetaPageFactory.MetaKey(nameKey); NodeMetaPageFactory.MetaValue va...
java
private int insertName(final String pName) throws TTException { final String string = (pName == null ? "" : pName); final int nameKey = NamePageHash.generateHashForString(string); NodeMetaPageFactory.MetaKey key = new NodeMetaPageFactory.MetaKey(nameKey); NodeMetaPageFactory.MetaValue va...
[ "private", "int", "insertName", "(", "final", "String", "pName", ")", "throws", "TTException", "{", "final", "String", "string", "=", "(", "pName", "==", "null", "?", "\"\"", ":", "pName", ")", ";", "final", "int", "nameKey", "=", "NamePageHash", ".", "g...
Setting a new name in the metapage. @param pName to be set @throws TTException
[ "Setting", "a", "new", "name", "in", "the", "metapage", "." ]
9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60
https://github.com/sebastiangraf/treetank/blob/9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60/coremodules/node/src/main/java/org/treetank/access/NodeWriteTrx.java#L491-L498
train
sebastiangraf/treetank
coremodules/node/src/main/java/org/treetank/access/NodeWriteTrx.java
NodeWriteTrx.adaptForInsert
private void adaptForInsert(final ITreeData paramNewNode, final boolean addAsFirstChild) throws TTException { assert paramNewNode != null; if (paramNewNode instanceof ITreeStructData) { final ITreeStructData strucNode = (ITreeStructData)paramNewNode; final ITreeStructData parent...
java
private void adaptForInsert(final ITreeData paramNewNode, final boolean addAsFirstChild) throws TTException { assert paramNewNode != null; if (paramNewNode instanceof ITreeStructData) { final ITreeStructData strucNode = (ITreeStructData)paramNewNode; final ITreeStructData parent...
[ "private", "void", "adaptForInsert", "(", "final", "ITreeData", "paramNewNode", ",", "final", "boolean", "addAsFirstChild", ")", "throws", "TTException", "{", "assert", "paramNewNode", "!=", "null", ";", "if", "(", "paramNewNode", "instanceof", "ITreeStructData", ")...
Adapting everything for insert operations. @param paramNewNode pointer of the new node to be inserted @param addAsFirstChild determines the position where to insert @throws TTIOException if anything weird happens
[ "Adapting", "everything", "for", "insert", "operations", "." ]
9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60
https://github.com/sebastiangraf/treetank/blob/9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60/coremodules/node/src/main/java/org/treetank/access/NodeWriteTrx.java#L514-L540
train
sebastiangraf/treetank
coremodules/node/src/main/java/org/treetank/access/NodeWriteTrx.java
NodeWriteTrx.adaptForRemove
private void adaptForRemove(final ITreeStructData pOldNode) throws TTException { assert pOldNode != null; // Adapt left sibling node if there is one. if (pOldNode.hasLeftSibling()) { final ITreeStructData leftSibling = (ITreeStructData)getPtx().getData(pOldNode.getLeftSiblingKey());...
java
private void adaptForRemove(final ITreeStructData pOldNode) throws TTException { assert pOldNode != null; // Adapt left sibling node if there is one. if (pOldNode.hasLeftSibling()) { final ITreeStructData leftSibling = (ITreeStructData)getPtx().getData(pOldNode.getLeftSiblingKey());...
[ "private", "void", "adaptForRemove", "(", "final", "ITreeStructData", "pOldNode", ")", "throws", "TTException", "{", "assert", "pOldNode", "!=", "null", ";", "// Adapt left sibling node if there is one.", "if", "(", "pOldNode", ".", "hasLeftSibling", "(", ")", ")", ...
Adapting everything for remove operations. @param pOldNode pointer of the old node to be replaces @throws TTIOException if anything weird happens
[ "Adapting", "everything", "for", "remove", "operations", "." ]
9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60
https://github.com/sebastiangraf/treetank/blob/9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60/coremodules/node/src/main/java/org/treetank/access/NodeWriteTrx.java#L558-L599
train
sebastiangraf/treetank
coremodules/node/src/main/java/org/treetank/access/NodeWriteTrx.java
NodeWriteTrx.rollingUpdate
private void rollingUpdate(final long paramOldHash) throws TTException { final ITreeData newNode = mDelegate.getCurrentNode(); final long newNodeHash = newNode.hashCode(); long resultNew = newNode.hashCode(); // go the path to the root do { synchronized (mDelegate.ge...
java
private void rollingUpdate(final long paramOldHash) throws TTException { final ITreeData newNode = mDelegate.getCurrentNode(); final long newNodeHash = newNode.hashCode(); long resultNew = newNode.hashCode(); // go the path to the root do { synchronized (mDelegate.ge...
[ "private", "void", "rollingUpdate", "(", "final", "long", "paramOldHash", ")", "throws", "TTException", "{", "final", "ITreeData", "newNode", "=", "mDelegate", ".", "getCurrentNode", "(", ")", ";", "final", "long", "newNodeHash", "=", "newNode", ".", "hashCode",...
Adapting the structure with a rolling hash for all ancestors only with update. @param paramOldHash paramOldHash to be removed @throws TTIOException if anything weird happened
[ "Adapting", "the", "structure", "with", "a", "rolling", "hash", "for", "all", "ancestors", "only", "with", "update", "." ]
9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60
https://github.com/sebastiangraf/treetank/blob/9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60/coremodules/node/src/main/java/org/treetank/access/NodeWriteTrx.java#L749-L771
train
sebastiangraf/treetank
coremodules/node/src/main/java/org/treetank/access/NodeWriteTrx.java
NodeWriteTrx.rollingRemove
private void rollingRemove() throws TTException { final ITreeData startNode = mDelegate.getCurrentNode(); long hashToRemove = startNode.getHash(); long hashToAdd = 0; long newHash = 0; // go the path to the root do { synchronized (mDelegate.getCurrentNode()) {...
java
private void rollingRemove() throws TTException { final ITreeData startNode = mDelegate.getCurrentNode(); long hashToRemove = startNode.getHash(); long hashToAdd = 0; long newHash = 0; // go the path to the root do { synchronized (mDelegate.getCurrentNode()) {...
[ "private", "void", "rollingRemove", "(", ")", "throws", "TTException", "{", "final", "ITreeData", "startNode", "=", "mDelegate", ".", "getCurrentNode", "(", ")", ";", "long", "hashToRemove", "=", "startNode", ".", "getHash", "(", ")", ";", "long", "hashToAdd",...
Adapting the structure with a rolling hash for all ancestors only with remove. @throws TTIOException if anything weird happened
[ "Adapting", "the", "structure", "with", "a", "rolling", "hash", "for", "all", "ancestors", "only", "with", "remove", "." ]
9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60
https://github.com/sebastiangraf/treetank/blob/9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60/coremodules/node/src/main/java/org/treetank/access/NodeWriteTrx.java#L780-L809
train
sebastiangraf/treetank
coremodules/node/src/main/java/org/treetank/access/NodeWriteTrx.java
NodeWriteTrx.buildName
public static String buildName(final QName pQName) { if (pQName == null) { throw new NullPointerException("mQName must not be null!"); } String name; if (pQName.getPrefix().isEmpty()) { name = pQName.getLocalPart(); } else { name = new StringBu...
java
public static String buildName(final QName pQName) { if (pQName == null) { throw new NullPointerException("mQName must not be null!"); } String name; if (pQName.getPrefix().isEmpty()) { name = pQName.getLocalPart(); } else { name = new StringBu...
[ "public", "static", "String", "buildName", "(", "final", "QName", "pQName", ")", "{", "if", "(", "pQName", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", "\"mQName must not be null!\"", ")", ";", "}", "String", "name", ";", "if", "(", ...
Building name consisting out of prefix and name. NamespaceUri is not used over here. @param pQName the {@link QName} of an element @return a string with [prefix:]localname
[ "Building", "name", "consisting", "out", "of", "prefix", "and", "name", ".", "NamespaceUri", "is", "not", "used", "over", "here", "." ]
9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60
https://github.com/sebastiangraf/treetank/blob/9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60/coremodules/node/src/main/java/org/treetank/access/NodeWriteTrx.java#L939-L950
train