History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: IDEABKL-3035
Type: New Feature New Feature
Status: Open Open
Priority: Normal Normal
Assignee: Maxim Shafirov
Reporter: Alain Ravet
Votes: 0
Watchers: 0
Available Workflow Actions

Mark as Stalled
Operations

If you were logged in you would be able to see more operations.
IDEA: Backlog

"Locate duplicates " fails here

Created: 13 Jun 05 14:14   Updated: 15 Jun 05 19:44
Component/s: Code Analysis. Duplicates
Affects Version/s: None
Fix Version/s: None

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
File Attachments: None
Image Attachments:

1. locDupOptions.png
(33 kb)
Environment: MacOS X

Build: 3,354


 Description  « Hide
Locate duplicate

L.D. doesn't see any duplication in the code below:
(options: see attached screen copy)

public class Foo
{
public void test1 ()

{ String s = null; Object n = s; System.out.println ("1"); System.out.println ("2"); System.out.println (n); }

public void test2() { Object n = null; System.out.println ("1"); System.out.println ("2"); System.out.println (n); }
}

Note: if you change the code a little - see below -, it now detects correctly the 2 duplicated lines
public void test1 ()

{ String s = null; System.out.println ("1"); System.out.println ("2"); Object n = s; <<----------- moved System.out.println (n); }

 All   Comments   Work Log   Change History      Sort Order:
Alain Ravet - 15 Jun 05 19:44
Btw, I stumbled on this one while trying to work alongside IDEA, and locate bigger duplicates.

I had code like this

3-line block ABC <-- DUPE
stuff <------------- to be removed manually later
1-line block D
...
3-line block ABC <-- DUPE
1-line block D

, where IDEA correctly located the duplicated 3-line blocks.

I then removed the 'stuff', and IDEA couldn't find any duplication in :

4-line block ABCD <-- DUPE not found : bug
...
4-line block ABCD <-- DUPE not found : bug