auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
protected void executeCommand ( ) { providerDao.update ( getProvider ( ) ) ; org.ovirt.engine.core.bll.provider.ProviderProxy providerProxy = org.ovirt.engine.core.bll.provider.ProviderProxyFactory.getInstance ( ) . create ( getProvider ( ) ) ; if ( providerProxy != null ) { providerProxy.onModification ( ) ; } org.ovirt.engine.core.bll.provider.UpdateProviderCommand.setSucceeded ( true ) ; }

Target:
protected void executeCommand ( ) { providerDao.update ( getProvider ( ) ) ; org.ovirt.engine.core.bll.provider.ProviderProxy providerProxy = providerProxyFactory.create ( getProvider ( ) ) ; if ( providerProxy != null ) { providerProxy.onModification ( ) ; } org.ovirt.engine.core.bll.provider.UpdateProviderCommand.setSucceeded ( true ) ; }
Source:
private org.ovirt.engine.core.compat.Guid getStoragePoolId ( ) { org.ovirt.engine.core.compat.Guid result = null ; org.ovirt.engine.core.common.queries.GetVmTemplateParameters params = org.ovirt.engine.core.bll.GetVmTemplateQuery.getParameters ( ) ; if ( ( params.getDataCenterId ( ) ) != null ) { result = params.getDataCenterId ( ) ; } else if ( ( params.getClusterId ( ) ) != null ) { org.ovirt.engine.core.common.businessentities.VDSGroup vdsGroup = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVdsGroupDao ( ) . get ( params.getClusterId ( ) ) ; if ( vdsGroup != null ) { result = vdsGroup.getStoragePoolId ( ) ; } } return result ; }

Target:
private org.ovirt.engine.core.compat.Guid getStoragePoolId ( ) { org.ovirt.engine.core.compat.Guid result = null ; org.ovirt.engine.core.common.queries.GetVmTemplateParameters params = org.ovirt.engine.core.bll.GetVmTemplateQuery.getParameters ( ) ; if ( ( params.getDataCenterId ( ) ) != null ) { result = params.getDataCenterId ( ) ; } else if ( ( params.getClusterId ( ) ) != null ) { org.ovirt.engine.core.common.businessentities.Cluster cluster = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getClusterDao ( ) . get ( params.getClusterId ( ) ) ; if ( cluster != null ) { result = cluster.getStoragePoolId ( ) ; } } return result ; }
Source:
protected org.ovirt.engine.core.bll.ValidationResult validateInterfacesAttachedToVmNetworks ( final java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > clusterNetworks , java.util.Set < java.lang.String > interfaceNetworkNames ) { java.util.List < java.lang.String > nonVmNetworkNames = org.ovirt.engine.core.utils.NetworkUtils.filterNonVmNetworkNames ( clusterNetworks , interfaceNetworkNames ) ; return nonVmNetworkNames.isEmpty ( ) ? org.ovirt.engine.core.bll.ValidationResult.VALID : new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.ACTION_TYPE_FAILED_NOT_A_VM_NETWORK , java.lang.String.format ( "$networks %1$s" , org.apache.commons.lang.StringUtils.join ( nonVmNetworkNames , "," ) ) ) ; }

Target:
protected org.ovirt.engine.core.bll.ValidationResult validateInterfacesAttachedToVmNetworks ( final java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > clusterNetworks , java.util.Set < java.lang.String > interfaceNetworkNames ) { java.util.List < java.lang.String > nonVmNetworkNames = org.ovirt.engine.core.utils.NetworkUtils.filterNonVmNetworkNames ( clusterNetworks , interfaceNetworkNames ) ; return nonVmNetworkNames.isEmpty ( ) ? org.ovirt.engine.core.bll.ValidationResult.VALID : new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_NOT_A_VM_NETWORK , java.lang.String.format ( "$networks %1$s" , org.apache.commons.lang.StringUtils.join ( nonVmNetworkNames , "," ) ) ) ; }
Source:
public void initTable ( ) { org.ovirt.engine.ui.common.widget.uicommon.permissions.PermissionListModelTable.getTable ( ) . enableColumnResizing ( ) ; addTypeColumn ( org.ovirt.engine.ui.common.widget.uicommon.permissions.PermissionListModelTable.constants ) ; addUserColumn ( org.ovirt.engine.ui.common.widget.uicommon.permissions.PermissionListModelTable.constants ) ; addAuthzColumn ( org.ovirt.engine.ui.common.widget.uicommon.permissions.PermissionListModelTable.constants ) ; addNameSpaceColumn ( org.ovirt.engine.ui.common.widget.uicommon.permissions.PermissionListModelTable.constants ) ; addRoleColumn ( org.ovirt.engine.ui.common.widget.uicommon.permissions.PermissionListModelTable.constants ) ; addCreationDateColum ( org.ovirt.engine.ui.common.widget.uicommon.permissions.PermissionListModelTable.constants ) ; addAddPermissionsButton ( org.ovirt.engine.ui.common.widget.uicommon.permissions.PermissionListModelTable.constants ) ; addRemovePermissionsButton ( org.ovirt.engine.ui.common.widget.uicommon.permissions.PermissionListModelTable.constants ) ; }

Target:
private void addCreationDateColum ( ) { org.ovirt.engine.ui.common.widget.table.column.AbstractTextColumn < org.ovirt.engine.core.common.businessentities.Permission > creationDateColumn = new org.ovirt.engine.ui.common.widget.table.column.AbstractRenderedTextColumn < org.ovirt.engine.core.common.businessentities.Permission , java.util.Date > ( new org.ovirt.engine.ui.common.widget.renderer.FullDateTimeRenderer ( ) ) { @ java.lang.Override public java.util.Date getRawValue ( org.ovirt.engine.core.common.businessentities.Permission object ) { return new java.util.Date ( ( ( object.getCreationDate ( ) ) * 1000 ) ) ; } } ; org.ovirt.engine.ui.common.widget.uicommon.permissions.PermissionListModelTable.getTable ( ) . addColumn ( creationDateColumn , org.ovirt.engine.ui.common.widget.uicommon.permissions.PermissionListModelTable.constants.permissionsCreationDate ( ) , "300px" ) ; creationDateColumn.makeSortable ( ) ; }
Source:
protected void setUpGetGraphicsExpectations ( int times ) throws java.lang.Exception { for ( int i = 0 ; i < times ; i ++ ) { setUpGetEntityExpectations ( VdcQueryType.GetGraphicsDevices , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ i ] } , java.util.Arrays.asList ( new org.ovirt.engine.core.common.businessentities.GraphicsDevice ( org.ovirt.engine.core.common.utils.VmDeviceType.SPICE ) ) ) ; } }

Target:
protected void setUpGetGraphicsExpectations ( int times ) throws java.lang.Exception { for ( int i = 0 ; i < times ; i ++ ) { setUpGetEntityExpectations ( VdcQueryType.GetGraphicsDevices , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ i ] } , java.util.Collections.singletonList ( new org.ovirt.engine.core.common.businessentities.GraphicsDevice ( org.ovirt.engine.core.common.utils.VmDeviceType.SPICE ) ) ) ; } }
Source:
public void executeCommandWhenFailed ( ) { cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.gluster.EnableGlusterHookCommand ( new org.ovirt.engine.core.common.action.gluster.GlusterHookParameters ( CLUSTER_ID , HOOK_ID ) ) ) ; setupMocks ( cmd ) ; mockBackendStatusChange ( cmd , false ) ; cmd.executeCommand ( ) ; org.mockito.Mockito.verify ( cmd , org.mockito.Mockito.never ( ) ) . addServerHookInDb ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.gluster.GlusterServerHook.class ) ) ; org.junit.Assert.assertEquals ( cmd.getAuditLogTypeValue ( ) , AuditLogType.GLUSTER_HOOK_ENABLE_FAILED ) ; }

Target:
public void executeCommandWhenFailed ( ) { cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.gluster.EnableGlusterHookCommand ( new org.ovirt.engine.core.common.action.gluster.GlusterHookStatusChangeParameters ( CLUSTER_ID , HOOK_ID ) ) ) ; setupMocks ( cmd ) ; mockBackendStatusChange ( cmd , false ) ; cmd.executeCommand ( ) ; org.mockito.Mockito.verify ( cmd , org.mockito.Mockito.never ( ) ) . addServerHookInDb ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.gluster.GlusterServerHook.class ) ) ; org.junit.Assert.assertEquals ( cmd.getAuditLogTypeValue ( ) , AuditLogType.GLUSTER_HOOK_ENABLE_FAILED ) ; }
Source:
public void aliasGeneration ( ) { java.util.Calendar calendar = java.util.Calendar.getInstance ( ) ; calendar.set ( java.util.Calendar.YEAR , 1981 ) ; calendar.set ( java.util.Calendar.MONTH , java.util.Calendar.NOVEMBER ) ; calendar.set ( java.util.Calendar.DAY_OF_MONTH , 16 ) ; calendar.set ( java.util.Calendar.HOUR_OF_DAY , 12 ) ; calendar.set ( java.util.Calendar.MINUTE , 34 ) ; calendar.set ( java.util.Calendar.SECOND , 56 ) ; org.junit.Assert.assertEquals ( "Wrong generated alias" , "RegisteredDisk_1981-11-16_12-34-56" , org.ovirt.engine.core.bll.storage.disk.image.RegisterDiskCommand.generateDefaultAliasForRegiteredDisk ( calendar ) ) ; }

Target:
public void aliasGeneration ( ) { java.util.Calendar calendar = java.util.Calendar.getInstance ( ) ; calendar.set ( java.util.Calendar.YEAR , 1981 ) ; calendar.set ( java.util.Calendar.MONTH , java.util.Calendar.NOVEMBER ) ; calendar.set ( java.util.Calendar.DAY_OF_MONTH , 16 ) ; calendar.set ( java.util.Calendar.HOUR_OF_DAY , 12 ) ; calendar.set ( java.util.Calendar.MINUTE , 34 ) ; calendar.set ( java.util.Calendar.SECOND , 56 ) ; org.junit.jupiter.api.Assertions.assertEquals ( "RegisteredDisk_1981-11-16_12-34-56" , org.ovirt.engine.core.bll.storage.disk.image.RegisterDiskCommand.generateDefaultAliasForRegiteredDisk ( calendar ) , "Wrong generated alias" ) ; }
Source:
protected void executeQueryCommand ( ) { java.lang.String domain = org.ovirt.engine.core.bll.GetDirectoryUserByIdQuery.getParameters ( ) . getDomain ( ) ; org.ovirt.engine.core.compat.Guid id = org.ovirt.engine.core.bll.GetDirectoryUserByIdQuery.getParameters ( ) . getId ( ) ; org.ovirt.engine.core.bll.adbroker.LdapBroker broker = org.ovirt.engine.core.bll.adbroker.LdapFactory.getInstance ( domain ) ; org.ovirt.engine.core.common.businessentities.LdapUser user = ( ( org.ovirt.engine.core.common.businessentities.LdapUser ) ( broker.RunAdAction ( AdActionType.GetAdUserByUserId , new org.ovirt.engine.core.bll.adbroker.LdapSearchByIdParameters ( domain , id ) ) . getReturnValue ( ) ) ) ; org.ovirt.engine.core.bll.GetDirectoryUserByIdQuery.getQueryReturnValue ( ) . setReturnValue ( user ) ; }

