Program: 61762
Project: 61762
Buggy source:
@Override public GraphTextWriter appendTo(GraphTextWriter writer,LocalData localData) throws InterruptedException {
  GraphTargetItem expr=expression;
  List<GraphTargetItem> ifBranch=onTrue;
  List<GraphTargetItem> elseBranch=onFalse;
  if (onTrue.isEmpty()) {
    if (onFalse.isEmpty()) {
      if (expr instanceof NotItem) {
        expr=((NotItem)expr).getOriginal();
      }
    }
 else {
      if (expr instanceof LogicalOpItem) {
        expr=((LogicalOpItem)expr).invert();
      }
 else {
        expr=new NotItem(null,expr);
      }
      ifBranch=onFalse;
      elseBranch=onTrue;
    }
  }
  writer.append("String_Node_Str");
  expr.toString(writer,localData);
  writer.append("String_Node_Str").startBlock();
  for (  GraphTargetItem ti : ifBranch) {
    if (!ti.isEmpty()) {
      ti.toStringSemicoloned(writer,localData).newLine();
    }
  }
  writer.endBlock();
  if (elseBranch.size() > 0) {
    boolean elseIf=elseBranch.size() == 1 && (elseBranch.get(0) instanceof IfItem);
    if (writer.getFormatting().beginBlockOnNewLine) {
      writer.newLine();
    }
 else {
      writer.append("String_Node_Str");
    }
    writer.append("String_Node_Str");
    if (!elseIf) {
      writer.startBlock();
    }
 else {
      writer.append("String_Node_Str");
    }
    for (    GraphTargetItem ti : elseBranch) {
      if (!ti.isEmpty()) {
        ti.toStringSemicoloned(writer,localData).newLine();
      }
    }
    if (!elseIf) {
      writer.endBlock();
    }
  }
  return writer;
}

Fixed version (ground truth):
@Override public GraphTextWriter appendTo(GraphTextWriter writer,LocalData localData) throws InterruptedException {
  GraphTargetItem expr=expression;
  List<GraphTargetItem> ifBranch=onTrue;
  List<GraphTargetItem> elseBranch=onFalse;
  if (onTrue.isEmpty()) {
    if (onFalse.isEmpty()) {
      if (expr instanceof NotItem) {
        expr=((NotItem)expr).getOriginal();
      }
    }
 else {
      if (expr instanceof LogicalOpItem) {
        expr=((LogicalOpItem)expr).invert();
      }
 else {
        expr=new NotItem(null,expr);
      }
      ifBranch=onFalse;
      elseBranch=onTrue;
    }
  }
  writer.append("String_Node_Str");
  if (writer.getFormatting().spaceBeforeParenthesesIfParentheses) {
    writer.append("String_Node_Str");
  }
  writer.append("String_Node_Str");
  expr.toString(writer,localData);
  writer.append("String_Node_Str").startBlock();
  for (  GraphTargetItem ti : ifBranch) {
    if (!ti.isEmpty()) {
      ti.toStringSemicoloned(writer,localData).newLine();
    }
  }
  writer.endBlock();
  if (elseBranch.size() > 0) {
    boolean elseIf=elseBranch.size() == 1 && (elseBranch.get(0) instanceof IfItem);
    if (writer.getFormatting().beginBlockOnNewLine) {
      writer.newLine();
    }
 else {
      writer.append("String_Node_Str");
    }
    writer.append("String_Node_Str");
    if (!elseIf) {
      writer.startBlock();
    }
 else {
      writer.append("String_Node_Str");
    }
    for (    GraphTargetItem ti : elseBranch) {
      if (!ti.isEmpty()) {
        ti.toStringSemicoloned(writer,localData).newLine();
      }
    }
    if (!elseIf) {
      writer.endBlock();
    }
  }
  return writer;
}