auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public com.google.gwt.safehtml.shared.SafeHtml getTooltip ( org.ovirt.engine.core.common.businessentities.network.NetworkView networkView ) { java.util.Map < com.google.gwt.safehtml.shared.SafeHtml , java.lang.String > imagesToText = new java.util.LinkedHashMap < > ( ) ; if ( networkView.isVmNetwork ( ) ) { imagesToText.put ( vmImage , org.ovirt.engine.ui.webadmin.section.main.view.tab.MainTabNetworkView.constants.vmItemInfo ( ) ) ; } return org.ovirt.engine.ui.webadmin.widget.table.column.NetworkRoleColumnHelper.getTooltip ( imagesToText ) ; }

Target:
public com.google.gwt.safehtml.shared.SafeHtml getTooltip ( org.ovirt.engine.core.common.businessentities.network.NetworkView networkView ) { java.util.Map < com.google.gwt.safehtml.shared.SafeHtml , java.lang.String > imagesToText = new java.util.LinkedHashMap < > ( ) ; if ( networkView.isVmNetwork ( ) ) { imagesToText.put ( vmImage , org.ovirt.engine.ui.webadmin.section.main.view.tab.MainTabNetworkView.constants.vmItemInfo ( ) ) ; } return org.ovirt.engine.ui.webadmin.widget.table.column.MultiImageColumnHelper.getTooltip ( imagesToText ) ; }
Source:
public void testNetworkNotChangedWhenDifferentNetworkIds ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.NetworkAttachment oldAttachment = new org.ovirt.engine.core.common.businessentities.network.NetworkAttachment ( ) ; oldAttachment.setNetworkId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment = new org.ovirt.engine.core.common.businessentities.network.NetworkAttachment ( ) ; attachment.setNetworkId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; org.junit.Assert.assertThat ( createNetworkAttachmentValidator ( attachment ) . networkNotChanged ( oldAttachment ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.CANNOT_CHANGE_ATTACHED_NETWORK ) ) ; }

Target:
public void testNetworkNotChangedWhenDifferentNetworkIds ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.NetworkAttachment oldAttachment = new org.ovirt.engine.core.common.businessentities.network.NetworkAttachment ( ) ; oldAttachment.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; oldAttachment.setNetworkId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment = new org.ovirt.engine.core.common.businessentities.network.NetworkAttachment ( ) ; attachment.setNetworkId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; org.junit.Assert.assertThat ( createNetworkAttachmentValidator ( attachment ) . networkNotChanged ( oldAttachment ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.CANNOT_CHANGE_ATTACHED_NETWORK , org.ovirt.engine.core.utils.ReplacementUtils.createSetVariableString ( NetworkAttachmentValidator.VAR_NETWORK_ATTACHMENT_ID , oldAttachment.getId ( ) ) ) ) ; }
Source:
protected void InitDetailModels ( ) { super . InitDetailModels ( ) ; org.ovirt.engine.core.compat.ObservableCollection < org.ovirt.engine.ui.uicommonweb.models.EntityModel > list = new org.ovirt.engine.core.compat.ObservableCollection < org.ovirt.engine.ui.uicommonweb.models.EntityModel > ( ) ; list.add ( new org.ovirt.engine.ui.uicommonweb.models.templates.TemplateGeneralModel ( ) ) ; list.add ( new org.ovirt.engine.ui.uicommonweb.models.templates.TemplateVmListModel ( ) ) ; list.add ( new org.ovirt.engine.ui.uicommonweb.models.templates.TemplateInterfaceListModel ( ) ) ; list.add ( new org.ovirt.engine.ui.uicommonweb.models.templates.TemplateStorageListModel ( ) ) ; addCustomModelsDetailModelList ( list ) ; setDetailModels ( list ) ; }

Target:
protected void InitDetailModels ( ) { super . InitDetailModels ( ) ; org.ovirt.engine.ui.uicompat.ObservableCollection < org.ovirt.engine.ui.uicommonweb.models.EntityModel > list = new org.ovirt.engine.ui.uicompat.ObservableCollection < org.ovirt.engine.ui.uicommonweb.models.EntityModel > ( ) ; list.add ( new org.ovirt.engine.ui.uicommonweb.models.templates.TemplateGeneralModel ( ) ) ; list.add ( new org.ovirt.engine.ui.uicommonweb.models.templates.TemplateVmListModel ( ) ) ; list.add ( new org.ovirt.engine.ui.uicommonweb.models.templates.TemplateInterfaceListModel ( ) ) ; list.add ( new org.ovirt.engine.ui.uicommonweb.models.templates.TemplateStorageListModel ( ) ) ; addCustomModelsDetailModelList ( list ) ; setDetailModels ( list ) ; }
Source:
private org.ovirt.engine.core.common.action.RemoveSnapshotSingleDiskLiveStep getInitialMergeStepForImage ( org.ovirt.engine.core.compat.Guid imageId ) { org.ovirt.engine.core.common.businessentities.storage.Image image = org.ovirt.engine.core.bll.RemoveSnapshotSingleDiskLiveCommand.getImageDao ( ) . get ( imageId ) ; if ( ( ( image.getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.storage.ImageStatus.ILLEGAL ) ) && ( image.getParentId ( ) . equals ( Guid.Empty ) ) ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > children = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getDiskImageDao ( ) . getAllSnapshotsForParent ( imageId ) ; if ( children.isEmpty ( ) ) { org.ovirt.engine.core.bll.RemoveSnapshotSingleDiskLiveCommand.log.info ( "Image has been previously merged, proceeding with deletion" ) ; return org.ovirt.engine.core.common.action.RemoveSnapshotSingleDiskLiveStep.DESTROY_IMAGE ; } } return org.ovirt.engine.core.common.action.RemoveSnapshotSingleDiskLiveStep.MERGE ; }

