An exception is thrown when no results are generated due to a division by zero in JavaParserMain.scala at line 60
还没有人认领这个 Issue。
评估
调研方向
Start in javaparser/src/main/scala/com/virtuslab/semanticgraphs/javaparser/JavaParserMain.scala at line 60, where the failure percentage is calculated, and trace how generateSemanticGraphFiles is called from ScgCli.scala. Handle the zero-results case with a clear message instead of an ArithmeticException, and verify that normal result generation still reports its percentage.
由索引模型根据 Issue 内容生成。
描述
In this file, there is an instruction that shows the percentage of failed results compared to the total number of results generated. However, the total can be zero. It would be really helpful to have a message that says that no results have been generated, as it can be quite confusing to encounter a "dividing by zero" exception (see below) when using the tool for the first time.
java.lang.ArithmeticException: / by zero
at com.virtuslab.semanticgraphs.javaparser.JavaParserMain$.generateSemanticGraphFiles(JavaParserMain.scala:60)
at org.virtuslab.semanticgraphs.analytics.cli.ScgCli.generate(ScgCli.scala:59)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at picocli.CommandLine.executeUserObject(CommandLine.java:2066)
at picocli.CommandLine.access$1500(CommandLine.java:148)
at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2461)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2453)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2415)
at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2273)
at picocli.CommandLine$RunLast.execute(CommandLine.java:2417)
at picocli.CommandLine.execute(CommandLine.java:2170)
at org.virtuslab.semanticgraphs.analytics.cli.ScgCli$.main(ScgCli.scala:335)
at org.virtuslab.semanticgraphs.analytics.cli.ScgCli.main(ScgCli.scala)
- 主要语言
- Scala
- 星标
- 26
- 派生
- 2
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
bug 🐞 Untriaged user issue
难度 2/5 1-3 小时 新手友好度 78/100
valkey-io/valkey-glide#7443 ·
维护者通常 1 天内回复
-
OpenAPI: PowSolutions requires pk, w and d, but a V2 solution needs only n可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭A-api C-bug S-ready-for-human
难度 2/5 1-3 小时 新手友好度 75/100
ergoplatform/ergo#2851 ·
维护者通常 2 天内回复
-
? - Needs Triage audit_4.2.0 feature request test
难度 2/5 1-3 小时 新手友好度 87/100
NVIDIA/cudf-spark#16614 ·
维护者通常 1 天内回复
-
bug unit testing velox backend
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 2 天内回复