__DOCSPLACEHOLDER__

@param {any} node __DOCSPLACEHOLDER__
@param {any} msgParams __DOCSPLACEHOLDER__
@param {any} msg __DOCSPLACEHOLDER__
518994
function processFTPNode(node, msgParams, msg) {
        console.log('Processing Node .......... ');
        console.log(JSON.stringify(node));
        let params = processValuesFromContext(node, msgParams, msg, [
            {name: 'host', type: 'hostType'},
            {name: 'port', type: 'portType'},
            {name: 'filename', type: 'filenameType'},
            {name: 'location', type: 'locationType'},
            {name: 'remoteLocation', type: 'remoteLocationType'},
            {name: 'user', type: 'userType'},
            {name: 'password', type: 'passwordType'},
        ]);

        console.log('After assigning..');
        console.log(JSON.stringify(params));


        if (params.mode == 'READ') { // GET file
            if (!(checkTypes.assigned(params.location))) {
                let errInvalid = util.format('Invalid file or location for download');
                msg.error = getError(node, errInvalid);
                node.error(errInvalid, msg);
                return;
            }


            connectToFTP(params).then(function(value) {
                // console.log(value);
                msg.payload = JSON.stringify(value); ;
                node.send(msg);
                return;
            }).catch(function(e) {
                let errInvalid = util.format('Error while executing FTP read request - %s', e.message);
                msg.error = getError(node, errInvalid);
                node.error(errInvalid, msg);
                return;
            });
        } else if (params.mode == 'WRITE') { // Upload File
            if (!(checkTypes.assigned(params.remoteLocation))) {
                let errInvalid = util.format('Invalid remote location for upload');
                msg.error = getError(node, errInvalid);
                node.error(errInvalid, msg);
                return;
            }
            if (!(checkTypes.assigned(params.append))) {
                params.append = false;
            }

            connectToFTP(params).then(function(value) {
                // console.log(value);
                msg.payload = JSON.stringify(value); ;
                node.send(msg);
                return;
            }).catch(function(e) {
                // console.log(e);
                let errInvalid = util.format('Error while executing POST request - %s', e.message);
                msg.error = getError(node, errInvalid);
                node.error(errInvalid, msg);
                return;
            });
        }
    }
628706
function processSOAPNode(node, msgParams, msg) {
    // Handle simple generic SOAP. TBD: Handle multiple types of SOAP security and other params
    // TBD: Test Security features
    // TBD: Implement soap listen

    let options = {};
    console.log('Processing Node .......... ');
    console.log(JSON.stringify(node));
    let params = processValuesFromContext(node, msgParams, msg, [
      {name: 'url', type: 'urlType'},
      {name: 'method', type: 'methodType'},
      {name: 'parameters', type: 'parametersType'},
      {name: 'headers', type: 'headersType'},
    ]);
    console.log(params);


    soap.createClient(params.url, options, function(err, client) {
      if (err) {
        let errInvalidSOAP = util.format('Error while creating soap client - %s', err);
        msg.error = getError(node, errInvalidSOAP);
        node.error(errInvalidSOAP, msg);
        return;
      }
      try {
        let method = eval('client' + params.method);
        // let method = client['GetHolidaysAvailable'];
        // let requestArgs = {"countryCode": "UnitedStates"};
        method(params.parameters, function(err, result, envelope, soapHeader) {
          if (err) {
            let errInvalidSOAP = util.format('Error while calling soap service - %s', err);
            msg.error = getError(node, errInvalidSOAP);
            node.error(errInvalidSOAP, msg);
            return;
          }
          // response envelope
          console.log('Response Envelope: \n' + envelope);
          // 'result' is the response body
          console.log('Result: \n' + JSON.stringify(result));
          console.log(JSON.stringify(result));
          msg.payload = JSON.stringify(result);
          node.send(msg);
          return;
        });
      } catch (error) {
        let errInvalidSOAP = util.format('Error while calling soap service - %s', error);
        msg.error = getError(node, errInvalidSOAP);
        node.error(errInvalidSOAP, msg);
        return;
      }
    });
  }
1352290
function(doc, node, textFormat){
			var out;
			this.textFormat = (textFormat)? textFormat : this.textFormat;
			if(this.textFormat === 'normalised'){
				out = this.walkTreeForText( node );
				if(out !== undefined){
					return this.normalise( doc, out );
				}else{
					return '';
				}
			}else{
				var clonedNode = modules.domUtils.clone(node);
				var trimmedNode = modules.domUtils.removeDescendantsByTagName( clonedNode, this.excludeTags );

			   return this.formatText( doc, modules.domUtils.textContent(trimmedNode), this.textFormat );
			}
		}
