auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public static org.ovirt.engine.core.common.businessentities.storage_domains getStorageById ( org.ovirt.engine.core.compat.Guid storageId , java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage_domains > storageDomains ) { for ( org.ovirt.engine.core.common.businessentities.storage_domains storage : storageDomains ) { if ( storage.getId ( ) . equals ( storageId ) ) { return storage ; } } return null ; }

Target:
public static org.ovirt.engine.core.common.businessentities.StorageDomain getStorageById ( org.ovirt.engine.core.compat.Guid storageId , java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > storageDomains ) { for ( org.ovirt.engine.core.common.businessentities.StorageDomain storage : storageDomains ) { if ( storage.getId ( ) . equals ( storageId ) ) { return storage ; } } return null ; }
Source:
protected org.ovirt.engine.api.model.StorageDomain map ( org.ovirt.engine.core.common.businessentities.storage_domains entity , org.ovirt.engine.api.model.StorageDomain template ) { org.ovirt.engine.api.restapi.resource.BackendStorageDomainsResource resource = new org.ovirt.engine.api.restapi.resource.BackendStorageDomainsResource ( ) ; inject ( resource ) ; return resource.map ( entity , template ) ; }

Target:
protected org.ovirt.engine.api.model.StorageDomain map ( org.ovirt.engine.api.model.StorageDomain entity , org.ovirt.engine.api.model.StorageDomain template ) { org.ovirt.engine.api.restapi.resource.BackendStorageDomainsResource resource = new org.ovirt.engine.api.restapi.resource.BackendStorageDomainsResource ( ) ; inject ( resource ) ; return resource.map ( entity , template ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { java.util.ArrayList < java.lang.String > pmTypes = ( ( java.util.ArrayList < java.lang.String > ) ( returnValue ) ) ; updatePmTypeList ( pmTypes , getPmType ( ) ) ; updatePmTypeList ( pmTypes , getPmSecondaryType ( ) ) ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { java.util.List < java.lang.String > pmTypes = ( ( java.util.ArrayList < java.lang.String > ) ( returnValue ) ) ; updatePmTypeList ( pmTypes ) ; }
Source:
public void setEnumTitle ( java.lang.Enum < ? > enumObj ) { setTitle ( org.ovirt.engine.ui.uicompat.EnumTranslator.createAndTranslate ( enumObj ) ) ; }

Target:
public void setEnumTitle ( java.lang.Enum < ? > enumObj ) { setTitle ( org.ovirt.engine.ui.uicompat.EnumTranslator.getInstance ( ) . get ( enumObj ) ) ; }
Source:
private void mockDiskSao ( final org.ovirt.engine.core.dao.DiskDao diskDAO ) { org.ovirt.engine.core.searchbackend.SearchObjectAutoCompleter search = new org.ovirt.engine.core.searchbackend.SearchObjectAutoCompleter ( false ) ; org.mockito.Mockito.when ( diskDAO.getAllWithQuery ( org.mockito.Matchers.matches ( org.ovirt.engine.core.bll.SearchQueryTest.getDiskImageRegexString ( search ) ) ) ) . thenReturn ( diskImageResultList ) ; }

Target:
private void mockDiskSao ( final org.ovirt.engine.core.dao.DiskDao diskDAO ) { org.ovirt.engine.core.searchbackend.SearchObjectAutoCompleter search = new org.ovirt.engine.core.searchbackend.SearchObjectAutoCompleter ( ) ; org.mockito.Mockito.when ( diskDAO.getAllWithQuery ( org.mockito.Matchers.matches ( org.ovirt.engine.core.bll.SearchQueryTest.getDiskImageRegexString ( search ) ) ) ) . thenReturn ( diskImageResultList ) ; }
Source:
private org.ovirt.engine.core.common.vdscommands.VDSReturnValue runVdsCommand ( org.ovirt.engine.core.common.vdscommands.VDSCommandType commandType , org.ovirt.engine.core.common.vdscommands.VDSParametersBase params ) { return org.ovirt.engine.core.bll.Backend.getInstance ( ) . getResourceManager ( ) . RunVdsCommand ( commandType , params ) ; }

Target:
private org.ovirt.engine.core.common.vdscommands.VDSReturnValue runVdsCommand ( org.ovirt.engine.core.common.vdscommands.VDSCommandType commandType , org.ovirt.engine.core.common.vdscommands.VDSParametersBase params ) { return org.ovirt.engine.core.bll.Backend.getInstance ( ) . getResourceManager ( ) . runVdsCommand ( commandType , params ) ; }
Source:
protected void doEdit ( org.ovirt.engine.ui.uicommonweb.models.vms.VmImportGeneralModel model ) { driver.edit ( model ) ; monitorCount.setValue ( java.lang.Integer.toString ( getModel ( ) . getMonitorCount ( ) ) ) ; defaultHost.setTitle ( getModel ( ) . getDefaultHost ( ) ) ; }

Target:
protected void doEdit ( org.ovirt.engine.ui.uicommonweb.models.vms.VmImportGeneralModel model ) { driver.edit ( model ) ; monitorCount.setValue ( java.lang.Integer.toString ( getModel ( ) . getMonitorCount ( ) ) ) ; }
Source:
private void addVmStatisticsToList ( org.ovirt.engine.core.common.businessentities.VmStatistics vmStatistics ) { vmStatisticsToSave.put ( vmStatistics.getId ( ) , vmStatistics ) ; }

Target:
protected void addVmStatisticsToList ( org.ovirt.engine.core.common.businessentities.VmStatistics vmStatistics ) { vmStatisticsToSave.add ( vmStatistics ) ; }
Source:
public boolean isValid ( java.lang.Integer value , javax.validation.ConstraintValidatorContext context ) { return ( value == 0 ) || ( ( 68 <= value ) && ( value <= ( org.ovirt.engine.core.common.config.Config.< java.lang.Integer > GetValue ( ConfigValues.MaxMTU ) ) ) ) ; }

Target:
public boolean isValid ( java.lang.Integer value , javax.validation.ConstraintValidatorContext context ) { return ( value == 0 ) || ( ( 68 <= value ) && ( value <= ( org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( ConfigValues.MaxMTU ) ) ) ) ; }
Source:
public static boolean isHotUnpluggable ( org.ovirt.engine.core.common.businessentities.VmDevice vmDevice ) { return ( vmDevice.getType ( ) ) != ( org.ovirt.engine.core.common.businessentities.VmDeviceGeneralType.MEMORY ) ; }

Target:
public static boolean isHotUnpluggable ( org.ovirt.engine.core.common.businessentities.VmDevice vmDevice ) { return ( vmDevice.getType ( ) ) == ( org.ovirt.engine.core.common.businessentities.VmDeviceGeneralType.MEMORY ) ; }
Source:
private java.lang.String getMacAddress ( ) { return org.ovirt.engine.core.bll.UpdateVmInterfaceCommand.getParameters ( ) . getInterface ( ) . getMacAddress ( ) ; }

Target:
private java.lang.String getMacAddress ( ) { return getInterface ( ) . getMacAddress ( ) ; }
Source:
public org.ovirt.engine.core.common.businessentities.VDSStatus getstatus ( ) { return this . mVdsDynamic.getstatus ( ) ; }

Target:
public org.ovirt.engine.core.common.businessentities.VDSStatus getStatus ( ) { return this . mVdsDynamic.getstatus ( ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue1 ) { getIsVirtioScsiEnabled ( ) . setEntity ( java.lang.Boolean.TRUE.equals ( returnValue1 ) ) ; updateInterfaceList ( clusterVersion ) ; }

Target:
public void onSuccess ( java.lang.Boolean returnValue1 ) { getIsVirtioScsiEnabled ( ) . setEntity ( java.lang.Boolean.TRUE.equals ( returnValue1 ) ) ; updateInterfaceList ( clusterVersion ) ; }
Source:
public void InternalSetVmStatus ( org.ovirt.engine.core.common.businessentities.VM vm , final org.ovirt.engine.core.common.businessentities.VMStatus status ) { InternalSetVmStatus ( vm , status , VmExitStatus.Normal , StringUtils.EMPTY ) ; }

Target:
public void InternalSetVmStatus ( org.ovirt.engine.core.common.businessentities.VM vm , final org.ovirt.engine.core.common.businessentities.VMStatus status ) { InternalSetVmStatus ( vm , status , VmExitStatus.Normal ) ; }
Source:
public void getUsbPolicyOnUpdateCurrentlyLegacyGotNullUsb ( ) { org.ovirt.engine.api.model.Usb usb = null ; org.ovirt.engine.core.common.businessentities.UsbPolicy currentPolicy = org.ovirt.engine.core.common.businessentities.UsbPolicy.ENABLED_LEGACY ; assertEquals ( org.ovirt.engine.api.restapi.types.VmMapper.getUsbPolicyOnUpdate ( usb , currentPolicy , null ) , currentPolicy ) ; }

Target:
public void getUsbPolicyOnUpdateCurrentlyLegacyGotNullUsb ( ) { org.ovirt.engine.api.model.Usb usb = null ; org.ovirt.engine.core.common.businessentities.UsbPolicy currentPolicy = org.ovirt.engine.core.common.businessentities.UsbPolicy.ENABLED_LEGACY ; assertEquals ( org.ovirt.engine.api.restapi.types.VmMapper.getUsbPolicyOnUpdate ( usb , currentPolicy ) , currentPolicy ) ; }
Source:
protected java.lang.String getClusterName ( ) { return getParentEntity ( ) . getName ( ) ; }

Target:
protected java.lang.String getClusterName ( ) { return getEntity ( ) . getName ( ) ; }
Source:
private static int getRefreshRate ( org.ovirt.engine.core.common.config.ConfigValues refreshRateConfig ) { return org.ovirt.engine.core.common.config.Config.< java.lang.Integer > GetValue ( refreshRateConfig ) ; }

Target:
private static int getRefreshRate ( org.ovirt.engine.core.common.config.ConfigValues refreshRateConfig ) { return org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( refreshRateConfig ) ; }
Source:
public boolean eval ( org.ovirt.engine.core.common.businessentities.Network network ) { return network.getname ( ) . equals ( networkName ) ; }

Target:
public boolean eval ( org.ovirt.engine.core.common.businessentities.network.Network network ) { return network.getname ( ) . equals ( networkName ) ; }
Source:
public org.ovirt.engine.core.common.action.MaintenanceNumberOfVdssParameters createMaintenanceParams ( ) { org.ovirt.engine.core.common.action.MaintenanceNumberOfVdssParameters params = new org.ovirt.engine.core.common.action.MaintenanceNumberOfVdssParameters ( java.util.Collections.singletonList ( org.ovirt.engine.core.bll.hostdeploy.UpgradeHostCommand.getVdsId ( ) ) , true ) ; return withRootCommandInfo ( params , org.ovirt.engine.core.bll.hostdeploy.UpgradeHostCommand.getActionType ( ) ) ; }

Target:
public org.ovirt.engine.core.common.action.MaintenanceNumberOfVdssParameters createMaintenanceParams ( ) { org.ovirt.engine.core.common.action.MaintenanceNumberOfVdssParameters params = new org.ovirt.engine.core.common.action.MaintenanceNumberOfVdssParameters ( java.util.Collections.singletonList ( org.ovirt.engine.core.bll.hostdeploy.UpgradeHostCommand.getVdsId ( ) ) , true ) ; return withRootCommandInfo ( params ) ; }
Source:
public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Boolean ) ( source ) ) . booleanValue ( ) : true ; }

Target:
public java.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 > ( ) ; }
Source:
public void handleVmsFinishedInitOnVds ( org.ovirt.engine.core.compat.Guid vdsId ) { java.util.HashSet < org.ovirt.engine.core.compat.Guid > vms = vdsAndVmsList.get ( vdsId ) ; if ( vms != null ) { getEventListener ( ) . processOnVmStop ( vms ) ; vdsAndVmsList.remove ( vdsId ) ; } }

