使用加权依赖图的自动方法重构

Katsuhisa Maruyama, Kenichi Shima
{"title":"使用加权依赖图的自动方法重构","authors":"Katsuhisa Maruyama, Kenichi Shima","doi":"10.1145/302405.302627","DOIUrl":null,"url":null,"abstract":"While refactoring makes frameworks more reusable, it is complex to do by hand. This paper presents a mechanism that automatically refactors methods in object-oriented frameworks by using weighted dependence graphs, whose edges are weighted based on the modification histories of the methods. To find the appropriate boundary between frozen spots and hot spots in the methods, the value of the weight varies based on whether the dependence in the original methods has been repeatedly preserved or destroyed in the methods of applications created by programmers. The mechanism constructs both template methods that contain the invariant dependence and hook methods that are separated by eliminating the variant dependence. The new template methods and hook methods tailored to each programmer save him/her from writing superfluous code when reusing a framework. Experimental results show a reduction rate of up to 22% in the number of statements a programmer has to write when creating several applications; this percentage is double that achievable by a conventional refactoring technique.","PeriodicalId":359367,"journal":{"name":"Proceedings of the 1999 International Conference on Software Engineering (IEEE Cat. No.99CB37002)","volume":"14 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"1999-05-16","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"34","resultStr":"{\"title\":\"Automatic method refactoring using weighted dependence graphs\",\"authors\":\"Katsuhisa Maruyama, Kenichi Shima\",\"doi\":\"10.1145/302405.302627\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"While refactoring makes frameworks more reusable, it is complex to do by hand. This paper presents a mechanism that automatically refactors methods in object-oriented frameworks by using weighted dependence graphs, whose edges are weighted based on the modification histories of the methods. To find the appropriate boundary between frozen spots and hot spots in the methods, the value of the weight varies based on whether the dependence in the original methods has been repeatedly preserved or destroyed in the methods of applications created by programmers. The mechanism constructs both template methods that contain the invariant dependence and hook methods that are separated by eliminating the variant dependence. The new template methods and hook methods tailored to each programmer save him/her from writing superfluous code when reusing a framework. Experimental results show a reduction rate of up to 22% in the number of statements a programmer has to write when creating several applications; this percentage is double that achievable by a conventional refactoring technique.\",\"PeriodicalId\":359367,\"journal\":{\"name\":\"Proceedings of the 1999 International Conference on Software Engineering (IEEE Cat. No.99CB37002)\",\"volume\":\"14 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"1999-05-16\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"34\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Proceedings of the 1999 International Conference on Software Engineering (IEEE Cat. No.99CB37002)\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1145/302405.302627\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the 1999 International Conference on Software Engineering (IEEE Cat. No.99CB37002)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/302405.302627","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 34

摘要

虽然重构使框架更具可重用性,但手工做起来很复杂。本文提出了一种利用加权依赖图实现面向对象框架中方法自动重构的机制,加权依赖图的边根据方法的修改历史进行加权。为了找到方法中冻结点和热点之间的适当边界,权重值的变化取决于原始方法中的依赖性是否在程序员创建的应用程序的方法中被反复保留或破坏。该机制既构造包含不变依赖的模板方法,也构造通过消除变量依赖而分离的钩子方法。为每个程序员量身定制的新模板方法和钩子方法使他/她在重用框架时不必编写多余的代码。实验结果表明,在创建多个应用程序时,程序员必须编写的语句数量减少了22%;这个百分比是传统重构技术的两倍。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
Automatic method refactoring using weighted dependence graphs
While refactoring makes frameworks more reusable, it is complex to do by hand. This paper presents a mechanism that automatically refactors methods in object-oriented frameworks by using weighted dependence graphs, whose edges are weighted based on the modification histories of the methods. To find the appropriate boundary between frozen spots and hot spots in the methods, the value of the weight varies based on whether the dependence in the original methods has been repeatedly preserved or destroyed in the methods of applications created by programmers. The mechanism constructs both template methods that contain the invariant dependence and hook methods that are separated by eliminating the variant dependence. The new template methods and hook methods tailored to each programmer save him/her from writing superfluous code when reusing a framework. Experimental results show a reduction rate of up to 22% in the number of statements a programmer has to write when creating several applications; this percentage is double that achievable by a conventional refactoring technique.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信