auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void getClusterFeaturesByClusterId ( 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 ? ( ( java.util.Set < org.ovirt.engine.core.common.businessentities.SupportedAdditionalClusterFeature > ) ( source ) ) : new java.util.HashSet < org.ovirt.engine.core.common.businessentities.SupportedAdditionalClusterFeature > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetClusterFeaturesByClusterId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( clusterId ) , aQuery ) ; }

Target:
public void getCinderVolumeTypesList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storageDomainId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter < java.util.List < org.ovirt.engine.core.common.businessentities.storage.CinderVolumeType > > ( ) { @ java.lang.Override public java.util.List < org.ovirt.engine.core.common.businessentities.storage.CinderVolumeType > Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return ( ( java.util.List < org.ovirt.engine.core.common.businessentities.storage.CinderVolumeType > ) ( source ) ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetCinderVolumeTypesByStorageDomainId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( storageDomainId ) , aQuery ) ; }
Source:
public org.ovirt.engine.core.common.businessentities.StorageServerConnections findConnectionWithSameDetails ( org.ovirt.engine.core.common.businessentities.StorageServerConnections connection ) { java.util.List < org.ovirt.engine.core.common.businessentities.StorageServerConnections > connections = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStorageServerConnectionDao ( ) . getAllForConnection ( connection ) ; for ( org.ovirt.engine.core.common.businessentities.StorageServerConnections dbConnection : connections ) { if ( java.util.Objects.equals ( dbConnection.getPassword ( ) , connection.getPassword ( ) ) ) { return dbConnection ; } } return null ; }

Target:
public org.ovirt.engine.core.common.businessentities.StorageServerConnections findConnectionWithSameDetails ( org.ovirt.engine.core.common.businessentities.StorageServerConnections connection ) { java.util.List < org.ovirt.engine.core.common.businessentities.StorageServerConnections > connections = storageServerConnectionDao.getAllForConnection ( connection ) ; for ( org.ovirt.engine.core.common.businessentities.StorageServerConnections dbConnection : connections ) { if ( java.util.Objects.equals ( dbConnection.getPassword ( ) , connection.getPassword ( ) ) ) { return dbConnection ; } } return null ; }
Source:
public void validateSlaveHasNoLabelsHasOldLabel ( ) { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface slave = createNic ( "slave" ) ; slave.setLabels ( java.util.Collections.singleton ( "lbl1" ) ) ; org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidator validator = new org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidatorTest.HostSetupNetworksValidatorBuilder ( ) . setParams ( new org.ovirt.engine.core.common.action.HostSetupNetworksParameters ( host.getId ( ) ) ) . setExistingInterfaces ( java.util.Arrays.asList ( slave ) ) . setHost ( host ) . build ( ) ; assertValidateSlaveHasNoLabelsFailed ( validator , slave.getName ( ) ) ; }

Target:
public void validateSlaveHasNoLabelsHasOldLabel ( ) { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface slave = createNic ( "slave" ) ; slave.setLabels ( java.util.Collections.singleton ( "lbl1" ) ) ; org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidator validator = new org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidatorTest.HostSetupNetworksValidatorBuilder ( ) . setParams ( new org.ovirt.engine.core.common.action.HostSetupNetworksParameters ( host.getId ( ) ) ) . setExistingInterfaces ( java.util.Collections.singletonList ( slave ) ) . setHost ( host ) . build ( ) ; assertValidateSlaveHasNoLabelsFailed ( validator , slave.getName ( ) ) ; }
Source:
public void testRemove ( ) throws java.lang.Exception { setUriInfo ( setUpActionExpectations ( VdcActionType.GlusterVolumeRemoveBricks , org.ovirt.engine.core.common.action.gluster.GlusterVolumeRemoveBricksParameters.class , new java.lang.String [ ] { "VolumeId" , "Bricks" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.gluster.BackendGlusterBricksResourceTest.volumeId , getBricksToRemove ( ) } , true , true ) ) ; verifyRemove ( collection.remove ( GUIDS [ 0 ] . toString ( ) ) ) ; }

Target:
public void testRemove ( ) throws java.lang.Exception { setUriInfo ( setUpActionExpectations ( VdcActionType.GlusterVolumeRemoveBricks , org.ovirt.engine.core.common.action.gluster.GlusterVolumeRemoveBricksParameters.class , new java.lang.String [ ] { "VolumeId" , "Bricks" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.gluster.GlusterTestHelper.volumeId , getBricksToRemove ( ) } , true , true ) ) ; verifyRemove ( collection.remove ( GUIDS [ 0 ] . toString ( ) ) ) ; }
Source:
private org.ovirt.engine.core.bll.provider.network.NetworkProviderProxy getProviderProxy ( ) { if ( ( providerProxy ) == null ) { org.ovirt.engine.core.common.businessentities.Provider < ? > provider = providerDao.get ( getNetwork ( ) . getProvidedBy ( ) . getProviderId ( ) ) ; providerProxy = providerProxyFactory.create ( provider ) ; } return providerProxy ; }

Target:
private org.ovirt.engine.core.bll.provider.network.NetworkProviderProxy getProviderProxy ( ) { if ( ( providerProxy ) == null ) { org.ovirt.engine.core.common.businessentities.Provider < ? > provider = getProvider ( ) ; providerProxy = providerProxyFactory.create ( provider ) ; } return providerProxy ; }
Source:
public void ExecuteCommand ( org.ovirt.engine.ui.uicommonweb.UICommand command ) { super . ExecuteCommand ( command ) ; if ( command == ( getNewCommand ( ) ) ) { newNetwork ( ) ; } else if ( command == ( getEditCommand ( ) ) ) { edit ( ) ; } else if ( command == ( getRemoveCommand ( ) ) ) { remove ( ) ; } }

