auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private void endDefaultOperations ( ) { endUnlockOps ( ) ; if ( ( org.ovirt.engine.core.bll.AddVmTemplateCommand.getParameters ( ) . getBaseTemplateId ( ) ) != null ) { java.lang.String jobId = org.ovirt.engine.core.utils.timer.SchedulerUtilQuartzImpl.getInstance ( ) . scheduleAOneTimeJob ( this , "onTimerHandleVdsRecovering" , new java.lang.Class [ 0 ] , new java.lang.Object [ 0 ] , 0 , java.util.concurrent.TimeUnit.SECONDS ) ; org.ovirt.engine.core.bll.AddVmTemplateCommand.updateVmsJobIdMap.put ( org.ovirt.engine.core.bll.AddVmTemplateCommand.getParameters ( ) . getBaseTemplateId ( ) , jobId ) ; } }

Target:
private void endDefaultOperations ( ) { endUnlockOps ( ) ; if ( isTemplateVersion ( ) ) { java.lang.String jobId = org.ovirt.engine.core.utils.timer.SchedulerUtilQuartzImpl.getInstance ( ) . scheduleAOneTimeJob ( this , "onTimerHandleVdsRecovering" , new java.lang.Class [ 0 ] , new java.lang.Object [ 0 ] , 0 , java.util.concurrent.TimeUnit.SECONDS ) ; org.ovirt.engine.core.bll.AddVmTemplateCommand.updateVmsJobIdMap.put ( org.ovirt.engine.core.bll.AddVmTemplateCommand.getParameters ( ) . getBaseTemplateId ( ) , jobId ) ; } }
Source:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; dao = dbFacade.getVmTemplateDao ( ) ; existingTemplate = dao.get ( new org.ovirt.engine.core.compat.Guid ( "1b85420c-b84c-4f29-997e-0eb674b40b79" ) ) ; newVmTemplate = new org.ovirt.engine.core.common.businessentities.VmTemplate ( ) ; newVmTemplate.setId ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; newVmTemplate.setname ( "NewVmTemplate" ) ; newVmTemplate.setVdsGroupId ( org.ovirt.engine.core.dao.VmTemplateDAOTest.VDS_GROUP_ID ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; dao = dbFacade.getVmTemplateDao ( ) ; existingTemplate = dao.get ( new org.ovirt.engine.core.compat.Guid ( "1b85420c-b84c-4f29-997e-0eb674b40b79" ) ) ; newVmTemplate = new org.ovirt.engine.core.common.businessentities.VmTemplate ( ) ; newVmTemplate.setId ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; newVmTemplate.setName ( "NewVmTemplate" ) ; newVmTemplate.setVdsGroupId ( org.ovirt.engine.core.dao.VmTemplateDAOTest.VDS_GROUP_ID ) ; }
Source:
public void getTemplateById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid templateId ) { 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.GetVmTemplate , new org.ovirt.engine.core.common.queries.GetVmTemplateParameters ( templateId ) , aQuery ) ; }

Target:
public 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.StorageDomain ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( storageDomainId ) , aQuery ) ; }
Source:
public void testAddExistingSuccessfully ( ) { org.ovirt.engine.core.common.businessentities.StorageDomainStatic sdStatic = command.getStorageDomain ( ) . getStorageStaticData ( ) ; org.mockito.Mockito.doReturn ( new org.ovirt.engine.core.common.utils.Pair ( sdStatic , sdStatic.getId ( ) ) ) . when ( command ) . executeHSMGetStorageDomainInfo ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.vdscommands.HSMGetStorageDomainInfoVDSCommandParameters.class ) ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateSuccess ( command ) ; command.executeCommand ( ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getSucceeded ( ) ) ; }

Target:
public void testAddExistingSuccessfully ( ) { org.ovirt.engine.core.common.businessentities.StorageDomainStatic sdStatic = command.getStorageDomain ( ) . getStorageStaticData ( ) ; org.mockito.Mockito.doReturn ( new org.ovirt.engine.core.common.utils.Pair ( sdStatic , sdStatic.getId ( ) ) ) . when ( command ) . executeHSMGetStorageDomainInfo ( org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.common.vdscommands.HSMGetStorageDomainInfoVDSCommandParameters.class ) ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateSuccess ( command ) ; command.executeCommand ( ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getSucceeded ( ) ) ; }
Source:
protected void addStoragePermissionByQuotaMode ( java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > permsList , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.compat.Guid StorageDomainId ) { org.ovirt.engine.core.common.businessentities.StoragePool storagePool = null ; if ( storagePoolId != null ) { storagePool = org.ovirt.engine.core.bll.CommandBase.getStoragePoolDAO ( ) . get ( storagePoolId ) ; if ( storagePool != null ) { if ( ( ( storagePool.getQuotaEnforcementType ( ) ) == ( org.ovirt.engine.core.common.businessentities.QuotaEnforcementTypeEnum.DISABLED ) ) || ( ( storagePool.getQuotaEnforcementType ( ) ) == ( org.ovirt.engine.core.common.businessentities.QuotaEnforcementTypeEnum.SOFT_ENFORCEMENT ) ) ) { permsList.add ( new org.ovirt.engine.core.bll.utils.PermissionSubject ( StorageDomainId , org.ovirt.engine.core.common.VdcObjectType.Storage , org.ovirt.engine.core.common.businessentities.ActionGroup.CREATE_DISK ) ) ; } } } }

