Program: 105230
Project: 105230
Buggy source:
@Override public void updateStoragePool(StoragePool storagePool,Map<String,String> details){
  String capacityBytes=details.get(PrimaryDataStoreLifeCycle.CAPACITY_BYTES);
  String capacityIops=details.get(PrimaryDataStoreLifeCycle.CAPACITY_IOPS);
  StoragePoolVO storagePoolVO=_storagePoolDao.findById(storagePool.getId());
  try {
    if (capacityBytes != null) {
      long usedBytes=_capacityMgr.getUsedBytes(storagePoolVO);
      if (Long.parseLong(capacityBytes) < usedBytes) {
        throw new CloudRuntimeException("String_Node_Str");
      }
      UpdateTsmStorageCmdResponse updateTsmStorageCmdResponse=ElastistorUtil.updateElastistorTsmStorage(capacityBytes,storagePool.getUuid());
      if (updateTsmStorageCmdResponse.getStorage().getId() != null) {
        _storagePoolDao.updateCapacityBytes(storagePool.getId(),Long.valueOf(capacityBytes));
        s_logger.info("String_Node_Str");
      }
 else {
        throw new CloudRuntimeException("String_Node_Str" + updateTsmStorageCmdResponse.toString());
      }
    }
    if (capacityIops != null) {
      long usedIops=_capacityMgr.getUsedIops(storagePoolVO);
      if (Long.valueOf(capacityIops) < usedIops) {
        throw new CloudRuntimeException("String_Node_Str");
      }
      UpdateTsmCmdResponse updateTsmCmdResponse=ElastistorUtil.updateElastistorTsmIOPS(capacityIops,storagePool.getUuid());
      if (updateTsmCmdResponse.getTsm(0).getUuid() != null) {
        _storagePoolDao.updateCapacityIops(storagePool.getId(),Long.valueOf(capacityIops));
        s_logger.info("String_Node_Str");
      }
 else {
        throw new CloudRuntimeException("String_Node_Str" + updateTsmCmdResponse.toString());
      }
    }
  }
 catch (  Throwable e) {
    throw new CloudRuntimeException("String_Node_Str" + e);
  }
}

Fixed version (ground truth):
@Override public void updateStoragePool(StoragePool storagePool,Map<String,String> details){
  String capacityBytes=details.get(PrimaryDataStoreLifeCycle.CAPACITY_BYTES);
  String capacityIops=details.get(PrimaryDataStoreLifeCycle.CAPACITY_IOPS);
  StoragePoolVO storagePoolVO=_storagePoolDao.findById(storagePool.getId());
  try {
    if (capacityBytes != null) {
      long usedBytes=_capacityMgr.getUsedBytes(storagePoolVO);
      if (Long.parseLong(capacityBytes) < usedBytes) {
        throw new CloudRuntimeException("String_Node_Str");
      }
      UpdateTsmStorageCmdResponse updateTsmStorageCmdResponse=ElastistorUtil.updateElastistorTsmStorage(capacityBytes,storagePool.getUuid());
      if (updateTsmStorageCmdResponse.getStorage().getId() != null) {
        _storagePoolDao.updateCapacityBytes(storagePool.getId(),Long.parseLong(capacityBytes));
        s_logger.info("String_Node_Str");
      }
 else {
        throw new CloudRuntimeException("String_Node_Str" + updateTsmStorageCmdResponse.toString());
      }
    }
    if (capacityIops != null) {
      long usedIops=_capacityMgr.getUsedIops(storagePoolVO);
      if (Long.valueOf(capacityIops) < usedIops) {
        throw new CloudRuntimeException("String_Node_Str");
      }
      UpdateTsmCmdResponse updateTsmCmdResponse=ElastistorUtil.updateElastistorTsmIOPS(capacityIops,storagePool.getUuid());
      if (updateTsmCmdResponse.getTsm(0).getUuid() != null) {
        _storagePoolDao.updateCapacityIops(storagePool.getId(),Long.valueOf(capacityIops));
        s_logger.info("String_Node_Str");
      }
 else {
        throw new CloudRuntimeException("String_Node_Str" + updateTsmCmdResponse.toString());
      }
    }
  }
 catch (  Throwable e) {
    throw new CloudRuntimeException("String_Node_Str" + e);
  }
}