auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private static void testParseLunForDevtypeField ( org.ovirt.engine.core.common.businessentities.storage.StorageType expectedStorageType , java.lang.String mockDevtype ) { java.util.Map < java.lang.String , java.lang.Object > xlun = new java.util.HashMap < > ( ) ; xlun.put ( GetDeviceListVDSCommand.DEVTYPE_FIELD , mockDevtype ) ; org.ovirt.engine.core.common.businessentities.storage.LUNs lun = org.ovirt.engine.core.vdsbroker.vdsbroker.GetDeviceListVDSCommand.parseLun ( xlun , Version.v4_1 ) ; org.junit.Assert.assertEquals ( expectedStorageType , lun.getLunType ( ) ) ; }

Target:
private static void testParseLunForDevtypeField ( org.ovirt.engine.core.common.businessentities.storage.StorageType expectedStorageType , java.lang.String mockDevtype ) { java.util.Map < java.lang.String , java.lang.Object > xlun = new java.util.HashMap < > ( ) ; xlun.put ( GetDeviceListVDSCommand.DEVTYPE_FIELD , mockDevtype ) ; org.ovirt.engine.core.common.businessentities.storage.LUNs lun = org.ovirt.engine.core.vdsbroker.vdsbroker.GetDeviceListVDSCommand.parseLun ( xlun , Version.v4_1 ) ; org.junit.jupiter.api.Assertions.assertEquals ( expectedStorageType , lun.getLunType ( ) ) ; }
Source:
protected java.util.List < org.ovirt.engine.ui.uicommonweb.models.vms.ImportEntityData < T > > getImportEntities ( ) { java.util.List < org.ovirt.engine.ui.uicommonweb.models.vms.ImportEntityData < T > > entities = new java.util.ArrayList < > ( ) ; for ( T item : org.ovirt.engine.ui.uicommonweb.models.storage.StorageRegisterEntityListModel.getSelectedItems ( ) ) { entities.add ( createImportEntityData ( item ) ) ; } java.util.Collections.sort ( entities , new org.ovirt.engine.ui.uicommonweb.Linq.ImportEntityComparator < T > ( ) ) ; return entities ; }

Target:
protected java.util.List < D > getImportEntities ( ) { java.util.List < D > entities = new java.util.ArrayList < > ( ) ; for ( T item : org.ovirt.engine.ui.uicommonweb.models.storage.StorageRegisterEntityListModel.getSelectedItems ( ) ) { entities.add ( createImportEntityData ( item ) ) ; } java.util.Collections.sort ( entities , new org.ovirt.engine.ui.uicommonweb.Linq.ImportEntityComparator < T > ( ) ) ; return entities ; }
Source:
void initEditors ( ) { volumeTypeListEditor = new org.ovirt.engine.ui.common.widget.editor.ListModelListBoxEditor < org.ovirt.engine.core.common.businessentities.VolumeType > ( new org.ovirt.engine.ui.common.widget.renderer.EnumRenderer < org.ovirt.engine.core.common.businessentities.VolumeType > ( ) ) ; storageListEditor = new org.ovirt.engine.ui.common.widget.editor.ListModelListBoxEditor < org.ovirt.engine.core.common.businessentities.StorageDomain > ( new org.ovirt.engine.ui.common.widget.renderer.StorageDomainFreeSpaceRenderer < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) ) ; sourceStorageListEditor = new org.ovirt.engine.ui.common.widget.editor.ListModelListBoxEditor < org.ovirt.engine.core.common.businessentities.StorageDomain > ( new org.ovirt.engine.ui.common.widget.renderer.StorageDomainFreeSpaceRenderer < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) ) ; quotaListEditor = new org.ovirt.engine.ui.common.widget.editor.ListModelListBoxEditor < org.ovirt.engine.core.common.businessentities.Quota > ( new org.ovirt.engine.ui.common.widget.renderer.NullSafeRenderer < org.ovirt.engine.core.common.businessentities.Quota > ( ) { @ java.lang.Override public java.lang.String renderNullSafe ( org.ovirt.engine.core.common.businessentities.Quota quota ) { return quota.getQuotaName ( ) ; } } ) ; }

Target:
protected java.lang.String renderNullSafe ( org.ovirt.engine.core.common.businessentities.profiles.DiskProfile object ) { return object.getName ( ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeSnapshotInfoReturnForXmlRpc glusterSnapshotInfo ( org.ovirt.engine.core.compat.Guid clusterId , java.lang.String volumeName , java.lang.String snapshotName ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "GlusterSnapshot.info" ) . withOptionalParameter ( "snapName" , snapshotName ) . withOptionalParameter ( "volumeName" , volumeName ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) . withIgnoreResponseKey ( ) ; return new org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeSnapshotInfoReturnForXmlRpc ( clusterId , volumeName , response ) ; }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc glusterSnapshotDelete ( java.lang.String snapshotName ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "GlusterSnapshot.delete" ) . withOptionalParameter ( "snapName" , snapshotName ) . 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.StatusOnlyReturnForXmlRpc ( response ) ; }
Source:
public void getUpHostListByCluster ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String clusterName ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > list = org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VDS > cast ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.IVdcQueryable > ) ( source ) ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( ) ; } } ; getUpHostListByCluster ( aQuery , clusterName , null ) ; }

Target:
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.LUNs > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.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 ) ; }
Source:
public void getNumberOfActiveVmsInCluster ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { if ( ( aQuery.converterCallback ) == null ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return java.lang.Integer.valueOf ( 0 ) ; } return source ; } } ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetNumberOfActiveVmsInVdsGroupByVdsGroupId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( clusterId ) , aQuery ) ; }

Target:
public void getSpiceUsbAutoShare ( 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.Boolean ) ( source ) ) ; } } ; getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.SpiceUsbAutoShare , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
protected void verifyModelOnNewCluster ( org.ovirt.engine.api.model.Vm model , int index ) { org.junit.Assert.assertNotNull ( model.getCluster ( ) . getId ( ) ) ; org.junit.Assert.assertEquals ( GUIDS [ 1 ] . toString ( ) , model.getCluster ( ) . getId ( ) ) ; verifyModel ( model , index ) ; }

Target:
protected void verifyModelOnNewCluster ( org.ovirt.engine.api.model.Vm model , int index ) { org.junit.jupiter.api.Assertions.assertNotNull ( model.getCluster ( ) . getId ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( GUIDS [ 1 ] . toString ( ) , model.getCluster ( ) . getId ( ) ) ; verifyModel ( model , index ) ; }
Source:
public 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.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainsByConnection , param , aQuery ) ; }

Target:
public void getExistingStorageDomainList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hostId , org.ovirt.engine.core.common.businessentities.StorageDomainType domainType , org.ovirt.engine.core.common.businessentities.storage.StorageType storageType , java.lang.String path ) { 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.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetExistingStorageDomainList , new org.ovirt.engine.core.common.queries.GetExistingStorageDomainListParameters ( hostId , storageType , domainType , path ) , aQuery ) ; }
Source:
public org.ovirt.engine.core.searchbackend.IConditionValueAutoCompleter getFieldValueAutoCompleter ( java.lang.String fieldName ) { if ( "OS" . equals ( fieldName ) ) { return new org.ovirt.engine.core.searchbackend.EnumValueAutoCompleter ( org.ovirt.engine.core.common.businessentities.VmOsType.class ) ; } else if ( "CREATIONDATE" . equals ( fieldName ) ) { return new org.ovirt.engine.core.searchbackend.DateEnumValueAutoCompleter ( org.ovirt.engine.core.common.businessentities.DateEnumForSearch.class ) ; } else if ( "STATUS" . equals ( fieldName ) ) { return new org.ovirt.engine.core.searchbackend.EnumValueAutoCompleter ( org.ovirt.engine.core.common.businessentities.VmTemplateStatus.class ) ; } return null ; }

Target:
public org.ovirt.engine.core.searchbackend.IConditionValueAutoCompleter getFieldValueAutoCompleter ( java.lang.String fieldName ) { if ( "OS" . equals ( fieldName ) ) { return new org.ovirt.engine.core.searchbackend.EnumValueAutoCompleter ( org.ovirt.engine.core.common.businessentities.VmOsType.class ) ; } else if ( "CREATIONDATE" . equals ( fieldName ) ) { return new org.ovirt.engine.core.searchbackend.DateEnumValueAutoCompleter ( org.ovirt.engine.core.common.businessentities.DateEnumForSearch.class ) ; } else if ( "STATUS" . equals ( fieldName ) ) { return new org.ovirt.engine.core.searchbackend.EnumValueAutoCompleter ( org.ovirt.engine.core.common.businessentities.VmTemplateStatus.class ) ; } else if ( "QUOTA" . equals ( fieldName ) ) { return new org.ovirt.engine.core.searchbackend.NullableStringAutoCompleter ( ) ; } return null ; }
Source:
public static void getClusterServerMemoryOverCommit ( 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.Integer ) ( source ) ) . intValue ( ) : 0 ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.MaxVdsMemOverCommitForServers , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public static void getDefaultSpmPriority ( 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.Integer ) ( source ) ) . intValue ( ) : 0 ; } } ; aQuery.asyncCallback.onSuccess ( aQuery.getModel ( ) , 5 ) ; }
Source:
public java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > getPermissionCheckSubjects ( ) { java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > permissionList = new java.util.ArrayList < org.ovirt.engine.core.bll.utils.PermissionSubject > ( ) ; for ( org.ovirt.engine.core.common.action.LiveMigrateDiskParameters parameters : getParameters ( ) . getParametersList ( ) ) { permissionList.add ( new org.ovirt.engine.core.bll.utils.PermissionSubject ( parameters.getImageId ( ) , org.ovirt.engine.core.common.VdcObjectType.Disk , org.ovirt.engine.core.common.businessentities.ActionGroup.CONFIGURE_DISK_STORAGE ) ) ; setStoragePoolId ( getVm ( ) . getStoragePoolId ( ) ) ; addStoragePermissionByQuotaMode ( permissionList , org.ovirt.engine.core.bll.lsm.LiveMigrateVmDisksCommand.getStoragePoolId ( ) . getValue ( ) , parameters.getStorageDomainId ( ) ) ; } return permissionList ; }

Target:
public java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > getPermissionCheckSubjects ( ) { java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > permissionList = new java.util.ArrayList < org.ovirt.engine.core.bll.utils.PermissionSubject > ( ) ; for ( org.ovirt.engine.core.common.action.LiveMigrateDiskParameters parameters : getParameters ( ) . getParametersList ( ) ) { permissionList.add ( new org.ovirt.engine.core.bll.utils.PermissionSubject ( parameters.getImageId ( ) , org.ovirt.engine.core.common.VdcObjectType.Disk , org.ovirt.engine.core.common.businessentities.ActionGroup.CONFIGURE_DISK_STORAGE ) ) ; permissionList.add ( new org.ovirt.engine.core.bll.utils.PermissionSubject ( parameters.getStorageDomainId ( ) , org.ovirt.engine.core.common.VdcObjectType.Storage , org.ovirt.engine.core.common.businessentities.ActionGroup.CREATE_DISK ) ) ; } return permissionList ; }
Source:
private java.util.ArrayList < java.lang.String > getSelectedDeviceNames ( ) { java.util.ArrayList < java.lang.String > deviceNames = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.HostDevice vmHostDevice : getSelectedItems ( ) ) { deviceNames.add ( vmHostDevice.getDeviceName ( ) ) ; } return deviceNames ; }

