helper ////////////////////////////////////////////////////////////////
321440
protected CaseIllegalStateTransitionException createIllegalStateTransitionException(String transition, CmmnActivityExecution execution) {
    String id = execution.getId();
    return LOG.illegalStateTransitionException(transition, id, getTypeName());
  }
1161472
function helpConsole() {
    /* eslint-disable no-console */
    console.log('  Examples:');
    console.log('');
    console.log('    $ renovate --token abc123 singapore/lint-condo');
    console.log(
      '    $ renovate --labels=renovate,dependency --ignore-unstable=false --log-level debug singapore/lint-condo'
    );
    console.log('    $ renovate singapore/lint-condo singapore/package-test');
    /* eslint-enable no-console */
  }
312225
function generateWhenAndNotHelpers(currentState, currentData, parsedStates) {
  const buildWhenFnBody = state => callback => {
    if (currentState.name !== state) {
      return null
    }
    return callback instanceof Function ? callback(currentData) : callback
  }

  const buildNotFnBody = state => callback => {
    if (currentState.name === state) {
      return null
    }
    return callback instanceof Function ? callback() : callback
  }

  return parsedStates
    .reduce(
      (helpers, state) => ({
        ...helpers,
        [buildFnName('when', state.name)]: buildWhenFnBody(state.name),
        [buildFnName('not', state.name)]: buildNotFnBody(state.name),
      }),
      {}
    )
}
361546
def helpers
      @helpers ||= begin
        helpers = Module.new
        all = ActionController::Base.all_helpers_from_path(helpers_paths)
        ActionController::Base.modules_for_helpers(all).each do |mod|
          helpers.include(mod)
        end
        helpers
      end
    end
735177
function helper(pluginOptions, doValidation) {
  const options = mergeOptions(pluginOptions);

  return through.obj((file, encoding, callback) => {
    let oldContent;
    let newContent;
    let type = null;

    if (file.isNull()) {
      callback(null, file);
      return;
    }

    if (file.isStream()) {
      callback(new PluginError(PLUGIN_NAME, 'Streaming not supported'));
      return;
    }

    // Check if current file should be treated as JavaScript, HTML, CSS or if it should be ignored
    ['js', 'css', 'html'].some((value) => {
      // Check if at least one element in 'file_types' is suffix of file basename
      if (options[value].file_types.some(suffix => path.basename(file.path).endsWith(suffix))) {
        type = value;
        return true;
      }

      return false;
    });

    // Initialize properties for reporter
    file.jsbeautify = {};
    file.jsbeautify.type = type;
    file.jsbeautify.beautified = false;
    file.jsbeautify.canBeautify = false;

    if (type) {
      oldContent = file.contents.toString('utf8');
      newContent = beautify[type](oldContent, options);

      if (oldContent.toString() !== newContent.toString()) {
        if (doValidation) {
          file.jsbeautify.canBeautify = true;
        } else {
          file.contents = Buffer.from(newContent);
          file.jsbeautify.beautified = true;
        }
      }
    }

    callback(null, file);
  });
}
1289267
function outputHelp() {
    console.log(
        '\nUsage: git-hooks [options]\n\n' +
        'A tool to manage project Git hooks\n\n' +
        'Options:\n\n' +
        Object.keys(options)
            .map(function (key) {
                return '  --' + key + '\t' + options[key] + '\n';
            })
            .join('')
    );
}
634928
function runHelp(){
			var messageHelp = "Usage: titanium-jsduck [command] [parameters]\n\n";
			messageHelp += "Commands:\n\tinstall \n\t\t- Installs JSDuck inside a Titanium Mobile Project.";
			messageHelp += "\n\topen \n\t\t- Opens Documentation in Safari Browser";
			messageHelp += "\n\topen firefox \n\t\t- Opens Documentation in Firefox Browser";
			messageHelp += "\n\topen chrome  \n\t\t- Opens Documentation in Google Chrome Browser";
			messageHelp += "\n\trun \n\t\t- Runs jsduck to generate Documentation without compiling Mobile Project";
			
			console.log(messageHelp);
			console.log();
			console.log();
			process.exit();
			
		}
135879
function() {
      this.context.aliases.blockHelperMissing = 'helpers.blockHelperMissing';

      var params = ["depth0"];
      this.setupParams(0, params);

      var current = this.topStack();
      params.splice(1, 0, current);

      this.source.push("if (!" + this.lastHelper + ") { " + current + " = blockHelperMissing.call(" + params.join(", ") + "); }");
    }
870628
def _setup_helper():
    """"""
    base = os.path.abspath(os.path.dirname(__file__))
    helper = os.path.join(base, "helper.sh")
    with open(helper) as fh:
        click.echo(fh.read())
1063212
function() {
                this.aliases.blockHelperMissing = 'helpers.blockHelperMissing';

                // We're being a bit cheeky and reusing the options value from the prior exec
                var params = [this.contextName(0)];
                this.setupParams('', 0, params, true);

                this.flushInline();

                var current = this.topStack();
                params.splice(1, 0, current);

                this.pushSource("if (!" + this.lastHelper + ") { " + current + " = blockHelperMissing.call(" + params.join(", ") + "); }");
            }
1134361
function parseId( id ) {
        var segs = id.split( '!' );

        if ( MODULE_ID_REG.test( segs[ 0 ] ) ) {
            return {
                module   : segs[ 0 ],
                resource : segs[ 1 ]
            };
        }

        return null;
    }
935783
function _fnCheck(callback, data) {
                if (angular.isUndefinedOrNull(data) || angular.isArray(data)) {
                    return; // jmp out
                }

                if (angular.isFunction(callback)) {
                    return callback(data, $filter);
                } else {
                    if (typeof callback === 'boolean') {
                        data = !!data;
                        return data === callback;
                    } else if (angular.isDefined(callback)) {
                        try {
                            var _regex = new RegExp(callback);
                            return _regex.test(data);
                        }
                        catch (err) {
                            if (typeof data === 'string') {
                                return data.indexOf(callback) > -1;
                            } else {
                                return; // jmp out
                            }
                        }
                    } else {
                        return; // jmp out
                    }
                }
            }
1334659
function(helpers, options) {
      if (typeof helpers === 'object') {
        this.visit('helper', helpers);
        return this;
      }

      if (lazy.isGlob(helpers)) {
        this.loader('helpers-glob', ['base-glob'], function (files) {
          return files.map(function (fp) {
            return require(path.resolve(fp));
          });
        });

        var res = this.compose('helpers-glob')(helpers, options);
        this.visit('helper', res);
        return this;
      }

      if (typeof helpers === 'string') {
        console.log('loading helpers from a string is not implemented yet.');
      }
      return this;
    }
1365280
function(callback) {
				// tell the user what we’re doing
				grunt.verbose.writeln('Validating options…');

				// make sure alpha is valid
				if (!validateAlpha(options.alpha)) {
					return grunt.fail.fatal('Invalid `alpha` option');
				}
				grunt.verbose.writeln('`alpha` option OK');

				// make sure background is valid
				if (!validateBackground(options.background)) {
					return grunt.fail.fatal('Invalid `background` option');
				}
				grunt.verbose.writeln('`background` option OK');

				// make sure colorspace is valid
				if (!validateColorspace(options.colorspace)) {
					return grunt.fail.fatal('Invalid `colorspace` option');
				}
				grunt.verbose.writeln('`colorspace` option OK');

				// make sure dither is valid
				if (!validateDither(options.dither)) {
					return grunt.fail.fatal('Invalid `dither` option');
				}
				grunt.verbose.writeln('`dither` option OK');

				// make sure filter is valid
				if (!validateFilter(options.filter)) {
					return grunt.fail.fatal('Invalid `filter` option');
				}
				grunt.verbose.writeln('`filter` option OK');

				// make sure filterSupport is valid
				if (!validateFilterSupport(options.filterSupport)) {
					return grunt.fail.fatal('Invalid `filterSupport` option');
				}
				grunt.verbose.writeln('`filterSupport` option OK');

				// make sure interlace is valid
				if (!validateInterlace(options.interlace)) {
					return grunt.fail.fatal('Invalid `interlace` option');
				}
				grunt.verbose.writeln('`interlace` option OK');

				// make sure jpegFancyUpsampling is valid
				if (!validateJpegFancyUpsampling(options.jpegFancyUpsampling)) {
					return grunt.fail.fatal('Invalid `jpegFancyUpsampling` option');
				}
				grunt.verbose.writeln('`jpegFancyUpsampling` option OK');

				// make sure optimize is valid
				var optimize = validateOptimize(options.optimize)
				if (!optimize) {
					return grunt.fail.fatal('Invalid `optimize` option');
				} else {
					options.optimize = optimize;
				}
				grunt.verbose.writeln('`optimize` option OK');

				// make sure image_optim is available
				if ((options.optimize.input.image_optim > 0 || options.optimize.output.image_optim > 0) && !binPath.image_optim) {
					return grunt.fail.fatal('Unable to locate image_optim.');
				} else if (options.optimize.input.image_optim > 0 || options.optimize.output.image_optim > 0) {
					grunt.verbose.writeln('image_optim located');
				} else {
					grunt.verbose.writeln('image_optim not needed');
				}

				// make sure picopt is available
				if ((options.optimize.input.picopt > 0 || options.optimize.output.picopt > 0) && !binPath.picopt) {
					return grunt.fail.fatal('Unable to locate picopt.');
				} else if (options.optimize.input.picopt > 0 || options.optimize.output.picopt > 0) {
					grunt.verbose.writeln('picopt located');
				} else {
					grunt.verbose.writeln('picopt not needed');
				}

				// make sure ImageOptim is available
				if ((options.optimize.input.imageOptim > 0 || options.optimize.output.imageOptim > 0) && !binPath.imageOptim) {
					return grunt.fail.fatal('Unable to locate ImageOptim-CLI.');
				} else if (options.optimize.input.imageOptim > 0 || options.optimize.output.imageOptim > 0) {
					grunt.verbose.writeln('ImageOptim-CLI located');
				} else {
					grunt.verbose.writeln('ImageOptim-CLI not needed');
				}

				// make sure pngCompressionFilter is valid
				if (!validatePngCompressionFilter(options.pngCompressionFilter)) {
					return grunt.fail.fatal('Invalid `pngCompressionFilter` option');
				}
				grunt.verbose.writeln('`pngCompressionFilter` option OK');

				// make sure pngCompressionLevel is valid
				if (!validatePngCompressionLevel(options.pngCompressionLevel)) {
					return grunt.fail.fatal('Invalid `pngCompressionLevel` option');
				}
				grunt.verbose.writeln('`pngCompressionLevel` option OK');

				// make sure pngCompressionStrategy is valid
				if (!validatePngCompressionStrategy(options.pngCompressionStrategy)) {
					return grunt.fail.fatal('Invalid `pngCompressionStrategy` option');
				}
				grunt.verbose.writeln('`pngCompressionStrategy` option OK');

				// make sure pngExcludeChunk is valid
				if (!validatePngExcludeChunk(options.pngExcludeChunk)) {
					return grunt.fail.fatal('Invalid `pngExcludeChunk` option');
				}
				grunt.verbose.writeln('`pngExcludeChunk` option OK');

				// make sure pngPreserveColormap is valid
				if (!validatePngPreserveColormap(options.pngPreserveColormap)) {
					return grunt.fail.fatal('Invalid `pngPreserveColormap` option');
				}
				grunt.verbose.writeln('`pngPreserveColormap` option OK');

				// make sure posterize is valid
				if (!validatePosterize(options.posterize)) {
					return grunt.fail.fatal('Invalid `posterize` option');
				}
				grunt.verbose.writeln('`posterize` option OK');

				// make sure quality is valid
				if (!validateQuality(options.quality)) {
					return grunt.fail.fatal('Invalid `quality` option');
				}
				grunt.verbose.writeln('`quality` option OK');

				// make sure resizeFunction is valid
				if (!validateResizeFunction(options.resizeFunction)) {
					return grunt.fail.fatal('Invalid `resizeFunction` option');
				}
				grunt.verbose.writeln('`resizeFunction` option OK');

				// make sure strip is valid
				if (!validateStrip(options.strip)) {
					return grunt.fail.fatal('Invalid `strip` option');
				}
				grunt.verbose.writeln('`strip` option OK');

				// make sure svgoPlugins is valid
				if (!validateSvgoPlugins(options.svgoPlugins)) {
					return grunt.fail.fatal('Invalid `svgoPlugins` option');
				}
				grunt.verbose.writeln('`svgoPlugins` option OK');

				// make sure unsharp is valid
				if (!validateUnsharp(options.unsharp)) {
					return grunt.fail.fatal('Invalid `unsharp` option');
				}
				grunt.verbose.writeln('`unsharp` option OK');

				// make sure widthAsDir is valid
				if (!validateWidthAsDir(options.widthAsDir)) {
					return grunt.fail.fatal('Invalid `widthAsDir` option');
				}
				grunt.verbose.writeln('`pngPreserveColormap` option OK');

				// make sure the widths are valid
				if (!validateWidths(options.widths)) {
					return grunt.fail.fatal('Invalid `widths` option');
				}
				grunt.verbose.writeln('`widths` option OK');

				// make sure there are images to resize
				if (task.files.length === 0) {
					return grunt.fail.fatal('No valid source files were found.');
				}
				grunt.verbose.writeln('Source files found');

				// loop through each input
				async.each(task.files, function(file, callback2) {
					// make sure we have a valid target and source
					validateTarget(file);
					validateSource(file);
					callback2();
				}, callback);
			}
968767
public void help() {
        final HelpFormatter formatter = new HelpFormatter();
        final String helpString = getHelpString();
        formatter.printHelp(80,
            helpString,
            "options:",
            getOptions(),
                "[RUNDECK version " + VersionConstants.VERSION + " (" + VersionConstants.BUILD + ")]");
    }
869043
function permuteHelperAST(file, metadata, id, localBindings, getDependency) {
  if (localBindings && !id) {
    throw new Error("Unexpected local bindings for module-based helpers.");
  }

  if (!id) return;

  const {
    localBindingNames,
    dependencies,
    exportBindingAssignments,
    exportPath,
    exportName,
    importBindingsReferences,
    importPaths,
  } = metadata;

  const dependenciesRefs = {};
  dependencies.forEach((name, id) => {
    dependenciesRefs[id.name] =
      (typeof getDependency === "function" && getDependency(name)) || id;
  });

  const toRename = {};
  const bindings = new Set(localBindings || []);
  localBindingNames.forEach(name => {
    let newName = name;
    while (bindings.has(newName)) newName = "_" + newName;

    if (newName !== name) toRename[name] = newName;
  });

  if (id.type === "Identifier" && exportName !== id.name) {
    toRename[exportName] = id.name;
  }

  traverse(file, {
    Program(path) {
      // We need to compute these in advance because removing nodes would
      // invalidate the paths.
      const exp = path.get(exportPath);
      const imps = importPaths.map(p => path.get(p));
      const impsBindingRefs = importBindingsReferences.map(p => path.get(p));

      const decl = exp.get("declaration");
      if (id.type === "Identifier") {
        if (decl.isFunctionDeclaration()) {
          exp.replaceWith(decl);
        } else {
          exp.replaceWith(
            t.variableDeclaration("var", [t.variableDeclarator(id, decl.node)]),
          );
        }
      } else if (id.type === "MemberExpression") {
        if (decl.isFunctionDeclaration()) {
          exportBindingAssignments.forEach(assignPath => {
            const assign = path.get(assignPath);
            assign.replaceWith(t.assignmentExpression("=", id, assign.node));
          });
          exp.replaceWith(decl);
          path.pushContainer(
            "body",
            t.expressionStatement(
              t.assignmentExpression("=", id, t.identifier(exportName)),
            ),
          );
        } else {
          exp.replaceWith(
            t.expressionStatement(t.assignmentExpression("=", id, decl.node)),
          );
        }
      } else {
        throw new Error("Unexpected helper format.");
      }

      Object.keys(toRename).forEach(name => {
        path.scope.rename(name, toRename[name]);
      });

      for (const path of imps) path.remove();
      for (const path of impsBindingRefs) {
        const node = t.cloneNode(dependenciesRefs[path.node.name]);
        path.replaceWith(node);
      }

      // We only use "traverse" for all the handy scoping helpers, so we can stop immediately without
      // actually doing the traversal.
      path.stop();
    },
  });
}
593551
function (name, help) {
  var options = {
    optionStrings: [],
    dest: name,
    help: help
  };

  Action.call(this, options);
}