Program: 126304
Project: 126304
Buggy source:
private static int calcMethodArea(String varibleString,String wholeString,int beginIndex,List<FunctionInfo> functions){
  String regex="String_Node_Str";
  java.util.regex.Pattern pattern=java.util.regex.Pattern.compile(regex);
  Matcher matcher=pattern.matcher(varibleString);
  int i=0;
  int currentMaxIndex=i;
  while (matcher.find()) {
    boolean isInQuota=false;
    int parenthesisNum=0;
    int matchedStart=matcher.start();
    int matchedEnd=matcher.end();
    Point functionNameArea=new Point(beginIndex + matchedStart,beginIndex + matchedEnd);
    FunctionInfo funcInfo=new FunctionInfo(functionNameArea);
    Point functionParamArea=new Point(-1,-1);
    funcInfo.setParamArea(functionParamArea);
    i=beginIndex + matchedEnd;
    functionParamArea.x=i;
    for (; i < wholeString.length(); i++) {
      char ch=wholeString.charAt(i);
      if (ch == '\"' && !isEscapeSequence(wholeString,i)) {
        isInQuota=!isInQuota;
      }
      if (isInQuota) {
        continue;
      }
      if (ch == '(') {
        parenthesisNum++;
      }
 else       if (ch == ')') {
        parenthesisNum--;
      }
      if (parenthesisNum < 0) {
        break;
      }
    }
    functionParamArea.y=i;
    FunctionInfo.addFunctionToList(funcInfo,functions);
    if (currentMaxIndex < i) {
      currentMaxIndex=i;
    }
  }
  return currentMaxIndex;
}

Fixed version (ground truth):
private static int calcMethodArea(String varibleString,String wholeString,int beginIndex,List<FunctionInfo> functions){
  String regex="String_Node_Str";
  java.util.regex.Pattern pattern=java.util.regex.Pattern.compile(regex);
  Matcher matcher=pattern.matcher(varibleString);
  int i=0;
  int currentMaxIndex=i;
  while (matcher.find()) {
    boolean isInQuota=false;
    boolean isInComment=false;
    Character commentType=null;
    int parenthesisNum=0;
    int lastCommentEndIndex=-1;
    int matchedStart=matcher.start();
    int matchedEnd=matcher.end();
    Point functionNameArea=new Point(beginIndex + matchedStart,beginIndex + matchedEnd);
    FunctionInfo funcInfo=new FunctionInfo(functionNameArea);
    Point functionParamArea=new Point(-1,-1);
    funcInfo.setParamArea(functionParamArea);
    i=beginIndex + matchedEnd;
    functionParamArea.x=i;
    for (; i < wholeString.length(); i++) {
      char ch=wholeString.charAt(i);
      if (isInComment == false && ch == '\"' && !isEscapeSequence(wholeString,i)) {
        isInQuota=!isInQuota;
        continue;
      }
 else       if (isInQuota) {
        continue;
      }
 else       if (isInQuota == false) {
        if (isInComment) {
          if (commentType != null && commentType.equals('/') && (ch == '\r' || ch == '\n')) {
            isInComment=false;
            commentType=null;
            lastCommentEndIndex=i;
          }
 else           if (commentType != null && commentType.equals('*') && ch == '/' && wholeString.charAt(i - 1) == '*') {
            isInComment=false;
            commentType=null;
            lastCommentEndIndex=i;
          }
          continue;
        }
 else {
          if ((ch == '/' || ch == '*') && 0 < i && (i - 1) != lastCommentEndIndex && wholeString.charAt(i - 1) == '/') {
            isInComment=true;
            commentType=ch;
            continue;
          }
        }
      }
      if (ch == '(') {
        parenthesisNum++;
      }
 else       if (ch == ')') {
        parenthesisNum--;
      }
      if (parenthesisNum < 0) {
        break;
      }
    }
    functionParamArea.y=i;
    FunctionInfo.addFunctionToList(funcInfo,functions);
    if (currentMaxIndex < i) {
      currentMaxIndex=i;
    }
  }
  return currentMaxIndex;
}