auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
protected org.ovirt.engine.core.common.businessentities.StorageDomainStatic generateNewEntity ( ) { org.ovirt.engine.core.common.businessentities.StorageDomainStatic newStaticDomain = new org.ovirt.engine.core.common.businessentities.StorageDomainStatic ( ) ; newStaticDomain.setStorageName ( "NewStorageDomain" ) ; newStaticDomain.setStorage ( "fDMzhE-wx3s-zo3q-Qcxd-T0li-yoYU-QvVePl" ) ; newStaticDomain.setStorageFormat ( StorageFormatType.V1 ) ; newStaticDomain.setWipeAfterDelete ( true ) ; newStaticDomain.setDiscardAfterDelete ( false ) ; newStaticDomain.setWarningLowSpaceIndicator ( 3 ) ; newStaticDomain.setCriticalSpaceActionBlocker ( 9 ) ; newStaticDomain.setFirstMetadataDevice ( FixturesTool.LUN_ID2 ) ; newStaticDomain.setVgMetadataDevice ( FixturesTool.LUN_ID2 ) ; newStaticDomain.setBackup ( false ) ; return newStaticDomain ; }

Target:
protected org.ovirt.engine.core.common.businessentities.StorageDomainStatic generateNewEntity ( ) { org.ovirt.engine.core.common.businessentities.StorageDomainStatic newStaticDomain = new org.ovirt.engine.core.common.businessentities.StorageDomainStatic ( ) ; newStaticDomain.setStorageName ( "NewStorageDomain" ) ; newStaticDomain.setStorage ( "fDMzhE-wx3s-zo3q-Qcxd-T0li-yoYU-QvVePl" ) ; newStaticDomain.setStorageFormat ( StorageFormatType.V1 ) ; newStaticDomain.setWipeAfterDelete ( true ) ; newStaticDomain.setDiscardAfterDelete ( false ) ; newStaticDomain.setWarningLowSpaceIndicator ( 3 ) ; newStaticDomain.setCriticalSpaceActionBlocker ( 9 ) ; newStaticDomain.setWarningLowConfirmedSpaceIndicator ( 6 ) ; newStaticDomain.setFirstMetadataDevice ( FixturesTool.LUN_ID2 ) ; newStaticDomain.setVgMetadataDevice ( FixturesTool.LUN_ID2 ) ; newStaticDomain.setBackup ( false ) ; return newStaticDomain ; }
Source:
private boolean hasImages ( ) { return ( ( getDiskImageDAO ( ) . getAllSnapshotsForStorageDomain ( org.ovirt.engine.core.bll.storage.StorageDomainCommandBase.getStorageDomain ( ) . getId ( ) ) . size ( ) ) != 0 ) || ( ( getImageStorageDomainMapDao ( ) . getAllByStorageDomainId ( org.ovirt.engine.core.bll.storage.StorageDomainCommandBase.getStorageDomain ( ) . getId ( ) ) . size ( ) ) != 0 ) ; }

Target:
private boolean hasImages ( ) { return ( ( getDiskImageDao ( ) . getAllSnapshotsForStorageDomain ( org.ovirt.engine.core.bll.storage.StorageDomainCommandBase.getStorageDomain ( ) . getId ( ) ) . size ( ) ) != 0 ) || ( ( getImageStorageDomainMapDao ( ) . getAllByStorageDomainId ( org.ovirt.engine.core.bll.storage.StorageDomainCommandBase.getStorageDomain ( ) . getId ( ) ) . size ( ) ) != 0 ) ; }
Source:
public org.ovirt.engine.core.common.businessentities.Snapshot get ( org.ovirt.engine.core.compat.Guid vmId , org.ovirt.engine.core.common.businessentities.Snapshot.SnapshotType type ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "vm_id" , vmId ) . addValue ( "snapshot_type" , org.ovirt.engine.core.common.utils.EnumUtils.nameOrNull ( type ) ) ; return getCallsHandler ( ) . executeRead ( "GetSnapshotByVmIdAndType" , createEntityRowMapper ( ) , parameterSource ) ; }

Target:
public org.ovirt.engine.core.common.businessentities.Snapshot get ( org.ovirt.engine.core.compat.Guid vmId , org.ovirt.engine.core.common.businessentities.Snapshot.SnapshotType type , org.ovirt.engine.core.compat.Guid userId , boolean isFiltered ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "vm_id" , vmId ) . addValue ( "snapshot_type" , org.ovirt.engine.core.common.utils.EnumUtils.nameOrNull ( type ) ) . addValue ( "user_id" , userId ) . addValue ( "is_filtered" , isFiltered ) ; return getCallsHandler ( ) . executeRead ( "GetSnapshotByVmIdAndType" , createEntityRowMapper ( ) , parameterSource ) ; }
Source:
private java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > getStorageDomainList ( ) { final java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > l = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) ; final org.ovirt.engine.core.common.businessentities.StorageDomain s = new org.ovirt.engine.core.common.businessentities.StorageDomain ( ) ; s.setstatus ( StorageDomainStatus.InActive ) ; l.add ( s ) ; final org.ovirt.engine.core.common.businessentities.StorageDomain s2 = new org.ovirt.engine.core.common.businessentities.StorageDomain ( ) ; s2.setstatus ( null ) ; l.add ( s2 ) ; STORAGE_DOMAIN.setstatus ( StorageDomainStatus.Active ) ; l.add ( STORAGE_DOMAIN ) ; return l ; }

Target:
private java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > getStorageDomainList ( ) { final java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > l = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) ; final org.ovirt.engine.core.common.businessentities.StorageDomain s = new org.ovirt.engine.core.common.businessentities.StorageDomain ( ) ; s.setStatus ( StorageDomainStatus.InActive ) ; l.add ( s ) ; final org.ovirt.engine.core.common.businessentities.StorageDomain s2 = new org.ovirt.engine.core.common.businessentities.StorageDomain ( ) ; s2.setStatus ( null ) ; l.add ( s2 ) ; STORAGE_DOMAIN.setStatus ( StorageDomainStatus.Active ) ; l.add ( STORAGE_DOMAIN ) ; return l ; }
Source:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.core.common.queries.VdcQueryReturnValue queryReturnValue = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) ; if ( queryReturnValue.getSucceeded ( ) ) { org.ovirt.engine.core.common.businessentities.VM vm = queryReturnValue.getReturnValue ( ) ; updateVms ( java.util.Collections.singletonList ( vm ) ) ; } else { setError ( messages.failedToLoadOva ( getOvaPath ( ) . getEntity ( ) ) ) ; } stopProgress ( ) ; }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < ? extends org.ovirt.engine.ui.uicompat.EventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { validateSource ( ) ; clearVms ( ) ; clearValidations ( ) ; loadProviders ( ) ; }
Source:
public void canDetectMissingRequiredHostNumaNodes ( ) { updatedNumaNodes = java.util.Arrays.asList ( org.ovirt.engine.core.bll.utils.NumaTestUtils.createVmNumaNodeWithId ( 3 , vdsNumaNodes , org.ovirt.engine.core.bll.numa.vm.UpdateVmNumaNodesCommandTest.NODE_ID_3 ) ) ; existingNumaNodes.addAll ( updatedNumaNodes ) ; vm.setvNumaNodeList ( existingNumaNodes ) ; vdsNumaNodes.remove ( 0 ) ; final org.ovirt.engine.core.bll.numa.vm.UpdateVmNumaNodesCommand command = mockedCommandWithVmFromParams ( ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( command , EngineMessage.VM_NUMA_NODE_HOST_NODE_INVALID_INDEX ) ; }

Target:
public void canDetectMissingRequiredHostNumaNodes ( ) { updatedNumaNodes = java.util.Arrays.asList ( org.ovirt.engine.core.bll.utils.NumaTestUtils.createVmNumaNodeWithId ( 0 , vdsNumaNodes , org.ovirt.engine.core.bll.numa.vm.UpdateVmNumaNodesCommandTest.NODE_ID_0 ) ) ; vm.setvNumaNodeList ( existingNumaNodes ) ; vdsNumaNodes.remove ( 0 ) ; final org.ovirt.engine.core.bll.numa.vm.UpdateVmNumaNodesCommand command = mockedCommandWithVmFromParams ( ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( command , EngineMessage.VM_NUMA_NODE_HOST_NODE_INVALID_INDEX ) ; }
Source:
public void executeCommand ( org.ovirt.engine.ui.uicommonweb.UICommand command ) { super . executeCommand ( command ) ; if ( command == ( getLoginCommand ( ) ) ) { Login ( ) ; } else if ( org.ovirt.engine.core.compat.StringHelper.stringsEqual ( command.getName ( ) , "Cancel" ) ) { Cancel ( ) ; } }

Target:
public void executeCommand ( org.ovirt.engine.ui.uicommonweb.UICommand command ) { super . executeCommand ( command ) ; if ( command == ( getLoginCommand ( ) ) ) { login ( ) ; } else if ( org.ovirt.engine.core.compat.StringHelper.stringsEqual ( command.getName ( ) , "Cancel" ) ) { cancel ( ) ; } }
Source:
protected java.lang.String getReason ( ) { return org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getMessages ( ) . poolNameLengthInvalid ( generateMaxLength ( ) , getNumOfVmsInPool ( ) ) ; }

Target:
protected java.lang.String getReason ( ) { return ( getQuestionMarksCount ( ) ) == 0 ? org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getMessages ( ) . poolNameLengthInvalid ( generateMaxLengthNoQuestionMarks ( ) , getNumOfVmsInPool ( ) ) : org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getMessages ( ) . poolNameWithQuestionMarksLengthInvalid ( generateMaxLengthQuestionMarksPresent ( ) , getNumOfVmsInPool ( ) , getQuestionMarksCount ( ) ) ; }
Source:
private void createTables ( org.ovirt.engine.ui.uicommonweb.models.storage.RegisterEntityModel model ) { createEntityTable ( model ) ; createInfoPanel ( model ) ; entityTable.asEditor ( ) . edit ( model.getEntities ( ) ) ; }

Target:
private void createTables ( org.ovirt.engine.ui.uicommonweb.models.storage.RegisterEntityModel model ) { createEntityTable ( model ) ; createInfoPanel ( model ) ; entityTable.asEditor ( ) . edit ( model.getEntities ( ) ) ; model.getEntities ( ) . setSelectedItem ( org.ovirt.engine.ui.uicommonweb.Linq.firstOrDefault ( model.getEntities ( ) . getItems ( ) ) ) ; }
Source:
public org.ovirt.engine.ui.common.uicommon.model.SearchableDetailModelProvider < org.ovirt.engine.core.common.utils.PairQueryable < org.ovirt.engine.core.common.businessentities.VmNetworkInterface , org.ovirt.engine.core.common.businessentities.VmTemplate > , org.ovirt.engine.ui.uicommonweb.models.networks.NetworkListModel , org.ovirt.engine.ui.uicommonweb.models.networks.NetworkTemplateListModel > geNetworkTemplateModelProvider ( org.ovirt.engine.ui.webadmin.gin.ClientGinjector ginjector ) { return new org.ovirt.engine.ui.common.uicommon.model.SearchableDetailTabModelProvider < org.ovirt.engine.core.common.utils.PairQueryable < org.ovirt.engine.core.common.businessentities.VmNetworkInterface , org.ovirt.engine.core.common.businessentities.VmTemplate > , org.ovirt.engine.ui.uicommonweb.models.networks.NetworkListModel , org.ovirt.engine.ui.uicommonweb.models.networks.NetworkTemplateListModel > ( ginjector , org.ovirt.engine.ui.uicommonweb.models.networks.NetworkListModel.class , org.ovirt.engine.ui.uicommonweb.models.networks.NetworkTemplateListModel.class ) ; }

Target:
public org.ovirt.engine.ui.common.presenter.AbstractModelBoundPopupPresenterWidget < ? extends org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel , ? > getConfirmModelPopup ( org.ovirt.engine.ui.uicommonweb.models.networks.NetworkTemplateListModel source , org.ovirt.engine.ui.uicommonweb.UICommand lastExecutedCommand ) { if ( lastExecutedCommand == ( getModel ( ) . getRemoveCommand ( ) ) ) { return removeConfirmPopupProvider.get ( ) ; } else { return super . getConfirmModelPopup ( source , lastExecutedCommand ) ; } }
Source:
public java.util.List < org.ovirt.engine.core.bll.quota.QuotaConsumptionParameter > getQuotaStorageConsumptionParameters ( ) { return null ; }

Target:
private org.ovirt.engine.core.common.action.ColdMergeCommandParameters buildColdMergeParameters ( org.ovirt.engine.core.compat.Guid baseVolumeId , org.ovirt.engine.core.compat.Guid topVolumeId ) { org.ovirt.engine.core.common.businessentities.SubchainInfo subchainInfo = new org.ovirt.engine.core.common.businessentities.SubchainInfo ( org.ovirt.engine.core.bll.snapshots.ColdMergeSnapshotSingleDiskCommand.getDiskImage ( ) . getStorageIds ( ) . get ( 0 ) , org.ovirt.engine.core.bll.snapshots.ColdMergeSnapshotSingleDiskCommand.getImageGroupId ( ) , baseVolumeId , topVolumeId ) ; org.ovirt.engine.core.common.action.ColdMergeCommandParameters parameters = new org.ovirt.engine.core.common.action.ColdMergeCommandParameters ( org.ovirt.engine.core.bll.snapshots.ColdMergeSnapshotSingleDiskCommand.getDiskImage ( ) . getStoragePoolId ( ) , subchainInfo ) ; parameters.setEndProcedure ( VdcActionParametersBase.EndProcedure.COMMAND_MANAGED ) ; parameters.setParentCommand ( org.ovirt.engine.core.bll.snapshots.ColdMergeSnapshotSingleDiskCommand.getActionType ( ) ) ; parameters.setParentParameters ( org.ovirt.engine.core.bll.snapshots.ColdMergeSnapshotSingleDiskCommand.getParameters ( ) ) ; return parameters ; }
Source:
private void refreshCapabilities ( ) { java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > list = new java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > ( ) ; for ( java.lang.Object item : getSelectedItems ( ) ) { org.ovirt.engine.core.common.businessentities.VDS vds = ( ( org.ovirt.engine.core.common.businessentities.VDS ) ( item ) ) ; list.add ( new org.ovirt.engine.core.common.action.VdsActionParameters ( vds.getId ( ) ) ) ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runMultipleAction ( VdcActionType.RefreshHostCapabilities , list , new org.ovirt.engine.ui.uicompat.IFrontendMultipleActionAsyncCallback ( ) { @ java.lang.Override public void executed ( org.ovirt.engine.ui.uicompat.FrontendMultipleActionAsyncResult result ) { } } , null ) ; }

Target:
public void start ( ) { java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > list = new java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > ( ) ; for ( java.lang.Object item : getSelectedItems ( ) ) { org.ovirt.engine.core.common.businessentities.VDS vds = ( ( org.ovirt.engine.core.common.businessentities.VDS ) ( item ) ) ; list.add ( new org.ovirt.engine.core.common.action.FenceVdsActionParameters ( vds.getId ( ) , org.ovirt.engine.core.common.businessentities.FenceActionType.Start ) ) ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runMultipleAction ( VdcActionType.StartVds , list , new org.ovirt.engine.ui.uicompat.IFrontendMultipleActionAsyncCallback ( ) { @ java.lang.Override public void executed ( org.ovirt.engine.ui.uicompat.FrontendMultipleActionAsyncResult result ) { } } , null ) ; }
Source:
protected void executeCommand ( ) { org.ovirt.engine.core.common.vdscommands.VDSReturnValue returnValue = runVdsCommand ( VDSCommandType.StopGlusterVolume , new org.ovirt.engine.core.common.vdscommands.gluster.GlusterVolumeActionVDSParameters ( getUpServer ( ) . getId ( ) , getGlusterVolumeName ( ) , getParameters ( ) . isForceAction ( ) ) ) ; setSucceeded ( returnValue.getSucceeded ( ) ) ; if ( getSucceeded ( ) ) { updateVolumeStatusInDb ( getParameters ( ) . getVolumeId ( ) ) ; } else { handleVdsError ( AuditLogType.GLUSTER_VOLUME_STOP_FAILED , returnValue.getVdsError ( ) . getMessage ( ) ) ; return ; } }

Target:
protected boolean canDoAction ( ) { if ( ! ( super . canDoAction ( ) ) ) { return false ; } org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity volume = getGlusterVolume ( ) ; if ( ! ( volume.isOnline ( ) ) ) { addCanDoActionMessage ( VdcBllMessages.ACTION_TYPE_FAILED_GLUSTER_VOLUME_ALREADY_STOPPED ) ; addCanDoActionMessage ( java.lang.String.format ( "$volumeName %1$s" , volume.getName ( ) ) ) ; return false ; } return true ; }
Source:
public void prepareFromRequest ( com.gwtplatform.mvp.shared.proxy.PlaceRequest request ) { super . prepareFromRequest ( request ) ; if ( hasMainTabSelection ( ) ) { org.ovirt.engine.ui.common.presenter.AbstractSubTabPresenter.getProxy ( ) . manualReveal ( this ) ; } else { org.ovirt.engine.ui.common.presenter.AbstractSubTabPresenter.getProxy ( ) . manualRevealFailed ( ) ; placeManager.revealPlace ( getMainTabRequest ( ) ) ; } }

Target:
protected void onBind ( ) { super . onBind ( ) ; org.ovirt.engine.ui.common.widget.table.OrderedMultiSelectionModel < ? > tableSelectionModel = ( ( getTable ( ) ) != null ) ? getTable ( ) . getSelectionModel ( ) : null ; if ( tableSelectionModel != null ) { registerHandler ( tableSelectionModel.addSelectionChangeHandler ( new com.google.gwt.view.client.SelectionChangeEvent.Handler ( ) { @ java.lang.Override public void onSelectionChange ( com.google.gwt.view.client.SelectionChangeEvent event ) { updateDetailModelSelection ( ) ; } } ) ) ; } initializeHandlers ( ) ; getSelectedMainItems ( ) . registerListener ( this ) ; itemChanged ( getSelectedMainItems ( ) . getSelectedItem ( ) ) ; }
Source:
public static < T > org.ovirt.engine.ui.uicompat.Translator Create ( T type ) { return new org.ovirt.engine.ui.uicompat.EnumTranslator ( type ) ; }

Target:
public static < T > org.ovirt.engine.ui.uicompat.Translator Create ( T type ) { org.ovirt.engine.ui.uicompat.EnumTranslator translator = org.ovirt.engine.ui.uicompat.EnumTranslator.translatorsMap.get ( type ) ; if ( translator == null ) { translator = new org.ovirt.engine.ui.uicompat.EnumTranslator ( type ) ; org.ovirt.engine.ui.uicompat.EnumTranslator.translatorsMap.put ( ( ( java.lang.Class < ? > ) ( type ) ) , translator ) ; } return translator ; }
Source:
private void endRemoveSnapshotSingleDisk ( ) { org.ovirt.engine.core.common.action.VdcReturnValueBase vdcReturnValue = org.ovirt.engine.core.bll.Backend.getInstance ( ) . endAction ( VdcActionType.RemoveSnapshotSingleDisk , buildRemoveSnapshotSingleDiskParameters ( ) , getCommandContext ( ) ) ; enclosingCommand.getReturnValue ( ) . setSucceeded ( vdcReturnValue.getSucceeded ( ) ) ; }

Target:
private void endRemoveSnapshotSingleDisk ( boolean taskGroupSuccess ) { org.ovirt.engine.core.common.action.ImagesContainterParametersBase parameters = buildRemoveSnapshotSingleDiskParameters ( ) ; parameters.setTaskGroupSuccess ( taskGroupSuccess ) ; org.ovirt.engine.core.common.action.VdcReturnValueBase vdcReturnValue = org.ovirt.engine.core.bll.Backend.getInstance ( ) . endAction ( VdcActionType.RemoveSnapshotSingleDisk , parameters , getCommandContext ( ) ) ; enclosingCommand.getReturnValue ( ) . setSucceeded ( vdcReturnValue.getSucceeded ( ) ) ; }
Source:
public void testPositiveCanDoActionWithNoDisks ( ) { setUpGeneralValidations ( ) ; org.mockito.Mockito.doReturn ( org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommandTest.getEmptyDiskList ( ) ) . when ( cmd ) . getDisksList ( ) ; org.junit.Assert.assertTrue ( cmd.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( cmd.getReturnValue ( ) . getCanDoActionMessages ( ) . isEmpty ( ) ) ; }

Target:
public void testPositiveCanDoActionWithNoDisks ( ) { setUpGeneralValidations ( ) ; org.mockito.Mockito.doReturn ( org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommandTest.getEmptyDiskList ( ) ) . when ( cmd ) . getDisksList ( ) ; org.mockito.Mockito.doReturn ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) . when ( cmd ) . getStorageDomainId ( ) ; org.junit.Assert.assertTrue ( cmd.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( cmd.getReturnValue ( ) . getCanDoActionMessages ( ) . isEmpty ( ) ) ; }
Source:
protected void updateVmDeviceAddress ( final java.lang.String address , final org.ovirt.engine.core.common.businessentities.VmDevice vmDevice ) { vmDevice.setAddress ( address ) ; org.ovirt.engine.core.bll.storage.disk.AbstractDiskVmCommand.getCompensationContext ( ) . snapshotEntity ( vmDevice ) ; org.ovirt.engine.core.bll.storage.disk.AbstractDiskVmCommand.getCompensationContext ( ) . stateChanged ( ) ; org.ovirt.engine.core.bll.storage.disk.AbstractDiskVmCommand.getVmDeviceDao ( ) . update ( vmDevice ) ; }

Target:
protected void updateVmDeviceAddress ( final java.lang.String address , final org.ovirt.engine.core.common.businessentities.VmDevice vmDevice ) { vmDevice.setAddress ( address ) ; org.ovirt.engine.core.bll.storage.disk.AbstractDiskVmCommand.getCompensationContext ( ) . snapshotEntity ( vmDevice ) ; org.ovirt.engine.core.bll.storage.disk.AbstractDiskVmCommand.getCompensationContext ( ) . stateChanged ( ) ; vmDeviceDao.update ( vmDevice ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object ReturnValue ) { if ( clientAgentType.isIE8OrBelow ( ) ) { Window.Location.reload ( ) ; } org.ovirt.engine.ui.frontend.Frontend.setLoggedInUser ( null ) ; getLoginModel ( ) . resetAfterLogout ( ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.clearCache ( ) ; connectAutomaticallyManager.resetAlreadyOpened ( ) ; org.ovirt.engine.ui.userportal.system.ApplicationInit.super . onLogout ( ) ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object ReturnValue ) { if ( clientAgentType.isIE8OrBelow ( ) ) { Window.Location.reload ( ) ; } org.ovirt.engine.ui.frontend.Frontend.clearLoggedInUser ( ) ; getLoginModel ( ) . resetAfterLogout ( ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.clearCache ( ) ; connectAutomaticallyManager.resetAlreadyOpened ( ) ; org.ovirt.engine.ui.userportal.system.ApplicationInit.super . onLogout ( ) ; }
Source:
protected void verifyModel ( org.ovirt.engine.api.model.Job model , int index ) { assertEquals ( GUIDS [ index ] . toString ( ) , model.getId ( ) ) ; assertEquals ( DESCRIPTIONS [ index ] , model.getDescription ( ) ) ; assertTrue ( model.isExternal ( ) ) ; assertTrue ( model.isAutoCleared ( ) ) ; verifyLinks ( model ) ; }

Target:
protected void verifyModel ( org.ovirt.engine.api.model.Job model , int index ) { org.junit.Assert.assertEquals ( GUIDS [ index ] . toString ( ) , model.getId ( ) ) ; org.junit.Assert.assertEquals ( DESCRIPTIONS [ index ] , model.getDescription ( ) ) ; org.junit.Assert.assertTrue ( model.isExternal ( ) ) ; org.junit.Assert.assertTrue ( model.isAutoCleared ( ) ) ; verifyLinks ( model ) ; }
Source:
public org.ovirt.engine.api.model.StorageConnection get ( ) { org.ovirt.engine.core.common.businessentities.IscsiBond iscsiBond = parent.getIscsiBond ( ) ; if ( ! ( iscsiBond.getStorageConnectionIds ( ) . contains ( guid.toString ( ) ) ) ) { return notFound ( ) ; } org.ovirt.engine.core.common.businessentities.StorageServerConnections entity = getEntity ( org.ovirt.engine.core.common.businessentities.StorageServerConnections.class , VdcQueryType.GetStorageServerConnectionById , new org.ovirt.engine.core.common.queries.StorageServerConnectionQueryParametersBase ( guid ) , guid.toString ( ) ) ; if ( entity == null ) { return notFound ( ) ; } return addLinks ( map ( entity ) ) ; }

Target:
public org.ovirt.engine.api.model.StorageConnection get ( ) { org.ovirt.engine.core.common.businessentities.IscsiBond iscsiBond = parent.getIscsiBond ( ) ; if ( ! ( iscsiBond.getStorageConnectionIds ( ) . contains ( guid.toString ( ) ) ) ) { return notFound ( ) ; } org.ovirt.engine.core.common.businessentities.StorageServerConnections entity = getEntity ( org.ovirt.engine.core.common.businessentities.StorageServerConnections.class , QueryType.GetStorageServerConnectionById , new org.ovirt.engine.core.common.queries.StorageServerConnectionQueryParametersBase ( guid ) , guid.toString ( ) ) ; if ( entity == null ) { return notFound ( ) ; } return addLinks ( map ( entity ) ) ; }
Source:
public static void getVmListByClusterName ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String clusterName ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > vms = org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VM > cast ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.IVdcQueryable > ) ( source ) ) ) ; return vms ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( ( "Vms: cluster=" + clusterName ) , org.ovirt.engine.core.common.interfaces.SearchType.VM ) , aQuery ) ; }

Target:
public static void getVmConfigurationBySnapshot ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid snapshotSourceId ) { 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.VM ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmConfigurationBySnapshot , new org.ovirt.engine.core.common.queries.IdQueryParameters ( snapshotSourceId ) , aQuery ) ; }
Source:
public org.ovirt.engine.core.common.businessentities.aaa.DbUser getUserById ( org.ovirt.engine.core.compat.Guid userId ) { org.ovirt.engine.core.common.queries.IdQueryParameters queryParameters = new org.ovirt.engine.core.common.queries.IdQueryParameters ( userId ) ; org.ovirt.engine.core.common.queries.QueryReturnValue userQueryResponse = runQuery ( QueryType.GetDbUserByUserId , queryParameters ) ; org.ovirt.engine.core.common.businessentities.aaa.DbUser returnValue = null ; if ( ( userQueryResponse != null ) && ( userQueryResponse.getSucceeded ( ) ) ) { returnValue = userQueryResponse.getReturnValue ( ) ; } return returnValue ; }

Target:
public org.ovirt.engine.core.common.businessentities.aaa.DbUser getUserById ( org.ovirt.engine.core.compat.Guid userId ) { org.ovirt.engine.core.common.queries.IdQueryParameters queryParameters = new org.ovirt.engine.core.common.queries.IdQueryParameters ( userId ) ; org.ovirt.engine.core.common.queries.QueryReturnValue userQueryResponse = runQuery ( QueryType.GetAnyDbUserByUserId , queryParameters ) ; org.ovirt.engine.core.common.businessentities.aaa.DbUser returnValue = null ; if ( ( userQueryResponse != null ) && ( userQueryResponse.getSucceeded ( ) ) ) { returnValue = userQueryResponse.getReturnValue ( ) ; } return returnValue ; }
Source:
protected void executeCallbacks ( boolean success , org.ovirt.engine.ui.uicommonweb.action.UiAction.ActionFlowState flowState , java.util.List < org.ovirt.engine.ui.uicompat.IFrontendActionAsyncCallback > callbacks ) { java.util.Collections.shuffle ( callbacks ) ; for ( org.ovirt.engine.ui.uicompat.IFrontendActionAsyncCallback callback : callbacks ) { assertNotAllDone ( flowState ) ; org.ovirt.engine.core.common.action.VdcReturnValueBase result = new org.ovirt.engine.core.common.action.VdcReturnValueBase ( ) ; result.setValid ( true ) ; result.setSucceeded ( success ) ; callback.executed ( new org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult ( ACTION_TYPE , null , result ) ) ; } }

Target:
protected void executeCallbacks ( boolean success , org.ovirt.engine.ui.uicommonweb.action.UiAction.ActionFlowState flowState , java.util.List < org.ovirt.engine.ui.uicompat.IFrontendActionAsyncCallback > callbacks ) { java.util.Collections.shuffle ( callbacks ) ; for ( org.ovirt.engine.ui.uicompat.IFrontendActionAsyncCallback callback : callbacks ) { assertNotAllDone ( flowState ) ; org.ovirt.engine.core.common.action.ActionReturnValue result = new org.ovirt.engine.core.common.action.ActionReturnValue ( ) ; result.setValid ( true ) ; result.setSucceeded ( success ) ; callback.executed ( new org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult ( ACTION_TYPE , null , result ) ) ; } }
Source:
public void validateFailedDiskInterfaceUnsupported ( ) { mockVmStatusUp ( ) ; createVirtIODisk ( ) ; initStorageDomain ( ) ; org.mockito.Mockito.when ( diskValidator.isDiskInterfaceSupported ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.VM.class ) ) ) . thenReturn ( new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_DISK_INTERFACE_UNSUPPORTED ) ) ; org.mockito.Mockito.when ( command.getDiskValidator ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.storage.Disk.class ) ) ) . thenReturn ( diskValidator ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( command , EngineMessage.ACTION_TYPE_DISK_INTERFACE_UNSUPPORTED ) ; }

