auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public static 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.RunQuery ( VdcQueryType.GetStoragePoolsByStorageDomainId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( storageDomainId ) , aQuery ) ; }

Target:
public static void getDataCenterMaxNameLength ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) . intValue ( ) : 1 ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.StoragePoolNameSizeLimit , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
protected void endWithFailure ( ) { if ( isVmRunningStateless ( ) ) { org.ovirt.engine.core.common.action.VdcReturnValueBase vdcReturnValue = org.ovirt.engine.core.bll.RunVmCommand.getBackend ( ) . endAction ( VdcActionType.CreateAllSnapshotsFromVm , buildCreateSnapshotParametersForEndAction ( ) , new org.ovirt.engine.core.bll.context.CommandContext ( org.ovirt.engine.core.bll.RunVmCommand.getCompensationContext ( ) ) ) ; setSucceeded ( vdcReturnValue.getSucceeded ( ) ) ; } else { super . endWithFailure ( ) ; } }

Target:
protected org.ovirt.engine.core.compat.Guid getActiveIsoDomainId ( ) { if ( ( cachedActiveIsoDomainId ) == null ) { cachedActiveIsoDomainId = getIsoDomainListSyncronizer ( ) . findActiveISODomain ( org.ovirt.engine.core.bll.RunVmCommand.getVm ( ) . getStoragePoolId ( ) ) ; } return cachedActiveIsoDomainId ; }
Source:
public void getNextAvailableDiskAliasNameByVMId ( 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.GetNextAvailableDiskAliasNameByVMId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }

Target:
public void getVmGuestAgentInterfacesByVmId ( org.ovirt.engine.ui.frontend.AsyncQuery < java.util.List < org.ovirt.engine.core.common.businessentities.VmGuestAgentInterface > > aQuery , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.ListConverter < > ( ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmGuestAgentInterfacesByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) . withoutRefresh ( ) , aQuery ) ; }
Source:
private void prepareVmDao ( org.ovirt.engine.core.common.businessentities.VM ... vmList ) { java.util.List < org.ovirt.engine.core.common.businessentities.VM > vms = java.util.Arrays.asList ( vmList ) ; org.mockito.Mockito.when ( vmDao.getVmsByIds ( org.mockito.Matchers.anyList ( ) ) ) . thenReturn ( vms ) ; for ( org.ovirt.engine.core.common.businessentities.VM vm : vms ) { org.mockito.Mockito.when ( vmDao.get ( org.mockito.Matchers.eq ( vm.getId ( ) ) ) ) . thenReturn ( vm ) ; } }

Target:
public java.lang.Object answer ( org.mockito.invocation.InvocationOnMock invocation ) throws java.lang.Throwable { final java.util.List < org.ovirt.engine.core.common.businessentities.VM > selectedVms = new java.util.ArrayList < > ( ) ; final java.util.Set < org.ovirt.engine.core.compat.Guid > vmIds = new java.util.HashSet < > ( ( ( java.util.List < org.ovirt.engine.core.compat.Guid > ) ( invocation.getArguments ( ) [ 0 ] ) ) ) ; for ( org.ovirt.engine.core.common.businessentities.VM vm : vms ) { if ( vmIds.contains ( vm.getId ( ) ) ) { selectedVms.add ( vm ) ; } } return selectedVms ; }
Source:
public static void GetLocalFSPath ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.RhevhLocalFSPath , org.ovirt.engine.core.common.config.Config.DefaultConfigurationVersion ) , aQuery ) ; }

Target:
public static void GetExistingStorageDomainList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hostId , org.ovirt.engine.core.common.businessentities.StorageDomainType domainType , java.lang.String path ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage_domains > ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetExistingStorageDomainList , new org.ovirt.engine.core.common.queries.GetExistingStorageDomainListParameters ( hostId , org.ovirt.engine.core.common.businessentities.StorageType.NFS , domainType , path ) , aQuery ) ; }
Source:
protected void Perform ( ) { if ( org.ovirt.engine.core.bll.PauseVmCommand.getVm ( ) . isRunning ( ) ) { setActionReturnValue ( org.ovirt.engine.core.bll.Backend.getInstance ( ) . getResourceManager ( ) . RunVdsCommand ( VDSCommandType.Pause , new org.ovirt.engine.core.common.vdscommands.PauseVDSCommandParameters ( org.ovirt.engine.core.bll.PauseVmCommand.getVdsId ( ) , org.ovirt.engine.core.bll.PauseVmCommand.getVmId ( ) ) ) . getReturnValue ( ) ) ; org.ovirt.engine.core.bll.PauseVmCommand.setSucceeded ( true ) ; } else { setActionReturnValue ( org.ovirt.engine.core.bll.PauseVmCommand.getVm ( ) . getStatus ( ) ) ; } }

Target:
protected void perform ( ) { if ( org.ovirt.engine.core.bll.PauseVmCommand.getVm ( ) . isRunning ( ) ) { setActionReturnValue ( org.ovirt.engine.core.bll.Backend.getInstance ( ) . getResourceManager ( ) . RunVdsCommand ( VDSCommandType.Pause , new org.ovirt.engine.core.common.vdscommands.PauseVDSCommandParameters ( org.ovirt.engine.core.bll.PauseVmCommand.getVdsId ( ) , org.ovirt.engine.core.bll.PauseVmCommand.getVmId ( ) ) ) . getReturnValue ( ) ) ; org.ovirt.engine.core.bll.PauseVmCommand.setSucceeded ( true ) ; } else { setActionReturnValue ( org.ovirt.engine.core.bll.PauseVmCommand.getVm ( ) . getStatus ( ) ) ; } }
Source:
public void testDataCentersByExternalNetworkId ( ) { java.util.List < org.ovirt.engine.core.compat.Guid > result = dao.getDcIdByExternalNetworkId ( FixturesTool.EXTERNAL_NETWORK_ID ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertTrue ( ( ( result.size ( ) ) > 1 ) ) ; org.junit.Assert.assertTrue ( ( ! ( result.get ( 0 ) . equals ( result.get ( 1 ) ) ) ) ) ; }

Target:
public void testDataCentersByExternalNetworkId ( ) { java.util.List < org.ovirt.engine.core.compat.Guid > result = dao.getDcIdByExternalNetworkId ( FixturesTool.EXTERNAL_NETWORK_ID ) ; org.junit.jupiter.api.Assertions.assertNotNull ( result ) ; org.junit.jupiter.api.Assertions.assertTrue ( ( ( result.size ( ) ) > 1 ) ) ; org.junit.jupiter.api.Assertions.assertTrue ( ( ! ( result.get ( 0 ) . equals ( result.get ( 1 ) ) ) ) ) ; }
Source:
public boolean equals ( java.lang.Object o ) { if ( ( this ) == o ) { return true ; } if ( ( o == null ) || ( ( getClass ( ) ) != ( o.getClass ( ) ) ) ) { return false ; } org.ovirt.engine.core.common.businessentities.HostDeviceId other = ( ( org.ovirt.engine.core.common.businessentities.HostDeviceId ) ( o ) ) ; return ( org.ovirt.engine.core.common.utils.ObjectUtils.objectsEqual ( hostId , other.hostId ) ) && ( org.ovirt.engine.core.common.utils.ObjectUtils.objectsEqual ( deviceName , other.deviceName ) ) ; }

Target:
public boolean equals ( java.lang.Object o ) { if ( ( this ) == o ) { return true ; } if ( ( o == null ) || ( ( getClass ( ) ) != ( o.getClass ( ) ) ) ) { return false ; } org.ovirt.engine.core.common.businessentities.HostDeviceId other = ( ( org.ovirt.engine.core.common.businessentities.HostDeviceId ) ( o ) ) ; return ( java.util.Objects.equals ( hostId , other.hostId ) ) && ( java.util.Objects.equals ( deviceName , other.deviceName ) ) ; }
Source:
private boolean serverExists ( org.ovirt.engine.core.common.businessentities.gluster.GlusterServerInfo glusterServer ) { return getDbUtils ( ) . serverExists ( org.ovirt.engine.core.bll.gluster.GetAddedGlusterServersQuery.getParameters ( ) . getClusterId ( ) , glusterServer.getHostnameOrIp ( ) ) ; }

Target:
public boolean serverExists ( org.ovirt.engine.core.common.businessentities.gluster.GlusterServerInfo glusterServer ) { org.ovirt.engine.core.common.businessentities.VDSGroup cluster = getVdsGroupDao ( ) . get ( org.ovirt.engine.core.bll.gluster.GetAddedGlusterServersQuery.getParameters ( ) . getClusterId ( ) ) ; if ( org.ovirt.engine.core.common.gluster.GlusterFeatureSupported.glusterHostUuidSupported ( cluster.getcompatibility_version ( ) ) ) { return getDbUtils ( ) . serverExists ( glusterServer.getUuid ( ) ) ; } else { return getDbUtils ( ) . serverExists ( org.ovirt.engine.core.bll.gluster.GetAddedGlusterServersQuery.getParameters ( ) . getClusterId ( ) , glusterServer.getHostnameOrIp ( ) ) ; } }
Source:
public void testRemoveNonExistant ( ) throws java.lang.Exception { setUpGetEntityExpectations ( VdcQueryType.GetVmTemplate , org.ovirt.engine.core.common.queries.GetVmTemplateParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { NON_EXISTANT_GUID } , null ) ; control.replay ( ) ; try { collection.remove ( org.ovirt.engine.api.restapi.resource.NON_EXISTANT_GUID.toString ( ) ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { assertNotNull ( wae.getResponse ( ) ) ; assertEquals ( 404 , wae.getResponse ( ) . getStatus ( ) ) ; } }

Target:
protected javax.ws.rs.core.Response doAdd ( org.ovirt.engine.api.model.Template model ) { return collection.add ( model ) ; }
Source:
private void auditLogForNoMetadataDescriptionUpdate ( org.ovirt.engine.core.common.AuditLogType auditLogType , org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain , org.ovirt.engine.core.common.businessentities.DiskImage diskImage ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase auditLogableBase = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; auditLogableBase.addCustomValue ( "DataCenterName" , org.ovirt.engine.core.bll.UpdateVmDiskCommand.getStoragePool ( ) . getName ( ) ) ; auditLogableBase.addCustomValue ( "StorageDomainName" , storageDomain.getName ( ) ) ; auditLogableBase.addCustomValue ( "DiskName" , diskImage.getDiskAlias ( ) ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.log ( auditLogableBase , auditLogType ) ; }

Target:
private void auditLogForNoMetadataDescriptionUpdate ( org.ovirt.engine.core.common.AuditLogType auditLogType , org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain , org.ovirt.engine.core.common.businessentities.storage.DiskImage diskImage ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase auditLogableBase = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; auditLogableBase.addCustomValue ( "DataCenterName" , org.ovirt.engine.core.bll.UpdateVmDiskCommand.getStoragePool ( ) . getName ( ) ) ; auditLogableBase.addCustomValue ( "StorageDomainName" , storageDomain.getName ( ) ) ; auditLogableBase.addCustomValue ( "DiskName" , diskImage.getDiskAlias ( ) ) ; auditLogDirector.log ( auditLogableBase , auditLogType ) ; }
Source:
public void run ( ) { log.infoFormat ( "Rollback for command: {0}." , this . getClass ( ) . getName ( ) ) ; try { getAsyncTaskManager ( ) . cancelTasks ( getReturnValue ( ) . getVdsmTaskIdList ( ) ) ; } catch ( java.lang.Exception e ) { log.errorFormat ( "Failed to cancel tasks for command: {0}." , this . getClass ( ) . getName ( ) ) ; } }

Target:
public void setCommandStatus ( org.ovirt.engine.core.compat.CommandStatus status , boolean updateDB ) { this . commandStatus = status ; if ( updateDB ) { javax.transaction.Transaction transaction = org.ovirt.engine.core.utils.transaction.TransactionSupport.suspend ( ) ; try { org.ovirt.engine.core.bll.tasks.TaskManagerUtil.updateCommandStatus ( getCommandId ( ) , getTaskType ( ) , commandStatus ) ; } finally { org.ovirt.engine.core.utils.transaction.TransactionSupport.resume ( transaction ) ; } } }
Source:
public void testAddIncompleteParameters ( ) throws java.lang.Exception { org.ovirt.engine.api.model.MacPool model = createIncompleteMacPool ( ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; try { collection.add ( model ) ; fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "MacPool" , "add" , getIncompleteFields ( ) ) ; } }

Target:
public void testAddIncompleteParameters ( ) throws java.lang.Exception { org.ovirt.engine.api.model.MacPool model = createIncompleteMacPool ( ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; try { collection.add ( model ) ; org.junit.Assert.fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "MacPool" , "add" , getIncompleteFields ( ) ) ; } }
Source:
public java.util.List getSupportedENGINEsList ( ) { java.util.List resultList = lst ( ) ; resultList.add ( "3.0" ) ; resultList.add ( "3.1" ) ; resultList.add ( "3.2" ) ; resultList.add ( "3.3" ) ; return resultList ; }

Target:
public java.util.List getClusterLevelsList ( ) { java.util.List resultList = lst ( ) ; resultList.add ( "3.0" ) ; resultList.add ( "3.1" ) ; resultList.add ( "3.2" ) ; resultList.add ( "3.3" ) ; resultList.add ( "3.4" ) ; resultList.add ( "3.5" ) ; return resultList ; }
Source:
private java.lang.String getTicket ( org.ovirt.engine.api.model.GraphicsType graphicsTypeEntity ) { final org.ovirt.engine.core.common.queries.GetSignedWebsocketProxyTicketParams params = new org.ovirt.engine.core.common.queries.GetSignedWebsocketProxyTicketParams ( guid , graphicsTypeEntity ) ; final org.ovirt.engine.core.common.queries.VdcQueryReturnValue ticketQueryReturnValue = runQuery ( QueryType.GetSignedWebsocketProxyTicket , params ) ; if ( ! ( ticketQueryReturnValue.getSucceeded ( ) ) ) { try { backendFailure ( ticketQueryReturnValue.getExceptionString ( ) ) ; } catch ( org.ovirt.engine.api.restapi.resource.BackendFailureException ex ) { handleError ( ex , false ) ; } } return ticketQueryReturnValue.getReturnValue ( ) ; }

Target:
private java.lang.String getTicket ( org.ovirt.engine.api.model.GraphicsType graphicsTypeEntity ) { final org.ovirt.engine.core.common.queries.GetSignedWebsocketProxyTicketParams params = new org.ovirt.engine.core.common.queries.GetSignedWebsocketProxyTicketParams ( guid , graphicsTypeEntity ) ; final org.ovirt.engine.core.common.queries.QueryReturnValue ticketQueryReturnValue = runQuery ( QueryType.GetSignedWebsocketProxyTicket , params ) ; if ( ! ( ticketQueryReturnValue.getSucceeded ( ) ) ) { try { backendFailure ( ticketQueryReturnValue.getExceptionString ( ) ) ; } catch ( org.ovirt.engine.api.restapi.resource.BackendFailureException ex ) { handleError ( ex , false ) ; } } return ticketQueryReturnValue.getReturnValue ( ) ; }
Source:
public void getVmSwallowsExceptions ( ) { final org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase b = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.TestAuditLogableBase ( ) ; final org.ovirt.engine.core.common.businessentities.VM v = null ; b.setVm ( v ) ; b.setVmId ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID3 ) ; final org.ovirt.engine.core.common.businessentities.VM vm = b.getVm ( ) ; org.junit.Assert.assertNull ( vm ) ; }

Target:
public void getVmNullId ( ) { final org.ovirt.engine.core.common.businessentities.VM v = null ; b.setVm ( v ) ; b.setVmId ( null ) ; final org.ovirt.engine.core.common.businessentities.VM vm = b.getVm ( ) ; org.junit.Assert.assertNull ( vm ) ; }
Source:
protected java.util.Set < org.ovirt.engine.core.utils.MockConfigRule.MockConfigDescriptor < java.lang.Object > > getExtraConfigDescriptors ( ) { return new java.util.HashSet ( java.util.Arrays.asList ( org.ovirt.engine.core.utils.MockConfigRule.mockConfig ( ConfigValues.ConsoleToggleFullScreenKeys , "shift+f11" ) , org.ovirt.engine.core.utils.MockConfigRule.mockConfig ( ConfigValues.ConsoleReleaseCursorKeys , "shift+f12" ) , org.ovirt.engine.core.utils.MockConfigRule.mockConfig ( ConfigValues.RemapCtrlAltDelDefault , true ) , org.ovirt.engine.core.utils.MockConfigRule.mockConfig ( ConfigValues.FullScreenWebadminDefault , false ) , org.ovirt.engine.core.utils.MockConfigRule.mockConfig ( ConfigValues.EnableSpiceRootCertificateValidation , true ) ) ) ; }

Target:
protected java.util.Set < org.ovirt.engine.core.utils.MockConfigDescriptor < java.lang.Object > > getExtraConfigDescriptors ( ) { return new java.util.HashSet ( java.util.Arrays.asList ( org.ovirt.engine.core.utils.MockConfigDescriptor.of ( ConfigValues.ConsoleToggleFullScreenKeys , "shift+f11" ) , org.ovirt.engine.core.utils.MockConfigDescriptor.of ( ConfigValues.ConsoleReleaseCursorKeys , "shift+f12" ) , org.ovirt.engine.core.utils.MockConfigDescriptor.of ( ConfigValues.RemapCtrlAltDelDefault , true ) , org.ovirt.engine.core.utils.MockConfigDescriptor.of ( ConfigValues.FullScreenWebadminDefault , false ) , org.ovirt.engine.core.utils.MockConfigDescriptor.of ( ConfigValues.EnableSpiceRootCertificateValidation , true ) ) ) ; }
Source:
public void testIsNotLocalFsWithDefaultClusterWhenClusterIsDefault ( ) { storagePool.setstorage_pool_type ( StorageType.LOCALFS ) ; org.mockito.Mockito.doReturn ( true ) . when ( validator ) . containsDefaultCluster ( ) ; org.junit.Assert.assertFalse ( validator.isNotLocalfsWithDefaultCluster ( ) ) ; assertMessages ( VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_POOL_WITH_DEFAULT_VDS_GROUP_CANNOT_BE_LOCALFS ) ; }

Target:
public void testIsNotLocalFsWithDefaultClusterWhenClusterIsDefault ( ) { storagePool.setstorage_pool_type ( StorageType.LOCALFS ) ; org.mockito.Mockito.doReturn ( true ) . when ( validator ) . containsDefaultCluster ( ) ; org.ovirt.engine.core.bll.ValidationResult result = validator.isNotLocalfsWithDefaultCluster ( ) ; org.junit.Assert.assertFalse ( result.isValid ( ) ) ; org.ovirt.engine.core.bll.storage.StoragePoolValidatorTest.assertMessage ( result , VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_POOL_WITH_DEFAULT_VDS_GROUP_CANNOT_BE_LOCALFS ) ; }
Source:
protected boolean checkImageConfiguration ( org.ovirt.engine.core.common.businessentities.storage.DiskImage diskImage ) { return org.ovirt.engine.core.bll.ImagesHandler.checkImageConfiguration ( destStorages.get ( diskInfoDestinationMap.get ( diskImage.getId ( ) ) . getStorageIds ( ) . get ( 0 ) ) . getStorageStaticData ( ) , diskImage , org.ovirt.engine.core.bll.AddVmAndCloneImageCommand.getReturnValue ( ) . getCanDoActionMessages ( ) ) ; }

Target:
protected boolean checkImageConfiguration ( org.ovirt.engine.core.common.businessentities.storage.DiskImage diskImage ) { return org.ovirt.engine.core.bll.storage.disk.image.ImagesHandler.checkImageConfiguration ( destStorages.get ( diskInfoDestinationMap.get ( diskImage.getId ( ) ) . getStorageIds ( ) . get ( 0 ) ) . getStorageStaticData ( ) , diskImage , org.ovirt.engine.core.bll.AddVmAndCloneImageCommand.getReturnValue ( ) . getCanDoActionMessages ( ) ) ; }
Source:
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 > ( ) ; } final java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > storagePoolList = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > ) ( source ) ) ; java.util.Collections.sort ( storagePoolList , new org.ovirt.engine.core.common.businessentities.comparators.NameableComparator ( ) ) ; return source ; }

Target:
public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > ( ) ; } final java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > storagePoolList = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > ) ( source ) ) ; java.util.Collections.sort ( storagePoolList , new org.ovirt.engine.core.common.businessentities.comparators.NameableComparator ( ) ) ; return source ; }
Source:
public void getVmSnapshotList ( 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 ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllVmSnapshotsByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
public void getAllTemplatesFromExportDomain ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , 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 ? source : new java.util.HashMap < org.ovirt.engine.core.common.businessentities.VmTemplate , java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.DiskImage > > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetAllFromExportDomainQueryParameters getAllFromExportDomainQueryParamenters = new org.ovirt.engine.core.common.queries.GetAllFromExportDomainQueryParameters ( storagePoolId , storageDomainId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetTemplatesFromExportDomain , getAllFromExportDomainQueryParamenters , aQuery ) ; }
Source:
private java.lang.String getValue ( ) { org.ovirt.engine.ui.uicommonweb.models.GridTimer.logger.fine ( ( ( ( ( ( ( ( ( isActive ( ) ? "Refresh Status: Active(" : "Inactive(" ) + ( isPaused ( ) ? "paused)" : "running)" ) ) + ":" ) + " Rate: " ) + ( rateCycle [ currentRate ] ) ) + "(" ) + ( ( getRefreshRate ( ) ) / 1000 ) ) + " sec)" ) ) ; return org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getMessages ( ) . refreshInterval ( ( ( getRefreshRate ( ) ) / 1000 ) ) ; }

Target:
public java.lang.String getTimerRefreshStatus ( ) { org.ovirt.engine.ui.uicommonweb.models.GridTimer.logger.fine ( ( ( ( ( ( ( ( ( isActive ( ) ? "Refresh Status: Active(" : "Inactive(" ) + ( isPaused ( ) ? "paused)" : "running)" ) ) + ":" ) + " Rate: " ) + ( rateCycle [ currentRate ] ) ) + "(" ) + ( ( getRefreshRate ( ) ) / 1000 ) ) + " sec)" ) ) ; return org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getMessages ( ) . refreshInterval ( ( ( getRefreshRate ( ) ) / 1000 ) ) ; }
Source:
public static void getDataCenterMaxNameLength ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) . intValue ( ) : 1 ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.StoragePoolNameSizeLimit , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public static 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 ) ; }
Source:
public void isVmNameUnique ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String name , 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.lang.Boolean ) ( source ) ) ) ; } } ; org.ovirt.engine.core.common.queries.NameQueryParameters params = new org.ovirt.engine.core.common.queries.NameQueryParameters ( name ) ; params.setDatacenterId ( datacenterId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.IsVmWithSameNameExist , params , aQuery ) ; }

Target:
public void isVmNameUnique ( org.ovirt.engine.ui.frontend.AsyncQuery < java.lang.Boolean > aQuery , java.lang.String name , org.ovirt.engine.core.compat.Guid datacenterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.Converter < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean convert ( java.lang.Object source ) { return ( source != null ) && ( ! ( ( java.lang.Boolean ) ( source ) ) ) ; } } ; org.ovirt.engine.core.common.queries.NameQueryParameters params = new org.ovirt.engine.core.common.queries.NameQueryParameters ( name ) ; params.setDatacenterId ( datacenterId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.IsVmWithSameNameExist , params , aQuery ) ; }
Source:
public java.lang.Void runInTransaction ( ) { for ( org.ovirt.engine.core.compat.Guid asyncTaskId : getReturnValue ( ) . getTaskPlaceHolderIdList ( ) ) { org.ovirt.engine.core.common.businessentities.AsyncTasks task = org.ovirt.engine.core.bll.tasks.TaskManagerUtil.getAsyncTaskFromDb ( asyncTaskId ) ; if ( ( task != null ) && ( org.ovirt.engine.core.compat.Guid.isNullOrEmpty ( task.getVdsmTaskId ( ) ) ) ) { org.ovirt.engine.core.bll.tasks.TaskManagerUtil.removeTaskFromDbByTaskId ( task.getTaskId ( ) ) ; } } return null ; }

Target:
public java.lang.Void runInTransaction ( ) { for ( org.ovirt.engine.core.compat.Guid asyncTaskId : getReturnValue ( ) . getTaskPlaceHolderIdList ( ) ) { org.ovirt.engine.core.common.businessentities.AsyncTasks task = org.ovirt.engine.core.bll.tasks.CommandCoordinatorUtil.getAsyncTaskFromDb ( asyncTaskId ) ; if ( ( task != null ) && ( org.ovirt.engine.core.compat.Guid.isNullOrEmpty ( task.getVdsmTaskId ( ) ) ) ) { org.ovirt.engine.core.bll.tasks.CommandCoordinatorUtil.removeTaskFromDbByTaskId ( task.getTaskId ( ) ) ; } } return null ; }
Source:
public java.lang.Boolean call ( ) throws java.lang.Exception { if ( ( _managementNetwork ) != null ) { _parser.cliEnvironmentSet ( VdsmEnv.MANAGEMENT_BRIDGE_NAME , _managementNetwork ) ; } else if ( _isLegacyNode ) { _parser.cliEnvironmentSet ( VdsmEnv.MANAGEMENT_BRIDGE_NAME , org.ovirt.engine.core.utils.NetworkUtils.getEngineNetwork ( ) ) ; } else { _parser.cliNoop ( ) ; } return true ; }

Target:
public java.lang.Boolean call ( ) throws java.lang.Exception { if ( ( _managementNetwork ) != null ) { _parser.cliEnvironmentSet ( VdsmEnv.MANAGEMENT_BRIDGE_NAME , _managementNetwork ) ; } else if ( _isLegacyNode ) { _parser.cliEnvironmentSet ( VdsmEnv.MANAGEMENT_BRIDGE_NAME , org.ovirt.engine.core.utils.NetworkUtils.getDefaultManagementNetworkName ( ) ) ; } else { _parser.cliNoop ( ) ; } return true ; }
Source:
public static org.ovirt.engine.core.bll.CommandBase < ? extends org.ovirt.engine.core.common.action.VdcActionParametersBase > [ ] data ( ) { return new org.ovirt.engine.core.bll.CommandBase < ? > [ ] { new org.ovirt.engine.core.bll.CreateSnapshotCommand ( new org.ovirt.engine.core.common.action.ImagesActionsParametersBase ( ) ) , new org.ovirt.engine.core.bll.AddImageFromScratchCommand ( new org.ovirt.engine.core.common.action.AddImageFromScratchParameters ( ) ) , new org.ovirt.engine.core.bll.CreateImageTemplateCommand ( new org.ovirt.engine.core.common.action.CreateImageTemplateParameters ( ) ) , new org.ovirt.engine.core.bll.CreateCloneOfTemplateCommand ( new org.ovirt.engine.core.common.action.CreateCloneOfTemplateParameters ( ) ) } ; }

Target:
protected void initContainerDetails ( org.ovirt.engine.core.common.action.ImagesContainterParametersBase parameters ) { }
Source:
public static void GetVmSnapshotList ( 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 ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllVmSnapshotsByVmId , new org.ovirt.engine.core.common.queries.GetAllVmSnapshotsByVmIdParameters ( id ) , aQuery ) ; }

Target:
public static void GetDiskMaxSize ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) . intValue ( ) : 0 ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.MaxBlockDiskSize , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.ServerConnectionListReturnForXmlRpc getStorageConnectionsList ( java.lang.String spUUID ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.getStorageConnectionsList ( spUUID ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.ServerConnectionListReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.ServerConnectionListReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc add_image_ticket ( java.lang.String ticketId , java.lang.String [ ] ops , long timeout , long size , java.lang.String url ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.add_image_ticket ( ticketId , ops , timeout , size , url ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
public void testGetOperationResult_Empty ( ) { java.util.List < org.ovirt.engine.ui.frontend.communication.VdcOperation < ? , ? > > testOperationList = new java.util.ArrayList < > ( ) ; java.util.List < org.ovirt.engine.ui.frontend.communication.VdcOperation < ? , ? > > allOperationList = new java.util.ArrayList < > ( ) ; java.util.List < ? > allResults = new java.util.ArrayList < > ( ) ; java.util.List < ? > result = testProvider.getOperationResult ( testOperationList , allOperationList , allResults ) ; org.junit.Assert.assertEquals ( "Result should have no results" , 0 , result.size ( ) ) ; }

Target:
public void testGetOperationResult_Empty ( ) { java.util.List < org.ovirt.engine.ui.frontend.communication.VdcOperation < ? , ? > > testOperationList = new java.util.ArrayList < > ( ) ; java.util.List < org.ovirt.engine.ui.frontend.communication.VdcOperation < ? , ? > > allOperationList = new java.util.ArrayList < > ( ) ; java.util.List < ? > allResults = new java.util.ArrayList < > ( ) ; java.util.List < ? > result = testProvider.getOperationResult ( testOperationList , allOperationList , allResults ) ; org.junit.jupiter.api.Assertions.assertEquals ( 0 , result.size ( ) , "Result should have no results" ) ; }
Source:
public void testValidBond ( ) { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface vdsNetworkInterface = createVdsNetworkInterfaceWithName ( ) ; vdsNetworkInterface.setBonded ( false ) ; org.ovirt.engine.core.bll.validator.HostInterfaceValidator validator = new org.ovirt.engine.core.bll.validator.HostInterfaceValidator ( vdsNetworkInterface ) ; org.junit.Assert.assertThat ( validator.validBond ( java.util.Collections.emptyList ( ) ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }

Target:
public void testValidBond ( ) { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface vdsNetworkInterface = createVdsNetworkInterfaceWithName ( ) ; vdsNetworkInterface.setBonded ( false ) ; org.ovirt.engine.core.bll.validator.HostInterfaceValidator validator = new org.ovirt.engine.core.bll.validator.HostInterfaceValidator ( vdsNetworkInterface ) ; org.hamcrest.MatcherAssert.assertThat ( validator.validBond ( java.util.Collections.emptyList ( ) ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }
Source:
private void updateSmartCardDevices ( ) { if ( ( org.ovirt.engine.core.bll.AddVmCommand.getVm ( ) . isSmartcardEnabled ( ) ) != ( org.ovirt.engine.core.bll.AddVmCommand.getVmTemplate ( ) . isSmartcardEnabled ( ) ) ) { org.ovirt.engine.core.bll.utils.VmDeviceUtils.updateSmartcardDevice ( org.ovirt.engine.core.bll.AddVmCommand.getVm ( ) . getId ( ) , org.ovirt.engine.core.bll.AddVmCommand.getVm ( ) . isSmartcardEnabled ( ) ) ; } }

Target:
private void updateSmartCardDevices ( ) { boolean smartcardOnDeviceSource = ( ( org.ovirt.engine.core.bll.AddVmCommand.getInstanceTypeId ( ) ) != null ) ? org.ovirt.engine.core.bll.AddVmCommand.getInstanceType ( ) . isSmartcardEnabled ( ) : org.ovirt.engine.core.bll.AddVmCommand.getVmTemplate ( ) . isSmartcardEnabled ( ) ; if ( ( org.ovirt.engine.core.bll.AddVmCommand.getVm ( ) . isSmartcardEnabled ( ) ) != smartcardOnDeviceSource ) { org.ovirt.engine.core.bll.utils.VmDeviceUtils.updateSmartcardDevice ( org.ovirt.engine.core.bll.AddVmCommand.getVm ( ) . getId ( ) , org.ovirt.engine.core.bll.AddVmCommand.getVm ( ) . isSmartcardEnabled ( ) ) ; } }
Source:
public void onPowerringUp ( ) { decreasePendingVm ( vmStaticDao.get ( org.ovirt.engine.core.bll.RunVmCommand.getVmId ( ) ) ) ; }

Target:
protected boolean isVmPartOfManualPool ( ) { if ( ( org.ovirt.engine.core.bll.RunVmCommand.getVm ( ) . getVmPoolId ( ) ) == null ) { return false ; } final org.ovirt.engine.core.common.businessentities.VmPool vmPool = vmPoolDao.get ( org.ovirt.engine.core.bll.RunVmCommand.getVm ( ) . getVmPoolId ( ) ) ; return vmPool.getVmPoolType ( ) . equals ( VmPoolType.MANUAL ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.VM readVmFromOvf ( java.lang.String ovf ) { try { return new org.ovirt.engine.core.bll.OvfHelper ( ) . readVmFromOvf ( ovf ) ; } catch ( org.ovirt.engine.core.utils.ovf.OvfReaderException e ) { org.ovirt.engine.core.bll.ConvertVmCommand.log.debug ( ( "failed to parse a given ovf configuration: \n " + ovf ) , e ) ; auditLog ( this , AuditLogType.IMPORTEXPORT_INVALID_OVF ) ; throw new org.ovirt.engine.core.common.errors.VdcBLLException ( ) ; } }

Target:
private org.ovirt.engine.core.common.businessentities.VM readVmFromOvf ( java.lang.String ovf ) { try { return new org.ovirt.engine.core.bll.OvfHelper ( ) . readVmFromOvf ( ovf ) ; } catch ( org.ovirt.engine.core.utils.ovf.OvfReaderException e ) { org.ovirt.engine.core.bll.ConvertVmCommand.log.debug ( ( "failed to parse a given ovf configuration: \n " + ovf ) , e ) ; auditLog ( this , AuditLogType.IMPORTEXPORT_INVALID_OVF ) ; throw new org.ovirt.engine.core.common.errors.EngineException ( ) ; } }
Source:
public static org.ovirt.optimizer.service.ClusterOptimizer optimizeCluster ( org.ovirt.optimizer.service.OvirtClient client , final java.lang.String clusterId , int maxSteps , org.ovirt.optimizer.service.ClusterOptimizer.Finished finishedCallback ) { org.ovirt.optimizer.service.ClusterOptimizer optimizer = new org.ovirt.optimizer.service.ClusterOptimizer ( clusterId , maxSteps , finishedCallback ) ; org.ovirt.optimizer.service.ClusterInfoUpdater updater = new org.ovirt.optimizer.service.ClusterInfoUpdater ( client , clusterId ) ; optimizer.registerUpdater ( updater , new org.ovirt.optimizer.service.ClusterUpdateAvailableForOptimizer ( clusterId , optimizer.getSolver ( ) ) ) ; return optimizer ; }

Target:
public static org.ovirt.optimizer.service.ClusterOptimizer optimizeCluster ( org.ovirt.optimizer.service.OvirtClient client , org.ovirt.optimizer.util.ConfigProvider configProvider , final java.lang.String clusterId , int maxSteps , org.ovirt.optimizer.service.ClusterOptimizer.Finished finishedCallback ) { long timeout = ( java.lang.Integer.valueOf ( configProvider.load ( ) . getConfig ( ) . getProperty ( ConfigProvider.SOLVER_TIMEOUT ) ) ) * 1000 ; org.ovirt.optimizer.service.ClusterOptimizer optimizer = new org.ovirt.optimizer.service.ClusterOptimizer ( clusterId , maxSteps , timeout , finishedCallback ) ; org.ovirt.optimizer.service.ClusterInfoUpdater updater = new org.ovirt.optimizer.service.ClusterInfoUpdater ( client , configProvider , clusterId ) ; optimizer.registerUpdater ( updater , new org.ovirt.optimizer.service.ClusterUpdateAvailableForOptimizer ( clusterId , optimizer.getSolver ( ) ) ) ; return optimizer ; }
Source:
public int hashCode ( ) { final int prime = 31 ; int result = super . hashCode ( ) ; result = ( prime * result ) + ( ( getCompatibilityVersion ( ) ) == null ? 0 : getCompatibilityVersion ( ) . hashCode ( ) ) ; result = ( prime * result ) + ( ( getStoragePoolName ( ) ) == null ? 0 : getStoragePoolName ( ) . hashCode ( ) ) ; return result ; }

Target:
public int hashCode ( ) { final int prime = 31 ; int result = super . hashCode ( ) ; result = ( prime * result ) + ( ( getCompatibilityVersion ( ) ) == null ? 0 : getCompatibilityVersion ( ) . hashCode ( ) ) ; result = ( prime * result ) + ( ( getDataCenterName ( ) ) == null ? 0 : getDataCenterName ( ) . hashCode ( ) ) ; return result ; }
Source:
public static java.util.ArrayList < org.ovirt.engine.core.common.businessentities.LUNs > ParseLUNList ( java.util.Map < java.lang.String , java.lang.Object > [ ] lunList ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.LUNs > result = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.LUNs > ( lunList.length ) ; for ( java.util.Map < java.lang.String , java.lang.Object > xlun : lunList ) { result.add ( org.ovirt.engine.core.vdsbroker.vdsbroker.GetDeviceListVDSCommand.ParseLunFromXmlRpc ( xlun ) ) ; } return result ; }

Target:
public static java.util.ArrayList < org.ovirt.engine.core.common.businessentities.LUNs > parseLUNList ( java.util.Map < java.lang.String , java.lang.Object > [ ] lunList ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.LUNs > result = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.LUNs > ( lunList.length ) ; for ( java.util.Map < java.lang.String , java.lang.Object > xlun : lunList ) { result.add ( org.ovirt.engine.core.vdsbroker.vdsbroker.GetDeviceListVDSCommand.parseLunFromXmlRpc ( xlun ) ) ; } return result ; }
Source:
private void handleAddPermissions ( java.lang.String domainName , org.ovirt.engine.core.domains.DomainsConfigurationEntry adUserNameEntry , org.ovirt.engine.core.domains.DomainsConfigurationEntry adUserIdEntry ) { if ( addPermissions ) { updatePermissionsTable ( adUserNameEntry , adUserIdEntry ) ; } else if ( ! ( userHasPermissions ( adUserNameEntry , adUserIdEntry ) ) ) { java.lang.System.out.println ( java.lang.String.format ( INFO_ABOUT_NOT_ADDING_PERMISSIONS , domainName ) ) ; } }

Target:
private void handleAddPermissions ( java.lang.String domainName , java.lang.String userName , java.lang.String userId ) { if ( addPermissions ) { updatePermissionsTable ( userName , domainName , userId ) ; } else if ( ! ( userHasPermissions ( userName , domainName ) ) ) { java.lang.System.out.println ( java.lang.String.format ( INFO_ABOUT_NOT_ADDING_PERMISSIONS , domainName ) ) ; } }
Source:
public void testNetworksOnNicMatchMtuIgnoreMtuDifferenceWhenBothNetworksAreVmNetworks ( ) throws java.lang.Exception { java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > networks = java.util.Arrays.asList ( createNetwork ( 1 , true ) , createNetwork ( 2 , true ) ) ; java.util.Map < java.lang.String , java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > > networksOnNics = java.util.Collections.singletonMap ( "nicName" , networks ) ; org.ovirt.engine.core.bll.network.host.NetworkMtuValidator networkMtuValidator = new org.ovirt.engine.core.bll.network.host.NetworkMtuValidator ( new org.ovirt.engine.core.common.businessentities.BusinessEntityMap ( networks ) ) ; org.junit.Assert.assertThat ( networkMtuValidator.validateMtu ( networksOnNics ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }

Target:
public void testNetworksOnNicMatchMtuIgnoreMtuDifferenceWhenBothNetworksAreVmNetworks ( ) throws java.lang.Exception { java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > networks = java.util.Arrays.asList ( createNetwork ( 1 , true , "netA" ) , createNetwork ( 2 , true , "netB" ) ) ; java.util.Map < java.lang.String , java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > > networksOnNics = java.util.Collections.singletonMap ( "nicName" , networks ) ; org.ovirt.engine.core.bll.network.host.NetworkMtuValidator networkMtuValidator = new org.ovirt.engine.core.bll.network.host.NetworkMtuValidator ( new org.ovirt.engine.core.common.businessentities.BusinessEntityMap ( networks ) ) ; org.junit.Assert.assertThat ( networkMtuValidator.validateMtu ( networksOnNics ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }
Source:
public void getAllAttachableDisks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , 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 != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.Disk > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.Disk > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetAllAttachableDisksForVmQueryParameters params = new org.ovirt.engine.core.common.queries.GetAllAttachableDisksForVmQueryParameters ( storagePoolId ) ; params.setVmId ( vmId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllAttachableDisksForVm , params , aQuery ) ; }

Target:
public void getVmsRunningOnOrMigratingToVds ( 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 ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmsRunningOnOrMigratingToVds , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
public void testGetIncludeStatistics ( ) throws java.lang.Exception { try { accepts.add ( "application/xml; detail=statistics" ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpGetEntityExpectations ( 1 ) ; setUpGetPayloadExpectations ( 0 , 1 ) ; setUpGetBallooningExpectations ( ) ; setUpGetGraphicsExpectations ( 1 ) ; control.replay ( ) ; org.ovirt.engine.api.model.VM vm = resource.get ( ) ; assertTrue ( vm.isSetStatistics ( ) ) ; verifyModel ( vm , 0 ) ; } finally { accepts.clear ( ) ; } }

Target:
public void testGetIncludeStatistics ( ) throws java.lang.Exception { try { accepts.add ( "application/xml; detail=statistics" ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpGetEntityExpectations ( 1 ) ; setUpGetPayloadExpectations ( 0 , 1 ) ; setUpGetBallooningExpectations ( ) ; setUpGetGraphicsExpectations ( 1 ) ; control.replay ( ) ; org.ovirt.engine.api.model.Vm vm = resource.get ( ) ; assertTrue ( vm.isSetStatistics ( ) ) ; verifyModel ( vm , 0 ) ; } finally { accepts.clear ( ) ; } }
Source:
private boolean shouldUpdateImageProperties ( ) { return ( ( getOldDisk ( ) . getDiskStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.Disk.DiskStorageType.IMAGE ) ) && ( ! ( ( ( org.ovirt.engine.core.common.businessentities.DiskImage ) ( getOldDisk ( ) ) ) . getQuotaId ( ) . equals ( getQuotaId ( ) ) ) ) ; }

Target:
private boolean shouldUpdateImageProperties ( ) { if ( ( getOldDisk ( ) . getDiskStorageType ( ) ) != ( org.ovirt.engine.core.common.businessentities.Disk.DiskStorageType.IMAGE ) ) { return false ; } org.ovirt.engine.core.compat.Guid oldQuotaId = ( ( org.ovirt.engine.core.common.businessentities.DiskImage ) ( getOldDisk ( ) ) ) . getQuotaId ( ) ; return ! ( java.util.Objects.equals ( oldQuotaId , getQuotaId ( ) ) ) ; }