Buggy code:
@ WebServlet ( "//report//FinalComputedScores" ) public final class FinalComputedScores extends BaseFLLServlet { private static final Logger LOGGER = LogUtils . getLogger ( ) ; @ Override protected void processRequest ( final HttpServletRequest request , final HttpServletResponse response , final ServletContext application , final HttpSession session ) throws IOException , ServletException { } @ SuppressFBWarnings ( value = { "SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING" } , justification = "Winner<seq2seq4repair_space>criteria<seq2seq4repair_space>determines<seq2seq4repair_space>the<seq2seq4repair_space>sort" ) private Set < Integer > determineTeamsMeetingPerformanceHurdle ( final double performanceHurdle , final Connection connection , final int tournament , final WinnerType winnerCriteria ) throws SQLException { } private static final Font ARIAL_8PT_BOLD = FontFactory . getFont ( HELVETICA , 8 , BOLD ) ; private static final Font ARIAL_8PT_NORMAL = FontFactory . getFont ( HELVETICA , 8 , NORMAL ) ; private static final Font ARIAL_8PT_NORMAL_RED = FontFactory . getFont ( HELVETICA , 8 , NORMAL , RED ) ; private static final Font TIMES_12PT_NORMAL = FontFactory . getFont ( TIMES , 12 , NORMAL ) ; private void generateReport ( final Connection connection , final OutputStream out , final ChallengeDescription challengeDescription , final String challengeTitle , final Tournament tournament , final SimpleFooterHandler pageHandler , final Set < Integer > bestTeams ) throws IOException , SQLException { if ( ( tournament . getTournamentID ( ) ) != ( Queries . getCurrentTournament ( connection ) ) ) { throw new FLLRuntimeException ( "Cannot<seq2seq4repair_space>generate<seq2seq4repair_space>final<seq2seq4repair_space>score<seq2seq4repair_space>report<seq2seq4repair_space>for<seq2seq4repair_space>a<seq2seq4repair_space>tournament<seq2seq4repair_space>other<seq2seq4repair_space>than<seq2seq4repair_space>the<seq2seq4repair_space>current<seq2seq4repair_space>tournament" ) ; } final WinnerType winnerCriteria = challengeDescription . getWinner ( ) ; final TournamentSchedule schedule ; if ( TournamentSchedule . scheduleExistsInDatabase ( connection , tournament . getTournamentID ( ) ) ) { if ( FinalComputedScores . LOGGER . isTraceEnabled ( ) ) { FinalComputedScores . LOGGER . trace ( ( "Found<seq2seq4repair_space>a<seq2seq4repair_space>schedule<seq2seq4repair_space>for<seq2seq4repair_space>tournament:<seq2seq4repair_space>" + tournament ) ) ; } schedule = new TournamentSchedule ( connection , tournament . getTournamentID ( ) ) ; } else { schedule = null ; } try { <START_BUG> final Document pdfDoc = PdfUtils . createPdfDoc ( out , pageHandler ) ; <END_BUG> final List < ScoreCategory > subjectiveCategories = challengeDescription . getSubjectiveCategories ( ) ; final Iterator < String > divisionIter = Queries . getEventDivisions ( connection ) . iterator ( ) ; while ( divisionIter . hasNext ( ) ) { final String division = divisionIter . next ( ) ; final double [ ] weights = new double [ subjectiveCategories . size ( ) ] ; final ScoreCategory [ ] catElements = new ScoreCategory [ subjectiveCategories . size ( ) ] ; int nonZeroWeights = 0 ; for ( int cat = 0 ; cat < ( subjectiveCategories . size ( ) ) ; cat ++ ) { catElements [ cat ] = subjectiveCategories . get ( cat ) ; weights [ cat ] = catElements [ cat ] . getWeight ( ) ; if ( ( weights [ cat ] ) > 0.0 ) { nonZeroWeights ++ ; } } final int numColumnsLeftOfSubjective ; if ( null == schedule ) { numColumnsLeftOfSubjective = 2 ; } else { numColumnsLeftOfSubjective = 3 ; } final int numColumnsRightOfSubjective = 2 ; final float [ ] relativeWidths = new float [ ( numColumnsLeftOfSubjective + nonZeroWeights ) + numColumnsRightOfSubjective ] ; relativeWidths [ 0 ] = 3.0F ; if ( null != schedule ) { relativeWidths [ 1 ] = 1.0F ; relativeWidths [ 2 ] = 1.0F ; } else { relativeWidths [ 1 ] = 1.0F ; } relativeWidths [ ( ( relativeWidths . length ) - numColumnsRightOfSubjective ) ] = 1.5F ; relativeWidths [ ( ( ( relativeWidths . length ) - numColumnsRightOfSubjective ) + 1 ) ] = 1.5F ; for ( int i = numColumnsLeftOfSubjective ; i < ( numColumnsLeftOfSubjective + nonZeroWeights ) ; i ++ ) { relativeWidths [ i ] = 1.5F ; } final PdfPTable divTable = new PdfPTable ( relativeWidths ) ; divTable . getDefaultCell ( ) . setBorder ( 0 ) ; divTable . setWidthPercentage ( 100 ) ; final PdfPTable header = createHeader ( challengeTitle , tournament . getName ( ) , division ) ; final PdfPCell headerCell = new PdfPCell ( header ) ; headerCell . setColspan ( relativeWidths . length ) ; divTable . addCell ( headerCell ) ; if ( FinalComputedScores . LOGGER . isTraceEnabled ( ) ) { FinalComputedScores . LOGGER . trace ( ( "num<seq2seq4repair_space>relative<seq2seq4repair_space>widths:<seq2seq4repair_space>" + ( relativeWidths . length ) ) ) ; for ( int i = 0 ; i < ( relativeWidths . length ) ; ++ i ) { FinalComputedScores . LOGGER . trace ( ( ( ( "\twidth[" + i ) + "]<seq2seq4repair_space>=<seq2seq4repair_space>" ) + ( relativeWidths [ i ] ) ) ) ; } } writeColumnHeaders ( schedule , weights , catElements , relativeWidths , challengeDescription , subjectiveCategories , divTable ) ; writeScores ( connection , catElements , weights , relativeWidths , division , winnerCriteria , tournament , schedule , subjectiveCategories , divTable , bestTeams ) ; pdfDoc . add ( divTable ) ; if ( divisionIter . hasNext ( ) ) { pdfDoc . newPage ( ) ; } } pdfDoc . close ( ) ; } catch ( final ParseException pe ) { throw new RuntimeException ( "Error<seq2seq4repair_space>parsing<seq2seq4repair_space>category<seq2seq4repair_space>weight!" , pe ) ; } catch ( final DocumentException de ) { throw new RuntimeException ( "Error<seq2seq4repair_space>creating<seq2seq4repair_space>PDF<seq2seq4repair_space>document!" , de ) ; } } @ SuppressFBWarnings ( value = { "SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING" } , justification = "Category<seq2seq4repair_space>name<seq2seq4repair_space>determines<seq2seq4repair_space>table<seq2seq4repair_space>name" ) private void writeScores ( final Connection connection , final ScoreCategory [ ] catElements , final double [ ] weights , final float [ ] relativeWidths , final String division , final WinnerType winnerCriteria , final Tournament tournament , final TournamentSchedule schedule , final List < ScoreCategory > subjectiveCategories , final PdfPTable divTable , final Set < Integer > bestTeams ) throws SQLException { } private void writeColumnHeaders ( final TournamentSchedule schedule , final double [ ] weights , final ScoreCategory [ ] catElements , final float [ ] relativeWidths , final ChallengeDescription challengeDescription , final List < ScoreCategory > subjectiveCategories , final PdfPTable divTable ) throws ParseException { }

Fix:
final Document pdfDoc = PdfUtils . createPortraitPdfDoc ( out , pageHandler ) ;