wogscpar / SZZUnleashed

An implementation of the SZZ algorithm, i.e., an approach to identify bug-introducing commits.
MIT License
110 stars 76 forks source link

output result make me confuse #31

Open liuchyi opened 4 years ago

liuchyi commented 4 years ago

in commit.json file, the line number in the diff dict , the result seen not right, it should +1 ,that is the really right line number image execute the cmd : git blame -l b831acd9854b525d680ca72fd218c848121b9d3f^ -- core/src/test/java/hudson/model/ViewTest.java, the delete code line number is actually is 101, not 100, add dict result is the same should +1 when write result to file image In addition, the annotation graph result make me confuse, the bug-introduction in this file, 101 line number, from git blame command show commit hash should be 67827c7eaac821aa22a2f26bd4dbe7d44470b6c9 not 05b46659e451c316fb5f1a5243c49b9a84a50702 that result in annotations.json image

the code in SZZUnleashed/szz/src/main/java/parser/GitParser.java 212, the var i should be index ???? image

wogscpar commented 4 years ago

Nice finding @liuchyi! In this case the index doesn't do anything. Have you tested that the result is correct by changing to index?