auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
protected void ExecuteIrsBrokerCommand ( ) { org.ovirt.engine.core.vdsbroker.irsbroker.VDS vds = org.ovirt.engine.core.vdsbroker.irsbroker.DbFacade.getInstance ( ) . getVdsDao ( ) . get ( this . getCurrentIrsProxyData ( ) . getCurrentVdsId ( ) ) ; status = org.ovirt.engine.core.vdsbroker.irsbroker.DestroyStoragePoolVDSCommand.getIrsProxy ( ) . destroyStoragePool ( org.ovirt.engine.core.vdsbroker.irsbroker.DestroyStoragePoolVDSCommand.getParameters ( ) . getStoragePoolId ( ) . toString ( ) , vds.getvds_spm_id ( ) , org.ovirt.engine.core.vdsbroker.irsbroker.DestroyStoragePoolVDSCommand.getParameters ( ) . getStoragePoolId ( ) . toString ( ) ) ; org.ovirt.engine.core.vdsbroker.irsbroker.DestroyStoragePoolVDSCommand.ProceedProxyReturnValue ( ) ; org.ovirt.engine.core.vdsbroker.irsbroker.DestroyStoragePoolVDSCommand.RemoveIrsProxy ( ) ; }

Target:
protected void ExecuteIrsBrokerCommand ( ) { org.ovirt.engine.core.vdsbroker.irsbroker.VDS vds = org.ovirt.engine.core.vdsbroker.irsbroker.DbFacade.getInstance ( ) . getVdsDao ( ) . get ( this . getCurrentIrsProxyData ( ) . getCurrentVdsId ( ) ) ; status = org.ovirt.engine.core.vdsbroker.irsbroker.DestroyStoragePoolVDSCommand.getIrsProxy ( ) . destroyStoragePool ( org.ovirt.engine.core.vdsbroker.irsbroker.DestroyStoragePoolVDSCommand.getParameters ( ) . getStoragePoolId ( ) . toString ( ) , vds.getVdsSpmId ( ) , org.ovirt.engine.core.vdsbroker.irsbroker.DestroyStoragePoolVDSCommand.getParameters ( ) . getStoragePoolId ( ) . toString ( ) ) ; org.ovirt.engine.core.vdsbroker.irsbroker.DestroyStoragePoolVDSCommand.ProceedProxyReturnValue ( ) ; org.ovirt.engine.core.vdsbroker.irsbroker.DestroyStoragePoolVDSCommand.RemoveIrsProxy ( ) ; }
Source:
public void getVmTemplatesByBaseTemplateId ( org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery , org.ovirt.engine.core.compat.Guid baseTemplate ) { asyncQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmTemplate > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmTemplatesByBaseTemplateId , new org.ovirt.engine.core.common.queries.GetVmTemplateParameters ( baseTemplate ) , asyncQuery ) ; }

Target:
public void getHostNumaTopologyByHostId ( org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery , org.ovirt.engine.core.compat.Guid hostId ) { asyncQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VdsNumaNode > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVdsNumaNodesByVdsId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( hostId ) , asyncQuery ) ; }
Source:
public java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > getPermissionCheckSubjects ( ) { java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > permissionList = new java.util.ArrayList < org.ovirt.engine.core.bll.utils.PermissionSubject > ( ) ; permissionList.add ( new org.ovirt.engine.core.bll.utils.PermissionSubject ( org.ovirt.engine.core.bll.AddVmFromSnapshotCommand.getVdsGroupId ( ) , org.ovirt.engine.core.common.VdcObjectType.VdsGroups , org.ovirt.engine.core.bll.AddVmFromSnapshotCommand.getActionType ( ) . getActionGroup ( ) ) ) ; permissionList.add ( new org.ovirt.engine.core.bll.utils.PermissionSubject ( getVmIdFromSnapshot ( ) , org.ovirt.engine.core.common.VdcObjectType.VM , org.ovirt.engine.core.bll.AddVmFromSnapshotCommand.getActionType ( ) . getActionGroup ( ) ) ) ; addPermissionSubjectForCustomProperties ( permissionList ) ; return permissionList ; }

Target:
public java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > getPermissionCheckSubjects ( ) { java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > permissionList = new java.util.ArrayList < org.ovirt.engine.core.bll.utils.PermissionSubject > ( ) ; permissionList.add ( new org.ovirt.engine.core.bll.utils.PermissionSubject ( org.ovirt.engine.core.bll.AddVmFromSnapshotCommand.getVdsGroupId ( ) , org.ovirt.engine.core.common.VdcObjectType.VdsGroups , org.ovirt.engine.core.bll.AddVmFromSnapshotCommand.getActionType ( ) . getActionGroup ( ) ) ) ; permissionList.add ( new org.ovirt.engine.core.bll.utils.PermissionSubject ( getVmIdFromSnapshot ( ) , org.ovirt.engine.core.common.VdcObjectType.VM , org.ovirt.engine.core.bll.AddVmFromSnapshotCommand.getActionType ( ) . getActionGroup ( ) ) ) ; addPermissionSubjectForAdminLevelProperties ( permissionList ) ; return permissionList ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc migrateStatus ( java.lang.String vmId ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "VM.getMigrationStatus" ) . withParameter ( "vmID" , vmId ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( response ) ; }

Target:
public org.ovirt.engine.core.vdsbroker.gluster.GlusterHostsPubKeyReturnForXmlRpc glusterGeoRepKeysGet ( ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "GlusterVolume.geoRepKeysGet" ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) ; return new org.ovirt.engine.core.vdsbroker.gluster.GlusterHostsPubKeyReturnForXmlRpc ( response ) ; }
Source:
protected void executeCommand ( ) { org.ovirt.engine.core.bll.network.vm.AddVnicProfileCommand.getVnicProfile ( ) . setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; updateDefaultNetworkFilterIfRequired ( ) ; vnicProfileDao.save ( org.ovirt.engine.core.bll.network.vm.AddVnicProfileCommand.getVnicProfile ( ) ) ; networkHelper.addPermissionsOnVnicProfile ( org.ovirt.engine.core.bll.network.vm.AddVnicProfileCommand.getCurrentUser ( ) . getId ( ) , org.ovirt.engine.core.bll.network.vm.AddVnicProfileCommand.getVnicProfile ( ) . getId ( ) , org.ovirt.engine.core.bll.network.vm.AddVnicProfileCommand.getParameters ( ) . isPublicUse ( ) ) ; org.ovirt.engine.core.bll.network.vm.AddVnicProfileCommand.getReturnValue ( ) . setActionReturnValue ( org.ovirt.engine.core.bll.network.vm.AddVnicProfileCommand.getVnicProfile ( ) . getId ( ) ) ; org.ovirt.engine.core.bll.network.vm.AddVnicProfileCommand.setSucceeded ( true ) ; }

