DOI: 10.5281/zenodo.6520056
title: Towards a systematic approach to manual annotation of code smells - C# Dataset of Long Method and Large Class code smells

description: This dataset includes open-source projects written in C# programing language, annotated for the presence of Long Method and God Class code smells. Each instance was manually annotated by at least two annotators. We explain our motivation and methodology for creating this dataset in our preprint: Luburić, N., Prokić, S., Grujić, K.G., Slivka, J., Kovačević, A., Sladić, G. and Vidaković, D., 2021. Towards a systematic approach to manual annotation of code smells. The dataset contains two excel datasheets: <em>DataSet_Large Class.xlsx</em> – C# classes annotated for the Large Class code smell severity. <em>DataSet_Long Method.xlsx</em> – C# methods annotated for the Long method code smell severity. The columns in the datasheet represent: <em>Code Snippet ID</em> – the full name of the code snippet. For classes, this is the package/namespace name followed by the class name. The full name of inner classes also contains the names of any outer classes (e.g., <em>namespace.subnamespace.outerclass.innerclass</em>). For methods, this is the full name of the class and the methods’s signature (e.g., <em>namespace.class.method(param1Type, param2Type)</em> ). <em>Link </em>– The GitHub link to the code snippet, including the commit and the start and end LOC. <em>Code Smell </em>– code smell for which the code snippet is examined (Large Class or Long Method). <em>Project Link </em>– the link to the version of the code repository that was annotated. <em>Metrics </em>– a list of metrics for the code snippet, calculated by our platform. Our dataset provides 25 class-level metrics for Large Class detection and 18 method-level metrics for Long Method detection The list of metrics and their definitions is available here. <em>Final annotation </em>– a single severity score calculated by a majority vote. <em>Annotators </em>– each annotator's (1, 2, or 3) assigned severity score. To help guide their reasoning for evaluating the presence and the severity of a code smell, three annotators independently annotated whether the considered heuristics apply to an evaluated code snippet. We provide these results in two separate excel datasheets: <em>LargeClass_Heuristics.xlsx </em>- C# classes annotated for the presence of heuristics relevant for the Large Class code smell. <em>LongMethod_Heuristics.xlsx </em>- C# classes annotated for the presence of heuristics relevant for the Large Class code smell. The columns of these two datasheets are: <em>Code Snippet ID </em>- the full name of the code snippet (matching the IDs from <em>DataSet_Large Class.xlsx </em>and <em>DataSet_Long Method.xlsx</em>) <em>Annotators</em> – heuristics labelled by each of the annotators (1, 2, or 3). <em>Heuristics </em>– whether the heuristic is applicable to the examined code snippet or not (Section 1.2.4 lists heuristics relevant for the Large Class detection, and Section 1.2.5 lists the heuristics relevant for the Long Method detection).
description: This research was supported by the Science Fund of the Republic of Serbia, Grant No 6521051, AI-Clean CaDET.
description: {"references": ["Luburi\u0107, N., Proki\u0107, S., Gruji\u0107, K.G., Slivka, J., Kova\u010devi\u0107, A., Sladi\u0107, G. and Vidakovi\u0107, D., 2021. Towards a systematic approach to manual annotation of code smells.", "Proki\u0107, S., Gruji\u0107, K.G., Luburi\u0107, N., Slivka, J., Kova\u010devi\u0107, A., Vidakovi\u0107, D. and Sladi\u0107, G., Clean Code and Design Educational Tool. In 2021 44th International Convention on Information, Communication and Electronic Technology (MIPRO) (pp. 1601-1606). IEEE."]}