auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > getPermissionCheckSubjects ( ) { java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > permissionList = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.core.common.action.LiveMigrateDiskParameters parameters : getParameters ( ) . getParametersList ( ) ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage diskImage = getDiskImageDao ( ) . get ( parameters.getImageId ( ) ) ; if ( diskImage != null ) { permissionList.add ( new org.ovirt.engine.core.bll.utils.PermissionSubject ( diskImage.getId ( ) , org.ovirt.engine.core.common.VdcObjectType.Disk , org.ovirt.engine.core.common.businessentities.ActionGroup.DISK_LIVE_STORAGE_MIGRATION ) ) ; } } return permissionList ; }

Target:
public java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > getPermissionCheckSubjects ( ) { java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > permissionList = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.core.common.action.LiveMigrateDiskParameters parameters : getParameters ( ) . getParametersList ( ) ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage diskImage = org.ovirt.engine.core.bll.storage.lsm.LiveMigrateVmDisksCommand.getDiskImageDao ( ) . get ( parameters.getImageId ( ) ) ; if ( diskImage != null ) { permissionList.add ( new org.ovirt.engine.core.bll.utils.PermissionSubject ( diskImage.getId ( ) , org.ovirt.engine.core.common.VdcObjectType.Disk , org.ovirt.engine.core.common.businessentities.ActionGroup.DISK_LIVE_STORAGE_MIGRATION ) ) ; } } return permissionList ; }
Source:
private org.ovirt.engine.core.bll.RunVmCommand < org.ovirt.engine.core.common.action.RunVmParams > createCommand ( ) { org.ovirt.engine.core.common.action.RunVmParams param = new org.ovirt.engine.core.common.action.RunVmParams ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; command = new org.ovirt.engine.core.bll.RunVmCommand < org.ovirt.engine.core.common.action.RunVmParams > ( param ) ; return org.powermock.api.mockito.PowerMockito.spy ( command ) ; }

Target:
private org.ovirt.engine.core.common.businessentities.VM createVmForTesting ( java.lang.String initrd , java.lang.String kernel ) { mockVm ( command ) ; org.ovirt.engine.core.common.action.RunVmParams runVmParams = command.getParameters ( ) ; runVmParams.setinitrd_url ( initrd ) ; runVmParams.setkernel_url ( kernel ) ; command.CreateVm ( ) ; org.ovirt.engine.core.common.businessentities.VM vm = vmDAO.get ( command.getParameters ( ) . getVmId ( ) ) ; return vm ; }
Source:
public static void addDiskToVm ( org.ovirt.engine.core.common.businessentities.BaseDisk disk , org.ovirt.engine.core.compat.Guid vmId ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getBaseDiskDao ( ) . save ( disk ) ; org.ovirt.engine.core.bll.utils.VmDeviceUtils.addManagedDevice ( new org.ovirt.engine.core.common.businessentities.VmDeviceId ( disk.getId ( ) , vmId ) , VmDeviceGeneralType.DISK , VmDeviceType.DISK , null , true , false , null ) ; }

Target:
public static void addDiskToVm ( org.ovirt.engine.core.common.businessentities.storage.BaseDisk disk , org.ovirt.engine.core.compat.Guid vmId ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getBaseDiskDao ( ) . save ( disk ) ; org.ovirt.engine.core.bll.utils.VmDeviceUtils.addManagedDevice ( new org.ovirt.engine.core.common.businessentities.VmDeviceId ( disk.getId ( ) , vmId ) , VmDeviceGeneralType.DISK , VmDeviceType.DISK , null , true , false , null , false ) ; }
Source:
protected void endSuccessfully ( ) { setVmTemplateId ( org.ovirt.engine.core.bll.AddVmTemplateCommand.getParameters ( ) . getVmTemplateId ( ) ) ; for ( org.ovirt.engine.core.common.action.VdcActionParametersBase p : org.ovirt.engine.core.bll.AddVmTemplateCommand.getParameters ( ) . getImagesParameters ( ) ) { org.ovirt.engine.core.bll.Backend.getInstance ( ) . EndAction ( VdcActionType.CreateImageTemplate , p ) ; } if ( ( reloadVmTemplateFromDB ( ) ) != null ) { endDefaultOperations ( ) ; } org.ovirt.engine.core.bll.AddVmTemplateCommand.setSucceeded ( true ) ; }

Target:
protected void endSuccessfully ( ) { setVmTemplateId ( org.ovirt.engine.core.bll.AddVmTemplateCommand.getParameters ( ) . getVmTemplateId ( ) ) ; setVmId ( getVmIdFromImageParameters ( ) ) ; for ( org.ovirt.engine.core.common.action.VdcActionParametersBase p : org.ovirt.engine.core.bll.AddVmTemplateCommand.getParameters ( ) . getImagesParameters ( ) ) { org.ovirt.engine.core.bll.Backend.getInstance ( ) . EndAction ( VdcActionType.CreateImageTemplate , p ) ; } if ( ( reloadVmTemplateFromDB ( ) ) != null ) { endDefaultOperations ( ) ; } org.ovirt.engine.core.bll.AddVmTemplateCommand.setSucceeded ( true ) ; }
Source:
private void updateHostIP ( org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeTaskStatusEntity taskStatus ) { for ( org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeTaskStatusForHost hostStatus : taskStatus.getHostwiseStatusDetails ( ) ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterServer glusterServer = getGlusterServerDao ( ) . getByGlusterServerUuid ( hostStatus.getHostUuid ( ) ) ; if ( glusterServer != null ) { org.ovirt.engine.core.common.businessentities.VDS host = org.ovirt.engine.core.bll.gluster.GetGlusterVolumeRemoveBricksStatusQuery.getVdsDao ( ) . get ( glusterServer.getId ( ) ) ; if ( host != null ) { hostStatus.setHostName ( host.getName ( ) ) ; } } } }

Target:
private void updateHostIP ( org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeTaskStatusEntity taskStatus ) { for ( org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeTaskStatusForHost hostStatus : taskStatus.getHostwiseStatusDetails ( ) ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterServer glusterServer = getGlusterServerDao ( ) . getByGlusterServerUuid ( hostStatus.getHostUuid ( ) ) ; if ( glusterServer != null ) { org.ovirt.engine.core.common.businessentities.VDS host = org.ovirt.engine.core.bll.gluster.GetGlusterVolumeRemoveBricksStatusQuery.getVdsDao ( ) . get ( glusterServer.getId ( ) ) ; if ( host != null ) { hostStatus.setHostName ( host.getName ( ) ) ; hostStatus.setHostId ( host.getId ( ) ) ; } } } }
Source:
public static void getAllDataCenterNetworks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId ) { 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.network.Network > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.Network > ( ) ; } } ; org.ovirt.engine.core.common.queries.IdQueryParameters params = new org.ovirt.engine.core.common.queries.IdQueryParameters ( storagePoolId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetNetworksByDataCenterId , params , aQuery ) ; }

Target:
public static void getRedirectServletReportsPage ( 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.lang.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.RedirectServletReportsPage , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
protected org.ovirt.engine.core.common.businessentities.Cluster setUpClusterExpectations ( org.ovirt.engine.core.compat.Guid id ) { org.ovirt.engine.core.common.businessentities.Cluster group = org.mockito.Mockito.mock ( org.ovirt.engine.core.common.businessentities.Cluster.class ) ; org.mockito.Mockito.when ( group.getId ( ) ) . thenReturn ( id ) ; setUpEntityQueryExpectations ( VdcQueryType.GetClusterByClusterId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { id } , group ) ; return group ; }

Target:
protected org.ovirt.engine.core.common.businessentities.Cluster setUpClusterExpectations ( org.ovirt.engine.core.compat.Guid id ) { org.ovirt.engine.core.common.businessentities.Cluster group = org.mockito.Mockito.mock ( org.ovirt.engine.core.common.businessentities.Cluster.class ) ; org.mockito.Mockito.when ( group.getId ( ) ) . thenReturn ( id ) ; setUpEntityQueryExpectations ( VdcQueryType.GetClusterById , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { id } , group ) ; return group ; }
Source:
public static void getVmGuestAgentInterfacesByVmId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId ) { 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.VmGuestAgentInterface > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmGuestAgentInterfacesByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }

Target:
public static void getNumberOfVmsInCluster ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetNumberOfVmsInVdsGroupByVdsGroupId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( clusterId ) , aQuery ) ; }
Source:
public static void getExternalProviderDiscoveredHostList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.businessentities.Provider provider ) { 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.ExternalDiscoveredHost > ( ) ; } return source ; } } ; org.ovirt.engine.core.common.queries.ProviderQueryParameters params = new org.ovirt.engine.core.common.queries.ProviderQueryParameters ( ) ; params.setProvider ( provider ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetDiscoveredHostListFromExternalProvider , params , aQuery ) ; }

Target:
private static void getVlanParentInterface ( org.ovirt.engine.core.compat.Guid vdsID , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface , 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 ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVlanParent , new org.ovirt.engine.core.common.queries.InterfaceAndIdQueryParameters ( vdsID , iface ) , aQuery ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.StorageDomain prepareStorageDomainForElection ( org.ovirt.engine.core.common.businessentities.StorageDomainStatus status , java.lang.String name ) { final org.ovirt.engine.core.common.businessentities.StorageDomain domain = createDataStorageDomain ( status , name ) ; org.mockito.Mockito.doReturn ( storageDomainDao ) . when ( cmd ) . getStorageDomainDao ( ) ; org.mockito.Mockito.when ( storageDomainDao.getAllForStoragePool ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( java.util.Arrays.asList ( domain ) ) ; cmd.setStoragePool ( new org.ovirt.engine.core.common.businessentities.StoragePool ( ) ) ; return domain ; }

Target:
private org.ovirt.engine.core.common.businessentities.StorageDomain prepareStorageDomainForElection ( org.ovirt.engine.core.common.businessentities.StorageDomainStatus status , java.lang.String name ) { final org.ovirt.engine.core.common.businessentities.StorageDomain domain = createDataStorageDomain ( status , name , HE_SD_ID ) ; org.mockito.Mockito.doReturn ( storageDomainDao ) . when ( cmd ) . getStorageDomainDao ( ) ; org.mockito.Mockito.when ( storageDomainDao.getAllForStoragePool ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( java.util.Arrays.asList ( domain ) ) ; cmd.setStoragePool ( new org.ovirt.engine.core.common.businessentities.StoragePool ( ) ) ; return domain ; }
Source:
public void testValidate ( ) { org.mockito.Mockito.when ( vdsDaoMock.get ( org.ovirt.engine.core.bll.hostdeploy.UpdateVdsCommandTest.HOST_ID ) ) . thenReturn ( oldHost ) ; org.mockito.Mockito.when ( fenceAgentDao.getFenceAgentsForHost ( org.ovirt.engine.core.bll.hostdeploy.UpdateVdsCommandTest.HOST_ID ) ) . thenReturn ( new java.util.ArrayList ( ) ) ; org.junit.Assert.assertTrue ( underTestCommand.validate ( ) ) ; }

Target:
public void testValidate ( ) { org.mockito.Mockito.when ( vdsDaoMock.get ( org.ovirt.engine.core.bll.hostdeploy.UpdateVdsCommandTest.HOST_ID ) ) . thenReturn ( oldHost ) ; org.mockito.Mockito.when ( fenceAgentDao.getFenceAgentsForHost ( org.ovirt.engine.core.bll.hostdeploy.UpdateVdsCommandTest.HOST_ID ) ) . thenReturn ( new java.util.ArrayList ( ) ) ; org.junit.jupiter.api.Assertions.assertTrue ( underTestCommand.validate ( ) ) ; }
Source:
protected void executeCommand ( ) { final org.ovirt.engine.core.compat.Guid providerId = org.ovirt.engine.core.bll.provider.RemoveProviderCommand.getParameters ( ) . getProvider ( ) . getId ( ) ; org.ovirt.engine.core.bll.provider.ProviderProxy providerProxy = org.ovirt.engine.core.bll.provider.ProviderProxyFactory.getInstance ( ) . create ( org.ovirt.engine.core.bll.provider.RemoveProviderCommand.getParameters ( ) . getProvider ( ) ) ; if ( providerProxy != null ) { providerProxy.onRemoval ( ) ; } org.ovirt.engine.core.bll.provider.RemoveProviderCommand.getProviderDao ( ) . remove ( providerId ) ; org.ovirt.engine.core.bll.provider.RemoveProviderCommand.setSucceeded ( true ) ; }

Target:
public org.ovirt.engine.core.bll.provider.ProviderProxy getProviderProxy ( ) { if ( ( providerProxy ) == null ) { providerProxy = org.ovirt.engine.core.bll.provider.ProviderProxyFactory.getInstance ( ) . create ( org.ovirt.engine.core.bll.provider.RemoveProviderCommand.getParameters ( ) . getProvider ( ) ) ; } return providerProxy ; }
Source:
public void save ( org.ovirt.engine.core.common.businessentities.Bookmark bookmark ) { org.ovirt.engine.core.compat.Guid id = bookmark.getbookmark_id ( ) ; if ( org.ovirt.engine.core.compat.Guid.isNullOrEmpty ( id ) ) { id = org.ovirt.engine.core.compat.Guid.NewGuid ( ) ; bookmark.setbookmark_id ( id ) ; } org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = new org.ovirt.engine.core.dao.BookmarkDAODbFacadeImpl.BookmarkSqlParameterSource ( bookmark ) ; getCallsHandler ( ) . executeModification ( "InsertBookmark" , parameterSource ) ; }

Target:
public void save ( org.ovirt.engine.core.common.businessentities.Bookmark bookmark ) { org.ovirt.engine.core.compat.Guid id = bookmark.getbookmark_id ( ) ; if ( org.ovirt.engine.core.compat.Guid.isNullOrEmpty ( id ) ) { id = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; bookmark.setbookmark_id ( id ) ; } org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = new org.ovirt.engine.core.dao.BookmarkDAODbFacadeImpl.BookmarkSqlParameterSource ( bookmark ) ; getCallsHandler ( ) . executeModification ( "InsertBookmark" , parameterSource ) ; }
Source:
public static 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.storage_pool > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.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 static void GetPoolById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid poolId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmPoolById , new org.ovirt.engine.core.common.queries.GetVmPoolByIdParameters ( poolId ) , aQuery ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.diskHotpluggableInterfacesMap = ( ( java.util.Map < org.ovirt.engine.core.common.utils.Pair < java.lang.Integer , org.ovirt.engine.core.compat.Version > , java.util.Set < java.lang.String > > ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ) ) ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { defaultOSes = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeGeoRepStatusDetailForXmlRpc glusterVolumeGeoRepSessionStatus ( java.lang.String volumeName , java.lang.String slaveHost , java.lang.String slaveVolumeName ) { try { java.util.Map < java.lang.String , java.lang.Object > response = vdsServer.glusterVolumeGeoRepSessionStatus ( volumeName , slaveHost , slaveVolumeName ) ; return new org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeGeoRepStatusDetailForXmlRpc ( response ) ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }

Target:
public org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeGeoRepStatusForXmlRpc glusterVolumeGeoRepSessionList ( java.lang.String volumeName , java.lang.String slaveHost , java.lang.String slaveVolumeName , java.lang.String userName ) { try { java.util.Map < java.lang.String , java.lang.Object > response ; response = vdsServer.glusterVolumeGeoRepSessionList ( volumeName , slaveHost , slaveVolumeName , userName ) ; return new org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeGeoRepStatusForXmlRpc ( response ) ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
public void getPermittedStorageDomainsByStoragePoolId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId , org.ovirt.engine.core.common.businessentities.ActionGroup actionGroup ) { 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.StorageDomain > ( ) ; } return source ; } } ; org.ovirt.engine.core.common.queries.GetPermittedStorageDomainsByStoragePoolIdParameters params = new org.ovirt.engine.core.common.queries.GetPermittedStorageDomainsByStoragePoolIdParameters ( ) ; params.setStoragePoolId ( dataCenterId ) ; params.setActionGroup ( actionGroup ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetPermittedStorageDomainsByStoragePoolId , params , aQuery ) ; }

Target:
public void getPermittedStorageDomainsByStoragePoolId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId , org.ovirt.engine.core.common.businessentities.ActionGroup actionGroup ) { 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.StorageDomain > ( ) ; } return source ; } } ; org.ovirt.engine.core.common.queries.GetPermittedStorageDomainsByStoragePoolIdParameters params = new org.ovirt.engine.core.common.queries.GetPermittedStorageDomainsByStoragePoolIdParameters ( ) ; params.setStoragePoolId ( dataCenterId ) ; params.setActionGroup ( actionGroup ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetPermittedStorageDomainsByStoragePoolId , params , aQuery ) ; }
Source:
private void mockDaos ( boolean pluggedInterface ) { org.ovirt.engine.core.common.businessentities.VM vm = org.ovirt.engine.core.bll.network.FindActiveVmsUsingNetworkTest.createVM ( org.ovirt.engine.core.bll.network.FindActiveVmsUsingNetworkTest.VM_NAME , org.ovirt.engine.core.bll.network.FindActiveVmsUsingNetworkTest.NETWORK_NAME , pluggedInterface ) ; org.mockito.Mockito.when ( vmDao.getAllRunningForVds ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( java.util.Collections.singletonList ( vm ) ) ; org.mockito.Mockito.when ( vmNetworkInterfaceDao.getAllForVm ( vm.getId ( ) ) ) . thenReturn ( vm.getInterfaces ( ) ) ; }

Target:
private void mockDaos ( boolean pluggedInterface ) { org.ovirt.engine.core.common.businessentities.VM vm = org.ovirt.engine.core.bll.network.FindActiveVmsUsingNetworkTest.createVM ( org.ovirt.engine.core.bll.network.FindActiveVmsUsingNetworkTest.VM_NAME , org.ovirt.engine.core.bll.network.FindActiveVmsUsingNetworkTest.NETWORK_NAME , pluggedInterface ) ; org.mockito.Mockito.when ( vmDao.getAllRunningForVds ( org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( java.util.Collections.singletonList ( vm ) ) ; org.mockito.Mockito.when ( vmNetworkInterfaceDao.getAllForVm ( vm.getId ( ) ) ) . thenReturn ( vm.getInterfaces ( ) ) ; }
Source:
protected boolean connectToStorage ( ) { org.ovirt.engine.core.common.vdscommands.StorageServerConnectionManagementVDSParameters newConnectionParametersForVdsm = createParametersForVdsm ( org.ovirt.engine.core.bll.storage.UpdateStorageServerConnectionCommand.getParameters ( ) . getVdsId ( ) , Guid.Empty , org.ovirt.engine.core.bll.storage.UpdateStorageServerConnectionCommand.getParameters ( ) . getStorageServerConnection ( ) . getstorage_type ( ) , org.ovirt.engine.core.bll.storage.UpdateStorageServerConnectionCommand.getParameters ( ) . getStorageServerConnection ( ) ) ; return runVdsCommand ( VDSCommandType.ConnectStorageServer , newConnectionParametersForVdsm ) . getSucceeded ( ) ; }

Target:
protected boolean connectToStorage ( ) { org.ovirt.engine.core.common.utils.Pair < java.lang.Boolean , java.lang.Integer > result = org.ovirt.engine.core.bll.storage.UpdateStorageServerConnectionCommand.connectHostToStorage ( ) ; return result.getFirst ( ) ; }
Source:
protected void doChangeDefautlHost ( org.ovirt.engine.core.compat.Guid hostGuid ) { if ( hostGuid != null ) { org.ovirt.engine.core.common.businessentities.VDS vds = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; vds.setId ( hostGuid ) ; getModel ( ) . getDefaultHost ( ) . setItems ( java.util.Arrays.asList ( vds ) ) ; } super . doChangeDefautlHost ( hostGuid ) ; }

Target:
protected void doChangeDefaultHost ( java.util.List < org.ovirt.engine.core.compat.Guid > hostGuids ) { if ( ( hostGuids != null ) && ( ( hostGuids.size ( ) ) == 1 ) ) { org.ovirt.engine.core.common.businessentities.VDS vds = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; vds.setId ( hostGuids.get ( 0 ) ) ; getModel ( ) . getDefaultHost ( ) . setItems ( java.util.Arrays.asList ( vds ) ) ; } super . doChangeDefaultHost ( hostGuids ) ; }
Source:
protected void onEntityChanged ( ) { super . onEntityChanged ( ) ; if ( ( getEntity ( ) ) != null ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity glusterVolumeEntity = ( ( org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity ) ( getEntity ( ) ) ) ; setItems ( glusterVolumeEntity.getBricks ( ) ) ; } else { setItems ( null ) ; } }

Target:
protected void syncSearch ( ) { if ( ( getEntity ( ) ) != null ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity glusterVolumeEntity = ( ( org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity ) ( getEntity ( ) ) ) ; if ( ( getItems ( ) ) == ( glusterVolumeEntity.getBricks ( ) ) ) { getItemsChangedEvent ( ) . raise ( this , EventArgs.Empty ) ; } else { setItems ( glusterVolumeEntity.getBricks ( ) ) ; } } else { setItems ( null ) ; } }
Source:
private void initAppsTable ( ) { appsTable = new org.ovirt.engine.ui.common.widget.editor.EntityModelCellTable < org.ovirt.engine.ui.uicommonweb.models.ListModel > ( false , true ) ; org.ovirt.engine.ui.common.widget.table.column.AbstractTextColumn < java.lang.String > appNameColumn = new org.ovirt.engine.ui.common.widget.table.column.AbstractTextColumn < java.lang.String > ( ) { @ java.lang.Override public java.lang.String getValue ( java.lang.String appName ) { return appName ; } } ; appsTable.addColumn ( appNameColumn , constants.nameSnapshot ( ) ) ; appsTable.setRowData ( new java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.EntityModel > ( ) ) ; appsTable.setWidth ( "100%" , true ) ; appsTable.setSelectionModel ( new com.google.gwt.view.client.NoSelectionModel ( ) ) ; }

Target:
private void initAppsTable ( ) { appsTable = new org.ovirt.engine.ui.common.widget.editor.EntityModelCellTable < org.ovirt.engine.ui.uicommonweb.models.ListModel > ( false , true ) ; org.ovirt.engine.ui.common.widget.table.column.AbstractTextColumn < java.lang.String > appNameColumn = new org.ovirt.engine.ui.common.widget.table.column.AbstractTextColumn < java.lang.String > ( ) { @ java.lang.Override public java.lang.String getValue ( java.lang.String appName ) { return appName ; } } ; appsTable.addColumn ( appNameColumn , org.ovirt.engine.ui.common.widget.uicommon.vm.VmSnapshotInfoPanel.constants.nameSnapshot ( ) ) ; appsTable.setRowData ( new java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.EntityModel > ( ) ) ; appsTable.setWidth ( "100%" , true ) ; appsTable.setSelectionModel ( new com.google.gwt.view.client.NoSelectionModel ( ) ) ; }
Source:
public void setUp ( ) { org.mockito.Mockito.doReturn ( storageDomainStaticDao ) . when ( command ) . getStorageDomainStaticDao ( ) ; org.mockito.Mockito.doNothing ( ) . when ( command ) . addStorageDomainInDb ( ) ; org.mockito.Mockito.doNothing ( ) . when ( command ) . updateStorageDomainDynamicFromIrs ( ) ; org.mockito.Mockito.doNothing ( ) . when ( command ) . saveLUNsInDB ( org.mockito.Matchers.anyListOf ( org.ovirt.engine.core.common.businessentities.storage.LUNs.class ) ) ; }

Target:
public void testAlreadyExistStorageDomain ( ) { org.mockito.Mockito.when ( storageDomainStaticDao.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( org.ovirt.engine.core.bll.storage.domain.AddExistingBlockStorageDomainCommandTest.getStorageDomain ( ) ) ; org.junit.Assert.assertFalse ( "Storage Domain already exists" , command.canAddDomain ( ) ) ; org.junit.Assert.assertTrue ( "Import block Storage Domain should have failed due to already existing Storage Domain" , command.getReturnValue ( ) . getValidationMessages ( ) . contains ( EngineMessage.ACTION_TYPE_FAILED_STORAGE_DOMAIN_ALREADY_EXIST.toString ( ) ) ) ; }
Source:
private void validateNicForNotRemovingLabeledNetworks ( java.lang.String network , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic ) { org.ovirt.engine.core.common.businessentities.network.Network removedNetwork = getExistingClusterNetworks ( ) . get ( network ) ; if ( ( ( org.ovirt.engine.core.utils.NetworkUtils.isLabeled ( nic ) ) && ( removedNetwork != null ) ) && ( nic.getLabels ( ) . contains ( removedNetwork.getLabel ( ) ) ) ) { addViolation ( VdcBllMessages.ACTION_TYPE_FAILED_CANNOT_REMOVE_LABELED_NETWORK_FROM_NIC , network ) ; } }

Target:
private void validateNicForNotRemovingLabeledNetworks ( java.lang.String network , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic ) { org.ovirt.engine.core.common.businessentities.network.Network removedNetwork = getExistingClusterNetworks ( ) . get ( network ) ; if ( ( ( org.ovirt.engine.core.utils.NetworkUtils.isLabeled ( nic ) ) && ( removedNetwork != null ) ) && ( nic.getLabels ( ) . contains ( removedNetwork.getLabel ( ) ) ) ) { addViolation ( EngineMessage.ACTION_TYPE_FAILED_CANNOT_REMOVE_LABELED_NETWORK_FROM_NIC , network ) ; } }
Source:
public void testCleanExpiredSessionsWithRunningCommands ( ) { org.mockito.Mockito.when ( ssoSessionUtils.isSessionInUse ( org.mockito.ArgumentMatchers.anyLong ( ) ) ) . thenReturn ( true ) ; initDataForClearTest ( org.ovirt.engine.core.bll.aaa.SessionDataContainerTest.TEST_KEY ) ; container.cleanExpiredUsersSessions ( ) ; org.junit.Assert.assertNotNull ( "Get found the session" , container.getData ( org.ovirt.engine.core.bll.aaa.SessionDataContainerTest.TEST_SESSION_ID , org.ovirt.engine.core.bll.aaa.SessionDataContainerTest.TEST_KEY , false ) ) ; }

Target:
public void testCleanExpiredSessionsWithRunningCommands ( ) { org.mockito.Mockito.when ( ssoSessionUtils.isSessionInUse ( org.mockito.ArgumentMatchers.anyLong ( ) ) ) . thenReturn ( true ) ; initDataForClearTest ( org.ovirt.engine.core.bll.aaa.SessionDataContainerTest.TEST_KEY ) ; container.cleanExpiredUsersSessions ( ) ; org.junit.jupiter.api.Assertions.assertNotNull ( container.getData ( org.ovirt.engine.core.bll.aaa.SessionDataContainerTest.TEST_SESSION_ID , org.ovirt.engine.core.bll.aaa.SessionDataContainerTest.TEST_KEY , false ) , "Get found the session" ) ; }
Source:
public static org.ovirt.engine.ui.common.widget.table.column.AbstractTextColumnWithTooltip < org.ovirt.engine.core.common.businessentities.Disk > getAliasColumn ( java.lang.String sortBy ) { org.ovirt.engine.ui.common.widget.table.column.AbstractTextColumnWithTooltip < org.ovirt.engine.core.common.businessentities.Disk > column = new org.ovirt.engine.ui.common.widget.table.column.AbstractTextColumnWithTooltip < org.ovirt.engine.core.common.businessentities.Disk > ( ) { @ java.lang.Override public java.lang.String getValue ( org.ovirt.engine.core.common.businessentities.Disk object ) { return object.getDiskAlias ( ) ; } } ; return org.ovirt.engine.ui.common.widget.uicommon.disks.DisksViewColumns.makeSortable ( column , sortBy ) ; }

Target:
public static org.ovirt.engine.ui.common.widget.table.column.AbstractTextColumn < org.ovirt.engine.core.common.businessentities.storage.Disk > getAliasColumn ( java.lang.String sortBy ) { org.ovirt.engine.ui.common.widget.table.column.AbstractTextColumn < org.ovirt.engine.core.common.businessentities.storage.Disk > column = new org.ovirt.engine.ui.common.widget.table.column.AbstractTextColumn < org.ovirt.engine.core.common.businessentities.storage.Disk > ( ) { @ java.lang.Override public java.lang.String getValue ( org.ovirt.engine.core.common.businessentities.storage.Disk object ) { return object.getDiskAlias ( ) ; } } ; return org.ovirt.engine.ui.common.widget.uicommon.disks.DisksViewColumns.makeSortable ( column , sortBy ) ; }
Source:
protected void endWithFailure ( ) { if ( ! ( org.ovirt.engine.core.bll.storage.disk.cinder.RestoreAllCinderSnapshotsCommand.getParameters ( ) . isParentHasTasks ( ) ) ) { org.ovirt.engine.core.bll.storage.disk.cinder.RestoreAllCinderSnapshotsCommand.getParameters ( ) . getParentParameters ( ) . setTaskGroupSuccess ( false ) ; org.ovirt.engine.core.bll.storage.disk.cinder.RestoreAllCinderSnapshotsCommand.getBackend ( ) . endAction ( org.ovirt.engine.core.bll.storage.disk.cinder.RestoreAllCinderSnapshotsCommand.getParameters ( ) . getParentCommand ( ) , org.ovirt.engine.core.bll.storage.disk.cinder.RestoreAllCinderSnapshotsCommand.getParameters ( ) . getParentParameters ( ) , org.ovirt.engine.core.bll.storage.disk.cinder.RestoreAllCinderSnapshotsCommand.cloneContextAndDetachFromParent ( ) ) ; } org.ovirt.engine.core.bll.storage.disk.cinder.RestoreAllCinderSnapshotsCommand.setSucceeded ( true ) ; }

Target:
private org.ovirt.engine.core.common.action.ImagesContainterParametersBase getRestoreFromSnapshotParams ( org.ovirt.engine.core.common.businessentities.storage.CinderDisk cinderDisk ) { org.ovirt.engine.core.common.action.RemoveCinderDiskParameters params = new org.ovirt.engine.core.common.action.RemoveCinderDiskParameters ( cinderDisk.getImageId ( ) ) ; params.setRemovedVolume ( cinderDisk ) ; params.setParentCommand ( org.ovirt.engine.core.bll.storage.disk.cinder.RestoreAllCinderSnapshotsCommand.getActionType ( ) ) ; params.setStorageDomainId ( cinderDisk.getStorageIds ( ) . get ( 0 ) ) ; params.setParentParameters ( org.ovirt.engine.core.bll.storage.disk.cinder.RestoreAllCinderSnapshotsCommand.getParameters ( ) ) ; return params ; }
Source:
protected java.util.Map < java.lang.String , org.ovirt.engine.core.common.businessentities.VmHostDevice > getExistingVmHostDevicesByName ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > existingDevices = org.ovirt.engine.core.bll.hostdev.AbstractVmHostDevicesCommand.getVmDeviceDao ( ) . getVmDeviceByVmIdAndType ( org.ovirt.engine.core.bll.hostdev.AbstractVmHostDevicesCommand.getVmId ( ) , VmDeviceGeneralType.HOSTDEV ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VmHostDevice > result = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.VmDevice device : existingDevices ) { result.add ( new org.ovirt.engine.core.common.businessentities.VmHostDevice ( device ) ) ; } return org.ovirt.engine.core.bll.hostdev.AbstractVmHostDevicesCommand.getVmDeviceUtils ( ) . vmDevicesByDevice ( result ) ; }

Target:
protected java.util.Map < java.lang.String , org.ovirt.engine.core.common.businessentities.VmHostDevice > getExistingVmHostDevicesByName ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > existingDevices = vmDeviceDao.getVmDeviceByVmIdAndType ( org.ovirt.engine.core.bll.hostdev.AbstractVmHostDevicesCommand.getVmId ( ) , VmDeviceGeneralType.HOSTDEV ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VmHostDevice > result = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.VmDevice device : existingDevices ) { result.add ( new org.ovirt.engine.core.common.businessentities.VmHostDevice ( device ) ) ; } return org.ovirt.engine.core.bll.hostdev.AbstractVmHostDevicesCommand.getVmDeviceUtils ( ) . vmDevicesByDevice ( result ) ; }
Source:
public static void getVmConfigurationBySnapshot ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid snapshotSourceId ) { 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.VM ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmConfigurationBySnapshot , new org.ovirt.engine.core.common.queries.IdQueryParameters ( snapshotSourceId ) . withoutRefresh ( ) , aQuery ) ; }

