Fixing a few issues thrown up by LGTM
diff --git a/xmlschema-core/src/main/java/org/apache/ws/commons/schema/SchemaBuilder.java b/xmlschema-core/src/main/java/org/apache/ws/commons/schema/SchemaBuilder.java
index 2bc4ee2..10af77c 100644
--- a/xmlschema-core/src/main/java/org/apache/ws/commons/schema/SchemaBuilder.java
+++ b/xmlschema-core/src/main/java/org/apache/ws/commons/schema/SchemaBuilder.java
@@ -145,11 +145,10 @@
     }

 

     /**

-     * build method taking in a document and a validation handler

+     * build method taking in a document and a uri

      *

      * @param doc

      * @param uri

-     * @param veh

      */

     XmlSchema build(Document doc, String uri) {

         Element schemaEl = doc.getDocumentElement();

@@ -275,7 +274,7 @@
      * @param schema

      * @param complexEl

      * @param schemaEl

-     * @param b

+     * @param topLevel

      */

     XmlSchemaComplexType handleComplexType(XmlSchema schema, Element complexEl, Element schemaEl,

                                            boolean topLevel) {

diff --git a/xmlschema-core/src/main/java/org/apache/ws/commons/schema/XmlSchemaSerializer.java b/xmlschema-core/src/main/java/org/apache/ws/commons/schema/XmlSchemaSerializer.java
index 5ec8dcc..e535b4f 100644
--- a/xmlschema-core/src/main/java/org/apache/ws/commons/schema/XmlSchemaSerializer.java
+++ b/xmlschema-core/src/main/java/org/apache/ws/commons/schema/XmlSchemaSerializer.java
@@ -508,7 +508,7 @@
             String attGroupName = attributeGroupObj.getName();
             attributeGroup.setAttributeNS(null, "name", attGroupName);
         } else {
-            throw new XmlSchemaSerializerException("Attribute group must" + "have name");
+            throw new XmlSchemaSerializerException("Attribute group must have name");
         }
         if (attributeGroupObj.getId() != null) {
             attributeGroup.setAttributeNS(null, "id", attributeGroupObj.getId());
@@ -1624,7 +1624,7 @@
         if (schemaObj.getAttributeFormDefault() != null) {
             String formQualified = schemaObj.getAttributeFormDefault().toString();
 
-            if (!formQualified.equals(XmlSchemaForm.NONE)) {
+            if (!formQualified.equals(XmlSchemaForm.NONE.toString())) {
                 serializedSchema.setAttributeNS(null, "attributeFormDefault", formQualified);
             }
         }
@@ -1632,7 +1632,7 @@
         if (schemaObj.getElementFormDefault() != null) {
             String formQualified = schemaObj.getElementFormDefault().toString();
 
-            if (!formQualified.equals(XmlSchemaForm.NONE)) {
+            if (!formQualified.equals(XmlSchemaForm.NONE.toString())) {
                 serializedSchema.setAttributeNS(null, "elementFormDefault", formQualified);
             }
         }
diff --git a/xmlschema-core/src/main/java/org/apache/ws/commons/schema/extensions/ExtensionRegistry.java b/xmlschema-core/src/main/java/org/apache/ws/commons/schema/extensions/ExtensionRegistry.java
index e2b09e8..2af517d 100644
--- a/xmlschema-core/src/main/java/org/apache/ws/commons/schema/extensions/ExtensionRegistry.java
+++ b/xmlschema-core/src/main/java/org/apache/ws/commons/schema/extensions/ExtensionRegistry.java
@@ -86,21 +86,21 @@
     }

 

     /**

-     * remove the registration for a serializer with a QName

+     * remove the registration for a serializer with a Class

      * 

-     * @param name - the QName of the element/attribute the serializer is associated with

+     * @param classOfType - the Class of the element/attribute the serializer is associated with

      */

-    public void unregisterSerializer(QName name) {

-        extensionSerializers.remove(name);

+    public void unregisterSerializer(Class<?> classOfType) {

+        extensionSerializers.remove(classOfType);

     }

 

     /**

      * remove the registration for a deserializer with a QName

      * 

-     * @param classOfType - the the deserializer is associated with

+     * @param name - the QName fo the element that the deserializer is associated with

      */

-    public void unregisterDeserializer(Class<?> classOfType) {

-        extensionDeserializers.remove(classOfType);

+    public void unregisterDeserializer(QName name) {

+        extensionDeserializers.remove(name);

     }

 

     /**

diff --git a/xmlschema-walker/src/main/java/org/apache/ws/commons/schema/docpath/XmlSchemaPathFinder.java b/xmlschema-walker/src/main/java/org/apache/ws/commons/schema/docpath/XmlSchemaPathFinder.java
index a88f0fa..7bde973 100644
--- a/xmlschema-walker/src/main/java/org/apache/ws/commons/schema/docpath/XmlSchemaPathFinder.java
+++ b/xmlschema-walker/src/main/java/org/apache/ws/commons/schema/docpath/XmlSchemaPathFinder.java
@@ -1681,7 +1681,7 @@
         } while ((iter != null)
                  && !iter.getStateMachineNode().getNodeType().equals(XmlSchemaStateMachineNode.Type.ELEMENT));
 
-        if (!iter.getStateMachineNode().getNodeType().equals(XmlSchemaStateMachineNode.Type.ELEMENT)
+        if (iter == null || !iter.getStateMachineNode().getNodeType().equals(XmlSchemaStateMachineNode.Type.ELEMENT)
             || !iter.getStateMachineNode().getElement().getQName().equals(element)) {
             throw new IllegalStateException("Walked up tree and stopped at node "
                                             + currentPath.getStateMachineNode()
diff --git a/xmlschema-walker/src/main/java/org/apache/ws/commons/schema/walker/XmlSchemaScope.java b/xmlschema-walker/src/main/java/org/apache/ws/commons/schema/walker/XmlSchemaScope.java
index f87c1dc..4b0307d 100644
--- a/xmlschema-walker/src/main/java/org/apache/ws/commons/schema/walker/XmlSchemaScope.java
+++ b/xmlschema-walker/src/main/java/org/apache/ws/commons/schema/walker/XmlSchemaScope.java
@@ -95,10 +95,6 @@
      * Initializes a new {@link XmlSchemaScope} with a base
      * {@link XmlSchemaElement}. The element type and attributes will be
      * traversed, and attribute lists and element children will be retrieved.
-     *
-     * @param element The base element to build the scope from.
-     * @param substitutions The master list of substitution groups to pull from.
-     * @param userRecognizedTypes The set of types recognized by the caller.
      */
     XmlSchemaScope(XmlSchemaType type, SchemasByNamespace xmlSchemasByNamespace,
                    Map<QName, XmlSchemaScope> scopeCache, Set<QName> userRecognizedTypes) {