auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void getAllProvidersByType ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.businessentities.ProviderType providerType ) { 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.Provider > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllProviders , new org.ovirt.engine.core.common.queries.GetAllProvidersParameters ( providerType ) , aQuery ) ; }

Target:
public void getAllProvidersByType ( org.ovirt.engine.ui.frontend.AsyncQuery < java.util.List < org.ovirt.engine.core.common.businessentities.Provider < ? > > > aQuery , org.ovirt.engine.core.common.businessentities.ProviderType providerType ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.ListConverter < > ( ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllProviders , new org.ovirt.engine.core.common.queries.GetAllProvidersParameters ( providerType ) , aQuery ) ; }
Source:
public void testGetMessagesFromMap ( ) { java.util.Map < java.lang.String , java.lang.String > input = new java.util.HashMap < > ( ) ; java.lang.String result = testManager.getMessagesFromMap ( input ) ; org.junit.Assert.assertNull ( "There should be no result" , result ) ; input.put ( "key1" , "value1" ) ; result = testManager.getMessagesFromMap ( input ) ; org.junit.Assert.assertNotNull ( "There should be a result" , result ) ; org.junit.Assert.assertEquals ( "String doesn't match" , "{\"key1\":\"value1\"}" , result ) ; }

Target:
public void testGetMessagesFromMap ( ) { java.util.Map < java.lang.String , java.lang.String > input = new java.util.HashMap < > ( ) ; java.lang.String result = testManager.getMessagesFromMap ( input ) ; org.junit.jupiter.api.Assertions.assertNull ( result , "There should be no result" ) ; input.put ( "key1" , "value1" ) ; result = testManager.getMessagesFromMap ( input ) ; org.junit.jupiter.api.Assertions.assertNotNull ( result , "There should be a result" ) ; org.junit.jupiter.api.Assertions.assertEquals ( "{\"key1\":\"value1\"}" , result , "String doesn't match" ) ; }
Source:
protected void proceedProxyReturnValue ( ) { org.ovirt.engine.core.common.errors.VdcBllErrors returnStatus = GetReturnValueFromStatus ( getReturnStatus ( ) ) ; switch ( returnStatus ) { case GetStorageDomainListError : org.ovirt.engine.core.vdsbroker.irsbroker.GetVolumesListVDSCommand.getVDSReturnValue ( ) . setVdsError ( new org.ovirt.engine.core.common.errors.VDSError ( returnStatus , getReturnStatus ( ) . mMessage ) ) ; org.ovirt.engine.core.vdsbroker.irsbroker.GetVolumesListVDSCommand.getVDSReturnValue ( ) . setSucceeded ( false ) ; break ; default : super . proceedProxyReturnValue ( ) ; break ; } }

Target:
protected void proceedProxyReturnValue ( ) { org.ovirt.engine.core.common.errors.VdcBllErrors returnStatus = getReturnValueFromStatus ( getReturnStatus ( ) ) ; switch ( returnStatus ) { case GetStorageDomainListError : org.ovirt.engine.core.vdsbroker.irsbroker.GetVolumesListVDSCommand.getVDSReturnValue ( ) . setVdsError ( new org.ovirt.engine.core.common.errors.VDSError ( returnStatus , getReturnStatus ( ) . mMessage ) ) ; org.ovirt.engine.core.vdsbroker.irsbroker.GetVolumesListVDSCommand.getVDSReturnValue ( ) . setSucceeded ( false ) ; break ; default : super . proceedProxyReturnValue ( ) ; break ; } }
Source:
void localize ( org.ovirt.engine.ui.userportal.ApplicationConstants constants , org.ovirt.engine.ui.userportal.ApplicationDynamicConstants dynamicConstants ) { headerLabel.setText ( dynamicConstants.loginHeaderLabel ( ) ) ; userNameLabel.setText ( constants.loginFormUserNameLabel ( ) ) ; passwordLabel.setText ( constants.loginFormPasswordLabel ( ) ) ; domainLabel.setText ( constants.loginFormDomainLabel ( ) ) ; connectAutomatically.setLabel ( constants.loginFormConnectAutomaticallyLabel ( ) ) ; loginButton.setLabel ( constants.loginButtonLabel ( ) ) ; }

Target:
void localize ( org.ovirt.engine.ui.userportal.ApplicationConstants constants , org.ovirt.engine.ui.userportal.ApplicationDynamicMessages dynamicMessages ) { headerLabel.setText ( dynamicMessages.loginHeaderLabel ( ) ) ; userNameLabel.setText ( constants.loginFormUserNameLabel ( ) ) ; passwordLabel.setText ( constants.loginFormPasswordLabel ( ) ) ; domainLabel.setText ( constants.loginFormDomainLabel ( ) ) ; connectAutomatically.setLabel ( constants.loginFormConnectAutomaticallyLabel ( ) ) ; loginButton.setLabel ( constants.loginButtonLabel ( ) ) ; }
Source:
public static void getGlusterSwiftServices ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid serverId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterServerService > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterServerServicesByServerId , new org.ovirt.engine.core.common.queries.gluster.GlusterServiceQueryParameters ( serverId , org.ovirt.engine.core.common.businessentities.gluster.ServiceType.GLUSTER_SWIFT ) , aQuery ) ; }

