Source:
public Features getFeatures(Version version) { Features features = new Features(); if (VersionUtils.greaterOrEqual(version, BackendCapabilitiesResource.VERSION_3_0)) { addFeatureTransparentHugePages(features); } if (VersionUtils.greaterOrEqual(version, BackendCapabilitiesResource.VERSION_3_1)) { addFeatureGluster(features); addFeaturePosixDevice(features); addFeaturePortMirroring(features); addFeatureServerTime(features); addFeatureHostMemory(features); addFeatureHostSockets(features, version); addFeatureIgnoreCase(features); addFeatureMaxResults(features); addFeatureJSONContentType(features); addFeatureCorrelationId(features); addFeatureDiskActivation(features); addFeatureNicActivation(features); addFeatureSnapshotsRefactoring(features); addFeatureRemoveTemplateFromSD(features); addFeatureFloatingDisks(features); addFeatureAsyncDelete(features); addFeatureSessionBasedAuthentication(features); } if (VersionUtils.greaterOrEqual(version, BackendCapabilitiesResource.VERSION_3_3)) { addFeatureVmApplications(features); addFeatureVirtioScsi(features); addFeatureComment(features); addFeatureRefreshHostCapabilities(features); addFeatureMemorySnapshot(features); addWatchdogFeature(features); addSshAuthenticationFeature(features); addForceSelectSpmFeature(features); addConsoleFeature(features); addFeatureStorageServerConnections(features); addFeatureStorageServerConnectionsForDomain(features); addFeatureAttachDetachStorageServerConnectionsForDomain(features); addSingleQxlPciFeature(features); addFeatureAddVmFromOvf(features); addVnicProfilesFeature(features); addStorageDomainImageFeature(features); addGlusterHooksFeature(features); addFeatureReportVmFQDN(features); addFeatureAttachDiskSnapshot(features); addFeatureCloudInit(features); } if (VersionUtils.greaterOrEqual(version, BackendCapabilitiesResource.VERSION_3_4)) { addGlusterBricksFeature(features); addFeatureCopyMoveDiskInAdditionalContext(features); addNetworkLabelsFeature(features); addRebootFeature(features); addMaintenanceFeature(features); } if (VersionUtils.greaterOrEqual(version, BackendCapabilitiesResource.VERSION_3_5)) { addBookmarksFeature(features); addNetworkLabelsFeature(features); } return features; }

Target:
public Features getFeatures(Version version) { Features features = new Features(); if (VersionUtils.greaterOrEqual(version, BackendCapabilitiesResource.VERSION_3_0)) { addFeatureTransparentHugePages(features); } if (VersionUtils.greaterOrEqual(version, BackendCapabilitiesResource.VERSION_3_1)) { addFeatureGluster(features); addFeaturePosixDevice(features); addFeaturePortMirroring(features); addFeatureServerTime(features); addFeatureHostMemory(features); addFeatureHostSockets(features, version); addFeatureIgnoreCase(features); addFeatureMaxResults(features); addFeatureJSONContentType(features); addFeatureCorrelationId(features); addFeatureDiskActivation(features); addFeatureNicActivation(features); addFeatureSnapshotsRefactoring(features); addFeatureRemoveTemplateFromSD(features); addFeatureFloatingDisks(features); addFeatureAsyncDelete(features); addFeatureSessionBasedAuthentication(features); } if (VersionUtils.greaterOrEqual(version, BackendCapabilitiesResource.VERSION_3_3)) { addFeatureVmApplications(features); addFeatureVirtioScsi(features); addFeatureComment(features); addFeatureRefreshHostCapabilities(features); addFeatureMemorySnapshot(features); addWatchdogFeature(features); addSshAuthenticationFeature(features); addForceSelectSpmFeature(features); addConsoleFeature(features); addFeatureStorageServerConnections(features); addFeatureStorageServerConnectionsForDomain(features); addFeatureAttachDetachStorageServerConnectionsForDomain(features); addSingleQxlPciFeature(features); addFeatureAddVmFromOvf(features); addVnicProfilesFeature(features); addStorageDomainImageFeature(features); addGlusterHooksFeature(features); addFeatureReportVmFQDN(features); addFeatureAttachDiskSnapshot(features); addFeatureCloudInit(features); } if (VersionUtils.greaterOrEqual(version, BackendCapabilitiesResource.VERSION_3_4)) { addGlusterBricksFeature(features); addFeatureCopyMoveDiskInAdditionalContext(features); addNetworkLabelsFeature(features); addRebootFeature(features); addMaintenanceFeature(features); } if (VersionUtils.greaterOrEqual(version, BackendCapabilitiesResource.VERSION_3_5)) { addBookmarksFeature(features); addNetworkCustomPropertiesFeature(features); } return features; }