Chulalongkorn University Theses and Dissertations (Chula ETD)
การเปรียบเทียบคุณภาพซอฟต์แวร์จากการทำแอสเป็กรีแฟคทอริงด้วยจำนวนโค้ดโคลนที่แตกต่างกัน
Other Title (Parallel Title in Other Language of ETD)
A COMPARISON OF SOFTWARE QUALITY FROM ASPECT REFACTORING WITH DIFFERENT AMOUNT OF CODE CLONE
Year (A.D.)
2013
Document Type
Thesis
First Advisor
อัษฎาพร ทรัพย์สมบูรณ์
Faculty/College
Faculty of Commerce and Accountancy (คณะพาณิชยศาสตร์และการบัญชี)
Degree Name
วิทยาศาสตรมหาบัณฑิต
Degree Level
ปริญญาโท
Degree Discipline
การพัฒนาซอฟต์แวร์ด้านธุรกิจ
DOI
10.58837/CHULA.THE.2013.551
Abstract
การโปรแกรมเชิงแอสเป็กถูกเสนอเพื่อแก้ไขปัญหาโค้ดกระจัดกระจายและโค้ดพันกันในซอร์สโค้ดของซอฟต์แวร์ สามารถส่งผลให้คุณภาพซอฟต์แวร์ดีขึ้น งานวิจัยนี้จึงสนใจศึกษาแนวทางการใช้การโปรแกรมเชิงแอสเป็กสำหรับปรับปรุงซอฟต์แวร์เชิงวัตถุด้วยการทำแอสเป็กรีแฟคทอริง โดยมุ่งสนใจปัญหาโค้ดกระจัดกระจายที่ทำให้เกิดโค้ดซ้ำกันภายในหลายคลาส จึงเลือกจัดการเมท็อดคอลที่ซ้ำกันในหลายคลาสด้วยแอสเป็ก และพิจารณาผลจากการใช้แอสเป็กสำหรับจัดการเมท็อดคอลในจำนวนซ้ำของเมท็อดคอลที่แตกต่างกัน โดยประเมินคุณภาพของซอฟต์แวร์หลังทำแอสเป็กรีแฟคทอริง จากการรวบรวมค่ามาตรวัดของมาตรวัดเชิงวัตถุและมาตรวัดเชิงแอสเป็ก ผลมาตรวัดเชิงวัตถุพบว่าจากมาตรวัดซีเคทั้งหมด 6 มาตรวัด มีเพียง 3 มาตรวัดที่ได้รับผลกระทบจากการทำแอสเป็กรีแฟคทอริง ได้แก่ มาตรวัดคัพพลิงบีทวีนอ็อบเจกต์คลาส มาตรวัดเรสปอนซ์ฟอร์อะคลาส และมาตรวัดแลคออฟโคฮีชันอินเมท็อด โดยมาตรวัดเรสปอนซ์ฟอร์อะคลาส แสดงให้เห็นว่าคุณภาพซอฟต์แวร์ปรับปรุงดีขึ้น และปัจจัยที่ส่งผลต่อมาตรวัดเรสปอนซ์ฟอร์อะคลาส ได้แก่ จำนวนซ้ำของเมท็อดคอลและจำนวนคลาสที่สามารถจัดการเมท็อดคอลทั้งหมด ขณะที่มาตรวัดเชิงแอสเป็กทั้งหมด 10 มาตรวัด มีทั้งหมด 7 มาตรวัดที่ได้รับผลกระทบจากการทำแอสเป็กรีแฟคทอริง แต่ปัจจัยที่ส่งผลให้ค่ามาตรวัดเปลี่ยนแปลงไม่ได้เกิดจากจำนวนซ้ำของเมท็อดคอลที่จัดการด้วยแอสเป็ก หากเป็นปัจจัยอื่นๆแตกต่างกันไปในแต่ละมาตรวัดของมาตรวัดเชิงแอสเป็ก เช่น จำนวนแอดไวซ์ที่อิมพลีเมนต์ภายในแอสเป็ก จำนวนแอดไวซ์ที่เข้ามาขัดขวางการทำงานของคลาส จำนวนคลาสที่แอสเป็กสามารถเข้าไปขัดขวางการทำงาน เป็นต้น นอกจากนี้ยังพบว่าทั้งมาตรวัดเชิงวัตถุและมาตรวัดเชิงแอสเป็กแสดงให้เห็นว่าลักษณะของเมท็อดคอลที่จัดการด้วยแอสเป็กสามารถส่งผลต่อมาตรวัดที่เกี่ยวข้องกับคลัพพลิงและปรับปรุงคุณภาพซอฟต์แวร์ให้ดียิ่งขึ้น
Other Abstract (Other language abstract of ETD)
Aspect-oriented programming is an approach to solve code scattering and code tangling which help improve software quality. This research was to find a guideline in using Aspect-oriented programming to improve object-oriented software using aspect refactoring process with a focus on code scattering problem with duplicated code in several classes. The aspect refactoring process used in this research covers extracting different number of duplicated method calls in various classes into aspects resulting in several versions of software. CK Object-oriented metrics and Aspect-oriented metrics (AO) were used as software metrics on software versions applying aspect refactoring. The result showed that only three out of six CK metrics, Coupling Between Object classes (CBO), Response For a Class (RFC) and Lack of Cohesion in Methods (LCOM), were affected from aspect refactoring. Only RFC metric showed that software quality was improved as the number of duplicated codes grows or the number of classes affected by aspect refactoring grows. Considering AO metric, only seven out of ten AO metrics were affected from aspect refactoring. However, it cannot be concluded that the number of duplicated method calls affect the AO metrics. The number of advices implemented in aspect, the number of advices interrupt in classes and the number of classes interrupted by aspects were factors affect the AO metrics. In addition, the metric from OO and AO metrics concerning coupling from method calls indicate an improved software quality from aspect refactoring.
Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-No Derivative Works 4.0 International License.
Recommended Citation
กังพานิชกุล, ธนาภรณ์, "การเปรียบเทียบคุณภาพซอฟต์แวร์จากการทำแอสเป็กรีแฟคทอริงด้วยจำนวนโค้ดโคลนที่แตกต่างกัน" (2013). Chulalongkorn University Theses and Dissertations (Chula ETD). 19059.
https://digital.car.chula.ac.th/chulaetd/19059