auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void testUpdateNotFound ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpEntityQueryExpectations ( 1 , 0 , true ) ; control.replay ( ) ; try { resource.update ( org.ovirt.engine.api.restapi.resource.BackendMacPoolResourceTest.getModel ( 0 ) ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }

Target:
public void testUpdateNotFound ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpEntityQueryExpectations ( 1 , 0 , true ) ; try { resource.update ( org.ovirt.engine.api.restapi.resource.BackendMacPoolResourceTest.getModel ( 0 ) ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }
Source:
public void testUpdate ( ) throws java.lang.Exception { setUpGetEntityExpectations ( 2 ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.UpdateQuota , org.ovirt.engine.core.common.action.QuotaCRUDParameters.class , new java.lang.String [ ] { "QuotaId" , "Quota.Description" , "Quota.GraceClusterPercentage" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendQuotaResourceTest.QUOTA_ID , DESCRIPTIONS [ 1 ] , 30 } , true , true ) ) ; verifyModel ( resource.update ( getModel ( ) ) , 0 ) ; }

Target:
public void testUpdate ( ) throws java.lang.Exception { setUpGetEntityExpectations ( 2 ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.UpdateQuota , org.ovirt.engine.core.common.action.QuotaCRUDParameters.class , new java.lang.String [ ] { "QuotaId" , "Quota.Description" , "Quota.GraceClusterPercentage" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendQuotaResourceTest.QUOTA_ID , DESCRIPTIONS [ 0 ] , 30 } , true , true ) ) ; verifyModel ( resource.update ( getModel ( ) ) , 0 ) ; }
Source:
private void removeVmSnapshots ( org.ovirt.engine.core.common.businessentities.VM vm ) { java.util.Set < java.lang.String > memoriesOfRemovedSnapshots = snapshotsManager.removeSnapshots ( vm.getId ( ) ) ; new org.ovirt.engine.core.bll.memory.MemoryImageRemoverOnDataDomain ( vm , this ) . removeMemoryVolumes ( memoriesOfRemovedSnapshots ) ; }

