Week 3
Previous Goals:
- Resolve how to handle Flexeme’s inconsistent clustering results for end-to-end tests
- Write a draft of .yml file to install tools on MacOS for github workflows
- Get the regression test running in continuous integration on Github Actions
- Refactoring: Identify parts of the pipeline where unix diff can be used instead of CSV and implement if possible
- Implement tangled lines/hunks: add new functionality
This Week’s Progress:
- I got to implement 4 out of the 5 goals set out at the beginning of the week.
- The end to end tests were made deterministic implemented successfully for all different test runs, as Mike suggested a way to override all randomness using
export PYTHONHASHSEED=0
. The PR is currently approved and waited to be merged. - I finished writing the ci.yml file, but implementing CI is blocked because of several issues. On Github Actions, installation of the tools and dependencies takes~15 minutes and is expensive, causing us to exceed our Github runtime limit. To solve this, I have worked on my own fork of the repository instead and tried to implement caching for CI. On Docker, I tried to create a Docker image from a base image that runs on Mac guest operating systems. However, I am stuck on trying to debug failures of building the Docker image. To solve this, Mike intends to get the end-to-end tests working on Linux, but we have issues with Flexeme dependencies.
- Regarding new functionality:
- I have modified ground_truth.py to reduce duplicated code by writing a for loop to calculate untangling score for each tool.
- I have modified the grountruth.sh Bash script by using Unix patch commands to create the 3 diff artifacts (version_control.diff, bug_fix.diff, and non_bug_fix.diff). This eliminates the need for the inversion of the minimized bug-inducing patch, and actually stores the non bug fixing diff. We now have the 3 unified diff files for manual analysis.
- A higher goal is to eliminate the need for repairing the diff lines by identity over linewise content. To achieve this, I want to implement patch to obtain the non_bug_fix diff in a different way by patching original source code with the bug_fix.diff only. This is halted due to issues regarding (1) tangled lines, and (2) tangled hunks. I have written a script to clean the unified diff files before patching, but I want to consult Thomas and Mike on whether this current approach is error-prone.
Next Goals:
- Respond to Thomas’ reviews about PRs and hopefully merge all open PRs
- Consult Mike and Thomas on Unix diff implementation and try to get it further down in the pipeline
- Convert Flexeme and SmartCommit results to diff formats
- Resolve CI issues (with Github Actions caching, Docker)
Miscellaneous
For teatime event in PLSE this week, I tried out Scandinavian pastries for the first time!
Written on June 23, 2023