Git, distributed version control software used by developers to manage the source code, includes a command to generate what is known as a pull request, which gives developers a way to share the changes they have made in Your copy of a project with the previous version.
For example, if you would like to contribute to Kubernetes, you can create a local copy by forking the repository. Then, you can create a code that improves the project in some way, and then share your changes with those who maintain the official version of the project using an extraction request.
Kubernetes maintenance managers will review your removal request and, if changes or additions are considered worthy, accept it, incorporating your changes in the version used by the rest of the world.
You can expect the acceptance rate for this particular form of code review: there are a variety of other tools to review code, such as Gerrit – would be correlated with the quality of the code. But academic research suggests otherwise.
Bit Boffins, from the University of Tampere in Finland, recently analyzed whether code quality problems (code odors, anti-patterns and code-style violations) affect the possibility that a project manager will accept a withdrawal request .
In a preprinted document entitled, "Does the quality of the code affect the acceptance of the extraction request? An empirical study", presented to the journal "Information and Software Technology", researchers Valentina Lenarduzzi, Vili Nikkola, Nyyti Saarimäki and Davide Taibi describe their analysis of 28 Java open source projects, which included code quality problems of 4.7 million in 36,000 extraction requests.
Of the projects evaluated, 22 were supervised by the Apache Software Foundation. The remaining six were selected using the GitHub Java trend repositories list.
Developers invited to bake the button & # 39; Run in Google Cloud & # 39; in git repositories … By Google, of course
Among extraction requests in general, 19,293 (53.08 percent) were accepted and 17,051 (46.92 percent) were rejected. But the acceptance rate varied significantly between different projects. For the Apache Phoenix project, the acceptance rate was only 9.85 percent; The Apache Helix project has been less selective, accepting 90.85 percent of the extraction requests.
Using various machine learning techniques to evaluate the code, the researchers found that the quality of the code, as measured by the PMD software analysis tool, did not really figure out whether the extraction requests were accepted or not. Being a respected community figure seems to be more important.
"Unexpectedly, the quality of the code proved not to affect the acceptance of an extraction request at all," the researchers say in their article. "As suggested by other works, other factors such as the maintainer's reputation and the importance of the function delivered could be more important than the quality of the code in terms of acceptance of withdrawal request."
Now you know why we have mistakes instead of pretty things. ®