Program: 81474
Project: 81474
Buggy source:
private List parseCells(Sheet sheet,org.apache.poi.ss.usermodel.Row hssfRow,int startCell,int endCell,Map beans){
  if (configuration.getRowKeyName() != null) {
    beans.put(configuration.getRowKeyName(),hssfRow);
  }
  List transformers=new ArrayList();
  RowTransformer rowTransformer=null;
  Row row=new Row(sheet,hssfRow);
  SimpleRowTransformer simpleRowTransformer=new SimpleRowTransformer(row,cellProcessors,configuration);
  boolean hasCollections=false;
  for (int j=startCell; j <= endCell; j++) {
    org.apache.poi.ss.usermodel.Cell hssfCell=hssfRow.getCell(j);
    CellParser cellParser=new CellParser(hssfCell,row,configuration);
    Cell cell=cellParser.parseCell(beans);
    if (cell.getTag() == null) {
      if (cell.getLabel() != null && cell.getLabel().length() > 0) {
        sheet.addNamedCell(cell.getLabel(),cell);
      }
      RowCollection rowCollection=row.addCell(cell);
      if (cell.getCollectionProperty() != null) {
        hasCollections=true;
        if (rowTransformer == null) {
          rowTransformer=new CollectionRowTransformer(row,fixedSizeCollections,cellProcessors,rowProcessors,configuration);
          transformers.add(rowTransformer);
        }
        ((CollectionRowTransformer)rowTransformer).addRowCollection(rowCollection);
        ListRange listRange=new ListRange(row.getPoiRow().getRowNum(),row.getPoiRow().getRowNum() + rowCollection.getCollectionProperty().getCollection().size() - 1,j);
        addListRange(sheet,cell.getCollectionProperty().getProperty(),listRange);
      }
 else {
        if (!cell.isEmpty()) {
          simpleRowTransformer.addCell(cell);
        }
      }
    }
 else {
      rowTransformer=new TagRowTransformer(row,cell);
      Block tagBody=cell.getTag().getTagContext().getTagBody();
      j+=tagBody.getNumberOfColumns() - 1;
      transformers.add(rowTransformer);
    }
  }
  if (!hasCollections && simpleRowTransformer.getCells().size() > 0) {
    transformers.add(simpleRowTransformer);
  }
  for (int i=0; i < row.getCells().size(); i++) {
    Cell cell=(Cell)row.getCells().get(i);
    if (cell.getTag() == null) {
      if (cell.getRowCollection() == null && cell.getCollectionName() != null) {
        RowCollection rowCollection=row.getRowCollectionByCollectionName(cell.getCollectionName());
        if (rowCollection != null) {
          rowCollection.addCell(cell);
        }
 else {
          log.debug("String_Node_Str" + cell.getCollectionName() + "String_Node_Str");
        }
      }
 else {
        if (cell.isEmpty() && cell.getRowCollection() == null && cell.getMergedRegion() == null && row.getRowCollections().size() == 1) {
          ((RowCollection)row.getRowCollections().get(0)).addCell(cell);
        }
      }
      if (cell.isFormula()) {
        if (cell.getFormula().isInline() && cell.getLabel() != null && cell.getLabel().length() > 0) {
          ListRange listRange=new ListRange(row.getPoiRow().getRowNum(),row.getPoiRow().getRowNum() + cell.getRowCollection().getCollectionProperty().getCollection().size() - 1,cell.getPoiCell().getColumnIndex());
          addListRange(sheet,cell.getLabel(),listRange);
        }
      }
    }
  }
  return transformers;
}

Fixed version (ground truth):
private List parseCells(Sheet sheet,org.apache.poi.ss.usermodel.Row hssfRow,int startCell,int endCell,Map beans){
  if (configuration.getRowKeyName() != null) {
    beans.put(configuration.getRowKeyName(),hssfRow);
  }
  List transformers=new ArrayList();
  RowTransformer rowTransformer=null;
  Row row=new Row(sheet,hssfRow);
  SimpleRowTransformer simpleRowTransformer=new SimpleRowTransformer(row,cellProcessors,configuration);
  boolean hasCollections=false;
  for (int j=startCell; j <= endCell && j > -1; j++) {
    org.apache.poi.ss.usermodel.Cell hssfCell=hssfRow.getCell(j);
    CellParser cellParser=new CellParser(hssfCell,row,configuration);
    Cell cell=cellParser.parseCell(beans);
    if (cell.getTag() == null) {
      if (cell.getLabel() != null && cell.getLabel().length() > 0) {
        sheet.addNamedCell(cell.getLabel(),cell);
      }
      RowCollection rowCollection=row.addCell(cell);
      if (cell.getCollectionProperty() != null) {
        hasCollections=true;
        if (rowTransformer == null) {
          rowTransformer=new CollectionRowTransformer(row,fixedSizeCollections,cellProcessors,rowProcessors,configuration);
          transformers.add(rowTransformer);
        }
        ((CollectionRowTransformer)rowTransformer).addRowCollection(rowCollection);
        ListRange listRange=new ListRange(row.getPoiRow().getRowNum(),row.getPoiRow().getRowNum() + rowCollection.getCollectionProperty().getCollection().size() - 1,j);
        addListRange(sheet,cell.getCollectionProperty().getProperty(),listRange);
      }
 else {
        if (!cell.isEmpty()) {
          simpleRowTransformer.addCell(cell);
        }
      }
    }
 else {
      rowTransformer=new TagRowTransformer(row,cell);
      Block tagBody=cell.getTag().getTagContext().getTagBody();
      j+=tagBody.getNumberOfColumns() - 1;
      transformers.add(rowTransformer);
    }
  }
  if (!hasCollections && simpleRowTransformer.getCells().size() > 0) {
    transformers.add(simpleRowTransformer);
  }
  for (int i=0; i < row.getCells().size(); i++) {
    Cell cell=(Cell)row.getCells().get(i);
    if (cell.getTag() == null) {
      if (cell.getRowCollection() == null && cell.getCollectionName() != null) {
        RowCollection rowCollection=row.getRowCollectionByCollectionName(cell.getCollectionName());
        if (rowCollection != null) {
          rowCollection.addCell(cell);
        }
 else {
          log.debug("String_Node_Str" + cell.getCollectionName() + "String_Node_Str");
        }
      }
 else {
        if (cell.isEmpty() && cell.getRowCollection() == null && cell.getMergedRegion() == null && row.getRowCollections().size() == 1) {
          ((RowCollection)row.getRowCollections().get(0)).addCell(cell);
        }
      }
      if (cell.isFormula()) {
        if (cell.getFormula().isInline() && cell.getLabel() != null && cell.getLabel().length() > 0) {
          ListRange listRange=new ListRange(row.getPoiRow().getRowNum(),row.getPoiRow().getRowNum() + cell.getRowCollection().getCollectionProperty().getCollection().size() - 1,cell.getPoiCell().getColumnIndex());
          addListRange(sheet,cell.getLabel(),listRange);
        }
      }
    }
  }
  return transformers;
}