Target:
public static void getStorageConnectionsByDataCenterIdAndStorageType ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.common.businessentities.StorageType storageType ) { 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.core.common.queries.GetConnectionsByDataCenterAndStorageTypeParameters params = new org.ovirt.engine.core.common.queries.GetConnectionsByDataCenterAndStorageTypeParameters ( storagePoolId , storageType ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetConnectionsByDataCenterAndStorageType , params , aQuery ) ; }
Source:
protected boolean canDoAction ( ) { boolean returnValue = true ; if ( ( ( org.ovirt.engine.core.bll.RemoveTagCommand.getTagId ( ) ) == null ) || ( ( org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getTagDao ( ) . get ( org.ovirt.engine.core.bll.RemoveTagCommand.getTagId ( ) ) ) == null ) ) { addCanDoActionMessage ( EngineMessage.TAGS_CANNOT_REMOVE_TAG_NOT_EXIST ) ; returnValue = false ; } return returnValue ; }

Target:
protected boolean validate ( ) { boolean returnValue = true ; if ( ( ( org.ovirt.engine.core.bll.RemoveTagCommand.getTagId ( ) ) == null ) || ( ( org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getTagDao ( ) . get ( org.ovirt.engine.core.bll.RemoveTagCommand.getTagId ( ) ) ) == null ) ) { addValidationMessage ( EngineMessage.TAGS_CANNOT_REMOVE_TAG_NOT_EXIST ) ; returnValue = false ; } return returnValue ; }
Source:
public void removeNetworkFromParameters ( org.ovirt.engine.core.common.action.PersistentSetupNetworksParameters params , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic , org.ovirt.engine.core.common.businessentities.network.Network net ) { if ( org.ovirt.engine.core.utils.NetworkUtils.isVlan ( net ) ) { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface vlan = getVlanDevice ( params.getInterfaces ( ) , nic , net ) ; if ( vlan == null ) { throw new org.ovirt.engine.core.common.errors.EngineException ( org.ovirt.engine.core.common.errors.EngineError.NETWORK_LABEL_CONFLICT ) ; } else { params.getInterfaces ( ) . remove ( vlan ) ; } } else if ( org.apache.commons.lang.StringUtils.equals ( net.getName ( ) , nic.getNetworkName ( ) ) ) { nic.setNetworkName ( null ) ; } }

