auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void getPermittedStorageDomainsByStoragePoolId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId , org.ovirt.engine.core.common.businessentities.ActionGroup actionGroup ) { 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.StorageDomain > ( ) ; } return source ; } } ; org.ovirt.engine.core.common.queries.GetPermittedStorageDomainsByStoragePoolIdParameters params = new org.ovirt.engine.core.common.queries.GetPermittedStorageDomainsByStoragePoolIdParameters ( ) ; params.setStoragePoolId ( dataCenterId ) ; params.setActionGroup ( actionGroup ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetPermittedStorageDomainsByStoragePoolId , params , aQuery ) ; }

Target:
public void getStorageConnectionsByDataCenterIdAndStorageType ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.common.businessentities.storage.StorageType storageType ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.core.common.queries.GetConnectionsByDataCenterAndStorageTypeParameters params = new org.ovirt.engine.core.common.queries.GetConnectionsByDataCenterAndStorageTypeParameters ( storagePoolId , storageType ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetConnectionsByDataCenterAndStorageType , params , aQuery ) ; }
Source:
public int hashCode ( ) { final int prime = 31 ; int result = 1 ; result = ( prime * result ) + ( ( name ) == null ? 0 : name.hashCode ( ) ) ; result = ( prime * result ) + ( ( value ) == null ? 0 : value.hashCode ( ) ) ; return result ; }

Target:
public int hashCode ( ) { return java.util.Objects.hash ( name , value ) ; }
Source:
public void testFromGraphicsTypes ( ) { org.junit.Assert.assertEquals ( GraphicsTypes.NONE , org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel.GraphicsTypes.fromGraphicsTypes ( null ) ) ; org.junit.Assert.assertEquals ( GraphicsTypes.SPICE , org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel.GraphicsTypes.fromGraphicsTypes ( makeSet ( GraphicsType.SPICE ) ) ) ; org.junit.Assert.assertEquals ( GraphicsTypes.VNC , org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel.GraphicsTypes.fromGraphicsTypes ( makeSet ( GraphicsType.VNC ) ) ) ; }

