auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private void optimizationCustomFormatter ( org.ovirt.engine.ui.uicommonweb.models.hosts.ConfigureLocalStorageModel model ) { if ( ( ( ( model.getCluster ( ) ) != null ) && ( ( model.getCluster ( ) . getOptimizationCustom ( ) ) != null ) ) && ( ( model.getCluster ( ) . getOptimizationCustom ( ) . getEntity ( ) ) != null ) ) { optimizationCustomEditor.setLabel ( getMessages ( ) . clusterPopupMemoryOptimizationCustomLabel ( java.lang.String.valueOf ( model.getCluster ( ) . getMemoryOverCommit ( ) ) ) ) ; } }

Target:
private void optimizationCustomFormatter ( org.ovirt.engine.ui.uicommonweb.models.hosts.ConfigureLocalStorageModel model ) { if ( ( ( ( model.getCluster ( ) ) != null ) && ( ( model.getCluster ( ) . getOptimizationCustom ( ) ) != null ) ) && ( ( model.getCluster ( ) . getOptimizationCustom ( ) . getEntity ( ) ) != null ) ) { optimizationCustomEditor.setLabel ( org.ovirt.engine.ui.webadmin.section.main.view.popup.host.HostConfigureLocalStoragePopupView.messages.clusterPopupMemoryOptimizationCustomLabel ( java.lang.String.valueOf ( model.getCluster ( ) . getMemoryOverCommit ( ) ) ) ) ; } }
Source:
public void canDoActionFailedVMHasNotDisk ( ) throws java.lang.Exception { initializeCommand ( ) ; mockVmStatusUp ( ) ; createNullDisk ( ) ; org.junit.Assert.assertFalse ( command.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( VdcBllMessages.ACTION_TYPE_FAILED_DISK_NOT_EXIST.toString ( ) ) ) ; }

Target:
public void canDoActionFailedVMHasNotDisk ( ) throws java.lang.Exception { initializeCommand ( ) ; mockVmStatusDown ( ) ; createNullDisk ( ) ; org.junit.Assert.assertFalse ( command.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( VdcBllMessages.ACTION_TYPE_FAILED_DISK_NOT_EXIST.toString ( ) ) ) ; }
Source:
private void doDrag ( com.google.gwt.event.dom.client.DragDropEventBase < ? > event , boolean isDrop ) { java.lang.String data = event.getData ( NetworkItemPanel.SETUP_NETWORKS_DATA ) ; java.lang.String type = event.getData ( NetworkItemPanel.SETUP_NETWORKS_TYPE ) ; if ( data != null ) { if ( setupModel.candidateOperation ( data , type , null , null , isDrop ) ) { animatedPanel.getElement ( ) . addClassName ( style.networkGroupDragOver ( ) ) ; event.preventDefault ( ) ; } } }

Target:
private void doDrag ( com.google.gwt.event.dom.client.DragDropEventBase < ? > event , boolean isDrop ) { java.lang.String dragDropEventData = event.getData ( "Text" ) ; java.lang.String type = org.ovirt.engine.ui.webadmin.section.main.view.popup.host.panels.NetworkItemPanel.getType ( dragDropEventData ) ; java.lang.String data = org.ovirt.engine.ui.webadmin.section.main.view.popup.host.panels.NetworkItemPanel.getData ( dragDropEventData ) ; if ( data != null ) { if ( setupModel.candidateOperation ( data , type , null , null , isDrop ) ) { animatedPanel.getElement ( ) . addClassName ( style.networkGroupDragOver ( ) ) ; event.preventDefault ( ) ; } } }
Source:
private void localize ( org.ovirt.engine.ui.webadmin.ApplicationConstants constants ) { headerLabel.setText ( constants.loginHeaderLabel ( ) ) ; userNameEditor.setLabel ( constants.loginFormUserNameLabel ( ) ) ; passwordEditor.setLabel ( constants.loginFormPasswordLabel ( ) ) ; domainEditor.setLabel ( constants.loginFormDomainLabel ( ) ) ; loginButton.setLabel ( constants.loginButtonLabel ( ) ) ; }

Target:
private void localize ( org.ovirt.engine.ui.webadmin.ApplicationConstants constants ) { headerLabel.setText ( constants.loginHeaderLabel ( ) ) ; userNameLabel.setText ( constants.loginFormUserNameLabel ( ) ) ; passwordLabel.setText ( constants.loginFormPasswordLabel ( ) ) ; domainLabel.setText ( constants.loginFormDomainLabel ( ) ) ; loginButton.setLabel ( constants.loginButtonLabel ( ) ) ; }
Source:
protected void disconnectFromStorage ( ) { org.ovirt.engine.core.common.vdscommands.ConnectStorageServerVDSCommandParameters connectionParametersForVdsm = createParametersForVdsm ( org.ovirt.engine.core.bll.storage.UpdateStorageServerConnectionCommand.getParameters ( ) . getVdsId ( ) , org.ovirt.engine.core.bll.storage.UpdateStorageServerConnectionCommand.getParameters ( ) . getStoragePoolId ( ) , org.ovirt.engine.core.bll.storage.UpdateStorageServerConnectionCommand.getParameters ( ) . getStorageServerConnection ( ) . getstorage_type ( ) , org.ovirt.engine.core.bll.storage.UpdateStorageServerConnectionCommand.getParameters ( ) . getStorageServerConnection ( ) ) ; boolean isDisconnectSucceeded = runVdsCommand ( VDSCommandType.DisconnectStorageServer , connectionParametersForVdsm ) . getSucceeded ( ) ; if ( ! isDisconnectSucceeded ) { log.warn ( ( "Failed to disconnect storage connection " + ( org.ovirt.engine.core.bll.storage.UpdateStorageServerConnectionCommand.getParameters ( ) . getStorageServerConnection ( ) ) ) ) ; } }

