auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private void performGeoRepAction ( java.lang.String commandName , java.lang.String confirmTitle , org.ovirt.engine.ui.uicommonweb.help.HelpTag helpTag , java.lang.String hashName , java.lang.String action , org.ovirt.engine.core.common.action.VdcActionType actionType , java.lang.String actionProgressText ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSession selectedSession = getSelectedItem ( ) ; if ( selectedSession == null ) { return ; } initializeGeoRepActionConfirmation ( confirmTitle , helpTag , hashName , org.ovirt.engine.ui.uicommonweb.models.gluster.VolumeGeoRepListModel.constants.geoRepForceHelp ( ) , org.ovirt.engine.ui.uicommonweb.models.gluster.VolumeGeoRepListModel.messages.geoRepForceTitle ( action ) , commandName , selectedSession.getMasterVolumeName ( ) , selectedSession.getSlaveVolumeName ( ) , selectedSession.getSlaveHostName ( ) ) ; onGeoRepSessionAction ( actionType ) ; }

Target:
private void performGeoRepAction ( java.lang.String commandName , java.lang.String confirmTitle , org.ovirt.engine.ui.uicommonweb.help.HelpTag helpTag , java.lang.String hashName , java.lang.String action , org.ovirt.engine.core.common.action.VdcActionType actionType , java.lang.String actionProgressText ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSession selectedSession = getSelectedItem ( ) ; if ( selectedSession == null ) { return ; } initializeGeoRepActionConfirmation ( confirmTitle , helpTag , hashName , org.ovirt.engine.ui.uicommonweb.models.gluster.VolumeGeoRepListModel.constants.geoRepForceHelp ( ) , org.ovirt.engine.ui.uicommonweb.models.gluster.VolumeGeoRepListModel.messages.geoRepForceTitle ( action ) , commandName , selectedSession.getMasterVolumeName ( ) , selectedSession.getSlaveVolumeName ( ) , selectedSession.getSlaveHostName ( ) , null ) ; onGeoRepSessionAction ( actionType ) ; }
Source:
private org.ovirt.engine.api.model.Watchdog getModel ( ) { org.ovirt.engine.api.model.Watchdog watchDog = new org.ovirt.engine.api.model.Watchdog ( ) ; watchDog.setAction ( WatchdogAction.RESET.name ( ) . toLowerCase ( ) ) ; watchDog.setModel ( WatchdogModel.I6300ESB.name ( ) . toLowerCase ( ) ) ; watchDog.setId ( org.ovirt.engine.api.restapi.resource.BackendInstanceTypeWatchdogsResourceTest.WATCHDOG_ID.toString ( ) ) ; return watchDog ; }

Target:
private org.ovirt.engine.api.model.Watchdog getModel ( ) { org.ovirt.engine.api.model.Watchdog watchDog = new org.ovirt.engine.api.model.Watchdog ( ) ; watchDog.setAction ( WatchdogAction.RESET ) ; watchDog.setModel ( WatchdogModel.I6300ESB ) ; watchDog.setId ( org.ovirt.engine.api.restapi.resource.BackendInstanceTypeWatchdogsResourceTest.WATCHDOG_ID.toString ( ) ) ; return watchDog ; }
Source:
private void updateSpiceVersion ( ) { if ( ( clientOsType ( ) . equalsIgnoreCase ( "Windows" ) ) && ( clientBrowserType ( ) . equalsIgnoreCase ( "Explorer" ) ) ) { if ( clientPlatformType ( ) . equalsIgnoreCase ( "win32" ) ) { updateSpice32Version ( ) ; } else if ( clientPlatformType ( ) . equalsIgnoreCase ( "win64" ) ) { updateSpice64Version ( ) ; } } }

Target:
protected void updateSpiceVersion ( ) { if ( ( clientOsType ( ) . equalsIgnoreCase ( "Windows" ) ) && ( clientBrowserType ( ) . equalsIgnoreCase ( "Explorer" ) ) ) { if ( clientPlatformType ( ) . equalsIgnoreCase ( "win32" ) ) { updateSpice32Version ( ) ; } else if ( clientPlatformType ( ) . equalsIgnoreCase ( "win64" ) ) { updateSpice64Version ( ) ; } } }
Source:
public void testGetStorageConnectionNotFound ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpEntityQueryExpectations ( 1 , getIscsiBondContainingStorageConnection ( ) ) ; setUpEntityQueryExpectations ( VdcQueryType.GetStorageServerConnectionById , org.ovirt.engine.core.common.queries.StorageServerConnectionQueryParametersBase.class , new java.lang.String [ ] { "ServerConnectionId" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendIscsiBondStorageConnectionResourceTest.STORAGE_CONNECTION_ID.toString ( ) } , null ) ; control.replay ( ) ; try { resource.get ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }

Target:
public void testGetStorageConnectionNotFound ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpEntityQueryExpectations ( 1 , getIscsiBondContainingStorageConnection ( ) ) ; setUpEntityQueryExpectations ( VdcQueryType.GetStorageServerConnectionById , org.ovirt.engine.core.common.queries.StorageServerConnectionQueryParametersBase.class , new java.lang.String [ ] { "ServerConnectionId" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendIscsiBondStorageConnectionResourceTest.STORAGE_CONNECTION_ID.toString ( ) } , null ) ; try { resource.get ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }
Source:
public void syncNetworkOnVmNetwork ( ) { org.ovirt.engine.core.common.businessentities.Network net = createNetwork ( "net" ) ; org.ovirt.engine.core.common.businessentities.VdsNetworkInterface nic = createNicSyncedWithNetwork ( "nic0" , net ) ; nic.setBridged ( ( ! ( net.isVmNetwork ( ) ) ) ) ; mockExistingNetworks ( net ) ; mockExistingIfaces ( nic ) ; org.ovirt.engine.core.bll.network.host.SetupNetworksHelper helper = createHelper ( createParametersForSync ( nic ) ) ; validateAndAssertNetworkModified ( helper , net ) ; }

