auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void canDoActionLunsNotPartOfStorageDomain ( ) { java.util.List lunsFromDb = new java.util.ArrayList < > ( ) ; org.ovirt.engine.core.common.businessentities.storage.LUNs lun1 = new org.ovirt.engine.core.common.businessentities.storage.LUNs ( ) ; lun1.setLUNId ( "111" ) ; lun1.setStorageDomainId ( sdId ) ; org.ovirt.engine.core.common.businessentities.storage.LUNs lun2 = new org.ovirt.engine.core.common.businessentities.storage.LUNs ( ) ; lun2.setLUNId ( "222" ) ; lun2.setStorageDomainId ( sdId ) ; lunsFromDb.add ( lun1 ) ; lunsFromDb.add ( lun2 ) ; org.mockito.Mockito.when ( lunsDao.getAllForVolumeGroup ( org.ovirt.engine.core.bll.storage.domain.RefreshLunsSizeCommandTest.STORAGE ) ) . thenReturn ( lunsFromDb ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( cmd , EngineMessage.ACTION_TYPE_FAILED_LUNS_NOT_PART_OF_STORAGE_DOMAIN ) ; }

Target:
public void validateLunsNotPartOfStorageDomain ( ) { java.util.List lunsFromDb = new java.util.ArrayList < > ( ) ; org.ovirt.engine.core.common.businessentities.storage.LUNs lun1 = new org.ovirt.engine.core.common.businessentities.storage.LUNs ( ) ; lun1.setLUNId ( "111" ) ; lun1.setStorageDomainId ( sdId ) ; org.ovirt.engine.core.common.businessentities.storage.LUNs lun2 = new org.ovirt.engine.core.common.businessentities.storage.LUNs ( ) ; lun2.setLUNId ( "222" ) ; lun2.setStorageDomainId ( sdId ) ; lunsFromDb.add ( lun1 ) ; lunsFromDb.add ( lun2 ) ; org.mockito.Mockito.when ( lunsDao.getAllForVolumeGroup ( org.ovirt.engine.core.bll.storage.domain.RefreshLunsSizeCommandTest.STORAGE ) ) . thenReturn ( lunsFromDb ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( cmd , EngineMessage.ACTION_TYPE_FAILED_LUNS_NOT_PART_OF_STORAGE_DOMAIN ) ; }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < ? extends org.ovirt.engine.ui.uicompat.EventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { setNetworkStaticDetailsStyle ( ( ( ( model.getIpv4BootProtocolList ( ) . getSelectedItem ( ) ) != null ) && ( ( model.getIpv4BootProtocolList ( ) . getSelectedItem ( ) ) == ( org.ovirt.engine.core.common.businessentities.network.Ipv4BootProtocol.STATIC_IP ) ) ) ) ; }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < ? extends org.ovirt.engine.ui.uicompat.EventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { setNetworkIpv4StaticDetailsStyle ( ( ( ( model.getIpv4BootProtocolList ( ) . getSelectedItem ( ) ) != null ) && ( ( model.getIpv4BootProtocolList ( ) . getSelectedItem ( ) ) == ( org.ovirt.engine.core.common.businessentities.network.Ipv4BootProtocol.STATIC_IP ) ) ) ) ; }
Source:
private void updateVmStatistics ( ) { if ( getVdsManager ( ) . getRefreshStatistics ( ) ) { dbVm.updateRunTimeStatisticsData ( vdsmVm.getVmStatistics ( ) , dbVm ) ; saveStatistics ( ) ; saveVmInterfaces ( ) ; updateInterfaceStatistics ( ) ; updateVmNumaNodeRuntimeInfo ( ) ; for ( org.ovirt.engine.core.common.businessentities.storage.DiskImageDynamic diskImageDynamic : vdsmVm.getVmDynamic ( ) . getDisks ( ) ) { vmsMonitoring.addDiskImageDynamicToSave ( new org.ovirt.engine.core.common.utils.Pair ( dbVm.getId ( ) , diskImageDynamic ) ) ; } } }

Target:
private void updateVmStatistics ( ) { if ( vmsMonitoring.isTimeToUpdateVmStatistics ( ) ) { dbVm.updateRunTimeStatisticsData ( vdsmVm.getVmStatistics ( ) , dbVm ) ; saveStatistics ( ) ; saveVmInterfaces ( ) ; updateInterfaceStatistics ( ) ; updateVmNumaNodeRuntimeInfo ( ) ; for ( org.ovirt.engine.core.common.businessentities.storage.DiskImageDynamic diskImageDynamic : vdsmVm.getVmDynamic ( ) . getDisks ( ) ) { vmsMonitoring.addDiskImageDynamicToSave ( new org.ovirt.engine.core.common.utils.Pair ( dbVm.getId ( ) , diskImageDynamic ) ) ; } } }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc glusterVolumeSnapshotCreate ( java.lang.String volumeName , java.lang.String snapshotName , java.lang.String description , boolean force ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "GlusterSnapshot.volumeSnapshotCreate" ) . withOptionalParameter ( "volumeName" , volumeName ) . withParameter ( "snapName" , snapshotName ) . withParameter ( "description" , description ) . withParameter ( "force" , force ) . 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.vdsbroker.StatusOnlyReturnForXmlRpc glusterVolumeGeoRepSessionPause ( java.lang.String masterVolumeName , java.lang.String slaveHost , java.lang.String slaveVolumeName , boolean force ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "GlusterVolume.geoRepSessionPause" ) . withParameter ( "volumeName" , masterVolumeName ) . withParameter ( "remoteHost" , slaveHost ) . withParameter ( "remoteVolumeName" , slaveVolumeName ) . withParameter ( "force" , force ) . 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 ) ; }
Source:
protected boolean isImageIsNotLocked ( ) { if ( ( org.ovirt.engine.core.bll.MoveOrCopyDiskCommand.getImage ( ) . getimageStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.ImageStatus.LOCKED ) ) { if ( ( org.ovirt.engine.core.bll.MoveOrCopyDiskCommand.getParameters ( ) . getOperation ( ) ) == ( org.ovirt.engine.core.common.businessentities.ImageOperation.Move ) ) { addCanDoActionMessage ( VdcBllMessages.ACTION_TYPE_FAILED_VM_IMAGE_IS_LOCKED ) ; } else { addCanDoActionMessage ( VdcBllMessages.VM_TEMPLATE_IMAGE_IS_LOCKED ) ; } return false ; } return true ; }

