Program: 81553
Project: 81553
Buggy source:
public void testFormulas() throws IOException, ParsePropertyException {
  Map beans=new HashMap();
  beans.put("String_Node_Str",beanWithList);
  beans.put("String_Node_Str",departments);
  InputStream is=new BufferedInputStream(getClass().getResourceAsStream(formulasXLS));
  XLSTransformer transformer=new XLSTransformer();
  HSSFWorkbook resultWorkbook=transformer.transformXLS(is,beans);
  is.close();
  is=new BufferedInputStream(getClass().getResourceAsStream(formulasXLS));
  POIFSFileSystem fs=new POIFSFileSystem(is);
  HSSFWorkbook sourceWorkbook=new HSSFWorkbook(fs);
  HSSFSheet sourceSheet=sourceWorkbook.getSheetAt(0);
  HSSFSheet resultSheet=resultWorkbook.getSheetAt(0);
  assertEquals("String_Node_Str",sourceSheet.getFirstRowNum(),resultSheet.getFirstRowNum());
  Map props=new HashMap();
  props.put("String_Node_Str",beanWithList.getName());
  CellsChecker checker=new CellsChecker(props);
  checker.checkRows(sourceSheet,resultSheet,0,0,3);
  checker.checkListCells(sourceSheet,3,resultSheet,3,(short)0,names);
  checker.checkListCells(sourceSheet,3,resultSheet,3,(short)1,doubleValues);
  checker.checkListCells(sourceSheet,3,resultSheet,3,(short)2,new Object[]{new Integer(123),new Integer(10234)});
  checker.checkListCells(sourceSheet,3,resultSheet,3,(short)3,dateValues);
  checker.checkFormulaCell(sourceSheet,4,resultSheet,6,(short)1,"String_Node_Str");
  checker.checkFormulaCell(sourceSheet,4,resultSheet,6,(short)2,"String_Node_Str");
  checker.checkFormulaCell(sourceSheet,6,resultSheet,8,(short)1,"String_Node_Str");
  checker.checkFormulaCell(sourceSheet,3,resultSheet,3,(short)4,"String_Node_Str");
  checker.checkFormulaCell(sourceSheet,3,resultSheet,4,(short)4,"String_Node_Str");
  checker.checkFormulaCell(sourceSheet,3,resultSheet,5,(short)4,"String_Node_Str");
  checker.checkFormulaCell(sourceSheet,4,resultSheet,6,(short)4,"String_Node_Str");
  checker.checkFormulaCell(sourceSheet,8,resultSheet,10,(short)1,"String_Node_Str");
  checker.checkFormulaCell(sourceSheet,8,resultSheet,10,(short)2,"String_Node_Str");
  checker.checkFormulaCell(sourceSheet,8,resultSheet,10,(short)4,"String_Node_Str");
  checker.checkFormulaCell(sourceSheet,10,resultSheet,12,(short)1,"String_Node_Str");
  checker.checkFormulaCell(sourceSheet,20,resultSheet,23,(short)1,"String_Node_Str");
  checker.checkFormulaCell(sourceSheet,20,resultSheet,32,(short)1,"String_Node_Str");
  checker.checkFormulaCell(sourceSheet,20,resultSheet,40,(short)1,"String_Node_Str");
  checker.checkFormulaCell(sourceSheet,20,resultSheet,23,(short)3,"String_Node_Str");
  checker.checkFormulaCell(sourceSheet,20,resultSheet,32,(short)3,"String_Node_Str");
  checker.checkFormulaCell(sourceSheet,20,resultSheet,40,(short)3,"String_Node_Str");
  checker.checkFormulaCell(sourceSheet,22,resultSheet,41,(short)1,"String_Node_Str");
  checker.checkFormulaCell(sourceSheet,22,resultSheet,41,(short)3,"String_Node_Str");
  checker.checkFormulaCell(sourceSheet,18,resultSheet,18,(short)3,"String_Node_Str");
  checker.checkFormulaCell(sourceSheet,18,resultSheet,22,(short)3,"String_Node_Str");
  checker.checkFormulaCell(sourceSheet,18,resultSheet,28,(short)3,"String_Node_Str");
  checker.checkFormulaCell(sourceSheet,19,resultSheet,31,(short)3,"String_Node_Str");
  checker.checkFormulaCell(sourceSheet,19,resultSheet,37,(short)3,"String_Node_Str");
  checker.checkFormulaCell(sourceSheet,19,resultSheet,39,(short)3,"String_Node_Str");
  sourceSheet=sourceWorkbook.getSheetAt(1);
  resultSheet=resultWorkbook.getSheetAt(1);
  checker.checkFormulaCell(sourceSheet,0,resultSheet,0,(short)1,"String_Node_Str");
  checker.checkFormulaCell(sourceSheet,0,resultSheet,0,(short)2,"String_Node_Str");
  checker.checkFormulaCell(sourceSheet,0,resultSheet,0,(short)4,"String_Node_Str");
  checker.checkFormulaCell(sourceSheet,2,resultSheet,2,(short)1,"String_Node_Str");
  checker.checkFormulaCell(sourceSheet,4,resultSheet,4,(short)1,"String_Node_Str");
  checker.checkFormulaCell(sourceSheet,15,resultSheet,24,(short)1,"String_Node_Str");
  checker.checkFormulaCell(sourceSheet,15,resultSheet,40,(short)1,"String_Node_Str");
  checker.checkFormulaCell(sourceSheet,15,resultSheet,53,(short)1,"String_Node_Str");
  is.close();
  saveWorkbook(resultWorkbook,formulasDestXLS);
}