Target:
private java.util.ArrayList < java.lang.String > getSelectedPrimaryDeviceNames ( ) { java.util.ArrayList < java.lang.String > deviceNames = new java.util.ArrayList < > ( ) ; if ( ( getSelectedItems ( ) ) != null ) { for ( org.ovirt.engine.core.common.businessentities.HostDeviceView vmHostDevice : getSelectedItems ( ) ) { if ( ! ( vmHostDevice.isIommuPlaceholder ( ) ) ) { deviceNames.add ( vmHostDevice.getDeviceName ( ) ) ; } } } return deviceNames ; }
Source:
public void onResponseReceived ( com.google.gwt.http.client.Request request , com.google.gwt.http.client.Response response ) { if ( ( response.getStatusCode ( ) ) == ( com.google.gwt.http.client.Response.SC_OK ) ) { processResponse ( response ) ; } else { org.ovirt.engine.ui.webadmin.plugin.restapi.RestApiSessionManager.logger.warning ( ( "Engine REST API responded with non-OK status code " + ( response.getStatusCode ( ) ) ) ) ; } }

Target:
public void onResponseReceived ( com.google.gwt.http.client.Request request , com.google.gwt.http.client.Response response ) { if ( ( response.getStatusCode ( ) ) == ( com.google.gwt.http.client.Response.SC_OK ) ) { processResponse ( response ) ; } else { org.ovirt.engine.ui.common.restapi.RestApiSessionManager.logger.warning ( ( "Engine REST API responded with non-OK status code " + ( response.getStatusCode ( ) ) ) ) ; } }
Source:
protected void init ( ) { super . init ( ) ; if ( ( org.ovirt.engine.core.bll.RunVmCommand.getVm ( ) ) != null ) { needsHostDevices = hostDeviceManager.checkVmNeedsDirectPassthrough ( org.ovirt.engine.core.bll.RunVmCommand.getVm ( ) ) ; } loadVmInit ( ) ; }

Target:
protected void init ( ) { super . init ( ) ; if ( ( org.ovirt.engine.core.bll.RunVmCommand.getVm ( ) ) != null ) { needsHostDevices = hostDeviceManager.checkVmNeedsDirectPassthrough ( org.ovirt.engine.core.bll.RunVmCommand.getVm ( ) ) ; } loadVmInit ( ) ; fetchVmDisksFromDb ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.storage.CinderDisk > cinderDisks = org.ovirt.engine.core.bll.storage.disk.image.ImagesHandler.filterDisksBasedOnCinder ( org.ovirt.engine.core.bll.RunVmCommand.getVm ( ) . getDiskMap ( ) . values ( ) ) ; org.ovirt.engine.core.bll.RunVmCommand.getParameters ( ) . setUseCinderCommandCallback ( ( ! ( cinderDisks.isEmpty ( ) ) ) ) ; }
Source:
protected boolean validate ( ) { if ( ( getStoragePool ( ) ) == null ) { addValidationMessage ( EngineMessage.ACTION_TYPE_FAILED_STORAGE_POOL_NOT_EXIST ) ; return false ; } if ( ( getQuotaId ( ) ) == null ) { addValidationMessage ( EngineMessage.ACTION_TYPE_FAILED_QUOTA_IS_NOT_VALID ) ; return false ; } if ( ( getDbFacade ( ) . getQuotaDao ( ) . getById ( getQuotaId ( ) ) ) == null ) { addValidationMessage ( EngineMessage.ACTION_TYPE_FAILED_QUOTA_NOT_EXIST ) ; return false ; } return true ; }

Target:
protected boolean validate ( ) { if ( ( getStoragePool ( ) ) == null ) { addValidationMessage ( EngineMessage.ACTION_TYPE_FAILED_STORAGE_POOL_NOT_EXIST ) ; return false ; } if ( ( getQuotaId ( ) ) == null ) { addValidationMessage ( EngineMessage.ACTION_TYPE_FAILED_QUOTA_IS_NOT_VALID ) ; return false ; } if ( ( quotaDao.getById ( getQuotaId ( ) ) ) == null ) { addValidationMessage ( EngineMessage.ACTION_TYPE_FAILED_QUOTA_NOT_EXIST ) ; return false ; } return true ; }
Source:
public void mapGuestAgentSsoFromRestToBackend ( ) throws java.lang.Exception { org.ovirt.engine.api.model.Sso restSso = new org.ovirt.engine.api.model.Sso ( ) ; restSso.setMethods ( new org.ovirt.engine.api.model.Methods ( ) ) ; org.ovirt.engine.api.model.Method guestAgent = new org.ovirt.engine.api.model.Method ( ) ; guestAgent.setId ( org.ovirt.engine.api.model.SsoMethod.GUEST_AGENT.toString ( ) ) ; restSso.getMethods ( ) . getMethods ( ) . add ( guestAgent ) ; org.ovirt.engine.core.common.businessentities.SsoMethod expectedBackendSsoMethod = org.ovirt.engine.core.common.businessentities.SsoMethod.GUEST_AGENT ; junit.framework.Assert.assertEquals ( expectedBackendSsoMethod , org.ovirt.engine.api.restapi.types.SsoMapper.map ( restSso , null ) ) ; }

