Program: 38098
Project: 38098
Buggy source:
@SuppressWarnings({"String_Node_Str","String_Node_Str"}) public static <T>Workbook write(List<T> list) throws Exception {
  if (ListUtils.isEmpty(list)) {
  }
  Workbook wb=new SXSSFWorkbook();
  Sheet sheet=wb.createSheet();
  Row row=sheet.createRow(0);
  Cell cell=null;
  Class clazz=list.get(0).getClass();
  List<Field> fields=ReflectUtils.getFields(clazz,true);
  Excel excel=null;
  int columnIndex=0;
  CellStyle cs=null;
  Font font=null;
  Map<String,Class<? extends ExcelFormatter>> formatter=new TreeMap<String,Class<? extends ExcelFormatter>>();
  for (  Field field : fields) {
    excel=field.getAnnotation(Excel.class);
    if (excel == null || excel.skip() == true) {
      continue;
    }
    formatter.put("String_Node_Str" + StringUtils.firstCharToUpperCase(field.getName()),excel.formatter());
    cell=row.createCell(columnIndex);
    cs=wb.createCellStyle();
    cs.setBorderBottom(HSSFCellStyle.BORDER_THIN);
    cs.setBorderLeft(HSSFCellStyle.BORDER_THIN);
    cs.setBorderTop(HSSFCellStyle.BORDER_THIN);
    cs.setBorderRight(HSSFCellStyle.BORDER_THIN);
    cs.setFillPattern(CellStyle.SOLID_FOREGROUND);
    cs.setFillForegroundColor(excel.bgColor().getIndex());
    font=wb.createFont();
    font.setColor(excel.fontColor().getIndex());
    font.setBoldweight(excel.boldFont() ? Font.BOLDWEIGHT_BOLD : Font.BOLDWEIGHT_NORMAL);
    cs.setFont(font);
    cell.setCellStyle(cs);
    cell.setCellValue(excel.value());
    columnIndex++;
  }
  int rowIndex=1;
  Object value=null;
  for (  T t : list) {
    row=sheet.createRow(rowIndex);
    columnIndex=0;
    for (    String method : formatter.keySet()) {
      cell=row.createCell(columnIndex);
      cs=wb.createCellStyle();
      cs.setWrapText(true);
      cs.setVerticalAlignment(XSSFCellStyle.VERTICAL_CENTER);
      cs.setBorderBottom(HSSFCellStyle.BORDER_THIN);
      cs.setBorderLeft(HSSFCellStyle.BORDER_THIN);
      cs.setBorderTop(HSSFCellStyle.BORDER_THIN);
      cs.setBorderRight(HSSFCellStyle.BORDER_THIN);
      cell.setCellStyle(cs);
      value=clazz.getMethod(method,null).invoke(t,null);
      cell.setCellValue(formatter.get(method).newInstance().format(value));
      columnIndex++;
    }
    rowIndex++;
  }
  columnIndex=0;
  for (  Field field : fields) {
    excel=field.getAnnotation(Excel.class);
    if (excel == null || excel.skip() == true) {
      continue;
    }
    if (excel.width() == -1) {
      sheet.autoSizeColumn(columnIndex,true);
    }
 else {
      sheet.setColumnWidth(columnIndex,excel.width() * 256);
    }
    columnIndex++;
  }
  return wb;
}

Fixed version (ground truth):
@SuppressWarnings({"String_Node_Str","String_Node_Str"}) public static <T>Workbook write(List<T> list) throws Exception {
  if (ListUtils.isEmpty(list)) {
  }
  Workbook wb=new SXSSFWorkbook();
  Sheet sheet=wb.createSheet();
  Row row=sheet.createRow(0);
  Cell cell=null;
  Class clazz=list.get(0).getClass();
  List<Field> fields=ReflectUtils.getFields(clazz,true);
  Excel excel=null;
  int columnIndex=0;
  CellStyle cs=null;
  Font font=null;
  Map<String,Class<? extends ExcelFormatter>> formatter=new TreeMap<String,Class<? extends ExcelFormatter>>();
  System.out.println(fields);
  for (  Field field : fields) {
    excel=field.getAnnotation(Excel.class);
    if (excel == null || excel.skip() == true) {
      continue;
    }
    formatter.put("String_Node_Str" + StringUtils.firstCharToUpperCase(field.getName()),excel.formatter());
    cell=row.createCell(columnIndex);
    cs=wb.createCellStyle();
    cs.setBorderBottom(HSSFCellStyle.BORDER_THIN);
    cs.setBorderLeft(HSSFCellStyle.BORDER_THIN);
    cs.setBorderTop(HSSFCellStyle.BORDER_THIN);
    cs.setBorderRight(HSSFCellStyle.BORDER_THIN);
    cs.setFillPattern(CellStyle.SOLID_FOREGROUND);
    cs.setFillForegroundColor(excel.bgColor().getIndex());
    font=wb.createFont();
    font.setColor(excel.fontColor().getIndex());
    font.setBoldweight(excel.boldFont() ? Font.BOLDWEIGHT_BOLD : Font.BOLDWEIGHT_NORMAL);
    cs.setFont(font);
    cell.setCellStyle(cs);
    cell.setCellValue(excel.value());
    columnIndex++;
  }
  System.out.println(formatter);
  int rowIndex=1;
  Object value=null;
  String method="String_Node_Str";
  for (  T t : list) {
    row=sheet.createRow(rowIndex);
    columnIndex=0;
    for (    Field field : fields) {
      cell=row.createCell(columnIndex);
      cs=wb.createCellStyle();
      cs.setWrapText(true);
      cs.setVerticalAlignment(XSSFCellStyle.VERTICAL_CENTER);
      cs.setBorderBottom(HSSFCellStyle.BORDER_THIN);
      cs.setBorderLeft(HSSFCellStyle.BORDER_THIN);
      cs.setBorderTop(HSSFCellStyle.BORDER_THIN);
      cs.setBorderRight(HSSFCellStyle.BORDER_THIN);
      cell.setCellStyle(cs);
      method="String_Node_Str" + StringUtils.firstCharToUpperCase(field.getName());
      value=clazz.getMethod(method,null).invoke(t,null);
      cell.setCellValue(formatter.get(method).newInstance().format(value));
      columnIndex++;
    }
    rowIndex++;
  }
  columnIndex=0;
  for (  Field field : fields) {
    excel=field.getAnnotation(Excel.class);
    if (excel == null || excel.skip() == true) {
      continue;
    }
    if (excel.width() == -1) {
      sheet.autoSizeColumn(columnIndex,true);
    }
 else {
      sheet.setColumnWidth(columnIndex,excel.width() * 256);
    }
    columnIndex++;
  }
  return wb;
}