Program: 148903
Project: 148903
Buggy source:
public Image getImage(Object obj){
  if (obj instanceof XSDElementDeclaration) {
    XSDElementDeclaration decl=(XSDElementDeclaration)obj;
    boolean isConcept=false;
    EList l=decl.getIdentityConstraintDefinitions();
    for (Iterator iter=l.iterator(); iter.hasNext(); ) {
      XSDIdentityConstraintDefinition icd=(XSDIdentityConstraintDefinition)iter.next();
      if (icd.getIdentityConstraintCategory().equals(XSDIdentityConstraintCategory.UNIQUE_LITERAL)) {
        isConcept=true;
        break;
      }
    }
    if (isConcept) {
      return ImageCache.getCreatedImage(EImage.CONCEPT.getPath());
    }
 else {
      return ImageCache.getCreatedImage(EImage.ELEMENT_ONLY.getPath());
    }
  }
  if (obj instanceof XSDParticle) {
    XSDParticle xsdParticle=(XSDParticle)obj;
    XSDTerm xsdTerm=xsdParticle.getTerm();
    if (xsdTerm instanceof XSDElementDeclaration) {
      if (Util.getKeyInfo((XSDElementDeclaration)xsdTerm) != null)       return ImageCache.getCreatedImage(EImage.PRIMARYKEY.getPath());
      XSDConcreteComponent xsdConcreteComponent=xsdParticle.getContainer();
      if (xsdConcreteComponent instanceof XSDModelGroup) {
        return ImageCache.getCreatedImage(EImage.SCHEMAELEMENT.getPath());
      }
    }
 else     if (xsdTerm instanceof XSDModelGroup) {
      return ImageCache.getCreatedImage(EImage.COMPLEXTYPE.getPath());
    }
 else     if (xsdTerm instanceof XSDWildcard) {
      return ImageCache.getCreatedImage("String_Node_Str");
    }
 else {
      System.out.println("String_Node_Str" + xsdTerm.getClass().getName());
      return ImageCache.getCreatedImage("String_Node_Str");
    }
  }
  if (obj instanceof XSDSimpleTypeDefinition) {
    return ImageCache.getCreatedImage(EImage.SIMPLETYPE.getPath());
  }
 else   if (obj instanceof XSDComplexTypeDefinition) {
    return ImageCache.getCreatedImage(EImage.COMPLEXTYPE.getPath());
  }
  if (obj instanceof XSDModelGroup) {
    return ImageCache.getCreatedImage(EImage.COMPLEXTYPE.getPath());
  }
  if (obj instanceof XSDFacet) {
    return ImageCache.getCreatedImage(EImage.FACET.getPath());
  }
  if (obj instanceof XSDIdentityConstraintDefinition) {
    XSDIdentityConstraintDefinition identity=(XSDIdentityConstraintDefinition)obj;
    if (identity.getIdentityConstraintCategory().equals(XSDIdentityConstraintCategory.UNIQUE_LITERAL))     return ImageCache.getCreatedImage(EImage.KEYS.getPath());
    return ImageCache.getCreatedImage(EImage.PRIMARYKEY.getPath());
  }
  if (obj instanceof XSDXPathDefinition) {
    XSDXPathDefinition xpath=(XSDXPathDefinition)obj;
    if (xpath.getVariety().equals(XSDXPathVariety.FIELD_LITERAL))     return ImageCache.getCreatedImage("String_Node_Str");
    return ImageCache.getCreatedImage("String_Node_Str");
  }
  if (obj instanceof XSDAttributeGroupDefinition) {
    return ImageCache.getCreatedImage("String_Node_Str");
  }
  if (obj instanceof XSDAttributeUse) {
    XSDAttributeUse att=(XSDAttributeUse)obj;
    if ("String_Node_Str".equals(att.getAttributeDeclaration().getTargetNamespace())) {
      return ImageCache.getCreatedImage(EImage.ANNOTATION.getPath());
    }
    if (att.getUse().equals(XSDAttributeUseCategory.REQUIRED_LITERAL))     return ImageCache.getCreatedImage("String_Node_Str");
 else     return ImageCache.getCreatedImage("String_Node_Str");
  }
  if (obj instanceof XSDAnnotation) {
    return ImageCache.getCreatedImage(EImage.ANNOTATION.getPath());
  }
  if (obj instanceof Element) {
    try {
      Element e=(Element)obj;
      if (e.getLocalName().equals("String_Node_Str")) {
        return ImageCache.getCreatedImage(EImage.DOCUMENTATION.getPath());
      }
 else       if (e.getLocalName().equals("String_Node_Str")) {
        String source=e.getAttribute("String_Node_Str");
        if (source != null) {
          if (source.startsWith("String_Node_Str")) {
            return ImageCache.getCreatedImage(EImage.LABEL.getPath());
          }
 else           if (source.equals("String_Node_Str")) {
            return ImageCache.getCreatedImage(EImage.KEY.getPath());
          }
 else           if (source.equals("String_Node_Str")) {
            return ImageCache.getCreatedImage(EImage.KEYINFO.getPath());
          }
 else           if (source.equals("String_Node_Str")) {
            return ImageCache.getCreatedImage(EImage.SOURCESYSTEM.getPath());
          }
 else           if (source.equals("String_Node_Str")) {
            return ImageCache.getCreatedImage(EImage.TARGETSYSTEM.getPath());
          }
 else           if (source.startsWith("String_Node_Str")) {
            return ImageCache.getCreatedImage(EImage.DOCUMENTATION.getPath());
          }
 else           if (source.equals("String_Node_Str")) {
            return ImageCache.getCreatedImage(EImage.SECURITYANNOTATION.getPath());
          }
 else           if (source.equals("String_Node_Str")) {
            return ImageCache.getCreatedImage(EImage.SECURITYANNOTATION.getPath());
          }
 else {
            return ImageCache.getCreatedImage(EImage.DOCUMENTATION.getPath());
          }
        }
 else {
          return ImageCache.getCreatedImage(EImage.DOCUMENTATION.getPath());
        }
      }
 else {
        return ImageCache.getCreatedImage(EImage.DOCUMENTATION.getPath());
      }
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
  }
  return ImageCache.getCreatedImage("String_Node_Str");
}

Fixed version (ground truth):
public Image getImage(Object obj){
  if (obj instanceof XSDElementDeclaration) {
    XSDElementDeclaration decl=(XSDElementDeclaration)obj;
    boolean isConcept=false;
    EList l=decl.getIdentityConstraintDefinitions();
    for (Iterator iter=l.iterator(); iter.hasNext(); ) {
      XSDIdentityConstraintDefinition icd=(XSDIdentityConstraintDefinition)iter.next();
      if (icd.getIdentityConstraintCategory().equals(XSDIdentityConstraintCategory.UNIQUE_LITERAL)) {
        isConcept=true;
        break;
      }
    }
    if (isConcept) {
      return ImageCache.getCreatedImage(EImage.CONCEPT.getPath());
    }
 else {
      return ImageCache.getCreatedImage(EImage.ELEMENT_ONLY.getPath());
    }
  }
  if (obj instanceof XSDParticle) {
    XSDParticle xsdParticle=(XSDParticle)obj;
    XSDTerm xsdTerm=xsdParticle.getTerm();
    if (xsdTerm instanceof XSDElementDeclaration) {
      if (Util.getKeyInfo((XSDElementDeclaration)xsdTerm) != null)       return ImageCache.getCreatedImage(EImage.PRIMARYKEY.getPath());
      XSDConcreteComponent xsdConcreteComponent=xsdParticle.getContainer();
      if (xsdConcreteComponent instanceof XSDModelGroup) {
        return ImageCache.getCreatedImage(EImage.SCHEMAELEMENT.getPath());
      }
    }
 else     if (xsdTerm instanceof XSDModelGroup) {
      return ImageCache.getCreatedImage(EImage.COMPLEXTYPE.getPath());
    }
 else     if (xsdTerm instanceof XSDWildcard) {
      return ImageCache.getCreatedImage("String_Node_Str");
    }
 else {
      System.out.println("String_Node_Str" + xsdTerm.getClass().getName());
      return ImageCache.getCreatedImage("String_Node_Str");
    }
  }
  if (obj instanceof XSDSimpleTypeDefinition) {
    return ImageCache.getCreatedImage(EImage.SIMPLETYPE.getPath());
  }
 else   if (obj instanceof XSDComplexTypeDefinition) {
    return ImageCache.getCreatedImage(EImage.COMPLEXTYPE.getPath());
  }
  if (obj instanceof XSDModelGroup) {
    return ImageCache.getCreatedImage(EImage.COMPLEXTYPE.getPath());
  }
  if (obj instanceof XSDFacet) {
    return ImageCache.getCreatedImage(EImage.FACET.getPath());
  }
  if (obj instanceof XSDIdentityConstraintDefinition) {
    XSDIdentityConstraintDefinition identity=(XSDIdentityConstraintDefinition)obj;
    if (identity.getIdentityConstraintCategory().equals(XSDIdentityConstraintCategory.UNIQUE_LITERAL))     return ImageCache.getCreatedImage(EImage.UNIQUE.getPath());
    return ImageCache.getCreatedImage(EImage.PRIMARYKEY.getPath());
  }
  if (obj instanceof XSDXPathDefinition) {
    XSDXPathDefinition xpath=(XSDXPathDefinition)obj;
    if (xpath.getVariety().equals(XSDXPathVariety.FIELD_LITERAL))     return ImageCache.getCreatedImage("String_Node_Str");
    return ImageCache.getCreatedImage("String_Node_Str");
  }
  if (obj instanceof XSDAttributeGroupDefinition) {
    return ImageCache.getCreatedImage("String_Node_Str");
  }
  if (obj instanceof XSDAttributeUse) {
    XSDAttributeUse att=(XSDAttributeUse)obj;
    if ("String_Node_Str".equals(att.getAttributeDeclaration().getTargetNamespace())) {
      return ImageCache.getCreatedImage(EImage.ANNOTATION.getPath());
    }
    if (att.getUse().equals(XSDAttributeUseCategory.REQUIRED_LITERAL))     return ImageCache.getCreatedImage("String_Node_Str");
 else     return ImageCache.getCreatedImage("String_Node_Str");
  }
  if (obj instanceof XSDAnnotation) {
    return ImageCache.getCreatedImage(EImage.ANNOTATION.getPath());
  }
  if (obj instanceof Element) {
    try {
      Element e=(Element)obj;
      if (e.getLocalName().equals("String_Node_Str")) {
        return ImageCache.getCreatedImage(EImage.DOCUMENTATION.getPath());
      }
 else       if (e.getLocalName().equals("String_Node_Str")) {
        String source=e.getAttribute("String_Node_Str");
        if (source != null) {
          if (source.startsWith("String_Node_Str")) {
            return ImageCache.getCreatedImage(EImage.LABEL.getPath());
          }
 else           if (source.equals("String_Node_Str")) {
            return ImageCache.getCreatedImage(EImage.PRIMARYKEY.getPath());
          }
 else           if (source.equals("String_Node_Str")) {
            return ImageCache.getCreatedImage(EImage.KEYINFO.getPath());
          }
 else           if (source.equals("String_Node_Str")) {
            return ImageCache.getCreatedImage(EImage.SOURCESYSTEM.getPath());
          }
 else           if (source.equals("String_Node_Str")) {
            return ImageCache.getCreatedImage(EImage.TARGETSYSTEM.getPath());
          }
 else           if (source.startsWith("String_Node_Str")) {
            return ImageCache.getCreatedImage(EImage.DOCUMENTATION.getPath());
          }
 else           if (source.equals("String_Node_Str")) {
            return ImageCache.getCreatedImage(EImage.SECURITYANNOTATION.getPath());
          }
 else           if (source.equals("String_Node_Str")) {
            return ImageCache.getCreatedImage(EImage.SECURITYANNOTATION.getPath());
          }
 else {
            return ImageCache.getCreatedImage(EImage.DOCUMENTATION.getPath());
          }
        }
 else {
          return ImageCache.getCreatedImage(EImage.DOCUMENTATION.getPath());
        }
      }
 else {
        return ImageCache.getCreatedImage(EImage.DOCUMENTATION.getPath());
      }
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
  }
  return ImageCache.getCreatedImage("String_Node_Str");
}