|
ESSI Process Improvement Experiment (PIE) 27719 - PIOJAVA Design process improvement aspects of Object Oriented JAVA in multi-tasking, multi-media, communication intensive, real-time mobile/portable systems
Reference Data Report
Version 1.0 25th June 1999 1. INTRODUCTION *1.1 General *1.2 Objectives *1.3 Definitions *2. REFERENCE DATA SET *3. METRICS APPLIED *3.1 List of method metrics *3.2 Metrics classification *3.2.1 Structural complexity *3.2.2 Module complexity *3.2.3 Cohesion *3.2.4 Coupling *4. DATA ANALYSIS *4.1 Standard statistical calculations *4.2 Normalisation *4.3 Comparison between and within module groups *5. RESULTS AND DISCUSSION *5.1 Method metrics *6. OBSERVATIONS AND CONCLUSIONS *6.1 Initial outcomes *6.2 Application of conclusions *ADDENDUM METRICS DERIVED FROM JAVA MODULES *1 Software modules from published JAVA product *2 List of class metrics *3 Metrics classification *3.1 Structural complexity *3.2 Module complexity *3.3 Cohesion *3.4 Coupling *4 Data analysis *4.1 Standard statistical calculations *4.2 Normalisation *4.3 Comparison between and within module groups *5 Results and discussion *5.1 Method metrics *5.2 Class metrics *5 Observations and conclusions *5.1 Initial outcomes *ANNEX 1 METHOD METRICS *Method Metrics from the Power Software Krakatau Package *LOC Method Lines of Code *EXEC Number of Executable Statements *NEST Maximum Number of Levels *V(G) Cyclomatic Complexity *OC Operational Complexity *CONTROL Number of Control Statement *BRANCH Number of Branching Nodes *NION Number of Input / Output Nodes *CALLS Number of Calls *NP - Number of Parameters *Halstead's Software Science measures *N1 Total Number of Operators *N2 Total Number of Operands *n1 Number of Unique Operators *n2 Number of Unique Operands *N Halstead Program Length *n Halstead Program Vocabulary *V Halstead Program Volume *ANNEX 2 REFERENCE DATA SUMMARY STATISTICS *ANNEX 3 REFERENCE DATA ANALYSIS BREAKDOWN *Significance levels *Distribution of significance *ANNEX 4 CLASS METRICS *Class Metrics from the Power Software Krakatau Package *CSA Class Size in Attributes *CSO Class Size in Operations *NOCC Number of Child Classes *PPP Percentage of Package, Public and Protected members in a Class *DIT Depth in Class Inheritance Tree *CBO Coupling between Object Classes *LOCM Lack of Cohesion of Methods *NOOC Number of Operations Overridden by a Class *NOAC Number of Operations Added by a Class *WMC Weighted Methods per Class *PA Public Accessors *ANNEX 5 JAVA DATA SUMMARY STATISTICS (METHOD METRICS) *ANNEX 6 JAVA DATA ANALYSIS BREAKDOWN (METHOD METRICS) *Significance levels *Distribution of significance *ANNEX 7 JAVA DATA SUMMARY STATISTICS (CLASS METRICS) *ANNEX 8 JAVA DATA ANALYSIS BREAKDOWN (CLASS METRICS) *Significance levels *Distribution of significance *Reference Data Report This report forms part of the ESSI project PIOJAVA, which is an investigation of the effects on the software process of applying the Object-Oriented JAVA Language. To allow evaluation of the change of process, the experiment applies metrics to existing non-Object-Oriented C language programs to form reference measures for comparison during the execution of the baseline project. The report identifies the metrics to be applied and provides reference data derived by their application. An addendum to this report includes an assessment with the selected metrics of a small number of JAVA modules. The objectives of this part of the experiment are:
For the purposes of this report, the following definitions have been adopted. A Software Product is constructed by the compilation and linking of one or more Source Files. These Source Files are also referred to as Modules where they contain either function or method code. Each Source File, which may contain either program code or other information, contains at least one Function or Declaration.
The Reference Data Set comprises software products from existing Terrafix products. The six software products which make up this set have been developed in the C programming language. The first four products contain embedded code; whilst the remaining two are non-embedded applications. Table 1 summarises the basic content of these software products.
Table 1. Software products used for reference data evaluation Software metrics were applied to this data to:
The following method metrics were applied: LOC Lines Of Code per Method. V(G) Cyclomatic Complexity. OC Operational Complexity. CONTROL Number of control statements. EXEC Number of executable statements. NP Number of Parameters per Method. NION Number of Input / Output Nodes. CALLS Number of Calls BRANCH Number of Branching Nodes. NEST Maximum Number of Levels. Halstead's Software Sciences n1 Number of Unique Operators. n2 Number of Unique Operands. n Halstead Program Vocabulary (n1 + n2). N1 Total Number of Operators. N2 Total Number of Operands. N Halstead Program Length (N1 + N2). V Halstead Program Volume, calculated as V = N × (log2n). More detailed descriptions of the metrics are given in Annex 1. Metrics classification The metrics have been classified, where appropriate, into broader categories. It should be noted that some metrics appear in more than one category. The rationale and justification for this classification arise from the descriptions given in the experimental plan.
LOC (Lines Of Code); Executable Statements; Halstead Software Science measures V(G); OC (Operational Complexity); Control; Branch; Nesting NION (Number of Input Output Nodes); Calls Calls; NOP (Number Of Parameters)
Following the gathering of the metric measurements, three analyses have been performed on the resulting data.
A standard set of statistical calculations has been made on each of the original metrics: mean and standard deviation. This has enabled file-wide comparisons to be made. The original measures were then normalised by dividing each value by the mean of the values for the file under consideration. This has normalised the mean to 1, and assisted in allowing the different metrics to be compared for values of standard deviation. A comparison has been made between the metric results for the embedded and non-embedded groups of modules, to determine if any significant differences are observable. The metrics within the groups were also examined.
17 measurements have been taken for each of the 6 software products. The standard statistical calculations described in section 4 have been carried out to provide summary statistics. These summary statistics from the individual software products have been aggregated according to the categories described in section 2. These statistics are shown for the individual and aggregate categories in annex 2. The values for the aggregations are summarised in table 2.
Table 2. Summary statistics To evaluate differences between and within the aggregate groups, pairwise Students "t" tests were applied in the following manner:
The results of these comparisons are shown in tables 3 and 4 for significance levels of p < 0.05 and p < 0.1 respectively. Differences, where they are significant at these levels, are shown as "D", with a subscript indicating the numbers of significant pairwise differences where appropriate. For information, further breakdowns of all of these results are given in annex 3. As a further consistency check, the same calculations were performed on data sets in which outliers beyond twice the standard deviation had been removed.
D significant difference (subscript gives number of significant pairs); N no significant difference Table 3. Significant difference at p<0.05 level
D significant difference (subscript gives number of significant pairs); N no significant difference Table 4 Significant difference at p<0.1 level
The conclusions derived from these results are: In all cases, a significant difference was observed between the embedded and the non-embedded aggregate groups. (It should be noted that the values for all of the metrics except CALLS and BRANCH were more highly significant.) Within the embedded aggregate group, variations in significance were observed at varying levels which depended on software product and metric. Within the non-embedded aggregate group, although variations in significance were observed, on this small sample significant differences were observed with certain metrics. On the basis of these conclusions, the reference data set has been grouped into non-embedded, embedded and pooled subsets. This provides effectively 3 sets of reference data for the purposes of the project. These reference data set measurements are given in table 2, repeated below.
Table 2. Metric reference data set ADDENDUM METRICS DERIVED FROM JAVA MODULES 1 Software modules from published JAVA product To investigate the application of metrics to JAVA based software a small number of software products were assessed. The method metrics of section 3 and class metrics applicable to OO structured code were applied to these products. Table A1 summarises these JAVA based software products.
Table A1. Software products used for JAVA data evaluation The metrics measured from these data were used to:
The following class metrics were be applied to the JAVA modules: CSA Class Size in Attributes CSO Class Size on Operations (Methods) PPPC Percentage of Package, Public and Protected members in a Class NOCC Number Of Child Classes DIT Depth of Class Inheritance Tree CBO Coupling Between Objects LOCM Lack Of Cohesion of Methods NOOC Number of Operations Overridden by a Class NOAC Number of Operations Added by a Class WMC Weighted Methods per Class LOC Lines Of Code comprising a Class PA Public Accessors More detailed descriptions of the metrics are given in Annex 4. The metrics have been classified, where appropriate, into broader categories. It should be noted that some metrics appear in more than one category. The rationale and justification for this classification arise from the descriptions given in the experimental plan. CSA (Class Size in Attributes); NOCC (Number Of Child Classes); DIT (Depth of class Inheritance Tree); NOAC (Number of Operations Added by a Class) CSO (Class Size in Operations); NOOC (Number of Operations Overridden by a Class); WMC (Weighted Methods per Class) NOCC (Number Of Child Classes); LOCM (Lack Of Cohesion of Methods); NOOC (Number of Operations Overridden by a Class) PPPC (percentage of Package, Public and Protected members in a Class); CBO (Coupling Between Objects); PA (Public Accessors)
4.1 Standard statistical calculations A standard set of statistical calculations has been made on each of the original metrics: mean and standard deviation. This has enabled file-wide comparisons to be made. The original measures were then normalised by dividing each value by the mean of the values for the file under consideration. This has normalised the mean to 1, and assisted in allowing the different metrics to be compared for values of standard deviation. 4.3 Comparison between and within module groups A comparison has been made between the metric results obtained, and those for 3 groups of non Object-Oriented reference data (pooled, embedded and non-embedded groups of modules; main document section 6), to determine if any significant differences are observable. The metrics within the groups were also examined. 17 measurements have been taken for each of the 2 available JAVA software products. The standard statistical calculations described in section 4 of the addendum have been carried out to provide summary statistics for the JAVA products. These summary statistics from the individual software products have been aggregated into categories of Embedded C, Non-Embedded C, Pooled C (from the main document section 5) and JAVA. These statistics are shown for the individual and aggregate categories in annex 5. The values for the aggregations are summarised in table A2.
Table A2. Summary statistics (Method metrics) To evaluate differences between and within the groups, pairwise Students "t" tests were applied in the following manner:
The results of these comparisons are shown in tables A3 and A4 for significance levels of p < 0.05 and p < 0.1 respectively. Differences, where they are significant at these levels, are shown as "D", with a subscript indicating the numbers of significant pairwise differences where appropriate. For information, further breakdowns of all of these results are given in annex 6.
Table A3. Significant difference at p<0.05 level (Method metrics)
Table A4. Significant difference at p<0.1 level (Method metrics) 12 measurements have been taken for each of the 2 available software products. The standard statistical calculations described in section 4 have been carried out to provide summary statistics. These summary statistics from the individual software products have been aggregated according to the categories described in section 3 of this addendum. These statistics are shown for the individual and aggregate categories in annex 7. The values for the aggregations are summarised in table A5.
Table A5. Summary statistics (Class metrics) To evaluate differences between and within the groups, pairwise Students "t" tests were applied in the following manner:
The results of these comparisons are shown in table A6 for significance levels of p < 0.05 and p < 0.1. Differences, where they are significant at these levels, are shown as "D", with a subscript indicating the numbers of significant pairwise differences where appropriate. For information, further breakdowns of all of these results are given in annex 8.
Table A6. Significant difference at p< | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||