auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public org.ovirt.engine.core.common.businessentities.network.NetworkFilter fetchVnicProfileNetworkFilter ( org.ovirt.engine.core.common.businessentities.network.VmNic vmNic ) { if ( ( vmNic.getVnicProfileId ( ) ) != null ) { org.ovirt.engine.core.common.businessentities.network.VnicProfile vnicProfile = vnicProfileDao.get ( vmNic.getVnicProfileId ( ) ) ; if ( vnicProfile != null ) { final org.ovirt.engine.core.compat.Guid networkFilterId = vnicProfile.getNetworkFilterId ( ) ; return networkFilterId == null ? null : networkFilterDao.getNetworkFilterById ( networkFilterId ) ; } } return null ; }

Target:
private org.ovirt.engine.core.common.businessentities.network.NetworkFilter fetchVnicProfileNetworkFilter ( org.ovirt.engine.core.common.businessentities.network.VmNic vmNic ) { if ( ( vmNic.getVnicProfileId ( ) ) != null ) { org.ovirt.engine.core.common.businessentities.network.VnicProfile vnicProfile = vnicProfileDao.get ( vmNic.getVnicProfileId ( ) ) ; if ( vnicProfile != null ) { final org.ovirt.engine.core.compat.Guid networkFilterId = vnicProfile.getNetworkFilterId ( ) ; return networkFilterId == null ? null : networkFilterDao.getNetworkFilterById ( networkFilterId ) ; } } return null ; }
Source:
public static void flatGroups ( org.ovirt.engine.api.extensions.ExtMap principal ) { java.util.Map < java.lang.String , org.ovirt.engine.api.extensions.ExtMap > accumulator = new java.util.HashMap < > ( ) ; org.ovirt.engine.core.bll.aaa.DirectoryUtils.flatGroups ( principal , PrincipalRecord.GROUPS , accumulator ) ; principal.put ( PrincipalRecord.GROUPS , new java.util.ArrayList ( accumulator.values ( ) ) ) ; }

Target:
public void flatGroups ( org.ovirt.engine.api.extensions.ExtMap principal ) { java.util.Map < java.lang.String , org.ovirt.engine.api.extensions.ExtMap > accumulator = new java.util.HashMap < > ( ) ; flatGroups ( principal , PrincipalRecord.GROUPS , accumulator ) ; principal.put ( PrincipalRecord.GROUPS , new java.util.ArrayList ( accumulator.values ( ) ) ) ; }
Source:
protected boolean validateMTUOverrideSupport ( ) { boolean mtuSupported = true ; if ( ( org.ovirt.engine.core.bll.network.dc.NetworkCommon.getParameters ( ) . getNetwork ( ) . getMtu ( ) ) != 0 ) { mtuSupported = org.ovirt.engine.core.common.config.Config.< java.lang.Boolean > GetValue ( ConfigValues.MTUOverrideSupported , org.ovirt.engine.core.bll.network.dc.NetworkCommon.getStoragePool ( ) . getcompatibility_version ( ) . getValue ( ) ) ; if ( ! mtuSupported ) { addCanDoActionMessage ( VdcBllMessages.NETWORK_MTU_OVERRIDE_NOT_SUPPORTED ) ; } } return mtuSupported ; }

Target:
protected boolean validateMTUOverrideSupport ( ) { boolean mtuSupported = true ; if ( ( getNetwork ( ) . getMtu ( ) ) != 0 ) { mtuSupported = org.ovirt.engine.core.common.config.Config.< java.lang.Boolean > GetValue ( ConfigValues.MTUOverrideSupported , org.ovirt.engine.core.bll.network.dc.NetworkCommon.getStoragePool ( ) . getcompatibility_version ( ) . getValue ( ) ) ; if ( ! mtuSupported ) { addCanDoActionMessage ( VdcBllMessages.NETWORK_MTU_OVERRIDE_NOT_SUPPORTED ) ; } } return mtuSupported ; }
Source:
public void successVmInPreviewForAttachedSnapshot ( ) { initializeCommand ( new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ) ; initSnapshotValidator ( ) ; initVmForSpace ( ) ; initVmDiskImage ( false ) ; initSrcStorageDomain ( ) ; initDestStorageDomain ( StorageType.NFS ) ; vmDevice.setSnapshotId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateSuccess ( command ) ; }

Target:
public void successVmInPreviewForAttachedSnapshot ( ) { initializeCommand ( new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ) ; initVmForSpace ( ) ; initVmDiskImage ( false ) ; initSrcStorageDomain ( ) ; initDestStorageDomain ( StorageType.NFS ) ; vmDevice.setSnapshotId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateSuccess ( command ) ; }
Source:
private void prepareCommand ( ) { parameters = new org.ovirt.engine.core.common.action.StorageServerConnectionParametersBase ( ) ; parameters.setVdsId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; parameters.setStoragePoolId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; command = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.storage.RemoveStorageServerConnectionCommand ( parameters ) ) ; org.mockito.Mockito.doReturn ( lunDAO ) . when ( command ) . getLunDao ( ) ; org.mockito.Mockito.doReturn ( storageServerConnectionDAO ) . when ( command ) . getStorageServerConnectionDao ( ) ; }

Target:
private void prepareCommand ( ) { parameters = new org.ovirt.engine.core.common.action.StorageServerConnectionParametersBase ( ) ; parameters.setVdsId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; command = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.storage.RemoveStorageServerConnectionCommand ( parameters ) ) ; org.mockito.Mockito.doReturn ( lunDAO ) . when ( command ) . getLunDao ( ) ; org.mockito.Mockito.doReturn ( storageServerConnectionDAO ) . when ( command ) . getStorageServerConnectionDao ( ) ; }
Source:
private void forceRemoveStorageDomains ( java.util.List < org.ovirt.engine.core.common.businessentities.storage_domains > storageDomains ) { org.ovirt.engine.core.common.businessentities.storage_domains masterDomain = null ; for ( org.ovirt.engine.core.common.businessentities.storage_domains storageDomain : storageDomains ) { if ( ( storageDomain.getstorage_domain_type ( ) ) != ( org.ovirt.engine.core.common.businessentities.StorageDomainType.Master ) ) { if ( ( storageDomain.getstorage_domain_type ( ) ) != ( org.ovirt.engine.core.common.businessentities.StorageDomainType.ISO ) ) { removeDomainFromDb ( storageDomain ) ; } } else { masterDomain = storageDomain ; } } if ( masterDomain != null ) { removeDomainFromDb ( masterDomain ) ; } }

Target:
private void forceRemoveStorageDomains ( java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > storageDomains ) { org.ovirt.engine.core.common.businessentities.StorageDomain masterDomain = null ; for ( org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain : storageDomains ) { if ( ( storageDomain.getstorage_domain_type ( ) ) != ( org.ovirt.engine.core.common.businessentities.StorageDomainType.Master ) ) { if ( ( storageDomain.getstorage_domain_type ( ) ) != ( org.ovirt.engine.core.common.businessentities.StorageDomainType.ISO ) ) { removeDomainFromDb ( storageDomain ) ; } } else { masterDomain = storageDomain ; } } if ( masterDomain != null ) { removeDomainFromDb ( masterDomain ) ; } }
Source:
public void setUp ( ) { initializeOsRepository ( DiskInterface.VirtIO ) ; disk = org.ovirt.engine.core.bll.validator.storage.DiskValidatorTest.createDiskImage ( ) ; disk.setDiskAlias ( "disk1" ) ; validator = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.validator.storage.DiskValidator ( disk ) ) ; org.mockito.Mockito.doReturn ( vmDao ) . when ( validator ) . getVmDao ( ) ; }

Target:
public void setUp ( ) { disk = org.ovirt.engine.core.bll.validator.storage.DiskValidatorTest.createDiskImage ( ) ; disk.setDiskAlias ( "disk1" ) ; validator = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.validator.storage.DiskValidator ( disk ) ) ; org.mockito.Mockito.doReturn ( vmDao ) . when ( validator ) . getVmDao ( ) ; }
Source:
public org.ovirt.engine.ui.uicommonweb.validation.ValidationResult Validate ( java.lang.Object value ) { int numOfVmsInPoolLengt = getNumOfVmsInPoolLength ( ) ; boolean isOk = ( ( ( poolName.length ( ) ) + numOfVmsInPoolLengt ) + 1 ) <= ( getMaxNameLength ( ) ) ; org.ovirt.engine.ui.uicommonweb.validation.ValidationResult res = new org.ovirt.engine.ui.uicommonweb.validation.ValidationResult ( ) ; res.setSuccess ( isOk ) ; if ( ! isOk ) { res.setReasons ( java.util.Arrays.asList ( getReason ( ) ) ) ; } return res ; }

Target:
public org.ovirt.engine.ui.uicommonweb.validation.ValidationResult validate ( java.lang.Object value ) { int numOfVmsInPoolLengt = getNumOfVmsInPoolLength ( ) ; boolean isOk = ( ( ( poolName.length ( ) ) + numOfVmsInPoolLengt ) + 1 ) <= ( getMaxNameLength ( ) ) ; org.ovirt.engine.ui.uicommonweb.validation.ValidationResult res = new org.ovirt.engine.ui.uicommonweb.validation.ValidationResult ( ) ; res.setSuccess ( isOk ) ; if ( ! isOk ) { res.setReasons ( java.util.Arrays.asList ( getReason ( ) ) ) ; } return res ; }
Source:
private void initClustersTable ( ) { clusterTable = new org.ovirt.engine.ui.common.widget.table.SimpleActionTable < org.ovirt.engine.core.common.businessentities.VDSGroup > ( clusterPolicyClusterModelProvider , getTableHeaderlessResources ( ) , getTableResources ( ) , eventBus , clientStorage ) ; org.ovirt.engine.ui.common.widget.table.column.AbstractTextColumn < org.ovirt.engine.core.common.businessentities.VDSGroup > clusterColumn = new org.ovirt.engine.ui.common.widget.table.column.AbstractTextColumn < org.ovirt.engine.core.common.businessentities.VDSGroup > ( ) { @ java.lang.Override public java.lang.String getValue ( org.ovirt.engine.core.common.businessentities.VDSGroup object ) { return object.getName ( ) ; } } ; clusterTable.addColumn ( clusterColumn , org.ovirt.engine.ui.webadmin.section.main.view.popup.scheduling.ClusterPolicyView.constants.clusterPolicyAttachedCluster ( ) ) ; }

Target:
private void initClustersTable ( ) { clusterTable = new org.ovirt.engine.ui.common.widget.table.SimpleActionTable ( clusterPolicyClusterModelProvider , getTableHeaderlessResources ( ) , getTableResources ( ) , eventBus , clientStorage ) ; org.ovirt.engine.ui.common.widget.table.column.AbstractTextColumn < org.ovirt.engine.core.common.businessentities.VDSGroup > clusterColumn = new org.ovirt.engine.ui.common.widget.table.column.AbstractTextColumn < org.ovirt.engine.core.common.businessentities.VDSGroup > ( ) { @ java.lang.Override public java.lang.String getValue ( org.ovirt.engine.core.common.businessentities.VDSGroup object ) { return object.getName ( ) ; } } ; clusterTable.addColumn ( clusterColumn , org.ovirt.engine.ui.webadmin.section.main.view.popup.scheduling.ClusterPolicyView.constants.clusterPolicyAttachedCluster ( ) ) ; }
Source:
public void testRemoveNonExistant ( ) throws java.lang.Exception { setUpGetTagExpectations ( false ) ; control.replay ( ) ; try { resource.remove ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { assertNotNull ( wae.getResponse ( ) ) ; assertEquals ( 404 , wae.getResponse ( ) . getStatus ( ) ) ; } }

Target:
public void testRemoveNonExistant ( ) throws java.lang.Exception { setUpGetTagExpectations ( false ) ; try { resource.remove ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { assertNotNull ( wae.getResponse ( ) ) ; assertEquals ( 404 , wae.getResponse ( ) . getStatus ( ) ) ; } }
Source:
private void mockDbFacade ( ) { org.powermock.api.mockito.PowerMockito.mockStatic ( org.ovirt.engine.core.dal.dbbroker.DbFacade.class ) ; org.mockito.Mockito.when ( org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) ) . thenReturn ( db ) ; org.mockito.Mockito.when ( db.getVdsGroupDAO ( ) ) . thenReturn ( vdsGroupDAO ) ; org.mockito.Mockito.when ( vdsGroupDAO.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( mockVirtVDSGroup ( ) ) . thenReturn ( mockGlusterVDSGroup ( ) ) . thenReturn ( mockBothVDSGroup ( ) ) ; }

Target:
public void mockDbFacade ( ) { org.powermock.api.mockito.PowerMockito.mockStatic ( org.ovirt.engine.core.dal.dbbroker.DbFacade.class ) ; org.mockito.Mockito.when ( org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) ) . thenReturn ( db ) ; org.mockito.Mockito.when ( db.getVdsGroupDAO ( ) ) . thenReturn ( vdsGroupDAO ) ; org.mockito.Mockito.when ( vdsGroupDAO.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( mockVirtVDSGroup ( ) ) . thenReturn ( mockGlusterVDSGroup ( ) ) . thenReturn ( mockBothVDSGroup ( ) ) ; }
Source:
public org.ovirt.engine.core.aaa.DirectoryUser findUser ( java.lang.String name ) { org.ovirt.engine.core.common.utils.ExternalId id = null ; try { id = new org.ovirt.engine.core.common.utils.ExternalId ( name.getBytes ( "UTF-8" ) ) ; } catch ( java.io.UnsupportedEncodingException e ) { return null ; } return new org.ovirt.engine.core.aaa.DirectoryUser ( this , id , name ) ; }

Target:
public org.ovirt.engine.core.aaa.DirectoryUser findUser ( java.lang.String name ) { org.ovirt.engine.core.common.utils.ExternalId id = null ; try { id = new org.ovirt.engine.core.common.utils.ExternalId ( name.getBytes ( "UTF-8" ) ) ; } catch ( java.io.UnsupportedEncodingException e ) { return null ; } return new org.ovirt.engine.core.aaa.DirectoryUser ( this . getName ( ) , id , name ) ; }
Source:
public void updatePortAllowedWhenInstallationRequired ( ) { org.mockito.Mockito.when ( oldHost.getPort ( ) ) . thenReturn ( org.ovirt.engine.core.utils.RandomUtils.instance ( ) . nextInt ( ) ) ; org.mockito.Mockito.when ( host.getPort ( ) ) . thenReturn ( org.ovirt.engine.core.utils.RandomUtils.instance ( ) . nextInt ( ) ) ; validator = createValidatorForHostInstallation ( ) ; org.junit.Assert.assertThat ( validator.updatePortAllowed ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }

Target:
public void updatePortAllowedWhenInstallationRequired ( ) { validator = createValidatorForHostInstallation ( ) ; org.junit.Assert.assertThat ( validator.updatePortAllowed ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }
Source:
public void testGet ( ) throws java.lang.Exception { resource.getParent ( ) . setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpEntityQueryExpectations ( 1 ) ; control.replay ( ) ; org.ovirt.engine.api.model.ReportedDevice device = resource.get ( ) ; assertEquals ( org.ovirt.engine.api.restapi.resource.BackendVmReportedDeviceResourceTest.DEVICE_ID.toString ( ) , device.getId ( ) ) ; verifyLinks ( device ) ; }

Target:
public void testGet ( ) throws java.lang.Exception { resource.getParent ( ) . setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpEntityQueryExpectations ( 1 ) ; org.ovirt.engine.api.model.ReportedDevice device = resource.get ( ) ; assertEquals ( org.ovirt.engine.api.restapi.resource.BackendVmReportedDeviceResourceTest.DEVICE_ID.toString ( ) , device.getId ( ) ) ; verifyLinks ( device ) ; }
Source:
protected void onEntityChanged ( ) { super . onEntityChanged ( ) ; if ( ( getEntity ( ) ) != null ) { updateDataCenterVersion ( ) ; getSearchCommand ( ) . execute ( ) ; updateIsDiskHotPlugAvailable ( ) ; updateLiveStorageMigrationEnabled ( ) ; updateScanAlignmentEnabled ( ) ; } updateActionAvailability ( ) ; }

Target:
protected void onEntityChanged ( ) { super . onEntityChanged ( ) ; if ( ( getEntity ( ) ) != null ) { updateDataCenterVersion ( ) ; getSearchCommand ( ) . execute ( ) ; updateIsDiskHotPlugAvailable ( ) ; updateLiveStorageMigrationEnabled ( ) ; } updateActionAvailability ( ) ; }
Source:
public void testEffectiveEmulatedMachineCCV ( ) { final org.ovirt.engine.core.common.businessentities.VmBase vmBase = new org.ovirt.engine.core.common.businessentities.VmBase ( ) ; final org.ovirt.engine.core.common.businessentities.Cluster cluster = new org.ovirt.engine.core.common.businessentities.Cluster ( ) ; cluster.setEmulatedMachine ( "pc-i440fx-rhel7.3.0" ) ; vmBase.setCustomCompatibilityVersion ( Version.v4_0 ) ; java.util.List < java.lang.String > supported = java.util.Arrays.asList ( "pc-i440fx-rhel7.2.0" , "pc-i440fx-2.1" , "pseries-rhel7.2.0" ) ; org.ovirt.engine.core.bll.utils.EmulatedMachineUtilsTest.mcr.mockConfigValue ( ConfigValues.ClusterEmulatedMachines , Version.v4_0 , supported ) ; org.junit.Assert.assertEquals ( "pc-i440fx-rhel7.2.0" , org.ovirt.engine.core.bll.utils.EmulatedMachineUtils.getEffective ( vmBase , ( ) -> cluster ) ) ; }

Target:
public void testEffectiveEmulatedMachineCCV ( ) { final org.ovirt.engine.core.common.businessentities.VmBase vmBase = new org.ovirt.engine.core.common.businessentities.VmBase ( ) ; final org.ovirt.engine.core.common.businessentities.Cluster cluster = new org.ovirt.engine.core.common.businessentities.Cluster ( ) ; cluster.setEmulatedMachine ( "pc-i440fx-rhel7.3.0" ) ; vmBase.setCustomCompatibilityVersion ( Version.v4_0 ) ; org.junit.Assert.assertEquals ( "pc-i440fx-rhel7.2.0" , org.ovirt.engine.core.bll.utils.EmulatedMachineUtils.getEffective ( vmBase , ( ) -> cluster ) ) ; }
Source:
public void load ( java.io.File file ) { try ( java.io.FileInputStream inputStream = new java.io.FileInputStream ( file ) ) { java.util.Properties props = new java.util.Properties ( ) ; props.load ( inputStream ) ; loadImpl ( props , file ) ; } catch ( java.io.IOException exception ) { throw new org.ovirt.engine.core.extensions.mgr.ConfigurationException ( java.lang.String.format ( "Can't load object configuration file '%1$s'" , file.getAbsolutePath ( ) ) ) ; } }

Target:
public java.lang.String load ( java.io.File file ) { try ( java.io.FileInputStream inputStream = new java.io.FileInputStream ( file ) ) { java.util.Properties props = new java.util.Properties ( ) ; props.load ( inputStream ) ; return loadImpl ( props , file ) ; } catch ( java.io.IOException exception ) { throw new org.ovirt.engine.core.extensions.mgr.ConfigurationException ( java.lang.String.format ( "Can't load object configuration file '%1$s'" , file.getAbsolutePath ( ) ) ) ; } }
Source:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.core.common.businessentities.VDSGroup cluster = ( ( org.ovirt.engine.core.common.businessentities.VDSGroup ) ( returnValue ) ) ; if ( ( ( cluster != null ) && ( cluster.supportsGlusterService ( ) ) ) && ( ! ( cluster.supportsVirtService ( ) ) ) ) { model.getForce ( ) . setIsAvailable ( true ) ; } model.stopProgress ( ) ; }

Target:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.core.common.businessentities.VDSGroup cluster = ( ( org.ovirt.engine.core.common.businessentities.VDSGroup ) ( returnValue ) ) ; if ( ( cluster != null ) && ( cluster.supportsGlusterService ( ) ) ) { model.getForce ( ) . setIsAvailable ( true ) ; } model.stopProgress ( ) ; }
Source:
public void validateEnoughSpace ( ) throws java.lang.Exception { initializeCommand ( ImageOperation.Move , new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ) ; initSnapshotValidator ( ) ; initVmForSpace ( ) ; initVmDiskImage ( false ) ; initSrcStorageDomain ( ) ; initDestStorageDomain ( StorageType.NFS ) ; org.mockito.Mockito.doReturn ( org.ovirt.engine.core.bll.storage.disk.MoveOrCopyDiskCommandTest.mockStorageDomainValidatorWithSpace ( ) ) . when ( command ) . createStorageDomainValidator ( ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateSuccess ( command ) ; }

Target:
public void validateEnoughSpace ( ) throws java.lang.Exception { initializeCommand ( new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ) ; initSnapshotValidator ( ) ; initVmForSpace ( ) ; initVmDiskImage ( false ) ; initSrcStorageDomain ( ) ; initDestStorageDomain ( StorageType.NFS ) ; org.mockito.Mockito.doReturn ( org.ovirt.engine.core.bll.storage.disk.MoveOrCopyDiskCommandTest.mockStorageDomainValidatorWithSpace ( ) ) . when ( command ) . createStorageDomainValidator ( ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateSuccess ( command ) ; }
Source:
public static java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskInterface > GetDiskInterfaceList ( org.ovirt.engine.core.common.businessentities.VmOsType osType , org.ovirt.engine.core.compat.Version Version ) { return ( osType == ( org.ovirt.engine.core.common.businessentities.VmOsType.WindowsXP ) ) && ( ( Version == null ) || ( ( Version.compareTo ( new org.ovirt.engine.core.compat.Version ( "2.2" ) ) ) < 0 ) ) ? new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskInterface > ( java.util.Arrays.asList ( new org.ovirt.engine.core.common.businessentities.DiskInterface [ ] { org.ovirt.engine.core.common.businessentities.DiskInterface.IDE } ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskInterface > ( java.util.Arrays.asList ( new org.ovirt.engine.core.common.businessentities.DiskInterface [ ] { org.ovirt.engine.core.common.businessentities.DiskInterface.IDE , org.ovirt.engine.core.common.businessentities.DiskInterface.VirtIO } ) ) ; }

Target:
public static java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskInterface > GetDiskInterfaceList ( ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskInterface > ( java.util.Arrays.asList ( new org.ovirt.engine.core.common.businessentities.DiskInterface [ ] { org.ovirt.engine.core.common.businessentities.DiskInterface.IDE , org.ovirt.engine.core.common.businessentities.DiskInterface.VirtIO } ) ) ; }
Source:
private org.ovirt.engine.core.bll.ValidationResult validateWithHostSetupNetworksValidator ( org.ovirt.engine.core.common.businessentities.VDS host ) { org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidator validator = new org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidator ( host , org.ovirt.engine.core.bll.network.host.HostSetupNetworksCommand.getParameters ( ) , getExistingNics ( ) , getExistingAttachments ( ) , getNetworkBusinessEntityMap ( ) , managementNetworkUtil , networkClusterDao , networkAttachmentDao , networkDao , vdsDao , hostSetupNetworksValidatorHelper , vmDao ) ; return validator.validate ( ) ; }

Target:
private org.ovirt.engine.core.bll.ValidationResult validateWithHostSetupNetworksValidator ( org.ovirt.engine.core.common.businessentities.VDS host ) { org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidator validator = new org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidator ( host , org.ovirt.engine.core.bll.network.host.HostSetupNetworksCommand.getParameters ( ) , getExistingNics ( ) , getExistingAttachments ( ) , getNetworkBusinessEntityMap ( ) , managementNetworkUtil , networkClusterDao , networkDao , vdsDao , hostSetupNetworksValidatorHelper , vmDao ) ; return validator.validate ( ) ; }
Source:
public org.ovirt.engine.ui.uicommonweb.validation.ValidationResult Validate ( java.lang.Object value ) { boolean isOk = behavior.isNumOfSocketsCorrect ( java.lang.Integer.parseInt ( getTotalCPUCores ( ) . getEntity ( ) . toString ( ) ) ) ; org.ovirt.engine.ui.uicommonweb.validation.ValidationResult res = new org.ovirt.engine.ui.uicommonweb.validation.ValidationResult ( ) ; res.setSuccess ( isOk ) ; res.setReasons ( java.util.Arrays.asList ( org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getMessages ( ) . incorrectVCPUNumber ( ) ) ) ; return res ; }

Target:
public org.ovirt.engine.ui.uicommonweb.validation.ValidationResult validate ( java.lang.Object value ) { boolean isOk = behavior.isNumOfSocketsCorrect ( java.lang.Integer.parseInt ( getTotalCPUCores ( ) . getEntity ( ) . toString ( ) ) ) ; org.ovirt.engine.ui.uicommonweb.validation.ValidationResult res = new org.ovirt.engine.ui.uicommonweb.validation.ValidationResult ( ) ; res.setSuccess ( isOk ) ; res.setReasons ( java.util.Arrays.asList ( org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getMessages ( ) . incorrectVCPUNumber ( ) ) ) ; return res ; }
Source:
protected org.ovirt.engine.core.common.businessentities.VM getVmFromConfiguration ( ) { org.ovirt.engine.core.common.businessentities.VM result = null ; org.ovirt.engine.core.common.queries.VdcQueryReturnValue queryReturnValue = org.ovirt.engine.core.bll.Backend.getInstance ( ) . RunQuery ( VdcQueryType.GetVmConfigurationBySnapshot , new org.ovirt.engine.core.common.queries.IdQueryParameters ( snapshot.getId ( ) ) ) ; if ( queryReturnValue.getSucceeded ( ) ) { result = queryReturnValue.getReturnValue ( ) ; } return result ; }

Target:
protected org.ovirt.engine.core.common.businessentities.VM getVmFromConfiguration ( ) { org.ovirt.engine.core.common.businessentities.VM result = null ; org.ovirt.engine.core.common.queries.VdcQueryReturnValue queryReturnValue = org.ovirt.engine.core.bll.Backend.getInstance ( ) . runQuery ( VdcQueryType.GetVmConfigurationBySnapshot , new org.ovirt.engine.core.common.queries.IdQueryParameters ( snapshot.getId ( ) ) ) ; if ( queryReturnValue.getSucceeded ( ) ) { result = queryReturnValue.getReturnValue ( ) ; } return result ; }
Source:
public void OnSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel diskModel = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel ) ( target ) ) ; java.lang.Iterable < org.ovirt.engine.core.common.businessentities.VDS > hosts = ( ( java.lang.Iterable < org.ovirt.engine.core.common.businessentities.VDS > ) ( returnValue ) ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > filteredHosts = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( ) ; for ( org.ovirt.engine.core.common.businessentities.VDS host : hosts ) { if ( isHostAvailable ( host ) ) { filteredHosts.add ( host ) ; } } diskModel.getHost ( ) . setItems ( filteredHosts ) ; StopProgress ( ) ; }

Target:
public void OnSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel diskModel = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel ) ( target ) ) ; java.lang.Iterable < org.ovirt.engine.core.common.businessentities.VDS > hosts = ( ( java.lang.Iterable < org.ovirt.engine.core.common.businessentities.VDS > ) ( returnValue ) ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > filteredHosts = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( ) ; for ( org.ovirt.engine.core.common.businessentities.VDS host : hosts ) { if ( isHostAvailable ( host ) ) { filteredHosts.add ( host ) ; } } diskModel.getHost ( ) . setItems ( filteredHosts ) ; }
Source:
public void getAllProvidersByType ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.businessentities.ProviderType providerType ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Provider > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllProviders , new org.ovirt.engine.core.common.queries.GetAllProvidersParameters ( providerType ) , aQuery ) ; }

Target:
public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Provider > ( ) ; } return source ; }
Source:
public void UpdateDynamicData ( org.ovirt.engine.core.common.businessentities.VdsDynamic dynamicData ) { if ( ( ( ( dynamicData != null ) && ( ( _vds ) != null ) ) && ( ( _vds.getDynamicData ( ) ) != null ) ) && ( ! ( dynamicData.equals ( _vds.getDynamicData ( ) ) ) ) ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVdsDynamicDao ( ) . update ( dynamicData ) ; } else { org.ovirt.engine.core.vdsbroker.VdsManager.log.debug ( "Ignoring unneeded update of VDSDynamic" ) ; } }

Target:
public void UpdateDynamicData ( org.ovirt.engine.core.common.businessentities.VdsDynamic dynamicData ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVdsDynamicDao ( ) . update ( dynamicData ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { defaultType = org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getDefaultNicType ( ( ( java.util.Collection < org.ovirt.engine.core.common.businessentities.network.VmInterfaceType > ) ( returnValue ) ) ) ; supportedInterfaceTypes = ( ( java.util.Collection < org.ovirt.engine.core.common.businessentities.network.VmInterfaceType > ) ( returnValue ) ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getVmNicList ( getNicsQuery , vmId ) ; }

Target:
public void onSuccess ( java.util.List < org.ovirt.engine.core.common.businessentities.network.VmInterfaceType > returnValue ) { defaultType = org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getDefaultNicType ( returnValue ) ; supportedInterfaceTypes = returnValue ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getVmNicList ( getNicsQuery , vmId ) ; }
Source:
public void testListIncludeStatistics ( ) throws java.lang.Exception { try { accepts.add ( "application/xml; detail=statistics" ) ; setUriInfo ( setUpUriExpectations ( null ) ) ; setGetVmQueryExpectations ( 1 ) ; setGetNetworksQueryExpectations ( 1 ) ; setGetGuestAgentQueryExpectations ( 3 ) ; setUpQueryExpectations ( "" ) ; java.util.List < org.ovirt.engine.api.model.NIC > nics = getCollection ( ) ; assertTrue ( nics.get ( 0 ) . isSetStatistics ( ) ) ; verifyCollection ( nics ) ; } finally { accepts.clear ( ) ; } }

Target:
public void testListIncludeStatistics ( ) throws java.lang.Exception { try { accepts.add ( "application/xml; detail=statistics" ) ; setUriInfo ( setUpUriExpectations ( null ) ) ; setGetGuestAgentQueryExpectations ( 3 ) ; setUpQueryExpectations ( "" ) ; java.util.List < org.ovirt.engine.api.model.NIC > nics = getCollection ( ) ; assertTrue ( nics.get ( 0 ) . isSetStatistics ( ) ) ; verifyCollection ( nics ) ; } finally { accepts.clear ( ) ; } }
Source:
public void getVdsNullVdsId ( ) { final org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase b = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.TestAuditLogableBase ( ) ; final org.ovirt.engine.core.common.businessentities.VDS vds = null ; final org.ovirt.engine.core.common.businessentities.VM vm = new org.ovirt.engine.core.common.businessentities.VM ( ) ; vm.setRunOnVds ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID3 ) ; final org.ovirt.engine.core.compat.Guid vdsId = null ; b.setVds ( vds ) ; b.setVdsId ( vdsId ) ; b.setVm ( vm ) ; final org.ovirt.engine.core.common.businessentities.VDS v = b.getVds ( ) ; org.junit.Assert.assertNull ( v ) ; }

Target:
public void getVdsNullVdsId ( ) { final org.ovirt.engine.core.common.businessentities.VDS vds = null ; final org.ovirt.engine.core.common.businessentities.VM vm = new org.ovirt.engine.core.common.businessentities.VM ( ) ; vm.setRunOnVds ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID3 ) ; final org.ovirt.engine.core.compat.Guid vdsId = null ; b.setVds ( vds ) ; b.setVdsId ( vdsId ) ; b.setVm ( vm ) ; final org.ovirt.engine.core.common.businessentities.VDS v = b.getVds ( ) ; org.junit.Assert.assertNull ( v ) ; }
Source:
protected void setImageStatus ( org.ovirt.engine.core.common.businessentities.ImageStatus imageStatus ) { org.ovirt.engine.core.common.businessentities.DiskImage diskImage = getRelevantDiskImage ( ) ; if ( ( diskImage != null ) && ( ( diskImage.getImageStatus ( ) ) != imageStatus ) ) { diskImage.setImageStatus ( imageStatus ) ; org.ovirt.engine.core.bll.ImagesHandler.updateImageStatus ( diskImage.getImage ( ) . getId ( ) , imageStatus ) ; } }

Target:
protected void setImageStatus ( org.ovirt.engine.core.common.businessentities.ImageStatus imageStatus , org.ovirt.engine.core.common.businessentities.DiskImage diskImage ) { if ( ( diskImage != null ) && ( ( diskImage.getImageStatus ( ) ) != imageStatus ) ) { diskImage.setImageStatus ( imageStatus ) ; org.ovirt.engine.core.bll.ImagesHandler.updateImageStatus ( diskImage.getImage ( ) . getId ( ) , imageStatus ) ; } }
Source:
protected void onBind ( ) { super . onBind ( ) ; registerHandler ( getView ( ) . getCloseButton ( ) . addClickHandler ( new com.google.gwt.event.dom.client.ClickHandler ( ) { @ java.lang.Override public void onClick ( com.google.gwt.event.dom.client.ClickEvent event ) { getView ( ) . hide ( ) ; } } ) ) ; }

Target:
public void hide ( ) { getView ( ) . hide ( ) ; }
Source:
protected R addLinks ( R model , java.lang.Class < ? extends org.ovirt.engine.api.model.BaseResource > suggestedParent , java.lang.String ... subCollectionMembersToExclude ) { model = addParents ( model ) ; model = linkSubCollections ( model , suggestedParent , subCollectionMembersToExclude ) ; model = org.ovirt.engine.api.restapi.util.LinkHelper.addLinks ( org.ovirt.engine.api.restapi.resource.AbstractBackendResource.getUriInfo ( ) , model , suggestedParent ) ; return model ; }

Target:
protected R addLinks ( R model , java.lang.Class < ? extends org.ovirt.engine.api.model.BaseResource > suggestedParent , java.lang.String ... subCollectionMembersToExclude ) { model = addParents ( model ) ; model = linkSubCollections ( model , suggestedParent , subCollectionMembersToExclude ) ; model = org.ovirt.engine.api.restapi.util.LinkHelper.addLinks ( model , suggestedParent ) ; return model ; }
Source:
protected void entityChanging ( java.lang.Object newValue , java.lang.Object oldValue ) { org.ovirt.engine.core.common.businessentities.VDSGroup vdsGroup = ( ( org.ovirt.engine.core.common.businessentities.VDSGroup ) ( newValue ) ) ; getNewNetworkCommand ( ) . setIsExecutionAllowed ( ( ( vdsGroup != null ) && ( ( vdsGroup.getStoragePoolId ( ) ) != null ) ) ) ; }

Target:
protected void entityChanging ( org.ovirt.engine.core.common.businessentities.VDSGroup newValue , org.ovirt.engine.core.common.businessentities.VDSGroup oldValue ) { getNewNetworkCommand ( ) . setIsExecutionAllowed ( ( ( newValue != null ) && ( ( newValue.getStoragePoolId ( ) ) != null ) ) ) ; }
Source:
public void commandFailsSlaveNotOvirtMonitored ( ) { command = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.gluster.SetupGlusterGeoRepMountBrokerInternalCommand ( new org.ovirt.engine.core.common.action.gluster.SetUpMountBrokerParameters ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , new java.util.HashSet ( java.util.Collections.singletonList ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ) , null , null ) , null ) ) ; org.mockito.Mockito.doReturn ( vds ) . when ( command ) . getUpServer ( ) ; org.mockito.Mockito.doReturn ( null ) . when ( command ) . getSlaveVolume ( ) ; org.junit.Assert.assertFalse ( command.validate ( ) ) ; }

Target:
public void commandFailsSlaveNotOvirtMonitored ( ) { command = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.gluster.SetupGlusterGeoRepMountBrokerInternalCommand ( new org.ovirt.engine.core.common.action.gluster.SetUpMountBrokerParameters ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , new java.util.HashSet ( java.util.Collections.singletonList ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ) , null , null ) , null ) ) ; org.mockito.Mockito.doReturn ( null ) . when ( command ) . getSlaveVolume ( ) ; org.junit.Assert.assertFalse ( command.validate ( ) ) ; }
Source:
public void OnSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.VmGuideModel vmGuideModel = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.VmGuideModel ) ( target ) ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > disks = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ) ( returnValue ) ) ; vmGuideModel.disks = disks ; vmGuideModel.UpdateOptionsPostData ( ) ; }

Target:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.VmGuideModel vmGuideModel = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.VmGuideModel ) ( target ) ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > disks = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ) ( returnValue ) ) ; vmGuideModel.disks = disks ; vmGuideModel.UpdateOptionsPostData ( ) ; }
Source:
public void reloadPartial ( org.ovirt.engine.core.common.businessentities.VDS vds ) { vds.setStatisticsData ( org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVdsStatisticsDao ( ) . get ( vds.getId ( ) ) ) ; vds.setVdsSpmId ( org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVdsSpmIdMapDao ( ) . getFromCache ( vds.getId ( ) ) . getvds_spm_id ( ) ) ; }

