Pendeteksian Klon Secara Semantik Berdasarkan Perilaku Kode

Priyambadha, Bayu (2015) Pendeteksian Klon Secara Semantik Berdasarkan Perilaku Kode. Masters thesis, Institut Technology Sepuluh Nopember.

[thumbnail of 5112201011-Undergraduate Thesis.pdf]
Preview
Text
5112201011-Undergraduate Thesis.pdf - Published Version

Download (3MB) | Preview

Abstract

Kegiatan penyalinan dan penyisipan fragmen kode dari suatu kode sumber ke kode sumber yang lain, dengan atau tidak disertai modifikasi, disebut sebagai kloning kode. Proses tersebut sering dilakukan oleh pengembang perangkat lunak. Keberadaan kloning akan meningkatkan usaha yang harus dilakukan oleh pengembang perangkat lunak dalam proses pemeliharaan kode baik berupa tenaga, waktu dan biaya. Kloning juga dapat menimbulkan cacat pada perangkat lunak. Oleh karena itu kloning harus ditemukan. Penelitian tentang pendeteksian keberadaan kloning telah dilakukan. Deteksi kloning secara semantik adalah salah satu metode deteksi yang masih butuh pendalaman. Salah satu metode deteksi kloning secara semantik adalah berdasarkan perilaku kode. Perilaku kode dideteksi dengan melihat input, output dan efek dari sebuah metode. Metode dengan input, output dan efek yang sama akan menunjukkan bahwa secara fungsi metode tersebut adalah sama. Namun, metode deteksi tersebut tidak dapat digunakan pada metode yang sifatnya void, atau tidak memiliki nilai kembalian maupun parameter input. Proses melihat kesamaan tipe input, output dan efek hanya dilakukan dengan menggunakan pendekatan kesamaan string.
Pada penelitian ini diusulkan sebuah metode dalam proses deteksi kloning kode secara semantik. Dalam metode ini, proses deteksi dilakukan pada seluruh metode tanpa kecuali. Deteksi input, output dan efek pada sebuah metode void dilakukan dengan menggunakan PDG (Program Dependence Graph). Proses pencocokan kesamaan metode berdasarkan tipe input, output dan efek dilakukan berdasarkan informasi semantik yang dikandung. Untuk mendapatkan perilaku metode, uji coba dilakukan pada setiap metode. Uji coba tersebut dilakukan dengan memberikan data input secara random kepada metode yang sedang diuji. Output yang keluar dari metode ditangkap untuk dicatat sebagi bahan proses pencocokan kesamaan. Kelompok metode dengan nilai input dan output yang sama adalah metode yang memiliki kesamaan secara perilaku.
Dengan menerapkan metode tersebut, maka deteksi kloning kode pada sebuah kode sumber dapat dilakukan secara menyeluruh. Penggunaan metode deteksi klon secara semantik berdasarkan perilaku kode ini memiliki nilai koefisien Kappa sebesar 0,2128. Nilai tersebut dapat diinterpretasikan bahwa hasil tingkat kecocokan antara sistem dan pakar pada penelitian ini adalah cukup (fair agreement).
==========================================================================================================
Activities copying and insertion fragments of a source code to another source code, with or without accompanying by the modification, are known as code cloning. The software developer is often doing this activity. The existence of cloning would increase the effort that must be made by software developers in the process of the maintenance of code in the form of manpower, time, and cost. Cloning can also cause defects in the software. Hence, cloning must be found. Research on detecting the presence of cloning has been done. Detection of cloned semantically is a detection method that still need a deepening. One of detection method of semantic cloning is based on the behavior of the code. The code behavior detected by looking at input, output and effects of the method. Methods with input, output, and the same effect will show that is a function of the method is the same. However, the detection method could not be used on a void method. The process of seeing the similarity type of input, output and effects only effected by using the string similarity approach.
This research proposed a method of semantic code clone detection. In this method, the detection process is performed on the entire method without exception. Detection of input, output and effects in a void method done using PDG (Program Dependence Graph). The process of matching similarity of method based on the type of input, output, and the effect is done based on semantic information is contained. On every method, testing has performed to get the behavior methods. The test is done with random input data to the method being tested. The result of method testing was recorded to observes the behavior of methods. Group method with the same value of input and output are methods that have similarities in behavior.
By applying the method, then the expected detection of cloned code on the source code can be done thoroughly. The use of clone detection methods semantically based on behavior has a value of the Kappa coefficient of 0.2128. This value can be interpreted that the results of the level of agreement between systems and experts in this study were fair agreement.

Item Type: Thesis (Masters)
Additional Information: RTIf 005.453 Pri p
Uncontrolled Keywords: deteksi kloning, semantik kloning, kloning perilaku, perawatan perangkat lunak.
Subjects: Q Science > QA Mathematics > QA76.754 Software architecture. Computer software
Divisions: Faculty of Information and Communication Technology > Informatics > 55201-(S1) Undergraduate Thesis
Depositing User: Mr. Tondo Indra Nyata
Date Deposited: 16 May 2019 03:25
Last Modified: 16 May 2019 03:25
URI: http://repository.its.ac.id/id/eprint/63042

Actions (login required)

View Item View Item