Program: 17877
Project: 17877
Buggy source:
@Override public OrderByExpression parseOrderByString(final String orderByExpression) throws ExpressionParserException, ExpressionParserInternalError {
  curExpression=orderByExpression;
  OrderByExpressionImpl orderCollection=new OrderByExpressionImpl(curExpression);
  try {
    tokenList=new Tokenizer(orderByExpression).tokenize();
  }
 catch (  TokenizerException tokenizerException) {
    throw FilterParserExceptionImpl.createERROR_IN_TOKENIZER(tokenizerException,curExpression);
  }
  boolean weiter=false;
  while (weiter == false) {
    CommonExpression node=null;
    try {
      CommonExpression nodeLeft=readElement(null);
      node=readElements(nodeLeft,0);
    }
 catch (    ExpressionParserException expressionException) {
      expressionException.setFilterTree(orderCollection);
      throw expressionException;
    }
    OrderExpressionImpl orderNode=new OrderExpressionImpl(node);
    Token token=tokenList.lookToken();
    if (token == null) {
      orderNode.setSortOrder(SortOrder.asc);
    }
 else     if ((token.getKind() == TokenKind.LITERAL) && (token.getUriLiteral().equals("String_Node_Str"))) {
      orderNode.setSortOrder(SortOrder.asc);
      tokenList.next();
      token=tokenList.lookToken();
    }
 else     if ((token.getKind() == TokenKind.LITERAL) && (token.getUriLiteral().equals("String_Node_Str"))) {
      orderNode.setSortOrder(SortOrder.desc);
      tokenList.next();
      token=tokenList.lookToken();
    }
 else     if (token.getKind() == TokenKind.COMMA) {
      orderNode.setSortOrder(SortOrder.asc);
    }
 else {
      throw FilterParserExceptionImpl.createINVALID_SORT_ORDER(token,curExpression);
    }
    orderCollection.addOrder(orderNode);
    if (token == null) {
      weiter=true;
      break;
    }
 else     if (token.getKind() == TokenKind.COMMA) {
      Token oldToken=token;
      tokenList.next();
      token=tokenList.lookToken();
      if (token == null) {
        throw FilterParserExceptionImpl.createEXPRESSION_EXPECTED_AFTER_POS(oldToken,curExpression);
      }
    }
 else {
      throw FilterParserExceptionImpl.createCOMMA_OR_END_EXPECTED_AT_POS(token,curExpression);
    }
  }
  return orderCollection;
}

Fixed version (ground truth):
@Override public OrderByExpression parseOrderByString(final String orderByExpression) throws ExpressionParserException, ExpressionParserInternalError {
  curExpression=orderByExpression;
  OrderByExpressionImpl orderCollection=new OrderByExpressionImpl(curExpression);
  try {
    tokenList=new Tokenizer(orderByExpression).tokenize();
  }
 catch (  TokenizerException tokenizerException) {
    throw FilterParserExceptionImpl.createERROR_IN_TOKENIZER(tokenizerException,curExpression);
  }
  while (true) {
    CommonExpression node=null;
    try {
      CommonExpression nodeLeft=readElement(null);
      node=readElements(nodeLeft,0);
    }
 catch (    ExpressionParserException expressionException) {
      expressionException.setFilterTree(orderCollection);
      throw expressionException;
    }
    OrderExpressionImpl orderNode=new OrderExpressionImpl(node);
    Token token=tokenList.lookToken();
    if (token == null) {
      orderNode.setSortOrder(SortOrder.asc);
    }
 else     if ((token.getKind() == TokenKind.LITERAL) && (token.getUriLiteral().equals("String_Node_Str"))) {
      orderNode.setSortOrder(SortOrder.asc);
      tokenList.next();
      token=tokenList.lookToken();
    }
 else     if ((token.getKind() == TokenKind.LITERAL) && (token.getUriLiteral().equals("String_Node_Str"))) {
      orderNode.setSortOrder(SortOrder.desc);
      tokenList.next();
      token=tokenList.lookToken();
    }
 else     if (token.getKind() == TokenKind.COMMA) {
      orderNode.setSortOrder(SortOrder.asc);
    }
 else {
      throw FilterParserExceptionImpl.createINVALID_SORT_ORDER(token,curExpression);
    }
    orderCollection.addOrder(orderNode);
    if (token == null) {
      break;
    }
 else     if (token.getKind() == TokenKind.COMMA) {
      Token oldToken=token;
      tokenList.next();
      token=tokenList.lookToken();
      if (token == null) {
        throw FilterParserExceptionImpl.createEXPRESSION_EXPECTED_AFTER_POS(oldToken,curExpression);
      }
    }
 else {
      throw FilterParserExceptionImpl.createCOMMA_OR_END_EXPECTED_AT_POS(token,curExpression);
    }
  }
  return orderCollection;
}