Target:
private void removeVmSnapshots ( org.ovirt.engine.core.common.businessentities.VM vm ) { java.util.Set < java.lang.String > memoriesOfRemovedSnapshots = snapshotsManager.removeSnapshots ( vm.getId ( ) ) ; if ( ! ( memoriesOfRemovedSnapshots.isEmpty ( ) ) ) { new org.ovirt.engine.core.bll.memory.MemoryImageRemoverOnDataDomain ( vm , this ) . removeMemoryVolumes ( memoriesOfRemovedSnapshots ) ; } }
Source:
public void updateHostAddressAllowed ( ) { java.lang.String hostName = generateRandomName ( ) ; org.mockito.Mockito.when ( oldHost.getHostName ( ) ) . thenReturn ( hostName ) ; org.mockito.Mockito.when ( host.getHostName ( ) ) . thenReturn ( hostName ) ; org.mockito.Mockito.when ( oldHost.getStatus ( ) ) . thenReturn ( VDSStatus.InstallFailed ) ; org.junit.Assert.assertThat ( validator.updateHostAddressAllowed ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }

Target:
public void updateHostAddressAllowed ( ) { org.mockito.Mockito.when ( oldHost.getStatus ( ) ) . thenReturn ( VDSStatus.InstallFailed ) ; org.junit.Assert.assertThat ( validator.updateHostAddressAllowed ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }
Source:
protected boolean canDoAction ( ) { if ( ! ( org.ovirt.engine.core.bll.qos.RemoveQosCommandBase.validateParameters ( ) ) ) { return false ; } org.ovirt.engine.core.bll.validator.QosValidator < T > validator = getQosValidator ( org.ovirt.engine.core.bll.qos.RemoveQosCommandBase.getQos ( ) ) ; return ( ( super . canDoAction ( ) ) && ( validate ( validator.qosExists ( ) ) ) ) && ( validate ( validator.consistentDataCenter ( ) ) ) ; }

Target:
protected boolean validate ( ) { if ( ! ( org.ovirt.engine.core.bll.qos.RemoveQosCommandBase.validateParameters ( ) ) ) { return false ; } org.ovirt.engine.core.bll.validator.QosValidator < T > validator = getQosValidator ( org.ovirt.engine.core.bll.qos.RemoveQosCommandBase.getQos ( ) ) ; return ( ( super . validate ( ) ) && ( validate ( validator.qosExists ( ) ) ) ) && ( validate ( validator.consistentDataCenter ( ) ) ) ; }
Source:
protected void mockInterfaceList ( ) { java.util.ArrayList < java.lang.String > diskInterfaces = new java.util.ArrayList < > ( java.util.Arrays.asList ( new java.lang.String [ ] { "IDE" , "VirtIO" , "VirtIO_SCSI" } ) ) ; org.mockito.Mockito.when ( org.ovirt.engine.core.bll.storage.disk.HotPlugDiskToVmCommandTest.osRepository.getDiskInterfaces ( org.mockito.Matchers.anyInt ( ) , org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Version.class ) ) ) . thenReturn ( diskInterfaces ) ; }

Target:
protected void mockInterfaceList ( ) { java.util.ArrayList < java.lang.String > diskInterfaces = new java.util.ArrayList < > ( java.util.Arrays.asList ( new java.lang.String [ ] { "IDE" , "VirtIO" , "VirtIO_SCSI" } ) ) ; org.mockito.Mockito.when ( org.ovirt.engine.core.bll.storage.disk.HotPlugDiskToVmCommandTest.osRepository.getDiskInterfaces ( org.mockito.Matchers.anyInt ( ) , org.mockito.Matchers.any ( ) ) ) . thenReturn ( diskInterfaces ) ; }
Source:
public void testGetEntityNameByIdAndTypeForVmTemplate ( ) { org.ovirt.engine.core.common.businessentities.VmTemplate vmTemplate = dbFacade.getVmTemplateDao ( ) . get ( org.ovirt.engine.core.dao.DbFacadeDAOTest.VM_TEMPLATE_ID ) ; org.junit.Assert.assertNotNull ( vmTemplate ) ; java.lang.String name = vmTemplate.getname ( ) ; org.junit.Assert.assertTrue ( name.equals ( dbFacade.getEntityNameByIdAndType ( org.ovirt.engine.core.dao.DbFacadeDAOTest.VM_TEMPLATE_ID , VdcObjectType.VmTemplate ) ) ) ; }

Target:
public void testGetEntityNameByIdAndTypeForVmTemplate ( ) { org.ovirt.engine.core.common.businessentities.VmTemplate vmTemplate = dbFacade.getVmTemplateDao ( ) . get ( org.ovirt.engine.core.dao.DbFacadeDAOTest.VM_TEMPLATE_ID ) ; org.junit.Assert.assertNotNull ( vmTemplate ) ; java.lang.String name = vmTemplate.getName ( ) ; org.junit.Assert.assertTrue ( name.equals ( dbFacade.getEntityNameByIdAndType ( org.ovirt.engine.core.dao.DbFacadeDAOTest.VM_TEMPLATE_ID , VdcObjectType.VmTemplate ) ) ) ; }
Source:
private org.ovirt.engine.core.dao.DbUserDAO initDataForClearTest ( java.lang.String key ) { org.ovirt.engine.core.dao.DbUserDAO dbUserDAOMcok = org.mockito.Mockito.mock ( org.ovirt.engine.core.dao.DbUserDAO.class ) ; org.mockito.Mockito.doReturn ( dbUserDAOMcok ) . when ( container ) . getDbUserDAO ( ) ; container.SetData ( org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_SESSION_ID , key , org.mockito.Mockito.mock ( org.ovirt.engine.core.common.interfaces.IVdcUser.class ) ) ; return dbUserDAOMcok ; }

Target:
private void initDataForClearTest ( java.lang.String key ) { container.SetData ( org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_SESSION_ID , key , org.mockito.Mockito.mock ( org.ovirt.engine.core.common.interfaces.IVdcUser.class ) ) ; }
Source:
protected void updateConsoleModel ( org.ovirt.engine.ui.uicommonweb.models.userportal.UserPortalItemModel item ) { super . updateConsoleModel ( item ) ; if ( ( item.getEntity ( ) ) != null ) { item.getDefaultConsole ( ) . setForceVmStatusUp ( false ) ; } }

Target:
protected void updateConsoleModel ( org.ovirt.engine.ui.uicommonweb.models.userportal.UserPortalItemModel item ) { super . updateConsoleModel ( item ) ; if ( ( ( item.getEntity ( ) ) != null ) && ( ( item.getDefaultConsole ( ) ) != null ) ) { item.getDefaultConsole ( ) . setForceVmStatusUp ( false ) ; } }
Source:
public static < T > org.ovirt.engine.ui.common.widget.editor.TakesConstrainedValueListEditor < T > ofList ( org.ovirt.engine.ui.common.widget.editor.TakesListValue < T > peer , com.google.gwt.user.client.ui.HasConstrainedValue < java.util.List < T > > peerWithConstraints , com.google.gwt.event.logical.shared.HasValueChangeHandlers < java.util.List < T > > peerWithValueChangeHandlers ) { return new org.ovirt.engine.ui.common.widget.editor.TakesConstrainedValueListEditor < T > ( peer , peerWithConstraints , peerWithValueChangeHandlers ) ; }

Target:
public static < T > org.ovirt.engine.ui.common.widget.editor.TakesConstrainedValueListEditor < T > ofList ( org.ovirt.engine.ui.common.widget.editor.TakesListValue < T > peer , com.google.gwt.user.client.ui.HasConstrainedValue < java.util.List < T > > peerWithConstraints , com.google.gwt.event.logical.shared.HasValueChangeHandlers < java.util.List < T > > peerWithValueChangeHandlers ) { return new org.ovirt.engine.ui.common.widget.editor.TakesConstrainedValueListEditor ( peer , peerWithConstraints , peerWithValueChangeHandlers ) ; }
Source:
public javax.ws.rs.core.Response add ( org.ovirt.engine.api.model.GlusterVolume volume ) { validateParameters ( volume , "name" , "volumeType" , "bricks" ) ; validateEnumParameters ( volume ) ; validateAccessControl ( volume ) ; org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity volumeEntity = getMapper ( org.ovirt.engine.api.model.GlusterVolume.class , org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity.class ) . map ( volume , null ) ; volumeEntity.setClusterId ( asGuid ( parent.get ( ) . getId ( ) ) ) ; mapBricks ( volume , volumeEntity ) ; return performCreation ( VdcActionType.CreateGlusterVolume , new org.ovirt.engine.core.common.action.gluster.CreateGlusterVolumeParameters ( volumeEntity ) , new org.ovirt.engine.api.restapi.resource.gluster.QueryIdResolver ( org.ovirt.engine.core.common.queries.VdcQueryType.GetGlusterVolumeById , org.ovirt.engine.core.common.queries.gluster.IdQueryParameters.class ) , true ) ; }

Target:
public javax.ws.rs.core.Response add ( org.ovirt.engine.api.model.GlusterVolume volume ) { validateParameters ( volume , "name" , "volumeType" , "bricks" ) ; validateEnumParameters ( volume ) ; org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity volumeEntity = getMapper ( org.ovirt.engine.api.model.GlusterVolume.class , org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity.class ) . map ( volume , null ) ; volumeEntity.setClusterId ( asGuid ( parent.get ( ) . getId ( ) ) ) ; mapBricks ( volume , volumeEntity ) ; return performCreation ( VdcActionType.CreateGlusterVolume , new org.ovirt.engine.core.common.action.gluster.CreateGlusterVolumeParameters ( volumeEntity ) , new org.ovirt.engine.api.restapi.resource.gluster.QueryIdResolver ( org.ovirt.engine.core.common.queries.VdcQueryType.GetGlusterVolumeById , org.ovirt.engine.core.common.queries.gluster.IdQueryParameters.class ) , true ) ; }
Source:
private boolean hostEmulationModeMatchesTheConfigValues ( org.ovirt.engine.core.common.businessentities.VDS vds ) { java.lang.String matchedEmulatedMachine = org.ovirt.engine.core.common.utils.ListUtils.firstMatch ( org.ovirt.engine.core.common.config.Config.< java.util.List < java.lang.String > > GetValue ( ConfigValues.ClusterEmulatedMachines , vds.getVdsGroupCompatibilityVersion ( ) . getValue ( ) ) , vds.getSupportedEmulatedMachines ( ) . split ( "," ) ) ; if ( ( matchedEmulatedMachine != null ) && ( ! ( matchedEmulatedMachine.isEmpty ( ) ) ) ) { setClusterEmulatedMachine ( vds , matchedEmulatedMachine ) ; return true ; } return false ; }

Target:
private boolean hostEmulationModeMatchesTheConfigValues ( org.ovirt.engine.core.common.businessentities.VDS vds ) { java.lang.String matchedEmulatedMachine = org.ovirt.engine.core.common.utils.ListUtils.firstMatch ( org.ovirt.engine.core.common.config.Config.< java.util.List < java.lang.String > > getValue ( ConfigValues.ClusterEmulatedMachines , vds.getVdsGroupCompatibilityVersion ( ) . getValue ( ) ) , vds.getSupportedEmulatedMachines ( ) . split ( "," ) ) ; if ( ( matchedEmulatedMachine != null ) && ( ! ( matchedEmulatedMachine.isEmpty ( ) ) ) ) { setClusterEmulatedMachine ( vds , matchedEmulatedMachine ) ; return true ; } return false ; }
Source:
private void verifyServiceOnServer2 ( org.ovirt.engine.core.common.businessentities.gluster.GlusterServerService service ) { org.junit.Assert.assertEquals ( org.ovirt.engine.core.dao.gluster.GlusterServerServiceDaoTest.SERVICE2_ID , service.getServiceId ( ) . toString ( ) ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.dao.gluster.GlusterServerServiceDaoTest.SERVICE2_NAME , service.getServiceName ( ) ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.dao.gluster.GlusterServerServiceDaoTest.SERVICE2_TYPE , service.getServiceType ( ) ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.dao.gluster.GlusterServerServiceDaoTest.PID_2 , service.getPid ( ) ) ; org.junit.Assert.assertEquals ( GlusterServiceStatus.STOPPED , service.getStatus ( ) ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.dao.gluster.GlusterServerServiceDaoTest.VDS_NAME2 , service.getHostName ( ) ) ; }

Target:
private void verifyServiceOnServer2 ( org.ovirt.engine.core.common.businessentities.gluster.GlusterServerService service ) { org.junit.Assert.assertEquals ( org.ovirt.engine.core.dao.gluster.GlusterServerServiceDaoTest.SERVICE2_ID , service.getServiceId ( ) ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.dao.gluster.GlusterServerServiceDaoTest.SERVICE2_NAME , service.getServiceName ( ) ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.dao.gluster.GlusterServerServiceDaoTest.SERVICE2_TYPE , service.getServiceType ( ) ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.dao.gluster.GlusterServerServiceDaoTest.PID_2 , service.getPid ( ) ) ; org.junit.Assert.assertEquals ( GlusterServiceStatus.STOPPED , service.getStatus ( ) ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.dao.gluster.GlusterServerServiceDaoTest.VDS_NAME2 , service.getHostName ( ) ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.VmDevice createVmDeviceForDisk ( org.ovirt.engine.core.common.businessentities.VM vm , org.ovirt.engine.core.common.businessentities.storage.Disk disk , org.ovirt.engine.core.compat.Guid snapshotId , boolean isPlugged ) { org.ovirt.engine.core.common.businessentities.VmDevice device = new org.ovirt.engine.core.common.businessentities.VmDevice ( ) ; device.setId ( new org.ovirt.engine.core.common.businessentities.VmDeviceId ( vm.getId ( ) , disk.getId ( ) ) ) ; device.setSnapshotId ( snapshotId ) ; device.setPlugged ( isPlugged ) ; return device ; }

Target:
private org.ovirt.engine.core.common.businessentities.VmDevice createVmDeviceForDisk ( org.ovirt.engine.core.common.businessentities.VM vm , org.ovirt.engine.core.common.businessentities.storage.Disk disk ) { org.ovirt.engine.core.common.businessentities.VmDevice device = new org.ovirt.engine.core.common.businessentities.VmDevice ( ) ; device.setId ( new org.ovirt.engine.core.common.businessentities.VmDeviceId ( vm.getId ( ) , disk.getId ( ) ) ) ; device.setSnapshotId ( null ) ; device.setPlugged ( true ) ; return device ; }
Source:
protected void analyze ( ) { proceedDownVms ( ) ; proceedWatchdogEvents ( ) ; proceedBalloonCheck ( ) ; proceedGuaranteedMemoryCheck ( ) ; updateRepository ( ) ; prepareGuestAgentNetworkDevicesForUpdate ( ) ; updateLunDisks ( ) ; updateVmJobs ( ) ; analyzeExternalVms ( ) ; analyzeHostedEngineVm ( ) ; if ( ( vmDynamicToSave ) != null ) { vmsMonitoring.addVmDynamicToList ( vmDynamicToSave ) ; } if ( saveVmInterfaces ) { vmsMonitoring.addVmInterfaceStatisticsToList ( dbVm.getInterfaces ( ) ) ; } }

Target:
protected void analyze ( ) { proceedDownVms ( ) ; proceedWatchdogEvents ( ) ; proceedBalloonCheck ( ) ; proceedGuaranteedMemoryCheck ( ) ; updateRepository ( ) ; prepareGuestAgentNetworkDevicesForUpdate ( ) ; updateLunDisks ( ) ; updateVmJobs ( ) ; analyzeExternalVms ( ) ; analyzeHostedEngineVm ( ) ; if ( ( vmDynamicToSave ) != null ) { vmsMonitoring.addVmDynamicToList ( vmDynamicToSave ) ; } }
Source:
protected org.ovirt.engine.ui.common.widget.table.SimpleActionTable < org.ovirt.engine.ui.uicommonweb.models.userportal.UserPortalItemModel > createActionTable ( ) { return new org.ovirt.engine.ui.userportal.widget.table.UserPortalSimpleActionTable < org.ovirt.engine.ui.uicommonweb.models.userportal.UserPortalItemModel > ( modelProvider , getTableResources ( ) , org.ovirt.engine.ui.userportal.gin.ClientGinjectorProvider.getEventBus ( ) , org.ovirt.engine.ui.userportal.gin.ClientGinjectorProvider.getClientStorage ( ) , new org.ovirt.engine.ui.userportal.widget.refresh.UserPortalRefreshManager ( modelProvider , org.ovirt.engine.ui.userportal.gin.ClientGinjectorProvider.getEventBus ( ) , org.ovirt.engine.ui.userportal.gin.ClientGinjectorProvider.getClientStorage ( ) ) ) ; }

Target:
protected org.ovirt.engine.ui.common.widget.table.SimpleActionTable < org.ovirt.engine.ui.uicommonweb.models.userportal.UserPortalItemModel > createActionTable ( ) { return new org.ovirt.engine.ui.userportal.widget.table.UserPortalSimpleActionTable ( modelProvider , getTableResources ( ) , org.ovirt.engine.ui.userportal.gin.ClientGinjectorProvider.getEventBus ( ) , org.ovirt.engine.ui.userportal.gin.ClientGinjectorProvider.getClientStorage ( ) , new org.ovirt.engine.ui.userportal.widget.refresh.UserPortalRefreshManager ( modelProvider , org.ovirt.engine.ui.userportal.gin.ClientGinjectorProvider.getEventBus ( ) , org.ovirt.engine.ui.userportal.gin.ClientGinjectorProvider.getClientStorage ( ) ) ) ; }
Source:
private org.springframework.jdbc.core.namedparam.MapSqlParameterSource getClusterPolicyUnitParameterMap ( org.ovirt.engine.core.dao.scheduling.ClusterPolicyDaoImpl.ClusterPolicyUnit clusterPolicyUnit ) { return getCustomMapSqlParameterSource ( ) . addValue ( "cluster_policy_id" , clusterPolicyUnit.getClusterPolicyId ( ) ) . addValue ( "policy_unit_id" , clusterPolicyUnit.getPolicyUnitId ( ) ) . addValue ( "is_filter_selected" , clusterPolicyUnit.isFilterSelected ( ) ) . addValue ( "filter_sequence" , clusterPolicyUnit.getFilterSequence ( ) ) . addValue ( "is_function_selected" , clusterPolicyUnit.isFunctionSelected ( ) ) . addValue ( "factor" , clusterPolicyUnit.getFactor ( ) ) . addValue ( "is_balance_selected" , clusterPolicyUnit.isBalanceSelected ( ) ) ; }

Target:
private org.springframework.jdbc.core.namedparam.MapSqlParameterSource getClusterPolicyUnitParameterMap ( org.ovirt.engine.core.dao.scheduling.ClusterPolicyDaoImpl.ClusterPolicyUnit clusterPolicyUnit ) { return getCustomMapSqlParameterSource ( ) . addValue ( "cluster_policy_id" , clusterPolicyUnit.getClusterPolicyId ( ) ) . addValue ( "policy_unit_id" , clusterPolicyUnit.getPolicyUnitId ( ) ) . addValue ( "filter_sequence" , clusterPolicyUnit.getFilterSequence ( ) ) . addValue ( "factor" , clusterPolicyUnit.getFactor ( ) ) ; }
Source:
public org.ovirt.engine.ui.common.presenter.AbstractModelBoundPopupPresenterWidget < ? extends org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel , ? > getConfirmModelPopup ( org.ovirt.engine.ui.uicommonweb.models.hosts.HostInterfaceListModel source , org.ovirt.engine.ui.uicommonweb.UICommand lastExecutedCommand ) { if ( "OnEditManagementNetworkConfirmation" . equals ( lastExecutedCommand.getName ( ) ) ) { return hostManagementConfirmationdetachConfirmPopupProvider.get ( ) ; } return super . getConfirmModelPopup ( source , lastExecutedCommand ) ; }

Target:
public org.ovirt.engine.ui.common.presenter.AbstractModelBoundPopupPresenterWidget < ? extends org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel , ? > getConfirmModelPopup ( org.ovirt.engine.ui.uicommonweb.models.hosts.HostInterfaceListModel source , org.ovirt.engine.ui.uicommonweb.UICommand lastExecutedCommand ) { return super . getConfirmModelPopup ( source , lastExecutedCommand ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.StorageDomain updateStorageDomainInMemoryVolumes ( java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > disksList ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > memoryDisksList = org.ovirt.engine.core.bll.memory.MemoryUtils.createDiskDummies ( getVm ( ) . getTotalMemorySizeInBytes ( ) , MemoryUtils.META_DATA_SIZE_IN_BYTES ) ; org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain = org.ovirt.engine.core.bll.memory.MemoryStorageHandler.getInstance ( ) . findStorageDomainForMemory ( getParameters ( ) . getStoragePoolId ( ) , memoryDisksList , getVmDisksDummies ( ) ) ; disksList.addAll ( memoryDisksList ) ; return storageDomain ; }

Target:
private org.ovirt.engine.core.common.businessentities.StorageDomain updateStorageDomainInMemoryVolumes ( java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > disksList ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > memoryDisksList = org.ovirt.engine.core.bll.memory.MemoryUtils.createDiskDummies ( getVm ( ) . getTotalMemorySizeInBytes ( ) , MemoryUtils.META_DATA_SIZE_IN_BYTES ) ; org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain = org.ovirt.engine.core.bll.memory.MemoryStorageHandler.getInstance ( ) . findStorageDomainForMemory ( getParameters ( ) . getStoragePoolId ( ) , memoryDisksList , getVmDisksDummies ( ) , getVm ( ) ) ; disksList.addAll ( memoryDisksList ) ; return storageDomain ; }
Source:
private org.ovirt.engine.core.common.businessentities.network.NetworkAttachment createNetworkAttachmentWithIpConfiguration ( org.ovirt.engine.core.common.businessentities.network.NetworkBootProtocol bootProtocol , java.lang.String address , java.lang.String netmask ) { org.ovirt.engine.core.common.businessentities.network.IpConfiguration ipConfiguration = new org.ovirt.engine.core.common.businessentities.network.IpConfiguration ( ) ; org.ovirt.engine.core.common.businessentities.network.IPv4Address primaryAddress = new org.ovirt.engine.core.common.businessentities.network.IPv4Address ( ) ; primaryAddress.setAddress ( address ) ; primaryAddress.setNetmask ( netmask ) ; ipConfiguration.getIPv4Addresses ( ) . add ( primaryAddress ) ; ipConfiguration.setBootProtocol ( bootProtocol ) ; org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment = new org.ovirt.engine.core.common.businessentities.network.NetworkAttachment ( ) ; attachment.setIpConfiguration ( ipConfiguration ) ; return attachment ; }

Target:
private org.ovirt.engine.core.common.businessentities.network.NetworkAttachment createNetworkAttachmentWithIpConfiguration ( org.ovirt.engine.core.common.businessentities.network.NetworkBootProtocol bootProtocol , java.lang.String address , java.lang.String netmask ) { org.ovirt.engine.core.common.businessentities.network.IpConfiguration ipConfiguration = new org.ovirt.engine.core.common.businessentities.network.IpConfiguration ( ) ; org.ovirt.engine.core.common.businessentities.network.IPv4Address primaryAddress = new org.ovirt.engine.core.common.businessentities.network.IPv4Address ( ) ; primaryAddress.setAddress ( address ) ; primaryAddress.setNetmask ( netmask ) ; primaryAddress.setBootProtocol ( bootProtocol ) ; ipConfiguration.getIPv4Addresses ( ) . add ( primaryAddress ) ; org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment = new org.ovirt.engine.core.common.businessentities.network.NetworkAttachment ( ) ; attachment.setIpConfiguration ( ipConfiguration ) ; return attachment ; }
Source:
public static boolean CanUpdateField ( java.lang.Class objectType , java.lang.String fieldName , java.lang.Enum status , java.lang.Object fieldContainer ) { org.ovirt.engine.core.utils.ObjectIdentityChecker checker = null ; if ( ( checker = org.ovirt.engine.core.utils.ObjectIdentityChecker.mIdentities.get ( objectType ) ) != null ) { return checker.IsFieldUpdatable ( status , fieldName , fieldContainer ) ; } return true ; }

Target:
public static boolean CanUpdateField ( java.lang.Class < ? > objectType , java.lang.String fieldName , java.lang.Enum < ? > status , java.lang.Object fieldContainer ) { org.ovirt.engine.core.utils.ObjectIdentityChecker checker = null ; if ( ( checker = org.ovirt.engine.core.utils.ObjectIdentityChecker.mIdentities.get ( objectType ) ) != null ) { return checker.IsFieldUpdatable ( status , fieldName , fieldContainer ) ; } return true ; }
Source:
private org.ovirt.engine.core.compat.Guid getVmToAttach ( org.ovirt.engine.core.compat.Guid poolId ) { if ( ( vmToAttach ) == null ) { org.ovirt.engine.core.compat.Guid vmGuid = getPrestartedVmToAttach ( poolId ) ; if ( ( vmGuid == null ) || ( Guid.Empty.equals ( vmGuid ) ) ) { vmGuid = getNonPrestartedVmToAttach ( poolId ) ; } vmToAttach = vmGuid ; } return vmToAttach ; }

Target:
private org.ovirt.engine.core.compat.Guid getVmToAttach ( ) { if ( ( vmToAttach ) == null ) { org.ovirt.engine.core.compat.Guid vmGuid = getPrestartedVmToAttach ( ) ; if ( Guid.Empty.equals ( vmGuid ) ) { vmGuid = getNonPrestartedVmToAttach ( ) ; } vmToAttach = vmGuid ; } return vmToAttach ; }
Source:
public void edit ( final org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel object ) { driver.edit ( object ) ; object.getLatch ( ) . setIsAvailable ( true ) ; object.getItemsChangedEvent ( ) . addListener ( new org.ovirt.engine.ui.uicompat.IEventListener ( ) { @ java.lang.Override public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { updateDescription ( object ) ; } } ) ; }

Target:
public void edit ( final org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel object ) { driver.edit ( object ) ; object.getLatch ( ) . setIsAvailable ( true ) ; object.getItemsChangedEvent ( ) . addListener ( new org.ovirt.engine.ui.uicompat.IEventListener < org.ovirt.engine.ui.uicompat.EventArgs > ( ) { @ java.lang.Override public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < ? extends org.ovirt.engine.ui.uicompat.EventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { updateDescription ( object ) ; } } ) ; }
Source:
public static org.ovirt.engine.api.model.PermitType valueOf ( org.ovirt.engine.core.common.businessentities.ActionGroup actionGroup ) { for ( org.ovirt.engine.api.model.PermitType permitType : org.ovirt.engine.api.model.PermitType.values ( ) ) { if ( permitType.getActionGroup ( ) . equals ( actionGroup ) ) { return permitType ; } } throw new java.lang.IllegalArgumentException ( ( ( ( ( "No enum constant for actionGroup '" + ( actionGroup.name ( ) ) ) + "' in " ) + ( org.ovirt.engine.api.model.PermitType.class . getName ( ) ) ) + " enum." ) ) ; }

Target:
public static org.ovirt.engine.api.model.PermitType valueOf ( org.ovirt.engine.core.common.businessentities.ActionGroup actionGroup ) { for ( org.ovirt.engine.api.model.PermitType permitType : org.ovirt.engine.api.model.PermitType.values ( ) ) { if ( actionGroup.equals ( permitType.getActionGroup ( ) ) ) { return permitType ; } } throw new java.lang.IllegalArgumentException ( ( ( ( ( "No enum constant for actionGroup '" + ( actionGroup.name ( ) ) ) + "' in " ) + ( org.ovirt.engine.api.model.PermitType.class . getName ( ) ) ) + " enum." ) ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.VdsNetworkInterface findInterfaceByName ( java.lang.String name ) { for ( org.ovirt.engine.core.common.businessentities.VdsNetworkInterface iface : org.ovirt.engine.core.vdsbroker.vdsbroker.SetupNetworksVDSCommand.getParameters ( ) . getInterfaces ( ) ) { if ( name.equals ( iface.getName ( ) ) ) { return iface ; } } return null ; }

Target:
private org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface findInterfaceByName ( java.lang.String name ) { for ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface : org.ovirt.engine.core.vdsbroker.vdsbroker.SetupNetworksVDSCommand.getParameters ( ) . getInterfaces ( ) ) { if ( name.equals ( iface.getName ( ) ) ) { return iface ; } } return null ; }
Source:
public void createObjects ( ) { existingServer1 = createServer ( org.ovirt.engine.core.bll.gluster.GlusterSyncJobTest.SERVER_ID_1 , org.ovirt.engine.core.bll.gluster.GlusterSyncJobTest.SERVER_NAME_1 ) ; existingServer2 = createServer ( org.ovirt.engine.core.bll.gluster.GlusterSyncJobTest.SERVER_ID_2 , org.ovirt.engine.core.bll.gluster.GlusterSyncJobTest.SERVER_NAME_2 ) ; existingServers.add ( existingServer1 ) ; existingServers.add ( existingServer2 ) ; existingServers.add ( createServer ( org.ovirt.engine.core.bll.gluster.GlusterSyncJobTest.SERVER_ID_3 , org.ovirt.engine.core.bll.gluster.GlusterSyncJobTest.SERVER_NAME_3 ) ) ; existingDistVol = createDistVol ( org.ovirt.engine.core.bll.gluster.GlusterSyncJobTest.DIST_VOL_NAME , org.ovirt.engine.core.bll.gluster.GlusterSyncJobTest.EXISTING_VOL_DIST_ID ) ; existingReplVol = createReplVol ( ) ; }

Target:
private void createObjects ( org.ovirt.engine.core.compat.Version version ) { existingServer1 = createServer ( org.ovirt.engine.core.bll.gluster.GlusterSyncJobTest.SERVER_ID_1 , org.ovirt.engine.core.bll.gluster.GlusterSyncJobTest.SERVER_NAME_1 , version ) ; existingServer2 = createServer ( org.ovirt.engine.core.bll.gluster.GlusterSyncJobTest.SERVER_ID_2 , org.ovirt.engine.core.bll.gluster.GlusterSyncJobTest.SERVER_NAME_2 , version ) ; existingServers.add ( existingServer1 ) ; existingServers.add ( existingServer2 ) ; existingServers.add ( createServer ( org.ovirt.engine.core.bll.gluster.GlusterSyncJobTest.SERVER_ID_3 , org.ovirt.engine.core.bll.gluster.GlusterSyncJobTest.SERVER_NAME_3 , version ) ) ; existingDistVol = createDistVol ( org.ovirt.engine.core.bll.gluster.GlusterSyncJobTest.DIST_VOL_NAME , org.ovirt.engine.core.bll.gluster.GlusterSyncJobTest.EXISTING_VOL_DIST_ID ) ; existingReplVol = createReplVol ( ) ; }
Source:
public static void addDiskImage ( org.ovirt.engine.core.common.businessentities.storage.DiskImage image , boolean active , org.ovirt.engine.core.common.businessentities.storage.ImageStorageDomainMap imageStorageDomainMap , org.ovirt.engine.core.compat.Guid vmId ) { try { org.ovirt.engine.core.bll.storage.disk.image.ImagesHandler.addImage ( image , active , imageStorageDomainMap ) ; org.ovirt.engine.core.bll.storage.disk.image.ImagesHandler.addDiskToVmIfNotExists ( image , vmId ) ; } catch ( java.lang.RuntimeException ex ) { org.ovirt.engine.core.bll.storage.disk.image.ImagesHandler.log.error ( "Failed adding new disk image and related entities to db: {}" , ex.getMessage ( ) ) ; org.ovirt.engine.core.bll.storage.disk.image.ImagesHandler.log.debug ( "Exception" , ex ) ; throw new org.ovirt.engine.core.common.errors.EngineException ( org.ovirt.engine.core.common.errors.EngineError.DB , ex ) ; } }

Target:
public void addDiskImage ( org.ovirt.engine.core.common.businessentities.storage.DiskImage image , boolean active , org.ovirt.engine.core.common.businessentities.storage.ImageStorageDomainMap imageStorageDomainMap , org.ovirt.engine.core.compat.Guid vmId ) { try { addImage ( image , active , imageStorageDomainMap ) ; addDiskToVmIfNotExists ( image , vmId ) ; } catch ( java.lang.RuntimeException ex ) { org.ovirt.engine.core.bll.storage.disk.image.ImagesHandler.log.error ( "Failed adding new disk image and related entities to db: {}" , ex.getMessage ( ) ) ; org.ovirt.engine.core.bll.storage.disk.image.ImagesHandler.log.debug ( "Exception" , ex ) ; throw new org.ovirt.engine.core.common.errors.EngineException ( org.ovirt.engine.core.common.errors.EngineError.DB , ex ) ; } }
Source:
public static void GetGlusterVolumeBrickDetails ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId , java.lang.String volume , java.lang.String brick ) { 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 ) { return source ; } } ; org.ovirt.engine.core.common.queries.gluster.GlusterVolumeAdvancedDetailsParameters parameters = new org.ovirt.engine.core.common.queries.gluster.GlusterVolumeAdvancedDetailsParameters ( clusterId , volume , brick , true ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetGlusterVolumeAdvancedDetails , parameters , aQuery ) ; }

Target:
public static void GetGlusterVolumeBrickDetails ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId , java.lang.String volume , java.lang.String brick ) { org.ovirt.engine.core.common.queries.gluster.GlusterVolumeAdvancedDetailsParameters parameters = new org.ovirt.engine.core.common.queries.gluster.GlusterVolumeAdvancedDetailsParameters ( clusterId , volume , brick , true ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetGlusterVolumeAdvancedDetails , parameters , aQuery ) ; }
Source:
protected void mockBackendStatusChange ( boolean succeeded , org.ovirt.engine.core.common.errors.EngineError errorCode ) { org.ovirt.engine.core.common.vdscommands.VDSReturnValue vdsReturnValue = new org.ovirt.engine.core.common.vdscommands.VDSReturnValue ( ) ; vdsReturnValue.setReturnValue ( succeeded ) ; vdsReturnValue.setSucceeded ( succeeded ) ; if ( ! succeeded ) { vdsReturnValue.setVdsError ( new org.ovirt.engine.core.common.errors.VDSError ( errorCode , "" ) ) ; } org.mockito.Mockito.when ( vdsBrokerFrontend.runVdsCommand ( org.ovirt.engine.core.bll.gluster.GlusterHookCommandTest.any ( org.ovirt.engine.core.common.vdscommands.VDSCommandType.class ) , org.ovirt.engine.core.bll.gluster.GlusterHookCommandTest.any ( org.ovirt.engine.core.common.vdscommands.VDSParametersBase.class ) ) ) . thenReturn ( vdsReturnValue ) ; }

Target:
protected void mockBackendStatusChange ( boolean succeeded , org.ovirt.engine.core.common.errors.EngineError errorCode ) { org.ovirt.engine.core.common.vdscommands.VDSReturnValue vdsReturnValue = new org.ovirt.engine.core.common.vdscommands.VDSReturnValue ( ) ; vdsReturnValue.setReturnValue ( succeeded ) ; vdsReturnValue.setSucceeded ( succeeded ) ; if ( ! succeeded ) { vdsReturnValue.setVdsError ( new org.ovirt.engine.core.common.errors.VDSError ( errorCode , "" ) ) ; } org.mockito.Mockito.when ( vdsBrokerFrontend.runVdsCommand ( org.ovirt.engine.core.bll.gluster.GlusterHookCommandTest.any ( ) , org.ovirt.engine.core.bll.gluster.GlusterHookCommandTest.any ( ) ) ) . thenReturn ( vdsReturnValue ) ; }
Source:
public void setup ( ) { tagsDirector = org.mockito.Mockito.spy ( org.ovirt.engine.core.bll.TagsDirector.getInstance ( ) ) ; org.mockito.Mockito.when ( tagDao.getAllForParent ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( java.util.Collections.emptyList ( ) ) ; org.mockito.Mockito.doReturn ( tagDao ) . when ( tagsDirector ) . getTagDao ( ) ; org.mockito.Mockito.doNothing ( ) . when ( tagsDirector ) . updateTagInBackend ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.Tags.class ) ) ; tagsDirector.init ( ) ; }

Target:
public void setup ( ) { org.mockito.Mockito.when ( tagDao.getAllForParent ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( java.util.Collections.emptyList ( ) ) ; org.mockito.Mockito.doReturn ( tagDao ) . when ( tagsDirector ) . getTagDao ( ) ; org.mockito.Mockito.doNothing ( ) . when ( tagsDirector ) . updateTagInBackend ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.Tags.class ) ) ; tagsDirector.init ( ) ; }
Source:
public static org.ovirt.engine.api.restapi.DeprecatedVersionInfo parse ( java.lang.String specification ) { java.util.regex.Matcher matcher = org.ovirt.engine.api.restapi.DeprecatedVersionInfo.VERSION_RE.matcher ( specification ) ; if ( ! ( matcher.matches ( ) ) ) { org.ovirt.engine.api.restapi.DeprecatedVersionInfo.log.error ( ( "The deprecated version specification \"{}\" doesn\'t match the expected regular expression \"{}\", " + "will return null." ) , specification , org.ovirt.engine.api.restapi.DeprecatedVersionInfo.VERSION_RE.pattern ( ) ) ; return null ; } java.lang.String version = matcher.group ( org.ovirt.engine.api.restapi.DeprecatedVersionInfo.VERSION_GROUP ) ; java.lang.String deprecating = matcher.group ( org.ovirt.engine.api.restapi.DeprecatedVersionInfo.DEPRECATING_GROUP ) ; java.lang.String removing = matcher.group ( org.ovirt.engine.api.restapi.DeprecatedVersionInfo.REMOVING_GROUP ) ; return new org.ovirt.engine.api.restapi.DeprecatedVersionInfo ( version , deprecating , removing ) ; }

