auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
protected java.util.List < org.ovirt.engine.core.bll.tasks.SPMAsyncTaskHandler > initTaskHandlers ( ) { return java.util.Arrays.< org.ovirt.engine.core.bll.tasks.SPMAsyncTaskHandler > asList ( new org.ovirt.engine.core.bll.storage.lsm.LiveSnapshotTaskHandler ( this ) , new org.ovirt.engine.core.bll.storage.lsm.LiveMigrateDisksTaskHandler ( this ) ) ; }

Target:
protected void executeCommand ( ) { org.ovirt.engine.core.bll.storage.disk.image.ImagesHandler.updateAllDiskImagesSnapshotsStatusInTransactionWithCompensation ( getMovedDiskIds ( ) , ImageStatus.LOCKED , ImageStatus.OK , org.ovirt.engine.core.bll.storage.lsm.LiveMigrateVmDisksCommand.getCompensationContext ( ) ) ; runInternalAction ( VdcActionType.CreateAllSnapshotsFromVm , getCreateSnapshotParameters ( ) , org.ovirt.engine.core.bll.job.ExecutionHandler.createInternalJobContext ( org.ovirt.engine.core.bll.storage.lsm.LiveMigrateVmDisksCommand.getContext ( ) ) ) ; org.ovirt.engine.core.bll.storage.lsm.LiveMigrateVmDisksCommand.setSucceeded ( true ) ; }
Source:
public void updateConnectionNoDomain ( ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections newNFSConnection = createNFSConnection ( "multipass.my.domain.tlv.company.com:/export/allstorage/data2" , StorageType.NFS , NfsVersion.V4 , 300 , 0 ) ; parameters.setStorageServerConnection ( newNFSConnection ) ; java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > domains = new java.util.ArrayList < > ( ) ; org.mockito.Mockito.when ( storageConnDao.get ( newNFSConnection.getId ( ) ) ) . thenReturn ( oldNFSConnection ) ; org.mockito.Mockito.doReturn ( domains ) . when ( command ) . getStorageDomainsByConnId ( newNFSConnection.getId ( ) ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionSuccess ( command ) ; }

Target:
public void updateConnectionNoDomain ( ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections newNFSConnection = createNFSConnection ( "multipass.my.domain.tlv.company.com:/export/allstorage/data2" , StorageType.NFS , NfsVersion.V4 , 300 , 0 ) ; parameters.setStorageServerConnection ( newNFSConnection ) ; java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > domains = new java.util.ArrayList < > ( ) ; org.mockito.Mockito.when ( storageConnDao.get ( newNFSConnection.getId ( ) ) ) . thenReturn ( oldNFSConnection ) ; org.mockito.Mockito.doReturn ( domains ) . when ( command ) . getStorageDomainsByConnId ( newNFSConnection.getId ( ) ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateSuccess ( command ) ; }
Source:
public static void getUserMessageOfTheDayViaPublic ( 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.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunPublicQuery ( VdcQueryType.GetConfigurationValue , new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.UserMessageOfTheDay , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public static void getRpmVersion ( 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.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.core.common.queries.GetConfigurationValueParameters tempVar = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.ProductRPMVersion ) ; tempVar.setVersion ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( tempVar , aQuery ) ; }
Source:
protected java.lang.String cdPathWindowsToLinux ( java.lang.String windowsPath , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.compat.Guid vdsId ) { if ( org.apache.commons.lang.StringUtils.isEmpty ( windowsPath ) ) { return "" ; } return cdPathWindowsToLinux ( windowsPath , getIsoPrefix ( storagePoolId , vdsId ) ) ; }

Target:
protected java.lang.String cdPathWindowsToLinux ( java.lang.String windowsPath , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.compat.Guid vdsId ) { if ( org.apache.commons.lang.StringUtils.isEmpty ( windowsPath ) ) { return "" ; } if ( windowsPath.matches ( ValidationUtils.GUID ) ) { org.ovirt.engine.core.common.businessentities.storage.BaseDisk disk = diskDao.get ( org.ovirt.engine.core.compat.Guid.createGuidFromString ( windowsPath ) ) ; if ( disk != null ) { return vmInfoBuildUtils.getPathToImage ( ( ( org.ovirt.engine.core.common.businessentities.storage.DiskImage ) ( disk ) ) ) ; } } return cdPathWindowsToLinux ( windowsPath , getIsoPrefix ( storagePoolId , vdsId ) ) ; }
Source:
public static void getHostsForStorageOperation ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , boolean localFsOnly ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { return source ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetHostsForStorageOperation , new org.ovirt.engine.core.common.queries.GetHostsForStorageOperationParameters ( storagePoolId , localFsOnly ) , aQuery ) ; }

Target:
public void getClusterNetworkList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { if ( ( aQuery.converterCallback ) == null ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.Network > ( ) ; } return source ; } } ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllNetworksByClusterId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( clusterId ) , aQuery ) ; }
Source:
protected void executeCommand ( ) { org.ovirt.engine.core.bll.provider.AddProviderCommand.getParameters ( ) . getProvider ( ) . setId ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; org.ovirt.engine.core.bll.provider.AddProviderCommand.getDbFacade ( ) . getNetworkProviderDao ( ) . save ( org.ovirt.engine.core.bll.provider.AddProviderCommand.getParameters ( ) . getProvider ( ) ) ; org.ovirt.engine.core.bll.provider.AddProviderCommand.getReturnValue ( ) . setActionReturnValue ( org.ovirt.engine.core.bll.provider.AddProviderCommand.getParameters ( ) . getProvider ( ) . getId ( ) ) ; org.ovirt.engine.core.bll.provider.AddProviderCommand.setSucceeded ( true ) ; }

