博碩士論文 111522058 詳細資訊




以作者查詢圖書館館藏 以作者查詢臺灣博碩士 以作者查詢全國書目 勘誤回報 、線上人數:70 、訪客IP:3.144.84.61
姓名 黃印榕(Yin-Jung Huang)  查詢紙本館藏   畢業系所 資訊工程學系
論文名稱 基於程式語言支援AI生成程式碼分離以改善程式碼可讀性
(Support AI-generated Code Separation Based on Programming Language to Improve Code Readability)
相關論文
★ 條件判斷式事件驅動程式設計之C語言擴充★ 基于小波变换的指纹活度检测,具有聚集 LPQ 和 LBP 特征
★ 應用自動化測試於異質環境機器學習管道之 MLOps 系統★ 提升乳癌篩檢效率之批次排程框架
★ 設計具有可視化思維工具和程式作為單一步的 輔助學習程式之棋盤式遊戲★ TOCTOU 漏洞的靜態分析與實作
★ 用於繪製風力發電控制邏輯之特定領域語言★ 在Java程式語言中以雙向結構表達數學公式間關聯之設計與實作
★ 支援模組化規則製作之程式碼轉換工具★ 基於替代語意的 pandas DataFrame 靜態型別檢查器
★ 自動化時間複雜度分析的設計與實作–從軟體層面評估嵌入式系統的功率消耗★ 以震波層析成像為應用之特定領域語言實作與分析
★ 用特徵選擇減少疲勞偵測腦電圖通道數★ 一個應用紙本運算與數位化於程式設計學習使程序性思維可視化的機制
★ 基於抽象語法樹的陣列形狀錯誤偵測★ 從合作學習角色分工獲得函式程式設計思維學習遞迴程式的機制
檔案 [Endnote RIS 格式]    [Bibtex 格式]    [相關文章]   [文章引用]   [完整記錄]   [館藏目錄]   至系統瀏覽論文 (2029-7-19以後開放)
摘要(中) 基於大型語言模型的生成式人工智慧除了可以進行問答、翻譯和創作等任務外,在程式開發領域能生成程式碼、註解、測試資料或檢查錯誤等協助程式開發,許多程式開發者開始在軟體開發工作中使用生成式人工智慧。儘管人工智慧已經可以取代一部分程式撰寫工作,程式開發者在使用人工智慧生成程式碼時仍然存在一些問題。受限於自動化偏見,程式開發者對生成程式碼的視覺關注少於自行撰寫的程式碼,甚至可能在未經檢查的情況下直接使用,導致程式開發者需要面對陌生的人工智慧程式碼混合在程式碼專案中,提升理解程式碼的困難。本研究提出一種基於程式語言的機制分離人工智慧生成程式碼,將人工智慧程式碼從原始碼檔案中分離出,以改善整體程式碼可讀性。我們使用認知負荷量表和程式碼複雜度指標進行評估,結果顯示程式碼可讀性確實得到改善。
摘要(英) The generative AI based on large language models can not only perform tasks such as Q&A, translation, and creation, but also assist in software development by generating code, comments, test data, or checking for errors. Many developers have begun using generative AI in their software development work. Although AI can already replace some parts of coding, there are still some issues when developers use AI to generate code. Due to automation bias, developers pay less visual attention to AI-generated code compared to code they write themselves, and they might even use it directly without checking, leading to difficulties in understanding the code when unfamiliar AI-generated code is mixed into their projects. This study proposes a mechanism based on programming languages to separate AI-generated code, isolating it from the original code files to improve overall code readability. We used cognitive load scales and code complexity metrics for evaluation, and the results show that code readability has indeed improved.
關鍵字(中) ★ 生成式人工智慧
★ 程式碼可讀性
★ 程式語言擴充
★ 關注事分離
關鍵字(英) ★ Generative Artificial Intelligence
★ Code Readability
★ Programming Language Extension
★ Separation of Concerns
論文目次 摘要i
Abstract ii
目錄iii
一、緒論1
1.1 基於大型語言模型的生成式人工智慧.............................. 1
1.2 生成式人工智慧應用於程式碼生成................................. 2
1.3 生成程式碼的品質...................................................... 2
1.3.1 人工智慧的程式能力接近入門程式開發者............... 3
1.3.2 生成式人工智慧的幻覺問題................................. 3
1.4 生成式人工智慧引起程式開發問題................................. 4
1.4.1 程式開發者的應對策略....................................... 4
1.5 論文架構.................................................................. 5
二、動機6
2.1 使用ChatGPT 生成程式碼............................................. 6
2.1.1 ChatGPT 相關參數設置....................................... 7
2.1.2 提出問題並送出訊息.......................................... 8
2.1.3 接收並檢查返回的程式碼.................................... 9
2.2 使用GitHub Copilot 生成程式碼..................................... 12
2.2.1 GitHub Copilot 相關設置...................................... 12
2.2.2 在開發過程中生成推薦的程式碼........................... 12
2.3 小結........................................................................ 13
三、提案15
3.1 生成程式碼分離......................................................... 15
3.1.1 生成程式碼的標記與分離.................................... 16
3.1.2 生成程式碼驗證................................................ 17
3.2 應用範例.................................................................. 18
四、實作20
4.1 標記分離人工智慧生成程式碼....................................... 20
4.1.1 裝飾器complete_with_chatgpt .......................... 20
4.1.2 人工智慧程式碼分離生成流程.............................. 21
4.2 程式碼生成紀錄......................................................... 23
4.2.1 使用YAML 格式儲存程式碼紀錄.......................... 23
4.2.2 相關參數使用................................................... 23
4.3 驗證生成程式碼......................................................... 24
4.3.1 語法驗證......................................................... 24
4.3.2 測試資料驗證................................................... 24
4.3.3 控制流程驗證................................................... 25
五、評估27
5.1 評估使用的程式資料集................................................ 27
5.2 認知負荷量表............................................................ 28
5.3 程式碼複雜度量測...................................................... 29
5.3.1 程式碼複雜度指標影響開發者理解程式碼............... 29
5.3.2 程式碼行數...................................................... 30
5.3.3 霍爾斯特德複雜度量測....................................... 30
5.4 生成程式碼正確性...................................................... 31
5.5 效能影響.................................................................. 32
六、相關研究34
6.1 大型語言模型............................................................ 34
6.2 程式輔助工具............................................................ 35
6.2.1 聊天機器人...................................................... 35
6.2.2 程式碼推薦系統................................................ 36
6.2.3 實作的選擇和限制............................................. 36
七、總結37
7.1 研究限制與未來展望................................................... 37
參考文獻39
參考文獻 [1] K.-B. Ooi, G. W.-H. Tan, M. Al-Emran, et al., “The potential of generative artificial
intelligence across disciplines: Perspectives and future directions,” Journal of Computer
Information Systems, pp. 1–32, 2023.
[2] OpenAI. “Chatgpt.” (2022), [Online]. Available: https : / / openai . com / chatgpt/
(visited on 06/17/2024).
[3] T. Brown, B. Mann, N. Ryder, et al., “Language models are few-shot learners,” Advances
in neural information processing systems, vol. 33, pp. 1877–1901, 2020.
[4] OpenAI. “Openai codex.” (2021), [Online]. Available: https://openai.com/index/
openai-codex/ (visited on 06/17/2024).
[5] M. Chen, J. Tworek, H. Jun, et al., “Evaluating large language models trained on code,”
arXiv preprint arXiv:2107.03374, 2021.
[6] GitHub and OpenAI. “Github copilot.” (2021), [Online]. Available: https://github.
com/features/copilot/ (visited on 06/17/2024).
[7] I. Shani. “Survey reveals ai's impact on the developer experience.” (2023), [Online].
Available: https://github.blog/2023-06-13-survey-reveals-ais-impacton-
the-developer-experience/ (visited on 06/17/2024).
[8] M. Kazemitabaar, J. Chow, C. K. T. Ma, B. J. Ericson, D. Weintrop, and T. Grossman,
“Studying the effect of ai code generators on supporting novice learners in introductory
programming,” in Proceedings of the 2023 CHI Conference on Human Factors in Computing
Systems, 2023, pp. 1–23.
[9] M. Wermelinger, “Using github copilot to solve simple programming problems,” in Proceedings
of the 54th ACM Technical Symposium on Computer Science Education V. 1,
2023, pp. 172–178.
[10] M. E. Ellis, K. M. Casey, and G. Hill, “Chatgpt and python programming homework,”
Decision Sciences Journal of Innovative Education, vol. 22, no. 2, pp. 74–87, 2024.
[11] J. Finnie-Ansley, P. Denny, B. A. Becker, A. Luxton-Reilly, and J. Prather, “The robots
are coming: Exploring the implications of openai codex on introductory programming,”
in Proceedings of the 24th Australasian Computing Education Conference, 2022, pp. 10–
19.
[12] J. Finnie-Ansley, P. Denny, A. Luxton-Reilly, E. A. Santos, J. Prather, and B. A. Becker,
“My ai wants to know if this will be on the exam: Testing openai's codex on cs2 programming
exercises,” in Proceedings of the 25th Australasian Computing Education Conference,
2023, pp. 97–104.
[13] B. Idrisov and T. Schlippe, “Program code generation with generative ais,” Algorithms,
vol. 17, no. 2, p. 62, 2024.
[14] M. Westerlund, “The emergence of deepfake technology: A review,” Technology innovation
management review, vol. 9, no. 11, 2019.
[15] S. Kabir, D. N. Udo-Imeh, B. Kou, and T. Zhang, “Is stack overflow obsolete? an empirical
study of the characteristics of chatgpt answers to stack overflow questions,” in
Proceedings of the CHI Conference on Human Factors in Computing Systems, 2024,
pp. 1–17.
[16] S. Overflow. “Policy: Generative ai (e.g., chatgpt) is banned.” (2022), [Online]. Available:
https://github.blog/2023- 06- 13- survey-reveals- ais- impact- onthe-
developer-experience/ (visited on 06/17/2024).
[17] N. Perry, M. Srivastava, D. Kumar, and D. Boneh, “Do users write more insecure code
with ai assistants?” In Proceedings of the 2023 ACM SIGSAC Conference on Computer
and Communications Security, 2023, pp. 2785–2799.
[18] L. J. Skitka, K. L. Mosier, and M. Burdick, “Does automation bias decision-making?”
International Journal of Human-Computer Studies, vol. 51, no. 5, pp. 991–1006, 1999.
[19] S. Imai, “Is github copilot a substitute for human pair-programming? an empirical study,”
in Proceedings of the ACM/IEEE 44th International Conference on Software Engineering:
Companion Proceedings, 2022, pp. 319–321.
[20] N. Al Madi, “How readable is model-generated code? examining readability and visual
inspection of github copilot,” in Proceedings of the 37th IEEE/ACM International Conference
on Automated Software Engineering, 2022, pp. 1–5.
[21] S. Barke, M. B. James, and N. Polikarpova, “Grounded copilot: How programmers interact
with code-generating models,” Proceedings of the ACM on Programming Languages,
vol. 7, no. OOPSLA1, pp. 85–111, 2023.
[22] P. Vaithilingam, T. Zhang, and E. L. Glassman, “Expectation vs. experience: Evaluating
the usability of code generation tools powered by large language models,” in Chi
conference on human factors in computing systems extended abstracts, 2022, pp. 1–7.
[23] G. Heyman, R. Huysegems, P. Justen, and T. Van Cutsem, “Natural language-guided
programming,” in Proceedings of the 2021 ACM SIGPLAN International Symposium
on New Ideas, New Paradigms, and Reflections on Programming and Software, 2021,
pp. 39–55.
[24] P. Denny, V. Kumar, and N. Giacaman, “Conversing with copilot: Exploring prompt
engineering for solving cs1 problems using natural language,” in Proceedings of the 54th
ACM Technical Symposium on Computer Science Education V. 1, 2023, pp. 1136–1142.
[25] Y. Liu, T. Le-Cong, R. Widyasari, et al., “Refining chatgpt-generated code: Characterizing
and mitigating code quality issues,” ACM Transactions on Software Engineering
and Methodology, 2023.
[26] R. P. Buse and W. R. Weimer, “Learning a metric for code readability,” IEEE Transactions
on software engineering, vol. 36, no. 4, pp. 546–558, 2009.
[27] F. G. Paas, “Training strategies for attaining transfer of problem-solving skill in statistics:
A cognitive-load approach.,” Journal of educational psychology, vol. 84, no. 4, p. 429,
1992.
[28] J. Sweller, J. J. Van Merrienboer, and F. G. Paas, “Cognitive architecture and instructional
design,” Educational psychology review, vol. 10, pp. 251–296, 1998.
[29] G.-J. Hwang, L.-H. Yang, and S.-Y. Wang, “A concept map-embedded educational computer
game for improving students’ learning performance in natural science courses,”
Computers & Education, vol. 69, pp. 121–130, 2013.
[30] R. Likert, “A technique for the measurement of attitudes.,” Archives of psychology, 1932.
[31] N. Peitek, S. Apel, C. Parnin, A. Brechmann, and J. Siegmund, “Program comprehension
and code complexity metrics: An fmri study,” in 2021 IEEE/ACM 43rd International
Conference on Software Engineering (ICSE), IEEE, 2021, pp. 524–536.
[32] M. H. Halstead, Elements of Software Science (Operating and programming systems
series). Elsevier Science Inc., 1977.
[33] Microsoft. “Microsoft copilot.” (2023), [Online]. Available: https://copilot.microsoft.
com/ (visited on 06/23/2024).
[34] B. Roziere, J. Gehring, F. Gloeckle, et al., “Code llama: Open foundation models for
code,” arXiv preprint arXiv:2308.12950, 2023.
[35] Y. Wang, H. Le, A. D. Gotmare, N. D. Bui, J. Li, and S. C. Hoi, “Codet5+: Open code
large language models for code understanding and generation,” arXiv preprint arXiv:2305.07922,
2023.
[36] D. L. Parnas, “Software aspects of strategic defense systems,” Communications of the
ACM, vol. 28, no. 12, pp. 1326–1335, 1985.
[37] A. Vaswani, N. Shazeer, N. Parmar, et al., “Attention is all you need,” Advances in neural
information processing systems, vol. 30, 2017.
[38] N. T. De Sousa and W. Hasselbring, “Javabert: Training a transformer-based model for
the java programming language,” in 2021 36th IEEE/ACM International Conference on
Automated Software Engineering Workshops (ASEW), IEEE, 2021, pp. 90–95.
[39] A. Svyatkovskiy, S. K. Deng, S. Fu, and N. Sundaresan, “Intellicode compose: Code
generation using transformer,” in Proceedings of the 28th ACM joint meeting on European
software engineering conference and symposium on the foundations of software
engineering, 2020, pp. 1433–1443.
[40] G. DeepMind. “Alphacode.” (2022), [Online]. Available: https://alphacode.deepmind.
com/ (visited on 06/17/2024).
[41] Y. Li, D. Choi, J. Chung, et al., “Competition-level code generation with alphacode,”
Science, vol. 378, no. 6624, pp. 1092–1097, 2022.
[42] A. Kashefi and T. Mukerji, “Chatgpt for programming numerical methods,” Journal of
Machine Learning for Modeling and Computing, vol. 4, no. 2, 2023.
[43] Google. “Gemini.” (2023), [Online]. Available: https://gemini.google.com/ (visited
on 06/23/2024).
[44] O. Campesato, Google Gemini for Python: Coding with Bard. Stylus Publishing, LLC,
2024.
[45] C. Bird, D. Ford, T. Zimmermann, et al., “Taking flight with copilot,” Communications
of the ACM, vol. 66, no. 6, pp. 56–62, 2023.
[46] A. Cockburn, L. Williams, et al., “The costs and benefits of pair programming,” Extreme
programming examined, vol. 8, pp. 223–247, 2000.
指導教授 莊永裕(YungYu Zhuang) 審核日期 2024-7-30
推文 facebook   plurk   twitter   funp   google   live   udn   HD   myshare   reddit   netvibes   friend   youpush   delicious   baidu   
網路書籤 Google bookmarks   del.icio.us   hemidemi   myshare   

若有論文相關問題,請聯絡國立中央大學圖書館推廣服務組 TEL:(03)422-7151轉57407,或E-mail聯絡  - 隱私權政策聲明