Target:
public void syncNetworkOnVmNetwork ( ) { org.ovirt.engine.core.common.businessentities.network.Network net = createNetwork ( "net" ) ; org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic = createNicSyncedWithNetwork ( "nic0" , net ) ; nic.setBridged ( ( ! ( net.isVmNetwork ( ) ) ) ) ; mockExistingNetworks ( net ) ; mockExistingIfaces ( nic ) ; org.ovirt.engine.core.bll.network.host.SetupNetworksHelper helper = createHelper ( createParametersForSync ( nic ) ) ; validateAndAssertNetworkModified ( helper , net ) ; }
Source:
public void execute ( ) { int minWidth = calculateWidgetMinWidthNeeded ( ) ; contentPanel.getElement ( ) . getStyle ( ) . setProperty ( org.ovirt.engine.ui.common.widget.action.AbstractActionPanel.MIN_WIDTH , minWidth , Unit.PX ) ; if ( ( widgetMinWidth ) > 0 ) { siblingWidth = calculateSiblingWidth ( ) ; } for ( int i = 0 ; i < ( ( contentPanel.getWidgetCount ( ) ) - 1 ) ; i ++ ) { originallyVisible.add ( contentPanel.getWidget ( i ) . isVisible ( ) ) ; } initializeCascadeMenuPanel ( ) ; }

Target:
public void execute ( ) { int minWidth = calculateWidgetMinWidthNeeded ( ) ; contentPanel.getElement ( ) . getStyle ( ) . setProperty ( org.ovirt.engine.ui.common.widget.action.AbstractActionPanel.MIN_WIDTH , minWidth , Unit.PX ) ; if ( ( widgetMinWidth ) > 0 ) { siblingWidth = calculateSiblingWidth ( ) ; } initializeCascadeMenuPanel ( ) ; }
Source:
protected org.ovirt.engine.api.model.DiskSnapshot postPopulate ( org.ovirt.engine.api.model.DiskSnapshot model ) { model.setFormat ( org.ovirt.engine.api.restapi.types.MappingTestHelper.shuffle ( org.ovirt.engine.api.model.DiskFormat.class ) . value ( ) ) ; model.setInterface ( org.ovirt.engine.api.restapi.types.MappingTestHelper.shuffle ( org.ovirt.engine.api.model.DiskInterface.class ) . value ( ) ) ; model.setSgio ( org.ovirt.engine.api.restapi.types.MappingTestHelper.shuffle ( org.ovirt.engine.api.model.ScsiGenericIO.class ) . value ( ) ) ; model.setStatus ( org.ovirt.engine.api.common.util.StatusUtils.create ( org.ovirt.engine.api.restapi.types.MappingTestHelper.shuffle ( org.ovirt.engine.api.model.DiskStatus.class ) ) ) ; model.setLunStorage ( null ) ; return model ; }

Target:
protected org.ovirt.engine.api.model.DiskSnapshot postPopulate ( org.ovirt.engine.api.model.DiskSnapshot model ) { model.setFormat ( org.ovirt.engine.api.restapi.types.MappingTestHelper.shuffle ( org.ovirt.engine.api.model.DiskFormat.class ) ) ; model.setInterface ( org.ovirt.engine.api.restapi.types.MappingTestHelper.shuffle ( org.ovirt.engine.api.model.DiskInterface.class ) ) ; model.setSgio ( org.ovirt.engine.api.restapi.types.MappingTestHelper.shuffle ( org.ovirt.engine.api.model.ScsiGenericIO.class ) ) ; model.setStatus ( org.ovirt.engine.api.common.util.StatusUtils.create ( org.ovirt.engine.api.restapi.types.MappingTestHelper.shuffle ( org.ovirt.engine.api.model.DiskStatus.class ) ) ) ; model.setLunStorage ( null ) ; return model ; }
Source:
public void ExecuteCommand ( org.ovirt.engine.ui.uicommonweb.UICommand command ) { super . ExecuteCommand ( command ) ; if ( org.ovirt.engine.core.compat.StringHelper.stringsEqual ( command.getName ( ) , "OnRemove" ) ) { OnRemove ( ) ; } else if ( org.ovirt.engine.core.compat.StringHelper.stringsEqual ( command.getName ( ) , "OnRestore" ) ) { OnRestore ( ) ; } }

Target:
public void ExecuteCommand ( org.ovirt.engine.ui.uicommonweb.UICommand command ) { if ( org.ovirt.engine.core.compat.StringHelper.stringsEqual ( command.getName ( ) , "OnRemove" ) ) { OnRemove ( ) ; } else if ( org.ovirt.engine.core.compat.StringHelper.stringsEqual ( command.getName ( ) , "OnRestore" ) ) { OnRestore ( ) ; } else { super . ExecuteCommand ( command ) ; } }
Source:
protected boolean canDoAction ( ) { if ( ( org.ovirt.engine.core.bll.ActivateVdsCommand.getVds ( ) ) == null ) { return failCanDoAction ( VdcBllMessages.VDS_CANNOT_ACTIVATE_VDS_NOT_EXIST ) ; } if ( ( org.ovirt.engine.core.bll.ActivateVdsCommand.getVds ( ) . getstatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VDSStatus.Up ) ) { return failCanDoAction ( VdcBllMessages.VDS_CANNOT_ACTIVATE_VDS_ALREADY_UP ) ; } return true ; }

Target:
protected boolean canDoAction ( ) { if ( ( org.ovirt.engine.core.bll.ActivateVdsCommand.getVds ( ) ) == null ) { return failCanDoAction ( VdcBllMessages.VDS_CANNOT_ACTIVATE_VDS_NOT_EXIST ) ; } if ( ( org.ovirt.engine.core.bll.ActivateVdsCommand.getVds ( ) . getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VDSStatus.Up ) ) { return failCanDoAction ( VdcBllMessages.VDS_CANNOT_ACTIVATE_VDS_ALREADY_UP ) ; } return true ; }
Source:
public void validateSucceedsWithStopActionTypeAndClusterId ( ) { cmd.getParameters ( ) . setActionType ( GlusterConstants.MANAGE_GLUSTER_SERVICE_ACTION_TYPE_STOP ) ; cmd.getParameters ( ) . setClusterId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; cmd.setClusterId ( cmd.getParameters ( ) . getClusterId ( ) ) ; prepareMocks ( cmd ) ; org.junit.Assert.assertTrue ( cmd.validate ( ) ) ; }

