auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
protected org.ovirt.engine.core.bll.ValidationResult macAvailable ( ) { org.ovirt.engine.core.common.businessentities.network.VmNic nic = org.ovirt.engine.core.bll.network.vm.ActivateDeactivateVmNicCommand.getParameters ( ) . getNic ( ) ; org.ovirt.engine.core.common.errors.EngineMessage failMessage = org.ovirt.engine.core.common.errors.EngineMessage.NETWORK_MAC_ADDRESS_IN_USE ; return org.ovirt.engine.core.bll.ValidationResult.failWith ( failMessage , org.ovirt.engine.core.utils.ReplacementUtils.getVariableAssignmentString ( failMessage , nic.getMacAddress ( ) ) ) . when ( new org.ovirt.engine.core.bll.network.VmInterfaceManager ( ) . tooManyPluggedInterfaceWithSameMac ( nic , org.ovirt.engine.core.bll.network.vm.ActivateDeactivateVmNicCommand.getMacPool ( ) ) ) ; }

Target:
private org.ovirt.engine.core.common.businessentities.Provider < ? > getProvider ( ) { if ( ( provider ) == null ) { org.ovirt.engine.core.common.businessentities.network.Network network = getNetwork ( ) ; if ( ( network != null ) && ( network.isExternal ( ) ) ) { provider = providerDao.get ( network.getProvidedBy ( ) . getProviderId ( ) ) ; } } return provider ; }
Source:
public void getClusterNetworkList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { if ( ( aQuery.converterCallback ) == null ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.Network > ( ) ; } return source ; } } ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllNetworksByClusterId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( clusterId ) , 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 static 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.RunQuery ( VdcQueryType.GetPermittedStorageDomainsByStoragePoolId , params , 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.RunQuery ( VdcQueryType.GetVmConfigurationBySnapshot , new org.ovirt.engine.core.common.queries.GetVmConfigurationBySnapshotQueryParams ( snapshotSourceId ) , aQuery ) ; }
Source:
public void testConflictedUpdate ( ) { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpGetEntityExpectations ( 1 ) ; org.ovirt.engine.api.model.DataCenter model = org.ovirt.engine.api.restapi.resource.BackendDataCentersResourceTest.getModel ( 1 ) ; model.setId ( GUIDS [ 1 ] . toString ( ) ) ; try { resource.update ( model ) ; org.junit.Assert.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyImmutabilityConstraint ( wae ) ; } }

Target:
public void testConflictedUpdate ( ) { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpGetEntityExpectations ( 1 ) ; org.ovirt.engine.api.model.DataCenter model = org.ovirt.engine.api.restapi.resource.BackendDataCentersResourceTest.getModel ( 1 ) ; model.setId ( GUIDS [ 1 ] . toString ( ) ) ; try { resource.update ( model ) ; org.junit.jupiter.api.Assertions.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyImmutabilityConstraint ( wae ) ; } }
Source:
public void onClick ( com.google.gwt.event.dom.client.ClickEvent event ) { getView ( ) . flush ( ) ; getView ( ) . getLoginButton ( ) . getCommand ( ) . Execute ( ) ; }

Target:
public void eventRaised ( org.ovirt.engine.core.compat.Event ev , java.lang.Object sender , org.ovirt.engine.core.compat.EventArgs args ) { getView ( ) . setErrorMessage ( loginModel.getMessage ( ) ) ; org.ovirt.engine.ui.common.presenter.AbstractLoginPopupPresenterWidget.logger.warning ( ( ( "Login failed for user [" + ( loginModel.getUserName ( ) . getEntity ( ) ) ) + "]" ) ) ; }
Source:
public void glusterServiceNotRequired ( ) { org.mockito.Mockito.when ( cluster.getcompatibility_version ( ) ) . thenReturn ( org.mockito.Mockito.mock ( org.ovirt.engine.core.compat.Version.class ) ) ; org.mockito.Mockito.when ( cluster.supportsGlusterService ( ) ) . thenReturn ( false ) ; validator = new org.ovirt.engine.core.bll.validator.ClusterValidator ( dbFacade , cluster ) ; org.junit.Assert.assertThat ( validator.glusterServiceSupported ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }

Target:
public void glusterServiceNotRequired ( ) { org.mockito.Mockito.when ( cluster.getCompatibilityVersion ( ) ) . thenReturn ( org.mockito.Mockito.mock ( org.ovirt.engine.core.compat.Version.class ) ) ; org.mockito.Mockito.when ( cluster.supportsGlusterService ( ) ) . thenReturn ( false ) ; validator = new org.ovirt.engine.core.bll.validator.ClusterValidator ( dbFacade , cluster ) ; org.junit.Assert.assertThat ( validator.glusterServiceSupported ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }
Source:
public void labelBeingAttachedToNonVlanNonSlaveInterfaceAttachToNewSlave ( ) { org.ovirt.engine.core.common.action.HostSetupNetworksParameters params = createHostSetupNetworksParams ( ) ; org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface slave = createNic ( ) ; org.ovirt.engine.core.common.businessentities.network.Bond bond = new org.ovirt.engine.core.common.businessentities.network.Bond ( "bond" ) ; bond.setSlaves ( java.util.Arrays.asList ( slave.getName ( ) ) ) ; params.setBonds ( java.util.Arrays.asList ( bond ) ) ; assertLabelBeingAttachedToNonVlanNonSlaveInterfaceFailed ( params , slave ) ; }

Target:
public void labelBeingAttachedToNonVlanNonSlaveInterfaceAttachToNewSlave ( ) { org.ovirt.engine.core.common.action.HostSetupNetworksParameters params = createHostSetupNetworksParams ( ) ; org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface slave = createNic ( ) ; org.ovirt.engine.core.common.action.CreateOrUpdateBond createOrUpdateBond = new org.ovirt.engine.core.common.action.CreateOrUpdateBond ( ) ; createOrUpdateBond.setName ( "bond" ) ; createOrUpdateBond.setSlaves ( java.util.Collections.singleton ( slave.getName ( ) ) ) ; params.setCreateOrUpdateBonds ( java.util.Collections.singletonList ( createOrUpdateBond ) ) ; assertLabelBeingAttachedToNonVlanNonSlaveInterfaceFailed ( params , slave ) ; }
Source:
protected org.ovirt.engine.api.model.Label addLinks ( org.ovirt.engine.api.model.Label label , java.lang.Class < ? extends org.ovirt.engine.api.model.BaseResource > suggestedParent , java.lang.String ... excludeSubCollectionMembers ) { org.ovirt.engine.api.model.Label resultLabel = super . addLinks ( label , org.ovirt.engine.api.model.HostNic.class ) ; final org.ovirt.engine.api.restapi.resource.AbstractBaseHostNicLabelResource labelResource = createSingularResource ( resultLabel.getId ( ) ) ; labelResource.overrideHref ( resultLabel ) ; return resultLabel ; }

Target:
protected org.ovirt.engine.api.model.NetworkLabel addLinks ( org.ovirt.engine.api.model.NetworkLabel label , java.lang.Class < ? extends org.ovirt.engine.api.model.BaseResource > suggestedParent , java.lang.String ... excludeSubCollectionMembers ) { org.ovirt.engine.api.model.NetworkLabel resultLabel = super . addLinks ( label , org.ovirt.engine.api.model.HostNic.class ) ; final org.ovirt.engine.api.restapi.resource.AbstractBaseHostNicLabelResource labelResource = createSingularResource ( resultLabel.getId ( ) ) ; labelResource.overrideHref ( resultLabel ) ; return resultLabel ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { allNetworks = ( ( java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > ) ( returnValue ) ) ; queryInterfaces ( ) ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValueObj ) { java.lang.Object returnValue = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValueObj ) ) . getReturnValue ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.network.HostNicVfsConfig > allHostVfs = ( ( java.util.List < org.ovirt.engine.core.common.businessentities.network.HostNicVfsConfig > ) ( returnValue ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.HostNicVfsConfig vfsConfig : allHostVfs ) { originalVfsConfigs.add ( vfsConfig ) ; nicToVfsConfig.put ( vfsConfig.getNicId ( ) , new org.ovirt.engine.core.common.businessentities.network.HostNicVfsConfig ( vfsConfig ) ) ; } queryVfMap ( ) ; }
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 getClusterFeaturesByClusterId ( org.ovirt.engine.ui.frontend.AsyncQuery < java.util.Set < org.ovirt.engine.core.common.businessentities.SupportedAdditionalClusterFeature > > aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.SetConverter < > ( ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetClusterFeaturesByClusterId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( clusterId ) , aQuery ) ; }
Source:
public void getAAAProfilesList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.convertAAAProfilesResult ( aQuery ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAAAProfileList , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }

Target:
public void getHostListByDataCenter ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid spId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > list = org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VDS > cast ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.IVdcQueryable > ) ( source ) ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllVdsByStoragePool , new org.ovirt.engine.core.common.queries.IdQueryParameters ( spId ) , aQuery ) ; }
Source:
public void getStorageConnectionById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String id , boolean isRefresh ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( org.ovirt.engine.core.common.businessentities.StorageServerConnections ) ( source ) ) : null ; } } ; org.ovirt.engine.core.common.queries.StorageServerConnectionQueryParametersBase params = new org.ovirt.engine.core.common.queries.StorageServerConnectionQueryParametersBase ( id ) ; params.setRefresh ( isRefresh ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageServerConnectionById , params , aQuery ) ; }

Target:
public void getVolumeSnapshotSchedule ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid volumeId ) { 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.GetGlusterVolumeSnapshotScheduleByVolumeId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( volumeId ) , aQuery ) ; }
Source:
public void getExistingStorageDomainList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hostId , org.ovirt.engine.core.common.businessentities.StorageDomainType domainType , org.ovirt.engine.core.common.businessentities.storage.StorageType storageType , java.lang.String path ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetExistingStorageDomainList , new org.ovirt.engine.core.common.queries.GetExistingStorageDomainListParameters ( hostId , storageType , domainType , path ) , aQuery ) ; }

Target:
public void getStorageDomainsByConnection ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , java.lang.String connectionPath ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ) ( source ) ) : null ; } } ; org.ovirt.engine.core.common.queries.GetStorageDomainsByConnectionParameters param = new org.ovirt.engine.core.common.queries.GetStorageDomainsByConnectionParameters ( ) ; param.setConnection ( connectionPath ) ; if ( storagePoolId != null ) { param.setStoragePoolId ( storagePoolId ) ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainsByConnection , param , aQuery ) ; }
Source:
public static void isTemplateNameUnique ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String name ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ! ( ( ( java.lang.Boolean ) ( source ) ) . booleanValue ( ) ) : false ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.IsVmTemlateWithSameNameExist , new org.ovirt.engine.core.common.queries.NameQueryParameters ( name ) , aQuery ) ; }

Target:
public void getPermissionsByAdElementId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid userId ) { 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.Permissions > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Permissions > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetPermissionsByAdElementId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( userId ) , aQuery ) ; }
Source:
public java.lang.String getIsoPrefix ( ) { synchronized ( syncObj ) { if ( ( ( mIsoPrefix ) == null ) || ( ( mIsoPrefix.length ( ) ) == 0 ) ) { try { org.ovirt.engine.core.vdsbroker.irsbroker.StoragePoolInfoReturnForXmlRpc returnValue = getIrsProxy ( ) . getStoragePoolInfo ( _storagePoolId.toString ( ) ) ; if ( returnValue.mStoragePoolInfo.contains ( IrsProperties.isoPrefix ) ) { mIsoPrefix = returnValue.mStoragePoolInfo.getItem ( IrsProperties.isoPrefix ) . toString ( ) ; } } catch ( java.lang.Exception ex ) { org.ovirt.engine.core.vdsbroker.irsbroker.IrsBrokerCommand.log.errorFormat ( "IrsBroker::IsoPrefix Failed to get IRS statistics." ) ; } } return mIsoPrefix ; } }

Target:
public java.lang.String getIsoPrefix ( ) { synchronized ( syncObj ) { if ( ( ( mIsoPrefix ) == null ) || ( ( mIsoPrefix.length ( ) ) == 0 ) ) { try { org.ovirt.engine.core.vdsbroker.irsbroker.StoragePoolInfoReturnForXmlRpc returnValue = getIrsProxy ( ) . getStoragePoolInfo ( _storagePoolId.toString ( ) ) ; if ( returnValue.mStoragePoolInfo.containsKey ( IrsProperties.isoPrefix ) ) { mIsoPrefix = returnValue.mStoragePoolInfo.get ( IrsProperties.isoPrefix ) . toString ( ) ; } } catch ( java.lang.Exception ex ) { org.ovirt.engine.core.vdsbroker.irsbroker.IrsBrokerCommand.log.errorFormat ( "IrsBroker::IsoPrefix Failed to get IRS statistics." ) ; } } return mIsoPrefix ; } }
Source:
public void testAttachFailLockDomain ( ) { domain.setStorageDomainSharedStatus ( StorageDomainSharedStatus.Locked ) ; org.ovirt.engine.core.bll.ValidationResult shareLockedDomainInsertionResult = validator.checkStorageDomainSharedStatusNotLocked ( ) ; org.junit.Assert.assertFalse ( "Attaching domain in locked status succeeded while it should have failed" , shareLockedDomainInsertionResult.isValid ( ) ) ; org.junit.Assert.assertTrue ( "Attaching domain with in locked status failed with the wrong message" , shareLockedDomainInsertionResult.getMessage ( ) . equals ( VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_DOMAIN_STATUS_ILLEGAL ) ) ; }

Target:
public void testAttachFailLockDomain ( ) { domain.setStorageDomainSharedStatus ( StorageDomainSharedStatus.Locked ) ; org.ovirt.engine.core.bll.ValidationResult shareLockedDomainInsertionResult = validator.checkStorageDomainSharedStatusNotLocked ( ) ; org.junit.Assert.assertFalse ( "Attaching domain in locked status succeeded while it should have failed" , shareLockedDomainInsertionResult.isValid ( ) ) ; org.junit.Assert.assertTrue ( "Attaching domain with in locked status failed with the wrong message" , shareLockedDomainInsertionResult.getMessage ( ) . equals ( EngineMessage.ACTION_TYPE_FAILED_STORAGE_DOMAIN_STATUS_ILLEGAL ) ) ; }
Source:
public void getStorageConnectionById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String id , boolean isRefresh ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( org.ovirt.engine.core.common.businessentities.StorageServerConnections ) ( source ) ) : null ; } } ; org.ovirt.engine.core.common.queries.StorageServerConnectionQueryParametersBase params = new org.ovirt.engine.core.common.queries.StorageServerConnectionQueryParametersBase ( id ) ; params.setRefresh ( isRefresh ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageServerConnectionById , params , aQuery ) ; }

Target:
public void getDataCentersByStorageDomain ( 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 ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStoragePoolsByStorageDomainId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( storageDomainId ) , aQuery ) ; }
Source:
public void setUp ( ) { networkCluster = createNetworkCluster ( org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelperTest.CLUSTER_ID , org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelperTest.NETWORK_ID ) ; org.mockito.Mockito.when ( networkClusterDao.get ( networkCluster.getId ( ) ) ) . thenReturn ( networkCluster ) ; managementNetworkCluster = createNetworkCluster ( org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelperTest.CLUSTER_ID , org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelperTest.MANAGEMENT_NETWORK_ID ) ; managementNetwork = createNetwork ( org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelperTest.MANAGEMENT_NETWORK_ID , org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelperTest.MANAGEMENT_NETWORK_NAME ) ; org.mockito.Mockito.when ( managementNetworkUtil.getManagementNetwork ( org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelperTest.CLUSTER_ID ) ) . thenReturn ( managementNetwork ) ; org.mockito.Mockito.when ( networkClusterDao.get ( new org.ovirt.engine.core.common.businessentities.network.NetworkClusterId ( org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelperTest.CLUSTER_ID , org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelperTest.MANAGEMENT_NETWORK_ID ) ) ) . thenReturn ( managementNetworkCluster ) ; }

Target:
public void setUp ( ) { networkCluster = createNetworkCluster ( org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelperTest.CLUSTER_ID , org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelperTest.NETWORK_ID1 ) ; org.mockito.Mockito.when ( networkClusterDao.get ( networkCluster.getId ( ) ) ) . thenReturn ( networkCluster ) ; managementNetworkCluster = createNetworkCluster ( org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelperTest.CLUSTER_ID , org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelperTest.MANAGEMENT_NETWORK_ID ) ; managementNetwork = createNetwork ( org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelperTest.MANAGEMENT_NETWORK_ID , org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelperTest.MANAGEMENT_NETWORK_NAME ) ; org.mockito.Mockito.when ( managementNetworkUtil.getManagementNetwork ( org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelperTest.CLUSTER_ID ) ) . thenReturn ( managementNetwork ) ; org.mockito.Mockito.when ( networkClusterDao.get ( new org.ovirt.engine.core.common.businessentities.network.NetworkClusterId ( org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelperTest.CLUSTER_ID , org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelperTest.MANAGEMENT_NETWORK_ID ) ) ) . thenReturn ( managementNetworkCluster ) ; }
Source:
public static org.ovirt.engine.core.common.businessentities.CommandEntity buildCommandEntity ( org.ovirt.engine.core.compat.Guid commandId , org.ovirt.engine.core.compat.Guid rootCommandId , org.ovirt.engine.core.common.action.VdcActionType actionType , org.ovirt.engine.core.common.action.VdcActionParametersBase params , org.ovirt.engine.core.compat.CommandStatus status , boolean callBackEnabled ) { org.ovirt.engine.core.common.businessentities.CommandEntity entity = new org.ovirt.engine.core.common.businessentities.CommandEntity ( ) ; entity.setId ( commandId ) ; entity.setRootCommandId ( rootCommandId ) ; entity.setCommandType ( actionType ) ; entity.setActionParameters ( params ) ; entity.setCommandStatus ( status ) ; entity.setCallBackEnabled ( callBackEnabled ) ; return entity ; }

Target:
public static org.ovirt.engine.core.common.businessentities.CommandEntity buildCommandEntity ( org.ovirt.engine.core.compat.Guid commandId , org.ovirt.engine.core.compat.Guid rootCommandId , org.ovirt.engine.core.common.action.VdcActionType actionType , org.ovirt.engine.core.common.action.VdcActionParametersBase params , org.ovirt.engine.core.compat.CommandStatus status , boolean callBackEnabled , org.ovirt.engine.core.common.action.VdcReturnValueBase returnValue ) { org.ovirt.engine.core.common.businessentities.CommandEntity entity = new org.ovirt.engine.core.common.businessentities.CommandEntity ( ) ; entity.setId ( commandId ) ; entity.setRootCommandId ( rootCommandId ) ; entity.setCommandType ( actionType ) ; entity.setActionParameters ( params ) ; entity.setCommandStatus ( status ) ; entity.setCallBackEnabled ( callBackEnabled ) ; entity.setReturnValue ( returnValue ) ; return entity ; }
Source:
protected void executeCommand ( ) { org.ovirt.engine.core.common.vdscommands.VDSReturnValue retVal = org.ovirt.engine.core.bll.Backend.getInstance ( ) . getResourceManager ( ) . RunVdsCommand ( VDSCommandType.SetSafeNetworkConfig , new org.ovirt.engine.core.common.vdscommands.VdsIdVDSCommandParametersBase ( org.ovirt.engine.core.bll.CommitNetworkChangesCommand.getParameters ( ) . getVdsId ( ) ) ) ; org.ovirt.engine.core.bll.CommitNetworkChangesCommand.getVds ( ) . setnet_config_dirty ( false ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVdsDynamicDAO ( ) . update ( org.ovirt.engine.core.bll.CommitNetworkChangesCommand.getVds ( ) . getDynamicData ( ) ) ; setSucceeded ( retVal.getSucceeded ( ) ) ; }

Target:
protected void executeCommand ( ) { org.ovirt.engine.core.common.vdscommands.VDSReturnValue retVal = org.ovirt.engine.core.bll.Backend.getInstance ( ) . getResourceManager ( ) . RunVdsCommand ( VDSCommandType.SetSafeNetworkConfig , new org.ovirt.engine.core.common.vdscommands.VdsIdVDSCommandParametersBase ( org.ovirt.engine.core.bll.CommitNetworkChangesCommand.getParameters ( ) . getVdsId ( ) ) ) ; org.ovirt.engine.core.bll.CommitNetworkChangesCommand.getVds ( ) . setnet_config_dirty ( false ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVdsDynamicDao ( ) . update ( org.ovirt.engine.core.bll.CommitNetworkChangesCommand.getVds ( ) . getDynamicData ( ) ) ; setSucceeded ( retVal.getSucceeded ( ) ) ; }
Source:
private void addPermissions ( ) { addPermissionOnNetwork ( org.ovirt.engine.core.bll.network.dc.AddNetworkCommand.getCurrentUser ( ) . getUserId ( ) , PredefinedRoles.NETWORK_ADMIN ) ; if ( org.ovirt.engine.core.bll.network.dc.AddNetworkCommand.getParameters ( ) . isPublicUse ( ) ) { addPermissionOnNetwork ( MultiLevelAdministrationHandler.EVERYONE_OBJECT_ID , PredefinedRoles.NETWORK_USER ) ; } }

Target:
protected void executeCommand ( ) { org.ovirt.engine.core.bll.network.dc.AddNetworkCommand.getNetwork ( ) . setId ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; org.ovirt.engine.core.bll.network.dc.AddNetworkCommand.getNetworkDAO ( ) . save ( org.ovirt.engine.core.bll.network.dc.AddNetworkCommand.getNetwork ( ) ) ; org.ovirt.engine.core.bll.network.cluster.NetworkHelper.addPermissions ( org.ovirt.engine.core.bll.network.dc.AddNetworkCommand.getCurrentUser ( ) . getUserId ( ) , org.ovirt.engine.core.bll.network.dc.AddNetworkCommand.getNetwork ( ) . getId ( ) , org.ovirt.engine.core.bll.network.dc.AddNetworkCommand.getParameters ( ) . isPublicUse ( ) ) ; org.ovirt.engine.core.bll.network.dc.AddNetworkCommand.getReturnValue ( ) . setActionReturnValue ( org.ovirt.engine.core.bll.network.dc.AddNetworkCommand.getNetwork ( ) . getId ( ) ) ; org.ovirt.engine.core.bll.network.dc.AddNetworkCommand.setSucceeded ( true ) ; }
Source:
private org.ovirt.engine.core.vdsbroker.vdsbroker.VmInfoBuilderBase createBuilder ( ) { if ( org.ovirt.engine.core.common.utils.VmDeviceCommonUtils.isOldClusterVersion ( vm.getVdsGroupCompatibilityVersion ( ) ) ) { return new org.ovirt.engine.core.vdsbroker.vdsbroker.VmOldInfoBuilder ( vm , createInfo ) ; } else { return new org.ovirt.engine.core.vdsbroker.vdsbroker.VmInfoBuilder ( vm , createInfo ) ; } }

Target:
private org.ovirt.engine.core.vdsbroker.vdsbroker.VmInfoBuilderBase createBuilder ( ) { if ( org.ovirt.engine.core.common.utils.VmDeviceCommonUtils.isOldClusterVersion ( vm.getVdsGroupCompatibilityVersion ( ) ) ) { return new org.ovirt.engine.core.vdsbroker.vdsbroker.VmOldInfoBuilder ( vm , createInfo ) ; } else { return new org.ovirt.engine.core.vdsbroker.vdsbroker.VmInfoBuilder ( vm , org.ovirt.engine.core.vdsbroker.vdsbroker.CreateVDSCommand.getParameters ( ) . getVdsId ( ) , createInfo ) ; } }
Source:
public void getDataCenterMaxNameLength ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) . intValue ( ) : 1 ; } } ; getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.StoragePoolNameSizeLimit , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public void getStorageConnectionById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String id , boolean isRefresh ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( org.ovirt.engine.core.common.businessentities.StorageServerConnections ) ( source ) ) : null ; } } ; org.ovirt.engine.core.common.queries.StorageServerConnectionQueryParametersBase params = new org.ovirt.engine.core.common.queries.StorageServerConnectionQueryParametersBase ( id ) ; params.setRefresh ( isRefresh ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageServerConnectionById , params , aQuery ) ; }
Source:
public void resetIrs ( ) { nullifyInternalProxies ( ) ; org.ovirt.engine.core.common.businessentities.StoragePool storagePool = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStoragePoolDao ( ) . get ( _storagePoolId ) ; if ( storagePool != null ) { storagePool.setspm_vds_id ( null ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStoragePoolDao ( ) . update ( storagePool ) ; } }

Target:
public void resetIrs ( ) { nullifyInternalProxies ( ) ; org.ovirt.engine.core.common.businessentities.StoragePool storagePool = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStoragePoolDao ( ) . get ( _storagePoolId ) ; if ( storagePool != null ) { storagePool.setSpmVdsId ( null ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStoragePoolDao ( ) . update ( storagePool ) ; } }
Source:
public void onFailureAlertShown ( ) { mockExecutor ( false ) ; try { command.executeCommand ( ) ; org.junit.Assert.fail ( ) ; } catch ( org.ovirt.engine.core.common.errors.EngineException ex ) { org.mockito.Mockito.verify ( auditLogDirector , org.mockito.Mockito.times ( 3 ) ) . log ( org.mockito.Matchers.any ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase.class ) , org.mockito.Matchers.any ( org.ovirt.engine.core.common.AuditLogType.class ) ) ; } }

Target:
public void onFailureAlertShown ( ) { mockExecutor ( false ) ; try { command.executeCommand ( ) ; org.junit.Assert.fail ( ) ; } catch ( org.ovirt.engine.core.common.errors.EngineException ex ) { org.mockito.Mockito.verify ( auditLogDirector , org.mockito.Mockito.times ( 3 ) ) . log ( org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase.class ) , org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.common.AuditLogType.class ) ) ; } }
Source:
public void getVmGuestAgentInterfacesByVmId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmGuestAgentInterface > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmGuestAgentInterfacesByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) . withoutRefresh ( ) , aQuery ) ; }

Target:
public void getVmGuestAgentInterfacesByVmId ( org.ovirt.engine.ui.frontend.AsyncQuery < java.util.List < org.ovirt.engine.core.common.businessentities.VmGuestAgentInterface > > aQuery , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.ListConverter < > ( ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmGuestAgentInterfacesByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) . withoutRefresh ( ) , aQuery ) ; }
Source:
public void updateRepository_MIGRATION_FROM ( org.ovirt.engine.core.vdsbroker.monitoring.VmTestPairs data ) { initMocks ( data , true ) ; org.junit.Assume.assumeNotNull ( data.dbVm ( ) , data.vdsmVm ( ) ) ; org.junit.Assume.assumeTrue ( ( ( data.vdsmVm ( ) . getVmDynamic ( ) . getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.MigratingFrom ) ) ) ; org.junit.Assert.assertTrue ( vmAnalyzer.isClientIpChanged ( ) ) ; org.mockito.Mockito.verify ( vmAnalyzer.getResourceManager ( ) , org.mockito.Mockito.never ( ) ) . internalSetVmStatus ( data.dbVm ( ) , VMStatus.MigratingTo ) ; }

Target:
public void updateRepository_MIGRATION_FROM ( org.ovirt.engine.core.vdsbroker.monitoring.VmTestPairs data ) { initMocks ( data , true ) ; org.junit.Assume.assumeNotNull ( data.dbVm ( ) , data.vdsmVm ( ) ) ; org.junit.Assume.assumeTrue ( ( ( data.vdsmVm ( ) . getVmDynamic ( ) . getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.MigratingFrom ) ) ) ; org.junit.Assert.assertTrue ( vmAnalyzer.isClientIpChanged ( ) ) ; org.mockito.Mockito.verify ( resourceManager , org.mockito.Mockito.never ( ) ) . internalSetVmStatus ( data.dbVm ( ) , VMStatus.MigratingTo ) ; }
Source:
public void testCheckGroupsCanBeAttachedAlreadyExists ( ) { org.ovirt.engine.core.common.businessentities.RoleGroupMap map = new org.ovirt.engine.core.common.businessentities.RoleGroupMap ( getParams ( ) . getActionGroups ( ) . get ( 0 ) , getParams ( ) . getRoleId ( ) ) ; mockGetAllForRole ( java.util.Collections.singletonList ( map ) ) ; java.util.List < java.lang.String > messages = new java.util.ArrayList < java.lang.String > ( 1 ) ; org.junit.Assert.assertTrue ( "canDoAction should fail" , getCommand ( ) . checkIfGroupsCanBeAttached ( messages ) ) ; org.junit.Assert.assertEquals ( "wrong messages" , VdcBllMessages.ERROR_CANNOT_ATTACH_ACTION_GROUP_TO_ROLE_ATTACHED.toString ( ) , messages.get ( 0 ) ) ; }

Target:
public void testCheckGroupsCanBeAttachedAlreadyExists ( ) { org.ovirt.engine.core.common.businessentities.RoleGroupMap map = new org.ovirt.engine.core.common.businessentities.RoleGroupMap ( getParams ( ) . getActionGroups ( ) . get ( 0 ) , getParams ( ) . getRoleId ( ) ) ; mockGetAllForRole ( java.util.Collections.singletonList ( map ) ) ; java.util.List < java.lang.String > messages = new java.util.ArrayList < java.lang.String > ( 1 ) ; org.junit.Assert.assertTrue ( "canDoAction should fail" , getCommand ( ) . checkIfGroupsCanBeAttached ( messages ) ) ; org.junit.Assert.assertEquals ( "wrong messages" , EngineMessage.ERROR_CANNOT_ATTACH_ACTION_GROUP_TO_ROLE_ATTACHED.toString ( ) , messages.get ( 0 ) ) ; }
Source:
public 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.getInstance ( ) . 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 void getDiskList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.DiskImage > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.DiskImage > ( ) ; } } ; org.ovirt.engine.core.common.queries.SearchParameters searchParams = new org.ovirt.engine.core.common.queries.SearchParameters ( "Disks:" , org.ovirt.engine.core.common.interfaces.SearchType.Disk ) ; searchParams.setMaxCount ( 9999 ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , searchParams , aQuery ) ; }
Source:
public org.ovirt.engine.api.resource.StatisticsResource getStatisticsResource ( ) { org.ovirt.engine.api.restapi.resource.EntityIdResolver < org.ovirt.engine.core.compat.Guid > resolver = new org.ovirt.engine.api.restapi.resource.QueryIdResolver < org.ovirt.engine.core.compat.Guid > ( org.ovirt.engine.core.common.queries.VdcQueryType.GetVdsByVdsId , org.ovirt.engine.core.common.queries.GetVdsByVdsIdParameters.class ) ; org.ovirt.engine.api.restapi.resource.HostStatisticalQuery query = new org.ovirt.engine.api.restapi.resource.HostStatisticalQuery ( resolver , newModel ( id ) ) ; return inject ( new org.ovirt.engine.api.restapi.resource.BackendStatisticsResource < org.ovirt.engine.api.model.Host , org.ovirt.engine.core.common.businessentities.VDS > ( entityType , guid , query ) ) ; }

Target:
public org.ovirt.engine.api.resource.StatisticsResource getStatisticsResource ( ) { org.ovirt.engine.api.restapi.resource.EntityIdResolver < org.ovirt.engine.core.compat.Guid > resolver = new org.ovirt.engine.api.restapi.resource.QueryIdResolver < org.ovirt.engine.core.compat.Guid > ( org.ovirt.engine.core.common.queries.VdcQueryType.GetVdsByVdsId , org.ovirt.engine.core.common.queries.IdQueryParameters.class ) ; org.ovirt.engine.api.restapi.resource.HostStatisticalQuery query = new org.ovirt.engine.api.restapi.resource.HostStatisticalQuery ( resolver , newModel ( id ) ) ; return inject ( new org.ovirt.engine.api.restapi.resource.BackendStatisticsResource < org.ovirt.engine.api.model.Host , org.ovirt.engine.core.common.businessentities.VDS > ( entityType , guid , query ) ) ; }
Source:
public org.ovirt.engine.core.common.businessentities.TagsVmPoolMap mapRow ( java.sql.ResultSet rs , int rowNum ) throws java.sql.SQLException { org.ovirt.engine.core.common.businessentities.TagsVmPoolMap entity = new org.ovirt.engine.core.common.businessentities.TagsVmPoolMap ( ) ; entity.settag_id ( org.ovirt.engine.core.compat.Guid.createGuidFromStringDefaultEmpty ( rs.getString ( "tag_id" ) ) ) ; entity.setvm_pool_id ( org.ovirt.engine.core.compat.Guid.createGuidFromStringDefaultEmpty ( rs.getString ( "vm_pool_id" ) ) ) ; return entity ; }

Target:
public org.ovirt.engine.core.common.businessentities.TagsVmPoolMap mapRow ( java.sql.ResultSet rs , int rowNum ) throws java.sql.SQLException { org.ovirt.engine.core.common.businessentities.TagsVmPoolMap entity = new org.ovirt.engine.core.common.businessentities.TagsVmPoolMap ( ) ; entity.settag_id ( getGuidDefaultEmpty ( rs , "tag_id" ) ) ; entity.setvm_pool_id ( getGuidDefaultEmpty ( rs , "vm_pool_id" ) ) ; return entity ; }
Source:
public void testAddIncompleteParameters ( ) throws java.lang.Exception { org.ovirt.engine.api.model.Disk model = new org.ovirt.engine.api.model.Disk ( ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; control.replay ( ) ; try { collection.add ( model ) ; fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "Disk" , "testAddIncompleteParameters" , "interface" ) ; } }

Target:
public void testAddIncompleteParameters ( ) throws java.lang.Exception { org.ovirt.engine.api.model.Disk model = new org.ovirt.engine.api.model.Disk ( ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; control.replay ( ) ; try { collection.add ( model ) ; fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "Disk" , "testAddIncompleteParameters" , "provisionedSize|size" , "format" ) ; } }
Source:
public boolean isTagDescestorOfTag ( org.ovirt.engine.core.compat.Guid sourceTagId , org.ovirt.engine.core.compat.Guid potentialDescestorId ) { if ( sourceTagId.equals ( potentialDescestorId ) ) { return true ; } org.ovirt.engine.core.common.businessentities.Tags tag = getTagById ( sourceTagId ) ; if ( ( tag != null ) && ( ( tag.getChildren ( ) ) != null ) ) { for ( org.ovirt.engine.core.common.businessentities.Tags childTag : tag.getChildren ( ) ) { if ( isTagDescestorOfTag ( childTag.gettag_id ( ) , potentialDescestorId ) ) { return true ; } } } return false ; }

Target:
public boolean isTagDescestorOfTag ( org.ovirt.engine.core.compat.Guid sourceTagId , org.ovirt.engine.core.compat.Guid potentialDescestorId ) { if ( sourceTagId.equals ( potentialDescestorId ) ) { return true ; } org.ovirt.engine.core.common.businessentities.Tags tag = getTagById ( sourceTagId ) ; if ( ( tag != null ) && ( ( tag.getChildren ( ) ) != null ) ) { for ( org.ovirt.engine.core.common.businessentities.Tags childTag : tag.getChildren ( ) ) { if ( isTagDescestorOfTag ( childTag.getTagId ( ) , potentialDescestorId ) ) { return true ; } } } return false ; }
Source:
private java.util.Map < java.lang.String , java.util.List < org.ovirt.engine.core.compat.Guid > > getIdsOfNetworkAttachmentsRelatedToInterfaceNames ( java.util.Collection < org.ovirt.engine.core.common.businessentities.network.NetworkAttachment > networkAttachments ) { java.util.Map < java.lang.String , java.util.List < org.ovirt.engine.core.compat.Guid > > map = new java.util.HashMap < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment : networkAttachments ) { org.ovirt.engine.core.utils.collections.MultiValueMapUtils.addToMap ( attachment.getNicName ( ) , attachment.getId ( ) , map , new org.ovirt.engine.core.utils.collections.MultiValueMapUtils.ListCreator < org.ovirt.engine.core.compat.Guid > ( ) ) ; } return map ; }

Target:
org.ovirt.engine.core.bll.ValidationResult notMovingLabeledNetworkToDifferentNic ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment ) { org.ovirt.engine.core.common.businessentities.network.Network movedNetwork = existingNetworkRelatedToAttachment ( attachment ) ; if ( ! ( org.ovirt.engine.core.utils.NetworkUtils.isLabeled ( movedNetwork ) ) ) { return org.ovirt.engine.core.bll.ValidationResult.VALID ; } org.ovirt.engine.core.common.businessentities.network.NetworkAttachment existingAttachment = attachmentsById.get ( attachment.getId ( ) ) ; boolean movedToDifferentNic = ! ( existingAttachment.getNicId ( ) . equals ( attachment.getNicId ( ) ) ) ; return org.ovirt.engine.core.bll.ValidationResult.failWith ( EngineMessage.ACTION_TYPE_FAILED_CANNOT_MOVE_LABELED_NETWORK_TO_ANOTHER_NIC , org.ovirt.engine.core.utils.ReplacementUtils.createSetVariableString ( org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidator.ACTION_TYPE_FAILED_CANNOT_MOVE_LABELED_NETWORK_TO_ANOTHER_NIC_ENTITY , movedNetwork.getLabel ( ) ) ) . when ( movedToDifferentNic ) ; }
Source:
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 ) ; }

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:
protected org.ovirt.engine.core.compat.Guid createTask ( org.ovirt.engine.core.compat.Guid taskId , org.ovirt.engine.core.common.asynctasks.AsyncTaskCreationInfo asyncTaskCreationInfo , org.ovirt.engine.core.common.action.VdcActionType parentCommand , org.ovirt.engine.core.common.VdcObjectType entityType , org.ovirt.engine.core.compat.Guid ... entityIds ) { return createTask ( taskId , asyncTaskCreationInfo , parentCommand , null , entityType , entityIds ) ; }

Target:
private java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.VdcObjectType > createEntitiesMapForSingleEntityType ( org.ovirt.engine.core.common.VdcObjectType entityType , org.ovirt.engine.core.compat.Guid ... entityIds ) { java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.VdcObjectType > entitiesMap = new java.util.HashMap < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.VdcObjectType > ( ) ; for ( org.ovirt.engine.core.compat.Guid entityId : entityIds ) { entitiesMap.put ( entityId , entityType ) ; } return entitiesMap ; }