auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private org.springframework.jdbc.core.namedparam.MapSqlParameterSource createVnodeToPnodeParametersMapper ( org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.utils.Pair < java.lang.Boolean , java.lang.Integer > > pNode , org.ovirt.engine.core.compat.Guid vNodeId ) { return getCustomMapSqlParameterSource ( ) . addValue ( "id" , org.ovirt.engine.core.compat.Guid.newGuid ( ) ) . addValue ( "vm_numa_node_id" , vNodeId ) . addValue ( "vds_numa_node_id" , pNode.getFirst ( ) ) . addValue ( "vds_numa_node_index" , pNode.getSecond ( ) . getSecond ( ) ) . addValue ( "is_pinned" , pNode.getSecond ( ) . getFirst ( ) ) ; }

Target:
protected org.springframework.jdbc.core.namedparam.MapSqlParameterSource createVnodeToPnodeParametersMapper ( org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.utils.Pair < java.lang.Boolean , java.lang.Integer > > pNode , org.ovirt.engine.core.compat.Guid vNodeId ) { return getCustomMapSqlParameterSource ( ) . addValue ( "id" , org.ovirt.engine.core.compat.Guid.newGuid ( ) ) . addValue ( "vm_numa_node_id" , vNodeId ) . addValue ( "vds_numa_node_id" , pNode.getFirst ( ) ) . addValue ( "vds_numa_node_index" , pNode.getSecond ( ) . getSecond ( ) ) . addValue ( "is_pinned" , pNode.getSecond ( ) . getFirst ( ) ) ; }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < ? extends org.ovirt.engine.ui.uicompat.EventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { getView ( ) . getSearchButton ( ) . getCommand ( ) . setIsExecutionAllowed ( ( ! ( ( java.lang.Boolean ) ( model.getSearchInProgress ( ) . getEntity ( ) ) ) ) ) ; }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < ? extends org.ovirt.engine.ui.uicompat.EventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { getView ( ) . getSearchButton ( ) . getCommand ( ) . setIsExecutionAllowed ( ( ! ( model.getSearchInProgress ( ) . getEntity ( ) ) ) ) ; }
Source:
public void edit ( ) { if ( ( getWindow ( ) ) != null ) { return ; } org.ovirt.engine.ui.uicommonweb.models.profiles.EditVnicProfileModel model = new org.ovirt.engine.ui.uicommonweb.models.profiles.EditVnicProfileModel ( this , getEntity ( ) . getCompatibilityVersion ( ) , ( ( org.ovirt.engine.core.common.businessentities.network.VnicProfileView ) ( getSelectedItem ( ) ) ) , getEntity ( ) . getDataCenterId ( ) ) ; setWindow ( model ) ; initProfileNetwork ( model ) ; }

Target:
public void edit ( ) { if ( ( getWindow ( ) ) != null ) { return ; } org.ovirt.engine.ui.uicommonweb.models.profiles.EditVnicProfileModel model = new org.ovirt.engine.ui.uicommonweb.models.profiles.EditVnicProfileModel ( this , getEntity ( ) . getCompatibilityVersion ( ) , getSelectedItem ( ) , getEntity ( ) . getDataCenterId ( ) ) ; setWindow ( model ) ; initProfileNetwork ( model ) ; }
Source:
public void testDoFilterFromCookieNull ( ) throws java.io.IOException , javax.servlet.ServletException { org.mockito.Mockito.when ( mockRequest.getCookies ( ) ) . thenReturn ( null ) ; testFilter.doFilter ( mockRequest , mockResponse , mockChain ) ; org.mockito.Mockito.verify ( mockChain ) . doFilter ( mockRequest , mockResponse ) ; org.mockito.Mockito.verify ( mockRequest ) . setAttribute ( LocaleFilter.LOCALE , java.util.Locale.US ) ; org.mockito.Mockito.verify ( mockResponse , org.mockito.Mockito.times ( 1 ) ) . addCookie ( ( ( javax.servlet.http.Cookie ) ( org.mockito.Mockito.any ( ) ) ) ) ; }

Target:
public void testDoFilterFromCookieNull ( ) throws java.io.IOException , javax.servlet.ServletException { org.mockito.Mockito.when ( mockRequest.getCookies ( ) ) . thenReturn ( null ) ; testFilter.doFilter ( mockRequest , mockResponse , mockChain ) ; org.mockito.Mockito.verify ( mockChain ) . doFilter ( mockRequest , mockResponse ) ; org.mockito.Mockito.verify ( mockRequest ) . setAttribute ( LocaleFilter.LOCALE , java.util.Locale.US ) ; org.mockito.Mockito.verify ( mockResponse , org.mockito.Mockito.times ( 1 ) ) . addCookie ( org.mockito.Mockito.any ( ) ) ; }
Source:
private void updateBootableDiskAvailable ( ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getVmDiskList ( new org.ovirt.engine.ui.frontend.AsyncQuery ( this , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.Disk > disks = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.Disk > ) ( returnValue ) ) ; updateBootableFrom ( disks ) ; } } ) , getVm ( ) . getId ( ) ) ; }

Target:
protected void updateBootableDiskAvailable ( ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getVmDiskList ( new org.ovirt.engine.ui.frontend.AsyncQuery ( this , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.Disk > disks = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.Disk > ) ( returnValue ) ) ; updateBootableFrom ( disks ) ; } } ) , getVm ( ) . getId ( ) ) ; }
Source:
void fillDefaultScores ( java.util.List < org.ovirt.engine.core.common.businessentities.VDS > hosts , java.util.List < org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.compat.Guid , java.lang.Integer > > scores ) { for ( org.ovirt.engine.core.common.businessentities.VDS host : hosts ) { scores.add ( new org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.compat.Guid , java.lang.Integer > ( host.getId ( ) , org.ovirt.engine.core.bll.scheduling.policyunits.HostedEngineHAClusterWeightPolicyUnit.DEFAULT_WEIGHT ) ) ; } }

