auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private void initListerners ( final org.ovirt.engine.ui.uicommonweb.models.storage.DisksAllocationModel model ) { model.getPropertyChangedEvent ( ) . addListener ( new org.ovirt.engine.ui.uicompat.IEventListener ( ) { @ java.lang.Override public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { if ( args instanceof org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ) { org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs changedArgs = ( ( org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ) ( args ) ) ; if ( "Disks" . equals ( changedArgs.propertyName ) ) { addDiskList ( model ) ; } else if ( "QuotaEnforcmentType" . equals ( changedArgs.propertyName ) ) { updateColumnsAvailability ( model ) ; updateListHeader ( model ) ; } } } } ) ; }

Target:
private void initListerners ( final org.ovirt.engine.ui.uicommonweb.models.storage.DisksAllocationModel model ) { model.getPropertyChangedEvent ( ) . addListener ( new org.ovirt.engine.ui.uicompat.IEventListener < org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs > ( ) { @ java.lang.Override public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < ? extends org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs args ) { if ( "Disks" . equals ( args.propertyName ) ) { addDiskList ( model ) ; } else if ( "QuotaEnforcmentType" . equals ( args.propertyName ) ) { updateColumnsAvailability ( model ) ; updateListHeader ( model ) ; } } } ) ; }
Source:
public void testChangeCdUsingQueryParameter ( ) { resource.setUriInfo ( setUpChangeCdUriQueryExpectations ( ) ) ; setUpEntityQueryExpectations ( getVm ( ) ) ; setUpActionExpectations ( ActionType.ChangeDisk , org.ovirt.engine.core.common.action.ChangeDiskCommandParameters.class , new java.lang.String [ ] { "CdImagePath" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendVmCdromResourceTest.A_ISO } , true , true ) ; org.ovirt.engine.api.model.Cdrom cdrom = getCdrom ( org.ovirt.engine.api.restapi.resource.BackendVmCdromResourceTest.A_ISO ) ; cdrom = resource.update ( cdrom ) ; org.junit.Assert.assertTrue ( cdrom.isSetFile ( ) ) ; }

Target:
public void testChangeCdUsingQueryParameter ( ) { resource.setUriInfo ( setUpChangeCdUriQueryExpectations ( ) ) ; setUpEntityQueryExpectations ( getVm ( ) ) ; setUpActionExpectations ( ActionType.ChangeDisk , org.ovirt.engine.core.common.action.ChangeDiskCommandParameters.class , new java.lang.String [ ] { "CdImagePath" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendVmCdromResourceTest.A_ISO } , true , true ) ; org.ovirt.engine.api.model.Cdrom cdrom = getCdrom ( org.ovirt.engine.api.restapi.resource.BackendVmCdromResourceTest.A_ISO ) ; cdrom = resource.update ( cdrom ) ; org.junit.jupiter.api.Assertions.assertTrue ( cdrom.isSetFile ( ) ) ; }
Source:
public void isValidVmNetworkForNullNetwork ( ) { org.ovirt.engine.core.common.businessentities.network.Network network = createNewNetwork ( true , NETWORK_NAME ) ; org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface iface = createNewInterface ( ) ; org.junit.Assert.assertTrue ( vmInterfaceManager.isValidVmNetwork ( iface , java.util.Collections.singletonMap ( network.getName ( ) , network ) ) ) ; }

Target:
public void isValidVmNetworkForNullNetwork ( ) { org.ovirt.engine.core.common.businessentities.network.Network network = createNewNetwork ( true , NETWORK_NAME ) ; org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface iface = createNewViewableInterface ( ) ; org.junit.Assert.assertTrue ( vmInterfaceManager.isValidVmNetwork ( iface , java.util.Collections.singletonMap ( network.getName ( ) , network ) , version ) ) ; }
Source:
protected void proceedProxyReturnValue ( ) { org.ovirt.engine.core.common.errors.VdcBllErrors returnStatus = GetReturnValueFromStatus ( getReturnStatus ( ) ) ; switch ( returnStatus ) { case StorageServerConnectionRefIdAlreadyInUse : case StorageServerConnectionRefIdDoesNotExist : org.ovirt.engine.core.vdsbroker.vdsbroker.VDSExceptionBase outEx = new org.ovirt.engine.core.vdsbroker.vdsbroker.VDSErrorException ( java.lang.String.format ( "Failed in vdscommand %1$s, error = %2$s" , org.ovirt.engine.core.vdsbroker.vdsbroker.ConnectStorageServerVDSCommand.getCommandName ( ) , getReturnStatus ( ) . mMessage ) ) ; initializeVdsError ( returnStatus ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.ConnectStorageServerVDSCommand.getVDSReturnValue ( ) . setSucceeded ( false ) ; throw outEx ; default : super . proceedProxyReturnValue ( ) ; break ; } }

Target:
protected void proceedProxyReturnValue ( ) { org.ovirt.engine.core.common.errors.VdcBllErrors returnStatus = getReturnValueFromStatus ( getReturnStatus ( ) ) ; switch ( returnStatus ) { case StorageServerConnectionRefIdAlreadyInUse : case StorageServerConnectionRefIdDoesNotExist : org.ovirt.engine.core.vdsbroker.vdsbroker.VDSExceptionBase outEx = new org.ovirt.engine.core.vdsbroker.vdsbroker.VDSErrorException ( java.lang.String.format ( "Failed in vdscommand %1$s, error = %2$s" , org.ovirt.engine.core.vdsbroker.vdsbroker.ConnectStorageServerVDSCommand.getCommandName ( ) , getReturnStatus ( ) . mMessage ) ) ; initializeVdsError ( returnStatus ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.ConnectStorageServerVDSCommand.getVDSReturnValue ( ) . setSucceeded ( false ) ; throw outEx ; default : super . proceedProxyReturnValue ( ) ; break ; } }
Source:
private void waitUntilCheck ( java.util.function.Predicate < org.ovirt.vdsm.jsonrpc.client.JsonRpcClient > check , java.lang.String formatBefore , java.lang.String formatAfter ) throws java.lang.InterruptedException { java.lang.String hostname = client.getHostname ( ) ; org.ovirt.engine.core.vdsbroker.jsonrpc.JsonRpcVdsServer.logger.debug ( formatBefore , hostname ) ; int retries = 50 ; while ( check.test ( this . client ) ) { if ( retries == 0 ) { throw new org.ovirt.engine.core.vdsbroker.vdsbroker.VDSNetworkException ( ( ( "Unable to reconnect to " + hostname ) + " after policy reset" ) ) ; } retries -- ; java.util.concurrent.TimeUnit.MILLISECONDS.sleep ( 200 ) ; } org.ovirt.engine.core.vdsbroker.jsonrpc.JsonRpcVdsServer.logger.debug ( formatAfter , hostname ) ; }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.VMNamesListReturnForXmlRpc getExternalVmNamesList ( java.lang.String uri , java.lang.String username , java.lang.String password ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "Host.getExternalVMNames" ) . withParameter ( "uri" , uri ) . withParameter ( "username" , username ) . withParameter ( "password" , password ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) . withResponseKey ( "vmNames" ) . withResponseType ( java.lang.Object [ ] . class ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.VMNamesListReturnForXmlRpc ( response ) ; }
Source:
private void handleError ( org.ovirt.engine.core.common.vdscommands.VDSReturnValue returnValue ) { java.lang.String msg = ( ( org.ovirt.engine.core.common.businessentities.FenceStatusReturnValue ) ( returnValue.getReturnValue ( ) ) ) . getMessage ( ) ; org.ovirt.engine.core.bll.GetVdsFenceStatusQuery.getQueryReturnValue ( ) . setReturnValue ( new org.ovirt.engine.core.common.businessentities.FenceStatusReturnValue ( "unknown" , msg ) ) ; org.ovirt.engine.core.bll.GetVdsFenceStatusQuery.alertPowerManagementStatusFailed ( msg ) ; }

Target:
private void handleError ( org.ovirt.engine.core.common.vdscommands.VDSFenceReturnValue returnValue ) { java.lang.String msg = returnValue.getExceptionString ( ) ; org.ovirt.engine.core.bll.GetVdsFenceStatusQuery.alertPowerManagementStatusFailed ( msg ) ; org.ovirt.engine.core.bll.GetVdsFenceStatusQuery.getQueryReturnValue ( ) . setReturnValue ( new org.ovirt.engine.core.common.businessentities.FenceStatusReturnValue ( "unknown" , msg ) ) ; }
Source:
protected void executeCommand ( ) { org.ovirt.engine.core.common.vdscommands.MoveStorageDomainDeviceVDSCommandParameters p = new org.ovirt.engine.core.common.vdscommands.MoveStorageDomainDeviceVDSCommandParameters ( org.ovirt.engine.core.bll.storage.domain.MoveStorageDomainDeviceCommand.getParameters ( ) . getStorageJobId ( ) , org.ovirt.engine.core.bll.storage.domain.MoveStorageDomainDeviceCommand.getParameters ( ) . getStorageDomainId ( ) , org.ovirt.engine.core.bll.storage.domain.MoveStorageDomainDeviceCommand.getParameters ( ) . getSrcDeviceId ( ) , org.ovirt.engine.core.bll.storage.domain.MoveStorageDomainDeviceCommand.getParameters ( ) . getDstDevicesIds ( ) ) ; p.setVdsId ( org.ovirt.engine.core.bll.storage.domain.MoveStorageDomainDeviceCommand.getParameters ( ) . getVdsRunningOn ( ) ) ; org.ovirt.engine.core.bll.storage.utils.VdsCommandsHelper.runVdsCommandWithoutFailover ( VDSCommandType.MoveStorageDomainDevice , p , org.ovirt.engine.core.bll.storage.domain.MoveStorageDomainDeviceCommand.getParameters ( ) . getStoragePoolId ( ) , this ) ; org.ovirt.engine.core.bll.storage.domain.MoveStorageDomainDeviceCommand.setSucceeded ( true ) ; }

Target:
protected void executeCommand ( ) { org.ovirt.engine.core.common.vdscommands.MoveStorageDomainDeviceVDSCommandParameters p = new org.ovirt.engine.core.common.vdscommands.MoveStorageDomainDeviceVDSCommandParameters ( org.ovirt.engine.core.bll.storage.domain.MoveStorageDomainDeviceCommand.getParameters ( ) . getStorageJobId ( ) , org.ovirt.engine.core.bll.storage.domain.MoveStorageDomainDeviceCommand.getParameters ( ) . getStorageDomainId ( ) , org.ovirt.engine.core.bll.storage.domain.MoveStorageDomainDeviceCommand.getParameters ( ) . getSrcDeviceId ( ) , org.ovirt.engine.core.bll.storage.domain.MoveStorageDomainDeviceCommand.getParameters ( ) . getDstDevicesIds ( ) ) ; p.setVdsId ( org.ovirt.engine.core.bll.storage.domain.MoveStorageDomainDeviceCommand.getParameters ( ) . getVdsRunningOn ( ) ) ; vdsCommandsHelper.runVdsCommandWithoutFailover ( VDSCommandType.MoveStorageDomainDevice , p , org.ovirt.engine.core.bll.storage.domain.MoveStorageDomainDeviceCommand.getParameters ( ) . getStoragePoolId ( ) , this ) ; org.ovirt.engine.core.bll.storage.domain.MoveStorageDomainDeviceCommand.setSucceeded ( true ) ; }
Source:
public org.ovirt.engine.ui.common.uicommon.model.MainModelProvider < org.ovirt.engine.core.common.businessentities.AuditLog , org.ovirt.engine.ui.uicommonweb.models.events.EventListModel > getEventListProvider ( org.ovirt.engine.ui.webadmin.gin.ClientGinjector ginjector ) { return new org.ovirt.engine.ui.common.uicommon.model.MainTabModelProvider < org.ovirt.engine.core.common.businessentities.AuditLog , org.ovirt.engine.ui.uicommonweb.models.events.EventListModel > ( ginjector , org.ovirt.engine.ui.uicommonweb.models.events.EventListModel.class ) ; }

Target:
public org.ovirt.engine.ui.common.presenter.AbstractModelBoundPopupPresenterWidget < ? extends org.ovirt.engine.ui.uicommonweb.models.Model , ? > getModelPopup ( org.ovirt.engine.ui.uicommonweb.models.events.EventListModel source , org.ovirt.engine.ui.uicommonweb.UICommand lastExecutedCommand , org.ovirt.engine.ui.uicommonweb.models.Model windowModel ) { if ( lastExecutedCommand == ( getModel ( ) . getDetailsCommand ( ) ) ) { return popupProvider.get ( ) ; } else { return super . getModelPopup ( source , lastExecutedCommand , windowModel ) ; } }
Source:
public org.ovirt.engine.ui.uicommonweb.models.vms.VnicInstanceType getValue ( ) { org.ovirt.engine.core.common.businessentities.network.VnicProfileView profile = ( ( org.ovirt.engine.core.common.businessentities.network.VnicProfileView ) ( profileEditor.asEditor ( ) . getSubEditor ( ) . getValue ( ) ) ) ; vnicIntsanceType.getNetworkInterface ( ) . setVnicProfileId ( ( profile != null ? profile.getId ( ) : null ) ) ; return vnicIntsanceType ; }

Target:
public org.ovirt.engine.ui.uicommonweb.models.vms.VnicInstanceType getValue ( ) { org.ovirt.engine.core.common.businessentities.network.VnicProfileView profile = ( ( org.ovirt.engine.core.common.businessentities.network.VnicProfileView ) ( profileEditor.asEditor ( ) . getSubEditor ( ) . getValue ( ) ) ) ; vnicIntsanceType.getNetworkInterface ( ) . setVnicProfileId ( ( profile != null ? profile.getId ( ) : null ) ) ; vnicIntsanceType.getNetworkInterface ( ) . setNetworkName ( ( profile != null ? profile.getNetworkName ( ) : null ) ) ; return vnicIntsanceType ; }
Source:
public void latchedRunnableWrapperTest ( ) { final int threadsNumber = 100 ; runThreads ( threadsNumber , new org.ovirt.engine.core.utils.thread.LatchedRunnableWrapperTest.RunnableCreator ( ) { @ java.lang.Override public java.lang.Runnable createRunnable ( ) { return new org.ovirt.engine.core.utils.thread.LatchedRunnableWrapperTest.DummyRunnable ( ) ; } } ) ; org.junit.Assert.assertEquals ( threadsNumber , counter.intValue ( ) ) ; }

Target:
public void setup ( ) { counter = new java.util.concurrent.atomic.AtomicInteger ( ) ; threadPool = java.util.concurrent.Executors.newFixedThreadPool ( org.ovirt.engine.core.utils.thread.LatchedRunnableWrapperTest.THREADS_NUMBER ) ; runnableCreator = new org.ovirt.engine.core.utils.thread.LatchedRunnableWrapperTest.RunnableCreator ( ) { @ java.lang.Override public java.lang.Runnable createRunnable ( ) { return new org.ovirt.engine.core.utils.thread.LatchedRunnableWrapperTest.DummyRunnable ( ) ; } } ; }
Source:
public static void GetVmById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmByVmId , new org.ovirt.engine.core.common.queries.GetVmByVmIdParameters ( vmId ) , aQuery ) ; }

Target:
public static void GetPoolById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid poolId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmPoolById , new org.ovirt.engine.core.common.queries.GetVmPoolByIdParameters ( poolId ) , aQuery ) ; }
Source:
protected org.ovirt.engine.core.common.businessentities.DbGroup getEntity ( int index ) { org.ovirt.engine.core.common.businessentities.DbGroup entity = new org.ovirt.engine.core.common.businessentities.DbGroup ( ) ; entity.setId ( GUIDS [ index ] ) ; entity.setExternalId ( new org.ovirt.engine.core.common.utils.ExternalId ( GUIDS [ index ] . toByteArray ( ) ) ) ; entity.setName ( org.ovirt.engine.api.restapi.resource.BackendGroupsResourceTest.GROUP_NAMES [ index ] ) ; entity.setDomain ( org.ovirt.engine.api.restapi.resource.DOMAIN ) ; return entity ; }

Target:
protected org.ovirt.engine.core.common.businessentities.DbGroup getEntity ( int index ) { org.ovirt.engine.core.common.businessentities.DbGroup entity = new org.ovirt.engine.core.common.businessentities.DbGroup ( ) ; entity.setId ( GUIDS [ index ] ) ; entity.setExternalId ( EXTERNAL_IDS [ index ] ) ; entity.setName ( org.ovirt.engine.api.restapi.resource.BackendGroupsResourceTest.GROUP_NAMES [ index ] ) ; entity.setDomain ( org.ovirt.engine.api.restapi.resource.DOMAIN ) ; return entity ; }
Source:
public void onKeyPress ( com.google.gwt.event.dom.client.KeyPressEvent event ) { com.google.gwt.core.client.Scheduler.get ( ) . scheduleDeferred ( new com.google.gwt.core.client.Scheduler.ScheduledCommand ( ) { @ java.lang.Override public void execute ( ) { com.google.gwt.event.logical.shared.ValueChangeEvent.fire ( stringEditor.asValueBox ( ) , stringEditor.asValueBox ( ) . getValue ( ) ) ; } } ) ; }

