Program: 48619
Project: 48619
Buggy source:
private void expandGroupStorage(NodeGroupEntity ngEntity,NodeGroupCreate group,EnumSet<HadoopRole> enumRoles){
  int storageSize=ngEntity.getStorageSize();
  DatastoreType storageType=ngEntity.getStorageType();
  List<String> storeNames=ngEntity.getVcDatastoreNameList();
  List<String> dataDiskStoreNames=ngEntity.getDdDatastoreNameList();
  List<String> systemDiskStoreNames=ngEntity.getSdDatastoreNameList();
  if (storageSize <= 0 && storageType == null && (storeNames == null || storeNames.isEmpty())) {
    logger.debug("String_Node_Str" + ngEntity.getName());
  }
  logger.debug("String_Node_Str" + storageSize + "String_Node_Str"+ ngEntity.getName());
  logger.debug("String_Node_Str" + storageType + "String_Node_Str"+ ngEntity.getName());
  logger.debug("String_Node_Str" + storeNames + "String_Node_Str"+ ngEntity.getName());
  logger.debug("String_Node_Str" + systemDiskStoreNames + "String_Node_Str"+ ngEntity.getName());
  logger.debug("String_Node_Str" + dataDiskStoreNames + "String_Node_Str"+ ngEntity.getName());
  StorageRead storage=new StorageRead();
  group.setStorage(storage);
  storage.setSizeGB(storageSize);
  if (storageType != null) {
    storage.setType(storageType.toString().toLowerCase());
  }
  if (systemDiskStoreNames != null && !systemDiskStoreNames.isEmpty())   storage.setImagestoreNamePattern(getDatastoreNamePattern(storageType,systemDiskStoreNames));
 else   storage.setImagestoreNamePattern(getDatastoreNamePattern(storageType,storeNames));
  if (dataDiskStoreNames != null && !dataDiskStoreNames.isEmpty())   storage.setDiskstoreNamePattern(getDatastoreNamePattern(storageType,dataDiskStoreNames));
 else   storage.setDiskstoreNamePattern(getDatastoreNamePattern(storageType,storeNames));
  storage.setShares(ngEntity.getCluster().getIoShares());
  if ((ngEntity.getCluster().getAppManager() == null) && (enumRoles.size() == 1 || (enumRoles.size() == 2 && enumRoles.contains(HadoopRole.HADOOP_JOURNALNODE_ROLE))) && (enumRoles.contains(HadoopRole.ZOOKEEPER_ROLE) || enumRoles.contains(HadoopRole.MAPR_ZOOKEEPER_ROLE))) {
    logger.debug("String_Node_Str");
    storage.setSplitPolicy(DiskSplitPolicy.BI_SECTOR);
  }
 else {
    if (storage.getType().equalsIgnoreCase(DatastoreType.LOCAL.toString())) {
      logger.debug("String_Node_Str");
      storage.setSplitPolicy(DiskSplitPolicy.EVEN_SPLIT);
    }
 else {
      logger.debug("String_Node_Str");
      storage.setSplitPolicy(DiskSplitPolicy.AGGREGATE);
    }
  }
  setDiskAttributes(storageType,storage,storeNames);
}

Fixed version (ground truth):
private void expandGroupStorage(NodeGroupEntity ngEntity,NodeGroupCreate group,EnumSet<HadoopRole> enumRoles){
  int storageSize=ngEntity.getStorageSize();
  DatastoreType storageType=ngEntity.getStorageType();
  List<String> storeNames=ngEntity.getVcDatastoreNameList();
  List<String> dataDiskStoreNames=ngEntity.getDdDatastoreNameList();
  List<String> systemDiskStoreNames=ngEntity.getSdDatastoreNameList();
  if (storageSize <= 0 && storageType == null && (storeNames == null || storeNames.isEmpty())) {
    logger.debug("String_Node_Str" + ngEntity.getName());
  }
  logger.debug("String_Node_Str" + storageSize + "String_Node_Str"+ ngEntity.getName());
  logger.debug("String_Node_Str" + storageType + "String_Node_Str"+ ngEntity.getName());
  logger.debug("String_Node_Str" + storeNames + "String_Node_Str"+ ngEntity.getName());
  logger.debug("String_Node_Str" + systemDiskStoreNames + "String_Node_Str"+ ngEntity.getName());
  logger.debug("String_Node_Str" + dataDiskStoreNames + "String_Node_Str"+ ngEntity.getName());
  StorageRead storage=new StorageRead();
  group.setStorage(storage);
  storage.setSizeGB(storageSize);
  if (storageType != null) {
    storage.setType(storageType.toString().toLowerCase());
  }
  if (systemDiskStoreNames != null && !systemDiskStoreNames.isEmpty())   storage.setImagestoreNamePattern(getDatastoreNamePattern(storageType,systemDiskStoreNames));
 else   storage.setImagestoreNamePattern(getDatastoreNamePattern(storageType,storeNames));
  if (dataDiskStoreNames != null && !dataDiskStoreNames.isEmpty())   storage.setDiskstoreNamePattern(getDatastoreNamePattern(storageType,dataDiskStoreNames));
 else   storage.setDiskstoreNamePattern(getDatastoreNamePattern(storageType,storeNames));
  storage.setShares(ngEntity.getCluster().getIoShares());
  if ((ngEntity.getCluster().getAppManager() == null || Constants.IRONFAN.equalsIgnoreCase(ngEntity.getCluster().getAppManager())) && (enumRoles.size() == 1 || (enumRoles.size() == 2 && enumRoles.contains(HadoopRole.HADOOP_JOURNALNODE_ROLE))) && (enumRoles.contains(HadoopRole.ZOOKEEPER_ROLE) || enumRoles.contains(HadoopRole.MAPR_ZOOKEEPER_ROLE))) {
    logger.debug("String_Node_Str");
    storage.setSplitPolicy(DiskSplitPolicy.BI_SECTOR);
  }
 else {
    if (storage.getType().equalsIgnoreCase(DatastoreType.LOCAL.toString())) {
      logger.debug("String_Node_Str");
      storage.setSplitPolicy(DiskSplitPolicy.EVEN_SPLIT);
    }
 else {
      logger.debug("String_Node_Str");
      storage.setSplitPolicy(DiskSplitPolicy.AGGREGATE);
    }
  }
  setDiskAttributes(storageType,storage,storeNames);
}