{"id":{"repo_id":"alberta","oai_identifier":"oai:ualberta.scholaris.ca:123456789/92331"},"canonical_url":"https://search.ndltd.org/etd/alberta/oai:ualberta.scholaris.ca:123456789/92331","repository":{"repo_id":"alberta","name":"University of Alberta","base_url":"https://era.library.ualberta.ca/oai"},"display":{"title":"A Human-in-the-loop Approach to Generate Annotation Usage Rules","abstract":"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.","abstract_html":"Frameworks and libraries provide functionality through Application Programming Interfaces (APIs). Developers might misuse these APIs because the library&#x27;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&#x27;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.","abstract_has_math":false,"creators":["Gulami, Mansur"],"institution":"University of Alberta","degree_name":"Master of Science","degree_level":"Master's","degree_discipline":null,"degree_department":null,"school":null,"contributors":[],"advisors":["Nadi, Sarah (Computing Science)"],"committee_chairs":[],"committee_members":[],"year":2022,"date_issued":"2022-11","date_published":"2022-11","updated_at":"2026-11-26T21:54:47Z","subjects":["Pattern mining","Specification writing","API Misuse"],"languages":["en"],"rights":["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."],"rights_urls":[],"identifier_entries":[],"person_identifier_entries":[]},"links":{"outbound_url":"https://doi.org/10.7939/r3-jpjh-nz90","outbound_label":"DOI","outbound_source":"dc:identifier.doi","record_url":"https://doi.org/10.7939/r3-jpjh-nz90","record_label":"Repository record","record_kind":"doi","record_source":"dc:identifier.doi","access_status":null,"embargo_until":null,"access_note":null},"oai_pmh_record":{"url":"https://union.ndltd.org/oai-pmh/?verb=GetRecord&metadataPrefix=oai_dc&identifier=oai%3Aunion.ndltd.org%3Arepo%3Aalberta%3Aoai%3Aualberta.scholaris.ca%3A123456789%2F92331","prefix":"oai_dc"},"source_record":{"url":"https://era.library.ualberta.ca/oai?verb=GetRecord&metadataPrefix=dim&identifier=oai%3Aualberta.scholaris.ca%3A123456789%2F92331","prefix":"dim"},"metadata_groups":[{"id":"people","label":"People","entries":[{"key":"dc:contributor.advisor","label":"Advisor","values":["Nadi, Sarah (Computing Science)"]},{"key":"dc:creator","label":"Author","values":["Gulami, Mansur"]}]},{"id":"academic_context","label":"Academic Context","entries":[{"key":"dc:date.accessioned","label":"Dc Date Accessioned","values":["2025-05-29T09:59:37Z"]},{"key":"dc:date.available","label":"Dc Date Available","values":["2025-05-29T09:59:37Z"]},{"key":"dc:date.issued","label":"Date","values":["2022-11"]},{"key":"dc:type","label":"Dc Type","values":["Thesis"]},{"key":"thesis:degree_level","label":"Degree Level","values":["Master's"]},{"key":"thesis:degree_name","label":"Degree Name","values":["Master of Science"]},{"key":"thesis:institution_name","label":"Thesis Institution Name","values":["University of Alberta"]}]},{"id":"subjects_keywords","label":"Subjects and Keywords","entries":[{"key":"dc:subject","label":"Dc Subject","values":["Pattern mining","Specification writing","API Misuse"]}]},{"id":"language_rights","label":"Language and Rights","entries":[{"key":"dc:language.iso","label":"Language (ISO)","values":["en"]},{"key":"dc:rights","label":"Dc Rights","values":["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."]}]},{"id":"identifiers","label":"Identifiers","entries":[{"key":"dc:identifier.doi","label":"DOI","values":["https://doi.org/10.7939/r3-jpjh-nz90"]}]},{"id":"additional","label":"Additional Metadata","entries":[{"key":"dc:description.abstract","label":"Abstract","values":["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."]},{"key":"dc:title","label":"Title","values":["A Human-in-the-loop Approach to Generate Annotation Usage Rules"]},{"key":"others:access_status","label":"Others Access Status","values":["open.access"]}]}],"canonical_facts":{"dc:contributor.advisor":["Nadi, Sarah (Computing Science)"],"dc:creator":["Gulami, Mansur"],"dc:date.accessioned":["2025-05-29T09:59:37Z"],"dc:date.available":["2025-05-29T09:59:37Z"],"dc:date.issued":["2022-11"],"dc:description.abstract":["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."],"dc:identifier.doi":["https://doi.org/10.7939/r3-jpjh-nz90"],"dc:language.iso":["en"],"dc:rights":["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."],"dc:subject":["Pattern mining","Specification writing","API Misuse"],"dc:title":["A Human-in-the-loop Approach to Generate Annotation Usage Rules"],"dc:type":["Thesis"],"others:access_status":["open.access"],"thesis:degree_level":["Master's"],"thesis:degree_name":["Master of Science"],"thesis:institution_name":["University of Alberta"]},"updated_at":"2026-11-26T21:54:47Z"}