Program: 32356
Project: 32356
Buggy source:
public void run(){
  int bugID=0;
  int startingLine;
  int endingLine;
  Program program=Program.g();
  CodePrinting printer=new CodePrinting();
  Hashtable<String,Integer> warningMap=new Hashtable<String,Integer>();
  for (  jq_Method m : program.getMethods()) {
    if (!m.isAbstract()) {
      if (m.toString().startsWith("String_Node_Str")) {
        continue;
      }
      System.out.println("String_Node_Str" + m);
      ControlFlowGraph cfg=null;
      try {
        cfg=m.getCFG();
      }
 catch (      Throwable e) {
        System.out.println("String_Node_Str" + m + "String_Node_Str"+ e);
        continue;
      }
      if (cfg == null) {
        System.out.println("String_Node_Str" + m + "String_Node_Str");
        continue;
      }
      for (      BasicBlock bb : cfg.reversePostOrder()) {
        startingLine=100000;
        endingLine=0;
        System.out.println("String_Node_Str" + bb);
        List<jq_Class> thrownExList=new ArrayList<jq_Class>();
        List<jq_Class> unhandledExList=new ArrayList<jq_Class>();
        Map<jq_Class,List<Quad>> exQuadMap=new HashMap<jq_Class,List<Quad>>();
        boolean throws_exception=false;
        boolean has_handler=false;
        for (int i=0; i < bb.size(); i++) {
          Quad q=bb.getQuad(i);
          try {
            if ((q.getLineNumber() < startingLine) && (q.getLineNumber() > 0)) {
              startingLine=q.getLineNumber();
            }
          }
 catch (          Throwable e) {
          }
          for (          jq_Class exc : q.getThrownExceptions()) {
            String excStr=exc.getName();
            if (excStr.equals("String_Node_Str") || excStr.equals("String_Node_Str") || excStr.equals("String_Node_Str")|| excStr.equals("String_Node_Str")|| excStr.equals("String_Node_Str")|| excStr.equals("String_Node_Str")|| excStr.equals("String_Node_Str")|| excStr.equals("String_Node_Str")) {
              continue;
            }
            throws_exception=true;
            thrownExList.add(exc);
            unhandledExList.add(exc);
            if (!exQuadMap.containsKey(exc)) {
              exQuadMap.put(exc,new ArrayList<Quad>());
            }
            exQuadMap.get(exc).add(q);
            System.out.println("String_Node_Str" + q + "String_Node_Str"+ q.getLineNumber()+ "String_Node_Str"+ excStr);
          }
        }
        if (throws_exception == true) {
          for (          ExceptionHandler eh : bb.getExceptionHandlers()) {
            has_handler=true;
            jq_Class handledEx=eh.getExceptionType();
            for (            jq_Class thrownEx : thrownExList) {
              if (thrownEx.equals(handledEx)) {
                System.out.println("String_Node_Str" + thrownEx + "String_Node_Str");
                unhandledExList.remove(thrownEx);
              }
              if (isSubClass(thrownEx,handledEx)) {
                System.out.println("String_Node_Str" + thrownEx + "String_Node_Str"+ handledEx);
                unhandledExList.remove(thrownEx);
              }
            }
            try {
              int exhandlerLineNum=eh.getEntry().getLastQuad().getLineNumber();
              if (exhandlerLineNum > endingLine) {
                endingLine=exhandlerLineNum;
              }
            }
 catch (            Throwable e) {
            }
          }
          for (          jq_Class unhandledEx : unhandledExList) {
            boolean ignore=false;
            if (has_handler == false) {
              if (m.getThrownExceptionsTable() != null) {
                for (                jq_Class tex : m.getThrownExceptionsTable()) {
                  if (tex.equals(unhandledEx) || isSubClass(unhandledEx,tex)) {
                    System.out.println("String_Node_Str" + unhandledEx + "String_Node_Str"+ "String_Node_Str"+ tex);
                    ignore=true;
                    break;
                  }
                }
              }
            }
            if (ignore == true) {
              continue;
            }
            jq_Class superclass=null;
            try {
              superclass=unhandledEx.getSuperclass();
            }
 catch (            RuntimeException e) {
              ignore=true;
            }
            while (superclass != null) {
              if (superclass.toString().equals("String_Node_Str")) {
                ignore=true;
                break;
              }
              try {
                superclass=superclass.getSuperclass();
              }
 catch (              RuntimeException e) {
                ignore=true;
                break;
              }
            }
            if (ignore == true) {
              continue;
            }
            String bugInfo=unhandledEx.toString() + bb.toString() + m.toString()+ m.getDeclaringClass().toString();
            if (warningMap.containsKey(bugInfo)) {
              continue;
            }
            warningMap.put(bugInfo,1);
            bugID++;
            System.out.println("String_Node_Str");
            System.out.println("String_Node_Str" + bugID + "String_Node_Str"+ unhandledEx+ "String_Node_Str");
            System.out.print("String_Node_Str");
            for (            Quad tq : exQuadMap.get(unhandledEx)) {
              System.out.println("String_Node_Str" + tq.getLineNumber() + "String_Node_Str"+ m.getDeclaringClass().getSourceFileName()+ "String_Node_Str");
              System.out.println("String_Node_Str" + tq);
            }
            System.out.println("String_Node_Str" + m);
            if (has_handler == false) {
              System.out.println("String_Node_Str");
            }
 else {
              System.out.print("String_Node_Str");
              for (              ExceptionHandler eh : bb.getExceptionHandlers()) {
                jq_Class handledEx=eh.getExceptionType();
                System.out.print(handledEx.getName());
                if (isSubClass(handledEx,unhandledEx)) {
                  System.out.println("String_Node_Str" + unhandledEx.getName());
                }
 else {
                  System.out.println("String_Node_Str" + unhandledEx.getName());
                }
              }
            }
            try {
              if (endingLine == 0) {
                endingLine=startingLine;
              }
              printer.printCode(startingLine,endingLine,m.getDeclaringClass().getSourceFileName());
            }
 catch (            IOException ioe) {
              System.out.println("String_Node_Str" + m.getDeclaringClass().getSourceFileName() + "String_Node_Str"+ startingLine+ "String_Node_Str"+ endingLine);
            }
            System.out.println("String_Node_Str");
            System.out.println();
          }
        }
      }
    }
  }
}