Target:
protected boolean isImageIsNotLocked ( ) { if ( ( org.ovirt.engine.core.bll.MoveOrCopyDiskCommand.getImage ( ) . getimageStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.ImageStatus.LOCKED ) ) { if ( ( org.ovirt.engine.core.bll.MoveOrCopyDiskCommand.getParameters ( ) . getOperation ( ) ) == ( org.ovirt.engine.core.common.businessentities.ImageOperation.Move ) ) { addCanDoActionMessage ( VdcBllMessages.ACTION_TYPE_FAILED_DISKS_ARE_LOCKED ) ; } else { addCanDoActionMessage ( VdcBllMessages.VM_TEMPLATE_IMAGE_IS_LOCKED ) ; } return false ; } return true ; }
Source:
public void canDoActionPreallocatedSpaceCheckFailsSize ( ) { final int availableSize = 3 ; final int usedSize = 7 ; org.ovirt.engine.core.compat.Guid sdid = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; initializeCommand ( sdid , VolumeType.Preallocated ) ; mockVm ( ) ; mockStorageDomain ( sdid , availableSize , usedSize ) ; mockStoragePoolIsoMap ( ) ; org.junit.Assert.assertFalse ( command.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( VdcBllMessages.ACTION_TYPE_FAILED_DISK_SPACE_LOW_ON_TARGET_STORAGE_DOMAIN.toString ( ) ) ) ; }

Target:
public void canDoActionSpaceValidationFails ( ) { org.ovirt.engine.core.compat.Guid storageId = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; initializeCommand ( storageId , VolumeType.Sparse ) ; mockVm ( ) ; mockStorageDomain ( storageId ) ; mockStoragePoolIsoMap ( ) ; org.mockito.Mockito.doReturn ( org.ovirt.engine.core.bll.AddDiskToVmCommandTest.mockStorageDomainValidatorWithoutSpace ( ) ) . when ( command ) . createStorageDomainValidator ( ) ; org.junit.Assert.assertFalse ( command.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( VdcBllMessages.ACTION_TYPE_FAILED_DISK_SPACE_LOW_ON_TARGET_STORAGE_DOMAIN.toString ( ) ) ) ; }
Source:
public void testGet ( ) throws java.lang.Exception { setUpGetStorageDomainExpectations ( StorageDomainType.ImportExport ) ; setUpGetEntityExpectations ( StorageDomainType.ImportExport , org.ovirt.engine.api.restapi.resource.BackendExportDomainDiskResourceTest.STORAGE_DOMAIN_ID ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; org.ovirt.engine.api.model.Disk disk = resource.get ( ) ; assertNotNull ( disk ) ; assertEquals ( disk.getId ( ) , org.ovirt.engine.api.restapi.resource.BackendExportDomainDiskResourceTest.DISK_ID.toString ( ) ) ; }

Target:
public void testGet ( ) throws java.lang.Exception { setUpGetStorageDomainExpectations ( StorageDomainType.ImportExport ) ; setUpGetEntityExpectations ( StorageDomainType.ImportExport , org.ovirt.engine.api.restapi.resource.BackendExportDomainDiskResourceTest.STORAGE_DOMAIN_ID ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; org.ovirt.engine.api.model.Disk disk = resource.get ( ) ; org.junit.Assert.assertNotNull ( disk ) ; org.junit.Assert.assertEquals ( disk.getId ( ) , org.ovirt.engine.api.restapi.resource.BackendExportDomainDiskResourceTest.DISK_ID.toString ( ) ) ; }
Source:
public void setIsRoleListHidden ( boolean value ) { if ( ( isRoleListHidden ) != value ) { isRoleListHidden = value ; OnPropertyChanged ( new org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ( "IsRoleListHidden" ) ) ; } if ( ( getIsRoleListHiddenModel ( ) ) != null ) { getIsRoleListHiddenModel ( ) . setEntity ( value ) ; } }

Target:
public void setIsRoleListHidden ( boolean value ) { if ( ( isRoleListHidden ) != value ) { isRoleListHidden = value ; onPropertyChanged ( new org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ( "IsRoleListHidden" ) ) ; } if ( ( getIsRoleListHiddenModel ( ) ) != null ) { getIsRoleListHiddenModel ( ) . setEntity ( value ) ; } }
Source:
protected org.ovirt.engine.core.common.vdscommands.VDSReturnValue getStatsForDomain ( ) { return runVdsCommand ( VDSCommandType.GetStorageDomainStats , new org.ovirt.engine.core.common.vdscommands.GetStorageDomainStatsVDSCommandParameters ( org.ovirt.engine.core.bll.storage.UpdateStorageServerConnectionCommand.getVds ( ) . getId ( ) , org.ovirt.engine.core.bll.storage.UpdateStorageServerConnectionCommand.getStorageDomain ( ) . getId ( ) ) ) ; }

Target:
public java.lang.Void runInTransaction ( ) { for ( org.ovirt.engine.core.common.businessentities.StorageDomain domain : domains ) { org.ovirt.engine.core.common.businessentities.StoragePoolIsoMap map = getStoragePoolIsoMap ( domain ) ; org.ovirt.engine.core.bll.context.CompensationContext context = getCompensationContext ( ) ; context.snapshotEntityStatus ( map , map.getstatus ( ) ) ; updateStatus ( map , status ) ; getCompensationContext ( ) . stateChanged ( ) ; } return null ; }
Source:
private org.ovirt.engine.core.bll.provider.network.NetworkProviderProxy getProviderProxy ( ) { if ( ( providerProxy ) == null ) { org.ovirt.engine.core.common.businessentities.Provider < ? > provider = providerDao.get ( getNetwork ( ) . getProvidedBy ( ) . getProviderId ( ) ) ; providerProxy = providerProxyFactory.create ( provider ) ; } return providerProxy ; }

Target:
private org.ovirt.engine.core.common.businessentities.Provider < ? > getProvider ( ) { if ( ( provider ) == null ) { org.ovirt.engine.core.common.businessentities.network.Network network = getNetwork ( ) ; if ( ( network != null ) && ( network.isExternal ( ) ) ) { provider = providerDao.get ( network.getProvidedBy ( ) . getProviderId ( ) ) ; } } return provider ; }
Source:
public static void getHostsForStorageOperation ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , boolean localFsOnly ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { return source ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetHostsForStorageOperation , new org.ovirt.engine.core.common.queries.GetHostsForStorageOperationParameters ( storagePoolId , localFsOnly ) , aQuery ) ; }

Target:
public static void getHostPublicKey ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetServerSSHPublicKey , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }
Source:
void localize ( org.ovirt.engine.ui.webadmin.ApplicationConstants constants ) { pathLabel.setText ( constants.storagePopupPosixPathLabel ( ) ) ; pathHintLabel.setText ( constants.storagePopupPosixPathHintLabel ( ) ) ; vfsTypeLabel.setText ( constants.storagePopupVfsTypeLabel ( ) ) ; mountOptionsLabel.setText ( constants.storagePopupMountOptionsLabel ( ) ) ; nfsPosixAlertIcon.setTitle ( constants.storagePopupPosixNfsWarningLabel ( ) ) ; }

Target:
void localize ( ) { pathLabel.setText ( org.ovirt.engine.ui.webadmin.section.main.view.popup.storage.PosixStorageView.constants.storagePopupPosixPathLabel ( ) ) ; pathHintLabel.setText ( org.ovirt.engine.ui.webadmin.section.main.view.popup.storage.PosixStorageView.constants.storagePopupPosixPathHintLabel ( ) ) ; vfsTypeLabel.setText ( org.ovirt.engine.ui.webadmin.section.main.view.popup.storage.PosixStorageView.constants.storagePopupVfsTypeLabel ( ) ) ; mountOptionsLabel.setText ( org.ovirt.engine.ui.webadmin.section.main.view.popup.storage.PosixStorageView.constants.storagePopupMountOptionsLabel ( ) ) ; nfsPosixAlertIcon.setTitle ( org.ovirt.engine.ui.webadmin.section.main.view.popup.storage.PosixStorageView.constants.storagePopupPosixNfsWarningLabel ( ) ) ; }
Source:
protected void setActionMessageParameters ( ) { super . setActionMessageParameters ( ) ; addCanDoActionMessage ( VdcBllMessages.VAR__ACTION__UPDATE ) ; }

Target:
protected boolean canDoAction ( ) { if ( ! ( super . canDoAction ( ) ) ) { return false ; } oldPool = org.ovirt.engine.core.bll.UpdateVmPoolWithVmsCommand.getVmPoolDao ( ) . get ( org.ovirt.engine.core.bll.UpdateVmPoolWithVmsCommand.getVmPool ( ) . getVmPoolId ( ) ) ; if ( ( oldPool ) == null ) { return failCanDoAction ( EngineMessage.VM_POOL_CANNOT_UPDATE_POOL_NOT_FOUND ) ; } if ( ( org.ovirt.engine.core.bll.UpdateVmPoolWithVmsCommand.getParameters ( ) . getVmsCount ( ) ) < 0 ) { return failCanDoAction ( EngineMessage.VM_POOL_CANNOT_DECREASE_VMS_FROM_POOL ) ; } return true ; }
Source:
public static < TSource > java.util.ArrayList < TSource > Distinct ( java.util.ArrayList < TSource > source , org.ovirt.engine.ui.uicompat.IEqualityComparer < TSource > comparer ) { java.util.ArrayList < TSource > list = new java.util.ArrayList < TSource > ( ) ; for ( TSource a : source ) { boolean found = false ; for ( TSource b : list ) { if ( comparer.equals ( a , b ) ) { found = true ; break ; } } if ( ! found ) { list.add ( a ) ; } } return list ; }

Target:
public static < TSource > java.util.ArrayList < TSource > distinct ( java.util.ArrayList < TSource > source , org.ovirt.engine.ui.uicompat.IEqualityComparer < TSource > comparer ) { java.util.ArrayList < TSource > list = new java.util.ArrayList < TSource > ( ) ; for ( TSource a : source ) { boolean found = false ; for ( TSource b : list ) { if ( comparer.equals ( a , b ) ) { found = true ; break ; } } if ( ! found ) { list.add ( a ) ; } } return list ; }
Source:
private void domainRecoveredFromProblem ( org.ovirt.engine.core.compat.Guid domainId , org.ovirt.engine.core.compat.Guid vdsId , java.lang.String vdsName ) { java.lang.String domainIdTuple = org.ovirt.engine.core.vdsbroker.irsbroker.IrsProxyData.getDomainIdTuple ( domainId ) ; org.ovirt.engine.core.vdsbroker.irsbroker.IrsProxyData.log.infoFormat ( "Domain {0} recovered from problem. vds: {1}" , domainIdTuple , vdsName ) ; _domainsInProblem.get ( domainId ) . remove ( vdsId ) ; if ( ( _domainsInProblem.get ( domainId ) . size ( ) ) == 0 ) { org.ovirt.engine.core.vdsbroker.irsbroker.IrsProxyData.log.infoFormat ( ( "Domain {0} has recovered from problem. No active host in the DC is reporting it as" + " problematic, so clearing the domain recovery timer." ) , domainIdTuple ) ; _domainsInProblem.remove ( domainId ) ; clearTimer ( domainId ) ; } }

