This is a fork of CPatMiner. We extended it to support Csharp.
This can be further adapted to other ASTs transformed to SrcML format.
- Graph-based Mining of In-the-Wild, Fine-grained, Semantic Code Change Patterns (The 41st ACM/IEEE International Conference on Software Engineering (ICSE 2019) - Technical Track)
AtomicASTChangeMining: extracts change graphs from commits.
SemanticChangeGraphMiner: mines change templates from change graphs.
- Java 11 or above.
- srcML v1.0.0, you can download it from here.
main class: AtomicASTChangeMining/src/main/MainChangeAnalyzer.java
arguments:
-i input_repos_root_path: each subfolder is a git repo, with this structure repo_user/repo_name
-o output_path: where the graphs are stored
Note file repos.csv under reposPath: a text file containing the names of repos to be processed, one repo name on each line. ls reposPath > repos.csv to create this file if you want to process all repos (repo_user/repo_name)
main class: SemanticChangeGraphMiner/src/main/MineChangePatterns.java
reposPath = input_repos_root_path: a subfolder is a git repo (Same one as earlier)
changesPath = change_graph_path: output_path of the extraction step
file repos.csv under reposPath: a text file containing the names of repos to be processed, one repo name on each line. ls reposPath > repos.csv to create this file if you want to process all repos
output: in a directory SemanticChangeGraphMiner/output/patterns/input_repos_root_path-hybrid under the working directory.
Note: The directory SemanticChangeGraphMiner/src/resources has to be in a directory named src under the working directory.
All software provided in this repository is subject to the Apache License Version 2.0.