Cognitive Code Quality Improvement with Pattern Recognition and Recommendation by Examples
Autor: | Gábor Kusper, Krisztian Kusper, Imre Bajak, Attila Adamkó, Szabolcs Marien, Mark Danisovszky |
---|---|
Rok vydání: | 2020 |
Předmět: |
Java
Programming language Computer science Design pattern 05 social sciences Null Object pattern 050301 education Cognition computer.software_genre 030226 pharmacology & pharmacy Software quality 03 medical and health sciences 0302 clinical medicine Code refactoring Software design pattern Redundancy (engineering) 0503 education computer computer.programming_language |
Zdroj: | 2020 11th IEEE International Conference on Cognitive Infocommunications (CogInfoCom). |
DOI: | 10.1109/coginfocom50765.2020.9237896 |
Popis: | 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. |
Databáze: | OpenAIRE |
Externí odkaz: |