code: public static String getfullDeviceNameForAttribute(final String attributeName) throws DevFailed {
          checkNullOrEmptyString(attributeName);
          String result;
          if (attributeName.contains(DBASE_NO)) {
              result = attributeName.substring(0, attributeName.lastIndexOf(DEVICE_SEPARATOR));
          } else {
              final String[] fields = attributeName.split(DEVICE_SEPARATOR);
              if (fields.length == 1) {
                  result = getfullDeviceNameForAttribute(ApiUtil.get_db_obj().get_attribute_from_alias(fields[0]));
              } else if (fields.length == 2) {
                  result = ApiUtil.get_db_obj().get_device_from_alias(fields[0]);
              } else if (fields.length == 4) {
                  result = fields[0] + DEVICE_SEPARATOR + fields[1] + DEVICE_SEPARATOR + fields[2];
              } else {
                  throw DevFailedUtils.newDevFailed("TANGO_WRONG_DATA_ERROR", "cannot retrieve device name");
              }
          }
          return result;
      }
docs: Get the full device name for an attribute
  
  @param attributeName
  @return
  @throws DevFailed