4 ms·
Evidently, THEY are calling the following API misuses: "To evaluate the API usage correctness in code, RO- BUSTAPI detects the API misuses against the API usag
by dventimi 3y ago
Evidently, THEY are calling the following API misuses:
"To evaluate the API usage correctness in code, RO-
BUSTAPI detects the API misuses against the API usage
rules by extracting call consequences and control structures
from the code snippet, as shown in Figure 2. The code
checker firstly check the code snippets to see whether it is
a snippet of a method or a method of a class, so that it can
enclose this code snippet and constructs abstract syntax tree
(AST) from the code snippet. Then the checker traverses the
AST to record all the method calls and control structures
in order, which generate a call sequence. Next, the checker
compare the call sequence against the API usage rules. It
infers the instance type of each method calls and use the
type and method as keys to retrieve corresponding API us-
age rules. Finally, the checker computes the longest common
sequence between the call sequence and the API usage rules.
If the call sequence does not match the expected API usage
rules, the checker will report API misuses."