Recommending Typical Usage Examples for Component Retrieval in Reuse Repositories

  • Authors:
  • Yan Li;Liangjie Zhang;Ge Li;Bing Xie;Jiasu Sun

  • Affiliations:
  • Software Institution, School of Electronics Engineering and Computer Science, Peking University, Beijing, P.R. China 100871 and Key Laboratory of High Confidence Software Technologies, Ministry of ...;Software Institution, School of Electronics Engineering and Computer Science, Peking University, Beijing, P.R. China 100871 and Key Laboratory of High Confidence Software Technologies, Ministry of ...;Software Institution, School of Electronics Engineering and Computer Science, Peking University, Beijing, P.R. China 100871 and Key Laboratory of High Confidence Software Technologies, Ministry of ...;Software Institution, School of Electronics Engineering and Computer Science, Peking University, Beijing, P.R. China 100871 and Key Laboratory of High Confidence Software Technologies, Ministry of ...;Software Institution, School of Electronics Engineering and Computer Science, Peking University, Beijing, P.R. China 100871 and Key Laboratory of High Confidence Software Technologies, Ministry of ...

  • Venue:
  • ICSR '08 Proceedings of the 10th international conference on Software Reuse: High Confidence Software Reuse in Large Systems
  • Year:
  • 2008

Quantified Score

Hi-index 0.00

Visualization

Abstract

Programmers tend to reuse existing components to reduce development cost as well as improve productivity. While retrieving components from the reuse repository, developers often need to know how the components are used in different ways in order to judge which one is more appropriate. An efficient way guiding developers to know how the components are utilized is by leveraging the example code. However, usually the examples provided in handbooks and online documents are not adequate enough. To address this problem, we propose an approach recommending typical usage examples to developers by leveraging source code acquired from the Internet. For each component developers want to utilize, our method first retrieves relevant code downloaded from the Internet as candidate examples. The candidate examples are then clustered and we choose a typical one from each cluster. Finally, the selected ones are ranked and returned to the developers. We implemented our method with a prototype system and conducted an experimental study to evaluate its effectiveness. The experimental results demonstrate that our approach can provide examples to help developers know different usages of the component and thus has the potential to assist developers in reuse.