auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void networkBelongsToClusterDataCenterNotValid ( ) throws java.lang.Exception { org.mockito.Mockito.when ( cluster.getStoragePoolId ( ) ) . thenReturn ( org.ovirt.engine.core.bll.network.cluster.NetworkClusterValidatorTestBase.TEST_DC_ID1 ) ; org.mockito.Mockito.when ( network.getDataCenterId ( ) ) . thenReturn ( org.ovirt.engine.core.bll.network.cluster.NetworkClusterValidatorTestBase.TEST_DC_ID2 ) ; org.junit.Assert.assertThat ( validator.networkBelongsToClusterDataCenter ( cluster , network ) , org.hamcrest.CoreMatchers.both ( org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.ACTION_TYPE_FAILED_NETWORK_FROM_DIFFERENT_DC ) ) . and ( org.ovirt.engine.core.bll.validator.ValidationResultMatchers.replacements ( org.ovirt.engine.core.bll.network.cluster.NetworkClusterValidatorTestBase.hasItem ( org.ovirt.engine.core.bll.network.cluster.NetworkClusterValidatorTestBase.NETWORK_NAME_REPLACEMENT ) ) ) ) ; }

Target:
public void networkBelongsToClusterDataCenterNotValid ( ) throws java.lang.Exception { cluster.setStoragePoolId ( org.ovirt.engine.core.bll.network.cluster.NetworkClusterValidatorTestBase.TEST_DC_ID1 ) ; network.setDataCenterId ( org.ovirt.engine.core.bll.network.cluster.NetworkClusterValidatorTestBase.TEST_DC_ID2 ) ; org.junit.Assert.assertThat ( validator.networkBelongsToClusterDataCenter ( cluster , network ) , org.hamcrest.CoreMatchers.both ( org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.ACTION_TYPE_FAILED_NETWORK_FROM_DIFFERENT_DC ) ) . and ( org.ovirt.engine.core.bll.validator.ValidationResultMatchers.replacements ( org.ovirt.engine.core.bll.network.cluster.NetworkClusterValidatorTestBase.hasItem ( org.ovirt.engine.core.bll.network.cluster.NetworkClusterValidatorTestBase.NETWORK_NAME_REPLACEMENT ) ) ) ) ; }
Source:
public void getClusterGlusterServices ( 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 ) { return source ; } } ; org.ovirt.engine.core.common.queries.gluster.GlusterVolumeAdvancedDetailsParameters parameters = new org.ovirt.engine.core.common.queries.gluster.GlusterVolumeAdvancedDetailsParameters ( clusterId , null , null , false ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterVolumeAdvancedDetails , parameters , aQuery ) ; }

Target:
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 ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeGeoRepStatusForXmlRpc glusterVolumeGeoRepStatus ( java.lang.String volumeName ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "GlusterVolume.geoRepStatus" ) . withParameter ( "volName" , volumeName ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) . withIgnoreResponseKey ( ) ; return new org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeGeoRepStatusForXmlRpc ( response ) ; }

Target:
public org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeGeoRepStatusForXmlRpc glusterVolumeGeoRepSessionList ( java.lang.String volumeName ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "GlusterVolume.geoRepSessionList" ) . withParameter ( "volName" , volumeName ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) . withIgnoreResponseKey ( ) ; return new org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeGeoRepStatusForXmlRpc ( response ) ; }
Source:
private static int setNetworkBootOrder ( org.ovirt.engine.core.common.businessentities.VM vm , java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > devices , int bootOrder ) { for ( org.ovirt.engine.core.common.businessentities.VmDevice pluggedInterface : org.ovirt.engine.core.common.utils.VmDeviceCommonUtils.sortInterfacesByName ( vm , org.ovirt.engine.core.common.utils.VmDeviceCommonUtils.getPluggedManagedInterfaces ( devices ) ) ) { pluggedInterface.setBootOrder ( ( ++ bootOrder ) ) ; } return bootOrder ; }

Target:
private static int setNetworkBootOrder ( java.util.Collection < org.ovirt.engine.core.common.businessentities.VmDevice > devices , int bootOrder , java.util.List < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > interfaces ) { for ( org.ovirt.engine.core.common.businessentities.VmDevice pluggedInterface : org.ovirt.engine.core.common.utils.VmDeviceCommonUtils.sortInterfacesByName ( org.ovirt.engine.core.common.utils.VmDeviceCommonUtils.getPluggedManagedInterfaces ( devices ) , interfaces ) ) { pluggedInterface.setBootOrder ( ( ++ bootOrder ) ) ; } return bootOrder ; }
Source:
public void glusterServiceSupported ( ) { org.mockito.Mockito.when ( cluster.getCompatibilityVersion ( ) ) . thenReturn ( org.mockito.Mockito.mock ( org.ovirt.engine.core.compat.Version.class ) ) ; org.mockito.Mockito.when ( cluster.supportsGlusterService ( ) ) . thenReturn ( true ) ; validator = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.validator.ClusterValidator ( dbFacade , cluster ) ) ; org.mockito.Mockito.doReturn ( true ) . when ( validator ) . glusterFeatureEnabled ( ) ; org.junit.Assert.assertThat ( validator.glusterServiceSupported ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }

Target:
public void glusterServiceSupported ( ) { org.mockito.Mockito.when ( cluster.getCompatibilityVersion ( ) ) . thenReturn ( org.mockito.Mockito.mock ( org.ovirt.engine.core.compat.Version.class ) ) ; org.mockito.Mockito.when ( cluster.supportsGlusterService ( ) ) . thenReturn ( true ) ; validator = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.validator.ClusterValidator ( dbFacade , cluster , cpuFlagsManagerHandler ) ) ; org.mockito.Mockito.doReturn ( true ) . when ( validator ) . glusterFeatureEnabled ( ) ; org.junit.Assert.assertThat ( validator.glusterServiceSupported ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }
Source:
public void OnSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.VmGuideModel vmGuideModel = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.VmGuideModel ) ( target ) ) ; vmGuideModel.cluster = ( ( org.ovirt.engine.core.common.businessentities.VDSGroup ) ( returnValue ) ) ; vmGuideModel.AddDiskPostData ( ) ; }

Target:
private void AddDiskUpdateData ( ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetVmDiskList ( new org.ovirt.engine.ui.frontend.AsyncQuery ( this , 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.models.vms.VmGuideModel vmGuideModel = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.VmGuideModel ) ( target ) ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > disks = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ) ( returnValue ) ) ; vmGuideModel.disks = disks ; vmGuideModel.AddDiskPostData ( ) ; } } ) , getEntity ( ) . getId ( ) ) ; }
Source:
public void calculateNetworkImplementationDetailsNetworkQosOverridden ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface = createNetworkDevice ( ) ; iface.setQosOverridden ( true ) ; calculateNetworkImplementationDetailsAndAssertSync ( iface , true , iface.getNetworkName ( ) , iface.isBridged ( ) , iface.getMtu ( ) , iface.getVlanId ( ) , new org.ovirt.engine.core.common.businessentities.network.NetworkQoS ( ) ) ; }

Target:
public void calculateNetworkImplementationDetailsInterfaceQosMissing ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface = createNetworkDevice ( ) ; iface.setQos ( null ) ; calculateNetworkImplementationDetailsAndAssertSync ( iface , false , iface.isBridged ( ) , iface.getMtu ( ) , iface.getVlanId ( ) , createQos ( ) ) ; }
Source:
void localize ( org.ovirt.engine.ui.webadmin.ApplicationConstants constants ) { nameEditor.setLabel ( constants.storagePopupNameLabel ( ) ) ; datacenterListEditor.setLabel ( constants.storagePopupDataCenterLabel ( ) ) ; storageTypeListEditor.setLabel ( constants.storagePopupStorageTypeLabel ( ) ) ; formatListEditor.setLabel ( constants.storagePopupFormatTypeLabel ( ) ) ; hostListEditor.setLabel ( constants.storagePopupHostLabel ( ) ) ; }

Target:
void localize ( org.ovirt.engine.ui.webadmin.ApplicationConstants constants ) { nameEditor.setLabel ( constants.storagePopupNameLabel ( ) ) ; descriptionEditor.setLabel ( constants.storagePopupDescriptionLabel ( ) ) ; datacenterListEditor.setLabel ( constants.storagePopupDataCenterLabel ( ) ) ; storageTypeListEditor.setLabel ( constants.storagePopupStorageTypeLabel ( ) ) ; formatListEditor.setLabel ( constants.storagePopupFormatTypeLabel ( ) ) ; hostListEditor.setLabel ( constants.storagePopupHostLabel ( ) ) ; }
Source:
protected void removeNetwork ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > list = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmNetworkInterfaceDao ( ) . getAllForTemplate ( getVmTemplateId ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface iface : list ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmNicDao ( ) . remove ( iface.getId ( ) ) ; } }

Target:
protected void removeNetwork ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.VmNic > list = getVmNicDao ( ) . getAllForTemplate ( getVmTemplateId ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.VmNic iface : list ) { getVmNicDao ( ) . remove ( iface.getId ( ) ) ; } }
Source:
private void fetchProfiles ( ) { org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( getQueryType ( ) , new org.ovirt.engine.core.common.queries.IdQueryParameters ( this . getParentEntity ( ) . getId ( ) ) , new org.ovirt.engine.ui.frontend.AsyncQuery ( new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model1 , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.profiles.ProfileListModel.this . setItems ( ( ( java.util.List < P > ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ) ) ) ; } } ) ) ; }

Target:
private void fetchProfiles ( ) { org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( getQueryType ( ) , new org.ovirt.engine.core.common.queries.IdQueryParameters ( org.ovirt.engine.ui.uicommonweb.models.profiles.ProfileListModel.getEntity ( ) . getId ( ) ) , new org.ovirt.engine.ui.frontend.AsyncQuery ( new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model1 , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.profiles.ProfileListModel.this . setItems ( ( ( java.util.List < P > ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ) ) ) ; } } ) ) ; }
Source:
public static void GetAllProviders ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { 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 ( ) , aQuery ) ; }

Target:
public static void GetAllProviders ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { 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 ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllProviders , new org.ovirt.engine.core.common.queries.GetAllProvidersParameters ( ) , aQuery ) ; }
Source:
public void successfulGetStatus ( ) { java.lang.String agentMessage = "Test succeeded: on" ; setupCommand ( setupCommandParams ( FenceActionType.STATUS ) ) ; setupBrokerResult ( createBrokerResultMap ( 0 , agentMessage , "on" , null ) ) ; command.execute ( ) ; org.ovirt.engine.core.common.businessentities.pm.FenceOperationResult result = ( ( org.ovirt.engine.core.common.businessentities.pm.FenceOperationResult ) ( command.getVDSReturnValue ( ) . getReturnValue ( ) ) ) ; org.junit.Assert.assertEquals ( Status.SUCCESS , result.getStatus ( ) ) ; org.junit.Assert.assertEquals ( PowerStatus.ON , result.getPowerStatus ( ) ) ; org.junit.Assert.assertEquals ( agentMessage , result.getMessage ( ) ) ; }

