Program: 48881
Project: 48881
Buggy source:
private Map<String,Integer> collectResourcePoolInfo(List<BaseNode> vNodes,Map<String,List<String>> vcClusterRpNamesMap,Map<Long,List<NodeGroupCreate>> rpNodeGroupsMap){
  List<String> resourcePoolNames=null;
  List<NodeGroupCreate> nodeGroups=null;
  int resourcePoolNameCount=0;
  int nodeGroupNameCount=0;
  for (  BaseNode baseNode : vNodes) {
    String vcCluster=baseNode.getTargetVcCluster();
    VcCluster cluster=VcResourceUtils.findVcCluster(vcCluster);
    if (!cluster.getConfig().getDRSEnabled()) {
      logger.debug("String_Node_Str" + vcCluster + "String_Node_Str");
      continue;
    }
    AuAssert.check(!CommonUtil.isBlank(vcCluster),"String_Node_Str");
    if (!vcClusterRpNamesMap.containsKey(vcCluster)) {
      resourcePoolNames=new ArrayList<String>();
    }
 else {
      resourcePoolNames=vcClusterRpNamesMap.get(vcCluster);
    }
    String vcRp=baseNode.getTargetRp();
    long rpHashCode=vcCluster.hashCode() ^ (vcCluster + vcRp).hashCode();
    if (!rpNodeGroupsMap.containsKey(rpHashCode)) {
      nodeGroups=new ArrayList<NodeGroupCreate>();
    }
 else {
      nodeGroups=rpNodeGroupsMap.get(rpHashCode);
    }
    NodeGroupCreate nodeGroup=baseNode.getNodeGroup();
    if (!getAllNodeGroupNames(nodeGroups).contains(nodeGroup.getName())) {
      nodeGroups.add(nodeGroup);
      rpNodeGroupsMap.put(rpHashCode,nodeGroups);
      nodeGroupNameCount++;
    }
    if (!resourcePoolNames.contains(vcRp)) {
      resourcePoolNames.add(vcRp);
      vcClusterRpNamesMap.put(vcCluster,resourcePoolNames);
      resourcePoolNameCount++;
    }
  }
  Map<String,Integer> countResult=new HashMap<String,Integer>();
  countResult.put("String_Node_Str",resourcePoolNameCount);
  countResult.put("String_Node_Str",nodeGroupNameCount);
  return countResult;
}

Fixed version (ground truth):
private Map<String,Integer> collectResourcePoolInfo(List<BaseNode> vNodes,final String uuid,Map<String,List<String>> vcClusterRpNamesMap,Map<Long,List<NodeGroupCreate>> rpNodeGroupsMap){
  List<String> resourcePoolNames=null;
  List<NodeGroupCreate> nodeGroups=null;
  int resourcePoolNameCount=0;
  int nodeGroupNameCount=0;
  for (  BaseNode baseNode : vNodes) {
    String vcCluster=baseNode.getTargetVcCluster();
    VcCluster cluster=VcResourceUtils.findVcCluster(vcCluster);
    if (!cluster.getConfig().getDRSEnabled()) {
      logger.debug("String_Node_Str" + vcCluster + "String_Node_Str");
      continue;
    }
    AuAssert.check(!CommonUtil.isBlank(vcCluster),"String_Node_Str");
    if (!vcClusterRpNamesMap.containsKey(vcCluster)) {
      resourcePoolNames=new ArrayList<String>();
    }
 else {
      resourcePoolNames=vcClusterRpNamesMap.get(vcCluster);
    }
    String vcRp=baseNode.getTargetRp();
    String rpPath="String_Node_Str" + vcCluster + "String_Node_Str"+ vcRp+ "String_Node_Str"+ uuid;
    long rpHashCode=rpPath.hashCode();
    if (!rpNodeGroupsMap.containsKey(rpHashCode)) {
      nodeGroups=new ArrayList<NodeGroupCreate>();
    }
 else {
      nodeGroups=rpNodeGroupsMap.get(rpHashCode);
    }
    NodeGroupCreate nodeGroup=baseNode.getNodeGroup();
    if (!getAllNodeGroupNames(nodeGroups).contains(nodeGroup.getName())) {
      nodeGroups.add(nodeGroup);
      rpNodeGroupsMap.put(rpHashCode,nodeGroups);
      nodeGroupNameCount++;
    }
    if (!resourcePoolNames.contains(vcRp)) {
      resourcePoolNames.add(vcRp);
      vcClusterRpNamesMap.put(vcCluster,resourcePoolNames);
      resourcePoolNameCount++;
    }
  }
  Map<String,Integer> countResult=new HashMap<String,Integer>();
  countResult.put("String_Node_Str",resourcePoolNameCount);
  countResult.put("String_Node_Str",nodeGroupNameCount);
  return countResult;
}