Target:
public static org.ovirt.engine.api.restapi.DeprecatedVersionInfo parse ( java.lang.String specification ) { java.util.regex.Matcher matcher = org.ovirt.engine.api.restapi.DeprecatedVersionInfo.VERSION_RE.matcher ( specification ) ; if ( ! ( matcher.matches ( ) ) ) { org.ovirt.engine.api.restapi.DeprecatedVersionInfo.log.error ( ( "The deprecated version specification \"{}\" doesn\'t match the expected regular expression \"{}\", " + "will return null." ) , specification , org.ovirt.engine.api.restapi.DeprecatedVersionInfo.VERSION_RE ) ; return null ; } java.lang.String version = matcher.group ( org.ovirt.engine.api.restapi.DeprecatedVersionInfo.VERSION_GROUP ) ; java.lang.String deprecating = matcher.group ( org.ovirt.engine.api.restapi.DeprecatedVersionInfo.DEPRECATING_GROUP ) ; java.lang.String removing = matcher.group ( org.ovirt.engine.api.restapi.DeprecatedVersionInfo.REMOVING_GROUP ) ; return new org.ovirt.engine.api.restapi.DeprecatedVersionInfo ( version , deprecating , removing ) ; }
Source:
public void testNoDiskBootFromIsoDomain ( ) { org.ovirt.engine.core.common.businessentities.VM vm = new org.ovirt.engine.core.common.businessentities.VM ( ) ; vm.setBootSequence ( BootSequence.CD ) ; org.ovirt.engine.core.bll.validator.RunVmValidatorTest.validateResult ( runVmValidator.validateBootSequence ( vm , new java.util.ArrayList < > ( ) , org.ovirt.engine.core.compat.Guid.newGuid ( ) ) , true , null ) ; }

Target:
public void testNoDiskBootFromIsoDomain ( ) { org.ovirt.engine.core.common.businessentities.VM vm = new org.ovirt.engine.core.common.businessentities.VM ( ) ; vm.setBootSequence ( BootSequence.CD ) ; org.ovirt.engine.core.bll.validator.RunVmValidatorTest.validateResult ( runVmValidator.validateBootSequence ( vm , new java.util.ArrayList < > ( ) ) , true , null ) ; }
Source:
public boolean equals ( java.lang.Object o ) { if ( ( this ) == o ) { return true ; } if ( ( o == null ) || ( ( getClass ( ) ) != ( o.getClass ( ) ) ) ) { return false ; } org.ovirt.engine.core.bll.scheduling.pending.PendingVM that = ( ( org.ovirt.engine.core.bll.scheduling.pending.PendingVM ) ( o ) ) ; return vm.equals ( that.vm ) ; }

Target:
public boolean equals ( java.lang.Object o ) { if ( ( this ) == o ) { return true ; } if ( ( o == null ) || ( ( getClass ( ) ) != ( o.getClass ( ) ) ) ) { return false ; } org.ovirt.engine.core.bll.scheduling.pending.PendingVM that = ( ( org.ovirt.engine.core.bll.scheduling.pending.PendingVM ) ( o ) ) ; return getVm ( ) . equals ( that.getVm ( ) ) ; }
Source:
private static void addUsbSlots ( org.ovirt.engine.core.common.businessentities.VmBase vm , int numOfSlots ) { for ( int index = 1 ; index <= numOfSlots ; index ++ ) { org.ovirt.engine.core.bll.utils.VmDeviceUtils.addManagedDevice ( new org.ovirt.engine.core.common.businessentities.VmDeviceId ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) , vm.getId ( ) ) , VmDeviceGeneralType.CHANNEL , VmDeviceType.SPICEVMC , org.ovirt.engine.core.bll.utils.VmDeviceUtils.getUsbSlotSpecParams ( ) , true , false ) ; } }

