auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void getVmSnapshotList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllVmSnapshotsByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
public void getExistingStorageDomainList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hostId , org.ovirt.engine.core.common.businessentities.StorageDomainType domainType , org.ovirt.engine.core.common.businessentities.storage.StorageType storageType , java.lang.String path ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetExistingStorageDomainList , new org.ovirt.engine.core.common.queries.GetExistingStorageDomainListParameters ( hostId , storageType , domainType , path ) , aQuery ) ; }
Source:
private void remove ( ) { if ( ( getConfirmWindow ( ) ) != null ) { return ; } setConfirmWindow ( new org.ovirt.engine.ui.uicommonweb.models.providers.RemoveProvidersModel ( this ) ) ; }

Target:
private boolean isSelectedProviderOfType ( org.ovirt.engine.core.common.businessentities.ProviderType providerType ) { return ( ( ( getSelectedItems ( ) ) != null ) && ( ( getSelectedItems ( ) . size ( ) ) == 1 ) ) && ( ( getSelectedItems ( ) . get ( 0 ) . getType ( ) ) == providerType ) ; }
Source:
public void testVmDuringSnaoshot ( ) { setUpGeneralValidations ( ) ; org.mockito.Mockito.doReturn ( new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_VM_IS_DURING_SNAPSHOT ) ) . when ( snapshotsValidator ) . vmNotDuringSnapshot ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ; org.mockito.Mockito.doReturn ( org.ovirt.engine.core.bll.snapshots.CreateAllSnapshotsFromVmCommandTest.getEmptyDiskList ( ) ) . when ( cmd ) . getDisksList ( ) ; org.junit.Assert.assertFalse ( cmd.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( cmd.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( EngineMessage.ACTION_TYPE_FAILED_VM_IS_DURING_SNAPSHOT.name ( ) ) ) ; }

Target:
public void testVmDuringSnaoshot ( ) { setUpGeneralValidations ( ) ; org.mockito.Mockito.doReturn ( new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_VM_IS_DURING_SNAPSHOT ) ) . when ( snapshotsValidator ) . vmNotDuringSnapshot ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ; org.mockito.Mockito.doReturn ( org.ovirt.engine.core.bll.snapshots.CreateAllSnapshotsFromVmCommandTest.getEmptyDiskList ( ) ) . when ( cmd ) . getDisksList ( ) ; org.junit.Assert.assertFalse ( cmd.validate ( ) ) ; org.junit.Assert.assertTrue ( cmd.getReturnValue ( ) . getValidationMessages ( ) . contains ( EngineMessage.ACTION_TYPE_FAILED_VM_IS_DURING_SNAPSHOT.name ( ) ) ) ; }
Source:
public void isVmNameUnique ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String name ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ! ( ( ( java.lang.Boolean ) ( source ) ) . booleanValue ( ) ) : false ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.IsVmWithSameNameExist , new org.ovirt.engine.core.common.queries.NameQueryParameters ( name ) , aQuery ) ; }

Target:
public void getGlusterSwiftServices ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , 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 : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterServerService > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterServerServicesByServerId , new org.ovirt.engine.core.common.queries.gluster.GlusterServiceQueryParameters ( serverId , org.ovirt.engine.core.common.businessentities.gluster.ServiceType.GLUSTER_SWIFT ) , aQuery ) ; }
Source:
protected org.ovirt.engine.ui.uicommonweb.UICommand resolveCommand ( ) { return getModel ( ) . getUnPlugCommand ( ) ; }

Target:
public com.google.gwt.safehtml.shared.SafeHtml getTooltip ( ) { com.google.gwt.safehtml.shared.SafeHtml tooltip = null ; if ( ( getModel ( ) . isHotPlugAvailable ( ) ) && ( ! ( getModel ( ) . isPlugAvailableByDisks ( true ) ) ) ) { tooltip = com.google.gwt.safehtml.shared.SafeHtmlUtils.fromString ( org.ovirt.engine.ui.common.widget.uicommon.vm.VmDiskListModelTable.constants.diskHotPlugNotSupported ( ) ) ; } return tooltip ; }
Source:
public static 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 ) ; }

Target:
public static void getVmSnapshotList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllVmSnapshotsByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
public java.util.List < org.ovirt.engine.core.compat.Guid > getExternalIdsForRunningSteps ( org.ovirt.engine.core.common.job.ExternalSystemType systemType ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "external_system_type" , systemType.name ( ) ) . addValue ( "status" , JobExecutionStatus.STARTED.name ( ) ) ; return getCallsHandler ( ) . executeReadList ( "GetExternalIdsFromSteps" , createGuidMapper ( ) , parameterSource ) ; }

Target:
public java.util.List < org.ovirt.engine.core.compat.Guid > getExternalIdsForRunningSteps ( org.ovirt.engine.core.common.job.ExternalSystemType systemType ) { return multipleResults ( entityManager.createNamedQuery ( "Step.getExternalIdsForRunningSteps" ) . setParameter ( "status" , JobExecutionStatus.STARTED ) . setParameter ( "type" , systemType ) ) ; }
Source:
public org.ovirt.engine.core.common.action.VdcReturnValueBase login ( org.ovirt.engine.core.common.action.LoginUserParameters parameters ) { switch ( parameters.getActionType ( ) ) { case LoginUser : case LoginAdminUser : org.ovirt.engine.core.bll.CommandBase < ? > command = org.ovirt.engine.core.bll.CommandsFactory.createCommand ( parameters.getActionType ( ) , parameters ) ; return command.executeAction ( ) ; default : return getErrorCommandReturnValue ( EngineMessage.USER_NOT_AUTHORIZED_TO_PERFORM_ACTION ) ; } }

