Bug 108088

Summary: [search] Inaccurate search match for method invocations with literal arguments
Product: [Eclipse Project] JDT Reporter: Tobias Widmer <tobias_widmer>
Component: CoreAssignee: Frederic Fusier <frederic_fusier>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P3    
Version: 3.1   
Target Milestone: ---   
Hardware: PC   
OS: All   
Whiteboard:

Description Tobias Widmer CLA 2005-08-26 04:58:03 EDT
I20050823-0800

Consider the following two compilation units:

public class A {
  B fB;
  public void doit(String doitArg) {
    subroutine(1.2f);
  }
  public void subroutine(float subArg) {
    subsub();
  }
  public void subsub() {
  }
}

public class B { 
  public void doit(A pApp, String doitArg) {
    pApp.subroutine(1.2f);
  }
}

-> Search for references to A#subRoutine(float) in the workspace
-> The invocation pApp.subroutine(1.2f) is reported as inaccurate
Comment 1 Frederic Fusier CLA 2005-08-26 06:19:27 EDT
I cannot reproduce using same build
Comment 2 Tobias Widmer CLA 2005-08-26 06:39:28 EDT
I am using JDT Core HEAD

Here is a more reliable test case. I hope you can reproduce it now:

- Create two cus in a new project in the default package:
- Create cu T.java with content:

class A {
    B fB;
    public void subroutine(float subArg) {
        subsub();
    }
    public void subsub() {
    }
    
}
public class T {
}

- create cu B.java with content:

class B {
	public void doit(A pApp, String doitArg) {
	    pApp.subroutine(1.2f);
	}
    
}

-> Search for references to A#subRoutine(float) in the workspace
-> The invocation pApp.subroutine(1.2f) is reported as inaccurate

The first test case must have been some temporary inconsistency
Comment 3 Frederic Fusier CLA 2005-08-26 08:51:01 EDT
Interesting test case for bug 36032...

*** This bug has been marked as a duplicate of 36032 ***