auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private static boolean vmAssignedToUser ( org.ovirt.engine.core.compat.Guid vmId , java.util.ArrayList < java.lang.String > messages ) { boolean vmAssignedToUser = false ; if ( ( org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getDbUserDAO ( ) . getAllForVm ( vmId ) . size ( ) ) > 0 ) { vmAssignedToUser = true ; if ( messages != null ) { messages.add ( VdcBllMessages.VM_POOL_CANNOT_ADD_VM_WITH_USERS_ATTACHED_TO_POOL.toString ( ) ) ; } } return vmAssignedToUser ; }

Target:
private static boolean vmAssignedToUser ( org.ovirt.engine.core.compat.Guid vmId , java.util.ArrayList < java.lang.String > messages ) { boolean vmAssignedToUser = false ; if ( ( org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getDbUserDao ( ) . getAllForVm ( vmId ) . size ( ) ) > 0 ) { vmAssignedToUser = true ; if ( messages != null ) { messages.add ( VdcBllMessages.VM_POOL_CANNOT_ADD_VM_WITH_USERS_ATTACHED_TO_POOL.toString ( ) ) ; } } return vmAssignedToUser ; }
Source:
private void setDetailList ( final org.ovirt.engine.ui.uicommonweb.models.gluster.VolumeGeneralModel volumeGeneralModel , final org.ovirt.engine.ui.uicommonweb.models.gluster.VolumeParameterListModel volumeParameterListModel , final org.ovirt.engine.ui.uicommonweb.models.configure.PermissionListModel < org.ovirt.engine.ui.uicommonweb.models.volumes.VolumeListModel > permissionListModel , final org.ovirt.engine.ui.uicommonweb.models.gluster.VolumeEventListModel volumeEventListModel ) { java.util.List < org.ovirt.engine.ui.uicommonweb.models.EntityModel > list = new java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.EntityModel > ( ) ; list.add ( volumeGeneralModel ) ; list.add ( volumeParameterListModel ) ; list.add ( getBrickListModel ( ) ) ; list.add ( getGeoRepListModel ( ) ) ; list.add ( permissionListModel ) ; list.add ( volumeEventListModel ) ; setDetailModels ( list ) ; }

Target:
private void setDetailList ( final org.ovirt.engine.ui.uicommonweb.models.gluster.VolumeGeneralModel volumeGeneralModel , final org.ovirt.engine.ui.uicommonweb.models.gluster.VolumeParameterListModel volumeParameterListModel , final org.ovirt.engine.ui.uicommonweb.models.configure.PermissionListModel < org.ovirt.engine.ui.uicommonweb.models.volumes.VolumeListModel > permissionListModel , final org.ovirt.engine.ui.uicommonweb.models.gluster.VolumeEventListModel volumeEventListModel ) { java.util.List < org.ovirt.engine.ui.uicommonweb.models.EntityModel > list = new java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.EntityModel > ( ) ; list.add ( volumeGeneralModel ) ; list.add ( volumeParameterListModel ) ; list.add ( getBrickListModel ( ) ) ; list.add ( getGeoRepListModel ( ) ) ; list.add ( permissionListModel ) ; list.add ( volumeEventListModel ) ; list.add ( getSnapshotListModel ( ) ) ; setDetailModels ( list ) ; }
Source:
public void virtIoRngNotSupported ( ) { org.mockito.Mockito.when ( cluster.getRequiredRngSources ( ) ) . thenReturn ( java.util.Collections.singleton ( org.ovirt.engine.core.utils.RandomUtils.instance ( ) . nextEnum ( org.ovirt.engine.core.common.businessentities.VmRngDevice.Source.class ) ) ) ; validator = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.validator.ClusterValidator ( dbFacade , cluster ) ) ; org.mockito.Mockito.doReturn ( false ) . when ( validator ) . virtIoRngSupportedInCluster ( ) ; org.junit.Assert.assertThat ( validator.virtIoRngSupported ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.ACTION_TYPE_FAILED_RNG_SOURCE_NOT_SUPPORTED ) ) ; }