503504
private <T extends ProgramElementDoc> void mapTypeParameters(Map<String,List<T>> map, Object doc,
            T holder) {
        TypeVariable[] typeVariables;
        if (doc instanceof ClassDoc) {
            typeVariables = ((ClassDoc) doc).typeParameters();
        } else if (doc instanceof WildcardType) {
            Type[] extendsBounds = ((WildcardType) doc).extendsBounds();
            for (int k = 0; k < extendsBounds.length; k++) {
                addTypeParameterToMap(map, extendsBounds[k], holder);
            }
            Type[] superBounds = ((WildcardType) doc).superBounds();
            for (int k = 0; k < superBounds.length; k++) {
                addTypeParameterToMap(map, superBounds[k], holder);
            }
            return;
        } else if (doc instanceof ParameterizedType) {
            Type[] typeArguments = ((ParameterizedType) doc).typeArguments();
            for (int k = 0; k < typeArguments.length; k++) {
                addTypeParameterToMap(map, typeArguments[k], holder);
            }
            return;
        } else if (doc instanceof ExecutableMemberDoc) {
            typeVariables = ((ExecutableMemberDoc) doc).typeParameters();
        } else if (doc instanceof FieldDoc) {
            Type fieldType = ((FieldDoc) doc).type();
            mapTypeParameters(map, fieldType, holder);
            return;
        } else {
            return;
        }
        for (int i = 0; i < typeVariables.length; i++) {
            Type[] bounds = typeVariables[i].bounds();
            for (int j = 0; j < bounds.length; j++) {
                addTypeParameterToMap(map, bounds[j], holder);
            }
        }
    }
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);
  }
504845
private void attachGroovydocAnnotation(ASTNode node, String docCommentNodeText) {
        if (!runtimeGroovydocEnabled) {
            return;
        }

        if (!(node instanceof AnnotatedNode)) {
            return;
        }

        if (!docCommentNodeText.startsWith(RUNTIME_GROOVYDOC_PREFIX)) {
            return;
        }

        AnnotatedNode annotatedNode = (AnnotatedNode) node;
        AnnotationNode annotationNode = new AnnotationNode(ClassHelper.make(Groovydoc.class));
        annotationNode.addMember(VALUE, new ConstantExpression(docCommentNodeText));
        annotatedNode.addAnnotation(annotationNode);
    }
164367
function NodeContext(msg, parent, nodeContext, serverName) {
    this.msgContext = new mustache.Context(msg, parent);
    this.nodeContext = nodeContext;
    this.serverName = serverName;
}
1203917
function _addInstanceIdNodeIfMissing( doc ) {
    const xformsPath = '/xmlns:root/xmlns:model/xmlns:instance/*/xmlns:meta/xmlns:instanceID';
    const openrosaPath = '/xmlns:root/xmlns:model/xmlns:instance/*/orx:meta/orx:instanceID';
    const instanceIdEl = doc.get( `${xformsPath} | ${openrosaPath}`, NAMESPACES );

    if ( !instanceIdEl ) {
        const rootEl = doc.get( '/xmlns:root/xmlns:model/xmlns:instance/*', NAMESPACES );
        const metaEl = doc.get( '/xmlns:root/xmlns:model/xmlns:instance/*/xmlns:meta', NAMESPACES );

        if ( metaEl ) {
            metaEl
                .node( 'instanceID' );
        } else if ( rootEl ) {
            rootEl
                .node( 'meta' )
                .node( 'instanceID' );
        }
    }

    return doc;
}
117346
function doctypeInInitialMode(p, token) {
    p._setDocumentType(token);

    const mode = token.forceQuirks ? HTML.DOCUMENT_MODE.QUIRKS : doctype.getDocumentMode(token);

    if (!doctype.isConforming(token)) {
        p._err(ERR.nonConformingDoctype);
    }

    p.treeAdapter.setDocumentMode(p.document, mode);

    p.insertionMode = BEFORE_HTML_MODE;
}
1030384
@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.DONT_CHECK_SEQ, Message.DONT_CHECK_VALIDS);

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

            if (elem == null) {
                break;
            }

            // Versionsnummer extrahieren
            String version = elem.toString();
            if (version.equals("2")) { // "2" ist ungültige Versionsnummer
                log.warn("there is an invalid hbci version number ('2') in this BPD - replacing it with '210'");

                // versionsnummer "2" im string durch "210" ersetzen
                int startpos = elem.getPosInMsg() + 1;  // +1 wegen überspringen des pre-delimiters
                st = new StringBuffer(st).replace(startpos, startpos + 1, "210").toString();
                log.debug("new message after replacing: " + st);
                break;
            }
        }
        return st;
    }
