Interface NullDerefAndRedundantComparisonCollector

    • Method Detail

      • foundNullDeref

        @Deprecated
        void foundNullDeref​(Location location,
                            ValueNumber valueNumber,
                            IsNullValue refValue,
                            ValueNumberFrame vnaFrame)
        Subclasses should override this method to capture locations where a null pointer is dereferenced.
        Parameters:
        location - the Location of the null dereference
        valueNumber - the ValueNumber of the possibly-null value
        refValue - the kind of possibly-null value dereferenced
        vnaFrame - The ValueNumber Frame at the point where the dereference occurred
      • foundNullDeref

        void foundNullDeref​(Location location,
                            ValueNumber valueNumber,
                            IsNullValue refValue,
                            ValueNumberFrame vnaFrame,
                            boolean isConsistent)
        Subclasses should override this method to capture locations where a null pointer is dereferenced.
        Parameters:
        location - the Location of the null dereference
        valueNumber - the ValueNumber of the possibly-null value
        refValue - the kind of possibly-null value dereferenced
        vnaFrame - The ValueNumber Frame at the point where the dereference occurred
        isConsistent - true if the refValue is identical at all clones of the same instruction
      • foundRedundantNullCheck

        void foundRedundantNullCheck​(Location location,
                                     RedundantBranch redundantBranch)
        Subclasses should override this method to capture locations where a redundant null comparison is performed.
        Parameters:
        location - the Location of the redundant null check
        redundantBranch - the RedundantBranch
      • foundGuaranteedNullDeref

        void foundGuaranteedNullDeref​(@Nonnull
                                      java.util.Set<Location> assignedNullLocationSet,
                                      @Nonnull
                                      java.util.Set<Location> derefLocationSet,
                                      java.util.SortedSet<Location> doomedLocations,
                                      ValueNumberDataflow vna,
                                      ValueNumber refValue,
                                      @CheckForNull
                                      BugAnnotation variableAnnotation,
                                      NullValueUnconditionalDeref deref,
                                      boolean npeIfStatementCovered)
        Subclasses should override this method to capture values assigned null (or that become null through a comparison and branch) that are guaranteed to reach a dereference (ignoring implicit exception paths).
        Parameters:
        assignedNullLocationSet - set of locations where the value becomes null
        derefLocationSet - set of locations where dereferences occur
        doomedLocations - locations at which the value is doomed
        vna - ValueNumberDataflow
        refValue - the null value
        variableAnnotation - TODO
        deref - TODO
        npeIfStatementCovered - true if doom location is a statement