Target:
protected void executeCommand ( ) { org.ovirt.engine.core.bll.network.vm.AddVnicProfileCommand.getVnicProfile ( ) . setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; updateDefaultNetworkFilterIfRequired ( ) ; vnicProfileDao.save ( org.ovirt.engine.core.bll.network.vm.AddVnicProfileCommand.getVnicProfile ( ) ) ; networkHelper.addPermissionsOnVnicProfile ( org.ovirt.engine.core.bll.network.vm.AddVnicProfileCommand.getUserId ( ) , org.ovirt.engine.core.bll.network.vm.AddVnicProfileCommand.getVnicProfile ( ) . getId ( ) , org.ovirt.engine.core.bll.network.vm.AddVnicProfileCommand.getParameters ( ) . isPublicUse ( ) ) ; org.ovirt.engine.core.bll.network.vm.AddVnicProfileCommand.getReturnValue ( ) . setActionReturnValue ( org.ovirt.engine.core.bll.network.vm.AddVnicProfileCommand.getVnicProfile ( ) . getId ( ) ) ; org.ovirt.engine.core.bll.network.vm.AddVnicProfileCommand.setSucceeded ( true ) ; }
Source:
private void endCreateAllSnapshots ( ) { org.ovirt.engine.core.common.action.VdcReturnValueBase returnValue = org.ovirt.engine.core.bll.Backend.getInstance ( ) . endAction ( VdcActionType.CreateAllSnapshotsFromVm , getCreateSnapshotParameters ( ) , org.ovirt.engine.core.bll.job.ExecutionHandler.createDefaultContexForTasks ( enclosingCommand.getExecutionContext ( ) ) ) ; enclosingCommand.getReturnValue ( ) . setSucceeded ( returnValue.getSucceeded ( ) ) ; }

Target:
private void endCreateAllSnapshots ( ) { org.ovirt.engine.core.common.action.VdcReturnValueBase returnValue = org.ovirt.engine.core.bll.Backend.getInstance ( ) . endAction ( VdcActionType.CreateAllSnapshotsFromVm , getCreateSnapshotParameters ( ) , org.ovirt.engine.core.bll.job.ExecutionHandler.createDefaultContextForTasks ( enclosingCommand.getContext ( ) ) ) ; enclosingCommand.getReturnValue ( ) . setSucceeded ( returnValue.getSucceeded ( ) ) ; }
Source:
public void mockConfig ( ) { java.util.HashSet < org.ovirt.engine.core.compat.Version > supportedClusters = new java.util.HashSet < > ( ) ; supportedClusters.add ( version ) ; org.mockito.Mockito.when ( host.getSupportedClusterVersionsSet ( ) ) . thenReturn ( supportedClusters ) ; org.mockito.Mockito.when ( host.getVdsGroupCompatibilityVersion ( ) ) . thenReturn ( version ) ; configRule.mockConfigValue ( ConfigValues.DefaultRouteSupported , version , java.lang.Boolean.FALSE ) ; }

Target:
public void mockConfig ( ) { java.util.HashSet < org.ovirt.engine.core.compat.Version > supportedClusters = new java.util.HashSet < > ( ) ; supportedClusters.add ( version ) ; org.mockito.Mockito.when ( host.getSupportedClusterVersionsSet ( ) ) . thenReturn ( supportedClusters ) ; org.mockito.Mockito.when ( host.getVdsGroupCompatibilityVersion ( ) ) . thenReturn ( version ) ; configRule.mockConfigValue ( ConfigValues.DefaultRouteSupported , version , java.lang.Boolean.FALSE ) ; configRule.mockConfigValue ( ConfigValues.DefaultMtu , 1500 ) ; }
Source:
public static void GetCPUList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Version version ) { 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.ServerCpu > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ServerCpu > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllServerCpuList , new org.ovirt.engine.core.common.queries.GetAllServerCpuListParameters ( version ) , aQuery ) ; }

Target:
public static void GetNetworkList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.Network > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.Network > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllNetworks , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) , aQuery ) ; }
Source:
public org.ovirt.engine.core.notifier.methods.NotificationMethodMapBuilder.NotificationMethodFactoryMapper createMethodsMapper ( java.util.List < org.ovirt.engine.core.common.businessentities.event_notification_methods > notificationMethods , java.util.Map < java.lang.String , java.lang.String > properties ) { org.ovirt.engine.core.notifier.methods.NotificationMethodMapBuilder.NotificationMethodFactoryMapper methodMapper = new org.ovirt.engine.core.notifier.methods.NotificationMethodMapBuilder.NotificationMethodFactoryMapper ( ) ; for ( org.ovirt.engine.core.common.businessentities.event_notification_methods method : notificationMethods ) { if ( EventNotificationMethods.EMAIL.equals ( method.getmethod_type ( ) ) ) { methodMapper.addMethodFactory ( EventNotificationMethods.EMAIL , new org.ovirt.engine.core.notifier.methods.NotificationMethodFactoryEmailImpl ( properties ) ) ; } } return methodMapper ; }

Target:
public org.ovirt.engine.core.notifier.methods.NotificationMethodMapBuilder.NotificationMethodFactoryMapper createMethodsMapper ( java.util.List < org.ovirt.engine.core.common.businessentities.EventNotificationMethod > notificationMethods , java.util.Map < java.lang.String , java.lang.String > properties ) { org.ovirt.engine.core.notifier.methods.NotificationMethodMapBuilder.NotificationMethodFactoryMapper methodMapper = new org.ovirt.engine.core.notifier.methods.NotificationMethodMapBuilder.NotificationMethodFactoryMapper ( ) ; for ( org.ovirt.engine.core.common.businessentities.EventNotificationMethod method : notificationMethods ) { if ( EventNotificationMethods.EMAIL.equals ( method.getmethod_type ( ) ) ) { methodMapper.addMethodFactory ( EventNotificationMethods.EMAIL , new org.ovirt.engine.core.notifier.methods.NotificationMethodFactoryEmailImpl ( properties ) ) ; } } return methodMapper ; }
Source:
public static org.ovirt.engine.core.bll.aaa.SessionDataContainer getInstance ( ) { return org.ovirt.engine.core.bll.aaa.SessionDataContainer.dataProviderInstance ; }

Target:
public java.lang.String getSessionIdBySeqId ( long sessionSequenceId ) { java.lang.String sessionId = null ; for ( org.ovirt.engine.core.bll.aaa.SessionDataContainer.SessionInfo sessionInfo : sessionInfoMap.values ( ) ) { if ( sessionInfo.contentOfSession.get ( org.ovirt.engine.core.bll.aaa.SessionDataContainer.ENGINE_SESSION_SEQ_ID ) . equals ( sessionSequenceId ) ) { sessionId = ( ( java.lang.String ) ( sessionInfo.contentOfSession.get ( org.ovirt.engine.core.bll.aaa.SessionDataContainer.ENGINE_SESSION_ID ) ) ) ; break ; } } return sessionId ; }
Source:
public void testGetStorageDomainIdWithPermissions ( ) { mockStoragePoolDAO ( new org.ovirt.engine.core.common.businessentities.StoragePool ( ) ) ; org.ovirt.engine.core.dao.StorageDomainDAO storageDomainDAOMock = org.mockito.Mockito.mock ( org.ovirt.engine.core.dao.StorageDomainDAO.class ) ; org.mockito.Mockito.when ( storageDomainDAOMock.getIsoStorageDomainIdForPool ( getQueryParameters ( ) . getStoragePoolId ( ) ) ) . thenReturn ( storageDomainId ) ; org.mockito.Mockito.when ( getQuery ( ) . getDbFacade ( ) . getStorageDomainDao ( ) ) . thenReturn ( storageDomainDAOMock ) ; org.junit.Assert.assertEquals ( "wrong storage domain id" , storageDomainId , getQuery ( ) . getStorageDomainId ( ) ) ; }

Target:
public void testGetStorageDomainIdWithPermissions ( ) { mockStoragePoolDAO ( new org.ovirt.engine.core.common.businessentities.StoragePool ( ) ) ; org.ovirt.engine.core.dao.StorageDomainDAO storageDomainDAOMock = org.mockito.Mockito.mock ( org.ovirt.engine.core.dao.StorageDomainDAO.class ) ; org.mockito.Mockito.when ( storageDomainDAOMock.getIsoStorageDomainIdForPool ( getQueryParameters ( ) . getStoragePoolId ( ) ) ) . thenReturn ( storageDomainId ) ; org.mockito.Mockito.when ( getQuery ( ) . getDbFacade ( ) . getStorageDomainDao ( ) ) . thenReturn ( storageDomainDAOMock ) ; org.junit.Assert.assertEquals ( "wrong storage domain id" , storageDomainId , getQuery ( ) . getStorageDomainIdForQuery ( ) ) ; }
Source:
public void run ( ) { int val = counter.incrementAndGet ( ) ; org.ovirt.engine.core.common.businessentities.tags tag = createTag ( ( "tag" + val ) , ( "desc" + val ) ) ; dao.save ( tag ) ; org.ovirt.engine.core.common.businessentities.tags fromDb = dao.get ( tag.gettag_id ( ) ) ; org.junit.Assert.assertEquals ( tag , fromDb ) ; dao.remove ( tag.gettag_id ( ) ) ; fromDb = dao.get ( tag.gettag_id ( ) ) ; org.junit.Assert.assertNull ( fromDb ) ; }

Target:
public void run ( ) { int val = counter.incrementAndGet ( ) ; org.ovirt.engine.core.common.businessentities.Tags tag = createTag ( ( "tag" + val ) , ( "desc" + val ) ) ; dao.save ( tag ) ; org.ovirt.engine.core.common.businessentities.Tags fromDb = dao.get ( tag.gettag_id ( ) ) ; org.junit.Assert.assertEquals ( tag , fromDb ) ; dao.remove ( tag.gettag_id ( ) ) ; fromDb = dao.get ( tag.gettag_id ( ) ) ; org.junit.Assert.assertNull ( fromDb ) ; }
Source:
protected org.ovirt.engine.core.common.businessentities.DiskImage getDiskImage ( ) { org.ovirt.engine.core.common.businessentities.DiskImage disk = new org.ovirt.engine.core.common.businessentities.DiskImage ( ) ; disk.setImageId ( diskImageGuid ) ; java.util.ArrayList < org.ovirt.engine.core.compat.Guid > storageIdList = new java.util.ArrayList < > ( ) ; storageIdList.add ( storageDomainId ) ; disk.setStorageIds ( storageIdList ) ; disk.setStoragePoolId ( storagePoolId ) ; return disk ; }

Target:
protected org.ovirt.engine.core.common.businessentities.storage.DiskImage getDiskImage ( ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage disk = new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ; disk.setImageId ( diskImageGuid ) ; java.util.ArrayList < org.ovirt.engine.core.compat.Guid > storageIdList = new java.util.ArrayList < > ( ) ; storageIdList.add ( storageDomainId ) ; disk.setStorageIds ( storageIdList ) ; disk.setStoragePoolId ( storagePoolId ) ; return disk ; }
Source:
public void getRedirectServletReportsPage ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; } } ; getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.RedirectServletReportsPage , getDefaultConfigurationVersion ( ) ) , 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:
private void applyStyles ( ) { cardStatusEditor.addContentWidgetStyleName ( style.cardStatusEditorContent ( ) ) ; pluggedEditor.addContentWidgetStyleName ( style.cardStatusRadioContent ( ) ) ; unpluggedEditor.addContentWidgetStyleName ( style.cardStatusRadioContent ( ) ) ; }

Target:
private void applyStyles ( ) { cardStatusEditor.addContentWidgetStyleName ( style.cardStatusEditorContent ( ) ) ; pluggedEditor.addContentWidgetStyleName ( style.cardStatusRadioContent ( ) ) ; unpluggedEditor.addContentWidgetStyleName ( style.cardStatusRadioContent ( ) ) ; linkStateEditor.addContentWidgetStyleName ( style.linkStateEditorContent ( ) ) ; linkedEditor.addContentWidgetStyleName ( style.linkStateRadioContent ( ) ) ; unlinkedEditor.addContentWidgetStyleName ( style.linkStateRadioContent ( ) ) ; enableManualMacCheckbox.addContentWidgetStyleName ( style.checkBox ( ) ) ; portMirroringEditor.addContentWidgetStyleName ( style.portMirroringEditor ( ) ) ; }
Source:
private void initializeCommand ( ) { initializeCommand ( createParameters ( ) ) ; }

Target:
public void canDoActionFailedVMHasNotDisk ( ) throws java.lang.Exception { initializeCommand ( createParameters ( ) ) ; createNullDisk ( ) ; org.junit.Assert.assertFalse ( command.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( VdcBllMessages.ACTION_TYPE_FAILED_DISK_NOT_EXIST.toString ( ) ) ) ; }
Source:
protected boolean validateImages ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > imagesToValidate = org.ovirt.engine.core.bll.ImagesHandler.filterImageDisks ( org.ovirt.engine.core.bll.RemoveSnapshotCommand.getDiskDao ( ) . getAllForVm ( org.ovirt.engine.core.bll.RemoveSnapshotCommand.getVmId ( ) ) , true , false , true ) ; org.ovirt.engine.core.bll.validator.storage.DiskImagesValidator diskImagesValidator = new org.ovirt.engine.core.bll.validator.storage.DiskImagesValidator ( imagesToValidate ) ; return ( validate ( diskImagesValidator.diskImagesNotLocked ( ) ) ) && ( ( org.ovirt.engine.core.bll.RemoveSnapshotCommand.getVm ( ) . isQualifiedForLiveSnapshotMerge ( ) ) || ( validate ( diskImagesValidator.diskImagesNotIllegal ( ) ) ) ) ; }

Target:
protected boolean validateImages ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > imagesToValidate = getDiskImagesToValidate ( ) ; org.ovirt.engine.core.bll.validator.storage.DiskImagesValidator diskImagesValidator = new org.ovirt.engine.core.bll.validator.storage.DiskImagesValidator ( imagesToValidate ) ; return ( validate ( diskImagesValidator.diskImagesNotLocked ( ) ) ) && ( ( org.ovirt.engine.core.bll.RemoveSnapshotCommand.getVm ( ) . isQualifiedForLiveSnapshotMerge ( ) ) || ( validate ( diskImagesValidator.diskImagesNotIllegal ( ) ) ) ) ; }
Source:
public static void addDiskToVm ( org.ovirt.engine.core.common.businessentities.storage.BaseDisk disk , org.ovirt.engine.core.compat.Guid vmId ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getBaseDiskDao ( ) . save ( disk ) ; if ( ( disk.getDiskVmElementForVm ( vmId ) ) != null ) { org.ovirt.engine.core.bll.storage.disk.image.ImagesHandler.getDiskVmElementDao ( ) . save ( disk.getDiskVmElementForVm ( vmId ) ) ; } final org.ovirt.engine.core.bll.utils.VmDeviceUtils vmDeviceUtils = org.ovirt.engine.core.di.Injector.get ( org.ovirt.engine.core.bll.utils.VmDeviceUtils.class ) ; vmDeviceUtils.addDiskDevice ( vmId , disk.getId ( ) ) ; }

Target:
public void addDiskToVm ( org.ovirt.engine.core.common.businessentities.storage.BaseDisk disk , org.ovirt.engine.core.compat.Guid vmId ) { baseDiskDao.save ( disk ) ; if ( ( disk.getDiskVmElementForVm ( vmId ) ) != null ) { diskVmElementDao.save ( disk.getDiskVmElementForVm ( vmId ) ) ; } final org.ovirt.engine.core.bll.utils.VmDeviceUtils vmDeviceUtils = org.ovirt.engine.core.di.Injector.get ( org.ovirt.engine.core.bll.utils.VmDeviceUtils.class ) ; vmDeviceUtils.addDiskDevice ( vmId , disk.getId ( ) ) ; }
Source:
public com.google.gwt.resources.client.ImageResource getValue ( org.ovirt.engine.core.common.businessentities.DbUser user ) { if ( user.isAdmin ( ) ) { return getApplicationResources ( ) . adminImage ( ) ; } if ( user.isGroup ( ) ) { return getApplicationResources ( ) . userGroupImage ( ) ; } return getApplicationResources ( ) . userImage ( ) ; }

Target:
public com.google.gwt.resources.client.ImageResource getValue ( org.ovirt.engine.core.common.businessentities.aaa.DbUser user ) { if ( user.isAdmin ( ) ) { return getApplicationResources ( ) . adminImage ( ) ; } if ( user.isGroup ( ) ) { return getApplicationResources ( ) . userGroupImage ( ) ; } return getApplicationResources ( ) . userImage ( ) ; }
Source:
public void completeExternalNetworkProviderConfigurationsNoNameTest ( ) { org.ovirt.engine.api.model.ExternalNetworkProviderConfigurations configurations = getExternalNetworkProviderConfigurations ( 1 ) ; configurations.getExternalNetworkProviderConfigurations ( ) . get ( 0 ) . getExternalNetworkProvider ( ) . setName ( null ) ; try { org.ovirt.engine.api.restapi.resource.BackendExternalProviderHelper.completeExternalNetworkProviderConfigurations ( resource , configurations ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , Response.Status.BAD_REQUEST.getStatusCode ( ) ) ; } }

Target:
public void completeExternalNetworkProviderConfigurationsNoNameTest ( ) { org.ovirt.engine.api.model.ExternalNetworkProviderConfigurations configurations = getExternalNetworkProviderConfigurations ( 1 ) ; configurations.getExternalNetworkProviderConfigurations ( ) . get ( 0 ) . getExternalNetworkProvider ( ) . setName ( null ) ; try { org.ovirt.engine.api.restapi.resource.BackendExternalProviderHelper.completeExternalNetworkProviderConfigurations ( resource , configurations ) ; org.junit.Assert.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , Response.Status.BAD_REQUEST.getStatusCode ( ) ) ; } }
Source:
protected void ExecuteNetworkCommand ( org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkItemModel < ? > op1 , org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkItemModel < ? > op2 , java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > allNics , java.lang.Object ... params ) { assert op1 instanceof org.ovirt.engine.ui.uicommonweb.models.hosts.network.LogicalNetworkModel ; org.ovirt.engine.ui.uicommonweb.models.hosts.network.LogicalNetworkModel networkToDetach = ( ( org.ovirt.engine.ui.uicommonweb.models.hosts.network.LogicalNetworkModel ) ( op1 ) ) ; assert networkToDetach.isAttached ( ) ; org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkOperation.detachNetwork ( allNics , networkToDetach ) ; }

Target:
protected void executeNetworkCommand ( org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkItemModel < ? > op1 , org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkItemModel < ? > op2 , java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > allNics , java.lang.Object ... params ) { assert op1 instanceof org.ovirt.engine.ui.uicommonweb.models.hosts.network.LogicalNetworkModel ; org.ovirt.engine.ui.uicommonweb.models.hosts.network.LogicalNetworkModel networkToDetach = ( ( org.ovirt.engine.ui.uicommonweb.models.hosts.network.LogicalNetworkModel ) ( op1 ) ) ; assert networkToDetach.isAttached ( ) ; org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkOperation.detachNetwork ( allNics , networkToDetach ) ; }
Source:
public org.ovirt.engine.core.common.AuditLogType getAuditLogTypeValue ( ) { switch ( org.ovirt.engine.core.bll.HibernateVmCommand.getActionState ( ) ) { case EXECUTE : return getHibernateVmParams ( ) . getAutomaticSuspend ( ) ? org.ovirt.engine.core.bll.HibernateVmCommand.getSucceeded ( ) ? org.ovirt.engine.core.common.AuditLogType.AUTO_SUSPEND_VM : org.ovirt.engine.core.common.AuditLogType.AUTO_FAILED_SUSPEND_VM : org.ovirt.engine.core.bll.HibernateVmCommand.getSucceeded ( ) ? org.ovirt.engine.core.common.AuditLogType.USER_SUSPEND_VM : org.ovirt.engine.core.common.AuditLogType.USER_FAILED_SUSPEND_VM ; case END_SUCCESS : case END_FAILURE : default : return getHibernateVmParams ( ) . getAutomaticSuspend ( ) ? org.ovirt.engine.core.common.AuditLogType.AUTO_SUSPEND_VM_FINISH_FAILURE : isHibernateVdsProblematic ? org.ovirt.engine.core.common.AuditLogType.USER_SUSPEND_VM_FINISH_FAILURE_WILL_TRY_AGAIN : org.ovirt.engine.core.common.AuditLogType.USER_SUSPEND_VM_FINISH_FAILURE ; } }

Target:
protected void insertAsyncTaskPlaceHolders ( ) { persistAsyncTaskPlaceHolder ( org.ovirt.engine.core.bll.HibernateVmCommand.getParameters ( ) . getParentCommand ( ) , org.ovirt.engine.core.bll.HibernateVmCommand.SAVE_IMAGE_TASK_KEY ) ; persistAsyncTaskPlaceHolder ( org.ovirt.engine.core.bll.HibernateVmCommand.getParameters ( ) . getParentCommand ( ) , org.ovirt.engine.core.bll.HibernateVmCommand.SAVE_RAM_STATE_TASK_KEY ) ; }
Source:
public void testCreatingBusinessEntityMapWithDuplicatesAmongIds ( ) { org.ovirt.engine.core.compat.Guid itemId = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; org.ovirt.engine.core.common.businessentities.BusinessEntityMapTest.TestItem first = new org.ovirt.engine.core.common.businessentities.BusinessEntityMapTest.TestItem ( itemId , "name" ) ; org.ovirt.engine.core.common.businessentities.BusinessEntityMapTest.TestItem second = new org.ovirt.engine.core.common.businessentities.BusinessEntityMapTest.TestItem ( itemId , "different name" ) ; new org.ovirt.engine.core.common.businessentities.BusinessEntityMap ( java.util.Arrays.asList ( first , second ) ) ; }

Target:
public void testCreatingBusinessEntityMapWithDuplicatesAmongIds ( ) { org.ovirt.engine.core.compat.Guid itemId = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; org.ovirt.engine.core.common.businessentities.BusinessEntityMapTest.TestItem first = new org.ovirt.engine.core.common.businessentities.BusinessEntityMapTest.TestItem ( itemId , "name" ) ; org.ovirt.engine.core.common.businessentities.BusinessEntityMapTest.TestItem second = new org.ovirt.engine.core.common.businessentities.BusinessEntityMapTest.TestItem ( itemId , "different name" ) ; org.junit.jupiter.api.Assertions.assertThrows ( java.lang.IllegalArgumentException.class , ( ) -> new org.ovirt.engine.core.common.businessentities.BusinessEntityMap < > ( java.util.Arrays.asList ( first , second ) ) ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc sendHcCmdToDesktop ( java.lang.String vmId , java.lang.String hcCommand ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.sendHcCmdToDesktop ( vmId , hcCommand ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc snapshot ( java.lang.String vmId , java.util.Map < java.lang.String , java.lang.String > [ ] disks ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.snapshot ( vmId , disks ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
private void setDataCenterDetails ( ) { org.ovirt.engine.core.common.businessentities.StoragePool dc = org.ovirt.engine.core.bll.storage.AddEmptyStoragePoolCommand.getParameters ( ) . getStoragePool ( ) ; setCompatibilityVersion ( dc.getcompatibility_version ( ) . toString ( ) ) ; setStoragePoolType ( dc.getstorage_pool_type ( ) . name ( ) ) ; setQuotaEnforcementType ( dc.getQuotaEnforcementType ( ) . name ( ) ) ; }

Target:
private void setDataCenterDetails ( ) { org.ovirt.engine.core.common.businessentities.StoragePool dc = org.ovirt.engine.core.bll.storage.AddEmptyStoragePoolCommand.getParameters ( ) . getStoragePool ( ) ; setCompatibilityVersion ( dc.getcompatibility_version ( ) . toString ( ) ) ; setStoragePoolType ( dc.getStorageType ( ) . name ( ) ) ; setQuotaEnforcementType ( dc.getQuotaEnforcementType ( ) . name ( ) ) ; }
Source:
protected void build ( org.ovirt.engine.core.common.businessentities.VmBase vm , org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel model ) { model.getName ( ) . setEntity ( vm.getName ( ) ) ; model.getDescription ( ) . setEntity ( vm.getDescription ( ) ) ; }

Target:
protected void build ( org.ovirt.engine.core.common.businessentities.VmBase vm , org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel model ) { model.getName ( ) . setEntity ( vm.getName ( ) ) ; model.getDescription ( ) . setEntity ( vm.getDescription ( ) ) ; model.getVmId ( ) . setEntity ( vm.getId ( ) . toString ( ) ) ; }
Source:
private void runOnce ( ) { org.ovirt.engine.core.common.businessentities.VM vm = org.ovirt.engine.ui.uicommonweb.models.vms.VmListModel.getSelectedItem ( ) ; org.ovirt.engine.ui.frontend.AsyncQuery getVmInitQuery = new org.ovirt.engine.ui.frontend.AsyncQuery ( ) ; getVmInitQuery.asyncCallback = new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object result ) { org.ovirt.engine.ui.uicommonweb.models.vms.RunOnceModel runOnceModel = new org.ovirt.engine.ui.uicommonweb.models.vms.WebadminRunOnceModel ( ( ( org.ovirt.engine.core.common.businessentities.VM ) ( result ) ) , org.ovirt.engine.ui.uicommonweb.models.vms.VmListModel.this ) ; setWindow ( runOnceModel ) ; runOnceModel.init ( ) ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getVmById ( getVmInitQuery , vm.getId ( ) ) ; }

Target:
private void runOnce ( ) { org.ovirt.engine.core.common.businessentities.VM vm = org.ovirt.engine.ui.uicommonweb.models.vms.VmListModel.getSelectedItem ( ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getVmById ( new org.ovirt.engine.ui.uicommonweb.models.vms.AsyncQuery ( new org.ovirt.engine.ui.frontend.AsyncCallback < org.ovirt.engine.core.common.businessentities.VM > ( ) { @ java.lang.Override public void onSuccess ( org.ovirt.engine.core.common.businessentities.VM result ) { org.ovirt.engine.ui.uicommonweb.models.vms.RunOnceModel runOnceModel = new org.ovirt.engine.ui.uicommonweb.models.vms.WebadminRunOnceModel ( result , org.ovirt.engine.ui.uicommonweb.models.vms.VmListModel.this ) ; setWindow ( runOnceModel ) ; runOnceModel.init ( ) ; } } ) , vm.getId ( ) ) ; }
Source:
private void getVmsFromExportDomain ( org.ovirt.engine.core.compat.Guid dataCenterId , org.ovirt.engine.core.compat.Guid storageDomainId ) { org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmsFromExportDomain , new org.ovirt.engine.core.common.queries.GetAllFromExportDomainQueryParameters ( dataCenterId , storageDomainId ) , new org.ovirt.engine.ui.frontend.AsyncQuery ( this , createGetVmsFromExportDomainCallback ( ) ) ) ; }

Target:
public void loadVmsFromExportDomain ( ) { startProgress ( null ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmsFromExportDomain , new org.ovirt.engine.core.common.queries.GetAllFromExportDomainQueryParameters ( getDataCenters ( ) . getSelectedItem ( ) . getId ( ) , exportDomain.getId ( ) ) , 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 ) { updateVms ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . < java.util.List < org.ovirt.engine.core.common.businessentities.VM > > getReturnValue ( ) ) ; } } ) ) ; }
Source:
protected void doTestBadAdd ( boolean canDo , boolean success , java.lang.String detail ) throws java.lang.Exception { setUpGetEntityExpectations ( VdcQueryType.GetVmByVmId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ 1 ] } , setUpVm ( GUIDS [ 1 ] ) ) ; setUpGetConsoleExpectations ( new int [ ] { 0 } ) ; setUpGetSoundcardExpectations ( new int [ ] { 0 } ) ; super . doTestBadAdd ( canDo , success , detail ) ; }

Target:
protected void doTestBadAdd ( boolean valid , boolean success , java.lang.String detail ) throws java.lang.Exception { setUpGetEntityExpectations ( VdcQueryType.GetVmByVmId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ 1 ] } , setUpVm ( GUIDS [ 1 ] ) ) ; setUpGetConsoleExpectations ( new int [ ] { 0 } ) ; setUpGetSoundcardExpectations ( new int [ ] { 0 } ) ; super . doTestBadAdd ( valid , success , detail ) ; }
Source:
private javax.ws.rs.core.Response copy ( org.ovirt.engine.api.model.Action action ) { org.ovirt.engine.core.common.action.gluster.GlusterHookManageParameters params = new org.ovirt.engine.core.common.action.gluster.GlusterHookManageParameters ( guid ) ; if ( action.isSetHost ( ) ) { validateParameters ( action.getHost ( ) , "host.id|name" ) ; org.ovirt.engine.core.compat.Guid hostId = getHostId ( action ) ; params.setSourceServerId ( hostId ) ; } return doAction ( VdcActionType.UpdateGlusterHook , params , action ) ; }

Target:
private javax.ws.rs.core.Response copy ( org.ovirt.engine.api.model.Action action ) { org.ovirt.engine.core.common.action.gluster.GlusterHookManageParameters params = new org.ovirt.engine.core.common.action.gluster.GlusterHookManageParameters ( guid ) ; if ( action.isSetHost ( ) ) { validateParameters ( action.getHost ( ) , "id|name" ) ; org.ovirt.engine.core.compat.Guid hostId = getHostId ( action ) ; params.setSourceServerId ( hostId ) ; } return doAction ( VdcActionType.UpdateGlusterHook , params , action ) ; }
Source:
public void testUpdateIfNeeded ( ) { org.ovirt.engine.core.common.businessentities.VdsDynamic before = dao.get ( existingVds.getId ( ) ) ; before.setStatus ( VDSStatus.Down ) ; dao.updateIfNeeded ( before ) ; org.ovirt.engine.core.common.businessentities.VdsDynamic after = dao.get ( existingVds.getId ( ) ) ; org.junit.Assert.assertEquals ( before , after ) ; }

Target:
public void testRemove ( ) { dao.remove ( existingVds.getId ( ) ) ; statisticsDao.remove ( existingVds.getId ( ) ) ; staticDao.remove ( existingVds.getId ( ) ) ; org.ovirt.engine.core.common.businessentities.VdsStatic resultStatic = staticDao.get ( existingVds.getId ( ) ) ; org.junit.Assert.assertNull ( resultStatic ) ; org.ovirt.engine.core.common.businessentities.VdsDynamic resultDynamic = dao.get ( existingVds.getId ( ) ) ; org.junit.Assert.assertNull ( resultDynamic ) ; }
Source:
public int hashCode ( ) { return java.util.Objects.hash ( id , _lunConnections , lunMapping , physicalVolumeId , deviceSize , pvSize , lunType , pathsDictionary , pathsCapacity , vendorName , productId , serial , vendorId , volumeGroupId , status , diskId , diskAlias , storageDomainId , storageDomainName ) ; }

Target:
public int hashCode ( ) { return java.util.Objects.hash ( id , _lunConnections , lunMapping , physicalVolumeId , deviceSize , pvSize , discardMaxSize , discardZeroesData , lunType , pathsDictionary , pathsCapacity , vendorName , productId , serial , vendorId , volumeGroupId , status , diskId , diskAlias , storageDomainId , storageDomainName ) ; }
Source:
private boolean removeHibernationVolumes ( ) { org.ovirt.engine.core.bll.StopVmCommandBase.setVm ( null ) ; final org.ovirt.engine.core.common.businessentities.VMStatus vmStatus = org.ovirt.engine.core.bll.StopVmCommandBase.getVm ( ) . getStatus ( ) ; if ( vmStatus == ( org.ovirt.engine.core.common.businessentities.VMStatus.ImageLocked ) ) { return false ; } updateVmStatus ( VMStatus.ImageLocked ) ; if ( ! ( removeMemoryVolumes ( org.ovirt.engine.core.bll.StopVmCommandBase.getVm ( ) . getHibernationVolHandle ( ) , org.ovirt.engine.core.bll.StopVmCommandBase.getActionType ( ) , false ) ) ) { updateVmStatus ( vmStatus ) ; return false ; } return true ; }

Target:
private boolean stopSuspendedVm ( ) { org.ovirt.engine.core.bll.StopVmCommandBase.setVm ( null ) ; final org.ovirt.engine.core.common.businessentities.VMStatus vmStatus = org.ovirt.engine.core.bll.StopVmCommandBase.getVm ( ) . getStatus ( ) ; if ( vmStatus == ( org.ovirt.engine.core.common.businessentities.VMStatus.ImageLocked ) ) { return false ; } updateVmStatus ( VMStatus.ImageLocked ) ; if ( ! ( removeVmHibernationVolumes ( ) ) ) { updateVmStatus ( vmStatus ) ; return false ; } return true ; }
Source:
protected void onExecute ( ) { super . onExecute ( ) ; java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > parameters = getParameters ( ) ; if ( parameters.isEmpty ( ) ) { cancel ( ) ; return ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runMultipleAction ( getActionType ( ) , parameters , new org.ovirt.engine.ui.uicompat.IFrontendMultipleActionAsyncCallback ( ) { @ java.lang.Override public void executed ( org.ovirt.engine.ui.uicompat.FrontendMultipleActionAsyncResult result ) { org.ovirt.engine.ui.uicommonweb.models.templates.CopyDiskModel localModel = ( ( org.ovirt.engine.ui.uicommonweb.models.templates.CopyDiskModel ) ( result.getState ( ) ) ) ; localModel.cancel ( ) ; } } , this ) ; }

Target:
protected void doExecute ( ) { super . doExecute ( ) ; java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > parameters = getParameters ( ) ; if ( parameters.isEmpty ( ) ) { cancel ( ) ; return ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runMultipleAction ( getActionType ( ) , parameters , new org.ovirt.engine.ui.uicompat.IFrontendMultipleActionAsyncCallback ( ) { @ java.lang.Override public void executed ( org.ovirt.engine.ui.uicompat.FrontendMultipleActionAsyncResult result ) { org.ovirt.engine.ui.uicommonweb.models.templates.CopyDiskModel localModel = ( ( org.ovirt.engine.ui.uicommonweb.models.templates.CopyDiskModel ) ( result.getState ( ) ) ) ; localModel.cancel ( ) ; } } , this ) ; }
Source:
public static void IsCustomPropertiesAvailable ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String version ) { 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.Boolean ) ( source ) ) . booleanValue ( ) : true ; } } ; org.ovirt.engine.core.common.queries.GetConfigurationValueParameters tempVar = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.SupportCustomProperties ) ; tempVar.setVersion ( version ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( tempVar , aQuery ) ; }

Target:
public static java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmOsType > GetWindowsOsTypes ( ) { if ( ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.windowsOsTypes ) != null ) { return org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.windowsOsTypes ; } org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.windowsOsTypes = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmOsType > ( ) ; for ( org.ovirt.engine.core.common.businessentities.VmOsType type : org.ovirt.engine.core.common.businessentities.VmOsType.values ( ) ) { if ( type.isWindows ( ) ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.windowsOsTypes.add ( type ) ; } } return org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.windowsOsTypes ; }
Source:
public void testValidateVmUpHostCapable ( ) { prepareForVmValidatorTests ( ) ; org.mockito.Mockito.doReturn ( ValidationResult.VALID ) . when ( snapshotValidator ) . vmSnapshotDisksNotDuringMerge ( org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.compat.Guid.class ) , org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ; cmd.getVm ( ) . setStatus ( VMStatus.Up ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateSuccess ( cmd ) ; }

Target:
public void testValidateVmDown ( ) { prepareForVmValidatorTests ( ) ; org.mockito.Mockito.doReturn ( ValidationResult.VALID ) . when ( snapshotValidator ) . vmSnapshotDisksNotDuringMerge ( org.mockito.ArgumentMatchers.any ( ) , org.mockito.ArgumentMatchers.any ( ) ) ; cmd.getVm ( ) . setStatus ( VMStatus.Down ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateSuccess ( cmd ) ; }
Source:
public static void GetSANWipeAfterDelete ( 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.Boolean ) ( source ) ) . booleanValue ( ) : false ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.SANWipeAfterDelete , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public static void getGlusterHooks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetGlusterHooks , new org.ovirt.engine.core.common.queries.gluster.GlusterParameters ( clusterId ) , aQuery ) ; }
Source:
protected void init ( ) { setVmName ( org.ovirt.engine.core.bll.ConvertVmCommand.getParameters ( ) . getVmName ( ) ) ; setVdsId ( org.ovirt.engine.core.bll.ConvertVmCommand.getParameters ( ) . getProxyHostId ( ) ) ; setVdsGroupId ( org.ovirt.engine.core.bll.ConvertVmCommand.getParameters ( ) . getVdsGroupId ( ) ) ; setStoragePoolId ( org.ovirt.engine.core.bll.ConvertVmCommand.getParameters ( ) . getStoragePoolId ( ) ) ; setStorageDomainId ( org.ovirt.engine.core.bll.ConvertVmCommand.getParameters ( ) . getStorageDomainId ( ) ) ; }

Target:
protected void init ( ) { super . init ( ) ; setVmName ( org.ovirt.engine.core.bll.ConvertVmCommand.getParameters ( ) . getVmName ( ) ) ; setVdsId ( org.ovirt.engine.core.bll.ConvertVmCommand.getParameters ( ) . getProxyHostId ( ) ) ; setClusterId ( org.ovirt.engine.core.bll.ConvertVmCommand.getParameters ( ) . getClusterId ( ) ) ; setStoragePoolId ( org.ovirt.engine.core.bll.ConvertVmCommand.getParameters ( ) . getStoragePoolId ( ) ) ; setStorageDomainId ( org.ovirt.engine.core.bll.ConvertVmCommand.getParameters ( ) . getStorageDomainId ( ) ) ; }
Source:
protected java.util.Map < java.lang.String , org.ovirt.engine.core.common.utils.Pair < java.lang.String , java.lang.String > > getSharedLocks ( ) { if ( isTemplateVersion ( ) ) { return java.util.Collections.singletonMap ( org.ovirt.engine.core.bll.AddVmTemplateCommand.getParameters ( ) . getBaseTemplateId ( ) . toString ( ) , org.ovirt.engine.core.bll.LockMessagesMatchUtil.makeLockingPair ( LockingGroup.TEMPLATE , VdcBllMessages.ACTION_TYPE_FAILED_OBJECT_LOCKED ) ) ; } return super . getSharedLocks ( ) ; }

Target:
protected java.util.Map < java.lang.String , org.ovirt.engine.core.common.utils.Pair < java.lang.String , java.lang.String > > getSharedLocks ( ) { if ( isTemplateVersion ( ) ) { return java.util.Collections.singletonMap ( org.ovirt.engine.core.bll.AddVmTemplateCommand.getParameters ( ) . getBaseTemplateId ( ) . toString ( ) , org.ovirt.engine.core.bll.LockMessagesMatchUtil.makeLockingPair ( LockingGroup.TEMPLATE , EngineMessage.ACTION_TYPE_FAILED_OBJECT_LOCKED ) ) ; } return super . getSharedLocks ( ) ; }
Source:
public static org.ovirt.engine.api.model.CPU map ( org.ovirt.engine.core.common.businessentities.ServerCpu entity , org.ovirt.engine.api.model.CPU template ) { org.ovirt.engine.api.model.CPU model = ( template != null ) ? template : new org.ovirt.engine.api.model.CPU ( ) ; model.setName ( entity.getCpuName ( ) ) ; model.setLevel ( entity.getLevel ( ) ) ; model.setArchitecture ( org.ovirt.engine.api.restapi.types.CPUMapper.map ( entity.getArchitecture ( ) , null ) ) ; return model ; }

Target:
public static org.ovirt.engine.api.model.Cpu map ( org.ovirt.engine.core.common.businessentities.ServerCpu entity , org.ovirt.engine.api.model.Cpu template ) { org.ovirt.engine.api.model.Cpu model = ( template != null ) ? template : new org.ovirt.engine.api.model.Cpu ( ) ; model.setName ( entity.getCpuName ( ) ) ; model.setLevel ( entity.getLevel ( ) ) ; model.setArchitecture ( org.ovirt.engine.api.restapi.types.CPUMapper.map ( entity.getArchitecture ( ) , null ) ) ; return model ; }