auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void OnSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel ) ( target ) ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage_pool > list = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage_pool > ( ) ; for ( org.ovirt.engine.core.common.businessentities.storage_pool a : ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage_pool > ) ( returnValue ) ) ) { if ( ( a.getstatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.StoragePoolStatus.Up ) ) { list.add ( a ) ; } } model.SetDataCenter ( model , list ) ; }

Target:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel ) ( target ) ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage_pool > list = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage_pool > ( ) ; for ( org.ovirt.engine.core.common.businessentities.storage_pool a : ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage_pool > ) ( returnValue ) ) ) { if ( ( a.getstatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.StoragePoolStatus.Up ) ) { list.add ( a ) ; } } model.SetDataCenter ( model , list ) ; }
Source:
public void clearVdsFromCache ( org.ovirt.engine.core.compat.Guid vdsId , java.lang.String vdsName ) { org.ovirt.engine.core.vdsbroker.irsbroker.IrsBrokerCommand.log.infoFormat ( "Clearing cache of pool: {0} for problematic entities of VDS: {1}." , _storagePoolId , vdsName ) ; synchronized ( _lockObject ) { if ( _vdssInProblem.containsKey ( vdsId ) ) { for ( org.ovirt.engine.core.compat.Guid domainId : new java.util.HashSet < org.ovirt.engine.core.compat.Guid > ( _vdssInProblem.get ( vdsId ) ) ) { DomainRecoveredFromProblem ( domainId , vdsId , vdsName ) ; } } } }

Target:
public void clearVdsFromCache ( org.ovirt.engine.core.compat.Guid vdsId , java.lang.String vdsName ) { org.ovirt.engine.core.vdsbroker.irsbroker.IrsBrokerCommand.log.infoFormat ( "Clearing cache of pool: {0} for problematic entities of VDS: {1}." , _storagePoolId , vdsName ) ; synchronized ( _lockObject ) { if ( _vdssInProblem.containsKey ( vdsId ) ) { for ( org.ovirt.engine.core.compat.Guid domainId : _vdssInProblem.get ( vdsId ) ) { DomainRecoveredFromProblem ( domainId , vdsId , vdsName ) ; } } } }
Source:
public java.util.List < org.ovirt.engine.core.aaa.DirectoryUser > findUsers ( java.util.List < org.ovirt.engine.core.common.utils.ExternalId > ids ) { org.ovirt.engine.extensions.aaa.builtin.kerberosldap.LdapReturnValueBase ldapResult = broker.runAdAction ( AdActionType.GetAdUserByUserIdList , new org.ovirt.engine.extensions.aaa.builtin.kerberosldap.LdapSearchByUserIdListParameters ( getName ( ) , ids , false ) ) ; @ java.lang.SuppressWarnings ( value = "unchecked" ) java.util.List < org.ovirt.engine.core.common.businessentities.LdapUser > ldapUsers = ( ( java.util.List < org.ovirt.engine.core.common.businessentities.LdapUser > ) ( ldapResult.getReturnValue ( ) ) ) ; return mapUsers ( ldapUsers ) ; }

Target:
public java.util.List < org.ovirt.engine.core.aaa.DirectoryUser > findUsers ( java.util.List < org.ovirt.engine.core.common.utils.ExternalId > ids ) { org.ovirt.engine.extensions.aaa.builtin.kerberosldap.LdapReturnValueBase ldapResult = broker.runAdAction ( AdActionType.GetAdUserByUserIdList , new org.ovirt.engine.extensions.aaa.builtin.kerberosldap.LdapSearchByUserIdListParameters ( getName ( ) , ids , true ) ) ; @ java.lang.SuppressWarnings ( value = "unchecked" ) java.util.List < org.ovirt.engine.core.common.businessentities.LdapUser > ldapUsers = ( ( java.util.List < org.ovirt.engine.core.common.businessentities.LdapUser > ) ( ldapResult.getReturnValue ( ) ) ) ; return mapUsers ( ldapUsers ) ; }
Source:
private org.ovirt.engine.core.bll.RemoveQuotaCommand createCommand ( ) { org.ovirt.engine.core.common.action.QuotaCRUDParameters param = new org.ovirt.engine.core.common.action.QuotaCRUDParameters ( ) ; param.setQuotaId ( generalGuidQuota ) ; command = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.RemoveQuotaCommand ( param ) ) ; org.mockito.Mockito.doReturn ( storagePoolDao ) . when ( command ) . getStoragePoolDao ( ) ; org.mockito.Mockito.doReturn ( quotaDao ) . when ( command ) . getQuotaDao ( ) ; org.mockito.Mockito.doReturn ( vmDao ) . when ( command ) . getVmDao ( ) ; org.mockito.Mockito.doReturn ( quotaManager ) . when ( command ) . getQuotaManager ( ) ; return command ; }

Target:
private org.ovirt.engine.core.bll.RemoveQuotaCommand createCommand ( ) { org.ovirt.engine.core.common.action.QuotaCRUDParameters param = new org.ovirt.engine.core.common.action.QuotaCRUDParameters ( ) ; param.setQuotaId ( generalGuidQuota ) ; command = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.RemoveQuotaCommand ( param , null ) ) ; org.mockito.Mockito.doReturn ( storagePoolDao ) . when ( command ) . getStoragePoolDao ( ) ; org.mockito.Mockito.doReturn ( quotaDao ) . when ( command ) . getQuotaDao ( ) ; org.mockito.Mockito.doReturn ( vmDao ) . when ( command ) . getVmDao ( ) ; org.mockito.Mockito.doReturn ( quotaManager ) . when ( command ) . getQuotaManager ( ) ; return command ; }
Source:
protected void executeQueryCommand ( ) { synchronized ( org.ovirt.engine.core.bll.GetTimeZonesQuery.LOCK ) { if ( ( org.ovirt.engine.core.bll.GetTimeZonesQuery.timezones ) == null ) { org.ovirt.engine.core.bll.GetTimeZonesQuery.timezones = new java.util.HashMap < java.lang.String , java.lang.String > ( ) ; for ( java.lang.String value : SysprepHandler.timeZoneIndex.keySet ( ) ) { java.lang.String key = org.ovirt.engine.core.vdsbroker.vdsbroker.SysprepHandler.getTimezoneKey ( value ) ; org.ovirt.engine.core.bll.GetTimeZonesQuery.timezones.put ( key , value ) ; } org.ovirt.engine.core.bll.GetTimeZonesQuery.timezones = org.ovirt.engine.core.bll.GetTimeZonesQuery.sortMapByValue ( org.ovirt.engine.core.bll.GetTimeZonesQuery.timezones ) ; } } org.ovirt.engine.core.bll.GetTimeZonesQuery.getQueryReturnValue ( ) . setReturnValue ( org.ovirt.engine.core.bll.GetTimeZonesQuery.timezones ) ; }

Target:
protected void executeQueryCommand ( ) { org.ovirt.engine.core.bll.GetTimeZonesQuery.getQueryReturnValue ( ) . setReturnValue ( org.ovirt.engine.core.bll.GetTimeZonesQuery.timezones ) ; }
Source:
public void insufficientDiskSpaceWithSnapshots ( ) { setupDiskSpaceTest ( ) ; org.mockito.Mockito.doReturn ( true ) . when ( cmd ) . validateImages ( org.mockito.ArgumentMatchers.anyMap ( ) ) ; org.mockito.Mockito.when ( cmd.getImportValidator ( ) . validateSpaceRequirements ( org.mockito.ArgumentMatchers.anyCollection ( ) ) ) . thenReturn ( new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_DISK_SPACE_LOW_ON_STORAGE_DOMAIN ) ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( cmd , EngineMessage.ACTION_TYPE_FAILED_DISK_SPACE_LOW_ON_STORAGE_DOMAIN ) ; }

Target:
public void insufficientDiskSpaceWithSnapshots ( ) { setupDiskSpaceTest ( ) ; org.mockito.Mockito.doReturn ( true ) . when ( cmd ) . validateImages ( org.mockito.ArgumentMatchers.any ( ) ) ; org.mockito.Mockito.when ( cmd.getImportValidator ( ) . validateSpaceRequirements ( org.mockito.ArgumentMatchers.anyCollection ( ) ) ) . thenReturn ( new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_DISK_SPACE_LOW_ON_STORAGE_DOMAIN ) ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( cmd , EngineMessage.ACTION_TYPE_FAILED_DISK_SPACE_LOW_ON_STORAGE_DOMAIN ) ; }
Source:
public void getVdsWithVdsId ( ) { 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.VM vm = new org.ovirt.engine.core.common.businessentities.VM ( ) ; vm.setRunOnVds ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID2 ) ; b.setVdsId ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID ) ; b.setVm ( vm ) ; final org.ovirt.engine.core.common.businessentities.VDS v = b.getVds ( ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID , v.getId ( ) ) ; }

Target:
public void getVdsWithVdsId ( ) { 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.GUID2 ) ; b.setVdsId ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID ) ; b.setVm ( vm ) ; final org.ovirt.engine.core.common.businessentities.VDS v = b.getVds ( ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID , v.getId ( ) ) ; }
Source:
public java.util.ArrayList < org.ovirt.engine.core.common.action.VdcReturnValueBase > runMultipleActions ( org.ovirt.engine.core.common.action.VdcActionType actionType , java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > parameters , boolean isRunOnlyIfAllValidationPass , boolean waitForResult ) { org.ovirt.engine.core.common.action.VdcReturnValueBase returnValue = notAllowToRunAction ( actionType ) ; if ( returnValue != null ) { java.util.ArrayList < org.ovirt.engine.core.common.action.VdcReturnValueBase > list = new java.util.ArrayList < > ( ) ; list.add ( returnValue ) ; return list ; } else { return runMultipleActionsImpl ( actionType , parameters , false , isRunOnlyIfAllValidationPass , waitForResult , null ) ; } }

Target:
public java.util.List < org.ovirt.engine.core.common.action.VdcReturnValueBase > runMultipleActions ( org.ovirt.engine.core.common.action.VdcActionType actionType , java.util.List < org.ovirt.engine.core.common.action.VdcActionParametersBase > parameters , boolean isRunOnlyIfAllValidationPass , boolean waitForResult ) { org.ovirt.engine.core.common.action.VdcReturnValueBase returnValue = notAllowToRunAction ( actionType ) ; if ( returnValue != null ) { java.util.List < org.ovirt.engine.core.common.action.VdcReturnValueBase > list = new java.util.ArrayList < > ( ) ; list.add ( returnValue ) ; return list ; } else { return runMultipleActionsImpl ( actionType , parameters , false , isRunOnlyIfAllValidationPass , waitForResult , null ) ; } }
Source:
protected void executeCommand ( ) { org.ovirt.engine.core.bll.VmTemplateHandler.lockVmTemplateInTransaction ( org.ovirt.engine.core.bll.MoveOrCopyTemplateCommand.getVmTemplateId ( ) , org.ovirt.engine.core.bll.MoveOrCopyTemplateCommand.getCompensationContext ( ) ) ; org.ovirt.engine.core.bll.MoveOrCopyTemplateCommand.freeLock ( ) ; if ( ! ( getTemplateDisks ( ) . isEmpty ( ) ) ) { moveOrCopyAllImageGroups ( ) ; } else { endVmTemplateRelatedOps ( ) ; } org.ovirt.engine.core.bll.MoveOrCopyTemplateCommand.setSucceeded ( true ) ; }

Target:
protected void executeCommand ( ) { }
Source:
private java.util.Map < java.lang.String , org.ovirt.engine.core.common.businessentities.Network > createNetworksMap ( java.lang.String networkName , boolean vmNetwork , int mtu , java.lang.Integer vlanId ) { org.ovirt.engine.core.common.businessentities.Network network = new org.ovirt.engine.core.common.businessentities.Network ( ) ; network.setVmNetwork ( vmNetwork ) ; network.setMtu ( mtu ) ; network.setvlan_id ( vlanId ) ; return java.util.Collections.singletonMap ( networkName , network ) ; }

Target:
private java.util.Map < java.lang.String , org.ovirt.engine.core.common.businessentities.network.Network > createNetworksMap ( java.lang.String networkName , boolean vmNetwork , int mtu , java.lang.Integer vlanId ) { org.ovirt.engine.core.common.businessentities.network.Network network = new org.ovirt.engine.core.common.businessentities.network.Network ( ) ; network.setVmNetwork ( vmNetwork ) ; network.setMtu ( mtu ) ; network.setvlan_id ( vlanId ) ; return java.util.Collections.singletonMap ( networkName , network ) ; }
Source:
public void unsyncedNetworkNotModified ( ) { org.ovirt.engine.core.common.businessentities.Network net = createNetwork ( "net" ) ; org.ovirt.engine.core.common.businessentities.VdsNetworkInterface nic = createNicSyncedWithNetwork ( "nic0" , net ) ; nic.setBridged ( ( ! ( net.isVmNetwork ( ) ) ) ) ; mockExistingNetworks ( net ) ; mockExistingIfaces ( nic ) ; org.ovirt.engine.core.bll.network.host.SetupNetworksHelper helper = createHelper ( createParametersForNics ( nic ) ) ; validateAndAssertNoChanges ( helper ) ; }

Target:
public void unsyncedNetworkNotModified ( ) { org.ovirt.engine.core.common.businessentities.network.Network net = createNetwork ( "net" ) ; org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic = createNicSyncedWithNetwork ( "nic0" , net ) ; nic.setBridged ( ( ! ( net.isVmNetwork ( ) ) ) ) ; mockExistingNetworks ( net ) ; mockExistingIfaces ( nic ) ; org.ovirt.engine.core.bll.network.host.SetupNetworksHelper helper = createHelper ( createParametersForNics ( nic ) ) ; validateAndAssertNoChanges ( helper ) ; }
Source:
public void testExecuteCommandByServerIdForRestart ( ) { cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.gluster.ManageGlusterServiceCommand ( new org.ovirt.engine.core.common.action.gluster.GlusterServiceParameters ( null , org.ovirt.engine.core.compat.Guid.newGuid ( ) , org.ovirt.engine.core.common.businessentities.gluster.ServiceType.GLUSTER_SWIFT , org.ovirt.engine.core.common.constants.gluster.GlusterConstants.MANAGE_GLUSTER_SERVICE_ACTION_TYPE_RESTART ) ) ) ; setUpMockUpForRestart ( ) ; mockBackend ( true , null , GlusterServiceStatus.RUNNING ) ; cmd.executeCommand ( ) ; org.mockito.Mockito.verify ( serverServiceDao , org.mockito.Mockito.times ( 2 ) ) . updateByServerIdAndServiceType ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.gluster.GlusterServerService.class ) ) ; org.junit.Assert.assertEquals ( cmd.getAuditLogTypeValue ( ) , AuditLogType.GLUSTER_SERVICE_RESTARTED ) ; }

Target:
public void testExecuteCommandByServerIdForRestart ( ) { cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.gluster.ManageGlusterServiceCommand ( new org.ovirt.engine.core.common.action.gluster.GlusterServiceParameters ( null , org.ovirt.engine.core.compat.Guid.newGuid ( ) , org.ovirt.engine.core.common.businessentities.gluster.ServiceType.GLUSTER_SWIFT , org.ovirt.engine.core.common.constants.gluster.GlusterConstants.MANAGE_GLUSTER_SERVICE_ACTION_TYPE_RESTART ) , null ) ) ; setUpMockUpForRestart ( ) ; mockBackend ( true , null , GlusterServiceStatus.RUNNING ) ; cmd.executeCommand ( ) ; org.mockito.Mockito.verify ( serverServiceDao , org.mockito.Mockito.times ( 2 ) ) . updateByServerIdAndServiceType ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.gluster.GlusterServerService.class ) ) ; org.junit.Assert.assertEquals ( cmd.getAuditLogTypeValue ( ) , AuditLogType.GLUSTER_SERVICE_RESTARTED ) ; }
Source:
public void dispose ( ) { org.ovirt.engine.core.vdsbroker.VdsManager.log.info ( "vdsManager::disposing" ) ; org.ovirt.engine.core.utils.timer.SchedulerUtilQuartzImpl.getInstance ( ) . deleteJob ( onTimerJobId ) ; if ( org.ovirt.engine.core.vdsbroker.vdsbroker.VdsServerWrapper.class . isInstance ( _vdsProxy ) ) { org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcUtils.shutDownConnection ( ( ( org.ovirt.engine.core.vdsbroker.vdsbroker.VdsServerWrapper ) ( _vdsProxy ) ) . getHttpClient ( ) ) ; } else { ( ( org.ovirt.engine.core.vdsbroker.jsonrpc.JsonRpcVdsServer ) ( _vdsProxy ) ) . close ( ) ; } }

Target:
public void dispose ( ) { org.ovirt.engine.core.vdsbroker.VdsManager.log.info ( "vdsManager::disposing" ) ; org.ovirt.engine.core.utils.timer.SchedulerUtilQuartzImpl.getInstance ( ) . deleteJob ( onTimerJobId ) ; _vdsProxy.close ( ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object result ) { if ( result != null ) { org.ovirt.engine.core.common.businessentities.VM vm = ( ( org.ovirt.engine.core.common.businessentities.VM ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( result ) ) . getReturnValue ( ) ) ) ; if ( vm == null ) { return ; } org.ovirt.engine.ui.uicommonweb.models.pools.PoolDiskListModel poolDiskListModel = ( ( org.ovirt.engine.ui.uicommonweb.models.pools.PoolDiskListModel ) ( model ) ) ; poolDiskListModel.setVM ( vm ) ; poolDiskListModel.syncSearch ( ) ; } }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object result ) { if ( result != null ) { org.ovirt.engine.core.common.businessentities.VM vm = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( result ) ) . getReturnValue ( ) ; if ( vm == null ) { return ; } setVM ( vm ) ; syncSearch ( ) ; } }
Source:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; dao = prepareDAO ( dbFacade.getStorageServerConnectionLunMapDao ( ) ) ; storageServerConnectionDao = prepareDAO ( dbFacade.getStorageServerConnectionDao ( ) ) ; existingConnection = storageServerConnectionDao.get ( "0cc146e8-e5ed-482c-8814-270bc48c297f" ) ; newServerConnection = new org.ovirt.engine.core.common.businessentities.StorageServerConnections ( ) ; newServerConnection.setid ( "0cc146e8-e5ed-482c-8814-270bc48c2980" ) ; newServerConnection.setconnection ( org.ovirt.engine.core.dao.StorageServerConnectionLunMapDAOTest.EXISTING_DOMAIN_STORAGE_NAME ) ; existingLUNStorageMap = dao.get ( new org.ovirt.engine.core.common.businessentities.LUN_storage_server_connection_map_id ( "1IET_00180001" , existingConnection.getid ( ) ) ) ; newLUNStorageMap = new org.ovirt.engine.core.common.businessentities.LUN_storage_server_connection_map ( org.ovirt.engine.core.dao.StorageServerConnectionLunMapDAOTest.FREE_LUN_ID , existingConnection.getid ( ) ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; dao = dbFacade.getStorageServerConnectionLunMapDao ( ) ; storageServerConnectionDao = dbFacade.getStorageServerConnectionDao ( ) ; existingConnection = storageServerConnectionDao.get ( "0cc146e8-e5ed-482c-8814-270bc48c297f" ) ; newServerConnection = new org.ovirt.engine.core.common.businessentities.StorageServerConnections ( ) ; newServerConnection.setid ( "0cc146e8-e5ed-482c-8814-270bc48c2980" ) ; newServerConnection.setconnection ( org.ovirt.engine.core.dao.StorageServerConnectionLunMapDAOTest.EXISTING_DOMAIN_STORAGE_NAME ) ; existingLUNStorageMap = dao.get ( new org.ovirt.engine.core.common.businessentities.LUN_storage_server_connection_map_id ( "1IET_00180001" , existingConnection.getid ( ) ) ) ; newLUNStorageMap = new org.ovirt.engine.core.common.businessentities.LUN_storage_server_connection_map ( org.ovirt.engine.core.dao.StorageServerConnectionLunMapDAOTest.FREE_LUN_ID , existingConnection.getid ( ) ) ; }
Source:
public org.ovirt.engine.core.common.eventqueue.EventResult submitEventSync ( org.ovirt.engine.core.common.eventqueue.Event event , java.util.concurrent.Callable < org.ovirt.engine.core.common.eventqueue.EventResult > callable ) { java.util.concurrent.FutureTask < org.ovirt.engine.core.common.eventqueue.EventResult > task = submitTaskInternal ( event , callable ) ; if ( task != null ) { try { return task.get ( ) ; } catch ( java.lang.Exception e ) { org.ovirt.engine.core.bll.eventqueue.EventQueueMonitor.log.errorFormat ( "Failed at submitEventSync, for pool {0} with exception {1}" , event.getStoragePoolId ( ) , e.getMessage ( ) ) ; } } return null ; }

Target:
public org.ovirt.engine.core.common.eventqueue.EventResult submitEventSync ( org.ovirt.engine.core.common.eventqueue.Event event , java.util.concurrent.Callable < org.ovirt.engine.core.common.eventqueue.EventResult > callable ) { java.util.concurrent.FutureTask < org.ovirt.engine.core.common.eventqueue.EventResult > task = submitTaskInternal ( event , callable ) ; if ( task != null ) { try { return task.get ( ) ; } catch ( java.lang.Exception e ) { org.ovirt.engine.core.bll.eventqueue.EventQueueMonitor.log.errorFormat ( "Failed at submitEventSync, for pool {0} with exception {1}" , event.getStoragePoolId ( ) , e ) ; } } return null ; }
Source:
private void mockIsNicActuallyExistsOrReferencesNewBond ( org.ovirt.engine.core.bll.network.host.NicLabelValidator validator , boolean returnValue ) { org.mockito.Mockito.doReturn ( returnValue ) . when ( validator ) . isNicActuallyExistsOrReferencesNewBond ( org.mockito.Matchers.< org.ovirt.engine.core.common.businessentities.BusinessEntityMap < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > > any ( ) , org.mockito.Matchers.< org.ovirt.engine.core.common.businessentities.BusinessEntityMap < org.ovirt.engine.core.common.businessentities.network.Bond > > any ( ) , org.mockito.Matchers.any ( java.lang.String.class ) , org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ; }

Target:
private void mockIsNicActuallyExistsOrReferencesNewBond ( org.ovirt.engine.core.bll.network.host.NicLabelValidator validator , boolean returnValue ) { org.mockito.Mockito.doReturn ( returnValue ) . when ( validator ) . isNicActuallyExistsOrReferencesNewBond ( org.mockito.Matchers.any ( java.lang.String.class ) , org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ; }
Source:
private void initTabAvailabilityListeners ( final org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel pool ) { pool.getPropertyChangedEvent ( ) . 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 ) { java.lang.String propName = ( ( org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ) ( args ) ) . PropertyName ; if ( "IsPoolTabValid" . equals ( propName ) ) { poolTab.markAsInvalid ( null ) ; } } } ) ; poolTab.setVisible ( true ) ; }

Target:
private void initTabAvailabilityListeners ( final org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel pool ) { pool.getPropertyChangedEvent ( ) . 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 ) { java.lang.String propName = ( ( org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ) ( args ) ) . PropertyName ; if ( "IsPoolTabValid" . equals ( propName ) ) { poolTab.markAsInvalid ( null ) ; } } } ) ; }
Source:
protected void executeQueryCommand ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > result = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStorageDomainDao ( ) . getAllForStorageDomain ( org.ovirt.engine.core.bll.storage.GetStorageDomainListByIdQuery.getParameters ( ) . getStorageDomainId ( ) ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > temp = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ( result ) ; for ( org.ovirt.engine.core.common.businessentities.StorageDomain domain : temp ) { if ( ( domain.getStorageDomainSharedStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageDomainSharedStatus.Unattached ) ) { result.remove ( domain ) ; } } org.ovirt.engine.core.bll.storage.GetStorageDomainListByIdQuery.getQueryReturnValue ( ) . setReturnValue ( result ) ; }

Target:
protected void executeQueryCommand ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > result = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStorageDomainDao ( ) . getAllForStorageDomain ( org.ovirt.engine.core.bll.storage.GetStorageDomainListByIdQuery.getParameters ( ) . getId ( ) ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > temp = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ( result ) ; for ( org.ovirt.engine.core.common.businessentities.StorageDomain domain : temp ) { if ( ( domain.getStorageDomainSharedStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageDomainSharedStatus.Unattached ) ) { result.remove ( domain ) ; } } org.ovirt.engine.core.bll.storage.GetStorageDomainListByIdQuery.getQueryReturnValue ( ) . setReturnValue ( result ) ; }
Source:
protected void setUpGetEntityExpectations ( boolean filter , boolean getCertInfo ) throws java.lang.Exception { setUpGetEntityExpectations ( VdcQueryType.GetVdsByVdsId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" , "Filtered" } , new java.lang.Object [ ] { GUIDS [ 0 ] , filter } , getEntity ( 0 ) ) ; }

Target:
protected void setUpGetEntityExpectations ( boolean filter ) throws java.lang.Exception { setUpGetEntityExpectations ( VdcQueryType.GetVdsByVdsId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" , "Filtered" } , new java.lang.Object [ ] { GUIDS [ 0 ] , filter } , getEntity ( 0 ) ) ; }
Source:
protected void onRunOnce ( ) { startProgress ( null ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runAction ( VdcActionType.RunVmOnce , createRunVmOnceParams ( ) , new org.ovirt.engine.ui.uicompat.IFrontendActionAsyncCallback ( ) { @ java.lang.Override public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { stopProgress ( ) ; commandTarget.executeCommand ( runOnceCommand ) ; } } , this ) ; }

Target:
protected void onRunOnce ( ) { startProgress ( ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runAction ( VdcActionType.RunVmOnce , createRunVmOnceParams ( ) , new org.ovirt.engine.ui.uicompat.IFrontendActionAsyncCallback ( ) { @ java.lang.Override public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { stopProgress ( ) ; commandTarget.executeCommand ( runOnceCommand ) ; } } , this ) ; }
Source:
public void testFailInterfaceCanUpdateReadOnly ( ) { initializeCommand ( new org.ovirt.engine.core.common.action.UpdateVmDiskParameters ( vmId , diskImageGuid , createDiskImage ( ) ) ) ; org.mockito.Mockito.doReturn ( true ) . when ( command ) . updateReadOnlyRequested ( ) ; org.mockito.Mockito.doReturn ( new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_INTERFACE_DOES_NOT_SUPPORT_READ_ONLY_ATTR ) ) . when ( diskValidator ) . isReadOnlyPropertyCompatibleWithInterface ( ) ; org.junit.Assert.assertFalse ( command.validateCanUpdateReadOnly ( diskValidator ) ) ; }

Target:
public void testFailInterfaceCanUpdateReadOnly ( ) { initializeCommand ( new org.ovirt.engine.core.common.action.UpdateVmDiskParameters ( vmId , createDiskImage ( ) ) ) ; org.mockito.Mockito.doReturn ( true ) . when ( command ) . updateReadOnlyRequested ( ) ; org.mockito.Mockito.doReturn ( new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_INTERFACE_DOES_NOT_SUPPORT_READ_ONLY_ATTR ) ) . when ( diskValidator ) . isReadOnlyPropertyCompatibleWithInterface ( ) ; org.junit.Assert.assertFalse ( command.validateCanUpdateReadOnly ( diskValidator ) ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { boolean selectVnc = false ; java.util.List < org.ovirt.engine.core.common.businessentities.GraphicsDevice > graphicsDevices = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ; if ( ( ( graphicsDevices.size ( ) ) == 1 ) && ( ( graphicsDevices.get ( 0 ) . getGraphicsType ( ) ) == ( org.ovirt.engine.core.common.businessentities.GraphicsType.VNC ) ) ) { selectVnc = true ; } getDisplayConsole_Vnc_IsSelected ( ) . setEntity ( selectVnc ) ; getDisplayConsole_Spice_IsSelected ( ) . setEntity ( ( ! selectVnc ) ) ; }

Target:
public void onSuccess ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue returnValue ) { boolean selectVnc = false ; java.util.List < org.ovirt.engine.core.common.businessentities.GraphicsDevice > graphicsDevices = returnValue.getReturnValue ( ) ; if ( ( ( graphicsDevices.size ( ) ) == 1 ) && ( ( graphicsDevices.get ( 0 ) . getGraphicsType ( ) ) == ( org.ovirt.engine.core.common.businessentities.GraphicsType.VNC ) ) ) { selectVnc = true ; } getDisplayConsole_Vnc_IsSelected ( ) . setEntity ( selectVnc ) ; getDisplayConsole_Spice_IsSelected ( ) . setEntity ( ( ! selectVnc ) ) ; }
Source:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.templates.VmBaseListModel vmListModel = ( ( org.ovirt.engine.ui.uicommonweb.models.templates.VmBaseListModel ) ( target ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > storageDomains = ( ( java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > ) ( returnValue ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > filteredStorageDomains = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.StorageDomain a : storageDomains ) { if ( ( a.getStorageDomainType ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageDomainType.ImportExport ) ) { filteredStorageDomains.add ( a ) ; } } vmListModel.postExportGetStorageDomainList ( filteredStorageDomains ) ; }

Target:
public void onSuccess ( java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > storageDomains ) { java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > filteredStorageDomains = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.StorageDomain a : storageDomains ) { if ( ( a.getStorageDomainType ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageDomainType.ImportExport ) ) { filteredStorageDomains.add ( a ) ; } } postExportGetStorageDomainList ( filteredStorageDomains ) ; }
Source:
java.lang.Iterable < org.ovirt.engine.ui.uicommonweb.models.datacenters.NetworkClusterModel > getClustersTableItems ( ) { org.ovirt.engine.ui.uicommonweb.models.ListModel tableModel = clustersTable.asEditor ( ) . flush ( ) ; return ( tableModel != null ) && ( ( tableModel.getItems ( ) ) != null ) ? tableModel.getItems ( ) : new java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.datacenters.NetworkClusterModel > ( ) ; }

Target:
java.lang.Iterable < org.ovirt.engine.ui.uicommonweb.models.datacenters.NetworkClusterModel > getClustersTableItems ( ) { org.ovirt.engine.ui.uicommonweb.models.ListModel < org.ovirt.engine.ui.uicommonweb.models.datacenters.NetworkClusterModel > tableModel = clustersTable.asEditor ( ) . flush ( ) ; return ( tableModel != null ) && ( ( tableModel.getItems ( ) ) != null ) ? tableModel.getItems ( ) : new java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.datacenters.NetworkClusterModel > ( ) ; }
Source:
public java.lang.String getDisplayValue ( ) { if ( isDefault ( ) ) { final java.lang.String defaultTimeZoneKey = ( ( java.lang.String ) ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigValuePreConverted ( timeZoneType.getDefaultTimeZoneConfigurationKey ( ) ) ) ) ; if ( ! ( timeZoneType.getTimeZoneList ( ) . containsKey ( defaultTimeZoneKey ) ) ) { timeZoneKey = 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.getConfigValuePreConverted ( timeZoneType.getDefaultTimeZoneConfigurationKey ( ) ) ) ) ; if ( ! ( timeZoneType.getTimeZoneList ( ) . containsKey ( defaultTimeZoneKey ) ) ) { defaultTimeZoneKey = timeZoneType.getUltimateFallback ( ) ; } return timeZoneType.getTimeZoneList ( ) . get ( defaultTimeZoneKey ) ; } else { return timeZoneType.getTimeZoneList ( ) . get ( timeZoneKey ) ; } }
Source:
public void close ( ) throws java.io.IOException { org.ovirt.engineextensions.aaa.ldap.Resolver.log.debug ( "Close" ) ; if ( ( ctx ) != null ) { try { ctx.close ( ) ; ctx = null ; } catch ( javax.naming.NamingException e ) { org.ovirt.engineextensions.aaa.ldap.Resolver.log.warn ( "Ignoring exception" , e ) ; } } }

Target:
public void close ( ) throws java.io.IOException { org.ovirt.engineextensions.aaa.ldap.Resolver.log.debug ( "Close" ) ; if ( ( ctx ) != null ) { try { ctx.close ( ) ; ctx = null ; } catch ( javax.naming.NamingException e ) { org.ovirt.engineextensions.aaa.ldap.Resolver.log.debug ( "Ignoring exception" , e ) ; } } }
Source:
public boolean eval ( org.ovirt.engine.core.common.businessentities.VDS p ) { return ( ( p.getvds_group_id ( ) . equals ( vm.getVdsGroupId ( ) ) ) && ( org.ovirt.engine.core.bll.RunVmCommandBase.hasMemoryToRunVM ( p , vm ) ) ) && ( org.ovirt.engine.core.bll.RunVmCommandBase.hasCpuToRunVM ( p , vm ) ) ; }

Target:
public boolean eval ( org.ovirt.engine.core.common.businessentities.VDS p ) { return ( ( p.getVdsGroupId ( ) . equals ( vm.getVdsGroupId ( ) ) ) && ( org.ovirt.engine.core.bll.RunVmCommandBase.hasMemoryToRunVM ( p , vm ) ) ) && ( org.ovirt.engine.core.bll.RunVmCommandBase.hasCpuToRunVM ( p , vm ) ) ; }
Source:
public boolean isUpdateAvailable ( org.ovirt.engine.core.common.businessentities.VDS host ) { org.ovirt.engine.core.common.queries.VdcQueryReturnValue returnValue = org.ovirt.engine.core.bll.Backend.getInstance ( ) . runInternalQuery ( VdcQueryType.GetoVirtISOs , new org.ovirt.engine.core.common.queries.VdsIdParametersBase ( host.getId ( ) ) ) ; java.util.List < org.ovirt.engine.core.compat.RpmVersion > isos = returnValue.getReturnValue ( ) ; return org.ovirt.engine.core.common.utils.RpmVersionUtils.isUpdateAvailable ( isos , host.getHostOs ( ) ) ; }

Target:
public boolean isUpdateAvailable ( org.ovirt.engine.core.common.businessentities.VDS host ) { org.ovirt.engine.core.common.queries.VdcQueryReturnValue returnValue = org.ovirt.engine.core.bll.Backend.getInstance ( ) . runInternalQuery ( VdcQueryType.GetoVirtISOs , new org.ovirt.engine.core.common.queries.IdQueryParameters ( host.getId ( ) ) ) ; java.util.List < org.ovirt.engine.core.compat.RpmVersion > isos = returnValue.getReturnValue ( ) ; return org.ovirt.engine.core.common.utils.RpmVersionUtils.isUpdateAvailable ( isos , host.getHostOs ( ) ) ; }
Source:
private void updateOptionsLocalFSData ( ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getLocalStorageHost ( new org.ovirt.engine.ui.frontend.AsyncQuery ( this , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterGuideModel clusterGuideModel = ( ( org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterGuideModel ) ( target ) ) ; org.ovirt.engine.core.common.businessentities.VDS localStorageHost = ( ( org.ovirt.engine.core.common.businessentities.VDS ) ( returnValue ) ) ; clusterGuideModel.localStorageHost = localStorageHost ; clusterGuideModel.updateOptionsLocalFS ( ) ; } } ) , dataCenter.getname ( ) ) ; }

Target:
private void updateOptionsLocalFSData ( ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getLocalStorageHost ( new org.ovirt.engine.ui.frontend.AsyncQuery ( this , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterGuideModel clusterGuideModel = ( ( org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterGuideModel ) ( target ) ) ; org.ovirt.engine.core.common.businessentities.VDS localStorageHost = ( ( org.ovirt.engine.core.common.businessentities.VDS ) ( returnValue ) ) ; clusterGuideModel.localStorageHost = localStorageHost ; clusterGuideModel.updateOptionsLocalFS ( ) ; } } ) , dataCenter.getName ( ) ) ; }
Source:
public boolean canBeSelected ( ) { org.ovirt.engine.core.common.businessentities.DisplayType displayType = ( ( getEntity ( ) . getDisplayType ( ) ) != null ) ? getEntity ( ) . getDisplayType ( ) : getEntity ( ) . getDefaultDisplayType ( ) ; boolean hasVmSpiceSupport = java.lang.Boolean.TRUE.equals ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.hasSpiceSupport ( getEntity ( ) . getOs ( ) , getEntity ( ) . getVdsGroupCompatibilityVersion ( ) ) ) ; return ( displayType == ( org.ovirt.engine.core.common.businessentities.DisplayType.qxl ) ) && hasVmSpiceSupport ; }

Target:
public boolean canBeSelected ( ) { org.ovirt.engine.core.common.businessentities.DisplayType displayType = ( ( getEntity ( ) . getDisplayType ( ) ) != null ) ? getEntity ( ) . getDisplayType ( ) : getEntity ( ) . getDefaultDisplayType ( ) ; boolean hasVmSpiceSupport = java.lang.Boolean.TRUE.equals ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . hasSpiceSupport ( getEntity ( ) . getOs ( ) , getEntity ( ) . getVdsGroupCompatibilityVersion ( ) ) ) ; return ( displayType == ( org.ovirt.engine.core.common.businessentities.DisplayType.qxl ) ) && hasVmSpiceSupport ; }
Source:
public void testGetBrickByServerIdAndDirectory ( ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity brick = dao.getBrickByServerIdAndDirectory ( FixturesTool.GLUSTER_BRICK_SERVER1 , FixturesTool.GLUSTER_BRICK_DIR1 ) ; org.junit.Assert.assertNotNull ( brick ) ; org.junit.Assert.assertEquals ( brick.getServerId ( ) , FixturesTool.GLUSTER_BRICK_SERVER1 ) ; org.junit.Assert.assertEquals ( brick.getBrickDirectory ( ) , FixturesTool.GLUSTER_BRICK_DIR1 ) ; }