Target:
public void successfulGetStatus ( ) { java.lang.String agentMessage = "Test succeeded: on" ; setupCommand ( setupCommandParams ( FenceActionType.STATUS ) ) ; setupBrokerResult ( createBrokerResultMap ( 0 , agentMessage , "on" , null ) ) ; command.execute ( ) ; org.ovirt.engine.core.common.businessentities.pm.FenceOperationResult result = ( ( org.ovirt.engine.core.common.businessentities.pm.FenceOperationResult ) ( command.getVDSReturnValue ( ) . getReturnValue ( ) ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( Status.SUCCESS , result.getStatus ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( PowerStatus.ON , result.getPowerStatus ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( agentMessage , result.getMessage ( ) ) ; }
Source:
public static void addDiskImageWithNoVmDevice ( org.ovirt.engine.core.common.businessentities.DiskImage image , boolean active , org.ovirt.engine.core.common.businessentities.image_storage_domain_map imageStorageDomainMap ) { try { org.ovirt.engine.core.bll.ImagesHandler.addImage ( image , active , imageStorageDomainMap ) ; org.ovirt.engine.core.bll.ImagesHandler.addDisk ( image ) ; } catch ( java.lang.RuntimeException ex ) { org.ovirt.engine.core.bll.ImagesHandler.log.error ( "Failed adding new disk image and related entities to db: {}" , ex.getMessage ( ) ) ; org.ovirt.engine.core.bll.ImagesHandler.log.debug ( "Exception" , ex ) ; throw new org.ovirt.engine.core.common.errors.VdcBLLException ( org.ovirt.engine.core.common.errors.VdcBllErrors.DB , ex ) ; } }

Target:
public static void addDiskImageWithNoVmDevice ( org.ovirt.engine.core.common.businessentities.storage.DiskImage image , boolean active , org.ovirt.engine.core.common.businessentities.storage.ImageStorageDomainMap imageStorageDomainMap ) { try { org.ovirt.engine.core.bll.ImagesHandler.addImage ( image , active , imageStorageDomainMap ) ; org.ovirt.engine.core.bll.ImagesHandler.addDisk ( image ) ; } catch ( java.lang.RuntimeException ex ) { org.ovirt.engine.core.bll.ImagesHandler.log.error ( "Failed adding new disk image and related entities to db: {}" , ex.getMessage ( ) ) ; org.ovirt.engine.core.bll.ImagesHandler.log.debug ( "Exception" , ex ) ; throw new org.ovirt.engine.core.common.errors.VdcBLLException ( org.ovirt.engine.core.common.errors.VdcBllErrors.DB , ex ) ; } }
Source:
protected void executeQueryCommand ( ) { final java.lang.String domain = org.ovirt.engine.core.bll.GetDirectoryGroupByIdQuery.getParameters ( ) . getDomain ( ) ; final org.ovirt.engine.core.common.utils.ExternalId id = org.ovirt.engine.core.bll.GetDirectoryGroupByIdQuery.getParameters ( ) . getId ( ) ; final org.ovirt.engine.core.bll.adbroker.LdapBroker broker = org.ovirt.engine.core.bll.adbroker.LdapFactory.getInstance ( domain ) ; final org.ovirt.engine.core.common.businessentities.LdapGroup group = ( ( org.ovirt.engine.core.common.businessentities.LdapGroup ) ( broker.RunAdAction ( AdActionType.GetAdGroupByGroupId , new org.ovirt.engine.core.bll.adbroker.LdapSearchByIdParameters ( domain , id ) ) . getReturnValue ( ) ) ) ; org.ovirt.engine.core.bll.GetDirectoryGroupByIdQuery.getQueryReturnValue ( ) . setReturnValue ( group ) ; }

Target:
protected void executeQueryCommand ( ) { final java.lang.String directoryName = org.ovirt.engine.core.bll.GetDirectoryGroupByIdQuery.getParameters ( ) . getDomain ( ) ; final org.ovirt.engine.core.common.utils.ExternalId id = org.ovirt.engine.core.bll.GetDirectoryGroupByIdQuery.getParameters ( ) . getId ( ) ; final org.ovirt.engine.core.authentication.Directory directory = org.ovirt.engine.core.authentication.DirectoryManager.getInstance ( ) . getDirectory ( directoryName ) ; final org.ovirt.engine.core.authentication.DirectoryGroup group = directory.findGroup ( id ) ; org.ovirt.engine.core.bll.GetDirectoryGroupByIdQuery.getQueryReturnValue ( ) . setReturnValue ( group ) ; }
Source:
public void legalNotTimedOut ( ) { final org.ovirt.engine.core.dal.dbbroker.auditloghandling.TimeoutBaseTest.TestTimeoutBase t = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.TimeoutBaseTest.TestTimeoutBase ( ) ; t.setUseTimout ( true ) ; final java.lang.String s = "timeout" ; t.setTimeoutObjectId ( s ) ; long c = java.lang.System.currentTimeMillis ( ) ; c += 5000 ; final java.util.Date d = new java.util.Date ( c ) ; t.setEndTime ( d ) ; t.getLegal ( ) ; final boolean result = t.getLegal ( ) ; org.junit.Assert.assertFalse ( result ) ; }

Target:
public void legalNotTimedOut ( ) { final org.ovirt.engine.core.dal.dbbroker.auditloghandling.TimeoutBaseTest.TestTimeoutBase t = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.TimeoutBaseTest.TestTimeoutBase ( ) ; t.setUseTimout ( true ) ; final java.lang.String s = "illegal-timeout" ; t.setTimeoutObjectId ( s ) ; long c = java.lang.System.currentTimeMillis ( ) ; c += 5000 ; final java.util.Date d = new java.util.Date ( c ) ; t.setEndTime ( d ) ; t.getLegal ( ) ; final boolean result = t.getLegal ( ) ; org.junit.Assert.assertFalse ( result ) ; }
Source:
public void validateEnums ( org.ovirt.engine.api.model.NIC nic ) { if ( nic != null ) { if ( nic.isSetInterface ( ) ) { org.ovirt.engine.api.common.util.EnumValidator.validateEnum ( org.ovirt.engine.api.model.NicInterface.class , nic.getInterface ( ) , true ) ; } if ( nic.isSetNetwork ( ) ) { networkValidator.validateEnums ( nic.getNetwork ( ) ) ; } } }

Target:
public void validateEnums ( org.ovirt.engine.api.model.Nic nic ) { if ( nic != null ) { if ( nic.isSetInterface ( ) ) { org.ovirt.engine.api.common.util.EnumValidator.validateEnum ( org.ovirt.engine.api.model.NicInterface.class , nic.getInterface ( ) , true ) ; } if ( nic.isSetNetwork ( ) ) { networkValidator.validateEnums ( nic.getNetwork ( ) ) ; } } }
Source:
private boolean setUpPasswordlessSSHAndCreateSession ( ) { java.util.List < java.lang.String > pubKeys = readPubKey ( ) ; boolean canProceed = ( pubKeys != null ) && ( ( pubKeys.size ( ) ) > 0 ) ; if ( canProceed ) { canProceed = updatePubKeysToRemoteHosts ( pubKeys ) ; if ( canProceed ) { canProceed = createGeoRepSession ( ) ; } } return canProceed ; }

Target:
protected boolean setUpMountBrokerOnSlave ( ) { return getBackend ( ) . runInternalAction ( VdcActionType.SetupGlusterGeoRepMountBrokerInternal , new org.ovirt.engine.core.common.action.gluster.SetUpMountBrokerParameters ( getParameters ( ) . getSlaveHostId ( ) , getParameters ( ) . getSlaveVolumeName ( ) , getParameters ( ) . getUserName ( ) , getParameters ( ) . getUserGroup ( ) ) ) . getSucceeded ( ) ; }
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.RunQuery ( VdcQueryType.GetStorageDomainsByVmTemplateId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( templateId ) , aQuery ) ; }

Target:
public static void isVirtioScsiEnabledForVm ( 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 ) { if ( source != null ) { return ( ( ( java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > ) ( source ) ) . size ( ) ) > 0 ; } return false ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVirtioScsiControllers , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }
Source:
public void init ( ) { org.ovirt.engine.core.bll.scheduling.SchedulingManager.log.info ( "Initializing Scheduling manager" ) ; loadPolicyUnits ( ) ; loadClusterPolicies ( ) ; if ( org.ovirt.engine.core.common.config.Config.< java.lang.Boolean > GetValue ( ConfigValues.ExternalSchedulerEnabled ) ) { org.ovirt.engine.core.bll.scheduling.SchedulingManager.log.info ( "Starting external scheduler dicovery thread" ) ; org.ovirt.engine.core.bll.scheduling.external.ExternalSchedulerDiscoveryThread discoveryThread = new org.ovirt.engine.core.bll.scheduling.external.ExternalSchedulerDiscoveryThread ( ) ; discoveryThread.start ( ) ; } else { org.ovirt.engine.core.bll.scheduling.SchedulingManager.log.info ( "External scheduler disabled, discovery skipped" ) ; } org.ovirt.engine.core.bll.scheduling.SchedulingManager.log.info ( "Initialized Scheduling manager" ) ; }

Target:
public void init ( ) { org.ovirt.engine.core.bll.scheduling.SchedulingManager.log.info ( "Initializing Scheduling manager" ) ; loadPolicyUnits ( ) ; loadClusterPolicies ( ) ; org.ovirt.engine.core.bll.scheduling.external.ExternalSchedulerDiscoveryThread discoveryThread = new org.ovirt.engine.core.bll.scheduling.external.ExternalSchedulerDiscoveryThread ( ) ; if ( org.ovirt.engine.core.common.config.Config.< java.lang.Boolean > getValue ( ConfigValues.ExternalSchedulerEnabled ) ) { org.ovirt.engine.core.bll.scheduling.SchedulingManager.log.info ( "Starting external scheduler dicovery thread" ) ; discoveryThread.start ( ) ; } else { discoveryThread.markAllExternalPoliciesAsDisabled ( ) ; org.ovirt.engine.core.bll.scheduling.SchedulingManager.log.info ( "External scheduler disabled, discovery skipped" ) ; } org.ovirt.engine.core.bll.scheduling.SchedulingManager.log.info ( "Initialized Scheduling manager" ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.StorageDomain updateStorageDomainInMemoryVolumes ( java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > disksList ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > memoryDisksList = org.ovirt.engine.core.bll.memory.MemoryUtils.createDiskDummies ( getVm ( ) . getTotalMemorySizeInBytes ( ) , MemoryUtils.META_DATA_SIZE_IN_BYTES ) ; org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain = org.ovirt.engine.core.bll.memory.MemoryStorageHandler.getInstance ( ) . findStorageDomainForMemory ( getParameters ( ) . getStoragePoolId ( ) , memoryDisksList , getVmDisksDummies ( ) , getVm ( ) ) ; disksList.addAll ( memoryDisksList ) ; return storageDomain ; }

Target:
private org.ovirt.engine.core.common.businessentities.StorageDomain updateStorageDomainInMemoryVolumes ( java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > disksList ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > memoryDisksList = org.ovirt.engine.core.bll.memory.MemoryUtils.createDiskDummies ( getVm ( ) . getTotalMemorySizeInBytes ( ) , MemoryUtils.METADATA_SIZE_IN_BYTES ) ; org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain = org.ovirt.engine.core.bll.memory.MemoryStorageHandler.getInstance ( ) . findStorageDomainForMemory ( org.ovirt.engine.core.bll.ImportVmCommand.getParameters ( ) . getStoragePoolId ( ) , memoryDisksList , getVmDisksDummies ( ) , getVm ( ) ) ; disksList.addAll ( memoryDisksList ) ; return storageDomain ; }
Source:
public static org.ovirt.engine.core.bll.ValidationResult setAndValidateCpuProfile ( org.ovirt.engine.core.common.businessentities.VmBase vmBase , org.ovirt.engine.core.compat.Version version ) { if ( ! ( org.ovirt.engine.core.common.FeatureSupported.cpuQoS ( version ) ) ) return org.ovirt.engine.core.bll.ValidationResult.VALID ; if ( ( vmBase.getCpuProfileId ( ) ) == null ) { return org.ovirt.engine.core.bll.profiles.CpuProfileHelper.assignFirstCpuProfile ( vmBase , null ) ; } else { return new org.ovirt.engine.core.bll.profiles.CpuProfileValidator ( vmBase.getCpuProfileId ( ) ) . isParentEntityValid ( vmBase.getVdsGroupId ( ) ) ; } }

Target:
private static org.ovirt.engine.core.dao.PermissionDao getPermissionDao ( ) { return org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getPermissionDao ( ) ; }
Source:
private void updateCinderDiskSnapshot ( org.ovirt.engine.core.compat.Guid cinderDiskId , org.ovirt.engine.core.compat.Guid snapshotId , org.ovirt.engine.core.compat.Guid vmSnapshotId ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage diskFromSnapshot = diskImageDao.getDiskSnapshotForVmSnapshot ( cinderDiskId , snapshotId ) ; diskFromSnapshot.setActive ( true ) ; if ( ! ( org.ovirt.engine.core.compat.Guid.isNullOrEmpty ( vmSnapshotId ) ) ) { diskFromSnapshot.setVmSnapshotId ( vmSnapshotId ) ; } org.ovirt.engine.core.bll.storage.disk.cinder.RestoreAllCinderSnapshotsCommand.getImageDao ( ) . update ( diskFromSnapshot.getImage ( ) ) ; }

Target:
private void updateCinderDiskSnapshot ( org.ovirt.engine.core.compat.Guid cinderDiskId , org.ovirt.engine.core.compat.Guid snapshotId , org.ovirt.engine.core.compat.Guid vmSnapshotId ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage diskFromSnapshot = diskImageDao.getDiskSnapshotForVmSnapshot ( cinderDiskId , snapshotId ) ; diskFromSnapshot.setActive ( true ) ; if ( ! ( org.ovirt.engine.core.compat.Guid.isNullOrEmpty ( vmSnapshotId ) ) ) { diskFromSnapshot.setVmSnapshotId ( vmSnapshotId ) ; } imageDao.update ( diskFromSnapshot.getImage ( ) ) ; }
Source:
public void getAAANamespaces ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.HashMap < java.lang.String , java.util.List < java.lang.String > > ) ( source ) ) : new java.util.HashMap < java.lang.String , java.util.List < java.lang.String > > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAvailableNamespaces , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }

Target:
public void getHostById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVdsByVdsId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
public static boolean CanRemoveVmPool ( org.ovirt.engine.core.compat.NGuid vmPoolId , java.util.ArrayList < java.lang.String > reasons ) { boolean returnValue = true ; if ( ( org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmPoolDAO ( ) . getVmPoolsMapByVmPoolId ( vmPoolId ) . size ( ) ) != 0 ) { returnValue = false ; reasons.add ( VdcBllMessages.VM_POOL_CANNOT_REMOVE_VM_POOL_WITH_VMS.toString ( ) ) ; } return returnValue ; }

Target:
public static boolean CanRemoveVmPool ( org.ovirt.engine.core.compat.NGuid vmPoolId , java.util.ArrayList < java.lang.String > reasons ) { boolean returnValue = true ; if ( ( org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmPoolDao ( ) . getVmPoolsMapByVmPoolId ( vmPoolId ) . size ( ) ) != 0 ) { returnValue = false ; reasons.add ( VdcBllMessages.VM_POOL_CANNOT_REMOVE_VM_POOL_WITH_VMS.toString ( ) ) ; } return returnValue ; }
Source:
private org.ovirt.engine.core.common.businessentities.VM initializeMock ( final int domainSizeGB , final int sizeRequired ) { mockVmTemplateDaoReturnVmTemplate ( ) ; mockDiskImageDaoGetSnapshotById ( ) ; mockStorageDomainDaoGetForStoragePool ( domainSizeGB ) ; mockStorageDomainDaoGet ( domainSizeGB ) ; mockConfig ( ) ; org.ovirt.engine.core.common.businessentities.VM vm = org.ovirt.engine.core.bll.AddVmCommandTest.createVm ( ) ; return vm ; }

Target:
private org.ovirt.engine.core.bll.AddVmCommand < org.ovirt.engine.core.common.action.AddVmParameters > setupCanAddVmTests ( final int domainSizeGB ) { org.ovirt.engine.core.common.businessentities.VM vm = initializeMock ( domainSizeGB ) ; org.ovirt.engine.core.bll.AddVmCommand < org.ovirt.engine.core.common.action.AddVmParameters > cmd = createCommand ( vm ) ; cmd.poolPerDc = macPoolPerDc ; org.ovirt.engine.core.bll.AddVmCommandTest.initCommandMethods ( cmd ) ; org.mockito.Mockito.doReturn ( createVmTemplate ( ) ) . when ( cmd ) . getVmTemplate ( ) ; org.mockito.Mockito.doReturn ( createStoragePool ( ) ) . when ( cmd ) . getStoragePool ( ) ; return cmd ; }
Source:
private void localize ( org.ovirt.engine.ui.webadmin.ApplicationConstants constants ) { nameEditor.setLabel ( constants.import_newName ( ) ) ; selectLabelEditor.setText ( constants.cloneSelect ( ) ) ; applyToAllEditor.setLabel ( constants.cloneApplyToAll ( ) ) ; noCloneEditor.setLabel ( constants.cloneDontImport ( ) ) ; }

Target:
private void localize ( ) { nameEditor.setLabel ( org.ovirt.engine.ui.webadmin.section.main.view.popup.storage.backup.ImportCloneDialogPopupView.constants.import_newName ( ) ) ; selectLabelEditor.setText ( org.ovirt.engine.ui.webadmin.section.main.view.popup.storage.backup.ImportCloneDialogPopupView.constants.cloneSelect ( ) ) ; applyToAllEditor.setLabel ( org.ovirt.engine.ui.webadmin.section.main.view.popup.storage.backup.ImportCloneDialogPopupView.constants.cloneApplyToAll ( ) ) ; noCloneEditor.setLabel ( org.ovirt.engine.ui.webadmin.section.main.view.popup.storage.backup.ImportCloneDialogPopupView.constants.cloneDontImport ( ) ) ; }
Source:
public static void getDataCenterListByName ( 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 ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( ( ( "DataCenter: name=" + name ) + " sortby name" ) , org.ovirt.engine.core.common.interfaces.SearchType.StoragePool ) , aQuery ) ; }

Target:
public static void getVmById ( 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.GetVmByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }
Source:
public void testExecuteCommand ( ) { setVolumeId ( volumeWithRemoveBricksTask ) ; mockBackend ( true , null ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateSuccess ( cmd ) ; cmd.executeCommand ( ) ; org.mockito.Mockito.verify ( cmd , org.mockito.Mockito.times ( 1 ) ) . endStepJobAborted ( org.mockito.ArgumentMatchers.any ( ) ) ; org.mockito.Mockito.verify ( cmd , org.mockito.Mockito.times ( 1 ) ) . releaseVolumeLock ( ) ; org.junit.Assert.assertEquals ( AuditLogType.GLUSTER_VOLUME_REMOVE_BRICKS_STOP , cmd.getAuditLogTypeValue ( ) ) ; }

Target:
public void testExecuteCommand ( ) { setVolumeId ( volumeWithRemoveBricksTask ) ; mockBackend ( true , null ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateSuccess ( cmd ) ; cmd.executeCommand ( ) ; org.mockito.Mockito.verify ( cmd , org.mockito.Mockito.times ( 1 ) ) . endStepJobAborted ( org.mockito.ArgumentMatchers.any ( ) ) ; org.mockito.Mockito.verify ( cmd , org.mockito.Mockito.times ( 1 ) ) . releaseVolumeLock ( ) ; org.junit.jupiter.api.Assertions.assertEquals ( AuditLogType.GLUSTER_VOLUME_REMOVE_BRICKS_STOP , cmd.getAuditLogTypeValue ( ) ) ; }
Source:
public boolean shouldUpdateVmStatus ( org.ovirt.engine.core.common.businessentities.VmDynamic vmDynamic ) { org.ovirt.engine.core.compat.Guid id = vmDynamic.getId ( ) ; if ( ! ( this . vmStatusUpdated.containsKey ( id ) ) ) { this . vmStatusUpdated.put ( id , vmDynamic.getStatusUpdatedTime ( ) ) ; return true ; } java.lang.Double knownStatusUpdate = this . vmStatusUpdated.get ( id ) ; java.lang.Double statusUpdateTime = vmDynamic.getStatusUpdatedTime ( ) ; if ( knownStatusUpdate <= statusUpdateTime ) { this . vmStatusUpdated.replace ( id , statusUpdateTime ) ; return true ; } return false ; }

Target:
public void updatePendingData ( int pendingMemory , int pendingCpuCount ) { synchronized ( getLockObj ( ) ) { cachedVds.setPendingVcpusCount ( pendingCpuCount ) ; cachedVds.setPendingVmemSize ( pendingMemory ) ; updateDynamicData ( cachedVds.getDynamicData ( ) ) ; } }
Source:
private void validateValidForAllBondModes ( org.ovirt.engine.core.common.businessentities.network.Bond bond , org.ovirt.engine.core.common.businessentities.network.NetworkAttachment networkNetworkAttachment , org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidator validator ) { for ( org.ovirt.engine.core.common.businessentities.network.BondMode bondMode : org.ovirt.engine.core.common.businessentities.network.BondMode.values ( ) ) { bond.setBondOptions ( bondMode.getConfigurationValue ( ) ) ; org.ovirt.engine.core.bll.ValidationResult result = validator.validateBondModeVsNetworksAttachedToIt ( java.util.Arrays.asList ( networkNetworkAttachment ) ) ; org.junit.Assert.assertThat ( result , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; } }

Target:
private void validateValidForAllBondModes ( org.ovirt.engine.core.common.businessentities.network.Bond bond , org.ovirt.engine.core.common.businessentities.network.NetworkAttachment networkNetworkAttachment , org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidator validator ) { for ( org.ovirt.engine.core.common.businessentities.network.BondMode bondMode : org.ovirt.engine.core.common.businessentities.network.BondMode.values ( ) ) { bond.setBondOptions ( bondMode.getConfigurationValue ( ) ) ; org.ovirt.engine.core.bll.ValidationResult result = validator.validateBondModeVsNetworksAttachedToIt ( java.util.Collections.singletonList ( networkNetworkAttachment ) ) ; org.junit.Assert.assertThat ( result , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; } }
Source:
public java.lang.Void runInTransaction ( ) { try { jobDao.updateJobLastUpdateTime ( step.getJobId ( ) , new java.util.Date ( ) ) ; stepDao.update ( step ) ; } catch ( java.lang.Exception e ) { org.ovirt.engine.core.bll.job.JobRepositoryImpl.log.errorFormat ( "Failed to update step {0}, {1}." , step.getId ( ) , step.getStepName ( ) , e ) ; } return null ; }

Target:
public java.lang.Void runInTransaction ( ) { try { jobDao.updateJobLastUpdateTime ( step.getJobId ( ) , new java.util.Date ( ) ) ; stepDao.update ( step ) ; } catch ( java.lang.Exception e ) { org.ovirt.engine.core.bll.job.JobRepositoryImpl.log.error ( "Failed to update step '{}', '{}': {}" , step.getId ( ) , step.getStepName ( ) , e.getMessage ( ) ) ; org.ovirt.engine.core.bll.job.JobRepositoryImpl.log.debug ( "Exception" , e ) ; } return null ; }
Source:
private void newPoolNameIsAlreadyTaken ( ) { org.mockito.Mockito.when ( spDao.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( new org.ovirt.engine.core.common.businessentities.StoragePool ( ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.StoragePool > storagePoolList = new java.util.ArrayList < > ( ) ; storagePoolList.add ( org.ovirt.engine.core.bll.storage.pool.UpdateStoragePoolCommandTest.createDefaultStoragePool ( ) ) ; org.mockito.Mockito.when ( spDao.getByName ( org.mockito.Matchers.anyString ( ) , org.mockito.Matchers.anyBoolean ( ) ) ) . thenReturn ( new java.util.ArrayList ( storagePoolList ) ) ; }

Target:
private void newPoolNameIsAlreadyTaken ( ) { org.mockito.Mockito.when ( spDao.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( new org.ovirt.engine.core.common.businessentities.StoragePool ( ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.StoragePool > storagePoolList = new java.util.ArrayList < > ( ) ; storagePoolList.add ( org.ovirt.engine.core.bll.storage.pool.UpdateStoragePoolCommandTest.createStoragePool ( ) ) ; org.mockito.Mockito.when ( spDao.getByName ( org.mockito.Matchers.anyString ( ) , org.mockito.Matchers.anyBoolean ( ) ) ) . thenReturn ( new java.util.ArrayList ( storagePoolList ) ) ; }
Source:
public java.lang.Void runInTransaction ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.Disk > pluggedDisks = org.ovirt.engine.core.bll.VmRunHandler.getInstance ( ) . getPluggedDisks ( getVm ( ) ) ; runVdsCommand ( VDSCommandType.Snapshot , new org.ovirt.engine.core.common.vdscommands.SnapshotVDSCommandParameters ( getVm ( ) . getRunOnVds ( ) . getValue ( ) , getVm ( ) . getId ( ) , org.ovirt.engine.core.bll.ImagesHandler.filterImageDisks ( pluggedDisks , false , true ) ) ) ; return null ; }

Target:
public java.lang.Void runInTransaction ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.Disk > pluggedDisks = getDiskDao ( ) . getAllForVm ( getVm ( ) . getId ( ) , true ) ; runVdsCommand ( VDSCommandType.Snapshot , new org.ovirt.engine.core.common.vdscommands.SnapshotVDSCommandParameters ( getVm ( ) . getRunOnVds ( ) . getValue ( ) , getVm ( ) . getId ( ) , org.ovirt.engine.core.bll.ImagesHandler.filterImageDisks ( pluggedDisks , false , true ) ) ) ; return null ; }
Source:
private void updateCachedIsoFileListFromVdsm ( org.ovirt.engine.core.common.businessentities.RepoImage repoImage ) { boolean isRefreshed = false ; try { java.util.List < org.ovirt.engine.core.common.businessentities.RepoImage > problematicRepoFileList = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.RepoImage > ( ) ; isRefreshed = refreshIsoDomain ( repoImage.getRepoDomainId ( ) , problematicRepoFileList , repoImage.getFileType ( ) ) ; addRepoFileToProblematicList ( problematicRepoFileList ) ; } finally { org.ovirt.engine.core.bll.IsoDomainListSyncronizer.log.info ( "Finished automatic refresh process for '{}' file type with {}, for storage domain id '{}'." , repoImage.getFileType ( ) , ( isRefreshed ? "success" : "failure" ) , repoImage.getRepoDomainId ( ) ) ; } }

Target:
private void updateCachedIsoFileListFromVdsm ( org.ovirt.engine.core.common.businessentities.storage.RepoImage repoImage ) { boolean isRefreshed = false ; try { java.util.List < org.ovirt.engine.core.common.businessentities.storage.RepoImage > problematicRepoFileList = new java.util.ArrayList < > ( ) ; isRefreshed = refreshIsoDomain ( repoImage.getRepoDomainId ( ) , problematicRepoFileList , repoImage.getFileType ( ) ) ; addRepoFileToProblematicList ( problematicRepoFileList ) ; } finally { org.ovirt.engine.core.bll.IsoDomainListSyncronizer.log.info ( "Finished automatic refresh process for '{}' file type with {}, for storage domain id '{}'." , repoImage.getFileType ( ) , ( isRefreshed ? "success" : "failure" ) , repoImage.getRepoDomainId ( ) ) ; } }
Source:
protected void selectedItemPropertyChanged ( java.lang.Object sender , org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs e ) { super . selectedItemPropertyChanged ( sender , e ) ; if ( e.PropertyName.equals ( "status" ) ) { UpdateActionAvailability ( ) ; } else if ( e.PropertyName.equals ( "display_type" ) ) { updateConsoleModels ( ) ; } }

Target:
protected void selectedItemPropertyChanged ( java.lang.Object sender , org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs e ) { super . selectedItemPropertyChanged ( sender , e ) ; if ( e.PropertyName.equals ( "status" ) ) { updateActionAvailability ( ) ; } else if ( e.PropertyName.equals ( "display_type" ) ) { updateConsoleModels ( ) ; } }
Source:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; newImage = new org.ovirt.engine.core.common.businessentities.Image ( ) ; newImage.setActive ( true ) ; newImage.setTemplateImageId ( org.ovirt.engine.core.dao.ImageDaoTest.EXISTING_IMAGE_DISK_TEMPLATE_ID ) ; newImage.setSnapshotId ( org.ovirt.engine.core.dao.ImageDaoTest.EXISTING_SNAPSHOT_ID ) ; newImage.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; newImage.setVolumeFormat ( VolumeFormat.COW ) ; newImage.setVolumeType ( VolumeType.Sparse ) ; newImage.setDiskId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; newImage = new org.ovirt.engine.core.common.businessentities.storage.Image ( ) ; newImage.setActive ( true ) ; newImage.setTemplateImageId ( org.ovirt.engine.core.dao.ImageDaoTest.EXISTING_IMAGE_DISK_TEMPLATE_ID ) ; newImage.setSnapshotId ( org.ovirt.engine.core.dao.ImageDaoTest.EXISTING_SNAPSHOT_ID ) ; newImage.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; newImage.setVolumeFormat ( VolumeFormat.COW ) ; newImage.setVolumeType ( VolumeType.Sparse ) ; newImage.setDiskId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; }
Source:
public void testInterfaceIsValidSlaveWhenInterfaceIsVlan ( ) { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface vdsNetworkInterface = createVdsNetworkInterfaceWithName ( ) ; vdsNetworkInterface.setVlanId ( 1 ) ; org.hamcrest.Matcher < org.ovirt.engine.core.bll.ValidationResult > matcher = org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.NETWORK_INTERFACE_BOND_OR_VLAN_CANNOT_BE_SLAVE , org.ovirt.engine.core.utils.ReplacementUtils.createSetVariableString ( HostInterfaceValidator.VAR_NIC_NAME , vdsNetworkInterface.getName ( ) ) ) ; org.junit.Assert.assertThat ( new org.ovirt.engine.core.bll.validator.HostInterfaceValidator ( vdsNetworkInterface ) . interfaceIsValidSlave ( ) , matcher ) ; }

Target:
public void testInterfaceIsValidSlaveWhenInterfaceIsVlan ( ) { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface vdsNetworkInterface = createVdsNetworkInterfaceWithName ( ) ; vdsNetworkInterface.setVlanId ( 1 ) ; org.hamcrest.Matcher < org.ovirt.engine.core.bll.ValidationResult > matcher = org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.NETWORK_INTERFACE_BOND_OR_VLAN_CANNOT_BE_SLAVE , org.ovirt.engine.core.utils.ReplacementUtils.createSetVariableString ( HostInterfaceValidator.VAR_NIC_NAME , vdsNetworkInterface.getName ( ) ) ) ; org.hamcrest.MatcherAssert.assertThat ( new org.ovirt.engine.core.bll.validator.HostInterfaceValidator ( vdsNetworkInterface ) . interfaceIsValidSlave ( ) , matcher ) ; }
Source:
protected org.ovirt.engine.core.common.businessentities.aaa.DbGroup getEntity ( int index ) { org.ovirt.engine.core.common.businessentities.aaa.DbGroup entity = new org.ovirt.engine.core.common.businessentities.aaa.DbGroup ( ) ; entity.setId ( GUIDS [ index ] ) ; entity.setExternalId ( EXTERNAL_IDS [ index ] ) ; entity.setName ( org.ovirt.engine.api.restapi.resource.aaa.BackendGroupsResourceTest.GROUP_NAMES [ index ] ) ; entity.setDomain ( org.ovirt.engine.api.restapi.resource.aaa.DOMAIN ) ; entity.setNamespace ( org.ovirt.engine.api.restapi.resource.aaa.BackendGroupsResourceTest.NAMESPACE ) ; return entity ; }

Target:
protected org.ovirt.engine.core.common.businessentities.aaa.DbGroup getEntity ( int index ) { return new org.ovirt.engine.core.common.businessentities.aaa.DbGroup ( new org.ovirt.engine.core.aaa.DirectoryGroup ( DOMAIN , org.ovirt.engine.api.restapi.resource.aaa.BackendGroupsResourceTest.NAMESPACE , EXTERNAL_IDS [ index ] , org.ovirt.engine.api.restapi.resource.aaa.BackendGroupsResourceTest.GROUP_NAMES [ index ] ) ) ; }
Source:
protected void postConstruct ( ) { super . postConstruct ( ) ; oldVmId = org.ovirt.engine.core.bll.CloneVmCommand.getParameters ( ) . getVmId ( ) ; setVmName ( org.ovirt.engine.core.bll.CloneVmCommand.getParameters ( ) . getNewName ( ) ) ; if ( org.ovirt.engine.core.compat.Guid.isNullOrEmpty ( org.ovirt.engine.core.bll.CloneVmCommand.getParameters ( ) . getNewVmGuid ( ) ) ) { setupParameters ( ) ; } }

Target:
protected void init ( ) { super . init ( ) ; oldVmId = org.ovirt.engine.core.bll.CloneVmCommand.getParameters ( ) . getVmId ( ) ; setVmName ( org.ovirt.engine.core.bll.CloneVmCommand.getParameters ( ) . getNewName ( ) ) ; if ( org.ovirt.engine.core.compat.Guid.isNullOrEmpty ( org.ovirt.engine.core.bll.CloneVmCommand.getParameters ( ) . getNewVmGuid ( ) ) ) { setupParameters ( ) ; } }
Source:
private boolean isSparsifyCommandAvailable ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.Disk > disks = ( ( getSelectedItems ( ) ) != null ) ? org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.storage.Disk > cast ( getSelectedItems ( ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.Disk > ( ) ; for ( org.ovirt.engine.core.common.businessentities.storage.Disk disk : disks ) { if ( ( isDiskLocked ( disk ) ) || ( ( ! ( isVmDown ( ) ) ) && ( disk.getPlugged ( ) ) ) ) { return false ; } } return true ; }

Target:
private boolean isSparsifyCommandAvailable ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.Disk > disks = ( ( getSelectedItems ( ) ) != null ) ? org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.storage.Disk > cast ( getSelectedItems ( ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.Disk > ( ) ; for ( org.ovirt.engine.core.common.businessentities.storage.Disk disk : disks ) { if ( ( ! ( isImageDiskOK ( disk ) ) ) || ( ( ! ( isVmDown ( ) ) ) && ( disk.getPlugged ( ) ) ) ) { return false ; } } return true ; }