Target:
public void executeCommand ( org.ovirt.engine.ui.uicommonweb.UICommand command ) { super . executeCommand ( command ) ; if ( command == ( getNewCommand ( ) ) ) { newNetwork ( ) ; } else if ( command == ( getEditCommand ( ) ) ) { edit ( ) ; } else if ( command == ( getRemoveCommand ( ) ) ) { remove ( ) ; } }
Source:
public void OnSuccess ( java.lang.Object model1 , java.lang.Object result ) { org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterModel clusterModel = ( ( org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterModel ) ( model1 ) ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > vmList = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > ) ( result ) ) ; if ( ( vmList.size ( ) ) > 0 ) { clusterModel.getEnableOvirtService ( ) . setIsChangable ( false ) ; } else { clusterModel.getEnableOvirtService ( ) . setIsChangable ( true ) ; } }

Target:
public void OnSuccess ( java.lang.Object model1 , java.lang.Object result ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > vmList = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > ) ( result ) ) ; if ( ( vmList.size ( ) ) > 0 ) { clusterModel.getEnableOvirtService ( ) . setIsChangable ( false ) ; if ( ! isVirtGlusterAllowed ) { clusterModel.getEnableGlusterService ( ) . setIsChangable ( false ) ; } } }
Source:
private static java.util.List < java.lang.String > getVersionsList ( ) { java.util.List < java.lang.String > versions = new java.util.ArrayList < > ( ) ; versions.add ( ConfigCommon.defaultConfigurationVersion ) ; for ( org.ovirt.engine.core.compat.Version version : org.ovirt.engine.core.compat.Version.ALL ) { versions.add ( version.toString ( ) ) ; } return versions ; }

Target:
private static java.util.List < java.lang.String > getVersionsList ( ) { return java.util.stream.Stream.concat ( java.util.stream.Stream.of ( ConfigCommon.defaultConfigurationVersion ) , Version.ALL.stream ( ) . map ( java.lang.Object :: toString ) ) . collect ( java.util.stream.Collectors.toList ( ) ) ; }
Source:
public org.ovirt.engine.core.common.utils.VmDeviceType getType ( ) { return this . type ; }

Target:
public int hashCode ( ) { final int prime = 31 ; int result = 1 ; result = ( prime * result ) + ( super . hashCode ( ) ) ; result = ( prime * result ) + ( ( volumeId ) == null ? 0 : volumeId.hashCode ( ) ) ; result = ( prime * result ) + ( ( files ) == null ? 0 : files.hashCode ( ) ) ; return result ; }
Source:
public void getVmsFromExternalServer ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId , org.ovirt.engine.core.compat.Guid vdsId , java.lang.String url , java.lang.String username , java.lang.String password ) { 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.GetVmsFromExternalProvider , new org.ovirt.engine.core.common.queries.GetVmsFromExternalProviderQueryParameters ( url , username , password , vdsId , dataCenterId ) , aQuery ) ; }

Target:
public void getVmSnapshotList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllVmSnapshotsByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
public static boolean isPrestartedVmForAssignment ( org.ovirt.engine.core.compat.Guid vm_guid ) { org.ovirt.engine.core.common.businessentities.VmDynamic vmDynamic = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmDynamicDAO ( ) . get ( vm_guid ) ; if ( ( ( vmDynamic != null ) && ( ( vmDynamic.getstatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.Up ) ) ) && ( org.ovirt.engine.core.bll.VmPoolCommandBase.CanAttachPrestartedVmToUser ( vm_guid ) ) ) { return true ; } else { return false ; } }

Target:
public static boolean isPrestartedVmForAssignment ( org.ovirt.engine.core.compat.Guid vm_guid ) { org.ovirt.engine.core.common.businessentities.VmDynamic vmDynamic = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmDynamicDao ( ) . get ( vm_guid ) ; if ( ( ( vmDynamic != null ) && ( ( vmDynamic.getstatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.Up ) ) ) && ( org.ovirt.engine.core.bll.VmPoolCommandBase.canAttachPrestartedVmToUser ( vm_guid ) ) ) { return true ; } else { return false ; } }
Source:
public static java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmOsType > Get64bitOsTypes ( ) { if ( ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.x64OsTypes ) != null ) { return org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.x64OsTypes ; } org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.x64OsTypes = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmOsType > ( java.util.Arrays.asList ( new org.ovirt.engine.core.common.businessentities.VmOsType [ ] { org.ovirt.engine.core.common.businessentities.VmOsType.RHEL3x64 , org.ovirt.engine.core.common.businessentities.VmOsType.RHEL4x64 , org.ovirt.engine.core.common.businessentities.VmOsType.RHEL5x64 , org.ovirt.engine.core.common.businessentities.VmOsType.RHEL6x64 , org.ovirt.engine.core.common.businessentities.VmOsType.Windows2003x64 , org.ovirt.engine.core.common.businessentities.VmOsType.Windows2008R2x64 , org.ovirt.engine.core.common.businessentities.VmOsType.Windows2008x64 , org.ovirt.engine.core.common.businessentities.VmOsType.Windows7x64 } ) ) ; return org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.x64OsTypes ; }

Target:
public static void initOsNames ( ) { org.ovirt.engine.ui.frontend.AsyncQuery callback = new org.ovirt.engine.ui.frontend.AsyncQuery ( ) ; callback.asyncCallback = new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.osNames = ( ( java.util.HashMap < java.lang.Integer , java.lang.String > ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ) ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.initOsIds ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.OsRepository , new org.ovirt.engine.core.common.queries.OsQueryParameters ( org.ovirt.engine.core.common.queries.OsQueryParameters.OsRepositoryVerb.GetOsNames ) , callback ) ; }
Source:
protected void updateMoveOrCopySingleDiskParameters ( java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > parameters , org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel diskModel ) { org.ovirt.engine.core.common.businessentities.storage_domains selectedStorageDomain = ( ( org.ovirt.engine.core.common.businessentities.storage_domains ) ( diskModel.getStorageDomain ( ) . getSelectedItem ( ) ) ) ; addMoveOrCopyParameters ( parameters , Guid.Empty , selectedStorageDomain.getId ( ) , ( ( org.ovirt.engine.core.common.businessentities.DiskImage ) ( diskModel.getDisk ( ) ) ) ) ; }

Target:
protected java.lang.String getNoActiveTargetDomainMessage ( ) { return constants.noActiveTargetStorageDomainAvailableMsg ( ) ; }
Source:
public void render ( org.ovirt.engine.ui.common.widget.table.column.Context context , com.google.gwt.safehtml.shared.SafeHtml value , com.google.gwt.safehtml.shared.SafeHtmlBuilder sb ) { java.lang.String rawData = ( value != null ) ? value.asString ( ) : "" ; sb.append ( org.ovirt.engine.ui.common.widget.table.column.TextCellWithTooltip.template.textContainer ( org.ovirt.engine.ui.common.utils.ElementIdUtils.createTableCellElementId ( elementIdPrefix , columnId , context ) , getRenderedValue ( rawData ) ) ) ; }

Target:
public void render ( org.ovirt.engine.ui.common.widget.table.column.Context context , java.lang.String value , com.google.gwt.safehtml.shared.SafeHtmlBuilder sb ) { if ( value != null ) { com.google.gwt.safehtml.shared.SafeHtml escapedValue = getEscapedValue ( value ) ; com.google.gwt.safehtml.shared.SafeHtml renderedValue = getRenderedValue ( escapedValue ) ; sb.append ( org.ovirt.engine.ui.common.widget.table.column.TextCellWithTooltip.template.textContainer ( org.ovirt.engine.ui.common.utils.ElementIdUtils.createTableCellElementId ( elementIdPrefix , columnId , context ) , renderedValue ) ) ; } }
Source:
public org.ovirt.engine.ui.common.presenter.AbstractModelBoundPopupPresenterWidget < ? extends org.ovirt.engine.ui.uicommonweb.models.Model , ? > getModelPopup ( org.ovirt.engine.ui.uicommonweb.models.providers.ProviderListModel source , org.ovirt.engine.ui.uicommonweb.UICommand lastExecutedCommand , org.ovirt.engine.ui.uicommonweb.models.Model windowModel ) { if ( lastExecutedCommand == ( getModel ( ) . getAddCommand ( ) ) ) { return providerPopupProvider.get ( ) ; } else { return super . getModelPopup ( source , lastExecutedCommand , windowModel ) ; } }

Target:
public org.ovirt.engine.ui.common.presenter.AbstractModelBoundPopupPresenterWidget < ? extends org.ovirt.engine.ui.uicommonweb.models.Model , ? > getModelPopup ( org.ovirt.engine.ui.uicommonweb.models.providers.ProviderListModel source , org.ovirt.engine.ui.uicommonweb.UICommand lastExecutedCommand , org.ovirt.engine.ui.uicommonweb.models.Model windowModel ) { if ( ( lastExecutedCommand == ( getModel ( ) . getAddCommand ( ) ) ) || ( lastExecutedCommand == ( getModel ( ) . getEditCommand ( ) ) ) ) { return providerPopupProvider.get ( ) ; } else { return super . getModelPopup ( source , lastExecutedCommand , windowModel ) ; } }
Source:
public org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeGeoRepStatusForXmlRpc glusterVolumeGeoRepStatus ( java.lang.String volumeName , java.lang.String slaveHost , java.lang.String slaveVolumeName ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "GlusterVolume.geoRepStatus" ) . withParameter ( "volName" , volumeName ) . withParameter ( "remoteHost" , slaveHost ) . withParameter ( "remoteVolName" , slaveVolumeName ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) . withIgnoreResponseKey ( ) ; return new org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeGeoRepStatusForXmlRpc ( response ) ; }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc glusterVolumeGeoRepConfigReset ( java.lang.String volumeName , java.lang.String slaveHost , java.lang.String slaveVolumeName , java.lang.String configKey , java.lang.String userName ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "GlusterVolume.geoRepConfigReset" ) . withParameter ( "volumeName" , volumeName ) . withParameter ( "remoteHost" , slaveHost ) . withParameter ( "remoteVolumeName" , slaveVolumeName ) . withParameter ( "optionName" , configKey ) . withOptionalParameter ( "remoteUserName" , userName ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( response ) ; }
Source:
private void changeIsAttached ( org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterNetworkManageModel clusterNetworkManageModel , java.lang.Boolean value ) { clusterNetworkManageModel.setAttached ( value ) ; if ( ( ! value ) && ( clusterNetworkManageModel.isDisplayNetwork ( ) ) ) { clusterNetworkManageModel.setDisplayNetwork ( false ) ; } }

Target:
private void changeIsAttached ( org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterNetworkManageModel clusterNetworkManageModel , java.lang.Boolean value ) { clusterNetworkManageModel.setAttached ( value ) ; if ( ( ! value ) && ( clusterNetworkManageModel.isDisplayNetwork ( ) ) ) { clusterNetworkManageModel.setDisplayNetwork ( false ) ; } if ( ( ! value ) && ( clusterNetworkManageModel.isRequired ( ) ) ) { clusterNetworkManageModel.setRequired ( false ) ; } }
Source:
public void getManagementNetworkName ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.ManagementNetwork , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public boolean supportedForUnitVmModel ( org.ovirt.engine.core.common.queries.ConfigurationValues feature , org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel model ) { if ( ( ( model.getSelectedCluster ( ) ) == null ) || ( ( model.getSelectedCluster ( ) . getCompatibilityVersion ( ) ) == null ) ) { return false ; } java.lang.String version = model.getSelectedCluster ( ) . getCompatibilityVersion ( ) . getValue ( ) ; return ( ( java.lang.Boolean ) ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getConfigValuePreConverted ( feature , version ) ) ) ; }
Source:
public java.util.List < org.ovirt.engine.core.common.businessentities.VDS > getAllForVdsGroup ( org.ovirt.engine.core.compat.Guid vdsGroupID , org.ovirt.engine.core.compat.Guid userID , boolean isFiltered ) { java.util.List < org.ovirt.engine.core.common.businessentities.VDS > vdsList = getCallsHandler ( ) . executeReadList ( "GetVdsByVdsGroupId" , org.ovirt.engine.core.dao.VdsDaoImpl.VdsRowMapper.instance , getCustomMapSqlParameterSource ( ) . addValue ( "vds_group_id" , vdsGroupID ) . addValue ( "user_id" , userID ) . addValue ( "is_filtered" , isFiltered ) ) ; return uniteAgents ( vdsList ) ; }

Target:
public java.util.List < org.ovirt.engine.core.common.businessentities.VDS > getAllForCluster ( org.ovirt.engine.core.compat.Guid cluster , org.ovirt.engine.core.compat.Guid userID , boolean isFiltered ) { java.util.List < org.ovirt.engine.core.common.businessentities.VDS > vdsList = getCallsHandler ( ) . executeReadList ( "GetVdsByClusterId" , org.ovirt.engine.core.dao.VdsDaoImpl.VdsRowMapper.instance , getCustomMapSqlParameterSource ( ) . addValue ( "cluster_id" , cluster ) . addValue ( "user_id" , userID ) . addValue ( "is_filtered" , isFiltered ) ) ; return uniteAgents ( vdsList ) ; }
Source:
protected void endActionOnAllImageGroups ( ) { for ( org.ovirt.engine.core.common.action.VdcActionParametersBase p : getParameters ( ) . getImagesParameters ( ) ) { p.setTaskGroupSuccess ( getParameters ( ) . getTaskGroupSuccess ( ) ) ; getBackend ( ) . endAction ( getImagesActionType ( ) , p ) ; } }

Target:
protected void endActionOnAllImageGroups ( ) { for ( org.ovirt.engine.core.common.action.VdcActionParametersBase p : getParameters ( ) . getImagesParameters ( ) ) { p.setTaskGroupSuccess ( getParameters ( ) . getTaskGroupSuccess ( ) ) ; getBackend ( ) . endAction ( getImagesActionType ( ) , p , getContext ( ) . clone ( ) . withoutCompensationContext ( ) . withoutExecutionContext ( ) . withoutLock ( ) ) ; } }
Source:
public void getUnusedBricksFromServer ( org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery , org.ovirt.engine.core.compat.Guid hostId ) { asyncQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.core.common.queries.IdQueryParameters parameters = new org.ovirt.engine.core.common.queries.IdQueryParameters ( hostId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetUnusedGlusterBricks , parameters , asyncQuery ) ; }

Target:
public void getStorageDevices ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hostId ) { 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.GetGlusterStorageDevices , new org.ovirt.engine.core.common.queries.IdQueryParameters ( hostId ) , aQuery ) ; }
Source:
private void InitSpmPriorities1 ( ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetDefaultSpmPriority ( 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 ) { org.ovirt.engine.ui.uicommonweb.models.hosts.HostModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.hosts.HostModel ) ( target ) ) ; model.defaultSpmPriority = ( ( java.lang.Integer ) ( returnValue ) ) ; if ( ( postponedSpmPriority ) != null ) { UpdateSpmPriority ( postponedSpmPriority ) ; } spmInitialized = true ; } } ) ) ; }

Target:
private void initSpmPriorities1 ( ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultSpmPriority ( 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 ) { org.ovirt.engine.ui.uicommonweb.models.hosts.HostModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.hosts.HostModel ) ( target ) ) ; model.defaultSpmPriority = ( ( java.lang.Integer ) ( returnValue ) ) ; if ( ( postponedSpmPriority ) != null ) { updateSpmPriority ( postponedSpmPriority ) ; } spmInitialized = true ; } } ) ) ; }
Source:
protected void executeCommand ( ) { org.ovirt.engine.core.common.vdscommands.ReduceStorageDomainVDSCommandParameters p = new org.ovirt.engine.core.common.vdscommands.ReduceStorageDomainVDSCommandParameters ( org.ovirt.engine.core.bll.storage.domain.ReduceStorageDomainCommand.getParameters ( ) . getStorageJobId ( ) , org.ovirt.engine.core.bll.storage.domain.ReduceStorageDomainCommand.getParameters ( ) . getStorageDomainId ( ) , org.ovirt.engine.core.bll.storage.domain.ReduceStorageDomainCommand.getParameters ( ) . getDeviceId ( ) ) ; p.setVdsId ( org.ovirt.engine.core.bll.storage.domain.ReduceStorageDomainCommand.getParameters ( ) . getVdsRunningOn ( ) ) ; org.ovirt.engine.core.bll.storage.utils.VdsCommandsHelper.runVdsCommandWithoutFailover ( VDSCommandType.ReduceStorageDomain , p , org.ovirt.engine.core.bll.storage.domain.ReduceStorageDomainCommand.getParameters ( ) . getStoragePoolId ( ) , this ) ; org.ovirt.engine.core.bll.storage.domain.ReduceStorageDomainCommand.setSucceeded ( true ) ; }

Target:
protected void executeCommand ( ) { org.ovirt.engine.core.common.vdscommands.ReduceStorageDomainVDSCommandParameters p = new org.ovirt.engine.core.common.vdscommands.ReduceStorageDomainVDSCommandParameters ( org.ovirt.engine.core.bll.storage.domain.ReduceStorageDomainCommand.getParameters ( ) . getStorageJobId ( ) , org.ovirt.engine.core.bll.storage.domain.ReduceStorageDomainCommand.getParameters ( ) . getStorageDomainId ( ) , org.ovirt.engine.core.bll.storage.domain.ReduceStorageDomainCommand.getParameters ( ) . getDeviceId ( ) ) ; p.setVdsId ( org.ovirt.engine.core.bll.storage.domain.ReduceStorageDomainCommand.getParameters ( ) . getVdsRunningOn ( ) ) ; vdsCommandsHelper.runVdsCommandWithoutFailover ( VDSCommandType.ReduceStorageDomain , p , org.ovirt.engine.core.bll.storage.domain.ReduceStorageDomainCommand.getParameters ( ) . getStoragePoolId ( ) , this ) ; org.ovirt.engine.core.bll.storage.domain.ReduceStorageDomainCommand.setSucceeded ( true ) ; }
Source:
public void canDoActionFailure ( ) { org.mockito.Mockito.when ( validator.isConnectionExists ( ) ) . thenReturn ( ValidationResult.VALID ) ; org.mockito.Mockito.when ( validator.isConnectionForISCSIDomainAttached ( domain ) ) . thenReturn ( java.lang.Boolean.FALSE ) ; org.mockito.Mockito.when ( validator.isISCSIConnectionAndDomain ( domain ) ) . thenReturn ( ValidationResult.VALID ) ; org.mockito.Mockito.when ( validator.isDomainOfConnectionExistsAndInactive ( domain ) ) . thenReturn ( ValidationResult.VALID ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( command , EngineMessage.ACTION_TYPE_FAILED_STORAGE_CONNECTION_FOR_DOMAIN_NOT_EXIST ) ; }

Target:
public void validateFailure ( ) { org.mockito.Mockito.when ( validator.isConnectionExists ( ) ) . thenReturn ( ValidationResult.VALID ) ; org.mockito.Mockito.when ( validator.isConnectionForISCSIDomainAttached ( domain ) ) . thenReturn ( java.lang.Boolean.FALSE ) ; org.mockito.Mockito.when ( validator.isISCSIConnectionAndDomain ( domain ) ) . thenReturn ( ValidationResult.VALID ) ; org.mockito.Mockito.when ( validator.isDomainOfConnectionExistsAndInactive ( domain ) ) . thenReturn ( ValidationResult.VALID ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( command , EngineMessage.ACTION_TYPE_FAILED_STORAGE_CONNECTION_FOR_DOMAIN_NOT_EXIST ) ; }
Source:
private org.ovirt.engine.core.common.action.VdcReturnValueBase executeCommand ( final org.ovirt.engine.core.bll.CommandBase < ? > command , final org.ovirt.engine.core.bll.context.CommandContext cmdContext ) { org.ovirt.engine.core.bll.tasks.interfaces.CommandCallBack callBack = command.getCallBack ( ) ; org.ovirt.engine.core.common.action.VdcReturnValueBase result = org.ovirt.engine.core.bll.utils.BackendUtils.getBackendCommandObjectsHandler ( org.ovirt.engine.core.bll.tasks.CommandExecutor.log ) . runAction ( command , null ) ; updateCommand ( command , result ) ; if ( callBack != null ) { callBack.executed ( result ) ; } return result ; }

Target:
private org.ovirt.engine.core.common.action.VdcReturnValueBase executeCommand ( final org.ovirt.engine.core.bll.CommandBase < ? > command , final org.ovirt.engine.core.bll.context.CommandContext cmdContext ) { org.ovirt.engine.core.bll.tasks.interfaces.CommandCallback callback = command.getCallback ( ) ; org.ovirt.engine.core.common.action.VdcReturnValueBase result = org.ovirt.engine.core.bll.utils.BackendUtils.getBackendCommandObjectsHandler ( org.ovirt.engine.core.bll.tasks.CommandExecutor.log ) . runAction ( command , null ) ; updateCommand ( command , result ) ; if ( callback != null ) { callback.executed ( result ) ; } return result ; }
Source:
public void setMainTabSelectedItem ( I selectedItem ) { if ( ( org.ovirt.engine.ui.webadmin.section.main.view.AbstractSubTabTreeView.getDetailModel ( ) . getItems ( ) ) == null ) { table.setLoadingState ( LoadingState.LOADING ) ; } if ( ! ( org.ovirt.engine.ui.webadmin.section.main.view.AbstractSubTabTreeView.getDetailModel ( ) . getItemsChangedEvent ( ) . getListeners ( ) . contains ( itemsChangedListener ) ) ) { org.ovirt.engine.ui.webadmin.section.main.view.AbstractSubTabTreeView.getDetailModel ( ) . getItemsChangedEvent ( ) . addListener ( itemsChangedListener ) ; } tree.clearTree ( ) ; tree.updateTree ( org.ovirt.engine.ui.webadmin.section.main.view.AbstractSubTabTreeView.getDetailModel ( ) ) ; }

Target:
public void setMainTabSelectedItem ( I selectedItem ) { table.setEmptyTableWidget ( null ) ; if ( ( org.ovirt.engine.ui.webadmin.section.main.view.AbstractSubTabTreeView.getDetailModel ( ) . getItems ( ) ) == null ) { table.setLoadingState ( LoadingState.LOADING ) ; } if ( ! ( org.ovirt.engine.ui.webadmin.section.main.view.AbstractSubTabTreeView.getDetailModel ( ) . getItemsChangedEvent ( ) . getListeners ( ) . contains ( itemsChangedListener ) ) ) { org.ovirt.engine.ui.webadmin.section.main.view.AbstractSubTabTreeView.getDetailModel ( ) . getItemsChangedEvent ( ) . addListener ( itemsChangedListener ) ; } tree.clearTree ( ) ; tree.updateTree ( org.ovirt.engine.ui.webadmin.section.main.view.AbstractSubTabTreeView.getDetailModel ( ) ) ; }
Source:
public java.util.List < org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.compat.Guid , java.lang.Integer > > score ( java.util.List < org.ovirt.engine.core.common.businessentities.VDS > hosts , org.ovirt.engine.core.common.businessentities.VM vm , java.util.Map < java.lang.String , java.lang.String > parameters ) { java.util.List < org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.compat.Guid , java.lang.Integer > > scores = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.VDS vds : hosts ) { scores.add ( new org.ovirt.engine.core.common.utils.Pair ( vds.getId ( ) , calcEvenGuestDistributionScore ( vds , parameters ) ) ) ; } return scores ; }

Target:
public java.util.List < org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.compat.Guid , java.lang.Integer > > score ( org.ovirt.engine.core.common.businessentities.Cluster cluster , java.util.List < org.ovirt.engine.core.common.businessentities.VDS > hosts , org.ovirt.engine.core.common.businessentities.VM vm , java.util.Map < java.lang.String , java.lang.String > parameters ) { java.util.List < org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.compat.Guid , java.lang.Integer > > scores = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.VDS vds : hosts ) { scores.add ( new org.ovirt.engine.core.common.utils.Pair ( vds.getId ( ) , calcEvenGuestDistributionScore ( vds , parameters ) ) ) ; } return scores ; }
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.common.job.Step > getStepsByJobIdForVdsmAndGluster ( org.ovirt.engine.core.compat.Guid jobId ) { return multipleResults ( entityManager.createNamedQuery ( "Step.getStepsByJobIdForVdsmAndGluster" , org.ovirt.engine.core.common.job.Step.class ) . setParameter ( "jobId" , jobId ) . setParameter ( "systemType" , java.util.EnumSet.of ( ExternalSystemType.VDSM , ExternalSystemType.GLUSTER ) ) ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeSnapshotInfoReturnForXmlRpc glusterSnapshotInfo ( org.ovirt.engine.core.compat.Guid clusterId , java.lang.String volumeName ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.glusterSnapshotInfo ( "" , volumeName ) ; org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeSnapshotInfoReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeSnapshotInfoReturnForXmlRpc ( clusterId , 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.gluster.GlusterVolumeSnapshotInfoReturnForXmlRpc glusterVolumeSnapshotList ( org.ovirt.engine.core.compat.Guid clusterId , java.lang.String volumeName ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.glusterVolumeSnapshotList ( ( volumeName == null ? "" : volumeName ) ) ; org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeSnapshotInfoReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeSnapshotInfoReturnForXmlRpc ( clusterId , xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
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 > multipleParams , boolean isRunOnlyIfAllCanDoPass ) { org.ovirt.engine.ui.frontend.server.gwt.GenericApiGWTServiceImpl.log.debug ( ( ( "Server: RunMultipleAction invoked! [amount of actions: " + ( multipleParams.size ( ) ) ) + "]" ) ) ; for ( org.ovirt.engine.core.common.action.VdcActionParametersBase params : multipleParams ) { params.setSessionId ( getSessionId ( ) ) ; } java.util.ArrayList < org.ovirt.engine.core.common.action.VdcReturnValueBase > returnValues = getBackend ( ) . runMultipleActions ( actionType , multipleParams , isRunOnlyIfAllCanDoPass ) ; return returnValues ; }

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 > multipleParams , boolean isRunOnlyIfAllCanDoPass , boolean isWaitForResult ) { org.ovirt.engine.ui.frontend.server.gwt.GenericApiGWTServiceImpl.log.debug ( ( ( "Server: RunMultipleAction invoked! [amount of actions: " + ( multipleParams.size ( ) ) ) + "]" ) ) ; for ( org.ovirt.engine.core.common.action.VdcActionParametersBase params : multipleParams ) { params.setSessionId ( getSessionId ( ) ) ; } java.util.ArrayList < org.ovirt.engine.core.common.action.VdcReturnValueBase > returnValues = getBackend ( ) . runMultipleActions ( actionType , multipleParams , isRunOnlyIfAllCanDoPass , isWaitForResult ) ; return returnValues ; }
Source:
public void ensureAsyncSearchStopped ( ) { super . ensureAsyncSearchStopped ( ) ; if ( ( getDetailModels ( ) ) != null ) { for ( org.ovirt.engine.ui.uicommonweb.models.EntityModel model : getDetailModels ( ) ) { if ( model instanceof org.ovirt.engine.ui.uicommonweb.models.SearchableListModel ) { org.ovirt.engine.ui.uicommonweb.models.SearchableListModel listModel = ( ( org.ovirt.engine.ui.uicommonweb.models.SearchableListModel ) ( model ) ) ; listModel.ensureAsyncSearchStopped ( ) ; } } } }

Target:
public void stopRefresh ( ) { super . stopRefresh ( ) ; if ( ( getDetailModels ( ) ) != null ) { for ( org.ovirt.engine.ui.uicommonweb.models.EntityModel model : getDetailModels ( ) ) { if ( model instanceof org.ovirt.engine.ui.uicommonweb.models.SearchableListModel ) { org.ovirt.engine.ui.uicommonweb.models.SearchableListModel listModel = ( ( org.ovirt.engine.ui.uicommonweb.models.SearchableListModel ) ( model ) ) ; listModel.stopRefresh ( ) ; } } } }
Source:
public void getPermittedStorageDomainsByStoragePoolId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId , org.ovirt.engine.core.common.businessentities.ActionGroup actionGroup ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) ; } return source ; } } ; org.ovirt.engine.core.common.queries.GetPermittedStorageDomainsByStoragePoolIdParameters params = new org.ovirt.engine.core.common.queries.GetPermittedStorageDomainsByStoragePoolIdParameters ( ) ; params.setStoragePoolId ( dataCenterId ) ; params.setActionGroup ( actionGroup ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetPermittedStorageDomainsByStoragePoolId , params , aQuery ) ; }

Target:
public void getStorageConnectionsByDataCenterIdAndStorageType ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.common.businessentities.storage.StorageType storageType ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.core.common.queries.GetConnectionsByDataCenterAndStorageTypeParameters params = new org.ovirt.engine.core.common.queries.GetConnectionsByDataCenterAndStorageTypeParameters ( storagePoolId , storageType ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetConnectionsByDataCenterAndStorageType , params , aQuery ) ; }
Source:
public org.ovirt.engine.core.common.businessentities.VmTemplate lookupTemplateByName ( java.lang.String name ) { return getEntity ( org.ovirt.engine.core.common.businessentities.VmTemplate.class , VdcQueryType.GetVmTemplate , new org.ovirt.engine.core.common.queries.GetVmTemplateParameters ( name ) , "GetVmTemplate" ) ; }

Target:
protected org.ovirt.engine.core.common.businessentities.VmTemplate lookupTemplate ( org.ovirt.engine.api.model.Template template , org.ovirt.engine.core.compat.Guid datacenterId ) { if ( template.isSetId ( ) ) { return getEntity ( org.ovirt.engine.core.common.businessentities.VmTemplate.class , VdcQueryType.GetVmTemplate , new org.ovirt.engine.core.common.queries.GetVmTemplateParameters ( asGuid ( template.getId ( ) ) ) , "GetVmTemplate" ) ; } else if ( template.isSetName ( ) ) { org.ovirt.engine.core.common.queries.GetVmTemplateParameters params = new org.ovirt.engine.core.common.queries.GetVmTemplateParameters ( template.getName ( ) ) ; params.setDataCenterId ( datacenterId ) ; return getEntity ( org.ovirt.engine.core.common.businessentities.VmTemplate.class , VdcQueryType.GetVmTemplate , params , "GetVmTemplate" ) ; } return null ; }
Source:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; dao = prepareDAO ( dbFacade.getVmNetworkStatisticsDao ( ) ) ; newVmStatistics = new org.ovirt.engine.core.common.businessentities.VmNetworkStatistics ( ) ; newVmStatistics.setId ( org.ovirt.engine.core.dao.VmNetworkStatisticsDAOTest.NEW_INTERFACE_ID ) ; newVmStatistics.setVmId ( org.ovirt.engine.core.dao.VmNetworkStatisticsDAOTest.VM_ID ) ; newVmStatistics.setStatus ( InterfaceStatus.Down ) ; newVmStatistics.setReceiveDropRate ( 0.0 ) ; newVmStatistics.setReceiveRate ( 0.0 ) ; newVmStatistics.setTransmitDropRate ( 0.0 ) ; newVmStatistics.setTransmitRate ( 0.0 ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; dao = prepareDAO ( dbFacade.getVmNetworkStatisticsDao ( ) ) ; newVmStatistics = new org.ovirt.engine.core.common.businessentities.network.VmNetworkStatistics ( ) ; newVmStatistics.setId ( org.ovirt.engine.core.dao.VmNetworkStatisticsDAOTest.NEW_INTERFACE_ID ) ; newVmStatistics.setVmId ( org.ovirt.engine.core.dao.VmNetworkStatisticsDAOTest.VM_ID ) ; newVmStatistics.setStatus ( InterfaceStatus.Down ) ; newVmStatistics.setReceiveDropRate ( 0.0 ) ; newVmStatistics.setReceiveRate ( 0.0 ) ; newVmStatistics.setTransmitDropRate ( 0.0 ) ; newVmStatistics.setTransmitRate ( 0.0 ) ; }
Source:
public void testSyncWhenNoSessions ( ) { org.mockito.Mockito.doReturn ( getSessionsVDSReturnVal ( true , 0 ) ) . when ( syncJob ) . runVdsCommand ( org.mockito.Matchers.eq ( VDSCommandType.GetGlusterVolumeGeoRepStatus ) , org.mockito.Matchers.any ( org.ovirt.engine.core.common.vdscommands.gluster.GlusterVolumeGeoRepSessionVDSParameters.class ) ) ; syncJob.refreshGeoRepData ( ) ; org.mockito.Mockito.verify ( geoRepDao , org.mockito.Mockito.times ( 0 ) ) . save ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSession.class ) ) ; }

Target:
public void testDiscoverGeoRepDataWhenNoSessions ( ) { org.mockito.Mockito.doReturn ( getSessionsVDSReturnVal ( true , 0 ) ) . when ( syncJob ) . runVdsCommand ( org.mockito.Matchers.eq ( VDSCommandType.GetGlusterVolumeGeoRepStatus ) , org.mockito.Matchers.any ( org.ovirt.engine.core.common.vdscommands.gluster.GlusterVolumeGeoRepSessionVDSParameters.class ) ) ; syncJob.discoverGeoRepData ( ) ; org.mockito.Mockito.verify ( geoRepDao , org.mockito.Mockito.times ( 0 ) ) . save ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSession.class ) ) ; }
Source:
void initTable ( ) { getTable ( ) . enableColumnResizing ( ) ; org.ovirt.engine.ui.common.widget.table.column.AbstractTextColumn < org.ovirt.engine.core.common.businessentities.VM > nameColumn = new org.ovirt.engine.ui.common.widget.table.column.AbstractTextColumn < org.ovirt.engine.core.common.businessentities.VM > ( ) { @ java.lang.Override public java.lang.String getValue ( org.ovirt.engine.core.common.businessentities.VM object ) { return object.getName ( ) ; } } ; nameColumn.makeSortable ( ) ; getTable ( ) . addColumn ( nameColumn , constants.nameVm ( ) , "300px" ) ; }

Target:
void initTable ( ) { getTable ( ) . enableColumnResizing ( ) ; org.ovirt.engine.ui.common.widget.table.column.AbstractTextColumn < org.ovirt.engine.core.common.businessentities.VM > nameColumn = new org.ovirt.engine.ui.common.widget.table.column.AbstractTextColumn < org.ovirt.engine.core.common.businessentities.VM > ( ) { @ java.lang.Override public java.lang.String getValue ( org.ovirt.engine.core.common.businessentities.VM object ) { return object.getName ( ) ; } } ; nameColumn.makeSortable ( ) ; getTable ( ) . addColumn ( nameColumn , org.ovirt.engine.ui.webadmin.section.main.view.tab.profile.SubTabVnicProfileVmView.constants.nameVm ( ) , "300px" ) ; }
Source:
public void validateFailureOnMovingLunDisk ( ) { initializeCommand ( ImageOperation.Move , new org.ovirt.engine.core.common.businessentities.storage.LunDisk ( ) ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( command , EngineMessage.ACTION_TYPE_FAILED_NOT_SUPPORTED_DISK_STORAGE_TYPE ) ; }

Target:
public void validateVmInPreview ( ) { initializeCommand ( new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ) ; initSnapshotValidator ( ) ; initVmForSpace ( ) ; initVmDiskImage ( false ) ; initSrcStorageDomain ( ) ; initDestStorageDomain ( StorageType.NFS ) ; org.mockito.Mockito.when ( snapshotsValidator.vmNotInPreview ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_VM_IN_PREVIEW ) ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( command , EngineMessage.ACTION_TYPE_FAILED_VM_IN_PREVIEW ) ; }
Source:
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 ) ; }

Target:
public void getStorageDomainById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , 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 ? ( ( org.ovirt.engine.core.common.businessentities.StorageDomain ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( storageDomainId ) , aQuery ) ; }
Source:
private void removeMemoryVolumes ( ) { for ( java.lang.String memoryState : memoryStates ) { org.ovirt.engine.core.common.action.VdcReturnValueBase retVal = org.ovirt.engine.core.bll.RemoveVmCommand.getBackend ( ) . runInternalAction ( VdcActionType.RemoveMemoryVolumes , buildRemoveMemoryVolumesParameters ( memoryState , org.ovirt.engine.core.bll.RemoveVmCommand.getVmId ( ) ) ) ; if ( ! ( retVal.getSucceeded ( ) ) ) { log.errorFormat ( "Failed to remove memory volumes whie removing vm {0} (volumes: {1})" , org.ovirt.engine.core.bll.RemoveVmCommand.getVmId ( ) , memoryState ) ; } } }

Target:
private void removeMemoryVolumes ( ) { for ( java.lang.String memoryState : memoryStates ) { org.ovirt.engine.core.common.action.VdcReturnValueBase retVal = runInternalAction ( VdcActionType.RemoveMemoryVolumes , buildRemoveMemoryVolumesParameters ( memoryState , org.ovirt.engine.core.bll.RemoveVmCommand.getVmId ( ) ) , org.ovirt.engine.core.bll.RemoveVmCommand.cloneContextAndDetachFromParent ( ) ) ; if ( ! ( retVal.getSucceeded ( ) ) ) { log.errorFormat ( "Failed to remove memory volumes whie removing vm {0} (volumes: {1})" , org.ovirt.engine.core.bll.RemoveVmCommand.getVmId ( ) , memoryState ) ; } } }