#vulnerable code 
                                @Override
    public Optional<MethodUsage> solveMethodAsUsage(String name, List<TypeUsage> parameterTypes, TypeSolver typeSolver) {
        // TODO consider call of static methods
        if (wrappedNode.getScope() != null) {
            try {
                TypeUsage typeOfScope = JavaParserFacade.get(typeSolver).getType(wrappedNode.getScope());
                return typeOfScope.solveMethodAsUsage(name, parameterTypes, typeSolver, this);
            } catch (UnsolvedSymbolException e){
                // ok, maybe it was instead a static access, so let's look for a type
                if (wrappedNode.getScope() instanceof NameExpr){
                    String className = ((NameExpr)wrappedNode.getScope()).getName();
                    SymbolReference<TypeDeclaration> ref = solveType(className, typeSolver);
                    if (ref.isSolved()) {
                        SymbolReference<MethodDeclaration> m = ref.getCorrespondingDeclaration().solveMethod(name, parameterTypes, typeSolver);
                        if (m.isSolved()) {
                            return Optional.of(new MethodUsage(m.getCorrespondingDeclaration(), typeSolver));
                        } else {
                            throw new UnsolvedSymbolException(ref.getCorrespondingDeclaration().toString(), "Method "+name+" with parameterTypes "+parameterTypes);
                        }
                    } else {
                        throw e;
                    }
                } else {
                    throw e;
                }
            }
        } else {
            if (wrappedNode.getParentNode() instanceof MethodCallExpr) {
                MethodCallExpr parent = (MethodCallExpr)wrappedNode.getParentNode();
                if (parent.getScope() == wrappedNode) {
                    return getParent().getParent().solveMethodAsUsage(name, parameterTypes, typeSolver);
                }
            }
            //TypeUsage typeOfScope = JavaParserFacade.get(typeSolver).getTypeOfThisIn(wrappedNode);
            //return typeOfScope.solveMethodAsUsage(name, parameterTypes, typeSolver, this);
            Context parentContext = getParent();
            //System.out.println("NAME "+name);
            return parentContext.solveMethodAsUsage(name, parameterTypes, typeSolver);
        }
    } 
                            #location 38 
                            #vulnerability type NULL_DEREFERENCE
#fixed code
                                @Override
    public Optional<MethodUsage> solveMethodAsUsage(String name, List<TypeUsage> parameterTypes, TypeSolver typeSolver) {
        // TODO consider call of static methods
        if (wrappedNode.getScope() != null) {
            try {
                TypeUsage typeOfScope = JavaParserFacade.get(typeSolver).getType(wrappedNode.getScope());
                return typeOfScope.solveMethodAsUsage(name, parameterTypes, typeSolver, this);
            } catch (UnsolvedSymbolException e){
                // ok, maybe it was instead a static access, so let's look for a type
                if (wrappedNode.getScope() instanceof NameExpr){
                    String className = ((NameExpr)wrappedNode.getScope()).getName();
                    SymbolReference<TypeDeclaration> ref = solveType(className, typeSolver);
                    if (ref.isSolved()) {
                        if (name.equals("getModifiers") && !ref.getCorrespondingDeclaration().solveMethod(name, parameterTypes, typeSolver).isSolved()){
                            System.out.println("FOO");
                        }
                        SymbolReference<MethodDeclaration> m = ref.getCorrespondingDeclaration().solveMethod(name, parameterTypes, typeSolver);
                        if (m.isSolved()) {
                            return Optional.of(new MethodUsage(m.getCorrespondingDeclaration(), typeSolver));
                        } else {
                            throw new UnsolvedSymbolException(ref.getCorrespondingDeclaration().toString(), "Method "+name+" with parameterTypes "+parameterTypes);
                        }
                    } else {
                        throw e;
                    }
                } else {
                    throw e;
                }
            }
        } else {
            if (wrappedNode.getParentNode() instanceof MethodCallExpr) {
                MethodCallExpr parent = (MethodCallExpr)wrappedNode.getParentNode();
                if (parent.getScope() == wrappedNode) {
                    return getParent().getParent().solveMethodAsUsage(name, parameterTypes, typeSolver);
                }
            }
            //TypeUsage typeOfScope = JavaParserFacade.get(typeSolver).getTypeOfThisIn(wrappedNode);
            //return typeOfScope.solveMethodAsUsage(name, parameterTypes, typeSolver, this);
            Context parentContext = getParent();
            //System.out.println("NAME "+name);
            return parentContext.solveMethodAsUsage(name, parameterTypes, typeSolver);
        }
    }