auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private static boolean validateSpaceRequirements ( org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain , java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > disksList ) { org.ovirt.engine.core.bll.validator.StorageDomainValidator storageDomainValidator = new org.ovirt.engine.core.bll.validator.StorageDomainValidator ( storageDomain ) ; return ( storageDomainValidator.isDomainWithinThresholds ( ) . isValid ( ) ) && ( storageDomainValidator.hasSpaceForClonedDisks ( disksList ) . isValid ( ) ) ; }

Target:
private static boolean validateSpaceRequirements ( org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain , java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > disksList ) { org.ovirt.engine.core.bll.validator.storage.StorageDomainValidator storageDomainValidator = new org.ovirt.engine.core.bll.validator.storage.StorageDomainValidator ( storageDomain ) ; return ( storageDomainValidator.isDomainWithinThresholds ( ) . isValid ( ) ) && ( storageDomainValidator.hasSpaceForClonedDisks ( disksList ) . isValid ( ) ) ; }
Source:
public static void getAllAttachableDisks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.compat.Guid vmId ) { 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.Disk > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetAllAttachableDisks params = new org.ovirt.engine.core.common.queries.GetAllAttachableDisks ( storagePoolId ) ; params.setVmId ( vmId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllAttachableDisks , 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:
protected void endWithFailure ( ) { if ( ( org.ovirt.engine.core.bll.storage.disk.image.TransferImageCommand.getParameters ( ) . getTransferType ( ) ) == ( org.ovirt.engine.core.common.businessentities.storage.TransferType.Upload ) ) { super . endWithFailure ( ) ; } org.ovirt.engine.core.bll.storage.disk.image.TransferImageCommand.setSucceeded ( true ) ; }

Target:
protected void endWithFailure ( ) { if ( ( org.ovirt.engine.core.bll.storage.disk.image.TransferImageCommand.getParameters ( ) . getTransferType ( ) ) == ( org.ovirt.engine.core.common.businessentities.storage.TransferType.Upload ) ) { runInternalAction ( ActionType.RemoveDisk , new org.ovirt.engine.core.common.action.RemoveDiskParameters ( org.ovirt.engine.core.bll.storage.disk.image.TransferImageCommand.getParameters ( ) . getImageGroupID ( ) ) ) ; } org.ovirt.engine.core.bll.storage.disk.image.TransferImageCommand.setSucceeded ( true ) ; }
Source:
protected boolean updateWipeAfterDeleteRequested ( ) { return ( getNewDisk ( ) . isWipeAfterDelete ( ) ) != ( getOldDisk ( ) . isWipeAfterDelete ( ) ) ; }

Target:
private boolean resizeDiskImageRequested ( ) { boolean sizeChanged = ( getNewDisk ( ) . getSize ( ) ) != ( getOldDisk ( ) . getSize ( ) ) ; switch ( getNewDisk ( ) . getDiskStorageType ( ) ) { case IMAGE : return sizeChanged && ( ( vmDeviceForVm.getSnapshotId ( ) ) == null ) ; case CINDER : return sizeChanged ; } return false ; }
Source:
public void shouldNotElectInactiveHostedEngineDomain ( ) { prepareStorageDomainForElection ( StorageDomainStatus.Inactive , org.ovirt.engine.core.bll.storage.domain.StorageDomainCommandBaseTest.HE_STORAGE_DOMAIN_NAME ) ; org.mockito.Mockito.when ( hostedEngineHelper.isHostedEngineStorageDomain ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.StorageDomain.class ) ) ) . thenReturn ( true ) ; org.junit.Assert.assertEquals ( null , cmd.electNewMaster ( false , true , false ) ) ; }

Target:
public void shouldNotElectInactiveHostedEngineDomain ( ) { prepareStorageDomainForElection ( StorageDomainStatus.Inactive , org.ovirt.engine.core.bll.storage.domain.StorageDomainCommandBaseTest.HE_STORAGE_DOMAIN_NAME ) ; org.mockito.Mockito.when ( hostedEngineHelper.isHostedEngineStorageDomain ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.StorageDomain.class ) ) ) . thenReturn ( true ) ; org.junit.Assert.assertNull ( cmd.electNewMaster ( false , true , false ) ) ; }
Source:
private void networkNotUsedByVmsTest ( org.hamcrest.Matcher < org.ovirt.engine.core.bll.ValidationResult > matcher , java.util.List < org.ovirt.engine.core.common.businessentities.VM > vms ) { org.mockito.Mockito.when ( vmDao.getAllForNetwork ( org.mockito.ArgumentMatchers.any ( ) ) ) . thenReturn ( vms ) ; org.junit.Assert.assertThat ( validator.networkNotUsedByVms ( ) , matcher ) ; }

Target:
private void networkNotUsedByVmsTest ( org.hamcrest.Matcher < org.ovirt.engine.core.bll.ValidationResult > matcher , java.util.List < org.ovirt.engine.core.common.businessentities.VM > vms ) { org.mockito.Mockito.when ( vmDao.getAllForNetwork ( org.mockito.ArgumentMatchers.any ( ) ) ) . thenReturn ( vms ) ; org.hamcrest.MatcherAssert.assertThat ( validator.networkNotUsedByVms ( ) , matcher ) ; }
Source:
public static void getHostPublicKey ( 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.getInstance ( ) . runQuery ( VdcQueryType.GetServerSSHPublicKey , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }

Target:
public static void countAllTemplates ( 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 ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmTemplateCount , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }
Source:
public void diskImagesNotIllegalBothIllegal ( ) { disk1.setImageStatus ( ImageStatus.ILLEGAL ) ; disk2.setImageStatus ( ImageStatus.ILLEGAL ) ; org.junit.Assert.assertThat ( validator.diskImagesNotIllegal ( ) , org.hamcrest.CoreMatchers.both ( org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( VdcBllMessages.ACTION_TYPE_FAILED_DISKS_ILLEGAL ) ) . and ( org.ovirt.engine.core.bll.validator.ValidationResultMatchers.replacements ( org.hamcrest.CoreMatchers.hasItem ( org.ovirt.engine.core.bll.validator.storage.DiskImagesValidatorTest.createAliasReplacements ( disk1 , disk2 ) ) ) ) ) ; }

Target:
public void diskImagesNotIllegalBothIllegal ( ) { disk1.setImageStatus ( ImageStatus.ILLEGAL ) ; disk2.setImageStatus ( ImageStatus.ILLEGAL ) ; org.junit.Assert.assertThat ( validator.diskImagesNotIllegal ( ) , org.hamcrest.CoreMatchers.both ( org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.ACTION_TYPE_FAILED_DISKS_ILLEGAL ) ) . and ( org.ovirt.engine.core.bll.validator.ValidationResultMatchers.replacements ( org.hamcrest.CoreMatchers.hasItem ( org.ovirt.engine.core.bll.validator.storage.DiskImagesValidatorTest.createAliasReplacements ( disk1 , disk2 ) ) ) ) ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc removeVG ( java.lang.String vgUUID ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.removeVG ( vgUUID ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc vmUpdateDevice ( java.lang.String vmId , org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcStruct device ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.vmUpdateDevice ( vmId , device.getInnerMap ( ) ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
public void testRemove ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.RepoImage > listOfRepoFiles = dao.getRepoListForStorageDomain ( FixturesTool.SHARED_ISO_STORAGE_DOMAIN_FOR_SP2_AND_SP3 , ImageFileType.ISO ) ; org.junit.Assert.assertNotNull ( listOfRepoFiles ) ; org.junit.Assert.assertFalse ( listOfRepoFiles.isEmpty ( ) ) ; dao.removeRepoDomainFileList ( FixturesTool.SHARED_ISO_STORAGE_DOMAIN_FOR_SP2_AND_SP3 , ImageFileType.ISO ) ; listOfRepoFiles = getActiveIsoDomain ( ) ; org.junit.Assert.assertNotNull ( listOfRepoFiles ) ; org.junit.Assert.assertTrue ( listOfRepoFiles.isEmpty ( ) ) ; }

Target:
public void testRemove ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.RepoImage > listOfRepoFiles = dao.getRepoListForStorageDomain ( FixturesTool.SHARED_ISO_STORAGE_DOMAIN_FOR_SP2_AND_SP3 , ImageFileType.ISO ) ; org.junit.jupiter.api.Assertions.assertNotNull ( listOfRepoFiles ) ; org.junit.jupiter.api.Assertions.assertFalse ( listOfRepoFiles.isEmpty ( ) ) ; dao.removeRepoDomainFileList ( FixturesTool.SHARED_ISO_STORAGE_DOMAIN_FOR_SP2_AND_SP3 , ImageFileType.ISO ) ; listOfRepoFiles = getActiveIsoDomain ( ) ; org.junit.jupiter.api.Assertions.assertNotNull ( listOfRepoFiles ) ; org.junit.jupiter.api.Assertions.assertTrue ( listOfRepoFiles.isEmpty ( ) ) ; }
Source:
public void prepareFromRequest ( com.gwtplatform.mvp.client.proxy.PlaceRequest request ) { super . prepareFromRequest ( request ) ; if ( hasMainTabSelection ( ) ) { org.ovirt.engine.ui.common.presenter.AbstractSubTabPresenter.getProxy ( ) . manualReveal ( this ) ; } else { org.ovirt.engine.ui.common.presenter.AbstractSubTabPresenter.getProxy ( ) . manualRevealFailed ( ) ; placeManager.revealPlace ( getMainTabRequest ( ) ) ; } }

Target:
public void prepareFromRequest ( com.gwtplatform.mvp.shared.proxy.PlaceRequest request ) { super . prepareFromRequest ( request ) ; if ( hasMainTabSelection ( ) ) { org.ovirt.engine.ui.common.presenter.AbstractSubTabPresenter.getProxy ( ) . manualReveal ( this ) ; } else { org.ovirt.engine.ui.common.presenter.AbstractSubTabPresenter.getProxy ( ) . manualRevealFailed ( ) ; placeManager.revealPlace ( getMainTabRequest ( ) ) ; } }
Source:
public java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > getDisplayNics ( org.ovirt.engine.core.common.businessentities.network.Network displayNetwork ) { java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > displayNics = new java.util.HashMap < > ( ) ; if ( displayNetwork != null ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > nics = getInterfaceDao ( ) . getVdsInterfacesByNetworkId ( displayNetwork.getId ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic : nics ) { displayNics.put ( nic.getVdsId ( ) , nic ) ; } } return displayNics ; }

Target:
public java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > getDisplayNics ( org.ovirt.engine.core.common.businessentities.network.Network displayNetwork ) { java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > displayNics = new java.util.HashMap < > ( ) ; if ( displayNetwork != null ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > nics = interfaceDao.getVdsInterfacesByNetworkId ( displayNetwork.getId ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic : nics ) { displayNics.put ( nic.getVdsId ( ) , nic ) ; } } return displayNics ; }
Source:
protected boolean canDoAction ( ) { if ( ( getStoragePool ( ) ) == null ) { addCanDoActionMessage ( VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_POOL_NOT_EXIST ) ; return false ; } if ( ( getQuotaId ( ) ) == null ) { addCanDoActionMessage ( VdcBllMessages.ACTION_TYPE_FAILED_QUOTA_IS_NOT_VALID ) ; return false ; } if ( ( getDbFacade ( ) . getQuotaDAO ( ) . getById ( getQuotaId ( ) ) ) == null ) { addCanDoActionMessage ( VdcBllMessages.ACTION_TYPE_FAILED_QUOTA_NOT_EXIST ) ; return false ; } return true ; }

Target:
protected boolean canDoAction ( ) { if ( ( getStoragePool ( ) ) == null ) { addCanDoActionMessage ( VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_POOL_NOT_EXIST ) ; return false ; } if ( ( getQuotaId ( ) ) == null ) { addCanDoActionMessage ( VdcBllMessages.ACTION_TYPE_FAILED_QUOTA_IS_NOT_VALID ) ; return false ; } if ( ( getDbFacade ( ) . getQuotaDao ( ) . getById ( getQuotaId ( ) ) ) == null ) { addCanDoActionMessage ( VdcBllMessages.ACTION_TYPE_FAILED_QUOTA_NOT_EXIST ) ; return false ; } return true ; }
Source:
private java.util.List < org.ovirt.engine.core.common.businessentities.VM > getMigrableVmsRunningOnVds ( org.ovirt.engine.core.compat.Guid vdsId ) { java.util.List < org.ovirt.engine.core.common.businessentities.VM > vmsFromDB = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmDAO ( ) . getAllRunningForVds ( vdsId ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VM > vms = org.ovirt.engine.core.utils.linq.LinqUtils.filter ( vmsFromDB , new org.ovirt.engine.core.utils.linq.Predicate < org.ovirt.engine.core.common.businessentities.VM > ( ) { @ java.lang.Override public boolean eval ( org.ovirt.engine.core.common.businessentities.VM v ) { return ( v.getMigrationSupport ( ) ) == ( org.ovirt.engine.core.common.businessentities.MigrationSupport.MIGRATABLE ) ; } } ) ; return vms ; }

Target:
private java.util.List < org.ovirt.engine.core.common.businessentities.VM > getMigrableVmsRunningOnVds ( org.ovirt.engine.core.compat.Guid vdsId ) { java.util.List < org.ovirt.engine.core.common.businessentities.VM > vmsFromDB = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmDao ( ) . getAllRunningForVds ( vdsId ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VM > vms = org.ovirt.engine.core.utils.linq.LinqUtils.filter ( vmsFromDB , new org.ovirt.engine.core.utils.linq.Predicate < org.ovirt.engine.core.common.businessentities.VM > ( ) { @ java.lang.Override public boolean eval ( org.ovirt.engine.core.common.businessentities.VM v ) { return ( v.getMigrationSupport ( ) ) == ( org.ovirt.engine.core.common.businessentities.MigrationSupport.MIGRATABLE ) ; } } ) ; return vms ; }
Source:
public void render ( com.google.gwt.cell.client.Cell.Context context , com.google.gwt.safehtml.shared.SafeHtmlBuilder sb ) { if ( ! ( isEnabled ( ) ) ) { if ( getValue ( ) ) { sb.append ( org.ovirt.engine.ui.webadmin.widget.table.column.CheckboxHeader.INPUT_CHECKED_DISABLED ) ; sb.append ( title ) ; } else { sb.append ( org.ovirt.engine.ui.webadmin.widget.table.column.CheckboxHeader.INPUT_UNCHECKED_DISABLED ) ; sb.append ( title ) ; } } else { super . render ( context , sb ) ; } }

Target:
public void render ( com.google.gwt.cell.client.Cell.Context context , com.google.gwt.safehtml.shared.SafeHtmlBuilder sb ) { if ( ! ( isEnabled ( ) ) ) { if ( getValue ( ) ) { sb.append ( org.ovirt.engine.ui.common.widget.table.header.CheckboxHeader.INPUT_CHECKED_DISABLED ) ; sb.append ( title ) ; } else { sb.append ( org.ovirt.engine.ui.common.widget.table.header.CheckboxHeader.INPUT_UNCHECKED_DISABLED ) ; sb.append ( title ) ; } } else { super . render ( context , sb ) ; } }
Source:
public void onSuccess ( java.lang.Object model1 , java.lang.Object result ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity > volumes = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity > ) ( result ) ) ; if ( ( volumes.size ( ) ) > 0 ) { clusterModel.getEnableGlusterService ( ) . setIsChangable ( false ) ; if ( ! isVirtGlusterAllowed ) { clusterModel.getEnableOvirtService ( ) . setIsChangable ( false ) ; } } }

Target:
public void onSuccess ( java.lang.Object model1 , java.lang.Object result ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity > volumes = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity > ) ( result ) ) ; if ( ( volumes.size ( ) ) > 0 ) { clusterModel.getEnableGlusterService ( ) . setIsChangeable ( false ) ; if ( ! isVirtGlusterAllowed ) { clusterModel.getEnableOvirtService ( ) . setIsChangeable ( false ) ; } } }
Source:
public static org.ovirt.engine.ui.uicommonweb.models.vms.EditTemplateInterfaceModel createInstance ( org.ovirt.engine.core.common.businessentities.VmBase vm , org.ovirt.engine.core.compat.Guid dcId , org.ovirt.engine.core.compat.Version clusterCompatibilityVersion , java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > vmNicList , org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface nic , org.ovirt.engine.ui.uicommonweb.models.EntityModel sourceModel ) { org.ovirt.engine.ui.uicommonweb.models.vms.EditTemplateInterfaceModel instance = new org.ovirt.engine.ui.uicommonweb.models.vms.EditTemplateInterfaceModel ( vm , dcId , clusterCompatibilityVersion , vmNicList , nic , sourceModel ) ; instance.init ( ) ; return instance ; }

Target:
public static org.ovirt.engine.ui.uicommonweb.models.vms.EditTemplateInterfaceModel createInstance ( org.ovirt.engine.core.common.businessentities.VmBase vm , org.ovirt.engine.core.compat.Guid dcId , org.ovirt.engine.core.compat.Version clusterCompatibilityVersion , java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > vmNicList , org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface nic , org.ovirt.engine.ui.uicommonweb.models.IModel sourceModel ) { org.ovirt.engine.ui.uicommonweb.models.vms.EditTemplateInterfaceModel instance = new org.ovirt.engine.ui.uicommonweb.models.vms.EditTemplateInterfaceModel ( vm , dcId , clusterCompatibilityVersion , vmNicList , nic , sourceModel ) ; instance.init ( ) ; return instance ; }
Source:
public org.ovirt.engine.core.bll.validator.storage.MultipleStorageDomainsValidator createMultipleStorageDomainsValidator ( java.util.Collection < org.ovirt.engine.core.common.businessentities.storage.DiskImage > diskImages ) { return new org.ovirt.engine.core.bll.validator.storage.MultipleStorageDomainsValidator ( params.getStoragePoolId ( ) , org.ovirt.engine.core.bll.storage.disk.image.ImagesHandler.getAllStorageIdsForImageIds ( diskImages ) ) ; }

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 void updateNetworkDevice ( ) { org.ovirt.engine.core.common.businessentities.HostDeviceId netDeviceId = new org.ovirt.engine.core.common.businessentities.HostDeviceId ( FixturesTool.NETWORK_HOST_DEVICE_HOST_ID , FixturesTool.NETWORK_HOST_DEVICE_NAME ) ; org.ovirt.engine.core.common.businessentities.HostDevice before = dao.get ( netDeviceId ) ; before.setNetworkInterfaceName ( ( ( before.getNetworkInterfaceName ( ) ) + "new" ) ) ; dao.update ( before ) ; org.ovirt.engine.core.common.businessentities.HostDevice after = dao.get ( netDeviceId ) ; org.junit.Assert.assertNotNull ( after ) ; org.junit.Assert.assertEquals ( before , after ) ; }

Target:
public void setVmIdOnHostDeviceTest ( ) { org.ovirt.engine.core.common.businessentities.HostDevice before = getNetworkDevice ( ) ; org.junit.Assert.assertNull ( before.getVmId ( ) ) ; org.ovirt.engine.core.compat.Guid vmId = FixturesTool.VM_WITH_NO_ATTACHED_DISKS ; dao.setVmIdOnHostDevice ( before.getId ( ) , vmId ) ; before.setVmId ( vmId ) ; org.ovirt.engine.core.common.businessentities.HostDevice after = dao.get ( before.getId ( ) ) ; org.junit.Assert.assertEquals ( before , after ) ; }
Source:
public static void GetStorageDomainById ( 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 ? ( ( org.ovirt.engine.core.common.businessentities.storage_domains ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetStorageDomainById , new org.ovirt.engine.core.common.queries.StorageDomainQueryParametersBase ( storageDomainId ) , aQuery ) ; }

Target:
public static void GetDomainList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , boolean filterInternalDomain ) { 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 ? new java.util.ArrayList < java.lang.String > ( ( ( java.util.ArrayList < java.lang.String > ) ( source ) ) ) : new java.util.ArrayList < java.lang.String > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetDomainListParameters tempVar = new org.ovirt.engine.core.common.queries.GetDomainListParameters ( ) ; tempVar.setFilterInternalDomain ( filterInternalDomain ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetDomainList , tempVar , aQuery ) ; }
Source:
protected boolean canDoAction ( ) { final org.ovirt.engine.core.common.businessentities.VM vm = org.ovirt.engine.core.bll.ThawVmCommand.getVm ( ) ; if ( vm == null ) { return failCanDoAction ( EngineMessage.ACTION_TYPE_FAILED_VM_NOT_FOUND ) ; } if ( ! ( org.ovirt.engine.core.bll.ThawVmCommand.canRunActionOnNonManagedVm ( ) ) ) { return false ; } if ( ( org.ovirt.engine.core.bll.ThawVmCommand.getVm ( ) . getStatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.VMStatus.Up ) ) { return org.ovirt.engine.core.bll.ThawVmCommand.failVmStatusIllegal ( ) ; } return true ; }

Target:
protected boolean validate ( ) { final org.ovirt.engine.core.common.businessentities.VM vm = org.ovirt.engine.core.bll.ThawVmCommand.getVm ( ) ; if ( vm == null ) { return failValidation ( EngineMessage.ACTION_TYPE_FAILED_VM_NOT_FOUND ) ; } if ( ! ( org.ovirt.engine.core.bll.ThawVmCommand.canRunActionOnNonManagedVm ( ) ) ) { return false ; } if ( ( org.ovirt.engine.core.bll.ThawVmCommand.getVm ( ) . getStatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.VMStatus.Up ) ) { return org.ovirt.engine.core.bll.ThawVmCommand.failVmStatusIllegal ( ) ; } return true ; }
Source:
public void testGetVdsCapabilities ( ) throws java.lang.InterruptedException , java.util.concurrent.ExecutionException , org.ovirt.vdsm.jsonrpc.client.ClientConnectionException { org.ovirt.vdsm.jsonrpc.client.JsonRpcClient client = org.ovirt.engine.core.vdsbroker.jsonrpc.JsonRpcUtils.createStompClient ( org.ovirt.engine.core.vdsbroker.jsonrpc.JsonRpcIntegrationTest.HOST_ADDRESS , org.ovirt.engine.core.vdsbroker.jsonrpc.JsonRpcIntegrationTest.PORT , org.ovirt.engine.core.vdsbroker.jsonrpc.JsonRpcIntegrationTest.TIMEOUT , 0 , org.ovirt.engine.core.vdsbroker.jsonrpc.JsonRpcIntegrationTest.TIMEOUT , org.ovirt.engine.core.vdsbroker.jsonrpc.JsonRpcIntegrationTest.TIMEOUT , true , "TLSv1" , java.lang.Runtime.getRuntime ( ) . availableProcessors ( ) , org.ovirt.engine.core.vdsbroker.jsonrpc.JsonRpcIntegrationTest.DEFAULT_REQUEST_QUEUE , org.ovirt.engine.core.vdsbroker.jsonrpc.JsonRpcIntegrationTest.DEFAULT_RESPONSE_QUEUE ) ; final org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "Host.getCapabilities" ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > map = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( client , request ) ; org.junit.Assert.assertTrue ( map.isEmpty ( ) ) ; }

Target:
public void testGetVdsCapabilities ( ) throws java.lang.InterruptedException , java.util.concurrent.ExecutionException , org.ovirt.vdsm.jsonrpc.client.ClientConnectionException { org.ovirt.vdsm.jsonrpc.client.JsonRpcClient client = org.ovirt.engine.core.vdsbroker.jsonrpc.JsonRpcUtils.createStompClient ( org.ovirt.engine.core.vdsbroker.jsonrpc.JsonRpcIntegrationTest.HOST_ADDRESS , org.ovirt.engine.core.vdsbroker.jsonrpc.JsonRpcIntegrationTest.PORT , org.ovirt.engine.core.vdsbroker.jsonrpc.JsonRpcIntegrationTest.TIMEOUT , 0 , org.ovirt.engine.core.vdsbroker.jsonrpc.JsonRpcIntegrationTest.TIMEOUT , org.ovirt.engine.core.vdsbroker.jsonrpc.JsonRpcIntegrationTest.TIMEOUT , true , "TLSv1" , java.lang.Runtime.getRuntime ( ) . availableProcessors ( ) , org.ovirt.engine.core.vdsbroker.jsonrpc.JsonRpcIntegrationTest.DEFAULT_REQUEST_QUEUE , org.ovirt.engine.core.vdsbroker.jsonrpc.JsonRpcIntegrationTest.DEFAULT_RESPONSE_QUEUE , org.ovirt.engine.core.vdsbroker.jsonrpc.JsonRpcIntegrationTest.DEFAULT_EVENTS_QUEUE ) ; final org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "Host.getCapabilities" ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > map = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( client , request ) ; org.junit.Assert.assertTrue ( map.isEmpty ( ) ) ; }
Source:
public javax.ws.rs.core.Response add ( org.ovirt.engine.api.model.StorageDomain storageDomain ) { validateParameters ( storageDomain , "id|name" ) ; org.ovirt.engine.core.compat.Guid storageDomainId ; if ( storageDomain.isSetId ( ) ) { storageDomainId = asGuid ( storageDomain.getId ( ) ) ; } else { storageDomainId = lookupStorageDomainIdByName ( storageDomain.getName ( ) ) ; } return performCreation ( VdcActionType.AttachStorageDomainToPool , new org.ovirt.engine.core.common.action.DetachStorageDomainFromPoolParameters ( storageDomainId , dataCenterId ) , new org.ovirt.engine.api.restapi.resource.BackendAttachedStorageDomainsResource.StorageDomainIdResolver ( storageDomainId ) ) ; }

Target:
public javax.ws.rs.core.Response add ( org.ovirt.engine.api.model.StorageDomain storageDomain ) { validateParameters ( storageDomain , "id|name" ) ; org.ovirt.engine.core.compat.Guid storageDomainId ; if ( storageDomain.isSetId ( ) ) { storageDomainId = asGuid ( storageDomain.getId ( ) ) ; } else { storageDomainId = lookupStorageDomainIdByName ( storageDomain.getName ( ) ) ; } return performCreate ( VdcActionType.AttachStorageDomainToPool , new org.ovirt.engine.core.common.action.DetachStorageDomainFromPoolParameters ( storageDomainId , dataCenterId ) , new org.ovirt.engine.api.restapi.resource.BackendAttachedStorageDomainsResource.StorageDomainIdResolver ( storageDomainId ) ) ; }
Source:
private void configureLocalStorage2 ( org.ovirt.engine.ui.uicommonweb.models.hosts.ConfigureLocalStorageModel model ) { java.lang.String prefix = ( ( java.lang.String ) ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getConfigValuePreConverted ( ConfigurationValues.RhevhLocalFSPath ) ) ) ; if ( ! ( org.ovirt.engine.core.compat.StringHelper.isNullOrEmpty ( prefix ) ) ) { org.ovirt.engine.ui.uicommonweb.models.EntityModel pathModel = model.getStorage ( ) . getPath ( ) ; pathModel.setEntity ( prefix ) ; pathModel.setIsChangeable ( false ) ; } configureLocalStorage3 ( model ) ; }

Target:
private void configureLocalStorage2 ( org.ovirt.engine.ui.uicommonweb.models.hosts.ConfigureLocalStorageModel model ) { java.lang.String prefix = ( ( java.lang.String ) ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getConfigValuePreConverted ( ConfigurationValues.RhevhLocalFSPath ) ) ) ; if ( ! ( org.ovirt.engine.ui.uicompat.external.StringUtils.isEmpty ( prefix ) ) ) { org.ovirt.engine.ui.uicommonweb.models.EntityModel < java.lang.String > pathModel = model.getStorage ( ) . getPath ( ) ; pathModel.setEntity ( prefix ) ; pathModel.setIsChangeable ( false ) ; } configureLocalStorage3 ( model ) ; }
Source:
public void OnTimer ( ) { try { org.ovirt.engine.core.bll.AuditLogCleanupManager.log.info ( "AuditLogCleanupManager::deleteAgedOutAuditLogs - entered" ) ; org.ovirt.engine.core.compat.DateTime latestTimeToKeep = org.ovirt.engine.core.compat.DateTime.getNow ( ) . AddDays ( ( ( org.ovirt.engine.core.common.config.Config.< java.lang.Integer > GetValue ( ConfigValues.AuditLogAgingThreashold ) ) * ( - 1 ) ) ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getAuditLogDao ( ) . removeAllBeforeDate ( latestTimeToKeep ) ; } catch ( java.lang.RuntimeException e ) { org.ovirt.engine.core.bll.AuditLogCleanupManager.log.error ( "AuditLogCleanupManager::deleteAgedOutAuditLogs() - failed with exception" , e ) ; } }

Target:
public void OnTimer ( ) { try { org.ovirt.engine.core.bll.AuditLogCleanupManager.log.info ( "Start deleteAgedOutAuditLogs" ) ; org.ovirt.engine.core.compat.DateTime latestTimeToKeep = org.ovirt.engine.core.compat.DateTime.getNow ( ) . AddDays ( ( ( org.ovirt.engine.core.common.config.Config.< java.lang.Integer > GetValue ( ConfigValues.AuditLogAgingThreshold ) ) * ( - 1 ) ) ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getAuditLogDao ( ) . removeAllBeforeDate ( latestTimeToKeep ) ; org.ovirt.engine.core.bll.AuditLogCleanupManager.log.info ( "Finished deleteAgedOutAuditLogs" ) ; } catch ( java.lang.RuntimeException e ) { org.ovirt.engine.core.bll.AuditLogCleanupManager.log.error ( "deleteAgedOutAuditLog failed with exception" , e ) ; } }
Source:
public void testGetFileSize ( ) { java.io.File file = new java.io.File ( canReadFileName ) ; long hostsSize = file.length ( ) ; org.junit.Assert.assertTrue ( "We should be able to read this file." , org.ovirt.engine.core.utils.servlet.ServletUtils.canReadFile ( file ) ) ; org.junit.Assert.assertEquals ( "Values should match" , hostsSize , org.ovirt.engine.core.utils.servlet.ServletUtils.getFileSize ( file ) ) ; }

Target:
public void testGetFileSize ( ) { java.io.File file = new java.io.File ( canReadFileName ) ; long hostsSize = file.length ( ) ; org.junit.jupiter.api.Assertions.assertTrue ( org.ovirt.engine.core.utils.servlet.ServletUtils.canReadFile ( file ) , "We should be able to read this file." ) ; org.junit.jupiter.api.Assertions.assertEquals ( hostsSize , org.ovirt.engine.core.utils.servlet.ServletUtils.getFileSize ( file ) , "Values should match" ) ; }
Source:
public java.util.List < org.ovirt.engine.core.common.businessentities.RepoImage > getCachedIsoListByDomainId ( org.ovirt.engine.core.compat.Guid isoStorageDomainId , org.ovirt.engine.core.common.businessentities.ImageFileType imageType ) { java.util.List < org.ovirt.engine.core.common.businessentities.RepoImage > fileListMD = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.RepoImage > ( ) ; if ( isoStorageDomainId != null ) { fileListMD = repoStorageDom.getRepoListForStorageDomain ( isoStorageDomainId , imageType ) ; } return fileListMD ; }

Target:
public java.util.List < org.ovirt.engine.core.common.businessentities.storage.RepoImage > getCachedIsoListByDomainId ( org.ovirt.engine.core.compat.Guid isoStorageDomainId , org.ovirt.engine.core.common.businessentities.storage.ImageFileType imageType ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.RepoImage > fileListMD = new java.util.ArrayList < > ( ) ; if ( isoStorageDomainId != null ) { fileListMD = repoStorageDom.getRepoListForStorageDomain ( isoStorageDomainId , imageType ) ; } return fileListMD ; }
Source:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; newImage = new org.ovirt.engine.core.common.businessentities.storage.Image ( ) ; newImage.setActive ( true ) ; newImage.setVolumeClassification ( VolumeClassification.Volume ) ; newImage.setTemplateImageId ( org.ovirt.engine.core.dao.ImageDaoTest.EXISTING_IMAGE_DISK_TEMPLATE_ID ) ; newImage.setSnapshotId ( org.ovirt.engine.core.dao.ImageDaoTest.EXISTING_SNAPSHOT_ID ) ; newImage.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; newImage.setVolumeFormat ( VolumeFormat.COW ) ; newImage.setVolumeType ( VolumeType.Sparse ) ; newImage.setDiskId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; newImage = new org.ovirt.engine.core.common.businessentities.storage.Image ( ) ; newImage.setActive ( true ) ; newImage.setVolumeClassification ( VolumeClassification.Volume ) ; newImage.setTemplateImageId ( org.ovirt.engine.core.dao.ImageDaoTest.EXISTING_IMAGE_DISK_TEMPLATE_ID ) ; newImage.setSnapshotId ( org.ovirt.engine.core.dao.ImageDaoTest.EXISTING_SNAPSHOT_ID ) ; newImage.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; newImage.setVolumeFormat ( VolumeFormat.COW ) ; newImage.setQcowCompat ( QcowCompat.QCOW2_V3 ) ; newImage.setVolumeType ( VolumeType.Sparse ) ; newImage.setDiskId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; }
Source:
protected boolean checkPermissions ( final java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > permSubjects ) { java.util.List < java.lang.String > messages = new java.util.ArrayList < java.lang.String > ( ) ; for ( org.ovirt.engine.core.bll.utils.PermissionSubject permSubject : permSubjects ) { messages.clear ( ) ; if ( checkSinglePermission ( permSubject , messages ) ) { return true ; } } org.ovirt.engine.core.bll.network.cluster.UpdateNetworkOnClusterCommand.getReturnValue ( ) . getCanDoActionMessages ( ) . addAll ( messages ) ; return false ; }

Target:
private boolean validateAttachment ( ) { final org.ovirt.engine.core.bll.network.cluster.UpdateNetworkClusterValidator networkClusterValidator = createNetworkClusterValidator ( ) ; return ( validate ( networkClusterValidator.managementNetworkUnset ( ) ) ) && ( validateAttachment ( networkClusterValidator ) ) ; }
Source:
public static void getVmDiskList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId , boolean isRefresh ) { 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.DiskImage > ( ) ; } } ; org.ovirt.engine.core.common.queries.IdQueryParameters params = new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) ; params.setRefresh ( isRefresh ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllDisksByVmId , params , aQuery ) ; }

Target:
public static void getStorageDomainList ( 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 ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainsByStoragePoolId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) , aQuery ) ; }
Source:
static org.ovirt.engine.core.common.businessentities.VDSGroup setUpEntityExpectations ( org.ovirt.engine.core.common.businessentities.VDSGroup entity , int index ) { org.easymock.EasyMock.expect ( entity.getId ( ) ) . andReturn ( GUIDS [ index ] ) . anyTimes ( ) ; org.easymock.EasyMock.expect ( entity.getName ( ) ) . andReturn ( NAMES [ index ] ) . anyTimes ( ) ; org.easymock.EasyMock.expect ( entity.getdescription ( ) ) . andReturn ( DESCRIPTIONS [ index ] ) . anyTimes ( ) ; return entity ; }

Target:
static org.ovirt.engine.core.common.businessentities.VDSGroup setUpEntityExpectations ( org.ovirt.engine.core.common.businessentities.VDSGroup entity , int index ) { org.easymock.EasyMock.expect ( entity.getId ( ) ) . andReturn ( GUIDS [ index ] ) . anyTimes ( ) ; org.easymock.EasyMock.expect ( entity.getName ( ) ) . andReturn ( NAMES [ index ] ) . anyTimes ( ) ; org.easymock.EasyMock.expect ( entity.getDescription ( ) ) . andReturn ( DESCRIPTIONS [ index ] ) . anyTimes ( ) ; return entity ; }
Source:
public java.lang.String getButtonToolTip ( ) { if ( ( ! ( getModel ( ) . getIsCloneVmSupported ( ) ) ) && ( ( getModel ( ) . getEntity ( ) ) != null ) ) { org.ovirt.engine.core.common.queries.CommandVersionsInfo commandVersionsInfo = org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getCommandVersionsInfo ( VdcActionType.AddVmFromSnapshot ) ; java.lang.String minimalClusterVersion = ( commandVersionsInfo != null ) ? commandVersionsInfo.getClusterVersion ( ) . toString ( 2 ) : "" ; return messages.cloneVmNotSupported ( minimalClusterVersion ) ; } else { return this . getTitle ( ) ; } }

Target:
public java.lang.String getButtonToolTip ( ) { if ( ( ! ( getModel ( ) . getIsCloneVmSupported ( ) ) ) && ( ( getModel ( ) . getEntity ( ) ) != null ) ) { org.ovirt.engine.core.common.queries.CommandVersionsInfo commandVersionsInfo = org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getCommandVersionsInfo ( VdcActionType.AddVmFromSnapshot ) ; java.lang.String minimalClusterVersion = ( commandVersionsInfo != null ) ? commandVersionsInfo.getClusterVersion ( ) . toString ( 2 ) : "" ; return org.ovirt.engine.ui.common.widget.uicommon.vm.VmSnapshotListModelTable.messages.cloneVmNotSupported ( minimalClusterVersion ) ; } else { return this . getTitle ( ) ; } }
Source:
protected void EndWithFailure ( ) { org.ovirt.engine.core.bll.ExportVmCommand.EndActionOnAllImageGroups ( ) ; if ( ( org.ovirt.engine.core.bll.ExportVmCommand.getVm ( ) ) != null ) { org.ovirt.engine.core.bll.VmHandler.UnLockVm ( org.ovirt.engine.core.bll.ExportVmCommand.getVm ( ) . getId ( ) ) ; org.ovirt.engine.core.bll.VmHandler.updateDisksFromDb ( org.ovirt.engine.core.bll.ExportVmCommand.getVm ( ) ) ; } else { org.ovirt.engine.core.bll.ExportVmCommand.setCommandShouldBeLogged ( false ) ; log.warn ( "ExportVmCommand::EndMoveVmCommand: Vm is null - not performing full EndAction" ) ; } org.ovirt.engine.core.bll.ExportVmCommand.setSucceeded ( true ) ; }

