Cognitive Code Quality Improvement with Pattern Recognition and Recommendation by Examples

Márk Danisovszky, A. Adamkó, Imre Baják, Krisztian Kusper, Szabolcs Márien, Gábor Kusper
{"title":"Cognitive Code Quality Improvement with Pattern Recognition and Recommendation by Examples","authors":"Márk Danisovszky, A. Adamkó, Imre Baják, Krisztian Kusper, Szabolcs Márien, Gábor Kusper","doi":"10.1109/CogInfoCom50765.2020.9237896","DOIUrl":null,"url":null,"abstract":"Several groups work on automated design pattern recognition or automated refactoring. The goal of our paper is to present examples for ugly program code and its transformation into a pretty version. These examples are useful to test and teach their systems. What does ugly code and pretty code mean? In an ugly code there is redundancy, which means that we have anomalies. Pretty code means that it has the same functionality as the ugly one, it follows a design pattern, and there is no redundancy. Our work is motivated by the fact, that we could not find a similar work, although, we work on an automated design pattern tool, so we think that there is a need for ugly and pretty code examples. This work contains examples for the design patterns: Null Object, Template Method, State, and Strategy. We do not discuss how to refactor the ugly code into a pretty one. The program codes are presented in Java.","PeriodicalId":236400,"journal":{"name":"2020 11th IEEE International Conference on Cognitive Infocommunications (CogInfoCom)","volume":"303 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2020-09-23","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"2020 11th IEEE International Conference on Cognitive Infocommunications (CogInfoCom)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/CogInfoCom50765.2020.9237896","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

Abstract

Several groups work on automated design pattern recognition or automated refactoring. The goal of our paper is to present examples for ugly program code and its transformation into a pretty version. These examples are useful to test and teach their systems. What does ugly code and pretty code mean? In an ugly code there is redundancy, which means that we have anomalies. Pretty code means that it has the same functionality as the ugly one, it follows a design pattern, and there is no redundancy. Our work is motivated by the fact, that we could not find a similar work, although, we work on an automated design pattern tool, so we think that there is a need for ugly and pretty code examples. This work contains examples for the design patterns: Null Object, Template Method, State, and Strategy. We do not discuss how to refactor the ugly code into a pretty one. The program codes are presented in Java.
基于模式识别和示例推荐的认知代码质量改进
有几个小组致力于自动化设计模式识别或自动化重构。本文的目标是提供一些丑陋的程序代码的例子,并将其转换为漂亮的版本。这些例子对于测试和教导他们的系统非常有用。丑陋的代码和漂亮的代码意味着什么?在丑陋的代码中存在冗余,这意味着我们有异常。漂亮的代码意味着它与丑陋的代码具有相同的功能,它遵循设计模式,并且没有冗余。我们工作的动机是这样一个事实,我们找不到类似的工作,尽管我们使用的是自动化设计模式工具,所以我们认为有必要提供丑陋和漂亮的代码示例。本工作包含设计模式的示例:空对象、模板方法、状态和策略。我们不讨论如何将丑陋的代码重构成漂亮的代码。程序代码用Java语言编写。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
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学术官方微信