[go: up one dir, main page]
More Web Proxy on the site http://driver.im/ skip to main content
10.1145/3128473.3128476acmotherconferencesArticle/Chapter ViewAbstractPublication PagessastConference Proceedingsconference-collections
research-article

An Automated Refactoring Approach to Remove Unnecessary Complexity in Source Code

Published: 18 September 2017 Publication History

Abstract

Programming apprentices may choose to prioritize the correct functioning of a source code without focusing on their quality, making them difficult to maintain and test. Based on that, a phenomenon called unnecessary structural complexity may occur, in which a program has a cyclomatic complexity value that can be reduced without affecting its external behavior. In a previous work, we developed an approach and tool to address this problem. The approach is able to identify the presence of unnecessary cyclomatic complexity and to show the developer a suggestion to restructure the source code, through a control flow graph. The goal of this paper is to automate the source code refactoring process to support the elimination of unnecessary cyclomatic complexity. We performed two experimental studies to evaluate the approach in the academic context. The evidences provided by these studies suggest that the approach is able to support unnecessary cyclomatic complexity removal. We could not find, however, evidences about the implications of such approach on unit tests development.

References

[1]
Lehman, M. M. "Programs, Life Cycles and Laws of Software Evolution", Proceedings of the IEEE, vol. 68, no. 9, p. 1060--1076, Set. 1980.
[2]
Yu, S. e Zhou, S. 2010. "A Survey on Metric of Software Complexity". In: IEEE INTERNATIONAL CONFERENCE ON INFORMATION MANAGEMENT AND ENGINEERING. 2nd, 2010, Chengdu. Proceedings of the 2nd IEEE International Conference on Information Management and Engineering. IEEE, p. 352--356, 2010.
[3]
McCabe, T. J. "A complexity measure". In: IEEE Trans. Software Eng. Vol. SE-2, N. 4, p. 308--320, 1976.
[4]
Allen, F. E. "Control flow analysis", Proceedings of a symposium on Compiler optimization, Urbana-Champaign, Illinois, p. 1--19, 1970.
[5]
Campos Junior, H. S.; Martins Filho, L. R. V.; Araújo, M. A. P. "An Approach for Detecting Unnecessary Cyclomatic Complexity on Source Code". IEEE Latin America Transactions, vol. 14, no. 8, 2016.
[6]
Campos Junior, H. S., Martins Filho, L. R. V.; Araújo, M. A. P. "Uma ferramenta interativa para visualização de código fonte no apoio à construção de casos de teste de unidade". In: BRAZILIAN WORKSHOP ON SYSTEMATIC AND AUTOMATED SOFTWARE TESTING, 9th, 2015, Belo Horizonte. Proceedings of the 9th Brazilian Workshop on Systematic and Automated Software Testing. p. 31--40, 2015.
[7]
Campos Junior, H. S.; Prado, A. F.; Araújo, M. A. P. "Complexity Tool: uma ferramenta para medir complexidade ciclomática de métodos Java". Revista Multiverso. v. 1, n.1, p. 66--76, 2016.
[8]
Mendonça, N. C.; Maia, P.H.M.; Fonseca, L. A.; Andrade, R. M. C. "RefaX: A Refactoring Framework Based on XML", in: Software Maintenance, 2004. Proceedings. 20th IEEE International Conference on. IEEE, p. 147--156. 2004.
[9]
Maruyama, K. e Shinichiro, Y. "Design and implementation of an extensible and modifiable refactoring tool." Program Comprehension, 2005. IWPC 2005. Proceedings. 13th International Workshop on. IEEE, p. 195--204. 2005.
[10]
Balazinska, M.; Merlo, E.; Dagenais, M.; Lague, B.; Kontogiannis, K. "Advanced Clone-Analysis to Support ObjectOriented System Refactoring." Proceedings of Seventh Working Conference on Reverse Engineering (WCRE'00). IEEE, p. 98--107, Nov. 2000.
[11]
Elish K.O. e Alshayeb, M. "Investigating the Effects of Refactoring on Software Testing Effort", Software Engineering Conference, 2009. APSEC'09. Asia-Pacific. IEEE, p. 29--34. 2009.
[12]
Basili, V. R. e Rombach, H. D. 1988. The TAME Project: Towards Improvement Oriented Software Environments. IEEE Transactions on Software Engineering. Vol.SE-14, no.6, pp. 758--773.

Cited By

View all
  • (2018)An empirical approach for software reengineering process with relation to quality assurance mechanismADCAIJ: Advances in Distributed Computing and Artificial Intelligence Journal10.14201/ADCAIJ20187331467:3(31-46)Online publication date: 13-Sep-2018

Index Terms

  1. An Automated Refactoring Approach to Remove Unnecessary Complexity in Source Code

    Recommendations

    Comments

    Please enable JavaScript to view thecomments powered by Disqus.

    Information & Contributors

    Information

    Published In

    cover image ACM Other conferences
    SAST '17: Proceedings of the 2nd Brazilian Symposium on Systematic and Automated Software Testing
    September 2017
    100 pages
    ISBN:9781450353021
    DOI:10.1145/3128473
    Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

    In-Cooperation

    • SBC: Sociedade Brasileira de Computação

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    Published: 18 September 2017

    Permissions

    Request permissions for this article.

    Check for updates

    Author Tags

    1. Control Flow Graph
    2. Cyclomatic Complexity
    3. Software Quality
    4. Software Testing
    5. Source Code Refactoring

    Qualifiers

    • Research-article
    • Research
    • Refereed limited

    Conference

    SAST '17

    Acceptance Rates

    SAST '17 Paper Acceptance Rate 11 of 16 submissions, 69%;
    Overall Acceptance Rate 45 of 92 submissions, 49%

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)8
    • Downloads (Last 6 weeks)1
    Reflects downloads up to 01 Jan 2025

    Other Metrics

    Citations

    Cited By

    View all
    • (2018)An empirical approach for software reengineering process with relation to quality assurance mechanismADCAIJ: Advances in Distributed Computing and Artificial Intelligence Journal10.14201/ADCAIJ20187331467:3(31-46)Online publication date: 13-Sep-2018

    View Options

    Login options

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Media

    Figures

    Other

    Tables

    Share

    Share

    Share this Publication link

    Share on social media