Buggy code:
} else { if ( ( DatParser . headerState ) > ( HeaderState . _06_BFC ) ) { result . add ( new ParsingResult ( I18n . DATPARSER_MisplacedBFC0 , ( "[H62]<seq2seq4repair_space>" + ( I18n . DATPARSER_HeaderHint ) ) , ResultType . HINT ) ) ; } DatParser . h . setLineBFC ( lineNumber ) ; DatParser . h . setHasBFC ( true ) ; DatParser . headerState = HeaderState . _07o_CATEGORY ; } break ; } } if ( ( DatParser . headerState ) == ( HeaderState . _07o_CATEGORY ) ) { if ( line . startsWith ( "0<seq2seq4repair_space>!CATEGORY<seq2seq4repair_space>" ) ) { DatParser . h . setHasCATEGORY ( true ) ; DatParser . headerState = HeaderState . _08o_KEYWORDS ; break ; } else { DatParser . headerState = HeaderState . _08o_KEYWORDS ; } } else { if ( line . startsWith ( "0<seq2seq4repair_space>!CATEGORY<seq2seq4repair_space>" ) ) { if ( DatParser . h . hasCATEGORY ( ) ) { result . add ( new ParsingResult ( I18n . DATPARSER_DuplicatedCategory , ( "[H71]<seq2seq4repair_space>" + ( I18n . DATPARSER_HeaderHint ) ) , ResultType . HINT ) ) ; } else { if ( ( DatParser . headerState ) > ( HeaderState . _07o_CATEGORY ) ) { result . add ( new ParsingResult ( I18n . DATPARSER_MisplacedCategory , ( "[H72]<seq2seq4repair_space>" + ( I18n . DATPARSER_HeaderHint ) ) , ResultType . HINT ) ) ; } DatParser . h . setHasCATEGORY ( true ) ; DatParser . headerState = HeaderState . _08o_KEYWORDS ; } break ; } } if ( ( DatParser . headerState ) == ( HeaderState . _08o_KEYWORDS ) ) { if ( line . startsWith ( "0<seq2seq4repair_space>!KEYWORDS<seq2seq4repair_space>" ) ) { DatParser . h . setHasHELP ( true ) ; DatParser . headerState = HeaderState . _08o_KEYWORDS ; break ; } else { DatParser . headerState = HeaderState . _09o_CMDLINE ; } } else { if ( line . startsWith ( "0<seq2seq4repair_space>!KEYWORDS<seq2seq4repair_space>" ) ) { if ( DatParser . h . hasKEYWORDS ( ) ) { result . add ( new ParsingResult ( I18n . DATPARSER_SplitKeyword , ( "[H81]<seq2seq4repair_space>" + ( I18n . DATPARSER_HeaderHint ) ) , ResultType . HINT ) ) ; } else { if ( ( DatParser . headerState ) > ( HeaderState . _08o_KEYWORDS ) ) { result . add ( new ParsingResult ( I18n . DATPARSER_MisplacedKeyword , ( "[H82]<seq2seq4repair_space>" + ( I18n . DATPARSER_HeaderHint ) ) , ResultType . HINT ) ) ; } DatParser . h . setHasKEYWORDS ( true ) ; DatParser . headerState = HeaderState . _08o_KEYWORDS ; } break ; } } if ( ( DatParser . headerState ) == ( HeaderState . _09o_CMDLINE ) ) { if ( line . startsWith ( "0<seq2seq4repair_space>!CMDLINE<seq2seq4repair_space>" ) ) { DatParser . h . setHasCMDLINE ( true ) ; DatParser . headerState = HeaderState . _10o_HISTORY ; break ; } else { DatParser . headerState = HeaderState . _10o_HISTORY ; } } else { if ( line . startsWith ( "0<seq2seq4repair_space>!CMDLINE<seq2seq4repair_space>" ) ) { if ( DatParser . h . hasCMDLINE ( ) ) { result . add ( new ParsingResult ( I18n . DATPARSER_DuplicatedCommandLine , ( "[H91]<seq2seq4repair_space>" + ( I18n . DATPARSER_HeaderHint ) ) , ResultType . HINT ) ) ; } else { if ( ( DatParser . headerState ) > ( HeaderState . _09o_CMDLINE ) ) { result . add ( new ParsingResult ( I18n . DATPARSER_MisplacedCommandLine , ( "[H92]<seq2seq4repair_space>" + ( I18n . DATPARSER_HeaderHint ) ) , ResultType . HINT ) ) ; } DatParser . h . setHasCMDLINE ( true ) ; DatParser . headerState = HeaderState . _10o_HISTORY ; } break ; } } if ( ( DatParser . headerState ) == ( HeaderState . _10o_HISTORY ) ) { <START_BUG> if ( line . startsWith ( "0<seq2seq4repair_space>!HISTORY<seq2seq4repair_space>" ) ) { <END_BUG> if ( DatParser . h . hasHISTORY ( ) ) { final String lh = DatParser . h . getLastHistoryEntry ( ) ; if ( ( lh != null ) && ( ( line . substring ( 0 , "0<seq2seq4repair_space>!HISTORY<seq2seq4repair_space>YYYY-MM-DD" . length ( ) ) . compareTo ( lh ) ) == ( - 1 ) ) ) { result . add ( new ParsingResult ( I18n . DATPARSER_HistoryWrongOrder , ( "[HA3]<seq2seq4repair_space>" + ( I18n . DATPARSER_HeaderHint ) ) , ResultType . HINT ) ) ; } } else { DatParser . h . setLastHistoryEntry ( line . substring ( 0 , "0<seq2seq4repair_space>!HISTORY<seq2seq4repair_space>YYYY-MM-DD" . length ( ) ) ) ; } DatParser . h . setHasHISTORY ( true ) ; DatParser . headerState = HeaderState . _10o_HISTORY ; break ; } else { DatParser . headerState = HeaderState . _11o_COMMENT ; } } else { if ( line . startsWith ( "0<seq2seq4repair_space>!HISTORY<seq2seq4repair_space>" ) ) { if ( DatParser . h . hasHISTORY ( ) ) { result . add ( new ParsingResult ( I18n . DATPARSER_SplitHistory , ( "[HA1]<seq2seq4repair_space>" + ( I18n . DATPARSER_HeaderHint ) ) , ResultType . HINT ) ) ; } else { if ( ( DatParser . headerState ) > ( HeaderState . _10o_HISTORY ) ) { result . add ( new ParsingResult ( I18n . DATPARSER_MisplacedHistory , ( "[HA2]<seq2seq4repair_space>" + ( I18n . DATPARSER_HeaderHint ) ) , ResultType . HINT ) ) ; } DatParser . h . setHasHISTORY ( true ) ; DatParser . headerState = HeaderState . _10o_HISTORY ; } break ; } } if ( ( DatParser . headerState ) == ( HeaderState . _11o_COMMENT ) ) { if ( line . startsWith ( "0<seq2seq4repair_space>////<seq2seq4repair_space>" ) ) { DatParser . h . setHasCOMMENT ( true ) ; DatParser . headerState = HeaderState . _11o_COMMENT ; break ; } else { DatParser . headerState = HeaderState . _12o_BFC2 ; } } else { if ( line . startsWith ( "0<seq2seq4repair_space>////<seq2seq4repair_space>" ) ) { if ( DatParser . h . hasCOMMENT ( ) ) { result . add ( new ParsingResult ( I18n . DATPARSER_SplitCommment , ( "[HB1]<seq2seq4repair_space>" + ( I18n . DATPARSER_HeaderHint ) ) , ResultType . HINT ) ) ;

Fix:
if ( ( line . startsWith ( "0<seq2seq4repair_space>!HISTORY<seq2seq4repair_space>" ) ) && ( ( line . length ( ) ) > 20 ) ) {