{"id":25974527,"url":"https://github.com/dwtj/jsrcdiff","last_synced_at":"2025-03-05T02:31:45.728Z","repository":{"id":78015281,"uuid":"43099133","full_name":"dwtj/jsrcdiff","owner":"dwtj","description":"A tool for comparing basic AST differences between the two Java source files.","archived":false,"fork":false,"pushed_at":"2015-10-05T02:40:58.000Z","size":208,"stargazers_count":2,"open_issues_count":1,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-03-27T20:34:36.433Z","etag":null,"topics":[],"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/dwtj.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}},"created_at":"2015-09-24T23:48:12.000Z","updated_at":"2024-03-27T20:34:36.434Z","dependencies_parsed_at":"2023-03-01T21:00:54.701Z","dependency_job_id":null,"html_url":"https://github.com/dwtj/jsrcdiff","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dwtj%2Fjsrcdiff","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dwtj%2Fjsrcdiff/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dwtj%2Fjsrcdiff/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dwtj%2Fjsrcdiff/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dwtj","download_url":"https://codeload.github.com/dwtj/jsrcdiff/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241953480,"owners_count":20048193,"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":[],"created_at":"2025-03-05T02:31:44.583Z","updated_at":"2025-03-05T02:31:45.712Z","avatar_url":"https://github.com/dwtj.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"A tool for comparing some basic AST differences between two similar Java source files.\n\nThe differences detected fall into one of six categories:\n\n1. **AM:** Add a new method\n2. **DM:** Delete a method\n3. **CM:** Change the body of a method.\n4. **AF:** Add a field\n5. **DF:** Delete a field\n6. **CFI:** Change the definition of a field initializer:\n    i. Add an initialization on a field where there was none.\n    ii. Deleting an initialization on a field where there was one.\n    iii. Changing the initialization expression.\n    iv. Changing a field's modifier (e.g. `private` to `public`).\n\nTo build and install the project to the local Maven repository, run the following from the directory containing `pom.xml`:\n\n```{.sh}\n$ mvn clean install\n```\n\nTo run the `Main` class on two test `.java` files, run the following from the directory containing `pom.xml`:\n\n```{.sh}\nmvn exec:java --quiet -Dexec.args=\"src/test/jsrcdiff/BasicsWithMethodBody.java src/test/jsrcdiff/BasicsWithMethodBody-diff.java\"\n```\n\n\n## Definitions\n\n### Field Definitions\n\n#### Field Key\n\nWe define a field key as a string concatenation of:\n\n* type\n* ID (AKA variable name)\n\n#### Field Value\n\nWe define a field value as a string concatenation of:\n\n* space-delimited qualifiers (e.g. \"public static final\")\n* initializers\n\n### Method Definitions\n\n#### Method Key\n\nWe define a method key as a concatenated string of the method return type,\nthe method ID (AKA method name) and the variable types in the method\nargument list (e.g. \"int, String, HashMap\u003cString, String\u003e\").\n\n#### Method Value\n\nWe define a method value as a concatenated string of the IDs (AKA variable\nnames) of method arguments, qualifiers (e.g. \"public static final\"), and\nthe text body of the method.\n\n**NOTE**: We don't actually parse the method body, opting instead of a naive\nstring comparison.\n\n### Operator Definitions\n\n#### AM: Add a new method\n\nWe define a method as \"Added\" when the method key is not present in class 1,\nbut the method key is present in class 2.\n\n#### DM: Delete a method\n\nWe define a method as \"Deleted\" when the method key is present in class 1, but\nthe method key is not present in class 2.\n\n#### CM: Change a method\n\nWe define a method as \"Changed\" when the method key is present in both class\n1 and 2, but the method value has changed.\n\n#### AF: Add a field\n\nWe define a field as \"Added\" if the field key is not present in class 1,\nbut the field key is present in class 2.\n\n#### DF: Delete a field\n\nWe define a field as \"Deleted\" if the field key is present in class 1, but\nthe field key is not present in class 2.\n\n#### CFI: Change field initializer\n\nWe define a field as \"Changed\" if the field key is present in both class 1\nand 2, but the field value has changed.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdwtj%2Fjsrcdiff","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdwtj%2Fjsrcdiff","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdwtj%2Fjsrcdiff/lists"}