auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private static org.ovirt.engine.core.common.queries.VmIconIdSizePair ensureIconsInDatabase ( java.lang.String osName ) { final org.ovirt.engine.core.compat.Guid smallIconId = org.ovirt.engine.core.bll.IconLoader.ensureIconInDatabase ( org.ovirt.engine.core.bll.IconLoader.SMALL_ICON_DIR , osName ) ; final org.ovirt.engine.core.compat.Guid largeIconId = org.ovirt.engine.core.bll.IconLoader.ensureIconInDatabase ( org.ovirt.engine.core.bll.IconLoader.LARGE_ICON_DIR , osName ) ; if ( ( smallIconId != null ) && ( largeIconId != null ) ) { return new org.ovirt.engine.core.common.queries.VmIconIdSizePair ( smallIconId , largeIconId ) ; } return null ; }

Target:
private org.ovirt.engine.core.common.queries.VmIconIdSizePair ensureIconsInDatabase ( java.lang.String osName ) { final org.ovirt.engine.core.compat.Guid smallIconId = ensureIconInDatabase ( org.ovirt.engine.core.bll.IconLoader.SMALL_ICON_DIR , osName ) ; final org.ovirt.engine.core.compat.Guid largeIconId = ensureIconInDatabase ( org.ovirt.engine.core.bll.IconLoader.LARGE_ICON_DIR , osName ) ; if ( ( smallIconId != null ) && ( largeIconId != null ) ) { return new org.ovirt.engine.core.common.queries.VmIconIdSizePair ( smallIconId , largeIconId ) ; } return null ; }
Source:
private org.ovirt.engine.core.common.action.CloneCinderDisksParameters buildCinderChildCommandParameters ( java.util.List < org.ovirt.engine.core.common.businessentities.storage.CinderDisk > cinderDisks , org.ovirt.engine.core.compat.Guid newSnapshotId ) { org.ovirt.engine.core.common.action.CloneCinderDisksParameters createParams = new org.ovirt.engine.core.common.action.CloneCinderDisksParameters ( ) ; createParams.setCinderDisks ( cinderDisks ) ; createParams.setVmSnapshotId ( newSnapshotId ) ; createParams.setParentHasTasks ( ( ! ( org.ovirt.engine.core.bll.TryBackToAllSnapshotsOfVmCommand.getReturnValue ( ) . getVdsmTaskIdList ( ) . isEmpty ( ) ) ) ) ; return withRootCommandInfo ( createParams , org.ovirt.engine.core.bll.TryBackToAllSnapshotsOfVmCommand.getActionType ( ) ) ; }

Target:
private org.ovirt.engine.core.common.action.CloneCinderDisksParameters buildCinderChildCommandParameters ( java.util.List < org.ovirt.engine.core.common.businessentities.storage.CinderDisk > cinderDisks , org.ovirt.engine.core.compat.Guid newSnapshotId ) { org.ovirt.engine.core.common.action.CloneCinderDisksParameters createParams = new org.ovirt.engine.core.common.action.CloneCinderDisksParameters ( ) ; createParams.setCinderDisks ( cinderDisks ) ; createParams.setVmSnapshotId ( newSnapshotId ) ; return withRootCommandInfo ( createParams , org.ovirt.engine.core.bll.TryBackToAllSnapshotsOfVmCommand.getActionType ( ) ) ; }
Source:
public void updateSortOptions ( java.lang.String sortBy , boolean sortAscending ) { if ( ! ( supportsServerSideSorting ( ) ) ) { return ; } boolean shouldRefresh = ( ! ( org.ovirt.engine.core.common.utils.ObjectUtils.objectsEqual ( this . sortBy , sortBy ) ) ) || ( ( this . sortAscending ) != sortAscending ) ; this . sortBy = sortBy ; this . sortAscending = sortAscending ; if ( shouldRefresh ) { refresh ( ) ; } }

Target:
public void updateSortOptions ( java.lang.String sortBy , boolean sortAscending ) { boolean shouldRefresh = ( ! ( org.ovirt.engine.core.common.utils.ObjectUtils.objectsEqual ( this . sortBy , sortBy ) ) ) || ( ( this . sortAscending ) != sortAscending ) ; this . sortBy = sortBy ; this . sortAscending = sortAscending ; if ( shouldRefresh ) { refresh ( ) ; } }
Source:
protected void executeCommand ( ) { org.ovirt.engine.core.common.businessentities.VDSGroup vdsGroup = org.ovirt.engine.core.bll.InitVdsOnUpCommand.getVdsGroup ( ) ; if ( vdsGroup.supportsVirtService ( ) ) { org.ovirt.engine.core.bll.InitVdsOnUpCommand.setSucceeded ( initVirtResources ( ) ) ; } if ( vdsGroup.supportsGlusterService ( ) ) { org.ovirt.engine.core.bll.InitVdsOnUpCommand.setSucceeded ( initGlusterPeerProcess ( ) ) ; } }

Target:
protected void executeCommand ( ) { org.ovirt.engine.core.common.businessentities.VDSGroup vdsGroup = getVdsGroup ( ) ; if ( vdsGroup.supportsVirtService ( ) ) { setSucceeded ( initVirtResources ( ) ) ; } if ( vdsGroup.supportsGlusterService ( ) ) { setSucceeded ( initGlusterPeerProcess ( ) ) ; } }
Source:
public void clusterWithNoCpu ( ) { createCommandWithNoCpuName ( ) ; org.mockito.Mockito.when ( clusterDao.get ( org.mockito.ArgumentMatchers.any ( ) ) ) . thenReturn ( org.ovirt.engine.core.bll.UpdateClusterCommandTest.createClusterWithNoCpuName ( ) ) ; org.mockito.Mockito.when ( glusterVolumeDao.getByClusterId ( org.mockito.ArgumentMatchers.any ( ) ) ) . thenReturn ( new java.util.ArrayList < > ( ) ) ; allQueriesForVms ( ) ; initAndAssertValidation ( true ) ; }

Target:
public void clusterWithNoCpu ( ) { createCommandWithNoCpuName ( ) ; org.mockito.Mockito.when ( clusterDao.get ( org.mockito.ArgumentMatchers.any ( ) ) ) . thenReturn ( org.ovirt.engine.core.bll.UpdateClusterCommandTest.createClusterWithNoCpuName ( ) ) ; initAndAssertValidation ( true ) ; }
Source:
public void setUp ( ) { org.mockito.Mockito.when ( spDao.get ( org.mockito.ArgumentMatchers.any ( ) ) ) . thenReturn ( org.ovirt.engine.core.bll.storage.pool.UpdateStoragePoolCommandTest.createStoragePool ( ) ) ; org.mockito.Mockito.when ( clusterDao.getAllForStoragePool ( org.mockito.ArgumentMatchers.any ( ) ) ) . thenReturn ( org.ovirt.engine.core.bll.storage.pool.UpdateStoragePoolCommandTest.createClusterList ( ) ) ; poolValidator = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.validator.storage.StoragePoolValidator ( cmd.getStoragePool ( ) ) ) ; org.mockito.Mockito.doReturn ( ValidationResult.VALID ) . when ( poolValidator ) . isNotLocalfsWithDefaultCluster ( ) ; org.mockito.Mockito.doReturn ( poolValidator ) . when ( cmd ) . createStoragePoolValidator ( ) ; }

Target:
public void setUp ( ) { org.mockito.Mockito.when ( spDao.get ( org.mockito.ArgumentMatchers.any ( ) ) ) . thenReturn ( org.ovirt.engine.core.bll.storage.pool.UpdateStoragePoolCommandTest.createStoragePool ( ) ) ; org.mockito.Mockito.when ( clusterDao.getAllForStoragePool ( org.mockito.ArgumentMatchers.any ( ) ) ) . thenReturn ( org.ovirt.engine.core.bll.storage.pool.UpdateStoragePoolCommandTest.createClusterList ( ) ) ; org.mockito.Mockito.doReturn ( poolValidator ) . when ( cmd ) . createStoragePoolValidator ( ) ; }
Source:
private void processOutgoing ( ) throws java.io.IOException , org.ovirt.vdsm.jsonrpc.client.ClientConnectionException { final java.nio.ByteBuffer buff = outbox.peekLast ( ) ; if ( buff == null ) { return ; } writeBuffer ( buff ) ; if ( ! ( buff.hasRemaining ( ) ) ) { outbox.removeLast ( ) ; } updateInterestedOps ( ) ; }

Target:
protected void processOutgoing ( ) throws java.io.IOException , org.ovirt.vdsm.jsonrpc.client.ClientConnectionException { final java.nio.ByteBuffer buff = outbox.peekLast ( ) ; if ( buff == null ) { return ; } writeBuffer ( buff ) ; if ( ! ( buff.hasRemaining ( ) ) ) { outbox.removeLast ( ) ; } updateInterestedOps ( ) ; }
Source:
protected org.ovirt.engine.core.common.vdscommands.VDSParametersBase getVDSParameters ( ) { return new org.ovirt.engine.core.common.vdscommands.TargetDomainImageGroupVDSCommandParameters ( getEnclosingCommand ( ) . getParameters ( ) . getStoragePoolId ( ) . getValue ( ) , getEnclosingCommand ( ) . getParameters ( ) . getSourceStorageDomainId ( ) , getEnclosingCommand ( ) . getParameters ( ) . getImageGroupID ( ) , getEnclosingCommand ( ) . getParameters ( ) . getTargetStorageDomainId ( ) ) ; }

Target:
protected org.ovirt.engine.core.common.vdscommands.VDSParametersBase getVDSParameters ( ) { return new org.ovirt.engine.core.common.vdscommands.TargetDomainImageGroupVDSCommandParameters ( getEnclosingCommand ( ) . getParameters ( ) . getStoragePoolId ( ) , getEnclosingCommand ( ) . getParameters ( ) . getSourceStorageDomainId ( ) , getEnclosingCommand ( ) . getParameters ( ) . getImageGroupID ( ) , getEnclosingCommand ( ) . getParameters ( ) . getTargetStorageDomainId ( ) ) ; }
Source:
private void mockStorageDomainDAO ( java.util.List < org.ovirt.engine.core.common.businessentities.storage_domains > storageDomains ) { org.mockito.Mockito.when ( dbFacada.getStorageDomainDAO ( ) ) . thenReturn ( storageDomainDAO ) ; for ( org.ovirt.engine.core.common.businessentities.storage_domains storageDomain : storageDomains ) { org.mockito.Mockito.when ( storageDomainDAO.getForStoragePool ( storageDomain.getId ( ) , storagePoolId ) ) . thenReturn ( storageDomain ) ; } }

Target:
private void mockStorageDomainDAO ( java.util.List < org.ovirt.engine.core.common.businessentities.storage_domains > storageDomains ) { org.mockito.Mockito.doReturn ( storageDomainDAO ) . when ( command ) . getStorageDomainDAO ( ) ; for ( org.ovirt.engine.core.common.businessentities.storage_domains storageDomain : storageDomains ) { org.mockito.Mockito.when ( storageDomainDAO.getForStoragePool ( storageDomain.getId ( ) , storagePoolId ) ) . thenReturn ( storageDomain ) ; } }
Source:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.storage.SanStorageModelBase model = ( ( org.ovirt.engine.ui.uicommonweb.models.storage.SanStorageModelBase ) ( target ) ) ; java.lang.Object result = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ; model.postDiscoverTargetsInternal ( ( result != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageServerConnections > ) ( result ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageServerConnections > ( ) ) ) ; }

Target:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { java.lang.Object result = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ; model.postDiscoverTargetsInternal ( ( result != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageServerConnections > ) ( result ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageServerConnections > ( ) ) ) ; }
Source:
public static void getClusterNetworkList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { if ( ( aQuery.converterCallback ) == null ) { 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.network.Network > ( ) ; } return source ; } } ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllNetworksByClusterId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( clusterId ) , aQuery ) ; }

Target:
public void getClusterNetworkList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { if ( ( aQuery.converterCallback ) == null ) { 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.network.Network > ( ) ; } return source ; } } ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllNetworksByClusterId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( clusterId ) , aQuery ) ; }
Source:
public org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeSnapshotConfig getConfigByVolumeIdAndName ( org.ovirt.engine.core.compat.Guid clusterId , org.ovirt.engine.core.compat.Guid volumeId , java.lang.String paramName ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeSnapshotConfig config = getCallsHandler ( ) . executeRead ( "GetGlusterVolumeSnapshotConfigByVolumeIdAndName" , org.ovirt.engine.core.dao.gluster.GlusterVolumeSnapshotConfigDaoImpl.snapshotConfigRowMapper , getCustomMapSqlParameterSource ( ) . addValue ( "cluster_id" , clusterId ) . addValue ( "volume_id" , volumeId ) . addValue ( "param_name" , paramName ) ) ; return config ; }

Target:
public org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeSnapshotConfig getConfigByVolumeIdAndName ( org.ovirt.engine.core.compat.Guid clusterId , org.ovirt.engine.core.compat.Guid volumeId , java.lang.String paramName ) { return getCallsHandler ( ) . executeRead ( "GetGlusterVolumeSnapshotConfigByVolumeIdAndName" , org.ovirt.engine.core.dao.gluster.GlusterVolumeSnapshotConfigDaoImpl.snapshotConfigRowMapper , getCustomMapSqlParameterSource ( ) . addValue ( "cluster_id" , clusterId ) . addValue ( "volume_id" , volumeId ) . addValue ( "param_name" , paramName ) ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.storage_pool mockStoragePool ( org.ovirt.engine.core.compat.Version compatibilityVersion ) { org.ovirt.engine.core.compat.Guid storagePoolId = org.ovirt.engine.core.compat.Guid.NewGuid ( ) ; org.ovirt.engine.core.common.businessentities.storage_pool storagePool = new org.ovirt.engine.core.common.businessentities.storage_pool ( ) ; storagePool.setId ( storagePoolId ) ; storagePool.setcompatibility_version ( compatibilityVersion ) ; storagePool.setstatus ( StoragePoolStatus.Up ) ; org.mockito.Mockito.when ( storagePoolDAO.get ( storagePoolId ) ) . thenReturn ( storagePool ) ; return storagePool ; }

Target:
private org.ovirt.engine.core.common.businessentities.StoragePool mockStoragePool ( org.ovirt.engine.core.compat.Version compatibilityVersion ) { org.ovirt.engine.core.compat.Guid storagePoolId = org.ovirt.engine.core.compat.Guid.NewGuid ( ) ; org.ovirt.engine.core.common.businessentities.StoragePool storagePool = new org.ovirt.engine.core.common.businessentities.StoragePool ( ) ; storagePool.setId ( storagePoolId ) ; storagePool.setcompatibility_version ( compatibilityVersion ) ; storagePool.setstatus ( StoragePoolStatus.Up ) ; org.mockito.Mockito.when ( storagePoolDAO.get ( storagePoolId ) ) . thenReturn ( storagePool ) ; return storagePool ; }
Source:
private void updateVmStatus ( org.ovirt.engine.core.common.businessentities.VMStatus newStatus ) { org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInNewTransaction ( new org.ovirt.engine.core.utils.transaction.TransactionMethod < java.lang.Void > ( ) { @ java.lang.Override public java.lang.Void runInTransaction ( ) { getCompensationContext ( ) . snapshotEntityStatus ( getVm ( ) . getDynamicData ( ) , getVm ( ) . getstatus ( ) ) ; updateVmData ( getVm ( ) . getDynamicData ( ) ) ; getCompensationContext ( ) . stateChanged ( ) ; return null ; } } ) ; }

Target:
private void updateVmStatus ( org.ovirt.engine.core.common.businessentities.VMStatus newStatus ) { org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInNewTransaction ( new org.ovirt.engine.core.utils.transaction.TransactionMethod < java.lang.Void > ( ) { @ java.lang.Override public java.lang.Void runInTransaction ( ) { getCompensationContext ( ) . snapshotEntityStatus ( getVm ( ) . getDynamicData ( ) , getVm ( ) . getStatus ( ) ) ; updateVmData ( getVm ( ) . getDynamicData ( ) ) ; getCompensationContext ( ) . stateChanged ( ) ; return null ; } } ) ; }
Source:
protected void executeVdsBrokerCommand ( ) { java.util.List < java.lang.String > vmIds = org.ovirt.engine.core.vdsbroker.vdsbroker.FullListVDSCommand.getParameters ( ) . getVmIds ( ) ; java.lang.String [ ] vmIdsArray = vmIds.toArray ( new java.lang.String [ vmIds.size ( ) ] ) ; fullVmListReturn = org.ovirt.engine.core.vdsbroker.vdsbroker.FullListVDSCommand.getBroker ( ) . fullList ( vmIdsArray ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.FullListVDSCommand.proceedProxyReturnValue ( ) ; java.util.Map < java.lang.String , java.lang.Object > [ ] struct = fullVmListReturn.vmList ; org.ovirt.engine.core.vdsbroker.vdsbroker.FullListVDSCommand.setReturnValue ( struct ) ; }

Target:
protected void executeVdsBrokerCommand ( ) { fullVmListReturn = org.ovirt.engine.core.vdsbroker.vdsbroker.FullListVDSCommand.getBroker ( ) . fullList ( org.ovirt.engine.core.vdsbroker.vdsbroker.FullListVDSCommand.getParameters ( ) . getVmIds ( ) ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.FullListVDSCommand.proceedProxyReturnValue ( ) ; java.util.Map < java.lang.String , java.lang.Object > [ ] struct = fullVmListReturn.vmList ; org.ovirt.engine.core.vdsbroker.vdsbroker.FullListVDSCommand.setReturnValue ( struct ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.storage.DiskImage createDiskImage ( ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage disk = new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ; disk.setId ( diskId ) ; java.util.Collections.singletonList ( storageId ) ; disk.setStorageIds ( new java.util.ArrayList ( java.util.Collections.singletonList ( storageId ) ) ) ; return disk ; }

Target:
private org.ovirt.engine.core.common.businessentities.storage.DiskImage createDiskImage ( ) { disk = new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ; disk.setId ( diskId ) ; java.util.Collections.singletonList ( storageId ) ; disk.setStorageIds ( new java.util.ArrayList ( java.util.Collections.singletonList ( storageId ) ) ) ; return disk ; }
Source:
public void testUpdateBrickTask ( ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity existingBrick = dao.getById ( FixturesTool.GLUSTER_BRICK_UUID1 ) ; org.ovirt.engine.core.common.asynctasks.gluster.GlusterAsyncTask asyncTask = new org.ovirt.engine.core.common.asynctasks.gluster.GlusterAsyncTask ( ) ; asyncTask.setTaskId ( new org.ovirt.engine.core.compat.Guid ( "61c94fc7-26b0-43e3-9d26-fc9d8cd6a763" ) ) ; org.junit.Assert.assertNotNull ( existingBrick ) ; org.junit.Assert.assertEquals ( GlusterStatus.UP , existingBrick.getStatus ( ) ) ; dao.updateBrickTask ( existingBrick.getId ( ) , FixturesTool.GLUSTER_ASYNC_TASK_ID1 ) ; org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity newEnity = dao.getById ( FixturesTool.GLUSTER_BRICK_UUID1 ) ; org.junit.Assert.assertEquals ( FixturesTool.GLUSTER_ASYNC_TASK_ID1 , newEnity.getAsyncTask ( ) . getTaskId ( ) ) ; }

Target:
public void testUpdateBrickTask ( ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity existingBrick = dao.getById ( FixturesTool.GLUSTER_BRICK_UUID1 ) ; org.ovirt.engine.core.common.asynctasks.gluster.GlusterAsyncTask asyncTask = new org.ovirt.engine.core.common.asynctasks.gluster.GlusterAsyncTask ( ) ; asyncTask.setTaskId ( FixturesTool.GLUSTER_ASYNC_TASK_ID1 ) ; org.junit.Assert.assertNotNull ( existingBrick ) ; org.junit.Assert.assertEquals ( GlusterStatus.UP , existingBrick.getStatus ( ) ) ; dao.updateBrickTask ( existingBrick.getId ( ) , FixturesTool.GLUSTER_ASYNC_TASK_ID1 ) ; org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity newEnity = dao.getById ( FixturesTool.GLUSTER_BRICK_UUID1 ) ; org.junit.Assert.assertEquals ( FixturesTool.GLUSTER_ASYNC_TASK_ID1 , newEnity.getAsyncTask ( ) . getTaskId ( ) ) ; }
Source:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel ) ( target ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VDSGroup > clusters = ( ( java.util.List < org.ovirt.engine.core.common.businessentities.VDSGroup > ) ( returnValue ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VDSGroup > filteredClusters = org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.filterByArchitecture ( clusters , vm.getClusterArch ( ) ) ; model.setDataCentersAndClusters ( model , dataCenters , filteredClusters , vm.getVdsGroupId ( ) ) ; initTemplate ( ) ; initCdImage ( ) ; initSoundCard ( vm.getId ( ) ) ; }

Target:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel ) ( target ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VDSGroup > clusters = ( ( java.util.List < org.ovirt.engine.core.common.businessentities.VDSGroup > ) ( returnValue ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VDSGroup > filteredClusters = org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.filterByArchitecture ( clusters , vm.getClusterArch ( ) ) ; model.setDataCentersAndClusters ( model , dataCenters , filteredClusters , vm.getVdsGroupId ( ) ) ; initTemplate ( ) ; initCdImage ( ) ; }
Source:
private static void addAddress ( org.ovirt.engine.core.common.businessentities.VmDevice vmDevice , org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcStruct struct ) { java.util.Map < java.lang.String , java.lang.String > addressMap = org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcStringUtils.string2Map ( vmDevice.getAddress ( ) ) ; if ( ( addressMap.size ( ) ) > 0 ) { struct.add ( VdsProperties.Address , addressMap ) ; } }

Target:
private static void addAddress ( org.ovirt.engine.core.common.businessentities.VmDevice vmDevice , java.util.Map < java.lang.String , java.lang.Object > struct ) { java.util.Map < java.lang.String , java.lang.String > addressMap = org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcStringUtils.string2Map ( vmDevice.getAddress ( ) ) ; if ( ( addressMap.size ( ) ) > 0 ) { struct.put ( VdsProperties.Address , addressMap ) ; } }
Source:
protected void endSuccessfully ( ) { org.ovirt.engine.core.compat.Guid createdDiskId = ( ( org.ovirt.engine.core.compat.Guid ) ( org.ovirt.engine.core.bll.storage.ovfstore.CreateOvfVolumeForStorageDomainCommand.getActionReturnValue ( ) ) ) ; endChildCommand ( true ) ; org.ovirt.engine.core.common.businessentities.StorageDomainOvfInfo storageDomainOvfInfoDb = storageDomainOvfInfoDao.get ( createdDiskId ) ; if ( ( storageDomainOvfInfoDb == null ) || ( ( storageDomainOvfInfoDb.getStatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.StorageDomainOvfInfoStatus.DISABLED ) ) ) { return ; } storageDomainOvfInfoDb.setStatus ( StorageDomainOvfInfoStatus.OUTDATED ) ; storageDomainOvfInfoDao.update ( storageDomainOvfInfoDb ) ; org.ovirt.engine.core.bll.storage.ovfstore.CreateOvfVolumeForStorageDomainCommand.setSucceeded ( true ) ; }

Target:
protected void endSuccessfully ( ) { org.ovirt.engine.core.compat.Guid createdDiskId = org.ovirt.engine.core.bll.storage.ovfstore.CreateOvfVolumeForStorageDomainCommand.getActionReturnValue ( ) ; endChildCommand ( true ) ; org.ovirt.engine.core.common.businessentities.StorageDomainOvfInfo storageDomainOvfInfoDb = storageDomainOvfInfoDao.get ( createdDiskId ) ; if ( ( storageDomainOvfInfoDb == null ) || ( ( storageDomainOvfInfoDb.getStatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.StorageDomainOvfInfoStatus.DISABLED ) ) ) { return ; } storageDomainOvfInfoDb.setStatus ( StorageDomainOvfInfoStatus.OUTDATED ) ; storageDomainOvfInfoDao.update ( storageDomainOvfInfoDb ) ; org.ovirt.engine.core.bll.storage.ovfstore.CreateOvfVolumeForStorageDomainCommand.setSucceeded ( true ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > pools = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ) ) ; if ( ( pools != null ) && ( ( pools.size ( ) ) > 0 ) ) { org.ovirt.engine.core.common.businessentities.StoragePool pool = pools.get ( 0 ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getClusterList ( ( ( org.ovirt.engine.ui.frontend.AsyncQuery ) ( model ) ) , pool.getId ( ) ) ; } }

Target:
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 > ( ) ; }
Source:
private void addStorageFormatOptions ( org.ovirt.engine.api.model.VersionCaps version , org.ovirt.engine.api.restapi.model.StorageFormat ... formats ) { if ( org.ovirt.engine.api.restapi.utils.VersionUtils.greaterOrEqual ( version , org.ovirt.engine.api.restapi.resource.BackendCapabilitiesResource.VERSION_3_0 ) ) { version.setStorageFormats ( new org.ovirt.engine.api.model.StorageFormats ( ) ) ; for ( org.ovirt.engine.api.restapi.model.StorageFormat format : formats ) { version.getStorageFormats ( ) . getStorageFormats ( ) . add ( format.value ( ) ) ; } } }

Target:
private void addStorageFormatOptions ( org.ovirt.engine.api.model.VersionCaps version , org.ovirt.engine.api.restapi.model.StorageFormat ... formats ) { version.setStorageFormats ( new org.ovirt.engine.api.model.StorageFormats ( ) ) ; for ( org.ovirt.engine.api.restapi.model.StorageFormat format : formats ) { version.getStorageFormats ( ) . getStorageFormats ( ) . add ( format.value ( ) ) ; } }
Source:
public void setUp ( ) { org.mockito.Mockito.when ( iconDefaultsProvider.getVmIconDefaults ( ) ) . thenReturn ( new java.util.HashMap < java.lang.Integer , org.ovirt.engine.core.common.queries.VmIconIdSizePair > ( ) { { put ( 0 , new org.ovirt.engine.core.common.queries.VmIconIdSizePair ( org.ovirt.engine.core.compat.Guid.createGuidFromString ( "00000000-0000-0000-0000-00000000000a" ) , org.ovirt.engine.core.compat.Guid.createGuidFromString ( "00000000-0000-0000-0000-00000000000b" ) ) ) ; } } ) ; org.mockito.Mockito.doNothing ( ) . when ( ovfManager ) . updateBootOrderOnDevices ( org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.common.businessentities.VmBase.class ) , org.mockito.ArgumentMatchers.anyBoolean ( ) ) ; ovfManager.setOsRepository ( osRepository ) ; }

Target:
public void setUp ( ) { org.mockito.Mockito.when ( iconDefaultsProvider.getVmIconDefaults ( ) ) . thenReturn ( new java.util.HashMap < java.lang.Integer , org.ovirt.engine.core.common.queries.VmIconIdSizePair > ( ) { { put ( 0 , new org.ovirt.engine.core.common.queries.VmIconIdSizePair ( org.ovirt.engine.core.compat.Guid.createGuidFromString ( "00000000-0000-0000-0000-00000000000a" ) , org.ovirt.engine.core.compat.Guid.createGuidFromString ( "00000000-0000-0000-0000-00000000000b" ) ) ) ; } } ) ; org.mockito.Mockito.doNothing ( ) . when ( ovfManager ) . updateBootOrderOnDevices ( org.mockito.ArgumentMatchers.any ( ) , org.mockito.ArgumentMatchers.anyBoolean ( ) ) ; ovfManager.setOsRepository ( osRepository ) ; }
Source:
public void executeCommandWhenFailed ( ) { cmd = org.mockito.Mockito.spy ( createTestCommand ( volumeId2 , 0 ) ) ; prepareMocks ( cmd ) ; mockBackend ( false , EngineError.GlusterVolumeRemoveBricksStartFailed ) ; org.junit.Assert.assertTrue ( cmd.validate ( ) ) ; cmd.executeCommand ( ) ; org.junit.Assert.assertEquals ( cmd.getAuditLogTypeValue ( ) , AuditLogType.START_REMOVING_GLUSTER_VOLUME_BRICKS_FAILED ) ; }

Target:
public void executeCommandWhenFailed ( ) { cmd = org.mockito.Mockito.spy ( createTestCommand ( volumeId2 , 0 ) ) ; prepareMocks ( cmd ) ; mockBackend ( false , EngineError.GlusterVolumeRemoveBricksStartFailed ) ; org.junit.Assert.assertTrue ( cmd.validate ( ) ) ; cmd.executeCommand ( ) ; org.junit.Assert.assertEquals ( AuditLogType.START_REMOVING_GLUSTER_VOLUME_BRICKS_FAILED , cmd.getAuditLogTypeValue ( ) ) ; }
Source:
public void testGetEntityNameByIdAndTypeForDataCenter ( ) { org.ovirt.engine.core.common.businessentities.StoragePool storagePool = storagePoolDao.get ( org.ovirt.engine.core.dao.EntityDaoImplTest.STORAGE_POOL_ID ) ; org.junit.Assert.assertNotNull ( storagePool ) ; java.lang.String name = storagePool.getName ( ) ; org.junit.Assert.assertTrue ( name.equals ( underTest.getEntityNameByIdAndType ( org.ovirt.engine.core.dao.EntityDaoImplTest.STORAGE_POOL_ID , VdcObjectType.StoragePool ) ) ) ; }

Target:
public void testGetEntityNameByIdAndTypeForDataCenter ( ) { org.ovirt.engine.core.common.businessentities.StoragePool storagePool = storagePoolDao.get ( org.ovirt.engine.core.dao.EntityDaoImplTest.STORAGE_POOL_ID ) ; org.junit.Assert.assertNotNull ( storagePool ) ; java.lang.String name = storagePool.getName ( ) ; org.junit.Assert.assertEquals ( name , underTest.getEntityNameByIdAndType ( org.ovirt.engine.core.dao.EntityDaoImplTest.STORAGE_POOL_ID , VdcObjectType.StoragePool ) ) ; }
Source:
public void OnSuccess ( java.lang.Object model1 , java.lang.Object ReturnValue ) { java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > disks = ( ( java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( ReturnValue ) ) . getReturnValue ( ) ) ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > diskList = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ( ) ; diskList.addAll ( disks ) ; java.util.Collections.sort ( diskList , new org.ovirt.engine.ui.uicommonweb.Linq.DiskByAliasComparer ( ) ) ; org.ovirt.engine.ui.uicommonweb.models.SearchableListModel searchableListModel = ( ( org.ovirt.engine.ui.uicommonweb.models.SearchableListModel ) ( model1 ) ) ; searchableListModel.setItems ( diskList ) ; }

Target:
public void onSuccess ( java.lang.Object model1 , java.lang.Object ReturnValue ) { java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > disks = ( ( java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( ReturnValue ) ) . getReturnValue ( ) ) ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > diskList = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ( ) ; diskList.addAll ( disks ) ; java.util.Collections.sort ( diskList , new org.ovirt.engine.ui.uicommonweb.Linq.DiskByAliasComparer ( ) ) ; org.ovirt.engine.ui.uicommonweb.models.SearchableListModel searchableListModel = ( ( org.ovirt.engine.ui.uicommonweb.models.SearchableListModel ) ( model1 ) ) ; searchableListModel.setItems ( diskList ) ; }
Source:
private static void assertGetAllForStoragePoolResult ( java.util.List < org.ovirt.engine.core.common.businessentities.storage_domains > result ) { org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.storage_domains domain : result ) { org.junit.Assert.assertEquals ( org.ovirt.engine.core.dao.StorageDomainDAOTest.EXISTING_STORAGE_POOL_ID , domain.getstorage_pool_id ( ) ) ; } }

Target:
private static void assertGetAllForStoragePoolResult ( java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > result ) { org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.StorageDomain domain : result ) { org.junit.Assert.assertEquals ( org.ovirt.engine.core.dao.StorageDomainDAOTest.EXISTING_STORAGE_POOL_ID , domain.getstorage_pool_id ( ) ) ; } }
Source:
public void endSuccessfully ( ) { endCreateAllSnapshots ( ) ; for ( org.ovirt.engine.core.common.action.LiveMigrateDiskParameters parameters : enclosingCommand.getParameters ( ) . getParametersList ( ) ) { updateDestinationImageId ( parameters ) ; org.ovirt.engine.core.bll.ImagesHandler.updateImageStatus ( parameters.getDestinationImageId ( ) , ImageStatus.LOCKED ) ; } org.ovirt.engine.core.bll.job.ExecutionHandler.endJob ( enclosingCommand.getExecutionContext ( ) , true ) ; enclosingCommand.setExecutionContext ( null ) ; }

Target:
public void endSuccessfully ( ) { endCreateAllSnapshots ( ) ; for ( org.ovirt.engine.core.common.action.LiveMigrateDiskParameters parameters : enclosingCommand.getParameters ( ) . getParametersList ( ) ) { updateDestinationImageId ( parameters ) ; } org.ovirt.engine.core.bll.job.ExecutionHandler.endJob ( enclosingCommand.getExecutionContext ( ) , true ) ; enclosingCommand.setExecutionContext ( null ) ; }
Source:
public void shouldNotCreateCpuPinningForVirtualNumaNodes ( ) { for ( org.ovirt.engine.core.common.businessentities.VmNumaNode numaNode : org.ovirt.engine.core.vdsbroker.vdsbroker.NumaSettingFactoryTest.vmNumaNodes ) { numaNode.getVdsNumaNodeList ( ) . clear ( ) ; } java.util.Map < java.lang.String , java.lang.Object > cpuPinning = org.ovirt.engine.core.vdsbroker.vdsbroker.NumaSettingFactory.buildCpuPinningWithNumaSetting ( org.ovirt.engine.core.vdsbroker.vdsbroker.NumaSettingFactoryTest.vmNumaNodes , org.ovirt.engine.core.vdsbroker.vdsbroker.NumaSettingFactoryTest.vdsNumaNodes ) ; org.assertj.core.api.Assertions.assertThat ( cpuPinning ) . isEmpty ( ) ; java.util.Map < java.lang.String , java.lang.Object > mapping = org.ovirt.engine.core.vdsbroker.vdsbroker.NumaSettingFactory.buildVmNumatuneSetting ( NumaTuneMode.INTERLEAVE , org.ovirt.engine.core.vdsbroker.vdsbroker.NumaSettingFactoryTest.vmNumaNodes , org.ovirt.engine.core.vdsbroker.vdsbroker.NumaSettingFactoryTest.vdsNumaNodes ) ; org.assertj.core.api.Assertions.assertThat ( mapping ) . doesNotContainKeys ( VdsProperties.NUMA_TUNE_MODE , VdsProperties.NUMA_TUNE_NODESET ) ; }

Target:
public void shouldNotCreateCpuPinningForVirtualNumaNodes ( ) { for ( org.ovirt.engine.core.common.businessentities.VmNumaNode numaNode : org.ovirt.engine.core.vdsbroker.vdsbroker.NumaSettingFactoryTest.vmNumaNodes ) { numaNode.getVdsNumaNodeList ( ) . clear ( ) ; } java.util.Map < java.lang.String , java.lang.Object > cpuPinning = org.ovirt.engine.core.vdsbroker.vdsbroker.NumaSettingFactory.buildCpuPinningWithNumaSetting ( org.ovirt.engine.core.vdsbroker.vdsbroker.NumaSettingFactoryTest.vmNumaNodes , org.ovirt.engine.core.vdsbroker.vdsbroker.NumaSettingFactoryTest.vdsNumaNodes ) ; org.assertj.core.api.Assertions.assertThat ( cpuPinning ) . isEmpty ( ) ; java.util.Map < java.lang.String , java.lang.Object > mapping = org.ovirt.engine.core.vdsbroker.vdsbroker.NumaSettingFactory.buildVmNumatuneSetting ( NumaTuneMode.INTERLEAVE , org.ovirt.engine.core.vdsbroker.vdsbroker.NumaSettingFactoryTest.vmNumaNodes ) ; org.assertj.core.api.Assertions.assertThat ( mapping ) . doesNotContainKeys ( VdsProperties.NUMA_TUNE_MODE , VdsProperties.NUMA_TUNE_NODESET ) ; }
Source:
private java.lang.String getJsonDiskDescription ( ) { try { return org.ovirt.engine.core.bll.ImagesHandler.getJsonDiskDescription ( org.ovirt.engine.core.bll.AddImageFromScratchCommand.getParameters ( ) . getDiskInfo ( ) . getDiskAlias ( ) , org.ovirt.engine.core.bll.AddImageFromScratchCommand.getParameters ( ) . getDiskInfo ( ) . getDiskDescription ( ) ) ; } catch ( java.io.IOException e ) { log.error ( "Exception while generating json for disk. ERROR: '{}'" , e ) ; return org.apache.commons.lang.StringUtils.EMPTY ; } }

Target:
private java.lang.String getJsonDiskDescription ( ) { try { return org.ovirt.engine.core.bll.ImagesHandler.getJsonDiskDescription ( org.ovirt.engine.core.bll.AddImageFromScratchCommand.getParameters ( ) . getDiskInfo ( ) ) ; } catch ( java.io.IOException e ) { log.error ( "Exception while generating json for disk. ERROR: '{}'" , e ) ; return org.apache.commons.lang.StringUtils.EMPTY ; } }
Source:
private boolean shouldTakeIpv6DataFromNic ( ) { if ( ( ( org.ovirt.engine.core.common.businessentities.network.Ipv6BootProtocol.DHCP ) == ( getIpv6BootProtocol ( ) ) ) || ( ( org.ovirt.engine.core.common.businessentities.network.Ipv6BootProtocol.AUTOCONF ) == ( getIpv6BootProtocol ( ) ) ) ) { return true ; } return false ; }

Target:
private boolean shouldTakeIpv6DataFromNic ( ) { if ( ( ( ( org.ovirt.engine.core.common.businessentities.network.Ipv6BootProtocol.DHCP ) == ( getIpv6BootProtocol ( ) ) ) || ( ( org.ovirt.engine.core.common.businessentities.network.Ipv6BootProtocol.AUTOCONF ) == ( getIpv6BootProtocol ( ) ) ) ) && ( ( nic ) != null ) ) { return true ; } return false ; }
Source:
public void calculateNetworkImplementationDetailsNetworkMtuOutOfSync ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.VdsNetworkInterface iface = createNetworkDevice ( ) ; calculateNetworkImplementationDetailsAndAssertSync ( iface , false , iface.getNetworkName ( ) , iface.isBridged ( ) , ( ( iface.getMtu ( ) ) + 1 ) , iface.getVlanId ( ) ) ; }

Target:
public void calculateNetworkImplementationDetailsNetworkMtuOutOfSync ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface = createNetworkDevice ( ) ; calculateNetworkImplementationDetailsAndAssertSync ( iface , false , iface.getNetworkName ( ) , iface.isBridged ( ) , ( ( iface.getMtu ( ) ) + 1 ) , iface.getVlanId ( ) ) ; }
Source:
private static boolean addDeviceUpdateOnNextRun ( org.ovirt.engine.core.compat.Guid vmId , org.ovirt.engine.core.common.businessentities.EditableDeviceOnVmStatusField annotation , java.lang.Object key , java.lang.Object value , java.util.List < org.ovirt.engine.core.common.utils.VmDeviceUpdate > updates ) { return org.ovirt.engine.core.bll.VmHandler.addDeviceUpdateOnNextRun ( vmId , annotation.generalType ( ) , annotation.type ( ) , annotation.isReadOnly ( ) , key , value , updates ) ; }

Target:
private static boolean addDeviceUpdateOnNextRun ( org.ovirt.engine.core.compat.Guid vmId , org.ovirt.engine.core.common.businessentities.EditableDeviceOnVmStatusField annotation , java.lang.Object key , java.lang.Object value , java.util.List < org.ovirt.engine.core.common.utils.VmDeviceUpdate > updates ) { return org.ovirt.engine.core.bll.VmHandler.addDeviceUpdateOnNextRun ( vmId , annotation.generalType ( ) , annotation.type ( ) , annotation.isReadOnly ( ) , annotation.name ( ) , key , value , updates ) ; }
Source:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel ) ( target ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VDSGroup > clusterList = ( ( java.util.List < org.ovirt.engine.core.common.businessentities.VDSGroup > ) ( returnValue ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VDSGroup > filteredClusterList = org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.filterClustersWithoutArchitecture ( clusterList ) ; model.setDataCentersAndClusters ( model , dataCenters , filteredClusterList , null ) ; initCdImage ( ) ; }

Target:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel ) ( target ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VDSGroup > clusterList = ( ( java.util.List < org.ovirt.engine.core.common.businessentities.VDSGroup > ) ( returnValue ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VDSGroup > filteredClusterList = org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . filterClustersWithoutArchitecture ( clusterList ) ; model.setDataCentersAndClusters ( model , dataCenters , filteredClusterList , null ) ; initCdImage ( ) ; }
Source:
protected org.ovirt.engine.core.bll.ValidationResult macAvailable ( ) { java.lang.Boolean allowDupMacs = org.ovirt.engine.core.common.config.Config.< java.lang.Boolean > GetValue ( ConfigValues.AllowDuplicateMacAddresses ) ; org.ovirt.engine.core.bll.network.VmInterfaceManager vmInterfaceManager = new org.ovirt.engine.core.bll.network.VmInterfaceManager ( ) ; if ( allowDupMacs || ( ! ( vmInterfaceManager.existsPluggedInterfaceWithSameMac ( org.ovirt.engine.core.bll.network.vm.ActivateDeactivateVmNicCommand.getParameters ( ) . getNic ( ) ) ) ) ) { return org.ovirt.engine.core.bll.ValidationResult.VALID ; } else { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.NETWORK_MAC_ADDRESS_IN_USE ) ; } }

Target:
protected org.ovirt.engine.core.bll.ValidationResult macAvailable ( ) { java.lang.Boolean allowDupMacs = org.ovirt.engine.core.common.config.Config.< java.lang.Boolean > getValue ( ConfigValues.AllowDuplicateMacAddresses ) ; org.ovirt.engine.core.bll.network.VmInterfaceManager vmInterfaceManager = new org.ovirt.engine.core.bll.network.VmInterfaceManager ( ) ; if ( allowDupMacs || ( ! ( vmInterfaceManager.existsPluggedInterfaceWithSameMac ( org.ovirt.engine.core.bll.network.vm.ActivateDeactivateVmNicCommand.getParameters ( ) . getNic ( ) ) ) ) ) { return org.ovirt.engine.core.bll.ValidationResult.VALID ; } else { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.NETWORK_MAC_ADDRESS_IN_USE ) ; } }
Source:
public void OnSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.storage.LocalStorageModel localStorageModel = ( ( org.ovirt.engine.ui.uicommonweb.models.storage.LocalStorageModel ) ( target ) ) ; org.ovirt.engine.core.common.businessentities.StorageServerConnections connection = ( ( org.ovirt.engine.core.common.businessentities.StorageServerConnections ) ( returnValue ) ) ; localStorageModel.getPath ( ) . setEntity ( connection.getconnection ( ) ) ; }

Target:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.storage.LocalStorageModel localStorageModel = ( ( org.ovirt.engine.ui.uicommonweb.models.storage.LocalStorageModel ) ( target ) ) ; org.ovirt.engine.core.common.businessentities.StorageServerConnections connection = ( ( org.ovirt.engine.core.common.businessentities.StorageServerConnections ) ( returnValue ) ) ; localStorageModel.getPath ( ) . setEntity ( connection.getconnection ( ) ) ; }
Source:
static void checkSeverities ( ) { org.ovirt.engine.core.common.AuditLogType [ ] values = org.ovirt.engine.core.common.AuditLogType.values ( ) ; if ( ( values.length ) != ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.mSeverities.size ( ) ) ) { for ( org.ovirt.engine.core.common.AuditLogType value : values ) { if ( ! ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.mSeverities.containsKey ( value ) ) ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.log.warnFormat ( "AuditLogType: {0} not have severity. Assumed Normal" , value.toString ( ) ) ; } } } }

