JSR-170 stuff ================================
193114
public NodeType findNodeType(InternalQName nodeTypeName) throws NoSuchNodeTypeException, RepositoryException
   {

      NodeTypeData ntdata = typesManager.getNodeType(nodeTypeName);
      if (ntdata != null)
      {
         return new NodeTypeImpl(ntdata, typesManager, this, locationFactory, valueFactory, dataManager);
      }
      throw new NoSuchNodeTypeException("Nodetype not found " + nodeTypeName.getAsString());
   }
879226
function() {
  var that = this;
  var boundEmitComplete = emitComplete.bind(this);
  
  EventEmitter.call(this);

  this.middleware = [];
  this.server = net.createServer(function(conn) {
    var buffer = '';
    var info = null;

    conn.on('data', function(data) {
      buffer += data;

      if(!info) {
        if(buffer.indexOf('\f') !== -1) {
          var split = buffer.split('\f');
          
          try {
            info = JSON.parse(split[0]);
            buffer = split[1];
          } catch(e) {
            that.emit('error', e);
          }
        }
      }

      if(buffer && info) {
        handleEntries(buffer, info, that.middleware, boundEmitComplete);
        buffer = '';
      }
    });

    conn.on('end', function() {
      that.emit('end');
    });

    conn.on('error', function(err) {
      that.emit('error', err);
    });
  });
}
1347945
private void compileRoutes() {
        Iterator<RouteRegistration> iterator = routeRegistrations.iterator();

        while (iterator.hasNext()) {
            RouteRegistration routeRegistration = iterator.next();
            iterator.remove();

            //
            // Enforce mode requirements specified for Route
            //
            if (routeRegistration.getModes() != null) {
                // Enforce specified modes for the route
                if (!routeRegistration.getModes().contains(settings.getMode())) {
                    log.debug("Excluding {} '{}' because {} is not specified in mode set {}",
                            routeRegistration.getRequestMethod(), routeRegistration.getUriPattern(), settings.getMode(), routeRegistration.getModes());
                    continue;
                }
            }

            //
            // Enforce annotated requirements on Controllers
            //
            if (routeRegistration.getRouteHandler() instanceof ControllerHandler) {
                // Enforce RequireUtil rules for the controller
                ControllerHandler controllerHandler = (ControllerHandler) routeRegistration.getRouteHandler();
                if (!RequireUtil.allowMethod(settings, controllerHandler.getControllerMethod())) {
                    continue;
                }

                if (Strings.isNullOrEmpty(routeRegistration.getName())) {
                    routeRegistration.setName(Util.toString(controllerHandler.getControllerMethod()));
                }
            }
            //
            // Automatically name Route if name is not specified
            //
            else if (Strings.isNullOrEmpty(routeRegistration.getName())) {
                // try to name the route
                Class<? extends RouteHandler> routeHandlerClass = routeRegistration.getRouteHandler().getClass();
                if (routeHandlerClass.isSynthetic()) {
                    routeRegistration.setName("lambda handler");
                } else if (routeHandlerClass.isAnonymousClass()) {
                    routeRegistration.setName("anonymous handler");
                } else {
                    routeRegistration.setName(routeHandlerClass.getName());
                }
            }

            //
            // Wrap any Route designated to collect Metrics
            //
            RouteHandler routeHandler;
            if (routeRegistration.isMetered()) {
                log.debug("Wrapping {} '{}' handler with {}", routeRegistration.getRequestMethod(), routeRegistration.getUriPattern(),
                        MeteredRouteHandler.class.getSimpleName());
                routeHandler = new MeteredRouteHandler(routeRegistration.getMetricName(), routeRegistration.getRouteHandler(), metricRegistry);
            } else if (routeRegistration.isTimed()) {
                log.debug("Wrapping {} '{}' handler with {}", routeRegistration.getRequestMethod(), routeRegistration.getUriPattern(),
                        TimedRouteHandler.class.getSimpleName());
                routeHandler = new TimedRouteHandler(routeRegistration.getMetricName(), routeRegistration.getRouteHandler(), metricRegistry);
            } else if (routeRegistration.isCounted()) {
                log.debug("Wrapping {} '{}' handler with {}", routeRegistration.getRequestMethod(), routeRegistration.getUriPattern(),
                        CountedRouteHandler.class.getSimpleName());
                routeHandler = new CountedRouteHandler(routeRegistration.getMetricName(), false, routeRegistration.getRouteHandler(), metricRegistry);
            } else {
                routeHandler = routeRegistration.getRouteHandler();
            }

            Route route = new Route(routeRegistration.getRequestMethod(), routeRegistration.getUriPattern(), routeHandler);
            route.setName(routeRegistration.getName());
            if (routeRegistration.isRunAsFinally()) {
                route.runAsFinally();
            }

            router.addRoute(route);
        }
    }
66201
public void doRss( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException {
        doRss(req, rsp, Jenkins.logRecords);
    }
174772
@Override
	public int doStartTag() throws JspException {

		String string = null;
		Boolean bool = null;

		if (srcExpr != null) {
			string = (String) ExpressionEvaluatorManager.evaluate("srcExpr", srcExpr, String.class, this, pageContext);
			setSrc(string);
		}

		if (useRandomParamExpr != null) {
			string = (String) ExpressionEvaluatorManager.evaluate("useRandomParamExpr", useRandomParamExpr,
					String.class, this, pageContext);
			setUseRandomParam(string);
		}

		if (mediaExpr != null) {
			string = (String) ExpressionEvaluatorManager.evaluate("mediaExpr", mediaExpr, String.class, this,
					pageContext);
			setMedia(string);
		}

		if (titleExpr != null) {
			string = (String) ExpressionEvaluatorManager.evaluate("titleExpr", titleExpr, String.class, this,
					pageContext);
			setTitle(string);
		}

		if (alternateExpr != null) {
			bool = (Boolean) ExpressionEvaluatorManager.evaluate("alternateExpr", alternateExpr, Boolean.class, this,
					pageContext);
			setAlternate(bool);
		}

		if (displayAlternateExpr != null) {
			bool = (Boolean) ExpressionEvaluatorManager.evaluate("displayAlternateExpr", displayAlternateExpr,
					Boolean.class, this, pageContext);
			setAlternate(bool);
		}

		return super.doStartTag();
	}
1061804
function (v) {
/*Line 77 - 'AtomFormField.js' */                if (this._required) {
/*Line 78 - 'AtomFormField.js' */                    if (!v) {
/*Line 79 - 'AtomFormField.js' */                        AtomBinder.setValue(this, "error", this._requiredMessage);
/*Line 80 - 'AtomFormField.js' */                        this._isValid = false;
/*Line 81 - 'AtomFormField.js' */                        return;
/*Line 82 - 'AtomFormField.js' */                    }
/*Line 83 - 'AtomFormField.js' */                } else {
/*Line 84 - 'AtomFormField.js' */                    // if value is not required
/*Line 85 - 'AtomFormField.js' */                    // and if value is empty
/*Line 86 - 'AtomFormField.js' */                    // it is a valid value
/*Line 87 - 'AtomFormField.js' */                    if (!v) {
/*Line 88 - 'AtomFormField.js' */                        this._isValid = true;
/*Line 89 - 'AtomFormField.js' */                        return;
/*Line 90 - 'AtomFormField.js' */                    }
/*Line 91 - 'AtomFormField.js' */                }

/*Line 93 - 'AtomFormField.js' */                var re = null;

/*Line 95 - 'AtomFormField.js' */                if (/email/gi.test(this._dataType)) {
/*Line 96 - 'AtomFormField.js' */                    re = /^(([^<>()\[\]\\.,;:\s@\"]+(\.[^<>()\[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
/*Line 97 - 'AtomFormField.js' */                } else {
/*Line 98 - 'AtomFormField.js' */                    if (this._regex) {
/*Line 99 - 'AtomFormField.js' */                        re = eval("(" + this._regex + ")");
/*Line 100 - 'AtomFormField.js' */                    }
/*Line 101 - 'AtomFormField.js' */                }

/*Line 103 - 'AtomFormField.js' */                if (re) {
/*Line 104 - 'AtomFormField.js' */                    if (!re.test(v)) {
/*Line 105 - 'AtomFormField.js' */                        AtomBinder.setValue(this, "error", this._invalidMessage);
/*Line 106 - 'AtomFormField.js' */                        this._isValid = false;
/*Line 107 - 'AtomFormField.js' */                        return;
/*Line 108 - 'AtomFormField.js' */                    }
/*Line 109 - 'AtomFormField.js' */                }
/*Line 110 - 'AtomFormField.js' */            }
1224068
function(serverData) {
      // Copy server data
      var tempServerData = {};
      Parse._objectEach(serverData, function(value, key) {
        tempServerData[key] = Parse._decode(key, value);
      });
      this._serverData = tempServerData;

      // Refresh the attributes.
      this._rebuildAllEstimatedData();

      
      // Clear out any changes the user might have made previously.
      this._refreshCache();
      this._opSetQueue = [{}];

      // Refresh the attributes again.
      this._rebuildAllEstimatedData();       
    }
1018463
def sr(self, multi=0):
        """"""  # noqa: E501
        remain = self.res[:]
        sr = []
        i = 0
        while i < len(remain):
            s = remain[i]
            j = i
            while j < len(remain) - 1:
                j += 1
                r = remain[j]
                if r.answers(s):
                    sr.append((s, r))
                    if multi:
                        remain[i]._answered = 1
                        remain[j]._answered = 2
                        continue
                    del(remain[j])
                    del(remain[i])
                    i -= 1
                    break
            i += 1
        if multi:
            remain = [x for x in remain if not hasattr(x, "_answered")]
        return SndRcvList(sr), PacketList(remain)
975972
function (req, res, next) {
            if (!req.miajs.controllerDebugInfo) {
                req.miajs.controllerDebugInfo = {};
            }
            if (controller.name && controller.version) {
                req.miajs.controllerDebugInfo[controller.name + '_' + controller.version] = {'runtime': Date.now() - req.miajs.controllerStart};
            }
            next();
        }
952989
protected function initExtensionSupportNews()
    {
        if (empty($GLOBALS['TSFE']->register)) {
            return;
        }

        /** @var \Metaseo\Metaseo\Connector $connector */
        $connector = $this->objectManager->get('Metaseo\\Metaseo\\Connector');

        if (isset($GLOBALS['TSFE']->register['newsTitle'])) {
            $connector->setMetaTag('title', $GLOBALS['TSFE']->register['newsTitle']);
        }

        if (isset($GLOBALS['TSFE']->register['newsAuthor'])) {
            $connector->setMetaTag('author', $GLOBALS['TSFE']->register['newsAuthor']);
        }

        if (isset($GLOBALS['TSFE']->register['newsAuthoremail'])) {
            $connector->setMetaTag('email', $GLOBALS['TSFE']->register['newsAuthoremail']);
        }

        if (isset($GLOBALS['TSFE']->register['newsAuthorEmail'])) {
            $connector->setMetaTag('email', $GLOBALS['TSFE']->register['newsAuthorEmail']);
        }

        if (isset($GLOBALS['TSFE']->register['newsKeywords'])) {
            $connector->setMetaTag('keywords', $GLOBALS['TSFE']->register['newsKeywords']);
        }

        if (isset($GLOBALS['TSFE']->register['newsTeaser'])) {
            $connector->setMetaTag('description', $GLOBALS['TSFE']->register['newsTeaser']);
        }
    }
1137425
function load($str, $lowercase=true, $stripRN=true, $defaultBRText=DEFAULT_BR_TEXT, $defaultSpanText=DEFAULT_SPAN_TEXT)
	{
		global $debug_object;

		// prepare
		$this->prepare($str, $lowercase, $stripRN, $defaultBRText, $defaultSpanText);
		// strip out cdata
		$this->remove_noise("'<!\[CDATA\[(.*?)\]\]>'is", true);
		// strip out comments
		$this->remove_noise("'<!--(.*?)-->'is");
		// Per sourceforge http://sourceforge.net/tracker/?func=detail&aid=2949097&group_id=218559&atid=1044037
		// Script tags removal now preceeds style tag removal.
		// strip out <script> tags
		$this->remove_noise("'<\s*script[^>]*[^/]>(.*?)<\s*/\s*script\s*>'is");
		$this->remove_noise("'<\s*script\s*>(.*?)<\s*/\s*script\s*>'is");
		// strip out <style> tags
		$this->remove_noise("'<\s*style[^>]*[^/]>(.*?)<\s*/\s*style\s*>'is");
		$this->remove_noise("'<\s*style\s*>(.*?)<\s*/\s*style\s*>'is");
		// strip out preformatted tags
		$this->remove_noise("'<\s*(?:code)[^>]*>(.*?)<\s*/\s*(?:code)\s*>'is");
		// strip out server side scripts
		$this->remove_noise("'(<\?)(.*?)(\?>)'s", true);
		// strip smarty scripts
		$this->remove_noise("'(\{\w)(.*?)(\})'s", true);

		// parsing
		while ($this->parse());
		// end
		$this->root->_[HDOM_INFO_END] = $this->cursor;
		$this->parse_charset();

		// make load function chainable
		return $this;

	}
32131
function () {
            var i;
            var self = this;

            /*  determine parameters  */
            var params = $cs.params("publish", arguments, {
                name:         { pos: 0,     req: true            },
                spec:         {             def: {}              },
                async:        {             def: false           },
                capturing:    {             def: true            },
                spreading:    {             def: false           },
                bubbling:     {             def: true            },
                completed:    {             def: _cs.nop         },
                resultinit:   {             def: undefined       },
                resultstep:   {             def: function (a, b) { return b; } },
                directresult: {             def: false           },
                noresult:     {             def: false           },
                firstonly:    {             def: false           },
                silent:       {             def: false           },
                args:         { pos: "...", def: []              }
            });

            /*  short-circuit processing (1/2) to speed up cases
                where no subscribers exist for a local event  */
            var short_circuit = false;
            if (!params.capturing && !params.spreading && !params.bubbling) {
                var subscribers = false;
                for (var id in this.__subscription) {
                    if (!_cs.isown(this.__subscription, id))
                        continue;
                    subscribers = true;
                    break;
                }
                if (!subscribers) {
                    if (params.noresult)
                        return undefined;
                    else if (params.directresult)
                        return params.resultinit;
                    else
                        short_circuit = true;
                }
            }

            /*  create event  */
            var ev = $cs.event({
                name:        params.name,
                spec:        params.spec,
                async:       params.async,
                result:      params.resultinit,
                target:      self,
                propagation: true,
                processing:  true,
                dispatched:  false
            });

            /*  short-circuit processing (2/2)  */
            if (short_circuit)
                return ev;

            /*  tracing  */
            if (!params.silent) {
                $cs.debug(1, "event:" +
                    " " + ev.target().path("/") + ": publish:" +
                    " name=" + ev.name() +
                    " async=" + ev.async() +
                    " capturing=" + params.capturing +
                    " spreading=" + params.spreading +
                    " bubbling=" + params.bubbling +
                    " directresult=" + params.directresult +
                    " noresult=" + params.noresult +
                    " firstonly=" + params.firstonly
                );
            }

            /*  helper function for dispatching event to single component  */
            var event_dispatch_single = function (ev, comp, params, state) {
                for (var id in comp.__subscription) {
                    if (!_cs.isown(comp.__subscription, id))
                        continue;
                    var s = comp.__subscription[id];
                    if (   (   (state === "capturing" && s.capturing)
                            || (state === "targeting"               )
                            || (state === "spreading" && s.spreading)
                            || (state === "bubbling"  && s.bubbling ))
                        && ev.matches(s.name, s.spec)                 ) {

                        /*  verbosity  */
                        if (!params.silent)
                            $cs.debug(1, "event: " + comp.path("/") + ": dispatch " + ev.name() + " to subscriber on " + state);

                        /*  further annotate event object  */
                        ev.state(state);
                        ev.decline(false);

                        /*  call subscription method  */
                        var args = _cs.concat(
                            s.noevent ? [] : [ ev ],
                            s.args,
                            params.args
                        );
                        var result = s.func.apply(s.ctx, args);

                        /*  process return value  */
                        if (s.noevent && _cs.isdefined(result))
                            ev.result(params.resultstep(ev.result(), result));

                        /*  control the further dispatching  */
                        if (!ev.decline()) {
                            ev.dispatched(true);
                            if (params.firstonly)
                                ev.propagation(false);
                        }
                    }
                }
            };

            /*  helper function for dispatching event to all components on hierarchy path  */
            var event_dispatch_all = function (ev, comp, params) {
                /*  determine component tree path  */
                var comp_path;
                if (params.capturing || params.bubbling)
                    comp_path = comp.path();

                /*  phase 1: CAPTURING
                    optionally dispatch event downwards from root component
                    towards target component for capturing subscribers  */
                if (params.capturing) {
                    for (i = comp_path.length - 1; i >= 1; i--) {
                        event_dispatch_single(ev, comp_path[i], params, "capturing");
                        if (!ev.propagation())
                            break;
                    }
                }

                /*  phase 2: TARGETING
                    dispatch event to target component  */
                if (ev.propagation())
                    event_dispatch_single(ev, comp, params, "targeting");

                /*  phase 3: SPREADING
                    dispatch event to all descendant components  */
                if (params.spreading && ev.propagation()) {
                    var visit = function (comp, isTarget) {
                        var cont = true;
                        if (!isTarget) {
                            /*  dispatch on non-target component  */
                            event_dispatch_single(ev, comp, params, "spreading");
                            if (!ev.propagation()) {
                                /*  if propagation should stop, reset the flag again
                                    as in the spreading phase propagation stops only(!)
                                    for the particular sub-tree, not the propagation
                                    process as a whole!  */
                                ev.propagation(true);
                                cont = false;
                            }
                        }
                        if (cont) {
                            /*  dispatch onto all direct child components  */
                            var children = comp.children();
                            for (var i = 0; i < children.length; i++)
                                visit(children[i], false);
                        }
                    };
                    visit(comp, true);
                }

                /*  phase 4: BUBBLING
                    dispatch event upwards from target component towards
                    root component for bubbling (regular) subscribers  */
                if (params.bubbling && ev.propagation()) {
                    for (i = 1; i < comp_path.length; i++) {
                        event_dispatch_single(ev, comp_path[i], params, "bubbling");
                        if (!ev.propagation())
                            break;
                    }
                }

                /*  notify publisher on dispatch completion  */
                params.completed.call(comp, ev);
            };

            /*  perform event publishing,
                either asynchronous or synchronous  */
            if (ev.async())
                /* global setTimeout:false */
                setTimeout(_cs.hook("ComponentJS:settimeout:func", "pass", function () {
                    event_dispatch_all(ev, self, params);
                }), 0);
            else
                event_dispatch_all(ev, self, params);

            /*  return the event, directly the result value or no result value at all  */
            if (params.noresult)
                return undefined;
            else if (params.directresult)
                return ev.result();
            else
                return ev;
        }
532478
function (f) {
/*Line 171 - 'AtomItemsControl.js' */                if (f == this._filter)
/*Line 172 - 'AtomItemsControl.js' */                    return;
/*Line 173 - 'AtomItemsControl.js' */                this._filter = f;
/*Line 174 - 'AtomItemsControl.js' */                this._filteredItems = null;
/*Line 175 - 'AtomItemsControl.js' */                if (this.hasItems()) {
/*Line 176 - 'AtomItemsControl.js' */                    this.onCollectionChangedInternal("refresh", -1, null);
/*Line 177 - 'AtomItemsControl.js' */                }
/*Line 178 - 'AtomItemsControl.js' */            }
466075
public function index() {            
        HookProvider::getInstance()->updateHooks();
        
        $action = Filter::post('action');        
        if($action == 'update' && Filter::checkCsrf()) $this->update();
        
        Theme::theme(new AdministrationTheme)->init(Globals::getTree());        
        $ctrl = new PageController();
        $ctrl
            ->restrictAccess(Auth::isAdmin())
            ->setPageTitle($this->module->getTitle());
        
        $table_id = 'table-installedhooks-' . Uuid::uuid4();

        $view_bag = new ViewBag();
        $view_bag->set('title', $ctrl->getPageTitle());
        $view_bag->set('table_id', $table_id);
        $view_bag->set('hook_list', HookProvider::getInstance()->getRawInstalledHooks());
        
        $ctrl
        ->addExternalJavascript(WT_JQUERY_DATATABLES_JS_URL)
        ->addExternalJavascript(WT_DATATABLES_BOOTSTRAP_JS_URL)
        ->addInlineJavascript('
		  	jQuery(document).ready(function() {
				jQuery("#'.$table_id.'").dataTable( {
					'.I18N::datatablesI18N().',		
					sorting: [[ 2, "asc" ], [ 3, "asc" ]],
					displayLength: 10,
					pagingType: "full_numbers",
					columns: [
						/* 0 Enabled 		*/	{ dataSort: 1, class: "center" },
						/* 1 Enabled sort	*/	{ visible: false},
						/* 2 Hook function	*/	null,
						/* 3 Hook context	*/	null,
						/* 4 Module name	*/	null,
						/* 5 Priority		*/	{ dataSort: 6, class: "center" },
						/* 6 Priority sort	*/	{ type: "num", visible: false}
					]
			  });
			});
		');
        
        ViewFactory::make('AdminConfig', $this, $ctrl, $view_bag)->render();
    }
1108869
function(src, regex, substr, options, index, actionName) {
    //takes the src content and changes the content
    var regExp = null,
        updatedSrc;
    if (typeof regex ===  'string') {
      regExp = new RegExp(regex , options); //regex => string
    } else {
      regExp = regex; //regex => RegExp object
    }
    updatedSrc = String(src).replace(regExp, substr); //note: substr can be a function
    index = typeof index === 'undefined' ? '' : index;
    if (!actionName) {
      grunt.log.verbose.ok(index + 1 + ' action(s) completed.');
    } else {
      grunt.log.verbose.ok(actionName + ' action completed.');
    }
    return updatedSrc;
  }
556732
function JWR(responseCtx) {
            this.body = responseCtx.body || {};
            this.headers = responseCtx.headers || {};
            this.statusCode = responseCtx.statusCode || 200;
        }
126572
public void doScriptText(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException {
        _doScript(req, rsp, req.getView(this, "_scriptText.jelly"), FilePath.localChannel, getACL());
    }