{"id":17942730,"url":"https://github.com/b1f6c1c4/findbug","last_synced_at":"2026-05-09T06:36:16.885Z","repository":{"id":40665778,"uuid":"270856591","full_name":"b1f6c1c4/findbug","owner":"b1f6c1c4","description":"Locate bug(s) for ANY program with YES/NO feedback only.","archived":false,"fork":false,"pushed_at":"2023-01-06T22:30:13.000Z","size":289,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-05T06:51:11.064Z","etag":null,"topics":["algebra","algorithms","blindness","bug","cpp","debug","lattice","nodejs"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/b1f6c1c4.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-06-08T23:39:43.000Z","updated_at":"2023-01-19T11:09:15.000Z","dependencies_parsed_at":"2023-02-06T09:47:28.675Z","dependency_job_id":null,"html_url":"https://github.com/b1f6c1c4/findbug","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/b1f6c1c4/findbug","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b1f6c1c4%2Ffindbug","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b1f6c1c4%2Ffindbug/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b1f6c1c4%2Ffindbug/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b1f6c1c4%2Ffindbug/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/b1f6c1c4","download_url":"https://codeload.github.com/b1f6c1c4/findbug/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b1f6c1c4%2Ffindbug/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259308157,"owners_count":22837974,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["algebra","algorithms","blindness","bug","cpp","debug","lattice","nodejs"],"created_at":"2024-10-29T03:07:02.476Z","updated_at":"2026-05-09T06:36:11.861Z","avatar_url":"https://github.com/b1f6c1c4.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# findbug\n\n[![npm version](https://img.shields.io/npm/v/findbug.svg?style=flat)](https://www.npmjs.com/package/findbug)\n[![npm downloads](https://img.shields.io/npm/dt/findbug.svg?style=flat)](https://www.npmjs.com/package/findbug)\n[![npm bundle size](https://img.shields.io/bundlephobia/min/findbug.svg?style=flat)](https://www.npmjs.com/package/findbug)\n[![npm license](https://img.shields.io/npm/l/findbug)](https://www.npmjs.com/package/findbug)\n\n\u003e Locate bug(s) for ANY program with YES/NO feedback only.\n\n## TL;DR\n\nInstall:\n```bash\n$ npm install -g findbug\n```\n\nNow try this: find which argument(s) caused `ls` to fail:\n```bash\n$ findbug -1xXCmEqS ls A B C\n```\n\n`findbug` works NOT by looking at the output of 'ls';\ninstead, it works by running `ls A B C`, `ls A B`, `ls B C`, ... and summarize their exit codes.\nIt seems to be really dumb, but sometimes program errors without ANY useful information.\n`findbug` can help you locate the *minimum failing pieces* of code.\n\n- `-1` means don't run `ls` without any argument.\n- `-xX` means to tweak the arguments.\n- `-C` speeds up findbug drastically by such observation: \"If `ls P Q` succeeded, `ls P` and `ls Q` will also succeed.\"\n- `-m` means to aim for smallest failing piece, instead of the vague claim: `ls A B C`.\n- `-E` means to exhaust all possible minimal failing piece.\n- `-q` means to be quiet.\n- `-S` means to produce a nice summary report.\n\n## Usage\n\n```\nfindbug [\u003coptions\u003e] [--] \u003cprogram\u003e [\u003cargs\u003e...]\n\nProgram Execution Control:\n  --cwd            Specify the cwd of the program.                      [string]\n  -P, --max-procs  Run up to max-procs processes concurrently.\n                                                          [number] [default: 16]\n  -x, --xargs      Parameters are provided to the program using arguments\n                   instead of stdin.                                   [boolean]\n  -1, --one        At least one parameter is required to run the program.\n                                                                       [boolean]\n\nDebug Parameter Control:\n  -a, --arg-file  Read parameters from file instead of stdin.           [string]\n  -X, --in-place  Use the arguments as parameters.                     [boolean]\n  -s, --split     Split parameters (with bash-like rules) when applying\n                  parameters to the program. Only works with -x.       [boolean]\n\nSuccess / Failure / Error Detection:\n  -z, --zero        Meaning of getting zero exit code.\n               [string] [choices: \"ignore\", \"fail\", \"error\"] [default: \"ignore\"]\n  -Z, --non-zero    Meaning of getting non-zero exit code.\n                 [string] [choices: \"ignore\", \"fail\", \"error\"] [default: \"fail\"]\n  -O, --stdout      Meaning of getting some output from program to stderr.\n               [string] [choices: \"ignore\", \"fail\", \"error\"] [default: \"ignore\"]\n  -e, --stderr      Meaning of getting some output from program to stderr.\n               [string] [choices: \"ignore\", \"fail\", \"error\"] [default: \"ignore\"]\n  -T, --time-limit  Maximum execution time in ms, s, m, h, etc.         [string]\n  -t, --timeout     Meaning of not quitting before a deadline.\n               [string] [choices: \"ignore\", \"fail\", \"error\"] [default: \"ignore\"]\n\nSearching Strategies and a priori Assumptions:\n  -M, --sup, --max  Search upwards: Get the largest / supremum subset(s).\n                                                                       [boolean]\n  -m, --inf, --min  Search downwards: Get the smallest / infimum subset(s).\n                                                                       [boolean]\n  -E, --exhaust     Find all solutions when using --co / --contra.     [boolean]\n  -c, --co          Assume that adding parameter(s) to a successful execution\n                    will not fail. With --sup, findbug can find a supremum\n                    failing subset of parameters, to which adding any item(s)\n                    will make the program success / error. With --inf, findbug\n                    can find a infimum successful subset of parameters, from\n                    which removing any item(s) will make the program fail /\n                    error.                                             [boolean]\n  -C, --contra      Assume that adding parameter(s) to a failing execution will\n                    not succeed. With --sup, findbug can find a supremum\n                    successful subset of parameters, to which adding any\n                    item(s) will make the program fail / error. With --inf,\n                    findbug can find a infimum failing subset of parameters,\n                    from which removing any item(s) will make the program\n                    success / error.                                   [boolean]\n  -F, --invariant   Don't make assumptions, search the entire parameter space.\n                    This option cannot be used together with --sup nor --inf.\n                                                                       [boolean]\n\nOutput and Cache Control:\n  -v, --verbose        Increase console verbosity. Max. -vvv.            [count]\n  -q, --quiet          Decrease console verbosity. Min. -qqqq.           [count]\n  -V, --log-verbose    Increase log file verbosity. Max. -VV.            [count]\n  -Q, --log-quiet      Decrease log file verbosity. Min. -QQQQQ.         [count]\n  -S, --summary        Write a nice summary report to stdout when finish.\n                                                                       [boolean]\n  -w, --output         A directory to store program outputs, also used as cache.\n                       NOT affected by --dry-run. If not exist, will do mkdir -p\n                                             [string] [default: \".findbug-work\"]\n  -l, --result-file    File to store findbug output (override), relative to the\n                       output directory.      [string] [default: \"findbug.json\"]\n  -L, --log-file       File to store findbug log (append-only), relative to the\n                       output directory.       [string] [default: \"findbug.log\"]\n  --cache              Cache the execution result to the output directory.\n                       Disabling this will also disable reading cache.\n                                                       [boolean] [default: true]\n  -r, --record-stdout  Log the stdout of each execution to a separate file in\n                       the output directory.                           [boolean]\n  -R, --record-stderr  Log the stderr of each execution to a separate file in\n                       the output directory.                           [boolean]\n  --truncate           Remove the log file before proceed. IS NOT affected by\n                       --dry-run.                                      [boolean]\n  --prune              Remove the entire output directory before proceed.\n                                                                       [boolean]\n\nOptions:\n  -h, --help     Show help                                             [boolean]\n  --version      Show version number                                   [boolean]\n  --json         Path to JSON config file\n  -n, --dry-run  Don't run the progam, but check the configurations. ATTENTION:\n                 --log-file will still be appended or overwritten.     [boolean]\n\nChoosing between -c/-C/-F as well as -m/-M:\n\n  Use -c if the target program is more likely to fail on small inputs.\n    - 'grep' fails if given too few inputs.\n    - 'find' fails if given too few starting points.\n  Use -C if the target program is more likely to fail on large inputs.\n    - 'ls' fails if ANY file is missing.\n    - 'gcc' fails if ANY source file contains error.\n  Use -F only if you can't use any of the strategies above.\n    - 'grep | xargs ls' fails on too few OR too many inputs (assume pipefail).\n    - 'bash -c \"exit $RANDOM\"' is wholly chaotic.\n\n  Use -m if you want to aim small.\n    - 'findbug -cm grep' Find minimum inputs on which 'grep' succeed.\n    - 'findbug -Cm ls'   Find minimum inputs on which 'ls' fail.\n  Use -M if you want to aim large.\n    - 'findbug -cM grep' Find maximum inputs on which 'grep' fail.\n    - 'findbug -CM ls'   Find maximum inputs on which 'ls' succeed.\n\n  Note: You cannot use -m or -M along with -F.\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fb1f6c1c4%2Ffindbug","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fb1f6c1c4%2Ffindbug","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fb1f6c1c4%2Ffindbug/lists"}