If coverage is enabled attach coverage middleware to the express server run by ember-cli
@param {Object} startOptions - Express server start options
549365
function(startOptions) {
    if (!this._isCoverageEnabled()) {
      return;
    }
    attachMiddleware.serverMiddleware(startOptions.app, {
      configPath: this.project.configPath(),
      root: this.project.root,
      fileLookup: fileLookup
    });
  }
1162796
function startCmdEditor (config, is_skip_header) {

	if (!is_skip_header) {
		console.log(colors.bold('--------------- Command Editor ---------------'));
	}

	// Show a prompt for choose the mode
	var promise = inquirer.prompt([{
		type: 'list',
		name: 'mode',
		message: 'What you want to do ?',
		choices: [
			'Show commands list', 'Add new command', 'Edit command', 'Delete command'
		]
	}]);

	promise.then(function (answer) {

		var mode = answer.mode;
		var promise = null;

		if (mode == 'Add new command') {
			promise = addCommandOnCmdEditor(config);
		} else if (mode == 'Edit command') {
			promise = editCommandOnCmdEditor(config);
		} else if (mode == 'Delete command') {
			promise = deleteCommandOnCmdEditor(config);
		} else if (mode == 'Show commands list') {
			promise = showCommandsOnCmdEditor(config);
		}

		if (!promise) {
			startCmdEditor(config, true);
			return;
		}

		promise.then(function () {
			startCmdEditor(config, true);
		});

	});

}
28327
function (app) {
    this.options = this.options || {}
    this.options.babel = this.options.babel || {}
    this.options.babel.optional = this.options.babel.optional || []

    if (this.options.babel.optional.indexOf('es7.decorators') === -1) {
      this.options.babel.optional.push('es7.decorators')
    }

    /* eslint-disable no-unused-expressions */
    this._super.init && this._super.init.apply(this, arguments)
    /* eslint-enable no-unused-expressions */
  }
482447
function(results, options) {
        console.log('')
        console.log('Passes: ' + results.stats.passes + ' Failures: ' + results.stats.failures)
        each(results.allSuites, function(suite) {
          if (suite.ran) {
            console.group(suite.description)
            each(suite.specs, function(spec){
              var assertionCount = spec.assertions.length + ':'
              if (spec.requiresImplementation())
                console.warn(spec.description)
              else if (spec.passed())
                console.log(assertionCount + ' ' + spec.description)
              else 
                console.error(assertionCount + ' ' + spec.description + ', ' + spec.failure().message)
            })
            console.groupEnd()
          }
        })
      }
881568
function(app, options) {
  let map = istanbul.libCoverage.createCoverageMap();
  app.post(WRITE_COVERAGE,
    bodyParser,
    coverageHandler.bind(null, map, options),
    logError);
}
1257190
function startSkeletonApplication(options) {
  debug('Starting to create application skeleton');
  const configWithDefaults = defaults(
    options, {
      redirects: {
        'documentation-from-root': {
          match: /^\/$/,
          target: '/docs',
        },
      },
      ioc: {
      },
      customMiddleware: {
        beforeSwagger: [],
        afterSwagger: [],
        beforeController: [],
      },
      codegen: {
        controllerStubFolder: 'controllers',
        temporaryDirectory: './.temp',
        templateSet: templates,
      },
      service: {
        listenPort: 10010,
      },
      cors: {
      },
    });

  // If the swagger input is a string, then load it as a filename
  const swaggerFile = configWithDefaults.service.swagger;
  const swagger = typeof swaggerFile === 'string' ?
    yamljs.load(swaggerFile) : swaggerFile;

  // Create service instances
  const app = connect();
  const ioc = connectIoc(configWithDefaults.ioc);

  // Generate custom application code
  generateApplicationCode(
    swagger,
    configWithDefaults.codegen);

  initializeSwagger(swagger, (middleware) => {
    // Pre-request handling middleware
    app.use(query());                                    // Query-string parsing
    app.use(fiddleware.respondJson());                   // res.json(data, status) support.
    app.use(ioc.middleware);                             // Somersault IoC for controllers.
    app.use(cors(configWithDefaults.cors));              // Cross-origin
    app.use(cookieParser());
    // Custom middleware
    for (const item of configWithDefaults.customMiddleware.beforeSwagger) {
      app.use(item);
    }

    // Swagger-tools middleware
    app.use(middleware.swaggerMetadata());
    app.use(middleware.swaggerValidator());

    for (const item of configWithDefaults.customMiddleware.beforeController) {
      app.use(item);
    }

    app.use(middleware.swaggerRouter({
      controllers: path.join(
        configWithDefaults.codegen.temporaryDirectory,
        configWithDefaults.codegen.controllerStubFolder),
    }));
    app.use(middleware.swaggerUi());

    // Post-request handling middleware
    app.use(redirect(configWithDefaults.redirects));      // Redirect / to /docs

    // Custom middleware
    for (const item of configWithDefaults.customMiddleware.afterSwagger) {
      app.use(item);
    }

    app.use(errorHandler());                              // When there's an exception.

    const server = app.listen(configWithDefaults.service.listenPort);
    app.close = function closeServer() {
      server.close();
    };
  });

  return app;
}
878846
protected void checkStartStatus(BundleStartStatus startStatus) throws InvalidBundleContextException {
        final String m = "checkInstallStatus";
        if (startStatus.startExceptions()) {
            Map<Bundle, Throwable> startExceptions = startStatus.getStartExceptions();
            for (Entry<Bundle, Throwable> entry : startExceptions.entrySet()) {
                Bundle b = entry.getKey();
                FFDCFilter.processException(entry.getValue(), ME, m, this,
                                            new Object[] { b.getLocation() });
            }

            throw new LaunchException("Exceptions occurred while starting platform bundles", BootstrapConstants.messages.getString("error.platformBundleException"));
        }

        if (!startStatus.contextIsValid())
            throw new InvalidBundleContextException();
    }
