Type Conversion Sequence Recommendation Based on Semantic Web Technology

As the software systems are becoming more and more complicated, developers have an increasing dependency on code recommendation tools to assist them to fulfill their development tasks. However, the current historical-code-based recommendation methods are directly affected by the quality of the historical codes and the program-environment-information-based recommendation methods cannot provide satisfactory recommendation results for static methods because it is difficult to know all possible static members only using the program context, and even if we know all the static members, we still cannot add all of them to the entry point for search because its large number may cause a space explosion. In this paper, we propose a type conversion sequence recommendation method based on program environment information. Combing with the reachability analysis using semantic Web technology, the proposed method tries to reduce the searching entry points to solve the space explosion problem caused by the recommendation of static methods. We implemented an Eclipse plug-in based on the proposed method and conducted experiments on Tomcat source code. The experimental results showed that the proposed method can not only recommend type conversion sequences with static methods effectively, but also has a higher accuracy for the recommendation of object methods compared with the Eclipse Code Recommenders.

[1]  Gail C. Murphy,et al.  Using structural context to recommend source code examples , 2005, Proceedings. 27th International Conference on Software Engineering, 2005. ICSE 2005..

[2]  Kai Chen,et al.  Mining succinct and high-coverage API usage patterns from source code , 2013, 2013 10th Working Conference on Mining Software Repositories (MSR).

[3]  Collin McMillan,et al.  Portfolio: Searching for relevant functions and their usages in millions of lines of code , 2013, TSEM.

[4]  Gerald Reif,et al.  SEON: a pyramid of ontologies for software evolution and its applications , 2012, Computing.

[5]  Tao Xie,et al.  Parseweb: a programmer assistant for reusing open source code on the web , 2007, ASE.

[6]  R. Holmes,et al.  Using structural context to recommend source code examples , 2005, Proceedings. 27th International Conference on Software Engineering, 2005. ICSE 2005..

[7]  H. Lan,et al.  SWRL : A semantic Web rule language combining OWL and ruleML , 2004 .

[8]  Sumit Gulwani,et al.  Type-directed completion of partial expressions , 2012, PLDI.

[9]  Ruzica Piskac,et al.  Complete completion using types and weights , 2013, PLDI.

[10]  Iman Keivanloo,et al.  Internet-scale Real-time Code Clone Search Via Multi-level Indexing , 2011, 2011 18th Working Conference on Reverse Engineering.

[11]  Jian Pei,et al.  MAPO: mining API usages from open source repositories , 2006, MSR '06.

[12]  Tim Frey Hypermodelling: next level software engineering with data warehouses , 2013 .