Fixed version (ground truth):
public void testFormulas() throws IOException, ParsePropertyException {
  Map beans=new HashMap();
  beans.put("String_Node_Str",beanWithList);
  beans.put("String_Node_Str",departments);
  InputStream is=new BufferedInputStream(getClass().getResourceAsStream(formulasXLS));
  XLSTransformer transformer=new XLSTransformer();
  HSSFWorkbook resultWorkbook=transformer.transformXLS(is,beans);
  is.close();
  is=new BufferedInputStream(getClass().getResourceAsStream(formulasXLS));
  POIFSFileSystem fs=new POIFSFileSystem(is);
  HSSFWorkbook sourceWorkbook=new HSSFWorkbook(fs);
  HSSFSheet sourceSheet=sourceWorkbook.getSheetAt(0);
  HSSFSheet resultSheet=resultWorkbook.getSheetAt(0);
  assertEquals("String_Node_Str",sourceSheet.getFirstRowNum(),resultSheet.getFirstRowNum());
  Map props=new HashMap();
  props.put("String_Node_Str",beanWithList.getName());
  CellsChecker checker=new CellsChecker(props);
  checker.checkRows(sourceSheet,resultSheet,0,0,3);
  checker.checkListCells(sourceSheet,3,resultSheet,3,(short)0,names);
  checker.checkListCells(sourceSheet,3,resultSheet,3,(short)1,doubleValues);
  checker.checkListCells(sourceSheet,3,resultSheet,3,(short)2,new Object[]{new Integer(123),new Integer(10234)});
  checker.checkListCells(sourceSheet,3,resultSheet,3,(short)3,dateValues);
  checker.checkFormulaCell(sourceSheet,4,resultSheet,6,(short)1,"String_Node_Str");
  checker.checkFormulaCell(sourceSheet,4,resultSheet,6,(short)2,"String_Node_Str");
  checker.checkFormulaCell(sourceSheet,6,resultSheet,8,(short)1,"String_Node_Str");
  checker.checkFormulaCell(sourceSheet,3,resultSheet,3,(short)4,"String_Node_Str");
  checker.checkFormulaCell(sourceSheet,3,resultSheet,4,(short)4,"String_Node_Str");
  checker.checkFormulaCell(sourceSheet,3,resultSheet,5,(short)4,"String_Node_Str");
  checker.checkFormulaCell(sourceSheet,4,resultSheet,6,(short)4,"String_Node_Str");
  checker.checkFormulaCell(sourceSheet,8,resultSheet,10,(short)1,"String_Node_Str");
  checker.checkFormulaCell(sourceSheet,8,resultSheet,10,(short)2,"String_Node_Str");
  checker.checkFormulaCell(sourceSheet,8,resultSheet,10,(short)4,"String_Node_Str");
  checker.checkFormulaCell(sourceSheet,10,resultSheet,12,(short)1,"String_Node_Str");
  checker.checkFormulaCell(sourceSheet,20,resultSheet,23,(short)1,"String_Node_Str");
  checker.checkFormulaCell(sourceSheet,20,resultSheet,32,(short)1,"String_Node_Str");
  checker.checkFormulaCell(sourceSheet,20,resultSheet,40,(short)1,"String_Node_Str");
  checker.checkFormulaCell(sourceSheet,20,resultSheet,23,(short)3,"String_Node_Str");
  checker.checkFormulaCell(sourceSheet,20,resultSheet,32,(short)3,"String_Node_Str");
  checker.checkFormulaCell(sourceSheet,20,resultSheet,40,(short)3,"String_Node_Str");
  checker.checkFormulaCell(sourceSheet,22,resultSheet,41,(short)1,"String_Node_Str");
  checker.checkFormulaCell(sourceSheet,22,resultSheet,41,(short)3,"String_Node_Str");
  checker.checkFormulaCell(sourceSheet,18,resultSheet,18,(short)3,"String_Node_Str");
  checker.checkFormulaCell(sourceSheet,18,resultSheet,22,(short)3,"String_Node_Str");
  checker.checkFormulaCell(sourceSheet,18,resultSheet,28,(short)3,"String_Node_Str");
  checker.checkFormulaCell(sourceSheet,19,resultSheet,31,(short)3,"String_Node_Str");
  checker.checkFormulaCell(sourceSheet,19,resultSheet,37,(short)3,"String_Node_Str");
  checker.checkFormulaCell(sourceSheet,19,resultSheet,39,(short)3,"String_Node_Str");
  checker.checkFormulaCell(sourceSheet,24,resultSheet,43,(short)1,"String_Node_Str");
  sourceSheet=sourceWorkbook.getSheetAt(1);
  resultSheet=resultWorkbook.getSheetAt(1);
  checker.checkFormulaCell(sourceSheet,0,resultSheet,0,(short)1,"String_Node_Str");
  checker.checkFormulaCell(sourceSheet,0,resultSheet,0,(short)2,"String_Node_Str");
  checker.checkFormulaCell(sourceSheet,0,resultSheet,0,(short)4,"String_Node_Str");
  checker.checkFormulaCell(sourceSheet,2,resultSheet,2,(short)1,"String_Node_Str");
  checker.checkFormulaCell(sourceSheet,4,resultSheet,4,(short)1,"String_Node_Str");
  checker.checkFormulaCell(sourceSheet,15,resultSheet,24,(short)1,"String_Node_Str");
  checker.checkFormulaCell(sourceSheet,15,resultSheet,40,(short)1,"String_Node_Str");
  checker.checkFormulaCell(sourceSheet,15,resultSheet,53,(short)1,"String_Node_Str");
  is.close();
  saveWorkbook(resultWorkbook,formulasDestXLS);
}