Target:
private static void addUsbSlots ( org.ovirt.engine.core.common.businessentities.VmBase vm , int numOfSlots ) { for ( int index = 1 ; index <= numOfSlots ; index ++ ) { org.ovirt.engine.core.bll.utils.VmDeviceUtils.addManagedDevice ( new org.ovirt.engine.core.common.businessentities.VmDeviceId ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) , vm.getId ( ) ) , VmDeviceGeneralType.CHANNEL , VmDeviceType.SPICEVMC , org.ovirt.engine.core.bll.utils.VmDeviceUtils.getUsbSlotSpecParams ( ) , true , false , null ) ; } }
Source:
void setColumnWidth ( com.google.gwt.user.cellview.client.Column < T , ? > column , java.lang.String width ) { table.setColumnWidth ( column , width ) ; tableHeader.setColumnWidth ( column , width ) ; int columnIndex = table.getColumnIndex ( column ) ; for ( com.google.gwt.dom.client.TableCellElement cell : getTableBodyCells ( columnIndex ) ) { cell.getStyle ( ) . setProperty ( "width" , width ) ; } for ( com.google.gwt.dom.client.TableCellElement cell : getTableHeaderCells ( columnIndex ) ) { cell.getStyle ( ) . setProperty ( "width" , width ) ; } }

