Index: /trunk/autoquest-plugin-uml-test/src/test/java/de/ugoe/cs/autoquest/plugin/uml/UMLUtilsTest.java
===================================================================
--- /trunk/autoquest-plugin-uml-test/src/test/java/de/ugoe/cs/autoquest/plugin/uml/UMLUtilsTest.java	(revision 1899)
+++ /trunk/autoquest-plugin-uml-test/src/test/java/de/ugoe/cs/autoquest/plugin/uml/UMLUtilsTest.java	(revision 1900)
@@ -42,5 +42,4 @@
 import de.ugoe.cs.autoquest.usageprofiles.FirstOrderMarkovModel;
 import de.ugoe.cs.autoquest.usageprofiles.IStochasticProcess;
-import de.ugoe.cs.util.console.Console;
 import de.ugoe.cs.util.console.TextConsole;
 
@@ -58,5 +57,5 @@
     @BeforeClass
     public static void setUpBeforeClass() throws Exception {
-        Console.getInstance().registerTraceListener(new TextConsole(Level.INFO));
+        new TextConsole(Level.INFO);
     }
     
@@ -316,5 +315,10 @@
                 .getSystemResourceAsStream("testCreateInteractionFromEventSequence_1_model.uml"));
         
-        UMLUtils.validateModelWithLog(httpSequences, model, null);
+        int violations = UMLUtils.validateModelWithLog(httpSequences, model, null);
+        if( violations==0 ) {
+            System.out.println("No problems found.");
+        } else {
+                System.out.println(violations + " violations found.");
+        }
     }
     
@@ -336,5 +340,10 @@
                 .getSystemResourceAsStream("testCreateInteractionFromEventSequence_2_model.uml"));
         
-        UMLUtils.validateModelWithLog(httpSequences, model, null);
+        int violations = UMLUtils.validateModelWithLog(httpSequences, model, null);
+        if( violations==0 ) {
+            System.out.println("No problems found.");
+        } else {
+            System.out.println(violations + " violations found.");
+        }
     }
     
@@ -356,5 +365,10 @@
                 .getSystemResourceAsStream("hl7model_v2.uml"));
         
-        UMLUtils.validateModelWithLog(httpSequences, model, "IXSTestSuite_1");
+        int violations = UMLUtils.validateModelWithLog(httpSequences, model, "IXSTestSuite_1");
+        if( violations==0 ) {
+            System.out.println("No problems found.");
+        } else {
+            System.out.println(violations + " violations found.");
+        }
     }
 
Index: /trunk/autoquest-plugin-uml/src/main/java/de/ugoe/cs/autoquest/plugin/uml/UMLUtils.java
===================================================================
--- /trunk/autoquest-plugin-uml/src/main/java/de/ugoe/cs/autoquest/plugin/uml/UMLUtils.java	(revision 1899)
+++ /trunk/autoquest-plugin-uml/src/main/java/de/ugoe/cs/autoquest/plugin/uml/UMLUtils.java	(revision 1900)
@@ -77,5 +77,22 @@
 public class UMLUtils {
 
-    public static void validateModelWithLog(Collection<List<Event>> sequences, Model model, String testContextName) {
+    /**
+     * <p>
+     * Method for checking if the information in a usage journal can be mapped to the SUT model. In
+     * case this is not possible, the violations are reported.
+     * </p>
+     * 
+     * @param sequences
+     *            sequences of the usage journal
+     * @param model
+     *            SUT model that is validated
+     * @param testContextName
+     *            name of the test context to be used; if null, the first test context found is used
+     * @return number of violations
+     */
+    public static int validateModelWithLog(Collection<List<Event>> sequences,
+                                           Model model,
+                                           String testContextName)
+    {
         final Profile utpProfile = model.getAppliedProfile("utp");
         final Stereotype utpTestComponent = (Stereotype) utpProfile.getOwnedMember("TestComponent");
@@ -83,23 +100,31 @@
         final Stereotype utpTestContext = (Stereotype) utpProfile.getOwnedMember("TestContext");
 
+        int violationCount = 0;
         Component testContext = fetchTestContext(model, utpTestContext, testContextName);
         if (testContext == null) {
-            if( testContextName==null ) {
+            violationCount++;
+            if (testContextName == null) {
                 Console.traceln(Level.SEVERE, "Could not find any TestContext in the model.");
-                
-            } else {
-                Console.traceln(Level.SEVERE, "Could not find TestContext in the model: " + testContextName);
-            }
-            Console.traceln(Level.SEVERE, "Hint: Check if you have applied the TestContext stereotype correctly in the model.");
-        }
-        
+
+            }
+            else {
+                Console.traceln(Level.SEVERE, "Could not find TestContext in the model: " +
+                    testContextName);
+            }
+            Console
+                .traceln(Level.SEVERE,
+                         "Hint: Check if you have applied the TestContext stereotype correctly in the model.");
+            Console.traceln(Level.SEVERE, "Aborting");
+            return violationCount;
+        }
+
         // Create list of unique methods calls
         HashMap<String, Set<String>> calledMethods = new HashMap<>();
-        for( List<Event> sequence : sequences ) {
-            for( Event event : sequence ) {
-                if( event.getType() instanceof SOAPEventType ) {
+        for (List<Event> sequence : sequences) {
+            for (Event event : sequence) {
+                if (event.getType() instanceof SOAPEventType) {
                     SOAPEventType eventType = (SOAPEventType) event.getType();
                     Set<String> curCalledMethods = calledMethods.get(eventType.getServiceName());
-                    if( curCalledMethods==null ) {
+                    if (curCalledMethods == null) {
                         curCalledMethods = new TreeSet<>();
                         calledMethods.put(eventType.getServiceName(), curCalledMethods);
@@ -109,8 +134,9 @@
             }
         }
-        
-        Console.traceln(Level.INFO, "Found the following services and operations in the usage data: ");
-        for( Entry<String, Set<String>> entry : calledMethods.entrySet() ) {
-            Console.traceln(Level.INFO, "\tService \"" + entry.getKey() + "\": ");
+
+        Console.traceln(Level.INFO,
+                        "Found the following services and operations in the usage data: ");
+        for (Entry<String, Set<String>> entry : calledMethods.entrySet()) {
+            Console.trace(Level.INFO, "\tService \"" + entry.getKey() + "\": ");
             Iterator<String> iter = entry.getValue().iterator();
             StringBuilder strBld = new StringBuilder();
@@ -123,37 +149,53 @@
             Console.traceln(Level.INFO, strBld.toString());
         }
-        
+
         // fetch all SUTs and TestComponents
         HashMap<String, Property> properties = new HashMap<>();
         for (Property property : testContext.getAllAttributes()) {
             if (property.getAppliedStereotypes().contains(utpSUT)) {
-                properties.put(property.getName(),property);
+                properties.put(property.getName(), property);
             }
             else if (property.getType().getAppliedStereotypes().contains(utpTestComponent)) {
-                properties.put(property.getName(),property);
+                properties.put(property.getName(), property);
             }
         }
         Console.traceln(Level.INFO, "Found the following services in the TestConfiguration:");
-        for( Entry<String, Property> entry : properties.entrySet() ) {
+        for (Entry<String, Property> entry : properties.entrySet()) {
             Console.traceln(Level.INFO, "\t" + entry.getKey());
         }
-        
-        for( Entry<String, Set<String>> entry : calledMethods.entrySet() ) {
+
+        for (Entry<String, Set<String>> entry : calledMethods.entrySet()) {
             String serviceName = entry.getKey();
             Console.traceln(Level.INFO, "Checking service: " + serviceName);
             Set<String> methodNames = entry.getValue();
             Property property = properties.get(serviceName);
-            if( property==null ) {
-                Console.traceln(Level.SEVERE, "\tCould not find property for service: " + serviceName);
-                Console.traceln(Level.SEVERE, "\tHint: Check service name map and/or model if the service is present and spelled correctly.");
-                Console.traceln(Level.SEVERE, "\tHint: Check if the SUT/TestComponent stereotype has been applied correctly in this TestContext.");
-            } else {
+            if (property == null) {
+                violationCount++;
+                Console.traceln(Level.SEVERE, "\tCould not find property for service: " +
+                    serviceName);
+                Console
+                    .traceln(Level.SEVERE,
+                             "\tHint: Check service name map and/or model if the service is present and spelled correctly.");
+                Console
+                    .traceln(Level.SEVERE,
+                             "\tHint: Check if the SUT/TestComponent stereotype has been applied correctly in this TestContext.");
+            }
+            else {
                 Set<Interface> interfaces = getRealizedInterfacesFromProperty(property);
-                if( interfaces.isEmpty() ) {
-                    Console.traceln(Level.SEVERE, "\tCould not find any interfaces implementing the property for service: " + serviceName);
-                    Console.traceln(Level.SEVERE, "\tHint: Check if the property correctly realizes the interfaces in the model.");
-                } else {
-                    Console.traceln(Level.INFO, "\tFound the following realized interfaces for the service \"" + serviceName + "\": ");
-                    Iterator<Interface> iter = interfaces.iterator();   
+                if (interfaces.isEmpty()) {
+                    violationCount++;
+                    Console
+                        .traceln(Level.SEVERE,
+                                 "\tCould not find any interfaces implementing the property for service: " +
+                                     serviceName);
+                    Console
+                        .traceln(Level.SEVERE,
+                                 "\tHint: Check if the property correctly realizes the interfaces in the model.");
+                }
+                else {
+                    Console.traceln(Level.INFO,
+                                    "\tFound the following realized interfaces for the service \"" +
+                                        serviceName + "\": ");
+                    Iterator<Interface> iter = interfaces.iterator();
                     while (iter.hasNext()) {
                         String interfaceName = iter.next().getName();
@@ -165,16 +207,21 @@
                         Console.traceln(Level.INFO, strBld.toString());
                     }
-                    for( String methodName : methodNames ) {
-                        boolean methodFound = true;
-                        for( Interface intface : interfaces ) {
+                    for (String methodName : methodNames) {
+                        boolean methodFound = false;
+                        for (Interface intface : interfaces) {
                             if (getOperationFromName(intface.getOperations(), methodName) != null) {
                                 // interface found
-                                Console.traceln(Level.INFO, "\tMethod " + methodName + " found in interface " + intface.getName() );
+                                Console.traceln(Level.INFO, "\tMethod " + methodName +
+                                    " found in interface " + intface.getName());
                                 methodFound = true;
                             }
                         }
-                        if( !methodFound ) {
-                            Console.traceln(Level.SEVERE, "\tCould not find operation: " + methodName);
-                            Console.traceln(Level.SEVERE, "\tHint: check if operation is present and spelled correctly");
+                        if (!methodFound) {
+                            violationCount++;
+                            Console.traceln(Level.SEVERE, "\tCould not find operation: " +
+                                methodName);
+                            Console
+                                .traceln(Level.SEVERE,
+                                         "\tHint: check if operation is present and spelled correctly");
                         }
                     }
@@ -182,7 +229,7 @@
             }
         }
-        
-    }
-    
+        return violationCount;
+    }
+
     /**
      * <p>
@@ -412,5 +459,5 @@
         // create lifelines
         Lifeline userLifeline = null;
-        
+
         for (Property property : testContext.getAllAttributes()) {
             if (property.getAppliedStereotypes().contains(utpSUT)) {
@@ -420,6 +467,7 @@
             }
             else if (property.getType().getAppliedStereotypes().contains(utpTestComponent)) {
-                if( userLifeline!=null ) {
-                    throw new RuntimeException("TestContext must only have one TestComponent for the application of usage-based testing.");
+                if (userLifeline != null) {
+                    throw new RuntimeException(
+                                               "TestContext must only have one TestComponent for the application of usage-based testing.");
                 }
                 userLifeline = interaction.createLifeline(property.getName());
@@ -427,11 +475,11 @@
             }
         }
-        if( userLifeline==null ) {
+        if (userLifeline == null) {
             throw new RuntimeException("No TestComponent found, could not create user lifeline.");
         }
-        if( interaction.getLifelines().size()<2 ) {
+        if (interaction.getLifelines().size() < 2) {
             throw new RuntimeException("Fewer than two lifelines created. No SUT found.");
         }
-        
+
         int i = 0;
         for (Event event : sequence) {
@@ -461,9 +509,11 @@
                     msgTargetLifeline = interaction.getLifeline(serviceName);
                 }
-                if( msgSourceLifeline==null ) {
-                    throw new RuntimeException("Error creating message: could not determine source lifeline.");
-                }
-                if( msgTargetLifeline==null ) {
-                    throw new RuntimeException("Error creating message: could not determine target lifeline.");
+                if (msgSourceLifeline == null) {
+                    throw new RuntimeException(
+                                               "Error creating message: could not determine source lifeline.");
+                }
+                if (msgTargetLifeline == null) {
+                    throw new RuntimeException(
+                                               "Error creating message: could not determine target lifeline.");
                 }
                 // determine correct target interface
@@ -484,5 +534,6 @@
                 if (targetInterface == null) {
                     StringBuilder errStrBuilder = new StringBuilder();
-                    errStrBuilder.append("Error creating message: operation not found in the implementing interfaces (");
+                    errStrBuilder
+                        .append("Error creating message: operation not found in the implementing interfaces (");
                     Iterator<Interface> iter = targetInterfaces.iterator();
                     while (iter.hasNext()) {
@@ -525,5 +576,5 @@
 
                 boolean asynch = false;
-                if( calledOperation.getConcurrency()==CallConcurrencyKind.CONCURRENT_LITERAL ) {
+                if (calledOperation.getConcurrency() == CallConcurrencyKind.CONCURRENT_LITERAL) {
                     asynch = true;
                 }
@@ -548,18 +599,20 @@
                     replySendFragment.setCovered(msgTargetLifeline);
                     replyRecvFragment.setCovered(msgSourceLifeline);
-                    
-                    /*BehaviorExecutionSpecification sourceBehaviorExecutionSpecification =
-                        (BehaviorExecutionSpecification) interaction
-                            .createFragment(":" + methodName + "_sourceBhvExecSpec",
-                                            UMLPackage.Literals.BEHAVIOR_EXECUTION_SPECIFICATION);
-                    BehaviorExecutionSpecification targetBehaviorExecutionSpecification =
-                        (BehaviorExecutionSpecification) interaction
-                            .createFragment(":" + methodName + "_targetBhvExecSpec",
-                                            UMLPackage.Literals.BEHAVIOR_EXECUTION_SPECIFICATION);
-
-                    sourceBehaviorExecutionSpecification.setStart(callSendFragment);
-                    sourceBehaviorExecutionSpecification.setFinish(replyRecvFragment);
-                    targetBehaviorExecutionSpecification.setStart(callRecvFragment);
-                    targetBehaviorExecutionSpecification.setFinish(replySendFragment);*/
+
+                    /*
+                     * BehaviorExecutionSpecification sourceBehaviorExecutionSpecification =
+                     * (BehaviorExecutionSpecification) interaction .createFragment(":" + methodName
+                     * + "_sourceBhvExecSpec",
+                     * UMLPackage.Literals.BEHAVIOR_EXECUTION_SPECIFICATION);
+                     * BehaviorExecutionSpecification targetBehaviorExecutionSpecification =
+                     * (BehaviorExecutionSpecification) interaction .createFragment(":" + methodName
+                     * + "_targetBhvExecSpec",
+                     * UMLPackage.Literals.BEHAVIOR_EXECUTION_SPECIFICATION);
+                     * 
+                     * sourceBehaviorExecutionSpecification.setStart(callSendFragment);
+                     * sourceBehaviorExecutionSpecification.setFinish(replyRecvFragment);
+                     * targetBehaviorExecutionSpecification.setStart(callRecvFragment);
+                     * targetBehaviorExecutionSpecification.setFinish(replySendFragment);
+                     */
 
                     // create reply
@@ -824,5 +877,5 @@
                 Port port = (Port) property;
                 if (!port.isConjugated()) {
-                    interfaces.addAll(port.getProvideds());                  
+                    interfaces.addAll(port.getProvideds());
                 }
             }
@@ -871,6 +924,6 @@
     /**
      * <p>
-     * Infers connector between two lifelines. 
-     * TODO: currently assumes only one connector between two lifelines possible. I need to make sure this assumption is valid.
+     * Infers connector between two lifelines. TODO: currently assumes only one connector between
+     * two lifelines possible. I need to make sure this assumption is valid.
      * </p>
      * 
