Font Size: a A A

Visualization Research On Software Defect Prediction And Code Clone Detection

Posted on:2024-01-28Degree:MasterType:Thesis
Country:ChinaCandidate:Y J XiaoFull Text:PDF
GTID:2568307112476814Subject:Electronic information
Abstract/Summary:PDF Full Text Request
With the increasing size and complexity of software,developers need to spend much time understanding the project source code,especially for unfamiliar projects,and using code editors to navigate the code is a complex and tedious task.Despite the time and effort spent by testers checking for defects during the testing and maintenance phases of the software,through manual testing and code reviews,defects may still exist in the software.In addition,developers often copy,paste,and modify code to increase efficiency and save development time,but this also leads to many code clones,which in turn leads to problems such as code redundancy,reduced software maintainability,and decreased code quality.To better understand the code and locate and display possible code defects and code clones in the project,this paper proposes automatically detecting software and code clones based on program analysis,deep learning techniques,visualization techniques,etc.It combines them with the code structure for visual display.In this way,the automation of software development and maintenance can be improved,costs can be reduced,and software quality and productivity can be improved.The main contributions of this paper include:1)Enhancing code understanding with code visualization.A method-level code visualization tool,Java City,is built using virtual reality to visualize software projects as a virtual interactive city to support code comprehension activities.Experiments have proven that Java City can visually help developers analyze and understand source code more quickly,comprehensively,and interestingly.2)Automatic prediction and visualization of defective code.A software defect prediction model GC-HAN with two granularities,file-level and code-line level,is proposed to automatically learn structural and semantic information in source code based on graph convolutional neural networks and hierarchical attention networks to predict and visualize defective codes.It is experimentally demonstrated that the model improves Balanced Accuracy by 3% in file-level defect prediction,improves Recall@Top20%LOC by 79%,and reduces Effort@Top20%Recal and IFA by 15%and 22%,respectively,in code-line defect prediction.3)Automatic detection of cloned code and visualization of clones.A clone visualization method that combines code cloning and code structure is proposed,and a clone visualization tool,Clone Java City(CJC),is built.It is demonstrated that Clone Java City can understand and analyze clone information more easily,accurately,and interestingly.
Keywords/Search Tags:Code Visualization, Software Defect Prediction, Code Clone Detection, Intelligent Software Engineering
PDF Full Text Request
Related items