Target:
public void validateFailedDiskInterfaceUnsupported ( ) { mockVmStatusUp ( ) ; createVirtIODisk ( ) ; initStorageDomain ( ) ; org.mockito.Mockito.when ( diskValidator.isDiskInterfaceSupported ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.VM.class ) , org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.storage.DiskVmElement.class ) ) ) . thenReturn ( new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_DISK_INTERFACE_UNSUPPORTED ) ) ; org.mockito.Mockito.when ( command.getDiskValidator ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.storage.Disk.class ) ) ) . thenReturn ( diskValidator ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( command , EngineMessage.ACTION_TYPE_DISK_INTERFACE_UNSUPPORTED ) ; }
Source:
private boolean validateCanUpdateReadOnly ( ) { if ( ( ( updateReadOnlyRequested ( ) ) && ( ( org.ovirt.engine.core.bll.UpdateVmDiskCommand.getVm ( ) . getStatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.VMStatus.Down ) ) ) && ( vmDeviceForVm.getIsPlugged ( ) ) ) { return failCanDoAction ( VdcBllMessages.ACTION_TYPE_FAILED_VM_IS_NOT_DOWN ) ; } return true ; }

Target:
protected boolean validateCanUpdateReadOnly ( org.ovirt.engine.core.bll.validator.DiskValidator diskValidator ) { if ( updateReadOnlyRequested ( ) ) { if ( ( ( org.ovirt.engine.core.bll.UpdateVmDiskCommand.getVm ( ) . getStatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.VMStatus.Down ) ) && ( vmDeviceForVm.getIsPlugged ( ) ) ) { return failCanDoAction ( VdcBllMessages.ACTION_TYPE_FAILED_VM_IS_NOT_DOWN ) ; } return validate ( diskValidator.isReadOnlyPropertyCompatibleWithInterface ( ) ) ; } return true ; }
Source:
protected void sendWarningForNonExportableDisks ( org.ovirt.engine.core.common.businessentities.VM entity ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getVmDiskList ( new org.ovirt.engine.ui.frontend.AsyncQuery ( org.ovirt.engine.ui.uicommonweb.models.vms.VmListModel.getWindow ( ) , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { final org.ovirt.engine.ui.uicommonweb.models.vms.ExportVmModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.ExportVmModel ) ( target ) ) ; @ java.lang.SuppressWarnings ( value = "unchecked" ) final java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > vmDisks = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ) ( returnValue ) ) ; org.ovirt.engine.ui.uicommonweb.models.vms.VmModelHelper.sendWarningForNonExportableDisks ( model , vmDisks , VmModelHelper.WarningType.VM_EXPORT ) ; } } ) , entity.getId ( ) ) ; }