Target:
void fillDefaultScores ( java.util.List < org.ovirt.engine.core.common.businessentities.VDS > hosts , java.util.List < org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.compat.Guid , java.lang.Integer > > scores ) { for ( org.ovirt.engine.core.common.businessentities.VDS host : hosts ) { scores.add ( new org.ovirt.engine.core.common.utils.Pair ( host.getId ( ) , org.ovirt.engine.core.bll.scheduling.policyunits.HostedEngineHAClusterWeightPolicyUnit.DEFAULT_WEIGHT ) ) ; } }
Source:
private org.ovirt.engine.core.common.action.CloneCinderDisksParameters buildCinderChildCommandParameters ( java.util.List < org.ovirt.engine.core.common.businessentities.storage.CinderDisk > cinderDisks , org.ovirt.engine.core.compat.Guid vmSnapshotId ) { org.ovirt.engine.core.common.action.CloneCinderDisksParameters createParams = new org.ovirt.engine.core.common.action.CloneCinderDisksParameters ( cinderDisks , vmSnapshotId , diskInfoDestinationMap ) ; createParams.setParentHasTasks ( ( ! ( org.ovirt.engine.core.bll.AddVmCommand.getReturnValue ( ) . getVdsmTaskIdList ( ) . isEmpty ( ) ) ) ) ; return withRootCommandInfo ( createParams , org.ovirt.engine.core.bll.AddVmCommand.getActionType ( ) ) ; }

Target:
private org.ovirt.engine.core.common.action.CloneCinderDisksParameters buildCinderChildCommandParameters ( java.util.List < org.ovirt.engine.core.common.businessentities.storage.CinderDisk > cinderDisks , org.ovirt.engine.core.compat.Guid vmSnapshotId ) { org.ovirt.engine.core.common.action.CloneCinderDisksParameters createParams = new org.ovirt.engine.core.common.action.CloneCinderDisksParameters ( cinderDisks , vmSnapshotId , diskInfoDestinationMap ) ; return withRootCommandInfo ( createParams ) ; }
Source:
private void initSpyCommand ( ) { command = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.lsm.LiveMigrateVmDisksCommand < org.ovirt.engine.core.common.action.LiveMigrateVmDisksParameters > ( new org.ovirt.engine.core.common.action.LiveMigrateVmDisksParameters ( new java.util.ArrayList < org.ovirt.engine.core.common.action.LiveMigrateDiskParameters > ( ) , vmId ) ) ) ; org.mockito.Mockito.doReturn ( true ) . when ( command ) . isValidSpaceRequirements ( ) ; org.mockito.Mockito.doReturn ( true ) . when ( command ) . checkImagesStatus ( ) ; }

Target:
private void initSpyCommand ( ) { command = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.lsm.LiveMigrateVmDisksCommand < org.ovirt.engine.core.common.action.LiveMigrateVmDisksParameters > ( new org.ovirt.engine.core.common.action.LiveMigrateVmDisksParameters ( new java.util.ArrayList < org.ovirt.engine.core.common.action.LiveMigrateDiskParameters > ( ) , vmId ) , null ) ) ; org.mockito.Mockito.doReturn ( true ) . when ( command ) . isValidSpaceRequirements ( ) ; org.mockito.Mockito.doReturn ( true ) . when ( command ) . checkImagesStatus ( ) ; }
Source:
protected void updateConsoleDevice ( org.ovirt.engine.core.compat.Guid vmId ) { org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetConsoleDevices , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , new org.ovirt.engine.ui.frontend.AsyncQuery ( this , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { java.util.List < java.lang.String > consoleDevices = ( ( java.util.List < java.lang.String > ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ) ) ; getModel ( ) . getIsConsoleDeviceEnabled ( ) . setEntity ( ( ! ( consoleDevices.isEmpty ( ) ) ) ) ; } } ) ) ; }

Target:
protected void updateConsoleDevice ( org.ovirt.engine.core.compat.Guid vmId ) { org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetConsoleDevices , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , new org.ovirt.engine.ui.frontend.AsyncQuery ( this , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { java.util.List < java.lang.String > consoleDevices = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ; getModel ( ) . getIsConsoleDeviceEnabled ( ) . setEntity ( ( ! ( consoleDevices.isEmpty ( ) ) ) ) ; } } ) ) ; }
Source:
public static void enableHaReservationCheck ( ) { if ( org.ovirt.engine.core.common.config.Config.< java.lang.Boolean > getValue ( ConfigValues.EnableVdsLoadBalancing ) ) { org.ovirt.engine.core.bll.scheduling.SchedulingManager.log.info ( "Start HA Reservation check" ) ; java.lang.Integer interval = org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( ConfigValues.VdsHaReservationIntervalInMinutes ) ; org.ovirt.engine.core.di.Injector.get ( org.ovirt.engine.core.utils.timer.SchedulerUtilQuartzImpl.class ) . scheduleAFixedDelayJob ( org.ovirt.engine.core.bll.scheduling.SchedulingManager.instance , "performHaResevationCheck" , new java.lang.Class [ ] { } , new java.lang.Object [ ] { } , interval , interval , java.util.concurrent.TimeUnit.MINUTES ) ; org.ovirt.engine.core.bll.scheduling.SchedulingManager.log.info ( "Finished HA Reservation check" ) ; } }

Target:
public void enableHaReservationCheck ( ) { if ( org.ovirt.engine.core.common.config.Config.< java.lang.Boolean > getValue ( ConfigValues.EnableVdsLoadBalancing ) ) { org.ovirt.engine.core.bll.scheduling.SchedulingManager.log.info ( "Start HA Reservation check" ) ; java.lang.Integer interval = org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( ConfigValues.VdsHaReservationIntervalInMinutes ) ; org.ovirt.engine.core.di.Injector.get ( org.ovirt.engine.core.utils.timer.SchedulerUtilQuartzImpl.class ) . scheduleAFixedDelayJob ( this , "performHaResevationCheck" , new java.lang.Class [ ] { } , new java.lang.Object [ ] { } , interval , interval , java.util.concurrent.TimeUnit.MINUTES ) ; org.ovirt.engine.core.bll.scheduling.SchedulingManager.log.info ( "Finished HA Reservation check" ) ; } }
Source:
public java.util.ArrayList < java.lang.Integer > getLinuxOss ( ) { java.util.ArrayList < java.lang.Integer > oss = new java.util.ArrayList < > ( ) ; for ( int osId : getOsIds ( ) ) { if ( getOsFamily ( osId ) . equalsIgnoreCase ( "linux" ) ) { oss.add ( osId ) ; } } return oss ; }

