CriticAL: A critic for APIs and libraries

It is well-known that APIs can be hard to learn and use. Although search tools can help find related code examples, API novices still face other significant challenges such as evaluating the relevance of the search results. To help address the broad problems of finding, understanding, and debugging API-based solutions, we have built a critic system that offers recommendations, explanations, and criticisms for API client code. Our critic takes API usage rules as input, performs symbolic execution to check that the client code has followed these rules properly, and generates advice as output to help improve the client code. We demonstrate our critic by applying it to a real-world example derived from the Java Swing Forum.

[1]  Martin P. Robillard,et al.  A field study of API learning obstacles , 2011, Empirical Software Engineering.

[2]  Daqing Hou,et al.  Evaluating forum discussions to inform the design of an API critic , 2012, 2012 20th IEEE International Conference on Program Comprehension (ICPC).

[3]  James C. King,et al.  Symbolic execution and program testing , 1976, CACM.

[4]  Lin Li,et al.  Obstacles in Using Frameworks and APIs: An Exploratory Study of Programmers' Newsgroup Discussions , 2011, 2011 IEEE 19th International Conference on Program Comprehension.

[5]  Thomas W. Mastaglio,et al.  Using critics to empower users , 1990, CHI '90.

[6]  Brad A. Myers,et al.  Debugging reinvented , 2008, 2008 ACM/IEEE 30th International Conference on Software Engineering.

[7]  Scott R. Klemmer,et al.  Example-centric programming: integrating web search into the development environment , 2010, CHI.