Program: 176966
Project: 176966
Buggy source:
/** 
 * @param node
 * @return
 */
protected List<RelationHolder> getRelationHolders(Node node){
  List<RelationHolder> relationsHolder=new ArrayList<RelationHolder>();
  Map<NodeLink,Node> parents=node.getParents();
  Map<NodeLink,Node> children=node.getChildren();
  if (parents != null && !parents.isEmpty()) {
    for (    NodeLink parentNodeLink : parents.keySet()) {
      String linkName=(String)parentNodeLink.getLinkProperty(LinkProperty.LINK_NAME);
      String linkValue=(String)parentNodeLink.getLinkProperty(LinkProperty.LINK_VALUE);
      boolean isSharedByPrimaryKey=(Boolean)parentNodeLink.getLinkProperty(LinkProperty.IS_SHARED_BY_PRIMARY_KEY);
      if (linkName != null && linkValue != null && !isSharedByPrimaryKey) {
        RelationHolder relationHolder=new RelationHolder(linkName,linkValue);
        relationsHolder.add(relationHolder);
      }
    }
  }
  if (children != null && !children.isEmpty()) {
    for (    NodeLink childNodeLink : children.keySet()) {
      String linkName=(String)childNodeLink.getLinkProperty(LinkProperty.LINK_NAME);
      String linkValue=(String)childNodeLink.getLinkProperty(LinkProperty.LINK_VALUE);
      boolean isSharedByPrimaryKey=(Boolean)childNodeLink.getLinkProperty(LinkProperty.IS_SHARED_BY_PRIMARY_KEY);
      if (linkName != null && linkValue != null && !isSharedByPrimaryKey) {
        RelationHolder relationHolder=new RelationHolder(linkName,linkValue);
        relationsHolder.add(relationHolder);
      }
    }
  }
  return relationsHolder;
}

Fixed version (ground truth):
/** 
 * @param node
 * @return
 */
protected List<RelationHolder> getRelationHolders(Node node){
  List<RelationHolder> relationsHolder=new ArrayList<RelationHolder>();
  Map<NodeLink,Node> parents=node.getParents();
  Map<NodeLink,Node> children=node.getChildren();
  if (parents != null && !parents.isEmpty()) {
    for (    NodeLink parentNodeLink : parents.keySet()) {
      String linkName=(String)parentNodeLink.getLinkProperty(LinkProperty.LINK_NAME);
      String linkValue=(String)parentNodeLink.getLinkProperty(LinkProperty.LINK_VALUE);
      boolean isSharedByPrimaryKey=(Boolean)parentNodeLink.getLinkProperty(LinkProperty.IS_SHARED_BY_PRIMARY_KEY);
      Relation.ForeignKey multiplicity=parentNodeLink.getMultiplicity();
      if (linkName != null && linkValue != null && !isSharedByPrimaryKey && multiplicity.equals(ForeignKey.ONE_TO_MANY)) {
        RelationHolder relationHolder=new RelationHolder(linkName,linkValue);
        relationsHolder.add(relationHolder);
      }
    }
  }
  if (children != null && !children.isEmpty()) {
    for (    NodeLink childNodeLink : children.keySet()) {
      String linkName=(String)childNodeLink.getLinkProperty(LinkProperty.LINK_NAME);
      String linkValue=(String)childNodeLink.getLinkProperty(LinkProperty.LINK_VALUE);
      boolean isSharedByPrimaryKey=(Boolean)childNodeLink.getLinkProperty(LinkProperty.IS_SHARED_BY_PRIMARY_KEY);
      Relation.ForeignKey multiplicity=childNodeLink.getMultiplicity();
      if (linkName != null && linkValue != null && !isSharedByPrimaryKey && (multiplicity.equals(ForeignKey.ONE_TO_ONE) || multiplicity.equals(ForeignKey.MANY_TO_ONE))) {
        RelationHolder relationHolder=new RelationHolder(linkName,linkValue);
        relationsHolder.add(relationHolder);
      }
    }
  }
  return relationsHolder;
}