Target:
public void virtIoRngSupported ( ) { org.mockito.Mockito.when ( cluster.getRequiredRngSources ( ) ) . thenReturn ( java.util.Collections.singleton ( org.ovirt.engine.core.utils.RandomUtils.instance ( ) . nextEnum ( org.ovirt.engine.core.common.businessentities.VmRngDevice.Source.class ) ) ) ; validator = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.validator.ClusterValidator ( dbFacade , cluster , cpuFlagsManagerHandler ) ) ; org.mockito.Mockito.doReturn ( true ) . when ( validator ) . virtIoRngSupportedInCluster ( ) ; org.junit.Assert.assertThat ( validator.virtIoRngSupported ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.VDS getVds ( org.ovirt.engine.core.common.businessentities.VDSStatus status ) { org.ovirt.engine.core.common.businessentities.VDS vds = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; vds.setId ( new org.ovirt.engine.core.compat.Guid ( ) ) ; vds.setvds_name ( "gfs1" ) ; vds.setvds_group_id ( org.ovirt.engine.core.bll.gluster.GetGlusterVolumeProfileInfoQueryTest.CLUSTER_ID ) ; vds.setstatus ( status ) ; return vds ; }

Target:
private org.ovirt.engine.core.common.businessentities.VDS getVds ( org.ovirt.engine.core.common.businessentities.VDSStatus status ) { org.ovirt.engine.core.common.businessentities.VDS vds = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; vds.setId ( new org.ovirt.engine.core.compat.Guid ( ) ) ; vds.setVdsName ( "gfs1" ) ; vds.setVdsGroupId ( org.ovirt.engine.core.bll.gluster.GetGlusterVolumeProfileInfoQueryTest.CLUSTER_ID ) ; vds.setStatus ( status ) ; return vds ; }
Source:
private org.ovirt.engine.core.common.businessentities.HostJobInfo.HostJobStatus pollEntityIfSupported ( org.ovirt.engine.core.bll.CommandBase < ? > cmd ) { if ( ! ( cmd instanceof org.ovirt.engine.core.bll.storage.EntityPollingCommand ) ) { log.error ( "Command id: '{}': entity polling isn't supported, will retry to poll the job soon" , cmd.getActionType ( ) , cmd.getCommandId ( ) ) ; return null ; } try { return ( ( org.ovirt.engine.core.bll.storage.EntityPollingCommand ) ( cmd ) ) . poll ( ) ; } catch ( java.lang.Exception e ) { log.error ( "Command id: '{}': failed to poll the command entity" , cmd.getActionType ( ) , cmd.getCommandId ( ) ) ; } return null ; }

Target:
private boolean isEntityPollingSupported ( org.ovirt.engine.core.bll.CommandBase < ? > cmd ) { return cmd instanceof org.ovirt.engine.core.bll.storage.EntityPollingCommand ; }
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 addUserColumn ( ) { org.ovirt.engine.ui.common.widget.table.column.AbstractTextColumn < org.ovirt.engine.core.common.businessentities.Permission > userColumn = new org.ovirt.engine.ui.common.widget.table.column.AbstractTextColumn < org.ovirt.engine.core.common.businessentities.Permission > ( ) { @ java.lang.Override public java.lang.String getValue ( org.ovirt.engine.core.common.businessentities.Permission object ) { return object.getOwnerName ( ) ; } } ; userColumn.makeSortable ( ) ; org.ovirt.engine.ui.common.widget.uicommon.permissions.PermissionListModelTable.getTable ( ) . addColumn ( userColumn , org.ovirt.engine.ui.common.widget.uicommon.permissions.PermissionListModelTable.constants.userPermission ( ) , "300px" ) ; }
Source:
protected org.ovirt.engine.core.vdsbroker.vdsbroker.VDSExceptionBase createDefaultConcreteException ( java.lang.String errorMessage ) { org.ovirt.engine.core.common.businessentities.StorageDomain domainFromDb = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStorageDomainDao ( ) . get ( org.ovirt.engine.core.vdsbroker.irsbroker.AttachStorageDomainVDSCommand.getParameters ( ) . getStorageDomainId ( ) ) ; if ( ( domainFromDb == null ) || ( ! ( domainFromDb.getStorageDomainType ( ) . isDataDomain ( ) ) ) ) { return new org.ovirt.engine.core.vdsbroker.irsbroker.IrsOperationFailedNoFailoverException ( errorMessage ) ; } return super . createDefaultConcreteException ( errorMessage ) ; }

Target:
protected org.ovirt.engine.core.vdsbroker.vdsbroker.VDSExceptionBase createDefaultConcreteException ( java.lang.String errorMessage ) { org.ovirt.engine.core.common.businessentities.StorageDomain domainFromDb = storageDomainDao.get ( org.ovirt.engine.core.vdsbroker.irsbroker.AttachStorageDomainVDSCommand.getParameters ( ) . getStorageDomainId ( ) ) ; if ( ( domainFromDb == null ) || ( ! ( domainFromDb.getStorageDomainType ( ) . isDataDomain ( ) ) ) ) { return new org.ovirt.engine.core.vdsbroker.irsbroker.IrsOperationFailedNoFailoverException ( errorMessage ) ; } return super . createDefaultConcreteException ( errorMessage ) ; }
Source:
private boolean isBondModeFailover ( java.lang.String bondOptions ) { java.util.regex.Matcher matcher = org.ovirt.engine.core.bll.network.host.SetupNetworksHelper.BOND_OPTS_MODE_CAPTURE.matcher ( bondOptions ) ; matcher.find ( ) ; int bondMode = java.lang.Integer.parseInt ( matcher.group ( 1 ) ) ; return ( bondMode == 1 ) || ( bondMode == 3 ) ; }

Target:
private boolean unableToApplyQos ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface , org.ovirt.engine.core.common.businessentities.network.Network network ) { return ( ! ( hostNetworkQosSupported ) ) && ( qosShouldBeApplied ( iface , network ) ) ; }
Source:
public static int map ( org.ovirt.engine.api.model.OsType type , java.lang.Class < java.lang.Integer > incoming ) { for ( java.util.Map.Entry < java.lang.Integer , java.lang.String > e : org.ovirt.engine.core.common.utils.SimpleDependecyInjector.getInstance ( ) . get ( org.ovirt.engine.core.common.osinfo.OsRepository.class ) . getUniqueOsNames ( ) . entrySet ( ) ) { if ( e.getValue ( ) . equalsIgnoreCase ( type.name ( ) . replace ( "_" , "" ) ) ) { return e.getKey ( ) ; } } return 0 ; }

Target:
public static org.ovirt.engine.api.model.ConfigurationType map ( org.ovirt.engine.api.model.ConfigurationType configurationType , org.ovirt.engine.api.model.ConfigurationType template ) { switch ( configurationType ) { case OVF : return org.ovirt.engine.api.model.ConfigurationType.OVF ; default : return null ; } }
Source:
protected void executeVdsBrokerCommand ( ) { _result = org.ovirt.engine.core.vdsbroker.vdsbroker.DisconnectStorageServerVDSCommand.getBroker ( ) . disconnectStorageServer ( org.ovirt.engine.core.vdsbroker.vdsbroker.DisconnectStorageServerVDSCommand.getParameters ( ) . getStorageType ( ) . getValue ( ) , org.ovirt.engine.core.vdsbroker.vdsbroker.DisconnectStorageServerVDSCommand.getParameters ( ) . getStoragePoolId ( ) . toString ( ) , org.ovirt.engine.core.vdsbroker.vdsbroker.DisconnectStorageServerVDSCommand.BuildStructFromConnectionListObject ( ) ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.DisconnectStorageServerVDSCommand.proceedProxyReturnValue ( ) ; setReturnValue ( _result.convertToStatusList ( ) ) ; }

Target:
protected void executeVdsBrokerCommand ( ) { _result = org.ovirt.engine.core.vdsbroker.vdsbroker.DisconnectStorageServerVDSCommand.getBroker ( ) . disconnectStorageServer ( org.ovirt.engine.core.vdsbroker.vdsbroker.DisconnectStorageServerVDSCommand.getParameters ( ) . getStorageType ( ) . getValue ( ) , org.ovirt.engine.core.vdsbroker.vdsbroker.DisconnectStorageServerVDSCommand.getParameters ( ) . getStoragePoolId ( ) . toString ( ) , org.ovirt.engine.core.vdsbroker.vdsbroker.DisconnectStorageServerVDSCommand.buildStructFromConnectionListObject ( ) ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.DisconnectStorageServerVDSCommand.proceedProxyReturnValue ( ) ; setReturnValue ( _result.convertToStatusList ( ) ) ; }
Source:
public void OnSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.hosts.HostModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.hosts.HostModel ) ( target ) ) ; model.defaultSpmPriority = ( ( java.lang.Integer ) ( returnValue ) ) ; if ( ( postponedSpmPriority ) != null ) { UpdateSpmPriority ( postponedSpmPriority ) ; } spmInitialized = true ; }

