diff --git a/ipojo/examples/junit4osgi/swing-runner/LICENSE b/ipojo/examples/junit4osgi/swing-runner/LICENSE
new file mode 100644
index 0000000..d645695
--- /dev/null
+++ b/ipojo/examples/junit4osgi/swing-runner/LICENSE
@@ -0,0 +1,202 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
diff --git a/ipojo/examples/junit4osgi/swing-runner/NOTICE b/ipojo/examples/junit4osgi/swing-runner/NOTICE
new file mode 100644
index 0000000..b766c24
--- /dev/null
+++ b/ipojo/examples/junit4osgi/swing-runner/NOTICE
@@ -0,0 +1,17 @@
+Apache Felix iPOJO junit4osgi Swing Runner
+Copyright 2008 The Apache Software Foundation
+
+I. Included Software
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
+Licensed under the Apache License 2.0.
+
+II. Used Software
+
+This product uses software developed at
+The Apache Software Foundation (http://www.apache.org/).
+Licensed under the Apache License 2.0.
+
+III. License Summary
+- Apache License 2.0
diff --git a/ipojo/examples/junit4osgi/swing-runner/metadata.xml b/ipojo/examples/junit4osgi/swing-runner/metadata.xml
index 9251b6f..2a5a610 100644
--- a/ipojo/examples/junit4osgi/swing-runner/metadata.xml
+++ b/ipojo/examples/junit4osgi/swing-runner/metadata.xml
@@ -1,3 +1,21 @@
+<!--
+	Licensed to the Apache Software Foundation (ASF) under one
+	or more contributor license agreements.  See the NOTICE file
+	distributed with this work for additional information
+	regarding copyright ownership.  The ASF licenses this file
+	to you under the Apache License, Version 2.0 (the
+	"License"); you may not use this file except in compliance
+	with the License.  You may obtain a copy of the License at
+	
+	http://www.apache.org/licenses/LICENSE-2.0
+	
+	Unless required by applicable law or agreed to in writing,
+	software distributed under the License is distributed on an
+	"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+	KIND, either express or implied.  See the License for the
+	specific language governing permissions and limitations
+	under the License.
+-->
 <?xml version="1.0" encoding="UTF-8"?>
 <iPOJO>
 	<component
diff --git a/ipojo/examples/junit4osgi/swing-runner/pom.xml b/ipojo/examples/junit4osgi/swing-runner/pom.xml
index fe9b18e..4931067 100644
--- a/ipojo/examples/junit4osgi/swing-runner/pom.xml
+++ b/ipojo/examples/junit4osgi/swing-runner/pom.xml
@@ -21,7 +21,7 @@
 	<packaging>bundle</packaging>
 	<name>Junit4Osgi-Swing-GUI</name>
 	<artifactId>org.apache.felix.ipojo.junit4osgi.swing-gui</artifactId>
-	<groupId>ipojo.examples</groupId>
+	<groupId>org.apache.felix</groupId>
 	<version>1.1.0-SNAPSHOT</version>
 	<dependencies>
 		<dependency>
@@ -30,61 +30,78 @@
 			<version>1.1.0-SNAPSHOT</version>
 		</dependency>
 		<dependency>
-			<groupId>org.apache.felix</groupId>
-			<artifactId>org.apache.felix.shell</artifactId>
-			<version>1.0.2</version>
-		</dependency>
-		<dependency>
 			<groupId>junit</groupId>
 			<artifactId>junit</artifactId>
 			<version>3.8.1</version>
 		</dependency>
 	</dependencies>
 	<build>
-		<plugins>
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-compiler-plugin</artifactId>
-				<configuration>
-					<source>1.5</source>
-					<target>1.5</target>
-				</configuration>
-			</plugin>
-			<plugin>
-				<groupId>org.apache.felix</groupId>
-				<artifactId>maven-bundle-plugin</artifactId>
-				<version>1.4.3</version>
-				<extensions>true</extensions>
-				<configuration>
-					<instructions>
-						<Bundle-Name>
-							iPOJO OSGi Junit Runner - Swing Gui
-						</Bundle-Name>
-						<Bundle-SymbolicName>
-							${pom.artifactId}
-						</Bundle-SymbolicName>
-						<Private-Package>
-							org.apache.felix.ipojo.junit4osgi.command
-						</Private-Package>
-						<Import-Package>org.osgi.framework;version=1.3,*</Import-Package>
-					</instructions>
-				</configuration>
-			</plugin>
-			<plugin>
-				<groupId>org.apache.felix</groupId>
-				<artifactId>maven-ipojo-plugin</artifactId>
-				<version>1.1.0-SNAPSHOT</version>
-				<executions>
-					<execution>
-						<goals>
-							<goal>ipojo-bundle</goal>
-						</goals>
-						<configuration>
-							<ignoreAnnotations>true</ignoreAnnotations>
-						</configuration>
-					</execution>
-				</executions>
-			</plugin>
-		</plugins>
-	</build>
+	<plugins>
+		<plugin>
+			<groupId>org.apache.maven.plugins</groupId>
+			<artifactId>maven-compiler-plugin</artifactId>
+			<configuration>
+				<source>1.5</source>
+				<target>1.5</target>
+			</configuration>
+		</plugin>
+		<plugin>
+			<groupId>org.apache.felix</groupId>
+			<artifactId>maven-bundle-plugin</artifactId>
+			<version>1.4.3</version>
+			<extensions>true</extensions>
+			<configuration>
+				<instructions>
+					<Bundle-Name> iPOJO OSGi Junit Runner - Swing Gui</Bundle-Name>
+					<Bundle-SymbolicName> ${pom.artifactId}</Bundle-SymbolicName>
+					<Private-Package> org.apache.felix.ipojo.junit4osgi.command
+					</Private-Package>
+					<Import-Package>org.osgi.framework;version=1.3,*
+					</Import-Package>
+				</instructions>
+			</configuration>
+		</plugin>
+		<plugin>
+			<groupId>org.apache.felix</groupId>
+			<artifactId>maven-ipojo-plugin</artifactId>
+			<version>1.1.0-SNAPSHOT</version>
+			<executions>
+				<execution>
+					<goals>
+						<goal>ipojo-bundle</goal>
+					</goals>
+					<configuration>
+						<ignoreAnnotations>true</ignoreAnnotations>
+					</configuration>
+				</execution>
+			</executions>
+		</plugin>
+		<plugin>
+			<groupId>org.codehaus.mojo</groupId>
+			<artifactId>rat-maven-plugin</artifactId>
+			<configuration>
+				<excludeSubProjects>false</excludeSubProjects>
+				<useEclipseDefaultExcludes>true</useEclipseDefaultExcludes>
+				<useMavenDefaultExcludes>true</useMavenDefaultExcludes>
+				<excludes>
+					<param>doc/*</param>
+					<param>maven-eclipse.xml</param>
+					<param>.checkstyle</param>
+					<param>.externalToolBuilders/*</param>
+				</excludes>
+			</configuration>
+		</plugin>
+		<plugin>
+			<groupId>org.apache.maven.plugins</groupId>
+			<artifactId>maven-checkstyle-plugin
+			</artifactId>
+			<configuration>
+				<configLocation>
+					http://felix.apache.org/ipojo/dev/checkstyle_ipojo.xml
+				</configLocation>
+				<violationSeverity>error</violationSeverity>
+			</configuration>
+		</plugin>
+	</plugins>
+</build>
 </project>
diff --git a/ipojo/examples/junit4osgi/swing-runner/src/main/java/org/apache/felix/ipojo/junit4osgi/command/ResultCellRenderer.java b/ipojo/examples/junit4osgi/swing-runner/src/main/java/org/apache/felix/ipojo/junit4osgi/command/ResultCellRenderer.java
index 680ad32..3370f1a 100644
--- a/ipojo/examples/junit4osgi/swing-runner/src/main/java/org/apache/felix/ipojo/junit4osgi/command/ResultCellRenderer.java
+++ b/ipojo/examples/junit4osgi/swing-runner/src/main/java/org/apache/felix/ipojo/junit4osgi/command/ResultCellRenderer.java
@@ -1,20 +1,3 @@
-/*
- *  Copyright 2008 clement.
- * 
- *  Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- * 
- *       http://www.apache.org/licenses/LICENSE-2.0
- * 
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *  under the License.
- */
-
 /* 
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -52,12 +35,23 @@
      */
     private static final long serialVersionUID = 1L;
 
+    /**
+     * Renderer method.
+     * @param table the table
+     * @param value the value
+     * @param isSelected is the cell selected
+     * @param hasFocus has the cell the focus
+     * @param row the cell row
+     * @param column the cell column
+     * @return the resulting component
+     * @see javax.swing.table.DefaultTableCellRenderer#getTableCellRendererComponent(javax.swing.JTable, java.lang.Object, boolean, boolean, int, int)
+     */
     public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
         Component c = super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
 
         ResultTableModel results = (ResultTableModel) table.getModel();
         String status = (String) results.getValueAt(row, column);
-        if (status.equals(ResultTableModel.SUCESS)) {
+        if (status.equals(ResultTableModel.SUCCESS)) {
             c.setForeground(Color.GREEN);
             setToolTipText(results.getMessage(row, column));
         }
diff --git a/ipojo/examples/junit4osgi/swing-runner/src/main/java/org/apache/felix/ipojo/junit4osgi/command/ResultTableModel.java b/ipojo/examples/junit4osgi/swing-runner/src/main/java/org/apache/felix/ipojo/junit4osgi/command/ResultTableModel.java
index 491f223..bf457ba 100644
--- a/ipojo/examples/junit4osgi/swing-runner/src/main/java/org/apache/felix/ipojo/junit4osgi/command/ResultTableModel.java
+++ b/ipojo/examples/junit4osgi/swing-runner/src/main/java/org/apache/felix/ipojo/junit4osgi/command/ResultTableModel.java
@@ -35,51 +35,84 @@
  */
 public class ResultTableModel extends AbstractTableModel {
 
-    public static final String SUCESS = "success";
+    /**
+     * Success String.
+     */
+    public static final String SUCCESS = "success";
 
+    /**
+     * Failure String.
+     */
     public static final String FAILURE = "failure";
 
+    /**
+     * Error String.
+     */
     public static final String ERROR = "error";
 
+    /**
+     * UUDI.
+     */
     private static final long serialVersionUID = 1L;
 
-    private List<TestRecord> results = new ArrayList<TestRecord>();
+    /**
+     * List of results.
+     */
+    private List<TestRecord> m_results = new ArrayList<TestRecord>();
 
     public int getRowCount() {
-        return results.size();
+        return m_results.size();
     }
 
     public int getColumnCount() {
         return 2;
     }
 
+    /**
+     * Adds a failing test.
+     * @param t the test
+     * @param e the assertion error
+     */
     public void addTest(Test t, AssertionFailedError e) {
         TestRecord rec = new TestRecord(t, e);
-        results.add(rec);
+        m_results.add(rec);
         fireTableDataChanged();
     }
 
+    /**
+     * Adds a test in error.
+     * @param t the test
+     * @param e the thrown error
+     */
     public void addTest(Test t, Throwable e) {
         TestRecord rec = new TestRecord(t, e);
-        results.add(rec);
+        m_results.add(rec);
         fireTableDataChanged();
     }
 
+    /**
+     * Adds a sucessfull test.
+     * @param t the test
+     */
     public void addTest(Test t) {
         if (!contains(t)) {
             TestRecord rec = new TestRecord(t);
-            results.add(rec);
+            m_results.add(rec);
             fireTableDataChanged();
         }
     }
 
     public int getTestCount() {
-        return results.size();
+        return m_results.size();
     }
 
+    /**
+     * Gets the number of success.
+     * @return the number of success
+     */
     public int getSucess() {
         int count = 0;
-        for (TestRecord test : results) {
+        for (TestRecord test : m_results) {
             if (test.m_wasSucessFull) {
                 count++;
             }
@@ -87,19 +120,27 @@
         return count;
     }
 
+    /**
+     * Gets the number of errors.
+     * @return the number of errors
+     */
     public int getErrors() {
         int count = 0;
-        for (TestRecord test : results) {
+        for (TestRecord test : m_results) {
             if (test.m_error != null) {
                 count++;
             }
         }
         return count;
     }
-
+    
+    /**
+     * Gets the number of failures.
+     * @return the number of failures
+     */
     public int getFailures() {
         int count = 0;
-        for (TestRecord test : results) {
+        for (TestRecord test : m_results) {
             if (test.m_failure != null) {
                 count++;
             }
@@ -107,29 +148,51 @@
         return count;
     }
 
+    
+    /**
+     * Does the result list contains the given test.
+     * @param t the test 
+     * @return <code>true</code> if the list contains the test.
+     */
     private boolean contains(Test t) {
-        for (TestRecord test : results) {
+        for (TestRecord test : m_results) {
             if (test.m_test.equals(t)) { return true; }
         }
         return false;
     }
 
+    /**
+     * Clear the list.
+     */
     public void clear() {
-        results.clear();
+        m_results.clear();
         fireTableDataChanged();
     }
 
+    /**
+     * Get the Object placed in the JTable.
+     * @param rowIndex the row
+     * @param columnIndex the column
+     * @return the object
+     * @see javax.swing.table.TableModel#getValueAt(int, int)
+     */
     public Object getValueAt(int rowIndex, int columnIndex) {
-        if (columnIndex == 0) { return results.get(rowIndex).m_test; }
+        if (columnIndex == 0) { return m_results.get(rowIndex).m_test; }
         if (columnIndex == 1) {
-            TestRecord tr = results.get(rowIndex);
-            if (tr.m_wasSucessFull) { return SUCESS; }
+            TestRecord tr = m_results.get(rowIndex);
+            if (tr.m_wasSucessFull) { return SUCCESS; }
             if (tr.m_failure != null) { return FAILURE; }
             if (tr.m_error != null) { return ERROR; }
         }
         return null;
     }
 
+    /**
+     * Gets column names.
+     * @param column the column
+     * @return the column name
+     * @see javax.swing.table.AbstractTableModel#getColumnName(int)
+     */
     public String getColumnName(int column) {
         if (column == 0) { return "Test"; }
 
@@ -138,9 +201,15 @@
         return null;
     }
 
+    /**
+     * Gets the message.
+     * @param row the row
+     * @param column the column
+     * @return the message for this cell
+     */
     public String getMessage(int row, int column) {
         if (row == -1) { return null; }
-        TestRecord rec = results.get(row);
+        TestRecord rec = m_results.get(row);
         if (rec.m_wasSucessFull) { return "The test " + rec.m_test + " was executed sucessfully."; }
         if (rec.m_failure != null) { return "The test " + rec.m_test + " has failed : \n" + rec.m_failure.getMessage(); }
         if (rec.m_error != null) {
@@ -154,26 +223,52 @@
     }
 
     private class TestRecord {
+        /**
+         * Was the test successful?
+         */
         private boolean m_wasSucessFull;
 
+        /**
+         * The test.
+         */
         private Test m_test;
 
+        /**
+         * The failure.
+         */
         private AssertionFailedError m_failure;
 
+        /**
+         * The error.
+         */
         private Throwable m_error;
 
+        /**
+         * Creates a TestRecord.
+         * @param t the test
+         * @param e the failure
+         */
         public TestRecord(Test t, AssertionFailedError e) {
             m_test = t;
             m_wasSucessFull = false;
             m_failure = e;
         }
 
+        /**
+         * Creates a TestRecord.
+         * @param t the test
+         * @param e the error
+         */
         public TestRecord(Test t, Throwable e) {
             m_test = t;
             m_wasSucessFull = false;
             m_error = e;
         }
 
+        /**
+         * Creates a TestRecord.
+         * @param t the test
+         */
         public TestRecord(Test t) {
             m_test = t;
             m_wasSucessFull = true;
diff --git a/ipojo/examples/junit4osgi/swing-runner/src/main/java/org/apache/felix/ipojo/junit4osgi/command/SwingRunner.form b/ipojo/examples/junit4osgi/swing-runner/src/main/java/org/apache/felix/ipojo/junit4osgi/command/SwingRunner.form
index 55cf564..5d5abba 100644
--- a/ipojo/examples/junit4osgi/swing-runner/src/main/java/org/apache/felix/ipojo/junit4osgi/command/SwingRunner.form
+++ b/ipojo/examples/junit4osgi/swing-runner/src/main/java/org/apache/felix/ipojo/junit4osgi/command/SwingRunner.form
@@ -1,3 +1,21 @@
+<!--
+	Licensed to the Apache Software Foundation (ASF) under one
+	or more contributor license agreements.  See the NOTICE file
+	distributed with this work for additional information
+	regarding copyright ownership.  The ASF licenses this file
+	to you under the Apache License, Version 2.0 (the
+	"License"); you may not use this file except in compliance
+	with the License.  You may obtain a copy of the License at
+	
+	http://www.apache.org/licenses/LICENSE-2.0
+	
+	Unless required by applicable law or agreed to in writing,
+	software distributed under the License is distributed on an
+	"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+	KIND, either express or implied.  See the License for the
+	specific language governing permissions and limitations
+	under the License.
+-->
 <?xml version="1.0" encoding="UTF-8" ?>
 
 <Form version="1.3" maxVersion="1.5" type="org.netbeans.modules.form.forminfo.JFrameFormInfo">
diff --git a/ipojo/examples/junit4osgi/swing-runner/src/main/java/org/apache/felix/ipojo/junit4osgi/command/SwingRunner.java b/ipojo/examples/junit4osgi/swing-runner/src/main/java/org/apache/felix/ipojo/junit4osgi/command/SwingRunner.java
index 82c4366..90eb523 100644
--- a/ipojo/examples/junit4osgi/swing-runner/src/main/java/org/apache/felix/ipojo/junit4osgi/command/SwingRunner.java
+++ b/ipojo/examples/junit4osgi/swing-runner/src/main/java/org/apache/felix/ipojo/junit4osgi/command/SwingRunner.java
@@ -41,6 +41,9 @@
  */
 public class SwingRunner extends javax.swing.JFrame implements BundleListener {
 
+    /**
+     * UUID.
+     */
     private static final long serialVersionUID = 1L;
 
     /**
@@ -96,17 +99,17 @@
         m_progress.setIndeterminate(false);
         m_progress.setMaximum(100);
         m_progress.setValue(100);
-        
+
         TableColumn column = null;
         for (int i = 0; i < m_resultTable.getColumnCount(); i++) {
             column = m_resultTable.getColumnModel().getColumn(i);
             if (i == 0) {
-                column.setPreferredWidth(350); //first column is bigger
+                column.setPreferredWidth(350); // first column is bigger
             } else {
                 column.setPreferredWidth(50);
                 column.setCellRenderer(new ResultCellRenderer());
+            }
         }
-}
     }
 
     /**
@@ -120,6 +123,7 @@
     /**
      * Refresh the list of available test suites.
      */
+    @SuppressWarnings("unchecked")
     private void refreshSuites() {
         List<Test> list = m_runner.getTests();
         TestListModel lm = (TestListModel) m_suiteList.getModel();
@@ -296,13 +300,13 @@
         getContentPane().add(m_statusBar, gridBagConstraints);
 
         pack();
-    }// </editor-fold>//GEN-END:initComponents
+    } // </editor-fold>//GEN-END:initComponents
 
     /**
      * Execute button action.
      * @param evt : event.
      */
-    private void executeButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_m_executeButtonActionPerformed
+    private void executeButtonActionPerformed(java.awt.event.ActionEvent evt) { //GEN-FIRST:event_m_executeButtonActionPerformed
         if (m_running) { return; }
         // Collect selected test.
         int[] indices = m_suiteList.getSelectedIndices();
@@ -313,26 +317,26 @@
         }
         setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
         executeTest(list);
-    }//GEN-LAST:event_m_executeButtonActionPerformed
+    } //GEN-LAST:event_m_executeButtonActionPerformed
 
     /**
      * All button action.
      * @param evt : event.
      */
-    private void allButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_m_allButtonActionPerformed
+    private void allButtonActionPerformed(java.awt.event.ActionEvent evt) { //GEN-FIRST:event_m_allButtonActionPerformed
         int max = m_suiteList.getModel().getSize();
         int[] indices = new int[max];
         for (int i = 0; i < max; i++) {
             indices[i] = i;
         }
         m_suiteList.setSelectedIndices(indices);
-    }//GEN-LAST:event_m_allButtonActionPerformed
+    } //GEN-LAST:event_m_allButtonActionPerformed
 
     /**
      * Listener on table click.
      * @param evt : event.
      */
-    private void resultTableMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_m_resultTableMouseClicked
+    private void resultTableMouseClicked(java.awt.event.MouseEvent evt) { //GEN-FIRST:event_m_resultTableMouseClicked
         Point p = evt.getPoint();
         int row = m_resultTable.rowAtPoint(p);
         int col = m_resultTable.columnAtPoint(p);
@@ -344,25 +348,25 @@
             m_messageArea.setText(message);
             m_resultDialog.setVisible(true);
         }
-    }//GEN-LAST:event_m_resultTableMouseClicked
+    } //GEN-LAST:event_m_resultTableMouseClicked
 
     /**
      * Ok button action.
      * @param evt : event.
      */
-    private void okActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_m_okActionPerformed
+    private void okActionPerformed(java.awt.event.ActionEvent evt) { //GEN-FIRST:event_m_okActionPerformed
         m_resultDialog.setVisible(false);
         setEnabled(true);
-    }//GEN-LAST:event_m_okActionPerformed
+    } //GEN-LAST:event_m_okActionPerformed
 
     /**
      * Listener when the test report is closed.
      * @param evt : event.
      */
-    private void onDialogClosed(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_onDialogClosed
+    private void onDialogClosed(java.awt.event.WindowEvent evt) { //GEN-FIRST:event_onDialogClosed
         m_resultDialog.setVisible(false);
         setEnabled(true);
-    }//GEN-LAST:event_onDialogClosed
+    } //GEN-LAST:event_onDialogClosed
 
     /**
      * Execute method.
@@ -394,15 +398,19 @@
         new Thread(thread).start();
     }
     
-     private void computeExecutedTest() {
+    /**
+     * Compute executed tests.
+     * (Status bar message)
+     */
+    private void computeExecutedTest() {
         ResultTableModel results = (ResultTableModel) m_resultTable.getModel();
         String m = " \t ";
-        m+= results.getTestCount() + " tests executed / ";
-        m+= results.getSucess() + " sucess / ";
-        m+= results.getFailures() + " failures / ";
-        m+= results.getErrors() + " errors ";
+        m += results.getTestCount() + " tests executed / ";
+        m += results.getSucess() + " sucess / ";
+        m += results.getFailures() + " failures / ";
+        m += results.getErrors() + " errors ";
         m_executedResults.setText(m);
-     }
+    }
 
     private class MyTestListener implements junit.framework.TestListener {
         /**
diff --git a/ipojo/examples/junit4osgi/swing-runner/src/main/java/org/apache/felix/ipojo/junit4osgi/command/TestListModel.java b/ipojo/examples/junit4osgi/swing-runner/src/main/java/org/apache/felix/ipojo/junit4osgi/command/TestListModel.java
index 4811c5e..3232dad 100644
--- a/ipojo/examples/junit4osgi/swing-runner/src/main/java/org/apache/felix/ipojo/junit4osgi/command/TestListModel.java
+++ b/ipojo/examples/junit4osgi/swing-runner/src/main/java/org/apache/felix/ipojo/junit4osgi/command/TestListModel.java
@@ -29,39 +29,65 @@
  */
 public class TestListModel extends AbstractListModel {
 
+    /**
+     * Id.
+     */
     private static final long serialVersionUID = 1L;
 
-    private List<TestRecord> list = new ArrayList<TestRecord>();
+    /**
+     * List of {@link TestRecord}. 
+     */
+    private List<TestRecord> m_list = new ArrayList<TestRecord>();
 
+    /**
+     * Gets the element placed at the given index.
+     * @param index the index
+     * @return the element placed at the given index 
+     * or <code>null</code> if no element at this index
+     * @see javax.swing.ListModel#getElementAt(int)
+     */
     public Object getElementAt(int index) {
-        if (index >= list.size()) {
+        if (index >= m_list.size()) {
             return null;
         } else {
-            return list.get(index).name;
+            return m_list.get(index).m_name;
         }
     }
 
+    /**
+     * Gets the test object placed at the given index.
+     * @param index the index
+     * @return the test object placed at the given index
+     */
     public Test getTestElementAt(int index) {
-        return list.get(index).test;
+        return m_list.get(index).m_test;
     }
 
+    /**
+     * Adds a test.
+     * @param test the test to add
+     */
     public void addTest(Test test) {
-        synchronized(this) {
+        synchronized (this) {
             TestRecord tr = new TestRecord();
-            tr.test = test;
-            tr.name = test.toString();
-            list.add(tr);
+            tr.m_test = test;
+            tr.m_name = test.toString();
+            m_list.add(tr);
         }
-        fireContentsChanged(this, list.size() - 1, list.size() - 1);
+        fireContentsChanged(this, m_list.size() - 1, m_list.size() - 1);
     }
 
+    /**
+     * Removes a test.
+     * @param test the test to remove
+     */
     public void removeTest(Test test) {
         int index = 1;
-        synchronized(this) {
-            for (TestRecord t : list) {
-                if (t.test.equals(test)) {
-                    index = list.indexOf(t);
-                    list.remove(t);
+        synchronized (this) {
+            for (TestRecord t : m_list) {
+                if (t.m_test.equals(test)) {
+                    index = m_list.indexOf(t);
+                    m_list.remove(t);
                     return;
                 }
             }
@@ -72,18 +98,32 @@
         }
     }
 
+    /**
+     * Clears the list.
+     */
     public void clear() {
-        list.clear();
+        m_list.clear();
     }
 
     private class TestRecord {
-        public Test test;
+        /**
+         * The test.
+         */
+        public Test m_test;
 
-        public String name;
+        /**
+         * The test name.
+         */
+        public String m_name;
     }
 
+    /**
+     * Gets the list size.
+     * @return the list size.
+     * @see javax.swing.ListModel#getSize()
+     */
     public int getSize() {
-        return list.size();
+        return m_list.size();
     }
 
 }
