Please refer to this document on how to run Ref-Finder. To

Create XML-Formatted Output

  1. Verify View takes an original output from Ref-Finder as an input. You must run Ref-Finder on the targeted version pairs prior creating the XML-formatted output.
  2. Add the Verify View by selecting "Window->Show View->Other", scrolling to LSDiff and selecting Verify.
    1Show_view.jpg
  3. Click the "Generate XML file" icon in the upper right corner of the Verify View.
    2Openxml.jpg
  4. Select from the dropdowns the before and after project versions from your workspace and press "OK".
  5. Once the process is done, a file "RefList.xml" will be created in the same folder as Ref-Finder output.
    3xmlfile.jpg
  6. Each refactoring will has its own node and the children containing information, which are
    • package: the package where the refactoring occurs
    • class: the class where the refactoring occurs
    • secondClass: another class where the refactoring occurs if it involves in more than one class
    • oldMethod: the method where the refactoring occurs
    • newMethod: another method where the refactoring occurs if it involves in more than one method
    • field: the field involving in the refactoring
    • parameter: the parameter of the method where the refactoring occurs
    • check: manual inspection result, which can be "CORRECT," "INCORRECT," "AMBIGUOUS," or "NOT_VERFIED"
    • comment: the comment from manual inspection


Read XML-Formatted Output

  1. Click the "Load XML file" icon in the upper right corner of the Verify View.
    4loadxml.jpg
  2. Select from the dropdowns the before and after project versions from your workspace and press "OK".
  3. On the left you will see a list of found refactorings. Double click to pull up more information on the right.
  4. Double click on the refactoring name in the left panel to change the manual inspection result or add comment.
    5edit.jpg
  5. Double click on file name under "Compare:" on the right panel to open the diff perspective of the file.
    6diff.jpg


Note

  • Currently Verify View supports 35 refactoring types, which are
    • Add Parameter
    • Change Uni to Bi
    • Collapse Hierarchy
    • Consolidate Conditional Expression
    • Consolidate Duplicate Cond Fragment
    • Decompose Conditional
    • Extract Class
    • Extract Hierarchy
    • Extract Interface
    • Extract Method
    • Extract Subclass
    • Extract Superclass
    • Introduce Assertion
    • Introduce Explaining Variable
    • Introduce Null Object
    • Inline Temp
    • Inline Method
    • Move Field
    • Move Method
    • Parameterize Method
    • Pull Up Field
    • Pull Up Method
    • Push Down Method
    • Remove Assignment to Parameter
    • Remove Control Flag
    • Remove Parameter
    • Remove Setting Method
    • Rename Method
    • Replace Conditional with Polymorphism
    • Replace Data with Object
    • Replace Exception with Test
    • Replace Magic Number with Constant
    • Replace Method with Method Objects
    • Replace Nested Cond Guard Clause
    • Replace Temp with Query
  • To add support for new refactoring type, you must add new handler in xmlparser.java in LSclipse.