
Human-competitive Patches in Automatic Program Repair with Repairnator - Dotnaught
https://medium.com/@martin.monperrus/human-competitive-patches-in-automatic-program-repair-with-repairnator-359042e00f6a
======
Arnavion
>June 25, 2018, [https://github.com/donnelldebnam/CodeU-
Spring-2018-29/pull/5...](https://github.com/donnelldebnam/CodeU-
Spring-2018-29/pull/59) “Thanks!!”

A strange fix to equally strange code. In the old code `tags` wasn't used in
the first place, and in the new code it's put inside a scope ensuring it
definitely can't be used. Why not just delete it?

If it's being used just for side-effects in the `getAllHashtags()` call, why
still bind it to a variable?

Edit: Also, it isn't consistent with the original code in that it prefixes the
member access with `this.` whereas the old code didn't do that. If I were the
bot's author I wouldn't consider this commit a particularly good example of
the bot's capability...

~~~
devoply
The fixes as far as I can tell are pretty rudimentary, like if something is
null and someone is trying to do something with it put an check for null
around it. I would imagine if your used something like this consistently you
code would become very much like a biological system -- a hack here a hack
there... but hey it works.

------
arayh
I wonder if the Repairnator is in charge of writing its own commit comments
(which I think is technically possible).

The simple NullPointerException fixes don't look very impressive, although
understandably still quite awesome for a bot.

On the other hand, its commit on the eclipse/ditto repo was pretty
interesting:
[https://github.com/eclipse/ditto/pull/151/commits/7ab96e373e...](https://github.com/eclipse/ditto/pull/151/commits/7ab96e373ecc55e1b942bfff4c9550c8ba5e584d)
I'm quite surprised how it determined the usage of a function it did not
write.

------
jboggan
I spent last year attempting something very similar in Python (www.duckly.com
- unlaunched) and am very impressed. It's an extremely difficult problem and
the CI data angle is inspired.

------
CGamesPlay
How does the actual "repairing" part work? Looks like it relies on a few
external libraries and also includes custom code for dealing with
NullPointerExceptions (which seem to be what was showcased here)

\- [https://github.com/Spirals-
Team/repairnator/tree/master/repa...](https://github.com/Spirals-
Team/repairnator/tree/master/repairnator/repairnator-
pipeline/src/main/java/fr/inria/spirals/repairnator/process/step/repair)

\- [https://github.com/SpoonLabs/nopol](https://github.com/SpoonLabs/nopol)

\- [https://github.com/SpoonLabs/astor](https://github.com/SpoonLabs/astor)

------
chillacy
Interesting idea, though the examples given were mainly fixing Null Pointer
Exceptions, which can be somewhat solved with static analysis in languages
without nullability.

------
dang
Url changed from
[https://www.theregister.co.uk/2018/10/17/luc_escape_bug_fixe...](https://www.theregister.co.uk/2018/10/17/luc_escape_bug_fixer/),
which points to this.

