code: protected void correctlyInitialized() throws Exception {
      if(m_Instances==null)
        throw new Exception("No instances supplied.");
      else if(m_InstList==null) 
        throw new Exception("No instance list supplied.");
      else if(m_EuclideanDistance==null)
        throw new Exception("No Euclidean distance function supplied.");
      else if(m_Instances.numInstances() != m_InstList.length)
        throw new Exception("The supplied instance list doesn't seem to match " +
                            "the supplied instances");
    }
docs: Checks whether an object of this class has been correctly
  initialized. Performs checks to see if all the necessary
  things (master index array, training instances, distance
  function) have been supplied or not.
  @throws Exception If the object has not been correctly
  initialized.