Target:
public void getGlusterSwiftServerServices ( 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.GlusterServerService > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterServerServicesByClusterId , new org.ovirt.engine.core.common.queries.gluster.GlusterServiceQueryParameters ( clusterId , org.ovirt.engine.core.common.businessentities.gluster.ServiceType.GLUSTER_SWIFT ) , aQuery ) ; }
Source:
public void testRemove ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.RepoFileMetaData > listOfRepoFiles = repoFileMetaDataDao.getRepoListForStorageDomain ( FixturesTool.SHARED_ISO_STORAGE_DOAMIN_FOR_SP2_AND_SP3 , ImageType.ISO ) ; org.junit.Assert.assertNotNull ( listOfRepoFiles ) ; org.junit.Assert.assertNotSame ( true , listOfRepoFiles.isEmpty ( ) ) ; repoFileMetaDataDao.removeRepoDomainFileList ( FixturesTool.SHARED_ISO_STORAGE_DOAMIN_FOR_SP2_AND_SP3 , ImageType.ISO ) ; listOfRepoFiles = getActiveIsoDomain ( ) ; org.junit.Assert.assertNotNull ( listOfRepoFiles ) ; org.junit.Assert.assertSame ( true , listOfRepoFiles.isEmpty ( ) ) ; }

Target:
public void testRemove ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.RepoFileMetaData > listOfRepoFiles = repoFileMetaDataDao.getRepoListForStorageDomain ( FixturesTool.SHARED_ISO_STORAGE_DOAMIN_FOR_SP2_AND_SP3 , ImageFileType.ISO ) ; org.junit.Assert.assertNotNull ( listOfRepoFiles ) ; org.junit.Assert.assertNotSame ( true , listOfRepoFiles.isEmpty ( ) ) ; repoFileMetaDataDao.removeRepoDomainFileList ( FixturesTool.SHARED_ISO_STORAGE_DOAMIN_FOR_SP2_AND_SP3 , ImageFileType.ISO ) ; listOfRepoFiles = getActiveIsoDomain ( ) ; org.junit.Assert.assertNotNull ( listOfRepoFiles ) ; org.junit.Assert.assertSame ( true , listOfRepoFiles.isEmpty ( ) ) ; }
Source:
private void vnicProfileForVmNetworkTest ( boolean vmNetwork , org.hamcrest.Matcher < org.ovirt.engine.core.bll.ValidationResult > matcher ) { org.mockito.Mockito.when ( network.isVmNetwork ( ) ) . thenReturn ( vmNetwork ) ; org.mockito.Mockito.when ( networkDao.get ( org.mockito.ArgumentMatchers.any ( ) ) ) . thenReturn ( network ) ; org.junit.Assert.assertThat ( validator.vnicProfileForVmNetworkOnly ( ) , matcher ) ; }

Target:
private void vnicProfileForVmNetworkTest ( boolean vmNetwork , org.hamcrest.Matcher < org.ovirt.engine.core.bll.ValidationResult > matcher ) { org.mockito.Mockito.when ( network.isVmNetwork ( ) ) . thenReturn ( vmNetwork ) ; org.mockito.Mockito.when ( networkDao.get ( org.mockito.ArgumentMatchers.any ( ) ) ) . thenReturn ( network ) ; org.hamcrest.MatcherAssert.assertThat ( validator.vnicProfileForVmNetworkOnly ( ) , matcher ) ; }
Source:
public 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.getInstance ( ) . runQuery ( VdcQueryType.GetAllServerCpuList , new org.ovirt.engine.core.common.queries.GetAllServerCpuListParameters ( version ) , aQuery ) ; }

Target:
public void getClustersHavingHosts ( 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 ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > list = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ) ( source ) ) ; java.util.Collections.sort ( list , new org.ovirt.engine.core.common.businessentities.comparators.NameableComparator ( ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllClustersHavingHosts , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }
Source:
public void storageDomainName ( ) { final org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase b = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; final org.ovirt.engine.core.common.businessentities.storage_domains s = new org.ovirt.engine.core.common.businessentities.storage_domains ( ) ; s.setstorage_name ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.NAME ) ; b.setStorageDomain ( s ) ; final java.lang.String n = b.getStorageDomainName ( ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.NAME , n ) ; }

Target:
public void storageDomainName ( ) { final org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase b = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; final org.ovirt.engine.core.common.businessentities.StorageDomain s = new org.ovirt.engine.core.common.businessentities.StorageDomain ( ) ; s.setStorageName ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.NAME ) ; b.setStorageDomain ( s ) ; final java.lang.String n = b.getStorageDomainName ( ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.NAME , n ) ; }
Source:
public void testRemove ( ) throws java.lang.Exception { setUpEntityQueryExpectations ( VdcQueryType.GetVmByVmId , org.ovirt.engine.core.common.queries.GetVmByVmIdParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { PARENT_ID } , getEntity ( 0 ) , 2 ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.UpdateVm , org.ovirt.engine.core.common.action.VmManagementParametersBase.class , new java.lang.String [ ] { } , new java.lang.Object [ ] { } , true , true ) ) ; verifyRemove ( collection.remove ( GUIDS [ 0 ] . toString ( ) ) ) ; }

Target:
public void testRemove ( ) throws java.lang.Exception { setUpEntityQueryExpectations ( VdcQueryType.GetVmByVmId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { PARENT_ID } , getEntity ( 0 ) , 2 ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.UpdateVm , org.ovirt.engine.core.common.action.VmManagementParametersBase.class , new java.lang.String [ ] { } , new java.lang.Object [ ] { } , true , true ) ) ; verifyRemove ( collection.remove ( GUIDS [ 0 ] . toString ( ) ) ) ; }
Source:
public void testUpdateOriginalTemplateName ( ) { dao.updateOriginalTemplateName ( new org.ovirt.engine.core.compat.Guid ( "1b85420c-b84c-4f29-997e-0eb674b40b82" ) , "renamed" ) ; java.util.List < java.lang.String > renamedTemplates = java.util.Arrays.asList ( "77296e00-0cad-4e5a-9299-008a7b6f4354" , "77296e00-0cad-4e5a-9299-008a7b6f4355" , "77296e00-0cad-4e5a-9299-008a7b6f4356" ) ; java.util.List < java.lang.String > notRenamedTemplate = java.util.Arrays.asList ( "77296e00-0cad-4e5a-9299-008a7b6f4359" ) ; assertOriginalTemplateNameIs ( renamedTemplates , "renamed" ) ; assertOriginalTemplateNameIs ( notRenamedTemplate , "otherTemplateName" ) ; }

Target:
public void testAllRunningByCluster ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VM > result = dao.getAllRunningByCluster ( FixturesTool.VDS_GROUP_RHEL6_ISCSI ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface createBond ( java.lang.String name , java.lang.String networkName ) { return createVdsInterface ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , name , true , null , null , null , networkName , true , null , false , null , org.ovirt.engine.core.bll.network.host.SetupNetworksHelperTest.DEFAULT_SPEED ) ; }

Target:
private org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface createBond ( java.lang.String name , java.lang.String networkName ) { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface bond = createVdsInterface ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , name , true , null , null , null , networkName , true , null , null , org.ovirt.engine.core.bll.network.host.SetupNetworksHelperTest.DEFAULT_SPEED ) ; mockCalculateBaseNicWhenBaseNicIsPassed ( bond ) ; return bond ; }
Source:
protected org.ovirt.engine.core.common.businessentities.StorageServerConnections populateBasicConnectionDetails ( org.ovirt.engine.core.compat.Guid id , java.lang.String connection , org.ovirt.engine.core.common.businessentities.StorageType type ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections connectionDetails = new org.ovirt.engine.core.common.businessentities.StorageServerConnections ( ) ; if ( id != null ) { connectionDetails.setid ( id.toString ( ) ) ; } connectionDetails.setconnection ( connection ) ; connectionDetails.setstorage_type ( type ) ; return connectionDetails ; }

Target:
protected org.ovirt.engine.core.common.businessentities.StorageServerConnections populateBasicConnectionDetails ( org.ovirt.engine.core.compat.Guid id , java.lang.String connection , org.ovirt.engine.core.common.businessentities.storage.StorageType type ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections connectionDetails = new org.ovirt.engine.core.common.businessentities.StorageServerConnections ( ) ; if ( id != null ) { connectionDetails.setid ( id.toString ( ) ) ; } connectionDetails.setconnection ( connection ) ; connectionDetails.setstorage_type ( type ) ; return connectionDetails ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { java.util.Collection < org.ovirt.engine.core.common.businessentities.network.NetworkQoS > qos = ( ( java.util.Collection < org.ovirt.engine.core.common.businessentities.network.NetworkQoS > ) ( returnValue ) ) ; getQos ( ) . setItems ( qos ) ; getQos ( ) . setSelectedItem ( org.ovirt.engine.ui.uicommonweb.Linq.findNetworkQosById ( qos , getNetwork ( ) . getQosId ( ) ) ) ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object result ) { java.util.List < org.ovirt.engine.core.common.businessentities.Provider > providers = ( ( java.util.List < org.ovirt.engine.core.common.businessentities.Provider > ) ( result ) ) ; getExternalProviders ( ) . setItems ( providers ) ; selectExternalProvider ( ) ; stopProgress ( ) ; }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < ? extends org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs args ) { boolean isEnabled = bootSequenceModel.getCdromOption ( ) . getIsChangable ( ) ; java.lang.String itemName = bootSequenceModel.getCdromOption ( ) . getTitle ( ) ; updateItemAvailability ( itemName , isEnabled ) ; }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < ? extends org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs args ) { boolean isEnabled = bootSequenceModel.getNetworkOption ( ) . getIsChangable ( ) ; java.lang.String itemName = bootSequenceModel.getNetworkOption ( ) . getTitle ( ) ; updateItemAvailability ( itemName , isEnabled ) ; }
Source:
public boolean contains ( org.ovirt.engine.core.searchbackend.SyntaxObjectType type , java.lang.String val ) { boolean retval = false ; for ( org.ovirt.engine.core.searchbackend.SyntaxObject obj : mObjList ) { if ( ( ( obj.getType ( ) ) == type ) && ( org.ovirt.engine.core.compat.StringHelper.EqOp ( obj.getBody ( ) . toUpperCase ( ) , val.toUpperCase ( ) ) ) ) { retval = true ; break ; } } return retval ; }

Target:
public boolean contains ( org.ovirt.engine.core.searchbackend.SyntaxObjectType type , java.lang.String val ) { boolean retval = false ; for ( org.ovirt.engine.core.searchbackend.SyntaxObject obj : mObjList ) { if ( ( ( obj.getType ( ) ) == type ) && ( val.equalsIgnoreCase ( obj.getBody ( ) ) ) ) { retval = true ; break ; } } return retval ; }
Source:
protected java.util.Map < java.lang.String , org.ovirt.engine.core.common.utils.Pair < java.lang.String , java.lang.String > > getSharedLocks ( ) { java.util.Map < java.lang.String , org.ovirt.engine.core.common.utils.Pair < java.lang.String , java.lang.String > > sharedLock = new java.util.HashMap < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.VM vm : vmsDiskOrSnapshotPluggedTo ) { sharedLock.put ( vm.getId ( ) . toString ( ) , org.ovirt.engine.core.bll.LockMessagesMatchUtil.makeLockingPair ( LockingGroup.VM , VdcBllMessages.ACTION_TYPE_FAILED_VM_IS_LOCKED ) ) ; } return sharedLock.isEmpty ( ) ? null : sharedLock ; }

Target:
protected java.util.Map < java.lang.String , org.ovirt.engine.core.common.utils.Pair < java.lang.String , java.lang.String > > getSharedLocks ( ) { java.util.Map < java.lang.String , org.ovirt.engine.core.common.utils.Pair < java.lang.String , java.lang.String > > sharedLock = new java.util.HashMap < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.VM vm : vmsDiskOrSnapshotPluggedTo ) { sharedLock.put ( vm.getId ( ) . toString ( ) , org.ovirt.engine.core.bll.LockMessagesMatchUtil.makeLockingPair ( LockingGroup.VM , EngineMessage.ACTION_TYPE_FAILED_VM_IS_LOCKED ) ) ; } return sharedLock.isEmpty ( ) ? null : sharedLock ; }
Source:
public void addToCallbackMap ( org.ovirt.engine.core.common.businessentities.CommandEntity cmdEntity ) { if ( ! ( cmdCallbackMap.containsKey ( cmdEntity.getId ( ) ) ) ) { org.ovirt.engine.core.bll.CommandBase < ? > cmd = coco.retrieveCommand ( cmdEntity.getId ( ) ) ; if ( ( cmd != null ) && ( ( cmd.getCallback ( ) ) != null ) ) { cmdCallbackMap.put ( cmdEntity.getId ( ) , new org.ovirt.engine.core.bll.tasks.CommandExecutor.CommandContainer ( cmd.getCallback ( ) , 1 ) ) ; } } }

Target:
public void addToCallbackMap ( org.ovirt.engine.core.common.businessentities.CommandEntity cmdEntity ) { if ( ! ( cmdCallbackMap.containsKey ( cmdEntity.getId ( ) ) ) ) { org.ovirt.engine.core.bll.CommandBase < ? > cmd = coco.retrieveCommand ( cmdEntity.getId ( ) ) ; if ( ( cmd != null ) && ( ( cmd.getCallback ( ) ) != null ) ) { cmdCallbackMap.put ( cmdEntity.getId ( ) , new org.ovirt.engine.core.bll.tasks.CommandExecutor.CommandContainer ( cmd.getCallback ( ) , pollingRate ) ) ; } } }
Source:
public void storageDomainName ( ) { final org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase b = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; final org.ovirt.engine.core.common.businessentities.StorageDomain s = new org.ovirt.engine.core.common.businessentities.StorageDomain ( ) ; s.setstorage_name ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.NAME ) ; b.setStorageDomain ( s ) ; final java.lang.String n = b.getStorageDomainName ( ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.NAME , n ) ; }

Target:
public void storageDomainName ( ) { final org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase b = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; final org.ovirt.engine.core.common.businessentities.StorageDomain s = new org.ovirt.engine.core.common.businessentities.StorageDomain ( ) ; s.setStorageName ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.NAME ) ; b.setStorageDomain ( s ) ; final java.lang.String n = b.getStorageDomainName ( ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.NAME , n ) ; }
Source:
public static java.util.Collection < org.ovirt.engine.core.aaa.DirectoryUser > findDirectoryUserByIds ( final org.ovirt.engine.core.extensions.mgr.ExtensionProxy extension , final java.lang.String namespace , final java.util.Collection < java.lang.String > ids , final boolean groupsResolving , final boolean groupsResolvingRecursive ) { return org.ovirt.engine.core.bll.aaa.DirectoryUtils.mapPrincipalRecordsToDirectoryUsers ( org.ovirt.engine.core.aaa.AuthzUtils.getName ( extension ) , org.ovirt.engine.core.aaa.AuthzUtils.findPrincipalsByIds ( extension , namespace , ids , groupsResolving , groupsResolvingRecursive ) ) ; }

Target:
public static org.ovirt.engine.core.aaa.DirectoryGroup mapGroupRecordToDirectoryGroup ( final java.lang.String authzName , final org.ovirt.engine.api.extensions.ExtMap group ) { return org.ovirt.engine.core.bll.aaa.DirectoryUtils.mapGroupRecordToDirectoryGroup ( authzName , group , new java.util.HashSet < > ( ) ) ; }
Source:
public static void getAllDataCenterNetworks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId ) { 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.core.common.queries.IdQueryParameters params = new org.ovirt.engine.core.common.queries.IdQueryParameters ( storagePoolId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetNetworksByDataCenterId , params , aQuery ) ; }

Target:
public void getVmList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String poolName ) { 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 ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > vms = org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VM > cast ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.IVdcQueryable > ) ( source ) ) ) ; return vms ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( ( "Vms: pool=" + poolName ) , org.ovirt.engine.core.common.interfaces.SearchType.VM ) , aQuery ) ; }
Source:
public static < T extends org.ovirt.engine.core.common.businessentities.VmBase > void updateVmDevices ( T entity , org.ovirt.engine.core.compat.Guid newId ) { org.ovirt.engine.core.common.businessentities.VmBase newVmBase = org.ovirt.engine.core.bll.utils.VmDeviceUtils.getBaseObject ( entity , newId ) ; if ( newVmBase != null ) { org.ovirt.engine.core.bll.utils.VmDeviceUtils.updateCdInVmDevice ( newVmBase ) ; org.ovirt.engine.core.bll.utils.VmDeviceUtils.updateBootOrderInVmDevice ( newVmBase ) ; org.ovirt.engine.core.bll.utils.VmDeviceUtils.updateNumOfMonitorsInVmDevice ( null , newVmBase ) ; org.ovirt.engine.core.bll.utils.VmDeviceUtils.updateUSBSlots ( null , newVmBase ) ; } }

Target:
public static < T extends org.ovirt.engine.core.common.businessentities.VmBase > void updateVmDevices ( T entity , org.ovirt.engine.core.compat.Guid newId ) { if ( entity != null ) { org.ovirt.engine.core.bll.utils.VmDeviceUtils.updateCdInVmDevice ( entity ) ; org.ovirt.engine.core.bll.utils.VmDeviceUtils.updateBootOrderInVmDevice ( entity ) ; org.ovirt.engine.core.bll.utils.VmDeviceUtils.updateNumOfMonitorsInVmDevice ( null , entity ) ; org.ovirt.engine.core.bll.utils.VmDeviceUtils.updateUSBSlots ( null , entity ) ; org.ovirt.engine.core.bll.utils.VmDeviceUtils.updateMemoryBalloon ( null , entity , true ) ; } }
Source:
public void executeCommand ( org.ovirt.engine.ui.uicommonweb.UICommand uiCommand ) { this . onImportVmAsClone ( importModel ) ; }

Target:
private void onConfigureVmsToImport ( ) { final org.ovirt.engine.ui.uicommonweb.models.vms.ImportVmsModel importVmsModel = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.ImportVmsModel ) ( org.ovirt.engine.ui.uicommonweb.models.vms.VmListModel.getWindow ( ) ) ) ; if ( importVmsModel == null ) { return ; } org.ovirt.engine.ui.uicommonweb.models.vms.ImportVmFromExportDomainModel model = importVmsModel.getSpecificImportModel ( ) ; org.ovirt.engine.ui.uicommonweb.models.vms.VmListModel.setWindow ( null ) ; setWindow ( model ) ; }
Source:
public java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.Disk > getDiskMap ( ) { java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.Disk > diskMap = new java.util.HashMap < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.Disk > ( ) ; for ( java.util.Map.Entry < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.DiskImage > entry : getEntity ( ) . getDiskMap ( ) . entrySet ( ) ) { diskMap.put ( entry.getKey ( ) , entry.getValue ( ) ) ; } return diskMap ; }

Target:
public java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.Disk > getDiskMap ( ) { java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.Disk > diskMap = new java.util.HashMap < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.Disk > ( ) ; for ( java.util.Map.Entry < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.DiskImage > entry : getEntity ( ) . getDiskTemplateMap ( ) . entrySet ( ) ) { diskMap.put ( entry.getKey ( ) , entry.getValue ( ) ) ; } return diskMap ; }
Source:
public org.ovirt.engine.core.common.businessentities.StorageDomain getStorageDomain ( ) { if ( ( storageDomain ) == null ) { org.ovirt.engine.core.compat.Guid providerId = getParameters ( ) . getLibvirtSecret ( ) . getProviderId ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > storageDomains = getStorageDomainDao ( ) . getAllByConnectionId ( providerId ) ; storageDomain = storageDomains.get ( 0 ) ; } return storageDomain ; }

Target:
public org.ovirt.engine.core.common.businessentities.StorageDomain getStorageDomain ( ) { if ( ( storageDomain ) == null ) { org.ovirt.engine.core.compat.Guid providerId = getParameters ( ) . getLibvirtSecret ( ) . getProviderId ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > storageDomains = storageDomainDao.getAllByConnectionId ( providerId ) ; storageDomain = storageDomains.get ( 0 ) ; } return storageDomain ; }
Source:
public static void getMaximalVmMemSize64OS ( 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.Integer ) ( source ) ) . intValue ( ) : - 1 ; } } ; org.ovirt.engine.core.common.queries.GetConfigurationValueParameters tempVar = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.VM64BitMaxMemorySizeInMB ) ; tempVar.setVersion ( version ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( tempVar , aQuery ) ; }

Target:
public boolean isSkipFencingIfSDActiveSupported ( java.lang.String version ) { boolean result = false ; if ( version != null ) { java.lang.Boolean b = ( ( java.lang.Boolean ) ( getConfigValuePreConverted ( ConfigurationValues.SkipFencingIfSDActiveSupported , version ) ) ) ; result = ( b != null ) && b ; } return result ; }
Source:
private static java.util.Map < java.lang.String , java.lang.Object > getVideoDeviceSpecParams ( int numOfMonitors , boolean singleQxlPci ) { int heads = ( singleQxlPci ) ? numOfMonitors : 1 ; java.util.Map < java.lang.String , java.lang.Object > specParams = new java.util.HashMap < > ( ) ; specParams.put ( org.ovirt.engine.core.bll.utils.VmDeviceUtils.HEADS , java.lang.String.valueOf ( heads ) ) ; specParams.put ( org.ovirt.engine.core.bll.utils.VmDeviceUtils.VRAM , org.ovirt.engine.core.common.utils.VmDeviceCommonUtils.singlePciVRamByHeads ( heads ) ) ; if ( singleQxlPci ) { specParams.put ( org.ovirt.engine.core.bll.utils.VmDeviceUtils.RAM , org.ovirt.engine.core.common.utils.VmDeviceCommonUtils.singlePciRamByHeads ( heads ) ) ; } return specParams ; }

Target:
public static boolean shouldOverrideSoundDevice ( org.ovirt.engine.core.common.businessentities.VmStatic vmStatic , org.ovirt.engine.core.compat.Version compatibilityVersion , java.lang.Boolean soundDeviceEnabled ) { return ( ( soundDeviceEnabled == null ) && ( org.ovirt.engine.core.bll.utils.VmDeviceUtils.osRepository.isSoundDeviceEnabled ( vmStatic.getOsId ( ) , compatibilityVersion ) ) ) && ( ( vmStatic.getVmType ( ) ) == ( org.ovirt.engine.core.common.businessentities.VmType.Desktop ) ) ; }
Source:
protected void processOldImageFromDb ( ) { org.ovirt.engine.core.bll.CreateSnapshotCommand.getParameters ( ) . setOldLastModifiedValue ( org.ovirt.engine.core.bll.CreateSnapshotCommand.getDiskImage ( ) . getlastModified ( ) ) ; org.ovirt.engine.core.bll.CreateSnapshotCommand.getDiskImage ( ) . setlastModified ( new java.util.Date ( ) ) ; org.ovirt.engine.core.bll.CreateSnapshotCommand.getDiskImage ( ) . setactive ( false ) ; org.ovirt.engine.core.bll.CreateSnapshotCommand.getImageDao ( ) . update ( org.ovirt.engine.core.bll.CreateSnapshotCommand.getDiskImage ( ) . getImage ( ) ) ; }

Target:
protected void processOldImageFromDb ( ) { org.ovirt.engine.core.bll.CreateSnapshotCommand.getParameters ( ) . setOldLastModifiedValue ( org.ovirt.engine.core.bll.CreateSnapshotCommand.getDiskImage ( ) . getLastModified ( ) ) ; org.ovirt.engine.core.bll.CreateSnapshotCommand.getDiskImage ( ) . setLastModified ( new java.util.Date ( ) ) ; org.ovirt.engine.core.bll.CreateSnapshotCommand.getDiskImage ( ) . setActive ( false ) ; org.ovirt.engine.core.bll.CreateSnapshotCommand.getImageDao ( ) . update ( org.ovirt.engine.core.bll.CreateSnapshotCommand.getDiskImage ( ) . getImage ( ) ) ; }
Source:
public void onUiCommonInit ( org.ovirt.engine.ui.common.uicommon.model.UiCommonInitEvent event ) { addModelSearchStringChangeListener ( dataProvider.getModel ( ) ) ; }

Target:
public void eventRaised ( com.google.gwt.user.client.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { if ( "SearchString" . equals ( ( ( org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ) ( args ) ) . propertyName ) ) { if ( ! ( model.isSearchValidForServerSideSorting ( ) ) ) { model.clearSortOptions ( ) ; clearColumnSort ( ) ; } } }
Source:
public void selectSnapshot ( org.ovirt.engine.core.compat.Guid id ) { org.ovirt.engine.ui.uicommonweb.models.vms.SnapshotModel snapshotModel = getSnapshotModelById ( id ) ; if ( snapshotModel == null ) { return ; } getSnapshots ( ) . setSelectedItem ( snapshotModel ) ; setSnapshotModel ( snapshotModel ) ; for ( org.ovirt.engine.core.common.businessentities.DiskImage diskImage : snapshotModel.getDisks ( ) ) { org.ovirt.engine.ui.uicommonweb.models.ListModel diskListModel = diskSnapshotsMap.get ( diskImage.getId ( ) ) ; diskListModel.setSelectedItem ( diskImage ) ; } }

Target:
public void selectSnapshot ( org.ovirt.engine.core.compat.Guid id ) { org.ovirt.engine.ui.uicommonweb.models.vms.SnapshotModel snapshotModel = getSnapshotModelById ( id ) ; if ( snapshotModel == null ) { return ; } getSnapshots ( ) . setSelectedItem ( snapshotModel ) ; setSnapshotModel ( snapshotModel ) ; for ( org.ovirt.engine.core.common.businessentities.storage.DiskImage diskImage : snapshotModel.getDisks ( ) ) { org.ovirt.engine.ui.uicommonweb.models.ListModel diskListModel = diskSnapshotsMap.get ( diskImage.getId ( ) ) ; diskListModel.setSelectedItem ( diskImage ) ; } }
Source:
public 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.getInstance ( ) . runQuery ( VdcQueryType.GetAllNetworks , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) , aQuery ) ; }

Target:
public void getNetworkList ( org.ovirt.engine.ui.frontend.AsyncQuery < java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > > aQuery , org.ovirt.engine.core.compat.Guid dataCenterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.ListConverter < > ( ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllNetworks , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) , aQuery ) ; }
Source:
protected void executeCommand ( ) { boolean removedStatelessSnapshot = detachUsers ( ) ; if ( ! removedStatelessSnapshot ) { removeVmStatelessImages ( ) ; } org.ovirt.engine.core.bll.quota.QuotaManager.getInstance ( ) . rollbackQuotaByVmId ( org.ovirt.engine.core.bll.ProcessDownVmCommand.getVmId ( ) ) ; removeStatelessVmUnmanagedDevices ( ) ; releaseUsedHostDevices ( ) ; applyNextRunConfiguration ( ) ; }

