auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void getStorageDomainsByConnection ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , java.lang.String connectionPath ) { 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.StorageDomain > ) ( source ) ) : null ; } } ; org.ovirt.engine.core.common.queries.GetStorageDomainsByConnectionParameters param = new org.ovirt.engine.core.common.queries.GetStorageDomainsByConnectionParameters ( ) ; param.setConnection ( connectionPath ) ; if ( storagePoolId != null ) { param.setStoragePoolId ( storagePoolId ) ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainsByConnection , param , aQuery ) ; }

Target:
public void getStorageDomainsByConnection ( org.ovirt.engine.ui.frontend.AsyncQuery < java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > > aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , java.lang.String connectionPath ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.CastingConverter < > ( ) ; org.ovirt.engine.core.common.queries.GetStorageDomainsByConnectionParameters param = new org.ovirt.engine.core.common.queries.GetStorageDomainsByConnectionParameters ( ) ; param.setConnection ( connectionPath ) ; if ( storagePoolId != null ) { param.setStoragePoolId ( storagePoolId ) ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainsByConnection , param , aQuery ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { allNetworks = ( ( java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > ) ( returnValue ) ) ; initNetworkModels ( ) ; initDcNetworkParams ( ) ; queryInterfaces ( ) ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValueObj ) { java.lang.Object returnValue = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValueObj ) ) . getReturnValue ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.network.HostNicVfsConfig > allHostVfs = ( ( java.util.List < org.ovirt.engine.core.common.businessentities.network.HostNicVfsConfig > ) ( returnValue ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.HostNicVfsConfig vfsConfig : allHostVfs ) { originalVfsConfigs.add ( vfsConfig ) ; nicToVfsConfig.put ( vfsConfig.getNicId ( ) , new org.ovirt.engine.core.common.businessentities.network.HostNicVfsConfig ( vfsConfig ) ) ; } queryVfMap ( ) ; }
Source:
public org.ovirt.engine.sdk.decorators.TemplateNIC add ( org.ovirt.engine.sdk.decorators.NIC nic ) throws java.io.IOException , org.apache.http.client.ClientProtocolException , org.ovirt.engine.sdk.exceptions.ServerException { java.lang.String url = ( ( this . parent.getHref ( ) ) + ( SLASH ) ) + ( getName ( ) ) ; return getProxy ( ) . add ( url , nic , org.ovirt.engine.sdk.entities.NIC.class , org.ovirt.engine.sdk.decorators.TemplateNIC.class ) ; }

Target:
public org.ovirt.engine.sdk.decorators.TemplateNIC add ( org.ovirt.engine.sdk.decorators.NIC nic ) throws java.io.IOException , org.apache.http.client.ClientProtocolException , org.ovirt.engine.sdk.exceptions.ServerException { java.lang.String url = ( ( this . parent.getHref ( ) ) + ( SLASH ) ) + ( getName ( ) ) ; java.util.List < org.apache.http.Header > headers = new org.ovirt.engine.sdk.utils.HttpHeaderBuilder ( ) . build ( ) ; url = new org.ovirt.engine.sdk.utils.UrlBuilder ( url ) . build ( ) ; return getProxy ( ) . add ( url , nic , org.ovirt.engine.sdk.entities.NIC.class , org.ovirt.engine.sdk.decorators.TemplateNIC.class , headers ) ; }
Source:
private void initMinimalVmMemSize ( ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getMinimalVmMemSize ( new org.ovirt.engine.ui.frontend.AsyncQuery ( this , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel vmModel = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel ) ( target ) ) ; vmModel.set_MinMemSize ( ( ( java.lang.Integer ) ( returnValue ) ) ) ; } } , getHash ( ) ) ) ; }

Target:
public void setBootMenuEnabled ( org.ovirt.engine.ui.uicommonweb.models.EntityModel < java.lang.Boolean > bootMenuEnabled ) { this . bootMenuEnabled = bootMenuEnabled ; }
Source:
public void getAncestorImagesByImagesIds ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.util.List < org.ovirt.engine.core.compat.Guid > imagesIds ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter < java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.storage.DiskImage > > ( ) { @ java.lang.Override public java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.storage.DiskImage > Convert ( java.lang.Object returnValue , org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery ) { return ( ( java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.storage.DiskImage > ) ( returnValue ) ) ; } } ; org.ovirt.engine.core.common.queries.IdsQueryParameters params = new org.ovirt.engine.core.common.queries.IdsQueryParameters ( imagesIds ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAncestorImagesByImagesIds , params , aQuery ) ; }

Target:
public void getStorageDomainDefaultWipeAfterDelete ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.businessentities.storage.StorageType storageType ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean convert ( java.lang.Object returnValue , org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery ) { return ( ( java.lang.Boolean ) ( returnValue ) ) ; } } ; org.ovirt.engine.core.common.queries.GetStorageDomainDefaultWipeAfterDeleteParameters params = new org.ovirt.engine.core.common.queries.GetStorageDomainDefaultWipeAfterDeleteParameters ( storageType ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainDefaultWipeAfterDelete , params , aQuery ) ; }
Source:
private void expectGetDeviceList ( ) { org.ovirt.engine.core.common.vdscommands.VDSReturnValue returnValue = new org.ovirt.engine.core.common.vdscommands.VDSReturnValue ( ) ; returnValue.setSucceeded ( true ) ; returnValue.setReturnValue ( org.ovirt.engine.core.bll.storage.disk.lun.GetLunsByVgIdQueryTest.setUpLunsFromDeviceList ( ) ) ; org.mockito.Mockito.when ( vdsBrokerFrontendMock.runVdsCommand ( org.mockito.Matchers.eq ( VDSCommandType.GetDeviceList ) , org.mockito.Matchers.any ( org.ovirt.engine.core.common.vdscommands.GetDeviceListVDSCommandParameters.class ) ) ) . thenReturn ( returnValue ) ; }

