auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
protected void initFrontend ( ) { frontend.setEventsHandler ( frontendEventsHandler ) ; frontend.getFrontendFailureEvent ( ) . addListener ( frontendFailureEventListener ) ; frontend.getFrontendNotLoggedInEvent ( ) . 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 ) { user.logout ( ) ; } } ) ; frontend.setFilterQueries ( filterFrontendQueries ( ) ) ; org.ovirt.engine.core.common.utils.SimpleDependecyInjector.getInstance ( ) . bind ( new org.ovirt.engine.core.searchbackend.OsValueAutoCompleter ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getOsUniqueOsNames ( ) ) ) ; }

Target:
protected void initFrontend ( ) { frontend.setEventsHandler ( frontendEventsHandler ) ; frontend.getFrontendFailureEvent ( ) . addListener ( frontendFailureEventListener ) ; frontend.getFrontendNotLoggedInEvent ( ) . 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 ) { user.logout ( ) ; } } ) ; frontend.setFilterQueries ( filterFrontendQueries ( ) ) ; }
Source:
public void testUpdateHotPlugDisk ( ) { org.ovirt.engine.core.common.businessentities.VmDevice vmDevice = dao.get ( getExistingEntityId ( ) ) ; boolean newPluggedValue = ! ( vmDevice.getIsPlugged ( ) ) ; junit.framework.Assert.assertTrue ( org.apache.commons.lang.StringUtils.isNotBlank ( vmDevice.getAddress ( ) ) ) ; vmDevice.setIsPlugged ( newPluggedValue ) ; dao.updateHotPlugDisk ( vmDevice ) ; dao.get ( getExistingEntityId ( ) ) ; org.junit.Assert.assertEquals ( vmDevice.getIsPlugged ( ) , newPluggedValue ) ; }

Target:
public void testUpdateHotPlugDisk ( ) { org.ovirt.engine.core.common.businessentities.VmDevice vmDevice = dao.get ( getExistingEntityId ( ) ) ; boolean newPluggedValue = ! ( vmDevice.getIsPlugged ( ) ) ; org.junit.Assert.assertTrue ( org.apache.commons.lang.StringUtils.isNotBlank ( vmDevice.getAddress ( ) ) ) ; vmDevice.setIsPlugged ( newPluggedValue ) ; dao.updateHotPlugDisk ( vmDevice ) ; dao.get ( getExistingEntityId ( ) ) ; org.junit.Assert.assertEquals ( vmDevice.getIsPlugged ( ) , newPluggedValue ) ; }
Source:
public org.ovirt.engine.core.compat.Guid getStorageDomainIdForVmMemory ( java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > memoryDisksList ) { if ( ( cachedStorageDomainId.equals ( Guid.Empty ) ) && ( ( org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommand.getVm ( ) ) != null ) ) { org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain = org.ovirt.engine.core.bll.memory.MemoryStorageHandler.findStorageDomainForMemory ( org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommand.getVm ( ) . getStoragePoolId ( ) , memoryDisksList ) ; if ( storageDomain != null ) { cachedStorageDomainId = storageDomain.getId ( ) ; } } return cachedStorageDomainId ; }

Target:
public org.ovirt.engine.core.compat.Guid getStorageDomainIdForVmMemory ( java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > memoryDisksList ) { if ( ( cachedStorageDomainId.equals ( Guid.Empty ) ) && ( ( org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommand.getVm ( ) ) != null ) ) { org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain = org.ovirt.engine.core.bll.memory.MemoryStorageHandler.getInstance ( ) . findStorageDomainForMemory ( org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommand.getVm ( ) . getStoragePoolId ( ) , memoryDisksList ) ; if ( storageDomain != null ) { cachedStorageDomainId = storageDomain.getId ( ) ; } } return cachedStorageDomainId ; }
Source:
private java.lang.String getSuggestedDiskName ( org.ovirt.engine.core.common.businessentities.VM vm ) { java.util.Set < java.lang.String > aliases = createDiskAliasesList ( vm ) ; java.lang.String suggestedDiskName ; int i = 0 ; do { i ++ ; suggestedDiskName = org.ovirt.engine.core.bll.ImagesHandler.getDefaultDiskAlias ( vm.getName ( ) , java.lang.Integer.toString ( ( ( vm.getDiskMapCount ( ) ) + i ) ) ) ; } while ( aliases.contains ( suggestedDiskName ) ) ; return suggestedDiskName ; }

Target:
private java.lang.String getSuggestedDiskName ( org.ovirt.engine.core.common.businessentities.VM vm ) { java.util.Set < java.lang.String > aliases = createDiskAliasesList ( vm ) ; java.lang.String suggestedDiskName ; int i = 0 ; do { i ++ ; suggestedDiskName = org.ovirt.engine.core.bll.ImagesHandler.getDefaultDiskAlias ( vm.getName ( ) , java.lang.Integer.toString ( i ) ) ; } while ( aliases.contains ( suggestedDiskName ) ) ; return suggestedDiskName ; }
Source:
private void newPoolNameIsAlreadyTaken ( ) { org.mockito.Mockito.when ( spDao.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( new org.ovirt.engine.core.common.businessentities.StoragePool ( "foo" , "" , org.ovirt.engine.core.compat.Guid.Empty , "foo" , StorageType.NFS.getValue ( ) , StoragePoolStatus.Up.getValue ( ) ) ) ; org.mockito.Mockito.when ( spDao.getByName ( org.mockito.Matchers.anyString ( ) ) ) . thenReturn ( org.ovirt.engine.core.bll.storage.UpdateStoragePoolCommandTest.createDefaultStoragePool ( ) ) ; }

Target:
private void newPoolNameIsAlreadyTaken ( ) { org.mockito.Mockito.when ( spDao.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( new org.ovirt.engine.core.common.businessentities.StoragePool ( ) ) ; org.mockito.Mockito.when ( spDao.getByName ( org.mockito.Matchers.anyString ( ) ) ) . thenReturn ( org.ovirt.engine.core.bll.storage.UpdateStoragePoolCommandTest.createDefaultStoragePool ( ) ) ; }
Source:
public void calculateNetworkImplementationDetailsNetworkVlanOutOfSync ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.VdsNetworkInterface iface = createNetworkDevice ( ) ; calculateNetworkImplementationDetailsAndAssertSync ( iface , false , iface.getNetworkName ( ) , iface.isBridged ( ) , iface.getMtu ( ) , ( ( iface.getVlanId ( ) ) + 1 ) ) ; }

Target:
public void calculateNetworkImplementationDetailsNetworkVlanOutOfSync ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface = createNetworkDevice ( ) ; calculateNetworkImplementationDetailsAndAssertSync ( iface , false , iface.getNetworkName ( ) , iface.isBridged ( ) , iface.getMtu ( ) , ( ( iface.getVlanId ( ) ) + 1 ) ) ; }
Source:
private void initListBoxEditors ( ) { profileSelection = new org.ovirt.engine.ui.common.widget.editor.ListModelListBoxEditor < java.lang.Object > ( new org.ovirt.engine.ui.common.widget.renderer.NullSafeRenderer < java.lang.Object > ( ) { @ java.lang.Override public java.lang.String renderNullSafe ( java.lang.Object object ) { return ( ( org.ovirt.engine.core.aaa.ProfileEntry ) ( object ) ) . toString ( ) ; } } ) ; roleSelection = new org.ovirt.engine.ui.common.widget.editor.ListModelListBoxEditor < java.lang.Object > ( new org.ovirt.engine.ui.common.widget.renderer.NullSafeRenderer < java.lang.Object > ( ) { @ java.lang.Override public java.lang.String renderNullSafe ( java.lang.Object object ) { return ( ( org.ovirt.engine.core.common.businessentities.Role ) ( object ) ) . getname ( ) ; } } ) ; }

