auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private void addChildren ( org.ovirt.engine.core.common.businessentities.Tags tag ) { org.ovirt.engine.core.bll.TagsDirector.log.info ( "Tag '{}' added to tree" , tag.gettag_name ( ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.Tags > children = getTagDAO ( ) . getAllForParent ( tag.gettag_id ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.Tags child : children ) { addChildren ( child ) ; org.ovirt.engine.core.bll.TagsDirector.log.info ( "Tag '{}' added as child to parent '{}'" , child.gettag_name ( ) , tag.gettag_name ( ) ) ; tag.getChildren ( ) . add ( child ) ; addTagToHash ( tag ) ; addTagToHash ( child ) ; } }

Target:
private void addChildren ( org.ovirt.engine.core.common.businessentities.Tags tag ) { org.ovirt.engine.core.bll.TagsDirector.log.info ( "Tag '{}' added to tree" , tag.gettag_name ( ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.Tags > children = getTagDao ( ) . getAllForParent ( tag.gettag_id ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.Tags child : children ) { addChildren ( child ) ; org.ovirt.engine.core.bll.TagsDirector.log.info ( "Tag '{}' added as child to parent '{}'" , child.gettag_name ( ) , tag.gettag_name ( ) ) ; tag.getChildren ( ) . add ( child ) ; addTagToHash ( tag ) ; addTagToHash ( child ) ; } }
Source:
public static void getGlusterHookContent ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hookId , org.ovirt.engine.core.compat.Guid serverId ) { 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 ? source : "" ; } } ; org.ovirt.engine.core.common.queries.gluster.GlusterHookContentQueryParameters parameters = new org.ovirt.engine.core.common.queries.gluster.GlusterHookContentQueryParameters ( hookId ) ; parameters.setGlusterServerId ( serverId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterHookContent , parameters , aQuery ) ; }

Target:
public void getHostFingerprint ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String hostAddress ) { 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.getInstance ( ) . runQuery ( VdcQueryType.GetServerSSHKeyFingerprint , new org.ovirt.engine.core.common.queries.ServerParameters ( hostAddress ) , aQuery ) ; }
Source:
public void update ( int index , org.ovirt.engine.core.common.businessentities.DiskImage disk , java.lang.String value ) { org.ovirt.engine.core.common.businessentities.VolumeType tempVolumeType = org.ovirt.engine.core.common.businessentities.VolumeType.Sparse ; if ( value.equals ( constants.thinAllocation ( ) ) ) { tempVolumeType = org.ovirt.engine.core.common.businessentities.VolumeType.Sparse ; } else if ( value.equals ( constants.preallocatedAllocation ( ) ) ) { tempVolumeType = org.ovirt.engine.core.common.businessentities.VolumeType.Preallocated ; } org.ovirt.engine.ui.uicommonweb.models.vms.ImportDiskData importData = importModel.getDiskImportData ( disk.getId ( ) ) ; if ( importData != null ) { importData.setSelectedVolumeType ( tempVolumeType ) ; } }

