auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public static org.ovirt.engine.core.compat.RpmVersion getOvirtHostOsVersion ( org.ovirt.engine.core.common.businessentities.VDS vds ) { org.ovirt.engine.core.compat.RpmVersion vdsOsVersion = null ; try { vdsOsVersion = new org.ovirt.engine.core.compat.RpmVersion ( vds.gethost_os ( ) , "RHEV Hypervisor -" , true ) ; } catch ( java.lang.RuntimeException e ) { org.ovirt.engine.core.bll.VdsHandler.log.errorFormat ( "Failed to parse version of Host {0},{1} and Host OS '{2}' with error {3}" , vds.getId ( ) , vds.getvds_name ( ) , vds.gethost_os ( ) , org.apache.commons.lang.exception.ExceptionUtils.getMessage ( e ) ) ; } return vdsOsVersion ; }

Target:
public static org.ovirt.engine.core.compat.RpmVersion getOvirtHostOsVersion ( org.ovirt.engine.core.common.businessentities.VDS vds ) { org.ovirt.engine.core.compat.RpmVersion vdsOsVersion = null ; try { vdsOsVersion = new org.ovirt.engine.core.compat.RpmVersion ( vds.getHostOs ( ) , "RHEV Hypervisor -" , true ) ; } catch ( java.lang.RuntimeException e ) { org.ovirt.engine.core.bll.VdsHandler.log.errorFormat ( "Failed to parse version of Host {0},{1} and Host OS '{2}' with error {3}" , vds.getId ( ) , vds.getVdsName ( ) , vds.getHostOs ( ) , org.apache.commons.lang.exception.ExceptionUtils.getMessage ( e ) ) ; } return vdsOsVersion ; }
Source:
protected void setDefaultSelectedProtocol ( ) { java.util.List < org.ovirt.engine.ui.uicommonweb.models.ConsoleProtocol > allProtocols = new java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.ConsoleProtocol > ( java.util.Arrays.asList ( org.ovirt.engine.ui.uicommonweb.models.ConsoleProtocol.values ( ) ) ) ; if ( ( selectedProtocol ) != null ) { allProtocols.remove ( selectedProtocol ) ; allProtocols.add ( 0 , selectedProtocol ) ; } for ( org.ovirt.engine.ui.uicommonweb.models.ConsoleProtocol protocol : allProtocols ) { if ( canSelectProtocol ( protocol ) ) { selectProtocol ( protocol ) ; break ; } } }

Target:
protected void setDefaultSelectedProtocol ( ) { java.util.List < org.ovirt.engine.ui.uicommonweb.models.ConsoleProtocol > allProtocols = org.ovirt.engine.ui.uicommonweb.models.ConsoleProtocol.getProtocolsByPriority ( ) ; java.util.Collections.reverse ( allProtocols ) ; if ( ( selectedProtocol ) != null ) { allProtocols.remove ( selectedProtocol ) ; allProtocols.add ( 0 , selectedProtocol ) ; } for ( org.ovirt.engine.ui.uicommonweb.models.ConsoleProtocol protocol : allProtocols ) { if ( canSelectProtocol ( protocol ) ) { selectProtocol ( protocol ) ; break ; } } }
Source:
private void setUpEntityQueryExpectations ( int times , java.lang.Object failure ) throws java.lang.Exception { while ( ( times -- ) > 0 ) { setUpEntityQueryExpectations ( VdcQueryType.GetVmTemplate , org.ovirt.engine.core.common.queries.GetVmTemplateParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendTemplateCdromsResourceTest.TEMPLATE_ID } , getTemplate ( ) , failure ) ; } }

Target:
private void setUpEntityQueryExpectations ( int times , java.lang.Object failure ) throws java.lang.Exception { while ( ( times -- ) > 0 ) { setUpEntityQueryExpectations ( QueryType.GetVmTemplate , org.ovirt.engine.core.common.queries.GetVmTemplateParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendTemplateCdromsResourceTest.TEMPLATE_ID } , getTemplate ( ) , failure ) ; } }
Source:
private void updateCanSpecify ( ) { org.ovirt.engine.core.common.businessentities.network.Network network = ( ( org.ovirt.engine.core.common.businessentities.network.Network ) ( getNetwork ( ) . getSelectedItem ( ) ) ) ; boolean isChangable = ( bootProtocolsAvailable ) && ( getIsStaticAddress ( ) ) ; getAddress ( ) . setIsChangable ( isChangable ) ; getSubnet ( ) . setIsChangable ( isChangable ) ; }

Target:
private void updateCanSpecify ( ) { boolean isChangable = ( bootProtocolsAvailable ) && ( getIsStaticAddress ( ) ) ; getAddress ( ) . setIsChangable ( isChangable ) ; getSubnet ( ) . setIsChangable ( isChangable ) ; getGateway ( ) . setIsChangable ( isChangable ) ; }
Source:
protected void executeVdsBrokerCommand ( ) { org.ovirt.engine.core.compat.Guid vmId = org.ovirt.engine.core.vdsbroker.vdsbroker.CancelMigrateVDSCommand.getParameters ( ) . getVmId ( ) ; status = org.ovirt.engine.core.vdsbroker.vdsbroker.CancelMigrateVDSCommand.getBroker ( ) . migrateCancel ( vmId.toString ( ) ) ; proceedProxyReturnValue ( ) ; if ( ! ( org.ovirt.engine.core.vdsbroker.vdsbroker.CancelMigrateVDSCommand.getParameters ( ) . isRerunAfterCancel ( ) ) ) { org.ovirt.engine.core.vdsbroker.ResourceManager.getInstance ( ) . RemoveAsyncRunningVm ( vmId ) ; } }

