TypeExpr typeExpr = (TypeExpr) methodReferenceExpr.getScope();
if (!(typeExpr.getType() instanceof com.github.javaparser.ast.type.ClassOrInterfaceType)) {
throw new UnsupportedOperationException(typeExpr.getType().getClass().getCanonicalName());
}
ClassOrInterfaceType classOrInterfaceType = (ClassOrInterfaceType) typeExpr.getType();
<BUG>SymbolReference<TypeDeclaration> typeDeclarationSymbolReference = JavaParserFactory.getContext(classOrInterfaceType, typeSolver).solveType(classOrInterfaceType.getName(), typeSolver);
</BUG>
if (!typeDeclarationSymbolReference.isSolved()) {
throw new UnsupportedOperationException();
}

TypeExpr typeExpr = (TypeExpr) methodReferenceExpr.getScope();
if (!(typeExpr.getType() instanceof com.github.javaparser.ast.type.ClassOrInterfaceType)) {
throw new UnsupportedOperationException(typeExpr.getType().getClass().getCanonicalName());
}
ClassOrInterfaceType classOrInterfaceType = (ClassOrInterfaceType) typeExpr.getType();
SymbolReference<TypeDeclaration> typeDeclarationSymbolReference = JavaParserFactory.getContext(classOrInterfaceType, typeSolver).solveType(classOrInterfaceType.getName().getId(), typeSolver);
if (!typeDeclarationSymbolReference.isSolved()) {
throw new UnsupportedOperationException();
}
