Program: 48895
Project: 48895
Buggy source:
@SuppressWarnings("String_Node_Str") @Override public boolean createVcVms(NetworkAdd networkAdd,List<BaseNode> vNodes,StatusUpdater statusUpdator,Set<String> occupiedIps){
  if (vNodes.isEmpty()) {
    logger.info("String_Node_Str");
    return true;
  }
  setNetworkSchema(vNodes);
  allocateStaticIp(networkAdd,vNodes,occupiedIps);
  Map<String,Folder> folders=createVcFolders(vNodes.get(0).getCluster());
  String clusterRpName=createVcResourcePools(vNodes);
  logger.info("String_Node_Str");
  VcVmUtil.updateVm(templateVm.getId());
  VmCreateSpec sourceSpec=new VmCreateSpec();
  sourceSpec.setVmId(templateVm.getId());
  sourceSpec.setVmName(templateVm.getName());
  sourceSpec.setTargetHost(templateVm.getHost());
  List<VmCreateSpec> specs=new ArrayList<VmCreateSpec>();
  Map<String,BaseNode> nodeMap=new HashMap<String,BaseNode>();
  for (  BaseNode vNode : vNodes) {
    nodeMap.put(vNode.getVmName(),vNode);
    vNode.setSuccess(false);
    vNode.setFinished(true);
    VmCreateSpec spec=new VmCreateSpec();
    VmSchema createSchema=getVmSchema(vNode);
    spec.setSchema(createSchema);
    Map<String,String> guestVariable=getNetworkGuestVariable(networkAdd,vNode.getIpAddress(),vNode.getGuestHostName());
    spec.setBootupConfigs(guestVariable);
    QueryIpAddress query=new QueryIpAddress(Constants.VM_POWER_ON_WAITING_SEC);
    spec.setPostPowerOn(query);
    spec.setPrePowerOn(getPrePowerOnFunc(vNode));
    spec.setLinkedClone(false);
    spec.setTargetDs(getVcDatastore(vNode));
    spec.setTargetFolder(folders.get(vNode.getGroupName()));
    spec.setTargetHost(VcResourceUtils.findHost(vNode.getTargetHost()));
    spec.setTargetRp(getVcResourcePool(vNode,clusterRpName));
    spec.setVmName(vNode.getVmName());
    specs.add(spec);
  }
  try {
    UpdateVmProgressCallback callback=new UpdateVmProgressCallback(clusterEntityMgr,statusUpdator,vNodes.get(0).getClusterName());
    logger.info("String_Node_Str");
    List<VmCreateSpec> results=cloneService.createCopies(sourceSpec,cloneConcurrency,specs,callback);
    logger.info(results.size() + "String_Node_Str");
    boolean success=(specs.size() == results.size());
    for (    VmCreateSpec spec : results) {
      BaseNode node=nodeMap.get(spec.getVmName());
      node.setVmMobId(spec.getVmId());
      VcVirtualMachine vm=VcCache.getIgnoreMissing(spec.getVmId());
      if (vm != null) {
        boolean vmSucc=VcVmUtil.setBaseNodeForVm(node,vm);
        if (!vmSucc) {
          success=false;
        }
      }
      node.setSuccess(success);
    }
    return success;
  }
 catch (  Exception e) {
    logger.error("String_Node_Str",e);
    throw BddException.INTERNAL(e,e.getMessage());
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Override public boolean createVcVms(NetworkAdd networkAdd,List<BaseNode> vNodes,StatusUpdater statusUpdator,Set<String> occupiedIps){
  if (vNodes.isEmpty()) {
    logger.info("String_Node_Str");
    return true;
  }
  setNetworkSchema(vNodes);
  allocateStaticIp(networkAdd,vNodes,occupiedIps);
  Map<String,Folder> folders=createVcFolders(vNodes.get(0).getCluster());
  String clusterRpName=createVcResourcePools(vNodes);
  logger.info("String_Node_Str");
  VcVmUtil.updateVm(templateVm.getId());
  VmCreateSpec sourceSpec=new VmCreateSpec();
  sourceSpec.setVmId(templateVm.getId());
  sourceSpec.setVmName(templateVm.getName());
  sourceSpec.setTargetHost(templateVm.getHost());
  List<VmCreateSpec> specs=new ArrayList<VmCreateSpec>();
  Map<String,BaseNode> nodeMap=new HashMap<String,BaseNode>();
  for (  BaseNode vNode : vNodes) {
    nodeMap.put(vNode.getVmName(),vNode);
    vNode.setSuccess(false);
    vNode.setFinished(true);
    VmCreateSpec spec=new VmCreateSpec();
    VmSchema createSchema=getVmSchema(vNode);
    spec.setSchema(createSchema);
    Map<String,String> guestVariable=getNetworkGuestVariable(networkAdd,vNode.getIpAddress(),vNode.getGuestHostName());
    spec.setBootupConfigs(guestVariable);
    QueryIpAddress query=new QueryIpAddress(Constants.VM_POWER_ON_WAITING_SEC);
    spec.setPostPowerOn(query);
    spec.setPrePowerOn(getPrePowerOnFunc(vNode));
    spec.setLinkedClone(false);
    spec.setTargetDs(getVcDatastore(vNode));
    spec.setTargetFolder(folders.get(vNode.getGroupName()));
    spec.setTargetHost(VcResourceUtils.findHost(vNode.getTargetHost()));
    spec.setTargetRp(getVcResourcePool(vNode,clusterRpName));
    spec.setVmName(vNode.getVmName());
    specs.add(spec);
  }
  try {
    UpdateVmProgressCallback callback=new UpdateVmProgressCallback(clusterEntityMgr,statusUpdator,vNodes.get(0).getClusterName());
    logger.info("String_Node_Str");
    AuAssert.check(specs.size() > 0);
    VmSchema vmSchema=specs.get(0).getSchema();
    VcVmUtil.checkAndCreateSnapshot(vmSchema);
    List<VmCreateSpec> results=cloneService.createCopies(sourceSpec,cloneConcurrency,specs,callback);
    logger.info(results.size() + "String_Node_Str");
    boolean success=(specs.size() == results.size());
    for (    VmCreateSpec spec : results) {
      BaseNode node=nodeMap.get(spec.getVmName());
      node.setVmMobId(spec.getVmId());
      VcVirtualMachine vm=VcCache.getIgnoreMissing(spec.getVmId());
      if (vm != null) {
        boolean vmSucc=VcVmUtil.setBaseNodeForVm(node,vm);
        if (!vmSucc) {
          success=false;
        }
      }
      node.setSuccess(success);
    }
    return success;
  }
 catch (  Exception e) {
    logger.error("String_Node_Str",e);
    throw BddException.INTERNAL(e,e.getMessage());
  }
}