Target:
public java.util.List < java.lang.Integer > getLinuxOss ( ) { java.util.List < java.lang.Integer > oss = new java.util.ArrayList < > ( ) ; for ( int osId : getOsIds ( ) ) { if ( getOsFamily ( osId ) . equalsIgnoreCase ( "linux" ) ) { oss.add ( osId ) ; } } return oss ; }
Source:
private static void updateDisksStorage ( org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain , java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > disksList ) { for ( org.ovirt.engine.core.common.businessentities.storage.DiskImage disk : disksList ) { disk.setStorageIds ( new java.util.ArrayList < org.ovirt.engine.core.compat.Guid > ( java.util.Collections.singletonList ( storageDomain.getId ( ) ) ) ) ; } org.ovirt.engine.core.bll.VmHandler.updateDiskVolumeType ( storageDomain.getStorageType ( ) , disksList.get ( 0 ) ) ; }

Target:
private static void updateDisksStorage ( org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain , java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > disksList ) { for ( org.ovirt.engine.core.common.businessentities.storage.DiskImage disk : disksList ) { disk.setStorageIds ( new java.util.ArrayList ( java.util.Collections.singletonList ( storageDomain.getId ( ) ) ) ) ; } org.ovirt.engine.core.bll.VmHandler.updateDiskVolumeType ( storageDomain.getStorageType ( ) , disksList.get ( 0 ) ) ; }
Source:
public boolean equals ( java.lang.Object obj ) { return ( ( ( ( obj != null ) && ( obj instanceof org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSessionConfiguration ) ) && ( org.ovirt.engine.core.common.utils.ObjectUtils.objectsEqual ( getId ( ) , ( ( org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSessionConfiguration ) ( obj ) ) . getId ( ) ) ) ) && ( org.ovirt.engine.core.common.utils.ObjectUtils.objectsEqual ( getKey ( ) , ( ( org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSessionConfiguration ) ( obj ) ) . getKey ( ) ) ) ) && ( org.ovirt.engine.core.common.utils.ObjectUtils.objectsEqual ( getValue ( ) , ( ( org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSessionConfiguration ) ( obj ) ) . getValue ( ) ) ) ; }

Target:
public boolean equals ( java.lang.Object obj ) { return ( ( ( obj != null ) && ( obj instanceof org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSessionConfiguration ) ) && ( org.ovirt.engine.core.common.utils.ObjectUtils.objectsEqual ( getId ( ) , ( ( org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSessionConfiguration ) ( obj ) ) . getId ( ) ) ) ) && ( super . equals ( obj ) ) ; }
Source:
public java.util.List < org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.compat.Guid , java.lang.Integer > > score ( java.util.List < org.ovirt.engine.core.common.businessentities.VDS > hosts , java.util.Map < java.lang.String , java.lang.Object > parameters ) { java.util.List < org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.compat.Guid , java.lang.Integer > > scores = new java.util.ArrayList < org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.compat.Guid , java.lang.Integer > > ( ) ; for ( org.ovirt.engine.core.common.businessentities.VDS vds : hosts ) { scores.add ( new org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.compat.Guid , java.lang.Integer > ( vds.getId ( ) , ( 100 - ( vds.getUsageCpuPercent ( ) ) ) ) ) ; } return scores ; }

Target:
public java.util.List < org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.compat.Guid , java.lang.Integer > > score ( java.util.List < org.ovirt.engine.core.common.businessentities.VDS > hosts , org.ovirt.engine.core.common.businessentities.VM vm , java.util.Map < java.lang.String , java.lang.String > parameters ) { java.util.List < org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.compat.Guid , java.lang.Integer > > scores = new java.util.ArrayList < org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.compat.Guid , java.lang.Integer > > ( ) ; for ( org.ovirt.engine.core.common.businessentities.VDS vds : hosts ) { scores.add ( new org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.compat.Guid , java.lang.Integer > ( vds.getId ( ) , ( 100 - ( vds.getUsageCpuPercent ( ) ) ) ) ) ; } return scores ; }
Source:
private boolean performStorageDomainsChecks ( org.ovirt.engine.core.common.action.LiveMigrateDiskParameters parameters ) { org.ovirt.engine.core.common.businessentities.StorageDomain sourceDomain = getImageSourceDomain ( parameters.getImageId ( ) ) ; org.ovirt.engine.core.common.businessentities.StorageDomain destDomain = getStorageDomainById ( parameters.getTargetStorageDomainId ( ) , org.ovirt.engine.core.bll.storage.lsm.LiveMigrateVmDisksCommand.getStoragePoolId ( ) ) ; return ( ( validateSourceStorageDomain ( sourceDomain ) ) && ( validateDestStorage ( destDomain ) ) ) && ( ( liveStorageMigrationSupportedBetweenDifferentStorageTypes ( ) ) || ( validateDestStorageAndSourceStorageOfSameTypes ( destDomain , sourceDomain ) ) ) ; }

Target:
private boolean performStorageDomainsChecks ( org.ovirt.engine.core.common.action.LiveMigrateDiskParameters parameters ) { org.ovirt.engine.core.common.businessentities.StorageDomain sourceDomain = getImageSourceDomain ( parameters.getImageId ( ) ) ; org.ovirt.engine.core.common.businessentities.StorageDomain destDomain = getStorageDomainById ( parameters.getTargetStorageDomainId ( ) , org.ovirt.engine.core.bll.storage.lsm.LiveMigrateVmDisksCommand.getStoragePoolId ( ) ) ; return ( validateSourceStorageDomain ( sourceDomain ) ) && ( validateDestStorage ( destDomain ) ) ; }
Source:
static java.lang.String resolveMessage ( java.lang.String message , org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase logable ) { java.lang.String returnValue = message ; if ( logable != null ) { java.util.Map < java.lang.String , java.lang.String > map = org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.getAvailableValues ( message , logable ) ; returnValue = org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.resolveMessage ( message , map ) ; } return returnValue ; }

