Evaluating Strategies of Sorting,      Filtering, and Grouping API Methods              for Code Completion               ...
Evaluating Strategies of Sorting,      Filtering, and Grouping API Methods              for Code Completion               ...
Information Overloading                   • Large APIs                          ex: JDK 1.6, 3,777 classes and interfaces ...
Evaluating Strategies of Sorting,      Filtering, and Grouping API Methods              for Code Completion               ...
Code Completion as Antidote                          current                   • In Eclipse, completion proposals sorted  ...
Evaluating Strategies of Sorting,      Filtering, and Grouping API Methods              for Code Completion               ...
Code Completion as Antidote                     new - 2 ways of sorting                   • type-based sorting            ...
Code Completion as Antidote                     new - 2 ways of sorting                   • use count-based sorting       ...
Code Completion as Antidote                         new - filtering                   1. public, non-API methods           ...
Code Completion as Antidote                        new - grouping                   • Display logically related methods to...
Evaluating Strategies of Sorting,      Filtering, and Grouping API Methods              for Code Completion               ...
Evaluation Methodology                   •      Compare 14 configurations with Eclipse’s by-                          relev...
Evaluation Result 1: Rank Reduction                      7 configurations ordered by rank reduction!                      B...
Evaluation Result 2: Primer      7/9 dynamic primers worse than regular dynamic ranking!           adjusted primers mixed ...
Evaluation Result 3: Structuring                   •      Two mechanisms: grouping and static primers.                   •...
Design Recommendations                   •      Regular dynamic ranking and adjusted primers for                          ...
Conclusion and future work                   •      Implemented Code Completion strategies for                          mo...
Upcoming SlideShare
Loading in...5
×

Program Comprehension - An Evaluation of the Strategies of Sorting, Filtering, and Grouping API Methods for Code Completion

748

Published on

Paper: An Evaluation of the Strategies of Sorting, Filtering, and Grouping API Methods for Code Completion

Authors: Daqing Hou and Dave Pletcher

Session: Research Track Session 8 -Program Comprehension

Published in: Technology, Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
748
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
6
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Program Comprehension - An Evaluation of the Strategies of Sorting, Filtering, and Grouping API Methods for Code Completion

  1. 1. Evaluating Strategies of Sorting, Filtering, and Grouping API Methods for Code Completion Daqing Hou, David M. Pletcher Clarkson University, Potsdam NY 1Wednesday, September 28, 2011 1
  2. 2. Evaluating Strategies of Sorting, Filtering, and Grouping API Methods for Code Completion 2Wednesday, September 28, 2011 2
  3. 3. Information Overloading • Large APIs ex: JDK 1.6, 3,777 classes and interfaces • Learning barriers [Ko et al. 2004] - design - selection - coordination & use - information & understand 3Wednesday, September 28, 2011 3
  4. 4. Evaluating Strategies of Sorting, Filtering, and Grouping API Methods for Code Completion 4Wednesday, September 28, 2011 4
  5. 5. Code Completion as Antidote current • In Eclipse, completion proposals sorted alphabetically or by-relevance. 5Wednesday, September 28, 2011 5
  6. 6. Evaluating Strategies of Sorting, Filtering, and Grouping API Methods for Code Completion BCC: Better Code Completion 6Wednesday, September 28, 2011 6
  7. 7. Code Completion as Antidote new - 2 ways of sorting • type-based sorting 7Wednesday, September 28, 2011 7
  8. 8. Code Completion as Antidote new - 2 ways of sorting • use count-based sorting 8Wednesday, September 28, 2011 8
  9. 9. Code Completion as Antidote new - filtering 1. public, non-API methods ex: javax.swing.JComponent.updateUI() 2. Visible only for limited receiver types ex: JPanel.add(), but not JButton.add() 3. Visible in subclass only ex: java.awt.Component.paint() 9Wednesday, September 28, 2011 9
  10. 10. Code Completion as Antidote new - grouping • Display logically related methods together ex: add()/getComponent()/remove() for a Container • Filtering and grouping rules for each API need to be specified only once. 10Wednesday, September 28, 2011 10
  11. 11. Evaluating Strategies of Sorting, Filtering, and Grouping API Methods for Code Completion 11Wednesday, September 28, 2011 11
  12. 12. Evaluation Methodology • Compare 14 configurations with Eclipse’s by- relevance as baseline in terms of rank reduction. - rank reduction (7) - primer (2) - structuring (5) • 9 open-source projects • Metric - rank for an API method - project-wide rank 12Wednesday, September 28, 2011 12
  13. 13. Evaluation Result 1: Rank Reduction 7 configurations ordered by rank reduction! Best: regular dynamic ranking! 13Wednesday, September 28, 2011 13
  14. 14. Evaluation Result 2: Primer 7/9 dynamic primers worse than regular dynamic ranking! adjusted primers mixed results! 14Wednesday, September 28, 2011 14
  15. 15. Evaluation Result 3: Structuring • Two mechanisms: grouping and static primers. • Regular dynamic ranking+grouping is the best configuration for grouping. • 8/9 static primers are better than type+filtering. • Static primers worse than regular dynamic ranking +grouping, but can still be useful. 15Wednesday, September 28, 2011 15
  16. 16. Design Recommendations • Regular dynamic ranking and adjusted primers for rank reduction. • Regular dynamic ranking+grouping for additional benefit of API learning. • Static primers worse than regular dynamic ranking +grouping, but can still be useful. • Provide multiple options for developers choose from. 16Wednesday, September 28, 2011 16
  17. 17. Conclusion and future work • Implemented Code Completion strategies for moving forward needed API methods, hiding non- API public methods, and grouping API methods according to their semantic relatedness. • Evaluated 14 configurations of these strategies on 9 projects that use AWT/Swing. • Gave design recommendations. • Future work includes user studies for features such as grouping, and ways to make primers work. • Contact me for BCC source code. 17Wednesday, September 28, 2011 17
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×