La lecture à portée de main
Découvre YouScribe en t'inscrivant gratuitement
Je m'inscrisDécouvre YouScribe en t'inscrivant gratuitement
Je m'inscrisDescription
Sujets
Informations
Publié par | technische_universitat_munchen |
Publié le | 01 janvier 2011 |
Nombre de lectures | 18 |
Langue | English |
Poids de l'ouvrage | 3 Mo |
Extrait
yWh
and
wHo
in
to
olContr
Software
Cloning
tifactsAr
Elmar
uergensJ
derTechnischenInstitutfürUnivInforersitätmatikMünchen
WhyandHowtoControlCloning
tifactsArSoftwarein
ElmarensguerJ
VollständigerAbdruckdervonderFakultätfürInformatikderTechnischenUniversität
MünchenzurErlangungdesakademischenGradeseines
DoktorsderNaturwissenschaften(Dr.rer.nat.)
Dissertation.genehmigten
Vorsitzender:Univ.-Prof.BerndBrügge,Ph.D.
Dissertation:derPrüfer1.Univ.-Prof.Dr.Dr.h.c.Manfred
2.Univ.-Prof.Dr.RainerKoschke
Univ.-Prof.Dr.Dr.h.c.ManfredBroy
Univ.-Prof.Dr.RainerKoschke
BremenersitätvUni
DieDissertationwurdeam07.10.2010beiderTechnischenUniversitätMüncheneingere-
ichtunddurchdieFakultätfürInformatikam19.02.2011angenommen.
Abstract
Themajorityofthetotallifecyclecostsoflong-livedsoftwarearisesafterits®rstrelease,during
softwaremaintenance.Cloning,theduplicationofpartsofsoftwareartifacts,hindersmaintenance:
itincreasessize,andthuseffortforactivitiessuchasinspectionsandimpactanalysis.Changes
needtobeperformedtoallclones,insteadoftoasinglelocationonly,thusincreasingeffort.If
individualclonesareforgottenduringamodi®cation,theresultinginconsistenciescanthreaten
programcorrectness.Cloningisthusaqualitydefect.
Thesoftwareengineeringcommunityhasrecognizedthenegativeconsequencesofcloningover
adecadeago.Nevertheless,itaboundsinpractice—acrossartifacts,organizationsanddomains.
Cloningthrives,sinceitscontrolisnotpartofsoftwareengineeringpractice.Weareconvinced
thatthishastwoprincipalreasons:®rst,thesigni®canceofcloningisnotwellunderstood.We
donotknowtheextentofcloningacrossdifferentartifacttypesandthequantitativeimpactithas
onprogramcorrectnessandmaintenanceefforts.Consequently,wedonotknowtheimportanceof
clonecontrol.Second,nocomprehensivemethodexiststhatguidespractitionersthroughtailoring
andorganizationalchangemanagementrequiredtoestablishsuccessfulclonecontrol.Lackingboth
aquantitativeunderstandingofitsharmfulnessandcomprehensivemethodsforitscontrol,cloning
islikelytobeneglectedinpractice.
Thisthesiscontributestobothareas.First,wepresentempiricalresultsonthesigni®canceof
cloning.Analysisofdifferencesbetweencodeclonesinproductivesoftwarerevealedover100
faults.Morespeci®cally,everysecondmodi®cationtocodethatwasdoneinunawarenessofits
clonescausedafault,demonstratingtheimpactofcodecloningonprogramcorrectness.Further-
more,analysisofindustrialrequirementsspeci®cationsandgraph-basedmodelsrevealedsubstantial
amountsofcloningintheseartifacts,aswell.Thesizeincreasecausedbycloningaffectsinspection
efforts—foronespeci®cation,byanestimated14persondays;forasecondonebyover50%.To
avoidsuchimpactonprogramcorrectnessandmaintenanceefforts,cloningmustbecontrolled.
Second,wepresentacomprehensivemethodforclonecontrol.Itcomprisesdetectortailoringtoim-
proveaccuracyofdetectedclones,andassessmenttoquantifytheirimpact.Itguidesorganizational
changemanagementtosuccessfullyintegrateclonecontrolintoestablishedmaintenanceprocesses,
androotcauseanalysistopreventthecreationofnewclones.Tooperationalizethemethod,we
presentaclonedetectionworkbenchforcode,requirementsspeci®cationsandmodelsthatsupports
allthesesteps.Wedemonstratetheeffectivenessofthemethod—includingitstools—throughan
industrialcasestudy,whereitsuccessfullyreducedcloningintheparticipatingsystem.
Finally,weidentifythelimitationsofclonedetectionandcontrol.Throughacontrolledexperiment,
weshowthatclonedetectionapproachesareunsuitedtodetectbehaviorallysimilarcodethathas
beendevelopedindependentlyandisthusnottheresultofcopy&paste.Itsdetectionremainsan
importanttopicforfuturework.
3
ementswledgknoAc
IhavespentthelastfouryearsasaresearcherattheLehrstuhlforSoftware&SystemsEngineering
atTechnischeUniversitätMünchenfromProf.Dr.Dr.h.c.ManfredBroy.Iwanttoexpressmy
gratitudetoManfredBroyforthefreedomandresponsibilityIwasgrantedandforhisguidanceand
advice.Ihave,andstilldo,enjoyworkinginthechallengingandcompetitiveresearchenvironment
hecreates.IwanttothankProf.Dr.rer.nat.RainerKoschkeforacceptingtoco-supervisethis
thesis.Iamgratefulforinspiringdiscussionsonsoftwarecloning,butalsoforthehospitalityand
interest—bothbyhimandhisgroup—thatIexperiencedduringmyvisitinBremen.Myviewofthe
socialaspectsofresearch,whichformedinthelarge,thematicallyheterogenousgroupofManfred
Broy,wasenrichedbytheglimpseintothesmaller,morefocussedgroupofRainerKoschke.
Iamverygratefultomycolleagues.Theirsupport,bothonthescienti®candonthepersonallevel,
wasvitalforthesuccessofthisthesis.Andnotleast,formypersonaldevelopmentduringthelast
fouryears.IamgratefultoSilkeMüllerforschedulemagic.ToFlorianDeissenboeckforbeing
anexampleworthfollowingandforbothhisencouragementandoutrightcriticism.ToBenjamin
Hummelforhismeritandcreativityinproducingideas,andforhisproductivityandeffectivenessin
theirrealization.ToMartinFeilkasforhisabilitytooverviewandsimplifycomplicatedsituations
andforreliabilityandtrustcomewhatmay.ToStefanWagnerforhisguidanceandexamplein
scienti®cwritingandempiricalresearch.ToDanielRatiuforthesensitivity,carefulnessanddepth
heshowsduringscienti®cdiscussions(andoutsideofthem).ToLarsHeinemannforbeingthebest
colleagueIeversharedanof®cewithandforhistoleranceexhibiteddoingso.ToMarkusHer-
rmannsdörferforhisencouragementandpragmatic,uncomplicatedwaythatmakescollaboration
productiveandfun.ToMarkusPizkaforraisingmyinterestinresearchandforencouragingmeto
startmyPhDthesis.Workingwithallofyouwas,andstillis,aprivilege.
Research,understandingandideagenerationbene®tfromcollaboration.Iamgratefulforjoint
paperprojectstoSebastianBenz,MichaelConradt,FlorianDeissenboeck,ChristophDomann,
MartinFeilkas,Jean-FrançoisGirard,NilsGöde,LarsHeinemann,BenjaminHummel,Klaus
Lochmann,BenediktMayyParareda,MichaelPfaehler,MarkusPizka,DanielRatiu,Bernhard
Schaetz,JonathanStreit,StefanTeuchertandStefanWagner.Inaddition,thisthesisbene®tedfrom
thefeedbackofmany.Iamthankfulforproof-readingdraftstoFlorianDeissenboeck,Martin
Feilkas,NilsGöde,LarsHeinemann,BenjaminHummel,KlausLochmann,BirgitPenzenstadler,
DanielRatiuandStefanWagner.AndtoRebeccaTiarksforhelpwiththeBellonBenchmark.
Theempiricalpartsofthisworkcouldnothavebeenrealizedwithoutthecontinuoussupportofour
industrialpartners.IwanttothankeverybodyIworkedwithatABB,MAN,LV1871andMunich
ReGroup.IparticularlythankMunichReGroup—especiallyRainerJanßenandRudolfVaas—for
thelong-termcollaborationwithourgroupthatsubstantiallysupportedthisdissertation.
Mostofall,Iwanttothankmyfamilyfortheirunconditionalsupport(bothmaterialandimmaterial)
notonlyduringmydissertation,butduringallofmyeducation.Iamdeeplygratefultomyparents,
mybrotherand,aboveall,mywifeSo®e.
5
»Aman’sgottadowhataman’sgottado«
FredMacMurrayinTheRainsofRanchipur
»Aman’sgottadowhataman’sgottado«
NoonHighinCooperGary
»Aman’sgottadowhataman’sgottado«
GeorgeJetsoninTheJetsons
John»Aman’CleesesingottaMontydowhatPython’asman’sGuidegottatoLifedo«
Contents
oductionIntr11.1ProblemStatement..................................
1.2Contribution......................................
1.3Contents........................................
Fundamentals22.1NotionsofRedundancy................................
2.2SoftwareCloning...................................
2.3NotionsofProgramSimilarity............................
2.4TermsandDe®nitions.................................
2.5CloneMetrics.....................................
2.6Data-¯owModels...................................
2.7CaseStudyPartners..................................
2.8Summary.......................................
3StateoftheArt
3.1ImpactonProgramCorrectness............................
3.2ExtentofCloning...................................
3.3CloneDetectionApproaches.............................
3.4CloneAssessmentandManagement.........................
3.5LimitationsofCloneDetection............................
4ImpactonProgramCorrectness
4.1ResearchQuestions..................................
4.2StudyDesign.....................................
4.3StudyObjects.....................................
4.4ImplementationandExecution............................
4.5Results.........................................
4.6Discussion.......................................
4.7ThreatstoValidity...................................
4.8Summary.......................................
5CloningBeyondCode
5.1ResearchQuestions..................................
5.2StudyDesign.....................................
5.3StudyObjects.....................................
5.4ImplementationandExecution............................
131416171919222628293536363737404147515353545556575959616363646567
9
Contents
5.5Results.........................................68
5.6Discussion.......................................76
5.7ThreatstoValidity...................................77
5.8Summary.......................................79
81ModelCostClone66.1MaintenanceProcess.................................81
6.2Approach.......................................83
6.3DetailedCostModel.................................84
6.4Simpli®edCostModel................................8