Program: 6535
Project: 6535
Buggy source:
private void toStringHelper(StringBuffer buffer,CppClass clazz,int tabCount){
  if (null != clazz.getConstructors(Cpp.PUBLIC) && clazz.getConstructors(Cpp.PUBLIC).size() > 0) {
    for (    CppConstructor c : clazz.getConstructors(Cpp.PUBLIC)) {
      c.toString(buffer,tabCount);
    }
  }
  if (null != clazz.getConstructors(Cpp.PRIVATE) && clazz.getConstructors(Cpp.PRIVATE).size() > 0) {
    for (    CppConstructor c : clazz.getConstructors(Cpp.PRIVATE)) {
      c.toString(buffer,tabCount);
    }
  }
  if (null != clazz.getDestructors(Cpp.PRIVATE) && clazz.getDestructors(Cpp.PRIVATE).size() > 0) {
    for (    CppDestructor d : clazz.getDestructors(Cpp.PRIVATE)) {
      d.toString(buffer,tabCount);
    }
  }
  if (null != clazz.getDestructors(Cpp.PUBLIC) && clazz.getDestructors(Cpp.PUBLIC).size() > 0) {
    for (    CppDestructor d : clazz.getDestructors(Cpp.PUBLIC)) {
      d.toString(buffer,tabCount);
    }
  }
  if (null != clazz.getFuns(Cpp.PUBLIC) && clazz.getFuns(Cpp.PUBLIC).size() > 0) {
    for (int i=0; i < clazz.getFuns(Cpp.PUBLIC).size(); ++i) {
      CppFun f=clazz.getFuns(Cpp.PUBLIC).get(i);
      if (i < clazz.getFuns(Cpp.PUBLIC).size() - 1) {
        f.toString(buffer,tabCount,false);
      }
 else {
        f.toString(buffer,tabCount,true);
      }
    }
  }
  if (null != clazz.getFuns(Cpp.PRIVATE) && clazz.getFuns(Cpp.PRIVATE).size() > 0) {
    for (int i=0; i < clazz.getFuns(Cpp.PRIVATE).size(); ++i) {
      CppFun f=clazz.getFuns(Cpp.PRIVATE).get(i);
      if (i < clazz.getFuns(Cpp.PRIVATE).size() - 1) {
        f.toString(buffer,tabCount,false);
      }
 else {
        f.toString(buffer,tabCount,true);
      }
    }
  }
  if (null != clazz.getNested(Cpp.PUBLIC) && clazz.getNested(Cpp.PUBLIC).size() > 0) {
    for (    CppClass c : clazz.getNested(Cpp.PUBLIC)) {
      toStringHelper(buffer,c,tabCount);
    }
  }
  if (null != clazz.getNested(Cpp.PRIVATE) && clazz.getNested(Cpp.PRIVATE).size() > 0) {
    for (    CppClass c : clazz.getNested(Cpp.PRIVATE)) {
      toStringHelper(buffer,c,tabCount);
    }
  }
}

Fixed version (ground truth):
private void toStringHelper(StringBuffer buffer,CppClass clazz,int tabCount){
  if (null != clazz.getConstructors(Cpp.PUBLIC) && clazz.getConstructors(Cpp.PUBLIC).size() > 0) {
    for (    CppConstructor c : clazz.getConstructors(Cpp.PUBLIC)) {
      c.toString(buffer,tabCount);
    }
  }
  if (null != clazz.getConstructors(Cpp.PRIVATE) && clazz.getConstructors(Cpp.PRIVATE).size() > 0) {
    for (    CppConstructor c : clazz.getConstructors(Cpp.PRIVATE)) {
      c.toString(buffer,tabCount);
    }
  }
  if (null != clazz.getDestructors(Cpp.PRIVATE) && clazz.getDestructors(Cpp.PRIVATE).size() > 0) {
    for (    CppDestructor d : clazz.getDestructors(Cpp.PRIVATE)) {
      d.toString(buffer,tabCount);
    }
  }
  if (null != clazz.getDestructors(Cpp.PUBLIC) && clazz.getDestructors(Cpp.PUBLIC).size() > 0) {
    for (    CppDestructor d : clazz.getDestructors(Cpp.PUBLIC)) {
      d.toString(buffer,tabCount);
    }
  }
  if (null != clazz.getFuns(Cpp.PUBLIC) && clazz.getFuns(Cpp.PUBLIC).size() > 0) {
    for (int i=0; i < clazz.getFuns(Cpp.PUBLIC).size(); ++i) {
      CppFun f=clazz.getFuns(Cpp.PUBLIC).get(i);
      if (i < clazz.getFuns(Cpp.PUBLIC).size() - 1) {
        f.toString(buffer,tabCount,false);
      }
 else {
        f.toString(buffer,tabCount,true);
      }
    }
    buffer.append(Cpp.newline + Cpp.newline);
  }
  if (null != clazz.getFuns(Cpp.PRIVATE) && clazz.getFuns(Cpp.PRIVATE).size() > 0) {
    for (int i=0; i < clazz.getFuns(Cpp.PRIVATE).size(); ++i) {
      CppFun f=clazz.getFuns(Cpp.PRIVATE).get(i);
      if (i < clazz.getFuns(Cpp.PRIVATE).size() - 1) {
        f.toString(buffer,tabCount,false);
      }
 else {
        f.toString(buffer,tabCount,true);
      }
    }
    buffer.append(Cpp.newline + Cpp.newline);
  }
  if (null != clazz.getNested(Cpp.PUBLIC) && clazz.getNested(Cpp.PUBLIC).size() > 0) {
    for (    CppClass c : clazz.getNested(Cpp.PUBLIC)) {
      toStringHelper(buffer,c,tabCount);
    }
  }
  if (null != clazz.getNested(Cpp.PRIVATE) && clazz.getNested(Cpp.PRIVATE).size() > 0) {
    for (    CppClass c : clazz.getNested(Cpp.PRIVATE)) {
      toStringHelper(buffer,c,tabCount);
    }
  }
}