auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public static void getTemplateDiskList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid templateId ) { 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.DiskImage > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmTemplatesDisks , new org.ovirt.engine.core.common.queries.IdQueryParameters ( templateId ) , aQuery ) ; }

Target:
public static void getClusterList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { 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.core.common.businessentities.comparators.NameableComparator ( ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllVdsGroups , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }
Source:
private void updateSnapshotsFromExport ( ) { if ( ( getVm ( ) . getSnapshots ( ) ) != null ) { for ( org.ovirt.engine.core.common.businessentities.Snapshot snapshot : getVm ( ) . getSnapshots ( ) ) { if ( getSnapshotDao ( ) . exists ( getVm ( ) . getId ( ) , snapshot.getId ( ) ) ) { getSnapshotDao ( ) . update ( snapshot ) ; } else { getSnapshotDao ( ) . save ( snapshot ) ; } } } }

Target:
private void updateSnapshotsFromExport ( ) { if ( ( getVm ( ) . getSnapshots ( ) ) == null ) { return ; } for ( org.ovirt.engine.core.common.businessentities.Snapshot snapshot : getVm ( ) . getSnapshots ( ) ) { if ( org.ovirt.engine.core.bll.ImportVmCommand.getSnapshotDao ( ) . exists ( getVm ( ) . getId ( ) , snapshot.getId ( ) ) ) { org.ovirt.engine.core.bll.ImportVmCommand.getSnapshotDao ( ) . update ( snapshot ) ; } else { org.ovirt.engine.core.bll.ImportVmCommand.getSnapshotDao ( ) . save ( snapshot ) ; } } }
Source:
public void isVirtioScsiEnabledDefaultedToTrue ( ) { mockOsRepository ( ) ; org.ovirt.engine.core.bll.AddVmCommand < org.ovirt.engine.core.common.action.VmManagementParametersBase > cmd = setupCanAddVmTests ( 0 , 0 ) ; org.mockito.Mockito.doReturn ( createVdsGroup ( ) ) . when ( cmd ) . getVdsGroup ( ) ; org.mockito.Mockito.when ( osRepository.getDiskInterfaces ( org.mockito.Matchers.any ( java.lang.Integer.class ) , org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Version.class ) ) ) . thenReturn ( new java.util.ArrayList < > ( java.util.Arrays.asList ( "VirtIO_SCSI" ) ) ) ; junit.framework.Assert.assertTrue ( "isVirtioScsiEnabled hasn't been defaulted to true on cluster >= 3.3." , cmd.isVirtioScsiEnabled ( ) ) ; }

Target:
public void isVirtioScsiEnabledDefaultedToTrue ( ) { org.ovirt.engine.core.bll.AddVmCommand < org.ovirt.engine.core.common.action.VmManagementParametersBase > cmd = setupCanAddVmTests ( 0 , 0 ) ; org.mockito.Mockito.doReturn ( createVdsGroup ( ) ) . when ( cmd ) . getVdsGroup ( ) ; org.mockito.Mockito.when ( osRepository.getDiskInterfaces ( org.mockito.Matchers.any ( java.lang.Integer.class ) , org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Version.class ) ) ) . thenReturn ( new java.util.ArrayList < > ( java.util.Arrays.asList ( "VirtIO_SCSI" ) ) ) ; org.junit.Assert.assertTrue ( "isVirtioScsiEnabled hasn't been defaulted to true on cluster >= 3.3." , cmd.isVirtioScsiEnabled ( ) ) ; }
Source:
public void getTemplateNicList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? new java.util.ArrayList < > ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ) ( source ) ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetTemplateInterfacesByTemplateId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
public void getTemplateNicList ( org.ovirt.engine.ui.frontend.AsyncQuery < java.util.List < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > > aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.ListConverter < > ( ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetTemplateInterfacesByTemplateId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
public static void getTemplateById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid templateId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmTemplate , new org.ovirt.engine.core.common.queries.GetVmTemplateParameters ( templateId ) , aQuery ) ; }

Target:
public static void getRoleList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Role > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Role > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllRoles , new org.ovirt.engine.core.common.queries.MultilevelAdministrationsQueriesParameters ( ) , aQuery ) ; }
Source:
protected void authenticate ( org.ovirt.engine.core.uutils.ssh.SSHClient client ) throws javax.naming.AuthenticationException { try { client.authenticate ( ) ; } catch ( javax.naming.AuthenticationException e ) { throw e ; } catch ( java.lang.Exception e ) { log.error ( "Exception during authentication: {}" , e.getMessage ( ) ) ; log.debug ( "Exception" , e ) ; throw new java.lang.RuntimeException ( e ) ; } }

Target:
protected void authenticate ( org.ovirt.engine.core.uutils.ssh.SSHClient client ) throws javax.naming.AuthenticationException { try { client.authenticate ( ) ; } catch ( javax.naming.AuthenticationException e ) { throw e ; } catch ( java.lang.Exception e ) { org.ovirt.engine.core.bll.utils.GlusterUtil.log.error ( "Exception during authentication: {}" , e.getMessage ( ) ) ; org.ovirt.engine.core.bll.utils.GlusterUtil.log.debug ( "Exception" , e ) ; throw new java.lang.RuntimeException ( e ) ; } }
Source:
protected org.ovirt.engine.core.common.businessentities.VmPayload getVmPayloadByDeviceType ( org.ovirt.engine.core.common.utils.VmDeviceType deviceType ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > vmDevices = vmDeviceDao.getVmDeviceByVmIdTypeAndDevice ( org.ovirt.engine.core.bll.RunVmCommand.getVm ( ) . getId ( ) , VmDeviceGeneralType.DISK , deviceType.getName ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.VmDevice vmDevice : vmDevices ) { if ( ( vmDevice.getIsManaged ( ) ) && ( org.ovirt.engine.core.common.businessentities.VmPayload.isPayload ( vmDevice.getSpecParams ( ) ) ) ) { return new org.ovirt.engine.core.common.businessentities.VmPayload ( vmDevice ) ; } } return null ; }

Target:
protected org.ovirt.engine.core.common.businessentities.VmPayload getVmPayloadByDeviceType ( org.ovirt.engine.core.common.utils.VmDeviceType deviceType ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > vmDevices = vmDeviceDao.getVmDeviceByVmIdTypeAndDevice ( org.ovirt.engine.core.bll.RunVmCommand.getVm ( ) . getId ( ) , VmDeviceGeneralType.DISK , deviceType.getName ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.VmDevice vmDevice : vmDevices ) { if ( ( vmDevice.isManaged ( ) ) && ( org.ovirt.engine.core.common.businessentities.VmPayload.isPayload ( vmDevice.getSpecParams ( ) ) ) ) { return new org.ovirt.engine.core.common.businessentities.VmPayload ( vmDevice ) ; } } return null ; }
Source:
public void testUpdateNetConfigDirty ( ) { org.ovirt.engine.core.common.businessentities.VdsDynamic before = dao.get ( existingVds.getId ( ) ) ; java.lang.Boolean netConfigDirty = before.getnet_config_dirty ( ) ; netConfigDirty = java.lang.Boolean.FALSE.equals ( netConfigDirty ) ; before.setnet_config_dirty ( netConfigDirty ) ; dao.updateNetConfigDirty ( before.getId ( ) , netConfigDirty ) ; org.ovirt.engine.core.common.businessentities.VdsDynamic after = dao.get ( existingVds.getId ( ) ) ; org.junit.Assert.assertEquals ( before , after ) ; }

Target:
public void testUpdateNetConfigDirty ( ) { org.ovirt.engine.core.common.businessentities.VdsDynamic before = dao.get ( existingVds.getId ( ) ) ; java.lang.Boolean netConfigDirty = before.getNetConfigDirty ( ) ; netConfigDirty = java.lang.Boolean.FALSE.equals ( netConfigDirty ) ; before.setNetConfigDirty ( netConfigDirty ) ; dao.updateNetConfigDirty ( before.getId ( ) , netConfigDirty ) ; org.ovirt.engine.core.common.businessentities.VdsDynamic after = dao.get ( existingVds.getId ( ) ) ; org.junit.Assert.assertEquals ( before , after ) ; }
Source:
public void onRefreshActiveModel ( org.ovirt.engine.ui.frontend.communication.RefreshActiveModelEvent event ) { if ( ( getTimer ( ) . isActive ( ) ) || ( refreshOnInactiveTimer ( ) ) ) { if ( handleRefreshActiveModel ( event ) ) { syncSearch ( ) ; } if ( event.isDoFastForward ( ) ) { getTimer ( ) . fastForward ( ) ; } } }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object ReturnValue ) { setItems ( ( ( java.util.Collection ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( ReturnValue ) ) . getReturnValue ( ) ) ) ) ; }
Source:
private boolean interfaceWasModified ( org.ovirt.engine.core.common.businessentities.VdsNetworkInterface iface ) { return ! ( iface.equals ( getExistingIfaces ( ) . get ( iface.getName ( ) ) ) ) ; }

Target:
private boolean bondWasModified ( org.ovirt.engine.core.common.businessentities.VdsNetworkInterface iface ) { org.ovirt.engine.core.common.businessentities.VdsNetworkInterface existingIface = getExistingIfaces ( ) . get ( iface.getName ( ) ) ; if ( existingIface == null ) { return true ; } return ! ( org.apache.commons.lang.ObjectUtils.equals ( iface.getBondOptions ( ) , existingIface.getBondOptions ( ) ) ) ; }
Source:
private void syncDbRecordsMergeFailure ( ) { for ( org.ovirt.engine.core.compat.Guid imageId : org.ovirt.engine.core.bll.RemoveSnapshotSingleDiskLiveCommand.getParameters ( ) . getMergeStatusReturnValue ( ) . getImagesToRemove ( ) ) { org.ovirt.engine.core.bll.RemoveSnapshotSingleDiskLiveCommand.getImageDao ( ) . updateStatus ( imageId , ImageStatus.ILLEGAL ) ; } }

Target:
private void syncDbRecordsMergeFailure ( ) { org.ovirt.engine.core.common.businessentities.DiskImage curr = org.ovirt.engine.core.bll.RemoveSnapshotSingleDiskLiveCommand.getDestinationDiskImage ( ) ; while ( ! ( curr.getImageId ( ) . equals ( org.ovirt.engine.core.bll.RemoveSnapshotSingleDiskLiveCommand.getDiskImage ( ) . getImageId ( ) ) ) ) { curr = org.ovirt.engine.core.bll.RemoveSnapshotSingleDiskLiveCommand.getDbFacade ( ) . getDiskImageDao ( ) . getSnapshotById ( curr.getParentId ( ) ) ; org.ovirt.engine.core.bll.RemoveSnapshotSingleDiskLiveCommand.getImageDao ( ) . updateStatus ( curr.getImageId ( ) , ImageStatus.ILLEGAL ) ; } }
Source:
private java.util.Set < java.lang.String > getRemovedBonds ( ) { if ( ( removedBonds ) == null ) { removedBonds = new java.util.HashSet ( org.ovirt.engine.core.bll.network.host.HostSetupNetworksCommand.getParameters ( ) . getRemovedBonds ( ) . size ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.Bond bond : org.ovirt.engine.core.bll.network.host.HostSetupNetworksCommand.getParameters ( ) . getRemovedBonds ( ) ) { removedBonds.add ( bond.getName ( ) ) ; } } return removedBonds ; }