Target:
public java.util.ArrayList < org.ovirt.engine.core.common.action.VdcReturnValueBase > runMultipleActions ( org.ovirt.engine.core.common.action.VdcActionType actionType , java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > parameters , boolean isRunOnlyIfAllValidationPass , boolean waitForResult ) { org.ovirt.engine.core.common.action.VdcReturnValueBase returnValue = notAllowToRunAction ( actionType ) ; if ( returnValue != null ) { java.util.ArrayList < org.ovirt.engine.core.common.action.VdcReturnValueBase > list = new java.util.ArrayList < > ( ) ; list.add ( returnValue ) ; return list ; } else { return runMultipleActionsImpl ( actionType , parameters , false , isRunOnlyIfAllValidationPass , waitForResult , null ) ; } }
Source:
private org.ovirt.engine.core.common.action.ImportVmParameters createParametersWhenImagesExistOnTargetStorageDomain ( ) { org.ovirt.engine.core.common.action.ImportVmParameters params = new org.ovirt.engine.core.common.action.ImportVmParameters ( java.util.Collections.emptyList ( ) , true ) ; params.setContainerId ( vmId ) ; params.setStorageDomainId ( org.ovirt.engine.core.bll.exportimport.ImportVMFromConfigurationCommandTest.storageDomainId ) ; params.setClusterId ( clusterId ) ; params.setImagesExistOnTargetStorageDomain ( true ) ; return params ; }

Target:
private org.ovirt.engine.core.common.action.ImportVmFromConfParameters createParametersWhenImagesExistOnTargetStorageDomain ( ) { org.ovirt.engine.core.common.action.ImportVmFromConfParameters params = new org.ovirt.engine.core.common.action.ImportVmFromConfParameters ( java.util.Collections.emptyList ( ) , true ) ; params.setContainerId ( vmId ) ; params.setStorageDomainId ( org.ovirt.engine.core.bll.exportimport.ImportVMFromConfigurationCommandTest.storageDomainId ) ; params.setClusterId ( clusterId ) ; params.setImagesExistOnTargetStorageDomain ( true ) ; return params ; }
Source:
protected void init ( ) { super . init ( ) ; if ( ( org.ovirt.engine.core.bll.RunVmCommand.getVm ( ) ) != null ) { needsHostDevices = hostDeviceManager.checkVmNeedsDirectPassthrough ( org.ovirt.engine.core.bll.RunVmCommand.getVm ( ) ) ; } loadVmInit ( ) ; fetchVmDisksFromDb ( ) ; }

Target:
protected void init ( ) { super . init ( ) ; if ( ( org.ovirt.engine.core.bll.RunVmCommand.getVm ( ) ) != null ) { loadPayloadDevice ( ) ; needsHostDevices = hostDeviceManager.checkVmNeedsDirectPassthrough ( org.ovirt.engine.core.bll.RunVmCommand.getVm ( ) ) ; loadVmInit ( ) ; fetchVmDisksFromDb ( ) ; } }
Source:
public void execute ( ) { if ( getEnclosingCommand ( ) . getParameters ( ) . getTaskGroupSuccess ( ) ) { getReturnValue ( ) . setSucceeded ( false ) ; beforeTask ( ) ; addTask ( org.ovirt.engine.core.bll.Backend.getInstance ( ) . getResourceManager ( ) . RunVdsCommand ( getVDSCommandType ( ) , getVDSParameters ( ) ) ) ; } getReturnValue ( ) . setSucceeded ( true ) ; }

Target:
public void execute ( ) { if ( getEnclosingCommand ( ) . getParameters ( ) . getTaskGroupSuccess ( ) ) { getReturnValue ( ) . setSucceeded ( false ) ; beforeTask ( ) ; addTask ( org.ovirt.engine.core.bll.Backend.getInstance ( ) . getResourceManager ( ) . RunVdsCommand ( getVDSCommandType ( ) , getVDSParameters ( ) ) ) ; } org.ovirt.engine.core.bll.job.ExecutionHandler.setAsyncJob ( getEnclosingCommand ( ) . getExecutionContext ( ) , true ) ; getReturnValue ( ) . setSucceeded ( true ) ; }
Source:
public void updatePendingData ( int pendingMemory , int pendingCpuCount ) { synchronized ( getLockObj ( ) ) { cachedVds.setPendingVcpusCount ( pendingCpuCount ) ; cachedVds.setPendingVmemSize ( pendingMemory ) ; updateDynamicData ( cachedVds.getDynamicData ( ) ) ; } }

