Stories
Slash Boxes
Comments

SoylentNews is people

posted by martyb on Saturday December 22 2018, @12:32AM   Printer-friendly
from the Code-mangling dept.

It appears Facebook has a tool for automatically suggesting bug fixes.

  • Facebook has built a tool called Getafix that automatically finds fixes for bugs and offers them to engineers to approve. This allows engineers to work more effectively, and it promotes better overall code quality.
  • We believe Getafix is the first tool of its kind to be deployed to production at Facebook scale, contributing to the stability and performance of apps that billions of people use.
  • Getafix powers Sapfix, which suggests fixes for bugs that our Sapienz testing tool finds. Getafix also provides fixes for bugs found by Infer, our static testing tool.
  • Because Getafix learns from engineers’ past code fixes, its recommendations are intuitive for engineers to review.
  • Getafix improves upon previous auto-fix technology by using more powerful techniques for learning fix patterns from past code changes. Getafix uses a more powerful clustering algorithm and also analyzes the context around the particular lines of problematic code to find more appropriate fixes.

I wonder how easy it is to start accepting fixes without properly examining them. I wonder if the time saved in actually coding the fix is irrelevant compared with the time you would otherwise take to find the correct fix.

It will easily fix the obvious symptoms of a bug without addressing the real problem. The illusion of productivity.


Original Submission

 
This discussion has been archived. No new comments can be posted.
Display Options Threshold/Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • (Score: 3, Informative) by fennec on Saturday December 22 2018, @04:13PM (1 child)

    by fennec (7053) on Saturday December 22 2018, @04:13PM (#777552)

    After reading TFA it seems just limited to null pointers. Those should not even get into commit as most IDEs will warn you about those. Even if it gets committed, you should run some static code analyser like findbugs that easily gets those bugs. So the tool is just overrated to me.

    Starting Score:    1  point
    Moderation   +2  
       Informative=2, Total=2
    Extra 'Informative' Modifier   0  

    Total Score:   3  
  • (Score: 2) by pipedwho on Saturday December 22 2018, @11:02PM

    by pipedwho (2032) on Saturday December 22 2018, @11:02PM (#777684)

    It probably just is part of a static analyser. Rather than just reporting the problem, it suggests a fix based on some previous examples of how people fixed similar problems based on commit logs that fixed the same error.

    The stupid thing is, about half of those sort of errors are ultra simple to fix once the analyser finds them. So I guess this is just a typing saver for the obvious cases. If it sees the structure is not the obvious case it can bring up the error with 'no suggested fix'. It'll still need a programmer once over. And chances are this is happening either while you're working on the code yourself and it is flagging your own code, or at worst after a merge where someone has changed something in the init code somewhere and now you have to track down the issue.