Target:
java.lang.String resolveMessage ( java.lang.String message , org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase logable ) { java.lang.String returnValue = message ; if ( logable != null ) { java.util.Map < java.lang.String , java.lang.String > map = getAvailableValues ( message , logable ) ; returnValue = resolveMessage ( message , map ) ; } return returnValue ; }
Source:
private org.ovirt.engine.core.bll.ValidationResult validateCoherentNicIdentification ( org.ovirt.engine.core.common.businessentities.network.Bond bond ) { org.ovirt.engine.core.compat.Guid nicId = bond.getId ( ) ; java.lang.String nicName = bond.getName ( ) ; org.ovirt.engine.core.common.errors.EngineMessage message = org.ovirt.engine.core.common.errors.EngineMessage.BOND_REFERENCES_NICS_INCOHERENTLY ; return validateCoherentIdentification ( bond.getId ( ) , nicId , nicName , message , existingInterfacesMap ) ; }

Target:
private org.ovirt.engine.core.bll.ValidationResult validateCoherentNicIdentification ( org.ovirt.engine.core.common.businessentities.network.Bond bond ) { org.ovirt.engine.core.compat.Guid nicId = bond.getId ( ) ; java.lang.String nicName = bond.getName ( ) ; org.ovirt.engine.core.common.errors.EngineMessage message = org.ovirt.engine.core.common.errors.EngineMessage.BOND_REFERENCES_NICS_INCOHERENTLY ; return validateCoherentIdentification ( bond.getName ( ) , nicId , nicName , message , existingInterfacesMap ) ; }
Source:
public static void RunAction ( final org.ovirt.engine.core.common.action.VdcActionType actionType , final org.ovirt.engine.core.common.action.VdcActionParametersBase parameters , final org.ovirt.engine.ui.uicompat.IFrontendActionAsyncCallback callback , final java.lang.Object state , final boolean showErrorDialog ) { org.ovirt.engine.ui.frontend.Frontend.runActionImpl ( actionType , parameters , ( callback != null ? callback : org.ovirt.engine.ui.frontend.Frontend.NULLABLE_ASYNC_CALLBACK ) , state , showErrorDialog ) ; }

Target:
public static void RunAction ( final org.ovirt.engine.core.common.action.VdcActionType actionType , final org.ovirt.engine.core.common.action.VdcActionParametersBase parameters , final org.ovirt.engine.ui.uicompat.IFrontendActionAsyncCallback callback , final java.lang.Object state ) { org.ovirt.engine.ui.frontend.Frontend.RunAction ( actionType , parameters , ( callback != null ? callback : org.ovirt.engine.ui.frontend.Frontend.NULLABLE_ASYNC_CALLBACK ) , state , true ) ; }
Source:
public void validateFailsForDeviceAlreadyInUse ( ) { org.ovirt.engine.core.common.businessentities.gluster.StorageDevice storageDevice = getStorageDevice ( "sda" ) ; storageDevice.setCanCreateBrick ( false ) ; cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.gluster.CreateBrickCommand ( new org.ovirt.engine.core.common.action.gluster.CreateBrickParameters ( HOST_ID , "brick1" , "/gluster-bricks/brick1" , org.ovirt.engine.core.common.businessentities.RaidType.RAID0 , null , null , java.util.Collections.singletonList ( storageDevice ) ) , null ) ) ; prepareMocks ( VDSStatus.Up ) ; org.junit.Assert.assertFalse ( cmd.validate ( ) ) ; }

Target:
public void validateFailsForDeviceAlreadyInUse ( ) { org.ovirt.engine.core.common.businessentities.gluster.StorageDevice storageDevice = getStorageDevice ( "sda" ) ; storageDevice.setCanCreateBrick ( false ) ; org.mockito.Mockito.doReturn ( new org.ovirt.engine.core.common.action.gluster.CreateBrickParameters ( HOST_ID , "brick1" , "/gluster-bricks/brick1" , org.ovirt.engine.core.common.businessentities.RaidType.RAID0 , null , null , java.util.Collections.singletonList ( storageDevice ) ) ) . when ( cmd ) . getParameters ( ) ; prepareMocks ( VDSStatus.Up ) ; org.junit.Assert.assertFalse ( cmd.validate ( ) ) ; }
Source:
public org.ovirt.engine.core.common.businessentities.NetworkView mapRow ( java.sql.ResultSet rs , int rowNum ) throws java.sql.SQLException { org.ovirt.engine.core.common.businessentities.NetworkView entity = new org.ovirt.engine.core.common.businessentities.NetworkView ( ) ; entity.setNetwork ( NetworkRowMapper.instance.mapRow ( rs , rowNum ) ) ; entity.setStoragePoolName ( rs.getString ( "storage_pool_name" ) ) ; entity.setCompatabilityVersion ( new org.ovirt.engine.core.compat.Version ( rs.getString ( "compatibility_version" ) ) ) ; return entity ; }

Target:
public org.ovirt.engine.core.common.businessentities.NetworkView mapRow ( java.sql.ResultSet rs , int rowNum ) throws java.sql.SQLException { org.ovirt.engine.core.common.businessentities.NetworkView entity = super . mapRow ( rs , rowNum ) ; entity.setStoragePoolName ( rs.getString ( "storage_pool_name" ) ) ; entity.setCompatabilityVersion ( new org.ovirt.engine.core.compat.Version ( rs.getString ( "compatibility_version" ) ) ) ; return entity ; }
Source:
private void setupMock ( ) throws java.lang.Exception { commandMock = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.ClearExternalJobCommand < org.ovirt.engine.core.common.action.VdcActionParametersBase > ( parameters ) ) ; org.mockito.Mockito.when ( commandMock.getParameters ( ) ) . thenReturn ( parameters ) ; org.mockito.Mockito.doReturn ( jobDaoMock ) . when ( commandMock ) . getJobDao ( ) ; org.mockito.Mockito.when ( jobDaoMock.get ( org.ovirt.engine.core.bll.ClearExternalJobCommandTest.jobId ) ) . thenReturn ( makeTestJob ( org.ovirt.engine.core.bll.ClearExternalJobCommandTest.jobId ) ) ; org.mockito.Mockito.when ( jobDaoMock.get ( org.ovirt.engine.core.bll.ClearExternalJobCommandTest.nonExistingJobId ) ) . thenReturn ( null ) ; }

Target:
private void setupMock ( ) throws java.lang.Exception { commandMock = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.ClearExternalJobCommand ( parameters ) ) ; org.mockito.Mockito.when ( commandMock.getParameters ( ) ) . thenReturn ( parameters ) ; org.mockito.Mockito.doReturn ( jobDaoMock ) . when ( commandMock ) . getJobDao ( ) ; org.mockito.Mockito.when ( jobDaoMock.get ( org.ovirt.engine.core.bll.ClearExternalJobCommandTest.jobId ) ) . thenReturn ( makeTestJob ( org.ovirt.engine.core.bll.ClearExternalJobCommandTest.jobId ) ) ; org.mockito.Mockito.when ( jobDaoMock.get ( org.ovirt.engine.core.bll.ClearExternalJobCommandTest.nonExistingJobId ) ) . thenReturn ( null ) ; }
Source:
public org.ovirt.engine.core.aaa.DirectoryUser findUser ( java.lang.String name ) { org.ovirt.engine.extensions.aaa.builtin.kerberosldap.LdapReturnValueBase ldapResult = broker.runAdAction ( AdActionType.GetAdUserByUserName , new org.ovirt.engine.extensions.aaa.builtin.kerberosldap.LdapSearchByUserNameParameters ( null , getProfileName ( ) , name ) ) ; org.ovirt.engine.core.common.businessentities.LdapUser ldapUser = ( ( org.ovirt.engine.core.common.businessentities.LdapUser ) ( ldapResult.getReturnValue ( ) ) ) ; if ( ldapUser == null ) { return null ; } return mapUser ( ldapUser ) ; }

Target:
public org.ovirt.engine.core.aaa.DirectoryUser findUser ( java.lang.String name ) { org.ovirt.engine.extensions.aaa.builtin.kerberosldap.LdapReturnValueBase ldapResult = broker.runAdAction ( AdActionType.GetAdUserByUserName , new org.ovirt.engine.extensions.aaa.builtin.kerberosldap.LdapSearchByUserNameParameters ( null , getName ( ) , name ) ) ; org.ovirt.engine.core.common.businessentities.LdapUser ldapUser = ( ( org.ovirt.engine.core.common.businessentities.LdapUser ) ( ldapResult.getReturnValue ( ) ) ) ; if ( ldapUser == null ) { return null ; } return mapUser ( ldapUser ) ; }
Source:
public void testGetNotFound ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpGetEntityExpectations ( 1 , true , getEntity ( 0 ) ) ; control.replay ( ) ; try { resource.get ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }

Target:
public void testGetNotFound ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpGetEntityExpectations ( 1 , true , getEntity ( 0 ) ) ; try { resource.get ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }
Source:
public java.util.List < org.ovirt.engine.core.compat.Guid > getOrderedVmGuidsForRunMultipleActions ( java.util.List < org.ovirt.engine.core.compat.Guid > guids ) { java.lang.StringBuilder guidsSb = new java.lang.StringBuilder ( ) ; guidsSb.append ( "'" ) . append ( org.apache.commons.lang.StringUtils.join ( guids , "','" ) ) . append ( "'" ) ; org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "vm_guids" , guidsSb.toString ( ) ) ; return getCallsHandler ( ) . executeReadList ( "GetOrderedVmGuidsForRunMultipleActions" , createGuidMapper ( ) , getCustomMapSqlParameterSource ( ) . addValue ( "vm_guids" , guidsSb.toString ( ) ) ) ; }

Target:
public java.util.List < org.ovirt.engine.core.compat.Guid > getOrderedVmGuidsForRunMultipleActions ( java.util.List < org.ovirt.engine.core.compat.Guid > guids ) { java.lang.StringBuilder guidsSb = new java.lang.StringBuilder ( ) ; guidsSb.append ( "'" ) . append ( org.apache.commons.lang.StringUtils.join ( guids , "','" ) ) . append ( "'" ) ; return getCallsHandler ( ) . executeReadList ( "GetOrderedVmGuidsForRunMultipleActions" , createGuidMapper ( ) , getCustomMapSqlParameterSource ( ) . addValue ( "vm_guids" , guidsSb.toString ( ) ) ) ; }
Source:
private org.ovirt.engine.core.compat.Guid pickProxyHostFromDataCenter ( ) { org.ovirt.engine.core.compat.Guid dataCenterId = ( ( org.ovirt.engine.core.bll.GetVmsFromExternalProviderQuery.getParameters ( ) . getDataCenterId ( ) ) == null ) ? getRandomDataCenter ( ) : org.ovirt.engine.core.bll.GetVmsFromExternalProviderQuery.getParameters ( ) . getDataCenterId ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VDS > vdss = org.ovirt.engine.core.bll.GetVmsFromExternalProviderQuery.getVdsDao ( ) . getAllForStoragePoolAndStatus ( dataCenterId , VDSStatus.Up ) ; if ( vdss.isEmpty ( ) ) { logNoProxyAvailable ( org.ovirt.engine.core.bll.GetVmsFromExternalProviderQuery.getParameters ( ) . getDataCenterId ( ) ) ; throw new java.lang.IllegalArgumentException ( ) ; } return vdss.get ( 0 ) . getId ( ) ; }

Target:
private org.ovirt.engine.core.compat.Guid pickProxyHostFromDataCenter ( ) { org.ovirt.engine.core.compat.Guid dataCenterId = org.ovirt.engine.core.bll.GetVmsFromExternalProviderQuery.getParameters ( ) . getDataCenterId ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VDS > vdss = org.ovirt.engine.core.bll.GetVmsFromExternalProviderQuery.getVdsDao ( ) . getAllForStoragePoolAndStatus ( dataCenterId , VDSStatus.Up ) ; if ( vdss.isEmpty ( ) ) { logNoProxyAvailable ( dataCenterId ) ; throw new java.lang.IllegalArgumentException ( ) ; } return vdss.get ( 0 ) . getId ( ) ; }
Source:
public java.util.List < org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.compat.Guid , java.lang.Integer > > score ( java.util.List < org.ovirt.engine.core.common.businessentities.VDS > hosts , org.ovirt.engine.core.common.businessentities.VM vm , java.util.Map < java.lang.String , java.lang.String > parameters ) { java.util.List < org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.compat.Guid , java.lang.Integer > > list = new java.util.ArrayList < org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.compat.Guid , java.lang.Integer > > ( ) ; for ( org.ovirt.engine.core.common.businessentities.VDS host : hosts ) { list.add ( new org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.compat.Guid , java.lang.Integer > ( host.getId ( ) , 1 ) ) ; } return list ; }