Target:
protected java.lang.String renderNullSafe ( java.lang.String object ) { return object ; }
Source:
protected void executeCommand ( ) { org.ovirt.engine.core.bll.UpdateNetworkOnClusterCommand.getNetworkClusterDAO ( ) . update ( org.ovirt.engine.core.bll.UpdateNetworkOnClusterCommand.getParameters ( ) . getNetworkCluster ( ) ) ; if ( org.ovirt.engine.core.bll.UpdateNetworkOnClusterCommand.getParameters ( ) . getNetworkCluster ( ) . getis_display ( ) ) { org.ovirt.engine.core.bll.UpdateNetworkOnClusterCommand.getNetworkClusterDAO ( ) . setNetworkExclusivelyAsDisplay ( org.ovirt.engine.core.bll.UpdateNetworkOnClusterCommand.getVdsGroupId ( ) , getNetwork ( ) . getId ( ) ) ; } org.ovirt.engine.core.bll.AttachNetworkToVdsGroupCommand.SetNetworkStatus ( org.ovirt.engine.core.bll.UpdateNetworkOnClusterCommand.getVdsGroupId ( ) , getNetwork ( ) ) ; org.ovirt.engine.core.bll.UpdateNetworkOnClusterCommand.setSucceeded ( true ) ; }

Target:
protected void executeCommand ( ) { org.ovirt.engine.core.bll.UpdateNetworkOnClusterCommand.getNetworkClusterDAO ( ) . update ( getNetworkCluster ( ) ) ; if ( getNetworkCluster ( ) . getis_display ( ) ) { org.ovirt.engine.core.bll.UpdateNetworkOnClusterCommand.getNetworkClusterDAO ( ) . setNetworkExclusivelyAsDisplay ( org.ovirt.engine.core.bll.UpdateNetworkOnClusterCommand.getVdsGroupId ( ) , getNetwork ( ) . getId ( ) ) ; } org.ovirt.engine.core.bll.AttachNetworkToVdsGroupCommand.SetNetworkStatus ( org.ovirt.engine.core.bll.UpdateNetworkOnClusterCommand.getVdsGroupId ( ) , getNetwork ( ) ) ; org.ovirt.engine.core.bll.UpdateNetworkOnClusterCommand.setSucceeded ( true ) ; }
Source:
protected void initCredentials ( java.lang.String domain ) { setLoginName ( configuration.getProperty ( "config.AdUserName" ) ) ; try { setPassword ( org.ovirt.engine.core.utils.crypt.EngineEncryptionUtils.decrypt ( configuration.getProperty ( "config.AdUserPassword" ) ) ) ; } catch ( java.security.GeneralSecurityException e ) { throw new java.lang.RuntimeException ( e ) ; } if ( getLoginName ( ) . contains ( "@" ) ) { java.lang.String userDomain = getLoginName ( ) . split ( "@" ) [ 1 ] . toLowerCase ( ) ; setAuthenticationDomain ( userDomain ) ; } else { setAuthenticationDomain ( domain ) ; } }

Target:
protected void initCredentials ( java.lang.String domain ) { setLoginName ( configuration.getProperty ( "config.AdUserName" ) ) ; setPassword ( configuration.getProperty ( "config.AdUserPassword" ) ) ; if ( getLoginName ( ) . contains ( "@" ) ) { java.lang.String userDomain = getLoginName ( ) . split ( "@" ) [ 1 ] . toLowerCase ( ) ; setAuthenticationDomain ( userDomain ) ; } else { setAuthenticationDomain ( domain ) ; } }
Source:
private boolean isVlanOverBondNetwork ( java.lang.String bondName , java.lang.String networkName ) { for ( org.ovirt.engine.core.common.businessentities.VdsNetworkInterface iface : _vds.getInterfaces ( ) ) { java.lang.String name = org.ovirt.engine.core.utils.NetworkUtils.getVlanInterfaceName ( iface.getName ( ) ) ; if ( name == null ) { continue ; } else if ( ( name.equals ( bondName ) ) && ( networkName.equals ( iface.getNetworkName ( ) ) ) ) { return true ; } } return false ; }

Target:
private boolean isVlanOverBondNetwork ( java.lang.String bondName , java.lang.String networkName ) { for ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface : _vds.getInterfaces ( ) ) { java.lang.String name = org.ovirt.engine.core.utils.NetworkUtils.getVlanInterfaceName ( iface.getName ( ) ) ; if ( name == null ) { continue ; } else if ( ( name.equals ( bondName ) ) && ( networkName.equals ( iface.getNetworkName ( ) ) ) ) { return true ; } } return false ; }
Source:
public void testGetDiskHotpluggableInterfaces ( ) throws java.lang.Exception { java.util.Set < java.lang.String > diskHotpluggableInterfaces = OsRepositoryImpl.INSTANCE.getDiskHotpluggableInterfaces ( 777 , null ) ; org.junit.Assert.assertTrue ( ( ( diskHotpluggableInterfaces.size ( ) ) == 2 ) ) ; for ( java.lang.String diskHotpluggableInterface : org.ovirt.engine.core.utils.OsRepositoryImplTest.DISK_HOTPLUGGABLE_INTERFACES.split ( "," ) ) { org.junit.Assert.assertTrue ( diskHotpluggableInterfaces.contains ( diskHotpluggableInterface.trim ( ) ) ) ; } }

