if (attribs != null) { InternalEObject internalEObject = (InternalEObject)obj; for (int i = 0, size = attribs.getLength(); i < size; ++i) { String name = attribs.getQName(i); if (name.equals(ID_ATTRIB)) { xmlResource.setID(internalEObject, attribs.getValue(i)); } else if (name.equals(hrefAttribute) && (!recordUnknownFeature || types.peek() != UNKNOWN_FEATURE_TYPE || obj.eClass() != anyType)) { handleProxy(internalEObject, attribs.getValue(i)); } else if (isNamespaceAware) { String namespace = attribs.getURI(i); if (!ExtendedMetaData.XSI_URI.equals(namespace) && !notFeatures.contains(name)) { setAttribValue(obj, name, attribs.getValue(i)); } } else if (!name.startsWith(XMLResource.XML_NS) && !notFeatures.contains(name)) { setAttribValue(obj, name, attribs.getValue(i)); } } }
if (attribs != null) { InternalEObject internalEObject = (InternalEObject)obj; for (int i = 0, size = attribs.getLength(); i < size; ++i) { String name = attribs.getQName(i); if (name.equals(idAttribute)) { xmlResource.setID(internalEObject, attribs.getValue(i)); } else if (name.equals(hrefAttribute) && (!recordUnknownFeature || types.peek() != UNKNOWN_FEATURE_TYPE || obj.eClass() != anyType)) { handleProxy(internalEObject, attribs.getValue(i)); } else if (isNamespaceAware) { String namespace = attribs.getURI(i); if (!ExtendedMetaData.XSI_URI.equals(namespace)) { setAttribValue(obj, name, attribs.getValue(i)); } } else if (!name.startsWith(XMLResource.XML_NS) && !notFeatures.contains(name)) { setAttribValue(obj, name, attribs.getValue(i)); } } }
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/xmi/impl/SAXXMIHandler.java File path: /emf-2.4.1/src/org/eclipse/emf/ecore/xmi/impl/SAXXMLHandler.java
Method name: void handleObjectAttribs(EObject) Method name: void handleObjectAttribs(EObject)
Number of AST nodes: 14 Number of AST nodes: 14
1
if (attribs != null)
1
if (attribs != null)
2
    {
2
    {
3
      InternalEObject internalEObject = (InternalEObject)obj;
3
      InternalEObject internalEObject = (InternalEObject)obj;
4
      for (int i = 0, size = attribs.getLength(); i < size; ++i)
4
      for (int i = 0, size = attribs.getLength(); i < size; ++i)
5
      {
5
      {
6
        String name = attribs.getQName(i);
6
        String name = attribs.getQName(i);
7
        if (name.equals(ID_ATTRIB))
7
        if (name.equals(idAttribute))
8
        {
8
        {
9
          xmlResource.setID(internalEObject, attribs.getValue(i));
9
          xmlResource.setID(internalEObject, attribs.getValue(i));
10
        }
10
        }
11
        else if (name.equals(hrefAttribute) && (!recordUnknownFeature || types.peek() != UNKNOWN_FEATURE_TYPE || obj.eClass() != anyType))
11
        else if (name.equals(hrefAttribute) && (!recordUnknownFeature || types.peek() != UNKNOWN_FEATURE_TYPE || obj.eClass() != anyType))
12
        {
12
        {
13
          handleProxy(internalEObject, attribs.getValue(i));
13
          handleProxy(internalEObject, attribs.getValue(i));
14
        }
14
        }
15
        else if (isNamespaceAware)
15
        else if (isNamespaceAware)
16
        {
16
        {
17
          String namespace = attribs.getURI(i);
17
          String namespace = attribs.getURI(i);
18
          if (!ExtendedMetaData.XSI_URI.equals(namespace) && !notFeatures.contains(name))
18
          if (!ExtendedMetaData.XSI_URI.equals(namespace))
19
          {
19
          {
20
            setAttribValue(obj, name, attribs.getValue(i));
20
            setAttribValue(obj, name, attribs.getValue(i));
21
          }
21
          }
22
        }
22
        }
23
        else if (!name.startsWith(XMLResource.XML_NS) && !notFeatures.contains(name))
23
        else if (!name.startsWith(XMLResource.XML_NS) && !notFeatures.contains(name))
24
        {
24
        {
25
          setAttribValue(obj, name, attribs.getValue(i));
25
          setAttribValue(obj, name, attribs.getValue(i));
26
        }
26
        }
27
      }
27
      }
28
    }
28
    }
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.1
Clones locationClones are in different classes having the same super class
Number of node comparisons1