Using improved context-based code description for robust algorithmic binding to changing code

Alexey Goloveshkin, Stanislav Mikhalkovich · Procedia Computer Science · 2021

In a computer program, multiple problems are usually solved, both domain-specific and technical. The solution of a problem can be concentrated in a single decomposition element (e.g. class or method) or be implemented with multiple code fragments scattered throughout the codebase. With no supporting tools, scattered solutions are hard to explore and modify, because the fact that there is a the high-level semantic connection between some code fragments is not articulated in the code itself. To overcome this difficulty, programmers need a special tool to mark all the fragments that solve a single problem (to bind to them) and then use this markup to navigate through the project. The markup must be robust, i.e., all the fragments previously marked must be successfully found in the changed code. A method for achieving this robustness has recently been proposed. It consists in representing the marked code fragment as a set of structures called ”contexts”. Contexts capture valuable information about the fragment and its surrounding. This information is then used to find the fragment algorithmically in the edited code. In the present paper, the method is further improved. More informative contexts and more precise search algorithms are presented, allowing the tool to automatically find the vast majority of previously marked fragments existing in the edited code.

Read the paper · More papers on PaperTik