Buggy code:
public class YakitomeAdapter extends Thread implements AdapterListener { public YakitomeAdapter ( ) { } public static int POLLING_PERIOD = ( 5 * 60 ) * 1000 ; Object lock = new Object ( ) ; boolean running = false ; YakitomeAPI apiClient ; Instance ttsInstance ; MongoDBConfiguration dbConfig ; DAOSpeechTextItems dao ; @ Override public void run ( ) { } public void start ( ) { } public void stopIt ( ) { } public void checkAndUpdateTTSInstance ( ) { YakitomeAdapter . logger . trace ( "checkAndUpdateTTSInstance()" ) ; <START_BUG> if ( ( ( ( apiClient ) != null ) && ( ( apiClient . getConfigurationHashkey ( ) ) != null ) ) && ( apiClient . testService ( ) ) ) { <END_BUG> YakitomeAdapter . logger . trace ( "checkAndUpdateTTSInstance(),<seq2seq4repair_space>Yakitome<seq2seq4repair_space>is<seq2seq4repair_space>(still<seq2seq4repair_space>?)<seq2seq4repair_space>available" ) ; if ( ( ( ( ttsInstance ) != null ) && ( ( ttsInstance . getName ( ) ) != null ) ) && ( ttsInstance . getName ( ) . equals ( ( ( ( TTSServiceImpl . TTS_IMPLEM_NAME ) + "-" ) + ( apiClient . getConfigurationHashkey ( ) ) ) ) ) ) { YakitomeAdapter . logger . trace ( ( "checkAndUpdateTTSInstance()," + "ApAM<seq2seq4repair_space>instance<seq2seq4repair_space>already<seq2seq4repair_space>existing<seq2seq4repair_space>with<seq2seq4repair_space>the<seq2seq4repair_space>same<seq2seq4repair_space>configuration<seq2seq4repair_space>:<seq2seq4repair_space>does<seq2seq4repair_space>nothing" ) ) ; } else { YakitomeAdapter . logger . trace ( ( "checkAndUpdateTTSInstance()," + "no<seq2seq4repair_space>ApAM<seq2seq4repair_space>instance<seq2seq4repair_space>already<seq2seq4repair_space>existing<seq2seq4repair_space>with<seq2seq4repair_space>the<seq2seq4repair_space>same<seq2seq4repair_space>configuration" ) ) ; if ( ( dbConfig ) != null ) { YakitomeAdapter . logger . trace ( ( "checkAndUpdateTTSInstance()," + "dbConfig<seq2seq4repair_space>is<seq2seq4repair_space>there,<seq2seq4repair_space>everything<seq2seq4repair_space>ready<seq2seq4repair_space>to<seq2seq4repair_space>create<seq2seq4repair_space>an<seq2seq4repair_space>ApAM<seq2seq4repair_space>instance" ) ) ; if ( ( ( dao ) == null ) || ( ! ( dao . testService ( ) ) ) ) { dao = new appsgate . lig . tts . yakitome . utils . DAOSpeechTextItemsMongo ( dbConfig , this ) ; } if ( ( ( dao ) == null ) || ( ! ( dao . testService ( ) ) ) ) { dao = null ; } else { createTTSInstance ( ) ; } } else { YakitomeAdapter . logger . warn ( ( "checkAndUpdateTTSInstance()," + "dbConfig<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>(yet<seq2seq4repair_space>?)<seq2seq4repair_space>there,<seq2seq4repair_space>can't<seq2seq4repair_space>ApAM<seq2seq4repair_space>instance" ) ) ; } } } else { YakitomeAdapter . logger . trace ( "checkAndUpdateTTSInstance(),<seq2seq4repair_space>Yakitome<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>(no<seq2seq4repair_space>more<seq2seq4repair_space>?)<seq2seq4repair_space>available" ) ; destroyTTSInstance ( ) ; } } private void createTTSInstance ( ) { } private void destroyTTSInstance ( ) { } private static Logger logger = LoggerFactory . getLogger ( YakitomeAdapter . class ) ; @ Override public void serviceUnavailable ( ) { } }

Fix:
if ( ( ( ( apiClient ) != null ) && ( ( apiClient . getConfigurationHashkey ( ) ) != null ) ) && ( apiClient . testService ( null ) ) ) {