Class MineBugHistory


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

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void dump​(java.io.PrintStream out)  
      void dumpNoTabs​(java.io.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.
      void dumpOriginal​(java.io.PrintStream out)
      This is how dump() was implemented up to and including version 0.9.5.
      void dumpSummary​(java.io.PrintStream out)  
      void dumpXml​(java.io.PrintStream out)
      This is how dump() was implemented up to and including version 0.9.5.
      MineBugHistory execute()  
      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.
      static void main​(java.lang.String[] args)  
      private static void pad​(int width, java.io.PrintStream out)
      emit width space characters to out
      private static void print​(int width, boolean alignRight, java.io.PrintStream out, java.lang.Object obj)
      equivalent to out.print(obj) except it may be padded on the left or right
      void setBugCollection​(SortedBugCollection bugCollection)  
      void setFormatDates​(boolean value)  
      void setNoTabs()  
      void setSummary()  
      void setXml()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MineBugHistory

        public MineBugHistory()
    • Method Detail

      • setFormatDates

        public void setFormatDates​(boolean value)
      • setNoTabs

        public void setNoTabs()
      • setXml

        public void setXml()
      • setSummary

        public void setSummary()
      • dump

        public void dump​(java.io.PrintStream out)
      • dumpSummary

        public void dumpSummary​(java.io.PrintStream out)
      • dumpOriginal

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

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

        private static void print​(int width,
                                  boolean alignRight,
                                  java.io.PrintStream out,
                                  java.lang.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​(java.io.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:
        dumpOriginal(PrintStream)
      • dumpXml

        public void dumpXml​(java.io.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​(java.lang.String[] args)
                         throws java.lang.Exception
        Throws:
        java.lang.Exception