auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private org.ovirt.engine.core.common.businessentities.StorageServerConnections createNFSConnection ( java.lang.String connection , org.ovirt.engine.core.common.businessentities.StorageType type , org.ovirt.engine.core.common.businessentities.NfsVersion version , int timeout , int retrans ) { org.ovirt.engine.core.compat.Guid id = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; org.ovirt.engine.core.common.businessentities.StorageServerConnections connectionDetails = populateBasicConnectionDetails ( id , connection , type ) ; connectionDetails.setNfsVersion ( version ) ; connectionDetails.setNfsTimeo ( ( ( short ) ( timeout ) ) ) ; connectionDetails.setNfsRetrans ( ( ( short ) ( retrans ) ) ) ; return connectionDetails ; }

Target:
public void checkNoHost ( ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections newNFSConnection = createNFSConnection ( "multipass.my.domain.tlv.company.com:/export/allstorage/data2" , StorageType.NFS , NfsVersion.V4 , 300 , 0 ) ; parameters.setStorageServerConnection ( newNFSConnection ) ; parameters.setVdsId ( null ) ; parameters.setStorageServerConnection ( newNFSConnection ) ; org.mockito.Mockito.when ( storageConnDao.get ( newNFSConnection.getid ( ) ) ) . thenReturn ( oldNFSConnection ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionSuccess ( command ) ; }
Source:
public void testAddIdSuppliedButNoName ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; org.ovirt.engine.api.model.Network model = new org.ovirt.engine.api.model.Network ( ) ; model.setId ( "11111111-1111-1111-1111-111111111111" ) ; setUpEntityQueryExpectations ( 1 , null ) ; setUpGetClusterExpectations ( 1 , null ) ; setUpGetNetworksByDataCenterExpectations ( 1 , null ) ; setUpVDSGroupExpectations ( org.ovirt.engine.api.restapi.resource.BackendClusterNetworksResourceTest.CLUSTER_ID ) ; setUpActionExpectations ( VdcActionType.AttachNetworkToVdsGroup , org.ovirt.engine.core.common.action.AttachNetworkToVdsGroupParameter.class , new java.lang.String [ ] { "VdsGroupId" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendClusterNetworksResourceTest.CLUSTER_ID } , true , true ) ; collection.add ( model ) ; }

Target:
public void testAddIdSuppliedButNoName ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; org.ovirt.engine.api.model.Network model = new org.ovirt.engine.api.model.Network ( ) ; model.setId ( "11111111-1111-1111-1111-111111111111" ) ; setUpEntityQueryExpectations ( 1 , null ) ; setUpGetClusterExpectations ( 1 , null ) ; setUpGetNetworksByDataCenterExpectations ( 1 , null ) ; setUpClusterExpectations ( org.ovirt.engine.api.restapi.resource.BackendClusterNetworksResourceTest.CLUSTER_ID ) ; setUpActionExpectations ( VdcActionType.AttachNetworkToCluster , org.ovirt.engine.core.common.action.AttachNetworkToClusterParameter.class , new java.lang.String [ ] { "ClusterId" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendClusterNetworksResourceTest.CLUSTER_ID } , true , true ) ; collection.add ( model ) ; }
Source:
private org.ovirt.engine.core.common.action.RemoveCinderDiskParameters buildChildCommandParameters ( org.ovirt.engine.core.common.businessentities.storage.CinderDisk cinderDisk ) { org.ovirt.engine.core.common.action.RemoveCinderDiskParameters removeDiskParams = new org.ovirt.engine.core.common.action.RemoveCinderDiskParameters ( cinderDisk.getId ( ) ) ; removeDiskParams.setParentCommand ( org.ovirt.engine.core.bll.RemoveAllVmCinderDisksCommand.getActionType ( ) ) ; removeDiskParams.setParentParameters ( org.ovirt.engine.core.bll.RemoveAllVmCinderDisksCommand.getParameters ( ) ) ; return removeDiskParams ; }

Target:
private org.ovirt.engine.core.common.action.RemoveCinderDiskParameters buildChildCommandParameters ( org.ovirt.engine.core.common.businessentities.storage.CinderDisk cinderDisk ) { org.ovirt.engine.core.common.action.RemoveCinderDiskParameters removeDiskParams = new org.ovirt.engine.core.common.action.RemoveCinderDiskParameters ( cinderDisk.getId ( ) ) ; removeDiskParams.setParentCommand ( org.ovirt.engine.core.bll.RemoveAllVmCinderDisksCommand.getActionType ( ) ) ; removeDiskParams.setParentParameters ( org.ovirt.engine.core.bll.RemoveAllVmCinderDisksCommand.getParameters ( ) ) ; removeDiskParams.setShouldBeLogged ( false ) ; return removeDiskParams ; }
Source:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.AbstractDiskModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.AbstractDiskModel ) ( target ) ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > disks = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ) ( returnValue ) ) ; org.ovirt.engine.ui.uicommonweb.Linq.sort ( disks , new org.ovirt.engine.ui.uicommonweb.Linq.DiskByAliasComparer ( ) ) ; java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel > diskModels = org.ovirt.engine.ui.uicommonweb.Linq.disksToDiskModelList ( disks ) ; model.getInternalAttachableDisks ( ) . setItems ( org.ovirt.engine.ui.uicommonweb.Linq.toEntityModelList ( org.ovirt.engine.ui.uicommonweb.Linq.filterDisksByType ( diskModels , DiskStorageType.IMAGE ) ) ) ; }

Target:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.AbstractDiskModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.AbstractDiskModel ) ( target ) ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > disks = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ) ( returnValue ) ) ; java.util.Collections.sort ( disks , new org.ovirt.engine.ui.uicommonweb.Linq.DiskByAliasComparer ( ) ) ; java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel > diskModels = org.ovirt.engine.ui.uicommonweb.Linq.disksToDiskModelList ( disks ) ; model.getInternalAttachableDisks ( ) . setItems ( org.ovirt.engine.ui.uicommonweb.Linq.toEntityModelList ( org.ovirt.engine.ui.uicommonweb.Linq.filterDisksByType ( diskModels , DiskStorageType.IMAGE ) ) ) ; }
Source:
public void setup ( ) { map = new org.ovirt.engine.core.common.businessentities.StoragePoolIsoMap ( ) ; cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.storage.domain.DeactivateStorageDomainCommand ( params ) ) ; org.mockito.Mockito.doReturn ( storagePoolDao ) . when ( cmd ) . getStoragePoolDao ( ) ; org.mockito.Mockito.doReturn ( storageDomainDao ) . when ( cmd ) . getStorageDomainDao ( ) ; org.mockito.Mockito.doReturn ( eventQueue ) . when ( cmd ) . getEventQueue ( ) ; }

Target:
public void setup ( ) { map = new org.ovirt.engine.core.common.businessentities.StoragePoolIsoMap ( ) ; cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.storage.domain.DeactivateStorageDomainCommand ( params , org.ovirt.engine.core.bll.context.CommandContext.createContext ( params.getSessionId ( ) ) ) ) ; org.mockito.Mockito.doReturn ( storagePoolDao ) . when ( cmd ) . getStoragePoolDao ( ) ; org.mockito.Mockito.doReturn ( storageDomainDao ) . when ( cmd ) . getStorageDomainDao ( ) ; org.mockito.Mockito.doReturn ( eventQueue ) . when ( cmd ) . getEventQueue ( ) ; }
Source:
protected org.ovirt.engine.core.common.action.RunVmOnceParams createRunVmOnceParams ( ) { org.ovirt.engine.core.common.action.RunVmOnceParams params = super . createRunVmOnceParams ( ) ; if ( ( getSysPrepDomainName ( ) . getSelectedItem ( ) ) != null ) { params.setSysPrepDomainName ( ( ( java.lang.String ) ( getSysPrepDomainName ( ) . getSelectedItem ( ) ) ) ) ; } return params ; }

Target:
protected void onRunOnce ( ) { startProgress ( null ) ; org.ovirt.engine.ui.frontend.Frontend.RunAction ( VdcActionType.RunVmOnce , createRunVmOnceParams ( ) , new org.ovirt.engine.ui.uicompat.IFrontendActionAsyncCallback ( ) { @ java.lang.Override public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { stopProgress ( ) ; commandTarget.executeCommand ( runOnceCommand ) ; } } , this ) ; }
Source:
public void testNicLinks ( ) throws java.lang.Exception { org.ovirt.engine.api.model.NIC nic = new org.ovirt.engine.api.model.NIC ( ) ; nic.setId ( org.ovirt.engine.api.common.util.LinkHelperTest.NIC_ID ) ; nic.setVm ( new org.ovirt.engine.api.model.VM ( ) ) ; nic.getVm ( ) . setId ( org.ovirt.engine.api.common.util.LinkHelperTest.VM_ID ) ; org.ovirt.engine.api.utils.LinkHelper.addLinks ( setUpUriExpectations ( ) , nic ) ; assertEquals ( org.ovirt.engine.api.common.util.LinkHelperTest.NIC_HREF , nic.getHref ( ) ) ; }

Target:
public void testNicLinks ( ) throws java.lang.Exception { org.ovirt.engine.api.model.Nic nic = new org.ovirt.engine.api.model.Nic ( ) ; nic.setId ( org.ovirt.engine.api.common.util.LinkHelperTest.NIC_ID ) ; nic.setVm ( new org.ovirt.engine.api.model.VM ( ) ) ; nic.getVm ( ) . setId ( org.ovirt.engine.api.common.util.LinkHelperTest.VM_ID ) ; org.ovirt.engine.api.utils.LinkHelper.addLinks ( setUpUriExpectations ( ) , nic ) ; assertEquals ( org.ovirt.engine.api.common.util.LinkHelperTest.NIC_HREF , nic.getHref ( ) ) ; }
Source:
public static void GetCPUList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Version version ) { 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.ServerCpu > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ServerCpu > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllServerCpuList , new org.ovirt.engine.core.common.queries.GetAllServerCpuListParameters ( version ) , aQuery ) ; }

Target:
public static void GetGlusterHostsNewlyAdded ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId , boolean isFingerprintRequired ) { 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.GetAddedGlusterServers , new org.ovirt.engine.core.common.queries.gluster.AddedGlusterServersParameters ( clusterId , isFingerprintRequired ) , aQuery ) ; }
Source:
private boolean isStorageFormatSupportedByStoragePool ( ) { org.ovirt.engine.core.common.businessentities.StorageFormatType storageFormat = org.ovirt.engine.core.bll.storage.AddStorageDomainCommand.getStorageDomain ( ) . getStorageFormat ( ) ; org.ovirt.engine.core.common.businessentities.StoragePool targetStoragePool = org.ovirt.engine.core.bll.storage.AddStorageDomainCommand.getStoragePool ( ) ; if ( targetStoragePool == null ) { targetStoragePool = org.ovirt.engine.core.bll.storage.AddStorageDomainCommand.getStoragePoolDAO ( ) . get ( org.ovirt.engine.core.bll.storage.AddStorageDomainCommand.getVds ( ) . getStoragePoolId ( ) ) ; if ( targetStoragePool == null ) { return false ; } } java.util.Set < org.ovirt.engine.core.common.businessentities.StorageFormatType > supportedStorageFormats = getSupportedStorageFormatSet ( targetStoragePool.getcompatibility_version ( ) ) ; return supportedStorageFormats.contains ( storageFormat ) ; }

Target:
private org.ovirt.engine.core.common.businessentities.StoragePool getTargetStoragePool ( ) { org.ovirt.engine.core.common.businessentities.StoragePool targetStoragePool = org.ovirt.engine.core.bll.storage.AddStorageDomainCommand.getStoragePool ( ) ; if ( targetStoragePool == null ) { targetStoragePool = org.ovirt.engine.core.bll.storage.AddStorageDomainCommand.getStoragePoolDAO ( ) . get ( org.ovirt.engine.core.bll.storage.AddStorageDomainCommand.getVds ( ) . getStoragePoolId ( ) ) ; } return targetStoragePool ; }
Source:
public void resetAfterLogout ( ) { getUserName ( ) . setEntity ( null ) ; getPassword ( ) . setEntity ( null ) ; getPassword ( ) . setIsChangable ( true ) ; getUserName ( ) . setIsChangable ( true ) ; getDomain ( ) . setIsChangable ( true ) ; getLoginCommand ( ) . setIsExecutionAllowed ( true ) ; loggingInAutomatically = false ; StopProgress ( ) ; }

