Programming Style Analysis with Recurrent Neural Network to Automatic Pull Request Approval

Although recognized as important, programming style is one aspect commonly neglected by developers. However, follow the pattern of programming presents in a project may be useful to understand and maintain the system. Usually, the companies build their own guidelines for coding bug fixes or new features. Nonetheless, developing this set of rules is not a simple task, and there are even inconsistencies in the specialized literature. Therefore, this paper proposes a new approach to programming style analysis, using a recurrent neural network (RNN) that learns the programming style presents in a project and determines whether a piece of code submitted to it, follows the project’s pattern. A study on three real projects was conducted and demonstrated the promising of the approach, by revealing the RNN capability to recognize the programming style pattern of each project.

[1]  R. Geoff Dromey,et al.  A Model for Software Product Quality , 1995, IEEE Trans. Software Eng..

[2]  Kirsti Ala-Mutka,et al.  Journal of Information Technology Education Supporting Students in C++ Programming Courses with Automatic Program Style Assessment Supporting Students on C++ Programming Courses , 2022 .

[3]  Georgios Gousios,et al.  Work Practices and Challenges in Pull-Based Development: The Integrator's Perspective , 2014, ICSE.

[4]  Jairo Aponte,et al.  How Distributed Version Control Systems impact open source software projects , 2012, 2012 9th IEEE Working Conference on Mining Software Repositories (MSR).

[5]  Gang Yin,et al.  Reviewer Recommender of Pull-Requests in GitHub , 2014, 2014 IEEE International Conference on Software Maintenance and Evolution.

[6]  Jürgen Schmidhuber,et al.  LSTM: A Search Space Odyssey , 2015, IEEE Transactions on Neural Networks and Learning Systems.

[7]  Michael D. Ernst,et al.  Defects4J: a database of existing faults to enable controlled testing studies for Java programs , 2014, ISSTA 2014.

[8]  Curtis R. Cook,et al.  Programming style authorship analysis , 1989, CSC '89.

[9]  Arie van Deursen,et al.  An exploratory study of the pull-based software development model , 2014, ICSE.

[10]  Ah Chung Tsoi,et al.  Discrete time recurrent neural network architectures: A unifying review , 1997, Neurocomputing.

[11]  Curtis Cook,et al.  Style: an automated program style analyzer , 1990, SGCS.

[12]  Curtis R. Cook,et al.  A taxonomy for programming style , 1990, CSC '90.