Target:
public void ExecuteCommand ( org.ovirt.engine.ui.uicommonweb.UICommand uiCommand , java.lang.Object ... parameters ) { ProxyUp ( ) ; }
Source:
public static void mockAsyncDataProvider ( ) { org.ovirt.engine.ui.uicommonweb.models.vms.BaseVmTest.adp = org.ovirt.engine.ui.uicommonweb.models.vms.BaseVmTest.setup.getMocks ( ) . asyncDataProvider ( ) ; org.mockito.Mockito.when ( org.ovirt.engine.ui.uicommonweb.models.vms.BaseVmTest.adp.getConfigValuePreConverted ( ConfigurationValues.VncKeyboardLayoutValidValues ) ) . thenReturn ( java.util.Collections.emptyList ( ) ) ; org.mockito.Mockito.when ( org.ovirt.engine.ui.uicommonweb.models.vms.BaseVmTest.adp.osNameExists ( org.ovirt.engine.ui.uicommonweb.models.vms.BaseVmTest.OS_TYPE ) ) . thenReturn ( true ) ; org.mockito.Mockito.when ( org.ovirt.engine.ui.uicommonweb.models.vms.BaseVmTest.adp.getMaxVmNameLength ( ) ) . thenReturn ( 64 ) ; org.mockito.Mockito.when ( org.ovirt.engine.ui.uicommonweb.models.vms.BaseVmTest.adp.getOsDefaultIconId ( org.ovirt.engine.ui.uicommonweb.models.vms.BaseVmTest.OS_TYPE , false ) ) . thenReturn ( org.ovirt.engine.ui.uicommonweb.models.vms.BaseVmTest.LARGE_OS_DEFAULT_ICON_ID ) ; }

Target:
public static void mockAsyncDataProvider ( ) { org.ovirt.engine.ui.uicommonweb.models.vms.BaseVmTest.adp = org.ovirt.engine.ui.uicommonweb.models.vms.BaseVmTest.setup.getMocks ( ) . asyncDataProvider ( ) ; org.mockito.Mockito.when ( org.ovirt.engine.ui.uicommonweb.models.vms.BaseVmTest.adp.getConfigValuePreConverted ( ConfigValues.VncKeyboardLayoutValidValues ) ) . thenReturn ( java.util.Collections.emptyList ( ) ) ; org.mockito.Mockito.when ( org.ovirt.engine.ui.uicommonweb.models.vms.BaseVmTest.adp.osNameExists ( org.ovirt.engine.ui.uicommonweb.models.vms.BaseVmTest.OS_TYPE ) ) . thenReturn ( true ) ; org.mockito.Mockito.when ( org.ovirt.engine.ui.uicommonweb.models.vms.BaseVmTest.adp.getMaxVmNameLength ( ) ) . thenReturn ( 64 ) ; org.mockito.Mockito.when ( org.ovirt.engine.ui.uicommonweb.models.vms.BaseVmTest.adp.getOsDefaultIconId ( org.ovirt.engine.ui.uicommonweb.models.vms.BaseVmTest.OS_TYPE , false ) ) . thenReturn ( org.ovirt.engine.ui.uicommonweb.models.vms.BaseVmTest.LARGE_OS_DEFAULT_ICON_ID ) ; }
Source:
private void doTestBadAddNic ( boolean valid , boolean success , java.lang.String detail ) throws java.lang.Exception { setUriInfo ( setUpActionExpectations ( VdcActionType.AddVmTemplateInterface , org.ovirt.engine.core.common.action.AddVmTemplateInterfaceParameters.class , new java.lang.String [ ] { "VmTemplateId" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendTemplateNicsResourceTest.VM_ID } , valid , success ) ) ; org.ovirt.engine.api.model.Nic model = org.ovirt.engine.api.restapi.resource.BackendTemplateNicsResourceTest.getModel ( 0 ) ; try { collection.add ( model ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }

Target:
private void doTestBadAddNic ( boolean valid , boolean success , java.lang.String detail ) throws java.lang.Exception { setUriInfo ( setUpActionExpectations ( ActionType.AddVmTemplateInterface , org.ovirt.engine.core.common.action.AddVmTemplateInterfaceParameters.class , new java.lang.String [ ] { "VmTemplateId" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendTemplateNicsResourceTest.VM_ID } , valid , success ) ) ; org.ovirt.engine.api.model.Nic model = org.ovirt.engine.api.restapi.resource.BackendTemplateNicsResourceTest.getModel ( 0 ) ; try { collection.add ( model ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }
Source:
private void doFetchPrincipalRecord ( org.ovirt.engine.api.extensions.ExtMap input , org.ovirt.engine.api.extensions.ExtMap output ) { org.ovirt.engine.extensions.aaa.builtin.kerberosldap.LdapReturnValueBase ldapResult = broker.runAdAction ( AdActionType.GetAdUserByUserName , new org.ovirt.engine.extensions.aaa.builtin.kerberosldap.LdapSearchByUserNameParameters ( configuration , null , getDirectoryName ( ) , input.< org.ovirt.engine.api.extensions.ExtMap > get ( Authn.InvokeKeys.AUTH_RECORD ) . < java.lang.String > get ( Authn.AuthRecord.PRINCIPAL ) ) ) ; output.mput ( Authz.InvokeKeys.PRINCIPAL_RECORD , mapLdapUser ( ( ( org.ovirt.engine.core.common.businessentities.aaa.LdapUser ) ( ldapResult.getReturnValue ( ) ) ) ) ) . mput ( Authz.InvokeKeys.STATUS , Authz.Status.SUCCESS ) ; }

Target:
private void doFetchPrincipalRecord ( org.ovirt.engine.api.extensions.ExtMap input , org.ovirt.engine.api.extensions.ExtMap output ) { org.ovirt.engine.api.extensions.ExtMap authRecord = input.< org.ovirt.engine.api.extensions.ExtMap > get ( Authn.InvokeKeys.AUTH_RECORD ) ; org.ovirt.engine.extensions.aaa.builtin.kerberosldap.LdapReturnValueBase ldapResult = broker.runAdAction ( AdActionType.GetAdUserByUserName , new org.ovirt.engine.extensions.aaa.builtin.kerberosldap.LdapSearchByUserNameParameters ( configuration , null , getDirectoryName ( ) , ( authRecord != null ? authRecord.< java.lang.String > get ( Authn.AuthRecord.PRINCIPAL ) : input.< java.lang.String > get ( Authz.InvokeKeys.PRINCIPAL ) ) ) ) ; output.mput ( Authz.InvokeKeys.PRINCIPAL_RECORD , mapLdapUser ( ( ( org.ovirt.engine.core.common.businessentities.aaa.LdapUser ) ( ldapResult.getReturnValue ( ) ) ) ) ) . mput ( Authz.InvokeKeys.STATUS , Authz.Status.SUCCESS ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.VmPool getVmPoolCached ( ) { if ( ( ( vmPoolCached ) == null ) && ( ( org.ovirt.engine.core.bll.ProcessDownVmCommand.getVm ( ) . getVmPoolId ( ) ) != null ) ) { vmPoolCached = getVmPoolDao ( ) . get ( org.ovirt.engine.core.bll.ProcessDownVmCommand.getVm ( ) . getVmPoolId ( ) ) ; } return vmPoolCached ; }

Target:
private org.ovirt.engine.core.common.businessentities.VmPool getVmPoolCached ( ) { if ( ( ( vmPoolCached ) == null ) && ( ( org.ovirt.engine.core.bll.ProcessDownVmCommand.getVm ( ) . getVmPoolId ( ) ) != null ) ) { vmPoolCached = vmPoolDao.get ( org.ovirt.engine.core.bll.ProcessDownVmCommand.getVm ( ) . getVmPoolId ( ) ) ; } return vmPoolCached ; }
Source:
public void testGetRelevantStorageQuotaForUserWithoutPrivileges ( ) throws java.lang.Exception { java.util.List < org.ovirt.engine.core.common.businessentities.Quota > quotas = dao.getAllRelevantQuotasForStorage ( FixturesTool.STORAGE_DOAMIN_NFS_MASTER , org.ovirt.engine.core.dao.UNPRIVILEGED_USER_SESSION_ID , true ) ; org.junit.Assert.assertEquals ( "Unprivileged user is not allowed to fetch for quota" , 0 , quotas.size ( ) ) ; }

Target:
private void assertGetAllRelevantQuoatsForStorage ( org.ovirt.engine.core.compat.Guid storageId , int expectedQuotas ) { org.junit.Assert.assertNotNull ( privilegedUserSession ) ; java.util.List < org.ovirt.engine.core.common.businessentities.Quota > quotas = dao.getAllRelevantQuotasForStorage ( storageId , privilegedUserSession.getId ( ) , false ) ; org.junit.Assert.assertEquals ( "Wrong number of quotas retuend" , expectedQuotas , quotas.size ( ) ) ; }
Source:
protected final < T > R performUpdate ( R incoming , Q entity , R model , org.ovirt.engine.api.restapi.resource.EntityIdResolver < T > entityResolver , org.ovirt.engine.core.common.action.VdcActionType update , org.ovirt.engine.api.restapi.resource.AbstractBackendSubResource.ParametersProvider < R , Q > updateProvider ) { entity = doUpdate ( incoming , entity , model , entityResolver , update , updateProvider ) ; R model2 = org.ovirt.engine.api.restapi.resource.AbstractBackendSubResource.map ( entity ) ; org.ovirt.engine.api.restapi.resource.AbstractBackendSubResource.deprecatedPopulate ( model2 , entity ) ; return addLinks ( org.ovirt.engine.api.restapi.resource.AbstractBackendSubResource.doPopulate ( model2 , entity ) ) ; }

Target:
protected final < T > R performUpdate ( R incoming , Q entity , R model , org.ovirt.engine.api.restapi.resource.EntityIdResolver < T > entityResolver , org.ovirt.engine.core.common.action.ActionType update , org.ovirt.engine.api.restapi.resource.AbstractBackendSubResource.ParametersProvider < R , Q > updateProvider ) { entity = doUpdate ( incoming , entity , model , entityResolver , update , updateProvider ) ; R model2 = org.ovirt.engine.api.restapi.resource.AbstractBackendSubResource.map ( entity ) ; org.ovirt.engine.api.restapi.resource.AbstractBackendSubResource.deprecatedPopulate ( model2 , entity ) ; return addLinks ( org.ovirt.engine.api.restapi.resource.AbstractBackendSubResource.doPopulate ( model2 , entity ) ) ; }
Source:
protected void setObjectName ( java.lang.Object object , java.lang.String name , boolean isSuffix ) { org.ovirt.engine.core.common.businessentities.VM vm = ( ( org.ovirt.engine.core.common.businessentities.VM ) ( object ) ) ; if ( isSuffix ) { vm.setvm_name ( ( ( vm.getvm_name ( ) ) + name ) ) ; } else { vm.setvm_name ( name ) ; } }

Target:
protected void setObjectName ( java.lang.Object object , java.lang.String name , boolean isSuffix ) { org.ovirt.engine.core.common.businessentities.VM vm = ( ( org.ovirt.engine.core.common.businessentities.VM ) ( object ) ) ; if ( isSuffix ) { vm.setVmName ( ( ( vm.getVmName ( ) ) + name ) ) ; } else { vm.setVmName ( name ) ; } }
Source:
protected boolean CheckStoragePoolStatus ( org.ovirt.engine.core.common.businessentities.StoragePoolStatus status ) { boolean returnValue = false ; org.ovirt.engine.core.common.businessentities.StoragePool storagePool = org.ovirt.engine.core.bll.storage.StorageHandlingCommandBase.getStoragePool ( ) ; if ( storagePool != null ) { returnValue = ( storagePool.getStatus ( ) ) == status ; if ( ( ! returnValue ) && ( ! ( org.ovirt.engine.core.bll.storage.StorageHandlingCommandBase.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_POOL_STATUS_ILLEGAL.toString ( ) ) ) ) ) { addCanDoActionMessage ( VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_POOL_STATUS_ILLEGAL ) ; } } return returnValue ; }

Target:
protected boolean checkStoragePoolStatus ( org.ovirt.engine.core.common.businessentities.StoragePoolStatus status ) { boolean returnValue = false ; org.ovirt.engine.core.common.businessentities.StoragePool storagePool = org.ovirt.engine.core.bll.storage.StorageHandlingCommandBase.getStoragePool ( ) ; if ( storagePool != null ) { returnValue = ( storagePool.getStatus ( ) ) == status ; if ( ( ! returnValue ) && ( ! ( org.ovirt.engine.core.bll.storage.StorageHandlingCommandBase.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_POOL_STATUS_ILLEGAL.toString ( ) ) ) ) ) { addCanDoActionMessage ( VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_POOL_STATUS_ILLEGAL ) ; } } return returnValue ; }
Source:
public void moveDisk ( ) { command.getParameters ( ) . setParametersList ( createMoveDisksParameters ( ) ) ; initDiskImage ( diskImageId ) ; initVm ( VMStatus.Down , null , diskImageId ) ; command.updateParameters ( ) ; org.junit.Assert.assertEquals ( 1 , command.getMoveDiskParametersList ( ) . size ( ) ) ; }

Target:
public void moveDisk ( ) { command.getParameters ( ) . setParametersList ( createMoveDisksParameters ( ) ) ; initDiskImage ( diskImageId ) ; initVm ( VMStatus.Down , null , diskImageId ) ; command.init ( ) ; command.updateParameters ( ) ; org.junit.Assert.assertEquals ( 1 , command.getMoveDiskParametersList ( ) . size ( ) ) ; }
Source:
public int hashCode ( ) { final int prime = 31 ; int result = 1 ; result = ( prime * result ) + ( age ) ; result = ( prime * result ) + ( ( name ) == null ? 0 : name.hashCode ( ) ) ; return result ; }

Target:
public boolean equals ( java.lang.Object obj ) { if ( ( this ) == obj ) { return true ; } if ( ! ( obj instanceof org.ovirt.engine.core.utils.collections.CopyOnAccessMapTest.MyKey ) ) { return false ; } org.ovirt.engine.core.utils.collections.CopyOnAccessMapTest.MyKey other = ( ( org.ovirt.engine.core.utils.collections.CopyOnAccessMapTest.MyKey ) ( obj ) ) ; return ( ( age ) == ( other.age ) ) && ( java.util.Objects.equals ( name , other.name ) ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.VGListReturnForXmlRpc getVGList ( ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.getVGList ( ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.VGListReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.VGListReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.HostJobsReturnForXmlRpc getHostJobs ( java.lang.String jobType , java.util.List < java.lang.String > jobIds ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.getHostJobs ( jobType , jobIds ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.HostJobsReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.HostJobsReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
public void testVmWithDisks ( ) { org.ovirt.engine.core.common.businessentities.VM vm = new org.ovirt.engine.core.common.businessentities.VM ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.Disk > disks = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ( ) ; disks.add ( new org.ovirt.engine.core.common.businessentities.DiskImage ( ) ) ; org.ovirt.engine.core.bll.validator.RunVmValidatorTest.validateResult ( runVmValidator.validateBootSequence ( vm , null , disks ) , true , null ) ; }

Target:
public void testVmNotDuringInitialization ( ) { final org.ovirt.engine.core.common.businessentities.VM vm = new org.ovirt.engine.core.common.businessentities.VM ( ) ; vm.setStatus ( VMStatus.Down ) ; org.mockito.Mockito.doReturn ( false ) . when ( runVmValidator ) . isVmDuringInitiating ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.VM.class ) ) ; org.ovirt.engine.core.bll.validator.RunVmValidatorTest.validateResult ( runVmValidator.vmDuringInitialization ( vm ) , true , null ) ; }
Source:
public org.ovirt.engine.core.common.businessentities.network.VnicProfileView mapRow ( java.sql.ResultSet rs , int rowNum ) throws java.sql.SQLException { org.ovirt.engine.core.common.businessentities.network.VnicProfileView entity = super . mapRow ( rs , rowNum ) ; entity.setNetworkName ( rs.getString ( "network_name" ) ) ; entity.setNetworkQosName ( rs.getString ( "network_qos_name" ) ) ; entity.setDataCenterName ( rs.getString ( "data_center_name" ) ) ; entity.setCompatibilityVersion ( new org.ovirt.engine.core.compat.Version ( rs.getString ( "compatibility_version" ) ) ) ; entity.setNetworkFilterName ( rs.getString ( "network_filter_name" ) ) ; return entity ; }

Target:
public org.ovirt.engine.core.common.businessentities.network.VnicProfileView mapRow ( java.sql.ResultSet rs , int rowNum ) throws java.sql.SQLException { org.ovirt.engine.core.common.businessentities.network.VnicProfileView entity = super . mapRow ( rs , rowNum ) ; entity.setNetworkName ( rs.getString ( "network_name" ) ) ; entity.setNetworkQosName ( rs.getString ( "network_qos_name" ) ) ; entity.setDataCenterName ( rs.getString ( "data_center_name" ) ) ; entity.setCompatibilityVersion ( new org.ovirt.engine.core.dao.VersionRowMapper ( "compatibility_version" ) . mapRow ( rs , rowNum ) ) ; entity.setNetworkFilterName ( rs.getString ( "network_filter_name" ) ) ; return entity ; }
Source:
protected org.ovirt.engine.core.common.businessentities.StorageDomain getNewMaster ( boolean duringReconstruct ) { if ( ( ( _newMaster ) == null ) && ( Guid.Empty.equals ( _newMasterStorageDomainId ) ) ) { _newMaster = org.ovirt.engine.core.bll.storage.DeactivateStorageDomainCommand.electNewMaster ( duringReconstruct , canChooseInactiveDomainAsMaster ) ; } else if ( ( _newMaster ) == null ) { _newMaster = org.ovirt.engine.core.bll.storage.DeactivateStorageDomainCommand.getStorageDomainDAO ( ) . get ( _newMasterStorageDomainId ) ; } return _newMaster ; }

Target:
protected org.ovirt.engine.core.common.businessentities.StorageDomain getNewMaster ( boolean duringReconstruct ) { if ( ( ( _newMaster ) == null ) && ( Guid.Empty.equals ( _newMasterStorageDomainId ) ) ) { _newMaster = org.ovirt.engine.core.bll.storage.DeactivateStorageDomainCommand.electNewMaster ( duringReconstruct , canChooseInactiveDomainAsMaster , canChooseCurrentMasterAsNewMaster ) ; } else if ( ( _newMaster ) == null ) { _newMaster = org.ovirt.engine.core.bll.storage.DeactivateStorageDomainCommand.getStorageDomainDAO ( ) . get ( _newMasterStorageDomainId ) ; } return _newMaster ; }
Source:
private org.ovirt.engine.core.common.businessentities.VDS createProxyCandidate ( ) { org.ovirt.engine.core.common.businessentities.VDS proxyCandidate = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; proxyCandidate.setVdsName ( org.ovirt.engine.core.bll.pm.FenceProxyLocatorTest.ANOTHER_HOST_NAME ) ; proxyCandidate.setId ( org.ovirt.engine.core.bll.pm.FenceProxyLocatorTest.OTHER_HOST_ID_1 ) ; proxyCandidate.setVdsGroupId ( org.ovirt.engine.core.bll.pm.FenceProxyLocatorTest.FENCED_HOST_CLUSTER_ID ) ; proxyCandidate.setStoragePoolId ( org.ovirt.engine.core.bll.pm.FenceProxyLocatorTest.FENCED_HOST_DATACENTER_ID ) ; proxyCandidate.setVdsGroupCompatibilityVersion ( Version.v3_0 ) ; return proxyCandidate ; }

Target:
public void preferProxyHostFromSameDC ( ) { mockExistingHosts ( createHost ( VDSStatus.Up , org.ovirt.engine.core.bll.pm.FenceProxyLocatorTest.OTHER_CLUSTER_ID_2 , org.ovirt.engine.core.bll.pm.FenceProxyLocatorTest.OTHER_DATACENTER_ID ) , createHost ( VDSStatus.Up , org.ovirt.engine.core.bll.pm.FenceProxyLocatorTest.OTHER_CLUSTER_ID , org.ovirt.engine.core.bll.pm.FenceProxyLocatorTest.FENCED_HOST_DATACENTER_ID ) ) ; org.ovirt.engine.core.common.businessentities.VDS proxyHost = setupLocator ( ) . findProxyHost ( false ) ; org.junit.Assert.assertNotNull ( proxyHost ) ; org.junit.Assert.assertEquals ( proxyHost.getStoragePoolId ( ) , org.ovirt.engine.core.bll.pm.FenceProxyLocatorTest.FENCED_HOST_DATACENTER_ID ) ; }
Source:
private void assertValidationFailure ( org.ovirt.engine.core.bll.ValidationResult validationResult , org.ovirt.engine.core.common.errors.EngineMessage engineMessage ) { assertFalse ( validationResult.isValid ( ) ) ; assertTrue ( java.lang.String.format ( "Expected %s but got %s" , engineMessage.name ( ) , validationResult.getMessage ( ) . name ( ) ) , ( ( validationResult.getMessage ( ) ) == engineMessage ) ) ; }

Target:
private void assertValidationFailure ( org.ovirt.engine.core.bll.ValidationResult validationResult , org.ovirt.engine.core.common.errors.EngineMessage engineMessage ) { org.junit.Assert.assertFalse ( validationResult.isValid ( ) ) ; org.junit.Assert.assertTrue ( java.lang.String.format ( "Expected %s but got %s" , engineMessage.name ( ) , validationResult.getMessage ( ) . name ( ) ) , ( ( validationResult.getMessage ( ) ) == engineMessage ) ) ; }
Source:
public void updateVmTag ( ) { existingVmTag.setDefaultDisplayType ( ( ( existingVmTag.getDefaultDisplayType ( ) ) + 1 ) ) ; dao.updateDefaultDisplayForVmTag ( existingVmTag ) ; org.ovirt.engine.core.common.businessentities.TagsVmMap result = dao.getTagVmByTagIdAndByVmId ( existingVmTag.getTagId ( ) , existingVmTag.getVmId ( ) ) ; org.junit.Assert.assertNotNull ( result ) ; assertEqualsTagsVmMap ( existingVmTag , result ) ; }

Target:
public void updateVmTag ( ) { existingVmTag.setDefaultDisplayType ( ( ( existingVmTag.getDefaultDisplayType ( ) ) + 1 ) ) ; dao.updateDefaultDisplayForVmTag ( existingVmTag ) ; org.ovirt.engine.core.common.businessentities.TagsVmMap result = dao.getTagVmByTagIdAndByVmId ( existingVmTag.getTagId ( ) , existingVmTag.getVmId ( ) ) ; org.junit.jupiter.api.Assertions.assertNotNull ( result ) ; assertEqualsTagsVmMap ( existingVmTag , result ) ; }
Source:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult a ) { stopProgress ( a.getState ( ) ) ; cancel ( ) ; }

Target:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { org.ovirt.engine.core.common.action.VmManagementParametersBase param = new org.ovirt.engine.core.common.action.VmManagementParametersBase ( gettempVm ( ) ) ; param.setSoundDeviceEnabled ( ( ( java.lang.Boolean ) ( model.getIsSoundcardEnabled ( ) . getEntity ( ) ) ) ) ; org.ovirt.engine.ui.frontend.Frontend.RunAction ( VdcActionType.UpdateVm , param , new org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModelNetworkAsyncCallbacks.NetworkUpdateFrontendAsyncCallback ( model , defaultNetworkCreatingManager , gettempVm ( ) . getId ( ) ) , this ) ; }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { super . eventRaised ( ev , sender , args ) ; if ( ev.matchesDefinition ( RegistrationResult.RetrievedEventDefinition ) ) { AsyncResult_Retrieved ( ) ; } if ( ev.matchesDefinition ( ProvideTickEvent.Definition ) ) { syncSearch ( ) ; } }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { super . eventRaised ( ev , sender , args ) ; if ( ev.matchesDefinition ( RegistrationResult.RetrievedEventDefinition ) ) { asyncResult_Retrieved ( ) ; } if ( ev.matchesDefinition ( ProvideTickEvent.Definition ) ) { syncSearch ( ) ; } }
Source:
public static void getPoolById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid poolId ) { 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.GetVmPoolById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( poolId ) , aQuery ) ; }

Target:
public void getAAAProfilesEntriesList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.Collection < org.ovirt.engine.core.aaa.ProfileEntry > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.aaa.ProfileEntry > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAAAProfileList , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }
Source:
private void updateChangeability ( ) { boolean enabled = ( getIsChangable ( ) ) && ( getEnabled ( ) . getEntity ( ) ) ; getAverage ( ) . setIsChangable ( enabled ) ; getPeak ( ) . setIsChangable ( enabled ) ; getBurst ( ) . setIsChangable ( enabled ) ; }

Target:
private void updateChangeability ( ) { boolean enabled = ( getIsChangable ( ) ) && ( getEnabled ( ) . getEntity ( ) ) ; getAverage ( ) . setIsChangeable ( enabled ) ; getPeak ( ) . setIsChangeable ( enabled ) ; getBurst ( ) . setIsChangeable ( enabled ) ; }
Source:
public void onValueChange ( com.google.gwt.event.logical.shared.ValueChangeEvent < java.lang.String > event ) { super . onValueChange ( event ) ; if ( "firefox" . equalsIgnoreCase ( clientAgentType.getBrowser ( ) ) ) { com.google.gwt.core.client.Scheduler.get ( ) . scheduleDeferred ( new com.google.gwt.core.client.Scheduler.ScheduledCommand ( ) { @ java.lang.Override public void execute ( ) { com.google.gwt.dom.client.Node favicon = com.google.gwt.user.client.DOM.getElementById ( "id-link-favicon" ) ; if ( favicon != null ) { com.google.gwt.dom.client.Node parent = favicon.getParentNode ( ) ; favicon.removeFromParent ( ) ; parent.appendChild ( favicon ) ; } } } ) ; } }

Target:
public void onValueChange ( com.google.gwt.event.logical.shared.ValueChangeEvent < java.lang.String > event ) { super . onValueChange ( event ) ; if ( clientAgentType.isFirefox ( ) ) { com.google.gwt.core.client.Scheduler.get ( ) . scheduleDeferred ( new com.google.gwt.core.client.Scheduler.ScheduledCommand ( ) { @ java.lang.Override public void execute ( ) { com.google.gwt.dom.client.Node favicon = com.google.gwt.user.client.DOM.getElementById ( "id-link-favicon" ) ; if ( favicon != null ) { com.google.gwt.dom.client.Node parent = favicon.getParentNode ( ) ; favicon.removeFromParent ( ) ; parent.appendChild ( favicon ) ; } } } ) ; } }
Source:
public boolean isMemorySnapshotSupported ( org.ovirt.engine.core.common.businessentities.VM vm ) { if ( vm == null ) { return false ; } boolean archMemorySnapshotSupported = isMemorySnapshotSupportedByArchitecture ( vm.getClusterArch ( ) , vm.getVdsGroupCompatibilityVersion ( ) ) ; return ( ( java.lang.Boolean ) ( getConfigValuePreConverted ( ConfigurationValues.MemorySnapshotSupported , vm.getVdsGroupCompatibilityVersion ( ) . toString ( ) ) ) ) && archMemorySnapshotSupported ; }

Target:
public boolean isMemorySnapshotSupported ( org.ovirt.engine.core.common.businessentities.VM vm ) { if ( vm == null ) { return false ; } return isMemorySnapshotSupportedByArchitecture ( vm.getClusterArch ( ) , vm.getCompatibilityVersion ( ) ) ; }
Source:
public final < T extends java.lang.Enum < T > > void AddField ( T status , java.lang.String fieldName ) { java.util.Set < java.lang.String > values = dictionary.get ( status ) ; if ( values == null ) { values = new java.util.HashSet < > ( ) ; dictionary.put ( status , values ) ; } values.add ( fieldName ) ; }

Target:
public final < T extends java.lang.Enum < T > > void addField ( T status , java.lang.String fieldName ) { java.util.Set < java.lang.String > values = dictionary.get ( status ) ; if ( values == null ) { values = new java.util.HashSet < > ( ) ; dictionary.put ( status , values ) ; } values.add ( fieldName ) ; }
Source:
public int compare ( org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain , org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain2 ) { java.lang.Integer numOfVmDisksInStorageDomain = numOfVmDisksInStorageDomains.getOrDefault ( storageDomain.getId ( ) , 0 ) ; java.lang.Integer numOfVmDisksInStorageDomain2 = numOfVmDisksInStorageDomains.getOrDefault ( storageDomain2.getId ( ) , 0 ) ; return numOfVmDisksInStorageDomain.compareTo ( numOfVmDisksInStorageDomain2 ) ; }

Target:
public int compare ( org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain , org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain2 ) { java.lang.Long numOfVmDisksInStorageDomain = numOfVmDisksInStorageDomains.getOrDefault ( storageDomain.getId ( ) , 0L ) ; java.lang.Long numOfVmDisksInStorageDomain2 = numOfVmDisksInStorageDomains.getOrDefault ( storageDomain2.getId ( ) , 0L ) ; return numOfVmDisksInStorageDomain.compareTo ( numOfVmDisksInStorageDomain2 ) ; }
Source:
private void readCpuItem ( org.ovirt.engine.core.utils.ovf.xml.XmlNode node ) { vmBase.setNumOfSockets ( java.lang.Integer.parseInt ( node.SelectSingleNode ( "rasd:num_of_sockets" , _xmlNS ) . innerText ) ) ; vmBase.setCpuPerSocket ( java.lang.Integer.parseInt ( node.SelectSingleNode ( "rasd:cpu_per_socket" , _xmlNS ) . innerText ) ) ; }

Target:
private void readCpuItem ( org.ovirt.engine.core.utils.ovf.xml.XmlNode node ) { vmBase.setNumOfSockets ( java.lang.Integer.parseInt ( node.SelectSingleNode ( "rasd:num_of_sockets" , _xmlNS ) . innerText ) ) ; vmBase.setCpuPerSocket ( java.lang.Integer.parseInt ( node.SelectSingleNode ( "rasd:cpu_per_socket" , _xmlNS ) . innerText ) ) ; vmBase.setThreadsPerCpu ( parseNodeInteger ( node , "rasd:threads_per_cpu" , 1 ) ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValueObj ) { org.ovirt.engine.core.common.queries.VdcQueryReturnValue returnValue = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValueObj ) ) ; java.lang.Object returnValue2 = returnValue.getReturnValue ( ) ; this . existingNetworkAttachments = ( ( java.util.List < org.ovirt.engine.core.common.businessentities.network.NetworkAttachment > ) ( returnValue2 ) ) ; queryVfsConfig ( ) ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValueObj ) { org.ovirt.engine.core.common.queries.VdcQueryReturnValue returnValue = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValueObj ) ) ; java.lang.Object returnValue2 = returnValue.getReturnValue ( ) ; hostSetupNetworksParametersData.getNetworkAttachments ( ) . addAll ( ( ( java.util.List < org.ovirt.engine.core.common.businessentities.network.NetworkAttachment > ) ( returnValue2 ) ) ) ; initNetworkIdToExistingAttachmentMap ( ) ; queryVfsConfig ( ) ; }
Source:
public static void isMTUOverrideSupported ( 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.MTUOverrideSupported ) ; tempVar.setVersion ( version ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( tempVar , aQuery ) ; }

Target:
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 ) ; }
Source:
public void initTable ( final org.ovirt.engine.ui.common.CommonApplicationConstants constants ) { super . initTable ( constants ) ; org.ovirt.engine.ui.common.widget.table.column.BooleanColumn < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > portMirroringColumn = new org.ovirt.engine.ui.common.widget.table.column.BooleanColumn < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( constants.portMirroringEnabled ( ) ) { @ java.lang.Override public java.lang.Boolean getRawValue ( org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface object ) { return object.isPortMirroring ( ) ; } } ; getTable ( ) . addColumnWithHtmlHeader ( portMirroringColumn , constants.portMirroring ( ) , "85px" ) ; }

Target:
public void initTable ( final org.ovirt.engine.ui.common.CommonApplicationConstants constants ) { super . initTable ( constants ) ; getTable ( ) . enableColumnResizing ( ) ; org.ovirt.engine.ui.common.widget.table.column.BooleanColumn < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > portMirroringColumn = new org.ovirt.engine.ui.common.widget.table.column.BooleanColumn < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( constants.portMirroringEnabled ( ) ) { @ java.lang.Override public java.lang.Boolean getRawValue ( org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface object ) { return object.isPortMirroring ( ) ; } } ; getTable ( ) . addColumnWithHtmlHeader ( portMirroringColumn , constants.portMirroring ( ) , "85px" ) ; }
Source:
public org.ovirt.engine.core.common.AuditLogType getAuditLogTypeValue ( ) { switch ( org.ovirt.engine.core.bll.AddDiskCommand.getActionState ( ) ) { case EXECUTE : return org.ovirt.engine.core.bll.AddDiskCommand.getSucceeded ( ) ? org.ovirt.engine.core.common.AuditLogType.USER_ADD_DISK_TO_VM : org.ovirt.engine.core.common.AuditLogType.USER_FAILED_ADD_DISK_TO_VM ; case END_SUCCESS : return org.ovirt.engine.core.bll.AddDiskCommand.getSucceeded ( ) ? org.ovirt.engine.core.common.AuditLogType.USER_ADD_DISK_TO_VM_FINISHED_SUCCESS : org.ovirt.engine.core.common.AuditLogType.USER_ADD_DISK_TO_VM_FINISHED_FAILURE ; default : return org.ovirt.engine.core.common.AuditLogType.USER_ADD_DISK_TO_VM_FINISHED_FAILURE ; } }

Target:
public org.ovirt.engine.core.common.AuditLogType getAuditLogTypeValue ( ) { switch ( org.ovirt.engine.core.bll.AddDiskCommand.getActionState ( ) ) { case EXECUTE : return getExecuteAuditLogTypeValue ( org.ovirt.engine.core.bll.AddDiskCommand.getSucceeded ( ) ) ; case END_SUCCESS : return getEndSuccessAuditLogTypeValue ( org.ovirt.engine.core.bll.AddDiskCommand.getSucceeded ( ) ) ; default : return org.ovirt.engine.core.common.AuditLogType.USER_ADD_DISK_FINISHED_FAILURE ; } }
Source:
protected boolean canDoAction ( ) { org.ovirt.engine.core.bll.validator.HostInterfaceValidator validator = new org.ovirt.engine.core.bll.validator.HostInterfaceValidator ( getNic ( ) ) ; return ( ( validate ( validator.interfaceExists ( ) ) ) && ( validate ( validator.interfaceAlreadyLabeledWith ( getLabel ( ) ) ) ) ) && ( validate ( validator.anotherInterfaceAlreadyLabeledWithThisLabel ( getLabel ( ) , getHostInterfaces ( ) ) ) ) ; }

Target:
protected boolean validate ( ) { org.ovirt.engine.core.bll.validator.HostInterfaceValidator validator = new org.ovirt.engine.core.bll.validator.HostInterfaceValidator ( getNic ( ) ) ; return ( ( validate ( validator.interfaceExists ( org.ovirt.engine.core.bll.network.host.LabelNicCommand.getParameters ( ) . getNicId ( ) ) ) ) && ( validate ( validator.interfaceAlreadyLabeledWith ( getLabel ( ) ) ) ) ) && ( validate ( validator.anotherInterfaceAlreadyLabeledWithThisLabel ( getLabel ( ) , getHostInterfaces ( ) ) ) ) ; }
Source:
protected org.ovirt.engine.core.common.businessentities.HostDevice generateNewEntity ( ) { org.ovirt.engine.core.common.businessentities.HostDevice device = new org.ovirt.engine.core.common.businessentities.HostDevice ( ) ; device.setHostId ( org.ovirt.engine.core.dao.HostDeviceDaoTest.EXISTING_HOST_ID ) ; device.setDeviceName ( ( ( org.ovirt.engine.core.dao.HostDeviceDaoTest.EXISTING_DEVICE_NAME ) + "___child" ) ) ; device.setParentDeviceName ( org.ovirt.engine.core.dao.HostDeviceDaoTest.EXISTING_DEVICE_NAME ) ; device.setCapability ( "pci" ) ; return device ; }

Target:
protected org.ovirt.engine.core.common.businessentities.HostDevice generateNewEntity ( ) { org.ovirt.engine.core.common.businessentities.HostDevice device = new org.ovirt.engine.core.common.businessentities.HostDevice ( ) ; device.setHostId ( org.ovirt.engine.core.dao.HostDeviceDaoTest.EXISTING_HOST_ID ) ; device.setDeviceName ( ( ( org.ovirt.engine.core.dao.HostDeviceDaoTest.EXISTING_DEVICE_NAME ) + "___child" ) ) ; device.setParentDeviceName ( org.ovirt.engine.core.dao.HostDeviceDaoTest.EXISTING_DEVICE_NAME ) ; device.setCapability ( "pci" ) ; device.setAssignable ( true ) ; return device ; }