Target:
public void resetAfterLogout ( ) { getUserName ( ) . setEntity ( null ) ; getPassword ( ) . setEntity ( null ) ; getPassword ( ) . setIsChangable ( true ) ; getUserName ( ) . setIsChangable ( true ) ; getDomain ( ) . setIsChangable ( true ) ; getLoginCommand ( ) . setIsExecutionAllowed ( true ) ; loggingInAutomatically = false ; stopProgress ( ) ; }
Source:
public com.google.gwt.safehtml.shared.SafeHtml getTooltip ( org.ovirt.engine.core.common.businessentities.VM vm ) { java.lang.String tooltipContent ; if ( ( vm.getVmPoolId ( ) ) == null ) { org.ovirt.engine.ui.webadmin.widget.table.column.VmTypeConfig config = org.ovirt.engine.ui.webadmin.widget.table.column.VmTypeConfig.from ( vm.getVmType ( ) , vm.isStateless ( ) , vm.isNextRunConfigurationExists ( ) ) ; tooltipContent = config.getTooltip ( ) ; } else { tooltipContent = getPoolVmTooltip ( vm.getVmType ( ) ) ; } return com.google.gwt.safehtml.shared.SafeHtmlUtils.fromString ( tooltipContent ) ; }

Target:
public com.google.gwt.safehtml.shared.SafeHtml getTooltip ( org.ovirt.engine.core.common.businessentities.VM vm ) { java.util.Map < com.google.gwt.safehtml.shared.SafeHtml , java.lang.String > imagesToText = getImagesToTooltipTextMap ( vm ) ; return imagesToText.isEmpty ( ) ? null : org.ovirt.engine.ui.webadmin.widget.table.column.MultiImageColumnHelper.getTooltip ( imagesToText ) ; }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { if ( args instanceof org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ) { org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs changedArgs = ( ( org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ) ( args ) ) ; if ( "Disks" . equals ( changedArgs.propertyName ) ) { addDiskList ( model ) ; } else if ( "QuotaEnforcmentType" . equals ( changedArgs.propertyName ) ) { updateColumnsAvailability ( model ) ; updateListHeader ( model ) ; } } }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < ? extends org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs args ) { if ( "Disks" . equals ( args.propertyName ) ) { addDiskList ( model ) ; } else if ( "QuotaEnforcmentType" . equals ( args.propertyName ) ) { updateColumnsAvailability ( model ) ; updateListHeader ( model ) ; } }
Source:
public void testListCrashClientLocale ( ) throws java.lang.Exception { javax.ws.rs.core.UriInfo uriInfo = setUpUriExpectations ( null ) ; locales.add ( org.ovirt.engine.api.restapi.resource.aaa.CLIENT_LOCALE ) ; java.lang.Throwable t = new java.lang.RuntimeException ( FAILURE ) ; setUpQueryExpectations ( org.ovirt.engine.api.restapi.resource.aaa.BackendGroupsResourceTest.QUERY , t ) ; collection.setUriInfo ( uriInfo ) ; try { getCollection ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , org.ovirt.engine.api.restapi.resource.aaa.BACKEND_FAILED_CLIENT_LOCALE , t ) ; } finally { locales.clear ( ) ; } }

Target:
public void testListCrashClientLocale ( ) throws java.lang.Exception { javax.ws.rs.core.UriInfo uriInfo = setUpUriExpectations ( null ) ; locales.add ( org.ovirt.engine.api.restapi.resource.aaa.CLIENT_LOCALE ) ; java.lang.Throwable t = new java.lang.RuntimeException ( FAILURE ) ; setUpQueryExpectations ( org.ovirt.engine.api.restapi.resource.aaa.BackendGroupsResourceTest.QUERY , t ) ; collection.setUriInfo ( uriInfo ) ; try { getCollection ( ) ; org.junit.Assert.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , org.ovirt.engine.api.restapi.resource.aaa.BACKEND_FAILED_CLIENT_LOCALE , t ) ; } finally { locales.clear ( ) ; } }
Source:
public static void addOrUpdateTaskInDB ( org.ovirt.engine.core.bll.tasks.interfaces.SPMTask asyncTask ) { try { if ( ( asyncTask.getParameters ( ) . getDbAsyncTask ( ) ) != null ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getAsyncTaskDao ( ) . saveOrUpdate ( asyncTask.getParameters ( ) . getDbAsyncTask ( ) , asyncTask.getEntityType ( ) , asyncTask.getAssociatedEntities ( ) ) ; } } catch ( java.lang.RuntimeException e ) { org.ovirt.engine.core.bll.tasks.AsyncTaskUtils.log.error ( java.lang.String.format ( "Adding/Updating task %1$s to DataBase threw an exception." , asyncTask.getTaskID ( ) ) , e ) ; } }

Target:
public static void addOrUpdateTaskInDB ( org.ovirt.engine.core.bll.SPMAsyncTask asyncTask ) { try { if ( ( asyncTask.getParameters ( ) . getDbAsyncTask ( ) ) != null ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getAsyncTaskDao ( ) . saveOrUpdate ( asyncTask.getParameters ( ) . getDbAsyncTask ( ) , asyncTask.getEntityType ( ) , asyncTask.getAssociatedEntities ( ) ) ; } } catch ( java.lang.RuntimeException e ) { org.ovirt.engine.core.bll.tasks.AsyncTaskUtils.log.error ( java.lang.String.format ( "Adding/Updating task %1$s to DataBase threw an exception." , asyncTask.getVdsmTaskId ( ) ) , e ) ; } }
Source:
public void securityKeysDoesNotExist ( ) { validator = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.validator.HostValidator ( dbFacade , host ) ) ; org.mockito.Mockito.doReturn ( false ) . when ( validator ) . haveSecurityKey ( ) ; org.junit.Assert.assertThat ( validator.securityKeysExists ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.VDS_TRY_CREATE_SECURE_CERTIFICATE_NOT_FOUND ) ) ; }

Target:
public void unsupportedHostedEngineDeployWhenClusterLevelIsUnsupported ( ) { org.mockito.Mockito.when ( hostedEngineHelper.isVmManaged ( ) ) . thenReturn ( false ) ; mockCluster ( Version.v3_6 ) ; org.mockito.Mockito.when ( host.getClusterId ( ) ) . thenReturn ( Guid.Empty ) ; org.junit.Assert.assertThat ( validator.supportsDeployingHostedEngine ( new org.ovirt.engine.core.common.businessentities.HostedEngineDeployConfiguration ( HostedEngineDeployConfiguration.Action.DEPLOY ) ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.ACTION_TYPE_FAILED_HOSTED_ENGINE_DEPLOYMENT_UNSUPPORTED ) ) ; }
Source:
public static void isSupportBridgesReportByVDSM ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String version ) { 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 ) ) . booleanValue ( ) : true ; } } ; org.ovirt.engine.core.common.queries.GetConfigurationValueParameters tempVar = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.SupportBridgesReportByVDSM ) ; tempVar.setVersion ( version ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( tempVar , aQuery ) ; }

Target:
public static void GetAllProvidersByType ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.businessentities.ProviderType providerType ) { 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.Provider > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllProviders , new org.ovirt.engine.core.common.queries.GetAllProvidersParameters ( providerType ) , aQuery ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.storage.VolumeFormat getTargetVolumeFormat ( org.ovirt.engine.core.common.businessentities.storage.VolumeFormat volumeFormat , org.ovirt.engine.core.common.businessentities.storage.VolumeType volumeType , org.ovirt.engine.core.compat.Guid storageDomainId ) { if ( ( volumeFormat == ( org.ovirt.engine.core.common.businessentities.storage.VolumeFormat.RAW ) ) && ( volumeType == ( org.ovirt.engine.core.common.businessentities.storage.VolumeType.Sparse ) ) ) { org.ovirt.engine.core.common.businessentities.StorageDomainStatic destDomain = org.ovirt.engine.core.bll.storage.disk.image.CreateImageTemplateCommand.getStorageDomainStaticDao ( ) . get ( storageDomainId ) ; if ( destDomain.getStorageType ( ) . isBlockDomain ( ) ) { return org.ovirt.engine.core.common.businessentities.storage.VolumeFormat.COW ; } } return volumeFormat ; }

Target:
private org.ovirt.engine.core.common.businessentities.storage.VolumeFormat getTargetVolumeFormat ( org.ovirt.engine.core.common.businessentities.storage.VolumeFormat volumeFormat , org.ovirt.engine.core.common.businessentities.storage.VolumeType volumeType , org.ovirt.engine.core.compat.Guid storageDomainId ) { if ( ( volumeFormat == ( org.ovirt.engine.core.common.businessentities.storage.VolumeFormat.RAW ) ) && ( volumeType == ( org.ovirt.engine.core.common.businessentities.storage.VolumeType.Sparse ) ) ) { org.ovirt.engine.core.common.businessentities.StorageDomainStatic destDomain = storageDomainStaticDao.get ( storageDomainId ) ; if ( destDomain.getStorageType ( ) . isBlockDomain ( ) ) { return org.ovirt.engine.core.common.businessentities.storage.VolumeFormat.COW ; } } return volumeFormat ; }
Source:
public static void initCache ( org.ovirt.engine.ui.uicommonweb.models.LoginModel loginModel ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.cacheConfigValues ( new org.ovirt.engine.ui.frontend.AsyncQuery ( loginModel , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( target ) ; } } ) ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.initOsNames ( ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.initUniqueOsNames ( ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.initLinuxOsTypes ( ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.initWindowsOsTypes ( ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.initHasSpiceSupport ( ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.initNicHotplugSupportMap ( ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.initDiskHotpluggableInterfacesMap ( ) ; }

Target:
public static void initCache ( org.ovirt.engine.ui.uicommonweb.models.LoginModel loginModel ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.cacheConfigValues ( new org.ovirt.engine.ui.frontend.AsyncQuery ( loginModel , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( target ) ; } } ) ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.initOsNames ( ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.initUniqueOsNames ( ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.initLinuxOsTypes ( ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.initWindowsOsTypes ( ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.initDisplayTypes ( ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.initNicHotplugSupportMap ( ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.initDiskHotpluggableInterfacesMap ( ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.initOsArchitecture ( ) ; }
Source:
public org.ovirt.engine.core.common.businessentities.RepoFileMetaData mapRow ( java.sql.ResultSet rs , int rowNum ) throws java.sql.SQLException { org.ovirt.engine.core.common.businessentities.RepoFileMetaData entity = new org.ovirt.engine.core.common.businessentities.RepoFileMetaData ( ) ; entity.setRepoDomainId ( org.ovirt.engine.core.compat.Guid.createGuidFromString ( rs.getString ( "storage_domain_id" ) ) ) ; entity.setLastRefreshed ( rs.getLong ( "last_refreshed" ) ) ; entity.setFileType ( org.ovirt.engine.core.common.businessentities.ImageFileType.forValue ( rs.getInt ( "file_type" ) ) ) ; return entity ; }

Target:
public org.ovirt.engine.core.common.businessentities.RepoFileMetaData mapRow ( java.sql.ResultSet rs , int rowNum ) throws java.sql.SQLException { org.ovirt.engine.core.common.businessentities.RepoFileMetaData entity = new org.ovirt.engine.core.common.businessentities.RepoFileMetaData ( ) ; entity.setRepoDomainId ( org.ovirt.engine.core.compat.Guid.createGuidFromStringDefaultEmpty ( rs.getString ( "storage_domain_id" ) ) ) ; entity.setLastRefreshed ( rs.getLong ( "last_refreshed" ) ) ; entity.setFileType ( org.ovirt.engine.core.common.businessentities.ImageFileType.forValue ( rs.getInt ( "file_type" ) ) ) ; return entity ; }
Source:
protected boolean canDoAction ( ) { if ( ( org.ovirt.engine.core.bll.RemoveVmFromPoolCommand.getVm ( ) ) == null ) { return failCanDoAction ( VdcBllMessages.ACTION_TYPE_FAILED_VM_NOT_FOUND ) ; } if ( ( org.ovirt.engine.core.bll.RemoveVmFromPoolCommand.getVmPoolId ( ) ) == null ) { return failCanDoAction ( VdcBllMessages.VM_POOL_CANNOT_DETACH_VM_NOT_ATTACHED_TO_POOL ) ; } if ( ( org.ovirt.engine.core.bll.RemoveVmFromPoolCommand.getVm ( ) . isRunningOrPaused ( ) ) || ( ( org.ovirt.engine.core.bll.RemoveVmFromPoolCommand.getVm ( ) . getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.Unknown ) ) ) { return failCanDoAction ( VdcBllMessages.VM_POOL_CANNOT_REMOVE_RUNNING_VM_FROM_POOL ) ; } return true ; }

Target:
protected boolean canDoAction ( ) { if ( ( org.ovirt.engine.core.bll.RemoveVmFromPoolCommand.getVm ( ) ) == null ) { return failCanDoAction ( EngineMessage.ACTION_TYPE_FAILED_VM_NOT_FOUND ) ; } if ( ( org.ovirt.engine.core.bll.RemoveVmFromPoolCommand.getVmPoolId ( ) ) == null ) { return failCanDoAction ( EngineMessage.VM_POOL_CANNOT_DETACH_VM_NOT_ATTACHED_TO_POOL ) ; } if ( ( org.ovirt.engine.core.bll.RemoveVmFromPoolCommand.getVm ( ) . isRunningOrPaused ( ) ) || ( ( org.ovirt.engine.core.bll.RemoveVmFromPoolCommand.getVm ( ) . getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.Unknown ) ) ) { return failCanDoAction ( EngineMessage.VM_POOL_CANNOT_REMOVE_RUNNING_VM_FROM_POOL ) ; } return true ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object result ) { org.ovirt.engine.ui.uicommonweb.models.userportal.UserPortalListModel userPortalListModel = ( ( org.ovirt.engine.ui.uicommonweb.models.userportal.UserPortalListModel ) ( model ) ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > list = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > ( java.util.Arrays.asList ( new org.ovirt.engine.core.common.businessentities.StoragePool [ ] { ( ( org.ovirt.engine.core.common.businessentities.StoragePool ) ( result ) ) } ) ) ; org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel unitModel = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel ) ( userPortalListModel.getWindow ( ) ) ) ; unitModel.getDataCenter ( ) . setItems ( list ) ; unitModel.getDataCenter ( ) . setSelectedItem ( org.ovirt.engine.ui.uicommonweb.Linq.firstOrDefault ( list ) ) ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object loadedCluster ) { org.ovirt.engine.ui.uicommonweb.models.vms.DataCenterWithCluster newItem = new org.ovirt.engine.ui.uicommonweb.models.vms.DataCenterWithCluster ( ( ( org.ovirt.engine.core.common.businessentities.StoragePool ) ( loadedDataCenter ) ) , ( ( org.ovirt.engine.core.common.businessentities.VDSGroup ) ( loadedCluster ) ) ) ; unitModel.getDataCenterWithClustersList ( ) . setItems ( java.util.Arrays.asList ( newItem ) ) ; unitModel.getDataCenterWithClustersList ( ) . setSelectedItem ( newItem ) ; }
Source:
public void testValidModifiedBonds_failsWhenReferencingExistingNonBondInterface ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.Bond bond = new org.ovirt.engine.core.common.businessentities.network.Bond ( ) ; doTestValidModifiedBonds ( bond , ValidationResult.VALID , new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.NETWORK_INTERFACE_IS_NOT_BOND ) , VdcBllMessages.NETWORK_INTERFACE_IS_NOT_BOND , false , false ) ; }

Target:
public void testValidModifiedBondsFailsWhenSlavesValidationFails ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.Bond bond = createBond ( ) ; bond.setSlaves ( java.util.Arrays.asList ( "slaveA" , "slaveB" ) ) ; doTestValidModifiedBonds ( bond , ValidationResult.VALID , ValidationResult.VALID , new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.NETWORK_INTERFACE_ATTACHED_TO_NETWORK_CANNOT_BE_SLAVE ) , new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.NETWORK_INTERFACE_ATTACHED_TO_NETWORK_CANNOT_BE_SLAVE ) ) ; }
Source:
private void doInit ( org.ovirt.engine.api.extensions.ExtMap inputMap , org.ovirt.engine.api.extensions.ExtMap outputMap ) { context = inputMap.< org.ovirt.engine.api.extensions.ExtMap > get ( Base.InvokeKeys.CONTEXT ) ; configuration = context.< java.util.Properties > get ( Base.ContextKeys.CONFIGURATION ) ; broker = org.ovirt.engine.extensions.aaa.builtin.kerberosldap.LdapFactory.getInstance ( getAuthzName ( ) ) ; context.< java.util.List < java.lang.String > > get ( Base.ContextKeys.CONFIGURATION_SENSITIVE_KEYS ) . add ( "config.authn.user.password" ) ; context.mput ( Base.ContextKeys.AUTHOR , "The oVirt Project" ) . mput ( Base.ContextKeys.EXTENSION_NAME , "Kerberos/Ldap Authn (Built-in)" ) . mput ( Base.ContextKeys.LICENSE , "ASL 2.0" ) . mput ( Base.ContextKeys.HOME_URL , "http://www.ovirt.org" ) . mput ( Base.ContextKeys.VERSION , "N/A" ) . mput ( Authn.ContextKeys.CAPABILITIES , Authn.Capabilities.AUTHENTICATE_PASSWORD ) . mput ( Base.ContextKeys.BUILD_INTERFACE_VERSION , Base.INTERFACE_VERSION_CURRENT ) ; org.ovirt.engine.extensions.aaa.builtin.kerberosldap.KerberosManager.getInstance ( ) ; org.ovirt.engine.extensions.aaa.builtin.kerberosldap.UsersDomainsCacheManagerService.getInstance ( ) . init ( ) ; }

Target:
private void doLoad ( org.ovirt.engine.api.extensions.ExtMap inputMap , org.ovirt.engine.api.extensions.ExtMap outputMap ) { context = inputMap.< org.ovirt.engine.api.extensions.ExtMap > get ( Base.InvokeKeys.CONTEXT ) ; configuration = context.< java.util.Properties > get ( Base.ContextKeys.CONFIGURATION ) ; broker = org.ovirt.engine.extensions.aaa.builtin.kerberosldap.LdapFactory.getInstance ( getAuthzName ( ) ) ; context.< java.util.List < java.lang.String > > get ( Base.ContextKeys.CONFIGURATION_SENSITIVE_KEYS ) . add ( "config.authn.user.password" ) ; context.mput ( Base.ContextKeys.AUTHOR , "The oVirt Project" ) . mput ( Base.ContextKeys.EXTENSION_NAME , "Kerberos/Ldap Authn (Built-in)" ) . mput ( Base.ContextKeys.LICENSE , "ASL 2.0" ) . mput ( Base.ContextKeys.HOME_URL , "http://www.ovirt.org" ) . mput ( Base.ContextKeys.VERSION , "N/A" ) . mput ( Authn.ContextKeys.CAPABILITIES , Authn.Capabilities.AUTHENTICATE_PASSWORD ) . mput ( Base.ContextKeys.BUILD_INTERFACE_VERSION , Base.INTERFACE_VERSION_CURRENT ) ; }
Source:
public int read ( byte [ ] b , int off , int len ) throws java.io.IOException { int ret = in.read ( b , off , len ) ; if ( ret != ( - 1 ) ) { this . index += ret ; } return ret ; }

Target:
public int read ( byte [ ] b , int off , int len ) throws java.io.IOException { int ret = in.read ( b , off , len ) ; if ( ret != ( - 1 ) ) { _index += ret ; } return ret ; }
Source:
public void canDoActionSuccess ( ) { mockVmStatusUp ( ) ; cretaeVirtIODisk ( ) ; initStorageDomain ( ) ; org.junit.Assert.assertTrue ( command.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getCanDoActionMessages ( ) . isEmpty ( ) ) ; }

Target:
public void canDoActionSuccess ( ) { mockVmStatusUp ( ) ; mockInterfaceList ( ) ; cretaeVirtIODisk ( ) ; initStorageDomain ( ) ; org.junit.Assert.assertTrue ( command.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getCanDoActionMessages ( ) . isEmpty ( ) ) ; }
Source:
public java.lang.Object runInTransaction ( ) { for ( org.ovirt.engine.core.common.businessentities.storage_pool sp : org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStoragePoolDao ( ) . getAll ( ) ) { if ( ! ( org.ovirt.engine.core.vdsbroker.irsbroker.IrsBrokerCommand._irsProxyData.containsKey ( sp.getId ( ) ) ) ) { org.ovirt.engine.core.vdsbroker.irsbroker.IrsBrokerCommand._irsProxyData.put ( sp.getId ( ) , new org.ovirt.engine.core.vdsbroker.irsbroker.IrsBrokerCommand.IrsProxyData ( sp.getId ( ) ) ) ; } } return null ; }

Target:
public static void Init ( ) { for ( org.ovirt.engine.core.common.businessentities.storage_pool sp : org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStoragePoolDao ( ) . getAll ( ) ) { if ( ! ( org.ovirt.engine.core.vdsbroker.irsbroker.IrsBrokerCommand._irsProxyData.containsKey ( sp.getId ( ) ) ) ) { org.ovirt.engine.core.vdsbroker.irsbroker.IrsBrokerCommand._irsProxyData.put ( sp.getId ( ) , new org.ovirt.engine.core.vdsbroker.irsbroker.IrsBrokerCommand.IrsProxyData ( sp.getId ( ) ) ) ; } } }
Source:
private void OnRemove ( ) { org.ovirt.engine.core.common.businessentities.Snapshot snapshot = ( ( org.ovirt.engine.core.common.businessentities.Snapshot ) ( getSelectedItem ( ) ) ) ; if ( snapshot == null ) { Cancel ( ) ; return ; } org.ovirt.engine.core.common.businessentities.VM vm = ( ( org.ovirt.engine.core.common.businessentities.VM ) ( getEntity ( ) ) ) ; if ( vm != null ) { org.ovirt.engine.ui.frontend.Frontend.RunAction ( VdcActionType.RemoveSnapshot , new org.ovirt.engine.core.common.action.RemoveSnapshotParameters ( snapshot.getId ( ) , vm.getId ( ) ) , null , null ) ; } getCanSelectSnapshot ( ) . setEntity ( false ) ; Cancel ( ) ; }

Target:
private void onRemove ( ) { org.ovirt.engine.core.common.businessentities.Snapshot snapshot = ( ( org.ovirt.engine.core.common.businessentities.Snapshot ) ( getSelectedItem ( ) ) ) ; if ( snapshot == null ) { cancel ( ) ; return ; } org.ovirt.engine.core.common.businessentities.VM vm = ( ( org.ovirt.engine.core.common.businessentities.VM ) ( getEntity ( ) ) ) ; if ( vm != null ) { org.ovirt.engine.ui.frontend.Frontend.RunAction ( VdcActionType.RemoveSnapshot , new org.ovirt.engine.core.common.action.RemoveSnapshotParameters ( snapshot.getId ( ) , vm.getId ( ) ) , null , null ) ; } getCanSelectSnapshot ( ) . setEntity ( false ) ; cancel ( ) ; }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs args ) { org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs pcArgs = args ; if ( "IsAvailable" . equals ( pcArgs.propertyName ) ) { boolean isAvailable = modelProvider.getModel ( ) . getIsAvailable ( ) ; setAccessible ( isAvailable ) ; } }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < ? extends org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs args ) { if ( "IsAvailable" . equals ( args.propertyName ) ) { boolean isAvailable = modelProvider.getModel ( ) . getIsAvailable ( ) ; setAccessible ( isAvailable ) ; } }
Source:
public static void getVmNextRunConfiguration ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmNextRunConfiguration , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }

Target:
public static void getPoolById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid poolId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmPoolById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( poolId ) , aQuery ) ; }
Source:
protected void executeQueryCommand ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VDS > hosts = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVdsDao ( ) . getAllForCluster ( org.ovirt.engine.core.bll.IsDisplayAddressConsistentInClusterQuery.getParameters ( ) . getId ( ) , org.ovirt.engine.core.bll.IsDisplayAddressConsistentInClusterQuery.getUserID ( ) , org.ovirt.engine.core.bll.IsDisplayAddressConsistentInClusterQuery.getParameters ( ) . isFiltered ( ) ) ; org.ovirt.engine.core.bll.IsDisplayAddressConsistentInClusterQuery.getQueryReturnValue ( ) . setReturnValue ( ( ! ( isDisplayAddressPartiallyOverridden ( hosts ) ) ) ) ; }

