auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
protected boolean checkIfNeedToBeOverride ( ) { if ( ( ( ( isTemplate ( ) ) && ( ( org.ovirt.engine.core.bll.MoveOrCopyDiskCommand.getParameters ( ) . getOperation ( ) ) == ( org.ovirt.engine.core.common.businessentities.storage.ImageOperation.Copy ) ) ) && ( ! ( org.ovirt.engine.core.bll.MoveOrCopyDiskCommand.getParameters ( ) . getForceOverride ( ) ) ) ) && ( org.ovirt.engine.core.bll.MoveOrCopyDiskCommand.getImage ( ) . getStorageIds ( ) . contains ( org.ovirt.engine.core.bll.MoveOrCopyDiskCommand.getStorageDomain ( ) . getId ( ) ) ) ) { return failCanDoAction ( VdcBllMessages.ACTION_TYPE_FAILED_IMAGE_ALREADY_EXISTS ) ; } return true ; }

Target:
protected boolean checkIfNeedToBeOverride ( ) { if ( ( ( ( isTemplate ( ) ) && ( ( org.ovirt.engine.core.bll.MoveOrCopyDiskCommand.getParameters ( ) . getOperation ( ) ) == ( org.ovirt.engine.core.common.businessentities.storage.ImageOperation.Copy ) ) ) && ( ! ( org.ovirt.engine.core.bll.MoveOrCopyDiskCommand.getParameters ( ) . getForceOverride ( ) ) ) ) && ( org.ovirt.engine.core.bll.MoveOrCopyDiskCommand.getImage ( ) . getStorageIds ( ) . contains ( org.ovirt.engine.core.bll.MoveOrCopyDiskCommand.getStorageDomain ( ) . getId ( ) ) ) ) { return failCanDoAction ( EngineMessage.ACTION_TYPE_FAILED_IMAGE_ALREADY_EXISTS ) ; } return true ; }
Source:
protected boolean canDoAction ( ) { if ( ! ( super . canDoAction ( ) ) ) { return false ; } if ( ( getSnapshot ( ) . getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.gluster.GlusterSnapshotStatus.STARTED ) ) { failCanDoAction ( VdcBllMessages.ACTION_TYPE_FAILED_GLUSTER_VOLUME_SNAPSHOT_ALREADY_ACTIVATED , getSnapshot ( ) . getSnapshotName ( ) ) ; } return true ; }

Target:
protected boolean canDoAction ( ) { if ( ! ( super . canDoAction ( ) ) ) { return false ; } if ( ( getSnapshot ( ) . getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.gluster.GlusterSnapshotStatus.ACTIVATED ) ) { failCanDoAction ( VdcBllMessages.ACTION_TYPE_FAILED_GLUSTER_VOLUME_SNAPSHOT_ALREADY_ACTIVATED , getSnapshot ( ) . getSnapshotName ( ) ) ; } return true ; }
Source:
public static boolean VerifyAddVm ( java.util.List < java.lang.String > reasons , int nicsCount , int vmPriority ) { boolean returnValue = true ; if ( ( org.ovirt.engine.core.bll.network.MacPoolManager.getInstance ( ) . getAvailableMacsCount ( ) ) < nicsCount ) { if ( reasons != null ) { reasons.add ( VdcBllMessages.MAC_POOL_NOT_ENOUGH_MAC_ADDRESSES.toString ( ) ) ; } returnValue = false ; } else if ( ! ( org.ovirt.engine.core.bll.VmTemplateCommand.IsVmPriorityValueLegal ( vmPriority , reasons ) ) ) { returnValue = false ; } return returnValue ; }

Target:
public static boolean VerifyAddVm ( java.util.List < java.lang.String > reasons , int nicsCount , int vmPriority ) { boolean returnValue = true ; if ( ( org.ovirt.engine.core.bll.network.MacPoolManager.getInstance ( ) . getAvailableMacsCount ( ) ) < nicsCount ) { if ( reasons != null ) { reasons.add ( VdcBllMessages.MAC_POOL_NOT_ENOUGH_MAC_ADDRESSES.toString ( ) ) ; } returnValue = false ; } else if ( ! ( org.ovirt.engine.core.bll.VmTemplateCommand.isVmPriorityValueLegal ( vmPriority , reasons ) ) ) { returnValue = false ; } return returnValue ; }
Source:
protected void executeCommand ( ) { final org.ovirt.engine.core.common.businessentities.DiskImage newDiskImage = org.ovirt.engine.core.bll.RegisterDiskCommand.getParameters ( ) . getDiskImage ( ) ; addDiskImageToDb ( newDiskImage , org.ovirt.engine.core.bll.RegisterDiskCommand.getCompensationContext ( ) ) ; org.ovirt.engine.core.bll.RegisterDiskCommand.getReturnValue ( ) . setActionReturnValue ( newDiskImage.getId ( ) ) ; org.ovirt.engine.core.bll.RegisterDiskCommand.getReturnValue ( ) . setSucceeded ( true ) ; }

Target:
protected void executeCommand ( ) { final org.ovirt.engine.core.common.businessentities.DiskImage newDiskImage = org.ovirt.engine.core.bll.RegisterDiskCommand.getParameters ( ) . getDiskImage ( ) ; newDiskImage.setDiskAlias ( org.ovirt.engine.core.bll.ImagesHandler.getDiskAliasWithDefault ( newDiskImage , org.ovirt.engine.core.bll.RegisterDiskCommand.generateDefaultAliasForRegiteredDisk ( java.util.Calendar.getInstance ( ) ) ) ) ; addDiskImageToDb ( newDiskImage , org.ovirt.engine.core.bll.RegisterDiskCommand.getCompensationContext ( ) ) ; org.ovirt.engine.core.bll.RegisterDiskCommand.getReturnValue ( ) . setActionReturnValue ( newDiskImage.getId ( ) ) ; org.ovirt.engine.core.bll.RegisterDiskCommand.getReturnValue ( ) . setSucceeded ( true ) ; }
Source:
java.lang.String getFormattedNote ( ) { java.lang.StringBuilder formattedNote = new java.lang.StringBuilder ( org.ovirt.engine.ui.common.view.popup.AbstractDiskRemoveConfirmationPopupView.constants.empty ( ) ) ; for ( int i = 0 ; i < ( notes.size ( ) ) ; i ++ ) { java.lang.String note = notes.get ( i ) ; formattedNote.append ( org.ovirt.engine.ui.common.view.popup.AbstractDiskRemoveConfirmationPopupView.constants.lineBreak ( ) ) . append ( org.ovirt.engine.ui.common.view.popup.AbstractDiskRemoveConfirmationPopupView.constants.htmlTab ( ) ) . append ( note ) ; } return formattedNote.toString ( ) ; }

Target:
java.lang.String getFormattedNote ( ) { java.lang.StringBuilder formattedNote = new java.lang.StringBuilder ( org.ovirt.engine.ui.common.view.popup.AbstractDiskRemoveConfirmationPopupView.constants.empty ( ) ) ; for ( int i = 0 ; i < ( notes.size ( ) ) ; i ++ ) { java.lang.String note = notes.get ( i ) ; formattedNote.append ( org.ovirt.engine.ui.common.view.popup.AbstractDiskRemoveConfirmationPopupView.constants.lineBreak ( ) ) . append ( org.ovirt.engine.ui.common.view.popup.AbstractDiskRemoveConfirmationPopupView.constants.htmlTab ( ) ) . append ( org.ovirt.engine.ui.common.view.popup.AbstractDiskRemoveConfirmationPopupView.constants.htmlTab ( ) ) . append ( "- " ) . append ( note ) ; } return formattedNote.toString ( ) ; }
Source:
public void getUsbPolicyOnUpdateCurrentlyDisabledGotEnabledPolicyNotSetUsbOnPost3_0Cluster ( ) { org.ovirt.engine.api.model.Usb usb = new org.ovirt.engine.api.model.Usb ( ) ; usb.setEnabled ( true ) ; org.ovirt.engine.core.common.businessentities.VDSGroup vdsGroup = new org.ovirt.engine.core.common.businessentities.VDSGroup ( ) ; vdsGroup.setcompatibility_version ( Version.v3_1 ) ; assertEquals ( org.ovirt.engine.api.restapi.types.VmMapper.getUsbPolicyOnUpdate ( usb , UsbPolicy.DISABLED , vdsGroup.getcompatibility_version ( ) ) , UsbPolicy.ENABLED_NATIVE ) ; }

Target:
public void getUsbPolicyOnUpdateCurrentlyDisabledGotEnabledPolicyNotSetUsbOnPre3_1Cluster ( ) { org.ovirt.engine.api.model.Usb usb = new org.ovirt.engine.api.model.Usb ( ) ; usb.setEnabled ( true ) ; org.ovirt.engine.core.common.businessentities.VDSGroup vdsGroup = new org.ovirt.engine.core.common.businessentities.VDSGroup ( ) ; vdsGroup.setCompatibilityVersion ( Version.v3_0 ) ; assertEquals ( org.ovirt.engine.api.restapi.types.VmMapper.getUsbPolicyOnUpdate ( usb , UsbPolicy.DISABLED , vdsGroup.getCompatibilityVersion ( ) ) , UsbPolicy.ENABLED_LEGACY ) ; }
Source:
protected void OnSelectedItemChanged ( ) { super . OnSelectedItemChanged ( ) ; UpdateActionAvailability ( ) ; if ( ( getSelectedItem ( ) ) != null ) { getNavigatedEvent ( ) . raise ( this , new org.ovirt.engine.ui.uicommonweb.models.bookmarks.BookmarkEventArgs ( ( ( org.ovirt.engine.core.common.businessentities.bookmarks ) ( getSelectedItem ( ) ) ) ) ) ; } }

Target:
protected void OnSelectedItemChanged ( ) { super . OnSelectedItemChanged ( ) ; UpdateActionAvailability ( ) ; if ( ( getSelectedItem ( ) ) != null ) { getNavigatedEvent ( ) . raise ( this , new org.ovirt.engine.ui.uicommonweb.models.bookmarks.BookmarkEventArgs ( ( ( org.ovirt.engine.core.common.businessentities.Bookmark ) ( getSelectedItem ( ) ) ) ) ) ; } }
Source:
protected void setUpGetCertificateInfo ( int times ) throws java.lang.Exception { for ( int i = 0 ; i < times ; i ++ ) { setUpGetEntityExpectations ( VdcQueryType.GetVdsCertificateSubjectByVdsId , org.ovirt.engine.core.common.queries.GetVdsByVdsIdParameters.class , new java.lang.String [ ] { "VdsId" } , new java.lang.Object [ ] { GUIDS [ i ] } , org.ovirt.engine.api.restapi.resource.BackendHostsResourceTest.CERTIFICATE_SUBJECT ) ; } }

Target:
protected void setUpGetCertificateInfo ( int times ) throws java.lang.Exception { for ( int i = 0 ; i < times ; i ++ ) { setUpGetEntityExpectations ( VdcQueryType.GetVdsCertificateSubjectByVdsId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ i ] } , org.ovirt.engine.api.restapi.resource.BackendHostsResourceTest.CERTIFICATE_SUBJECT ) ; } }
Source:
private org.ovirt.engine.core.common.businessentities.StoragePool mockStoragePool ( org.ovirt.engine.core.compat.Version compatibilityVersion ) { org.ovirt.engine.core.compat.Guid storagePoolId = org.ovirt.engine.core.compat.Guid.NewGuid ( ) ; org.ovirt.engine.core.common.businessentities.StoragePool storagePool = new org.ovirt.engine.core.common.businessentities.StoragePool ( ) ; storagePool.setId ( storagePoolId ) ; storagePool.setcompatibility_version ( compatibilityVersion ) ; org.mockito.Mockito.when ( storagePoolDao.get ( storagePoolId ) ) . thenReturn ( storagePool ) ; return storagePool ; }

Target:
private org.ovirt.engine.core.common.businessentities.StoragePool mockStoragePool ( org.ovirt.engine.core.compat.Version compatibilityVersion ) { org.ovirt.engine.core.compat.Guid storagePoolId = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; org.ovirt.engine.core.common.businessentities.StoragePool storagePool = new org.ovirt.engine.core.common.businessentities.StoragePool ( ) ; storagePool.setId ( storagePoolId ) ; storagePool.setcompatibility_version ( compatibilityVersion ) ; org.mockito.Mockito.when ( storagePoolDao.get ( storagePoolId ) ) . thenReturn ( storagePool ) ; return storagePool ; }
Source:
private void testAllCpuProfileValuesEqualTo ( org.ovirt.engine.core.compat.Guid clusterId , org.ovirt.engine.core.compat.Guid cpuProfileId , boolean isAllNull ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmStatic > allByVdsGroup = dao.getAllByVdsGroup ( clusterId ) ; org.junit.Assert.assertNotNull ( allByVdsGroup ) ; org.junit.Assert.assertFalse ( allByVdsGroup.isEmpty ( ) ) ; boolean allValues = true ; for ( org.ovirt.engine.core.common.businessentities.VmStatic vmStatic : allByVdsGroup ) { allValues &= java.util.Objects.equals ( vmStatic.getCpuProfileId ( ) , cpuProfileId ) ; } org.junit.Assert.assertEquals ( isAllNull , allValues ) ; }

Target:
private void testAllCpuProfileValuesEqualTo ( org.ovirt.engine.core.compat.Guid clusterId , org.ovirt.engine.core.compat.Guid cpuProfileId , boolean isAllNull ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmStatic > allByCluster = dao.getAllByCluster ( clusterId ) ; org.junit.Assert.assertNotNull ( allByCluster ) ; org.junit.Assert.assertFalse ( allByCluster.isEmpty ( ) ) ; boolean allValues = true ; for ( org.ovirt.engine.core.common.businessentities.VmStatic vmStatic : allByCluster ) { allValues &= java.util.Objects.equals ( vmStatic.getCpuProfileId ( ) , cpuProfileId ) ; } org.junit.Assert.assertEquals ( isAllNull , allValues ) ; }
Source:
protected void verifyResponse ( javax.ws.rs.core.Response response ) { org.ovirt.engine.api.restapi.resource.BackendApiResourceTest.assertEquals ( 200 , response.getStatus ( ) ) ; assertTrue ( ( ( response.getEntity ( ) ) instanceof org.ovirt.engine.api.model.API ) ) ; verifyApi ( ( ( org.ovirt.engine.api.model.API ) ( response.getEntity ( ) ) ) ) ; }

Target:
public void tearDown ( ) { verifyAll ( ) ; org.ovirt.engine.api.common.invocation.CurrentManager.remove ( ) ; }
Source:
protected void syncSearch ( ) { org.ovirt.engine.core.common.queries.SearchParameters tempVar = new org.ovirt.engine.core.common.queries.SearchParameters ( applySortOptions ( getSearchString ( ) ) , org.ovirt.engine.core.common.interfaces.SearchType.VM , isCaseSensitiveSearch ( ) ) ; tempVar.setMaxCount ( getSearchPageSize ( ) ) ; super . syncSearch ( VdcQueryType.Search , tempVar ) ; }

Target:
protected void syncSearch ( ) { org.ovirt.engine.core.common.queries.SearchParameters tempVar = new org.ovirt.engine.core.common.queries.SearchParameters ( applySortOptions ( org.ovirt.engine.ui.uicommonweb.models.vms.VmListModel.getSearchString ( ) ) , org.ovirt.engine.core.common.interfaces.SearchType.VM , org.ovirt.engine.ui.uicommonweb.models.vms.VmListModel.isCaseSensitiveSearch ( ) ) ; tempVar.setMaxCount ( org.ovirt.engine.ui.uicommonweb.models.vms.VmListModel.getSearchPageSize ( ) ) ; super . syncSearch ( VdcQueryType.Search , tempVar ) ; }
Source:
public static void setVmDevices ( org.ovirt.engine.core.common.businessentities.VmBase vmBase ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > devices = org.ovirt.engine.core.bll.utils.VmDeviceUtils.dao.getVmDeviceByVmId ( vmBase.getId ( ) ) ; vmBase.setUnmanagedDeviceList ( org.ovirt.engine.core.bll.utils.VmDeviceUtils.dao.getUnmanagedDevicesByVmId ( vmBase.getId ( ) ) ) ; java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.VmDevice > vmManagedDeviceMap = new java.util.HashMap < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.VmDevice device : devices ) { if ( device.getIsManaged ( ) ) { vmManagedDeviceMap.put ( device.getDeviceId ( ) , device ) ; } } vmBase.setManagedDeviceMap ( vmManagedDeviceMap ) ; }

Target:
public void setVmDevices ( org.ovirt.engine.core.common.businessentities.VmBase vmBase ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > devices = vmDeviceDao.getVmDeviceByVmId ( vmBase.getId ( ) ) ; vmBase.setUnmanagedDeviceList ( vmDeviceDao.getUnmanagedDevicesByVmId ( vmBase.getId ( ) ) ) ; java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.VmDevice > vmManagedDeviceMap = new java.util.HashMap < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.VmDevice device : devices ) { if ( device.getIsManaged ( ) ) { vmManagedDeviceMap.put ( device.getDeviceId ( ) , device ) ; } } vmBase.setManagedDeviceMap ( vmManagedDeviceMap ) ; }
Source:
public void testRemove ( ) throws java.lang.Exception { setUpGetEntityExpectations ( ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.RemoveGroup , org.ovirt.engine.core.common.action.AdElementParametersBase.class , new java.lang.String [ ] { "AdElementId" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , true , true ) ) ; verifyRemove ( collection.remove ( GUIDS [ 0 ] . toString ( ) ) ) ; }

Target:
public void testRemove ( ) throws java.lang.Exception { setUpGetEntityExpectations ( ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.RemoveGroup , org.ovirt.engine.core.common.action.IdParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , true , true ) ) ; verifyRemove ( collection.remove ( GUIDS [ 0 ] . toString ( ) ) ) ; }
Source:
protected void updateUserCdImage ( org.ovirt.engine.core.compat.Guid storagePoolId ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getIrsImageList ( new org.ovirt.engine.ui.frontend.AsyncQuery ( getModel ( ) , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel ) ( target ) ) ; java.util.List < java.lang.String > images = ( ( java.util.List < java.lang.String > ) ( returnValue ) ) ; setImagesToModel ( model , images ) ; } } ) , storagePoolId ) ; }