Target:
private org.ovirt.engine.core.common.businessentities.Provider getProvider ( ) { return org.ovirt.engine.core.bll.provider.AddProviderCommand.getParameters ( ) . getProvider ( ) ; }
Source:
public org.ovirt.engine.core.common.job.Job runInTransaction ( ) { org.ovirt.engine.core.common.job.Job job = jobDao.get ( jobId ) ; if ( job != null ) { job.getJobSubjectEntities ( ) ; } return job ; }

Target:
public org.ovirt.engine.core.common.job.Job getJob ( final org.ovirt.engine.core.compat.Guid jobId ) { org.ovirt.engine.core.common.job.Job job = jobDao.get ( jobId ) ; if ( job != null ) { java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.VdcObjectType > jobSubjectEntity = jobSubjectEntityDao.getJobSubjectEntityByJobId ( jobId ) ; job.setJobSubjectEntities ( jobSubjectEntity ) ; } return job ; }
Source:
public void testGetNotFound ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpEntityQueryExpectations ( 1 , 0 , true ) ; try { resource.get ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }

Target:
public void testGetNotFound ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpEntityQueryExpectations ( 1 , 0 , true ) ; try { resource.get ( ) ; org.junit.Assert.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }
Source:
public java.lang.Void runInTransaction ( ) { diskImage.setImageId ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; diskImage.setId ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; diskImage.setParentId ( Guid.Empty ) ; diskImage.setImageTemplateId ( Guid.Empty ) ; org.ovirt.engine.core.bll.ImagesHandler.setDiskAlias ( diskImage , getVm ( ) ) ; org.ovirt.engine.core.bll.ImagesHandler.addDiskImage ( diskImage , getVmId ( ) ) ; return null ; }

Target:
public java.lang.Void runInTransaction ( ) { diskImage.setImageId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; diskImage.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; diskImage.setParentId ( Guid.Empty ) ; diskImage.setImageTemplateId ( Guid.Empty ) ; org.ovirt.engine.core.bll.ImagesHandler.setDiskAlias ( diskImage , getVm ( ) ) ; org.ovirt.engine.core.bll.ImagesHandler.addDiskImage ( diskImage , getVmId ( ) ) ; return null ; }
Source:
public void testNotRemovingLabeledNetworksReferencingUnlabeledNetworkRemovalIsOk ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.Network unlabeledNetwork = new org.ovirt.engine.core.common.businessentities.network.Network ( ) ; unlabeledNetwork.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; org.ovirt.engine.core.common.businessentities.network.NetworkAttachment networkAttachment = createNetworkAttachment ( unlabeledNetwork ) ; org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidator validator = createHostSetupNetworksValidator ( java.util.Arrays.asList ( unlabeledNetwork ) , java.util.Collections.< org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > emptyList ( ) ) ; org.junit.Assert.assertThat ( validator.notRemovingLabeledNetworks ( networkAttachment ) , org.hamcrest.CoreMatchers.is ( true ) ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { host = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; host.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; host.setVdsGroupCompatibilityVersion ( Version.v3_5 ) ; final org.ovirt.engine.core.common.businessentities.VdsDynamic vdsDynamic = new org.ovirt.engine.core.common.businessentities.VdsDynamic ( ) ; vdsDynamic.setSupportedClusterLevels ( org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidatorTest.TEST_VERSION ) ; host.setDynamicData ( vdsDynamic ) ; bond = new org.ovirt.engine.core.common.businessentities.network.Bond ( ) ; bond.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; org.mockito.Mockito.when ( mockNetworkExclusivenessValidatorResolver.resolveNetworkExclusivenessValidator ( org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidatorTest.TEST_SUPPORTED_VERSIONS ) ) . thenReturn ( mockNetworkExclusivenessValidator ) ; }
Source:
protected org.ovirt.engine.core.common.businessentities.storage.DiskImage getDiskImage ( ) { disk.setImageId ( diskImageGuid ) ; java.util.ArrayList < org.ovirt.engine.core.compat.Guid > storageIdList = new java.util.ArrayList < > ( ) ; storageIdList.add ( storageDomainId ) ; disk.setStorageIds ( storageIdList ) ; disk.setStoragePoolId ( storagePoolId ) ; return disk ; }

Target:
private org.ovirt.engine.core.common.businessentities.storage.DiskImage mockDiskImage ( ) { disk.setImageId ( diskImageGuid ) ; java.util.ArrayList < org.ovirt.engine.core.compat.Guid > storageIdList = new java.util.ArrayList < > ( ) ; storageIdList.add ( storageDomainId ) ; disk.setStorageIds ( storageIdList ) ; disk.setStoragePoolId ( storagePoolId ) ; disk.setActive ( true ) ; org.mockito.Mockito.when ( diskDao.get ( diskImageGuid ) ) . thenReturn ( disk ) ; return disk ; }
Source:
public static void GetDataCentersByStorageDomain ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storageDomainId ) { 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.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage_pool > ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetStoragePoolsByStorageDomainId , new org.ovirt.engine.core.common.queries.StorageDomainQueryParametersBase ( storageDomainId ) , aQuery ) ; }

Target:
public static void GetDataCenterById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetStoragePoolById , new org.ovirt.engine.core.common.queries.StoragePoolQueryParametersBase ( dataCenterId ) , aQuery ) ; }
Source:
public void testExecuteQueryCommand1 ( ) { mockExpectedListFromDb ( ) ; getQuery ( ) . executeQueryCommand ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity > hooks = getQuery ( ) . getQueryReturnValue ( ) . getReturnValue ( ) ; org.junit.Assert.assertNotNull ( hooks ) ; org.junit.Assert.assertEquals ( expected , hooks ) ; }

Target:
public void testExecuteQueryCommand1 ( ) { mockExpectedListFromDb ( ) ; getQuery ( ) . executeQueryCommand ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity > hooks = getQuery ( ) . getQueryReturnValue ( ) . getReturnValue ( ) ; org.junit.jupiter.api.Assertions.assertNotNull ( hooks ) ; org.junit.jupiter.api.Assertions.assertEquals ( expected , hooks ) ; }
Source:
public static void getDataCenterById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStoragePoolById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) . withoutRefresh ( ) , aQuery ) ; }

Target:
public void getClusterNetworkList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { if ( ( aQuery.converterCallback ) == null ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.Network > ( ) ; } return source ; } } ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllNetworksByClusterId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( clusterId ) , aQuery ) ; }
Source:
protected org.ovirt.engine.core.bll.ValidationResult macAvailable ( ) { java.lang.String macAddress = org.ovirt.engine.core.bll.network.vm.ActivateDeactivateVmNicCommand.getParameters ( ) . getNic ( ) . getMacAddress ( ) ; return new org.ovirt.engine.core.bll.validator.MacAddressValidator ( org.ovirt.engine.core.bll.network.vm.ActivateDeactivateVmNicCommand.getMacPool ( ) , macAddress ) . isMacAssignableValidator ( ) ; }

Target:
protected org.ovirt.engine.core.bll.ValidationResult macAvailable ( ) { org.ovirt.engine.core.bll.network.macpoolmanager.MacPoolManagerStrategy macPool = org.ovirt.engine.core.bll.network.vm.ActivateDeactivateVmNicCommand.getMacPool ( ) ; java.lang.Boolean allowDupMacs = macPool.isDuplicateMacAddressesAllowed ( ) ; org.ovirt.engine.core.bll.network.VmInterfaceManager vmInterfaceManager = new org.ovirt.engine.core.bll.network.VmInterfaceManager ( macPool ) ; if ( allowDupMacs || ( ! ( vmInterfaceManager.existsPluggedInterfaceWithSameMac ( org.ovirt.engine.core.bll.network.vm.ActivateDeactivateVmNicCommand.getParameters ( ) . getNic ( ) ) ) ) ) { return org.ovirt.engine.core.bll.ValidationResult.VALID ; } else { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.NETWORK_MAC_ADDRESS_IN_USE ) ; } }
Source:
public void getGlusterBricksForServer ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid serverId ) { 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 ? source : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterVolumeBricksByServerId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( serverId ) , aQuery ) ; }

Target:
public void getClusterGlusterServices ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.core.common.queries.gluster.GlusterVolumeAdvancedDetailsParameters parameters = new org.ovirt.engine.core.common.queries.gluster.GlusterVolumeAdvancedDetailsParameters ( clusterId , null , null , false ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterVolumeAdvancedDetails , parameters , aQuery ) ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult dataCenterVersionMismatch ( ) { org.ovirt.engine.core.common.businessentities.StoragePool dataCenter = getDataCenter ( ) ; return org.ovirt.engine.core.bll.ValidationResult.failWith ( VdcBllMessages.VDS_GROUP_CANNOT_ADD_COMPATIBILITY_VERSION_WITH_LOWER_STORAGE_POOL ) . when ( ( ( dataCenter != null ) && ( ( dataCenter.getcompatibility_version ( ) . compareTo ( cluster.getcompatibility_version ( ) ) ) > 0 ) ) ) ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult dataCenterVersionMismatch ( ) { org.ovirt.engine.core.common.businessentities.StoragePool dataCenter = getDataCenter ( ) ; return org.ovirt.engine.core.bll.ValidationResult.failWith ( VdcBllMessages.VDS_GROUP_CANNOT_ADD_COMPATIBILITY_VERSION_WITH_LOWER_STORAGE_POOL ) . when ( ( ( dataCenter != null ) && ( ( dataCenter.getCompatibilityVersion ( ) . compareTo ( cluster.getCompatibilityVersion ( ) ) ) > 0 ) ) ) ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult verifyDisks ( java.lang.Iterable < org.ovirt.engine.core.common.businessentities.storage.DiskImage > imageList , java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.compat.Guid > imageToDestinationDomainMap ) { if ( ( ! ( params.isImportAsNewEntity ( ) ) ) && ( ! ( params.isImagesExistOnTargetStorageDomain ( ) ) ) ) { return checkIfDisksExist ( imageList , imageToDestinationDomainMap ) ; } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult verifyDisks ( java.lang.Iterable < org.ovirt.engine.core.common.businessentities.storage.DiskImage > imageList , java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.compat.Guid > imageToDestinationDomainMap ) { if ( ( ! ( params.isImportAsNewEntity ( ) ) ) && ( ! ( params.isImagesExistOnTargetStorageDomain ( ) ) ) ) { return new org.ovirt.engine.core.bll.validator.storage.DiskImagesValidator ( imageList ) . diskImagesOnStorage ( imageToDestinationDomainMap ) ; } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }
Source:
public org.ovirt.engine.core.utils.ovf.xml.XmlNodeList SelectNodes ( java.lang.String string , org.ovirt.engine.core.utils.ovf.xml.XmlNamespaceManager _xmlns ) { try { javax.xml.xpath.XPathFactory factory = javax.xml.xpath.XPathFactory.newInstance ( ) ; javax.xml.xpath.XPath xPath = factory.newXPath ( ) ; xPath.setNamespaceContext ( _xmlns ) ; java.lang.Object o = xPath.evaluate ( string , doc , javax.xml.xpath.XPathConstants.NODESET ) ; return new org.ovirt.engine.core.utils.ovf.xml.XmlNodeList ( ( ( org.w3c.dom.NodeList ) ( o ) ) ) ; } catch ( javax.xml.xpath.XPathExpressionException e ) { throw new java.lang.RuntimeException ( ( "Failed to evaluate xpath: " + string ) , e ) ; } }

Target:
public org.ovirt.engine.core.utils.ovf.xml.XmlNodeList selectNodes ( java.lang.String string , org.ovirt.engine.core.utils.ovf.xml.XmlNamespaceManager _xmlns ) { try { javax.xml.xpath.XPathFactory factory = javax.xml.xpath.XPathFactory.newInstance ( ) ; javax.xml.xpath.XPath xPath = factory.newXPath ( ) ; xPath.setNamespaceContext ( _xmlns ) ; java.lang.Object o = xPath.evaluate ( string , doc , javax.xml.xpath.XPathConstants.NODESET ) ; return new org.ovirt.engine.core.utils.ovf.xml.XmlNodeList ( ( ( org.w3c.dom.NodeList ) ( o ) ) ) ; } catch ( javax.xml.xpath.XPathExpressionException e ) { throw new java.lang.RuntimeException ( ( "Failed to evaluate xpath: " + string ) , e ) ; } }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < ? extends org.ovirt.engine.ui.uicompat.EventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { java.lang.Boolean entity = getOptimizeForSpeed ( ) . getEntity ( ) ; if ( entity ) { getGuarantyResources ( ) . setEntity ( true ) ; } getAllowOverbooking ( ) . setIsChangeable ( ( ! entity ) ) ; }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < ? extends org.ovirt.engine.ui.uicompat.EventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { if ( ( getEnableKsm ( ) . getEntity ( ) ) == null ) return ; if ( ( getEnableKsm ( ) . getEntity ( ) ) == true ) getKsmPolicyForNumaSelection ( ) . setIsChangeable ( true ) ; if ( ( getEnableKsm ( ) . getEntity ( ) ) == false ) getKsmPolicyForNumaSelection ( ) . setIsChangeable ( false ) ; }
Source:
public static org.ovirt.engine.core.common.businessentities.RepoImage map ( org.ovirt.engine.api.model.OpenStackImage model , org.ovirt.engine.core.common.businessentities.RepoImage template ) { org.ovirt.engine.core.common.businessentities.RepoImage entity = ( template != null ) ? template : new org.ovirt.engine.core.common.businessentities.RepoImage ( ) ; if ( model.isSetId ( ) ) { entity.setRepoImageId ( model.getId ( ) ) ; } if ( model.isSetName ( ) ) { entity.setRepoImageName ( model.getName ( ) ) ; } return entity ; }

Target:
public static org.ovirt.engine.core.common.businessentities.storage.RepoImage map ( org.ovirt.engine.api.model.OpenStackImage model , org.ovirt.engine.core.common.businessentities.storage.RepoImage template ) { org.ovirt.engine.core.common.businessentities.storage.RepoImage entity = ( template != null ) ? template : new org.ovirt.engine.core.common.businessentities.storage.RepoImage ( ) ; if ( model.isSetId ( ) ) { entity.setRepoImageId ( model.getId ( ) ) ; } if ( model.isSetName ( ) ) { entity.setRepoImageName ( model.getName ( ) ) ; } return entity ; }
Source:
protected void auditFenceActionExecution ( org.ovirt.engine.core.common.businessentities.pm.FenceActionType action , org.ovirt.engine.core.common.businessentities.FenceAgent realAgent , org.ovirt.engine.core.common.businessentities.VDS proxyHost ) { org.ovirt.engine.core.bll.pm.FenceAgentExecutor.log.debug ( "Executing fence action '{}', proxy='{}', target='{}', agent='{}', policy='{}'" , action , proxyHost.getHostName ( ) , fencedHost.getHostName ( ) , realAgent , fencingPolicy ) ; getAuditLogDirector ( ) . log ( createAuditLogObject ( action , realAgent , proxyHost ) , AuditLogType.FENCE_OPERATION_USING_AGENT_AND_PROXY_STARTED ) ; }

Target:
protected void auditFenceActionExecution ( org.ovirt.engine.core.common.businessentities.pm.FenceActionType action , org.ovirt.engine.core.common.businessentities.pm.FenceAgent realAgent , org.ovirt.engine.core.common.businessentities.VDS proxyHost ) { org.ovirt.engine.core.bll.pm.FenceAgentExecutor.log.debug ( "Executing fence action '{}', proxy='{}', target='{}', agent='{}', policy='{}'" , action , proxyHost.getHostName ( ) , fencedHost.getHostName ( ) , realAgent , fencingPolicy ) ; getAuditLogDirector ( ) . log ( createAuditLogObject ( action , realAgent , proxyHost ) , AuditLogType.FENCE_OPERATION_USING_AGENT_AND_PROXY_STARTED ) ; }
Source:
public static void fillImagesBySnapshots ( org.ovirt.engine.core.common.businessentities.VM vm ) { for ( org.ovirt.engine.core.common.businessentities.storage.Disk disk : vm.getDiskMap ( ) . values ( ) ) { if ( disk.getDiskStorageType ( ) . isInternal ( ) ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage diskImage = ( ( org.ovirt.engine.core.common.businessentities.storage.DiskImage ) ( disk ) ) ; diskImage.getSnapshots ( ) . addAll ( org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getDiskImageDao ( ) . getAllSnapshotsForLeaf ( diskImage.getImageId ( ) ) ) ; } } }

Target:
public void fillImagesBySnapshots ( org.ovirt.engine.core.common.businessentities.VM vm ) { for ( org.ovirt.engine.core.common.businessentities.storage.Disk disk : vm.getDiskMap ( ) . values ( ) ) { if ( disk.getDiskStorageType ( ) . isInternal ( ) ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage diskImage = ( ( org.ovirt.engine.core.common.businessentities.storage.DiskImage ) ( disk ) ) ; diskImage.getSnapshots ( ) . addAll ( diskImageDao.getAllSnapshotsForLeaf ( diskImage.getImageId ( ) ) ) ; } } }
Source:
public java.util.List < org.ovirt.engine.core.common.businessentities.VDS > getAllForStoragePoolAndStatus ( org.ovirt.engine.core.compat.Guid storagePool , org.ovirt.engine.core.common.businessentities.VDSStatus status ) { return getCallsHandler ( ) . executeReadList ( "getVdsByStoragePoolIdWithStatus" , org.ovirt.engine.core.dao.VdsDAODbFacadeImpl.VdsRowMapper.instance , getCustomMapSqlParameterSource ( ) . addValue ( "storage_pool_id" , storagePool ) . addValue ( "status" , status.getValue ( ) ) ) ; }

Target:
public java.util.List < org.ovirt.engine.core.common.businessentities.VDS > getAllForStoragePoolAndStatus ( org.ovirt.engine.core.compat.Guid storagePool , org.ovirt.engine.core.common.businessentities.VDSStatus status ) { java.util.List < org.ovirt.engine.core.common.businessentities.VDS > vdsList = getCallsHandler ( ) . executeReadList ( "getVdsByStoragePoolIdWithStatus" , org.ovirt.engine.core.dao.VdsDAODbFacadeImpl.VdsRowMapper.instance , getCustomMapSqlParameterSource ( ) . addValue ( "storage_pool_id" , storagePool ) . addValue ( "status" , status.getValue ( ) ) ) ; return uniteAgents ( vdsList ) ; }
Source:
protected void initializeModelHandlers ( ) { popupHandler.addDialogModelListener ( org.ovirt.engine.ui.common.uicommon.model.TabModelProvider.getModel ( ) ) ; org.ovirt.engine.ui.common.uicommon.model.TabModelProvider.getModel ( ) . getPropertyChangedEvent ( ) . addListener ( new org.ovirt.engine.ui.uicompat.IEventListener < org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs > ( ) { @ java.lang.Override public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs args ) { java.lang.String propName = args.propertyName ; if ( "WidgetModel" . equals ( propName ) ) { modelBoundWidgetChange ( ) ; } } } ) ; if ( ! ( reusesModel ( ) ) ) { org.ovirt.engine.ui.common.uicommon.model.TabModelProvider.getModel ( ) . setEventBus ( getEventBus ( ) ) ; } }

Target:
void modelBoundWidgetChange ( ) { org.ovirt.engine.ui.uicommonweb.UICommand lastExecutedCommand = getModel ( ) . getLastExecutedCommand ( ) ; org.ovirt.engine.ui.common.presenter.ModelBoundPresenterWidget < ? > modelBoundPresenterWidget = getModelBoundWidget ( lastExecutedCommand ) ; ( ( org.ovirt.engine.ui.common.presenter.ModelBoundPresenterWidget < org.ovirt.engine.ui.uicommonweb.models.Model > ) ( modelBoundPresenterWidget ) ) . init ( getModel ( ) . getWidgetModel ( ) ) ; }
Source:
public void setPosition ( int offsetWidth , int offsetHeight ) { int left = target.getAbsoluteLeft ( ) ; int top = ( target.getAbsoluteTop ( ) ) + ( target.getOffsetHeight ( ) ) ; setPopupPosition ( left , top ) ; }

Target:
public void setPosition ( int offsetWidth , int offsetHeight ) { int left = target.getAbsoluteLeft ( ) ; int top = ( ( target.getAbsoluteTop ( ) ) + ( target.getOffsetHeight ( ) ) ) + ( org.ovirt.engine.ui.common.widget.ElementAwareDecoratedPopupPanel.TOOLTIP_HEIGHT_OFFSET ) ; setPopupPosition ( left , top ) ; }
Source:
public static void GetMaxSpmPriority ( 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 ( ) : 0 ; } } ; aQuery.asyncCallback.OnSuccess ( aQuery.getModel ( ) , 10 ) ; }

Target:
public static void GetVmsRunningOnOrMigratingToVds ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmsRunningOnOrMigratingToVds , new org.ovirt.engine.core.common.queries.GetVmsRunningOnOrMigratingToVdsParameters ( id ) , aQuery ) ; }
Source:
public static void getStorageDomainsByConnection ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , java.lang.String connectionPath ) { 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.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ) ( source ) ) : null ; } } ; org.ovirt.engine.core.common.queries.GetStorageDomainsByConnectionParameters param = new org.ovirt.engine.core.common.queries.GetStorageDomainsByConnectionParameters ( ) ; param.setConnection ( connectionPath ) ; if ( storagePoolId != null ) { param.setStoragePoolId ( storagePoolId ) ; } org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetStorageDomainsByConnection , param , aQuery ) ; }

Target:
public static void getNetworkList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId ) { 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.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.Network > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.Network > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllNetworks , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) , aQuery ) ; }
Source:
public static void getAllDataCenterNetworks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId ) { 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.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.Network > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.Network > ( ) ; } } ; org.ovirt.engine.core.common.queries.IdQueryParameters params = new org.ovirt.engine.core.common.queries.IdQueryParameters ( storagePoolId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetNetworksByDataCenterId , params , aQuery ) ; }

Target:
public static void getStorageConnectionsByDataCenterIdAndStorageType ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.common.businessentities.StorageType storageType ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.core.common.queries.GetConnectionsByDataCenterAndStorageTypeParameters params = new org.ovirt.engine.core.common.queries.GetConnectionsByDataCenterAndStorageTypeParameters ( storagePoolId , storageType ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetConnectionsByDataCenterAndStorageType , params , aQuery ) ; }
Source:
public void networkInUseByHosts ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.VDS host = org.mockito.Mockito.mock ( org.ovirt.engine.core.common.businessentities.VDS.class ) ; org.mockito.Mockito.when ( host.getName ( ) ) . thenReturn ( NAMEABLE_NAME ) ; networkNotUsedByHostsTest ( failsWithNetworkInUse ( ) , java.util.Collections.singletonList ( host ) ) ; }

Target:
public void networkInUseByHosts ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.VDS host = org.mockito.Mockito.mock ( org.ovirt.engine.core.common.businessentities.VDS.class ) ; org.mockito.Mockito.when ( host.getName ( ) ) . thenReturn ( org.ovirt.engine.core.bll.validator.NetworkValidatorTest.NAMEABLE_NAME ) ; networkNotUsedByHostsTest ( org.ovirt.engine.core.bll.validator.NetworkValidatorTest.failsWithNetworkInUse ( ) , java.util.Collections.singletonList ( host ) ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValueObj ) { org.ovirt.engine.core.common.queries.VdcQueryReturnValue returnValue = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValueObj ) ) ; java.lang.Object returnValue2 = returnValue.getReturnValue ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > allNics = ( ( java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > ) ( returnValue2 ) ) ; this . allNics = allNics ; initNicModels ( ) ; StopProgress ( ) ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValueObj ) { org.ovirt.engine.core.common.queries.VdcQueryReturnValue returnValue = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValueObj ) ) ; java.lang.Object returnValue2 = returnValue.getReturnValue ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > allNics = ( ( java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > ) ( returnValue2 ) ) ; this . allNics = allNics ; initNicModels ( ) ; stopProgress ( ) ; }
Source:
public void executeCommand ( org.ovirt.engine.ui.uicommonweb.UICommand command ) { super . executeCommand ( command ) ; if ( command == ( getNewCommand ( ) ) ) { newNetwork ( ) ; } else if ( command == ( getEditCommand ( ) ) ) { edit ( ) ; } else if ( command == ( getRemoveCommand ( ) ) ) { remove ( ) ; } }

Target:
public void executeCommand ( org.ovirt.engine.ui.uicommonweb.UICommand command ) { super . executeCommand ( command ) ; if ( command == ( getNewCommand ( ) ) ) { newNetwork ( ) ; } else if ( command == ( getImportCommand ( ) ) ) { importNetworks ( ) ; } else if ( command == ( getEditCommand ( ) ) ) { edit ( ) ; } else if ( command == ( getRemoveCommand ( ) ) ) { remove ( ) ; } }
Source:
protected java.lang.String idToHref ( java.lang.String id ) { org.ovirt.engine.api.model.HostNIC master = new org.ovirt.engine.api.model.HostNIC ( ) ; master.setId ( id ) ; master.setHost ( new org.ovirt.engine.api.model.Host ( ) ) ; master.getHost ( ) . setId ( hostId ) ; return org.ovirt.engine.api.common.util.LinkHelper.addLinks ( getUriInfo ( ) , master ) . getHref ( ) ; }

Target:
protected java.lang.String idToHref ( java.lang.String id ) { org.ovirt.engine.api.model.HostNIC master = new org.ovirt.engine.api.model.HostNIC ( ) ; master.setId ( id ) ; master.setHost ( new org.ovirt.engine.api.model.Host ( ) ) ; master.getHost ( ) . setId ( hostId ) ; return org.ovirt.engine.api.utils.LinkHelper.addLinks ( getUriInfo ( ) , master ) . getHref ( ) ; }
Source:
public void render ( com.google.gwt.cell.client.Cell.Context context , com.google.gwt.safehtml.shared.SafeHtmlBuilder sb ) { super . render ( context , sb ) ; sb.append ( templates.inlineImageWithTitle ( com.google.gwt.safehtml.shared.SafeHtmlUtils.fromTrustedString ( com.google.gwt.user.client.ui.AbstractImagePrototype.create ( resources.dialogIconHelp ( ) ) . getHTML ( ) ) , constants.networkPublicUseLabel ( ) ) ) ; }

Target:
public void render ( com.google.gwt.cell.client.Cell.Context context , com.google.gwt.safehtml.shared.SafeHtmlBuilder sb ) { super . render ( context , sb ) ; sb.append ( org.ovirt.engine.ui.webadmin.section.main.view.popup.provider.ImportNetworksPopupView.templates.inlineImageWithTitle ( com.google.gwt.safehtml.shared.SafeHtmlUtils.fromTrustedString ( com.google.gwt.user.client.ui.AbstractImagePrototype.create ( org.ovirt.engine.ui.webadmin.section.main.view.popup.provider.ImportNetworksPopupView.resources.dialogIconHelp ( ) ) . getHTML ( ) ) , org.ovirt.engine.ui.webadmin.section.main.view.popup.provider.ImportNetworksPopupView.constants.networkPublicUseLabel ( ) ) ) ; }
Source:
public void createCommand ( ) { org.ovirt.engine.core.common.action.RunVmParams param = new org.ovirt.engine.core.common.action.RunVmParams ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; command = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.RunVmCommand < org.ovirt.engine.core.common.action.RunVmParams > ( param ) ) ; mockVmRunHandler ( ) ; mockSuccessfulSnapshotValidator ( ) ; mockVmPropertiesUtils ( ) ; mockBackend ( ) ; }

Target:
public void createCommand ( ) { org.ovirt.engine.core.common.action.RunVmParams param = new org.ovirt.engine.core.common.action.RunVmParams ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; command = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.RunVmCommand < org.ovirt.engine.core.common.action.RunVmParams > ( param ) ) ; mockIsoDomainListSyncronizer ( ) ; mockSuccessfulRunVmValidator ( ) ; org.mockito.Mockito.doNothing ( ) . when ( command ) . initParametersForExternalNetworks ( ) ; mockSuccessfulSnapshotValidator ( ) ; mockBackend ( ) ; }
Source:
public void testExistingPassDiscardFunctionalityIsNotPreservedSdDiscardZeroesTheDataSupportBreaks ( ) { setSdDiscardSupport ( true , true ) ; createVmDiskOnSd ( false , false ) ; createVmDiskOnSd ( true , true ) ; org.junit.Assert.assertFalse ( discardHelper.isExistingPassDiscardFunctionalityPreserved ( java.util.Arrays.asList ( createLunWithDiscardFunctionality ( 1024L , false ) , createLunWithDiscardFunctionality ( 2048L , true ) ) , storageDomain ) ) ; }

Target:
public void testGetLunsThatBreakDiscardAfterDeleteSupportDiscardAfterDeleteBreaks ( ) { storageDomain.setDiscardAfterDelete ( true ) ; org.ovirt.engine.core.common.businessentities.storage.LUNs lunThatBreaksDiscardSupport = createLunWithDiscardSupport ( 0L ) ; assertGetLunsThatBreakDiscardAfterDeleteSupportContainsExpectedLuns ( java.util.Arrays.asList ( createLunWithDiscardSupport ( 1024L ) , lunThatBreaksDiscardSupport ) , java.util.Collections.singletonList ( lunThatBreaksDiscardSupport ) ) ; }
Source:
public void postDataCenterWithClusterSelectedItemChanged ( ) { updateDefaultHost ( ) ; updateCustomPropertySheet ( ) ; updateMinAllocatedMemory ( ) ; updateNumOfSockets ( ) ; if ( ( ( org.ovirt.engine.core.common.businessentities.VmTemplate ) ( getModel ( ) . getTemplate ( ) . getSelectedItem ( ) ) ) != null ) { org.ovirt.engine.core.common.businessentities.VmTemplate template = ( ( org.ovirt.engine.core.common.businessentities.VmTemplate ) ( getModel ( ) . getTemplate ( ) . getSelectedItem ( ) ) ) ; updateQuotaByCluster ( template.getQuotaId ( ) , template.getQuotaName ( ) ) ; } updateMemoryBalloon ( ) ; updateCpuSharesAvailability ( ) ; }

Target:
public void postDataCenterWithClusterSelectedItemChanged ( ) { updateDefaultHost ( ) ; updateCustomPropertySheet ( ) ; updateMinAllocatedMemory ( ) ; updateNumOfSockets ( ) ; updateOSValues ( ) ; if ( ( getModel ( ) . getTemplate ( ) . getSelectedItem ( ) ) != null ) { org.ovirt.engine.core.common.businessentities.VmTemplate template = getModel ( ) . getTemplate ( ) . getSelectedItem ( ) ; updateQuotaByCluster ( template.getQuotaId ( ) , template.getQuotaName ( ) ) ; } updateMemoryBalloon ( ) ; updateCpuSharesAvailability ( ) ; updateVirtioScsiAvailability ( ) ; updateTemplate ( ) ; }
Source:
public final void rerun ( ) { org.ovirt.engine.core.utils.threadpool.ThreadPoolUtil.execute ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { rerunInternal ( ) ; } } ) ; }

Target:
protected void failedToRunVm ( ) { org.ovirt.engine.core.utils.threadpool.ThreadPoolUtil.execute ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { processVmPoolOnStopVm ( ) ; } } ) ; org.ovirt.engine.core.bll.job.ExecutionHandler.setAsyncJob ( org.ovirt.engine.core.bll.RunVmCommandBase.getExecutionContext ( ) , false ) ; org.ovirt.engine.core.bll.job.ExecutionHandler.endJob ( org.ovirt.engine.core.bll.RunVmCommandBase.getExecutionContext ( ) , false ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.StorageDomain createDataStorageDomain ( org.ovirt.engine.core.common.businessentities.StorageDomainStatus status , java.lang.String name ) { final org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain = new org.ovirt.engine.core.common.businessentities.StorageDomain ( ) ; storageDomain.setStorageName ( name ) ; storageDomain.setStatus ( status ) ; storageDomain.setStorageDomainType ( StorageDomainType.Data ) ; storageDomain.setId ( HE_SD_ID ) ; return storageDomain ; }

Target:
private org.ovirt.engine.core.common.businessentities.StorageDomain prepareStorageDomainForElection ( org.ovirt.engine.core.common.businessentities.StorageDomainStatus status , java.lang.String name ) { final org.ovirt.engine.core.common.businessentities.StorageDomain domain = createDataStorageDomain ( status , name , HE_SD_ID ) ; org.mockito.Mockito.doReturn ( storageDomainDao ) . when ( cmd ) . getStorageDomainDao ( ) ; org.mockito.Mockito.when ( storageDomainDao.getAllForStoragePool ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( java.util.Arrays.asList ( domain ) ) ; cmd.setStoragePool ( new org.ovirt.engine.core.common.businessentities.StoragePool ( ) ) ; return domain ; }
Source:
public static org.ovirt.engine.core.bll.CommandBase < ? > buildCommand ( org.ovirt.engine.core.common.action.ActionType actionType , org.ovirt.engine.core.common.action.VdcActionParametersBase parameters , org.ovirt.engine.core.bll.job.ExecutionContext executionContext , org.ovirt.engine.core.compat.CommandStatus cmdStatus ) { org.ovirt.engine.core.bll.job.ExecutionContext cmdExecutionContext = ( executionContext == null ) ? new org.ovirt.engine.core.bll.job.ExecutionContext ( ) : executionContext ; org.ovirt.engine.core.bll.CommandBase < ? > command = org.ovirt.engine.core.bll.CommandsFactory.createCommand ( actionType , parameters , new org.ovirt.engine.core.bll.context.CommandContext ( new org.ovirt.engine.core.bll.context.EngineContext ( ) ) . withExecutionContext ( cmdExecutionContext ) ) ; command.setCommandStatus ( cmdStatus , false ) ; return command ; }

Target:
public static org.ovirt.engine.core.bll.CommandBase < ? > buildCommand ( org.ovirt.engine.core.common.action.ActionType actionType , org.ovirt.engine.core.common.action.ActionParametersBase parameters , org.ovirt.engine.core.bll.job.ExecutionContext executionContext , org.ovirt.engine.core.compat.CommandStatus cmdStatus ) { org.ovirt.engine.core.bll.job.ExecutionContext cmdExecutionContext = ( executionContext == null ) ? new org.ovirt.engine.core.bll.job.ExecutionContext ( ) : executionContext ; org.ovirt.engine.core.bll.CommandBase < ? > command = org.ovirt.engine.core.bll.CommandsFactory.createCommand ( actionType , parameters , new org.ovirt.engine.core.bll.context.CommandContext ( new org.ovirt.engine.core.bll.context.EngineContext ( ) ) . withExecutionContext ( cmdExecutionContext ) ) ; command.setCommandStatus ( cmdStatus , false ) ; return command ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult networkCanBeAttached ( ) { return org.ovirt.engine.core.bll.ValidationResult.failWith ( VdcBllMessages.CANNOT_ADD_NETWORK_ATTACHMENT_ON_SLAVE_OR_VLAN ) . when ( ( ( org.ovirt.engine.core.utils.NetworkUtils.isVlan ( iface ) ) || ( iface.isPartOfBond ( ) ) ) ) ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult networkCanBeAttached ( java.lang.String networkName ) { return org.ovirt.engine.core.bll.ValidationResult.failWith ( EngineMessage.CANNOT_ADD_NETWORK_ATTACHMENT_ON_SLAVE_OR_VLAN , org.ovirt.engine.core.utils.ReplacementUtils.createSetVariableString ( org.ovirt.engine.core.bll.validator.HostInterfaceValidator.VAR_NETWORK_NAME , networkName ) , org.ovirt.engine.core.utils.ReplacementUtils.createSetVariableString ( org.ovirt.engine.core.bll.validator.HostInterfaceValidator.VAR_NIC_NAME , iface.getName ( ) ) ) . when ( ( ( org.ovirt.engine.core.utils.NetworkUtils.isVlan ( iface ) ) || ( iface.isPartOfBond ( ) ) ) ) ; }