Program: 20415
Project: 20415
Buggy source:
/** 
 * Gets the rules out of the passed itemSet
 * @param minCredibility
 * @param data
 * @param itemSet : one of the frequent items.
 * @return List of rules which satisfy minimal credibility.
 */
private List<Rule> getRulesFromItemSet(ItemSet itemSet,DataRepresentationBase data,double minCredibility){
  List<Rule> itemSetRules=new LinkedList<Rule>();
  int suportXY=frequentSet.get(itemSet);
  List<ItemSet> vetoSets=new LinkedList<ItemSet>();
  List<ItemSet> nextSets=getAllSets(itemSet.getElements());
  for (int i=0; i < itemSet.getElements().size() - 1; i++) {
    List<ItemSet> smallerSets=new LinkedList<ItemSet>(nextSets);
    for (    ItemSet currentSet : smallerSets) {
      int supportX=frequentSet.get(currentSet);
      double confidance=suportXY / supportX;
      if (confidance >= minCredibility) {
        List<Integer> exectuivePart=new LinkedList<Integer>();
        List<Integer> conditionalPart=new LinkedList<Integer>();
        for (        String attribute : itemSet.getElements()) {
          if (currentSet.getElements().contains(attribute)) {
            conditionalPart.add(Integer.parseInt(attribute));
          }
 else {
            exectuivePart.add(Integer.parseInt(attribute));
          }
        }
        Rule rule=new Rule(ruleCounter++,conditionalPart,exectuivePart,(int)(confidance * 100),supportX);
        itemSetRules.add(rule);
        List<ItemSet> sets=getAllSets(currentSet.getElements());
        if (sets != null)         nextSets.addAll(sets);
      }
 else {
        List<ItemSet> sets=getAllSets(currentSet.getElements());
        if (sets != null)         vetoSets.addAll(sets);
      }
    }
  }
  return itemSetRules;
}

Fixed version (ground truth):
/** 
 * Gets the rules out of the passed itemSet
 * @param minCredibility
 * @param data
 * @param itemSet : one of the frequent items.
 * @return List of rules which satisfy minimal credibility.
 */
private List<Rule> getRulesFromItemSet(ItemSet itemSet,DataRepresentationBase data,double minCredibility){
  Set<Rule> itemSetRules=new HashSet<Rule>();
  int suportXY=frequentSet.get(itemSet);
  List<ItemSet> vetoSets=new LinkedList<ItemSet>();
  List<ItemSet> nextSets=getAllSets(itemSet.getElements());
  for (int i=0; i < itemSet.getElements().size(); i++) {
    List<ItemSet> smallerSets=new LinkedList<ItemSet>(nextSets);
    for (    ItemSet currentSet : smallerSets) {
      int supportX=frequentSet.get(currentSet);
      double confidance=suportXY / (double)supportX;
      if (confidance >= minCredibility) {
        List<Integer> exectuivePart=new LinkedList<Integer>();
        List<Integer> conditionalPart=new LinkedList<Integer>();
        for (        String attribute : itemSet.getElements()) {
          if (currentSet.getElements().contains(attribute)) {
            conditionalPart.add(Integer.parseInt(attribute));
          }
 else {
            exectuivePart.add(Integer.parseInt(attribute));
          }
        }
        Rule rule=new Rule(ruleCounter++,conditionalPart,exectuivePart,(int)(confidance * 100),supportX);
        itemSetRules.add(rule);
        List<ItemSet> sets=getAllSets(currentSet.getElements());
        if (sets != null)         nextSets.addAll(sets);
      }
 else {
        List<ItemSet> sets=getAllSets(currentSet.getElements());
        if (sets != null)         vetoSets.addAll(sets);
      }
    }
  }
  return new LinkedList<Rule>(itemSetRules);
}