The use of code style is very important since it conveys meaning as well as intent of source code. Developers are used to reading code according to their preferred style but those guidelines of proper style vary among software teams, and even different companies. Code style decisions are typically made by managers of software developers, but we would like to investigate how common the different variations of code style are. There are also automated tools to convert code style in a file, however the tools must be configured manually. In this paper, we present a tool for the collection and analysis of code style metrics. We demonstrate the feasibility of scanning existing source code to automatically generate the code style rules for existing tools. We also look at the results of our data mining to look at trends in source code. We perform a quantitative analysis on source code for questions like: How many functions are in a class, on average? How many lines of code are in a method, on average? We also present graphs of the distribution of these data, as well look at special cases of outliers.

, , , ,
12th International Conference on Digital Information Management, ICDIM 2017
School of Information Technology

Torunski, E. (Eric), Shafiq, M.O, & Whitehead, A. (Anthony). (2018). Code style analytics for the automatic setting of formatting rules in IDEs: A solution to the Tabs vs. Spaces Debate. In 2017 12th International Conference on Digital Information Management, ICDIM 2017 (pp. 6–14). doi:10.1109/ICDIM.2017.8244675