Target:
protected void disconnectFromStorage ( ) { org.ovirt.engine.core.common.vdscommands.ConnectStorageServerVDSCommandParameters connectionParametersForVdsm = createParametersForVdsm ( org.ovirt.engine.core.bll.storage.UpdateStorageServerConnectionCommand.getParameters ( ) . getVdsId ( ) , org.ovirt.engine.core.bll.storage.UpdateStorageServerConnectionCommand.getParameters ( ) . getStoragePoolId ( ) , org.ovirt.engine.core.bll.storage.UpdateStorageServerConnectionCommand.getConnection ( ) . getstorage_type ( ) , org.ovirt.engine.core.bll.storage.UpdateStorageServerConnectionCommand.getConnection ( ) ) ; boolean isDisconnectSucceeded = runVdsCommand ( VDSCommandType.DisconnectStorageServer , connectionParametersForVdsm ) . getSucceeded ( ) ; if ( ! isDisconnectSucceeded ) { log.warn ( ( "Failed to disconnect storage connection " + ( org.ovirt.engine.core.bll.storage.UpdateStorageServerConnectionCommand.getConnection ( ) ) ) ) ; } }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { super . eventRaised ( ev , sender , args ) ; if ( ev.matchesDefinition ( org.ovirt.engine.ui.uicommonweb.models.EntityModel.entityChangedEventDefinition ) ) { onEntityChanged ( ) ; } else if ( ev.matchesDefinition ( ProvidePropertyChangedEvent.definition ) ) { entityPropertyChanged ( sender , ( ( org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ) ( args ) ) ) ; } }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < ? extends org.ovirt.engine.ui.uicompat.EventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { super . eventRaised ( ev , sender , args ) ; if ( ev.matchesDefinition ( entityChangedEventDefinition ) ) { onEntityChanged ( ) ; } else if ( ev.matchesDefinition ( ProvidePropertyChangedEvent.definition ) ) { entityPropertyChanged ( sender , ( ( org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ) ( args ) ) ) ; } }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.VMListReturnForXmlRpc list ( java.lang.String mode , java.lang.String [ ] vmIds ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.list ( mode , vmIds ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.VMListReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.VMListReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.VMListReturnForXmlRpc fullList ( java.lang.String [ ] vmIds ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.list ( java.lang.Boolean.TRUE.toString ( ) , vmIds ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.VMListReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.VMListReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
public void testStatisticalQuery ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.storage.DiskImage entity = setUpStatisticalExpectations ( ) ; @ java.lang.SuppressWarnings ( value = "unchecked" ) org.ovirt.engine.api.restapi.resource.BackendStatisticsResource < org.ovirt.engine.api.model.Disk , org.ovirt.engine.core.common.businessentities.storage.DiskImage > statisticsResource = ( ( org.ovirt.engine.api.restapi.resource.BackendStatisticsResource < org.ovirt.engine.api.model.Disk , org.ovirt.engine.core.common.businessentities.storage.DiskImage > ) ( resource.getStatisticsResource ( ) ) ) ; assertNotNull ( statisticsResource ) ; verifyQuery ( statisticsResource.getQuery ( ) , entity ) ; }

Target:
public void testStatisticalQuery ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.storage.DiskImage entity = setUpStatisticalExpectations ( ) ; @ java.lang.SuppressWarnings ( value = "unchecked" ) org.ovirt.engine.api.restapi.resource.BackendStatisticsResource < org.ovirt.engine.api.model.Disk , org.ovirt.engine.core.common.businessentities.storage.DiskImage > statisticsResource = ( ( org.ovirt.engine.api.restapi.resource.BackendStatisticsResource < org.ovirt.engine.api.model.Disk , org.ovirt.engine.core.common.businessentities.storage.DiskImage > ) ( resource.getStatisticsResource ( ) ) ) ; org.junit.Assert.assertNotNull ( statisticsResource ) ; verifyQuery ( statisticsResource.getQuery ( ) , entity ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc glusterVolumeGeoRepConfigReset ( java.lang.String volumeName , java.lang.String slaveHost , java.lang.String slaveVolumeName , java.lang.String configKey ) { try { return new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( vdsServer.glusterVolumeGeoRepConfigReset ( volumeName , slaveHost , slaveVolumeName , configKey ) ) ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc glusterVolumeGeoRepConfigSet ( java.lang.String volumeName , java.lang.String slaveHost , java.lang.String slaveVolumeName , java.lang.String configKey , java.lang.String configValue , java.lang.String userName ) { try { return new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( vdsServer.glusterVolumeGeoRepConfigSet ( volumeName , slaveHost , slaveVolumeName , configKey , configValue , userName ) ) ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
public static void getStorageDomainsByConnection ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , java.lang.String connectionPath ) { 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.StorageDomain > ) ( source ) ) : null ; } } ; org.ovirt.engine.core.common.queries.GetStorageDomainsByConnectionParameters param = new org.ovirt.engine.core.common.queries.GetStorageDomainsByConnectionParameters ( ) ; param.setConnection ( connectionPath ) ; if ( storagePoolId != null ) { param.setStoragePoolId ( storagePoolId ) ; } org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetStorageDomainsByConnection , param , aQuery ) ; }

Target:
public static void getStorageDomainList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) ; } } ; org.ovirt.engine.core.common.queries.SearchParameters searchParams = new org.ovirt.engine.core.common.queries.SearchParameters ( "Storage:" , org.ovirt.engine.core.common.interfaces.SearchType.StorageDomain ) ; searchParams.setMaxCount ( 9999 ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , searchParams , aQuery ) ; }
Source:
private void canDoActionUpdateWipeAfterDelete ( org.ovirt.engine.core.common.businessentities.VMStatus status ) { org.ovirt.engine.core.common.businessentities.DiskImage disk = createDiskImage ( ) ; disk.setReadOnly ( false ) ; org.mockito.Mockito.when ( diskDao.get ( diskImageGuid ) ) . thenReturn ( disk ) ; org.ovirt.engine.core.common.action.UpdateVmDiskParameters parameters = createParameters ( ) ; parameters.getDiskInfo ( ) . setReadOnly ( false ) ; parameters.getDiskInfo ( ) . setWipeAfterDelete ( true ) ; initializeCommand ( parameters , java.util.Collections.singletonList ( createVm ( status ) ) ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionSuccess ( command ) ; }

Target:
private void canDoActionUpdateWipeAfterDelete ( org.ovirt.engine.core.common.businessentities.VMStatus status ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage disk = createDiskImage ( ) ; disk.setReadOnly ( false ) ; org.mockito.Mockito.when ( diskDao.get ( diskImageGuid ) ) . thenReturn ( disk ) ; org.ovirt.engine.core.common.action.UpdateVmDiskParameters parameters = createParameters ( ) ; parameters.getDiskInfo ( ) . setReadOnly ( false ) ; parameters.getDiskInfo ( ) . setWipeAfterDelete ( true ) ; initializeCommand ( parameters , java.util.Collections.singletonList ( createVm ( status ) ) ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionSuccess ( command ) ; }
Source:
protected void copyVmDevices ( ) { org.ovirt.engine.core.bll.utils.VmDeviceUtils.copyVmDevices ( org.ovirt.engine.core.bll.AddVmCommand.getVmTemplateId ( ) , org.ovirt.engine.core.bll.AddVmCommand.getVmId ( ) , getSrcDeviceIdToTargetDeviceIdMapping ( ) , org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . isSoundDeviceEnabled ( ) , org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . isConsoleEnabled ( ) , isVirtioScsiEnabled ( ) ) ; }

Target:
protected void copyVmDevices ( ) { org.ovirt.engine.core.bll.utils.VmDeviceUtils.copyVmDevices ( vmDevicesSourceId , org.ovirt.engine.core.bll.AddVmCommand.getVmId ( ) , getSrcDeviceIdToTargetDeviceIdMapping ( ) , org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . isSoundDeviceEnabled ( ) , org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . isConsoleEnabled ( ) , isVirtioScsiEnabled ( ) ) ; }
Source:
public void getTemplateNicList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? new java.util.ArrayList < > ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ) ( source ) ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetTemplateInterfacesByTemplateId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
public void getGlusterSwiftServices ( org.ovirt.engine.ui.frontend.AsyncQuery < java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterServerService > > aQuery , org.ovirt.engine.core.compat.Guid serverId ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.ListConverter < > ( ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterServerServicesByServerId , new org.ovirt.engine.core.common.queries.gluster.GlusterServiceQueryParameters ( serverId , org.ovirt.engine.core.common.businessentities.gluster.ServiceType.GLUSTER_SWIFT ) , aQuery ) ; }
Source:
protected java.util.List < java.lang.Class < ? > > getValidationGroups ( ) { org.ovirt.engine.core.bll.AddVdsCommand.addValidationGroup ( org.ovirt.engine.core.common.validation.group.CreateEntity.class ) ; if ( org.ovirt.engine.core.bll.AddVdsCommand.getParameters ( ) . getVdsStaticData ( ) . getpm_enabled ( ) ) { org.ovirt.engine.core.bll.AddVdsCommand.addValidationGroup ( org.ovirt.engine.core.common.validation.group.PowerManagementCheck.class ) ; } return super . getValidationGroups ( ) ; }

Target:
protected java.util.List < java.lang.Class < ? > > getValidationGroups ( ) { org.ovirt.engine.core.bll.AddVdsCommand.addValidationGroup ( org.ovirt.engine.core.common.validation.group.CreateEntity.class ) ; if ( org.ovirt.engine.core.bll.AddVdsCommand.getParameters ( ) . getVdsStaticData ( ) . isPmEnabled ( ) ) { org.ovirt.engine.core.bll.AddVdsCommand.addValidationGroup ( org.ovirt.engine.core.common.validation.group.PowerManagementCheck.class ) ; } return super . getValidationGroups ( ) ; }
Source:
public void liveMigrateDiskBasedOnTemplate ( ) { command.getParameters ( ) . setParametersList ( createMoveDisksParameters ( ) ) ; initDiskImageBasedOnTemplate ( diskImageId ) ; initVm ( VMStatus.Up , org.ovirt.engine.core.compat.Guid.NewGuid ( ) , diskImageId ) ; org.junit.Assert.assertTrue ( command.canDoAction ( ) ) ; org.junit.Assert.assertFalse ( command.getLiveMigrateDisksParametersList ( ) . isEmpty ( ) ) ; }

Target:
public void liveMigrateDiskBasedOnTemplate ( ) { command.getParameters ( ) . setParametersList ( createMoveDisksParameters ( ) ) ; initDiskImageBasedOnTemplate ( diskImageId ) ; initVm ( VMStatus.Up , org.ovirt.engine.core.compat.Guid.newGuid ( ) , diskImageId ) ; org.junit.Assert.assertTrue ( command.canDoAction ( ) ) ; org.junit.Assert.assertFalse ( command.getLiveMigrateDisksParametersList ( ) . isEmpty ( ) ) ; }
Source:
public java.lang.String getValue ( org.ovirt.engine.ui.uicommonweb.models.vms.ImportEntityData < E > object ) { ( ( org.ovirt.engine.ui.webadmin.widget.table.cell.CustomSelectionCell ) ( getCell ( ) ) ) . setOptions ( object.getClusterNames ( ) ) ; return ( object.getCluster ( ) . getSelectedItem ( ) ) != null ? object.getCluster ( ) . getSelectedItem ( ) . getName ( ) : org.ovirt.engine.ui.webadmin.section.main.view.popup.storage.RegisterEntityPopupView.constants.empty ( ) ; }

Target:
public java.lang.String getValue ( D object ) { ( ( org.ovirt.engine.ui.webadmin.widget.table.cell.CustomSelectionCell ) ( getCell ( ) ) ) . setOptions ( object.getClusterNames ( ) ) ; return ( object.getCluster ( ) . getSelectedItem ( ) ) != null ? object.getCluster ( ) . getSelectedItem ( ) . getName ( ) : org.ovirt.engine.ui.webadmin.section.main.view.popup.storage.RegisterEntityPopupView.constants.empty ( ) ; }
Source:
public void postOnAddStorage ( ) { org.ovirt.engine.ui.uicommonweb.models.storage.StorageModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.storage.StorageModel ) ( getWindow ( ) ) ) ; if ( ! ( model.validate ( ) ) ) { return ; } if ( ( model.getCurrentStorageItem ( ) ) instanceof org.ovirt.engine.ui.uicommonweb.models.storage.NfsStorageModel ) { saveNfsStorage ( ) ; } else if ( ( model.getCurrentStorageItem ( ) ) instanceof org.ovirt.engine.ui.uicommonweb.models.storage.LocalStorageModel ) { saveLocalStorage ( ) ; } else { saveSanStorage ( ) ; } }

Target:
public void postOnAddStorage ( ) { org.ovirt.engine.ui.uicommonweb.models.storage.StorageModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.storage.StorageModel ) ( getWindow ( ) ) ) ; if ( ! ( model.validate ( ) ) ) { return ; } if ( ( model.getCurrentStorageItem ( ) ) instanceof org.ovirt.engine.ui.uicommonweb.models.storage.NfsStorageModel ) { saveNfsStorage ( ) ; } else if ( ( model.getCurrentStorageItem ( ) ) instanceof org.ovirt.engine.ui.uicommonweb.models.storage.LocalStorageModel ) { saveLocalStorage ( ) ; } else if ( ( model.getCurrentStorageItem ( ) ) instanceof org.ovirt.engine.ui.uicommonweb.models.storage.PosixStorageModel ) { savePosixStorage ( ) ; } else { saveSanStorage ( ) ; } }
Source:
private void addVmDynamic ( ) { org.ovirt.engine.core.common.businessentities.VmDynamic tempVar = new org.ovirt.engine.core.common.businessentities.VmDynamic ( ) ; tempVar.setId ( getVmId ( ) ) ; tempVar.setStatus ( VMStatus.ImageLocked ) ; tempVar.setVmHost ( "" ) ; tempVar.setVmIp ( "" ) ; tempVar.setAppList ( getParameters ( ) . getVm ( ) . getDynamicData ( ) . getAppList ( ) ) ; getVmDynamicDAO ( ) . save ( tempVar ) ; getCompensationContext ( ) . snapshotNewEntity ( tempVar ) ; }

