#vulnerable code 
                                boolean checkBindingExist(List<Binding> bs, String name, String file, int start) {
        if (bs == null) {
            return false;
        }

        for (Binding b : bs) {
            String actualFile = b.getFile();
            if (b.getName().equals(name) &&
                    actualFile.equals(file) &&
                    b.getStart() == start)
            {
                return true;
            }
        }

        return false;
    } 
                            #location 9 
                            #vulnerability type NULL_DEREFERENCE
#fixed code
                                boolean checkBindingExist(List<Binding> bs, String file, int start, int end) {
        if (bs == null) {
            return false;
        }

        for (Binding b : bs) {
            if (((b.getFile() == null && file == null) ||
                    (b.getFile() != null && file != null && b.getFile().equals(file))) &&
                    b.start == start && b.end == end)
            {
                return true;
            }
        }

        return false;
    }