Target:
public void testGetDiskHotpluggableInterfaces ( ) throws java.lang.Exception { java.util.Set < java.lang.String > diskHotpluggableInterfaces = OsRepositoryImpl.INSTANCE.getDiskHotpluggableInterfaces ( 777 , null ) ; org.junit.Assert.assertEquals ( 2 , diskHotpluggableInterfaces.size ( ) ) ; for ( java.lang.String diskHotpluggableInterface : org.ovirt.engine.core.utils.OsRepositoryImplTest.DISK_HOTPLUGGABLE_INTERFACES.split ( "," ) ) { org.junit.Assert.assertTrue ( diskHotpluggableInterfaces.contains ( diskHotpluggableInterface.trim ( ) ) ) ; } }
Source:
protected void configure ( ) { bind ( org.ovirt.engine.ui.uicommonweb.ConsoleOptionsFrontendPersister.class ) . to ( org.ovirt.engine.ui.common.utils.ConsoleOptionsFrontendPersisterImpl.class ) . in ( com.google.inject.Singleton.class ) ; bind ( org.ovirt.engine.ui.uicommonweb.ConsoleUtils.class ) . to ( org.ovirt.engine.ui.common.utils.ConsoleUtilsImpl.class ) . in ( com.google.inject.Singleton.class ) ; bind ( org.ovirt.engine.ui.uicommonweb.ConsoleManager.class ) . to ( org.ovirt.engine.ui.common.utils.ConsoleManagerImpl.class ) . in ( com.google.inject.Singleton.class ) ; }

Target:
protected void configure ( ) { bind ( org.ovirt.engine.ui.uicommonweb.ConsoleOptionsFrontendPersister.class ) . to ( org.ovirt.engine.ui.common.utils.ConsoleOptionsFrontendPersisterImpl.class ) . in ( com.google.inject.Singleton.class ) ; bind ( org.ovirt.engine.ui.uicommonweb.ConsoleUtils.class ) . to ( org.ovirt.engine.ui.common.utils.ConsoleUtilsImpl.class ) . in ( com.google.inject.Singleton.class ) ; }
Source:
public org.ovirt.engine.core.common.businessentities.VDSGroup getByName ( java.lang.String name ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "vds_group_name" , name ) . addValue ( "is_case_sensitive" , true ) ; return ( ( org.ovirt.engine.core.common.businessentities.VDSGroup ) ( org.ovirt.engine.core.dal.dbbroker.DbFacadeUtils.asSingleResult ( getCallsHandler ( ) . executeReadList ( "GetVdsGroupByVdsGroupName" , org.ovirt.engine.core.dao.VdsGroupDAODbFacadeImpl.VdsGroupRowMapper.instance , parameterSource ) ) ) ) ; }

Target:
public org.ovirt.engine.core.common.businessentities.VDSGroup getByName ( java.lang.String name ) { return ( ( org.ovirt.engine.core.common.businessentities.VDSGroup ) ( org.ovirt.engine.core.dal.dbbroker.DbFacadeUtils.asSingleResult ( getByName ( name , true ) ) ) ) ; }
Source:
public synchronized void updateHost ( org.ovirt.vdsmfake.domain.Host host ) { if ( ! ( hostMap.containsKey ( host.getId ( ) ) ) ) { hostMap.put ( host.getId ( ) , host ) ; } org.ovirt.vdsmfake.domain.VdsmManager.log.info ( "Storing host: {}" , host.getName ( ) ) ; storeObject ( host ) ; }

Target:
public void updateHost ( org.ovirt.vdsmfake.domain.Host host ) { if ( ! ( hostMap.containsKey ( host.getId ( ) ) ) ) { hostMap.put ( host.getId ( ) , host ) ; } org.ovirt.vdsmfake.domain.VdsmManager.log.info ( "Storing host: {}" , host.getName ( ) ) ; storeObject ( host ) ; }
Source:
public java.util.Map < java.lang.String , java.lang.String > getJobMessageProperties ( ) { if ( ( jobProperties ) == null ) { jobProperties = super . getJobMessageProperties ( ) ; org.ovirt.engine.core.common.businessentities.VDS vds = org.ovirt.engine.core.bll.AddVdsCommand.getParameters ( ) . getvds ( ) ; java.lang.String vdsName = ( ( vds != null ) && ( ( vds.getVdsName ( ) ) != null ) ) ? vds.getVdsName ( ) : "" ; jobProperties.put ( VdcObjectType.VDS.name ( ) . toLowerCase ( ) , vdsName ) ; } return jobProperties ; }

Target:
public java.util.Map < java.lang.String , java.lang.String > getJobMessageProperties ( ) { if ( ( jobProperties ) == null ) { jobProperties = super . getJobMessageProperties ( ) ; org.ovirt.engine.core.common.businessentities.VDS vds = org.ovirt.engine.core.bll.AddVdsCommand.getParameters ( ) . getvds ( ) ; java.lang.String vdsName = ( ( vds != null ) && ( ( vds.getName ( ) ) != null ) ) ? vds.getName ( ) : "" ; jobProperties.put ( VdcObjectType.VDS.name ( ) . toLowerCase ( ) , vdsName ) ; } return jobProperties ; }
Source:
private void mockClusterDao ( ) { org.mockito.Mockito.when ( dbFacade.getClusterDao ( ) ) . thenReturn ( clusterDao ) ; org.ovirt.engine.core.common.businessentities.Cluster cluster = new org.ovirt.engine.core.common.businessentities.Cluster ( ) ; cluster.setId ( org.ovirt.engine.core.bll.pm.StartVdsCommandTest.FENCECD_HOST_CLUSTER_ID ) ; org.mockito.Mockito.when ( clusterDao.get ( org.ovirt.engine.core.bll.pm.StartVdsCommandTest.FENCECD_HOST_CLUSTER_ID ) ) . thenReturn ( cluster ) ; }

Target:
private void mockClusterDao ( ) { org.ovirt.engine.core.common.businessentities.Cluster cluster = new org.ovirt.engine.core.common.businessentities.Cluster ( ) ; cluster.setId ( org.ovirt.engine.core.bll.pm.StartVdsCommandTest.FENCECD_HOST_CLUSTER_ID ) ; org.mockito.Mockito.when ( clusterDao.get ( org.ovirt.engine.core.bll.pm.StartVdsCommandTest.FENCECD_HOST_CLUSTER_ID ) ) . thenReturn ( cluster ) ; }
Source:
public void testCreateManagementNetworkIfRequiredFailedOnSetupNetworks ( ) { host.setActiveNic ( org.ovirt.engine.core.bll.network.NetworkConfiguratorTest.NIC_NAME ) ; final org.ovirt.engine.core.bll.network.NetworkConfigurator spiedUnderTest = org.mockito.Mockito.spy ( underTest ) ; org.mockito.Mockito.doReturn ( backend ) . when ( spiedUnderTest ) . getBackend ( ) ; org.mockito.Mockito.when ( backend.runInternalAction ( org.mockito.ArgumentMatchers.eq ( ActionType.HostSetupNetworks ) , org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.common.action.HostSetupNetworksParameters.class ) , org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.bll.context.CommandContext.class ) ) ) . thenReturn ( createReturnValue ( false ) ) ; verifyAuditLoggableBaseFilledProperly ( spiedUnderTest , AuditLogType.SETUP_NETWORK_FAILED_FOR_MANAGEMENT_NETWORK_CONFIGURATION ) ; }