Target:
public void updatePendingData ( int pendingMemory , int pendingCpuCount ) { synchronized ( getLockObj ( ) ) { cachedVds.setPendingVcpusCount ( pendingCpuCount ) ; cachedVds.setPendingVmemSize ( pendingMemory ) ; org.ovirt.engine.core.vdsbroker.monitoring.HostMonitoring.refreshCommitedMemory ( cachedVds , dbFacade.getVmDao ( ) . getAllRunningForVds ( getVdsId ( ) ) ) ; updateDynamicData ( cachedVds.getDynamicData ( ) ) ; } }
Source:
private boolean isVmRunning ( org.ovirt.engine.core.common.businessentities.VM vm ) { return ( ( ( vm.getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.Up ) ) && ( ( vm.getRunOnVds ( ) ) != null ) ) && ( ! ( vm.getRunOnVds ( ) . equals ( Guid.Empty ) ) ) ; }

Target:
private boolean isVmRunning ( org.ovirt.engine.core.common.businessentities.VM vm ) { return ( ( vm.getStatus ( ) . isUpOrPaused ( ) ) && ( ( vm.getRunOnVds ( ) ) != null ) ) && ( ! ( vm.getRunOnVds ( ) . equals ( Guid.Empty ) ) ) ; }
Source:
public void stopHostWithUnknownPowerStatus ( ) { setupCommand ( setupCommandParams ( FenceActionType.STOP ) ) ; setupBrokerResult ( createBrokerResultMap ( 1 , "" , "unknown" , null ) , createBrokerResultMap ( 0 , "" , "unknown" , "initiated" ) ) ; command.execute ( ) ; org.ovirt.engine.core.common.businessentities.pm.FenceOperationResult result = ( ( org.ovirt.engine.core.common.businessentities.pm.FenceOperationResult ) ( command.getVDSReturnValue ( ) . getReturnValue ( ) ) ) ; org.junit.Assert.assertEquals ( Status.SUCCESS , result.getStatus ( ) ) ; org.junit.Assert.assertEquals ( PowerStatus.UNKNOWN , result.getPowerStatus ( ) ) ; }

Target:
public void stopHostWithUnknownPowerStatus ( ) { setupCommand ( setupCommandParams ( FenceActionType.STOP ) ) ; setupBrokerResult ( createBrokerResultMap ( 1 , "" , "unknown" , null ) , createBrokerResultMap ( 0 , "" , "unknown" , "initiated" ) ) ; command.execute ( ) ; org.ovirt.engine.core.common.businessentities.pm.FenceOperationResult result = ( ( org.ovirt.engine.core.common.businessentities.pm.FenceOperationResult ) ( command.getVDSReturnValue ( ) . getReturnValue ( ) ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( Status.SUCCESS , result.getStatus ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( PowerStatus.UNKNOWN , result.getPowerStatus ( ) ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.network.NetworkAttachment createNetworkAttachment ( org.ovirt.engine.core.common.businessentities.network.Network networkA , org.ovirt.engine.core.compat.Guid id ) { org.ovirt.engine.core.common.businessentities.network.NetworkAttachment networkAttachmentA = new org.ovirt.engine.core.common.businessentities.network.NetworkAttachment ( ) ; networkAttachmentA.setId ( id ) ; networkAttachmentA.setNetworkId ( networkA.getId ( ) ) ; return networkAttachmentA ; }

Target:
private org.ovirt.engine.core.common.businessentities.network.NetworkAttachment createNetworkAttachment ( org.ovirt.engine.core.common.businessentities.network.Network network , org.ovirt.engine.core.compat.Guid id ) { org.ovirt.engine.core.common.businessentities.network.NetworkAttachment networkAttachment = new org.ovirt.engine.core.common.businessentities.network.NetworkAttachment ( ) ; networkAttachment.setId ( id ) ; networkAttachment.setNetworkId ( network.getId ( ) ) ; networkAttachment.setNetworkName ( network.getName ( ) ) ; return networkAttachment ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage_pool > pools = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage_pool > ) ( returnValue ) ) ; org.ovirt.engine.core.common.businessentities.storage_pool pool = pools.get ( 0 ) ; if ( pool != null ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetStorageDomainList ( ( ( 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:
private void handleChildReturnValue ( ) { for ( org.ovirt.engine.core.common.action.VdcReturnValueBase vdcReturnValue : vdcReturnValues ) { org.ovirt.engine.core.bll.storage.disk.MoveDisksCommand.getReturnValue ( ) . getCanDoActionMessages ( ) . addAll ( vdcReturnValue.getCanDoActionMessages ( ) ) ; org.ovirt.engine.core.bll.storage.disk.MoveDisksCommand.getReturnValue ( ) . setCanDoAction ( ( ( org.ovirt.engine.core.bll.storage.disk.MoveDisksCommand.getReturnValue ( ) . getCanDoAction ( ) ) && ( vdcReturnValue.getCanDoAction ( ) ) ) ) ; } }

Target:
private void handleChildReturnValue ( ) { for ( org.ovirt.engine.core.common.action.VdcReturnValueBase vdcReturnValue : vdcReturnValues ) { org.ovirt.engine.core.bll.storage.disk.MoveDisksCommand.getReturnValue ( ) . getValidationMessages ( ) . addAll ( vdcReturnValue.getValidationMessages ( ) ) ; org.ovirt.engine.core.bll.storage.disk.MoveDisksCommand.getReturnValue ( ) . setValid ( ( ( org.ovirt.engine.core.bll.storage.disk.MoveDisksCommand.getReturnValue ( ) . isValid ( ) ) && ( vdcReturnValue.isValid ( ) ) ) ) ; } }
Source:
public static void GetDataCenterList ( 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 ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage_pool > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( "DataCenter: sortby name" , org.ovirt.engine.core.common.interfaces.SearchType.StoragePool ) , aQuery ) ; }

Target:
public static void getDataCenterList ( 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 ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( "DataCenter: sortby name" , org.ovirt.engine.core.common.interfaces.SearchType.StoragePool ) , aQuery ) ; }
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 ( VdcBllMessages.ACTION_TYPE_FAILED_VM_IS_NON_MIGRTABLE ) ; } return true ; }

Target:
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 ; }
Source:
public static void GetCustomPropertiesList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.HashMap < org.ovirt.engine.core.compat.Version , java.lang.String > ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmCustomProperties , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }

Target:
public static void getGlusterHooks ( 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 != null ? source : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetGlusterHooks , new org.ovirt.engine.core.common.queries.gluster.GlusterParameters ( clusterId ) , aQuery ) ; }
Source:
public org.ovirt.engine.core.common.AuditLogType getAuditLogTypeValue ( ) { return getSucceeded ( ) ? org.ovirt.engine.core.common.AuditLogType.HOSTED_ENGINE_DOMAIN_IMPORT_SUCCEEDED : org.ovirt.engine.core.common.AuditLogType.HOSTED_ENGINE_DOMAIN_IMPORT_FAILED ; }

Target:
protected java.util.Map < java.lang.String , org.ovirt.engine.core.common.utils.Pair < java.lang.String , java.lang.String > > getExclusiveLocks ( ) { if ( ( ( heStorageDomain ) != null ) && ( ( heStorageDomain.getId ( ) ) != null ) ) { return java.util.Collections.singletonMap ( heStorageDomain.getId ( ) . toString ( ) , org.ovirt.engine.core.bll.LockMessagesMatchUtil.makeLockingPair ( LockingGroup.STORAGE , EngineMessage.ACTION_TYPE_FAILED_STORAGE_DEVICE_LOCKED ) ) ; } return java.util.Collections.emptyMap ( ) ; }
Source:
public void onSelection ( com.google.gwt.event.logical.shared.SelectionEvent < java.lang.Integer > event ) { if ( ( object ) != null ) { object.setActiveDetailModel ( object.getDetailModels ( ) . get ( event.getSelectedItem ( ) ) ) ; if ( ( event.getSelectedItem ( ) ) == 0 ) { generalView.setMainTabSelectedItem ( ( ( org.ovirt.engine.core.common.businessentities.VM ) ( object.getSelectedItem ( ) ) ) ) ; } } }

Target:
public void onSelection ( com.google.gwt.event.logical.shared.SelectionEvent < java.lang.Integer > event ) { subTabLayoutPanelSelectionChanged ( event.getSelectedItem ( ) ) ; }
Source:
public void getGlusterVolumeGeoRepStatusForMasterVolume ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid masterVolumeId ) { 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 : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSession > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterVolumeGeoRepSessions , new org.ovirt.engine.core.common.queries.IdQueryParameters ( masterVolumeId ) , aQuery ) ; }

