Description
One of the most frequent sources for bugs are violations of constraints
which the application programming interfaces (APIs) of software libraries impose.
To overcome this issue, multiple methods have been presented to assist developers in
adhering to the constraints of APIs. The area of usage pattern mining focuses on
techniques to automatically infer API constraints from source code. A limitation of
approaches in this area is that each of their implementations is bound to a singular
programming language. However, their techniques and internal representations of code
could also be applied to other programming languages.
Therefore, this thesis enables the extension of existing state-of-the-art tools for usage
pattern mining to make them language-independent. For this, the API usage graph (AUG) is
identified as a promising representation of code that is internally used by multiple of
these tools. To build AUGs language-independently, the approach is based on an existing
code analysis platform developed by the Fraunhofer Institute of Applied and Integrated Security.
The platform translates source code from different programming languages into a code property
graph, a language-independent representation of properties of code. The evaluation demonstrates
that the examined usage pattern miner achieves promising results with AUGs built by the
implementation of this thesis. Additionally, it is shown that AUGs can be constructed for
a variety of languages. Through the contributions of this thesis, future approaches
do not need to concern themselves with the details of programming languages and can
instead focus on improving the concepts and techniques of usage pattern mining.
|