Target:
private void domainRecoveredFromProblem ( org.ovirt.engine.core.compat.Guid domainId , org.ovirt.engine.core.compat.Guid vdsId , java.lang.String vdsName ) { java.lang.String domainIdTuple = org.ovirt.engine.core.vdsbroker.irsbroker.IrsProxyData.getDomainIdTuple ( domainId ) ; org.ovirt.engine.core.vdsbroker.irsbroker.IrsProxyData.log.info ( "Domain '{}' recovered from problem. vds: '{}'" , domainIdTuple , vdsName ) ; _domainsInProblem.get ( domainId ) . remove ( vdsId ) ; if ( ( _domainsInProblem.get ( domainId ) . size ( ) ) == 0 ) { org.ovirt.engine.core.vdsbroker.irsbroker.IrsProxyData.log.info ( ( "Domain '{}' has recovered from problem. No active host in the DC is reporting it as" + " problematic, so clearing the domain recovery timer." ) , domainIdTuple ) ; _domainsInProblem.remove ( domainId ) ; clearTimer ( domainId ) ; } }
Source:
public static void GetDocumentationBaseURL ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.DocsURL , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public static void GetNextAvailableDiskAliasNameByVMId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetNextAvailableDiskAliasNameByVMId , new org.ovirt.engine.core.common.queries.GetAllDisksByVmIdParameters ( vmId ) , aQuery ) ; }
Source:
public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ServerCpu > cpuList = org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.ServerCpu > cast ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ServerCpu > ) ( source ) ) ) ; return cpuList ; } return null ; }

Target:
public java.util.Set < T > convert ( java.lang.Object source ) { return source != null ? ( ( java.util.Set < T > ) ( source ) ) : new java.util.HashSet < T > ( ) ; }
Source:
protected void disconnectFromStorage ( ) { org.ovirt.engine.core.common.vdscommands.ConnectStorageServerVDSCommandParameters connectionParametersForVdsm = createParametersForVdsm ( org.ovirt.engine.core.bll.storage.UpdateStorageServerConnectionCommand.getParameters ( ) . getVdsId ( ) , org.ovirt.engine.core.bll.storage.UpdateStorageServerConnectionCommand.getParameters ( ) . getStoragePoolId ( ) , org.ovirt.engine.core.bll.storage.UpdateStorageServerConnectionCommand.getParameters ( ) . getStorageServerConnection ( ) . getstorage_type ( ) , org.ovirt.engine.core.bll.storage.UpdateStorageServerConnectionCommand.getParameters ( ) . getStorageServerConnection ( ) ) ; boolean isDisconnectSucceeded = runVdsCommand ( VDSCommandType.DisconnectStorageServer , connectionParametersForVdsm ) . getSucceeded ( ) ; if ( ! isDisconnectSucceeded ) { log.warn ( ( "Failed to disconnect storage connection " + ( org.ovirt.engine.core.bll.storage.UpdateStorageServerConnectionCommand.getParameters ( ) . getStorageServerConnection ( ) ) ) ) ; } }

Target:
protected boolean connectToStorage ( ) { org.ovirt.engine.core.common.vdscommands.StorageServerConnectionManagementVDSParameters newConnectionParametersForVdsm = createParametersForVdsm ( org.ovirt.engine.core.bll.storage.UpdateStorageServerConnectionCommand.getParameters ( ) . getVdsId ( ) , org.ovirt.engine.core.bll.storage.UpdateStorageServerConnectionCommand.getParameters ( ) . getStoragePoolId ( ) , org.ovirt.engine.core.bll.storage.UpdateStorageServerConnectionCommand.getParameters ( ) . getStorageServerConnection ( ) . getstorage_type ( ) , org.ovirt.engine.core.bll.storage.UpdateStorageServerConnectionCommand.getParameters ( ) . getStorageServerConnection ( ) ) ; return runVdsCommand ( VDSCommandType.ConnectStorageServer , newConnectionParametersForVdsm ) . getSucceeded ( ) ; }
Source:
protected org.ovirt.engine.api.model.DataCenter deprecatedPopulate ( org.ovirt.engine.api.model.DataCenter model , org.ovirt.engine.core.common.businessentities.StoragePool entity ) { org.ovirt.engine.core.common.queries.IdQueryParameters parameters = new org.ovirt.engine.core.common.queries.IdQueryParameters ( asGuid ( model.getId ( ) ) ) ; model.setSupportedVersions ( getMapper ( java.util.List.class , org.ovirt.engine.api.model.Versions.class ) . map ( getEntity ( java.util.List.class , VdcQueryType.GetAvailableStoragePoolVersions , parameters , model.getId ( ) ) , null ) ) ; return model ; }

