Program: 16930
Project: 16930
Buggy source:
/** 
 * Handler for CRYST1 Record Format The CRYST1 record presents the unit cell parameters, space group, and Z value. If the entry describes a structure determined by a technique other than X-ray crystallography, CRYST1 contains a = b = c = 1.0, alpha = beta = gamma = 90 degrees, space group = P 1, and Z =1. COLUMNS DATA TYPE    FIELD          DEFINITION ------------------------------------------------------------- 1 - 6  Record name  "CRYST1" 7 - 15 Real(9.3)    a              a (Angstroms). 16 - 24 Real(9.3)    b              b (Angstroms). 25 - 33 Real(9.3)    c              c (Angstroms). 34 - 40 Real(7.2)    alpha          alpha (degrees). 41 - 47 Real(7.2)    beta           beta (degrees). 48 - 54 Real(7.2)    gamma          gamma (degrees). 56 - 66 LString      sGroup         Space group. 67 - 70 Integer      z              Z value.
 */
private void pdb_CRYST1_Handler(String line){
  if (line.length() < 69) {
    return;
  }
  float a;
  float b;
  float c;
  float alpha;
  float beta;
  float gamma;
  String spaceGroup="String_Node_Str";
  int z;
  try {
    a=Float.parseFloat(line.substring(6,15).trim());
    b=Float.parseFloat(line.substring(15,24).trim());
    c=Float.parseFloat(line.substring(24,33).trim());
    alpha=Float.parseFloat(line.substring(33,40).trim());
    beta=Float.parseFloat(line.substring(40,47).trim());
    gamma=Float.parseFloat(line.substring(47,54).trim());
    z=Integer.parseInt(line.substring(66,70).trim());
  }
 catch (  NumberFormatException e) {
    logger.fine(e.getMessage());
    logger.fine("String_Node_Str" + line);
    return;
  }
  spaceGroup=line.substring(55,66).trim();
  if (a == 1.0f && b == 1.0f && c == 1.0f && alpha == 90.0f && beta == 90.0f && gamma == 90.0f && spaceGroup.equals("String_Node_Str") && z == 1) {
    return;
  }
  CrystalCell xtalCell=new CrystalCell();
  crystallographicInfo.setCrystalCell(xtalCell);
  xtalCell.setA(a);
  xtalCell.setB(b);
  xtalCell.setC(c);
  xtalCell.setAlpha(alpha);
  xtalCell.setBeta(beta);
  xtalCell.setGamma(gamma);
  SpaceGroup sg=SymoplibParser.getSpaceGroup(spaceGroup);
  if (sg == null)   logger.warning("String_Node_Str" + spaceGroup + "String_Node_Str");
  crystallographicInfo.setSpaceGroup(sg);
  crystallographicInfo.setZ(z);
}

Fixed version (ground truth):
/** 
 * Handler for CRYST1 Record Format The CRYST1 record presents the unit cell parameters, space group, and Z value. If the entry describes a structure determined by a technique other than X-ray crystallography, CRYST1 contains a = b = c = 1.0, alpha = beta = gamma = 90 degrees, space group = P 1, and Z =1. COLUMNS DATA TYPE    FIELD          DEFINITION ------------------------------------------------------------- 1 - 6  Record name  "CRYST1" 7 - 15 Real(9.3)    a              a (Angstroms). 16 - 24 Real(9.3)    b              b (Angstroms). 25 - 33 Real(9.3)    c              c (Angstroms). 34 - 40 Real(7.2)    alpha          alpha (degrees). 41 - 47 Real(7.2)    beta           beta (degrees). 48 - 54 Real(7.2)    gamma          gamma (degrees). 56 - 66 LString      sGroup         Space group. 67 - 70 Integer      z              Z value.
 */
private void pdb_CRYST1_Handler(String line){
  if (line.length() < 69) {
    return;
  }
  float a;
  float b;
  float c;
  float alpha;
  float beta;
  float gamma;
  String spaceGroup="String_Node_Str";
  int z;
  try {
    a=Float.parseFloat(line.substring(6,15).trim());
    b=Float.parseFloat(line.substring(15,24).trim());
    c=Float.parseFloat(line.substring(24,33).trim());
    alpha=Float.parseFloat(line.substring(33,40).trim());
    beta=Float.parseFloat(line.substring(40,47).trim());
    gamma=Float.parseFloat(line.substring(47,54).trim());
    z=Integer.parseInt(line.substring(66,70).trim());
  }
 catch (  NumberFormatException e) {
    logger.fine(e.getMessage());
    logger.fine("String_Node_Str" + line);
    return;
  }
  spaceGroup=line.substring(55,66).trim();
  if (a == 1.0f && b == 1.0f && c == 1.0f && alpha == 90.0f && beta == 90.0f && gamma == 90.0f && spaceGroup.equals("String_Node_Str") && z == 1) {
    return;
  }
  CrystalCell xtalCell=new CrystalCell();
  crystallographicInfo.setCrystalCell(xtalCell);
  xtalCell.setA(a);
  xtalCell.setB(b);
  xtalCell.setC(c);
  xtalCell.setAlpha(alpha);
  xtalCell.setBeta(beta);
  xtalCell.setGamma(gamma);
  SpaceGroup sg=SymoplibParser.getSpaceGroup(spaceGroup);
  if (sg == null)   logger.fine("String_Node_Str" + spaceGroup + "String_Node_Str");
  crystallographicInfo.setSpaceGroup(sg);
  crystallographicInfo.setZ(z);
}