Target:
public void mapGuestAgentSsoFromRestToBackend ( ) throws java.lang.Exception { org.ovirt.engine.api.model.Sso restSso = new org.ovirt.engine.api.model.Sso ( ) ; restSso.setMethods ( new org.ovirt.engine.api.model.Methods ( ) ) ; org.ovirt.engine.api.model.Method guestAgent = new org.ovirt.engine.api.model.Method ( ) ; guestAgent.setId ( org.ovirt.engine.api.model.SsoMethod.GUEST_AGENT.toString ( ) ) ; restSso.getMethods ( ) . getMethods ( ) . add ( guestAgent ) ; org.ovirt.engine.core.common.businessentities.SsoMethod expectedBackendSsoMethod = org.ovirt.engine.core.common.businessentities.SsoMethod.GUEST_AGENT ; org.junit.Assert.assertEquals ( expectedBackendSsoMethod , org.ovirt.engine.api.restapi.types.SsoMapper.map ( restSso , null ) ) ; }
Source:
public void starting ( org.junit.runners.model.FrameworkMethod method ) { origConfUtils = org.ovirt.engine.core.common.config.Config.getConfigUtils ( ) ; org.ovirt.engine.core.common.config.Config.setConfigUtils ( org.mockito.Mockito.mock ( org.ovirt.engine.core.common.config.IConfigUtilsInterface.class ) ) ; for ( org.ovirt.engine.core.utils.MockConfigRule.MockConfigDescriptor < ? > config : configs ) { mockConfigValue ( config.getValue ( ) , config.getVersion ( ) , config.getReturnValue ( ) ) ; } }

Target:
public void starting ( org.junit.runner.Description description ) { origConfUtils = org.ovirt.engine.core.common.config.Config.getConfigUtils ( ) ; org.ovirt.engine.core.common.config.Config.setConfigUtils ( org.mockito.Mockito.mock ( org.ovirt.engine.core.common.config.IConfigUtilsInterface.class ) ) ; for ( org.ovirt.engine.core.utils.MockConfigRule.MockConfigDescriptor < ? > config : configs ) { mockConfigValue ( config.getValue ( ) , config.getVersion ( ) , config.getReturnValue ( ) ) ; } }
Source:
public void testAddIncompleteParameters ( ) throws java.lang.Exception { org.ovirt.engine.api.model.Disk model = new org.ovirt.engine.api.model.Disk ( ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; control.replay ( ) ; try { collection.add ( model ) ; fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "Disk" , "validateDiskForCreation" , "format" , "interface" ) ; } }

Target:
public void testAddIncompleteParameters ( ) throws java.lang.Exception { org.ovirt.engine.api.model.Disk model = new org.ovirt.engine.api.model.Disk ( ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; control.replay ( ) ; try { collection.add ( model ) ; fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "Disk" , "testAddIncompleteParameters" , "format" , "interface" ) ; } }
Source:
public void edit ( org.ovirt.engine.ui.uicommonweb.models.providers.ProviderModel model ) { setAgentTabVisibility ( model.getNeutronAgentModel ( ) . isPluginConfigurationAvailable ( ) . getEntity ( ) ) ; driver.edit ( model ) ; neutronAgentWidget.edit ( model.getNeutronAgentModel ( ) ) ; }

Target:
public void edit ( org.ovirt.engine.ui.uicommonweb.models.providers.ProviderModel model ) { setAgentTabVisibility ( model.getNeutronAgentModel ( ) . isPluginConfigurationAvailable ( ) . getEntity ( ) ) ; driver.edit ( model ) ; neutronAgentWidget.edit ( model.getNeutronAgentModel ( ) ) ; vmwarePropertiesWidget.edit ( model.getVmwarePropertiesModel ( ) ) ; }
Source:
public org.ovirt.engine.core.common.AuditLogType getAuditLogTypeValue ( ) { return ! ( _hasFlags ) ? org.ovirt.engine.core.common.AuditLogType.VDS_CPU_RETRIEVE_FAILED : org.ovirt.engine.core.common.AuditLogType.VDS_CPU_LOWER_THAN_CLUSTER ; }

Target:
public org.ovirt.engine.core.common.AuditLogType getAuditLogTypeValue ( ) { if ( ! ( foundCPU ) ) { return org.ovirt.engine.core.common.AuditLogType.CPU_TYPE_UNSUPPORTED_IN_THIS_CLUSTER_VERSION ; } else if ( ! ( architectureMatch ) ) { return org.ovirt.engine.core.common.AuditLogType.VDS_ARCHITECTURE_NOT_SUPPORTED_FOR_CLUSTER ; } else if ( ! ( _hasFlags ) ) { return org.ovirt.engine.core.common.AuditLogType.VDS_CPU_RETRIEVE_FAILED ; } else { return org.ovirt.engine.core.common.AuditLogType.VDS_CPU_LOWER_THAN_CLUSTER ; } }
Source:
public void setItems ( java.lang.Iterable value ) { if ( ( items ) != value ) { ItemsChanging ( value , items ) ; items = value ; ItemsChanged ( ) ; getItemsChangedEvent ( ) . raise ( this , EventArgs.Empty ) ; OnPropertyChanged ( new org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ( "Items" ) ) ; } }