Target:
protected java.util.Map < java.lang.String , java.lang.String > getExclusiveLocks ( ) { return java.util.Collections.singletonMap ( org.ovirt.engine.core.bll.ExportVmCommand.getVmId ( ) . toString ( ) , LockingGroup.VM.name ( ) ) ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult isStorageDomainNotInAnyPool ( ) { if ( ( storageDomainStatic ) != null ) { if ( ! ( getStoragePoolIsoMapDao ( ) . getAllForStorage ( storageDomainStatic.getId ( ) ) . isEmpty ( ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_DOMAIN_STATUS_ILLEGAL ) ; } } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult isStorageDomainNotInAnyPool ( ) { if ( ( storageDomainStatic ) != null ) { if ( ! ( getStoragePoolIsoMapDao ( ) . getAllForStorage ( storageDomainStatic.getId ( ) ) . isEmpty ( ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_STORAGE_DOMAIN_STATUS_ILLEGAL ) ; } } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult hotUpdatePossible ( ) { if ( ( getRequiredAction ( ) ) == ( org.ovirt.engine.core.bll.network.vm.UpdateVmInterfaceCommand.RequiredAction.UPDATE_VM_DEVICE ) ) { if ( ! ( org.ovirt.engine.core.common.FeatureSupported.networkLinking ( version ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.dal.VdcBllMessages.HOT_VM_INTERFACE_UPDATE_IS_NOT_SUPPORTED , org.ovirt.engine.core.bll.network.vm.UpdateVmInterfaceCommand.UpdateVmNicValidator.clusterVersion ( ) ) ; } else if ( nic.isPortMirroring ( ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.dal.VdcBllMessages.CANNOT_PERFOM_HOT_UPDATE_WITH_PORT_MIRRORING ) ; } } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult hotUpdatePossible ( ) { if ( ( getRequiredAction ( ) ) == ( org.ovirt.engine.core.bll.network.vm.UpdateVmInterfaceCommand.RequiredAction.UPDATE_VM_DEVICE ) ) { if ( ! ( org.ovirt.engine.core.common.FeatureSupported.networkLinking ( version ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.HOT_VM_INTERFACE_UPDATE_IS_NOT_SUPPORTED , org.ovirt.engine.core.bll.network.vm.UpdateVmInterfaceCommand.UpdateVmNicValidator.clusterVersion ( ) ) ; } else if ( nic.isPortMirroring ( ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.CANNOT_PERFOM_HOT_UPDATE_WITH_PORT_MIRRORING ) ; } } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }
Source:
public org.ovirt.engine.api.model.CdRoms list ( ) { org.ovirt.engine.api.model.CdRoms cdRoms = new org.ovirt.engine.api.model.CdRoms ( ) ; if ( parent.getSnapshot ( ) . isVmConfigurationAvailable ( ) ) { org.ovirt.engine.core.common.businessentities.VM vm = parent.collection.getVmPreview ( parent.get ( ) ) ; cdRoms.getCdRoms ( ) . add ( org.ovirt.engine.api.restapi.types.CdRomMapper.map ( vm , null ) ) ; } return cdRoms ; }

Target:
public org.ovirt.engine.api.model.Cdroms list ( ) { org.ovirt.engine.api.model.Cdroms cdRoms = new org.ovirt.engine.api.model.Cdroms ( ) ; if ( parent.getSnapshot ( ) . isVmConfigurationAvailable ( ) ) { org.ovirt.engine.core.common.businessentities.VM vm = parent.collection.getVmPreview ( parent.get ( ) ) ; cdRoms.getCdroms ( ) . add ( org.ovirt.engine.api.restapi.types.CdRomMapper.map ( vm , null ) ) ; } return cdRoms ; }
Source:
private org.ovirt.engine.core.common.businessentities.StorageServerConnections createNFSConnection ( java.lang.String connection , org.ovirt.engine.core.common.businessentities.StorageType type , org.ovirt.engine.core.common.businessentities.NfsVersion version , int timeout , int retrans ) { org.ovirt.engine.core.compat.Guid id = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; org.ovirt.engine.core.common.businessentities.StorageServerConnections connectionDetails = populateBasicConnectionDetails ( id , connection , type ) ; connectionDetails.setNfsVersion ( version ) ; connectionDetails.setNfsTimeo ( ( ( short ) ( timeout ) ) ) ; connectionDetails.setNfsRetrans ( ( ( short ) ( retrans ) ) ) ; return connectionDetails ; }

Target:
private org.ovirt.engine.core.common.businessentities.StorageServerConnections createNFSConnection ( java.lang.String connection , org.ovirt.engine.core.common.businessentities.storage.StorageType type , org.ovirt.engine.core.common.businessentities.NfsVersion version , int timeout , int retrans ) { org.ovirt.engine.core.compat.Guid id = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; org.ovirt.engine.core.common.businessentities.StorageServerConnections connectionDetails = populateBasicConnectionDetails ( id , connection , type ) ; connectionDetails.setNfsVersion ( version ) ; connectionDetails.setNfsTimeo ( ( ( short ) ( timeout ) ) ) ; connectionDetails.setNfsRetrans ( ( ( short ) ( retrans ) ) ) ; return connectionDetails ; }
Source:
void AddVmDynamic ( ) { org.ovirt.engine.core.common.businessentities.VmDynamic tempVar = new org.ovirt.engine.core.common.businessentities.VmDynamic ( ) ; tempVar.setId ( org.ovirt.engine.core.bll.AddVmCommand.getVmId ( ) ) ; tempVar.setstatus ( VMStatus.Down ) ; tempVar.setvm_host ( "" ) ; tempVar.setvm_ip ( "" ) ; tempVar.setdisplay_type ( org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . getVmStaticData ( ) . getdefault_display_type ( ) ) ; org.ovirt.engine.core.common.businessentities.VmDynamic vmDynamic = tempVar ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmDynamicDAO ( ) . save ( vmDynamic ) ; org.ovirt.engine.core.bll.AddVmCommand.getCompensationContext ( ) . snapshotNewEntity ( vmDynamic ) ; }

Target:
void addVmDynamic ( ) { org.ovirt.engine.core.common.businessentities.VmDynamic tempVar = new org.ovirt.engine.core.common.businessentities.VmDynamic ( ) ; tempVar.setId ( org.ovirt.engine.core.bll.AddVmCommand.getVmId ( ) ) ; tempVar.setstatus ( VMStatus.Down ) ; tempVar.setvm_host ( "" ) ; tempVar.setvm_ip ( "" ) ; tempVar.setdisplay_type ( org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . getVmStaticData ( ) . getdefault_display_type ( ) ) ; org.ovirt.engine.core.common.businessentities.VmDynamic vmDynamic = tempVar ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmDynamicDao ( ) . save ( vmDynamic ) ; org.ovirt.engine.core.bll.AddVmCommand.getCompensationContext ( ) . snapshotNewEntity ( vmDynamic ) ; }
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 getStorageDomainsByConnection ( org.ovirt.engine.ui.frontend.AsyncQuery < java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > > aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , java.lang.String connectionPath ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.CastingConverter < > ( ) ; 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.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainsByConnection , param , aQuery ) ; }