Program: 118414
Project: 118414
Buggy source:
@Override public ExecutionResult execute(Item item){
  if (GenericWizardServiceFactory.getGenericWizardService().isGenericItem(item)) {
    try {
      GenericConnectionItem connectionItem=(GenericConnectionItem)item;
      GenericConnection connection=(GenericConnection)connectionItem.getConnection();
      String serialized=connection.getCompProperties();
      ComponentService service=ComponentsUtils.getComponentService();
      ComponentWizard componentWizard=service.getComponentWizard(NewSalesforceWizardMigrationTask.TYPE_NAME,item.getProperty().getId());
      ComponentProperties newProperties=(ComponentProperties)componentWizard.getForms().get(0).getProperties();
      newProperties.init();
      ComponentProperties properties=loadProperties(serialized,newProperties);
      updateSubProperties(properties,newProperties);
      connection.setCompProperties(properties.toSerialized());
      Set<MetadataTable> tables=ConnectionHelper.getTables(connection);
      for (      MetadataTable table : tables) {
        EList<TaggedValue> values=table.getTaggedValue();
        for (        TaggedValue value : values) {
          if (IComponentConstants.COMPONENT_PROPERTIES_TAG.equals(value.getTag())) {
            Object object=ReflectionUtils.newInstance(NewSalesforceWizardMigrationTask.REFLECTION_SALESFORCE_MODULE_PROPERTIES,newProperties.getClass().getClassLoader(),new Object[]{table.getName()});
            if (object != null && object instanceof ComponentProperties) {
              ComponentProperties newSalesforceModuleProperties=(ComponentProperties)object;
              ComponentProperties moduleProperties=loadProperties(serialized,newSalesforceModuleProperties);
              updateSubProperties(moduleProperties,newSalesforceModuleProperties);
              connection.setCompProperties(moduleProperties.toSerialized());
            }
          }
        }
      }
      ProxyRepositoryFactory.getInstance().save(connectionItem,true);
      return ExecutionResult.SUCCESS_NO_ALERT;
    }
 catch (    Exception e) {
      ExceptionHandler.process(e);
      return ExecutionResult.FAILURE;
    }
  }
  return ExecutionResult.NOTHING_TO_DO;
}

Fixed version (ground truth):
@Override public ExecutionResult execute(Item item){
  if (GenericWizardServiceFactory.getGenericWizardService().isGenericItem(item)) {
    try {
      GenericConnectionItem connectionItem=(GenericConnectionItem)item;
      GenericConnection connection=(GenericConnection)connectionItem.getConnection();
      String serialized=connection.getCompProperties();
      ComponentService service=ComponentsUtils.getComponentService();
      ComponentWizard componentWizard=service.getComponentWizard(NewSalesforceWizardMigrationTask.TYPE_NAME,item.getProperty().getId());
      ComponentProperties newProperties=(ComponentProperties)componentWizard.getForms().get(0).getProperties();
      newProperties.init();
      ComponentProperties properties=loadProperties(serialized,newProperties);
      updateSubProperties(properties,newProperties);
      newProperties.copyValuesFrom(properties,true,false);
      connection.setCompProperties(newProperties.toSerialized());
      Set<MetadataTable> tables=new HashSet<MetadataTable>();
      PackageHelper.getAllTables(connection,tables);
      for (      MetadataTable table : tables) {
        EList<TaggedValue> values=table.getTaggedValue();
        for (        TaggedValue value : values) {
          if (IComponentConstants.COMPONENT_PROPERTIES_TAG.equals(value.getTag())) {
            Object object=ReflectionUtils.newInstance(NewSalesforceWizardMigrationTask.REFLECTION_SALESFORCE_MODULE_PROPERTIES,newProperties.getClass().getClassLoader(),new Object[]{table.getName()});
            if (object != null && object instanceof ComponentProperties) {
              ComponentProperties newSalesforceModuleProperties=(ComponentProperties)object;
              ComponentProperties moduleProperties=loadProperties(value.getValue(),newSalesforceModuleProperties);
              updateSubProperties(moduleProperties,newSalesforceModuleProperties);
              newSalesforceModuleProperties.copyValuesFrom(moduleProperties,true,false);
              value.setValue(newSalesforceModuleProperties.toSerialized());
            }
          }
        }
      }
      ProxyRepositoryFactory.getInstance().save(connectionItem,true);
      return ExecutionResult.SUCCESS_NO_ALERT;
    }
 catch (    Exception e) {
      ExceptionHandler.process(e);
      return ExecutionResult.FAILURE;
    }
  }
  return ExecutionResult.NOTHING_TO_DO;
}