khaes-kth / PatchExplainer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`ArrayIndexOutOfBoundsException` thrown for SchemaCrawler#590055cd0506697c04a6dd60f742a4ca53c2c5d9ae

algomaster99 opened this issue · comments

Getting a java.lang.ArrayIndexOutOfBoundsException: for the commit: schemacrawler/SchemaCrawler@5955cd0.

java -jar target/Explainer-1.0-SNAPSHOT-jar-with-dependencies.jar sdiff --commit 5955cd0506697c04a6dd60f742a4ca53c2c5d9ae --slug schemacrawler/SchemaCrawler --left-report-path /home/aman/assert-achievements/collector-sahab/sahab-reports/sahab-reports/5955cd0506697c04a6dd60f742a4ca53c2c5d9ae/left.json --right-report-path /home/aman/assert-achievements/collector-sahab/sahab-reports/sahab-reports/5955cd0506697c04a6dd60f742a4ca53c2c5d9ae/right.json --left-src-path /home/aman/testrepos/SchemaCrawler/gumtree-left/Main.java --right-src-path /home/aman/testrepos/SchemaCrawler/gumtree-right/Main.java --selected-tests "schemacrawler.test.serialize.CommandLineSerializeCommandTest;schemacrawler.test.script.CommandlineScriptCommandTest;schemacrawler.test.schemacrawler.integration.test.GraphTitleTest;schemacrawler.test.LintOutputTest;schemacrawler.test.CommandLineSpecialCasesTest;schemacrawler.integration.test.OfflineSnapshotTest;schemacrawler.test.template.CommandlineTemplateCommandTest;schemacrawler.test.SpinThroughCommandLineTest;schemacrawler.integration.test.SqliteCommandlineTest;schemacrawler.test.LintCommandTest;schemacrawler.test.CommandLineNegativeTest;schemacrawler.integration.test.SqliteDistributionTest;schemacrawler.test.SpinThroughOperationsCommandLineTest;schemacrawler.test.script.SchemaCrawlerExecutableChainTest;schemacrawler.test.GrepCommandLineTest;schemacrawler.test.schemacrawler.integration.test.SpinThroughGraphCommandLineTest;schemacrawler.test.TitleTest;schemacrawler.integration.test.HsqldbTest" --test-link google.com --output-path SchemaCrawler_5955cd0506697c04a6dd60f742a4ca53c2c5d9ae_3.html

Error log:

 
INFO: For commit 5955cd0506697c04a6dd60f742a4ca53c2c5d9ae line mappings and vars computation took 11787 MILLIS
java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 1
        at se.kth.assertgroup.core.analysis.statediff.computer.StateDiffComputer.getMatchingTest(StateDiffComputer.java:187)
        at se.kth.assertgroup.core.analysis.statediff.computer.StateDiffComputer.getFirstDistinctStateOnRelevantLine(StateDiffComputer.java:168)
        at se.kth.assertgroup.core.analysis.statediff.computer.StateDiffComputer.computeProgramStateDiff(StateDiffComputer.java:46)
        at se.kth.assertgroup.core.analysis.statediff.ui.StateDiffUIManipulator.addStateDiffToExecDiffUI(StateDiffUIManipulator.java:86)
        at se.kth.assertgroup.core.analysis.statediff.StateDiffCommand.call(StateDiffCommand.java:68)
        at se.kth.assertgroup.core.analysis.statediff.StateDiffCommand.call(StateDiffCommand.java:10)
        at picocli.CommandLine.executeUserObject(CommandLine.java:1953)
        at picocli.CommandLine.access$1300(CommandLine.java:145)
        at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2358)
        at picocli.CommandLine$RunLast.handle(CommandLine.java:2352)
        at picocli.CommandLine$RunLast.handle(CommandLine.java:2314)
        at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179)
        at picocli.CommandLine$RunLast.execute(CommandLine.java:2316)
        at picocli.CommandLine.execute(CommandLine.java:2078)
        at se.kth.assertgroup.core.analysis.ExecDiffMain.main(ExecDiffMain.java:17)

Please download the files needed to run the command here - Re _Candidate_PRs_for_ExecDiff_RQ3.zip.

It seems you have passed tests separated by ;. StateDiffComputer assumes they are separated by ::. Can you give it a try?

The visualisation is generated now, however, the tests are unknown. Note that I pass the test classes not individual test methods.