| 研究生: |
鄭可莉 Cheng, Ko-Li |
|---|---|
| 論文名稱: |
利用程式樣式偵測軟體錯誤 Software Fault Detection using Program Patterns |
| 指導教授: |
朱治平
Chu, Chih-Ping |
| 學位類別: |
碩士 Master |
| 系所名稱: |
電機資訊學院 - 資訊工程學系 Department of Computer Science and Information Engineering |
| 論文出版年: | 2011 |
| 畢業學年度: | 99 |
| 語文別: | 英文 |
| 論文頁數: | 83 |
| 中文關鍵詞: | 預測錯誤 、程式片段 、程式樣式 、關聯式規則探勘 |
| 外文關鍵詞: | Fault Prediction, Program segement, Program pattern, Association Rule Mining |
| 相關次數: | 點閱:124 下載:2 |
| 分享至: |
| 查詢本校圖書館目錄 查詢臺灣博碩士論文知識加值系統 勘誤回報 |
在軟體開發流程中,偵測程式碼錯誤是一個重要的活動。偵測程式碼錯誤的困難在於精確地找出程式碼錯誤位置並正確的修正。利用測試個案(Test cases)來測試軟體錯誤是最常見的方法,本文以程式樣式(pattern)的角度去偵測程式碼中的邏輯錯誤(logic error)。
在本論文中,我們提出一個利用程式樣式(pattern)去偵測邏輯錯誤(logic error)的方法,並使用關聯式規則探勘(Association Rule Mining)去找出常犯錯的樣式(pattern)。在本文中,樣式(pattern)由關鍵字(keywords)、類別(class)、函式(function)和類別方法(class method)所組成。樣式(pattern)可以是大眾化樣式(general patterns)或個人化樣式(personal patterns)。大眾化樣式(general patterns)為大眾常犯錯的程式樣式(pattern);個人化樣式(personal patterns) 為適性化的程式樣式(pattern)。
利用本研究提出的方法和本研究開發的工具,可以標示可能有問題的程式片段,程式設計師可以修正錯誤,進一步增加軟體品質。最後根據研究結果顯示,由本研究所提出的方法,大約有60%以上的準確率。
Detecting source code fault is an important activity in software development process. The difficulty of detecting source code fault is to find program errors precisely and then to correct them. Using test cases to test the software is the most common method to find software faults. In this thesis, we propose using program patterns to detect logic error from source code.
We developed an approach that applies program patterns to detect logic errors. Program patterns, which are composed of keywords, class, function and method, are determined by association rule mining. Program patterns can be either general patterns or personal patterns. General patterns stand for general mistakes of program segments, while personal patterns are adaptive errors made by individual programmers.
Fault-prone code segments can be marked by using the proposed approach. So programmer can fix bug and increase software quality further. In the experiment of our approach, the results show approximately above 60% accuracy.
[1] Wohlin, C. and P. Runeson, Defect content estimations from review data, in Proceedings of the 20th international conference on Software engineering. 1998, IEEE Computer Society: Kyoto, Japan. p. 400-409.
[2] Boehm, B.W., software engineering economic Vol. Ch. 4 Prentice Hall Upper Saddle River NJ. 1981.
[3] Jones, C., Applied Software Measurement- Assuring Productivity and Quality, ed. n. edn. 1996, McGraw-Hill, New York.
[4] Pressman , R.S., Software Enginnering- A Practitioner's Approach. 5th edn, ed. E.a.b. D.Ince. 2000, McGraw-Hill International , London.
[5] Myers, G.J., The Art of Software Testing, ed. Wiley-Interscience. 2004.
[6] Shinji, K., et al., Experimental Evaluation of Program Slicing for Fault Localization. Empirical Softw. Engg. %@ 1382-3256, 2002. 7(1): p. 49-76.
[7] Apt, K.R.a.O., E.R., Introduction to program verification.
[8] Software bug. Available from: http://en.wikipedia.org/wiki/Software_bug.
[9] McCabe, T.J., A Complexity Measure. IEEE Transactions on Software Engineering, 1976. 2: p. 308-320.
[10] Henry, S. and D. Kafura, Software Structure Metrics Based on Information Flow. Software Engineering, IEEE Transactions on, 1981. SE-7(5): p. 510-518.
[11] Qinbao, S., et al., Software defect association mining and defect correction effort prediction. Software Engineering, IEEE Transactions on, 2006. 32(2): p. 69-82.
[12] Frank, P., Using Machine Learning for Estimating the Defect Content After an Inspection. IEEE Transactions on Software Engineering, 2004. 30: p. 17-28.
[13] Briand, L.C., et al., A comprehensive evaluation of capture-recapture models for estimating software defect content. Software Engineering, IEEE Transactions on, 2000. 26(6): p. 518-540.
[14] Barbacci, M., Quality Attributes. Technical Report CMU/SEI-95-TR-021, ESC-TR-95-021, 1995.
[15] Paola Caliman, Q.C., Software Product Quality Evaluation and Certification:
the Qseal Consortium Methodology. 1996. ESSI-SCOPE project 21.694.
[16] Rosqvist, T., M. Koskela, and H. Harju, Software Quality Evaluation Based on Expert Judgement. Software Quality Control, 2003. 11(1): p. 39-55.
[17] Fitzpatrick, J., Applying the ABC metric to C, C++, and Java, in More C++ gems. 2000, Cambridge University Press. p. 245-264.
[18] Chang, C.-P., J.-L. Lv, and C.-P. Chu, A Defect Estimation Approach for Sequential Inspection Using a Modified Capture-Recapture Model, in Proceedings of the 29th Annual International Computer Software and Applications Conference - Volume 01. 2005, IEEE Computer Society. p. 41-46.
[19] IV, R.G.P. and H. Gomaa, Analyzing Behavior of Concurrent Software Designs for Embedded Systems, in Proceedings of the 10th IEEE International Symposium on Object and Component-Oriented Real-Time Distributed Computing. 2007, IEEE Computer Society. p. 124-132.
[20] Han, J., Data mining techniques. SIGMOD Rec., 1996. 25(2): p. 545.
[21] Yang, T., Computational verb decision trees. INTERNATIONAL JOURNAL OF COMPUTATIONAL COGNITION (HTTP://WWW. IJCC. US), 2006. 4(4).
[22] Han, J. and M. Kamber, Data mining: concepts and techniques. 2006: Morgan Kaufmann.
[23] Howarth, N., Abstract syntax tree design. 1955, Tech. rep., Architecture Projects Management Limited.
[24] Hellendoorn, H. and C. Thomas, On Quality Defuzzification-Theory and an Application Example. THEORY AND DECISION LIBRARY SERIES D, 1995: p. 167-176.
[25] Singh, Y., P.K. Bhatia, and O. Sangwan, Predicting software maintenance using fuzzy model. SIGSOFT Softw. Eng. Notes, 2009. 34(4): p. 1-6.
[26] Weiser, M., Program slicing, in Proceedings of the 5th international conference on Software engineering. 1981, IEEE Press: San Diego, California, United States. p. 439-449.
[27] Ottenstein, K.J. and L.M. Ottenstein, The program dependence graph in a software development environment. SIGSOFT Softw. Eng. Notes, 1984. 9(3): p. 177-184.
[28] Bieman, J.M. and L.M. Ott, Measuring Functional Cohesion. IEEE Trans. Softw. Eng., 1994. 20(8): p. 644-657.
[29] Gallagher, K.B. and J.R. Lyle, Using Program Slicing in Software Maintenance. IEEE Trans. Softw. Eng., 1991. 17(8): p. 751-761.
[30] Shahmehri, N., Generalized algorithmic debugging. 1991: Linkoping University, Dept. of Computer and Information Science.
[31] Beck, J. and D. Eichmann, Program and interface slicing for reverse engineering, in Proceedings of the 15th international conference on Software Engineering. 1993, IEEE Computer Society Press: Baltimore, Maryland, United States. p. 509-518.
[32] Tip, F., A survey of program slicing techniques. Journal of programming languages, 1995. 3(3): p. 121-189.
[33] Yang, B., L. Yao, and H.-Z. Huang, Early Software Quality Prediction Based on a Fuzzy Neural Network Model, in Proceedings of the Third International Conference on Natural Computation - Volume 01. 2007, IEEE Computer Society. p. 760-764.
[34] Khoshgoftaar, T.M., et al., Early Quality Prediction: A Case Study in Telecommunications. IEEE Softw., 1996. 13(1): p. 65-71.
[35] Khoshgoftaar, T.M., et al., Using Process History to Predict Software Quality. Computer, 1998. 31(4): p. 66-72.
[36] Xing, F., P. Guo, and M.R. Lyu, A Novel Method for Early Software Quality Prediction Based on Support Vector Machine, in Proceedings of the 16th IEEE International Symposium on Software Reliability Engineering. 2005, IEEE Computer Society. p. 213-222.
[37] Card, D.N., Defect-causal analysis drives down error rates. Software, IEEE, 1993. 10(4): p. 98-99.
[38] Card, D.N., Learning from our mistakes with defect causal analysis. Software, IEEE, 1998. 15(1): p. 56-63.
[39] Yu, W., A software fault prevention approach in coding and root cause analysis. Bell Labs Technical Journal, 1998. 3(2): p. 3-21.
[40] Collofello, J.S. and B.P. Gosalia, An application of causal analysis to the software modification process. Software: Practice and Experience, 1993. 23(10): p. 1095-1105.
[41] Eclipse Platform Technical Overview. Available from: http://www.eclipse.org/articles/Whitepaper-Platform-3.1/eclipse-platform-whitepaper.html.
[42] ANTLR. Available from: http://en.wikipedia.org/wiki/ANTLR.
[43] Building a CDT-based editor. Available from: http://www.ibm.com/developerworks/library/os-ecl-cdt1/index.html.
[44] Paul, S. and A. Prakash, A Framework for Source Code Search Using Program Patterns. IEEE Trans. Softw. Eng., 1994. 20(6): p. 463-475.
[45] Hovemeyer, D. and W. Pugh, Finding bugs is easy. SIGPLAN Not., 2004. 39(12): p. 92-106.
[46] Schleimer, S., D.S. Wilkerson, and A. Aiken, Winnowing: local algorithms for document fingerprinting, in Proceedings of the 2003 ACM SIGMOD international conference on Management of data. 2003, ACM: San Diego, California. p. 76-85.
[47] Heintze, N., Scalable document fingerprinting, in Proc. Second USENIX Workshop on Electronic Commerce, USENIX, Oakland, CA,. 1996. p. pp. 191-200.
[48] Rutar, N., C.B. Almazan, and J.S. Foster, A Comparison of Bug Finding Tools for Java, in Proceedings of the 15th International Symposium on Software Reliability Engineering. 2004, IEEE Computer Society. p. 245-256.
[49] Erich Gamma, R.H., Ralph Johnson, John Vlissides, Design Patterns: Elements of Reusable Object-Oriented Software. 1995. Addison-Wesley,Reading, MA.
[50] Kurian, S. and M.J. Pont, The maintenance and evolution of resource-constrained embedded systems created using design patterns. J. Syst. Softw., 2007. 80(1): p. 32-41.
[51] antlr java grammar. Available from: http://www.antlr.org/grammar/1152141644268/Java.g.