“…The outputs of the prototype are the generated FOL expressions in the SMT-LIB 2.0 standard 6 . These expressions are then fed into the SMT solver Z3.…”
Section: Methodsmentioning
confidence: 99%
“…We mainly consider four cases of parameter usage constraints, based on [6]. They are nullness not allowed, nullness allowed, range limitation, and type restriction.…”
Section: Approachmentioning
confidence: 99%
“…They consist of exceptions (m, P, t, c) where some comparison operators exist in condition c, except that it is compared with null, in which case, (m, P, t, c) will not be included. Note that we do not have a category "nullness allowed", as the related constraints cannot be fully handled by the exception conditions; for them we utilize the technique proposed in [6] and described in Step 5 below.…”
Section: A Extract Constraints From Api Source Codementioning
confidence: 99%
“…For such constraints, there are no exceptions thrown. In this case, we use the control flow analysis technique similar to the one proposed in [6]. We mainly examine the parameter related conditional branches.…”
Section: A Extract Constraints From Api Source Codementioning
confidence: 99%
“…1 As JDK's documentation is generally considered to be of high quality, it might not be difficult to be convinced that documents of other projects suffer from similar (or even worse) issues. Some initial research has been done, for instance, Saied et al enumerated categories of common API usage constraints and their documentation [6]. Undoubtedly, high-quality documentation is indispensable for the usability of APIs [7], [8], and we believe that a complete and correct documentation would be highly favourable by API users.…”
Section: Introduction Api (Application Programmingmentioning
Abstract-Application Programming Interface (API) documents represent one of the most important references for API users. However, it is frequently reported that the documentation is inconsistent with the source code and deviates from the API itself. Such inconsistencies in the documents inevitably confuse the API users hampering considerably their API comprehension and the quality of software built from such APIs. In this paper, we propose an automated approach to detect defects of API documents by leveraging techniques from program comprehension and natural language processing. Particularly, we focus on the directives of the API documents which are related to parameter constraints and exception throwing declarations. A first-order logic based constraint solver is employed to detect such defects based on the obtained analysis results. We evaluate our approach on parts of well documented JDK 1.8 APIs. Experiment results show that, out of around 2000 API usage constraints, our approach can detect 1146 defective document directives, with a precision rate of 81.6%, and a recall rate of 82.0%, which demonstrates its practical feasibility.
“…The outputs of the prototype are the generated FOL expressions in the SMT-LIB 2.0 standard 6 . These expressions are then fed into the SMT solver Z3.…”
Section: Methodsmentioning
confidence: 99%
“…We mainly consider four cases of parameter usage constraints, based on [6]. They are nullness not allowed, nullness allowed, range limitation, and type restriction.…”
Section: Approachmentioning
confidence: 99%
“…They consist of exceptions (m, P, t, c) where some comparison operators exist in condition c, except that it is compared with null, in which case, (m, P, t, c) will not be included. Note that we do not have a category "nullness allowed", as the related constraints cannot be fully handled by the exception conditions; for them we utilize the technique proposed in [6] and described in Step 5 below.…”
Section: A Extract Constraints From Api Source Codementioning
confidence: 99%
“…For such constraints, there are no exceptions thrown. In this case, we use the control flow analysis technique similar to the one proposed in [6]. We mainly examine the parameter related conditional branches.…”
Section: A Extract Constraints From Api Source Codementioning
confidence: 99%
“…1 As JDK's documentation is generally considered to be of high quality, it might not be difficult to be convinced that documents of other projects suffer from similar (or even worse) issues. Some initial research has been done, for instance, Saied et al enumerated categories of common API usage constraints and their documentation [6]. Undoubtedly, high-quality documentation is indispensable for the usability of APIs [7], [8], and we believe that a complete and correct documentation would be highly favourable by API users.…”
Section: Introduction Api (Application Programmingmentioning
Abstract-Application Programming Interface (API) documents represent one of the most important references for API users. However, it is frequently reported that the documentation is inconsistent with the source code and deviates from the API itself. Such inconsistencies in the documents inevitably confuse the API users hampering considerably their API comprehension and the quality of software built from such APIs. In this paper, we propose an automated approach to detect defects of API documents by leveraging techniques from program comprehension and natural language processing. Particularly, we focus on the directives of the API documents which are related to parameter constraints and exception throwing declarations. A first-order logic based constraint solver is employed to detect such defects based on the obtained analysis results. We evaluate our approach on parts of well documented JDK 1.8 APIs. Experiment results show that, out of around 2000 API usage constraints, our approach can detect 1146 defective document directives, with a precision rate of 81.6%, and a recall rate of 82.0%, which demonstrates its practical feasibility.
scite is a Brooklyn-based organization that helps researchers better discover and understand research articles through Smart Citations–citations that display the context of the citation and describe whether the article provides supporting or contrasting evidence. scite is used by students and researchers from around the world and is funded in part by the National Science Foundation and the National Institute on Drug Abuse of the National Institutes of Health.