Program: 15699
Project: 15699
Buggy source:
private void printStackTrace(StackTraceWriter out,boolean heading,boolean ftlStackTrace,boolean javaStackTrace){
synchronized (out) {
    if (heading) {
      out.println("String_Node_Str");
    }
    if (ftlStackTrace) {
      String stackTrace=getFTLInstructionStack();
      if (stackTrace != null) {
        out.println(getMessageWithoutStackTop());
        out.println();
        out.print(THE_FAILING_INSTRUCTION);
        out.println("String_Node_Str");
        out.print(stackTrace);
      }
 else {
        ftlStackTrace=false;
        javaStackTrace=true;
      }
    }
    if (javaStackTrace) {
      if (ftlStackTrace) {
        out.println();
        out.println("String_Node_Str");
        out.println(_CoreAPI.STACK_SECTION_SEPARATOR);
synchronized (lock) {
          if (messageWasAlreadyPrintedForThisTrace == null) {
            messageWasAlreadyPrintedForThisTrace=new ThreadLocal();
          }
          messageWasAlreadyPrintedForThisTrace.set(Boolean.TRUE);
        }
        try {
          out.printStandardStackTrace(this);
        }
  finally {
          messageWasAlreadyPrintedForThisTrace.set(Boolean.FALSE);
        }
      }
 else {
        out.printStandardStackTrace(this);
      }
      if (BEFORE_1_4 && causeException != null) {
        out.println("String_Node_Str");
        out.printStandardStackTrace(causeException);
      }
      try {
        Method m=causeException.getClass().getMethod("String_Node_Str",Collections12.EMPTY_CLASS_ARRAY);
        Throwable rootCause=(Throwable)m.invoke(causeException,Collections12.EMPTY_OBJECT_ARRAY);
        if (rootCause != null) {
          Throwable j14Cause=null;
          if (!BEFORE_1_4) {
            m=causeException.getClass().getMethod("String_Node_Str",Collections12.EMPTY_CLASS_ARRAY);
            j14Cause=(Throwable)m.invoke(causeException,Collections12.EMPTY_OBJECT_ARRAY);
          }
          if (j14Cause == null) {
            out.println("String_Node_Str");
            out.printStandardStackTrace(rootCause);
          }
        }
      }
 catch (      Throwable exc) {
        ;
      }
    }
  }
}

Fixed version (ground truth):
private void printStackTrace(StackTraceWriter out,boolean heading,boolean ftlStackTrace,boolean javaStackTrace){
synchronized (out) {
    if (heading) {
      out.println("String_Node_Str");
    }
    if (ftlStackTrace) {
      String stackTrace=getFTLInstructionStack();
      if (stackTrace != null) {
        out.println(getMessageWithoutStackTop());
        out.println("String_Node_Str");
        out.println(THE_FAILING_INSTRUCTION_FTL_STACK_TRACE);
        out.print(stackTrace);
      }
 else {
        ftlStackTrace=false;
        javaStackTrace=true;
      }
    }
    if (javaStackTrace) {
      if (ftlStackTrace) {
        out.println();
        out.println("String_Node_Str");
        out.println(_CoreAPI.STACK_SECTION_SEPARATOR);
synchronized (lock) {
          if (messageWasAlreadyPrintedForThisTrace == null) {
            messageWasAlreadyPrintedForThisTrace=new ThreadLocal();
          }
          messageWasAlreadyPrintedForThisTrace.set(Boolean.TRUE);
        }
        try {
          out.printStandardStackTrace(this);
        }
  finally {
          messageWasAlreadyPrintedForThisTrace.set(Boolean.FALSE);
        }
      }
 else {
        out.printStandardStackTrace(this);
      }
      if (BEFORE_1_4 && causeException != null) {
        out.println("String_Node_Str");
        out.printStandardStackTrace(causeException);
      }
      try {
        Method m=causeException.getClass().getMethod("String_Node_Str",Collections12.EMPTY_CLASS_ARRAY);
        Throwable rootCause=(Throwable)m.invoke(causeException,Collections12.EMPTY_OBJECT_ARRAY);
        if (rootCause != null) {
          Throwable j14Cause=null;
          if (!BEFORE_1_4) {
            m=causeException.getClass().getMethod("String_Node_Str",Collections12.EMPTY_CLASS_ARRAY);
            j14Cause=(Throwable)m.invoke(causeException,Collections12.EMPTY_OBJECT_ARRAY);
          }
          if (j14Cause == null) {
            out.println("String_Node_Str");
            out.printStandardStackTrace(rootCause);
          }
        }
      }
 catch (      Throwable exc) {
        ;
      }
    }
  }
}