378540
function Node(grammar, ctorName, matchLength) {
  this.grammar = grammar;
  this.ctorName = ctorName;
  this.matchLength = matchLength;
}
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;
    }
1135183
function Node(cfg) {

  this.namespace     = cfg.namespace || null;
  this.text          = cfg.text;
  this._selfCloseTag = cfg.selfCloseTag;


  Object.defineProperties(this, {
    nodeType: {
      value: cfg.nodeType
    },
    nodeName: {
      value: cfg.nodeType == 1 ? cfg.nodeName : '#text'
    },
    childNodes: {
      value: cfg.childNodes
    },
    firstChild: {
      get: function(){
        return this.childNodes[0] || null;
      }
    },
    lastChild: {
      get: function(){
        return this.childNodes[this.childNodes.length-1] || null;
      }
    },
    parentNode: {
      value: cfg.parentNode || null
    },
    attributes: {
      value: cfg.attributes || []
    },
    innerHTML: {
      get: function(){
        var
          result = '',
          cNode;
        for (var i = 0, l = this.childNodes.length; i < l; i++) {
          cNode = this.childNodes[i];
          result += cNode.nodeType === 3 ? cNode.text : cNode.outerHTML;
        }
        return result;
      }
    },
    outerHTML: {
      get: function(){
        if (this.nodeType != 3){
          var
            str,
            attrs = (this.attributes.map(function(elem){
              return elem.name + (elem.value ? '=' + '"'+ elem.value +'"' : '');
            }) || []).join(' '),
            childs = '';

          str = '<' + this.nodeName + (attrs ? ' ' + attrs : '') + (this._selfCloseTag ? '/' : '') + '>';

          if (!this._selfCloseTag){
            childs = (this._selfCloseTag ? '' : this.childNodes.map(function(child){
              return child.outerHTML;
            }) || []).join('');

            str += childs;
            str += '</' + this.nodeName + '>';
          }
        }
        else{
          str = this.textContent;
        }
        return str;
      }
    },
    textContent: {
      get: function(){
        if (this.nodeType == Node.TEXT_NODE){
          return this.text;
        }
        else{
          return this.childNodes.map(function(node){
            return node.textContent;
          }).join('').replace(/\x20+/g, ' ');
        }
      }
    }
  });
}
724428
function processNode(node) {
            const entity = node.code.trim()
            if (!entity) {
                context.report({
                    node,
                    messageId: "missing",
                })
            }
        }
1042776
function fixParagraphNode(node, fullText) {
    const firstNode = node.children[0];
    const lastNode = node.children[node.children.length - 1];
    node.range = [firstNode.range[0], lastNode.range[1]];
    node.raw = fullText.slice(node.range[0], node.range[1]);
    node.loc = {
        start: {
            line: firstNode.loc.start.line,
            column: firstNode.loc.start.column
        },
        end: {
            line: lastNode.loc.end.line,
            column: lastNode.loc.end.column
        }
    };
}
352864
def do_markdownlaceholder(parser, token):
    
    name, params = parse_placeholder(parser, token)
    return MarkdownPlaceholderNode(name, **params)
1027981
@Override
  protected PyExpr visitFunctionNode(FunctionNode node) {
    Object soyFunction = node.getSoyFunction();
    if (soyFunction instanceof BuiltinFunction) {
      return visitNonPluginFunction(node, (BuiltinFunction) soyFunction);
    } else if (soyFunction instanceof SoyPythonSourceFunction) {
      return pluginValueFactory.applyFunction(
          node.getSourceLocation(),
          node.getFunctionName(),
          (SoyPythonSourceFunction) soyFunction,
          visitChildren(node));
    } else if (soyFunction instanceof SoyPySrcFunction) {
      List<PyExpr> args = visitChildren(node);
      return ((SoyPySrcFunction) soyFunction).computeForPySrc(args);
    } else if (soyFunction instanceof LoggingFunction) {
      // trivial logging function support
      return new PyStringExpr("'" + ((LoggingFunction) soyFunction).getPlaceholder() + "'");
    } else {
      errorReporter.report(
          node.getSourceLocation(), SOY_PY_SRC_FUNCTION_NOT_FOUND, node.getFunctionName());
      return ERROR;
    }
  }