研究R语言中的脆弱代码实体
Studying Vulnerable Code Entities in R
AI总结:
本研究通过黑盒攻击模型CodeAttack分析R语言代码实体脆弱性,发现标识符最易受攻击,为R语言代码摘要模型开发提供依据。
摘要:
预训练代码语言模型(Code-PLMs)在过去几年中展现了许多进步,并在许多软件工程任务上取得了最先进的结果。这些模型主要针对Java和Python等流行编程语言,而忽略了像R这样的其他语言。尽管R拥有广泛的开发者和用户社区,但关于Code-PLMs在R语言中的适用性却鲜为人知。在这项初步研究中,我们旨在调查Code-PLMs对R语言中代码实体的脆弱性。为此,我们使用了一个R语言的代码和注释对数据集,然后应用CodeAttack——一种利用代码结构生成对抗性代码样本的黑盒攻击模型。我们研究了该模型如何攻击R语言中的不同实体。这是理解R语言标记类型相对于流行编程语言(如Java)重要性的第一步。我们将研究范围限制在代码摘要任务上。我们的结果表明,最脆弱的代码实体是标识符,其次是R语言特有的一些语法标记。这些结果可以揭示标记类型的重要性,并有助于为R语言开发代码摘要和方法名预测模型。
英文摘要:
Pre-trained Code Language Models (Code-PLMs) have shown many advancements and achieved state-of-the-art results for many software engineering tasks in the past few years. These models are mainly targeted for popular programming languages such as Java and Python, leaving out many other ones like R. Though R has a wide community of developers and users, there is little known about the applicability of Code-PLMs for R. In this preliminary study, we aim to investigate the vulnerability of Code-PLMs for code entities in R. For this purpose, we use an R dataset of code and comment pairs and then apply CodeAttack, a black-box attack model that uses the structure of code to generate adversarial code samples. We investigate how the model can attack different entities in R. This is the first step towards understanding the importance of R token types, compared to popular programming languages (e.g., Java). We limit our study to code summarization. Our results show that the most vulnerable code entity is the identifier, followed by some syntax tokens specific to R. The results can shed light on the importance of token types and help in developing models for code summarization and method name prediction for the R language.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。