摘要
代码异味的存在对源代码的可理解性和可维护性有着糟糕的负面影响.通常情况下,研究人员更多是考虑单一代码异味对源代码的影响,但有研究指出,多种代码异味的共同存在以及它们之间的交互往往比单一代码异味有着更严重的负面影响.本文针对主成分分析在布尔类型变量分析中容易产生难以解释的主成分的弊端,提出了一种基于主轴因子法及异味严重性的代码异味相关性分析方法,并在92个系统上对14种代码异味进行试验,从中提取了6个因子,在相关矩阵中新发现了{Extensive Coupling、Long Parameter List}代码异味对的存在.最后本文比较分析了具有严重性标签的代码异味数据集的优势,解释了每个因子的含义并进行分类命名.
The existence of code smells has a bad negative impact on the comprehensibility and maintainability of source code.In general,researchers are more concerned about the impact of a single code smell on source code.However,some researches have pointed out that the common existence of multiple code smells and the interaction between them often have more serious negative effects than single code smell.In this paper,aiming at the disadvantage of principal component analysis in boolean variable analysis,which is easy to produce unexplained factors,a method of code smells correlation analysis based on principal axis factor method and smells’ severity is proposed.14 code smells are experimented on 92 systems,6 factors are extracted.The existence of {extensive coupling,long parameter list} code smells’ pair is newly found in the correlation matrix.Finally,the advantages of the code smells dataset with severity tag are compared and analyzed in this paper,and the meaning of each factor is explained and classified.
作者
张生栋
吴海涛
高建华
ZHANG Sheng-dong;WU Hai-tao;GAO Jian-hua(Department of Computer Science and Technology,Shanghai Normal University,Shanghai 200234,China)
出处
《小型微型计算机系统》
CSCD
北大核心
2021年第4期853-860,共8页
Journal of Chinese Computer Systems
基金
国家自然科学基金项目(61672355)资助。
关键词
代码异味
主轴因子分析
严重性
相关性分析
code smells
principal axis factor analysis
severity
correlation analysis