Target:
public void testCreateManagementNetworkIfRequiredFailedOnSetupNetworks ( ) { host.setActiveNic ( org.ovirt.engine.core.bll.network.NetworkConfiguratorTest.NIC_NAME ) ; final org.ovirt.engine.core.bll.network.NetworkConfigurator spiedUnderTest = org.mockito.Mockito.spy ( underTest ) ; org.mockito.Mockito.doReturn ( backend ) . when ( spiedUnderTest ) . getBackend ( ) ; org.mockito.Mockito.when ( backend.runInternalAction ( org.mockito.ArgumentMatchers.eq ( ActionType.HostSetupNetworks ) , org.mockito.ArgumentMatchers.any ( ) , org.mockito.ArgumentMatchers.any ( ) ) ) . thenReturn ( createReturnValue ( false ) ) ; verifyAuditLoggableBaseFilledProperly ( spiedUnderTest , AuditLogType.SETUP_NETWORK_FAILED_FOR_MANAGEMENT_NETWORK_CONFIGURATION ) ; }
Source:
private void setupVmDao ( java.util.List < org.ovirt.engine.core.common.businessentities.VM > expectedVms ) { org.ovirt.engine.core.dao.VmDao vmDaoMock = org.mockito.Mockito.mock ( org.ovirt.engine.core.dao.VmDao.class ) ; org.mockito.Mockito.when ( vmDaoMock.getAllForNetwork ( networkId ) ) . thenReturn ( expectedVms ) ; org.mockito.Mockito.when ( getDbFacadeMockInstance ( ) . getVmDao ( ) ) . thenReturn ( vmDaoMock ) ; }

Target:
private void setupVmDao ( java.util.List < org.ovirt.engine.core.common.businessentities.VM > expectedVms ) { org.mockito.Mockito.when ( vmDaoMock.getAllForNetwork ( networkId ) ) . thenReturn ( expectedVms ) ; }
Source:
private void mockSnapshotsValidator ( ) { org.mockito.Mockito.doReturn ( snapshotsValidator ) . when ( command ) . getSnapshotsValidator ( ) ; org.mockito.Mockito.doReturn ( ValidationResult.VALID ) . when ( snapshotsValidator ) . vmNotDuringSnapshot ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ; org.mockito.Mockito.doReturn ( ValidationResult.VALID ) . when ( snapshotsValidator ) . vmNotInPreview ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ; }

Target:
private void mockSnapshotsValidator ( ) { org.mockito.Mockito.doReturn ( ValidationResult.VALID ) . when ( snapshotsValidator ) . vmNotDuringSnapshot ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ; org.mockito.Mockito.doReturn ( ValidationResult.VALID ) . when ( snapshotsValidator ) . vmNotInPreview ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ; }
Source:
public boolean equals ( java.lang.Object other ) { if ( ( other == null ) || ( ! ( other instanceof org.ovirt.engine.core.compat.Guid ) ) ) { return false ; } org.ovirt.engine.core.compat.Guid otherGuid = ( ( org.ovirt.engine.core.compat.Guid ) ( other ) ) ; return uuid.equals ( otherGuid.getUuid ( ) ) ; }

Target:
public boolean equals ( java.lang.Object other ) { if ( ! ( other instanceof org.ovirt.engine.core.compat.Guid ) ) { return false ; } org.ovirt.engine.core.compat.Guid otherGuid = ( ( org.ovirt.engine.core.compat.Guid ) ( other ) ) ; return uuid.equals ( otherGuid.getUuid ( ) ) ; }
Source:
public void updateIsDisksAvailable ( ) { getModel ( ) . setIsDisksAvailable ( ( ( ( getModel ( ) . getDisks ( ) ) != null ) && ( getModel ( ) . getProvisioning ( ) . getIsChangable ( ) ) ) ) ; }

Target:
public void updateIsDisksAvailable ( ) { getModel ( ) . setIsDisksAvailable ( ( ( ( ( getModel ( ) . getDisks ( ) ) != null ) && ( ! ( getModel ( ) . getDisks ( ) . isEmpty ( ) ) ) ) && ( getModel ( ) . getProvisioning ( ) . getIsChangable ( ) ) ) ) ; }
Source:
public static void fillTagsRecursive ( org.ovirt.engine.core.common.businessentities.Tags tagToFill , java.util.List < org.ovirt.engine.core.common.businessentities.Tags > children ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Tags > list = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Tags > ( ) ; for ( org.ovirt.engine.core.common.businessentities.Tags tag : children ) { if ( ( tag.gettype ( ) ) == ( org.ovirt.engine.core.common.businessentities.TagsType.GeneralTag ) ) { list.add ( tag ) ; if ( ( tag.getChildren ( ) ) != null ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.fillTagsRecursive ( tag , tag.getChildren ( ) ) ; } } } tagToFill.setChildren ( list ) ; }

Target:
public void fillTagsRecursive ( org.ovirt.engine.core.common.businessentities.Tags tagToFill , java.util.List < org.ovirt.engine.core.common.businessentities.Tags > children ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Tags > list = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Tags > ( ) ; for ( org.ovirt.engine.core.common.businessentities.Tags tag : children ) { if ( ( tag.gettype ( ) ) == ( org.ovirt.engine.core.common.businessentities.TagsType.GeneralTag ) ) { list.add ( tag ) ; if ( ( tag.getChildren ( ) ) != null ) { fillTagsRecursive ( tag , tag.getChildren ( ) ) ; } } } tagToFill.setChildren ( list ) ; }
Source:
public org.ovirt.engine.core.bll.quota.QuotaConsumptionParametersWrapper clone ( ) throws java.lang.CloneNotSupportedException { org.ovirt.engine.core.bll.quota.QuotaConsumptionParametersWrapper cloneWrapper = new org.ovirt.engine.core.bll.quota.QuotaConsumptionParametersWrapper ( getAuditLogable ( ) , canDoActionMessages ) ; cloneWrapper.setParameters ( new java.util.ArrayList < org.ovirt.engine.core.bll.quota.QuotaConsumptionParameter > ( ) ) ; if ( ( getParameters ( ) ) != null ) { for ( org.ovirt.engine.core.bll.quota.QuotaConsumptionParameter parameter : getParameters ( ) ) { cloneWrapper.getParameters ( ) . add ( parameter.clone ( ) ) ; } } return cloneWrapper ; }

Target:
public org.ovirt.engine.core.bll.quota.QuotaConsumptionParametersWrapper clone ( ) throws java.lang.CloneNotSupportedException { org.ovirt.engine.core.bll.quota.QuotaConsumptionParametersWrapper cloneWrapper = new org.ovirt.engine.core.bll.quota.QuotaConsumptionParametersWrapper ( getAuditLogable ( ) , canDoActionMessages ) ; if ( ( getParameters ( ) ) != null ) { cloneWrapper.setParameters ( new java.util.ArrayList < org.ovirt.engine.core.bll.quota.QuotaConsumptionParameter > ( ) ) ; for ( org.ovirt.engine.core.bll.quota.QuotaConsumptionParameter parameter : getParameters ( ) ) { cloneWrapper.getParameters ( ) . add ( parameter.clone ( ) ) ; } } return cloneWrapper ; }
Source:
public void OnSuccess ( java.lang.Object model , java.lang.Object ReturnValue ) { if ( clientAgentType.isIE8OrBelow ( ) ) { Window.Location.reload ( ) ; } org.ovirt.engine.ui.frontend.Frontend.setLoggedInUser ( null ) ; getLoginModel ( ) . resetAfterLogout ( ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.clearCache ( ) ; connectAutomaticallyManager.resetAlreadyOpened ( ) ; org.ovirt.engine.ui.userportal.system.ApplicationInit.super . onLogout ( ) ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object ReturnValue ) { if ( clientAgentType.isIE8OrBelow ( ) ) { Window.Location.reload ( ) ; } org.ovirt.engine.ui.frontend.Frontend.setLoggedInUser ( null ) ; getLoginModel ( ) . resetAfterLogout ( ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.clearCache ( ) ; connectAutomaticallyManager.resetAlreadyOpened ( ) ; org.ovirt.engine.ui.userportal.system.ApplicationInit.super . onLogout ( ) ; }
Source:
public static < T extends org.ovirt.engine.core.common.businessentities.BusinessEntity < ? extends org.ovirt.engine.core.compat.NGuid > > com.google.gwt.core.client.JsArray < org.ovirt.engine.ui.webadmin.plugin.entity.EntityObject > arrayFrom ( java.util.List < T > businessEntityList ) { com.google.gwt.core.client.JsArray < org.ovirt.engine.ui.webadmin.plugin.entity.EntityObject > result = com.google.gwt.core.client.JavaScriptObject.createArray ( ) . cast ( ) ; for ( T businessEntity : businessEntityList ) { result.push ( org.ovirt.engine.ui.webadmin.plugin.entity.EntityObject.from ( businessEntity ) ) ; } return result ; }

Target:
public static < T > com.google.gwt.core.client.JsArray < org.ovirt.engine.ui.webadmin.plugin.entity.EntityObject > arrayFrom ( java.util.List < T > businessEntityList ) { com.google.gwt.core.client.JsArray < org.ovirt.engine.ui.webadmin.plugin.entity.EntityObject > result = com.google.gwt.core.client.JavaScriptObject.createArray ( ) . cast ( ) ; for ( T businessEntity : businessEntityList ) { result.push ( org.ovirt.engine.ui.webadmin.plugin.entity.EntityObject.from ( businessEntity ) ) ; } return result ; }
Source:
protected boolean performImagesChecks ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > diskImagesToCheck = org.ovirt.engine.core.bll.ImagesHandler.filterImageDisks ( getImagesList ( ) , true , false ) ; org.ovirt.engine.core.bll.validator.DiskImagesValidator diskImagesValidator = new org.ovirt.engine.core.bll.validator.DiskImagesValidator ( diskImagesToCheck ) ; return ( validate ( diskImagesValidator.diskImagesNotLocked ( ) ) ) && ( org.ovirt.engine.core.bll.ImagesHandler.PerformImagesChecks ( org.ovirt.engine.core.bll.RestoreAllSnapshotsCommand.getReturnValue ( ) . getCanDoActionMessages ( ) , org.ovirt.engine.core.bll.RestoreAllSnapshotsCommand.getVm ( ) . getStoragePoolId ( ) , false , false , true , diskImagesToCheck ) ) ; }

Target:
protected boolean performImagesChecks ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > diskImagesToCheck = org.ovirt.engine.core.bll.ImagesHandler.filterImageDisks ( getImagesList ( ) , true , false ) ; org.ovirt.engine.core.bll.validator.DiskImagesValidator diskImagesValidator = new org.ovirt.engine.core.bll.validator.DiskImagesValidator ( diskImagesToCheck ) ; return validate ( diskImagesValidator.diskImagesNotLocked ( ) ) ; }
Source:
public org.ovirt.engine.api.resource.StatisticsResource getStatisticsResource ( ) { org.ovirt.engine.api.restapi.resource.EntityIdResolver < org.ovirt.engine.core.compat.Guid > resolver = new org.ovirt.engine.api.restapi.resource.EntityIdResolver < org.ovirt.engine.core.compat.Guid > ( ) { @ java.lang.Override public org.ovirt.engine.core.common.businessentities.VdsNumaNode lookupEntity ( org.ovirt.engine.core.compat.Guid guid ) throws org.ovirt.engine.api.restapi.resource.BackendFailureException { return parent.lookupEntity ( guid ) ; } } ; org.ovirt.engine.api.restapi.resource.NumaStatisticalQuery query = new org.ovirt.engine.api.restapi.resource.NumaStatisticalQuery ( resolver , newModel ( id ) ) ; return inject ( new org.ovirt.engine.api.restapi.resource.BackendStatisticsResource < org.ovirt.engine.api.model.NumaNode , org.ovirt.engine.core.common.businessentities.VdsNumaNode > ( entityType , guid , query ) ) ; }

