auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void testIsNetworkInSyncWhenBridgedFlagDifferent ( ) throws java.lang.Exception { iface.setMtu ( 1 ) ; network.setMtu ( 1 ) ; iface.setVlanId ( 1 ) ; network.setVlanId ( 1 ) ; iface.setBridged ( true ) ; network.setVmNetwork ( false ) ; org.junit.Assert.assertThat ( createTestedInstance ( ) . isNetworkInSync ( ) , org.hamcrest.CoreMatchers.is ( false ) ) ; }

Target:
public void testIsNetworkInSyncWhenBridgedFlagDifferent ( ) { iface.setMtu ( 1 ) ; network.setMtu ( 1 ) ; iface.setVlanId ( 1 ) ; network.setVlanId ( 1 ) ; iface.setBridged ( true ) ; network.setVmNetwork ( false ) ; org.hamcrest.MatcherAssert.assertThat ( createTestedInstance ( ) . isNetworkInSync ( ) , org.hamcrest.CoreMatchers.is ( false ) ) ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult dataCenterVersionMismatch ( ) { org.ovirt.engine.core.common.businessentities.StoragePool dataCenter = getDataCenter ( ) ; return org.ovirt.engine.core.bll.ValidationResult.failWith ( VdcBllMessages.VDS_GROUP_CANNOT_ADD_COMPATIBILITY_VERSION_WITH_LOWER_STORAGE_POOL ) . when ( ( ( dataCenter != null ) && ( ( dataCenter.getcompatibility_version ( ) . compareTo ( cluster.getcompatibility_version ( ) ) ) > 0 ) ) ) ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult dataCenterVersionMismatch ( ) { org.ovirt.engine.core.common.businessentities.StoragePool dataCenter = getDataCenter ( ) ; return org.ovirt.engine.core.bll.ValidationResult.failWith ( VdcBllMessages.VDS_GROUP_CANNOT_ADD_COMPATIBILITY_VERSION_WITH_LOWER_STORAGE_POOL ) . when ( ( ( dataCenter != null ) && ( ( dataCenter.getCompatibilityVersion ( ) . compareTo ( cluster.getcompatibility_version ( ) ) ) > 0 ) ) ) ; }
Source:
public org.ovirt.engine.core.compat.NGuid getStorageDomainId ( ) { if ( ( _storageDomainId.equals ( Guid.Empty ) ) && ( ( org.ovirt.engine.core.bll.HibernateVmCommand.getVm ( ) ) != null ) ) { long sizeNeeded = ( ( org.ovirt.engine.core.bll.HibernateVmCommand.getVm ( ) . getTotalMemorySizeInBytes ( ) ) + ( getMetaDataSizeInBytes ( ) ) ) / ( BYTES_IN_GB ) ; org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain = org.ovirt.engine.core.bll.VmHandler.findStorageDomainForMemory ( org.ovirt.engine.core.bll.HibernateVmCommand.getVm ( ) . getStoragePoolId ( ) , sizeNeeded ) ; if ( storageDomain != null ) { _storageDomainId = storageDomain.getId ( ) ; } } return _storageDomainId ; }

Target:
public org.ovirt.engine.core.compat.NGuid getStorageDomainId ( ) { if ( ( _storageDomainId.equals ( Guid.Empty ) ) && ( ( org.ovirt.engine.core.bll.HibernateVmCommand.getVm ( ) ) != null ) ) { long sizeNeeded = ( ( org.ovirt.engine.core.bll.HibernateVmCommand.getVm ( ) . getTotalMemorySizeInBytes ( ) ) + ( org.ovirt.engine.core.bll.HibernateVmCommand.META_DATA_SIZE_IN_BYTES ) ) / ( BYTES_IN_GB ) ; org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain = org.ovirt.engine.core.bll.VmHandler.findStorageDomainForMemory ( org.ovirt.engine.core.bll.HibernateVmCommand.getVm ( ) . getStoragePoolId ( ) , sizeNeeded ) ; if ( storageDomain != null ) { _storageDomainId = storageDomain.getId ( ) ; } } return _storageDomainId ; }
Source:
protected void executeVdsBrokerCommand ( ) { org.ovirt.engine.core.common.vdscommands.gluster.GlusterVolumeGeoRepSessionVDSParameters parameters = getParameters ( ) ; status = getBroker ( ) . glusterVolumeGeoRepSessionPause ( parameters.getVolumeName ( ) , parameters.getSlaveHost ( ) , parameters.getSlaveVolume ( ) , parameters.getForce ( ) ) ; proceedProxyReturnValue ( ) ; }

Target:
protected void executeVdsBrokerCommand ( ) { org.ovirt.engine.core.common.vdscommands.gluster.GlusterVolumeGeoRepSessionVDSParameters parameters = getParameters ( ) ; status = getBroker ( ) . glusterVolumeGeoRepSessionPause ( parameters.getVolumeName ( ) , parameters.getSlaveHost ( ) , parameters.getSlaveVolume ( ) , parameters.getUserName ( ) , parameters.getForce ( ) ) ; proceedProxyReturnValue ( ) ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult nameNotTakenInDc ( ) { java.util.List < T > allQosInDcByType = getAllQosInDcByType ( ) ; if ( allQosInDcByType != null ) { for ( T iterQos : allQosInDcByType ) { if ( org.apache.commons.lang.ObjectUtils.equals ( iterQos.getName ( ) , qos.getName ( ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_QOS_NAME_EXIST ) ; } } } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult nameNotTakenInDc ( ) { java.util.List < T > allQosInDcByType = getAllQosInDcByType ( ) ; if ( allQosInDcByType != null ) { for ( T iterQos : allQosInDcByType ) { if ( java.util.Objects.equals ( iterQos.getName ( ) , qos.getName ( ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_QOS_NAME_EXIST ) ; } } } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }
Source:
public void getTemplateNicList ( 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.getInstance ( ) . runQuery ( VdcQueryType.GetTemplateInterfacesByTemplateId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
public 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:
public org.ovirt.engine.core.common.action.VdcReturnValueBase CanDoActionOnly ( ) { setActionMessageParameters ( ) ; getReturnValue ( ) . setCanDoAction ( InternalCanDoAction ( ) ) ; java.lang.String tempVar = getDescription ( ) ; getReturnValue ( ) . setDescription ( ( tempVar != null ? tempVar : getReturnValue ( ) . getDescription ( ) ) ) ; return _returnValue ; }

Target:
public org.ovirt.engine.core.common.action.VdcReturnValueBase canDoActionOnly ( ) { setActionMessageParameters ( ) ; getReturnValue ( ) . setCanDoAction ( internalCanDoAction ( ) ) ; java.lang.String tempVar = getDescription ( ) ; getReturnValue ( ) . setDescription ( ( tempVar != null ? tempVar : getReturnValue ( ) . getDescription ( ) ) ) ; return _returnValue ; }
Source:
public void testImportWithClusterName ( ) throws java.lang.Exception { setUpGetEntityExpectations ( ( "Cluster: name=" + ( NAMES [ 1 ] ) ) , SearchType.Cluster , getCluster ( 1 ) ) ; org.ovirt.engine.api.model.StorageDomain storageDomain = new org.ovirt.engine.api.model.StorageDomain ( ) ; storageDomain.setId ( GUIDS [ 2 ] . toString ( ) ) ; org.ovirt.engine.api.model.Cluster cluster = new org.ovirt.engine.api.model.Cluster ( ) ; cluster.setName ( NAMES [ 1 ] ) ; setUpGetDataCenterByStorageDomainExpectations ( org.ovirt.engine.api.restapi.resource.BackendStorageDomainVmResourceTest.STORAGE_DOMAIN_ID ) ; doTestImport ( storageDomain , cluster ) ; }

Target:
public void testImportWithStorageDomainName ( ) throws java.lang.Exception { setUpGetEntityExpectations ( ( "Storage: name=" + ( NAMES [ 2 ] ) ) , SearchType.StorageDomain , getStorageDomain ( 2 ) ) ; setUpGetDataCenterByStorageDomainExpectations ( org.ovirt.engine.api.restapi.resource.BackendStorageDomainVmResourceTest.STORAGE_DOMAIN_ID ) ; org.ovirt.engine.api.model.StorageDomain storageDomain = new org.ovirt.engine.api.model.StorageDomain ( ) ; storageDomain.setName ( NAMES [ 2 ] ) ; org.ovirt.engine.api.model.Cluster cluster = new org.ovirt.engine.api.model.Cluster ( ) ; cluster.setId ( GUIDS [ 1 ] . toString ( ) ) ; doTestImport ( storageDomain , cluster , false , false ) ; }
Source:
private void commonRemove ( org.ovirt.engine.core.compat.Guid id ) { org.ovirt.engine.core.common.businessentities.network.HostNicVfsConfig result = dao.get ( id ) ; org.junit.Assert.assertNotNull ( result ) ; dao.remove ( result.getId ( ) ) ; result = dao.get ( id ) ; org.junit.Assert.assertNull ( result ) ; }

Target:
private void commonRemove ( org.ovirt.engine.core.compat.Guid id ) { org.ovirt.engine.core.common.businessentities.network.HostNicVfsConfig result = dao.get ( id ) ; org.junit.jupiter.api.Assertions.assertNotNull ( result ) ; dao.remove ( result.getId ( ) ) ; result = dao.get ( id ) ; org.junit.jupiter.api.Assertions.assertNull ( result ) ; }
Source:
public void testGet ( ) { org.ovirt.engine.core.common.businessentities.network.VnicProfile result = dao.get ( FixturesTool.VM_NETWORK_INTERFACE_PROFILE ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertEquals ( FixturesTool.VM_NETWORK_INTERFACE_PROFILE , result.getId ( ) ) ; org.junit.Assert.assertEquals ( false , result.isPortMirroring ( ) ) ; }

Target:
public void testGet ( ) { org.ovirt.engine.core.common.businessentities.network.VnicProfile result = dao.get ( FixturesTool.VM_NETWORK_INTERFACE_PROFILE ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertEquals ( FixturesTool.VM_NETWORK_INTERFACE_PROFILE , result.getId ( ) ) ; org.junit.Assert.assertEquals ( false , result.isPortMirroring ( ) ) ; org.junit.Assert.assertFalse ( result.isPassthrough ( ) ) ; }
Source:
private java.util.Set < java.lang.String > getLunConnections ( java.util.List < org.ovirt.engine.core.common.businessentities.storage.LUNStorageServerConnectionMap > lunConns ) { java.util.Set < java.lang.String > conns = new java.util.HashSet < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.storage.LUNStorageServerConnectionMap lun_storage_server_connection_map1 : lunConns ) { conns.add ( lun_storage_server_connection_map1.getstorage_server_connection ( ) ) ; } return conns ; }

Target:
private java.util.Set < java.lang.String > getLunConnections ( java.util.List < org.ovirt.engine.core.common.businessentities.storage.LUNStorageServerConnectionMap > lunConns ) { java.util.Set < java.lang.String > conns = new java.util.HashSet < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.storage.LUNStorageServerConnectionMap lun_storage_server_connection_map1 : lunConns ) { conns.add ( lun_storage_server_connection_map1.getStorageServerConnection ( ) ) ; } return conns ; }
Source:
private java.lang.Boolean getMigrateCompressed ( ) { if ( org.ovirt.engine.core.common.FeatureSupported.migrationCompression ( org.ovirt.engine.core.bll.MigrateVmCommand.getVm ( ) . getVdsGroupCompatibilityVersion ( ) ) ) { if ( ( org.ovirt.engine.core.bll.MigrateVmCommand.getVm ( ) . getMigrateCompressed ( ) ) != null ) { return org.ovirt.engine.core.bll.MigrateVmCommand.getVm ( ) . getMigrateCompressed ( ) ; } if ( ( org.ovirt.engine.core.bll.MigrateVmCommand.getVdsGroup ( ) . getMigrateCompressed ( ) ) != null ) { return org.ovirt.engine.core.bll.MigrateVmCommand.getVdsGroup ( ) . getMigrateCompressed ( ) ; } return org.ovirt.engine.core.common.config.Config.getValue ( ConfigValues.DefaultMigrationCompression ) ; } return null ; }

Target:
private java.lang.Boolean getMigrateCompressed ( ) { if ( org.ovirt.engine.core.common.FeatureSupported.migrationCompression ( org.ovirt.engine.core.bll.MigrateVmCommand.getVm ( ) . getCompatibilityVersion ( ) ) ) { if ( ( org.ovirt.engine.core.bll.MigrateVmCommand.getVm ( ) . getMigrateCompressed ( ) ) != null ) { return org.ovirt.engine.core.bll.MigrateVmCommand.getVm ( ) . getMigrateCompressed ( ) ; } if ( ( org.ovirt.engine.core.bll.MigrateVmCommand.getCluster ( ) . getMigrateCompressed ( ) ) != null ) { return org.ovirt.engine.core.bll.MigrateVmCommand.getCluster ( ) . getMigrateCompressed ( ) ; } return org.ovirt.engine.core.common.config.Config.getValue ( ConfigValues.DefaultMigrationCompression ) ; } return null ; }
Source:
public boolean isEmpty ( ) { return ( ( ( getOutAverageLinkshare ( ) ) == null ) && ( ( getOutAverageUpperlimit ( ) ) == null ) ) && ( ( getOutAverageRealtime ( ) ) == null ) ; }

Target:
public java.lang.String toString ( ) { return org.ovirt.engine.core.common.utils.ToStringBuilder.forInstance ( this ) . append ( "outAverageLinkshare" , renderQosParameter ( getOutAverageLinkshare ( ) ) ) . append ( "outAverageUpperlimit" , renderQosParameter ( getOutAverageUpperlimit ( ) ) ) . append ( "outAverageRealtime" , renderQosParameter ( getOutAverageRealtime ( ) ) ) . build ( ) ; }
Source:
public void testValidModifiedBondsWhenAllOk ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.Bond bond = new org.ovirt.engine.core.common.businessentities.network.Bond ( "bond1" ) ; bond.setSlaves ( java.util.Arrays.asList ( "slaveA" , "slaveB" ) ) ; doTestValidModifiedBonds ( bond , ValidationResult.VALID , ValidationResult.VALID , ValidationResult.VALID , ValidationResult.VALID ) ; }

Target:
public void testValidModifiedBondsFailsWhenReferencingExistingNonBondInterface ( ) throws java.lang.Exception { org.ovirt.engine.core.common.action.CreateOrUpdateBond createOrUpdateBond = createNewCreateOrUpdateBondWithNameAndId ( ) ; final org.ovirt.engine.core.common.errors.EngineMessage engineMessage = org.ovirt.engine.core.common.errors.EngineMessage.NETWORK_INTERFACE_IS_NOT_BOND ; org.ovirt.engine.core.bll.ValidationResult notABondValidationResult = new org.ovirt.engine.core.bll.ValidationResult ( engineMessage , org.ovirt.engine.core.utils.ReplacementUtils.getVariableAssignmentString ( engineMessage , createOrUpdateBond.getName ( ) ) ) ; doTestValidModifiedBonds ( createOrUpdateBond , notABondValidationResult , notABondValidationResult , ValidationResult.VALID ) ; }
Source:
public void getVmAndTemplatesIdsWithoutAttachedImageDisks ( ) { addVmDevice ( FixturesTool.VM_WITH_NO_ATTACHED_DISKS , FixturesTool.IMAGE_GROUP_ID_2 , null ) ; addVmDevice ( FixturesTool.VM_WITH_NO_ATTACHED_DISKS , FixturesTool.DISK_ID , FixturesTool.EXISTING_SNAPSHOT_ID ) ; java.util.List < org.ovirt.engine.core.compat.Guid > ids = dao.getVmAndTemplatesIdsWithoutAttachedImageDisks ( false ) ; org.junit.Assert.assertTrue ( ids.contains ( FixturesTool.VM_RHEL5_POOL_51 ) ) ; org.junit.Assert.assertTrue ( ids.contains ( FixturesTool.VM_TEMPLATE_RHEL5_2 ) ) ; org.junit.Assert.assertTrue ( ids.contains ( FixturesTool.VM_WITH_NO_ATTACHED_DISKS ) ) ; org.junit.Assert.assertFalse ( ids.contains ( FixturesTool.VM_TEMPLATE_RHEL5 ) ) ; }

Target:
private void checkTemplatesDcAndDisks ( java.util.List < org.ovirt.engine.core.compat.Guid > templateIds , org.ovirt.engine.core.compat.Guid storagePoolId , boolean hasDisks ) { for ( org.ovirt.engine.core.compat.Guid templateId : templateIds ) { org.junit.Assert.assertEquals ( storagePoolId , dbFacade.getVmTemplateDao ( ) . get ( templateId ) . getStoragePoolId ( ) ) ; checkDisks ( templateId , hasDisks ) ; } }
Source:
public static void getStorageDomainsByConnection ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , java.lang.String connectionPath ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ) ( source ) ) : null ; } } ; org.ovirt.engine.core.common.queries.GetStorageDomainsByConnectionParameters param = new org.ovirt.engine.core.common.queries.GetStorageDomainsByConnectionParameters ( ) ; param.setConnection ( connectionPath ) ; if ( storagePoolId != null ) { param.setStoragePoolId ( storagePoolId ) ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainsByConnection , param , aQuery ) ; }

Target:
public static java.util.Map < org.ovirt.engine.core.compat.Version , java.util.List < java.lang.String > > getCustomPropertiesList ( ) { return org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.customPropertiesList ; }
Source:
private static org.ovirt.vdsm.jsonrpc.client.reactors.ManagerProvider getManagerProvider ( boolean isSecure , java.lang.String protocol ) { org.ovirt.vdsm.jsonrpc.client.reactors.ManagerProvider provider = null ; if ( isSecure ) { provider = new org.ovirt.engine.core.vdsbroker.jsonrpc.EngineManagerProvider ( protocol ) ; } return provider ; }

Target:
public static org.ovirt.vdsm.jsonrpc.client.JsonRpcClient createClient ( java.lang.String hostname , int port , int connectionTimeout , int clientTimeout , int connectionRetry , int heartbeat , boolean isSecure , org.ovirt.vdsm.jsonrpc.client.reactors.ReactorType type , java.lang.String protocol ) { org.ovirt.vdsm.jsonrpc.client.internal.ClientPolicy connectionPolicy = new org.ovirt.vdsm.jsonrpc.client.internal.ClientPolicy ( connectionTimeout , connectionRetry , heartbeat , java.io.IOException.class ) ; org.ovirt.vdsm.jsonrpc.client.internal.ClientPolicy clientPolicy = new org.ovirt.vdsm.jsonrpc.client.internal.ClientPolicy ( clientTimeout , connectionRetry , heartbeat , java.io.IOException.class ) ; return org.ovirt.engine.core.vdsbroker.jsonrpc.JsonRpcUtils.createClient ( hostname , port , connectionPolicy , clientPolicy , isSecure , type , protocol ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc validateStorageDomain ( java.lang.String sdUUID ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.validateStorageDomain ( sdUUID ) ; 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 glusterHookUpdate ( java.lang.String glusterCommand , java.lang.String stage , java.lang.String hookName , java.lang.String content , java.lang.String checksum ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.glusterHookUpdate ( glusterCommand , stage , hookName , content , checksum ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
protected abstract boolean checkImageConfiguration ( org.ovirt.engine.core.common.businessentities.DiskImage diskImage ) ;

Target:
protected boolean checkImageConfiguration ( org.ovirt.engine.core.common.businessentities.DiskImage diskImage ) { return org.ovirt.engine.core.bll.ImagesHandler.checkImageConfiguration ( destStorages.get ( diskInfoDestinationMap.get ( diskImage.getId ( ) ) . getStorageIds ( ) . get ( 0 ) ) . getStorageStaticData ( ) , diskImage , org.ovirt.engine.core.bll.AddVmAndCloneImageCommand.getReturnValue ( ) . getCanDoActionMessages ( ) ) ; }
Source:
public java.lang.String getTemplate ( java.lang.String realUrlParamName , java.lang.String urlParamName , java.lang.String urlParamType ) { org.ovirt.engine.sdk.codegen.utils.StringTemplateWrapper templateWrapper = new org.ovirt.engine.sdk.codegen.utils.StringTemplateWrapper ( getTemplate ( ) ) ; templateWrapper.set ( "realUrlParamName" , realUrlParamName ) ; templateWrapper.set ( "urlParamName" , urlParamName ) ; templateWrapper.set ( "urlParamType" , urlParamType ) ; return templateWrapper.toString ( ) ; }

Target:
public java.lang.String evaluate ( java.lang.String realUrlParamName , java.lang.String urlParamName , java.lang.String urlParamType ) { set ( "realUrlParamName" , realUrlParamName ) ; set ( "urlParamName" , urlParamName ) ; set ( "urlParamType" , urlParamType ) ; return evaluate ( ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc heartBeat ( ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.heartBeat ( ) ; 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 glusterGeoRepKeysUpdate ( java.util.List < java.lang.String > geoRepPubKeys , java.lang.String userName ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.glusterGeoRepKeysUpdate ( userName , geoRepPubKeys ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
public void testNoDiskBootFromIsoDomain ( ) { org.ovirt.engine.core.bll.validator.RunVmValidatorTest.validateResult ( runVmValidator.validateBootSequence ( new org.ovirt.engine.core.common.businessentities.VM ( ) , BootSequence.CD , new java.util.ArrayList < > ( ) , org.ovirt.engine.core.compat.Guid.newGuid ( ) ) , true , null ) ; }

Target:
public void testNoDiskBootFromIsoDomain ( ) { org.ovirt.engine.core.common.businessentities.VM vm = new org.ovirt.engine.core.common.businessentities.VM ( ) ; vm.setBootSequence ( BootSequence.CD ) ; org.ovirt.engine.core.bll.validator.RunVmValidatorTest.validateResult ( runVmValidator.validateBootSequence ( vm , new java.util.ArrayList < > ( ) , org.ovirt.engine.core.compat.Guid.newGuid ( ) ) , true , null ) ; }
Source:
public void testCanDoActionNotEnoughSpace ( ) { prepareForVmValidatorTests ( ) ; spySdValidator ( ) ; cmd.getVm ( ) . setStatus ( VMStatus.Up ) ; org.mockito.Mockito.doReturn ( ValidationResult.VALID ) . when ( vmValidator ) . vmHostCanLiveMerge ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > imagesDisks = mockDisksList ( 4 ) ; org.mockito.Mockito.when ( storageDomainsValidator.allDomainsHaveSpaceForClonedDisks ( imagesDisks ) ) . thenReturn ( new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_DISK_SPACE_LOW_ON_STORAGE_DOMAIN ) ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( cmd , EngineMessage.ACTION_TYPE_FAILED_DISK_SPACE_LOW_ON_STORAGE_DOMAIN ) ; }

Target:
public void testValidateNotEnoughSpace ( ) { prepareForVmValidatorTests ( ) ; spySdValidator ( ) ; cmd.getVm ( ) . setStatus ( VMStatus.Up ) ; org.mockito.Mockito.doReturn ( ValidationResult.VALID ) . when ( vmValidator ) . vmHostCanLiveMerge ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > imagesDisks = mockDisksList ( 4 ) ; org.mockito.Mockito.when ( storageDomainsValidator.allDomainsHaveSpaceForClonedDisks ( imagesDisks ) ) . thenReturn ( new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_DISK_SPACE_LOW_ON_STORAGE_DOMAIN ) ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( cmd , EngineMessage.ACTION_TYPE_FAILED_DISK_SPACE_LOW_ON_STORAGE_DOMAIN ) ; }
Source:
private void dataCenterWithClusterSelectedItemChanged ( java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { behavior.dataCenterWithClusterSelectedItemChanged ( ) ; org.ovirt.engine.ui.uicommonweb.models.vms.DataCenterWithCluster dataCenterWithCluster = getDataCenterWithClustersList ( ) . getSelectedItem ( ) ; if ( ( dataCenterWithCluster != null ) && ( ( dataCenterWithCluster.getDataCenter ( ) ) != null ) ) { getDisksAllocationModel ( ) . setQuotaEnforcementType ( dataCenterWithCluster.getDataCenter ( ) . getQuotaEnforcementType ( ) ) ; } updateMigrationOptions ( ) ; updateMaximalVmMemSize ( ) ; handleQxlClusterLevel ( ) ; updateWatchdogModels ( ) ; }

Target:
private void updateBootMenu ( ) { if ( ( getSelectedCluster ( ) ) != null ) { org.ovirt.engine.core.compat.Version version = getSelectedCluster ( ) . getcompatibility_version ( ) ; final boolean supported = org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.isBootMenuSupported ( version.toString ( ) ) ; if ( ! supported ) { getBootMenuEnabled ( ) . setEntity ( false ) ; getBootMenuEnabled ( ) . setChangeProhibitionReason ( org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getMessages ( ) . bootMenuNotSupported ( version.toString ( 2 ) ) ) ; } getBootMenuEnabled ( ) . setIsChangable ( supported ) ; } }
Source:
private void updateAvailableOvirtNodeUpgrades ( ) { final org.ovirt.engine.core.common.businessentities.VDS host = org.ovirt.engine.ui.uicommonweb.models.hosts.HostListModel.getSelectedItem ( ) ; if ( host == null ) { return ; } if ( ( host.getVdsType ( ) ) != ( org.ovirt.engine.core.common.businessentities.VDSType.oVirtNode ) ) { return ; } org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getoVirtISOsList ( new org.ovirt.engine.ui.frontend.AsyncQuery ( this , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { } } ) , host.getId ( ) ) ; }

Target:
private void updateAvailableOvirtNodeUpgrades ( ) { final org.ovirt.engine.core.common.businessentities.VDS host = org.ovirt.engine.ui.uicommonweb.models.hosts.HostListModel.getSelectedItem ( ) ; if ( host == null ) { return ; } if ( ! ( host.isOvirtNode ( ) ) ) { return ; } org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getoVirtISOsList ( new org.ovirt.engine.ui.frontend.AsyncQuery ( this , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { } } ) , host.getId ( ) ) ; }
Source:
public org.ovirt.engine.ui.common.uicommon.model.SearchableDetailModelProvider < org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSession , org.ovirt.engine.ui.uicommonweb.models.volumes.VolumeListModel , org.ovirt.engine.ui.uicommonweb.models.gluster.VolumeGeoRepListModel > getVolumeGeoRepListProvider ( com.google.gwt.event.shared.EventBus eventBus , com.google.inject.Provider < org.ovirt.engine.ui.common.presenter.popup.DefaultConfirmationPopupPresenterWidget > defaultConfirmPopupProvider ) { return new org.ovirt.engine.ui.common.uicommon.model.SearchableDetailTabModelProvider < org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSession , org.ovirt.engine.ui.uicommonweb.models.volumes.VolumeListModel , org.ovirt.engine.ui.uicommonweb.models.gluster.VolumeGeoRepListModel > ( eventBus , defaultConfirmPopupProvider , org.ovirt.engine.ui.uicommonweb.models.volumes.VolumeListModel.class , org.ovirt.engine.ui.uicommonweb.models.gluster.VolumeGeoRepListModel.class ) { @ java.lang.Override public org.ovirt.engine.ui.common.presenter.AbstractModelBoundPopupPresenterWidget < ? extends org.ovirt.engine.ui.uicommonweb.models.Model , ? > getModelPopup ( org.ovirt.engine.ui.uicommonweb.models.gluster.VolumeGeoRepListModel source , org.ovirt.engine.ui.uicommonweb.UICommand lastExecutedCommand , org.ovirt.engine.ui.uicommonweb.models.Model windowModel ) { return null ; } } ; }

Target:
public org.ovirt.engine.ui.common.presenter.AbstractModelBoundPopupPresenterWidget < ? extends org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel , ? > getConfirmModelPopup ( org.ovirt.engine.ui.uicommonweb.models.gluster.GlusterVolumeSnapshotListModel source , org.ovirt.engine.ui.uicommonweb.UICommand lastExecutedCommand ) { return super . getConfirmModelPopup ( source , lastExecutedCommand ) ; }
Source:
public org.ovirt.engine.core.common.action.VdcReturnValueBase endAction ( org.ovirt.engine.core.bll.tasks.interfaces.SPMTask task , org.ovirt.engine.core.bll.job.ExecutionContext context ) { org.ovirt.engine.core.common.businessentities.AsyncTasks dbAsyncTask = task.getParameters ( ) . getDbAsyncTask ( ) ; org.ovirt.engine.core.common.action.VdcActionType actionType = getEndActionType ( dbAsyncTask ) ; org.ovirt.engine.core.common.action.VdcActionParametersBase parameters = dbAsyncTask.getActionParameters ( ) ; org.ovirt.engine.core.bll.CommandBase < ? > command = org.ovirt.engine.core.bll.CommandsFactory.createCommand ( actionType , parameters ) ; command.setContext ( new org.ovirt.engine.core.bll.context.CommandContext ( context ) ) ; return new org.ovirt.engine.core.bll.tasks.DecoratedCommand ( command ) . endAction ( ) ; }

Target:
public org.ovirt.engine.core.common.action.VdcReturnValueBase endAction ( org.ovirt.engine.core.bll.tasks.interfaces.SPMTask task , org.ovirt.engine.core.bll.job.ExecutionContext context ) { org.ovirt.engine.core.common.businessentities.AsyncTasks dbAsyncTask = task.getParameters ( ) . getDbAsyncTask ( ) ; org.ovirt.engine.core.common.action.VdcActionType actionType = getEndActionType ( dbAsyncTask ) ; org.ovirt.engine.core.common.action.VdcActionParametersBase parameters = dbAsyncTask.getActionParameters ( ) ; org.ovirt.engine.core.bll.CommandBase < ? > command = org.ovirt.engine.core.bll.CommandsFactory.createCommand ( actionType , parameters ) ; command.getContext ( ) . withExecutionContext ( context ) ; return new org.ovirt.engine.core.bll.tasks.DecoratedCommand ( command ) . endAction ( ) ; }
Source:
public static void GetCPUList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Version 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.util.ArrayList < org.ovirt.engine.core.common.businessentities.ServerCpu > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ServerCpu > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllServerCpuList , new org.ovirt.engine.core.common.queries.GetAllServerCpuListParameters ( version ) , aQuery ) ; }

Target:
public static void getCPUList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Version 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.util.ArrayList < org.ovirt.engine.core.common.businessentities.ServerCpu > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ServerCpu > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllServerCpuList , new org.ovirt.engine.core.common.queries.GetAllServerCpuListParameters ( version ) , aQuery ) ; }
Source:
public void save ( org.ovirt.engine.core.common.businessentities.storage.ImageStorageDomainMap entity ) { getCallsHandler ( ) . executeModification ( "Insertimage_storage_domain_map" , getCustomMapSqlParameterSource ( ) . addValue ( "image_id" , entity.getimage_id ( ) ) . addValue ( "storage_domain_id" , entity.getstorage_domain_id ( ) ) . addValue ( "quota_id" , entity.getQuotaId ( ) ) . addValue ( "disk_profile_id" , entity.getDiskProfileId ( ) ) ) ; }

Target:
public void save ( org.ovirt.engine.core.common.businessentities.storage.ImageStorageDomainMap entity ) { getCallsHandler ( ) . executeModification ( "Insertimage_storage_domain_map" , getCustomMapSqlParameterSource ( ) . addValue ( "image_id" , entity.getImageId ( ) ) . addValue ( "storage_domain_id" , entity.getStorageDomainId ( ) ) . addValue ( "quota_id" , entity.getQuotaId ( ) ) . addValue ( "disk_profile_id" , entity.getDiskProfileId ( ) ) ) ; }
Source:
public void getExternalProviderHostGroupList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.businessentities.Provider provider ) { 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.ExternalHostGroup > ( ) ; } return source ; } } ; org.ovirt.engine.core.common.queries.ProviderQueryParameters params = new org.ovirt.engine.core.common.queries.ProviderQueryParameters ( ) ; params.setProvider ( provider ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetHostGroupsFromExternalProvider , params , aQuery ) ; }

Target:
public void getStorageDomainDefaultWipeAfterDelete ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.businessentities.storage.StorageType storageType ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean Convert ( java.lang.Object returnValue , org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery ) { return ( ( java.lang.Boolean ) ( returnValue ) ) ; } } ; org.ovirt.engine.core.common.queries.GetStorageDomainDefaultWipeAfterDeleteParameters params = new org.ovirt.engine.core.common.queries.GetStorageDomainDefaultWipeAfterDeleteParameters ( storageType ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainDefaultWipeAfterDelete , params , aQuery ) ; }
Source:
public void initialize ( ) throws org.quartz.SchedulerConfigException { executorService = new java.util.concurrent.ThreadPoolExecutor ( 10 , count , 60L , java.util.concurrent.TimeUnit.SECONDS , new java.util.concurrent.ArrayBlockingQueue < java.lang.Runnable > ( 50 ) , new org.ovirt.engine.core.utils.timer.SchedulerThreadPool.SchedulerThreadFactory ( this ) ) ; }

Target:
public void initialize ( ) throws org.quartz.SchedulerConfigException { executorService = new java.util.concurrent.ThreadPoolExecutor ( 10 , count , 60L , java.util.concurrent.TimeUnit.SECONDS , new java.util.concurrent.ArrayBlockingQueue < java.lang.Runnable > ( queueSize ) , new org.ovirt.engine.core.utils.timer.SchedulerThreadPool.SchedulerThreadFactory ( this ) , ( isReject ( ) ? new java.util.concurrent.ThreadPoolExecutor.AbortPolicy ( ) : new org.ovirt.engine.core.utils.timer.SchedulerThreadPool.BlockedRejectedExecutionHandler ( log ) ) ) ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult isDomainHasSpaceForRequest ( final long requestedSize ) { if ( ( ( storageDomain.getavailable_disk_size ( ) ) != null ) && ( ( ( storageDomain.getavailable_disk_size ( ) ) - requestedSize ) < ( org.ovirt.engine.core.bll.validator.StorageDomainValidator.getLowDiskSpaceThreshold ( ) ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.dal.VdcBllMessages.ACTION_TYPE_FAILED_DISK_SPACE_LOW_ON_TARGET_STORAGE_DOMAIN , storageName ( ) ) ; } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult isDomainHasSpaceForRequest ( final long requestedSize , final boolean useThresHold ) { long size = ( useThresHold ) ? org.ovirt.engine.core.bll.validator.StorageDomainValidator.getLowDiskSpaceThreshold ( ) : 0L ; if ( ( ( storageDomain.getAvailableDiskSize ( ) ) != null ) && ( ( ( storageDomain.getAvailableDiskSize ( ) ) - requestedSize ) < size ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.dal.VdcBllMessages.ACTION_TYPE_FAILED_DISK_SPACE_LOW_ON_TARGET_STORAGE_DOMAIN , storageName ( ) ) ; } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }
Source:
public static 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.RunQuery ( VdcQueryType.GetPermittedStorageDomainsByStoragePoolId , params , aQuery ) ; }

Target:
public static void getDocumentationBaseURL ( 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.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.DocsURL , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
public void setItems ( java.util.Collection value ) { if ( ( items ) != value ) { itemsChanging ( value , items ) ; items = value ; itemsChanged ( ) ; getItemsChangedEvent ( ) . raise ( this , EventArgs.EMPTY ) ; onPropertyChanged ( new org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ( "Items" ) ) ; } }

Target:
public void setItems ( java.util.Collection < org.ovirt.engine.ui.uicommonweb.models.hosts.HostInterfaceLineModel > value ) { if ( ( items ) != value ) { itemsChanging ( value , items ) ; items = value ; itemsChanged ( ) ; getItemsChangedEvent ( ) . raise ( this , EventArgs.EMPTY ) ; onPropertyChanged ( new org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ( "Items" ) ) ; } }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { this . stopProgress ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VDS > hosts = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( ) ; hosts.add ( 0 , null ) ; for ( org.ovirt.engine.core.common.businessentities.VDS host : ( ( java.util.List < org.ovirt.engine.core.common.businessentities.VDS > ) ( returnValue ) ) ) { if ( ( host.getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VDSStatus.Up ) ) { hosts.add ( host ) ; } } proxyHosts.setItems ( hosts ) ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { java.util.List < org.ovirt.engine.core.common.businessentities.VDS > hosts = ( ( java.util.List < org.ovirt.engine.core.common.businessentities.VDS > ) ( returnValue ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VDS > upHosts = filterUpHosts ( hosts ) ; proxyHosts.setItems ( addAnyHostInCluster ( upHosts ) ) ; this . hosts.setItems ( upHosts ) ; stopProgress ( ) ; }
Source:
public void getVmTemplatesByBaseTemplateId ( org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery , org.ovirt.engine.core.compat.Guid baseTemplate ) { asyncQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmTemplate > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmTemplatesByBaseTemplateId , new org.ovirt.engine.core.common.queries.GetVmTemplateParameters ( baseTemplate ) , asyncQuery ) ; }

Target:
public void getVmTemplatesByBaseTemplateId ( org.ovirt.engine.ui.frontend.AsyncQuery < java.util.List < org.ovirt.engine.core.common.businessentities.VmTemplate > > asyncQuery , org.ovirt.engine.core.compat.Guid baseTemplate ) { asyncQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.ListConverter < > ( ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmTemplatesByBaseTemplateId , new org.ovirt.engine.core.common.queries.GetVmTemplateParameters ( baseTemplate ) , asyncQuery ) ; }
Source:
public void testConnection ( ) { try { getClient ( ) . execute ( new com.woorea.openstack.base.client.OpenStackRequest ( getClient ( ) , com.woorea.openstack.base.client.HttpMethod.GET , "" , null , org.ovirt.engine.core.bll.provider.network.openstack.OpenstackNetworkProviderProxy.ApiRootResponse.class ) ) ; } catch ( com.woorea.openstack.base.client.OpenStackResponseException e ) { org.ovirt.engine.core.bll.provider.network.openstack.OpenstackNetworkProviderProxy.log.error ( "{} (OpenStack response error code: {})" , e.getMessage ( ) , e.getStatus ( ) ) ; org.ovirt.engine.core.bll.provider.network.openstack.OpenstackNetworkProviderProxy.log.debug ( "Exception" , e ) ; throw new org.ovirt.engine.core.common.errors.VdcBLLException ( org.ovirt.engine.core.common.errors.VdcBllErrors.PROVIDER_FAILURE , e ) ; } catch ( java.lang.RuntimeException e ) { throw new org.ovirt.engine.core.common.errors.VdcBLLException ( org.ovirt.engine.core.common.errors.VdcBllErrors.PROVIDER_FAILURE , e ) ; } }

Target:
public void testConnection ( ) { try { getClient ( ) . execute ( new com.woorea.openstack.base.client.OpenStackRequest ( getClient ( ) , com.woorea.openstack.base.client.HttpMethod.GET , "" , null , org.ovirt.engine.core.bll.provider.network.openstack.OpenstackNetworkProviderProxy.ApiRootResponse.class ) ) ; } catch ( com.woorea.openstack.base.client.OpenStackResponseException e ) { org.ovirt.engine.core.bll.provider.network.openstack.OpenstackNetworkProviderProxy.log.error ( "{} (OpenStack response error code: {})" , e.getMessage ( ) , e.getStatus ( ) ) ; org.ovirt.engine.core.bll.provider.network.openstack.OpenstackNetworkProviderProxy.log.debug ( "Exception" , e ) ; throw new org.ovirt.engine.core.common.errors.EngineException ( org.ovirt.engine.core.common.errors.EngineError.PROVIDER_FAILURE , e ) ; } catch ( java.lang.RuntimeException e ) { throw new org.ovirt.engine.core.common.errors.EngineException ( org.ovirt.engine.core.common.errors.EngineError.PROVIDER_FAILURE , e ) ; } }
Source:
public static void getDefaultSpmPriority ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) . intValue ( ) : 0 ; } } ; aQuery.asyncCallback.onSuccess ( aQuery.getModel ( ) , 5 ) ; }

Target:
public void getClusterServerMemoryOverCommit ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) . intValue ( ) : 0 ; } } ; getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.MaxVdsMemOverCommitForServers , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { java.lang.Boolean interfaceHasSiblingVlanInterfaces = ( ( java.lang.Boolean ) ( returnValue ) ) ; if ( ! interfaceHasSiblingVlanInterfaces ) { for ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface i : interfaceList ) { if ( org.ovirt.engine.core.common.utils.ObjectUtils.objectsEqual ( i.getBondName ( ) , vlanParent.getName ( ) ) ) { ifacesOptions.add ( i ) ; } } } defaultInterfaceName.append ( vlanParent.getName ( ) ) ; asyncQuery.asyncCallback.onSuccess ( asyncQuery.model , ifacesOptions ) ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { java.lang.Boolean interfaceHasSiblingVlanInterfaces = ( ( java.lang.Boolean ) ( returnValue ) ) ; if ( ! interfaceHasSiblingVlanInterfaces ) { for ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface i : interfaceList ) { if ( java.util.Objects.equals ( i.getBondName ( ) , vlanParent.getName ( ) ) ) { ifacesOptions.add ( i ) ; } } } defaultInterfaceName.append ( vlanParent.getName ( ) ) ; asyncQuery.asyncCallback.onSuccess ( asyncQuery.model , ifacesOptions ) ; }
Source:
public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > ) ( source ) ) : null ; }

Target:
public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Cluster > list = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Cluster > ) ( source ) ) ; java.util.Collections.sort ( list , new org.ovirt.engine.core.common.businessentities.comparators.NameableComparator ( ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Cluster > ( ) ; }
Source:
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.RunQuery ( VdcQueryType.Search , searchParams , aQuery ) ; }

Target:
public static void getVmSnapshotList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllVmSnapshotsByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }