End of checkEmail 
proccess values from context

@param {any} node __DOCSPLACEHOLDER__
@param {any} params __DOCSPLACEHOLDER__
@param {any} msg __DOCSPLACEHOLDER__
@param {any} varList __DOCSPLACEHOLDER__
@return {object} pMsg
339172
function processValuesFromContext(node, params, msg, varList) {
                let pMsg = {};
                Object.assign(pMsg, params);
                varList.forEach((varItem) => {
                    if (varItem.type === undefined || params[varItem.type] === undefined) {
                        pMsg[varItem.name] = params[varItem.name];
                    } else if (params[varItem.type] === 'flow' || params[varItem.type] === 'global') {
                        pMsg[varItem.name] = RED.util.evaluateNodeProperty(params[varItem.name], params[varItem.type], node, msg);
                        pMsg[varItem.type] = params[varItem.type];
                        console.log('Inside flow or global');
                        console.log(varItem.name + ' - - ' + pMsg[varItem.name]);
                    } else {
                        pMsg[varItem.name] = params[varItem.name];
                        pMsg[varItem.type] = params[varItem.type];
                    }
                });
                return pMsg;
            }
1146931
function(msg, node) {
    var message = null,
      taSettings = null;

    taSettings = checkCreds(node.credentials);

    if (!taSettings) {
      message = 'Missing Tone Analyzer service credentials';
    } else if (msg.payload) {
      message = toneutils.checkPayload(msg.payload);
    } else  {
      message = 'Missing property: msg.payload';
    }

    if (message) {
      return Promise.reject(message);
    } else {
      return Promise.resolve(taSettings);
    }
  }
470759
public static MsgHtmlTagNode fromNode(
      int id, HtmlTagNode tagNode, @Nullable VeLogNode velogParent, ErrorReporter errorReporter) {
    RawTextNode userSpecifiedPhExample =
        getAttributeValue(tagNode, MessagePlaceholders.PHEX_ATTR, errorReporter);
    String phExample = null;

    if (userSpecifiedPhExample != null) {
      phExample =
          MessagePlaceholders.validatePlaceholderExample(
              userSpecifiedPhExample.getRawText(),
              userSpecifiedPhExample.getSourceLocation(),
              errorReporter);
    }
    RawTextNode userSpecifiedPhName =
        getAttributeValue(tagNode, MessagePlaceholders.PHNAME_ATTR, errorReporter);
    String phName = null;
    if (userSpecifiedPhName != null) {
      phName =
          MessagePlaceholders.validatePlaceholderName(
              userSpecifiedPhName.getRawText(),
              userSpecifiedPhName.getSourceLocation(),
              errorReporter);
    }
    // calculate after removing the attributes, since we don't care about example and the phname is
    // part of the samenesskey
    String fullTagText = getFullTagText(tagNode);
    String lcTagName = getLcTagName(errorReporter, tagNode.getTagName());
    if (tagNode instanceof HtmlCloseTagNode) {
      // TODO(lukes): the lcTagName logic below requires this leading '/' for close tags.  Just make
      // it understand the node type instead.
      lcTagName = "/" + lcTagName;
    }
    // Include the velog node sameness key if we are the open or close tag node of the velog.
    // close tag nodes don't really need the sameness key given our implementations.
    VeLogNode.SamenessKey key = velogParent != null ? velogParent.getSamenessKey() : null;
    return new MsgHtmlTagNode(
        id,
        tagNode.getSourceLocation(),
        phName,
        phExample,
        lcTagName,
        tagNode instanceof HtmlOpenTagNode && ((HtmlOpenTagNode) tagNode).isSelfClosing(),
        fullTagText != null ? SamenessKey.create(phName, fullTagText, key) : null,
        tagNode);
  }
129001
function validateModeMsg(node, msg) {
    var validMsg = true;
    var modeProperty = ["mode"];
    var modes = ["Summer", "Winter"];
    var i;

    for (i in modeProperty) {
      if (!(modeProperty[i] in msg.payload)) {
        node.error(
          RED._("blindcontroller.error.mode.missing-property") +
            modeProperty[i],
          msg
        );
        validMsg = false;
      }
    }
    if (validMsg) {
      if (
        msg.payload.mode &&
        (typeof msg.payload.mode != "string" ||
          modes.indexOf(msg.payload.mode) == -1)
      ) {
        node.error(
          RED._("blindcontroller.error.mode.invalid-mode") + msg.payload.mode,
          msg
        );
        validMsg = false;
      }
    }
    return validMsg;
  }
1165056
@Override
    public String incomingClearText(String st, Document document, String msgName) {
        // empfangene Nachricht parsen, dabei die validvalues-Überprüfung weglassen
        String myMsgName = msgName + "Res";
        Message msg = new Message(myMsgName, st, document,
            Message.CHECK_SEQ, Message.DONT_CHECK_VALIDS);

        // in einer Schleife durch alle SuppSecMethods-Datensätze laufen
        for (int i = 0; ; i++) {
            String elemBaseName = HBCIUtils.withCounter(myMsgName + ".BPD.SecMethod.SuppSecMethods", i);
            SyntaxElement elem = msg.getElement(elemBaseName + ".method");

            if (elem == null) {
                break;
            }

            // Methodenbezeichner extrahieren
            String method = elem.toString();
            if (method.equals("TAN")) { // "TAN" ist ungültiger Bezeichner
                log.warn("there is an invalid sec type (TAN) in this BPD - removing it");

                // Elternelement finden (Segment "SecMethods")
                SyntaxElement parent = elem.getParent().getParent().getParent().getParent();
                String parentPath = parent.getPath();
                int number = 0;

                // durch alle Elemente dieses Segmentes laufen, bis die Multiple-DEG
                // mit den unterstützten SecMethods gefunden wurde
                for (Iterator<MultipleSyntaxElements> it = parent.getChildContainers().iterator(); it.hasNext(); ) {
                    MultipleSyntaxElements childContainer = it.next();
                    if (childContainer.getPath().equals(parentPath + ".SuppSecMethods")) {
                        // die Anzahl der eingestellten unterstützten SecMethods herausholen
                        number = childContainer.getElements().size();
                        break;
                    }
                }

                int startpos;
                int endpos;

                /* wenn mehr als eine SecMethod im Segment stand, dann braucht nur
                 * das eine der multiplen DEGs entfernt werden. Wenn aber nur die eine
                 * fehlerhafte Info enthalten war, dann muss das gesamte Segment
                 * entfernt werden, weil ein SecMethods-Segment ohne tatsächliche Daten
                 * über unterstützte SecMethods ungültig ist. */

                if (number > 1) { // nur das eine fehlerhafte TAN:1 löschen
                    startpos = elem.getPosInMsg();
                    endpos = startpos
                        + 1
                        + elem.toString(0).length()
                        + 1
                        + msg.getElement(elemBaseName + ".version").toString(0).length();
                } else { // komplettes segment "SecMethod" löschen
                    startpos = parent.getPosInMsg() + 1;
                    endpos = startpos + parent.toString(0).length();
                    /* der Fehler, der hier gemacht wird (nachfolgende Segment-
                     * Sequenznummern sind falsch), wird durch ein nachgeschaltetes
                     * Olly-Modul korrigiert */
                }

                st = new StringBuffer(st).delete(startpos, endpos).toString();
                log.debug("new message after removing: " + st);
                break;
            }
        }
        return st;
    }
13224
function _parseTopdocComment(node, regex, includeNodes) {
  const content = node.text.replace(regex, '');
  const component = new TopComponent(yaml.safeLoad(content));
  if (includeNodes) component.nodes = [];
  component.commentStart = node.source.start;
  component.commentEnd = node.source.end;
  component.css = '';
  return component;
}
868764
function receiveMessageFromNode(event, msgObj) {
        if (functionMap[msgObj.fn]) {
            if(domainID === msgObj.requester) {
                functionMap[msgObj.fn].apply(null, msgObj.args);
            }
        }
    }
1349763
public void get(
    Object rootVal,
    MatchSpaceKey msg,
    EvalCache cache,
    Object contextValue,
    SearchResults result)
    throws MatchingException, BadMessageFormatMatchingException
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      tc.entry(
          this,cclass,
        "get",
        "msg: " + msg + ", result: " + result);

    // type never used so removed
    //int type;

    List[] v = alwaysMatch.lists;
    if (v.length > 0)
      result.addObjects(v);

    if (msg != null)
    {
      int numExpr = roots.size();

      for (int current = 0; current < numExpr; current++)
      {
        Boolean res = null;

        // May need to call MFP multiple times, if our context has multiple nodes
        if(contextValue != null)
        {
          // Currently this must be a list of nodes
          if (contextValue instanceof SetValEvaluationContext)
          {
            SetValEvaluationContext evalContext = (SetValEvaluationContext)contextValue;
            
            // Get the node list
            ArrayList wrappedParentList = evalContext.getWrappedNodeList(); 
            // If the list is empty, then we have yet to get the document root
            if(wrappedParentList.isEmpty())
            {
        	    //Set up a root (document) context for evaluation
            	Object docRoot = Matching.getEvaluator().getDocumentRoot(msg);
                
                // Create an object to hold the wrapped node
                WrappedNodeResults wrapper = new WrappedNodeResults(docRoot);
                // Set the root into the evaluation context
                evalContext.addNode(wrapper);
            }
            
            // Iterate over the nodes
            Iterator iter = wrappedParentList.iterator();

            while(iter.hasNext())
            {
              WrappedNodeResults nextWrappedNode = (WrappedNodeResults)iter.next();       
              Object nextNode = nextWrappedNode.getNode();
                
                
              // If no cached value we'll need to call MFP
              //TODO: No caching here

              // Call MFP to get the results for this node
              res = 
                (Boolean) Matching.
                  getEvaluator().
                    eval((Selector) roots.get(current),
                         msg,
                         cache,
                         nextNode,
                         true); // Permissive is true  

              if(res !=null && res.booleanValue())
              {
                break;
              }     
     
            } // eof while
          } // eof instanceof XPathEvaluationContext
        }
        else
        {
          res = (Boolean) Matching.getEvaluator().eval(
              (Selector) roots.get(current),
              msg,
              cache,
              contextValue,
              false);            
        }
        
        if (res != null && res.booleanValue())
        {
          MatchTargetTypeList tlist = (MatchTargetTypeList) objs.get(current);
          v = tlist.lists;
          if (v.length > 0)
            result.addObjects(v);
        }
      }
    }
    // ContinueBranch has to be last to treat this node as if it was at the end of
    // a long chain of *, or a #.
    super.get(null, msg, cache, contextValue, result);

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      tc.exit(this,cclass, "get");

  }
206797
function validateExpression(node) {
            if (node.body.type === "BlockStatement") {
                return;
            }

            const arrowToken = sourceCode.getTokenBefore(node.body, isNotOpeningParenToken);
            const firstTokenOfBody = sourceCode.getTokenAfter(arrowToken);

            if (arrowToken.loc.end.line === firstTokenOfBody.loc.start.line && option === "below") {
                context.report({
                    node: firstTokenOfBody,
                    messageId: "expected",
                    fix: fixer => fixer.insertTextBefore(firstTokenOfBody, "\n")
                });
            } else if (arrowToken.loc.end.line !== firstTokenOfBody.loc.start.line && option === "beside") {
                context.report({
                    node: firstTokenOfBody,
                    messageId: "unexpected",
                    fix(fixer) {
                        if (sourceCode.getFirstTokenBetween(arrowToken, firstTokenOfBody, { includeComments: true, filter: isCommentToken })) {
                            return null;
                        }

                        return fixer.replaceTextRange([arrowToken.range[1], firstTokenOfBody.range[0]], " ");
                    }
                });
            }
        }