Target:
protected void executeCommand ( ) { boolean removedStatelessSnapshot = detachUsers ( ) ; if ( ! removedStatelessSnapshot ) { removeVmStatelessImages ( ) ; } org.ovirt.engine.core.bll.quota.QuotaManager.getInstance ( ) . rollbackQuotaByVmId ( org.ovirt.engine.core.bll.ProcessDownVmCommand.getVmId ( ) ) ; removeStatelessVmUnmanagedDevices ( ) ; boolean vmHasDirectPassthroughDevices = releaseUsedHostDevices ( ) ; org.ovirt.engine.core.compat.Guid hostId = cleanupVfs ( ) ; refreshHostIfNeeded ( ( hostId == null ? vmHasDirectPassthroughDevices ? org.ovirt.engine.core.bll.ProcessDownVmCommand.getVm ( ) . getDedicatedVmForVds ( ) : null : hostId ) ) ; applyNextRunConfiguration ( ) ; }
Source:
public void testShouldCheckVmOnClusterUpgrade ( ) { prepareVmToPassValidate ( ) ; mockVmValidator ( ) ; org.mockito.Mockito.doReturn ( ValidationResult.VALID ) . when ( inClusterUpgradeValidator ) . isVmReadyForUpgrade ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.VM.class ) ) ; group.setClusterPolicyId ( ClusterPolicy.UPGRADE_POLICY_GUID ) ; command.initEffectiveCompatibilityVersion ( ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateSuccess ( command ) ; org.mockito.Mockito.verify ( inClusterUpgradeValidator , org.mockito.Mockito.times ( 1 ) ) . isVmReadyForUpgrade ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.VM.class ) ) ; }

Target:
public void testCheckVmOnlyOnClusterUpgrade ( ) { prepareVmToPassValidate ( ) ; mockVmValidator ( ) ; org.mockito.Mockito.doReturn ( ValidationResult.VALID ) . when ( inClusterUpgradeValidator ) . isVmReadyForUpgrade ( org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.common.businessentities.VM.class ) ) ; command.initEffectiveCompatibilityVersion ( ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateSuccess ( command ) ; org.mockito.Mockito.verify ( inClusterUpgradeValidator , org.mockito.Mockito.times ( 0 ) ) . isVmReadyForUpgrade ( org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.common.businessentities.VM.class ) ) ; }
Source:
public void testRemoveCommit ( ) throws java.lang.Exception { setUpGetEntityExpectations ( VdcQueryType.GetGlusterVolumeById , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.gluster.GlusterTestHelper.volumeId } , helper.getVolumeEntity ( 1 ) ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.CommitRemoveGlusterVolumeBricks , org.ovirt.engine.core.common.action.gluster.GlusterVolumeRemoveBricksParameters.class , new java.lang.String [ ] { } , new java.lang.Object [ ] { } , true , true ) ) ; verifyRemove ( collection.remove ( getBrickModelsToRemove ( ) ) ) ; }

Target:
public void testRemoveCommit ( ) throws java.lang.Exception { setUpGetEntityExpectations ( VdcQueryType.GetGlusterVolumeById , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.gluster.GlusterTestHelper.volumeId } , helper.getVolumeEntity ( 1 ) ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.CommitRemoveGlusterVolumeBricks , org.ovirt.engine.core.common.action.gluster.GlusterVolumeRemoveBricksParameters.class , new java.lang.String [ ] { } , new java.lang.Object [ ] { } , true , true ) ) ; org.ovirt.engine.api.model.Action action = new org.ovirt.engine.api.model.Action ( ) ; action.setBricks ( getBrickModelsToRemove ( ) ) ; verifyRemove ( collection.remove ( action ) ) ; }
Source:
public static void getVmSnapshotList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllVmSnapshotsByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

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.DiskImage > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.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 void validateVmHavingDeviceSnapshotsPluggedToOtherVmsThatAreNotDown ( ) { org.ovirt.engine.core.common.businessentities.StorageDomain srcStorageDomain = initStorageDomain ( srcStorageId ) ; srcStorageDomain.setStatus ( StorageDomainStatus.Active ) ; initDiskImage ( diskImageGroupId , diskImageId ) ; initVm ( VMStatus.Up , org.ovirt.engine.core.compat.Guid.newGuid ( ) , diskImageGroupId ) ; org.mockito.Mockito.doReturn ( new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_VM_IS_NOT_DOWN ) ) . when ( diskValidator ) . isDiskPluggedToAnyNonDownVm ( org.mockito.ArgumentMatchers.anyBoolean ( ) ) ; org.ovirt.engine.core.bll.storage.lsm.ValidateTestUtils.runAndAssertValidateFailure ( command , EngineMessage.ACTION_TYPE_FAILED_VM_IS_NOT_DOWN ) ; }

Target:
public void validateVmHavingDeviceSnapshotsPluggedToOtherVmsThatAreNotDown ( ) { org.ovirt.engine.core.common.businessentities.StorageDomain srcStorageDomain = initStorageDomain ( srcStorageId ) ; srcStorageDomain.setStatus ( StorageDomainStatus.Active ) ; initDiskImage ( diskImageGroupId , diskImageId ) ; initVm ( VMStatus.Up , org.ovirt.engine.core.compat.Guid.newGuid ( ) , diskImageGroupId ) ; org.mockito.Mockito.doReturn ( new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_VM_IS_NOT_DOWN ) ) . when ( diskValidator ) . isDiskPluggedToAnyNonDownVm ( org.mockito.ArgumentMatchers.anyBoolean ( ) ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( command , EngineMessage.ACTION_TYPE_FAILED_VM_IS_NOT_DOWN ) ; }
Source:
protected void executeCommand ( ) { org.ovirt.engine.core.common.businessentities.StoragePoolIsoMap map = loadStoragePoolIsoMap ( ) ; changeDomainStatusWithCompensation ( map , StorageDomainStatus.Unknown , StorageDomainStatus.Locked , org.ovirt.engine.core.bll.storage.domain.DeactivateStorageDomainWithOvfUpdateCommand.getCompensationContext ( ) ) ; if ( shouldPerformOvfUpdate ( ) ) { org.ovirt.engine.core.common.action.ProcessOvfUpdateForStoragePoolParameters parameters = new org.ovirt.engine.core.common.action.ProcessOvfUpdateForStoragePoolParameters ( org.ovirt.engine.core.bll.storage.domain.DeactivateStorageDomainWithOvfUpdateCommand.getStoragePoolId ( ) ) ; runInternalAction ( VdcActionType.ProcessOvfUpdateForStoragePool , parameters , null ) ; runInternalActionWithTasksContext ( VdcActionType.ProcessOvfUpdateForStorageDomain , createProcessOvfUpdateForDomainParams ( ) , null ) ; } if ( org.ovirt.engine.core.bll.storage.domain.DeactivateStorageDomainWithOvfUpdateCommand.noAsyncOperations ( ) ) { executeDeactivateCommand ( ) ; } org.ovirt.engine.core.bll.storage.domain.DeactivateStorageDomainWithOvfUpdateCommand.setSucceeded ( true ) ; }

Target:
protected void executeCommand ( ) { org.ovirt.engine.core.common.businessentities.StoragePoolIsoMap map = loadStoragePoolIsoMap ( ) ; changeDomainStatusWithCompensation ( map , StorageDomainStatus.Unknown , StorageDomainStatus.Locked , org.ovirt.engine.core.bll.storage.domain.DeactivateStorageDomainWithOvfUpdateCommand.getCompensationContext ( ) ) ; if ( shouldPerformOvfUpdate ( ) ) { org.ovirt.engine.core.common.action.StoragePoolParametersBase parameters = new org.ovirt.engine.core.common.action.StoragePoolParametersBase ( org.ovirt.engine.core.bll.storage.domain.DeactivateStorageDomainWithOvfUpdateCommand.getStoragePoolId ( ) ) ; runInternalAction ( VdcActionType.ProcessOvfUpdateForStoragePool , parameters , null ) ; runInternalAction ( VdcActionType.UpdateOvfStoreForStorageDomain , createUpdateOvfStoreParams ( ) , org.ovirt.engine.core.bll.storage.domain.DeactivateStorageDomainWithOvfUpdateCommand.getContext ( ) ) ; } if ( org.ovirt.engine.core.bll.storage.domain.DeactivateStorageDomainWithOvfUpdateCommand.noAsyncOperations ( ) ) { executeDeactivateCommand ( ) ; } org.ovirt.engine.core.bll.storage.domain.DeactivateStorageDomainWithOvfUpdateCommand.setSucceeded ( true ) ; }
Source:
public void onValueChange ( com.google.gwt.event.logical.shared.ValueChangeEvent < T > event ) { T value = event.getValue ( ) ; boolean becomingGhost = isGhost ( value ) ; if ( becomingGhost != ( wasGhost ) ) { setButtonEnabled ( widget , ( ! becomingGhost ) ) ; toggleGhost ( value , widget , becomingGhost ) ; wasGhost = becomingGhost ; } }

Target:
public void onValueChange ( com.google.gwt.event.logical.shared.ValueChangeEvent < T > event ) { T value = event.getValue ( ) ; boolean becomingGhost = isGhost ( value ) ; if ( becomingGhost != ( wasGhost ) ) { setButtonsEnabled ( widget , ( ! becomingGhost ) ) ; toggleGhost ( value , widget , becomingGhost ) ; wasGhost = becomingGhost ; } }
Source:
public void setConsoleAddressPartiallyOverridden ( java.lang.Boolean consoleAddressPartiallyOverridden ) { if ( ( this . consoleAddressPartiallyOverridden ) != consoleAddressPartiallyOverridden ) { this . consoleAddressPartiallyOverridden = consoleAddressPartiallyOverridden ; onPropertyChanged ( new org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ( "consoleAddressPartiallyOverridden" ) ) ; } }

Target:
public void setConsoleAddressPartiallyOverridden ( java.lang.Boolean consoleAddressPartiallyOverridden ) { if ( ( isConsoleAddressPartiallyOverridden ( ) . booleanValue ( ) ) != ( consoleAddressPartiallyOverridden == null ? false : consoleAddressPartiallyOverridden.booleanValue ( ) ) ) { this . consoleAddressPartiallyOverridden = consoleAddressPartiallyOverridden ; onPropertyChanged ( new org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ( "consoleAddressPartiallyOverridden" ) ) ; } }
Source:
public void checkNoHost ( ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections newNFSConnection = createNFSConnection ( "multipass.my.domain.tlv.company.com:/export/allstorage/data2" , StorageType.NFS , NfsVersion.V4 , 300 , 0 ) ; parameters.setStorageServerConnection ( newNFSConnection ) ; parameters.setVdsId ( null ) ; parameters.setStorageServerConnection ( newNFSConnection ) ; org.mockito.Mockito.when ( storageConnDao.get ( newNFSConnection.getId ( ) ) ) . thenReturn ( oldNFSConnection ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionSuccess ( command ) ; }

Target:
public void checkNoHost ( ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections newNFSConnection = createNFSConnection ( "multipass.my.domain.tlv.company.com:/export/allstorage/data2" , StorageType.NFS , NfsVersion.V4 , 300 , 0 ) ; parameters.setStorageServerConnection ( newNFSConnection ) ; parameters.setVdsId ( null ) ; parameters.setStorageServerConnection ( newNFSConnection ) ; org.mockito.Mockito.when ( storageConnDao.get ( newNFSConnection.getId ( ) ) ) . thenReturn ( oldNFSConnection ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateSuccess ( command ) ; }