Buggy code:
@ Service public class FlightServiceImpl implements IFlightService { @ Autowired private IFlightSearchDAL flightSearchDAL ; @ Autowired private IFlightInfoDAL flightDataDAL ; @ Autowired private IApplicationDAL applicationDAL ; @ Autowired private IGoogleFlightApiClient googleFlightApiClient ; private AtomicLong flightCallCurrentCount = new AtomicLong ( 0 ) ; @ PostConstruct public void setup ( ) { } private void saveState ( boolean async ) { } @ Override public FlightInfo getFlightInfo ( FlightSearch fs ) { } private FlightInfo getFlightInfoWithoutHistory ( FlightSearch fs ) { fs . setDestination ( fs . getDestination ( ) . toUpperCase ( ) ) ; fs . setOrigin ( fs . getOrigin ( ) . toUpperCase ( ) ) ; FlightSearch savedSearch = flightSearchDAL . findFlightSavedSearch ( fs ) ; if ( savedSearch == null ) { savedSearch = flightSearchDAL . saveFlightSearch ( fs ) ; } if ( ( ( savedSearch . getFlightOptionsExists ( ) ) != null ) && ( ! ( savedSearch . getFlightOptionsExists ( ) ) ) ) { throw new FlightException ( "No<seq2seq4repair_space>flight<seq2seq4repair_space>options<seq2seq4repair_space>exists<seq2seq4repair_space>for<seq2seq4repair_space>this<seq2seq4repair_space>search" ) ; } if ( ( ( fs . getForceBatchUsage ( ) ) != null ) && ( fs . getForceBatchUsage ( ) ) ) { throw new FlightException ( "Will<seq2seq4repair_space>not<seq2seq4repair_space>get<seq2seq4repair_space>flight<seq2seq4repair_space>details<seq2seq4repair_space>since<seq2seq4repair_space>told<seq2seq4repair_space>to<seq2seq4repair_space>wait<seq2seq4repair_space>for<seq2seq4repair_space>batch<seq2seq4repair_space>process<seq2seq4repair_space>instead" ) ; } if ( ( ( savedSearch . isExistingSearch ( ) ) != null ) && ( savedSearch . isExistingSearch ( ) ) ) { FlightInfo fd = flightDataDAL . findFlightInfo ( savedSearch ) ; if ( fd != null ) { String s = "Returning<seq2seq4repair_space>saved<seq2seq4repair_space>Flight<seq2seq4repair_space>Data<seq2seq4repair_space>instead<seq2seq4repair_space>of<seq2seq4repair_space>calling<seq2seq4repair_space>Flight<seq2seq4repair_space>API" ; System . out . println ( s ) ; fd . setInfoMessage ( s ) ; return fd ; } } GoogleFlightResponse response = null ; if ( ( flightCallCurrentCount . get ( ) ) < ( FlightProperties . GOOGLE_FLIGHT_API_DAILY_INVOKE_LIMIT ) ) { flightCallCurrentCount . incrementAndGet ( ) ; response = googleFlightApiClient . postForFlightInfo ( createRequest ( savedSearch ) ) ; } else { throw new FlightException ( "The<seq2seq4repair_space>limit<seq2seq4repair_space>for<seq2seq4repair_space>today's<seq2seq4repair_space>Flight<seq2seq4repair_space>API<seq2seq4repair_space>call<seq2seq4repair_space>has<seq2seq4repair_space>being<seq2seq4repair_space>reached" ) ; } this . saveState ( true ) ; if ( response != null ) { List < FlightParsedData > listOfFlights = this . parseGoogleResponseToFlightData ( response , savedSearch ) ; if ( ( listOfFlights != null ) && ( ( listOfFlights . size ( ) ) > 0 ) ) { FlightInfo fd = this . getFlightData ( listOfFlights ) ; if ( fd != null ) { fd . setKey ( savedSearch . getKey ( ) ) ; fd . setExistingSearch ( savedSearch . isExistingSearch ( ) ) ; flightDataDAL . saveFlightInfo ( fd ) ; return fd ; } throw new FlightException ( "Found<seq2seq4repair_space>flight<seq2seq4repair_space>information<seq2seq4repair_space>but<seq2seq4repair_space>could<seq2seq4repair_space>not<seq2seq4repair_space>parse<seq2seq4repair_space>details<seq2seq4repair_space>from<seq2seq4repair_space>the<seq2seq4repair_space>objects" ) ; } fs . setFlightOptionsExists ( false ) ; this . flightSearchDAL . updateFlightSavedSearch ( fs ) ; <START_BUG> throw new FlightException ( "Did<seq2seq4repair_space>not<seq2seq4repair_space>find<seq2seq4repair_space>any<seq2seq4repair_space>flights<seq2seq4repair_space>from<seq2seq4repair_space>Google<seq2seq4repair_space>API<seq2seq4repair_space>response" ) ; <END_BUG> } throw new FlightException ( "Response<seq2seq4repair_space>from<seq2seq4repair_space>google<seq2seq4repair_space>flights<seq2seq4repair_space>is<seq2seq4repair_space>null.<seq2seq4repair_space>Cannot<seq2seq4repair_space>do<seq2seq4repair_space>anything<seq2seq4repair_space>with<seq2seq4repair_space>no<seq2seq4repair_space>data!<seq2seq4repair_space>:-(." ) ; } private List < FlightInfo > getAllFlightDataForSearch ( FlightSearch savedSearch ) { } private FlightInfo getFlightData ( List < FlightParsedData > listOfFlights ) { } private List < FlightParsedData > parseGoogleResponseToFlightData ( GoogleFlightResponse response , FlightSearch fss ) { } public GoogleFlightRequest createRequest ( FlightSearch fss ) { } @ Override public List < FlightSearch > getAllFlightSavedSearches ( ) { } @ Override public List < FlightInfo > getAllSavedFlightInfo ( ) { } @ Override public List < ApplicationState > getAllApplicationStates ( ) { } @ Override public void runTracker ( ) { } No newline ; at end ; of file ; }

Fix:
throw new FlightException ( "Did<seq2seq4repair_space>not<seq2seq4repair_space>find<seq2seq4repair_space>any<seq2seq4repair_space>flights<seq2seq4repair_space>from<seq2seq4repair_space>the<seq2seq4repair_space>Flight<seq2seq4repair_space>API<seq2seq4repair_space>response" ) ;