code: public static String getfullDeviceNameForAttribute(final String attributeName) throws DevFailed {
          String result;
          final String[] fields = attributeName.split("/");
          final Database db = ApiUtil.get_db_obj();
          if (fields.length == 1) {
              result = db.get_attribute_from_alias(fields[0]);
          } else if (fields.length == 2) {
              result = db.get_device_from_alias(fields[0]);
          } else if (fields.length == 4) {
              result = fields[0] + "/" + fields[1] + "/" + 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