Program: 51003
Project: 51003
Buggy source:
/** 
 * Adds a member to cache.
 * @param member Member
 * @param parent Member's parent (generally equals member.getParentMember)
 * @param cellRegionList List of cell regions to be flushed
 */
private Callable<Boolean> addMember(final RolapMember member,final RolapMember parent,List<CellRegion> cellRegionList){
  cellRegionList.add(createMemberRegion(parent,false));
  return new Callable<Boolean>(){
    @Override public Boolean call() throws Exception {
      final MemberCache memberCache=getMemberCache(member);
      final MemberChildrenConstraint memberConstraint=new ChildByNameConstraint(new Id.Segment(member.getName(),Quoting.QUOTED));
      List<RolapMember> childrenList=memberCache.getChildrenFromCache(parent,memberConstraint);
      if (childrenList == null) {
        final List<RolapMember> constrainedList=new ArrayList<RolapMember>();
        constrainedList.add(member);
        memberCache.putChildren(parent,memberConstraint,constrainedList);
      }
      childrenList=memberCache.getChildrenFromCache(parent,DefaultMemberChildrenConstraint.instance());
      if (childrenList == null) {
        final List<RolapMember> unconstrainedList=new ArrayList<RolapMember>();
        unconstrainedList.add(member);
        memberCache.putChildren(parent,DefaultMemberChildrenConstraint.instance(),unconstrainedList);
      }
 else {
        childrenList.add(member);
        memberCache.putChildren(parent,DefaultMemberChildrenConstraint.instance(),childrenList);
      }
      final Object memberKey=memberCache.makeKey(member.getParentMember(),member.getKey());
      memberCache.putMember(memberKey,member);
      return true;
    }
  }
;
}

Fixed version (ground truth):
/** 
 * Adds a member to cache.
 * @param member Member
 * @param parent Member's parent (generally equals member.getParentMember)
 * @param cellRegionList List of cell regions to be flushed
 */
private Callable<Boolean> addMember(final RolapMember member,final RolapMember parent,List<CellRegion> cellRegionList){
  cellRegionList.add(createMemberRegion(parent,false));
  return new Callable<Boolean>(){
    public Boolean call() throws Exception {
      final MemberCache memberCache=getMemberCache(member);
      final MemberChildrenConstraint memberConstraint=new ChildByNameConstraint(new Id.Segment(member.getName(),Quoting.QUOTED));
      List<RolapMember> childrenList=memberCache.getChildrenFromCache(parent,memberConstraint);
      if (childrenList == null) {
        final List<RolapMember> constrainedList=new ArrayList<RolapMember>();
        constrainedList.add(member);
        memberCache.putChildren(parent,memberConstraint,constrainedList);
      }
      childrenList=memberCache.getChildrenFromCache(parent,DefaultMemberChildrenConstraint.instance());
      if (childrenList == null) {
        final List<RolapMember> unconstrainedList=new ArrayList<RolapMember>();
        unconstrainedList.add(member);
        memberCache.putChildren(parent,DefaultMemberChildrenConstraint.instance(),unconstrainedList);
      }
 else {
        childrenList.add(member);
        memberCache.putChildren(parent,DefaultMemberChildrenConstraint.instance(),childrenList);
      }
      final Object memberKey=memberCache.makeKey(member.getParentMember(),member.getKey());
      memberCache.putMember(memberKey,member);
      return true;
    }
  }
;
}