Return to search

Programinio kodo palyginimo metodas / Source code comparison method

Darbe nagrinėjama programinio kodo palyginimo, siekiant rasti funkcinius dublikatus, problema. Tikslas - sukurti bei pasiūlyti universalų trivialiems pakeitimams atsparų programinio kodo palyginimo metodą. Darbe aprašomi du pasirinkti medžių palyginimo algoritmai: tikslus medžių redagavimo atstumo ir apytikslis pq-gram, pasižymintis geresniu našumu. Šie algoritmai praktiškai pritaikyti Java programinio kodo palyginimui: parašytas AST parseris bei programa, lyginanti XML dokumentus arba Java klases. Darbe įvertintos galimos AST transformacijos bei eksperimentiškai parinktos programinio kodo palyginimui tinkamiausios p ir q parametrų reikšmės pq-gram algoritmui. Pasiūlytas pq-gram algoritmo patobulinimas, pq-gram indeksuose saugant maišos funkcijų grąžintus įrašų atvaizdus. / This paper investigates a problem of source code comparison with a goal of finding functional code duplicates. The goal of this paper is to create and present a universal source code comparison method, which would be resistant to trivial changes. Two algorithms were chosen to achieve this goal: exact tree edit distance and approximate pq-gram, which has better performance. Both algorithms were practically applied for Java code comparison: an AST parser and a program, which compares XML documents or Java classes, were created. This paper also evaluates AST transformations as well as presents experimental results of p and q values best suited for code comparison. Args4j library is used to evaluate the quality of source code comparison results.

Identiferoai:union.ndltd.org:LABT_ETD/oai:elaba.lt:LT-eLABa-0001:E.02~2012~D_20140704_174310-57594
Date04 July 2014
CreatorsRimša, Juozas
ContributorsBukauskas, Linas, Vilnius University
PublisherLithuanian Academic Libraries Network (LABT), Vilnius University
Source SetsLithuanian ETD submission system
LanguageLithuanian
Detected LanguageUnknown
TypeMaster thesis
Formatapplication/pdf
Sourcehttp://vddb.library.lt/obj/LT-eLABa-0001:E.02~2012~D_20140704_174310-57594
RightsUnrestricted

Page generated in 0.0023 seconds