auphong2707/dl4se-code-review-dataset huggingface dataset:
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.storage_domains > storageDomains = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage_domains > ) ( source ) ) ; for ( org.ovirt.engine.core.common.businessentities.storage_domains domain : storageDomains ) { if ( ( domain.getstorage_domain_type ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageDomainType.ISO ) ) { return domain ; } } } return null ; }

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.StorageDomain > storageDomains = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ) ( source ) ) ; for ( org.ovirt.engine.core.common.businessentities.StorageDomain domain : storageDomains ) { if ( ( domain.getStorageDomainType ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageDomainType.ISO ) ) { return domain ; } } } return null ; }
Source:
private java.util.Set < java.lang.String > getRemovedNetworks ( ) { if ( ( removedNetworks ) == null ) { removedNetworks = new java.util.HashSet ( org.ovirt.engine.core.bll.network.host.HostSetupNetworksCommand.getParameters ( ) . getRemovedNetworkAttachments ( ) . size ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment : org.ovirt.engine.core.bll.network.host.HostSetupNetworksCommand.getParameters ( ) . getRemovedNetworkAttachments ( ) ) { removedNetworks.add ( getNetworkBusinessEntityMap ( ) . get ( attachment.getNetworkId ( ) ) . getName ( ) ) ; } } return removedNetworks ; }

Target:
private java.util.Set < java.lang.String > getRemovedNetworks ( ) { if ( ( removedNetworks ) == null ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.NetworkAttachment > removedNetworkAttachments = org.ovirt.engine.core.common.businessentities.Entities.filterEntitiesByRequiredIds ( org.ovirt.engine.core.bll.network.host.HostSetupNetworksCommand.getParameters ( ) . getRemovedNetworkAttachments ( ) , existingAttachments ) ; removedNetworks = new java.util.HashSet ( removedNetworkAttachments.size ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment : removedNetworkAttachments ) { removedNetworks.add ( existingNetworkRelatedToAttachment ( attachment ) . getName ( ) ) ; } } return removedNetworks ; }
Source:
private boolean isDomainAttachedToDifferentStoragePool ( ) { if ( ( org.ovirt.engine.core.bll.storage.pool.AddStoragePoolWithStoragesCommand.getStoragePool ( ) . getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.StoragePoolStatus.Uninitialized ) ) { for ( org.ovirt.engine.core.compat.Guid storageDomainId : org.ovirt.engine.core.bll.storage.pool.AddStoragePoolWithStoragesCommand.getParameters ( ) . getStorages ( ) ) { org.ovirt.engine.core.common.businessentities.StorageDomain domain = org.ovirt.engine.core.bll.storage.pool.AddStoragePoolWithStoragesCommand.getStorageDomainDao ( ) . get ( storageDomainId ) ; if ( ( domain.getStorageDomainType ( ) . isDataDomain ( ) ) && ( isStorageDomainAttachedToStoragePool ( domain ) ) ) { return failCanDoAction ( EngineMessage.ERROR_CANNOT_ADD_STORAGE_DOMAIN_WITH_ATTACHED_DATA_DOMAIN ) ; } } } return true ; }

Target:
private boolean isDomainAttachedToDifferentStoragePool ( ) { if ( ( org.ovirt.engine.core.bll.storage.pool.AddStoragePoolWithStoragesCommand.getStoragePool ( ) . getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.StoragePoolStatus.Uninitialized ) ) { for ( org.ovirt.engine.core.compat.Guid storageDomainId : org.ovirt.engine.core.bll.storage.pool.AddStoragePoolWithStoragesCommand.getParameters ( ) . getStorages ( ) ) { org.ovirt.engine.core.common.businessentities.StorageDomain domain = org.ovirt.engine.core.bll.storage.pool.AddStoragePoolWithStoragesCommand.getStorageDomainDao ( ) . get ( storageDomainId ) ; if ( ( domain.getStorageDomainType ( ) . isDataDomain ( ) ) && ( isStorageDomainAttachedToStoragePool ( domain ) ) ) { return failValidation ( EngineMessage.ERROR_CANNOT_ADD_STORAGE_DOMAIN_WITH_ATTACHED_DATA_DOMAIN ) ; } } } return true ; }
Source:
public java.lang.Object call ( ) throws java.lang.Exception { _parser.cliEnvironmentSet ( NetEnv.IPTABLES_ENABLE , _customizationConditions.contains ( org.ovirt.engine.core.bll.VdsDeploy.CustomizationCondition.IPTABLES_OVERRIDE ) ) ; return null ; }

Target:
public void setOpenStackAgentProperties ( org.ovirt.engine.core.common.businessentities.OpenstackNetworkProviderProperties properties ) { _openStackAgentProperties = properties ; if ( ( _openStackAgentProperties ) != null ) { _customizationConditions.add ( org.ovirt.engine.core.bll.VdsDeploy.CustomizationCondition.NEUTRON_SETUP ) ; if ( _openStackAgentProperties.isLinuxBridge ( ) ) { _customizationConditions.add ( org.ovirt.engine.core.bll.VdsDeploy.CustomizationCondition.NEUTRON_LINUX_BRIDGE_SETUP ) ; } else if ( _openStackAgentProperties.isOpenVSwitch ( ) ) { _customizationConditions.add ( org.ovirt.engine.core.bll.VdsDeploy.CustomizationCondition.NEUTRON_OPEN_VSWITCH_SETUP ) ; } } }
Source:
public void testFreeHostDevicesUsedByVmId ( ) { dao.freeHostDevicesUsedByVmId ( org.ovirt.engine.core.dao.HostDeviceDaoTest.EXISTING_VM_ID_2 ) ; org.ovirt.engine.core.common.businessentities.HostDevice hostDevice = dao.getHostDeviceByHostIdAndDeviceName ( org.ovirt.engine.core.dao.HostDeviceDaoTest.EXISTING_HOST_ID , org.ovirt.engine.core.dao.HostDeviceDaoTest.EXISTING_DEVICE_NAME_2 ) ; org.junit.Assert.assertNull ( hostDevice.getVmId ( ) ) ; }

Target:
public void updateNetworkDevice ( ) { org.ovirt.engine.core.common.businessentities.HostDeviceId netDeviceId = new org.ovirt.engine.core.common.businessentities.HostDeviceId ( FixturesTool.NETWORK_HOST_DEVICE_HOST_ID , FixturesTool.NETWORK_HOST_DEVICE_NAME ) ; org.ovirt.engine.core.common.businessentities.HostDevice before = dao.get ( netDeviceId ) ; before.setNetworkInterfaceName ( ( ( before.getNetworkInterfaceName ( ) ) + "new" ) ) ; dao.update ( before ) ; org.ovirt.engine.core.common.businessentities.HostDevice after = dao.get ( netDeviceId ) ; org.junit.Assert.assertNotNull ( after ) ; org.junit.Assert.assertEquals ( before , after ) ; }
Source:
protected boolean isStorageDomainTypeCorrect ( org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain ) { if ( ( ( ( storageDomain.getStorageDomainType ( ) ) != ( org.ovirt.engine.core.common.businessentities.StorageDomainType.ISO ) ) && ( ( storageDomain.getStorageDomainType ( ) ) != ( org.ovirt.engine.core.common.businessentities.StorageDomainType.ImportExport ) ) ) && ( ( org.ovirt.engine.core.bll.storage.StorageHandlingCommandBase.getStoragePool ( ) . getStorageType ( ) ) != ( storageDomain.getStorageType ( ) ) ) ) { addCanDoActionMessage ( VdcBllMessages.ERROR_CANNOT_ATTACH_STORAGE_DOMAIN_STORAGE_TYPE_NOT_MATCH ) ; return false ; } return true ; }

Target:
protected boolean isStorageDomainTypeCorrect ( org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain ) { if ( ( storageDomain.isLocal ( ) ) != ( org.ovirt.engine.core.bll.storage.StorageHandlingCommandBase.getStoragePool ( ) . isLocal ( ) ) ) { addCanDoActionMessage ( VdcBllMessages.ERROR_CANNOT_ATTACH_STORAGE_DOMAIN_STORAGE_TYPE_NOT_MATCH ) ; return false ; } return true ; }
Source:
protected void executeVdsBrokerCommand ( ) { try { status = org.ovirt.engine.core.vdsbroker.SetAmountOfMemoryVDSCommand.getBroker ( ) . hotplugMemory ( org.ovirt.engine.core.vdsbroker.architecture.MemoryUtils.createHotplugMemoryParamsMap ( org.ovirt.engine.core.vdsbroker.SetAmountOfMemoryVDSCommand.getParameters ( ) . getMemoryDevice ( ) , false ) ) ; org.ovirt.engine.core.vdsbroker.SetAmountOfMemoryVDSCommand.proceedProxyReturnValue ( ) ; } catch ( java.lang.RuntimeException e ) { org.ovirt.engine.core.vdsbroker.SetAmountOfMemoryVDSCommand.setVdsRuntimeErrorAndReport ( e ) ; org.ovirt.engine.core.vdsbroker.SetAmountOfMemoryVDSCommand.getVDSReturnValue ( ) . setExceptionString ( null ) ; } }

Target:
protected void executeVdsBrokerCommand ( ) { try { status = org.ovirt.engine.core.vdsbroker.SetAmountOfMemoryVDSCommand.getBroker ( ) . hotplugMemory ( org.ovirt.engine.core.vdsbroker.architecture.MemoryUtils.createHotplugMemoryParamsMap ( org.ovirt.engine.core.vdsbroker.SetAmountOfMemoryVDSCommand.getParameters ( ) . getMemoryDevice ( ) , false , org.ovirt.engine.core.vdsbroker.SetAmountOfMemoryVDSCommand.getParameters ( ) . getMinAllocatedMem ( ) ) ) ; org.ovirt.engine.core.vdsbroker.SetAmountOfMemoryVDSCommand.proceedProxyReturnValue ( ) ; } catch ( java.lang.RuntimeException e ) { org.ovirt.engine.core.vdsbroker.SetAmountOfMemoryVDSCommand.setVdsRuntimeErrorAndReport ( e ) ; org.ovirt.engine.core.vdsbroker.SetAmountOfMemoryVDSCommand.getVDSReturnValue ( ) . setExceptionString ( null ) ; } }
Source:
public void addColumn ( com.google.gwt.user.cellview.client.Column < T , ? > column , com.google.gwt.user.cellview.client.Header < ? > header ) { super . addColumn ( column , header ) ; if ( columnResizingEnabled ) { if ( ( emptyNoWidthColumn ) != null ) { removeColumn ( emptyNoWidthColumn ) ; } emptyNoWidthColumn = new org.ovirt.engine.ui.common.widget.table.column.EmptyColumn < T > ( ) ; addColumn ( emptyNoWidthColumn ) ; } }

Target:
public void addColumn ( com.google.gwt.user.cellview.client.Column < T , ? > column , com.google.gwt.user.cellview.client.Header < ? > header ) { super . addColumn ( column , wrapHeader ( header , column ) ) ; if ( columnResizingEnabled ) { if ( ( emptyNoWidthColumn ) != null ) { removeColumn ( emptyNoWidthColumn ) ; } emptyNoWidthColumn = new org.ovirt.engine.ui.common.widget.table.column.EmptyColumn < T > ( ) ; addColumn ( emptyNoWidthColumn ) ; } }
Source:
private void addOrUpdateServerHook ( java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterServerHook > serverHooks , org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.common.businessentities.VDS , org.ovirt.engine.core.common.vdscommands.VDSReturnValue > pairResult ) { if ( ( getServerHookFromList ( serverHooks , pairResult.getFirst ( ) . getId ( ) ) ) == null ) { addServerHook ( pairResult.getFirst ( ) . getId ( ) ) ; } else { updateServerHookStatusInDb ( entity.getId ( ) , pairResult.getFirst ( ) . getId ( ) , getNewStatus ( ) ) ; } }

