auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public org.ovirt.engine.core.vdsbroker.irsbroker.OneUuidReturnForXmlRpc glusterSnapshotCreate ( java.lang.String volumeName , java.lang.String snapshotName , java.lang.String description , boolean force ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "GlusterSnapshot.create" ) . withParameter ( "volumeName" , volumeName ) . withParameter ( "snapName" , snapshotName ) . withOptionalParameter ( "description" , description ) . withParameter ( "force" , force ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) . withIgnoreResponseKey ( ) ; return new org.ovirt.engine.core.vdsbroker.irsbroker.OneUuidReturnForXmlRpc ( response ) ; }

Target:
public org.ovirt.engine.core.vdsbroker.irsbroker.OneUuidReturnForXmlRpc glusterSnapshotCreate ( java.lang.String volumeName , java.lang.String snapshotName , java.lang.String description , boolean force ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "GlusterVolume.snapshotCreate" ) . withParameter ( "volumeName" , volumeName ) . withParameter ( "snapName" , snapshotName ) . withOptionalParameter ( "description" , description ) . withParameter ( "force" , force ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) . withIgnoreResponseKey ( ) ; return new org.ovirt.engine.core.vdsbroker.irsbroker.OneUuidReturnForXmlRpc ( response ) ; }
Source:
private void setVdsStatusToPrepareForMaintaice ( org.ovirt.engine.core.common.businessentities.VDS vds ) { if ( ( ( ( vds.getStatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.VDSStatus.PreparingForMaintenance ) ) && ( ( vds.getStatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.VDSStatus.NonResponsive ) ) ) && ( ( vds.getStatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.VDSStatus.Down ) ) ) { runVdsCommand ( VDSCommandType.SetVdsStatus , new org.ovirt.engine.core.common.vdscommands.SetVdsStatusVDSCommandParameters ( vds.getId ( ) , org.ovirt.engine.core.common.businessentities.VDSStatus.PreparingForMaintenance ) ) ; } }

Target:
private void cancelIncommingMigrations ( ) { for ( org.ovirt.engine.core.compat.Guid hostId : vdssToMaintenance.keySet ( ) ) { for ( org.ovirt.engine.core.common.businessentities.VM vm : org.ovirt.engine.core.bll.MaintenanceNumberOfVdssCommand.getVmDAO ( ) . getAllMigratingToHost ( hostId ) ) { if ( ( vm.getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.MigratingFrom ) ) { log.infoFormat ( "Cancelling incoming migration of {0} id: {1}" , vm , vm.getId ( ) ) ; runVdsCommand ( VDSCommandType.CancelMigrate , new org.ovirt.engine.core.vdsbroker.vdsbroker.CancelMigrationVDSParameters ( vm.getRunOnVds ( ) , vm.getId ( ) , true ) ) ; } } } }
Source:
public static void GetSearchResultsLimit ( 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.Integer ) ( source ) ) . intValue ( ) : 100 ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.SearchResultsLimit , org.ovirt.engine.core.common.config.Config.DefaultConfigurationVersion ) , aQuery ) ; }

Target:
public static void GetSearchResultsLimit ( 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.Integer ) ( source ) ) . intValue ( ) : 100 ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.SearchResultsLimit , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface getVlanDevice ( final org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface baseNic , final java.lang.Integer vlanId ) { if ( vlanId == null ) { return null ; } return org.ovirt.engine.core.utils.linq.LinqUtils.firstOrNull ( getNics ( ) , new org.ovirt.engine.core.utils.linq.Predicate < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > ( ) { @ java.lang.Override public boolean eval ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface t ) { return ( baseNic.getName ( ) . equals ( t.getBaseInterface ( ) ) ) && ( org.ovirt.engine.core.common.utils.ObjectUtils.objectsEqual ( t.getVlanId ( ) , vlanId ) ) ; } } ) ; }

Target:
public java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > getNics ( org.ovirt.engine.core.compat.Guid hostId ) { if ( ! ( hostIdToNics.containsKey ( hostId ) ) ) { org.ovirt.engine.core.common.businessentities.VDS host = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; host.setId ( hostId ) ; org.ovirt.engine.core.bll.network.NetworkConfigurator configurator = new org.ovirt.engine.core.bll.network.NetworkConfigurator ( host , null ) ; hostIdToNics.put ( hostId , configurator.filterBondsWithoutSlaves ( interfaceDao.getAllInterfacesForVds ( hostId ) ) ) ; } return hostIdToNics.get ( hostId ) ; }
Source:
protected org.springframework.jdbc.core.namedparam.MapSqlParameterSource createFullParametersMapper ( org.ovirt.engine.core.common.businessentities.VmNetworkStatistics stats ) { return createIdParameterMapper ( stats.getId ( ) ) . addValue ( "rx_drop" , stats.getReceiveDropRate ( ) ) . addValue ( "rx_rate" , stats.getReceiveRate ( ) ) . addValue ( "tx_drop" , stats.getTransmitDropRate ( ) ) . addValue ( "tx_rate" , stats.getTransmitRate ( ) ) . addValue ( "iface_status" , stats.getStatus ( ) ) . addValue ( "vm_id" , stats.getVmId ( ) ) ; }

Target:
protected org.springframework.jdbc.core.namedparam.MapSqlParameterSource createFullParametersMapper ( org.ovirt.engine.core.common.businessentities.network.VmNetworkStatistics stats ) { return createIdParameterMapper ( stats.getId ( ) ) . addValue ( "rx_drop" , stats.getReceiveDropRate ( ) ) . addValue ( "rx_rate" , stats.getReceiveRate ( ) ) . addValue ( "tx_drop" , stats.getTransmitDropRate ( ) ) . addValue ( "tx_rate" , stats.getTransmitRate ( ) ) . addValue ( "iface_status" , stats.getStatus ( ) ) . addValue ( "vm_id" , stats.getVmId ( ) ) ; }
Source:
public void syncWithBackend ( ) { super . syncWithBackend ( ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetClusterList ( new org.ovirt.engine.ui.frontend.AsyncQuery ( this , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object ReturnValue ) { onGetClusterList ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ) ( ReturnValue ) ) ) ; } } ) , getSelectedDc ( ) . getId ( ) ) ; }

Target:
public void syncWithBackend ( ) { super . syncWithBackend ( ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getClusterList ( new org.ovirt.engine.ui.frontend.AsyncQuery ( this , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object ReturnValue ) { onGetClusterList ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ) ( ReturnValue ) ) ) ; } } ) , getSelectedDc ( ) . getId ( ) ) ; }
Source:
public void testPersistNetworkAttachmentsWhenNetworkMovedToDifferentNic ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.NetworkAttachment networkAttachmentForClusterNetworkA = createNetworkAttachment ( clusterNetworkA ) ; org.ovirt.engine.core.compat.Guid notUpToDateNicId = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; networkAttachmentForClusterNetworkA.setNicId ( notUpToDateNicId ) ; networkAttachmentForClusterNetworkA.setNicName ( "nonsense" ) ; org.ovirt.engine.core.common.businessentities.network.IpConfiguration ipConfiguration = org.ovirt.engine.core.utils.NetworkUtils.createIpConfigurationFromVdsNetworkInterface ( interfaceWithAttachedClusterNetworkA ) ; networkAttachmentForClusterNetworkA.setIpConfiguration ( ipConfiguration ) ; networkAttachmentForClusterNetworkA.setProperties ( customPropertiesForNics.getCustomPropertiesFor ( interfaceWithAttachedClusterNetworkA ) ) ; callPersistNetworkAttachmentsAndVerifyThatNetworkAttachmentIsSynced ( networkAttachmentForClusterNetworkA , createPersister ( java.util.Collections.< org.ovirt.engine.core.common.businessentities.network.NetworkAttachment > emptyList ( ) ) ) ; }

Target:
public void testPersistNetworkAttachmentsWhenNetworkMovedToDifferentNic ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.NetworkAttachment networkAttachmentForClusterNetworkA = createNetworkAttachment ( clusterNetworkA ) ; org.ovirt.engine.core.compat.Guid notUpToDateNicId = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; networkAttachmentForClusterNetworkA.setNicId ( notUpToDateNicId ) ; networkAttachmentForClusterNetworkA.setNicName ( "nonsense" ) ; org.ovirt.engine.core.common.businessentities.network.IpConfiguration ipConfiguration = org.ovirt.engine.core.common.utils.NetworkCommonUtils.createIpConfigurationFromVdsNetworkInterface ( interfaceWithAttachedClusterNetworkA ) ; networkAttachmentForClusterNetworkA.setIpConfiguration ( ipConfiguration ) ; networkAttachmentForClusterNetworkA.setProperties ( customPropertiesForNics.getCustomPropertiesFor ( interfaceWithAttachedClusterNetworkA ) ) ; callPersistNetworkAttachmentsAndVerifyThatNetworkAttachmentIsSynced ( networkAttachmentForClusterNetworkA , createPersister ( java.util.Collections.< org.ovirt.engine.core.common.businessentities.network.NetworkAttachment > emptyList ( ) ) ) ; }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { super . eventRaised ( ev , sender , args ) ; if ( ev.matchesDefinition ( HostGeneralModel.RequestEditEventDefinition ) ) { getEditWithPMemphasisCommand ( ) . Execute ( ) ; } if ( ev.matchesDefinition ( HostGeneralModel.RequestGOToEventsTabEventDefinition ) ) { GoToEventsTab ( ) ; } }

Target:
protected void selectedItemPropertyChanged ( java.lang.Object sender , org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs e ) { super . selectedItemPropertyChanged ( sender , e ) ; if ( ( e.PropertyName.equals ( "status" ) ) || ( e.PropertyName.equals ( "pm_enabled" ) ) ) { updateActionAvailability ( ) ; } }
Source:
public void testAddGroup ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpGetEntityExpectations ( ( ( "ADGROUP@" + ( DOMAIN ) ) + ": name=*" ) , SearchType.AdGroup , getAdGroup ( 0 ) ) ; setUpCreationExpectations ( VdcActionType.AddUser , org.ovirt.engine.core.common.action.AddUserParameters.class , new java.lang.String [ ] { "AdGroup.id" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , true , true , null , VdcQueryType.GetAdGroupById , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , getEntity ( 0 ) ) ; org.ovirt.engine.api.model.Group model = new org.ovirt.engine.api.model.Group ( ) ; model.setName ( NAMES [ 0 ] ) ; javax.ws.rs.core.Response response = collection.add ( model ) ; assertEquals ( 201 , response.getStatus ( ) ) ; assertTrue ( ( ( response.getEntity ( ) ) instanceof org.ovirt.engine.api.model.Group ) ) ; verifyModel ( ( ( org.ovirt.engine.api.model.Group ) ( response.getEntity ( ) ) ) , 0 ) ; }

Target:
public void testRemove ( ) throws java.lang.Exception { setUpGetEntityExpectations ( ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.RemoveGroup , org.ovirt.engine.core.common.action.AdElementParametersBase.class , new java.lang.String [ ] { "AdElementId" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , true , true ) ) ; verifyRemove ( collection.remove ( GUIDS [ 0 ] . toString ( ) ) ) ; }
Source:
private void addLabels ( org.ovirt.engine.core.common.businessentities.network.HostNicVfsConfig newConfig ) { java.util.Set < java.lang.String > labels = new java.util.HashSet < > ( ) ; labels.add ( "lbl1" ) ; labels.add ( "lbl2" ) ; labels.add ( "lbl3" ) ; labels.add ( "lbl4" ) ; newConfig.setLabels ( labels ) ; }

Target:
private void addLabels ( org.ovirt.engine.core.common.businessentities.network.HostNicVfsConfig newConfig ) { java.util.Set < java.lang.String > labels = new java.util.HashSet < > ( ) ; labels.add ( "lbl1" ) ; labels.add ( "lbl2" ) ; labels.add ( "lbl3" ) ; labels.add ( "lbl4" ) ; newConfig.setNetworkLabels ( labels ) ; }
Source:
public void engineIsRunningNotification ( ) { try { heartBeatVar.setDateTime ( new java.util.Date ( ) ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getDwhHistoryTimekeepingDao ( ) . save ( heartBeatVar ) ; } catch ( java.lang.Exception ex ) { org.ovirt.engine.core.bll.dwh.DwhHeartBeat.log.error ( "Error updating DWH Heart Beat: {}" , ex.getMessage ( ) ) ; org.ovirt.engine.core.bll.dwh.DwhHeartBeat.log.debug ( "Exception" , ex ) ; } }

Target:
public void engineIsRunningNotification ( ) { try { heartBeatVar.setDateTime ( new java.util.Date ( ) ) ; dwhHistoryTimekeepingDao.save ( heartBeatVar ) ; } catch ( java.lang.Exception ex ) { org.ovirt.engine.core.bll.dwh.DwhHeartBeat.log.error ( "Error updating DWH Heart Beat: {}" , ex.getMessage ( ) ) ; org.ovirt.engine.core.bll.dwh.DwhHeartBeat.log.debug ( "Exception" , ex ) ; } }
Source:
private static void handleErrorLog ( org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.compat.Guid storageDomainId , org.ovirt.engine.core.common.businessentities.FileTypeExtension fileTypeExt ) { java.util.List < org.ovirt.engine.core.common.businessentities.RepoFileMetaData > tempProblematicRepoFileList = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.RepoFileMetaData > ( ) ; org.ovirt.engine.core.common.businessentities.RepoFileMetaData repoFileMetaData = new org.ovirt.engine.core.common.businessentities.RepoFileMetaData ( ) ; repoFileMetaData.setStoragePoolId ( storagePoolId ) ; repoFileMetaData.setRepoDomainId ( storageDomainId ) ; repoFileMetaData.setFileType ( fileTypeExt ) ; tempProblematicRepoFileList.add ( repoFileMetaData ) ; org.ovirt.engine.core.bll.IsoDomainListSyncronizer.handleErrorLog ( tempProblematicRepoFileList ) ; }

Target:
private static void handleErrorLog ( org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.compat.Guid storageDomainId , org.ovirt.engine.core.common.businessentities.ImageType imageType ) { java.util.List < org.ovirt.engine.core.common.businessentities.RepoFileMetaData > tempProblematicRepoFileList = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.RepoFileMetaData > ( ) ; org.ovirt.engine.core.common.businessentities.RepoFileMetaData repoFileMetaData = new org.ovirt.engine.core.common.businessentities.RepoFileMetaData ( ) ; repoFileMetaData.setStoragePoolId ( storagePoolId ) ; repoFileMetaData.setRepoDomainId ( storageDomainId ) ; repoFileMetaData.setFileType ( imageType ) ; tempProblematicRepoFileList.add ( repoFileMetaData ) ; org.ovirt.engine.core.bll.IsoDomainListSyncronizer.handleErrorLog ( tempProblematicRepoFileList ) ; }
Source:
public void cpuTypeDoesNotSupportVirtServiceForVirtCluster ( ) { org.mockito.Mockito.when ( cluster.supportsVirtService ( ) ) . thenReturn ( true ) ; validator = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.validator.ClusterValidator ( dbFacade , cluster ) ) ; org.mockito.Mockito.doReturn ( false ) . when ( validator ) . cpuExists ( ) ; org.junit.Assert.assertThat ( validator.cpuTypeSupportsVirtService ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.ACTION_TYPE_FAILED_CPU_NOT_FOUND ) ) ; }

Target:
public void cpuTypeDoesNotSupportVirtServiceForVirtCluster ( ) { org.mockito.Mockito.when ( cluster.supportsVirtService ( ) ) . thenReturn ( true ) ; validator = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.validator.ClusterValidator ( dbFacade , cluster , cpuFlagsManagerHandler ) ) ; org.mockito.Mockito.doReturn ( false ) . when ( validator ) . cpuExists ( ) ; org.junit.Assert.assertThat ( validator.cpuTypeSupportsVirtService ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.ACTION_TYPE_FAILED_CPU_NOT_FOUND ) ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { java.util.List < java.lang.String > consoleDevices = ( ( java.util.List < java.lang.String > ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ) ) ; getModel ( ) . getIsConsoleDeviceEnabled ( ) . setEntity ( ( ! ( consoleDevices.isEmpty ( ) ) ) ) ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { getModel ( ) . getIsSoundcardEnabled ( ) . setEntity ( ( ( java.lang.Boolean ) ( returnValue ) ) ) ; }
Source:
public void initializeHandlers ( ) { super . initializeHandlers ( ) ; getView ( ) . getHotUnplugColumn ( ) . addHandler ( new org.ovirt.engine.ui.common.widget.CellClickHandler < org.ovirt.engine.core.common.businessentities.VmDevice > ( ) { @ java.lang.Override public void onClick ( com.google.gwt.dom.client.NativeEvent event , org.ovirt.engine.core.common.businessentities.VmDevice vmDevice ) { getModelProvider ( ) . getModel ( ) . onHotUnplug ( vmDevice ) ; } } ) ; }

Target:
public void initializeHandlers ( ) { super . initializeHandlers ( ) ; registerHandler ( getView ( ) . getHotUnplugColumn ( ) . addHandler ( new org.ovirt.engine.ui.common.widget.CellClickHandler < org.ovirt.engine.ui.uicommonweb.models.vms.VmDeviceFeEntity > ( ) { @ java.lang.Override public void onClick ( com.google.gwt.dom.client.NativeEvent event , org.ovirt.engine.ui.uicommonweb.models.vms.VmDeviceFeEntity vmDevice ) { getModelProvider ( ) . getModel ( ) . onHotUnplug ( vmDevice ) ; } } ) ) ; }
Source:
public java.lang.String toString ( ) { java.lang.StringBuilder sb = new java.lang.StringBuilder ( "{ skipFencingIfSDActive=" ) ; sb.append ( skipFencingIfSDActive ) ; sb.append ( " }" ) ; return sb.toString ( ) ; }

Target:
public java.lang.String toString ( ) { java.lang.StringBuilder sb = new java.lang.StringBuilder ( "{ fencingEnabled=" ) ; sb.append ( fencingEnabled ) ; sb.append ( ", skipFencingIfSDActive=" ) ; sb.append ( skipFencingIfSDActive ) ; sb.append ( ", skipFencingIfConnectivityBroken=" ) ; sb.append ( skipFencingIfConnectivityBroken ) ; sb.append ( ", hostsWithBrokenConnectivityThreshold=" ) ; sb.append ( hostsWithBrokenConnectivityThreshold ) ; sb.append ( " }" ) ; return sb.toString ( ) ; }
Source:
public void getExternalProviderDiscoveredHostList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.businessentities.Provider provider ) { 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.ExternalDiscoveredHost > ( ) ; } return source ; } } ; org.ovirt.engine.core.common.queries.ProviderQueryParameters params = new org.ovirt.engine.core.common.queries.ProviderQueryParameters ( ) ; params.setProvider ( provider ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetDiscoveredHostListFromExternalProvider , params , aQuery ) ; }

Target:
public void getExternalProviderComputeResourceList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.businessentities.Provider provider ) { 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.ExternalComputeResource > ( ) ; } return source ; } } ; org.ovirt.engine.core.common.queries.ProviderQueryParameters params = new org.ovirt.engine.core.common.queries.ProviderQueryParameters ( ) ; params.setProvider ( provider ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetComputeResourceFromExternalProvider , params , aQuery ) ; }
Source:
private static boolean hasSnappableDisks ( org.ovirt.engine.core.common.businessentities.VM vm ) { return ! ( vm.getImages ( ) . isEmpty ( ) ) ; }

Target:
protected void executeCommand ( ) { try { addVmToDb ( ) ; org.ovirt.engine.core.common.businessentities.VM vm = getVm ( ) ; if ( vm.getImages ( ) . isEmpty ( ) ) { endVmRelatedOps ( ) ; } else { processImages ( ) ; } } catch ( java.lang.RuntimeException e ) { org.ovirt.engine.core.bll.MacPoolManager.getInstance ( ) . freeMacs ( macsAdded ) ; throw e ; } setSucceeded ( true ) ; }
Source:
private long getMetaDataSizeInBytes ( ) { return ( ( long ) ( 10 ) ) * 1024 ; }

Target:
public org.ovirt.engine.core.compat.Guid getStorageDomainId ( ) { if ( ( _storageDomainId.equals ( Guid.Empty ) ) && ( ( org.ovirt.engine.core.bll.HibernateVmCommand.getVm ( ) ) != null ) ) { long sizeNeeded = ( ( org.ovirt.engine.core.bll.HibernateVmCommand.getVm ( ) . getTotalMemorySizeInBytes ( ) ) + ( org.ovirt.engine.core.bll.HibernateVmCommand.META_DATA_SIZE_IN_BYTES ) ) / ( BYTES_IN_GB ) ; org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain = org.ovirt.engine.core.bll.VmHandler.findStorageDomainForMemory ( org.ovirt.engine.core.bll.HibernateVmCommand.getVm ( ) . getStoragePoolId ( ) , sizeNeeded ) ; if ( storageDomain != null ) { _storageDomainId = storageDomain.getId ( ) ; } } return _storageDomainId ; }
Source:
public void loadTemplateData ( org.ovirt.engine.core.common.businessentities.VmTemplate template ) { vmDeviceUtils.setVmDevices ( template ) ; if ( ( ( template.getInterfaces ( ) ) == null ) || ( template.getInterfaces ( ) . isEmpty ( ) ) ) { template.setInterfaces ( getVmNetworkInterfaceDao ( ) . getAllForTemplate ( template.getId ( ) ) ) ; } }

Target:
public void loadTemplateData ( org.ovirt.engine.core.common.businessentities.VmTemplate template ) { vmDeviceUtils.setVmDevices ( template ) ; if ( ( ( template.getInterfaces ( ) ) == null ) || ( template.getInterfaces ( ) . isEmpty ( ) ) ) { template.setInterfaces ( vmNetworkInterfaceDao.getAllForTemplate ( template.getId ( ) ) ) ; } }
Source:
public static void getCPUList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Version version ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ServerCpu > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ServerCpu > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllServerCpuList , new org.ovirt.engine.core.common.queries.GetAllServerCpuListParameters ( version ) , aQuery ) ; }

Target:
public void getRoleActionGroupsByRoleId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid roleId ) { 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.ActionGroup > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ActionGroup > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetRoleActionGroupsByRoleId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( roleId ) , aQuery ) ; }
Source:
private void sendNotification ( java.lang.String message , java.lang.String vmId , boolean removeClient , java.lang.String module , java.lang.String callType ) throws org.ovirt.vdsm.jsonrpc.client.ClientConnectionException { if ( message == null ) { org.ovirt.vdsmfake.rpc.json.JsonRpcNotification.log.warn ( "empty message has arrived, ignore empty messages" ) ; } send ( messageFormatter ( message , vmId , module , callType ) , vmId , removeClient ) ; }

Target:
private void sendNotification ( java.lang.String message , java.lang.String id , boolean removeClient , java.lang.String method ) throws org.ovirt.vdsm.jsonrpc.client.ClientConnectionException { if ( message == null ) { org.ovirt.vdsmfake.rpc.json.JsonRpcNotification.log.warn ( "empty message has arrived, ignore empty messages" ) ; } send ( messageFormatter ( message , id , method ) , id , removeClient ) ; }
Source:
public void canDoActionFailsWhenGlusterMultipleHostHasVolumesWithForce ( ) throws java.lang.Exception { command = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.RemoveVdsCommand ( new org.ovirt.engine.core.common.action.RemoveVdsParameters ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , true ) ) ) ; prepareMocks ( ) ; mockVdsWithStatus ( VDSStatus.Maintenance ) ; mockHasMultipleClusters ( true ) ; mockIsGlusterEnabled ( true ) ; mockHasVolumeOnServer ( true ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( command , EngineMessage.VDS_CANNOT_REMOVE_HOST_HAVING_GLUSTER_VOLUME ) ; }

Target:
public void validateFailsWhenGlusterMultipleHostHasVolumesWithForce ( ) throws java.lang.Exception { command = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.RemoveVdsCommand ( new org.ovirt.engine.core.common.action.RemoveVdsParameters ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , true ) ) ) ; prepareMocks ( ) ; mockVdsWithStatus ( VDSStatus.Maintenance ) ; mockHasMultipleClusters ( true ) ; mockIsGlusterEnabled ( true ) ; mockHasVolumeOnServer ( true ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( command , EngineMessage.VDS_CANNOT_REMOVE_HOST_HAVING_GLUSTER_VOLUME ) ; }
Source:
public java.util.List < org.ovirt.engine.core.common.businessentities.RepoFileMetaData > getCachedIsoListByDomainId ( org.ovirt.engine.core.compat.Guid isoStorageDomainId , org.ovirt.engine.core.common.businessentities.ImageType imageType ) { java.util.List < org.ovirt.engine.core.common.businessentities.RepoFileMetaData > fileListMD = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.RepoFileMetaData > ( ) ; if ( isoStorageDomainId != null ) { fileListMD = repoStorageDom.getRepoListForStorageDomain ( isoStorageDomainId , imageType ) ; } return fileListMD ; }

Target:
public java.util.List < org.ovirt.engine.core.common.businessentities.RepoFileMetaData > getCachedIsoListByDomainId ( org.ovirt.engine.core.compat.Guid isoStorageDomainId , org.ovirt.engine.core.common.businessentities.ImageFileType imageType ) { java.util.List < org.ovirt.engine.core.common.businessentities.RepoFileMetaData > fileListMD = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.RepoFileMetaData > ( ) ; if ( isoStorageDomainId != null ) { fileListMD = repoStorageDom.getRepoListForStorageDomain ( isoStorageDomainId , imageType ) ; } return fileListMD ; }
Source:
public void validateFailedWrongPlugStatus ( ) throws java.lang.Exception { mockVmStatusUp ( ) ; mockInterfaceList ( ) ; cretaeDiskWrongPlug ( true ) ; org.junit.Assert.assertFalse ( command.validate ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getValidationMessages ( ) . contains ( EngineMessage.HOT_PLUG_DISK_IS_NOT_UNPLUGGED.toString ( ) ) ) ; }

Target:
public void validateFailedWrongPlugStatus ( ) throws java.lang.Exception { mockVmStatusUp ( ) ; mockInterfaceList ( ) ; cretaeDiskWrongPlug ( true ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( command , EngineMessage.HOT_PLUG_DISK_IS_NOT_UNPLUGGED ) ; }
Source:
private static void addSoundCard ( org.ovirt.engine.core.common.businessentities.VmBase vmBase , org.ovirt.engine.core.compat.Version vdsGroupCompatibilityVersion ) { java.lang.String soundDevice = org.ovirt.engine.core.vdsbroker.vdsbroker.VmInfoBuilderBase.getSoundDevice ( vmBase , vdsGroupCompatibilityVersion ) ; org.ovirt.engine.core.bll.utils.VmDeviceUtils.addManagedDevice ( new org.ovirt.engine.core.common.businessentities.VmDeviceId ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) , vmBase.getId ( ) ) , VmDeviceType.SOUND , org.ovirt.engine.core.common.utils.VmDeviceType.getSoundDeviceType ( soundDevice ) , new java.util.HashMap < java.lang.String , java.lang.Object > ( ) , true , true ) ; }

Target:
private static void addSoundCard ( org.ovirt.engine.core.common.businessentities.VmBase vmBase , org.ovirt.engine.core.compat.Version vdsGroupCompatibilityVersion ) { java.lang.String soundDevice = OsRepositoryImpl.INSTANCE.getSoundDevice ( vmBase.getOsId ( ) , vdsGroupCompatibilityVersion ) ; org.ovirt.engine.core.bll.utils.VmDeviceUtils.addManagedDevice ( new org.ovirt.engine.core.common.businessentities.VmDeviceId ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) , vmBase.getId ( ) ) , VmDeviceGeneralType.SOUND , org.ovirt.engine.core.common.utils.VmDeviceType.getSoundDeviceType ( soundDevice ) , new java.util.HashMap < java.lang.String , java.lang.Object > ( ) , true , true , null ) ; }
Source:
private void localize ( org.ovirt.engine.ui.webadmin.ApplicationConstants constants ) { destClusterEditor.setLabel ( constants.importVm_destCluster ( ) ) ; destClusterQuotaEditor.setLabel ( constants.importVm_destClusterQuota ( ) ) ; destStorageEditor.setLabel ( constants.defaultStorage ( ) ) ; collapseSnapshotEditor.setLabel ( constants.importVm_collapseSnapshots ( ) ) ; }

Target:
private void localize ( org.ovirt.engine.ui.webadmin.ApplicationConstants constants ) { destClusterEditor.setLabel ( constants.importVm_destCluster ( ) ) ; destClusterQuotaEditor.setLabel ( constants.importVm_destClusterQuota ( ) ) ; destStorageEditor.setLabel ( constants.defaultStorage ( ) ) ; collapseSnapshotEditor.setLabel ( constants.importVm_collapseSnapshots ( ) ) ; cloneAllEditor.setLabel ( constants.importVm_CloneAll ( ) ) ; }
Source:
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 ) ; } }

Target:
protected < P extends org.ovirt.engine.core.common.action.VdcActionParametersBase > P withRootCommandInfo ( P params , org.ovirt.engine.core.common.action.VdcActionType actionType ) { org.ovirt.engine.core.common.action.VdcActionType parentCommand = ( ( getParameters ( ) . getParentCommand ( ) ) != ( org.ovirt.engine.core.common.action.VdcActionType.Unknown ) ) ? getParameters ( ) . getParentCommand ( ) : actionType ; params.setParentParameters ( getParametersForTask ( parentCommand , getParameters ( ) ) ) ; params.setParentCommand ( parentCommand ) ; return params ; }
Source:
public void dataCenterWithClusterSelectedItemChanged ( ) { super . dataCenterWithClusterSelectedItemChanged ( ) ; java.util.ArrayList < org.ovirt.engine.core.common.queries.VdcQueryType > queryTypeList = new java.util.ArrayList < org.ovirt.engine.core.common.queries.VdcQueryType > ( ) ; queryTypeList.add ( VdcQueryType.GetVmTemplatesWithPermittedAction ) ; org.ovirt.engine.core.common.queries.GetEntitiesWithPermittedActionParameters getEntitiesWithPermittedActionParameters = new org.ovirt.engine.core.common.queries.GetEntitiesWithPermittedActionParameters ( ) ; getEntitiesWithPermittedActionParameters.setActionGroup ( org.ovirt.engine.ui.uicommonweb.models.vms.UserPortalNewVmModelBehavior.CREATE_VM ) ; java.util.ArrayList < org.ovirt.engine.core.common.queries.VdcQueryParametersBase > parametersList = new java.util.ArrayList < org.ovirt.engine.core.common.queries.VdcQueryParametersBase > ( java.util.Arrays.asList ( new org.ovirt.engine.core.common.queries.VdcQueryParametersBase [ ] { getEntitiesWithPermittedActionParameters } ) ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runMultipleQueries ( queryTypeList , parametersList , this , getModel ( ) . getHash ( ) ) ; }

Target:
public void dataCenterWithClusterSelectedItemChanged ( ) { super . dataCenterWithClusterSelectedItemChanged ( ) ; java.util.ArrayList < org.ovirt.engine.core.common.queries.VdcQueryType > queryTypeList = new java.util.ArrayList < org.ovirt.engine.core.common.queries.VdcQueryType > ( ) ; queryTypeList.add ( VdcQueryType.GetVmTemplatesWithPermittedAction ) ; org.ovirt.engine.core.common.queries.GetEntitiesWithPermittedActionParameters getEntitiesWithPermittedActionParameters = new org.ovirt.engine.core.common.queries.GetEntitiesWithPermittedActionParameters ( ) ; getEntitiesWithPermittedActionParameters.setActionGroup ( actionGroup ) ; java.util.ArrayList < org.ovirt.engine.core.common.queries.VdcQueryParametersBase > parametersList = new java.util.ArrayList < org.ovirt.engine.core.common.queries.VdcQueryParametersBase > ( java.util.Arrays.asList ( new org.ovirt.engine.core.common.queries.VdcQueryParametersBase [ ] { getEntitiesWithPermittedActionParameters } ) ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runMultipleQueries ( queryTypeList , parametersList , this , getModel ( ) . getHash ( ) ) ; }
Source:
protected boolean canDoAction ( ) { boolean returnValue = true ; if ( org.ovirt.engine.core.bll.MoveTagCommand.getParameters ( ) . getNewParentId ( ) . equals ( org.ovirt.engine.core.bll.MoveTagCommand.getParameters ( ) . getTagId ( ) ) ) { addCanDoActionMessage ( VdcBllMessages.TAGS_SPECIFIED_TAG_CANNOT_BE_THE_PARENT_OF_ITSELF ) ; returnValue = false ; } if ( org.ovirt.engine.core.bll.TagsDirector.getInstance ( ) . isTagDescestorOfTag ( org.ovirt.engine.core.bll.MoveTagCommand.getParameters ( ) . getTagId ( ) , org.ovirt.engine.core.bll.MoveTagCommand.getParameters ( ) . getNewParentId ( ) ) ) { addCanDoActionMessage ( VdcBllMessages.TAGS_SPECIFIED_TAG_CANNOT_BE_THE_PARENT_OF_ITSELF ) ; returnValue = false ; } return returnValue ; }

Target:
protected boolean canDoAction ( ) { boolean returnValue = true ; if ( org.ovirt.engine.core.bll.MoveTagCommand.getParameters ( ) . getNewParentId ( ) . equals ( org.ovirt.engine.core.bll.MoveTagCommand.getParameters ( ) . getTagId ( ) ) ) { addCanDoActionMessage ( EngineMessage.TAGS_SPECIFIED_TAG_CANNOT_BE_THE_PARENT_OF_ITSELF ) ; returnValue = false ; } if ( org.ovirt.engine.core.bll.TagsDirector.getInstance ( ) . isTagDescestorOfTag ( org.ovirt.engine.core.bll.MoveTagCommand.getParameters ( ) . getTagId ( ) , org.ovirt.engine.core.bll.MoveTagCommand.getParameters ( ) . getNewParentId ( ) ) ) { addCanDoActionMessage ( EngineMessage.TAGS_SPECIFIED_TAG_CANNOT_BE_THE_PARENT_OF_ITSELF ) ; returnValue = false ; } return returnValue ; }
Source:
private void setUpMockUpForRestart ( ) { prepareMocks ( cmd ) ; org.mockito.Mockito.when ( serviceDao.getByServiceType ( org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.common.businessentities.gluster.ServiceType.class ) ) ) . thenReturn ( getGlusterServiceListByServiceType ( ServiceType.GLUSTER_SWIFT , GlusterServiceStatus.RUNNING ) ) ; org.mockito.Mockito.doReturn ( getGlusterServerServicesByServerIdAndServiceType ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , ServiceType.GLUSTER_SWIFT , GlusterServiceStatus.RUNNING ) ) . when ( serverServiceDao ) . getByServerIdAndServiceType ( org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.compat.Guid.class ) , org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.common.businessentities.gluster.ServiceType.class ) ) ; }

Target:
private void setUpMockUpForStop ( ) { prepareMocks ( ) ; org.mockito.Mockito.when ( serviceDao.getByServiceType ( org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.common.businessentities.gluster.ServiceType.class ) ) ) . thenReturn ( getGlusterServiceListByServiceType ( ServiceType.GLUSTER_SWIFT , GlusterServiceStatus.RUNNING ) ) ; org.mockito.Mockito.doReturn ( getGlusterServerServicesByServerIdAndServiceType ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , ServiceType.GLUSTER_SWIFT , GlusterServiceStatus.RUNNING ) ) . when ( serverServiceDao ) . getByServerIdAndServiceType ( org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.compat.Guid.class ) , org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.common.businessentities.gluster.ServiceType.class ) ) ; }
Source:
public void testBuildCpuPinningWithNumaSetting ( ) { java.util.Map < java.lang.String , java.lang.Object > cpuPinning = org.ovirt.engine.core.vdsbroker.vdsbroker.NumaSettingFactory.buildCpuPinningWithNumaSetting ( org.ovirt.engine.core.vdsbroker.vdsbroker.NumaSettingFactoryTest.vmNumaNodes , org.ovirt.engine.core.vdsbroker.vdsbroker.NumaSettingFactoryTest.vdsNumaNodes ) ; org.junit.Assert.assertEquals ( 8 , cpuPinning.size ( ) ) ; org.junit.Assert.assertTrue ( cpuPinning.containsKey ( "3" ) ) ; org.junit.Assert.assertEquals ( "0,1,2,3" , cpuPinning.get ( "3" ) ) ; org.junit.Assert.assertTrue ( cpuPinning.containsKey ( "7" ) ) ; org.junit.Assert.assertEquals ( "4,5,6,7" , cpuPinning.get ( "7" ) ) ; }

Target:
public void testBuildCpuPinningWithNumaSetting ( ) { java.util.Map < java.lang.String , java.lang.Object > cpuPinning = org.ovirt.engine.core.vdsbroker.vdsbroker.NumaSettingFactory.buildCpuPinningWithNumaSetting ( org.ovirt.engine.core.vdsbroker.vdsbroker.NumaSettingFactoryTest.vmNumaNodes , org.ovirt.engine.core.vdsbroker.vdsbroker.NumaSettingFactoryTest.vdsNumaNodes ) ; org.junit.jupiter.api.Assertions.assertEquals ( 8 , cpuPinning.size ( ) ) ; org.junit.jupiter.api.Assertions.assertTrue ( cpuPinning.containsKey ( "3" ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( "0,1,2,3" , cpuPinning.get ( "3" ) ) ; org.junit.jupiter.api.Assertions.assertTrue ( cpuPinning.containsKey ( "7" ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( "4,5,6,7" , cpuPinning.get ( "7" ) ) ; }
Source:
private void initCPU ( ) { if ( ( ! ( isCPUinitialized ) ) && ( getIsEdit ( ) ) ) { isCPUinitialized = true ; getCPU ( ) . setSelectedItem ( null ) ; for ( org.ovirt.engine.core.common.businessentities.ServerCpu a : getCPU ( ) . getItems ( ) ) { if ( org.ovirt.engine.core.common.utils.ObjectUtils.objectsEqual ( a.getCpuName ( ) , getEntity ( ) . getCpuName ( ) ) ) { getCPU ( ) . setSelectedItem ( a ) ; break ; } } } }

Target:
private void initCPU ( ) { if ( ( ! ( isCPUinitialized ) ) && ( getIsEdit ( ) ) ) { isCPUinitialized = true ; getCPU ( ) . setSelectedItem ( null ) ; for ( org.ovirt.engine.core.common.businessentities.ServerCpu a : getCPU ( ) . getItems ( ) ) { if ( java.util.Objects.equals ( a.getCpuName ( ) , getEntity ( ) . getCpuName ( ) ) ) { getCPU ( ) . setSelectedItem ( a ) ; break ; } } } }
Source:
private java.util.Map < org.ovirt.engine.core.compat.Guid , java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > > getDomainsDisksMap ( java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > disksList ) { java.util.Map < org.ovirt.engine.core.compat.Guid , java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > > domainsDisksMap = new java.util.HashMap < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.DiskImage disk : disksList ) { java.util.List < org.ovirt.engine.core.compat.Guid > domainIds = disk.getStorageIds ( ) ; for ( org.ovirt.engine.core.compat.Guid domainId : domainIds ) { org.ovirt.engine.core.utils.collections.MultiValueMapUtils.addToMap ( domainId , disk , domainsDisksMap ) ; } } return domainsDisksMap ; }

Target:
private java.util.Map < org.ovirt.engine.core.compat.Guid , java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > > getDomainsDisksMap ( java.util.Collection < org.ovirt.engine.core.common.businessentities.DiskImage > diskImages ) { java.util.Map < org.ovirt.engine.core.compat.Guid , java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > > domainsDisksMap = new java.util.HashMap < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.DiskImage disk : diskImages ) { java.util.List < org.ovirt.engine.core.compat.Guid > domainIds = disk.getStorageIds ( ) ; for ( org.ovirt.engine.core.compat.Guid domainId : domainIds ) { org.ovirt.engine.core.utils.collections.MultiValueMapUtils.addToMap ( domainId , disk , domainsDisksMap ) ; } } return domainsDisksMap ; }
Source:
private void addIpv6BootProtocol ( java.util.Map < java.lang.String , java.lang.Object > opts , org.ovirt.engine.core.common.vdscommands.HostNetwork attachment ) { final org.ovirt.engine.core.common.businessentities.network.Ipv4BootProtocol ipv6BootProtocol = attachment.getIpv6BootProtocol ( ) ; opts.put ( org.ovirt.engine.core.vdsbroker.vdsbroker.HostSetupNetworksVDSCommand.DHCPV6_BOOT_PROTOCOL , ( ( org.ovirt.engine.core.common.businessentities.network.Ipv4BootProtocol.DHCP ) == ipv6BootProtocol ) ) ; if ( ( org.ovirt.engine.core.common.businessentities.network.Ipv4BootProtocol.STATIC_IP ) == ipv6BootProtocol ) { org.ovirt.engine.core.vdsbroker.vdsbroker.HostSetupNetworksVDSCommand.putIfNotEmpty ( opts , "ipv6addr" , getIpv6Address ( attachment ) ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.HostSetupNetworksVDSCommand.putIfNotEmpty ( opts , "ipv6gateway" , attachment.getIpv6Gateway ( ) ) ; } }

Target:
private void addIpv6BootProtocol ( java.util.Map < java.lang.String , java.lang.Object > opts , org.ovirt.engine.core.common.vdscommands.HostNetwork attachment ) { final org.ovirt.engine.core.common.businessentities.network.Ipv6BootProtocol ipv6BootProtocol = attachment.getIpv6BootProtocol ( ) ; opts.put ( org.ovirt.engine.core.vdsbroker.vdsbroker.HostSetupNetworksVDSCommand.DHCPV6_BOOT_PROTOCOL , ( ( org.ovirt.engine.core.common.businessentities.network.Ipv6BootProtocol.DHCP ) == ipv6BootProtocol ) ) ; opts.put ( org.ovirt.engine.core.vdsbroker.vdsbroker.HostSetupNetworksVDSCommand.DHCPV6_AUTOCONF , ( ( org.ovirt.engine.core.common.businessentities.network.Ipv6BootProtocol.AUTOCONF ) == ipv6BootProtocol ) ) ; if ( ( org.ovirt.engine.core.common.businessentities.network.Ipv6BootProtocol.STATIC_IP ) == ipv6BootProtocol ) { org.ovirt.engine.core.vdsbroker.vdsbroker.HostSetupNetworksVDSCommand.putIfNotEmpty ( opts , "ipv6addr" , getIpv6Address ( attachment ) ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.HostSetupNetworksVDSCommand.putIfNotEmpty ( opts , "ipv6gateway" , attachment.getIpv6Gateway ( ) ) ; } }
Source:
private org.ovirt.engine.core.compat.Guid getSmallIconId ( java.lang.String newIcon , java.lang.String oldIcon , java.lang.String newOsDefaultIcon , org.ovirt.engine.core.compat.Guid newOsDefaultIconId ) { if ( newIcon.equals ( oldIcon ) ) { return getIcon ( ) . getEntity ( ) . getSmallIconId ( ) ; } if ( newIcon.equals ( newOsDefaultIcon ) ) { return org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getSmallByLargeOsDefaultIconId ( newOsDefaultIconId ) ; } return null ; }

Target:
public void onCreated ( org.ovirt.engine.ui.uicommonweb.models.vms.IconWithOsDefault instance ) { getIcon ( ) . setEntity ( instance ) ; }
Source:
private static void setQuotaGlobalLimitations ( org.ovirt.engine.core.common.businessentities.Quota quota ) { org.ovirt.engine.core.common.businessentities.QuotaStorage quotaStorage = new org.ovirt.engine.core.common.businessentities.QuotaStorage ( ) ; org.ovirt.engine.core.common.businessentities.QuotaVdsGroup quotaVdsGroup = new org.ovirt.engine.core.common.businessentities.QuotaVdsGroup ( ) ; quotaStorage.setStorageSizeGB ( 10000L ) ; quotaStorage.setStorageSizeGBUsage ( 0.0 ) ; quotaVdsGroup.setMemSizeMB ( 16000000L ) ; quotaVdsGroup.setMemSizeMBUsage ( 0L ) ; quotaVdsGroup.setVirtualCpu ( 2880 ) ; quotaVdsGroup.setVirtualCpuUsage ( 0 ) ; quota.setGlobalQuotaStorage ( quotaStorage ) ; quota.setGlobalQuotaVdsGroup ( quotaVdsGroup ) ; }

Target:
private static void setQuotaGlobalLimitations ( org.ovirt.engine.core.common.businessentities.Quota quota ) { org.ovirt.engine.core.common.businessentities.QuotaStorage quotaStorage = new org.ovirt.engine.core.common.businessentities.QuotaStorage ( ) ; org.ovirt.engine.core.common.businessentities.QuotaCluster quotaCluster = new org.ovirt.engine.core.common.businessentities.QuotaCluster ( ) ; quotaStorage.setStorageSizeGB ( 10000L ) ; quotaStorage.setStorageSizeGBUsage ( 0.0 ) ; quotaCluster.setMemSizeMB ( 16000000L ) ; quotaCluster.setMemSizeMBUsage ( 0L ) ; quotaCluster.setVirtualCpu ( 2880 ) ; quotaCluster.setVirtualCpuUsage ( 0 ) ; quota.setGlobalQuotaStorage ( quotaStorage ) ; quota.setGlobalQuotaCluster ( quotaCluster ) ; }
Source:
protected boolean CheckStoragePoolStatusNotEqual ( org.ovirt.engine.core.common.businessentities.StoragePoolStatus status , org.ovirt.engine.core.common.errors.VdcBllMessages onFailMessage ) { boolean returnValue = false ; org.ovirt.engine.core.common.businessentities.StoragePool storagePool = org.ovirt.engine.core.bll.storage.StorageHandlingCommandBase.getStoragePool ( ) ; if ( storagePool != null ) { returnValue = ( storagePool.getStatus ( ) ) != status ; if ( ( ! returnValue ) && ( ! ( org.ovirt.engine.core.bll.storage.StorageHandlingCommandBase.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( onFailMessage.name ( ) ) ) ) ) { addCanDoActionMessage ( onFailMessage ) ; } } return returnValue ; }

Target:
protected boolean checkStoragePoolStatusNotEqual ( org.ovirt.engine.core.common.businessentities.StoragePoolStatus status , org.ovirt.engine.core.common.errors.VdcBllMessages onFailMessage ) { boolean returnValue = false ; org.ovirt.engine.core.common.businessentities.StoragePool storagePool = org.ovirt.engine.core.bll.storage.StorageHandlingCommandBase.getStoragePool ( ) ; if ( storagePool != null ) { returnValue = ( storagePool.getStatus ( ) ) != status ; if ( ( ! returnValue ) && ( ! ( org.ovirt.engine.core.bll.storage.StorageHandlingCommandBase.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( onFailMessage.name ( ) ) ) ) ) { addCanDoActionMessage ( onFailMessage ) ; } } return returnValue ; }
Source:
private void addHostProviderListener ( final org.ovirt.engine.ui.uicommonweb.models.hosts.HostModel model ) { model.getProviderSearchFilter ( ) . getPropertyChangedEvent ( ) . addListener ( new org.ovirt.engine.ui.uicompat.IEventListener ( ) { @ java.lang.Override public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { if ( "IsAvailable" . equals ( ( ( org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ) ( args ) ) . propertyName ) ) { getView ( ) . setHostProviderVisibility ( model.getProviderSearchFilter ( ) . getIsAvailable ( ) ) ; } } } ) ; }

Target:
private void addHostProviderListener ( final org.ovirt.engine.ui.uicommonweb.models.hosts.HostModel model ) { model.getProviderSearchFilter ( ) . getPropertyChangedEvent ( ) . addListener ( new org.ovirt.engine.ui.uicompat.IEventListener < org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs > ( ) { @ java.lang.Override public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < ? extends org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs args ) { if ( "IsAvailable" . equals ( args.propertyName ) ) { getView ( ) . setHostProviderVisibility ( model.getProviderSearchFilter ( ) . getIsAvailable ( ) ) ; } } } ) ; }