ide中自动设置格式规则的代码风格分析:制表符与空格之争的解决方案

Eric Torunski, M. O. Shafiq, A. Whitehead
{"title":"ide中自动设置格式规则的代码风格分析:制表符与空格之争的解决方案","authors":"Eric Torunski, M. O. Shafiq, A. Whitehead","doi":"10.1109/ICDIM.2017.8244675","DOIUrl":null,"url":null,"abstract":"The use of code style is very important since it conveys meaning as well as intent of source code. Developers are used to reading code according to their preferred style but those guidelines of proper style vary among software teams, and even different companies. Code style decisions are typically made by managers of software developers, but we would like to investigate how common the different variations of code style are. There are also automated tools to convert code style in a file, however the tools must be configured manually. In this paper, we present a tool for the collection and analysis of code style metrics. We demonstrate the feasibility of scanning existing source code to automatically generate the code style rules for existing tools. We also look at the results of our data mining to look at trends in source code. We perform a quantitative analysis on source code for questions like: How many functions are in a class, on average? How many lines of code are in a method, on average? We also present graphs of the distribution of these data, as well look at special cases of outliers.","PeriodicalId":144953,"journal":{"name":"2017 Twelfth International Conference on Digital Information Management (ICDIM)","volume":"72 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2017-09-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"1","resultStr":"{\"title\":\"Code style analytics for the automatic setting of formatting rules in IDEs: A solution to the Tabs vs. Spaces Debate\",\"authors\":\"Eric Torunski, M. O. Shafiq, A. Whitehead\",\"doi\":\"10.1109/ICDIM.2017.8244675\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"The use of code style is very important since it conveys meaning as well as intent of source code. Developers are used to reading code according to their preferred style but those guidelines of proper style vary among software teams, and even different companies. Code style decisions are typically made by managers of software developers, but we would like to investigate how common the different variations of code style are. There are also automated tools to convert code style in a file, however the tools must be configured manually. In this paper, we present a tool for the collection and analysis of code style metrics. We demonstrate the feasibility of scanning existing source code to automatically generate the code style rules for existing tools. We also look at the results of our data mining to look at trends in source code. We perform a quantitative analysis on source code for questions like: How many functions are in a class, on average? How many lines of code are in a method, on average? We also present graphs of the distribution of these data, as well look at special cases of outliers.\",\"PeriodicalId\":144953,\"journal\":{\"name\":\"2017 Twelfth International Conference on Digital Information Management (ICDIM)\",\"volume\":\"72 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2017-09-01\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"1\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"2017 Twelfth International Conference on Digital Information Management (ICDIM)\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1109/ICDIM.2017.8244675\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"2017 Twelfth International Conference on Digital Information Management (ICDIM)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/ICDIM.2017.8244675","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 1

摘要

代码风格的使用非常重要,因为它传达了源代码的含义和意图。开发人员习惯于根据自己喜欢的风格来阅读代码,但是这些正确风格的指导方针在软件团队甚至不同的公司之间是不同的。代码风格的决定通常是由软件开发人员的经理做出的,但是我们想要调查代码风格的不同变体有多普遍。还有一些自动工具可以转换文件中的代码样式,但是这些工具必须手动配置。在本文中,我们提供了一个收集和分析代码风格度量的工具。我们演示了扫描现有源代码以自动生成现有工具的代码样式规则的可行性。我们还查看数据挖掘的结果,以查看源代码中的趋势。我们针对以下问题对源代码执行定量分析:一个类中平均有多少个函数?一个方法平均有多少行代码?我们还展示了这些数据的分布图表,以及异常值的特殊情况。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
Code style analytics for the automatic setting of formatting rules in IDEs: A solution to the Tabs vs. Spaces Debate
The use of code style is very important since it conveys meaning as well as intent of source code. Developers are used to reading code according to their preferred style but those guidelines of proper style vary among software teams, and even different companies. Code style decisions are typically made by managers of software developers, but we would like to investigate how common the different variations of code style are. There are also automated tools to convert code style in a file, however the tools must be configured manually. In this paper, we present a tool for the collection and analysis of code style metrics. We demonstrate the feasibility of scanning existing source code to automatically generate the code style rules for existing tools. We also look at the results of our data mining to look at trends in source code. We perform a quantitative analysis on source code for questions like: How many functions are in a class, on average? How many lines of code are in a method, on average? We also present graphs of the distribution of these data, as well look at special cases of outliers.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信