Target:
private void expectGetDeviceList ( ) { org.ovirt.engine.core.common.vdscommands.VDSReturnValue returnValue = new org.ovirt.engine.core.common.vdscommands.VDSReturnValue ( ) ; returnValue.setSucceeded ( true ) ; returnValue.setReturnValue ( org.ovirt.engine.core.bll.storage.disk.lun.GetLunsByVgIdQueryTest.setUpLunsFromDeviceList ( ) ) ; org.mockito.Mockito.when ( vdsBrokerFrontendMock.RunVdsCommand ( org.mockito.Matchers.eq ( VDSCommandType.GetDeviceList ) , org.mockito.Matchers.any ( org.ovirt.engine.core.common.vdscommands.GetDeviceListVDSCommandParameters.class ) ) ) . thenReturn ( returnValue ) ; }
Source:
private void initTemplateDiskImage ( ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage diskImage = new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ; diskImage.setVmEntityType ( VmEntityType.TEMPLATE ) ; org.mockito.Mockito.when ( diskImageDao.get ( org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( diskImage ) ; }

Target:
public void moveShareableDisk ( ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage disk = new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ; disk.setShareable ( true ) ; initializeCommand ( disk , VmEntityType.VM ) ; initSrcStorageDomain ( ) ; initDestStorageDomain ( StorageType.NFS ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateSuccess ( command ) ; }
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 ) { if ( ( ( getIsImportGlusterConfiguration ( ) . getEntity ( ) ) != null ) && ( getIsImportGlusterConfiguration ( ) . getEntity ( ) ) ) { getGlusterHostAddress ( ) . setIsChangable ( true ) ; getGlusterHostPassword ( ) . setIsChangable ( true ) ; } else { getGlusterHostAddress ( ) . setIsChangable ( false ) ; getGlusterHostPassword ( ) . setIsChangable ( false ) ; } }

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 ) { if ( ( ( getIsImportGlusterConfiguration ( ) . getEntity ( ) ) != null ) && ( getIsImportGlusterConfiguration ( ) . getEntity ( ) ) ) { getGlusterHostAddress ( ) . setIsChangeable ( true ) ; getGlusterHostPassword ( ) . setIsChangeable ( true ) ; } else { getGlusterHostAddress ( ) . setIsChangeable ( false ) ; getGlusterHostPassword ( ) . setIsChangeable ( false ) ; } }
Source:
public void eventRaised ( org.ovirt.engine.core.compat.Event ev , java.lang.Object sender , org.ovirt.engine.core.compat.EventArgs args ) { if ( ( modelProvider.getModel ( ) . getSelectedItem ( ) ) == null ) { return ; } @ java.lang.SuppressWarnings ( value = "unchecked" ) java.lang.Iterable < org.ovirt.engine.core.common.businessentities.DiskImage > diskImages = modelProvider.getModel ( ) . getvmBasicDiskListModel ( ) . getItems ( ) ; getView ( ) . editDistItems ( diskImages ) ; }

Target:
private void setupDisks ( final org.ovirt.engine.ui.userportal.uicommon.model.basic.UserPortalBasicListProvider modelProvider ) { @ java.lang.SuppressWarnings ( value = "unchecked" ) java.lang.Iterable < org.ovirt.engine.core.common.businessentities.DiskImage > diskImages = modelProvider.getModel ( ) . getvmBasicDiskListModel ( ) . getItems ( ) ; if ( diskImages != null ) { getView ( ) . editDistItems ( diskImages ) ; } }
Source:
public org.ovirt.engine.sdk.entities.Host createHost ( java.lang.String name , java.lang.Long memory ) { org.ovirt.engine.sdk.entities.Host host = new org.ovirt.engine.sdk.entities.Host ( ) ; host.setName ( name ) ; host.setId ( name ) ; host.setMemory ( memory ) ; host.setCluster ( cluster ) ; host.setCpu ( new org.ovirt.engine.sdk.entities.CPU ( ) ) ; host.getCpu ( ) . setArchitecture ( "Westmere" ) ; host.getCpu ( ) . setTopology ( new org.ovirt.engine.sdk.entities.CpuTopology ( ) ) ; bestSolution.getHosts ( ) . add ( host ) ; return host ; }

Target:
public org.ovirt.optimizer.solver.test.TestOptimizer addVm ( org.ovirt.engine.sdk.entities.VM vm ) { bestSolution.getVms ( ) . put ( vm.getId ( ) , vm ) ; final org.ovirt.optimizer.solver.facts.Instance instance = new org.ovirt.optimizer.solver.facts.Instance ( vm ) ; primaryInstances.put ( vm , instance ) ; bestSolution.getInstances ( ) . add ( instance ) ; return this ; }
Source:
public void edit ( ) { if ( ( getWindow ( ) ) != null ) { return ; } org.ovirt.engine.ui.uicommonweb.models.profiles.EditVnicProfileModel model = new org.ovirt.engine.ui.uicommonweb.models.profiles.EditVnicProfileModel ( this , getEntity ( ) . getCompatibilityVersion ( ) , ( ( org.ovirt.engine.core.common.businessentities.network.VnicProfileView ) ( getSelectedItem ( ) ) ) ) ; setWindow ( model ) ; initProfileNetwork ( model ) ; }

Target:
public void edit ( ) { if ( ( getWindow ( ) ) != null ) { return ; } org.ovirt.engine.ui.uicommonweb.models.profiles.EditVnicProfileModel model = new org.ovirt.engine.ui.uicommonweb.models.profiles.EditVnicProfileModel ( this , getEntity ( ) . getCompatibilityVersion ( ) , ( ( org.ovirt.engine.core.common.businessentities.network.VnicProfileView ) ( getSelectedItem ( ) ) ) , getEntity ( ) . getDataCenterId ( ) ) ; setWindow ( model ) ; initProfileNetwork ( model ) ; }
Source:
protected void authenticate ( org.ovirt.engine.core.utils.ssh.SSHClient client , java.lang.String userId , java.lang.String password ) throws javax.naming.AuthenticationException { client.setUser ( userId ) ; client.setPassword ( password ) ; try { client.authenticate ( ) ; } catch ( javax.naming.AuthenticationException e ) { throw e ; } catch ( java.lang.Exception e ) { log.errorFormat ( "Exception during authentication!" , e ) ; throw new java.lang.RuntimeException ( e ) ; } }

Target:
protected void authenticate ( org.ovirt.engine.core.bll.utils.EngineSSHClient client , java.lang.String userId , java.lang.String password ) throws javax.naming.AuthenticationException { client.setUser ( userId ) ; client.setPassword ( password ) ; try { client.authenticate ( ) ; } catch ( javax.naming.AuthenticationException e ) { throw e ; } catch ( java.lang.Exception e ) { log.errorFormat ( "Exception during authentication!" , e ) ; throw new java.lang.RuntimeException ( e ) ; } }
Source:
public static void getStorageDomainsByConnection ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , java.lang.String connectionPath ) { 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.StorageDomain > ) ( source ) ) : null ; } } ; org.ovirt.engine.core.common.queries.GetStorageDomainsByConnectionParameters param = new org.ovirt.engine.core.common.queries.GetStorageDomainsByConnectionParameters ( ) ; param.setConnection ( connectionPath ) ; if ( storagePoolId != null ) { param.setStoragePoolId ( storagePoolId ) ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainsByConnection , param , aQuery ) ; }

Target:
public static void isSupportBridgesReportByVDSM ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String version ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Boolean ) ( source ) ) . booleanValue ( ) : true ; } } ; org.ovirt.engine.core.common.queries.GetConfigurationValueParameters tempVar = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.SupportBridgesReportByVDSM ) ; tempVar.setVersion ( version ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( tempVar , aQuery ) ; }
Source:
public org.ovirt.engine.core.common.AuditLogType getAuditLogTypeValue ( ) { switch ( org.ovirt.engine.core.bll.AddDiskCommand.getActionState ( ) ) { case EXECUTE : return org.ovirt.engine.core.bll.AddDiskCommand.getSucceeded ( ) ? org.ovirt.engine.core.common.AuditLogType.USER_ADD_DISK_TO_VM : org.ovirt.engine.core.common.AuditLogType.USER_FAILED_ADD_DISK_TO_VM ; case END_SUCCESS : return org.ovirt.engine.core.bll.AddDiskCommand.getSucceeded ( ) ? org.ovirt.engine.core.common.AuditLogType.USER_ADD_DISK_TO_VM_FINISHED_SUCCESS : org.ovirt.engine.core.common.AuditLogType.USER_ADD_DISK_TO_VM_FINISHED_FAILURE ; default : return org.ovirt.engine.core.common.AuditLogType.USER_ADD_DISK_TO_VM_FINISHED_FAILURE ; } }

Target:
private org.ovirt.engine.core.common.AuditLogType getExecuteAuditLogTypeValue ( boolean successful ) { boolean isVmNameExist = org.apache.commons.lang.StringUtils.isNotEmpty ( org.ovirt.engine.core.bll.AddDiskCommand.getVmName ( ) ) ; if ( successful ) { if ( isVmNameExist ) { return org.ovirt.engine.core.common.AuditLogType.USER_ADD_DISK_TO_VM ; } else { return org.ovirt.engine.core.common.AuditLogType.USER_ADD_DISK ; } } else { if ( isVmNameExist ) { return org.ovirt.engine.core.common.AuditLogType.USER_FAILED_ADD_DISK_TO_VM ; } else { return org.ovirt.engine.core.common.AuditLogType.USER_FAILED_ADD_DISK ; } } }
Source:
public org.ovirt.engine.core.common.businessentities.TagsVmMap mapRow ( java.sql.ResultSet rs , int rowNum ) throws java.sql.SQLException { org.ovirt.engine.core.common.businessentities.TagsVmMap entity = new org.ovirt.engine.core.common.businessentities.TagsVmMap ( ) ; entity.settag_id ( org.ovirt.engine.core.compat.Guid.createGuidFromString ( rs.getString ( "tag_id" ) ) ) ; entity.setvm_id ( org.ovirt.engine.core.compat.Guid.createGuidFromString ( rs.getString ( "vm_id" ) ) ) ; entity.setDefaultDisplayType ( ( ( java.lang.Integer ) ( rs.getObject ( "DefaultDisplayType" ) ) ) ) ; return entity ; }

Target:
public org.ovirt.engine.core.common.businessentities.TagsVmMap mapRow ( java.sql.ResultSet rs , int rowNum ) throws java.sql.SQLException { org.ovirt.engine.core.common.businessentities.TagsVmMap entity = new org.ovirt.engine.core.common.businessentities.TagsVmMap ( ) ; entity.settag_id ( org.ovirt.engine.core.compat.Guid.createGuidFromStringDefaultEmpty ( rs.getString ( "tag_id" ) ) ) ; entity.setvm_id ( org.ovirt.engine.core.compat.Guid.createGuidFromStringDefaultEmpty ( rs.getString ( "vm_id" ) ) ) ; entity.setDefaultDisplayType ( ( ( java.lang.Integer ) ( rs.getObject ( "DefaultDisplayType" ) ) ) ) ; return entity ; }
Source:
protected boolean performLiveSnapshot ( final org.ovirt.engine.core.common.businessentities.Snapshot snapshot ) { try { org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInScope ( TransactionScopeOption.Suppress , new org.ovirt.engine.core.utils.transaction.TransactionMethod < java.lang.Void > ( ) { @ java.lang.Override public java.lang.Void runInTransaction ( ) { runVdsCommand ( VDSCommandType.Snapshot , buildLiveSnapshotParameters ( snapshot ) ) ; return null ; } } ) ; } catch ( org.ovirt.engine.core.common.errors.VdcBLLException e ) { handleVdsLiveSnapshotFailure ( e ) ; return false ; } return true ; }

Target:
protected boolean performLiveSnapshot ( final org.ovirt.engine.core.common.businessentities.Snapshot snapshot ) { try { org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInScope ( TransactionScopeOption.Suppress , new org.ovirt.engine.core.utils.transaction.TransactionMethod < java.lang.Void > ( ) { @ java.lang.Override public java.lang.Void runInTransaction ( ) { runVdsCommand ( VDSCommandType.Snapshot , buildLiveSnapshotParameters ( snapshot ) ) ; return null ; } } ) ; } catch ( org.ovirt.engine.core.common.errors.EngineException e ) { handleVdsLiveSnapshotFailure ( e ) ; return false ; } return true ; }
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 ) { if ( "SearchString" . equals ( args.propertyName ) ) { if ( ! ( model.isSearchValidForServerSideSorting ( ) ) ) { model.clearSortOptions ( ) ; clearColumnSort ( ) ; } } }

Target:
public void onSelectionChange ( com.google.gwt.view.client.SelectionChangeEvent event ) { if ( selectionModel.getSelectedList ( ) . isEmpty ( ) ) { scrollOffset = 0 ; } else { updateScrollPosition ( ) ; } enforceScrollPosition ( ) ; }
Source:
public void getGlusterHooks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterHooks , new org.ovirt.engine.core.common.queries.gluster.GlusterParameters ( clusterId ) , aQuery ) ; }

Target:
public void getGlusterHostsNewlyAdded ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId , boolean isFingerprintRequired ) { 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.GetAddedGlusterServers , new org.ovirt.engine.core.common.queries.gluster.AddedGlusterServersParameters ( clusterId , isFingerprintRequired ) , aQuery ) ; }
Source:
private static org.ovirt.engine.core.common.businessentities.network.NetworkCluster cloneNetworkCluster ( org.ovirt.engine.core.common.businessentities.network.NetworkCluster instance ) { org.ovirt.engine.core.common.businessentities.network.NetworkCluster obj = new org.ovirt.engine.core.common.businessentities.network.NetworkCluster ( ) ; obj.setId ( instance.getId ( ) ) ; obj.setStatus ( instance.getStatus ( ) ) ; obj.setDisplay ( instance.isDisplay ( ) ) ; obj.setRequired ( instance.isRequired ( ) ) ; obj.setMigration ( instance.isMigration ( ) ) ; return obj ; }

Target:
private static org.ovirt.engine.core.common.businessentities.network.NetworkCluster cloneNetworkCluster ( org.ovirt.engine.core.common.businessentities.network.NetworkCluster instance ) { org.ovirt.engine.core.common.businessentities.network.NetworkCluster obj = new org.ovirt.engine.core.common.businessentities.network.NetworkCluster ( ) ; obj.setId ( instance.getId ( ) ) ; obj.setStatus ( instance.getStatus ( ) ) ; obj.setDisplay ( instance.isDisplay ( ) ) ; obj.setRequired ( instance.isRequired ( ) ) ; obj.setMigration ( instance.isMigration ( ) ) ; obj.setManagement ( instance.isManagement ( ) ) ; obj.setGluster ( instance.isGluster ( ) ) ; return obj ; }
Source:
private void mockVdsGroup ( ) { vdsGroup = org.mockito.Mockito.mock ( org.ovirt.engine.core.common.businessentities.VDSGroup.class ) ; org.mockito.Mockito.doReturn ( clusterId ) . when ( vdsGroup ) . getId ( ) ; org.mockito.Mockito.doReturn ( storagePoolId ) . when ( vdsGroup ) . getStoragePoolId ( ) ; org.mockito.Mockito.doReturn ( ArchitectureType.x86_64 ) . when ( vdsGroup ) . getArchitecture ( ) ; org.mockito.Mockito.doReturn ( null ) . when ( vdsGroup ) . getcompatibility_version ( ) ; }

Target:
private void mockVdsGroup ( ) { vdsGroup = org.mockito.Mockito.mock ( org.ovirt.engine.core.common.businessentities.VDSGroup.class ) ; org.mockito.Mockito.doReturn ( clusterId ) . when ( vdsGroup ) . getId ( ) ; org.mockito.Mockito.doReturn ( storagePoolId ) . when ( vdsGroup ) . getStoragePoolId ( ) ; org.mockito.Mockito.doReturn ( ArchitectureType.x86_64 ) . when ( vdsGroup ) . getArchitecture ( ) ; org.mockito.Mockito.doReturn ( null ) . when ( vdsGroup ) . getCompatibilityVersion ( ) ; }
Source:
public void setUp ( ) throws java.lang.Exception { macPool = new org.ovirt.engine.core.common.businessentities.MacPool ( ) ; final org.ovirt.engine.core.dal.dbbroker.DbFacade dbFacadeMock = org.mockito.Mockito.mock ( org.ovirt.engine.core.dal.dbbroker.DbFacade.class ) ; org.ovirt.engine.core.dal.dbbroker.DbFacadeLocator.setDbFacade ( dbFacadeMock ) ; org.mockito.Mockito.when ( dbFacadeMock.getMacPoolDao ( ) ) . thenReturn ( macPoolDaoMock ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { this . macPoolValidator = createMacPoolValidator ( macPool ) ; org.mockito.Mockito.when ( dbFacadeMock.getMacPoolDao ( ) ) . thenReturn ( macPoolDaoMock ) ; org.mockito.Mockito.when ( dbFacadeMock.getStoragePoolDao ( ) ) . thenReturn ( storagePoolDao ) ; }
Source:
public void testGetAllQuotaSearch ( ) throws java.lang.Exception { org.ovirt.engine.core.common.queries.SearchParameters searchParam = new org.ovirt.engine.core.common.queries.SearchParameters ( "Quota:" , org.ovirt.engine.core.common.interfaces.SearchType.Quota ) ; org.ovirt.engine.core.bll.SearchQuery < org.ovirt.engine.core.common.queries.SearchParameters > searchQuery = spySearchQuery ( searchParam ) ; searchQuery.executeQueryCommand ( ) ; org.junit.Assert.assertTrue ( ( ( quotaResultList ) == ( searchQuery.getQueryReturnValue ( ) . getReturnValue ( ) ) ) ) ; }

Target:
public void testGetAllQuotaSearch ( ) throws java.lang.Exception { org.ovirt.engine.core.common.queries.SearchParameters searchParam = new org.ovirt.engine.core.common.queries.SearchParameters ( ( "Quota" + ( org.ovirt.engine.core.common.utils.CommonConstants.QUERY_RETURN_TYPE_SEPARATOR ) ) , org.ovirt.engine.core.common.interfaces.SearchType.Quota ) ; org.ovirt.engine.core.bll.SearchQuery < org.ovirt.engine.core.common.queries.SearchParameters > searchQuery = spySearchQuery ( searchParam ) ; searchQuery.executeQueryCommand ( ) ; org.junit.Assert.assertTrue ( ( ( quotaResultList ) == ( searchQuery.getQueryReturnValue ( ) . getReturnValue ( ) ) ) ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.StorageDomain prepareStorageDomainForElection ( org.ovirt.engine.core.common.businessentities.StorageDomainStatus status , java.lang.String name , boolean isHostedEngine ) { final org.ovirt.engine.core.common.businessentities.StorageDomain domain = createDataStorageDomain ( status , name , HE_SD_ID ) ; domain.setHostedEngineStorage ( isHostedEngine ) ; org.mockito.Mockito.when ( storageDomainDao.getAllForStoragePool ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( java.util.Collections.singletonList ( domain ) ) ; cmd.setStoragePool ( new org.ovirt.engine.core.common.businessentities.StoragePool ( ) ) ; return domain ; }

Target:
private org.ovirt.engine.core.common.businessentities.StorageDomain prepareStorageDomainForElection ( org.ovirt.engine.core.common.businessentities.StorageDomainStatus status , java.lang.String name , boolean isHostedEngine ) { final org.ovirt.engine.core.common.businessentities.StorageDomain domain = createDataStorageDomain ( status , name , HE_SD_ID ) ; domain.setHostedEngineStorage ( isHostedEngine ) ; org.mockito.Mockito.when ( storageDomainDao.getAllForStoragePool ( org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( java.util.Collections.singletonList ( domain ) ) ; cmd.setStoragePool ( new org.ovirt.engine.core.common.businessentities.StoragePool ( ) ) ; return domain ; }
Source:
protected void OnSelectedItemChanged ( ) { super . OnSelectedItemChanged ( ) ; UpdateActionAvailability ( ) ; if ( ( ( getSelectedItem ( ) ) != null ) && ( ! ( getIsBookmarkInitiated ( ) ) ) ) { setIsBookmarkInitiated ( true ) ; getNavigatedEvent ( ) . raise ( this , new org.ovirt.engine.ui.uicommonweb.models.bookmarks.BookmarkEventArgs ( ( ( org.ovirt.engine.core.common.businessentities.Bookmark ) ( getSelectedItem ( ) ) ) ) ) ; setIsBookmarkInitiated ( false ) ; } }

Target:
protected void onSelectedItemChanged ( ) { super . onSelectedItemChanged ( ) ; UpdateActionAvailability ( ) ; if ( ( ( getSelectedItem ( ) ) != null ) && ( ! ( getIsBookmarkInitiated ( ) ) ) ) { setIsBookmarkInitiated ( true ) ; getNavigatedEvent ( ) . raise ( this , new org.ovirt.engine.ui.uicommonweb.models.bookmarks.BookmarkEventArgs ( ( ( org.ovirt.engine.core.common.businessentities.Bookmark ) ( getSelectedItem ( ) ) ) ) ) ; setIsBookmarkInitiated ( false ) ; } }
Source:
protected void doTestBadAdd ( boolean valid , boolean success , java.lang.String detail ) throws java.lang.Exception { setUpGetEntityExpectations ( VdcQueryType.GetVmByVmId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ 1 ] } , setUpVm ( GUIDS [ 1 ] ) ) ; setUpGetConsoleExpectations ( 1 ) ; setUpGetSoundcardExpectations ( 1 ) ; super . doTestBadAdd ( valid , success , detail ) ; }

Target:
protected void doTestBadAdd ( boolean valid , boolean success , java.lang.String detail ) throws java.lang.Exception { setUpGetEntityExpectations ( QueryType.GetVmByVmId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ 1 ] } , setUpVm ( GUIDS [ 1 ] ) ) ; setUpGetConsoleExpectations ( 1 ) ; setUpGetSoundcardExpectations ( 1 ) ; super . doTestBadAdd ( valid , success , detail ) ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult isStorageDomainTypeFitsPoolIfMixed ( ) { boolean isBlockDomain = storageDomainStatic.getStorageType ( ) . isBlockDomain ( ) ; if ( ! ( isMixedTypesAllowedInDC ( ) ) ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.StorageType > storageTypesOnPool = getStoragePoolDao ( ) . getStorageTypesInPool ( storagePool.getId ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.storage.StorageType storageType : storageTypesOnPool ) { if ( ( storageType.isBlockDomain ( ) ) != isBlockDomain ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.ACTION_TYPE_FAILED_MIXED_STORAGE_TYPES_NOT_ALLOWED ) ; } } } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult isStorageDomainTypeFitsPoolIfMixed ( ) { boolean isBlockDomain = storageDomainStatic.getStorageType ( ) . isBlockDomain ( ) ; if ( ! ( isMixedTypesAllowedInDC ( ) ) ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.StorageType > storageTypesOnPool = getStoragePoolDao ( ) . getStorageTypesInPool ( storagePool.getId ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.storage.StorageType storageType : storageTypesOnPool ) { if ( ( storageType.isBlockDomain ( ) ) != isBlockDomain ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_MIXED_STORAGE_TYPES_NOT_ALLOWED ) ; } } } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }
Source:
public void eventRaised ( org.ovirt.engine.core.compat.Event ev , java.lang.Object sender , org.ovirt.engine.core.compat.EventArgs args ) { if ( ( ( java.lang.Boolean ) ( model.getSpecificClusterQuota ( ) . getEntity ( ) ) ) ) { quotaClusterTable.insertColumn ( 0 , isClusterInQuotaColumn ) ; quotaClusterTable.edit ( model.getAllDataCenterClusters ( ) ) ; } else { quotaClusterTable.removeColumn ( isClusterInQuotaColumn ) ; quotaClusterTable.edit ( model.getQuotaClusters ( ) ) ; } }

Target:
public void eventRaised ( org.ovirt.engine.core.compat.Event ev , java.lang.Object sender , org.ovirt.engine.core.compat.EventArgs args ) { if ( ( ( java.lang.Boolean ) ( model.getSpecificClusterQuota ( ) . getEntity ( ) ) ) ) { quotaClusterTable.insertColumn ( 0 , isClusterInQuotaColumn ) ; quotaClusterTable.setColumnWidth ( isClusterInQuotaColumn , "30px" ) ; quotaClusterTable.edit ( model.getAllDataCenterClusters ( ) ) ; } else { quotaClusterTable.removeColumn ( isClusterInQuotaColumn ) ; quotaClusterTable.edit ( model.getQuotaClusters ( ) ) ; } }
Source:
public void testGetBaseNicVerifyDelegation ( ) throws java.lang.Exception { org.ovirt.engine.core.vdsbroker.CalculateBaseNic spy = org.mockito.Mockito.spy ( calculateBaseNic ) ; spy.getBaseNic ( baseNic ) ; org.mockito.Mockito.verify ( spy ) . getBaseNic ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface.class ) , org.mockito.Matchers.anyMapOf ( java.lang.String.class , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface.class ) ) ; }

Target:
public void testGetBaseNicVerifyDelegation ( ) throws java.lang.Exception { org.ovirt.engine.core.vdsbroker.CalculateBaseNic spy = org.mockito.Mockito.spy ( calculateBaseNic ) ; spy.getBaseNic ( baseNic ) ; org.mockito.Mockito.verify ( spy ) . getBaseNic ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface.class ) , org.mockito.ArgumentMatchers.isNull ( ) ) ; }
Source:
private void removeTemplateFromDb ( ) { org.ovirt.engine.core.bll.RemoveVmTemplateCommand.removeNetwork ( ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmTemplateDao ( ) . remove ( org.ovirt.engine.core.bll.RemoveVmTemplateCommand.getVmTemplate ( ) . getId ( ) ) ; }

Target:
private void removeTemplateFromDb ( ) { org.ovirt.engine.core.bll.RemoveVmTemplateCommand.removeNetwork ( ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmTemplateDao ( ) . remove ( org.ovirt.engine.core.bll.RemoveVmTemplateCommand.getVmTemplate ( ) . getId ( ) ) ; vmIconDao.removeIfUnused ( org.ovirt.engine.core.bll.RemoveVmTemplateCommand.getVmTemplate ( ) . getSmallIconId ( ) ) ; vmIconDao.removeIfUnused ( org.ovirt.engine.core.bll.RemoveVmTemplateCommand.getVmTemplate ( ) . getLargeIconId ( ) ) ; }
Source:
private void setUpGetVmExpectations ( int times ) throws java.lang.Exception { while ( ( times -- ) > 0 ) { setUpGetEntityExpectations ( VdcQueryType.GetVmByVmId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , getVmEntity ( ) ) ; } }

Target:
private void setUpGetVmExpectations ( int times ) throws java.lang.Exception { while ( ( times -- ) > 0 ) { setUpGetEntityExpectations ( QueryType.GetVmByVmId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , getVmEntity ( ) ) ; } }
Source:
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.Cluster > list = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Cluster > ) ( 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.Cluster > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllClustersHavingHosts , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }

Target:
public void isTemplateNameUnique ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String templateName , 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.lang.Boolean ) ( source ) ) ) ; } } ; org.ovirt.engine.core.common.queries.NameQueryParameters params = new org.ovirt.engine.core.common.queries.NameQueryParameters ( templateName ) ; params.setDatacenterId ( datacenterId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.IsVmTemlateWithSameNameExist , params , aQuery ) ; }
Source:
public javax.ws.rs.core.Response remove ( org.ovirt.engine.api.model.Action action ) { get ( ) ; if ( ( action.isSetDetach ( ) ) && ( action.isDetach ( ) ) ) { return performAction ( VdcActionType.DetachDiskFromVm , new org.ovirt.engine.core.common.action.AttachDetachVmDiskParameters ( vmId , guid ) ) ; } else { return performAction ( VdcActionType.RemoveDisk , new org.ovirt.engine.core.common.action.RemoveDiskParameters ( guid ) ) ; } }