Target:
protected org.ovirt.engine.api.model.DataCenter deprecatedPopulate ( org.ovirt.engine.api.model.DataCenter model , org.ovirt.engine.core.common.businessentities.StoragePool entity ) { org.ovirt.engine.core.common.queries.IdQueryParameters parameters = new org.ovirt.engine.core.common.queries.IdQueryParameters ( asGuid ( model.getId ( ) ) ) ; model.setSupportedVersions ( getMapper ( java.util.List.class , org.ovirt.engine.api.model.Versions.class ) . map ( getEntity ( java.util.List.class , QueryType.GetAvailableStoragePoolVersions , parameters , model.getId ( ) ) , null ) ) ; return model ; }
Source:
private void fillReportedConfigurations ( java.util.Map < java.lang.String , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > networkNameToNicMap , org.ovirt.engine.core.common.businessentities.BusinessEntityMap < org.ovirt.engine.core.common.businessentities.network.Network > networkMap , org.ovirt.engine.core.common.businessentities.network.NetworkAttachment networkAttachment ) { org.ovirt.engine.core.common.businessentities.network.Network network = networkMap.get ( networkAttachment.getNetworkId ( ) ) ; org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic = getNicToWhichIsNetworkAttached ( networkNameToNicMap , networkMap , networkAttachment ) ; if ( nic != null ) { org.ovirt.engine.core.common.businessentities.network.ReportedConfigurations reportedConfigurations = createNetworkInSyncWithVdsNetworkInterface ( networkAttachment , nic , network ) . reportConfigurationsOnHost ( ) ; networkAttachment.setReportedConfigurations ( reportedConfigurations ) ; } }

Target:
public void fillReportedConfigurations ( java.util.List < org.ovirt.engine.core.common.businessentities.network.NetworkAttachment > networkAttachments , org.ovirt.engine.core.compat.Guid hostId ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > allInterfacesForHost = interfaceDao.getAllInterfacesForVds ( hostId ) ; org.ovirt.engine.core.compat.Guid clusterId = vdsDao.get ( hostId ) . getClusterId ( ) ; org.ovirt.engine.core.common.businessentities.BusinessEntityMap < org.ovirt.engine.core.common.businessentities.network.Network > networkMap = new org.ovirt.engine.core.common.businessentities.BusinessEntityMap ( networkDao.getAllForCluster ( clusterId ) ) ; fillReportedConfigurations ( allInterfacesForHost , networkMap , networkAttachments , clusterId ) ; }
Source:
public void canDoActionFailedVirtIODisk ( ) throws java.lang.Exception { mockVmStatusUp ( ) ; org.mockito.Mockito.when ( osRepository.hasSpiceSupport ( 0 , Version.v3_1 ) ) . thenReturn ( true ) ; org.mockito.Mockito.when ( osRepository.getOsName ( 0 ) ) . thenReturn ( "RHEL6" ) ; createNotVirtIODisk ( ) ; org.junit.Assert.assertFalse ( command.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( VdcBllMessages.HOT_PLUG_DISK_IS_NOT_VIRTIO.toString ( ) ) ) ; }

Target:
public void canDoActionFailedVirtIODisk ( ) throws java.lang.Exception { mockVmStatusUp ( ) ; mockSpiceSupportMatrix ( ) ; org.mockito.Mockito.when ( osRepository.getOsName ( 0 ) ) . thenReturn ( "RHEL6" ) ; createNotVirtIODisk ( ) ; org.junit.Assert.assertFalse ( command.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( VdcBllMessages.HOT_PLUG_DISK_IS_NOT_VIRTIO.toString ( ) ) ) ; }
Source:
private org.ovirt.engine.core.common.asynctasks.AsyncTaskType internalGetTaskType ( ) { if ( hasTaskHandlers ( ) ) { if ( ( getParameters ( ) . getExecutionReason ( ) ) == ( org.ovirt.engine.core.common.action.VdcActionParametersBase.CommandExecutionReason.REGULAR_FLOW ) ) { return getCurrentTaskHandler ( ) . getTaskType ( ) ; } return getCurrentTaskHandler ( ) . getRevertTaskType ( ) ; } return getTaskType ( ) ; }

Target:
protected java.util.ArrayList < org.ovirt.engine.core.common.action.VdcReturnValueBase > runInternalMultipleActions ( org.ovirt.engine.core.common.action.VdcActionType actionType , java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > parameters , org.ovirt.engine.core.bll.job.ExecutionContext executionContext ) { return getBackend ( ) . runInternalMultipleActions ( actionType , parameters , executionContext ) ; }
Source:
protected void listenOnConsoleModelChangeEvent ( com.google.gwt.event.shared.EventBus eventBus , final org.ovirt.engine.ui.userportal.uicommon.model.basic.UserPortalBasicListProvider modelProvider ) { eventBus.addHandler ( org.ovirt.engine.ui.common.presenter.popup.ConsoleModelChangedEvent.getType ( ) , new org.ovirt.engine.ui.common.presenter.popup.ConsoleModelChangedEvent.ConsoleModelChangedHandler ( ) { @ java.lang.Override public void onConsoleModelChanged ( org.ovirt.engine.ui.common.presenter.popup.ConsoleModelChangedEvent event ) { if ( ( modelProvider.getModel ( ) . getSelectedItem ( ) ) == null ) { return ; } setupConsole ( modelProvider ) ; } } ) ; }

Target:
private void listenOnConsoleConnectAnchor ( final org.ovirt.engine.ui.userportal.uicommon.model.basic.UserPortalBasicListProvider modelProvider ) { registerHandler ( getView ( ) . getConsoleConnectAnchor ( ) . addClickHandler ( new com.google.gwt.event.dom.client.ClickHandler ( ) { @ java.lang.Override public void onClick ( com.google.gwt.event.dom.client.ClickEvent event ) { try { org.ovirt.engine.ui.uicommonweb.models.VmConsoles vmConsoles = modelProvider.getModel ( ) . getSelectedItem ( ) . getVmConsoles ( ) ; if ( vmConsoles.canConnectToConsole ( ) ) { vmConsoles.connect ( ) ; } } catch ( org.ovirt.engine.ui.uicommonweb.models.VmConsoles e ) { errorPopupManager.show ( e.getLocalizedErrorMessage ( ) ) ; } } } ) ) ; }
Source:
public void testDebugFaultDetail ( ) throws java.lang.Exception { setUpLogExpectations ( true ) ; java.lang.Throwable t = new java.lang.Exception ( "snafu" ) ; java.lang.String detail = org.ovirt.engine.api.restapi.resource.AbstractBackendResource.detail ( t ) ; java.io.StringWriter sw = new java.io.StringWriter ( ) ; t.printStackTrace ( new java.io.PrintWriter ( sw , true ) ) ; assertEquals ( sw.toString ( ) , detail ) ; }

Target:
public void testDebugFaultDetail ( ) throws java.lang.Exception { setUpLogExpectations ( true ) ; java.lang.Throwable t = new java.lang.Exception ( "snafu" ) ; java.lang.String detail = org.ovirt.engine.api.restapi.resource.AbstractBackendResource.detail ( t ) ; java.io.StringWriter sw = new java.io.StringWriter ( ) ; t.printStackTrace ( new java.io.PrintWriter ( sw , true ) ) ; org.junit.Assert.assertEquals ( sw.toString ( ) , detail ) ; }
Source:
public void getDataCenterList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , boolean doRefresh ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > ( ) ; } return source ; } } ; org.ovirt.engine.core.common.queries.SearchParameters params = new org.ovirt.engine.core.common.queries.SearchParameters ( "DataCenter: sortby name" , org.ovirt.engine.core.common.interfaces.SearchType.StoragePool ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , ( doRefresh ? params : params.withoutRefresh ( ) ) , aQuery ) ; }

Target:
public void getVmNextRunConfiguration ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmNextRunConfiguration , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }
Source:
void initTable ( ) { getTable ( ) . enableColumnResizing ( ) ; initTableOverhead ( ) ; handleRadioButtonClick ( null ) ; getTable ( ) . addActionButton ( new org.ovirt.engine.ui.webadmin.widget.action.WebAdminButtonDefinition < org.ovirt.engine.core.common.utils.PairQueryable < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface , org.ovirt.engine.core.common.businessentities.VDS > > ( constants.setupHostNetworksInterface ( ) ) { @ java.lang.Override protected org.ovirt.engine.ui.uicommonweb.UICommand resolveCommand ( ) { return getDetailModel ( ) . getSetupNetworksCommand ( ) ; } } ) ; }

Target:
void initTable ( ) { getTable ( ) . enableColumnResizing ( ) ; initTableOverhead ( ) ; handleRadioButtonClick ( null ) ; initSorting ( ) ; getTable ( ) . addActionButton ( new org.ovirt.engine.ui.webadmin.widget.action.WebAdminButtonDefinition < org.ovirt.engine.core.common.utils.PairQueryable < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface , org.ovirt.engine.core.common.businessentities.VDS > > ( constants.setupHostNetworksInterface ( ) ) { @ java.lang.Override protected org.ovirt.engine.ui.uicommonweb.UICommand resolveCommand ( ) { return getDetailModel ( ) . getSetupNetworksCommand ( ) ; } } ) ; }
Source:
private void setSdDiscardSupport ( boolean sdSupportsDiscard , boolean sdDiscardZeroesData ) { storageDomain.setSupportsDiscard ( sdSupportsDiscard ) ; storageDomain.setSupportsDiscardZeroesData ( sdDiscardZeroesData ) ; }

Target:
public void testExistingPassDiscardFunctionalityIsPreservedNoDiskRequiresPassDiscardFunctionality ( ) { storageDomain.setSupportsDiscard ( true ) ; createVmDiskOnSd ( false , false ) ; createVmDiskOnSd ( true , false ) ; org.junit.Assert.assertTrue ( discardHelper.isExistingPassDiscardFunctionalityPreserved ( java.util.Arrays.asList ( createLunWithDiscardSupport ( 0L ) , createLunWithDiscardSupport ( 2048L ) ) , storageDomain ) ) ; }
Source:
private void UpdateActionAvailability ( ) { java.util.List tempVar = getSelectedItems ( ) ; java.util.ArrayList selectedItems = ( ( java.util.ArrayList ) ( ( tempVar != null ) ? tempVar : new java.util.ArrayList ( ) ) ) ; getRemoveCommand ( ) . setIsExecutionAllowed ( ( ( selectedItems.size ( ) ) > 0 ) ) ; }

Target:
private void updateActionAvailability ( ) { java.util.List tempVar = getSelectedItems ( ) ; java.util.List selectedItems = ( tempVar != null ) ? tempVar : new java.util.ArrayList ( ) ; getRemoveCommand ( ) . setIsExecutionAllowed ( ( ( selectedItems.size ( ) ) > 0 ) ) ; }
Source:
public void getNextAvailableDiskAliasNameByVMId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetNextAvailableDiskAliasNameByVMId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }

Target:
public void getDiskList ( 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.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.DiskImage > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.DiskImage > ( ) ; } } ; org.ovirt.engine.core.common.queries.SearchParameters searchParams = new org.ovirt.engine.core.common.queries.SearchParameters ( "Disks:" , org.ovirt.engine.core.common.interfaces.SearchType.Disk ) ; searchParams.setMaxCount ( 9999 ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , searchParams , aQuery ) ; }
Source:
public static void getDocumentationBaseURL ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.DocsURL , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public static void getVmConfigurationBySnapshot ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid snapshotSourceId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( org.ovirt.engine.core.common.businessentities.VM ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmConfigurationBySnapshot , new org.ovirt.engine.core.common.queries.GetVmConfigurationBySnapshotQueryParams ( snapshotSourceId ) , aQuery ) ; }
Source:
protected void mockVmDevice ( boolean plugged ) { vmDevice = new org.ovirt.engine.core.common.businessentities.VmDevice ( ) ; vmDevice.setId ( new org.ovirt.engine.core.common.businessentities.VmDeviceId ( ) ) ; vmDevice.setIsPlugged ( plugged ) ; org.mockito.Mockito.doReturn ( vmDeviceDao ) . when ( command ) . getVmDeviceDao ( ) ; org.mockito.Mockito.when ( vmDeviceDao.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.VmDeviceId.class ) ) ) . thenReturn ( vmDevice ) ; }

Target:
protected org.ovirt.engine.core.common.action.VmDiskOperationParameterBase createParameters ( ) { return new org.ovirt.engine.core.common.action.VmDiskOperationParameterBase ( diskVmElement ) ; }
Source:
private void executeDeactivateCommand ( ) { final org.ovirt.engine.core.common.action.StorageDomainPoolParametersBase params = new org.ovirt.engine.core.common.action.StorageDomainPoolParametersBase ( org.ovirt.engine.core.bll.storage.domain.DeactivateStorageDomainWithOvfUpdateCommand.getStorageDomainId ( ) , org.ovirt.engine.core.bll.storage.domain.DeactivateStorageDomainWithOvfUpdateCommand.getStoragePoolId ( ) ) ; params.setSkipChecks ( true ) ; params.setSkipLock ( true ) ; params.setShouldBeLogged ( true ) ; org.ovirt.engine.core.bll.storage.domain.DeactivateStorageDomainWithOvfUpdateCommand.getBackend ( ) . runInternalAction ( VdcActionType.DeactivateStorageDomain , params , org.ovirt.engine.core.bll.storage.domain.DeactivateStorageDomainWithOvfUpdateCommand.cloneContext ( ) . withoutLock ( ) ) ; }

Target:
private void executeDeactivateCommand ( ) { final org.ovirt.engine.core.common.action.StorageDomainPoolParametersBase params = new org.ovirt.engine.core.common.action.StorageDomainPoolParametersBase ( org.ovirt.engine.core.bll.storage.domain.DeactivateStorageDomainWithOvfUpdateCommand.getStorageDomainId ( ) , org.ovirt.engine.core.bll.storage.domain.DeactivateStorageDomainWithOvfUpdateCommand.getStoragePoolId ( ) ) ; params.setSkipChecks ( true ) ; params.setSkipLock ( true ) ; params.setShouldBeLogged ( true ) ; runInternalActionWithTasksContext ( VdcActionType.DeactivateStorageDomain , params ) ; }
Source:
public void getStorageDevices ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hostId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterStorageDevices , new org.ovirt.engine.core.common.queries.VdsIdParametersBase ( hostId ) , aQuery ) ; }

Target:
public void getUnusedBricksFromServer ( 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 ) { return source ; } } ; org.ovirt.engine.core.common.queries.IdQueryParameters parameters = new org.ovirt.engine.core.common.queries.IdQueryParameters ( hostId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetUnusedGlusterBricks , parameters , asyncQuery ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.StorageDomain getStorageDomainById ( org.ovirt.engine.core.compat.Guid storageDomainId , org.ovirt.engine.core.compat.Guid storagePoolId ) { if ( storageDomainsMap.containsKey ( storageDomainId ) ) { return storageDomainsMap.get ( storageDomainId ) ; } org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain = getStorageDomainDao ( ) . getForStoragePool ( storageDomainId , storagePoolId ) ; storageDomainsMap.put ( storageDomainId , storageDomain ) ; return storageDomain ; }

Target:
private org.ovirt.engine.core.common.businessentities.StorageDomain getStorageDomainById ( org.ovirt.engine.core.compat.Guid storageDomainId , org.ovirt.engine.core.compat.Guid storagePoolId ) { if ( storageDomainsMap.containsKey ( storageDomainId ) ) { return storageDomainsMap.get ( storageDomainId ) ; } org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain = org.ovirt.engine.core.bll.lsm.LiveMigrateVmDisksCommand.getStorageDomainDao ( ) . getForStoragePool ( storageDomainId , storagePoolId ) ; storageDomainsMap.put ( storageDomainId , storageDomain ) ; return storageDomain ; }
Source:
public void canDoActionVmIsNotDown ( ) throws java.lang.Exception { initializeCommand ( ImageOperation.Move ) ; initSnapshotValidator ( ) ; initVmDiskImage ( false ) ; mockGetVmsListForDisk ( ) ; initSrcStorageDomain ( ) ; initDestStorageDomain ( StorageType.NFS ) ; org.mockito.Mockito.doReturn ( vmDeviceDao ) . when ( command ) . getVmDeviceDao ( ) ; org.junit.Assert.assertFalse ( command.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( EngineMessage.ACTION_TYPE_FAILED_VM_IS_NOT_DOWN.toString ( ) ) ) ; }

Target:
public void canDoActionVmIsNotDown ( ) throws java.lang.Exception { initializeCommand ( ImageOperation.Move , new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ) ; initSnapshotValidator ( ) ; initVmDiskImage ( false ) ; mockGetVmsListForDisk ( ) ; initSrcStorageDomain ( ) ; initDestStorageDomain ( StorageType.NFS ) ; org.mockito.Mockito.doReturn ( vmDeviceDao ) . when ( command ) . getVmDeviceDao ( ) ; org.junit.Assert.assertFalse ( command.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( EngineMessage.ACTION_TYPE_FAILED_VM_IS_NOT_DOWN.toString ( ) ) ) ; }
Source:
public static void GetMaxVmPriority ( 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 ) { if ( source == null ) { return 100 ; } return source ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.VmPriorityMaxValue , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public static void getMaxVmPriority ( 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 ) { if ( source == null ) { return 100 ; } return source ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.VmPriorityMaxValue , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
private static void assertGetAllForEntityResult ( java.util.List < org.ovirt.engine.core.common.businessentities.Permissions > result ) { org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.Permissions permission : result ) { org.junit.Assert.assertEquals ( org.ovirt.engine.core.dao.PermissionDAOTest.VM_ENTITY_ID , permission.getObjectId ( ) ) ; } }

Target:
private static void assertGetAllForEntityResult ( java.util.List < org.ovirt.engine.core.common.businessentities.Permission > result ) { org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.Permission permission : result ) { org.junit.Assert.assertEquals ( org.ovirt.engine.core.dao.PermissionDAOTest.VM_ENTITY_ID , permission.getObjectId ( ) ) ; } }
Source:
public org.ovirt.engine.ui.common.presenter.AbstractModelBoundPopupPresenterWidget < ? extends org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel , ? > getConfirmModelPopup ( org.ovirt.engine.ui.uicommonweb.models.storage.VmBackupModel source , org.ovirt.engine.ui.uicommonweb.UICommand lastExecutedCommand ) { if ( lastExecutedCommand == ( getModel ( ) . getRemoveCommand ( ) ) ) { return removeConfirmPopupProvider.get ( ) ; } else if ( ( source.getConfirmWindow ( ) ) instanceof org.ovirt.engine.ui.uicommonweb.models.storage.ImportCloneModel ) { return importClonePopupProvider.get ( ) ; } else { return super . getConfirmModelPopup ( source , lastExecutedCommand ) ; } }

Target:
public org.ovirt.engine.ui.common.presenter.AbstractModelBoundPopupPresenterWidget < ? extends org.ovirt.engine.ui.uicommonweb.models.Model , ? > getModelPopup ( org.ovirt.engine.ui.uicommonweb.models.storage.StorageEventListModel source , org.ovirt.engine.ui.uicommonweb.UICommand lastExecutedCommand , org.ovirt.engine.ui.uicommonweb.models.Model windowModel ) { if ( lastExecutedCommand.equals ( getModel ( ) . getDetailsCommand ( ) ) ) { return eventPopupProvider.get ( ) ; } else { return super . getModelPopup ( source , lastExecutedCommand , windowModel ) ; } }
Source:
protected org.ovirt.engine.core.bll.UpdateVmPoolCommand < org.ovirt.engine.core.common.action.AddVmPoolWithVmsParameters > createCommand ( ) { org.ovirt.engine.core.common.action.AddVmPoolWithVmsParameters param = new org.ovirt.engine.core.common.action.AddVmPoolWithVmsParameters ( vmPools , testVm , VM_COUNT ) ; param.setStorageDomainId ( firstStorageDomainId ) ; org.ovirt.engine.core.bll.UpdateVmPoolCommand < org.ovirt.engine.core.common.action.AddVmPoolWithVmsParameters > command = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.UpdateVmPoolCommand < org.ovirt.engine.core.common.action.AddVmPoolWithVmsParameters > ( param , org.ovirt.engine.core.bll.context.CommandContext.createContext ( param.getSessionId ( ) ) ) { @ java.lang.Override protected void initUser ( ) { } @ java.lang.Override protected void initTemplate ( ) { } } ) ; return command ; }

Target:
protected org.ovirt.engine.core.bll.UpdateVmPoolCommand < org.ovirt.engine.core.common.action.AddVmPoolParameters > createCommand ( ) { org.ovirt.engine.core.common.action.AddVmPoolParameters param = new org.ovirt.engine.core.common.action.AddVmPoolParameters ( vmPools , testVm , VM_COUNT ) ; param.setStorageDomainId ( firstStorageDomainId ) ; org.ovirt.engine.core.bll.UpdateVmPoolCommand < org.ovirt.engine.core.common.action.AddVmPoolParameters > command = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.UpdateVmPoolCommand < org.ovirt.engine.core.common.action.AddVmPoolParameters > ( param , org.ovirt.engine.core.bll.context.CommandContext.createContext ( param.getSessionId ( ) ) ) { @ java.lang.Override protected void initUser ( ) { } @ java.lang.Override protected void initTemplate ( ) { } } ) ; return command ; }
Source:
private void VolumeType_SelectedItemChanged ( ) { org.ovirt.engine.core.common.businessentities.VolumeType volumeType = ( ( getVolumeType ( ) . getSelectedItem ( ) ) == null ) ? org.ovirt.engine.core.common.businessentities.VolumeType.Unassigned : ( ( org.ovirt.engine.core.common.businessentities.VolumeType ) ( getVolumeType ( ) . getSelectedItem ( ) ) ) ; org.ovirt.engine.core.common.businessentities.StorageType storageType = ( ( getStorageDomain ( ) . getSelectedItem ( ) ) == null ) ? org.ovirt.engine.core.common.businessentities.StorageType.UNKNOWN : ( ( org.ovirt.engine.core.common.businessentities.StorageDomain ) ( getStorageDomain ( ) . getSelectedItem ( ) ) ) . getstorage_type ( ) ; updateVolumeFormat ( volumeType , storageType ) ; updateShareable ( volumeType , storageType ) ; }

Target:
private void VolumeType_SelectedItemChanged ( ) { org.ovirt.engine.core.common.businessentities.VolumeType volumeType = ( ( getVolumeType ( ) . getSelectedItem ( ) ) == null ) ? org.ovirt.engine.core.common.businessentities.VolumeType.Unassigned : ( ( org.ovirt.engine.core.common.businessentities.VolumeType ) ( getVolumeType ( ) . getSelectedItem ( ) ) ) ; org.ovirt.engine.core.common.businessentities.StorageType storageType = ( ( getStorageDomain ( ) . getSelectedItem ( ) ) == null ) ? org.ovirt.engine.core.common.businessentities.StorageType.UNKNOWN : ( ( org.ovirt.engine.core.common.businessentities.StorageDomain ) ( getStorageDomain ( ) . getSelectedItem ( ) ) ) . getStorageType ( ) ; updateVolumeFormat ( volumeType , storageType ) ; updateShareable ( volumeType , storageType ) ; }