Target:
public void handleVmsFinishedInitOnVds ( org.ovirt.engine.core.compat.Guid vdsId ) { java.util.HashSet < org.ovirt.engine.core.compat.Guid > vms = vdsAndVmsList.get ( vdsId ) ; if ( vms != null ) { getEventListener ( ) . processOnVmStop ( vms , vdsId ) ; vdsAndVmsList.remove ( vdsId ) ; } }
Source:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.storage.NewEditStorageModelBehavior behavior = this ; org.ovirt.engine.ui.uicommonweb.models.storage.IStorageModel storageModelItem = item ; behavior.postUpdateItemsAvailability ( storageModelItem , ( returnValue == null ) ) ; }

Target:
public void onSuccess ( org.ovirt.engine.core.common.businessentities.StorageDomain returnValue ) { org.ovirt.engine.ui.uicommonweb.models.storage.IStorageModel storageModelItem = item ; postUpdateItemsAvailability ( storageModelItem , ( returnValue == null ) ) ; }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { disksViewRadioGroup.setDiskStorageType ( ( ( org.ovirt.engine.core.common.businessentities.Disk.DiskStorageType ) ( getModel ( ) . getDiskViewType ( ) . getEntity ( ) ) ) ) ; }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < ? extends org.ovirt.engine.ui.uicompat.EventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { disksViewRadioGroup.setDiskStorageType ( getModel ( ) . getDiskViewType ( ) . getEntity ( ) ) ; }
Source:
void localize ( org.ovirt.engine.ui.webadmin.ApplicationConstants constants ) { }

Target:
void localize ( ) { }
Source:
public static void ClearConfigCache ( ) { if ( ( org.ovirt.engine.ui.uicommonweb.DataProvider.CachedConfigValues ) != null ) { org.ovirt.engine.ui.uicommonweb.DataProvider.CachedConfigValues.clear ( ) ; } org.ovirt.engine.ui.uicommonweb.DataProvider.windowsOsTypes = null ; org.ovirt.engine.ui.uicommonweb.DataProvider.linuxOsTypes = null ; org.ovirt.engine.ui.uicommonweb.DataProvider.x64OsTypes = null ; org.ovirt.engine.ui.uicommonweb.DataProvider.hasAdminSystemPermission = null ; }

Target:
public static void ClearConfigCache ( ) { if ( ( org.ovirt.engine.ui.uicommonweb.DataProvider.CachedConfigValues ) != null ) { org.ovirt.engine.ui.uicommonweb.DataProvider.CachedConfigValues.clear ( ) ; } }
Source:
public static java.lang.String getLikeSyntax ( boolean caseSensitive ) { if ( ( ( org.ovirt.engine.core.common.config.Config.getConfigUtils ( ) ) == null ) || caseSensitive ) return "LIKE" ; else return org.ovirt.engine.core.common.config.Config.< java.lang.String > GetValue ( ConfigValues.DBLikeSyntax ) ; }

Target:
public static java.lang.String getLikeSyntax ( boolean caseSensitive ) { if ( ( ( org.ovirt.engine.core.common.config.Config.getConfigUtils ( ) ) == null ) || caseSensitive ) return "LIKE" ; else return org.ovirt.engine.core.common.config.Config.< java.lang.String > getValue ( ConfigValues.DBLikeSyntax ) ; }
Source:
public void endWithFailure ( ) { super . endWithFailure ( ) ; if ( getEnclosingCommand ( ) . getReturnValue ( ) . getSucceeded ( ) ) { getEnclosingCommand ( ) . getParameters ( ) . setExecutionIndex ( 0 ) ; } }

Target:
public void endWithFailure ( ) { super . endWithFailure ( ) ; }
Source:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { cachedMaxPriority = ( ( java.lang.Integer ) ( returnValue ) ) ; postUpdatePriority ( callbacks ) ; }

Target:
public void onSuccess ( java.lang.Integer returnValue ) { cachedMaxPriority = returnValue ; postUpdatePriority ( callbacks ) ; }
Source:
public void canDetectMissingRequiredHostNumaNodes ( ) { existingNumaNodes.set ( 0 , org.ovirt.engine.core.bll.utils.NumaTestUtils.createVmNumaNode ( 1 , vdsNumaNodes ) ) ; vdsNumaNodes.remove ( 0 ) ; final org.ovirt.engine.core.bll.numa.vm.AddVmNumaNodesCommand command = mockedCommandWithVmFromParams ( ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( command , EngineMessage.VM_NUMA_NODE_HOST_NODE_INVALID_INDEX ) ; }

Target:
public void canDetectMissingRequiredHostNumaNodes ( ) { existingNumaNodes.set ( 0 , org.ovirt.engine.core.bll.utils.NumaTestUtils.createVmNumaNode ( 0 , vdsNumaNodes ) ) ; vdsNumaNodes.remove ( 0 ) ; final org.ovirt.engine.core.bll.numa.vm.AddVmNumaNodesCommand command = mockedCommandWithVmFromParams ( ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( command , EngineMessage.VM_NUMA_NODE_HOST_NODE_INVALID_INDEX ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { setItems ( ( ( java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterServerService > ) ( returnValue ) ) ) ; updateActionAvailability ( ) ; }

Target:
public void onSuccess ( java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterServerService > returnValue ) { setItems ( returnValue ) ; updateActionAvailability ( ) ; }
Source:
public static void main ( java.lang.String [ ] args ) throws java.lang.Exception { org.ovirt.engine.sdk4.Connection connection = org.ovirt.engine.sdk4.ConnectionBuilder.connection ( ) . url ( "https://engine40.example.com/ovirt-engine/api" ) . user ( "admin@internal" ) . password ( "redhat123" ) . trustStoreFile ( "truststore.jks" ) . build ( ) ; org.ovirt.engine.sdk4.services.StorageDomainsService sdsService = connection.systemService ( ) . storageDomainsService ( ) ; org.ovirt.engine.sdk4.types.StorageDomain sd = sdsService.add ( ) . storageDomain ( org.ovirt.engine.sdk4.builders.Builders.storageDomain ( ) . name ( "myiso" ) . description ( "My ISO" ) . type ( StorageDomainType.ISO ) . host ( org.ovirt.engine.sdk4.builders.Builders.host ( ) . name ( "myhost" ) ) . storage ( org.ovirt.engine.sdk4.builders.Builders.hostStorage ( ) . type ( StorageType.NFS ) . address ( "server0.example.com" ) . path ( "/nfs/ovirt/40/myiso" ) ) ) . send ( ) . storageDomain ( ) ; org.ovirt.engine.sdk4.services.StorageDomainService sdService = sdsService.storageDomainService ( sd.id ( ) ) ; for ( ; ; ) { java.lang.Thread.sleep ( ( 5 * 1000 ) ) ; sd = sdService.get ( ) . send ( ) . storageDomain ( ) ; java.lang.String state = sd.status ( ) . state ( ) ; if ( "unattached" . equals ( state ) ) { break ; } } connection.close ( ) ; }

Target:
public static void main ( java.lang.String [ ] args ) throws java.lang.Exception { org.ovirt.engine.sdk4.Connection connection = org.ovirt.engine.sdk4.ConnectionBuilder.connection ( ) . url ( "https://engine40.example.com/ovirt-engine/api" ) . user ( "admin@internal" ) . password ( "redhat123" ) . trustStoreFile ( "truststore.jks" ) . build ( ) ; org.ovirt.engine.sdk4.services.StorageDomainsService sdsService = connection.systemService ( ) . storageDomainsService ( ) ; org.ovirt.engine.sdk4.types.StorageDomain sd = sdsService.add ( ) . storageDomain ( org.ovirt.engine.sdk4.builders.Builders.storageDomain ( ) . name ( "myiso" ) . description ( "My ISO" ) . type ( StorageDomainType.ISO ) . host ( org.ovirt.engine.sdk4.builders.Builders.host ( ) . name ( "myhost" ) ) . storage ( org.ovirt.engine.sdk4.builders.Builders.hostStorage ( ) . type ( StorageType.NFS ) . address ( "server0.example.com" ) . path ( "/nfs/ovirt/40/myiso" ) ) ) . send ( ) . storageDomain ( ) ; org.ovirt.engine.sdk4.services.StorageDomainService sdService = sdsService.storageDomainService ( sd.id ( ) ) ; for ( ; ; ) { java.lang.Thread.sleep ( ( 5 * 1000 ) ) ; sd = sdService.get ( ) . send ( ) . storageDomain ( ) ; if ( ( sd.status ( ) ) == ( org.ovirt.engine.sdk4.types.StorageDomainStatus.UNATTACHED ) ) { break ; } } connection.close ( ) ; }
Source:
public org.ovirt.engine.ui.uicommonweb.models.EntityModel < T > setIsChangeable ( boolean value ) { super . setIsChangeable ( value ) ; return this ; }

Target:
public org.ovirt.engine.ui.uicommonweb.models.EntityModel < T > setIsChangeable ( boolean value ) { return setIsChangeable ( value , null ) ; }
Source:
public java.util.List < org.ovirt.engine.core.compat.Guid > getAsyncTaskIdsByStoragePoolId ( org.ovirt.engine.core.compat.Guid storagePoolId ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) ; parameterSource.addValue ( "storage_pool_id" , storagePoolId ) ; return getCallsHandler ( ) . executeReadList ( "GetAsyncTasksByStoragePoolId" , org.ovirt.engine.core.dao.AsyncTaskDAODbFacadeImpl.IdRowMapper.instance , parameterSource ) ; }

Target:
public java.util.List < org.ovirt.engine.core.compat.Guid > getAsyncTaskIdsByStoragePoolId ( org.ovirt.engine.core.compat.Guid storagePoolId ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "storage_pool_id" , storagePoolId ) ; return getCallsHandler ( ) . executeReadList ( "GetAsyncTasksByStoragePoolId" , org.ovirt.engine.core.dao.AsyncTaskDAODbFacadeImpl.IdRowMapper.instance , parameterSource ) ; }
Source:
private org.ovirt.engine.core.common.vdscommands.VDSReturnValue createVDSReturnValue ( org.ovirt.engine.core.compat.Guid serverId , java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterServerService > serverServices ) { org.ovirt.engine.core.common.vdscommands.VDSReturnValue ret = new org.ovirt.engine.core.common.vdscommands.VDSReturnValue ( ) ; ret.setSucceeded ( true ) ; ret.setReturnValue ( serverServices ) ; return ret ; }

Target:
private org.ovirt.engine.core.common.vdscommands.VDSReturnValue createVDSReturnValue ( java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterServerService > serverServices ) { org.ovirt.engine.core.common.vdscommands.VDSReturnValue ret = new org.ovirt.engine.core.common.vdscommands.VDSReturnValue ( ) ; ret.setSucceeded ( true ) ; ret.setReturnValue ( serverServices ) ; return ret ; }
Source:
public void testGetForStoragePoolWithInvalidPool ( ) { org.ovirt.engine.core.common.businessentities.StorageDomain result = dao.getForStoragePool ( existingDomain.getId ( ) , org.ovirt.engine.core.compat.NGuid.NewGuid ( ) ) ; org.junit.Assert.assertNull ( result ) ; }

Target:
public void testGetForStoragePoolWithInvalidPool ( ) { org.ovirt.engine.core.common.businessentities.StorageDomain result = dao.getForStoragePool ( existingDomain.getId ( ) , org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; org.junit.Assert.assertNull ( result ) ; }
Source:
private void handlePaused ( final org.ovirt.engine.core.bll.storage.disk.image.TransferImageCommand < T > . StateContext context ) { periodicPauseLog ( context.entity , context.iterationTimestamp ) ; if ( ( context.entity.getImagedTicketId ( ) ) != null ) { stopImageTransferSession ( context.entity ) ; } }

Target:
private void handlePaused ( final org.ovirt.engine.core.bll.storage.disk.image.TransferImageCommand < T > . StateContext context ) { periodicPauseLog ( context.entity , context.iterationTimestamp ) ; }
Source:
public boolean eval ( org.ovirt.engine.core.common.businessentities.VdsNetworkInterface i ) { return i.getName ( ) . equals ( nic ) ; }

Target:
public boolean eval ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface i ) { return i.getName ( ) . equals ( nic ) ; }
Source:
private static boolean checkImagesLocked ( java.util.List < java.lang.String > messages , java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > images ) { return org.ovirt.engine.core.bll.ImagesHandler.checkImagesNotInStatus ( messages , images , ImageStatus.LOCKED , VdcBllMessages.ACTION_TYPE_FAILED_DISKS_LOCKED ) ; }

Target:
public static boolean checkImagesLocked ( java.util.List < java.lang.String > messages , java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > images ) { return org.ovirt.engine.core.bll.ImagesHandler.checkImagesNotInStatus ( messages , images , ImageStatus.LOCKED , VdcBllMessages.ACTION_TYPE_FAILED_DISKS_LOCKED ) ; }
Source:
private boolean isRngDeviceSupported ( org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel model ) { org.ovirt.engine.core.compat.Version clusterVersion = clusterVersionOrNull ( model ) ; return clusterVersion == null ? false : ( ( java.lang.Boolean ) ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigValuePreConverted ( ConfigurationValues.VirtIoRngDeviceSupported , clusterVersion.getValue ( ) ) ) ) ; }

Target:
private boolean isRngDeviceSupported ( org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel model ) { org.ovirt.engine.core.compat.Version clusterVersion = clusterVersionOrNull ( model ) ; return clusterVersion == null ? false : ( ( java.lang.Boolean ) ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getConfigValuePreConverted ( ConfigurationValues.VirtIoRngDeviceSupported , clusterVersion.getValue ( ) ) ) ) ; }
Source:
protected boolean canDoAction ( ) { return networkNotAttachedToCluster ( org.ovirt.engine.core.bll.network.dc.RemoveNetworkCommand.getParameters ( ) . getNetwork ( ) ) ; }

Target:
protected boolean canDoAction ( ) { return networkNotAttachedToCluster ( org.ovirt.engine.core.bll.network.dc.RemoveNetworkCommand.getNetwork ( ) ) ; }
Source:
public void testAction ( ) { try { javax.ws.rs.core.UriInfo uriInfo = mockUri ( "vms" , "00000001-0001-0001-0001-000000000011" , "freezefilesystems" ) ; javax.ws.rs.core.Request request = mockRequest ( "POST" ) ; org.ovirt.engine.api.model.Fault fault = usageFinder.getUsageMessage ( uriInfo , request ) ; assertEquals ( "For correct usage, see: http://localhost:8080/ovirt-engine/apidoc#services/vm/methods/freeze_filesystems" , fault.getDetail ( ) ) ; } catch ( java.net.URISyntaxException | java.lang.ClassNotFoundException | java.io.IOException e ) { fail ( ) ; } }

Target:
public void testAction ( ) throws java.lang.Exception { javax.ws.rs.core.UriInfo uriInfo = mockUri ( "vms" , "00000001-0001-0001-0001-000000000011" , "freezefilesystems" ) ; javax.ws.rs.core.Request request = mockRequest ( "POST" ) ; org.ovirt.engine.api.model.Fault fault = usageFinder.getUsageMessage ( uriInfo , request ) ; assertEquals ( "For correct usage, see: http://localhost:8080/ovirt-engine/apidoc#services/vm/methods/freeze_filesystems" , fault.getDetail ( ) ) ; }
Source:
protected static boolean doesStorageDomainHaveSpaceForRequest ( org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain , long sizeRequested ) { return new org.ovirt.engine.core.bll.validator.StorageDomainValidator ( storageDomain ) . isDomainHasSpaceForRequest ( sizeRequested ) . isValid ( ) ; }

Target:
private static boolean doesStorageDomainHaveSpaceForRequest ( org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain , long sizeRequested ) { return new org.ovirt.engine.core.bll.validator.StorageDomainValidator ( storageDomain ) . isDomainHasSpaceForRequest ( sizeRequested ) . isValid ( ) ; }
Source:
public boolean Match ( org.ovirt.engine.core.common.businessentities.storage_pool source ) { return id.equals ( source.getId ( ) ) ; }

Target:
public boolean Match ( org.ovirt.engine.core.common.businessentities.StoragePool source ) { return id.equals ( source.getId ( ) ) ; }
Source:
public double getAllocated ( ) { return ( ( virtualTotal ) / ( physicalTotal ) ) * 100 ; }

Target:
public double getAllocated ( ) { return ( ( virtualTotal ) / ( ( physicalTotal ) == 0 ? 1 : physicalTotal ) ) * 100 ; }
Source:
private void dbFacadeReturnCluster ( ) { org.mockito.Mockito.when ( mockClusterDao.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( existingGroup ) ; }

Target:
private void dbFacadeReturnCluster ( ) { org.mockito.Mockito.when ( mockClusterDao.get ( org.mockito.Matchers.any ( ) ) ) . thenReturn ( existingGroup ) ; }
Source:
protected void onPropertyChanged ( org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs e ) { super . onPropertyChanged ( e ) ; if ( e.PropertyName.equals ( "Disks" ) ) { updateStorageDomainsAvailability ( ) ; updateQuotaAvailability ( ) ; registerToEvents ( ) ; } }

Target:
protected void onPropertyChanged ( org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs e ) { super . onPropertyChanged ( e ) ; if ( e.PropertyName.equals ( "Disks" ) ) { updateStorageDomainsAvailability ( ) ; updateQuotaAvailability ( ) ; } }
Source:
private java.lang.String getHostNameOfServer ( org.ovirt.engine.core.compat.Guid serverId ) { return new org.springframework.jdbc.core.simple.SimpleJdbcTemplate ( jdbcTemplate ) . queryForObject ( "select host_name from vds_static where vds_id = ?" , java.lang.String.class , serverId.getUuid ( ) ) ; }

Target:
private java.lang.String getHostNameOfServer ( org.ovirt.engine.core.compat.Guid serverId ) { return jdbcTemplate.queryForObject ( "select host_name from vds_static where vds_id = ?" , java.lang.String.class , serverId.getUuid ( ) ) ; }
Source:
private static void raiseQueryStartedEvent ( final java.util.List < org.ovirt.engine.core.common.queries.VdcQueryType > queryTypeList , final java.lang.String context ) { for ( org.ovirt.engine.core.common.queries.VdcQueryType queryType : queryTypeList ) { org.ovirt.engine.ui.frontend.Frontend.raiseQueryStartedEvent ( queryType , context ) ; } }

Target:
private void raiseQueryStartedEvent ( final java.util.List < org.ovirt.engine.core.common.queries.VdcQueryType > queryTypeList , final java.lang.String context ) { for ( org.ovirt.engine.core.common.queries.VdcQueryType queryType : queryTypeList ) { raiseQueryStartedEvent ( queryType , context ) ; } }
Source:
public void testGet ( ) throws java.lang.Exception { setUpGetEntityExpectations ( 0 ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; control.replay ( ) ; verifyModel ( resource.get ( ) , 0 ) ; }

Target:
public void testGet ( ) throws java.lang.Exception { setUpGetEntityExpectations ( 0 ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; verifyModel ( resource.get ( ) , 0 ) ; }
Source:
public static org.ovirt.engine.core.bll.utils.ClusterUtils getInstance ( ) { if ( ( org.ovirt.engine.core.bll.utils.ClusterUtils.instance ) == null ) { org.ovirt.engine.core.bll.utils.ClusterUtils.instance = new org.ovirt.engine.core.bll.utils.ClusterUtils ( ) ; } return org.ovirt.engine.core.bll.utils.ClusterUtils.instance ; }

Target:
public static org.ovirt.engine.core.bll.utils.ClusterUtils getInstance ( ) { return org.ovirt.engine.core.bll.utils.ClusterUtils.instance ; }
Source:
static org.ovirt.engine.core.common.businessentities.StorageServerConnections setUpStorageServerConnection ( ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections cnx = new org.ovirt.engine.core.common.businessentities.StorageServerConnections ( ) ; cnx.setid ( GUIDS [ 0 ] . toString ( ) ) ; cnx.setconnection ( ( "10.11.12.13" + ( ":" + "/1" ) ) ) ; return cnx ; }

Target:
static org.ovirt.engine.core.common.businessentities.StorageServerConnections setUpStorageServerConnection ( ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections cnx = new org.ovirt.engine.core.common.businessentities.StorageServerConnections ( ) ; cnx.setId ( GUIDS [ 0 ] . toString ( ) ) ; cnx.setconnection ( ( "10.11.12.13" + ( ":" + "/1" ) ) ) ; return cnx ; }
Source:
private org.ovirt.engine.core.bll.gluster.ResetGlusterVolumeOptionsCommand createTestCommand ( org.ovirt.engine.core.compat.Guid volumeId ) { return new org.ovirt.engine.core.bll.gluster.ResetGlusterVolumeOptionsCommand ( new org.ovirt.engine.core.common.action.gluster.ResetGlusterVolumeOptionsParameters ( volumeId , null , false ) ) ; }

Target:
private org.ovirt.engine.core.bll.gluster.ResetGlusterVolumeOptionsCommand createTestCommand ( org.ovirt.engine.core.compat.Guid volumeId ) { return new org.ovirt.engine.core.bll.gluster.ResetGlusterVolumeOptionsCommand ( new org.ovirt.engine.core.common.action.gluster.ResetGlusterVolumeOptionsParameters ( volumeId , null , false ) , null ) ; }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < ? extends org.ovirt.engine.ui.uicompat.EventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { updateCloudInitVisibility ( object ) ; updateInitialRunTabVisibility ( object ) ; }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < ? extends org.ovirt.engine.ui.uicompat.EventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { updateCloudInitVisibility ( object ) ; }
Source:
void provisionHost ( org.ovirt.engine.core.common.businessentities.VDS vds , org.ovirt.engine.core.common.businessentities.ExternalHostGroup hg , org.ovirt.engine.core.common.businessentities.ExternalComputeResource computeResource , java.lang.String mac , java.lang.String discoverName , java.lang.String rootPassword , java.lang.String ip ) ;

Target:
void provisionHost ( org.ovirt.engine.core.common.businessentities.VDS host , org.ovirt.engine.core.common.businessentities.ExternalHostGroup hg , org.ovirt.engine.core.common.businessentities.ExternalComputeResource computeResource , java.lang.String mac , java.lang.String discoverName , java.lang.String rootPassword , java.lang.String ip ) ;
Source:
public void testMulKeyVal ( ) { java.util.Map < java.lang.String , java.lang.String > map = org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcStringUtils.string2Map ( org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcStringUtilsTest.MUL_KEY_VAL ) ; org.junit.Assert.assertEquals ( map.size ( ) , 4 ) ; }

Target:
public void testMulKeyVal ( ) { java.util.Map < java.lang.String , java.lang.String > map = org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcStringUtils.string2Map ( org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcStringUtilsTest.MUL_KEY_VAL ) ; org.junit.Assert.assertEquals ( 4 , map.size ( ) ) ; }
Source:
public void endWithFailure ( ) { deleteImageGroup ( ) ; enclosingCommand.getReturnValue ( ) . setSucceeded ( true ) ; }

Target:
public void endWithFailure ( ) { enclosingCommand.getReturnValue ( ) . setSucceeded ( true ) ; }
Source:
public java.lang.Void runInTransaction ( ) { compensationContext.snapshotEntityStatus ( vm.getDynamicData ( ) , vm.getStatus ( ) ) ; org.ovirt.engine.core.bll.VmHandler.UnLockVm ( vm ) ; compensationContext.stateChanged ( ) ; return null ; }

Target:
public java.lang.Void runInTransaction ( ) { compensationContext.snapshotEntityStatus ( vm.getDynamicData ( ) ) ; org.ovirt.engine.core.bll.VmHandler.UnLockVm ( vm ) ; compensationContext.stateChanged ( ) ; return null ; }
Source:
public void testIsConnectionDoesNotExistForHostAndTargetSucceeds ( ) { org.mockito.Mockito.when ( storageServerConnectionExtensionDao.getByHostIdAndTarget ( conn.getHostId ( ) , conn.getIqn ( ) ) ) . thenReturn ( null ) ; org.junit.Assert.assertTrue ( validator.isConnectionDoesNotExistForHostAndTarget ( conn ) . isValid ( ) ) ; }

Target:
public void testIsConnectionDoesNotExistForHostAndTargetSucceeds ( ) { org.junit.Assert.assertTrue ( validator.isConnectionDoesNotExistForHostAndTarget ( conn ) . isValid ( ) ) ; }
Source:
private java.lang.String getIsoPrefixFilePath ( java.lang.String url ) { java.lang.String isoPrefixName = "iso://" ; java.lang.String fullPathFileName = url ; int prefixLength = isoPrefixName.length ( ) ; if ( ( ( url.length ( ) ) >= prefixLength ) && ( url.substring ( 0 , prefixLength ) . equalsIgnoreCase ( isoPrefixName ) ) ) { fullPathFileName = org.ovirt.engine.core.bll.ImagesHandler.cdPathWindowsToLinux ( url.substring ( prefixLength , url.length ( ) ) , org.ovirt.engine.core.bll.RunVmCommand.getVm ( ) . getstorage_pool_id ( ) ) ; } return fullPathFileName ; }

Target:
protected java.lang.String getIsoPrefixFilePath ( java.lang.String url ) { java.lang.String isoPrefixName = "iso://" ; java.lang.String fullPathFileName = url ; int prefixLength = isoPrefixName.length ( ) ; if ( ( ( url.length ( ) ) >= prefixLength ) && ( url.substring ( 0 , prefixLength ) . equalsIgnoreCase ( isoPrefixName ) ) ) { fullPathFileName = cdPathWindowsToLinux ( url.substring ( prefixLength , url.length ( ) ) ) ; } return fullPathFileName ; }
Source:
private void createStorageDomain ( ) { storageDomain = new org.ovirt.engine.core.common.businessentities.StorageDomain ( ) ; storageDomain.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; }

Target:
private org.ovirt.engine.core.common.businessentities.StorageDomain createStorageDomain ( ) { org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain = new org.ovirt.engine.core.common.businessentities.StorageDomain ( ) ; storageDomain.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; return storageDomain ; }
Source:
public java.util.ArrayList < org.ovirt.engine.core.common.action.VdcReturnValueBase > runInternalMultipleActions ( org.ovirt.engine.core.common.action.VdcActionType actionType , java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > parameters ) { return runMultipleActionsImpl ( actionType , parameters , true , false , false ) ; }

Target:
public java.util.ArrayList < org.ovirt.engine.core.common.action.VdcReturnValueBase > runInternalMultipleActions ( org.ovirt.engine.core.common.action.VdcActionType actionType , java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > parameters ) { return runMultipleActionsImpl ( actionType , parameters , true , false , false , null ) ; }
Source:
private boolean isMaintenanceCommandExecuted ( java.util.List < org.ovirt.engine.core.compat.Guid > childCmdIds ) { org.ovirt.engine.core.compat.Guid maintenanceCommandId = getMaintenanceCmdId ( childCmdIds ) ; org.ovirt.engine.core.common.businessentities.CommandEntity maintenanceCmd = org.ovirt.engine.core.bll.tasks.CommandCoordinatorUtil.getCommandEntity ( maintenanceCommandId ) ; return maintenanceCmd == null ? false : maintenanceCmd.isExecuted ( ) ; }

Target:
private boolean isMaintenanceCommandExecuted ( java.util.List < org.ovirt.engine.core.compat.Guid > childCmdIds ) { org.ovirt.engine.core.compat.Guid maintenanceCommandId = getMaintenanceCmdId ( childCmdIds ) ; org.ovirt.engine.core.common.businessentities.CommandEntity maintenanceCmd = org.ovirt.engine.core.bll.tasks.CommandCoordinatorUtil.getCommandEntity ( maintenanceCommandId ) ; return ( maintenanceCmd != null ) && ( maintenanceCmd.isExecuted ( ) ) ; }
Source:
public boolean eval ( org.ovirt.engine.core.common.businessentities.network.Network network ) { return network.getname ( ) . equals ( getNetworkName ( ) ) ; }

Target:
public boolean eval ( org.ovirt.engine.core.common.businessentities.network.Network network ) { return network.getName ( ) . equals ( getNetworkName ( ) ) ; }
Source:
protected void syncSearch ( ) { org.ovirt.engine.core.common.queries.SearchParameters tempVar = new org.ovirt.engine.core.common.queries.SearchParameters ( applySortOptions ( getSearchString ( ) ) , org.ovirt.engine.core.common.interfaces.SearchType.GlusterVolume , isCaseSensitiveSearch ( ) ) ; tempVar.setMaxCount ( getSearchPageSize ( ) ) ; super . syncSearch ( VdcQueryType.Search , tempVar ) ; }

Target:
protected void syncSearch ( ) { org.ovirt.engine.core.common.queries.SearchParameters tempVar = new org.ovirt.engine.core.common.queries.SearchParameters ( getSearchString ( ) , org.ovirt.engine.core.common.interfaces.SearchType.GlusterVolume , isCaseSensitiveSearch ( ) ) ; tempVar.setMaxCount ( getSearchPageSize ( ) ) ; super . syncSearch ( VdcQueryType.Search , tempVar ) ; }
Source:
public void validateSucceeds ( ) { command = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.RemoveAuditLogByIdCommand ( new org.ovirt.engine.core.common.action.RemoveAuditLogByIdParameters ( org.ovirt.engine.core.bll.RemoveAuditLogByIdCommandTest.EVENT_ID_3 ) ) ) ; prepareMocks ( command ) ; org.junit.Assert.assertTrue ( command.validate ( ) ) ; }

Target:
public void validateSucceeds ( ) { command = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.RemoveAuditLogByIdCommand ( new org.ovirt.engine.core.common.action.RemoveAuditLogByIdParameters ( org.ovirt.engine.core.bll.RemoveAuditLogByIdCommandTest.EVENT_ID_3 ) , null ) ) ; prepareMocks ( command ) ; org.junit.Assert.assertTrue ( command.validate ( ) ) ; }
Source:
private void mockStorageDomainStatic ( org.ovirt.engine.core.common.businessentities.storage.StorageType storageType ) { final org.ovirt.engine.core.common.businessentities.StorageDomainStatic domain = new org.ovirt.engine.core.common.businessentities.StorageDomainStatic ( ) ; domain.setStorageType ( storageType ) ; org.mockito.Mockito.when ( storageDomainStaticDao.get ( org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( domain ) ; }

Target:
private void mockStorageDomainStatic ( org.ovirt.engine.core.common.businessentities.storage.StorageType storageType ) { final org.ovirt.engine.core.common.businessentities.StorageDomainStatic domain = new org.ovirt.engine.core.common.businessentities.StorageDomainStatic ( ) ; domain.setStorageType ( storageType ) ; org.mockito.Mockito.when ( storageDomainStaticDao.get ( org.mockito.ArgumentMatchers.any ( ) ) ) . thenReturn ( domain ) ; }
Source:
public javax.ws.rs.core.Response setupNetworks ( org.ovirt.engine.api.model.Action action ) { validateParameters ( action , "hostNics" ) ; org.ovirt.engine.core.common.action.SetupNetworksParameters parameters = toParameters ( action ) ; return performAction ( org.ovirt.engine.core.common.action.VdcActionType.SetupNetworks , parameters ) ; }

Target:
public javax.ws.rs.core.Response setupNetworks ( org.ovirt.engine.api.model.Action action ) { validateParameters ( action , "hostNics" ) ; org.ovirt.engine.core.common.action.SetupNetworksParameters parameters = toParameters ( action ) ; return performAction ( org.ovirt.engine.core.common.action.VdcActionType.SetupNetworks , parameters , action ) ; }
Source:
public java.lang.Throwable extractException ( java.lang.Object ... args ) { for ( java.lang.Object arg : args ) { if ( arg instanceof java.lang.Throwable ) return ( ( java.lang.Throwable ) ( arg ) ) ; } return null ; }

Target:
private java.lang.Throwable extractException ( java.lang.Object ... args ) { for ( java.lang.Object arg : args ) { if ( arg instanceof java.lang.Throwable ) return ( ( java.lang.Throwable ) ( arg ) ) ; } return null ; }
Source:
protected org.ovirt.engine.core.bll.ValidationResult networkNotAttachedToCluster ( final org.ovirt.engine.core.common.businessentities.Network network ) { return org.ovirt.engine.core.bll.network.dc.NetworkCommon.getNetworkClusterDAO ( ) . getAllForNetwork ( network.getId ( ) ) . isEmpty ( ) ? org.ovirt.engine.core.bll.ValidationResult.VALID : new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.dal.VdcBllMessages.NETWORK_CLUSTER_NETWORK_IN_USE ) ; }

Target:
protected org.ovirt.engine.core.bll.ValidationResult networkNotAttachedToCluster ( final org.ovirt.engine.core.common.businessentities.network.Network network ) { return org.ovirt.engine.core.bll.network.dc.NetworkCommon.getNetworkClusterDAO ( ) . getAllForNetwork ( network.getId ( ) ) . isEmpty ( ) ? org.ovirt.engine.core.bll.ValidationResult.VALID : new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.dal.VdcBllMessages.NETWORK_CLUSTER_NETWORK_IN_USE ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { setProviders ( ( ( java.util.List < org.ovirt.engine.core.common.businessentities.Provider > ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ) ) ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDataCenterList ( dcQuery ) ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { setProviders ( ( ( java.util.List < org.ovirt.engine.core.common.businessentities.Provider > ) ( returnValue ) ) ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDataCenterList ( dcQuery ) ; }
Source:
public boolean hasTaskHandlers ( ) { return ( getTaskHandlers ( ) ) != null ; }

Target:
protected boolean hasTaskHandlers ( ) { return ( getTaskHandlers ( ) ) != null ; }
Source:
protected org.ovirt.engine.core.common.businessentities.VmTemplateStatus getRawValue ( org.ovirt.engine.core.common.utils.PairQueryable < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface , org.ovirt.engine.core.common.businessentities.VmTemplate > object ) { return object.getSecond ( ) . getstatus ( ) ; }

Target:
protected org.ovirt.engine.core.common.businessentities.VmTemplateStatus getRawValue ( org.ovirt.engine.core.common.utils.PairQueryable < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface , org.ovirt.engine.core.common.businessentities.VmTemplate > object ) { return object.getSecond ( ) . getStatus ( ) ; }
Source:
public static boolean isNonVmNonVlanNetwork ( org.ovirt.engine.core.common.businessentities.Network network ) { return ( ! ( network.isVmNetwork ( ) ) ) && ( ( network.getvlan_id ( ) ) == null ) ; }

Target:
public static boolean isNonVmNonVlanNetwork ( org.ovirt.engine.core.common.businessentities.network.Network network ) { return ( ! ( network.isVmNetwork ( ) ) ) && ( ( network.getvlan_id ( ) ) == null ) ; }
Source:
private void cancel ( ) { sourceModel.setWindow ( null ) ; sourceModel.setConfirmWindow ( null ) ; }

Target:
protected void cancel ( ) { sourceModel.setWindow ( null ) ; sourceModel.setConfirmWindow ( null ) ; }
Source:
protected void endSuccessfully ( ) { checkTrustedService ( ) ; endActionOnAllImageGroups ( ) ; org.ovirt.engine.core.bll.VmHandler.unLockVm ( getVm ( ) ) ; org.ovirt.engine.core.bll.ImportVmCommand.setSucceeded ( true ) ; }

Target:
protected void endSuccessfully ( ) { checkTrustedService ( ) ; endActionOnAllImageGroups ( ) ; org.ovirt.engine.core.bll.VmHandler.unLockVm ( org.ovirt.engine.core.bll.ImportVmCommand.getVm ( ) ) ; org.ovirt.engine.core.bll.ImportVmCommand.setSucceeded ( true ) ; }
Source:
protected boolean checkImageConfiguration ( ) { return org.ovirt.engine.core.bll.ImagesHandler.CheckImageConfiguration ( org.ovirt.engine.core.bll.AddDiskCommand.getStorageDomain ( ) . getStorageStaticData ( ) , getDiskImageInfo ( ) , org.ovirt.engine.core.bll.AddDiskCommand.getReturnValue ( ) . getCanDoActionMessages ( ) ) ; }

Target:
protected boolean checkImageConfiguration ( ) { return org.ovirt.engine.core.bll.ImagesHandler.checkImageConfiguration ( org.ovirt.engine.core.bll.AddDiskCommand.getStorageDomain ( ) . getStorageStaticData ( ) , getDiskImageInfo ( ) , org.ovirt.engine.core.bll.AddDiskCommand.getReturnValue ( ) . getCanDoActionMessages ( ) ) ; }
Source:
public void getUsbPolicyOnUpdateCurrentlyNativeGotEnabledNotSetPolicyNotSetUsb ( ) { org.ovirt.engine.api.model.Usb usb = new org.ovirt.engine.api.model.Usb ( ) ; org.ovirt.engine.core.common.businessentities.UsbPolicy currentPolicy = org.ovirt.engine.core.common.businessentities.UsbPolicy.ENABLED_NATIVE ; assertEquals ( org.ovirt.engine.api.restapi.types.VmMapper.getUsbPolicyOnUpdate ( usb , currentPolicy , null ) , currentPolicy ) ; }

Target:
public void getUsbPolicyOnUpdateCurrentlyNativeGotEnabledNotSetPolicyNotSetUsb ( ) { org.ovirt.engine.api.model.Usb usb = new org.ovirt.engine.api.model.Usb ( ) ; org.ovirt.engine.core.common.businessentities.UsbPolicy currentPolicy = org.ovirt.engine.core.common.businessentities.UsbPolicy.ENABLED_NATIVE ; assertEquals ( org.ovirt.engine.api.restapi.types.VmMapper.getUsbPolicyOnUpdate ( usb , currentPolicy ) , currentPolicy ) ; }
Source:
private org.springframework.jdbc.core.namedparam.MapSqlParameterSource createVfsConfigIdParameter ( org.ovirt.engine.core.compat.Guid vfsConfigId ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "vfs_config_id" , vfsConfigId ) ; return parameterSource ; }

Target:
private org.springframework.jdbc.core.namedparam.MapSqlParameterSource createVfsConfigIdParameter ( org.ovirt.engine.core.compat.Guid vfsConfigId ) { return getCustomMapSqlParameterSource ( ) . addValue ( "vfs_config_id" , vfsConfigId ) ; }
Source:
public java.lang.String getParameters ( ) { switch ( getVmPoolType ( ) ) { case TimeLease : { return org.ovirt.engine.core.compat.StringFormat.format ( "%1$s,%2$s:%3$s,%4$s:%5$s" , defaultTimeInDays , defaultStartTime.Hours , defaultStartTime.Minutes , defaultEndTime.Hours , defaultEndTime.Minutes ) ; } default : { return parameters ; } } }

Target:
public java.lang.String getParameters ( ) { return parameters ; }
Source:
protected boolean canDoAction ( ) { return org.ovirt.engine.core.bll.PauseVmCommand.CanPauseVm ( org.ovirt.engine.core.bll.PauseVmCommand.getParameters ( ) . getVmId ( ) , org.ovirt.engine.core.bll.PauseVmCommand.getReturnValue ( ) . getCanDoActionMessages ( ) ) ; }

Target:
protected boolean canDoAction ( ) { return CanPauseVm ( org.ovirt.engine.core.bll.PauseVmCommand.getParameters ( ) . getVmId ( ) , org.ovirt.engine.core.bll.PauseVmCommand.getReturnValue ( ) . getCanDoActionMessages ( ) ) ; }
Source:
protected void createImage ( ) { org.ovirt.engine.core.bll.tasks.CommandCoordinatorUtil.executeAsyncCommand ( VdcActionType.AddDisk , getAddDiskParameters ( ) , org.ovirt.engine.core.bll.storage.disk.image.UploadDiskImageCommand.cloneContextAndDetachFromParent ( ) ) ; persistCommand ( org.ovirt.engine.core.bll.storage.disk.image.UploadDiskImageCommand.getParameters ( ) . getParentCommand ( ) , true ) ; }

Target:
protected void createImage ( ) { org.ovirt.engine.core.bll.tasks.CommandCoordinatorUtil.executeAsyncCommand ( VdcActionType.AddDisk , getAddDiskParameters ( ) , org.ovirt.engine.core.bll.storage.disk.image.UploadDiskImageCommand.cloneContextAndDetachFromParent ( ) ) ; }