Investigating the Social Representations of Harmful Code

Author:

Lima Rodrigo1,Souza Jairo1,Fonseca Baldoino2,Teixeira Leopoldo1,Maiani Rafael3,Ribeiro Márcio2,Gheyi Rohit4,Garcia Alessandro5

Affiliation:

1. Federal University of Pernambuco

2. Federal University of Alagoas

3. Federal University of Rio de Janeiro

4. Federal University of Campina Grande

5. Pontifical Catholic University of Rio de Janeiro

Abstract

Abstract Context. Harmful Code are code elements that harm the software. Several characteristics can cause a code be Harmful to the Software. That may result from plenty of characteristics of the source code and external issues. By example, one might associate Harmful Code with the introduction of bugs, architecture degradation, and hard comprehension. However, there is still a lack of knowledge on which are the code issues that are considered harmful from the perspective of the community of software developers. Goal. In this work, we investigate the social representations of Harmful Code among a community of software developers composed of Brazilian postgraduate students and professionals from the industry. Method. We conducted free association tasks with members from this community for characterizing what comes to their minds when they think about Harmful Code. Then, we compiled a set of associations that compose the social representations of Harmful Code. Results. We found that the investigated community strongly associates Harmful Code with a core set of undesirable characteristics of the source code, such as bugs and different types of smells. Based on these findings, we discussed each of them to try to understand why those characteristics happen. Conclusion. Our study reveals the main characteristics of Harmful Code by a community of developers, those characteristics can guide researchers on future works to better understand Harmful Code.

Publisher

Research Square Platform LLC

Reference88 articles.

1. Parnas, D. (2011) Precise Documentation: The Key to Better Software. Springer Berlin Heidelberg, 125--148, The Future of Software Engineering

2. R. de Mello and J. da Costa and B. de Oliveira and M. Ribeiro and B. Fonseca and R. Gheyi and A. Garcia and W. Tiengo (2021) Decoding Confusing Code: Social Representations Among Developers. IEEE Computer Society, Los Alamitos, CA, USA, may, https://doi.ieeecomputersociety.org/10.1109/CHASE52884.2021.00010, 10.1109/CHASE52884.2021.00010, social representations, confusing code, program comprehension, free association, 11-20, 2574-1837, , 2021 2021 IEEE/ACM 13th International Workshop on Cooperative and Human Aspects of Software Engineering (CHASE) (CHASE)

3. Lima, Rodrigo and Souza, Jairo and Fonseca, Baldoino and Teixeira, Leopoldo and Gheyi, Rohit and Ribeiro, M\'{a}rcio and Garcia, Alessandro and de Mello, Rafael (2020) Understanding and Detecting Harmful Code. Association for Computing Machinery, New York, NY, USA, SBES '20, Natal, Brazil, Machine Learning, Code Smells, Software Quality, 10, 223 –232, Proceedings of the 34th Brazilian Symposium on Software Engineering, Code smells typically indicate poor design implementation and choices that may degrade software quality. Hence, they need to be carefully detected to avoid such poor design. In this context, some studies try to understand the impact of code smells on the software quality, while others propose rules or machine learning-based techniques to detect code smells. However, none of those studies or techniques focus on analyzing code snippets that are really harmful to software quality. This paper presents a study to understand and classify code harmfulness. We analyze harmfulness in terms of CLEAN, SMELLY, BUGGY, and HARMFUL code. By HARMFUL CODE, we define a SMELLY code element having one or more bugs reported. These bugs may have been fixed or not. Thus, the incidence of HARMFUL CODE may represent a increased risk of introducing new defects and/or design problems during its fixing. We perform our study with 22 smell types, 803 versions of 13 open-source projects, 40,340 bugs and 132,219 code smells. The results show that even though we have a high number of code smells, only 0.07% of those smells are harmful. The Abstract Function Call From Constructor is the smell type more related to HARMFUL CODE. To cross-validate our results, we also perform a survey with 60 developers. Most of them (98%) consider code smells harmful to the software, and 85% of those developers believe that code smells detection tools are important. But, those developers are not concerned about selecting tools that are able to detect HARMFUL CODE. We also evaluate machine learning techniques to classify code harmfulness: they reach the effectiveness of at least 97% to classify HARMFUL CODE. While the Random Forest is effective in classifying both SMELLY and HARMFUL CODE, the Gaussian Naive Bayes is the less effective technique. Our results also suggest that both software and developers' metrics are important to classify HARMFUL CODE., 10.1145/3422392.3422420, https://doi.org/10.1145/3422392.3422420, 9781450387538

4. Moscovici, Serge (1988) Notes Towards a Description of Social Representations. European Journal of Social Psychology 18: 211 - 250 https://doi.org/10.1002/ejsp.2420180303, 07

5. de Mello, Rafael and Uch ôa, Anderson and Oliveira, Roberto and Oliveira, Daniel and Fonseca, Baldoino and Garcia, Alessandro and Mello, Fernanda (2019) Investigating the Social Representations of Code Smell Identification: A Preliminary Study. 10.1109/CHASE.2019.00022, , 05

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3