首页> 外文会议>IEEE/ACM International Conference on Mining Software Repositories >Style-Analyzer: Fixing Code Style Inconsistencies with Interpretable Unsupervised Algorithms
【24h】

Style-Analyzer: Fixing Code Style Inconsistencies with Interpretable Unsupervised Algorithms

机译:STYLE-Analyzer:修复代码风格与可解释的无监督算法不一致

获取原文

摘要

Source code reviews are manual, time-consuming, and expensive. Human involvement should be focused on analyzing the most relevant aspects of the program, such as logic and maintainability, rather than amending style, syntax, or formatting defects. Some tools with linting capabilities can format code automatically and report various stylistic violations for supported programming languages. They are based on rules written by domain experts, hence, their configuration is often tedious, and it is impractical for the given set of rules to cover all possible corner cases. Some machine learning-based solutions exist, but they remain uninterpretable black boxes. This paper introduces style-analyzer, a new open source tool to automatically fix code formatting violations using the decision tree forest model which adapts to each codebase and is fully unsupervised. style-analyzer is built on top of our novel assisted code review framework, Lookout. It accurately mines the formatting style of each analyzed Git repository and expresses the found format patterns with compact human-readable rules. style-analyzer can then suggest style inconsistency fixes in the form of code review comments. We evaluate the output quality and practical relevance of style-analyzer by demonstrating that it can reproduce the original style with high precision, measured on 19 popular JavaScript projects, and by showing that it yields promising results in fixing real style mistakes. style-analyzer includes a web application to visualize how the rules are triggered. We release style-analyzer as a reusable and extendable open source software package on GitHub for the benefit of the community.
机译:源代码审查是手动,耗时和昂贵的。人类参与应专注于分析程序的最相关方面,例如逻辑和可维护性,而不是修改样式,语法或格式化缺陷。有些工具具有Linting功能可以自动格式化代码,并为支持的编程语言报告各种风格违规。它们基于由域专家编写的规则,因此,它们的配置通常是乏味的,并且给定的一组规则是不切实际的,以涵盖所有可能的角落案例。一些基于机器的基于机器的解决方案存在,但它们保持不可诠释的黑匣子。本文介绍了STYLE-Analyzer,一个新的开源工具,用于使用判定为每个码布的决策树林模型自动修复代码格式违规,并完全无监督。 STYLE-Analyzer建于我们的小说辅助代码审查框架之上,了解。它准确地挖掘每个分析的GIT存储库的格式样式,并表达了具有紧凑的人类可读规则的找到的格式模式。然后,样式分析仪可以以代码审查评论的形式建议样式不一致修复。我们通过展示它可以通过高精度再现原始风格来评估风格分析仪的输出质量和实际相关性,以19个流行的Javacript项目测量,并通过表明它产生了有希望的结果来解决真正的风格错误。 STYLE-Analyzer包括Web应用程序以可视化触发规则的方式。我们将样式分析仪释放为Github的可重用和可扩展的开源软件包,以便为社区的利益。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号