"CDP" 以外の namespace で定義した場合は、ASSIGN ユーティリティをコールする. ASSIGN_RESULT_CODE_BASE(RESULT_CODE_BASE); 
@en Generate success code.
@ja 成功コードを生成

@param base
@param localCode
@param message
327060
function DECLARE_SUCCESS_CODE(base, localCode, message) {
        if ("string" === typeof base) {
            base = CDP.RESULT_CODE_BASE[base];
        }
        return declareResultCode(base, localCode, message, true);
    }
1242057
function createLocalRequire(baseId) {
        var requiredCache = {};

        function req(requireId, callback) {
            if (typeof requireId === 'string') {
                if (!requiredCache[requireId]) {
                    var topLevelId = normalize(requireId, baseId);

                    // 根据 https://github.com/amdjs/amdjs-api/wiki/require
                    // It MUST throw an error if the module has not
                    // already been loaded and evaluated.
                    modTryInvokeFactory(topLevelId);
                    if (!modIs(topLevelId, MODULE_DEFINED)) {
                        throw new Error('[MODULE_MISS]"' + topLevelId + '" is not exists!');
                    }

                    requiredCache[requireId] = modModules[topLevelId].exports;
                }

                return requiredCache[requireId];
            }
            else if (requireId instanceof Array) {
                // 分析是否有resource，取出pluginModule先
                var pureModules = [];
                var normalizedIds = [];

                each(
                    requireId,
                    function (id, i) {
                        var idInfo = parseId(id);
                        var absId = normalize(idInfo.mod, baseId);
                        var resId = idInfo.res;
                        var normalizedId = absId;

                        if (resId) {
                            var trueResId = absId + '!' + resId;
                            if (resId.indexOf('.') !== 0 && bundlesIndex[trueResId]) {
                                absId = normalizedId = trueResId;
                            }
                            else {
                                normalizedId = null;
                            }
                        }

                        normalizedIds[i] = normalizedId;
                        modFlagAutoDefine(absId);
                        pureModules.push(absId);
                    }
                );

                // 加载模块
                nativeAsyncRequire(
                    pureModules,
                    function () {
                        /* jshint ignore:start */
                        each(normalizedIds, function (id, i) {
                            if (id == null) {
                                id = normalizedIds[i] = normalize(requireId[i], baseId);
                                modFlagAutoDefine(id);
                            }
                        });
                        /* jshint ignore:end */

                        // modAutoDefine中，factory invoke可能发生错误
                        // 从而导致nativeAsyncRequire没有被调用，callback没挂上
                        // 所以nativeAsyncRequire要先运行
                        nativeAsyncRequire(normalizedIds, callback, baseId);
                        modAutoDefine();
                    },
                    baseId
                );
                modAutoDefine();
            }
        }

        /**
         * 将[module ID] + '.extension'格式的字符串转换成url
         *
         * @inner
         * @param {string} id 符合描述格式的源字符串
         * @return {string} url
         */
        req.toUrl = function (id) {
            return toUrl(id, baseId || '');
        };

        return req;
    }
212709
protected MessageFormat resolveCodeFromPlugins(String code, Locale locale) {
        if (pluginCacheMillis < 0) {
            PropertiesHolder propHolder = getMergedPluginProperties(locale);
            MessageFormat result = propHolder.getMessageFormat(code, locale);
            if (result != null) {
                return result;
            }
        }
        else {
            MessageFormat result = findMessageFormatInBinaryPlugins(code, locale);
            if (result != null) return result;
        }
        return null;
    }
1082179
public void returnValue(Local<?> result) {
        if (!result.type.equals(method.returnType)) {
            // TODO: this is probably too strict.
            throw new IllegalArgumentException("declared " + method.returnType
                    + " but returned " + result.type);
        }
        addInstruction(new PlainInsn(Rops.opReturn(result.type.ropType), sourcePosition,
                null, RegisterSpecList.make(result.spec())));
    }
