code: public void update(Instance instance) throws Exception { // better to change
                                                              // to addInstance
      if (m_Instances == null)
        throw new Exception("No instances supplied yet. Have to call "
            + "setInstances(instances) with a set of Instances " + "first.");
  
      addInstanceInfo(instance);
      addInstanceToTree(instance, m_Root);
    }
docs: Adds one instance to the KDTree. This updates the KDTree structure to take
  into account the newly added training instance.
  
  @param instance 	the instance to be added. Usually the newly added instance in the
  training set.
  @throws Exception If the instance cannot be added.