Target:
protected void executeQueryCommand ( ) { java.lang.String domain = org.ovirt.engine.core.bll.GetDirectoryUserByIdQuery.getParameters ( ) . getDomain ( ) ; org.ovirt.engine.core.compat.Guid id = org.ovirt.engine.core.bll.GetDirectoryUserByIdQuery.getParameters ( ) . getId ( ) ; org.ovirt.engine.core.bll.adbroker.LdapBroker broker = org.ovirt.engine.core.bll.adbroker.LdapFactory.getInstance ( domain ) ; org.ovirt.engine.core.common.businessentities.LdapUser user = ( ( org.ovirt.engine.core.common.businessentities.LdapUser ) ( broker.runAdAction ( AdActionType.GetAdUserByUserId , new org.ovirt.engine.core.bll.adbroker.LdapSearchByIdParameters ( domain , id ) ) . getReturnValue ( ) ) ) ; org.ovirt.engine.core.bll.GetDirectoryUserByIdQuery.getQueryReturnValue ( ) . setReturnValue ( user ) ; }
Source:
protected void executeQueryCommand ( ) { final java.lang.String directoryName = org.ovirt.engine.core.bll.GetDirectoryGroupByIdQuery.getParameters ( ) . getDomain ( ) ; final java.lang.String id = org.ovirt.engine.core.bll.GetDirectoryGroupByIdQuery.getParameters ( ) . getId ( ) ; final org.ovirt.engine.core.extensions.mgr.ExtensionProxy authz = org.ovirt.engine.core.aaa.AuthenticationProfileRepository.getInstance ( ) . getAuthz ( directoryName ) ; if ( authz == null ) { org.ovirt.engine.core.bll.GetDirectoryGroupByIdQuery.getQueryReturnValue ( ) . setSucceeded ( false ) ; } else { final org.ovirt.engine.core.aaa.DirectoryGroup group = org.ovirt.engine.core.aaa.AuthzUtils.findGroupById ( authz , id ) ; org.ovirt.engine.core.bll.GetDirectoryGroupByIdQuery.getQueryReturnValue ( ) . setReturnValue ( group ) ; } }

Target:
protected void executeQueryCommand ( ) { final java.lang.String directoryName = org.ovirt.engine.core.bll.GetDirectoryGroupByIdQuery.getParameters ( ) . getDomain ( ) ; final java.lang.String id = org.ovirt.engine.core.bll.GetDirectoryGroupByIdQuery.getParameters ( ) . getId ( ) ; final org.ovirt.engine.core.extensions.mgr.ExtensionProxy authz = org.ovirt.engine.core.utils.extensionsmgr.EngineExtensionsManager.getInstance ( ) . getExtensionByName ( directoryName ) ; if ( authz == null ) { org.ovirt.engine.core.bll.GetDirectoryGroupByIdQuery.getQueryReturnValue ( ) . setSucceeded ( false ) ; } else { final org.ovirt.engine.core.aaa.DirectoryGroup group = org.ovirt.engine.core.aaa.AuthzUtils.findGroupById ( authz , id ) ; org.ovirt.engine.core.bll.GetDirectoryGroupByIdQuery.getQueryReturnValue ( ) . setReturnValue ( group ) ; } }
Source:
public void getSpecParams ( ) { command.getParameters ( ) . setAction ( VmWatchdogAction.RESET ) ; command.getParameters ( ) . setModel ( vmWatchdogType ) ; java.util.Map < java.lang.String , java.lang.Object > specParams = command.getSpecParams ( ) ; org.junit.Assert.assertNotNull ( specParams ) ; org.junit.Assert.assertEquals ( "i6300esb" , specParams.get ( "model" ) ) ; org.junit.Assert.assertEquals ( "reset" , specParams.get ( "action" ) ) ; }

Target:
public void getSpecParams ( ) { command.getParameters ( ) . setAction ( VmWatchdogAction.RESET ) ; command.getParameters ( ) . setModel ( vmWatchdogType ) ; java.util.Map < java.lang.String , java.lang.Object > specParams = command.getSpecParams ( ) ; org.junit.jupiter.api.Assertions.assertNotNull ( specParams ) ; org.junit.jupiter.api.Assertions.assertEquals ( "i6300esb" , specParams.get ( "model" ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( "reset" , specParams.get ( "action" ) ) ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult qosExistsOrNull ( ) { return ( ( getProfile ( ) . getQosId ( ) ) == null ) || ( ( getDbFacade ( ) . getStorageQosDao ( ) . get ( getProfile ( ) . getQosId ( ) ) ) != null ) ? org.ovirt.engine.core.bll.ValidationResult.VALID : new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_QOS_NOT_FOUND ) ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult qosExistsOrNull ( ) { return ( ( getProfile ( ) . getQosId ( ) ) == null ) || ( ( storageQosDao.get ( getProfile ( ) . getQosId ( ) ) ) != null ) ? org.ovirt.engine.core.bll.ValidationResult.VALID : new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_QOS_NOT_FOUND ) ; }
Source:
public void ExecuteCommand ( org.ovirt.engine.ui.uicommonweb.UICommand command ) { super . ExecuteCommand ( command ) ; if ( command == ( getTestCommand ( ) ) ) { Test ( ) ; } }

Target:
public void eventRaised ( org.ovirt.engine.core.compat.Event ev , java.lang.Object sender , org.ovirt.engine.core.compat.EventArgs args ) { super . eventRaised ( ev , sender , args ) ; if ( ( ev.equals ( ListModel.SelectedItemChangedEventDefinition ) ) && ( sender == ( getDataCenter ( ) ) ) ) { DataCenter_SelectedItemChanged ( ) ; } else if ( ( ev.equals ( ListModel.SelectedItemChangedEventDefinition ) ) && ( sender == ( getCluster ( ) ) ) ) { Cluster_SelectedItemChanged ( ) ; } else if ( sender == ( getConsoleAddressEnabled ( ) ) ) { consoleAddressChanged ( ) ; } }
Source:
public void ExecuteCommand ( org.ovirt.engine.ui.uicommonweb.UICommand command ) { super . ExecuteCommand ( command ) ; if ( command == ( getRefreshCommand ( ) ) ) { refreshModel ( ) ; UpdatePagingAvailability ( ) ; } }

Target:
public void ExecuteCommand ( org.ovirt.engine.ui.uicommonweb.UICommand command ) { super . ExecuteCommand ( command ) ; if ( command == ( getRefreshCommand ( ) ) ) { refreshModel ( ) ; UpdatePagingAvailability ( ) ; } else if ( command == ( getDetailsCommand ( ) ) ) { details ( ) ; } else if ( org.ovirt.engine.core.compat.StringHelper.stringsEqual ( command.getName ( ) , "Cancel" ) ) { cancel ( ) ; } }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc extendImageTransferSession ( java.lang.String ticketId , long expiration ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "Host.extendImageTransferSession" ) . withParameter ( "ticketUUID" , ticketId ) . withParameter ( "expiration" , expiration ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( response ) ; }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.PrepareImageReturnForXmlRpc prepareImage ( java.lang.String spID , java.lang.String sdID , java.lang.String imageID , java.lang.String volumeID ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "Image.prepare" ) . withParameter ( "storagepoolID" , spID ) . withParameter ( "storagedomainID" , sdID ) . withParameter ( "imageID" , imageID ) . withParameter ( "volumeID" , volumeID ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.PrepareImageReturnForXmlRpc ( response ) ; }
Source:
protected void executeQueryCommand ( ) { org.ovirt.engine.core.common.businessentities.VDS vds = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVdsDao ( ) . get ( org.ovirt.engine.core.bll.GetVdsFenceStatusQuery.getParameters ( ) . getId ( ) ) ; org.ovirt.engine.core.bll.pm.HostFenceActionExecutor executor = new org.ovirt.engine.core.bll.pm.HostFenceActionExecutor ( vds ) ; org.ovirt.engine.core.bll.GetVdsFenceStatusQuery.getQueryReturnValue ( ) . setReturnValue ( executor.fence ( FenceActionType.STATUS ) ) ; }

Target:
protected void executeQueryCommand ( ) { org.ovirt.engine.core.common.businessentities.VDS vds = vdsDao.get ( org.ovirt.engine.core.bll.GetVdsFenceStatusQuery.getParameters ( ) . getId ( ) ) ; org.ovirt.engine.core.bll.pm.HostFenceActionExecutor executor = new org.ovirt.engine.core.bll.pm.HostFenceActionExecutor ( vds ) ; org.ovirt.engine.core.bll.GetVdsFenceStatusQuery.getQueryReturnValue ( ) . setReturnValue ( executor.fence ( FenceActionType.STATUS ) ) ; }
Source:
public static void getSpiceUsbAutoShare ( 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.Boolean ) ( source ) ) . booleanValue ( ) : true ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.SpiceUsbAutoShare , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public static void getClusterById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVdsGroupById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
private void preSavePhase2 ( ) { final org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel ) ( org.ovirt.engine.ui.uicommonweb.models.vms.VmListModel.getWindow ( ) ) ) ; org.ovirt.engine.ui.uicommonweb.models.EntityModel < java.lang.String > cpuPinning = model.getCpuPinning ( ) ; if ( ( ( ! ( cpuPinning.getIsChangable ( ) ) ) && ( ( cpuPinning.getEntity ( ) ) != null ) ) && ( ! ( cpuPinning.getEntity ( ) . isEmpty ( ) ) ) ) { confirmCpuPinningLost ( ) ; } else { preSavePhase3 ( ) ; } }

Target:
private void setGlobalHaMaintenance ( boolean enabled ) { org.ovirt.engine.core.common.businessentities.VM vm = org.ovirt.engine.ui.uicommonweb.models.vms.VmListModel.getSelectedItem ( ) ; if ( vm == null ) { return ; } if ( ! ( vm.isHostedEngine ( ) ) ) { return ; } org.ovirt.engine.core.common.action.SetHaMaintenanceParameters params = new org.ovirt.engine.core.common.action.SetHaMaintenanceParameters ( vm.getRunOnVds ( ) , org.ovirt.engine.core.common.businessentities.HaMaintenanceMode.GLOBAL , enabled ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runAction ( VdcActionType.SetHaMaintenance , params ) ; }
Source:
private void vnicProfileNotUsedByVmsTest ( org.hamcrest.Matcher < org.ovirt.engine.core.bll.ValidationResult > matcher , java.util.List < org.ovirt.engine.core.common.businessentities.VM > vms ) { org.mockito.Mockito.when ( vmDao.getAllForVnicProfile ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( vms ) ; org.junit.Assert.assertThat ( validator.vnicProfileNotUsedByVms ( ) , matcher ) ; }

Target:
private void vnicProfileNotUsedByVmsTest ( org.hamcrest.Matcher < org.ovirt.engine.core.bll.ValidationResult > matcher , java.util.List < org.ovirt.engine.core.common.businessentities.VM > vms ) { mockVmsUsingVnicProfile ( vms ) ; org.junit.Assert.assertThat ( validator.vnicProfileNotUsedByVms ( ) , matcher ) ; }
Source:
protected org.ovirt.engine.api.model.GlusterBrick addParents ( org.ovirt.engine.api.model.GlusterBrick model ) { org.ovirt.engine.api.model.GlusterVolume volume = new org.ovirt.engine.api.model.GlusterVolume ( ) ; volume.setId ( getVolumeId ( ) ) ; org.ovirt.engine.api.model.Cluster cluster = new org.ovirt.engine.api.model.Cluster ( ) ; cluster.setId ( getClusterId ( ) ) ; volume.setCluster ( cluster ) ; model.setGlusterVolume ( volume ) ; return model ; }

Target:
protected org.ovirt.engine.api.model.GlusterBrick doPopulate ( org.ovirt.engine.api.model.GlusterBrick model , org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity entity ) { return populateAdvancedDetails ( model , entity ) ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult validStatusForActivation ( ) { if ( vds.getStatus ( ) . equals ( VDSStatus.Up ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.VDS_ALREADY_UP ) ; } return ValidationResult.VALID ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult validateStatusForActivation ( ) { org.ovirt.engine.core.bll.ValidationResult existsValidation = exists ( ) ; if ( ! ( existsValidation.isValid ( ) ) ) { return existsValidation ; } if ( ( org.ovirt.engine.core.common.businessentities.VDSStatus.Up ) == ( vds.getStatus ( ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.VDS_ALREADY_UP ) ; } if ( ( org.ovirt.engine.core.common.businessentities.VDSStatus.NonResponsive ) == ( vds.getStatus ( ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.VDS_NON_RESPONSIVE ) ; } return ValidationResult.VALID ; }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs pcArgs = ( ( org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ) ( args ) ) ; if ( "IsAvailable" . equals ( pcArgs.PropertyName ) ) { boolean isAvailable = modelProvider.getModel ( ) . getIsAvailable ( ) ; setAccessible ( isAvailable ) ; } }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs pcArgs = ( ( org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ) ( args ) ) ; if ( "IsAvailable" . equals ( pcArgs.propertyName ) ) { boolean isAvailable = modelProvider.getModel ( ) . getIsAvailable ( ) ; setAccessible ( isAvailable ) ; } org.ovirt.engine.ui.common.widget.tab.TabAccessibleChangeEvent.fire ( this , this ) ; }
Source:
public static void isClusterEmpty ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return ( ( java.lang.Boolean ) ( source ) ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.IsClusterEmpty , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
public static void getClusterById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVdsGroupById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
public void testApprove ( ) throws java.lang.Exception { setUriInfo ( setUpActionExpectations ( VdcActionType.ApproveVds , org.ovirt.engine.core.common.action.ApproveVdsParameters.class , new java.lang.String [ ] { "VdsId" } , new java.lang.Object [ ] { GUIDS [ 0 ] } ) ) ; verifyActionResponse ( resource.approve ( new org.ovirt.engine.api.model.Action ( ) ) ) ; }

Target:
public void testApprove ( ) throws java.lang.Exception { setUriInfo ( setUpActionExpectations ( VdcActionType.ApproveVds , org.ovirt.engine.core.common.action.hostdeploy.ApproveVdsParameters.class , new java.lang.String [ ] { "VdsId" } , new java.lang.Object [ ] { GUIDS [ 0 ] } ) ) ; verifyActionResponse ( resource.approve ( new org.ovirt.engine.api.model.Action ( ) ) ) ; }
Source:
public void equalSpaceThreshold ( ) { org.ovirt.engine.core.bll.command.utils.StorageDomainSpaceCheckerTest.SpaceTestSettings settings = new org.ovirt.engine.core.bll.command.utils.StorageDomainSpaceCheckerTest.SpaceTestSettings ( ) ; settings.diskSpaceFree = 5 ; settings.diskSpaceUsed = 5 ; settings.spaceThresholdGB = 5 ; settings.spaceThresholdPct = 10 ; org.ovirt.engine.core.common.businessentities.storage_domains domain = setupForSpaceTest ( settings ) ; org.junit.Assert.assertFalse ( org.ovirt.engine.core.bll.command.utils.StorageDomainSpaceChecker.isBelowThresholds ( domain ) ) ; }

Target:
public void equalSpaceThreshold ( ) { org.ovirt.engine.core.bll.command.utils.StorageDomainSpaceCheckerTest.SpaceTestSettings settings = new org.ovirt.engine.core.bll.command.utils.StorageDomainSpaceCheckerTest.SpaceTestSettings ( ) ; settings.diskSpaceFree = 5 ; settings.diskSpaceUsed = 5 ; settings.spaceThresholdGB = 5 ; settings.spaceThresholdPct = 10 ; org.ovirt.engine.core.common.businessentities.storage_domains domain = setupForSpaceTest ( settings ) ; org.junit.Assert.assertFalse ( org.ovirt.engine.core.bll.command.utils.StorageDomainSpaceChecker.isWithinThresholds ( domain ) ) ; }
Source:
void localize ( org.ovirt.engine.ui.webadmin.ApplicationConstants constants ) { pathLabel.setText ( constants.storagePopupPosixPathLabel ( ) ) ; pathHintLabel.setText ( constants.storagePopupGlusterPathHintLabel ( ) ) ; vfsTypeLabel.setText ( constants.storagePopupVfsTypeLabel ( ) ) ; mountOptionsLabel.setText ( constants.storagePopupMountOptionsLabel ( ) ) ; }

Target:
void localize ( ) { pathLabel.setText ( org.ovirt.engine.ui.webadmin.section.main.view.popup.storage.GlusterStorageView.constants.storagePopupPosixPathLabel ( ) ) ; pathHintLabel.setText ( org.ovirt.engine.ui.webadmin.section.main.view.popup.storage.GlusterStorageView.constants.storagePopupGlusterPathHintLabel ( ) ) ; vfsTypeLabel.setText ( org.ovirt.engine.ui.webadmin.section.main.view.popup.storage.GlusterStorageView.constants.storagePopupVfsTypeLabel ( ) ) ; mountOptionsLabel.setText ( org.ovirt.engine.ui.webadmin.section.main.view.popup.storage.GlusterStorageView.constants.storagePopupMountOptionsLabel ( ) ) ; }
Source:
public void testGetAllForProvider ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.NetworkView > result = dao.getAllForProvider ( FixturesTool.PROVIDER_ID ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.NetworkView network : result ) { org.junit.Assert.assertEquals ( FixturesTool.PROVIDER_ID , network.getProvidedBy ( ) . getProviderId ( ) ) ; org.junit.Assert.assertEquals ( FixturesTool.PROVIDER_NAME , network.getProviderName ( ) ) ; } }

Target:
public void testGetAllForProvider ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.NetworkView > result = dao.getAllForProvider ( FixturesTool.PROVIDER_ID ) ; org.junit.jupiter.api.Assertions.assertNotNull ( result ) ; org.junit.jupiter.api.Assertions.assertFalse ( result.isEmpty ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.NetworkView network : result ) { org.junit.jupiter.api.Assertions.assertEquals ( FixturesTool.PROVIDER_ID , network.getProvidedBy ( ) . getProviderId ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( FixturesTool.PROVIDER_NAME , network.getProviderName ( ) ) ; } }
Source:
protected boolean validateCreateAllSnapshotsFromVmCommand ( ) { org.ovirt.engine.core.common.action.VdcReturnValueBase returnValue = org.ovirt.engine.core.bll.tasks.CommandHelper.validate ( VdcActionType.CreateAllSnapshotsFromVm , getCreateSnapshotParameters ( ) , org.ovirt.engine.core.bll.storage.lsm.LiveMigrateVmDisksCommand.getContext ( ) . clone ( ) ) ; if ( ! ( returnValue.isValid ( ) ) ) { org.ovirt.engine.core.bll.storage.lsm.LiveMigrateVmDisksCommand.getReturnValue ( ) . setValidationMessages ( returnValue.getValidationMessages ( ) ) ; return false ; } return true ; }

Target:
protected boolean validateCreateAllSnapshotsFromVmCommand ( ) { org.ovirt.engine.core.common.action.VdcReturnValueBase returnValue = org.ovirt.engine.core.bll.tasks.CommandHelper.validate ( ActionType.CreateAllSnapshotsFromVm , getCreateSnapshotParameters ( ) , org.ovirt.engine.core.bll.storage.lsm.LiveMigrateVmDisksCommand.getContext ( ) . clone ( ) ) ; if ( ! ( returnValue.isValid ( ) ) ) { org.ovirt.engine.core.bll.storage.lsm.LiveMigrateVmDisksCommand.getReturnValue ( ) . setValidationMessages ( returnValue.getValidationMessages ( ) ) ; return false ; } return true ; }
Source:
public org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity getByName ( org.ovirt.engine.core.compat.Guid clusterId , java.lang.String glusterCommand , org.ovirt.engine.core.common.businessentities.gluster.GlusterHookStage stage , java.lang.String hookName ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity glusterHook = getCallsHandler ( ) . executeRead ( "GetGlusterHookByName" , org.ovirt.engine.core.dao.gluster.GlusterHooksDaoDbFacadeImpl.glusterHookRowMapper , getCustomMapSqlParameterSource ( ) . addValue ( "cluster_id" , clusterId ) . addValue ( "gluster_command" , glusterCommand ) . addValue ( "stage" , org.ovirt.engine.core.common.utils.EnumUtils.nameOrNull ( stage ) ) . addValue ( "name" , hookName ) ) ; if ( glusterHook != null ) { getGlusterServerHook ( glusterHook , null ) ; } return glusterHook ; }

Target:
public org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity getGlusterHook ( org.ovirt.engine.core.compat.Guid clusterId , java.lang.String glusterCommand , org.ovirt.engine.core.common.businessentities.gluster.GlusterHookStage stage , java.lang.String hookName ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity glusterHook = getCallsHandler ( ) . executeRead ( "GetGlusterHook" , org.ovirt.engine.core.dao.gluster.GlusterHooksDaoDbFacadeImpl.glusterHookRowMapper , getCustomMapSqlParameterSource ( ) . addValue ( "cluster_id" , clusterId ) . addValue ( "gluster_command" , glusterCommand ) . addValue ( "stage" , org.ovirt.engine.core.common.utils.EnumUtils.nameOrNull ( stage ) ) . addValue ( "name" , hookName ) . addValue ( "includeContent" , false ) ) ; return glusterHook ; }
Source:
private static int setNetworkBootOrder ( java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > devices , int bootOrder ) { for ( org.ovirt.engine.core.common.businessentities.VmDevice device : devices ) { if ( ( device.getType ( ) . equals ( VmDeviceType.INTERFACE.getName ( ) ) ) && ( device.getDevice ( ) . equals ( VmDeviceType.BRIDGE.getName ( ) ) ) ) { if ( device.getIsPlugged ( ) ) { device.setBootOrder ( ( ++ bootOrder ) ) ; } } } return bootOrder ; }

Target:
private static int setNetworkBootOrder ( java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > devices , int bootOrder ) { for ( org.ovirt.engine.core.common.businessentities.VmDevice device : devices ) { if ( ( ( device.getType ( ) ) == ( org.ovirt.engine.core.common.businessentities.VmDeviceGeneralType.INTERFACE ) ) && ( device.getDevice ( ) . equals ( VmDeviceType.BRIDGE.getName ( ) ) ) ) { if ( device.getIsPlugged ( ) ) { device.setBootOrder ( ( ++ bootOrder ) ) ; } } } return bootOrder ; }
Source:
public boolean CheckIfCpusSameManufacture ( java.lang.String cpuName1 , java.lang.String cpuName2 ) { boolean result = false ; if ( ( cpuName1 != null ) && ( cpuName2 != null ) ) { if ( _intelCpuByNameDictionary.containsKey ( cpuName1 ) ) { result = _intelCpuByNameDictionary.containsKey ( cpuName2 ) ; } else if ( _amdCpuByNameDictionary.containsKey ( cpuName1 ) ) { result = _amdCpuByNameDictionary.containsKey ( cpuName2 ) ; } } return result ; }

Target:
public boolean CheckIfCpusSameManufacture ( java.lang.String cpuName1 , java.lang.String cpuName2 ) { boolean result = false ; if ( ( cpuName1 != null ) && ( cpuName2 != null ) ) { if ( _intelCpuByNameDictionary.containsKey ( cpuName1 ) ) { result = _intelCpuByNameDictionary.containsKey ( cpuName2 ) ; } else if ( _amdCpuByNameDictionary.containsKey ( cpuName1 ) ) { result = _amdCpuByNameDictionary.containsKey ( cpuName2 ) ; } else if ( _ibmCpuByNameDictionary.containsKey ( cpuName1 ) ) { result = _ibmCpuByNameDictionary.containsKey ( cpuName2 ) ; } } return result ; }
Source:
public void testList ( ) throws java.lang.Exception { collection.setUriInfo ( setUpBasicUriExpectations ( ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.storage.Disk > entities = new java.util.ArrayList < > ( ) ; for ( int i = 0 ; i < ( NAMES.length ) ; i ++ ) { entities.add ( getEntity ( i ) ) ; } setUpEntityQueryExpectations ( VdcQueryType.GetAllDiskSnapshotsByStorageDomainId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendStorageDomainDiskSnapshotsResourceTest.DOMAIN_ID } , entities ) ; verifyCollection ( getCollection ( ) ) ; }

Target:
public void testList ( ) throws java.lang.Exception { collection.setUriInfo ( setUpBasicUriExpectations ( ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.storage.Disk > entities = new java.util.ArrayList < > ( ) ; for ( int i = 0 ; i < ( NAMES.length ) ; i ++ ) { entities.add ( getEntity ( i ) ) ; } setUpEntityQueryExpectations ( QueryType.GetAllDiskSnapshotsByStorageDomainId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendStorageDomainDiskSnapshotsResourceTest.DOMAIN_ID } , entities ) ; verifyCollection ( getCollection ( ) ) ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult glusterServiceSupported ( ) { return org.ovirt.engine.core.bll.ValidationResult.failWith ( VdcBllMessages.GLUSTER_NOT_SUPPORTED , "compatibilityVersion" , cluster.getcompatibility_version ( ) . getValue ( ) ) . when ( ( ( cluster.supportsGlusterService ( ) ) && ( ! ( glusterFeatureEnabled ( ) ) ) ) ) ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult glusterServiceSupported ( ) { return org.ovirt.engine.core.bll.ValidationResult.failWith ( VdcBllMessages.GLUSTER_NOT_SUPPORTED , "compatibilityVersion" , cluster.getCompatibilityVersion ( ) . getValue ( ) ) . when ( ( ( cluster.supportsGlusterService ( ) ) && ( ! ( glusterFeatureEnabled ( ) ) ) ) ) ; }
Source:
public void getCinderVolumeTypesList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storageDomainId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter < java.util.List < org.ovirt.engine.core.common.businessentities.storage.CinderVolumeType > > ( ) { @ java.lang.Override public java.util.List < org.ovirt.engine.core.common.businessentities.storage.CinderVolumeType > Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return ( ( java.util.List < org.ovirt.engine.core.common.businessentities.storage.CinderVolumeType > ) ( source ) ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetCinderVolumeTypesByStorageDomainId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( storageDomainId ) , aQuery ) ; }

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:
public static void getDomainList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , boolean filterInternalDomain ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? new java.util.ArrayList < java.lang.String > ( ( ( java.util.ArrayList < java.lang.String > ) ( source ) ) ) : new java.util.ArrayList < java.lang.String > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetDomainListParameters tempVar = new org.ovirt.engine.core.common.queries.GetDomainListParameters ( ) ; tempVar.setFilterInternalDomain ( filterInternalDomain ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetDomainList , tempVar , aQuery ) ; }

Target:
public static 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:
protected org.ovirt.engine.core.common.businessentities.VmDevice createVmDevice ( ) { return new org.ovirt.engine.core.common.businessentities.VmDevice ( new org.ovirt.engine.core.common.businessentities.VmDeviceId ( disk.getId ( ) , org.ovirt.engine.core.bll.AttachDiskToVmCommand.getVmId ( ) ) , org.ovirt.engine.core.common.businessentities.VmDeviceGeneralType.DISK , VmDeviceType.DISK.getName ( ) , "" , 0 , null , true , org.ovirt.engine.core.bll.AttachDiskToVmCommand.getParameters ( ) . isPlugUnPlug ( ) , false , "" , null ) ; }

Target:
protected org.ovirt.engine.core.common.businessentities.VmDevice createVmDevice ( ) { return new org.ovirt.engine.core.common.businessentities.VmDevice ( new org.ovirt.engine.core.common.businessentities.VmDeviceId ( disk.getId ( ) , org.ovirt.engine.core.bll.AttachDiskToVmCommand.getVmId ( ) ) , org.ovirt.engine.core.common.businessentities.VmDeviceGeneralType.DISK , VmDeviceType.DISK.getName ( ) , "" , 0 , null , true , org.ovirt.engine.core.bll.AttachDiskToVmCommand.getParameters ( ) . isPlugUnPlug ( ) , false , "" , null , org.ovirt.engine.core.bll.AttachDiskToVmCommand.getParameters ( ) . getSnapshotId ( ) ) ; }
Source:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.core.common.businessentities.VDSGroup cluster = ( ( org.ovirt.engine.core.common.businessentities.VDSGroup ) ( returnValue ) ) ; if ( cluster != null ) { maintenance ( cluster.isMaintenanceReasonRequired ( ) ) ; } }

Target:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.core.common.businessentities.VDSGroup cluster = ( ( org.ovirt.engine.core.common.businessentities.VDSGroup ) ( returnValue ) ) ; if ( cluster != null ) { maintenance ( cluster.isMaintenanceReasonRequired ( ) , ( ( cluster.supportsGlusterService ( ) ) && ( org.ovirt.engine.ui.uicommonweb.models.gluster.GlusterFeaturesUtil.isStopGlusterProcessesSupported ( cluster.getCompatibilityVersion ( ) ) ) ) ) ; } }
Source:
private void addInlineDisks ( org.ovirt.engine.api.model.VM vm ) { org.ovirt.engine.api.restapi.resource.BackendVmDisksResource disksResource = inject ( new org.ovirt.engine.api.restapi.resource.BackendVmDisksResource ( org.ovirt.engine.core.compat.Guid.createGuidFromString ( vm.getId ( ) ) , org.ovirt.engine.core.common.queries.VdcQueryType.GetAllDisksByVmId , new org.ovirt.engine.core.common.queries.GetAllDisksByVmIdParameters ( org.ovirt.engine.core.compat.Guid.createGuidFromString ( vm.getId ( ) ) ) ) ) ; org.ovirt.engine.api.model.Disks disks = disksResource.list ( ) ; vm.setDisks ( disks ) ; }

Target:
private void addInlineDisks ( org.ovirt.engine.api.model.VM vm ) { org.ovirt.engine.api.restapi.resource.BackendVmDisksResource disksResource = inject ( new org.ovirt.engine.api.restapi.resource.BackendVmDisksResource ( org.ovirt.engine.core.compat.Guid.createGuidFromStringDefaultEmpty ( vm.getId ( ) ) , org.ovirt.engine.core.common.queries.VdcQueryType.GetAllDisksByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( org.ovirt.engine.core.compat.Guid.createGuidFromStringDefaultEmpty ( vm.getId ( ) ) ) ) ) ; org.ovirt.engine.api.model.Disks disks = disksResource.list ( ) ; vm.setDisks ( disks ) ; }
Source:
public org.ovirt.engine.core.common.businessentities.StorageDomainDynamic mapRow ( java.sql.ResultSet rs , int rowNum ) throws java.sql.SQLException { org.ovirt.engine.core.common.businessentities.StorageDomainDynamic entity = new org.ovirt.engine.core.common.businessentities.StorageDomainDynamic ( ) ; entity.setAvailableDiskSize ( ( ( java.lang.Integer ) ( rs.getObject ( "available_disk_size" ) ) ) ) ; entity.setId ( getGuidDefaultEmpty ( rs , "id" ) ) ; entity.setUsedDiskSize ( ( ( java.lang.Integer ) ( rs.getObject ( "used_disk_size" ) ) ) ) ; return entity ; }

Target:
public org.ovirt.engine.core.common.businessentities.StorageDomainDynamic mapRow ( java.sql.ResultSet rs , int rowNum ) throws java.sql.SQLException { org.ovirt.engine.core.common.businessentities.StorageDomainDynamic entity = new org.ovirt.engine.core.common.businessentities.StorageDomainDynamic ( ) ; entity.setAvailableDiskSize ( ( ( java.lang.Integer ) ( rs.getObject ( "available_disk_size" ) ) ) ) ; entity.setId ( getGuidDefaultEmpty ( rs , "id" ) ) ; entity.setUsedDiskSize ( ( ( java.lang.Integer ) ( rs.getObject ( "used_disk_size" ) ) ) ) ; entity.setExternalStatus ( org.ovirt.engine.core.common.businessentities.ExternalStatus.forValue ( rs.getInt ( "external_status" ) ) ) ; return entity ; }
Source:
public java.util.List < org.ovirt.engine.core.common.businessentities.RepoImage > getUserRequestForStorageDomainRepoFileList ( org.ovirt.engine.core.compat.Guid storageDomainId , org.ovirt.engine.core.common.businessentities.ImageFileType imageType , boolean forceRefresh ) { java.util.List < org.ovirt.engine.core.common.businessentities.RepoImage > repoList = null ; if ( ! ( isStorageDomainValid ( storageDomainId , imageType , forceRefresh ) ) ) { return null ; } repoList = getCachedIsoListByDomainId ( storageDomainId , imageType ) ; return repoList ; }

Target:
public java.util.List < org.ovirt.engine.core.common.businessentities.RepoImage > getUserRequestForStorageDomainRepoFileList ( org.ovirt.engine.core.compat.Guid storageDomainId , org.ovirt.engine.core.common.businessentities.ImageFileType imageType , boolean forceRefresh ) { java.util.List < org.ovirt.engine.core.common.businessentities.RepoImage > repoList = null ; if ( ! ( isStorageDomainValid ( storageDomainId , imageType , forceRefresh ) ) ) { throw new org.ovirt.engine.core.common.errors.VdcBLLException ( org.ovirt.engine.core.common.errors.VdcBllErrors.GetIsoListError ) ; } repoList = getCachedIsoListByDomainId ( storageDomainId , imageType ) ; return repoList ; }
Source:
public javax.ws.rs.core.Response remove ( java.lang.String id , org.ovirt.engine.api.model.Action action ) { getEntity ( id ) ; return performAction ( VdcActionType.RemoveVds , new org.ovirt.engine.core.common.action.RemoveVdsParameters ( asGuid ( id ) , ( ( action != null ) && ( action.isSetForce ( ) ) ? action.isForce ( ) : false ) ) ) ; }

Target:
protected org.ovirt.engine.api.model.Host deprecatedPopulate ( org.ovirt.engine.api.model.Host model , org.ovirt.engine.core.common.businessentities.VDS entity ) { java.util.Set < java.lang.String > details = org.ovirt.engine.api.common.util.DetailHelper.getDetails ( httpHeaders , uriInfo ) ; if ( details.contains ( "statistics" ) ) { addStatistics ( model , entity ) ; } addCertificateInfo ( model ) ; return model ; }
Source:
public void testGetNotFound ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpEntityQueryExpectations ( VdcQueryType.GetVmInterfacesByVmId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.AbstractBackendNicsResourceTest.PARENT_ID } , new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( ) ) ; control.replay ( ) ; try { resource.get ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }

Target:
public void testGetNotFound ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpEntityQueryExpectations ( VdcQueryType.GetVmInterfacesByVmId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendVmNicResourceTest.VM_ID } , java.util.Collections.emptyList ( ) ) ; control.replay ( ) ; try { resource.get ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }
Source:
public java.util.Set < java.lang.String > getDiskHotpluggableInterfaces ( int osId , org.ovirt.engine.core.compat.Version version ) { java.lang.String devices = getValueByVersion ( idToUnameLookup.get ( osId ) , "devices.disk.hotpluggableInterfaces" , version ) ; return new java.util.HashSet < > ( trimElements ( devices.split ( "," ) ) ) ; }

Target:
public java.util.Set < java.lang.String > getDiskHotpluggableInterfaces ( int osId , org.ovirt.engine.core.compat.Version version ) { java.lang.String devices = getValueByVersion ( idToUnameLookup.get ( osId ) , "devices.disk.hotpluggableInterfaces" , version ) ; return new java.util.HashSet < > ( org.ovirt.engine.core.utils.OsRepositoryImpl.trimElements ( devices.split ( "," ) ) ) ; }