Target:
public void edit ( final org.ovirt.engine.ui.uicommonweb.models.EntityModel < java.lang.String > model ) { driver.edit ( model ) ; stringEditor.fireValueChangeOnKeyDown ( ) ; stringEditor.asValueBox ( ) . addValueChangeHandler ( new com.google.gwt.event.logical.shared.ValueChangeHandler < java.lang.String > ( ) { @ java.lang.Override public void onValueChange ( com.google.gwt.event.logical.shared.ValueChangeEvent < java.lang.String > event ) { com.google.gwt.event.logical.shared.ValueChangeEvent.fire ( org.ovirt.engine.ui.webadmin.widget.provider.DnsServerEditor.this , model ) ; } } ) ; }
Source:
public javax.ws.rs.core.Response add ( org.ovirt.engine.api.model.Nic device ) { validateEnums ( org.ovirt.engine.api.model.Nic.class , device ) ; return super . add ( device ) ; }

Target:
public javax.ws.rs.core.Response add ( org.ovirt.engine.api.model.Nic nic ) { validateEnums ( org.ovirt.engine.api.model.Nic.class , nic ) ; validateParameters ( nic , "name" ) ; return performCreate ( VdcActionType.AddVmInterface , new org.ovirt.engine.core.common.action.AddVmInterfaceParameters ( vmId , map ( nic ) ) , new org.ovirt.engine.api.restapi.resource.NicResolver ( nic.getName ( ) ) ) ; }
Source:
private org.ovirt.engine.core.bll.network.macpool.MacPool decoratePool ( org.ovirt.engine.core.bll.network.macpool.MacPool macPool , java.util.List < org.ovirt.engine.core.bll.network.macpool.MacPoolDecorator > decorators ) { org.ovirt.engine.core.bll.network.macpool.MacPool result = macPool ; if ( decorators != null ) { for ( org.ovirt.engine.core.bll.network.macpool.MacPoolDecorator decorator : decorators ) { decorator.setMacPool ( result ) ; result = decorator ; } } return result ; }

Target:
private org.ovirt.engine.core.bll.network.macpool.MacPool decoratePool ( org.ovirt.engine.core.bll.network.macpool.MacPool macPool , java.util.List < org.ovirt.engine.core.bll.network.macpool.MacPoolDecorator > decorators ) { if ( org.apache.commons.collections.CollectionUtils.isEmpty ( decorators ) ) { org.ovirt.engine.core.bll.network.macpool.DecoratedMacPoolFactory.log.debug ( "No MacPoolDecorators were passed to decorate pool {}. " , macPool ) ; return macPool ; } org.ovirt.engine.core.bll.network.macpool.MacPool result = macPool ; org.ovirt.engine.core.bll.network.macpool.DecoratedMacPoolFactory.log.debug ( "Decorating MacPool with decorators: {}." , java.util.Arrays.toString ( decorators.toArray ( ) ) ) ; for ( org.ovirt.engine.core.bll.network.macpool.MacPoolDecorator decorator : decorators ) { decorator.setMacPool ( result ) ; result = decorator ; } return result ; }
Source:
public void testListFailure ( ) { setUpMacPoolsQueryExpectations ( org.ovirt.engine.api.restapi.resource.FAILURE ) ; javax.ws.rs.core.UriInfo uriInfo = setUpUriExpectations ( null ) ; collection.setUriInfo ( uriInfo ) ; try { getCollection ( ) ; org.junit.jupiter.api.Assertions.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae ) ; } }

Target:
public void testListCrash ( ) { java.lang.Throwable t = new java.lang.RuntimeException ( FAILURE ) ; setUpMacPoolsQueryExpectations ( t ) ; javax.ws.rs.core.UriInfo uriInfo = setUpUriExpectations ( null ) ; collection.setUriInfo ( uriInfo ) ; verifyFault ( org.junit.jupiter.api.Assertions.assertThrows ( javax.ws.rs.WebApplicationException.class , this :: getCollection ) , org.ovirt.engine.api.restapi.resource.BACKEND_FAILED_SERVER_LOCALE , t ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > pools = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ) ) ; if ( ( pools != null ) && ( ( pools.size ( ) ) > 0 ) ) { org.ovirt.engine.core.common.businessentities.StoragePool pool = pools.get ( 0 ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetClusterList ( ( ( org.ovirt.engine.ui.frontend.AsyncQuery ) ( model ) ) , pool.getId ( ) ) ; } }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > pools = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ) ) ; if ( ( pools != null ) && ( ( pools.size ( ) ) > 0 ) ) { org.ovirt.engine.core.common.businessentities.StoragePool pool = pools.get ( 0 ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getClusterList ( ( ( org.ovirt.engine.ui.frontend.AsyncQuery ) ( model ) ) , pool.getId ( ) ) ; } }
Source:
public java.lang.Void runInTransaction ( ) { initializeVds ( true ) ; AlertIfPowerManagementNotConfigured ( getParameters ( ) . getVdsStaticData ( ) ) ; TestVdsPowerManagementStatus ( getParameters ( ) . getVdsStaticData ( ) ) ; setSucceeded ( true ) ; setActionReturnValue ( getVdsIdRef ( ) ) ; getCompensationContext ( ) . resetCompensation ( ) ; return null ; }

Target:
public java.lang.Void runInTransaction ( ) { initializeVds ( true ) ; alertIfPowerManagementNotConfigured ( getParameters ( ) . getVdsStaticData ( ) ) ; testVdsPowerManagementStatus ( getParameters ( ) . getVdsStaticData ( ) ) ; setSucceeded ( true ) ; setActionReturnValue ( getVdsIdRef ( ) ) ; getCompensationContext ( ) . resetCompensation ( ) ; return null ; }
Source:
public void getAllDataCenterNetworks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.Network > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.Network > ( ) ; } } ; org.ovirt.engine.core.common.queries.IdQueryParameters params = new org.ovirt.engine.core.common.queries.IdQueryParameters ( storagePoolId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetNetworksByDataCenterId , params , aQuery ) ; }

Target:
public void getVmsRunningOnOrMigratingToVds ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmsRunningOnOrMigratingToVds , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
private void setVmTemplateIdParameter ( ) { java.util.Map < java.lang.Boolean , org.ovirt.engine.core.common.businessentities.VmTemplate > templateMap = org.ovirt.engine.core.bll.RemoveDiskCommand.getDbFacade ( ) . getVmTemplateDao ( ) . getAllForImage ( ( ( org.ovirt.engine.core.common.businessentities.DiskImage ) ( disk ) ) . getImageId ( ) ) ; if ( ! ( templateMap.isEmpty ( ) ) ) { setVmTemplateId ( templateMap.values ( ) . iterator ( ) . next ( ) . getId ( ) ) ; } }

Target:
private void setVmTemplateIdParameter ( ) { java.util.Map < java.lang.Boolean , org.ovirt.engine.core.common.businessentities.VmTemplate > templateMap = org.ovirt.engine.core.bll.RemoveDiskCommand.getDbFacade ( ) . getVmTemplateDao ( ) . getAllForImage ( getDiskImage ( ) . getImageId ( ) ) ; if ( ! ( templateMap.isEmpty ( ) ) ) { setVmTemplateId ( templateMap.values ( ) . iterator ( ) . next ( ) . getId ( ) ) ; } }
Source:
private org.ovirt.engine.core.bll.network.host.SetupNetworksHelper qosCommitmentBondSetup ( int totalCommitment , java.lang.Integer slaveSpeed , java.lang.Integer bondSpeed , java.lang.String bondOptions ) { return qosCommitmentSetup ( true , totalCommitment , slaveSpeed , bondSpeed , bondOptions ) ; }

Target:
private org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface createVlan ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface baseNic , int vlanId , java.lang.String networkName ) { java.lang.String baseIfaceName = baseNic.getName ( ) ; org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic = createVdsInterface ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , ( ( baseIfaceName + "." ) + vlanId ) , false , null , baseIfaceName , vlanId , networkName , true , null , null , org.ovirt.engine.core.bll.network.host.SetupNetworksHelperTest.DEFAULT_SPEED ) ; mockCalculateBaseNicWhenVlanNicIsPassed ( baseNic , nic ) ; return nic ; }
Source:
public void newProfile ( ) { if ( ( getWindow ( ) ) != null ) { return ; } org.ovirt.engine.core.common.businessentities.StoragePool treeSelectedDc = getSelectedDc ( ) ; final org.ovirt.engine.ui.uicommonweb.models.profiles.VnicProfileModel profileModel = new org.ovirt.engine.ui.uicommonweb.models.profiles.NewVnicProfileModel ( this , treeSelectedDc.getcompatibility_version ( ) , treeSelectedDc.getId ( ) ) ; setWindow ( profileModel ) ; initNetworkList ( profileModel ) ; }

Target:
public void newProfile ( ) { if ( ( getWindow ( ) ) != null ) { return ; } org.ovirt.engine.core.common.businessentities.StoragePool treeSelectedDc = getSelectedDc ( ) ; final org.ovirt.engine.ui.uicommonweb.models.profiles.VnicProfileModel profileModel = new org.ovirt.engine.ui.uicommonweb.models.profiles.NewVnicProfileModel ( this , treeSelectedDc.getCompatibilityVersion ( ) , treeSelectedDc.getId ( ) ) ; setWindow ( profileModel ) ; initNetworkList ( profileModel ) ; }
Source:
protected org.ovirt.engine.core.dao.DiskImageDynamicDao getDiskImageDynamicDao ( ) { return org.ovirt.engine.core.bll.ImportVmCommandBase.getDbFacade ( ) . getDiskImageDynamicDao ( ) ; }

Target:
protected boolean validateSoundDevice ( ) { if ( ! ( org.ovirt.engine.core.common.utils.VmDeviceCommonUtils.isSoundDeviceExists ( getVm ( ) . getManagedVmDeviceMap ( ) . values ( ) ) ) ) { return true ; } if ( ! ( osRepository.isSoundDeviceEnabled ( getVm ( ) . getStaticData ( ) . getOsId ( ) , getEffectiveCompatibilityVersion ( ) ) ) ) { addValidationMessageVariable ( "clusterArch" , org.ovirt.engine.core.bll.ImportVmCommandBase.getVdsGroup ( ) . getArchitecture ( ) ) ; return failValidation ( EngineMessage.SOUND_DEVICE_REQUESTED_ON_NOT_SUPPORTED_ARCH ) ; } return true ; }
Source:
public void poll ( ) { if ( manager.isMonitoringNeeded ( ) ) { org.ovirt.engine.core.vdsbroker.VmsListFetcher fetcher = ( getRefreshStatistics ( ) ) ? new org.ovirt.engine.core.vdsbroker.VmsStatisticsFetcher ( manager ) : new org.ovirt.engine.core.vdsbroker.VmsListFetcher ( manager ) ; long fetchTime = java.lang.System.nanoTime ( ) ; fetcher.fetch ( ) ; new org.ovirt.engine.core.vdsbroker.VmsMonitoring ( manager , fetcher.getChangedVms ( ) , fetcher.getVmsWithChangedDevices ( ) , auditLogDirector , fetchTime ) . perform ( ) ; } updateIteration ( ) ; }

Target:
public void poll ( ) { if ( manager.isMonitoringNeeded ( ) ) { org.ovirt.engine.core.vdsbroker.VmsListFetcher fetcher = getVmsFetcher ( ) ; long fetchTime = java.lang.System.nanoTime ( ) ; if ( fetcher.fetch ( ) ) { getVmsMonitoring ( fetcher , fetchTime ) . perform ( ) ; } else { org.ovirt.engine.core.vdsbroker.PollVMStatsRefresher.log.info ( "Failed to fetch vms info for host '{}' - skipping VMs monitoring." , manager.getVdsName ( ) ) ; } } }
Source:
protected void addCustomModelsDetailModelList ( org.ovirt.engine.ui.uicompat.ObservableCollection < org.ovirt.engine.ui.uicommonweb.models.EntityModel > list ) { org.ovirt.engine.ui.uicommonweb.models.templates.TemplateDiskListModel diskListModel = new org.ovirt.engine.ui.uicommonweb.models.templates.TemplateDiskListModel ( ) ; diskListModel.setSystemTreeContext ( this ) ; list.add ( 3 , diskListModel ) ; list.add ( new org.ovirt.engine.ui.uicommonweb.models.templates.TemplateEventListModel ( ) ) ; list.add ( new org.ovirt.engine.ui.uicommonweb.models.configure.PermissionListModel ( ) ) ; }

