Git the news here! Code quality doesn't count for much when it comes to pull requests

Reputation matters more than code correctness, boffins claim


Git, distributed version control software used by developers to manage source code, includes a command to generate what's known as a pull request, which provides developers with a way to share changes they've made to their copy of a project with the upstream version.

For example, were you to want to contribute to Kubernetes, you might create a local copy by forking the repository. You could then craft code that improves the project somehow, and then share your changes with those maintaining the official version of the project using a pull request.

The Kubernetes maintainers will then review your pull request and, if the changes or additions are deemed worthy, accept it, thereby incorporating your changes into the version the rest of the world uses.

You might expect that the acceptance rate for this particular form of code review – there are a variety of other tools to review code, like Gerrit – would be correlated with code quality. But academic research suggests otherwise.

Bit boffins from Tampere University in Finland recently looked at whether code quality issues – code smells, antipatterns and code style violations – affect the chance a pull request will be accepted by a project maintainer.

In a preprint paper titled, "Does Code Quality Affect Pull Request Acceptance? An empirical study," submitted 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 4.7m code quality issues in 36,000 pull requests.

Of the projects evaluated, 22 were overseen by the Apache Software Foundation. The remaining six were selected using GitHub's list of Trending Java repositories.

Deploying to Google Cloud Run via a custom Cloud Shell

Devs invited to bake 'Run on Google Cloud' button into git repos... By Google, of course

READ MORE

Among the pull requests overall, 19,293 (53.08 per cent) were accepted and 17,051 (46.92 per cent) were rejected. But the acceptance rate varied significantly among different projects. For the Apache Phoenix project, the acceptance rate was a mere 9.85 per cent; the Apache Helix project has been less selective, accepting 90.85 per cent of pull requests.

Using various machine learning techniques to evaluate the code, the researchers found code quality, as measured by the PMD software analysis tool, didn't really figure into whether or not pull requests got accepted. Being a respected community figure appears to matter more.

"Unexpectedly, code quality turned out not to affect the acceptance of a pull request at all," the researchers state in their paper. "As suggested by other works, other factors such as the reputation of the maintainer and the importance of the feature delivered might be more important than code quality in terms of pull request acceptance."

Now you know why we have bugs instead of nice things. ®

Similar topics


Other stories you might like

  • Japan picks AWS and Google for first gov cloud push

    Local players passed over for Digital Agency’s first project

    Japan's Digital Agency has picked Amazon Web Services and Google Cloud for its first big reform push.

    The Agency started operations in September 2021, years after efforts like the UK's Government Digital Service (GDS) or Australia's Digital Transformation Agency (DTA). The body was a signature reform initiated by Prime Minister Yoshihide Suga, who spent his year-long stint in the top job trying to curb Japan's reliance on paper documents, manual processes, and faxes. Japan's many government agencies also operated their websites independently of each other, most with their own design and interface.

    The new Agency therefore has a remit to "cut across all ministries" and "provide services that are driven not toward ministries, agency, laws, or systems, but toward users and to improve user-experience".

    Continue reading
  • Singaporean minister touts internet 'kill switch' that finds kids reading net nasties and cuts 'em off ASAP

    Fancies a real-time crowdsourced content rating scheme too

    A Minister in the Singapore government has suggested the creation of an internet kill switch that would prevent minors from reading questionable material online – perhaps using ratings of content created in real time by crowdsourced contributors.

    "The post-COVID world will bring new challenges globally, including to us in the security arena," said Minister for Defence Dr Ng Eng Hen at a Tuesday ceremony to award the city-state's 2021 Defense Technology Prize.

    "For operations, the SAF (Singapore Armed Force) has to expand its capabilities in the digital domain. Whether for administrative or operational purposes, I think that we will need to leverage technology to the maximum," he declared.

    Continue reading
  • China Telecom booted out of USA as Feds worry it could disrupt or spy on local networks

    FCC urges more action against Huawei and DJI, too

    The US Federal Communications Commission (FCC) has terminated China Telecom's authority to provide communications services in the USA.

    In its announcement of the termination, the government agency explained the decision is necessary because the national security environment has changed in the years since 2002. That was when China Telecom was first allowed to operate in the USA.

    The FCC now believes – partly based on classified advice from national security agencies – that China Telecom can "access, store, disrupt, and/or misroute US communications, which in turn allow them to engage in espionage and other harmful activities against the United States." And because China Telecom is state-controlled, China's government can compel the carrier to act as it sees fit, without judicial review or oversight.

    Continue reading

Biting the hand that feeds IT © 1998–2021