Target:
public void update ( int index , org.ovirt.engine.core.common.businessentities.storage.DiskImage disk , java.lang.String value ) { org.ovirt.engine.core.common.businessentities.storage.VolumeType tempVolumeType = org.ovirt.engine.core.common.businessentities.storage.VolumeType.Sparse ; if ( value.equals ( org.ovirt.engine.ui.webadmin.section.main.view.popup.storage.backup.ImportVmFromExportDomainPopupView.constants.thinAllocation ( ) ) ) { tempVolumeType = org.ovirt.engine.core.common.businessentities.storage.VolumeType.Sparse ; } else if ( value.equals ( org.ovirt.engine.ui.webadmin.section.main.view.popup.storage.backup.ImportVmFromExportDomainPopupView.constants.preallocatedAllocation ( ) ) ) { tempVolumeType = org.ovirt.engine.core.common.businessentities.storage.VolumeType.Preallocated ; } org.ovirt.engine.ui.uicommonweb.models.vms.ImportDiskData importData = importModel.getDiskImportData ( disk.getId ( ) ) ; if ( importData != null ) { importData.setSelectedVolumeType ( tempVolumeType ) ; } }
Source:
private void runOnce ( ) { org.ovirt.engine.core.common.businessentities.VM vm = org.ovirt.engine.ui.uicommonweb.models.vms.VmListModel.getSelectedItem ( ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getVmById ( new org.ovirt.engine.ui.uicommonweb.models.vms.AsyncQuery ( new org.ovirt.engine.ui.frontend.AsyncCallback < org.ovirt.engine.core.common.businessentities.VM > ( ) { @ java.lang.Override public void onSuccess ( org.ovirt.engine.core.common.businessentities.VM result ) { org.ovirt.engine.ui.uicommonweb.models.vms.RunOnceModel runOnceModel = new org.ovirt.engine.ui.uicommonweb.models.vms.WebadminRunOnceModel ( result , org.ovirt.engine.ui.uicommonweb.models.vms.VmListModel.this ) ; setWindow ( runOnceModel ) ; runOnceModel.init ( ) ; } } ) , vm.getId ( ) ) ; }

Target:
private void runOnce ( ) { org.ovirt.engine.core.common.businessentities.VM vm = org.ovirt.engine.ui.uicommonweb.models.vms.VmListModel.getSelectedItem ( ) ; org.ovirt.engine.ui.frontend.AsyncQuery getVmInitQuery = new org.ovirt.engine.ui.frontend.AsyncQuery ( ) ; getVmInitQuery.asyncCallback = new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object result ) { org.ovirt.engine.ui.uicommonweb.models.vms.RunOnceModel runOnceModel = new org.ovirt.engine.ui.uicommonweb.models.vms.WebadminRunOnceModel ( ( ( org.ovirt.engine.core.common.businessentities.VM ) ( result ) ) , org.ovirt.engine.ui.uicommonweb.models.vms.VmListModel.this ) ; setWindow ( runOnceModel ) ; runOnceModel.init ( ) ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getVmById ( getVmInitQuery , vm.getId ( ) ) ; }
Source:
public static void getClusterList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > list = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ) ( source ) ) ; java.util.Collections.sort ( list , new org.ovirt.engine.ui.uicommonweb.Linq.VdsGroupByNameComparer ( ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllVdsGroups , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }

Target:
public static void isSoundcardEnabled ( 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 ) { if ( source != null ) { return ( ( ( java.util.List < java.lang.String > ) ( source ) ) . size ( ) ) > 0 ; } return false ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetSoundDevices , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }
Source:
private void addStatistics ( org.ovirt.engine.api.model.Disk model , org.ovirt.engine.api.model.Disk entity ) { model.setStatistics ( new org.ovirt.engine.api.model.Statistics ( ) ) ; org.ovirt.engine.api.restapi.resource.DiskStatisticalQuery query = new org.ovirt.engine.api.restapi.resource.DiskStatisticalQuery ( newModel ( model.getId ( ) ) ) ; java.util.List < org.ovirt.engine.api.model.Statistic > statistics = query.getStatistics ( entity ) ; for ( org.ovirt.engine.api.model.Statistic statistic : statistics ) { org.ovirt.engine.api.utils.LinkHelper.addLinks ( uriInfo , statistic , query.getParentType ( ) ) ; } model.getStatistics ( ) . getStatistics ( ) . addAll ( statistics ) ; }

Target:
private void addStatistics ( org.ovirt.engine.api.model.Disk model , org.ovirt.engine.api.model.Disk entity ) { model.setStatistics ( new org.ovirt.engine.api.model.Statistics ( ) ) ; org.ovirt.engine.api.restapi.resource.DiskStatisticalQuery query = new org.ovirt.engine.api.restapi.resource.DiskStatisticalQuery ( newModel ( model.getId ( ) ) ) ; java.util.List < org.ovirt.engine.api.model.Statistic > statistics = query.getStatistics ( entity ) ; for ( org.ovirt.engine.api.model.Statistic statistic : statistics ) { org.ovirt.engine.api.restapi.util.LinkHelper.addLinks ( uriInfo , statistic , query.getParentType ( ) ) ; } model.getStatistics ( ) . getStatistics ( ) . addAll ( statistics ) ; }
Source:
protected org.ovirt.engine.core.common.businessentities.AsyncTaskStatus checkTaskExist ( org.ovirt.engine.core.common.businessentities.AsyncTaskStatus cachedStatusTask ) { org.ovirt.engine.core.common.businessentities.AsyncTaskStatus returnedStatusTask = null ; if ( cachedStatusTask == null ) { returnedStatusTask = new org.ovirt.engine.core.common.businessentities.AsyncTaskStatus ( org.ovirt.engine.core.common.businessentities.AsyncTaskStatusEnum.unknown ) ; org.ovirt.engine.core.bll.tasks.SPMAsyncTask.log.errorFormat ( ( "SPMAsyncTask::PollTask: Task '{0}' (Parent Command {1}, Parameters Type {2}) " + "was not found in VDSM, will change its status to unknown." ) , getVdsmTaskId ( ) , getParameters ( ) . getDbAsyncTask ( ) . getaction_type ( ) , getParameters ( ) . getClass ( ) . getName ( ) ) ; } else { returnedStatusTask = cachedStatusTask ; } return returnedStatusTask ; }

Target:
protected org.ovirt.engine.core.common.businessentities.AsyncTaskStatus checkTaskExist ( org.ovirt.engine.core.common.businessentities.AsyncTaskStatus cachedStatusTask ) { org.ovirt.engine.core.common.businessentities.AsyncTaskStatus returnedStatusTask = null ; if ( cachedStatusTask == null ) { returnedStatusTask = new org.ovirt.engine.core.common.businessentities.AsyncTaskStatus ( org.ovirt.engine.core.common.businessentities.AsyncTaskStatusEnum.unknown ) ; org.ovirt.engine.core.bll.tasks.SPMAsyncTask.log.errorFormat ( ( "SPMAsyncTask::PollTask: Task '{0}' (Parent Command {1}, Parameters Type {2}) " + "was not found in VDSM, will change its status to unknown." ) , getVdsmTaskId ( ) , getParameters ( ) . getDbAsyncTask ( ) . getActionType ( ) , getParameters ( ) . getClass ( ) . getName ( ) ) ; } else { returnedStatusTask = cachedStatusTask ; } return returnedStatusTask ; }
Source:
public void getDiskList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ( ) ; } } ; org.ovirt.engine.core.common.queries.SearchParameters searchParams = new org.ovirt.engine.core.common.queries.SearchParameters ( "Disks:" , org.ovirt.engine.core.common.interfaces.SearchType.Disk ) ; searchParams.setMaxCount ( 9999 ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , searchParams , aQuery ) ; }

Target:
public void getAllAttachableDisks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetAllAttachableDisks params = new org.ovirt.engine.core.common.queries.GetAllAttachableDisks ( storagePoolId ) ; params.setVmId ( vmId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllAttachableDisks , params , aQuery ) ; }
Source:
public void validateSufficientSpaceOnDestinationDomains ( ) { setupForStorageTests ( ) ; command.ensureDestinationImageMap ( ) ; org.junit.Assert.assertTrue ( command.checkDestDomains ( ) ) ; org.mockito.Mockito.verify ( multipleSdValidator ) . allDomainsWithinThresholds ( ) ; org.mockito.Mockito.verify ( multipleSdValidator ) . allDomainsHaveSpaceForNewDisks ( org.mockito.ArgumentMatchers.any ( ) ) ; }

