Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 363257

Summary: The "Found potential matches" message of the refactoring tool is vague.
Product: [Eclipse Project] JDT Reporter: Mohsen Vakilian <reprogrammer>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: deepakazad, nchen, reprogrammer, snegara2
Version: 3.8   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
The screenshot showing the message "Found potential matches. Please review changes on the preview page." none

Description Mohsen Vakilian CLA 2011-11-08 22:18:51 EST
Build Identifier: 20110916-0149

Sometimes, the refactoring tool reports the following message to the user:

"Found potential matches. Please review changes on the preview page."

However, the above message doesn't provide enough information about the problem. As a results, programmers just ignore the message and perform the refactoring.

We did an empirical study on the refactoring tool of Eclipse using our custom data collector called CodingSpectator <http://codingspectator.cs.illinois.edu/>. Twelve of our 26 participants received the above message from the refactoring tool for a total of 28 times. These programmers performed the refactoring in spite of the above message 71% of the time. None of our participants knew what the message meant when they received it. See our paper at <http://hdl.handle.net/2142/27730> for more details. 

In what circumstances does the refactoring tool report the above message? We suggest that the refactoring tool provides more concrete information about what might have gone wrong during the refactoring so that the programmer can review and verify the change effectively.

Reproducible: Always

Steps to Reproduce:
Open the following piece of Java code in Eclipse and invoke the rename refactoring on method "C.m(int)" to change it to "C.o(int)".

class C {

  void m() {
  }

  void m(int a) {
  }

  void n() {
    m(i); // This line contains a compilation problem because i is not declared.
  }
}

The refactoring tool will report the message "Found potential matches. Please review changes on the preview page."
Comment 1 Mohsen Vakilian CLA 2011-11-08 22:23:16 EST
Created attachment 206642 [details]
The screenshot showing the message "Found potential matches. Please review changes on the preview page."

The attachment shows a screenshot of the dialog that reports the following message of the refactoring tool:

"Found potential matches. Please review changes on the preview page."

Note that the dialog does not provide a preview button even though the message instructs the user to preview the change.
Comment 2 Deepak Azad CLA 2011-11-08 23:06:06 EST
Thanks for the bug reports Mohsen!

(In reply to comment #0)
> In what circumstances does the refactoring tool report the above message? We
> suggest that the refactoring tool provides more concrete information about what
> might have gone wrong during the refactoring so that the programmer can review
> and verify the change effectively.
This is bug 198921.

*** This bug has been marked as a duplicate of bug 198921 ***
Comment 3 Mohsen Vakilian CLA 2011-11-08 23:39:58 EST
(In reply to comment #2)
> Thanks for the bug reports Mohsen!
> 
> (In reply to comment #0)
> > In what circumstances does the refactoring tool report the above message? We
> > suggest that the refactoring tool provides more concrete information about what
> > might have gone wrong during the refactoring so that the programmer can review
> > and verify the change effectively.
> This is bug 198921.
> 
> *** This bug has been marked as a duplicate of bug 198921 ***

Deepak,

Thanks for pointing me to bug 198921. My search before filing this bug didn't find bug 198921. Nevertheless, the focus of bug 198921 seems to be on the missing preview button. However, bug 198921 mentions "a filter group for potential matches" that I am not familiar with. Perhaps, the filter will be mechanism to present the potential matches. Anyways, the main point of bug 363257 is that the message "Found potential matches" is vague and does not offer enough information to understand the problem and mitigate it. This issue doesn't go away by simply providing a preview button.
Comment 4 Deepak Azad CLA 2011-11-09 00:19:05 EST
Mohsen, while fixing a bug we go through all the duplicates to make sure all the problems are addressed. Nevertheless, I added a comment to bug 198921 regarding the warning message.

Moreover, even if we tweak the message I don't think it will still convey enough information to the user. The complete solution would include a filter group for
potential matches on the preview page so that a user can easily see the changes related to potential matches and bug 198921 covers that part.