private static boolean notInstanceAvailable(){
  if (sInstance == null) {
    if (!sTrainingTaskFuture.isDone()) {
      try {
        sInstance=sTrainingTaskFuture.get();
        return false;
      }
 catch (      InterruptedException|ExecutionException e) {
        e.printStackTrace();
        return true;
      }
    }
 else {
      return true;
    }
  }
  return false;
}

private static boolean notInstanceAvailable ( ) { if ( sInstance == null ) { if ( ! sTrainingTaskFuture . isDone ( ) ) { try { sInstance = sTrainingTaskFuture . get ( ) ; return false ; } catch ( InterruptedException | ExecutionException e ) { e . printStackTrace ( ) ; return true ; } } else { return true ; } } return false ; }
code processor should be created ones at start . but processor creation is not guarantee that classifier is available . not trained classifier is not ready to use & must be trained soon as possible . the main cases why code processor is not available is : 1 ) processor is not created yet & classifier not trained 2 ) processor created , but occurs an error on classifier train 3 ) processor created , classifier start train , but not finished ( 3rd case is ok , it ' s temporary unavailability & awaiting for training ) in 3rd case , user awaiting for train accomplish to get code processor and then take classifier to perform language classifying ( see below ) .
