auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public static void getAllAttachableDisks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , 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 != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetAllAttachableDisks params = new org.ovirt.engine.core.common.queries.GetAllAttachableDisks ( storagePoolId ) ; params.setVmId ( vmId ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllAttachableDisks , params , aQuery ) ; }

Target:
public static void getVmConfigurationBySnapshot ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid snapshotSourceId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( org.ovirt.engine.core.common.businessentities.VM ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmConfigurationBySnapshot , new org.ovirt.engine.core.common.queries.IdQueryParameters ( snapshotSourceId ) , aQuery ) ; }
Source:
private javax.ws.rs.core.Response addSAN ( org.ovirt.engine.api.model.StorageDomain model , org.ovirt.engine.core.common.businessentities.StorageType storageType , org.ovirt.engine.core.common.businessentities.StorageDomainStatic entity , org.ovirt.engine.core.compat.Guid hostId ) { boolean overrideLuns = ( model.getStorage ( ) . isSetOverrideLuns ( ) ) ? model.getStorage ( ) . isOverrideLuns ( ) : false ; return performCreate ( VdcActionType.AddSANStorageDomain , getSanAddParams ( entity , hostId , getLunIds ( model.getStorage ( ) , storageType , hostId ) , overrideLuns ) , ID_RESOLVER ) ; }

Target:
private javax.ws.rs.core.Response addSAN ( org.ovirt.engine.api.model.StorageDomain model , org.ovirt.engine.core.common.businessentities.storage.StorageType storageType , org.ovirt.engine.core.common.businessentities.StorageDomainStatic entity , org.ovirt.engine.core.compat.Guid hostId ) { boolean overrideLuns = ( model.getStorage ( ) . isSetOverrideLuns ( ) ) ? model.getStorage ( ) . isOverrideLuns ( ) : false ; return performCreate ( VdcActionType.AddSANStorageDomain , getSanAddParams ( entity , hostId , getLunIds ( model.getStorage ( ) , storageType , hostId ) , overrideLuns ) , ID_RESOLVER ) ; }
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 ( ( getResolveContentConflict ( ) . getEntity ( ) ) == null ) { getServerHooksList ( ) . setIsChangable ( false ) ; } else { getServerHooksList ( ) . setIsChangable ( getResolveContentConflict ( ) . getEntity ( ) ) ; } }

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 ( ( getResolveContentConflict ( ) . getEntity ( ) ) == null ) { getServerHooksList ( ) . setIsChangeable ( false ) ; } else { getServerHooksList ( ) . setIsChangeable ( getResolveContentConflict ( ) . getEntity ( ) ) ; } }
Source:
public void validateEnoughSpace ( ) throws java.lang.Exception { initializeCommand ( ImageOperation.Move , new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ) ; initSnapshotValidator ( ) ; initVmForSpace ( ) ; initVmDiskImage ( false ) ; initSrcStorageDomain ( ) ; initDestStorageDomain ( StorageType.NFS ) ; org.mockito.Mockito.doReturn ( org.ovirt.engine.core.bll.storage.disk.MoveOrCopyDiskCommandTest.mockStorageDomainValidatorWithSpace ( ) ) . when ( command ) . createStorageDomainValidator ( ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateSuccess ( command ) ; }

Target:
public void successVmInPreviewForAttachedSnapshot ( ) { initializeCommand ( new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ) ; initSnapshotValidator ( ) ; initVmForSpace ( ) ; initVmDiskImage ( false ) ; initSrcStorageDomain ( ) ; initDestStorageDomain ( StorageType.NFS ) ; vmDevice.setSnapshotId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateSuccess ( command ) ; }
Source:
public static void updateDisksFromDb ( org.ovirt.engine.core.common.businessentities.VM vm ) { java.util.List < org.ovirt.engine.core.common.businessentities.Disk > imageList = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getDiskDao ( ) . getAllForVm ( vm.getId ( ) ) ; vm.getDiskList ( ) . clear ( ) ; vm.getDiskMap ( ) . clear ( ) ; org.ovirt.engine.core.bll.VmHandler.updateDisksForVm ( vm , imageList ) ; }

Target:
public static void updateDisksFromDb ( org.ovirt.engine.core.common.businessentities.VM vm ) { java.util.List < org.ovirt.engine.core.common.businessentities.Disk > imageList = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getDiskDao ( ) . getAllForVm ( vm.getId ( ) ) ; vm.clearDisks ( ) ; org.ovirt.engine.core.bll.VmHandler.updateDisksForVm ( vm , imageList ) ; }
Source:
public void getStorageDomainByName ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String storageDomainName ) { 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.GetStorageDomainByName , new org.ovirt.engine.core.common.queries.NameQueryParameters ( storageDomainName ) , aQuery ) ; }

Target:
public void getTemplateById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid templateId ) { 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.GetVmTemplate , new org.ovirt.engine.core.common.queries.GetVmTemplateParameters ( templateId ) , aQuery ) ; }
Source:
protected boolean canDoAction ( ) { if ( ( getDisk ( ) ) == null ) { return failCanDoAction ( VdcBllMessages.ACTION_TYPE_FAILED_VM_IMAGE_DOES_NOT_EXIST ) ; } org.ovirt.engine.core.bll.validator.DiskValidator oldDiskValidator = new org.ovirt.engine.core.bll.validator.DiskValidator ( getDisk ( ) ) ; return ( ( validate ( oldDiskValidator.validateNotHostedEngineDisk ( ) ) ) && ( validateAllVmsForDiskAreDown ( ) ) ) && ( canRemoveDiskBasedOnStorageTypeCheck ( ) ) ; }

Target:
protected boolean canDoAction ( ) { if ( ( getDisk ( ) ) == null ) { return failCanDoAction ( VdcBllMessages.ACTION_TYPE_FAILED_VM_IMAGE_DOES_NOT_EXIST ) ; } org.ovirt.engine.core.bll.validator.storage.DiskValidator oldDiskValidator = new org.ovirt.engine.core.bll.validator.storage.DiskValidator ( getDisk ( ) ) ; return ( ( validate ( oldDiskValidator.validateNotHostedEngineDisk ( ) ) ) && ( validateAllVmsForDiskAreDown ( ) ) ) && ( canRemoveDiskBasedOnStorageTypeCheck ( ) ) ; }
Source:
public void provisioningProvided ( ) { org.junit.Assert.assertThat ( validator.provisioningComputeResourceValid ( false , new org.ovirt.engine.core.common.businessentities.ExternalComputeResource ( ) ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; org.junit.Assert.assertThat ( validator.provisioningHostGroupValid ( false , new org.ovirt.engine.core.common.businessentities.ExternalHostGroup ( ) ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; org.junit.Assert.assertThat ( validator.provisioningComputeResourceValid ( true , new org.ovirt.engine.core.common.businessentities.ExternalComputeResource ( ) ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; org.junit.Assert.assertThat ( validator.provisioningHostGroupValid ( true , new org.ovirt.engine.core.common.businessentities.ExternalHostGroup ( ) ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }

Target:
public void provisioningProvided ( ) { org.hamcrest.MatcherAssert.assertThat ( validator.provisioningComputeResourceValid ( false , new org.ovirt.engine.core.common.businessentities.ExternalComputeResource ( ) ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; org.hamcrest.MatcherAssert.assertThat ( validator.provisioningHostGroupValid ( false , new org.ovirt.engine.core.common.businessentities.ExternalHostGroup ( ) ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; org.hamcrest.MatcherAssert.assertThat ( validator.provisioningComputeResourceValid ( true , new org.ovirt.engine.core.common.businessentities.ExternalComputeResource ( ) ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; org.hamcrest.MatcherAssert.assertThat ( validator.provisioningHostGroupValid ( true , new org.ovirt.engine.core.common.businessentities.ExternalHostGroup ( ) ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc startSpice ( java.lang.String vdsIp , int port , java.lang.String ticket ) { return null ; }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc glusterVolumeGeoRepSessionCreate ( java.lang.String volumeName , java.lang.String remoteHost , java.lang.String remotVolumeName , java.lang.String userName , java.lang.Boolean force ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "GlusterVolume.geoRepSessionCreate" ) . withParameter ( "volumeName" , volumeName ) . withParameter ( "remoteHost" , remoteHost ) . withParameter ( "remoteVolumeName" , remotVolumeName ) . withParameter ( "force" , force ) . withOptionalParameter ( "remoteUserName" , userName ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( response ) ; }
Source:
public void testAllDomainsWithinThreshold ( ) { setUpGeneralValidations ( ) ; setUpDiskValidations ( ) ; org.mockito.Mockito.doReturn ( java.util.Collections.emptyList ( ) ) . when ( cmd ) . getDisksList ( ) ; org.mockito.Mockito.doReturn ( new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_DISK_SPACE_LOW_ON_STORAGE_DOMAIN ) ) . when ( multipleStorageDomainsValidator ) . allDomainsExistAndActive ( ) ; org.junit.Assert.assertFalse ( cmd.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( cmd.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( EngineMessage.ACTION_TYPE_FAILED_DISK_SPACE_LOW_ON_STORAGE_DOMAIN.name ( ) ) ) ; }

Target:
public void testAllDomainsWithinThreshold ( ) { setUpGeneralValidations ( ) ; setUpDiskValidations ( ) ; org.mockito.Mockito.doReturn ( java.util.Collections.emptyList ( ) ) . when ( cmd ) . getDisksList ( ) ; org.mockito.Mockito.doReturn ( new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_DISK_SPACE_LOW_ON_STORAGE_DOMAIN ) ) . when ( multipleStorageDomainsValidator ) . allDomainsExistAndActive ( ) ; org.junit.Assert.assertFalse ( cmd.validate ( ) ) ; org.junit.Assert.assertTrue ( cmd.getReturnValue ( ) . getValidationMessages ( ) . contains ( EngineMessage.ACTION_TYPE_FAILED_DISK_SPACE_LOW_ON_STORAGE_DOMAIN.name ( ) ) ) ; }
Source:
public static void getHostById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVdsByVdsId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
public static void getUserMessageOfTheDayViaPublic ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runPublicQuery ( VdcQueryType.GetConfigurationValue , new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.UserMessageOfTheDay , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
public org.ovirt.engine.core.common.businessentities.storage.ImageStatus call ( ) { com.woorea.openstack.cinder.model.Volume volume = proxy.getVolumeById ( id.toString ( ) ) ; org.ovirt.engine.core.common.businessentities.storage.CinderVolumeStatus cinderVolumeStatus = org.ovirt.engine.core.common.businessentities.storage.CinderVolumeStatus.forValue ( volume.getStatus ( ) ) ; return org.ovirt.engine.core.bll.storage.disk.cinder.CinderBroker.mapCinderVolumeStatusToImageStatus ( cinderVolumeStatus ) ; }

Target:
public org.ovirt.engine.core.common.businessentities.storage.ImageStatus getDiskStatus ( final org.ovirt.engine.core.compat.Guid id ) { return execute ( ( ) -> { com.woorea.openstack.cinder.model.Volume volume = proxy.getVolumeById ( id.toString ( ) ) ; org.ovirt.engine.core.common.businessentities.storage.CinderVolumeStatus cinderVolumeStatus = org.ovirt.engine.core.common.businessentities.storage.CinderVolumeStatus.forValue ( volume.getStatus ( ) ) ; return org.ovirt.engine.core.bll.storage.disk.cinder.CinderBroker.mapCinderVolumeStatusToImageStatus ( cinderVolumeStatus ) ; } ) ; }
Source:
public void testRebalance ( ) throws java.lang.Exception { setUriInfo ( setUpActionExpectations ( VdcActionType.StartRebalanceGlusterVolume , org.ovirt.engine.core.common.action.gluster.GlusterVolumeRebalanceParameters.class , new java.lang.String [ ] { "VolumeId" } , new java.lang.Object [ ] { GUIDS [ 0 ] } ) ) ; verifyActionResponse ( resource.rebalance ( new org.ovirt.engine.api.model.Action ( ) ) ) ; }

Target:
public void testRebalance ( ) throws java.lang.Exception { setupParentExpectations ( ) ; resource.setParent ( volumesResourceMock ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.StartRebalanceGlusterVolume , org.ovirt.engine.core.common.action.gluster.GlusterVolumeRebalanceParameters.class , new java.lang.String [ ] { "VolumeId" } , new java.lang.Object [ ] { GUIDS [ 0 ] } ) ) ; verifyActionResponse ( resource.rebalance ( new org.ovirt.engine.api.model.Action ( ) ) ) ; }
Source:
public void getDataCentersByStorageDomain ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storageDomainId ) { 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.StoragePool > ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStoragePoolsByStorageDomainId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( storageDomainId ) , aQuery ) ; }

Target:
public void getClustersHavingHosts ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.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 ) ; }
Source:
protected void persistCommand ( org.ovirt.engine.core.common.action.VdcActionType parentCommand ) { org.ovirt.engine.core.common.action.VdcActionParametersBase parentParameters = getParentParameters ( parentCommand ) ; org.ovirt.engine.core.bll.tasks.TaskManagerUtil.persistCommand ( getCommandId ( ) , parentParameters.getCommandId ( ) , getActionType ( ) , getParameters ( ) , commandStatus ) ; }

Target:
public void persistCommand ( org.ovirt.engine.core.common.action.VdcActionType parentCommand , boolean enableCallBack ) { org.ovirt.engine.core.common.action.VdcActionParametersBase parentParameters = getParentParameters ( parentCommand ) ; javax.transaction.Transaction transaction = org.ovirt.engine.core.utils.transaction.TransactionSupport.suspend ( ) ; try { org.ovirt.engine.core.bll.tasks.TaskManagerUtil.persistCommand ( org.ovirt.engine.core.common.businessentities.CommandEntity.buildCommandEntity ( getCommandId ( ) , parentParameters.getCommandId ( ) , getActionType ( ) , getParameters ( ) , commandStatus , enableCallBack , getReturnValue ( ) ) ) ; } finally { org.ovirt.engine.core.utils.transaction.TransactionSupport.resume ( transaction ) ; } }
Source:
protected void setUpGetNoPayloadExpectations ( int index , int times ) throws java.lang.Exception { for ( int i = 0 ; i < times ; i ++ ) { setUpGetEntityExpectations ( VdcQueryType.GetVmPayload , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ index ] } , null ) ; } }

Target:
private void setUpGetVirtioScsiExpectations ( int ... idxs ) throws java.lang.Exception { for ( int i = 0 ; i < ( idxs.length ) ; i ++ ) { setUpGetEntityExpectations ( VdcQueryType.GetVirtioScsiControllers , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ idxs [ i ] ] } , new java.util.ArrayList < > ( ) ) ; } }
Source:
public void setUp ( ) { params = generateParameters ( ) ; command = org.mockito.Mockito.spy ( generateCommand ( ) ) ; role = new org.ovirt.engine.core.common.businessentities.roles ( ) ; role.setId ( params.getRoleId ( ) ) ; org.mockito.Mockito.doReturn ( roleDAOMock ) . when ( command ) . getRoleDao ( ) ; org.mockito.Mockito.when ( roleDAOMock.get ( params.getRoleId ( ) ) ) . thenReturn ( role ) ; org.mockito.Mockito.doReturn ( roleGroupMapDAOMock ) . when ( command ) . getRoleGroupMapDAO ( ) ; }

Target:
public void setUp ( ) { params = generateParameters ( ) ; command = org.mockito.Mockito.spy ( generateCommand ( ) ) ; role = new org.ovirt.engine.core.common.businessentities.Role ( ) ; role.setId ( params.getRoleId ( ) ) ; org.mockito.Mockito.doReturn ( roleDAOMock ) . when ( command ) . getRoleDao ( ) ; org.mockito.Mockito.when ( roleDAOMock.get ( params.getRoleId ( ) ) ) . thenReturn ( role ) ; org.mockito.Mockito.doReturn ( roleGroupMapDAOMock ) . when ( command ) . getRoleGroupMapDAO ( ) ; }
Source:
public void testRemoveAllSupportedHostFeature ( ) { java.util.Set < java.lang.String > featuresSupported = dao.getSupportedHostFeaturesByHostId ( org.ovirt.engine.core.dao.SupportedHostFeatureDaoTest.EXISTING_HOST_ID_1 ) ; org.junit.Assert.assertFalse ( featuresSupported.isEmpty ( ) ) ; dao.removeAllSupportedHostFeature ( org.ovirt.engine.core.dao.SupportedHostFeatureDaoTest.EXISTING_HOST_ID_1 , featuresSupported ) ; java.util.Set < java.lang.String > featuresSupportedAfterDeletion = dao.getSupportedHostFeaturesByHostId ( org.ovirt.engine.core.dao.SupportedHostFeatureDaoTest.EXISTING_HOST_ID_1 ) ; org.junit.Assert.assertTrue ( "Failed to remove addtional supported features" , featuresSupportedAfterDeletion.isEmpty ( ) ) ; }

Target:
public void testRemoveAllSupportedHostFeature ( ) { java.util.Set < java.lang.String > featuresSupported = dao.getSupportedHostFeaturesByHostId ( FixturesTool.HOST_ID ) ; org.junit.Assert.assertFalse ( featuresSupported.isEmpty ( ) ) ; dao.removeAllSupportedHostFeature ( FixturesTool.HOST_ID , featuresSupported ) ; java.util.Set < java.lang.String > featuresSupportedAfterDeletion = dao.getSupportedHostFeaturesByHostId ( FixturesTool.HOST_ID ) ; org.junit.Assert.assertTrue ( "Failed to remove addtional supported features" , featuresSupportedAfterDeletion.isEmpty ( ) ) ; }
Source:
private static org.ovirt.engine.core.common.businessentities.DiskImage createDisk ( ) { org.ovirt.engine.core.common.businessentities.DiskImage disk = new org.ovirt.engine.core.common.businessentities.DiskImage ( ) ; disk.setId ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; disk.setDiskAlias ( org.ovirt.engine.core.utils.RandomUtils.instance ( ) . nextString ( 10 ) ) ; disk.setActive ( true ) ; disk.setImageStatus ( ImageStatus.OK ) ; return disk ; }

Target:
private static org.ovirt.engine.core.common.businessentities.DiskImage createDisk ( ) { org.ovirt.engine.core.common.businessentities.DiskImage disk = new org.ovirt.engine.core.common.businessentities.DiskImage ( ) ; disk.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; disk.setDiskAlias ( org.ovirt.engine.core.utils.RandomUtils.instance ( ) . nextString ( 10 ) ) ; disk.setActive ( true ) ; disk.setImageStatus ( ImageStatus.OK ) ; return disk ; }
Source:
public static void getHostFingerprint ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String hostAddress ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetServerSSHKeyFingerprint , new org.ovirt.engine.core.common.queries.ServerParameters ( hostAddress ) , aQuery ) ; }

Target:
public static void getHostPublicKey ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetServerSSHPublicKey , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }
Source:
public static void getUpHostListByCluster ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String clusterName ) { 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.uicommonweb.dataprovider.AsyncDataProvider.getUpHostListByCluster ( aQuery , clusterName , null ) ; }

Target:
public static void getAllTemplatesFromExportDomain ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.compat.Guid storageDomainId ) { 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.HashMap < org.ovirt.engine.core.common.businessentities.VmTemplate , java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetAllFromExportDomainQueryParameters getAllFromExportDomainQueryParamenters = new org.ovirt.engine.core.common.queries.GetAllFromExportDomainQueryParameters ( storagePoolId , storageDomainId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetTemplatesFromExportDomain , getAllFromExportDomainQueryParamenters , aQuery ) ; }
Source:
private static void setDiskList ( org.ovirt.engine.core.common.businessentities.VmTemplate vmTemplate ) { for ( org.ovirt.engine.core.common.businessentities.DiskImage diskImage : org.ovirt.engine.core.bll.CommonVmPoolWithVmsCommandTestAbstract.getDiskImageList ( ) ) { vmTemplate.getDiskList ( ) . add ( diskImage ) ; } java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.DiskImage > diskImageTemplate = org.ovirt.engine.core.bll.CommonVmPoolWithVmsCommandTestAbstract.getDiskImageTempalteList ( ) ; for ( org.ovirt.engine.core.compat.Guid key : diskImageTemplate.keySet ( ) ) { vmTemplate.getDiskTemplateMap ( ) . put ( key , diskImageTemplate.get ( key ) ) ; } }

Target:
private static void setDiskList ( org.ovirt.engine.core.common.businessentities.VmTemplate vmTemplate ) { for ( org.ovirt.engine.core.common.businessentities.DiskImage diskImage : org.ovirt.engine.core.bll.CommonVmPoolWithVmsCommandTestAbstract.getDiskImageList ( ) ) { vmTemplate.getDiskList ( ) . add ( diskImage ) ; } java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.DiskImage > diskImageTemplate = org.ovirt.engine.core.bll.CommonVmPoolWithVmsCommandTestAbstract.getDiskImageTempalteList ( ) ; vmTemplate.getDiskTemplateMap ( ) . putAll ( diskImageTemplate ) ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult hotUpdatePossible ( ) { if ( ( getRequiredAction ( ) ) == ( org.ovirt.engine.core.bll.network.vm.UpdateVmInterfaceCommand.RequiredAction.UPDATE_VM_DEVICE ) ) { if ( ! ( org.ovirt.engine.core.common.FeatureSupported.networkLinking ( version ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.HOT_VM_INTERFACE_UPDATE_IS_NOT_SUPPORTED , org.ovirt.engine.core.bll.network.vm.UpdateVmInterfaceCommand.UpdateVmNicValidator.clusterVersion ( ) ) ; } else if ( ( ( getVnicProfile ( ) ) != null ) && ( getVnicProfile ( ) . isPortMirroring ( ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.CANNOT_PERFORM_HOT_UPDATE_WITH_PORT_MIRRORING ) ; } } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult hotUpdatePossible ( ) { if ( ( getRequiredAction ( ) ) == ( org.ovirt.engine.core.bll.network.vm.UpdateVmInterfaceCommand.RequiredAction.UPDATE_VM_DEVICE ) ) { if ( ! ( org.ovirt.engine.core.common.FeatureSupported.networkLinking ( version ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.HOT_VM_INTERFACE_UPDATE_IS_NOT_SUPPORTED , org.ovirt.engine.core.bll.network.vm.UpdateVmInterfaceCommand.UpdateVmNicValidator.clusterVersion ( ) ) ; } else if ( ( portMirroringEnabled ( org.ovirt.engine.core.bll.network.vm.UpdateVmInterfaceCommand.UpdateVmNicValidator.getInterface ( ) . getVnicProfileId ( ) ) ) || ( portMirroringEnabled ( oldIface.getVnicProfileId ( ) ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.CANNOT_PERFORM_HOT_UPDATE_WITH_PORT_MIRRORING ) ; } } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }
Source:
protected javax.ws.rs.core.Response performRemove ( java.lang.String id ) { org.ovirt.engine.core.common.action.QosParametersBase < ? > params = new org.ovirt.engine.core.common.action.QosParametersBase ( ) ; params.setQosId ( org.ovirt.engine.api.restapi.utils.GuidUtils.asGuid ( id ) ) ; return performAction ( VdcActionType.RemoveStorageQos , params ) ; }

Target:
private org.ovirt.engine.core.common.action.VdcActionType addActionTypeForQosType ( org.ovirt.engine.api.model.QosType qosType ) { switch ( qosType ) { case STORAGE : return org.ovirt.engine.core.common.action.VdcActionType.AddStorageQos ; case CPU : return org.ovirt.engine.core.common.action.VdcActionType.AddCpuQos ; case NETWORK : return org.ovirt.engine.core.common.action.VdcActionType.AddNetworkQoS ; default : throw new java.lang.IllegalArgumentException ( ( ( "Unsupported QoS type \"" + qosType ) + "\"" ) ) ; } }
Source:
private void mockVdsDao ( org.ovirt.engine.core.common.businessentities.VDSStatus vdsStatus , java.util.List < org.ovirt.engine.core.common.businessentities.VDS > listVds ) { org.ovirt.engine.core.dao.VdsDAO vdsDAOMock = org.mockito.Mockito.mock ( org.ovirt.engine.core.dao.VdsDAO.class ) ; org.mockito.Mockito.when ( vdsDAOMock.getAllForStoragePoolAndStatus ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) , org.mockito.Matchers.eq ( vdsStatus ) ) ) . thenReturn ( listVds ) ; org.mockito.Mockito.when ( getDbFacadeMockInstance ( ) . getVdsDao ( ) ) . thenReturn ( vdsDAOMock ) ; }

Target:
private void mockVdsDao ( org.ovirt.engine.core.common.businessentities.VDSStatus vdsStatus , java.util.List < org.ovirt.engine.core.common.businessentities.VDS > listVds ) { org.ovirt.engine.core.dao.VdsDao vdsDaoMock = org.mockito.Mockito.mock ( org.ovirt.engine.core.dao.VdsDao.class ) ; org.mockito.Mockito.when ( vdsDaoMock.getAllForStoragePoolAndStatus ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) , org.mockito.Matchers.eq ( vdsStatus ) ) ) . thenReturn ( listVds ) ; org.mockito.Mockito.when ( getDbFacadeMockInstance ( ) . getVdsDao ( ) ) . thenReturn ( vdsDaoMock ) ; }
Source:
private void scanAlignment ( ) { java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > parameterList = new java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > ( ) ; for ( org.ovirt.engine.core.common.businessentities.Disk disk : ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ) ( getSelectedItems ( ) ) ) ) { parameterList.add ( new org.ovirt.engine.core.common.action.GetDiskAlignmentParameters ( disk.getId ( ) ) ) ; } org.ovirt.engine.ui.frontend.Frontend.RunMultipleAction ( VdcActionType.GetDiskAlignment , parameterList , new org.ovirt.engine.ui.uicompat.IFrontendMultipleActionAsyncCallback ( ) { @ java.lang.Override public void executed ( org.ovirt.engine.ui.uicompat.FrontendMultipleActionAsyncResult result ) { } } , this ) ; }

Target:
private void scanAlignment ( ) { java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > parameterList = new java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > ( ) ; for ( org.ovirt.engine.core.common.businessentities.Disk disk : ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ) ( getSelectedItems ( ) ) ) ) { parameterList.add ( new org.ovirt.engine.core.common.action.GetDiskAlignmentParameters ( disk.getId ( ) ) ) ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runMultipleAction ( VdcActionType.GetDiskAlignment , parameterList , new org.ovirt.engine.ui.uicompat.IFrontendMultipleActionAsyncCallback ( ) { @ java.lang.Override public void executed ( org.ovirt.engine.ui.uicompat.FrontendMultipleActionAsyncResult result ) { } } , this ) ; }
Source:
protected org.ovirt.engine.api.model.Disk doPopulate ( org.ovirt.engine.api.model.Disk model , org.ovirt.engine.api.model.Disk entity ) { return collection.doPopulate ( model , entity ) ; }

Target:
protected org.ovirt.engine.api.model.Disk deprecatedPopulate ( org.ovirt.engine.api.model.Disk model , org.ovirt.engine.api.model.Disk entity ) { java.util.Set < java.lang.String > details = org.ovirt.engine.api.common.util.DetailHelper.getDetails ( httpHeaders , uriInfo ) ; if ( details.contains ( "statistics" ) ) { addStatistics ( model , entity ) ; } return model ; }
Source:
public void eventRaised ( org.ovirt.engine.core.compat.Event ev , java.lang.Object sender , org.ovirt.engine.core.compat.EventArgs args ) { org.ovirt.engine.ui.uicommonweb.models.datacenters.DataCenterNetworkModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.datacenters.DataCenterNetworkModel ) ( sender ) ) ; java.lang.String propertyName = ( ( org.ovirt.engine.core.compat.PropertyChangedEventArgs ) ( args ) ) . PropertyName ; if ( "NetworkClusterList" . equals ( propertyName ) ) { getView ( ) . setNetworkClusterList ( model.getNetworkClusterList ( ) ) ; } else if ( "Message" . equals ( propertyName ) ) { getView ( ) . setMessageLabel ( model.getMessage ( ) ) ; } }

Target:
public void eventRaised ( org.ovirt.engine.core.compat.Event ev , java.lang.Object sender , org.ovirt.engine.core.compat.EventArgs args ) { java.lang.String propertyName = ( ( org.ovirt.engine.core.compat.PropertyChangedEventArgs ) ( args ) ) . PropertyName ; if ( "IsExecutionAllowed" . equals ( propertyName ) ) { getView ( ) . setApplyEnabled ( model.getApplyCommand ( ) . getIsExecutionAllowed ( ) ) ; } }
Source:
protected boolean validateImagesAndVMStates ( ) { return org.ovirt.engine.core.bll.ImagesHandler.PerformImagesChecks ( org.ovirt.engine.core.bll.RemoveSnapshotCommand.getReturnValue ( ) . getCanDoActionMessages ( ) , org.ovirt.engine.core.bll.RemoveSnapshotCommand.getVm ( ) . getStoragePoolId ( ) , Guid.Empty , hasImages ( ) , hasImages ( ) , hasImages ( ) , hasImages ( ) , true , true , org.ovirt.engine.core.bll.RemoveSnapshotCommand.getDiskDao ( ) . getAllForVm ( org.ovirt.engine.core.bll.RemoveSnapshotCommand.getVmId ( ) ) ) ; }

Target:
private java.util.Map < org.ovirt.engine.core.compat.Guid , java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > > getStorageToDiskMap ( ) { java.util.Map < org.ovirt.engine.core.compat.Guid , java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > > storageToDisksMap = new java.util.HashMap < org.ovirt.engine.core.compat.Guid , java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > > ( ) ; for ( org.ovirt.engine.core.common.businessentities.DiskImage disk : getSourceImages ( ) ) { org.ovirt.engine.core.utils.MultiValueMapUtils.addToMap ( disk.getStorageIds ( ) . get ( 0 ) , disk , storageToDisksMap ) ; } return storageToDisksMap ; }
Source:
public void onSuccess ( java.lang.Object model1 , java.lang.Object result1 ) { getProfile ( ) . setItems ( ( ( java.util.List < org.ovirt.engine.core.common.businessentities.network.VnicProfileView > ) ( result1 ) ) ) ; profileBehavior.initSelectedProfile ( getProfile ( ) , getNic ( ) ) ; updateProfileChangability ( ) ; okCommand.setIsExecutionAllowed ( true ) ; }

Target:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { org.ovirt.engine.core.common.action.VdcReturnValueBase returnValue = result.getReturnValue ( ) ; stopProgress ( ) ; if ( ( returnValue != null ) && ( returnValue.getSucceeded ( ) ) ) { cancel ( ) ; postOnSave ( ) ; } }
Source:
protected boolean setAndValidateCpuProfile ( ) { if ( ( isInstanceType ( ) ) || ( org.ovirt.engine.core.bll.UpdateVmTemplateCommand.isBlankTemplate ( ) ) ) { return true ; } return validate ( cpuProfileHelper.setAndValidateCpuProfile ( org.ovirt.engine.core.bll.UpdateVmTemplateCommand.getVmTemplate ( ) , org.ovirt.engine.core.bll.UpdateVmTemplateCommand.getUserId ( ) ) ) ; }

Target:
protected boolean setAndValidateCpuProfile ( ) { if ( ( isInstanceType ( ) ) || ( org.ovirt.engine.core.bll.UpdateVmTemplateCommand.isBlankTemplate ( ) ) ) { return true ; } return validate ( cpuProfileHelper.setAndValidateCpuProfile ( org.ovirt.engine.core.bll.UpdateVmTemplateCommand.getVmTemplate ( ) , org.ovirt.engine.core.bll.UpdateVmTemplateCommand.getUserIdIfExternal ( ) . orElse ( null ) ) ) ; }
Source:
public javax.ws.rs.core.Response add ( org.ovirt.engine.core.common.businessentities.Cluster cluster ) { validateParameters ( cluster , getMandatoryParameters ( ) ) ; org.ovirt.engine.core.common.businessentities.StoragePool dataCenter = getDataCenter ( cluster ) ; return performCreate ( ActionType.AddCluster , createAddCommandParams ( cluster , dataCenter ) , new org.ovirt.engine.api.restapi.resource.QueryIdResolver < org.ovirt.engine.core.compat.Guid > ( org.ovirt.engine.core.common.queries.QueryType.GetClusterById , org.ovirt.engine.core.common.queries.IdQueryParameters.class ) ) ; }

Target:
public javax.ws.rs.core.Response add ( org.ovirt.engine.core.common.businessentities.Cluster cluster ) { validateParameters ( cluster , getMandatoryParameters ( ) ) ; org.ovirt.engine.core.common.businessentities.StoragePool dataCenter = getDataCenter ( cluster ) ; org.ovirt.engine.api.restapi.resource.BackendExternalProviderHelper.completeExternalProviders ( this , cluster.getExternalNetworkProviders ( ) ) ; return performCreate ( ActionType.AddCluster , createAddCommandParams ( cluster , dataCenter ) , new org.ovirt.engine.api.restapi.resource.QueryIdResolver < org.ovirt.engine.core.compat.Guid > ( org.ovirt.engine.core.common.queries.QueryType.GetClusterById , org.ovirt.engine.core.common.queries.IdQueryParameters.class ) ) ; }
Source:
public void getStorageDomainsWithAttachedStoragePoolGuid ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.businessentities.StoragePool storagePool , java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > storageDomains ) { 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 ? new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) : ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ) ( source ) ) ; } } ; org.ovirt.engine.core.common.queries.StorageDomainsAndStoragePoolIdQueryParameters parameters = new org.ovirt.engine.core.common.queries.StorageDomainsAndStoragePoolIdQueryParameters ( storageDomains , storagePool.getId ( ) ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainsWithAttachedStoragePoolGuid , parameters , aQuery ) ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { migrationPolicies = ( ( java.util.List < org.ovirt.engine.core.common.migration.MigrationPolicy > ) ( returnValue ) ) ; }
Source:
public boolean equals ( java.lang.Object obj ) { if ( ( this ) == obj ) { return true ; } if ( ! ( obj instanceof org.ovirt.engine.core.common.businessentities.event_subscriber_id ) ) { return false ; } org.ovirt.engine.core.common.businessentities.event_subscriber_id other = ( ( org.ovirt.engine.core.common.businessentities.event_subscriber_id ) ( obj ) ) ; return ( ( ( java.util.Objects.equals ( subscriberId , other.subscriberId ) ) && ( java.util.Objects.equals ( eventUpName , other.eventUpName ) ) ) && ( ( eventNotificationMethod ) == ( other.eventNotificationMethod ) ) ) && ( java.util.Objects.equals ( tagName , other.tagName ) ) ; }

Target:
public boolean equals ( java.lang.Object obj ) { if ( ( this ) == obj ) { return true ; } if ( ! ( obj instanceof org.ovirt.engine.core.common.businessentities.EventSubscriberId ) ) { return false ; } org.ovirt.engine.core.common.businessentities.EventSubscriberId other = ( ( org.ovirt.engine.core.common.businessentities.EventSubscriberId ) ( obj ) ) ; return ( ( ( java.util.Objects.equals ( subscriberId , other.subscriberId ) ) && ( java.util.Objects.equals ( eventUpName , other.eventUpName ) ) ) && ( ( eventNotificationMethod ) == ( other.eventNotificationMethod ) ) ) && ( java.util.Objects.equals ( tagName , other.tagName ) ) ; }
Source:
public boolean equals ( java.lang.Object obj ) { boolean returnValue = super . equals ( obj ) ; if ( ( ( ! returnValue ) && ( obj != null ) ) && ( obj instanceof org.ovirt.engine.core.common.businessentities.storage_server_connections ) ) { returnValue = ( ! ( org.ovirt.engine.core.compat.StringHelper.EqOp ( getid ( ) , "" ) ) ) && ( org.ovirt.engine.core.compat.StringHelper.EqOp ( getid ( ) , ( ( org.ovirt.engine.core.common.businessentities.storage_server_connections ) ( obj ) ) . getid ( ) ) ) ; } return returnValue ; }

Target:
public boolean equals ( java.lang.Object obj ) { boolean returnValue = super . equals ( obj ) ; if ( ( ( ! returnValue ) && ( obj != null ) ) && ( obj instanceof org.ovirt.engine.core.common.businessentities.StorageServerConnections ) ) { returnValue = ( ! ( org.ovirt.engine.core.compat.StringHelper.EqOp ( getid ( ) , "" ) ) ) && ( org.ovirt.engine.core.compat.StringHelper.EqOp ( getid ( ) , ( ( org.ovirt.engine.core.common.businessentities.StorageServerConnections ) ( obj ) ) . getid ( ) ) ) ; } return returnValue ; }
Source:
public void getAAANamespaces ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.HashMap < java.lang.String , java.util.List < java.lang.String > > ) ( source ) ) : new java.util.HashMap < java.lang.String , java.util.List < java.lang.String > > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAvailableNamespaces , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }

Target:
public void getGlusterVolumeGeoRepStatusForMasterVolume ( org.ovirt.engine.ui.frontend.AsyncQuery < java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSession > > aQuery , org.ovirt.engine.core.compat.Guid masterVolumeId ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.ListConverter < > ( ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterVolumeGeoRepSessions , new org.ovirt.engine.core.common.queries.IdQueryParameters ( masterVolumeId ) , aQuery ) ; }
Source:
private boolean areAllDisksPluggedToVm ( java.util.List < org.ovirt.engine.core.common.action.MoveDiskParameters > moveDiskParamsList , boolean plugged ) { for ( org.ovirt.engine.core.common.action.MoveDiskParameters moveDiskParameters : moveDiskParamsList ) { org.ovirt.engine.core.common.businessentities.DiskImage diskImage = diskMap.get ( moveDiskParameters.getImageId ( ) ) ; if ( ( diskImage.getPlugged ( ) ) != plugged ) { return false ; } } return true ; }

Target:
private boolean areAllDisksPluggedToVm ( java.util.List < org.ovirt.engine.core.common.action.MoveDiskParameters > moveDiskParamsList , boolean plugged ) { for ( org.ovirt.engine.core.common.action.MoveDiskParameters moveDiskParameters : moveDiskParamsList ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage diskImage = diskMap.get ( moveDiskParameters.getImageId ( ) ) ; if ( ( diskImage.getPlugged ( ) ) != plugged ) { return false ; } } return true ; }
Source:
protected boolean isRunningVmsWithIsoAttached ( ) { if ( ( ! ( org.ovirt.engine.core.bll.storage.DeactivateStorageDomainCommand.getParameters ( ) . getIsInternal ( ) ) ) && ( ( org.ovirt.engine.core.bll.storage.DeactivateStorageDomainCommand.getStorageDomain ( ) . getStorageDomainType ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageDomainType.ISO ) ) ) { java.util.List < java.lang.String > vmNames = getVmsWithAttachedISO ( ) ; if ( ! ( vmNames.isEmpty ( ) ) ) { return failCanDoAction ( VdcBllMessages.ERROR_CANNOT_DEACTIVATE_STORAGE_DOMAIN_WITH_ISO_ATTACHED , java.lang.String.format ( "$VmNames %1$s" , org.apache.commons.lang.StringUtils.join ( vmNames , "," ) ) ) ; } } return true ; }

Target:
protected boolean isRunningVmsWithIsoAttached ( ) { if ( ( ! ( org.ovirt.engine.core.bll.storage.DeactivateStorageDomainCommand.getParameters ( ) . getIsInternal ( ) ) ) && ( ( org.ovirt.engine.core.bll.storage.DeactivateStorageDomainCommand.getStorageDomain ( ) . getStorageDomainType ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageDomainType.ISO ) ) ) { java.util.List < java.lang.String > vmNames = getVmsWithAttachedISO ( ) ; if ( ! ( vmNames.isEmpty ( ) ) ) { return failCanDoAction ( EngineMessage.ERROR_CANNOT_DEACTIVATE_STORAGE_DOMAIN_WITH_ISO_ATTACHED , java.lang.String.format ( "$VmNames %1$s" , org.apache.commons.lang.StringUtils.join ( vmNames , "," ) ) ) ; } } return true ; }
Source:
public void onAddTabActionButton ( org.ovirt.engine.ui.common.presenter.AddTabActionButtonEvent event ) { if ( org.ovirt.engine.ui.common.presenter.AbstractTabPresenter.getProxy ( ) . getTargetHistoryToken ( ) . equals ( event.getHistoryToken ( ) ) ) { if ( ( getTable ( ) ) != null ) { getTable ( ) . addActionButton ( ( ( org.ovirt.engine.ui.common.widget.action.ActionButtonDefinition ) ( event.getButtonDefinition ( ) ) ) ) ; } } }

Target:
private void addPluginActionButtons ( java.util.List < org.ovirt.engine.ui.common.widget.action.ActionButtonDefinition < ? > > pluginActionButtonList ) { if ( ( getTable ( ) ) != null ) { for ( org.ovirt.engine.ui.common.widget.action.ActionButtonDefinition < ? > buttonDef : pluginActionButtonList ) { getTable ( ) . addActionButton ( ( ( org.ovirt.engine.ui.common.widget.action.ActionButtonDefinition ) ( buttonDef ) ) ) ; } } }
Source:
private org.apache.http.impl.client.DefaultHttpClient createDefaultHttpClient ( java.lang.String url , java.lang.String username , java.lang.String password , java.lang.String key_file , java.lang.String cert_file , java.lang.String ca_file , java.lang.Integer port , java.lang.Integer timeout ) { org.apache.http.impl.client.DefaultHttpClient client = new org.apache.http.impl.client.DefaultHttpClient ( createPoolingClientConnectionManager ( url , port ) ) ; client.getCredentialsProvider ( ) . setCredentials ( new org.apache.http.auth.AuthScope ( getHost ( url ) , getPort ( url , port ) ) , new org.apache.http.auth.UsernamePasswordCredentials ( username , password ) ) ; return client ; }

Target:
private org.apache.http.impl.client.DefaultHttpClient createDefaultHttpClient ( java.lang.String url , java.lang.String username , java.lang.String password , java.lang.String key_file , java.lang.String cert_file , java.lang.String ca_file , java.lang.Integer port , java.lang.Integer timeout ) { int port_ = getPort ( url , port ) ; org.apache.http.impl.client.DefaultHttpClient client = new org.apache.http.impl.client.DefaultHttpClient ( createPoolingClientConnectionManager ( url , port_ ) ) ; client.getCredentialsProvider ( ) . setCredentials ( new org.apache.http.auth.AuthScope ( getHost ( url ) , port_ ) , new org.apache.http.auth.UsernamePasswordCredentials ( username , password ) ) ; return client ; }