跳到主要內容

臺灣博碩士論文加值系統

(216.73.216.88) 您好!臺灣時間:2026/02/14 19:42
字體大小: 字級放大   字級縮小   預設字形  
回查詢結果 :::

詳目顯示

: 
twitterline
研究生:許博淳
研究生(外文):HSU, BO-CHUN
論文名稱:設計與實作軟體氣味知識本體論與軟體氣味偵測之SonarQube擴充
論文名稱(外文):Design and Implementation of Software Smell Ontology and SonarQube Extension for Software Smell Detection
指導教授:李文廷李文廷引用關係
指導教授(外文):LEE, WEN-TIN
口試委員:葉道明李信杰李文廷
口試委員(外文):YEH, DOW-MINGLEE, SHIN-JIELEE, WEN-TIN
口試日期:2019-03-22
學位類別:碩士
校院名稱:國立高雄師範大學
系所名稱:軟體工程與管理學系
學門:電算機學門
學類:軟體發展學類
論文種類:學術論文
論文出版年:2019
畢業學年度:107
語文別:中文
論文頁數:64
中文關鍵詞:軟體氣味軟體程式碼氣味軟體設計氣味軟體氣味偵測本體論損壞性模組設計氣味純稚的資料類別功能依戀
外文關鍵詞:software smellcode smelldesign smellontologysoftware smell detectionbroken modularizationdata classfeature envy
相關次數:
  • 被引用被引用:0
  • 點閱點閱:307
  • 評分評分:
  • 下載下載:13
  • 收藏至我的研究室書目清單書目收藏:0
為了提升軟體的品質,有效率的專案團隊會使用程式碼分析工具偵測並移除程式碼中不良的程式結構。而目前市場上的程式碼分析工具大多針對軟體程式碼氣味(code smell)進行偵測,缺乏偵測較高層次的軟體氣味如軟體架構氣味或軟體設計氣味的工具。因此系統設計層面上以及架構上之缺陷通常還是需要仰賴有經驗的開發人員進行人工審查。

為了自動化的偵測軟體設計氣味,本研究提出軟體氣味知識本體論模型用以描述軟體氣味之概念與關聯。依據此模型發展出軟體氣味偵測方法並使用SonarQube插件的形式實作出Broken Modularization軟體設計氣味、Data Class軟體程式碼氣味及Feature Envy軟體程式碼氣味之偵測規則。最後以Java專案Lucene 3.6進行程式碼分析驗證Broken Modularization軟體設計氣味偵測之正確性。

To improve software quality, effective software development teams often use source code analysis tools to help them detect and refactor poor structures in the source code. However, most source code analysis tools mainly focus on detecting code smells, but lack of detecting high-level smells such as architecture smells or design smells. Therefore, developers need to spend a lot of efforts to review design flaws or architecture flaws manually.

In order to detect design smells automatically, this research proposed a software smell ontology model to describe the concepts and relations between software smells. Based on the ontology model, we proposed a software smells detection method and implemented a SonarQube extension for detecting design smell Broken Modularization and code smells Data Class and Feature Envy. To validate the accuracy of our implementation, the source code of Lucene 3.6 Java project is analyzed using Broken Modularization design smell detection method.

致謝 I
摘要 II
Abstract III
目錄 IV
圖次 VII
表次 IX
第 一 章 緒論 1
第一節 研究目的 1
第二節 論文架構 2
第 二 章 文獻探討 3
第一節 軟體氣味的定義 3
壹、 軟體程式碼氣味 3
貳、 軟體架構氣味 5
參、 軟體設計氣味 9
第二節 軟體氣味的分類及偵測方法 13
第三節 知識本體論在軟體氣味研究上之應用 21
第 三 章 研究環境與開發工具 23
第一節 研究環境 23
第二節 知識本體論開發工具Protégé 23
第三節 程式碼品質分析工具SonarQube 24
第 四 章 研究方法 26
第一節 定義軟體氣味知識本體論模型 26
第二節 建置軟體氣味知識本體論模型 34
第三節 發展軟體氣味偵測規則 35
第四節 以SonarQube插件實作軟體氣味偵測規則 39
壹、 SoftDetector插件功能需求分析 40
貳、 SonarQube 抽象語法樹架構分析 41
參、 實作偵測規則 45
肆、 系統架構設計 46
第 五 章 研究結果展示 53
第一節 測試專案簡介 53
第二節 分析結果 53
第六章 結論與未來展望 61
參考文獻 63

圖次
圖 1本體論關係圖-以飯店為例 22
圖 2軟體氣味知識本體論模型 28
圖 3軟體氣味Broken Modularization的Feature Envy型態 33
圖 4軟體氣味Broken Modularization的Data Class型態 33
圖 5 Broken Modularization與相關聯的軟體氣味 35
圖 6軟體氣味偵測規則模型 37
圖 7 Broken Modularization軟體氣味規則 38
圖 8軟體氣味偵測流程 40
圖 9 SonarQube ClassTree抽象語法樹下之資料結構(上) 42
圖 10 SonarQube ClassTree抽象語法樹下之資料結構(下) 43
圖 11 插件之系統架構圖 47
圖 12 astparser模組之類別圖 48
圖 13 smellruler模組與metricruler模組間之關聯 50
圖 14 astmodeler模組及smellruler模組間之關聯 51
圖 15偵測插件掃描Lucene 3.6之分析結果 54
圖 16 FieldInfo類別之Data Class軟體氣味偵測結果 55
圖 17 FieldInfo類別中之公開成員 56
圖 18 FieldInfo類別中之方法 58
圖 19 ScoreCachingCollector類別之Feature Envy偵測結果 59
圖 20 ScoreCachingCollector類別中的collect方法 59
圖 21 collect方法內之ATFD範例 60

表次
表 1不同類別資料規模下之Feature Envy偵測結果 19
表 2 Broken Modularization軟體設計氣味 31
表 3 Broken Modularization的運算真值表 32
表 4 VariableTree相關的資料結構 44
表 5 Lucene 3.6專案之基本衡量資料 53


[1] Fowler, M. and K. Beck (1999). Refactoring: Improving the Design of Existing Code, Addison-Wesley Professional.
[2] Lippert, M. and S. Roock (2007). Refactoring in Large Software Projects: Performing Complex Restructurings Successfully, Wiley.
[3] Sharma, T., G. Suryanarayana and G. Samarthyam (2014). Refactoring for software design smell : Managing Technical Debt, Morgan Kaufmann.
[4] Booch, G. (1993). Object-Oriented Analysis and Design with Applications, Addison-Wesley Professional.
[5] Sharma, T. and D. Spinellis (2018). "A survey on software smells." Journal of Systems and Software 138: 158-173.
[6] Fenton, N. and J. Bieman (2014). Software metrics : A Rigorous and Practical Approach, CRC Press.
[7] Moha, N., Y. G. Gueheneuc, L. Duchien and A. F. Le Meur (2010). "DECOR: A Method for the Specification and Detection of Code and Design Smells." IEEE Transactions on Software Engineering 36(1): 20-36.
[8] Gruber, T.R. (1993). "A Translation Approach to Portable Ontology Specifications." Knowledge Acquisition, 5, 199-200
[9] Luo, Y., A. Hoss and D. L. Carver (2010). "An Ontological Identification of Relationships between Anti-Patterns and Code Smells." 2010 IEEE Aerospace Conference: 1-10.
[10] Gomes de Mendonça Neto, M., L. do Nascimento Salvador, R. Novais and L. Paulo da Silva Carvalho (2017). "An Ontology-based Approach to Analyzing the Occurrence of Code Smells in Software. " Proceedings of the 19th International Conference on Enterprise Information Systems: 155-165.
[11] "Protégé." Retrieved 17 Mar., 2019, from https://protege.stanford.edu.
[12] "SonarQube." Retrieved 17 Mar., 2019, from https://www.sonarqube.org.
[13] "GitHub Apache/Lucene 3.6." Retrieved 17 Mar., 2019, from https://github.com/apache/lucene-solr/releases/tag/releases%2Flucene-solr%2F3.6.0.
[14] Gamma, E., R. Helm, R. Johnson and J. Vlissides (1994). Design Patterns: Elements of Reusable Object-Oriented Software Addison-Wesley Professional.
[15] Lanza, M. and R. Marinescu (2010). Object-oriented metrics in practice, Springer Publishing.
[16] "Expressions, Statements, and Blocks." Retrieved 17 Mar., 2019, from https://docs.oracle.com/javase/tutorial/java/nutsandbolts/expressions.html.
[17] McCabe, T. J. (1976). "A Complexity Measure." IEEE Transactions on Software Engineering SE-2(4): 308-320.
[18] "Pmd." Retrieved 17 Mar., 2019, from https://pmd.github.io.
[19] "Sonarqube Metric Definitions." Retrieved 17 Mar., 2019, from https://docs.sonarqube.org/latest/user-guide/metric-definitions.

QRCODE
 
 
 
 
 
                                                                                                                                                                                                                                                                                                                                                                                                               
第一頁 上一頁 下一頁 最後一頁 top