Skip to content
This repository was archived by the owner on Feb 9, 2023. It is now read-only.

Find all commits with bugs fixed later in other commits based on JGit.

Notifications You must be signed in to change notification settings

smmsadrnezh/bugfix_commit_annotator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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.

How to run

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

How to use

After running the project, enter the path to the .git directory in your repository:

/path/to/repository/.git

/home/smmsadrnezh/Desktop/lab/bilityab/.git

TODO

  • 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.

About

Find all commits with bugs fixed later in other commits based on JGit.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages