auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void testSetEmulatedMachine ( ) { java.lang.String preUpdate = existingCluster.getEmulatedMachine ( ) ; java.lang.String updatedValue = "pc-version-1.2.3" ; org.junit.Assert.assertNotSame ( updatedValue , preUpdate ) ; existingCluster.setEmulatedMachine ( updatedValue ) ; dao.setEmulatedMachine ( existingCluster.getId ( ) , updatedValue , false ) ; org.junit.Assert.assertEquals ( updatedValue , dao.get ( existingCluster.getId ( ) ) . getEmulatedMachine ( ) ) ; }

Target:
public void testSetEmulatedMachine ( ) { java.lang.String preUpdate = existingCluster.getEmulatedMachine ( ) ; java.lang.String updatedValue = "pc-version-1.2.3" ; org.junit.jupiter.api.Assertions.assertNotSame ( updatedValue , preUpdate ) ; existingCluster.setEmulatedMachine ( updatedValue ) ; dao.setEmulatedMachine ( existingCluster.getId ( ) , updatedValue , false ) ; org.junit.jupiter.api.Assertions.assertEquals ( updatedValue , dao.get ( existingCluster.getId ( ) ) . getEmulatedMachine ( ) ) ; }
Source:
protected boolean checkIfNeedToBeOverride ( ) { if ( ( ( ( org.ovirt.engine.core.bll.MoveOrCopyDiskCommand.getParameters ( ) . getOperation ( ) ) == ( org.ovirt.engine.core.common.businessentities.ImageOperation.Copy ) ) && ( ! ( org.ovirt.engine.core.bll.MoveOrCopyDiskCommand.getParameters ( ) . getForceOverride ( ) ) ) ) && ( org.ovirt.engine.core.bll.MoveOrCopyDiskCommand.getImage ( ) . getStorageIds ( ) . contains ( org.ovirt.engine.core.bll.MoveOrCopyDiskCommand.getStorageDomain ( ) . getId ( ) ) ) ) { return failCanDoAction ( VdcBllMessages.ACTION_TYPE_FAILED_IMAGE_ALREADY_EXISTS ) ; } return true ; }

Target:
protected boolean checkIfNeedToBeOverride ( ) { if ( ( ( ( isTemplate ( ) ) && ( ( org.ovirt.engine.core.bll.MoveOrCopyDiskCommand.getParameters ( ) . getOperation ( ) ) == ( org.ovirt.engine.core.common.businessentities.storage.ImageOperation.Copy ) ) ) && ( ! ( org.ovirt.engine.core.bll.MoveOrCopyDiskCommand.getParameters ( ) . getForceOverride ( ) ) ) ) && ( org.ovirt.engine.core.bll.MoveOrCopyDiskCommand.getImage ( ) . getStorageIds ( ) . contains ( org.ovirt.engine.core.bll.MoveOrCopyDiskCommand.getStorageDomain ( ) . getId ( ) ) ) ) { return failCanDoAction ( VdcBllMessages.ACTION_TYPE_FAILED_IMAGE_ALREADY_EXISTS ) ; } return true ; }
Source:
private org.ovirt.engine.core.common.businessentities.DiskImage createDiskImage ( int size ) { org.ovirt.engine.core.common.businessentities.DiskImage img = new org.ovirt.engine.core.common.businessentities.DiskImage ( ) ; img.setSizeInGigabytes ( size ) ; img.setActualSize ( size ) ; img.setId ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; img.setstorage_ids ( new java.util.ArrayList < org.ovirt.engine.core.compat.Guid > ( java.util.Arrays.asList ( STORAGE_DOMAIN_ID ) ) ) ; return img ; }

Target:
private static org.ovirt.engine.core.common.businessentities.DiskImage createDiskImage ( int size ) { org.ovirt.engine.core.common.businessentities.DiskImage img = new org.ovirt.engine.core.common.businessentities.DiskImage ( ) ; img.setSizeInGigabytes ( size ) ; img.setActualSize ( size ) ; img.setId ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; img.setstorage_ids ( new java.util.ArrayList < org.ovirt.engine.core.compat.Guid > ( java.util.Arrays.asList ( org.ovirt.engine.core.bll.AddVmCommandTest.STORAGE_DOMAIN_ID ) ) ) ; return img ; }
Source:
private static void addPermission ( org.ovirt.engine.core.compat.Guid userId , org.ovirt.engine.core.compat.Guid entityId , org.ovirt.engine.core.bll.PredefinedRoles role , org.ovirt.engine.core.common.VdcObjectType objectType ) { org.ovirt.engine.core.common.businessentities.Permissions perms = new org.ovirt.engine.core.common.businessentities.Permissions ( ) ; perms.setad_element_id ( userId ) ; perms.setObjectType ( objectType ) ; perms.setObjectId ( entityId ) ; perms.setrole_id ( role.getId ( ) ) ; org.ovirt.engine.core.bll.MultiLevelAdministrationHandler.addPermission ( perms ) ; }

Target:
public static void removeNetworkFromHostsInDataCenter ( org.ovirt.engine.core.common.businessentities.network.Network network , org.ovirt.engine.core.compat.Guid dataCenterId , org.ovirt.engine.core.bll.context.CommandContext context ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > nics = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getInterfaceDao ( ) . getAllInterfacesByLabelForDataCenter ( dataCenterId , network.getLabel ( ) ) ; org.ovirt.engine.core.bll.network.cluster.NetworkHelper.removeNetworkFromHosts ( network , context , nics ) ; }
Source:
private boolean validateSourceStorageDomain ( org.ovirt.engine.core.compat.Guid imageId ) { org.ovirt.engine.core.common.businessentities.DiskImage diskImage = getDiskImageByImageId ( imageId ) ; org.ovirt.engine.core.compat.Guid domainId = diskImage.getStorageIds ( ) . get ( 0 ) ; org.ovirt.engine.core.bll.validator.StorageDomainValidator validator = getValidator ( domainId , org.ovirt.engine.core.bll.lsm.LiveMigrateVmDisksCommand.getStoragePoolId ( ) ) ; return validate ( validator.isDomainExistAndActive ( ) ) ; }

Target:
private org.ovirt.engine.core.common.businessentities.StorageDomain getImageSourceDomain ( org.ovirt.engine.core.compat.Guid imageId ) { org.ovirt.engine.core.common.businessentities.DiskImage diskImage = getDiskImageByImageId ( imageId ) ; org.ovirt.engine.core.compat.Guid domainId = diskImage.getStorageIds ( ) . get ( 0 ) ; return getStorageDomainById ( domainId , org.ovirt.engine.core.bll.lsm.LiveMigrateVmDisksCommand.getStoragePoolId ( ) ) ; }
Source:
protected void removeSnapshot ( org.ovirt.engine.core.common.businessentities.storage.DiskImage snapshot ) { org.ovirt.engine.core.bll.storage.disk.image.BaseImagesCommand.getImageStorageDomainMapDao ( ) . remove ( snapshot.getImageId ( ) ) ; imageDao.remove ( snapshot.getImageId ( ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > imagesForDisk = diskImageDao.getAllSnapshotsForImageGroup ( snapshot.getId ( ) ) ; if ( ( imagesForDisk == null ) || ( imagesForDisk.isEmpty ( ) ) ) { baseDiskDao.remove ( snapshot.getId ( ) ) ; } }

Target:
protected void removeSnapshot ( org.ovirt.engine.core.common.businessentities.storage.DiskImage snapshot ) { imageStorageDomainMapDao.remove ( snapshot.getImageId ( ) ) ; imageDao.remove ( snapshot.getImageId ( ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > imagesForDisk = diskImageDao.getAllSnapshotsForImageGroup ( snapshot.getId ( ) ) ; if ( ( imagesForDisk == null ) || ( imagesForDisk.isEmpty ( ) ) ) { baseDiskDao.remove ( snapshot.getId ( ) ) ; } }
Source:
protected void assertGetTreeForEntityResult ( org.ovirt.engine.core.compat.Guid entityID , java.util.List < org.ovirt.engine.core.common.businessentities.Permissions > result , org.ovirt.engine.core.compat.Guid ... alternativeObjectIds ) { java.util.Set < org.ovirt.engine.core.compat.Guid > expectedObjectIds = new java.util.HashSet < org.ovirt.engine.core.compat.Guid > ( ) ; expectedObjectIds.add ( entityID ) ; expectedObjectIds.addAll ( java.util.Arrays.asList ( alternativeObjectIds ) ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.Permissions permission : result ) { org.junit.Assert.assertTrue ( expectedObjectIds.contains ( permission.getObjectId ( ) ) ) ; } }

Target:
protected void assertGetTreeForEntityResult ( org.ovirt.engine.core.compat.Guid entityID , java.util.List < org.ovirt.engine.core.common.businessentities.Permission > result , org.ovirt.engine.core.compat.Guid ... alternativeObjectIds ) { java.util.Set < org.ovirt.engine.core.compat.Guid > expectedObjectIds = new java.util.HashSet < org.ovirt.engine.core.compat.Guid > ( ) ; expectedObjectIds.add ( entityID ) ; expectedObjectIds.addAll ( java.util.Arrays.asList ( alternativeObjectIds ) ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.Permission permission : result ) { org.junit.Assert.assertTrue ( expectedObjectIds.contains ( permission.getObjectId ( ) ) ) ; } }
Source:
public void getUnusedBricksFromServer ( org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery , org.ovirt.engine.core.compat.Guid hostId ) { asyncQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.core.common.queries.VdsIdParametersBase parameters = new org.ovirt.engine.core.common.queries.VdsIdParametersBase ( hostId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetUnusedGlusterBricks , parameters , asyncQuery ) ; }

Target:
public void getHostNumaTopologyByHostId ( org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery , org.ovirt.engine.core.compat.Guid hostId ) { asyncQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VdsNumaNode > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVdsNumaNodesByVdsId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( hostId ) , asyncQuery ) ; }
Source:
private void updateDirectLunDiskEnabled ( org.ovirt.engine.core.common.businessentities.StoragePool datacenter ) { boolean isInternal = getIsInternal ( ) . getEntity ( ) ; if ( isInternal ) { return ; } boolean isDirectLUNDiskkEnabled = ( ( java.lang.Boolean ) ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getConfigValuePreConverted ( ConfigurationValues.DirectLUNDiskEnabled , datacenter.getcompatibility_version ( ) . getValue ( ) ) ) ) ; getIsDirectLunDiskAvaialable ( ) . setEntity ( isDirectLUNDiskkEnabled ) ; setMessage ( ( ! isDirectLUNDiskkEnabled ? org.ovirt.engine.ui.uicommonweb.models.vms.AbstractDiskModel.CONSTANTS.directLUNDiskNotSupported ( ) : "" ) ) ; }

Target:
private void updateDirectLunDiskEnabled ( org.ovirt.engine.core.common.businessentities.StoragePool datacenter ) { if ( ( getDiskStorageType ( ) . getEntity ( ) ) != ( org.ovirt.engine.core.common.businessentities.Disk.DiskStorageType.LUN ) ) { return ; } boolean isDirectLUNDiskkEnabled = ( ( java.lang.Boolean ) ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getConfigValuePreConverted ( ConfigurationValues.DirectLUNDiskEnabled , datacenter.getcompatibility_version ( ) . getValue ( ) ) ) ) ; getIsDirectLunDiskAvaialable ( ) . setEntity ( isDirectLUNDiskkEnabled ) ; setMessage ( ( ! isDirectLUNDiskkEnabled ? org.ovirt.engine.ui.uicommonweb.models.vms.AbstractDiskModel.CONSTANTS.directLUNDiskNotSupported ( ) : "" ) ) ; }
Source:
public static void GetVmById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmByVmId , new org.ovirt.engine.core.common.queries.GetVmByVmIdParameters ( vmId ) , aQuery ) ; }

Target:
public static java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmInterfaceType > GetNicTypeList ( org.ovirt.engine.core.common.businessentities.VmOsType osType , boolean hasDualmode ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmInterfaceType > list = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmInterfaceType > ( java.util.Arrays.asList ( org.ovirt.engine.core.common.businessentities.VmInterfaceType.values ( ) ) ) ; list.remove ( VmInterfaceType.rtl8139_pv ) ; if ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.IsWindowsOsType ( osType ) ) { list.remove ( VmInterfaceType.e1000 ) ; if ( ( osType == ( org.ovirt.engine.core.common.businessentities.VmOsType.WindowsXP ) ) && hasDualmode ) { list.add ( VmInterfaceType.rtl8139_pv ) ; } } return list ; }
Source:
private void UpdateWipeAfterDelete ( org.ovirt.engine.core.common.businessentities.StorageType storageType , org.ovirt.engine.ui.uicommonweb.models.EntityModel wipeAfterDeleteModel ) { if ( storageType.isFileDomain ( ) ) { wipeAfterDeleteModel.setIsChangable ( false ) ; } else { wipeAfterDeleteModel.setIsChangable ( true ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetSANWipeAfterDelete ( new org.ovirt.engine.ui.frontend.AsyncQuery ( this , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void OnSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel diskModel = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel ) ( target ) ) ; diskModel.getWipeAfterDelete ( ) . setEntity ( returnValue ) ; } } ) ) ; } }

Target:
private void updateWipeAfterDelete ( org.ovirt.engine.core.common.businessentities.StorageType storageType , org.ovirt.engine.ui.uicommonweb.models.EntityModel wipeAfterDeleteModel ) { if ( storageType.isFileDomain ( ) ) { wipeAfterDeleteModel.setIsChangable ( false ) ; } else { wipeAfterDeleteModel.setIsChangable ( true ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetSANWipeAfterDelete ( new org.ovirt.engine.ui.frontend.AsyncQuery ( this , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void OnSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel diskModel = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel ) ( target ) ) ; diskModel.getWipeAfterDelete ( ) . setEntity ( returnValue ) ; } } ) ) ; } }
Source:
private boolean isCopyCommandAvailable ( ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > disks = ( ( getSelectedItems ( ) ) != null ) ? org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.DiskImage > Cast ( getSelectedItems ( ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ( ) ; for ( org.ovirt.engine.core.common.businessentities.DiskImage disk : disks ) { if ( ( disk.getImageStatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.ImageStatus.OK ) ) { return false ; } } return true ; }

Target:
private boolean isCopyCommandAvailable ( ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > disks = ( ( getSelectedItems ( ) ) != null ) ? org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.DiskImage > cast ( getSelectedItems ( ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ( ) ; for ( org.ovirt.engine.core.common.businessentities.DiskImage disk : disks ) { if ( ( disk.getImageStatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.ImageStatus.OK ) ) { return false ; } } return true ; }
Source:
public void save ( org.ovirt.engine.core.common.businessentities.VdsStatic vds ) { org.ovirt.engine.core.compat.Guid id = vds.getId ( ) ; if ( org.ovirt.engine.core.compat.Guid.isNullOrEmpty ( id ) ) { id = org.ovirt.engine.core.compat.Guid.NewGuid ( ) ; vds.setId ( id ) ; } new org.springframework.jdbc.core.simple.SimpleJdbcCall ( jdbcTemplate ) . withProcedureName ( "InsertVdsStatic" ) . execute ( getInsertOrUpdateParams ( vds ) ) ; }

Target:
public void save ( org.ovirt.engine.core.common.businessentities.VdsStatic vds ) { org.ovirt.engine.core.compat.Guid id = vds.getId ( ) ; if ( org.ovirt.engine.core.compat.Guid.isNullOrEmpty ( id ) ) { id = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; vds.setId ( id ) ; } new org.springframework.jdbc.core.simple.SimpleJdbcCall ( jdbcTemplate ) . withProcedureName ( "InsertVdsStatic" ) . execute ( getInsertOrUpdateParams ( vds ) ) ; }
Source:
public void shouldDetectTooMuchHostNodes ( ) { vm.setvNumaNodeList ( java.util.Arrays.asList ( org.ovirt.engine.core.bll.utils.NumaTestUtils.createVmNumaNode ( 1 , vdsNumaNodes ) ) ) ; vm.setNumaTuneMode ( NumaTuneMode.PREFERRED ) ; assertValidationFailure ( org.ovirt.engine.core.bll.numa.vm.NumaValidator.checkVmNumaNodesIntegrity ( vm , vm.getvNumaNodeList ( ) ) , EngineMessage.VM_NUMA_NODE_PREFERRED_NOT_PINNED_TO_SINGLE_NODE ) ; }

Target:
public void shouldDetectTooMuchHostNodes ( ) { vm.setvNumaNodeList ( java.util.Arrays.asList ( org.ovirt.engine.core.bll.utils.NumaTestUtils.createVmNumaNode ( 1 , vdsNumaNodes ) ) ) ; vm.setNumaTuneMode ( NumaTuneMode.PREFERRED ) ; assertValidationFailure ( underTest.checkVmNumaNodesIntegrity ( vm , vm.getvNumaNodeList ( ) ) , EngineMessage.VM_NUMA_NODE_PREFERRED_NOT_PINNED_TO_SINGLE_NODE ) ; }
Source:
protected void setUpQueryExpectations ( java.lang.String query , java.lang.Object failure ) throws java.lang.Exception { assertEquals ( "" , query ) ; setUpEntityQueryExpectations ( QueryType.GetStepsWithSubjectEntitiesByJobId , org.ovirt.engine.core.common.queries.GetStepsWithSubjectEntitiesByJobIdQueryParameters.class , new java.lang.String [ ] { "JobId" } , new java.lang.Object [ ] { GUIDS [ 1 ] } , setUpSteps ( ) , failure ) ; }

Target:
protected void setUpQueryExpectations ( java.lang.String query , java.lang.Object failure ) throws java.lang.Exception { org.junit.Assert.assertEquals ( "" , query ) ; setUpEntityQueryExpectations ( QueryType.GetStepsWithSubjectEntitiesByJobId , org.ovirt.engine.core.common.queries.GetStepsWithSubjectEntitiesByJobIdQueryParameters.class , new java.lang.String [ ] { "JobId" } , new java.lang.Object [ ] { GUIDS [ 1 ] } , setUpSteps ( ) , failure ) ; }
Source:
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 ) ) ) ; } } ; 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 ) ; }

Target:
public void getGlusterHook ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hookId , boolean includeServerHooks ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterHookById , new org.ovirt.engine.core.common.queries.gluster.GlusterHookQueryParameters ( hookId , includeServerHooks ) , aQuery ) ; }
Source:
public void getSearchResultsLimit ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) . intValue ( ) : 100 ; } } ; getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.SearchResultsLimit , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public void getGlusterSwiftServices ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid serverId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterServerService > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterServerServicesByServerId , new org.ovirt.engine.core.common.queries.gluster.GlusterServiceQueryParameters ( serverId , org.ovirt.engine.core.common.businessentities.gluster.ServiceType.GLUSTER_SWIFT ) , aQuery ) ; }
Source:
public void cancelTasks ( final org.ovirt.engine.core.bll.CommandBase command ) { if ( command.hasTasks ( ) ) { org.ovirt.engine.core.utils.threadpool.ThreadPoolUtil.execute ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { org.ovirt.engine.core.bll.tasks.CommandCoordinatorImpl.log.infoFormat ( "Rollback for command: {0}." , command.getClass ( ) . getName ( ) ) ; try { getAsyncTaskManager ( ) . cancelTasks ( command.getReturnValue ( ) . getVdsmTaskIdList ( ) ) ; } catch ( java.lang.Exception e ) { org.ovirt.engine.core.bll.tasks.CommandCoordinatorImpl.log.errorFormat ( "Failed to cancel tasks for command: {0}." , command.getClass ( ) . getName ( ) ) ; } } } ) ; } }

Target:
public org.ovirt.engine.core.compat.Guid createTask ( org.ovirt.engine.core.compat.Guid taskId , org.ovirt.engine.core.bll.CommandBase command , org.ovirt.engine.core.common.asynctasks.AsyncTaskCreationInfo asyncTaskCreationInfo , org.ovirt.engine.core.common.action.VdcActionType parentCommand , java.lang.String description , java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.VdcObjectType > entitiesMap ) { return coCoAsyncTaskHelper.createTask ( taskId , command , asyncTaskCreationInfo , parentCommand , description , entitiesMap ) ; }
Source:
protected org.ovirt.engine.core.bll.ValidationResult macAvailable ( ) { java.lang.Boolean allowDupMacs = org.ovirt.engine.core.common.config.Config.< java.lang.Boolean > GetValue ( ConfigValues.AllowDuplicateMacAddresses ) ; return ( org.ovirt.engine.core.bll.network.MacPoolManager.getInstance ( ) . isMacInUse ( getMacAddress ( ) ) ) && ( ! allowDupMacs ) ? new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.dal.VdcBllMessages.NETWORK_MAC_ADDRESS_IN_USE ) : org.ovirt.engine.core.bll.ValidationResult.VALID ; }

Target:
protected org.ovirt.engine.core.bll.ValidationResult macAvailable ( ) { java.lang.Boolean allowDupMacs = org.ovirt.engine.core.common.config.Config.< java.lang.Boolean > GetValue ( ConfigValues.AllowDuplicateMacAddresses ) ; return ( org.ovirt.engine.core.bll.network.MacPoolManager.getInstance ( ) . isMacInUse ( getMacAddress ( ) ) ) && ( ! allowDupMacs ) ? new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.NETWORK_MAC_ADDRESS_IN_USE ) : org.ovirt.engine.core.bll.ValidationResult.VALID ; }
Source:
protected void SelectedItemPropertyChanged ( java.lang.Object sender , org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs e ) { super . SelectedItemPropertyChanged ( sender , e ) ; if ( e.PropertyName.equals ( "status" ) ) { UpdateActionAvailability ( ) ; } else if ( e.PropertyName.equals ( "display_type" ) ) { UpdateConsoleModels ( ) ; } }

Target:
public void setSelectedHasConsoleModels ( java.util.List < org.ovirt.engine.ui.uicommonweb.models.HasConsoleModel > selectedHasConsoleModels ) { this . selectedHasConsoleModels = selectedHasConsoleModels ; }
Source:
protected java.lang.String cdPathWindowsToLinux ( java.lang.String windowsPath , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.compat.Guid vdsId ) { if ( org.apache.commons.lang.StringUtils.isEmpty ( windowsPath ) ) { return "" ; } return cdPathWindowsToLinux ( windowsPath , ( ( java.lang.String ) ( runVdsCommand ( VDSCommandType.IsoPrefix , new org.ovirt.engine.core.common.vdscommands.VdsAndPoolIDVDSParametersBase ( vdsId , storagePoolId ) ) . getReturnValue ( ) ) ) ) ; }

Target:
protected java.lang.String getIsoPrefix ( org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.compat.Guid vdsId ) { return ( ( java.lang.String ) ( runVdsCommand ( VDSCommandType.IsoPrefix , new org.ovirt.engine.core.common.vdscommands.VdsAndPoolIDVDSParametersBase ( vdsId , storagePoolId ) ) . getReturnValue ( ) ) ) ; }
Source:
protected org.ovirt.engine.core.common.utils.ToStringBuilder appendAttributes ( org.ovirt.engine.core.common.utils.ToStringBuilder tsb ) { return super . appendAttributes ( tsb ) . append ( "macAddress" , getMacAddress ( ) ) . append ( "bondOptions" , getBondOptions ( ) ) . append ( "labels" , getLabels ( ) ) . append ( "slaves" , getSlaves ( ) ) ; }

Target:
protected org.ovirt.engine.core.common.utils.ToStringBuilder appendAttributes ( org.ovirt.engine.core.common.utils.ToStringBuilder tsb ) { return super . appendAttributes ( tsb ) . append ( "macAddress" , getMacAddress ( ) ) . append ( "bondOptions" , getBondOptions ( ) ) . append ( "labels" , getLabels ( ) ) . append ( "slaves" , getSlaves ( ) ) . append ( "activeSlave" , getActiveSlave ( ) ) ; }
Source:
public void testNullDisksUsages ( ) { org.ovirt.engine.core.common.businessentities.VmStatistics vmStatistics = org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilderTest.getVmStatistics ( ) ; java.util.Map < java.lang.String , java.lang.Object > xml = org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilderTest.setDisksUsage ( null ) ; vdsBrokerObjectsBuilder.updateVMStatisticsData ( vmStatistics , xml ) ; org.junit.Assert.assertNull ( vmStatistics.getDisksUsage ( ) ) ; }

Target:
public void testNullDisksUsages ( ) { org.ovirt.engine.core.common.businessentities.VmStatistics vmStatistics = org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilderTest.getVmStatistics ( ) ; java.util.Map < java.lang.String , java.lang.Object > xml = org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilderTest.setDisksUsage ( null ) ; vdsBrokerObjectsBuilder.updateVMStatisticsData ( vmStatistics , xml ) ; org.junit.jupiter.api.Assertions.assertNull ( vmStatistics.getDisksUsage ( ) ) ; }
Source:
protected void configure ( ) { bind ( org.ovirt.engine.ui.uicommonweb.models.providers.ProviderListModel.class ) . in ( com.google.inject.Singleton.class ) ; bind ( org.ovirt.engine.ui.uicommonweb.models.providers.ProviderGeneralModel.class ) . in ( com.google.inject.Singleton.class ) ; bind ( org.ovirt.engine.ui.uicommonweb.models.providers.ProviderNetworkListModel.class ) . in ( com.google.inject.Singleton.class ) ; bind ( new com.google.inject.TypeLiteral < org.ovirt.engine.ui.common.uicommon.model.DetailModelProvider < org.ovirt.engine.ui.uicommonweb.models.providers.ProviderListModel , org.ovirt.engine.ui.uicommonweb.models.providers.ProviderGeneralModel > > ( ) { } ) . to ( new com.google.inject.TypeLiteral < org.ovirt.engine.ui.common.uicommon.model.DetailTabModelProvider < org.ovirt.engine.ui.uicommonweb.models.providers.ProviderListModel , org.ovirt.engine.ui.uicommonweb.models.providers.ProviderGeneralModel > > ( ) { } ) . in ( com.google.inject.Singleton.class ) ; }

Target:
protected void configure ( ) { bind ( org.ovirt.engine.ui.uicommonweb.models.providers.ProviderListModel.class ) . in ( com.google.inject.Singleton.class ) ; bind ( org.ovirt.engine.ui.uicommonweb.models.providers.ProviderGeneralModel.class ) . in ( com.google.inject.Singleton.class ) ; bind ( org.ovirt.engine.ui.uicommonweb.models.providers.ProviderNetworkListModel.class ) . in ( com.google.inject.Singleton.class ) ; bind ( org.ovirt.engine.ui.uicommonweb.models.providers.ProviderSecretListModel.class ) . in ( com.google.inject.Singleton.class ) ; bind ( new com.google.inject.TypeLiteral < org.ovirt.engine.ui.common.uicommon.model.DetailModelProvider < org.ovirt.engine.ui.uicommonweb.models.providers.ProviderListModel , org.ovirt.engine.ui.uicommonweb.models.providers.ProviderGeneralModel > > ( ) { } ) . to ( new com.google.inject.TypeLiteral < org.ovirt.engine.ui.common.uicommon.model.DetailTabModelProvider < org.ovirt.engine.ui.uicommonweb.models.providers.ProviderListModel , org.ovirt.engine.ui.uicommonweb.models.providers.ProviderGeneralModel > > ( ) { } ) . in ( com.google.inject.Singleton.class ) ; }
Source:
public void testCleanNotExpiredUsersSessionsNoUsers ( ) { org.ovirt.engine.core.dao.DbUserDAO dbUserDAOMcok = initDataForClearTest ( org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_KEY ) ; container.cleanExpiredUsersSessions ( ) ; org.junit.Assert.assertNotNull ( "Get should return the value since the session was not removed" , container.GetData ( org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_SESSION_ID , org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_KEY ) ) ; org.mockito.Mockito.verifyZeroInteractions ( dbUserDAOMcok ) ; }

Target:
public void testCleanExpiredUsersSessionsNoUsers ( ) { org.ovirt.engine.core.dao.DbUserDAO dbUserDAOMcok = initDataForClearTest ( org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_KEY ) ; container.cleanExpiredUsersSessions ( ) ; container.cleanExpiredUsersSessions ( ) ; org.junit.Assert.assertNull ( "Get should return null since the session was removed" , container.GetData ( org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_SESSION_ID , org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_KEY , false ) ) ; org.mockito.Mockito.verifyZeroInteractions ( dbUserDAOMcok ) ; }
Source:
private org.ovirt.engine.core.common.action.SetupNetworksParameters createParametersForBond ( org.ovirt.engine.core.common.businessentities.VdsNetworkInterface bond , java.util.List < org.ovirt.engine.core.common.businessentities.VdsNetworkInterface > bondedIfaces ) { org.ovirt.engine.core.common.action.SetupNetworksParameters parameters = new org.ovirt.engine.core.common.action.SetupNetworksParameters ( ) ; parameters.getInterfaces ( ) . add ( bond ) ; for ( org.ovirt.engine.core.common.businessentities.VdsNetworkInterface iface : bondedIfaces ) { parameters.getInterfaces ( ) . add ( createVdsInterface ( iface.getName ( ) , false , bond.getName ( ) , null , null ) ) ; } return parameters ; }

Target:
private org.ovirt.engine.core.common.businessentities.VdsNetworkInterface enslaveOrReleaseNIC ( org.ovirt.engine.core.common.businessentities.VdsNetworkInterface iface , java.lang.String bondName ) { return createVdsInterface ( iface.getId ( ) , iface.getName ( ) , false , bondName , null , null ) ; }
Source:
public java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > getVmDeviceByVmIdTypeAndDevice ( org.ovirt.engine.core.compat.Guid vmId , java.lang.String type , java.lang.String device , org.ovirt.engine.core.compat.Guid userID , boolean isFiltered ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "vm_id" , vmId ) . addValue ( "type" , type ) . addValue ( "device" , device ) . addValue ( "user_id" , userID ) . addValue ( "is_filtered" , isFiltered ) ; return getCallsHandler ( ) . executeReadList ( "GetVmDeviceByVmIdTypeAndDevice" , createEntityRowMapper ( ) , parameterSource ) ; }

Target:
public java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > getVmDeviceByVmIdTypeAndDevice ( org.ovirt.engine.core.compat.Guid vmId , org.ovirt.engine.core.common.businessentities.VmDeviceGeneralType type , java.lang.String device , org.ovirt.engine.core.compat.Guid userID , boolean isFiltered ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "vm_id" , vmId ) . addValue ( "type" , type.getValue ( ) ) . addValue ( "device" , device ) . addValue ( "user_id" , userID ) . addValue ( "is_filtered" , isFiltered ) ; return getCallsHandler ( ) . executeReadList ( "GetVmDeviceByVmIdTypeAndDevice" , createEntityRowMapper ( ) , parameterSource ) ; }
Source:
public void newQos ( ) { if ( ( org.ovirt.engine.ui.uicommonweb.models.datacenters.qos.DataCenterQosListModel.getWindow ( ) ) != null ) { return ; } final org.ovirt.engine.ui.uicommonweb.models.datacenters.qos.NewQosModel < T , P > newQosModel = getNewQosModel ( ) ; setWindow ( newQosModel ) ; newQosModel.getDataCenters ( ) . setItems ( java.util.Arrays.asList ( getEntity ( ) ) , getEntity ( ) ) ; }

Target:
public void newQos ( ) { if ( ( org.ovirt.engine.ui.uicommonweb.models.datacenters.qos.DataCenterQosListModel.getWindow ( ) ) != null ) { return ; } final org.ovirt.engine.ui.uicommonweb.models.datacenters.qos.QosModel < T , P > newQosModel = getNewQosModel ( ) ; setWindow ( newQosModel ) ; newQosModel.getDataCenters ( ) . setItems ( java.util.Arrays.asList ( getEntity ( ) ) , getEntity ( ) ) ; }
Source:
public static void isClusterEmpty ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return ( ( java.lang.Boolean ) ( source ) ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.IsClusterEmpty , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
public void getIrsImageList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId ) { getIrsImageList ( aQuery , storagePoolId , false ) ; }
Source:
public org.ovirt.engine.ui.common.uicommon.model.SearchableDetailModelProvider < org.ovirt.engine.core.common.businessentities.network.ExternalSubnet , org.ovirt.engine.ui.uicommonweb.models.networks.NetworkListModel , org.ovirt.engine.ui.uicommonweb.models.networks.NetworkExternalSubnetListModel > getExternalSubnetListProvider ( com.google.gwt.event.shared.EventBus eventBus , com.google.inject.Provider < org.ovirt.engine.ui.common.presenter.popup.DefaultConfirmationPopupPresenterWidget > defaultConfirmPopupProvider ) { return new org.ovirt.engine.ui.common.uicommon.model.SearchableDetailTabModelProvider < org.ovirt.engine.core.common.businessentities.network.ExternalSubnet , org.ovirt.engine.ui.uicommonweb.models.networks.NetworkListModel , org.ovirt.engine.ui.uicommonweb.models.networks.NetworkExternalSubnetListModel > ( eventBus , defaultConfirmPopupProvider , org.ovirt.engine.ui.uicommonweb.models.networks.NetworkListModel.class , org.ovirt.engine.ui.uicommonweb.models.networks.NetworkExternalSubnetListModel.class ) { } ; }

Target:
public org.ovirt.engine.ui.common.presenter.AbstractModelBoundPopupPresenterWidget < ? extends org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel , ? > getConfirmModelPopup ( org.ovirt.engine.ui.uicommonweb.models.networks.NetworkExternalSubnetListModel source , org.ovirt.engine.ui.uicommonweb.UICommand lastExecutedCommand ) { if ( lastExecutedCommand == ( getModel ( ) . getRemoveCommand ( ) ) ) { return removeConfirmPopupProvider.get ( ) ; } else { return super . getConfirmModelPopup ( source , lastExecutedCommand ) ; } }
Source:
public org.ovirt.engine.sdk.decorators.Network update ( ) throws java.io.IOException , org.apache.http.client.ClientProtocolException , org.ovirt.engine.sdk.exceptions.ServerException { java.lang.String url = this . getHref ( ) ; return getProxy ( ) . update ( url , this , org.ovirt.engine.sdk.entities.Network.class , org.ovirt.engine.sdk.decorators.Network.class ) ; }

Target:
public org.ovirt.engine.sdk.decorators.Network update ( ) throws java.io.IOException , org.apache.http.client.ClientProtocolException , org.ovirt.engine.sdk.exceptions.ServerException { java.lang.String url = this . getHref ( ) ; java.util.List < org.apache.http.Header > headers = new org.ovirt.engine.sdk.utils.HttpHeaderBuilder ( ) . build ( ) ; url = new org.ovirt.engine.sdk.utils.UrlBuilder ( url ) . build ( ) ; return getProxy ( ) . update ( url , this , org.ovirt.engine.sdk.entities.Network.class , org.ovirt.engine.sdk.decorators.Network.class , headers ) ; }
Source:
private void assertLunShouldBeUpdatedDueToFieldChange ( ) { setLunsSameLunAndPvIds ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.storage.LUNs > existingLunsToUpdateInDb = getLunsToUpdateInDb ( ) . get ( command.updateExistingLuns ) ; assertLunIdInList ( existingLunsToUpdateInDb , lunFromVg.getLUNId ( ) ) ; }

Target:
public void testGetLunsToUpdateInDbLunExistsInDbButNotInVgInfo ( ) { org.ovirt.engine.core.compat.Guid lunFromDbId = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.storage.LUNs > lunsToRemoveFromDb = getLunsToUpdateInDb ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , lunFromDbId , org.ovirt.engine.core.compat.Guid.newGuid ( ) , org.ovirt.engine.core.compat.Guid.newGuid ( ) ) . get ( command.removeLunsHandler ) ; assertLunIdInList ( lunsToRemoveFromDb , lunFromDbId ) ; }
Source:
public static void getStorageConnectionById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String id , boolean isRefresh ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( org.ovirt.engine.core.common.businessentities.StorageServerConnections ) ( source ) ) : null ; } } ; org.ovirt.engine.core.common.queries.StorageServerConnectionQueryParametersBase params = new org.ovirt.engine.core.common.queries.StorageServerConnectionQueryParametersBase ( id ) ; params.setRefresh ( isRefresh ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetStorageServerConnectionById , params , aQuery ) ; }

Target:
public static void getExistingStorageDomainList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hostId , org.ovirt.engine.core.common.businessentities.StorageDomainType domainType , org.ovirt.engine.core.common.businessentities.StorageType storageType , java.lang.String path ) { 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.StorageDomain > ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetExistingStorageDomainList , new org.ovirt.engine.core.common.queries.GetExistingStorageDomainListParameters ( hostId , storageType , domainType , path ) , aQuery ) ; }
Source:
public void endStepJob ( org.ovirt.engine.core.common.job.Step step ) { getJobRepository ( ) . updateStep ( step ) ; org.ovirt.engine.core.bll.job.ExecutionContext finalContext = org.ovirt.engine.core.bll.job.ExecutionHandler.getInstance ( ) . createFinalizingContext ( step.getId ( ) ) ; org.ovirt.engine.core.bll.job.ExecutionHandler.getInstance ( ) . endTaskStepAndJob ( finalContext , isTaskSuccess ( step.getStatus ( ) ) ) ; }

Target:
public void endStepJob ( org.ovirt.engine.core.common.job.Step step ) { jobRepository.updateStep ( step ) ; org.ovirt.engine.core.bll.job.ExecutionContext finalContext = executionHandler.createFinalizingContext ( step.getId ( ) ) ; executionHandler.endTaskStepAndJob ( finalContext , isTaskSuccess ( step.getStatus ( ) ) ) ; }
Source:
protected void executeCommand ( ) { org.ovirt.engine.core.bll.storage.disk.image.ImagesHandler.updateAllDiskImagesSnapshotsStatusInTransactionWithCompensation ( getMovedDiskIds ( ) , ImageStatus.LOCKED , ImageStatus.OK , org.ovirt.engine.core.bll.storage.lsm.LiveMigrateVmDisksCommand.getCompensationContext ( ) ) ; org.ovirt.engine.core.common.action.VdcReturnValueBase vdcReturnValue = runInternalAction ( VdcActionType.CreateAllSnapshotsFromVm , getCreateSnapshotParameters ( ) , org.ovirt.engine.core.bll.job.ExecutionHandler.createInternalJobContext ( org.ovirt.engine.core.bll.storage.lsm.LiveMigrateVmDisksCommand.getContext ( ) ) ) ; org.ovirt.engine.core.bll.storage.lsm.LiveMigrateVmDisksCommand.getParameters ( ) . setAutoGeneratedSnapshotId ( vdcReturnValue.getActionReturnValue ( ) ) ; persistCommand ( org.ovirt.engine.core.bll.storage.lsm.LiveMigrateVmDisksCommand.getParameters ( ) . getParentCommand ( ) , ( ( getCallback ( ) ) != null ) ) ; org.ovirt.engine.core.bll.storage.lsm.LiveMigrateVmDisksCommand.setSucceeded ( true ) ; }

Target:
protected void executeCommand ( ) { org.ovirt.engine.core.bll.storage.disk.image.ImagesHandler.updateAllDiskImagesSnapshotsStatusInTransactionWithCompensation ( getMovedDiskIds ( ) , ImageStatus.LOCKED , ImageStatus.OK , org.ovirt.engine.core.bll.storage.lsm.LiveMigrateVmDisksCommand.getCompensationContext ( ) ) ; org.ovirt.engine.core.common.action.VdcReturnValueBase vdcReturnValue = runInternalAction ( ActionType.CreateAllSnapshotsFromVm , getCreateSnapshotParameters ( ) , org.ovirt.engine.core.bll.job.ExecutionHandler.createInternalJobContext ( org.ovirt.engine.core.bll.storage.lsm.LiveMigrateVmDisksCommand.getContext ( ) ) ) ; org.ovirt.engine.core.bll.storage.lsm.LiveMigrateVmDisksCommand.getParameters ( ) . setAutoGeneratedSnapshotId ( vdcReturnValue.getActionReturnValue ( ) ) ; persistCommand ( org.ovirt.engine.core.bll.storage.lsm.LiveMigrateVmDisksCommand.getParameters ( ) . getParentCommand ( ) , ( ( getCallback ( ) ) != null ) ) ; org.ovirt.engine.core.bll.storage.lsm.LiveMigrateVmDisksCommand.setSucceeded ( true ) ; }
Source:
public void executeCommand ( ) { cmd = org.mockito.Mockito.spy ( createTestCommand ( volumeId1 ) ) ; prepareMocks ( cmd ) ; cmd.executeCommand ( ) ; org.junit.Assert.assertEquals ( AuditLogType.GLUSTER_VOLUME_DETAILS_REFRESH , cmd.getAuditLogTypeValue ( ) ) ; org.mockito.Mockito.verify ( syncJob , org.mockito.Mockito.times ( 1 ) ) . refreshVolumeDetails ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.VDS.class ) , org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity.class ) ) ; }

Target:
public void executeCommand ( ) { cmd.setGlusterVolumeId ( volumeId1 ) ; cmd.executeCommand ( ) ; org.junit.Assert.assertEquals ( AuditLogType.GLUSTER_VOLUME_DETAILS_REFRESH , cmd.getAuditLogTypeValue ( ) ) ; org.mockito.Mockito.verify ( syncJob , org.mockito.Mockito.times ( 1 ) ) . refreshVolumeDetails ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.VDS.class ) , org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity.class ) ) ; }
Source:
protected org.ovirt.engine.core.common.businessentities.VDSGroup setUpVDSGroup ( org.ovirt.engine.core.compat.Guid id ) { org.ovirt.engine.core.common.businessentities.VDSGroup cluster = control.createMock ( org.ovirt.engine.core.common.businessentities.VDSGroup.class ) ; org.easymock.EasyMock.expect ( cluster.getId ( ) ) . andReturn ( id ) . anyTimes ( ) ; org.easymock.EasyMock.expect ( cluster.getCompatibilityVersion ( ) ) . andReturn ( org.ovirt.engine.core.compat.Version.getLast ( ) ) . anyTimes ( ) ; return cluster ; }

Target:
protected org.ovirt.engine.core.common.businessentities.Cluster setUpCluster ( org.ovirt.engine.core.compat.Guid id ) { org.ovirt.engine.core.common.businessentities.Cluster cluster = control.createMock ( org.ovirt.engine.core.common.businessentities.Cluster.class ) ; org.easymock.EasyMock.expect ( cluster.getId ( ) ) . andReturn ( id ) . anyTimes ( ) ; org.easymock.EasyMock.expect ( cluster.getCompatibilityVersion ( ) ) . andReturn ( org.ovirt.engine.core.compat.Version.getLast ( ) ) . anyTimes ( ) ; return cluster ; }
Source:
public java.lang.String toString ( ) { return ( ( ( ( ( ( ( ( ( ( ( "NetworkAttachment [id=" + ( id ) ) + ", networkId=" ) + ( networkId ) ) + ", nicId=" ) + ( nicId ) ) + ", nicName=" ) + ( nicName ) ) + ", ipConfiguration=" ) + ( ipConfiguration ) ) + ", properties=" ) + ( properties ) ) + "]" ; }

Target:
public java.lang.String toString ( ) { return org.ovirt.engine.core.common.utils.ToStringBuilder.forInstance ( this ) . append ( "id" , getId ( ) ) . append ( "networkId" , getNetworkId ( ) ) . append ( "nicId" , getNicId ( ) ) . append ( "nicName" , getNicName ( ) ) . append ( "ipConfiguration" , getIpConfiguration ( ) ) . append ( "properties" , getProperties ( ) ) . append ( "overrideConfiguration" , isOverrideConfiguration ( ) ) . build ( ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.VDSGroup getVdsGroup ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VDSGroup > vdsGroups = parent.getVdsGroups ( ) ; for ( org.ovirt.engine.core.common.businessentities.VDSGroup entity : vdsGroups ) { if ( entity.getId ( ) . toString ( ) . equals ( id ) ) { return entity ; } } return null ; }

Target:
private org.ovirt.engine.core.common.businessentities.Cluster getCluster ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.Cluster > clusters = parent.getClusters ( ) ; for ( org.ovirt.engine.core.common.businessentities.Cluster entity : clusters ) { if ( entity.getId ( ) . toString ( ) . equals ( id ) ) { return entity ; } } return null ; }
Source:
public void updateCpuFlags ( org.ovirt.engine.core.compat.Guid id , java.lang.String cpuFlags ) { org.ovirt.engine.core.common.businessentities.VdsDynamic entity = get ( id ) ; entity.setCpuFlags ( cpuFlags ) ; update ( entity ) ; }

Target:
public void updateStatusAndReasons ( org.ovirt.engine.core.common.businessentities.VdsDynamic host ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getStatusSqlParameterSource ( host.getId ( ) , host.getStatus ( ) ) ; parameterSource.addValue ( "non_operational_reason" , host.getNonOperationalReason ( ) ) . addValue ( "maintenance_reason" , host.getMaintenanceReason ( ) ) ; getCallsHandler ( ) . executeModification ( "UpdateVdsDynamicStatusAndReasons" , parameterSource ) ; }
Source:
private void logProxySelection ( java.lang.String proxy , java.lang.String origin , java.lang.String command ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase logable = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; logable.addCustomValue ( "Proxy" , proxy ) ; logable.addCustomValue ( "Origin" , origin ) ; logable.addCustomValue ( "Command" , command ) ; logable.setVdsId ( _vds.getId ( ) ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.log ( logable , AuditLogType.PROXY_HOST_SELECTION ) ; org.ovirt.engine.core.bll.FenceExecutor.log.infoFormat ( "Using Host {0} from {1} as proxy to execute {2} command on Host {3}" , proxy , origin , command , _vds.getName ( ) ) ; }

Target:
public org.ovirt.engine.core.common.vdscommands.VDSFenceReturnValue checkStatus ( ) { org.ovirt.engine.core.common.vdscommands.VDSFenceReturnValue returnValue = null ; org.ovirt.engine.core.common.businessentities.VDS proxyHost = new org.ovirt.engine.core.bll.FenceProxyLocator ( _vds , fencingPolicy ) . findProxyHost ( false ) ; if ( proxyHost == null ) { returnValue = proxyNotFound ( ) ; } else { for ( org.ovirt.engine.core.common.businessentities.FenceAgent agent : _vds.getFenceAgents ( ) ) { returnValue = fence ( FenceActionType.Status , agent , proxyHost ) ; if ( returnValue.getSucceeded ( ) ) { returnValue.setProxyHostUsed ( proxyHost ) ; returnValue.setFenceAgentUsed ( agent ) ; break ; } } } return returnValue ; }
Source:
private void setUpGetEntityExpectations ( java.lang.Integer times ) throws java.lang.Exception { int i = 0 ; while ( ( times -- ) > 0 ) { setUpGetEntityExpectations ( VdcQueryType.GetVdsInterfacesByVdsId , org.ovirt.engine.core.common.queries.GetVdsByVdsIdParameters.class , new java.lang.String [ ] { "VdsId" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendHostNicsResourceTest.PARENT_GUID } , asList ( getModel ( i ) ) ) ; i += 1 ; } }

Target:
private void setUpGetEntityExpectations ( java.lang.Integer times ) throws java.lang.Exception { int i = 0 ; while ( ( times -- ) > 0 ) { setUpGetEntityExpectations ( VdcQueryType.GetVdsInterfacesByVdsId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendHostNicsResourceTest.PARENT_GUID } , asList ( getModel ( i ) ) ) ; i += 1 ; } }