Program: 39976
Project: 39976
Buggy source:
/** 
 * Evaluates a expression in it's inner state and returns it's final value
 * @return {@code double} value of expression
 * @throws ParsingException if given expression is not valid
 */
double evaluateRPN() throws ParsingException {
  for (int i=0; i < rpnExpression.length(); ++i) {
    char currentChar=rpnExpression.charAt(i);
    if (symbolIsDigit(currentChar)) {
      double result=Character.getNumericValue(currentChar);
      if (result == -1) {
        throw new ParsingException("String_Node_Str");
      }
 else {
        while (Character.isDigit(rpnExpression.charAt(i + 1))) {
          ++i;
          result=result * 10 + readDigitAt(i);
        }
        if (rpnExpression.charAt(i + 1) == '.') {
          ++i;
          double partAfterDot=1;
          while (Character.isDigit(rpnExpression.charAt(i + 1))) {
            ++i;
            partAfterDot*=0.1;
            result=result + partAfterDot * readDigitAt(i);
          }
          if (rpnExpression.charAt(i + 1) == '.') {
            throw new ParsingException("String_Node_Str");
          }
          rpnStack.push(result);
        }
 else {
          rpnStack.push(result);
        }
      }
      continue;
    }
    if (symbolIsOperator(currentChar)) {
      if (currentChar == '$') {
        if (!rpnStack.empty()) {
          double number=rpnStack.pop();
          rpnStack.push(-1 * number);
        }
 else {
          throw new ParsingException("String_Node_Str");
        }
      }
 else {
        if (rpnStack.size() >= 2) {
          eval_single(currentChar);
        }
 else {
          throw new ParsingException("String_Node_Str" + currentChar + "String_Node_Str");
        }
      }
    }
  }
  if (rpnStack.size() == 1) {
    return rpnStack.pop();
  }
 else {
    throw new ParsingException("String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * Evaluates a expression in it's inner state and returns it's final value
 * @return {@code double} value of expression
 * @throws ParsingException if given expression is not valid
 */
double evaluateRPN() throws ParsingException {
  for (int i=0; i < rpnExpression.length(); ++i) {
    char currentChar=rpnExpression.charAt(i);
    if (symbolIsDigit(currentChar)) {
      double result=Character.getNumericValue(currentChar);
      if (result == -1) {
        throw new ParsingException("String_Node_Str");
      }
 else {
        while (Character.isDigit(rpnExpression.charAt(i + 1))) {
          ++i;
          result=result * 10 + readDigitAt(i);
        }
        if (rpnExpression.charAt(i + 1) == '.') {
          ++i;
          double partAfterDot=1;
          while (Character.isDigit(rpnExpression.charAt(i + 1))) {
            ++i;
            partAfterDot*=0.1;
            result=result + partAfterDot * readDigitAt(i);
          }
          if (rpnExpression.charAt(i + 1) == '.') {
            throw new ParsingException("String_Node_Str");
          }
          rpnStack.push(result);
        }
 else {
          rpnStack.push(result);
        }
      }
      continue;
    }
    if (symbolIsOperator(currentChar)) {
      if (currentChar == '$') {
        if (!rpnStack.empty()) {
          double number=rpnStack.pop();
          rpnStack.push(-1 * number);
        }
 else {
          throw new ParsingException("String_Node_Str");
        }
      }
 else {
        if (rpnStack.size() >= 2) {
          evalSingle(currentChar);
        }
 else {
          throw new ParsingException("String_Node_Str" + currentChar + "String_Node_Str");
        }
      }
    }
  }
  if (rpnStack.size() == 1) {
    return rpnStack.pop();
  }
 else {
    throw new ParsingException("String_Node_Str");
  }
}