Program: 105457
Project: 105457
Buggy source:
@Override public boolean connectPhysicalDisk(String volumeUuid,KVMStoragePool pool,Map<String,String> details){
  StoragePool sp=null;
  Connect conn=null;
  String targetPath=null;
  LibvirtStoragePoolDef spd=null;
  try {
    conn=LibvirtConnection.getConnection();
    targetPath="String_Node_Str" + volumeUuid;
    spd=new LibvirtStoragePoolDef(poolType.NETFS,volumeUuid,details.get(DiskTO.UUID),pool.getSourceHost(),details.get(DiskTO.MOUNT_POINT),targetPath);
    _storageLayer.mkdir(targetPath);
    s_logger.debug(spd.toString());
    sp=conn.storagePoolCreateXML(spd.toString(),0);
    if (sp == null) {
      throw new CloudRuntimeException("String_Node_Str" + volumeUuid);
    }
    try {
      if (sp.isActive() == 0) {
        sp.create(0);
      }
      LibvirtStoragePool storagePool=(LibvirtStoragePool)getStoragePool(pool.getUuid());
      storagePool.setPool(sp);
      return true;
    }
 catch (    LibvirtException e) {
      String error=e.toString();
      if (error.contains("String_Node_Str")) {
        throw new CloudRuntimeException("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ error);
      }
 else {
        throw new CloudRuntimeException(error);
      }
    }
  }
 catch (  LibvirtException e) {
    s_logger.error(e.toString());
    if (e.toString().contains("String_Node_Str")) {
      s_logger.error("String_Node_Str" + targetPath);
      String result=Script.runSimpleBashScript("String_Node_Str" + targetPath);
      if (result == null) {
        s_logger.error("String_Node_Str" + targetPath);
        try {
          sp=conn.storagePoolCreateXML(spd.toString(),0);
          s_logger.error("String_Node_Str");
          return true;
        }
 catch (        LibvirtException l) {
          s_logger.error("String_Node_Str" + l);
        }
      }
 else {
        s_logger.error("String_Node_Str");
      }
    }
 else {
      s_logger.error("String_Node_Str" + e.getMessage());
      e.printStackTrace();
      throw new CloudRuntimeException(e.toString());
    }
    return false;
  }
}

Fixed version (ground truth):
@Override public boolean connectPhysicalDisk(String volumeUuid,KVMStoragePool pool,Map<String,String> details){
  StoragePool sp=null;
  Connect conn=null;
  String targetPath=null;
  LibvirtStoragePoolDef spd=null;
  try {
    conn=LibvirtConnection.getConnection();
    if (conn == null) {
      throw new CloudRuntimeException("String_Node_Str");
    }
    targetPath="String_Node_Str" + volumeUuid;
    spd=new LibvirtStoragePoolDef(poolType.NETFS,volumeUuid,details.get(DiskTO.UUID),pool.getSourceHost(),details.get(DiskTO.MOUNT_POINT),targetPath);
    _storageLayer.mkdir(targetPath);
    s_logger.debug(spd.toString());
    sp=conn.storagePoolCreateXML(spd.toString(),0);
    if (sp == null) {
      throw new CloudRuntimeException("String_Node_Str" + volumeUuid);
    }
    try {
      if (sp.isActive() == 0) {
        sp.create(0);
      }
      LibvirtStoragePool storagePool=(LibvirtStoragePool)getStoragePool(pool.getUuid());
      storagePool.setPool(sp);
      return true;
    }
 catch (    LibvirtException e) {
      String error=e.toString();
      if (error.contains("String_Node_Str")) {
        throw new CloudRuntimeException("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ error);
      }
 else {
        throw new CloudRuntimeException(error);
      }
    }
  }
 catch (  LibvirtException e) {
    s_logger.error(e.toString());
    if (e.toString().contains("String_Node_Str")) {
      s_logger.error("String_Node_Str" + targetPath);
      String result=Script.runSimpleBashScript("String_Node_Str" + targetPath);
      if (result == null) {
        s_logger.error("String_Node_Str" + targetPath);
        try {
          conn.storagePoolCreateXML(spd.toString(),0);
          s_logger.error("String_Node_Str");
          return true;
        }
 catch (        LibvirtException l) {
          s_logger.error("String_Node_Str" + l);
        }
      }
 else {
        s_logger.error("String_Node_Str");
      }
    }
 else {
      s_logger.error("String_Node_Str" + e.getMessage());
      e.printStackTrace();
      throw new CloudRuntimeException(e.toString());
    }
    return false;
  }
}