Skip to content

Do not stop the visit of AST if an error happens#196

Open
jecisc wants to merge 2 commits into
v4from
fix-parameters-typing
Open

Do not stop the visit of AST if an error happens#196
jecisc wants to merge 2 commits into
v4from
fix-parameters-typing

Conversation

@jecisc
Copy link
Copy Markdown
Member

@jecisc jecisc commented Feb 9, 2026

Fixes #193
Fixes #191

Adding a try/catch to not stop the visit if an error happens

@jecisc jecisc force-pushed the fix-parameters-typing branch from edd7206 to cd76708 Compare February 9, 2026 16:52
@jecisc jecisc closed this Feb 9, 2026
@jecisc jecisc reopened this Feb 9, 2026
@jecisc
Copy link
Copy Markdown
Member Author

jecisc commented Feb 9, 2026

Github has some overload problems :(

@jecisc jecisc closed this Feb 9, 2026
@jecisc jecisc reopened this Feb 9, 2026
@jecisc
Copy link
Copy Markdown
Member Author

jecisc commented Feb 9, 2026

I wonder if the failing tests are not because there are try catch but error are caught by the new robustness mechanism :/

To investigate further

@jecisc jecisc force-pushed the fix-parameters-typing branch from cd76708 to 60f9d0e Compare February 11, 2026 17:56
@jecisc
Copy link
Copy Markdown
Member Author

jecisc commented Feb 11, 2026

@NicolasAnquetil Is that fine with you?

@jecisc jecisc force-pushed the fix-parameters-typing branch from 60f9d0e to 2612ce2 Compare February 11, 2026 18:00
@NicolasAnquetil
Copy link
Copy Markdown
Contributor

@NicolasAnquetil Is that fine with you?

ouf ... using reflexive API to access a private method of the JDT library :-(
That's a though one to swallow

I agree with you that private is not a nice thing, but that does not mean we can do this sort of thing.
Can we discuss it ?

@NicolasAnquetil
Copy link
Copy Markdown
Contributor

Why don't you catch the error that you have in the appropriate visit(...) method ?

@NicolasAnquetil
Copy link
Copy Markdown
Contributor

or even better, why not correcting the meta-model to accept the "right thing" which is in this case that arrays of primitive type can be TypeArgument

@jecisc
Copy link
Copy Markdown
Member Author

jecisc commented Feb 12, 2026

About the error catching:
I did not go with overriding the #visit method because in Java we have one visit method by node kind and this would have lead to way more code modifications. I agree with you that reflectivity is not nice :( But from what I got it's classic to skip visibility problems and I hope JDT is stable enough to not change the way the visit is done.

About the fix of the problem:
Clotilde knows parametrics much better than me how to fix this but I don't know when she will get the time to fix this issue (And this has a low impact on the CallGraph building if we remove the side effect of stopping the visit on a bug).
Also, I found multiple other parameters in my model missing their typing because of different errors happening before in the type ref ref visitor and I don't have time to fix all of them or to look for each cause :( Since I am now in Profile project, I did this quick fix as a "quick side quest" so that Imen can progress on her analysis.

The goal of this PR is to make VVJ more robust in general, not just for the specific issue I got. Also if in the future we introduce new bugs, this will reduce the impact of those bugs.

I am open to another way to do this (Java is really not my specialty so we can probably do better!) but I'm not sure it will be simpler to override each visit methods

@NicolasAnquetil
Copy link
Copy Markdown
Contributor

I understand the need (not stopping the visit in case of error) and I even agree with it.
But I think the current solution is worse than the problem

I propose one of the following:

  • use it on your branch and you will come back to the main one when the other issue is fixed
  • put a try catch around the error:
    at fr.inria.verveine.extractor.java.EntityDictionary.buildFamixParametricAssociation(EntityDictionary.java:473)
    For example this makes the test pass and has the advantage that it clearly identifies the issue and were it needs to be corrected:
	public  <T extends TParametricEntity> TParametricAssociation buildFamixParametricAssociation(TParametricAssociation association, ITypeBinding[] genericTypes, ITypeBinding[] typeArguments
	) {
		
		Iterator<ITypeBinding> genericIterator = Arrays.asList(genericTypes).iterator();
		Iterator<ITypeBinding> concreteIterator = Arrays.asList(typeArguments).iterator();

		while (concreteIterator.hasNext() && genericIterator.hasNext()) {
			try {
				TTypeArgument typeArgument = (TTypeArgument)ensureFamixType(concreteIterator.next());
				TypeParameter typeParameter = (TypeParameter)ensureFamixType(genericIterator.next());

				Concretization concretization = ensureFamixConcretization(typeArgument, typeParameter);
				association.addConcretization(concretization);
			}
			catch (ClassCastException e) {
				System.err.println("Stumbling on issue https://github.com/moosetechnology/VerveineJ/issues/197 again");
			}
		}

		return association;
	}

@jecisc
Copy link
Copy Markdown
Member Author

jecisc commented Feb 12, 2026

I can tell Imen to use this branch for now but she will need to compile the jar.

The second solution is not good enough since it's not the only problem I think.

To have a clean fix for this problem do you have an idea other than overriding all the #visit methods?

@jecisc
Copy link
Copy Markdown
Member Author

jecisc commented Feb 12, 2026

@NicolasAnquetil I tried your solution of overriding #visit methods but this does not work because we do not always call super visit(node) when we override the visit method. So it does not work :(

To keep this somewhere, here is the file to implement this solution:

package fr.inria.verveine.extractor.java.visitors;

import org.eclipse.jdt.core.dom.*;

/**
 * I am an abstract visitor to catch all errors during a visit to keep visiting the AST if an error happens somewhere.
 */
public abstract class VerveineJSafeVisitor extends ASTVisitor {

    public boolean visit(AnnotationTypeDeclaration node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(AnnotationTypeMemberDeclaration node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(AnonymousClassDeclaration node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(ArrayAccess node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(ArrayCreation node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(ArrayInitializer node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(ArrayType node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(AssertStatement node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(Assignment node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(Block node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(BlockComment node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(BooleanLiteral node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(BreakStatement node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(CaseDefaultExpression node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(CastExpression node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(CatchClause node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(CharacterLiteral node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(ClassInstanceCreation node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(CompilationUnit node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(ConditionalExpression node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(ConstructorInvocation node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(ContinueStatement node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(CreationReference node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(DoStatement node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(EmptyStatement node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(EnhancedForStatement node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(EnumConstantDeclaration node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(EnumDeclaration node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(ExportsDirective node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(ExpressionMethodReference node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(ExpressionStatement node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(Dimension node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(FieldAccess node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(FieldDeclaration node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(ForStatement node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(GuardedPattern node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(IfStatement node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(ImportDeclaration node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(InfixExpression node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(Initializer node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(InstanceofExpression node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(IntersectionType node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(Javadoc node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(JavaDocRegion node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(JavaDocTextElement node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(LabeledStatement node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(LambdaExpression node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(LineComment node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(MarkerAnnotation node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(MemberRef node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(MemberValuePair node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(MethodRef node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(MethodRefParameter node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(MethodDeclaration node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(MethodInvocation node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(Modifier node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(ModuleDeclaration node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(ModuleModifier node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(NameQualifiedType node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(NormalAnnotation node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(NullLiteral node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(NullPattern node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(NumberLiteral node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(OpensDirective node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(PackageDeclaration node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(ParameterizedType node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(ParenthesizedExpression node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(PatternInstanceofExpression node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(PostfixExpression node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(PrefixExpression node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(PrimitiveType node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(ProvidesDirective node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(QualifiedName node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(QualifiedType node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(ModuleQualifiedName node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(RequiresDirective node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(RecordDeclaration node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(RecordPattern node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(EitherOrMultiPattern node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(ReturnStatement node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(SimpleName node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(SimpleType node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(SingleMemberAnnotation node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(SingleVariableDeclaration node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(StringLiteral node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(SuperConstructorInvocation node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(SuperFieldAccess node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(SuperMethodInvocation node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(SuperMethodReference node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(SwitchCase node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(SwitchExpression node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(SwitchStatement node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(SynchronizedStatement node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(TagElement node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(TagProperty node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(TextBlock node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(TextElement node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(ThisExpression node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(ThrowStatement node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(TryStatement node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(TypeDeclaration node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(TypeDeclarationStatement node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(TypeLiteral node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(TypeMethodReference node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(TypeParameter node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(TypePattern node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(UnionType node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(UsesDirective node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(VariableDeclarationExpression node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(VariableDeclarationStatement node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(VariableDeclarationFragment node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(WhileStatement node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(WildcardType node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(YieldStatement node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }

    public boolean visit(ImplicitTypeDeclaration node) {
        try {
            return super.visit(node);
        } catch (Exception e) {
            e.printStackTrace(); //If  an error occurs we print it and proceed with the execution. Later we should improve to produce an error report
            return true;
        }
    }



}

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

Successfully merging this pull request may close these issues.

Improve AST visit robustness Missing parameter type information

2 participants