资源描述:
《“Cloning Considered Harmful” Considered Harmful“认为有害地克隆”被认为是有害地.pdf》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、“CloningConsideredHarmful”ConsideredHarmfulCoryKapserandMichaelW.GodfreySoftwareArchitectureGroup(SWAG)DavidR.CheritonSchoolofComputerScience,UniversityofWaterloo{cjkapser,migod}@uwaterloo.caAbstractclonesposeadditionalproblemsiftheydonotevolvesynchronously.Withthisinm
2、ind,methodsforautomaticCurrentliteratureonthetopicofduplicated(cloned)refactoringhavebeensuggested[4,7],andtoolsspecificallycodeinsoftwaresystemsoftenconsidersduplicationtoaiddevelopersinthemanualrefactoringofcloneshaveharmfultothesystemqualityandthereasonscommonlyalsob
3、eendeveloped[19].citedforduplicatingcodeoftenhaveanegativeThereisnodoubtthatcodecloningisoftenanindicationconnotation.Whilethesepositionsaresometimesofsloppydesignandinsuchcasesshouldbeconsideredtocorrect,duringourcasestudieswehavefoundthatthisisbeakindofdevelopmentbad
4、smell.However,wehavenotuniversallytrue,andwehavefoundseveralsituationsfoundthattherearemanyinstanceswherethisissimplynotwherecodeduplicationseemstobeareasonableorthecase.Forexample,cloningmaybeusedtointroduceevenbeneficialdesignoption.Forexample,amethodofexperimentalopt
5、imizationstocoresubsystemswithoutintroducingexperimentalchangestocoresubsystemsistonegativelyeffectingthestabilityofthemaincode.Thus,duplicatethesubsystemandintroducechangesthereinaavarietyofconcernssuchasstability,codeownership,andkindofsandboxtestbed.Asfeaturesmature
6、andbecomedesignclarityneedtobeconsideredbeforeanyrefactoringstablewithintheexperimentalsubsystem,theycanthenisattempted;amanagershouldtrytounderstandthereasonbeintroducedgraduallyintothestablecodebase.Inthisbehindtheduplicationbeforedecidingwhataction(ifany)wayriskofin
7、troducinginstabilitiesinthestableversionistotake.1minimized.ThispaperdescribesseveralpatternsofcloningThispaperintroduceseightcloningpatternsthatwehavethatwehaveencounteredinourcasestudiesanddiscussesuncoveredduringcasestudiesonlargesoftwaresystems,theadvantagesanddisa
8、dvantagesassociatedwithusingsomeofwhichwereportedin[23,24,25].Thesethem.patternspresentbothgoodandbadmotivationsforcl