Target:
private org.ovirt.engine.core.common.action.RemoveSnapshotSingleDiskLiveStep getInitialMergeStepForImage ( org.ovirt.engine.core.compat.Guid imageId ) { org.ovirt.engine.core.common.businessentities.storage.Image image = org.ovirt.engine.core.bll.RemoveSnapshotSingleDiskLiveCommand.getImageDao ( ) . get ( imageId ) ; if ( ( ( image.getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.storage.ImageStatus.ILLEGAL ) ) && ( image.getParentId ( ) . equals ( Guid.Empty ) ) ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > children = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getDiskImageDao ( ) . getAllSnapshotsForParent ( imageId ) ; if ( children.isEmpty ( ) ) { org.ovirt.engine.core.bll.RemoveSnapshotSingleDiskLiveCommand.log.info ( "Image has been previously merged, proceeding with deletion" ) ; return org.ovirt.engine.core.common.action.RemoveSnapshotSingleDiskLiveStep.DESTROY_IMAGE ; } } return org.ovirt.engine.core.common.action.RemoveSnapshotSingleDiskLiveStep.EXTEND ; }
Source:
public org.ovirt.engine.core.common.businessentities.StorageDomainStatic getStorageDomainStatic ( ) { org.ovirt.engine.core.common.businessentities.StorageDomainStatic storageDomainStatic = control.createMock ( org.ovirt.engine.core.common.businessentities.StorageDomainStatic.class ) ; org.easymock.EasyMock.expect ( storageDomainStatic.getId ( ) ) . andReturn ( GUIDS [ 0 ] ) . anyTimes ( ) ; org.easymock.EasyMock.expect ( storageDomainStatic.getName ( ) ) . andReturn ( NAMES [ 0 ] ) . anyTimes ( ) ; return storageDomainStatic ; }

Target:
public org.ovirt.engine.core.common.businessentities.StorageDomainStatic getStorageDomainStatic ( ) { org.ovirt.engine.core.common.businessentities.StorageDomainStatic storageDomainStatic = org.mockito.Mockito.mock ( org.ovirt.engine.core.common.businessentities.StorageDomainStatic.class ) ; org.mockito.Mockito.when ( storageDomainStatic.getId ( ) ) . thenReturn ( GUIDS [ 0 ] ) ; org.mockito.Mockito.when ( storageDomainStatic.getName ( ) ) . thenReturn ( NAMES [ 0 ] ) ; return storageDomainStatic ; }
Source:
private void setupSelectionContext ( org.ovirt.engine.core.common.businessentities.VM vm ) { for ( org.ovirt.engine.ui.uicommonweb.models.vms.ConsoleModel model : cachedConsoleModels.get ( vm.getId ( ) ) ) { model.setSelectionContext ( new org.ovirt.engine.ui.uicommonweb.models.vms.ConsoleSelectionContext ( vm.getVmOs ( ) , vm.getDefaultDisplayType ( ) ) ) ; } }

Target:
private void setupSelectionContext ( org.ovirt.engine.core.common.businessentities.VM vm ) { for ( org.ovirt.engine.ui.uicommonweb.models.vms.ConsoleModel model : cachedConsoleModels.get ( vm.getId ( ) ) ) { org.ovirt.engine.core.common.businessentities.DisplayType vmDisplay = ( vm.isRunningOrPaused ( ) ) ? vm.getDisplayType ( ) : vm.getDefaultDisplayType ( ) ; model.setSelectionContext ( new org.ovirt.engine.ui.uicommonweb.models.vms.ConsoleSelectionContext ( vm.getVmOs ( ) , vmDisplay ) ) ; } }
Source:
public void testAddIncompleteParameters ( ) throws java.lang.Exception { org.ovirt.engine.api.model.VM model = new org.ovirt.engine.api.model.VM ( ) ; model.setName ( NAMES [ 0 ] ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; control.replay ( ) ; try { collection.add ( model ) ; fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "VM" , "add" , "template.id|name" , "cluster.id|name" ) ; } }

Target:
public void testAddIncompleteParameters2 ( ) throws java.lang.Exception { org.ovirt.engine.api.model.VM model = createModel ( null ) ; model.setTemplate ( null ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; control.replay ( ) ; try { collection.add ( model ) ; fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "VM" , "add" , "template.id|name" ) ; } }
Source:
public void refreshHost ( org.ovirt.engine.core.common.businessentities.VDS vds ) { try { org.ovirt.engine.core.common.businessentities.VDSStatus newStatus = refreshCapabilities ( new java.util.concurrent.atomic.AtomicBoolean ( ) , vds ) ; if ( org.ovirt.engine.core.vdsbroker.VdsManager.log.isDebugEnabled ( ) ) { org.ovirt.engine.core.vdsbroker.VdsManager.log.debugFormat ( "Succeeded to refreshCapabilities for host {0} , new status will be {1} " , getVdsId ( ) , newStatus ) ; } } finally { if ( vds != null ) { updateDynamicData ( vds.getDynamicData ( ) ) ; monitoringStrategy.processHardwareCapabilities ( vds ) ; org.ovirt.engine.core.vdsbroker.ResourceManager.getInstance ( ) . getEventListener ( ) . handleVdsVersion ( vds.getId ( ) ) ; } } }

