Program: 16864
Project: 16864
Buggy source:
private void testHeader(Structure sPdb,Structure sCif){
  PDBHeader hPdb=sPdb.getPDBHeader();
  PDBHeader hCif=sCif.getPDBHeader();
  boolean isNmr=sPdb.isNmr();
  boolean isCrystallographic=sPdb.isCrystallographic();
  assertNotNull(hPdb);
  assertNotNull(hCif);
  assertEquals("String_Node_Str",hPdb.getIdCode(),hCif.getIdCode());
  assertNotNull("String_Node_Str",hPdb.getAuthors());
  assertNotNull("String_Node_Str",hCif.getAuthors());
  assertTrue("String_Node_Str",hPdb.getAuthors().length() >= 2);
  assertNotNull("String_Node_Str",hPdb.getClassification());
  assertNotNull("String_Node_Str",hCif.getClassification());
  assertNotNull("String_Node_Str",hCif.getDescription());
  assertEquals("String_Node_Str",hPdb.getDepDate(),hCif.getDepDate());
  assertEquals("String_Node_Str",hPdb.getModDate(),hCif.getModDate());
  assertNotNull(hPdb.getExperimentalTechniques());
  assertNotNull(hCif.getExperimentalTechniques());
  assertTrue(hPdb.getExperimentalTechniques().size() > 0);
  assertEquals("String_Node_Str",hPdb.getExperimentalTechniques(),hCif.getExperimentalTechniques());
  if (!hPdb.getExperimentalTechniques().contains(ExperimentalTechnique.ELECTRON_CRYSTALLOGRAPHY) && !hPdb.getExperimentalTechniques().contains(ExperimentalTechnique.ELECTRON_MICROSCOPY)) {
    assertEquals("String_Node_Str",hPdb.getResolution(),hCif.getResolution(),DELTA_RESOLUTION);
  }
  assertNotNull("String_Node_Str",hPdb.getTitle());
  assertNotNull("String_Node_Str",hCif.getTitle());
  assertEquals("String_Node_Str",hPdb.getTitle().toLowerCase().replaceAll("String_Node_Str","String_Node_Str"),hCif.getTitle().toLowerCase().replaceAll("String_Node_Str","String_Node_Str"));
  if (isNmr) {
    assertEquals("String_Node_Str",PDBHeader.DEFAULT_RESOLUTION,hPdb.getResolution(),DELTA_RESOLUTION);
  }
  if (!isCrystallographic) {
    assertEquals("String_Node_Str",PDBHeader.DEFAULT_RFREE,DELTA_RFREE,hPdb.getRfree());
    assertEquals("String_Node_Str",PDBHeader.DEFAULT_RFREE,DELTA_RFREE,hCif.getRfree());
  }
  if (isCrystallographic) {
    assertEquals("String_Node_Str",hPdb.getRfree(),hCif.getRfree(),DELTA_RFREE);
    assertNotNull("String_Node_Str",hPdb.getCrystallographicInfo());
    assertNotNull("String_Node_Str",hCif.getCrystallographicInfo());
    PDBCrystallographicInfo ciPdb=hPdb.getCrystallographicInfo();
    PDBCrystallographicInfo ciCif=hCif.getCrystallographicInfo();
    assertNotNull(ciPdb.getSpaceGroup());
    assertNotNull(ciCif.getSpaceGroup());
    assertNotNull("String_Node_Str",ciPdb.getCrystalCell());
    assertNotNull("String_Node_Str",ciCif.getCrystalCell());
    CrystalCell ccPdb=ciPdb.getCrystalCell();
    CrystalCell ccCif=ciCif.getCrystalCell();
    assertEquals("String_Node_Str",ccPdb.getA(),ccCif.getA(),DELTA);
    assertEquals("String_Node_Str",ccPdb.getB(),ccCif.getB(),DELTA);
    assertEquals("String_Node_Str",ccPdb.getC(),ccCif.getC(),DELTA);
    assertEquals("String_Node_Str",ccPdb.getAlpha(),ccCif.getAlpha(),DELTA);
    assertEquals("String_Node_Str",ccPdb.getBeta(),ccCif.getBeta(),DELTA);
    assertEquals("String_Node_Str",ccPdb.getGamma(),ccCif.getGamma(),DELTA);
    if (ciPdb.getNcsOperators() == null) {
      assertTrue(ciCif.getNcsOperators() == null);
    }
 else {
      Matrix4d[] ncsOpersPdb=ciPdb.getNcsOperators();
      Matrix4d[] ncsOpersCif=ciCif.getNcsOperators();
      assertEquals("String_Node_Str",ncsOpersPdb.length,ncsOpersCif.length);
      for (int i=0; i < ncsOpersPdb.length; i++) {
        assertTrue("String_Node_Str" + i + "String_Node_Str",ncsOpersPdb[i].epsilonEquals(ncsOpersCif[i],0.0001));
      }
    }
  }
}

Fixed version (ground truth):
private void testHeader(Structure sPdb,Structure sCif){
  PDBHeader hPdb=sPdb.getPDBHeader();
  PDBHeader hCif=sCif.getPDBHeader();
  boolean isNmr=sPdb.isNmr();
  boolean isCrystallographic=sPdb.isCrystallographic();
  assertNotNull(hPdb);
  assertNotNull(hCif);
  assertEquals("String_Node_Str",hPdb.getIdCode(),hCif.getIdCode());
  assertNotNull("String_Node_Str",hPdb.getAuthors());
  assertNotNull("String_Node_Str",hCif.getAuthors());
  assertTrue("String_Node_Str",hPdb.getAuthors().length() >= 2);
  assertNotNull("String_Node_Str",hPdb.getClassification());
  assertNotNull("String_Node_Str",hCif.getClassification());
  assertNotNull("String_Node_Str",hCif.getDescription());
  assertEquals("String_Node_Str",hPdb.getDepDate(),hCif.getDepDate());
  assertEquals("String_Node_Str",hPdb.getModDate(),hCif.getModDate());
  assertNotNull(hPdb.getExperimentalTechniques());
  assertNotNull(hCif.getExperimentalTechniques());
  assertTrue(hPdb.getExperimentalTechniques().size() > 0);
  assertEquals("String_Node_Str",hPdb.getExperimentalTechniques(),hCif.getExperimentalTechniques());
  if (!hPdb.getExperimentalTechniques().contains(ExperimentalTechnique.ELECTRON_CRYSTALLOGRAPHY) && !hPdb.getExperimentalTechniques().contains(ExperimentalTechnique.ELECTRON_MICROSCOPY)) {
    assertEquals("String_Node_Str",hPdb.getResolution(),hCif.getResolution(),DELTA_RESOLUTION);
  }
  assertNotNull("String_Node_Str",hPdb.getTitle());
  assertNotNull("String_Node_Str",hCif.getTitle());
  assertEquals("String_Node_Str",hPdb.getTitle().toLowerCase().replaceAll("String_Node_Str","String_Node_Str"),hCif.getTitle().toLowerCase().replaceAll("String_Node_Str","String_Node_Str"));
  if (isNmr) {
    assertEquals("String_Node_Str",PDBHeader.DEFAULT_RESOLUTION,hPdb.getResolution(),DELTA_RESOLUTION);
  }
  if (!isCrystallographic) {
    assertEquals("String_Node_Str",PDBHeader.DEFAULT_RFREE,DELTA_RFREE,hPdb.getRfree());
    assertEquals("String_Node_Str",PDBHeader.DEFAULT_RFREE,DELTA_RFREE,hCif.getRfree());
  }
  if (isCrystallographic) {
    assertEquals("String_Node_Str",hPdb.getRfree(),hCif.getRfree(),DELTA_RFREE);
    assertNotNull("String_Node_Str",hPdb.getCrystallographicInfo());
    assertNotNull("String_Node_Str",hCif.getCrystallographicInfo());
    PDBCrystallographicInfo ciPdb=hPdb.getCrystallographicInfo();
    PDBCrystallographicInfo ciCif=hCif.getCrystallographicInfo();
    assertNotNull(ciPdb.getSpaceGroup());
    assertNotNull(ciCif.getSpaceGroup());
    assertNotNull("String_Node_Str",ciPdb.getCrystalCell());
    assertNotNull("String_Node_Str",ciCif.getCrystalCell());
    CrystalCell ccPdb=ciPdb.getCrystalCell();
    CrystalCell ccCif=ciCif.getCrystalCell();
    assertEquals("String_Node_Str",ccPdb.getA(),ccCif.getA(),DELTA);
    assertEquals("String_Node_Str",ccPdb.getB(),ccCif.getB(),DELTA);
    assertEquals("String_Node_Str",ccPdb.getC(),ccCif.getC(),DELTA);
    assertEquals("String_Node_Str",ccPdb.getAlpha(),ccCif.getAlpha(),DELTA);
    assertEquals("String_Node_Str",ccPdb.getBeta(),ccCif.getBeta(),DELTA);
    assertEquals("String_Node_Str",ccPdb.getGamma(),ccCif.getGamma(),DELTA);
    if (ciPdb.getNcsOperators() == null) {
      assertTrue(ciCif.getNcsOperators() == null);
    }
 else {
      Matrix4d[] ncsOpersPdb=ciPdb.getNcsOperators();
      Matrix4d[] ncsOpersCif=ciCif.getNcsOperators();
      assertEquals("String_Node_Str",ncsOpersPdb.length,ncsOpersCif.length);
      for (int i=0; i < ncsOpersPdb.length; i++) {
        assertTrue("String_Node_Str" + i + "String_Node_Str",ncsOpersPdb[i].epsilonEquals(ncsOpersCif[i],0.0001));
      }
    }
  }
  if (isCrystallographic && hPdb.getCrystallographicInfo().getNcsOperators() == null && (!sPdb.getPDBCode().equalsIgnoreCase("String_Node_Str")) && (!sPdb.getPDBCode().equalsIgnoreCase("String_Node_Str")) && (!sPdb.getPDBCode().equalsIgnoreCase("String_Node_Str"))) {
    assertEquals("String_Node_Str",hPdb.getNrBioAssemblies(),hCif.getNrBioAssemblies());
    Map<String,List<BiologicalAssemblyTransformation>> batPdb=hPdb.getBioUnitTranformationMap();
    Map<String,List<BiologicalAssemblyTransformation>> batCif=hCif.getBioUnitTranformationMap();
    assertEquals("String_Node_Str",hPdb.getNrBioAssemblies(),batPdb.size());
    assertEquals("String_Node_Str",batPdb.size(),batCif.size());
  }
}