auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private void mockVnicProfilePortMirroringChange ( boolean portMirroring ) { org.ovirt.engine.core.common.businessentities.network.VnicProfile vnicProfile = org.mockito.Mockito.mock ( org.ovirt.engine.core.common.businessentities.network.VnicProfile.class ) ; org.mockito.Mockito.when ( this . vnicProfile.isPortMirroring ( ) ) . thenReturn ( portMirroring ) ; org.mockito.Mockito.when ( vnicProfile.isPortMirroring ( ) ) . thenReturn ( ( ! portMirroring ) ) ; org.mockito.Mockito.when ( vnicProfileDao.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( vnicProfile ) ; }

Target:
private void mockVnicProfilePortMirroringChange ( boolean portMirroring ) { org.ovirt.engine.core.common.businessentities.network.VnicProfile vnicProfile = org.mockito.Mockito.mock ( org.ovirt.engine.core.common.businessentities.network.VnicProfile.class ) ; org.mockito.Mockito.when ( this . vnicProfile.isPortMirroring ( ) ) . thenReturn ( portMirroring ) ; org.mockito.Mockito.when ( vnicProfile.isPortMirroring ( ) ) . thenReturn ( ( ! portMirroring ) ) ; org.mockito.Mockito.when ( vnicProfileDao.get ( org.mockito.ArgumentMatchers.any ( ) ) ) . thenReturn ( vnicProfile ) ; }
Source:
public abstract void init ( T qos ) ;

Target:
private void init ( T qos , P qosParametersModel ) { setQos ( qos ) ; getName ( ) . setEntity ( qos.getName ( ) ) ; getDescription ( ) . setEntity ( qos.getDescription ( ) ) ; setQosParametersModel ( qosParametersModel ) ; getQosParametersModel ( ) . init ( qos ) ; }
Source:
public void isSupportBridgesReportByVDSM ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String version ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Boolean ) ( source ) ) . booleanValue ( ) : true ; } } ; org.ovirt.engine.core.common.queries.GetConfigurationValueParameters tempVar = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.SupportBridgesReportByVDSM ) ; tempVar.setVersion ( version ) ; getConfigFromCache ( tempVar , aQuery ) ; }

Target:
public void getProviderCertificateChain ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.businessentities.Provider provider ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return java.util.Collections.< org.ovirt.engine.core.common.businessentities.CertificateInfo > emptyList ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetProviderCertificateChain , new org.ovirt.engine.core.common.queries.ProviderQueryParameters ( provider ) , aQuery ) ; }
Source:
private void updateActionsPanels ( org.ovirt.engine.ui.uicommonweb.models.GuideModel object ) { compulsoryActionsPanel.clear ( ) ; optionalActionsPanel.clear ( ) ; for ( final org.ovirt.engine.ui.uicommonweb.UICommand command : object.getCompulsoryActions ( ) ) { addButton ( command , compulsoryActionsPanel , resources.wrenchImage ( ) ) ; } for ( final org.ovirt.engine.ui.uicommonweb.UICommand command : object.getOptionalActions ( ) ) { addButton ( command , optionalActionsPanel , resources.plusButtonImage ( ) ) ; } }

Target:
private void updateActionsPanels ( org.ovirt.engine.ui.uicommonweb.models.GuideModel object ) { compulsoryActionsPanel.clear ( ) ; optionalActionsPanel.clear ( ) ; for ( final org.ovirt.engine.ui.uicommonweb.UICommand command : object.getCompulsoryActions ( ) ) { addButton ( command , compulsoryActionsPanel , org.ovirt.engine.ui.webadmin.section.main.view.popup.guide.GuidePopupView.resources.wrenchImage ( ) ) ; } for ( final org.ovirt.engine.ui.uicommonweb.UICommand command : object.getOptionalActions ( ) ) { addButton ( command , optionalActionsPanel , org.ovirt.engine.ui.webadmin.section.main.view.popup.guide.GuidePopupView.resources.plusButtonImage ( ) ) ; } }
Source:
public void testValidEmptyCustomProerties ( ) { org.ovirt.engine.core.common.businessentities.VM vm = new org.ovirt.engine.core.common.businessentities.VM ( ) ; vm.setVdsGroupCompatibilityVersion ( Version.v3_3 ) ; java.util.List < java.lang.String > messages = new java.util.ArrayList < > ( ) ; org.junit.Assert.assertTrue ( runVmValidator.validateVmProperties ( vm , "" , messages ) ) ; org.junit.Assert.assertTrue ( messages.isEmpty ( ) ) ; }

Target:
public void testValidEmptyCustomProerties ( ) { org.ovirt.engine.core.common.businessentities.VM vm = new org.ovirt.engine.core.common.businessentities.VM ( ) ; vm.setClusterCompatibilityVersion ( Version.v3_3 ) ; java.util.List < java.lang.String > messages = new java.util.ArrayList < > ( ) ; org.junit.Assert.assertTrue ( runVmValidator.validateVmProperties ( vm , "" , messages ) ) ; org.junit.Assert.assertTrue ( messages.isEmpty ( ) ) ; }
Source:
public java.lang.Boolean convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Boolean ) ( source ) ) : java.lang.Boolean.FALSE ; }

Target:
public static void isFloppySupported ( org.ovirt.engine.ui.frontend.AsyncQuery < java.lang.Boolean > aQuery , java.lang.Integer osId , org.ovirt.engine.core.compat.Version version ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.DefaultValueConverter < > ( java.lang.Boolean.FALSE ) ; org.ovirt.engine.core.common.queries.OsQueryParameters params = new org.ovirt.engine.core.common.queries.OsQueryParameters ( org.ovirt.engine.core.common.queries.OsQueryParameters.OsRepositoryVerb.GetFloppySupport , osId , version ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.OsRepository , params , aQuery ) ; }
Source:
protected org.ovirt.engine.api.model.VM populate ( org.ovirt.engine.api.model.VM model , org.ovirt.engine.api.model.VM entity ) { java.util.Set < org.ovirt.engine.api.common.util.DetailHelper.Detail > details = org.ovirt.engine.api.common.util.DetailHelper.getDetails ( getHttpHeaders ( ) ) ; parent.addInlineDetails ( details , model ) ; addStatistics ( model , entity , uriInfo , httpHeaders ) ; parent.setPayload ( model ) ; setBallooning ( model ) ; return model ; }