Target:
protected void executeQueryCommand ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VDS > hosts = vdsDao.getAllForCluster ( org.ovirt.engine.core.bll.IsDisplayAddressConsistentInClusterQuery.getParameters ( ) . getId ( ) , org.ovirt.engine.core.bll.IsDisplayAddressConsistentInClusterQuery.getUserID ( ) , org.ovirt.engine.core.bll.IsDisplayAddressConsistentInClusterQuery.getParameters ( ) . isFiltered ( ) ) ; org.ovirt.engine.core.bll.IsDisplayAddressConsistentInClusterQuery.getQueryReturnValue ( ) . setReturnValue ( ( ! ( isDisplayAddressPartiallyOverridden ( hosts ) ) ) ) ; }
Source:
public void testGet ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpGetEntityExpectations ( 1 ) ; control.replay ( ) ; verifyModel ( resource.get ( ) , 0 ) ; }

Target:
public void testUpdate ( ) throws java.lang.Exception { setUpEntityQueryExpectations ( VdcQueryType.GetVdsGroupByVdsGroupId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ 2 ] } , getVdsGroupEntity ( ) ) ; setUpGetRngDeviceExpectations ( new int [ ] { 0 } ) ; super . testUpdate ( ) ; }
Source:
public void verifyEngineMessagesSupported ( ) { java.util.ResourceBundle bundle = java.util.ResourceBundle.getBundle ( org.ovirt.engine.core.dal.job.ExecutionMessageDirector.EXECUTION_MESSAGES_FILE_PATH ) ; for ( java.lang.String key : bundle.keySet ( ) ) { if ( key.startsWith ( ExecutionMessageDirector.JOB_MESSAGE_PREFIX ) ) { org.ovirt.engine.core.common.action.VdcActionType.valueOf ( key.substring ( org.ovirt.engine.core.dal.job.ExecutionMessageDirector.JOB_MESSAGE_PREFIX.length ( ) ) ) ; } else if ( key.startsWith ( ExecutionMessageDirector.STEP_MESSAGE_PREFIX ) ) { org.ovirt.engine.core.common.job.StepEnum.valueOf ( key.substring ( org.ovirt.engine.core.dal.job.ExecutionMessageDirector.STEP_MESSAGE_PREFIX.length ( ) ) ) ; } } }