Target:
public void testGetBrickByServerIdAndDirectory ( ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity brick = dao.getBrickByServerIdAndDirectory ( FixturesTool.GLUSTER_BRICK_SERVER1 , FixturesTool.GLUSTER_BRICK_DIR1 ) ; org.junit.Assert.assertNotNull ( brick ) ; org.junit.Assert.assertEquals ( FixturesTool.GLUSTER_BRICK_SERVER1 , brick.getServerId ( ) ) ; org.junit.Assert.assertEquals ( FixturesTool.GLUSTER_BRICK_DIR1 , brick.getBrickDirectory ( ) ) ; }
Source:
public void testAddIncompleteParameters ( ) throws java.lang.Exception { org.ovirt.engine.api.model.Network model = new org.ovirt.engine.api.model.Network ( ) ; model.setName ( NAMES [ 0 ] ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; control.replay ( ) ; try { ( ( org.ovirt.engine.api.restapi.resource.BackendNetworksResource ) ( collection ) ) . add ( model ) ; fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "Network" , "add" , "dataCenter.name|id" ) ; } }

Target:
public void testAddIncompleteParameters ( ) throws java.lang.Exception { org.ovirt.engine.api.model.Network model = new org.ovirt.engine.api.model.Network ( ) ; model.setName ( NAMES [ 0 ] ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; control.replay ( ) ; try { collection.add ( model ) ; fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "Network" , "add" , "dataCenter.name|id" ) ; } }
Source:
public void isClusterEmpty ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return ( ( java.lang.Boolean ) ( source ) ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.IsClusterEmpty , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source == null ? new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) : ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ) ( source ) ) ; }
Source:
protected boolean setAndValidateCpuProfile ( ) { org.ovirt.engine.core.bll.ImportVmCommandBase.getVm ( ) . getStaticData ( ) . setVdsGroupId ( org.ovirt.engine.core.bll.ImportVmCommandBase.getVdsGroupId ( ) ) ; org.ovirt.engine.core.bll.ImportVmCommandBase.getVm ( ) . getStaticData ( ) . setCpuProfileId ( org.ovirt.engine.core.bll.ImportVmCommandBase.getParameters ( ) . getCpuProfileId ( ) ) ; return validate ( org.ovirt.engine.core.bll.profiles.CpuProfileHelper.setAndValidateCpuProfile ( org.ovirt.engine.core.bll.ImportVmCommandBase.getVm ( ) . getStaticData ( ) , org.ovirt.engine.core.bll.ImportVmCommandBase.getVdsGroup ( ) . getCompatibilityVersion ( ) ) ) ; }

Target:
protected boolean setAndValidateCpuProfile ( ) { getVm ( ) . getStaticData ( ) . setVdsGroupId ( org.ovirt.engine.core.bll.ImportVmCommandBase.getVdsGroupId ( ) ) ; getVm ( ) . getStaticData ( ) . setCpuProfileId ( org.ovirt.engine.core.bll.ImportVmCommandBase.getParameters ( ) . getCpuProfileId ( ) ) ; return validate ( org.ovirt.engine.core.bll.profiles.CpuProfileHelper.setAndValidateCpuProfile ( getVm ( ) . getStaticData ( ) , org.ovirt.engine.core.bll.ImportVmCommandBase.getVdsGroup ( ) . getCompatibilityVersion ( ) ) ) ; }
Source:
public void flush ( org.ovirt.engine.core.common.businessentities.network.HostNetworkQos qos ) { qos.setOutAverageLinkshare ( org.ovirt.engine.ui.uicompat.external.StringUtils.parseInteger ( getOutAverageLinkshare ( ) . getEntity ( ) ) ) ; qos.setOutAverageUpperlimit ( org.ovirt.engine.ui.uicompat.external.StringUtils.parseInteger ( getOutAverageUpperlimit ( ) . getEntity ( ) ) ) ; qos.setOutAverageRealtime ( org.ovirt.engine.ui.uicompat.external.StringUtils.parseInteger ( getOutAverageRealtime ( ) . getEntity ( ) ) ) ; }

Target:
public void flush ( org.ovirt.engine.core.common.businessentities.network.HostNetworkQos qos ) { qos.setOutAverageLinkshare ( parseInteger ( getOutAverageLinkshare ( ) . getEntity ( ) ) ) ; qos.setOutAverageUpperlimit ( parseInteger ( getOutAverageUpperlimit ( ) . getEntity ( ) ) ) ; qos.setOutAverageRealtime ( parseInteger ( getOutAverageRealtime ( ) . getEntity ( ) ) ) ; }
Source:
protected void endSuccessfully ( ) { org.ovirt.engine.core.bll.ExportVmCommand.endActionOnAllImageGroups ( ) ; org.ovirt.engine.core.common.businessentities.VM vm = org.ovirt.engine.core.bll.ExportVmCommand.getVm ( ) ; org.ovirt.engine.core.bll.VmHandler.unLockVm ( vm ) ; populateVmData ( vm ) ; if ( org.ovirt.engine.core.bll.ExportVmCommand.getParameters ( ) . getCopyCollapse ( ) ) { endCopyCollapseOperations ( vm ) ; } else { updateSnapshotOvf ( vm ) ; } org.ovirt.engine.core.bll.ExportVmCommand.setSucceeded ( true ) ; }

