Class MineBugHistory

java.lang.Object
edu.umd.cs.findbugs.workflow.MineBugHistory

public class MineBugHistory extends Object
Mine historical information from a BugCollection. The BugCollection should be built using UpdateBugCollection to record the history of analyzing all versions over time.
  • Field Details

  • Constructor Details

    • MineBugHistory

      public MineBugHistory()
    • MineBugHistory

      public MineBugHistory(SortedBugCollection bugCollection)
  • Method Details

    • setBugCollection

      public void setBugCollection(SortedBugCollection bugCollection)
    • setFormatDates

      public void setFormatDates(boolean value)
    • setNoTabs

      public void setNoTabs()
    • setXml

      public void setXml()
    • setSummary

      public void setSummary()
    • execute

      public MineBugHistory execute()
    • dump

      public void dump(PrintStream out)
    • dumpSummary

      public void dumpSummary(PrintStream out)
    • dumpOriginal

      public void dumpOriginal(PrintStream out)
      This is how dump() was implemented up to and including version 0.9.5.
    • pad

      private static void pad(int width, PrintStream out)
      emit width space characters to out
    • print

      private static void print(int width, boolean alignRight, PrintStream out, Object obj)
      equivalent to out.print(obj) except it may be padded on the left or right
      Parameters:
      width - padding will occur if the stringified oxj is shorter than this
      alignRight - true to pad on the left, false to pad on the right
      out - the PrintStream printed to
      obj - the value to print (may be an auto-boxed primitive)
    • dumpNoTabs

      public void dumpNoTabs(PrintStream out)
      This implementation of dump() tries to better align columns (when viewed with a fixed-width font) by padding with spaces instead of using tabs. Also, timestamps are formatted more tersely (-formatDates option). The bad news is that it requires a minimum of 112 columns.
      See Also:
    • dumpXml

      public void dumpXml(PrintStream out)
      This is how dump() was implemented up to and including version 0.9.5.
    • getKey

      private int getKey(boolean activePrevious, boolean activeCurrent)
      Get key used to classify the presence and/or absence of a BugInstance in successive versions in the history.
      Parameters:
      activePrevious - true if the bug was active in the previous version, false if not
      activeCurrent - true if the bug is active in the current version, false if not
      Returns:
      the key: one of ADDED, RETAINED, REMOVED, and DEAD
    • main

      public static void main(String[] args) throws Exception
      Throws:
      Exception