Constructor declaration gets mangled with comment in resulting symbol_table
#90
Closed
Description
Describe the bug
After generating analysis.json
for daytrader8 project, the resulting symbol_table
contains a constructor declaration code that is mangled with a single line comment that is placed at the end of line in the source code.
Steps To Reproduce
- Get a copy of daytrader8 project
- Run the following command to generate
analysis.json
:
java -jar ./codeanalyzer-1.0.8.jar -i <PATH/TO/sample.daytrader8> -o <OUTPUT_DIR>
- Search for a constructor of
MarketSummaryDataBean
incallable_declarations
and observe:
"<init>(BigDecimal, BigDecimal, double, Collection, Collection)": {
"declaration": "public // , Collection topVolume\nMarketSummaryDataBean(BigDecimal TSIA, BigDecimal openTSIA, double volume, Collection<QuoteDataBean> topGainers, Collection<QuoteDataBean> topLosers)",
Observed behavior
The comment is placed inside the code despite not being there in the source code. Source:
public MarketSummaryDataBean(BigDecimal TSIA, BigDecimal openTSIA, double volume, Collection<QuoteDataBean> topGainers, Collection<QuoteDataBean> topLosers// , Collection topVolume
Expected behavior
The resulting analysis.json
contains the constructor declaration without the comment or comment in the right place (the same as in source).
Screenshots
None
Environment (please complete the following information):
- OS:
macOS 15.1.1
- Version of Java:
IBM Semeru Runtime Open Edition 21.0.3.0
- Version of Maven:
Apache Maven 3.9.8
- Version of Gradle: Not installed
Additional context
None
Metadata
Assignees
Labels
No labels