Target:
public void setItems ( java.lang.Iterable value ) { if ( ( items ) != value ) { itemsChanging ( value , items ) ; items = value ; itemsChanged ( ) ; getItemsChangedEvent ( ) . raise ( this , EventArgs.Empty ) ; onPropertyChanged ( new org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ( "Items" ) ) ; } }
Source:
private void auditLogHotSetMemCandos ( org.ovirt.engine.core.common.action.HotSetAmountOfMemoryParameters params , org.ovirt.engine.core.common.action.VdcReturnValueBase setAmountOfMemoryResult ) { if ( ! ( setAmountOfMemoryResult.getCanDoAction ( ) ) ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase logable = new org.ovirt.engine.core.bll.HotSetAmountOfMemoryCommand ( params ) ; java.util.List < java.lang.String > canDos = org.ovirt.engine.core.bll.UpdateVmCommand.getBackend ( ) . getErrorsTranslator ( ) . TranslateErrorText ( setAmountOfMemoryResult.getCanDoActionMessages ( ) ) ; logable.addCustomValue ( HotSetAmountOfMemoryCommand.LOGABLE_FIELD_ERROR_MESSAGE , org.apache.commons.lang.StringUtils.join ( canDos , "," ) ) ; auditLogDirector.log ( logable , AuditLogType.FAILED_HOT_SET_NUMBER_OF_CPUS ) ; } }

Target:
private void auditLogHotSetMemCandos ( org.ovirt.engine.core.common.action.HotSetAmountOfMemoryParameters params , org.ovirt.engine.core.common.action.VdcReturnValueBase setAmountOfMemoryResult ) { if ( ! ( setAmountOfMemoryResult.getCanDoAction ( ) ) ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase logable = new org.ovirt.engine.core.bll.HotSetAmountOfMemoryCommand ( params ) ; java.util.List < java.lang.String > canDos = org.ovirt.engine.core.bll.UpdateVmCommand.getBackend ( ) . getErrorsTranslator ( ) . TranslateErrorText ( setAmountOfMemoryResult.getCanDoActionMessages ( ) ) ; logable.addCustomValue ( HotSetAmountOfMemoryCommand.LOGABLE_FIELD_ERROR_MESSAGE , org.apache.commons.lang.StringUtils.join ( canDos , "," ) ) ; auditLogDirector.log ( logable , AuditLogType.FAILED_HOT_SET_MEMORY ) ; } }
Source:
private java.util.Map < java.lang.Class < ? > , java.lang.Object > getMap ( ) { if ( ( currents.get ( ) ) == null ) { currents.set ( new java.util.HashMap < java.lang.Class < ? > , java.lang.Object > ( ) { { put ( org.ovirt.engine.api.common.invocation.MetaData.class , new org.ovirt.engine.api.common.invocation.MetaData ( ) ) ; } } ) ; } return currents.get ( ) ; }

Target:
private java.util.Map < java.lang.Class < ? > , java.lang.Object > getMap ( ) { if ( ( org.ovirt.engine.api.common.invocation.Current.currents.get ( ) ) == null ) { org.ovirt.engine.api.common.invocation.Current.currents.set ( new java.util.HashMap < java.lang.Class < ? > , java.lang.Object > ( ) { { put ( org.ovirt.engine.api.common.invocation.MetaData.class , new org.ovirt.engine.api.common.invocation.MetaData ( ) ) ; } } ) ; } return org.ovirt.engine.api.common.invocation.Current.currents.get ( ) ; }
Source:
private boolean isRemoveCommandAvailable ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > disks ) { for ( org.ovirt.engine.core.common.businessentities.DiskImage disk : disks ) { boolean isImageLocked = ( disk.getImageStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.ImageStatus.LOCKED ) ; boolean isTemplateType = disk.getVmEntityType ( ) . isTemplateType ( ) ; if ( isImageLocked || isTemplateType ) { return false ; } } return true ; }

Target:
private boolean isRemoveCommandAvailable ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.DiskImage > disks ) { for ( org.ovirt.engine.core.common.businessentities.storage.DiskImage disk : disks ) { boolean isImageLocked = ( disk.getImageStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.storage.ImageStatus.LOCKED ) ; boolean isTemplateType = disk.getVmEntityType ( ) . isTemplateType ( ) ; if ( isImageLocked || isTemplateType ) { return false ; } } return true ; }
Source:
public void testGetBrandingThemes ( ) { java.util.List < org.ovirt.engine.core.utils.branding.BrandingTheme > result = testManager.getBrandingThemes ( ) ; org.junit.Assert.assertNotNull ( "There should be a result" , result ) ; org.junit.Assert.assertEquals ( "There should be one active theme" , 1 , result.size ( ) ) ; java.util.List < org.ovirt.engine.core.utils.branding.BrandingTheme > result2 = testManager.getBrandingThemes ( ) ; org.junit.Assert.assertNotNull ( "There should be a result" , result2 ) ; org.junit.Assert.assertEquals ( "There should be one active theme" , 1 , result2.size ( ) ) ; org.junit.Assert.assertTrue ( "The result are not the same object" , ( result == result2 ) ) ; }

Target:
public void testGetBrandingThemes ( ) { java.util.List < org.ovirt.engine.core.utils.branding.BrandingTheme > result = testManager.getBrandingThemes ( ) ; org.junit.Assert.assertNotNull ( "There should be a result" , result ) ; org.junit.Assert.assertEquals ( "There should be five active themes" , 5 , result.size ( ) ) ; java.util.List < org.ovirt.engine.core.utils.branding.BrandingTheme > result2 = testManager.getBrandingThemes ( ) ; org.junit.Assert.assertNotNull ( "There should be a result" , result2 ) ; org.junit.Assert.assertEquals ( "There should be five active themes" , 5 , result2.size ( ) ) ; org.junit.Assert.assertTrue ( "The result are not the same object" , ( result == result2 ) ) ; }
Source:
private void translateVolumeType ( org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity volumeEntity ) { org.ovirt.engine.ui.uicompat.Translator translator = org.ovirt.engine.ui.uicompat.EnumTranslator.getInstance ( ) ; if ( translator.containsKey ( volumeEntity.getVolumeType ( ) ) ) { getDetailModel ( ) . setVolumeTypeSilently ( translator.get ( volumeEntity.getVolumeType ( ) ) ) ; } }

Target:
private void translateVolumeType ( org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity volumeEntity ) { org.ovirt.engine.ui.uicompat.EnumTranslator translator = org.ovirt.engine.ui.uicompat.EnumTranslator.getInstance ( ) ; if ( translator.containsKey ( volumeEntity.getVolumeType ( ) ) ) { getDetailModel ( ) . setVolumeTypeSilently ( translator.translate ( volumeEntity.getVolumeType ( ) ) ) ; } }
Source:
public static void getTemplateDiskList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid templateId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmTemplatesDisks , new org.ovirt.engine.core.common.queries.IdQueryParameters ( templateId ) , aQuery ) ; }

Target:
public void getTemplateDiskList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid templateId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.DiskImage > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmTemplatesDisks , new org.ovirt.engine.core.common.queries.IdQueryParameters ( templateId ) , aQuery ) ; }
Source:
protected void syncSearch ( ) { if ( ( getEntity ( ) ) == null ) { return ; } org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery = new org.ovirt.engine.ui.frontend.AsyncQuery ( ) ; asyncQuery.setModel ( this ) ; asyncQuery.asyncCallback = new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.networks.NetworkProfileListModel.this . setItems ( ( ( java.util.List < org.ovirt.engine.core.common.businessentities.network.VnicProfileView > ) ( returnValue ) ) ) ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getVnicProfilesByNetworkId ( asyncQuery , getEntity ( ) . getId ( ) ) ; }

Target:
protected void syncSearch ( ) { if ( ( getEntity ( ) ) == null ) { return ; } org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery = new org.ovirt.engine.ui.frontend.AsyncQuery ( ) ; asyncQuery.setModel ( this ) ; asyncQuery.asyncCallback = new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { setItems ( ( ( java.util.Collection < org.ovirt.engine.core.common.businessentities.network.VnicProfileView > ) ( returnValue ) ) ) ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getVnicProfilesByNetworkId ( asyncQuery , getEntity ( ) . getId ( ) ) ; }
Source:
public void calculateNetworkImplementationDetailsNetworkQosOutOfSync ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface = createNetworkDevice ( ) ; org.ovirt.engine.core.common.businessentities.network.NetworkQoS qos = createQos ( ) ; qos.setOutboundAverage ( 30 ) ; qos.setOutboundPeak ( 30 ) ; qos.setOutboundBurst ( 30 ) ; calculateNetworkImplementationDetailsAndAssertSync ( iface , false , iface.getNetworkName ( ) , iface.isBridged ( ) , iface.getMtu ( ) , iface.getVlanId ( ) , qos ) ; }

Target:
public void calculateNetworkImplementationDetailsInterfaceQosMissing ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface = createNetworkDevice ( ) ; iface.setQos ( null ) ; calculateNetworkImplementationDetailsAndAssertSync ( iface , false , iface.isBridged ( ) , iface.getMtu ( ) , iface.getVlanId ( ) , createQos ( ) ) ; }
Source:
public void onMainModelSelectionChange ( org.ovirt.engine.ui.common.uicommon.model.MainModelSelectionChangeEvent event ) { if ( ( event.getMainModel ( ) ) == ( getModel ( ) ) ) { if ( event.getMainModel ( ) . getIsAvailable ( ) ) { placeManager.revealPlace ( getMainTabRequest ( ) ) ; } else { revealActiveMainModelPresenter ( ) ; } } }