Target:
private boolean isHostContainLabel ( java.lang.String label ) { for ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic : org.ovirt.engine.core.bll.ChangeVDSClusterCommand.ChangeClusterParametersBuilder.getNics ( ) ) { if ( ( org.ovirt.engine.core.utils.NetworkUtils.isLabeled ( nic ) ) && ( nic.getLabels ( ) . contains ( label ) ) ) { return true ; } } return false ; }
Source:
private void updateNumaPinning ( org.ovirt.engine.core.common.businessentities.VmNumaNode vmNumaNode , int index ) { if ( ( vmNumaNode.getNumaNodeVdsList ( ) ) == null ) { vmNumaNode.setNumaNodeVdsList ( new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.NumaNodeVmVds > ( ) ) ; } }

Target:
private void updateNumaPinning ( org.ovirt.engine.core.common.businessentities.VmNumaNode vmNumaNode , int index ) { if ( ( vmNumaNode.getVdsNumaNodeList ( ) ) == null ) { vmNumaNode.setVdsNumaNodeList ( new java.util.ArrayList < 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 > > > ( ) ) ; 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 > > pair = new 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 > > ( ) ; pair.setSecond ( new org.ovirt.engine.core.common.utils.Pair < java.lang.Boolean , java.lang.Integer > ( false , index ) ) ; } }
Source:
protected void bindCommonIntegration ( ) { bind ( org.ovirt.engine.ui.uicommonweb.ITypeResolver.class ) . to ( org.ovirt.engine.ui.common.uicommon.UiCommonDefaultTypeResolver.class ) . asEagerSingleton ( ) ; bind ( org.ovirt.engine.ui.common.uicommon.FrontendEventsHandlerImpl.class ) . in ( com.google.inject.Singleton.class ) ; bind ( org.ovirt.engine.ui.common.uicommon.FrontendFailureEventListener.class ) . in ( com.google.inject.Singleton.class ) ; bind ( org.ovirt.engine.ui.uicommonweb.ILogger.class ) . to ( org.ovirt.engine.ui.common.uicommon.LoggerImpl.class ) . in ( com.google.inject.Singleton.class ) ; bindConsoles ( ) ; }

