An Empirical Study of the Effect of File Editing Patterns on Software Quality (extended)


Developers might follow different file editing patterns when handling change requests. Existing research has warned the community about the potential negative impacts of some file editing patterns on software quality. However, very few studies have provided quantitative evidence to support these claims. In this paper, we propose four metrics to identify four file editing patterns: concurrent editing pattern, parallel editing pattern, extended editing pattern, and interrupted editing pattern. Our empirical study on three open source projects shows that 90% (i.e. 1935 out of 2140) of files exhibit at least one file editing pattern. More specifically (1) files that are edited concurrently by many developers are 1.8 times more likely to experience future bugs than files that are not concurrently edited; (2) files edited in parallel with too many other files by the same developer are 2.9 times more likely to exhibit future bugs than files individually edited; (3) files edited over an extended period of time are 1.9 times more likely to experience future bugs than other files; and (4) files edited with long interruptions have 2.0 times more future bugs than other files. We also observe that the likelihood of future bugs in files experiencing all the four file editing patterns is 3.9 times higher than in files that are never involved in any of the four patterns. We further investigate factors impacting the occurrence of these file editing patterns along three dimensions: the ownership of files, the type of change requests in which the files were involved, and the initial code quality of the files. Results show that a file with a major owner is 0.6 times less likely to exhibit the concurrent editing pattern than files without major owners. Files with bad code quality (e.g. highMcCabe’s complexity, high coupling between objects, and lack of cohesion) are more likely to experience the four editing patterns. By ensuring a clear ownership and improving code quality, the negative impact of the four patterns could be reduced. Overall, our findings could be used by software development teams to warn developers about risky file editing patterns.



Feng Zhang, Foutse Khomh, Ying Zou, and Ahmed E. Hassan, An Empirical Study of the Effect of File Editing Patterns on Software Quality, Journal of Software: Evolution and Process (JSEP), Wiley, 26(11): 996-1029, 2014.


@article {zkzh-jsep-2014,
 title = {An empirical study of the effect of file editing patterns on software quality},
 author = {Zhang, Feng and Khomh, Foutse and Zou, Ying and Hassan, Ahmed E.},
 journal = {Journal of Software: Evolution and Process},
 volume = {26},
 number = {11},
 issn = {2047-7481},
 url = {},
 doi = {10.1002/smr.1659},
 pages = {996--1029},
 keywords = {file editing pattern, bug, defect, software quality, change request, ownership, empirical software engineering, mylyn},
 year = {2014},
Download the bibtex