Target:
protected org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity getGlusterHook ( ) { if ( ( entity ) == null ) { entity = getGlusterHooksDao ( ) . getById ( getParameters ( ) . getHookId ( ) , true ) ; } return entity ; }
Source:
public static void GetVmConfigurationBySnapshot ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid snapshotSourceId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( org.ovirt.engine.core.common.businessentities.VM ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmConfigurationBySnapshot , new org.ovirt.engine.core.common.queries.GetVmConfigurationBySnapshotQueryParams ( snapshotSourceId ) , aQuery ) ; }

Target:
public static void IsHotPlugAvailable ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String version ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Boolean ) ( source ) ) . booleanValue ( ) : true ; } } ; org.ovirt.engine.core.common.queries.GetConfigurationValueParameters tempVar = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.HotPlugEnabled ) ; tempVar.setVersion ( version ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( tempVar , aQuery ) ; }
Source:
protected void setUpWindowsGetEntityExpectations ( int times , boolean notFound ) throws java.lang.Exception { setUpGetEntityExpectations ( times , notFound , new org.ovirt.engine.api.model.VM ( ) { { setId ( GUIDS [ 0 ] ) ; setVmOs ( OsRepository.DEFAULT_X86_OS ) ; } } ) ; }

Target:
public void testRemove ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpGetEntityExpectations ( ) ; setUpGetPayloadExpectations ( 0 , 1 ) ; setUpGetBallooningExpectations ( ) ; setUpGetGraphicsExpectations ( 1 ) ; setUpActionExpectations ( VdcActionType.RemoveVm , org.ovirt.engine.core.common.action.RemoveVmParameters.class , new java.lang.String [ ] { "VmId" , "Force" } , new java.lang.Object [ ] { GUIDS [ 0 ] , java.lang.Boolean.FALSE } , true , true ) ; verifyRemove ( resource.remove ( ) ) ; }
Source:
public java.util.Map < java.lang.String , java.lang.String > convertToStatusList ( ) { java.util.HashMap < java.lang.String , java.lang.String > result = new java.util.HashMap < java.lang.String , java.lang.String > ( ) ; for ( java.util.Map < java.lang.String , java.lang.Object > st : this . mStatusList ) { java.lang.String status = st.get ( "status" ) . toString ( ) ; java.lang.String id = st.get ( "id" ) . toString ( ) ; result.put ( id , status ) ; } return result ; }

Target:
public java.util.Map < java.lang.String , java.lang.String > convertToStatusList ( ) { java.util.HashMap < java.lang.String , java.lang.String > result = new java.util.HashMap < java.lang.String , java.lang.String > ( ) ; for ( java.util.Map < java.lang.String , java.lang.Object > st : this . statusList ) { java.lang.String status = st.get ( "status" ) . toString ( ) ; java.lang.String id = st.get ( "id" ) . toString ( ) ; result.put ( id , status ) ; } return result ; }
Source:
private static void addVideoDevice ( org.ovirt.engine.core.common.businessentities.VM vm ) { org.ovirt.engine.core.bll.utils.VmDeviceUtils.addManagedDevice ( new org.ovirt.engine.core.common.businessentities.VmDeviceId ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) , vm.getId ( ) ) , VmDeviceType.VIDEO , vm.getDefaultDisplayType ( ) . getVmDeviceType ( ) , org.ovirt.engine.core.bll.utils.VmDeviceUtils.getMemExpr ( vm.getNumOfMonitors ( ) ) , true , true ) ; }

Target:
private static void addVideoDevice ( org.ovirt.engine.core.common.businessentities.VmBase vm ) { org.ovirt.engine.core.bll.utils.VmDeviceUtils.addManagedDevice ( new org.ovirt.engine.core.common.businessentities.VmDeviceId ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) , vm.getId ( ) ) , VmDeviceType.VIDEO , vm.getDefaultDisplayType ( ) . getVmDeviceType ( ) , org.ovirt.engine.core.bll.utils.VmDeviceUtils.getMemExpr ( vm.getNumOfMonitors ( ) ) , true , true ) ; }
Source:
public com.google.gwt.resources.client.ImageResource getValue ( org.ovirt.engine.core.common.businessentities.VM vm ) { if ( ( vm.getVmPoolId ( ) ) == null ) { switch ( vm.getVmType ( ) ) { case Desktop : return getApplicationResources ( ) . desktopImage ( ) ; case Server : return getApplicationResources ( ) . serverImage ( ) ; default : return getApplicationResources ( ) . questionMarkImage ( ) ; } } else { return getApplicationResources ( ) . manyDesktopsImage ( ) ; } }

Target:
public com.google.gwt.resources.client.ImageResource getValue ( org.ovirt.engine.core.common.businessentities.VM vm ) { if ( ( vm.getVmPoolId ( ) ) == null ) { org.ovirt.engine.ui.webadmin.widget.table.column.VmTypeConfig config = org.ovirt.engine.ui.webadmin.widget.table.column.VmTypeConfig.from ( vm.getVmType ( ) , vm.isStateless ( ) ) ; setTitle ( config.getTooltip ( org.ovirt.engine.ui.webadmin.widget.table.column.VmTypeColumn.constants ) ) ; return config.getImageResource ( getApplicationResources ( ) ) ; } else { return getApplicationResources ( ) . manyDesktopsImage ( ) ; } }
Source:
private org.ovirt.engine.api.extensions.Extension loadExtension ( java.util.Properties props ) throws java.lang.Exception { org.ovirt.engine.api.extensions.Extension extension ; org.ovirt.engine.core.extensions.mgr.ExtensionsManager.BindingsLoader loader = bindingsLoaders.get ( props.getProperty ( Base.ConfigKeys.BINDINGS_METHOD ) ) ; if ( loader == null ) { throw new org.ovirt.engine.core.extensions.mgr.ConfigurationException ( java.lang.String.format ( "Invalid binding method '%1$s'." , props.getProperty ( Base.ConfigKeys.BINDINGS_METHOD ) ) ) ; } return loader.load ( props ) ; }

