Program: 118560
Project: 118560
Buggy source:
private void updateSchema(){
  IElement element=this.getElement();
  if (element instanceof Node) {
    Node node=(Node)element;
    List<IMetadataTable> metadataList=node.getMetadataList();
    if (metadataList.size() > 0) {
      IMetadataTable oldTable=metadataList.get(0);
      String schemaPropertyName=oldTable.getAdditionalProperties().get(IComponentConstants.COMPONENT_SCHEMA_TAG);
      Object schemaObj=null;
      try {
        schemaObj=ComponentsUtils.getGenericPropertyValue(componentProperties,schemaPropertyName);
        if (schemaObj instanceof String) {
          schemaObj=new Schema.Parser().parse((String)schemaObj);
        }
      }
 catch (      Exception e) {
      }
      if (schemaObj != null && schemaObj instanceof Schema) {
        MetadataTable metadataTable=SchemaUtils.createSchema(String.valueOf(getValue()),componentProperties,schemaPropertyName);
        IMetadataTable newTable=MetadataToolHelper.convert(metadataTable);
        if (!newTable.sameMetadataAs(oldTable)) {
          IElementParameter schemaParameter=node.getElementParameterFromField(EParameterFieldType.SCHEMA_REFERENCE);
          ChangeMetadataCommand cmd=new ChangeMetadataCommand(node,schemaParameter,oldTable,newTable,null);
          IProcess process=node.getProcess();
          if (process instanceof org.talend.designer.core.ui.editor.process.Process) {
            CommandStack commandStack=((org.talend.designer.core.ui.editor.process.Process)process).getCommandStack();
            commandStack.execute(cmd);
          }
        }
      }
    }
  }
}

Fixed version (ground truth):
private void updateSchema(){
  IElement element=this.getElement();
  if (element instanceof Node) {
    Node node=(Node)element;
    List<IMetadataTable> metadataList=node.getMetadataList();
    if (metadataList.size() > 0) {
      IMetadataTable oldTable=metadataList.get(0);
      String schemaPropertyName=oldTable.getAdditionalProperties().get(IComponentConstants.COMPONENT_SCHEMA_TAG);
      Object schemaObj=null;
      try {
        schemaObj=ComponentsUtils.getGenericPropertyValue(componentProperties,schemaPropertyName);
        if (schemaObj instanceof String) {
          schemaObj=new Schema.Parser().parse((String)schemaObj);
        }
      }
 catch (      Exception e) {
      }
      if (schemaObj != null && schemaObj instanceof Schema) {
        MetadataTable metadataTable=SchemaUtils.createSchema(oldTable.getTableName(),componentProperties,schemaPropertyName);
        IMetadataTable newTable=MetadataToolHelper.convert(metadataTable);
        if (!newTable.sameMetadataAs(oldTable)) {
          IElementParameter schemaParameter=node.getElementParameterFromField(EParameterFieldType.SCHEMA_REFERENCE);
          ChangeMetadataCommand cmd=new ChangeMetadataCommand(node,schemaParameter,oldTable,newTable,null);
          IProcess process=node.getProcess();
          if (process instanceof org.talend.designer.core.ui.editor.process.Process) {
            CommandStack commandStack=((org.talend.designer.core.ui.editor.process.Process)process).getCommandStack();
            commandStack.execute(cmd);
          }
        }
      }
    }
  }
}