{'fraction_non_alphanumeric': 0.017985611510791366, 'fraction_numerical': 0.0, 'mean_word_length': 4.995689655172414, '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}}
An Ontology-based Approach to Analyzing the Occurrence of Code Smells in Software

Code Smells indicate potential flaws in software design that can lead to costly consequences. To mitigate the bad effects of Code Smells, it is necessary to detect and fix defective code. Programmatic processing of Code Smells is not new. Previous works have focused on detection and representation to support the analysis of faulty software. However, such works are based on a syntactic operation, without taking advantage on semantic properties of the software. On the other hand, there are several ways to provide semantic support in software development as a whole. Ontologies, for example, have recently been usedl. The application of ontologies for inferring semantic mechanisms to aid software engineers in dealing with smells may be of great value. As little attention has been given to this, we propose an ontology-based approach to analyze the occurrence of Code Smells in software projects. First, we present a comprehensive ontology that is capable of representing Code Smells and their association with software projects. We also introduce a tool that can manipulate our ontology in order to provide processing of Code Smells as it mines software source-code. Finally, we conducted an initial evaluation of our approach in a real usage scenario with two large open-source software repositories.