Chulalongkorn University Theses and Dissertations (Chula ETD)
Other Title (Parallel Title in Other Language of ETD)
Measuring technical debt from changes of code smells
Year (A.D.)
2024
Document Type
Thesis
First Advisor
ทวิตีย์ เสนีวงศ์ ณ อยุธยา
Faculty/College
Faculty of Engineering (คณะวิศวกรรมศาสตร์)
Department (if any)
Department of Computer Engineering (ภาควิชาวิศวกรรมคอมพิวเตอร์)
Degree Name
วิศวกรรมศาสตรดุษฎีบัณฑิต
Degree Level
ปริญญาเอก
Degree Discipline
วิศวกรรมคอมพิวเตอร์
DOI
10.58837/CHULA.THE.2024.1085
Abstract
หนี้ทางเทคนิคหมายถึงปัญหาที่เกิดจากการปล่อยซอฟต์แวร์ออกมาโดยที่ส่วนประกอบต่าง ๆ ยังไม่สมบูรณ์ ยังไม่ผ่านการพัฒนาเต็มที่ หรือยังไม่เหมาะสม ซึ่งอาจส่งผลให้ต้องใช้ความพยายามในการพัฒนาเพิ่มเติมในเวอร์ชันถัดไป — เปรียบเสมือนการจ่ายดอกเบี้ยในหนี้ทางการเงิน ร่องรอยที่ไม่ดีในโค้ดเป็นรูปแบบเฉพาะของหนี้ทางเทคนิค ซึ่งเมื่อปรากฏอยู่ในโค้ดเบสแล้วอาจนำไปสู่ปัญหาที่สร้างต้นทุนเพิ่มเติมในการพัฒนา งานวิจัยนี้ศึกษาผลกระทบของหนี้ทางเทคนิคที่เกิดจากร่องรอยที่ไม่ดีในโค้ด โดยการวิเคราะห์พฤติกรรมการเปลี่ยนแปลงของร่องรอยที่ไม่ดีในโค้ดเหล่านั้น เพื่อสร้างประวัติการเปลี่ยนแปลงของร่องรอยที่ไม่ดี ผู้วิจัยได้พัฒนาตัววัดหนี้ทางเทคนิคแบบละเอียดขึ้น เพื่อใช้วัดปริมาณหนี้โดยประเมินขนาดของกิจกรรมการปรับโครงสร้างใหม่ (แสดงถึงต้นหนี้) และกิจกรรมดอกเบี้ย (แสดงถึงดอกเบี้ยหนี้) และเสนอให้นำขนาดของกิจกรรมทั้งสองประเภทนี้ไปประยุกต์ใช้กับแบบจำลองการประเมินความพยายามโคโคโม 2 แทนที่จะใช้แบบจำลองซีเอเอ สำหรับการประเมินหนี้ทางเทคนิค แนวทางนี้ช่วยให้สามารถสร้างประวัติการเปลี่ยนแปลงของหนี้ทางเทคนิคจากร่องรอยที่ไม่ดีในโค้ดในโครงการซอฟต์แวร์ต่าง ๆ ที่อยู่ในชุดข้อมูลควอลิตัสได้ ในการวิเคราะห์ผลกระทบ ผู้วิจัยจำแนกพฤติกรรมการเปลี่ยนแปลงของหนี้ทางเทคนิคตามระดับความรุนแรงของหนี้ โดยจำแนกออกเป็น พฤติกรรมของต้นหนี้ 5 ประเภท และ พฤติกรรมของดอกเบี้ย 3 ประเภท แบบรูปพฤติกรรมเหล่านี้พบได้ในร่องรอยที่ไม่ดีในโค้ดทุกประเภทและในระบบซอฟต์แวร์ทุกระบบที่นำมาวิเคราะห์ การจำแนกดังกล่าวเผยให้เห็นว่า โดยเฉลี่ยแล้ว ร่องรอยที่ไม่ดีในโค้ด 30% ต่อระบบมีการสะสมดอกเบี้ย และ 5% แสดงระดับความรุนแรงของหนี้ในระดับสูง นอกจากนี้ ผู้วิจัยยังวิเคราะห์ความสัมพันธ์ระหว่างตัววัดหนี้ทางเทคนิคที่เสนอกับตัววัดซอฟต์แวร์อื่น ๆ โดยใช้วิธีการตามมาตรฐาน IEEE Std 1061-1998 ผลการวิเคราะห์แสดงให้เห็นว่า ไม่มีตัววัดซอฟต์แวร์ใดที่มีความสัมพันธ์เพียงพอจะใช้แทนตัววัดหนี้ทางเทคนิคที่เสนอได้ จากผลการศึกษาทั้งหมดนี้ ผู้วิจัยเสนอแนวทางการบริหารจัดการหนี้ทางเทคนิค โดยใช้การวิเคราะห์ต้นทุนและผลตอบแทน และ การวิเคราะห์จุดแตกหัก เพื่อช่วยในการกำหนดกลยุทธ์ จัดลำดับความสำคัญ และเฝ้าสังเกตหนี้ทางเทคนิค
Other Abstract (Other language abstract of ETD)
Technical debt refers to the problem of releasing software with incomplete, immature, or inadequate artifacts, which can lead to additional development effort in future versions—analogous to paying interest on a financial debt. Code smells are a specific type of technical debt that, when present in the codebase, can cause issues that incur additional costs. This research investigates the impact of code-smell-based technical debt, by analyzing their change behavior. To construct the change history of code smells, we developed fine-grained technical debt metrics. These metrics estimate the debt amount by measuring the size of refactoring activities (representing the principal) and interest activities (representing the interest). We suggested to apply these activity sizes to the COCOMO II effort estimation model, rather than the CAA model, for technical debt estimation. This approach enables the creation of a technical debt change history for code smells across software projects in the Qualitas corpus. In the impact analysis, we classified technical debt change behavior patterns based on technical debt severity, identifying five types of principal behavior and three types of interest behavior. These behavioral patterns were observed across all types of code smells and all systems analyzed. The classification revealed that, on average, 30% of code smells per system accumulate interest, and 5% exhibit high technical debt severity. Furthermore, we analyzed the relationship between the proposed technical debt metrics and other software metrics using the IEEE Std 1061-1998 methodology. The analysis showed that none of the other software metrics are sufficiently correlated to serve as substitutes for the proposed technical debt metrics. Based on these findings, we propose a technical debt management approach, using the cost-benefit analysis and breaking point analysis, for technical debt strategy identification, prioritization, and monitoring.
Creative Commons License

This work is licensed under a Creative Commons Attribution-NonCommercial-No Derivative Works 4.0 International License.
Recommended Citation
วิริยะกุล, เจษฎา, "การวัดหนี้ทางเทคนิคจากการเปลี่ยนแปลงของร่องรอยที่ไม่ดีในโค้ด" (2024). Chulalongkorn University Theses and Dissertations (Chula ETD). 74052.
https://digital.car.chula.ac.th/chulaetd/74052