Target:
protected void addCustomModelsDetailModelList ( final java.util.List < org.ovirt.engine.ui.uicommonweb.models.EntityModel > list , int customPosition , final org.ovirt.engine.ui.uicommonweb.models.templates.TemplateDiskListModel templateDiskListModel , final org.ovirt.engine.ui.uicommonweb.models.templates.TemplateEventListModel templateEventListModel , final org.ovirt.engine.ui.uicommonweb.models.configure.PermissionListModel < org.ovirt.engine.ui.uicommonweb.models.templates.TemplateListModel > permissionListModel ) { templateDiskListModel.setSystemTreeContext ( this ) ; list.add ( customPosition , templateDiskListModel ) ; list.add ( templateEventListModel ) ; list.add ( permissionListModel ) ; }
Source:
public static void getMaximalVmMemSize32OS ( 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 ( ) : 20480 ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.VM32BitMaxMemorySizeInMB , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public static void getHostArchitecture ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter < org.ovirt.engine.core.common.businessentities.ArchitectureType > ( ) { @ java.lang.Override public org.ovirt.engine.core.common.businessentities.ArchitectureType Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return ( ( org.ovirt.engine.core.common.businessentities.ArchitectureType ) ( source ) ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetHostArchitecture , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
public void edit ( org.ovirt.engine.ui.uicommonweb.models.providers.ProviderModel model ) { setAgentTabVisibility ( model.getNeutronAgentModel ( ) . isPluginConfigurationAvailable ( ) . getEntity ( ) ) ; driver.edit ( model ) ; neutronAgentWidget.edit ( model.getNeutronAgentModel ( ) ) ; vmwarePropertiesWidget.edit ( model.getVmwarePropertiesModel ( ) ) ; kvmPropertiesWidget.edit ( model.getKvmPropertiesModel ( ) ) ; xenPropertiesWidget.edit ( model.getXenPropertiesModel ( ) ) ; }

Target:
public void edit ( org.ovirt.engine.ui.uicommonweb.models.providers.ProviderModel model ) { providerModel = model ; setAgentTabVisibility ( model.getNeutronAgentModel ( ) . isPluginConfigurationAvailable ( ) . getEntity ( ) ) ; driver.edit ( model ) ; neutronAgentWidget.edit ( model.getNeutronAgentModel ( ) ) ; vmwarePropertiesWidget.edit ( model.getVmwarePropertiesModel ( ) ) ; kvmPropertiesWidget.edit ( model.getKvmPropertiesModel ( ) ) ; xenPropertiesWidget.edit ( model.getXenPropertiesModel ( ) ) ; }
Source:
protected < T > T getConfigurationValueDefault ( org.ovirt.engine.core.common.queries.ConfigurationValues config ) { org.ovirt.engine.core.common.queries.VdcQueryReturnValue result = runQuery ( VdcQueryType.GetConfigurationValue , new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( config , org.ovirt.engine.core.common.config.ConfigCommon.defaultConfigurationVersion ) ) ; if ( result.getSucceeded ( ) ) { return ( ( T ) ( result.getReturnValue ( ) ) ) ; } return null ; }

Target:
protected < T > T getConfigurationValueDefault ( org.ovirt.engine.core.common.config.ConfigValues config ) { org.ovirt.engine.core.common.queries.QueryReturnValue result = runQuery ( QueryType.GetConfigurationValue , new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( config , org.ovirt.engine.core.common.config.ConfigCommon.defaultConfigurationVersion ) ) ; if ( result.getSucceeded ( ) ) { return ( ( T ) ( result.getReturnValue ( ) ) ) ; } return null ; }
Source:
public void edit ( final org.ovirt.engine.ui.uicommonweb.models.quota.ChangeQuotaItemModel object ) { org.ovirt.engine.ui.common.widget.uicommon.popup.quota.ChangeQuotaItemView.Driver.driver.edit ( object ) ; objectNameLabel.asValueBox ( ) . setValue ( object.getObject ( ) . getEntity ( ) ) ; currentQuotaLabel.asValueBox ( ) . setValue ( object.getCurrentQuota ( ) . getEntity ( ) ) ; }

Target:
public void edit ( final org.ovirt.engine.ui.uicommonweb.models.quota.ChangeQuotaItemModel object ) { driver.edit ( object ) ; objectNameLabel.asValueBox ( ) . setValue ( object.getObject ( ) . getEntity ( ) ) ; currentQuotaLabel.asValueBox ( ) . setValue ( object.getCurrentQuota ( ) . getEntity ( ) ) ; }
Source:
protected boolean canDoAction ( ) { org.ovirt.engine.core.bll.profiles.DiskProfileValidator validator = new org.ovirt.engine.core.bll.profiles.DiskProfileValidator ( getParameters ( ) . getProfile ( ) ) ; return ( ( ( ( validate ( validator.diskProfileIsSet ( ) ) ) && ( validate ( validator.diskProfileExists ( ) ) ) ) && ( validate ( validator.diskProfileNameNotUsed ( ) ) ) ) && ( validate ( validator.storageDomainNotChanged ( ) ) ) ) && ( validate ( validator.qosExistsOrNull ( ) ) ) ; }

Target:
protected org.ovirt.engine.core.bll.profiles.DiskProfileValidator getProfileValidator ( ) { return new org.ovirt.engine.core.bll.profiles.DiskProfileValidator ( getProfile ( ) ) ; }
Source:
public static void GetRpmVersionViaPublic ( 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.frontend.Frontend.RunPublicQuery ( VdcQueryType.GetConfigurationValue , new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.ProductRPMVersion , org.ovirt.engine.core.common.config.Config.DefaultConfigurationVersion ) , aQuery ) ; }

Target:
public static void GetClusterGlusterServices ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.core.common.queries.gluster.GlusterVolumeAdvancedDetailsParameters parameters = new org.ovirt.engine.core.common.queries.gluster.GlusterVolumeAdvancedDetailsParameters ( clusterId , "" , "" , false ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetGlusterVolumeAdvancedDetails , parameters , aQuery ) ; }
Source:
public void canRunForHostedEngine ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.VM hostedEngine = new org.ovirt.engine.core.common.businessentities.VM ( ) ; hostedEngine.setOrigin ( OriginType.MANAGED_HOSTED_ENGINE ) ; org.mockito.Mockito.when ( underTest.getVm ( ) ) . thenReturn ( hostedEngine ) ; org.assertj.core.api.Assertions.assertThat ( underTest.canRunActionOnNonManagedVm ( ) ) . isTrue ( ) ; }

Target:
public void canRunForHostedEngine ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.VM hostedEngine = new org.ovirt.engine.core.common.businessentities.VM ( ) ; hostedEngine.setOrigin ( OriginType.MANAGED_HOSTED_ENGINE ) ; underTest.setVm ( hostedEngine ) ; underTest.init ( ) ; org.junit.Assert.assertThat ( underTest.canRunActionOnNonManagedVm ( ) , org.hamcrest.CoreMatchers.is ( true ) ) ; }
Source:
public void run ( ) { org.ovirt.engine.core.bll.scheduling.external.ExternalSchedulerDiscoveryResult discoveryResult = org.ovirt.engine.core.bll.scheduling.external.ExternalSchedulerFactory.getInstance ( ) . runDiscover ( ) ; if ( discoveryResult != null ) { updateDB ( discoveryResult ) ; org.ovirt.engine.core.bll.scheduling.external.ExternalSchedulerDiscoveryThread.log.info ( "PolicyUnits updated" ) ; } else { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase loggable = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.log ( loggable , AuditLogType.FAILED_TO_CONNECT_TO_SCHEDULER_PROXY ) ; markAllExternalPoliciesAsDisabled ( ) ; org.ovirt.engine.core.bll.scheduling.external.ExternalSchedulerDiscoveryThread.log.warn ( "Discovery returned empty result, disabled external policy units" ) ; } }

Target:
public void run ( ) { org.ovirt.engine.core.bll.scheduling.external.ExternalSchedulerDiscoveryResult discoveryResult = org.ovirt.engine.core.bll.scheduling.external.ExternalSchedulerFactory.getInstance ( ) . runDiscover ( ) ; if ( discoveryResult != null ) { updateDB ( discoveryResult ) ; org.ovirt.engine.core.bll.scheduling.external.ExternalSchedulerDiscoveryThread.log.info ( "PolicyUnits updated" ) ; } else { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase loggable = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector ( ) . log ( loggable , AuditLogType.FAILED_TO_CONNECT_TO_SCHEDULER_PROXY ) ; markAllExternalPoliciesAsDisabled ( ) ; org.ovirt.engine.core.bll.scheduling.external.ExternalSchedulerDiscoveryThread.log.warn ( "Discovery returned empty result, disabled external policy units" ) ; } }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object result ) { java.lang.String message = ( ( java.lang.String ) ( result ) ) ; if ( ( message != null ) && ( ! ( message.isEmpty ( ) ) ) ) { motdMessagePanel.clear ( ) ; motdMessagePanel.add ( new com.google.gwt.user.client.ui.HTMLPanel ( templates.userMessageOfTheDay ( message ) ) ) ; motdPanel.setVisible ( true ) ; } else { motdPanel.setVisible ( false ) ; } }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object result ) { java.lang.String message = ( ( java.lang.String ) ( result ) ) ; if ( ( message != null ) && ( ! ( message.isEmpty ( ) ) ) ) { motdMessagePanel.clear ( ) ; motdMessagePanel.add ( new com.google.gwt.user.client.ui.HTMLPanel ( org.ovirt.engine.ui.userportal.section.login.view.LoginFormView.templates.userMessageOfTheDay ( message ) ) ) ; motdPanel.setVisible ( true ) ; } else { motdPanel.setVisible ( false ) ; } }
Source:
public void getRpmVersion ( 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.core.common.queries.GetConfigurationValueParameters tempVar = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.ProductRPMVersion ) ; tempVar.setVersion ( getDefaultConfigurationVersion ( ) ) ; getConfigFromCache ( tempVar , aQuery ) ; }

Target:
public void getGlusterHook ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hookId , boolean includeServerHooks ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterHookById , new org.ovirt.engine.core.common.queries.gluster.GlusterHookQueryParameters ( hookId , includeServerHooks ) , aQuery ) ; }
Source:
protected void setUpGetEntityExpectations ( boolean notFound ) throws java.lang.Exception { setUpGetEntityExpectations ( VdcQueryType.GetStepByStepId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , ( notFound ? null : getEntity ( 0 ) ) ) ; }

Target:
protected void setUpGetEntityExpectations ( boolean notFound ) throws java.lang.Exception { setUpGetEntityExpectations ( VdcQueryType.GetStepWithSubjectEntitiesByStepId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , ( notFound ? null : getEntity ( 0 ) ) ) ; }
Source:
public void invokeClient ( ) { boolean sslTarget = ( consoleOptions.getRawSecurePort ( ) ) != ( - 1 ) ; int port = ( sslTarget ) ? consoleOptions.getSecurePort ( ) : consoleOptions.getPort ( ) ; org.ovirt.engine.ui.common.uicommon.WebClientConsoleInvoker invoker = new org.ovirt.engine.ui.common.uicommon.WebClientConsoleInvoker ( org.ovirt.engine.ui.common.uicommon.SpiceHtml5Impl.CLIENT_PAGE , getConfig ( ) , getOptions ( ) . getHost ( ) , port , getOptions ( ) . getTicket ( ) , sslTarget ) ; invoker.invokeClient ( ) ; }

Target:
public void invokeClient ( ) { boolean sslTarget = ( consoleOptions.getRawSecurePort ( ) ) != ( - 1 ) ; int port = ( sslTarget ) ? consoleOptions.getSecurePort ( ) : consoleOptions.getPort ( ) ; org.ovirt.engine.ui.common.uicommon.WebClientConsoleInvoker invoker = new org.ovirt.engine.ui.common.uicommon.WebClientConsoleInvoker ( org.ovirt.engine.ui.common.uicommon.SpiceHtml5Impl.CLIENT_PAGE , getConfig ( ) , getOptions ( ) . getHost ( ) , port , getOptions ( ) . getTicket ( ) , sslTarget , ( ( getOptions ( ) . getVmName ( ) ) + ( org.ovirt.engine.ui.common.uicommon.SpiceHtml5Impl.SPICEHTML5_TITLE_SUFFIX ) ) ) ; invoker.invokeClient ( ) ; }
Source:
public void testMapHostId ( ) { org.ovirt.engine.api.restapi.types.VM entity = new org.ovirt.engine.api.restapi.types.VM ( ) ; entity.setStatus ( VMStatus.Up ) ; org.ovirt.engine.core.compat.Guid guid = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; entity.setRunOnVds ( guid ) ; org.ovirt.engine.api.model.Vm model = org.ovirt.engine.api.restapi.types.VmMapper.map ( entity , ( ( org.ovirt.engine.api.model.Vm ) ( null ) ) ) ; assertEquals ( guid.toString ( ) , model.getHost ( ) . getId ( ) ) ; }

Target:
public void testMapHostId ( ) { org.ovirt.engine.api.restapi.types.VM entity = new org.ovirt.engine.api.restapi.types.VM ( ) ; entity.setStatus ( VMStatus.Up ) ; org.ovirt.engine.core.compat.Guid guid = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; entity.setRunOnVds ( guid ) ; org.ovirt.engine.api.model.Vm model = org.ovirt.engine.api.restapi.types.VmMapper.map ( entity , ( ( org.ovirt.engine.api.model.Vm ) ( null ) ) ) ; org.junit.Assert.assertEquals ( guid.toString ( ) , model.getHost ( ) . getId ( ) ) ; }
Source:
public void getVMsWithVNumaNodesByClusterId ( org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery , org.ovirt.engine.core.compat.Guid clusterId ) { 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.VM > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllVmsWithNumaByClusterId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( clusterId ) , asyncQuery ) ; }

Target:
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 ) ; }
Source:
private void MoveVDSToMaintenanceIfNeeded ( ) { if ( ( ( _vds.getstatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VDSStatus.PreparingForMaintenance ) ) && ( monitoringStrategy.canMoveToMaintenance ( _vds ) ) ) { _vdsManager.setStatus ( VDSStatus.Maintenance , _vds ) ; _saveVdsDynamic = true ; _saveVdsStatistics = true ; org.ovirt.engine.core.vdsbroker.VdsUpdateRunTimeInfo.log.infoFormat ( "vds::Updated vds status from 'Preparing for Maintenance' to 'Maintenance' in database, vds = {0} : {1}" , _vds.getId ( ) , _vds.getvds_name ( ) ) ; } }

Target:
private void moveVDSToMaintenanceIfNeeded ( ) { if ( ( ( _vds.getstatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VDSStatus.PreparingForMaintenance ) ) && ( monitoringStrategy.canMoveToMaintenance ( _vds ) ) ) { _vdsManager.setStatus ( VDSStatus.Maintenance , _vds ) ; _saveVdsDynamic = true ; _saveVdsStatistics = true ; org.ovirt.engine.core.vdsbroker.VdsUpdateRunTimeInfo.log.infoFormat ( "vds::Updated vds status from 'Preparing for Maintenance' to 'Maintenance' in database, vds = {0} : {1}" , _vds.getId ( ) , _vds.getvds_name ( ) ) ; } }
Source:
private java.util.ArrayList < org.ovirt.engine.core.common.action.VdcReturnValueBase > runMultipleActionsImpl ( org.ovirt.engine.core.common.action.VdcActionType actionType , java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > parameters , boolean isInternal , boolean isRunOnlyIfAllCanDoPass , boolean isWaitForResult , org.ovirt.engine.core.bll.context.CommandContext commandContext ) { org.ovirt.engine.core.bll.MultipleActionsRunner runner = org.ovirt.engine.core.bll.MultipleActionsRunnersFactory.createMultipleActionsRunner ( actionType , parameters , isInternal , commandContext ) ; runner.setIsRunOnlyIfAllCanDoPass ( isRunOnlyIfAllCanDoPass ) ; runner.setIsWaitForResult ( isWaitForResult ) ; return runner.execute ( ) ; }

Target:
private java.util.ArrayList < org.ovirt.engine.core.common.action.VdcReturnValueBase > runMultipleActionsImpl ( org.ovirt.engine.core.common.action.VdcActionType actionType , java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > parameters , boolean isInternal , boolean isRunOnlyIfAllValidationPass , boolean isWaitForResult , org.ovirt.engine.core.bll.context.CommandContext commandContext ) { org.ovirt.engine.core.bll.MultipleActionsRunner runner = org.ovirt.engine.core.bll.MultipleActionsRunnersFactory.createMultipleActionsRunner ( actionType , parameters , isInternal , commandContext ) ; runner.setIsRunOnlyIfAllValidatePass ( isRunOnlyIfAllValidationPass ) ; runner.setIsWaitForResult ( isWaitForResult ) ; return runner.execute ( ) ; }