Program: 81533
Project: 81533
Buggy source:
public void testRead() throws IOException {
  InputStream inputXLS=new BufferedInputStream(getClass().getResourceAsStream(dataXLS));
  POIFSFileSystem fsInput=new POIFSFileSystem(inputXLS);
  HSSFWorkbook hssfInputWorkbook=new HSSFWorkbook(fsInput);
  HSSFSheet sheet=hssfInputWorkbook.getSheetAt(0);
  List mappings=new ArrayList();
  Department department=new Department();
  Map beans=new HashMap();
  beans.put("String_Node_Str",department);
  mappings.add(new BeanCellMapping(7,(short)0,"String_Node_Str","String_Node_Str"));
  mappings.add(new BeanCellMapping(7,(short)1,"String_Node_Str","String_Node_Str"));
  mappings.add(new BeanCellMapping(7,(short)3,"String_Node_Str","String_Node_Str"));
  mappings.add(new BeanCellMapping(7,(short)4,"String_Node_Str","String_Node_Str"));
  XLSBlockReader reader=new SimpleBlockReaderImpl(7,7,mappings);
  XLSRowCursor cursor=new XLSRowCursorImpl(sheet);
  XLSLoopBlockReader forEachReader=new XLSForEachBlockReaderImpl(7,7,"String_Node_Str","String_Node_Str",Employee.class);
  forEachReader.addBlockReader(reader);
  SectionCheck loopBreakCheck=getLoopBreakCheck();
  forEachReader.setLoopBreakCondition(loopBreakCheck);
  cursor.setCurrentRowNum(7);
  forEachReader.read(cursor,beans);
  assertEquals(4,department.getStaff().size());
  Employee employee=(Employee)department.getStaff().get(0);
  checkEmployee(employee,"String_Node_Str",new Integer(32),new Double(2000.0),new Double(0.20));
  employee=(Employee)department.getStaff().get(1);
  checkEmployee(employee,"String_Node_Str",new Integer(29),new Double(1800.0),new Double(0.15));
  employee=(Employee)department.getStaff().get(2);
  checkEmployee(employee,"String_Node_Str",new Integer(30),new Double(1700.0),new Double(0.20));
  employee=(Employee)department.getStaff().get(3);
  checkEmployee(employee,"String_Node_Str",new Integer(28),new Double(1600.0),new Double(0.20));
}

Fixed version (ground truth):
public void testRead() throws IOException {
  InputStream inputXLS=new BufferedInputStream(getClass().getResourceAsStream(departmentDataXLS));
  POIFSFileSystem fsInput=new POIFSFileSystem(inputXLS);
  HSSFWorkbook hssfInputWorkbook=new HSSFWorkbook(fsInput);
  HSSFSheet sheet=hssfInputWorkbook.getSheetAt(0);
  List mappings=new ArrayList();
  Department department=new Department();
  Map beans=new HashMap();
  beans.put("String_Node_Str",department);
  mappings.add(new BeanCellMapping(7,(short)0,"String_Node_Str","String_Node_Str"));
  mappings.add(new BeanCellMapping(7,(short)1,"String_Node_Str","String_Node_Str"));
  mappings.add(new BeanCellMapping(7,(short)3,"String_Node_Str","String_Node_Str"));
  mappings.add(new BeanCellMapping(7,(short)4,"String_Node_Str","String_Node_Str"));
  XLSBlockReader reader=new SimpleBlockReaderImpl(7,7,mappings);
  XLSRowCursor cursor=new XLSRowCursorImpl(sheet);
  XLSLoopBlockReader forEachReader=new XLSForEachBlockReaderImpl(7,7,"String_Node_Str","String_Node_Str",Employee.class);
  forEachReader.addBlockReader(reader);
  SectionCheck loopBreakCheck=getLoopBreakCheck();
  forEachReader.setLoopBreakCondition(loopBreakCheck);
  cursor.setCurrentRowNum(7);
  forEachReader.read(cursor,beans);
  assertEquals(4,department.getStaff().size());
  Employee employee=(Employee)department.getStaff().get(0);
  checkEmployee(employee,"String_Node_Str",new Integer(32),new Double(2000.0),new Double(0.20));
  employee=(Employee)department.getStaff().get(1);
  checkEmployee(employee,"String_Node_Str",new Integer(29),new Double(1800.0),new Double(0.15));
  employee=(Employee)department.getStaff().get(2);
  checkEmployee(employee,"String_Node_Str",new Integer(30),new Double(1700.0),new Double(0.20));
  employee=(Employee)department.getStaff().get(3);
  checkEmployee(employee,"String_Node_Str",new Integer(28),new Double(1600.0),new Double(0.20));
}