An empirical study of COBOL programs via a style analyzer: The benefits of good programming style
Abstract Despite its prominence as the most widely used programming language in industry, there are only a small number of publications on software metrics applied to COBOL [1]. COBSTYLE, a one-pass, line-by-line style analyzer, written in PL/I, is used to analyze 638 COBOL programs. COBSTYLE differs from other style analyzers [2–4] in that it assesses penalty points for abuses in style, and considers to a larger degree, overall program structure. Mean style scores for 23 style characteristics are obtained. The data produced by COBSTYLE, together with programmer efficiency data, are statistically analyzed, yielding results which empirically demonstrate the benefits of good programming style. COBSTYLE scores are shown to have statistically significant correlations with the following: 1. (a) overall performance (as measured by students' final course grade)—at the 0.005 significance level; 2. (b) program correctness—at the 0.01 significance level; 3. (c) total debugging time—at the 0.05 significance level. An important aspect of this study is the “after-the-fact” nature of the methodology; i.e., none of the participants in this experiment were aware that the programs were to be submitted to a style analyzer for analysis.