Target:
protected void endSuccessfully ( ) { org.ovirt.engine.core.bll.ExportVmCommand.endActionOnAllImageGroups ( ) ; org.ovirt.engine.core.common.businessentities.VM vm = org.ovirt.engine.core.bll.ExportVmCommand.getVm ( ) ; populateVmData ( vm ) ; if ( org.ovirt.engine.core.bll.ExportVmCommand.getParameters ( ) . getCopyCollapse ( ) ) { endCopyCollapseOperations ( vm ) ; } else { updateSnapshotOvf ( vm ) ; } org.ovirt.engine.core.bll.VmHandler.unLockVm ( vm ) ; org.ovirt.engine.core.bll.ExportVmCommand.setSucceeded ( true ) ; }
Source:
protected void updateVirtioScsiAvailability ( ) { boolean isVirtioScsiEnabled = ( ( java.lang.Boolean ) ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getConfigValuePreConverted ( ConfigurationValues.VirtIoScsiEnabled , getModel ( ) . getCompatibilityVersion ( ) . getValue ( ) ) ) ) ; getModel ( ) . getIsVirtioScsiEnabled ( ) . setIsAvailable ( isVirtioScsiEnabled ) ; }

Target:
protected void updateVirtioScsiAvailability ( ) { getModel ( ) . getIsVirtioScsiEnabled ( ) . setIsAvailable ( true ) ; }
Source:
public boolean equals ( java.lang.Object obj ) { return ( ( ( obj != null ) && ( obj instanceof org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSessionConfiguration ) ) && ( org.ovirt.engine.core.common.utils.ObjectUtils.objectsEqual ( getId ( ) , ( ( org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSessionConfiguration ) ( obj ) ) . getId ( ) ) ) ) && ( super . equals ( obj ) ) ; }

Target:
public boolean equals ( java.lang.Object obj ) { if ( ( obj == null ) || ( ! ( obj instanceof org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSessionConfiguration ) ) ) { return false ; } if ( ! ( super . equals ( obj ) ) ) { return false ; } return org.ovirt.engine.core.common.utils.ObjectUtils.objectsEqual ( getId ( ) , ( ( org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSessionConfiguration ) ( obj ) ) . getId ( ) ) ; }
Source:
private boolean evaluateHostUpgradeInternalCommandProgress ( java.util.List < org.ovirt.engine.core.compat.Guid > childCmdIds , org.ovirt.engine.core.bll.CommandBase < ? > rootCommand ) { org.ovirt.engine.core.common.businessentities.CommandEntity upgradeCommand = getHostUpgradeInternalCommand ( childCmdIds ) ; if ( upgradeCommand != null ) { switch ( upgradeCommand.getCommandStatus ( ) ) { case ACTIVE : case NOT_STARTED : return false ; case FAILED : case FAILED_RESTARTED : case UNKNOWN : rootCommand.setCommandStatus ( CommandStatus.FAILED ) ; return true ; case SUCCEEDED : rootCommand.setCommandStatus ( CommandStatus.SUCCEEDED ) ; return true ; } } return false ; }

Target:
private boolean evaluateHostUpgradeInternalCommandProgress ( java.util.List < org.ovirt.engine.core.compat.Guid > childCmdIds , org.ovirt.engine.core.bll.CommandBase < ? > rootCommand ) { org.ovirt.engine.core.common.businessentities.CommandEntity upgradeCommand = getHostUpgradeInternalCommand ( childCmdIds ) ; if ( upgradeCommand == null ) { return false ; } switch ( upgradeCommand.getCommandStatus ( ) ) { case ACTIVE : case NOT_STARTED : case FAILED : case FAILED_RESTARTED : case UNKNOWN : rootCommand.setCommandStatus ( CommandStatus.FAILED ) ; return true ; case SUCCEEDED : rootCommand.setCommandStatus ( CommandStatus.SUCCEEDED ) ; return true ; } return true ; }
Source:
public void validateFailsOnNullHookId ( ) { cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.gluster.UpdateGlusterHookCommand ( new org.ovirt.engine.core.common.action.gluster.GlusterHookManageParameters ( null ) ) ) ; setUpMocksForUpdate ( ) ; org.junit.Assert.assertFalse ( cmd.validate ( ) ) ; org.junit.Assert.assertTrue ( cmd.getReturnValue ( ) . getValidationMessages ( ) . contains ( EngineMessage.ACTION_TYPE_FAILED_GLUSTER_HOOK_ID_IS_REQUIRED.toString ( ) ) ) ; }

Target:
public void validateFailsOnNullHookId ( ) { cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.gluster.UpdateGlusterHookCommand ( new org.ovirt.engine.core.common.action.gluster.GlusterHookManageParameters ( null ) , null ) ) ; setUpMocksForUpdate ( ) ; org.junit.Assert.assertFalse ( cmd.validate ( ) ) ; org.junit.Assert.assertTrue ( cmd.getReturnValue ( ) . getValidationMessages ( ) . contains ( EngineMessage.ACTION_TYPE_FAILED_GLUSTER_HOOK_ID_IS_REQUIRED.toString ( ) ) ) ; }
Source:
public void testNoChanges ( ) { org.ovirt.engine.core.utils.Jedi jedi1 = new org.ovirt.engine.core.utils.Jedi ( ) ; org.ovirt.engine.core.utils.Jedi jedi2 = new org.ovirt.engine.core.utils.Jedi ( ) ; java.util.ArrayList < java.lang.String > changes = org.ovirt.engine.core.utils.ObjectIdentityChecker.GetChangedFields ( jedi1 , jedi2 ) ; assertTrue ( "Should be no changes" , ( ( changes.size ( ) ) == 0 ) ) ; }

Target:
public void testNoChanges ( ) { org.ovirt.engine.core.utils.Jedi jedi1 = new org.ovirt.engine.core.utils.Jedi ( ) ; org.ovirt.engine.core.utils.Jedi jedi2 = new org.ovirt.engine.core.utils.Jedi ( ) ; java.util.List < java.lang.String > changes = org.ovirt.engine.core.utils.ObjectIdentityChecker.GetChangedFields ( jedi1 , jedi2 ) ; assertTrue ( "Should be no changes" , ( ( changes.size ( ) ) == 0 ) ) ; }