Usage
  • 87 views
  • 192 downloads

A Human-in-the-loop Approach to Generate Annotation Usage Rules

  • Author / Creator
    Gulami, Mansur
  • Frameworks and libraries provide functionality through Application Programming Interfaces (APIs). Developers might misuse these APIs because the library's usage rules are often implicit, undocumented, or not readily available in the form of checkable rules. At the same time, manually writing usage rules for each API is time-consuming. Therefore, researchers have proposed various techniques to automatically mine API usage rules. However, mined rules are not always accurate, resulting in false positives when used for misuse detection.

    To overcome these trade-offs, in this thesis, we combine rule mining and manual rule authoring approaches by creating a human-in-the-loop API usage rule generation pipeline.
    Based on our industrial collaborator's needs, our work focuses on generating annotation-based API usage rules for MicroProfile, a framework designed for building microservices using Enterprise Java. We use an existing frequent itemset-based pattern-mining technique to mine MicroProfile annotation usage rules. We contribute a GUI-based rule validation tool (RVT) that represents rules in an easy-to-read English-like syntax and allows experts to browse through the mined rules to validate (accept, edit, discard) them. Our pipeline then automatically generates checkable API usage rules from the confirmed rules, which can then be used to detect misuses or to enhance documentation.

    We verify the correctness of the automatically generated static analysis checks by evaluating our misuse detector against 517 projects. Our results show that our misuse detector can find misuses with 100% recall and 84% precision.

    To assess the usefulness of having mined rules as a starting point for rule authoring and to assess the usability of RVT in validating rules, we perform a user study with four MicroProfile API experts where they validate 18 mined rules. The results show that the API experts find having starting points useful when it comes to rule authoring. Additionally, the experts unanimously agree on the usefulness of having a dedicated tool for authoring rules.

  • Subjects / Keywords
  • Graduation date
    Fall 2022
  • Type of Item
    Thesis
  • Degree
    Master of Science
  • DOI
    https://doi.org/10.7939/r3-jpjh-nz90
  • License
    This thesis is made available by the University of Alberta Library with permission of the copyright owner solely for non-commercial purposes. This thesis, or any portion thereof, may not otherwise be copied or reproduced without the written consent of the copyright owner, except to the extent permitted by Canadian copyright law.