Target:
public java.util.List < org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.compat.Guid , java.lang.Integer > > score ( java.util.List < org.ovirt.engine.core.common.businessentities.VDS > hosts , org.ovirt.engine.core.common.businessentities.VM vm , java.util.Map < java.lang.String , java.lang.String > parameters ) { return super . score ( hosts , vm , parameters ) ; }
Source:
protected boolean canDoAction ( ) { org.ovirt.engine.core.bll.network.cluster.DetachNetworkFromClusterInternalCommand < T > . DetachNetworkValidator validator = new DetachNetworkValidator ( vmDao , getNetwork ( ) , org.ovirt.engine.core.bll.network.cluster.DetachNetworkFromClusterInternalCommand.getParameters ( ) . getNetworkCluster ( ) ) ; return ( ( ( validate ( validator.notManagementNetwork ( ) ) ) && ( validate ( validator.clusterNetworkNotUsedByVms ( ) ) ) ) && ( validate ( validator.clusterNetworkNotUsedByTemplates ( ) ) ) ) && ( validate ( validator.clusterNetworkNotUsedByBricks ( ) ) ) ; }

Target:
protected boolean validate ( ) { org.ovirt.engine.core.bll.network.cluster.DetachNetworkFromClusterInternalCommand < T > . DetachNetworkValidator validator = new DetachNetworkValidator ( vmDao , getNetwork ( ) , org.ovirt.engine.core.bll.network.cluster.DetachNetworkFromClusterInternalCommand.getParameters ( ) . getNetworkCluster ( ) ) ; return ( ( ( validate ( validator.notManagementNetwork ( ) ) ) && ( validate ( validator.clusterNetworkNotUsedByVms ( ) ) ) ) && ( validate ( validator.clusterNetworkNotUsedByTemplates ( ) ) ) ) && ( validate ( validator.clusterNetworkNotUsedByBricks ( ) ) ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { context.host = ( ( org.ovirt.engine.core.common.businessentities.VDS ) ( returnValue ) ) ; timer = new com.google.gwt.user.client.Timer ( ) { @ java.lang.Override public void run ( ) { prepare4 ( ) ; } } ; timer.scheduleRepeating ( org.ovirt.engine.ui.uicommonweb.models.hosts.AddStorageDomainRM.WaitInterval ) ; }

Target:
public void onSuccess ( org.ovirt.engine.core.common.businessentities.VDS returnValue ) { context.host = returnValue ; timer = new com.google.gwt.user.client.Timer ( ) { @ java.lang.Override public void run ( ) { prepare4 ( ) ; } } ; timer.scheduleRepeating ( org.ovirt.engine.ui.uicommonweb.models.hosts.AddStorageDomainRM.WaitInterval ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.VmTemplate getTemplateByName ( org.ovirt.engine.api.model.VM vm ) { return isFiltered ( ) ? lookupTemplateByName ( vm.getTemplate ( ) . getName ( ) ) : getEntity ( org.ovirt.engine.core.common.businessentities.VmTemplate.class , SearchType.VmTemplate , ( "Template: name=" + ( vm.getTemplate ( ) . getName ( ) ) ) ) ; }

Target:
private org.ovirt.engine.core.common.businessentities.VmTemplate getTemplateByName ( org.ovirt.engine.api.model.VM vm ) { return lookupTemplateByName ( vm.getTemplate ( ) . getName ( ) ) ; }
Source:
public void testRemoveWithoutParam ( ) { container.SetData ( org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_SESSION_ID , org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_KEY , org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_VALUE ) ; container.removeSession ( ) ; org.junit.Assert.assertEquals ( "Get should return the value since the session was not removed" , org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_VALUE , container.GetData ( org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_SESSION_ID , org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_KEY ) ) ; org.ovirt.engine.core.utils.ThreadLocalParamsContainer.setHttpSessionId ( org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_SESSION_ID ) ; container.removeSession ( ) ; org.junit.Assert.assertNull ( "Get should return the value since the session was removed" , container.GetData ( org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_SESSION_ID , org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_KEY ) ) ; }

Target:
public void testRemoveWithoutParam ( ) { container.SetData ( org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_SESSION_ID , org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_KEY , org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_VALUE ) ; container.removeSession ( ) ; org.junit.Assert.assertEquals ( "Get should return the value since the session was not removed" , org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_VALUE , container.GetData ( org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_SESSION_ID , org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_KEY , false ) ) ; org.ovirt.engine.core.utils.ThreadLocalParamsContainer.setHttpSessionId ( org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_SESSION_ID ) ; container.removeSession ( ) ; org.junit.Assert.assertNull ( "Get should return the value since the session was removed" , container.GetData ( org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_SESSION_ID , org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_KEY , false ) ) ; }
Source:
public void initializeCache ( ) { if ( ! ( cacheInitialized ) ) { synchronized ( LOCK ) { if ( ! ( cacheInitialized ) ) { java.util.List < org.ovirt.engine.core.common.businessentities.CommandEntity > cmdEntities = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getCommandEntityDao ( ) . getAll ( ) ; for ( org.ovirt.engine.core.common.businessentities.CommandEntity cmdEntity : cmdEntities ) { commandMap.put ( cmdEntity.getId ( ) , cmdEntity ) ; } cacheInitialized = true ; } } } }

Target:
private void initializeCache ( ) { if ( ! ( cacheInitialized ) ) { synchronized ( LOCK ) { if ( ! ( cacheInitialized ) ) { java.util.List < org.ovirt.engine.core.common.businessentities.CommandEntity > cmdEntities = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getCommandEntityDao ( ) . getAll ( ) ; for ( org.ovirt.engine.core.common.businessentities.CommandEntity cmdEntity : cmdEntities ) { commandMap.put ( cmdEntity.getId ( ) , cmdEntity ) ; } cacheInitialized = true ; } } } }
Source:
private void mockOsRepository ( ) { org.ovirt.engine.core.common.osinfo.OsRepository mockOsRepository = org.mockito.Mockito.mock ( org.ovirt.engine.core.common.osinfo.OsRepository.class ) ; org.mockito.Mockito.when ( mockOsRepository.getUniqueOsNames ( ) ) . thenReturn ( new java.util.HashMap < > ( ) ) ; org.ovirt.engine.core.common.utils.SimpleDependencyInjector.getInstance ( ) . bind ( org.ovirt.engine.core.common.osinfo.OsRepository.class , mockOsRepository ) ; }

Target:
private void mockOsRepository ( ) { org.ovirt.engine.core.common.osinfo.OsRepository mockOsRepository = org.mockito.Mockito.mock ( org.ovirt.engine.core.common.osinfo.OsRepository.class ) ; org.ovirt.engine.core.common.utils.SimpleDependencyInjector.getInstance ( ) . bind ( org.ovirt.engine.core.common.osinfo.OsRepository.class , mockOsRepository ) ; }
Source:
private static org.ovirt.engine.core.common.businessentities.VmDevice createDiskVmDevice ( final org.ovirt.engine.core.common.businessentities.DiskImage diskImage ) { final org.ovirt.engine.core.common.businessentities.VmDevice vmDevice = new org.ovirt.engine.core.common.businessentities.VmDevice ( ) ; vmDevice.setIsPlugged ( true ) ; vmDevice.setId ( new org.ovirt.engine.core.common.businessentities.VmDeviceId ( diskImage.getimage_group_id ( ) , org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ) ; return vmDevice ; }

Target:
private static org.ovirt.engine.core.common.businessentities.VmDevice createDiskVmDevice ( final org.ovirt.engine.core.common.businessentities.DiskImage diskImage ) { final org.ovirt.engine.core.common.businessentities.VmDevice vmDevice = new org.ovirt.engine.core.common.businessentities.VmDevice ( ) ; vmDevice.setIsPlugged ( true ) ; vmDevice.setId ( new org.ovirt.engine.core.common.businessentities.VmDeviceId ( diskImage.getId ( ) , org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ) ; return vmDevice ; }
Source:
protected boolean isVmNotInPreviewSnapshot ( ) { final org.ovirt.engine.core.bll.snapshots.SnapshotsValidator snapshotsValidator = getSnapshotsValidator ( ) ; return ( ( ( org.ovirt.engine.core.bll.storage.disk.AbstractDiskVmCommand.getVmId ( ) ) != null ) && ( validate ( snapshotsValidator.vmNotDuringSnapshot ( org.ovirt.engine.core.bll.storage.disk.AbstractDiskVmCommand.getVmId ( ) ) ) ) ) && ( validate ( snapshotsValidator.vmNotInPreview ( org.ovirt.engine.core.bll.storage.disk.AbstractDiskVmCommand.getVmId ( ) ) ) ) ; }

Target:
protected boolean isVmNotInPreviewSnapshot ( ) { return ( ( ( org.ovirt.engine.core.bll.storage.disk.AbstractDiskVmCommand.getVmId ( ) ) != null ) && ( validate ( snapshotsValidator.vmNotDuringSnapshot ( org.ovirt.engine.core.bll.storage.disk.AbstractDiskVmCommand.getVmId ( ) ) ) ) ) && ( validate ( snapshotsValidator.vmNotInPreview ( org.ovirt.engine.core.bll.storage.disk.AbstractDiskVmCommand.getVmId ( ) ) ) ) ; }
Source:
public void render ( com.google.gwt.cell.client.Cell.Context context , C value , com.google.gwt.safehtml.shared.SafeHtmlBuilder sb ) { sb.append ( getTemplate ( ) . id ( org.ovirt.engine.ui.common.utils.ElementIdUtils.createTableCellElementId ( org.ovirt.engine.ui.common.widget.table.cell.StatusCompositeCellWithElementId.getElementIdPrefix ( ) , org.ovirt.engine.ui.common.widget.table.cell.StatusCompositeCellWithElementId.getColumnId ( ) , context ) ) ) ; for ( com.google.gwt.cell.client.HasCell < C , ? > hasCell : hasCells ) { render ( context , value , sb , hasCell ) ; } sb.appendHtmlConstant ( "</div>" ) ; }

Target:
public void render ( com.google.gwt.cell.client.Cell.Context context , C value , com.google.gwt.safehtml.shared.SafeHtmlBuilder sb , java.lang.String id ) { sb.append ( getTemplate ( ) . id ( id ) ) ; for ( com.google.gwt.cell.client.HasCell < C , ? > hasCell : hasCells ) { render ( context , value , sb , hasCell ) ; } sb.appendHtmlConstant ( "</div>" ) ; }
Source:
public void testGetRootDSENoServers ( ) throws java.lang.Exception { java.util.List < java.net.URI > urls = new java.util.ArrayList < java.net.URI > ( ) ; org.ovirt.engine.core.bll.adbroker.DirectorySearcher dirSearcher = mockDirectorySearcher ( urls ) ; try { org.ovirt.engine.core.bll.adbroker.GetRootDSETask getRootDSETask = new org.ovirt.engine.core.bll.adbroker.GetRootDSETask ( dirSearcher , "mydomain" , null ) ; org.ovirt.engine.core.bll.adbroker.DirectorySearcherTest.execute ( getRootDSETask ) ; } catch ( java.lang.Exception e ) { return ; } org.junit.Assert.fail ( "Task didn't exited with error" ) ; }

Target:
public void testGetRootDSENoServers ( ) throws java.lang.Exception { java.util.List < java.net.URI > urls = new java.util.ArrayList < java.net.URI > ( ) ; org.ovirt.engine.core.bll.adbroker.DirectorySearcher dirSearcher = mockDirectorySearcher ( urls ) ; org.ovirt.engine.core.bll.adbroker.GetRootDSETask getRootDSETask = new org.ovirt.engine.core.bll.adbroker.GetRootDSETask ( dirSearcher , "mydomain" , null ) ; org.ovirt.engine.core.bll.adbroker.DirectorySearcherTest.execute ( getRootDSETask ) ; }
Source:
public void testChangeCdNotFound ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpEntityQueryExpectations ( null ) ; control.replay ( ) ; try { resource.update ( getCdrom ( org.ovirt.engine.api.restapi.resource.BackendVmCdromResourceTest.B_ISO ) ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }

Target:
public void testChangeCdNotFound ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpEntityQueryExpectations ( null ) ; try { resource.update ( getCdrom ( org.ovirt.engine.api.restapi.resource.BackendVmCdromResourceTest.B_ISO ) ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }
Source:
public void eventRaised ( org.ovirt.engine.core.compat.Event ev , java.lang.Object sender , org.ovirt.engine.core.compat.EventArgs args ) { if ( args instanceof org.ovirt.engine.core.compat.PropertyChangedEventArgs ) { org.ovirt.engine.core.compat.PropertyChangedEventArgs changedArgs = ( ( org.ovirt.engine.core.compat.PropertyChangedEventArgs ) ( args ) ) ; if ( "DataCenterName" . equals ( changedArgs.PropertyName ) ) { ( ( org.ovirt.engine.ui.webadmin.section.main.presenter.popup.cluster.NewClusterNetworkPopupPresenterWidget.ViewDef ) ( getView ( ) ) ) . setDataCenterName ( ( ( org.ovirt.engine.core.common.businessentities.storage_pool ) ( model.getDataCenters ( ) . getSelectedItem ( ) ) ) . getname ( ) ) ; } } }

Target:
public void eventRaised ( org.ovirt.engine.core.compat.Event ev , java.lang.Object sender , org.ovirt.engine.core.compat.EventArgs args ) { ( ( org.ovirt.engine.ui.webadmin.section.main.presenter.popup.cluster.NewClusterNetworkPopupPresenterWidget.ViewDef ) ( getView ( ) ) ) . setDataCenterName ( ( ( org.ovirt.engine.core.common.businessentities.storage_pool ) ( model.getDataCenters ( ) . getSelectedItem ( ) ) ) . getname ( ) ) ; }
Source:
public static void GetStorageDomainById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storageDomainId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( org.ovirt.engine.core.common.businessentities.storage_domains ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetStorageDomainById , new org.ovirt.engine.core.common.queries.StorageDomainQueryParametersBase ( storageDomainId ) , aQuery ) ; }

Target:
public static void GetStorageDomainById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storageDomainId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( org.ovirt.engine.core.common.businessentities.StorageDomain ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetStorageDomainById , new org.ovirt.engine.core.common.queries.StorageDomainQueryParametersBase ( storageDomainId ) , aQuery ) ; }
Source:
public static org.ovirt.engine.ui.uicommonweb.models.SystemTreeItemModel findAncestor ( org.ovirt.engine.ui.uicommonweb.models.SystemTreeItemType type , org.ovirt.engine.ui.uicommonweb.models.SystemTreeItemModel root ) { if ( ( root.getType ( ) ) != type ) { if ( ( root.getParent ( ) ) != null ) { return org.ovirt.engine.ui.uicommonweb.models.SystemTreeItemModel.findAncestor ( type , root.getParent ( ) ) ; } return null ; } return root ; }

Target:
public static org.ovirt.engine.ui.uicommonweb.models.SystemTreeItemModel findAncestor ( org.ovirt.engine.ui.uicommonweb.models.SystemTreeItemType type , org.ovirt.engine.ui.uicommonweb.models.SystemTreeItemModel root ) { if ( ( root != null ) && ( ( root.getType ( ) ) != type ) ) { if ( ( root.getParent ( ) ) != null ) { return org.ovirt.engine.ui.uicommonweb.models.SystemTreeItemModel.findAncestor ( type , root.getParent ( ) ) ; } return null ; } return root ; }
Source:
public void testNoDiskBootFromIsoDomain ( ) { org.ovirt.engine.core.bll.IsoDomainListSyncronizer mock = mockIsoDomainListSyncronizer ( ) ; org.mockito.Mockito.doReturn ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) . when ( mock ) . findActiveISODomain ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ; org.ovirt.engine.core.bll.validator.RunVmValidatorTest.validateResult ( runVmValidator.validateBootSequence ( new org.ovirt.engine.core.common.businessentities.VM ( ) , BootSequence.CD , new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ( ) ) , true , null ) ; }

Target:
public void testNoDiskBootFromIsoDomain ( ) { org.ovirt.engine.core.bll.validator.RunVmValidatorTest.validateResult ( runVmValidator.validateBootSequence ( new org.ovirt.engine.core.common.businessentities.VM ( ) , BootSequence.CD , new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ( ) , org.ovirt.engine.core.compat.Guid.newGuid ( ) ) , true , null ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { final org.ovirt.engine.core.common.queries.VdcQueryReturnValue queryReturnValue = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) ; if ( ! ( queryReturnValue.getSucceeded ( ) ) ) { final org.ovirt.engine.ui.uicommonweb.ErrorPopupManager popupManager = ( ( org.ovirt.engine.ui.uicommonweb.ErrorPopupManager ) ( org.ovirt.engine.ui.uicommonweb.TypeResolver.getInstance ( ) . resolve ( org.ovirt.engine.ui.uicommonweb.ErrorPopupManager.class ) ) ) ; popupManager.show ( queryReturnValue.getExceptionMessage ( ) ) ; return ; } onRealSuccessCallback.onSuccess ( model , returnValue ) ; }

Target:
public void onSuccess ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue returnValue ) { if ( ! ( returnValue.getSucceeded ( ) ) ) { final org.ovirt.engine.ui.uicommonweb.ErrorPopupManager popupManager = ( ( org.ovirt.engine.ui.uicommonweb.ErrorPopupManager ) ( org.ovirt.engine.ui.uicommonweb.TypeResolver.getInstance ( ) . resolve ( org.ovirt.engine.ui.uicommonweb.ErrorPopupManager.class ) ) ) ; popupManager.show ( returnValue.getExceptionMessage ( ) ) ; return ; } onRealSuccessCallback.onSuccess ( returnValue ) ; }