{"id":19601140,"url":"https://github.com/rodrigo-brito/refactoring-aware-diff","last_synced_at":"2025-09-04T02:33:37.009Z","repository":{"id":39484105,"uuid":"232331053","full_name":"rodrigo-brito/refactoring-aware-diff","owner":"rodrigo-brito","description":"RAID is a tool pipeline that seamlessly enriches GitHub diff results with refactoring information.","archived":false,"fork":false,"pushed_at":"2021-09-19T13:16:00.000Z","size":89095,"stargazers_count":84,"open_issues_count":2,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-23T18:54:37.631Z","etag":null,"topics":["actions","chrome-extension","refactoring","review-tools"],"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/rodrigo-brito.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-01-07T13:31:55.000Z","updated_at":"2025-03-27T07:31:03.000Z","dependencies_parsed_at":"2022-09-19T19:50:16.053Z","dependency_job_id":null,"html_url":"https://github.com/rodrigo-brito/refactoring-aware-diff","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rodrigo-brito%2Frefactoring-aware-diff","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rodrigo-brito%2Frefactoring-aware-diff/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rodrigo-brito%2Frefactoring-aware-diff/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rodrigo-brito%2Frefactoring-aware-diff/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rodrigo-brito","download_url":"https://codeload.github.com/rodrigo-brito/refactoring-aware-diff/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251171727,"owners_count":21547149,"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":["actions","chrome-extension","refactoring","review-tools"],"created_at":"2024-11-11T09:17:22.226Z","updated_at":"2025-04-27T16:32:30.101Z","avatar_url":"https://github.com/rodrigo-brito.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RAID: Refactoring-aware and Intelligent Diffs\n\n[![Tests and Lint](https://github.com/rodrigo-brito/refactoring-aware-diff/workflows/Tests%20and%20Lint/badge.svg)](https://github.com/rodrigo-brito/refactoring-aware-diff/actions)\n[![Chrome Web Store](https://img.shields.io/chrome-web-store/v/bclbegekihgpelanbbleaceefgmekjdd)](https://chrome.google.com/webstore/detail/refactoring-aware-diff/bclbegekihgpelanbbleaceefgmekjdd)\n[![MIT license](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)\n\n- Published at 29th IEEE/ACM International Conference on Program Comprehension (ICPC), 2021 \n- ArXiv: https://arxiv.org/abs/2103.11453\n- IEEE Library: https://www.computer.org/csdl/proceedings-article/icpc/2021/140300a265/1tB7wfFt3ji\n\nCode review is a key practice in modern software development. Currently, this practice is performed using textual diff tools, such as the one provided by GitHub. However, diff results can easily become complex and hard to understand. Refactorings, for example, are not represented at all in diff results. This makes diff understanding more complex because reviewers need to infer themselves that a given group of added and removed lines of code represent, for example, an extract method.\n\n![result](https://user-images.githubusercontent.com/7620947/83893436-4ff0d300-a726-11ea-8a4d-48d34c36d115.gif)\n\nRAID is a tool pipeline that seamlessly enriches GitHub diff results with refactoring information. See the following figure:\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://user-images.githubusercontent.com/7620947/76000414-706c7f80-5ee2-11ea-8f21-06bfb2646b36.png\" width= \"400px\" /\u003e\n\u003c/p\u003e\n\nAs presented in this figure, this pipeline has three key components:\n\n-   [RefDiff](https://github.com/aserg-ufmg/RefDiff): a tool to detect refactoring operations in commits. We rely on GitHub Actions to automatically execute RefDiff after each Pull Request.\n\n-   An [external server](https://github.com/rodrigo-brito/refactoring-aware-diff/tree/server), that collects the list of refactorings produced by RefDiff.\n\n-   A [Chrome plug-in](https://chrome.google.com/webstore/detail/refactoring-aware-review/bclbegekihgpelanbbleaceefgmekjdd) that seamlessly annotates diff chunks with refactoring data (see the following snapshot).\n\n#### Example of Move Method\n\n![Move Method](https://user-images.githubusercontent.com/7620947/83657276-058d1c00-a597-11ea-811b-6761bdf2d58e.png)\n\n#### Supported Refactorings\n\nRAID relies on RefDiff and support the following refactorings\n\n| Language   | Language Refactorings                                                                  |\n|------------|----------------------------------------------------------------------------------------|\n| Java       | Move, Extract Function, Inline Function, Rename, Change Signature, Pull Up, Push Down  |\n| JavaScript |  Move, Extract Function, Inline Function, Rename, Change Signature, Pull Up, Push Down |\n| C          | Move, Extract Function, Inline Function, Rename, Change Signature                      |\n| Go         | Move, Extract Function, Inline Function, Rename, Change Signature                      |\n\n## Installation\n\nTo detect refactorings in your repository, you must first install this [Chrome plug-in](https://chrome.google.com/webstore/detail/refactoring-aware-review/bclbegekihgpelanbbleaceefgmekjdd) and configure RefDiff on [Github Actions](https://help.github.com/en/actions/configuring-and-managing-workflows/configuring-a-workflow).\n\n\u003ca href=\"https://chrome.google.com/webstore/detail/refactoring-aware-diff/bclbegekihgpelanbbleaceefgmekjdd\"\u003e\n    \u003cimg width=\"200px\" src=\"https://user-images.githubusercontent.com/7620947/75341916-26e1bc00-5874-11ea-9526-463ddf1e7f82.png\" /\u003e\n\u003c/a\u003e\n\nTo execute RefDiff as Github Actions, you need to create a workflow file in `.github/workflows` folder with `.yaml` extension. Example of configuration: `.github/workflows/workflow.yml`:\n\n```yaml\non: [pull_request] # Trigger RefDiff after each pull request\n\njobs:\n    main:\n        runs-on: ubuntu-latest\n        name: Refactoring Detection\n        steps:\n            - name: Git Checkout\n              uses: actions/checkout@v2\n              with:\n                  fetch-depth: 0\n\n            - name: raid\n              env:\n                  LANGUAGE: ${{ github.event.repository.language }} # Supports Java, Javascrit, C and Go.\n                  REV_BEFORE: ${{ github.event.pull_request.base.sha }}\n                  REV_AFTER: ${{ github.event.pull_request.head.sha }}\n              uses: rodrigo-brito/refactoring-aware-diff@action\n```\n\n## Simple Example\n\nWe created a simple pull request with commits including toy refactorings, to illustrate the usage of our plug-in. See [here](https://github.com/rodrigo-brito/refactoring-aware-diff/pull/5/commits) (but first you need to install our plug in).\n\n## How cite RAID\n\n```bibtex\n@inproceedings{brito2021, \n  author = {Rodrigo Brito and Marco Tulio Valente}, \n  title = {{RAID}: Tool Support for Refactoring-Aware Code Reviews}, \n  booktitle = {29th International Conference on Program Comprehension (ICPC)}, \n  year = {2021}, \n  pages = {265--275}\n}\n``` \n\nDOI: https://doi.ieeecomputersociety.org/10.1109/ICPC52881.2021.00033\n\n## License\n\nDistributed under the MIT License. See [LICENSE](LICENSE) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frodrigo-brito%2Frefactoring-aware-diff","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frodrigo-brito%2Frefactoring-aware-diff","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frodrigo-brito%2Frefactoring-aware-diff/lists"}