Target:
protected void executeVdsBrokerCommand ( ) { org.ovirt.engine.core.compat.Guid vmId = org.ovirt.engine.core.vdsbroker.vdsbroker.CancelMigrateVDSCommand.getParameters ( ) . getVmId ( ) ; status = org.ovirt.engine.core.vdsbroker.vdsbroker.CancelMigrateVDSCommand.getBroker ( ) . migrateCancel ( vmId.toString ( ) ) ; proceedProxyReturnValue ( ) ; if ( ! ( org.ovirt.engine.core.vdsbroker.vdsbroker.CancelMigrateVDSCommand.getParameters ( ) . isRerunAfterCancel ( ) ) ) { org.ovirt.engine.core.vdsbroker.ResourceManager.getInstance ( ) . removeAsyncRunningVm ( vmId ) ; } }
Source:
public void testDedicatedHostNotExistOrNotSameCluster ( ) { prepareVmToPassCanDoAction ( ) ; org.mockito.Mockito.doReturn ( vdsDao ) . when ( command ) . getVdsDao ( ) ; org.mockito.Mockito.doReturn ( false ) . when ( command ) . isDedicatedVdsExistOnSameCluster ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.VmBase.class ) , org.mockito.Matchers.any ( java.util.ArrayList.class ) ) ; vmStatic.setDedicatedVmForVdsList ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; org.junit.Assert.assertFalse ( "canDoAction should have failed with invalid dedicated host." , command.canDoAction ( ) ) ; }

Target:
public void testValidName ( ) { prepareVmToPassValidate ( ) ; mockVmValidator ( ) ; command.initEffectiveCompatibilityVersion ( ) ; boolean c = command.validate ( ) ; org.junit.Assert.assertTrue ( "validate should have passed." , c ) ; }
Source:
private void postInitTemplate ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmTemplate > templates ) { org.ovirt.engine.core.common.businessentities.VmTemplate oldTemplate = getModel ( ) . getTemplate ( ) . getSelectedItem ( ) ; getModel ( ) . getTemplate ( ) . setItems ( templates ) ; getModel ( ) . getTemplate ( ) . setSelectedItem ( org.ovirt.engine.ui.uicommonweb.Linq.firstOrDefault ( templates , ( oldTemplate != null ? new org.ovirt.engine.ui.uicommonweb.Linq.TemplatePredicate ( oldTemplate.getId ( ) ) : new org.ovirt.engine.ui.uicommonweb.Linq.TemplatePredicate ( org.ovirt.engine.core.compat.Guid.Empty ) ) ) ) ; updateIsDisksAvailable ( ) ; }

Target:
private void postInitTemplate ( java.util.List < org.ovirt.engine.core.common.businessentities.VmTemplate > templates ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmTemplate > baseTemplates = filterNotBaseTemplates ( templates ) ; org.ovirt.engine.core.common.businessentities.VmTemplate prevBaseTemplate = getModel ( ) . getBaseTemplate ( ) . getSelectedItem ( ) ; getModel ( ) . getBaseTemplate ( ) . setItems ( baseTemplates ) ; getModel ( ) . getBaseTemplate ( ) . setSelectedItem ( org.ovirt.engine.ui.uicommonweb.Linq.firstOrDefault ( baseTemplates , new org.ovirt.engine.ui.uicommonweb.Linq.TemplatePredicate ( ( prevBaseTemplate != null ? prevBaseTemplate.getId ( ) : org.ovirt.engine.core.compat.Guid.Empty ) ) ) ) ; updateIsDisksAvailable ( ) ; }
Source:
public void getStorageConnectionsByDataCenterIdAndStorageType ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.common.businessentities.StorageType storageType ) { 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.GetConnectionsByDataCenterAndStorageTypeParameters params = new org.ovirt.engine.core.common.queries.GetConnectionsByDataCenterAndStorageTypeParameters ( storagePoolId , storageType ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetConnectionsByDataCenterAndStorageType , params , aQuery ) ; }

Target:
public void getVmList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String poolName ) { 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 ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > vms = org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VM > cast ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.IVdcQueryable > ) ( source ) ) ) ; return vms ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( ( "Vms: pool=" + poolName ) , org.ovirt.engine.core.common.interfaces.SearchType.VM ) , aQuery ) ; }
Source:
public void testGetDataAndSetDataWithFullSession ( ) { org.ovirt.engine.core.utils.ThreadLocalParamsContainer.setHttpSessionId ( org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_SESSION_ID ) ; org.junit.Assert.assertTrue ( "Set should fail with an empty session" , container.SetData ( org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_KEY , org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_VALUE ) ) ; org.junit.Assert.assertEquals ( "Get should return null with an empty session" , org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_VALUE , container.GetData ( org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_KEY ) ) ; org.junit.Assert.assertEquals ( "Get should return the value with a given session" , org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_VALUE , container.GetData ( org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_SESSION_ID , org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_KEY ) ) ; }

Target:
public void testGetDataAndSetDataWithSessionParam ( ) { container.SetData ( org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_SESSION_ID , org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_KEY , org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_VALUE ) ; org.junit.Assert.assertNull ( "Get should return null with an empty session" , container.GetData ( org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_KEY , false ) ) ; org.junit.Assert.assertEquals ( "Get should return the value with a given session" , org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_VALUE , container.GetData ( org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_SESSION_ID , org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_KEY , false ) ) ; }
Source:
private boolean connectStorageToLunByVdsId ( org.ovirt.engine.core.common.businessentities.VDS vds , org.ovirt.engine.core.common.businessentities.LUNs lun ) { try { return org.ovirt.engine.core.bll.storage.StorageHelperDirector.getInstance ( ) . getItem ( org.ovirt.engine.core.bll.storage.ConnectAllHostsToLunCommand.getStorageDomain ( ) . getstorage_type ( ) ) . ConnectStorageToLunByVdsId ( org.ovirt.engine.core.bll.storage.ConnectAllHostsToLunCommand.getStorageDomain ( ) , vds.getId ( ) , lun , Guid.Empty ) ; } catch ( org.ovirt.engine.core.common.errors.VdcBLLException e ) { ( ( org.ovirt.engine.core.bll.storage.ConnectAllHostsToLunCommand.ConnectAllHostsToLunCommandReturnValue ) ( org.ovirt.engine.core.bll.storage.ConnectAllHostsToLunCommand.getReturnValue ( ) ) ) . setFailedVds ( vds ) ; throw e ; } }

