Program: 48517
Project: 48517
Buggy source:
private void validateRoleDependencies(List<NodeGroupInfo> nodeGroups,List<ApiStackComponent> apiStackComponents,Map<String,Integer> definedRoles){
  if (nodeGroups == null || nodeGroups.isEmpty()) {
    return;
  }
  Set<String> allRoles=new HashSet<String>();
  for (  NodeGroupInfo group : nodeGroups) {
    allRoles.addAll(group.getRoles());
  }
  for (  String role : allRoles) {
    List<String> NotExistDenpendencyNames=new ArrayList<String>();
    for (    ApiStackComponent apiStackComponent : apiStackComponents) {
      List<ApiComponentDependency> apiComponentDependencies=apiStackComponent.getApiComponentDependencies();
      if (apiComponentDependencies != null && !apiComponentDependencies.isEmpty()) {
        for (        ApiComponentDependency dependency : apiComponentDependencies) {
          ApiComponentDependencyInfo dependencyInfo=dependency.getApiComponentDependencyInfo();
          if (role.equals(dependencyInfo.getDependentComponentName())) {
            String denpendencyName=dependencyInfo.getComponentName();
            if (!allRoles.contains(denpendencyName)) {
              NotExistDenpendencyNames.add(denpendencyName);
            }
          }
        }
      }
      ApiComponentInfo apiComponentInfo=apiStackComponent.getApiComponent();
      if (role.equals(apiComponentInfo.getComponentName())) {
        Set<String> roleCategoryDependencies=validateRoleCategoryDependencies(apiComponentInfo,allRoles);
        if (roleCategoryDependencies != null && !roleCategoryDependencies.isEmpty()) {
          NotExistDenpendencyNames.addAll(roleCategoryDependencies);
        }
      }
    }
    if (!NotExistDenpendencyNames.isEmpty()) {
      warningMsgList.add("String_Node_Str" + role + "String_Node_Str"+ NotExistDenpendencyNames.toString());
    }
  }
}

Fixed version (ground truth):
private void validateRoleDependencies(List<NodeGroupInfo> nodeGroups,List<ApiStackComponent> apiStackComponents,List<String> unRecogRoles){
  if (nodeGroups == null || nodeGroups.isEmpty()) {
    return;
  }
  Set<String> allRoles=new HashSet<String>();
  for (  NodeGroupInfo group : nodeGroups) {
    allRoles.addAll(group.getRoles());
  }
  for (  String role : allRoles) {
    List<String> NotExistDenpendencyNames=new ArrayList<String>();
    for (    ApiStackComponent apiStackComponent : apiStackComponents) {
      List<ApiComponentDependency> apiComponentDependencies=apiStackComponent.getApiComponentDependencies();
      if (apiComponentDependencies != null && !apiComponentDependencies.isEmpty()) {
        for (        ApiComponentDependency dependency : apiComponentDependencies) {
          ApiComponentDependencyInfo dependencyInfo=dependency.getApiComponentDependencyInfo();
          if (role.equals(dependencyInfo.getDependentComponentName())) {
            String denpendencyName=dependencyInfo.getComponentName();
            if (!allRoles.contains(denpendencyName)) {
              NotExistDenpendencyNames.add(denpendencyName);
            }
          }
        }
      }
      ApiComponentInfo apiComponentInfo=apiStackComponent.getApiComponent();
      if (role.equals(apiComponentInfo.getComponentName())) {
        Set<String> roleCategoryDependencies=validateRoleCategoryDependencies(apiComponentInfo,allRoles,unRecogRoles);
        if (roleCategoryDependencies != null && !roleCategoryDependencies.isEmpty()) {
          NotExistDenpendencyNames.addAll(roleCategoryDependencies);
        }
      }
    }
    if (!NotExistDenpendencyNames.isEmpty()) {
      warningMsgList.add("String_Node_Str" + role + "String_Node_Str"+ NotExistDenpendencyNames.toString());
    }
  }
}