Target:
private org.ovirt.engine.api.extensions.Extension loadExtension ( java.util.Properties props ) throws java.lang.Exception { org.ovirt.engine.core.extensions.mgr.ExtensionsManager.BindingsLoader loader = org.ovirt.engine.core.extensions.mgr.ExtensionsManager.bindingsLoaders.get ( props.getProperty ( Base.ConfigKeys.BINDINGS_METHOD ) ) ; if ( loader == null ) { throw new org.ovirt.engine.core.extensions.mgr.ConfigurationException ( java.lang.String.format ( "Invalid binding method '%1$s'." , props.getProperty ( Base.ConfigKeys.BINDINGS_METHOD ) ) ) ; } return loader.load ( props ) ; }
Source:
public void getNetworkList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.Network > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.Network > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllNetworks , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) , aQuery ) ; }

Target:
public void getDataCentersByStorageDomain ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storageDomainId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStoragePoolsByStorageDomainId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( storageDomainId ) , aQuery ) ; }
Source:
private static void assertGetByNameResults ( java.util.List < org.ovirt.engine.core.common.businessentities.AuditLog > results , int expectedResults ) { org.junit.Assert.assertNotNull ( "Results object should not be null" , results ) ; org.junit.Assert.assertEquals ( "Wrong number of results" , expectedResults , results.size ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.AuditLog auditLog : results ) { org.junit.Assert.assertEquals ( "Wrong name of VM in result" , org.ovirt.engine.core.dao.AuditLogDAOTest.VM_NAME , auditLog.getvm_name ( ) ) ; org.junit.Assert.assertEquals ( "Wrong template name of VM in result" , org.ovirt.engine.core.dao.AuditLogDAOTest.VM_TEMPLATE_NAME , auditLog.getvm_template_name ( ) ) ; } }

Target:
private static void assertGetByNameResults ( java.util.List < org.ovirt.engine.core.common.businessentities.AuditLog > results , int expectedResults ) { org.junit.Assert.assertNotNull ( "Results object should not be null" , results ) ; org.junit.Assert.assertEquals ( "Wrong number of results" , expectedResults , results.size ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.AuditLog auditLog : results ) { org.junit.Assert.assertEquals ( "Wrong name of VM in result" , org.ovirt.engine.core.dao.AuditLogDAOTest.VM_NAME , auditLog.getVmName ( ) ) ; org.junit.Assert.assertEquals ( "Wrong template name of VM in result" , org.ovirt.engine.core.dao.AuditLogDAOTest.VM_TEMPLATE_NAME , auditLog.getVmTemplateName ( ) ) ; } }
Source:
private void auditLogOvfLoadError ( java.lang.String machineName , java.lang.String errorMessage ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase logable = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; logable.addCustomValue ( "ImportedVmName" , machineName ) ; logable.addCustomValue ( "ErrorMessage" , errorMessage ) ; new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector ( ) . log ( logable , AuditLogType.IMPORTEXPORT_FAILED_TO_IMPORT_VM ) ; }

Target:
private void auditLogOvfLoadError ( java.lang.String machineName , java.lang.String errorMessage ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase logable = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; logable.addCustomValue ( "ImportedVmName" , machineName ) ; logable.addCustomValue ( "ErrorMessage" , errorMessage ) ; auditLogDirector.log ( logable , AuditLogType.IMPORTEXPORT_FAILED_TO_IMPORT_VM ) ; }
Source:
public static void getVmNicList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ) ( source ) ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmInterfacesByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
public static void getStorageConnectionsByDataCenterIdAndStorageType ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.common.businessentities.StorageType storageType ) { 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.GetConnectionsByDataCenterAndStorageTypeParameters params = new org.ovirt.engine.core.common.queries.GetConnectionsByDataCenterAndStorageTypeParameters ( storagePoolId , storageType ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetConnectionsByDataCenterAndStorageType , params , aQuery ) ; }
Source:
public void unsyncedNetworkModified ( ) { org.ovirt.engine.core.common.businessentities.network.Network net = createNetwork ( "net" ) ; org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic = createNicSyncedWithNetwork ( "nic0" , net ) ; nic.setBridged ( ( ! ( net.isVmNetwork ( ) ) ) ) ; nic.setBootProtocol ( NetworkBootProtocol.None ) ; mockExistingNetworks ( net ) ; mockExistingIfaces ( nic ) ; nic.setBootProtocol ( NetworkBootProtocol.Dhcp ) ; org.ovirt.engine.core.bll.network.host.SetupNetworksHelper helper = createHelper ( createParametersForNics ( nic ) ) ; validateAndExpectViolation ( helper , VdcBllMessages.NETWORKS_NOT_IN_SYNC , net.getName ( ) ) ; }

Target:
public void unsyncedNetworkModified ( ) { org.ovirt.engine.core.common.businessentities.network.Network net = createNetwork ( "net" ) ; org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic = createNicSyncedWithNetwork ( "nic0" , net ) ; nic.setBridged ( ( ! ( net.isVmNetwork ( ) ) ) ) ; nic.setBootProtocol ( NetworkBootProtocol.NONE ) ; mockExistingNetworks ( net ) ; mockExistingIfaces ( nic ) ; nic.setBootProtocol ( NetworkBootProtocol.DHCP ) ; org.ovirt.engine.core.bll.network.host.SetupNetworksHelper helper = createHelper ( createParametersForNics ( nic ) ) ; validateAndExpectViolation ( helper , VdcBllMessages.NETWORKS_NOT_IN_SYNC , net.getName ( ) ) ; }
Source:
protected org.ovirt.engine.api.model.Permit postPopulate ( org.ovirt.engine.api.model.Permit from ) { org.ovirt.engine.core.common.businessentities.ActionGroup actionGroup = org.ovirt.engine.api.restapi.types.MappingTestHelper.shuffle ( org.ovirt.engine.core.common.businessentities.ActionGroup.class ) ; from.setId ( java.lang.Integer.toString ( actionGroup.getId ( ) ) ) ; org.ovirt.engine.api.model.PermitType permitType = org.ovirt.engine.api.restapi.types.PermitMapper.map ( actionGroup , ( ( org.ovirt.engine.api.model.PermitType ) ( null ) ) ) ; from.setName ( permitType.value ( ) ) ; from.setAdministrative ( actionGroup.getRoleType ( ) . toString ( ) . equals ( RoleType.ADMIN.toString ( ) ) ) ; return from ; }