Target:
protected org.ovirt.engine.core.compat.Guid createTaskInCurrentTransaction ( org.ovirt.engine.core.compat.Guid taskId , org.ovirt.engine.core.common.asynctasks.AsyncTaskCreationInfo asyncTaskCreationInfo , org.ovirt.engine.core.common.action.VdcActionType parentCommand , org.ovirt.engine.core.common.VdcObjectType entityType , org.ovirt.engine.core.compat.Guid ... entityIds ) { return createTaskImpl ( taskId , asyncTaskCreationInfo , parentCommand , null , entityType , entityIds ) ; }
Source:
protected void selectedItemPropertyChanged ( java.lang.Object sender , org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs e ) { super . selectedItemPropertyChanged ( sender , e ) ; if ( e.propertyName.equals ( "status" ) ) { updateActionAvailability ( ) ; } }

Target:
private void createVMFromTemplate ( ) { org.ovirt.engine.core.common.businessentities.VmTemplate template = getSelectedItem ( ) ; java.util.List < org.ovirt.engine.ui.uicommonweb.UICommand > commands = new java.util.ArrayList < > ( ) ; commands.add ( org.ovirt.engine.ui.uicommonweb.UICommand.createDefaultOkUiCommand ( "OnSaveVm" , this ) ) ; commands.add ( org.ovirt.engine.ui.uicommonweb.UICommand.createCancelUiCommand ( "Cancel" , this ) ) ; setupNewVmModel ( new org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel ( new org.ovirt.engine.ui.uicommonweb.models.vms.NewVmFromTemplateModelBehavior ( template ) , this ) , template.getVmType ( ) , getSystemTreeSelectedItem ( ) , commands ) ; }
Source:
public void executeCommand ( ) { cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.gluster.DisableGlusterHookCommand ( new org.ovirt.engine.core.common.action.gluster.GlusterHookStatusChangeParameters ( CLUSTER_ID , HOOK_ID ) ) ) ; setupMocks ( cmd ) ; mockBackendStatusChange ( cmd , true ) ; cmd.executeCommand ( ) ; org.junit.Assert.assertTrue ( cmd.getReturnValue ( ) . getSucceeded ( ) ) ; org.junit.Assert.assertEquals ( cmd.getAuditLogTypeValue ( ) , AuditLogType.GLUSTER_HOOK_DISABLE ) ; }

Target:
public void executeCommandWhenFailed ( ) { cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.gluster.DisableGlusterHookCommand < org.ovirt.engine.core.common.action.gluster.GlusterHookParameters > ( new org.ovirt.engine.core.common.action.gluster.GlusterHookParameters ( HOOK_ID ) ) ) ; setupMocks ( cmd ) ; mockBackendStatusChange ( cmd , false ) ; cmd.executeCommand ( ) ; org.junit.Assert.assertFalse ( cmd.getReturnValue ( ) . getSucceeded ( ) ) ; org.junit.Assert.assertEquals ( cmd.getAuditLogTypeValue ( ) , AuditLogType.GLUSTER_HOOK_DISABLE_FAILED ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object result ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > hosts = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ) ( result ) ) ; org.ovirt.engine.ui.uicommonweb.models.ListModel hostNameListModel = getExternalHostName ( ) ; hosts.add ( 0 , null ) ; hostNameListModel.setItems ( hosts ) ; hostNameListModel.setIsChangable ( true ) ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object result ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > hosts = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ) ( result ) ) ; org.ovirt.engine.ui.uicommonweb.models.ListModel hostNameListModel = getExternalHostName ( ) ; hosts.add ( 0 , null ) ; hostNameListModel.setItems ( hosts ) ; hostNameListModel.setIsChangable ( true ) ; setEnableSearchHost ( true ) ; }
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 java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskInterface > GetDiskInterfaceList ( org.ovirt.engine.core.common.businessentities.VmOsType osType , org.ovirt.engine.core.compat.Version Version ) { return ( osType == ( org.ovirt.engine.core.common.businessentities.VmOsType.WindowsXP ) ) && ( ( Version == null ) || ( ( Version.compareTo ( new org.ovirt.engine.core.compat.Version ( "2.2" ) ) ) < 0 ) ) ? new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskInterface > ( java.util.Arrays.asList ( new org.ovirt.engine.core.common.businessentities.DiskInterface [ ] { org.ovirt.engine.core.common.businessentities.DiskInterface.IDE } ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskInterface > ( java.util.Arrays.asList ( new org.ovirt.engine.core.common.businessentities.DiskInterface [ ] { org.ovirt.engine.core.common.businessentities.DiskInterface.IDE , org.ovirt.engine.core.common.businessentities.DiskInterface.VirtIO } ) ) ; }
Source:
protected void datacenter_SelectedItemChanged ( ) { org.ovirt.engine.core.common.businessentities.StoragePool datacenter = getDataCenter ( ) . getSelectedItem ( ) ; boolean isInVm = ( getVm ( ) ) != null ; if ( datacenter == null ) { return ; } updateShareableDiskEnabled ( datacenter ) ; updateDirectLunDiskEnabled ( datacenter ) ; updateInterface ( ( isInVm ? getVm ( ) . getVdsGroupCompatibilityVersion ( ) : null ) ) ; if ( ( getDiskStorageType ( ) . getEntity ( ) ) == ( org.ovirt.engine.core.common.businessentities.storage.DiskStorageType.IMAGE ) ) { updateStorageDomains ( datacenter ) ; } else { updateHosts ( datacenter ) ; } }

Target:
protected void datacenter_SelectedItemChanged ( ) { org.ovirt.engine.core.common.businessentities.StoragePool datacenter = getDataCenter ( ) . getSelectedItem ( ) ; boolean isInVm = ( getVm ( ) ) != null ; if ( datacenter == null ) { return ; } updateShareableDiskEnabled ( datacenter ) ; updateDirectLunDiskEnabled ( datacenter ) ; updateInterface ( ( isInVm ? getVm ( ) . getVdsGroupCompatibilityVersion ( ) : null ) ) ; switch ( getDiskStorageType ( ) . getEntity ( ) ) { case IMAGE : case CINDER : updateStorageDomains ( datacenter ) ; break ; default : updateHosts ( datacenter ) ; break ; } }
Source:
public void getVmConfigurationBySnapshot ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid snapshotSourceId ) { 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.VM ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmConfigurationBySnapshot , new org.ovirt.engine.core.common.queries.IdQueryParameters ( snapshotSourceId ) . withoutRefresh ( ) , aQuery ) ; }

Target:
public void getVmSnapshotList ( 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 ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllVmSnapshotsByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.RepoImage > repoList = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.RepoImage > ) ( source ) ) ; java.util.ArrayList < java.lang.String > fileNameList = new java.util.ArrayList < java.lang.String > ( ) ; for ( org.ovirt.engine.core.common.businessentities.storage.RepoImage repoImage : repoList ) { fileNameList.add ( repoImage.getRepoImageId ( ) ) ; } java.util.Collections.sort ( fileNameList , java.lang.String.CASE_INSENSITIVE_ORDER ) ; return fileNameList ; } return new java.util.ArrayList < java.lang.String > ( ) ; }

Target:
public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery ) { return source ; }
Source:
public void diskImagesAlreadyExistOneExist ( ) { org.mockito.Mockito.doReturn ( true ) . when ( validator ) . isDiskExists ( disk1.getId ( ) ) ; org.mockito.Mockito.doReturn ( false ) . when ( validator ) . isDiskExists ( disk2.getId ( ) ) ; org.junit.Assert.assertThat ( validator.diskImagesAlreadyExist ( ) , org.junit.matchers.JUnitMatchers.both ( org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( VdcBllMessages.ACTION_TYPE_FAILED_IMPORT_DISKS_ALREADY_EXIST ) ) . and ( org.ovirt.engine.core.bll.validator.ValidationResultMatchers.replacements ( org.junit.matchers.JUnitMatchers.hasItem ( org.ovirt.engine.core.bll.validator.DiskImagesValidatorTest.createAliasReplacements ( disk1 ) ) ) ) ) ; }

Target:
public void diskImagesAlreadyExistOneExist ( ) { org.mockito.Mockito.doReturn ( new org.ovirt.engine.core.common.businessentities.DiskImage ( ) ) . when ( validator ) . getExistingDisk ( disk1.getId ( ) ) ; org.mockito.Mockito.doReturn ( null ) . when ( validator ) . getExistingDisk ( disk2.getId ( ) ) ; org.junit.Assert.assertThat ( validator.diskImagesAlreadyExist ( ) , org.junit.matchers.JUnitMatchers.both ( org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( VdcBllMessages.ACTION_TYPE_FAILED_IMPORT_DISKS_ALREADY_EXIST ) ) . and ( org.ovirt.engine.core.bll.validator.ValidationResultMatchers.replacements ( org.junit.matchers.JUnitMatchers.hasItem ( org.ovirt.engine.core.bll.validator.DiskImagesValidatorTest.createAliasReplacements ( disk1 ) ) ) ) ) ; }
Source:
private void storageDomain_SelectedItemChanged ( ) { org.ovirt.engine.core.common.businessentities.StorageDomain selectedStorage = getStorageDomain ( ) . getSelectedItem ( ) ; if ( selectedStorage != null ) { updateVolumeType ( selectedStorage.getStorageType ( ) ) ; } updateQuota ( getDataCenter ( ) . getSelectedItem ( ) ) ; updateDiskProfiles ( getDataCenter ( ) . getSelectedItem ( ) ) ; }

Target:
private void storageDomain_SelectedItemChanged ( ) { org.ovirt.engine.core.common.businessentities.StorageDomain selectedStorage = getStorageDomain ( ) . getSelectedItem ( ) ; if ( selectedStorage != null ) { updateVolumeType ( selectedStorage.getStorageType ( ) ) ; if ( getIsNew ( ) ) { getIsWipeAfterDelete ( ) . setEntity ( selectedStorage.getWipeAfterDelete ( ) ) ; } } updateQuota ( getDataCenter ( ) . getSelectedItem ( ) ) ; updateDiskProfiles ( getDataCenter ( ) . getSelectedItem ( ) ) ; }
Source:
public void initDisks ( ) { java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel > disks = new java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel > ( ) ; for ( org.ovirt.engine.core.common.businessentities.DiskImage diskImage : vm.getDiskList ( ) ) { disks.add ( org.ovirt.engine.ui.uicommonweb.Linq.diskToModel ( diskImage ) ) ; } getModel ( ) . setDisks ( disks ) ; getModel ( ) . getDisksAllocationModel ( ) . setIsVolumeFormatAvailable ( true ) ; getModel ( ) . getDisksAllocationModel ( ) . setIsVolumeFormatChangable ( true ) ; updateIsDisksAvailable ( ) ; }

Target:
public void initDisks ( ) { java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel > disks = new java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel > ( ) ; for ( org.ovirt.engine.core.common.businessentities.storage.DiskImage diskImage : vm.getDiskList ( ) ) { disks.add ( org.ovirt.engine.ui.uicommonweb.Linq.diskToModel ( diskImage ) ) ; } getModel ( ) . setDisks ( disks ) ; getModel ( ) . getDisksAllocationModel ( ) . setIsVolumeFormatAvailable ( true ) ; getModel ( ) . getDisksAllocationModel ( ) . setIsVolumeFormatChangable ( true ) ; updateIsDisksAvailable ( ) ; }
Source:
protected void syncSearch ( ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getAllVmTemplates ( new org.ovirt.engine.ui.frontend.AsyncQuery ( this , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { ( ( org.ovirt.engine.ui.uicommonweb.models.userportal.UserPortalTemplateListModel ) ( model ) ) . setItems ( ( ( java.lang.Iterable ) ( returnValue ) ) ) ; } } ) ) ; }

Target:
protected void syncSearch ( ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getAllVmTemplates ( new org.ovirt.engine.ui.frontend.AsyncQuery ( this , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { ( ( org.ovirt.engine.ui.uicommonweb.models.userportal.UserPortalTemplateListModel ) ( model ) ) . setItems ( ( ( java.lang.Iterable ) ( returnValue ) ) ) ; } } ) , getIsQueryFirstTime ( ) ) ; }
Source:
private void initOldParentTagName ( ) { if ( ( ( org.ovirt.engine.core.bll.MoveTagCommand.getTag ( ) ) != null ) && ( ( org.ovirt.engine.core.bll.MoveTagCommand.getTag ( ) . getParentId ( ) ) != null ) ) { org.ovirt.engine.core.common.businessentities.Tags parent = org.ovirt.engine.core.bll.TagsDirector.getInstance ( ) . getTagById ( new org.ovirt.engine.core.compat.Guid ( org.ovirt.engine.core.bll.MoveTagCommand.getTag ( ) . getParentId ( ) . toString ( ) ) ) ; if ( parent != null ) { _oldParnetTagName = parent.getTagName ( ) ; } } }

Target:
private void initOldParentTagName ( ) { if ( ( ( org.ovirt.engine.core.bll.MoveTagCommand.getTag ( ) ) != null ) && ( ( org.ovirt.engine.core.bll.MoveTagCommand.getTag ( ) . getParentId ( ) ) != null ) ) { org.ovirt.engine.core.common.businessentities.Tags parent = tagsDirector.getTagById ( new org.ovirt.engine.core.compat.Guid ( org.ovirt.engine.core.bll.MoveTagCommand.getTag ( ) . getParentId ( ) . toString ( ) ) ) ; if ( parent != null ) { _oldParnetTagName = parent.getTagName ( ) ; } } }
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 getDefaultSpmPriority ( 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 ( ) , 5 ) ; }
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.getCompatibilityVersion ( ) . compareTo ( cluster.getCompatibilityVersion ( ) ) ) > 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 ( EngineMessage.VDS_GROUP_CANNOT_ADD_COMPATIBILITY_VERSION_WITH_LOWER_STORAGE_POOL ) . when ( ( ( dataCenter != null ) && ( ( dataCenter.getCompatibilityVersion ( ) . compareTo ( cluster.getCompatibilityVersion ( ) ) ) > 0 ) ) ) ; }
Source:
private void addInjectionsToPerClusterObjects ( ) { java.util.Map < org.ovirt.engine.core.common.businessentities.VDSGroup , org.ovirt.engine.core.bll.scheduling.arem.AffinityRulesEnforcementPerCluster > iterator = new java.util.HashMap ( arem.perClusterMap ) ; for ( org.ovirt.engine.core.common.businessentities.VDSGroup vdsGroup : iterator.keySet ( ) ) { org.ovirt.engine.core.bll.scheduling.arem.AffinityRulesEnforcementPerCluster perCluster = perClusterProvider.get ( ) ; perCluster.setClusterId ( vdsGroup.getId ( ) ) ; arem.perClusterMap.put ( vdsGroup , perCluster ) ; } }

Target:
private void addInjectionsToPerClusterObjects ( ) { for ( java.util.Map.Entry < org.ovirt.engine.core.common.businessentities.VDSGroup , org.ovirt.engine.core.bll.scheduling.arem.AffinityRulesEnforcementPerCluster > entry : arem.perClusterMap.entrySet ( ) ) { org.ovirt.engine.core.bll.scheduling.arem.AffinityRulesEnforcementPerCluster perCluster = perClusterProvider.get ( ) ; perCluster.setClusterId ( entry.getKey ( ) . getId ( ) ) ; entry.setValue ( perCluster ) ; } }
Source:
private boolean validateDestStorage ( org.ovirt.engine.core.compat.Guid imageId , org.ovirt.engine.core.compat.Guid destDomainId ) { org.ovirt.engine.core.bll.validator.StorageDomainValidator validator = getValidator ( destDomainId , org.ovirt.engine.core.bll.lsm.LiveMigrateVmDisksCommand.getStoragePoolId ( ) ) ; return ( validate ( validator.isDomainExistAndActive ( ) ) ) && ( validate ( validator.domainIsValidDestination ( ) ) ) ; }

Target:
private boolean performStorageDomainsChecks ( org.ovirt.engine.core.common.action.LiveMigrateDiskParameters parameters ) { org.ovirt.engine.core.common.businessentities.StorageDomain sourceDomain = getImageSourceDomain ( parameters.getImageId ( ) ) ; org.ovirt.engine.core.common.businessentities.StorageDomain destDomain = getStorageDomainById ( parameters.getStorageDomainId ( ) , org.ovirt.engine.core.bll.lsm.LiveMigrateVmDisksCommand.getStoragePoolId ( ) ) ; return ( ( validateSourceStorageDomain ( sourceDomain ) ) && ( validateDestStorage ( destDomain ) ) ) && ( validateDestStorageAndSourceStorageOfSameTypes ( destDomain , sourceDomain ) ) ; }
Source:
public void getVmEmptyId ( ) { final org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase b = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; final org.ovirt.engine.core.common.businessentities.VM v = null ; b.setVm ( v ) ; b.setVmId ( Guid.Empty ) ; final org.ovirt.engine.core.common.businessentities.VM vm = b.getVm ( ) ; org.junit.Assert.assertNull ( vm ) ; }