Target:
protected void bindCommonIntegration ( ) { bind ( org.ovirt.engine.ui.uicommonweb.ITypeResolver.class ) . to ( org.ovirt.engine.ui.common.uicommon.UiCommonDefaultTypeResolver.class ) . asEagerSingleton ( ) ; bind ( org.ovirt.engine.ui.common.uicommon.FrontendEventsHandlerImpl.class ) . in ( com.google.inject.Singleton.class ) ; bind ( org.ovirt.engine.ui.common.uicommon.FrontendFailureEventListener.class ) . in ( com.google.inject.Singleton.class ) ; bind ( org.ovirt.engine.ui.uicommonweb.ILogger.class ) . to ( org.ovirt.engine.ui.common.uicommon.LoggerImpl.class ) . in ( com.google.inject.Singleton.class ) ; bind ( org.ovirt.engine.ui.uicommonweb.models.OptionsModel.class ) . in ( com.google.inject.Singleton.class ) ; bindCommonModelProviders ( ) ; bindConsoles ( ) ; }
Source:
private void doTestBadUpdate ( boolean valid , boolean success , java.lang.String detail ) { setUpGetEntityExpectations ( 1 ) ; setUriInfo ( setUpActionExpectations ( ActionType.UpdateProvider , org.ovirt.engine.core.common.action.ProviderParameters.class , new java.lang.String [ ] { "Provider.Id" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , valid , success ) ) ; try { resource.update ( getModel ( 0 ) ) ; org.junit.Assert.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }

Target:
private void doTestBadUpdate ( boolean valid , boolean success , java.lang.String detail ) { setUpGetEntityExpectations ( 1 ) ; setUriInfo ( setUpActionExpectations ( ActionType.UpdateProvider , org.ovirt.engine.core.common.action.ProviderParameters.class , new java.lang.String [ ] { "Provider.Id" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , valid , success ) ) ; try { resource.update ( getModel ( 0 ) ) ; org.junit.jupiter.api.Assertions.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }
Source:
public void setZeroValue ( ) { percentageBarA.setVisible ( true ) ; percentageBarA.setTitle ( title ) ; percentageBarA.setStyleName ( style.empty ( ) ) ; percentageBarA.setWidth ( ( ( org.ovirt.engine.ui.userportal.widget.DoublePercentageProgressBar.FULL_WIDTH ) + "%" ) ) ; percentageLabelA.setText ( org.ovirt.engine.ui.userportal.widget.DoublePercentageProgressBar.ZERO ) ; percentageLabelA.setStyleName ( style.percentageLabelBlack ( ) ) ; }

Target:
public void setZeroValue ( ) { percentageBarB.setVisible ( false ) ; percentageBarB.setWidth ( "0px" ) ; percentageBarA.setVisible ( true ) ; percentageBarA.setTitle ( title ) ; percentageBarA.setStyleName ( style.empty ( ) ) ; percentageBarA.setWidth ( ( ( org.ovirt.engine.ui.userportal.widget.DoublePercentageProgressBar.FULL_WIDTH ) + "%" ) ) ; percentageLabelA.setText ( org.ovirt.engine.ui.userportal.widget.DoublePercentageProgressBar.ZERO ) ; percentageLabelA.setStyleName ( style.percentageLabelBlack ( ) ) ; }
Source:
public void testIsFileDomain ( ) { org.junit.Assert.assertFalse ( StorageType.FCP.isFileDomain ( ) ) ; org.junit.Assert.assertFalse ( StorageType.ISCSI.isFileDomain ( ) ) ; org.junit.Assert.assertTrue ( StorageType.NFS.isFileDomain ( ) ) ; org.junit.Assert.assertTrue ( StorageType.LOCALFS.isFileDomain ( ) ) ; org.junit.Assert.assertTrue ( StorageType.POSIXFS.isFileDomain ( ) ) ; org.junit.Assert.assertTrue ( StorageType.GLUSTERFS.isFileDomain ( ) ) ; org.junit.Assert.assertTrue ( StorageType.GLANCE.isFileDomain ( ) ) ; org.junit.Assert.assertFalse ( StorageType.CINDER.isFileDomain ( ) ) ; }

Target:
public void testIsFileDomain ( ) { org.junit.jupiter.api.Assertions.assertFalse ( StorageType.FCP.isFileDomain ( ) ) ; org.junit.jupiter.api.Assertions.assertFalse ( StorageType.ISCSI.isFileDomain ( ) ) ; org.junit.jupiter.api.Assertions.assertTrue ( StorageType.NFS.isFileDomain ( ) ) ; org.junit.jupiter.api.Assertions.assertTrue ( StorageType.LOCALFS.isFileDomain ( ) ) ; org.junit.jupiter.api.Assertions.assertTrue ( StorageType.POSIXFS.isFileDomain ( ) ) ; org.junit.jupiter.api.Assertions.assertTrue ( StorageType.GLUSTERFS.isFileDomain ( ) ) ; org.junit.jupiter.api.Assertions.assertTrue ( StorageType.GLANCE.isFileDomain ( ) ) ; org.junit.jupiter.api.Assertions.assertFalse ( StorageType.CINDER.isFileDomain ( ) ) ; }
Source:
public static void getClusterNetworkList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { if ( ( aQuery.converterCallback ) == null ) { 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.network.Network > ( ) ; } return source ; } } ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllNetworksByClusterId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( clusterId ) , aQuery ) ; }

Target:
public static void countAllTemplates ( 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 ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmTemplateCount , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }
Source:
public org.ovirt.engine.sdk.entities.Action export ( org.ovirt.engine.sdk.entities.Action action ) throws java.io.IOException , org.apache.http.client.ClientProtocolException , org.ovirt.engine.sdk.exceptions.ServerException { java.lang.String url = ( this . getHref ( ) ) + "/export" ; java.util.List < org.apache.http.Header > headers = new org.ovirt.engine.sdk.utils.HttpHeaderBuilder ( ) . build ( ) ; url = new org.ovirt.engine.sdk.utils.UrlBuilder ( url ) . build ( ) ; return getProxy ( ) . action ( url , action , org.ovirt.engine.sdk.entities.Action.class , org.ovirt.engine.sdk.entities.Action.class , headers ) ; }

Target:
public org.ovirt.engine.sdk.entities.Action exportVm ( org.ovirt.engine.sdk.entities.Action action ) throws java.io.IOException , org.apache.http.client.ClientProtocolException , org.ovirt.engine.sdk.exceptions.ServerException { java.lang.String url = ( this . getHref ( ) ) + "/export" ; java.util.List < org.apache.http.Header > headers = new org.ovirt.engine.sdk.utils.HttpHeaderBuilder ( ) . build ( ) ; url = new org.ovirt.engine.sdk.utils.UrlBuilder ( url ) . build ( ) ; return getProxy ( ) . action ( url , action , org.ovirt.engine.sdk.entities.Action.class , org.ovirt.engine.sdk.entities.Action.class , headers ) ; }
Source:
public void makeSortable ( ) { makeSortable ( new java.util.Comparator < T > ( ) { @ java.lang.Override public int compare ( T object1 , T object2 ) { java.lang.Long val1 = getRawValue ( object1 ) ; java.lang.Long val2 = getRawValue ( object2 ) ; if ( val1 == null ) { return val2 == null ? 0 : - 1 ; } else if ( val2 == null ) { return 1 ; } return val1.compareTo ( val2 ) ; } } ) ; }

Target:
public void makeSortable ( ) { makeSortable ( java.util.Comparator.nullsFirst ( java.util.Comparator.comparing ( this :: getRawValue ) ) ) ; }