Program: 86765
Project: 86765
Buggy source:
/** 
 * Sets the passed cell to the passed value
 * @param cell the cell to set
 * @param cellValue the value to set the cell to
 */
public static void setCellContents(Cell cell,Object cellValue){
  Workbook wb=cell.getSheet().getWorkbook();
  if (cellValue == null) {
    cellValue="String_Node_Str";
  }
  if (!cellHasValueSet(cell) || !cellValue.equals(getCellContents(cell))) {
    if (cellValue instanceof Number) {
      cell.setCellValue(((Number)cellValue).doubleValue());
      return;
    }
    if (cellValue instanceof Date) {
      cell.setCellValue(((Date)cellValue));
      return;
    }
    String cellValueString=ObjectUtil.format(cellValue);
    try {
      if (cell.getCellType() == Cell.CELL_TYPE_BOOLEAN) {
        cell.setCellValue(Boolean.valueOf(cellValueString));
        return;
      }
      if (cell.getCellType() == Cell.CELL_TYPE_FORMULA) {
        cell.setCellFormula(cellValueString);
        return;
      }
      if (cell.getCellType() == Cell.CELL_TYPE_NUMERIC) {
        cell.setCellValue(Double.parseDouble(cellValueString));
        return;
      }
    }
 catch (    Exception e) {
    }
    try {
      cell.setCellValue(wb.getCreationHelper().createRichTextString(Integer.toString(Integer.parseInt(cellValueString))));
      return;
    }
 catch (    Exception e) {
    }
    try {
      cell.setCellValue(wb.getCreationHelper().createRichTextString(Double.toString(Double.parseDouble(cellValueString))));
      return;
    }
 catch (    Exception e) {
    }
    cell.setCellValue(wb.getCreationHelper().createRichTextString(cellValueString));
    return;
  }
  return;
}

Fixed version (ground truth):
/** 
 * Sets the passed cell to the passed value
 * @param cell the cell to set
 * @param cellValue the value to set the cell to
 */
public static void setCellContents(Cell cell,Object cellValue){
  Workbook wb=cell.getSheet().getWorkbook();
  if (cellValue == null) {
    cellValue="String_Node_Str";
  }
  if (!cellHasValueSet(cell) || !cellValue.equals(getCellContents(cell))) {
    if (cellValue instanceof Number) {
      cell.setCellValue(((Number)cellValue).doubleValue());
      return;
    }
    if (cellValue instanceof Date) {
      cell.setCellValue(((Date)cellValue));
      return;
    }
    String cellValueString=ObjectUtil.format(cellValue);
    try {
      if (cell.getCellType() == Cell.CELL_TYPE_BOOLEAN) {
        cell.setCellValue(Boolean.valueOf(cellValueString));
        return;
      }
      if (cell.getCellType() == Cell.CELL_TYPE_FORMULA) {
        cell.setCellFormula(cellValueString);
        return;
      }
      if (cell.getCellType() == Cell.CELL_TYPE_NUMERIC) {
        cell.setCellValue(Double.parseDouble(cellValueString));
        return;
      }
    }
 catch (    Exception e) {
    }
    if (!cellValueString.matches("String_Node_Str")) {
      try {
        cell.setCellValue(wb.getCreationHelper().createRichTextString(Integer.toString(Integer.parseInt(cellValueString))));
        return;
      }
 catch (      Exception e) {
      }
      try {
        cell.setCellValue(wb.getCreationHelper().createRichTextString(Double.toString(Double.parseDouble(cellValueString))));
        return;
      }
 catch (      Exception e) {
      }
    }
    cell.setCellValue(wb.getCreationHelper().createRichTextString(cellValueString));
    return;
  }
  return;
}