Fixed version (ground truth):
public void run(){
  int bugID=0;
  int startingLine;
  int endingLine;
  Program program=Program.g();
  CodePrinting printer=new CodePrinting();
  Hashtable<String,Integer> warningMap=new Hashtable<String,Integer>();
  for (  jq_Method m : program.getMethods()) {
    if (!m.isAbstract()) {
      if (m.toString().startsWith("String_Node_Str")) {
        continue;
      }
      System.out.println("String_Node_Str" + m);
      ControlFlowGraph cfg=null;
      try {
        cfg=m.getCFG();
      }
 catch (      Throwable e) {
        System.out.println("String_Node_Str" + m + "String_Node_Str"+ e);
        continue;
      }
      if (cfg == null) {
        System.out.println("String_Node_Str" + m + "String_Node_Str");
        continue;
      }
      for (      BasicBlock bb : cfg.reversePostOrder()) {
        startingLine=100000;
        endingLine=0;
        System.out.println("String_Node_Str" + bb);
        List<jq_Class> thrownExList=new ArrayList<jq_Class>();
        List<jq_Class> unhandledExList=new ArrayList<jq_Class>();
        Map<jq_Class,List<Quad>> exQuadMap=new HashMap<jq_Class,List<Quad>>();
        boolean throws_exception=false;
        boolean has_handler=false;
        for (int i=0; i < bb.size(); i++) {
          Quad q=bb.getQuad(i);
          try {
            if ((q.getLineNumber() < startingLine) && (q.getLineNumber() > 0)) {
              startingLine=q.getLineNumber();
            }
          }
 catch (          Throwable e) {
          }
          for (          jq_Class exc : q.getThrownExceptions()) {
            String excStr=exc.getName();
            if (excStr.equals("String_Node_Str") || excStr.equals("String_Node_Str") || excStr.equals("String_Node_Str")|| excStr.equals("String_Node_Str")|| excStr.equals("String_Node_Str")|| excStr.equals("String_Node_Str")|| excStr.equals("String_Node_Str")|| excStr.equals("String_Node_Str")) {
              continue;
            }
            throws_exception=true;
            thrownExList.add(exc);
            unhandledExList.add(exc);
            if (!exQuadMap.containsKey(exc)) {
              exQuadMap.put(exc,new ArrayList<Quad>());
            }
            exQuadMap.get(exc).add(q);
            System.out.println("String_Node_Str" + q + "String_Node_Str"+ q.getLineNumber()+ "String_Node_Str"+ excStr);
          }
        }
        if (throws_exception == true) {
          for (          ExceptionHandler eh : bb.getExceptionHandlers()) {
            has_handler=true;
            jq_Class handledEx=eh.getExceptionType();
            for (            jq_Class thrownEx : thrownExList) {
              if (thrownEx.equals(handledEx)) {
                System.out.println("String_Node_Str" + thrownEx + "String_Node_Str");
                unhandledExList.remove(thrownEx);
              }
              if (isSubClass(thrownEx,handledEx)) {
                System.out.println("String_Node_Str" + thrownEx + "String_Node_Str"+ handledEx);
                unhandledExList.remove(thrownEx);
              }
            }
            try {
              int exhandlerLineNum=eh.getEntry().getLastQuad().getLineNumber();
              if (exhandlerLineNum > endingLine) {
                endingLine=exhandlerLineNum;
              }
            }
 catch (            Throwable e) {
            }
          }
          for (          jq_Class unhandledEx : unhandledExList) {
            boolean ignore=false;
            if (has_handler == false) {
              if (m.getThrownExceptionsTable() != null) {
                for (                jq_Class tex : m.getThrownExceptionsTable()) {
                  if (tex.equals(unhandledEx) || isSubClass(unhandledEx,tex)) {
                    System.out.println("String_Node_Str" + unhandledEx + "String_Node_Str"+ "String_Node_Str"+ tex);
                    ignore=true;
                    break;
                  }
                }
              }
            }
            if (ignore == true) {
              continue;
            }
            jq_Class superclass=null;
            try {
              superclass=unhandledEx.getSuperclass();
            }
 catch (            RuntimeException e) {
              ignore=true;
            }
            while (superclass != null) {
              if (superclass.toString().equals("String_Node_Str")) {
                ignore=true;
                break;
              }
              try {
                superclass=superclass.getSuperclass();
              }
 catch (              RuntimeException e) {
                ignore=true;
                break;
              }
            }
            if (ignore == true) {
              continue;
            }
            String bugInfo=unhandledEx.toString() + bb.toString() + m.toString()+ m.getDeclaringClass().toString();
            if (warningMap.containsKey(bugInfo)) {
              continue;
            }
            warningMap.put(bugInfo,1);
            bugID++;
            System.out.println("String_Node_Str");
            System.out.println("String_Node_Str" + bugID + "String_Node_Str"+ unhandledEx+ "String_Node_Str");
            System.out.print("String_Node_Str");
            for (            Quad tq : exQuadMap.get(unhandledEx)) {
              System.out.println("String_Node_Str" + tq.getLineNumber() + "String_Node_Str"+ m.getDeclaringClass().getSourceFileName()+ "String_Node_Str");
              System.out.println("String_Node_Str" + tq);
            }
            System.out.println("String_Node_Str" + m);
            if (has_handler == false) {
              System.out.println("String_Node_Str");
            }
 else {
              System.out.print("String_Node_Str");
              for (              ExceptionHandler eh : bb.getExceptionHandlers()) {
                jq_Class handledEx=eh.getExceptionType();
                System.out.print(handledEx.getName());
                if (isSubClass(handledEx,unhandledEx)) {
                  System.out.println("String_Node_Str" + unhandledEx.getName());
                }
 else {
                  System.out.println("String_Node_Str" + unhandledEx.getName());
                }
              }
            }
            try {
              if (endingLine == 0) {
                endingLine=startingLine;
              }
              printer.printCode(startingLine,endingLine,m.getDeclaringClass().getSourceFileName(),true);
            }
 catch (            IOException ioe) {
              System.out.println("String_Node_Str" + m.getDeclaringClass().getSourceFileName() + "String_Node_Str"+ startingLine+ "String_Node_Str"+ endingLine);
            }
            System.out.println("String_Node_Str");
            System.out.println();
          }
        }
      }
    }
  }
}