<commit_before>    //DOM Manipulation
  __.prototype.contents = function () {
      writeHistory.call(this)
      var that = this,
        nodes = this.nodes.slice()
      this.nodes.length = 0;
      nodes.forEach(function (value, index, array) {
        console.log(value.contentWindow.document)
        if ((value instanceof HTMLIFrameElement))
          that.nodes.push(value.contentWindow.document);
      })
      return this;
    }
    __.prototype.html = function (value) {
      if (typeof value == "string" && value.length > 0) {
        switch (this.nodes instanceof Array) {
          case true:
            var that = this;
            this.each(function (item, index, array) {
              insertHTMLAndJS(that, value, item, true)
            })
            break;
          default:
            insertHTMLAndJS(this, value, this.nodes, true)
            break;
        }
      } else if (typeof value == "string" == 0) {
        switch (this.nodes instanceof Array) {
          case true:
            var that = this;
            this.each(function (item, index, array) {
              insertHTMLAndJS(that, value, item)
            })
            break;
          default:
            insertHTMLAndJS(this, value, this.nodes)
            break;
        }
      } else {
        return (this.nodes instanceof Array) ? null : this.nodes.innerHTML;
      }
    }
    __.prototype.append = function (node) {
      if (typeof node == "string") {
        //this.nodes.insertAdjacentHTML("beforeend", node);
        var div = document.createElement("div")
        div.innerHTML = node;
        if (!(this.nodes instanceof Array))
          this.nodes = [this.nodes]
        for (z = 0, zLen = this.nodes.length; z < zLen; z++)
          for (var i = 0, iLen = div.childNodes.length; i < iLen; i++) {
            if (div.childNodes[i].tagName && div.childNodes[i].tagName.toLowerCase() == "script") compileInlineJavaScript(div.childNodes[i])
            else if (div.childNodes[i].length) traverseNode(div.childNodes[i], function () { compileInlineJavaScript(div.childNodes[i]); })
            this.nodes[z].appendChild(div.childNodes[i].cloneNode(true))
          }
        //traverseNode(div, function () { compileInlineJavaScript(div); })
      } else if (typeof node == "object") {
        if (/(HTML)/gi.test(node.toString())) {
          switch (/(Collection)/gi.test(node.toString())) {
            case true:
              loopAndExecuteReverse(this, arrNodes, this.nodes.appendChild);
              break;
            default:
              this.nodes.appendChild(node);
              break;
          }

        } else if (node instanceof Array) {
          loopAndExecuteReverse(this, node, this.nodes.appendChild);
        } else {
          throw new Error("Passed in node or array is non-irretable")
        }
      } else {
        throw new Error("Provdide Object or String Args")
      }
      return this;
    };
    __.prototype.after = function (value) {
      return insertNode.call(this, "afterend", value);
    }
    __.prototype.before = function (value) {
      return insertNode.call(this, "beforebegin", value);
    }
    __.prototype.replaceWith = function (value) {
      return insertNode.call(this, "beforebegin", value, true);
    }
    __.prototype.prepend = function (value) {
      return insertNode.call(this, "afterbegin", value);
    }
    __.prototype.children = function () {
      if (this.nodes instanceof Array) { 
        var kids = [];
        this.nodes.each(function (item) { 
          //if(item instanceof HTMLElement)
          kids = kids.concat(converToArray(item.children))<commit_msg>added appendTo to the code<commit_after>    //DOM Manipulation
  __.prototype.contents = function () {
      writeHistory.call(this)
      var that = this,
        nodes = this.nodes.slice()
      this.nodes.length = 0;
      nodes.forEach(function (value, index, array) {
        console.log(value.contentWindow.document)
        if ((value instanceof HTMLIFrameElement))
          that.nodes.push(value.contentWindow.document);
      })
      return this;
    }
    __.prototype.html = function (value) {
      if (typeof value == "string" && value.length > 0) {
        switch (this.nodes instanceof Array) {
          case true:
            var that = this;
            this.each(function (item, index, array) {
              insertHTMLAndJS(that, value, item, true)
            })
            break;
          default:
            insertHTMLAndJS(this, value, this.nodes, true)
            break;
        }
      } else if (typeof value == "string" == 0) {
        switch (this.nodes instanceof Array) {
          case true:
            var that = this;
            this.each(function (item, index, array) {
              insertHTMLAndJS(that, value, item)
            })
            break;
          default:
            insertHTMLAndJS(this, value, this.nodes)
            break;
        }
      } else {
        return (this.nodes instanceof Array) ? null : this.nodes.innerHTML;
      }
    }
    __.prototype.append = function (node) {
      if (typeof node == "string") {
        //this.nodes.insertAdjacentHTML("beforeend", node);
        var div = document.createElement("div")
        div.innerHTML = node;
        if (!(this.nodes instanceof Array))
          this.nodes = [this.nodes]
        for (z = 0, zLen = this.nodes.length; z < zLen; z++)
          for (var i = 0, iLen = div.childNodes.length; i < iLen; i++) {
            if (div.childNodes[i].tagName && div.childNodes[i].tagName.toLowerCase() == "script") compileInlineJavaScript(div.childNodes[i])
            else if (div.childNodes[i].length) traverseNode(div.childNodes[i], function () { compileInlineJavaScript(div.childNodes[i]); })
            this.nodes[z].appendChild(div.childNodes[i].cloneNode(true))
          }
        //traverseNode(div, function () { compileInlineJavaScript(div); })
      } else if (typeof node == "object") {
        if (/(HTML)/gi.test(node.toString())) {
          switch (/(Collection)/gi.test(node.toString())) {
            case true:
              loopAndExecuteReverse(this, arrNodes, this.nodes.appendChild);
              break;
            default:
              this.nodes.appendChild(node);
              break;
          }

        } else if (node instanceof Array) {
          loopAndExecuteReverse(this, node, this.nodes.appendChild);
        } else {
          throw new Error("Passed in node or array is non-irretable")
        }
      } else {
        throw new Error("Provdide Object or String Args")
      }
      return this;
    };
    __.prototype.appendTo = __.prototype.append;
    __.prototype.after = function (value) {
      return insertNode.call(this, "afterend", value);
    }
    __.prototype.before = function (value) {
      return insertNode.call(this, "beforebegin", value);
    }
    __.prototype.replaceWith = function (value) {
      return insertNode.call(this, "beforebegin", value, true);
    }
    __.prototype.prepend = function (value) {
      return insertNode.call(this, "afterbegin", value);
    }
    __.prototype.children = function () {
      if (this.nodes instanceof Array) { 
        var kids = [];
        this.nodes.each(function (item) { 
          //if(item instanceof HTMLElement)
          kids = kids.concat(converToArray(item.children))
{'fraction_non_alphanumeric': 0.1264274061990212, 'fraction_numerical': 0.0013594344752582926, 'mean_word_length': 2.03757225433526, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '590508', 'n_tokens_mistral': 2075, 'n_tokens_neox': 2045, 'n_words': 475}