Target:
protected org.ovirt.engine.api.model.Permit postPopulate ( org.ovirt.engine.api.model.Permit from ) { org.ovirt.engine.core.common.businessentities.ActionGroup actionGroup = org.ovirt.engine.api.restapi.types.MappingTestHelper.shuffle ( org.ovirt.engine.core.common.businessentities.ActionGroup.class ) ; from.setId ( java.lang.Integer.toString ( actionGroup.getId ( ) ) ) ; from.setName ( actionGroup.name ( ) . toLowerCase ( ) ) ; from.setAdministrative ( ( ( actionGroup.getRoleType ( ) ) == ( org.ovirt.engine.core.common.businessentities.RoleType.ADMIN ) ) ) ; return from ; }
Source:
public void setup ( ) throws java.lang.Exception , java.lang.NoSuchMethodException , java.lang.SecurityException { super . setup ( ) ; validator = org.ovirt.engine.core.common.utils.ValidationUtils.getValidator ( ) ; org.powermock.api.mockito.PowerMockito.mockStatic ( org.ovirt.engine.core.common.config.Config.class ) ; org.powermock.api.mockito.PowerMockito.when ( org.ovirt.engine.core.common.config.Config.GetValue ( ConfigValues.ManagementNetwork ) ) . thenReturn ( "ovirtmgmt" ) ; mockMaxMTU ( 9000 ) ; }

Target:
public void setup ( ) throws java.lang.Exception { validator = org.ovirt.engine.core.common.utils.ValidationUtils.getValidator ( ) ; org.ovirt.engine.core.common.config.IConfigUtilsInterface confUtils = org.mockito.Mockito.mock ( org.ovirt.engine.core.common.config.IConfigUtilsInterface.class ) ; org.mockito.Mockito.when ( confUtils.GetValue ( ConfigValues.MaxMTU , Config.DefaultConfigurationVersion ) ) . thenReturn ( org.ovirt.engine.core.common.utils.MTUValidatorTest.TEST_MAX_MTU ) ; org.mockito.Mockito.when ( confUtils.GetValue ( ConfigValues.ManagementNetwork , Config.DefaultConfigurationVersion ) ) . thenReturn ( org.ovirt.engine.core.common.utils.MTUValidatorTest.TEST_MANAGEMENT_NETWORK ) ; org.ovirt.engine.core.common.config.Config.setConfigUtils ( confUtils ) ; }
Source:
void testIsManagementNetworkNameInGivenClusterCommon ( java.lang.String managementNetworkName , boolean expected ) { if ( managementNetworkName != null ) { org.mockito.Mockito.when ( mockNetwork.getName ( ) ) . thenReturn ( managementNetworkName ) ; org.mockito.Mockito.when ( mockNetworkDao.getManagementNetwork ( org.ovirt.engine.core.bll.network.cluster.ManagementNetworkUtilImplTest.TEST_CLUSTER_ID ) ) . thenReturn ( mockNetwork ) ; } final boolean actual = underTest.isManagementNetwork ( org.ovirt.engine.core.bll.network.cluster.ManagementNetworkUtilImplTest.TEST_NETWORK_NAME , org.ovirt.engine.core.bll.network.cluster.ManagementNetworkUtilImplTest.TEST_CLUSTER_ID ) ; org.mockito.Mockito.verify ( mockNetworkDao ) . getManagementNetwork ( org.ovirt.engine.core.bll.network.cluster.ManagementNetworkUtilImplTest.TEST_CLUSTER_ID ) ; org.junit.Assert.assertEquals ( expected , actual ) ; }

Target:
public void testIsManagementNetworkNameNullInGivenCluster ( ) throws java.lang.Exception { testIsManagementNetworkNameInGivenClusterCommon ( null , org.ovirt.engine.core.bll.network.cluster.ManagementNetworkUtilImplTest.TEST_CLUSTER_ID , false ) ; }
Source:
public void getStorageConnectionById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String id , boolean isRefresh ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( org.ovirt.engine.core.common.businessentities.StorageServerConnections ) ( source ) ) : null ; } } ; org.ovirt.engine.core.common.queries.StorageServerConnectionQueryParametersBase params = new org.ovirt.engine.core.common.queries.StorageServerConnectionQueryParametersBase ( id ) ; params.setRefresh ( isRefresh ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageServerConnectionById , params , aQuery ) ; }

Target:
public void getClustersHavingHosts ( 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 ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Cluster > list = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Cluster > ) ( source ) ) ; java.util.Collections.sort ( list , new org.ovirt.engine.core.common.businessentities.comparators.NameableComparator ( ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Cluster > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllClustersHavingHosts , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }
Source:
private void newEntity ( ) { if ( ( getWindow ( ) ) != null ) { return ; } org.ovirt.engine.ui.uicommonweb.models.vms.VmInterfaceModel model = org.ovirt.engine.ui.uicommonweb.models.vms.NewTemplateInterfaceModel.createInstance ( getEntityStronglyTyped ( ) , getEntityStronglyTyped ( ) . getStoragePoolId ( ) , cluster.getcompatibility_version ( ) , ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ) ( getItems ( ) ) ) , this ) ; setWindow ( model ) ; }

Target:
private void newEntity ( ) { if ( ( getWindow ( ) ) != null ) { return ; } org.ovirt.engine.ui.uicommonweb.models.vms.VmInterfaceModel model = org.ovirt.engine.ui.uicommonweb.models.vms.NewTemplateInterfaceModel.createInstance ( getEntity ( ) , getEntity ( ) . getStoragePoolId ( ) , cluster.getCompatibilityVersion ( ) , ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ) ( getItems ( ) ) ) , this ) ; setWindow ( model ) ; }
Source:
private java.util.Map < org.ovirt.engine.core.compat.Guid , java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > > getStorageToDiskMap ( ) { java.util.Map < org.ovirt.engine.core.compat.Guid , java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > > storageToDisksMap = new java.util.HashMap < org.ovirt.engine.core.compat.Guid , java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > > ( ) ; for ( org.ovirt.engine.core.common.businessentities.DiskImage disk : getSourceImages ( ) ) { org.ovirt.engine.core.utils.MultiValueMapUtils.addToMap ( disk.getStorageIds ( ) . get ( 0 ) , disk , storageToDisksMap ) ; } return storageToDisksMap ; }