Target:
public void onMainModelSelectionChange ( org.ovirt.engine.ui.uicommonweb.models.MainModelSelectionChangeEvent event ) { if ( ( event.getMainModel ( ) ) == ( getModel ( ) ) ) { if ( event.getMainModel ( ) . getIsAvailable ( ) ) { placeManager.revealPlace ( getMainTabRequest ( ) ) ; } else { revealActiveMainModelPresenter ( ) ; } } }
Source:
public void testConflictedUpdate ( ) throws java.lang.Exception { setUpGetEntityExpectations ( 1 ) ; org.ovirt.engine.core.common.businessentities.Cluster model = org.ovirt.engine.api.restapi.resource.BackendClustersResourceTest.getModel ( 1 ) ; model.setId ( GUIDS [ 1 ] . toString ( ) ) ; try { resource.update ( model ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyImmutabilityConstraint ( wae ) ; } }

Target:
public void testConflictedUpdate ( ) throws java.lang.Exception { setUpGetEntityExpectations ( 1 ) ; org.ovirt.engine.core.common.businessentities.Cluster model = org.ovirt.engine.api.restapi.resource.BackendClustersResourceTest.getModel ( 1 ) ; model.setId ( GUIDS [ 1 ] . toString ( ) ) ; try { resource.update ( model ) ; org.junit.Assert.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyImmutabilityConstraint ( wae ) ; } }
Source:
private org.ovirt.engine.core.common.action.VdcReturnValueBase notAllowedInPrepForMaintMode ( org.ovirt.engine.core.common.action.VdcActionType action ) { java.lang.Class < org.ovirt.engine.core.bll.CommandBase < ? extends org.ovirt.engine.core.common.action.VdcActionParametersBase > > clazz = org.ovirt.engine.core.bll.CommandsFactory.getCommandClass ( action.name ( ) ) ; if ( clazz.isAnnotationPresent ( org.ovirt.engine.core.bll.DisableInPrepareMode.class ) ) { return getErrorCommandReturnValue ( EngineMessage.ENGINE_IS_RUNNING_IN_PREPARE_MODE ) ; } return null ; }

Target:
private org.ovirt.engine.core.common.action.ActionReturnValue notAllowedInPrepForMaintMode ( org.ovirt.engine.core.common.action.ActionType action ) { java.lang.Class < ? > clazz = org.ovirt.engine.core.bll.CommandsFactory.getCommandClass ( action.name ( ) ) ; if ( clazz.isAnnotationPresent ( org.ovirt.engine.core.bll.DisableInPrepareMode.class ) ) { return getErrorCommandReturnValue ( EngineMessage.ENGINE_IS_RUNNING_IN_PREPARE_MODE ) ; } return null ; }
Source:
public void testRemoveNonExistant ( ) { setUpGetEntityExpectations ( GUIDS [ 0 ] , true ) ; try { resource.remove ( ) ; org.junit.jupiter.api.Assertions.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { org.junit.jupiter.api.Assertions.assertNotNull ( wae.getResponse ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( 404 , wae.getResponse ( ) . getStatus ( ) ) ; } }

Target:
public void testRemoveNonExistant ( ) { setUpGetEntityExpectations ( GUIDS [ 0 ] , true ) ; try { resource.remove ( ) ; org.junit.jupiter.api.Assertions.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { java.lang.String propName = ( ( org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ) ( args ) ) . PropertyName ; if ( "IsHostTabVisible" . equals ( propName ) ) { hostPanel.setVisible ( object.getIsHostTabVisible ( ) ) ; } else if ( "IsCustomPropertiesSheetVisible" . equals ( propName ) ) { customPropertiesPanel.setVisible ( object.getIsCustomPropertiesSheetVisible ( ) ) ; } }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { java.lang.String propName = ( ( org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ) ( args ) ) . propertyName ; if ( "IsHostTabVisible" . equals ( propName ) ) { hostPanel.setVisible ( object.getIsHostTabVisible ( ) ) ; } else if ( "IsCustomPropertiesSheetVisible" . equals ( propName ) ) { customPropertiesPanel.setVisible ( object.getIsCustomPropertiesSheetVisible ( ) ) ; } }
Source:
public void executeCommand ( ) { super . executeCommand ( ) ; if ( org.ovirt.engine.core.bll.ImportVmFromConfigurationCommand.getSucceeded ( ) ) { if ( org.ovirt.engine.core.bll.ImportVmFromConfigurationCommand.isImagesAlreadyOnTarget ( ) ) { org.ovirt.engine.core.bll.ImportVmFromConfigurationCommand.getUnregisteredOVFDataDao ( ) . removeEntity ( ovfEntityData.getEntityId ( ) , null ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.log ( this , AuditLogType.VM_IMPORT_FROM_CONFIGURATION_EXECUTED_SUCCESSFULLY ) ; } else if ( ! ( vmDisksToAttach.isEmpty ( ) ) ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.log ( this , attemptToAttachDisksToImportedVm ( vmDisksToAttach ) ) ; } } setActionReturnValue ( org.ovirt.engine.core.bll.ImportVmFromConfigurationCommand.getVm ( ) . getId ( ) ) ; }

Target:
public void executeCommand ( ) { super . executeCommand ( ) ; if ( org.ovirt.engine.core.bll.ImportVmFromConfigurationCommand.getSucceeded ( ) ) { if ( org.ovirt.engine.core.bll.ImportVmFromConfigurationCommand.isImagesAlreadyOnTarget ( ) ) { org.ovirt.engine.core.bll.ImportVmFromConfigurationCommand.getUnregisteredOVFDataDao ( ) . removeEntity ( ovfEntityData.getEntityId ( ) , null ) ; auditLogDirector.log ( this , AuditLogType.VM_IMPORT_FROM_CONFIGURATION_EXECUTED_SUCCESSFULLY ) ; } else if ( ! ( vmDisksToAttach.isEmpty ( ) ) ) { auditLogDirector.log ( this , attemptToAttachDisksToImportedVm ( vmDisksToAttach ) ) ; } } setActionReturnValue ( org.ovirt.engine.core.bll.ImportVmFromConfigurationCommand.getVm ( ) . getId ( ) ) ; }
Source:
protected org.ovirt.engine.core.common.vdscommands.CreateVmVDSCommandParameters initVdsCreateVmParams ( ) { org.ovirt.engine.core.bll.RunVmOnceCommand.getVm ( ) . setRunOnce ( true ) ; org.ovirt.engine.core.common.vdscommands.CreateVmVDSCommandParameters createVmParams = super . initVdsCreateVmParams ( ) ; org.ovirt.engine.core.common.action.SysPrepParams sysPrepParams = new org.ovirt.engine.core.common.action.SysPrepParams ( ) ; org.ovirt.engine.core.common.action.RunVmOnceParams runOnceParams = org.ovirt.engine.core.bll.RunVmOnceCommand.getParameters ( ) ; sysPrepParams.setSysPrepDomainName ( runOnceParams.getSysPrepDomainName ( ) ) ; sysPrepParams.setSysPrepUserName ( runOnceParams.getSysPrepUserName ( ) ) ; sysPrepParams.setSysPrepPassword ( runOnceParams.getSysPrepPassword ( ) ) ; createVmParams.setSysPrepParams ( sysPrepParams ) ; return createVmParams ; }

Target:
protected org.ovirt.engine.core.common.vdscommands.CreateVmVDSCommandParameters initCreateVmParams ( ) { org.ovirt.engine.core.bll.RunVmOnceCommand.getVm ( ) . setRunOnce ( true ) ; org.ovirt.engine.core.common.vdscommands.CreateVmVDSCommandParameters createVmParams = super . initCreateVmParams ( ) ; org.ovirt.engine.core.common.action.SysPrepParams sysPrepParams = new org.ovirt.engine.core.common.action.SysPrepParams ( ) ; org.ovirt.engine.core.common.action.RunVmOnceParams runOnceParams = org.ovirt.engine.core.bll.RunVmOnceCommand.getParameters ( ) ; sysPrepParams.setSysPrepDomainName ( runOnceParams.getSysPrepDomainName ( ) ) ; sysPrepParams.setSysPrepUserName ( runOnceParams.getSysPrepUserName ( ) ) ; sysPrepParams.setSysPrepPassword ( runOnceParams.getSysPrepPassword ( ) ) ; createVmParams.setSysPrepParams ( sysPrepParams ) ; return createVmParams ; }
Source:
public void testMixedTypesOnAllVersions ( ) { storageDomain.setStorageFormat ( StorageFormatType.V1 ) ; org.mockito.Mockito.when ( storagePoolDao.getStorageTypesInPool ( storagePool.getId ( ) ) ) . thenReturn ( java.util.Collections.singletonList ( StorageType.NFS ) ) ; storageDomain.setStorageType ( StorageType.ISCSI ) ; for ( org.ovirt.engine.core.compat.Version version : org.ovirt.engine.core.compat.Version.ALL ) { if ( ( version.compareTo ( Version.v3_0 ) ) >= 0 ) { testAddingMixedTypes ( version , org.ovirt.engine.core.common.FeatureSupported.mixedDomainTypesOnDataCenter ( version ) ) ; } } }

Target:
public void testMixedTypesOnAllVersions ( ) { storageDomain.setStorageFormat ( StorageFormatType.V1 ) ; org.mockito.Mockito.when ( storagePoolDao.getStorageTypesInPool ( storagePool.getId ( ) ) ) . thenReturn ( java.util.Collections.singletonList ( StorageType.NFS ) ) ; storageDomain.setStorageType ( StorageType.ISCSI ) ; for ( org.ovirt.engine.core.compat.Version version : org.ovirt.engine.core.compat.Version.ALL ) { if ( ( version.compareTo ( Version.v3_0 ) ) >= 0 ) { assertAddingMixedTypes ( version , org.ovirt.engine.core.common.FeatureSupported.mixedDomainTypesOnDataCenter ( version ) ) ; } } }
Source:
public static void getDataCenterById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId ) { 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.GetStoragePoolById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) . withoutRefresh ( ) , aQuery ) ; }

Target:
public static void getClusterNetworkList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { if ( ( aQuery.converterCallback ) == null ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.Network > ( ) ; } return source ; } } ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllNetworksByClusterId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( clusterId ) , aQuery ) ; }
Source:
public static void GetTemplateById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid templateId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmTemplate , new org.ovirt.engine.core.common.queries.GetVmTemplateParameters ( templateId ) , aQuery ) ; }

Target:
public static void GetDataCenterById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetStoragePoolById , new org.ovirt.engine.core.common.queries.StoragePoolQueryParametersBase ( dataCenterId ) , aQuery ) ; }
Source:
protected void executeCommand ( ) { org.ovirt.engine.core.bll.storage.disk.image.ImagesHandler.updateAllDiskImagesSnapshotsStatusInTransactionWithCompensation ( getMovedDiskIds ( ) , ImageStatus.LOCKED , ImageStatus.OK , org.ovirt.engine.core.bll.storage.lsm.LiveMigrateVmDisksCommand.getCompensationContext ( ) ) ; org.ovirt.engine.core.common.action.VdcReturnValueBase vdcReturnValue = runInternalAction ( VdcActionType.CreateAllSnapshotsFromVm , getCreateSnapshotParameters ( ) , org.ovirt.engine.core.bll.job.ExecutionHandler.createInternalJobContext ( org.ovirt.engine.core.bll.storage.lsm.LiveMigrateVmDisksCommand.getContext ( ) ) ) ; org.ovirt.engine.core.bll.storage.lsm.LiveMigrateVmDisksCommand.getParameters ( ) . setAutoGeneratedSnapshotId ( vdcReturnValue.getActionReturnValue ( ) ) ; persistCommand ( org.ovirt.engine.core.bll.storage.lsm.LiveMigrateVmDisksCommand.getParameters ( ) . getParentCommand ( ) , ( ( getCallback ( ) ) != null ) ) ; org.ovirt.engine.core.bll.storage.lsm.LiveMigrateVmDisksCommand.setSucceeded ( true ) ; }

Target:
protected void executeCommand ( ) { imagesHandler.updateAllDiskImagesSnapshotsStatusInTransactionWithCompensation ( getMovedDiskIds ( ) , ImageStatus.LOCKED , ImageStatus.OK , org.ovirt.engine.core.bll.storage.lsm.LiveMigrateVmDisksCommand.getCompensationContext ( ) ) ; org.ovirt.engine.core.common.action.ActionReturnValue actionReturnValueurnValue = runInternalAction ( ActionType.CreateAllSnapshotsFromVm , getCreateSnapshotParameters ( ) , org.ovirt.engine.core.bll.job.ExecutionHandler.createInternalJobContext ( org.ovirt.engine.core.bll.storage.lsm.LiveMigrateVmDisksCommand.getContext ( ) ) ) ; org.ovirt.engine.core.bll.storage.lsm.LiveMigrateVmDisksCommand.getParameters ( ) . setAutoGeneratedSnapshotId ( actionReturnValueurnValue.getActionReturnValue ( ) ) ; persistCommand ( org.ovirt.engine.core.bll.storage.lsm.LiveMigrateVmDisksCommand.getParameters ( ) . getParentCommand ( ) , ( ( getCallback ( ) ) != null ) ) ; org.ovirt.engine.core.bll.storage.lsm.LiveMigrateVmDisksCommand.setSucceeded ( true ) ; }