跳到主要內容

臺灣博碩士論文加值系統

(216.73.217.85) 您好!臺灣時間:2026/11/29 12:18
字體大小: 字級放大   字級縮小   預設字形  
回查詢結果 :::

詳目顯示

: 
twitterline
研究生:李佳哲
研究生(外文):LEE, CHIA-CHE
論文名稱:JavaScript除錯與修補方法之研究
論文名稱(外文):On the Study of Automatically Debugging and Repairing JavaScript Programs
指導教授:陳文輝陳文輝引用關係
指導教授(外文):CHEN, WEN-HUEI
口試委員:林至中、廖耕億
口試委員(外文):LIN, JYH-JONG、LIAO, GEN-YIH
口試日期:2019-05-14
學位類別:碩士
校院名稱:銘傳大學
系所名稱:資訊管理學系碩士班
學門:電算機學門
學類:電算機一般學類
論文種類:學術論文
論文出版年:2019
畢業學年度:107
語文別:中文
論文頁數:54
中文關鍵詞:程式除錯、JavaScript、補丁
外文關鍵詞:Debug、JavaScript、Patch
相關次數:
  • 被引用被引用:5
  • 點閱點閱:359
  • 評分評分:
  • 下載下載:43
  • 收藏至我的研究室書目清單書目收藏:0