Target:
protected void sendWarningForNonExportableDisks ( org.ovirt.engine.core.common.businessentities.VM entity ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getVmDiskList ( new org.ovirt.engine.ui.frontend.AsyncQuery ( org.ovirt.engine.ui.uicommonweb.models.vms.VmListModel.getWindow ( ) , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { final org.ovirt.engine.ui.uicommonweb.models.vms.ExportVmModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.ExportVmModel ) ( target ) ) ; @ java.lang.SuppressWarnings ( value = "unchecked" ) final java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.Disk > vmDisks = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.Disk > ) ( returnValue ) ) ; org.ovirt.engine.ui.uicommonweb.models.vms.VmModelHelper.sendWarningForNonExportableDisks ( model , vmDisks , VmModelHelper.WarningType.VM_EXPORT ) ; } } ) , entity.getId ( ) ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.VdsNetworkInterface createNicOnNetwork ( java.lang.String nicName , org.ovirt.engine.core.common.businessentities.Network network ) { org.ovirt.engine.core.common.businessentities.VdsNetworkInterface nic = createVdsInterface ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) , nicName , false , null , network.getvlan_id ( ) , network.getName ( ) , network.isVmNetwork ( ) ) ; return nic ; }

Target:
private org.ovirt.engine.core.common.businessentities.VdsNetworkInterface createNicSyncedWithNetwork ( java.lang.String nicName , org.ovirt.engine.core.common.businessentities.Network network ) { org.ovirt.engine.core.common.businessentities.VdsNetworkInterface nic = createVdsInterface ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) , nicName , false , null , network.getvlan_id ( ) , network.getName ( ) , network.isVmNetwork ( ) ) ; return nic ; }
Source:
public void getRoleList ( 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.Role > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Role > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllRoles , new org.ovirt.engine.core.common.queries.MultilevelAdministrationsQueriesParameters ( ) , aQuery ) ; }

Target:
public void getAAAProfilesEntriesList ( 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.Collection < org.ovirt.engine.core.aaa.ProfileEntry > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.aaa.ProfileEntry > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAAAProfileList , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc glusterVolumeBrickAdd ( java.lang.String volumeName , java.lang.String [ ] bricks , int replicaCount , int stripeCount ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.glusterVolumeBrickAdd ( volumeName , bricks , replicaCount , stripeCount ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc add_image_ticket ( java.lang.String ticketId , java.lang.String [ ] ops , long timeout , long size , java.lang.String url ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.add_image_ticket ( ticketId , ops , timeout , size , url ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
public void 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 RunAction: " + caught ) , caught ) ; org.ovirt.engine.ui.frontend.Frontend.failureEventHandler ( caught ) ; org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult f = new org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult ( actionType , parameters , null , state ) ; callback.executed ( f ) ; }

Target:
public void onFailure ( 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 logoff: " + caught ) , caught ) ; getEventsHandler ( ) . runQueryFailed ( null ) ; failureEventHandler ( caught ) ; callback.getDel ( ) . onSuccess ( callback.getModel ( ) , null ) ; }
Source:
protected boolean canAddVm ( ) { boolean exists = ( ( java.lang.Boolean ) ( getBackend ( ) . runInternalQuery ( VdcQueryType.IsVmWithSameNameExist , new org.ovirt.engine.core.common.queries.IsVmWithSameNameExistParameters ( getVm ( ) . getvm_name ( ) ) ) . getReturnValue ( ) ) ) ; if ( exists ) { addCanDoActionMessage ( VdcBllMessages.VM_CANNOT_IMPORT_VM_NAME_EXISTS ) ; } return ! exists ; }

Target:
protected boolean canAddVm ( ) { boolean exists = ( ( java.lang.Boolean ) ( getBackend ( ) . runInternalQuery ( VdcQueryType.IsVmWithSameNameExist , new org.ovirt.engine.core.common.queries.IsVmWithSameNameExistParameters ( getVm ( ) . getVmName ( ) ) ) . getReturnValue ( ) ) ) ; if ( exists ) { addCanDoActionMessage ( VdcBllMessages.VM_CANNOT_IMPORT_VM_NAME_EXISTS ) ; } return ! exists ; }
Source:
public void validateDiskIsLocked ( ) { initializeCommand ( new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ) ; initVmDiskImage ( false ) ; mockGetVmsListForDisk ( ) ; command.getImage ( ) . setImageStatus ( ImageStatus.LOCKED ) ; org.junit.Assert.assertFalse ( command.validate ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getValidationMessages ( ) . contains ( EngineMessage.ACTION_TYPE_FAILED_DISKS_LOCKED.toString ( ) ) ) ; }

Target:
public void validateTemplateImageIsLocked ( ) { initializeCommand ( new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ) ; command.getParameters ( ) . setOperation ( ImageOperation.Copy ) ; command.init ( ) ; initTemplateDiskImage ( ) ; command.getImage ( ) . setImageStatus ( ImageStatus.LOCKED ) ; org.mockito.Mockito.doReturn ( new org.ovirt.engine.core.common.businessentities.VmTemplate ( ) ) . when ( command ) . getTemplateForImage ( ) ; command.init ( ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( command , EngineMessage.VM_TEMPLATE_IMAGE_IS_LOCKED ) ; }
Source:
private java.util.concurrent.Future < java.lang.Void > scheduleClose ( final java.lang.String message ) { final java.util.concurrent.Callable < java.lang.Void > disconnectCallable = new java.util.concurrent.Callable < java.lang.Void > ( ) { @ java.lang.Override public java.lang.Void call ( ) { disconnect ( message ) ; return null ; } } ; return scheduleTask ( disconnectCallable ) ; }

Target:
private java.util.concurrent.Future < java.lang.Void > scheduleClose ( final java.lang.String message ) { this . closing.set ( true ) ; final java.util.concurrent.Callable < java.lang.Void > disconnectCallable = new java.util.concurrent.Callable < java.lang.Void > ( ) { @ java.lang.Override public java.lang.Void call ( ) { disconnect ( message ) ; return null ; } } ; return scheduleTask ( disconnectCallable ) ; }
Source:
public org.ovirt.engine.core.common.businessentities.VdcOption mapRow ( java.sql.ResultSet rs , int rowNum ) throws java.sql.SQLException { org.ovirt.engine.core.common.businessentities.VdcOption entity = new org.ovirt.engine.core.common.businessentities.VdcOption ( ) ; entity.setoption_name ( rs.getString ( "option_name" ) ) ; entity.setoption_value ( rs.getString ( "option_value" ) ) ; entity.setoption_id ( rs.getInt ( "option_id" ) ) ; entity.setversion ( rs.getString ( "version" ) ) ; return entity ; }

Target:
public org.ovirt.engine.core.common.businessentities.VdcOption mapRow ( java.sql.ResultSet rs , int rowNum ) throws java.sql.SQLException { org.ovirt.engine.core.common.businessentities.VdcOption entity = new org.ovirt.engine.core.common.businessentities.VdcOption ( ) ; entity.setOptionName ( rs.getString ( "option_name" ) ) ; entity.setOptionValue ( rs.getString ( "option_value" ) ) ; entity.setOptionId ( rs.getInt ( "option_id" ) ) ; entity.setVersion ( rs.getString ( "version" ) ) ; return entity ; }
Source:
public static void getoVirtISOsList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? new java.util.ArrayList < org.ovirt.engine.core.compat.RpmVersion > ( ( ( java.util.ArrayList < org.ovirt.engine.core.compat.RpmVersion > ) ( source ) ) ) : new java.util.ArrayList < org.ovirt.engine.core.compat.RpmVersion > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetoVirtISOs , new org.ovirt.engine.core.common.queries.VdsIdParametersBase ( id ) , aQuery ) ; }

Target:
public static void getVmNicList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ) ( source ) ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmInterfacesByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
public void getAllTemplatesFromExportDomain ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.compat.Guid storageDomainId ) { 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.HashMap < org.ovirt.engine.core.common.businessentities.VmTemplate , java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetAllFromExportDomainQueryParameters getAllFromExportDomainQueryParamenters = new org.ovirt.engine.core.common.queries.GetAllFromExportDomainQueryParameters ( storagePoolId , storageDomainId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetTemplatesFromExportDomain , getAllFromExportDomainQueryParamenters , aQuery ) ; }

Target:
public void getLunsByVgId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String vgId , org.ovirt.engine.core.compat.Guid vdsId ) { 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.LUNs > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.LUNs > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetLunsByVgIdParameters params = new org.ovirt.engine.core.common.queries.GetLunsByVgIdParameters ( vgId , vdsId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetLunsByVgId , params , aQuery ) ; }
Source:
public void getTemplateById ( 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 ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmTemplate , new org.ovirt.engine.core.common.queries.GetVmTemplateParameters ( templateId ) , aQuery ) ; }

Target:
public void getDataCenterById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStoragePoolById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) . withoutRefresh ( ) , aQuery ) ; }
Source:
protected void verifyResponse ( javax.ws.rs.core.Response response ) { org.ovirt.engine.api.restapi.resource.BackendApiResourceTest.assertEquals ( 200 , response.getStatus ( ) ) ; assertTrue ( ( ( response.getEntity ( ) ) instanceof org.ovirt.engine.api.model.API ) ) ; verifyApi ( ( ( org.ovirt.engine.api.model.API ) ( response.getEntity ( ) ) ) ) ; }

Target:
protected void verifyResponse ( javax.ws.rs.core.Response response ) { org.junit.Assert.assertEquals ( 200 , response.getStatus ( ) ) ; org.junit.Assert.assertTrue ( ( ( response.getEntity ( ) ) instanceof org.ovirt.engine.api.model.API ) ) ; verifyApi ( ( ( org.ovirt.engine.api.model.API ) ( response.getEntity ( ) ) ) ) ; }
Source:
protected boolean canDoAction ( ) { boolean returnValue = super . canDoAction ( ) ; org.ovirt.engine.core.common.businessentities.vm_pools oldPool = org.ovirt.engine.core.bll.UpdateVmPoolWithVmsCommand.getVmPoolDAO ( ) . get ( org.ovirt.engine.core.bll.UpdateVmPoolWithVmsCommand.getVmPool ( ) . getvm_pool_id ( ) ) ; if ( returnValue && ( oldPool == null ) ) { addCanDoActionMessage ( VdcBllMessages.VM_POOL_CANNOT_UPDATE_POOL_NOT_FOUND ) ; returnValue = false ; } else if ( returnValue && ( ( org.ovirt.engine.core.bll.UpdateVmPoolWithVmsCommand.getParameters ( ) . getVmsCount ( ) ) < 0 ) ) { addCanDoActionMessage ( VdcBllMessages.VM_POOL_CANNOT_DECREASE_VMS_FROM_POOL ) ; returnValue = false ; } return returnValue ; }

Target:
protected boolean canDoAction ( ) { boolean returnValue = super . canDoAction ( ) ; oldPool = org.ovirt.engine.core.bll.UpdateVmPoolWithVmsCommand.getVmPoolDAO ( ) . get ( org.ovirt.engine.core.bll.UpdateVmPoolWithVmsCommand.getVmPool ( ) . getVmPoolId ( ) ) ; if ( returnValue && ( ( oldPool ) == null ) ) { addCanDoActionMessage ( VdcBllMessages.VM_POOL_CANNOT_UPDATE_POOL_NOT_FOUND ) ; returnValue = false ; } else if ( returnValue && ( ( org.ovirt.engine.core.bll.UpdateVmPoolWithVmsCommand.getParameters ( ) . getVmsCount ( ) ) < 0 ) ) { addCanDoActionMessage ( VdcBllMessages.VM_POOL_CANNOT_DECREASE_VMS_FROM_POOL ) ; returnValue = false ; } return returnValue ; }
Source:
public 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.getInstance ( ) . runQuery ( VdcQueryType.GetAllServerCpuList , new org.ovirt.engine.core.common.queries.GetAllServerCpuListParameters ( version ) , aQuery ) ; }

Target:
public void getClusterDesktopMemoryOverCommit ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) : 0 ; } } ; getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.MaxVdsMemOverCommit , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }