MAINTENANCE EFFORT PREDICTION MODEL USING ASPECT-ORIENTED COGNITIVE COMPLEXITY METRICS

: Software development is a multifaceted process. It is challenging to define or measure software qualities and quantities and to determine a valid and concurrent measurement metric. In software development, a metric is the measurement of a particular characteristic of a program's performance or efficiency.The goal of software metrics is to improve understanding of a product or process. Aspect Oriented Programming (AOP) extends the traditional object-oriented programming (OOP) model to improve code reuse across different object hierarchies. AOP can be used with object oriented programming. AspectJ is an implementation of aspect-oriented programming for Java. Software maintenance is the most desired, but most elusive and difficult task in software engineering. The cost of maintenance is as high as 60% to 80% of the total cost of the software. So, plenty of this project are going on in software maintenance. Though, Aspect-oriented paradigm has made it easier, it remains the critical hotspot of research. One way of grappling with the maintenance problem, is to use the complexity metrics. Many studies were made to understand the relationship among complexity metrics, cognition, and maintenance. This paper wrestles with four newly proposed object-oriented cognitive complexity metrics to develop maintenance effort prediction models through various statistical techniques.Empirical study designs are made with ANOVA and experimented.Discussion on results proves the maintenance effort prediction models are more robust, more accurate, and can be employed to estimate the maintenance effort.


I.INTRODUCTION
High software quality is the external hallmark of software engineering. Among the several software qualities maintainability and understandability are the most important and key qualities that are desired in the industry due to overall reduction in cost and effort [1]. The maintenance cost is as high as 60% to 80% of the total cost of the software [2]. In fact, it is the key for the survival of the product through the evolution as it faces many challenges from the constantly changing environments [3]. Software maintenance is the most desired, but most elusive and difficult task. Software maintenance is defined, as per ISO/IEC 9126 and IEEE 1219, "the process of modifying the software system or component after delivery to correct faults, improve performance or other attributes or adapt to a changed environment" [4]. There are four categories of maintenances, namely, corrective, perfective, adaptive, and preventive maintenance [3]. The corrective maintenance consumes about 21% and the adaptive and perfective maintenance takes about 75% of the maintenance effort. The perfective maintenance is the core problem of software maintenance during evolution [5]. Maintenance difficulty depends upon the complexity of the software system. To reduce the complexity, Aspect-Oriented (AO) paradigm is adopted which raises the cognition and eases the maintenance tasks [6]. Even the AO metrics, according to Wang and Shao [7], cannot reflect the real complexity of AO code since they consider only the structural aspect and do not bother about the cognitive aspects in calculating the code complexity. In fact, maintenance should be measured not only in terms structural complexity but also the amount of time taken to understand the program (cognitive aspect) and the effort needed to do the maintenance task [8]. In spite of all these measures, maintenance burden remains a critical area of research [9]. The relationship between the maintenance effort and AO metrics is complex and nonlinear [10]. The cognitive weighted AO metrics further complicate it. Hence, the modeling and prediction of maintenance effort remain the hotspot of research and a lot of statistical models and sophisticated techniques are designed. This paper explores the relationship between themaintenance and four newly proposed complexity metrics by the authors.

II. SURVEY OF LITERATURE
Several studies have been conducted to examine the relationships among design complexity, program cognition and maintenance. As early as in 1976, Swanson et al., have categorized maintenance into corrective, perfective, adaptive, and later with Lientz added preventive maintenance [11,12] . Benestad et al. studied, how classlevel measures of structural properties can be used to assess the maintainability of a software product as a whole [13].
In 2012, Al-Fawareh, studied various OO techniques like polymorphism, inheritance, dynamic biding, complex dependencies etc., from maintenance perspective [14]. Aloysius et al., in 2013, utilized three cognitive complexity metrics to develop a maintenance effort prediction model [9]. Michura et al. identified valuable attributes in determining the difficulty in implementing changes during maintenance [15].

III. EMPIRICAL STUDY DESIGN
The research design of empirical study is suggests that design complexity, maintenance task, and programmer ability influences maintenance performance. Maintenance performance is the dependent variable whereas design complexity and maintenance tasks are independent variables. This study is conducted to find the existence of relationship between cognitive complexity metrics and maintenance time, and to develop a model to predict the maintenance effort.
Maintainability is defined as the ease with which systems can be understood and modified [17]. In past studies, it has been measured as "number of lines of code changed [16] [18], time (required to make changes) and accuracy [19] [17], and "time to understand, develop, and implement modification" [20]. In this study, maintainability was measured as "time to understand, develop, and actually make modifications to existing programs [20]". Accuracy has not been considered in the maintenance measurement because of the reasons that an inverse relationship exists between time (for making changes) and accuracy. All these metrics have been individually validated by comparing their values with similar metrics and have been found to be a better metrics.G. ArockiaSahaya Sheelaand Aloysius, the authors of this article, proposed the four design metrics namely CWMC [21], CWCAE [22], CWPA [23 ], and CWCoAR [24 ]these are the measures of design complexity considered in this study and mathematically defined, calibrated their cognitive weights, experimented with case studies.The second independent variable in the study is the maintenance task. Many of the researchers classify maintenance activities as adaptive, corrective, and perfective. Only two maintenance tasks are used in the study. They are perfective and corrective.
The design complexity is measured using cognitive complexity metrics, these metrics are to be validated. They are validated to find if these metrics are indeed valid metrics of design complexity in the contexts of both 'Perfective Maintenance' (treatment 1) and 'Corrective Maintenance' (treatment 2) tasks.
This study has been conducted to find the relationship between design complexity and maintenance time. It also proposes a model to predict the maintenance effort. There are numerous ways to assess the relationship between two variables. Some of them are t-test/ANOVA, correlation and regression. They can be used to see whether each complexity metric is a reliable indicator of expected maintenance time. The complexities for both the treatments, with each of the four metrics, CWMC, CWCAE, CWPA and CWCoAR are measured. Tests are conducted to validate the proposed metrics CWMC, CWCAE, CWPA and CWCoAR empirically. This is the primary objective of the experiment.

IV. EMPIRICAL EXPERIMENT
There are 122 developers who had two years of programming language experience in which they had at least six months of AOP experience. That the details are given in the table I  Table I. Summary of Programming Experience of Participants

V. RESULTS AND DISCUSSION
For each treatment, a single factor ANOVA is performed to verify, if the dependent variable (maintenance time) for the two groups (high complexity and low complexity systems) are equal.The first and second treatment(Perfective and corrective) has the high-complexity version of the system had a higher MMT ( 126.13 for perfective and 159.77 for corrective) compared to the low-complexity version (109.09 for perfective and 106.10 for corrective). ANOVA is performed to test the statistical significance of this difference, and the results are verified. The analysis shows that the P-value is lesser than 0.00001. The system is categorized as high or low complexity, based on the values of the four metrics, it is concluded that a system with greater CWMC or CWCAE or CWPA or CWCoAR requires more time to perform a given maintenance task than the time required by a system with lower CWMC or CWCAE or CWPA or CWCoAR. Therefore, it is concluded that CWMC, CWCAE, CWPA and CWCoAR are valid complexity metrics, and there is a significant difference in the maintenance time required to make changes to systems, for the first treatment of all the four metrics. The table IV provides the difference level of complexity. A correlation analysis is applied in assessing the relationship between the metrics and maintenance time and the results are tabulated in Table V. From the Table V, it is observed that all the four metrics have high positive correlation. The maintenance effort prediction model used 80% data for model building and 20% for validating the model. The results of regression analysis conducted to investigate the importance of the four complexity metrics (independent variables) in determining the maintenance time (dependent variable) are discussed in this section. Linear regression with one independent variable is performed for each of the four variables. Each of the variables, CWMC, CWCAE, CWPA and CWCoAR is found to have a statistically significant positive relationship with maintenance time. Based on the results, it is concluded that all the four metrics are valid predictors of maintenance time.
There are several criteria to evaluate the predictions of a model. The coefficient of multiple determinations adjusted R2 is used to indicate the amount of variance that is accounted for by the independent variables in a linear model. Because adjusted R2 tends to be an optimistic estimate of how well the model fits the population, adjusted R2 also compensates for the number of independent variables in the model. Multiple regression analysis with all the four variables together is performed to determine the combined explanatory power of these variables.  Thus, it is concluded that it is more appropriate to use combined cognitive metrics suite to predict maintenance effort.

VI. CONCLUSION AND FUTURE WORK
The main objective of this chapter is to empirically explore the validation of four Aspect-oriented cognitive complexity metrics of AOP-CCMS. For empirical validation, a controlled laboratory experiment is conducted to achieve the research objectives. Analysis of variance (ANOVA), correlation, and single and multiple regression analysis are used to quantitatively analyze the experimental data. It is found that each of the metrics CWMC ,CWCAE ,CWPA and CWCoAR metrics suite consisting of all the four are found to accurately measure the cognitive complexity of AO systems design. From the multiple regression models, it is concluded that combined metrics suite is a better predictor of maintenance effort than the individual cognitive complexity metrics and the existing metrics suite. Having empirically validated, the proposed the AOP-CCMS through maintenance effort prediction model, the following chapter summarizes the features of the proposed metrics suite and also provides directions for further research. For future work, the experiment can include other cognitivecomplexity metrics to bring out a bigger suite of maintenanceeffort estimation model. To confirm the results, programmersfrom software industry can be utilized. Further, large systemsfrom open sources can be studied for the same purpose.