在軟體的開發過程中,錯誤(Bug)最讓工程師困擾,而除錯(Debug)也花最多時間,因此程式的自動除錯與修補(Automatic Program Debug and Repair)成為熱門的研究題目。在本論文中,我們先介紹以測試為基礎的自動除錯與修補(Test-Based Debug and Repair)模式,並探討在此模式下所發展的 Nopol系統。該系統乃由第一階段之定位錯誤位置(Bug Locating),與第二階段之產生補丁(Patch Generation)所組成,而Nopol又假設程式只存在單一錯誤(Single Fault)。由於Nopol僅能用於偵測與修補Java的錯誤,但目前工程師在設計前端介面時,JavaScript語言大量地被使用,因此在本論文中,我們將Nopol的方法應用於除錯與修補JavaScript的錯誤。我們有兩個貢獻,首先我們發現JavaScript使用大量的函數呼叫,而函數內的單一錯誤將因雙重呼叫而產生雙重錯誤,而無法被Nopol的機制所偵測。我們因而發展雙重函數呼叫的錯誤與修補機制,並再推展到多重函數呼叫的錯誤上。第二,由於JavaScript與Java的語法不同,我們針對後者的常見錯誤,發展新機制以產生更合適的補丁。
When developing a large software system, debugging is a very time-consuming process. As a result, Automatic Program Debug and Repair has become a hot research topic. In this thesis, we first review the Nopol system that can debug and repair Java programs, based on both the Test-Based Debug and Repair Model and the Single-Fault Model. Second, we revise Nopol to debug and repair JavaScript programs that are now popular in designing the front-end interface of web systems. Though Java and JavaScript share a lot of aspects, we point out that the latter one involves a lot of function calls that would cause a single-fault to become multiple faults that could not be debugged by the mechanism of Nopol. In addition, we propose a new mechanism to overcome this problem. Finally, we replace the brute-force patch generation process of Nopol with a new process that produces patches based on the special characteristics of JavaScript programs.
摘要 I
ABSTRACT II
誌謝 III
目錄 IV
表目錄 VI
圖目錄 VII
第壹章 緒論 1
第一節 研究背景 1
第二節 研究動機 4
第三節 研究問題與目的 5
第貳章 文獻探討 6
第一節 以測試為基礎的程式除錯與修復 6
第二節 除錯的相關研究 7
第三節 補丁產生的相關研究 8
第四節 Nopol的簡介 9
第五節 Nopol 除錯與修補機制的擴充 11
一、 Java 的 Switch 條件敘述錯誤之除錯 11
二、 Java 的 While 條件敘述錯誤之除錯 13
三、 以錯誤心理模型為基礎的Java補丁機制 17
第六節 JavaScript簡介 18
第參章 自動修補JavaScript的多重呼叫單一函數錯誤 20
第一節 雙重呼叫單一函數錯誤與多重呼叫單一函數錯誤 20
第二節 將Nopol修補機制移至JavaScript的環境 23
第三節 修補多重呼叫單一函數錯誤的新機制 24
一、 內包含If條件敘述之雙重呼叫單一函數錯誤實例 25
二、 雙重呼叫單一函數錯誤的除錯與修補方法 27
三、 修改Nopol以修補雙重呼叫單一函數包含If 條件敘述錯誤 29
四、 將雙重呼叫單一函數錯誤推演至多重呼叫單一函數錯誤 30
第肆章 JavaScript補丁產生機制 32
第一節 常見JavaScript產生的錯誤 32
一、 區域變數與全域變數 33
二、 變數資料型態不正確 34
三、 變數或物件尚未宣告 35
四、 變數汙染 35
五、 拼字或大小寫錯誤 36
六、 符號撰寫錯誤 37
第二節 針對JavaScript的補丁方法 38
一、 區域變數與全域變數之移位法 39
二、 變數資料型態不正確之替換法 39
三、 變數或物件尚未宣告之移位法 40
四、 變數汙染之宣告替換法 40
五、 拼字或大小寫錯誤之替換法 41
六、 符號撰寫錯誤之替換法 41
第伍章 結論 42
第一節 研究結果與討論 42
第二節 未來研究 42
參考文獻 43
玄躋峰、任志磊、王子元、謝曉園、江賀,「自动程序修复方法研究进展」,軟件學報,2015年9月,中國。(ISSN 1000-9825)
林子暄(2018)。軟體程式錯誤自動修補之研究。銘傳大學資訊管理學系碩士班碩士論文,台北市。
張智星,JavaScript程式設計與應用(修訂第二版),碁峰出版社,台北,台灣,2013。
莊惠淳編譯/Michael Morrison[原著],深入淺出JavaScript; 歐萊禮,台北,台灣,2008。
陳文輝,陳文輝程式作業紀錄 (2014年9月1日到2018年5月31日),銘傳大學資管系,桃園,台灣,2018年6月。
A. Carzaniga, A. Gorla, A. Mattavelli, N. Perino and M. Pezze, “Automatic recovery from runtime failures,” Proceedings of IEEE International Conference on Software Engineering, San Francisco, California, U. S. A., May 18 - 26 , 2013, pp. 782-791.
A. Gonzalez-Sanchez, H.-G. Gross and A. J. C. van Gemund. Modeling the Diagnostic Efficiency of Regression Test Suites, Proceedings of IEEE Software Testing, Verification and Validation Workshops, Berlin, Germany, March 21-25, 2011.
B. Jobstmann, A. Griesmayer and R. Bloem, “Program repair as a game,” Proceedings of International Conference on Computer Aided Verification, Edinburgh, Scotland, UK, July 6-10, 2005, pp. 226–238.
B. Laboon, A Friendly Introduction to Software Testing, CreateSpace Independent Publishing Platform, February 2016.
C. Goues, M. Dewey-Vogt, S. Forrest and W. Weimer, “A systematic study of automated program repair: Fixing 55 out of 105 bugs for $8 each,” Proceedings of the 34th International Conference on Software Engineering (ICSE), Zurich, Switzerland — June 2 - 9, 2012, pp. 3–13.
C. Goues, N. Holtschulte, E. Smith, Y. Brun, P. Devanbu, S. Forrest, and W. Weimer, “ The manybugs and introclass benchmarks for automated repair of c programs,” IEEE Transactions on Software Engineering, Vol. 41, Issue 12, 2015.
C. Goues, T. Nguyen, S. Forrest, and W. Weimer, “Genprog: A generic method for automatic software repair,” IEEE Transactions on Software Engineering, Vol. 38, Issue.1, 2012, pp. 54-72
D. H. ODell, “The Debugging Mindset,” Communications of ACM, Vol. 60, Issue 6, June 2017, pp. 40-45.
D. Kim, J. Nam, J. Song, and S. Kim, “Automatic patch generation learned from human-written patches,” Proceedings of International Conference on Software Engineering, San Francisco, California, U. S. A, May 2013, pp. 802–811.
E. Barr, Y. Brun, P. Devanbu, M. Harman and F. Sarro, “The plastic surgery hypothesis,” Proceedings of the 22nd ACM SIGSOFT International Symposium on Foundations of Software Engineering, Hong Kong, China, 2014, pp. 306-317.
E. Smith, E. Barr, C. Goues and Y. Brun, “Is the cure worse than the disease? overfitting in automated program repair,” Proceedings of the 10th Joint Meeting of the European Software Engineering Conference, Bergamo, Italy, September 2015.
F. Li, L. Z. Li, W. Huo and X. Feng, “Locating Software Faults Based on Minimum Debugging Frontier Set,” IEEE Trans. on Software Engineering, Vol. 43, Issue 8, Aug 2017.
F. Long and M. Rinard, “Staged program repair with condition synthesis,” Proceedings of the 10th Joint Meeting on Foundations of Software Engineering, ESEC/FSE 2015, Bergamo, Italy, September 2015, pp. 166–178.
F. Steimann, M. Frenkel and R. Abreu, “Threats to the validity and value of empirical assessments of the accuracy of coverage-based fault locators,” Proceedings of ACM International Symposium on Software Testing and Analysis, Lugano, Switzerland — July 15 - 20, 2013, pp. 314-324.
H. Cleve and A. Zeller, “Locating Causes of Program Failures, Proc. of IEEE International Conference on Software Engineering, Saint Louis, Missouri, U.S. A, May 2005.
H. Nguyen, D. Qi, A. Roychoudhury and S. Chandra, “Semfix: Program repair via semantic analysis,” Proc. of IEEE International Conference on Software Engineering, San Francisco, California, U. S. A., May 2013, pp. 772–781.
I. Sommerville, Software Engineering, 10th Edition, Addison-Wisley, Bonston, Massachusetts, U. S. A, May 2017.
Jake Spurlock, Bootstrap: Responsive Web Development 1st Edition, OReilly Media, May 25, 2013.
J. Campos, A. Riboira, A. Perez, and R. Abreu. Gzoltar, “An Eclipse plug-in for testing and debugging,” Proceedings of the 27th IEEE/ACM International Conference on Automated Software Engineering, Essen, Germany, September 3-7, 2012.
J. H. Perkins, G. Sullivan, W.-F. Wong, Y. Zibin, M. D. Ernst, M. Rinard, S. Kim, S. Larsen, S. Amarasinghe, J. Bachrach, M. Carbin, C. Pacheco, F. Sherwood and S. Sidiroglou, “ Automatically Patching Errors in Deployed Software,” Proceedings of the ACM SIGOPS 22nd Symposium on Operating Systems Principles, Big Sky, Montana, U. S. A., October 11-14, 2009, pp. 87-102.
J. Xuan and M. Monperrus, “Learning to combine multiple ranking metrics for fault localization,” Proc. of the 30th IEEE International Conference on Software Maintenance and Evolution, Victoria, BC, Canada, 2014, pp. 191–200.
J. Xuan, M. Martinez, F. DeMarco, M. Clement, S. L. Marcote, T. Durieux, D. L. Berre and M. Monperrus, “Nopol: automatic repair of conditional statement bugs in java programs, ” IEEE Trans. on Software Engineering, Vol. 43, No.1, January 2017.
L. Moura and N. Bjørner, “Z3: An efficient SMT solver,” Proc. of the 14th International Conference on Tools and Algorithms for the Construction and Analysis of Systems, Budapest, Hungary, March 29 – April 6, 2008, pp. 337-340.
M. Martinez and M. Monperrus, “Mining software repair models for reasoning on the search space of automated program fixing,” Journal of Empirical Software Engineering, Vol. 20, Issue 1, 2015, pp. 176-205.
M. Martinez, W. Weimer and M. Monperrus, “Do the fix ingredients already exist? an empirical inquiry into the redundancy assumptions of program repair approaches,” Proceedings of the 36th International Conference on Software Engineering, Hyderabad, India, May 31 - June 07, 2014 , pp. 492–495.
R. Abreu, P. Zoeteweij and A. J. Van Gemund. “On the accuracy of spectrum-based fault localization,” Proceedings of IEEE Conference on Testing: Academic and Industrial Conference Practice and Research Techniques (MUTATION), Windsor, UK, October 10-14, 2007.
RTI, “The Economic Impacts of Inadequate Infrastructure for Software Testing, Planning Report,” National Institute of Standard and Technology (NIST), Gaithersburg, Maryland, U. S. A., 2002.
S. Chandra, E. Torlak, S. Barman and R. Bodik, “ Angelic debugging,” Proceeding of the International Conference on Software Engineering, Waikiki, Honolulu, HI, USA, May 21 - 28, 2011.
S. Forrest, T. Nguyen, W. Weimer, C. Le Goues, “A genetic programming approach to automated software repair,” Proceedings of the 11th Annual Conference on Genetic and Evolutionary Computation, Montreal, Québec, Canada, July 8, 2009.
S. Mechtaev, J. Yi, and A. Roychoudhury, “Directfix: Looking for simple program repairs,” Proceedings of the IEEE 37th International Conference on Software Engineering, Florence, Italy, May 16-24, 2015.
T. Britton, L. Jeng, G. Carver, P. Cheak and T. Katzenellenbogen, “Reversible Debugging Software,” Technical Report, Judge Business School, Cambridge University, Cambridge U. K., 2013.
W. Weimer, T. Nguyen, C. Le Goues, S. Forrest. Automatically finding patches using genetic programming. Proceedings of the IEEE 31st International Conference on Software Engineering, Vancouver, BC, Canada, June 10, 2009.
Y. Pei, C. A. Furia, M. Nordio, Y. Wei, B. Meyer and A. Zeller, “Automated fixing of programs with contracts,” IEEE Transactions on Software Engineering, Vol. 40, No.5, 2014, pp.427–449.
Y. Pei, C. Furia, M. Nordio, Y. Wei, B. Meyer and A Zeller, “Automated Fixing of Programs with Contracts,” IEEE Transactions on Software Engineering, Vol. 40, Issue 5, May 2014.
Y. Qi, X. Mao, Y. Lei, Z. Dai, and C. Wang, “The strength of random search on automated program repair,” Proceedings of the 36th International Conference on Software Engineering, Hyderabad, India, June 2014, pp. 254-265.
Z. Qi, F. Long, S. Achour, and M. Rinard, “An analysis of patch plausibility and correctness for generate-and-validate patch generation systems,” Proc. of International Symposium on Software Testing and Analysis, Baltimore, Maryland, June 2015, U. S. A.

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