1232038
public static Result success(int code, String message) {
        return new Result(true, String.valueOf(code), message);
    }
885346
public void writeStartElement(String prefix, String localName,
			String namespaceURI) throws XMLStreamException {
		try {
			assert (namespaceURI != null);
			assert (localName != null);
			// System.out.println("> SE " + localName);
			checkPendingATEvents();
			encoder.encodeStartElement(namespaceURI, localName, prefix);
			pendingATs = true;
		} catch (Exception e) {
			throw new XMLStreamException(e.getLocalizedMessage(), e);
		}
	}
433267
private void doMultiMapContains(final Message<JsonObject> message) {
    final String name = message.body().getString("name");
    if (name == null) {
      message.reply(new JsonObject().putString("status", "error").putString("message", "No name specified."));
      return;
    }

    final Object key = message.body().getValue("key");
    final Object value = message.body().getValue("value");

    if (key != null && value != null) {
      context.execute(new Action<Boolean>() {
        @Override
        public Boolean perform() {
          return data.getMultiMap(formatKey(name)).containsEntry(key, value);
        }
      }, new Handler<AsyncResult<Boolean>>() {
        @Override
        public void handle(AsyncResult<Boolean> result) {
          if (result.failed()) {
            message.reply(new JsonObject().putString("status", "error").putString("message", result.cause().getMessage()));
          } else {
            message.reply(new JsonObject().putString("status", "ok").putBoolean("result", result.result()));
          }
        }
      });
    } else if (key != null) {
      context.execute(new Action<Boolean>() {
        @Override
        public Boolean perform() {
          return data.getMultiMap(formatKey(name)).containsKey(key);
        }
      }, new Handler<AsyncResult<Boolean>>() {
        @Override
        public void handle(AsyncResult<Boolean> result) {
          if (result.failed()) {
            message.reply(new JsonObject().putString("status", "error").putString("message", result.cause().getMessage()));
          } else {
            message.reply(new JsonObject().putString("status", "ok").putBoolean("result", result.result()));
          }
        }
      });
    } else if (value != null) {
      context.execute(new Action<Boolean>() {
        @Override
        public Boolean perform() {
          return data.getMultiMap(formatKey(name)).containsValue(key);
        }
      }, new Handler<AsyncResult<Boolean>>() {
        @Override
        public void handle(AsyncResult<Boolean> result) {
          if (result.failed()) {
            message.reply(new JsonObject().putString("status", "error").putString("message", result.cause().getMessage()));
          } else {
            message.reply(new JsonObject().putString("status", "ok").putBoolean("result", result.result()));
          }
        }
      });
    } else {
      message.reply(new JsonObject().putString("status", "error").putString("message", "No key or value specified."));
    }
  }
769348
public void assignTo(HttpOutputMessage message) throws IOException {
		Assert.notNull(message, "Message must not be null");
		HttpHeaders headers = message.getHeaders();
		headers.setContentLength(this.data.remaining());
		headers.add(SEQ_HEADER, Long.toString(getSequence()));
		headers.setContentType(MediaType.APPLICATION_OCTET_STREAM);
		WritableByteChannel body = Channels.newChannel(message.getBody());
		while (this.data.hasRemaining()) {
			body.write(this.data);
		}
		body.close();
	}
1291741
protected void localRelease()
    {
        super.localRelease();

        _idScope = null;
        _writeScript = false;
        _genScope = false;
        _writeId = false;

        if (_funcBlocks != null)
            _funcBlocks.clear();
        if (_codeBefore != null)
            _codeBefore.clear();
        if (_codeAfter != null)
            _codeAfter.clear();

        if (_idMap != null)
            _idMap.clear();
        if (_idToNameMap != null)
            _idToNameMap.clear();
    }
1324845
@Override
	public String resolveLocaleCode(final HttpServletRequest request) {

		String localCode = null;
		if (request.getLocale() != Locale.getDefault()) {
			localCode = request.getLocale().toString();
		}

		return localCode;
	}
238075
public static void addBundleToCache(String baseName, Locale locale, I_CmsResourceBundle bundle) {

        String key = baseName;
        if (locale != null) {
            key += "_" + locale;
        }
        m_permanentCache.put(key, bundle);
    }
832069
function (singular) {
    var self = this;
    this.singluer = singular;
    this.requireDefaultFile = false;
    // [CDP customize]
    this.folderName = '..\\..\\app\\res\\locales';
    // [CDP customize]
    this.formatLine = function (key, value) {
        var v2 = '' + value;
        return '  "' + key + '": "' + v2.replace(/"/g, '\\"') + '",\n';
    };
    this.formatLastLine = function (key, value) {
        var v2 = '' + value;
        return '  "' + key + '": "' + v2.replace(/"/g, '\\"') + '"\n';
    };
    this.formatComment = function (comment) {
        return '';
    };
    this.formatEmptyLine = function () { return ''; };
    this.formatHeader = function (localeKey) {
        return self.singluer ? '{\n' : '';
    };
    this.formatFooter = function (localeKey) {
        // [CDP customize]
        return self.singluer ? '\n}' : '\n';
        // [CDP customize]
    };
    this.getFilePath = function (folderPath, localeKey) {
        return folderPath + '\\messages.' + localeKey + '.json';
    };
    this.normalizeLines = function (lines) {
        // format: json-singluer, noop.
        if (self.singluer) {
            return lines;
        }

        // ensure JSON object
        (function () {
            if (typeof JSON !== 'object') {
                var fileStream = fso.openTextFile('.\\json2.js');
                var fileData = fileStream.readAll();
                fileStream.Close();
                /*jshint evil: true */
                eval(fileData);
                /*jshint evil: false */
            }
        }());

        var flatJsonObj = (function () {
            var flatSrc = '{\n';
            for (var i = 0, n = lines.length; i < n; i++) {
                var line = lines[i];
                if (i === n - 1) {  // last line
                    line = line.split(',')[0];
                }
                flatSrc += line;
            }
            flatSrc += '\n}';
            return JSON.parse(flatSrc);
        }());

        var jsonText = (function (flat) {
            var normalize = {};
            for (var key in flat) {
                var value = flat[key];
                var keys = key.split(".");
                var temp = normalize;
                for (var i = 0, n = keys.length; i < n; i++) {
                    if (!temp[keys[i]]) {
                        if (i < n - 1) {
                            temp[keys[i]] = {};
                        } else {
                            temp[keys[i]] = value;
                        }
                    }
                    temp = temp[keys[i]];
                }
            }
            return JSON.stringify(normalize, null, 4);
        }(flatJsonObj));

        return jsonText.split('\r\n');
    };
}
524016
static String buildMessage(BeanResolutionContext resolutionContext, FieldInjectionPoint fieldInjectionPoint, String message, boolean circular) {
        StringBuilder builder = new StringBuilder("Failed to inject value for field [");
        String ls = System.getProperty("line.separator");
        builder
            .append(fieldInjectionPoint.getName()).append("] of class: ")
            .append(fieldInjectionPoint.getDeclaringBean().getName())
            .append(ls)
            .append(ls);

        if (message != null) {
            builder.append("Message: ").append(message).append(ls);
        }
        appendPath(resolutionContext, circular, builder, ls);
        return builder.toString();
    }
240148
protected void processURL(HttpMessage message, int depth, String localURL, String baseURL) {
		// Build the absolute canonical URL
		String fullURL = URLCanonicalizer.getCanonicalURL(localURL, baseURL);
		if (fullURL == null) {
			return;
		}

		log.debug("Canonical URL constructed using '" + localURL + "': " + fullURL);
		notifyListenersResourceFound(message, depth + 1, fullURL);
	}
423846
private void doSelectNode(final Message<JsonObject> message) {
    final Object key = message.body().getValue("key");
    if (key == null) {
      message.reply(new JsonObject().putString("status", "error").putString("message", "No key specified."));
    } else {
      context.execute(new Action<String>() {
        @Override
        public String perform() {
          String address = nodeSelectors.get(key);
          if (address != null) {
            return address;
          }
          Collection<String> nodes = groups.get(group);
          int index = new Random().nextInt(nodes.size());
          int i = 0;
          for (String node : nodes) {
            if (i == index) {
              nodeSelectors.put(key, node);
              return node;
            }
            i++;
          }
          return null;
        }
      }, new Handler<AsyncResult<String>>() {
        @Override
        public void handle(AsyncResult<String> result) {
          if (result.failed()) {
            message.reply(new JsonObject().putString("status", "error").putString("message", result.cause().getMessage()));
          } else if (result.result() == null) {
            message.reply(new JsonObject().putString("status", "error").putString("message", "No nodes to select."));
          } else {
            message.reply(new JsonObject().putString("status", "ok").putString("result", result.result()));
          }
        }
      });
    }
  }
634155
public void setCode(ExprCode code) {
        mCode = code;

        mStartPos = mCode.mStartPos;
        mCurIndex = mStartPos;
    }
334710
public ISUPMessage createCommand(int commandCode) {
        switch (commandCode) {
            case InitialAddressMessage.MESSAGE_CODE:
                InitialAddressMessage IAM = createIAM();
                return IAM;
            case AddressCompleteMessage.MESSAGE_CODE:
                AddressCompleteMessage ACM = createACM();
                return ACM;
            case ReleaseMessage.MESSAGE_CODE:
                ReleaseMessage REL = createREL(0);
                return REL;
            case ReleaseCompleteMessage.MESSAGE_CODE:
                ReleaseCompleteMessage RLC = createRLC();
                return RLC;

            case ApplicationTransportMessage.MESSAGE_CODE:
                ApplicationTransportMessage APT = createAPT();
                return APT;

            case AnswerMessage.MESSAGE_CODE:
                AnswerMessage ANM = createANM();
                return ANM;

            case CallProgressMessage.MESSAGE_CODE:
                CallProgressMessage CPG = createCPG();
                return CPG;

            case CircuitGroupResetAckMessage.MESSAGE_CODE:
                CircuitGroupResetAckMessage GRA = createGRA();
                return GRA;

            case ConfusionMessage.MESSAGE_CODE:
                ConfusionMessage CFN = createCNF();
                return CFN;

            case ConnectMessage.MESSAGE_CODE:
                ConnectMessage CON = createCON();
                return CON;

            case ContinuityMessage.MESSAGE_CODE:
                ContinuityMessage COT = createCOT();
                return COT;

            case FacilityRejectedMessage.MESSAGE_CODE:
                FacilityRejectedMessage FRJ = createFRJ();
                return FRJ;

            case InformationMessage.MESSAGE_CODE:
                InformationMessage INF = createINF();
                return INF;

            case InformationRequestMessage.MESSAGE_CODE:
                InformationRequestMessage INR = createINR();
                return INR;

            case SubsequentAddressMessage.MESSAGE_CODE:
                SubsequentAddressMessage SAM = createSAM();
                return SAM;

            case SubsequentDirectoryNumberMessage.MESSAGE_CODE:
                SubsequentDirectoryNumberMessage SDN = createSDN();
                return SDN;

            case ForwardTransferMessage.MESSAGE_CODE:
                ForwardTransferMessage FOT = createFOT();
                return FOT;

            case ResumeMessage.MESSAGE_CODE:
                ResumeMessage RES = createRES();
                return RES;
            case BlockingMessage.MESSAGE_CODE:
                BlockingMessage BLO = createBLO();
                return BLO;

            case BlockingAckMessage.MESSAGE_CODE:
                BlockingAckMessage BLA = createBLA();
                return BLA;

            case ContinuityCheckRequestMessage.MESSAGE_CODE:
                ContinuityCheckRequestMessage CCR = createCCR();
                return CCR;

            case LoopbackAckMessage.MESSAGE_CODE:
                LoopbackAckMessage LPA = createLPA();
                return LPA;

            case LoopPreventionMessage.MESSAGE_CODE:
                LoopPreventionMessage LPP = createLPP();
                return LPP;

            case OverloadMessage.MESSAGE_CODE:
                OverloadMessage OLM = createOLM();
                return OLM;

            case SuspendMessage.MESSAGE_CODE:
                SuspendMessage SUS = createSUS();
                return SUS;

            case ResetCircuitMessage.MESSAGE_CODE:
                ResetCircuitMessage RSC = createRSC();
                return RSC;

            case UnblockingMessage.MESSAGE_CODE:
                UnblockingMessage UBL = createUBL();
                return UBL;

            case UnblockingAckMessage.MESSAGE_CODE:
                UnblockingAckMessage UBA = createUBA();
                return UBA;

            case UnequippedCICMessage.MESSAGE_CODE:
                UnequippedCICMessage UCIC = createUCIC();
                return UCIC;

            case CircuitGroupBlockingMessage.MESSAGE_CODE:
                CircuitGroupBlockingMessage CGB = createCGB();
                return CGB;

            case CircuitGroupBlockingAckMessage.MESSAGE_CODE:
                CircuitGroupBlockingAckMessage CGBA = createCGBA();
                return CGBA;

            case CircuitGroupUnblockingMessage.MESSAGE_CODE:
                CircuitGroupUnblockingMessage CGU = createCGU();
                return CGU;

            case CircuitGroupUnblockingAckMessage.MESSAGE_CODE:
                CircuitGroupUnblockingAckMessage CGUA = createCGUA();
                return CGUA;

            case CircuitGroupResetMessage.MESSAGE_CODE:
                CircuitGroupResetMessage GRS = createGRS();
                return GRS;

            case CircuitGroupQueryResponseMessage.MESSAGE_CODE:
                CircuitGroupQueryResponseMessage CQR = createCQR();
                return CQR;

            case CircuitGroupQueryMessage.MESSAGE_CODE:
                CircuitGroupQueryMessage CQM = createCQM();
                return CQM;

            case FacilityAcceptedMessage.MESSAGE_CODE:
                FacilityAcceptedMessage FAA = createFAA();
                return FAA;

            case FacilityRequestMessage.MESSAGE_CODE:
                FacilityRequestMessage FAR = createFAR();
                return FAR;

            case PassAlongMessage.MESSAGE_CODE:
                PassAlongMessage PAM = createPAM();
                return PAM;

            case PreReleaseInformationMessage.MESSAGE_CODE:
                PreReleaseInformationMessage PRI = createPRI();
                return PRI;

            case FacilityMessage.MESSAGE_CODE:
                FacilityMessage FAC = createFAC();
                return FAC;

            case NetworkResourceManagementMessage.MESSAGE_CODE:
                NetworkResourceManagementMessage NRM = createNRM();
                return NRM;

            case IdentificationRequestMessage.MESSAGE_CODE:
                IdentificationRequestMessage IDR = createIDR();
                return IDR;

            case IdentificationResponseMessage.MESSAGE_CODE:
                IdentificationResponseMessage IRS = createIRS();
                return IRS;

            case SegmentationMessage.MESSAGE_CODE:
                SegmentationMessage SGM = createSGM();
                return SGM;

            case ChargeInformationMessage.MESSAGE_CODE:
                ChargeInformationMessage CIM = createCIM();
                return CIM;

            case UserPartAvailableMessage.MESSAGE_CODE:
                UserPartAvailableMessage UPA = createUPA();
                return UPA;

            case UserPartTestMessage.MESSAGE_CODE:
                UserPartTestMessage UPT = createUPT();
                return UPT;

            case UserToUserInformationMessage.MESSAGE_CODE:
                UserToUserInformationMessage USR = createUSR();
                return USR;
            default:
                throw new IllegalArgumentException("Not supported comamnd code: " + commandCode);
        }
    }