Target:
public void verifyEngineMessagesSupported ( ) { java.util.ResourceBundle bundle = java.util.ResourceBundle.getBundle ( org.ovirt.engine.core.dal.job.ExecutionMessageDirector.EXECUTION_MESSAGES_FILE_PATH ) ; for ( java.lang.String key : bundle.keySet ( ) ) { if ( key.startsWith ( ExecutionMessageDirector.JOB_MESSAGE_PREFIX ) ) { org.ovirt.engine.core.common.action.ActionType.valueOf ( key.substring ( org.ovirt.engine.core.dal.job.ExecutionMessageDirector.JOB_MESSAGE_PREFIX.length ( ) ) ) ; } else if ( key.startsWith ( ExecutionMessageDirector.STEP_MESSAGE_PREFIX ) ) { org.ovirt.engine.core.common.job.StepEnum.valueOf ( key.substring ( org.ovirt.engine.core.dal.job.ExecutionMessageDirector.STEP_MESSAGE_PREFIX.length ( ) ) ) ; } } }
Source:
public void testEffectiveEmulatedMachineCCV ( ) { final org.ovirt.engine.core.common.businessentities.VmBase vmBase = new org.ovirt.engine.core.common.businessentities.VmBase ( ) ; final org.ovirt.engine.core.common.businessentities.Cluster cluster = new org.ovirt.engine.core.common.businessentities.Cluster ( ) ; cluster.setEmulatedMachine ( "pc-i440fx-rhel7.3.0" ) ; vmBase.setCustomCompatibilityVersion ( Version.v4_0 ) ; org.junit.Assert.assertEquals ( "pc-i440fx-rhel7.2.0" , org.ovirt.engine.core.bll.utils.EmulatedMachineUtils.getEffective ( vmBase , ( ) -> cluster ) ) ; }

