Buggy code:
public class JJParserDateTimeTest { JJParser parser ; @ Before public void setUp ( ) throws Exception { } @ Test public void testHour ( ) { } @ Test public void testInvalidHour ( ) { } @ Test public void testHourMinute ( ) { } @ Test public void testTodayTomorrow ( ) { } @ Test public void testDateDayOfWeek ( ) { Command result = parser . parse ( "Submit<seq2seq4repair_space>assignment<seq2seq4repair_space>2<seq2seq4repair_space>by<seq2seq4repair_space>Sunday" ) ; assertEquals ( true , ( result instanceof AddCommand ) ) ; AddCommand casted = ( ( AddCommand ) ( result ) ) ; TaskEvent taskEvent = casted . getTaskEvent ( ) ; assertTrue ( ( taskEvent instanceof DeadlineTask ) ) ; DeadlineTask deadlineTask = ( ( DeadlineTask ) ( taskEvent ) ) ; assertEquals ( "Submit<seq2seq4repair_space>assignment<seq2seq4repair_space>2" , deadlineTask . getName ( ) ) ; LocalDateTime now = LocalDateTime . now ( ) ; LocalDateTime resultDateTime = deadlineTask . getDateTime ( ) ; assertEquals ( DayOfWeek . SUNDAY , resultDateTime . getDayOfWeek ( ) ) ; assertEquals ( true , resultDateTime . isAfter ( now ) ) ; assertTrue ( resultDateTime . toLocalDate ( ) . minusDays ( 8 ) . isBefore ( now . toLocalDate ( ) ) ) ; assertEquals ( LocalTime . MAX , resultDateTime . toLocalTime ( ) ) ; result = parser . parse ( "Submit<seq2seq4repair_space>assignment<seq2seq4repair_space>2<seq2seq4repair_space>by<seq2seq4repair_space>THIS<seq2seq4repair_space>mon" ) ; assertEquals ( true , ( result instanceof AddCommand ) ) ; casted = ( ( AddCommand ) ( result ) ) ; taskEvent = casted . getTaskEvent ( ) ; assertTrue ( ( taskEvent instanceof DeadlineTask ) ) ; deadlineTask = ( ( DeadlineTask ) ( taskEvent ) ) ; assertEquals ( "Submit<seq2seq4repair_space>assignment<seq2seq4repair_space>2" , deadlineTask . getName ( ) ) ; resultDateTime = deadlineTask . getDateTime ( ) ; assertEquals ( DayOfWeek . MONDAY , resultDateTime . getDayOfWeek ( ) ) ; assertEquals ( true , resultDateTime . isAfter ( now ) ) ; assertTrue ( resultDateTime . toLocalDate ( ) . minusDays ( 8 ) . isBefore ( now . toLocalDate ( ) ) ) ; assertEquals ( LocalTime . MAX , resultDateTime . toLocalTime ( ) ) ; result = parser . parse ( "Submit<seq2seq4repair_space>assignment<seq2seq4repair_space>2<seq2seq4repair_space>by<seq2seq4repair_space>next<seq2seq4repair_space>mon" ) ; assertEquals ( true , ( result instanceof AddCommand ) ) ; casted = ( ( AddCommand ) ( result ) ) ; taskEvent = casted . getTaskEvent ( ) ; assertTrue ( ( taskEvent instanceof DeadlineTask ) ) ; deadlineTask = ( ( DeadlineTask ) ( taskEvent ) ) ; assertEquals ( "Submit<seq2seq4repair_space>assignment<seq2seq4repair_space>2" , deadlineTask . getName ( ) ) ; resultDateTime = deadlineTask . getDateTime ( ) ; assertEquals ( DayOfWeek . MONDAY , resultDateTime . getDayOfWeek ( ) ) ; assertEquals ( true , resultDateTime . isAfter ( now ) ) ; assertEquals ( true , resultDateTime . toLocalDate ( ) . minusDays ( 8 ) . isBefore ( now . toLocalDate ( ) ) ) ; assertEquals ( LocalTime . MAX , resultDateTime . toLocalTime ( ) ) ; result = parser . parse ( "Submit<seq2seq4repair_space>assignment<seq2seq4repair_space>2<seq2seq4repair_space>by<seq2seq4repair_space>next<seq2seq4repair_space>SUNDAy" ) ; assertEquals ( true , ( result instanceof AddCommand ) ) ; casted = ( ( AddCommand ) ( result ) ) ; taskEvent = casted . getTaskEvent ( ) ; assertTrue ( ( taskEvent instanceof DeadlineTask ) ) ; deadlineTask = ( ( DeadlineTask ) ( taskEvent ) ) ; assertEquals ( "Submit<seq2seq4repair_space>assignment<seq2seq4repair_space>2" , deadlineTask . getName ( ) ) ; resultDateTime = deadlineTask . getDateTime ( ) ; assertEquals ( DayOfWeek . SUNDAY , resultDateTime . getDayOfWeek ( ) ) ; <START_BUG> assertEquals ( true , resultDateTime . toLocalDate ( ) . minusDays ( 13 ) . isBefore ( now . toLocalDate ( ) ) ) ; <END_BUG> assertEquals ( true , resultDateTime . toLocalDate ( ) . minusDays ( 6 ) . isAfter ( now . toLocalDate ( ) ) ) ; assertEquals ( LocalTime . MAX , resultDateTime . toLocalTime ( ) ) ; } @ Test public void testFullDate ( ) { } @ Test public void testInvalidFullDate ( ) { } @ Test public void testDayMonth ( ) { } @ Test public void testDateAndTime ( ) { } @ Test public void test12HourFormat ( ) { } @ Test public void testInvalid12HourFormat ( ) { } @ Test public void test12HourFormatWithoutSpace ( ) { } @ Test public void testFullDateMonthWord ( ) { } @ Test public void testFullDateMonthWordMonthFirst ( ) { } @ Test public void testFullDateTimeMonthWord ( ) { } @ Test public void testOrdinalEnding ( ) { } }

Fix:
assertEquals ( true , resultDateTime . toLocalDate ( ) . minusDays ( 14 ) . isBefore ( now . toLocalDate ( ) ) ) ;