{"id":19768218,"url":"https://github.com/squareslab/genprog4java","last_synced_at":"2025-07-27T02:35:15.146Z","repository":{"id":52543011,"uuid":"111139084","full_name":"squaresLab/genprog4java","owner":"squaresLab","description":null,"archived":false,"fork":false,"pushed_at":"2024-10-03T18:49:57.000Z","size":142270,"stargazers_count":18,"open_issues_count":5,"forks_count":11,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-30T16:44:18.975Z","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":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/squaresLab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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}},"created_at":"2017-11-17T18:47:13.000Z","updated_at":"2025-02-03T02:20:49.000Z","dependencies_parsed_at":"2025-04-30T16:46:48.880Z","dependency_job_id":null,"html_url":"https://github.com/squaresLab/genprog4java","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/squaresLab/genprog4java","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/squaresLab%2Fgenprog4java","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/squaresLab%2Fgenprog4java/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/squaresLab%2Fgenprog4java/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/squaresLab%2Fgenprog4java/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/squaresLab","download_url":"https://codeload.github.com/squaresLab/genprog4java/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/squaresLab%2Fgenprog4java/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267289592,"owners_count":24064730,"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-27T02:00:11.917Z","response_time":82,"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":[],"created_at":"2024-11-12T04:36:17.748Z","updated_at":"2025-07-27T02:35:15.137Z","avatar_url":"https://github.com/squaresLab.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JaRFly: Java Repair Framework #\n\n\u003cimg src=\"https://github.com/squaresLab/genprog4java/blob/master/JaRFly.png\" width=\"200\"/\u003e\n\n# README #\n\nA more detailed user manual for JaRFly is located at https://github.com/squaresLab/genprog4java/wiki\n\n### Disclaimer ###\n\nJarFly is in active development and changes often.\n\n### What is this repository for? ###\n\nThis repository contains JaRFly, a Java Repair Framework for implementing\nautomated repair tools for Java programs, such as GenProg, Par,\nTrpAutoRepair, and so on. The project is called GenProg4Java because,\noriginally, it only implemented the GenProg algorithm, but today, it is an\nentire framework for many algorithms.\n\nYou can read more about GenProg and program repair here:\nhttps://squareslab.github.io/genprog-code/\n\n### Running JaRFly ###\n\nAt a high level, JaRFly takes as input a program with a bug and test cases.\nAt least one test case should be failing; it encodes the bug to be repaired.\nAt least one should be passing; it encodes desired functionality that should\nbe maintained.\n\nAt the sea level, JaRFly takes a configuration file as input. Below, we\nprovide a minimal set that should allow JaRFly to run using the default\ngenetic programming heuristic on a buggy program taken from the\nIntroClassJava dataset (https://github.com/Spirals-Team/IntroClassJava).\nThere are other options available. The comments below are explanatory; they\nmay not work in actual config files. You can see the avaialble flags and\ntheir defaults, when applicable in \n(https://github.com/squaresLab/genprog4java/blob/master/src/clegoues/genprog4java/main/Configuration.java).\nHowever, to illustrate:\n\n```\njavaVM = /usr/bin/java \nclassTestFolder = bin/ # where to find test classes\nworkingDir = /path/to/IntroClassJava/dataset/median/testmedian/000/ #top level directory\noutputDir = /path/to/IntroClassJava/dataset/median/testmedian/000/tmp/ #where temporary files should be stored\nlibs=/path/to/genprog4java/lib/hamcrest-core-1.3.jar:/path/to/genprog4java/lib/junit-4.12.jar:/path/to/genprog4java/lib/junittestrunner.jar: # to run the program under repair\nsourceDir = src/main/java # relative to workingDir; path to top of package-level source for class under repair\npositiveTests = /path/to/IntroClassJava/dataset/median/testmedian/000/pos.tests # file listing test classes or methods that should initially pass, one per line\nnegativeTests = /path/to/IntroClassJava/dataset/median/testmedian/000/neg.tests # file listing test classes or methods that should initially fail, one per line\njacocoPath = /path/to/genprog4java/lib/jacocoagent.jar # path to jacoco; g4j ships with a jar that should work\ntestClassPath=/path/to/IntroClassJava/dataset/median/testmedian/000/bin/ #classpath for tests, possibly redundant with classTestFolder, I should check\ntargetClassName = introclassJava.median_d4aae191_000 # class under repair, or file listing classes under repair, one per line\n```\n\nAlthough the other options are optional, you probably want to set a large\nnumber of them, such as the `seed`.\n\nIndividual classes also have individual configure methods; you can search for\nthem to find more options. We are working on creating a common place that\nlists them.\n\nIn addition to the configuration file, you should specify `log4j.properties` to\nthe VM; my VM arguments in my run configuration in Eclipse looks like:\n\n`-ea -Dlog4j.configuration=file:${workspace_loc:GenProg4Java}/src/log4j.properties`\n\nI also set the working directory to be the base directory for the project I'm\ntrying to repair. Thus, for the Hello, World! example, the Working Directory\nis set as:\n\n`${workspace_loc:GenProg4Java/tests/mathTest}`\n\n### Hello, World! ###\n\n`genprog4java/tests/mathTest` serves as a reasonable Hello, World! example.\nIt has a `miniTestConfiguration` that should have flags close to what is\nnecessary to get it to run, though we do change this file with some\nregularity so if it doesn't work out of the gate, double check that it\ndoesn't look completely wacky.\n\n### License ###\n\nSee [LICENSE](LICENSE.md)\n\n### Whom do I talk to? ###\n\nRepo owner or admin\n\n* [Claire Le Goues](http://clairelegoues.com/)  (clegoues@cs.cmu.edu )\n\n* [Mauricio Soto](https://www.cs.cmu.edu/~msotogon/) (mauriciosoto@cmu.edu)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsquareslab%2Fgenprog4java","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsquareslab%2Fgenprog4java","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsquareslab%2Fgenprog4java/lists"}