Python動態(tài)特性對軟件維護(hù)的影響研究
本文選題:Python動態(tài)特性 切入點:易變性 出處:《南京大學(xué)》2016年碩士論文 論文類型:學(xué)位論文
【摘要】:作為程序語言的重要組成部分,動態(tài)特性因其極大的靈活性和便利性深受語言設(shè)計者和開發(fā)人員的喜愛。不僅僅是動態(tài)語言才有動態(tài)特性,Java等面向?qū)ο蟮母呒壵Z言在發(fā)展過程中也逐漸添加了類似功能,譬如Java的自省機(jī)制。動態(tài)特性的使用方便開發(fā)人員在程序運行過程中追蹤、觀察或動態(tài)修改代碼,包括其語義、語法和具體實現(xiàn),從而能提高開發(fā)、測試效率。但是,也有人認(rèn)為動態(tài)特性的使用會增加程序維護(hù)成本、對軟件質(zhì)量產(chǎn)生影響。研究動態(tài)特性與軟件維護(hù)的關(guān)系具有重要意義,然而很少有研究關(guān)注這些問題,特別是針對Python語言。為了科學(xué)、具體的探討動態(tài)特性使用與軟件維護(hù)的關(guān)系,首先,本文挑選了7個具有4到7年維護(hù)時間的開源項目,通過實證研究的方法,靜態(tài)分析了53個程序版本中動態(tài)特性與模塊易變性的關(guān)系,以及動態(tài)特性與模塊易錯性的關(guān)系。特別的,本文使用Fisher精確檢驗、Mann-Whitney檢驗和邏輯回歸模型分別探究:模塊易變性和模塊易錯性與動態(tài)特性的使用是否相關(guān);模塊易變性和模塊易錯性與動態(tài)特性的使用次數(shù)是否相關(guān);模塊易變性和模塊易錯性與特定類型的動態(tài)特性是否更相關(guān)。在開源軟件項目上的實驗結(jié)果表明,1)使用了動態(tài)特性的模塊更容易發(fā)生改變;2)使用動態(tài)特性越多的模塊越容易發(fā)生改變;3)特定類型的動態(tài)特性,在某些項目中,比其他動態(tài)特性,與模塊易變性更顯著相關(guān);4)同樣的實驗結(jié)果也適用于動態(tài)特性與模塊易錯性的關(guān)系。此外,文本通過數(shù)理統(tǒng)計方法分析了99個項目中動態(tài)特性在變化的代碼片段中的使用分布情況,并且結(jié)合人工代碼審查的方式走讀了4個項目中的600個commit信息,調(diào)查了4種最常使用的動態(tài)特性在變化的代碼片段中的使用情況。通過人工代碼審查的方式,我們總結(jié)了一些動態(tài)特性在代碼維護(hù)中的變化場景,并驗證了Python專家關(guān)于動態(tài)特性使用的建議?傊,這一創(chuàng)新性的工作,對一直關(guān)注怎樣使用動態(tài)特性、為什么使用動態(tài)特性的研究者具有啟發(fā)意義,并為其他研究者提供了相關(guān)的參考信息;趯嶒灲Y(jié)論以及人工審查結(jié)果,我們建議開發(fā)人員,尤其是語言的初學(xué)者,謹(jǐn)慎使用動態(tài)特性,因為對動態(tài)特性的誤用會造成更大的維護(hù)成本;建議維護(hù)人員在有限的時間內(nèi)重點關(guān)注使用了動態(tài)特性的模塊,提高工作效率。
[Abstract]:As an important part of the programming language, Dynamic features are loved by language designers and developers for their great flexibility and convenience. It is not only dynamic languages that have dynamic features. For example, the introspection mechanism of Java. The use of dynamic features makes it easy for developers to track, observe, or dynamically modify code, including its semantics, syntax, and concrete implementation, during the running of the program, thus improving the efficiency of development and testing. It is also believed that the use of dynamic characteristics will increase the cost of program maintenance and have an impact on software quality. It is important to study the relationship between dynamic characteristics and software maintenance. However, few studies have paid attention to these problems. Especially for the Python language. In order to explore the relationship between the use of dynamic characteristics and software maintenance, this paper selects seven open source projects with 4 to 7 years of maintenance time, through the method of empirical research. The relationship between dynamic characteristics and module variability in 53 versions of programs and the relationship between dynamic characteristics and module error-vulnerability are analyzed statically. In this paper, we use Fisher precise test to test Mann-Whitney test and logical regression model to explore whether module variability and module error-vulnerability are related to the use of dynamic characteristics, whether module variability and module error-vulnerability are related to the use of dynamic characteristics, and whether module variability and module error-vulnerability are related to the number of times of use of dynamic characteristics. Module variability and module erroriness are more relevant to specific types of dynamic characteristics. Experimental results on open source software projects show that: 1) modules that use dynamic features are more likely to change the number of modules that use dynamic characteristics. The more likely the module is to change the dynamic characteristics of a particular type, In some projects, the same experimental results are more significantly related to module variability than others.) the same experimental results apply to the relationship between dynamic characteristics and module erroriness. This paper analyzes the distribution of dynamic characteristics in the changing code fragments of 99 projects by mathematical statistics, and reads 600 commit information in 4 projects by manual code review. We investigated the use of four of the most commonly used dynamic features in changing code snippets. Through manual code review, we summarized some of the dynamic features' changing scenarios in code maintenance. In short, this innovative work is instructive for researchers who have been focusing on how to use dynamic characteristics and why. Based on the findings of the experiment and the results of manual review, we recommend that developers, especially beginners of the language, be careful to use dynamic features. Because the misuse of dynamic characteristics will lead to greater maintenance costs, it is suggested that maintenance personnel focus on the use of dynamic modules in a limited time to improve work efficiency.
【學(xué)位授予單位】:南京大學(xué)
【學(xué)位級別】:碩士
【學(xué)位授予年份】:2016
【分類號】:TP311.53
【相似文獻(xiàn)】
相關(guān)期刊論文 前10條
1 姚競;;面向項目的“Python程序設(shè)計”教學(xué)實踐與研究[J];福建電腦;2009年07期
2 透明;;關(guān)于Python[J];程序員;2002年03期
3 王寧,汪飛星;基于Python開發(fā)氣象服務(wù)器運行系統(tǒng)界面[J];微機(jī)發(fā)展;2003年07期
4 湯韜;;Python庫簡介[J];程序員;2006年06期
5 高昂;;Python近況全接觸[J];程序員;2009年04期
6 郭芬;劉明;;Python垃圾收集器原理研究及應(yīng)用[J];信息技術(shù);2009年07期
7 王麗;;Python的元類編程研究[J];電腦編程技巧與維護(hù);2011年06期
8 李愛寧;唐勇;孫曉輝;劉昕彤;;基于Python語言的3DES算法優(yōu)化[J];計算機(jī)系統(tǒng)應(yīng)用;2011年08期
9 曾浩;;Python在其它語言中的應(yīng)用研究[J];大眾科技;2012年07期
10 鞠文飛;曾智銳;;使用Python開發(fā)跨平臺的單詞助記程序[J];電腦編程技巧與維護(hù);2012年24期
相關(guān)會議論文 前5條
1 ;Development of Python-based ArcGIS Tools for Spatially Balanced Forest Sampling Design[A];Information Technology and Computer Science—Proceedings of 2012 National Conference on Information Technology and Computer Science[C];2012年
2 伊鵬躍;于哲峰;汪海;;基于Abaqus/Python的三維復(fù)合材料層壓板有限元建模參數(shù)化開發(fā)[A];第17屆全國復(fù)合材料學(xué)術(shù)會議(復(fù)合材料結(jié)構(gòu)設(shè)計與性能表征分論壇)論文集[C];2012年
3 黃佳聰;高俊峰;;基于Python編程語言的空間動態(tài)模型集成[A];自然地理學(xué)與生態(tài)安全學(xué)術(shù)論文摘要集[C];2012年
4 于文麗;;基于Python的空間自相關(guān)模式研究[A];中國地理學(xué)會百年慶典學(xué)術(shù)論文摘要集[C];2009年
5 郭霞;關(guān)志東;劉遂;陳萍;劉佳;王欣晶;邱太文;;基于Python的Abaqus二次開發(fā)在層壓板修理模擬中的應(yīng)用[A];計算機(jī)輔助工程及其理論研討會2013(CAETS2013)論文集[C];2013年
相關(guān)重要報紙文章 前6條
1 高壽福;無所不能的靈蛇——Python[N];中華讀書報;2001年
2 ·特約作者 鄒肇輝;BT編程的王者[N];電腦報;2005年
3 易水;IT新詞集錦(403)[N];計算機(jī)世界;2004年
4 本報記者 蒙克;顛覆傳統(tǒng)數(shù)據(jù)庫的“玩具”[N];網(wǎng)絡(luò)世界;2009年
5 ;Ruby on Rails[N];計算機(jī)世界;2006年
6 周蓉蓉;中低端Unix直指Linux[N];計算機(jī)世界;2006年
相關(guān)碩士學(xué)位論文 前10條
1 張正陽;基于Python的戶外通訊設(shè)備連接關(guān)系的挖掘研究[D];蘇州大學(xué);2015年
2 魏武斌;基于Python的灌區(qū)水情采集系統(tǒng)開發(fā)[D];西北農(nóng)林科技大學(xué);2015年
3 趙強(qiáng);用于PCB版圖審查的Python腳本子系統(tǒng)設(shè)計與實現(xiàn)[D];西安電子科技大學(xué);2014年
4 鄺洪勝;基于Python的電商導(dǎo)購APP設(shè)計與實現(xiàn)[D];華南理工大學(xué);2015年
5 代紅震;基于STAF和Python混合編程的自動化測試系統(tǒng)的研究和實現(xiàn)[D];南京郵電大學(xué);2015年
6 劉志凱;基于Web的Python編程環(huán)境研究[D];新疆農(nóng)業(yè)大學(xué);2015年
7 趙明洪;Python程序設(shè)計題的查重研究[D];新疆農(nóng)業(yè)大學(xué);2015年
8 曹明君;基于Visual Studio與Python平臺開發(fā)有限元分析結(jié)果自動后處理系統(tǒng)[D];青島理工大學(xué);2015年
9 周健;Python虛擬機(jī)內(nèi)存管理的研究[D];南京大學(xué);2014年
10 王衡;PaaS平臺上Python沙箱研究[D];南京大學(xué);2014年
,本文編號:1648136
本文鏈接:http://sikaile.net/kejilunwen/ruanjiangongchenglunwen/1648136.html