Index: branches/OKBJavaConnector/ECJClient/src/com/heuristiclab/okb/ecj/OKBStatistics.java
===================================================================
--- branches/OKBJavaConnector/ECJClient/src/com/heuristiclab/okb/ecj/OKBStatistics.java	(revision 6326)
+++ branches/OKBJavaConnector/ECJClient/src/com/heuristiclab/okb/ecj/OKBStatistics.java	(revision 6327)
@@ -23,75 +23,118 @@
  *
  * @author fab
+ * Implementation of statics which are sending the parameters and results
+ * to the OKB Serverices
+ *
  */
-public class OKBStatistics extends Statistics{
+public class OKBStatistics extends Statistics {
 
+    /**
+     * Plattformname which has to be in already in the service
+     */
     public static final String ECJ_PLATFORM_NAME = "ECJ";
+    /**
+     * Name for parameters in the param file
+     */
     public static final String OKB_PARAMETER_NAME = "okb.parameter";
+    /**
+     * name of the seed paramter in the params file
+     */
     public static final String OKB_PARAMETER_SEED = "okb.parameter.seed";
+    /**
+     * username
+     */
+    public static final String OKB_USER = "okb.username";
+    /**
+     * password
+     */
+    public static final String OKB_PASSWORD = "okb.password";
+    /**
+     * current Platform
+     * */
     private Platform ecjPlatform;
-    
+    /**
+     * current Alogrithm
+     */
+    private Algorithm algorithm;
 
-
+    /**
+     * Setup of statistic, username and password are set
+     *
+     * platform an algorithm are fetched from the service
+     * if the platform or algorithm are missing a illegal arugement excption is thorwn
+     **/
     @Override
     public void setup(EvolutionState state, Parameter base) {
         super.setup(state, base);
-    
-        
+        handler.UserNameHandler.setUser(getUsername(state));
+        handler.UserNameHandler.setPassword(getPassword(state));
 
+
+        ecjPlatform = AdministrationServiceUtil.getPlattform(ECJ_PLATFORM_NAME);
+        algorithm = RunCreationUtil.getAlgorithm(state.evaluator.getClass().getName(), ecjPlatform.getName());
     }
 
-
-
-    @Override
-    public void postInitializationStatistics(EvolutionState state) {
-        super.postInitializationStatistics(state);
-    }
-
+    /**
+     * Submitting the results to the service
+     * @param state
+     * @param result
+     */
     @Override
     public void finalStatistics(EvolutionState state, int result) {
         super.finalStatistics(state, result);
 
-       ecjPlatform = AdministrationServiceUtil.getPlattform(ECJ_PLATFORM_NAME);
-       Algorithm algorithm = RunCreationUtil.getAlgorithm(state.evaluator.getClass().getName(), ecjPlatform.getName());
-       Map<String, String> parameters = getParametersToSend(state);
-       ByteArrayOutputStream o = new ByteArrayOutputStream();
-       new XMLEncoder(o).writeObject(state);
 
-
-        
-        RunCreationUtil.createRun(parameters,result,new String(o.toByteArray()),getSeed(state),algorithm.getId() , ecjPlatform.getId());
+        Map<String, String> parameters = getParametersToSend(state);
+        ByteArrayOutputStream o = new ByteArrayOutputStream();
+        new XMLEncoder(o).writeObject(state);
+        RunCreationUtil.createRun(parameters, result, new String(o.toByteArray()), getSeed(state), algorithm.getId(), ecjPlatform.getId());
 
     }
 
-    private int getSeed(EvolutionState state)
-    {
+    /**
+     * getting the username out of the config
+     **/
+    protected final String getUsername(EvolutionState state) {
+        return state.parameters.getString(new Parameter(OKB_USER), null);
+    }
+
+    /**
+     * getting the password out of the config
+     *
+     */
+    private String getPassword(EvolutionState state) {
+        return state.parameters.getString(new Parameter(OKB_PASSWORD), null);
+    }
+
+    /**
+     * getting the default seed out of the config
+     * @throws  IllegalArgumentException if the seed is missing
+     */
+    private int getSeed(EvolutionState state) {
         int returnValue = 0;
-        String seedName = state.parameters.getString(new Parameter(OKB_PARAMETER_SEED),null);
-        if(seedName == null)
+        String seedName = state.parameters.getString(new Parameter(OKB_PARAMETER_SEED), null);
+        if (seedName == null) {
             throw new IllegalArgumentException("no seed given!");
+        }
 
-        returnValue = state.parameters.getInt(new Parameter(seedName),null);
+        returnValue = state.parameters.getInt(new Parameter(seedName), null);
 
         return returnValue;
     }
 
-
-    private Map<String, String> getParametersToSend(EvolutionState state)
-    {
+    /**
+     * getting the parameters out of the config
+     **/
+    private Map<String, String> getParametersToSend(EvolutionState state) {
         Map<String, String> returnValue = new HashMap<String, String>();
-        for(String name : state.parameters.getString(new Parameter(OKB_PARAMETER_NAME),null).split(";"))
-        {
-            String tmp = state.parameters.getString(new Parameter(name.trim()),null);
-            if(tmp == null)
+        for (String name : state.parameters.getString(new Parameter(OKB_PARAMETER_NAME), null).split(";")) {
+            String tmp = state.parameters.getString(new Parameter(name.trim()), null);
+            if (tmp == null) {
                 returnValue.put(name, name);
-            else
+            } else {
                 returnValue.put(name, tmp);
-
+            }
         }
-
         return returnValue;
     }
-    
-    
-    
 }
Index: branches/OKBJavaConnector/ECJClient/src/tutorial1.params
===================================================================
--- branches/OKBJavaConnector/ECJClient/src/tutorial1.params	(revision 6326)
+++ branches/OKBJavaConnector/ECJClient/src/tutorial1.params	(revision 6327)
@@ -53,5 +53,7 @@
 eval.problem		= ec.app.tutorial1.MaxOnes
 
-
+stat		= com.heuristiclab.okb.ecj.OKBStatistics
 okb.parameter = pop.subpop.0.size; pop.subpop.0.duplicate-retrie
 okb.parameter.seed = seed.0
+okb.user = okbtester
+okb.password = okbtester
