Save 37% off PRO during our Black Friday Sale! »

Change-Based Refactoring Mining

Change-Based Refactoring Mining

Mining refactorings from source code repositories has been an active research topic in the past decade. However, the state of the art infers refactorings by comparing two snapshots of a system, as such missing so-called “floss refactoring” activities. In this paper we propose a solution that identifies refactorings not on snapshots of a system but on the actual changes as they are performed in an integrated development environment. As such, we should get a more precise picture on how refactorings intersperse between other editing operations. Presented at RefTest 2013 (http://reftest2013.wordpress.com).

7e6a5857a7eb4501c63ab00481ac3305?s=128

Javier Pérez

June 03, 2013
Tweet

Transcript

  1. June 3rd, 2013 Quinten David Soetens Javier Pérez Serge Demeyer

    Change-Based Refactoring Mining
  2. Echelon Formation Wedge Formation

  3. Mining Refactorings Move Method Rename Method Extract M ethod Extract

    Superclass Inline Method Hide Delegate Inline Temp M ove Field Pull Up Method Rem ove Param eter Identify which refactorings were performed during evolution of a software system.
  4. State of the Art All these are Snapshot Based

  5. Snapshots are Coarse Grained A F J

  6. Fine Grained Code Changes A B D E G H

    I J L M N P Q R S
  7. SVNKit Change Distiller Model Logger Distiller ChEOPSJ ChangeRecorders Applications TestSelection

    ChEOPSJ: Change-Based Test Optimization
 Quinten David Soetens and Serge Demeyer
 In "Proceedings of 16th European Conference on Software Maintenance and Reengineering, CSMR 2012
 Change-Based Test Selection in the Presence of Developer Tests
 Quinten David Soetens, Serge Demeyer and Andy Zaidman
 In "Proceedings of 17th European Conference on Software Maintenance and Reengineering, CSMR 2013

  8. First Class Change Objects Changes act on Source Code (FAMIX)

    Entities (e.g. AddClassChange, AddMethodChange, etc.)
  9. First Class Change Objects Changes have Structural Dependencies (e.g. AddMethod

    ---> AddClass--->AddPackage etc.)
  10. Change Graphs Move Method foo Rename foo to boo

  11. Refactoring Patterns FamixClass FamixMethod FamixMethod string name name RenameMethod Refactoring

    string ≠ FamixClass FamixMethod FamixMethod string name name string ≠ From To FamixClass FamixClass ≠ FamixMethod FamixMethod string name name FamixClass FamixClass ≠ FamixMethod FamixMethod string name name MoveMethod Refactoring From To
  12. Results

  13. Future Directions • Implement and evaluate this approach • Use

    Groove as Graph Transformation Engine • Compare with RefFinder • Extend with more Refactoring Patterns • Industrial Case Study
  14. Conclusions