} else {
String path = paths.toArray(new String[0])[0];
Pattern pattern = createPrefixRegExp(path);
queryBuilder = queryBuilder.regex(pattern);
}
<BUG>if (revisionId > 0) {
</BUG>
queryBuilder = queryBuilder.and(MongoNode.KEY_REVISION_ID).lessThanEquals(revisionId);
}
if (branchId == null) {

} else {
String path = paths.toArray(new String[0])[0];
Pattern pattern = createPrefixRegExp(path);
queryBuilder = queryBuilder.regex(pattern);
}
if (revisionId > -1) {
queryBuilder = queryBuilder.and(MongoNode.KEY_REVISION_ID).lessThanEquals(revisionId);
}
if (branchId == null) {
