在開發軟體系統的過程中,軟體的模組化程度會因為開發的演進而降低,而新開發的程式碼不一定能很好的與舊有的模組結合,若結合不當,則可能會在軟體系統上產生散射(Scattering)與糾結(Tangling)的程式碼問題,這類的問題會造成程式碼維護的困難。而AOP(Aspect-Oriented Programming)的開發方式能夠解決上述的問題,其中辨識軟體系統中的面向是導入AOP開發的一個重要程序,目前的面向辨識技術大多著重在利用單一版本的Source Code做分析辨識,而本研究提出利用軟體開發過程中完整的歷史變更記錄以跨版本的方式來分析並辨識面向,並且將本研究所提出的辨識面向方法實作成工具ADRHA,透過實驗驗證後,其辨識面向的準確率可達90%,其辨識的結果能作為軟體開發人員處理Aspect並導入AOP開發方式的建議依據,以協助改善軟體系統的維護性與程式的可讀性。
During software development, the degree of modularity decreases while the software continue to evolve. The update version may not integrate with original module well, which results in scattering and tangling code design and make it hard to maintain the software system. Aspect-Oriented Programming(AOP) provides modular mechanism that can deal with the above problems, the process of identifying aspect in a software system is an important activity in the process of applying AOP. Nowadays, most of methods in identifying aspects focus on using single version of source code to analyze and identify aspects. To further enhance the precision, we proposed to identify aspects by analyzing cross-version revision histories recorded during the development of a software system. Moreover, an assistant tool, ADRHA, is also implemented to support the proposed method. Experiments are also conducted to illustrate the feasibility of the proposed method, in which a high accuracy rate of identifying aspects shows a promising result of applying the proposed method. The identified aspects can then be suggested to developers as a basis for improving the maintainability and readability of a software system.