code stringlengths 73 34.1k | label stringclasses 1
value |
|---|---|
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 boolean isLetter(final char paramInput) {
return (paramInput >= '0' && paramInput <= '9') || (paramInput >= 'a' && paramInput <= 'z')
|| (paramInput >= 'A' && paramInput <= 'Z') || (paramInput == '_') || (paramInput == '-')
|| (paramInput == '.');
} | 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... | 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 ... | 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... | 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... | 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... | 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)
... | 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;
}
} | java |
public static String retrieveData(String sUrl, int timeout) throws IOException {
return retrieveData(sUrl, null, timeout);
} | 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... | 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();
... | 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
... | 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;
} | 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... | 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... | 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()... | 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 ... | 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) {
... | 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) {
... | 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) {
... | 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();
... | java |
public void addLiteral(final INodeReadTrx pTrans, final AtomicValue pVal) {
getExpression().add(new LiteralExpr(pTrans, AbsAxis.addAtomicToItemList(pTrans, pVal)));
} | java |
public void addStep(final AbsAxis axis, final AbsFilter mFilter) {
getExpression().add(new FilterAxis(axis, mRtx, mFilter));
} | 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.");
}
} | 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()
... | 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;
... | 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... | 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);
... | 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... | 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);
... | 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
... | 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... | java |
public static boolean stopProcess(final AbstractProcessorThread proc) {
proc.info("************************************************************");
proc.info(" * Stopping " + proc.getName());
proc.info("************************************************************");
proc.setRunning(false);
proc.int... | java |
public void reset(final long paramNodeKey) {
mStartKey = paramNodeKey;
mKey = paramNodeKey;
mNext = false;
lastPointer.remove(mRTX);
} | 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(... | java |
public void close() throws TTException {
atomics.remove(mRTX);
lastPointer.remove(mRTX);
mRTX.close();
} | java |
public ItemList getItemList() {
if (!atomics.containsKey(mRTX)) {
atomics.put(mRTX, new ItemList());
}
return atomics.get(mRTX);
} | 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);
} | 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 ... | 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 ... | 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;
} | 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... | 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(... | 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... | 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... | 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... | 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... | 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... | 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... | 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;
} | java |
public boolean search(String base, String filter) throws NamingException {
return search(base, filter, scopeSub);
} | java |
public boolean searchBase(String base, String filter) throws NamingException {
return search(base, filter, scopeBase);
} | java |
public boolean searchOne(String base, String filter) throws NamingException {
return search(base, filter, scopeOne);
} | java |
public DirRecord newRecord(String entryDn) throws NamingException {
DirRecord rec = new BasicDirRecord();
rec.setDn(entryDn);
return rec;
} | 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();
} | 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... | 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');... | java |
public void write(Writer wtr) throws Throwable {
// First we need the dn
wtr.write(getDn());
wtr.write('\n');
throw new Exception("Incomplete");
} | 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... | 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... | 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);
} | 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));
} | 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 ... | 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;
} | 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) {
... | java |
public void close() {
if (consumer != null) {
try {
consumer.close();
} catch (Throwable t) {
warn(t.getMessage());
}
}
conn.close();
} | 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... | 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... | java |
private void fillDataStructures() {
final ITreeData treeData = mRtx.getNode();
mInOrder.put(treeData, true);
mDescendants.put(treeData, 1L);
} | 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... | 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;
} | 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... | 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 &... | 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... | 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;
//... | 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... | 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... | 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... | java |
private void checkArgument(boolean argument, String msg, Object... args) {
if (!argument) {
throw new IllegalArgumentException(String.format(msg, args));
}
} | 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... | 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");
} | 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);
}
... | 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());
... | 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... | 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... | java |
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 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 |
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 |
public void setRefreshInterval(final HttpServletRequest request,
final HttpServletResponse response,
final int refreshInterval,
final String refreshAction,
final UtilActionForm form) {
... | 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;
... | 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... | java |
protected String getReqPar(final HttpServletRequest req, final String name) throws Throwable {
return Util.checkNull(req.getParameter(name));
} | 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>... | 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... | 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... | 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());... | 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... | 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()) {... | 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... | java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.