Upgrade to Pro — share decks privately, control downloads, hide ads and more …

On the Relationship of Inconsistent Software Clones and Faults: An Empirical Study

On the Relationship of Inconsistent Software Clones and Faults: An Empirical Study

A talk given at the 23rd IEEE International Conference on Software Analysis, Evolution and Reengineering (SANER 2016) in Osaka, Japan. It describes an industrial study we did on the the faults we can relate to so-called type-3 software clones (copied, redundant source code with small modifications).

Stefan Wagner

March 16, 2016
Tweet

More Decks by Stefan Wagner

Other Decks in Research

Transcript

  1. You can copy, share and change, film and photograph, blog,

    live-blog and tweet this presentation given that you attribute it to its author and respect the rights and licenses of its parts. based on slides by @SMEasterbrook und @ethanwhite
  2. Types of Clones Type 1 an exact copy without modifications

    (except for whitespace and comments) Type 2 a syntactically identical copy; only variable, type, or function identifiers have been changed Type 3 a copy with further modifications; statements have been changed, added, or removed
  3. How problematic are these inconsistencies? Indicating harmfulness Inconsistent evolution of

    clones in industrial telecom. SW. [Lague97] Higher revision number for files with clones in legacy SW. [Monden02] Substantial amount of coupled changes to code clones. [Kim05] Discovery of bugs through search for inconsistent clones or clone evolution analysis. [Li06], [SuChiu07], [Aversano07], [Bakota07] Every other unintentional inconsistency constitutes a fault as judged by developers [Juergens09] Doubting harmfulness Failure to statistically verify impact of clones on change couplings [Geiger06] Inconsistent clones hardly ever become consistent later. [Krinke07] Failure to statistically verify impact of clones on changeability. [Lozano08] Most changes intentionally inconsistent [Göde11] No statistically significant impacts on faults [RahmanBirdDevanbu12]
  4. Research Questions RQ1: Do software systems contain type-3 clones? |CT3|

    / |C| RQ2: Do type-3 clones contain documented faults? |CT3 F| / |CT3| RQ3: Are developers aware of type-3 clones? |IMS| / |IM|, interviews with key developers Clone Groups C (exact and incons.) Inconsistent clone groups CT3 Faulty clone Groups CT3 F
  5. Cases System Size (KLOC) Age (Years) Developers A 253 4

    10 B 332 5 5 C 454 4 10 Java Automotive domain
  6. Data Collection and Analysis ort HTML Dash- board v1 v2

    v3 Extract Analyse Query for relationships and evolution Extract Interviews with developers Transcribe Coding
  7. Quantitative Results System A B C Overall Share of type-3

    clones 0.56 0.23 0.79 0.52 Share of faulty clone type-3 classes 0.33 0.05 0.03 0.17 Share of simultaneously modified type-3 clones 0.58 0.89 0.92 0.85
  8. Qualitative Results System A B C General clone awareness x

    No general clone awareness x x No specific clone awareness x x No clone check while bug fixing x x Clone warning while developing x Common code ownership x Discussion about co-changes x
  9. Developer awareness and faultiness varies. Half of the clone groups

    are type-3 Rate of faulty type-3 clones ~17 % Future studies should look at awareness! Conclusions
  10. Prof. Dr. Stefan Wagner e-mail [email protected] phone +49 (0) 711

    685-88455 WWW www.iste.uni-stuttgart.de/se Twitter prof_wagnerst ORCID 0000-0002-5256-8429 Institute of Software Technology Slides are available at www.stefan-wagner.biz. Joint work with Asim Abdulkhaleq, Kamer Kaya and Alexander Paar
  11. Pictures Used in this Slide Deck „Clones“ by Nick Royer

    (https://flic.kr/p/d1DFPL) Happy Programmers by Jesper Ronn-Jensen (https://flic.kr/p/oi9kA) „Mercurial Logo“ by Mackall (http://www.selenic.com/hg-logo/)