Target:
public void reloadPartial ( org.ovirt.engine.core.common.businessentities.VDS vds ) { vds.setStatisticsData ( org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVdsStatisticsDao ( ) . get ( vds.getId ( ) ) ) ; vds.setVdsSpmId ( org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVdsSpmIdMapDao ( ) . get ( vds.getId ( ) ) . getvds_spm_id ( ) ) ; }
Source:
private void initDumpXmls ( java.util.Map < java.lang.String , java.lang.Object > ... deviceInfos ) { org.ovirt.engine.core.common.vdscommands.VDSReturnValue returnValue = new org.ovirt.engine.core.common.vdscommands.VDSReturnValue ( ) ; returnValue.setReturnValue ( new java.util.Map [ ] { getDumpXmls ( org.ovirt.engine.core.vdsbroker.monitoring.VmDevicesMonitoringTest.VM_ID , deviceInfos ) } ) ; returnValue.setSucceeded ( true ) ; org.mockito.Mockito.doReturn ( returnValue ) . when ( resourceManager ) . runVdsCommand ( org.mockito.ArgumentMatchers.eq ( VDSCommandType.DumpXmls ) , org.mockito.ArgumentMatchers.any ( DumpXmlsVDSCommand.Params.class ) ) ; }

Target:
private void initDumpXmls ( java.util.Map < java.lang.String , java.lang.Object > ... deviceInfos ) { org.ovirt.engine.core.common.vdscommands.VDSReturnValue returnValue = new org.ovirt.engine.core.common.vdscommands.VDSReturnValue ( ) ; returnValue.setReturnValue ( new java.util.Map [ ] { getDumpXmls ( org.ovirt.engine.core.vdsbroker.monitoring.VmDevicesMonitoringTest.VM_ID , deviceInfos ) } ) ; returnValue.setSucceeded ( true ) ; org.mockito.Mockito.doReturn ( returnValue ) . when ( resourceManager ) . runVdsCommand ( org.mockito.ArgumentMatchers.eq ( VDSCommandType.DumpXmls ) , org.mockito.ArgumentMatchers.any ( ) ) ; }
Source:
private void retryCall ( final org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request , final org.ovirt.vdsm.jsonrpc.client.internal.JsonRpcCall call ) throws org.ovirt.vdsm.jsonrpc.client.ClientConnectionException { org.ovirt.vdsm.jsonrpc.client.utils.retry.RetryPolicy policy = this . client.getRetryPolicy ( ) ; org.ovirt.vdsm.jsonrpc.client.utils.ResponseTracking tracking = new org.ovirt.vdsm.jsonrpc.client.utils.ResponseTracking ( request , call , new org.ovirt.vdsm.jsonrpc.client.utils.retry.RetryContext ( policy ) , org.ovirt.vdsm.jsonrpc.client.utils.JsonUtils.getTimeout ( policy.getRetryTimeOut ( ) , policy.getTimeUnit ( ) ) , this . client ) ; this . tracker.registerTrackingRequest ( request , tracking ) ; }

