Teamwork is the typical characteristic of software development, because the tasks can be splitted and parallelized. The independently working developers use Software Configuration Management (SCM) systems to apply version control to their files and to keep them consistent. Several SCM systems allow working on the same files concurrently, and attempt to auto-merge the files in order to facilitate the reconciliation of the parallel modifications. The merge should produce syntactically and semantically correct source code files, therefore, developers are often involved into the resolution of the conflicts. However, when a general textual-based approach reports a successful merge, the output can still be failed in compile time, because semantic correctness cannot be ensured trivially. Renaming an identifier consists of many changes, and can cause semantic errors in the output of the merge, which subsequently have to be corrected manually. This paper introduces that matching the identifier declarations, e.g. class, field, method, local variables, with their corresponding references in the abstract syntax trees of the revisions, and considering the detected renamings during the merge takes closer to semantic correctness. The problem is illustrated and a solution is elaborated in this work.
[1]
Eugene W. Myers,et al.
AnO(ND) difference algorithm and its variations
,
1986,
Algorithmica.
[2]
Wuu Yang,et al.
How to merge program texts
,
1994,
J. Syst. Softw..
[3]
Ralph E. Johnson,et al.
Refactoring-Aware Configuration Management for Object-Oriented Programs
,
2007,
29th International Conference on Software Engineering (ICSE'07).
[4]
Ulf Asklund,et al.
Identifying Conflicts During Structural Merge
,
1999
.
[5]
Ralph E. Johnson,et al.
Automated Detection of Refactorings in Evolving Components
,
2006,
ECOOP.
[6]
Jeffrey S. Foster,et al.
Understanding source code evolution using abstract syntax tree matching
,
2005,
MSR.
[7]
Tom Mens,et al.
A State-of-the-Art Survey on Software Merging
,
2002,
IEEE Trans. Software Eng..