Target:
void setColumnWidth ( com.google.gwt.user.cellview.client.Column < T , ? > column , java.lang.String width ) { table.setColumnWidth ( column , width ) ; tableHeader.setColumnWidth ( column , width ) ; }
Source:
private boolean shouldVdsBeReinstalled ( ) { org.ovirt.engine.core.common.businessentities.VdsStatic vdsStatic = org.ovirt.engine.core.bll.hostdeploy.UpdateVdsCommand.getParameters ( ) . getVdsStaticData ( ) ; org.ovirt.engine.core.common.businessentities.VdsStatic oldVdsStatic = oldHost.getStaticData ( ) ; return ( ( vdsStatic.isReinstallRequired ( ) ) || ( ( vdsStatic.isPmKdumpDetection ( ) ) && ( ! ( oldVdsStatic.isPmKdumpDetection ( ) ) ) ) ) || ( ! ( java.util.Objects.equals ( vdsStatic.getCurrentKernelCmdline ( ) , oldVdsStatic.getCurrentKernelCmdline ( ) ) ) ) ; }

Target:
private boolean shouldVdsBeReinstalled ( ) { org.ovirt.engine.core.common.businessentities.VdsStatic vdsStatic = org.ovirt.engine.core.bll.hostdeploy.UpdateVdsCommand.getParameters ( ) . getVdsStaticData ( ) ; org.ovirt.engine.core.common.businessentities.VdsStatic oldVdsStatic = oldHost.getStaticData ( ) ; return ( ( vdsStatic.isReinstallRequired ( ) ) || ( ! ( java.util.Objects.equals ( vdsStatic.isPmKdumpDetection ( ) , oldVdsStatic.isPmKdumpDetection ( ) ) ) ) ) || ( ! ( java.util.Objects.equals ( vdsStatic.getCurrentKernelCmdline ( ) , oldVdsStatic.getCurrentKernelCmdline ( ) ) ) ) ; }
Source:
private void runAction ( org.ovirt.engine.core.common.action.VdcActionType action , org.ovirt.engine.core.common.action.VdcActionParametersBase param ) { if ( ( getConfirmWindow ( ) ) == null ) { return ; } final org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel ) ( getConfirmWindow ( ) ) ) ; model.startProgress ( null ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runAction ( action , param , new org.ovirt.engine.ui.uicompat.IFrontendActionAsyncCallback ( ) { @ java.lang.Override public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { model.stopProgress ( ) ; setConfirmWindow ( null ) ; } } ) ; }

Target:
private void runAction ( org.ovirt.engine.core.common.action.VdcActionType action , org.ovirt.engine.core.common.action.VdcActionParametersBase param ) { if ( ( getConfirmWindow ( ) ) == null ) { return ; } final org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel ) ( getConfirmWindow ( ) ) ) ; model.startProgress ( ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runAction ( action , param , new org.ovirt.engine.ui.uicompat.IFrontendActionAsyncCallback ( ) { @ java.lang.Override public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { model.stopProgress ( ) ; setConfirmWindow ( null ) ; } } ) ; }
Source:
private void mockDaoForQuery ( ) { org.mockito.Mockito.when ( getDbFacadeMockInstance ( ) . getPermissionDao ( ) ) . thenReturn ( permissionDao ) ; returnedPermissions = new java.util.ArrayList < > ( ) ; org.ovirt.engine.core.common.businessentities.Permission permissions = new org.ovirt.engine.core.common.businessentities.Permission ( ) ; returnedPermissions.add ( permissions ) ; org.mockito.Mockito.when ( getQueryParameters ( ) . getId ( ) ) . thenReturn ( quotaId ) ; org.mockito.Mockito.when ( permissionDao.getConsumedPermissionsForQuotaId ( quotaId ) ) . thenReturn ( returnedPermissions ) ; }

Target:
private void mockDaoForQuery ( ) { returnedPermissions = new java.util.ArrayList < > ( ) ; org.ovirt.engine.core.common.businessentities.Permission permissions = new org.ovirt.engine.core.common.businessentities.Permission ( ) ; returnedPermissions.add ( permissions ) ; org.mockito.Mockito.when ( getQueryParameters ( ) . getId ( ) ) . thenReturn ( quotaId ) ; org.mockito.Mockito.when ( permissionDao.getConsumedPermissionsForQuotaId ( quotaId ) ) . thenReturn ( returnedPermissions ) ; }
Source:
public void validateFailsForNoStorageDevice ( ) { cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.gluster.CreateBrickCommand ( new org.ovirt.engine.core.common.action.gluster.CreateBrickParameters ( HOST_ID , "brick1" , "/gluster-bricks/brick1" , org.ovirt.engine.core.common.businessentities.RaidType.RAID0 , null , null , java.util.Collections.emptyList ( ) ) , null ) ) ; prepareMocks ( cmd , VDSStatus.Up ) ; org.junit.Assert.assertFalse ( cmd.validate ( ) ) ; }

Target:
public void validateFailsForNoStorageDevice ( ) { cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.gluster.CreateBrickCommand ( new org.ovirt.engine.core.common.action.gluster.CreateBrickParameters ( HOST_ID , "brick1" , "/gluster-bricks/brick1" , org.ovirt.engine.core.common.businessentities.RaidType.RAID0 , null , null , java.util.Collections.emptyList ( ) ) , null ) ) ; prepareMocks ( VDSStatus.Up ) ; org.junit.Assert.assertFalse ( cmd.validate ( ) ) ; }
Source:
public void onClick ( com.google.gwt.event.dom.client.ClickEvent event ) { disk.getIsInternal ( ) . setEntity ( true ) ; if ( ( ( java.lang.Boolean ) ( disk.getAttachDisk ( ) . getEntity ( ) ) ) ) { revealDiskPanel ( disk ) ; } else { externalDiskPanel.setVisible ( false ) ; } }

Target:
public void onClick ( com.google.gwt.event.dom.client.ClickEvent event ) { disk.getIsInternal ( ) . setEntity ( true ) ; revealDiskPanel ( disk ) ; }
Source:
public org.ovirt.engine.api.model.IscsiBond update ( org.ovirt.engine.api.model.IscsiBond iscsiBond ) { return performUpdate ( iscsiBond , new org.ovirt.engine.api.restapi.resource.QueryIdResolver < org.ovirt.engine.core.compat.Guid > ( org.ovirt.engine.core.common.queries.VdcQueryType.GetIscsiBondById , org.ovirt.engine.core.common.queries.IdQueryParameters.class ) , VdcActionType.EditIscsiBond , new org.ovirt.engine.api.restapi.resource.ParametersProvider < org.ovirt.engine.api.model.IscsiBond , org.ovirt.engine.api.model.IscsiBond > ( ) { @ java.lang.Override public org.ovirt.engine.core.common.action.VdcActionParametersBase getParameters ( org.ovirt.engine.api.model.IscsiBond incoming , org.ovirt.engine.api.model.IscsiBond entity ) { return new org.ovirt.engine.core.common.action.EditIscsiBondParameters ( getMapper ( modelType , org.ovirt.engine.api.model.IscsiBond.class ) . map ( incoming , entity ) ) ; } } ) ; }

Target:
public org.ovirt.engine.api.model.IscsiBond update ( org.ovirt.engine.api.model.IscsiBond iscsiBond ) { return performUpdate ( iscsiBond , new org.ovirt.engine.api.restapi.resource.QueryIdResolver ( org.ovirt.engine.core.common.queries.VdcQueryType.GetIscsiBondById , org.ovirt.engine.core.common.queries.IdQueryParameters.class ) , VdcActionType.EditIscsiBond , new org.ovirt.engine.api.restapi.resource.ParametersProvider < org.ovirt.engine.api.model.IscsiBond , org.ovirt.engine.api.model.IscsiBond > ( ) { @ java.lang.Override public org.ovirt.engine.core.common.action.VdcActionParametersBase getParameters ( org.ovirt.engine.api.model.IscsiBond incoming , org.ovirt.engine.api.model.IscsiBond entity ) { return new org.ovirt.engine.core.common.action.EditIscsiBondParameters ( getMapper ( modelType , org.ovirt.engine.api.model.IscsiBond.class ) . map ( incoming , entity ) ) ; } } ) ; }