Target:
public void validateSufficientSpaceOnDestinationDomains ( ) { setupForStorageTests ( ) ; command.ensureDestinationImageMap ( ) ; org.junit.jupiter.api.Assertions.assertTrue ( command.checkDestDomains ( ) ) ; org.mockito.Mockito.verify ( multipleSdValidator ) . allDomainsWithinThresholds ( ) ; org.mockito.Mockito.verify ( multipleSdValidator ) . allDomainsHaveSpaceForNewDisks ( org.mockito.ArgumentMatchers.any ( ) ) ; }
Source:
public void testParseInvalidOption ( ) { java.util.List < org.ovirt.engine.api.model.Agent > ret = org.ovirt.engine.api.restapi.util.FenceOptionsParser.parse ( "foo:one=1,two=2,three" , "one=bool,two=int,three=bool" ) ; org.junit.Assert.assertNotNull ( ret ) ; org.junit.Assert.assertEquals ( 1 , ret.size ( ) ) ; verifyResult ( ret.get ( 0 ) , "foo" , "one" , "bool" , "1" , "two" , "int" , "2" ) ; }

Target:
public void testParseInvalidOption ( ) { java.util.List < org.ovirt.engine.api.model.Agent > ret = org.ovirt.engine.api.restapi.util.FenceOptionsParser.parse ( "foo:one=1,two=2,three" , "one=bool,two=int,three=bool" ) ; org.junit.jupiter.api.Assertions.assertNotNull ( ret ) ; org.junit.jupiter.api.Assertions.assertEquals ( 1 , ret.size ( ) ) ; verifyResult ( ret.get ( 0 ) , "foo" , "one" , "bool" , "1" , "two" , "int" , "2" ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.VM getVmFromDB ( ) { setVm ( null ) ; return getVm ( ) ; }

Target:
protected void EndImportCommand ( ) { setVm ( null ) ; EndActionOnAllImageGroups ( ) ; if ( ( getVm ( ) ) != null ) { org.ovirt.engine.core.bll.VmHandler.UnLockVm ( getVm ( ) ) ; updateVmInSpm ( ) ; } else { setCommandShouldBeLogged ( false ) ; org.ovirt.engine.core.bll.ImportVmCommand.log.warn ( "ImportVmCommand::EndImportCommand: Vm is null - not performing full EndAction" ) ; } setSucceeded ( true ) ; }
Source:
protected void attemptToActivateDomain ( ) { org.ovirt.engine.core.common.action.StorageDomainPoolParametersBase activateParameters = new org.ovirt.engine.core.common.action.StorageDomainPoolParametersBase ( org.ovirt.engine.core.bll.storage.AttachStorageDomainToPoolCommand.getStorageDomain ( ) . getId ( ) , org.ovirt.engine.core.bll.storage.AttachStorageDomainToPoolCommand.getStoragePool ( ) . getId ( ) ) ; org.ovirt.engine.core.bll.storage.AttachStorageDomainToPoolCommand.getBackend ( ) . runInternalAction ( VdcActionType.ActivateStorageDomain , activateParameters ) ; }

Target:
protected void attemptToActivateDomain ( ) { org.ovirt.engine.core.common.action.StorageDomainPoolParametersBase activateParameters = new org.ovirt.engine.core.common.action.StorageDomainPoolParametersBase ( org.ovirt.engine.core.bll.storage.AttachStorageDomainToPoolCommand.getStorageDomain ( ) . getId ( ) , org.ovirt.engine.core.bll.storage.AttachStorageDomainToPoolCommand.getStoragePool ( ) . getId ( ) ) ; org.ovirt.engine.core.bll.storage.AttachStorageDomainToPoolCommand.getBackend ( ) . runInternalAction ( VdcActionType.ActivateStorageDomain , activateParameters , org.ovirt.engine.core.bll.storage.AttachStorageDomainToPoolCommand.cloneContext ( ) . withoutCompensationContext ( ) . withoutExecutionContext ( ) ) ; }
Source:
public void guestLogoutTimeTreatmentAfterDestroy ( ) { if ( ( ( getguest_last_login_time ( ) ) != null ) && ( ( ( getguest_last_logout_time ( ) ) == null ) || ( ( getguest_last_login_time ( ) . compareTo ( getguest_last_logout_time ( ) ) ) > 0 ) ) ) { setguest_last_logout_time ( new java.util.Date ( ) ) ; } }

Target:
public void guestLogoutTimeTreatmentAfterDestroy ( ) { if ( ( ( getGuestLastLoginTime ( ) ) != null ) && ( ( ( getGuestLastLogoutTime ( ) ) == null ) || ( ( getGuestLastLoginTime ( ) . compareTo ( getGuestLastLogoutTime ( ) ) ) > 0 ) ) ) { setGuestLastLogoutTime ( new java.util.Date ( ) ) ; } }
Source:
protected boolean canDoAction ( ) { if ( ! ( super . canDoAction ( ) ) ) { return false ; } if ( ( org.ovirt.engine.core.bll.InternalMigrateVmCommand.getVm ( ) . getMigrationSupport ( ) ) != ( org.ovirt.engine.core.common.businessentities.MigrationSupport.MIGRATABLE ) ) { return failCanDoAction ( EngineMessage.ACTION_TYPE_FAILED_VM_IS_NON_MIGRTABLE ) ; } return true ; }

Target:
protected boolean validate ( ) { if ( ! ( super . validate ( ) ) ) { return false ; } if ( ( org.ovirt.engine.core.bll.InternalMigrateVmCommand.getVm ( ) . getMigrationSupport ( ) ) != ( org.ovirt.engine.core.common.businessentities.MigrationSupport.MIGRATABLE ) ) { return failValidation ( EngineMessage.ACTION_TYPE_FAILED_VM_IS_NON_MIGRTABLE ) ; } return true ; }
Source:
public boolean Validate ( ) { org.ovirt.engine.ui.uicommonweb.validation.LengthValidation tempVar = new org.ovirt.engine.ui.uicommonweb.validation.LengthValidation ( ) ; tempVar.setMaxLength ( 40 ) ; getName ( ) . ValidateEntity ( new org.ovirt.engine.ui.uicommonweb.validation.IValidation [ ] { new org.ovirt.engine.ui.uicommonweb.validation.NotEmptyValidation ( ) , tempVar } ) ; org.ovirt.engine.ui.uicommonweb.validation.LengthValidation tempVar2 = new org.ovirt.engine.ui.uicommonweb.validation.LengthValidation ( ) ; tempVar2.setMaxLength ( 300 ) ; getSearchString ( ) . ValidateEntity ( new org.ovirt.engine.ui.uicommonweb.validation.IValidation [ ] { new org.ovirt.engine.ui.uicommonweb.validation.NotEmptyValidation ( ) , tempVar2 } ) ; return ( getName ( ) . getIsValid ( ) ) && ( getSearchString ( ) . getIsValid ( ) ) ; }

Target:
public boolean Validate ( ) { org.ovirt.engine.ui.uicommonweb.validation.LengthValidation tempVar = new org.ovirt.engine.ui.uicommonweb.validation.LengthValidation ( ) ; tempVar.setMaxLength ( 40 ) ; getName ( ) . validateEntity ( new org.ovirt.engine.ui.uicommonweb.validation.IValidation [ ] { new org.ovirt.engine.ui.uicommonweb.validation.NotEmptyValidation ( ) , tempVar } ) ; org.ovirt.engine.ui.uicommonweb.validation.LengthValidation tempVar2 = new org.ovirt.engine.ui.uicommonweb.validation.LengthValidation ( ) ; tempVar2.setMaxLength ( 300 ) ; getSearchString ( ) . validateEntity ( new org.ovirt.engine.ui.uicommonweb.validation.IValidation [ ] { new org.ovirt.engine.ui.uicommonweb.validation.NotEmptyValidation ( ) , tempVar2 } ) ; return ( getName ( ) . getIsValid ( ) ) && ( getSearchString ( ) . getIsValid ( ) ) ; }
Source:
private java.lang.Boolean getAutoConverge ( ) { if ( org.ovirt.engine.core.common.FeatureSupported.autoConvergence ( org.ovirt.engine.core.bll.MigrateVmCommand.getVm ( ) . getVdsGroupCompatibilityVersion ( ) ) ) { if ( ( org.ovirt.engine.core.bll.MigrateVmCommand.getVm ( ) . getAutoConverge ( ) ) != null ) { return org.ovirt.engine.core.bll.MigrateVmCommand.getVm ( ) . getAutoConverge ( ) ; } if ( ( org.ovirt.engine.core.bll.MigrateVmCommand.getVdsGroup ( ) . getAutoConverge ( ) ) != null ) { return org.ovirt.engine.core.bll.MigrateVmCommand.getVdsGroup ( ) . getAutoConverge ( ) ; } return org.ovirt.engine.core.common.config.Config.getValue ( ConfigValues.DefaultAutoConvergence ) ; } return null ; }

Target:
private java.lang.Boolean getAutoConverge ( ) { if ( ( org.ovirt.engine.core.bll.MigrateVmCommand.getVm ( ) . getAutoConverge ( ) ) != null ) { return org.ovirt.engine.core.bll.MigrateVmCommand.getVm ( ) . getAutoConverge ( ) ; } if ( ( org.ovirt.engine.core.bll.MigrateVmCommand.getCluster ( ) . getAutoConverge ( ) ) != null ) { return org.ovirt.engine.core.bll.MigrateVmCommand.getCluster ( ) . getAutoConverge ( ) ; } return org.ovirt.engine.core.common.config.Config.getValue ( ConfigValues.DefaultAutoConvergence ) ; }
Source:
private boolean validateInputManagementNetwork ( ) { managementNetwork = getManagementNetworkById ( ) ; if ( ( managementNetwork ) == null ) { addCanDoActionMessage ( EngineMessage.NETWORK_NOT_EXISTS ) ; return false ; } final org.ovirt.engine.core.bll.network.cluster.NetworkClusterValidatorBase networkClusterValidator = createNetworkClusterValidator ( ) ; return ( ( validate ( networkClusterValidator.networkBelongsToClusterDataCenter ( org.ovirt.engine.core.bll.AddVdsGroupCommand.getVdsGroup ( ) , managementNetwork ) ) ) && ( validate ( networkClusterValidator.managementNetworkRequired ( managementNetwork ) ) ) ) && ( validate ( networkClusterValidator.managementNetworkNotExternal ( managementNetwork ) ) ) ; }

Target:
private boolean findDefaultManagementNetwork ( ) { setManagementNetwork ( defaultManagementNetworkFinder.findDefaultManagementNetwork ( org.ovirt.engine.core.bll.AddVdsGroupCommand.getVdsGroup ( ) . getStoragePoolId ( ) ) ) ; if ( ( getManagementNetwork ( ) ) == null ) { addCanDoActionMessage ( EngineMessage.ACTION_TYPE_FAILED_DEFAULT_MANAGEMENT_NETWORK_NOT_FOUND ) ; return false ; } return true ; }
Source:
public org.ovirt.engine.sdk.decorators.User add ( org.ovirt.engine.sdk.decorators.User user , java.lang.String expect , java.lang.String correlationId ) throws java.io.IOException , org.apache.http.client.ClientProtocolException , org.ovirt.engine.sdk.exceptions.ServerException { java.lang.String url = ( SLASH ) + ( getName ( ) ) ; java.util.List < org.apache.http.Header > headers = new org.ovirt.engine.sdk.utils.HttpHeaderBuilder ( ) . add ( "Expect" , expect ) . add ( "Correlation-Id" , correlationId ) . build ( ) ; url = new org.ovirt.engine.sdk.utils.UrlBuilder ( url ) . build ( ) ; return getProxy ( ) . add ( url , user , org.ovirt.engine.sdk.entities.User.class , org.ovirt.engine.sdk.decorators.User.class , headers ) ; }

Target:
public org.ovirt.engine.sdk.decorators.User add ( org.ovirt.engine.sdk.decorators.User user ) throws java.io.IOException , org.apache.http.client.ClientProtocolException , org.ovirt.engine.sdk.exceptions.ServerException { java.lang.String url = ( SLASH ) + ( getName ( ) ) ; org.ovirt.engine.sdk.utils.HttpHeaderBuilder headersBuilder = new org.ovirt.engine.sdk.utils.HttpHeaderBuilder ( ) ; java.util.List < org.apache.http.Header > headers = headersBuilder.build ( ) ; org.ovirt.engine.sdk.utils.UrlBuilder urlBuilder = new org.ovirt.engine.sdk.utils.UrlBuilder ( url ) ; url = urlBuilder.build ( ) ; return getProxy ( ) . add ( url , user , org.ovirt.engine.sdk.entities.User.class , org.ovirt.engine.sdk.decorators.User.class , headers ) ; }
Source:
public void testMapHostId ( ) { org.ovirt.engine.api.model.VM entity = new org.ovirt.engine.api.model.VM ( ) ; org.ovirt.engine.core.compat.Guid guid = org.ovirt.engine.core.compat.NGuid.NewGuid ( ) ; entity.setrun_on_vds ( guid ) ; org.ovirt.engine.api.model.VM model = org.ovirt.engine.api.restapi.types.VmMapper.map ( entity , null ) ; assertEquals ( guid.toString ( ) , model.getHost ( ) . getId ( ) ) ; }

Target:
public void testMapHostId ( ) { org.ovirt.engine.api.model.VM entity = new org.ovirt.engine.api.model.VM ( ) ; entity.setStatus ( VMStatus.Up ) ; org.ovirt.engine.core.compat.Guid guid = org.ovirt.engine.core.compat.NGuid.NewGuid ( ) ; entity.setRunOnVds ( guid ) ; org.ovirt.engine.api.model.VM model = org.ovirt.engine.api.restapi.types.VmMapper.map ( entity , null ) ; assertEquals ( guid.toString ( ) , model.getHost ( ) . getId ( ) ) ; }
Source:
public static int GetHighUtilizationForPowerSave ( ) { org.ovirt.engine.core.common.queries.VdcQueryReturnValue returnValue = org.ovirt.engine.ui.uicommonweb.DataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.HighUtilizationForPowerSave ) ) ; if ( ( ( returnValue != null ) && ( returnValue.getSucceeded ( ) ) ) && ( ( returnValue.getReturnValue ( ) ) != null ) ) { return ( ( java.lang.Integer ) ( returnValue.getReturnValue ( ) ) ) ; } return 0 ; }

