[Bug]: Control Flow Graph doesn't handle cases with multiple expressions
- Dominant language
- Java
- Stars
- 2k
- Forks
- 392
- Avg merge
- 11h 24m
- Merged PRs (30d)
- 36
Description
### Describe the bug
In a case statement with multiple expressions, only the first expression is represented in the CFG:

Expected would be something like this:

### Source code you are trying to analyze/transform
```Java
public int mySwitch() {
int a = 0;
switch (a) {
case 1, 2: break;
default: break;
}
}
```
### Source code for your Spoon processing
```Java
testMethod("mySwitch", false, null, null, null); // with testMethod from the cfg test class ForwardFlowBuilderVisitorTest.java
```
### Actual output
_No response_
### Expected output
_No response_
### Spoon Version
10.4.2 / Control Flow 0.0.2-SNAPSHOT
### JVM Version
21
### What operating system are you using?
Linux
Contributor guide
Research direction
Start with ForwardFlowBuilderVisitorTest.java and its testMethod("mySwitch", false, null, null, null) case. Reproduce the CFG for the switch containing case 1, 2, then trace how multiple case expressions are represented. Done means the CFG includes both expressions and the regression test passes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100