{"id":21041422,"url":"https://github.com/dozmus/csar","last_synced_at":"2025-07-26T07:03:08.291Z","repository":{"id":79482691,"uuid":"136922765","full_name":"dozmus/csar","owner":"dozmus","description":"csar: Query-driven Code Search and Refactoring Framework","archived":false,"fork":false,"pushed_at":"2018-10-03T20:38:09.000Z","size":1808,"stargazers_count":2,"open_issues_count":26,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-13T21:27:03.861Z","etag":null,"topics":["code-search","context-aware","csar","java","java-8","refactor","search","semanticsearch"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dozmus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-06-11T12:24:18.000Z","updated_at":"2025-02-26T04:07:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"c7246a9a-e0f9-4538-9034-01fbff51c3d8","html_url":"https://github.com/dozmus/csar","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/dozmus/csar","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dozmus%2Fcsar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dozmus%2Fcsar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dozmus%2Fcsar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dozmus%2Fcsar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dozmus","download_url":"https://codeload.github.com/dozmus/csar/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dozmus%2Fcsar/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267133478,"owners_count":24040779,"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","status":"online","status_checked_at":"2025-07-26T02:00:08.937Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["code-search","context-aware","csar","java","java-8","refactor","search","semanticsearch"],"created_at":"2024-11-19T13:52:08.906Z","updated_at":"2025-07-26T07:03:08.191Z","avatar_url":"https://github.com/dozmus.png","language":"Java","readme":"csar (code search and refactor)\n========\n\ncsar is a query-driven, semantics-based, and language-agnostic code searching and refactoring tool.\nCurrently it only supports searching for methods and method calls in Java projects, and refactoring them by\nchanging their names or parameters.\n\nYou can find more information in the project report and the [use guide](USEGUIDE.md).\n\n### Example queries\n* `SELECT method:use:final String appender(int, String)`\n   This will find all method calls which have the signature `final String appender(int, String)`.\n\n* `SELECT method:def:public int add(4) REFACTOR rename:sum`\n   This will find all methods called `add` with four arguments of any type, and rename them to `sum'.\n\n* `SELECT method:def:public int double(2) REFACTOR changeparam:int a`\n   This will find and replace the parameter's of this method to be just `int a`.\n\n### Usage\nAll source code in the working directory will be searched, if the current directory is a git repository then only source code in the repository (and staging area) will be searched.\nThis can be toggled using the `--narrow-search` CLI flag.\n\n```\nUsage: java -jar csar.jar [options] search-query\n  Options:\n    --directory, -d\n      Target directory (default: .)\n    --threads, -t\n      Thread count (default: 1)\n    --log-level\n      Log level (default: INFO)\n      Possible Values (most restrictive to least): ERROR, WARN, INFO, DEBUG, TRACE\n    --format, -f\n      Output format (default: PlainText)\n      Possible Values: PlainText, JSON\n    --narrow-search\n      Narrow search domain (default: true)\n    --ignore-file\n      Ignore file (default: .csarignore)\n    --project-url, --url\n      Print project URL\n    --help, -h\n      Print help information\n```\n\nExample (more in the project report): `java -jar csar.jar SELECT method:def:add -t 4`.\n\n### Gradle cheat sheet\n* You can invoke gradle using the `gradlew` scripts, there is one for Windows and one for Unix.\n* Build: `build`\n* Run: `:csar-cli:run`\n* Build distribution JARs: `:csar-cli:distJar` (these will be placed in `csar\\csar-cli\\build\\distributions` alongside archive distributions)\n* Specify Java arguments to `:csar-cli:run` with `-Pjargs=\"SELECT method:def:add -t 1 --log-level TRACE\"`\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdozmus%2Fcsar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdozmus%2Fcsar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdozmus%2Fcsar/lists"}