Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error running against repo on github #1

Closed
gelias opened this issue May 5, 2021 · 1 comment
Closed

Error running against repo on github #1

gelias opened this issue May 5, 2021 · 1 comment

Comments

@gelias
Copy link

gelias commented May 5, 2021

Steps ...

  1. git clone https://github.com/gelias/ssl-pinning-java.git

  2. drtools-metric.sh /Users/gelias/workspace/java-2019/ssl-pinning/ -a --console

Error:

SUMMARY OF METRICS

        Total of Namespaces: 0
             Total of Types: 0Exception in thread "main" java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:61)

Caused by: java.lang.ArrayIndexOutOfBoundsException: Index -1 out of bounds for length 0
at structures.results.NamespaceMetricResult.getMedianOfTypes(NamespaceMetricResult.java:125)
at output.MetricResultConsole.showSummary(MetricResultConsole.java:81)
at output.MetricResultConsole.show(MetricResultConsole.java:94)
at general.options.AllMetricsOption.execute(AllMetricsOption.java:11)
at general.ProjectInfo.show(ProjectInfo.java:59)
at main.Bootstrapper.analyzeAndShow(Bootstrapper.java:51)
at main.Bootstrapper.runApp(Bootstrapper.java:36)
at main.Bootstrapper.main(Bootstrapper.java:26)
... 5 more

@guilhermeslacerda
Copy link
Owner

This problem happened because project doesn't have explicit reference to packages/namespaces.
In the new version of drtools-metric (1.6.0), this problem has been fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants