auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
protected void log ( ) { final javax.transaction.Transaction transaction = org.ovirt.engine.core.utils.transaction.TransactionSupport.suspend ( ) ; try { try { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.log ( this ) ; } catch ( final java.lang.RuntimeException ex ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase.log.errorFormat ( "Error during log command: {0}. Exception {1}" , getClass ( ) . getName ( ) , ex ) ; } } finally { org.ovirt.engine.core.utils.transaction.TransactionSupport.resume ( transaction ) ; } }

Target:
protected void log ( ) { final javax.transaction.Transaction transaction = org.ovirt.engine.core.utils.transaction.TransactionSupport.suspend ( ) ; try { try { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.log ( this ) ; } catch ( final java.lang.RuntimeException ex ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase.log.error ( "Error during log command: {}. Exception {}" , getClass ( ) . getName ( ) , ex.getMessage ( ) ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase.log.debug ( "Exception" , ex ) ; } } finally { org.ovirt.engine.core.utils.transaction.TransactionSupport.resume ( transaction ) ; } }
Source:
public org.ovirt.engine.sdk.decorators.Network add ( org.ovirt.engine.sdk.decorators.Network network ) throws java.io.IOException , org.apache.http.client.ClientProtocolException , org.ovirt.engine.sdk.exceptions.ServerException { java.lang.String url = ( SLASH ) + ( getName ( ) ) ; java.util.List < org.apache.http.Header > headers = new org.ovirt.engine.sdk.utils.HttpHeaderBuilder ( ) . build ( ) ; url = new org.ovirt.engine.sdk.utils.UrlBuilder ( url ) . build ( ) ; return getProxy ( ) . add ( url , network , org.ovirt.engine.sdk.entities.Network.class , org.ovirt.engine.sdk.decorators.Network.class , headers ) ; }

Target:
public org.ovirt.engine.sdk.decorators.Network add ( org.ovirt.engine.sdk.decorators.Network network ) throws java.io.IOException , org.apache.http.client.ClientProtocolException , org.ovirt.engine.sdk.exceptions.ServerException { java.lang.String url = ( SLASH ) + ( getName ( ) ) ; org.ovirt.engine.sdk.utils.HttpHeaderBuilder headersBuilder = new org.ovirt.engine.sdk.utils.HttpHeaderBuilder ( ) ; java.util.List < org.apache.http.Header > headers = headersBuilder.build ( ) ; org.ovirt.engine.sdk.utils.UrlBuilder urlBuilder = new org.ovirt.engine.sdk.utils.UrlBuilder ( url ) ; url = urlBuilder.build ( ) ; return getProxy ( ) . add ( url , network , org.ovirt.engine.sdk.entities.Network.class , org.ovirt.engine.sdk.decorators.Network.class , headers ) ; }
Source:
public void hostNameIsUsed ( ) { org.mockito.Mockito.when ( hostDao.getAllForHostname ( org.mockito.Matchers.any ( ) ) ) . thenReturn ( java.util.Collections.singletonList ( org.mockito.Mockito.mock ( org.ovirt.engine.core.common.businessentities.VDS.class ) ) ) ; org.junit.Assert.assertThat ( validator.hostNameNotUsed ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.ACTION_TYPE_FAILED_VDS_WITH_SAME_HOST_EXIST ) ) ; }

Target:
public void hostNameIsUsed ( ) { org.mockito.Mockito.when ( hostDao.getAllForHostname ( org.mockito.ArgumentMatchers.any ( ) ) ) . thenReturn ( java.util.Collections.singletonList ( org.mockito.Mockito.mock ( org.ovirt.engine.core.common.businessentities.VDS.class ) ) ) ; org.junit.Assert.assertThat ( validator.hostNameNotUsed ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.ACTION_TYPE_FAILED_VDS_WITH_SAME_HOST_EXIST ) ) ; }
Source:
public static void getDataCentersByStorageDomain ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storageDomainId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetStoragePoolsByStorageDomainId , new org.ovirt.engine.core.common.queries.StorageDomainQueryParametersBase ( storageDomainId ) , aQuery ) ; }

Target:
public static void getStorageConnectionById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String id , boolean isRefresh ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( org.ovirt.engine.core.common.businessentities.StorageServerConnections ) ( source ) ) : null ; } } ; org.ovirt.engine.core.common.queries.StorageServerConnectionQueryParametersBase params = new org.ovirt.engine.core.common.queries.StorageServerConnectionQueryParametersBase ( id ) ; params.setRefresh ( isRefresh ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetStorageServerConnectionById , params , aQuery ) ; }
Source:
public void getLunsByVgId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String vgId , org.ovirt.engine.core.compat.Guid vdsId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.LUNs > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.LUNs > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetLunsByVgIdParameters params = new org.ovirt.engine.core.common.queries.GetLunsByVgIdParameters ( vgId , vdsId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetLunsByVgId , params , aQuery ) ; }

Target:
public void getExistingStorageDomainList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hostId , org.ovirt.engine.core.common.businessentities.StorageDomainType domainType , org.ovirt.engine.core.common.businessentities.storage.StorageType storageType , java.lang.String path ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetExistingStorageDomainList , new org.ovirt.engine.core.common.queries.GetExistingStorageDomainListParameters ( hostId , storageType , domainType , path ) , aQuery ) ; }
Source:
public java.lang.String getValue ( org.ovirt.engine.ui.uicommonweb.models.vms.ImportEntityData object ) { ( ( org.ovirt.engine.ui.webadmin.widget.table.column.CustomSelectionCell ) ( getCell ( ) ) ) . setOptions ( object.getClusterNames ( ) ) ; return ( object.getCluster ( ) . getSelectedItem ( ) ) != null ? object.getCluster ( ) . getSelectedItem ( ) . getName ( ) : constants.empty ( ) ; }

Target:
public java.lang.String getValue ( org.ovirt.engine.ui.uicommonweb.models.vms.ImportEntityData object ) { ( ( org.ovirt.engine.ui.webadmin.widget.table.cell.CustomSelectionCell ) ( getCell ( ) ) ) . setOptions ( object.getClusterNames ( ) ) ; return ( object.getCluster ( ) . getSelectedItem ( ) ) != null ? object.getCluster ( ) . getSelectedItem ( ) . getName ( ) : constants.empty ( ) ; }
Source:
public void validateSufficientSpaceOnDestinationDomains ( ) { setupForStorageTests ( ) ; org.junit.Assert.assertTrue ( command.checkDestDomains ( ) ) ; org.mockito.Mockito.verify ( multipleSdValidator ) . allDomainsWithinThresholds ( ) ; org.mockito.Mockito.verify ( multipleSdValidator ) . allDomainsHaveSpaceForNewDisks ( org.mockito.Matchers.anyList ( ) ) ; }