Target:
public void testFromGraphicsTypes ( ) { org.junit.jupiter.api.Assertions.assertEquals ( GraphicsTypes.NONE , org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel.GraphicsTypes.fromGraphicsTypes ( null ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( GraphicsTypes.SPICE , org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel.GraphicsTypes.fromGraphicsTypes ( makeSet ( GraphicsType.SPICE ) ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( GraphicsTypes.VNC , org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel.GraphicsTypes.fromGraphicsTypes ( makeSet ( GraphicsType.VNC ) ) ) ; }
Source:
protected boolean validate ( ) { boolean result = true ; if ( ( org.ovirt.engine.core.bll.HandleVdsVersionCommand.getVds ( ) ) == null ) { addValidationMessage ( EngineMessage.VDS_INVALID_SERVER_ID ) ; result = false ; } else if ( ( ( org.ovirt.engine.core.bll.HandleVdsVersionCommand.getVds ( ) . getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VDSStatus.Connecting ) ) || ( ( org.ovirt.engine.core.bll.HandleVdsVersionCommand.getVds ( ) . getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VDSStatus.NonResponsive ) ) ) { addValidationMessage ( EngineMessage.VDS_CANNOT_CHECK_VERSION_HOST_NON_RESPONSIVE ) ; result = false ; } return result ; }

Target:
protected boolean validate ( ) { if ( ( org.ovirt.engine.core.bll.HandleVdsVersionCommand.getVds ( ) ) == null ) { return failValidation ( EngineMessage.VDS_INVALID_SERVER_ID ) ; } if ( ( ( org.ovirt.engine.core.bll.HandleVdsVersionCommand.getVds ( ) . getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VDSStatus.Connecting ) ) || ( ( org.ovirt.engine.core.bll.HandleVdsVersionCommand.getVds ( ) . getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VDSStatus.NonResponsive ) ) ) { return failValidation ( EngineMessage.VDS_CANNOT_CHECK_VERSION_HOST_NON_RESPONSIVE ) ; } return true ; }
Source:
private org.ovirt.engine.core.bll.gluster.StartGlusterVolumeCommand createTestCommand ( org.ovirt.engine.core.compat.Guid volumeId ) { return new org.ovirt.engine.core.bll.gluster.StartGlusterVolumeCommand ( new org.ovirt.engine.core.common.action.gluster.GlusterVolumeActionParameters ( volumeId , false ) ) ; }

Target:
private void prepareMocks ( org.ovirt.engine.core.bll.gluster.StartGlusterVolumeCommand command ) { org.mockito.Mockito.doReturn ( volumeDao ) . when ( command ) . getGlusterVolumeDao ( ) ; org.mockito.Mockito.doReturn ( getVds ( VDSStatus.Up ) ) . when ( command ) . getUpServer ( ) ; org.mockito.Mockito.doReturn ( getGlusterVolume ( stoppedVolumeId ) ) . when ( volumeDao ) . getById ( stoppedVolumeId ) ; org.mockito.Mockito.doReturn ( getGlusterVolume ( startedVolumeId ) ) . when ( volumeDao ) . getById ( startedVolumeId ) ; org.mockito.Mockito.doReturn ( null ) . when ( volumeDao ) . getById ( null ) ; }
Source:
public void refuseSoundDeviceOnPPC ( ) { setupCanAddPpcTest ( ) ; cmd.getParameters ( ) . setSoundDeviceEnabled ( true ) ; cmd.init ( ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( cmd , EngineMessage.SOUND_DEVICE_REQUESTED_ON_NOT_SUPPORTED_ARCH ) ; }

Target:
public void refuseSoundDeviceOnPPC ( ) { org.mockito.Mockito.doNothing ( ) . when ( cmd ) . initTemplateDisks ( ) ; setupCanAddPpcTest ( ) ; cmd.getParameters ( ) . setSoundDeviceEnabled ( true ) ; cmd.init ( ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( cmd , EngineMessage.SOUND_DEVICE_REQUESTED_ON_NOT_SUPPORTED_ARCH ) ; }
Source:
public void getHostNumaTopologyByHostId ( org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery , org.ovirt.engine.core.compat.Guid hostId ) { asyncQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VdsNumaNode > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVdsNumaNodesByVdsId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( hostId ) , asyncQuery ) ; }

Target:
public void getHostNumaTopologyByHostId ( org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery , org.ovirt.engine.core.compat.Guid hostId ) { asyncQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VdsNumaNode > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVdsNumaNodesByVdsId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( hostId ) , asyncQuery ) ; }
Source:
public void postUpdateNumOfSockets2 ( ) { java.lang.String version = getClusterCompatibilityVersion ( ) . toString ( ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getMaxNumOfCPUsPerSocket ( new org.ovirt.engine.ui.frontend.AsyncQuery ( getModel ( ) , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.VmModelBehaviorBase behavior = org.ovirt.engine.ui.uicommonweb.models.vms.VmModelBehaviorBase.this ; behavior.maxCpusPerSocket = ( ( java.lang.Integer ) ( returnValue ) ) ; behavior.totalCpuCoresChanged ( ) ; } } ) , version ) ; }

Target:
public void updateMaxNumOfVmCpus ( ) { java.lang.String version = getCompatibilityVersion ( ) . toString ( ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getMaxNumOfVmCpus ( new org.ovirt.engine.ui.frontend.AsyncQuery ( getModel ( ) , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.VmModelBehaviorBase behavior = org.ovirt.engine.ui.uicommonweb.models.vms.VmModelBehaviorBase.this ; behavior.maxCpus = ( ( java.lang.Integer ) ( returnValue ) ) ; behavior.postUpdateNumOfSockets2 ( ) ; } } ) , version ) ; }
Source:
public void testSaveInterfaceForVds ( ) { newVdsInterface.setVdsId ( org.ovirt.engine.core.dao.network.InterfaceDaoImplTest.VDS_ID ) ; dao.saveInterfaceForVds ( newVdsInterface ) ; dao.saveStatisticsForVds ( newVdsStatistics ) ; java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > result = dao.getAllInterfacesForVds ( org.ovirt.engine.core.dao.network.InterfaceDaoImplTest.VDS_ID ) ; boolean found = false ; for ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface : result ) { found |= ( iface.getName ( ) . equals ( newVdsInterface.getName ( ) ) ) && ( iface.getQos ( ) . equals ( newVdsInterface.getQos ( ) ) ) ; } org.junit.Assert.assertTrue ( found ) ; }

Target:
public void testSaveInterfaceForVds ( ) { newVdsInterface.setVdsId ( org.ovirt.engine.core.dao.network.InterfaceDaoImplTest.VDS_ID ) ; dao.saveInterfaceForVds ( newVdsInterface ) ; dao.saveStatisticsForVds ( newVdsStatistics ) ; java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > result = dao.getAllInterfacesForVds ( org.ovirt.engine.core.dao.network.InterfaceDaoImplTest.VDS_ID ) ; boolean found = false ; for ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface : result ) { found |= ( iface.getName ( ) . equals ( newVdsInterface.getName ( ) ) ) && ( iface.getQos ( ) . equals ( newVdsInterface.getQos ( ) ) ) ; } org.junit.jupiter.api.Assertions.assertTrue ( found ) ; }
Source:
protected boolean canDoAction ( ) { if ( ! ( super . canDoAction ( ) ) ) { return false ; } org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity volume = getGlusterVolume ( ) ; if ( ( volume.isOnline ( ) ) && ( ! ( getParameters ( ) . isForceAction ( ) ) ) ) { addCanDoActionMessage ( EngineMessage.ACTION_TYPE_FAILED_GLUSTER_VOLUME_ALREADY_STARTED ) ; addCanDoActionMessageVariable ( "volumeName" , volume.getName ( ) ) ; return false ; } return true ; }

Target:
protected boolean validate ( ) { if ( ! ( super . validate ( ) ) ) { return false ; } org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity volume = getGlusterVolume ( ) ; if ( ( volume.isOnline ( ) ) && ( ! ( getParameters ( ) . isForceAction ( ) ) ) ) { addValidationMessage ( EngineMessage.ACTION_TYPE_FAILED_GLUSTER_VOLUME_ALREADY_STARTED ) ; addValidationMessageVariable ( "volumeName" , volume.getName ( ) ) ; return false ; } return true ; }
Source:
public void onBrowserEvent ( com.google.gwt.cell.client.Cell.Context context , com.google.gwt.dom.client.Element parent , java.lang.String value , com.google.gwt.dom.client.NativeEvent event , com.google.gwt.cell.client.ValueUpdater < java.lang.String > valueUpdater ) { super . onBrowserEvent ( context , parent , value , event , valueUpdater ) ; if ( ! ( "mouseover" . equals ( event.getType ( ) ) ) ) { return ; } parent.setTitle ( title ) ; }