Target:
static void checkSeverities ( ) { org.ovirt.engine.core.common.AuditLogType [ ] values = org.ovirt.engine.core.common.AuditLogType.values ( ) ; if ( ( values.length ) != ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.severities.size ( ) ) ) { for ( org.ovirt.engine.core.common.AuditLogType value : values ) { if ( ! ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.severities.containsKey ( value ) ) ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.log.warnFormat ( "AuditLogType: {0} not have severity. Assumed Normal" , value.toString ( ) ) ; } } } }
Source:
public void cpuTypeSupportsVirtServiceForVirtCluster ( ) { org.mockito.Mockito.when ( cluster.supportsVirtService ( ) ) . thenReturn ( true ) ; validator = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.validator.ClusterValidator ( clusterDao , dataCenterDao , cluster , cpuFlagsManagerHandler ) ) ; org.mockito.Mockito.doReturn ( true ) . when ( validator ) . cpuExists ( ) ; org.junit.Assert.assertThat ( validator.cpuTypeSupportsVirtService ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }

Target:
public void cpuTypeSupportsVirtServiceForVirtCluster ( ) { org.mockito.Mockito.when ( cluster.supportsVirtService ( ) ) . thenReturn ( true ) ; org.mockito.Mockito.doReturn ( true ) . when ( validator ) . cpuExists ( ) ; org.junit.Assert.assertThat ( validator.cpuTypeSupportsVirtService ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }
Source:
public void init ( ) { org.ovirt.engine.core.bll.dwh.DwhHeartBeat.log.info ( "Initializing DWH Heart Beat" ) ; heartBeatVar = new org.ovirt.engine.core.common.businessentities.DwhHistoryTimekeeping ( ) ; heartBeatVar.setVariable ( DwhHistoryTimekeepingVariable.HEART_BEAT ) ; org.ovirt.engine.core.utils.timer.SchedulerUtilQuartzImpl.getInstance ( ) . scheduleAFixedDelayJob ( this , org.ovirt.engine.core.bll.dwh.DwhHeartBeat.DWH_HEART_BEAT_METHOD , new java.lang.Class [ ] { } , new java.lang.Object [ ] { } , 0 , org.ovirt.engine.core.common.config.Config.< java.lang.Integer > GetValue ( ConfigValues.DwhHeartBeatInterval ) , java.util.concurrent.TimeUnit.SECONDS ) ; org.ovirt.engine.core.bll.dwh.DwhHeartBeat.log.info ( "DWH Heart Beat initialized" ) ; }

Target:
public void init ( ) { org.ovirt.engine.core.bll.dwh.DwhHeartBeat.log.info ( "Initializing DWH Heart Beat" ) ; heartBeatVar = new org.ovirt.engine.core.common.businessentities.DwhHistoryTimekeeping ( ) ; heartBeatVar.setVariable ( DwhHistoryTimekeepingVariable.HEART_BEAT ) ; org.ovirt.engine.core.utils.timer.SchedulerUtilQuartzImpl.getInstance ( ) . scheduleAFixedDelayJob ( this , org.ovirt.engine.core.bll.dwh.DwhHeartBeat.DWH_HEART_BEAT_METHOD , new java.lang.Class [ ] { } , new java.lang.Object [ ] { } , 0 , org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( ConfigValues.DwhHeartBeatInterval ) , java.util.concurrent.TimeUnit.SECONDS ) ; org.ovirt.engine.core.bll.dwh.DwhHeartBeat.log.info ( "DWH Heart Beat initialized" ) ; }
Source:
public void Executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { org.ovirt.engine.ui.frontend.Frontend.RunAction ( VdcActionType.UpdateVm , new org.ovirt.engine.core.common.action.VmManagementParametersBase ( gettempVm ( ) ) , new org.ovirt.engine.ui.uicompat.IFrontendActionAsyncCallback ( ) { @ java.lang.Override public void Executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult a ) { stopProgress ( a.getState ( ) ) ; cancel ( ) ; } } , this ) ; }

Target:
public void Executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { stopProgress ( result.getState ( ) ) ; cancel ( ) ; }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { if ( ( getResolveContentConflict ( ) . getEntity ( ) ) == null ) { getServerHooksList ( ) . setIsChangable ( false ) ; } else { getServerHooksList ( ) . setIsChangable ( ( ( java.lang.Boolean ) ( getResolveContentConflict ( ) . getEntity ( ) ) ) ) ; } }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { if ( ( getResolveContentConflict ( ) . getEntity ( ) ) == null ) { getServerHooksList ( ) . setIsChangable ( false ) ; } else { getServerHooksList ( ) . setIsChangable ( getResolveContentConflict ( ) . getEntity ( ) ) ; } }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object result ) { java.lang.String fingerprint = ( ( java.lang.String ) ( result ) ) ; if ( ( fingerprint != null ) && ( ( fingerprint.length ( ) ) > 0 ) ) { getGlusterHostFingerprint ( ) . setEntity ( result ) ; setIsFingerprintVerified ( true ) ; } else { getGlusterHostFingerprint ( ) . setEntity ( org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getConstants ( ) . errorLoadingFingerprint ( ) ) ; setIsFingerprintVerified ( false ) ; } }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object result ) { java.lang.String fingerprint = ( ( java.lang.String ) ( result ) ) ; if ( ( fingerprint != null ) && ( ( fingerprint.length ( ) ) > 0 ) ) { getGlusterHostFingerprint ( ) . setEntity ( ( ( java.lang.String ) ( result ) ) ) ; setIsFingerprintVerified ( true ) ; } else { getGlusterHostFingerprint ( ) . setEntity ( org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getConstants ( ) . errorLoadingFingerprint ( ) ) ; setIsFingerprintVerified ( false ) ; } }