Target:
public void validateSucceedsWithStopActionTypeAndClusterId ( ) { cmd.getParameters ( ) . setActionType ( GlusterConstants.MANAGE_GLUSTER_SERVICE_ACTION_TYPE_STOP ) ; cmd.getParameters ( ) . setClusterId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; cmd.setClusterId ( cmd.getParameters ( ) . getClusterId ( ) ) ; prepareMocks ( ) ; org.junit.Assert.assertTrue ( cmd.validate ( ) ) ; }
Source:
private void newPoolNameIsAlreadyTaken ( ) { org.mockito.Mockito.when ( spDao.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( new org.ovirt.engine.core.common.businessentities.StoragePool ( ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.StoragePool > storagePoolList = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > ( ) ; storagePoolList.add ( org.ovirt.engine.core.bll.storage.UpdateStoragePoolCommandTest.createDefaultStoragePool ( ) ) ; org.mockito.Mockito.when ( spDao.getByName ( org.mockito.Matchers.anyString ( ) , org.mockito.Matchers.anyBoolean ( ) ) ) . thenReturn ( new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > ( storagePoolList ) ) ; }

Target:
private void newPoolNameIsAlreadyTaken ( ) { org.mockito.Mockito.when ( spDao.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( new org.ovirt.engine.core.common.businessentities.StoragePool ( ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.StoragePool > storagePoolList = new java.util.ArrayList < > ( ) ; storagePoolList.add ( org.ovirt.engine.core.bll.storage.UpdateStoragePoolCommandTest.createDefaultStoragePool ( ) ) ; org.mockito.Mockito.when ( spDao.getByName ( org.mockito.Matchers.anyString ( ) , org.mockito.Matchers.anyBoolean ( ) ) ) . thenReturn ( new java.util.ArrayList ( storagePoolList ) ) ; }
Source:
private void setUpGetCertuficateExpectations ( int times , int index ) throws java.lang.Exception { for ( int i = 0 ; i < times ; i ++ ) { setUpGetEntityExpectations ( VdcQueryType.GetVdsCertificateSubjectByVmId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ index ] } , org.ovirt.engine.api.restapi.resource.BackendVmsResourceTest.CERTIFICATE ) ; } }

Target:
private void setUpGetCertuficateExpectations ( int times ) throws java.lang.Exception { for ( int i = 0 ; i < times ; i ++ ) { setUpGetEntityExpectations ( VdcQueryType.GetVdsCertificateSubjectByVmId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ i ] } , org.ovirt.engine.api.restapi.resource.BackendVmsResourceTest.CERTIFICATE ) ; } }
Source:
private org.ovirt.engine.core.common.businessentities.Quota mockBasicQuota ( ) { ( dbCalls ) ++ ; org.ovirt.engine.core.common.businessentities.Quota quota = new org.ovirt.engine.core.common.businessentities.Quota ( ) ; quota.setId ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; quota.setStoragePoolId ( storage_pool.getId ( ) . getValue ( ) ) ; quota.setDescription ( "My Quota description" ) ; quota.setQuotaName ( "My Quota Name" ) ; quota.setGraceStoragePercentage ( 20 ) ; quota.setGraceVdsGroupPercentage ( 20 ) ; quota.setThresholdStoragePercentage ( 80 ) ; quota.setThresholdVdsGroupPercentage ( 80 ) ; quota.setQuotaEnforcementType ( QuotaEnforcementTypeEnum.HARD_ENFORCEMENT ) ; return quota ; }

Target:
private org.ovirt.engine.core.common.businessentities.Quota mockBasicQuota ( ) { ( dbCalls ) ++ ; org.ovirt.engine.core.common.businessentities.Quota quota = new org.ovirt.engine.core.common.businessentities.Quota ( ) ; quota.setId ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; quota.setStoragePoolId ( storage_pool.getId ( ) ) ; quota.setDescription ( "My Quota description" ) ; quota.setQuotaName ( "My Quota Name" ) ; quota.setGraceStoragePercentage ( 20 ) ; quota.setGraceVdsGroupPercentage ( 20 ) ; quota.setThresholdStoragePercentage ( 80 ) ; quota.setThresholdVdsGroupPercentage ( 80 ) ; quota.setQuotaEnforcementType ( QuotaEnforcementTypeEnum.HARD_ENFORCEMENT ) ; return quota ; }
Source:
public void executeCommandWhenFailed ( ) { cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.gluster.RemoveGlusterHookCommand ( new org.ovirt.engine.core.common.action.gluster.GlusterHookManageParameters ( HOOK_ID ) ) ) ; setUpMocksForRemove ( ) ; mockBackend ( false , EngineError.GlusterHookRemoveFailed ) ; cmd.executeCommand ( ) ; org.mockito.Mockito.verify ( hooksDao , org.mockito.Mockito.never ( ) ) . remove ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ; org.junit.Assert.assertEquals ( cmd.getAuditLogTypeValue ( ) , AuditLogType.GLUSTER_HOOK_REMOVE_FAILED ) ; }

Target:
public void executeCommandWhenFailed ( ) { cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.gluster.RemoveGlusterHookCommand ( new org.ovirt.engine.core.common.action.gluster.GlusterHookManageParameters ( HOOK_ID ) , null ) ) ; setUpMocksForRemove ( ) ; mockBackend ( false , EngineError.GlusterHookRemoveFailed ) ; cmd.executeCommand ( ) ; org.mockito.Mockito.verify ( hooksDao , org.mockito.Mockito.never ( ) ) . remove ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ; org.junit.Assert.assertEquals ( cmd.getAuditLogTypeValue ( ) , AuditLogType.GLUSTER_HOOK_REMOVE_FAILED ) ; }
Source:
protected org.ovirt.engine.api.model.Disk postPopulate ( org.ovirt.engine.api.model.Disk model ) { model.setFormat ( org.ovirt.engine.api.restapi.types.MappingTestHelper.shuffle ( org.ovirt.engine.api.model.DiskFormat.class ) ) ; model.setInterface ( org.ovirt.engine.api.restapi.types.MappingTestHelper.shuffle ( org.ovirt.engine.api.model.DiskInterface.class ) ) ; model.setStatus ( org.ovirt.engine.api.common.util.StatusUtils.create ( org.ovirt.engine.api.restapi.types.MappingTestHelper.shuffle ( org.ovirt.engine.api.model.DiskStatus.class ) ) ) ; model.setLunStorage ( new org.ovirt.engine.api.model.HostStorage ( ) ) ; return model ; }

Target:
protected org.ovirt.engine.api.model.Disk postPopulate ( org.ovirt.engine.api.model.Disk model ) { model.setFormat ( org.ovirt.engine.api.restapi.types.MappingTestHelper.shuffle ( org.ovirt.engine.api.model.DiskFormat.class ) ) ; model.setInterface ( org.ovirt.engine.api.restapi.types.MappingTestHelper.shuffle ( org.ovirt.engine.api.model.DiskInterface.class ) ) ; model.setStatus ( org.ovirt.engine.api.restapi.types.MappingTestHelper.shuffle ( org.ovirt.engine.api.model.DiskStatus.class ) ) ; model.setLunStorage ( new org.ovirt.engine.api.model.HostStorage ( ) ) ; return model ; }
Source:
protected void executeCommand ( ) { org.ovirt.engine.core.compat.Guid id = org.ovirt.engine.core.bll.RemoveUserCommand.getParameters ( ) . getId ( ) ; for ( org.ovirt.engine.core.common.businessentities.Permissions permission : org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getPermissionDao ( ) . getAllDirectPermissionsForAdElement ( id ) ) { org.ovirt.engine.core.common.action.PermissionsOperationsParameters tempVar = new org.ovirt.engine.core.common.action.PermissionsOperationsParameters ( permission ) ; tempVar.setShouldBeLogged ( false ) ; org.ovirt.engine.core.bll.Backend.getInstance ( ) . runInternalAction ( VdcActionType.RemovePermission , tempVar , org.ovirt.engine.core.bll.job.ExecutionHandler.createDefaultContexForTasks ( org.ovirt.engine.core.bll.RemoveUserCommand.getExecutionContext ( ) ) ) ; } org.ovirt.engine.core.bll.RemoveUserCommand.getDbUserDAO ( ) . remove ( id ) ; org.ovirt.engine.core.bll.RemoveUserCommand.setSucceeded ( true ) ; }

Target:
protected void executeCommand ( ) { org.ovirt.engine.core.compat.Guid id = org.ovirt.engine.core.bll.RemoveUserCommand.getParameters ( ) . getId ( ) ; for ( org.ovirt.engine.core.common.businessentities.Permissions permission : org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getPermissionDao ( ) . getAllDirectPermissionsForAdElement ( id ) ) { org.ovirt.engine.core.common.action.PermissionsOperationsParameters tempVar = new org.ovirt.engine.core.common.action.PermissionsOperationsParameters ( permission ) ; tempVar.setShouldBeLogged ( false ) ; runInternalAction ( VdcActionType.RemovePermission , tempVar , org.ovirt.engine.core.bll.job.ExecutionHandler.createDefaultContexForTasks ( org.ovirt.engine.core.bll.RemoveUserCommand.getExecutionContext ( ) ) ) ; } org.ovirt.engine.core.bll.RemoveUserCommand.getDbUserDAO ( ) . remove ( id ) ; org.ovirt.engine.core.bll.RemoveUserCommand.setSucceeded ( true ) ; }
Source:
protected void executeQueryCommand ( ) { java.lang.String errorMessage = null ; org.ovirt.engine.core.compat.RefObject < java.lang.String > tempRefObject = new org.ovirt.engine.core.compat.RefObject < java.lang.String > ( errorMessage ) ; boolean tempVar = ! ( CanDoAction ( tempRefObject ) ) ; errorMessage = tempRefObject.argvalue ; if ( tempVar ) { org.ovirt.engine.core.bll.RegisterVdsQuery.log.errorFormat ( "RegisterVdsQuery::ExecuteQueryCommand: CanDoAction failed: {0}" , errorMessage ) ; throw new java.lang.RuntimeException ( errorMessage ) ; } org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInScope ( TransactionScopeOption.Required , new org.ovirt.engine.core.utils.transaction.TransactionMethod < java.lang.Object > ( ) { @ java.lang.Override public java.lang.Object runInTransaction ( ) { ExecuteWithoutTransaction ( ) ; return null ; } } ) ; }

Target:
protected void executeQueryCommand ( ) { org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInScope ( TransactionScopeOption.Required , new org.ovirt.engine.core.utils.transaction.TransactionMethod < java.lang.Object > ( ) { @ java.lang.Override public java.lang.Object runInTransaction ( ) { ExecuteWithoutTransaction ( ) ; return null ; } } ) ; }
Source:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { java.lang.Object [ ] array = ( ( java.lang.Object [ ] ) ( target ) ) ; org.ovirt.engine.ui.uicommonweb.models.templates.VmBaseListModel vmListModel = ( ( org.ovirt.engine.ui.uicommonweb.models.templates.VmBaseListModel ) ( array [ 0 ] ) ) ; org.ovirt.engine.ui.uicommonweb.models.vms.ExportVmModel exportVmModel = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.ExportVmModel ) ( array [ 1 ] ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.StoragePool > storagePools = ( ( java.util.List < org.ovirt.engine.core.common.businessentities.StoragePool > ) ( returnValue ) ) ; vmListModel.postShowWarningOnExistingVms ( exportVmModel , storagePools , getVmOrTemplateQuery ) ; }

Target:
public void onSuccess ( java.util.List < org.ovirt.engine.core.common.businessentities.StoragePool > storagePools ) { postShowWarningOnExistingVms ( model , storagePools , getVmOrTemplateQuery ) ; }
Source:
public boolean canOpenRDPConsole ( org.ovirt.engine.ui.uicommonweb.models.HasConsoleModel item ) { if ( ( item.isPool ( ) ) || ( ! ( isRDPAvailable ( ) ) ) ) return false ; if ( ( ( ( ( item.getAdditionalConsoleModel ( ) ) != null ) && ( configurator.isClientWindowsExplorer ( ) ) ) && ( item.getAdditionalConsoleModel ( ) . getConnectCommand ( ) . getIsAvailable ( ) ) ) && ( item.getAdditionalConsoleModel ( ) . getConnectCommand ( ) . getIsExecutionAllowed ( ) ) ) { return true ; } return false ; }

Target:
public boolean canOpenRDPConsole ( org.ovirt.engine.ui.uicommonweb.models.HasConsoleModel item ) { if ( ( item.isPool ( ) ) || ( ! ( isRDPAvailable ( ) ) ) ) return false ; if ( ( ( ( item.getAdditionalConsoleModel ( ) ) != null ) && ( item.getAdditionalConsoleModel ( ) . getConnectCommand ( ) . getIsAvailable ( ) ) ) && ( item.getAdditionalConsoleModel ( ) . getConnectCommand ( ) . getIsExecutionAllowed ( ) ) ) { return true ; } return false ; }
Source:
public static void getClusterList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > list = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ) ( source ) ) ; java.util.Collections.sort ( list , new org.ovirt.engine.ui.uicommonweb.Linq.VdsGroupByNameComparer ( ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVdsGroupsByStoragePoolId , new org.ovirt.engine.core.common.queries.StoragePoolQueryParametersBase ( dataCenterId ) , aQuery ) ; }

Target:
public static void getClusterList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > list = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ) ( source ) ) ; java.util.Collections.sort ( list , new org.ovirt.engine.ui.uicommonweb.Linq.VdsGroupByNameComparer ( ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVdsGroupsByStoragePoolId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) , aQuery ) ; }
Source:
private void mockStoragePoolDao ( ) { org.ovirt.engine.core.common.businessentities.storage_pool sp = new org.ovirt.engine.core.common.businessentities.storage_pool ( ) ; sp.setId ( spId ) ; sp.setstatus ( StoragePoolStatus.Up ) ; org.mockito.Mockito.when ( storagePoolDAO.get ( spId ) ) . thenReturn ( sp ) ; org.mockito.Mockito.doReturn ( storagePoolDAO ) . when ( spyCommand ) . getStoragePoolDAO ( ) ; }

Target:
private void mockStoragePoolDao ( ) { org.ovirt.engine.core.common.businessentities.StoragePool sp = new org.ovirt.engine.core.common.businessentities.StoragePool ( ) ; sp.setId ( spId ) ; sp.setstatus ( StoragePoolStatus.Up ) ; org.mockito.Mockito.when ( storagePoolDAO.get ( spId ) ) . thenReturn ( sp ) ; org.mockito.Mockito.doReturn ( storagePoolDAO ) . when ( spyCommand ) . getStoragePoolDAO ( ) ; }
Source:
void initListBoxEditors ( ) { storagePoolTypeEditor = new org.ovirt.engine.ui.common.widget.editor.ListModelListBoxEditor < java.lang.Boolean > ( new org.ovirt.engine.ui.common.widget.renderer.BooleanRenderer ( org.ovirt.engine.ui.webadmin.section.main.view.popup.datacenter.DataCenterPopupView.constants.storageTypeLocal ( ) , org.ovirt.engine.ui.webadmin.section.main.view.popup.datacenter.DataCenterPopupView.constants.storageTypeShared ( ) ) ) ; versionEditor = new org.ovirt.engine.ui.common.widget.editor.ListModelListBoxEditor < org.ovirt.engine.core.compat.Version > ( new org.ovirt.engine.ui.common.widget.renderer.NullSafeRenderer < org.ovirt.engine.core.compat.Version > ( ) { @ java.lang.Override public java.lang.String renderNullSafe ( org.ovirt.engine.core.compat.Version object ) { return object.getValue ( ) ; } } ) ; quotaEnforceTypeEditor = new org.ovirt.engine.ui.common.widget.editor.ListModelListBoxEditor < org.ovirt.engine.core.common.businessentities.QuotaEnforcementTypeEnum > ( new org.ovirt.engine.ui.common.widget.renderer.EnumRenderer ( ) ) ; macPoolListEditor = new org.ovirt.engine.ui.common.widget.editor.ListModelListBoxEditor ( new org.ovirt.engine.ui.common.widget.renderer.NameRenderer < org.ovirt.engine.core.common.businessentities.MacPool > ( ) ) ; }

Target:
void initListBoxEditors ( ) { storagePoolTypeEditor = new org.ovirt.engine.ui.common.widget.editor.ListModelListBoxEditor ( new org.ovirt.engine.ui.common.widget.renderer.BooleanRenderer ( org.ovirt.engine.ui.webadmin.section.main.view.popup.datacenter.DataCenterPopupView.constants.storageTypeLocal ( ) , org.ovirt.engine.ui.webadmin.section.main.view.popup.datacenter.DataCenterPopupView.constants.storageTypeShared ( ) ) ) ; versionEditor = new org.ovirt.engine.ui.common.widget.editor.ListModelListBoxEditor ( new org.ovirt.engine.ui.common.widget.renderer.NullSafeRenderer < org.ovirt.engine.core.compat.Version > ( ) { @ java.lang.Override public java.lang.String renderNullSafe ( org.ovirt.engine.core.compat.Version object ) { return object.getValue ( ) ; } } ) ; quotaEnforceTypeEditor = new org.ovirt.engine.ui.common.widget.editor.ListModelListBoxEditor ( new org.ovirt.engine.ui.common.widget.renderer.EnumRenderer ( ) ) ; macPoolListEditor = new org.ovirt.engine.ui.common.widget.editor.ListModelListBoxEditor ( new org.ovirt.engine.ui.common.widget.renderer.NameRenderer < org.ovirt.engine.core.common.businessentities.MacPool > ( ) ) ; }
Source:
public void appendCustomValueAppendsWithNull ( ) { final org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase b = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.TestAuditLogableBase ( ) ; final java.lang.String key = "foo" ; final java.lang.String value = null ; final java.lang.String newVal = "bar" ; final java.lang.String sep = "_" ; b.addCustomValue ( key , value ) ; b.appendCustomValue ( key , newVal , sep ) ; final java.lang.String s = b.getCustomValue ( key ) ; org.junit.Assert.assertEquals ( ( ( value + sep ) + newVal ) , s ) ; }

Target:
public void appendCustomValueAppendsWithNull ( ) { final java.lang.String key = "foo" ; final java.lang.String value = null ; final java.lang.String newVal = "bar" ; final java.lang.String sep = "_" ; b.addCustomValue ( key , value ) ; b.appendCustomValue ( key , newVal , sep ) ; final java.lang.String s = b.getCustomValue ( key ) ; org.junit.Assert.assertEquals ( ( ( value + sep ) + newVal ) , s ) ; }
Source:
public void removeLun ( org.ovirt.engine.core.common.businessentities.storage.LUNs lun ) { if ( lun.getvolume_group_id ( ) . isEmpty ( ) ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getLunDao ( ) . remove ( lun.getLUN_id ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.StorageServerConnections connection : filterConnectionsUsedByOthers ( lun.getLunConnections ( ) , "" , lun.getLUN_id ( ) ) ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStorageServerConnectionDao ( ) . remove ( connection.getid ( ) ) ; } } }

Target:
public void removeLun ( org.ovirt.engine.core.common.businessentities.storage.LUNs lun ) { if ( lun.getvolume_group_id ( ) . isEmpty ( ) ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getLunDao ( ) . remove ( lun.getLUN_id ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.StorageServerConnections connection : filterConnectionsUsedByOthers ( lun.getLunConnections ( ) , "" , lun.getLUN_id ( ) ) ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStorageServerConnectionDao ( ) . remove ( connection.getId ( ) ) ; } } }
Source:
protected java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage_domains > getMissingStorages ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage_domains > storageDomains , org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel vmdisk ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage_domains > missingStorageDomains = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage_domains > ( ) ; org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel templateDisk = getTemplateDiskByVmDisk ( vmdisk ) ; if ( templateDisk != null ) { for ( org.ovirt.engine.core.common.businessentities.storage_domains storageDomain : storageDomains ) { if ( ! ( ( ( org.ovirt.engine.core.common.businessentities.DiskImage ) ( templateDisk.getDisk ( ) ) ) . getstorage_ids ( ) . contains ( storageDomain.getId ( ) ) ) ) { missingStorageDomains.add ( storageDomain ) ; } } } return missingStorageDomains ; }

Target:
protected java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > getMissingStorages ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > storageDomains , org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel vmdisk ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > missingStorageDomains = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) ; org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel templateDisk = getTemplateDiskByVmDisk ( vmdisk ) ; if ( templateDisk != null ) { for ( org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain : storageDomains ) { if ( ! ( ( ( org.ovirt.engine.core.common.businessentities.DiskImage ) ( templateDisk.getDisk ( ) ) ) . getstorage_ids ( ) . contains ( storageDomain.getId ( ) ) ) ) { missingStorageDomains.add ( storageDomain ) ; } } } return missingStorageDomains ; }
Source:
private org.ovirt.engine.core.common.businessentities.VDS makeTestVds ( org.ovirt.engine.core.compat.Guid vdsId ) { org.ovirt.engine.core.common.businessentities.VDS newVdsData = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; newVdsData.setHostName ( "BUZZ" ) ; newVdsData.setSshPort ( 22 ) ; newVdsData.setSshUsername ( "root" ) ; newVdsData.setSshKeyFingerprint ( "1234" ) ; newVdsData.setVdsName ( "BAR" ) ; newVdsData.setVdsGroupCompatibilityVersion ( new org.ovirt.engine.core.compat.Version ( "1.2.3" ) ) ; newVdsData.setVdsGroupId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; newVdsData.setId ( vdsId ) ; return newVdsData ; }

Target:
private org.ovirt.engine.core.common.businessentities.VDS makeTestVds ( org.ovirt.engine.core.compat.Guid vdsId ) { org.ovirt.engine.core.common.businessentities.VDS newVdsData = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; newVdsData.setHostName ( "BUZZ" ) ; newVdsData.setVdsName ( "BAR" ) ; newVdsData.setVdsGroupCompatibilityVersion ( new org.ovirt.engine.core.compat.Version ( "1.2.3" ) ) ; newVdsData.setVdsGroupId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; newVdsData.setId ( vdsId ) ; return newVdsData ; }
Source:
public void executeCommandWhenFailed ( ) { cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.gluster.UpdateGlusterHookCommand ( new org.ovirt.engine.core.common.action.gluster.GlusterHookManageParameters ( HOOK_ID ) , null ) ) ; setUpMocksForUpdate ( ) ; mockBackend ( false , EngineError.GlusterHookUpdateFailed ) ; cmd.executeCommand ( ) ; org.mockito.Mockito.verify ( hooksDao , org.mockito.Mockito.never ( ) ) . updateGlusterHook ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity.class ) ) ; org.junit.Assert.assertEquals ( cmd.getAuditLogTypeValue ( ) , AuditLogType.GLUSTER_HOOK_UPDATE_FAILED ) ; }

Target:
public void executeCommandWhenFailed ( ) { cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.gluster.UpdateGlusterHookCommand ( new org.ovirt.engine.core.common.action.gluster.GlusterHookManageParameters ( HOOK_ID ) , null ) ) ; setUpMocksForUpdate ( ) ; mockBackend ( false , EngineError.GlusterHookUpdateFailed ) ; cmd.executeCommand ( ) ; org.mockito.Mockito.verify ( hooksDao , org.mockito.Mockito.never ( ) ) . updateGlusterHook ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity.class ) ) ; org.junit.Assert.assertEquals ( AuditLogType.GLUSTER_HOOK_UPDATE_FAILED , cmd.getAuditLogTypeValue ( ) ) ; }
Source:
private void findNegotiatingProfiles ( ) { if ( ( profiles ) == null ) { synchronized ( this ) { if ( ( profiles ) == null ) { profiles = new java.util.ArrayList < org.ovirt.engine.core.authentication.AuthenticationProfile > ( 1 ) ; for ( org.ovirt.engine.core.authentication.AuthenticationProfile profile : org.ovirt.engine.core.authentication.AuthenticationProfileManager.getInstance ( ) . getProfiles ( ) ) { org.ovirt.engine.core.authentication.Authenticator authenticator = profile.getAuthenticator ( ) ; if ( authenticator instanceof org.ovirt.engine.core.authentication.NegotiatingAuthenticator ) { profiles.add ( 0 , profile ) ; } } } } } }

Target:
private void findNegotiatingProfiles ( ) { if ( ( profiles ) == null ) { synchronized ( this ) { if ( ( profiles ) == null ) { profiles = new java.util.ArrayList < org.ovirt.engine.core.authentication.AuthenticationProfile > ( 1 ) ; for ( org.ovirt.engine.core.authentication.AuthenticationProfile profile : org.ovirt.engine.core.authentication.AuthenticationProfileManager.getInstance ( ) . getProfiles ( ) ) { if ( profile != null ) { org.ovirt.engine.core.authentication.Authenticator authenticator = profile.getAuthenticator ( ) ; if ( authenticator instanceof org.ovirt.engine.core.authentication.NegotiatingAuthenticator ) { profiles.add ( 0 , profile ) ; } } } } } } }
Source:
protected boolean performImagesChecks ( org.ovirt.engine.core.common.businessentities.VM vm ) { return org.ovirt.engine.core.bll.ImagesHandler.PerformImagesChecks ( vm , org.ovirt.engine.core.bll.AddDiskCommand.getReturnValue ( ) . getCanDoActionMessages ( ) , vm.getStoragePoolId ( ) , getStorageDomainId ( ) . getValue ( ) , false , true , false , false , true , false , false , true , java.util.Collections.< org.ovirt.engine.core.common.businessentities.Disk > emptyList ( ) ) ; }

Target:
protected boolean performImagesChecks ( org.ovirt.engine.core.common.businessentities.VM vm ) { return org.ovirt.engine.core.bll.ImagesHandler.PerformImagesChecks ( vm , org.ovirt.engine.core.bll.AddDiskCommand.getReturnValue ( ) . getCanDoActionMessages ( ) , vm.getStoragePoolId ( ) , getStorageDomainId ( ) . getValue ( ) , false , true , false , false , true , false , true , java.util.Collections.< org.ovirt.engine.core.common.businessentities.Disk > emptyList ( ) ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { java.lang.Boolean connectAutomatically = java.lang.Boolean.TRUE ; org.ovirt.engine.core.common.businessentities.UserProfile profile = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ; if ( profile != null ) { setUserProfile ( profile ) ; connectAutomatically = profile.isUserPortalVmLoginAutomatically ( ) ; ( ( org.ovirt.engine.ui.uicommonweb.models.EditOptionsModel ) ( model ) ) . getPublicKey ( ) . setEntity ( profile.getSshPublicKey ( ) ) ; } ( ( org.ovirt.engine.ui.uicommonweb.models.EditOptionsModel ) ( model ) ) . getEnableConnectAutomatically ( ) . setEntity ( connectAutomatically ) ; }

Target:
public void onSuccess ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue returnValue ) { java.lang.Boolean connectAutomatically = java.lang.Boolean.TRUE ; org.ovirt.engine.core.common.businessentities.UserProfile profile = returnValue.getReturnValue ( ) ; if ( profile != null ) { setUserProfile ( profile ) ; connectAutomatically = profile.isUserPortalVmLoginAutomatically ( ) ; model.getPublicKey ( ) . setEntity ( profile.getSshPublicKey ( ) ) ; } model.getEnableConnectAutomatically ( ) . setEntity ( connectAutomatically ) ; }
Source:
public org.ovirt.engine.ui.webadmin.section.main.presenter.DynamicUrlContentTabProxy create ( com.google.gwt.event.shared.GwtEvent.Type < com.gwtplatform.mvp.client.RequestTabsHandler > requestTabsEventType , com.google.gwt.event.shared.GwtEvent.Type < com.gwtplatform.mvp.client.ChangeTabHandler > changeTabEventType , com.google.gwt.event.shared.GwtEvent.Type < com.gwtplatform.mvp.client.proxy.RevealContentHandler < ? > > slot , java.lang.String label , float priority , java.lang.String historyToken , java.lang.String contentUrl , org.ovirt.engine.ui.common.widget.Align align , java.lang.String searchPrefix ) { return new org.ovirt.engine.ui.webadmin.section.main.presenter.DynamicUrlContentTabProxy ( placeManager , eventBus , gatekeeper , requestTabsEventType , changeTabEventType , slot , viewProvider , label , priority , historyToken , contentUrl , align ) ; }

Target:
public org.ovirt.engine.ui.webadmin.section.main.presenter.DynamicUrlContentTabProxy create ( com.google.gwt.event.shared.GwtEvent.Type < com.gwtplatform.mvp.client.RequestTabsHandler > requestTabsEventType , com.google.gwt.event.shared.GwtEvent.Type < com.gwtplatform.mvp.client.ChangeTabHandler > changeTabEventType , com.google.gwt.event.shared.GwtEvent.Type < com.gwtplatform.mvp.client.proxy.RevealContentHandler < ? > > slot , java.lang.String label , float priority , java.lang.String historyToken , java.lang.String contentUrl , java.lang.String searchPrefix ) { return new org.ovirt.engine.ui.webadmin.section.main.presenter.DynamicUrlContentTabProxy ( placeManager , eventBus , gatekeeper , requestTabsEventType , changeTabEventType , slot , viewProvider , label , priority , historyToken , contentUrl ) ; }
Source:
protected void initSoundCard ( org.ovirt.engine.core.compat.Guid id ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.isSoundcardEnabled ( new org.ovirt.engine.ui.frontend.AsyncQuery ( getModel ( ) , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { getModel ( ) . getIsSoundcardEnabled ( ) . setEntity ( ( ( java.lang.Boolean ) ( returnValue ) ) ) ; } } ) , id ) ; }

Target:
protected void initSoundCard ( org.ovirt.engine.core.compat.Guid id ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . isSoundcardEnabled ( new org.ovirt.engine.ui.frontend.AsyncQuery ( getModel ( ) , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { getModel ( ) . getIsSoundcardEnabled ( ) . setEntity ( ( ( java.lang.Boolean ) ( returnValue ) ) ) ; } } ) , id ) ; }
Source:
private void setVmWatchdogToParams ( final org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel model , org.ovirt.engine.core.common.action.UpdateVmTemplateParameters updateVmParams ) { org.ovirt.engine.core.common.businessentities.VmWatchdogType wdModel = org.ovirt.engine.core.common.businessentities.VmWatchdogType.getByName ( model.getWatchdogModel ( ) . getSelectedItem ( ) ) ; updateVmParams.setUpdateWatchdog ( true ) ; if ( wdModel != null ) { org.ovirt.engine.core.common.businessentities.VmWatchdog vmWatchdog = new org.ovirt.engine.core.common.businessentities.VmWatchdog ( ) ; vmWatchdog.setAction ( org.ovirt.engine.core.common.businessentities.VmWatchdogAction.getByName ( model.getWatchdogAction ( ) . getSelectedItem ( ) ) ) ; vmWatchdog.setModel ( wdModel ) ; updateVmParams.setWatchdog ( vmWatchdog ) ; } }

Target:
private void setVmWatchdogToParams ( final org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel model , org.ovirt.engine.core.common.action.UpdateVmTemplateParameters updateVmParams ) { org.ovirt.engine.core.common.businessentities.VmWatchdogType wdModel = model.getWatchdogModel ( ) . getSelectedItem ( ) ; updateVmParams.setUpdateWatchdog ( true ) ; if ( wdModel != null ) { org.ovirt.engine.core.common.businessentities.VmWatchdog vmWatchdog = new org.ovirt.engine.core.common.businessentities.VmWatchdog ( ) ; vmWatchdog.setAction ( model.getWatchdogAction ( ) . getSelectedItem ( ) ) ; vmWatchdog.setModel ( wdModel ) ; updateVmParams.setWatchdog ( vmWatchdog ) ; } }
Source:
protected java.lang.Long getRawValue ( org.ovirt.engine.ui.uicommonweb.models.EntityModel object ) { if ( ( object.getEntity ( ) ) instanceof org.ovirt.engine.core.common.businessentities.storage.RepoImage ) { return ( ( org.ovirt.engine.core.common.businessentities.storage.RepoImage ) ( object.getEntity ( ) ) ) . getSize ( ) ; } else if ( ( object.getEntity ( ) ) instanceof org.ovirt.engine.core.common.businessentities.storage.DiskImage ) { return ( ( org.ovirt.engine.core.common.businessentities.storage.DiskImage ) ( object.getEntity ( ) ) ) . getSizeInGigabytes ( ) ; } return null ; }

Target:
protected java.lang.Long getRawValue ( org.ovirt.engine.ui.uicommonweb.models.EntityModel object ) { if ( ( object.getEntity ( ) ) instanceof org.ovirt.engine.core.common.businessentities.storage.RepoImage ) { return ( ( org.ovirt.engine.core.common.businessentities.storage.RepoImage ) ( object.getEntity ( ) ) ) . getSize ( ) ; } else if ( ( object.getEntity ( ) ) instanceof org.ovirt.engine.core.common.businessentities.storage.DiskImage ) { return ( ( org.ovirt.engine.core.common.businessentities.storage.DiskImage ) ( object.getEntity ( ) ) ) . getSize ( ) ; } return null ; }
Source:
private void datacenter_SelectedItemChanged ( ) { org.ovirt.engine.core.common.businessentities.StoragePool datacenter = getDataCenter ( ) . getSelectedItem ( ) ; boolean isInVm = ( getVm ( ) ) != null ; if ( datacenter == null ) { return ; } updateShareableDiskEnabled ( datacenter ) ; updateDirectLunDiskEnabled ( datacenter ) ; updateInterface ( ( isInVm ? getVm ( ) . getVdsGroupCompatibilityVersion ( ) : null ) ) ; if ( ( getDiskStorageType ( ) . getEntity ( ) ) == ( org.ovirt.engine.core.common.businessentities.Disk.DiskStorageType.IMAGE ) ) { updateStorageDomains ( datacenter ) ; } else { updateHosts ( datacenter ) ; } }

Target:
protected void datacenter_SelectedItemChanged ( ) { org.ovirt.engine.core.common.businessentities.StoragePool datacenter = getDataCenter ( ) . getSelectedItem ( ) ; boolean isInVm = ( getVm ( ) ) != null ; if ( datacenter == null ) { return ; } updateShareableDiskEnabled ( datacenter ) ; updateDirectLunDiskEnabled ( datacenter ) ; updateInterface ( ( isInVm ? getVm ( ) . getVdsGroupCompatibilityVersion ( ) : null ) ) ; if ( ( getDiskStorageType ( ) . getEntity ( ) ) == ( org.ovirt.engine.core.common.businessentities.Disk.DiskStorageType.IMAGE ) ) { updateStorageDomains ( datacenter ) ; } else { updateHosts ( datacenter ) ; } }
Source:
public java.util.Set < java.lang.String > getPeers ( java.lang.String server , java.lang.String username , java.lang.String password ) throws java.io.IOException , javax.naming.AuthenticationException { try ( final org.ovirt.engine.core.uutils.ssh.SSHClient client = getSSHClient ( ) ) { connect ( client , server ) ; authenticate ( client , username , password ) ; java.lang.String serversXml = executePeerStatusCommand ( client ) ; return extractServers ( serversXml ) ; } }

Target:
public java.util.Set < java.lang.String > getPeers ( java.lang.String server , java.lang.String username , java.lang.String password ) throws java.io.IOException , javax.naming.AuthenticationException { try ( final org.ovirt.engine.core.uutils.ssh.SSHClient client = getSSHClient ( ) ) { connect ( client , server , username , password ) ; authenticate ( client ) ; java.lang.String serversXml = executePeerStatusCommand ( client ) ; return extractServers ( serversXml ) ; } }
Source:
private boolean internalConsumeAndReleaseHandler ( org.ovirt.engine.core.bll.quota.QuotaConsumptionParametersWrapper parameters , org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.common.AuditLogType , org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase > auditLogPair ) { boolean result = validateAndSetStorageQuotaHelper ( parameters , auditLogPair ) ; if ( result ) { result = validateAndSetClusterQuota ( parameters , auditLogPair ) ; if ( result ) { return true ; } else { org.ovirt.engine.core.bll.quota.QuotaConsumptionParametersWrapper revertedParams = revertParametersQuantities ( parameters ) ; validateAndSetStorageQuotaHelper ( revertedParams , auditLogPair ) ; validateAndSetClusterQuota ( parameters , auditLogPair ) ; } } else { org.ovirt.engine.core.bll.quota.QuotaConsumptionParametersWrapper revertedParams = revertParametersQuantities ( parameters ) ; validateAndSetStorageQuotaHelper ( revertedParams , auditLogPair ) ; } return result ; }

Target:
private boolean internalConsumeAndReleaseHandler ( org.ovirt.engine.core.bll.quota.QuotaConsumptionParametersWrapper parameters , org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.common.AuditLogType , org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase > auditLogPair ) { boolean result = validateAndSetStorageQuotaHelper ( parameters , auditLogPair ) ; if ( result ) { result = validateAndSetClusterQuota ( parameters , auditLogPair ) ; if ( result ) { return true ; } else { org.ovirt.engine.core.bll.quota.QuotaConsumptionParametersWrapper revertedParams = revertParametersQuantities ( parameters ) ; validateAndSetStorageQuotaHelper ( revertedParams , auditLogPair ) ; } } return result ; }
Source:
private void setIconType ( org.gwtbootstrap3.client.ui.html.Span icon , org.ovirt.engine.core.common.businessentities.AuditLog model ) { switch ( ( ( org.ovirt.engine.core.common.businessentities.AuditLog ) ( model ) ) . getSeverity ( ) ) { case ALERT : icon.addStyleName ( PatternflyConstants.PFICON_WARNING_TRIANGLE_O ) ; break ; case ERROR : icon.addStyleName ( PatternflyConstants.PFICON_ERROR_CIRCLE_O ) ; break ; case NORMAL : icon.addStyleName ( PatternflyConstants.PFICON_INFO ) ; break ; case WARNING : icon.addStyleName ( PatternflyConstants.PFICON_WARNING_TRIANGLE_O ) ; break ; default : icon.addStyleName ( PatternflyConstants.PFICON_OK ) ; break ; } }

Target:
private void setIconType ( org.gwtbootstrap3.client.ui.html.Span icon , org.ovirt.engine.core.common.businessentities.AuditLog model ) { switch ( model.getSeverity ( ) ) { case ALERT : icon.addStyleName ( PatternflyConstants.PFICON_WARNING_TRIANGLE_O ) ; break ; case ERROR : icon.addStyleName ( PatternflyConstants.PFICON_ERROR_CIRCLE_O ) ; break ; case NORMAL : icon.addStyleName ( PatternflyConstants.PFICON_INFO ) ; break ; case WARNING : icon.addStyleName ( PatternflyConstants.PFICON_WARNING_TRIANGLE_O ) ; break ; default : icon.addStyleName ( PatternflyConstants.PFICON_OK ) ; break ; } }