Chulalongkorn University Theses and Dissertations (Chula ETD)

การออกแบบและพัฒนาเครื่องมือค้นหาร่องรอยที่ไม่ดีสำหรับโปรแกรมภาษาจาวา

Other Title (Parallel Title in Other Language of ETD)

Design and implementation of a tool for detecting bad-smell in Java program

Year (A.D.)

2008

Document Type

Thesis

First Advisor

พรศิริ หมื่นไชยศรี

Faculty/College

Faculty of Engineering (คณะวิศวกรรมศาสตร์)

Degree Name

วิทยาศาสตรมหาบัณฑิต

Degree Level

ปริญญาโท

Degree Discipline

วิศวกรรมซอฟต์แวร์

DOI

10.58837/CHULA.THE.2008.1284

Abstract

วิทยานิพนธ์นี้นำเสนอวิธีการ และ พัฒนาเครื่องมือในการค้นหาร่องรอยที่ไม่ดีสำหรับ ซอร์สโค้ดภาษาจาวา 4 ประเภท คือ Feature Envy, Message Chains, Middle Man, และ Inappropriate Intimacy (General Form) โดยใช้ภาษาโปรล็อก ซึ่งเริ่มจากการออกแบบกฎโปรล็อกจากร่องรอยที่ไม่ดี และ สร้างข้อเท็จจริงจากซอร์สโค้ดต้นฉบับภาษาจาวา จากนั้นจะใช้ข้อคำถามโปรล็อกในการค้นหาร่องรอยที่ไม่ดี ผู้วิจัยได้ประเมินความสามารถของวิธีการ และ เครื่องมือ โดยทดสอบกับโปรแกรมต้นฉบับภาษาจาวา 3 ระบบ แล้วเปรียบเทียบผลที่ได้จากการค้นหาด้วยเครื่องมือที่พัฒนาขึ้นกับค่าความจริง ผลการประเมินพบว่า วิธีการนี้สามารถค้นหาร่องรอยที่ไม่ดีประเภท Feature Envy (Attribute), Message Chains, Middle Man, และ Inappropriate Intimacy (General Form) ได้ 100% และ Feature Envy (Method) ได้ 82.61%

Other Abstract (Other language abstract of ETD)

The thesis proposes an approach for detecting and locating four bad-smell (Feature Envy, Message Chains, Middle Man, and Inappropriate Intimacy (General Form)) using Prolog. An automatic tool is developed to support the proposed approach. The approach starts by designing Prolog rules from the bad-smell and constructing Prolog facts from a sample of Java source code. Which is then, Prolog query is used to search for bad-smell. The approach is accessed using three Java programs by comparing the obtained results with actual result. The result shows that the proposed approach can 100% correctly detect bad-smell: Message Chains, Middle Man, Inappropriate Intimacy (General Form), Feature Envy (Attribute) and 82.61% for Feature Envy (Method).

Share

COinS