Download presentation
Presentation is loading. Please wait.
Published byAlyson Moody Modified over 9 years ago
1
SZZ – An overview David Bowes University of Hertfordshire
2
Investigating the crime scene reports 1.On Jan 1 st, David modifies methods A,C and D 2.On Jan 5 th, Jean modified method D 3.On Feb 1 st,Tracy reports a bug 4.On Feb 2 nd,Steve makes a change to method C and commits 5.On Feb 5 th, Thomas modifies A,C and D and commits 6.On Feb 6 th, Thomas marks the bug as fixed. Who fixed the fault the fault? Who inserted the fault?
3
Overview Overview of: J. Śliwerski, T. Zimmermann, and A. Zeller, “When do changes induce fixes? (On Fridays)” in Proceedings of the 2005 international workshop on Mining software repositories, ser. MSR ’05. New York, NY, USA: ACM, 2005, pp. 1–5. – Bug linking – Fault insertion point
4
Bug Linking Find a bug report in a bug tracking system: – Bugid:430084 [compiler][null] NPE: Method without return value – Extract the bugid Find all version control commit messages which include: – Bugid – Other words : fix… Compute a match score using above. Choose the latest highest commit as the point which fixes the bugid
5
e.g. Commit: 430084 - [compiler][null] NPE: Method without return value Commit: 430084 - [compiler][null] NPE: Method without return value Signed-off-by: Shankha Banerjee Files modified: org.eclipse.jdt.core.tests.compiler/src/org/eclips e/jdt/core/tests/compiler/regression/NullAnnot ationTest.java org.eclipse.jdt.core/compiler/org/eclipse/jdt/int ernal/compiler/lookup/MethodBinding.java
6
Finding the insertion point Remember the date of the initial bug report Blame the files which were changed… *Stephan He2013-08-15 18:27:24if (added) *Stephan He2013-08-15 18:27:24this.tagBits |= TagBits.HasParameterAnnotations; Stephan He2014-03-11 16:17:38if (this.returnType != null) { Stephan He2014-03-11 16:17:38if (!this.returnType.isBaseType() ) == 0) { Stephan He2014-03-11 16:17:38this.returnType = env.createAnnotatedType(this.returnType, new AnnotationBinding[]{env.getNonNullAnnotation()}); Stephan He2014-03-11 16:17:38} else if (sourceMethod != null && (this.returnType.tagBits & TagBits.AnnotationNonNull) != 0) { Stephan He2014-03-11 16:17:38 sourceMethod.scope.problemReporter().nullAnnotationIsRedundant(sourceMethod, -1/*signifies method return*/); Stephan He2014-03-11 16:17:38} *Stephan He2013-08-15 18:27:24}
7
Identify where these lines were changed Find previous lines which were replaced/inserted between AND were before the bug report date
8
Job done…(?) Problems: – Bird identified the linking rules by SZZ were severe (only 50% of bugs were linked to a commit) – Identifies more than one commit (?) – Blame relies on diff between versions: Move a method: – Diff thinks code has been deleted and inserted elsewhere White space – Branching and merging in version control? – Replication/Validation? – Are there better ways?
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.