501808
function getDocsToPersist(docId, view, docIdsToChangesAndEmits) {
  var metaDocId = '_local/doc_' + docId;
  var defaultMetaDoc = {_id: metaDocId, keys: []};
  var docData = docIdsToChangesAndEmits[docId];
  var indexableKeysToKeyValues = docData.indexableKeysToKeyValues;
  var changes = docData.changes;

  function getMetaDoc() {
    if (isGenOne(changes)) {
      // generation 1, so we can safely assume initial state
      // for performance reasons (avoids unnecessary GETs)
      return Promise.resolve(defaultMetaDoc);
    }
    return view.db.get(metaDocId).catch(defaultsTo(defaultMetaDoc));
  }

  function getKeyValueDocs(metaDoc) {
    if (!metaDoc.keys.length) {
      // no keys, no need for a lookup
      return Promise.resolve({rows: []});
    }
    return view.db.allDocs({
      keys: metaDoc.keys,
      include_docs: true
    });
  }

  function processKvDocs(metaDoc, kvDocsRes) {
    var kvDocs = [];
    var oldKeysMap = {};

    for (var i = 0, len = kvDocsRes.rows.length; i < len; i++) {
      var row = kvDocsRes.rows[i];
      var doc = row.doc;
      if (!doc) { // deleted
        continue;
      }
      kvDocs.push(doc);
      oldKeysMap[doc._id] = true;
      doc._deleted = !indexableKeysToKeyValues[doc._id];
      if (!doc._deleted) {
        var keyValue = indexableKeysToKeyValues[doc._id];
        if ('value' in keyValue) {
          doc.value = keyValue.value;
        }
      }
    }

    var newKeys = Object.keys(indexableKeysToKeyValues);
    newKeys.forEach(function (key) {
      if (!oldKeysMap[key]) {
        // new doc
        var kvDoc = {
          _id: key
        };
        var keyValue = indexableKeysToKeyValues[key];
        if ('value' in keyValue) {
          kvDoc.value = keyValue.value;
        }
        kvDocs.push(kvDoc);
      }
    });
    metaDoc.keys = uniq(newKeys.concat(metaDoc.keys));
    kvDocs.push(metaDoc);

    return kvDocs;
  }

  return getMetaDoc().then(function (metaDoc) {
    return getKeyValueDocs(metaDoc).then(function (kvDocsRes) {
      return processKvDocs(metaDoc, kvDocsRes);
    });
  });
}
882702
function evaluateTypedParameters(node, msg, param, type) {
        console.log('eval - p:%s, t:%s', param, type);
        let prop;
        if (type === 'jsonata') {
            prop = RED.util.evaluateJSONataExpression(param, msg);
        } else {
            prop = RED.util.evaluateNodeProperty(param, type, node, msg);
        }
        return prop;
    }
1253324
function checkMetaDocsUrl(context, exportsNode) {
    if (exportsNode.type !== "ObjectExpression") {

        // if the exported node is not the correct format, "internal-no-invalid-meta" will already report this.
        return;
    }

    const metaProperty = getPropertyFromObject("meta", exportsNode);
    const metaDocs = metaProperty && getPropertyFromObject("docs", metaProperty.value);
    const metaDocsUrl = metaDocs && getPropertyFromObject("url", metaDocs.value);

    if (!metaDocs) {
        context.report({
            node: metaProperty,
            message: "Rule is missing a meta.docs property"
        });
        return;
    }

    if (!metaDocsUrl) {
        context.report({
            node: metaDocs,
            message: "Rule is missing a meta.docs.url property"
        });
        return;
    }

    const ruleId = path.basename(context.getFilename().replace(/.js$/u, ""));
    const expected = `https://eslint.org/docs/rules/${ruleId}`;
    const url = metaDocsUrl.value.value;

    if (url !== expected) {
        context.report({
            node: metaDocsUrl.value,
            message: `Incorrect url. Expected "${expected}" but got "${url}"`
        });
    }

}
1355252
private static String buildGoogMsgContentStr(
      ImmutableList<SoyMsgPart> msgParts, boolean doUseBracedPhs) {

    msgParts = IcuSyntaxUtils.convertMsgPartsToEmbeddedIcuSyntax(msgParts);

    StringBuilder msgStrSb = new StringBuilder();

    for (SoyMsgPart msgPart : msgParts) {

      if (msgPart instanceof SoyMsgRawTextPart) {
        msgStrSb.append(((SoyMsgRawTextPart) msgPart).getRawText());

      } else if (msgPart instanceof SoyMsgPlaceholderPart) {
        String placeholderName = ((SoyMsgPlaceholderPart) msgPart).getPlaceholderName();
        if (doUseBracedPhs) {
          // Add placeholder to message text.
          msgStrSb.append("{").append(placeholderName).append("}");

        } else {
          // For goog.getMsg(), we must change the placeholder name to lower camel-case format.
          String googMsgPlaceholderName = genGoogMsgPlaceholderName(placeholderName);
          // Add placeholder to message text. Note the '$' for goog.getMsg() syntax.
          msgStrSb.append("{$").append(googMsgPlaceholderName).append("}");
        }

      } else {
        throw new AssertionError("unexpected part: " + msgPart);
      }
    }

    return msgStrSb.toString();
  }