Target:
private void addVmDynamic ( ) { org.ovirt.engine.core.common.businessentities.VmDynamic tempVar = new org.ovirt.engine.core.common.businessentities.VmDynamic ( ) ; tempVar.setId ( getVmId ( ) ) ; tempVar.setStatus ( VMStatus.ImageLocked ) ; tempVar.setVmHost ( "" ) ; tempVar.setVmIp ( "" ) ; tempVar.setAppList ( getParameters ( ) . getVm ( ) . getDynamicData ( ) . getAppList ( ) ) ; org.ovirt.engine.core.bll.ImportVmCommand.getVmDynamicDAO ( ) . save ( tempVar ) ; org.ovirt.engine.core.bll.ImportVmCommand.getCompensationContext ( ) . snapshotNewEntity ( tempVar ) ; }
Source:
private boolean changesAreClusterCompatible ( ) { if ( ! ( org.ovirt.engine.core.bll.network.cluster.AttachNetworkToClusterInternalCommand.getParameters ( ) . getNetwork ( ) . isVmNetwork ( ) ) ) { if ( ! ( org.ovirt.engine.core.common.FeatureSupported.nonVmNetwork ( org.ovirt.engine.core.bll.network.cluster.AttachNetworkToClusterInternalCommand.getVdsGroup ( ) . getCompatibilityVersion ( ) ) ) ) { addCanDoActionMessage ( VdcBllMessages.NON_VM_NETWORK_NOT_SUPPORTED_FOR_POOL_LEVEL ) ; return false ; } } return true ; }

Target:
private boolean changesAreClusterCompatible ( ) { if ( ! ( org.ovirt.engine.core.bll.network.cluster.AttachNetworkToClusterInternalCommand.getParameters ( ) . getNetwork ( ) . isVmNetwork ( ) ) ) { if ( ! ( org.ovirt.engine.core.common.FeatureSupported.nonVmNetwork ( org.ovirt.engine.core.bll.network.cluster.AttachNetworkToClusterInternalCommand.getVdsGroup ( ) . getCompatibilityVersion ( ) ) ) ) { addCanDoActionMessage ( EngineMessage.NON_VM_NETWORK_NOT_SUPPORTED_FOR_POOL_LEVEL ) ; return false ; } } return true ; }
Source:
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 ) ; }

Target:
public static void getDiskList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ( ) ; } } ; org.ovirt.engine.core.common.queries.SearchParameters searchParams = new org.ovirt.engine.core.common.queries.SearchParameters ( "Disks:" , org.ovirt.engine.core.common.interfaces.SearchType.Disk ) ; searchParams.setMaxCount ( 9999 ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , searchParams , aQuery ) ; }
Source:
public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Boolean ) ( source ) ) . booleanValue ( ) : false ; }

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.storage.RepoImage > repoList = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.RepoImage > ) ( source ) ) ; java.util.ArrayList < java.lang.String > fileNameList = new java.util.ArrayList < java.lang.String > ( ) ; for ( org.ovirt.engine.core.common.businessentities.storage.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 > ( ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.irsbroker.FileStatsReturnForXmlRpc getIsoList ( java.lang.String spUUID ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "StoragePool.getIsoList" ) . withParameter ( "storagepoolID" , spUUID ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) . withResponseKey ( "isolist" ) . withResponseType ( java.lang.Object [ ] . class ) ; return new org.ovirt.engine.core.vdsbroker.irsbroker.FileStatsReturnForXmlRpc ( response ) ; }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.VolumeInfoReturnForXmlRpc getVolumeInfo ( java.lang.String sdUUID , java.lang.String spUUID , java.lang.String imgUUID , java.lang.String volUUID ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "Volume.getInfo" ) . withParameter ( "storagepoolID" , spUUID ) . withParameter ( "storagedomainID" , sdUUID ) . withParameter ( "imageID" , imgUUID ) . withParameter ( "volumeID" , volUUID ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.VolumeInfoReturnForXmlRpc ( response ) ; }
Source:
private void logNoProxyAvailable ( org.ovirt.engine.core.compat.Guid dataCenterId ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase logable = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; logable.addCustomValue ( "StoragePoolName" , org.ovirt.engine.core.bll.GetVmsFromExternalProviderQuery.getDbFacade ( ) . getStoragePoolDao ( ) . get ( dataCenterId ) . getName ( ) ) ; auditLogDirector.log ( logable , AuditLogType.IMPORTEXPORT_NO_PROXY_HOST_AVAILABLE_IN_DC ) ; }

Target:
private void logNoProxyAvailable ( org.ovirt.engine.core.compat.Guid dataCenterId ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase logable = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; java.lang.String dcName = ( dataCenterId == null ) ? "None" : org.ovirt.engine.core.bll.GetVmsFromExternalProviderQuery.getDbFacade ( ) . getStoragePoolDao ( ) . get ( dataCenterId ) . getName ( ) ; logable.addCustomValue ( "StoragePoolName" , dcName ) ; auditLogDirector.log ( logable , AuditLogType.IMPORTEXPORT_NO_PROXY_HOST_AVAILABLE_IN_DC ) ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult isOsSupportedForVirtIoScsi ( org.ovirt.engine.core.common.businessentities.VM vm ) { final java.util.List < java.lang.String > unsupportedOSs = org.ovirt.engine.core.common.config.Config.< java.util.List < java.lang.String > > getValue ( ConfigValues.VirtIoScsiUnsupportedOsList ) ; java.lang.String vmOs = org.ovirt.engine.core.common.utils.SimpleDependecyInjector.getInstance ( ) . get ( org.ovirt.engine.core.common.osinfo.OsRepository.class ) . getUniqueOsNames ( ) . get ( vm.getVmOsId ( ) ) ; for ( java.lang.String os : unsupportedOSs ) { if ( os.equalsIgnoreCase ( vmOs ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.ACTION_TYPE_FAILED_GUEST_OS_VERSION_IS_NOT_SUPPORTED ) ; } } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult isOsSupportedForVirtIoScsi ( org.ovirt.engine.core.common.businessentities.VM vm ) { if ( ! ( org.ovirt.engine.core.bll.validator.VmValidationUtils.isOsSupportedForVirtIoScsi ( vm.getVmOsId ( ) , vm.getVdsGroupCompatibilityVersion ( ) ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.ACTION_TYPE_FAILED_GUEST_OS_VERSION_IS_NOT_SUPPORTED ) ; } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }
Source:
public static void getStorageDomainById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storageDomainId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( org.ovirt.engine.core.common.businessentities.StorageDomain ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( storageDomainId ) , aQuery ) ; }

Target:
public static void getAAAProfilesList ( 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 ? new java.util.ArrayList < java.lang.String > ( ( ( java.util.ArrayList < java.lang.String > ) ( source ) ) ) : new java.util.ArrayList < java.lang.String > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAAAProfileList , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }
Source:
public void testVMIsNotValid ( ) { org.mockito.Mockito.doReturn ( java.lang.Boolean.FALSE ) . when ( cmd ) . validateVM ( vmValidator ) ; org.mockito.Mockito.doReturn ( org.ovirt.engine.core.bll.snapshots.CreateAllSnapshotsFromVmCommandTest.getEmptyDiskList ( ) ) . when ( cmd ) . getDisksList ( ) ; org.junit.Assert.assertFalse ( cmd.validate ( ) ) ; }

Target:
public void testVMIsNotValid ( ) { org.mockito.Mockito.when ( vmValidator.vmNotSavingRestoring ( ) ) . thenReturn ( new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_VM_IS_SAVING_RESTORING ) ) ; org.mockito.Mockito.doReturn ( org.ovirt.engine.core.bll.snapshots.CreateAllSnapshotsFromVmCommandTest.getEmptyDiskList ( ) ) . when ( cmd ) . getDisksList ( ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( cmd , EngineMessage.ACTION_TYPE_FAILED_VM_IS_SAVING_RESTORING ) ; }
Source:
public static void GetHostFingerprint ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String hostAddress ) { 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.frontend.Frontend.RunQuery ( VdcQueryType.GetServerSSHKeyFingerprint , new org.ovirt.engine.core.common.queries.ServerParameters ( hostAddress ) , aQuery ) ; }

Target:
public static void getGlusterHookContent ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hookId , org.ovirt.engine.core.compat.Guid serverId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : "" ; } } ; org.ovirt.engine.core.common.queries.gluster.GlusterHookContentQueryParameters parameters = new org.ovirt.engine.core.common.queries.gluster.GlusterHookContentQueryParameters ( hookId ) ; parameters.setGlusterServerId ( serverId ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetGlusterHookContent , parameters , aQuery ) ; }
Source:
protected java.util.Map < java.lang.String , org.ovirt.engine.core.common.utils.Pair < java.lang.String , java.lang.String > > getExclusiveLocks ( ) { return java.util.Collections.singletonMap ( org.ovirt.engine.core.bll.exportimport.RemoveVmFromImportExportCommand.getVmId ( ) . toString ( ) , org.ovirt.engine.core.bll.LockMessagesMatchUtil.makeLockingPair ( LockingGroup.REMOTE_VM , getVmIsBeingRemovedFromExportDomainMessage ( ) ) ) ; }

