Index: trunk/quest-core-usability/src/main/java/de/ugoe/cs/quest/usability/UsabilityDefectDescription.java
===================================================================
--- trunk/quest-core-usability/src/main/java/de/ugoe/cs/quest/usability/UsabilityDefectDescription.java	(revision 496)
+++ trunk/quest-core-usability/src/main/java/de/ugoe/cs/quest/usability/UsabilityDefectDescription.java	(revision 561)
@@ -1,3 +1,2 @@
-//-------------------------------------------------------------------------------------------------
 // Module    : $RCSfile: UsabilityDefectDescriptions.java,v $
 // Version   : $Revision: 0.0 $  $Author: pharms $  $Date: 18.07.2012 $
@@ -5,5 +4,5 @@
 // Creation  : 2012 by pharms
 // Copyright : Patrick Harms, 2012
-//-------------------------------------------------------------------------------------------------
+
 package de.ugoe.cs.quest.usability;
 
@@ -18,5 +17,4 @@
 import javax.xml.bind.Unmarshaller;
 
-//-------------------------------------------------------------------------------------------------
 /**
  * TODO comment
@@ -25,212 +23,175 @@
  * @author 2012, last modified by $Author: pharms$
  */
-//-------------------------------------------------------------------------------------------------
-public enum UsabilityDefectDescription
-{
-  TEXT_FIELD_INPUT_RATIO,
-  TEXT_FIELD_INPUT_REPETITIONS,
-  TEXT_FIELD_NO_LETTER_OR_DIGIT_RATIO;
+public enum UsabilityDefectDescription {
+    
+    TEXT_FIELD_INPUT_RATIO,
+    TEXT_FIELD_INPUT_REPETITIONS,
+    TEXT_FIELD_NO_LETTER_OR_DIGIT_RATIO;
 
-  /** */
-  private static final String DEFAULT_MESSAGES_FILE = "defectDescriptions_en.xml";
-  
-  /** */
-  private static DefectDescriptions sDefectDescriptions;
+    /** */
+    private static final String DEFAULT_MESSAGES_FILE = "defectDescriptions_en.xml";
 
-  /** */
-  private DefectDescription mDefectDescription;
-  
-  //-----------------------------------------------------------------------------------------------
-  /**
-   * TODO: comment
-   *
-   * @param name
-   * @param ordinal
-   */
-  //-----------------------------------------------------------------------------------------------
-  private UsabilityDefectDescription()
-  {
-    init();
-  }
+    /** */
+    private static DefectDescriptions sDefectDescriptions;
 
-  //-----------------------------------------------------------------------------------------------
-  /**
-   * TODO: comment
-   *
-   */
-  //-----------------------------------------------------------------------------------------------
-  @SuppressWarnings("unchecked")
-  private void init()
-  {
-    synchronized (this.getClass())
-    {
-      if (sDefectDescriptions == null)
-      {
-        InputStream inputStream = ClassLoader.getSystemResourceAsStream(DEFAULT_MESSAGES_FILE);
+    /** */
+    private DefectDescription defectDescription;
 
-        try
-        {
-          String packageName = DefectDescriptions.class.getPackage().getName();
-          JAXBContext jaxbContext = JAXBContext.newInstance(packageName);
-          Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
-        
-          sDefectDescriptions =
-            ((JAXBElement<DefectDescriptions>) unmarshaller.unmarshal(inputStream)).getValue();
+    /**
+     * TODO: comment
+     * 
+     * @param name
+     * @param ordinal
+     */
+    private UsabilityDefectDescription() {
+        init();
+    }
+
+    /**
+     * TODO: comment
+     * 
+     */
+    @SuppressWarnings("unchecked")
+    private void init() {
+        synchronized (this.getClass()) {
+            if (sDefectDescriptions == null) {
+                InputStream inputStream =
+                    ClassLoader.getSystemResourceAsStream(DEFAULT_MESSAGES_FILE);
+
+                try {
+                    String packageName = DefectDescriptions.class.getPackage().getName();
+                    JAXBContext jaxbContext = JAXBContext.newInstance(packageName);
+                    Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
+
+                    sDefectDescriptions =
+                        ((JAXBElement<DefectDescriptions>) unmarshaller.unmarshal(inputStream))
+                            .getValue();
+                }
+                catch (Exception e) {
+                    throw new RuntimeException
+                        ("error while initializing usability defect descriptions", e);
+                }
+                finally {
+                    if (inputStream != null) {
+                        try {
+                            inputStream.close();
+                        }
+                        catch (IOException e) {
+                            // ignore
+                        }
+                    }
+                }
+            }
         }
-        catch (Exception e)
-        {
-          throw new RuntimeException("error while initializing usability defect descriptions", e);
+
+        for (DefectDescription description : sDefectDescriptions.getDefectDescription()) {
+            if (this.name().equals(description.getDefectId())) {
+                defectDescription = description;
+                break;
+            }
         }
-        finally
-        {
-          if (inputStream != null)
-          {
-            try
-            {
-              inputStream.close();
-            }
-            catch (IOException e)
-            {
-              // ignore
-            }
-          }
+
+        if (defectDescription == null) {
+            throw new RuntimeException
+                ("error while initializing usability defect descriptions. No " +
+                 "description text available for description " + this.name());
         }
-      }
     }
-    
-    for (DefectDescription description : sDefectDescriptions.getDefectDescription())
-    {
-      if (this.name().equals(description.getDefectId()))
-      {
-        mDefectDescription = description;
-        break;
-      }
-    }
-    
-    if (mDefectDescription == null)
-    {
-      throw new RuntimeException("error while initializing usability defect descriptions. No " +
-                                 "description text available for description " + this.name());
-    }
-  }
 
-  //-----------------------------------------------------------------------------------------------
-  /**
+    /**
    * 
    */
-  //-----------------------------------------------------------------------------------------------
-  public String[] getDescriptionParameters()
-  {
-    List<String> parameters = new ArrayList<String>();
-    
-    for (Object fragment : mDefectDescription.getTextFragmentOrParameterFragment())
-    {
-      if (fragment instanceof ParameterFragment)
-      {
-        parameters.add(((ParameterFragment) fragment).getParameterName());
-      }
+    public String[] getDescriptionParameters() {
+        List<String> parameters = new ArrayList<String>();
+
+        for (Object fragment : defectDescription.getTextFragmentOrParameterFragment()) {
+            if (fragment instanceof ParameterFragment) {
+                parameters.add(((ParameterFragment) fragment).getParameterName());
+            }
+        }
+
+        return parameters.toArray(new String[parameters.size()]);
     }
-    
-    return parameters.toArray(new String[parameters.size()]);
-  }
-  
-  //-----------------------------------------------------------------------------------------------
-  /**
+
+    /**
    * 
    */
-  //-----------------------------------------------------------------------------------------------
-  public String toString(Map<String, String> parameters) throws IllegalArgumentException
-  {
-    StringBuffer result = new StringBuffer();
-    
-    for (Object fragment : mDefectDescription.getTextFragmentOrParameterFragment())
-    {
-      if (result.length() > 0)
-      {
-        result.append(" ");
-      }
-      
-      if (fragment instanceof ParameterFragment)
-      {
-        String value = null;
-        if (parameters != null)
-        {
-          value = parameters.get(((ParameterFragment) fragment).getParameterName());
+    public String toString(Map<String, String> parameters) throws IllegalArgumentException {
+        StringBuffer result = new StringBuffer();
+
+        for (Object fragment : defectDescription.getTextFragmentOrParameterFragment()) {
+            if (result.length() > 0) {
+                result.append(" ");
+            }
+
+            if (fragment instanceof ParameterFragment) {
+                String value = null;
+                if (parameters != null) {
+                    value = parameters.get(((ParameterFragment) fragment).getParameterName());
+                }
+
+                if (value != null) {
+                    result.append(value);
+                }
+                else {
+                    throw new IllegalArgumentException
+                        ("required parameter \"" +
+                         ((ParameterFragment) fragment).getParameterName() +
+                         "\" for usability defect description " + this.name() + " not provided");
+                }
+            }
+            else {
+                result.append(getFragmentString(fragment));
+            }
         }
-        
-        if (value != null)
-        {
-          result.append(value);
+
+        return result.toString();
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see java.lang.Enum#toString()
+     */
+    @Override
+    public String toString() {
+        StringBuffer result = new StringBuffer();
+
+        int paramCount = 1;
+        for (Object fragment : defectDescription.getTextFragmentOrParameterFragment()) {
+            if (result.length() > 0) {
+                result.append(" ");
+            }
+
+            if (fragment instanceof ParameterFragment) {
+                result.append("<parameter");
+                result.append(paramCount++);
+                result.append(">");
+            }
+            else {
+                result.append(getFragmentString(fragment));
+            }
         }
-        else
-        {
-          throw new IllegalArgumentException
-            ("required parameter \"" + ((ParameterFragment) fragment).getParameterName() +
-             "\" for usability defect description " + this.name() + " not provided");
+
+        return result.toString();
+    }
+
+    /**
+     * TODO: comment
+     * 
+     * @param fragment
+     * @return
+     */
+    private String getFragmentString(Object fragment) {
+        String fragmentStr = fragment.toString().trim();
+
+        fragmentStr = fragmentStr.replaceAll("\n", " ");
+
+        while (fragmentStr.indexOf("  ") > -1) {
+            fragmentStr = fragmentStr.replaceAll("  ", " ");
         }
-      }
-      else
-      {
-        result.append(getFragmentString(fragment));
-      }
+
+        return fragmentStr;
     }
-    
-    return result.toString();
-  }
-
-  //-----------------------------------------------------------------------------------------------
-  /* (non-Javadoc)
-   * @see java.lang.Enum#toString()
-   */
-  //-----------------------------------------------------------------------------------------------
-  @Override
-  public String toString()
-  {
-    StringBuffer result = new StringBuffer();
-    
-    int paramCount = 1;
-    for (Object fragment : mDefectDescription.getTextFragmentOrParameterFragment())
-    {
-      if (result.length() > 0)
-      {
-        result.append(" ");
-      }
-      
-      if (fragment instanceof ParameterFragment)
-      {
-        result.append("<parameter");
-        result.append(paramCount++);
-        result.append(">");
-      }
-      else
-      {
-        result.append(getFragmentString(fragment));
-      }
-    }
-    
-    return result.toString();
-  }
-
-  //-----------------------------------------------------------------------------------------------
-  /**
-   * TODO: comment
-   *
-   * @param fragment
-   * @return
-   */
-  //-----------------------------------------------------------------------------------------------
-  private String getFragmentString(Object fragment)
-  {
-    String fragmentStr = fragment.toString().trim();
-    
-    fragmentStr = fragmentStr.replaceAll("\n", " ");
-    
-    while (fragmentStr.indexOf("  ") > -1)
-    {
-      fragmentStr = fragmentStr.replaceAll("  ", " ");
-    }
-    
-    return fragmentStr;
-  }
 
 }