Target:
private java.util.Map < org.ovirt.engine.core.compat.Guid , java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > > getStorageToDiskMap ( ) { java.util.Map < org.ovirt.engine.core.compat.Guid , java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > > storageToDisksMap = new java.util.HashMap < org.ovirt.engine.core.compat.Guid , java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > > ( ) ; for ( org.ovirt.engine.core.common.businessentities.DiskImage disk : getSourceImages ( ) ) { org.ovirt.engine.core.utils.collections.MultiValueMapUtils.addToMap ( disk.getStorageIds ( ) . get ( 0 ) , disk , storageToDisksMap ) ; } return storageToDisksMap ; }
Source:
public void validateEnums ( org.ovirt.engine.api.model.Event event ) { if ( event.isSetSeverity ( ) ) { org.ovirt.engine.api.common.util.EnumValidator.validateEnum ( org.ovirt.engine.api.model.LogSeverity.class , event.getSeverity ( ) , true ) ; } if ( event.isSetHost ( ) ) { hostValidator.validateEnums ( event.getHost ( ) ) ; } }

Target:
public void validateEnums ( org.ovirt.engine.api.model.Event event ) { if ( event.isSetSeverity ( ) ) { org.ovirt.engine.api.common.util.EnumValidator.validateEnum ( org.ovirt.engine.api.model.LogSeverity.class , event.getSeverity ( ) , true ) ; } if ( event.isSetHost ( ) ) { hostValidator.validateEnums ( event.getHost ( ) ) ; } if ( event.isSetStorageDomain ( ) ) { storageDomainValidator.validateEnums ( event.getStorageDomain ( ) ) ; } }
Source:
public void testGetGlusterGeoRepSessionUnSetConfig ( ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSessionConfiguration sessionConfig = getGlusterGeoRepSessionConfig ( ) ; dao.saveConfig ( sessionConfig ) ; java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSessionConfiguration > unsetSessionConfig = dao.getGlusterGeoRepSessionUnSetConfig ( FixturesTool.GLUSTER_GEOREP_SESSION_ID ) ; org.junit.Assert.assertEquals ( "use_meta_volume" , unsetSessionConfig.get ( 0 ) . getKey ( ) ) ; }

Target:
public void testGetGlusterGeoRepSessionUnSetConfig ( ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSessionConfiguration sessionConfig = getGlusterGeoRepSessionConfig ( ) ; dao.saveConfig ( sessionConfig ) ; java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSessionConfiguration > unsetSessionConfig = dao.getGlusterGeoRepSessionUnSetConfig ( FixturesTool.GLUSTER_GEOREP_SESSION_ID ) ; org.junit.jupiter.api.Assertions.assertEquals ( "use_meta_volume" , unsetSessionConfig.get ( 0 ) . getKey ( ) ) ; }
Source:
public void testDiscoverGeoRepData ( ) { org.mockito.Mockito.doReturn ( getSessionsVDSReturnVal ( 2 ) ) . when ( syncJob ) . runVdsCommand ( org.mockito.Matchers.eq ( VDSCommandType.GetGlusterVolumeGeoRepSessionList ) , org.mockito.Matchers.any ( org.ovirt.engine.core.common.vdscommands.gluster.GlusterVolumeGeoRepSessionVDSParameters.class ) ) ; syncJob.discoverGeoRepData ( ) ; org.mockito.Mockito.verify ( geoRepDao , org.mockito.Mockito.times ( 2 ) ) . save ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSession.class ) ) ; }

Target:
public void testDiscoverGeoRepData ( ) { org.mockito.Mockito.doReturn ( getSessionsVDSReturnVal ( 2 ) ) . when ( syncJob ) . runVdsCommand ( org.mockito.ArgumentMatchers.eq ( VDSCommandType.GetGlusterVolumeGeoRepSessionList ) , org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.common.vdscommands.gluster.GlusterVolumeGeoRepSessionVDSParameters.class ) ) ; syncJob.discoverGeoRepData ( ) ; org.mockito.Mockito.verify ( geoRepDao , org.mockito.Mockito.times ( 2 ) ) . save ( org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSession.class ) ) ; }
Source:
private boolean findDefaultManagementNetwork ( ) { managementNetwork = defaultManagementNetworkFinder.findDefaultManagementNetwork ( org.ovirt.engine.core.bll.AddVdsGroupCommand.getVdsGroup ( ) . getStoragePoolId ( ) ) ; if ( ( managementNetwork ) == null ) { addCanDoActionMessage ( EngineMessage.ACTION_TYPE_FAILED_DEFAULT_MANAGEMENT_NETWORK_NOT_FOUND ) ; return false ; } return true ; }

