Towards the Identification of Cross-Cutting Concerns: A Comprehensive Dynamic Approach Based on Execution Relations

Dongjin YU  Xiang SU  Yunlei MU  

Publication
IEICE TRANSACTIONS on Information and Systems   Vol.E97-D   No.5   pp.1235-1243
Publication Date: 2014/05/01
Online ISSN: 1745-1361
DOI: 10.1587/transinf.E97.D.1235
Type of Manuscript: PAPER
Category: Software System
Keyword: 
cross-cutting concerns,  aspects,  execution relations,  execution trace,  running context,  fan-in,  

Full Text: PDF(882.3KB)>>
Buy this Article




Summary: 
Aspect-oriented software development (AOSD) helps to solve the problem of low scalability and high maintenance costs of legacy systems caused by code scattering and tangling by extracting cross-cutting concerns and inserting them into aspects. Identifying the cross-cutting concerns of legacy systems is the key to reconstructing such systems using the approach of AOSD. However, current dynamic approaches to the identification of cross-cutting concerns simply check the methods' execution sequence, but do not consider their calling context, which may cause low precision. In this paper, we propose an improved comprehensive approach to the identification of candidate cross-cutting concerns of legacy systems based on the combination of the analysis of recurring execution relations and fan-ins. We first analyse the execution trace with a given test case and identify four types of execution relations for neighbouring methods: exit-entry, entry-exit, entry-entry and exit-exit. Afterwards, we measure the methods' left cross-cutting degrees and right cross-cutting degrees. The former ensures that the candidate recurs in a similar running context, whereas the latter indicates how many times the candidate cross-cuts different methods. The final candidates are then obtained from those high fan-in methods, which not only cross-cut others more times than a predefined threshold, but are always entered or left under the same running context. The experiment conducted on three open source systems shows that our approach improves the precision of identifying cross-cutting concerns compared with tradition ones.