auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
void addReportedDevices ( org.ovirt.engine.api.model.NIC model , org.ovirt.engine.core.common.businessentities.VmNetworkInterface entity ) { java.util.List < org.ovirt.engine.api.model.Device > devices = getDevices ( entity.getVmId ( ) . getValue ( ) , entity.getMacAddress ( ) ) ; if ( ! ( devices.isEmpty ( ) ) ) { org.ovirt.engine.api.model.ReportedDevices reportedDevices = new org.ovirt.engine.api.model.ReportedDevices ( ) ; reportedDevices.getReportedDevices ( ) . addAll ( devices ) ; model.setReportedDevices ( reportedDevices ) ; } }

Target:
void addReportedDevices ( org.ovirt.engine.api.model.NIC model , org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface entity ) { java.util.List < org.ovirt.engine.api.model.Device > devices = getDevices ( entity.getVmId ( ) . getValue ( ) , entity.getMacAddress ( ) ) ; if ( ! ( devices.isEmpty ( ) ) ) { org.ovirt.engine.api.model.ReportedDevices reportedDevices = new org.ovirt.engine.api.model.ReportedDevices ( ) ; reportedDevices.getReportedDevices ( ) . addAll ( devices ) ; model.setReportedDevices ( reportedDevices ) ; } }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc shutdownHost ( int reboot ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.shutdownHost ( reboot ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc vmUpdateDevice ( java.lang.String vmId , java.util.Map device ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.vmUpdateDevice ( vmId , device ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
private boolean isVmMigratable ( ) { if ( ( ( java.lang.Boolean.TRUE.equals ( getModel ( ) . getRunVMOnSpecificHost ( ) . getEntity ( ) ) ) || ( java.lang.Boolean.FALSE.equals ( getModel ( ) . getIsAutoAssign ( ) . getEntity ( ) ) ) ) || ( java.lang.Boolean.TRUE.equals ( getModel ( ) . getDontMigrateVM ( ) . getEntity ( ) ) ) ) { return false ; } return true ; }

Target:
private boolean isVmMigratable ( ) { if ( ( java.lang.Boolean.TRUE.equals ( getModel ( ) . getRunVMOnSpecificHost ( ) . getEntity ( ) ) ) || ( ( ( java.lang.Boolean.FALSE.equals ( getModel ( ) . getIsAutoAssign ( ) . getEntity ( ) ) ) && ( java.lang.Boolean.TRUE.equals ( getModel ( ) . getDontMigrateVM ( ) . getEntity ( ) ) ) ) && ( java.lang.Boolean.TRUE.equals ( getModel ( ) . getHostCpu ( ) . getEntity ( ) ) ) ) ) { return false ; } return true ; }
Source:
public void setPhysicalMemory ( java.lang.Integer value ) { if ( ( ( physicalMemory ) == null ) && ( value == null ) ) { return ; } if ( ( ( physicalMemory ) == null ) || ( ! ( physicalMemory.equals ( value ) ) ) ) { physicalMemory = value ; OnPropertyChanged ( new org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ( "PhysicalMemory" ) ) ; } }

Target:
public void setPhysicalMemory ( java.lang.Integer value ) { if ( ( ( physicalMemory ) == null ) && ( value == null ) ) { return ; } if ( ( ( physicalMemory ) == null ) || ( ! ( physicalMemory.equals ( value ) ) ) ) { physicalMemory = value ; onPropertyChanged ( new org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ( "PhysicalMemory" ) ) ; } }
Source:
private void setUpGetEntityExpectations ( boolean notFound ) throws java.lang.Exception { setUpEntityQueryExpectations ( VdcQueryType.GetLibvirtSecretById , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ 1 ] } , ( notFound ? null : getEntity ( 1 ) ) ) ; }

Target:
private void setUpGetEntityExpectations ( boolean notFound ) throws java.lang.Exception { setUpEntityQueryExpectations ( QueryType.GetLibvirtSecretById , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ 1 ] } , ( notFound ? null : getEntity ( 1 ) ) ) ; }
Source:
public void getFreeVfNoFreeVf ( ) { freeVfCommon ( 0 , 1 , 2 , 3 , 4 ) ; org.junit.Assert.assertNull ( hostNicVfsConfigHelper.getFreeVf ( nic ) ) ; }

Target:
public void getFreeVfOneFreeVf ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.HostDevice > freeVfs = freeVfCommon ( 1 , 4 , 3 , 2 , 1 ) ; org.junit.Assert.assertEquals ( 1 , freeVfs.size ( ) ) ; org.junit.Assert.assertTrue ( freeVfs.contains ( hostNicVfsConfigHelper.getFreeVf ( nic , null ) ) ) ; }
Source:
public javax.ws.rs.core.Response add ( org.ovirt.engine.api.model.MacPool macPool ) { validateParameters ( macPool , "name" ) ; final org.ovirt.engine.api.model.MacPool entity = map ( macPool ) ; return performCreate ( ActionType.AddMacPool , new org.ovirt.engine.core.common.action.MacPoolParameters ( entity ) , new org.ovirt.engine.api.restapi.resource.QueryIdResolver < org.ovirt.engine.core.compat.Guid > ( org.ovirt.engine.core.common.queries.VdcQueryType.GetMacPoolById , org.ovirt.engine.core.common.queries.IdQueryParameters.class ) ) ; }

Target:
public javax.ws.rs.core.Response add ( org.ovirt.engine.api.model.MacPool macPool ) { validateParameters ( macPool , "name" ) ; final org.ovirt.engine.api.model.MacPool entity = map ( macPool ) ; return performCreate ( ActionType.AddMacPool , new org.ovirt.engine.core.common.action.MacPoolParameters ( entity ) , new org.ovirt.engine.api.restapi.resource.QueryIdResolver < org.ovirt.engine.core.compat.Guid > ( org.ovirt.engine.core.common.queries.QueryType.GetMacPoolById , org.ovirt.engine.core.common.queries.IdQueryParameters.class ) ) ; }
Source:
public void testRemove ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpActionExpectations ( VdcActionType.RemoveExternalEvent , org.ovirt.engine.core.common.action.RemoveExternalEventParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendEventsResourceTest.LOG_IDS [ 0 ] } , true , true , false ) ; setUpQueryExpectations ( "" ) ; verifyRemove ( collection.remove ( java.lang.String.valueOf ( org.ovirt.engine.api.restapi.resource.BackendEventsResourceTest.LOG_IDS [ 0 ] ) ) ) ; }

Target:
public void testRemove ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpActionExpectations ( VdcActionType.RemoveAuditLogById , org.ovirt.engine.core.common.action.RemoveAuditLogByIdParameters.class , new java.lang.String [ ] { "AuditLogId" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendEventsResourceTest.LOG_IDS [ 0 ] } , true , true , false ) ; setUpQueryExpectations ( "" ) ; verifyRemove ( collection.remove ( java.lang.String.valueOf ( org.ovirt.engine.api.restapi.resource.BackendEventsResourceTest.LOG_IDS [ 0 ] ) ) ) ; }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { org.ovirt.engine.core.common.businessentities.network.VnicProfileView profile = model.getSelectedItem ( ) ; vnic.setVnicProfileId ( ( profile != null ? profile.getId ( ) : null ) ) ; vnic.setNetworkName ( ( profile != null ? profile.getNetworkName ( ) : null ) ) ; com.google.gwt.event.logical.shared.ValueChangeEvent.fire ( this , model ) ; }

Target:
private void syncSelectedItemWithNetworkInterface ( final org.ovirt.engine.ui.uicommonweb.models.vms.VnicInstanceType model ) { final org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface vnic = model.getNetworkInterface ( ) ; org.ovirt.engine.core.common.businessentities.network.VnicProfileView profile = model.getSelectedItem ( ) ; vnic.setVnicProfileId ( ( profile != null ? profile.getId ( ) : null ) ) ; vnic.setNetworkName ( ( profile != null ? profile.getNetworkName ( ) : null ) ) ; }
Source:
protected boolean activateOrDeactivateNic ( org.ovirt.engine.core.common.businessentities.network.VmNic nic , org.ovirt.engine.core.common.action.PlugAction plugAction ) { org.ovirt.engine.core.common.action.VdcReturnValueBase returnValue = org.ovirt.engine.core.bll.network.vm.AbstractVmInterfaceCommand.getBackend ( ) . runInternalAction ( VdcActionType.ActivateDeactivateVmNic , createActivateDeactivateParameters ( nic , plugAction ) ) ; if ( ! ( returnValue.getSucceeded ( ) ) ) { propagateFailure ( returnValue ) ; } return returnValue.getSucceeded ( ) ; }

Target:
protected boolean activateOrDeactivateNewNic ( org.ovirt.engine.core.common.businessentities.network.VmNic nic , org.ovirt.engine.core.common.action.PlugAction plugAction ) { return activateOrDeactivateNic ( nic , plugAction , true ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.storage.LUNs createDummyLun ( ) { final org.ovirt.engine.core.common.businessentities.storage.LUNs dummyLun = new org.ovirt.engine.core.common.businessentities.storage.LUNs ( ) ; dummyLun.setLUN_id ( ( ( org.ovirt.engine.core.common.businessentities.BusinessEntitiesDefinitions.DUMMY_LUN_ID_PREFIX ) + ( org.ovirt.engine.core.bll.storage.connection.AttachStorageConnectionToStorageDomainCommand.getStorageDomainId ( ) ) ) ) ; dummyLun.setvolume_group_id ( org.ovirt.engine.core.bll.storage.connection.AttachStorageConnectionToStorageDomainCommand.getStorageDomain ( ) . getStorage ( ) ) ; return dummyLun ; }

Target:
private org.ovirt.engine.core.common.businessentities.storage.LUNs createDummyLun ( ) { final org.ovirt.engine.core.common.businessentities.storage.LUNs dummyLun = new org.ovirt.engine.core.common.businessentities.storage.LUNs ( ) ; dummyLun.setLUNId ( ( ( org.ovirt.engine.core.common.businessentities.BusinessEntitiesDefinitions.DUMMY_LUN_ID_PREFIX ) + ( org.ovirt.engine.core.bll.storage.connection.AttachStorageConnectionToStorageDomainCommand.getStorageDomainId ( ) ) ) ) ; dummyLun.setVolumeGroupId ( org.ovirt.engine.core.bll.storage.connection.AttachStorageConnectionToStorageDomainCommand.getStorageDomain ( ) . getStorage ( ) ) ; return dummyLun ; }
Source:
public static void IsLiveStorageMigrationEnabled ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String version ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Boolean ) ( source ) ) . booleanValue ( ) : true ; } } ; org.ovirt.engine.core.common.queries.GetConfigurationValueParameters params = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.LiveStorageMigrationEnabled ) ; params.setVersion ( version ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( params , aQuery ) ; }

Target:
public static void GetDiskList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ( ) ; } } ; org.ovirt.engine.core.common.queries.SearchParameters searchParams = new org.ovirt.engine.core.common.queries.SearchParameters ( "Disks:" , org.ovirt.engine.core.common.interfaces.SearchType.Disk ) ; searchParams.setMaxCount ( 9999 ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.Search , searchParams , aQuery ) ; }
Source:
public void onClick ( com.google.gwt.event.dom.client.ClickEvent event ) { org.ovirt.engine.ui.common.widget.listgroup.ExpandableListViewItem eventItem = null ; if ( ( event.getSource ( ) ) instanceof org.ovirt.engine.ui.common.widget.listgroup.ExpandableListViewItem ) { eventItem = ( ( org.ovirt.engine.ui.common.widget.listgroup.ExpandableListViewItem ) ( event.getSource ( ) ) ) ; } if ( eventItem != null ) { boolean active = eventItem.isActive ( ) ; hideAllDetails ( ) ; eventItem.toggleExpanded ( ( ! active ) ) ; toggleExpanded ( ) ; } else { hideAllDetails ( ) ; } }

Target:
public void onClick ( com.google.gwt.event.dom.client.ClickEvent event ) { event.preventDefault ( ) ; event.stopPropagation ( ) ; org.ovirt.engine.ui.common.widget.listgroup.ExpandableListViewItem eventItem = null ; if ( ( event.getSource ( ) ) instanceof org.ovirt.engine.ui.common.widget.listgroup.ExpandableListViewItem ) { eventItem = ( ( org.ovirt.engine.ui.common.widget.listgroup.ExpandableListViewItem ) ( event.getSource ( ) ) ) ; } if ( eventItem != null ) { boolean active = eventItem.isActive ( ) ; hideAllDetails ( ) ; eventItem.toggleExpanded ( ( ! active ) ) ; toggleExpanded ( ) ; } else { hideAllDetails ( ) ; } }
Source:
public void getForExistingVds ( ) { org.ovirt.engine.core.common.businessentities.VdsKdumpStatus expected = new org.ovirt.engine.core.common.businessentities.VdsKdumpStatus ( ) ; expected.setVdsId ( new org.ovirt.engine.core.compat.Guid ( "afce7a39-8e8c-4819-ba9c-796d316592e7" ) ) ; expected.setStatus ( KdumpFlowStatus.DUMPING ) ; expected.setAddress ( "[\"192.168.122.18\", 2222]" ) ; org.ovirt.engine.core.common.businessentities.VdsKdumpStatus found = dbFacade.getVdsKdumpStatusDao ( ) . get ( expected.getVdsId ( ) ) ; org.junit.Assert.assertNotNull ( found ) ; org.junit.Assert.assertEquals ( expected , found ) ; }

Target:
public void getForExistingVds ( ) { org.ovirt.engine.core.common.businessentities.VdsKdumpStatus expected = new org.ovirt.engine.core.common.businessentities.VdsKdumpStatus ( ) ; expected.setVdsId ( FixturesTool.HOST_ID ) ; expected.setStatus ( KdumpFlowStatus.DUMPING ) ; expected.setAddress ( "[\"192.168.122.18\", 2222]" ) ; org.ovirt.engine.core.common.businessentities.VdsKdumpStatus found = dbFacade.getVdsKdumpStatusDao ( ) . get ( expected.getVdsId ( ) ) ; org.junit.Assert.assertNotNull ( found ) ; org.junit.Assert.assertEquals ( expected , found ) ; }
Source:
private java.util.List < org.ovirt.engine.core.common.businessentities.Erratum > runErrataListMethod ( java.lang.String relativeUrl ) { try { org.ovirt.engine.core.bll.host.provider.foreman.ErrataWrapper wrapper = objectMapper.readValue ( runHttpGetMethod ( relativeUrl ) , org.ovirt.engine.core.bll.host.provider.foreman.ErrataWrapper.class ) ; return mapErrata ( java.util.Arrays.asList ( wrapper.getResults ( ) ) ) ; } catch ( java.io.IOException e ) { return null ; } }

Target:
private org.ovirt.engine.core.bll.host.provider.ContentHostProvider getContentHostProvider ( ) { org.ovirt.engine.core.compat.Version foremanVersion = getForemanVersion ( ) ; if ( ( foremanVersion != null ) && ( foremanVersion.greaterOrEquals ( org.ovirt.engine.core.bll.host.provider.foreman.ForemanHostProviderProxy.KATELLO_V3_VERSION ) ) ) { return new org.ovirt.engine.core.bll.host.provider.foreman.KatelloV30Provider ( this ) ; } else { return new org.ovirt.engine.core.bll.host.provider.foreman.KatelloV21Provider ( this ) ; } }
Source:
public void validateEnums ( org.ovirt.engine.api.model.Boot boot ) { if ( boot != null ) { if ( boot.isSetDev ( ) ) { org.ovirt.engine.api.common.util.EnumValidator.validateEnum ( org.ovirt.engine.api.model.BootDevice.class , boot.getDev ( ) , true ) ; } } }

Target:
public void validateEnums ( org.ovirt.engine.api.model.Boot boot ) { if ( boot != null ) { if ( ( boot.isSetDevices ( ) ) && ( boot.getDevices ( ) . isSetDevices ( ) ) ) { java.util.List < java.lang.String > devices = boot.getDevices ( ) . getDevices ( ) ; for ( java.lang.String device : devices ) { org.ovirt.engine.api.common.util.EnumValidator.validateEnum ( org.ovirt.engine.api.model.BootDevice.class , device , true ) ; } } } }
Source:
private void removeMemory ( final org.ovirt.engine.core.common.businessentities.Snapshot snapshot , boolean useTaskManager ) { org.ovirt.engine.core.common.action.RemoveMemoryVolumesParameters parameters = new org.ovirt.engine.core.common.action.RemoveMemoryVolumesParameters ( snapshot.getMemoryVolume ( ) , org.ovirt.engine.core.bll.RemoveSnapshotCommand.getVmId ( ) ) ; if ( useTaskManager ) { org.ovirt.engine.core.bll.tasks.TaskManagerUtil.executeAsyncCommand ( VdcActionType.RemoveMemoryVolumes , parameters , org.ovirt.engine.core.bll.RemoveSnapshotCommand.cloneContextAndDetachFromParent ( ) ) ; } else { org.ovirt.engine.core.common.action.VdcReturnValueBase ret = runInternalAction ( VdcActionType.RemoveMemoryVolumes , parameters ) ; if ( ! ( ret.getSucceeded ( ) ) ) { log.errorFormat ( "Cannot remove memory volumes for snapshot {0}" , snapshot.getId ( ) ) ; } } }

Target:
private void removeMemory ( final org.ovirt.engine.core.common.businessentities.Snapshot snapshot , boolean useTaskManager ) { org.ovirt.engine.core.common.action.RemoveMemoryVolumesParameters parameters = new org.ovirt.engine.core.common.action.RemoveMemoryVolumesParameters ( snapshot.getMemoryVolume ( ) , org.ovirt.engine.core.bll.RemoveSnapshotCommand.getVmId ( ) ) ; if ( useTaskManager ) { org.ovirt.engine.core.bll.tasks.CommandCoordinatorUtil.executeAsyncCommand ( VdcActionType.RemoveMemoryVolumes , parameters , org.ovirt.engine.core.bll.RemoveSnapshotCommand.cloneContextAndDetachFromParent ( ) ) ; } else { org.ovirt.engine.core.common.action.VdcReturnValueBase ret = runInternalAction ( VdcActionType.RemoveMemoryVolumes , parameters ) ; if ( ! ( ret.getSucceeded ( ) ) ) { log.errorFormat ( "Cannot remove memory volumes for snapshot {0}" , snapshot.getId ( ) ) ; } } }
Source:
private void mockVmValidator ( ) { org.ovirt.engine.core.bll.validator.VmValidator vmValidator = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.validator.VmValidator ( vm ) ) ; org.mockito.Mockito.doReturn ( vmValidator ) . when ( command ) . createVmValidator ( vm ) ; org.mockito.Mockito.doReturn ( dbFacade ) . when ( vmValidator ) . getDbFacade ( ) ; org.mockito.Mockito.doReturn ( diskDao ) . when ( vmValidator ) . getDiskDao ( ) ; }

Target:
private void mockVmValidator ( org.ovirt.engine.core.common.businessentities.VM paramVm ) { org.ovirt.engine.core.bll.validator.VmValidator vmValidator = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.validator.VmValidator ( paramVm ) ) ; org.mockito.Mockito.doReturn ( vmValidator ) . when ( command ) . createVmValidator ( paramVm ) ; org.mockito.Mockito.doReturn ( dbFacade ) . when ( vmValidator ) . getDbFacade ( ) ; org.mockito.Mockito.doReturn ( diskDao ) . when ( vmValidator ) . getDiskDao ( ) ; }
Source:
public void testGetAllVdsSearch ( ) throws java.lang.Exception { org.ovirt.engine.core.common.queries.SearchParameters searchParam = new org.ovirt.engine.core.common.queries.SearchParameters ( "Host:" , org.ovirt.engine.core.common.interfaces.SearchType.VDS ) ; org.ovirt.engine.core.bll.SearchQuery < org.ovirt.engine.core.common.queries.SearchParameters > searchQuery = spySearchQuery ( searchParam ) ; searchQuery.executeQueryCommand ( ) ; org.junit.Assert.assertTrue ( ( ( vdsResultList ) == ( searchQuery.getQueryReturnValue ( ) . getReturnValue ( ) ) ) ) ; }

Target:
public void testGetAllMultiVmSearch ( ) throws java.lang.Exception { org.ovirt.engine.core.common.queries.SearchParameters searchParam = new org.ovirt.engine.core.common.queries.SearchParameters ( ( "VMs" + ( org.ovirt.engine.core.common.utils.CommonConstants.QUERY_RETURN_TYPE_SEPARATOR ) ) , org.ovirt.engine.core.common.interfaces.SearchType.VM ) ; org.ovirt.engine.core.bll.SearchQuery < org.ovirt.engine.core.common.queries.SearchParameters > searchQuery = spySearchQuery ( searchParam ) ; searchQuery.executeQueryCommand ( ) ; org.junit.Assert.assertTrue ( ( ( vmResultList ) == ( searchQuery.getQueryReturnValue ( ) . getReturnValue ( ) ) ) ) ; }
Source:
protected org.ovirt.engine.core.bll.provider.ProviderProxyFactory getProviderProxyFactory ( ) { return org.ovirt.engine.core.bll.provider.ProviderProxyFactory.getInstance ( ) ; }

Target:
protected void executeCommand ( ) { setupParameters ( ) ; persistCommand ( org.ovirt.engine.core.bll.storage.repoimage.ImportRepoImageCommand.getParameters ( ) . getParentCommand ( ) , true ) ; org.ovirt.engine.core.bll.Backend.getInstance ( ) . runInternalAction ( VdcActionType.AddDisk , createAddDiskParameters ( ) , org.ovirt.engine.core.bll.job.ExecutionHandler.createDefaultContextForTasks ( org.ovirt.engine.core.bll.storage.repoimage.ImportRepoImageCommand.getContext ( ) ) ) ; org.ovirt.engine.core.bll.storage.repoimage.ImportRepoImageCommand.getParameters ( ) . setNextPhase ( ImportRepoImageParameters.Phase.DOWNLOAD ) ; persistCommand ( org.ovirt.engine.core.bll.storage.repoimage.ImportRepoImageCommand.getParameters ( ) . getParentCommand ( ) , true ) ; org.ovirt.engine.core.bll.storage.repoimage.ImportRepoImageCommand.setSucceeded ( true ) ; }
Source:
public void updatePartialVdsDynamicCalc ( org.ovirt.engine.core.compat.Guid id , int vmCount , int pendingVcpusCount , int pendingVmemSize , int memCommited , int vmsCoresCount ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "vds_guid" , id ) . addValue ( "vmCount" , vmCount ) . addValue ( "pendingVcpusCount" , pendingVcpusCount ) . addValue ( "pendingVmemSize" , pendingVmemSize ) . addValue ( "memCommited" , memCommited ) . addValue ( "vmsCoresCount" , vmsCoresCount ) ; getCallsHandler ( ) . executeModification ( "UpdatePartialVdsDynamicCalc" , parameterSource ) ; }

Target:
public void updateUpdateAvailable ( org.ovirt.engine.core.compat.Guid id , boolean updateAvailable ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "vds_guid" , id ) . addValue ( "is_update_available" , updateAvailable ) ; getCallsHandler ( ) . executeModification ( "UpdateVdsDynamicIsUpdateAvailable" , parameterSource ) ; }
Source:
private void onStop ( ) { final org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel ) ( getWindow ( ) ) ) ; onPowerAction ( VdcActionType.StopVm , new org.ovirt.engine.ui.uicommonweb.models.vms.VmListModel.PowerActionParametersFactory < org.ovirt.engine.core.common.action.VdcActionParametersBase > ( ) { @ java.lang.Override public org.ovirt.engine.core.common.action.VdcActionParametersBase createActionParameters ( org.ovirt.engine.core.common.businessentities.VM vm ) { return new org.ovirt.engine.core.common.action.StopVmParameters ( vm.getId ( ) , org.ovirt.engine.core.common.action.StopVmTypeEnum.NORMAL , model.getReason ( ) . getEntity ( ) ) ; } } ) ; }

Target:
protected org.ovirt.engine.ui.uicommonweb.validation.IValidation [ ] getClonedNameValidators ( java.lang.Object object ) { final int maxClonedNameLength = getMaxClonedNameLength ( object ) ; return new org.ovirt.engine.ui.uicommonweb.validation.IValidation [ ] { new org.ovirt.engine.ui.uicommonweb.validation.NotEmptyValidation ( ) , new org.ovirt.engine.ui.uicommonweb.validation.LengthValidation ( maxClonedNameLength ) , new org.ovirt.engine.ui.uicommonweb.validation.I18NNameValidation ( ) { @ java.lang.Override protected java.lang.String composeMessage ( ) { return org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getMessages ( ) . nameMustConataionOnlyAlphanumericChars ( maxClonedNameLength ) ; } } , new org.ovirt.engine.ui.uicommonweb.models.vms.VmListModel.UniqueClonedNameValidator ( assignedVmNames ) } ; }
Source:
public java.lang.String getValue ( org.ovirt.engine.core.common.businessentities.storage.DiskImage object ) { return object.getDiskInterface ( ) . toString ( ) ; }

Target:
public java.lang.String getValue ( org.ovirt.engine.core.common.businessentities.storage.DiskImage object ) { if ( ( object.getDiskVmElements ( ) . size ( ) ) == 1 ) { return object.getDiskVmElements ( ) . iterator ( ) . next ( ) . getDiskInterface ( ) . toString ( ) ; } return null ; }
Source:
public static void getDataCenterById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.core.common.queries.IdQueryParameters params = new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) ; params.setRefresh ( false ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStoragePoolById , params , aQuery ) ; }

Target:
public static void countAllTemplates ( 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 ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmTemplateCount , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }
Source:
public void countAllTemplates ( 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 ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmTemplateCount , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }

Target:
public void getDataCentersWithPermittedActionOnClusters ( org.ovirt.engine.ui.frontend.AsyncQuery < java.util.List < org.ovirt.engine.core.common.businessentities.StoragePool > > aQuery , org.ovirt.engine.core.common.businessentities.ActionGroup actionGroup , final boolean supportsVirtService , final boolean supportsGlusterService ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.ListConverter < > ( ) ; org.ovirt.engine.core.common.queries.GetDataCentersWithPermittedActionOnClustersParameters getDataCentersWithPermittedActionOnClustersParameters = new org.ovirt.engine.core.common.queries.GetDataCentersWithPermittedActionOnClustersParameters ( ) ; getDataCentersWithPermittedActionOnClustersParameters.setActionGroup ( actionGroup ) ; getDataCentersWithPermittedActionOnClustersParameters.setSupportsVirtService ( supportsVirtService ) ; getDataCentersWithPermittedActionOnClustersParameters.setSupportsGlusterService ( supportsGlusterService ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetDataCentersWithPermittedActionOnClusters , getDataCentersWithPermittedActionOnClustersParameters , aQuery ) ; }
Source:
protected void rerunInternal ( ) { org.ovirt.engine.core.bll.MigrateVmCommand.setVm ( null ) ; determineMigrationFailueForAuditLog ( ) ; if ( ( ( org.ovirt.engine.core.bll.MigrateVmCommand.getVm ( ) ) != null ) && ( ( org.ovirt.engine.core.bll.MigrateVmCommand.getVm ( ) . getstatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.Up ) ) ) { setVdsDestinationId ( null ) ; super . rerunInternal ( ) ; } else { decreasePendingVms ( getDestinationVds ( ) . getId ( ) ) ; _isRerun = true ; org.ovirt.engine.core.bll.MigrateVmCommand.setSucceeded ( false ) ; org.ovirt.engine.core.bll.MigrateVmCommand.log ( ) ; } }

Target:
public void rerun ( ) { org.ovirt.engine.core.bll.MigrateVmCommand.setVm ( null ) ; determineMigrationFailueForAuditLog ( ) ; if ( ( ( org.ovirt.engine.core.bll.MigrateVmCommand.getVm ( ) ) != null ) && ( ( org.ovirt.engine.core.bll.MigrateVmCommand.getVm ( ) . getstatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.Up ) ) ) { setVdsDestinationId ( null ) ; super . rerun ( ) ; } else { decreasePendingVms ( getDestinationVds ( ) . getId ( ) ) ; _isRerun = true ; org.ovirt.engine.core.bll.MigrateVmCommand.setSucceeded ( false ) ; org.ovirt.engine.core.bll.MigrateVmCommand.log ( ) ; } }
Source:
void addVmDynamic ( ) { org.ovirt.engine.core.common.businessentities.VmDynamic tempVar = new org.ovirt.engine.core.common.businessentities.VmDynamic ( ) ; tempVar.setId ( org.ovirt.engine.core.bll.AddVmCommand.getVmId ( ) ) ; tempVar.setstatus ( VMStatus.Down ) ; tempVar.setvm_host ( "" ) ; tempVar.setvm_ip ( "" ) ; tempVar.setdisplay_type ( org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . getVmStaticData ( ) . getdefault_display_type ( ) ) ; org.ovirt.engine.core.common.businessentities.VmDynamic vmDynamic = tempVar ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmDynamicDao ( ) . save ( vmDynamic ) ; org.ovirt.engine.core.bll.AddVmCommand.getCompensationContext ( ) . snapshotNewEntity ( vmDynamic ) ; }

Target:
void addVmDynamic ( ) { org.ovirt.engine.core.common.businessentities.VmDynamic tempVar = new org.ovirt.engine.core.common.businessentities.VmDynamic ( ) ; tempVar.setId ( org.ovirt.engine.core.bll.AddVmCommand.getVmId ( ) ) ; tempVar.setstatus ( VMStatus.Down ) ; tempVar.setvm_host ( "" ) ; tempVar.setvm_ip ( "" ) ; tempVar.setdisplay_type ( org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . getVmStaticData ( ) . getDefaultDisplayType ( ) ) ; org.ovirt.engine.core.common.businessentities.VmDynamic vmDynamic = tempVar ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmDynamicDao ( ) . save ( vmDynamic ) ; org.ovirt.engine.core.bll.AddVmCommand.getCompensationContext ( ) . snapshotNewEntity ( vmDynamic ) ; }
Source:
protected org.ovirt.engine.ui.common.widget.uicommon.popup.vm.PopupWidgetConfigMap createWidgetConfiguration ( ) { return super . createWidgetConfiguration ( ) . putAll ( poolSpecificFields ( ) , org.ovirt.engine.ui.common.widget.uicommon.popup.vm.PopupWidgetConfig.hiddenField ( ) ) ; }

Target:
protected org.ovirt.engine.ui.common.widget.uicommon.popup.vm.PopupWidgetConfigMap createWidgetConfiguration ( ) { return super . createWidgetConfiguration ( ) . putAll ( poolSpecificFields ( ) , org.ovirt.engine.ui.common.widget.uicommon.popup.vm.PopupWidgetConfig.hiddenField ( ) ) . update ( templateVersionNameEditor , org.ovirt.engine.ui.common.widget.uicommon.popup.vm.PopupWidgetConfig.hiddenField ( ) ) . putAll ( detachableWidgets ( ) , org.ovirt.engine.ui.common.widget.uicommon.popup.vm.PopupWidgetConfig.simpleField ( ) . detachable ( ) . visibleInAdvancedModeOnly ( ) ) ; }
Source:
protected java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > createDiskDummiesForSpaceValidations ( java.util.Collection < org.ovirt.engine.core.common.businessentities.DiskImage > disksList ) { java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > dummies = new java.util.ArrayList ( disksList.size ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.DiskImage image : disksList ) { org.ovirt.engine.core.compat.Guid targetSdId = diskInfoDestinationMap.get ( image.getId ( ) ) . getStorageIds ( ) . get ( 0 ) ; org.ovirt.engine.core.common.businessentities.DiskImage dummy = org.ovirt.engine.core.bll.ImagesHandler.createDiskImageWithExcessData ( image , targetSdId ) ; dummies.add ( dummy ) ; } return dummies ; }

Target:
protected java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > createDiskDummiesForSpaceValidations ( java.util.Collection < org.ovirt.engine.core.common.businessentities.storage.DiskImage > disksList ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > dummies = new java.util.ArrayList ( disksList.size ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.storage.DiskImage image : disksList ) { org.ovirt.engine.core.compat.Guid targetSdId = diskInfoDestinationMap.get ( image.getId ( ) ) . getStorageIds ( ) . get ( 0 ) ; org.ovirt.engine.core.common.businessentities.storage.DiskImage dummy = org.ovirt.engine.core.bll.ImagesHandler.createDiskImageWithExcessData ( image , targetSdId ) ; dummies.add ( dummy ) ; } return dummies ; }
Source:
static com.gwtplatform.mvp.client.TabData getTabData ( org.ovirt.engine.ui.common.uicommon.model.MainModelProvider < org.ovirt.engine.core.common.businessentities.VmTemplate , org.ovirt.engine.ui.uicommonweb.models.templates.TemplateListModel > modelProvider , org.ovirt.engine.ui.webadmin.widget.tab.WebadminMenuLayout menuLayout ) { org.ovirt.engine.ui.webadmin.widget.tab.MenuLayoutMenuDetails menuTabDetails = menuLayout.getDetails ( WebAdminApplicationPlaces.templateMainTabPlace ) ; return new org.ovirt.engine.ui.common.widget.tab.ModelBoundTabData ( menuTabDetails.getSecondaryTitle ( ) , menuTabDetails.getSecondaryPriority ( ) , menuTabDetails.getPrimaryTitle ( ) , menuTabDetails.getPrimaryPriority ( ) , modelProvider , menuTabDetails.getIcon ( ) ) ; }

Target:
static com.gwtplatform.mvp.client.TabData getTabData ( org.ovirt.engine.ui.webadmin.widget.tab.WebadminMenuLayout menuLayout ) { org.ovirt.engine.ui.webadmin.widget.tab.MenuLayoutMenuDetails menuTabDetails = menuLayout.getDetails ( WebAdminApplicationPlaces.templateMainTabPlace ) ; return new org.ovirt.engine.ui.common.uicommon.model.GroupedTabData ( menuTabDetails.getSecondaryTitle ( ) , menuTabDetails.getPrimaryTitle ( ) , menuTabDetails.getSecondaryPriority ( ) , menuTabDetails.getPrimaryPriority ( ) , menuTabDetails.getIcon ( ) ) ; }
Source:
public void isVmNameUnique ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String name , org.ovirt.engine.core.compat.Guid datacenterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ! ( ( ( java.lang.Boolean ) ( source ) ) . booleanValue ( ) ) : false ; } } ; org.ovirt.engine.core.common.queries.NameQueryParameters params = new org.ovirt.engine.core.common.queries.NameQueryParameters ( name ) ; params.setDatacenterId ( datacenterId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.IsVmWithSameNameExist , params , aQuery ) ; }

Target:
public void isTemplateNameUnique ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String templateName , org.ovirt.engine.core.compat.Guid datacenterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ! ( ( ( java.lang.Boolean ) ( source ) ) . booleanValue ( ) ) : false ; } } ; org.ovirt.engine.core.common.queries.NameQueryParameters params = new org.ovirt.engine.core.common.queries.NameQueryParameters ( templateName ) ; params.setDatacenterId ( datacenterId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.IsVmTemlateWithSameNameExist , params , aQuery ) ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult isPosixDcAndMatchingCompatiblityVersion ( ) { if ( ( ( storagePool.getStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageType.POSIXFS ) ) && ( ! ( org.ovirt.engine.core.common.config.Config.< java.lang.Boolean > getValue ( ConfigValues.PosixStorageEnabled , storagePool.getcompatibility_version ( ) . toString ( ) ) ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.DATA_CENTER_POSIX_STORAGE_NOT_SUPPORTED_IN_CURRENT_VERSION ) ; } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult isPosixSupportedInDC ( ) { if ( ( ! ( storagePool.isLocal ( ) ) ) && ( ! ( org.ovirt.engine.core.common.config.Config.< java.lang.Boolean > getValue ( ConfigValues.PosixStorageEnabled , storagePool.getcompatibility_version ( ) . toString ( ) ) ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.DATA_CENTER_POSIX_STORAGE_NOT_SUPPORTED_IN_CURRENT_VERSION ) ; } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }
Source:
public void engineIsRunningNotification ( ) { try { org.ovirt.engine.core.bll.dwh.DwhHeartBeat.log.debug ( "DWH Heart Beat - Start" ) ; heartBeatVar.setDateTime ( new java.util.Date ( ) ) ; dwhHistoryTimekeepingDao.save ( heartBeatVar ) ; org.ovirt.engine.core.bll.dwh.DwhHeartBeat.log.debug ( "DWH Heart Beat - End" ) ; } 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:
private void engineIsRunningNotification ( ) { try { org.ovirt.engine.core.bll.dwh.DwhHeartBeat.log.debug ( "DWH Heart Beat - Start" ) ; org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInScope ( TransactionScopeOption.RequiresNew , ( ) -> { heartBeatVar.setDateTime ( new java.util.Date ( ) ) ; dwhHistoryTimekeepingDao.save ( heartBeatVar ) ; return null ; } ) ; org.ovirt.engine.core.bll.dwh.DwhHeartBeat.log.debug ( "DWH Heart Beat - End" ) ; } catch ( java.lang.Throwable t ) { org.ovirt.engine.core.bll.dwh.DwhHeartBeat.log.error ( "Error updating DWH Heart Beat: {}" , org.apache.commons.lang.exception.ExceptionUtils.getRootCauseMessage ( t ) ) ; org.ovirt.engine.core.bll.dwh.DwhHeartBeat.log.debug ( "Exception" , t ) ; } }
Source:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; dao = prepareDAO ( dbFacade.getVmNetworkStatisticsDao ( ) ) ; newVmStatistics = new org.ovirt.engine.core.common.businessentities.network.VmNetworkStatistics ( ) ; newVmStatistics.setId ( org.ovirt.engine.core.dao.VmNetworkStatisticsDAOTest.NEW_INTERFACE_ID ) ; newVmStatistics.setVmId ( org.ovirt.engine.core.dao.VmNetworkStatisticsDAOTest.VM_ID ) ; newVmStatistics.setStatus ( InterfaceStatus.Down ) ; newVmStatistics.setReceiveDropRate ( 0.0 ) ; newVmStatistics.setReceiveRate ( 0.0 ) ; newVmStatistics.setTransmitDropRate ( 0.0 ) ; newVmStatistics.setTransmitRate ( 0.0 ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; dao = prepareDAO ( dbFacade.getVmNetworkStatisticsDao ( ) ) ; newVmStatistics = new org.ovirt.engine.core.common.businessentities.network.VmNetworkStatistics ( ) ; newVmStatistics.setId ( org.ovirt.engine.core.dao.VmNetworkStatisticsDAOTest.NEW_INTERFACE_ID ) ; newVmStatistics.setVmId ( org.ovirt.engine.core.dao.VmNetworkStatisticsDAOTest.VM_ID ) ; newVmStatistics.setStatus ( InterfaceStatus.DOWN ) ; newVmStatistics.setReceiveDropRate ( 0.0 ) ; newVmStatistics.setReceiveRate ( 0.0 ) ; newVmStatistics.setTransmitDropRate ( 0.0 ) ; newVmStatistics.setTransmitRate ( 0.0 ) ; }
Source:
public static void updateVdsDomainsData ( org.ovirt.engine.core.common.businessentities.VDS vds , org.ovirt.engine.core.compat.Guid storagePoolId , java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSDomainsData > vdsDomainData ) { if ( ( vds.getStatus ( ) ) == ( org.ovirt.engine.core.vdsbroker.irsbroker.IrsBrokerCommand.reportingVdsStatus ) ) { org.ovirt.engine.core.vdsbroker.irsbroker.IrsBrokerCommand.IrsProxyData proxy = org.ovirt.engine.core.vdsbroker.irsbroker.IrsBrokerCommand._irsProxyData.get ( storagePoolId ) ; if ( proxy != null ) { proxy.updateVdsDomainsData ( vds.getId ( ) , vds.getName ( ) , vdsDomainData ) ; } } }

Target:
public static void updateVdsDomainsData ( org.ovirt.engine.core.common.businessentities.VDS vds , org.ovirt.engine.core.compat.Guid storagePoolId , java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSDomainsData > vdsDomainData ) { if ( ( vds.getStatus ( ) ) == ( org.ovirt.engine.core.vdsbroker.irsbroker.IrsBrokerCommand.reportingVdsStatus ) ) { org.ovirt.engine.core.vdsbroker.irsbroker.IrsProxyData proxy = org.ovirt.engine.core.vdsbroker.irsbroker.IrsBrokerCommand._irsProxyData.get ( storagePoolId ) ; if ( proxy != null ) { proxy.updateVdsDomainsData ( vds.getId ( ) , vds.getName ( ) , vdsDomainData ) ; } } }
Source:
protected org.ovirt.engine.ui.uicommonweb.UICommand resolveCommand ( ) { return getDetailModel ( ) . getAddCommand ( ) ; }

Target:
void initTable ( ) { getTable ( ) . enableColumnResizing ( ) ; getTable ( ) . addColumn ( new org.ovirt.engine.ui.common.widget.table.column.AbstractTextColumn < org.ovirt.engine.core.common.businessentities.IscsiBond > ( ) { @ java.lang.Override public java.lang.String getValue ( org.ovirt.engine.core.common.businessentities.IscsiBond object ) { return object.getName ( ) ; } } , org.ovirt.engine.ui.webadmin.section.main.view.tab.datacenter.SubTabDataCenterIscsiBondView.constants.name ( ) , "400px" ) ; getTable ( ) . addColumn ( new org.ovirt.engine.ui.common.widget.table.column.AbstractTextColumn < org.ovirt.engine.core.common.businessentities.IscsiBond > ( ) { @ java.lang.Override public java.lang.String getValue ( org.ovirt.engine.core.common.businessentities.IscsiBond object ) { return object.getDescription ( ) ; } } , org.ovirt.engine.ui.webadmin.section.main.view.tab.datacenter.SubTabDataCenterIscsiBondView.constants.description ( ) , "400px" ) ; }
Source:
public void delay ( org.ovirt.engine.core.compat.Guid vdsId ) { org.ovirt.engine.core.bll.RunVmCommandBase.log.debug ( "Try to wait for te engine update the host memory and cpu stats" ) ; try { long t = java.lang.Math.max ( org.ovirt.engine.core.vdsbroker.ResourceManager.getInstance ( ) . getVdsManager ( vdsId ) . getLastUpdateElapsed ( ) , java.util.concurrent.TimeUnit.SECONDS.toMillis ( org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( org.ovirt.engine.core.common.config.ConfigValues.VdsRefreshRate ) ) ) ; t = java.lang.Math.max ( org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( ConfigValues.ThrottlerMaxWaitForVdsUpdateInMillis ) , t ) ; getBlockingQueue ( vdsId ) . poll ( t , java.util.concurrent.TimeUnit.MILLISECONDS ) ; } catch ( java.lang.InterruptedException e ) { } }

Target:
public void delay ( org.ovirt.engine.core.compat.Guid vdsId ) { org.ovirt.engine.core.bll.RunVmCommandBase.log.debug ( "Try to wait for te engine update the host memory and cpu stats" ) ; try { long t = java.lang.Math.max ( resourceManager.getVdsManager ( vdsId ) . getLastUpdateElapsed ( ) , java.util.concurrent.TimeUnit.SECONDS.toMillis ( org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( org.ovirt.engine.core.common.config.ConfigValues.VdsRefreshRate ) ) ) ; t = java.lang.Math.max ( org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( ConfigValues.ThrottlerMaxWaitForVdsUpdateInMillis ) , t ) ; getBlockingQueue ( vdsId ) . poll ( t , java.util.concurrent.TimeUnit.MILLISECONDS ) ; } catch ( java.lang.InterruptedException e ) { } }
Source:
public org.ovirt.engine.core.common.AuditLogType getAuditLogTypeValue ( ) { return org.ovirt.engine.core.bll.MigrateVmCommand.getSucceeded ( ) ? ( ( org.ovirt.engine.core.common.businessentities.VMStatus ) ( org.ovirt.engine.core.bll.MigrateVmCommand.getActionReturnValue ( ) ) ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.Up ) ? org.ovirt.engine.core.common.AuditLogType.VM_MIGRATION_DONE : org.ovirt.engine.core.common.AuditLogType.VM_MIGRATION_START : _isRerun ? org.ovirt.engine.core.common.AuditLogType.VM_MIGRATION_TRYING_RERUN : ( org.ovirt.engine.core.bll.MigrateVmCommand.getVds ( ) . getstatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VDSStatus.PreparingForMaintenance ) ? org.ovirt.engine.core.common.AuditLogType.VM_MIGRATION_FAILED_DURING_MOVE_TO_MAINTANANCE : org.ovirt.engine.core.common.AuditLogType.VM_MIGRATION_FAILED ; }

Target:
public org.ovirt.engine.core.common.AuditLogType getAuditLogTypeValue ( ) { org.ovirt.engine.core.common.AuditLogType startMessage = ( org.ovirt.engine.core.bll.MigrateVmCommand.isInternalExecution ( ) ) ? org.ovirt.engine.core.common.AuditLogType.VM_MIGRATION_START_SYSTEM_INITIATED : org.ovirt.engine.core.common.AuditLogType.VM_MIGRATION_START ; return org.ovirt.engine.core.bll.MigrateVmCommand.getSucceeded ( ) ? ( org.ovirt.engine.core.bll.MigrateVmCommand.getActionReturnValue ( ) ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.Up ) ? org.ovirt.engine.core.common.AuditLogType.VM_MIGRATION_DONE : startMessage : _isRerun ? org.ovirt.engine.core.common.AuditLogType.VM_MIGRATION_TRYING_RERUN : ( org.ovirt.engine.core.bll.MigrateVmCommand.getVds ( ) . getstatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VDSStatus.PreparingForMaintenance ) ? org.ovirt.engine.core.common.AuditLogType.VM_MIGRATION_FAILED_DURING_MOVE_TO_MAINTANANCE : org.ovirt.engine.core.common.AuditLogType.VM_MIGRATION_FAILED ; }
Source:
void updateColumnsAvailability ( org.ovirt.engine.ui.uicommonweb.models.storage.DisksAllocationModel model ) { setShowVolumeType ( model.getIsVolumeTypeAvailable ( ) ) ; setShowVolumeFormat ( model.getIsVolumeFormatAvailable ( ) ) ; setShowQuota ( ( ( model.getQuotaEnforcementType ( ) ) != ( org.ovirt.engine.core.common.businessentities.QuotaEnforcementTypeEnum.DISABLED ) ) ) ; }

Target:
void updateColumnsAvailability ( org.ovirt.engine.ui.uicommonweb.models.storage.DisksAllocationModel model ) { setShowVolumeType ( model.getIsVolumeTypeAvailable ( ) ) ; setShowVolumeFormat ( model.getIsVolumeFormatAvailable ( ) ) ; setShowQuota ( ( ( model.getQuotaEnforcementType ( ) ) != ( org.ovirt.engine.core.common.businessentities.QuotaEnforcementTypeEnum.DISABLED ) ) ) ; setShowSource ( model.isSourceAvailable ( ) ) ; setShowTarget ( model.isTargetAvailable ( ) ) ; }
Source:
private void mockVnicProfileNetworkChange ( org.ovirt.engine.core.compat.Guid vnicProfileId , org.ovirt.engine.core.compat.Guid oldVnicProfileId ) { org.ovirt.engine.core.common.businessentities.network.VnicProfile vnicProfile = org.mockito.Mockito.mock ( org.ovirt.engine.core.common.businessentities.network.VnicProfile.class ) ; org.mockito.Mockito.when ( this . vnicProfile.getNetworkId ( ) ) . thenReturn ( vnicProfileId ) ; org.mockito.Mockito.when ( vnicProfile.getNetworkId ( ) ) . thenReturn ( oldVnicProfileId ) ; org.mockito.Mockito.when ( vnicProfileDao.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( vnicProfile ) ; }

Target:
private void mockVnicProfileNetworkChange ( org.ovirt.engine.core.compat.Guid vnicProfileId , org.ovirt.engine.core.compat.Guid oldVnicProfileId ) { org.ovirt.engine.core.common.businessentities.network.VnicProfile vnicProfile = org.mockito.Mockito.mock ( org.ovirt.engine.core.common.businessentities.network.VnicProfile.class ) ; org.mockito.Mockito.when ( this . vnicProfile.getNetworkId ( ) ) . thenReturn ( vnicProfileId ) ; org.mockito.Mockito.when ( vnicProfile.getNetworkId ( ) ) . thenReturn ( oldVnicProfileId ) ; org.mockito.Mockito.when ( vnicProfileDao.get ( org.mockito.ArgumentMatchers.any ( ) ) ) . thenReturn ( vnicProfile ) ; }
Source:
private void updateMtuChangeability ( ) { getMtu ( ) . setIsChangable ( ( ( getHasMtu ( ) . getEntity ( ) ) && ( ! ( getExport ( ) . getEntity ( ) ) ) ) ) ; }

Target:
private void setMtuSelectorsChangeability ( boolean isChangeable , java.lang.String prohibitionReason ) { if ( ! isChangeable ) { getMtuSelector ( ) . setChangeProhibitionReason ( prohibitionReason ) ; getMtu ( ) . setChangeProhibitionReason ( prohibitionReason ) ; } getMtuSelector ( ) . setIsChangable ( isChangeable ) ; getMtu ( ) . setIsChangable ( ( isChangeable && ( isCustomMtu ( ) ) ) ) ; }