Target:
public void getVmSwallowsExceptions ( ) { final org.ovirt.engine.core.common.businessentities.VM v = null ; b.setVm ( v ) ; b.setVmId ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID3 ) ; final org.ovirt.engine.core.common.businessentities.VM vm = b.getVm ( ) ; org.junit.Assert.assertNull ( vm ) ; }
Source:
public java.lang.String toString ( ) { return ( ( ( ( ( ( ( ( ( "Event [eventType=" + ( eventType ) ) + ", storagePoolId=" ) + ( storagePoolId ) ) + ", domainId=" ) + ( domainId ) ) + ", vdsId=" ) + ( vdsId ) ) + ", description=" ) + ( description ) ) + "]" ; }

Target:
public java.lang.String toString ( ) { return org.ovirt.engine.core.common.utils.ToStringBuilder.forInstance ( this ) . append ( "eventType" , eventType ) . append ( "storagePoolId" , storagePoolId ) . append ( "domainId" , domainId ) . append ( "vdsId" , vdsId ) . append ( "description" , description ) . build ( ) ; }
Source:
public void getoVirtISOsList ( 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 ) { return source != null ? new java.util.ArrayList < org.ovirt.engine.core.compat.RpmVersion > ( ( ( java.util.ArrayList < org.ovirt.engine.core.compat.RpmVersion > ) ( source ) ) ) : new java.util.ArrayList < org.ovirt.engine.core.compat.RpmVersion > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetoVirtISOs , new org.ovirt.engine.core.common.queries.VdsIdParametersBase ( id ) , aQuery ) ; }

Target:
public 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 static void getGlusterSwiftServices ( 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.GlusterServerService > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterServerServicesByServerId , new org.ovirt.engine.core.common.queries.gluster.GlusterServiceQueryParameters ( serverId , org.ovirt.engine.core.common.businessentities.gluster.ServiceType.GLUSTER_SWIFT ) , aQuery ) ; }

Target:
public static void getGlusterVolumeSnapshotsForVolume ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid volumeId ) { 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.GlusterVolumeSnapshotEntity > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterVolumeSnapshotsByVolumeId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( volumeId ) , aQuery ) ; }
Source:
public void update ( org.ovirt.engine.core.common.businessentities.StoragePoolIsoMap map ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "storage_id" , map.getstorage_id ( ) ) . addValue ( "storage_pool_id" , map.getstorage_pool_id ( ) ) . addValue ( "status" , map.getstatus ( ) ) ; getCallsHandler ( ) . executeModification ( "Updatestorage_pool_iso_map" , parameterSource ) ; }

Target:
public void update ( org.ovirt.engine.core.common.businessentities.StoragePoolIsoMap map ) { updateStatus ( map.getId ( ) , map.getstatus ( ) ) ; }
Source:
private static java.util.ArrayList < org.ovirt.engine.api.extensions.ExtMap > flatGroups ( org.ovirt.engine.api.extensions.ExtMap entity , org.ovirt.engine.api.extensions.ExtKey key , java.util.ArrayList < org.ovirt.engine.api.extensions.ExtMap > accumulator ) { for ( org.ovirt.engine.api.extensions.ExtMap group : entity.get ( key , java.util.Collections.< org.ovirt.engine.api.extensions.ExtMap > emptyList ( ) ) ) { accumulator.add ( group ) ; org.ovirt.engine.core.sso.utils.SSOUtils.flatGroups ( group , Authz.GroupRecord.GROUPS , accumulator ) ; } return accumulator ; }

Target:
public static java.util.List < java.lang.String > scopeAsList ( java.lang.String scope ) { return org.apache.commons.lang.StringUtils.isEmpty ( scope ) ? java.util.Collections.< java.lang.String > emptyList ( ) : java.util.Arrays.asList ( scope.trim ( ) . split ( "\\s *" ) ) ; }
Source:
protected void updateMemoryBalloon ( org.ovirt.engine.core.compat.Version clusterVersion ) { boolean hasMemoryBalloon = ( clusterVersion.compareTo ( VmListModel.BALLOON_DEVICE_MIN_VERSION ) ) >= 0 ; getModel ( ) . getMemoryBalloonDeviceEnabled ( ) . setIsAvailable ( hasMemoryBalloon ) ; }

Target:
protected void updateMemoryBalloon ( org.ovirt.engine.core.compat.Version clusterVersion , int osType ) { boolean isBalloonEnabled = org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . isBalloonEnabled ( osType , clusterVersion ) ; if ( ! isBalloonEnabled ) { getModel ( ) . getMemoryBalloonDeviceEnabled ( ) . setEntity ( false ) ; } getModel ( ) . getMemoryBalloonDeviceEnabled ( ) . setIsAvailable ( isBalloonEnabled ) ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult canDoSnapshot ( ) { if ( ! ( org.ovirt.engine.core.bll.validator.LiveSnapshotValidator.isLiveSnapshotEnabled ( compatibilityVersion ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.ACTION_TYPE_FAILED_DATA_CENTER_VERSION_DOESNT_SUPPORT_LIVE_SNAPSHOT ) ; } if ( ( ( vds ) != null ) && ( ! ( vds.getLiveSnapshotSupport ( ) ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.ACTION_TYPE_FAILED_QEMU_UNSUPPORTED_OPERATION ) ; } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult canDoSnapshot ( ) { if ( ! ( org.ovirt.engine.core.bll.validator.LiveSnapshotValidator.isLiveSnapshotEnabled ( compatibilityVersion ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_DATA_CENTER_VERSION_DOESNT_SUPPORT_LIVE_SNAPSHOT ) ; } if ( ( ( vds ) != null ) && ( ! ( vds.getLiveSnapshotSupport ( ) ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_QEMU_UNSUPPORTED_OPERATION ) ; } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }
Source:
private void doTestGetDefaultConstraint ( java.lang.Class < ? > clz , java.lang.String expectedConstraint ) { javax.ws.rs.core.UriInfo uriInfo = org.mockito.Mockito.mock ( javax.ws.rs.core.UriInfo.class ) ; javax.ws.rs.core.MultivaluedMap < java.lang.String , java.lang.String > queries = org.mockito.Mockito.mock ( javax.ws.rs.core.MultivaluedMap.class ) ; org.mockito.Mockito.when ( queries.isEmpty ( ) ) . thenReturn ( true ) ; org.mockito.Mockito.when ( uriInfo.getQueryParameters ( ) ) . thenReturn ( queries ) ; org.junit.Assert.assertEquals ( expectedConstraint , org.ovirt.engine.api.restapi.util.QueryHelper.getConstraint ( null , uriInfo , "" , clz ) ) ; }

Target:
private void doTestGetDefaultConstraint ( java.lang.Class < ? > clz , java.lang.String expectedConstraint ) { javax.ws.rs.core.UriInfo uriInfo = org.mockito.Mockito.mock ( javax.ws.rs.core.UriInfo.class ) ; javax.ws.rs.core.MultivaluedMap < java.lang.String , java.lang.String > queries = org.mockito.Mockito.mock ( javax.ws.rs.core.MultivaluedMap.class ) ; org.mockito.Mockito.when ( queries.isEmpty ( ) ) . thenReturn ( true ) ; org.mockito.Mockito.when ( uriInfo.getQueryParameters ( ) ) . thenReturn ( queries ) ; org.junit.jupiter.api.Assertions.assertEquals ( expectedConstraint , org.ovirt.engine.api.restapi.util.QueryHelper.getConstraint ( null , uriInfo , "" , clz ) ) ; }
Source:
private void Alert ( org.ovirt.engine.core.common.AuditLogType logType , java.lang.String operation ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase alert = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; alert.setVdsId ( org.ovirt.engine.core.bll.VdsCommand.getVds ( ) . getId ( ) ) ; java.lang.String op = ( operation == null ) ? org.ovirt.engine.core.bll.VdsCommand.getActionType ( ) . name ( ) : operation ; alert.AddCustomValue ( "Operation" , op ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AlertDirector.Alert ( alert , logType ) ; }

Target:
private void Alert ( org.ovirt.engine.core.common.AuditLogType logType , java.lang.String operation ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase alert = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; alert.setVdsId ( org.ovirt.engine.core.bll.VdsCommand.getVds ( ) . getId ( ) ) ; java.lang.String op = ( operation == null ) ? org.ovirt.engine.core.bll.VdsCommand.getActionType ( ) . name ( ) : operation ; alert.addCustomValue ( "Operation" , op ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AlertDirector.Alert ( alert , logType ) ; }
Source:
void initialize ( ) { try { java.util.List < org.ovirt.engine.core.bll.network.macpool.MacPool > macPools = macPoolDao.getAll ( ) ; for ( org.ovirt.engine.core.bll.network.macpool.MacPool macPool : macPools ) { initializeMacPool ( macPool ) ; } org.ovirt.engine.core.bll.network.macpool.MacPoolPerDc.log.info ( "Successfully initialized" ) ; } catch ( java.lang.RuntimeException e ) { org.ovirt.engine.core.bll.network.macpool.MacPoolPerDc.log.error ( "Error initializing: {}" , e.getMessage ( ) ) ; throw e ; } }

Target:
void initialize ( ) { try { java.util.List < org.ovirt.engine.core.bll.network.macpool.MacPool > macPools = macPoolDao.getAll ( ) ; for ( org.ovirt.engine.core.bll.network.macpool.MacPool macPool : macPools ) { initializeMacPool ( macPool ) ; } org.ovirt.engine.core.bll.network.macpool.MacPoolPerCluster.log.info ( "Successfully initialized" ) ; } catch ( java.lang.RuntimeException e ) { org.ovirt.engine.core.bll.network.macpool.MacPoolPerCluster.log.error ( "Error initializing: {}" , e.getMessage ( ) ) ; throw e ; } }
Source:
protected void executeCommand ( ) { boolean succeeded = false ; try { succeeded = runVdsCommand ( VDSCommandType.SetMOMPolicyParameters , new org.ovirt.engine.core.common.vdscommands.MomPolicyVDSParameters ( getVds ( ) , getVdsGroup ( ) . isEnableBallooning ( ) , getVdsGroup ( ) . isEnableKsm ( ) , getVdsGroup ( ) . isKsmMergeAcrossNumaNodes ( ) ) ) . getSucceeded ( ) ; } catch ( org.ovirt.engine.core.common.errors.EngineException e ) { log.error ( "Could not update MoM policy on host '{}': {}" , getVdsName ( ) , e.getMessage ( ) ) ; log.debug ( "Exception" , e ) ; } getReturnValue ( ) . setSucceeded ( succeeded ) ; }

Target:
protected void executeCommand ( ) { boolean succeeded = false ; try { succeeded = runVdsCommand ( VDSCommandType.SetMOMPolicyParameters , new org.ovirt.engine.core.common.vdscommands.MomPolicyVDSParameters ( getVds ( ) , getCluster ( ) . isEnableBallooning ( ) , getCluster ( ) . isEnableKsm ( ) , getCluster ( ) . isKsmMergeAcrossNumaNodes ( ) ) ) . getSucceeded ( ) ; } catch ( org.ovirt.engine.core.common.errors.EngineException e ) { log.error ( "Could not update MoM policy on host '{}': {}" , getVdsName ( ) , e.getMessage ( ) ) ; log.debug ( "Exception" , e ) ; } getReturnValue ( ) . setSucceeded ( succeeded ) ; }
Source:
private void setUpGetVirtioScsiExpectations ( int ... idxs ) throws java.lang.Exception { for ( int i = 0 ; i < ( idxs.length ) ; i ++ ) { setUpGetEntityExpectations ( VdcQueryType.GetVirtioScsiControllers , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ idxs [ i ] ] } , new java.util.ArrayList < > ( ) ) ; } }

Target:
private void setUpGetBallooningExpectations ( ) throws java.lang.Exception { setUpGetEntityExpectations ( VdcQueryType.IsBalloonEnabled , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , true ) ; }
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.common.businessentities.StorageDomain getStorageDomain ( ) { if ( ( cachedStorageDomain ) == null ) { cachedStorageDomain = getStorageDomainDao ( ) . get ( params.getStorageDomainId ( ) ) ; } return cachedStorageDomain ; }
Source:
protected boolean canDoAction ( ) { if ( ( getNic ( ) ) == null ) { return failCanDoAction ( VdcBllMessages.HOST_NETWORK_INTERFACE_NOT_EXIST ) ; } if ( ( ! ( org.ovirt.engine.core.utils.NetworkUtils.isLabeled ( getNic ( ) ) ) ) || ( ! ( getNic ( ) . getLabels ( ) . contains ( getLabel ( ) ) ) ) ) { return failCanDoAction ( VdcBllMessages.INTERFACE_NOT_LABELED ) ; } return true ; }

Target:
protected boolean canDoAction ( ) { if ( ( getNic ( ) ) == null ) { return failCanDoAction ( EngineMessage.HOST_NETWORK_INTERFACE_NOT_EXIST ) ; } if ( ( ! ( org.ovirt.engine.core.utils.NetworkUtils.isLabeled ( getNic ( ) ) ) ) || ( ! ( getNic ( ) . getLabels ( ) . contains ( getLabel ( ) ) ) ) ) { return failCanDoAction ( EngineMessage.INTERFACE_NOT_LABELED ) ; } return true ; }
Source:
public void execute ( ) { org.ovirt.engine.core.common.action.VdcReturnValueBase vdcReturnValue = org.ovirt.engine.core.bll.Backend.getInstance ( ) . runInternalAction ( VdcActionType.CreateAllSnapshotsFromVm , getCreateSnapshotParameters ( ) , org.ovirt.engine.core.bll.job.ExecutionHandler.createDefaultContexForTasks ( enclosingCommand.getExecutionContext ( ) ) ) ; enclosingCommand.getReturnValue ( ) . getTaskIdList ( ) . addAll ( vdcReturnValue.getInternalTaskIdList ( ) ) ; enclosingCommand.getReturnValue ( ) . setSucceeded ( true ) ; }

Target:
public void execute ( ) { if ( enclosingCommand.getParameters ( ) . getTaskGroupSuccess ( ) ) { org.ovirt.engine.core.common.action.VdcReturnValueBase vdcReturnValue = org.ovirt.engine.core.bll.Backend.getInstance ( ) . runInternalAction ( VdcActionType.CreateAllSnapshotsFromVm , getCreateSnapshotParameters ( ) , org.ovirt.engine.core.bll.job.ExecutionHandler.createDefaultContexForTasks ( enclosingCommand.getExecutionContext ( ) ) ) ; enclosingCommand.getReturnValue ( ) . getTaskIdList ( ) . addAll ( vdcReturnValue.getInternalTaskIdList ( ) ) ; } enclosingCommand.getReturnValue ( ) . setSucceeded ( true ) ; }
Source:
private boolean isTunnelMigrationUsed ( ) { if ( ! ( org.ovirt.engine.core.common.FeatureSupported.tunnelMigration ( org.ovirt.engine.core.bll.MigrateVmCommand.getVm ( ) . getClusterCompatibilityVersion ( ) ) ) ) { return false ; } return ( org.ovirt.engine.core.bll.MigrateVmCommand.getVm ( ) . getTunnelMigration ( ) ) != null ? org.ovirt.engine.core.bll.MigrateVmCommand.getVm ( ) . getTunnelMigration ( ) : org.ovirt.engine.core.bll.MigrateVmCommand.getCluster ( ) . isTunnelMigration ( ) ; }

Target:
private boolean isTunnelMigrationUsed ( ) { if ( ! ( org.ovirt.engine.core.common.FeatureSupported.tunnelMigration ( org.ovirt.engine.core.bll.MigrateVmCommand.getVm ( ) . getCompatibilityVersion ( ) ) ) ) { return false ; } return ( org.ovirt.engine.core.bll.MigrateVmCommand.getVm ( ) . getTunnelMigration ( ) ) != null ? org.ovirt.engine.core.bll.MigrateVmCommand.getVm ( ) . getTunnelMigration ( ) : org.ovirt.engine.core.bll.MigrateVmCommand.getCluster ( ) . isTunnelMigration ( ) ; }
Source:
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.getInstance ( ) . runQuery ( VdcQueryType.GetDomainList , tempVar , aQuery ) ; }

Target:
public void getAAAProfilesList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.convertAAAProfilesResult ( aQuery , false ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAAAProfileList , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }
Source:
private static org.ovirt.engine.core.compat.NGuid parent ( org.ovirt.engine.api.model.Tag model , org.ovirt.engine.core.compat.NGuid current ) { if ( ( ( model.isSetParent ( ) ) && ( model.getParent ( ) . isSetTag ( ) ) ) && ( model.getParent ( ) . getTag ( ) . isSetId ( ) ) ) { return new org.ovirt.engine.core.compat.Guid ( model.getParent ( ) . getTag ( ) . getId ( ) ) ; } else { return current == null ? org.ovirt.engine.core.compat.NGuid.Empty : current ; } }

Target:
private static org.ovirt.engine.core.compat.NGuid parent ( org.ovirt.engine.api.model.Tag model , org.ovirt.engine.core.compat.NGuid current ) { if ( ( ( model.isSetParent ( ) ) && ( model.getParent ( ) . isSetTag ( ) ) ) && ( model.getParent ( ) . getTag ( ) . isSetId ( ) ) ) { return org.ovirt.engine.api.restapi.utils.GuidUtils.asGuid ( model.getParent ( ) . getTag ( ) . getId ( ) ) ; } else { return current == null ? org.ovirt.engine.core.compat.NGuid.Empty : current ; } }
Source:
protected java.util.Map < java.lang.String , java.lang.Object > constructStringAttributes ( ) { java.util.Map < java.lang.String , java.lang.Object > attributes = super . constructStringAttributes ( ) ; attributes.put ( "macAddress" , getMacAddress ( ) ) ; attributes.put ( "bondOptions" , getBondOptions ( ) ) ; attributes.put ( "labels" , getLabels ( ) ) ; return attributes ; }

Target:
protected org.ovirt.engine.core.common.utils.ToStringBuilder appendAttributes ( org.ovirt.engine.core.common.utils.ToStringBuilder tsb ) { return super . appendAttributes ( tsb ) . append ( "macAddress" , getMacAddress ( ) ) . append ( "bondOptions" , getBondOptions ( ) ) . append ( "labels" , getLabels ( ) ) ; }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { providers_SelectedItemChanged ( ) ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object result ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > hosts = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ) ( result ) ) ; org.ovirt.engine.ui.uicommonweb.models.ListModel < org.ovirt.engine.core.common.businessentities.VDS > hostNameListModel = getExternalHostName ( ) ; hostNameListModel.setItems ( hosts ) ; hostNameListModel.setIsChangable ( true ) ; setEnableSearchHost ( true ) ; getProviders ( ) . setIsChangable ( true ) ; }
Source:
public org.ovirt.engine.core.bll.network.macpool.MacPool createDecoratedPool ( org.ovirt.engine.core.compat.Guid macPoolId , org.ovirt.engine.core.bll.network.macpool.MacPool poolById , java.util.List < org.ovirt.engine.core.bll.network.macpool.MacPoolDecorator > decorators ) { org.ovirt.engine.core.bll.network.macpool.MacPool decoratedPool = decoratePool ( macPoolId , poolById , decorators ) ; return lockedObjectFactory.createLockingInstance ( decoratedPool , org.ovirt.engine.core.bll.network.macpool.MacPool.class , lockForMacPool ( macPoolId ) ) ; }

Target:
public org.ovirt.engine.core.bll.network.macpool.MacPool createDecoratedPool ( org.ovirt.engine.core.compat.Guid macPoolId , org.ovirt.engine.core.bll.network.macpool.MacPool macPool , java.util.List < org.ovirt.engine.core.bll.network.macpool.MacPoolDecorator > decorators ) { org.ovirt.engine.core.bll.network.macpool.MacPool lockedPool = lockedObjectFactory.createLockingInstance ( macPool , org.ovirt.engine.core.bll.network.macpool.MacPool.class , lockForMacPool ( macPoolId ) ) ; org.ovirt.engine.core.bll.network.macpool.MacPool decoratedPool = decoratePool ( macPoolId , lockedPool , decorators ) ; return decoratedPool ; }
Source:
private boolean devicePluggable ( org.ovirt.engine.core.common.businessentities.VmDevice device ) { return ( ( VmDeviceType.DISK.getName ( ) . equals ( device.getDevice ( ) ) ) && ( VmDeviceType.DISK.getName ( ) . equals ( device.getType ( ) ) ) ) || ( ( VmDeviceType.BRIDGE.getName ( ) . equals ( device.getDevice ( ) ) ) && ( VmDeviceType.INTERFACE.getName ( ) . equals ( device.getType ( ) ) ) ) ; }

Target:
private boolean devicePluggable ( org.ovirt.engine.core.common.businessentities.VmDevice device ) { return ( ( VmDeviceType.DISK.getName ( ) . equals ( device.getDevice ( ) ) ) && ( ( org.ovirt.engine.core.common.businessentities.VmDeviceGeneralType.DISK ) == ( device.getType ( ) ) ) ) || ( ( VmDeviceType.BRIDGE.getName ( ) . equals ( device.getDevice ( ) ) ) && ( ( org.ovirt.engine.core.common.businessentities.VmDeviceGeneralType.INTERFACE ) == ( device.getType ( ) ) ) ) ; }
Source:
public void testConstructor ( ) { org.ovirt.engine.core.common.businessentities.aaa.DbUser user = org.mockito.Mockito.mock ( org.ovirt.engine.core.common.businessentities.aaa.DbUser.class ) ; org.mockito.Mockito.when ( user.getId ( ) ) . thenReturn ( Guid.EVERYONE ) ; sessionDataContainer.setUser ( session , user ) ; command.postConstruct ( ) ; org.junit.Assert.assertEquals ( "wrong user id on command" , user.getId ( ) , command.getUserId ( ) ) ; }

Target:
public void testConstructor ( ) { org.ovirt.engine.core.common.businessentities.aaa.DbUser user = org.mockito.Mockito.mock ( org.ovirt.engine.core.common.businessentities.aaa.DbUser.class ) ; org.mockito.Mockito.when ( user.getId ( ) ) . thenReturn ( Guid.EVERYONE ) ; sessionDataContainer.setUser ( session , user ) ; command.postConstruct ( ) ; org.junit.jupiter.api.Assertions.assertEquals ( user.getId ( ) , command.getUserId ( ) , "wrong user id on command" ) ; }