Target:
public javax.ws.rs.core.Response remove ( ) { get ( ) ; boolean detach = org.ovirt.engine.api.common.util.QueryHelper.getBooleanMatrixParameter ( uriInfo , org.ovirt.engine.api.restapi.resource.BackendVmDiskResource.DETACH_ONLY , true , false ) ; if ( detach ) { return performAction ( VdcActionType.DetachDiskFromVm , new org.ovirt.engine.core.common.action.AttachDetachVmDiskParameters ( vmId , guid ) ) ; } else { return performAction ( VdcActionType.RemoveDisk , new org.ovirt.engine.core.common.action.RemoveDiskParameters ( guid ) ) ; } }
Source:
public void hostProviderDoesNotExist ( ) { org.mockito.Mockito.when ( host.getHostProviderId ( ) ) . thenReturn ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; org.mockito.Mockito.when ( providerDao.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( null ) ; org.mockito.Mockito.when ( dbFacade.getProviderDao ( ) ) . thenReturn ( providerDao ) ; validator = new org.ovirt.engine.core.bll.validator.UpdateHostValidator ( dbFacade , oldHost , host , false ) ; org.junit.Assert.assertThat ( validator.hostProviderExists ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( VdcBllMessages.ACTION_TYPE_FAILED_PROVIDER_DOESNT_EXIST ) ) ; }

Target:
public void hostProviderDoesNotExist ( ) { org.mockito.Mockito.when ( host.getHostProviderId ( ) ) . thenReturn ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; org.mockito.Mockito.when ( providerDao.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( null ) ; org.mockito.Mockito.when ( dbFacade.getProviderDao ( ) ) . thenReturn ( providerDao ) ; validator = new org.ovirt.engine.core.bll.validator.UpdateHostValidator ( dbFacade , oldHost , host , false ) ; org.junit.Assert.assertThat ( validator.hostProviderExists ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.ACTION_TYPE_FAILED_PROVIDER_DOESNT_EXIST ) ) ; }
Source:
protected void detachStorageDomainWithEntities ( org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain ) { java.util.List < org.ovirt.engine.core.common.businessentities.VM > vmsForStorageDomain = org.ovirt.engine.core.bll.storage.StorageHandlingCommandBase.getVmDAO ( ) . getAllForStorageDomain ( storageDomain.getId ( ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VmTemplate > vmTemplatesForStorageDomain = org.ovirt.engine.core.bll.storage.StorageHandlingCommandBase.getVmTemplateDAO ( ) . getAllForStorageDomain ( storageDomain.getId ( ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > disksForStorageDomain = getDiskImageDao ( ) . getAllForStorageDomain ( storageDomain.getId ( ) ) ; removeEntitiesFromStorageDomain ( vmsForStorageDomain , vmTemplatesForStorageDomain , disksForStorageDomain , storageDomain.getId ( ) ) ; }

Target:
protected void detachStorageDomainWithEntities ( org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain ) { java.util.List < org.ovirt.engine.core.common.businessentities.VM > vmsForStorageDomain = org.ovirt.engine.core.bll.storage.StorageHandlingCommandBase.getVmDao ( ) . getAllForStorageDomain ( storageDomain.getId ( ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VmTemplate > vmTemplatesForStorageDomain = org.ovirt.engine.core.bll.storage.StorageHandlingCommandBase.getVmTemplateDao ( ) . getAllForStorageDomain ( storageDomain.getId ( ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > disksForStorageDomain = getDiskImageDao ( ) . getAllForStorageDomain ( storageDomain.getId ( ) ) ; removeEntitiesFromStorageDomain ( vmsForStorageDomain , vmTemplatesForStorageDomain , disksForStorageDomain , storageDomain.getId ( ) ) ; }
Source:
public boolean equals ( java.lang.Object obj ) { if ( ( this ) == obj ) { return true ; } if ( ! ( super . equals ( obj ) ) ) { return false ; } if ( ! ( obj instanceof org.ovirt.engine.core.common.businessentities.storage.LunDisk ) ) { return false ; } org.ovirt.engine.core.common.businessentities.storage.LunDisk other = ( ( org.ovirt.engine.core.common.businessentities.storage.LunDisk ) ( obj ) ) ; return ( org.ovirt.engine.core.common.utils.ObjectUtils.objectsEqual ( lun , other.lun ) ) && ( org.ovirt.engine.core.common.utils.ObjectUtils.objectsEqual ( usingScsiReservation , other.usingScsiReservation ) ) ; }

Target:
public boolean equals ( java.lang.Object obj ) { if ( ( this ) == obj ) { return true ; } if ( ! ( super . equals ( obj ) ) ) { return false ; } if ( ! ( obj instanceof org.ovirt.engine.core.common.businessentities.storage.LunDisk ) ) { return false ; } org.ovirt.engine.core.common.businessentities.storage.LunDisk other = ( ( org.ovirt.engine.core.common.businessentities.storage.LunDisk ) ( obj ) ) ; return ( java.util.Objects.equals ( lun , other.lun ) ) && ( java.util.Objects.equals ( usingScsiReservation , other.usingScsiReservation ) ) ; }
Source:
private boolean performStorageDomainsChecks ( org.ovirt.engine.core.common.action.LiveMigrateDiskParameters parameters ) { org.ovirt.engine.core.common.businessentities.StorageDomain sourceDomain = getImageSourceDomain ( parameters.getImageId ( ) ) ; org.ovirt.engine.core.common.businessentities.StorageDomain destDomain = getStorageDomainById ( parameters.getTargetStorageDomainId ( ) , org.ovirt.engine.core.bll.storage.lsm.LiveMigrateVmDisksCommand.getStoragePoolId ( ) ) ; return ( ( validateSourceStorageDomain ( sourceDomain ) ) && ( validateDestStorage ( destDomain ) ) ) && ( ( liveStorageMigrationSupportedBetweenDifferentStorageTypes ( ) ) || ( validateDestStorageAndSourceStorageOfSameTypes ( destDomain , sourceDomain ) ) ) ; }

Target:
private java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > getMovedDisks ( ) { java.util.Set < org.ovirt.engine.core.compat.Guid > movedDiskIds = getMovedDiskIds ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > disks = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.core.compat.Guid diskId : movedDiskIds ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage disk = new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ; disk.setId ( diskId ) ; disks.add ( disk ) ; } return disks ; }
Source:
protected void updateDiskProfile ( org.ovirt.engine.core.common.businessentities.DiskImage diskImage ) { if ( isDiskImage ( ) ) { org.ovirt.engine.core.common.businessentities.DiskImage oldDisk = ( ( org.ovirt.engine.core.common.businessentities.DiskImage ) ( getOldDisk ( ) ) ) ; if ( ! ( java.util.Objects.equals ( oldDisk.getDiskProfileId ( ) , diskImage.getDiskProfileId ( ) ) ) ) { org.ovirt.engine.core.bll.UpdateVmDiskCommand.getImageStorageDomainMapDao ( ) . updateDiskProfileForImageAndSnapshots ( diskImage.getId ( ) , diskImage.getStorageIds ( ) . get ( 0 ) , diskImage.getDiskProfileIds ( ) . get ( 0 ) ) ; } } }

Target:
protected void updateDiskProfile ( ) { if ( isDiskImage ( ) ) { org.ovirt.engine.core.common.businessentities.DiskImage oldDisk = ( ( org.ovirt.engine.core.common.businessentities.DiskImage ) ( getOldDisk ( ) ) ) ; org.ovirt.engine.core.common.businessentities.DiskImage newDisk = ( ( org.ovirt.engine.core.common.businessentities.DiskImage ) ( getNewDisk ( ) ) ) ; if ( ! ( java.util.Objects.equals ( oldDisk.getDiskProfileId ( ) , newDisk.getDiskProfileId ( ) ) ) ) { org.ovirt.engine.core.bll.UpdateVmDiskCommand.getImageStorageDomainMapDao ( ) . updateDiskProfileByImageGroupIdAndStorageDomainId ( newDisk.getId ( ) , newDisk.getStorageIds ( ) . get ( 0 ) , newDisk.getDiskProfileId ( ) ) ; } } }
Source:
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 ) ; }

Target:
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.core.common.config.Config.DefaultConfigurationVersion ) , aQuery ) ; }
Source:
protected void verifyModel ( org.ovirt.engine.api.model.Step model , int index ) { org.junit.Assert.assertEquals ( GUIDS [ index ] . toString ( ) , model.getId ( ) ) ; org.junit.Assert.assertEquals ( DESCRIPTIONS [ index ] , model.getDescription ( ) ) ; org.junit.Assert.assertTrue ( model.isExternal ( ) ) ; org.junit.Assert.assertNotNull ( model.getJob ( ) ) ; verifyLinks ( model ) ; }

Target:
protected void verifyModel ( org.ovirt.engine.api.model.Step model , int index ) { org.junit.jupiter.api.Assertions.assertEquals ( GUIDS [ index ] . toString ( ) , model.getId ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( DESCRIPTIONS [ index ] , model.getDescription ( ) ) ; org.junit.jupiter.api.Assertions.assertTrue ( model.isExternal ( ) ) ; org.junit.jupiter.api.Assertions.assertNotNull ( model.getJob ( ) ) ; verifyLinks ( model ) ; }
Source:
private static java.lang.String getDomainIdTuple ( org.ovirt.engine.core.compat.Guid domainId ) { org.ovirt.engine.core.common.businessentities.storage_domain_static storage_domain = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStorageDomainStaticDao ( ) . get ( domainId ) ; if ( storage_domain != null ) { return ( domainId + ":" ) + ( storage_domain.getstorage_name ( ) ) ; } else { return domainId.toString ( ) ; } }

Target:
private static java.lang.String getDomainIdTuple ( org.ovirt.engine.core.compat.Guid domainId ) { org.ovirt.engine.core.common.businessentities.StorageDomainStatic storage_domain = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStorageDomainStaticDao ( ) . get ( domainId ) ; if ( storage_domain != null ) { return ( domainId + ":" ) + ( storage_domain.getStorageName ( ) ) ; } else { return domainId.toString ( ) ; } }
Source:
public static void getHostListByDataCenter ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid spId ) { 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.VDS > list = org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VDS > cast ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.IVdcQueryable > ) ( source ) ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllVdsByStoragePool , new org.ovirt.engine.core.common.queries.IdQueryParameters ( spId ) , aQuery ) ; }

Target:
public static void getVmDiskList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId , boolean isRefresh ) { 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.DiskImage > ( ) ; } } ; org.ovirt.engine.core.common.queries.IdQueryParameters params = new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) ; params.setRefresh ( isRefresh ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllDisksByVmId , params , aQuery ) ; }