1104363
function EmberAddon() {
    var args = [];
    var options = {};
    console.log("Addon init")

    for (var i = 0, l = arguments.length; i < l; i++) {
        args.push(arguments[i]);
    }

    if (args.length === 1) {
        options = args[0];
    } else if (args.length > 1) {
        args.reverse();
        options = defaults.apply(null, args);
    }

    process.env.EMBER_ADDON_ENV = process.env.EMBER_ADDON_ENV || 'development';

    this.appConstructor(defaults(options, {
        name: 'dummy',
        configPath: './tests/dummy/config/environment',
        trees: {
            app: 'tests/dummy/app',
            styles: 'tests/dummy/app/styles',
            templates: 'tests/dummy/app/templates',
            public: 'tests/dummy/public',
            tests: new Funnel('tests', {
                exclude: [ /^dummy/ ]
            })
        },
        jshintrc: {
            tests: './tests',
            app: './tests/dummy'
        },
    }));
}
763786
function initClient(app, opts) {
  opts.userAgent = userAgent;

  var logger = opts.logger;

  if (!logger) {
    logger = new winston.Logger({
      transports: [
        new winston.transports.Console({
          colorize: true,
          level: opts.debug || 'error'
        })
      ]
    });
  }

  app.set('stormpathLogger', logger);

  var client = require('./client')(opts);

  client.on('error', function (err) {
    logger.error(err);
    app.emit('stormpath.error', err);
  });

  client.on('ready', function () {
    app.set('stormpathClient', client);
    app.set('stormpathConfig', client.config);
  });

  return client;
}
1312583
function start(options, callback) {
  const args = utils.getArgs(options, [config], callback);

  app.set("config", args.options);
  server.listen(args.options.port, args.options.ip, function() {
    return args.callback(null);
  }).on("error", function(err) {
    if (err.code === "EADDRINUSE") {
      return args.callback(err);
    }
    console.error(err);
  });
}
294655
function runSuite(options) {
      var suite = this;

      suite.reset();
      suite.running = true;
      options || (options = {});

      invoke(suite, {
        'name': 'run',
        'args': options,
        'queued': options.queued,
        'onStart': function(event) {
          suite.emit(event);
        },
        'onCycle': function(event) {
          var bench = event.target;
          if (bench.error) {
            suite.emit({ 'type': 'error', 'target': bench });
          }
          suite.emit(event);
          event.aborted = suite.aborted;
        },
        'onComplete': function(event) {
          suite.running = false;
          suite.emit(event);
        }
      });
      return suite;
    }
1275295
def start(options={}, &block)
      debrief options
      @started = true
      load_completions
      Rc.module_eval(&block) if block
      true
    end
1369462
function (options) {
    this.name = "";
    var self = this;

    /**
     * Init default action
     *
     * @param {object} req
     * @param {object} res
     * @param {object} [next]
     * */
    this.init = function(req, res) {}

    this.doc = function(req, res) {
        console.log('got doc action');
        var status = req.get.status || 'ok';
        var data = {
            status: status,
            msg: 'hello world !',
            page : { title: 'Documentation', content: 'home.html' }
        };
        render(data)
    }

    var render = function(data) {
        //var views = self.getConfig('views');// ????
        var dir = getPath('gina').documentation;
        self.setViewsLocation(dir);
        //by default for all pages
        data['page']['lang'] = 'en';
        self.render(data)
    }
}
507879
function eslint(options) {
  if (typeof options === 'boolean') {
    options = { fail: options }
  }
  options = { ...new ESLintOptions(), ...options }

  return new Promise((resolve, reject) => {
    const args = generateArguments(options)
    const child = spawn('node', args, { stdio: options.stdio, cwd: path.resolve(options.appRootPath || getRootPath()) })

    function handleError(error) {
      if (options.fail === false) {
        resolve(false)
      } else {
        reject(cleanupError(error))
      }
    }

    child.on('error', handleError)

    child.on('exit', error => {
      if (error) {
        handleError(error)
      } else {
        resolve(true)
      }
    })
  })
}
440781
function MiddlewareContext (router) {
  events.EventEmitter.call(this);

  /**
   * Express routing options (e.g. `caseSensitive`, `strict`).
   * If set to an Express Application or Router, then its routing settings will be used.
   * @type {express#Router}
   */
  this.router = router || {};

  /**
   * The parsed Swagger API
   * @type {SwaggerObject}
   */
  this.api = null;

  /**
   * The {@link SwaggerParser} instance that was used to parse the API.
   * @type {SwaggerParser}
   */
  this.parser = null;

  /**
   * If the Swagger API contains errors, this will be set
   * @type {Error}
   */
  this.error = null;
}
533801
async function _default(config, routesConfig) {
  const res = await (0, _startApp.default)(config);
  const {
    url,
    app,
    router,
    middleware,
    connect
  } = res;
  let methods;

  if (routesConfig) {
    methods = await (0, _routes.initRoutes2)(routesConfig, middleware, router);
    const routes = router.routes();
    app.use(routes);
  }

  return {
    url,
    app,
    connect,
    methods,
    router
  };
}
649680
function Startline(options) {

  event.call(this);
  var self = this; // closure
  var temp = '';
  this.options = options;
  this.head = 0;
  this.tail = 0;
  this.line = 0;
  this._stream = null;

  if (options.rc4 || options.autokey) { // cipher
    var cipher;
    this._stream = interfac(this.options, options.start, options.end);
    if (options.rc4) {
      cipher = require('arc4')('arc4', String(options.rc4), options.lodash);
      this._stream.on('data', function(callbacks) {

        var callback = cipher.decodeBuffer(callbacks).toString();
        for (var i = 0, ii = callback.length; i < ii; ++i) {
          if (callback[i] === eol) {
            self.tail = self.head + self.line;
            self.head = self.tail + temp.length;
            self.emit('line', temp);
            self.line = 1;
            temp = '';
          } else {
            temp += callback[i];
          }
        }
        if (temp.length > 0) {
          self.tail = self.head + self.line;
          self.head = self.tail + temp.length;
          self.emit('line', temp);
          self.line = 1;
        }
        return;
      });

    } else {
      cipher = require('autokey')(String(options.autokey), options.lodash);
      this._stream.on('data', function(callbacks) {

        var callback = cipher.decodeBuffer(callbacks).toString();
        for (var i = 0, ii = callback.length; i < ii; ++i) {
          if (callback[i] === eol) {
            self.tail = self.head + self.line;
            self.head = self.tail + temp.length;
            self.emit('line', temp);
            self.line = 1;
            temp = '';
          } else {
            temp += callback[i];
          }
        }
        if (temp.length > 0) {
          self.tail = self.head + self.line;
          self.head = self.tail + temp.length;
          self.emit('line', temp);
          self.line = 1;
        }
        return;
      });
    }

  } else if (options.end >= 0) { // no cipher, EOF
    this._stream = interfac(this.options, options.start, options.end);
    this._stream.on('data', function(callbacks) {

      var callback = callbacks.toString();
      for (var i = 0, ii = callback.length; i < ii; ++i) {
        if (callback[i] === eol) {
          self.tail = self.head + self.line;
          self.head = self.tail + temp.length;
          self.emit('line', temp);
          self.line = 1;
          temp = '';
        } else {
          temp += callback[i];
        }
      }
      if (temp.length > 0) {
        self.tail = self.head + self.line;
        self.head = self.tail + temp.length;
        self.emit('line', temp);
        self.line = 1;
      }
      return;
    });

  } else { // file
    this._stream = readlin(this.options, options.start, options.end);
    this._stream.on('line', function(callback) {

      self.tail = self.head + self.line;
      self.head = self.tail + callback.length;
      self.emit('line', callback);
      self.line = 1;
      return;
    });
  }

  // standard events
  this._stream.on('pause', function() {

    return self.emit('pause');
  }).on('resume', function() {

    return self.emit('resume');
  }).on('open', function(fd) {

    return self.emit('open', fd);
  }).on('close', function() {

    return self.emit('close');
  }).on('end', function() {

    return self.emit('end');
  }).on('error', function(err) {

    return self.emit('error', err);
  });
}