Index: trunk/autoquest-core-usability/src/main/java/de/ugoe/cs/autoquest/usability/UsabilitySmellIntensity.java
===================================================================
--- trunk/autoquest-core-usability/src/main/java/de/ugoe/cs/autoquest/usability/UsabilityDefectSeverity.java	(revision 1493)
+++ trunk/autoquest-core-usability/src/main/java/de/ugoe/cs/autoquest/usability/UsabilitySmellIntensity.java	(revision 1918)
@@ -26,22 +26,26 @@
  * @author 2012, last modified by $Author: pharms$
  */
-public enum UsabilityDefectSeverity {
-    
-    INFO, LOW, MEDIUM, HIGH;
+public class UsabilitySmellIntensity {
     
     /** */
-    static int defaultCoverageQuantile = 950;
+    private int ratio;
+    
+    /** */
+    private int eventCoverage;
+    
+    /** */
+    private int eventCoverageQuantile;
 
     /**
      * 
      */
-    static UsabilityDefectSeverity getSeverity(int ratio,
-                                               int highRatioLevel,
-                                               int mediumRatioLevel,
-                                               int lowRatioLevel,
-                                               int infoRatioLevel)
+    static UsabilitySmellIntensity getIntensity(int        ratio,
+                                                ITask      taskWithSmell,
+                                                ITaskModel wholeTaskModel)
     {
-        return getSeverity(ratio, highRatioLevel, mediumRatioLevel, lowRatioLevel, infoRatioLevel,
-                           defaultCoverageQuantile);
+        ITaskInfo taskInfo = wholeTaskModel.getTaskInfo(taskWithSmell);
+        int eventCoverage = taskInfo.getMeasureValue(TaskMetric.EVENT_COVERAGE);
+        int eventCoverageQuantile = taskInfo.getMeasureValue(TaskMetric.EVENT_COVERAGE_QUANTILE);
+        return getIntensity(ratio, eventCoverage, eventCoverageQuantile);
     }
 
@@ -49,16 +53,6 @@
      * 
      */
-    static UsabilityDefectSeverity getSeverity(int        ratio,
-                                               int        highRatioLevel,
-                                               int        mediumRatioLevel,
-                                               int        lowRatioLevel,
-                                               int        infoRatioLevel,
-                                               ITask      taskWithDefect,
-                                               ITaskModel wholeTaskModel)
-    {
-        ITaskInfo taskInfo = wholeTaskModel.getTaskInfo(taskWithDefect);
-        int eventCoverageQuantile = taskInfo.getMeasureValue(TaskMetric.EVENT_COVERAGE_QUANTILE);
-        return getSeverity(ratio, highRatioLevel, mediumRatioLevel, lowRatioLevel, infoRatioLevel,
-                           eventCoverageQuantile);
+    static UsabilitySmellIntensity getIntensity(int ratio) {
+        return getIntensity(ratio, -1, -1);
     }
 
@@ -66,62 +60,60 @@
      * 
      */
-    static UsabilityDefectSeverity getSeverity(int ratio,
-                                               int highRatioLevel,
-                                               int mediumRatioLevel,
-                                               int lowRatioLevel,
-                                               int infoRatioLevel,
-                                               int coverageQuantile)
+    static UsabilitySmellIntensity getIntensity(int ratio,
+                                                int eventCoverage,
+                                                int eventCoverageQuantile)
     {
-        int effectiveRatio = ratio;
-        
-        // event coverage ratio is in per mille. The more executed events a task covers, the more
-        // important a related usability defect.
-        /*if (eventCoverageRatio < 1) {
-            // one per mille, so one of thousand events is covered
-            effectiveRatio *= 0.2;
+        if ((ratio > 0) && ((eventCoverageQuantile == -1) || (eventCoverageQuantile > 0))) {
+            return new UsabilitySmellIntensity(ratio, eventCoverage, eventCoverageQuantile);
         }
-        else if (eventCoverageRatio < 5) {
-            // 5 per mille, so one of 250 events is covered
-            effectiveRatio *= 0.4;
+        else {
+            return null;
         }
-        else if (eventCoverageRatio < 10) {
-            // 1 percent, so one of 100 events is covered
-            effectiveRatio *= 0.5;
-        }
-        else if (eventCoverageRatio < 20) {
-            // 2 percent, so one of 50 events is covered
-            effectiveRatio *= 0.6;
-        }
-        else if (eventCoverageRatio < 30) {
-            // 3 percent, so one of 33 events is covered
-            effectiveRatio *= 0.7;
-        }
-        else if (eventCoverageRatio < 40) {
-            // 4 percent, so one of 28 events is covered
-            effectiveRatio *= 0.8;
-        }
-        else if (eventCoverageRatio < 50) {
-            // 5 percent, so one of 25 events is covered
-            effectiveRatio *= 0.9;
-        }*/
-        //else {
-            // more than 5 percent, so 1 of 20 events, do not change ratio
-        //}
-        if (coverageQuantile >= defaultCoverageQuantile) {
-            if (effectiveRatio >= highRatioLevel) {
-                return UsabilityDefectSeverity.HIGH;
-            }
-            else if (effectiveRatio >= mediumRatioLevel) {
-                return UsabilityDefectSeverity.MEDIUM;
-            }
-            else if (effectiveRatio >= lowRatioLevel) {
-                return UsabilityDefectSeverity.LOW;
-            }
-            else if (effectiveRatio >= infoRatioLevel) {
-                return UsabilityDefectSeverity.INFO;
-            }
-        }
-        
-        return null;
     }
+
+    /**
+     * <p>
+     * TODO: comment
+     * </p>
+     *
+     * @param ratio
+     * @param eventCoverage
+     * @param eventCoverageQuantile
+     */
+    private UsabilitySmellIntensity(int ratio, int eventCoverage, int eventCoverageQuantile) {
+        super();
+        this.ratio = ratio;
+        this.eventCoverage = eventCoverage;
+        this.eventCoverageQuantile = eventCoverageQuantile;
+    }
+
+    /**
+     * @return the ratio
+     */
+    public int getRatio() {
+        return ratio;
+    }
+
+    /**
+     * @return the eventCoverage
+     */
+    public int getEventCoverage() {
+        return eventCoverage;
+    }
+
+    /**
+     * @return the eventCoverageQuantile
+     */
+    public int getEventCoverageQuantile() {
+        return eventCoverageQuantile;
+    }
+
+    /* (non-Javadoc)
+     * @see java.lang.Object#toString()
+     */
+    @Override
+    public String toString() {
+        return Integer.toString(ratio);
+    }
+    
 }
