Program: 56481
Project: 56481
Buggy source:
/** 
 * Convert CellStyle into NCellStyle
 * @param poiCellStyle
 */
protected NCellStyle importCellStyle(CellStyle poiCellStyle){
  NCellStyle cellStyle=null;
  if ((cellStyle=importedStyle.get(poiCellStyle.getIndex())) == null) {
    cellStyle=book.createCellStyle(true);
    importedStyle.put(poiCellStyle.getIndex(),cellStyle);
    String dataFormat=null;
    if ((dataFormat=BuiltinFormats.getBuiltinFormat(poiCellStyle.getDataFormat())) == null) {
      dataFormat=poiCellStyle.getDataFormatString();
    }
    if (dataFormat == null) {
      dataFormat=NCellStyle.FORMAT_GENERAL;
    }
    cellStyle.setDataFormat(dataFormat);
    cellStyle.setWrapText(poiCellStyle.getWrapText());
    cellStyle.setLocked(poiCellStyle.getLocked());
    cellStyle.setAlignment(convertAlignment(poiCellStyle.getAlignment()));
    cellStyle.setVerticalAlignment(convertVerticalAlignment(poiCellStyle.getVerticalAlignment()));
    cellStyle.setFillColor(book.createColor(BookHelper.colorToBackgroundHTML(workbook,poiCellStyle.getFillForegroundColorColor())));
    cellStyle.setBorderLeft(convertBorderType(poiCellStyle.getBorderLeft()));
    cellStyle.setBorderTop(convertBorderType(poiCellStyle.getBorderTop()));
    cellStyle.setBorderRight(convertBorderType(poiCellStyle.getBorderRight()));
    cellStyle.setBorderBottom(convertBorderType(poiCellStyle.getBorderBottom()));
    cellStyle.setBorderLeftColor(book.createColor(BookHelper.colorToBorderHTML(workbook,poiCellStyle.getLeftBorderColorColor())));
    cellStyle.setBorderTopColor(book.createColor(BookHelper.colorToBorderHTML(workbook,poiCellStyle.getTopBorderColorColor())));
    cellStyle.setBorderRightColor(book.createColor(BookHelper.colorToBorderHTML(workbook,poiCellStyle.getRightBorderColorColor())));
    cellStyle.setBorderBottomColor(book.createColor(BookHelper.colorToBorderHTML(workbook,poiCellStyle.getBottomBorderColorColor())));
    cellStyle.setHidden(poiCellStyle.getHidden());
    cellStyle.setFillPattern(convertPoiFillPattern(poiCellStyle.getFillPattern()));
    cellStyle.setFont(importFont(poiCellStyle));
  }
  return cellStyle;
}

Fixed version (ground truth):
/** 
 * Convert CellStyle into NCellStyle
 * @param poiCellStyle
 */
protected NCellStyle importCellStyle(CellStyle poiCellStyle){
  NCellStyle cellStyle=null;
  short idx=poiCellStyle.getIndex();
  if ((cellStyle=importedStyle.get(idx)) == null) {
    cellStyle=book.createCellStyle(true);
    importedStyle.put(idx,cellStyle);
    String dataFormat=poiCellStyle.getRawDataFormatString();
    if (dataFormat == null) {
      dataFormat=NCellStyle.FORMAT_GENERAL;
    }
    cellStyle.setDataFormat(dataFormat);
    cellStyle.setWrapText(poiCellStyle.getWrapText());
    cellStyle.setLocked(poiCellStyle.getLocked());
    cellStyle.setAlignment(convertAlignment(poiCellStyle.getAlignment()));
    cellStyle.setVerticalAlignment(convertVerticalAlignment(poiCellStyle.getVerticalAlignment()));
    cellStyle.setFillColor(book.createColor(BookHelper.colorToBackgroundHTML(workbook,poiCellStyle.getFillForegroundColorColor())));
    cellStyle.setBorderLeft(convertBorderType(poiCellStyle.getBorderLeft()));
    cellStyle.setBorderTop(convertBorderType(poiCellStyle.getBorderTop()));
    cellStyle.setBorderRight(convertBorderType(poiCellStyle.getBorderRight()));
    cellStyle.setBorderBottom(convertBorderType(poiCellStyle.getBorderBottom()));
    cellStyle.setBorderLeftColor(book.createColor(BookHelper.colorToBorderHTML(workbook,poiCellStyle.getLeftBorderColorColor())));
    cellStyle.setBorderTopColor(book.createColor(BookHelper.colorToBorderHTML(workbook,poiCellStyle.getTopBorderColorColor())));
    cellStyle.setBorderRightColor(book.createColor(BookHelper.colorToBorderHTML(workbook,poiCellStyle.getRightBorderColorColor())));
    cellStyle.setBorderBottomColor(book.createColor(BookHelper.colorToBorderHTML(workbook,poiCellStyle.getBottomBorderColorColor())));
    cellStyle.setHidden(poiCellStyle.getHidden());
    cellStyle.setFillPattern(convertPoiFillPattern(poiCellStyle.getFillPattern()));
    cellStyle.setFont(importFont(poiCellStyle));
  }
  return cellStyle;
}