Buggy code:
public class XlsxTasksGenerator implements FileGenerator { private static final int STATUS_COLUMN_INDEX = 0 ; private static final int COMPONENT_COLUMN_INDEX = 1 ; private static final int LINE_COLUMN_INDEX = 2 ; private static final int MESSAGE_COLUMN_INDEX = 3 ; private static final int AUTHOR_COLUMN_INDEX = 4 ; private static final int ASSIGNED_COLUMN_INDEX = 5 ; private static final int CREATION_DATE_COLUMN_INDEX = 6 ; private static final int UPDATE_DATE_COLUMN_INDEX = 7 ; private static final int COMPONENT_PATH_COLUMN_INDEX = 8 ; @ Override public File generateFile ( Project sonarProject , FileSystem sonarFileSystem , String sonarUrl , String sonarLogin , String sonarPassword ) { short formatIndex ; HSSFDataFormat dataFormat = null ; FileOutputStream out = null ; HSSFWorkbook workbook = null ; String filePath = ( ( ( ( ( sonarFileSystem . workDir ( ) . getAbsolutePath ( ) ) + ( File . separator ) ) + "tasks_report_" ) + ( sonarProject . getEffectiveKey ( ) . replace ( ':' , '-' ) ) ) + "." ) + ( TasksReportKeys . TASKS_REPORT_TYPE_XLSX_EXTENSION ) ; File resultFile = new File ( filePath ) ; try { out = new FileOutputStream ( resultFile ) ; workbook = new HSSFWorkbook ( ) ; HSSFSheet sheet = workbook . createSheet ( "Tasks<seq2seq4repair_space>list" ) ; dataFormat = workbook . createDataFormat ( ) ; formatIndex = dataFormat . getFormat ( "yyyy-MM-ddTHH:mm:ss" ) ; HSSFCellStyle dateStyle = workbook . createCellStyle ( ) ; dateStyle . setDataFormat ( formatIndex ) ; Issues rootIssue = IssueGateway . getOpenIssues ( sonarProject . getEffectiveKey ( ) , sonarUrl , sonarLogin , sonarPassword ) ; if ( rootIssue == null ) { return null ; } DataValidationHelper validationHelper = new org . apache . poi . hssf . usermodel . HSSFDataValidationHelper ( sheet ) ; DataValidationConstraint constraint = validationHelper . createExplicitListConstraint ( new String [ ] { "OPENED" , "CONFIRMED" , "REOPENED" , "RESOLVED" , "CLOSE" } ) ; <START_BUG> CellRangeAddressList addressList = new CellRangeAddressList ( 1 , rootIssue . getIssues ( ) . size ( ) , XlsxTasksGenerator . STATUS_COLUMN_INDEX , XlsxTasksGenerator . STATUS_COLUMN_INDEX ) ; <END_BUG> DataValidation dataValidation = validationHelper . createValidation ( constraint , addressList ) ; dataValidation . setSuppressDropDownArrow ( false ) ; sheet . addValidationData ( dataValidation ) ; int rownum = 0 ; Row row = sheet . createRow ( ( rownum ++ ) ) ; row . createCell ( XlsxTasksGenerator . STATUS_COLUMN_INDEX ) . setCellValue ( "Status" ) ; row . createCell ( XlsxTasksGenerator . COMPONENT_COLUMN_INDEX ) . setCellValue ( "Component" ) ; row . createCell ( XlsxTasksGenerator . LINE_COLUMN_INDEX ) . setCellValue ( "Line" ) ; row . createCell ( XlsxTasksGenerator . MESSAGE_COLUMN_INDEX ) . setCellValue ( "Message" ) ; row . createCell ( XlsxTasksGenerator . AUTHOR_COLUMN_INDEX ) . setCellValue ( "Author" ) ; row . createCell ( XlsxTasksGenerator . ASSIGNED_COLUMN_INDEX ) . setCellValue ( "Assigned" ) ; row . createCell ( XlsxTasksGenerator . CREATION_DATE_COLUMN_INDEX ) . setCellValue ( "CreationDate" ) ; row . createCell ( XlsxTasksGenerator . UPDATE_DATE_COLUMN_INDEX ) . setCellValue ( "UpdateDate" ) ; row . createCell ( XlsxTasksGenerator . COMPONENT_PATH_COLUMN_INDEX ) . setCellValue ( "Path" ) ; for ( Issue issue : rootIssue . getIssues ( ) ) { row = sheet . createRow ( ( rownum ++ ) ) ; int componentIndex = issue . getComponent ( ) . lastIndexOf ( '//' ) ; String component ; String path ; if ( componentIndex > 0 ) { component = issue . getComponent ( ) . substring ( ( componentIndex + 1 ) ) ; path = issue . getComponent ( ) . substring ( 0 , componentIndex ) ; } else { component = issue . getComponent ( ) ; path = "" ; } row . createCell ( XlsxTasksGenerator . STATUS_COLUMN_INDEX ) . setCellValue ( issue . getStatus ( ) ) ; row . createCell ( XlsxTasksGenerator . COMPONENT_COLUMN_INDEX ) . setCellValue ( component ) ; row . createCell ( XlsxTasksGenerator . LINE_COLUMN_INDEX ) . setCellValue ( issue . getLine ( ) ) ; row . createCell ( XlsxTasksGenerator . MESSAGE_COLUMN_INDEX ) . setCellValue ( issue . getMessage ( ) ) ; row . createCell ( XlsxTasksGenerator . AUTHOR_COLUMN_INDEX ) . setCellValue ( issue . getAuthor ( ) ) ; row . createCell ( XlsxTasksGenerator . ASSIGNED_COLUMN_INDEX ) . setCellValue ( issue . getAssignee ( ) ) ; row . createCell ( XlsxTasksGenerator . CREATION_DATE_COLUMN_INDEX ) . setCellValue ( issue . getCreationDate ( ) ) ; row . createCell ( XlsxTasksGenerator . UPDATE_DATE_COLUMN_INDEX ) . setCellValue ( issue . getUpdateDate ( ) ) ; row . createCell ( XlsxTasksGenerator . COMPONENT_PATH_COLUMN_INDEX ) . setCellValue ( path ) ; row . getCell ( XlsxTasksGenerator . CREATION_DATE_COLUMN_INDEX ) . setCellStyle ( dateStyle ) ; row . getCell ( XlsxTasksGenerator . UPDATE_DATE_COLUMN_INDEX ) . setCellStyle ( dateStyle ) ; } sheet . autoSizeColumn ( XlsxTasksGenerator . STATUS_COLUMN_INDEX ) ; sheet . autoSizeColumn ( XlsxTasksGenerator . COMPONENT_COLUMN_INDEX ) ; sheet . autoSizeColumn ( XlsxTasksGenerator . LINE_COLUMN_INDEX ) ; sheet . autoSizeColumn ( XlsxTasksGenerator . MESSAGE_COLUMN_INDEX ) ; sheet . autoSizeColumn ( XlsxTasksGenerator . AUTHOR_COLUMN_INDEX ) ; sheet . autoSizeColumn ( XlsxTasksGenerator . ASSIGNED_COLUMN_INDEX ) ; sheet . autoSizeColumn ( XlsxTasksGenerator . CREATION_DATE_COLUMN_INDEX ) ; sheet . autoSizeColumn ( XlsxTasksGenerator . UPDATE_DATE_COLUMN_INDEX ) ; sheet . autoSizeColumn ( XlsxTasksGenerator . COMPONENT_PATH_COLUMN_INDEX ) ; workbook . write ( out ) ; } catch ( FileNotFoundException e ) { e . printStackTrace ( ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } finally { IOUtils . closeQuietly ( workbook ) ; IOUtils . closeQuietly ( out ) ; } return resultFile ; } }

Fix:
CellRangeAddressList addressList = new CellRangeAddressList ( 1 , ( ( rootIssue . getIssues ( ) . size ( ) ) + 1 ) , XlsxTasksGenerator . STATUS_COLUMN_INDEX , XlsxTasksGenerator . STATUS_COLUMN_INDEX ) ;