if (data.instance(i).classIsMissing()) {
if (data.instance(i).isMissing(n)) {
  public static Capabilities forInstances(Instances data) throws Exception {    Capabilities	result;    int			i;    int			n;        result = new Capabilities(null);        // class    if (data.classIndex() == -1) {      result.enable(Capability.NO_CLASS);    }    else {      switch (data.classAttribute().type()) {	case Attribute.NOMINAL:	  if (data.classAttribute().numValues() == 2)	    result.enable(Capability.BINARY_CLASS);	  else	    result.enable(Capability.NOMINAL_CLASS);	  break;	  	case Attribute.NUMERIC:	  result.enable(Capability.NUMERIC_CLASS);	  break;	  	case Attribute.STRING:	  result.enable(Capability.STRING_CLASS);	  break;	  	case Attribute.DATE:	  result.enable(Capability.DATE_CLASS);	  break;	  	case Attribute.RELATIONAL:	  result.enable(Capability.RELATIONAL_CLASS);	  break;	  	default:	  throw new UnsupportedAttributeTypeException("Unknown class attribute type '" + data.classAttribute() + "'!");      }            // missing class values      for (i = 0; i < data.numInstances(); i++) {	if (data.instance(i).classIsMissing()) {	  result.enable(Capability.MISSING_CLASS_VALUES);	  break;	}      }    }        // attributes    if (data.checkForAttributeType(Attribute.NOMINAL)) {      result.enable(Capability.BINARY_ATTRIBUTES);            for (i = 0; i < data.numAttributes(); i++) {	// skip class	if (i == data.classIndex())	  continue;	// non-binary attributes?	if (data.attribute(i).isNominal()) {	  if (data.attribute(i).numValues() != 2) {	    result.enable(Capability.NOMINAL_ATTRIBUTES);	    break;	  }	}      }    }    if (data.checkForAttributeType(Attribute.NUMERIC))      result.enable(Capability.NUMERIC_ATTRIBUTES);        if (data.checkForAttributeType(Attribute.STRING))      result.enable(Capability.STRING_ATTRIBUTES);    if (data.checkForAttributeType(Attribute.DATE))      result.enable(Capability.DATE_ATTRIBUTES);    if (data.checkForAttributeType(Attribute.RELATIONAL))      result.enable(Capability.RELATIONAL_ATTRIBUTES);        // missing values    for (n = 0; n < data.numAttributes(); n++) {      if (n == data.classIndex())	continue;            for (i = 0; i < data.numInstances(); i++) {	if (data.instance(i).classIsMissing()) {	  result.enable(Capability.MISSING_VALUES);	  break;	}      }    }    return result;  }