auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
protected void executeQueryCommand ( ) { org.ovirt.engine.core.bll.GetCACertificateQuery.getQueryReturnValue ( ) . setSucceeded ( false ) ; java.lang.String path = org.ovirt.engine.core.common.config.Config.resolveCACertificatePath ( ) ; if ( org.ovirt.engine.core.utils.FileUtil.fileExists ( path ) ) { org.ovirt.engine.core.bll.GetCACertificateQuery.getQueryReturnValue ( ) . setReturnValue ( org.ovirt.engine.core.utils.FileUtil.readAllText ( path ) ) ; org.ovirt.engine.core.bll.GetCACertificateQuery.getQueryReturnValue ( ) . setSucceeded ( true ) ; } }

Target:
protected void executeQueryCommand ( ) { org.ovirt.engine.core.bll.GetCACertificateQuery.getQueryReturnValue ( ) . setSucceeded ( false ) ; java.lang.String path = org.ovirt.engine.core.common.config.Config.resolveCACertificatePath ( ) ; if ( org.ovirt.engine.core.utils.FileUtil.fileExists ( path ) ) { try { org.ovirt.engine.core.bll.GetCACertificateQuery.getQueryReturnValue ( ) . setReturnValue ( org.ovirt.engine.core.utils.FileUtil.readAllText ( path ) ) ; } catch ( java.io.IOException e ) { org.ovirt.engine.core.bll.GetCACertificateQuery.getQueryReturnValue ( ) . setExceptionString ( e.getMessage ( ) ) ; return ; } org.ovirt.engine.core.bll.GetCACertificateQuery.getQueryReturnValue ( ) . setSucceeded ( true ) ; } }
Source:
public void setUp ( ) { org.ovirt.engine.core.compat.Guid vmGuid = org.ovirt.engine.core.compat.Guid.NewGuid ( ) ; org.ovirt.engine.core.compat.Guid snapGuid = org.ovirt.engine.core.compat.Guid.NewGuid ( ) ; org.ovirt.engine.core.common.action.RemoveSnapshotParameters params = new org.ovirt.engine.core.common.action.RemoveSnapshotParameters ( snapGuid , vmGuid ) ; cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.RemoveSnapshotCommand < org.ovirt.engine.core.common.action.RemoveSnapshotParameters > ( params ) ) ; org.mockito.Mockito.doReturn ( vmTemplateDAO ) . when ( cmd ) . getVmTemplateDAO ( ) ; org.mockito.Mockito.doReturn ( diskImageDAO ) . when ( cmd ) . getDiskImageDao ( ) ; }

Target:
public void setUp ( ) { org.ovirt.engine.core.compat.Guid vmGuid = org.ovirt.engine.core.compat.Guid.NewGuid ( ) ; org.ovirt.engine.core.compat.Guid snapGuid = org.ovirt.engine.core.compat.Guid.NewGuid ( ) ; org.ovirt.engine.core.common.action.RemoveSnapshotParameters params = new org.ovirt.engine.core.common.action.RemoveSnapshotParameters ( snapGuid , vmGuid ) ; cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.RemoveSnapshotCommand < org.ovirt.engine.core.common.action.RemoveSnapshotParameters > ( params ) ) ; org.mockito.Mockito.doReturn ( vmTemplateDAO ) . when ( cmd ) . getVmTemplateDAO ( ) ; org.mockito.Mockito.doReturn ( diskImageDAO ) . when ( cmd ) . getDiskImageDao ( ) ; org.mockito.Mockito.doReturn ( snapshotValidator ) . when ( cmd ) . createSnapshotValidator ( ) ; }
Source:
private void dumpProperties ( org.ovirt.engineextensions.aaa.ldap.MapProperties props ) { if ( org.ovirt.engineextensions.aaa.ldap.Framework.log.isDebugEnabled ( ) ) { org.ovirt.engineextensions.aaa.ldap.Framework.log.debug ( "PROPERTIES-BEGIN" ) ; java.util.Set < java.lang.String > sensitiveKeys = new java.util.HashSet < > ( ) ; for ( org.ovirt.engineextensions.aaa.ldap.MapProperties entry : props.get ( "sensitive-keys" ) . getMap ( ) . values ( ) ) { sensitiveKeys.add ( entry.getValue ( ) ) ; } org.ovirt.engineextensions.aaa.ldap.Framework.log.debug ( props.toString ( sensitiveKeys ) ) ; org.ovirt.engineextensions.aaa.ldap.Framework.log.debug ( "PROPERTIES-END" ) ; } }

Target:
private void dumpProperties ( org.ovirt.engineextensions.aaa.ldap.MapProperties props ) { if ( org.ovirt.engineextensions.aaa.ldap.Framework.log.isDebugEnabled ( ) ) { org.ovirt.engineextensions.aaa.ldap.Framework.log.debug ( "PROPERTIES-BEGIN" ) ; java.util.Set < java.lang.String > sensitiveKeys = new java.util.HashSet < > ( ) ; for ( org.ovirt.engineextensions.aaa.ldap.MapProperties entry : props.getOrEmpty ( "sensitive-keys" ) . getMap ( ) . values ( ) ) { sensitiveKeys.add ( entry.getValue ( ) ) ; } org.ovirt.engineextensions.aaa.ldap.Framework.log.debug ( props.toString ( sensitiveKeys ) ) ; org.ovirt.engineextensions.aaa.ldap.Framework.log.debug ( "PROPERTIES-END" ) ; } }
Source:
public void onDoubleClick ( com.google.gwt.event.dom.client.DoubleClickEvent event ) { org.ovirt.engine.ui.uicommonweb.models.Model model = ( ( org.ovirt.engine.ui.common.uicommon.model.SearchableTableModelProvider < ? , ? > ) ( modelProvider ) ) . getModel ( ) ; org.ovirt.engine.ui.uicommonweb.UICommand defaultCommand = model.getDefaultCommand ( ) ; if ( ( defaultCommand != null ) && ( defaultCommand.getIsExecutionAllowed ( ) ) ) { org.ovirt.engine.ui.common.uicommon.model.DeferredModelCommandInvoker invoker = new org.ovirt.engine.ui.common.uicommon.model.DeferredModelCommandInvoker ( model ) ; invoker.invokeDefaultCommand ( ) ; } }

Target:
public void onDoubleClick ( com.google.gwt.event.dom.client.DoubleClickEvent event ) { org.ovirt.engine.ui.uicommonweb.models.SearchableListModel model = ( ( org.ovirt.engine.ui.common.uicommon.model.SearchableTableModelProvider < ? , ? > ) ( modelProvider ) ) . getModel ( ) ; org.ovirt.engine.ui.uicommonweb.UICommand command = model.getDoubleClickCommand ( ) ; if ( ( command != null ) && ( command.getIsExecutionAllowed ( ) ) ) { org.ovirt.engine.ui.common.uicommon.model.DeferredModelCommandInvoker invoker = new org.ovirt.engine.ui.common.uicommon.model.DeferredModelCommandInvoker ( model ) ; invoker.invokeCommand ( command ) ; } }
Source:
public org.ovirt.engine.api.model.Files list ( ) { if ( org.ovirt.engine.api.restapi.resource.BackendStorageDomainResource.isIsoDomain ( getEntity ( org.ovirt.engine.core.common.businessentities.storage_domains.class , VdcQueryType.GetStorageDomainById , new org.ovirt.engine.core.common.queries.StorageDomainQueryParametersBase ( asGuid ( storageDomainId ) ) , "storage_domain" ) ) ) { return mapCollection ( listFiles ( ) ) ; } else { return notFound ( org.ovirt.engine.api.model.Files.class ) ; } }

Target:
public org.ovirt.engine.api.model.Files list ( ) { if ( org.ovirt.engine.api.restapi.resource.BackendStorageDomainResource.isIsoDomain ( getEntity ( org.ovirt.engine.api.model.StorageDomain.class , VdcQueryType.GetStorageDomainById , new org.ovirt.engine.core.common.queries.StorageDomainQueryParametersBase ( asGuid ( storageDomainId ) ) , "storage_domain" ) ) ) { return mapCollection ( listFiles ( ) ) ; } else { return notFound ( org.ovirt.engine.api.model.Files.class ) ; } }
Source:
public void testImportWithClusterName ( ) throws java.lang.Exception { setUpEntityQueryExpectations ( VdcQueryType.GetVdsGroupByName , org.ovirt.engine.core.common.queries.NameQueryParameters.class , new java.lang.String [ ] { "Name" } , new java.lang.Object [ ] { NAMES [ 1 ] } , getCluster ( 1 ) ) ; org.ovirt.engine.api.model.StorageDomain storageDomain = new org.ovirt.engine.api.model.StorageDomain ( ) ; storageDomain.setId ( GUIDS [ 2 ] . toString ( ) ) ; org.ovirt.engine.api.model.Cluster cluster = new org.ovirt.engine.api.model.Cluster ( ) ; cluster.setName ( NAMES [ 1 ] ) ; setUpGetDataCenterByStorageDomainExpectations ( org.ovirt.engine.api.restapi.resource.BackendStorageDomainTemplateResourceTest.STORAGE_DOMAIN_ID ) ; doTestImport ( storageDomain , cluster , false ) ; }

Target:
public void testImportWithClusterName ( ) throws java.lang.Exception { setUpEntityQueryExpectations ( VdcQueryType.GetClusterByName , org.ovirt.engine.core.common.queries.NameQueryParameters.class , new java.lang.String [ ] { "Name" } , new java.lang.Object [ ] { NAMES [ 1 ] } , getCluster ( 1 ) ) ; org.ovirt.engine.api.model.StorageDomain storageDomain = new org.ovirt.engine.api.model.StorageDomain ( ) ; storageDomain.setId ( GUIDS [ 2 ] . toString ( ) ) ; org.ovirt.engine.core.common.businessentities.Cluster cluster = new org.ovirt.engine.core.common.businessentities.Cluster ( ) ; cluster.setName ( NAMES [ 1 ] ) ; setUpGetDataCenterByStorageDomainExpectations ( org.ovirt.engine.api.restapi.resource.BackendStorageDomainTemplateResourceTest.STORAGE_DOMAIN_ID ) ; doTestImport ( storageDomain , cluster , false ) ; }
Source:
private void updateShareable ( org.ovirt.engine.core.common.businessentities.VolumeType volumeType , org.ovirt.engine.core.common.businessentities.StorageType storageType ) { if ( ( storageType.isBlockDomain ( ) ) && ( volumeType == ( org.ovirt.engine.core.common.businessentities.VolumeType.Sparse ) ) ) { getIsShareable ( ) . setChangeProhibitionReason ( org.ovirt.engine.ui.uicommonweb.models.vms.AbstractDiskModel.CONSTANTS.shareableDiskNotSupportedByConfiguration ( ) ) ; getIsShareable ( ) . setIsChangable ( false ) ; getIsShareable ( ) . setEntity ( false ) ; } else { getIsShareable ( ) . setIsChangable ( isEditEnabled ( ) ) ; } }

Target:
private void updateShareable ( org.ovirt.engine.core.common.businessentities.storage.VolumeType volumeType , org.ovirt.engine.core.common.businessentities.storage.StorageType storageType ) { if ( ( storageType.isBlockDomain ( ) ) && ( volumeType == ( org.ovirt.engine.core.common.businessentities.storage.VolumeType.Sparse ) ) ) { getIsShareable ( ) . setChangeProhibitionReason ( org.ovirt.engine.ui.uicommonweb.models.vms.AbstractDiskModel.constants.shareableDiskNotSupportedByConfiguration ( ) ) ; getIsShareable ( ) . setIsChangable ( false ) ; getIsShareable ( ) . setEntity ( false ) ; } else { getIsShareable ( ) . setIsChangable ( isEditEnabled ( ) ) ; } }
Source:
private void runOnce ( ) { org.ovirt.engine.core.common.businessentities.VM vm = ( ( org.ovirt.engine.core.common.businessentities.VM ) ( getSelectedItem ( ) ) ) ; org.ovirt.engine.ui.uicommonweb.models.vms.RunOnceModel model = new org.ovirt.engine.ui.uicommonweb.models.vms.WebadminRunOnceModel ( vm , getCustomPropertiesKeysList ( ) . get ( vm.getVdsGroupCompatibilityVersion ( ) ) , this ) ; setWindow ( model ) ; model.init ( ) ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object result ) { org.ovirt.engine.ui.uicommonweb.models.vms.RunOnceModel runOnceModel = new org.ovirt.engine.ui.uicommonweb.models.vms.WebadminRunOnceModel ( ( ( org.ovirt.engine.core.common.businessentities.VM ) ( result ) ) , getCustomPropertiesKeysList ( ) . get ( ( ( org.ovirt.engine.core.common.businessentities.VM ) ( result ) ) . getVdsGroupCompatibilityVersion ( ) ) , this ) ; setWindow ( runOnceModel ) ; runOnceModel.init ( ) ; }
Source:
private static int getFirstImage ( java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > images , org.ovirt.engine.core.common.businessentities.DiskImage curr ) { for ( int i = 0 ; i < ( images.size ( ) ) ; i ++ ) { if ( curr.getParentId ( ) . equals ( images.get ( i ) . getImageId ( ) ) ) { return i ; } } return - 1 ; }

Target:
protected boolean validateDiskInterface ( java.lang.Iterable < org.ovirt.engine.core.common.businessentities.DiskImage > images ) { for ( org.ovirt.engine.core.common.businessentities.DiskImage diskImage : images ) { if ( ( ( diskImage.getDiskInterface ( ) ) == ( org.ovirt.engine.core.common.businessentities.DiskInterface.VirtIO_SCSI ) ) && ( ! ( org.ovirt.engine.core.common.FeatureSupported.virtIoScsi ( getVdsGroup ( ) . getcompatibility_version ( ) ) ) ) ) { addCanDoActionMessage ( VdcBllMessages.VIRTIO_SCSI_INTERFACE_IS_NOT_AVAILABLE_FOR_CLUSTER_LEVEL ) ; return false ; } } return true ; }
Source:
public void testAddAllSupportedHostFeature ( ) { java.util.Set < java.lang.String > newFatures = new java.util.HashSet < > ( java.util.Arrays.asList ( "NEW__FEATURE_1" , "NEW__FEATURE_2" , "NEW__FEATURE_3" ) ) ; dao.addAllSupportedHostFeature ( FixturesTool.HOST_ID , newFatures ) ; java.util.Set < java.lang.String > featuresSupported = dao.getSupportedHostFeaturesByHostId ( FixturesTool.HOST_ID ) ; org.junit.Assert.assertTrue ( "Failed to add the feature" , featuresSupported.containsAll ( newFatures ) ) ; }

Target:
public void testAddAllSupportedHostFeature ( ) { java.util.Set < java.lang.String > newFatures = new java.util.HashSet < > ( java.util.Arrays.asList ( "NEW__FEATURE_1" , "NEW__FEATURE_2" , "NEW__FEATURE_3" ) ) ; dao.addAllSupportedHostFeature ( FixturesTool.HOST_ID , newFatures ) ; java.util.Set < java.lang.String > featuresSupported = dao.getSupportedHostFeaturesByHostId ( FixturesTool.HOST_ID ) ; org.junit.jupiter.api.Assertions.assertTrue ( featuresSupported.containsAll ( newFatures ) , "Failed to add the feature" ) ; }
Source:
public static void getStorageDomainListByTemplate ( 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.StorageDomain > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainsByVmTemplateId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( templateId ) , aQuery ) ; }

Target:
public static void getAllQuotasByClusterId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { 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.Quota > ( ) ; } return ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Quota > ) ( source ) ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllRelevantQuotasForVdsGroup , new org.ovirt.engine.core.common.queries.IdQueryParameters ( clusterId ) , aQuery ) ; }
Source:
protected boolean validate ( ) { if ( ( ( org.ovirt.engine.core.bll.gluster.RefreshGlusterHooksCommand.getParameters ( ) . getClusterId ( ) ) == null ) || ( ( org.ovirt.engine.core.bll.gluster.RefreshGlusterHooksCommand.getVdsGroup ( ) ) == null ) ) { addValidationMessage ( EngineMessage.ACTION_TYPE_FAILED_CLUSTER_IS_NOT_VALID ) ; return false ; } if ( ! ( super . validate ( ) ) ) { return false ; } return true ; }

Target:
protected boolean validate ( ) { if ( ( ( org.ovirt.engine.core.bll.gluster.RefreshGlusterHooksCommand.getParameters ( ) . getClusterId ( ) ) == null ) || ( ( org.ovirt.engine.core.bll.gluster.RefreshGlusterHooksCommand.getCluster ( ) ) == null ) ) { addValidationMessage ( EngineMessage.ACTION_TYPE_FAILED_CLUSTER_IS_NOT_VALID ) ; return false ; } if ( ! ( super . validate ( ) ) ) { return false ; } return true ; }
Source:
public static void GetExternalProviderHostList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid providerId , boolean filterOutExistingHosts , java.lang.String searchFilter ) { 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.VDS > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetHostListFromExternalProvider , new org.ovirt.engine.core.common.queries.GetHostListFromExternalProviderParameters ( providerId , filterOutExistingHosts , searchFilter ) , aQuery ) ; }

Target:
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 > ( ) ; } java.util.Collections.sort ( ( ( java.util.List < org.ovirt.engine.core.common.businessentities.Provider > ) ( source ) ) , new org.ovirt.engine.core.common.businessentities.comparators.NameableComparator ( ) ) ; return source ; }
Source:
private void initVirtResources ( ) { if ( InitializeStorage ( ) ) { processFencing ( ) ; processStoragePoolStatus ( ) ; } else { setNonOperational ( NonOperationalReason.STORAGE_DOMAIN_UNREACHABLE ) ; } }

Target:
private void initVirtResources ( ) { if ( InitializeStorage ( ) ) { processFencing ( ) ; processStoragePoolStatus ( ) ; } else { java.util.Map < java.lang.String , java.lang.String > customLogValues = java.util.Collections.singletonMap ( "StoragePoolName" , org.ovirt.engine.core.bll.InitVdsOnUpCommand.getStoragePoolName ( ) ) ; setNonOperational ( NonOperationalReason.STORAGE_DOMAIN_UNREACHABLE , customLogValues ) ; } }
Source:
protected void onEntityChanged ( ) { if ( ( getEntity ( ) ) == null ) { return ; } super . onEntityChanged ( ) ; org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity glusterVolumeEntity = ( ( org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity ) ( getEntity ( ) ) ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeOptionEntity > list = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeOptionEntity > ( ) ; for ( org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeOptionEntity glusterVolumeOption : glusterVolumeEntity.getOptions ( ) ) { list.add ( glusterVolumeOption ) ; } setItems ( list ) ; }

Target:
protected void onEntityChanged ( ) { super . onEntityChanged ( ) ; getSearchCommand ( ) . execute ( ) ; }
Source:
public void canDoActionInvalidSourceDomain ( ) { createParameters ( ) ; org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain = initStorageDomain ( srcStorageId ) ; storageDomain.setStatus ( StorageDomainStatus.Locked ) ; initDiskImage ( diskImageGroupId , diskImageId ) ; initVm ( VMStatus.Up , org.ovirt.engine.core.compat.Guid.newGuid ( ) , diskImageGroupId ) ; org.junit.Assert.assertFalse ( command.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( EngineMessage.ACTION_TYPE_FAILED_STORAGE_DOMAIN_STATUS_ILLEGAL2.toString ( ) ) ) ; }

Target:
public void validateInvalidSourceDomain ( ) { createParameters ( ) ; org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain = initStorageDomain ( srcStorageId ) ; storageDomain.setStatus ( StorageDomainStatus.Locked ) ; initDiskImage ( diskImageGroupId , diskImageId ) ; initVm ( VMStatus.Up , org.ovirt.engine.core.compat.Guid.newGuid ( ) , diskImageGroupId ) ; org.junit.Assert.assertFalse ( command.validate ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getValidationMessages ( ) . contains ( EngineMessage.ACTION_TYPE_FAILED_STORAGE_DOMAIN_STATUS_ILLEGAL2.toString ( ) ) ) ; }
Source:
public void testValidateClusterSupportForVirtioScsi ( ) { org.ovirt.engine.core.bll.ImportVmCommand < org.ovirt.engine.core.common.action.ImportVmParameters > cmd = setupDiskSpaceTest ( createParameters ( ) ) ; org.mockito.Mockito.doReturn ( true ) . when ( cmd ) . validateImages ( org.mockito.Matchers.any ( java.util.Map.class ) ) ; cmd.getParameters ( ) . getVm ( ) . getDiskMap ( ) . values ( ) . iterator ( ) . next ( ) . setDiskInterface ( DiskInterface.VirtIO_SCSI ) ; cmd.getVdsGroup ( ) . setCompatibilityVersion ( Version.v3_2 ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( cmd , EngineMessage.VIRTIO_SCSI_INTERFACE_IS_NOT_AVAILABLE_FOR_CLUSTER_LEVEL ) ; }

Target:
public void testValidateClusterSupportForVirtioScsi ( ) { org.ovirt.engine.core.bll.ImportVmCommand < org.ovirt.engine.core.common.action.ImportVmParameters > cmd = setupDiskSpaceTest ( createParameters ( ) ) ; org.mockito.Mockito.doReturn ( true ) . when ( cmd ) . validateImages ( org.mockito.Matchers.any ( java.util.Map.class ) ) ; cmd.getParameters ( ) . getVm ( ) . getDiskMap ( ) . values ( ) . iterator ( ) . next ( ) . setDiskInterface ( DiskInterface.VirtIO_SCSI ) ; cmd.getVdsGroup ( ) . setCompatibilityVersion ( Version.v3_2 ) ; cmd.initEffectiveCompatibilityVersion ( ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( cmd , EngineMessage.VIRTIO_SCSI_INTERFACE_IS_NOT_AVAILABLE_FOR_CLUSTER_LEVEL ) ; }
Source:
private org.ovirt.engine.core.common.action.ManagementNetworkOnClusterOperationParameters createAddCommandParams ( org.ovirt.engine.api.model.Cluster cluster , org.ovirt.engine.core.common.businessentities.StoragePool dataCenter ) { org.ovirt.engine.core.common.businessentities.VDSGroup clusterEntity = map ( cluster , map ( dataCenter ) ) ; if ( ! ( ( cluster.isSetErrorHandling ( ) ) && ( cluster.getErrorHandling ( ) . isSetOnError ( ) ) ) ) { clusterEntity.setMigrateOnError ( null ) ; } final org.ovirt.engine.core.compat.Guid managementNetworkId = managementNetworkFinder.getManagementNetworkId ( cluster , dataCenter.getId ( ) ) ; return new org.ovirt.engine.core.common.action.ManagementNetworkOnClusterOperationParameters ( clusterEntity , managementNetworkId ) ; }

Target:
private org.ovirt.engine.core.common.action.ManagementNetworkOnClusterOperationParameters createAddCommandParams ( org.ovirt.engine.core.common.businessentities.Cluster cluster , org.ovirt.engine.core.common.businessentities.StoragePool dataCenter ) { org.ovirt.engine.core.common.businessentities.Cluster clusterEntity = map ( cluster , map ( dataCenter ) ) ; if ( ! ( ( cluster.isSetErrorHandling ( ) ) && ( cluster.getErrorHandling ( ) . isSetOnError ( ) ) ) ) { clusterEntity.setMigrateOnError ( null ) ; } final org.ovirt.engine.core.compat.Guid managementNetworkId = managementNetworkFinder.getManagementNetworkId ( cluster , dataCenter.getId ( ) ) ; return new org.ovirt.engine.core.common.action.ManagementNetworkOnClusterOperationParameters ( clusterEntity , managementNetworkId ) ; }
Source:
public static java.lang.String toJson ( final java.util.Map < org.ovirt.engine.core.compat.Guid , java.util.List < org.ovirt.engine.core.bll.validator.InClusterUpgradeValidator.UpgradeError > > hosts , final java.util.Map < org.ovirt.engine.core.compat.Guid , java.util.List < org.ovirt.engine.core.bll.validator.InClusterUpgradeValidator.UpgradeError > > vms ) { final org.codehaus.jackson.map.ObjectMapper mapper = new org.codehaus.jackson.map.ObjectMapper ( ) ; mapper.setSerializationInclusion ( JsonSerialize.Inclusion.NON_NULL ) ; try { return mapper.writerWithDefaultPrettyPrinter ( ) . writeValueAsString ( new org.ovirt.engine.core.bll.validator.InClusterUpgradeValidator.ClusterValidation ( hosts , vms ) ) ; } catch ( java.io.IOException e ) { throw new java.lang.RuntimeException ( e ) ; } }

Target:
private java.util.List < java.lang.String > toHostEngineMessage ( final org.ovirt.engine.core.common.businessentities.VDS host , final org.ovirt.engine.core.common.errors.EngineMessage error ) { return java.util.Arrays.asList ( error.name ( ) , java.lang.String.format ( "$%1$s %2$s" , "hostName" , host.getName ( ) ) , java.lang.String.format ( "$%1$s %2$s" , "hostId" , host.getId ( ) ) ) ; }
Source:
protected void setupSelectedTemplate ( org.ovirt.engine.ui.uicommonweb.models.ListModel model , java.util.List < org.ovirt.engine.core.common.businessentities.VmTemplate > templates ) { getModel ( ) . getTemplate ( ) . setSelectedItem ( org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VmTemplate > firstOrDefault ( templates ) ) ; }

Target:
public void onSuccess ( java.lang.Object target1 , java.lang.Object returnValue1 ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmTemplate > baseTemplates = filterNotBaseTemplates ( ( ( java.util.List < org.ovirt.engine.core.common.businessentities.VmTemplate > ) ( returnValue1 ) ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VmTemplate > filteredTemplates = org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.filterTemplatesByArchitecture ( baseTemplates , dataCenterWithCluster.getCluster ( ) . getArchitecture ( ) ) ; getModel ( ) . getBaseTemplate ( ) . setItems ( filteredTemplates ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.OneLUNReturnForXmlRpc getDeviceInfo ( java.lang.String devGUID ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.getDeviceInfo ( devGUID ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.OneLUNReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.OneLUNReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc hotunplugDisk ( java.util.Map info ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.hotunplugDisk ( info ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
private void addSelectedItemsChangedListener ( ) { org.ovirt.engine.ui.uicompat.IEventListener < org.ovirt.engine.ui.uicompat.EventArgs > selectionChangedListener = new org.ovirt.engine.ui.uicompat.IEventListener < org.ovirt.engine.ui.uicompat.EventArgs > ( ) { @ java.lang.Override public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < ? extends org.ovirt.engine.ui.uicompat.EventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { updateWarningLabel ( ) ; } } ; attachableDisksMap.get ( DiskStorageType.IMAGE ) . getSelectedItemsChangedEvent ( ) . addListener ( selectionChangedListener ) ; attachableDisksMap.get ( DiskStorageType.CINDER ) . getSelectedItemsChangedEvent ( ) . addListener ( selectionChangedListener ) ; attachableDisksMap.get ( DiskStorageType.LUN ) . getSelectedItemsChangedEvent ( ) . addListener ( selectionChangedListener ) ; }

Target:
private void addIsPluggedEntityChangedListener ( ) { org.ovirt.engine.ui.uicompat.IEventListener < org.ovirt.engine.ui.uicompat.EventArgs > entityChangedListener = new org.ovirt.engine.ui.uicompat.IEventListener < org.ovirt.engine.ui.uicompat.EventArgs > ( ) { @ java.lang.Override public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < ? extends org.ovirt.engine.ui.uicompat.EventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { updateWarningLabel ( ) ; } } ; getIsPlugged ( ) . getEntityChangedEvent ( ) . addListener ( entityChangedListener ) ; }
Source:
public void testGetAllQuotaSearch ( ) throws java.lang.Exception { org.ovirt.engine.core.common.queries.SearchParameters searchParam = new org.ovirt.engine.core.common.queries.SearchParameters ( ( "Quota" + ( org.ovirt.engine.core.common.utils.CommonConstants.QUERY_RETURN_TYPE_SEPARATOR ) ) , org.ovirt.engine.core.common.interfaces.SearchType.Quota ) ; org.ovirt.engine.core.bll.SearchQuery < org.ovirt.engine.core.common.queries.SearchParameters > searchQuery = spySearchQuery ( searchParam ) ; searchQuery.executeQueryCommand ( ) ; org.junit.Assert.assertEquals ( quotaResultList , searchQuery.getQueryReturnValue ( ) . getReturnValue ( ) ) ; }

Target:
public void testGetAllQuotaSearch ( ) throws java.lang.Exception { org.mockito.Mockito.when ( getQueryParameters ( ) . getSearchPattern ( ) ) . thenReturn ( ( "Quota" + ( org.ovirt.engine.core.common.utils.CommonConstants.QUERY_RETURN_TYPE_SEPARATOR ) ) ) ; org.mockito.Mockito.when ( getQueryParameters ( ) . getSearchTypeValue ( ) ) . thenReturn ( SearchType.Quota ) ; getQuery ( ) . executeQueryCommand ( ) ; org.junit.Assert.assertEquals ( quotaResultList , getQuery ( ) . getQueryReturnValue ( ) . getReturnValue ( ) ) ; }
Source:
private void initializeItems ( ) { java.util.List < org.ovirt.engine.ui.uicommonweb.models.storage.IStorageModel > items = org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getIsoStorageModels ( ) ; org.ovirt.engine.ui.uicommonweb.models.storage.NfsStorageModel tempVar2 = new org.ovirt.engine.ui.uicommonweb.models.storage.NfsStorageModel ( ) ; tempVar2.setRole ( StorageDomainType.ImportExport ) ; items.add ( tempVar2 ) ; items.addAll ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getFileDataStorageModels ( ) ) ; items.addAll ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getImportBlockDataStorageModels ( ) ) ; getModel ( ) . setItems ( items ) ; }

Target:
private void initializeItems ( ) { java.util.List < org.ovirt.engine.ui.uicommonweb.models.storage.IStorageModel > items = org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getIsoStorageModels ( ) ; items.addAll ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getExportStorageModels ( ) ) ; items.addAll ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getFileDataStorageModels ( ) ) ; items.addAll ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getImportBlockDataStorageModels ( ) ) ; getModel ( ) . setItems ( items ) ; }
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.RunQuery ( VdcQueryType.GetVmTemplatesDisks , new org.ovirt.engine.core.common.queries.GetVmTemplatesDisksParameters ( templateId ) , aQuery ) ; }

Target:
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.RunQuery ( VdcQueryType.GetVmTemplatesDisks , new org.ovirt.engine.core.common.queries.IdQueryParameters ( templateId ) , aQuery ) ; }
Source:
private void sendNotification ( java.lang.String message , java.lang.String vmId , boolean removeClient ) throws org.ovirt.vdsm.jsonrpc.client.ClientConnectionException { if ( message == null ) { org.ovirt.vdsmfake.rpc.json.JsonRpcNotification.log.warn ( "empty message has arrived, ignore empty messages" ) ; } send ( messageFormatter ( message , vmId ) , vmId , removeClient ) ; }

Target:
private void sendNotification ( java.lang.String message , java.lang.String id , boolean removeClient , java.lang.String method ) throws org.ovirt.vdsm.jsonrpc.client.ClientConnectionException { if ( message == null ) { org.ovirt.vdsmfake.rpc.json.JsonRpcNotification.log.warn ( "empty message has arrived, ignore empty messages" ) ; } send ( messageFormatter ( message , id , method ) , id , removeClient ) ; }
Source:
private boolean checkDerivedVmFromTemplateExists ( org.ovirt.engine.core.common.businessentities.storage.DiskImage diskImage ) { java.util.List < java.lang.String > vmNames = getNamesOfDerivedVmsFromTemplate ( diskImage ) ; if ( ! ( vmNames.isEmpty ( ) ) ) { addCanDoActionMessage ( EngineMessage.VMT_CANNOT_REMOVE_DETECTED_DERIVED_VM ) ; addCanDoActionMessageVariable ( "vmsList" , org.apache.commons.lang.StringUtils.join ( vmNames , "," ) ) ; return false ; } return true ; }

Target:
private boolean checkDerivedVmFromTemplateExists ( org.ovirt.engine.core.common.businessentities.storage.DiskImage diskImage ) { java.util.List < java.lang.String > vmNames = getNamesOfDerivedVmsFromTemplate ( diskImage ) ; if ( ! ( vmNames.isEmpty ( ) ) ) { addValidationMessage ( EngineMessage.VMT_CANNOT_REMOVE_DETECTED_DERIVED_VM ) ; addValidationMessageVariable ( "vmsList" , org.apache.commons.lang.StringUtils.join ( vmNames , "," ) ) ; return false ; } return true ; }
Source:
private static java.util.Map < java.lang.String , java.lang.Object > setMockForTesting ( java.util.Map < java.lang.String , java.lang.Object > diskData ) { java.util.Map < java.lang.String , java.util.Map < java.lang.String , java.lang.Object > > disksData = new java.util.HashMap < > ( ) ; disksData.put ( "vda" , diskData ) ; return org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectBuilderTest.setDisksInXmlRpc ( disksData ) ; }

Target:
private static java.util.Map < java.lang.String , java.lang.Object > setMockForTesting ( java.util.Map < java.lang.String , java.lang.Object > diskData ) { java.util.Map < java.lang.String , java.util.Map < java.lang.String , java.lang.Object > > disksData = new java.util.HashMap < > ( ) ; disksData.put ( "vda" , diskData ) ; return org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectBuilderTest.setDisks ( disksData ) ; }
Source:
public void testListLimitResults ( ) throws java.lang.Exception { javax.ws.rs.core.UriInfo uriInfo = setUpUriExpectationsWithMax ( false ) ; setUpQueryExpectations ( "" ) ; collection.setUriInfo ( uriInfo ) ; java.util.List < org.ovirt.engine.api.model.Tag > results = getCollection ( ) ; org.junit.Assert.assertNotNull ( collection ) ; org.junit.Assert.assertEquals ( 3 , results.size ( ) ) ; }

Target:
public void testListLimitResults ( ) throws java.lang.Exception { javax.ws.rs.core.UriInfo uriInfo = setUpUriExpectationsWithMax ( false ) ; setUpQueryExpectations ( "" ) ; collection.setUriInfo ( uriInfo ) ; java.util.List < org.ovirt.engine.api.model.Tag > results = getCollection ( ) ; org.junit.jupiter.api.Assertions.assertNotNull ( collection ) ; org.junit.jupiter.api.Assertions.assertEquals ( 3 , results.size ( ) ) ; }
Source:
public void eventRaised ( org.ovirt.engine.core.compat.Event ev , java.lang.Object sender , org.ovirt.engine.core.compat.EventArgs args ) { super . eventRaised ( ev , sender , args ) ; if ( ( ev.equals ( org.ovirt.engine.ui.uicommonweb.models.hosts.SelectedItemChangedEventDefinition ) ) && ( sender == ( getCluster ( ) ) ) ) { Cluster_SelectedItemChanged ( ) ; } }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { super . eventRaised ( ev , sender , args ) ; if ( ( ev.equals ( org.ovirt.engine.ui.uicommonweb.models.hosts.SelectedItemChangedEventDefinition ) ) && ( sender == ( getCluster ( ) ) ) ) { Cluster_SelectedItemChanged ( ) ; } }
Source:
public void sameBondNameSentTwice ( ) { org.ovirt.engine.core.common.businessentities.VdsNetworkInterface bond = createBond ( null ) ; mockExistingIfaces ( bond ) ; org.ovirt.engine.core.bll.SetupNetworksHelper helper = createHelper ( createParametersForNics ( bond , bond ) ) ; validateAndExpectViolation ( helper , VdcBllMessages.NETWORK_INTERFACE_NAME_ALREADY_IN_USE ) ; }

Target:
public void bondWithNetworkDidntChange ( ) { org.ovirt.engine.core.common.businessentities.VdsNetworkInterface bond = createBond ( org.ovirt.engine.core.bll.SetupNetworksHelperTest.BOND_NAME , "net" ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VdsNetworkInterface > ifaces = createNics ( bond.getName ( ) ) ; mockExistingIfacesWithBond ( bond , ifaces ) ; org.ovirt.engine.core.common.action.SetupNetworksParameters parameters = new org.ovirt.engine.core.common.action.SetupNetworksParameters ( ) ; ifaces.add ( bond ) ; parameters.setInterfaces ( ifaces ) ; org.ovirt.engine.core.bll.SetupNetworksHelper helper = createHelper ( parameters ) ; validateAndExpectNoViolations ( helper ) ; assertNoBondsModified ( helper ) ; assertNoNetworksModified ( helper ) ; assertNoBondsRemoved ( helper ) ; assertNoNetworksRemoved ( helper ) ; }
Source:
public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.RepoFileMetaData > repoList = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.RepoFileMetaData > ) ( source ) ) ; java.util.ArrayList < java.lang.String > fileNameList = new java.util.ArrayList < java.lang.String > ( ) ; for ( org.ovirt.engine.core.common.businessentities.RepoFileMetaData RepoFileMetaData : repoList ) { fileNameList.add ( RepoFileMetaData.getRepoImageId ( ) ) ; } java.util.Collections.sort ( fileNameList , java.lang.String.CASE_INSENSITIVE_ORDER ) ; return fileNameList ; } return new java.util.ArrayList < java.lang.String > ( ) ; }

Target:
public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.RepoImage > repoList = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.RepoImage > ) ( source ) ) ; java.util.ArrayList < java.lang.String > fileNameList = new java.util.ArrayList < java.lang.String > ( ) ; for ( org.ovirt.engine.core.common.businessentities.RepoImage repoImage : repoList ) { fileNameList.add ( repoImage.getRepoImageId ( ) ) ; } java.util.Collections.sort ( fileNameList , java.lang.String.CASE_INSENSITIVE_ORDER ) ; return fileNameList ; } return new java.util.ArrayList < java.lang.String > ( ) ; }
Source:
public void setItems ( java.lang.Iterable value ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > disks = ( value != null ) ? org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.Disk > Cast ( value ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ( ) ; org.ovirt.engine.ui.uicommonweb.Linq.Sort ( disks , new org.ovirt.engine.ui.uicommonweb.Linq.DiskByAliasComparer ( ) ) ; super . setItems ( disks ) ; UpdateActionAvailability ( ) ; }

Target:
public void setItems ( java.lang.Iterable value ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > disks = ( value != null ) ? org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.Disk > cast ( value ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ( ) ; org.ovirt.engine.ui.uicommonweb.Linq.sort ( disks , new org.ovirt.engine.ui.uicommonweb.Linq.DiskByAliasComparer ( ) ) ; super . setItems ( disks ) ; UpdateActionAvailability ( ) ; }
Source:
public static void getMaxVmMemSize ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , boolean is64 ) { 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 source ; } return 262144 ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( ( is64 ? org.ovirt.engine.core.common.queries.ConfigurationValues.VM64BitMaxMemorySizeInMB : org.ovirt.engine.core.common.queries.ConfigurationValues.VM32BitMaxMemorySizeInMB ) , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public static boolean isMemorySnapshotSupported ( org.ovirt.engine.core.common.businessentities.VM vm ) { if ( vm == null ) { return false ; } boolean archMemorySnapshotSupported = org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.isMemorySnapshotSupportedByArchitecture ( vm.getClusterArch ( ) , vm.getVdsGroupCompatibilityVersion ( ) ) ; return ( ( java.lang.Boolean ) ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigValuePreConverted ( ConfigurationValues.MemorySnapshotSupported , vm.getVdsGroupCompatibilityVersion ( ) . toString ( ) ) ) ) && archMemorySnapshotSupported ; }
Source:
public void save ( org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity glusterHook ) { getCallsHandler ( ) . executeModification ( "InsertGlusterHook" , createFullParametersMapper ( glusterHook ) ) ; saveGlusterServerHook ( glusterHook.getId ( ) , null , glusterHook.getChecksum ( ) , glusterHook.getStatus ( ) ) ; }

Target:
public org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity getById ( org.ovirt.engine.core.compat.Guid id , boolean eagerLoad ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity glusterHook = getCallsHandler ( ) . executeRead ( "GetGlusterHookById" , org.ovirt.engine.core.dao.gluster.GlusterHooksDaoDbFacadeImpl.glusterHookRowMapper , createIdParameterMapper ( id ) . addValue ( "includeContent" , eagerLoad ) ) ; if ( eagerLoad ) { java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterServerHook > serverHooks = getCallsHandler ( ) . executeReadList ( "GetGlusterServerHooksById" , org.ovirt.engine.core.dao.gluster.GlusterHooksDaoDbFacadeImpl.glusterServerHookRowMapper , createIdParameterMapper ( id ) ) ; if ( serverHooks != null ) { glusterHook.setServerHooks ( serverHooks ) ; } } return glusterHook ; }
Source:
public void send ( byte [ ] message ) { outbox.addFirst ( java.nio.ByteBuffer.wrap ( message ) ) ; org.ovirt.vdsm.jsonrpc.client.reactors.stomp.SSLStompClient.LOG.info ( ( "Message sent: " + ( new java.lang.String ( message , org.ovirt.vdsm.jsonrpc.client.utils.JsonUtils.UTF8 ) ) ) ) ; final org.ovirt.vdsm.jsonrpc.client.reactors.ReactorClient client = this ; scheduleTask ( new java.util.concurrent.Callable < java.lang.Void > ( ) { @ java.lang.Override public java.lang.Void call ( ) throws org.ovirt.vdsm.jsonrpc.client.ClientConnectionException { client.updateInterestedOps ( ) ; return null ; } } ) ; }

Target:
protected void postConnect ( org.ovirt.vdsm.jsonrpc.client.utils.OneTimeCallback callback ) throws org.ovirt.vdsm.jsonrpc.client.ClientConnectionException { super . postConnect ( getPostConnectCallback ( ) ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.storage.Disk createDisk ( org.ovirt.engine.core.compat.Guid id , boolean boot ) { org.ovirt.engine.core.common.businessentities.storage.Disk disk = new org.ovirt.engine.core.common.businessentities.storage.DiskImageBase ( ) ; disk.setId ( id ) ; disk.setBoot ( boot ) ; return disk ; }

Target:
private org.ovirt.engine.core.common.businessentities.storage.Disk createDisk ( org.ovirt.engine.core.compat.Guid id , boolean boot ) { org.ovirt.engine.core.common.businessentities.storage.Disk disk = new org.ovirt.engine.core.common.businessentities.storage.DiskImageBase ( ) ; disk.setId ( id ) ; org.ovirt.engine.core.common.businessentities.storage.DiskVmElement dve = new org.ovirt.engine.core.common.businessentities.storage.DiskVmElement ( new org.ovirt.engine.core.common.businessentities.VmDeviceId ( id , null ) ) ; dve.setBoot ( boot ) ; disk.setDiskVmElements ( java.util.Collections.singletonList ( dve ) ) ; return disk ; }
Source:
public void getHostFingerprint ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String hostAddress ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetServerSSHKeyFingerprint , new org.ovirt.engine.core.common.queries.ServerParameters ( hostAddress ) , aQuery ) ; }

Target:
public void getGlusterBricksForServer ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid serverId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterVolumeBricksByServerId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( serverId ) , aQuery ) ; }
Source:
protected void updateCustomPropertySheet ( ) { if ( ( getModel ( ) . getSelectedCluster ( ) ) == null ) { return ; } org.ovirt.engine.core.common.businessentities.VDSGroup cluster = getModel ( ) . getSelectedCluster ( ) ; getModel ( ) . getCustomPropertySheet ( ) . setKeyValueString ( getModel ( ) . getCustomPropertiesKeysList ( ) . get ( cluster.getcompatibility_version ( ) ) ) ; }

Target:
protected void updateCustomPropertySheet ( org.ovirt.engine.core.compat.Version clusterVersion ) { getModel ( ) . getCustomPropertySheet ( ) . setKeyValueString ( getModel ( ) . getCustomPropertiesKeysList ( ) . get ( clusterVersion ) ) ; }
Source:
public void loadVmsFromVmware ( ) { clearProblem ( ) ; if ( ! ( validateVmwareConfiguration ( ) ) ) { return ; } org.ovirt.engine.core.compat.Guid proxyId = ( ( getProxyHosts ( ) . getSelectedItem ( ) ) != null ) ? getProxyHosts ( ) . getSelectedItem ( ) . getId ( ) : null ; loadVMsFromExternalProvider ( OriginType.VMWARE , getUrl ( ) , getUsername ( ) . getEntity ( ) , getPassword ( ) . getEntity ( ) , proxyId ) ; }

Target:
private void clearForLoad ( ) { clearProblem ( ) ; clearVms ( ) ; }
Source:
protected boolean checkIfNeedToBeOverride ( ) { if ( ( ( ( org.ovirt.engine.core.bll.MoveOrCopyDiskCommand.getParameters ( ) . getOperation ( ) ) == ( org.ovirt.engine.core.common.businessentities.ImageOperation.Copy ) ) && ( ! ( org.ovirt.engine.core.bll.MoveOrCopyDiskCommand.getParameters ( ) . getForceOverride ( ) ) ) ) && ( org.ovirt.engine.core.bll.MoveOrCopyDiskCommand.getImage ( ) . getStorageIds ( ) . contains ( org.ovirt.engine.core.bll.MoveOrCopyDiskCommand.getStorageDomain ( ) . getId ( ) ) ) ) { addCanDoActionMessage ( VdcBllMessages.ACTION_TYPE_FAILED_IMAGE_ALREADY_EXISTS ) ; return false ; } return true ; }

Target:
protected boolean checkIfNeedToBeOverride ( ) { if ( ( ( ( org.ovirt.engine.core.bll.MoveOrCopyDiskCommand.getParameters ( ) . getOperation ( ) ) == ( org.ovirt.engine.core.common.businessentities.ImageOperation.Copy ) ) && ( ! ( org.ovirt.engine.core.bll.MoveOrCopyDiskCommand.getParameters ( ) . getForceOverride ( ) ) ) ) && ( org.ovirt.engine.core.bll.MoveOrCopyDiskCommand.getImage ( ) . getStorageIds ( ) . contains ( org.ovirt.engine.core.bll.MoveOrCopyDiskCommand.getStorageDomain ( ) . getId ( ) ) ) ) { return failCanDoAction ( VdcBllMessages.ACTION_TYPE_FAILED_IMAGE_ALREADY_EXISTS ) ; } return true ; }
Source:
private boolean changesAreClusterCompatible ( ) { if ( ! ( org.ovirt.engine.core.bll.network.cluster.AttachNetworkToClusterInternalCommand.getParameters ( ) . getNetwork ( ) . isVmNetwork ( ) ) ) { if ( ! ( org.ovirt.engine.core.common.FeatureSupported.nonVmNetwork ( org.ovirt.engine.core.bll.network.cluster.AttachNetworkToClusterInternalCommand.getVdsGroup ( ) . getcompatibility_version ( ) ) ) ) { addCanDoActionMessage ( VdcBllMessages.NON_VM_NETWORK_NOT_SUPPORTED_FOR_POOL_LEVEL ) ; return false ; } } return true ; }

Target:
private boolean changesAreClusterCompatible ( ) { if ( ! ( org.ovirt.engine.core.bll.network.cluster.AttachNetworkToClusterInternalCommand.getParameters ( ) . getNetwork ( ) . isVmNetwork ( ) ) ) { if ( ! ( org.ovirt.engine.core.common.FeatureSupported.nonVmNetwork ( org.ovirt.engine.core.bll.network.cluster.AttachNetworkToClusterInternalCommand.getVdsGroup ( ) . getCompatibilityVersion ( ) ) ) ) { addCanDoActionMessage ( VdcBllMessages.NON_VM_NETWORK_NOT_SUPPORTED_FOR_POOL_LEVEL ) ; return false ; } } return true ; }