簡易檢索 / 詳目顯示

研究生: 馬立偉
Mar, Lee-Wei
論文名稱: 預覽重構的影響:從軟體結構改變至軟體量測改變的推導
Previewing the Effect of Refactoring: From Structural Changes to Metrics Changes Induction
指導教授: 焦惠津
Jiau, Hewijin Christine
學位類別: 碩士
Master
系所名稱: 電機資訊學院 - 電腦與通信工程研究所
Institute of Computer & Communication Engineering
論文出版年: 2007
畢業學年度: 95
語文別: 英文
論文頁數: 52
中文關鍵詞: 軟體重構軟體量測
外文關鍵詞: Software Refactoring, Software Metrics
相關次數: 點閱:116下載:4
分享至:
查詢本校圖書館目錄 查詢臺灣博碩士論文知識加值系統 勘誤回報
  • 軟體工程師在軟體維護階段 (Software Maintenance Phase) 要負責改變軟體以滿足改變的使用者需求以及修正軟體設計時所遺留的不完善處,軟體重構 (Software Refactoring) 可協助軟體工程師以不改變程式碼外在行為的前提下改進軟體的結構 (Software Structure),適當的軟體重構可以幫助改變軟體結構使軟體更具可延伸性 (Extensibility) 以利進一步的改變。然而,軟體工程師在進行軟體重構時,往往不清楚特定重構對軟體結構的整體的影響,在缺乏得知重構對軟體結構影響的狀況下,軟體工程師往往在進行軟體重構時需以嘗試錯誤法反覆嘗試不同重構方法 (Refactoring Method),導致軟體重構的程序 (Refactoring Process) 缺乏效率。本篇碩士論文提出了預覽 (Preview) 軟體重構對軟體結構影響的機制,軟體重構對軟體結構的影響以一組可以對映軟體結構改變的軟體量測改變 (Software Metrics Changes) 表示;為了從軟體重構中得知軟體量測改變,軟體重構所帶來的結構改變 (Structural Change) 會被拆解成「單元改變」 (Atomic Change),並進一步由單元改變推導出軟體量測改變。本論文亦介紹了以基於上述機制所實作的軟體重構的工具:Refactoring Previewer,Refactoring Previewer 在軟體重構時所提供的軟體量測變量可以協助軟體工程師了解軟體重構對軟體結構的改變並進一步幫助軟體工程師以更有效率的方式在軟體重構程序中進行決策。

    During software maintenance, software developers are responsible to change the software for fulfilling the change of user requirement and for fixing the design flaw. Software refactoring provides developers a behavior preserving way to enhance software structure. With proper refactoring, the refactored software would be more extendable for further change. However, during refactoring, the overall effect of refactoring on software structure is often unclear for the developer. The lack of information about the effect of refactoring makes the process of applying refactoring inefficient. In this work, a mechanism that provides developers to preview the refactoring effect is presented. The refactoring effect is represented as a set of software metrics that can reflect the structure of software. To assess the effect of refactoring, the structure changes made by refactoring is decomposed to a series of atomic changes. The effect of refactoring on software metrics is then induced from these atomic changes. A tool: Refactoring Previewer that helps developer preview refactoring effect is implemented. The metrics change information provides by Refactoring Previewer can help developer understand the refactoring impact on software structure and make refactoring decision in more efficient way.

    中文摘要 i Abstract ii Acknowledgement iii Table of Contents iv List of Figures v List of Tables vi Chapter 1 Introduction 1 1.1 Motivation 1 1.2 Background 2 2 Issues On Previewing Refactoring Effect 5 2.1 Refactoring Effect Representation 5 2.2 Metrics Changes Induction from Refactoring 8 2.3 Summary of Issues 12 3 Refactoring Decomposition 14 3.1 Refactoring as A Series of Atomic Changes 14 3.2 Automated Refactoring Decomposition to Atomic Changes 18 4 Metrics Induction 22 4.1 Induction Rules Construction 22 4.2 Relations among Atomic Changes, Induction Rules and Program Context 25 5 Tool Implementation: Refactoring Previewer 28 5.1 Tool Usage Flow 29 5.2 Main User Interface 30 5.3 Code Analysis and Program Model 31 5.4 User Interaction in Applying Refactoring 33 5.5 Bad Smell Mechanism in Refactoring Previewer 36 5.6 Metrics Changes Display 40 6 Conclusion and Future Works 46 6.1 Design/Implementation of Composite Refactoring Method 47 6.2 Supporting on Dierent Programming Languages 48 6.3 Incorporation with More Metrics Based Bad Smell Detection Mechanisms 48 6.4 Interpretation of Metrics Change 49 References 50

    [1] M. Fowler, Refactoring: Improving the Design of Existing Programs. AddisonWesley, 1999.
    [2] "Eclipse." http://www.eclipse.org/, 2007.
    [3] "Javarefactor." http://plugins.jedit.org/plugins/?JavaRefactor, 2007.
    [4] "Jrefactory." http://jrefactory.sourceforge.net/, 2007.
    [5] "Rope." http://rope.sourceforge.net/, 2007.
    [6] "Bicycle repair man." http://bicyclerepair.sourceforge.net/, 2007.
    [7] B. D. Bois and T. Mens, "Describing the impact of refactoring on internal program quality," Proceedings of the International Workshop on Evolution of Large-scale In-
    dustrial Software Applications, pp. 37-48, September 2003.
    [8] L. Tahvildari and K. Kontogiannis, "A metric-based approach to enhance design quality through meta-pattern transformations," Proceedings of the Seventh European Conference On Software Maintenance And Reengineering, pp. 183-192, 2003.
    [9] Y. Kataoka, T. Imai, H. Andou, and T. Fukaya, "A quantitative evaluation of maintainability enhancement by refactoring," Proceedings of International Conference on
    Software Maintenance, pp. 576-585, 2002.
    [10] F. Simon, F. Steinbrµuckner, and C. Lewerentz, "Metrics based refactoring," Proceed-
    ings of the Fifth European Conference On Software Maintenance And Reengineering,
    pp. 30-38, 2001.
    [11] M. J. Munro, "Product metrics for automatic identification of "bad smell" design
    problems in java source code," 11-th IEEE International Software Metrics Symposium, September 2005.
    [12] Y. Crespo, C. Lopez, E. Manso, and R. Marticorena, "Language independent metrics support towards refactoring inference," Proceedings of 9th ECOOP Workshop onQuantitative Approaches in Object-Oriented Software Engineering, pp. 18-29, July, 2005.
    [13] K. Maruyama and S. Yamamoto, "Design and implementation of an extensible and modifiable refactoring tool," Proceedings of the 13th International Workshop on Program Comprehension, pp. 195-204, 2005.
    [14] "Jrbx." http://www.jtool.org/, 2007.
    [15] "Recoder." http://recoder.sourceforge.net/, 2007.
    [16] K. Maruyama and S. Yamamoto, "A case tool platform using an xml representation of java source code," Proceedings of SCAM'04, pp. 158-167, 2004.
    [17] B. G. Ryder and F. Tip, "Change impact analysis for object oriented programs," Proceedings of PASTE '01, pp. 46-53, June 2001.
    [18] M. Lanza and S. Ducasse, "Beyond language independent object-oriented metrics: Model independent metrics," Proceedings of International Workshop on Quantitative
    Approaches in Object-Oriented Software Engineering, pp. 77-84, 2002.
    [19] S. Chidamber and C. Kemerer, "A metrics suite for object oriented design," IEEE Transactions on Software Engineering, vol. 20, no. 6, pp. 476-493, June 1994.
    [20] M. Pinzger, H. Gall, M. Fischer, and M. Lanza, "Visualizing multiple evolution metrics," Proceedings of the 2005 ACM symposium on Software visualization, pp. 67-75, 2005.

    下載圖示 校內:2008-08-21公開
    校外:2008-08-21公開
    QR CODE