Program: 105499
Project: 105499
Buggy source:
@Override public KVMStoragePool getStoragePool(String uuid,boolean refreshInfo){
  s_logger.debug("String_Node_Str" + uuid + "String_Node_Str");
  StoragePool storage=null;
  try {
    Connect conn=LibvirtConnection.getConnection();
    storage=conn.storagePoolLookupByUUIDString(uuid);
    if (storage.getInfo().state != StoragePoolState.VIR_STORAGE_POOL_RUNNING) {
      s_logger.debug("String_Node_Str" + uuid + "String_Node_Str");
      storage.create(0);
    }
    LibvirtStoragePoolDef spd=getStoragePoolDef(conn,storage);
    if (spd == null) {
      throw new CloudRuntimeException("String_Node_Str" + uuid);
    }
    StoragePoolType type=null;
    if (spd.getPoolType() == LibvirtStoragePoolDef.poolType.NETFS) {
      type=StoragePoolType.NetworkFilesystem;
    }
 else     if (spd.getPoolType() == LibvirtStoragePoolDef.poolType.DIR) {
      type=StoragePoolType.Filesystem;
    }
 else     if (spd.getPoolType() == LibvirtStoragePoolDef.poolType.RBD) {
      type=StoragePoolType.RBD;
    }
 else     if (spd.getPoolType() == LibvirtStoragePoolDef.poolType.LOGICAL) {
      type=StoragePoolType.CLVM;
    }
 else     if (spd.getPoolType() == LibvirtStoragePoolDef.poolType.GLUSTERFS) {
      type=StoragePoolType.Gluster;
    }
    LibvirtStoragePool pool=new LibvirtStoragePool(uuid,storage.getName(),type,this,storage);
    if (pool.getType() != StoragePoolType.RBD)     pool.setLocalPath(spd.getTargetPath());
 else     pool.setLocalPath("String_Node_Str");
    if (pool.getType() == StoragePoolType.RBD || pool.getType() == StoragePoolType.Gluster) {
      pool.setSourceHost(spd.getSourceHost());
      pool.setSourcePort(spd.getSourcePort());
      pool.setSourceDir(spd.getSourceDir());
      String authUsername=spd.getAuthUserName();
      if (authUsername != null) {
        Secret secret=conn.secretLookupByUUIDString(spd.getSecretUUID());
        String secretValue=new String(Base64.encodeBase64(secret.getByteValue()));
        pool.setAuthUsername(authUsername);
        pool.setAuthSecret(secretValue);
      }
    }
    if (refreshInfo) {
      pool.refresh();
    }
    pool.setCapacity(storage.getInfo().capacity);
    pool.setUsed(storage.getInfo().allocation);
    pool.setAvailable(storage.getInfo().available);
    return pool;
  }
 catch (  LibvirtException e) {
    s_logger.debug("String_Node_Str" + uuid + "String_Node_Str");
    throw new CloudRuntimeException(e.toString(),e);
  }
}

Fixed version (ground truth):
@Override public KVMStoragePool getStoragePool(String uuid,boolean refreshInfo){
  s_logger.debug("String_Node_Str" + uuid + "String_Node_Str");
  StoragePool storage=null;
  try {
    Connect conn=LibvirtConnection.getConnection();
    storage=conn.storagePoolLookupByUUIDString(uuid);
    if (storage.getInfo().state != StoragePoolState.VIR_STORAGE_POOL_RUNNING) {
      s_logger.debug("String_Node_Str" + uuid + "String_Node_Str");
      storage.create(0);
    }
    LibvirtStoragePoolDef spd=getStoragePoolDef(conn,storage);
    if (spd == null) {
      throw new CloudRuntimeException("String_Node_Str" + uuid);
    }
    StoragePoolType type=null;
    if (spd.getPoolType() == LibvirtStoragePoolDef.poolType.NETFS) {
      type=StoragePoolType.NetworkFilesystem;
    }
 else     if (spd.getPoolType() == LibvirtStoragePoolDef.poolType.DIR) {
      type=StoragePoolType.Filesystem;
    }
 else     if (spd.getPoolType() == LibvirtStoragePoolDef.poolType.RBD) {
      type=StoragePoolType.RBD;
    }
 else     if (spd.getPoolType() == LibvirtStoragePoolDef.poolType.LOGICAL) {
      type=StoragePoolType.CLVM;
    }
 else     if (spd.getPoolType() == LibvirtStoragePoolDef.poolType.GLUSTERFS) {
      type=StoragePoolType.Gluster;
    }
    LibvirtStoragePool pool=new LibvirtStoragePool(uuid,storage.getName(),type,this,storage);
    if (pool.getType() != StoragePoolType.RBD)     pool.setLocalPath(spd.getTargetPath());
 else     pool.setLocalPath("String_Node_Str");
    if (pool.getType() == StoragePoolType.RBD || pool.getType() == StoragePoolType.Gluster) {
      pool.setSourceHost(spd.getSourceHost());
      pool.setSourcePort(spd.getSourcePort());
      pool.setSourceDir(spd.getSourceDir());
      String authUsername=spd.getAuthUserName();
      if (authUsername != null) {
        Secret secret=conn.secretLookupByUUIDString(spd.getSecretUUID());
        String secretValue=new String(Base64.encodeBase64(secret.getByteValue()),Charset.defaultCharset());
        pool.setAuthUsername(authUsername);
        pool.setAuthSecret(secretValue);
      }
    }
    if (refreshInfo) {
      pool.refresh();
    }
    pool.setCapacity(storage.getInfo().capacity);
    pool.setUsed(storage.getInfo().allocation);
    pool.setAvailable(storage.getInfo().available);
    return pool;
  }
 catch (  LibvirtException e) {
    s_logger.debug("String_Node_Str" + uuid + "String_Node_Str");
    throw new CloudRuntimeException(e.toString(),e);
  }
}