Bug: Renaming a method results in a change in the calling relationship
- Dominant language
- Java
- Stars
- 3.1k
- Forks
- 935
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 17
Description
### Apache NetBeans version
Apache NetBeans 23
### What happened
The "methodToBeRenamed()" method is selected to be renamed to ''method()''; Code before refactoring, the body of “testMethod()” method calls ‘’method()‘’ in the ParentClass class ; Code after refactoring, the "method()" in the SubClass class is called in the body of "testMethod()" method , and the rename method refactoring has resulted in a change in the method call within the body of "testMethod()" method .
Code before refactoring:
```java
class ParentClass{
void method(){}
}
class SubClass extends ParentClass{
void methodToBeRenamed(){}
void test(){
method();
}
}
```
### Language / Project Type / NetBeans Component
_No response_
### How to reproduce
see above
### Did this work correctly in an earlier version?
No / Don't know
### Operating System
Windows11
### JDK
20
### Apache NetBeans packaging
Apache NetBeans provided installer
### Anything else
_No response_
### Are you willing to submit a pull request?
No
Contributor guide
Research direction
Start by reproducing the Java rename refactoring with the ParentClass/SubClass example described in the issue. Trace the rename operation and verify that the call inside test() still resolves to ParentClass.method(); done means renaming methodToBeRenamed() does not change that calling relationship.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100