{"id":31049108,"url":"https://github.com/feuermagier/autograder","last_synced_at":"2025-09-14T21:33:33.677Z","repository":{"id":43999468,"uuid":"389785702","full_name":"Feuermagier/autograder","owner":"Feuermagier","description":"Automatic grading of student's Java code","archived":false,"fork":false,"pushed_at":"2025-07-15T11:09:56.000Z","size":3788,"stargazers_count":15,"open_issues_count":98,"forks_count":9,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-15T22:51:51.709Z","etag":null,"topics":["autograding","code-analysis","dynamic-code-analysis","java","pmd","spoon","spotbugs","static-code-analysis"],"latest_commit_sha":null,"homepage":"","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/Feuermagier.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":"2021-07-26T22:36:59.000Z","updated_at":"2025-07-15T10:41:33.000Z","dependencies_parsed_at":"2024-03-07T10:56:04.814Z","dependency_job_id":"4c0d654a-07f5-4ba4-926d-974506169c4d","html_url":"https://github.com/Feuermagier/autograder","commit_stats":null,"previous_names":[],"tags_count":55,"template":false,"template_full_name":null,"purl":"pkg:github/Feuermagier/autograder","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Feuermagier%2Fautograder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Feuermagier%2Fautograder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Feuermagier%2Fautograder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Feuermagier%2Fautograder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Feuermagier","download_url":"https://codeload.github.com/Feuermagier/autograder/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Feuermagier%2Fautograder/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275172358,"owners_count":25417858,"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-09-14T02:00:10.474Z","response_time":75,"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":["autograding","code-analysis","dynamic-code-analysis","java","pmd","spoon","spotbugs","static-code-analysis"],"created_at":"2025-09-14T21:31:39.469Z","updated_at":"2025-09-14T21:33:33.628Z","avatar_url":"https://github.com/Feuermagier.png","language":"Java","readme":"## Automatically run static \u0026 dynamic analysis on student code to aid grading.\n\n### An incomplete list of currently implemented checks can be found [here](checks.md)\n\n### Usage\n\nAutograder requires at least Java 17.\nMake sure Docker is running if you want to use the dynamic analysis.\nThe main class of the command line application is [de.firemage.autograder.cmd.Application](autograder-cmd/src/main/java/de/firemage/autograder/cmd/Application.java).\nConfiguration is done using command line flags and a check config file.\nThe command line parameters are\n* Parameter #1: The path to the check config file\n* Parameter #2: The path to the student's code. The directory should contain the root package. Non-java files are ignored.\n* Parameter #3: (Optional) The path to the directory containing the test protocols. Those are used for the dynamic analysis. If not specified, no tests will be run.\n* `-j \u003cint\u003e` / `--java \u003cint\u003e`: Specify the java version of the student's code. Default: `11`\n* `-s` / `--static`: Disable dynamic analysis.\n\nThe check config file must be a valid YAML file that configures the tests to run.\nAutograder can be used as a library by just using the module `autograder-core`.\n\n```\njava -jar autograder-cmd.jar C:\\path\\to\\config.yml -s C:\\path\\to\\submission\\programming-submission-uxxxx\\src\n```\n\n### Additional information\n\nThe code is mostly analyzed through spoon, but PMD, CPD, SpotBugs and error-prone are supported as well.\nImplemented checks can be found in the [checks directory](autograder-core/src/main/java/de/firemage/autograder/core/check).\n\nThe [sample_config.yaml](sample_config.yaml) contains all available checks.\nIf you have an idea for another check open an issue, contact me or implement the check yourself and open a pull request.\n\nThe dynamic analysis executes the student's code in secured Docker containers.\nWe never execute any foreign code on the host!\nHowever, this means that you need to have Docker installed and running if you want to use the dynamic analysis.\nIf you see strange BrokenPipeErrors, restart your Docker daemon.\nDynamic analysis is currently only available for command line I/O based programs.\nSupport for JUnit tests is planned.\n\nIf you see a VerifyError in the console, please open an issue or contact me directly.\nThe dynamic analysis modifies the bytecode of the student's code, and bugs typically result in invalid bytecode.\n\nNote: To get accurate results from the dynamic analysis, make sure that the tests cover most or all possible input types.\nThis makes sure that all possible code paths are executed.\n\n### Development\nAs of now, the following tools can be used in checks:\n* PMD XPath expressions to query the source code. \n* A model of the source code built with [Spoon](https://github.com/INRIA/spoon). Most non-trivial checks use this model.\n* An (unstructured) list of events generated during the test runs.\n* A dependency graph between classes of the source code, built with [JGraphT](https://jgrapht.org/).\n* (not yet implemented) A full static dataflow analysis built with [Soot](https://github.com/soot-oss/soot) and [Heros](https://github.com/Sable/heros).\n\nAll checks except the PMD-based checks must inherit from PMD-based tests must inherit from [IntegratedCheck](autograder-core/src/main/java/de/firemage/autograder/core/integrated/IntegratedCheck.java).\nPMD-based checks must inherit from [PMDCheck](autograder-core/src/main/java/de/firemage/autograder/core/pmd/PMDCheck.java).\n\nIf you change the executor or the agent, run `mvn compile` for all so that the jar files in [autograder-core resources](autograder-core) get updated.\n\nThe directory [test_submissions](test_submissions) contains two projects you can test your checks on:\n* [Bank](test_submissions/Bank) is an implementation of a task I used in my tutorial.\n  The code was intended to show the separation between logic and UI and is therefore not submission ready (e.g. JavaDoc is missing).\n* [A1](test_submissions/A1) is my own submission to a final task at my university.\n\nThere is also simple testing framework for checks implemented in the [test directory](autograder-core/src/test/java).\n\n### Compiling the project\n\nThe project uses Maven. To compile the project, run\n```\n$ mvn package -DskipTests --file pom.xml\n```\nin the root directory.\n\nThe jar will be at `autograder-cmd/target/autograder-cmd.jar`.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffeuermagier%2Fautograder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffeuermagier%2Fautograder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffeuermagier%2Fautograder/lists"}