This is a webapp demo repository for XAI application in code smell prioritization.
This repository contains model generation, dataset generation, and data analyzing functions.
Two video demos containing the execution result of the program is available in the ./vids/ directory.
https://github.com/escapar/JSS23_demo/blob/master/vids/Dataset%20Generation.mp4
https://github.com/escapar/JSS23_demo/blob/master/vids/Result%20Analyze.mp4
Since we do not have the original code and toolset of MSR'20 [1], we are replicating the approach using similar techniques and datasets.
We are using the Blob smell in the MLCQ dataset annotated by third-party developers for dataset generation.
Afterward, CK Metrics [2] are exploited to generate code metrics. The process metrics are replicated by ourselves using the PyDriller tool [3].
Then, we follow the process described in our paper to generate predictions and explanations.
- Install the required dependencies.
pip install -r requirement.txt
- Execute Flask App.
flask --app main run
- Access http://localhost:5000/
- Type in the URL of the Git repo for feature generation (see ./vids/Dataset Generation.mp4 for a video example), and wait for it to finish. You may check the console to see the process. This process may take some time because we are using a synchronical solution to avoid consuming too much storage. It could also be done asynchronically, if each time we copy an entire project for each analysis to avoid conflict.
- Access http://localhost:5000/project/{name_of_your_repo} to analyze data (see ./vids/Result Analyze.mp4 for a video example). The predictions are made instantly (when you click the select dropdown).
Zijie Huang, East China University of Science and Technology https://hzjdev.github.io/
[1] Fabiano Pecorelli, Fabio Palomba, Foutse Khomh, Andrea De Lucia: Developer-Driven Code Smell Prioritization. MSR 2020: 220-231
[2] https://github.com/mauricioaniche/ckhttps://github.com/mauricioaniche/ck/
[3] Davide Spadini, MaurĂcio Finavaro Aniche, Alberto Bacchelli: PyDriller: Python framework for mining software repositories. ESEC/SIGSOFT FSE 2018: 908-911