检索规则说明:AND代表“并且”;OR代表“或者”;NOT代表“不包含”;(注意必须大写,运算符两边需空一格)
检 索 范 例 :范例一: (K=图书馆学 OR K=情报学) AND A=范并思 范例二:J=计算机应用与软件 AND (U=C++ OR U=Basic) NOT M=Visual
作 者:Yamin HU Hao JIANG Zongyao HU
机构地区:[1]School of Computer Science and Technology,Beijing Institute of Technology,Beijing 100081,China [2]School of Artificial Intelligence,Anhui University,Hefei 230601,China
出 处:《Frontiers of Computer Science》2023年第6期61-75,共15页中国计算机科学前沿(英文版)
摘 要:The maintainability of source code is a key quality characteristic for software quality.Many approaches have been proposed to quantitatively measure code maintainability.Such approaches rely heavily on code metrics,e.g.,the number of Lines of Code and McCabe’s Cyclomatic Complexity.The employed code metrics are essentially statistics regarding code elements,e.g.,the numbers of tokens,lines,references,and branch statements.However,natural language in source code,especially identifiers,is rarely exploited by such approaches.As a result,replacing meaningful identifiers with nonsense tokens would not significantly influence their outputs,although the replacement should have significantly reduced code maintainability.To this end,in this paper,we propose a novel approach(called DeepM)to measure code maintainability by exploiting the lexical semantics of text in source code.DeepM leverages deep learning techniques(e.g.,LSTM and attention mechanism)to exploit these lexical semantics in measuring code maintainability.Another key rationale of DeepM is that measuring code maintainability is complex and often far beyond the capabilities of statistics or simple heuristics.Consequently,DeepM leverages deep learning techniques to automatically select useful features from complex and lengthy inputs and to construct a complex mapping(rather than simple heuristics)from the input to the output(code maintainability index).DeepM is evaluated on a manually-assessed dataset.The evaluation results suggest that DeepM is accurate,and it generates the same rankings of code maintainability as those of experienced programmers on 87.5%of manually ranked pairs of Java classes.
关 键 词:code maintainability lexical semantics deep learning neural networks
分 类 号:TP183[自动化与计算机技术—控制理论与控制工程]
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在链接到云南高校图书馆文献保障联盟下载...
云南高校图书馆联盟文献共享服务平台 版权所有©
您的IP:216.73.216.49