Target:
protected org.ovirt.engine.api.model.VM populate ( org.ovirt.engine.api.model.VM model , org.ovirt.engine.api.model.VM entity ) { java.util.Set < org.ovirt.engine.api.common.util.DetailHelper.Detail > details = org.ovirt.engine.api.common.util.DetailHelper.getDetails ( getHttpHeaders ( ) ) ; parent.addInlineDetails ( details , model ) ; addStatistics ( model , entity , uriInfo , httpHeaders ) ; parent.setPayload ( model ) ; setBallooning ( model ) ; setCertificateInfo ( model ) ; return model ; }
Source:
private org.ovirt.engine.api.model.Disk clone ( org.ovirt.engine.api.model.Disk parent ) { org.ovirt.engine.api.model.Disk disk = new org.ovirt.engine.api.model.Disk ( ) ; disk.setId ( parent.getId ( ) ) ; if ( parent.isSetVm ( ) ) { disk.setVm ( new org.ovirt.engine.api.model.VM ( ) ) ; disk.getVm ( ) . setId ( parent.getVm ( ) . getId ( ) ) ; } return disk ; }

Target:
private org.ovirt.engine.api.model.Disk clone ( org.ovirt.engine.api.model.Disk parent ) { org.ovirt.engine.api.model.Disk disk = new org.ovirt.engine.api.model.Disk ( ) ; disk.setId ( parent.getId ( ) ) ; if ( parent.isSetVm ( ) ) { disk.setVm ( new org.ovirt.engine.api.model.Vm ( ) ) ; disk.getVm ( ) . setId ( parent.getVm ( ) . getId ( ) ) ; } return disk ; }
Source:
public void getClusterGlusterServices ( 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 ; } } ; org.ovirt.engine.core.common.queries.gluster.GlusterVolumeAdvancedDetailsParameters parameters = new org.ovirt.engine.core.common.queries.gluster.GlusterVolumeAdvancedDetailsParameters ( clusterId , null , null , false ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterVolumeAdvancedDetails , parameters , aQuery ) ; }

Target:
public void getHostPublicKey ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetServerSSHPublicKey , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , 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.EntityIdResolver < org.ovirt.engine.core.compat.Guid > ( ) { @ java.lang.Override public org.ovirt.engine.api.model.Disk lookupEntity ( org.ovirt.engine.core.compat.Guid guid ) throws org.ovirt.engine.api.restapi.resource.BackendFailureException { return collection.lookupEntity ( guid ) ; } } ; org.ovirt.engine.api.restapi.resource.DiskStatisticalQuery query = new org.ovirt.engine.api.restapi.resource.DiskStatisticalQuery ( resolver , newModel ( id ) ) ; return inject ( new org.ovirt.engine.api.restapi.resource.BackendStatisticsResource ( entityType , guid , query ) ) ; }

Target:
public org.ovirt.engine.api.resource.StatisticsResource getStatisticsResource ( ) { org.ovirt.engine.api.restapi.resource.DiskStatisticalQuery query = new org.ovirt.engine.api.restapi.resource.DiskStatisticalQuery ( new org.ovirt.engine.api.restapi.resource.BackendVmDiskResource.DiskResolver ( ) , newModel ( id ) ) ; return inject ( new org.ovirt.engine.api.restapi.resource.BackendStatisticsResource ( entityType , guid , query ) ) ; }
Source:
public void isTemplateNameUnique ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String templateName , 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 != null ) && ( ! ( ( java.lang.Boolean ) ( source ) ) ) ; } } ; org.ovirt.engine.core.common.queries.NameQueryParameters params = new org.ovirt.engine.core.common.queries.NameQueryParameters ( templateName ) ; params.setDatacenterId ( datacenterId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.IsVmTemlateWithSameNameExist , params , aQuery ) ; }

Target:
public void isVmNameUnique ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String name , 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 != null ) && ( ! ( ( java.lang.Boolean ) ( source ) ) ) ; } } ; org.ovirt.engine.core.common.queries.NameQueryParameters params = new org.ovirt.engine.core.common.queries.NameQueryParameters ( name ) ; params.setDatacenterId ( datacenterId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.IsVmWithSameNameExist , params , aQuery ) ; }
Source:
public void OnSuccess ( java.lang.Object target , java.lang.Object returnValue ) { java.lang.Object [ ] array = ( ( java.lang.Object [ ] ) ( target ) ) ; org.ovirt.engine.ui.uicommonweb.models.storage.NewEditStorageModelBehavior behavior = ( ( org.ovirt.engine.ui.uicommonweb.models.storage.NewEditStorageModelBehavior ) ( array [ 0 ] ) ) ; org.ovirt.engine.ui.uicommonweb.models.storage.IStorageModel storageModelItem = ( ( org.ovirt.engine.ui.uicommonweb.models.storage.IStorageModel ) ( array [ 1 ] ) ) ; behavior.PostUpdateItemsAvailability ( behavior , storageModelItem , ( returnValue == null ) ) ; }

Target:
public void OnSuccess ( java.lang.Object target , java.lang.Object returnValue ) { java.lang.Object [ ] array = ( ( java.lang.Object [ ] ) ( target ) ) ; org.ovirt.engine.ui.uicommonweb.models.storage.NewEditStorageModelBehavior behavior = ( ( org.ovirt.engine.ui.uicommonweb.models.storage.NewEditStorageModelBehavior ) ( array [ 0 ] ) ) ; org.ovirt.engine.ui.uicommonweb.models.storage.IStorageModel storageModelItem = ( ( org.ovirt.engine.ui.uicommonweb.models.storage.IStorageModel ) ( array [ 1 ] ) ) ; behavior.postUpdateItemsAvailability ( storageModelItem , ( returnValue == null ) ) ; }
Source:
protected org.ovirt.engine.api.model.QoSs mapCollection ( java.util.List < org.ovirt.engine.core.common.businessentities.qos.QosBase > entities ) { org.ovirt.engine.api.model.QoSs collection = new org.ovirt.engine.api.model.QoSs ( ) ; for ( org.ovirt.engine.core.common.businessentities.qos.QosBase entity : entities ) { collection.getQoSs ( ) . add ( addLinks ( populate ( map ( entity ) , entity ) ) ) ; } return collection ; }

Target:
protected org.ovirt.engine.api.model.Qoss mapCollection ( java.util.List < org.ovirt.engine.core.common.businessentities.qos.QosBase > entities ) { org.ovirt.engine.api.model.Qoss collection = new org.ovirt.engine.api.model.Qoss ( ) ; for ( org.ovirt.engine.core.common.businessentities.qos.QosBase entity : entities ) { collection.getQoss ( ) . add ( addLinks ( populate ( map ( entity ) , entity ) ) ) ; } return collection ; }
Source:
public boolean getReinitialize ( ) { return ( ( ( java.lang.Boolean ) ( getAttachFloppy ( ) . getEntity ( ) ) ) && ( ( getFloppyImage ( ) . getSelectedItem ( ) ) != null ) ) && ( getFloppyImage ( ) . getSelectedItem ( ) . equals ( "[sysprep]" ) ) ; }

Target:
public void updateIsoList ( ) { updateIsoList ( false ) ; }
Source:
public static void getVmListByClusterName ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String clusterName ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > vms = org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VM > cast ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.IVdcQueryable > ) ( source ) ) ) ; return vms ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( ( "Vms: cluster=" + clusterName ) , org.ovirt.engine.core.common.interfaces.SearchType.VM ) , aQuery ) ; }

Target:
public static void getVmConfigurationBySnapshot ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid snapshotSourceId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( org.ovirt.engine.core.common.businessentities.VM ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmConfigurationBySnapshot , new org.ovirt.engine.core.common.queries.IdQueryParameters ( snapshotSourceId ) , aQuery ) ; }
Source:
public void testGetById ( ) { org.ovirt.engine.core.common.scheduling.AffinityGroup affinityGroup = dao.get ( FixturesTool.EXISTING_AFFINITY_GROUP_ID ) ; org.junit.Assert.assertNotNull ( affinityGroup ) ; org.junit.Assert.assertEquals ( FixturesTool.EXISTING_AFFINITY_GROUP_ID , affinityGroup.getId ( ) ) ; affinityGroup = dao.get ( null ) ; org.junit.Assert.assertNull ( affinityGroup ) ; affinityGroup = dao.get ( Guid.Empty ) ; org.junit.Assert.assertNull ( affinityGroup ) ; affinityGroup = dao.get ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; org.junit.Assert.assertNull ( affinityGroup ) ; }

Target:
public void testGetById ( ) { org.ovirt.engine.core.common.scheduling.AffinityGroup affinityGroup = dao.get ( FixturesTool.EXISTING_AFFINITY_GROUP_ID ) ; org.junit.jupiter.api.Assertions.assertNotNull ( affinityGroup ) ; org.junit.jupiter.api.Assertions.assertEquals ( FixturesTool.EXISTING_AFFINITY_GROUP_ID , affinityGroup.getId ( ) ) ; affinityGroup = dao.get ( null ) ; org.junit.jupiter.api.Assertions.assertNull ( affinityGroup ) ; affinityGroup = dao.get ( Guid.Empty ) ; org.junit.jupiter.api.Assertions.assertNull ( affinityGroup ) ; affinityGroup = dao.get ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; org.junit.jupiter.api.Assertions.assertNull ( affinityGroup ) ; }
Source:
public static void GetProviderCertificateChain ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.businessentities.Provider provider ) { 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.RunQuery ( VdcQueryType.GetProviderCertificateChain , new org.ovirt.engine.core.common.queries.ProviderQueryParameters ( provider ) , aQuery ) ; }

Target:
public static void GetAllProviders ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Provider > ( ) ; } java.util.Collections.sort ( ( ( java.util.List < org.ovirt.engine.core.common.businessentities.Provider > ) ( source ) ) , new org.ovirt.engine.core.common.businessentities.comparators.NameableComparator ( ) ) ; return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllProviders , new org.ovirt.engine.core.common.queries.GetAllProvidersParameters ( ) , aQuery ) ; }
Source:
public java.lang.String getStringRepresentation ( ) { if ( ! ( valid ) ) { return null ; } java.lang.String authority = new java.lang.String ( ) ; authority += host ; if ( ! ( port.isEmpty ( ) ) ) { authority += ':' + ( port ) ; } return authority ; }

Target:
public java.lang.String getStringRepresentation ( ) { if ( ! ( valid ) ) { return null ; } java.lang.String authority = "" ; authority += host ; if ( ! ( port.isEmpty ( ) ) ) { authority += ':' + ( port ) ; } return authority ; }
Source:
protected void ExecuteVdsBrokerCommand ( ) { _result = org.ovirt.engine.core.vdsbroker.vdsbroker.HSMGetStorageDomainInfoVDSCommand.getBroker ( ) . getStorageDomainInfo ( org.ovirt.engine.core.vdsbroker.vdsbroker.HSMGetStorageDomainInfoVDSCommand.getParameters ( ) . getStorageDomainId ( ) . toString ( ) ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.HSMGetStorageDomainInfoVDSCommand.ProceedProxyReturnValue ( ) ; org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.common.businessentities.StorageDomainStatic , org.ovirt.engine.core.common.businessentities.SANState > pairSdStatic = org.ovirt.engine.core.vdsbroker.vdsbroker.HSMGetStorageDomainInfoVDSCommand.BuildStorageStaticFromXmlRpcStruct ( _result.mStorageInfo ) ; pairSdStatic.getFirst ( ) . setId ( org.ovirt.engine.core.vdsbroker.vdsbroker.HSMGetStorageDomainInfoVDSCommand.getParameters ( ) . getStorageDomainId ( ) ) ; setReturnValue ( pairSdStatic ) ; }

Target:
protected void ExecuteVdsBrokerCommand ( ) { _result = org.ovirt.engine.core.vdsbroker.vdsbroker.HSMGetStorageDomainInfoVDSCommand.getBroker ( ) . getStorageDomainInfo ( org.ovirt.engine.core.vdsbroker.vdsbroker.HSMGetStorageDomainInfoVDSCommand.getParameters ( ) . getStorageDomainId ( ) . toString ( ) ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.HSMGetStorageDomainInfoVDSCommand.proceedProxyReturnValue ( ) ; org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.common.businessentities.StorageDomainStatic , org.ovirt.engine.core.common.businessentities.SANState > pairSdStatic = org.ovirt.engine.core.vdsbroker.vdsbroker.HSMGetStorageDomainInfoVDSCommand.BuildStorageStaticFromXmlRpcStruct ( _result.mStorageInfo ) ; pairSdStatic.getFirst ( ) . setId ( org.ovirt.engine.core.vdsbroker.vdsbroker.HSMGetStorageDomainInfoVDSCommand.getParameters ( ) . getStorageDomainId ( ) ) ; setReturnValue ( pairSdStatic ) ; }
Source:
public void save ( org.ovirt.engine.core.common.businessentities.Permissions permission ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "ad_element_id" , permission.getad_element_id ( ) ) . addValue ( "id" , permission.getId ( ) ) . addValue ( "role_id" , permission.getrole_id ( ) ) . addValue ( "object_id" , permission.getObjectId ( ) ) . addValue ( "object_type_id" , permission.getObjectType ( ) . getValue ( ) ) ; getCallsHandler ( ) . executeModification ( "InsertPermission" , parameterSource ) ; }

Target:
public void save ( org.ovirt.engine.core.common.businessentities.Permissions permission ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "ad_element_id" , permission.getAdElementId ( ) ) . addValue ( "id" , permission.getId ( ) ) . addValue ( "role_id" , permission.getRoleId ( ) ) . addValue ( "object_id" , permission.getObjectId ( ) ) . addValue ( "object_type_id" , permission.getObjectType ( ) . getValue ( ) ) ; getCallsHandler ( ) . executeModification ( "InsertPermission" , parameterSource ) ; }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { getModel ( ) . getSpiceProxy ( ) . setIsChangable ( getModel ( ) . getSpiceProxyEnabled ( ) . getEntity ( ) ) ; }

Target:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel ) ( target ) ) ; model.setDataCentersAndClusters ( model , dataCenters , ( ( java.util.List < org.ovirt.engine.core.common.businessentities.VDSGroup > ) ( returnValue ) ) , null ) ; initCdImage ( ) ; getPoolModelBehaviorInitializedEvent ( ) . raise ( this , EventArgs.Empty ) ; }
Source:
private org.ovirt.engine.core.bll.context.CompensationContext createCompensationContext ( org.ovirt.engine.core.compat.TransactionScopeOption transactionScopeOption , boolean forceCompensation ) { if ( ( transactionScopeOption == ( org.ovirt.engine.core.compat.TransactionScopeOption.Suppress ) ) && ( ! forceCompensation ) ) { return org.ovirt.engine.core.bll.context.NoOpCompensationContext.getInstance ( ) ; } org.ovirt.engine.core.bll.context.DefaultCompensationContext defaultContext = new org.ovirt.engine.core.bll.context.DefaultCompensationContext ( ) ; defaultContext.setCommandId ( commandId ) ; defaultContext.setCommandType ( getClass ( ) . getName ( ) ) ; defaultContext.setBusinessEntitySnapshotDAO ( getBusinessEntitySnapshotDAO ( ) ) ; defaultContext.setSnapshotSerializer ( org.ovirt.engine.core.utils.SerializationFactory.getFactory ( ) . createSerializer ( ) ) ; return defaultContext ; }

Target:
private org.ovirt.engine.core.bll.context.CompensationContext createCompensationContext ( org.ovirt.engine.core.compat.TransactionScopeOption transactionScopeOption , boolean forceCompensation ) { if ( ( transactionScopeOption == ( org.ovirt.engine.core.compat.TransactionScopeOption.Suppress ) ) && ( ! forceCompensation ) ) { return org.ovirt.engine.core.bll.context.NoOpCompensationContext.getInstance ( ) ; } org.ovirt.engine.core.bll.context.DefaultCompensationContext defaultContext = new org.ovirt.engine.core.bll.context.DefaultCompensationContext ( ) ; defaultContext.setCommandId ( commandId ) ; defaultContext.setCommandType ( getClass ( ) . getName ( ) ) ; defaultContext.setBusinessEntitySnapshotDAO ( getBusinessEntitySnapshotDAO ( ) ) ; defaultContext.setSnapshotSerializer ( org.ovirt.engine.core.utils.SerializationFactory.getSerializer ( ) ) ; return defaultContext ; }
Source:
public void testResolveCombinedMessage ( ) { final java.lang.String message = "${first} equals one, ${second} equals two, '${blank}' equals blank and ${nonExist} is unknown" ; final java.lang.String expectedResolved = java.lang.String.format ( "one equals one, two equals two, ' ' equals blank and %1s is unknown" , AuditLogDirector.UNKNOWN_VARIABLE_VALUE ) ; java.util.Map < java.lang.String , java.lang.String > values = new java.util.HashMap < java.lang.String , java.lang.String > ( ) ; values.put ( "first" , "one" ) ; values.put ( "second" , "two" ) ; values.put ( "blank" , " " ) ; java.lang.String resolvedMessage = org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.resolveMessage ( message , values ) ; junit.framework.Assert.assertEquals ( expectedResolved , resolvedMessage ) ; }

Target:
public void testResolveCombinedMessage ( ) { final java.lang.String message = "${first} equals one, ${second} equals two, '${blank}' equals blank and ${nonExist} is unknown" ; final java.lang.String expectedResolved = java.lang.String.format ( "one equals one, two equals two, ' ' equals blank and %1s is unknown" , AuditLogDirector.UNKNOWN_VARIABLE_VALUE ) ; java.util.Map < java.lang.String , java.lang.String > values = new java.util.HashMap < java.lang.String , java.lang.String > ( ) ; values.put ( "first" , "one" ) ; values.put ( "second" , "two" ) ; values.put ( "blank" , " " ) ; java.lang.String resolvedMessage = org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.resolveMessage ( message , values ) ; org.junit.Assert.assertEquals ( expectedResolved , resolvedMessage ) ; }
Source:
protected void executeVdsBrokerCommand ( ) { infoReturn = org.ovirt.engine.core.vdsbroker.vdsbroker.GetStatsVDSCommand.getBroker ( ) . getVdsStats ( ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.GetStatsVDSCommand.proceedProxyReturnValue ( ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilder.updateVDSStatisticsData ( org.ovirt.engine.core.vdsbroker.vdsbroker.GetStatsVDSCommand.getVds ( ) , infoReturn.mInfo ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilder.checkTimeDrift ( org.ovirt.engine.core.vdsbroker.vdsbroker.GetStatsVDSCommand.getVds ( ) , infoReturn.mInfo ) ; }

Target:
protected void executeVdsBrokerCommand ( ) { infoReturn = org.ovirt.engine.core.vdsbroker.vdsbroker.GetStatsVDSCommand.getBroker ( ) . getVdsStats ( ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.GetStatsVDSCommand.proceedProxyReturnValue ( ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilder.updateVDSStatisticsData ( org.ovirt.engine.core.vdsbroker.vdsbroker.GetStatsVDSCommand.getVds ( ) , infoReturn.info ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilder.checkTimeDrift ( org.ovirt.engine.core.vdsbroker.vdsbroker.GetStatsVDSCommand.getVds ( ) , infoReturn.info ) ; }
Source:
public static java.lang.reflect.Method getGetter ( java.lang.Object o , java.lang.String name ) { java.lang.String getterName = ( org.ovirt.engine.api.utils.ReflectionHelper.GET_ROOT ) + ( org.ovirt.engine.api.utils.ReflectionHelper.capitalize ( name ) ) ; return org.ovirt.engine.api.utils.ReflectionHelper.getMethod ( o , getterName ) ; }

Target:
public static java.lang.reflect.Method getGetter ( java.lang.Object o , java.lang.String name ) { java.lang.String capitalizedName = org.ovirt.engine.api.utils.ReflectionHelper.capitalize ( name ) ; java.lang.reflect.Method method = org.ovirt.engine.api.utils.ReflectionHelper.getMethod ( o , ( ( org.ovirt.engine.api.utils.ReflectionHelper.GET_ROOT ) + capitalizedName ) ) ; return method != null ? method : org.ovirt.engine.api.utils.ReflectionHelper.getMethod ( o , ( ( org.ovirt.engine.api.utils.ReflectionHelper.IS_ROOT ) + capitalizedName ) ) ; }
Source:
private java.lang.String GetActualActionName ( ) { java.lang.String actualActionName ; switch ( org.ovirt.engine.core.vdsbroker.vdsbroker.FenceVdsVDSCommand.getParameters ( ) . getAction ( ) ) { case Restart : actualActionName = "reboot" ; break ; case Start : actualActionName = "on" ; break ; case Stop : actualActionName = "off" ; break ; default : actualActionName = "status" ; break ; } return actualActionName ; }

Target:
private java.lang.String getActualActionName ( ) { java.lang.String actualActionName ; switch ( org.ovirt.engine.core.vdsbroker.vdsbroker.FenceVdsVDSCommand.getParameters ( ) . getAction ( ) ) { case Restart : actualActionName = "reboot" ; break ; case Start : actualActionName = "on" ; break ; case Stop : actualActionName = "off" ; break ; default : actualActionName = "status" ; break ; } return actualActionName ; }
Source:
private void initVersion ( ) { if ( ! ( isVersionInit ) ) { isVersionInit = true ; for ( org.ovirt.engine.core.compat.Version item : getVersion ( ) . getItems ( ) ) { if ( item.equals ( getEntity ( ) . getcompatibility_version ( ) ) ) { getVersion ( ) . setSelectedItem ( item ) ; break ; } } } }

Target:
private void initVersion ( ) { if ( ! ( isVersionInit ) ) { isVersionInit = true ; for ( org.ovirt.engine.core.compat.Version item : getVersion ( ) . getItems ( ) ) { if ( item.equals ( getEntity ( ) . getCompatibilityVersion ( ) ) ) { getVersion ( ) . setSelectedItem ( item ) ; break ; } } } }
Source:
private void writeOwnerModels ( ) { logger.log ( Type.DEBUG , "Starting to write OwnerModels" ) ; sw.println ( ) ; sw.println ( "@Override" ) ; sw.println ( "protected java.util.Map<String, org.ovirt.engine.ui.uicommonweb.models.EntityModel> getOwnerModels() {" ) ; sw.indent ( ) ; sw.println ( "java.util.Map<String, org.ovirt.engine.ui.uicommonweb.models.EntityModel> regs = new java.util.HashMap<String, org.ovirt.engine.ui.uicommonweb.models.EntityModel>();" ) ; logger.log ( Type.DEBUG , "Going over Editor Fields" ) ; for ( com.google.gwt.editor.rebind.model.EditorData editorData : model.getEditorData ( ) ) { logger.log ( Type.DEBUG , ( "Going over Field: " + editorData ) ) ; java.lang.String path = editorData.getPath ( ) ; if ( ( path.length ( ) ) == 0 ) { continue ; } com.google.gwt.core.ext.typeinfo.JClassType propertyOwnerType = eraseType ( editorData.getPropertyOwnerType ( ) ) ; if ( ( propertyOwnerType == ( listModelType ) ) || ( propertyOwnerType == ( entityModelType ) ) ) { logger.log ( Type.DEBUG , ( "Found owner Model Field: " + editorData ) ) ; sw.println ( "regs.put(\"%s\", getObject()%s);" , path , editorData.getBeanOwnerExpression ( ) ) ; } } sw.println ( "return regs;" ) ; sw.outdent ( ) ; sw.println ( "}" ) ; }

Target:
private void writeOwnerModels ( ) { logger.log ( Type.DEBUG , "Starting to write OwnerModels" ) ; sw.println ( ) ; sw.println ( "@Override" ) ; sw.println ( "protected java.util.Map<String, org.ovirt.engine.ui.uicommonweb.models.Model> getOwnerModels() {" ) ; sw.indent ( ) ; sw.println ( "java.util.Map<String, org.ovirt.engine.ui.uicommonweb.models.Model> regs = new java.util.HashMap<String, org.ovirt.engine.ui.uicommonweb.models.Model>();" ) ; logger.log ( Type.DEBUG , "Going over Editor Fields" ) ; for ( com.google.gwt.editor.rebind.model.EditorData editorData : model.getEditorData ( ) ) { logger.log ( Type.DEBUG , ( "Going over Field: " + editorData ) ) ; java.lang.String path = editorData.getPath ( ) ; if ( ( path.length ( ) ) == 0 ) { continue ; } com.google.gwt.core.ext.typeinfo.JClassType propertyOwnerType = eraseType ( editorData.getPropertyOwnerType ( ) ) ; if ( ( propertyOwnerType == ( listModelType ) ) || ( propertyOwnerType == ( entityModelType ) ) ) { logger.log ( Type.DEBUG , ( "Found owner Model Field: " + editorData ) ) ; sw.println ( "regs.put(\"%s\", getObject()%s);" , path , editorData.getBeanOwnerExpression ( ) ) ; } } sw.println ( "return regs;" ) ; sw.outdent ( ) ; sw.println ( "}" ) ; }
Source:
public void testValidateGatewayWhenGatewayIsNull ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment = createNetworkAttachmentWithIpConfiguration ( NetworkBootProtocol.NONE , null , null ) ; attachment.setNetworkId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; attachment.getIpConfiguration ( ) . getPrimaryAddress ( ) . setGateway ( null ) ; org.junit.Assert.assertThat ( createNetworkAttachmentValidator ( attachment ) . validateGateway ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }

Target:
public void testValidateGatewayWhenGatewayIsNotSpecified ( ) throws java.lang.Exception { doTestValidateGateway ( "" , false , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }
Source:
public void init ( final java.util.List < org.ovirt.engine.core.common.businessentities.VM > externalVms , final org.ovirt.engine.core.compat.Guid storageDomainId ) { super . setItems ( new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { doInit ( storageDomainId ) ; } } , externalVms ) ; }

Target:
public void init ( final java.util.List < org.ovirt.engine.core.common.businessentities.VM > externalVms , final org.ovirt.engine.core.compat.Guid storageDomainId ) { withDataCenterLoaded ( storageDomainId , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { setItems ( new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { doInit ( ) ; } } , externalVms ) ; } } ) ; }
Source:
protected void endActionOnDisks ( ) { for ( org.ovirt.engine.core.common.action.VdcActionParametersBase p : org.ovirt.engine.core.bll.VmCommand.getParameters ( ) . getImagesParameters ( ) ) { if ( overrideChildCommandSuccess ( ) ) { p.setTaskGroupSuccess ( org.ovirt.engine.core.bll.VmCommand.getParameters ( ) . getTaskGroupSuccess ( ) ) ; } org.ovirt.engine.core.bll.VmCommand.getBackend ( ) . EndAction ( ( ( p.getCommandType ( ) ) == ( org.ovirt.engine.core.common.action.VdcActionType.Unknown ) ? getChildActionType ( ) : p.getCommandType ( ) ) , p ) ; } }

Target:
protected java.util.List < org.ovirt.engine.core.common.action.VdcActionParametersBase > getParametersForChildCommand ( ) { return org.ovirt.engine.core.bll.VmCommand.getParameters ( ) . getImagesParameters ( ) ; }
Source:
public void testRemoveForcedIncomplete ( ) throws java.lang.Exception { setUpGetEntityExpectations ( 1 ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.RemoveVds , org.ovirt.engine.core.common.action.RemoveVdsParameters.class , new java.lang.String [ ] { "VdsId" , "ForceAction" } , new java.lang.Object [ ] { GUIDS [ 0 ] , java.lang.Boolean.FALSE } , true , true ) ) ; org.ovirt.engine.api.model.Action action = new org.ovirt.engine.api.model.Action ( ) ; verifyRemove ( resource.remove ( action ) ) ; }

Target:
public void testRemoveForcedIncomplete ( ) throws java.lang.Exception { setUpGetEntityExpectations ( 1 ) ; javax.ws.rs.core.UriInfo uriInfo = setUpActionExpectations ( VdcActionType.RemoveVds , org.ovirt.engine.core.common.action.RemoveVdsParameters.class , new java.lang.String [ ] { "VdsId" , "ForceAction" } , new java.lang.Object [ ] { GUIDS [ 0 ] , java.lang.Boolean.FALSE } , true , true , false ) ; uriInfo = addMatrixParameterExpectations ( uriInfo , BackendHostResource.FORCE , java.lang.Boolean.FALSE.toString ( ) ) ; setUriInfo ( uriInfo ) ; control.replay ( ) ; verifyRemove ( resource.remove ( ) ) ; }
Source:
public void updateGlusterHookConflictStatus ( ) { dao.updateGlusterHookConflictStatus ( FixturesTool.HOOK_ID , 0 ) ; org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity hook = dao.getById ( FixturesTool.HOOK_ID ) ; org.junit.Assert.assertNotNull ( hook ) ; org.junit.Assert.assertEquals ( java.lang.Integer.valueOf ( 0 ) , hook.getConflictStatus ( ) ) ; }

Target:
public void updateGlusterHookConflictStatus ( ) { dao.updateGlusterHookConflictStatus ( FixturesTool.HOOK_ID , 0 ) ; org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity hook = dao.getById ( FixturesTool.HOOK_ID ) ; org.junit.jupiter.api.Assertions.assertNotNull ( hook ) ; org.junit.jupiter.api.Assertions.assertEquals ( java.lang.Integer.valueOf ( 0 ) , hook.getConflictStatus ( ) ) ; }
Source:
public void testAddExistingBlockDomainSuccessfully ( ) { org.mockito.Mockito.when ( command.getStorageDomainStaticDAO ( ) . get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( null ) ; org.mockito.Mockito.when ( command.getLUNsFromVgInfo ( parameters.getStorageDomain ( ) . getStorage ( ) ) ) . thenReturn ( org.ovirt.engine.core.bll.storage.AddExistingBlockStorageDomainCommandTest.getLUNs ( ) ) ; command.executeCommand ( ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getSucceeded ( ) ) ; }

Target:
public void testAddExistingBlockDomainWhenVgInfoReturnsEmptyLunList ( ) { org.mockito.Mockito.doReturn ( java.util.Collections.emptyList ( ) ) . when ( command ) . getLUNsFromVgInfo ( parameters.getStorageDomain ( ) . getStorage ( ) ) ; org.junit.Assert.assertFalse ( "Could not connect to Storage Domain" , command.canAddDomain ( ) ) ; org.junit.Assert.assertTrue ( "Import block Storage Domain should have failed due to empty Lun list returned from VGInfo " , command.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( EngineMessage.ACTION_TYPE_FAILED_PROBLEM_WITH_CANDIDATE_INFO.toString ( ) ) ) ; }
Source:
private org.ovirt.engine.core.compat.Guid getDisksStorageDomainId ( ) { for ( org.ovirt.engine.core.common.businessentities.storage.Disk disk : org.ovirt.engine.core.bll.AddDiskCommand.getVm ( ) . getDiskMap ( ) . values ( ) ) { if ( ( disk.getDiskStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.storage.Disk.DiskStorageType.IMAGE ) ) { return ( ( org.ovirt.engine.core.common.businessentities.DiskImage ) ( disk ) ) . getStorageIds ( ) . get ( 0 ) ; } } return org.ovirt.engine.core.compat.Guid.Empty ; }

Target:
private org.ovirt.engine.core.compat.Guid getDisksStorageDomainId ( ) { for ( org.ovirt.engine.core.common.businessentities.storage.Disk disk : org.ovirt.engine.core.bll.AddDiskCommand.getVm ( ) . getDiskMap ( ) . values ( ) ) { if ( ( disk.getDiskStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.storage.DiskStorageType.IMAGE ) ) { return ( ( org.ovirt.engine.core.common.businessentities.storage.DiskImage ) ( disk ) ) . getStorageIds ( ) . get ( 0 ) ; } } return org.ovirt.engine.core.compat.Guid.Empty ; }
Source:
protected int getNeededDiskSize ( org.ovirt.engine.core.compat.Guid storageId ) { double actualSize = 0 ; java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > disks = storageToDisksMap.get ( storageId ) ; for ( org.ovirt.engine.core.common.businessentities.DiskImage disk : disks ) { actualSize += disk.getActualSize ( ) ; } return ( ( int ) ( actualSize ) ) ; }

Target:
protected void chooseDisksSourceDomains ( ) { diskInfoSourceMap = new java.util.HashMap < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.DiskImage disk : org.ovirt.engine.core.bll.AddVmFromTemplateCommand.getImagesToCheckDestinationStorageDomains ( ) ) { org.ovirt.engine.core.compat.Guid diskId = disk.getId ( ) ; java.util.Set < org.ovirt.engine.core.compat.Guid > validDomainsForDisk = validDisksDomains.get ( diskId ) ; org.ovirt.engine.core.compat.Guid destinationDomain = retrieveDestinationDomainForDisk ( diskId ) ; if ( validDomainsForDisk.contains ( destinationDomain ) ) { diskInfoSourceMap.put ( diskId , destinationDomain ) ; } else { diskInfoSourceMap.put ( diskId , validDomainsForDisk.iterator ( ) . next ( ) ) ; } } }
Source:
public void testDefinedForDomain ( ) { org.ovirt.engine.core.compat.Guid domainId = quotaStorage.getStorageId ( ) ; org.junit.Assert.assertThat ( validator.isDefinedForStorageDomain ( domainId ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.ACTION_TYPE_FAILED_QUOTA_NOT_DEFINED_FOR_DOMAIN ) ) ; quota.setGlobalQuotaStorage ( quotaStorage ) ; org.junit.Assert.assertThat ( validator.isDefinedForStorageDomain ( domainId ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; quota.setGlobalQuotaStorage ( null ) ; quota.getQuotaStorages ( ) . add ( quotaStorage ) ; org.junit.Assert.assertThat ( validator.isDefinedForStorageDomain ( domainId ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }

Target:
public void testDefinedForDomain ( ) { org.ovirt.engine.core.compat.Guid domainId = quotaStorage.getStorageId ( ) ; org.hamcrest.MatcherAssert.assertThat ( validator.isDefinedForStorageDomain ( domainId ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.ACTION_TYPE_FAILED_QUOTA_NOT_DEFINED_FOR_DOMAIN ) ) ; quota.setGlobalQuotaStorage ( quotaStorage ) ; org.hamcrest.MatcherAssert.assertThat ( validator.isDefinedForStorageDomain ( domainId ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; quota.setGlobalQuotaStorage ( null ) ; quota.getQuotaStorages ( ) . add ( quotaStorage ) ; org.hamcrest.MatcherAssert.assertThat ( validator.isDefinedForStorageDomain ( domainId ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }
Source:
public void unsyncedNetworkModified ( ) { org.ovirt.engine.core.common.businessentities.network.Network net = createNetwork ( "net" ) ; org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic = createNicSyncedWithNetwork ( "nic0" , net ) ; nic.setBridged ( ( ! ( net.isVmNetwork ( ) ) ) ) ; nic.setBootProtocol ( NetworkBootProtocol.NONE ) ; mockExistingNetworks ( net ) ; mockExistingIfaces ( nic ) ; nic.setBootProtocol ( NetworkBootProtocol.DHCP ) ; org.ovirt.engine.core.bll.network.host.SetupNetworksHelper helper = createHelper ( createParametersForNics ( nic ) ) ; validateAndExpectViolation ( helper , VdcBllMessages.NETWORKS_NOT_IN_SYNC , net.getName ( ) ) ; }

Target:
public void externalNetworkAttached ( ) { org.ovirt.engine.core.common.businessentities.network.Network net = createNetwork ( "net" ) ; net.setProvidedBy ( new org.ovirt.engine.core.common.businessentities.network.ProviderNetwork ( ) ) ; mockExistingNetworks ( net ) ; org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic = createNic ( "nic0" , null ) ; mockExistingIfaces ( nic ) ; nic.setNetworkName ( net.getName ( ) ) ; org.ovirt.engine.core.bll.network.host.SetupNetworksHelper helper = createHelper ( createParametersForNics ( nic ) ) ; validateAndExpectViolation ( helper , VdcBllMessages.ACTION_TYPE_FAILED_EXTERNAL_NETWORKS_CANNOT_BE_PROVISIONED ) ; }
Source:
protected void onReveal ( ) { org.ovirt.engine.ui.uicompat.Event < org.ovirt.engine.ui.uicompat.EventArgs > entityChangedEvent = getModel ( ) . getDiskViewType ( ) . getEntityChangedEvent ( ) ; if ( ! ( entityChangedEvent.getListeners ( ) . contains ( getView ( ) . getDiskTypeChangedEventListener ( ) ) ) ) { entityChangedEvent.addListener ( getView ( ) . getDiskTypeChangedEventListener ( ) ) ; } super . onReveal ( ) ; getView ( ) . handleQuotaColumnVisibility ( ) ; }

Target:
protected void onBind ( ) { super . onBind ( ) ; org.ovirt.engine.ui.uicompat.Event < org.ovirt.engine.ui.uicompat.EventArgs > entityChangedEvent = getModel ( ) . getDiskViewType ( ) . getEntityChangedEvent ( ) ; entityChangedEvent.addListener ( getView ( ) . getDiskTypeChangedEventListener ( ) ) ; org.ovirt.engine.ui.uicompat.Event < org.ovirt.engine.ui.uicompat.EventArgs > diskContentTypeEntityChangedEvent = getModel ( ) . getDiskContentType ( ) . getEntityChangedEvent ( ) ; diskContentTypeEntityChangedEvent.addListener ( getView ( ) . getDiskContentTypeChangedEventListener ( ) ) ; }
Source:
public static 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.RunQuery ( VdcQueryType.GetStoragePoolById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) , aQuery ) ; }

Target:
public static java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmTemplate > filterTemplatesByArchitecture ( java.util.List < org.ovirt.engine.core.common.businessentities.VmTemplate > list , org.ovirt.engine.core.common.businessentities.ArchitectureType architecture ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmTemplate > filteredList = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmTemplate > ( ) ; for ( org.ovirt.engine.core.common.businessentities.VmTemplate template : list ) { if ( ( template.getId ( ) . equals ( Guid.Empty ) ) || ( template.getClusterArch ( ) . equals ( architecture ) ) ) { filteredList.add ( template ) ; } } return filteredList ; }
Source:
private void updateSpiceUsbAutoShare ( final org.ovirt.engine.ui.uicommonweb.models.vms.ISpice spice ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetSpiceUsbAutoShare ( 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 ) { spice.setUsbAutoShare ( ( ( java.lang.Boolean ) ( returnValue ) ) ) ; } } ) ) ; }

Target:
private void updateSpiceUsbAutoShare ( final org.ovirt.engine.ui.uicommonweb.models.vms.ISpice spice ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getSpiceUsbAutoShare ( 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 ) { spice.setUsbAutoShare ( ( ( java.lang.Boolean ) ( returnValue ) ) ) ; } } ) ) ; }
Source:
protected void handleAutoLogin ( org.ovirt.engine.ui.common.auth.AutoLoginData autoLoginData ) { final org.ovirt.engine.core.common.businessentities.DbUser loggedUser = autoLoginData.getDbUser ( ) ; com.google.gwt.core.client.Scheduler.get ( ) . scheduleDeferred ( new com.google.gwt.core.client.Scheduler.ScheduledCommand ( ) { @ java.lang.Override public void execute ( ) { lockInteractionManager.showLoadingIndicator ( ) ; getLoginModel ( ) . autoLogin ( loggedUser ) ; } } ) ; org.ovirt.engine.ui.frontend.communication.SSOTokenChangeEvent.fire ( eventBus , org.ovirt.engine.ui.common.auth.SSOTokenData.instance ( ) . getToken ( ) ) ; user.setAutoLogin ( true ) ; }

Target:
protected void handleAutoLogin ( org.ovirt.engine.ui.common.auth.AutoLoginData autoLoginData ) { final org.ovirt.engine.core.common.businessentities.aaa.DbUser loggedUser = autoLoginData.getDbUser ( ) ; com.google.gwt.core.client.Scheduler.get ( ) . scheduleDeferred ( new com.google.gwt.core.client.Scheduler.ScheduledCommand ( ) { @ java.lang.Override public void execute ( ) { lockInteractionManager.showLoadingIndicator ( ) ; getLoginModel ( ) . autoLogin ( loggedUser ) ; } } ) ; org.ovirt.engine.ui.frontend.communication.SSOTokenChangeEvent.fire ( eventBus , org.ovirt.engine.ui.common.auth.SSOTokenData.instance ( ) . getToken ( ) ) ; user.setAutoLogin ( true ) ; }