auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public org.ovirt.engine.ui.common.presenter.AbstractModelBoundPopupPresenterWidget < ? extends org.ovirt.engine.ui.uicommonweb.models.Model , ? > getModelPopup ( org.ovirt.engine.ui.uicommonweb.models.configure.PermissionListModel source , org.ovirt.engine.ui.uicommonweb.UICommand lastExecutedCommand , org.ovirt.engine.ui.uicommonweb.models.Model windowModel ) { if ( lastExecutedCommand == ( getModel ( ) . getAddCommand ( ) ) ) { return popupProvider.get ( ) ; } else { return super . getModelPopup ( source , lastExecutedCommand , windowModel ) ; } }

Target:
public org.ovirt.engine.ui.common.presenter.AbstractModelBoundPopupPresenterWidget < ? extends org.ovirt.engine.ui.uicommonweb.models.Model , ? > getModelPopup ( org.ovirt.engine.ui.uicommonweb.models.datacenters.DataCenterQuotaListModel source , org.ovirt.engine.ui.uicommonweb.UICommand lastExecutedCommand , org.ovirt.engine.ui.uicommonweb.models.Model windowModel ) { if ( ( ( lastExecutedCommand.equals ( getModel ( ) . getCreateQuotaCommand ( ) ) ) || ( lastExecutedCommand.equals ( getModel ( ) . getEditQuotaCommand ( ) ) ) ) || ( lastExecutedCommand.equals ( getModel ( ) . getCloneQuotaCommand ( ) ) ) ) { return quotaPopupProvider.get ( ) ; } else { return super . getModelPopup ( source , lastExecutedCommand , windowModel ) ; } }
Source:
private void validateVmNetworkInterfaceId ( java.lang.String nicId , java.util.Map < java.lang.String , java.lang.Object > vmStruct ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > vmNetworkInterfaceList = vdsBrokerObjectsBuilder.buildVmNetworkInterfacesFromDevices ( vmStruct ) ; org.junit.Assert.assertNotNull ( vmNetworkInterfaceList ) ; org.junit.Assert.assertEquals ( 1 , vmNetworkInterfaceList.size ( ) ) ; org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface vmNetworkInterface = vmNetworkInterfaceList.get ( 0 ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.compat.Guid.createGuidFromString ( nicId ) , vmNetworkInterface.getId ( ) ) ; }

Target:
private void validateVmNetworkInterfaceId ( java.lang.String nicId , java.util.Map < java.lang.String , java.lang.Object > vmStruct ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > vmNetworkInterfaceList = vdsBrokerObjectsBuilder.buildVmNetworkInterfacesFromDevices ( vmStruct ) ; org.junit.jupiter.api.Assertions.assertNotNull ( vmNetworkInterfaceList ) ; org.junit.jupiter.api.Assertions.assertEquals ( 1 , vmNetworkInterfaceList.size ( ) ) ; org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface vmNetworkInterface = vmNetworkInterfaceList.get ( 0 ) ; org.junit.jupiter.api.Assertions.assertEquals ( org.ovirt.engine.core.compat.Guid.createGuidFromString ( nicId ) , vmNetworkInterface.getId ( ) ) ; }
Source:
protected int calcEvenDistributionScore ( float maxMemoryOfVdsInCluster , org.ovirt.engine.core.common.businessentities.VDS vds , org.ovirt.engine.core.common.businessentities.VM vm , boolean countThreadsAsCores ) { int score = ( MaxSchedulerWeight ) - 1 ; java.lang.Integer effectiveCpuCores = slaValidator.getEffectiveCpuCores ( vds , countThreadsAsCores ) ; if ( ( effectiveCpuCores != null ) && ( ( vds.getUsageCpuPercent ( ) ) != null ) ) { score = java.lang.Math.min ( ( ( ( int ) ( java.lang.Math.round ( calcDistributeMetric ( vds , vm , effectiveCpuCores ) ) ) ) + 1 ) , org.ovirt.engine.core.bll.scheduling.policyunits.MaxSchedulerWeight ) ; } return score ; }

Target:
protected int calcEvenDistributionScore ( float maxMemoryOfVdsInCluster , org.ovirt.engine.core.common.businessentities.VDS vds , org.ovirt.engine.core.common.businessentities.VM vm , boolean countThreadsAsCores ) { int score = ( MaxSchedulerWeight ) - 1 ; java.lang.Integer effectiveCpuCores = org.ovirt.engine.core.bll.scheduling.SlaValidator.getEffectiveCpuCores ( vds , countThreadsAsCores ) ; if ( ( effectiveCpuCores != null ) && ( ( vds.getUsageCpuPercent ( ) ) != null ) ) { score = java.lang.Math.min ( ( ( ( int ) ( java.lang.Math.round ( calcDistributeMetric ( vds , vm , effectiveCpuCores ) ) ) ) + 1 ) , org.ovirt.engine.core.bll.scheduling.policyunits.MaxSchedulerWeight ) ; } return score ; }
Source:
public void recoverFromError ( ) { org.ovirt.engine.core.common.businessentities.VDS vds = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVdsDao ( ) . get ( getVdsId ( ) ) ; if ( ( vds.getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VDSStatus.Error ) ) { setStatus ( VDSStatus.Up , vds ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVdsDynamicDao ( ) . updateStatus ( getVdsId ( ) , VDSStatus.Up ) ; org.ovirt.engine.core.vdsbroker.VdsManager.log.infoFormat ( "recoverFromError of Host {0} entered after {1} attempts to run a VM" , vds.getName ( ) , mFailedToRunVmAttempts ) ; mFailedToRunVmAttempts.set ( 0 ) ; } }

Target:
public void recoverFromError ( ) { org.ovirt.engine.core.common.businessentities.VDS vds = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVdsDao ( ) . get ( getVdsId ( ) ) ; if ( ( vds.getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VDSStatus.Error ) ) { setStatus ( VDSStatus.Up , vds ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVdsDynamicDao ( ) . updateStatus ( getVdsId ( ) , VDSStatus.Up ) ; org.ovirt.engine.core.vdsbroker.VdsManager.log.infoFormat ( "Settings host {0} to up after {1} failed attempts to run a VM" , vds.getName ( ) , mFailedToRunVmAttempts ) ; mFailedToRunVmAttempts.set ( 0 ) ; } }
Source:
public void createOvfStoreDisks ( int missingDiskCount ) { for ( int i = 0 ; i < missingDiskCount ; i ++ ) { org.ovirt.engine.core.common.action.CreateOvfVolumeForStorageDomainCommandParameters parameters = createCreateOvfVolumeForStorageDomainParams ( ) ; runInternalAction ( ActionType.CreateOvfVolumeForStorageDomain , parameters , org.ovirt.engine.core.bll.storage.ovfstore.ProcessOvfUpdateForStorageDomainCommand.getContext ( ) . clone ( ) . withoutLock ( ) ) ; } }

Target:
public boolean createOvfStoreDisks ( int missingDiskCount ) { boolean allOvfStoreDisksCreated = true ; for ( int i = 0 ; i < missingDiskCount ; i ++ ) { org.ovirt.engine.core.common.action.CreateOvfVolumeForStorageDomainCommandParameters parameters = createCreateOvfVolumeForStorageDomainParams ( ) ; org.ovirt.engine.core.common.action.ActionReturnValue returnValue = runInternalAction ( ActionType.CreateOvfVolumeForStorageDomain , parameters , org.ovirt.engine.core.bll.storage.ovfstore.ProcessOvfUpdateForStorageDomainCommand.getContext ( ) . clone ( ) . withoutLock ( ) ) ; if ( ! ( returnValue.getSucceeded ( ) ) ) { allOvfStoreDisksCreated = false ; } } return allOvfStoreDisksCreated ; }
Source:
private void markHostDevicesAsUsed ( ) { if ( needsHostDevices ) { hostDeviceManager.allocateVmHostDevices ( org.ovirt.engine.core.bll.RunVmCommand.getVmId ( ) ) ; } }

Target:
protected void updateGraphicsInfos ( ) { for ( org.ovirt.engine.core.common.businessentities.VmDevice vmDevice : org.ovirt.engine.core.bll.RunVmCommand.getVmDeviceDao ( ) . getVmDeviceByVmIdAndType ( org.ovirt.engine.core.bll.RunVmCommand.getVmId ( ) , VmDeviceGeneralType.GRAPHICS ) ) { org.ovirt.engine.core.bll.RunVmCommand.getVm ( ) . getGraphicsInfos ( ) . put ( org.ovirt.engine.core.common.businessentities.GraphicsType.fromString ( vmDevice.getDevice ( ) ) , new org.ovirt.engine.core.common.businessentities.GraphicsInfo ( ) ) ; } }
Source:
public static boolean isSessionValid ( java.lang.String session ) { try { javax.naming.InitialContext ctx = null ; try { ctx = new javax.naming.InitialContext ( ) ; org.ovirt.engine.core.common.queries.VdcQueryReturnValue returnValue = org.ovirt.engine.core.aaa.filters.FiltersHelper.getBackend ( ctx ) . runPublicQuery ( QueryType.ValidateSession , new org.ovirt.engine.core.common.queries.QueryParametersBase ( session ) ) ; return returnValue.getSucceeded ( ) ; } finally { if ( ctx != null ) { ctx.close ( ) ; } } } catch ( java.lang.Exception ex ) { throw new java.lang.RuntimeException ( ex ) ; } }

Target:
public static boolean isSessionValid ( java.lang.String session ) { try { javax.naming.InitialContext ctx = null ; try { ctx = new javax.naming.InitialContext ( ) ; org.ovirt.engine.core.common.queries.QueryReturnValue returnValue = org.ovirt.engine.core.aaa.filters.FiltersHelper.getBackend ( ctx ) . runPublicQuery ( QueryType.ValidateSession , new org.ovirt.engine.core.common.queries.QueryParametersBase ( session ) ) ; return returnValue.getSucceeded ( ) ; } finally { if ( ctx != null ) { ctx.close ( ) ; } } } catch ( java.lang.Exception ex ) { throw new java.lang.RuntimeException ( ex ) ; } }
Source:
public void testAddIncompleteParameters ( ) throws java.lang.Exception { org.ovirt.engine.api.model.CdRom model = new org.ovirt.engine.api.model.CdRom ( ) ; model.setName ( NAMES [ 0 ] ) ; model.setFile ( new org.ovirt.engine.api.model.File ( ) ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; control.replay ( ) ; try { collection.add ( model ) ; fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "CdRom" , "add" , "file.id" ) ; } }

Target:
public void testAddIncompleteParameters ( ) throws java.lang.Exception { org.ovirt.engine.api.model.Cdrom model = new org.ovirt.engine.api.model.Cdrom ( ) ; model.setName ( NAMES [ 0 ] ) ; model.setFile ( new org.ovirt.engine.api.model.File ( ) ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; control.replay ( ) ; try { collection.add ( model ) ; fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "Cdrom" , "add" , "file.id" ) ; } }
Source:
private void UpdateIsSysprepEnabled ( ) { boolean isFloppyAttached = ( ( java.lang.Boolean ) ( getAttachFloppy ( ) . getEntity ( ) ) ) ; boolean isVmFirstRun = ( ( java.lang.Boolean ) ( getIsVmFirstRun ( ) . getEntity ( ) ) ) ; getIsSysprepEnabled ( ) . setEntity ( ( ( getIsWindowsOS ( ) ) && ( getReinitialize ( ) ) ) ) ; }

Target:
private void updateIsSysprepEnabled ( ) { boolean isFloppyAttached = ( ( java.lang.Boolean ) ( getAttachFloppy ( ) . getEntity ( ) ) ) ; boolean isVmFirstRun = ( ( java.lang.Boolean ) ( getIsVmFirstRun ( ) . getEntity ( ) ) ) ; getIsSysprepEnabled ( ) . setEntity ( ( ( getIsWindowsOS ( ) ) && ( getReinitialize ( ) ) ) ) ; }
Source:
private void updateErrorIconLabel ( org.ovirt.engine.ui.uicommonweb.validation.ValidationResult validation ) { if ( ( ! ( validation.getSuccess ( ) ) ) && ( validation.getReasons ( ) . isEmpty ( ) ) ) { throw new java.lang.IllegalArgumentException ( "Unsuccessful validation without any reason not allowed." ) ; } updateErrorIconLabel ( validation.getReasons ( ) ) ; }

Target:
private void updateErrorIconLabel ( org.ovirt.engine.ui.uicommonweb.validation.ValidationResult validationResult ) { if ( ( ! ( validationResult.getSuccess ( ) ) ) && ( validationResult.getReasons ( ) . isEmpty ( ) ) ) { throw new java.lang.IllegalArgumentException ( "Unsuccessful validation without any reason not allowed." ) ; } updateErrorIconLabel ( validationResult.getReasons ( ) ) ; }
Source:
public void onUserLoginChange ( org.ovirt.engine.ui.common.auth.UserLoginChangeEvent event ) { if ( user.isLoggedIn ( ) ) { manager.invokePluginsNowOrLater ( "UserLogin" , org.ovirt.engine.ui.webadmin.plugin.jsni.JsArrayHelper.createStringArray ( user.getUserName ( ) , user.getUserId ( ) ) ) ; } else { manager.invokePluginsNowOrLater ( "UserLogout" , null ) ; } }

Target:
public void onUserLoginChange ( org.ovirt.engine.ui.common.auth.UserLoginChangeEvent event ) { if ( user.isLoggedIn ( ) ) { manager.invokePluginsNowOrLater ( "UserLogin" , org.ovirt.engine.ui.webadmin.plugin.jsni.JsArrayHelper.createStringArray ( user.getFullUserName ( ) , user.getUserId ( ) ) ) ; } else { manager.invokePluginsNowOrLater ( "UserLogout" , null ) ; } }
Source:
private void endCommand ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VM > listVms = getVmsForDiskId ( ) ; for ( org.ovirt.engine.core.common.businessentities.VM vm : listVms ) { org.ovirt.engine.core.bll.RemoveDiskCommand.getVmStaticDAO ( ) . incrementDbGeneration ( vm.getId ( ) ) ; } org.ovirt.engine.core.bll.Backend.getInstance ( ) . EndAction ( VdcActionType.RemoveImage , org.ovirt.engine.core.bll.RemoveDiskCommand.getParameters ( ) . getImagesParameters ( ) . get ( 0 ) ) ; org.ovirt.engine.core.bll.RemoveDiskCommand.setSucceeded ( true ) ; }

Target:
private void incrementVmsGeneration ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VM > listVms = getVmsForDiskId ( ) ; for ( org.ovirt.engine.core.common.businessentities.VM vm : listVms ) { org.ovirt.engine.core.bll.RemoveDiskCommand.getVmStaticDAO ( ) . incrementDbGeneration ( vm.getId ( ) ) ; } }
Source:
public void testCreateManagementNetworkIfRequiredFailsOnDifferentVlanId ( ) { host.setActiveNic ( org.ovirt.engine.core.bll.network.NetworkConfiguratorTest.NIC_NAME ) ; nic.setVlanId ( org.ovirt.engine.core.bll.network.NetworkConfiguratorTest.NIC_VLAN_ID ) ; managementNetwork.setVlanId ( org.ovirt.engine.core.bll.network.NetworkConfiguratorTest.MANAGMENT_NETWORK_VLAN_ID ) ; final java.util.Map < java.lang.String , java.lang.String > capturedCustomValues = verifyAuditLoggableBaseFilledProperly ( underTest , AuditLogType.VLAN_ID_MISMATCH_FOR_MANAGEMENT_NETWORK_CONFIGURATION ) ; org.junit.Assert.assertThat ( capturedCustomValues , org.hamcrest.Matchers.allOf ( org.hamcrest.Matchers.hasEntry ( "vlanid" , java.lang.String.valueOf ( org.ovirt.engine.core.bll.network.NetworkConfiguratorTest.NIC_VLAN_ID ) ) , org.hamcrest.Matchers.hasEntry ( "mgmtvlanid" , java.lang.String.valueOf ( org.ovirt.engine.core.bll.network.NetworkConfiguratorTest.MANAGMENT_NETWORK_VLAN_ID ) ) , org.hamcrest.Matchers.hasEntry ( "interfacename" , org.ovirt.engine.core.bll.network.NetworkConfiguratorTest.NIC_NAME ) ) ) ; }

Target:
public void testCreateManagementNetworkIfRequiredFailsOnDifferentVlanId ( ) { host.setActiveNic ( org.ovirt.engine.core.bll.network.NetworkConfiguratorTest.NIC_NAME ) ; nic.setVlanId ( org.ovirt.engine.core.bll.network.NetworkConfiguratorTest.NIC_VLAN_ID ) ; managementNetwork.setVlanId ( org.ovirt.engine.core.bll.network.NetworkConfiguratorTest.MANAGMENT_NETWORK_VLAN_ID ) ; final java.util.Map < java.lang.String , java.lang.String > capturedCustomValues = verifyAuditLoggableBaseFilledProperly ( underTest , AuditLogType.VLAN_ID_MISMATCH_FOR_MANAGEMENT_NETWORK_CONFIGURATION ) ; org.hamcrest.MatcherAssert.assertThat ( capturedCustomValues , org.hamcrest.Matchers.allOf ( org.hamcrest.Matchers.hasEntry ( "vlanid" , java.lang.String.valueOf ( org.ovirt.engine.core.bll.network.NetworkConfiguratorTest.NIC_VLAN_ID ) ) , org.hamcrest.Matchers.hasEntry ( "mgmtvlanid" , java.lang.String.valueOf ( org.ovirt.engine.core.bll.network.NetworkConfiguratorTest.MANAGMENT_NETWORK_VLAN_ID ) ) , org.hamcrest.Matchers.hasEntry ( "interfacename" , org.ovirt.engine.core.bll.network.NetworkConfiguratorTest.NIC_NAME ) ) ) ; }
Source:
public void init ( ) { org.ovirt.engine.core.bll.dwh.DwhHeartBeat.log.info ( "Initializing DWH Heart Beat" ) ; heartBeatVar = new org.ovirt.engine.core.common.businessentities.DwhHistoryTimekeeping ( ) ; heartBeatVar.setVariable ( DwhHistoryTimekeepingVariable.HEART_BEAT ) ; org.ovirt.engine.core.utils.timer.SchedulerUtilQuartzImpl.getInstance ( ) . scheduleAFixedDelayJob ( this , org.ovirt.engine.core.bll.dwh.DwhHeartBeat.DWH_HEART_BEAT_METHOD , new java.lang.Class [ ] { } , new java.lang.Object [ ] { } , 0 , org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( ConfigValues.DwhHeartBeatInterval ) , java.util.concurrent.TimeUnit.SECONDS ) ; org.ovirt.engine.core.bll.dwh.DwhHeartBeat.log.info ( "DWH Heart Beat initialized" ) ; }

Target:
private void init ( ) { org.ovirt.engine.core.bll.dwh.DwhHeartBeat.log.info ( "Initializing DWH Heart Beat" ) ; heartBeatVar = new org.ovirt.engine.core.common.businessentities.DwhHistoryTimekeeping ( ) ; heartBeatVar.setVariable ( DwhHistoryTimekeepingVariable.HEART_BEAT ) ; schedulerUtil.scheduleAFixedDelayJob ( this , org.ovirt.engine.core.bll.dwh.DwhHeartBeat.DWH_HEART_BEAT_METHOD , new java.lang.Class [ ] { } , new java.lang.Object [ ] { } , 0 , org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( ConfigValues.DwhHeartBeatInterval ) , java.util.concurrent.TimeUnit.SECONDS ) ; org.ovirt.engine.core.bll.dwh.DwhHeartBeat.log.info ( "DWH Heart Beat initialized" ) ; }
Source:
public com.google.gwt.safehtml.shared.SafeHtml getTooltip ( java.lang.Object object ) { org.ovirt.engine.ui.uicommonweb.models.vms.ImportVmData importVmData = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.ImportVmData ) ( object ) ) ; java.lang.String problem = ( ( ! ( importVmData.getClone ( ) . getEntity ( ) ) ) && ( ( importVmData.getError ( ) ) != null ) ) ? importVmData.getError ( ) : importVmData.getWarning ( ) ; return problem != null ? com.google.gwt.safehtml.shared.SafeHtmlUtils.fromSafeConstant ( problem ) : null ; }

Target:
public com.google.gwt.safehtml.shared.SafeHtml getTooltip ( java.lang.Object object ) { org.ovirt.engine.ui.uicommonweb.models.vms.ImportVmData importVmData = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.ImportVmData ) ( object ) ) ; java.lang.String problem = null ; if ( ( importVmData.getError ( ) ) != null ) { problem = importVmData.getError ( ) ; } else { problem = ( importVmData.isNameExistsInTheSystem ( ) ) ? org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getConstants ( ) . nameMustBeUniqueInvalidReason ( ) : importVmData.getWarning ( ) ; } return problem != null ? com.google.gwt.safehtml.shared.SafeHtmlUtils.fromSafeConstant ( problem ) : null ; }
Source:
private java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > mockImages ( ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage image1 = new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ; image1.setImageId ( org.ovirt.engine.core.bll.snapshots.RemoveDiskSnapshotsCommandTest.IMAGE_ID_1 ) ; image1.setStorageIds ( new java.util.ArrayList ( java.util.Arrays.asList ( org.ovirt.engine.core.bll.snapshots.RemoveDiskSnapshotsCommandTest.STORAGE_DOMAIN_ID ) ) ) ; org.ovirt.engine.core.common.businessentities.storage.DiskImage image2 = new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ; image2.setImageId ( org.ovirt.engine.core.bll.snapshots.RemoveDiskSnapshotsCommandTest.IMAGE_ID_2 ) ; image2.setStorageIds ( new java.util.ArrayList ( java.util.Arrays.asList ( org.ovirt.engine.core.bll.snapshots.RemoveDiskSnapshotsCommandTest.STORAGE_DOMAIN_ID ) ) ) ; return new java.util.ArrayList ( java.util.Arrays.asList ( image1 , image2 ) ) ; }

Target:
private java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > mockImages ( ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage image1 = new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ; image1.setImageId ( org.ovirt.engine.core.bll.snapshots.RemoveDiskSnapshotsCommandTest.IMAGE_ID_1 ) ; image1.setStorageIds ( new java.util.ArrayList ( java.util.Collections.singletonList ( org.ovirt.engine.core.bll.snapshots.RemoveDiskSnapshotsCommandTest.STORAGE_DOMAIN_ID ) ) ) ; org.ovirt.engine.core.common.businessentities.storage.DiskImage image2 = new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ; image2.setImageId ( org.ovirt.engine.core.bll.snapshots.RemoveDiskSnapshotsCommandTest.IMAGE_ID_2 ) ; image2.setStorageIds ( new java.util.ArrayList ( java.util.Collections.singletonList ( org.ovirt.engine.core.bll.snapshots.RemoveDiskSnapshotsCommandTest.STORAGE_DOMAIN_ID ) ) ) ; return new java.util.ArrayList ( java.util.Arrays.asList ( image1 , image2 ) ) ; }
Source:
public void testStatisticalQuery ( ) throws java.lang.Exception { org.ovirt.engine.api.restapi.resource.VM entity = setUpStatisticalExpectations ( ) ; @ java.lang.SuppressWarnings ( value = "unchecked" ) org.ovirt.engine.api.restapi.resource.BackendStatisticsResource < org.ovirt.engine.api.model.Vm , org.ovirt.engine.api.restapi.resource.VM > statisticsResource = ( ( org.ovirt.engine.api.restapi.resource.BackendStatisticsResource < org.ovirt.engine.api.model.Vm , org.ovirt.engine.api.restapi.resource.VM > ) ( resource.getStatisticsResource ( ) ) ) ; org.junit.Assert.assertNotNull ( statisticsResource ) ; verifyQuery ( statisticsResource.getQuery ( ) , entity ) ; }

Target:
public void testStatisticalQuery ( ) throws java.lang.Exception { org.ovirt.engine.api.restapi.resource.VM entity = setUpStatisticalExpectations ( ) ; @ java.lang.SuppressWarnings ( value = "unchecked" ) org.ovirt.engine.api.restapi.resource.BackendStatisticsResource < org.ovirt.engine.api.model.Vm , org.ovirt.engine.api.restapi.resource.VM > statisticsResource = ( ( org.ovirt.engine.api.restapi.resource.BackendStatisticsResource < org.ovirt.engine.api.model.Vm , org.ovirt.engine.api.restapi.resource.VM > ) ( resource.getStatisticsResource ( ) ) ) ; org.junit.jupiter.api.Assertions.assertNotNull ( statisticsResource ) ; verifyQuery ( statisticsResource.getQuery ( ) , entity ) ; }
Source:
public void testMemoryMapping ( ) { org.ovirt.engine.core.common.businessentities.VDS vds = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; vds.setId ( Guid.Empty ) ; vds.setPhysicalMemMb ( 4000 ) ; org.ovirt.engine.api.model.Host host = org.ovirt.engine.api.restapi.types.HostMapper.map ( vds , ( ( org.ovirt.engine.api.model.Host ) ( null ) ) ) ; assertNotNull ( host.getMemory ( ) ) ; assertEquals ( java.lang.Long.valueOf ( 4194304000L ) , host.getMemory ( ) ) ; }

Target:
public void testMemoryMapping ( ) { org.ovirt.engine.core.common.businessentities.VDS vds = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; vds.setId ( Guid.Empty ) ; vds.setPhysicalMemMb ( 4000 ) ; org.ovirt.engine.api.model.Host host = org.ovirt.engine.api.restapi.types.HostMapper.map ( vds , ( ( org.ovirt.engine.api.model.Host ) ( null ) ) ) ; org.junit.Assert.assertNotNull ( host.getMemory ( ) ) ; org.junit.Assert.assertEquals ( java.lang.Long.valueOf ( 4194304000L ) , host.getMemory ( ) ) ; }
Source:
private java.lang.String getPasswordInput ( ) throws org.ovirt.engine.extensions.aaa.builtin.tools.ManageDomainsResult { java.lang.String pass = null ; if ( args.contains ( org.ovirt.engine.extensions.aaa.builtin.tools.ManageDomainsArguments.ARG_PASSWORD_FILE ) ) { try { pass = readPasswordFile ( args.get ( org.ovirt.engine.extensions.aaa.builtin.tools.ManageDomainsArguments.ARG_PASSWORD_FILE ) ) ; } catch ( java.lang.Exception e ) { throw new org.ovirt.engine.extensions.aaa.builtin.tools.ManageDomainsResult ( ManageDomainsResultEnum.FAILURE_READING_PASSWORD_FILE , e.getMessage ( ) ) ; } } else { pass = readInteractively ( "Enter password:" , true ) ; } validatePassword ( pass ) ; return pass ; }

Target:
private java.lang.String getPasswordInput ( ) throws org.ovirt.engine.extensions.aaa.builtin.tools.ManageDomainsResult { java.lang.String pass = null ; if ( args.containsKey ( org.ovirt.engine.extensions.aaa.builtin.tools.ManageDomainsArguments.ARG_PASSWORD_FILE ) ) { try { pass = readPasswordFile ( ( ( java.lang.String ) ( args.get ( org.ovirt.engine.extensions.aaa.builtin.tools.ManageDomainsArguments.ARG_PASSWORD_FILE ) ) ) ) ; } catch ( java.lang.Exception e ) { throw new org.ovirt.engine.extensions.aaa.builtin.tools.ManageDomainsResult ( ManageDomainsResultEnum.FAILURE_READING_PASSWORD_FILE , e.getMessage ( ) ) ; } } else { pass = readInteractively ( "Enter password:" , true ) ; } validatePassword ( pass ) ; return pass ; }
Source:
protected boolean activateOrDeactivateNic ( org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface nic , org.ovirt.engine.core.common.action.PlugAction plugAction ) { org.ovirt.engine.core.common.action.VdcReturnValueBase returnValue = org.ovirt.engine.core.bll.network.vm.AbstractVmInterfaceCommand.getBackend ( ) . runInternalAction ( VdcActionType.ActivateDeactivateVmNic , createActivateDeactivateParameters ( nic , plugAction ) ) ; if ( ! ( returnValue.getSucceeded ( ) ) ) { propagateFailure ( returnValue ) ; } return returnValue.getSucceeded ( ) ; }

Target:
protected boolean activateOrDeactivateNic ( org.ovirt.engine.core.common.businessentities.network.VmNic nic , org.ovirt.engine.core.common.action.PlugAction plugAction ) { org.ovirt.engine.core.common.action.VdcReturnValueBase returnValue = org.ovirt.engine.core.bll.network.vm.AbstractVmInterfaceCommand.getBackend ( ) . runInternalAction ( VdcActionType.ActivateDeactivateVmNic , createActivateDeactivateParameters ( nic , plugAction ) ) ; if ( ! ( returnValue.getSucceeded ( ) ) ) { propagateFailure ( returnValue ) ; } return returnValue.getSucceeded ( ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc setVmTicket ( java.lang.String vmId , java.lang.String otp64 , java.lang.String sec ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.setVmTicket ( vmId , otp64 , sec ) ; 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 freeze ( java.lang.String vmId ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.freeze ( vmId ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( xmlRpcReturnValue ) ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
public void testSaveConfig ( ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSessionConfiguration sessionConfig = getGlusterGeoRepSessionConfig ( ) ; dao.saveConfig ( sessionConfig ) ; java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSessionConfiguration > fetchedSessionConfig = dao.getGeoRepSessionConfig ( FixturesTool.GLUSTER_GEOREP_SESSION_ID ) ; org.junit.Assert.assertEquals ( sessionConfig , fetchedSessionConfig.get ( 0 ) ) ; }

Target:
public void testSaveConfig ( ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSessionConfiguration sessionConfig = getGlusterGeoRepSessionConfig ( ) ; dao.saveConfig ( sessionConfig ) ; java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSessionConfiguration > fetchedSessionConfigList = dao.getGeoRepSessionConfig ( FixturesTool.GLUSTER_GEOREP_SESSION_ID ) ; org.junit.Assert.assertEquals ( sessionConfig , fetchedSessionConfigList.get ( 0 ) ) ; org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSessionConfiguration fetchedSessionConfig = dao.getGeoRepSessionConfigByKey ( FixturesTool.GLUSTER_GEOREP_SESSION_ID , org.ovirt.engine.core.dao.gluster.GlusterGeoRepDaoTest.GEOREP_CONFIG_CRAWL ) ; org.junit.Assert.assertEquals ( sessionConfig , fetchedSessionConfig ) ; }
Source:
public int hashCode ( ) { final int prime = 31 ; int result = 1 ; result = ( prime * result ) + ( ( getNetworkMappings ( ) ) == null ? 0 : getNetworkMappings ( ) . hashCode ( ) ) ; result = ( prime * result ) + ( ( getQpidConfiguration ( ) ) == null ? 0 : getQpidConfiguration ( ) . hashCode ( ) ) ; return result ; }

Target:
public int hashCode ( ) { final int prime = 31 ; int result = 1 ; result = ( prime * result ) + ( ( getNetworkMappings ( ) ) == null ? 0 : getNetworkMappings ( ) . hashCode ( ) ) ; result = ( prime * result ) + ( ( getMessagingConfiguration ( ) ) == null ? 0 : getMessagingConfiguration ( ) . hashCode ( ) ) ; return result ; }
Source:
public void rollback ( ) { super . rollback ( ) ; final org.ovirt.engine.core.compat.Guid vdsId = org.ovirt.engine.core.bll.RestartVdsCommand.getVdsId ( ) ; org.ovirt.engine.core.bll.RestartVdsCommand.log.warnFormat ( "Restart host action failed, updating host {0} to {1}" , vdsId , VDSStatus.NonResponsive.name ( ) ) ; org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInNewTransaction ( new org.ovirt.engine.core.utils.transaction.TransactionMethod < java.lang.Void > ( ) { @ java.lang.Override public java.lang.Void runInTransaction ( ) { org.ovirt.engine.core.bll.Backend.getInstance ( ) . getResourceManager ( ) . RunVdsCommand ( VDSCommandType.SetVdsStatus , new org.ovirt.engine.core.common.vdscommands.SetVdsStatusVDSCommandParameters ( vdsId , org.ovirt.engine.core.common.businessentities.VDSStatus.NonResponsive ) ) ; return null ; } } ) ; }

Target:
public void rollback ( ) { super . rollback ( ) ; final org.ovirt.engine.core.compat.Guid vdsId = org.ovirt.engine.core.bll.RestartVdsCommand.getVdsId ( ) ; org.ovirt.engine.core.bll.RestartVdsCommand.log.warnFormat ( "Restart host action failed, updating host {0} to {1}" , vdsId , VDSStatus.NonResponsive.name ( ) ) ; runVdsCommand ( VDSCommandType.SetVdsStatus , new org.ovirt.engine.core.common.vdscommands.SetVdsStatusVDSCommandParameters ( vdsId , org.ovirt.engine.core.common.businessentities.VDSStatus.NonResponsive ) ) ; }
Source:
protected void itemsChanged ( ) { super . itemsChanged ( ) ; UpdateActionAvailability ( ) ; }

Target:
public void executeCommand ( org.ovirt.engine.ui.uicommonweb.UICommand command ) { super . executeCommand ( command ) ; if ( command == ( getManageEventsCommand ( ) ) ) { manageEvents ( ) ; } if ( org.ovirt.engine.core.compat.StringHelper.stringsEqual ( command.getName ( ) , "OnSave" ) ) { onSave ( ) ; } if ( org.ovirt.engine.core.compat.StringHelper.stringsEqual ( command.getName ( ) , "Cancel" ) ) { cancel ( ) ; } }
Source:
public org.ovirt.engine.core.common.businessentities.VDS getFirstUpRhelForVdsGroup ( org.ovirt.engine.core.compat.Guid vdsGroupId ) { java.util.List < org.ovirt.engine.core.common.businessentities.VDS > vds = getCallsHandler ( ) . executeReadList ( "getFirstUpRhelForVdsGroupId" , org.ovirt.engine.core.dao.VdsDaoImpl.VdsRowMapper.instance , getCustomMapSqlParameterSource ( ) . addValue ( "vds_group_id" , vdsGroupId ) ) ; return ( vds.size ( ) ) != 0 ? vds.iterator ( ) . next ( ) : null ; }

Target:
public org.ovirt.engine.core.common.businessentities.VDS getFirstUpRhelForCluster ( org.ovirt.engine.core.compat.Guid clsuterId ) { java.util.List < org.ovirt.engine.core.common.businessentities.VDS > vds = getCallsHandler ( ) . executeReadList ( "getFirstUpRhelForClusterId" , org.ovirt.engine.core.dao.VdsDaoImpl.VdsRowMapper.instance , getCustomMapSqlParameterSource ( ) . addValue ( "cluster_id" , clsuterId ) ) ; return ( vds.size ( ) ) != 0 ? vds.iterator ( ) . next ( ) : null ; }
Source:
private org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface createNicSyncedWithNetwork ( java.lang.String nicName , org.ovirt.engine.core.common.businessentities.network.Network network ) { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic = createVdsInterface ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) , nicName , false , null , network.getvlan_id ( ) , network.getName ( ) , network.isVmNetwork ( ) ) ; return nic ; }

Target:
private org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface createNicSyncedWithNetwork ( java.lang.String nicName , org.ovirt.engine.core.common.businessentities.network.Network network ) { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic = createVdsInterface ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) , nicName , false , null , network.getVlanId ( ) , network.getName ( ) , network.isVmNetwork ( ) ) ; return nic ; }
Source:
public void template_SelectedItemChanged ( ) { super . template_SelectedItemChanged ( ) ; org.ovirt.engine.core.common.businessentities.VmTemplate template = getModel ( ) . getTemplate ( ) . getSelectedItem ( ) ; if ( template == null ) { return ; } setupWindowModelFrom ( template ) ; updateHostPinning ( template.getMigrationSupport ( ) ) ; doChangeDefautlHost ( template.getDedicatedVmForVds ( ) ) ; }

Target:
public void template_SelectedItemChanged ( ) { super . template_SelectedItemChanged ( ) ; org.ovirt.engine.core.common.businessentities.VmTemplate template = getModel ( ) . getTemplate ( ) . getSelectedItem ( ) ; if ( template == null ) { return ; } setupWindowModelFrom ( template ) ; doChangeDefautlHost ( template.getDedicatedVmForVds ( ) ) ; updateRngDevice ( template.getId ( ) ) ; }
Source:
protected void onHide ( ) { super . onHide ( ) ; roleModelProvider.getModel ( ) . stopRefresh ( ) ; permissionModelProvider.getModel ( ) . stopRefresh ( ) ; systemPermissionModelProvider.getModel ( ) . stopRefresh ( ) ; }

Target:
protected void onHide ( ) { super . onHide ( ) ; roleModelProvider.getModel ( ) . stopRefresh ( ) ; permissionModelProvider.getModel ( ) . stopRefresh ( ) ; systemPermissionModelProvider.getModel ( ) . stopRefresh ( ) ; clusterPolicyModelProvider.getModel ( ) . stopRefresh ( ) ; clusterPolicyClusterModelProvider.getModel ( ) . stopRefresh ( ) ; }
Source:
public void sendMessage ( byte [ ] message ) throws org.ovirt.vdsm.jsonrpc.client.ClientConnectionException { try { waitForConnect ( ) ; } finally { send ( new org.ovirt.vdsm.jsonrpc.client.reactors.stomp.impl.Message ( ) . send ( ) . withHeader ( org.ovirt.vdsm.jsonrpc.client.reactors.stomp.impl.Message.HEADER_DESTINATION , this . getRequestQueue ( ) ) . withHeader ( org.ovirt.vdsm.jsonrpc.client.reactors.stomp.impl.Message.HEADER_REPLY_TO , getResponseQueue ( ) ) . withContent ( message ) . build ( ) ) ; } }

Target:
public void sendMessage ( byte [ ] message ) throws org.ovirt.vdsm.jsonrpc.client.ClientConnectionException { try { waitForConnect ( ) ; } finally { send ( new org.ovirt.vdsm.jsonrpc.client.reactors.stomp.impl.Message ( ) . send ( ) . withHeader ( org.ovirt.vdsm.jsonrpc.client.reactors.stomp.impl.Message.HEADER_DESTINATION , this . getRequestQueue ( ) ) . withHeader ( org.ovirt.vdsm.jsonrpc.client.reactors.stomp.impl.Message.HEADER_REPLY_TO , getResponseQueue ( ) ) . withCorrelationId ( ) . withContent ( message ) . build ( ) ) ; } }
Source:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel ) ( ( ( org.ovirt.engine.ui.uicommonweb.models.userportal.UserPortalListModel ) ( result.getState ( ) ) ) . getConfirmWindow ( ) ) ) ; model.stopProgress ( ) ; cancel ( ) ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object result ) { org.ovirt.engine.ui.uicommonweb.models.vms.RunOnceModel runOnceModel = new org.ovirt.engine.ui.uicommonweb.models.vms.UserPortalRunOnceModel ( ( ( org.ovirt.engine.core.common.businessentities.VM ) ( result ) ) , getCustomPropertiesKeysList ( ) . get ( ( ( org.ovirt.engine.core.common.businessentities.VM ) ( result ) ) . getVdsGroupCompatibilityVersion ( ) ) , this ) ; setWindow ( runOnceModel ) ; runOnceModel.init ( ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc glusterVolumeBrickAdd ( java.lang.String volumeName , java.lang.String [ ] bricks , int replicaCount , int stripeCount ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "GlusterVolume.addBrick" ) . withParameter ( "volumeName" , volumeName ) . withParameter ( "brickList" , new java.util.ArrayList < > ( java.util.Arrays.asList ( bricks ) ) ) . withParameter ( "replicaCount" , replicaCount ) . withParameter ( "stripeCount" , stripeCount ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( response ) ; }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc glusterVolumeReplaceBrickCommitForce ( java.lang.String volumeName , java.lang.String existingBrickDir , java.lang.String newBrickDir ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "GlusterVolume.replaceBrickCommitForce" ) . withParameter ( "volumeName" , volumeName ) . withParameter ( "existingBrick" , existingBrickDir ) . withParameter ( "newBrick" , newBrickDir ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( response ) ; }
Source:
public java.util.List < org.ovirt.engine.api.model.Statistic > getStatistics ( org.ovirt.engine.core.common.businessentities.VmNetworkInterface iface ) { org.ovirt.engine.core.common.businessentities.NetworkStatistics s = iface.getStatistics ( ) ; return asList ( setDatum ( clone ( org.ovirt.engine.api.restapi.resource.NicStatisticalQuery.DATA_RX ) , s.getReceiveRate ( ) ) , setDatum ( clone ( org.ovirt.engine.api.restapi.resource.NicStatisticalQuery.DATA_TX ) , s.getTransmitRate ( ) ) , setDatum ( clone ( org.ovirt.engine.api.restapi.resource.NicStatisticalQuery.ERRS_RX ) , s.getReceiveDropRate ( ) ) , setDatum ( clone ( org.ovirt.engine.api.restapi.resource.NicStatisticalQuery.ERRS_TX ) , s.getTransmitDropRate ( ) ) ) ; }

Target:
public java.util.List < org.ovirt.engine.api.model.Statistic > getStatistics ( org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface iface ) { org.ovirt.engine.core.common.businessentities.network.NetworkStatistics s = iface.getStatistics ( ) ; return asList ( setDatum ( clone ( org.ovirt.engine.api.restapi.resource.NicStatisticalQuery.DATA_RX ) , s.getReceiveRate ( ) ) , setDatum ( clone ( org.ovirt.engine.api.restapi.resource.NicStatisticalQuery.DATA_TX ) , s.getTransmitRate ( ) ) , setDatum ( clone ( org.ovirt.engine.api.restapi.resource.NicStatisticalQuery.ERRS_RX ) , s.getReceiveDropRate ( ) ) , setDatum ( clone ( org.ovirt.engine.api.restapi.resource.NicStatisticalQuery.ERRS_TX ) , s.getTransmitDropRate ( ) ) ) ; }
Source:
public void getClusterGlusterServices ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.core.common.queries.gluster.GlusterVolumeAdvancedDetailsParameters parameters = new org.ovirt.engine.core.common.queries.gluster.GlusterVolumeAdvancedDetailsParameters ( clusterId , null , null , false ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterVolumeAdvancedDetails , parameters , aQuery ) ; }

Target:
public void getGlusterHostsNewlyAdded ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId , boolean isFingerprintRequired ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAddedGlusterServers , new org.ovirt.engine.core.common.queries.gluster.AddedGlusterServersParameters ( clusterId , isFingerprintRequired ) , aQuery ) ; }
Source:
void updateButtonResources ( ) { buttonUpStart = resources.footerButtonUpStart ( ) . getURL ( ) ; buttonUpStretch = resources.footerButtonUpStretch ( ) . getURL ( ) ; buttonUpEnd = resources.footerButtonUpEnd ( ) . getURL ( ) ; buttonDownStart = resources.footerButtonDownStart ( ) . getURL ( ) ; buttonDownStretch = resources.footerButtonDownStretch ( ) . getURL ( ) ; buttonDownEnd = resources.footerButtonDownEnd ( ) . getURL ( ) ; }

Target:
void updateButtonResources ( ) { buttonUpStart = org.ovirt.engine.ui.webadmin.widget.footer.AlertsEventsFooterView.resources.footerButtonUpStart ( ) . getURL ( ) ; buttonUpStretch = org.ovirt.engine.ui.webadmin.widget.footer.AlertsEventsFooterView.resources.footerButtonUpStretch ( ) . getURL ( ) ; buttonUpEnd = org.ovirt.engine.ui.webadmin.widget.footer.AlertsEventsFooterView.resources.footerButtonUpEnd ( ) . getURL ( ) ; buttonDownStart = org.ovirt.engine.ui.webadmin.widget.footer.AlertsEventsFooterView.resources.footerButtonDownStart ( ) . getURL ( ) ; buttonDownStretch = org.ovirt.engine.ui.webadmin.widget.footer.AlertsEventsFooterView.resources.footerButtonDownStretch ( ) . getURL ( ) ; buttonDownEnd = org.ovirt.engine.ui.webadmin.widget.footer.AlertsEventsFooterView.resources.footerButtonDownEnd ( ) . getURL ( ) ; }
Source:
private void afterMigrationFrom ( org.ovirt.engine.core.common.businessentities.VmDynamic runningVm , org.ovirt.engine.core.common.businessentities.VM vmToUpdate ) { org.ovirt.engine.core.common.businessentities.VMStatus oldVmStatus = vmToUpdate.getStatus ( ) ; if ( ( oldVmStatus == ( org.ovirt.engine.core.common.businessentities.VMStatus.MigratingFrom ) ) && ( runningVm.getstatus ( ) . isGuestUp ( ) ) ) { _vmsToRerun.add ( runningVm.getId ( ) ) ; org.ovirt.engine.core.vdsbroker.VdsUpdateRunTimeInfo.log.infoFormat ( "adding VM {0} to re-run list" , runningVm.getId ( ) ) ; vmToUpdate.setMigratingToVds ( null ) ; } }

Target:
private void afterMigrationFrom ( org.ovirt.engine.core.common.businessentities.VmDynamic runningVm , org.ovirt.engine.core.common.businessentities.VM vmToUpdate ) { org.ovirt.engine.core.common.businessentities.VMStatus oldVmStatus = vmToUpdate.getStatus ( ) ; org.ovirt.engine.core.common.businessentities.VMStatus currentVmStatus = runningVm.getstatus ( ) ; if ( ( ( oldVmStatus == ( org.ovirt.engine.core.common.businessentities.VMStatus.MigratingFrom ) ) && ( currentVmStatus != ( org.ovirt.engine.core.common.businessentities.VMStatus.MigratingFrom ) ) ) && ( currentVmStatus.isRunning ( ) ) ) { _vmsToRerun.add ( runningVm.getId ( ) ) ; org.ovirt.engine.core.vdsbroker.VdsUpdateRunTimeInfo.log.infoFormat ( "Adding VM {0} to re-run list" , runningVm.getId ( ) ) ; vmToUpdate.setMigratingToVds ( null ) ; } }
Source:
protected void doTestBadRemove ( boolean valid , boolean success , java.lang.String detail ) throws java.lang.Exception { setUpGetEntityExpectations ( asList ( getEntity ( 1 ) ) ) ; setUriInfo ( setUpActionExpectations ( ActionType.RemoveSnapshot , org.ovirt.engine.core.common.action.RemoveSnapshotParameters.class , new java.lang.String [ ] { "SnapshotId" , "VmId" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendSnapshotResourceTest.SNAPSHOT_ID , org.ovirt.engine.api.restapi.resource.BackendSnapshotResourceTest.VM_ID } , valid , success ) ) ; try { resource.remove ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }

Target:
protected void doTestBadRemove ( boolean valid , boolean success , java.lang.String detail ) throws java.lang.Exception { setUpGetEntityExpectations ( asList ( getEntity ( 1 ) ) ) ; setUriInfo ( setUpActionExpectations ( ActionType.RemoveSnapshot , org.ovirt.engine.core.common.action.RemoveSnapshotParameters.class , new java.lang.String [ ] { "SnapshotId" , "VmId" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendSnapshotResourceTest.SNAPSHOT_ID , org.ovirt.engine.api.restapi.resource.BackendSnapshotResourceTest.VM_ID } , valid , success ) ) ; try { resource.remove ( ) ; org.junit.Assert.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }
Source:
public static void main ( java.lang.String ... args ) { try { org.ovirt.engine.core.config.EngineConfig.getInstance ( ) . setParser ( new org.ovirt.engine.core.config.EngineConfigCLIParser ( ) ) ; org.ovirt.engine.core.config.EngineConfig.getInstance ( ) . setUpAndExecute ( args ) ; } catch ( java.lang.Throwable t ) { org.ovirt.engine.core.config.EngineConfig.log.debug ( "Exiting with error: " , t ) ; java.lang.System.err.println ( t.getMessage ( ) ) ; java.lang.System.exit ( 1 ) ; } }

Target:
public static void main ( java.lang.String ... args ) { try { org.apache.log4j.Logger.getRootLogger ( ) . setLevel ( org.apache.log4j.Level.OFF ) ; org.ovirt.engine.core.config.EngineConfig.getInstance ( ) . setParser ( new org.ovirt.engine.core.config.EngineConfigCLIParser ( ) ) ; org.ovirt.engine.core.config.EngineConfig.getInstance ( ) . setUpAndExecute ( args ) ; } catch ( java.lang.Throwable t ) { org.ovirt.engine.core.config.EngineConfig.log.debug ( "Exiting with error: " , t ) ; java.lang.System.err.println ( t.getMessage ( ) ) ; java.lang.System.exit ( 1 ) ; } }
Source:
public static void getAllDataCenterNetworks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId ) { 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.network.Network > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.Network > ( ) ; } } ; org.ovirt.engine.core.common.queries.IdQueryParameters params = new org.ovirt.engine.core.common.queries.IdQueryParameters ( storagePoolId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetNetworksByDataCenterId , params , aQuery ) ; }

Target:
public static void getDiskList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ( ) ; } } ; org.ovirt.engine.core.common.queries.SearchParameters searchParams = new org.ovirt.engine.core.common.queries.SearchParameters ( "Disks:" , org.ovirt.engine.core.common.interfaces.SearchType.Disk ) ; searchParams.setMaxCount ( 9999 ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , searchParams , aQuery ) ; }
Source:
public void OnSuccess ( java.lang.Object model , java.lang.Object ReturnValue ) { org.ovirt.engine.ui.frontend.Frontend.setLoggedInUser ( null ) ; getLoginModel ( ) . resetAfterLogout ( ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.clearCache ( ) ; connectAutomaticallyManager.resetAlreadyOpened ( ) ; org.ovirt.engine.ui.userportal.system.ApplicationInit.super . onLogout ( ) ; }

Target:
public void OnSuccess ( java.lang.Object model , java.lang.Object ReturnValue ) { if ( clientAgentType.isIE8OrBelow ( ) ) { Window.Location.reload ( ) ; } org.ovirt.engine.ui.frontend.Frontend.setLoggedInUser ( null ) ; getLoginModel ( ) . resetAfterLogout ( ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.clearCache ( ) ; connectAutomaticallyManager.resetAlreadyOpened ( ) ; org.ovirt.engine.ui.userportal.system.ApplicationInit.super . onLogout ( ) ; }