帮助 本站公告
您现在所在的位置:网站首页 > 知识中心 > 文献详情
文献详细Journal detailed

一种基于平均测距的重构定位方法
A Location Method for Refactoring Based on Average Distance Measure

作  者: ; ; ; ;

机构地区: 汕头大学工学院计算机科学与技术系

出  处: 《计算机科学》 2004年第11期162-165,共4页

摘  要: 软件会随着时间变得越来越难以理解,越来越难以维护。因而,程序员必须在软件失去控制前重新构造它。重构是在保持程序外部可观察行为不变情况下,对软件的内部结构进行重新改造和组织的技术,是获得软件质量的一项关键技术。然而,重构在实际中并没有得到预期的应用,最主要的障碍是要耗费太多的时间和精力去寻找需要重构的位置以及选择适当的重构方法。为了克服这种障碍,本文提出一种基于平均测距的重构定位方法,给出类成员与类之间的平均距离及平均距离差公式及其在实际系统中应用的方法。文中阐述了距离理论,并通过一个简单的实例展示了该理论在代码重构中的应用。 Software continuously becomes more and more difficult to understand and maintain with time elapse.Therefore,programmers must restructure the software before losing control of it. Refactoring is a key technique to acquire software quality,which is to restructure and reorganize software without changing its external observable be-haviour. However,refactoring is not applied in practice as much as might be desired. One of main deterrents is the cost of detecting candidates for refactoring and choosing the appropriate refactoring transformation operation. To overcome the deterrent ,a localization method for refactoring based-on average distance measure is proposed,formulas of calculating average distance and average distance difference between class members and classes,and a practical ap-method in real systems are presented in this paper. This paper elaborates the theory of distance, and demon-strates application of the theory in code refactoring by a simple case.

关 键 词: 软件质量 代码重构 程序员 测距 平均 定位方法 系统 障碍 预期 理论

领  域: [自动化与计算机技术] [自动化与计算机技术]

相关作者

作者 伍小奕

相关机构对象

机构 中山大学管理学院
机构 中山大学
机构 华南师范大学

相关领域作者

作者 李文姬
作者 邵慧君
作者 杜松华
作者 周国林
作者 邢弘昊