Program: 37804
Project: 37804
Buggy source:
private static String getLammpsDataFile(StructureOrg c){
  Cell cell=c.getCell().getCellRotatedIntoPrincDirs();
  StringBuilder result=new StringBuilder();
  String newline=GAUtils.newline();
  DecimalFormat df=new DecimalFormat();
  df.setMaximumFractionDigits(6);
  result.append("String_Node_Str" + newline + newline);
  result.append(cell.getBasisSize() + "String_Node_Str" + newline);
  result.append(cell.getComposition().getNumElements() + "String_Node_Str" + newline);
  double xlo=0, xhi=cell.getLatticeVectors().get(0).getCartesianComponents().get(0);
  double ylo=0, yhi=cell.getLatticeVectors().get(1).getCartesianComponents().get(1);
  double zlo=0, zhi=cell.getLatticeVectors().get(2).getCartesianComponents().get(2);
  double xy=cell.getLatticeVectors().get(1).getCartesianComponents().get(0);
  double xz=cell.getLatticeVectors().get(2).getCartesianComponents().get(0);
  double yz=cell.getLatticeVectors().get(2).getCartesianComponents().get(1);
  result.append(xlo + "String_Node_Str" + xhi+ "String_Node_Str"+ newline);
  result.append(ylo + "String_Node_Str" + yhi+ "String_Node_Str"+ newline);
  result.append(zlo + "String_Node_Str" + zhi+ "String_Node_Str"+ newline);
  result.append(xy + "String_Node_Str" + xz+ "String_Node_Str"+ yz+ "String_Node_Str"+ newline+ newline);
  result.append("String_Node_Str" + newline + newline);
  List<Element> elems=cell.getComposition().getElements();
  for (int i=0; i < elems.size(); i++)   result.append(i + 1 + "String_Node_Str"+ elems.get(i).getAtomicMass()+ newline);
  result.append(newline + "String_Node_Str" + newline+ newline);
  for (int i=0; i < cell.getSites().size(); i++) {
    Site s=cell.getSites().get(i);
    result.append(i + 1 + "String_Node_Str"+ (1 + cell.getComposition().getElements().indexOf(cell.getSite(i).getElement()))+ "String_Node_Str");
    for (    double d : s.getCoords().getCartesianComponents())     result.append(df.format(d) + "String_Node_Str");
    result.append(newline);
  }
  return result.toString();
}

Fixed version (ground truth):
private static String getLammpsDataFile(StructureOrg c){
  Cell cell=c.getCell().getCellRotatedIntoPrincDirs();
  CompositionSpace compSpace=GAParameters.getParams().getCompSpace();
  StringBuilder result=new StringBuilder();
  String newline=GAUtils.newline();
  DecimalFormat df=new DecimalFormat();
  df.setMaximumFractionDigits(6);
  result.append("String_Node_Str" + newline + newline);
  result.append(cell.getBasisSize() + "String_Node_Str" + newline);
  result.append(compSpace.getElements().size() + "String_Node_Str" + newline);
  double xlo=0, xhi=cell.getLatticeVectors().get(0).getCartesianComponents().get(0);
  double ylo=0, yhi=cell.getLatticeVectors().get(1).getCartesianComponents().get(1);
  double zlo=0, zhi=cell.getLatticeVectors().get(2).getCartesianComponents().get(2);
  double xy=cell.getLatticeVectors().get(1).getCartesianComponents().get(0);
  double xz=cell.getLatticeVectors().get(2).getCartesianComponents().get(0);
  double yz=cell.getLatticeVectors().get(2).getCartesianComponents().get(1);
  result.append(xlo + "String_Node_Str" + xhi+ "String_Node_Str"+ newline);
  result.append(ylo + "String_Node_Str" + yhi+ "String_Node_Str"+ newline);
  result.append(zlo + "String_Node_Str" + zhi+ "String_Node_Str"+ newline);
  result.append(xy + "String_Node_Str" + xz+ "String_Node_Str"+ yz+ "String_Node_Str"+ newline+ newline);
  result.append("String_Node_Str" + newline + newline);
  List<Element> elems=compSpace.getElements();
  for (int i=0; i < elems.size(); i++)   result.append(i + 1 + "String_Node_Str"+ elems.get(i).getAtomicMass()+ newline);
  result.append(newline + "String_Node_Str" + newline+ newline);
  for (int i=0; i < cell.getSites().size(); i++) {
    Site s=cell.getSites().get(i);
    result.append((i + 1) + "String_Node_Str" + (1 + compSpace.getElements().indexOf(cell.getSite(i).getElement()))+ "String_Node_Str");
    for (    double d : s.getCoords().getCartesianComponents())     result.append(df.format(d) + "String_Node_Str");
    result.append(newline);
  }
  return result.toString();
}