code: private void trainRuleOnInstance(int ruleID, Instance instance) {
          //System.out.println("Processor:"+this.processorId+": Rule:"+ruleID+" -> Counter="+counter);
  		Iterator<ActiveRule> ruleIterator= this.ruleSet.iterator();
  		while (ruleIterator.hasNext()) {
  			ActiveRule rule = ruleIterator.next();
  			if (rule.getRuleNumberID() == ruleID) {
  				// Check (again) for coverage
  				if (rule.isCovering(instance) == true) {
  					double error = rule.computeError(instance); //Use adaptive mode error
                      boolean changeDetected = ((RuleActiveRegressionNode)rule.getLearningNode()).updateChangeDetection(error);
                      if (changeDetected == true) {
                              ruleIterator.remove();
                              
                              this.sendRemoveRuleEvent(ruleID);
                      } else {
                      	rule.updateStatistics(instance);
                      	if (rule.getInstancesSeen()  % this.gracePeriod == 0.0) {
                      		if (rule.tryToExpand(this.splitConfidence, this.tieThreshold) ) {
                      			rule.split();
                      			
                      			// expanded: update Aggregator with new/updated predicate
                      			this.sendPredicate(rule.getRuleNumberID(), rule.getLastUpdatedRuleSplitNode(), 
          								(RuleActiveRegressionNode)rule.getLearningNode());
                      		}	
                      		
                      	}
                      	
                      }
  				}
  				
  				return;
  			}
  		}
  	}
docs: /*
  Process input instances