Target:
protected java.util.Map < java.lang.String , org.ovirt.engine.core.common.utils.Pair < java.lang.String , java.lang.String > > getExclusiveLocks ( ) { return java.util.Collections.singletonMap ( org.ovirt.engine.core.bll.exportimport.RemoveVmFromImportExportCommand.getVmId ( ) . toString ( ) , org.ovirt.engine.core.bll.LockMessagesMatchUtil.makeLockingPair ( LockingGroup.REMOTE_VM , new org.ovirt.engine.core.bll.LockMessage ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_VM_IS_BEING_REMOVED_FROM_EXPORT_DOMAIN ) . withOptional ( "VmName" , org.ovirt.engine.core.bll.exportimport.RemoveVmFromImportExportCommand.getVmName ( ) ) ) ) ; }
Source:
public org.ovirt.engine.core.common.businessentities.aaa.DbUser getUserById ( org.ovirt.engine.core.compat.Guid userId ) { org.ovirt.engine.core.common.queries.IdQueryParameters queryParameters = new org.ovirt.engine.core.common.queries.IdQueryParameters ( userId ) ; org.ovirt.engine.core.common.queries.VdcQueryReturnValue userQueryResponse = runQuery ( VdcQueryType.GetDbUserByUserId , queryParameters ) ; org.ovirt.engine.core.common.businessentities.aaa.DbUser returnValue = null ; if ( ( userQueryResponse != null ) && ( userQueryResponse.getSucceeded ( ) ) ) { returnValue = userQueryResponse.getReturnValue ( ) ; } return returnValue ; }

Target:
public org.ovirt.engine.core.common.businessentities.aaa.DbUser getUserById ( org.ovirt.engine.core.compat.Guid userId ) { org.ovirt.engine.core.common.queries.IdQueryParameters queryParameters = new org.ovirt.engine.core.common.queries.IdQueryParameters ( userId ) ; org.ovirt.engine.core.common.queries.VdcQueryReturnValue userQueryResponse = runQuery ( QueryType.GetDbUserByUserId , queryParameters ) ; org.ovirt.engine.core.common.businessentities.aaa.DbUser returnValue = null ; if ( ( userQueryResponse != null ) && ( userQueryResponse.getSucceeded ( ) ) ) { returnValue = userQueryResponse.getReturnValue ( ) ; } return returnValue ; }
Source:
public javax.ws.rs.core.Response importCertificates ( org.ovirt.engine.api.model.Action action ) { org.ovirt.engine.core.common.businessentities.Provider provider = org.ovirt.engine.api.restapi.resource.BackendExternalProviderHelper.getProvider ( this , id ) ; java.util.List < org.ovirt.engine.core.common.businessentities.CertificateInfo > entities = getBackendCollection ( org.ovirt.engine.core.common.businessentities.CertificateInfo.class , VdcQueryType.GetProviderCertificateChain , new org.ovirt.engine.core.common.queries.ProviderQueryParameters ( provider ) ) ; if ( ( entities.size ( ) ) == 0 ) { return null ; } return performAction ( VdcActionType.ImportProviderCertificate , new org.ovirt.engine.core.common.action.ImportProviderCertificateParameters ( provider , entities.get ( 0 ) . getPayload ( ) ) ) ; }