Target:
public void getGlusterBricksForServer ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , 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 : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterVolumeBricksByServerId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( serverId ) , aQuery ) ; }
Source:
protected boolean canDoAction ( ) { if ( checkIsDomainLocked ( org.ovirt.engine.core.bll.storage.ReconstructMasterDomainCommand.getStorageDomain ( ) . getStoragePoolIsoMapData ( ) ) ) { return false ; } java.util.List < org.ovirt.engine.core.common.businessentities.StoragePoolIsoMap > poolDomains = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStoragePoolIsoMapDao ( ) . getAllForStoragePool ( org.ovirt.engine.core.bll.storage.ReconstructMasterDomainCommand.getStoragePool ( ) . getId ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.StoragePoolIsoMap poolDomain : poolDomains ) { if ( checkIsDomainLocked ( poolDomain ) ) { return false ; } } return org.ovirt.engine.core.bll.storage.ReconstructMasterDomainCommand.initializeVds ( ) ; }

Target:
protected org.ovirt.engine.core.common.businessentities.StorageDomain getNewMasterStorageDomain ( ) { if ( ( newMasterStorageDomainId ) == null ) { getNewMasterStorageDomainId ( ) ; } return newMasterStorageDomain ; }
Source:
protected void executeCommand ( ) { if ( ( ( org.ovirt.engine.core.bll.RemoveVmPoolCommand.getVmPoolId ( ) ) != null ) && ( org.ovirt.engine.core.bll.RemoveVmPoolCommand.canRemoveVmPoolWithoutReasons ( org.ovirt.engine.core.bll.RemoveVmPoolCommand.getVmPoolId ( ) ) ) ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmPoolDao ( ) . remove ( org.ovirt.engine.core.bll.RemoveVmPoolCommand.getVmPoolId ( ) ) ; org.ovirt.engine.core.bll.RemoveVmPoolCommand.setSucceeded ( true ) ; } }

