{"id":25777089,"url":"https://github.com/pixee/codemodder-java","last_synced_at":"2026-01-11T16:58:25.701Z","repository":{"id":189752397,"uuid":"517357507","full_name":"pixee/codemodder-java","owner":"pixee","description":"a framework for building java codemods","archived":false,"fork":false,"pushed_at":"2024-10-29T10:32:43.000Z","size":4685,"stargazers_count":39,"open_issues_count":8,"forks_count":6,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-10-29T12:22:04.194Z","etag":null,"topics":["codemods","framework","java","library","quality","security","static-analysis"],"latest_commit_sha":null,"homepage":"https://codemodder.io","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pixee.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-07-24T15:11:14.000Z","updated_at":"2024-10-21T12:56:24.000Z","dependencies_parsed_at":"2024-11-06T12:33:55.232Z","dependency_job_id":null,"html_url":"https://github.com/pixee/codemodder-java","commit_stats":{"total_commits":490,"total_committers":16,"mean_commits":30.625,"dds":0.7,"last_synced_commit":"8c57d48e961d3cecc1d1f4217c289820925d9dee"},"previous_names":["pixee/codemodder-java"],"tags_count":63,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pixee%2Fcodemodder-java","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pixee%2Fcodemodder-java/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pixee%2Fcodemodder-java/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pixee%2Fcodemodder-java/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pixee","download_url":"https://codeload.github.com/pixee/codemodder-java/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240987435,"owners_count":19889335,"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":["codemods","framework","java","library","quality","security","static-analysis"],"created_at":"2025-02-27T06:01:36.275Z","updated_at":"2026-01-11T16:58:25.688Z","avatar_url":"https://github.com/pixee.png","language":"Java","funding_links":[],"categories":["静态分析"],"sub_categories":[],"readme":"\u003cpicture\u003e\n  \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"img/codemodder-dark.png\"\u003e\n  \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"img/codemodder-light.png\"\u003e\n  \u003cimg alt=\"Pixee Logo\" src=\"https://github.com/pixee/pixee-cli/raw/main/img/codemodder.png\"\u003e\n\u003c/picture\u003e\n\n# codemodder-java\n\nThis is the Java version of the [Codemodder Framework](https://codemodder.io/), which builds on traditional codemod frameworks by providing\ncodemods with additional context and services. Codemodder plugins inject codemods with the context and services they need to perform complex transforms.\n\nPluggability and the complex transforms they enable distinguish codemodder codemods from traditional codemods.\n\nFor directions on how to write your own codemods, visit the [Codemodder documentation site](https://codemodder.io/).\n\nCodemodder is sponsored by [pixee.ai](https://pixee.ai).\n\n## Developing\n\nFollow these instructions if you intend to modify and build this project from source.\n\n### First Time Set Up\n\n1. Install JDK 17 for building this project. We recommend [Eclipse Adoptium](https://adoptium.net/)\n\n1. Install [Semgrep](https://semgrep.dev/) CLI. See\n   [here](https://semgrep.dev/docs/getting-started/#installing-and-running-semgrep-locally)\n   for instructions. It can usually be done via `pip`:\n   ```shell\n   pip install semgrep==1.84.1\n   ```\n\nIf your python library paths contain your home directory as a root folder (i.e.\ndue to the use of the `$HOME` environment variable), you may need to manually\nset up your `PYTHONPATH` for tests:\n\n```shell\nPYTHONPATH=$HOME/\u003csubpath-to-python-libs-folder\u003e ./gradlew check\n```\n\nYou can check your python paths with:\n\n```shell\npython -m site\n```\n\n### Building\n\n```shell\n./gradlew assemble\n```\n\n### Running Tests\n\n```shell\n./gradlew check\n```\n\nYou need to be able to run [Docker](https://www.docker.com/) for some tests. Make sure you have it installed and have the necessary permissions to run with your user.\n\n#### OpenAI Integration Tests\n\nSome tests integrate with the OpenAI platform. To run these tests, configure an OpenAI key in the Gradle\nproperty `codemodderOpenAIKey`. When no API key is configured, the tests will be skipped. \n\nYou can add the Gradle property to your `~/.gradle/gradle.properties` file:\n\n```properties\ncodemodderOpenAIKey=your-openai-key\n```\n\n### Run the Core Codemods\nYou can download and run the latest release from this repository in order to run the core codemods as a CLI:\n\n```bash\n$ unzip codemodder-java-codemods-\u003cVERSION\u003e.zip\n$ sh core-codemods-\u003cVERSION\u003e/bin/core-codemods\n```\n\nIn order to run them during active development from Gradle, you can use the `run` task:\n\n```shell\n./gradlew :core-codemods:run --args='--output /path/to/my.codetf --dry-run /path/to/project/'\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpixee%2Fcodemodder-java","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpixee%2Fcodemodder-java","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpixee%2Fcodemodder-java/lists"}