Target:
public void onBrowserEvent ( com.google.gwt.cell.client.Cell.Context context , com.google.gwt.dom.client.Element parent , java.lang.String value , com.google.gwt.dom.client.NativeEvent event , com.google.gwt.cell.client.ValueUpdater < java.lang.String > valueUpdater ) { super . onBrowserEvent ( context , parent , value , event , valueUpdater ) ; if ( ! ( BrowserEvents.MOUSEOVER.equals ( event.getType ( ) ) ) ) { return ; } parent.setTitle ( title ) ; }
Source:
public void testAddIncompleteParameters ( ) { org.ovirt.engine.api.model.Disk model = new org.ovirt.engine.api.model.Disk ( ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; try { collection.add ( model ) ; org.junit.Assert.fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "Disk" , "testAddIncompleteParameters" , "provisionedSize|size" , "format" ) ; } }

Target:
public void testAddIncompleteParameters ( ) { org.ovirt.engine.api.model.Disk model = new org.ovirt.engine.api.model.Disk ( ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; try { collection.add ( model ) ; org.junit.jupiter.api.Assertions.fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "Disk" , "testAddIncompleteParameters" , "provisionedSize|size" , "format" ) ; } }
Source:
public void testGetVmPartialData ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.Disk > disks = dao.getAllForVm ( FixturesTool.VM_RHEL5_POOL_57 , org.ovirt.engine.core.dao.PRIVILEGED_USER_ID , true ) ; org.ovirt.engine.core.dao.DiskDaoTest.assertFullGetAllForVMResult ( disks ) ; org.junit.Assert.assertEquals ( "New Description" , disks.get ( 0 ) . getDiskDescription ( ) ) ; org.junit.Assert.assertNotNull ( disks.get ( 0 ) . getDiskAlias ( ) ) ; }

Target:
public void testGetVmPartialData ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.Disk > disks = dao.getAllForVm ( FixturesTool.VM_RHEL5_POOL_57 , org.ovirt.engine.core.dao.PRIVILEGED_USER_ID , true ) ; org.ovirt.engine.core.dao.DiskDaoTest.assertFullGetAllForVMResult ( disks ) ; org.junit.jupiter.api.Assertions.assertEquals ( "New Description" , disks.get ( 0 ) . getDiskDescription ( ) ) ; org.junit.jupiter.api.Assertions.assertNotNull ( disks.get ( 0 ) . getDiskAlias ( ) ) ; }
Source:
private boolean checkDomain ( ) { if ( ( ( org.ovirt.engine.core.bll.UpdateVmTemplateCommand.getParameters ( ) . getVmTemplateData ( ) . getVmInit ( ) ) != null ) && ( ( org.ovirt.engine.core.bll.UpdateVmTemplateCommand.getParameters ( ) . getVmTemplateData ( ) . getVmInit ( ) . getDomain ( ) ) != null ) ) { return isDomainLegal ( org.ovirt.engine.core.bll.UpdateVmTemplateCommand.getParameters ( ) . getVmTemplateData ( ) . getVmInit ( ) . getDomain ( ) , org.ovirt.engine.core.bll.UpdateVmTemplateCommand.getReturnValue ( ) . getCanDoActionMessages ( ) ) ; } return true ; }

Target:
private boolean checkDomain ( ) { if ( ( ( org.ovirt.engine.core.bll.UpdateVmTemplateCommand.getParameters ( ) . getVmTemplateData ( ) . getVmInit ( ) ) != null ) && ( ( org.ovirt.engine.core.bll.UpdateVmTemplateCommand.getParameters ( ) . getVmTemplateData ( ) . getVmInit ( ) . getDomain ( ) ) != null ) ) { return isDomainLegal ( org.ovirt.engine.core.bll.UpdateVmTemplateCommand.getParameters ( ) . getVmTemplateData ( ) . getVmInit ( ) . getDomain ( ) , org.ovirt.engine.core.bll.UpdateVmTemplateCommand.getReturnValue ( ) . getValidationMessages ( ) ) ; } return true ; }
Source:
protected boolean canDoAction ( ) { if ( ( org.ovirt.engine.core.bll.ActivateVdsCommand.getVds ( ) ) == null ) { return failCanDoAction ( VdcBllMessages.VDS_CANNOT_ACTIVATE_VDS_NOT_EXIST ) ; } if ( ( org.ovirt.engine.core.bll.ActivateVdsCommand.getVds ( ) . getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VDSStatus.Up ) ) { return failCanDoAction ( VdcBllMessages.VDS_CANNOT_ACTIVATE_VDS_ALREADY_UP ) ; } return true ; }

Target:
protected boolean canDoAction ( ) { if ( ( org.ovirt.engine.core.bll.ActivateVdsCommand.getVds ( ) ) == null ) { return failCanDoAction ( VdcBllMessages.VDS_DOES_NOT_EXIST ) ; } if ( ( org.apache.commons.lang.StringUtils.isBlank ( org.ovirt.engine.core.bll.ActivateVdsCommand.getVds ( ) . getUniqueId ( ) ) ) && ( org.ovirt.engine.core.common.config.Config.< java.lang.Boolean > GetValue ( ConfigValues.InstallVds ) ) ) { return failCanDoAction ( VdcBllMessages.VDS_NO_UUID ) ; } if ( ( org.ovirt.engine.core.bll.ActivateVdsCommand.getVds ( ) . getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VDSStatus.Up ) ) { return failCanDoAction ( VdcBllMessages.VDS_ALREADY_UP ) ; } return true ; }
Source:
protected boolean hostStatusLegalForSetupNetworks ( org.ovirt.engine.core.common.businessentities.VDS vds ) { return ( org.ovirt.engine.core.bll.network.host.HostSetupNetworksCommand.SUPPORTED_HOST_STATUSES.contains ( vds.getStatus ( ) ) ) || ( ( ( vds.getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VDSStatus.Installing ) ) && ( org.ovirt.engine.core.bll.network.host.HostSetupNetworksCommand.isInternalExecution ( ) ) ) ; }

Target:
private org.ovirt.engine.core.bll.ValidationResult validateWithHostSetupNetworksValidator ( org.ovirt.engine.core.common.businessentities.VDS host ) { org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidator validator = new org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidator ( host , org.ovirt.engine.core.bll.network.host.HostSetupNetworksCommand.getParameters ( ) , getExistingNics ( ) , getExistingAttachments ( ) , getNetworkBusinessEntityMap ( ) , managementNetworkUtil , networkClusterDao , networkAttachmentDao , networkDao , vdsDao ) ; return validator.validate ( ) ; }
Source:
public void testUpdateReadOnly ( ) throws java.lang.Exception { setUpGetEntityExpectations ( 2 ) ; setUpDiskVmElementExpectations ( ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.UpdateVmDisk , org.ovirt.engine.core.common.action.VmDiskOperationParameterBase.class , new java.lang.String [ ] { "VmId" , "DiskVmElement.ReadOnly" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendVmDiskResourceTest.VM_ID , java.lang.Boolean.TRUE } , true , true ) ) ; org.ovirt.engine.api.model.Disk disk = resource.update ( getUpdate ( ) ) ; assertNotNull ( disk ) ; }

Target:
public void testUpdateReadOnly ( ) throws java.lang.Exception { setUpGetEntityExpectations ( 2 ) ; setUpDiskVmElementExpectations ( ) ; setUriInfo ( setUpActionExpectations ( ActionType.UpdateVmDisk , org.ovirt.engine.core.common.action.VmDiskOperationParameterBase.class , new java.lang.String [ ] { "VmId" , "DiskVmElement.ReadOnly" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendVmDiskResourceTest.VM_ID , java.lang.Boolean.TRUE } , true , true ) ) ; org.ovirt.engine.api.model.Disk disk = resource.update ( getUpdate ( ) ) ; assertNotNull ( disk ) ; }
Source:
public int hashCode ( ) { return java.util.Objects.hash ( id , compatVersion , compatibilityVersion , cpuName , description , maxVdsMemoryOverCommit , countThreadsAsCores , migrateOnError , name , storagePoolId , storagePoolName , requiredSwitchTypeForCluster , transparentHugepages , virtService , glusterService , glusterCliBasedSchedulingOn , tunnelMigration , emulatedMachine , trustedService , haReservation , clusterPolicyName , clusterPolicyProperties , additionalRngSources , enableKsm , enableBallooning , optimizationType , serialNumberPolicy , customSerialNumber , clusterHostsAndVms , fencingPolicy , autoConverge , migrateCompressed , glusterTunedProfile , addtionalFeaturesSupported , maintenanceReasonRequired , ksmMergeAcrossNumaNodes , customMigrationNetworkBandwidth , migrationBandwidthLimitType , migrationPolicyId , macPoolId , firewallType ) ; }

Target:
public int hashCode ( ) { return java.util.Objects.hash ( id , compatVersion , compatibilityVersion , cpuName , description , maxVdsMemoryOverCommit , countThreadsAsCores , migrateOnError , name , storagePoolId , storagePoolName , requiredSwitchTypeForCluster , transparentHugepages , virtService , glusterService , glusterCliBasedSchedulingOn , tunnelMigration , emulatedMachine , trustedService , haReservation , clusterPolicyName , clusterPolicyProperties , additionalRngSources , enableKsm , enableBallooning , optimizationType , serialNumberPolicy , customSerialNumber , clusterHostsAndVms , fencingPolicy , autoConverge , migrateCompressed , glusterTunedProfile , addtionalFeaturesSupported , maintenanceReasonRequired , ksmMergeAcrossNumaNodes , customMigrationNetworkBandwidth , migrationBandwidthLimitType , migrationPolicyId , macPoolId , firewallType , defaultNetworkProviderId ) ; }
Source:
public void testGetNetworkDiskTypeForV41 ( ) { org.ovirt.engine.core.common.businessentities.VM vm = new org.ovirt.engine.core.common.businessentities.VM ( ) ; vm.setClusterCompatibilityVersion ( Version.v4_1 ) ; vm.setClusterId ( org.ovirt.engine.core.vdsbroker.builder.vminfo.VmInfoBuildUtilsTest.CLUSTER_ID ) ; org.mockito.Mockito.doReturn ( getSupportedAdditionalClusterFeatures ( false ) ) . when ( clusterFeatureDao ) . getSupportedFeaturesByClusterId ( org.ovirt.engine.core.vdsbroker.builder.vminfo.VmInfoBuildUtilsTest.CLUSTER_ID ) ; org.junit.Assert.assertFalse ( underTest.getNetworkDiskType ( vm , StorageType.GLUSTERFS ) . isPresent ( ) ) ; }

Target:
public void testGetNetworkDiskTypeForV41 ( ) { org.ovirt.engine.core.common.businessentities.VM vm = new org.ovirt.engine.core.common.businessentities.VM ( ) ; vm.setClusterCompatibilityVersion ( Version.v4_1 ) ; vm.setClusterId ( org.ovirt.engine.core.vdsbroker.builder.vminfo.VmInfoBuildUtilsTest.CLUSTER_ID ) ; org.mockito.Mockito.doReturn ( getSupportedAdditionalClusterFeatures ( false ) ) . when ( clusterFeatureDao ) . getSupportedFeaturesByClusterId ( org.ovirt.engine.core.vdsbroker.builder.vminfo.VmInfoBuildUtilsTest.CLUSTER_ID ) ; org.junit.jupiter.api.Assertions.assertFalse ( underTest.getNetworkDiskType ( vm , StorageType.GLUSTERFS ) . isPresent ( ) ) ; }
Source:
public void testMigrateWithHostName ( ) throws java.lang.Exception { setUpGetHostIdExpectations ( 1 ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.MigrateVmToServer , org.ovirt.engine.core.common.action.MigrateVmToServerParameters.class , new java.lang.String [ ] { "VmId" , "VdsId" , "ForceMigrationForNonMigratableVM" } , new java.lang.Object [ ] { GUIDS [ 0 ] , GUIDS [ 1 ] , java.lang.Boolean.FALSE } ) ) ; org.ovirt.engine.api.model.Action action = new org.ovirt.engine.api.model.Action ( ) ; action.setHost ( new org.ovirt.engine.api.model.Host ( ) ) ; action.getHost ( ) . setName ( NAMES [ 1 ] ) ; verifyActionResponse ( resource.migrate ( action ) ) ; }

Target:
public void testMigrateWithHostName ( ) throws java.lang.Exception { setUpGetHostIdExpectations ( 1 ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.MigrateVmToServer , org.ovirt.engine.core.common.action.MigrateVmToServerParameters.class , new java.lang.String [ ] { "VmId" , "VdsId" , "ForceMigrationForNonMigratableVm" } , new java.lang.Object [ ] { GUIDS [ 0 ] , GUIDS [ 1 ] , java.lang.Boolean.FALSE } ) ) ; org.ovirt.engine.api.model.Action action = new org.ovirt.engine.api.model.Action ( ) ; action.setHost ( new org.ovirt.engine.api.model.Host ( ) ) ; action.getHost ( ) . setName ( NAMES [ 1 ] ) ; verifyActionResponse ( resource.migrate ( action ) ) ; }
Source:
protected void doTestBadUpdate ( boolean valid , boolean success , java.lang.String detail ) { setUpGetEntityExpectations ( 1 ) ; setUriInfo ( setUpActionExpectations ( ActionType.UpdateVmTemplate , org.ovirt.engine.core.common.action.UpdateVmTemplateParameters.class , new java.lang.String [ ] { } , new java.lang.Object [ ] { } , valid , success ) ) ; try { resource.update ( getRestModel ( 0 ) ) ; org.junit.Assert.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }

Target:
protected void doTestBadUpdate ( boolean valid , boolean success , java.lang.String detail ) { setUpGetEntityExpectations ( 1 ) ; setUriInfo ( setUpActionExpectations ( ActionType.UpdateVmTemplate , org.ovirt.engine.core.common.action.UpdateVmTemplateParameters.class , new java.lang.String [ ] { } , new java.lang.Object [ ] { } , valid , success ) ) ; try { resource.update ( getRestModel ( 0 ) ) ; org.junit.jupiter.api.Assertions.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }
Source:
public static void IsUSBEnabledByDefault ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Boolean ) ( source ) ) . booleanValue ( ) : false ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.EnableUSBAsDefault , org.ovirt.engine.core.common.config.Config.DefaultConfigurationVersion ) , aQuery ) ; }

Target:
public static void GetDataCentersWithPermittedActionOnClusters ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.businessentities.ActionGroup actionGroup ) { 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.storage_pool > ( ) ; } return source ; } } ; org.ovirt.engine.core.common.queries.GetEntitiesWithPermittedActionParameters getEntitiesWithPermittedActionParameters = new org.ovirt.engine.core.common.queries.GetEntitiesWithPermittedActionParameters ( ) ; getEntitiesWithPermittedActionParameters.setActionGroup ( actionGroup ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetDataCentersWithPermittedActionOnClusters , getEntitiesWithPermittedActionParameters , aQuery ) ; }
Source:
public void findMissingEnumNames ( ) { boolean missingKey = false ; for ( org.ovirt.engine.core.common.queries.ConfigurationValues configValue : org.ovirt.engine.core.common.queries.ConfigurationValues.values ( ) ) { if ( ! ( org.ovirt.engine.core.common.queries.ConfigValuesTest.configValuesEnumNames.contains ( configValue.toString ( ) ) ) ) { org.ovirt.engine.core.common.queries.ConfigValuesTest.log.error ( ( "Found missing key: " + ( configValue.toString ( ) ) ) ) ; missingKey = true ; break ; } } org.junit.Assert.assertFalse ( "Found missing key: " , missingKey ) ; }

Target:
public void findMissingEnumNames ( ) { boolean missingKey = false ; for ( org.ovirt.engine.core.common.queries.ConfigurationValues configValue : org.ovirt.engine.core.common.queries.ConfigurationValues.values ( ) ) { if ( ! ( org.ovirt.engine.core.common.queries.ConfigValuesTest.configValuesEnumNames.contains ( configValue.toString ( ) ) ) ) { org.ovirt.engine.core.common.queries.ConfigValuesTest.log.error ( "Found missing key: {}" , configValue ) ; missingKey = true ; break ; } } org.junit.Assert.assertFalse ( "Found missing key: " , missingKey ) ; }
Source:
public javax.ws.rs.core.Response add ( org.ovirt.engine.api.model.OpenStackVolumeProvider provider ) { validateParameters ( provider , "name" , "dataCenter.name|id" ) ; org.ovirt.engine.core.common.businessentities.StoragePool storagePool = getStoragePool ( provider.getDataCenter ( ) ) ; provider.setDataCenter ( org.ovirt.engine.api.restapi.types.DataCenterMapper.map ( storagePool , null ) ) ; return performCreate ( VdcActionType.AddProvider , new org.ovirt.engine.core.common.action.ProviderParameters ( map ( provider ) ) , new org.ovirt.engine.api.restapi.resource.openstack.QueryIdResolver < org.ovirt.engine.core.compat.Guid > ( org.ovirt.engine.core.common.queries.VdcQueryType.GetProviderById , org.ovirt.engine.core.common.queries.IdQueryParameters.class ) ) ; }

Target:
public javax.ws.rs.core.Response add ( org.ovirt.engine.api.model.OpenStackVolumeProvider provider ) { validateParameters ( provider , "name" ) ; if ( provider.isSetDataCenter ( ) ) { org.ovirt.engine.core.common.businessentities.StoragePool storagePool = getStoragePool ( provider.getDataCenter ( ) ) ; provider.setDataCenter ( org.ovirt.engine.api.restapi.types.DataCenterMapper.map ( storagePool , null ) ) ; } return performCreate ( VdcActionType.AddProvider , new org.ovirt.engine.core.common.action.ProviderParameters ( map ( provider ) ) , new org.ovirt.engine.api.restapi.resource.openstack.QueryIdResolver < org.ovirt.engine.core.compat.Guid > ( org.ovirt.engine.core.common.queries.VdcQueryType.GetProviderById , org.ovirt.engine.core.common.queries.IdQueryParameters.class ) ) ; }
Source:
public void migrateVM ( java.util.List < org.ovirt.engine.core.compat.Guid > initialHosts , org.ovirt.engine.core.compat.Guid vmToMigrate , java.lang.String reason ) { org.ovirt.engine.core.common.action.MigrateVmParameters parameters = new org.ovirt.engine.core.common.action.MigrateVmParameters ( false , vmToMigrate ) ; parameters.setInitialHosts ( new java.util.ArrayList ( initialHosts ) ) ; parameters.setReason ( reason ) ; backendInternal.runInternalAction ( VdcActionType.MigrateVm , parameters , org.ovirt.engine.core.bll.job.ExecutionHandler.createInternalJobContext ( ) ) ; }

Target:
public void migrateVM ( java.util.List < org.ovirt.engine.core.compat.Guid > initialHosts , org.ovirt.engine.core.compat.Guid vmToMigrate , java.lang.String reason ) { org.ovirt.engine.core.common.action.MigrateVmParameters parameters = new org.ovirt.engine.core.common.action.MigrateVmParameters ( false , vmToMigrate ) ; parameters.setInitialHosts ( new java.util.ArrayList ( initialHosts ) ) ; parameters.setReason ( reason ) ; backendInternal.runInternalAction ( VdcActionType.BalanceVm , parameters , org.ovirt.engine.core.bll.job.ExecutionHandler.createInternalJobContext ( ) ) ; }
Source:
public java.util.Set < java.lang.String > getSupportedVersions ( ) { java.lang.String value = config.getProperty ( org.ovirt.engine.api.restapi.LocalConfig.SUPPORTED_VERSIONS ) ; if ( ( value == null ) || ( value.isEmpty ( ) ) ) { return java.util.Collections.emptySet ( ) ; } java.lang.String [ ] chunks = value.split ( "\\s*,\\s*" ) ; java.util.Set < java.lang.String > versions = new java.util.HashSet < > ( ) ; java.util.Collections.addAll ( versions , chunks ) ; return versions ; }

Target:
public java.util.Set < java.lang.String > getSupportedVersions ( ) { return getVersions ( org.ovirt.engine.api.restapi.LocalConfig.SUPPORTED_VERSIONS ) ; }
Source:
public void validateSlaveHasNoLabelsHasOldLabel ( ) { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface slave = createNic ( "slave" ) ; slave.setLabels ( java.util.Collections.singleton ( "lbl1" ) ) ; org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidator validator = new org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidatorTest.HostSetupNetworksValidatorBuilder ( ) . setParams ( new org.ovirt.engine.core.common.action.HostSetupNetworksParameters ( host.getId ( ) ) ) . setExistingInterfaces ( java.util.Collections.singletonList ( slave ) ) . setHost ( host ) . build ( ) ; assertValidateSlaveHasNoLabelsFailed ( validator , slave.getName ( ) ) ; }

Target:
public void validateSlaveHasNoLabelsHasOldLabel ( ) { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface slave = createNic ( "slave" ) ; slave.setLabels ( java.util.Collections.singleton ( "lbl1" ) ) ; org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidator validator = new org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidatorTest.HostSetupNetworksValidatorBuilder ( ) . addExistingInterfaces ( slave ) . build ( ) ; assertValidateSlaveHasNoLabelsFailed ( validator , slave.getName ( ) ) ; }
Source:
public org.ovirt.engine.core.bll.network.macpool.MacPool createMacPool ( org.ovirt.engine.core.bll.network.macpool.MacPool macPool ) { return new org.ovirt.engine.core.bll.network.macpool.MacPoolUsingRanges ( macPool.getId ( ) , org.ovirt.engine.core.utils.MacAddressRangeUtils.macPoolToRanges ( macPool ) , macPool.isAllowDuplicateMacAddresses ( ) ) ; }

Target:
public org.ovirt.engine.core.bll.network.macpool.MacPool createMacPool ( org.ovirt.engine.core.bll.network.macpool.MacPool macPool , boolean engineStartup ) { org.ovirt.engine.core.bll.network.macpool.MacPoolUsingRanges macPoolUsingRanges = new org.ovirt.engine.core.bll.network.macpool.MacPoolUsingRanges ( macPool.getId ( ) , org.ovirt.engine.core.utils.MacAddressRangeUtils.macPoolToRanges ( macPool ) , macPool.isAllowDuplicateMacAddresses ( ) , auditLogDirector ) ; macPoolUsingRanges.initialize ( engineStartup , macPoolDao.getAllMacsForMacPool ( macPool.getId ( ) ) ) ; return macPoolUsingRanges ; }
Source:
private java.lang.String getVmPoolIsBeingUpdatedMessage ( ) { java.lang.StringBuilder builder = new java.lang.StringBuilder ( EngineMessage.ACTION_TYPE_FAILED_VM_POOL_IS_BEING_UPDATED.name ( ) ) ; if ( ( org.ovirt.engine.core.bll.UpdateVmPoolWithVmsCommand.getVmPool ( ) ) != null ) { builder.append ( java.lang.String.format ( "$VmPoolName %1$s" , org.ovirt.engine.core.bll.UpdateVmPoolWithVmsCommand.getVmPool ( ) . getName ( ) ) ) ; } return builder.toString ( ) ; }

Target:
private java.lang.String getVmPoolIsBeingUpdatedMessage ( ) { java.lang.StringBuilder builder = new java.lang.StringBuilder ( EngineMessage.ACTION_TYPE_FAILED_VM_POOL_IS_BEING_UPDATED.name ( ) ) ; if ( ( org.ovirt.engine.core.bll.UpdateVmPoolCommand.getVmPool ( ) ) != null ) { builder.append ( java.lang.String.format ( "$VmPoolName %1$s" , org.ovirt.engine.core.bll.UpdateVmPoolCommand.getVmPool ( ) . getName ( ) ) ) ; } return builder.toString ( ) ; }
Source:
public org.ovirt.engine.core.bll.context.CommandContext getContext ( ) { if ( ( commandContext ) == null ) { commandContext = org.ovirt.engine.core.bll.RestartVdsCommand.dupContext ( ) . withExecutionContext ( org.ovirt.engine.core.bll.RestartVdsCommand.getExecutionContext ( ) ) . withLock ( new org.ovirt.engine.core.utils.lock.EngineLock ( org.ovirt.engine.core.bll.RestartVdsCommand.getExclusiveLocks ( ) , null ) ) ; } return commandContext ; }

Target:
public org.ovirt.engine.core.bll.context.CommandContext getContext ( ) { if ( ( commandContext ) == null ) { commandContext = org.ovirt.engine.core.bll.RestartVdsCommand.cloneContext ( ) . withLock ( new org.ovirt.engine.core.utils.lock.EngineLock ( org.ovirt.engine.core.bll.RestartVdsCommand.getExclusiveLocks ( ) , null ) ) ; } return commandContext ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object result ) { java.lang.String fingerprint = ( ( java.lang.String ) ( result ) ) ; if ( ( fingerprint != null ) && ( ( fingerprint.length ( ) ) > 0 ) ) { getGlusterHostFingerprint ( ) . setEntity ( ( ( java.lang.String ) ( result ) ) ) ; setIsFingerprintVerified ( true ) ; } else { getGlusterHostFingerprint ( ) . setEntity ( org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getConstants ( ) . errorLoadingFingerprint ( ) ) ; setIsFingerprintVerified ( 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 ) { setIsFingerprintVerified ( false ) ; if ( ( ( getGlusterHostAddress ( ) . getEntity ( ) ) == null ) || ( ( getGlusterHostAddress ( ) . getEntity ( ) . trim ( ) . length ( ) ) == 0 ) ) { getGlusterHostFingerprint ( ) . setEntity ( "" ) ; return ; } fetchFingerprint ( getGlusterHostAddress ( ) . getEntity ( ) ) ; }
Source:
public void getGlusterHook ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hookId , boolean includeServerHooks ) { 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.GetGlusterHookById , new org.ovirt.engine.core.common.queries.gluster.GlusterHookQueryParameters ( hookId , includeServerHooks ) , aQuery ) ; }

Target:
public void getGlusterHook ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hookId , boolean includeServerHooks ) { 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.GetGlusterHookById , new org.ovirt.engine.core.common.queries.gluster.GlusterHookQueryParameters ( hookId , includeServerHooks ) , aQuery ) ; }
Source:
public void testGetEnum ( ) throws java.lang.Exception { java.io.File file = writeConf ( "a=A" ) ; org.ovirt.engine.core.extensions.mgr.Configuration config = org.ovirt.engine.core.extensions.mgr.Configuration.loadFile ( file ) ; org.junit.Assert.assertNotNull ( config ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.extensions.mgr.ConfigurationTest.TestEnum.A , config.getEnum ( org.ovirt.engine.core.extensions.mgr.ConfigurationTest.TestEnum.class , "a" ) ) ; }

Target:
public void testGetEnum ( ) throws java.lang.Exception { java.io.File file = writeConf ( "a=A" ) ; org.ovirt.engine.core.extensions.mgr.Configuration config = org.ovirt.engine.core.extensions.mgr.Configuration.loadFile ( file ) ; org.junit.jupiter.api.Assertions.assertNotNull ( config ) ; org.junit.jupiter.api.Assertions.assertEquals ( org.ovirt.engine.core.extensions.mgr.ConfigurationTest.TestEnum.A , config.getEnum ( org.ovirt.engine.core.extensions.mgr.ConfigurationTest.TestEnum.class , "a" ) ) ; }
Source:
private java.util.List < org.ovirt.engine.core.bll.host.provider.foreman.ContentHost > runContentHostListMethod ( java.lang.String relativeUrl ) { try { org.ovirt.engine.core.bll.host.provider.foreman.ContentHostsWrapper wrapper = objectMapper.readValue ( runHttpGetMethod ( relativeUrl ) , org.ovirt.engine.core.bll.host.provider.foreman.ContentHostsWrapper.class ) ; return java.util.Arrays.asList ( wrapper.getResults ( ) ) ; } catch ( java.io.IOException e ) { return null ; } }

Target:
private java.util.List < org.ovirt.engine.core.bll.host.provider.foreman.ContentHost > runContentHostListMethod ( java.lang.String relativeUrl ) { try { org.ovirt.engine.core.bll.host.provider.foreman.ContentHostsWrapper wrapper = objectMapper.readValue ( runHttpGetMethod ( relativeUrl ) , org.ovirt.engine.core.bll.host.provider.foreman.ContentHostsWrapper.class ) ; return java.util.Arrays.asList ( wrapper.getResults ( ) ) ; } catch ( java.io.IOException e ) { return java.util.Collections.emptyList ( ) ; } }
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 static void getVmsRunningOnOrMigratingToVds ( 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 ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmsRunningOnOrMigratingToVds , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
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 ; }

Target:
public java.util.List < org.ovirt.engine.core.common.businessentities.Cluster > convert ( java.lang.Object source ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Cluster > list = getClusterByServiceList ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Cluster > ) ( source ) ) , supportsVirtService , supportsGlusterService ) ; java.util.Collections.sort ( list , new org.ovirt.engine.core.common.businessentities.comparators.NameableComparator ( ) ) ; return list ; } return new java.util.ArrayList < > ( ) ; }
Source:
public static void getVmConfigurationBySnapshot ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid snapshotSourceId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( org.ovirt.engine.core.common.businessentities.VM ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmConfigurationBySnapshot , new org.ovirt.engine.core.common.queries.IdQueryParameters ( snapshotSourceId ) , aQuery ) ; }

Target:
public void getVmConfigurationBySnapshot ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid snapshotSourceId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( org.ovirt.engine.core.common.businessentities.VM ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmConfigurationBySnapshot , new org.ovirt.engine.core.common.queries.IdQueryParameters ( snapshotSourceId ) . withoutRefresh ( ) , aQuery ) ; }
Source:
public static void GetMaxNumOfCPUsPerSocket ( 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.MaxNumOfCpuPerSocket ) ; tempVar.setVersion ( version ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( tempVar , aQuery ) ; }

Target:
public static void GetClusterList ( 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.ui.uicommonweb.Linq.VdsGroupByNameComparer ( ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllVdsGroups , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }
Source:
private static void addCdDetails ( org.ovirt.engine.core.common.businessentities.VmDevice vmDevice , org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcStruct struct ) { struct.add ( VdsProperties.Type , vmDevice.getType ( ) ) ; struct.add ( VdsProperties.Device , vmDevice.getDevice ( ) ) ; struct.add ( VdsProperties.Index , "2" ) ; struct.add ( VdsProperties.NETWORK_INTERFACE , VdsProperties.Ide ) ; struct.add ( VdsProperties.ReadOnly , java.lang.Boolean.TRUE.toString ( ) ) ; struct.add ( VdsProperties.Shareable , java.lang.Boolean.FALSE.toString ( ) ) ; }

Target:
private static void addCdDetails ( org.ovirt.engine.core.common.businessentities.VmDevice vmDevice , org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcStruct struct ) { struct.add ( VdsProperties.Type , vmDevice.getType ( ) ) ; struct.add ( VdsProperties.Device , vmDevice.getDevice ( ) ) ; struct.add ( VdsProperties.Index , "2" ) ; struct.add ( VdsProperties.INTERFACE , VdsProperties.Ide ) ; struct.add ( VdsProperties.ReadOnly , java.lang.Boolean.TRUE.toString ( ) ) ; struct.add ( VdsProperties.Shareable , java.lang.Boolean.FALSE.toString ( ) ) ; }
Source:
public void getUnusedBricksFromServer ( org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery , org.ovirt.engine.core.compat.Guid hostId ) { asyncQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.core.common.queries.IdQueryParameters parameters = new org.ovirt.engine.core.common.queries.IdQueryParameters ( hostId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetUnusedGlusterBricks , parameters , asyncQuery ) ; }

Target:
public java.util.List < org.ovirt.engine.core.common.businessentities.storage.CinderVolumeType > convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return ( ( java.util.List < org.ovirt.engine.core.common.businessentities.storage.CinderVolumeType > ) ( source ) ) ; }
Source:
protected boolean canDoAction ( ) { if ( checkIsDomainLocked ( org.ovirt.engine.core.bll.storage.ReconstructMasterDomainCommand.getStorageDomain ( ) . getStoragePoolIsoMapData ( ) ) ) { return false ; } java.util.List < org.ovirt.engine.core.common.businessentities.StoragePoolIsoMap > poolDomains = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStoragePoolIsoMapDao ( ) . getAllForStoragePool ( org.ovirt.engine.core.bll.storage.ReconstructMasterDomainCommand.getStoragePool ( ) . getId ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.StoragePoolIsoMap poolDomain : poolDomains ) { if ( checkIsDomainLocked ( poolDomain ) ) { return false ; } } return org.ovirt.engine.core.bll.storage.ReconstructMasterDomainCommand.initializeVds ( ) ; }

Target:
protected org.ovirt.engine.core.bll.validator.storage.StoragePoolValidator createStoragePoolValidator ( ) { return new org.ovirt.engine.core.bll.validator.storage.StoragePoolValidator ( org.ovirt.engine.core.bll.storage.ReconstructMasterDomainCommand.getStoragePool ( ) ) ; }