TY - GEN
T1 - Mining API error-handling specifications from source code
AU - Acharya, Mithun
AU - Xie, Tao
N1 - Funding Information:
1 This work is supported in part by ARO grant W911NF-08-1-0443.
PY - 2009
Y1 - 2009
N2 - API error-handling specifications are often not documented, necessitating automated specification mining. Automated mining of error-handling specifications is challenging for procedural languages such as C, which lack explicit exception-handling mechanisms. Due to the lack of explicit exception handling, error-handling code is often scattered across different procedures and files making it difficult to mine error-handling specifications through manual inspection of source code. In this paper, we present a novel framework for mining API error-handling specifications automatically from API client code, without any user input. In our framework, we adapt a trace generation technique to distinguish and generate static traces representing different API run-time behaviors. We apply data mining techniques on the static traces to mine specifications that define correct handling of API errors. We then use the mined specifications to detect API error-handling violations. Our framework mines 62 error-handling specifications and detects 264 real error-handling defects from the analyzed open source packages.
AB - API error-handling specifications are often not documented, necessitating automated specification mining. Automated mining of error-handling specifications is challenging for procedural languages such as C, which lack explicit exception-handling mechanisms. Due to the lack of explicit exception handling, error-handling code is often scattered across different procedures and files making it difficult to mine error-handling specifications through manual inspection of source code. In this paper, we present a novel framework for mining API error-handling specifications automatically from API client code, without any user input. In our framework, we adapt a trace generation technique to distinguish and generate static traces representing different API run-time behaviors. We apply data mining techniques on the static traces to mine specifications that define correct handling of API errors. We then use the mined specifications to detect API error-handling violations. Our framework mines 62 error-handling specifications and detects 264 real error-handling defects from the analyzed open source packages.
UR - http://www.scopus.com/inward/record.url?scp=67650126144&partnerID=8YFLogxK
UR - http://www.scopus.com/inward/citedby.url?scp=67650126144&partnerID=8YFLogxK
U2 - 10.1007/978-3-642-00593-0_25
DO - 10.1007/978-3-642-00593-0_25
M3 - Conference contribution
AN - SCOPUS:67650126144
SN - 9783642005923
T3 - Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)
SP - 370
EP - 384
BT - Fundamental Approaches to Software Engineering - 12th International Conference, FASE 2009, Held as Part of the Joint European Conferences on Theory and Practice of Software, ETAPS 2009, Proceedings.
T2 - 12th International Conference on Fundamental Approaches to Software Engineering, FASE 2009
Y2 - 22 March 2009 through 29 March 2009
ER -