Target:
public org.ovirt.engine.api.resource.StatisticsResource getStatisticsResource ( ) { org.ovirt.engine.api.restapi.resource.EntityIdResolver < org.ovirt.engine.core.compat.Guid > resolver = new org.ovirt.engine.api.restapi.resource.EntityIdResolver < org.ovirt.engine.core.compat.Guid > ( ) { @ java.lang.Override public org.ovirt.engine.core.common.businessentities.VdsNumaNode lookupEntity ( org.ovirt.engine.core.compat.Guid guid ) throws org.ovirt.engine.api.restapi.resource.BackendFailureException { return parent.lookupEntity ( guid ) ; } } ; org.ovirt.engine.api.restapi.resource.NumaStatisticalQuery query = new org.ovirt.engine.api.restapi.resource.NumaStatisticalQuery ( resolver , newModel ( id ) ) ; return inject ( new org.ovirt.engine.api.restapi.resource.BackendStatisticsResource ( entityType , guid , query ) ) ; }
Source:
private void doInit ( org.ovirt.engine.api.extensions.ExtMap input , org.ovirt.engine.api.extensions.ExtMap output ) throws java.io.IOException , java.sql.SQLException { this . ds = new org.ovirt.engine.extension.aaa.jdbc.core.datasource.DataSourceProvider ( configuration ) . provide ( ) ; this . authorization = new org.ovirt.engine.extension.aaa.jdbc.core.Authorization ( ds ) ; this . tasks = new org.ovirt.engine.extension.aaa.jdbc.core.Tasks ( ds , this . authorization ) ; org.ovirt.engine.extension.aaa.jdbc.binding.api.ExtensionUtils.checkDbVersion ( ds.getConnection ( ) , input.< org.ovirt.engine.api.extensions.ExtMap > get ( Base.InvokeKeys.CONTEXT ) . < java.lang.String > get ( Base.ContextKeys.CONFIGURATION_FILE ) ) ; }

Target:
private void doInit ( org.ovirt.engine.api.extensions.ExtMap input , org.ovirt.engine.api.extensions.ExtMap output ) throws java.io.IOException , java.sql.SQLException { this . ds = new org.ovirt.engine.extension.aaa.jdbc.core.datasource.DataSourceProvider ( configuration ) . provide ( ) ; this . authorization = new org.ovirt.engine.extension.aaa.jdbc.core.Authorization ( ds ) ; this . tasks = new org.ovirt.engine.extension.aaa.jdbc.core.Tasks ( ds , this . authorization ) ; org.ovirt.engine.extension.aaa.jdbc.binding.api.ExtensionUtils.checkDbVersion ( ds , input.< org.ovirt.engine.api.extensions.ExtMap > get ( Base.InvokeKeys.CONTEXT ) . < java.lang.String > get ( Base.ContextKeys.CONFIGURATION_FILE ) ) ; }
Source:
public org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.vdscommands.VDSReturnValue > call ( ) throws java.lang.Exception { org.ovirt.engine.core.common.vdscommands.VDSReturnValue returnValue ; returnValue = runVdsCommand ( VDSCommandType.UpdateGlusterHook , new org.ovirt.engine.core.common.vdscommands.gluster.GlusterHookVDSParameters ( serverId , entity.getGlusterCommand ( ) , entity.getStage ( ) , entity.getName ( ) , hookContent , hookChecksum ) ) ; return new org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.vdscommands.VDSReturnValue > ( serverId , returnValue ) ; }

Target:
public org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.vdscommands.VDSReturnValue > call ( ) throws java.lang.Exception { org.ovirt.engine.core.common.vdscommands.VDSReturnValue returnValue ; returnValue = runVdsCommand ( VDSCommandType.UpdateGlusterHook , new org.ovirt.engine.core.common.vdscommands.gluster.GlusterHookVDSParameters ( serverId , entity.getGlusterCommand ( ) , entity.getStage ( ) , entity.getName ( ) , hookContent , hookChecksum ) ) ; return new org.ovirt.engine.core.common.utils.Pair ( serverId , returnValue ) ; }
Source:
private com.woorea.openstack.base.client.OpenStackTokenProvider getTokenProvider ( ) { if ( ( ( tokenProvider ) == null ) && ( getProvider ( ) . isRequiringAuthentication ( ) ) ) { java.lang.String tenantName = provider.getAdditionalProperties ( ) . getTenantName ( ) ; tokenProvider = new com.woorea.openstack.keystone.utils.KeystoneTokenProvider ( org.ovirt.engine.core.common.config.Config.< java.lang.String > GetValue ( ConfigValues.KeystoneAuthUrl ) , getProvider ( ) . getUsername ( ) , getProvider ( ) . getPassword ( ) ) . getProviderByTenant ( tenantName ) ; } return tokenProvider ; }

Target:
private com.woorea.openstack.base.client.OpenStackTokenProvider getTokenProvider ( ) { if ( ( ( tokenProvider ) == null ) && ( getProvider ( ) . isRequiringAuthentication ( ) ) ) { java.lang.String tenantName = provider.getAdditionalProperties ( ) . getTenantName ( ) ; tokenProvider = new com.woorea.openstack.keystone.utils.KeystoneTokenProvider ( org.ovirt.engine.core.common.config.Config.< java.lang.String > getValue ( ConfigValues.KeystoneAuthUrl ) , getProvider ( ) . getUsername ( ) , getProvider ( ) . getPassword ( ) ) . getProviderByTenant ( tenantName ) ; } return tokenProvider ; }
Source:
protected void setUpCommand ( ) { command = createCommand ( ) ; org.mockito.Mockito.doReturn ( true ) . when ( command ) . areTemplateImagesInStorageReady ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ; org.mockito.Mockito.doReturn ( true ) . when ( command ) . isMemorySizeLegal ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Version.class ) ) ; org.mockito.Mockito.doReturn ( true ) . when ( command ) . verifyAddVM ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ; }

Target:
protected void setUpCommand ( ) { command = createCommand ( ) ; org.mockito.Mockito.doReturn ( true ) . when ( command ) . areTemplateImagesInStorageReady ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ; org.mockito.Mockito.doReturn ( true ) . when ( command ) . isMemorySizeLegal ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Version.class ) ) ; org.mockito.Mockito.doReturn ( true ) . when ( command ) . verifyAddVM ( ) ; }
Source:
public java.lang.String createSnapshot ( final org.ovirt.engine.core.common.businessentities.storage.CinderDisk cinderDisk , final java.lang.String snapshotDescription ) { return execute ( new java.util.concurrent.Callable < java.lang.String > ( ) { @ java.lang.Override public java.lang.String call ( ) { com.woorea.openstack.cinder.model.SnapshotForCreate snapshotForCreate = new com.woorea.openstack.cinder.model.SnapshotForCreate ( ) ; snapshotForCreate.setVolumeId ( cinderDisk.getImageId ( ) . toString ( ) ) ; snapshotForCreate.setDescription ( snapshotDescription ) ; return proxy.createSnapshot ( snapshotForCreate ) ; } } ) ; }

Target:
public java.lang.String createSnapshot ( final org.ovirt.engine.core.common.businessentities.storage.CinderDisk cinderDisk , final java.lang.String snapshotDescription ) { return execute ( ( ) -> { com.woorea.openstack.cinder.model.SnapshotForCreate snapshotForCreate = new com.woorea.openstack.cinder.model.SnapshotForCreate ( ) ; snapshotForCreate.setVolumeId ( cinderDisk.getImageId ( ) . toString ( ) ) ; snapshotForCreate.setDescription ( snapshotDescription ) ; return proxy.createSnapshot ( snapshotForCreate ) ; } ) ; }
Source:
private org.ovirt.engine.core.common.utils.Pair < java.lang.Boolean , java.util.Set < java.lang.String > > insertExclusiveLock ( java.lang.String key , java.lang.String message , boolean isCheckOnly ) { org.ovirt.engine.core.bll.lock.InMemoryLockManager.InternalLockView lock = locks.get ( key ) ; if ( lock != null ) { return new org.ovirt.engine.core.common.utils.Pair < java.lang.Boolean , java.util.Set < java.lang.String > > ( java.lang.Boolean.FALSE , lock.getMessages ( ) ) ; } if ( ! isCheckOnly ) { locks.put ( key , new org.ovirt.engine.core.bll.lock.InMemoryLockManager.InternalLockView ( 0 , message , true ) ) ; } return org.ovirt.engine.core.bll.lock.InMemoryLockManager.LOCK_INSERT_SUCCESS_RESULT ; }

Target:
private org.ovirt.engine.core.common.utils.Pair < java.lang.Boolean , java.util.Set < java.lang.String > > insertExclusiveLock ( java.lang.String key , java.lang.String message , boolean isCheckOnly ) { org.ovirt.engine.core.bll.lock.InMemoryLockManager.InternalLockView lock = locks.get ( key ) ; if ( lock != null ) { return new org.ovirt.engine.core.common.utils.Pair ( java.lang.Boolean.FALSE , lock.getMessages ( ) ) ; } if ( ! isCheckOnly ) { locks.put ( key , new org.ovirt.engine.core.bll.lock.InMemoryLockManager.InternalLockView ( 0 , message , true ) ) ; } return org.ovirt.engine.core.bll.lock.InMemoryLockManager.LOCK_INSERT_SUCCESS_RESULT ; }
Source:
protected void updateWipeAfterDelete ( org.ovirt.engine.core.common.businessentities.StorageType storageType ) { if ( storageType.isFileDomain ( ) ) { getIsWipeAfterDelete ( ) . setChangeProhibitionReason ( org.ovirt.engine.ui.uicommonweb.models.vms.CONSTANTS.wipeAfterDeleteNotSupportedForFileDomains ( ) ) ; getIsWipeAfterDelete ( ) . setIsChangable ( false ) ; getIsWipeAfterDelete ( ) . setEntity ( false ) ; } else { getIsWipeAfterDelete ( ) . setIsChangable ( true ) ; getIsWipeAfterDelete ( ) . setEntity ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigValuePreConverted ( ConfigurationValues.SANWipeAfterDelete ) ) ; } }

Target:
protected void updateWipeAfterDelete ( org.ovirt.engine.core.common.businessentities.StorageType storageType ) { if ( storageType.isFileDomain ( ) ) { getIsWipeAfterDelete ( ) . setChangeProhibitionReason ( org.ovirt.engine.ui.uicommonweb.models.vms.CONSTANTS.wipeAfterDeleteNotSupportedForFileDomains ( ) ) ; getIsWipeAfterDelete ( ) . setIsChangable ( false ) ; getIsWipeAfterDelete ( ) . setEntity ( false ) ; } else { getIsWipeAfterDelete ( ) . setIsChangable ( true ) ; getIsWipeAfterDelete ( ) . setEntity ( ( ( java.lang.Boolean ) ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigValuePreConverted ( ConfigurationValues.SANWipeAfterDelete ) ) ) ) ; } }
Source:
private java.util.List < org.ovirt.engine.api.restapi.model.Directory > getCollection ( ) { java.util.List < org.ovirt.engine.api.restapi.model.Directory > dsl = new java.util.ArrayList < org.ovirt.engine.api.restapi.model.Directory > ( ) ; for ( java.lang.String domain : getDomainList ( ) ) { org.ovirt.engine.api.restapi.model.Directory ds = new org.ovirt.engine.api.restapi.model.Directory ( ) ; ds.setDomain ( domain ) ; org.ovirt.engine.core.compat.NGuid guid = new org.ovirt.engine.core.compat.NGuid ( domain.getBytes ( ) , true ) ; ds.setId ( ( guid != null ? guid.toString ( ) : null ) ) ; dsl.add ( ds ) ; } return dsl ; }

Target:
private java.util.List < org.ovirt.engine.api.restapi.model.Directory > getCollection ( ) { java.util.List < org.ovirt.engine.api.restapi.model.Directory > dsl = new java.util.ArrayList < org.ovirt.engine.api.restapi.model.Directory > ( ) ; for ( java.lang.String domain : getDomainList ( ) ) { org.ovirt.engine.api.restapi.model.Directory ds = new org.ovirt.engine.api.restapi.model.Directory ( ) ; ds.setDomain ( domain ) ; org.ovirt.engine.core.compat.NGuid guid = new org.ovirt.engine.core.compat.NGuid ( domain.getBytes ( ) , true ) ; ds.setId ( guid.toString ( ) ) ; dsl.add ( ds ) ; } return dsl ; }
Source:
public java.util.List < org.ovirt.engine.core.common.businessentities.permissions > getAllForAdElement ( org.ovirt.engine.core.compat.Guid id , org.ovirt.engine.core.compat.Guid userID , boolean isFiltered ) { java.lang.Integer appMode = org.ovirt.engine.core.common.config.Config.< java.lang.Integer > GetValue ( ConfigValues.ApplicationMode ) ; org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "ad_element_id" , id ) . addValue ( "user_id" , userID ) . addValue ( "is_filtered" , isFiltered ) . addValue ( "app_mode" , appMode.intValue ( ) ) ; return getCallsHandler ( ) . executeReadList ( "GetPermissionsByAdElementId" , org.ovirt.engine.core.dao.PermissionDAODbFacadeImpl.PermissionRowMapper.instance , parameterSource ) ; }

Target:
public java.util.List < org.ovirt.engine.core.common.businessentities.permissions > getAllForAdElement ( org.ovirt.engine.core.compat.Guid id , org.ovirt.engine.core.compat.Guid userID , boolean isFiltered ) { int appMode = org.ovirt.engine.core.common.config.Config.< java.lang.Integer > GetValue ( ConfigValues.ApplicationMode ) ; org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "ad_element_id" , id ) . addValue ( "user_id" , userID ) . addValue ( "is_filtered" , isFiltered ) . addValue ( "app_mode" , appMode ) ; return getCallsHandler ( ) . executeReadList ( "GetPermissionsByAdElementId" , org.ovirt.engine.core.dao.PermissionDAODbFacadeImpl.PermissionRowMapper.instance , parameterSource ) ; }
Source:
protected void syncSearch ( ) { if ( ( getEntity ( ) ) == null ) { return ; } org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getGlusterHooks ( new org.ovirt.engine.ui.frontend.AsyncQuery ( this , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity > glusterHooks = ( ( java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity > ) ( returnValue ) ) ; setItems ( glusterHooks ) ; } } ) , getEntity ( ) . getId ( ) ) ; }

Target:
protected void syncSearch ( ) { if ( ( getEntity ( ) ) == null ) { return ; } org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getGlusterHooks ( new org.ovirt.engine.ui.frontend.AsyncQuery ( this , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity > glusterHooks = ( ( java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity > ) ( returnValue ) ) ; setItems ( glusterHooks ) ; } } ) , getEntity ( ) . getId ( ) ) ; }
Source:
public void validateFailsForVdsNonUp ( ) { cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.gluster.CreateBrickCommand ( new org.ovirt.engine.core.common.action.gluster.CreateBrickParameters ( ) , null ) ) ; prepareMocks ( VDSStatus.Down ) ; org.junit.Assert.assertFalse ( cmd.validate ( ) ) ; org.mockito.Mockito.doReturn ( VDSStatus.Error ) . when ( vds ) . getStatus ( ) ; org.junit.Assert.assertFalse ( cmd.validate ( ) ) ; org.mockito.Mockito.doReturn ( VDSStatus.Maintenance ) . when ( vds ) . getStatus ( ) ; org.junit.Assert.assertFalse ( cmd.validate ( ) ) ; }

Target:
public void validateFailsForVdsNonUp ( ) { prepareMocks ( VDSStatus.Down ) ; org.junit.Assert.assertFalse ( cmd.validate ( ) ) ; org.mockito.Mockito.doReturn ( VDSStatus.Error ) . when ( vds ) . getStatus ( ) ; org.junit.Assert.assertFalse ( cmd.validate ( ) ) ; org.mockito.Mockito.doReturn ( VDSStatus.Maintenance ) . when ( vds ) . getStatus ( ) ; org.junit.Assert.assertFalse ( cmd.validate ( ) ) ; }
Source:
public static void initNicHotplugSupportMap ( ) { org.ovirt.engine.ui.frontend.AsyncQuery callback = new org.ovirt.engine.ui.frontend.AsyncQuery ( ) ; callback.asyncCallback = new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.nicHotplugSupportMap = ( ( java.util.Map < org.ovirt.engine.core.common.utils.Pair < java.lang.Integer , org.ovirt.engine.core.compat.Version > , java.lang.Boolean > ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ) ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.OsRepository , new org.ovirt.engine.core.common.queries.OsQueryParameters ( org.ovirt.engine.core.common.queries.OsQueryParameters.OsRepositoryVerb.GetNicHotplugSupportMap ) , callback ) ; }

Target:
public static void initNicHotplugSupportMap ( ) { org.ovirt.engine.ui.frontend.AsyncQuery callback = new org.ovirt.engine.ui.frontend.AsyncQuery ( ) ; callback.asyncCallback = new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.nicHotplugSupportMap = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.OsRepository , new org.ovirt.engine.core.common.queries.OsQueryParameters ( org.ovirt.engine.core.common.queries.OsQueryParameters.OsRepositoryVerb.GetNicHotplugSupportMap ) , callback ) ; }
Source:
protected void postSaveAction ( boolean succeeded ) { if ( succeeded ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.HostNetworkQos > qosItems = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.HostNetworkQos > ( this . getQos ( ) . getItems ( ) ) ; qosItems.add ( 1 , getQos ( ) ) ; this . getQos ( ) . setItems ( qosItems ) ; this . getQos ( ) . setSelectedItem ( getQos ( ) ) ; } super . postSaveAction ( succeeded ) ; }

Target:
protected void postSaveAction ( boolean succeeded ) { if ( succeeded ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.HostNetworkQos > qosItems = new java.util.ArrayList ( this . getQos ( ) . getItems ( ) ) ; qosItems.add ( 1 , getQos ( ) ) ; this . getQos ( ) . setItems ( qosItems ) ; this . getQos ( ) . setSelectedItem ( getQos ( ) ) ; } super . postSaveAction ( succeeded ) ; }
Source:
public static org.ovirt.engine.core.common.businessentities.VmDevice addInterface ( org.ovirt.engine.core.compat.Guid vmId , org.ovirt.engine.core.compat.Guid deviceId , boolean plugged , boolean hostDev , java.lang.String address ) { return org.ovirt.engine.core.bll.utils.VmDeviceUtils.addManagedDevice ( new org.ovirt.engine.core.common.businessentities.VmDeviceId ( deviceId , vmId ) , VmDeviceGeneralType.INTERFACE , ( hostDev ? org.ovirt.engine.core.common.utils.VmDeviceType.HOST_DEVICE : org.ovirt.engine.core.common.utils.VmDeviceType.BRIDGE ) , org.ovirt.engine.core.bll.utils.VmDeviceUtils.EMPTY_SPEC_PARAMS , plugged , false , address , null , false ) ; }

Target:
public org.ovirt.engine.core.common.businessentities.VmDevice addInterface ( org.ovirt.engine.core.compat.Guid vmId , org.ovirt.engine.core.compat.Guid deviceId , boolean plugged , boolean hostDev , java.lang.String address ) { return addManagedDevice ( new org.ovirt.engine.core.common.businessentities.VmDeviceId ( deviceId , vmId ) , VmDeviceGeneralType.INTERFACE , ( hostDev ? org.ovirt.engine.core.common.utils.VmDeviceType.HOST_DEVICE : org.ovirt.engine.core.common.utils.VmDeviceType.BRIDGE ) , org.ovirt.engine.core.bll.utils.VmDeviceUtils.EMPTY_SPEC_PARAMS , plugged , false , address , null , false ) ; }
Source:
public void addPosixNonEmptyVFSType ( ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections newPosixConnection = createPosixConnection ( "multipass.my.domain.tlv.company.com:/export/allstorage/data1" , StorageType.POSIXFS , "nfs" , "timeo=30" ) ; parameters.setStorageServerConnection ( newPosixConnection ) ; parameters.setVdsId ( Guid.Empty ) ; org.mockito.Mockito.doReturn ( false ) . when ( command ) . isConnWithSameDetailsExists ( newPosixConnection ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionSuccess ( command ) ; }

Target:
public void addPosixNonEmptyVFSType ( ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections newPosixConnection = createPosixConnection ( "multipass.my.domain.tlv.company.com:/export/allstorage/data1" , StorageType.POSIXFS , "nfs" , "timeo=30" ) ; parameters.setStorageServerConnection ( newPosixConnection ) ; parameters.setVdsId ( Guid.Empty ) ; org.mockito.Mockito.doReturn ( false ) . when ( command ) . isConnWithSameDetailsExists ( newPosixConnection , null ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionSuccess ( command ) ; }