Program: 64452
Project: 64452
Buggy source:
@Override public void trainOnInstanceImpl(Instance instance){
  numInstances+=instance.weight();
  debug("String_Node_Str",3);
  debug("String_Node_Str" + numInstances + "String_Node_Str"+ instance.toString(),3);
  boolean rulesCoveringInstance=false;
  Iterator<Rule> ruleIterator=this.ruleSet.iterator();
  while (ruleIterator.hasNext()) {
    Rule rule=ruleIterator.next();
    if (rule.isCovering(instance) == true) {
      rulesCoveringInstance=true;
      if (isAnomaly(instance,rule) == false) {
        double error=rule.computeError(instance);
        boolean changeDetected=rule.getLearningNode().updateChangeDetection(error);
        if (changeDetected == true) {
          debug("String_Node_Str" + this.numInstances + "String_Node_Str"+ rule.getInstancesSeen()+ "String_Node_Str"+ rule.getRuleNumberID(),1);
          ruleIterator.remove();
          this.numChangesDetected+=instance.weight();
        }
 else {
          rule.updateStatistics(instance);
          if (rule.getInstancesSeen() % this.gracePeriodOption.getValue() == 0.0) {
            if (rule.tryToExpand(this.splitConfidenceOption.getValue(),this.tieThresholdOption.getValue())) {
              rule.split();
              debug("String_Node_Str",2);
              debug(rule.printRule(),2);
            }
          }
        }
        if (!this.unorderedRulesOption.isSet())         break;
      }
 else {
        debug("String_Node_Str" + this.numInstances + "String_Node_Str"+ rule.getRuleNumberID(),1);
        this.numAnomaliesDetected=+instance.weight();
      }
    }
  }
  if (rulesCoveringInstance == false) {
    defaultRule.updateStatistics(instance);
    if (defaultRule.getInstancesSeen() % this.gracePeriodOption.getValue() == 0.0) {
      debug("String_Node_Str" + defaultRule.getInstancesSeen(),4);
      if (defaultRule.tryToExpand(this.splitConfidenceOption.getValue(),this.tieThresholdOption.getValue()) == true) {
        Rule newDefaultRule=newRule(defaultRule.getRuleNumberID(),defaultRule.getLearningNode(),defaultRule.getLearningNode().getStatisticsOtherBranchSplit());
        defaultRule.split();
        defaultRule.setRuleNumberID(++ruleNumberID);
        this.ruleSet.add(this.defaultRule);
        debug("String_Node_Str",2);
        debug(defaultRule.printRule(),2);
        debug("String_Node_Str",3);
        debug(newDefaultRule.printRule(),3);
        defaultRule=newDefaultRule;
      }
    }
  }
}

Fixed version (ground truth):
@Override public void trainOnInstanceImpl(Instance instance){
  numInstances+=instance.weight();
  debug("String_Node_Str",3);
  debug("String_Node_Str" + numInstances + "String_Node_Str"+ instance.toString(),3);
  boolean rulesCoveringInstance=false;
  Iterator<Rule> ruleIterator=this.ruleSet.iterator();
  while (ruleIterator.hasNext()) {
    Rule rule=ruleIterator.next();
    if (rule.isCovering(instance) == true) {
      rulesCoveringInstance=true;
      if (isAnomaly(instance,rule) == false) {
        double error=rule.computeError(instance);
        boolean changeDetected=rule.getLearningNode().updateChangeDetection(error);
        if (changeDetected == true) {
          debug("String_Node_Str" + this.numInstances + "String_Node_Str"+ rule.getInstancesSeen()+ "String_Node_Str"+ rule.getRuleNumberID(),1);
          ruleIterator.remove();
          this.numChangesDetected+=instance.weight();
        }
 else {
          rule.updateStatistics(instance);
          if (rule.getInstancesSeen() % this.gracePeriodOption.getValue() == 0.0) {
            if (rule.tryToExpand(this.splitConfidenceOption.getValue(),this.tieThresholdOption.getValue())) {
              rule.split();
              debug("String_Node_Str",2);
              debug(rule.printRule(),2);
            }
          }
        }
        if (!this.unorderedRulesOption.isSet())         break;
      }
 else {
        debug("String_Node_Str" + this.numInstances + "String_Node_Str"+ rule.getRuleNumberID(),1);
        this.numAnomaliesDetected+=instance.weight();
      }
    }
  }
  if (rulesCoveringInstance == false) {
    defaultRule.updateStatistics(instance);
    if (defaultRule.getInstancesSeen() % this.gracePeriodOption.getValue() == 0.0) {
      debug("String_Node_Str" + defaultRule.getInstancesSeen(),4);
      if (defaultRule.tryToExpand(this.splitConfidenceOption.getValue(),this.tieThresholdOption.getValue()) == true) {
        Rule newDefaultRule=newRule(defaultRule.getRuleNumberID(),defaultRule.getLearningNode(),defaultRule.getLearningNode().getStatisticsOtherBranchSplit());
        defaultRule.split();
        defaultRule.setRuleNumberID(++ruleNumberID);
        this.ruleSet.add(this.defaultRule);
        debug("String_Node_Str",2);
        debug(defaultRule.printRule(),2);
        debug("String_Node_Str",3);
        debug(newDefaultRule.printRule(),3);
        defaultRule=newDefaultRule;
      }
    }
  }
}