Open juliamanfrindias opened 2 years ago
Hi @juliamanfrindias
it seems you are missing to pass to Astor one dependency (using argument -dependencies
): the class javax.annotation.Nullable
cannot be found in the classpath
`org.eclipse.jdt.internal.compiler.problem.AbortCompilation: Pb(324) The type javax.annotation.Nullable cannot be resolved. It is indirectly referenced from required .class files
So, adding all the dependencies from the project under repair using the mentioned argument would solve the issue.
Regards Matias
Thanks.
Now how do I use this dependency? I'm already using this argument ( -dependencies /home/julia/mestrado/teste/astor_bkp/astor/examples/libs/junit-4.4.jar)
I don't understand, give me an example that works.
Hi @juliamanfrindias
I'm already using this argument ( -dependencies /home/julia/mestrado/teste/astor_bkp/astor/examples/libs/junit-4.4.jar)
Yes, but the project you are trying to repair (Closure-10) has more dependencies, not only junit. If I am not wrong, those are:
<path-to-your-folder>/Closure_10/lib/args4j.jar:<path-to-your-folder>/Closure_10/lib/guava.jar:<path-to-your-folder>/Closure_10/lib/json.jar:<path-to-your-folder>/Closure_10/lib/jsr305.jar:<path-to-your-folder>/Closure_10/lib/protobuf-java.jar:<path-to-your-folder>/Closure_10/build/lib/rhino.jar:<path-to-your-folder>/Closure_10/lib/ant.jar:<path-to-your-folder>/Closure_10/lib/ant-launcher.jar:<path-to-your-folder>/Closure_10/lib/caja-r4314.jar:<path-to-your-folder>/Closure_10/lib/jarjar.jar:<path-to-your-folder>/Closure_10/lib/junit.jar
Regards Matias
I'm still having the same error
My command:
java -cp /home/julia/mestrado/teste/astor_bkp/target/astor-2.0.0-jar-with-dependencies.jar fr.inria.main.evolution.AstorMain -mode jKali -location /home/julia/mestrado/teste/Bugs/Closure-10 -maxtime 120 -mode statement -package org.apache.commons -jvm4testexecution /usr/lib/jvm/java-8-openjdk-amd64/bin/ -srcjavafolder /src/java/ -srctestfolder /src/test/ -binjavafolder /target/classes -bintestfolder /target/test-classes -flthreshold 0.5 -stopfirst true -faultlocalization CoCoSpoon -javacompliancelevel 8 -allpoints true -dependencies /home/julia/mestrado/teste/astor_bkp/astor/examples/libs/junit-4.4.jar /home/julia/mestrado/teste/Bugs/Closure_10/lib/args4j.jar:/home/julia/mestrado/teste/Bugs/Closure_10/lib/guava.jar:/home/julia/mestrado/teste/Bugs/Closure_10/lib/json.jar:/home/julia/mestrado/teste/Bugs/Closure_10/lib/jsr305.jar:/home/julia/mestrado/teste/Bugs/Closure_10/lib/protobuf-java.jar:/home/julia/mestrado/teste/Bugs/Closure_10/build/lib/rhino.jar:/home/julia/mestrado/teste/Bugs/Closure_10/lib/ant.jar:/home/julia/mestrado/teste/Bugs/Closure_10/lib/ant-launcher.jar:/home/julia/mestrado/teste/Bugs/Closure_10/lib/caja-r4314.jar:/home/julia/mestrado/teste/Bugs/Closure_10/lib/jarjar.jar:/home/julia/mestrado/teste/Bugs/Closure_10/lib/junit.jar
My output:
$ java -cp /home/julia/mestrado/teste/astor_bkp/target/astor-2.0.0-jar-with-dependencies.jar fr.inria.main.evolution.AstorMain -mode jKali -location /home/julia/mestrado/teste/Bugs/Closure-10 -maxtime 120 -mode statement -package org.apache.commons -jvm4testexecution /usr/lib/jvm/java-8-openjdk-amd64/bin/ -srcjavafolder /src/java/ -srctestfolder /src/test/ -binjavafolder /target/classes -bintestfolder /target/test-classes -flthreshold 0.5 -stopfirst true -faultlocalization CoCoSpoon -javacompliancelevel 8 -allpoints true -dependencies /home/julia/mestrado/teste/astor_bkp/astor/examples/libs/junit-4.4.jar /home/julia/mestrado/teste/Bugs/Closure_10/lib/args4j.jar:/home/julia/mestrado/teste/Bugs/Closure_10/lib/guava.jar:/home/julia/mestrado/teste/Bugs/Closure_10/lib/json.jar:/home/julia/mestrado/teste/Bugs/Closure_10/lib/jsr305.jar:/home/julia/mestrado/teste/Bugs/Closure_10/lib/protobuf-java.jar:/home/julia/mestrado/teste/Bugs/Closure_10/build/lib/rhino.jar:/home/julia/mestrado/teste/Bugs/Closure_10/lib/ant.jar:/home/julia/mestrado/teste/Bugs/Closure_10/lib/ant-launcher.jar:/home/julia/mestrado/teste/Bugs/Closure_10/lib/caja-r4314.jar:/home/julia/mestrado/teste/Bugs/Closure_10/lib/jarjar.jar:/home/julia/mestrado/teste/Bugs/Closure_10/lib/junit.jar
[0] INFO ProjectConfiguration - Version of the JVM used: 1.8.0_312
[1] INFO main - Java version of the JDK used to run tests: 1.8.0_312
[1] INFO main - The compliance of the JVM is: 8
[4] INFO main - command line arguments: [-mode jKali -location /home/julia/mestrado/teste/Bugs/Closure-10 -maxtime 120 -mode statement -package org.apache.commons -jvm4testexecution /usr/lib/jvm/java-8-openjdk-amd64/bin/ -srcjavafolder /src/java/ -srctestfolder /src/test/ -binjavafolder /target/classes -bintestfolder /target/test-classes -flthreshold 0.5 -stopfirst true -faultlocalization CoCoSpoon -javacompliancelevel 8 -allpoints true -dependencies /home/julia/mestrado/teste/astor_bkp/astor/examples/libs/junit-4.4.jar /home/julia/mestrado/teste/Bugs/Closure_10/lib/args4j.jar:/home/julia/mestrado/teste/Bugs/Closure_10/lib/guava.jar:/home/julia/mestrado/teste/Bugs/Closure_10/lib/json.jar:/home/julia/mestrado/teste/Bugs/Closure_10/lib/jsr305.jar:/home/julia/mestrado/teste/Bugs/Closure_10/lib/protobuf-java.jar:/home/julia/mestrado/teste/Bugs/Closure_10/build/lib/rhino.jar:/home/julia/mestrado/teste/Bugs/Closure_10/lib/ant.jar:/home/julia/mestrado/teste/Bugs/Closure_10/lib/ant-launcher.jar:/home/julia/mestrado/teste/Bugs/Closure_10/lib/caja-r4314.jar:/home/julia/mestrado/teste/Bugs/Closure_10/lib/jarjar.jar:/home/julia/mestrado/teste/Bugs/Closure_10/lib/junit.jar]
[6] INFO AstorMain - Running Astor on a JDK at /usr/lib/jvm/java-8-openjdk-amd64/jre
[13] INFO main - Source folders: [/home/julia/mestrado/teste/Bugs/Closure-10/src]
[14] INFO main - Source Test folders: [/home/julia/mestrado/teste/Bugs/Closure-10/test]
[481] INFO AstorCoreEngine - ---- Creating spoon model
[511] INFO MutationSupporter - Creating model, Code location from working folder: /home/julia/mestrado/teste/Bugs/Closure-10/src
[512] INFO MutationSupporter - building model: /home/julia/mestrado/teste/Bugs/Closure-10/src, compliance level: 8
[564] INFO MutationSupporter - Classpath (Dependencies) for building SpoonModel: null
[2168] ERROR MutationSupporter - Problem compiling the model with compliance level 8
[2168] ERROR MutationSupporter - Pb(324) The type javax.annotation.Nullable cannot be resolved. It is indirectly referenced from required .class files
org.eclipse.jdt.internal.compiler.problem.AbortCompilation: Pb(324) The type javax.annotation.Nullable cannot be resolved. It is indirectly referenced from required .class files
at org.eclipse.jdt.internal.compiler.problem.ProblemHandler.handle(ProblemHandler.java:162)
at org.eclipse.jdt.internal.compiler.problem.ProblemHandler.handle(ProblemHandler.java:229)
at org.eclipse.jdt.internal.compiler.problem.ProblemReporter.handle(ProblemReporter.java:2646)
at org.eclipse.jdt.internal.compiler.problem.ProblemReporter.isClassPathCorrect(ProblemReporter.java:5117)
at org.eclipse.jdt.internal.compiler.lookup.UnresolvedReferenceBinding.resolve(UnresolvedReferenceBinding.java:123)
at org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.resolveType(BinaryTypeBinding.java:248)
at org.eclipse.jdt.internal.compiler.lookup.PackageBinding.getTypeOrPackage(PackageBinding.java:252)
at org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.findImport(CompilationUnitScope.java:551)
at org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.findSingleImport(CompilationUnitScope.java:623)
at org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.resolveSingleImport(CompilationUnitScope.java:846)
at org.eclipse.jdt.internal.compiler.lookup.Scope.getTypeOrPackage(Scope.java:3452)
at org.eclipse.jdt.internal.compiler.lookup.Scope.getType(Scope.java:3177)
at org.eclipse.jdt.internal.compiler.ast.SingleTypeReference.getTypeBinding(SingleTypeReference.java:57)
at org.eclipse.jdt.internal.compiler.ast.TypeReference.internalResolveType(TypeReference.java:536)
at org.eclipse.jdt.internal.compiler.ast.TypeReference.resolveType(TypeReference.java:639)
at org.eclipse.jdt.internal.compiler.ast.TypeReference.resolveType(TypeReference.java:635)
at org.eclipse.jdt.internal.compiler.ast.TypeReference.resolveType(TypeReference.java:631)
at org.eclipse.jdt.internal.compiler.ast.Annotation.handleNonNullByDefault(Annotation.java:1121)
at org.eclipse.jdt.internal.compiler.ast.ASTNode.handleNonNullByDefault(ASTNode.java:1058)
at org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.resolveTypesWithSuspendedTempErrorHandlingPolicy(SourceTypeBinding.java:2746)
at org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.resolveTypesFor(SourceTypeBinding.java:2649)
at org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.getExactConstructor(SourceTypeBinding.java:1669)
at org.eclipse.jdt.internal.compiler.lookup.Scope.getConstructor0(Scope.java:2465)
at org.eclipse.jdt.internal.compiler.lookup.Scope.getConstructor(Scope.java:2446)
at org.eclipse.jdt.internal.compiler.ast.Statement.findConstructorBinding(Statement.java:588)
at org.eclipse.jdt.internal.compiler.ast.AllocationExpression.resolveType(AllocationExpression.java:491)
at org.eclipse.jdt.internal.compiler.ast.LocalDeclaration.resolve(LocalDeclaration.java:390)
at org.eclipse.jdt.internal.compiler.ast.LocalDeclaration.resolve(LocalDeclaration.java:259)
at org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.resolveStatements(AbstractMethodDeclaration.java:661)
at org.eclipse.jdt.internal.compiler.ast.MethodDeclaration.resolveStatements(MethodDeclaration.java:362)
at org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.resolve(AbstractMethodDeclaration.java:570)
at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:1512)
at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:1612)
at org.eclipse.jdt.internal.compiler.ast.QualifiedAllocationExpression.getAnonymousConstructorBinding(QualifiedAllocationExpression.java:666)
at org.eclipse.jdt.internal.compiler.ast.QualifiedAllocationExpression.resolveTypeForQualifiedAllocationExpression(QualifiedAllocationExpression.java:557)
at org.eclipse.jdt.internal.compiler.ast.QualifiedAllocationExpression.resolveType(QualifiedAllocationExpression.java:304)
at org.eclipse.jdt.internal.compiler.ast.FieldDeclaration.resolve(FieldDeclaration.java:294)
at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:1448)
at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:1637)
at org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.resolve(CompilationUnitDeclaration.java:667)
at spoon.support.compiler.jdt.TreeBuilderCompiler.buildUnits(TreeBuilderCompiler.java:105)
at spoon.support.compiler.jdt.JDTBatchCompiler.getUnits(JDTBatchCompiler.java:283)
at spoon.support.compiler.jdt.JDTBasedSpoonCompiler.buildUnits(JDTBasedSpoonCompiler.java:417)
at spoon.support.compiler.jdt.JDTBasedSpoonCompiler.buildUnitsAndModel(JDTBasedSpoonCompiler.java:369)
at spoon.support.compiler.jdt.JDTBasedSpoonCompiler.buildSources(JDTBasedSpoonCompiler.java:335)
at spoon.support.compiler.jdt.JDTBasedSpoonCompiler.build(JDTBasedSpoonCompiler.java:116)
at spoon.support.compiler.jdt.JDTBasedSpoonCompiler.build(JDTBasedSpoonCompiler.java:99)
at fr.inria.astor.core.manipulation.MutationSupporter.buildModel(MutationSupporter.java:85)
at fr.inria.astor.core.manipulation.MutationSupporter.buildSpoonModel(MutationSupporter.java:240)
at fr.inria.astor.core.solutionsearch.AstorCoreEngine.initModel(AstorCoreEngine.java:776)
at fr.inria.main.evolution.AstorMain.createEngine(AstorMain.java:113)
at fr.inria.main.evolution.AstorMain.run(AstorMain.java:173)
at fr.inria.main.evolution.AstorMain.execute(AstorMain.java:233)
at fr.inria.main.evolution.AstorMain.main(AstorMain.java:204)
[2172] INFO MutationSupporter - Recompiling with compliance level 8
[2172] INFO MutationSupporter - building model: /home/julia/mestrado/teste/Bugs/Closure-10/src, compliance level: 8
[2199] INFO MutationSupporter - Classpath (Dependencies) for building SpoonModel: null
org.eclipse.jdt.internal.compiler.problem.AbortCompilation: Pb(324) The type javax.annotation.Nullable cannot be resolved. It is indirectly referenced from required .class files
at org.eclipse.jdt.internal.compiler.problem.ProblemHandler.handle(ProblemHandler.java:162)
at org.eclipse.jdt.internal.compiler.problem.ProblemHandler.handle(ProblemHandler.java:229)
at org.eclipse.jdt.internal.compiler.problem.ProblemReporter.handle(ProblemReporter.java:2646)
at org.eclipse.jdt.internal.compiler.problem.ProblemReporter.isClassPathCorrect(ProblemReporter.java:5117)
at org.eclipse.jdt.internal.compiler.lookup.UnresolvedReferenceBinding.resolve(UnresolvedReferenceBinding.java:123)
at org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.resolveType(BinaryTypeBinding.java:248)
at org.eclipse.jdt.internal.compiler.lookup.PackageBinding.getTypeOrPackage(PackageBinding.java:252)
at org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.findImport(CompilationUnitScope.java:551)
at org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.findSingleImport(CompilationUnitScope.java:623)
at org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.resolveSingleImport(CompilationUnitScope.java:846)
at org.eclipse.jdt.internal.compiler.lookup.Scope.getTypeOrPackage(Scope.java:3452)
at org.eclipse.jdt.internal.compiler.lookup.Scope.getType(Scope.java:3177)
at org.eclipse.jdt.internal.compiler.ast.SingleTypeReference.getTypeBinding(SingleTypeReference.java:57)
at org.eclipse.jdt.internal.compiler.ast.TypeReference.internalResolveType(TypeReference.java:536)
at org.eclipse.jdt.internal.compiler.ast.TypeReference.resolveType(TypeReference.java:639)
at org.eclipse.jdt.internal.compiler.ast.TypeReference.resolveType(TypeReference.java:635)
at org.eclipse.jdt.internal.compiler.ast.TypeReference.resolveType(TypeReference.java:631)
at org.eclipse.jdt.internal.compiler.ast.Annotation.handleNonNullByDefault(Annotation.java:1121)
at org.eclipse.jdt.internal.compiler.ast.ASTNode.handleNonNullByDefault(ASTNode.java:1058)
at org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.resolveTypesWithSuspendedTempErrorHandlingPolicy(SourceTypeBinding.java:2746)
at org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.resolveTypesFor(SourceTypeBinding.java:2649)
at org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.getExactConstructor(SourceTypeBinding.java:1669)
at org.eclipse.jdt.internal.compiler.lookup.Scope.getConstructor0(Scope.java:2465)
at org.eclipse.jdt.internal.compiler.lookup.Scope.getConstructor(Scope.java:2446)
at org.eclipse.jdt.internal.compiler.ast.Statement.findConstructorBinding(Statement.java:588)
at org.eclipse.jdt.internal.compiler.ast.AllocationExpression.resolveType(AllocationExpression.java:491)
at org.eclipse.jdt.internal.compiler.ast.LocalDeclaration.resolve(LocalDeclaration.java:390)
at org.eclipse.jdt.internal.compiler.ast.LocalDeclaration.resolve(LocalDeclaration.java:259)
at org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.resolveStatements(AbstractMethodDeclaration.java:661)
at org.eclipse.jdt.internal.compiler.ast.MethodDeclaration.resolveStatements(MethodDeclaration.java:362)
at org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.resolve(AbstractMethodDeclaration.java:570)
at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:1512)
at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:1612)
at org.eclipse.jdt.internal.compiler.ast.QualifiedAllocationExpression.getAnonymousConstructorBinding(QualifiedAllocationExpression.java:666)
at org.eclipse.jdt.internal.compiler.ast.QualifiedAllocationExpression.resolveTypeForQualifiedAllocationExpression(QualifiedAllocationExpression.java:557)
at org.eclipse.jdt.internal.compiler.ast.QualifiedAllocationExpression.resolveType(QualifiedAllocationExpression.java:304)
at org.eclipse.jdt.internal.compiler.ast.FieldDeclaration.resolve(FieldDeclaration.java:294)
at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:1448)
at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:1637)
at org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.resolve(CompilationUnitDeclaration.java:667)
at spoon.support.compiler.jdt.TreeBuilderCompiler.buildUnits(TreeBuilderCompiler.java:105)
at spoon.support.compiler.jdt.JDTBatchCompiler.getUnits(JDTBatchCompiler.java:283)
at spoon.support.compiler.jdt.JDTBasedSpoonCompiler.buildUnits(JDTBasedSpoonCompiler.java:417)
at spoon.support.compiler.jdt.JDTBasedSpoonCompiler.buildUnitsAndModel(JDTBasedSpoonCompiler.java:369)
at spoon.support.compiler.jdt.JDTBasedSpoonCompiler.buildSources(JDTBasedSpoonCompiler.java:335)
at spoon.support.compiler.jdt.JDTBasedSpoonCompiler.build(JDTBasedSpoonCompiler.java:116)
at spoon.support.compiler.jdt.JDTBasedSpoonCompiler.build(JDTBasedSpoonCompiler.java:99)
at fr.inria.astor.core.manipulation.MutationSupporter.buildModel(MutationSupporter.java:85)
at fr.inria.astor.core.manipulation.MutationSupporter.buildSpoonModel(MutationSupporter.java:253)
at fr.inria.astor.core.solutionsearch.AstorCoreEngine.initModel(AstorCoreEngine.java:776)
at fr.inria.main.evolution.AstorMain.createEngine(AstorMain.java:113)
at fr.inria.main.evolution.AstorMain.run(AstorMain.java:173)
at fr.inria.main.evolution.AstorMain.execute(AstorMain.java:233)
at fr.inria.main.evolution.AstorMain.main(AstorMain.java:204)
[2778] ERROR MutationSupporter - Error compiling: Pb(324) The type javax.annotation.Nullable cannot be resolved. It is indirectly referenced from required .class files
[2779] ERROR MutationSupporter - Astor continues when model build fails. Classes created: 0
[2779] INFO AstorCoreEngine - Number of CtTypes created: 0
[2788] INFO AstorCoreEngine - Test retrieved from classes: 0
[2788] INFO MutationSupporter - Creating model, Code location from working folder: /home/julia/mestrado/teste/Bugs/Closure-10/src
[2788] INFO MutationSupporter - building model: /home/julia/mestrado/teste/Bugs/Closure-10/src, compliance level: 8
[2814] INFO MutationSupporter - Classpath (Dependencies) for building SpoonModel: null
[3235] ERROR MutationSupporter - Problem compiling the model with compliance level 8
[3235] ERROR MutationSupporter - Pb(324) The type javax.annotation.Nullable cannot be resolved. It is indirectly referenced from required .class files
org.eclipse.jdt.internal.compiler.problem.AbortCompilation: Pb(324) The type javax.annotation.Nullable cannot be resolved. It is indirectly referenced from required .class files
at org.eclipse.jdt.internal.compiler.problem.ProblemHandler.handle(ProblemHandler.java:162)
at org.eclipse.jdt.internal.compiler.problem.ProblemHandler.handle(ProblemHandler.java:229)
at org.eclipse.jdt.internal.compiler.problem.ProblemReporter.handle(ProblemReporter.java:2646)
at org.eclipse.jdt.internal.compiler.problem.ProblemReporter.isClassPathCorrect(ProblemReporter.java:5117)
at org.eclipse.jdt.internal.compiler.lookup.UnresolvedReferenceBinding.resolve(UnresolvedReferenceBinding.java:123)
at org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.resolveType(BinaryTypeBinding.java:248)
at org.eclipse.jdt.internal.compiler.lookup.PackageBinding.getTypeOrPackage(PackageBinding.java:252)
at org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.findImport(CompilationUnitScope.java:551)
at org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.findSingleImport(CompilationUnitScope.java:623)
at org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.resolveSingleImport(CompilationUnitScope.java:846)
at org.eclipse.jdt.internal.compiler.lookup.Scope.getTypeOrPackage(Scope.java:3452)
at org.eclipse.jdt.internal.compiler.lookup.Scope.getType(Scope.java:3177)
at org.eclipse.jdt.internal.compiler.ast.SingleTypeReference.getTypeBinding(SingleTypeReference.java:57)
at org.eclipse.jdt.internal.compiler.ast.TypeReference.internalResolveType(TypeReference.java:536)
at org.eclipse.jdt.internal.compiler.ast.TypeReference.resolveType(TypeReference.java:639)
at org.eclipse.jdt.internal.compiler.ast.TypeReference.resolveType(TypeReference.java:635)
at org.eclipse.jdt.internal.compiler.ast.TypeReference.resolveType(TypeReference.java:631)
at org.eclipse.jdt.internal.compiler.ast.Annotation.handleNonNullByDefault(Annotation.java:1121)
at org.eclipse.jdt.internal.compiler.ast.ASTNode.handleNonNullByDefault(ASTNode.java:1058)
at org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.resolveTypesWithSuspendedTempErrorHandlingPolicy(SourceTypeBinding.java:2746)
at org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.resolveTypesFor(SourceTypeBinding.java:2649)
at org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.getExactConstructor(SourceTypeBinding.java:1669)
at org.eclipse.jdt.internal.compiler.lookup.Scope.getConstructor0(Scope.java:2465)
at org.eclipse.jdt.internal.compiler.lookup.Scope.getConstructor(Scope.java:2446)
at org.eclipse.jdt.internal.compiler.ast.Statement.findConstructorBinding(Statement.java:588)
at org.eclipse.jdt.internal.compiler.ast.AllocationExpression.resolveType(AllocationExpression.java:491)
at org.eclipse.jdt.internal.compiler.ast.LocalDeclaration.resolve(LocalDeclaration.java:390)
at org.eclipse.jdt.internal.compiler.ast.LocalDeclaration.resolve(LocalDeclaration.java:259)
at org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.resolveStatements(AbstractMethodDeclaration.java:661)
at org.eclipse.jdt.internal.compiler.ast.MethodDeclaration.resolveStatements(MethodDeclaration.java:362)
at org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.resolve(AbstractMethodDeclaration.java:570)
at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:1512)
at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:1612)
at org.eclipse.jdt.internal.compiler.ast.QualifiedAllocationExpression.getAnonymousConstructorBinding(QualifiedAllocationExpression.java:666)
at org.eclipse.jdt.internal.compiler.ast.QualifiedAllocationExpression.resolveTypeForQualifiedAllocationExpression(QualifiedAllocationExpression.java:557)
at org.eclipse.jdt.internal.compiler.ast.QualifiedAllocationExpression.resolveType(QualifiedAllocationExpression.java:304)
at org.eclipse.jdt.internal.compiler.ast.FieldDeclaration.resolve(FieldDeclaration.java:294)
at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:1448)
at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:1637)
at org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.resolve(CompilationUnitDeclaration.java:667)
at spoon.support.compiler.jdt.TreeBuilderCompiler.buildUnits(TreeBuilderCompiler.java:105)
at spoon.support.compiler.jdt.JDTBatchCompiler.getUnits(JDTBatchCompiler.java:283)
at spoon.support.compiler.jdt.JDTBasedSpoonCompiler.buildUnits(JDTBasedSpoonCompiler.java:417)
at spoon.support.compiler.jdt.JDTBasedSpoonCompiler.buildUnitsAndModel(JDTBasedSpoonCompiler.java:369)
at spoon.support.compiler.jdt.JDTBasedSpoonCompiler.buildSources(JDTBasedSpoonCompiler.java:335)
at spoon.support.compiler.jdt.JDTBasedSpoonCompiler.build(JDTBasedSpoonCompiler.java:116)
at spoon.support.compiler.jdt.JDTBasedSpoonCompiler.build(JDTBasedSpoonCompiler.java:99)
at fr.inria.astor.core.manipulation.MutationSupporter.buildModel(MutationSupporter.java:85)
at fr.inria.astor.core.manipulation.MutationSupporter.buildSpoonModel(MutationSupporter.java:240)
at fr.inria.astor.core.faultlocalization.cocospoon.CocoFaultLocalization.initModel(CocoFaultLocalization.java:162)
at fr.inria.astor.core.faultlocalization.cocospoon.CocoFaultLocalization.searchSuspicious(CocoFaultLocalization.java:51)
at fr.inria.astor.core.solutionsearch.AstorCoreEngine.calculateSuspicious(AstorCoreEngine.java:903)
at fr.inria.main.evolution.AstorMain.createEngine(AstorMain.java:119)
at fr.inria.main.evolution.AstorMain.run(AstorMain.java:173)
at fr.inria.main.evolution.AstorMain.execute(AstorMain.java:233)
at fr.inria.main.evolution.AstorMain.main(AstorMain.java:204)
[3237] INFO MutationSupporter - Recompiling with compliance level 8
[3238] INFO MutationSupporter - building model: /home/julia/mestrado/teste/Bugs/Closure-10/src, compliance level: 8
[3257] INFO MutationSupporter - Classpath (Dependencies) for building SpoonModel: null
org.eclipse.jdt.internal.compiler.problem.AbortCompilation: Pb(324) The type javax.annotation.Nullable cannot be resolved. It is indirectly referenced from required .class files
at org.eclipse.jdt.internal.compiler.problem.ProblemHandler.handle(ProblemHandler.java:162)
at org.eclipse.jdt.internal.compiler.problem.ProblemHandler.handle(ProblemHandler.java:229)
at org.eclipse.jdt.internal.compiler.problem.ProblemReporter.handle(ProblemReporter.java:2646)
at org.eclipse.jdt.internal.compiler.problem.ProblemReporter.isClassPathCorrect(ProblemReporter.java:5117)
at org.eclipse.jdt.internal.compiler.lookup.UnresolvedReferenceBinding.resolve(UnresolvedReferenceBinding.java:123)
at org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.resolveType(BinaryTypeBinding.java:248)
at org.eclipse.jdt.internal.compiler.lookup.PackageBinding.getTypeOrPackage(PackageBinding.java:252)
at org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.findImport(CompilationUnitScope.java:551)
at org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.findSingleImport(CompilationUnitScope.java:623)
at org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.resolveSingleImport(CompilationUnitScope.java:846)
at org.eclipse.jdt.internal.compiler.lookup.Scope.getTypeOrPackage(Scope.java:3452)
at org.eclipse.jdt.internal.compiler.lookup.Scope.getType(Scope.java:3177)
at org.eclipse.jdt.internal.compiler.ast.SingleTypeReference.getTypeBinding(SingleTypeReference.java:57)
at org.eclipse.jdt.internal.compiler.ast.TypeReference.internalResolveType(TypeReference.java:536)
at org.eclipse.jdt.internal.compiler.ast.TypeReference.resolveType(TypeReference.java:639)
at org.eclipse.jdt.internal.compiler.ast.TypeReference.resolveType(TypeReference.java:635)
at org.eclipse.jdt.internal.compiler.ast.TypeReference.resolveType(TypeReference.java:631)
at org.eclipse.jdt.internal.compiler.ast.Annotation.handleNonNullByDefault(Annotation.java:1121)
at org.eclipse.jdt.internal.compiler.ast.ASTNode.handleNonNullByDefault(ASTNode.java:1058)
at org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.resolveTypesWithSuspendedTempErrorHandlingPolicy(SourceTypeBinding.java:2746)
at org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.resolveTypesFor(SourceTypeBinding.java:2649)
at org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.getExactConstructor(SourceTypeBinding.java:1669)
at org.eclipse.jdt.internal.compiler.lookup.Scope.getConstructor0(Scope.java:2465)
at org.eclipse.jdt.internal.compiler.lookup.Scope.getConstructor(Scope.java:2446)
at org.eclipse.jdt.internal.compiler.ast.Statement.findConstructorBinding(Statement.java:588)
at org.eclipse.jdt.internal.compiler.ast.AllocationExpression.resolveType(AllocationExpression.java:491)
at org.eclipse.jdt.internal.compiler.ast.LocalDeclaration.resolve(LocalDeclaration.java:390)
at org.eclipse.jdt.internal.compiler.ast.LocalDeclaration.resolve(LocalDeclaration.java:259)
at org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.resolveStatements(AbstractMethodDeclaration.java:661)
at org.eclipse.jdt.internal.compiler.ast.MethodDeclaration.resolveStatements(MethodDeclaration.java:362)
at org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.resolve(AbstractMethodDeclaration.java:570)
at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:1512)
at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:1612)
at org.eclipse.jdt.internal.compiler.ast.QualifiedAllocationExpression.getAnonymousConstructorBinding(QualifiedAllocationExpression.java:666)
at org.eclipse.jdt.internal.compiler.ast.QualifiedAllocationExpression.resolveTypeForQualifiedAllocationExpression(QualifiedAllocationExpression.java:557)
at org.eclipse.jdt.internal.compiler.ast.QualifiedAllocationExpression.resolveType(QualifiedAllocationExpression.java:304)
at org.eclipse.jdt.internal.compiler.ast.FieldDeclaration.resolve(FieldDeclaration.java:294)
at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:1448)
at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:1637)
at org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.resolve(CompilationUnitDeclaration.java:667)
at spoon.support.compiler.jdt.TreeBuilderCompiler.buildUnits(TreeBuilderCompiler.java:105)
at spoon.support.compiler.jdt.JDTBatchCompiler.getUnits(JDTBatchCompiler.java:283)
at spoon.support.compiler.jdt.JDTBasedSpoonCompiler.buildUnits(JDTBasedSpoonCompiler.java:417)
at spoon.support.compiler.jdt.JDTBasedSpoonCompiler.buildUnitsAndModel(JDTBasedSpoonCompiler.java:369)
at spoon.support.compiler.jdt.JDTBasedSpoonCompiler.buildSources(JDTBasedSpoonCompiler.java:335)
at spoon.support.compiler.jdt.JDTBasedSpoonCompiler.build(JDTBasedSpoonCompiler.java:116)
at spoon.support.compiler.jdt.JDTBasedSpoonCompiler.build(JDTBasedSpoonCompiler.java:99)
at fr.inria.astor.core.manipulation.MutationSupporter.buildModel(MutationSupporter.java:85)
at fr.inria.astor.core.manipulation.MutationSupporter.buildSpoonModel(MutationSupporter.java:253)
at fr.inria.astor.core.faultlocalization.cocospoon.CocoFaultLocalization.initModel(CocoFaultLocalization.java:162)
at fr.inria.astor.core.faultlocalization.cocospoon.CocoFaultLocalization.searchSuspicious(CocoFaultLocalization.java:51)
at fr.inria.astor.core.solutionsearch.AstorCoreEngine.calculateSuspicious(AstorCoreEngine.java:903)
at fr.inria.main.evolution.AstorMain.createEngine(AstorMain.java:119)
at fr.inria.main.evolution.AstorMain.run(AstorMain.java:173)
at fr.inria.main.evolution.AstorMain.execute(AstorMain.java:233)
at fr.inria.main.evolution.AstorMain.main(AstorMain.java:204)
[3595] ERROR MutationSupporter - Error compiling: Pb(324) The type javax.annotation.Nullable cannot be resolved. It is indirectly referenced from required .class files
[3597] ERROR MutationSupporter - Astor continues when model build fails. Classes created: 0
Classpath [, /home/julia/mestrado/teste/astor_bkp/target/astor-2.0.0-jar-with-dependencies.jar, /home/julia/./output_astor/AstorMain-Closure-10//bin//default]
[3637] ERROR SpoonClassCompiler - Problem compiling
Exception in thread "main" java.lang.IllegalStateException: no source files
at com.sun.tools.javac.main.Main.error(Main.java:186)
at com.sun.tools.javac.main.Main.compile(Main.java:428)
at com.sun.tools.javac.api.JavacTaskImpl.doCall(JavacTaskImpl.java:129)
at com.sun.tools.javac.api.JavacTaskImpl.call(JavacTaskImpl.java:138)
at fr.inria.astor.core.manipulation.bytecode.compiler.tools.JavaXToolsCompiler.runCompilationTask(JavaXToolsCompiler.java:83)
at fr.inria.astor.core.manipulation.bytecode.compiler.tools.JavaXToolsCompiler.javaBytecodeFor(JavaXToolsCompiler.java:47)
at fr.inria.astor.core.manipulation.bytecode.compiler.SpoonClassCompiler.compile(SpoonClassCompiler.java:99)
at fr.inria.astor.core.manipulation.bytecode.compiler.SpoonClassCompiler.compile(SpoonClassCompiler.java:76)
at fr.inria.astor.core.faultlocalization.cocospoon.CocoFaultLocalization.compile(CocoFaultLocalization.java:127)
at fr.inria.astor.core.faultlocalization.cocospoon.CocoFaultLocalization.searchSuspicious(CocoFaultLocalization.java:58)
at fr.inria.astor.core.solutionsearch.AstorCoreEngine.calculateSuspicious(AstorCoreEngine.java:903)
at fr.inria.main.evolution.AstorMain.createEngine(AstorMain.java:119)
at fr.inria.main.evolution.AstorMain.run(AstorMain.java:173)
at fr.inria.main.evolution.AstorMain.execute(AstorMain.java:233)
at fr.inria.main.evolution.AstorMain.main(AstorMain.java:204)
What am I doing wrong?
I ran this astor command:
java -cp /home/julia/mestrado/teste/astor_bkp/target/astor-2.0.0-jar-with-dependencies.jar fr.inria.main.evolution.AstorMain -mode jKali -location /home/julia/mestrado/teste/Bugs/Closure-10 -maxtime 120 -mode statement -package org.apache.commons -jvm4testexecution /usr/lib/jvm/java-8-openjdk-amd64/bin/ -srcjavafolder /src/java/ -srctestfolder /src/test/ -binjavafolder /target/classes -bintestfolder /target/test-classes -flthreshold 0.5 -stopfirst true -faultlocalization CoCoSpoon -javacompliancelevel 8 -allpoints true -dependencies /home/julia/mestrado/teste/astor_bkp/astor/examples/libs/junit-4.4.jar
The output was:
How to solve this?