Target:
public java.lang.Void runInTransaction ( ) { getCompensationContext ( ) . snapshotEntity ( getVmPool ( ) ) ; setPoolBeingDestroyed ( ) ; setPrestartedToZero ( ) ; getCompensationContext ( ) . stateChanged ( ) ; return null ; }
Source:
public java.lang.String getValue ( org.ovirt.engine.core.common.businessentities.StorageDomainDR storageDomainDR ) { return storageDomainDR.getGeoRepSessionId ( ) . toString ( ) ; }

Target:
public java.lang.String getValue ( org.ovirt.engine.core.common.businessentities.StorageDomainDR storageDomainDR ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSession session = getDetailModel ( ) . getGeoRepSessionsMap ( ) . get ( storageDomainDR.getGeoRepSessionId ( ) ) ; if ( session == null ) { return storageDomainDR.getGeoRepSessionId ( ) . toString ( ) ; } else { return org.ovirt.engine.ui.webadmin.section.main.view.tab.storage.SubTabStorageDRView.messages.geoRepRemoteSessionName ( session.getSlaveHostName ( ) , session.getSlaveVolumeName ( ) ) ; } }
Source:
public static org.ovirt.engine.api.model.StorageType map ( org.ovirt.engine.api.model.StorageType storageType , org.ovirt.engine.api.model.StorageType template ) { switch ( storageType ) { case ISCSI : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.StorageType ; case FCP : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.StorageType ; case NFS : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.StorageType ; case LOCALFS : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.StorageType ; case POSIXFS : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.StorageType ; case GLUSTERFS : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.StorageType ; default : return null ; } }

Target:
public static org.ovirt.engine.api.model.StorageType map ( org.ovirt.engine.api.model.StorageType storageType , org.ovirt.engine.api.model.StorageType template ) { switch ( storageType ) { case ISCSI : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.StorageType ; case FCP : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.StorageType ; case NFS : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.StorageType ; case LOCALFS : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.StorageType ; case POSIXFS : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.StorageType ; case GLUSTERFS : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.StorageType ; case GLANCE : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.StorageType ; default : return null ; } }
Source:
public static java.util.ArrayList < org.ovirt.engine.core.compat.Guid > getGuidListFromString ( java.lang.String str ) { return java.util.Arrays.stream ( org.apache.commons.lang.StringUtils.split ( java.util.Objects.toString ( str , StringUtils.EMPTY ) , org.ovirt.engine.core.utils.GuidUtils.SEPARATOR ) ) . map ( Guid :: createGuidFromStringDefaultEmpty ) . collect ( java.util.stream.Collectors.toCollection ( java.util.ArrayList < org.ovirt.engine.core.compat.Guid > :: new ) ) ; }

Target:
public static java.util.List < org.ovirt.engine.core.compat.Guid > getGuidListFromString ( java.lang.String str ) { return java.util.Arrays.stream ( org.apache.commons.lang.StringUtils.split ( java.util.Objects.toString ( str , StringUtils.EMPTY ) , org.ovirt.engine.core.utils.GuidUtils.SEPARATOR ) ) . map ( Guid :: createGuidFromStringDefaultEmpty ) . collect ( java.util.stream.Collectors.toList ( ) ) ; }
Source:
public javax.ws.rs.core.Response rebalance ( org.ovirt.engine.api.model.Action action ) { boolean fixLayoutOnly = ( action.isSetFixLayout ( ) ) ? action.isFixLayout ( ) : false ; boolean force = ( action.isSetForce ( ) ) ? action.isForce ( ) : false ; return doAction ( VdcActionType.StartRebalanceGlusterVolume , new org.ovirt.engine.core.common.action.gluster.GlusterVolumeRebalanceParameters ( guid , fixLayoutOnly , force ) , action ) ; }

Target:
public javax.ws.rs.core.Response rebalance ( org.ovirt.engine.api.model.Action action ) { boolean fixLayoutOnly = ( action.isSetFixLayout ( ) ) ? action.isFixLayout ( ) : false ; boolean force = ( action.isSetForce ( ) ) ? action.isForce ( ) : false ; return doAction ( ActionType.StartRebalanceGlusterVolume , new org.ovirt.engine.core.common.action.gluster.GlusterVolumeRebalanceParameters ( guid , fixLayoutOnly , force ) , action ) ; }
Source:
public void testNeedToProcessHardwareCapsTrue ( ) { org.ovirt.engine.core.common.businessentities.VDS oldVds = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; oldVds.setClusterId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; oldVds.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; oldVds.setCpuFlags ( "flag1" ) ; org.ovirt.engine.core.common.businessentities.VDS newVds = oldVds.clone ( ) ; newVds.setCpuFlags ( "flag2" ) ; org.junit.Assert.assertTrue ( virtStrategy.processHardwareCapabilitiesNeeded ( oldVds , newVds ) ) ; }

Target:
public void testNeedToProcessHardwareCapsTrue ( ) { org.ovirt.engine.core.common.businessentities.VDS oldVds = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; oldVds.setClusterId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; oldVds.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; oldVds.setCpuFlags ( "flag1" ) ; org.ovirt.engine.core.common.businessentities.VDS newVds = oldVds.clone ( ) ; newVds.setCpuFlags ( "flag2" ) ; org.junit.jupiter.api.Assertions.assertTrue ( virtStrategy.processHardwareCapabilitiesNeeded ( oldVds , newVds ) ) ; }
Source:
public static void getVmGuestAgentInterfacesByVmId ( 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 new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmGuestAgentInterface > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmGuestAgentInterfacesByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }

Target:
public static void getVnicProfilesByNetworkId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid networkId ) { 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.network.VnicProfileView > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVnicProfilesByNetworkId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( networkId ) , aQuery ) ; }
Source:
private void initUnregisteredOVFData ( org.ovirt.engine.core.common.businessentities.OvfEntityData resultOvfEntityData ) { java.util.List < org.ovirt.engine.core.common.businessentities.OvfEntityData > ovfEntityDataList = new java.util.ArrayList < > ( ) ; if ( resultOvfEntityData != null ) { ovfEntityDataList.add ( resultOvfEntityData ) ; } org.mockito.Mockito.when ( unregisteredOVFDataDao.getByEntityIdAndStorageDomain ( vmId , org.ovirt.engine.core.bll.exportimport.ImportVMFromConfigurationCommandTest.storageDomainId ) ) . thenReturn ( ovfEntityDataList ) ; }

Target:
private void initUnregisteredOVFData ( org.ovirt.engine.core.common.businessentities.OvfEntityData resultOvfEntityData ) { java.util.List < org.ovirt.engine.core.common.businessentities.OvfEntityData > ovfEntityDataList = new java.util.ArrayList < > ( ) ; if ( resultOvfEntityData != null ) { ovfEntityDataList.add ( resultOvfEntityData ) ; } org.mockito.Mockito.when ( unregisteredOVFDataDao.getByEntityIdAndStorageDomain ( vmId , org.ovirt.engine.core.bll.exportimport.ImportVMFromConfigurationCommandTest.storageDomainId ) ) . thenReturn ( ovfEntityDataList ) ; org.mockito.Mockito.when ( clusterDao.getByName ( org.mockito.ArgumentMatchers.any ( ) ) ) . thenReturn ( null ) ; }
Source:
public 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 ) ; }

Target:
public void getClusterListByName ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String name ) { 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.VDSGroup > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( ( ( "Cluster: name=" + name ) + " sortby name" ) , org.ovirt.engine.core.common.interfaces.SearchType.Cluster ) , aQuery ) ; }
Source:
private java.util.Map < java.lang.String , java.lang.Object > findDirectoryGroupById ( ) { return org.ovirt.engine.core.aaa.SSOOAuthServiceUtils.findDirectoryGroupById ( org.ovirt.engine.core.bll.aaa.GetDirectoryGroupByIdQuery.getSessionDataContainer ( ) . getSsoAccessToken ( org.ovirt.engine.core.bll.aaa.GetDirectoryGroupByIdQuery.getParameters ( ) . getSessionId ( ) ) , org.ovirt.engine.core.bll.aaa.GetDirectoryGroupByIdQuery.getParameters ( ) . getDomain ( ) , org.ovirt.engine.core.bll.aaa.GetDirectoryGroupByIdQuery.getParameters ( ) . getNamespace ( ) , org.ovirt.engine.core.bll.aaa.GetDirectoryGroupByIdQuery.getParameters ( ) . getId ( ) , false , false ) ; }

Target:
private java.util.Map < java.lang.String , java.lang.Object > findDirectoryGroupById ( ) { return org.ovirt.engine.core.aaa.SsoOAuthServiceUtils.findDirectoryGroupById ( org.ovirt.engine.core.bll.aaa.GetDirectoryGroupByIdQuery.getSessionDataContainer ( ) . getSsoAccessToken ( org.ovirt.engine.core.bll.aaa.GetDirectoryGroupByIdQuery.getParameters ( ) . getSessionId ( ) ) , org.ovirt.engine.core.bll.aaa.GetDirectoryGroupByIdQuery.getParameters ( ) . getDomain ( ) , org.ovirt.engine.core.bll.aaa.GetDirectoryGroupByIdQuery.getParameters ( ) . getNamespace ( ) , org.ovirt.engine.core.bll.aaa.GetDirectoryGroupByIdQuery.getParameters ( ) . getId ( ) , false , false ) ; }
Source:
public void testAddVMToAffinityGroup ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpGetEntityExpectations ( false ) ; setUriInfo ( setUpActionExpectations ( ActionType.EditAffinityGroup , org.ovirt.engine.core.common.scheduling.parameters.AffinityGroupCRUDParameters.class , new java.lang.String [ ] { } , new java.lang.Object [ ] { } , true , true ) ) ; org.ovirt.engine.api.model.Vm vm = new org.ovirt.engine.api.model.Vm ( ) ; vm.setId ( GUIDS [ 0 ] . toString ( ) ) ; javax.ws.rs.core.Response response = collection.add ( vm ) ; assertEquals ( 200 , response.getStatus ( ) ) ; }

Target:
public void testAddVMToAffinityGroup ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpGetEntityExpectations ( false ) ; setUriInfo ( setUpActionExpectations ( ActionType.EditAffinityGroup , org.ovirt.engine.core.common.scheduling.parameters.AffinityGroupCRUDParameters.class , new java.lang.String [ ] { } , new java.lang.Object [ ] { } , true , true ) ) ; org.ovirt.engine.api.model.Vm vm = new org.ovirt.engine.api.model.Vm ( ) ; vm.setId ( GUIDS [ 0 ] . toString ( ) ) ; javax.ws.rs.core.Response response = collection.add ( vm ) ; org.junit.Assert.assertEquals ( 200 , response.getStatus ( ) ) ; }
Source:
public void onFailure ( final java.lang.Throwable caught ) { if ( org.ovirt.engine.ui.frontend.Frontend.ignoreFailure ( caught ) ) { return ; } org.ovirt.engine.ui.frontend.Frontend.logger.log ( java.util.logging.Level.SEVERE , ( "Failed to execute RunQuery: " + caught ) , caught ) ; org.ovirt.engine.ui.frontend.Frontend.getEventsHandler ( ) . runQueryFailed ( null ) ; org.ovirt.engine.ui.frontend.Frontend.failureEventHandler ( caught ) ; if ( callback.isHandleFailure ( ) ) { callback.asyncCallback.onSuccess ( callback.getModel ( ) , null ) ; } }

Target:
public void onFailure ( final org.ovirt.engine.ui.frontend.communication.VdcOperation < org.ovirt.engine.core.common.action.VdcActionType , org.ovirt.engine.core.common.action.VdcActionParametersBase > operation , final java.lang.Throwable caught ) { if ( ignoreFailure ( caught ) ) { return ; } org.ovirt.engine.ui.frontend.Frontend.logger.log ( java.util.logging.Level.SEVERE , ( "Failed to execute runAction: " + caught ) , caught ) ; failureEventHandler ( caught ) ; org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult f = new org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult ( actionType , parameters , null , state ) ; if ( callback != null ) { callback.executed ( f ) ; } }
Source:
private void addSharedLockEntry ( org.ovirt.engine.core.common.businessentities.VDS vds ) { if ( ( sharedLockMap ) == null ) { sharedLockMap = new java.util.HashMap < java.lang.String , org.ovirt.engine.core.common.utils.Pair < java.lang.String , java.lang.String > > ( ) ; } sharedLockMap.put ( vds.getStoragePoolId ( ) . toString ( ) , LockMessagesMatchUtil.POOL ) ; }

Target:
private void addSharedLockEntry ( org.ovirt.engine.core.common.businessentities.VDS vds ) { if ( ( sharedLockMap ) == null ) { sharedLockMap = new java.util.HashMap < java.lang.String , org.ovirt.engine.core.common.utils.Pair < java.lang.String , java.lang.String > > ( ) ; } sharedLockMap.put ( vds.getStoragePoolId ( ) . toString ( ) , org.ovirt.engine.core.bll.LockMessagesMatchUtil.makeLockingPair ( LockingGroup.POOL , VdcBllMessages.ACTION_TYPE_FAILED_OBJECT_LOCKED ) ) ; }
Source:
public static void getStorageDomainList ( 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.StorageDomain > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) ; } } ; org.ovirt.engine.core.common.queries.SearchParameters searchParams = new org.ovirt.engine.core.common.queries.SearchParameters ( "Storage:" , org.ovirt.engine.core.common.interfaces.SearchType.StorageDomain ) ; searchParams.setMaxCount ( 9999 ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.Search , searchParams , aQuery ) ; }

Target:
public static void getCPUList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Version version ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ServerCpu > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ServerCpu > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllServerCpuList , new org.ovirt.engine.core.common.queries.GetAllServerCpuListParameters ( version ) , aQuery ) ; }
Source:
private void addVmToDb ( ) { org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInNewTransaction ( new org.ovirt.engine.core.utils.transaction.TransactionMethod < java.lang.Void > ( ) { @ java.lang.Override public java.lang.Void runInTransaction ( ) { addVmStatic ( ) ; addVmDynamic ( ) ; addVmInterfaces ( ) ; addVmStatistics ( ) ; getCompensationContext ( ) . stateChanged ( ) ; return null ; } } ) ; freeLock ( ) ; }

Target:
private java.lang.String getVmIsBeingImportedMessage ( ) { java.lang.StringBuilder builder = new java.lang.StringBuilder ( VdcBllMessages.ACTION_TYPE_FAILED_VM_IS_BEING_IMPORTED.name ( ) ) ; if ( ( getVmName ( ) ) != null ) { builder.append ( java.lang.String.format ( "$VmName %1$s" , getVmName ( ) ) ) ; } return builder.toString ( ) ; }
Source:
public void setUp ( ) throws java.lang.Exception { testFilter = new org.ovirt.engine.core.branding.BrandingFilter ( ) ; testFilter.init ( mockFilterConfig , mockBrandingManager ) ; mockBrandingThemes = new java.util.ArrayList < org.ovirt.engine.core.branding.BrandingTheme > ( ) ; org.mockito.Mockito.when ( mockRequest.getAttribute ( LocaleFilter.LOCALE ) ) . thenReturn ( java.util.Locale.US ) ; org.mockito.Mockito.when ( mockRequest.getServletContext ( ) ) . thenReturn ( mockServletContext ) ; org.mockito.Mockito.when ( mockServletContext.getInitParameter ( "obrandApplicationName" ) ) . thenReturn ( "test" ) ; org.mockito.Mockito.when ( mockBrandingManager.getBrandingThemes ( ) ) . thenReturn ( mockBrandingThemes ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { testFilter = new org.ovirt.engine.core.branding.BrandingFilter ( ) ; testFilter.init ( mockFilterConfig , mockBrandingManager ) ; mockBrandingThemes = new java.util.ArrayList < org.ovirt.engine.core.branding.BrandingTheme > ( ) ; org.mockito.Mockito.when ( mockRequest.getAttribute ( LocaleFilter.LOCALE ) ) . thenReturn ( java.util.Locale.US ) ; org.mockito.Mockito.when ( mockRequest.getServletContext ( ) ) . thenReturn ( mockServletContext ) ; org.mockito.Mockito.when ( mockServletContext.getInitParameter ( "applicationName" ) ) . thenReturn ( "test" ) ; org.mockito.Mockito.when ( mockBrandingManager.getBrandingThemes ( ) ) . thenReturn ( mockBrandingThemes ) ; }
Source:
public org.ovirt.engine.core.searchbackend.IConditionValueAutoCompleter getFieldValueAutoCompleter ( java.lang.String fieldName ) { if ( "SEVERITY" . equals ( fieldName ) ) { return new org.ovirt.engine.core.searchbackend.EnumValueAutoCompleter ( org.ovirt.engine.core.common.AuditLogSeverity.class ) ; } else if ( "TIME" . equals ( fieldName ) ) { return new org.ovirt.engine.core.searchbackend.DateEnumValueAutoCompleter ( org.ovirt.engine.core.common.businessentities.DateEnumForSearch.class ) ; } else { return null ; } }

Target:
public org.ovirt.engine.core.searchbackend.IConditionValueAutoCompleter getFieldValueAutoCompleter ( java.lang.String fieldName ) { if ( org.ovirt.engine.core.searchbackend.AuditLogConditionFieldAutoCompleter.SEVERITY.equals ( fieldName ) ) { return new org.ovirt.engine.core.searchbackend.EnumValueAutoCompleter ( org.ovirt.engine.core.common.AuditLogSeverity.class ) ; } else if ( org.ovirt.engine.core.searchbackend.AuditLogConditionFieldAutoCompleter.TIME.equals ( fieldName ) ) { return new org.ovirt.engine.core.searchbackend.DateEnumValueAutoCompleter ( org.ovirt.engine.core.common.businessentities.DateEnumForSearch.class ) ; } else { return null ; } }
Source:
private void addViolation ( org.ovirt.engine.core.dal.VdcBllMessages violation , java.lang.String violatingEntity ) { java.util.List < java.lang.String > violatingEntities = violations.get ( violation ) ; if ( violatingEntities == null ) { violatingEntities = new java.util.ArrayList < java.lang.String > ( ) ; violations.put ( violation , violatingEntities ) ; } violatingEntities.add ( violatingEntity ) ; }

Target:
private void addViolation ( org.ovirt.engine.core.common.errors.VdcBllMessages violation , java.lang.String violatingEntity ) { java.util.List < java.lang.String > violatingEntities = violations.get ( violation ) ; if ( violatingEntities == null ) { violatingEntities = new java.util.ArrayList < java.lang.String > ( ) ; violations.put ( violation , violatingEntities ) ; } violatingEntities.add ( violatingEntity ) ; }
Source:
public void init ( ) { initState ( ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetRedirectServletReportsPage ( new org.ovirt.engine.ui.frontend.AsyncQuery ( this , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { setReportBaseUrl ( ( ( java.lang.String ) ( returnValue ) ) ) ; } } ) ) ; parseReportsXML ( ) ; }

Target:
public void init ( ) { initState ( ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getRedirectServletReportsPage ( new org.ovirt.engine.ui.frontend.AsyncQuery ( this , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { setReportBaseUrl ( ( ( java.lang.String ) ( returnValue ) ) ) ; } } ) ) ; parseReportsXML ( ) ; }
Source:
public void mixedClusterServicesNotSupported ( ) { mockConfigRule.mockConfigValue ( ConfigValues.AllowClusterWithVirtGlusterEnabled , false ) ; org.mockito.Mockito.when ( cluster.supportsGlusterService ( ) ) . thenReturn ( true ) ; org.mockito.Mockito.when ( cluster.supportsVirtService ( ) ) . thenReturn ( true ) ; validator = new org.ovirt.engine.core.bll.validator.ClusterValidator ( dbFacade , cluster ) ; org.junit.Assert.assertThat ( validator.mixedClusterServicesSupported ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.VDS_GROUP_ENABLING_BOTH_VIRT_AND_GLUSTER_SERVICES_NOT_ALLOWED ) ) ; }

Target:
public void mixedClusterServicesNotSupported ( ) { mockConfigRule.mockConfigValue ( ConfigValues.AllowClusterWithVirtGlusterEnabled , false ) ; org.mockito.Mockito.when ( cluster.supportsGlusterService ( ) ) . thenReturn ( true ) ; org.mockito.Mockito.when ( cluster.supportsVirtService ( ) ) . thenReturn ( true ) ; validator = new org.ovirt.engine.core.bll.validator.ClusterValidator ( dbFacade , cluster , cpuFlagsManagerHandler ) ; org.junit.Assert.assertThat ( validator.mixedClusterServicesSupported ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.VDS_GROUP_ENABLING_BOTH_VIRT_AND_GLUSTER_SERVICES_NOT_ALLOWED ) ) ; }