Top Banner
XTREES Discovering Useful Changes for Software Projects Rahul Krishna ([email protected]), Tim Menzies, CS @ NcState
49

ASE '15 XTREE

Apr 12, 2017

Download

Software

Rahul Krishna
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: ASE '15 XTREE

XTREESDiscoveringUsefulChanges

forSoftwareProjectsRahulKrishna([email protected]),

TimMenzies,CS@NcState

Page 2: ASE '15 XTREE

29 November 2015

Page 3: ASE '15 XTREE

NoConsensus!

• Thereseemstobecontradictingconclusionsontheimpactofcodesmellsonsystems[1]

39 November 2015

[1] Dag I.K. Sjoberg, Aiko Yamashita, Bente C.D. Anda, Audris Mockus, Tore Dyba, "Quantifying the Effect of Code Smells on Maintenance Effort," IEEE Transactions on Software Engineering, vol. 39, no. 8, pp. 1144-1156, Aug., 2013

Page 4: ASE '15 XTREE

NoConsensus!

• Thereseemstobecontradictingconclusionsontheimpactofcodesmellsonsystems[1]

CodeSmell Study Findings

Duplicate CodeJürgensetal. Duplicate codecontained morefaultsthanaverage

Rahmanetal. Mostdefectivecodewerenotsignificantlyassociatedwith duplicatecode

49 November 2015

[1] Dag I.K. Sjoberg, Aiko Yamashita, Bente C.D. Anda, Audris Mockus, Tore Dyba, "Quantifying the Effect of Code Smells on Maintenance Effort," IEEE Transactions on Software Engineering, vol. 39, no. 8, pp. 1144-1156, Aug., 2013

Page 5: ASE '15 XTREE

NoConsensus!

• Thereseemstobecontradictingconclusionsontheimpactofcodesmellsonsystems[1]

CodeSmell Study Findings

Duplicate CodeJürgensetal. Duplicate codecontained morefaultsthanaverage

Rahmanetal. Mostdefectivecodewerenotsignificantlyassociatedwith duplicatecode

GodClassDeligiannisetal. GodClasseshavedetrimental effect

Olbrich etal. GodClasseshavepositiveeffects

59 November 2015

[1] Dag I.K. Sjoberg, Aiko Yamashita, Bente C.D. Anda, Audris Mockus, Tore Dyba, "Quantifying the Effect of Code Smells on Maintenance Effort," IEEE Transactions on Software Engineering, vol. 39, no. 8, pp. 1144-1156, Aug., 2013

Page 6: ASE '15 XTREE

NoConsensus!

• Thereseemstobecontradictingconclusionsontheimpactofcodesmellsonsystems[1]

CodeSmell Study Findings

Duplicate CodeJürgensetal. Duplicate codecontained morefaultsthanaverage

Rahmanetal. Mostdefectivecodewerenotsignificantlyassociatedwith duplicatecode

GodClassDeligiannisetal. GodClasseshavedetrimental effect

Olbrich etal. GodClasseshavepositiveeffects

ShotgunsurgeryLietal. ShotgunSurgerywaspositivelyassociatedwithsoftwarefaults

D'Ambrosetal. ShotgunSurgerywasnot consistent withdefectsacrosssystems

69 November 2015

[1] Dag I.K. Sjoberg, Aiko Yamashita, Bente C.D. Anda, Audris Mockus, Tore Dyba, "Quantifying the Effect of Code Smells on Maintenance Effort," IEEE Transactions on Software Engineering, vol. 39, no. 8, pp. 1144-1156, Aug., 2013

Page 7: ASE '15 XTREE

NoConsensus!

• Thereseemstobecontradictingconclusionsontheimpactofcodesmellsonsystems[1]

• Thiscontradictioncanalsobeseeninseveralwidelyusedtools

79 November 2015

[1] Dag I.K. Sjoberg, Aiko Yamashita, Bente C.D. Anda, Audris Mockus, Tore Dyba, "Quantifying the Effect of Code Smells on Maintenance Effort," IEEE Transactions on Software Engineering, vol. 39, no. 8, pp. 1144-1156, Aug., 2013

Page 8: ASE '15 XTREE

NoConsensus!

• Thereseemstobecontradictingconclusionsontheimpactofcodesmellsonsystems[1]

• Thiscontradictioncanalsobeseeninseveralwidelyusedtools

CodeSmell SonarQube Rank[13] JeffAtwood[14] OurclientsLazyClass/Freeloader L M HMessage Chains H HSpeculativeGenerality H LSwitchStatements L L

89 November 2015

[1] Dag I.K. Sjoberg, Aiko Yamashita, Bente C.D. Anda, Audris Mockus, Tore Dyba, "Quantifying the Effect of Code Smells on Maintenance Effort," IEEE Transactions on Software Engineering, vol. 39, no. 8, pp. 1144-1156, Aug., 2013

Page 9: ASE '15 XTREE

99 November 2015

Page 10: ASE '15 XTREE

109 November 2015

Page 11: ASE '15 XTREE

Howtoplanchanges…Sanely

119 November 2015

Page 12: ASE '15 XTREE

Howtoplanchanges…Sanely

129 November 2015

Page 13: ASE '15 XTREE

Howtoplanchanges…Sanely

139 November 2015

Page 14: ASE '15 XTREE

Howtoplanchanges…Sanely

149 November 2015

Page 15: ASE '15 XTREE

Howtoplanchanges…Sanely

159 November 2015

Page 16: ASE '15 XTREE

Roadmap

• WhyPlan?• CommentsonPlanningAgents• WhatarePlans?• XTREE• Doesthiswork?

• Canwereducedefects?• Canweoptimizeruntimes?

• FutureWork• Summary

169 November 2015

Page 17: ASE '15 XTREE

CommentsonPlanningAgents

AGoodPlanner

1. IdentifyBadOptions

2. Discoverpossiblesetofgoodoptions

3. Offereffectiveandsuccinctsummaries

179 November 2015

Page 18: ASE '15 XTREE

Scope

189 November 2015

Page 19: ASE '15 XTREE

Roadmap

• WhyPlan?• CommentsonPlanningAgents• WhatarePlans?• XTREE• Doesthiswork?

• Canwereducedefects?• Canweoptimizeruntimes?

• FutureWork• Summary

199 November 2015

Page 20: ASE '15 XTREE

WhatarePlans?

209 November 2015

Page 21: ASE '15 XTREE

WhatarePlans?

• Plansarechangestospecificproblems• Specifically,foreverytestexample inZ,aplan∆ isusedtoadjustZj

• Itcan,forinstance,beusedtoreducethenumberofdefects

219 November 2015

Page 22: ASE '15 XTREE

WhatarePlans?

• Plansarechangestospecificproblems• Specifically,foreverytestexample inZ,aplan∆ isusedtoadjustZj

• Itcan,forinstance,beusedtoreducethenumberofdefects

229 November 2015

Page 23: ASE '15 XTREE

WhatarePlans?

• Plansarechangestospecificproblems• Specifically,foreverytestexample inZ,aplan∆ isusedtoadjustZj

• Itcan,forinstance,beusedtoreducethenumberofdefects

∀δ j ∈Δ :Z j =Z j +δ j if Z j is numeric

δ j otherwise

⎧⎨⎪

⎩⎪

239 November 2015

Page 24: ASE '15 XTREE

WhatarePlans?

• Plansarechangestospecificproblems• Specifically,foreverytestexample inZ,aplan∆ isusedtoadjustZj

• Itcan,forinstance,beusedtoreducethenumberofdefects

∀δ j ∈Δ :Z j =Z j +δ j if Z j is numeric

δ j otherwise

⎧⎨⎪

⎩⎪

249 November 2015

Page 25: ASE '15 XTREE

BTW:Planningisnotoptimization

259 November 2015

• Wewishtotreatallmembersofthepopulation

• Notelect foranelite few

• Sowewon’tuseNSGA-II,SPEA2,NSGA-III,MOEA/D,DE,etc.

Page 26: ASE '15 XTREE

BTW:Planningisnotoptimization

269 November 2015

• Wewishtotreatallmembersofthepopulation

• Notelect foranelite few

• Sowewon’tuseNSGA-II,SPEA2,NSGA-III,MOEA/D,DE,etc.

Page 27: ASE '15 XTREE

BTW:Planningisnotoptimization

• Wewishtotreatallmembersofthepopulation

• Notelect foranelite few

• Sowewon’tuseNSGA-II,SPEA2,NSGA-III,MOEA/D,DE,etc.

279 November 2015

Page 28: ASE '15 XTREE

Roadmap

• WhyPlan?• CommentsonPlanningAgents• WhatarePlans?• XTREE• Doesthiswork?

• Canwereducedefects?• Canweoptimizeruntimes?

• FutureWork• Summary

