You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm encountering an UnsolvedSymbolException when running Specimin on a method with the signature org.checkerframework.specimin.UnsolvedSymbolVisitor#setImportStatement(NodeList). Below are the arguments passed to Specimin and the stack trace of the exception:
13:56:41.706 [main] INFO edu.njit.jerse.ashe.services.SpeciminTool - Exception in thread "main" UnsolvedSymbolException{context='null', name='PackageDeclaration', cause='null'}
at com.github.javaparser.symbolsolver.javaparsermodel.JavaParserFacade.convertToUsage(JavaParserFacade.java:682)
at com.github.javaparser.symbolsolver.javaparsermodel.JavaParserFacade.convert(JavaParserFacade.java:740)
at com.github.javaparser.symbolsolver.javaparsermodel.JavaParserFacade.convert(JavaParserFacade.java:736)
at com.github.javaparser.symbolsolver.javaparsermodel.declarations.JavaParserParameterDeclaration.getType(JavaParserParameterDeclaration.java:69)
at com.github.javaparser.symbolsolver.model.resolution.Value.from(Value.java:45)
at com.github.javaparser.symbolsolver.core.resolution.Context.solveSymbolAsValueInParentContext(Context.java:148)
at com.github.javaparser.symbolsolver.javaparsermodel.contexts.MethodCallExprContext.solveSymbolAsValue(MethodCallExprContext.java:161)
at com.github.javaparser.symbolsolver.resolution.SymbolSolver.solveSymbolAsValue(SymbolSolver.java:78)
at com.github.javaparser.symbolsolver.resolution.SymbolSolver.solveSymbolAsValue(SymbolSolver.java:83)
at com.github.javaparser.symbolsolver.javaparsermodel.TypeExtractor.visit(TypeExtractor.java:533)
at com.github.javaparser.symbolsolver.javaparsermodel.TypeExtractor.visit(TypeExtractor.java:99)
at com.github.javaparser.ast.expr.NameExpr.accept(NameExpr.java:79)
at com.github.javaparser.symbolsolver.javaparsermodel.JavaParserFacade.getTypeConcrete(JavaParserFacade.java:554)
at com.github.javaparser.symbolsolver.javaparsermodel.JavaParserFacade.getType(JavaParserFacade.java:401)
at com.github.javaparser.symbolsolver.javaparsermodel.JavaParserFacade.getType(JavaParserFacade.java:383)
at com.github.javaparser.symbolsolver.JavaSymbolSolver.calculateType(JavaSymbolSolver.java:291)
at com.github.javaparser.ast.expr.Expression.calculateResolvedType(Expression.java:566)
at org.checkerframework.specimin.UnsolvedSymbolVisitor.getArgumentsFromMethodCall(UnsolvedSymbolVisitor.java:931)
at org.checkerframework.specimin.UnsolvedSymbolVisitor.updateUnsolvedClassWithMethod(UnsolvedSymbolVisitor.java:674)
at org.checkerframework.specimin.UnsolvedSymbolVisitor.updateSyntheticClassForSuperCall(UnsolvedSymbolVisitor.java:832)
at org.checkerframework.specimin.UnsolvedSymbolVisitor.visit(UnsolvedSymbolVisitor.java:526)
at org.checkerframework.specimin.UnsolvedSymbolVisitor.visit(UnsolvedSymbolVisitor.java:68)
at com.github.javaparser.ast.expr.MethodCallExpr.accept(MethodCallExpr.java:116)
at com.github.javaparser.ast.visitor.ModifierVisitor.lambda$visit$79(ModifierVisitor.java:852)
at java.base/java.util.Optional.map(Optional.java:260)
at com.github.javaparser.ast.visitor.ModifierVisitor.visit(ModifierVisitor.java:852)
at com.github.javaparser.ast.visitor.ModifierVisitor.visit(ModifierVisitor.java:51)
at com.github.javaparser.ast.stmt.ReturnStmt.accept(ReturnStmt.java:78)
at com.github.javaparser.ast.visitor.ModifierVisitor.visit(ModifierVisitor.java:1129)
at com.github.javaparser.ast.visitor.ModifierVisitor.visit(ModifierVisitor.java:51)
at com.github.javaparser.ast.NodeList.accept(NodeList.java:277)
at com.github.javaparser.ast.visitor.ModifierVisitor.modifyList(ModifierVisitor.java:1168)
at com.github.javaparser.ast.visitor.ModifierVisitor.visit(ModifierVisitor.java:169)
at org.checkerframework.specimin.UnsolvedSymbolVisitor.visit(UnsolvedSymbolVisitor.java:406)
at org.checkerframework.specimin.UnsolvedSymbolVisitor.visit(UnsolvedSymbolVisitor.java:68)
at com.github.javaparser.ast.stmt.BlockStmt.accept(BlockStmt.java:70)
at com.github.javaparser.ast.visitor.ModifierVisitor.lambda$visit$60(ModifierVisitor.java:670)
at java.base/java.util.Optional.map(Optional.java:260)
at com.github.javaparser.ast.visitor.ModifierVisitor.visit(ModifierVisitor.java:670)
at org.checkerframework.specimin.UnsolvedSymbolVisitor.visit(UnsolvedSymbolVisitor.java:506)
at org.checkerframework.specimin.UnsolvedSymbolVisitor.visit(UnsolvedSymbolVisitor.java:68)
at com.github.javaparser.ast.body.MethodDeclaration.accept(MethodDeclaration.java:98)
at com.github.javaparser.ast.visitor.ModifierVisitor.visit(ModifierVisitor.java:1129)
at com.github.javaparser.ast.visitor.ModifierVisitor.visit(ModifierVisitor.java:51)
at com.github.javaparser.ast.NodeList.accept(NodeList.java:277)
at com.github.javaparser.ast.visitor.ModifierVisitor.modifyList(ModifierVisitor.java:1168)
at com.github.javaparser.ast.visitor.ModifierVisitor.visit(ModifierVisitor.java:243)
at org.checkerframework.specimin.UnsolvedSymbolVisitor.visit(UnsolvedSymbolVisitor.java:287)
at org.checkerframework.specimin.UnsolvedSymbolVisitor.visit(UnsolvedSymbolVisitor.java:68)
at com.github.javaparser.ast.body.ClassOrInterfaceDeclaration.accept(ClassOrInterfaceDeclaration.java:92)
at com.github.javaparser.ast.visitor.ModifierVisitor.visit(ModifierVisitor.java:1129)
at com.github.javaparser.ast.visitor.ModifierVisitor.visit(ModifierVisitor.java:51)
at com.github.javaparser.ast.NodeList.accept(NodeList.java:277)
at com.github.javaparser.ast.visitor.ModifierVisitor.modifyList(ModifierVisitor.java:1168)
at com.github.javaparser.ast.visitor.ModifierVisitor.visit(ModifierVisitor.java:306)
at com.github.javaparser.ast.visitor.ModifierVisitor.visit(ModifierVisitor.java:51)
at com.github.javaparser.ast.CompilationUnit.accept(CompilationUnit.java:127)
at org.checkerframework.specimin.SpeciminRunner.performMinimization(SpeciminRunner.java:121)
at org.checkerframework.specimin.SpeciminRunner.main(SpeciminRunner.java:61)
Is this an issue with Specimin or JavaParser?
This is an important issue, as we are trying to iterate through Java projects - Each Java project's public method in each public class will be minimized. We are unable to minimize org.checkerframework.specimin.UnsolvedSymbolVisitor#setImportStatement(NodeList) within Specimin.
The text was updated successfully, but these errors were encountered:
jonathan-m-phillips
changed the title
Exception passing NodeList<ImportDeclaration> as an argument in targetMethod
UnresolvedSymbolException during method minimization - NodeList<ImportDeclaration>
Nov 12, 2023
I'm encountering an UnsolvedSymbolException when running Specimin on a method with the signature org.checkerframework.specimin.UnsolvedSymbolVisitor#setImportStatement(NodeList). Below are the arguments passed to Specimin and the stack trace of the exception:
Arguments
--args=--outputDirectory "/temp/output/dir" --root "my/root/dir/specimin/src/main/java" --targetFile "org/checkerframework/specimin/UnsolvedSymbolVisitor.java" --targetMethod "org.checkerframework.specimin.UnsolvedSymbolVisitor#setImportStatement(NodeList<ImportDeclaration>)"
Exception
Is this an issue with Specimin or JavaParser?
This is an important issue, as we are trying to iterate through Java projects - Each Java project's public method in each public class will be minimized. We are unable to minimize org.checkerframework.specimin.UnsolvedSymbolVisitor#setImportStatement(NodeList) within Specimin.
The text was updated successfully, but these errors were encountered: