Handle the --deliverables argument
496912
private void printDeliverables() {
        final List<Map.Entry<String, String>> pairs = readProjectFile().deliverables.stream()
                .filter(deliverable -> deliverable.id != null)
                .map(deliverable -> new AbstractMap.SimpleEntry<String, String>(deliverable.id, deliverable.name))
                .collect(Collectors.toList());
        final int length = pairs.stream()
                .map(p -> p.getKey())
                .map(String::length)
                .reduce(Integer::max)
                .orElse(0);
        for (Map.Entry<String, String> pair : pairs) {
            System.out.println(Strings.padEnd(pair.getKey(), length, ' ')
                    + (pair.getValue() != null ? ("  " + pair.getValue()) : ""));
        }
    }
323901
function handlePromise(query, q, model, resultsPerPage) {
  return Promise.all([
    query.exec(),
    model.count(q).exec()
  ]).spread(function(results, count) {
    return [
      results,
      Math.ceil(count / resultsPerPage) || 1,
      count
    ]
  });
}
770579
function handleEntryPoints(opts, io, nextHandler) {
  var entries = opts.entries
    , bundlerOpts

  bundlerOpts = opts.bundler

  if(!bundlerOpts || !bundlerOpts.legacy) {
    return nextHandler
  }

  if(!opts.entries || !opts.bundler) {
    return nextHandler
  }

  return handle

  function handle(server, req, resp, parsed) {
    if(!(parsed.pathname in entries) && !('browserify' in parsed.query)) {
      return nextHandler(server, req, resp, parsed)
    }

    var entryPath = entries[parsed.pathname]
      , args = bundlerOpts.flags.slice()
      , bundler
      , output

    if(entryPath) {
      args.unshift(entryPath)
    }

    args.unshift(bundlerOpts.command)
    parsed.loggedPathname = ansicolors.magenta(
        parsed.pathname + ' -> ' + args.map(toLocal).join(' ')
    )
    args.shift()

    bundler = spawn(bundlerOpts.command, args)
    bundler.stderr.pipe(accumError(io.error, resp))
    resp.setHeader('content-type', 'text/javascript')
    bundler.stdout.pipe(resp)
  }

  function toLocal(file) {
    return file.replace(opts.cwd, '.')
  }
}
133810
def on_delivery(err, msg, obj):
    
    if err is not None:
        print('Message {} delivery failed for user {} with error {}'.format(
            obj.id, obj.name, err))
    else:
        print('Message {} successfully produced to {} [{}] at offset {}'.format(
            obj.id, msg.topic(), msg.partition(), msg.offset()))
256904
protected Object executeAroundMessageReceive(ProceedingJoinPoint call) throws Throwable {
    final Object result;
    final Object[] args = call.getArgs();
    final Message message = getMessageArgument(args);
    if (message == null) {
      logger.debug("Ignoring execution around {}. Message argument not found.", call);
      result = call.proceed();
    } else {
      spanManager.beforeHandle(message);
      try {
        result = call.proceed();
        spanManager.afterHandle(null);

        return result;
      } catch (Exception e) {
        spanManager.afterHandle(e);
        throw e;
      }
    }
    return result;
  }
1005347
function deliverMessage (message) {
  workerIterator((worker) => {
    if (this.process.pid === worker.process.pid) {
      return
    }
    debug('delivering message to %s', worker.process.pid)
    worker.send(message)
  })
}
597170
private void handleArgProject(final String arg, final Deque<String> args) {
        final Map.Entry<String, String> entry = parse(arg, args);
        if (entry.getValue() == null) {
            throw new BuildException("Missing value for project " + entry.getKey());
        }
        projectFile = new File(entry.getValue()).getAbsoluteFile();
    }
948514
function (name, args) {
        var ready = when.defer();
        var that = this;

        when(this.ensureWeHaveIntrospectionData()).then(
            function () {
                var buf = that._transformArguments(name, args);
                if (buf) {
                    ready.resolve(buf);
                }
                else {
                    //NOTE! The API looks for "Unknown Function" in the error response.
                    ready.reject("Unknown Function: " + name);
                }
            },
            function (msg) {
                ready.reject(msg);
            }
        );

        return ready.promise;
    }
1052824
function execute(argv) {
  const opts = Options.parse(argv);

  if (opts.version) {
    /* eslint-disable global-require */
    console.log(`v${ require('../package.json').version }`);
    return Promise.resolve(0);
  }

  if (opts.help || !opts._.length) {
    console.log(Options.generateHelp());
    return Promise.resolve(0);
  }

  return lint(resolvePatterns(opts), opts);
}
283242
def handle_execution_engines(args):
    
    assert args
    print('\n'.join(cosmic_ray.plugins.execution_engine_names()))

    return ExitCode.OK
1304133
function(args, done, meta) {
      var seneca = this
      var spec = argspatrun.find(args)

      resolvesend(spec, args, function(err, send) {
        if (err) {
          return done(err)
        }
        send.call(seneca, args, done, meta)
      })
    }
203436
def call(release, _options = {})
      Dir.chdir(release.build_path.to_s) do
        @pattern.each do |pattern|
          Dir.glob(pattern).each do |file|
            clean_path(release, file)
          end
        end
      end
    end
1192268
def RenderPayload(self, result, value):
    """"""
    if "args_rdf_name" in result:
      result["payload_type"] = result["args_rdf_name"]
      del result["args_rdf_name"]

    if "args" in result:
      result["payload"] = self._PassThrough(value.payload)
      del result["args"]

    return result
489139
def call
      if arguments.valid?
        Qiita::Commands::Request.new(arguments)
      else
        Qiita::Commands::Error.new(arguments)
      end
    end
739823
function (args) {
    var output = [args.provider, args.caller];
    if (args.onLoad) {
        output.push(args.onLoad);
    }
    if (args.handler) {
        output.push(args.handler);
    }
    if (args.resources) {
        output.push(args.resources.join("-"));
    }
    return output.join("-");
}
306559
private void handleArgUninstall(final String arg, final Deque<String> args) {
        install = true;
        String name = arg;
        final int posEq = name.indexOf("=");
        String value;
        if (posEq != -1) {
            value = name.substring(posEq + 1);
        } else {
            value = args.peek();
            if (value != null && !value.startsWith("-")) {
                value = args.pop();
            } else {
                value = null;
            }
        }
        if (value == null) {
            throw new BuildException("You must specify a installation package when using the --uninstall argument");
        }
        uninstallId = value;
    }
1091943
function (uses, payload, message, callback) {
        executeMiddlewares(uses, payload, message, function (newPayload) {
            callback.apply(undefined, [newPayload]);
        });
    }