Program: 88635
Project: 88635
Buggy source:
@SuppressWarnings("String_Node_Str") private void handleChangedProperty(Element sourceElement,String propertyName,Object newValue,Object oldValue){
  JSONObject elementOb=null;
  String elementID=null;
  ArrayList<String> moveKeywords=new ArrayList<String>();
  moveKeywords.add(PropertyNames.OWNING_ASSOCIATION);
  moveKeywords.add(PropertyNames.OWNING_CONSTRAINT);
  moveKeywords.add(PropertyNames.OWNING_ELEMENT);
  moveKeywords.add(PropertyNames.OWNING_EXPRESSION);
  moveKeywords.add(PropertyNames.OWNING_INSTANCE);
  moveKeywords.add(PropertyNames.OWNING_INSTANCE_SPEC);
  moveKeywords.add(PropertyNames.OWNING_LOWER);
  moveKeywords.add(PropertyNames.OWNING_PACKAGE);
  moveKeywords.add(PropertyNames.OWNING_PARAMETER);
  moveKeywords.add(PropertyNames.OWNING_PROPERTY);
  moveKeywords.add(PropertyNames.OWNING_SIGNAL);
  moveKeywords.add(PropertyNames.OWNING_SLOT);
  moveKeywords.add(PropertyNames.OWNING_STATE);
  moveKeywords.add(PropertyNames.OWNING_TEMPLATE_PARAMETER);
  moveKeywords.add(PropertyNames.OWNING_TRANSITION);
  moveKeywords.add(PropertyNames.OWNING_UPPER);
  moveKeywords.add(PropertyNames._U_M_L_CLASS);
  moveKeywords.add(PropertyNames.OWNER);
  if (propertyName.equals(PropertyNames.NAME)) {
    elementOb=getElementObject(sourceElement);
    ExportUtility.fillName(sourceElement,elementOb);
    ExportUtility.fillOwner(sourceElement,elementOb);
  }
 else   if (sourceElement instanceof Comment && ExportUtility.isElementDocumentation((Comment)sourceElement) && propertyName.equals(PropertyNames.BODY)) {
    Element actual=sourceElement.getOwner();
    elementOb=getElementObject(actual);
    ExportUtility.fillDoc(actual,elementOb);
    ExportUtility.fillOwner(actual,elementOb);
  }
 else   if ((sourceElement instanceof ValueSpecification) && (propertyName.equals(PropertyNames.VALUE)) || (sourceElement instanceof OpaqueExpression) && (propertyName.equals(PropertyNames.BODY)) || (sourceElement instanceof Expression) && (propertyName.equals(PropertyNames.OPERAND))) {
    Element actual=sourceElement.getOwner();
    while (actual instanceof ValueSpecification)     actual=actual.getOwner();
    if (!ExportUtility.shouldAdd(actual))     return;
    elementOb=getElementObject(actual);
    if (actual instanceof Slot || actual instanceof Property) {
      JSONObject specialization=ExportUtility.fillPropertySpecialization(actual,null,true);
      elementOb.put("String_Node_Str",specialization);
    }
    if (actual instanceof Constraint) {
      JSONObject specialization=ExportUtility.fillConstraintSpecialization((Constraint)actual,null);
      elementOb.put("String_Node_Str",specialization);
    }
    ExportUtility.fillOwner(actual,elementOb);
  }
 else   if ((sourceElement instanceof Property) && (propertyName.equals(PropertyNames.DEFAULT_VALUE) || propertyName.equals(PropertyNames.TYPE))) {
    JSONObject specialization=ExportUtility.fillPropertySpecialization(sourceElement,null,true);
    elementOb=getElementObject(sourceElement);
    elementOb.put("String_Node_Str",specialization);
    ExportUtility.fillOwner(sourceElement,elementOb);
  }
 else   if ((sourceElement instanceof Slot) && propertyName.equals(PropertyNames.VALUE) && ExportUtility.shouldAdd(sourceElement)) {
    elementOb=getElementObject(sourceElement);
    JSONObject specialization=ExportUtility.fillPropertySpecialization(sourceElement,null,false);
    elementOb.put("String_Node_Str",specialization);
    ExportUtility.fillOwner(sourceElement,elementOb);
  }
 else   if ((sourceElement instanceof Constraint) && propertyName.equals(PropertyNames.SPECIFICATION)) {
    elementOb=getElementObject(sourceElement);
    JSONObject specialization=ExportUtility.fillConstraintSpecialization((Constraint)sourceElement,null);
    elementOb.put("String_Node_Str",specialization);
    ExportUtility.fillOwner(sourceElement,elementOb);
  }
 else   if (propertyName.equals(UML2MetamodelConstants.INSTANCE_CREATED) && ExportUtility.shouldAdd(sourceElement)) {
    if (isDiagramCreated(sourceElement))     toRemove.add(ExportUtility.getElementID(sourceElement));
 else {
      elementOb=getElementObject(sourceElement,true);
      ExportUtility.fillElement(sourceElement,elementOb);
    }
  }
 else   if (propertyName.equals(UML2MetamodelConstants.INSTANCE_DELETED) && ExportUtility.shouldAdd(sourceElement)) {
    elementID=ExportUtility.getElementID(sourceElement);
    elements.remove(elementID);
    changedElements.remove(elementID);
    addedElements.remove(elementID);
    deletes.add(elementID);
    deletedElements.put(elementID,sourceElement);
  }
 else   if (sourceElement instanceof DirectedRelationship && (propertyName.equals(PropertyNames.SUPPLIER) || propertyName.equals(PropertyNames.CLIENT))) {
    if ((newValue != null) && (oldValue == null)) {
      JSONObject specialization=ExportUtility.fillDirectedRelationshipSpecialization((DirectedRelationship)sourceElement,null);
      elementOb=getElementObject(sourceElement);
      elementOb.put("String_Node_Str",specialization);
      ExportUtility.fillOwner(sourceElement,elementOb);
    }
  }
 else   if ((sourceElement instanceof Generalization) && ((propertyName.equals(PropertyNames.SPECIFIC)) || (propertyName.equals(PropertyNames.GENERAL)))) {
    if ((newValue != null) && (oldValue == null)) {
      JSONObject specialization=ExportUtility.fillDirectedRelationshipSpecialization((DirectedRelationship)sourceElement,null);
      elementOb=getElementObject(sourceElement);
      elementOb.put("String_Node_Str",specialization);
      ExportUtility.fillOwner(sourceElement,elementOb);
    }
  }
 else   if ((moveKeywords.contains(propertyName)) && ExportUtility.shouldAdd(sourceElement)) {
    elementOb=getElementObject(sourceElement);
    ExportUtility.fillOwner(sourceElement,elementOb);
  }
 else   if (sourceElement instanceof ConnectorEnd && propertyName.equals(PropertyNames.ROLE)) {
    Connector conn=((ConnectorEnd)sourceElement).get_connectorOfEnd();
    elementOb=getElementObject(conn);
    JSONObject specialization=ExportUtility.fillConnectorSpecialization(conn,null);
    elementOb.put("String_Node_Str",specialization);
    ExportUtility.fillOwner(conn,elementOb);
  }
 else   if (sourceElement instanceof Association && propertyName.equals(PropertyNames.OWNED_END)) {
    elementOb=getElementObject(sourceElement);
    JSONObject specialization=ExportUtility.fillAssociationSpecialization((Association)sourceElement,null);
    elementOb.put("String_Node_Str",specialization);
    ExportUtility.fillOwner(sourceElement,elementOb);
  }
 else   if (sourceElement instanceof Property && propertyName.equals(PropertyNames.AGGREGATION)) {
    Association a=((Property)sourceElement).getAssociation();
    if (a != null) {
      elementOb=getElementObject(a);
      JSONObject specialization=ExportUtility.fillAssociationSpecialization(a,null);
      elementOb.put("String_Node_Str",specialization);
      ExportUtility.fillOwner(a,elementOb);
    }
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") private void handleChangedProperty(Element sourceElement,String propertyName,Object newValue,Object oldValue){
  JSONObject elementOb=null;
  String elementID=null;
  ArrayList<String> moveKeywords=new ArrayList<String>();
  moveKeywords.add(PropertyNames.OWNING_ASSOCIATION);
  moveKeywords.add(PropertyNames.OWNING_CONSTRAINT);
  moveKeywords.add(PropertyNames.OWNING_ELEMENT);
  moveKeywords.add(PropertyNames.OWNING_EXPRESSION);
  moveKeywords.add(PropertyNames.OWNING_INSTANCE);
  moveKeywords.add(PropertyNames.OWNING_INSTANCE_SPEC);
  moveKeywords.add(PropertyNames.OWNING_LOWER);
  moveKeywords.add(PropertyNames.OWNING_PACKAGE);
  moveKeywords.add(PropertyNames.OWNING_PARAMETER);
  moveKeywords.add(PropertyNames.OWNING_PROPERTY);
  moveKeywords.add(PropertyNames.OWNING_SIGNAL);
  moveKeywords.add(PropertyNames.OWNING_SLOT);
  moveKeywords.add(PropertyNames.OWNING_STATE);
  moveKeywords.add(PropertyNames.OWNING_TEMPLATE_PARAMETER);
  moveKeywords.add(PropertyNames.OWNING_TRANSITION);
  moveKeywords.add(PropertyNames.OWNING_UPPER);
  moveKeywords.add(PropertyNames._U_M_L_CLASS);
  moveKeywords.add(PropertyNames.OWNER);
  if (propertyName.equals(PropertyNames.NAME)) {
    elementOb=getElementObject(sourceElement);
    ExportUtility.fillName(sourceElement,elementOb);
    ExportUtility.fillOwner(sourceElement,elementOb);
  }
 else   if (sourceElement instanceof Comment && ExportUtility.isElementDocumentation((Comment)sourceElement) && propertyName.equals(PropertyNames.BODY)) {
    Element actual=sourceElement.getOwner();
    elementOb=getElementObject(actual);
    ExportUtility.fillDoc(actual,elementOb);
    ExportUtility.fillOwner(actual,elementOb);
  }
 else   if ((sourceElement instanceof ValueSpecification) && (propertyName.equals(PropertyNames.VALUE)) || (sourceElement instanceof OpaqueExpression) && (propertyName.equals(PropertyNames.BODY)) || (sourceElement instanceof Expression) && (propertyName.equals(PropertyNames.OPERAND))) {
    Element actual=sourceElement.getOwner();
    while (actual instanceof ValueSpecification)     actual=actual.getOwner();
    if (!ExportUtility.shouldAdd(actual))     return;
    elementOb=getElementObject(actual);
    if (actual instanceof Slot || actual instanceof Property) {
      JSONObject specialization=ExportUtility.fillPropertySpecialization(actual,null,true);
      elementOb.put("String_Node_Str",specialization);
    }
    if (actual instanceof Constraint) {
      JSONObject specialization=ExportUtility.fillConstraintSpecialization((Constraint)actual,null);
      elementOb.put("String_Node_Str",specialization);
    }
    ExportUtility.fillOwner(actual,elementOb);
  }
 else   if ((sourceElement instanceof Property) && (propertyName.equals(PropertyNames.DEFAULT_VALUE) || propertyName.equals(PropertyNames.TYPE))) {
    JSONObject specialization=ExportUtility.fillPropertySpecialization(sourceElement,null,true);
    elementOb=getElementObject(sourceElement);
    elementOb.put("String_Node_Str",specialization);
    ExportUtility.fillOwner(sourceElement,elementOb);
  }
 else   if ((sourceElement instanceof Slot) && propertyName.equals(PropertyNames.VALUE) && ExportUtility.shouldAdd(sourceElement)) {
    elementOb=getElementObject(sourceElement);
    JSONObject specialization=ExportUtility.fillPropertySpecialization(sourceElement,null,false);
    elementOb.put("String_Node_Str",specialization);
    ExportUtility.fillOwner(sourceElement,elementOb);
  }
 else   if ((sourceElement instanceof Constraint) && propertyName.equals(PropertyNames.SPECIFICATION)) {
    elementOb=getElementObject(sourceElement);
    JSONObject specialization=ExportUtility.fillConstraintSpecialization((Constraint)sourceElement,null);
    elementOb.put("String_Node_Str",specialization);
    ExportUtility.fillOwner(sourceElement,elementOb);
  }
 else   if (propertyName.equals(UML2MetamodelConstants.INSTANCE_CREATED) && ExportUtility.shouldAdd(sourceElement)) {
    if (isDiagramCreated(sourceElement))     toRemove.add(ExportUtility.getElementID(sourceElement));
 else {
      elementOb=getElementObject(sourceElement,true);
      ExportUtility.fillElement(sourceElement,elementOb);
    }
  }
 else   if (propertyName.equals(UML2MetamodelConstants.INSTANCE_DELETED) && ExportUtility.shouldAdd(sourceElement)) {
    elementID=ExportUtility.getElementID(sourceElement);
    elements.remove(elementID);
    deletes.add(elementID);
    changedElements.remove(elementID);
    addedElements.remove(elementID);
    if (!auto)     deletedElements.put(elementID,sourceElement);
  }
 else   if (sourceElement instanceof DirectedRelationship && (propertyName.equals(PropertyNames.SUPPLIER) || propertyName.equals(PropertyNames.CLIENT))) {
    if ((newValue != null) && (oldValue == null)) {
      JSONObject specialization=ExportUtility.fillDirectedRelationshipSpecialization((DirectedRelationship)sourceElement,null);
      elementOb=getElementObject(sourceElement);
      elementOb.put("String_Node_Str",specialization);
      ExportUtility.fillOwner(sourceElement,elementOb);
    }
  }
 else   if ((sourceElement instanceof Generalization) && ((propertyName.equals(PropertyNames.SPECIFIC)) || (propertyName.equals(PropertyNames.GENERAL)))) {
    if ((newValue != null) && (oldValue == null)) {
      JSONObject specialization=ExportUtility.fillDirectedRelationshipSpecialization((DirectedRelationship)sourceElement,null);
      elementOb=getElementObject(sourceElement);
      elementOb.put("String_Node_Str",specialization);
      ExportUtility.fillOwner(sourceElement,elementOb);
    }
  }
 else   if ((moveKeywords.contains(propertyName)) && ExportUtility.shouldAdd(sourceElement)) {
    elementOb=getElementObject(sourceElement);
    ExportUtility.fillOwner(sourceElement,elementOb);
  }
 else   if (sourceElement instanceof ConnectorEnd && propertyName.equals(PropertyNames.ROLE)) {
    Connector conn=((ConnectorEnd)sourceElement).get_connectorOfEnd();
    elementOb=getElementObject(conn);
    JSONObject specialization=ExportUtility.fillConnectorSpecialization(conn,null);
    elementOb.put("String_Node_Str",specialization);
    ExportUtility.fillOwner(conn,elementOb);
  }
 else   if (sourceElement instanceof Association && propertyName.equals(PropertyNames.OWNED_END)) {
    elementOb=getElementObject(sourceElement);
    JSONObject specialization=ExportUtility.fillAssociationSpecialization((Association)sourceElement,null);
    elementOb.put("String_Node_Str",specialization);
    ExportUtility.fillOwner(sourceElement,elementOb);
  }
 else   if (sourceElement instanceof Property && propertyName.equals(PropertyNames.AGGREGATION)) {
    Association a=((Property)sourceElement).getAssociation();
    if (a != null) {
      elementOb=getElementObject(a);
      JSONObject specialization=ExportUtility.fillAssociationSpecialization(a,null);
      elementOb.put("String_Node_Str",specialization);
      ExportUtility.fillOwner(a,elementOb);
    }
  }
}