Target:
public static int GetHighUtilizationForPowerSave ( ) { org.ovirt.engine.core.common.queries.VdcQueryReturnValue returnValue = org.ovirt.engine.ui.uicommonweb.DataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.HighUtilizationForPowerSave , org.ovirt.engine.core.common.config.Config.DefaultConfigurationVersion ) ) ; if ( ( ( returnValue != null ) && ( returnValue.getSucceeded ( ) ) ) && ( ( returnValue.getReturnValue ( ) ) != null ) ) { return ( ( java.lang.Integer ) ( returnValue.getReturnValue ( ) ) ) ; } return 0 ; }
Source:
protected boolean canDoAction ( ) { org.ovirt.engine.core.bll.network.cluster.NetworkClusterValidator validator = new org.ovirt.engine.core.bll.network.cluster.NetworkClusterValidator ( getNetworkCluster ( ) ) ; return ( validate ( networkClusterAttachmentExists ( ) ) ) && ( ( ! ( org.ovirt.engine.core.utils.NetworkUtils.isManagementNetwork ( getNetwork ( ) ) ) ) || ( validate ( validator.managementNetworkAttachment ( getNetworkName ( ) ) ) ) ) ; }

Target:
protected boolean canDoAction ( ) { return ( validate ( networkClusterAttachmentExists ( ) ) ) && ( validateAttachment ( ) ) ; }
Source:
protected void createNumOfDesktopEditors ( ) { incraseNumOfVmsEditor = new org.ovirt.engine.ui.common.widget.editor.generic.IntegerEntityModelTextBoxOnlyEditor ( ) ; numOfVmsEditor = new org.ovirt.engine.ui.common.widget.editor.generic.EntityModelTextBoxEditor ( new org.ovirt.engine.ui.common.widget.editor.generic.ToStringEntityModelRenderer < java.lang.Integer > ( ) , new com.google.gwt.text.shared.Parser < java.lang.Integer > ( ) { @ java.lang.Override public java.lang.Integer parse ( java.lang.CharSequence text ) throws java.text.ParseException { return incraseNumOfVmsEditor.asEditor ( ) . getValue ( ) ; } } ) ; }

Target:
protected void createNumOfDesktopEditors ( ) { increaseNumOfVmsEditor = new org.ovirt.engine.ui.common.widget.editor.generic.IntegerEntityModelTextBoxEditor ( ) ; numOfVmsEditor = new org.ovirt.engine.ui.common.widget.editor.generic.EntityModelTextBoxEditor ( new org.ovirt.engine.ui.common.widget.editor.generic.ToStringEntityModelRenderer < java.lang.Integer > ( ) , new com.google.gwt.text.shared.Parser < java.lang.Integer > ( ) { @ java.lang.Override public java.lang.Integer parse ( java.lang.CharSequence text ) throws java.text.ParseException { return increaseNumOfVmsEditor.asEditor ( ) . getValue ( ) ; } } ) ; }
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 getUnusedBricksFromServer ( org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery , org.ovirt.engine.core.compat.Guid hostId ) { 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 ) { return source ; } } ; org.ovirt.engine.core.common.queries.IdQueryParameters parameters = new org.ovirt.engine.core.common.queries.IdQueryParameters ( hostId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetUnusedGlusterBricks , parameters , asyncQuery ) ; }
Source:
public void testValidDedicatedHost ( ) { prepareVmToPassCanDoAction ( ) ; org.ovirt.engine.core.common.businessentities.VDS vds = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; vds.setvds_group_id ( group.getId ( ) ) ; org.mockito.Mockito.doReturn ( vdsDAO ) . when ( command ) . getVdsDAO ( ) ; org.mockito.Mockito.when ( vdsDAO.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( vds ) ; vmStatic.setDedicatedVmForVds ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; junit.framework.Assert.assertTrue ( "canDoAction should have passed." , command.canDoAction ( ) ) ; }

Target:
public void testValidDedicatedHost ( ) { prepareVmToPassCanDoAction ( ) ; org.ovirt.engine.core.common.businessentities.VDS vds = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; vds.setVdsGroupId ( group.getId ( ) ) ; org.mockito.Mockito.doReturn ( vdsDAO ) . when ( command ) . getVdsDAO ( ) ; org.mockito.Mockito.when ( vdsDAO.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( vds ) ; vmStatic.setDedicatedVmForVds ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; junit.framework.Assert.assertTrue ( "canDoAction should have passed." , command.canDoAction ( ) ) ; }
Source:
public void getUnusedBricksFromServer ( org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery , org.ovirt.engine.core.compat.Guid hostId ) { 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 ) { return source ; } } ; org.ovirt.engine.core.common.queries.IdQueryParameters parameters = new org.ovirt.engine.core.common.queries.IdQueryParameters ( hostId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetUnusedGlusterBricks , parameters , asyncQuery ) ; }

Target:
public void getCinderVolumeTypesList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storageDomainId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter < java.util.List < org.ovirt.engine.core.common.businessentities.storage.CinderVolumeType > > ( ) { @ java.lang.Override public java.util.List < org.ovirt.engine.core.common.businessentities.storage.CinderVolumeType > convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return ( ( java.util.List < org.ovirt.engine.core.common.businessentities.storage.CinderVolumeType > ) ( source ) ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetCinderVolumeTypesByStorageDomainId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( storageDomainId ) , aQuery ) ; }
Source:
public static void endTaskStep ( org.ovirt.engine.core.compat.Guid stepId , org.ovirt.engine.core.common.job.JobExecutionStatus exitStatus ) { try { if ( stepId != null ) { org.ovirt.engine.core.common.job.Step step = org.ovirt.engine.core.bll.job.JobRepositoryFactory.getJobRepository ( ) . getStep ( stepId ) ; if ( step != null ) { step.markStepEnded ( exitStatus ) ; org.ovirt.engine.core.bll.job.JobRepositoryFactory.getJobRepository ( ) . updateStep ( step ) ; } } } catch ( java.lang.Exception e ) { org.ovirt.engine.core.bll.job.ExecutionHandler.log.error ( "Failed to terminate step '{}' with status '{}': {}" , stepId , exitStatus , e.getMessage ( ) ) ; org.ovirt.engine.core.bll.job.ExecutionHandler.log.debug ( "Exception" , e ) ; } }

Target:
public void endTaskStep ( org.ovirt.engine.core.compat.Guid stepId , org.ovirt.engine.core.common.job.JobExecutionStatus exitStatus ) { try { if ( stepId != null ) { org.ovirt.engine.core.common.job.Step step = jobRepository.getStep ( stepId ) ; if ( step != null ) { step.markStepEnded ( exitStatus ) ; jobRepository.updateStep ( step ) ; } } } catch ( java.lang.Exception e ) { log.error ( "Failed to terminate step '{}' with status '{}': {}" , stepId , exitStatus , e.getMessage ( ) ) ; log.debug ( "Exception" , e ) ; } }
Source:
public void testEvalDifferentAddress ( ) throws java.lang.Exception { org.mockito.Mockito.when ( mockOtherIface.getName ( ) ) . thenReturn ( org.ovirt.engine.core.vdsbroker.vdsbroker.predicates.DisplayInterfaceEqualityPredicateTest.TEST_INTERFACE_NAME ) ; org.mockito.Mockito.when ( mockOtherIface.getAddress ( ) ) . thenReturn ( ( "not" + ( org.ovirt.engine.core.vdsbroker.vdsbroker.predicates.DisplayInterfaceEqualityPredicateTest.TEST_INTERFACE_ADDRESS ) ) ) ; org.junit.Assert.assertFalse ( underTest.eval ( mockOtherIface ) ) ; }

Target:
public void testEvalDifferentAddress ( ) throws java.lang.Exception { org.mockito.Mockito.when ( mockOtherIface.getName ( ) ) . thenReturn ( org.ovirt.engine.core.vdsbroker.vdsbroker.predicates.DisplayInterfaceEqualityPredicateTest.TEST_INTERFACE_NAME ) ; org.mockito.Mockito.when ( mockOtherIface.getAddress ( ) ) . thenReturn ( ( "not" + ( org.ovirt.engine.core.vdsbroker.vdsbroker.predicates.DisplayInterfaceEqualityPredicateTest.TEST_INTERFACE_ADDRESS ) ) ) ; org.junit.Assert.assertFalse ( underTest.test ( mockOtherIface ) ) ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult vmDuringInitialization ( org.ovirt.engine.core.common.businessentities.VM vm ) { boolean isVmDuringInit = ( ( java.lang.Boolean ) ( getBackend ( ) . getResourceManager ( ) . RunVdsCommand ( VDSCommandType.IsVmDuringInitiating , new org.ovirt.engine.core.common.vdscommands.IsVmDuringInitiatingVDSCommandParameters ( vm.getId ( ) ) ) . getReturnValue ( ) ) ) . booleanValue ( ) ; if ( ( ( vm.isRunning ( ) ) || ( ( vm.getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.NotResponding ) ) ) || isVmDuringInit ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.dal.VdcBllMessages.ACTION_TYPE_FAILED_VM_IS_RUNNING ) ; } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }

Target:
protected boolean isVmDuringInitiating ( org.ovirt.engine.core.common.businessentities.VM vm ) { return ( ( java.lang.Boolean ) ( getBackend ( ) . getResourceManager ( ) . RunVdsCommand ( VDSCommandType.IsVmDuringInitiating , new org.ovirt.engine.core.common.vdscommands.IsVmDuringInitiatingVDSCommandParameters ( vm.getId ( ) ) ) . getReturnValue ( ) ) ) . booleanValue ( ) ; }
Source:
public void testNetworkIpAddressWasSameAsHostnameAndChangedWhenIpConfigurationIsDhcp ( ) { doTestNetworkIpAddressWasSameAsHostnameAndChangedForBootProtocol ( NetworkBootProtocol.DHCP ) ; }

Target:
private void doTestNetworkIpAddressWasSameAsHostnameAndChangedForBootProtocol ( org.ovirt.engine.core.common.businessentities.network.Ipv4BootProtocol bootProtocol ) { org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment = createNetworkAttachmentWithIpConfiguration ( bootProtocol , null , null ) ; org.ovirt.engine.core.bll.validator.NetworkAttachmentValidator validator = createNetworkAttachmentValidator ( attachment ) ; org.ovirt.engine.core.bll.ValidationResult actual = validator.networkIpAddressWasSameAsHostnameAndChanged ( null ) ; org.junit.Assert.assertThat ( actual , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }
Source:
public java.util.List < org.ovirt.engine.core.common.businessentities.RepoImage > getAllImagesAsRepoImages ( ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.RepoImage > repoImages = new java.util.ArrayList < > ( ) ; long currentTime = java.lang.System.currentTimeMillis ( ) ; for ( com.woorea.openstack.glance.model.Image glanceImage : getGlanceClient ( ) . images ( ) . list ( true ) . execute ( ) ) { org.ovirt.engine.core.common.businessentities.RepoImage repoImage = org.ovirt.engine.core.bll.provider.OpenstackImageProviderProxy.imageToRepoImage ( glanceImage ) ; repoImage.setLastRefreshed ( currentTime ) ; repoImages.add ( repoImage ) ; } return repoImages ; }

Target:
private com.woorea.openstack.glance.Glance getClient ( ) { if ( ( client ) == null ) { client = new com.woorea.openstack.glance.Glance ( ( ( getProvider ( ) . getUrl ( ) ) + ( org.ovirt.engine.core.bll.provider.OpenstackImageProviderProxy.API_VERSION ) ) ) ; client.setTokenProvider ( getTokenProvider ( ) ) ; } return client ; }
Source:
private java.util.List < java.lang.String > getExisitingHostNetworkNames ( ) { java.util.List < java.lang.String > list = new java.util.ArrayList < java.lang.String > ( getExistingIfaces ( ) . size ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.VdsNetworkInterface iface : getExistingIfaces ( ) . values ( ) ) { if ( org.apache.commons.lang.StringUtils.isNotBlank ( iface.getNetworkName ( ) ) ) { list.add ( iface.getNetworkName ( ) ) ; } } return list ; }

Target:
private boolean addInterfaceToProcessedList ( org.ovirt.engine.core.common.businessentities.VdsNetworkInterface iface ) { if ( ifaceNames.contains ( iface.getName ( ) ) ) { if ( isBond ( iface ) ) { violations.add ( VdcBllMessages.NETWORK_BOND_NAME_EXISTS ) ; } else { violations.add ( VdcBllMessages.NETWORK_INTERFACE_NAME_ALREADY_IN_USE ) ; } return false ; } ifaceNames.add ( iface.getName ( ) ) ; return true ; }
Source:
public static void getHostListByDataCenter ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid spId ) { 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 ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > list = org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VDS > cast ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.IVdcQueryable > ) ( source ) ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllVdsByStoragePool , new org.ovirt.engine.core.common.queries.IdQueryParameters ( spId ) , aQuery ) ; }

Target:
public void getTemplateDiskList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid templateId ) { 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.storage.DiskImage > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmTemplatesDisks , new org.ovirt.engine.core.common.queries.IdQueryParameters ( templateId ) , aQuery ) ; }
Source:
public static void GetStorageConnectionById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String id , boolean isRefresh ) { 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 ? ( ( org.ovirt.engine.core.common.businessentities.StorageServerConnections ) ( source ) ) : null ; } } ; org.ovirt.engine.core.common.queries.StorageServerConnectionQueryParametersBase params = new org.ovirt.engine.core.common.queries.StorageServerConnectionQueryParametersBase ( id ) ; params.setRefresh ( isRefresh ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetStorageServerConnectionById , params , aQuery ) ; }

Target:
public static void getStorageConnectionById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String id , boolean isRefresh ) { 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 ? ( ( org.ovirt.engine.core.common.businessentities.StorageServerConnections ) ( source ) ) : null ; } } ; org.ovirt.engine.core.common.queries.StorageServerConnectionQueryParametersBase params = new org.ovirt.engine.core.common.queries.StorageServerConnectionQueryParametersBase ( id ) ; params.setRefresh ( isRefresh ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetStorageServerConnectionById , params , aQuery ) ; }
Source:
public void isSupportBridgesReportByVDSM ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String version ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Boolean ) ( source ) ) . booleanValue ( ) : true ; } } ; org.ovirt.engine.core.common.queries.GetConfigurationValueParameters tempVar = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.SupportBridgesReportByVDSM ) ; tempVar.setVersion ( version ) ; getConfigFromCache ( tempVar , aQuery ) ; }

Target:
public void getNumberOfVmsInCluster ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetNumberOfVmsInClusterByClusterId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( clusterId ) , aQuery ) ; }
Source:
public static 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 ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( tempVar , aQuery ) ; }

Target:
public void getUserMessageOfTheDayViaPublic ( 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.getInstance ( ) . runPublicQuery ( VdcQueryType.GetConfigurationValue , new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.UserMessageOfTheDay , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
protected void executeCommand ( ) { org.ovirt.engine.core.aaa.AuthenticationProfile profile = sessionDataContainer.getProfile ( org.ovirt.engine.core.bll.aaa.LogoutSessionCommand.getParameters ( ) . getSessionId ( ) ) ; if ( profile == null ) { org.ovirt.engine.core.bll.aaa.LogoutSessionCommand.setSucceeded ( false ) ; } else { sessionDataContainer.setSessionValid ( org.ovirt.engine.core.bll.aaa.LogoutSessionCommand.getParameters ( ) . getSessionId ( ) , false ) ; org.ovirt.engine.core.bll.aaa.LogoutSessionCommand.setSucceeded ( true ) ; } }

Target:
protected void executeCommand ( ) { org.ovirt.engine.core.aaa.AuthenticationProfile profile = sessionDataContainer.getProfile ( org.ovirt.engine.core.bll.aaa.LogoutSessionCommand.getParameters ( ) . getSessionId ( ) ) ; sessionId = org.ovirt.engine.core.bll.aaa.LogoutSessionCommand.getParameters ( ) . getSessionId ( ) ; sourceIp = sessionDataContainer.getSourceIp ( org.ovirt.engine.core.bll.aaa.LogoutSessionCommand.getParameters ( ) . getSessionId ( ) ) ; if ( profile == null ) { org.ovirt.engine.core.bll.aaa.LogoutSessionCommand.setSucceeded ( false ) ; } else { sessionDataContainer.setSessionValid ( org.ovirt.engine.core.bll.aaa.LogoutSessionCommand.getParameters ( ) . getSessionId ( ) , false ) ; org.ovirt.engine.core.bll.aaa.LogoutSessionCommand.setSucceeded ( true ) ; } }
Source:
protected org.ovirt.engine.core.common.utils.Pair < java.lang.Boolean , org.ovirt.engine.core.common.errors.EngineFault > runConnectionStorageToDomain ( org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain , org.ovirt.engine.core.compat.Guid vdsId , int type ) { org.ovirt.engine.core.common.businessentities.VDS vds = org.ovirt.engine.core.bll.storage.connection.GLUSTERFSStorageHelper.getVdsDao ( ) . get ( vdsId ) ; if ( ! ( canVDSConnectToGlusterfs ( vds ) ) ) { org.ovirt.engine.core.bll.storage.connection.GLUSTERFSStorageHelper.log.error ( "Couldn't find glusterfs-cli package on vds (needed for connecting storage domain {})." , vds.getName ( ) , storageDomain.getName ( ) ) ; addMessageToAuditLog ( AuditLogType.VDS_CANNOT_CONNECT_TO_GLUSTERFS , null , vds ) ; return new org.ovirt.engine.core.common.utils.Pair ( false , null ) ; } return super . runConnectionStorageToDomain ( storageDomain , vdsId , type ) ; }

Target:
protected org.ovirt.engine.core.common.utils.Pair < java.lang.Boolean , org.ovirt.engine.core.common.errors.EngineFault > runConnectionStorageToDomain ( org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain , org.ovirt.engine.core.compat.Guid vdsId , int type ) { org.ovirt.engine.core.common.businessentities.VDS vds = vdsDao.get ( vdsId ) ; if ( ! ( canVDSConnectToGlusterfs ( vds ) ) ) { org.ovirt.engine.core.bll.storage.connection.GLUSTERFSStorageHelper.log.error ( "Couldn't find glusterfs-cli package on vds (needed for connecting storage domain {})." , vds.getName ( ) , storageDomain.getName ( ) ) ; addMessageToAuditLog ( AuditLogType.VDS_CANNOT_CONNECT_TO_GLUSTERFS , null , vds ) ; return new org.ovirt.engine.core.common.utils.Pair ( false , null ) ; } return super . runConnectionStorageToDomain ( storageDomain , vdsId , type ) ; }
Source:
protected void executeCommand ( ) { addCustomValue ( "NicName" , getNic ( ) . getName ( ) ) ; org.ovirt.engine.core.common.action.VdcReturnValueBase result = runInternalAction ( VdcActionType.HostSetupNetworks , createHostSetupNetworksParameters ( ) , org.ovirt.engine.core.bll.network.host.LabelNicCommand.cloneContextAndDetachFromParent ( ) ) ; if ( result.getSucceeded ( ) ) { org.ovirt.engine.core.bll.network.host.LabelNicCommand.getReturnValue ( ) . setActionReturnValue ( getLabel ( ) ) ; } else { propagateFailure ( result ) ; } setSucceeded ( result.getSucceeded ( ) ) ; }

Target:
protected void executeCommand ( ) { addCustomValue ( "NicName" , getNic ( ) . getName ( ) ) ; org.ovirt.engine.core.common.action.VdcReturnValueBase result = runInternalAction ( ActionType.HostSetupNetworks , createHostSetupNetworksParameters ( ) , org.ovirt.engine.core.bll.network.host.LabelNicCommand.cloneContextAndDetachFromParent ( ) ) ; if ( result.getSucceeded ( ) ) { org.ovirt.engine.core.bll.network.host.LabelNicCommand.getReturnValue ( ) . setActionReturnValue ( getLabel ( ) ) ; } else { propagateFailure ( result ) ; } setSucceeded ( result.getSucceeded ( ) ) ; }