1203163
private static boolean isLegalMessageVarAlias(Node msgNode, String msgKey) {
    if (msgNode.isGetProp()
        && msgNode.isQualifiedName()
        && msgNode.getLastChild().getString().equals(msgKey)) {
      // Case: `foo.Thing.MSG_EXAMPLE = bar.OtherThing.MSG_EXAMPLE;`
      //
      // This kind of construct is created by Es6ToEs3ClassSideInheritance. Just ignore it; the
      // message will have already been extracted from the base class.
      return true;
    }

    if (msgNode.getGrandparent().isObjectPattern() && msgNode.isName()) {
      // Case: `var {MSG_HELLO} = x;
      //
      // It's a destructuring import. Ignore it if the name is the same. We compare against the
      // original name if possible because in modules, the NAME node will be rewritten with a
      // module-qualified name (e.g. `var {MSG_HELLO: goog$module$my$module_MSG_HELLO} = x;`).
      String aliasName =
          (msgNode.getOriginalName() != null) ? msgNode.getOriginalName() : msgNode.getString();
      if (aliasName.equals(msgKey)) {
        return true;
      }
    }

    // TODO(nickreid): Should `var MSG_HELLO = x.MSG_HELLO;` also be allowed?

    return false;
  }
1039440
function TrailingBlock(opts) {
    opts       = opts || {};
    opts.type  = opts.type || 'paragraph';
    opts.match = opts.match || (node => node.type === opts.type);

    return {
        validateNode: (node) => {
            if (node.object !== 'document') {
                return undefined;
            }

            const lastNode = node.nodes.last();
            if (lastNode && opts.match(lastNode)) {
                return undefined;
            }

            const lastIndex = node.nodes.count();
            const block = Slate.Block.create({
                type: opts.type,
                nodes: [Slate.Text.create()]
            });

            return (change) => change.insertNodeByKey(node.key, lastIndex, block);
        },

        changes: {
            focusAtEnd
        }
    };
}
164367
function NodeContext(msg, parent, nodeContext, serverName) {
    this.msgContext = new mustache.Context(msg, parent);
    this.nodeContext = nodeContext;
    this.serverName = serverName;
}
833245
function getDocsToPersist(docId, view, docIdsToChangesAndEmits) {
    var metaDocId = '_local/doc_' + docId;
    var defaultMetaDoc = {_id: metaDocId, keys: []};
    var docData = docIdsToChangesAndEmits.get(docId);
    var indexableKeysToKeyValues = docData[0];
    var changes = docData[1];

    function getMetaDoc() {
      if (isGenOne(changes)) {
        // generation 1, so we can safely assume initial state
        // for performance reasons (avoids unnecessary GETs)
        return Promise.resolve(defaultMetaDoc);
      }
      return view.db.get(metaDocId).catch(defaultsTo(defaultMetaDoc));
    }

    function getKeyValueDocs(metaDoc) {
      if (!metaDoc.keys.length) {
        // no keys, no need for a lookup
        return Promise.resolve({rows: []});
      }
      return view.db.allDocs({
        keys: metaDoc.keys,
        include_docs: true
      });
    }

    function processKeyValueDocs(metaDoc, kvDocsRes) {
      var kvDocs = [];
      var oldKeys = new pouchdbCollections.Set();

      for (var i = 0, len = kvDocsRes.rows.length; i < len; i++) {
        var row = kvDocsRes.rows[i];
        var doc = row.doc;
        if (!doc) { // deleted
          continue;
        }
        kvDocs.push(doc);
        oldKeys.add(doc._id);
        doc._deleted = !indexableKeysToKeyValues.has(doc._id);
        if (!doc._deleted) {
          var keyValue = indexableKeysToKeyValues.get(doc._id);
          if ('value' in keyValue) {
            doc.value = keyValue.value;
          }
        }
      }
      var newKeys = pouchdbMapreduceUtils.mapToKeysArray(indexableKeysToKeyValues);
      newKeys.forEach(function (key) {
        if (!oldKeys.has(key)) {
          // new doc
          var kvDoc = {
            _id: key
          };
          var keyValue = indexableKeysToKeyValues.get(key);
          if ('value' in keyValue) {
            kvDoc.value = keyValue.value;
          }
          kvDocs.push(kvDoc);
        }
      });
      metaDoc.keys = pouchdbMapreduceUtils.uniq(newKeys.concat(metaDoc.keys));
      kvDocs.push(metaDoc);

      return kvDocs;
    }

    return getMetaDoc().then(function (metaDoc) {
      return getKeyValueDocs(metaDoc).then(function (kvDocsRes) {
        return processKeyValueDocs(metaDoc, kvDocsRes);
      });
    });
  }