Program: 64435
Project: 64435
Buggy source:
@Override public void trainOnInstanceImpl(MultiLabelInstance instance){
  numInstances+=instance.weight();
  debug("String_Node_Str",3);
  debug("String_Node_Str" + numInstances + "String_Node_Str"+ instance.toString(),3);
  boolean rulesCoveringInstance=false;
  ListIterator<MultiLabelRule> ruleIterator=this.ruleSet.listIterator();
  while (ruleIterator.hasNext()) {
    MultiLabelRule rule=ruleIterator.next();
    if (rule.isCovering(instance) == true) {
      rulesCoveringInstance=true;
      if (!rule.updateAnomalyDetection(instance)) {
        if (rule.updateChangeDetection(instance)) {
          debug("String_Node_Str" + this.numInstances + "String_Node_Str"+ rule.getWeightSeenSinceExpansion()+ "String_Node_Str"+ rule.getRuleNumberID(),1);
          ruleIterator.remove();
          this.numChangesDetected+=instance.weight();
        }
 else {
          rule.trainOnInstance(instance);
          if (rule.getWeightSeenSinceExpansion() % this.gracePeriodOption.getValue() == 0.0) {
            if (rule.tryToExpand(this.splitConfidenceOption.getValue(),this.tieThresholdOption.getValue())) {
              setRuleOptions(rule);
              if (!dropOldRuleAfterExpansionOption.isSet() && rule.hasNewRuleFromOtherOutputs()) {
                MultiLabelRule otherMultiLabelRule=rule.getNewRuleFromOtherOutputs();
                otherMultiLabelRule.setRuleNumberID(++ruleNumberID);
                setRuleOptions(otherMultiLabelRule);
                ruleIterator.add(otherMultiLabelRule);
              }
              debug("String_Node_Str",2);
              debug(rule.toString(),2);
            }
          }
        }
      }
 else {
        debug("String_Node_Str" + this.numInstances + "String_Node_Str"+ rule.getRuleNumberID(),1);
        this.numAnomaliesDetected+=instance.weight();
      }
      if (!this.unorderedRulesOption.isSet())       break;
    }
  }
  if (rulesCoveringInstance == false) {
    defaultRule.trainOnInstance(instance);
    if (defaultRule.getWeightSeenSinceExpansion() % this.gracePeriodOption.getValue() == 0.0) {
      debug("String_Node_Str" + defaultRule.getWeightSeenSinceExpansion(),4);
      if (defaultRule.tryToExpand(this.splitConfidenceOption.getValue(),this.tieThresholdOption.getValue()) == true) {
        MultiLabelRule newDefaultRule=defaultRule.getNewRuleFromOtherBranch();
        newDefaultRule.setRuleNumberID(++ruleNumberID);
        setRuleOptions(newDefaultRule);
        setRuleOptions(defaultRule);
        ruleSet.add(this.defaultRule);
        debug("String_Node_Str",2);
        debug(defaultRule.toString(),2);
        debug("String_Node_Str",3);
        debug(newDefaultRule.toString(),3);
        defaultRule=newDefaultRule;
      }
    }
  }
}

Fixed version (ground truth):
@Override public void trainOnInstanceImpl(MultiLabelInstance instance){
  numInstances+=instance.weight();
  debug("String_Node_Str",3);
  debug("String_Node_Str" + numInstances + "String_Node_Str"+ instance.toString(),3);
  boolean rulesCoveringInstance=false;
  ListIterator<MultiLabelRule> ruleIterator=this.ruleSet.listIterator();
  while (ruleIterator.hasNext()) {
    MultiLabelRule rule=ruleIterator.next();
    if (rule.isCovering(instance) == true) {
      rulesCoveringInstance=true;
      if (!rule.updateAnomalyDetection(instance)) {
        if (rule.updateChangeDetection(instance)) {
          debug("String_Node_Str" + this.numInstances + "String_Node_Str"+ rule.getWeightSeenSinceExpansion()+ "String_Node_Str"+ rule.getRuleNumberID(),1);
          ruleIterator.remove();
          this.numChangesDetected+=instance.weight();
        }
 else {
          rule.trainOnInstance(instance);
          if (rule.getWeightSeenSinceExpansion() % this.gracePeriodOption.getValue() == 0.0) {
            if (rule.tryToExpand(this.splitConfidenceOption.getValue(),this.tieThresholdOption.getValue())) {
              if (!dropOldRuleAfterExpansionOption.isSet() && rule.hasNewRuleFromOtherOutputs()) {
                MultiLabelRule otherMultiLabelRule=rule.getNewRuleFromOtherOutputs();
                otherMultiLabelRule.setRuleNumberID(++ruleNumberID);
                setRuleOptions(otherMultiLabelRule);
                ruleIterator.add(otherMultiLabelRule);
              }
              setRuleOptions(rule);
              debug("String_Node_Str",2);
              debug(rule.toString(),2);
            }
          }
        }
      }
 else {
        debug("String_Node_Str" + this.numInstances + "String_Node_Str"+ rule.getRuleNumberID(),1);
        this.numAnomaliesDetected+=instance.weight();
      }
      if (!this.unorderedRulesOption.isSet())       break;
    }
  }
  if (rulesCoveringInstance == false) {
    defaultRule.trainOnInstance(instance);
    if (defaultRule.getWeightSeenSinceExpansion() % this.gracePeriodOption.getValue() == 0.0) {
      debug("String_Node_Str" + defaultRule.getWeightSeenSinceExpansion(),4);
      if (defaultRule.tryToExpand(this.splitConfidenceOption.getValue(),this.tieThresholdOption.getValue()) == true) {
        MultiLabelRule newDefaultRule=defaultRule.getNewRuleFromOtherBranch();
        newDefaultRule.setRuleNumberID(++ruleNumberID);
        setRuleOptions(newDefaultRule);
        setRuleOptions(defaultRule);
        ruleSet.add(this.defaultRule);
        debug("String_Node_Str",2);
        debug(defaultRule.toString(),2);
        debug("String_Node_Str",3);
        debug(newDefaultRule.toString(),3);
        defaultRule=newDefaultRule;
      }
    }
  }
}