Refactoring Bug: Inline methods cause method name conflicts
- 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
When "methodToBeInlined" is executed as an inline method, both the "method" target method and the inline method contain internal classes with the same internal class name, leading to naming conflicts.
class SourceClass{
public void m{
class InnerClass{ }
methodToBeInlined();
}
public void methodToBeInlined(){
class InnerClass{}
}
}
### Language / Project Type / NetBeans Component
_No response_
### How to reproduce
When "methodToBeInlined" is executed as an inline method, both the "method" target method and the inline method contain internal classes with the same internal class name, leading to naming conflicts.
class SourceClass{
public void m{
class InnerClass{ }
methodToBeInlined();
}
public void methodToBeInlined(){
class InnerClass{}
}
}
### Did this work correctly in an earlier version?
Apache NetBeans 23
### 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
No source files, tests, or component entry points are named. Start by reproducing the inline-method example in Apache NetBeans 23 on Windows 11 with JDK 20, then trace the Java refactoring implementation involved. Done means inlining methods with same-named local classes no longer creates naming conflicts.
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
- 38/100