Target:
private java.util.List < org.ovirt.engine.core.common.businessentities.VM > getVmsToMoveToUnknown ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VM > vmList = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmDao ( ) . getAllRunningForVds ( getVdsId ( ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VM > migratingVms = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmDao ( ) . getAllMigratingToHost ( getVdsId ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.VM incomingVm : migratingVms ) { if ( ( incomingVm.getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.MigratingTo ) ) { vmList.add ( incomingVm ) ; } } return vmList ; }
Source:
public boolean fetch ( ) { org.ovirt.engine.core.common.vdscommands.VDSReturnValue getList = getResourceManager ( ) . runVdsCommand ( VDSCommandType.List , new org.ovirt.engine.core.common.vdscommands.VdsIdAndVdsVDSCommandParametersBase ( vdsManager.getCopyVds ( ) ) ) ; if ( getList.getSucceeded ( ) ) { vdsmVms = ( ( java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.vdsbroker.vdsbroker.entities.VmInternalData > ) ( getList.getReturnValue ( ) ) ) ; onFetchVms ( ) ; return true ; } else { onError ( ) ; return false ; } }

Target:
protected org.ovirt.engine.core.common.vdscommands.VDSReturnValue poll ( ) { return getResourceManager ( ) . runVdsCommand ( VDSCommandType.List , new org.ovirt.engine.core.common.vdscommands.VdsIdAndVdsVDSCommandParametersBase ( vdsManager.getCopyVds ( ) ) ) ; }
Source:
protected void postInitDisks ( ) { onDataLoad ( ) ; checkDestFormatCompatibility ( ) ; StopProgress ( ) ; getStorage ( ) . getSelectedItemChangedEvent ( ) . addListener ( new org.ovirt.engine.core.compat.IEventListener ( ) { @ java.lang.Override public void eventRaised ( org.ovirt.engine.core.compat.Event ev , java.lang.Object sender , org.ovirt.engine.core.compat.EventArgs args ) { onDataLoad ( ) ; } } ) ; getCollapseSnapshots ( ) . getEntityChangedEvent ( ) . addListener ( new org.ovirt.engine.core.compat.IEventListener ( ) { @ java.lang.Override public void eventRaised ( org.ovirt.engine.core.compat.Event ev , java.lang.Object sender , org.ovirt.engine.core.compat.EventArgs args ) { OnPropertyChanged ( new org.ovirt.engine.core.compat.PropertyChangedEventArgs ( org.ovirt.engine.ui.uicommonweb.models.vms.ImportVmModel.ON_DISK_LOAD ) ) ; } } ) ; }

Target:
public void onDataLoad ( ) { checkIfDefaultStorageApplicableForAllDisks ( ) ; OnPropertyChanged ( new org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ( org.ovirt.engine.ui.uicommonweb.models.vms.ImportVmModel.ON_DISK_LOAD ) ) ; }
Source:
public void canDoActionInvalidSourceDomain ( ) { createParameters ( ) ; org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain = initStorageDomain ( srcStorageId ) ; storageDomain.setStatus ( StorageDomainStatus.Locked ) ; initDiskImage ( diskImageId ) ; initVm ( VMStatus.Up , org.ovirt.engine.core.compat.Guid.NewGuid ( ) , diskImageId ) ; org.junit.Assert.assertFalse ( command.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_DOMAIN_STATUS_ILLEGAL.toString ( ) ) ) ; }

Target:
public void canDoActionInvalidSourceDomain ( ) { createParameters ( ) ; org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain = initStorageDomain ( srcStorageId ) ; storageDomain.setStatus ( StorageDomainStatus.Locked ) ; initDiskImage ( diskImageId ) ; initVm ( VMStatus.Up , org.ovirt.engine.core.compat.Guid.newGuid ( ) , diskImageId ) ; org.junit.Assert.assertFalse ( command.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_DOMAIN_STATUS_ILLEGAL.toString ( ) ) ) ; }
Source:
public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > allStorageDomains = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ) ( source ) ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > isoStorageDomains = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain : allStorageDomains ) { if ( ( storageDomain.getStorageDomainType ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageDomainType.ISO ) ) { isoStorageDomains.add ( storageDomain ) ; } } return isoStorageDomains ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) ; }

Target:
public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > allStorageDomains = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ) ( source ) ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > isoStorageDomains = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain : allStorageDomains ) { if ( ( storageDomain.getStorageDomainType ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageDomainType.ISO ) ) { isoStorageDomains.add ( storageDomain ) ; } } return isoStorageDomains ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) ; }
Source:
protected void endSuccessfully ( ) { org.ovirt.engine.core.common.action.VdcReturnValueBase ret = org.ovirt.engine.core.bll.UpdateVmDiskCommand.getBackend ( ) . EndAction ( VdcActionType.ExtendImageSize , createExtendImageSizeParameters ( ) ) ; if ( ret.getSucceeded ( ) ) { performDiskUpdate ( true ) ; } else { unlockImageInDb ( ) ; } org.ovirt.engine.core.bll.UpdateVmDiskCommand.getReturnValue ( ) . setEndActionTryAgain ( false ) ; setSucceeded ( ret.getSucceeded ( ) ) ; }

Target:
protected void endSuccessfully ( ) { org.ovirt.engine.core.common.action.VdcReturnValueBase ret = org.ovirt.engine.core.bll.UpdateVmDiskCommand.getBackend ( ) . endAction ( VdcActionType.ExtendImageSize , createExtendImageSizeParameters ( ) ) ; if ( ret.getSucceeded ( ) ) { performDiskUpdate ( true ) ; } else { unlockImageInDb ( ) ; } org.ovirt.engine.core.bll.UpdateVmDiskCommand.getReturnValue ( ) . setEndActionTryAgain ( false ) ; setSucceeded ( ret.getSucceeded ( ) ) ; }
Source:
public void testValidDedicatedHost ( ) { prepareVmToPassCanDoAction ( ) ; org.ovirt.engine.core.common.businessentities.VDS vds = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; vds.setVdsGroupId ( group.getId ( ) ) ; org.mockito.Mockito.doReturn ( vdsDAO ) . when ( command ) . getVdsDAO ( ) ; org.mockito.Mockito.when ( vdsDAO.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( vds ) ; vmStatic.setDedicatedVmForVds ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; junit.framework.Assert.assertTrue ( "canDoAction should have passed." , command.canDoAction ( ) ) ; }

Target:
public void testDedicatedHostNotInSameCluster ( ) { prepareVmToPassCanDoAction ( ) ; org.ovirt.engine.core.common.businessentities.VDS vds = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; vds.setVdsGroupId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; org.mockito.Mockito.doReturn ( vdsDAO ) . when ( command ) . getVdsDAO ( ) ; org.mockito.Mockito.when ( vdsDAO.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( vds ) ; vmStatic.setDedicatedVmForVds ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; junit.framework.Assert.assertFalse ( "canDoAction should have failed with invalid dedicated host." , command.canDoAction ( ) ) ; assertCanDoActionMessage ( VdcBllMessages.ACTION_TYPE_FAILED_DEDICATED_VDS_NOT_IN_SAME_CLUSTER ) ; }
Source:
public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.RepoImage > repoList = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.RepoImage > ) ( source ) ) ; java.util.ArrayList < java.lang.String > fileNameList = new java.util.ArrayList < java.lang.String > ( ) ; for ( org.ovirt.engine.core.common.businessentities.RepoImage repoImage : repoList ) { fileNameList.add ( repoImage.getRepoImageId ( ) ) ; } java.util.Collections.sort ( fileNameList , java.lang.String.CASE_INSENSITIVE_ORDER ) ; return fileNameList ; } return new java.util.ArrayList < java.lang.String > ( ) ; }

Target:
public void getUnknownImageList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , boolean forceRefresh ) { getIrsImageList ( aQuery , storagePoolId , forceRefresh , ImageFileType.All , new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.RepoImageToImageFileNameAsyncConverter ( ) { @ java.lang.Override protected java.lang.String transform ( java.util.ArrayList < java.lang.String > fileNameList , org.ovirt.engine.core.common.businessentities.storage.RepoImage repoImage ) { return ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.ISO_PREFIX ) + ( super . transform ( fileNameList , repoImage ) ) ; } @ java.lang.Override protected boolean desiredImage ( org.ovirt.engine.core.common.businessentities.storage.RepoImage repoImage ) { return ( org.ovirt.engine.core.common.businessentities.storage.ImageFileType.Unknown ) == ( repoImage.getFileType ( ) ) ; } } ) ; }
Source:
public org.ovirt.engine.core.common.businessentities.VDSGroup getFromCache ( org.ovirt.engine.core.compat.Guid id ) { return org.ovirt.engine.core.dal.EntityCache.getInstance ( ) . getFromCache ( id , this ) ; }

Target:
public java.util.List < org.ovirt.engine.core.common.businessentities.VDSGroup > getByName ( java.lang.String name , boolean isCaseSensitive ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "vds_group_name" , name ) . addValue ( "is_case_sensitive" , isCaseSensitive ) ; return getCallsHandler ( ) . executeReadList ( "GetVdsGroupByVdsGroupName" , org.ovirt.engine.core.dao.VdsGroupDAODbFacadeImpl.VdsGroupRowMapper.instance , parameterSource ) ; }
Source:
public void ExecuteCommand ( org.ovirt.engine.ui.uicommonweb.UICommand command ) { super . ExecuteCommand ( command ) ; if ( command == ( getRefreshCommand ( ) ) ) { refreshModel ( ) ; UpdatePagingAvailability ( ) ; } else if ( command == ( getDetailsCommand ( ) ) ) { details ( ) ; } else if ( org.ovirt.engine.core.compat.StringHelper.stringsEqual ( command.getName ( ) , "Cancel" ) ) { cancel ( ) ; } }

Target:
public void executeCommand ( org.ovirt.engine.ui.uicommonweb.UICommand command ) { super . executeCommand ( command ) ; if ( command == ( getRefreshCommand ( ) ) ) { refreshModel ( ) ; UpdatePagingAvailability ( ) ; } else if ( command == ( getDetailsCommand ( ) ) ) { details ( ) ; } else if ( org.ovirt.engine.core.compat.StringHelper.stringsEqual ( command.getName ( ) , "Cancel" ) ) { cancel ( ) ; } }
Source:
public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) : 1000 ; }

Target:
public java.util.List < org.ovirt.engine.core.common.businessentities.Cluster > convert ( java.lang.Object source ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Cluster > list = getClusterByServiceList ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Cluster > ) ( source ) ) , supportsVirtService , supportsGlusterService ) ; java.util.Collections.sort ( list , new org.ovirt.engine.core.common.businessentities.comparators.NameableComparator ( ) ) ; return list ; } return new java.util.ArrayList < > ( ) ; }
Source:
protected boolean canDoAction ( ) { return ( ! ( Guid.Empty.equals ( org.ovirt.engine.core.bll.AddVdsSpmIdCommand.getVds ( ) . getstorage_pool_id ( ) ) ) ) && ( ( org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVdsSpmIdMapDAO ( ) . get ( org.ovirt.engine.core.bll.AddVdsSpmIdCommand.getVdsId ( ) ) ) == null ) ; }

