Skip to main content
Erschienen in: Innovations in Systems and Software Engineering 4/2015

01.12.2015 | Original Paper

ACCo: a novel approach to measure cohesion using hierarchical slicing of Java programs

verfasst von: S. Panda, D. P. Mohapatra

Erschienen in: Innovations in Systems and Software Engineering | Ausgabe 4/2015

Einloggen

Aktivieren Sie unsere intelligente Suche, um passende Fachinhalte oder Patente zu finden.

search-config
loading …

Abstract

Maintainability of program parts refers to the ease with which these parts can be modified. Many existing metrics of internal quality attributes such as cohesion, coupling, etc. have been used in this regard. Cohesiveness among program parts is considered as a strong measure for the maintainability of object-oriented components and to predict the probability of being erroneous. Our objective is to propose a novel graph-based cohesion metric to measure the maintainability of different program parts in an object-oriented program and predict their fault proneness. We compute the cohesion of the sliced component as a measure to predict its correctness and preciseness. In addition, we wish to theoretically validate the proposed technique against the existing guidelines of cohesion measurement and compare it with some existing techniques. We propose a new cohesion metric named affected component cohesion (ACCo) to measure the maintainability of different program parts and predict their fault proneness. This metric is based on the hierarchical decomposition slice of an object-oriented program that comprises all the affected program parts. The slices are obtained with respect to some modification made to the program under consideration. It is essential to consider all possible dependence relationships along with the control and data dependences that exist between different program parts of an object-oriented program for a better program comprehension. To represent these dependences, we construct a suitable intermediate graph for an object-oriented program. Then, we compute the slice of the object-oriented program using the intermediate graph to extract the affected program parts. These extracted affected program parts are represented as nodes in the proposed affected slice graph. The critical and sub-critical nodes that require thorough testing are determined by estimating their cohesion measure. The theoretical validation signifies that ACCo satisfies all the existing properties for cohesion measurement. The results obtained are more precise and comparable with other existing approaches. ACCo is a more precise and practical technique to measure the inter-relatedness of affected program parts in an object-oriented program. The discussion on possible threats to its validity demonstrates the scope for improvement of this approach.

Sie haben noch keine Lizenz? Dann Informieren Sie sich jetzt über unsere Produkte:

Springer Professional "Wirtschaft+Technik"

Online-Abonnement

Mit Springer Professional "Wirtschaft+Technik" erhalten Sie Zugriff auf:

  • über 102.000 Bücher
  • über 537 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Maschinenbau + Werkstoffe
  • Versicherung + Risiko

Jetzt Wissensvorsprung sichern!

Springer Professional "Wirtschaft"

Online-Abonnement

Mit Springer Professional "Wirtschaft" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 340 Zeitschriften

aus folgenden Fachgebieten:

  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Versicherung + Risiko




Jetzt Wissensvorsprung sichern!

Springer Professional "Technik"

Online-Abonnement

Mit Springer Professional "Technik" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 390 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Maschinenbau + Werkstoffe




 

Jetzt Wissensvorsprung sichern!

Fußnoten
7
Access method is defined only to retrieve or update a data member of the class.
 
8
Delegation method is defined to delegate a message to an instance variable through another object.
 
9
Constructor is defined to initialize the instance members.
 
10
Destructor is defined to deinitialize the instance members.
 