Target:
protected void commonInitialize ( ) { priorityUtil = new org.ovirt.engine.ui.uicommonweb.models.vms.PriorityUtil ( getModel ( ) ) ; virtioScsiUtil = new org.ovirt.engine.ui.uicommonweb.models.vms.VirtioScsiUtil ( getModel ( ) ) ; }
Source:
private void logNoProxyAvailable ( org.ovirt.engine.core.compat.Guid dataCenterId ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase logable = org.ovirt.engine.core.di.Injector.injectMembers ( new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ) ; java.lang.String dcName = org.ovirt.engine.core.bll.GetVmsFromExternalProviderQuery.getDbFacade ( ) . getStoragePoolDao ( ) . get ( dataCenterId ) . getName ( ) ; logable.addCustomValue ( "StoragePoolName" , dcName ) ; auditLogDirector.log ( logable , AuditLogType.IMPORTEXPORT_NO_PROXY_HOST_AVAILABLE_IN_DC ) ; }

Target:
private void logNoProxyAvailable ( org.ovirt.engine.core.compat.Guid dataCenterId ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase logable = org.ovirt.engine.core.di.Injector.injectMembers ( new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ) ; java.lang.String dcName = storagePoolDao.get ( dataCenterId ) . getName ( ) ; logable.addCustomValue ( "StoragePoolName" , dcName ) ; auditLogDirector.log ( logable , AuditLogType.IMPORTEXPORT_NO_PROXY_HOST_AVAILABLE_IN_DC ) ; }
Source:
private void updateStaticFields ( org.ovirt.engine.core.common.businessentities.VmStatic vmStatic ) { name = vmStatic.getName ( ) ; origin = vmStatic.getOrigin ( ) ; autoStart = vmStatic.isAutoStartup ( ) ; memSizeMb = vmStatic.getMemSizeMb ( ) ; minAllocatedMem = vmStatic.getMinAllocatedMem ( ) ; numOfCpus = vmStatic.getNumOfCpus ( ) ; }

Target:
private void updateStaticFields ( org.ovirt.engine.core.common.businessentities.VmStatic vmStatic ) { name = vmStatic.getName ( ) ; origin = vmStatic.getOrigin ( ) ; autoStart = vmStatic.isAutoStartup ( ) ; memSizeMb = vmStatic.getMemSizeMb ( ) ; minAllocatedMem = vmStatic.getMinAllocatedMem ( ) ; numOfCpus = vmStatic.getNumOfCpus ( ) ; clusterCompatibilityVersion = clusterDao.get ( vmStatic.getClusterId ( ) ) . getCompatibilityVersion ( ) ; }
Source:
private static void addPermission ( org.ovirt.engine.core.compat.Guid userId , org.ovirt.engine.core.compat.Guid networkId , org.ovirt.engine.core.bll.PredefinedRoles role ) { org.ovirt.engine.core.common.businessentities.permissions perms = new org.ovirt.engine.core.common.businessentities.permissions ( ) ; perms.setad_element_id ( userId ) ; perms.setObjectType ( VdcObjectType.Network ) ; perms.setObjectId ( networkId ) ; perms.setrole_id ( role.getId ( ) ) ; org.ovirt.engine.core.bll.MultiLevelAdministrationHandler.addPermission ( perms ) ; }

Target:
private static void addPermission ( org.ovirt.engine.core.compat.Guid userId , org.ovirt.engine.core.compat.Guid entityId , org.ovirt.engine.core.bll.PredefinedRoles role ) { org.ovirt.engine.core.common.businessentities.permissions perms = new org.ovirt.engine.core.common.businessentities.permissions ( ) ; perms.setad_element_id ( userId ) ; perms.setObjectType ( VdcObjectType.Network ) ; perms.setObjectId ( entityId ) ; perms.setrole_id ( role.getId ( ) ) ; org.ovirt.engine.core.bll.MultiLevelAdministrationHandler.addPermission ( perms ) ; }
Source:
public void testUpdate ( ) throws java.lang.Exception { setUpGetEntityExpectations ( 2 ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.UpdateQuota , org.ovirt.engine.core.common.action.QuotaCRUDParameters.class , new java.lang.String [ ] { "QuotaId" , "Quota.Description" , "Quota.GraceClusterPercentage" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendQuotaResourceTest.QUOTA_ID , DESCRIPTIONS [ 0 ] , 30 } , true , true ) ) ; verifyModel ( resource.update ( getModel ( ) ) , 0 ) ; }

Target:
public void testUpdate ( ) throws java.lang.Exception { setUpGetEntityExpectations ( 2 ) ; setUriInfo ( setUpActionExpectations ( ActionType.UpdateQuota , org.ovirt.engine.core.common.action.QuotaCRUDParameters.class , new java.lang.String [ ] { "QuotaId" , "Quota.Description" , "Quota.GraceClusterPercentage" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendQuotaResourceTest.QUOTA_ID , DESCRIPTIONS [ 0 ] , 30 } , true , true ) ) ; verifyModel ( resource.update ( getModel ( ) ) , 0 ) ; }
Source:
public static void removeVmStatelessImages ( org.ovirt.engine.core.compat.Guid vmId , org.ovirt.engine.core.bll.context.CommandContext context ) { if ( org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getSnapshotDao ( ) . exists ( vmId , SnapshotType.STATELESS ) ) { org.ovirt.engine.core.bll.ProcessDownVmCommand.log.infoFormat ( "Deleting snapshot for stateless vm {0}" , vmId ) ; org.ovirt.engine.core.bll.Backend.getInstance ( ) . runInternalAction ( VdcActionType.RestoreStatelessVm , new org.ovirt.engine.core.common.action.VmOperationParameterBase ( vmId ) , context ) ; } }

Target:
private void removeVmStatelessImages ( ) { if ( getSnapshotDAO ( ) . exists ( org.ovirt.engine.core.bll.ProcessDownVmCommand.getVmId ( ) , SnapshotType.STATELESS ) ) { org.ovirt.engine.core.bll.ProcessDownVmCommand.log.infoFormat ( "Deleting snapshot for stateless vm {0}" , org.ovirt.engine.core.bll.ProcessDownVmCommand.getVmId ( ) ) ; org.ovirt.engine.core.bll.Backend.getInstance ( ) . runInternalAction ( VdcActionType.RestoreStatelessVm , new org.ovirt.engine.core.common.action.VmOperationParameterBase ( org.ovirt.engine.core.bll.ProcessDownVmCommand.getVmId ( ) ) , org.ovirt.engine.core.bll.job.ExecutionHandler.createDefaultContexForTasks ( org.ovirt.engine.core.bll.ProcessDownVmCommand.getExecutionContext ( ) , org.ovirt.engine.core.bll.ProcessDownVmCommand.getLock ( ) ) ) ; } }
Source:
public void setSelectedProtocol ( org.ovirt.engine.ui.uicommonweb.models.ConsoleProtocol protocol , org.ovirt.engine.ui.uicommonweb.models.HasConsoleModel item ) { consoleModelsCache.setSelectedProtocol ( protocol , item ) ; }

Target:
private boolean isConsoleCommandsExecutionAllowed ( ) { final java.util.List < org.ovirt.engine.core.common.businessentities.VM > list = getSelectedItems ( ) ; if ( list == null ) { return false ; } for ( org.ovirt.engine.core.common.businessentities.VM vm : list ) { if ( consoleModelsCache.getVmConsolesForVm ( vm ) . canConnectToConsole ( ) ) { return true ; } } return false ; }
Source:
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 ) ; }

Target:
public static void getStorageDomainMaxNameLength ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) . intValue ( ) : 1 ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.StorageDomainNameSizeLimit , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
private static org.ovirt.engine.api.model.TagParent parent ( org.ovirt.engine.core.common.businessentities.tags entity ) { if ( ( entity.getparent_id ( ) ) != null ) { org.ovirt.engine.api.model.TagParent parent = new org.ovirt.engine.api.model.TagParent ( ) ; parent.setTag ( new org.ovirt.engine.api.model.Tag ( ) ) ; parent.getTag ( ) . setId ( entity.getparent_id ( ) . toString ( ) ) ; return parent ; } else { return null ; } }

Target:
private static org.ovirt.engine.api.model.TagParent parent ( org.ovirt.engine.core.common.businessentities.Tags entity ) { if ( ( entity.getparent_id ( ) ) != null ) { org.ovirt.engine.api.model.TagParent parent = new org.ovirt.engine.api.model.TagParent ( ) ; parent.setTag ( new org.ovirt.engine.api.model.Tag ( ) ) ; parent.getTag ( ) . setId ( entity.getparent_id ( ) . toString ( ) ) ; return parent ; } else { return null ; } }
Source:
public static boolean IsNotDuplicateInterfaceName ( java.util.List < org.ovirt.engine.core.common.businessentities.network.VmNic > interfaces , final java.lang.String interfaceName , java.util.List < java.lang.String > messages ) { org.ovirt.engine.core.common.businessentities.network.VmNic iface = org.ovirt.engine.core.utils.linq.LinqUtils.firstOrNull ( interfaces , new org.ovirt.engine.core.utils.linq.Predicate < org.ovirt.engine.core.common.businessentities.network.VmNic > ( ) { @ java.lang.Override public boolean eval ( org.ovirt.engine.core.common.businessentities.network.VmNic i ) { return i.getName ( ) . equals ( interfaceName ) ; } } ) ; if ( iface != null ) { messages.add ( VdcBllMessages.NETWORK_INTERFACE_NAME_ALREADY_IN_USE.name ( ) ) ; return false ; } return true ; }

Target:
public static boolean isNotDuplicateInterfaceName ( java.util.List < org.ovirt.engine.core.common.businessentities.network.VmNic > interfaces , final java.lang.String interfaceName , java.util.List < java.lang.String > messages ) { org.ovirt.engine.core.common.businessentities.network.VmNic iface = org.ovirt.engine.core.utils.linq.LinqUtils.firstOrNull ( interfaces , new org.ovirt.engine.core.utils.linq.Predicate < org.ovirt.engine.core.common.businessentities.network.VmNic > ( ) { @ java.lang.Override public boolean eval ( org.ovirt.engine.core.common.businessentities.network.VmNic i ) { return i.getName ( ) . equals ( interfaceName ) ; } } ) ; if ( iface != null ) { messages.add ( VdcBllMessages.NETWORK_INTERFACE_NAME_ALREADY_IN_USE.name ( ) ) ; return false ; } return true ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object result ) { if ( result != null ) { org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel confirmationModel = getImportChainConfirmationModel ( ( ( java.lang.String ) ( result ) ) ) ; sourceListModel.setConfirmWindow ( confirmationModel ) ; } else { stopProgress ( ) ; setTestResultValue ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( result ) ) ) ; } }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object result ) { if ( result != null ) { org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel confirmationModel = getImportChainConfirmationModel ( ( ( java.lang.String ) ( result ) ) ) ; sourceListModel.setConfirmWindow ( confirmationModel ) ; } else { stopProgress ( ) ; getTestResult ( ) . setEntity ( org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getConstants ( ) . testFailedUnknownErrorMsg ( ) ) ; } }
Source:
public void testSetStatusForRequiredNetworkPresentOnHost ( ) { networkCluster.setStatus ( NetworkStatus.OPERATIONAL ) ; testSetStatusForRequiredNetwork ( createNetwork ( org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelperTest.NETWORK_ID1 , org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelperTest.NETWORK_NAME1 ) , org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelperTest.NETWORK_NAME1 ) ; org.mockito.Mockito.verify ( networkClusterDao , org.mockito.Mockito.never ( ) ) . updateStatus ( org.mockito.ArgumentMatchers.same ( networkCluster ) ) ; org.junit.Assert.assertThat ( networkCluster.getStatus ( ) , org.hamcrest.Matchers.is ( NetworkStatus.OPERATIONAL ) ) ; }

Target:
public void testSetStatusForRequiredNetworkPresentOnHost ( ) { networkCluster.setStatus ( NetworkStatus.OPERATIONAL ) ; underTest.setStatus ( org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelperTest.CLUSTER_ID , java.util.Collections.singletonList ( createNetwork ( org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelperTest.NETWORK_ID1 , org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelperTest.NETWORK_NAME1 ) ) ) ; org.mockito.Mockito.verify ( vdsStaticDao ) . checkIfExistsHostThatMissesNetworkInCluster ( org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelperTest.CLUSTER_ID , org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelperTest.NETWORK_NAME1 , VDSStatus.Up ) ; org.mockito.Mockito.verify ( networkClusterDao , org.mockito.Mockito.never ( ) ) . updateStatus ( org.mockito.ArgumentMatchers.same ( networkCluster ) ) ; org.junit.Assert.assertThat ( networkCluster.getStatus ( ) , org.hamcrest.Matchers.is ( NetworkStatus.OPERATIONAL ) ) ; }
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.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 getHostFingerprint ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String hostAddress ) { 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.GetServerSSHKeyFingerprint , new org.ovirt.engine.core.common.queries.ServerParameters ( hostAddress ) , aQuery ) ; }
Source:
static com.gwtplatform.mvp.client.TabData getTabData ( org.ovirt.engine.ui.common.uicommon.model.MainModelProvider < org.ovirt.engine.core.common.businessentities.storage.Disk , org.ovirt.engine.ui.uicommonweb.models.disks.DiskListModel > modelProvider , org.ovirt.engine.ui.webadmin.widget.tab.WebadminMenuLayout menuLayout ) { org.ovirt.engine.ui.webadmin.widget.tab.MenuLayoutMenuDetails menuTabDetails = menuLayout.getDetails ( WebAdminApplicationPlaces.diskMainTabPlace ) ; return new org.ovirt.engine.ui.common.widget.tab.ModelBoundTabData ( menuTabDetails.getSecondaryTitle ( ) , menuTabDetails.getSecondaryPriority ( ) , menuTabDetails.getPrimaryTitle ( ) , menuTabDetails.getPrimaryPriority ( ) , modelProvider , menuTabDetails.getIcon ( ) ) ; }

Target:
static com.gwtplatform.mvp.client.TabData getTabData ( org.ovirt.engine.ui.webadmin.widget.tab.WebadminMenuLayout menuLayout ) { org.ovirt.engine.ui.webadmin.widget.tab.MenuLayoutMenuDetails menuTabDetails = menuLayout.getDetails ( WebAdminApplicationPlaces.diskMainTabPlace ) ; return new org.ovirt.engine.ui.common.uicommon.model.GroupedTabData ( menuTabDetails.getSecondaryTitle ( ) , menuTabDetails.getPrimaryTitle ( ) , menuTabDetails.getSecondaryPriority ( ) , menuTabDetails.getPrimaryPriority ( ) , menuTabDetails.getIcon ( ) ) ; }
Source:
public void setHasManualFenceAlert ( boolean value ) { if ( ( hasManualFenceAlert ) != value ) { hasManualFenceAlert = value ; OnPropertyChanged ( new org.ovirt.engine.core.compat.PropertyChangedEventArgs ( "HasManualFenceAlert" ) ) ; } }

Target:
public void setFreeMemory ( java.lang.Integer value ) { if ( ( ( freeMemory ) == null ) && ( value == null ) ) { return ; } if ( ( ( freeMemory ) == null ) || ( ! ( freeMemory.equals ( value ) ) ) ) { freeMemory = value ; OnPropertyChanged ( new org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ( "FreeMemory" ) ) ; } }
Source:
private void initExternalProviderList ( ) { startProgress ( null ) ; org.ovirt.engine.ui.frontend.AsyncQuery getProvidersQuery = new org.ovirt.engine.ui.frontend.AsyncQuery ( ) ; getProvidersQuery.asyncCallback = new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object result ) { java.util.List < org.ovirt.engine.core.common.businessentities.Provider > providers = ( ( java.util.List < org.ovirt.engine.core.common.businessentities.Provider > ) ( result ) ) ; getExternalProviders ( ) . setItems ( providers ) ; selectExternalProvider ( ) ; stopProgress ( ) ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetAllNetworkProviders ( getProvidersQuery ) ; }

Target:
private void initExternalProviderList ( ) { startProgress ( null ) ; org.ovirt.engine.ui.frontend.AsyncQuery getProvidersQuery = new org.ovirt.engine.ui.frontend.AsyncQuery ( ) ; getProvidersQuery.asyncCallback = new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object result ) { java.util.List < org.ovirt.engine.core.common.businessentities.Provider > providers = ( ( java.util.List < org.ovirt.engine.core.common.businessentities.Provider > ) ( result ) ) ; getExternalProviders ( ) . setItems ( providers ) ; selectExternalProvider ( ) ; stopProgress ( ) ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getAllNetworkProviders ( getProvidersQuery ) ; }
Source:
public static void GetClusterById ( 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 ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVdsGroupById , new org.ovirt.engine.core.common.queries.GetVdsGroupByIdParameters ( id ) , aQuery ) ; }

Target:
public static java.util.ArrayList < org.ovirt.engine.core.common.EventNotificationEntity > GetEventNotificationTypeList ( ) { java.util.ArrayList < org.ovirt.engine.core.common.EventNotificationEntity > ret = new java.util.ArrayList < org.ovirt.engine.core.common.EventNotificationEntity > ( ) ; for ( org.ovirt.engine.core.common.EventNotificationEntity entity : org.ovirt.engine.core.common.EventNotificationEntity.values ( ) ) { if ( entity != ( org.ovirt.engine.core.common.EventNotificationEntity.UNKNOWN ) ) { ret.add ( entity ) ; } } return ret ; }
Source:
private static org.ovirt.engine.core.common.businessentities.storage.DiskImage createDiskImageTemplate ( ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage i = new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ; i.setSizeInGigabytes ( ( ( org.ovirt.engine.core.bll.AddVmCommandTest.USED_SPACE_GB ) + ( org.ovirt.engine.core.bll.AddVmCommandTest.AVAILABLE_SPACE_GB ) ) ) ; i.setActualSizeInBytes ( ( ( ( ( org.ovirt.engine.core.bll.AddVmCommandTest.REQUIRED_DISK_SIZE_GB ) * 1024L ) * 1024L ) * 1024L ) ) ; i.setImageId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; i.setStorageIds ( new java.util.ArrayList < org.ovirt.engine.core.compat.Guid > ( java.util.Arrays.asList ( org.ovirt.engine.core.bll.AddVmCommandTest.STORAGE_DOMAIN_ID_1 ) ) ) ; return i ; }

Target:
private static org.ovirt.engine.core.common.businessentities.storage.DiskImage createDiskImageTemplate ( ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage i = new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ; i.setSizeInGigabytes ( ( ( org.ovirt.engine.core.bll.AddVmCommandTest.USED_SPACE_GB ) + ( org.ovirt.engine.core.bll.AddVmCommandTest.AVAILABLE_SPACE_GB ) ) ) ; i.setActualSizeInBytes ( ( ( ( ( org.ovirt.engine.core.bll.AddVmCommandTest.REQUIRED_DISK_SIZE_GB ) * 1024L ) * 1024L ) * 1024L ) ) ; i.setImageId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; i.setStorageIds ( new java.util.ArrayList ( java.util.Collections.singletonList ( org.ovirt.engine.core.bll.AddVmCommandTest.STORAGE_DOMAIN_ID_1 ) ) ) ; return i ; }
Source:
public void Executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { org.ovirt.engine.ui.uicommonweb.models.vms.VmListModel vmListModel = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.VmListModel ) ( result.getState ( ) ) ) ; vmListModel.getWindow ( ) . StopProgress ( ) ; org.ovirt.engine.core.common.action.VdcReturnValueBase returnValueBase = result.getReturnValue ( ) ; if ( ( returnValueBase != null ) && ( returnValueBase.getSucceeded ( ) ) ) { vmListModel.Cancel ( ) ; } }

Target:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { org.ovirt.engine.ui.uicommonweb.models.vms.VmListModel vmListModel = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.VmListModel ) ( result.getState ( ) ) ) ; vmListModel.getWindow ( ) . stopProgress ( ) ; org.ovirt.engine.core.common.action.VdcReturnValueBase returnValueBase = result.getReturnValue ( ) ; if ( ( returnValueBase != null ) && ( returnValueBase.getSucceeded ( ) ) ) { vmListModel.cancel ( ) ; vmListModel.setGuideContext ( returnValueBase.getActionReturnValue ( ) ) ; vmListModel.updateActionAvailability ( ) ; vmListModel.getGuideCommand ( ) . execute ( ) ; } }
Source:
protected void addVmTemplateImages ( java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.compat.Guid > srcDeviceIdToTargetDeviceIdMapping ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > diskImages = org.ovirt.engine.core.bll.ImagesHandler.filterImageDisks ( images , true , false , true ) ; for ( org.ovirt.engine.core.common.businessentities.storage.DiskImage diskImage : diskImages ) { addVmTemplateImage ( srcDeviceIdToTargetDeviceIdMapping , diskImage ) ; } }

Target:
protected void addVmTemplateImages ( java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.compat.Guid > srcDeviceIdToTargetDeviceIdMapping ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > diskImages = org.ovirt.engine.core.bll.storage.disk.image.ImagesHandler.filterImageDisks ( images , true , false , true ) ; for ( org.ovirt.engine.core.common.businessentities.storage.DiskImage diskImage : diskImages ) { addVmTemplateImage ( srcDeviceIdToTargetDeviceIdMapping , diskImage ) ; } }
Source:
public org.ovirt.engine.core.common.businessentities.Network mapRow ( java.sql.ResultSet rs , int rowNum ) throws java.sql.SQLException { org.ovirt.engine.core.common.businessentities.Network entity = super . mapRow ( rs , rowNum ) ; entity.setis_display ( ( ( java.lang.Boolean ) ( rs.getObject ( "is_display" ) ) ) ) ; entity.setRequired ( rs.getBoolean ( "required" ) ) ; entity.setStatus ( org.ovirt.engine.core.common.businessentities.NetworkStatus.forValue ( rs.getInt ( "status" ) ) ) ; return entity ; }

Target:
public org.ovirt.engine.core.common.businessentities.Network mapRow ( java.sql.ResultSet rs , int rowNum ) throws java.sql.SQLException { org.ovirt.engine.core.common.businessentities.Network entity = super . mapRow ( rs , rowNum ) ; entity.setCluster ( new org.ovirt.engine.core.common.businessentities.network_cluster ( ) ) ; entity.setis_display ( ( ( java.lang.Boolean ) ( rs.getObject ( "is_display" ) ) ) ) ; entity.setRequired ( rs.getBoolean ( "required" ) ) ; entity.setStatus ( org.ovirt.engine.core.common.businessentities.NetworkStatus.forValue ( rs.getInt ( "status" ) ) ) ; return entity ; }
Source:
public void Executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { }

Target:
private void Preview ( ) { org.ovirt.engine.core.common.businessentities.VM vm = ( ( org.ovirt.engine.core.common.businessentities.VM ) ( getEntity ( ) ) ) ; if ( vm != null ) { org.ovirt.engine.core.common.businessentities.Snapshot snapshot = ( ( org.ovirt.engine.core.common.businessentities.Snapshot ) ( getSelectedItem ( ) ) ) ; org.ovirt.engine.ui.frontend.Frontend.RunAction ( VdcActionType.TryBackToAllSnapshotsOfVm , new org.ovirt.engine.core.common.action.TryBackToAllSnapshotsOfVmParameters ( vm.getId ( ) , snapshot.getId ( ) ) , null , null ) ; } }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { if ( ev.matchesDefinition ( spiceVersionFileFetchedEvent_Definition ) ) { org.ovirt.engine.core.compat.Version spiceVersion = parseVersion ( ( ( org.ovirt.engine.ui.webadmin.uicommon.FileFetchEventArgs ) ( args ) ) . getFileContent ( ) ) ; setSpiceVersion ( spiceVersion ) ; } else if ( ev.matchesDefinition ( documentationFileFetchedEvent_Definition ) ) { java.lang.String documentationPathFileContent = ( ( org.ovirt.engine.ui.webadmin.uicommon.FileFetchEventArgs ) ( args ) ) . getFileContent ( ) ; org.ovirt.engine.ui.common.uicommon.DocumentationPathTranslator.init ( documentationPathFileContent ) ; } }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { if ( ev.matchesDefinition ( spiceVersionFileFetchedEvent_Definition ) ) { org.ovirt.engine.core.compat.Version spiceVersion = parseVersion ( ( ( org.ovirt.engine.ui.webadmin.uicommon.FileFetchEventArgs ) ( args ) ) . getFileContent ( ) ) ; setSpiceVersion ( spiceVersion ) ; } else if ( ev.matchesDefinition ( documentationFileFetchedEvent_Definition ) ) { java.lang.String documentationPathFileContent = ( ( org.ovirt.engine.ui.webadmin.uicommon.FileFetchEventArgs ) ( args ) ) . getFileContent ( ) ; org.ovirt.engine.ui.common.uicommon.ContextSensitiveHelpManager.init ( documentationPathFileContent ) ; } }
Source:
public void testGetAllStaticByStoragePool ( ) { org.ovirt.engine.core.compat.NGuid spID = dbFacade.getVdsGroupDAO ( ) . get ( newVmStatic.getvds_group_id ( ) ) . getstorage_pool_id ( ) ; org.junit.Assert.assertNotNull ( spID.getValue ( ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VmStatic > result = dao.getAllByStoragePoolId ( spID.getValue ( ) ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; }

Target:
public void testGetAllStaticByStoragePool ( ) { org.ovirt.engine.core.compat.NGuid spID = dbFacade.getVdsGroupDao ( ) . get ( newVmStatic.getvds_group_id ( ) ) . getstorage_pool_id ( ) ; org.junit.Assert.assertNotNull ( spID.getValue ( ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VmStatic > result = dao.getAllByStoragePoolId ( spID.getValue ( ) ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; }
Source:
public static org.ovirt.engine.core.common.businessentities.LdapGroup initAdGroup ( org.ovirt.engine.core.common.businessentities.LdapGroup adGroup ) { org.ovirt.engine.core.common.businessentities.LdapGroup dbGroup = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getAdGroupDao ( ) . get ( adGroup.getid ( ) ) ; if ( dbGroup == null ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getAdGroupDao ( ) . save ( adGroup ) ; dbGroup = adGroup ; } return dbGroup ; }

Target:
public static org.ovirt.engine.core.common.businessentities.LdapGroup initAdGroup ( org.ovirt.engine.core.common.businessentities.LdapGroup adGroup ) { org.ovirt.engine.core.common.businessentities.DbGroup dbGroup = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getDbGroupDao ( ) . get ( adGroup.getid ( ) ) ; if ( dbGroup == null ) { dbGroup = new org.ovirt.engine.core.common.businessentities.DbGroup ( adGroup ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getDbGroupDao ( ) . save ( dbGroup ) ; } return new org.ovirt.engine.core.common.businessentities.LdapGroup ( dbGroup ) ; }
Source:
private static void addSoundCard ( org.ovirt.engine.core.common.businessentities.VmBase vmBase , org.ovirt.engine.core.compat.Version vdsGroupCompatibilityVersion ) { java.lang.String soundDevice = org.ovirt.engine.core.bll.utils.VmDeviceUtils.osRepository.getSoundDevice ( vmBase.getOsId ( ) , vdsGroupCompatibilityVersion ) ; org.ovirt.engine.core.bll.utils.VmDeviceUtils.addManagedDevice ( new org.ovirt.engine.core.common.businessentities.VmDeviceId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , vmBase.getId ( ) ) , VmDeviceGeneralType.SOUND , org.ovirt.engine.core.common.utils.VmDeviceType.getSoundDeviceType ( soundDevice ) , new java.util.HashMap < java.lang.String , java.lang.Object > ( ) , true , true , null , false ) ; }

Target:
public static org.ovirt.engine.core.common.businessentities.VmDevice addSoundDevice ( org.ovirt.engine.core.common.businessentities.VmBase vmBase ) { return org.ovirt.engine.core.bll.utils.VmDeviceUtils.addSoundDevice ( vmBase.getId ( ) , vmBase.getOsId ( ) , org.ovirt.engine.core.bll.utils.ClusterUtils.getCompatibilityVersion ( vmBase ) ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeSnapshotInfoReturnForXmlRpc glusterSnapshotInfo ( org.ovirt.engine.core.compat.Guid clusterId , java.lang.String volumeName , java.lang.String snapshotName ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue ; if ( snapshotName == null ) { xmlRpcReturnValue = vdsServer.glusterSnapshotInfo ( "" , volumeName ) ; } else { xmlRpcReturnValue = vdsServer.glusterSnapshotInfo ( snapshotName , volumeName ) ; } org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeSnapshotInfoReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeSnapshotInfoReturnForXmlRpc ( clusterId , volumeName , 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 glusterVolumeGeoRepConfigSet ( java.lang.String volumeName , java.lang.String slaveHost , java.lang.String slaveVolumeName , java.lang.String configKey , java.lang.String configValue ) { try { return new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( vdsServer.glusterVolumeGeoRepConfigSet ( volumeName , slaveHost , slaveVolumeName , configKey , configValue ) ) ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs pcArgs = ( ( org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ) ( args ) ) ; if ( PropertyChangedEventArgs.Args.PROGRESS.toString ( ) . equals ( pcArgs.propertyName ) ) { externalDiskPanel.clear ( ) ; if ( ( sanStorageModel.getProgress ( ) ) != null ) { externalDiskPanel.add ( progressContent ) ; } else { externalDiskPanel.add ( storageView ) ; } } }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs pcArgs = ( ( org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ) ( args ) ) ; if ( PropertyChangedEventArgs.PROGRESS.equals ( pcArgs.propertyName ) ) { externalDiskPanel.clear ( ) ; if ( ( sanStorageModel.getProgress ( ) ) != null ) { externalDiskPanel.add ( progressContent ) ; } else { externalDiskPanel.add ( storageView ) ; } } }
Source:
private void writeJaxbCustomization ( javax.xml.stream.XMLStreamWriter writer , java.lang.String tag , java.lang.String name , java.lang.String value ) throws javax.xml.stream.XMLStreamException { writer.writeStartElement ( org.ovirt.api.metamodel.tool.SchemaGenerator.XS_URI , "annotation" ) ; writer.writeStartElement ( org.ovirt.api.metamodel.tool.SchemaGenerator.XS_URI , "appinfo" ) ; writer.writeStartElement ( org.ovirt.api.metamodel.tool.SchemaGenerator.JAXB_URI , tag ) ; writer.writeAttribute ( name , value ) ; writer.writeEndElement ( ) ; writer.writeEndElement ( ) ; writer.writeEndElement ( ) ; }

Target:
private void writeJaxbCustomization ( org.ovirt.api.metamodel.tool.XmlWriter writer , java.lang.String tag , java.lang.String name , java.lang.String value ) { writer.writeStartElement ( org.ovirt.api.metamodel.tool.SchemaGenerator.XS_URI , "annotation" ) ; writer.writeStartElement ( org.ovirt.api.metamodel.tool.SchemaGenerator.XS_URI , "appinfo" ) ; writer.writeStartElement ( org.ovirt.api.metamodel.tool.SchemaGenerator.JAXB_URI , tag ) ; writer.writeAttribute ( name , value ) ; writer.writeEndElement ( ) ; writer.writeEndElement ( ) ; writer.writeEndElement ( ) ; }