code: public static String getfullNameForDevice(final String deviceName) throws DevFailed {
          if (deviceName == null) {
              throw DevFailedUtils.newDevFailed("cannot retrieve device name", "device name is empty");
          }
          String result;
          final String[] fields = deviceName.split("/");
          final Database db = ApiUtil.get_db_obj();
          if (deviceName.contains(DBASE_NO)) {
              result = deviceName;
          } else if (fields.length == 1) {
              result = db.get_device_from_alias(fields[0]);
          } else {
              result = deviceName;
          }
          return result;
      }
docs: Get the full device name
  
  @param deviceName
  @return
  @throws DevFailed