{'fraction_non_alphanumeric': 0.021238938053097345, 'fraction_numerical': 0.004424778761061947, 'mean_word_length': 5.5, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Discussion on the Results of the Detection of Design Defects

Software engineers often need to identify in their systems “poor” design choices—design defects—that hinder the development and maintenance, as opportunities of improvements and as a measure of the quality of their systems. However, the detection of design defects is difficult because of the lack of specifications and tools. We propose DECOR, a method to specify design defects systematically and to generate automatically detection algorithms. With this method, software engineers analyse and specify design defects at a high-level of abstraction using a unified vocabulary and a dedicated language for generating detection algorithms. To illustrate our method, in this paper, we specify 4 well-known design defects, the antipatterns Blob, Functional Decomposition, Spaghetti Code, and Swiss Army Knife and their 15 underlying code smells and we generate automatically their detection algorithms. We apply and validate the detection algorithms in terms of precision and recall and discuss the precision of these algorithms on 11 open-source object-oriented systems.