auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
protected org.ovirt.engine.core.utils.lock.EngineLock acquireEngineLock ( org.ovirt.engine.core.compat.Guid id , org.ovirt.engine.core.common.locks.LockingGroup group ) { org.ovirt.engine.core.utils.lock.EngineLock lock = new org.ovirt.engine.core.utils.lock.EngineLock ( java.util.Collections.singletonMap ( id.toString ( ) , org.ovirt.engine.core.bll.LockMessagesMatchUtil.makeLockingPair ( group , VdcBllMessages.ACTION_TYPE_FAILED_VOLUME_OPERATION_IN_PROGRESS ) ) , null ) ; org.ovirt.engine.core.utils.lock.LockManagerFactory.getLockManager ( ) . acquireLockWait ( lock ) ; return lock ; }

Target:
protected org.ovirt.engine.core.utils.lock.EngineLock acquireEngineLock ( org.ovirt.engine.core.compat.Guid id , org.ovirt.engine.core.common.locks.LockingGroup group ) { org.ovirt.engine.core.utils.lock.EngineLock lock = new org.ovirt.engine.core.utils.lock.EngineLock ( java.util.Collections.singletonMap ( id.toString ( ) , org.ovirt.engine.core.bll.LockMessagesMatchUtil.makeLockingPair ( group , EngineMessage.ACTION_TYPE_FAILED_VOLUME_OPERATION_IN_PROGRESS ) ) , null ) ; org.ovirt.engine.core.utils.lock.LockManagerFactory.getLockManager ( ) . acquireLockWait ( lock ) ; return lock ; }
Source:
public void validateSuccess ( ) { mockVmStatusUp ( ) ; mockInterfaceList ( ) ; cretaeVirtIODisk ( ) ; initStorageDomain ( ) ; org.junit.Assert.assertTrue ( command.validate ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getValidationMessages ( ) . isEmpty ( ) ) ; }

Target:
public void validateSuccess ( ) { mockVmStatusUp ( ) ; mockInterfaceList ( ) ; cretaeVirtIODisk ( ) ; initStorageDomain ( ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateSuccess ( command ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.DiskImage getDiskForVolumeInfo ( org.ovirt.engine.core.common.businessentities.DiskImage disk ) { if ( org.ovirt.engine.core.bll.ExportVmCommand.getParameters ( ) . getCopyCollapse ( ) ) { org.ovirt.engine.core.common.businessentities.DiskImage ancestor = org.ovirt.engine.core.bll.ExportVmCommand.getDiskImageDao ( ) . getAncestor ( disk.getImageId ( ) ) ; if ( ancestor == null ) { log.warnFormat ( "Can't find ancestor of Disk with ID {0}, using original disk for volume info." , disk.getImageId ( ) ) ; ancestor = disk ; } return ancestor ; } else { return disk ; } }

Target:
private org.ovirt.engine.core.common.businessentities.DiskImage getDiskForVolumeInfo ( org.ovirt.engine.core.common.businessentities.DiskImage disk ) { if ( org.ovirt.engine.core.bll.ExportVmCommand.getParameters ( ) . getCopyCollapse ( ) ) { org.ovirt.engine.core.common.businessentities.DiskImage ancestor = org.ovirt.engine.core.bll.ExportVmCommand.getDiskImageDao ( ) . getAncestor ( disk.getImageId ( ) ) ; if ( ancestor == null ) { log.warn ( "Can't find ancestor of Disk with ID '{}', using original disk for volume info." , disk.getImageId ( ) ) ; ancestor = disk ; } return ancestor ; } else { return disk ; } }
Source:
public void shouldDetectSuspendedVM ( ) { invalidVM.setStatus ( VMStatus.Suspended ) ; org.hamcrest.MatcherAssert.assertThat ( validator.checkVmReadyForUpgrade ( invalidVM ) , org.hamcrest.CoreMatchers.hasItem ( UPGRADE_ERROR.VM_SUSPENDED ) ) ; }

Target:
public void shouldDetectNumaPinning ( ) { invalidVM.setvNumaNodeList ( java.util.Arrays.asList ( org.ovirt.engine.core.bll.utils.NumaTestUtils.createVmNumaNode ( 1 , java.util.Arrays.asList ( org.ovirt.engine.core.bll.utils.NumaTestUtils.createVdsNumaNode ( 1 ) ) ) ) ) ; org.assertj.core.api.Assertions.assertThat ( validator.checkVmReadyForUpgrade ( invalidVM ) ) . contains ( UpgradeError.VM_NUMA_PINNED ) ; }
Source:
private org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidator createHostSetupNetworksValidator ( java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > networks , org.ovirt.engine.core.common.action.HostSetupNetworksParameters params ) { return new org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidatorTest.HostSetupNetworksValidatorBuilder ( ) . setHost ( host ) . setParams ( params ) . setNetworkBusinessEntityMap ( new org.ovirt.engine.core.common.businessentities.BusinessEntityMap ( networks ) ) . build ( ) ; }

Target:
private org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidator createValidatorForTestingValidateQosOverridden ( org.ovirt.engine.core.common.businessentities.network.Network network ) { org.ovirt.engine.core.common.businessentities.network.NetworkAttachment networkAttachment = new org.ovirt.engine.core.common.businessentities.network.NetworkAttachment ( ) ; networkAttachment.setNetworkId ( network.getId ( ) ) ; networkAttachment.setHostNetworkQos ( new org.ovirt.engine.core.common.businessentities.network.HostNetworkQos ( ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.network.NetworkAttachment > networkAttachments = java.util.Collections.singletonList ( networkAttachment ) ; org.ovirt.engine.core.common.action.HostSetupNetworksParameters params = new org.ovirt.engine.core.common.action.HostSetupNetworksParameters ( host.getId ( ) ) ; params.setNetworkAttachments ( networkAttachments ) ; return new org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidatorTest.HostSetupNetworksValidatorBuilder ( ) . setHost ( host ) . setParams ( params ) . addNetworks ( network ) . build ( ) ; }
Source:
protected void initFrontend ( ) { super . initFrontend ( ) ; frontend.setLoginHandler ( new org.ovirt.engine.ui.frontend.FrontendLoginHandler ( ) { @ java.lang.Override public void onLoginSuccess ( final java.lang.String userName , final java.lang.String password , final java.lang.String domain ) { com.google.gwt.core.client.Scheduler.get ( ) . scheduleDeferred ( new com.google.gwt.core.client.Scheduler.ScheduledCommand ( ) { @ java.lang.Override public void execute ( ) { final java.lang.String domainToken = "@" ; restApiSessionManager.acquireSession ( ( userName.contains ( domainToken ) ? userName : ( userName + domainToken ) + domain ) , password ) ; } } ) ; } @ java.lang.Override public void onLogout ( ) { restApiSessionManager.releaseSession ( ) ; } } ) ; }

Target:
protected void initFrontend ( ) { super . initFrontend ( ) ; org.ovirt.engine.ui.uicommonweb.ReportInit.getInstance ( ) . initHandlers ( eventBus ) ; frontend.setLoginHandler ( new org.ovirt.engine.ui.frontend.FrontendLoginHandler ( ) { @ java.lang.Override public void onLoginSuccess ( final java.lang.String userName , final java.lang.String password , final java.lang.String domain ) { com.google.gwt.core.client.Scheduler.get ( ) . scheduleDeferred ( new com.google.gwt.core.client.Scheduler.ScheduledCommand ( ) { @ java.lang.Override public void execute ( ) { final java.lang.String domainToken = "@" ; restApiSessionManager.acquireSession ( ( userName.contains ( domainToken ) ? userName : ( userName + domainToken ) + domain ) , password ) ; } } ) ; } @ java.lang.Override public void onLogout ( ) { restApiSessionManager.releaseSession ( ) ; } } ) ; }
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 initBalloonSupportMap ( ) { org.ovirt.engine.ui.frontend.AsyncQuery callback = new org.ovirt.engine.ui.frontend.AsyncQuery ( ) ; callback.asyncCallback = new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { balloonSupportMap = ( ( java.util.Map < java.lang.Integer , java.util.Map < org.ovirt.engine.core.compat.Version , java.lang.Boolean > > ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ) ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.OsRepository , new org.ovirt.engine.core.common.queries.OsQueryParameters ( org.ovirt.engine.core.common.queries.OsQueryParameters.OsRepositoryVerb.GetBalloonSupportMap ) , callback ) ; }
Source:
private static void addSoundCard ( org.ovirt.engine.core.common.businessentities.VmBase vmBase , org.ovirt.engine.core.compat.Version vdsGroupCompatibilityVersion ) { java.lang.String soundDevice = org.ovirt.engine.core.vdsbroker.vdsbroker.VmInfoBuilderBase.getSoundDevice ( vmBase , vdsGroupCompatibilityVersion ) ; org.ovirt.engine.core.bll.utils.VmDeviceUtils.addManagedDevice ( new org.ovirt.engine.core.common.businessentities.VmDeviceId ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) , vmBase.getId ( ) ) , VmDeviceType.SOUND , org.ovirt.engine.core.common.utils.VmDeviceType.getSoundDeviceType ( soundDevice ) , new java.util.HashMap < java.lang.String , java.lang.Object > ( ) , true , true ) ; }

Target:
private static void addSoundCard ( org.ovirt.engine.core.common.businessentities.VmBase vmBase , org.ovirt.engine.core.compat.Version vdsGroupCompatibilityVersion ) { java.lang.String soundDevice = org.ovirt.engine.core.vdsbroker.vdsbroker.VmInfoBuilderBase.getSoundDevice ( vmBase , vdsGroupCompatibilityVersion ) ; org.ovirt.engine.core.bll.utils.VmDeviceUtils.addManagedDevice ( new org.ovirt.engine.core.common.businessentities.VmDeviceId ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) , vmBase.getId ( ) ) , VmDeviceGeneralType.SOUND , org.ovirt.engine.core.common.utils.VmDeviceType.getSoundDeviceType ( soundDevice ) , new java.util.HashMap < java.lang.String , java.lang.Object > ( ) , true , true ) ; }
Source:
public void onFailure ( final java.lang.Throwable caught ) { if ( org.ovirt.engine.ui.frontend.Frontend.ignoreFailure ( caught ) ) { return ; } org.ovirt.engine.ui.frontend.Frontend.logger.log ( java.util.logging.Level.SEVERE , ( "Failed to execute RunQuery: " + caught ) , caught ) ; org.ovirt.engine.ui.frontend.Frontend.getEventsHandler ( ) . runQueryFailed ( null ) ; org.ovirt.engine.ui.frontend.Frontend.failureEventHandler ( caught ) ; if ( callback.isHandleFailure ( ) ) { org.ovirt.engine.ui.frontend.Frontend.setLoggedInUser ( null ) ; org.ovirt.engine.ui.frontend.Frontend.setLoginPassword ( null ) ; callback.asyncCallback.onSuccess ( callback.getModel ( ) , null ) ; } }

Target:
public void onSuccess ( final org.ovirt.engine.core.common.action.VdcReturnValueBase result ) { org.ovirt.engine.ui.frontend.Frontend.logger.finer ( "Succesful returned result from Logoff." ) ; callback.getDel ( ) . onSuccess ( callback.getModel ( ) , result ) ; if ( ( org.ovirt.engine.ui.frontend.Frontend.getLoginHandler ( ) ) != null ) { org.ovirt.engine.ui.frontend.Frontend.getLoginHandler ( ) . onLogout ( ) ; } }
Source:
public static void getDataCenterListByName ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String name ) { 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.StoragePool > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( ( ( "DataCenter: name=" + name ) + " sortby name" ) , org.ovirt.engine.core.common.interfaces.SearchType.StoragePool ) , aQuery ) ; }

Target:
public static void getDataCenterList ( 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 ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( "DataCenter: sortby name" , org.ovirt.engine.core.common.interfaces.SearchType.StoragePool ) , aQuery ) ; }
Source:
public java.lang.Void runInTransaction ( ) { getCompensationContext ( ) . snapshotEntity ( oldIface ) ; getVmNetworkInterfaceDao ( ) . update ( getInterface ( ) ) ; getCompensationContext ( ) . stateChanged ( ) ; return null ; }

Target:
public java.lang.Void runInTransaction ( ) { getCompensationContext ( ) . snapshotEntity ( oldIface ) ; getCompensationContext ( ) . snapshotEntity ( oldVmDevice ) ; getVmNetworkInterfaceDao ( ) . update ( getInterface ( ) ) ; oldVmDevice.setCustomProperties ( getInterface ( ) . getCustomProperties ( ) ) ; getDbFacade ( ) . getVmDeviceDao ( ) . update ( oldVmDevice ) ; getCompensationContext ( ) . stateChanged ( ) ; return null ; }
Source:
public void edit ( org.ovirt.engine.ui.uicommonweb.models.datacenters.BaseNetworkQosModel object ) { driver.edit ( object ) ; }

Target:
public void edit ( org.ovirt.engine.ui.uicommonweb.models.datacenters.BaseNetworkQosModel model ) { driver.edit ( model ) ; if ( ( this . model ) != null ) { this . model.getPropertyChangedEvent ( ) . removeListener ( availabilityListener ) ; } this . model = model ; model.getPropertyChangedEvent ( ) . addListener ( availabilityListener ) ; toggleVisibility ( ) ; }
Source:
public void testDefaultRouteNonDefaultRouteNetworkIsIgnored ( ) { iface.setIpv4DefaultRoute ( true ) ; network.setDnsResolverConfiguration ( sampleDnsResolverConfiguration ) ; org.junit.Assert.assertThat ( createTestedInstance ( false , sampleDnsResolverConfiguration ) . isNetworkInSync ( ) , org.hamcrest.CoreMatchers.is ( true ) ) ; }

Target:
public void testDnsResolverConfigurationNonDefaultRouteNetwork ( ) { iface.setIpv4DefaultRoute ( true ) ; network.setDnsResolverConfiguration ( sampleDnsResolverConfiguration ) ; testedNetworkAttachment.setDnsResolverConfiguration ( sampleDnsResolverConfiguration2 ) ; org.junit.Assert.assertThat ( createTestedInstance ( false , sampleDnsResolverConfiguration ) . isNetworkInSync ( ) , org.hamcrest.CoreMatchers.is ( false ) ) ; }
Source:
public static void addDiskImageWithNoVmDevice ( org.ovirt.engine.core.common.businessentities.storage.DiskImage image , boolean active , org.ovirt.engine.core.common.businessentities.image_storage_domain_map imageStorageDomainMap ) { try { org.ovirt.engine.core.bll.ImagesHandler.addImage ( image , active , imageStorageDomainMap ) ; org.ovirt.engine.core.bll.ImagesHandler.addDisk ( image ) ; } catch ( java.lang.RuntimeException ex ) { org.ovirt.engine.core.bll.ImagesHandler.log.error ( "Failed adding new disk image and related entities to db: {}" , ex.getMessage ( ) ) ; org.ovirt.engine.core.bll.ImagesHandler.log.debug ( "Exception" , ex ) ; throw new org.ovirt.engine.core.common.errors.VdcBLLException ( org.ovirt.engine.core.common.errors.VdcBllErrors.DB , ex ) ; } }

Target:
public static void addDiskImageWithNoVmDevice ( org.ovirt.engine.core.common.businessentities.storage.DiskImage image , boolean active , org.ovirt.engine.core.common.businessentities.storage.ImageStorageDomainMap imageStorageDomainMap ) { try { org.ovirt.engine.core.bll.ImagesHandler.addImage ( image , active , imageStorageDomainMap ) ; org.ovirt.engine.core.bll.ImagesHandler.addDisk ( image ) ; } catch ( java.lang.RuntimeException ex ) { org.ovirt.engine.core.bll.ImagesHandler.log.error ( "Failed adding new disk image and related entities to db: {}" , ex.getMessage ( ) ) ; org.ovirt.engine.core.bll.ImagesHandler.log.debug ( "Exception" , ex ) ; throw new org.ovirt.engine.core.common.errors.VdcBLLException ( org.ovirt.engine.core.common.errors.VdcBllErrors.DB , ex ) ; } }
Source:
public static void getVmsRunningOnOrMigratingToVds ( 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.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.VM > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmsRunningOnOrMigratingToVds , new org.ovirt.engine.core.common.queries.GetVmsRunningOnOrMigratingToVdsParameters ( id ) , aQuery ) ; }

Target:
public static void getVmSnapshotList ( 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.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.Snapshot > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllVmSnapshotsByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
public void testUpdateNotFound ( ) { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpEntityQueryExpectations ( 1 , 0 , true ) ; try { resource.update ( org.ovirt.engine.api.restapi.resource.BackendMacPoolResourceTest.getModel ( 0 ) ) ; org.junit.Assert.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }

Target:
public void testUpdateNotFound ( ) { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpEntityQueryExpectations ( 1 , 0 , true ) ; try { resource.update ( org.ovirt.engine.api.restapi.resource.BackendMacPoolResourceTest.getModel ( 0 ) ) ; org.junit.jupiter.api.Assertions.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }
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.IdParameters ( vmId ) ) ; } }

Target:
private void processOnVmStopInternal ( final java.util.Collection < org.ovirt.engine.core.compat.Guid > vmIds , final org.ovirt.engine.core.compat.Guid hostId ) { 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:
private void initOsRepository ( ) { OsInfoPreferencesLoader.INSTANCE.init ( java.nio.file.FileSystems.getDefault ( ) . getPath ( org.ovirt.engine.core.utils.EngineLocalConfig.getInstance ( ) . getEtcDir ( ) . getAbsolutePath ( ) , org.ovirt.engine.core.common.config.Config.< java.lang.String > GetValue ( ConfigValues.OsRepositoryConfDir ) ) ) ; OsRepositoryImpl.INSTANCE.init ( OsInfoPreferencesLoader.INSTANCE.getPreferences ( ) ) ; org.ovirt.engine.core.common.osinfo.OsRepository osRepository = org.ovirt.engine.core.common.osinfo.OsRepositoryImpl.INSTANCE ; org.ovirt.engine.core.common.utils.SimpleDependecyInjector.getInstance ( ) . bind ( org.ovirt.engine.core.common.osinfo.OsRepository.class , osRepository ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . populateDwhOsInfo ( osRepository.getOsNames ( ) ) ; }

Target:
private void initOsRepository ( ) { OsInfoPreferencesLoader.INSTANCE.init ( java.nio.file.FileSystems.getDefault ( ) . getPath ( org.ovirt.engine.core.utils.EngineLocalConfig.getInstance ( ) . getEtcDir ( ) . getAbsolutePath ( ) , org.ovirt.engine.core.common.config.Config.< java.lang.String > GetValue ( ConfigValues.OsRepositoryConfDir ) ) ) ; OsRepositoryImpl.INSTANCE.init ( OsInfoPreferencesLoader.INSTANCE.getPreferences ( ) ) ; org.ovirt.engine.core.common.osinfo.OsRepository osRepository = org.ovirt.engine.core.utils.OsRepositoryImpl.INSTANCE ; org.ovirt.engine.core.common.utils.SimpleDependecyInjector.getInstance ( ) . bind ( org.ovirt.engine.core.common.osinfo.OsRepository.class , osRepository ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . populateDwhOsInfo ( osRepository.getOsNames ( ) ) ; }
Source:
protected boolean canDoAction ( ) { org.ovirt.engine.core.compat.Guid id = org.ovirt.engine.core.bll.aaa.RemoveUserCommand.getParameters ( ) . getId ( ) ; if ( org.ovirt.engine.core.bll.aaa.RemoveUserCommand.getCurrentUser ( ) . getId ( ) . equals ( id ) ) { addCanDoActionMessage ( EngineMessage.USER_CANNOT_REMOVE_HIMSELF ) ; return false ; } org.ovirt.engine.core.common.businessentities.aaa.DbUser dbUser = org.ovirt.engine.core.bll.aaa.RemoveUserCommand.getDbUserDao ( ) . get ( id ) ; if ( dbUser == null ) { addCanDoActionMessage ( EngineMessage.USER_MUST_EXIST_IN_DB ) ; return false ; } return true ; }

Target:
protected boolean validate ( ) { org.ovirt.engine.core.compat.Guid id = org.ovirt.engine.core.bll.aaa.RemoveUserCommand.getParameters ( ) . getId ( ) ; if ( org.ovirt.engine.core.bll.aaa.RemoveUserCommand.getCurrentUser ( ) . getId ( ) . equals ( id ) ) { addValidationMessage ( EngineMessage.USER_CANNOT_REMOVE_HIMSELF ) ; return false ; } org.ovirt.engine.core.common.businessentities.aaa.DbUser dbUser = org.ovirt.engine.core.bll.aaa.RemoveUserCommand.getDbUserDao ( ) . get ( id ) ; if ( dbUser == null ) { addValidationMessage ( EngineMessage.USER_MUST_EXIST_IN_DB ) ; return false ; } return true ; }
Source:
public void testStatisticLinks ( ) throws java.lang.Exception { org.ovirt.engine.api.model.Statistic statistic = new org.ovirt.engine.api.model.Statistic ( ) ; statistic.setId ( org.ovirt.engine.api.restapi.util.LinkHelperTest.STATISTIC_ID ) ; statistic.setVm ( new org.ovirt.engine.api.model.Vm ( ) ) ; statistic.getVm ( ) . setId ( org.ovirt.engine.api.restapi.util.LinkHelperTest.VM_ID ) ; org.ovirt.engine.api.restapi.util.LinkHelper.addLinks ( statistic ) ; assertEquals ( org.ovirt.engine.api.restapi.util.LinkHelperTest.STATISTIC_HREF , statistic.getHref ( ) ) ; }

Target:
public void testStatisticLinks ( ) throws java.lang.Exception { org.ovirt.engine.api.model.Statistic statistic = new org.ovirt.engine.api.model.Statistic ( ) ; statistic.setId ( org.ovirt.engine.api.restapi.util.LinkHelperTest.STATISTIC_ID ) ; statistic.setVm ( new org.ovirt.engine.api.model.Vm ( ) ) ; statistic.getVm ( ) . setId ( org.ovirt.engine.api.restapi.util.LinkHelperTest.VM_ID ) ; org.ovirt.engine.api.restapi.util.LinkHelper.addLinks ( statistic ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.api.restapi.util.LinkHelperTest.STATISTIC_HREF , statistic.getHref ( ) ) ; }
Source:
protected void EndImportCommand ( ) { if ( ! ( getParameters ( ) . isImportAsNewEntity ( ) ) ) { setVm ( null ) ; } EndActionOnAllImageGroups ( ) ; if ( ( getVm ( ) ) != null ) { org.ovirt.engine.core.bll.VmHandler.UnLockVm ( getVm ( ) . getId ( ) ) ; UpdateVmImSpm ( ) ; } else { setCommandShouldBeLogged ( false ) ; org.ovirt.engine.core.bll.ImportVmCommand.log.warn ( "ImportVmCommand::EndImportCommand: Vm is null - not performing full EndAction" ) ; } setSucceeded ( true ) ; }

Target:
protected java.util.List < java.lang.Class < ? > > getValidationGroups ( ) { if ( getParameters ( ) . isImportAsNewEntity ( ) ) { return addValidationGroup ( org.ovirt.engine.core.common.validation.group.ImportClonedEntity.class ) ; } return addValidationGroup ( org.ovirt.engine.core.common.validation.group.ImportEntity.class ) ; }
Source:
protected org.ovirt.engine.core.common.businessentities.VM getEntity ( int index ) { org.ovirt.engine.core.common.businessentities.VM vm = new org.ovirt.engine.core.common.businessentities.VM ( ) ; org.ovirt.engine.core.common.businessentities.VmDynamic vmDynamic = new org.ovirt.engine.core.common.businessentities.VmDynamic ( ) ; vmDynamic.setConsoleCurrentUserName ( "admin" ) ; vmDynamic.setClientIp ( "1.1.1.1" ) ; vmDynamic.setGuestCurrentUserName ( "Ori" ) ; vm.setDynamicData ( vmDynamic ) ; return vm ; }

Target:
protected org.ovirt.engine.core.common.businessentities.VM getEntity ( int index ) { org.ovirt.engine.core.common.businessentities.VM vm = new org.ovirt.engine.core.common.businessentities.VM ( ) ; org.ovirt.engine.core.common.businessentities.VmDynamic vmDynamic = new org.ovirt.engine.core.common.businessentities.VmDynamic ( ) ; vmDynamic.setConsoleCurrentUserName ( "admin@internal" ) ; vmDynamic.setClientIp ( "1.1.1.1" ) ; vmDynamic.setGuestCurrentUserName ( "Ori" ) ; vm.setDynamicData ( vmDynamic ) ; return vm ; }
Source:
private static void AddEventNotificationEntry ( org.ovirt.engine.core.common.EventNotificationEntity entity , org.ovirt.engine.core.common.AuditLogType auditLogType ) { java.util.HashSet < org.ovirt.engine.core.common.AuditLogType > entry = org.ovirt.engine.core.common.VdcEventNotificationUtils._eventNotificationTypeMap.get ( entity ) ; if ( entry == null ) { entry = new java.util.HashSet < org.ovirt.engine.core.common.AuditLogType > ( ) ; org.ovirt.engine.core.common.VdcEventNotificationUtils._eventNotificationTypeMap.put ( entity , entry ) ; } entry.add ( auditLogType ) ; }

Target:
private static void AddEventNotificationEntry ( org.ovirt.engine.core.common.EventNotificationEntity entity , org.ovirt.engine.core.common.AuditLogType auditLogType ) { java.util.HashSet < org.ovirt.engine.core.common.AuditLogType > entry = org.ovirt.engine.core.common.VdcEventNotificationUtils.eventNotificationTypeMap.get ( entity ) ; if ( entry == null ) { entry = new java.util.HashSet < org.ovirt.engine.core.common.AuditLogType > ( ) ; org.ovirt.engine.core.common.VdcEventNotificationUtils.eventNotificationTypeMap.put ( entity , entry ) ; } entry.add ( auditLogType ) ; }
Source:
public boolean isCidrNetworkAddressValid ( java.lang.String cidr ) { java.lang.String [ ] temp = cidr.split ( "/" ) ; long ipAsInteger = org.ovirt.engine.core.common.utils.IpAddressConverter.getInstance ( ) . convertIpToLong ( temp [ 0 ] ) ; int mask = java.lang.Integer.parseInt ( temp [ 1 ] ) ; return org.ovirt.engine.core.common.validation.CidrValidator.isNetworkAddress ( ipAsInteger , mask ) ; }

Target:
public boolean isCidrNetworkAddressValid ( java.lang.String cidr ) { java.lang.String [ ] temp = cidr.split ( "/" ) ; long ipAsInteger = ipAddressConverter.convertIpAddressToLong ( temp [ 0 ] ) ; int mask = java.lang.Integer.parseInt ( temp [ 1 ] ) ; return org.ovirt.engine.core.common.validation.CidrValidator.isNetworkAddress ( ipAsInteger , mask ) ; }
Source:
public java.lang.Object answer ( org.mockito.invocation.InvocationOnMock invocationOnMock ) throws java.lang.Throwable { final org.ovirt.engine.core.common.businessentities.DiskImage oldDisk = createDiskImage ( ) ; oldDisk.setDiskInterface ( DiskInterface.VirtIO ) ; org.junit.Assert.assertNotSame ( oldDisk.getDiskInterface ( ) , parameters.getDiskInfo ( ) . getDiskInterface ( ) ) ; return oldDisk ; }

Target:
public java.lang.Object answer ( org.mockito.invocation.InvocationOnMock invocationOnMock ) throws java.lang.Throwable { final org.ovirt.engine.core.common.businessentities.storage.DiskImage oldDisk = createDiskImage ( ) ; oldDisk.setDiskInterface ( DiskInterface.VirtIO ) ; org.junit.Assert.assertNotSame ( oldDisk.getDiskInterface ( ) , parameters.getDiskInfo ( ) . getDiskInterface ( ) ) ; return oldDisk ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object result ) { populateProfiles ( ( ( java.util.List < org.ovirt.engine.core.aaa.ProfileEntry > ) ( result ) ) ) ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object result ) { populateProfiles ( ( ( java.util.List < org.ovirt.engine.core.aaa.ProfileEntry > ) ( result ) ) ) ; getProfile ( ) . getSelectedItemChangedEvent ( ) . addListener ( new org.ovirt.engine.ui.uicompat.IEventListener ( ) { @ java.lang.Override public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { populateNamespaces ( ) ; } } ) ; }
Source:
public void getCinderVolumeTypesList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storageDomainId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter < java.util.List < org.ovirt.engine.core.common.businessentities.storage.CinderVolumeType > > ( ) { @ java.lang.Override public java.util.List < org.ovirt.engine.core.common.businessentities.storage.CinderVolumeType > convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return ( ( java.util.List < org.ovirt.engine.core.common.businessentities.storage.CinderVolumeType > ) ( source ) ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetCinderVolumeTypesByStorageDomainId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( storageDomainId ) , aQuery ) ; }

Target:
public void getVmById ( org.ovirt.engine.ui.frontend.AsyncQuery < org.ovirt.engine.core.common.businessentities.VM > aQuery , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.CastingConverter < > ( ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }
Source:
public java.util.List < org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.compat.Guid , java.lang.Integer > > score ( org.ovirt.engine.core.common.businessentities.VDSGroup cluster , java.util.List < org.ovirt.engine.core.common.businessentities.VDS > hosts , org.ovirt.engine.core.common.businessentities.VM vm , java.util.Map < java.lang.String , java.lang.String > parameters ) { boolean countThreadsAsCores = cluster.getCountThreadsAsCores ( ) ; java.util.List < org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.compat.Guid , java.lang.Integer > > scores = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.VDS vds : hosts ) { scores.add ( new org.ovirt.engine.core.common.utils.Pair ( vds.getId ( ) , calcEvenDistributionScore ( vds , vm , countThreadsAsCores ) ) ) ; } return scores ; }

Target:
protected float getMaxMemoryOfVdsInCluster ( java.util.List < org.ovirt.engine.core.common.businessentities.VDS > hosts ) { float maxMemoryOfVds = 0 ; for ( org.ovirt.engine.core.common.businessentities.VDS host : hosts ) { if ( ( host.getFreeVirtualMemory ( ) ) > maxMemoryOfVds ) { maxMemoryOfVds = host.getFreeVirtualMemory ( ) ; } } return maxMemoryOfVds ; }
Source:
public void testNoIsoDomain ( ) { org.ovirt.engine.core.common.businessentities.VM vm = new org.ovirt.engine.core.common.businessentities.VM ( ) ; org.ovirt.engine.core.bll.validator.RunVmValidatorTest.validateResult ( runVmValidator.validateBootSequence ( vm , BootSequence.CD , new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ( ) ) , false , VdcBllMessages.VM_CANNOT_RUN_FROM_CD_WITHOUT_ACTIVE_STORAGE_DOMAIN_ISO ) ; }

Target:
public void testVmWithDisks ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.Disk > disks = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ( ) ; disks.add ( new org.ovirt.engine.core.common.businessentities.DiskImage ( ) ) ; org.ovirt.engine.core.bll.validator.RunVmValidatorTest.validateResult ( runVmValidator.validateBootSequence ( new org.ovirt.engine.core.common.businessentities.VM ( ) , null , disks ) , true , null ) ; }
Source:
private boolean canAddVm ( ) { boolean exists = ( ( java.lang.Boolean ) ( getBackend ( ) . runInternalQuery ( VdcQueryType.IsVmWithSameNameExist , new org.ovirt.engine.core.common.queries.IsVmWithSameNameExistParameters ( getVm ( ) . getvm_name ( ) ) ) . getReturnValue ( ) ) ) ; if ( exists ) { addCanDoActionMessage ( VdcBllMessages.VM_CANNOT_IMPORT_VM_NAME_EXISTS ) ; } return ! exists ; }

Target:
protected boolean canAddVm ( ) { boolean exists = ( ( java.lang.Boolean ) ( getBackend ( ) . runInternalQuery ( VdcQueryType.IsVmWithSameNameExist , new org.ovirt.engine.core.common.queries.IsVmWithSameNameExistParameters ( getVm ( ) . getVmName ( ) ) ) . getReturnValue ( ) ) ) ; if ( exists ) { addCanDoActionMessage ( VdcBllMessages.VM_CANNOT_IMPORT_VM_NAME_EXISTS ) ; } return ! exists ; }
Source:
public void testConfigDirWithFlagSet ( ) throws java.lang.Exception { final java.lang.String path = java.net.URLDecoder.decode ( java.lang.ClassLoader.getSystemResource ( "engine-config.conf" ) . getPath ( ) , "UTF-8" ) ; org.junit.Assert.assertNotNull ( path ) ; org.ovirt.engine.core.config.EngineConfigExecutor.main ( "-a" , ( "--config=" + path ) ) ; }

Target:
public void testConfigDirWithFlagSet ( ) throws java.lang.Exception { final java.lang.String path = java.net.URLDecoder.decode ( java.lang.ClassLoader.getSystemResource ( "engine-config.conf" ) . getPath ( ) , "UTF-8" ) ; org.junit.jupiter.api.Assertions.assertNotNull ( path ) ; org.ovirt.engine.core.config.EngineConfigExecutor.main ( "-a" , ( "--config=" + path ) ) ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult networkNotChanged ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment oldAttachment ) { boolean when = ( oldAttachment != null ) && ( ! ( java.util.Objects.equals ( oldAttachment.getNetworkId ( ) , attachment.getNetworkId ( ) ) ) ) ; return org.ovirt.engine.core.bll.ValidationResult.failWith ( EngineMessage.CANNOT_CHANGE_ATTACHED_NETWORK ) . when ( when ) ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult networkNotChanged ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment oldAttachment ) { org.ovirt.engine.core.compat.Guid oldAttachmentId = ( oldAttachment == null ) ? null : oldAttachment.getId ( ) ; boolean when = ( oldAttachment != null ) && ( ! ( java.util.Objects.equals ( oldAttachment.getNetworkId ( ) , attachment.getNetworkId ( ) ) ) ) ; return org.ovirt.engine.core.bll.ValidationResult.failWith ( EngineMessage.CANNOT_CHANGE_ATTACHED_NETWORK , org.ovirt.engine.core.utils.ReplacementUtils.createSetVariableString ( org.ovirt.engine.core.bll.validator.NetworkAttachmentValidator.VAR_NETWORK_ATTACHMENT_ID , oldAttachmentId ) ) . when ( when ) ; }
Source:
protected boolean canDoAction ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage_pool_iso_map > poolDomains = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStoragePoolIsoMapDAO ( ) . getAllForStoragePool ( org.ovirt.engine.core.bll.storage.ReconstructMasterDomainCommand.getStoragePool ( ) . getId ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.storage_pool_iso_map poolDomain : poolDomains ) { if ( ( poolDomain.getstatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageDomainStatus.Locked ) ) { addInvalidSDStatusMessage ( poolDomain.getstatus ( ) ) ; return false ; } } return org.ovirt.engine.core.bll.storage.ReconstructMasterDomainCommand.InitializeVds ( ) ; }

Target:
protected boolean canDoAction ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage_pool_iso_map > poolDomains = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStoragePoolIsoMapDao ( ) . getAllForStoragePool ( org.ovirt.engine.core.bll.storage.ReconstructMasterDomainCommand.getStoragePool ( ) . getId ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.storage_pool_iso_map poolDomain : poolDomains ) { if ( ( poolDomain.getstatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageDomainStatus.Locked ) ) { addInvalidSDStatusMessage ( poolDomain.getstatus ( ) ) ; return false ; } } return org.ovirt.engine.core.bll.storage.ReconstructMasterDomainCommand.InitializeVds ( ) ; }
Source:
public javax.ws.rs.core.Response add ( org.ovirt.engine.api.model.Network network ) { validateParameters ( network , getRequiredAddFields ( ) ) ; org.ovirt.engine.api.model.DataCenter dataCenter = new org.ovirt.engine.api.model.DataCenter ( ) ; dataCenter.setId ( dataCenterId.toString ( ) ) ; network.setDataCenter ( dataCenter ) ; org.ovirt.engine.api.model.Network entity = map ( network ) ; org.ovirt.engine.core.common.action.AddNetworkStoragePoolParameters params = getAddParameters ( network , entity ) ; return performCreate ( addAction , params , new org.ovirt.engine.api.restapi.resource.DataCenterNetworkIdResolver ( network.getName ( ) , params.getStoragePoolId ( ) . toString ( ) ) ) ; }

Target:
public org.ovirt.engine.api.model.Networks list ( ) { java.util.List < org.ovirt.engine.api.model.Network > entities = getBackendCollection ( VdcQueryType.GetNetworksByDataCenterId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) ) ; org.ovirt.engine.api.model.Networks networks = mapCollection ( entities ) ; for ( org.ovirt.engine.api.model.Network network : networks.getNetworks ( ) ) { network.setDisplay ( null ) ; } return networks ; }
Source:
protected void bindCommonIntegration ( ) { bind ( org.ovirt.engine.ui.uicommonweb.ITypeResolver.class ) . to ( org.ovirt.engine.ui.common.uicommon.UiCommonDefaultTypeResolver.class ) . in ( com.google.inject.Singleton.class ) ; bind ( org.ovirt.engine.ui.common.uicommon.FrontendEventsHandlerImpl.class ) . in ( com.google.inject.Singleton.class ) ; bind ( org.ovirt.engine.ui.common.uicommon.FrontendFailureEventListener.class ) . in ( com.google.inject.Singleton.class ) ; bind ( org.ovirt.engine.ui.uicommonweb.ILogger.class ) . to ( org.ovirt.engine.ui.common.uicommon.LoggerImpl.class ) . in ( com.google.inject.Singleton.class ) ; }

Target:
protected void bindCommonIntegration ( ) { bind ( org.ovirt.engine.ui.uicommonweb.ITypeResolver.class ) . to ( org.ovirt.engine.ui.common.uicommon.UiCommonDefaultTypeResolver.class ) . asEagerSingleton ( ) ; bind ( org.ovirt.engine.ui.common.uicommon.FrontendEventsHandlerImpl.class ) . in ( com.google.inject.Singleton.class ) ; bind ( org.ovirt.engine.ui.common.uicommon.FrontendFailureEventListener.class ) . in ( com.google.inject.Singleton.class ) ; bind ( org.ovirt.engine.ui.uicommonweb.ILogger.class ) . to ( org.ovirt.engine.ui.common.uicommon.LoggerImpl.class ) . in ( com.google.inject.Singleton.class ) ; bindConsoles ( ) ; }
Source:
private org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidator createHostSetupNetworksValidator ( org.ovirt.engine.core.common.action.HostSetupNetworksParameters params , java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > existingIfaces ) { return new org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidatorTest.HostSetupNetworksValidatorBuilder ( ) . setHost ( host ) . setParams ( params ) . setExistingInterfaces ( existingIfaces ) . build ( ) ; }

Target:
public org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidatorTest.ParametersBuilder addBonds ( org.ovirt.engine.core.common.businessentities.network.Bond ... bonds ) { if ( nullParameters ( bonds ) ) { return this ; } if ( ( parameters.getBonds ( ) ) == null ) { parameters.setBonds ( new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.Bond > ( ) ) ; } parameters.getBonds ( ) . addAll ( java.util.Arrays.asList ( bonds ) ) ; return this ; }
Source:
void addStyles ( ) { linuxBootOptionsPanel.setVisible ( false ) ; initialRunPanel.setVisible ( false ) ; systemPanel.setVisible ( true ) ; hostPanel.setVisible ( true ) ; attachFloppyEditor.addContentWidgetStyleName ( style.attachImageCheckBoxLabel ( ) ) ; attachIsoEditor.addContentWidgetStyleName ( style.attachImageCheckBoxLabel ( ) ) ; floppyImageEditor.addLabelStyleName ( style.attachImageSelectBoxLabel ( ) ) ; isoImageEditor.addLabelStyleName ( style.attachImageSelectBoxLabel ( ) ) ; floppyImageEditor.addContentWidgetStyleName ( style.attachImageSelectbox ( ) ) ; isoImageEditor.addContentWidgetStyleName ( style.attachImageSelectbox ( ) ) ; }

Target:
void addStyles ( ) { linuxBootOptionsPanel.setVisible ( false ) ; initialRunPanel.setVisible ( false ) ; systemPanel.setVisible ( true ) ; hostPanel.setVisible ( true ) ; attachFloppyEditor.addContentWidgetContainerStyleName ( style.attachImageCheckBoxLabel ( ) ) ; attachIsoEditor.addContentWidgetContainerStyleName ( style.attachImageCheckBoxLabel ( ) ) ; floppyImageEditor.addLabelStyleName ( style.attachImageSelectBoxLabel ( ) ) ; isoImageEditor.addLabelStyleName ( style.attachImageSelectBoxLabel ( ) ) ; floppyImageEditor.addContentWidgetContainerStyleName ( style.attachImageSelectbox ( ) ) ; isoImageEditor.addContentWidgetContainerStyleName ( style.attachImageSelectbox ( ) ) ; }
Source:
public static void getClusterServerMemoryOverCommit ( 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 ( ) : 0 ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.MaxVdsMemOverCommitForServers , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public static void getDataCentersByStorageDomain ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storageDomainId ) { 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.StoragePool > ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStoragePoolsByStorageDomainId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( storageDomainId ) , aQuery ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.ServerCpu getVdsGroupServerCpu ( org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterModel model , org.ovirt.engine.core.common.businessentities.VDSGroup vdsGroup ) { org.ovirt.engine.core.common.businessentities.ServerCpu retVal = null ; for ( org.ovirt.engine.core.common.businessentities.ServerCpu cpu : model.getCPU ( ) . getItems ( ) ) { if ( org.ovirt.engine.core.common.utils.ObjectUtils.objectsEqual ( cpu.getCpuName ( ) , vdsGroup.getCpuName ( ) ) ) { retVal = cpu ; break ; } } return retVal ; }

Target:
private org.ovirt.engine.core.common.businessentities.ServerCpu getVdsGroupServerCpu ( org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterModel model , org.ovirt.engine.core.common.businessentities.VDSGroup vdsGroup ) { org.ovirt.engine.core.common.businessentities.ServerCpu retVal = null ; for ( org.ovirt.engine.core.common.businessentities.ServerCpu cpu : model.getCPU ( ) . getItems ( ) ) { if ( java.util.Objects.equals ( cpu.getCpuName ( ) , vdsGroup.getCpuName ( ) ) ) { retVal = cpu ; break ; } } return retVal ; }
Source:
public static void isTemplateNameUnique ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String name ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ! ( ( ( java.lang.Boolean ) ( source ) ) . booleanValue ( ) ) : false ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.IsVmTemlateWithSameNameExist , new org.ovirt.engine.core.common.queries.NameQueryParameters ( name ) , aQuery ) ; }

Target:
public static void getPermissionsByAdElementId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid userId ) { 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.permissions > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.permissions > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetPermissionsByAdElementId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( userId ) , aQuery ) ; }
Source:
private void RunVMOnSpecificHost_EntityChanged ( java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { if ( ( ( java.lang.Boolean ) ( getRunVMOnSpecificHost ( ) . getEntity ( ) ) ) == true ) { clearAndDisable ( getDontMigrateVM ( ) ) ; getHostCpu ( ) . setIsChangable ( true ) ; } else { clearAndDisable ( getHostCpu ( ) ) ; getDontMigrateVM ( ) . setIsChangable ( true ) ; } behavior.updateCpuPinningVisibility ( ) ; }

Target:
private void MigrationMode_EntityChanged ( java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { if ( ( org.ovirt.engine.core.common.businessentities.MigrationSupport.PINNED_TO_HOST ) == ( getMigrationMode ( ) . getSelectedItem ( ) ) ) { getHostCpu ( ) . setIsChangable ( true ) ; } else { getHostCpu ( ) . setEntity ( false ) ; getHostCpu ( ) . setIsChangable ( false ) ; } behavior.updateCpuPinningVisibility ( ) ; }
Source:
private static org.ovirt.engine.core.common.businessentities.storage.DiskImage createDiskImage ( ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage disk = new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ; disk.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; return disk ; }

Target:
private static org.ovirt.engine.core.common.businessentities.storage.DiskImage createDiskImage ( ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage disk = new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ; disk.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; org.ovirt.engine.core.common.businessentities.storage.Image image = new org.ovirt.engine.core.common.businessentities.storage.Image ( ) ; image.setVolumeType ( VolumeType.Sparse ) ; disk.setImage ( image ) ; return disk ; }
Source:
protected void perform ( ) { setActionReturnValue ( org.ovirt.engine.core.bll.Backend.getInstance ( ) . getResourceManager ( ) . RunVdsCommand ( VDSCommandType.ChangeDisk , new org.ovirt.engine.core.common.vdscommands.ChangeDiskVDSCommandParameters ( org.ovirt.engine.core.bll.ChangeDiskCommand.getVdsId ( ) , org.ovirt.engine.core.bll.ChangeDiskCommand.getVm ( ) . getId ( ) , cdImagePath ) ) . getReturnValue ( ) ) ; updateCurrentCd ( ) ; org.ovirt.engine.core.bll.ChangeDiskCommand.setSucceeded ( true ) ; }

Target:
protected void perform ( ) { setActionReturnValue ( org.ovirt.engine.core.bll.Backend.getInstance ( ) . getResourceManager ( ) . RunVdsCommand ( VDSCommandType.ChangeDisk , new org.ovirt.engine.core.common.vdscommands.ChangeDiskVDSCommandParameters ( org.ovirt.engine.core.bll.ChangeDiskCommand.getVdsId ( ) , org.ovirt.engine.core.bll.ChangeDiskCommand.getVm ( ) . getId ( ) , cdImagePath ) ) . getReturnValue ( ) ) ; org.ovirt.engine.core.bll.VmHandler.updateCurrentCd ( org.ovirt.engine.core.bll.ChangeDiskCommand.getVdsId ( ) , org.ovirt.engine.core.bll.ChangeDiskCommand.getVm ( ) , org.ovirt.engine.core.bll.ChangeDiskCommand.getParameters ( ) . getCdImagePath ( ) ) ; org.ovirt.engine.core.bll.ChangeDiskCommand.setSucceeded ( true ) ; }