http://lattes.cnpq.br/3892880818200205; MOREIRA, Jaziel Silva.
Resumo:
Refactoring is an activity that aims at improving design quality and code readability of a
system without changing its external behavior. It accounts for nearly 30% of all edits in a software life cycle. Although refactorings are behavior-preserving edits, studies show that developers tend to apply intentional behavioral change edits alongside refactorings (flossrefactoring). Floss-refactorings are known to be error-prone and require code revision. However, Little has been done to understand how developers relate refactorings to extra edits. Thus,in this work we propose a strategy for floss-refactoring data extraction, which can be used for extracting detailed information about the refactorings and extra edits applied throughout the versioning history of a Java project repository. In addition,to better understand how developers perform floss refactoring in real world, we conducted an empirical investigation to find out how extra edits are applied base don there factoring found in a commit. We mined repositories of 45 open-source projects and analyzed all commits where refactoring edits were performed along with non-refactoring edits. Our results showed that, depending on the refactoring performed, there are changes on the likelihood of some extra edits to be applied. For instance,the introduction of new methods is more common when an Extract Method or a Rename Method is performed. Other edits, such as the removal of a method, introduction of a new attribute to a class, o reven specific inner method edits, also presented significant change on its likelihood. Moreover, 14,4% of the extra edits were performed inside refactored entities, from which, the most common entities changed were Method Invocation, If Statement, Variable Declaration, Assignment, and Return Statement. However the likelihood of each specific entity type to be changed varies depending on the refactoring performed. Overall, the relationship patterns between refactorings and extra edits found in this work can be used to guide code revision, help developers to avoid faults related to floss refactoring, and to guide other refactoring-related researches.