Target:
private void retryCall ( final org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request , final org.ovirt.vdsm.jsonrpc.client.internal.JsonRpcCall call ) throws org.ovirt.vdsm.jsonrpc.client.ClientConnectionException { org.ovirt.vdsm.jsonrpc.client.utils.ResponseTracking tracking = new org.ovirt.vdsm.jsonrpc.client.utils.ResponseTracking ( request , call , new org.ovirt.vdsm.jsonrpc.client.utils.retry.RetryContext ( policy ) , org.ovirt.vdsm.jsonrpc.client.utils.JsonUtils.getTimeout ( this . policy.getRetryTimeOut ( ) , this . policy.getTimeUnit ( ) ) , this . client ) ; this . tracker.registerTrackingRequest ( request , tracking ) ; }
Source:
protected void doGet ( javax.servlet.http.HttpServletRequest request , javax.servlet.http.HttpServletResponse response ) throws java.io.IOException , javax.servlet.ServletException { response.setContentType ( "text/html" ) ; java.io.PrintWriter out = response.getWriter ( ) ; java.lang.String reportsUrl = org.ovirt.engine.core.common.config.Config.< java.lang.String > GetValue ( ConfigValues.RedirectServletReportsPage ) ; if ( org.apache.commons.lang.StringUtils.isEmpty ( reportsUrl ) ) { addAlert ( out , "The reports application isn't installed." ) ; } else { response.sendRedirect ( reportsUrl ) ; } }

Target:
protected void doGet ( javax.servlet.http.HttpServletRequest request , javax.servlet.http.HttpServletResponse response ) throws java.io.IOException , javax.servlet.ServletException { response.setContentType ( "text/html" ) ; java.io.PrintWriter out = response.getWriter ( ) ; java.lang.String reportsUrl = org.ovirt.engine.core.common.config.Config.< java.lang.String > getValue ( ConfigValues.RedirectServletReportsPage ) ; if ( org.apache.commons.lang.StringUtils.isEmpty ( reportsUrl ) ) { addAlert ( out , "The reports application isn't installed." ) ; } else { response.sendRedirect ( reportsUrl ) ; } }
Source:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.tags.TagListModel tagListModel = ( ( org.ovirt.engine.ui.uicommonweb.models.tags.TagListModel ) ( target ) ) ; org.ovirt.engine.ui.uicommonweb.models.tags.TagModel rootTag = tagListModel.tagToModel ( ( ( org.ovirt.engine.core.common.businessentities.Tags ) ( returnValue ) ) ) ; rootTag.getName ( ) . setEntity ( org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getConstants ( ) . rootTag ( ) ) ; rootTag.setType ( TagModelType.Root ) ; rootTag.setIsChangeable ( false ) ; tagListModel.setItems ( new java.util.ArrayList ( java.util.Arrays.asList ( new org.ovirt.engine.ui.uicommonweb.models.tags.TagModel [ ] { rootTag } ) ) ) ; }

Target:
public void onSuccess ( org.ovirt.engine.core.common.businessentities.Tags returnValue ) { org.ovirt.engine.ui.uicommonweb.models.tags.TagModel rootTag = tagToModel ( returnValue ) ; rootTag.getName ( ) . setEntity ( org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getConstants ( ) . rootTag ( ) ) ; rootTag.setType ( TagModelType.Root ) ; rootTag.setIsChangeable ( false ) ; setItems ( new java.util.ArrayList ( java.util.Arrays.asList ( new org.ovirt.engine.ui.uicommonweb.models.tags.TagModel [ ] { rootTag } ) ) ) ; }
Source:
public java.lang.String getDisplayValue ( ) { if ( isDefault ( ) ) { java.lang.String defaultTimeZoneKey = ( ( java.lang.String ) ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigValuePreConverted ( timeZoneType.getDefaultTimeZoneConfigurationKey ( ) ) ) ) ; if ( ! ( timeZoneType.getTimeZoneList ( ) . containsKey ( defaultTimeZoneKey ) ) ) { defaultTimeZoneKey = timeZoneType.getUltimateFallback ( ) ; } return timeZoneType.getTimeZoneList ( ) . get ( defaultTimeZoneKey ) ; } else { return timeZoneType.getTimeZoneList ( ) . get ( timeZoneKey ) ; } }