Target:
protected boolean canDoAction ( ) { return ( ! ( Guid.Empty.equals ( org.ovirt.engine.core.bll.AddVdsSpmIdCommand.getVds ( ) . getstorage_pool_id ( ) ) ) ) && ( ( org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVdsSpmIdMapDao ( ) . get ( org.ovirt.engine.core.bll.AddVdsSpmIdCommand.getVdsId ( ) ) ) == null ) ; }
Source:
private void performOperation ( java.lang.Runnable action1 , java.lang.Runnable action2 , boolean expectOverlap ) { java.lang.Thread thread1 = new java.lang.Thread ( action1 ) ; thread1.start ( ) ; org.ovirt.engine.core.utils.lock.LockedObjectFactoryTest.sleep ( org.ovirt.engine.core.utils.lock.LockedObjectFactoryTest.DELAY_BETWEEN_THREADS_MILLIS ) ; java.lang.Thread thread2 = new java.lang.Thread ( action2 ) ; thread2.start ( ) ; try { thread1.join ( ) ; thread2.join ( ) ; } catch ( java.lang.InterruptedException e ) { throw new java.lang.RuntimeException ( e ) ; } org.junit.Assert.assertThat ( threadsOverlaps ( ) , org.hamcrest.CoreMatchers.is ( expectOverlap ) ) ; }

Target:
private void performOperation ( java.lang.Runnable action1 , java.lang.Runnable action2 , boolean expectOverlap ) { java.lang.Thread thread1 = new java.lang.Thread ( action1 ) ; thread1.start ( ) ; org.ovirt.engine.core.utils.lock.LockedObjectFactoryTest.sleep ( org.ovirt.engine.core.utils.lock.LockedObjectFactoryTest.DELAY_BETWEEN_THREADS_MILLIS ) ; java.lang.Thread thread2 = new java.lang.Thread ( action2 ) ; thread2.start ( ) ; try { thread1.join ( ) ; thread2.join ( ) ; } catch ( java.lang.InterruptedException e ) { throw new java.lang.RuntimeException ( e ) ; } org.hamcrest.MatcherAssert.assertThat ( threadsOverlaps ( ) , org.hamcrest.CoreMatchers.is ( expectOverlap ) ) ; }
Source:
public void canDoActionWrongDiskImageTypeVm ( ) throws java.lang.Exception { initializeCommand ( ImageOperation.Copy ) ; initVmDiskImage ( false ) ; org.mockito.Mockito.doReturn ( null ) . when ( command ) . getTemplateForImage ( ) ; command.defineVmTemplate ( ) ; org.junit.Assert.assertFalse ( command.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( VdcBllMessages.ACTION_TYPE_FAILED_DISK_IS_NOT_TEMPLATE_DISK.toString ( ) ) ) ; }

Target:
public void successVmInPreviewForAttachedSnapshot ( ) { initializeCommand ( ImageOperation.Move ) ; initSnapshotValidator ( ) ; initVmForSpace ( ) ; initVmDiskImage ( false ) ; initSrcStorageDomain ( ) ; initDestStorageDomain ( StorageType.NFS ) ; vmDevice.setSnapshotId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionSuccess ( command ) ; }
Source:
public void testExportWithStorageDomainName ( ) throws java.lang.Exception { setUpEntityQueryExpectations ( VdcQueryType.GetStorageDomainByName , org.ovirt.engine.core.common.queries.NameQueryParameters.class , new java.lang.String [ ] { "Name" } , new java.lang.Object [ ] { NAMES [ 2 ] } , getStorageDomainStatic ( 2 ) ) ; org.ovirt.engine.api.model.StorageDomain storageDomain = new org.ovirt.engine.api.model.StorageDomain ( ) ; storageDomain.setName ( NAMES [ 2 ] ) ; doTestExport ( storageDomain , false , false ) ; }

Target:
public void testExportWithStorageDomainName ( ) throws java.lang.Exception { setUpEntityQueryExpectations ( QueryType.GetStorageDomainByName , org.ovirt.engine.core.common.queries.NameQueryParameters.class , new java.lang.String [ ] { "Name" } , new java.lang.Object [ ] { NAMES [ 2 ] } , getStorageDomainStatic ( 2 ) ) ; org.ovirt.engine.api.model.StorageDomain storageDomain = new org.ovirt.engine.api.model.StorageDomain ( ) ; storageDomain.setName ( NAMES [ 2 ] ) ; doTestExport ( storageDomain , false , false ) ; }
Source:
void localize ( org.ovirt.engine.ui.webadmin.ApplicationConstants constants ) { pathLabel.setText ( constants.storagePopupPosixPathLabel ( ) ) ; pathHintLabel.setText ( constants.storagePopupPosixPathHintLabel ( ) ) ; vfsTypeLabel.setText ( constants.storagePopupVfsTypeLabel ( ) ) ; mountOptionsLabel.setText ( constants.storagePopupMountOptionsLabel ( ) ) ; }

Target:
void localize ( org.ovirt.engine.ui.webadmin.ApplicationConstants constants ) { pathLabel.setText ( constants.storagePopupPosixPathLabel ( ) ) ; pathHintLabel.setText ( constants.storagePopupPosixPathHintLabel ( ) ) ; vfsTypeLabel.setText ( constants.storagePopupVfsTypeLabel ( ) ) ; mountOptionsLabel.setText ( constants.storagePopupMountOptionsLabel ( ) ) ; nfsPosixAlertIcon.setTitle ( constants.storagePopupPosixNfsWarningLabel ( ) ) ; }
Source:
public void onSuccessAudit ( ) { mockExecutor ( true ) ; command.executeCommand ( ) ; org.mockito.Mockito.verify ( auditLogDirector , org.mockito.Mockito.times ( 2 ) ) . log ( org.mockito.Matchers.any ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase.class ) , org.mockito.Matchers.any ( org.ovirt.engine.core.common.AuditLogType.class ) ) ; }