Target:
public void testEffectiveEmulatedMachineCCV ( ) { final org.ovirt.engine.core.common.businessentities.VmBase vmBase = new org.ovirt.engine.core.common.businessentities.VmBase ( ) ; final org.ovirt.engine.core.common.businessentities.Cluster cluster = new org.ovirt.engine.core.common.businessentities.Cluster ( ) ; cluster.setEmulatedMachine ( "pc-i440fx-rhel7.3.0" ) ; vmBase.setCustomCompatibilityVersion ( Version.v4_0 ) ; org.junit.jupiter.api.Assertions.assertEquals ( "pc-i440fx-rhel7.2.0" , org.ovirt.engine.core.bll.utils.EmulatedMachineUtils.getEffective ( vmBase , ( ) -> cluster ) ) ; }
Source:
public void preferProxyHostFromSameCluster ( ) { mockExistingHosts ( createHost ( VDSStatus.Up , org.ovirt.engine.core.bll.pm.FenceProxyLocatorTest.OTHER_CLUSTER_ID , org.ovirt.engine.core.bll.pm.FenceProxyLocatorTest.FENCED_HOST_DATACENTER_ID ) , createHost ( VDSStatus.Up , org.ovirt.engine.core.bll.pm.FenceProxyLocatorTest.FENCED_HOST_CLUSTER_ID , org.ovirt.engine.core.bll.pm.FenceProxyLocatorTest.FENCED_HOST_DATACENTER_ID ) ) ; org.ovirt.engine.core.common.businessentities.VDS proxyHost = setupLocator ( ) . findProxyHost ( false ) ; org.junit.Assert.assertNotNull ( proxyHost ) ; org.junit.Assert.assertEquals ( proxyHost.getVdsGroupId ( ) , org.ovirt.engine.core.bll.pm.FenceProxyLocatorTest.FENCED_HOST_CLUSTER_ID ) ; }

Target:
public void preferProxyHostFromSameCluster ( ) { mockExistingHosts ( createHost ( VDSStatus.Up , org.ovirt.engine.core.bll.pm.FenceProxyLocatorTest.OTHER_CLUSTER_ID , org.ovirt.engine.core.bll.pm.FenceProxyLocatorTest.FENCED_HOST_DATACENTER_ID ) , createHost ( VDSStatus.Up , org.ovirt.engine.core.bll.pm.FenceProxyLocatorTest.FENCED_HOST_CLUSTER_ID , org.ovirt.engine.core.bll.pm.FenceProxyLocatorTest.FENCED_HOST_DATACENTER_ID ) ) ; org.ovirt.engine.core.common.businessentities.VDS proxyHost = setupLocator ( ) . findProxyHost ( false ) ; org.junit.Assert.assertNotNull ( proxyHost ) ; org.junit.Assert.assertEquals ( proxyHost.getClusterId ( ) , org.ovirt.engine.core.bll.pm.FenceProxyLocatorTest.FENCED_HOST_CLUSTER_ID ) ; }
Source:
private static org.ovirt.engine.core.common.businessentities.VmDevice createDiskVmDevice ( final org.ovirt.engine.core.common.businessentities.DiskImage diskImage ) { final org.ovirt.engine.core.common.businessentities.VmDevice vmDevice = new org.ovirt.engine.core.common.businessentities.VmDevice ( ) ; vmDevice.setIsPlugged ( true ) ; vmDevice.setId ( new org.ovirt.engine.core.common.businessentities.VmDeviceId ( diskImage.getimage_group_id ( ) , org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ) ; return vmDevice ; }

Target:
private static org.ovirt.engine.core.common.businessentities.DiskImage createImage ( ) { final org.ovirt.engine.core.common.businessentities.DiskImage diskImage = new org.ovirt.engine.core.common.businessentities.DiskImage ( ) ; diskImage.setId ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; diskImage.setstorage_ids ( new java.util.ArrayList < org.ovirt.engine.core.compat.Guid > ( java.util.Arrays.asList ( new org.ovirt.engine.core.compat.Guid ( ) ) ) ) ; return diskImage ; }
Source:
public org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeGeoRepStatusForXmlRpc glusterVolumeGeoRepSessionList ( java.lang.String volumeName , java.lang.String slaveHost , java.lang.String slaveVolumeName ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "GlusterVolume.geoRepSessionList" ) . withParameter ( "volumeName" , volumeName ) . withParameter ( "remoteHost" , slaveHost ) . withParameter ( "remoteVolumeName" , slaveVolumeName ) . 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.GlusterVolumeGeoRepStatusForXmlRpc ( response ) ; }

Target:
public org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeGeoRepStatusForXmlRpc glusterVolumeGeoRepSessionList ( java.lang.String volumeName , java.lang.String slaveHost , java.lang.String slaveVolumeName , java.lang.String userName ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "GlusterVolume.geoRepSessionList" ) . withParameter ( "volumeName" , volumeName ) . withParameter ( "remoteHost" , slaveHost ) . withParameter ( "remoteVolumeName" , slaveVolumeName ) . withOptionalParameter ( "remoteUserName" , userName ) . 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.GlusterVolumeGeoRepStatusForXmlRpc ( response ) ; }
Source:
public void readData ( java.io.ObjectInputStream dis ) { synchronized ( ovirt_engine_dwh.sampletimekeepingjob_3_2.SampleTimeKeepingJob.row4Struct.commonByteArrayLock_OVIRT_ENGINE_DWH_SampleTimeKeepingJob ) { try { int length = 0 ; this . time = readString ( dis ) ; this . message = readString ( dis ) ; } catch ( java.io.IOException e ) { throw new java.lang.RuntimeException ( e ) ; } } }

Target:
public void readData ( java.io.ObjectInputStream dis ) { synchronized ( ovirt_engine_dwh.sampletimekeepingjob_3_2.SampleTimeKeepingJob.row6Struct.commonByteArrayLock_OVIRT_ENGINE_DWH_SampleTimeKeepingJob ) { try { int length = 0 ; this . var_name = readString ( dis ) ; this . var_value = readString ( dis ) ; } catch ( java.io.IOException e ) { throw new java.lang.RuntimeException ( e ) ; } } }
Source:
protected void setUpGetEntityExpectations ( int times , boolean notFound ) throws java.lang.Exception { while ( ( times -- ) > 0 ) { setUpGetEntityExpectations ( VdcQueryType.GetVmTemplate , org.ovirt.engine.core.common.queries.GetVmTemplateParameters.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 { while ( ( times -- ) > 0 ) { setUpGetEntityExpectations ( QueryType.GetVmTemplate , org.ovirt.engine.core.common.queries.GetVmTemplateParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , ( notFound ? null : getEntity ( 0 ) ) ) ; } }
Source:
public static void isVmNameUnique ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String name ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ! ( ( ( java.lang.Boolean ) ( source ) ) . booleanValue ( ) ) : false ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.IsVmWithSameNameExist , new org.ovirt.engine.core.common.queries.NameQueryParameters ( name ) , aQuery ) ; }

Target:
public static void isTemplateNameUnique ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String name ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ! ( ( ( java.lang.Boolean ) ( source ) ) . booleanValue ( ) ) : false ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.IsVmTemlateWithSameNameExist , new org.ovirt.engine.core.common.queries.NameQueryParameters ( name ) , aQuery ) ; }