{"id":43145879,"url":"https://github.com/pixee/simple-gradle-codemod-tutorial","last_synced_at":"2026-01-31T23:44:42.912Z","repository":{"id":213428219,"uuid":"729253569","full_name":"pixee/simple-gradle-codemod-tutorial","owner":"pixee","description":"An example codemodder codemod","archived":false,"fork":false,"pushed_at":"2026-01-16T16:14:58.000Z","size":222,"stargazers_count":10,"open_issues_count":12,"forks_count":6,"subscribers_count":5,"default_branch":"main","last_synced_at":"2026-01-17T05:15:18.952Z","etag":null,"topics":["codemod","codemods","java"],"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":"mit","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-12-08T18:18:03.000Z","updated_at":"2024-09-10T13:41:55.000Z","dependencies_parsed_at":"2023-12-21T00:55:32.437Z","dependency_job_id":"4ac28bc2-712a-41ab-b78a-fff0467a6128","html_url":"https://github.com/pixee/simple-gradle-codemod-tutorial","commit_stats":null,"previous_names":["pixee/simple-gradle-codemod-tutorial"],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/pixee/simple-gradle-codemod-tutorial","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pixee%2Fsimple-gradle-codemod-tutorial","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pixee%2Fsimple-gradle-codemod-tutorial/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pixee%2Fsimple-gradle-codemod-tutorial/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pixee%2Fsimple-gradle-codemod-tutorial/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pixee","download_url":"https://codeload.github.com/pixee/simple-gradle-codemod-tutorial/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pixee%2Fsimple-gradle-codemod-tutorial/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28960985,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-31T23:03:11.038Z","status":"ssl_error","status_checked_at":"2026-01-31T22:56:44.691Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["codemod","codemods","java"],"created_at":"2026-01-31T23:44:42.841Z","updated_at":"2026-01-31T23:44:42.906Z","avatar_url":"https://github.com/pixee.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sample Codemod\n\nThis page holds an example Codemodder codemod, built with Gradle, as discussed in the [codemodder.io tutorial](http://codemodder.io/languages/java/fork_sample).\n\nThe newer methods in `java.nio.file.Files` replaced the need for some of community-loved APIs in `org.apache.commons.io.FileUtils`. and this project demonstrates creating a codemod to move `org.apache.commons.io.FileUtils#readLines()` to `java.nio.file.Files.readAllLines()`. The codemod should make changes like this:\n\n```diff\n- import org.apache.commons.io.FileUtils; // remove the import if possible\n+ import java.nio.file.Files;\n\n...\n\n- List\u003cString\u003e lines = FilesUtils.readLines(file);\n+ List\u003cString\u003e lines = Files.readAllLines(file.toPath());\n```\n\n# Setup\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\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# Testing\n\n```bash\n$ ./gradlew check\n```\n\n# Building\n\n```bash\n$ ./gradlew distZip\n```\n\n# Running\n\nAfter building, you can run the distribution packaged in the `distZip` task.\n\n```bash\n$ cd app/build/distributions/\n$ unzip app.zip\n \n# do it without making the actual code changes on disk\n$ app/bin/app --dry-run /my-project\n\n# do it and make the actual code changes\n$ app/bin/app /my-project\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpixee%2Fsimple-gradle-codemod-tutorial","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpixee%2Fsimple-gradle-codemod-tutorial","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpixee%2Fsimple-gradle-codemod-tutorial/lists"}