It finds all commits which their commit messages match some specific regular expression with "bugfix" or "fix" or numbers. After that, it finds all affected lines of code in those commits and then it looks for all annotate commits (or blame-commit) for each of these lines. So finally we have all commits with bugs which are fixed later in some other commits. After that, it builds AST from the buggy commit and finds library methods and classes which caused bugs.
This plugin is based on JGit by Eclipse and Eclipse JDT. So for running the project, you have to download and add these jar files to the classpath of the project:
If you are using IntelliJ IDE, you can do this by going to:
File → Project Structure → Project Settings → Modules → Dependencies → "+" sign → JARs or directories → Select the jar file and click on OK
After running the project, enter the path to the .git directory in your repository:
/path/to/repository/.git
/home/smmsadrnezh/Desktop/lab/bilityab/.git
- Use Regex to Find bugfix commits. Add numbers to regex.
- find all changed lines in buggy commits which is related to a specific bugfix commit. (Is it equal to the line number of annotated line?)
- DS: bugfixCommits[hashmap - no duplicate] = ( annotatedCommits[pair - duplicate] = (lineNumbers[list - no duplicate]) )
- Is it necessary to have a DS?
- find the previous state of the code in the buggy commit.
- Use Eclipse JDT to find AST Tree of the code in the previous state of the buggy commit. (What if this code is not runnable?) (Whole project?)
- Find all related nodes of that AST to specified line numbers.
- Find the full name of all used methods in those lines from AST Tree.