ArCode: Facilitating the Use of Application Frameworks to Implement Tactics and Patterns

ArCode: Facilitating the Use of Application Frameworks to Implement Tactics and Patterns
复制标题

DOI:
10.1109/icsa51549.2021.00021
复制
发表时间:
2021-02
期刊:
2021 IEEE 18th International Conference on Software Architecture (ICSA)
影响因子:
--
通讯作者:
A. Shokri;Joanna C. S. Santos;Mehdi Mirakhorli
A. Shokri;Joanna C. S. Santos;Mehdi Mirakhorli
中科院分区:
其他
文献类型:
--
作者:
A. Shokri;Joanna C. S. Santos;Mehdi Mirakhorli

文献摘要

相似文献

软件设计人员和开发人员越来越依赖应用程序框架作为一流的设计概念。它们实例化框架提供的服务来实现各种架构策略和模式。使用框架来完成此类任务的挑战之一是学习和正确使用框架的 API 的难度。本文介绍了一种名为 ARCODE 的基于学习的方法,以帮助新手程序员正确使用框架的 API 来实现架构策略和模式。 ARCODE 有几个新颖的组件:一种基于图形的方法,用于从有限数量的训练软件中学习框架规范;一种程序分析算法,用于消除错误的训练数据;以及一个推荐模块,帮助程序员正确使用 API 并识别程序中的 API 误用。我们跨两个流行的框架评估了我们的技术:用于身份验证和授权策略的 JAAS 安全框架和用于启用客户端和服务器之间的远程方法调用以及其他面向对象模式的 Java RMI 框架。我们的结果证明了(i)使用 ARCODE 来学习框架规范的可行性; (ii) ARCODE 生成准确的建议,以找到下一个 API 调用,以根据程序员代码的上下文实现架构策略/模式; (iii) 它准确地检测实现策略/模式的代码中的 API 滥用并提供修复建议。我们还证明了 ArCode 在 API 推荐和误用检测任务上优于两种著名的技术 MAPO 和 GrouMiner。
Software designers and developers are increasingly relying on application frameworks as first-class design concepts. They instantiate the services that frameworks provide to implement various architectural tactics and patterns. One of the challenges in employing frameworks for such tasks is the difficulty of learning and correctly using the APIs of the frameworks. This paper introduces a learning-based approach called ARCODE to help novice programmers correctly use frameworks’ APIs to implement architectural tactics and patterns. ARCODE has several novel components: a graph-based approach for learning specification of a framework from a limited number of training software, a program analysis algorithm to eliminate erroneous training data, and a recommender module to help programmers use APIs correctly and identify API misuses in their program. We evaluated our technique across two popular frameworks: JAAS security framework used for authentication and authorization tactic and Java RMI framework used to enable remote method invocation between client and server and other object oriented patterns. Our results demonstrate (i) the feasibility of using ARCODE to learn the specification of a framework; (ii) ARCODE generates accurate recommendations for finding the next API call to implement an architectural tactic/pattern based on the context of the programmer’s code; (iii) it accurately detects API misuses in the code that implements a tactic/pattern and provides fix recommendations. We also demonstrate that ArCode outperforms two famous techniques, MAPO and GrouMiner, on API recommendation and misuse detection tasks.