Target:
private java.util.Set < java.lang.String > getRemovedBondNames ( ) { if ( ( removedBondNames ) == null ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > existingVdsInterfaceToBeRemoved = getRemovedBonds ( ) ; java.util.Set < java.lang.String > removedBondNames = new java.util.HashSet ( existingVdsInterfaceToBeRemoved.size ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface removedBondInterface : existingVdsInterfaceToBeRemoved ) { removedBondNames.add ( removedBondInterface.getName ( ) ) ; } this . removedBondNames = removedBondNames ; } return removedBondNames ; }
Source:
protected void cretaeVirtIODisk ( ) { org.ovirt.engine.core.common.businessentities.DiskImage disk = new org.ovirt.engine.core.common.businessentities.DiskImage ( ) ; disk.setImageId ( diskImageGuid ) ; disk.setDiskInterface ( DiskInterface.VirtIO ) ; disk.setActive ( true ) ; org.mockito.Mockito.doReturn ( diskDao ) . when ( command ) . getDiskDao ( ) ; org.mockito.Mockito.when ( diskDao.get ( diskImageGuid ) ) . thenReturn ( disk ) ; mockVmDevice ( false ) ; }

Target:
protected org.ovirt.engine.core.common.businessentities.DiskImage getDiskImage ( ) { org.ovirt.engine.core.common.businessentities.DiskImage disk = new org.ovirt.engine.core.common.businessentities.DiskImage ( ) ; disk.setImageId ( diskImageGuid ) ; java.util.ArrayList < org.ovirt.engine.core.compat.Guid > storageIdList = new java.util.ArrayList < > ( ) ; storageIdList.add ( storageDomainId ) ; disk.setStorageIds ( storageIdList ) ; disk.setStoragePoolId ( storagePoolId ) ; return disk ; }
Source:
public boolean StorageDomainRemoved ( org.ovirt.engine.core.common.businessentities.StorageDomainStatic storageDomain ) { int numOfRemovedLuns = removeStorageDomainLuns ( storageDomain ) ; if ( numOfRemovedLuns > 0 ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage_server_connections > list = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStorageServerConnectionDao ( ) . getAllForVolumeGroup ( storageDomain.getstorage ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.storage_server_connections connection : FilterConnectionsUsedByOthers ( list , storageDomain.getstorage ( ) ) ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStorageServerConnectionDao ( ) . remove ( connection.getid ( ) ) ; } } return true ; }

Target:
public boolean StorageDomainRemoved ( org.ovirt.engine.core.common.businessentities.StorageDomainStatic storageDomain ) { int numOfRemovedLuns = removeStorageDomainLuns ( storageDomain ) ; if ( numOfRemovedLuns > 0 ) { java.util.List < org.ovirt.engine.core.common.businessentities.StorageServerConnections > list = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStorageServerConnectionDao ( ) . getAllForVolumeGroup ( storageDomain.getstorage ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.StorageServerConnections connection : FilterConnectionsUsedByOthers ( list , storageDomain.getstorage ( ) ) ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStorageServerConnectionDao ( ) . remove ( connection.getid ( ) ) ; } } return true ; }
Source:
public void testRemoveNonExistant ( ) { setUpGetEntityExpectations ( QueryType.GetTagByTagId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , null ) ; try { resource.remove ( ) ; org.junit.jupiter.api.Assertions.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { org.junit.jupiter.api.Assertions.assertNotNull ( wae.getResponse ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( 404 , wae.getResponse ( ) . getStatus ( ) ) ; } }

Target:
public void testRemoveNonExistant ( ) { setUpGetEntityExpectations ( QueryType.GetTagByTagId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , null ) ; try { resource.remove ( ) ; org.junit.jupiter.api.Assertions.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }
Source:
public void modifyCredentials ( java.lang.String pool , java.lang.String user , java.lang.String currentPassword , java.lang.String newPassword , java.util.Map < java.lang.String , java.lang.Object > vars ) throws java.lang.Exception { org.ovirt.engineextensions.aaa.ldap.PasswordModifyExtendedResult passwordModifyResult = ( ( org.ovirt.engineextensions.aaa.ldap.PasswordModifyExtendedResult ) ( getConnectionPoolEntry ( pool , null , vars ) . connectionPool.processExtendedOperation ( new org.ovirt.engineextensions.aaa.ldap.PasswordModifyExtendedRequest ( user , currentPassword , newPassword ) ) ) ) ; if ( ( passwordModifyResult.getResultCode ( ) ) != ( ResultCode.SUCCESS ) ) { throw new org.ovirt.engineextensions.aaa.ldap.LDAPException ( passwordModifyResult ) ; } }

Target:
public void modifyCredentials ( java.lang.String pool , java.lang.String user , java.lang.String currentPassword , java.lang.String newPassword , java.util.Map < java.lang.String , java.lang.Object > vars ) throws java.lang.Exception { com.unboundid.ldap.sdk.extensions.PasswordModifyExtendedResult passwordModifyResult = ( ( com.unboundid.ldap.sdk.extensions.PasswordModifyExtendedResult ) ( getConnectionPoolEntry ( pool , null , vars ) . connectionPool.processExtendedOperation ( new com.unboundid.ldap.sdk.extensions.PasswordModifyExtendedRequest ( user , currentPassword , newPassword ) ) ) ) ; if ( ( passwordModifyResult.getResultCode ( ) ) != ( com.unboundid.ldap.sdk.ResultCode.SUCCESS ) ) { throw new com.unboundid.ldap.sdk.LDAPException ( passwordModifyResult ) ; } }
Source:
private boolean isStripeCountIncreased ( ) { if ( ( ( ( getGlusterVolume ( ) . getVolumeType ( ) ) == ( org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeType.STRIPE ) ) || ( ( getGlusterVolume ( ) . getVolumeType ( ) ) == ( org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeType.DISTRIBUTED_STRIPE ) ) ) && ( ( getParameters ( ) . getStripeCount ( ) ) > ( getGlusterVolume ( ) . getStripeCount ( ) ) ) ) { return true ; } else { return false ; } }

Target:
private boolean isStripeCountIncreased ( int stripeCount ) { return ( ( ( getGlusterVolume ( ) . getVolumeType ( ) ) == ( org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeType.STRIPE ) ) || ( ( getGlusterVolume ( ) . getVolumeType ( ) ) == ( org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeType.DISTRIBUTED_STRIPE ) ) ) && ( stripeCount > ( getGlusterVolume ( ) . getStripeCount ( ) ) ) ; }
Source:
public void edit ( org.ovirt.engine.ui.uicommonweb.models.userportal.UserPortalConsolePopupModel model ) { this . model = model ; org.ovirt.engine.ui.uicommonweb.models.vms.ConsoleModel defaultConsole = ( ( org.ovirt.engine.ui.uicommonweb.models.userportal.UserPortalItemModel ) ( model.getModel ( ) . getSelectedItem ( ) ) ) . getDefaultConsole ( ) ; editCheckBoxes ( defaultConsole , ctrlAltDel , enableUsbAutoshare , openInFullScreen , wanEnabled , disableSmartcard ) ; org.ovirt.engine.ui.uicommonweb.models.vms.ConsoleModel additionalConsole = ( ( org.ovirt.engine.ui.uicommonweb.models.userportal.UserPortalItemModel ) ( model.getModel ( ) . getSelectedItem ( ) ) ) . getAdditionalConsole ( ) ; editCheckBoxes ( additionalConsole , useLocalDrives ) ; }

Target:
public void edit ( org.ovirt.engine.ui.uicommonweb.models.ConsolePopupModel model ) { this . model = model ; org.ovirt.engine.ui.uicommonweb.models.vms.ConsoleModel defaultConsole = model.getModel ( ) . getDefaultConsoleModel ( ) ; editCheckBoxes ( defaultConsole , ctrlAltDel , enableUsbAutoshare , openInFullScreen , wanEnabled , disableSmartcard ) ; org.ovirt.engine.ui.uicommonweb.models.vms.ConsoleModel additionalConsole = model.getModel ( ) . getAdditionalConsoleModel ( ) ; editCheckBoxes ( additionalConsole , useLocalDrives ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { org.ovirt.engine.core.common.action.hostdeploy.UpdateVdsActionParameters internalParam = ( ( org.ovirt.engine.core.common.action.hostdeploy.UpdateVdsActionParameters ) ( model ) ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runAction ( VdcActionType.InstallVds , internalParam , new org.ovirt.engine.ui.uicompat.IFrontendActionAsyncCallback ( ) { @ java.lang.Override public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { org.ovirt.engine.core.common.action.VdcReturnValueBase returnValue = result.getReturnValue ( ) ; if ( ( returnValue != null ) && ( returnValue.getSucceeded ( ) ) ) { cancel ( ) ; } } } ) ; }

Target:
public void onSuccess ( org.ovirt.engine.core.common.businessentities.Cluster returnValue ) { org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runAction ( VdcActionType.InstallVds , param , new org.ovirt.engine.ui.uicompat.IFrontendActionAsyncCallback ( ) { @ java.lang.Override public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { org.ovirt.engine.core.common.action.VdcReturnValueBase returnValue = result.getReturnValue ( ) ; if ( ( returnValue != null ) && ( returnValue.getSucceeded ( ) ) ) { cancel ( ) ; } } } ) ; }
Source:
public void testGetAllForRoleAndObject ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.Permissions > result = dao.getAllForRoleAndObject ( org.ovirt.engine.core.dao.PermissionDAOTest.ROLE_ID , org.ovirt.engine.core.dao.PermissionDAOTest.VM_ENTITY_ID ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.Permissions permission : result ) { org.junit.Assert.assertEquals ( org.ovirt.engine.core.dao.PermissionDAOTest.ROLE_ID , permission.getrole_id ( ) ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.dao.PermissionDAOTest.VM_ENTITY_ID , permission.getObjectId ( ) ) ; } }

Target:
public void testGetAllForRoleAndObject ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.Permissions > result = dao.getAllForRoleAndObject ( org.ovirt.engine.core.dao.PermissionDAOTest.ROLE_ID , org.ovirt.engine.core.dao.PermissionDAOTest.VM_ENTITY_ID ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.Permissions permission : result ) { org.junit.Assert.assertEquals ( org.ovirt.engine.core.dao.PermissionDAOTest.ROLE_ID , permission.getRoleId ( ) ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.dao.PermissionDAOTest.VM_ENTITY_ID , permission.getObjectId ( ) ) ; } }
Source:
public void schedulJobs ( ) { org.ovirt.engine.core.utils.timer.SchedulerUtil sched = org.ovirt.engine.core.utils.timer.SchedulerUtilQuartzImpl.getInstance ( ) ; int refreshRate = ( org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( ConfigValues.VdsRefreshRate ) ) * 1000 ; refreshIteration = ( numberRefreshesBeforeSave ) - 1 ; onTimerJobId = sched.scheduleAFixedDelayJob ( this , "onTimer" , new java.lang.Class [ 0 ] , new java.lang.Object [ 0 ] , refreshRate , refreshRate , java.util.concurrent.TimeUnit.MILLISECONDS ) ; vmsMonitoringJobId = sched.scheduleAFixedDelayJob ( this , "vmsMonitoring" , new java.lang.Class [ 0 ] , new java.lang.Object [ 0 ] , refreshRate , refreshRate , java.util.concurrent.TimeUnit.MILLISECONDS ) ; }

Target:
public void scheduleJobs ( ) { org.ovirt.engine.core.utils.timer.SchedulerUtil sched = org.ovirt.engine.core.utils.timer.SchedulerUtilQuartzImpl.getInstance ( ) ; int refreshRate = ( org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( ConfigValues.VdsRefreshRate ) ) * 1000 ; refreshIteration = ( numberRefreshesBeforeSave ) - 1 ; onTimerJobId = sched.scheduleAFixedDelayJob ( this , "onTimer" , new java.lang.Class [ 0 ] , new java.lang.Object [ 0 ] , refreshRate , refreshRate , java.util.concurrent.TimeUnit.MILLISECONDS ) ; vmsMonitoringJobId = sched.scheduleAFixedDelayJob ( this , "vmsMonitoring" , new java.lang.Class [ 0 ] , new java.lang.Object [ 0 ] , refreshRate , refreshRate , java.util.concurrent.TimeUnit.MILLISECONDS ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.LUNListReturnForXmlRpc getDeviceList ( int storageType ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.getDeviceList ( storageType ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.LUNListReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.LUNListReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.HostJobsReturnForXmlRpc getHostJobs ( java.lang.String jobType , java.util.List < java.lang.String > jobIds ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.getHostJobs ( jobType , jobIds ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.HostJobsReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.HostJobsReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
public void eventRaised ( org.ovirt.engine.core.compat.Event ev , java.lang.Object sender , org.ovirt.engine.core.compat.EventArgs args ) { boolean isCardStatusChangable = iface.getPlugged ( ) . getIsChangable ( ) ; pluggedEditor.setEnabled ( isCardStatusChangable ) ; unpluggedEditor.setEnabled ( isCardStatusChangable ) ; boolean isCardStatusAvailable = iface.getPlugged ( ) . getIsAvailable ( ) ; cardStatusSelectionPanel.setVisible ( isCardStatusAvailable ) ; }

Target:
private void applyStyles ( ) { cardStatusEditor.addContentWidgetStyleName ( style.cardStatusEditorContent ( ) ) ; pluggedEditor.addContentWidgetStyleName ( style.cardStatusRadioContent ( ) ) ; unpluggedEditor.addContentWidgetStyleName ( style.cardStatusRadioContent ( ) ) ; linkStateEditor.addContentWidgetStyleName ( style.linkStateEditorContent ( ) ) ; linkedEditor.addContentWidgetStyleName ( style.linkStateRadioContent ( ) ) ; unlinkedEditor.addContentWidgetStyleName ( style.linkStateRadioContent ( ) ) ; enableManualMacCheckbox.addContentWidgetStyleName ( style.checkBox ( ) ) ; portMirroringEditor.addContentWidgetStyleName ( style.portMirroringEditor ( ) ) ; }
Source:
public void testInstall ( ) throws java.lang.Exception { setUpGetEntityWithNoCertificateInfoExpectations ( 1 ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.UpdateVds , org.ovirt.engine.core.common.action.UpdateVdsActionParameters.class , new java.lang.String [ ] { "RootPassword" } , new java.lang.Object [ ] { NAMES [ 2 ] } ) ) ; org.ovirt.engine.api.model.Action action = new org.ovirt.engine.api.model.Action ( ) ; action.setRootPassword ( NAMES [ 2 ] ) ; verifyActionResponse ( resource.install ( action ) ) ; }

Target:
public void testInstall ( ) throws java.lang.Exception { setUpGetEntityWithNoCertificateInfoExpectations ( 1 ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.UpdateVds , org.ovirt.engine.core.common.action.hostdeploy.UpdateVdsActionParameters.class , new java.lang.String [ ] { "RootPassword" } , new java.lang.Object [ ] { NAMES [ 2 ] } ) ) ; org.ovirt.engine.api.model.Action action = new org.ovirt.engine.api.model.Action ( ) ; action.setRootPassword ( NAMES [ 2 ] ) ; verifyActionResponse ( resource.install ( action ) ) ; }
Source:
public void getDataCenterListByName ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String name ) { 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.StoragePool > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( ( ( "DataCenter: name=" + name ) + " sortby name" ) , org.ovirt.engine.core.common.interfaces.SearchType.StoragePool ) , aQuery ) ; }

Target:
public void getClusterList ( org.ovirt.engine.ui.frontend.AsyncQuery < java.util.List < org.ovirt.engine.core.common.businessentities.Cluster > > aQuery , org.ovirt.engine.core.compat.Guid dataCenterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.SortListByNameConverter < > ( ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetClustersByStoragePoolId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) , aQuery ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object result ) { org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterGeneralModel innerGeneralModel = ( ( org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterGeneralModel ) ( model ) ) ; java.util.Map < java.lang.String , java.lang.String > serverMap = ( ( java.util.Map < java.lang.String , java.lang.String > ) ( result ) ) ; if ( ! ( serverMap.isEmpty ( ) ) ) { innerGeneralModel.setHasNewGlusterHostsAlert ( true ) ; innerGeneralModel.setHasAnyAlert ( true ) ; } else { setHasNewGlusterHostsAlert ( false ) ; setHasAnyAlert ( false ) ; } }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterClusterService swiftService = ( ( org.ovirt.engine.core.common.businessentities.gluster.GlusterClusterService ) ( returnValue ) ) ; if ( swiftService != null ) { setGlusterSwiftStatus ( swiftService.getStatus ( ) ) ; } else { setGlusterSwiftStatus ( GlusterServiceStatus.UNKNOWN ) ; } }
Source:
protected void ExecuteVdsBrokerCommand ( ) { status = org.ovirt.engine.core.vdsbroker.gluster.StartRebalanceGlusterVolumeVDSCommand.getBroker ( ) . glusterVolumeRebalanceStart ( org.ovirt.engine.core.vdsbroker.gluster.StartRebalanceGlusterVolumeVDSCommand.getParameters ( ) . getVolumeName ( ) , org.ovirt.engine.core.vdsbroker.gluster.StartRebalanceGlusterVolumeVDSCommand.getParameters ( ) . isFixLayoutOnly ( ) , org.ovirt.engine.core.vdsbroker.gluster.StartRebalanceGlusterVolumeVDSCommand.getParameters ( ) . isForceAction ( ) ) ; org.ovirt.engine.core.vdsbroker.gluster.StartRebalanceGlusterVolumeVDSCommand.ProceedProxyReturnValue ( ) ; }

Target:
protected void ExecuteVdsBrokerCommand ( ) { glusterTaskReturn = org.ovirt.engine.core.vdsbroker.gluster.StartRebalanceGlusterVolumeVDSCommand.getBroker ( ) . glusterVolumeRebalanceStart ( org.ovirt.engine.core.vdsbroker.gluster.StartRebalanceGlusterVolumeVDSCommand.getParameters ( ) . getVolumeName ( ) , org.ovirt.engine.core.vdsbroker.gluster.StartRebalanceGlusterVolumeVDSCommand.getParameters ( ) . isFixLayoutOnly ( ) , org.ovirt.engine.core.vdsbroker.gluster.StartRebalanceGlusterVolumeVDSCommand.getParameters ( ) . isForceAction ( ) ) ; task = glusterTaskReturn.getGlusterTask ( ) ; org.ovirt.engine.core.vdsbroker.gluster.StartRebalanceGlusterVolumeVDSCommand.proceedProxyReturnValue ( ) ; setReturnValue ( task ) ; }
Source:
public org.ovirt.engine.api.resource.VmNicResource getNicResource ( java.lang.String id ) { return inject ( new org.ovirt.engine.api.restapi.resource.BackendVmNicResource ( parentId , id , this , updateType , getUpdateParametersProvider ( ) , getRequiredUpdateFields ( ) , subCollections ) ) ; }

Target:
public org.ovirt.engine.api.model.Nics list ( ) { org.ovirt.engine.api.model.Nics nics = new org.ovirt.engine.api.model.Nics ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > entities = getBackendCollection ( VdcQueryType.GetVmInterfacesByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface entity : entities ) { org.ovirt.engine.api.model.Nic nic = populate ( map ( entity ) , entity ) ; nics.getNics ( ) . add ( addLinks ( nic ) ) ; } return nics ; }
Source:
protected void verify ( org.ovirt.engine.api.model.Balance model , org.ovirt.engine.api.model.Balance transform ) { assertNotNull ( transform ) ; assertEquals ( model.getId ( ) , transform.getId ( ) ) ; assertEquals ( model.getSchedulingPolicyUnit ( ) . getId ( ) , transform.getSchedulingPolicyUnit ( ) . getId ( ) ) ; }

Target:
protected void verify ( org.ovirt.engine.api.model.Balance model , org.ovirt.engine.api.model.Balance transform ) { org.junit.Assert.assertNotNull ( transform ) ; org.junit.Assert.assertEquals ( model.getId ( ) , transform.getId ( ) ) ; org.junit.Assert.assertEquals ( model.getSchedulingPolicyUnit ( ) . getId ( ) , transform.getSchedulingPolicyUnit ( ) . getId ( ) ) ; }
Source:
protected static boolean isNewWatchdogEvent ( org.ovirt.engine.core.common.businessentities.VmDynamic vmDynamic , org.ovirt.engine.core.common.businessentities.VM vmTo ) { java.lang.Long lastWatchdogEvent = vmDynamic.getLastWatchdogEvent ( ) ; return ( ( vmTo != null ) && ( lastWatchdogEvent != null ) ) && ( ( ( vmTo.getLastWatchdogEvent ( ) ) == null ) || ( ( vmTo.getLastWatchdogEvent ( ) ) < lastWatchdogEvent ) ) ; }

Target:
public void addDiskImageDynamicToSave ( org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.DiskImageDynamic > imageDynamicByVmId ) { vmDiskImageDynamicToSave.add ( imageDynamicByVmId ) ; }
Source:
public org.ovirt.engine.core.common.eventqueue.EventResult storageDomainNotOperational ( org.ovirt.engine.core.compat.Guid storageDomainId , org.ovirt.engine.core.compat.Guid storagePoolId ) { org.ovirt.engine.core.common.action.StorageDomainPoolParametersBase parameters = new org.ovirt.engine.core.common.action.StorageDomainPoolParametersBase ( storageDomainId , storagePoolId ) ; parameters.setIsInternal ( true ) ; parameters.setInactive ( true ) ; boolean isSucceeded = org.ovirt.engine.core.bll.Backend.getInstance ( ) . runInternalAction ( VdcActionType.DeactivateStorageDomain , parameters , org.ovirt.engine.core.bll.job.ExecutionHandler.createInternalJobContext ( ) ) . getSucceeded ( ) ; return new org.ovirt.engine.core.common.eventqueue.EventResult ( isSucceeded , org.ovirt.engine.core.common.eventqueue.EventType.DOMAINNOTOPERATIONAL ) ; }

Target:
public org.ovirt.engine.core.common.eventqueue.EventResult storageDomainNotOperational ( org.ovirt.engine.core.compat.Guid storageDomainId , org.ovirt.engine.core.compat.Guid storagePoolId ) { org.ovirt.engine.core.common.action.StorageDomainPoolParametersBase parameters = new org.ovirt.engine.core.common.action.StorageDomainPoolParametersBase ( storageDomainId , storagePoolId ) ; parameters.setIsInternal ( true ) ; parameters.setInactive ( true ) ; boolean isSucceeded = backend.runInternalAction ( VdcActionType.DeactivateStorageDomain , parameters , org.ovirt.engine.core.bll.job.ExecutionHandler.createInternalJobContext ( ) ) . getSucceeded ( ) ; return new org.ovirt.engine.core.common.eventqueue.EventResult ( isSucceeded , org.ovirt.engine.core.common.eventqueue.EventType.DOMAINNOTOPERATIONAL ) ; }
Source:
protected java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > getDisksList ( ) { if ( ( cachedSelectedActiveDisks ) == null ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > imagesAndCinderForVm = getFilteredDisksForSnapshot ( ) ; if ( ( getParameters ( ) . getDisks ( ) ) == null ) { cachedSelectedActiveDisks = imagesAndCinderForVm ; } else { cachedSelectedActiveDisks = org.ovirt.engine.core.bll.ImagesHandler.imagesIntersection ( imagesAndCinderForVm , getParameters ( ) . getDisks ( ) ) ; } } return cachedSelectedActiveDisks ; }

Target:
protected java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > getDisksList ( ) { if ( ( cachedSelectedActiveDisks ) == null ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > imagesAndCinderForVm = getDiskImagesForVm ( ) ; if ( ( getParameters ( ) . getDisks ( ) ) == null ) { cachedSelectedActiveDisks = imagesAndCinderForVm ; } else { cachedSelectedActiveDisks = org.ovirt.engine.core.bll.ImagesHandler.imagesIntersection ( imagesAndCinderForVm , getParameters ( ) . getDisks ( ) ) ; } } return cachedSelectedActiveDisks ; }
Source:
public org.ovirt.engine.ui.common.presenter.AbstractModelBoundPopupPresenterWidget < ? extends org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel , ? > getConfirmModelPopup ( org.ovirt.engine.ui.uicommonweb.models.hosts.HostListModel source , org.ovirt.engine.ui.uicommonweb.UICommand lastExecutedCommand ) { if ( lastExecutedCommand == ( getModel ( ) . getRemoveCommand ( ) ) ) { return removeConfirmPopupProvider.get ( ) ; } else if ( lastExecutedCommand == ( getModel ( ) . getManualFenceCommand ( ) ) ) { return manualFenceConfirmPopupProvider.get ( ) ; } else { return super . getConfirmModelPopup ( source , lastExecutedCommand ) ; } }

Target:
public org.ovirt.engine.ui.common.presenter.AbstractModelBoundPopupPresenterWidget < ? extends org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel , ? > getConfirmModelPopup ( org.ovirt.engine.ui.uicommonweb.models.hosts.HostListModel source , org.ovirt.engine.ui.uicommonweb.UICommand lastExecutedCommand ) { if ( ( lastExecutedCommand == ( getModel ( ) . getRemoveCommand ( ) ) ) || ( lastExecutedCommand == ( getModel ( ) . getMaintenanceCommand ( ) ) ) ) { return removeConfirmPopupProvider.get ( ) ; } else if ( lastExecutedCommand == ( getModel ( ) . getManualFenceCommand ( ) ) ) { return manualFenceConfirmPopupProvider.get ( ) ; } else { return super . getConfirmModelPopup ( source , lastExecutedCommand ) ; } }
Source:
public static void getVmListByClusterName ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String clusterName ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > vms = org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VM > cast ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.IVdcQueryable > ) ( source ) ) ) ; return vms ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( ( "Vms: cluster=" + clusterName ) , org.ovirt.engine.core.common.interfaces.SearchType.VM ) , aQuery ) ; }

Target:
public void getUpHostListByCluster ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String clusterName ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : java.util.Collections.emptyList ( ) ; } } ; getUpHostListByCluster ( aQuery , clusterName , null ) ; }
Source:
public static org.ovirt.engine.core.common.businessentities.DbUser persistAuthenticatedUser ( org.ovirt.engine.core.common.businessentities.AdUser adUser ) { org.ovirt.engine.core.common.businessentities.DbUser dbUser = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getDbUserDAO ( ) . get ( adUser.getUserId ( ) ) ; boolean newUser = dbUser == null ; dbUser = new org.ovirt.engine.core.common.businessentities.DbUser ( adUser ) ; if ( newUser ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getDbUserDAO ( ) . save ( dbUser ) ; } else { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getDbUserDAO ( ) . update ( dbUser ) ; } return dbUser ; }

Target:
public static org.ovirt.engine.core.common.businessentities.DbUser persistAuthenticatedUser ( org.ovirt.engine.core.common.businessentities.AdUser adUser ) { org.ovirt.engine.core.common.businessentities.DbUser dbUser = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getDbUserDao ( ) . get ( adUser.getUserId ( ) ) ; boolean newUser = dbUser == null ; dbUser = new org.ovirt.engine.core.common.businessentities.DbUser ( adUser ) ; if ( newUser ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getDbUserDao ( ) . save ( dbUser ) ; } else { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getDbUserDao ( ) . update ( dbUser ) ; } return dbUser ; }
Source:
protected org.ovirt.engine.core.utils.linq.Predicate < org.ovirt.engine.core.common.businessentities.StorageDomain > getPredicate ( final java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > disksList ) { return new org.ovirt.engine.core.utils.linq.Predicate < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) { @ java.lang.Override public boolean eval ( org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain ) { return ( storageDomain.getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageDomainStatus.Active ) ; } } ; }

Target:
protected org.ovirt.engine.core.utils.linq.Predicate < org.ovirt.engine.core.common.businessentities.StorageDomain > getPredicate ( final java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > memoryDisks ) { return new org.ovirt.engine.core.utils.linq.Predicate < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) { @ java.lang.Override public boolean eval ( org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain ) { return ( storageDomain.getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageDomainStatus.Active ) ; } } ; }
Source:
public void testCanDoFailOnAddFloatingDiskWithPlugSet ( ) { org.ovirt.engine.core.common.businessentities.DiskImage disk = org.ovirt.engine.core.bll.AddDiskToVmCommandTest.createDiskImage ( 1 ) ; org.ovirt.engine.core.common.action.AddDiskParameters parameters = org.ovirt.engine.core.bll.AddDiskToVmCommandTest.createParameters ( ) ; parameters.setDiskInfo ( disk ) ; parameters.setVmId ( Guid.Empty ) ; parameters.setPlugDiskToVm ( true ) ; initializeCommand ( null , parameters ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( command , VdcBllMessages.CANNOT_ADD_FLOATING_DISK_WITH_PLUG_VM_SET ) ; }

Target:
public void testCanDoFailOnAddFloatingDiskWithPlugSet ( ) { org.ovirt.engine.core.common.businessentities.DiskImage disk = org.ovirt.engine.core.bll.AddDiskCommandTest.createDiskImage ( 1 ) ; org.ovirt.engine.core.common.action.AddDiskParameters parameters = org.ovirt.engine.core.bll.AddDiskCommandTest.createParameters ( ) ; parameters.setDiskInfo ( disk ) ; parameters.setVmId ( Guid.Empty ) ; parameters.setPlugDiskToVm ( true ) ; initializeCommand ( null , parameters ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( command , VdcBllMessages.CANNOT_ADD_FLOATING_DISK_WITH_PLUG_VM_SET ) ; }
Source:
private java.lang.String renderGigabyteSize ( long size ) { long sizeInGB = ( ( unit ) == ( org.ovirt.engine.core.common.utils.SizeConverter.SizeUnit.GiB ) ) ? size : org.ovirt.engine.core.common.utils.SizeConverter.convert ( size , unit , SizeUnit.GiB ) . longValue ( ) ; return org.ovirt.engine.ui.common.widget.renderer.DiskSizeRenderer.messages.gigabytes ( ( sizeInGB >= 1 ? java.lang.String.valueOf ( sizeInGB ) : "< 1" ) ) ; }

Target:
private java.lang.String renderGibibyteSize ( long size ) { long sizeInGiB = ( ( unit ) == ( org.ovirt.engine.core.common.utils.SizeConverter.SizeUnit.GiB ) ) ? size : org.ovirt.engine.core.common.utils.SizeConverter.convert ( size , unit , SizeUnit.GiB ) . longValue ( ) ; return org.ovirt.engine.ui.common.widget.renderer.DiskSizeRenderer.messages.gibibytes ( ( sizeInGiB >= 1 ? java.lang.String.valueOf ( sizeInGiB ) : "< 1" ) ) ; }
Source:
public void testGetEntityNameByIdAndTypeForDisk ( ) { org.ovirt.engine.core.common.businessentities.storage.BaseDisk disk = dbFacade.getBaseDiskDao ( ) . get ( org.ovirt.engine.core.dao.DbFacadeDaoTest.DISK_ID ) ; org.junit.Assert.assertNotNull ( disk ) ; java.lang.String name = disk.getDiskAlias ( ) ; org.junit.Assert.assertTrue ( name.equals ( dbFacade.getEntityNameByIdAndType ( org.ovirt.engine.core.dao.DbFacadeDaoTest.DISK_ID , VdcObjectType.Disk ) ) ) ; }

Target:
public void testGetEntityNameByIdAndTypeForDisk ( ) { org.ovirt.engine.core.common.businessentities.storage.BaseDisk disk = dbFacade.getBaseDiskDao ( ) . get ( org.ovirt.engine.core.dal.dbbroker.DbFacadeDaoTest.DISK_ID ) ; org.junit.Assert.assertNotNull ( disk ) ; java.lang.String name = disk.getDiskAlias ( ) ; org.junit.Assert.assertTrue ( name.equals ( dbFacade.getEntityNameByIdAndType ( org.ovirt.engine.core.dal.dbbroker.DbFacadeDaoTest.DISK_ID , VdcObjectType.Disk ) ) ) ; }
Source:
protected java.lang.Object [ ] getSelectedKeys ( ) { if ( ( getSelectedItems ( ) ) == null ) { return new java.lang.Object [ 0 ] ; } else { java.lang.Object [ ] keys = new java.lang.Object [ getSelectedItems ( ) . size ( ) ] ; for ( int i = 0 ; i < ( getSelectedItems ( ) . size ( ) ) ; i ++ ) { keys [ i ] = ( ( org.ovirt.engine.core.common.businessentities.vm_pools ) ( getSelectedItems ( ) . get ( i ) ) ) . getvm_pool_id ( ) ; } return keys ; } }

Target:
protected java.lang.Object [ ] getSelectedKeys ( ) { if ( ( getSelectedItems ( ) ) == null ) { return new java.lang.Object [ 0 ] ; } else { java.lang.Object [ ] keys = new java.lang.Object [ getSelectedItems ( ) . size ( ) ] ; for ( int i = 0 ; i < ( getSelectedItems ( ) . size ( ) ) ; i ++ ) { keys [ i ] = ( ( org.ovirt.engine.core.common.businessentities.VmPool ) ( getSelectedItems ( ) . get ( i ) ) ) . getVmPoolId ( ) ; } return keys ; } }
Source:
protected void actualSave ( ) { flush ( ) ; org.ovirt.engine.ui.frontend.Frontend.RunAction ( action , new org.ovirt.engine.core.common.action.ProviderParameters ( provider ) ) ; cancel ( ) ; }

Target:
protected void actualSave ( ) { flush ( ) ; org.ovirt.engine.ui.frontend.Frontend.RunAction ( action , new org.ovirt.engine.core.common.action.ProviderParameters ( provider ) , new org.ovirt.engine.ui.uicompat.IFrontendActionAsyncCallback ( ) { @ java.lang.Override public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { sourceListModel.getSearchCommand ( ) . execute ( ) ; } } ) ; cancel ( ) ; }
Source:
public void Executed ( org.ovirt.engine.ui.uicompat.FrontendMultipleActionAsyncResult result ) { hostsModel.StopProgress ( ) ; boolean isAllCanDoPassed = true ; for ( org.ovirt.engine.core.common.action.VdcReturnValueBase returnValueBase : result.getReturnValue ( ) ) { isAllCanDoPassed = isAllCanDoPassed && ( returnValueBase.getCanDoAction ( ) ) ; if ( ! isAllCanDoPassed ) { break ; } } if ( isAllCanDoPassed ) { updateAlerts ( ) ; Cancel ( ) ; } }

Target:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendMultipleActionAsyncResult result ) { hostsModel.StopProgress ( ) ; boolean isAllCanDoPassed = true ; for ( org.ovirt.engine.core.common.action.VdcReturnValueBase returnValueBase : result.getReturnValue ( ) ) { isAllCanDoPassed = isAllCanDoPassed && ( returnValueBase.getCanDoAction ( ) ) ; if ( ! isAllCanDoPassed ) { break ; } } if ( isAllCanDoPassed ) { updateAlerts ( ) ; Cancel ( ) ; } }