if (m_starting != null) {
if (m_starting != null && m_rankedSoFar <= 0) {
  public int[] search (ASEvaluation ASEval, Instances data)    throws Exception {    int i;    double best_merit = -Double.MAX_VALUE;    double temp_best,temp_merit;    int temp_index=0;    BitSet temp_group;    if (data != null) { // this is a fresh run so reset      resetOptions();      m_Instances = data;    }    m_ASEval = ASEval;    m_numAttribs = m_Instances.numAttributes();    if (m_best_group == null) {      m_best_group = new BitSet(m_numAttribs);    }    if (!(m_ASEval instanceof SubsetEvaluator)) {      throw  new Exception(m_ASEval.getClass().getName() 			   + " is not a " 			   + "Subset evaluator!");    }    m_startRange.setUpper(m_numAttribs-1);    if (!(getStartSet().equals(""))) {      m_starting = m_startRange.getSelection();    }    if (m_ASEval instanceof UnsupervisedSubsetEvaluator) {      m_hasClass = false;      m_classIndex = -1;    }    else {      m_hasClass = true;      m_classIndex = m_Instances.classIndex();    }    SubsetEvaluator ASEvaluator = (SubsetEvaluator)m_ASEval;    if (m_rankedAtts == null) {      m_rankedAtts = new double[m_numAttribs][2];      m_rankedSoFar = 0;    }    // If a starting subset has been supplied, then initialise the bitset    if (m_starting != null) {      for (i = 0; i < m_starting.length; i++) {	if ((m_starting[i]) != m_classIndex) {	  m_best_group.set(m_starting[i]);	}      }    } else {      if (m_backward) {	for (i = 0; i < m_numAttribs; i++) {	  if (i != m_classIndex) {	    m_best_group.set(i);	  }	}      }    }    // Evaluate the initial subset    best_merit = ASEvaluator.evaluateSubset(m_best_group);    // main search loop    boolean done = false;    boolean addone = false;    boolean z;    while (!done) {      temp_group = (BitSet)m_best_group.clone();      temp_best = best_merit;      if (m_doRank) {	temp_best = -Double.MAX_VALUE;      }      done = true;      addone = false;      for (i=0;i<m_numAttribs;i++) {	if (m_backward) {	  z = ((i != m_classIndex) && (temp_group.get(i)));	} else {	  z = ((i != m_classIndex) && (!temp_group.get(i)));	}	if (z) {	  // set/unset the bit	  if (m_backward) {	    temp_group.clear(i);	  } else {	    temp_group.set(i);	  }	  temp_merit = ASEvaluator.evaluateSubset(temp_group);	  if (m_backward) {	    z = (temp_merit >= temp_best);	  } else {            if (m_conservativeSelection) {              z = (temp_merit >= temp_best);            } else {              z = (temp_merit > temp_best);            }	  }	  if (z) {            temp_best = temp_merit;            temp_index = i;            addone = true;            done = false;	  }	  // unset this addition/deletion	  if (m_backward) {	    temp_group.set(i);	  } else {	    temp_group.clear(i);	  }	  if (m_doRank) {	    done = false;	  }	}      }      if (addone) {	if (m_backward) {	  m_best_group.clear(temp_index);	} else {	  m_best_group.set(temp_index);	}	best_merit = temp_best;	m_rankedAtts[m_rankedSoFar][0] = temp_index;	m_rankedAtts[m_rankedSoFar][1] = best_merit;	m_rankedSoFar++;      }    }    m_bestMerit = best_merit;    return attributeList(m_best_group);  }