Font Size: a A A

An Analysis Of Python Fine-Grained Source Code Changes

Posted on:2018-12-30Degree:MasterType:Thesis
Country:ChinaCandidate:W LinFull Text:PDF
GTID:2428330512497774Subject:Computer Science and Technology
Abstract/Summary:PDF Full Text Request
Software has been continuously evolving during its whole life to satisfy new requirements or fix some bugs.One effective way to overcome or avoid the negative effects of software aging is by placing change in the center of the software development process.In particular,understanding the nature of fine-grained source code changes can help comprehending software evolution.Over the past decades,many people has been mining software repository to extract rich change information so as to analyze software evolution.And most of them focus on traditional mainstream programing languages,such as Java,C++,and C.However,interest in dynamic object-oriented languages has increased recently,both in industry and academia.Dynamic features bring developers flexibility but generally unpleasant to maintain and more error-prone,which makes dynamic feature code changeable.Therefore,we conduct a study on Python,a typical dynamic programming language,to investigate the characteristics of fine-grained source code changes and summarize the rules of Python software evolution.In this paper,we first introduce the taxonomy of Python fine-grained source code changes.Second,to reduce the effort for change type extraction,we implement an automatic tool named PyCT based on Change Distilling for quickly comparing Python source codes.Third,we select ten popular Python projects from five domains,with 132294 commits,to extract change information by PyCT.Analyzing these source code changes in four aspects,we apply Wilcoxon rank sum test and Fisher's exact test.The key findings are as follows:(1)across projects:The distributions of change type frequency show no significant difference across most studied projects and the most common change type are Function Change and Statement Change while the most uncommon change type is Loop Structure Change;(2)across versions:The distributions of change type frequency across versions may be different significantly,which depends on the release purposes;(3)between maintenance activities:In our studied projects,if structure related change types are more likely to be used for bug fixing,while function structure and import statement related change types are more associated with non-bugfix activity;(4)dynamic features:The dynamic features that change frequently in our studied projects are isinstance,type,hasattr and getattr.What's more,the most common change action on these four dynamic features is Update.In addition,we also discuss the relationship between dynamic features and maintenance activities,then summarize a few interesting change patterns.This paper analyzes the characteristics of Python fine-grained source code changes,and reveals the rule of Python software evolution.We believe our observations will improve the understanding of Python software evolution and hence aid practitioners in developing high quality software systems.
Keywords/Search Tags:Python, fine-grained change, dynamic features, maintenance activities, software evolution
PDF Full Text Request
Related items