|
||||||||||
|
DOI: 10.17587/it.27.451-460 A. Yu. Saparov, Cand. of Eng., e-mail: say.saplh@gmail.com, A. P. Beltyukov, Dr. of Ph.-Math. Sci., Professor, e-mail: belt.udsu@gmail.com, S. G. Maslov, Cand. of Eng., Associate Professor, e-mail: msh.sci.it@gmail.com, Udmurt State University, Izhevsk, 426034, Russian Federation Comparison of Open Source Code when Updating using the Damerau-Levenshtein Distance The paper describes a text comparison problem that arises during the update of open source programs in the presence of user changes. An algorithm based on calculating the Damerau — Levenshtein distance is used to correctly match the lines of two texts. The main difference between the proposed algorithm and the classical one is that the weights of such operations as insert, delete, replace, and permute are not constants, but depend on the values of individual text elements and their location. The paper also describes the functionality that allows the programmer to simplify the task of analyzing changes in program texts. The functionality is based on dynamic control of the comparison process, during which the programmer can manually establish correspondences between the compared texts. The effectiveness of the proposed method is checked when updating modules in the 1C:Enterprise system. |