Target:
public java.lang.String getDisplayValue ( ) { if ( isDefault ( ) ) { java.lang.String defaultTimeZoneKey = ( ( java.lang.String ) ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getConfigValuePreConverted ( timeZoneType.getDefaultTimeZoneConfigurationKey ( ) ) ) ) ; if ( ! ( timeZoneType.getTimeZoneList ( ) . containsKey ( defaultTimeZoneKey ) ) ) { defaultTimeZoneKey = timeZoneType.getUltimateFallback ( ) ; } return timeZoneType.getTimeZoneList ( ) . get ( defaultTimeZoneKey ) ; } else { return timeZoneType.getTimeZoneList ( ) . get ( timeZoneKey ) ; } }
Source:
protected boolean validate ( ) { if ( ! ( super . validate ( ) ) ) { return false ; } org.ovirt.engine.core.bll.validator.gluster.GlusterBrickValidator brickValidator = new org.ovirt.engine.core.bll.validator.gluster.GlusterBrickValidator ( ) ; return validate ( brickValidator.canRemoveBrick ( getParameters ( ) . getBricks ( ) , getGlusterVolume ( ) , getParameters ( ) . getReplicaCount ( ) , false ) ) ; }

Target:
protected boolean validate ( ) { if ( ! ( super . validate ( ) ) ) { return false ; } return validate ( brickValidator.canRemoveBrick ( getParameters ( ) . getBricks ( ) , getGlusterVolume ( ) , getParameters ( ) . getReplicaCount ( ) , false ) ) ; }
Source:
protected void initContainerDetails ( org.ovirt.engine.core.common.action.ImagesContainterParametersBase parameters ) { super . setVmId ( parameters.getContainerId ( ) ) ; if ( ( ( getDiskImage ( ) ) != null ) && ( ( getDiskImage ( ) . getStoragePoolId ( ) ) != null ) ) { setStoragePoolId ( getDiskImage ( ) . getStoragePoolId ( ) ) ; } }

Target:
protected void initContainerDetails ( org.ovirt.engine.core.common.action.ImagesContainterParametersBase parameters ) { super . setVmId ( parameters.getContainerId ( ) ) ; if ( ( parameters.getStoragePoolId ( ) ) != null ) { setStoragePoolId ( parameters.getStoragePoolId ( ) ) ; } else if ( ( ( getDiskImage ( ) ) != null ) && ( ( getDiskImage ( ) . getStoragePoolId ( ) ) != null ) ) { setStoragePoolId ( getDiskImage ( ) . getStoragePoolId ( ) ) ; } }
Source:
public org.ovirt.engine.core.common.businessentities.BootSequence getSequence ( ) { java.lang.String str = "" ; for ( org.ovirt.engine.ui.uicommonweb.models.EntityModel a : getItems ( ) ) { if ( a.getIsChangable ( ) ) { org.ovirt.engine.core.common.businessentities.BootSequence bs = ( ( org.ovirt.engine.core.common.businessentities.BootSequence ) ( a.getEntity ( ) ) ) ; str += bs.toString ( ) ; } } return org.ovirt.engine.core.common.businessentities.BootSequence.valueOf ( str ) ; }

Target:
public org.ovirt.engine.core.common.businessentities.BootSequence getSequence ( ) { java.lang.String str = "" ; for ( org.ovirt.engine.ui.uicommonweb.models.EntityModel a : getItems ( ) ) { if ( a.getIsChangable ( ) ) { org.ovirt.engine.core.common.businessentities.BootSequence bs = ( ( org.ovirt.engine.core.common.businessentities.BootSequence ) ( a.getEntity ( ) ) ) ; str += bs.toString ( ) ; } } return ! ( str.equals ( "" ) ) ? org.ovirt.engine.core.common.businessentities.BootSequence.valueOf ( str ) : null ; }
Source:
private void addStatistics ( org.ovirt.engine.api.model.Disk model , org.ovirt.engine.api.model.Disk entity ) { model.setStatistics ( new org.ovirt.engine.api.model.Statistics ( ) ) ; org.ovirt.engine.api.restapi.resource.DiskStatisticalQuery query = new org.ovirt.engine.api.restapi.resource.DiskStatisticalQuery ( newModel ( model.getId ( ) ) ) ; java.util.List < org.ovirt.engine.api.model.Statistic > statistics = query.getStatistics ( entity ) ; for ( org.ovirt.engine.api.model.Statistic statistic : statistics ) { org.ovirt.engine.api.restapi.util.LinkHelper.addLinks ( uriInfo , statistic , query.getParentType ( ) ) ; } model.getStatistics ( ) . getStatistics ( ) . addAll ( statistics ) ; }

Target:
private void addStatistics ( org.ovirt.engine.api.model.Disk model , org.ovirt.engine.api.model.Disk entity ) { model.setStatistics ( new org.ovirt.engine.api.model.Statistics ( ) ) ; org.ovirt.engine.api.restapi.resource.DiskStatisticalQuery query = new org.ovirt.engine.api.restapi.resource.DiskStatisticalQuery ( newModel ( model.getId ( ) ) ) ; java.util.List < org.ovirt.engine.api.model.Statistic > statistics = query.getStatistics ( entity ) ; for ( org.ovirt.engine.api.model.Statistic statistic : statistics ) { org.ovirt.engine.api.restapi.util.LinkHelper.addLinks ( statistic , query.getParentType ( ) ) ; } model.getStatistics ( ) . getStatistics ( ) . addAll ( statistics ) ; }
Source:
public java.lang.String getText ( org.ovirt.engine.core.common.businessentities.storage_domains storage ) { if ( ( ( storage.getavailable_disk_size ( ) ) == null ) || ( ( storage.getavailable_disk_size ( ) ) < 1 ) ) { return "< 1 GB" ; } return ( storage.getavailable_disk_size ( ) ) + " GB" ; }

Target:
public java.lang.String getText ( org.ovirt.engine.core.common.businessentities.StorageDomain storage ) { if ( ( ( storage.getavailable_disk_size ( ) ) == null ) || ( ( storage.getavailable_disk_size ( ) ) < 1 ) ) { return "< 1 GB" ; } return ( storage.getavailable_disk_size ( ) ) + " GB" ; }
Source:
private java.util.List < java.lang.String > getAllHostNames ( java.util.List < org.ovirt.engine.core.common.businessentities.VDS > allHosts ) { java.util.List < java.lang.String > allHostNames = new java.util.ArrayList < java.lang.String > ( allHosts.size ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.VDS vds : allHosts ) { allHostNames.add ( vds.getVdsName ( ) ) ; } return allHostNames ; }

Target:
private java.util.List < java.lang.String > getAllHostNames ( java.util.List < org.ovirt.engine.core.common.businessentities.VDS > allHosts ) { java.util.List < java.lang.String > allHostNames = new java.util.ArrayList < java.lang.String > ( allHosts.size ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.VDS vds : allHosts ) { allHostNames.add ( vds.getName ( ) ) ; } return allHostNames ; }