
A bot disguised as a human software developer fixes bugs - mkm416
https://www.technologyreview.com/s/612336/a-bot-disguised-as-a-human-software-developer-fixes-bugs/
======
edflsafoiewq
An interesting prospect, but the patches appear to consist mostly of wrapping
a block of code that throws a NullPointerException in a check for null. This
is non-trivial -- consider
[https://github.com/aaime/geowebcache/pull/1/files](https://github.com/aaime/geowebcache/pull/1/files),
where the initializer form has to be broken up and the bot needs some kind of
knowledge of data dependencies to know how much code to wrap in the if-block
-- but it is also help that humans already receive from machines in the form
of lints.

Much more interesting is this:
[https://github.com/eclipse/ditto/pull/151/files](https://github.com/eclipse/ditto/pull/151/files).
How did it know to use this.isConsuming()?

Here's the list of PRs it made: [https://github.com/Spirals-
Team/repairnator/issues/758](https://github.com/Spirals-
Team/repairnator/issues/758)

I want to take issue with a quote from the paper:

> There is one more aspect to consider. It has been shown that human engineers
> do not accept contributions from bots as easily as contributions from other
> humans, even if they are strictly identical [5]. The reason is that humans
> tend to have a priori biases against machines, and are more tolerant to
> errors if the contribution comes from a human peer.

Even if a machine and a human submit the exact same patch, the human's carries
the implicit promise that it was the result of a (more or less :) intelligent
process. The human actually _thought_ about it and came to the conclusion that
not only did it make the build pass but that it was, taking into account as
much context as might be necessary, the right patch to make. If you review a
machine's patch, you are obliged to perform the whole intelligent evaluation
of whether it is the right patch yourself, which is almost never easier than
simply writing the patch yourself.

~~~
quelltext
Wait, how is the code in the first link passing definite assignment analysis
checks for `params`? The Java compiler is intentionally very restrictive about
this (even if by means of more elaborate analysis definite assignment could be
proven).

~~~
quelltext
My hunch is that it doesn't, so the fix was actually wrong.

The file here has the necessary initialization for params for this to work:
[https://github.com/GeoWebCache/geowebcache/blob/master/geowe...](https://github.com/GeoWebCache/geowebcache/blob/master/geowebcache/core/src/main/java/org/geowebcache/layer/wms/WMSHttpHelper.java)