Target:
public void onSuccessAudit ( ) { mockExecutor ( true ) ; command.executeCommand ( ) ; org.mockito.Mockito.verify ( auditLogDirector , org.mockito.Mockito.times ( 2 ) ) . log ( org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase.class ) , org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.common.AuditLogType.class ) ) ; }
Source:
public void successVmInPreviewForAttachedSnapshot ( ) { initializeCommand ( new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ) ; initVmForSpace ( ) ; initVmDiskImage ( false ) ; initSrcStorageDomain ( ) ; initDestStorageDomain ( StorageType.NFS ) ; vmDevice.setSnapshotId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateSuccess ( command ) ; }

Target:
public void moveShareableDisk ( ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage disk = new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ; disk.setShareable ( true ) ; initializeCommand ( disk , VmEntityType.VM ) ; initSrcStorageDomain ( ) ; initDestStorageDomain ( StorageType.NFS ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateSuccess ( command ) ; }
Source:
public boolean isUpdateAvailable ( org.ovirt.engine.core.common.businessentities.VDS host ) { org.ovirt.engine.core.common.queries.VdcQueryReturnValue returnValue = org.ovirt.engine.core.bll.Backend.getInstance ( ) . runInternalQuery ( VdcQueryType.GetoVirtISOs , new org.ovirt.engine.core.common.queries.VdsIdParametersBase ( host.getId ( ) ) ) ; java.util.List < org.ovirt.engine.core.compat.RpmVersion > isos = returnValue.getReturnValue ( ) ; return ! ( isos.isEmpty ( ) ) ; }

Target:
public boolean isUpdateAvailable ( org.ovirt.engine.core.common.businessentities.VDS host ) { org.ovirt.engine.core.common.queries.VdcQueryReturnValue returnValue = org.ovirt.engine.core.bll.Backend.getInstance ( ) . runInternalQuery ( VdcQueryType.GetoVirtISOs , new org.ovirt.engine.core.common.queries.VdsIdParametersBase ( host.getId ( ) ) ) ; java.util.List < org.ovirt.engine.core.compat.RpmVersion > isos = returnValue.getReturnValue ( ) ; return org.ovirt.engine.core.common.utils.RpmVersionUtils.isUpdateAvailable ( isos , host.getHostOs ( ) ) ; }
Source:
protected void executeCommand ( ) { org.ovirt.engine.core.common.businessentities.VDSGroup vdsGroup = getVdsGroup ( ) ; if ( vdsGroup.supportsVirtService ( ) ) { setSucceeded ( initVirtResources ( ) ) ; } if ( vdsGroup.supportsGlusterService ( ) ) { setSucceeded ( initGlusterPeerProcess ( ) ) ; } }

Target:
protected void executeCommand ( ) { org.ovirt.engine.core.common.businessentities.VDSGroup vdsGroup = getVdsGroup ( ) ; boolean initSucceeded = true ; if ( vdsGroup.supportsVirtService ( ) ) { initSucceeded = initVirtResources ( ) ; } if ( initSucceeded && ( vdsGroup.supportsGlusterService ( ) ) ) { initSucceeded = initGlusterHost ( ) ; } setSucceeded ( initSucceeded ) ; }
Source:
public void initTable ( ) { super . initTable ( ) ; getTable ( ) . enableColumnResizing ( ) ; org.ovirt.engine.ui.common.widget.table.column.AbstractBooleanColumn < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > portMirroringColumn = new org.ovirt.engine.ui.common.widget.table.column.AbstractBooleanColumn < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( org.ovirt.engine.ui.webadmin.section.main.view.tab.virtualMachine.SubTabVirtualMachineNetworkInterfaceView.constants.portMirroringEnabled ( ) ) { @ java.lang.Override public java.lang.Boolean getRawValue ( org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface object ) { return object.isPortMirroring ( ) ; } } ; portMirroringColumn.makeSortable ( ) ; getTable ( ) . addColumn ( portMirroringColumn , org.ovirt.engine.ui.webadmin.section.main.view.tab.virtualMachine.SubTabVirtualMachineNetworkInterfaceView.constants.portMirroring ( ) , "85px" ) ; }

Target:
public void setInSlot ( java.lang.Object slot , com.google.gwt.user.client.ui.IsWidget content ) { if ( slot == ( org.ovirt.engine.ui.common.presenter.AbstractSubTabPresenter.TYPE_SetActionPanel ) ) { getContainer ( ) . insert ( content , 0 ) ; } else { super . setInSlot ( slot , content ) ; } }
Source:
public void testGetDataAndSetDataWithSessionParam ( ) { 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 ) ; org.junit.Assert.assertNull ( "Get should return null with an empty session" , container.GetData ( org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_KEY ) ) ; org.junit.Assert.assertEquals ( "Get should return the value with a given session" , 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 ) ) ; }

Target:
public void testGetDataAndSetDataWithFullSession ( ) { org.ovirt.engine.core.utils.ThreadLocalParamsContainer.setHttpSessionId ( org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_SESSION_ID ) ; org.junit.Assert.assertTrue ( "Set should fail with an empty session" , container.SetData ( org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_KEY , org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_VALUE ) ) ; org.junit.Assert.assertEquals ( "Get should return null with an empty session" , org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_VALUE , container.GetData ( org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_KEY , false ) ) ; org.junit.Assert.assertEquals ( "Get should return the value with a given session" , 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 ) ) ; }
Source:
protected void setUpQueryExpectations ( java.lang.String query , java.lang.Object failure ) throws java.lang.Exception { assertEquals ( "" , query ) ; setUpEntityQueryExpectations ( VdcQueryType.GetStepsByJobId , org.ovirt.engine.core.common.queries.GetStepsByJobIdQueryParameters.class , new java.lang.String [ ] { "JobId" } , new java.lang.Object [ ] { GUIDS [ 1 ] } , setUpSteps ( ) , failure ) ; }

