auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void migrationSupported ( ) { validator = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.validator.ClusterValidator ( clusterDao , dataCenterDao , cluster , cpuFlagsManagerHandler ) ) ; org.mockito.Mockito.doReturn ( true ) . when ( validator ) . migrationSupportedForArch ( org.mockito.ArgumentMatchers.any ( ) ) ; org.junit.Assert.assertThat ( validator.migrationSupported ( org.ovirt.engine.core.utils.RandomUtils.instance ( ) . nextEnum ( org.ovirt.engine.core.common.businessentities.ArchitectureType.class ) ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }

Target:
public void migrationSupported ( ) { org.mockito.Mockito.doReturn ( true ) . when ( validator ) . migrationSupportedForArch ( org.mockito.ArgumentMatchers.any ( ) ) ; org.junit.Assert.assertThat ( validator.migrationSupported ( org.ovirt.engine.core.utils.RandomUtils.instance ( ) . nextEnum ( org.ovirt.engine.core.common.businessentities.ArchitectureType.class ) ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }
Source:
public void testListCrash ( ) throws java.lang.Exception { javax.ws.rs.core.UriInfo uriInfo = setUpUriExpectations ( null ) ; collection.setUriInfo ( uriInfo ) ; java.lang.Throwable t = new java.lang.RuntimeException ( FAILURE ) ; setUpHooksQueryExpectations ( t ) ; control.replay ( ) ; try { getCollection ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , org.ovirt.engine.api.restapi.resource.gluster.BACKEND_FAILED_SERVER_LOCALE , t ) ; } }

Target:
public void testListCrash ( ) throws java.lang.Exception { javax.ws.rs.core.UriInfo uriInfo = setUpUriExpectations ( null ) ; collection.setUriInfo ( uriInfo ) ; java.lang.Throwable t = new java.lang.RuntimeException ( FAILURE ) ; setUpHooksQueryExpectations ( t ) ; try { getCollection ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , org.ovirt.engine.api.restapi.resource.gluster.BACKEND_FAILED_SERVER_LOCALE , t ) ; } }
Source:
public void vlanBondNameMismatch ( ) { org.ovirt.engine.core.common.businessentities.VdsNetworkInterface bond = createBond ( org.ovirt.engine.core.bll.network.host.SetupNetworksHelperTest.BOND_NAME , null ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VdsNetworkInterface > ifacesToBond = createNics ( null ) ; org.ovirt.engine.core.common.action.SetupNetworksParameters parameters = createParametersForBond ( bond , ifacesToBond ) ; java.lang.String ifaceName = ( bond.getName ( ) ) + "1" ; parameters.getInterfaces ( ) . add ( createVlan ( ifaceName , 100 , "net" ) ) ; mockExistingIfacesWithBond ( bond , ifacesToBond ) ; org.ovirt.engine.core.bll.network.host.SetupNetworksHelper helper = createHelper ( parameters ) ; validateAndExpectViolation ( helper , VdcBllMessages.NETWORK_INTERFACES_DONT_EXIST , ifaceName ) ; }

Target:
public void vlanBondNameMismatch ( ) { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface bond = createBond ( org.ovirt.engine.core.bll.network.host.SetupNetworksHelperTest.BOND_NAME , null ) ; java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > ifacesToBond = createNics ( null ) ; org.ovirt.engine.core.common.action.SetupNetworksParameters parameters = createParametersForBond ( bond , ifacesToBond ) ; java.lang.String ifaceName = ( bond.getName ( ) ) + "1" ; parameters.getInterfaces ( ) . add ( createVlan ( ifaceName , 100 , "net" ) ) ; mockExistingIfacesWithBond ( bond , ifacesToBond ) ; org.ovirt.engine.core.bll.network.host.SetupNetworksHelper helper = createHelper ( parameters ) ; validateAndExpectViolation ( helper , VdcBllMessages.NETWORK_INTERFACES_DONT_EXIST , ifaceName ) ; }
Source:
private void addConfigurationTypes ( org.ovirt.engine.api.model.VersionCaps version , org.ovirt.engine.api.model.ConfigurationType [ ] types ) { if ( org.ovirt.engine.api.restapi.utils.VersionUtils.greaterOrEqual ( version , org.ovirt.engine.api.restapi.resource.BackendCapabilitiesResource.VERSION_3_3 ) ) { version.setConfigurationTypes ( new org.ovirt.engine.api.model.ConfigurationTypes ( ) ) ; for ( org.ovirt.engine.api.model.ConfigurationType type : types ) { version.getConfigurationTypes ( ) . getConfigurationTypes ( ) . add ( type.value ( ) ) ; } } }

Target:
private void addConfigurationTypes ( org.ovirt.engine.api.model.VersionCaps version , org.ovirt.engine.api.model.ConfigurationType [ ] types ) { version.setConfigurationTypes ( new org.ovirt.engine.api.model.ConfigurationTypes ( ) ) ; for ( org.ovirt.engine.api.model.ConfigurationType type : types ) { version.getConfigurationTypes ( ) . getConfigurationTypes ( ) . add ( type.value ( ) ) ; } }
Source:
public void testDisksUsagesWithNullEntry ( ) { java.lang.Object [ ] disksUsages = org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectBuilderTest.initDisksUsageData ( ) ; disksUsages [ 1 ] = null ; java.util.Map < java.lang.String , java.lang.Object > xml = org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectBuilderTest.setDisksUsageInXmlRpc ( disksUsages ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectBuilderTest.validateDisksUsagesList ( getVmStatistics ( ) , disksUsages , xml ) ; }

Target:
public void testDisksUsagesWithNullEntry ( ) { java.lang.Object [ ] disksUsages = org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectBuilderTest.initDisksUsageData ( ) ; disksUsages [ 1 ] = null ; java.util.Map < java.lang.String , java.lang.Object > xml = org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectBuilderTest.setDisksUsageInXmlRpc ( disksUsages ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectBuilderTest.validateDisksUsagesList ( org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectBuilderTest.getVmStatistics ( ) , disksUsages , xml ) ; }
Source:
public boolean isRunning ( ) { return ( ( ( ( ( ( ( this ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.Up ) ) || ( ( this ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.PoweredDown ) ) ) || ( ( this ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.PoweringDown ) ) ) || ( ( this ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.PoweringUp ) ) ) || ( ( this ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.MigratingFrom ) ) ) || ( ( this ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.WaitForLaunch ) ) ) || ( ( this ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.RebootInProgress ) ) ; }

Target:
public boolean isRunning ( ) { return ( ( ( ( ( ( this ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.Up ) ) || ( ( this ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.PoweringDown ) ) ) || ( ( this ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.PoweringUp ) ) ) || ( ( this ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.MigratingFrom ) ) ) || ( ( this ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.WaitForLaunch ) ) ) || ( ( this ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.RebootInProgress ) ) ; }
Source:
private java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > createDiskImageList ( ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage disk = new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ; disk.setImageId ( diskImageId ) ; disk.setStorageIds ( new java.util.ArrayList < org.ovirt.engine.core.compat.Guid > ( java.util.Arrays.asList ( storageDomainId ) ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > diskImageList = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.DiskImage > ( ) ; diskImageList.add ( disk ) ; return diskImageList ; }

Target:
private java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > createDiskImageList ( ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage disk = new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ; disk.setImageId ( diskImageId ) ; disk.setStorageIds ( new java.util.ArrayList ( java.util.Arrays.asList ( storageDomainId ) ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > diskImageList = new java.util.ArrayList < > ( ) ; diskImageList.add ( disk ) ; return diskImageList ; }
Source:
public void testAddExistingBlockDomainSuccessfully ( ) { org.mockito.Mockito.when ( command.getStorageDomainStaticDAO ( ) . get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( null ) ; org.mockito.Mockito.when ( command.getLUNsFromVgInfo ( parameters.getStorageDomain ( ) . getStorage ( ) ) ) . thenReturn ( org.ovirt.engine.core.bll.storage.AddExistingBlockStorageDomainCommandTest.getLUNs ( ) ) ; command.executeCommand ( ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getSucceeded ( ) ) ; }

Target:
public void testAddExistingBlockDomainSuccessfully ( ) { org.mockito.Mockito.when ( command.getLUNsFromVgInfo ( parameters.getStorageDomain ( ) . getStorage ( ) ) ) . thenReturn ( org.ovirt.engine.core.bll.storage.AddExistingBlockStorageDomainCommandTest.getLUNs ( ) ) ; command.executeCommand ( ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getSucceeded ( ) ) ; }
Source:
private void handleOperationException ( org.ovirt.engine.core.bll.adbroker.LdapSearchExceptionHandlingResponse response , java.lang.Throwable throwable , org.ovirt.engine.core.bll.adbroker.LdapCredentials credentials ) { response.setOrderingAlgorithm ( OrderingAlgorithmType.NO_OP ) . setTranslatedException ( new org.ovirt.engine.core.bll.adbroker.AuthenticationResultException ( org.ovirt.engine.core.utils.kerberos.AuthenticationResult.USER_ACCOUNT_DISABLED_OR_LOCKED , throwable ) ) . setTryNextServer ( false ) ; org.ovirt.engine.core.bll.adbroker.LdapBrokerUtils.logEventForUser ( credentials.getUserName ( ) , AuthenticationResult.USER_ACCOUNT_DISABLED_OR_LOCKED.getAuditLogType ( ) ) ; }

Target:
private void handleOperationException ( org.ovirt.engine.core.bll.adbroker.LdapSearchExceptionHandlingResponse response , java.lang.Throwable throwable , org.ovirt.engine.core.bll.adbroker.LdapCredentials credentials ) { response.setOrderingAlgorithm ( OrderingAlgorithmType.NO_OP ) . setTranslatedException ( new org.ovirt.engine.core.bll.adbroker.AuthenticationResultException ( org.ovirt.engine.core.utils.kerberos.AuthenticationResult.USER_ACCOUNT_DISABLED_OR_LOCKED , throwable ) ) . setTryNextServer ( false ) ; }
Source:
protected boolean canDoAction ( ) { org.ovirt.engine.core.bll.provider.RemoveProviderCommand.RemoveProviderValidator validator = new org.ovirt.engine.core.bll.provider.RemoveProviderCommand.RemoveProviderValidator ( vmDao , getDeletedProvider ( ) ) ; return ( ( validate ( validator.providerIsSet ( ) ) ) && ( validate ( validator.providerNetworksNotUsed ( ) ) ) ) && ( validateRemoveProvider ( ) ) ; }

Target:
protected boolean validate ( ) { org.ovirt.engine.core.bll.provider.RemoveProviderCommand.RemoveProviderValidator validator = new org.ovirt.engine.core.bll.provider.RemoveProviderCommand.RemoveProviderValidator ( vmDao , getDeletedProvider ( ) ) ; return ( ( validate ( validator.providerIsSet ( ) ) ) && ( validate ( validator.providerNetworksNotUsed ( ) ) ) ) && ( validateRemoveProvider ( ) ) ; }
Source:
public com.google.gwt.safehtml.shared.SafeHtml getTooltip ( org.ovirt.engine.core.common.businessentities.storage.Disk object ) { if ( ( object.getLastAlignmentScan ( ) ) != null ) { java.lang.String lastScanDate = com.google.gwt.i18n.client.DateTimeFormat.getFormat ( "yyyy-MM-dd, HH:mm" ) . format ( object.getLastAlignmentScan ( ) ) ; return com.google.gwt.safehtml.shared.SafeHtmlUtils.fromString ( org.ovirt.engine.ui.common.widget.uicommon.disks.DisksViewColumns.messages.lastDiskAlignment ( lastScanDate ) ) ; } return null ; }

Target:
public java.lang.String getTooltip ( org.ovirt.engine.core.common.businessentities.storage.Disk object ) { if ( ( object.getLastAlignmentScan ( ) ) != null ) { java.lang.String lastScanDate = com.google.gwt.i18n.client.DateTimeFormat.getFormat ( "yyyy-MM-dd, HH:mm" ) . format ( object.getLastAlignmentScan ( ) ) ; return org.ovirt.engine.ui.common.widget.uicommon.disks.DisksViewColumns.messages.lastDiskAlignment ( lastScanDate ) ; } return null ; }
Source:
public void setItems ( java.util.Collection value ) { if ( value == null ) { super . setItems ( null ) ; return ; } java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > disks = org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.Disk > cast ( value ) ; super . setItems ( disks ) ; }

Target:
public void setItems ( java.util.Collection < org.ovirt.engine.core.common.businessentities.Disk > disks ) { if ( disks == null ) { super . setItems ( null ) ; return ; } super . setItems ( disks ) ; }
Source:
public void storageDomainIdWithStorageDomain ( ) { final org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase b = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; final org.ovirt.engine.core.common.businessentities.storage_domains s = new org.ovirt.engine.core.common.businessentities.storage_domains ( ) ; s.setId ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID ) ; b.setStorageDomain ( s ) ; final org.ovirt.engine.core.compat.NGuid g = b.getStorageDomainId ( ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID , g ) ; }

Target:
public void storageDomainIdWithStorageDomain ( ) { final org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase b = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; final org.ovirt.engine.core.common.businessentities.StorageDomain s = new org.ovirt.engine.core.common.businessentities.StorageDomain ( ) ; s.setId ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID ) ; b.setStorageDomain ( s ) ; final org.ovirt.engine.core.compat.NGuid g = b.getStorageDomainId ( ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID , g ) ; }
Source:
void registerSelectionChangeHandler ( final org.ovirt.engine.ui.common.widget.action.ActionButtonDefinition < T > buttonDef ) { final org.ovirt.engine.ui.uicompat.IEventListener itemSelectionChangeHandler = new org.ovirt.engine.ui.uicompat.IEventListener ( ) { @ java.lang.Override public void eventRaised ( org.ovirt.engine.ui.common.widget.action.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { buttonDef.update ( ) ; } } ; addSelectionChangeListener ( itemSelectionChangeHandler ) ; eventBus.addHandler ( org.ovirt.engine.ui.common.uicommon.model.UiCommonInitEvent.getType ( ) , new org.ovirt.engine.ui.common.uicommon.model.UiCommonInitEvent.UiCommonInitHandler ( ) { @ java.lang.Override public void onUiCommonInit ( org.ovirt.engine.ui.common.uicommon.model.UiCommonInitEvent event ) { addSelectionChangeListener ( itemSelectionChangeHandler ) ; } } ) ; }

Target:
void registerSelectionChangeHandler ( final org.ovirt.engine.ui.common.widget.action.ActionButtonDefinition < T > buttonDef ) { final org.ovirt.engine.ui.uicompat.IEventListener itemSelectionChangeHandler = new org.ovirt.engine.ui.uicompat.IEventListener ( ) { @ java.lang.Override public void eventRaised ( org.ovirt.engine.ui.common.widget.action.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { buttonDef.update ( ) ; } } ; addSelectionChangeListener ( itemSelectionChangeHandler ) ; }
Source:
public void testGetEntityNameByIdAndTypeForVmPool ( ) { org.ovirt.engine.core.common.businessentities.VmPool vmPool = dbFacade.getVmPoolDao ( ) . get ( org.ovirt.engine.core.dao.DbFacadeDAOTest.VM_POOL_ID ) ; org.junit.Assert.assertNotNull ( vmPool ) ; java.lang.String name = vmPool.getVmPoolName ( ) ; org.junit.Assert.assertTrue ( name.equals ( dbFacade.getEntityNameByIdAndType ( org.ovirt.engine.core.dao.DbFacadeDAOTest.VM_POOL_ID , VdcObjectType.VmPool ) ) ) ; }

Target:
public void testGetEntityNameByIdAndTypeForVmPool ( ) { org.ovirt.engine.core.common.businessentities.VmPool vmPool = dbFacade.getVmPoolDao ( ) . get ( org.ovirt.engine.core.dao.DbFacadeDAOTest.VM_POOL_ID ) ; org.junit.Assert.assertNotNull ( vmPool ) ; java.lang.String name = vmPool.getName ( ) ; org.junit.Assert.assertTrue ( name.equals ( dbFacade.getEntityNameByIdAndType ( org.ovirt.engine.core.dao.DbFacadeDAOTest.VM_POOL_ID , VdcObjectType.VmPool ) ) ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.network.VnicProfile findVnicProfileForUser ( org.ovirt.engine.core.compat.Guid userId , org.ovirt.engine.core.common.businessentities.network.Network network ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.VnicProfile > networkProfiles = getVnicProfileDao ( ) . getAllForNetwork ( network.getId ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.VnicProfile profile : networkProfiles ) { if ( isVnicProfilePermitted ( userId , profile , profile.isPortMirroring ( ) ) ) { return profile ; } } return null ; }

Target:
private org.ovirt.engine.core.common.businessentities.network.VnicProfile findVnicProfileForUser ( org.ovirt.engine.core.compat.Guid userId , org.ovirt.engine.core.common.businessentities.network.Network network ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.VnicProfile > networkProfiles = getVnicProfileDao ( ) . getAllForNetwork ( network.getId ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.VnicProfile profile : networkProfiles ) { if ( isVnicProfilePermitted ( userId , profile , false ) ) { return profile ; } } return null ; }
Source:
public void testAddIncompleteParameters2 ( ) throws java.lang.Exception { org.ovirt.engine.api.model.Disk model = org.ovirt.engine.api.restapi.resource.BackendVmDisksResourceTest.getModel ( ) ; model.setProvisionedSize ( null ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; control.replay ( ) ; try { collection.add ( model ) ; fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "Disk" , "testAddIncompleteParameters2" , "provisionedSize|size" ) ; } }

Target:
public void testAddIncompleteParameters2 ( ) throws java.lang.Exception { org.ovirt.engine.api.model.Disk model = org.ovirt.engine.api.restapi.resource.BackendVmDisksResourceTest.getModel ( ) ; model.setProvisionedSize ( null ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; try { collection.add ( model ) ; fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "Disk" , "testAddIncompleteParameters2" , "provisionedSize|size" ) ; } }
Source:
protected void setupForStorageTests ( ) { org.mockito.Mockito.doReturn ( multipleSdValidator ) . when ( command ) . getStorageDomainsValidator ( org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.compat.Guid.class ) , org.mockito.ArgumentMatchers.anySet ( ) ) ; org.mockito.Mockito.doReturn ( ValidationResult.VALID ) . when ( multipleSdValidator ) . allDomainsWithinThresholds ( ) ; org.mockito.Mockito.doReturn ( ValidationResult.VALID ) . when ( multipleSdValidator ) . allDomainsHaveSpaceForNewDisks ( org.mockito.ArgumentMatchers.anyList ( ) ) ; }

Target:
protected void setupForStorageTests ( ) { org.mockito.Mockito.doReturn ( multipleSdValidator ) . when ( command ) . getStorageDomainsValidator ( org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.compat.Guid.class ) , org.mockito.ArgumentMatchers.anySet ( ) ) ; }
Source:
public void testInActiveDomainInList ( ) { org.ovirt.engine.core.common.action.StoragePoolParametersBase param = new org.ovirt.engine.core.common.action.StoragePoolParametersBase ( ) ; org.ovirt.engine.core.bll.storage.RemoveStoragePoolCommand < org.ovirt.engine.core.common.action.StoragePoolParametersBase > cmd = org.ovirt.engine.core.bll.storage.RemoveStoragePoolCommandTest.createCommand ( param ) ; java.util.List < org.ovirt.engine.core.common.businessentities.storage_domains > domainsList = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage_domains > ( ) ; org.ovirt.engine.core.common.businessentities.storage_domains tempStorageDomains = new org.ovirt.engine.core.common.businessentities.storage_domains ( ) ; tempStorageDomains.setstatus ( StorageDomainStatus.InActive ) ; domainsList.add ( tempStorageDomains ) ; java.util.List < org.ovirt.engine.core.common.businessentities.storage_domains > listReturned = cmd.getActiveOrLockedDomainList ( domainsList ) ; org.junit.Assert.assertTrue ( listReturned.isEmpty ( ) ) ; }

Target:
public void testInActiveDomainInList ( ) { org.ovirt.engine.core.common.action.StoragePoolParametersBase param = new org.ovirt.engine.core.common.action.StoragePoolParametersBase ( ) ; org.ovirt.engine.core.bll.storage.RemoveStoragePoolCommand < org.ovirt.engine.core.common.action.StoragePoolParametersBase > cmd = org.ovirt.engine.core.bll.storage.RemoveStoragePoolCommandTest.createCommand ( param ) ; java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > domainsList = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) ; org.ovirt.engine.core.common.businessentities.StorageDomain tempStorageDomains = new org.ovirt.engine.core.common.businessentities.StorageDomain ( ) ; tempStorageDomains.setstatus ( StorageDomainStatus.InActive ) ; domainsList.add ( tempStorageDomains ) ; java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > listReturned = cmd.getActiveOrLockedDomainList ( domainsList ) ; org.junit.Assert.assertTrue ( listReturned.isEmpty ( ) ) ; }
Source:
protected void updateLinkChangability ( ) { boolean isPlugged = ( ( java.lang.Boolean ) ( getPlugged ( ) . getEntity ( ) ) ) ; boolean isNullNetworkSelected = ( getNetwork ( ) . getSelectedItem ( ) ) == null ; if ( isNullNetworkSelected ) { getLinked ( ) . setIsChangable ( false ) ; return ; } if ( ! ( hotUpdateSupported ) ) { getLinked ( ) . setIsChangable ( false ) ; return ; } getLinked ( ) . setIsChangable ( true ) ; }

Target:
protected void updateLinkChangability ( ) { boolean isNullNetworkSelected = ( getNetwork ( ) . getSelectedItem ( ) ) == null ; if ( isNullNetworkSelected ) { getLinked ( ) . setIsChangable ( false ) ; return ; } if ( ! ( hotUpdateSupported ) ) { getLinked ( ) . setIsChangable ( false ) ; return ; } getLinked ( ) . setIsChangable ( true ) ; }
Source:
protected void ExecuteIrsBrokerCommand ( ) { if ( org.ovirt.engine.core.vdsbroker.irsbroker.SPMGetTaskInfoVDSCommand.getCurrentIrsProxyData ( ) . getCurrentVdsId ( ) . equals ( Guid.Empty ) ) { setReturnValue ( new org.ovirt.engine.core.vdsbroker.irsbroker.AsyncTaskCreationInfo ( ) ) ; } else { setReturnValue ( org.ovirt.engine.core.vdsbroker.irsbroker.ResourceManager.getInstance ( ) . runVdsCommand ( VDSCommandType.HSMGetTaskInfo , new org.ovirt.engine.core.vdsbroker.irsbroker.HSMTaskGuidBaseVDSCommandParameters ( org.ovirt.engine.core.vdsbroker.irsbroker.SPMGetTaskInfoVDSCommand.getCurrentIrsProxyData ( ) . getCurrentVdsId ( ) , org.ovirt.engine.core.vdsbroker.irsbroker.SPMGetTaskInfoVDSCommand.getParameters ( ) . getTaskId ( ) ) ) . getReturnValue ( ) ) ; } }

Target:
protected void ExecuteIrsBrokerCommand ( ) { setReturnValue ( org.ovirt.engine.core.vdsbroker.irsbroker.ResourceManager.getInstance ( ) . runVdsCommand ( VDSCommandType.HSMGetTaskInfo , new org.ovirt.engine.core.vdsbroker.irsbroker.HSMTaskGuidBaseVDSCommandParameters ( org.ovirt.engine.core.vdsbroker.irsbroker.SPMGetTaskInfoVDSCommand.getCurrentIrsProxyData ( ) . getCurrentVdsId ( ) , org.ovirt.engine.core.vdsbroker.irsbroker.SPMGetTaskInfoVDSCommand.getParameters ( ) . getTaskId ( ) ) ) . getReturnValue ( ) ) ; }
Source:
public < T > org.ovirt.engine.ui.webadmin.uicommon.model.NodeInfo < ? > getNodeInfo ( T parent ) { if ( parent != null ) { org.ovirt.engine.ui.uicommonweb.models.SystemTreeItemModel parentModel = ( ( org.ovirt.engine.ui.uicommonweb.models.SystemTreeItemModel ) ( parent ) ) ; java.util.List < org.ovirt.engine.ui.uicommonweb.models.SystemTreeItemModel > children = parentModel.getChildren ( ) ; return new org.ovirt.engine.ui.webadmin.uicommon.model.DefaultNodeInfo < org.ovirt.engine.ui.uicommonweb.models.SystemTreeItemModel > ( new com.google.gwt.view.client.ListDataProvider < org.ovirt.engine.ui.uicommonweb.models.SystemTreeItemModel > ( children ) , cell , selectionModel , selectionManager , null ) ; } else { return new org.ovirt.engine.ui.webadmin.uicommon.model.DefaultNodeInfo < org.ovirt.engine.ui.uicommonweb.models.SystemTreeItemModel > ( getDataProvider ( ) , cell , selectionModel , selectionManager , null ) ; } }

Target:
public < T > org.ovirt.engine.ui.webadmin.uicommon.model.NodeInfo < ? > getNodeInfo ( T parent ) { if ( parent != null ) { org.ovirt.engine.ui.uicommonweb.models.SystemTreeItemModel parentModel = ( ( org.ovirt.engine.ui.uicommonweb.models.SystemTreeItemModel ) ( parent ) ) ; java.util.List < org.ovirt.engine.ui.uicommonweb.models.SystemTreeItemModel > children = parentModel.getChildren ( ) ; return new org.ovirt.engine.ui.webadmin.uicommon.model.DefaultNodeInfo ( new com.google.gwt.view.client.ListDataProvider ( children ) , cell , selectionModel , selectionManager , null ) ; } else { return new org.ovirt.engine.ui.webadmin.uicommon.model.DefaultNodeInfo ( getDataProvider ( ) , cell , selectionModel , selectionManager , null ) ; } }
Source:
private java.util.List < org.ovirt.engine.core.common.businessentities.storage.LUNs > getLUNs ( org.ovirt.engine.core.compat.Guid sdId , java.lang.String vgId ) { org.ovirt.engine.core.common.businessentities.storage.LUNs lun1 = new org.ovirt.engine.core.common.businessentities.storage.LUNs ( ) ; lun1.setStorageDomainId ( sdId ) ; lun1.setVolumeGroupId ( vgId ) ; lun1.setLunConnections ( new java.util.ArrayList ( getConnections ( ) ) ) ; org.ovirt.engine.core.common.businessentities.storage.LUNs lun2 = new org.ovirt.engine.core.common.businessentities.storage.LUNs ( ) ; lun2.setStorageDomainId ( sdId ) ; lun2.setVolumeGroupId ( vgId ) ; lun2.setLunConnections ( new java.util.ArrayList ( getConnections ( ) ) ) ; return new java.util.ArrayList ( java.util.Arrays.asList ( lun1 , lun2 ) ) ; }

Target:
private java.util.List < org.ovirt.engine.core.common.businessentities.storage.LUNs > getLUNs ( org.ovirt.engine.core.compat.Guid sdId , java.lang.String vgId ) { org.ovirt.engine.core.common.businessentities.storage.LUNs lun1 = new org.ovirt.engine.core.common.businessentities.storage.LUNs ( ) ; lun1.setStorageDomainId ( sdId ) ; lun1.setVolumeGroupId ( vgId ) ; lun1.setLunConnections ( getConnections ( ) ) ; org.ovirt.engine.core.common.businessentities.storage.LUNs lun2 = new org.ovirt.engine.core.common.businessentities.storage.LUNs ( ) ; lun2.setStorageDomainId ( sdId ) ; lun2.setVolumeGroupId ( vgId ) ; lun2.setLunConnections ( getConnections ( ) ) ; return new java.util.ArrayList ( java.util.Arrays.asList ( lun1 , lun2 ) ) ; }
Source:
protected void sortStorageDomains ( java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > domainsInPool , java.util.Collection < org.ovirt.engine.core.common.businessentities.storage.DiskImage > vmDisks ) { java.util.Comparator < org.ovirt.engine.core.common.businessentities.StorageDomain > comp = null ; for ( java.util.Comparator < org.ovirt.engine.core.common.businessentities.StorageDomain > comparator : getStorageDomainComparators ( vmDisks ) ) { comp = ( comp == null ) ? comparator.reversed ( ) : comp.thenComparing ( comparator.reversed ( ) ) ; } java.util.Collections.sort ( domainsInPool , comp ) ; }

Target:
protected void sortStorageDomains ( java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > domainsInPool , java.util.Collection < org.ovirt.engine.core.common.businessentities.storage.DiskImage > vmDisks ) { java.util.Comparator < org.ovirt.engine.core.common.businessentities.StorageDomain > comp = null ; for ( java.util.Comparator < org.ovirt.engine.core.common.businessentities.StorageDomain > comparator : getStorageDomainComparators ( vmDisks ) ) { comp = ( comp == null ) ? comparator : comp.thenComparing ( comparator ) ; } java.util.Collections.sort ( domainsInPool , comp ) ; }
Source:
protected java.util.Map < java.lang.String , org.ovirt.engine.core.common.utils.Pair < java.lang.String , java.lang.String > > getExclusiveLocks ( ) { if ( ! ( org.apache.commons.lang.StringUtils.isBlank ( getParameters ( ) . getVm ( ) . getVmName ( ) ) ) ) { return java.util.Collections.singletonMap ( getParameters ( ) . getVm ( ) . getVmName ( ) , LockMessagesMatchUtil.VM_NAME ) ; } return null ; }

Target:
protected java.util.Map < java.lang.String , org.ovirt.engine.core.common.utils.Pair < java.lang.String , java.lang.String > > getExclusiveLocks ( ) { if ( ! ( org.apache.commons.lang.StringUtils.isBlank ( getParameters ( ) . getVm ( ) . getName ( ) ) ) ) { return java.util.Collections.singletonMap ( getParameters ( ) . getVm ( ) . getName ( ) , LockMessagesMatchUtil.VM_NAME ) ; } return null ; }
Source:
private void verifyResult ( java.lang.String left , java.lang.String right , int expectedResult ) { org.junit.Assert.assertEquals ( java.lang.String.format ( "Expected %1$s to be %3$s %2$s, but it wasn't." , left , right , ( expectedResult == ( - 1 ) ? "less than" : expectedResult == 1 ? "greater than" : "equal to" ) ) , java.lang.Integer.signum ( expectedResult ) , java.lang.Integer.signum ( comparator.compare ( left , right ) ) ) ; }

Target:
private void verifyResult ( java.lang.String left , java.lang.String right , int expectedResult ) { org.junit.Assert.assertEquals ( java.lang.String.format ( "Expected %1$s to be %3$s %2$s, but it wasn't." , left , right , ( expectedResult == ( - 1 ) ? "less than" : expectedResult == 1 ? "greater than" : "equal to" ) ) , expectedResult , comparator.compare ( left , right ) ) ; }
Source:
public void getDataCenterMaxNameLength ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { 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 != null ? ( ( java.lang.Integer ) ( source ) ) . intValue ( ) : 1 ; } } ; getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.StoragePoolNameSizeLimit , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public void getDataCenterMaxNameLength ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { 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 != null ? ( ( java.lang.Integer ) ( source ) ) : 1 ; } } ; getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.StoragePoolNameSizeLimit , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
private void addViolation ( org.ovirt.engine.core.common.errors.VdcBllMessages violation , java.lang.String violatingEntity ) { java.util.List < java.lang.String > violatingEntities = violations.get ( violation ) ; if ( violatingEntities == null ) { violatingEntities = new java.util.ArrayList < > ( ) ; violations.put ( violation , violatingEntities ) ; } violatingEntities.add ( violatingEntity ) ; }

Target:
private void addViolation ( org.ovirt.engine.core.common.errors.EngineMessage violation , java.lang.String violatingEntity ) { java.util.List < java.lang.String > violatingEntities = violations.get ( violation ) ; if ( violatingEntities == null ) { violatingEntities = new java.util.ArrayList < > ( ) ; violations.put ( violation , violatingEntities ) ; } violatingEntities.add ( violatingEntity ) ; }
Source:
public void addNotEmptyIdConnection ( ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections newPosixConnection = createPosixConnection ( "multipass.my.domain.tlv.company.com:/export/allstorage/data1" , StorageType.POSIXFS , "nfs" , "timeo=30" ) ; newPosixConnection.setid ( org.ovirt.engine.core.compat.Guid.newGuid ( ) . toString ( ) ) ; parameters.setStorageServerConnection ( newPosixConnection ) ; parameters.setVdsId ( Guid.Empty ) ; org.mockito.Mockito.doReturn ( true ) . when ( command ) . isConnWithSameDetailsExists ( newPosixConnection , null ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( command , EngineMessage.ACTION_TYPE_FAILED_STORAGE_CONNECTION_ID_NOT_EMPTY ) ; }

Target:
public void addNotEmptyIdConnection ( ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections newPosixConnection = createPosixConnection ( "multipass.my.domain.tlv.company.com:/export/allstorage/data1" , StorageType.POSIXFS , "nfs" , "timeo=30" ) ; newPosixConnection.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) . toString ( ) ) ; parameters.setStorageServerConnection ( newPosixConnection ) ; parameters.setVdsId ( Guid.Empty ) ; org.mockito.Mockito.doReturn ( true ) . when ( command ) . isConnWithSameDetailsExists ( newPosixConnection , null ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( command , EngineMessage.ACTION_TYPE_FAILED_STORAGE_CONNECTION_ID_NOT_EMPTY ) ; }
Source:
public void calculateNetworkImplementationDetailsNetworkOutOfSyncWithMtuUnset ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.VdsNetworkInterface iface = createNetworkDevice ( ) ; calculateNetworkImplementationDetailsAndAssertSync ( iface , false , iface.getNetworkName ( ) , ( ! ( iface.isBridged ( ) ) ) , 0 , org.ovirt.engine.core.utils.RandomUtils.instance ( ) . nextInt ( ) ) ; }

Target:
public void calculateNetworkImplementationDetailsNetworkOutOfSyncWithMtuUnset ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface = createNetworkDevice ( ) ; calculateNetworkImplementationDetailsAndAssertSync ( iface , false , iface.getNetworkName ( ) , ( ! ( iface.isBridged ( ) ) ) , 0 , org.ovirt.engine.core.utils.RandomUtils.instance ( ) . nextInt ( ) ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { java.util.HashMap < java.lang.Integer , java.lang.String > result = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ; java.lang.String defaultValue = result.get ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.DEFAULT_OS_ID ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.osNames = new org.ovirt.engine.ui.uicommonweb.MapWithDefaults < java.lang.Integer , java.lang.String > ( result , defaultValue ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.initOsIds ( ) ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.osNames = ( ( java.util.HashMap < java.lang.Integer , java.lang.String > ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ) ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.initOsIds ( ) ; }
Source:
protected boolean canDoAction ( ) { boolean retValue = false ; if ( super . canDoAction ( ) ) { for ( org.ovirt.engine.core.common.businessentities.DiskImage diskImage : getDiskImagesToBeCloned ( ) ) { retValue = checkImageConfiguration ( diskImage ) ; if ( ! retValue ) { break ; } } retValue = true ; } return retValue ; }

Target:
protected boolean canDoAction ( ) { if ( super . canDoAction ( ) ) { for ( org.ovirt.engine.core.common.businessentities.DiskImage diskImage : getDiskImagesToBeCloned ( ) ) { if ( ! ( checkImageConfiguration ( diskImage ) ) ) { return false ; } } return true ; } return false ; }
Source:
public void testAddIncompleteParameters ( ) throws java.lang.Exception { org.ovirt.engine.api.model.StorageDomain model = new org.ovirt.engine.api.model.StorageDomain ( ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; control.replay ( ) ; try { collection.add ( model ) ; fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "StorageDomain" , "add" , "id|name" ) ; } }

Target:
public void testAddIncompleteParameters ( ) throws java.lang.Exception { org.ovirt.engine.api.model.StorageDomain model = new org.ovirt.engine.api.model.StorageDomain ( ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; try { collection.add ( model ) ; fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "StorageDomain" , "add" , "id|name" ) ; } }
Source:
public void validateInvalidDestinationDomain ( ) { org.ovirt.engine.core.common.businessentities.StorageDomain srcStorageDomain = initStorageDomain ( srcStorageId ) ; srcStorageDomain.setStatus ( StorageDomainStatus.Active ) ; org.ovirt.engine.core.common.businessentities.StorageDomain dstStorageDomain = initStorageDomain ( dstStorageId ) ; dstStorageDomain.setStorageDomainType ( StorageDomainType.ISO ) ; initDiskImage ( diskImageGroupId , diskImageId ) ; initVm ( VMStatus.Up , org.ovirt.engine.core.compat.Guid.newGuid ( ) , diskImageGroupId ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( command , EngineMessage.ACTION_TYPE_FAILED_STORAGE_DOMAIN_TYPE_ILLEGAL ) ; }

Target:
public void validateInvalidDestinationDomain ( ) { initStorageDomain ( srcStorageId ) ; org.ovirt.engine.core.common.businessentities.StorageDomain dstStorageDomain = initStorageDomain ( dstStorageId ) ; dstStorageDomain.setStorageDomainType ( StorageDomainType.ISO ) ; initDiskImage ( diskImageGroupId , diskImageId ) ; initVm ( VMStatus.Up , org.ovirt.engine.core.compat.Guid.newGuid ( ) , diskImageGroupId ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( command , EngineMessage.ACTION_TYPE_FAILED_STORAGE_DOMAIN_TYPE_ILLEGAL ) ; }
Source:
public void getNetworkConnectivityCheckTimeoutInSeconds ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { 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 != null ? ( ( java.lang.Integer ) ( source ) ) . intValue ( ) : 120 ; } } ; getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.NetworkConnectivityCheckTimeoutInSeconds , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public void getNetworkConnectivityCheckTimeoutInSeconds ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { 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 != null ? ( ( java.lang.Integer ) ( source ) ) : 120 ; } } ; getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.NetworkConnectivityCheckTimeoutInSeconds , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
private void plugToExternalNetwork ( ) { java.util.Map < java.lang.String , java.lang.String > runtimeProperties = getProviderProxy ( ) . allocate ( getNetwork ( ) , vnicProfile , org.ovirt.engine.core.bll.network.vm.ActivateDeactivateVmNicCommand.getParameters ( ) . getNic ( ) ) ; if ( runtimeProperties != null ) { org.ovirt.engine.core.bll.network.vm.ActivateDeactivateVmNicCommand.getVm ( ) . getRuntimeDeviceCustomProperties ( ) . put ( vmDevice , runtimeProperties ) ; } }

Target:
private void plugToExternalNetwork ( ) { java.util.Map < java.lang.String , java.lang.String > runtimeProperties = getProviderProxy ( ) . allocate ( getNetwork ( ) , vnicProfile , org.ovirt.engine.core.bll.network.vm.ActivateDeactivateVmNicCommand.getParameters ( ) . getNic ( ) ) ; if ( runtimeProperties != null ) { org.ovirt.engine.core.bll.network.vm.ActivateDeactivateVmNicCommand.getVm ( ) . getRuntimeDeviceCustomProperties ( ) . put ( vmDevice.getId ( ) , runtimeProperties ) ; } }
Source:
public java.util.List < org.ovirt.engine.core.common.businessentities.VDS > getAllForVdsGroupWithStatus ( org.ovirt.engine.core.compat.Guid vdsGroupId , org.ovirt.engine.core.common.businessentities.VDSStatus status ) { return getCallsHandler ( ) . executeReadList ( "getVdsForVdsGroupWithStatus" , new org.ovirt.engine.core.dao.VdsDAODbFacadeImpl.VdsRowMapper ( ) , getCustomMapSqlParameterSource ( ) . addValue ( "vds_group_id" , vdsGroupId ) . addValue ( "status" , status.getValue ( ) ) ) ; }

Target:
public java.util.List < org.ovirt.engine.core.common.businessentities.VDS > getAllForVdsGroupWithStatus ( org.ovirt.engine.core.compat.Guid vdsGroupId , org.ovirt.engine.core.common.businessentities.VDSStatus status ) { return getCallsHandler ( ) . executeReadList ( "getVdsForVdsGroupWithStatus" , org.ovirt.engine.core.dao.VdsDAODbFacadeImpl.VdsRowMapper.instance , getCustomMapSqlParameterSource ( ) . addValue ( "vds_group_id" , vdsGroupId ) . addValue ( "status" , status.getValue ( ) ) ) ; }
Source:
protected void performLiveSnapshot ( final org.ovirt.engine.core.common.businessentities.Snapshot snapshot ) { try { org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInScope ( TransactionScopeOption.Suppress , new org.ovirt.engine.core.utils.transaction.TransactionMethod < java.lang.Void > ( ) { @ java.lang.Override public java.lang.Void runInTransaction ( ) { runVdsCommand ( VDSCommandType.Snapshot , buildLiveSnapshotParameters ( snapshot ) ) ; return null ; } } ) ; } catch ( org.ovirt.engine.core.common.errors.VdcBLLException e ) { handleVdsLiveSnapshotFailure ( e ) ; } }

Target:
protected boolean performLiveSnapshot ( final org.ovirt.engine.core.common.businessentities.Snapshot snapshot ) { try { org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInScope ( TransactionScopeOption.Suppress , new org.ovirt.engine.core.utils.transaction.TransactionMethod < java.lang.Void > ( ) { @ java.lang.Override public java.lang.Void runInTransaction ( ) { runVdsCommand ( VDSCommandType.Snapshot , buildLiveSnapshotParameters ( snapshot ) ) ; return null ; } } ) ; } catch ( org.ovirt.engine.core.common.errors.VdcBLLException e ) { handleVdsLiveSnapshotFailure ( e ) ; return false ; } return true ; }
Source:
protected boolean validateImages ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > imagesToValidate = org.ovirt.engine.core.bll.ImagesHandler.filterImageDisks ( org.ovirt.engine.core.bll.RemoveSnapshotCommand.getDiskDao ( ) . getAllForVm ( org.ovirt.engine.core.bll.RemoveSnapshotCommand.getVmId ( ) ) , true , false ) ; org.ovirt.engine.core.bll.validator.DiskImagesValidator diskImagesValidator = new org.ovirt.engine.core.bll.validator.DiskImagesValidator ( imagesToValidate ) ; return ( validate ( diskImagesValidator.diskImagesNotLocked ( ) ) ) && ( org.ovirt.engine.core.bll.ImagesHandler.PerformImagesChecks ( org.ovirt.engine.core.bll.RemoveSnapshotCommand.getReturnValue ( ) . getCanDoActionMessages ( ) , org.ovirt.engine.core.bll.RemoveSnapshotCommand.getVm ( ) . getStoragePoolId ( ) , true , true , true , imagesToValidate ) ) ; }

Target:
protected boolean validateImages ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > imagesToValidate = org.ovirt.engine.core.bll.ImagesHandler.filterImageDisks ( org.ovirt.engine.core.bll.RemoveSnapshotCommand.getDiskDao ( ) . getAllForVm ( org.ovirt.engine.core.bll.RemoveSnapshotCommand.getVmId ( ) ) , true , false ) ; org.ovirt.engine.core.bll.validator.DiskImagesValidator diskImagesValidator = new org.ovirt.engine.core.bll.validator.DiskImagesValidator ( imagesToValidate ) ; return ( validate ( diskImagesValidator.diskImagesNotLocked ( ) ) ) && ( org.ovirt.engine.core.bll.ImagesHandler.PerformImagesChecks ( org.ovirt.engine.core.bll.RemoveSnapshotCommand.getReturnValue ( ) . getCanDoActionMessages ( ) , org.ovirt.engine.core.bll.RemoveSnapshotCommand.getVm ( ) . getStoragePoolId ( ) , true , true , imagesToValidate ) ) ; }
Source:
private static boolean shouldPerformRecoveryOnType ( java.lang.String type ) { java.util.Map < java.lang.String , java.lang.String > allowedRecoveryTypesFromConfig = org.ovirt.engine.core.common.config.Config.< java.util.Map < java.lang.String , java.lang.String > > GetValue ( ConfigValues.AutoRecoveryAllowedTypes ) ; java.lang.String isAllowed = allowedRecoveryTypesFromConfig.get ( type ) ; if ( isAllowed != null ) { return java.lang.Boolean.parseBoolean ( isAllowed ) ; } return true ; }

Target:
private static boolean shouldPerformRecoveryOnType ( java.lang.String type ) { java.util.Map < java.lang.String , java.lang.String > allowedRecoveryTypesFromConfig = org.ovirt.engine.core.common.config.Config.< java.util.Map < java.lang.String , java.lang.String > > getValue ( ConfigValues.AutoRecoveryAllowedTypes ) ; java.lang.String isAllowed = allowedRecoveryTypesFromConfig.get ( type ) ; if ( isAllowed != null ) { return java.lang.Boolean.parseBoolean ( isAllowed ) ; } return true ; }
Source:
protected boolean allowedStorageDomain ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > sourceActiveStorageDomains , org.ovirt.engine.core.common.businessentities.storage.DiskImage diskImage , org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel templateDisk , org.ovirt.engine.core.common.businessentities.StorageDomain sd ) { if ( sourceActiveStorageDomains.contains ( sd ) ) { return false ; } return super . allowedStorageDomain ( sourceActiveStorageDomains , diskImage , templateDisk , sd ) ; }

Target:
protected boolean allowedStorageDomain ( java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > sourceActiveStorageDomains , org.ovirt.engine.core.common.businessentities.storage.DiskImage diskImage , org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel templateDisk , org.ovirt.engine.core.common.businessentities.StorageDomain sd ) { if ( sourceActiveStorageDomains.contains ( sd ) ) { return false ; } return super . allowedStorageDomain ( sourceActiveStorageDomains , diskImage , templateDisk , sd ) ; }
Source:
private void updateDisplayProtocol ( ) { org.ovirt.engine.core.common.businessentities.VDSGroup cluster = getSelectedCluster ( ) ; java.lang.Integer osType = getOSType ( ) . getSelectedItem ( ) ; if ( ( cluster == null ) || ( osType == null ) ) { return ; } java.util.List < org.ovirt.engine.core.common.businessentities.DisplayType > displayTypes = org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDisplayTypes ( osType , cluster.getcompatibility_version ( ) ) ; initDisplayProtocolWithTypes ( displayTypes ) ; }

Target:
private void updateDisplayProtocol ( ) { org.ovirt.engine.core.common.businessentities.VDSGroup cluster = getSelectedCluster ( ) ; java.lang.Integer osType = getOSType ( ) . getSelectedItem ( ) ; if ( ( cluster == null ) || ( osType == null ) ) { return ; } java.util.List < org.ovirt.engine.core.common.businessentities.DisplayType > displayTypes = org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getDisplayTypes ( osType , cluster.getcompatibility_version ( ) ) ; initDisplayProtocolWithTypes ( displayTypes ) ; }
Source:
public void testList ( ) throws java.lang.Exception { javax.ws.rs.core.UriInfo uriInfo = setUpUriExpectations ( null ) ; setGetVmQueryExpectations ( 1 ) ; setGetNetworksQueryExpectations ( 1 ) ; setGetGuestAgentQueryExpectations ( 3 ) ; setUpQueryExpectations ( "" ) ; collection.setUriInfo ( uriInfo ) ; verifyCollection ( getCollection ( ) ) ; }

Target:
public void testList ( ) throws java.lang.Exception { javax.ws.rs.core.UriInfo uriInfo = setUpUriExpectations ( null ) ; setGetGuestAgentQueryExpectations ( 3 ) ; setUpQueryExpectations ( "" ) ; collection.setUriInfo ( uriInfo ) ; verifyCollection ( getCollection ( ) ) ; }