Program: 64018
Project: 64018
Buggy source:
/** 
 * Return true if this AttributeGroup is a super-set of the passed in AttributeGroup.
 */
public boolean isSupersetOf(CoreAttributeGroup<ATTRIBUTE_ITEM> anotherGroup){
  if (anotherGroup == null) {
    return false;
  }
  if (anotherGroup != this) {
    if (hasItems()) {
      if (anotherGroup.hasItems()) {
        Iterator<Map.Entry<String,ATTRIBUTE_ITEM>> otherItemEntries=anotherGroup.getItems().entrySet().iterator();
        while (otherItemEntries.hasNext()) {
          Map.Entry<String,ATTRIBUTE_ITEM> otherItemEntry=otherItemEntries.next();
          String otherAttributeName=otherItemEntry.getKey();
          CoreAttributeItem item=this.items.get(otherAttributeName);
          if (item == null) {
            return false;
          }
          CoreAttributeGroup<ATTRIBUTE_ITEM> group=item.getGroup();
          CoreAttributeGroup<ATTRIBUTE_ITEM> otherGroup=otherItemEntry.getValue().getGroup();
          if (group != null) {
            if (!group.isSupersetOf(otherGroup)) {
              return false;
            }
          }
 else {
            if (otherGroup != null) {
              return true;
            }
          }
          group=item.getKeyGroup();
          otherGroup=otherItemEntry.getValue().getKeyGroup();
          if (group != null) {
            if (!group.isSupersetOf(otherGroup)) {
              return false;
            }
          }
 else {
            if (otherGroup != null) {
              return true;
            }
          }
          if (item.getGroups() != null) {
            if (otherItemEntry.getValue().getGroups() == null) {
              return true;
            }
            for (            Object next : item.getGroups().values()) {
              CoreAttributeGroup<ATTRIBUTE_ITEM> element=(CoreAttributeGroup<ATTRIBUTE_ITEM>)next;
              CoreAttributeGroup<ATTRIBUTE_ITEM> otherElement=(CoreAttributeGroup<ATTRIBUTE_ITEM>)otherItemEntry.getValue().getGroups().get(element.getType());
              if (!element.isSupersetOf(otherElement)) {
                return false;
              }
            }
          }
          if (item.getKeyGroups() != null) {
            if (otherItemEntry.getValue().getKeyGroups() == null) {
              return true;
            }
            for (            Object next : item.getKeyGroups().values()) {
              CoreAttributeGroup element=(CoreAttributeGroup)next;
              CoreAttributeGroup otherElement=(CoreAttributeGroup)otherItemEntry.getValue().getKeyGroups().get(element.getType());
              if (!element.isSupersetOf(otherElement)) {
                return false;
              }
            }
          }
        }
        return true;
      }
 else {
        return true;
      }
    }
 else {
      if (anotherGroup.hasItems()) {
        return false;
      }
 else {
        return true;
      }
    }
  }
 else {
    return true;
  }
}

Fixed version (ground truth):
/** 
 * Return true if this AttributeGroup is a super-set of the passed in AttributeGroup.
 */
public boolean isSupersetOf(CoreAttributeGroup<ATTRIBUTE_ITEM,DESCRIPTOR> anotherGroup){
  if (anotherGroup == null) {
    return false;
  }
  if (anotherGroup != this) {
    if (hasItems()) {
      if (anotherGroup.hasItems()) {
        Iterator<Map.Entry<String,ATTRIBUTE_ITEM>> otherItemEntries=anotherGroup.getItems().entrySet().iterator();
        while (otherItemEntries.hasNext()) {
          Map.Entry<String,ATTRIBUTE_ITEM> otherItemEntry=otherItemEntries.next();
          String otherAttributeName=otherItemEntry.getKey();
          CoreAttributeItem item=this.items.get(otherAttributeName);
          if (item == null) {
            return false;
          }
          CoreAttributeGroup<ATTRIBUTE_ITEM,DESCRIPTOR> group=item.getGroup();
          CoreAttributeGroup<ATTRIBUTE_ITEM,DESCRIPTOR> otherGroup=otherItemEntry.getValue().getGroup();
          if (group != null) {
            if (!group.isSupersetOf(otherGroup)) {
              return false;
            }
          }
 else {
            if (otherGroup != null) {
              return true;
            }
          }
          group=item.getKeyGroup();
          otherGroup=otherItemEntry.getValue().getKeyGroup();
          if (group != null) {
            if (!group.isSupersetOf(otherGroup)) {
              return false;
            }
          }
 else {
            if (otherGroup != null) {
              return true;
            }
          }
          if (item.getGroups() != null) {
            if (otherItemEntry.getValue().getGroups() == null) {
              return true;
            }
            for (            Object next : item.getGroups().values()) {
              CoreAttributeGroup<ATTRIBUTE_ITEM,DESCRIPTOR> element=(CoreAttributeGroup<ATTRIBUTE_ITEM,DESCRIPTOR>)next;
              CoreAttributeGroup<ATTRIBUTE_ITEM,DESCRIPTOR> otherElement=(CoreAttributeGroup<ATTRIBUTE_ITEM,DESCRIPTOR>)otherItemEntry.getValue().getGroups().get(element.getType());
              if (!element.isSupersetOf(otherElement)) {
                return false;
              }
            }
          }
          if (item.getKeyGroups() != null) {
            if (otherItemEntry.getValue().getKeyGroups() == null) {
              return true;
            }
            for (            Object next : item.getKeyGroups().values()) {
              CoreAttributeGroup element=(CoreAttributeGroup)next;
              CoreAttributeGroup otherElement=(CoreAttributeGroup)otherItemEntry.getValue().getKeyGroups().get(element.getType());
              if (!element.isSupersetOf(otherElement)) {
                return false;
              }
            }
          }
        }
        return true;
      }
 else {
        return true;
      }
    }
 else {
      if (anotherGroup.hasItems()) {
        return false;
      }
 else {
        return true;
      }
    }
  }
 else {
    return true;
  }
}