Target:
private boolean validateInputManagementNetwork ( ) { setManagementNetwork ( getManagementNetworkById ( ) ) ; if ( ( getManagementNetwork ( ) ) == null ) { addCanDoActionMessage ( EngineMessage.NETWORK_NOT_EXISTS ) ; return false ; } final org.ovirt.engine.core.bll.network.cluster.NetworkClusterValidatorBase networkClusterValidator = createNetworkClusterValidator ( ) ; return ( ( validate ( networkClusterValidator.networkBelongsToClusterDataCenter ( org.ovirt.engine.core.bll.AddVdsGroupCommand.getVdsGroup ( ) , getManagementNetwork ( ) ) ) ) && ( validate ( networkClusterValidator.managementNetworkRequired ( getManagementNetwork ( ) ) ) ) ) && ( validate ( networkClusterValidator.managementNetworkNotExternal ( getManagementNetwork ( ) ) ) ) ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult canAddRngDevice ( org.ovirt.engine.core.common.businessentities.VDSGroup cluster , org.ovirt.engine.core.common.businessentities.VmRngDevice rngDevice ) { org.ovirt.engine.core.common.businessentities.VmRngDevice.Source source = rngDevice.getSource ( ) ; boolean supported = ( ( cluster != null ) && ( isFeatureSupported ( cluster.getCompatibilityVersion ( ) ) ) ) && ( cluster.getRequiredRngSources ( ) . contains ( source ) ) ; if ( ! supported ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_NOT_SUPPORTED_FOR_CLUSTER_POOL_LEVEL ) ; } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult canAddRngDevice ( org.ovirt.engine.core.common.businessentities.Cluster cluster , org.ovirt.engine.core.common.businessentities.VmRngDevice rngDevice ) { org.ovirt.engine.core.common.businessentities.VmRngDevice.Source source = rngDevice.getSource ( ) ; boolean supported = ( ( cluster != null ) && ( isFeatureSupported ( cluster.getCompatibilityVersion ( ) ) ) ) && ( cluster.getRequiredRngSources ( ) . contains ( source ) ) ; if ( ! supported ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_NOT_SUPPORTED_FOR_CLUSTER_POOL_LEVEL ) ; } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }
Source:
public javax.ws.rs.core.Response add ( org.ovirt.engine.api.model.Permission permission ) { validateParameters ( permission , ( isPrincipalSubCollection ( ) ? new java.lang.String [ ] { "role.id" , "dataCenter|cluster|host|storageDomain|vm|vmpool|template.id" } : new java.lang.String [ ] { "role.id" , "user|group.id" } ) ) ; org.ovirt.engine.core.common.businessentities.permissions entity = map ( permission , getPermissionsTemplate ( permission ) ) ; return performCreate ( VdcActionType.AddPermission , getPrincipal ( entity , permission ) , new org.ovirt.engine.api.restapi.resource.QueryIdResolver < org.ovirt.engine.core.compat.Guid > ( org.ovirt.engine.core.common.queries.VdcQueryType.GetPermissionById , org.ovirt.engine.core.common.queries.MultilevelAdministrationByPermissionIdParameters.class ) ) ; }

Target:
public javax.ws.rs.core.Response add ( org.ovirt.engine.api.model.Permission permission ) { validateParameters ( permission , ( isPrincipalSubCollection ( ) ? new java.lang.String [ ] { "role.id" , "dataCenter|cluster|host|storageDomain|vm|vmpool|template.id" } : new java.lang.String [ ] { "role.id" , "user|group.id" } ) ) ; org.ovirt.engine.core.common.businessentities.permissions entity = map ( permission , getPermissionsTemplate ( permission ) ) ; return performCreate ( VdcActionType.AddPermission , getPrincipal ( entity , permission ) , new org.ovirt.engine.api.restapi.resource.QueryIdResolver < org.ovirt.engine.core.compat.Guid > ( org.ovirt.engine.core.common.queries.VdcQueryType.GetPermissionById , org.ovirt.engine.core.common.queries.IdQueryParameters.class ) ) ; }
Source:
private org.ovirt.engine.core.common.action.VdcReturnValueBase executeCommand ( final org.ovirt.engine.core.bll.CommandBase < ? > command , final org.ovirt.engine.core.bll.context.CommandContext cmdContext ) { org.ovirt.engine.core.bll.tasks.interfaces.CommandCallback callback = command.getCallback ( ) ; org.ovirt.engine.core.common.action.VdcReturnValueBase result = org.ovirt.engine.core.bll.utils.BackendUtils.getBackendCommandObjectsHandler ( org.ovirt.engine.core.bll.tasks.CommandExecutor.log ) . runAction ( command , null ) ; updateCommand ( command , result ) ; if ( callback != null ) { callback.executed ( result ) ; } return result ; }

Target:
private org.ovirt.engine.core.common.action.VdcReturnValueBase executeCommand ( final org.ovirt.engine.core.bll.CommandBase < ? > command , final org.ovirt.engine.core.bll.context.CommandContext cmdContext ) { org.ovirt.engine.core.bll.tasks.interfaces.CommandCallback callback = command.getCallback ( ) ; org.ovirt.engine.core.common.action.VdcReturnValueBase result = org.ovirt.engine.core.bll.utils.BackendUtils.getBackendCommandObjectsHandler ( org.ovirt.engine.core.bll.tasks.CommandExecutor.log ) . runAction ( command , ( cmdContext != null ? cmdContext.getExecutionContext ( ) : null ) ) ; updateCommand ( command , result ) ; if ( callback != null ) { callback.executed ( result ) ; } return result ; }
Source:
public void runFailedAutoStartVMs ( java.util.List < org.ovirt.engine.core.compat.Guid > vmIds ) { for ( org.ovirt.engine.core.compat.Guid vmId : vmIds ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase event = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; event.setVmId ( vmId ) ; auditLogDirector.log ( event , AuditLogType.HA_VM_FAILED ) ; org.ovirt.engine.core.bll.VdsEventListener.log.info ( "Highly Available VM went down. Attempting to restart. VM Name '{}', VM Id '{}'" , event.getVmName ( ) , vmId ) ; } org.ovirt.engine.core.bll.AutoStartVmsRunner.getInstance ( ) . addVmsToRun ( vmIds ) ; }

Target:
public void runFailedAutoStartVMs ( java.util.List < org.ovirt.engine.core.compat.Guid > vmIds ) { for ( org.ovirt.engine.core.compat.Guid vmId : vmIds ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase event = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; event.setVmId ( vmId ) ; auditLogDirector.log ( event , AuditLogType.HA_VM_FAILED ) ; org.ovirt.engine.core.bll.VdsEventListener.log.info ( "Highly Available VM went down. Attempting to restart. VM Name '{}', VM Id '{}'" , event.getVmName ( ) , vmId ) ; } autoStartVmsRunner.addVmsToRun ( vmIds ) ; }
Source:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.storage.SanStorageModel sanStorageModel = ( ( org.ovirt.engine.ui.uicommonweb.models.storage.SanStorageModel ) ( target ) ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.LUNs > lunList = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.LUNs > ) ( returnValue ) ) ; sanStorageModel.ApplyData ( lunList , true ) ; }

Target:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.storage.SanStorageModel sanStorageModel = ( ( org.ovirt.engine.ui.uicommonweb.models.storage.SanStorageModel ) ( target ) ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.LUNs > lunList = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.LUNs > ) ( returnValue ) ) ; sanStorageModel.applyData ( lunList , true ) ; }
Source:
public void onClick ( com.google.gwt.event.dom.client.ClickEvent event ) { ( ( org.ovirt.engine.ui.common.widget.AddRemoveRowWidget < M , T , V > . AddRemoveRowPanel ) ( item.getSecond ( ) . getParent ( ) ) ) . swapButton ( createButton ( item ) ) ; addGhostEntry ( ) ; }

Target:
public void onClick ( com.google.gwt.event.dom.client.ClickEvent event ) { ( ( org.ovirt.engine.ui.common.widget.AddRemoveRowWidget < M , T , V > . AddRemoveRowPanel ) ( widget.getParent ( ) ) ) . swapButton ( createButton ( item ) ) ; org.ovirt.engine.core.common.utils.Pair < T , V > item = addGhostEntry ( ) ; onAdd ( item.getFirst ( ) , item.getSecond ( ) ) ; }
Source:
protected org.ovirt.engine.core.common.businessentities.ArchitectureType getArchitecture ( org.ovirt.engine.core.common.businessentities.VDSGroup group ) { if ( org.apache.commons.lang.StringUtils.isNotEmpty ( group.getCpuName ( ) ) ) { return org.ovirt.engine.core.bll.HandleVdsCpuFlagsOrClusterChangedCommand.getCpuFlagsManagerHandler ( ) . getArchitectureByCpuName ( group.getCpuName ( ) , group.getCompatibilityVersion ( ) ) ; } return group.getArchitecture ( ) ; }

Target:
protected org.ovirt.engine.core.common.businessentities.ArchitectureType getArchitecture ( org.ovirt.engine.core.common.businessentities.Cluster group ) { if ( org.apache.commons.lang.StringUtils.isNotEmpty ( group.getCpuName ( ) ) ) { return org.ovirt.engine.core.bll.HandleVdsCpuFlagsOrClusterChangedCommand.getCpuFlagsManagerHandler ( ) . getArchitectureByCpuName ( group.getCpuName ( ) , group.getCompatibilityVersion ( ) ) ; } return group.getArchitecture ( ) ; }
Source:
protected boolean connectToStorage ( ) { org.ovirt.engine.core.common.vdscommands.StorageServerConnectionManagementVDSParameters newConnectionParametersForVdsm = createParametersForVdsm ( org.ovirt.engine.core.bll.storage.UpdateStorageServerConnectionCommand.getParameters ( ) . getVdsId ( ) , org.ovirt.engine.core.bll.storage.UpdateStorageServerConnectionCommand.getParameters ( ) . getStoragePoolId ( ) , org.ovirt.engine.core.bll.storage.UpdateStorageServerConnectionCommand.getParameters ( ) . getStorageServerConnection ( ) . getstorage_type ( ) , org.ovirt.engine.core.bll.storage.UpdateStorageServerConnectionCommand.getParameters ( ) . getStorageServerConnection ( ) ) ; return runVdsCommand ( VDSCommandType.ConnectStorageServer , newConnectionParametersForVdsm ) . getSucceeded ( ) ; }

Target:
protected boolean connectToStorage ( ) { org.ovirt.engine.core.common.vdscommands.StorageServerConnectionManagementVDSParameters newConnectionParametersForVdsm = createParametersForVdsm ( org.ovirt.engine.core.bll.storage.UpdateStorageServerConnectionCommand.getParameters ( ) . getVdsId ( ) , Guid.Empty , org.ovirt.engine.core.bll.storage.UpdateStorageServerConnectionCommand.getParameters ( ) . getStorageServerConnection ( ) . getstorage_type ( ) , org.ovirt.engine.core.bll.storage.UpdateStorageServerConnectionCommand.getParameters ( ) . getStorageServerConnection ( ) ) ; return runVdsCommand ( VDSCommandType.ConnectStorageServer , newConnectionParametersForVdsm ) . getSucceeded ( ) ; }
Source:
private java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > mockImages ( ) { org.ovirt.engine.core.common.businessentities.DiskImage image1 = new org.ovirt.engine.core.common.businessentities.DiskImage ( ) ; image1.setImageId ( org.ovirt.engine.core.bll.RemoveDiskSnapshotsCommandTest.IMAGE_ID_1 ) ; image1.setStorageIds ( new java.util.ArrayList ( java.util.Arrays.asList ( org.ovirt.engine.core.bll.RemoveDiskSnapshotsCommandTest.STORAGE_DOMAIN_ID ) ) ) ; org.ovirt.engine.core.common.businessentities.DiskImage image2 = new org.ovirt.engine.core.common.businessentities.DiskImage ( ) ; image2.setImageId ( org.ovirt.engine.core.bll.RemoveDiskSnapshotsCommandTest.IMAGE_ID_2 ) ; image2.setStorageIds ( new java.util.ArrayList ( java.util.Arrays.asList ( org.ovirt.engine.core.bll.RemoveDiskSnapshotsCommandTest.STORAGE_DOMAIN_ID ) ) ) ; return new java.util.ArrayList ( java.util.Arrays.asList ( image1 , image2 ) ) ; }

Target:
private java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > mockImages ( ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage image1 = new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ; image1.setImageId ( org.ovirt.engine.core.bll.RemoveDiskSnapshotsCommandTest.IMAGE_ID_1 ) ; image1.setStorageIds ( new java.util.ArrayList ( java.util.Arrays.asList ( org.ovirt.engine.core.bll.RemoveDiskSnapshotsCommandTest.STORAGE_DOMAIN_ID ) ) ) ; org.ovirt.engine.core.common.businessentities.storage.DiskImage image2 = new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ; image2.setImageId ( org.ovirt.engine.core.bll.RemoveDiskSnapshotsCommandTest.IMAGE_ID_2 ) ; image2.setStorageIds ( new java.util.ArrayList ( java.util.Arrays.asList ( org.ovirt.engine.core.bll.RemoveDiskSnapshotsCommandTest.STORAGE_DOMAIN_ID ) ) ) ; return new java.util.ArrayList ( java.util.Arrays.asList ( image1 , image2 ) ) ; }