Target:
public javax.ws.rs.core.Response importCertificates ( org.ovirt.engine.api.model.Action action ) { org.ovirt.engine.core.common.businessentities.Provider provider = org.ovirt.engine.api.restapi.resource.BackendExternalProviderHelper.getProvider ( this , id ) ; java.util.List < org.ovirt.engine.core.common.businessentities.CertificateInfo > entities = getBackendCollection ( org.ovirt.engine.core.common.businessentities.CertificateInfo.class , VdcQueryType.GetProviderCertificateChain , new org.ovirt.engine.core.common.queries.ProviderQueryParameters ( provider ) ) ; java.lang.String certificate = null ; if ( org.apache.commons.collections.CollectionUtils.isNotEmpty ( entities ) ) { certificate = entities.get ( 0 ) . getPayload ( ) ; } return performAction ( VdcActionType.ImportProviderCertificate , new org.ovirt.engine.core.common.action.ImportProviderCertificateParameters ( provider , certificate ) ) ; }
Source:
public void testAllDomainsHaveSpaceForNewDisksSuccess ( ) { setUpGeneralValidations ( ) ; setUpDiskValidations ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > disksList = java.util.Collections.emptyList ( ) ; org.mockito.Mockito.doReturn ( disksList ) . when ( cmd ) . getDisksList ( ) ; org.mockito.Mockito.doReturn ( ValidationResult.VALID ) . when ( multipleStorageDomainsValidator ) . allDomainsHaveSpaceForNewDisks ( disksList ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateSuccess ( cmd ) ; org.mockito.Mockito.verify ( multipleStorageDomainsValidator ) . allDomainsHaveSpaceForNewDisks ( disksList ) ; }

Target:
public void testAllDomainsHaveSpaceForAllDisksSuccess ( ) { org.mockito.Mockito.doReturn ( java.util.Collections.emptyList ( ) ) . when ( cmd ) . getDisksList ( ) ; cmd.getParameters ( ) . setSaveMemory ( true ) ; org.mockito.Mockito.doReturn ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) . when ( cmd ) . getStorageDomainIdForVmMemory ( org.mockito.ArgumentMatchers.eq ( java.util.Collections.emptyList ( ) ) ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateSuccess ( cmd ) ; org.mockito.Mockito.verify ( multipleStorageDomainsValidator ) . allDomainsHaveSpaceForAllDisks ( org.mockito.ArgumentMatchers.eq ( java.util.Collections.emptyList ( ) ) , org.mockito.ArgumentMatchers.anyList ( ) ) ; }
Source:
protected void setUpGetEntityExpectations ( int times , boolean notFound , org.ovirt.engine.core.common.businessentities.vm_pools entity ) throws java.lang.Exception { while ( ( times -- ) > 0 ) { setUpGetEntityExpectations ( VdcQueryType.GetVmPoolById , org.ovirt.engine.core.common.queries.GetVmPoolByIdParameters.class , new java.lang.String [ ] { "PoolId" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , ( notFound ? null : entity ) ) ; } }

Target:
protected void setUpGetEntityExpectations ( int times , boolean notFound , org.ovirt.engine.api.model.VmPool entity ) throws java.lang.Exception { while ( ( times -- ) > 0 ) { setUpGetEntityExpectations ( VdcQueryType.GetVmPoolById , org.ovirt.engine.core.common.queries.GetVmPoolByIdParameters.class , new java.lang.String [ ] { "PoolId" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , ( notFound ? null : entity ) ) ; } }
Source:
protected void HandleUserSession ( org.ovirt.engine.core.common.businessentities.AdUser adUser ) { if ( ! ( org.ovirt.engine.core.compat.StringHelper.isNullOrEmpty ( org.ovirt.engine.core.bll.LoginBaseCommand.getParameters ( ) . getHttpSessionId ( ) ) ) ) { org.ovirt.engine.core.dal.dbbroker.user_sessions user_sessions = new org.ovirt.engine.core.dal.dbbroker.user_sessions ( "" , "" , new java.util.Date ( ) , "" , org.ovirt.engine.core.bll.LoginBaseCommand.getParameters ( ) . getHttpSessionId ( ) , adUser.getUserId ( ) ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getDbUserDAO ( ) . saveSession ( user_sessions ) ; } }

Target:
protected void HandleUserSession ( org.ovirt.engine.core.common.businessentities.AdUser adUser ) { if ( ! ( org.apache.commons.lang.StringUtils.isEmpty ( org.ovirt.engine.core.bll.LoginBaseCommand.getParameters ( ) . getHttpSessionId ( ) ) ) ) { org.ovirt.engine.core.dal.dbbroker.user_sessions user_sessions = new org.ovirt.engine.core.dal.dbbroker.user_sessions ( "" , "" , new java.util.Date ( ) , "" , org.ovirt.engine.core.bll.LoginBaseCommand.getParameters ( ) . getHttpSessionId ( ) , adUser.getUserId ( ) ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getDbUserDAO ( ) . saveSession ( user_sessions ) ; } }
Source:
private org.ovirt.engine.ui.uicommonweb.ReportCommand addOpenReportCommand ( org.ovirt.engine.ui.uicommonweb.ReportCommand reportCommand ) { if ( openReportCommands.add ( reportCommand ) ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.IVdcQueryable > items = ( ( getSelectedItems ( ) ) != null ) ? org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.IVdcQueryable > cast ( getSelectedItems ( ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.IVdcQueryable > ( ) ; UpdateReportCommandAvailability ( reportCommand , items ) ; return reportCommand ; } else { return null ; } }

Target:
private org.ovirt.engine.ui.uicommonweb.ReportCommand addOpenReportCommand ( org.ovirt.engine.ui.uicommonweb.ReportCommand reportCommand ) { if ( openReportCommands.add ( reportCommand ) ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.IVdcQueryable > items = ( ( getSelectedItems ( ) ) != null ) ? org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.IVdcQueryable > cast ( getSelectedItems ( ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.IVdcQueryable > ( ) ; updateReportCommandAvailability ( reportCommand , items ) ; return reportCommand ; } else { return null ; } }
Source:
public void updateIScsiConnection ( ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections newNFSConnection = createNFSConnection ( "multipass.my.domain.tlv.company.com:/export/allstorage/data2" , StorageType.ISCSI , NfsVersion.V4 , 300 , 0 ) ; parameters.setStorageServerConnection ( newNFSConnection ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( command , VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_CONNECTION_UNSUPPORTED_ACTION_FOR_STORAGE ) ; }

Target:
public void updateChangeConnectionType ( ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections iscsiConnection = createISCSIConnection ( "10.35.16.25" , StorageType.ISCSI , "" , "user1" , "mypassword123" ) ; parameters.setStorageServerConnection ( iscsiConnection ) ; org.mockito.Mockito.when ( storageConnDao.get ( iscsiConnection.getid ( ) ) ) . thenReturn ( oldNFSConnection ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( command , VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_CONNECTION_UNSUPPORTED_CHANGE_STORAGE_TYPE ) ; }
Source:
protected void setUpGetEntityExpectations ( boolean notFound ) throws java.lang.Exception { setUpGetEntityExpectations ( VdcQueryType.GetPermissionById , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , ( notFound ? null : getEntity ( 0 ) ) ) ; }

Target:
protected void setUpGetEntityExpectations ( int times , boolean notFound ) throws java.lang.Exception { for ( int i = 0 ; i < times ; i ++ ) { setUpGetEntityExpectations ( VdcQueryType.GetPermissionById , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , ( notFound ? null : getEntity ( 0 ) ) ) ; } }
Source:
private boolean validateMtu ( java.util.Collection < org.ovirt.engine.core.common.businessentities.network.NetworkAttachment > attachmentsToConfigure ) { boolean passed = true ; java.util.Map < java.lang.String , java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > > nicsToNetworks = getNetworksOnNics ( attachmentsToConfigure ) ; for ( java.util.Map.Entry < java.lang.String , java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > > nicToNetwork : nicsToNetworks.entrySet ( ) ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > networksOnNic = nicToNetwork.getValue ( ) ; if ( ! ( networksOnNicMatchMtu ( networksOnNic ) ) ) { reportMtuDifferences ( networksOnNic ) ; passed = false ; } } return passed ; }

Target:
private org.ovirt.engine.core.bll.ValidationResult validateCoherentNicIdentification ( org.ovirt.engine.core.common.businessentities.network.Bond bond ) { org.ovirt.engine.core.compat.Guid nicId = bond.getId ( ) ; java.lang.String nicName = bond.getName ( ) ; org.ovirt.engine.core.common.errors.VdcBllMessages message = org.ovirt.engine.core.common.errors.VdcBllMessages.BOND_REFERENCES_NICS_INCOHERENTLY ; return validateCoherentNicIdentification ( bond.getId ( ) , nicId , nicName , message ) ; }
Source:
protected void copyVmDevices ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > devices = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmDevice > ( vmFromConfiguration.getVmUnamagedDeviceList ( ) ) ; devices.addAll ( vmFromConfiguration.getManagedVmDeviceMap ( ) . values ( ) ) ; org.ovirt.engine.core.bll.utils.VmDeviceUtils.copyVmDevices ( getVmIdFromSnapshot ( ) , org.ovirt.engine.core.bll.AddVmFromSnapshotCommand.getVmId ( ) , vmFromConfiguration , vmFromConfiguration.getStaticData ( ) , true , devices , newDiskImages , _vmInterfaces ) ; }

Target:
protected void copyVmDevices ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > devices = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmDevice > ( vmFromConfiguration.getVmUnamagedDeviceList ( ) ) ; devices.addAll ( vmFromConfiguration.getManagedVmDeviceMap ( ) . values ( ) ) ; org.ovirt.engine.core.bll.utils.VmDeviceUtils.copyVmDevices ( getVmIdFromSnapshot ( ) , org.ovirt.engine.core.bll.AddVmFromSnapshotCommand.getVmId ( ) , vmFromConfiguration , vmFromConfiguration.getStaticData ( ) , true , devices , newDiskImages , _vmInterfaces , org.ovirt.engine.core.bll.AddVmFromSnapshotCommand.getParameters ( ) . isSoundDeviceEnabled ( ) , org.ovirt.engine.core.bll.AddVmFromSnapshotCommand.getParameters ( ) . isConsoleEnabled ( ) ) ; }
Source:
public boolean isPool ( ) { return false ; }

Target:
private boolean isConsoleCommandsExecutionAllowed ( ) { final java.util.List < org.ovirt.engine.ui.uicommonweb.models.HasConsoleModel > list = getSelectedHasConsoleModels ( ) ; if ( ( list == null ) || ( list.isEmpty ( ) ) ) { return false ; } for ( org.ovirt.engine.ui.uicommonweb.models.HasConsoleModel hasConsoleModel : list ) { final org.ovirt.engine.ui.uicommonweb.models.ConsoleProtocol protocol = consoleUtils.determineConnectionProtocol ( hasConsoleModel ) ; if ( consoleUtils.canShowConsole ( protocol , hasConsoleModel ) ) { return true ; } } return false ; }
Source:
public com.google.gwt.safehtml.shared.SafeHtml getTooltip ( ) { com.google.gwt.safehtml.shared.SafeHtml tooltip = null ; if ( ( getModel ( ) . isHotPlugAvailable ( ) ) && ( ! ( getModel ( ) . getIsDiskHotPlugSupported ( ) ) ) ) { tooltip = com.google.gwt.safehtml.shared.SafeHtmlUtils.fromString ( org.ovirt.engine.ui.common.widget.uicommon.vm.VmDiskListModelTable.constants.diskHotPlugNotSupported ( ) ) ; } return tooltip ; }

Target:
public java.lang.String getTooltip ( ) { java.lang.String tooltip = "" ; if ( ( getModel ( ) . isHotPlugAvailable ( ) ) && ( ! ( getModel ( ) . getIsDiskHotPlugSupported ( ) ) ) ) { tooltip = org.ovirt.engine.ui.common.widget.uicommon.vm.VmDiskListModelTable.constants.diskHotPlugNotSupported ( ) ; } return tooltip ; }