translating code comments to procedure specifications
play

Translating Code Comments to Procedure Specifications Arianna Blasi - PowerPoint PPT Presentation

Translating Code Comments to Procedure Specifications Arianna Blasi Alberto Goffi Konstantin Kuznetsov Alessandra Gorla Michael D. Ernst Mauro Pezz Sergio Delgado USI Universit della Svizzera


  1. Pattern and syntax match are not enough Return true if the list is empty contains no element has no content Candidate Distance myList isEmpty iterator size …

  2. Pattern and syntax match are not enough Return true if the list is empty contains no element has no content Candidate Distance myList isEmpty iterator size …

  3. Pattern and syntax match are not enough Return true if the list is empty contains no element has no content Candidate Distance myList isEmpty iterator size … @tComment Toradocu ALICS

  4. Analyzing complex comments /** * Checks if there is a credible threatening unit to * this unit within a range of moves. * * @param moves list of moves * @return True if a threat was found. */ public boolean isInDanger( List<Object> moves )

  5. Analyzing complex comments /** * Checks if there is a credible threatening unit to * this unit within a range of moves. * * @param moves list of moves * @return True if a threat was found. */ public boolean isInDanger( List<Object> moves )

  6. Analyzing complex comments /** * Checks if there is a credible threatening unit to * this unit within a range of moves. * * @param moves list of moves * @return True if a threat was found. */ public boolean isInDanger( List<Object> moves ) searchForDanger( List<Object> )

  7. threat was found search for danger

  8. threat was found search for danger

  9. “search” is not displayed as a result

  10. We need more than semantic equivalence “search” is not displayed as a result

  11. Word embedding Word embedded in vector space: GloVe, Word2Vec man woman king queen

  12. Word embedding Word embedded in vector space: GloVe, Word2Vec threat found danger search

  13. Word embedding Word mover's distance (Matt J. Kusner et al., 2015) threat found danger search

  14. Word embedding Word mover's distance (Matt J. Kusner et al., 2015) threat found danger search

  15. Word Mover's distance Obama speaks in Illinois . In Chicago the president greets the press

  16. Word Mover's distance Obama speaks in Illinois . In Chicago the president greets the press

  17. Word Mover's distance Obama speaks in Illinois . In Chicago the president greets the press

  18. Word Mover's distance Obama speaks in Illinois . In Chicago the president greets the press

  19. Word Mover's distance Threat was found Search For Danger

  20. Word Mover's distance Threat was found Search For Danger

  21. Word Mover's distance Threat was found Search For Danger

  22. How accurate is Jdoctor?

  23. Experimental setup 6 Popular open-source Java systems

  24. Experimental setup 563 Analyzed Java methods

  25. Experimental setup 829 Manually-written Java conditions

  26. 92 % Precision

  27. 92 83 % % Precision Recall

  28. Exceptional Postconditions Precision Recall 100% 90% 80% 70% 60% 50% 40% 30% 20% 10% 0% @tComment Toradocu Jdoctor

  29. Preconditions Precision Recall 100% 90% 80% 70% 60% 50% 40% 30% 20% 10% 0% @tComment Toradocu Jdoctor

  30. Normal Postconditions Precision Recall 100% 90% 80% 70% 60% 50% 40% 30% 20% 10% 0% @tComment Toradocu Jdoctor

  31. Overall accuracy Precision Recall 100% 80% 60% 40% 20% 0% @tComment Toradocu Jdoctor

  32. How can you use Jdoctor?

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend