faulttracer a change impact and regression fault analysis
play

FaultTracer: A Change Impact and Regression Fault Analysis Tool for - PowerPoint PPT Presentation

FaultTracer: A Change Impact and Regression Fault Analysis Tool for Evolving Java Programs Lingming Zhang , Miryung Kim, Sarfraz Khurshid University of Texas at Austin zhanglm@utexas.edu FSE Formal Research Demo Track Nov 14, 2012 1 Scenario


  1. FaultTracer: A Change Impact and Regression Fault Analysis Tool for Evolving Java Programs Lingming Zhang , Miryung Kim, Sarfraz Khurshid University of Texas at Austin zhanglm@utexas.edu FSE Formal Research Demo Track Nov 14, 2012 1

  2. Scenario Old Version P Test Regression tests T FaultTracer: A Change Impact and Regression Fault Analysis Tool for Evolving Java Programs 2

  3. Scenario Old New Evolve Version Version P P’ Test Regression tests T FaultTracer: A Change Impact and Regression Fault Analysis Tool for Evolving Java Programs 3

  4. Scenario Old New Evolve Version Version P P’ ? Test Regression tests T • Q1: How to efficiently run the regression tests? • Which tests are relevant to program edits? • Q2: How to effectively localize faults when tests fail? • Which program edits are relevant to test failures? FaultTracer: A Change Impact and Regression Fault Analysis Tool for Evolving Java Programs 4

  5. Motivation • Chianti change impact analysis is effective at finding suspicious edits but does not rank these edits. [Ren’04, Ren’06] • Spectrum-based fault localization ranks potential faulty code fragments but does not focus on changes. [Jones’02, Abreu’07, Yu’08, Santelices’09, Parnin’11] • Our insight is to combine change-impact analysis and spectrum-based fault localization [ICSM11]. • Identify suspicious edits based on extended call graphs. • Rank suspicious edits using dynamic program spectrum information. FaultTracer: A Change Impact and Regression Fault Analysis Tool for Evolving Java Programs 5

  6. FaultTracer overview Old program Detect version: changes and P dependences Program 1 edits: New ∆ program version: P’ FaultTracer: A Change Impact and Regression Fault Analysis Tool for Evolving Java Programs 6

  7. FaultTracer overview Original Select affected test suite: tests based on Old Affected ECG analysis T program tests: Detect version: T’ 2 changes and P dependences Program 1 edits: New ∆ program version: P’ FaultTracer: A Change Impact and Regression Fault Analysis Tool for Evolving Java Programs 7

  8. FaultTracer overview Original Select affected test suite: tests based on Old Affected ECG analysis T program tests: Detect version: T’ 2 changes and P dependences Program 1 3 edits: Subset of New ∆ suspicious program Determine edits: version: suspicious edits Failed test: P’ based on ECG t analysis FaultTracer: A Change Impact and Regression Fault Analysis Tool for Evolving Java Programs 8

  9. FaultTracer overview Original Select affected test suite: tests based on Old Affected ECG analysis T program tests: Detect version: T’ 2 changes and P dependences Program 1 3 edits: Subset of New ∆ suspicious program Determine edits: Rank suspicious version: suspicious edits Failed test: edits based on P’ based on ECG t program spectrum analysis 4 information Ranked list of suspicious edits: FaultTracer: A Change Impact and Regression Fault Analysis Tool for Evolving Java Programs 9

  10. Extended call graph (ECG) Traditional Call Graphs Extended Call Graphs used by Chianti [Ren’04] used by FaultTracer test1 test2 test1 test2 <C, C.foo()> <C, C.foo()> A.Clinit() C.C() A.bar() C.foo() A.Clinit() C.C() A.bar() C.foo() <SFW, A.f2> <FR, C.f1> B.B() B.B() A.f2 B.f1 FaultTracer: A Change Impact and Regression Fault Analysis Tool for Evolving Java Programs 10

  11. Step 1: Detect atomic changes & dependences Change types Description CM Change method AM Add method DM Delete method AF Add field DF Delete field CFI Change instance field CSFI Change static field LCm Method look-up change LCf Field look-up change • Dependence inference illustration • For every AM change, if a method called by the added method is new and all methods overridden by it are also new, the caller should be dependent on the added callee. FaultTracer: A Change Impact and Regression Fault Analysis Tool for Evolving Java Programs 11

  12. Step 2: Select tests based on ECG analysis • FaultTracer directly matches all non-look-up changes with ECGs of the old version to select affected tests. • Existing technique needs to transform field changes into constructor change first. • FaultTracer identifies tests that are influenced by method or field look-up changes as affected tests. • Existing technique does not handle field look-up change. FaultTracer: A Change Impact and Regression Fault Analysis Tool for Evolving Java Programs 12

  13. Step 3: Identify suspicious edits based on ECG analysis • FaultTracer directly identifies all non-look-up changes on ECGs of the new version as suspicious edits. • Existing technique needs to select • the changes covered by affected tests. • the changes that these covered changes transitively depend on. • FaultTracer identifies method or field level edits that caused look-up changes on ECGs as suspicious edits. • Existing technique cannot find field level edits that caused field look-up changes. FaultTracer: A Change Impact and Regression Fault Analysis Tool for Evolving Java Programs 13

  14. Step 4: Localize failure-inducing program edits using test spectra • Relation between suspicious edits and tests Edits Test1 Test2 test3 test4 Edit1 Edit2 Edit3 Edit4 Result Pass Pass Pass Fail • Suspicious score calculation Edits Tarantula SBI Jaccard Ochiai [Jones’02] [Yu’08] [Abreu’07] [Abreu’07] Edit1 0.00 0.00 0.00 0.00 Edit2 0.75 0.50 0.50 0.71 Edit3 0.75 0.50 0.50 0.71 Edit4 1.00 1.00 1.00 1.00 FaultTracer: A Change Impact and Regression Fault Analysis Tool for Evolving Java Programs 14

  15. Demo: Step 1. - Detect changes and dependences Original Select affected test suite: tests based on Old Affected ECG analysis T program tests: Detect version: T’ 2 changes and P dependences Program 1 3 edits: Subset of New ∆ suspicious program Determine edits: Rank suspicious version: suspicious edits Failed test: edits based on P’ based on ECG t program spectrum analysis 4 information Ranked list of suspicious edits: FaultTracer: A Change Impact and Regression Fault Analysis Tool for Evolving Java Programs 15

  16. Demo: Step 2. - Select affected tests Original Select affected test suite: tests based on Old Affected ECG analysis T program tests: Detect version: T’ 2 changes and P dependences Program 1 3 edits: Subset of New ∆ suspicious program Determine edits: Rank suspicious version: suspicious edits Failed test: edits based on P’ based on ECG t program spectrum analysis 4 information Ranked list of suspicious edits: FaultTracer: A Change Impact and Regression Fault Analysis Tool for Evolving Java Programs 16

  17. Demo: Step 3. - Determine suspicious edits Original Select affected test suite: tests based on Old Affected ECG analysis T program tests: Detect version: T’ 2 changes and P dependences Program 1 3 edits: Subset of New ∆ suspicious program Determine edits: Rank suspicious version: suspicious edits Failed test: edits based on P’ based on ECG t program spectrum analysis 4 information Ranked list of suspicious edits: FaultTracer: A Change Impact and Regression Fault Analysis Tool for Evolving Java Programs 17

  18. Demo: Step 4. - Rank suspicious edits Original Select affected test suite: tests based on Old Affected ECG analysis T program tests: Detect version: T’ 2 changes and P dependences Program 1 3 edits: Subset of New ∆ suspicious program Determine edits: Rank suspicious version: suspicious edits Failed test: edits based on P’ based on ECG t program spectrum analysis 4 information Ranked list of suspicious edits: FaultTracer: A Change Impact and Regression Fault Analysis Tool for Evolving Java Programs 18

  19. Real-world Applications • We have successfully applied FaultTracer to real- world Java programs ranging 1.83~80.44 KLoC • jtopas, xml-security, jmeter, and ant. • Runtime overhead by Chianti and FaultTracer in collecting call graph information (ms). 250000 200000 150000 100000 50000 0 jtopas0.0 jtopas1.0 jtopas2.0 jtopas3.0 xmlsec0.0 xmlsec1.0 xmlsec2.0 xmlsec3.0 jmeter0.0 jmeter1.0 jmeter2.0 jmeter3.0 jmeter4.0 jmeter5.0 ant0.0 ant1.0 ant2.0 ant3.0 ant4.0 ant5.0 ant6.0 ant7.0 ant8.0 FaultTracer: A Change Impact and Regression Fault Analysis Tool for Evolving Java Programs 19

  20. Conclusion • FaultTracer combines a Chianti-style change impact analysis with spectrum-based fault localization. • FaultTracer improves a Chianti-style change impact analysis based on extended call graph analysis. • Experimental results show that FaultTracer [ICSM11] • outperforms Chianti in determining affecting changes by 20%. • outperforms existing technique for localizing failure- inducing program edits by 50%. • FaultTracer Eclipse plug-in is available for public download: https://webspace.utexas.edu/lz3548/www/ftracer.html FaultTracer: A Change Impact and Regression Fault Analysis Tool for Evolving Java Programs 20

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend