[go: up one dir, main page]
More Web Proxy on the site http://driver.im/ skip to main content
10.1109/ICPC.2008.13guideproceedingsArticle/Chapter ViewAbstractPublication PagesConference Proceedingsacm-pubtype
Article

Reading Beside the Lines: Indentation as a Proxy for Complexity Metric

Published: 10 June 2008 Publication History

Abstract

Maintainers face the daunting task of wading through a collection of both new and old revisions, trying to ferret out revisions which warrant personal inspection. One can rank revisions by size/lines of code (LOC), but often, due to the distribution of the size of changes, revisions will be of similar size. If we can't rank revisions by LOC perhaps we can rank by Halstead's and McCabe's complexity metrics? However, these metrics are problematic when applied to code fragments (revisions) written in multiple languages: special parsers are required which may not support the language or dialect used; analysis tools may not understand code fragments. We propose using the statistical moments of indentation as a lightweight, language independent, revision/diff friendly metric which actually proxies classical complexity metrics. We have extensively evaluated our approach against the entire CVS histories of the 278 of the most popular and most active SourceForge projects. We found that our results are linearly correlated and rank-correlated with traditional measures of complexity, suggesting that measuring indentation is a cheap and accurate proxy for code complexity of revisions. Thus ranking revisions by the standard deviation and summation of indentation will be very similar to ranking revisions by complexity.

Cited By

View all
  • (2024)LineFlowDP: A Deep Learning-Based Two-Phase Approach for Line-Level Defect PredictionEmpirical Software Engineering10.1007/s10664-023-10439-z29:2Online publication date: 23-Feb-2024
  • (2019)STYLE-ANALYZERProceedings of the 16th International Conference on Mining Software Repositories10.1109/MSR.2019.00073(468-478)Online publication date: 26-May-2019
  • (2018)Prioritize technical debt in large-scale systems using codesceneProceedings of the 2018 International Conference on Technical Debt10.1145/3194164.3194187(59-60)Online publication date: 27-May-2018
  • Show More Cited By

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image Guide Proceedings
ICPC '08: Proceedings of the 2008 The 16th IEEE International Conference on Program Comprehension
June 2008
280 pages
ISBN:9780769531762

Publisher

IEEE Computer Society

United States

Publication History

Published: 10 June 2008

Author Tags

  1. Whitespace
  2. change metric
  3. complexity
  4. indentation
  5. maintainability

Qualifiers

  • Article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)0
  • Downloads (Last 6 weeks)0
Reflects downloads up to 17 Dec 2024

Other Metrics

Citations

Cited By

View all
  • (2024)LineFlowDP: A Deep Learning-Based Two-Phase Approach for Line-Level Defect PredictionEmpirical Software Engineering10.1007/s10664-023-10439-z29:2Online publication date: 23-Feb-2024
  • (2019)STYLE-ANALYZERProceedings of the 16th International Conference on Mining Software Repositories10.1109/MSR.2019.00073(468-478)Online publication date: 26-May-2019
  • (2018)Prioritize technical debt in large-scale systems using codesceneProceedings of the 2018 International Conference on Technical Debt10.1145/3194164.3194187(59-60)Online publication date: 27-May-2018
  • (2015)Bounded seasComputer Languages, Systems and Structures10.1016/j.cl.2015.08.00244:PA(114-140)Online publication date: 1-Dec-2015
  • (2014)Peer Review on Open-Source Software ProjectsACM Transactions on Software Engineering and Methodology10.1145/259445823:4(1-33)Online publication date: 5-Sep-2014
  • (2011)A simpler model of software readabilityProceedings of the 8th Working Conference on Mining Software Repositories10.1145/1985441.1985454(73-82)Online publication date: 21-May-2011

View Options

View options

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media