289 November 2015

Page 29: ASE '15 XTREE

XTREE

299 November 2015

Page 30: ASE '15 XTREE

XTREE

309 November 2015

Page 31: ASE '15 XTREE

XTREE

319 November 2015

Page 32: ASE '15 XTREE

XTREE

329 November 2015

Page 33: ASE '15 XTREE

XTREE

339 November 2015

Page 34: ASE '15 XTREE

XTREE

349 November 2015

Ensure a class only contains methods that interact with each other

Page 35: ASE '15 XTREE

XTREE

359 November 2015

Ensure a class only contains methods that interact with each other

Refactor such that cohesion among methods improves

Page 36: ASE '15 XTREE

Roadmap

• WhyPlan?• CommentsonPlanningAgents• WhatarePlans?• XTREE• Doesthiswork?

• Canwereducedefects?• Canweoptimizeruntimes?

• FutureWork• Summary

369 November 2015

Page 37: ASE '15 XTREE

Doesthiswork?Canwereducedefects?

• 5SampleprojectsfromJureczkoOOdataset[17] — Ant,Ivy,Lucene,Poi,andJedit

• Datasetcontainsacollectionof20OOmeasures,andabugcount.

Canwereduceruntimes?• 6systemsfromSiegmund etal.[18]— Apache,SQLite,LLVM,x264andtwoversionsoftheBerkeleydatabase(onewrittenin“C”andoneinJava)

• Thedatasetrecordstheruntimesofcompiledsystemsmeasuredusingstandardbenchmarking tools.

379 November 2015

Page 38: ASE '15 XTREE

Doesthiswork?Canwereducedefects?

• 5SampleprojectsfromJureczkoOOdataset[17] — Ant,Ivy,Lucene,Poi,andJedit

• Datasetcontainsacollectionof20OOmeasures,andabugcount.

Canwereduceruntimes?• 6systemsfromSiegmund etal.[18]— Apache,SQLite,LLVM,x264andtwoversionsoftheBerkeleydatabase(onewrittenin“C”andoneinJava)

• Thedatasetrecordstheruntimesofcompiledsystemsmeasuredusingstandardbenchmarking tools.

389 November 2015

Page 39: ASE '15 XTREE

AnalysisMethods

Performancecanbeassessedusing3criteria1. Effectiveness:Measuredas%Improvement.Denoted

byR,

2. Succinctness:Howmanyattributesneed tomodified togetadesiredresult

3. Stability:Resultsmustberepeatable.

399 November 2015

Page 40: ASE '15 XTREE

AnalysisMethods

Performancecanbeassessedusing3criteria1. Effectiveness:Measuredas%Improvement.Denoted

byR,

2. Succinctness:Howmanyattributesneed tomodified togetadesiredresult

3. Stability:Resultsmustberepeatable.

409 November 2015

Page 41: ASE '15 XTREE

AnalysisMethods

Performancecanbeassessedusing3criteria1. Effectiveness:Measuredas%Improvement.Denoted

byR,

2. Succinctness:Howmanyattributesneed tomodified togetadesiredresult

3. Stability:Resultsmustberepeatable.

419 November 2015

Page 42: ASE '15 XTREE

Jureczko:EffectivePlans(20Repeats)

429 November 2015

PriorworkPROMISE’12:Deltabetweenclustercentroids

Page 43: ASE '15 XTREE

Jureczko:EffectivePlans(20Repeats)

439 November 2015

PriorworkPROMISE’12:Deltabetweenclustercentroids

% Improvements in 20 repeats

Page 44: ASE '15 XTREE

Jureczko:SuccinctChanges

449 November 2015

Page 45: ASE '15 XTREE

Seigmund:EffectiveandSuccinct

• XTREEworked(again..)

• Stableacrossmanyruns

459 November 2015

Page 46: ASE '15 XTREE

Roadmap

• WhyPlan?• CommentsonPlanningAgents• WhatarePlans?• XTREE• ExperimentalResults

• JureczkoDefectDatasets• Seigmund Datasets

• FutureWork• Summary

469 November 2015

Page 47: ASE '15 XTREE

Scope

479 November 2015

Page 48: ASE '15 XTREE

Roadmap

• WhyPlan?• CommentsonPlanningAgents• WhatarePlans?• XTREE• ExperimentalResults

• JureczkoDefectDatasets• Seigmund Datasets

• FutureWork• Summary

489 November 2015

Page 49: ASE '15 XTREE

499 November 2015