auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private void assertValidationFailure ( org.ovirt.engine.core.bll.ValidationResult validationResult , org.ovirt.engine.core.common.errors.EngineMessage engineMessage ) { org.junit.Assert.assertFalse ( validationResult.isValid ( ) ) ; org.junit.Assert.assertTrue ( java.lang.String.format ( "Expected %s but got %s" , engineMessage.name ( ) , validationResult.getMessage ( ) . name ( ) ) , ( ( validationResult.getMessage ( ) ) == engineMessage ) ) ; }

Target:
private void assertValidationFailure ( org.ovirt.engine.core.bll.ValidationResult validationResult , org.ovirt.engine.core.common.errors.EngineMessage engineMessage ) { org.junit.Assert.assertThat ( validationResult , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( engineMessage ) ) ; }
Source:
protected org.ovirt.engine.core.common.businessentities.VM getVmWithoutConfiguration ( org.ovirt.engine.core.compat.Guid vmId , org.ovirt.engine.core.compat.Guid snapshotId ) { org.ovirt.engine.core.common.businessentities.VM vm = getVmDao ( ) . get ( vmId ) ; java.util.List < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > interfaces = getVmNetworkInterfaceDao ( ) . getAllForVm ( vm.getId ( ) ) ; vm.setInterfaces ( interfaces ) ; java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > disks = getDiskImageDao ( ) . getAllSnapshotsForVmSnapshot ( snapshotId ) ; vm.setImages ( new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ( disks ) ) ; for ( org.ovirt.engine.core.common.businessentities.DiskImage currDisk : disks ) { currDisk.setActive ( true ) ; } return vm ; }

Target:
protected org.ovirt.engine.core.common.businessentities.VM getVmWithoutConfiguration ( org.ovirt.engine.core.compat.Guid vmId , org.ovirt.engine.core.compat.Guid snapshotId ) { org.ovirt.engine.core.common.businessentities.VM vm = getVmDao ( ) . get ( vmId ) ; java.util.List < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > interfaces = getVmNetworkInterfaceDao ( ) . getAllForVm ( vm.getId ( ) ) ; vm.setInterfaces ( interfaces ) ; java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > disks = getDiskImageDao ( ) . getAllSnapshotsForVmSnapshot ( snapshotId ) ; vm.setImages ( new java.util.ArrayList ( disks ) ) ; for ( org.ovirt.engine.core.common.businessentities.storage.DiskImage currDisk : disks ) { currDisk.setActive ( true ) ; } return vm ; }
Source:
public static void isSoundcardEnabled ( 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 ) { if ( source != null ) { return ( ( ( java.util.List < java.lang.String > ) ( source ) ) . size ( ) ) > 0 ; } return false ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetSoundDevices , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }

Target:
public static void getTemplateDiskList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid templateId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmTemplatesDisks , new org.ovirt.engine.core.common.queries.IdQueryParameters ( templateId ) , aQuery ) ; }
Source:
public void testAddIscsiLunDiskIncompleteParametersConnectionTarget ( ) { org.ovirt.engine.api.model.Disk model = createIscsiLunDisk ( ) ; model.getLunStorage ( ) . getLogicalUnits ( ) . getLogicalUnits ( ) . get ( 0 ) . setTarget ( null ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; try { collection.add ( model ) ; org.junit.jupiter.api.Assertions.fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "LogicalUnit" , "testAddIscsiLunDiskIncompleteParametersConnectionTarget" , "target" ) ; } }

Target:
public void testAddIscsiLunDiskIncompleteParametersConnectionPort ( ) { org.ovirt.engine.api.model.Disk model = createIscsiLunDisk ( ) ; model.getLunStorage ( ) . getLogicalUnits ( ) . getLogicalUnits ( ) . get ( 0 ) . setPort ( null ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; verifyIncompleteException ( org.junit.jupiter.api.Assertions.assertThrows ( javax.ws.rs.WebApplicationException.class , ( ) -> org.ovirt.engine.api.restapi.resource.collection.add ( model ) ) , "LogicalUnit" , "lambda$testAddIscsiLunDiskIncompleteParametersConnectionPort$7" , "port" ) ; }
Source:
public void finishedJobsAreRemovedFromMemory ( ) { vmJobsMonitoring.process ( java.util.Collections.singletonMap ( org.ovirt.engine.core.vdsbroker.monitoring.VmJobsMonitoringTest.VM_ID_1 , java.util.Collections.emptyList ( ) ) ) ; org.junit.Assert.assertTrue ( vmJobsMonitoring.getExistingJobsForVm ( org.ovirt.engine.core.vdsbroker.monitoring.VmJobsMonitoringTest.VM_ID_1 ) . isEmpty ( ) ) ; org.junit.Assert.assertEquals ( 2 , vmJobsMonitoring.getExistingJobsForVm ( org.ovirt.engine.core.vdsbroker.monitoring.VmJobsMonitoringTest.VM_ID_2 ) . size ( ) ) ; }

Target:
public void finishedJobsAreRemovedFromMemory ( ) { vmJobsMonitoring.process ( java.util.Collections.singletonMap ( org.ovirt.engine.core.vdsbroker.monitoring.VmJobsMonitoringTest.VM_ID_1 , java.util.Collections.emptyList ( ) ) ) ; org.junit.jupiter.api.Assertions.assertTrue ( vmJobsMonitoring.getExistingJobsForVm ( org.ovirt.engine.core.vdsbroker.monitoring.VmJobsMonitoringTest.VM_ID_1 ) . isEmpty ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( 2 , vmJobsMonitoring.getExistingJobsForVm ( org.ovirt.engine.core.vdsbroker.monitoring.VmJobsMonitoringTest.VM_ID_2 ) . size ( ) ) ; }
Source:
protected javax.ws.rs.core.UriInfo setUpActionExpectations ( org.ovirt.engine.core.common.action.VdcActionType task , java.lang.Class < ? extends org.ovirt.engine.core.common.action.VdcActionParametersBase > clz , java.lang.String [ ] names , java.lang.Object [ ] values , boolean canDo , boolean success , java.lang.Object taskReturn , java.lang.String baseUri , boolean replay ) { return setUpActionExpectations ( task , clz , names , values , canDo , success , taskReturn , null , null , null , null , baseUri , replay , org.ovirt.engine.api.restapi.resource.AbstractBackendBaseTest.CANT_DO ) ; }

Target:
protected javax.ws.rs.core.UriInfo setUpActionExpectations ( org.ovirt.engine.core.common.action.VdcActionType task , java.lang.Class < ? extends org.ovirt.engine.core.common.action.VdcActionParametersBase > clz , java.lang.String [ ] names , java.lang.Object [ ] values , boolean valid , boolean success , java.lang.Object taskReturn , java.lang.String baseUri , boolean replay ) { return setUpActionExpectations ( task , clz , names , values , valid , success , taskReturn , null , null , null , null , baseUri , replay , org.ovirt.engine.api.restapi.resource.AbstractBackendBaseTest.CANT_DO ) ; }
Source:
public static org.ovirt.engine.core.compat.Guid lookupByStorageDomainId ( org.ovirt.engine.api.restapi.resource.BackendResource resource , org.ovirt.engine.core.compat.Guid storageDomainId ) { java.util.List < org.ovirt.engine.core.common.businessentities.StoragePool > dataCenters = resource.getBackendCollection ( org.ovirt.engine.core.common.businessentities.StoragePool.class , VdcQueryType.GetStoragePoolsByStorageDomainId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( storageDomainId ) ) ; if ( ( dataCenters != null ) && ( ! ( dataCenters.isEmpty ( ) ) ) ) { return dataCenters.get ( 0 ) . getId ( ) ; } return org.ovirt.engine.core.compat.Guid.Empty ; }

Target:
public static org.ovirt.engine.core.compat.Guid lookupByStorageDomainId ( org.ovirt.engine.api.restapi.resource.BackendResource resource , org.ovirt.engine.core.compat.Guid storageDomainId ) { java.util.List < org.ovirt.engine.core.common.businessentities.StoragePool > dataCenters = resource.getBackendCollection ( org.ovirt.engine.core.common.businessentities.StoragePool.class , QueryType.GetStoragePoolsByStorageDomainId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( storageDomainId ) ) ; if ( ( dataCenters != null ) && ( ! ( dataCenters.isEmpty ( ) ) ) ) { return dataCenters.get ( 0 ) . getId ( ) ; } return org.ovirt.engine.core.compat.Guid.Empty ; }
Source:
public void testChangeQuotaForDisk ( ) { org.ovirt.engine.core.common.businessentities.storage.ImageStorageDomainMap imageStorageDomainMap = dao.getAllByImageId ( org.ovirt.engine.core.dao.ImageStorageDomainMapDaoTest.EXISTING_IMAGE_ID ) . get ( 0 ) ; org.ovirt.engine.core.compat.Guid quotaId = imageStorageDomainMap.getQuotaId ( ) ; if ( quotaId.equals ( FixturesTool.DEFAULT_QUOTA_GENERAL ) ) { org.junit.jupiter.api.Assertions.fail ( "Same source and dest quota id, cannot perform test" ) ; } dao.updateQuotaForImageAndSnapshots ( FixturesTool.IMAGE_GROUP_ID , FixturesTool.STORAGE_DOMAIN_SCALE_SD5 , FixturesTool.DEFAULT_QUOTA_GENERAL ) ; imageStorageDomainMap = dao.getAllByImageId ( org.ovirt.engine.core.dao.ImageStorageDomainMapDaoTest.EXISTING_IMAGE_ID ) . get ( 0 ) ; quotaId = imageStorageDomainMap.getQuotaId ( ) ; org.junit.jupiter.api.Assertions.assertEquals ( FixturesTool.DEFAULT_QUOTA_GENERAL , quotaId , "quota wasn't changed" ) ; }

Target:
public void testChangeQuotaForDisk ( ) { org.ovirt.engine.core.common.businessentities.storage.ImageStorageDomainMap imageStorageDomainMap = dao.getAllByImageId ( org.ovirt.engine.core.dao.ImageStorageDomainMapDaoTest.EXISTING_IMAGE_ID ) . get ( 0 ) ; org.ovirt.engine.core.compat.Guid quotaId = imageStorageDomainMap.getQuotaId ( ) ; org.junit.jupiter.api.Assertions.assertNotEquals ( FixturesTool.DEFAULT_QUOTA_GENERAL , quotaId , "Same source and dest quota id, cannot perform test" ) ; dao.updateQuotaForImageAndSnapshots ( FixturesTool.IMAGE_GROUP_ID , FixturesTool.STORAGE_DOMAIN_SCALE_SD5 , FixturesTool.DEFAULT_QUOTA_GENERAL ) ; imageStorageDomainMap = dao.getAllByImageId ( org.ovirt.engine.core.dao.ImageStorageDomainMapDaoTest.EXISTING_IMAGE_ID ) . get ( 0 ) ; quotaId = imageStorageDomainMap.getQuotaId ( ) ; org.junit.jupiter.api.Assertions.assertEquals ( FixturesTool.DEFAULT_QUOTA_GENERAL , quotaId , "quota wasn't changed" ) ; }
Source:
protected void ExecuteVmCommand ( ) { if ( diskShouldBeUnPlugged ( ) ) { performPlugCommnad ( VDSCommandType.HotUnPlugDisk , disk , vmDevice ) ; } org.ovirt.engine.core.bll.DetachDiskFromVmCommand.getVmDeviceDao ( ) . remove ( vmDevice.getId ( ) ) ; org.ovirt.engine.core.bll.VmHandler.updateDisksFromDb ( org.ovirt.engine.core.bll.DetachDiskFromVmCommand.getVm ( ) ) ; org.ovirt.engine.core.bll.utils.VmDeviceUtils.updateBootOrderInVmDevice ( org.ovirt.engine.core.bll.DetachDiskFromVmCommand.getVm ( ) . getStaticData ( ) ) ; org.ovirt.engine.core.bll.DetachDiskFromVmCommand.setSucceeded ( true ) ; }

Target:
protected void executeVmCommand ( ) { if ( diskShouldBeUnPlugged ( ) ) { performPlugCommnad ( VDSCommandType.HotUnPlugDisk , disk , vmDevice ) ; } org.ovirt.engine.core.bll.DetachDiskFromVmCommand.getVmDeviceDao ( ) . remove ( vmDevice.getId ( ) ) ; org.ovirt.engine.core.bll.VmHandler.updateDisksFromDb ( org.ovirt.engine.core.bll.DetachDiskFromVmCommand.getVm ( ) ) ; org.ovirt.engine.core.bll.utils.VmDeviceUtils.updateBootOrderInVmDeviceAndStoreToDB ( org.ovirt.engine.core.bll.DetachDiskFromVmCommand.getVm ( ) . getStaticData ( ) ) ; org.ovirt.engine.core.bll.DetachDiskFromVmCommand.setSucceeded ( true ) ; }
Source:
protected java.lang.String getHiddenColumnWidthKey ( com.google.gwt.user.cellview.client.Column < T , ? > column ) { if ( columnResizePersistenceEnabled ) { return ( ( ( ( ( ( org.ovirt.engine.ui.common.widget.table.ColumnResizeCellTable.GRID_HIDDEN ) + "_" ) + ( org.ovirt.engine.ui.common.widget.table.ColumnResizeCellTable.GRID_COLUMN_WIDTH_PREFIX ) ) + "_" ) + ( getGridElementId ( ) ) ) + "_" ) + ( determineOriginalIndex ( getColumnIndex ( column ) ) ) ; } return null ; }

Target:
protected java.lang.String getColumnWidthKey ( com.google.gwt.user.cellview.client.Column < T , ? > column ) { if ( columnResizePersistenceEnabled ) { return ( ( ( ( org.ovirt.engine.ui.common.widget.table.ColumnResizeCellTable.GRID_COLUMN_WIDTH_PREFIX ) + "_" ) + ( getGridElementId ( ) ) ) + "_" ) + ( getColumnIndex ( column ) ) ; } return null ; }
Source:
public void update ( int index , org.ovirt.engine.core.common.businessentities.DiskImage disk , java.lang.String value ) { org.ovirt.engine.core.common.businessentities.Quota quota = registerEntityModel.getQuotaByName ( value , ( ( java.util.List < org.ovirt.engine.core.common.businessentities.Quota > ) ( registerEntityModel.getStorageQuota ( ) . getItems ( ) ) ) ) ; registerEntityModel.getDiskQuotaMap ( ) . getEntity ( ) . put ( disk.getId ( ) , quota ) ; }

Target:
public void update ( int index , org.ovirt.engine.core.common.businessentities.storage.DiskImage disk , java.lang.String value ) { org.ovirt.engine.core.common.businessentities.Quota quota = registerEntityModel.getQuotaByName ( value , ( ( java.util.List < org.ovirt.engine.core.common.businessentities.Quota > ) ( registerEntityModel.getStorageQuota ( ) . getItems ( ) ) ) ) ; registerEntityModel.getDiskQuotaMap ( ) . getEntity ( ) . put ( disk.getId ( ) , quota ) ; }
Source:
private static org.ovirt.engine.core.common.asynctasks.AsyncTaskCreationInfo nextAsyncTaskCreationInfo ( ) { org.ovirt.engine.core.common.asynctasks.AsyncTaskCreationInfo info = new org.ovirt.engine.core.common.asynctasks.AsyncTaskCreationInfo ( ) ; info.setStepId ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; info.setStoragePoolID ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; info.setVdsmTaskId ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; info.setTaskType ( org.ovirt.engine.core.utils.RandomUtils.instance ( ) . nextEnum ( org.ovirt.engine.core.common.asynctasks.AsyncTaskType.class ) ) ; return info ; }

Target:
private static org.ovirt.engine.core.common.asynctasks.AsyncTaskCreationInfo nextAsyncTaskCreationInfo ( ) { org.ovirt.engine.core.common.asynctasks.AsyncTaskCreationInfo info = new org.ovirt.engine.core.common.asynctasks.AsyncTaskCreationInfo ( ) ; info.setStepId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; info.setStoragePoolID ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; info.setVdsmTaskId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; info.setTaskType ( org.ovirt.engine.core.utils.RandomUtils.instance ( ) . nextEnum ( org.ovirt.engine.core.common.asynctasks.AsyncTaskType.class ) ) ; return info ; }
Source:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; dao = dbFacade.getLunDao ( ) ; existingLUN = dao.get ( "1IET_00180001" ) ; newLUN = new org.ovirt.engine.core.common.businessentities.LUNs ( ) ; newLUN.setLUN_id ( "oicu812" ) ; newLUN.setvolume_group_id ( "" ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; dao = dbFacade.getLunDao ( ) ; existingLUN = dao.get ( "1IET_00180001" ) ; newLUN = new org.ovirt.engine.core.common.businessentities.storage.LUNs ( ) ; newLUN.setLUN_id ( "oicu812" ) ; newLUN.setvolume_group_id ( "" ) ; }
Source:
public static void handleCredentials ( javax.servlet.http.HttpServletRequest request , org.ovirt.engine.core.sso.utils.Credentials credentials ) throws java.lang.Exception { org.ovirt.engine.core.sso.utils.AuthenticationUtils.log.debug ( "Entered AuthenticationUtils.handleCredentials" ) ; if ( ( org.apache.commons.lang.StringUtils.isEmpty ( credentials.getUsername ( ) ) ) || ( org.apache.commons.lang.StringUtils.isEmpty ( credentials.getProfile ( ) ) ) ) { throw new org.ovirt.engine.core.sso.utils.AuthenticationException ( "Please provide username, password and profile." ) ; } org.ovirt.engine.core.sso.utils.AuthenticationUtils.login ( request , credentials , null ) ; }

Target:
public static void handleCredentials ( javax.servlet.http.HttpServletRequest request , org.ovirt.engine.core.sso.utils.Credentials credentials ) throws java.lang.Exception { org.ovirt.engine.core.sso.utils.AuthenticationUtils.log.debug ( "Entered AuthenticationUtils.handleCredentials" ) ; if ( ( org.apache.commons.lang.StringUtils.isEmpty ( credentials.getUsername ( ) ) ) || ( org.apache.commons.lang.StringUtils.isEmpty ( credentials.getProfile ( ) ) ) ) { throw new org.ovirt.engine.core.sso.utils.AuthenticationException ( "Please provide username, password and profile." ) ; } org.ovirt.engine.core.sso.utils.SSOSession ssoSession = org.ovirt.engine.core.sso.utils.AuthenticationUtils.login ( request , credentials , null ) ; org.ovirt.engine.core.sso.utils.AuthenticationUtils.log.info ( "User {}@{} successfully logged in with scopes: {}" , credentials.getUsername ( ) , credentials.getProfile ( ) , ssoSession.getScope ( ) ) ; }
Source:
protected void executeQueryCommand ( ) { org.ovirt.engine.core.common.businessentities.VmTemplate vmt ; vmt = vmTemplateDao.getTemplateWithLatestVersionInChain ( org.ovirt.engine.core.bll.GetLatestTemplateInChainQuery.getParameters ( ) . getId ( ) ) ; if ( vmt != null ) { org.ovirt.engine.core.bll.VmTemplateHandler.updateDisksFromDb ( vmt ) ; vmHandler.updateVmInitFromDB ( vmt , true ) ; } org.ovirt.engine.core.bll.GetLatestTemplateInChainQuery.getQueryReturnValue ( ) . setReturnValue ( vmt ) ; }

Target:
protected void executeQueryCommand ( ) { org.ovirt.engine.core.common.businessentities.VmTemplate vmt ; vmt = vmTemplateDao.getTemplateWithLatestVersionInChain ( org.ovirt.engine.core.bll.GetLatestTemplateInChainQuery.getParameters ( ) . getId ( ) ) ; if ( vmt != null ) { vmTemplateHandler.updateDisksFromDb ( vmt ) ; vmHandler.updateVmInitFromDB ( vmt , true ) ; } org.ovirt.engine.core.bll.GetLatestTemplateInChainQuery.getQueryReturnValue ( ) . setReturnValue ( vmt ) ; }
Source:
private void moveVMsToUnknown ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VM > vmList = getVmsToMoveToUnknown ( ) ; for ( org.ovirt.engine.core.common.businessentities.VM vm : vmList ) { destroyVmOnDestination ( vm ) ; org.ovirt.engine.core.vdsbroker.ResourceManager.getInstance ( ) . runVdsCommand ( VDSCommandType.SetVmStatus , new org.ovirt.engine.core.common.vdscommands.SetVmStatusVDSCommandParameters ( vm.getId ( ) , org.ovirt.engine.core.common.businessentities.VMStatus.Unknown ) ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase logable = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; logable.setVmId ( vm.getId ( ) ) ; auditLogDirector.log ( logable , AuditLogType.VM_SET_TO_UNKNOWN_STATUS ) ; } }

Target:
private void moveVMsToUnknown ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VM > vmList = getVmsToMoveToUnknown ( ) ; for ( org.ovirt.engine.core.common.businessentities.VM vm : vmList ) { destroyVmOnDestination ( vm ) ; resourceManager.runVdsCommand ( VDSCommandType.SetVmStatus , new org.ovirt.engine.core.common.vdscommands.SetVmStatusVDSCommandParameters ( vm.getId ( ) , org.ovirt.engine.core.common.businessentities.VMStatus.Unknown ) ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase logable = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; logable.setVmId ( vm.getId ( ) ) ; auditLogDirector.log ( logable , AuditLogType.VM_SET_TO_UNKNOWN_STATUS ) ; } }
Source:
public void OnSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.templates.TemplateListModel templateListModel = ( ( org.ovirt.engine.ui.uicommonweb.models.templates.TemplateListModel ) ( target ) ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage_domains > storageDomains = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage_domains > ) ( returnValue ) ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage_domains > filteredStorageDomains = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage_domains > ( ) ; for ( org.ovirt.engine.core.common.businessentities.storage_domains a : storageDomains ) { if ( ( a.getstorage_domain_type ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageDomainType.ImportExport ) ) { filteredStorageDomains.add ( a ) ; } } templateListModel.PostExportGetStorageDomainList ( filteredStorageDomains ) ; }

Target:
protected java.lang.String entityResideOnSeveralDCsMakeSureTheExportedVMResideOnSameDcMsg ( ) { return org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getConstants ( ) . templatesResideOnSeveralDcsMakeSureExportedTemplatesResideOnSameDcMsg ( ) ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult isStorageDomainFormatCorrectForDC ( ) { if ( isStorageDomainOfTypeIsoOrExport ( ) ) { return org.ovirt.engine.core.bll.ValidationResult.VALID ; } if ( ( storagePool ) != null ) { if ( ( org.ovirt.engine.core.common.utils.VersionStorageFormatUtil.getPreferredForVersion ( storagePool.getCompatibilityVersion ( ) , storageDomainStatic.getStorageType ( ) ) . compareTo ( storageDomainStatic.getStorageFormat ( ) ) ) < 0 ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_DOMAIN_FORMAT_ILLEGAL , java.lang.String.format ( "$storageFormat %1$s" , storageDomainStatic.getStorageFormat ( ) . toString ( ) ) ) ; } } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult isStorageDomainFormatCorrectForDC ( ) { if ( isStorageDomainOfTypeIsoOrExport ( ) ) { return org.ovirt.engine.core.bll.ValidationResult.VALID ; } if ( ( storagePool ) != null ) { if ( ( org.ovirt.engine.core.common.utils.VersionStorageFormatUtil.getPreferredForVersion ( storagePool.getCompatibilityVersion ( ) , storageDomainStatic.getStorageType ( ) ) . compareTo ( storageDomainStatic.getStorageFormat ( ) ) ) < 0 ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_STORAGE_DOMAIN_FORMAT_ILLEGAL , java.lang.String.format ( "$storageFormat %1$s" , storageDomainStatic.getStorageFormat ( ) . toString ( ) ) ) ; } } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }
Source:
public void testUpdateShceduleByVolumeId ( ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeSnapshotSchedule schedule = dao.getByVolumeId ( org.ovirt.engine.core.dao.gluster.GlusterVolumeSnapshotScheduleDaoTest.VOLUME_ID_1 ) ; schedule.setRecurrence ( GlusterVolumeSnapshotScheduleRecurrence.HOURLY ) ; schedule.setStartDate ( new java.util.Date ( ) ) ; schedule.setInterval ( 0 ) ; dao.updateScheduleByVolumeId ( org.ovirt.engine.core.dao.gluster.GlusterVolumeSnapshotScheduleDaoTest.VOLUME_ID_1 , schedule ) ; org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeSnapshotSchedule fetchedSchedule = dao.getByVolumeId ( org.ovirt.engine.core.dao.gluster.GlusterVolumeSnapshotScheduleDaoTest.VOLUME_ID_1 ) ; org.junit.Assert.assertNotNull ( fetchedSchedule ) ; org.junit.Assert.assertEquals ( fetchedSchedule , schedule ) ; }

Target:
public void testUpdateShceduleByVolumeId ( ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeSnapshotSchedule schedule = dao.getByVolumeId ( org.ovirt.engine.core.dao.gluster.GlusterVolumeSnapshotScheduleDaoTest.VOLUME_ID_1 ) ; schedule.setRecurrence ( GlusterVolumeSnapshotScheduleRecurrence.HOURLY ) ; schedule.setStartDate ( new java.util.Date ( ) ) ; schedule.setInterval ( 0 ) ; dao.updateScheduleByVolumeId ( org.ovirt.engine.core.dao.gluster.GlusterVolumeSnapshotScheduleDaoTest.VOLUME_ID_1 , schedule ) ; org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeSnapshotSchedule fetchedSchedule = dao.getByVolumeId ( org.ovirt.engine.core.dao.gluster.GlusterVolumeSnapshotScheduleDaoTest.VOLUME_ID_1 ) ; org.junit.jupiter.api.Assertions.assertNotNull ( fetchedSchedule ) ; org.junit.jupiter.api.Assertions.assertEquals ( fetchedSchedule , schedule ) ; }
Source:
protected org.ovirt.engine.core.common.vdscommands.VDSReturnValue mergeSnapshots ( org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.compat.Guid storageDomainId ) { org.ovirt.engine.core.common.vdscommands.MergeSnapshotsVDSCommandParameters params = new org.ovirt.engine.core.common.vdscommands.MergeSnapshotsVDSCommandParameters ( storagePoolId , storageDomainId , org.ovirt.engine.core.bll.RemoveSnapshotSingleDiskCommand.getVmId ( ) , org.ovirt.engine.core.bll.RemoveSnapshotSingleDiskCommand.getDiskImage ( ) . getId ( ) , org.ovirt.engine.core.bll.RemoveSnapshotSingleDiskCommand.getDiskImage ( ) . getImageId ( ) , org.ovirt.engine.core.bll.RemoveSnapshotSingleDiskCommand.getDestinationDiskImage ( ) . getImageId ( ) , org.ovirt.engine.core.bll.RemoveSnapshotSingleDiskCommand.getDiskImage ( ) . isWipeAfterDelete ( ) ) ; return runVdsCommand ( VDSCommandType.MergeSnapshots , org.ovirt.engine.core.bll.storage.PostZeroHandler.fixParametersWithPostZero ( params ) ) ; }

Target:
protected org.ovirt.engine.core.common.vdscommands.VDSReturnValue mergeSnapshots ( org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.compat.Guid storageDomainId ) { org.ovirt.engine.core.common.vdscommands.MergeSnapshotsVDSCommandParameters params = new org.ovirt.engine.core.common.vdscommands.MergeSnapshotsVDSCommandParameters ( storagePoolId , storageDomainId , org.ovirt.engine.core.bll.RemoveSnapshotSingleDiskCommand.getVmId ( ) , org.ovirt.engine.core.bll.RemoveSnapshotSingleDiskCommand.getDiskImage ( ) . getId ( ) , org.ovirt.engine.core.bll.RemoveSnapshotSingleDiskCommand.getDiskImage ( ) . getImageId ( ) , org.ovirt.engine.core.bll.RemoveSnapshotSingleDiskCommand.getDestinationDiskImage ( ) . getImageId ( ) , org.ovirt.engine.core.bll.RemoveSnapshotSingleDiskCommand.getDiskImage ( ) . isWipeAfterDelete ( ) ) ; return runVdsCommand ( VDSCommandType.MergeSnapshots , org.ovirt.engine.core.bll.storage.domain.PostZeroHandler.fixParametersWithPostZero ( params ) ) ; }
Source:
private boolean isRunningConfigurationNeeded ( ) { return ( org.ovirt.engine.core.bll.UpdateVmCommand.getVm ( ) . isNextRunConfigurationExists ( ) ) || ( ! ( org.ovirt.engine.core.bll.VmHandler.isUpdateValid ( org.ovirt.engine.core.bll.UpdateVmCommand.getVm ( ) . getStaticData ( ) , org.ovirt.engine.core.bll.UpdateVmCommand.getParameters ( ) . getVmStaticData ( ) , org.ovirt.engine.core.bll.UpdateVmCommand.getVm ( ) . getStatus ( ) ) ) ) ; }

Target:
private boolean isRunningConfigurationNeeded ( ) { return ( ( org.ovirt.engine.core.bll.UpdateVmCommand.getVm ( ) . isNextRunConfigurationExists ( ) ) || ( ! ( org.ovirt.engine.core.bll.VmHandler.isUpdateValid ( org.ovirt.engine.core.bll.UpdateVmCommand.getVm ( ) . getStaticData ( ) , org.ovirt.engine.core.bll.UpdateVmCommand.getParameters ( ) . getVmStaticData ( ) , org.ovirt.engine.core.bll.UpdateVmCommand.getVm ( ) . getStatus ( ) , isHotSetEnabled ( ) ) ) ) ) || ( ! ( org.ovirt.engine.core.bll.VmHandler.isUpdateValidForVmDevices ( getVmId ( ) , org.ovirt.engine.core.bll.UpdateVmCommand.getVm ( ) . getStatus ( ) , org.ovirt.engine.core.bll.UpdateVmCommand.getParameters ( ) ) ) ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc migrateStatus ( java.lang.String vmId ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.migrateStatus ( vmId ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc glusterVolumeGeoRepSessionCreate ( java.lang.String volumeName , java.lang.String remoteHost , java.lang.String remoteVolumeName , java.lang.String userName , java.lang.Boolean force ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.glusterVolumeGeoRepSessionCreate ( volumeName , remoteHost , remoteVolumeName , userName , force ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
public void OnSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.VmGuideModel vmGuideModel = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.VmGuideModel ) ( target ) ) ; org.ovirt.engine.core.common.businessentities.storage_pool dataCenter = ( ( org.ovirt.engine.core.common.businessentities.storage_pool ) ( returnValue ) ) ; vmGuideModel.quotaEnforcementType = ( dataCenter != null ) ? dataCenter.getQuotaEnforcementType ( ) : org.ovirt.engine.core.common.businessentities.QuotaEnforcementTypeEnum.DISABLED ; vmGuideModel.AddDiskPostData ( ) ; }

Target:
public void OnSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.VmGuideModel vmGuideModel = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.VmGuideModel ) ( target ) ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > disks = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ) ( returnValue ) ) ; vmGuideModel.disks = disks ; vmGuideModel.AddDiskPostData ( ) ; }
Source:
public final java.lang.String consoleClientResourcesUrl ( ) { return getString ( org.ovirt.engine.ui.common.utils.DynamicMessages.DynamicMessageKey.CONSOLE_CLIENT_RESOURCES_URL ) ; }

Target:
public final java.lang.String consoleClientResourcesUrl ( ) { java.lang.String url = getString ( org.ovirt.engine.ui.common.utils.DynamicMessages.DynamicMessageKey.CONSOLE_CLIENT_RESOURCES_URL ) ; boolean isAbsolute = ( com.google.gwt.safehtml.shared.UriUtils.extractScheme ( url ) ) != null ; return isAbsolute ? url : ( "/" + ( org.ovirt.engine.ui.frontend.utils.BaseContextPathData.getInstance ( ) . getRelativePath ( ) ) ) + url ; }
Source:
public void run ( ) { for ( org.ovirt.engine.core.compat.Guid vmId : vmIds ) { org.ovirt.engine.core.bll.Backend.getInstance ( ) . runInternalAction ( VdcActionType.ProcessDownVm , new org.ovirt.engine.core.common.action.ProcessDownVmParameters ( vmId , true ) ) ; } org.ovirt.engine.core.bll.hostdev.HostDeviceManager hostDeviceManager = org.ovirt.engine.core.di.Injector.get ( org.ovirt.engine.core.bll.hostdev.HostDeviceManager.class ) ; hostDeviceManager.refreshHostIfAnyVmHasHostDevices ( vmIds , hostId ) ; }

Target:
public void run ( ) { for ( org.ovirt.engine.core.compat.Guid vmId : vmIds ) { backend.runInternalAction ( VdcActionType.ProcessDownVm , new org.ovirt.engine.core.common.action.ProcessDownVmParameters ( vmId , true ) ) ; } org.ovirt.engine.core.bll.hostdev.HostDeviceManager hostDeviceManager = org.ovirt.engine.core.di.Injector.get ( org.ovirt.engine.core.bll.hostdev.HostDeviceManager.class ) ; hostDeviceManager.refreshHostIfAnyVmHasHostDevices ( vmIds , hostId ) ; }
Source:
protected void setUpGetEntityExpectations ( int times , org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface entity ) throws java.lang.Exception { while ( ( times -- ) > 0 ) { setUpGetEntityExpectations ( VdcQueryType.GetVmInterfacesByVmId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendVmNicResourceTest.VM_ID } , entity ) ; } }

Target:
protected void setUpGetEntityExpectations ( int times , org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface entity ) throws java.lang.Exception { while ( ( times -- ) > 0 ) { setUpGetEntityExpectations ( QueryType.GetVmInterfacesByVmId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendVmNicResourceTest.VM_ID } , entity ) ; } }
Source:
private org.ovirt.engine.core.bll.interfaces.BackendCommandObjectsHandler getBackendCommandObjectsHandler ( ) { try { javax.naming.InitialContext ctx = new javax.naming.InitialContext ( ) ; return ( ( org.ovirt.engine.core.bll.interfaces.BackendCommandObjectsHandler ) ( ctx.lookup ( org.ovirt.engine.core.bll.tasks.CommandExecutor.BACKEND_COMMAND_OBJECTS_HANDLER_JNDI_NAME ) ) ) ; } catch ( javax.naming.NamingException e ) { org.ovirt.engine.core.bll.tasks.CommandExecutor.log.error ( ( "Getting backend command objects handler failed" + ( e.getMessage ( ) ) ) ) ; org.ovirt.engine.core.bll.tasks.CommandExecutor.log.debug ( "" , e ) ; return null ; } }

Target:
private void clearCompletedCommands ( ) { for ( org.ovirt.engine.core.compat.Guid cmdId : cmdCallBackMap.keySet ( ) ) { if ( ( CommandStatus.SUCCEEDED.equals ( coco.getCommandStatus ( cmdId ) ) ) || ( CommandStatus.FAILED.equals ( coco.getCommandStatus ( cmdId ) ) ) ) { cmdCallBackMap.remove ( cmdId ) ; } } }
Source:
protected boolean canDoAction ( ) { org.ovirt.engine.core.bll.validator.VnicProfileValidator validator = new org.ovirt.engine.core.bll.validator.VnicProfileValidator ( org.ovirt.engine.core.bll.network.vm.RemoveVnicProfileCommand.getVnicProfile ( ) ) ; return ( ( ( validate ( validator.vnicProfileIsSet ( ) ) ) && ( validate ( validator.vnicProfileExists ( ) ) ) ) && ( validate ( validator.vnicProfileNotUsedByVms ( ) ) ) ) && ( validate ( validator.vnicProfileNotUsedByTemplates ( ) ) ) ; }

Target:
protected boolean canDoAction ( ) { org.ovirt.engine.core.bll.validator.VnicProfileValidator validator = new org.ovirt.engine.core.bll.validator.VnicProfileValidator ( vmDao , org.ovirt.engine.core.bll.network.vm.RemoveVnicProfileCommand.getVnicProfile ( ) ) ; return ( ( ( validate ( validator.vnicProfileIsSet ( ) ) ) && ( validate ( validator.vnicProfileExists ( ) ) ) ) && ( validate ( validator.vnicProfileNotUsedByVms ( ) ) ) ) && ( validate ( validator.vnicProfileNotUsedByTemplates ( ) ) ) ; }
Source:
public void testGetVmTemplatesByIds ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmTemplate > result = dao.getVmTemplatesByIds ( java.util.Arrays.asList ( FixturesTool.VM_TEMPLATE_RHEL5 , FixturesTool.VM_TEMPLATE_RHEL5_2 ) ) ; org.junit.Assert.assertEquals ( "loaded templates list isn't in the expected size" , 2 , result.size ( ) ) ; java.util.Collection < org.ovirt.engine.core.compat.Guid > recieved = result.stream ( ) . map ( VmTemplate :: getId ) . collect ( java.util.stream.Collectors.toList ( ) ) ; org.junit.Assert.assertTrue ( "the received list didn't contain an expected Template" , recieved.contains ( FixturesTool.VM_TEMPLATE_RHEL5 ) ) ; org.junit.Assert.assertTrue ( "the received list didn't contain an expected Template" , recieved.contains ( FixturesTool.VM_TEMPLATE_RHEL5_2 ) ) ; }

Target:
public void testGetVmTemplatesByIds ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmTemplate > result = dao.getVmTemplatesByIds ( java.util.Arrays.asList ( FixturesTool.VM_TEMPLATE_RHEL5 , FixturesTool.VM_TEMPLATE_RHEL5_2 ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( 2 , result.size ( ) , "loaded templates list isn't in the expected size" ) ; java.util.Collection < org.ovirt.engine.core.compat.Guid > recieved = result.stream ( ) . map ( VmTemplate :: getId ) . collect ( java.util.stream.Collectors.toList ( ) ) ; org.junit.jupiter.api.Assertions.assertTrue ( recieved.contains ( FixturesTool.VM_TEMPLATE_RHEL5 ) , "the received list didn't contain an expected Template" ) ; org.junit.jupiter.api.Assertions.assertTrue ( recieved.contains ( FixturesTool.VM_TEMPLATE_RHEL5_2 ) , "the received list didn't contain an expected Template" ) ; }
Source:
private java.util.List < org.ovirt.engine.core.common.businessentities.VM > getVmsToMoveToUnknown ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VM > vmList = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmDao ( ) . getAllRunningForVds ( getVdsId ( ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VM > migratingVms = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmDao ( ) . getAllMigratingToHost ( getVdsId ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.VM incomingVm : migratingVms ) { if ( ( incomingVm.getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.MigratingTo ) ) { vmList.add ( incomingVm ) ; } } return vmList ; }

Target:
private java.util.List < org.ovirt.engine.core.common.businessentities.VM > getVmsToMoveToUnknown ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VM > vmList = dbFacade.getVmDao ( ) . getAllRunningForVds ( getVdsId ( ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VM > migratingVms = dbFacade.getVmDao ( ) . getAllMigratingToHost ( getVdsId ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.VM incomingVm : migratingVms ) { if ( ( incomingVm.getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.MigratingTo ) ) { vmList.add ( incomingVm ) ; } } return vmList ; }
Source:
public void testFileLinks ( ) { org.ovirt.engine.api.model.File file = new org.ovirt.engine.api.model.File ( ) ; file.setId ( org.ovirt.engine.api.restapi.util.LinkHelperTest.FILE_ID ) ; file.setStorageDomain ( new org.ovirt.engine.api.model.StorageDomain ( ) ) ; file.getStorageDomain ( ) . setId ( org.ovirt.engine.api.restapi.util.LinkHelperTest.STORAGE_DOMAIN_ID ) ; org.ovirt.engine.api.restapi.util.LinkHelper.addLinks ( file ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.api.restapi.util.LinkHelperTest.FILE_HREF , file.getHref ( ) ) ; }

Target:
public void testFileLinks ( ) { org.ovirt.engine.api.model.File file = new org.ovirt.engine.api.model.File ( ) ; file.setId ( org.ovirt.engine.api.restapi.util.LinkHelperTest.FILE_ID ) ; file.setStorageDomain ( new org.ovirt.engine.api.model.StorageDomain ( ) ) ; file.getStorageDomain ( ) . setId ( org.ovirt.engine.api.restapi.util.LinkHelperTest.STORAGE_DOMAIN_ID ) ; org.ovirt.engine.api.restapi.util.LinkHelper.addLinks ( file ) ; org.junit.jupiter.api.Assertions.assertEquals ( org.ovirt.engine.api.restapi.util.LinkHelperTest.FILE_HREF , file.getHref ( ) ) ; }
Source:
private void initCheckBoxEditors ( ) { importGlusterConfigurationEditor = new org.ovirt.engine.ui.common.widget.editor.generic.EntityModelCheckBoxEditor ( org.ovirt.engine.ui.common.widget.Align.RIGHT ) ; countThreadsAsCoresEditor = new org.ovirt.engine.ui.common.widget.editor.generic.EntityModelCheckBoxEditor ( org.ovirt.engine.ui.common.widget.Align.RIGHT ) ; enableTrustedServiceEditor = new org.ovirt.engine.ui.common.widget.editor.generic.EntityModelCheckBoxEditor ( org.ovirt.engine.ui.common.widget.Align.RIGHT ) ; enableHaReservationEditor = new org.ovirt.engine.ui.common.widget.editor.generic.EntityModelCheckBoxEditor ( org.ovirt.engine.ui.common.widget.Align.RIGHT ) ; enableKsm = new org.ovirt.engine.ui.common.widget.editor.generic.EntityModelCheckBoxEditor ( org.ovirt.engine.ui.common.widget.Align.RIGHT ) ; enableKsm.getContentWidgetContainer ( ) . setWidth ( "350px" ) ; enableBallooning = new org.ovirt.engine.ui.common.widget.editor.generic.EntityModelCheckBoxEditor ( org.ovirt.engine.ui.common.widget.Align.RIGHT ) ; enableBallooning.getContentWidgetContainer ( ) . setWidth ( "350px" ) ; }

Target:
private void initCheckBoxEditors ( ) { importGlusterConfigurationEditor = new org.ovirt.engine.ui.common.widget.editor.generic.EntityModelCheckBoxEditor ( org.ovirt.engine.ui.common.widget.Align.RIGHT ) ; countThreadsAsCoresEditor = new org.ovirt.engine.ui.common.widget.editor.generic.EntityModelCheckBoxEditor ( org.ovirt.engine.ui.common.widget.Align.RIGHT ) ; enableTrustedServiceEditor = new org.ovirt.engine.ui.common.widget.editor.generic.EntityModelCheckBoxEditor ( org.ovirt.engine.ui.common.widget.Align.RIGHT ) ; enableHaReservationEditor = new org.ovirt.engine.ui.common.widget.editor.generic.EntityModelCheckBoxEditor ( org.ovirt.engine.ui.common.widget.Align.RIGHT ) ; enableOptionalReasonEditor = new org.ovirt.engine.ui.common.widget.editor.generic.EntityModelCheckBoxEditor ( org.ovirt.engine.ui.common.widget.Align.RIGHT ) ; enableKsm = new org.ovirt.engine.ui.common.widget.editor.generic.EntityModelCheckBoxEditor ( org.ovirt.engine.ui.common.widget.Align.RIGHT ) ; enableKsm.getContentWidgetContainer ( ) . setWidth ( "350px" ) ; enableBallooning = new org.ovirt.engine.ui.common.widget.editor.generic.EntityModelCheckBoxEditor ( org.ovirt.engine.ui.common.widget.Align.RIGHT ) ; enableBallooning.getContentWidgetContainer ( ) . setWidth ( "350px" ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeGeoRepStatusForXmlRpc glusterVolumeGeoRepStatus ( java.lang.String volumeName ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "GlusterVolume.geoRepStatus" ) . withParameter ( "volName" , volumeName ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) . withIgnoreResponseKey ( ) ; return new org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeGeoRepStatusForXmlRpc ( response ) ; }

Target:
public org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeGeoRepStatusForXmlRpc glusterVolumeGeoRepSessionList ( ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "GlusterVolume.geoRepSessionList" ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) . withIgnoreResponseKey ( ) ; return new org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeGeoRepStatusForXmlRpc ( response ) ; }
Source:
public void getClusterUnsupportedVmsCpus ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vdsGroupId , java.lang.String newCpuName ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { return source ; } return new java.util.HashMap ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetClusterUnsupportedVmsCpus , new org.ovirt.engine.core.common.queries.GetClusterUnsupportedVmsCpusParameters ( vdsGroupId , newCpuName ) , aQuery ) ; }

Target:
public void getVmFromOva ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vdsId , java.lang.String path ) { aQuery.setHandleFailure ( true ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmFromOva , new org.ovirt.engine.core.common.queries.GetVmFromOvaQueryParameters ( vdsId , path ) , aQuery ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc refreshStoragePool ( java.lang.String spUUID , java.lang.String msdUUID , int masterVersion ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.refreshStoragePool ( spUUID , msdUUID , masterVersion ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc snapshot ( java.lang.String vmId , java.util.Map < java.lang.String , java.lang.String > [ ] disks , java.lang.String memory , boolean frozen ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.snapshot ( vmId , disks , memory , frozen ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
public void testSubscribe ( ) { dao.subscribe ( newSubscription ) ; java.util.List < org.ovirt.engine.core.common.businessentities.event_subscriber > result = dao.getAllForSubscriber ( newSubscription.getsubscriber_id ( ) ) ; assertNotNull ( result ) ; assertFalse ( result.isEmpty ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.event_subscriber subscription : result ) { assertEquals ( newSubscriber , subscription.getsubscriber_id ( ) ) ; } }

Target:
public void testSubscribe ( ) { dao.subscribe ( newSubscription ) ; java.util.List < org.ovirt.engine.core.common.businessentities.event_subscriber > result = dao.getAllForSubscriber ( newSubscription.getsubscriber_id ( ) ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.event_subscriber subscription : result ) { org.junit.Assert.assertEquals ( newSubscriber , subscription.getsubscriber_id ( ) ) ; } }
Source:
public static final java.lang.Iterable < org.ovirt.engine.core.common.businessentities.Provider > filterProvidersByProvidedType ( java.lang.Iterable < org.ovirt.engine.core.common.businessentities.Provider > source , final org.ovirt.engine.core.common.VdcObjectType type ) { return org.ovirt.engine.ui.uicommonweb.Linq.where ( source , new org.ovirt.engine.ui.uicommonweb.Linq.IPredicate < org.ovirt.engine.core.common.businessentities.Provider > ( ) { @ java.lang.Override public boolean match ( org.ovirt.engine.core.common.businessentities.Provider provider ) { return provider.getType ( ) . getProvidedTypes ( ) . contains ( type ) ; } } ) ; }

Target:
public static final java.util.Collection < org.ovirt.engine.core.common.businessentities.Provider > filterProvidersByProvidedType ( java.util.Collection < org.ovirt.engine.core.common.businessentities.Provider > source , final org.ovirt.engine.core.common.VdcObjectType type ) { return org.ovirt.engine.ui.uicommonweb.Linq.where ( source , new org.ovirt.engine.ui.uicommonweb.Linq.IPredicate < org.ovirt.engine.core.common.businessentities.Provider > ( ) { @ java.lang.Override public boolean match ( org.ovirt.engine.core.common.businessentities.Provider provider ) { return provider.getType ( ) . getProvidedTypes ( ) . contains ( type ) ; } } ) ; }