Target:
public void validateSufficientSpaceOnDestinationDomains ( ) { setupForStorageTests ( ) ; org.junit.Assert.assertTrue ( command.checkDestDomains ( ) ) ; org.mockito.Mockito.verify ( multipleSdValidator ) . allDomainsWithinThresholds ( ) ; org.mockito.Mockito.verify ( multipleSdValidator ) . allDomainsHaveSpaceForNewDisks ( org.mockito.Matchers.anyListOf ( org.ovirt.engine.core.common.businessentities.DiskImage.class ) ) ; }
Source:
public void setupNetworks ( ) { if ( ( getWindow ( ) ) != null ) { return ; } org.ovirt.engine.ui.uicommonweb.models.hosts.HostSetupNetworksModel setupNetworksWindowModel = new org.ovirt.engine.ui.uicommonweb.models.hosts.HostSetupNetworksModel ( this , getEntity ( ) ) ; setWindow ( setupNetworksWindowModel ) ; }

Target:
public void onSaveNetworkConfig ( ) { org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel ) ( getWindow ( ) ) ) ; if ( ( model.getProgress ( ) ) != null ) { return ; } model.startProgress ( null ) ; setcurrentModel ( model ) ; new org.ovirt.engine.ui.uicommonweb.models.hosts.SaveNetworkConfigAction ( this , model , getEntity ( ) ) . execute ( ) ; }
Source:
protected void setActionMessageParameters ( ) { addCanDoActionMessage ( VdcBllMessages.VAR__ACTION__REMOVE ) ; addCanDoActionMessage ( VdcBllMessages.VAR__TYPE__CLUSTER_POLICY ) ; }

Target:
protected boolean canDoAction ( ) { if ( ! ( checkRemoveEditValidations ( ) ) ) { return false ; } if ( ( getVdsGroupDao ( ) . getClustersByClusterPolicyId ( getParameters ( ) . getClusterPolicyId ( ) ) . size ( ) ) > 0 ) { return failCanDoAction ( EngineMessage.ACTION_TYPE_FAILED_CLUSTER_POLICY_INUSE , java.lang.String.format ( "$clusters %1$s" , clustersListIntoTokenizedString ( ) ) ) ; } return true ; }
Source:
public void testRemoveStoragePoolIsoMap ( ) { dao.remove ( new org.ovirt.engine.core.common.businessentities.StoragePoolIsoMapId ( new org.ovirt.engine.core.compat.Guid ( existingStoragePoolIsoMap.getstorage_id ( ) . toString ( ) ) , existingStoragePoolIsoMap.getstorage_pool_id ( ) ) ) ; org.ovirt.engine.core.common.businessentities.storage_pool_iso_map result = dao.get ( new org.ovirt.engine.core.common.businessentities.StoragePoolIsoMapId ( existingStoragePoolIsoMap.getstorage_id ( ) , new org.ovirt.engine.core.compat.Guid ( existingStoragePoolIsoMap.getstorage_pool_id ( ) . toString ( ) ) ) ) ; assertNull ( result ) ; }

Target:
public void testRemoveStoragePoolIsoMap ( ) { dao.remove ( new org.ovirt.engine.core.common.businessentities.StoragePoolIsoMapId ( new org.ovirt.engine.core.compat.Guid ( existingStoragePoolIsoMap.getstorage_id ( ) . toString ( ) ) , existingStoragePoolIsoMap.getstorage_pool_id ( ) ) ) ; org.ovirt.engine.core.common.businessentities.StoragePoolIsoMap result = dao.get ( new org.ovirt.engine.core.common.businessentities.StoragePoolIsoMapId ( existingStoragePoolIsoMap.getstorage_id ( ) , new org.ovirt.engine.core.compat.Guid ( existingStoragePoolIsoMap.getstorage_pool_id ( ) . toString ( ) ) ) ) ; assertNull ( result ) ; }
Source:
public static org.ovirt.engine.core.bll.provider.OpenstackImageProviderProxy getFromStorageDomainId ( org.ovirt.engine.core.compat.Guid storageDomainId ) { org.ovirt.engine.core.common.businessentities.StorageDomainStatic storageDomainStatic = org.ovirt.engine.core.bll.provider.OpenstackImageProviderProxy.getDbFacade ( ) . getStorageDomainStaticDao ( ) . get ( storageDomainId ) ; if ( storageDomainStatic != null ) { org.ovirt.engine.core.common.businessentities.Provider provider = org.ovirt.engine.core.bll.provider.OpenstackImageProviderProxy.getDbFacade ( ) . getProviderDao ( ) . get ( new org.ovirt.engine.core.compat.Guid ( storageDomainStatic.getStorage ( ) ) ) ; return org.ovirt.engine.core.bll.provider.ProviderProxyFactory.getInstance ( ) . create ( provider ) ; } return null ; }

Target:
public static org.ovirt.engine.core.bll.provider.OpenStackImageProviderProxy getFromStorageDomainId ( org.ovirt.engine.core.compat.Guid storageDomainId ) { org.ovirt.engine.core.common.businessentities.StorageDomainStatic storageDomainStatic = org.ovirt.engine.core.bll.provider.OpenStackImageProviderProxy.getDbFacade ( ) . getStorageDomainStaticDao ( ) . get ( storageDomainId ) ; if ( storageDomainStatic != null ) { org.ovirt.engine.core.common.businessentities.Provider provider = org.ovirt.engine.core.bll.provider.OpenStackImageProviderProxy.getDbFacade ( ) . getProviderDao ( ) . get ( new org.ovirt.engine.core.compat.Guid ( storageDomainStatic.getStorage ( ) ) ) ; return org.ovirt.engine.core.bll.provider.ProviderProxyFactory.getInstance ( ) . create ( provider ) ; } return null ; }
Source:
protected void executeQueryCommand ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.StorageServerConnections > conns = new java.util.ArrayList < > ( ) ; for ( java.lang.String id : getConnectionsIds ( ) ) { conns.add ( org.ovirt.engine.core.bll.storage.connection.GetStorageServerConnectionByIscsiBondIdQuery.getDbFacade ( ) . getStorageServerConnectionDao ( ) . get ( id ) ) ; } org.ovirt.engine.core.bll.storage.connection.GetStorageServerConnectionByIscsiBondIdQuery.getQueryReturnValue ( ) . setReturnValue ( conns ) ; }

Target:
protected void executeQueryCommand ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.StorageServerConnections > conns = new java.util.ArrayList < > ( ) ; for ( java.lang.String id : getConnectionsIds ( ) ) { conns.add ( storageServerConnectionDao.get ( id ) ) ; } org.ovirt.engine.core.bll.storage.connection.GetStorageServerConnectionByIscsiBondIdQuery.getQueryReturnValue ( ) . setReturnValue ( conns ) ; }
Source:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { org.ovirt.engine.ui.uicommonweb.models.vms.VmListModel vmListModel = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.VmListModel ) ( result.getState ( ) ) ) ; vmListModel.getWindow ( ) . stopProgress ( ) ; org.ovirt.engine.core.common.action.VdcReturnValueBase returnValueBase = result.getReturnValue ( ) ; if ( ( returnValueBase != null ) && ( returnValueBase.getSucceeded ( ) ) ) { vmListModel.cancel ( ) ; vmListModel.setGuideContext ( returnValueBase.getActionReturnValue ( ) ) ; vmListModel.updateActionAvailability ( ) ; vmListModel.getGuideCommand ( ) . execute ( ) ; } }

Target:
public void networkCreated ( org.ovirt.engine.core.compat.Guid vmId ) { getWindow ( ) . stopProgress ( ) ; cancel ( ) ; setGuideContext ( vmId ) ; updateActionAvailability ( ) ; getGuideCommand ( ) . execute ( ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object ReturnValue ) { this . host = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( ReturnValue ) ) . getReturnValue ( ) ; this . setAndInvokeClient ( ) ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { vncImpl.setOptions ( ( ( org.ovirt.engine.core.common.console.ConsoleOptions ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ) ) ) ; vncImpl.getOptions ( ) . setTitle ( getClientTitle ( ) ) ; if ( ( vncImpl ) instanceof org.ovirt.engine.ui.uicommonweb.restapi.HasForeignMenuData ) { setForeignMenuData ( ( ( org.ovirt.engine.ui.uicommonweb.restapi.HasForeignMenuData ) ( vncImpl ) ) ) ; } vncImpl.invokeClient ( ) ; }
Source:
private void readNetworkItem ( org.ovirt.engine.core.compat.backendcompat.XmlNode node ) { org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface iface = getNetwotkInterface ( node ) ; updateSingleNic ( node , iface ) ; vmBase.getInterfaces ( ) . add ( iface ) ; readVmDevice ( node , vmBase , iface.getId ( ) , java.lang.Boolean.TRUE ) ; }

Target:
private void readNetworkItem ( org.ovirt.engine.core.compat.backendcompat.XmlNode node ) { org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface iface = getNetwotkInterface ( node ) ; updateSingleNic ( node , iface ) ; vmBase.getInterfaces ( ) . add ( iface ) ; readManagedVmDevice ( node , iface.getId ( ) ) ; }
Source:
public static void getHostsForStorageOperation ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , boolean localFsOnly ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { return source ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetHostsForStorageOperation , new org.ovirt.engine.core.common.queries.GetHostsForStorageOperationParameters ( storagePoolId , localFsOnly ) , aQuery ) ; }

Target:
public void getVmDiskList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId , boolean isRefresh ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { return source ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.DiskImage > ( ) ; } } ; org.ovirt.engine.core.common.queries.IdQueryParameters params = new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) ; params.setRefresh ( isRefresh ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllDisksByVmId , params , aQuery ) ; }
Source:
private void massNetworksUpdate ( org.ovirt.engine.core.compat.Guid vfsConfigId , java.util.Set < org.ovirt.engine.core.compat.Guid > networks ) { java.util.List < org.springframework.jdbc.core.namedparam.MapSqlParameterSource > executions = new java.util.ArrayList ( networks.size ( ) ) ; for ( org.ovirt.engine.core.compat.Guid networkId : networks ) { executions.add ( createNetworkParametersMapper ( vfsConfigId , networkId ) ) ; } getCallsHandler ( ) . executeStoredProcAsBatch ( "InsertvfsConfigNetwork" , executions ) ; }

Target:
public void removeNetwork ( org.ovirt.engine.core.compat.Guid vfsConfigId , org.ovirt.engine.core.compat.Guid networkId ) { getCallsHandler ( ) . executeModification ( "DeleteVfsConfigNetwork" , createNetworkParametersMapper ( vfsConfigId , networkId ) ) ; }
Source:
public org.ovirt.engine.sdk.decorators.DataCenterStorageDomain add ( org.ovirt.engine.sdk.decorators.StorageDomain storagedomain ) throws java.io.IOException , org.apache.http.client.ClientProtocolException , org.ovirt.engine.sdk.exceptions.ServerException { java.lang.String url = ( ( this . parent.getHref ( ) ) + ( SLASH ) ) + ( getName ( ) ) ; return getProxy ( ) . add ( url , storagedomain , org.ovirt.engine.sdk.entities.StorageDomain.class , org.ovirt.engine.sdk.decorators.DataCenterStorageDomain.class ) ; }

Target:
public org.ovirt.engine.sdk.decorators.DataCenterStorageDomain add ( org.ovirt.engine.sdk.decorators.StorageDomain storagedomain ) throws java.io.IOException , org.apache.http.client.ClientProtocolException , org.ovirt.engine.sdk.exceptions.ServerException { java.lang.String url = ( ( this . parent.getHref ( ) ) + ( SLASH ) ) + ( getName ( ) ) ; java.util.List < org.apache.http.Header > headers = new org.ovirt.engine.sdk.utils.HttpHeaderBuilder ( ) . build ( ) ; url = new org.ovirt.engine.sdk.utils.UrlBuilder ( url ) . build ( ) ; return getProxy ( ) . add ( url , storagedomain , org.ovirt.engine.sdk.entities.StorageDomain.class , org.ovirt.engine.sdk.decorators.DataCenterStorageDomain.class , headers ) ; }
Source:
private void reportMTUDifferences ( java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > ifaceNetworks ) { java.util.List < java.lang.String > mtuDiffNetworks = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.network.Network net : ifaceNetworks ) { mtuDiffNetworks.add ( java.lang.String.format ( "%s(%s)" , net.getName ( ) , ( ( net.getMtu ( ) ) == 0 ? "default" : java.lang.String.valueOf ( net.getMtu ( ) ) ) ) ) ; } addViolation ( VdcBllMessages.NETWORK_MTU_DIFFERENCES , java.lang.String.format ( "[%s]" , org.apache.commons.lang.StringUtils.join ( mtuDiffNetworks , ", " ) ) ) ; }

Target:
private void reportMTUDifferences ( java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > ifaceNetworks ) { java.util.List < java.lang.String > mtuDiffNetworks = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.network.Network net : ifaceNetworks ) { mtuDiffNetworks.add ( java.lang.String.format ( "%s(%s)" , net.getName ( ) , ( ( net.getMtu ( ) ) == 0 ? "default" : java.lang.String.valueOf ( net.getMtu ( ) ) ) ) ) ; } addViolation ( EngineMessage.NETWORK_MTU_DIFFERENCES , java.lang.String.format ( "[%s]" , org.apache.commons.lang.StringUtils.join ( mtuDiffNetworks , ", " ) ) ) ; }
Source:
public java.lang.String toString ( ) { return org.ovirt.engine.core.common.utils.ToStringBuilder.forInstance ( this ) . append ( "Group" , groupTitle ) . append ( "label" , getLabel ( ) ) . append ( "priority" , getPriority ( ) ) . toString ( ) ; }

Target:
public java.lang.String toString ( ) { return org.ovirt.engine.core.common.utils.ToStringBuilder.forInstance ( this ) . append ( "label" , getLabel ( ) ) . append ( "priority" , getPriority ( ) ) . append ( "groupTitle" , groupTitle ) . append ( "groupPriority" , groupPriority ) . build ( ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.StorageServerConnections populateBasicConnectionDetails ( org.ovirt.engine.core.compat.Guid id , java.lang.String connection , org.ovirt.engine.core.common.businessentities.storage.StorageType type ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections connectionDetails = new org.ovirt.engine.core.common.businessentities.StorageServerConnections ( ) ; connectionDetails.setid ( id.toString ( ) ) ; connectionDetails.setconnection ( connection ) ; connectionDetails.setstorage_type ( type ) ; return connectionDetails ; }

Target:
private org.ovirt.engine.core.common.businessentities.StorageServerConnections populateBasicConnectionDetails ( org.ovirt.engine.core.compat.Guid id , java.lang.String connection , org.ovirt.engine.core.common.businessentities.storage.StorageType type ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections connectionDetails = new org.ovirt.engine.core.common.businessentities.StorageServerConnections ( ) ; connectionDetails.setId ( id.toString ( ) ) ; connectionDetails.setConnection ( connection ) ; connectionDetails.setStorageType ( type ) ; return connectionDetails ; }
Source:
private void addPermissionForTempalte ( org.ovirt.engine.core.compat.Guid userId , org.ovirt.engine.core.bll.PredefinedRoles role ) { org.ovirt.engine.core.common.businessentities.permissions perms = new org.ovirt.engine.core.common.businessentities.permissions ( ) ; perms.setad_element_id ( userId ) ; perms.setObjectType ( VdcObjectType.VmTemplate ) ; perms.setObjectId ( org.ovirt.engine.core.bll.AddVmTemplateCommand.getParameters ( ) . getVmTemplateId ( ) ) ; perms.setrole_id ( role.getId ( ) ) ; org.ovirt.engine.core.bll.MultiLevelAdministrationHandler.addPermission ( perms ) ; }

Target:
private void addPermissionForTemplate ( org.ovirt.engine.core.bll.UniquePermissionsSet permissionsToAdd , org.ovirt.engine.core.compat.Guid userId , org.ovirt.engine.core.bll.PredefinedRoles role ) { permissionsToAdd.addPermission ( userId , role.getId ( ) , org.ovirt.engine.core.bll.AddVmTemplateCommand.getParameters ( ) . getVmTemplateId ( ) , VdcObjectType.VmTemplate ) ; }
Source:
protected org.ovirt.engine.core.common.action.VdcReturnValueBase runCanDoActionOnly ( final int currentCanDoActionId , final int totalSize ) { org.ovirt.engine.core.bll.CommandBase < ? > command = getCommands ( ) . get ( currentCanDoActionId ) ; java.lang.String actionType = command.getActionType ( ) . toString ( ) ; org.ovirt.engine.core.utils.CorrelationIdTracker.setCorrelationId ( command.getCorrelationId ( ) ) ; try { org.ovirt.engine.core.bll.MultipleActionsRunner.log.infoFormat ( "Start running CanDoAction for command number {0}/{1} (Command type: {2})" , ( currentCanDoActionId + 1 ) , totalSize , actionType ) ; return command.canDoActionOnly ( ) ; } finally { org.ovirt.engine.core.bll.MultipleActionsRunner.log.infoFormat ( "Finish handling CanDoAction for command number {0}/{1} (Command type: {2})" , ( currentCanDoActionId + 1 ) , totalSize , actionType ) ; } }

Target:
protected org.ovirt.engine.core.common.action.VdcReturnValueBase runCanDoActionOnly ( final int currentCanDoActionId , final int totalSize ) { org.ovirt.engine.core.bll.CommandBase < ? > command = getCommands ( ) . get ( currentCanDoActionId ) ; java.lang.String actionType = command.getActionType ( ) . toString ( ) ; org.ovirt.engine.core.utils.CorrelationIdTracker.setCorrelationId ( command.getCorrelationId ( ) ) ; try { org.ovirt.engine.core.bll.MultipleActionsRunner.log.info ( "Start running CanDoAction for command number {}/{} (Command type '{}')" , ( currentCanDoActionId + 1 ) , totalSize , actionType ) ; return command.canDoActionOnly ( ) ; } finally { org.ovirt.engine.core.bll.MultipleActionsRunner.log.info ( "Finish handling CanDoAction for command number {}/{} (Command type '{}')" , ( currentCanDoActionId + 1 ) , totalSize , actionType ) ; } }
Source:
public static org.ovirt.engine.core.common.businessentities.storage.DiskImage createMemoryDisk ( org.ovirt.engine.core.common.businessentities.VM vm , org.ovirt.engine.core.common.businessentities.storage.StorageType storageType , org.ovirt.engine.core.bll.utils.VmOverheadCalculator vmOverheadCalculator ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage image = new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ; image.setSize ( vmOverheadCalculator.getSnapshotMemorySizeInBytes ( vm ) ) ; image.setVolumeType ( org.ovirt.engine.core.bll.memory.MemoryUtils.storageTypeToMemoryVolumeType ( storageType ) ) ; image.setVolumeFormat ( VolumeFormat.RAW ) ; return image ; }

Target:
public static org.ovirt.engine.core.common.businessentities.storage.DiskImage createMemoryDisk ( org.ovirt.engine.core.common.businessentities.VM vm , org.ovirt.engine.core.common.businessentities.storage.StorageType storageType , org.ovirt.engine.core.bll.utils.VmOverheadCalculator vmOverheadCalculator ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage image = new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ; image.setSize ( vmOverheadCalculator.getSnapshotMemorySizeInBytes ( vm ) ) ; image.setVolumeType ( org.ovirt.engine.core.bll.memory.MemoryUtils.storageTypeToMemoryVolumeType ( storageType ) ) ; image.setVolumeFormat ( VolumeFormat.RAW ) ; image.setContentType ( DiskContentType.MEMORY_DUMP_VOLUME ) ; return image ; }
Source:
private void assertFirstVersionOnly ( org.ovirt.engine.core.compat.Version version ) { final java.util.List < org.ovirt.engine.core.common.businessentities.network.NetworkFilter > allNetworkFilter = dao.getAllSupportedNetworkFiltersByVersion ( version ) ; org.junit.Assert.assertNotNull ( allNetworkFilter ) ; org.junit.Assert.assertEquals ( 1 , allNetworkFilter.size ( ) ) ; org.ovirt.engine.core.common.businessentities.network.NetworkFilter expectedNetworkFilter = initOvirtNoFilter ( ) ; org.junit.Assert.assertEquals ( expectedNetworkFilter , allNetworkFilter.get ( 0 ) ) ; }

Target:
private void assertFirstVersionOnly ( org.ovirt.engine.core.compat.Version version ) { final java.util.List < org.ovirt.engine.core.common.businessentities.network.NetworkFilter > allNetworkFilter = dao.getAllSupportedNetworkFiltersByVersion ( version ) ; org.junit.jupiter.api.Assertions.assertNotNull ( allNetworkFilter ) ; org.junit.jupiter.api.Assertions.assertEquals ( 1 , allNetworkFilter.size ( ) ) ; org.ovirt.engine.core.common.businessentities.network.NetworkFilter expectedNetworkFilter = initOvirtNoFilter ( ) ; org.junit.jupiter.api.Assertions.assertEquals ( expectedNetworkFilter , allNetworkFilter.get ( 0 ) ) ; }
Source:
private void VolumeType_SelectedItemChanged ( ) { org.ovirt.engine.core.common.businessentities.VolumeType volumeType = ( ( getVolumeType ( ) . getSelectedItem ( ) ) == null ) ? org.ovirt.engine.core.common.businessentities.VolumeType.Unassigned : ( ( org.ovirt.engine.core.common.businessentities.VolumeType ) ( getVolumeType ( ) . getSelectedItem ( ) ) ) ; org.ovirt.engine.core.common.businessentities.StorageType storageType = ( ( getStorageDomain ( ) . getSelectedItem ( ) ) == null ) ? org.ovirt.engine.core.common.businessentities.StorageType.UNKNOWN : ( ( org.ovirt.engine.core.common.businessentities.storage_domains ) ( getStorageDomain ( ) . getSelectedItem ( ) ) ) . getstorage_type ( ) ; updateVolumeFormat ( volumeType , storageType ) ; updateShareable ( volumeType , storageType ) ; }

Target:
private void VolumeType_SelectedItemChanged ( ) { org.ovirt.engine.core.common.businessentities.VolumeType volumeType = ( ( getVolumeType ( ) . getSelectedItem ( ) ) == null ) ? org.ovirt.engine.core.common.businessentities.VolumeType.Unassigned : ( ( org.ovirt.engine.core.common.businessentities.VolumeType ) ( getVolumeType ( ) . getSelectedItem ( ) ) ) ; org.ovirt.engine.core.common.businessentities.StorageType storageType = ( ( getStorageDomain ( ) . getSelectedItem ( ) ) == null ) ? org.ovirt.engine.core.common.businessentities.StorageType.UNKNOWN : ( ( org.ovirt.engine.core.common.businessentities.StorageDomain ) ( getStorageDomain ( ) . getSelectedItem ( ) ) ) . getStorageType ( ) ; updateVolumeFormat ( volumeType , storageType ) ; updateShareable ( volumeType , storageType ) ; }
Source:
protected boolean isRngSupportedByCluster ( ) { org.ovirt.engine.core.common.businessentities.VDSGroup cluster = org.ovirt.engine.core.bll.AbstractRngDeviceCommand.getVdsGroup ( ) ; org.ovirt.engine.core.common.businessentities.VmRngDevice.Source source = org.ovirt.engine.core.bll.AbstractRngDeviceCommand.getParameters ( ) . getRngDevice ( ) . getSource ( ) ; return ( ( cluster != null ) && ( isFeatureSupported ( cluster.getcompatibility_version ( ) ) ) ) && ( cluster.getRequiredRngSources ( ) . contains ( source ) ) ; }

Target:
protected org.ovirt.engine.core.bll.validator.VirtIoRngValidator getVirtioRngValidator ( ) { return new org.ovirt.engine.core.bll.validator.VirtIoRngValidator ( ) ; }
Source:
public void testGetNetworkDiskTypeForV41ClusterEnabled ( ) { org.ovirt.engine.core.common.businessentities.VM vm = new org.ovirt.engine.core.common.businessentities.VM ( ) ; vm.setClusterCompatibilityVersion ( Version.v4_1 ) ; vm.setClusterId ( org.ovirt.engine.core.vdsbroker.builder.vminfo.VmInfoBuildUtilsTest.CLUSTER_ID ) ; org.mockito.Mockito.doReturn ( getSupportedAdditionalClusterFeatures ( true ) ) . when ( clusterFeatureDao ) . getSupportedFeaturesByClusterId ( org.ovirt.engine.core.vdsbroker.builder.vminfo.VmInfoBuildUtilsTest.CLUSTER_ID ) ; org.junit.Assert.assertEquals ( VdsProperties.NETWORK , underTest.getNetworkDiskType ( vm , StorageType.GLUSTERFS ) . get ( ) ) ; }

Target:
public void testGetNetworkDiskTypeForV41ClusterEnabled ( ) { org.ovirt.engine.core.common.businessentities.VM vm = new org.ovirt.engine.core.common.businessentities.VM ( ) ; vm.setClusterCompatibilityVersion ( Version.v4_1 ) ; vm.setClusterId ( org.ovirt.engine.core.vdsbroker.builder.vminfo.VmInfoBuildUtilsTest.CLUSTER_ID ) ; org.mockito.Mockito.doReturn ( getSupportedAdditionalClusterFeatures ( true ) ) . when ( clusterFeatureDao ) . getSupportedFeaturesByClusterId ( org.ovirt.engine.core.vdsbroker.builder.vminfo.VmInfoBuildUtilsTest.CLUSTER_ID ) ; org.junit.jupiter.api.Assertions.assertEquals ( VdsProperties.NETWORK , underTest.getNetworkDiskType ( vm , StorageType.GLUSTERFS ) . get ( ) ) ; }
Source:
private boolean isDiskLun ( ) { org.ovirt.engine.core.common.businessentities.storage.Disk disk = org.ovirt.engine.core.bll.CopyImageGroupCommand.getDiskDao ( ) . get ( org.ovirt.engine.core.bll.CopyImageGroupCommand.getParameters ( ) . getImageGroupID ( ) ) ; if ( disk != null ) { return ! ( validate ( new org.ovirt.engine.core.bll.validator.storage.DiskValidator ( disk ) . validateDiskIsNotLun ( ) ) ) ; } return false ; }

Target:
protected boolean canDoAction ( ) { org.ovirt.engine.core.common.businessentities.storage.Disk disk = org.ovirt.engine.core.bll.CopyImageGroupCommand.getDiskDao ( ) . get ( org.ovirt.engine.core.bll.CopyImageGroupCommand.getParameters ( ) . getImageGroupID ( ) ) ; if ( disk != null ) { org.ovirt.engine.core.bll.validator.storage.DiskValidator diskValidator = new org.ovirt.engine.core.bll.validator.storage.DiskValidator ( disk ) ; return validate ( diskValidator.validateUnsupportedDiskStorageType ( DiskStorageType.LUN , DiskStorageType.CINDER ) ) ; } return false ; }
Source:
public void testGetAllWithPermissionsForPriviligedUser ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmTemplate > result = dao.getAll ( org.ovirt.engine.core.dao.PRIVILEGED_USER_ID , true ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.dao.VmTemplateDAOTest.NUMBER_OF_TEMPLATES_FOR_PRIVELEGED_USER , result.size ( ) ) ; org.junit.Assert.assertEquals ( result.iterator ( ) . next ( ) , existingTemplate ) ; }

Target:
public void testGetAllWithPermissionsForPriviligedUser ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmTemplate > result = dao.getAll ( org.ovirt.engine.core.dao.PRIVILEGED_USER_ID , true , VmEntityType.TEMPLATE ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.dao.VmTemplateDAOTest.NUMBER_OF_TEMPLATES_FOR_PRIVELEGED_USER , result.size ( ) ) ; org.junit.Assert.assertEquals ( result.iterator ( ) . next ( ) , existingTemplate ) ; }
Source:
protected void init ( ) { org.ovirt.engine.core.bll.TagsDirector.log.info ( ( "Start initializing " + ( getClass ( ) . getSimpleName ( ) ) ) ) ; tagsMapByID.clear ( ) ; tagsMapByName.clear ( ) ; org.ovirt.engine.core.common.businessentities.Tags root = new org.ovirt.engine.core.common.businessentities.Tags ( "root" , null , true , org.ovirt.engine.core.bll.TagsDirector.ROOT_TAG_ID , "root" ) ; AddTagToHash ( root ) ; AddChildren ( root ) ; org.ovirt.engine.core.bll.TagsDirector.log.info ( ( "Finished initializing " + ( getClass ( ) . getSimpleName ( ) ) ) ) ; }

Target:
protected void init ( ) { org.ovirt.engine.core.bll.TagsDirector.log.info ( ( "Start initializing " + ( getClass ( ) . getSimpleName ( ) ) ) ) ; tagsMapByID.clear ( ) ; tagsMapByName.clear ( ) ; org.ovirt.engine.core.common.businessentities.Tags root = new org.ovirt.engine.core.common.businessentities.Tags ( "root" , null , true , org.ovirt.engine.core.bll.TagsDirector.ROOT_TAG_ID , "root" ) ; addTagToHash ( root ) ; addChildren ( root ) ; org.ovirt.engine.core.bll.TagsDirector.log.info ( ( "Finished initializing " + ( getClass ( ) . getSimpleName ( ) ) ) ) ; }
Source:
public void removeFilter ( org.ovirt.engine.core.common.scheduling.PolicyUnit policyUnit ) { unusedFilters.add ( policyUnit ) ; for ( int i = 0 ; i < ( usedFilters.size ( ) ) ; i ++ ) { if ( usedFilters.get ( i ) . getId ( ) . equals ( policyUnit.getId ( ) ) ) { usedFilters.remove ( i ) ; break ; } } refreshCustomProperties ( policyUnit , false ) ; getFiltersChangedEvent ( ) . raise ( this , EventArgs.Empty ) ; }

Target:
public void removeFilter ( org.ovirt.engine.core.common.scheduling.PolicyUnit policyUnit ) { unusedFilters.add ( policyUnit ) ; for ( int i = 0 ; i < ( usedFilters.size ( ) ) ; i ++ ) { if ( usedFilters.get ( i ) . getId ( ) . equals ( policyUnit.getId ( ) ) ) { usedFilters.remove ( i ) ; break ; } } refreshCustomProperties ( policyUnit , false ) ; getFiltersChangedEvent ( ) . raise ( this , EventArgs.EMPTY ) ; }
Source:
private boolean isFencingPolicySupported ( org.ovirt.engine.core.common.businessentities.VDS proxyCandidate , org.ovirt.engine.core.compat.Version minimalSupportedVersion ) { return proxyCandidate.getSupportedClusterVersionsSet ( ) . contains ( minimalSupportedVersion ) ; }

Target:
protected boolean isFencingPolicySupported ( org.ovirt.engine.core.common.businessentities.VDS proxyCandidate , org.ovirt.engine.core.compat.Version minimalSupportedVersion ) { boolean supported = ( ( fencingPolicy ) == null ) || ( proxyCandidate.getSupportedClusterVersionsSet ( ) . contains ( minimalSupportedVersion ) ) ; org.ovirt.engine.core.bll.pm.FenceProxyLocator.log.debug ( "Proxy candidate '{}' supports fencing policy '{}': {}" , proxyCandidate.getHostName ( ) , fencingPolicy , supported ) ; return supported ; }
Source:
private void doTestBootProtocolSetForDisplayNetworkWhenNullValuedIpConfigurationAndWhenNetworkClusterDisplay ( boolean displayNetwork , org.ovirt.engine.core.common.businessentities.network.Network network , org.hamcrest.Matcher < org.ovirt.engine.core.bll.ValidationResult > matcher ) { org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment = new org.ovirt.engine.core.common.businessentities.network.NetworkAttachment ( ) ; attachment.setIpConfiguration ( null ) ; attachment.setNetworkId ( network.getId ( ) ) ; doTestBootProtocolSetForDisplayNetworkWhenNullValuedIpConfigurationAndWhenNetworkClusterDisplay ( displayNetwork , matcher , network , attachment ) ; }

Target:
private void doTestBootProtocolSetForRoleNetworkWhenNullValuedIpConfiguration ( boolean displayNetwork , org.ovirt.engine.core.common.businessentities.network.Network network , org.hamcrest.Matcher < org.ovirt.engine.core.bll.ValidationResult > matcher ) { org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment = new org.ovirt.engine.core.common.businessentities.network.NetworkAttachment ( ) ; attachment.setIpConfiguration ( null ) ; attachment.setNetworkId ( network.getId ( ) ) ; doTestBootProtocolSetForRoleNetworkWhenNullValuedIpConfiguration ( displayNetwork , false , false , matcher , network , attachment ) ; }
Source:
private static long copy ( final java.io.InputStream input , final java.io.OutputStream output ) throws java.io.IOException { final byte [ ] buffer = new byte [ 8 * 1024 ] ; long count = 0 ; int n ; while ( ( n = input.read ( buffer ) ) != ( - 1 ) ) { output.write ( buffer , 0 , n ) ; count += n ; } return count ; }

Target:
public static java.util.Map < java.lang.String , java.lang.Object > loginWithPassword ( java.lang.String username , java.lang.String password , java.lang.String scope ) { return org.ovirt.engine.core.aaa.SSOOAuthServiceUtils.loginWithPasswordImpl ( username , password , scope , null ) ; }
Source:
public void importTemplate ( java.lang.String ovfstring , org.ovirt.engine.core.common.businessentities.VmTemplate vmTemplate , java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > images , java.util.List < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > interfaces ) throws org.ovirt.engine.core.utils.ovf.OvfReaderException { org.ovirt.engine.core.utils.ovf.OvfReader ovf = null ; try { ovf = new org.ovirt.engine.core.utils.ovf.OvfTemplateReader ( new org.ovirt.engine.core.utils.ovf.xml.XmlDocument ( ovfstring ) , vmTemplate , images , interfaces ) ; buildOvf ( ovf ) ; initIcons ( vmTemplate ) ; } catch ( java.lang.Exception ex ) { java.lang.String message = generateOvfReaderErrorMessage ( ovf , ex ) ; logOvfLoadError ( message , ovfstring ) ; throw new org.ovirt.engine.core.utils.ovf.OvfReaderException ( message ) ; } }

Target:
public void importTemplate ( java.lang.String ovfstring , org.ovirt.engine.core.common.businessentities.VmTemplate vmTemplate , java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > images , java.util.List < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > interfaces ) throws org.ovirt.engine.core.utils.ovf.OvfReaderException { org.ovirt.engine.core.utils.ovf.OvfReader ovf = null ; try { ovf = new org.ovirt.engine.core.utils.ovf.OvfTemplateReader ( new org.ovirt.engine.core.utils.ovf.xml.XmlDocument ( ovfstring ) , vmTemplate , images , interfaces ) ; ovf.build ( ) ; initIcons ( vmTemplate ) ; } catch ( java.lang.Exception ex ) { java.lang.String message = generateOvfReaderErrorMessage ( ovf , ex ) ; logOvfLoadError ( message , ovfstring ) ; throw new org.ovirt.engine.core.utils.ovf.OvfReaderException ( message ) ; } }
Source:
public com.google.gwt.safehtml.shared.SafeHtml getTooltip ( org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface object ) { return null ; }

Target:
public void initTable ( ) { super . initTable ( ) ; getTable ( ) . enableColumnResizing ( ) ; org.ovirt.engine.ui.common.widget.table.column.AbstractBooleanColumn < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > portMirroringColumn = new org.ovirt.engine.ui.common.widget.table.column.AbstractBooleanColumn < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( org.ovirt.engine.ui.webadmin.section.main.view.tab.virtualMachine.SubTabVirtualMachineNetworkInterfaceView.constants.portMirroringEnabled ( ) ) { @ java.lang.Override public java.lang.Boolean getRawValue ( org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface object ) { return object.isPortMirroring ( ) ; } } ; portMirroringColumn.makeSortable ( ) ; getTable ( ) . addColumn ( portMirroringColumn , org.ovirt.engine.ui.webadmin.section.main.view.tab.virtualMachine.SubTabVirtualMachineNetworkInterfaceView.constants.portMirroring ( ) , "85px" ) ; }
Source:
protected void addStoragePermissionByQuotaMode ( java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > permsList , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.compat.Guid StorageDomainId ) { org.ovirt.engine.core.common.businessentities.storage_pool storagePool = null ; if ( storagePoolId != null ) { storagePool = org.ovirt.engine.core.bll.CommandBase.getStoragePoolDAO ( ) . get ( storagePoolId ) ; if ( storagePool != null ) { if ( ( storagePool.getQuotaEnforcementType ( ) ) == ( org.ovirt.engine.core.common.businessentities.QuotaEnforcementTypeEnum.DISABLED ) ) { permsList.add ( new org.ovirt.engine.core.bll.utils.PermissionSubject ( StorageDomainId , org.ovirt.engine.core.common.VdcObjectType.Storage , org.ovirt.engine.core.common.businessentities.ActionGroup.CREATE_DISK ) ) ; } } } }

Target:
protected void addStoragePermissionByQuotaMode ( java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > permsList , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.compat.Guid StorageDomainId ) { org.ovirt.engine.core.common.businessentities.storage_pool storagePool = null ; if ( storagePoolId != null ) { storagePool = org.ovirt.engine.core.bll.CommandBase.getStoragePoolDAO ( ) . get ( storagePoolId ) ; if ( storagePool != null ) { if ( ( ( storagePool.getQuotaEnforcementType ( ) ) == ( org.ovirt.engine.core.common.businessentities.QuotaEnforcementTypeEnum.DISABLED ) ) || ( ( storagePool.getQuotaEnforcementType ( ) ) == ( org.ovirt.engine.core.common.businessentities.QuotaEnforcementTypeEnum.SOFT_ENFORCEMENT ) ) ) { permsList.add ( new org.ovirt.engine.core.bll.utils.PermissionSubject ( StorageDomainId , org.ovirt.engine.core.common.VdcObjectType.Storage , org.ovirt.engine.core.common.businessentities.ActionGroup.CREATE_DISK ) ) ; } } } }
Source:
private org.ovirt.engine.core.compat.Guid getDisksStorageDomainId ( ) { for ( org.ovirt.engine.core.common.businessentities.Disk disk : org.ovirt.engine.core.bll.AddDiskCommand.getVm ( ) . getDiskMap ( ) . values ( ) ) { if ( ( disk.getDiskStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.Disk.DiskStorageType.IMAGE ) ) { return ( ( org.ovirt.engine.core.common.businessentities.DiskImage ) ( disk ) ) . getstorage_ids ( ) . get ( 0 ) ; } } return org.ovirt.engine.core.compat.Guid.Empty ; }

Target:
private org.ovirt.engine.core.compat.Guid getDisksStorageDomainId ( ) { for ( org.ovirt.engine.core.common.businessentities.Disk disk : org.ovirt.engine.core.bll.AddDiskCommand.getVm ( ) . getDiskMap ( ) . values ( ) ) { if ( ( disk.getDiskStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.Disk.DiskStorageType.IMAGE ) ) { return ( ( org.ovirt.engine.core.common.businessentities.DiskImage ) ( disk ) ) . getStorageIds ( ) . get ( 0 ) ; } } return org.ovirt.engine.core.compat.Guid.Empty ; }
Source:
private void removeMemoryFromSnapshot ( ) { if ( memoryVolumeFromSnapshot.isEmpty ( ) ) { return ; } if ( ( getSnapshotDao ( ) . getNumOfSnapshotsByMemory ( memoryVolumeFromSnapshot ) ) == 1 ) { removeMemoryVolumes ( memoryVolumeFromSnapshot , org.ovirt.engine.core.bll.RunVmCommand.getActionType ( ) , true ) ; } getSnapshotDao ( ) . removeMemoryFromSnapshot ( getBaselineSnapshot ( ) . getId ( ) ) ; }

Target:
protected void failedToRunVm ( ) { if ( memoryFromSnapshotIrrelevant ) { removeMemoryFromActiveSnapshot ( ) ; } super . failedToRunVm ( ) ; }
Source:
private void dataCenterWithClusterSelectedItemChanged ( java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { behavior.dataCenterWithClusterSelectedItemChanged ( ) ; org.ovirt.engine.ui.uicommonweb.models.vms.DataCenterWithCluster dataCenterWithCluster = getDataCenterWithClustersList ( ) . getSelectedItem ( ) ; if ( ( dataCenterWithCluster != null ) && ( ( dataCenterWithCluster.getDataCenter ( ) ) != null ) ) { getDisksAllocationModel ( ) . setQuotaEnforcementType ( dataCenterWithCluster.getDataCenter ( ) . getQuotaEnforcementType ( ) ) ; } updateMigrationOptions ( ) ; handleQxlClusterLevel ( ) ; updateWatchdogModels ( ) ; }

Target:
private void dataCenterWithClusterSelectedItemChanged ( java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { behavior.dataCenterWithClusterSelectedItemChanged ( ) ; org.ovirt.engine.ui.uicommonweb.models.vms.DataCenterWithCluster dataCenterWithCluster = getDataCenterWithClustersList ( ) . getSelectedItem ( ) ; if ( ( dataCenterWithCluster != null ) && ( ( dataCenterWithCluster.getDataCenter ( ) ) != null ) ) { getDisksAllocationModel ( ) . setQuotaEnforcementType ( dataCenterWithCluster.getDataCenter ( ) . getQuotaEnforcementType ( ) ) ; } updateMigrationOptions ( ) ; handleQxlClusterLevel ( ) ; updateWatchdogModels ( ) ; updateBootMenu ( ) ; }
Source:
public static void GetVmsRunningOnOrMigratingToVds ( 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 ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmsRunningOnOrMigratingToVds , new org.ovirt.engine.core.common.queries.GetVmsRunningOnOrMigratingToVdsParameters ( id ) , aQuery ) ; }

Target:
public static void getVmsRunningOnOrMigratingToVds ( 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 ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmsRunningOnOrMigratingToVds , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel localModel = ( ( org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel ) ( result.getState ( ) ) ) ; localModel.stopProgress ( ) ; setConfirmWindow ( null ) ; if ( result.getReturnValue ( ) . getSucceeded ( ) ) { disableRemoveBrickStatusPopUpActions ( ) ; } }

Target:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel localModel = ( ( org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel ) ( result.getState ( ) ) ) ; localModel.stopProgress ( ) ; setConfirmWindow ( null ) ; if ( result.getReturnValue ( ) . getSucceeded ( ) ) { showRemoveBricksStatus ( ) ; disableRemoveBrickStatusPopUpActions ( ) ; } }