Target:
private java.util.List < org.ovirt.engine.core.common.businessentities.LUNs > getHostLuns ( org.ovirt.engine.core.common.businessentities.VDS vds ) { try { return ( ( java.util.List < org.ovirt.engine.core.common.businessentities.LUNs > ) ( runVdsCommand ( VDSCommandType.GetDeviceList , new org.ovirt.engine.core.common.vdscommands.GetDeviceListVDSCommandParameters ( vds.getId ( ) , org.ovirt.engine.core.bll.storage.ConnectAllHostsToLunCommand.getStorageDomain ( ) . getstorage_type ( ) ) ) . getReturnValue ( ) ) ) ; } catch ( org.ovirt.engine.core.common.errors.VdcBLLException e ) { getResult ( ) . setFailedVds ( vds ) ; throw e ; } }
Source:
private void alert ( org.ovirt.engine.core.common.AuditLogType logType , java.lang.String reason ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase alert = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; alert.setVdsId ( getVdsId ( ) ) ; alert.addCustomValue ( "Reason" , reason ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AlertDirector.alert ( alert , logType , auditLogDirector ) ; }

Target:
private void alert ( org.ovirt.engine.core.common.AuditLogType logType , java.lang.String reason ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase alert = org.ovirt.engine.core.di.Injector.injectMembers ( new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ) ; alert.setVdsId ( getVdsId ( ) ) ; alert.addCustomValue ( "Reason" , reason ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AlertDirector.alert ( alert , logType , auditLogDirector ) ; }
Source:
public void setUp ( ) { setXmlResponse ( "vms" , 200 , "<vms/>" ) ; setXmlResponse ( "vms/123" , 200 , "<vm id=\"123\"><name>testvm</name></vm>" ) ; setXmlResponse ( "vms/456" , 404 , "" ) ; startServer ( ) ; connection = testConnection ( ) ; vmsService = connection.systemService ( ) . vmsService ( ) ; }

Target:
public void setUp ( ) { setXmlResponse ( "vms" , 200 , "<vms/>" ) ; setXmlResponse ( "vms/123" , 200 , "<vm id=\"123\"><name>testvm</name></vm>" ) ; setXmlResponse ( "vms/456" , 404 , "" ) ; setXmlResponse ( "vms/123/start" , 400 , ( "<fault>" + ( "<reason>myreason</reason>" + "</fault>" ) ) ) ; setXmlResponse ( "vms/456/start" , 400 , ( "<action>" + ( ( ( "<fault>" + "<reason>myreason</reason>" ) + "</fault>" ) + "</action>" ) ) ) ; startServer ( ) ; connection = testConnection ( ) ; vmsService = connection.systemService ( ) . vmsService ( ) ; }
Source:
public java.util.List < org.ovirt.engine.core.common.businessentities.Erratum > getErrataForHost ( java.lang.String hostName ) { org.ovirt.engine.core.bll.host.provider.foreman.ContentHost contentHost = findContentHost ( hostName ) ; if ( contentHost == null ) { log.error ( "Failed to find host on provider '{}' by host name '{}' " , getProvider ( ) . getName ( ) , hostName ) ; return java.util.Collections.emptyList ( ) ; } return runErrataListMethod ( java.lang.String.format ( org.ovirt.engine.core.bll.host.provider.foreman.ForemanHostProviderProxy.CONTENT_HOST_ERRATA_ENTRY_POINT , contentHost.getUuid ( ) ) ) ; }

Target:
public boolean isContentHostExist ( java.lang.String hostName ) { return getContentHostProvider ( ) . isContentHostExist ( hostName ) ; }
Source:
private void setVdsStatusToPrepareForMaintaice ( org.ovirt.engine.core.common.businessentities.VDS vds ) { if ( ( ( ( vds.getStatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.VDSStatus.PreparingForMaintenance ) ) && ( ( vds.getStatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.VDSStatus.NonResponsive ) ) ) && ( ( vds.getStatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.VDSStatus.Down ) ) ) { runVdsCommand ( VDSCommandType.SetVdsStatus , new org.ovirt.engine.core.common.vdscommands.SetVdsStatusVDSCommandParameters ( vds.getId ( ) , org.ovirt.engine.core.common.businessentities.VDSStatus.PreparingForMaintenance ) ) ; } }

Target:
private boolean setVdsStatusToPrepareForMaintenance ( org.ovirt.engine.core.common.businessentities.VDS vds ) { boolean result = true ; if ( ( ( ( vds.getStatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.VDSStatus.PreparingForMaintenance ) ) && ( ( vds.getStatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.VDSStatus.NonResponsive ) ) ) && ( ( vds.getStatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.VDSStatus.Down ) ) ) { org.ovirt.engine.core.common.vdscommands.SetVdsStatusVDSCommandParameters params = new org.ovirt.engine.core.common.vdscommands.SetVdsStatusVDSCommandParameters ( vds.getId ( ) , org.ovirt.engine.core.common.businessentities.VDSStatus.PreparingForMaintenance ) ; params.setStopSpmFailureLogged ( true ) ; result = runVdsCommand ( VDSCommandType.SetVdsStatus , params ) . getSucceeded ( ) ; } return result ; }
Source:
public void testDefaultRouteNonDefaultRouteNetwork ( ) { iface.setIpv4DefaultRoute ( true ) ; network.setDnsResolverConfiguration ( sampleDnsResolverConfiguration ) ; org.junit.Assert.assertThat ( createTestedInstance ( false , sampleDnsResolverConfiguration ) . isNetworkInSync ( ) , org.hamcrest.CoreMatchers.is ( false ) ) ; }

Target:
public void testDnsResolverConfigurationNonDefaultRouteNetwork ( ) { iface.setIpv4DefaultRoute ( true ) ; network.setDnsResolverConfiguration ( sampleDnsResolverConfiguration ) ; testedNetworkAttachment.setDnsResolverConfiguration ( sampleDnsResolverConfiguration2 ) ; org.hamcrest.MatcherAssert.assertThat ( createTestedInstance ( false , sampleDnsResolverConfiguration ) . isNetworkInSync ( ) , org.hamcrest.CoreMatchers.is ( false ) ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeSnapshotCreateReturnForXmlRpc glusterSnapshotCreate ( java.lang.String volumeName , java.lang.String snapshotName , java.lang.String description , boolean force ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "GlusterVolume.snapshotCreate" ) . withParameter ( "volumeName" , volumeName ) . withParameter ( "snapName" , snapshotName ) . withOptionalParameter ( "snapDescription" , description ) . withParameter ( "force" , force ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) . withIgnoreResponseKey ( ) ; return new org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeSnapshotCreateReturnForXmlRpc ( response ) ; }

Target:
public org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeSnapshotCreateReturnForXmlRpc glusterVolumeSnapshotCreate ( java.lang.String volumeName , java.lang.String snapshotName , java.lang.String description , boolean force ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "GlusterVolume.snapshotCreate" ) . withParameter ( "volumeName" , volumeName ) . withParameter ( "snapName" , snapshotName ) . withOptionalParameter ( "snapDescription" , description ) . withParameter ( "force" , force ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) . withIgnoreResponseKey ( ) ; return new org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeSnapshotCreateReturnForXmlRpc ( response ) ; }
Source:
protected org.ovirt.engine.core.utils.vmproperties.VmPropertiesUtils getVmPropertiesUtils ( ) { return org.ovirt.engine.core.utils.vmproperties.VmPropertiesUtils.getInstance ( ) ; }

Target:
private void removeMemoryFromActiveSnapshot ( ) { if ( memoryVolumeFromSnapshot.isEmpty ( ) ) { return ; } if ( ( getSnapshotDao ( ) . getNumOfSnapshotsByMemory ( memoryVolumeFromSnapshot ) ) == 1 ) { removeMemoryVolumes ( memoryVolumeFromSnapshot , org.ovirt.engine.core.bll.RunVmCommand.getActionType ( ) , true ) ; } getSnapshotDao ( ) . removeMemoryFromActiveSnapshot ( org.ovirt.engine.core.bll.RunVmCommand.getVmId ( ) ) ; }
Source:
protected void executeQueryCommand ( ) { org.ovirt.engine.core.common.businessentities.VmTemplate vmt ; vmt = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmTemplateDao ( ) . getTemplateWithLatestVersionInChain ( org.ovirt.engine.core.bll.GetLatestTemplateInChainQuery.getParameters ( ) . getId ( ) ) ; if ( vmt != null ) { org.ovirt.engine.core.bll.VmTemplateHandler.updateDisksFromDb ( vmt ) ; org.ovirt.engine.core.bll.VmHandler.updateVmInitFromDB ( vmt , true ) ; } org.ovirt.engine.core.bll.GetLatestTemplateInChainQuery.getQueryReturnValue ( ) . setReturnValue ( vmt ) ; }

Target:
protected void executeQueryCommand ( ) { org.ovirt.engine.core.common.businessentities.VmTemplate vmt ; vmt = vmTemplateDao.getTemplateWithLatestVersionInChain ( org.ovirt.engine.core.bll.GetLatestTemplateInChainQuery.getParameters ( ) . getId ( ) ) ; if ( vmt != null ) { org.ovirt.engine.core.bll.VmTemplateHandler.updateDisksFromDb ( vmt ) ; org.ovirt.engine.core.bll.VmHandler.updateVmInitFromDB ( vmt , true ) ; } org.ovirt.engine.core.bll.GetLatestTemplateInChainQuery.getQueryReturnValue ( ) . setReturnValue ( vmt ) ; }
Source:
private void updateVmData ( org.ovirt.engine.core.common.businessentities.VmDynamic vmDynamicData ) { if ( ( org.ovirt.engine.core.bll.StopVmCommandBase.getVm ( ) . getrun_on_vds ( ) ) != null ) { org.ovirt.engine.core.bll.Backend.getInstance ( ) . getResourceManager ( ) . RunVdsCommand ( VDSCommandType.UpdateVmDynamicData , new org.ovirt.engine.core.common.vdscommands.UpdateVmDynamicDataVDSCommandParameters ( org.ovirt.engine.core.bll.StopVmCommandBase.getVm ( ) . getrun_on_vds ( ) . getValue ( ) , vmDynamicData ) ) ; } else { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmDynamicDao ( ) . update ( vmDynamicData ) ; } }

Target:
private void updateVmData ( org.ovirt.engine.core.common.businessentities.VmDynamic vmDynamicData ) { if ( ( org.ovirt.engine.core.bll.StopVmCommandBase.getVm ( ) . getRunOnVds ( ) ) != null ) { org.ovirt.engine.core.bll.Backend.getInstance ( ) . getResourceManager ( ) . RunVdsCommand ( VDSCommandType.UpdateVmDynamicData , new org.ovirt.engine.core.common.vdscommands.UpdateVmDynamicDataVDSCommandParameters ( org.ovirt.engine.core.bll.StopVmCommandBase.getVm ( ) . getRunOnVds ( ) . getValue ( ) , vmDynamicData ) ) ; } else { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmDynamicDao ( ) . update ( vmDynamicData ) ; } }
Source:
public javax.ws.rs.core.Response add ( org.ovirt.engine.api.model.Permission permission ) { validateParameters ( permission , ( isPrincipalSubCollection ( ) ? new java.lang.String [ ] { "role.id|name" , "dataCenter|cluster|host|storageDomain|vm|vmPool|template.id" } : new java.lang.String [ ] { "role.id|name" , "user|group.id" } ) ) ; org.ovirt.engine.core.common.action.PermissionsOperationsParameters parameters = getParameters ( permission ) ; org.ovirt.engine.api.restapi.resource.QueryIdResolver < org.ovirt.engine.core.compat.Guid > resolver = new org.ovirt.engine.api.restapi.resource.QueryIdResolver ( org.ovirt.engine.core.common.queries.VdcQueryType.GetPermissionById , org.ovirt.engine.core.common.queries.IdQueryParameters.class ) ; return performCreate ( ActionType.AddPermission , parameters , resolver ) ; }

Target:
public javax.ws.rs.core.Response add ( org.ovirt.engine.api.model.Permission permission ) { validateParameters ( permission , ( isPrincipalSubCollection ( ) ? new java.lang.String [ ] { "role.id|name" , "dataCenter|cluster|host|storageDomain|vm|vmPool|template.id" } : new java.lang.String [ ] { "role.id|name" , "user|group.id" } ) ) ; org.ovirt.engine.core.common.action.PermissionsOperationsParameters parameters = getParameters ( permission ) ; org.ovirt.engine.api.restapi.resource.QueryIdResolver < org.ovirt.engine.core.compat.Guid > resolver = new org.ovirt.engine.api.restapi.resource.QueryIdResolver ( org.ovirt.engine.core.common.queries.QueryType.GetPermissionById , org.ovirt.engine.core.common.queries.IdQueryParameters.class ) ; return performCreate ( ActionType.AddPermission , parameters , resolver ) ; }
Source:
public void memoryOptimizationLowerThenZeroWithoutKsmOrBallooning ( ) { final org.ovirt.engine.core.common.businessentities.Cluster cluster = org.ovirt.engine.core.bll.UpdateClusterCommandTest.createDefaultCluster ( ) ; cluster.setMaxVdsMemoryOverCommit ( ( - 52 ) ) ; cluster.setEnableKsm ( false ) ; cluster.setEnableBallooning ( false ) ; createCommand ( cluster ) ; cpuExists ( ) ; validateFailedWithReason ( EngineMessage.CLUSTER_TO_ALLOW_MEMORY_OPTIMIZATION_YOU_MUST_ALLOW_KSM_OR_BALLOONING ) ; }

Target:
public void memoryOptimizationLowerThenZeroWithoutKsmOrBallooning ( ) { final org.ovirt.engine.core.common.businessentities.Cluster cluster = org.ovirt.engine.core.bll.UpdateClusterCommandTest.createDefaultCluster ( ) ; cluster.setMaxVdsMemoryOverCommit ( ( - 52 ) ) ; cluster.setEnableKsm ( false ) ; cluster.setEnableBallooning ( false ) ; createCommand ( cluster ) ; cpuExists ( ) ; initAndAssertValidation ( true ) ; }
Source:
private void managePrestartedVmsInPool ( org.ovirt.engine.core.common.businessentities.VmPool vmPool ) { org.ovirt.engine.core.compat.Guid vmPoolId = vmPool.getvm_pool_id ( ) ; int prestartedVms = org.ovirt.engine.core.bll.VmPoolCommandBase.getNumOfPrestartedVmsInPool ( vmPoolId ) ; int missingPrestartedVms = ( vmPool.getPrestartedVms ( ) ) - prestartedVms ; if ( missingPrestartedVms > 0 ) { int numOfVmsToPrestart = java.lang.Math.min ( missingPrestartedVms , org.ovirt.engine.core.common.config.Config.< java.lang.Integer > GetValue ( ConfigValues.VmPoolMonitorBatchSize ) ) ; org.ovirt.engine.core.bll.VmPoolMonitor.log.infoFormat ( "VmPool {0} is missing {1} prestarted Vms, attempting to prestart {2} Vms" , vmPoolId , missingPrestartedVms , numOfVmsToPrestart ) ; prestartVms ( vmPoolId , numOfVmsToPrestart ) ; } }

Target:
private void managePrestartedVmsInPool ( org.ovirt.engine.core.common.businessentities.VmPool vmPool ) { org.ovirt.engine.core.compat.Guid vmPoolId = vmPool.getVmPoolId ( ) ; int prestartedVms = org.ovirt.engine.core.bll.VmPoolCommandBase.getNumOfPrestartedVmsInPool ( vmPoolId ) ; int missingPrestartedVms = ( vmPool.getPrestartedVms ( ) ) - prestartedVms ; if ( missingPrestartedVms > 0 ) { int numOfVmsToPrestart = java.lang.Math.min ( missingPrestartedVms , org.ovirt.engine.core.common.config.Config.< java.lang.Integer > GetValue ( ConfigValues.VmPoolMonitorBatchSize ) ) ; org.ovirt.engine.core.bll.VmPoolMonitor.log.infoFormat ( "VmPool {0} is missing {1} prestarted Vms, attempting to prestart {2} Vms" , vmPoolId , missingPrestartedVms , numOfVmsToPrestart ) ; prestartVms ( vmPoolId , numOfVmsToPrestart ) ; } }
Source:
public void testFetchClusterWithUnlimitedGlobalLimitation ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.QuotaCluster > quotaClusterList = dao.getQuotaClusterByClusterGuid ( FixturesTool.CLUSTER_RHEL6_ISCSI , FixturesTool.QUOTA_SPECIFIC ) ; org.junit.Assert.assertEquals ( 1 , quotaClusterList.size ( ) ) ; org.ovirt.engine.core.common.businessentities.QuotaCluster quotaCluster = quotaClusterList.get ( 0 ) ; org.junit.Assert.assertNotNull ( quotaCluster ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.dao.QuotaDaoTest.unlimited , quotaCluster.getMemSizeMB ( ) ) ; org.junit.Assert.assertEquals ( 10 , ( ( int ) ( quotaCluster.getVirtualCpu ( ) ) ) ) ; }

Target:
public void testFetchClusterWithUnlimitedGlobalLimitation ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.QuotaCluster > quotaClusterList = dao.getQuotaClusterByClusterGuid ( FixturesTool.CLUSTER_RHEL6_ISCSI , FixturesTool.QUOTA_SPECIFIC ) ; org.junit.jupiter.api.Assertions.assertEquals ( 1 , quotaClusterList.size ( ) ) ; org.ovirt.engine.core.common.businessentities.QuotaCluster quotaCluster = quotaClusterList.get ( 0 ) ; org.junit.jupiter.api.Assertions.assertNotNull ( quotaCluster ) ; org.junit.jupiter.api.Assertions.assertEquals ( org.ovirt.engine.core.dao.QuotaDaoTest.unlimited , quotaCluster.getMemSizeMB ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( 10 , ( ( int ) ( quotaCluster.getVirtualCpu ( ) ) ) ) ; }
Source:
protected java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity > fetchVolumes ( org.ovirt.engine.core.common.businessentities.VDS upServer ) { org.ovirt.engine.core.common.vdscommands.VDSReturnValue result = runVdsCommand ( VDSCommandType.GlusterVolumesList , new org.ovirt.engine.core.common.vdscommands.gluster.GlusterVolumesListVDSParameters ( upServer.getId ( ) , upServer.getvds_group_id ( ) ) ) ; return result.getSucceeded ( ) ? ( ( java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity > ) ( result.getReturnValue ( ) ) ) : null ; }

Target:
protected java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity > fetchVolumes ( org.ovirt.engine.core.common.businessentities.VDS upServer ) { org.ovirt.engine.core.common.vdscommands.VDSReturnValue result = runVdsCommand ( VDSCommandType.GlusterVolumesList , new org.ovirt.engine.core.common.vdscommands.gluster.GlusterVolumesListVDSParameters ( upServer.getId ( ) , upServer.getVdsGroupId ( ) ) ) ; return result.getSucceeded ( ) ? ( ( java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity > ) ( result.getReturnValue ( ) ) ) : null ; }
Source:
public org.ovirt.engine.core.common.action.VdcReturnValueBase RunAction ( org.ovirt.engine.core.common.action.VdcActionType actionType , org.ovirt.engine.core.common.action.VdcActionParametersBase params ) { org.ovirt.engine.ui.frontend.server.gwt.GenericApiGWTServiceImpl.log.debug ( "Server: RunAction invoked!" ) ; debugAction ( actionType , params ) ; params.setSessionId ( getSessionId ( ) ) ; if ( noBackend ) { org.ovirt.engine.core.common.action.VdcReturnValueBase rValue = new org.ovirt.engine.core.common.action.VdcReturnValueBase ( ) ; rValue.setSucceeded ( true ) ; return rValue ; } return getBackend ( ) . runAction ( actionType , params ) ; }

Target:
public org.ovirt.engine.core.common.action.VdcReturnValueBase RunAction ( org.ovirt.engine.core.common.action.VdcActionType actionType , org.ovirt.engine.core.common.action.VdcActionParametersBase params ) { org.ovirt.engine.ui.frontend.server.gwt.GenericApiGWTServiceImpl.log.debug ( "Server: RunAction invoked!" ) ; debugAction ( actionType , params ) ; params.setSessionId ( getSession ( ) . getId ( ) ) ; if ( noBackend ) { org.ovirt.engine.core.common.action.VdcReturnValueBase rValue = new org.ovirt.engine.core.common.action.VdcReturnValueBase ( ) ; rValue.setSucceeded ( true ) ; return rValue ; } return getBackend ( ) . runAction ( actionType , params ) ; }
Source:
private org.ovirt.engine.core.bll.host.UpdateAvailable create ( org.ovirt.engine.core.common.businessentities.VDSType hostType ) { switch ( hostType ) { case VDS : return new org.ovirt.engine.core.bll.host.HostUpgradeManager ( ) ; case oVirtNode : return new org.ovirt.engine.core.bll.host.OvirtNodeUpgradeManager ( ) ; default : org.ovirt.engine.core.bll.host.AvailableUpdatesFinder.log.error ( "Cannot instantiate host available strategy for unknown host type '{}'" , hostType ) ; throw new java.lang.RuntimeException ( "Cannot instantiate host available strategy for unknown host type" ) ; } }

Target:
private org.ovirt.engine.core.bll.host.UpdateAvailable create ( org.ovirt.engine.core.common.businessentities.VDSType hostType ) { for ( org.ovirt.engine.core.bll.host.UpdateAvailable hostUpdater : hostUpdaters ) { if ( hostType == ( hostUpdater.getHostType ( ) ) ) { return hostUpdater ; } } org.ovirt.engine.core.bll.host.AvailableUpdatesFinder.log.error ( "Cannot instantiate host available strategy for unknown host type '{}'" , hostType ) ; throw new java.lang.RuntimeException ( "Cannot instantiate host available strategy for unknown host type" ) ; }
Source:
private void setUpGetEntityWithNoCertificateInfoExpectations ( int times , boolean notFound , org.ovirt.engine.core.common.businessentities.VDS entity ) throws java.lang.Exception { while ( ( times -- ) > 0 ) { setUpGetEntityExpectations ( VdcQueryType.GetVdsByVdsId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , ( notFound ? null : entity ) ) ; } }

Target:
private void setUpGetEntityWithNoCertificateInfoExpectations ( int times , boolean notFound , org.ovirt.engine.core.common.businessentities.VDS entity ) throws java.lang.Exception { while ( ( times -- ) > 0 ) { setUpGetEntityExpectations ( QueryType.GetVdsByVdsId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , ( notFound ? null : entity ) ) ; } }
Source:
public void getPermittedStorageDomainsByStoragePoolId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId , org.ovirt.engine.core.common.businessentities.ActionGroup actionGroup ) { 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.StorageDomain > ( ) ; } return source ; } } ; org.ovirt.engine.core.common.queries.GetPermittedStorageDomainsByStoragePoolIdParameters params = new org.ovirt.engine.core.common.queries.GetPermittedStorageDomainsByStoragePoolIdParameters ( ) ; params.setStoragePoolId ( dataCenterId ) ; params.setActionGroup ( actionGroup ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetPermittedStorageDomainsByStoragePoolId , params , aQuery ) ; }

Target:
public void getAllAttachableDisks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetAllAttachableDisks params = new org.ovirt.engine.core.common.queries.GetAllAttachableDisks ( storagePoolId ) ; params.setVmId ( vmId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllAttachableDisks , params , aQuery ) ; }
Source:
public static void GetMaxNumOfCPUsPerSocket ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String version ) { 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 ( ) : 1 ; } } ; org.ovirt.engine.core.common.queries.GetConfigurationValueParameters tempVar = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.MaxNumOfCpuPerSocket ) ; tempVar.setVersion ( version ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( tempVar , aQuery ) ; }

Target:
public static void GetMaxVmsInPool ( 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 ( ) : 1000 ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.MaxVmsInPool ) , aQuery ) ; }
Source:
public static void getVmNicList ( 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 ? new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ) ( source ) ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmInterfacesByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( 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.getInstance ( ) . runQuery ( VdcQueryType.GetAllVmSnapshotsByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
protected void executeCommand ( ) { org.ovirt.engine.core.compat.Guid id = org.ovirt.engine.core.bll.aaa.RemoveGroupCommand.getParameters ( ) . getId ( ) ; for ( org.ovirt.engine.core.common.businessentities.Permission permission : permissionDao.getAllDirectPermissionsForAdElement ( id ) ) { org.ovirt.engine.core.common.action.PermissionsOperationsParameters param = new org.ovirt.engine.core.common.action.PermissionsOperationsParameters ( permission ) ; param.setSessionId ( org.ovirt.engine.core.bll.aaa.RemoveGroupCommand.getParameters ( ) . getSessionId ( ) ) ; runInternalActionWithTasksContext ( VdcActionType.RemovePermission , param ) ; } dbGroupDao.remove ( id ) ; org.ovirt.engine.core.bll.aaa.RemoveGroupCommand.setSucceeded ( true ) ; }

Target:
protected void executeCommand ( ) { org.ovirt.engine.core.compat.Guid id = org.ovirt.engine.core.bll.aaa.RemoveGroupCommand.getParameters ( ) . getId ( ) ; for ( org.ovirt.engine.core.common.businessentities.Permission permission : permissionDao.getAllDirectPermissionsForAdElement ( id ) ) { org.ovirt.engine.core.common.action.PermissionsOperationsParameters param = new org.ovirt.engine.core.common.action.PermissionsOperationsParameters ( permission ) ; param.setSessionId ( org.ovirt.engine.core.bll.aaa.RemoveGroupCommand.getParameters ( ) . getSessionId ( ) ) ; runInternalActionWithTasksContext ( ActionType.RemovePermission , param ) ; } dbGroupDao.remove ( id ) ; org.ovirt.engine.core.bll.aaa.RemoveGroupCommand.setSucceeded ( true ) ; }
Source:
private void delayResponse ( long loginStart ) { long endTime = org.ovirt.engine.extension.aaa.jdbc.DateUtils.add ( loginStart , java.util.Calendar.SECOND , settings.get ( Schema.Settings.MINIMUM_RESPONSE_SECONDS , java.lang.Integer.class ) ) ; long interval ; while ( ( interval = endTime - ( new java.util.Date ( ) . getTime ( ) ) ) > 0 ) { try { java.lang.Thread.sleep ( java.lang.Math.max ( org.ovirt.engine.extension.aaa.jdbc.core.Authentication.MIN_SLEEP , interval ) ) ; break ; } catch ( java.lang.InterruptedException e ) { org.ovirt.engine.extension.aaa.jdbc.core.Authentication.LOG.warn ( "Interrupted while delaying response, reentering." , e ) ; } } }

Target:
private void delayResponse ( long loginStart ) { long endTime = org.ovirt.engine.extension.aaa.jdbc.DateUtils.add ( loginStart , java.util.Calendar.SECOND , settings.get ( Schema.Settings.MINIMUM_RESPONSE_SECONDS , java.lang.Integer.class ) ) ; long interval ; while ( ( interval = endTime - ( java.lang.System.currentTimeMillis ( ) ) ) > 0 ) { try { java.lang.Thread.sleep ( java.lang.Math.max ( org.ovirt.engine.extension.aaa.jdbc.core.Authentication.MIN_SLEEP , interval ) ) ; break ; } catch ( java.lang.InterruptedException e ) { org.ovirt.engine.extension.aaa.jdbc.core.Authentication.LOG.warn ( "Interrupted while delaying response, reentering." , e ) ; } } }
Source:
protected boolean verifyAddVM ( org.ovirt.engine.core.compat.Guid storagePoolId ) { return org.ovirt.engine.core.bll.VmHandler.VerifyAddVm ( org.ovirt.engine.core.bll.CommonVmPoolWithVmsCommand.getReturnValue ( ) . getCanDoActionMessages ( ) , ( ( org.ovirt.engine.core.bll.CommonVmPoolWithVmsCommand.getParameters ( ) . getVmsCount ( ) ) * ( org.ovirt.engine.core.bll.CommonVmPoolWithVmsCommand.getVmNetworkInterfaceDAO ( ) . getAllForTemplate ( org.ovirt.engine.core.bll.CommonVmPoolWithVmsCommand.getVmTemplateId ( ) ) . size ( ) ) ) , org.ovirt.engine.core.bll.CommonVmPoolWithVmsCommand.getVmTemplate ( ) , storagePoolId , org.ovirt.engine.core.bll.CommonVmPoolWithVmsCommand.getParameters ( ) . getVmStaticData ( ) . getpriority ( ) ) ; }

Target:
protected boolean verifyAddVM ( ) { return org.ovirt.engine.core.bll.VmHandler.VerifyAddVm ( org.ovirt.engine.core.bll.CommonVmPoolWithVmsCommand.getReturnValue ( ) . getCanDoActionMessages ( ) , ( ( org.ovirt.engine.core.bll.CommonVmPoolWithVmsCommand.getParameters ( ) . getVmsCount ( ) ) * ( org.ovirt.engine.core.bll.CommonVmPoolWithVmsCommand.getVmNetworkInterfaceDao ( ) . getAllForTemplate ( org.ovirt.engine.core.bll.CommonVmPoolWithVmsCommand.getVmTemplateId ( ) ) . size ( ) ) ) , org.ovirt.engine.core.bll.CommonVmPoolWithVmsCommand.getParameters ( ) . getVmStaticData ( ) . getpriority ( ) ) ; }
Source:
public static void GetSANWipeAfterDelete ( 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.Boolean ) ( source ) ) . booleanValue ( ) : false ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.SANWipeAfterDelete , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public static void GetCustomPropertiesList ( 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.HashMap < org.ovirt.engine.core.compat.Version , java.lang.String > ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmCustomProperties , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }
Source:
public java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > getDisplayNics ( org.ovirt.engine.core.common.businessentities.network.Network displayNetwork ) { java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > displayNics = new java.util.HashMap < > ( ) ; if ( displayNetwork != null ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > nics = getInterfaceDAO ( ) . getVdsInterfacesByNetworkId ( displayNetwork.getId ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic : nics ) { displayNics.put ( nic.getVdsId ( ) , nic ) ; } } return displayNics ; }

Target:
public java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > getDisplayNics ( org.ovirt.engine.core.common.businessentities.network.Network displayNetwork ) { java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > displayNics = new java.util.HashMap < > ( ) ; if ( displayNetwork != null ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > nics = getInterfaceDao ( ) . getVdsInterfacesByNetworkId ( displayNetwork.getId ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic : nics ) { displayNics.put ( nic.getVdsId ( ) , nic ) ; } } return displayNics ; }
Source:
public void createUISyntaxChecker ( ) { org.ovirt.engine.core.searchbackend.ISyntaxChecker checker = org.ovirt.engine.core.searchbackend.SyntaxCheckerFactory.createUISyntaxChecker ( "foo" ) ; org.junit.Assert.assertNotNull ( checker ) ; org.junit.Assert.assertEquals ( checker , org.ovirt.engine.core.searchbackend.SyntaxCheckerFactory.createUISyntaxChecker ( "foo" ) ) ; org.junit.Assert.assertEquals ( "foo" , org.ovirt.engine.core.searchbackend.SyntaxCheckerFactory.getConfigAuthenticationMethod ( ) ) ; }

Target:
public void createUISyntaxChecker ( ) { org.ovirt.engine.core.searchbackend.ISyntaxChecker checker = org.ovirt.engine.core.searchbackend.SyntaxCheckerFactory.createUISyntaxChecker ( "foo" ) ; org.junit.jupiter.api.Assertions.assertNotNull ( checker ) ; org.junit.jupiter.api.Assertions.assertEquals ( checker , org.ovirt.engine.core.searchbackend.SyntaxCheckerFactory.createUISyntaxChecker ( "foo" ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( "foo" , org.ovirt.engine.core.searchbackend.SyntaxCheckerFactory.getConfigAuthenticationMethod ( ) ) ; }
Source:
protected void disableElement ( com.google.gwt.dom.client.Element element ) { element.getStyle ( ) . setProperty ( "disabled" , "true" ) ; element.getStyle ( ) . setColor ( "#999999" ) ; if ( ( getNodeDisabledTooltip ( ) ) != null ) { org.ovirt.engine.ui.common.widget.tooltip.TooltipMixin.addTooltipToElement ( com.google.gwt.safehtml.shared.SafeHtmlUtils.fromString ( getNodeDisabledTooltip ( ) ) , element ) ; } }

Target:
protected void disableElement ( com.google.gwt.dom.client.Element element ) { element.getStyle ( ) . setProperty ( "disabled" , "true" ) ; element.getStyle ( ) . setColor ( "#999999" ) ; if ( ( getNodeDisabledTooltip ( ) ) != null ) { org.ovirt.engine.ui.common.utils.ElementTooltipUtils.setTooltipOnElement ( element , com.google.gwt.safehtml.shared.SafeHtmlUtils.fromString ( getNodeDisabledTooltip ( ) ) ) ; } }
Source:
protected java.util.List < org.ovirt.engine.core.common.businessentities.permissions > setUpPermissionsWithAdElementId ( org.ovirt.engine.core.compat.Guid adElementId ) { java.util.List < org.ovirt.engine.core.common.businessentities.permissions > perms = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.permissions > ( ) ; for ( int i = 0 ; i < ( NAMES.length ) ; i ++ ) { org.ovirt.engine.core.common.businessentities.permissions entity = getEntity ( i ) ; entity.setad_element_id ( adElementId ) ; perms.add ( entity ) ; } return perms ; }

Target:
protected java.util.List < org.ovirt.engine.core.common.businessentities.Permissions > setUpPermissions ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.Permissions > perms = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Permissions > ( ) ; for ( int i = 0 ; i < ( NAMES.length ) ; i ++ ) { perms.add ( getEntity ( i ) ) ; } return perms ; }