{"id":32978808,"url":"https://github.com/mast-group/tassal","last_synced_at":"2025-11-15T18:01:07.608Z","repository":{"id":24734339,"uuid":"28146647","full_name":"mast-group/tassal","owner":"mast-group","description":"Tree-based Autofolding Software Summarization Algorithm","archived":true,"fork":false,"pushed_at":"2016-07-30T10:47:38.000Z","size":211,"stargazers_count":42,"open_issues_count":1,"forks_count":7,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-04-04T07:38:04.407Z","etag":null,"topics":["machine-learning","ml4code","topic-modeling"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mast-group.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":"2014-12-17T17:00:36.000Z","updated_at":"2024-01-06T16:11:40.000Z","dependencies_parsed_at":"2022-08-22T13:30:21.500Z","dependency_job_id":null,"html_url":"https://github.com/mast-group/tassal","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mast-group/tassal","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mast-group%2Ftassal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mast-group%2Ftassal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mast-group%2Ftassal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mast-group%2Ftassal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mast-group","download_url":"https://codeload.github.com/mast-group/tassal/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mast-group%2Ftassal/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":284597116,"owners_count":27032396,"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-11-15T02:00:06.050Z","response_time":57,"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":["machine-learning","ml4code","topic-modeling"],"created_at":"2025-11-13T06:00:38.078Z","updated_at":"2025-11-15T18:01:07.601Z","avatar_url":"https://github.com/mast-group.png","language":"Java","funding_links":[],"categories":["Software"],"sub_categories":[],"readme":"TASSAL: Tree-based Autofolding Software Summarization ALgorithm [![Build Status](https://travis-ci.org/mast-group/tassal.svg?branch=master)](https://travis-ci.org/mast-group/tassal)\n================\n \nTASSAL is a tool for the automatic summarization of source code using autofolding. Autofolding automatically creates a summary of a source code file by folding non-essential code and comment blocks. \n\n**NEW:** For a live demo of TASSAL that allows you to summarize any GitHub project see:   \nhttps://code-summarizer.herokuapp.com\n\nThis is an implementation of the code summarizer from our paper:  \n[*Autofolding for Source Code Summarization*](http://arxiv.org/abs/1403.4503)  \nJ. Fowkes, R. Ranca, M. Allamanis, M. Lapata and C. Sutton. arXiv preprint 1403.4503, 2015.   \n\nThere are two main variants of the algorithm:\n\n* **TASSAL VSM** which uses a [Vector Space Model](https://en.wikipedia.org/wiki/Vector_space_model) for source code - less accurate but very fast (real-time)\n* **TASSAL** which uses a [Topic Model](https://en.wikipedia.org/wiki/Topic_model) for source code - more accurate but slower (requires training)\n\nboth are described below.\n\nInstallation \n------------\n\n#### Installing in Eclipse\n\nSimply import as a maven project into [Eclipse](https://eclipse.org/) using the *File -\u003e Import...* menu option (note that this requires [m2eclipse](http://eclipse.org/m2e/)). \n\nIt's also possible to export a runnable jar from Eclipse using the *File -\u003e Export...* menu option.\n\n#### Compiling a Runnable Jar\n\nTo compile a standalone runnable jar, simply run\n\n```\nmvn package\n```\n\nin the main tassal directory (note that this requires [maven](https://maven.apache.org/)).\n\nThis will create the standalone runnable jar ```tassal-1.1-SNAPSHOT.jar``` in the tassal/target subdirectory.\n\nRunning TASSAL VSM\n------------------\n\nTASAAL VSM uses a Vector Space Model of source code tokens to determine which are the least relevent code regions to autofold. \nTASSAL VSM can run in real-time. \n\n#### Autofolding a source file\n\n*codesum.lm.tui.FoldSourceFileVSM* folds a specified source file. It has the following command line options:\n\n* **-f**  \u0026nbsp;  souce file to autofold\n* **-c**  \u0026nbsp;  desired compression ratio for the file (%)\n* **-o**  \u0026nbsp; (optional)  where to save the folded file\n\nSee the individual file javadocs in *codesum.lm.tui* for information on the Java interface.\nIn Eclipse you can set command line arguments for the TASSAL interface using the *Run Configurations...* menu option. \n\n#### Example Usage\n\nA complete example using the command line interface on a runnable jar.\n\nFirst clone the ActionBarSherlock project into /tmp/java_projects/\n\n  ```sh \n  $ mkdir /tmp/java_projects/\n  $ cd /tmp/java_projects/\n  $ git clone https://github.com/JakeWharton/ActionBarSherlock.git \n  ```\n\nWe can then fold a specific file \n\n  ```sh \n  $ java -cp tassal/target/tassal-1.1-SNAPSHOT.jar codesum.lm.tui.FoldSourceFileVSM     \n   -c 50\n   -f /tmp/java_projects/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/app/SherlockFragment.java \n   -o /tmp/SherlockFragmentFolded.java \n  ```\n\nwhich will output the folded file to /tmp/SherlockFragmentFolded.java. \n\nRunning TASSAL\n--------------\n\nTASAAL uses a scoped Topic Model of source code tokens to determine which are the least relevent code regions to autofold. \nTASSAL requires the topic model to be trained on a dataset (the larger the better) before it can fold files in the dataset. \nWhile this is slower than using a VSM model, it is considerably more accurate. \n\n#### Training the source code topic model\n\n*codesum.lm.tui.TrainTopicModel* trains the underlying topic model. It has the following command line options:\n\n* **-d** \u0026nbsp;  directory containing java projects\n* **-w** \u0026nbsp;  working directory where the topic model creates necessary files\n* **-i** \u0026nbsp;  (optional)  no. iterations to train the topic model for.\n\nThis will output a summary of the top 25 tokens in some of the discovered topics. \n\n#### Autofolding a source file\n\n*codesum.lm.tui.FoldSourceFile* folds a specified source file. It has the following command line options:\n\n* **-w** \u0026nbsp;  working directory where the topic model creates necessary files (same as above)\n* **-f** \u0026nbsp;  souce file to autofold\n* **-p** \u0026nbsp;  project containing the file to fold\n* **-c** \u0026nbsp;  desired compression ratio for the file (%)\n* **-b** \u0026nbsp;  (optional)  background topic to back off to (0-2, default=2) \n* **-o** \u0026nbsp;  (optional)  where to save the folded file\n\nSee the individual file javadocs in *codesum.lm.tui* for information on the Java interface.\nIn Eclipse you can set command line arguments for the TASSAL interface using the *Run Configurations...* menu option. \n\n#### Example Usage\n\nA complete example using the command line interface on a runnable jar.\n\nFirst clone the ActionBarSherlock project into /tmp/java_projects/\n\n  ```sh \n  $ mkdir /tmp/java_projects/\n  $ cd /tmp/java_projects/\n  $ git clone https://github.com/JakeWharton/ActionBarSherlock.git\n  ```\n\nNow you can train the topic model on the java projects in /tmp/java_projects/\n\n  ```sh \n  $ java -cp tassal/target/tassal-1.1-SNAPSHOT.jar codesum.lm.tui.TrainTopicModel   \n   -d /tmp/java_projects/  -w /tmp/ -i 100 \n  ```\n\nThis trains the topic model for 100 iterations and outputs the model to /tmp/. We can then fold a specific file \n\n  ```sh \n  $ java -cp tassal/target/tassal-1.1-SNAPSHOT.jar codesum.lm.tui.FoldSourceFile     \n   -w /tmp/  -c 50 -p ActionBarSherlock \n   -f /tmp/java_projects/ActionBarSherlock/actionbarsherlock/src/com/actionbarsherlock/app/SherlockFragment.java \n   -o /tmp/SherlockFragmentFolded.java \n  ```\n\nwhich will output the folded file to /tmp/SherlockFragmentFolded.java. \n\nSummarizing a Project\n---------------------\n\nTASSAL is also able to summmarize an entire project by finding the top source files (and therefore classes) representative of that project. These top project files can then be autofolded using TASSAL as above (see [Autofolding a source file](#autofolding-a-source-file)).\n\n*codesum.lm.tui.ListSalientFiles* lists the most representative source files for a given project. It has the following command line options:\n\n* **-s** \u0026nbsp;  working directory where the topic model creates necessary files (same as above)\n* **-d** \u0026nbsp;  directory containing java projects\n* **-p** \u0026nbsp;  project to summarize\n* **-c** \u0026nbsp;  desired compression ratio (% of project files to list)\n* **-b** \u0026nbsp;  (optional)  background topic to back off to (0-2, default=2) \n* **-o** \u0026nbsp;  (optional)  where to save the salient files\n* **-i** \u0026nbsp;  (optional)  whether to ignore unit test files (default=true) \n\nNote that this requires the topic model to first be trained on the given project (see [Training the source code topic model](#training-the-source-code-topic-model) above). \n\nBugs\n----\n\nPlease report any bugs using GitHub's issue tracker.\n\nLicense\n-------\n\nThis tool is released under the new BSD license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmast-group%2Ftassal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmast-group%2Ftassal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmast-group%2Ftassal/lists"}