Literatur
1.
Zurück zum Zitat Al Dallal J (2007) Efficient program slicing algorithms for measuring functional cohesion and parallelism. Int J Inf Technol 4(2):93–100 Al Dallal J (2007) Efficient program slicing algorithms for measuring functional cohesion and parallelism. Int J Inf Technol 4(2):93–100
2.
Zurück zum Zitat Al Dallal J (2010) Mathematical validation of object-oriented class cohesion metrics. Int J Comput 4(2):45–52 Al Dallal J (2010) Mathematical validation of object-oriented class cohesion metrics. Int J Comput 4(2):45–52
3.
Zurück zum Zitat Al Dallal J (2011) Improving object-oriented lack-of-cohesion metric by excluding special methods. In: Proceedings of the 10th WSEAS international conference on software engineering, parallel and distributed systems. World Scientific and Engineering Academy and Society (WSEAS) pp 124–129 Al Dallal J (2011) Improving object-oriented lack-of-cohesion metric by excluding special methods. In: Proceedings of the 10th WSEAS international conference on software engineering, parallel and distributed systems. World Scientific and Engineering Academy and Society (WSEAS) pp 124–129
4.
Zurück zum Zitat Al Dallal J (2011) Transitive-based object-oriented lack-of-cohesion metric. Procedia Comput Sci 3:1581–1587CrossRef Al Dallal J (2011) Transitive-based object-oriented lack-of-cohesion metric. Procedia Comput Sci 3:1581–1587CrossRef
5.
Zurück zum Zitat Al Dallal J (2012) Fault prediction and the discriminative powers of connectivity-based object-oriented class cohesion metrics. Inf Softw Technol 54(4):396–416CrossRef Al Dallal J (2012) Fault prediction and the discriminative powers of connectivity-based object-oriented class cohesion metrics. Inf Softw Technol 54(4):396–416CrossRef
6.
Zurück zum Zitat Al Dallal J (2012) The impact of accounting for special methods in the measurement of object-oriented class cohesion on refactoring and fault prediction activities. J Syst Softw 85(5):1042–1057CrossRef Al Dallal J (2012) The impact of accounting for special methods in the measurement of object-oriented class cohesion on refactoring and fault prediction activities. J Syst Softw 85(5):1042–1057CrossRef
7.
Zurück zum Zitat Al Dallal J (2013) Object-oriented class maintainability prediction using internal quality attributes. Inf Softw Technol 55(11):2028–2048CrossRef Al Dallal J (2013) Object-oriented class maintainability prediction using internal quality attributes. Inf Softw Technol 55(11):2028–2048CrossRef
8.
Zurück zum Zitat Alomari HW, Collard ML, Maletic JI (2012) A very efficient and scalable forward static approach. In: Reverse Engineering (WCRE), 19th working conference. IEEE, pp 425–434 Alomari HW, Collard ML, Maletic JI (2012) A very efficient and scalable forward static approach. In: Reverse Engineering (WCRE), 19th working conference. IEEE, pp 425–434
9.
Zurück zum Zitat Alomari HW, Collard ML, Maletic JI, Alhindawi N, Meqdadi O (2014) srcSlice: very efficient and scalable forward static slicing. J Softw Evol Process 26(11):931–961CrossRef Alomari HW, Collard ML, Maletic JI, Alhindawi N, Meqdadi O (2014) srcSlice: very efficient and scalable forward static slicing. J Softw Evol Process 26(11):931–961CrossRef
10.
Zurück zum Zitat Badri L, Badri M (2004) A proposal of a new class cohesion criterion: an empirical study. J Object Technol 3(4):145–159CrossRef Badri L, Badri M (2004) A proposal of a new class cohesion criterion: an empirical study. J Object Technol 3(4):145–159CrossRef
11.
Zurück zum Zitat Barpanda SS, Mohapatra DP (2011) Dynamic slicing of distributed object-oriented programs. IET Softw 5(5):425–433CrossRef Barpanda SS, Mohapatra DP (2011) Dynamic slicing of distributed object-oriented programs. IET Softw 5(5):425–433CrossRef
12.
Zurück zum Zitat Briand LC, Morasca S, Basili VR (1996) Property-based software engineering measurement. IEEE Trans Softw Eng 22(1):68–86CrossRef Briand LC, Morasca S, Basili VR (1996) Property-based software engineering measurement. IEEE Trans Softw Eng 22(1):68–86CrossRef
13.
Zurück zum Zitat Briand LC, Morasca S, Basili VR (1999) Defining and validating measures for object-based high-level design. IEEE Trans Softw Eng 25(5):722–743CrossRef Briand LC, Morasca S, Basili VR (1999) Defining and validating measures for object-based high-level design. IEEE Trans Softw Eng 25(5):722–743CrossRef
14.
Zurück zum Zitat Chae HS, Kwon YR, Bae DH (2000) A cohesion measure for object-oriented classes. Softw Pract Exp 30(12):1405–1432MATHCrossRef Chae HS, Kwon YR, Bae DH (2000) A cohesion measure for object-oriented classes. Softw Pract Exp 30(12):1405–1432MATHCrossRef
15.
Zurück zum Zitat Chen Z, Xu B (2001) Slicing object-oriented Java programs. ACM SIGPLAN Not 36(4):33–40CrossRef Chen Z, Xu B (2001) Slicing object-oriented Java programs. ACM SIGPLAN Not 36(4):33–40CrossRef
16.
Zurück zum Zitat Chen Z, Zhou Y, Xu B, Zhao J, Yang H (2002) A novel approach to measuring class cohesion based on dependence analysis. In: Proceedings of the international conference on software maintenance (ICSM). IEEE, pp 377–384 Chen Z, Zhou Y, Xu B, Zhao J, Yang H (2002) A novel approach to measuring class cohesion based on dependence analysis. In: Proceedings of the international conference on software maintenance (ICSM). IEEE, pp 377–384
17.
Zurück zum Zitat Chidamber SR, Kemerer CF (1994) A metrics suite for object-oriented design. Softw Eng IEEE Trans 20(6):476–493CrossRef Chidamber SR, Kemerer CF (1994) A metrics suite for object-oriented design. Softw Eng IEEE Trans 20(6):476–493CrossRef
18.
Zurück zum Zitat Collard ML, Decker MJ, Maletic JI (2011) Lightweight transformation and fact extraction with the srcML Toolkit. In: Source code analysis and manipulation (SCAM), 2011 11th IEEE international working conference on. IEEE, pp 173–184 Collard ML, Decker MJ, Maletic JI (2011) Lightweight transformation and fact extraction with the srcML Toolkit. In: Source code analysis and manipulation (SCAM), 2011 11th IEEE international working conference on. IEEE, pp 173–184
19.
Zurück zum Zitat Collard ML, Kagdi HH, Maletic JI (2003) An XML-based lightweight C++ fact extractor. In: Program comprehension, 2003. 11th IEEE international workshop on. IEEE, pp 134–143 Collard ML, Kagdi HH, Maletic JI (2003) An XML-based lightweight C++ fact extractor. In: Program comprehension, 2003. 11th IEEE international workshop on. IEEE, pp 134–143
20.
Zurück zum Zitat Green P, Lane PC, Rainer A, Scholz S (2009) An introduction to slice-based cohesion and coupling metrics. Technical Report SE-09-488, University of Hertfordshire Green P, Lane PC, Rainer A, Scholz S (2009) An introduction to slice-based cohesion and coupling metrics. Technical Report SE-09-488, University of Hertfordshire
21.
Zurück zum Zitat Gupta V, Chhabra JK (2012) Package level cohesion measurement in object-oriented software. J Braz Comput Soc 18(3):251–266CrossRef Gupta V, Chhabra JK (2012) Package level cohesion measurement in object-oriented software. J Braz Comput Soc 18(3):251–266CrossRef
22.
Zurück zum Zitat Kovács G, Magyar F, Gyimóthy T (1996) Static slicing of java programs. In: University. Citeseer Kovács G, Magyar F, Gyimóthy T (1996) Static slicing of java programs. In: University. Citeseer
23.
Zurück zum Zitat Krinke J (2007) Statement-level cohesion metrics and their visualization. In: Source code analysis and manipulation (SCAM), 7th IEEE international working conference. IEEE, pp 37–48 Krinke J (2007) Statement-level cohesion metrics and their visualization. In: Source code analysis and manipulation (SCAM), 7th IEEE international working conference. IEEE, pp 37–48
24.
Zurück zum Zitat Krishnaswamy A (1994) Program slicing: an application of object-oriented program dependence graphs. Technical report TR94-108. Department of Computer Science, Clemson University Krishnaswamy A (1994) Program slicing: an application of object-oriented program dependence graphs. Technical report TR94-108. Department of Computer Science, Clemson University
25.
Zurück zum Zitat Li BX, Fan XC, Pang J, Zhao JJ (2004) Model for slicing Java programs hierarchically. J Comput Sci Technol 19(6):848–858CrossRef Li BX, Fan XC, Pang J, Zhao JJ (2004) Model for slicing Java programs hierarchically. J Comput Sci Technol 19(6):848–858CrossRef
26.
Zurück zum Zitat Lossing N, Guillou P, Amini M, Irigoin F (2015) From data to effects dependence graphs: source-to-source transformations for C. In: The 18th international workshop on compilers for parallel computing (CPC’15) Lossing N, Guillou P, Amini M, Irigoin F (2015) From data to effects dependence graphs: source-to-source transformations for C. In: The 18th international workshop on compilers for parallel computing (CPC’15)
27.
Zurück zum Zitat Meyers TM, Binkley D (2007) An empirical study of slice-based cohesion and coupling metrics. ACM Trans Softw Eng Methodol (TOSEM) 17(1):2CrossRef Meyers TM, Binkley D (2007) An empirical study of slice-based cohesion and coupling metrics. ACM Trans Softw Eng Methodol (TOSEM) 17(1):2CrossRef
28.
Zurück zum Zitat Mohapatra DP, Mall R, Kumar R (2005) Computing dynamic slices of concurrent object-oriented programs. Inf Softw Technol 47(12):805–817CrossRef Mohapatra DP, Mall R, Kumar R (2005) Computing dynamic slices of concurrent object-oriented programs. Inf Softw Technol 47(12):805–817CrossRef
29.
Zurück zum Zitat Mohapatra DP, Mall R, Kumar R (2006) An overview of slicing techniques for object-oriented programs. Inform (Slov) 30(2):253–277MATH Mohapatra DP, Mall R, Kumar R (2006) An overview of slicing techniques for object-oriented programs. Inform (Slov) 30(2):253–277MATH
30.
Zurück zum Zitat Panda S, Mohapatra DP (2013) Application of hierarchical slicing to regression test selection of Java programs. Model Based Softw Eng Some Perspect Infosys Labs Brief 11(2):3–19 Panda S, Mohapatra DP (2013) Application of hierarchical slicing to regression test selection of Java programs. Model Based Softw Eng Some Perspect Infosys Labs Brief 11(2):3–19
31.
Zurück zum Zitat Rilling J, Klemola T (2003) Identifying comprehension bottlenecks using program slicing and cognitive complexity metrics. In: 11th IEEE international workshop on program comprehension. IEEE, pp 115–124 Rilling J, Klemola T (2003) Identifying comprehension bottlenecks using program slicing and cognitive complexity metrics. In: 11th IEEE international workshop on program comprehension. IEEE, pp 115–124
32.
Zurück zum Zitat Romano D, Pinzger M (2011) Using source code metrics to predict change-prone Java interfaces. In: Software maintenance (ICSM), 2011 27th IEEE international conference on. IEEE, pp 303–312 Romano D, Pinzger M (2011) Using source code metrics to predict change-prone Java interfaces. In: Software maintenance (ICSM), 2011 27th IEEE international conference on. IEEE, pp 303–312
33.
Zurück zum Zitat Silva B, Sant’Anna C, Chavez C, Garcia A (2012) Concern-based cohesion: unveiling a hidden dimension of cohesion measurement. In: IEEE 20th international conference on program comprehension (ICPC). IEEE, pp 103–112 Silva B, Sant’Anna C, Chavez C, Garcia A (2012) Concern-based cohesion: unveiling a hidden dimension of cohesion measurement. In: IEEE 20th international conference on program comprehension (ICPC). IEEE, pp 103–112
34.
Zurück zum Zitat da Silva BC, Sant’Anna C, Chavez C (2011) Concern-based cohesion as change proneness indicator: an initial empirical study. In: Proceedings of the 2nd international workshop on emerging trends in software metrics. ACM, pp 52–58 da Silva BC, Sant’Anna C, Chavez C (2011) Concern-based cohesion as change proneness indicator: an initial empirical study. In: Proceedings of the 2nd international workshop on emerging trends in software metrics. ACM, pp 52–58
35.
Zurück zum Zitat da Silva BC, Sant’Anna CN, Chavez CvF (2014) An empirical study on how developers reason about module cohesion. In: Proceedings of the 13th international conference on modularity. ACM, pp 121–132 da Silva BC, Sant’Anna CN, Chavez CvF (2014) An empirical study on how developers reason about module cohesion. In: Proceedings of the 13th international conference on modularity. ACM, pp 121–132
36.
Zurück zum Zitat Tian J, Zelkowitz MV (1992) A formal program complexity model and its application. J Syst Softw 17(3):253–266CrossRef Tian J, Zelkowitz MV (1992) A formal program complexity model and its application. J Syst Softw 17(3):253–266CrossRef
37.
Zurück zum Zitat Wang D, Dong M, Zhan W (2013) An input data related behavior extracting and measuring model. Int J Appl Math Inf Sci 7(2):683–689CrossRef Wang D, Dong M, Zhan W (2013) An input data related behavior extracting and measuring model. Int J Appl Math Inf Sci 7(2):683–689CrossRef
38.
Zurück zum Zitat Wang T, Roychoudhury A (2004) Using compressed bytecode traces for slicing Java programs. In: 26th international conference on software engineering (ICSE’04). ACM, pp 512–521 Wang T, Roychoudhury A (2004) Using compressed bytecode traces for slicing Java programs. In: 26th international conference on software engineering (ICSE’04). ACM, pp 512–521
39.
Zurück zum Zitat Weiser M (1981) Program Slicing. In: Proceedings of the 5th international conference on software. San Diego, pp 439–449 Weiser M (1981) Program Slicing. In: Proceedings of the 5th international conference on software. San Diego, pp 439–449
40.
Zurück zum Zitat Wen W (2012) Software fault localization based on program slicing spectrum. In: Proceedings of the international conference on software wngineering. ACM, pp 1511–1514 Wen W (2012) Software fault localization based on program slicing spectrum. In: Proceedings of the international conference on software wngineering. ACM, pp 1511–1514
41.
42.
Zurück zum Zitat Yoshida N, Kinoshita M, Iida H (2012) A cohesion metric approach to dividing source code into functional segments to improve maintainability. In: Software maintenance and reengineering (CSMR), 16th European conference on. IEEE, pp 365–370 Yoshida N, Kinoshita M, Iida H (2012) A cohesion metric approach to dividing source code into functional segments to improve maintainability. In: Software maintenance and reengineering (CSMR), 16th European conference on. IEEE, pp 365–370
43.
Zurück zum Zitat Yu P, Systa T, Muller H (2002) Predicting fault-proneness using OO metrics. An industrial case study. In: Proceedings of software maintenance and reengineering, 2002, Sixth European conference on. IEEE, pp 99–107 Yu P, Systa T, Muller H (2002) Predicting fault-proneness using OO metrics. An industrial case study. In: Proceedings of software maintenance and reengineering, 2002, Sixth European conference on. IEEE, pp 99–107
44.
Zurück zum Zitat Zhao J (1998) Applying program dependence analysis to java software. In: Proceedings of workshop on software engineering and database systems, 1998, international computer symposium. Citeseer, pp 162–169 Zhao J (1998) Applying program dependence analysis to java software. In: Proceedings of workshop on software engineering and database systems, 1998, international computer symposium. Citeseer, pp 162–169
45.
Zurück zum Zitat Zhao J, Cheng J, Ushijima K (1998) A dependence based representation for concurrent object-oriented software maintenance. In: Proceedings of 2nd Euromicro conference on software maintenance and reengineering, pp 60–66 Zhao J, Cheng J, Ushijima K (1998) A dependence based representation for concurrent object-oriented software maintenance. In: Proceedings of 2nd Euromicro conference on software maintenance and reengineering, pp 60–66
46.
Zurück zum Zitat Zhou Y, Wen L, Wang J, Chen Y, Lu H, Xu B (2003) DRC: a dependence relationships based cohesion measure for classes. In: Software engineering conference. Tenth Asia-Pacific. IEEE, pp 215–223 Zhou Y, Wen L, Wang J, Chen Y, Lu H, Xu B (2003) DRC: a dependence relationships based cohesion measure for classes. In: Software engineering conference. Tenth Asia-Pacific. IEEE, pp 215–223
47.
Zurück zum Zitat Zhou Y, Xu B, Zhao J, Yang H (2002) ICBMC: an improved cohesion measure for classes. In: Software maintenance, 2002. Proceedings of international conference. IEEE, pp 44–53 Zhou Y, Xu B, Zhao J, Yang H (2002) ICBMC: an improved cohesion measure for classes. In: Software maintenance, 2002. Proceedings of international conference. IEEE, pp 44–53
Metadaten
Titel
ACCo: a novel approach to measure cohesion using hierarchical slicing of Java programs
verfasst von
S. Panda
D. P. Mohapatra
Publikationsdatum
01.12.2015
Verlag
Springer London
Erschienen in
Innovations in Systems and Software Engineering / Ausgabe 4/2015
Print ISSN: 1614-5046
Elektronische ISSN: 1614-5054
DOI
https://doi.org/10.1007/s11334-015-0252-8

Weitere Artikel der Ausgabe 4/2015

Innovations in Systems and Software Engineering 4/2015 Zur Ausgabe

Premium Partner