Get a raw message from the resource bundles using the given code.
499134
public String getMessage(final String code) {
    checkNotNull(code);

    for (ResourceBundle bundle : bundles) {
      try {
        return bundle.getString(code);
      }
      catch (MissingResourceException e) {
        log.trace(e.toString(), e);
      }
    }

    throw new ResourceNotFoundException(code);
  }
1284235
def from_raw_message(cls, rawmessage):
        """"""
        if (rawmessage[5] &
                MESSAGE_FLAG_EXTENDED_0X10) == MESSAGE_FLAG_EXTENDED_0X10:
            if len(rawmessage) >= ExtendedSend.receivedSize:
                msg = ExtendedSend.from_raw_message(rawmessage)
            else:
                msg = None
        else:
            msg = StandardSend(rawmessage[2:5],
                               {'cmd1': rawmessage[6],
                                'cmd2': rawmessage[7]},
                               flags=rawmessage[5],
                               acknak=rawmessage[8:9])
        return msg
11421
@Override
    public String getMessage(String code, Object[] args, String defaultMessage, Locale locale) {
        return activity.getActivityContext().getMessageSource().getMessage(code, args, defaultMessage, locale);
    }
258392
def get_message(self):
        """"""

        result = ''
        if self._data_struct is not None:
            result = self._data_struct[KEY_MESSAGE]
        return result
446701
public static String getText(String code, Object[] args, Locale locale) {
        Preconditions.checkState(messageSource != null,
                "If i18n is enabled, please make sure MessageSource is properly set as a member in "
                        + "MessageSupport");
        return messageSource.getMessage(code, args, locale);
    }
475598
private static String getResource(Bundle myBundle, String resourcePath) {
        if (myBundle == null)
            return null;
        String bundleShortDescription = getBundleDescription(myBundle);
        StringBuilder responseString = new StringBuilder();
        URL bundleResource = myBundle.getResource(resourcePath);
        if (bundleResource != null) {
            BufferedReader br = null;
            try { // read the requested resource from the bundle
                br = new BufferedReader(new InputStreamReader(bundleResource.openConnection().getInputStream(), "UTF-8"));
                while (br.ready()) {
                    responseString.append(br.readLine());
                }
                br.close();
            } catch (Exception e) { // shouldn't happen
                if (OpenAPIUtils.isEventEnabled(tc)) {
                    Tr.event(tc, "Exception trying to read resource at " + resourcePath + " from bundle " + bundleShortDescription);
                }
            }

        } else {
            if (OpenAPIUtils.isEventEnabled(tc)) {
                Tr.event(tc, "Unexpected error getting resource from WAB bundle.");
            }
        }
        return responseString.toString();
    }
502409
public static String getString(String key)
    {
        if (RESOURCE_BUNDLE == null)
            throw new RuntimeException("Localized messages from resource bundle '" + BUNDLE_NAME + "' not loaded during initialization of driver.");

        try
        {
            if (key == null)
                throw new IllegalArgumentException("Message key can not be null");

            String message = RESOURCE_BUNDLE.getString(key);
            if (message == null)
                message = "Missing error message for key '" + key + "'";

            return message;
        }
        catch (MissingResourceException e)
        {
            return '!' + key + '!';
        }
    }
591940
def get_rate(self, code):
        
        rateslist = self.rates['list']['resources']
        for rate in rateslist:
            rateobj = rate['resource']['fields']
            if rateobj['symbol'].startswith(code):
                return rateobj
        raise RuntimeError("%s: %s not found" % (self.name, code))
1154783
@Override
	public Reader getResource(JoinableResourceBundle bundle, String resourceName, boolean processingBundle) {

		Reader rd = null;
		if (processingBundle) {
			String path = getCssPath(resourceName);
			rd = ((TextResourceReader) resourceReader).getResource(bundle, path, processingBundle);
		}

		return rd;
	}
868604
static public String getString(String msg)
	{
		if (bundle == null)
			return msg;
		try
		{
			return bundle.getString(msg);
		}
		catch (MissingResourceException e)
		{
			return "Missing message: " + msg; //$NON-NLS-1$
		}
	}
49908
function getCode(code, opts, attrs, url) {
  var type = getType(attrs),
    parserOpts = getParserOptions(attrs)

  //#if NODE
  // istanbul ignore else
  if (url) {
    var src = getAttr(attrs, 'src')
    if (src) {
      var
        charset = getAttr(attrs, 'charset'),
        file = path.resolve(path.dirname(url), src)
      code = require('fs').readFileSync(file, charset || 'utf8')
    }
  }
  //#endif
  return _compileJS(code, opts, type, parserOpts, url)
}
1255599
def get_quote(self, code, as_json=False):
        
        code = code.upper()
        if self.is_valid_code(code):
            url = self.build_url_for_quote(code)
            req = Request(url, None, self.headers)
            # this can raise HTTPError and URLError, but we are not handling it
            # north bound APIs should use it for exception handling
            res = self.opener.open(req)

            # for py3 compat covert byte file like object to
            # string file like object
            res = byte_adaptor(res)
            res = res.read()
            # Now parse the response to get the relevant data
            match = re.search(\
                        r'<div\s+id="responseDiv"\s+style="display:none">(.*?)</div>',
                        res, re.S
                    )
            try:
                buffer = match.group(1).strip()
                # commenting following two lines because now we are not using ast and instead
                # relying on json's ability to do parsing. Should be much faster and more
                # reliable. 
                #buffer = js_adaptor(buffer)
                #response = self.clean_server_response(ast.literal_eval(buffer)['data'][0])
                response = self.clean_server_response(json.loads(buffer)['data'][0])
            except SyntaxError as err:
                raise Exception('ill formatted response')
            else:
                return self.render_response(response, as_json)
        else:
            return None
564235
private String getResourceText(String key) {
        String text = null;
        if (key != null) {
            ResourceBundle bundle = null;

            // retrieve the resource bundle
            try {
                bundle = ResourceBundle.getBundle(DIST_EX_RESOURCE_BUNDLE_NAME);
            } catch (MissingResourceException e) {
                // do nothing
            }

            // if the resource bundle was successfully retrieved, get the specific text based
            // on the resource key
            if (bundle != null) {
                try {
                    text = bundle.getString(key);
                } catch (MissingResourceException e) {
                    // do nothing
                }
            }
        } else { // no key was provided
            // do nothing
        }
        return text;
    }
944855
def _get_code(data, position, obj_end, opts, element_name):
    """"""
    code, position = _get_string(data, position, obj_end, opts, element_name)
    return Code(code), position
879086
def extract_code_objects(pe):
    """"""
    script_res = _get_scripts_resource(pe)
    dump = _resource_dump(pe, script_res)
    return _get_co_from_dump(dump)
604506
def message(self) -> str:
        """"""
        ret = '{}: {}'.format(self.code, self.short_desc)
        if self.context is not None:
            specific_error_msg = self.context.format(*self.parameters)
            ret += ' ({})'.format(specific_error_msg)
        return ret
524775
public static String getReplyCodeAsString(byte code) {
        switch (code) {
        // v4 & v4a codes
        case V4_REPLY_REQUEST_GRANTED:
            return "Request granted";
        case V4_REPLY_REQUEST_REJECTED_OR_FAILED:
            return "Request rejected or failed";
        case V4_REPLY_REQUEST_FAILED_NO_IDENTD:
            return "Request failed because client is not running identd (or not reachable from the server)";
        case V4_REPLY_REQUEST_FAILED_ID_NOT_CONFIRMED:
            return "Request failed because client's identd could not confirm the user ID string in the request";

        // v5 codes
        case V5_REPLY_SUCCEEDED:
            return "Request succeeded";
        case V5_REPLY_GENERAL_FAILURE:
            return "Request failed: general SOCKS server failure";
        case V5_REPLY_NOT_ALLOWED:
            return "Request failed: connection not allowed by ruleset";
        case V5_REPLY_NETWORK_UNREACHABLE:
            return "Request failed: network unreachable";
        case V5_REPLY_HOST_UNREACHABLE:
            return "Request failed: host unreachable";
        case V5_REPLY_CONNECTION_REFUSED:
            return "Request failed: connection refused";
        case V5_REPLY_TTL_EXPIRED:
            return "Request failed: TTL expired";
        case V5_REPLY_COMMAND_NOT_SUPPORTED:
            return "Request failed: command not supported";
        case V5_REPLY_ADDRESS_TYPE_NOT_SUPPORTED:
            return "Request failed: address type not supported";

        default:
            return "Unknown reply code";
        }
    }