Machine Learning for Source Code (ML4Code) is an active research field in which extensive experimentation is needed to discover how to best use source code's richly structured information. With this in mind, we introduce JEMMA, an Extensible Java Dataset for ML4Code Applications, which is a large-scale, diverse, and high-quality dataset targeted at ML4Code. Our goal with JEMMA is to lower the barrier to entry in ML4Code by providing the building blocks to experiment with source code models and tasks. JEMMA comes with a considerable amount of pre-processed information such as metadata, representations (e.g., code tokens, ASTs, graphs), and several properties (e.g., metrics, static analysis results) for 50,000 Java projects from the 50KC dataset, with over 1.2 million classes and over 8 million methods. JEMMA is also extensible allowing users to add new properties and representations to the dataset, and evaluate tasks on them. Thus, JEMMA becomes a workbench that researchers can use to experiment with novel representations and tasks operating on source code. To demonstrate the utility of the dataset, we also report results from two empirical studies on our data, ultimately showing that significant work lies ahead in the design of context-aware source code models that can reason over a broader network of source code entities in a software project, the very task that JEMMA is designed to help with.
translated by 谷歌翻译
随着研究人员和从业人员将机器学习应用于越来越多的软件工程问题,他们使用的方法变得更加复杂。许多现代方法都以抽象语法树(AST)或其扩展形式使用内部代码结构:基于路径的表示,复杂的图将AST与其他边缘结合在一起。即使可以使用不同的解析器来从代码中提取AST的过程,但选择解析器对最终模型质量的影响仍然没有研究。此外,研究人员经常省略提取特定代码表示的确切细节。在这项工作中,我们在方法名称预测任务中评估了两个模型,即Code2Seq和Treelstm,由八个不同的解析器用于Java语言。为了将数据制备的过程与不同的解析器统一,我们开发了SuperParser,这是基于Pathminer的多语言解析器 - 不合Snostic库。 SuperParser促进了适用于培训和评估ML模型的数据集的端到端创建,这些模型与源代码中的结构信息合作。我们的结果表明,不同解析器建造的树木的结构和内容各不相同。然后,我们分析这种多样性如何影响模型的质量,并表明两种模型最不合适的解析器之间的质量差距非常重要。最后,我们讨论了解析器的其他功能,研究人员和从业人员在选择解析器时应考虑这些特征,以及对模型质量的影响。 SuperParser代码可在https://doi.org/10.5281/zenodo.6366591上公开获得。我们还发布了Java-Norm,即我们用于评估模型的数据集:https://doi.org/10.5281/zenodo.6366599。
translated by 谷歌翻译
评论是源代码的重要组成部分,是文档的主要来源。这引起了人们对使用大量注释的兴趣训练或评估消耗或生产它们的工具,例如生成甲骨文,甚至是从注释中生成代码,或自动生成代码摘要。这项工作大部分对评论的结构和质量做出了强烈的假设,例如假设它们主要由适当的英语句子组成。但是,我们对这些用例的现有评论的实际质量知之甚少。评论通常包含在其他类型的文本中看不到的独特结构和元素,并且从中过滤或提取信息需要额外的谨慎。本文探讨了来自GitHub的840个最受欢迎的开源项目和Srilab数据集的8422个项目的Python评论的内容和质量,并且Na \“ Ive vs.深入过滤的影响都可以使用现有注释来用于使用现有注释。培训和评估产生评论的系统。
translated by 谷歌翻译
软件工程(ML4SE)的机器学习是一个积极发展的研究领域,专注于帮助程序员工作的方法。为了在实践中应用开发的方法,他们需要实现合理的质量,以帮助而不是分散开发人员的注意力。尽管开发新方法来代码表示和数据收集可以提高模型的整体质量,但它没有考虑到我们可以从手头项目中获得的信息。在这项工作中,我们研究了如果我们针对特定项目,则如何提高模型的质量。我们开发一个框架来评估质量改进,模型可以在特定项目上的方法名称预测任务进行微调后获得。我们评估了三种不同复杂性的模型,并在三个设置中进行了比较它们的质量:在大型Java项目的大型数据集上进行培训,进一步对特定项目的数据进行了微调,并从头开始训练了此数据。我们表明,每项项目的微调可以极大地提高模型的质量,因为它们捕获了项目的领域和命名约定。我们开放用于数据收集的工具以及运行实验的代码:https://zenodo.org/record/6040745。
translated by 谷歌翻译
创新是经济和社会发展的主要驱动力,有关多种创新的信息嵌入了专利和专利申请的半结构化数据中。尽管在专利数据中表达的创新的影响和新颖性很难通过传统手段来衡量,但ML提供了一套有希望的技术来评估新颖性,汇总贡献和嵌入语义。在本文中,我们介绍了Harvard USPTO专利数据集(HUPD),该数据集是2004年至2004年之间提交给美国专利商业办公室(USPTO)的大型,结构化和多用途的英语专利专利申请。 2018年。HUPD拥有超过450万张专利文件,是可比的Coldia的两到三倍。与以前在NLP中提出的专利数据集不同,HUPD包含了专利申请的发明人提交的版本(不是授予专利的最终版本),其中允许我们在第一次使用NLP方法进行申请时研究专利性。它在包含丰富的结构化元数据以及专利申请文本的同时也很新颖:通过提供每个应用程序的元数据及其所有文本字段,数据集使研究人员能够执行一组新的NLP任务,以利用结构性协变量的变异。作为有关HUPD的研究类型的案例研究,我们向NLP社区(即专利决策的二元分类)介绍了一项新任务。我们还显示数据集中提供的结构化元数据使我们能够对此任务进行概念转移的明确研究。最后,我们演示了如何将HUPD用于三个其他任务:专利主题领域的多类分类,语言建模和摘要。
translated by 谷歌翻译
While pre-trained language models (LM) for code have achieved great success in code completion, they generate code conditioned only on the contents within the file, i.e., in-file context, but ignore the rich semantics in other files within the same project, i.e., cross-file context, a critical source of information that is especially useful in modern modular software development. Such overlooking constrains code language models' capacity in code completion, leading to unexpected behaviors such as generating hallucinated class member functions or function calls with unexpected arguments. In this work, we develop a cross-file context finder tool, CCFINDER, that effectively locates and retrieves the most relevant cross-file context. We propose CoCoMIC, a framework that incorporates cross-file context to learn the in-file and cross-file context jointly on top of pretrained code LMs. CoCoMIC successfully improves the existing code LM with a 19.30% relative increase in exact match and a 15.41% relative increase in identifier matching for code completion when the cross-file context is provided.
translated by 谷歌翻译
This paper presents the OPUS ecosystem with a focus on the development of open machine translation models and tools, and their integration into end-user applications, development platforms and professional workflows. We discuss our on-going mission of increasing language coverage and translation quality, and also describe on-going work on the development of modular translation models and speed-optimized compact solutions for real-time translation on regular desktops and small devices.
translated by 谷歌翻译
本次调查绘制了用于分析社交媒体数据的生成方法的研究状态的广泛的全景照片(Sota)。它填补了空白,因为现有的调查文章在其范围内或被约会。我们包括两个重要方面,目前正在挖掘和建模社交媒体的重要性:动态和网络。社会动态对于了解影响影响或疾病的传播,友谊的形成,友谊的形成等,另一方面,可以捕获各种复杂关系,提供额外的洞察力和识别否则将不会被注意的重要模式。
translated by 谷歌翻译
The problem of reversing the compilation process, decompilation, is an important tool in reverse engineering of computer software. Recently, researchers have proposed using techniques from neural machine translation to automate the process in decompilation. Although such techniques hold the promise of targeting a wider range of source and assembly languages, to date they have primarily targeted C code. In this paper we argue that existing neural decompilers have achieved higher accuracy at the cost of requiring language-specific domain knowledge such as tokenizers and parsers to build an abstract syntax tree (AST) for the source language, which increases the overhead of supporting new languages. We explore a different tradeoff that, to the extent possible, treats the assembly and source languages as plain text, and show that this allows us to build a decompiler that is easily retargetable to new languages. We evaluate our prototype decompiler, Beyond The C (BTC), on Go, Fortran, OCaml, and C, and examine the impact of parameters such as tokenization and training data selection on the quality of decompilation, finding that it achieves comparable decompilation results to prior work in neural decompilation with significantly less domain knowledge. We will release our training data, trained decompilation models, and code to help encourage future research into language-agnostic decompilation.
translated by 谷歌翻译
在本文中,我们解决了深入学习的软件漏洞自动修复问题。数据驱动漏洞修复的主要问题是已知确认漏洞的少数现有数据集仅由几千例组成。然而,培训深度学习模型通常需要数十万例的例子。在这项工作中,我们利用了错误修复任务和漏洞修复任务的直觉相关,并且可以传输来自错误修复的知识可以传输到修复漏洞。在机器学习界中,这种技术称为转移学习。在本文中,我们提出了一种修复名为Vreepair的安全漏洞的方法,该方法是基于转移学习。 vreepair首先在大型错误修复语料库上培训,然后在漏洞修复数据集上调整,这是一个较小的数量级。在我们的实验中,我们表明,仅在错误修复语料库上培训的模型可能已经修复了一些漏洞。然后,我们证明转移学习改善了修复易受攻击的C功能的能力。我们还表明,转移学习模型比具有去噪任务训练的模型更好,并在漏洞固定任务上进行微调。总而言之,本文表明,与在小型数据集上的学习相比,转移学习适用于修复C中的安全漏洞。
translated by 谷歌翻译
改善软件性能是软件开发周期中重要但充满挑战的部分。如今,大多数性能效率低下是由绩效专家确定和修补的。深度学习方法的最新进展和开源数据的广泛可用性为自动化绩效问题的识别和修补提供了一个绝佳的机会。在本文中,我们提出了Deepperf,这是一种基于变压器的方法,以建议针对C#应用程序进行性能改进。我们在英语和源代码语料库上预告了Deepperf,然后进行了Finetuning的任务,以生成C#应用程序的性能改进补丁。我们的评估表明,我们的模型可以在约53%的案例中生成与开发人员修复相同的性能改进建议,在我们专家验证的C#开发人员进行的绩效更改的数据集中,逐字化约34%。此外,我们使用基准测试和单元测试在GitHub上在50个开源C#存储库上评估Deepperf,并发现我们的模型能够提出有效的性能改进,以改善CPU使用和内存分配。到目前为止,我们已经提交了19个带有28种不同性能优化的拉装重新要求,其中11个PR已获得项目所有者的批准。
translated by 谷歌翻译
As the complexity of modern software continues to escalate, software engineering has become an increasingly daunting and error-prone endeavor. In recent years, the field of Neural Code Intelligence (NCI) has emerged as a promising solution, leveraging the power of deep learning techniques to tackle analytical tasks on source code with the goal of improving programming efficiency and minimizing human errors within the software industry. Pretrained language models have become a dominant force in NCI research, consistently delivering state-of-the-art results across a wide range of tasks, including code summarization, generation, and translation. In this paper, we present a comprehensive survey of the NCI domain, including a thorough review of pretraining techniques, tasks, datasets, and model architectures. We hope this paper will serve as a bridge between the natural language and programming language communities, offering insights for future research in this rapidly evolving field.
translated by 谷歌翻译
机器学习(ML)研究出版物通常在GitHub上提供开源实现,使他们的受众可以复制,验证甚至扩展机器学习算法,数据集和元数据。但是,到目前为止,关于此类ML研究存储库的协作活动程度知之甚少,特别是(1)此类存储库从叉子获得贡献的程度,(2)此类贡献的性质(即类型,变化),以及(3)变更的性质,这些变化未归还给叉子,这可能代表了错过的机会。在本文中,我们对1,346毫升研究存储库及其67,369叉进行了验证,无论是定量还是定性(通过Hindle等人的构建代码更改的开创性分类法)。我们发现,尽管ML研究存储库是大量分叉的,但只有9%的叉子对叉子存储库进行了修改。后者的42%发送给家长存储库的更改,其中一半(52%)被父家存储库接受。我们对539个贡献的定性分析和378个本地(仅叉)变化,扩展了Hindle等人的分类法,其中一个与ML(数据)相关的新顶级变更类别和15个新的子类别,包括9个ML--特定的(输入数据,输出数据,程序数据,共享,变更评估,参数调整,性能,预处理,模型培训)。虽然没有由叉子造成的更改主要是涉及域特定于域的定制和本地实验(例如,参数调整),但原点ML存储库确实错过了不可忽视的15.4%文档更改的13.6%的功能更改,而功能更改的13.6%和11.4%的错误修复更改。本文中的发现将对从业者,研究人员,工具匠和教育者有用。
translated by 谷歌翻译
在过去的几年中,世界已转向多核和多核共享内存体系结构。结果,通过将共享内存并行化方案引入软件应用程序,越来越需要利用这些体系结构。 OpenMP是实现此类方案的最全面的API,其特征是可读接口。然而,由于平行共享内存的管理中普遍存在的陷阱,将OpenMP引入代码很具有挑战性。为了促进此任务的性能,多年来创建了许多源代码(S2S)编译器,任务是将OpenMP指令自动插入代码。除了对输入格式的鲁棒性有限外,这些编译器仍然无法在定位可行的代码和生成适当指令时获得令人满意的覆盖范围和精确度。在这项工作中,我们建议利用ML技术的最新进展,特别是自然语言处理(NLP),以完全替换S2S编译器。我们创建一个数据库(语料库),专门用于此目标。 Open-Opm包含28,000多个代码片段,其中一半包含OpenMP指令,而另一半根本不需要并行化。我们使用语料库来培训系统来自动对需要并行化的代码段进行分类,并建议单个OpenMP条款。我们为这些任务培训了几个名为Bragformer的变压器模型,并表明它们的表现优于统计训练的基线和自动S2S并行化编译器,这既可以分类OpenMP指令的总体需求,又要介绍私人和还原条款。我们的源代码和数据库可在以下网址获得:https://github.com/scientific-computing-lab-nrcn/pragformer。
translated by 谷歌翻译
在实际执行或基准测试之前预测生产代码的性能是高度挑战的。在本文中,我们提出了一个被称为TEP-GNN的预测模型,该模型表明,对于预测单位测试执行时间的特殊情况,高准确性的性能预测是可能的。 Tep-gnn使用FA-asts或流动的ASTS作为基于图的代码表示方法,并使用强大的图形神经网络(GNN)深度学习模型预测测试执行时间。我们基于从项目公共存储库中开采的922个测试文件,使用四个现实生活中的Java开源程序评估TEP-GNN。我们发现我们的方法达到了0.789的较高的Pearson相关性,表现优于基线深度学习模型。但是,我们还发现,训练有素的模型需要更多的工作来概括看不见的项目。我们的工作表明,FA-asts和GNN是预测绝对性能值的可行方法,并作为能够在执行前预测任意代码的性能的重要中介步骤。
translated by 谷歌翻译
自主机器人结合了各种技能,形成越来越复杂的行为,称为任务。尽管这些技能通常以相对较低的抽象级别进行编程,但它们的协调是建筑分离的,并且经常以高级语言或框架表达。几十年来,州机器一直是首选的语言,但是最近,行为树的语言在机器人主义者中引起了人们的关注。行为树最初是为计算机游戏设计的,用于建模自主参与者,提供了基于树木的可扩展的使命表示,并受到支持支持模块化设计和代码的重复使用。但是,尽管使用了该语言的几种实现,但对现实世界中的用法和范围知之甚少。行为树提供的概念与传统语言(例如州机器)有何关系?应用程序中如何使用行为树和状态机概念?我们介绍了对行为树中关键语言概念的研究及其在现实世界机器人应用中的使用。我们识别行为树语言,并将其语义与机器人技术中最著名的行为建模语言进行比较。我们为使用这些语言的机器人应用程序挖掘开源存储库并分析此用法。我们发现两种行为建模语言在语言设计及其在开源项目中的用法之间的相似性方面,以满足机器人域的需求。我们为现实世界行为模型的数据集提供了贡献,希望激发社区使用和进一步开发这种语言,相关的工具和分析技术。
translated by 谷歌翻译
Automated Program Repair (APR) is defined as the process of fixing a bug/defect in the source code, by an automated tool. APR tools have recently experienced promising results by leveraging state-of-the-art Neural Language Processing (NLP) techniques. APR tools such as TFix and CodeXGLUE combine text-to-text transformers with software-specific techniques are outperforming alternatives, these days. However, in most APR studies the train and test sets are chosen from the same set of projects. In reality, however, APR models are meant to be generalizable to new and different projects. Therefore, there is a potential threat that reported APR models with high effectiveness perform poorly when the characteristics of the new project or its bugs are different than the training set's(Domain Shift). In this study, we first define and measure the domain shift problem in automated program repair. Then, we then propose a domain adaptation framework that can adapt an APR model for a given target project. We conduct an empirical study with three domain adaptation methods FullFineTuning, TuningWithLightWeightAdapterLayers, and CurriculumLearning using two state-of-the-art domain adaptation tools (TFix and CodeXGLUE) and two APR models on 611 bugs from 19 projects. The results show that our proposed framework can improve the effectiveness of TFix by 13.05% and CodeXGLUE by 23.4%. Another contribution of this study is the proposal of a data synthesis method to address the lack of labelled data in APR. We leverage transformers to create a bug generator model. We use the generated synthetic data to domain adapt TFix and CodeXGLUE on the projects with no data (Zero-shot learning), which results in an average improvement of 5.76% and 24.42% for TFix and CodeXGLUE, respectively.
translated by 谷歌翻译
The International Workshop on Reading Music Systems (WoRMS) is a workshop that tries to connect researchers who develop systems for reading music, such as in the field of Optical Music Recognition, with other researchers and practitioners that could benefit from such systems, like librarians or musicologists. The relevant topics of interest for the workshop include, but are not limited to: Music reading systems; Optical music recognition; Datasets and performance evaluation; Image processing on music scores; Writer identification; Authoring, editing, storing and presentation systems for music scores; Multi-modal systems; Novel input-methods for music to produce written music; Web-based Music Information Retrieval services; Applications and projects; Use-cases related to written music. These are the proceedings of the 3rd International Workshop on Reading Music Systems, held in Alicante on the 23rd of July 2021.
translated by 谷歌翻译
源代码的最先进的神经模型倾向于在代码的生成时进行评估,并且通常在长地平任务中的产生,例如整个方法体的产生。我们建议使用静态程序分析仪的弱监督来解决这一缺陷。我们的神经统计方法允许深入的生成模型来象征地计算它已经生成的代码中的静态分析工具,长距离语义关系。在培训期间,该模型观察这些关系,并学习生成条件上的程序。考虑到包含该方法的类的剩余部分,我们将我们的方法应用于生成整个Java方法的问题。我们的实验表明,该方法显着地优于最先进的变换器和模型,明确试图在制作程序中没有基本语义错误的程序以及在句法匹配地面真理方面来学习此任务的模型。
translated by 谷歌翻译
即使机器学习算法已经在数据科学中发挥了重要作用,但许多当前方法对输入数据提出了不现实的假设。由于不兼容的数据格式,或数据集中的异质,分层或完全缺少的数据片段,因此很难应用此类方法。作为解决方案,我们提出了一个用于样本表示,模型定义和培训的多功能,统一的框架,称为“ Hmill”。我们深入审查框架构建和扩展的机器学习的多个范围范式。从理论上讲,为HMILL的关键组件的设计合理,我们将通用近似定理的扩展显示到框架中实现的模型所实现的所有功能的集合。本文还包含有关我们实施中技术和绩效改进的详细讨论,该讨论将在MIT许可下发布供下载。该框架的主要资产是其灵活性,它可以通过相同的工具对不同的现实世界数据源进行建模。除了单独观察到每个对象的一组属性的标准设置外,我们解释了如何在框架中实现表示整个对象系统的图表中的消息推断。为了支持我们的主张,我们使用框架解决了网络安全域的三个不同问题。第一种用例涉及来自原始网络观察结果的IoT设备识别。在第二个问题中,我们研究了如何使用以有向图表示的操作系统的快照可以对恶意二进制文件进行分类。最后提供的示例是通过网络中实体之间建模域黑名单扩展的任务。在所有三个问题中,基于建议的框架的解决方案可实现与专业方法相当的性能。
translated by 谷歌翻译