Target:
protected void setUpQueryExpectations ( java.lang.String query , java.lang.Object failure ) throws java.lang.Exception { assertEquals ( "" , query ) ; setUpEntityQueryExpectations ( VdcQueryType.GetStepsWithSubjectEntitiesByJobId , org.ovirt.engine.core.common.queries.GetStepsWithSubjectEntitiesByJobIdQueryParameters.class , new java.lang.String [ ] { "JobId" } , new java.lang.Object [ ] { GUIDS [ 1 ] } , setUpSteps ( ) , failure ) ; }
Source:
protected org.ovirt.engine.core.common.businessentities.storage.DiskImage getDiskImage ( ) { if ( ( diskImage ) == null ) { org.ovirt.engine.core.common.businessentities.storage.Disk disk = getDiskDao ( ) . get ( org.ovirt.engine.core.bll.ExportRepoImageCommand.getParameters ( ) . getImageGroupID ( ) ) ; if ( ( disk != null ) && ( ( disk.getDiskStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.storage.DiskStorageType.IMAGE ) ) ) { diskImage = ( ( org.ovirt.engine.core.common.businessentities.storage.DiskImage ) ( disk ) ) ; } } return diskImage ; }

Target:
private boolean validateDiskImage ( ) { org.ovirt.engine.core.common.businessentities.storage.Disk disk = org.ovirt.engine.core.bll.ExportRepoImageCommand.getDiskDao ( ) . get ( org.ovirt.engine.core.bll.ExportRepoImageCommand.getParameters ( ) . getImageGroupID ( ) ) ; if ( ( disk != null ) && ( ! ( validate ( new org.ovirt.engine.core.bll.validator.storage.DiskValidator ( disk ) . validateDiskIsNotLun ( ) ) ) ) ) { return false ; } if ( ( getDiskImage ( ) ) == null ) { return failCanDoAction ( EngineMessage.ACTION_TYPE_FAILED_DISK_NOT_EXIST ) ; } return true ; }
Source:
private static org.ovirt.engine.core.common.businessentities.DiskImage getActiveVolumeDisk ( java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > diskList ) { return diskList.get ( ( ( diskList.size ( ) ) - 1 ) ) ; }

Target:
private org.ovirt.engine.core.common.businessentities.network.VnicProfile getVnicProfileForNetwork ( java.util.List < org.ovirt.engine.core.common.businessentities.network.VnicProfileView > vnicProfiles , org.ovirt.engine.core.common.businessentities.network.Network network , java.lang.String vnicProfileName ) { if ( vnicProfileName == null ) { return null ; } for ( org.ovirt.engine.core.common.businessentities.network.VnicProfileView vnicProfile : vnicProfiles ) { if ( ( org.apache.commons.lang.ObjectUtils.equals ( vnicProfile.getNetworkId ( ) , network.getId ( ) ) ) && ( vnicProfileName.equals ( vnicProfile.getName ( ) ) ) ) { return vnicProfile ; } } return null ; }
Source:
public 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 ) ; }

Target:
public void getTemplateById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid templateId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmTemplate , new org.ovirt.engine.core.common.queries.GetVmTemplateParameters ( templateId ) , aQuery ) ; }
Source:
private java.util.List < org.ovirt.engine.core.bll.network.macpoolmanager.Range > createMockedRanges ( int count ) { java.util.List < org.ovirt.engine.core.bll.network.macpoolmanager.Range > result = new java.util.ArrayList < > ( count ) ; for ( int i = 0 ; i < count ; i ++ ) { result.add ( org.mockito.Mockito.mock ( org.ovirt.engine.core.bll.network.macpoolmanager.Range.class ) ) ; } return result ; }

Target:
private java.util.List < org.ovirt.engine.core.bll.network.macpool.Range > createMockedRanges ( int count ) { java.util.List < org.ovirt.engine.core.bll.network.macpool.Range > result = new java.util.ArrayList < > ( count ) ; for ( int i = 0 ; i < count ; i ++ ) { result.add ( org.mockito.Mockito.mock ( org.ovirt.engine.core.bll.network.macpool.Range.class ) ) ; } return result ; }
Source:
public static org.ovirt.engine.core.common.businessentities.storage.DiskImage createMemoryDisk ( org.ovirt.engine.core.common.businessentities.VM vm , org.ovirt.engine.core.common.businessentities.storage.StorageType storageType ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage image = new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ; image.setSize ( org.ovirt.engine.core.bll.utils.VmUtils.getSnapshotMemorySizeInBytes ( vm ) ) ; image.setVolumeType ( org.ovirt.engine.core.bll.memory.MemoryUtils.storageTypeToMemoryVolumeType ( storageType ) ) ; image.setvolumeFormat ( VolumeFormat.RAW ) ; image.setDiskInterface ( DiskInterface.VirtIO ) ; return image ; }

Target:
public static org.ovirt.engine.core.common.businessentities.storage.DiskImage createMemoryDisk ( org.ovirt.engine.core.common.businessentities.VM vm , org.ovirt.engine.core.common.businessentities.storage.StorageType storageType , org.ovirt.engine.core.bll.utils.VmOverheadCalculator vmOverheadCalculator ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage image = new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ; image.setSize ( vmOverheadCalculator.getSnapshotMemorySizeInBytes ( vm ) ) ; image.setVolumeType ( org.ovirt.engine.core.bll.memory.MemoryUtils.storageTypeToMemoryVolumeType ( storageType ) ) ; image.setVolumeFormat ( VolumeFormat.RAW ) ; return image ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object ReturnValue ) { java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > storageDomains = ( ( java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( ReturnValue ) ) . getReturnValue ( ) ) ) ; org.ovirt.engine.core.compat.Guid exportDomainId = findExportDomainId ( storageDomains ) ; if ( exportDomainId != null ) { getVmsFromExportDomain ( dataCenter.getId ( ) , exportDomainId ) ; } else { setErrorToFetchData ( org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getConstants ( ) . notAvailableWithNoActiveExportDomain ( ) ) ; stopProgress ( ) ; } }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { this . stopProgress ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VDS > hosts = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( ) ; hosts.add ( 0 , null ) ; for ( org.ovirt.engine.core.common.businessentities.VDS host : ( ( java.util.List < org.ovirt.engine.core.common.businessentities.VDS > ) ( returnValue ) ) ) { if ( ( host.getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VDSStatus.Up ) ) { hosts.add ( host ) ; } } proxyHosts.setItems ( hosts ) ; }
Source:
public void testRemove ( ) throws java.lang.Exception { setUpGetEntityExpectations ( 2 ) ; setUpEntityQueryExpectations ( VdcQueryType.GetAllDbUsers , org.ovirt.engine.core.common.queries.VdcQueryParametersBase.class , new java.lang.String [ ] { "Refresh" , "Filtered" } , new java.lang.Object [ ] { false , false } , getUsers ( ) ) ; setUriInfo ( setUpActionExpectations ( ActionType.RemovePermission , org.ovirt.engine.core.common.action.PermissionsOperationsParameters.class , new java.lang.String [ ] { "Permission.Id" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , true , true ) ) ; verifyRemove ( resource.remove ( ) ) ; }

Target:
public void testRemove ( ) throws java.lang.Exception { setUpGetEntityExpectations ( 2 ) ; setUpEntityQueryExpectations ( QueryType.GetAllDbUsers , org.ovirt.engine.core.common.queries.VdcQueryParametersBase.class , new java.lang.String [ ] { "Refresh" , "Filtered" } , new java.lang.Object [ ] { false , false } , getUsers ( ) ) ; setUriInfo ( setUpActionExpectations ( ActionType.RemovePermission , org.ovirt.engine.core.common.action.PermissionsOperationsParameters.class , new java.lang.String [ ] { "Permission.Id" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , true , true ) ) ; verifyRemove ( resource.remove ( ) ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.irsbroker.FileStatsReturnForXmlRpc getFileStats ( java.lang.String sdUUID , java.lang.String pattern , boolean caseSensitive ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "StorageDomain.getFileStats" ) . withParameter ( "storagedomainID" , sdUUID ) . withParameter ( "pattern" , pattern ) . withParameter ( "caseSensitive" , caseSensitive ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) . withResponseKey ( "fileStats" ) ; return new org.ovirt.engine.core.vdsbroker.irsbroker.FileStatsReturnForXmlRpc ( response ) ; }

Target:
public org.ovirt.engine.core.vdsbroker.irsbroker.FileStatsReturn getFileStats ( java.lang.String sdUUID , java.lang.String pattern , boolean caseSensitive ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "StorageDomain.getFileStats" ) . withParameter ( "storagedomainID" , sdUUID ) . withParameter ( "pattern" , pattern ) . withParameter ( "caseSensitive" , caseSensitive ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) . withResponseKey ( "fileStats" ) ; return new org.ovirt.engine.core.vdsbroker.irsbroker.FileStatsReturn ( response ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.network.Network createNetwork ( int mtu , boolean isVmNetwork ) { org.ovirt.engine.core.common.businessentities.network.Network network = new org.ovirt.engine.core.common.businessentities.network.Network ( ) ; network.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; network.setMtu ( mtu ) ; network.setVmNetwork ( isVmNetwork ) ; return network ; }

Target:
private org.ovirt.engine.core.common.businessentities.network.Network createNetwork ( int mtu , boolean isVmNetwork , java.lang.String networkName ) { org.ovirt.engine.core.common.businessentities.network.Network network = new org.ovirt.engine.core.common.businessentities.network.Network ( ) ; network.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; network.setName ( networkName ) ; network.setMtu ( mtu ) ; network.setVmNetwork ( isVmNetwork ) ; return network ; }
Source:
protected void doTestBadRemove ( boolean canDo , boolean success , java.lang.String detail ) throws java.lang.Exception { setUpGetEntityExpectations ( 1 ) ; setUpVersionExpectations ( ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.RemoveStoragePool , org.ovirt.engine.core.common.action.StoragePoolParametersBase.class , new java.lang.String [ ] { "StoragePoolId" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , canDo , success ) ) ; try { resource.remove ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }

Target:
protected void doTestBadRemove ( boolean valid , boolean success , java.lang.String detail ) throws java.lang.Exception { setUpGetEntityExpectations ( 1 ) ; setUpVersionExpectations ( ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.RemoveStoragePool , org.ovirt.engine.core.common.action.StoragePoolParametersBase.class , new java.lang.String [ ] { "StoragePoolId" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , valid , success ) ) ; try { resource.remove ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }
Source:
public void getLunsByVgId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String vgId , org.ovirt.engine.core.compat.Guid vdsId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.LUNs > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.LUNs > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetLunsByVgIdParameters params = new org.ovirt.engine.core.common.queries.GetLunsByVgIdParameters ( vgId , vdsId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetLunsByVgId , params , aQuery ) ; }

Target:
public void getoVirtISOsList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? new java.util.ArrayList < > ( ( ( java.util.ArrayList < org.ovirt.engine.core.compat.RpmVersion > ) ( source ) ) ) : new java.util.ArrayList < org.ovirt.engine.core.compat.RpmVersion > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetoVirtISOs , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }