auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc desktopLock ( java.lang.String vmId ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.desktopLock ( vmId ) ; 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 ) ; } }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc diskReplicateStart ( java.lang.String vmUUID , java.util.Map srcDisk , java.util.Map dstDisk ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.diskReplicateStart ( vmUUID , srcDisk , dstDisk ) ; 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 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.StorageDomainQueryParametersBase ( storageDomainId ) , aQuery ) ; }

Target:
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 ) ; }
Source:
protected java.util.Set < java.lang.String > getExcludeUsers ( ) { java.util.Set < java.lang.String > excludeUsers = new java.util.HashSet < java.lang.String > ( ) ; if ( ( getExcludeItems ( ) ) != null ) { for ( java.lang.Object item : getExcludeItems ( ) ) { org.ovirt.engine.core.common.businessentities.DbUser a = ( ( org.ovirt.engine.core.common.businessentities.DbUser ) ( item ) ) ; excludeUsers.add ( a.getExternalId ( ) ) ; } } return excludeUsers ; }

Target:
protected java.util.Set < java.lang.String > getExcludeUsers ( ) { java.util.Set < java.lang.String > excludeUsers = new java.util.HashSet < java.lang.String > ( ) ; if ( ( getExcludeItems ( ) ) != null ) { for ( java.lang.Object item : getExcludeItems ( ) ) { org.ovirt.engine.core.common.businessentities.aaa.DbUser a = ( ( org.ovirt.engine.core.common.businessentities.aaa.DbUser ) ( item ) ) ; excludeUsers.add ( a.getExternalId ( ) ) ; } } return excludeUsers ; }
Source:
public void getVmTemplatesByBaseTemplateId ( org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery , org.ovirt.engine.core.compat.Guid baseTemplate ) { asyncQuery.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.VmTemplate > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmTemplatesByBaseTemplateId , new org.ovirt.engine.core.common.queries.GetVmTemplateParameters ( baseTemplate ) , asyncQuery ) ; }

Target:
public void getVmTemplatesByBaseTemplateId ( org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery , org.ovirt.engine.core.compat.Guid baseTemplate ) { asyncQuery.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.VmTemplate > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmTemplatesByBaseTemplateId , new org.ovirt.engine.core.common.queries.GetVmTemplateParameters ( baseTemplate ) , asyncQuery ) ; }
Source:
private void processFence ( ) { org.ovirt.engine.core.bll.FenceExecutor executor = new org.ovirt.engine.core.bll.FenceExecutor ( getVds ( ) ) ; vdsProxyFound = new org.ovirt.engine.core.bll.FenceProxyLocator ( getVds ( ) ) . isProxyHostAvailable ( ) ; if ( ( getVds ( ) . isPmEnabled ( ) ) && ( vdsProxyFound ) ) { org.ovirt.engine.core.common.vdscommands.VDSFenceReturnValue returnValue = executor.checkStatus ( ) ; fenceSucceeded = returnValue.getSucceeded ( ) ; fenceStatusReturnValue = ( ( org.ovirt.engine.core.common.businessentities.FenceStatusReturnValue ) ( returnValue.getReturnValue ( ) ) ) ; } }

Target:
private void processFence ( ) { org.ovirt.engine.core.bll.FenceExecutor executor = new org.ovirt.engine.core.bll.FenceExecutor ( getVds ( ) ) ; vdsProxyFound = new org.ovirt.engine.core.bll.FenceProxyLocator ( getVds ( ) ) . isProxyHostAvailable ( ) ; if ( ( getVds ( ) . isPmEnabled ( ) ) && ( vdsProxyFound ) ) { org.ovirt.engine.core.common.vdscommands.VDSFenceReturnValue returnValue = executor.checkHostStatus ( ) ; fenceSucceeded = returnValue.getSucceeded ( ) ; fenceStatusReturnValue = ( ( org.ovirt.engine.core.common.businessentities.FenceStatusReturnValue ) ( returnValue.getReturnValue ( ) ) ) ; } }
Source:
public void testRemoveNonExistant ( ) throws java.lang.Exception { setUpEntityQueryExpectations ( QueryType.GetDiskProfileById , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , null ) ; try { resource.remove ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { assertNotNull ( wae.getResponse ( ) ) ; assertEquals ( 404 , wae.getResponse ( ) . getStatus ( ) ) ; } }

Target:
public void testRemoveNonExistant ( ) throws java.lang.Exception { setUpEntityQueryExpectations ( QueryType.GetDiskProfileById , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , null ) ; try { resource.remove ( ) ; org.junit.Assert.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { org.junit.Assert.assertNotNull ( wae.getResponse ( ) ) ; org.junit.Assert.assertEquals ( 404 , wae.getResponse ( ) . getStatus ( ) ) ; } }
Source:
private void updateNics ( java.util.List < org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkInterfaceModel > nics ) { nicList.clear ( ) ; java.util.Collections.sort ( nics ) ; java.util.List < org.ovirt.engine.ui.webadmin.section.main.view.popup.host.panels.NetworkGroup > groups = new java.util.ArrayList < org.ovirt.engine.ui.webadmin.section.main.view.popup.host.panels.NetworkGroup > ( ) ; for ( org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkInterfaceModel nic : nics ) { groups.add ( new org.ovirt.engine.ui.webadmin.section.main.view.popup.host.panels.NetworkGroup ( nic , style ) ) ; } nicList.addAll ( groups , ( ! ( rendered ) ) ) ; }

Target:
private void updateNics ( java.util.List < org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkInterfaceModel > nics ) { nicList.clear ( ) ; java.util.Collections.sort ( nics ) ; java.util.List < org.ovirt.engine.ui.webadmin.section.main.view.popup.host.panels.NetworkGroup > groups = new java.util.ArrayList < org.ovirt.engine.ui.webadmin.section.main.view.popup.host.panels.NetworkGroup > ( ) ; for ( org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkInterfaceModel nic : nics ) { groups.add ( new org.ovirt.engine.ui.webadmin.section.main.view.popup.host.panels.NetworkGroup ( nic , eventBus , style ) ) ; } nicList.addAll ( groups , ( ! ( rendered ) ) ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.AuditLog saveToDb ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogable auditLogable , org.ovirt.engine.core.common.AuditLogType logType , java.lang.String loggerString ) { org.ovirt.engine.core.common.businessentities.AuditLog auditLog = createAuditLog ( auditLogable , logType , loggerString ) ; if ( auditLog == null ) { return null ; } auditLogable.setPropertiesForAuditLog ( auditLog ) ; auditLog.setUserName ( org.apache.commons.lang.StringUtils.abbreviate ( auditLog.getUserName ( ) , org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.USERNAME_LENGTH ) ) ; getDbFacadeInstance ( ) . getAuditLogDao ( ) . save ( auditLog ) ; return auditLog ; }

Target:
private org.ovirt.engine.core.common.businessentities.AuditLog saveToDb ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogable auditLogable , org.ovirt.engine.core.common.AuditLogType logType , java.lang.String loggerString ) { org.ovirt.engine.core.common.businessentities.AuditLog auditLog = create ( auditLogable , logType , loggerString ) ; if ( auditLog == null ) { return null ; } auditLogable.setPropertiesForAuditLog ( auditLog ) ; auditLog.setUserName ( org.apache.commons.lang.StringUtils.abbreviate ( auditLog.getUserName ( ) , org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.USERNAME_LENGTH ) ) ; getDbFacadeInstance ( ) . getAuditLogDao ( ) . save ( auditLog ) ; return auditLog ; }
Source:
public void testFindSingleNotAppropriateDcNetwork ( ) { org.mockito.Mockito.when ( mockNetworkDao.getAllForDataCenter ( org.ovirt.engine.core.bll.network.cluster.DefaultManagementNetworkFinderImplTest.TEST_DC_ID ) ) . thenReturn ( java.util.Collections.singletonList ( mockNetwork ) ) ; org.mockito.Mockito.when ( mockManagementNetworkCandidatePredicate.test ( mockNetwork ) ) . thenReturn ( false ) ; final org.ovirt.engine.core.common.businessentities.network.Network actual = underTest.findDefaultManagementNetwork ( org.ovirt.engine.core.bll.network.cluster.DefaultManagementNetworkFinderImplTest.TEST_DC_ID ) ; org.junit.Assert.assertNull ( actual ) ; }

Target:
public void testFindSingleNotAppropriateDcNetwork ( ) { org.mockito.Mockito.when ( mockNetworkDao.getAllForDataCenter ( org.ovirt.engine.core.bll.network.cluster.DefaultManagementNetworkFinderImplTest.TEST_DC_ID ) ) . thenReturn ( java.util.Collections.singletonList ( mockNetwork ) ) ; org.mockito.Mockito.when ( mockManagementNetworkCandidatePredicate.test ( mockNetwork ) ) . thenReturn ( false ) ; final org.ovirt.engine.core.common.businessentities.network.Network actual = underTest.findDefaultManagementNetwork ( org.ovirt.engine.core.bll.network.cluster.DefaultManagementNetworkFinderImplTest.TEST_DC_ID ) ; org.junit.jupiter.api.Assertions.assertNull ( actual ) ; }
Source:
protected void UpdateTemplateInSpm ( ) { org.ovirt.engine.core.bll.VmTemplateCommand.UpdateTemplateInSpm ( getParameters ( ) . getStoragePoolId ( ) , new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmTemplate > ( java.util.Arrays.asList ( new org.ovirt.engine.core.common.businessentities.VmTemplate [ ] { getParameters ( ) . getVmTemplate ( ) } ) ) , Guid.Empty , getParameters ( ) . getImages ( ) ) ; }

Target:
protected void updateTemplateInSpm ( ) { org.ovirt.engine.core.bll.VmTemplateCommand.UpdateTemplateInSpm ( getParameters ( ) . getStoragePoolId ( ) , new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmTemplate > ( java.util.Arrays.asList ( new org.ovirt.engine.core.common.businessentities.VmTemplate [ ] { getParameters ( ) . getVmTemplate ( ) } ) ) , Guid.Empty , getParameters ( ) . getImages ( ) ) ; }
Source:
public void testExecuteQueryWithDirectOnly ( ) { org.ovirt.engine.core.dao.PermissionDAO permissionDAOMock = org.mockito.Mockito.mock ( org.ovirt.engine.core.dao.PermissionDAO.class ) ; org.mockito.Mockito.when ( permissionDAOMock.getAllForEntity ( objectID , org.ovirt.engine.core.bll.UNPRIVILEGED_USER_SESSION_ID , getQueryParameters ( ) . isFiltered ( ) , false ) ) . thenReturn ( mockedPermissions ) ; org.mockito.Mockito.when ( getDbFacadeMockInstance ( ) . getPermissionDao ( ) ) . thenReturn ( permissionDAOMock ) ; assertQueryDAOCall ( true ) ; }

Target:
public void testExecuteQueryWithDirectOnly ( ) { org.ovirt.engine.core.dao.PermissionDao permissionDaoMock = org.mockito.Mockito.mock ( org.ovirt.engine.core.dao.PermissionDao.class ) ; org.mockito.Mockito.when ( permissionDaoMock.getAllForEntity ( objectID , org.ovirt.engine.core.bll.UNPRIVILEGED_USER_SESSION_ID , getQueryParameters ( ) . isFiltered ( ) , false ) ) . thenReturn ( mockedPermissions ) ; org.mockito.Mockito.when ( getDbFacadeMockInstance ( ) . getPermissionDao ( ) ) . thenReturn ( permissionDaoMock ) ; assertQueryDaoCall ( true ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.VM createVM ( java.lang.String vmName , java.lang.String networkName ) { org.ovirt.engine.core.common.businessentities.VM vm = new org.ovirt.engine.core.common.businessentities.VM ( ) ; vm.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; vm.setName ( vmName ) ; org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface vmIface = createNewInterface ( ) ; vmIface.setVmId ( vm.getId ( ) ) ; vmIface.setNetworkName ( networkName ) ; vm.getInterfaces ( ) . add ( vmIface ) ; return vm ; }

Target:
private org.ovirt.engine.core.common.businessentities.VM createVM ( java.lang.String vmName , java.lang.String networkName ) { org.ovirt.engine.core.common.businessentities.VM vm = new org.ovirt.engine.core.common.businessentities.VM ( ) ; vm.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; vm.setName ( vmName ) ; org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface vmIface = createNewViewableInterface ( ) ; vmIface.setVmId ( vm.getId ( ) ) ; vmIface.setNetworkName ( networkName ) ; vm.getInterfaces ( ) . add ( vmIface ) ; return vm ; }
Source:
private void doTestBadUpdate ( boolean valid , boolean success , java.lang.String detail ) throws java.lang.Exception { setUpEntityQueryExpectations ( 1 ) ; setUriInfo ( setUpActionExpectations ( ActionType.UpdateNetwork , org.ovirt.engine.core.common.action.AddNetworkStoragePoolParameters.class , new java.lang.String [ ] { "StoragePoolId" } , new java.lang.Object [ ] { GUIDS [ 1 ] } , valid , success ) ) ; try { resource.update ( org.ovirt.engine.api.restapi.resource.AbstractBackendNetworksResourceTest.getModel ( 0 ) ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }

Target:
private void doTestBadUpdate ( boolean valid , boolean success , java.lang.String detail ) throws java.lang.Exception { setUpEntityQueryExpectations ( 1 ) ; setUriInfo ( setUpActionExpectations ( ActionType.UpdateNetwork , org.ovirt.engine.core.common.action.AddNetworkStoragePoolParameters.class , new java.lang.String [ ] { "StoragePoolId" } , new java.lang.Object [ ] { GUIDS [ 1 ] } , valid , success ) ) ; try { resource.update ( org.ovirt.engine.api.restapi.resource.AbstractBackendNetworksResourceTest.getModel ( 0 ) ) ; org.junit.Assert.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }
Source:
public void validateLunsNotPartOfStorageDomain ( ) { java.util.List lunsFromDb = new java.util.ArrayList < > ( ) ; org.ovirt.engine.core.common.businessentities.storage.LUNs lun1 = new org.ovirt.engine.core.common.businessentities.storage.LUNs ( ) ; lun1.setLUNId ( "111" ) ; lun1.setStorageDomainId ( sdId ) ; org.ovirt.engine.core.common.businessentities.storage.LUNs lun2 = new org.ovirt.engine.core.common.businessentities.storage.LUNs ( ) ; lun2.setLUNId ( "222" ) ; lun2.setStorageDomainId ( sdId ) ; lunsFromDb.add ( lun1 ) ; lunsFromDb.add ( lun2 ) ; org.mockito.Mockito.when ( lunsDao.getAllForVolumeGroup ( org.ovirt.engine.core.bll.storage.domain.RefreshLunsSizeCommandTest.STORAGE ) ) . thenReturn ( lunsFromDb ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( cmd , EngineMessage.ACTION_TYPE_FAILED_LUNS_NOT_PART_OF_STORAGE_DOMAIN ) ; }

Target:
public void validateLunsNotPartOfStorageDomain ( ) { org.ovirt.engine.core.common.businessentities.storage.LUNs lun1 = new org.ovirt.engine.core.common.businessentities.storage.LUNs ( ) ; lun1.setLUNId ( "111" ) ; lun1.setStorageDomainId ( sdId ) ; org.ovirt.engine.core.common.businessentities.storage.LUNs lun2 = new org.ovirt.engine.core.common.businessentities.storage.LUNs ( ) ; lun2.setLUNId ( "222" ) ; lun2.setStorageDomainId ( sdId ) ; org.mockito.Mockito.when ( lunsDao.getAllForVolumeGroup ( org.ovirt.engine.core.bll.storage.domain.RefreshLunsSizeCommandTest.STORAGE ) ) . thenReturn ( java.util.Arrays.asList ( lun1 , lun2 ) ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( cmd , EngineMessage.ACTION_TYPE_FAILED_LUNS_NOT_PART_OF_STORAGE_DOMAIN ) ; }
Source:
public void isTemplateNameUnique ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String templateName , 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 ) ) . booleanValue ( ) ) : false ; } } ; org.ovirt.engine.core.common.queries.NameQueryParameters params = new org.ovirt.engine.core.common.queries.NameQueryParameters ( templateName ) ; params.setDatacenterId ( datacenterId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.IsVmTemlateWithSameNameExist , params , aQuery ) ; }

Target:
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 ) ) . booleanValue ( ) ) : false ; } } ; 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:
private org.ovirt.engine.core.common.businessentities.DiskImage initDiskImage ( org.ovirt.engine.core.compat.Guid diskImageId ) { org.ovirt.engine.core.common.businessentities.DiskImage diskImage = new org.ovirt.engine.core.common.businessentities.DiskImage ( ) ; diskImage.setId ( diskImageId ) ; diskImage.setStoragePoolId ( storagePoolId ) ; diskImage.setStorageIds ( new java.util.ArrayList < org.ovirt.engine.core.compat.Guid > ( ) ) ; org.mockito.Mockito.when ( diskImageDao.getAncestor ( diskImageId ) ) . thenReturn ( diskImage ) ; org.mockito.Mockito.when ( diskImageDao.get ( diskImageId ) ) . thenReturn ( diskImage ) ; return diskImage ; }

Target:
private org.ovirt.engine.core.common.businessentities.DiskImage initDiskImage ( org.ovirt.engine.core.compat.Guid diskImageId ) { org.ovirt.engine.core.common.businessentities.DiskImage diskImage = new org.ovirt.engine.core.common.businessentities.DiskImage ( ) ; diskImage.setId ( diskImageId ) ; diskImage.setStoragePoolId ( storagePoolId ) ; diskImage.setStorageIds ( new java.util.ArrayList < org.ovirt.engine.core.compat.Guid > ( java.util.Arrays.asList ( srcStorageId ) ) ) ; org.mockito.Mockito.when ( diskImageDao.getAncestor ( diskImageId ) ) . thenReturn ( diskImage ) ; org.mockito.Mockito.when ( diskImageDao.get ( diskImageId ) ) . thenReturn ( diskImage ) ; return diskImage ; }
Source:
public void canRemoveLastBrick ( ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity volumeEntity = getDistributedVolume ( volumeId1 , 1 ) ; org.ovirt.engine.core.bll.ValidationResult validationResult = brickValidator.canRemoveBrick ( volumeEntity.getBricks ( ) , volumeEntity , 1 , false ) ; org.junit.Assert.assertFalse ( validationResult.isValid ( ) ) ; org.junit.Assert.assertTrue ( ( ( org.ovirt.engine.core.common.errors.VdcBllMessages.ACTION_TYPE_FAILED_CAN_NOT_REMOVE_ALL_BRICKS_FROM_VOLUME ) == ( validationResult.getMessage ( ) ) ) ) ; }

Target:
public void canRemoveLastBrick ( ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity volumeEntity = getDistributedVolume ( volumeId1 , 1 ) ; org.ovirt.engine.core.bll.ValidationResult validationResult = brickValidator.canRemoveBrick ( volumeEntity.getBricks ( ) , volumeEntity , 1 , false ) ; org.junit.Assert.assertFalse ( validationResult.isValid ( ) ) ; org.junit.Assert.assertTrue ( ( ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_CAN_NOT_REMOVE_ALL_BRICKS_FROM_VOLUME ) == ( validationResult.getMessage ( ) ) ) ) ; }
Source:
public org.ovirt.engine.core.common.AuditLogType getAuditLogTypeValue ( ) { return org.ovirt.engine.core.bll.network.dc.UpdateNetworkCommand.getSucceeded ( ) ? org.ovirt.engine.core.common.AuditLogType.NETWORK_UPDATE_NETWORK : org.ovirt.engine.core.common.AuditLogType.NETWORK_UPDATE_NETWORK_FAILED ; }

Target:
public org.ovirt.engine.core.common.AuditLogType getAuditLogTypeValue ( ) { switch ( org.ovirt.engine.core.bll.network.dc.UpdateNetworkCommand.getActionState ( ) ) { case EXECUTE : return org.ovirt.engine.core.bll.network.dc.UpdateNetworkCommand.getSucceeded ( ) ? org.ovirt.engine.core.common.AuditLogType.NETWORK_UPDATE_NETWORK_STARTED : org.ovirt.engine.core.common.AuditLogType.NETWORK_UPDATE_NETWORK_FAILED ; case END_FAILURE : return hasChildCommands ( ) ? org.ovirt.engine.core.common.AuditLogType.UPDATE_NETWORK_ON_HOSTS_FAILED : super . getAuditLogTypeValue ( ) ; case END_SUCCESS : return org.ovirt.engine.core.common.AuditLogType.NETWORK_UPDATE_NETWORK_FINISHED ; } return super . getAuditLogTypeValue ( ) ; }
Source:
public static void getGlusterHostsNewlyAdded ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId , boolean isFingerprintRequired ) { 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.GetAddedGlusterServers , new org.ovirt.engine.core.common.queries.gluster.AddedGlusterServersParameters ( clusterId , isFingerprintRequired ) , aQuery ) ; }

Target:
public static void getHostPublicKey ( 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.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetServerSSHPublicKey , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }
Source:
public void testSave ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.RepoFileMetaData > listOfRepoFiles = repoFileMetaDataDao.getRepoListForStorageDomain ( FixturesTool.STORAGE_DOAMIN_NFS_ISO , FileTypeExtension.ISO ) ; org.junit.Assert.assertNotNull ( listOfRepoFiles ) ; org.junit.Assert.assertSame ( listOfRepoFiles.isEmpty ( ) , true ) ; org.ovirt.engine.core.common.businessentities.RepoFileMetaData newRepoFileMap = org.ovirt.engine.core.dao.RepoFileMetaDataDAOTest.getNewIsoRepoFile ( ) ; repoFileMetaDataDao.addRepoFileMap ( newRepoFileMap ) ; listOfRepoFiles = repoFileMetaDataDao.getRepoListForStorageDomain ( FixturesTool.STORAGE_DOAMIN_NFS_ISO , FileTypeExtension.ISO ) ; org.junit.Assert.assertSame ( listOfRepoFiles.isEmpty ( ) , false ) ; }

Target:
public void testSave ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.RepoFileMetaData > listOfRepoFiles = repoFileMetaDataDao.getRepoListForStorageDomain ( FixturesTool.STORAGE_DOAMIN_NFS_ISO , ImageType.ISO ) ; org.junit.Assert.assertNotNull ( listOfRepoFiles ) ; org.junit.Assert.assertSame ( listOfRepoFiles.isEmpty ( ) , true ) ; org.ovirt.engine.core.common.businessentities.RepoFileMetaData newRepoFileMap = org.ovirt.engine.core.dao.RepoFileMetaDataDAOTest.getNewIsoRepoFile ( ) ; repoFileMetaDataDao.addRepoFileMap ( newRepoFileMap ) ; listOfRepoFiles = repoFileMetaDataDao.getRepoListForStorageDomain ( FixturesTool.STORAGE_DOAMIN_NFS_ISO , ImageType.ISO ) ; org.junit.Assert.assertSame ( listOfRepoFiles.isEmpty ( ) , false ) ; }
Source:
private static void assertIsSorted ( java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > result ) { org.ovirt.engine.core.common.businessentities.network.Network previous = null ; for ( org.ovirt.engine.core.common.businessentities.network.Network network : result ) { if ( ( previous != null ) && ( ( network.getName ( ) . compareTo ( previous.getName ( ) ) ) < 0 ) ) { org.junit.Assert.fail ( java.lang.String.format ( "List of networks is not ordered by network name, %s came before %s." , previous.getName ( ) , network.getName ( ) ) ) ; } previous = network ; } }

Target:
private static void assertIsSorted ( java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > result ) { org.ovirt.engine.core.common.businessentities.network.Network previous = null ; for ( org.ovirt.engine.core.common.businessentities.network.Network network : result ) { if ( ( previous != null ) && ( ( network.getName ( ) . compareTo ( previous.getName ( ) ) ) < 0 ) ) { org.junit.jupiter.api.Assertions.fail ( java.lang.String.format ( "List of networks is not ordered by network name, %s came before %s." , previous.getName ( ) , network.getName ( ) ) ) ; } previous = network ; } }
Source:
private void updateCanSpecify ( ) { boolean isChangable = ( bootProtocolsAvailable ) && ( getIsStaticAddress ( ) ) ; getAddress ( ) . setChangeProhibitionReason ( ( isChangable && ( ! ( staticIpChangeAllowed ) ) ? org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getConstants ( ) . staticIpAddressSameAsHostname ( ) : null ) ) ; getAddress ( ) . setIsChangable ( ( isChangable && ( staticIpChangeAllowed ) ) ) ; getSubnet ( ) . setIsChangable ( isChangable ) ; getGateway ( ) . setIsChangable ( isChangable ) ; }

Target:
private void updateCanSpecify ( ) { boolean isChangable = ( bootProtocolsAvailable ) && ( getIsStaticAddress ( ) ) ; getAddress ( ) . setChangeProhibitionReason ( ( isChangable && ( ! ( staticIpChangeAllowed ) ) ? org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getConstants ( ) . staticIpAddressSameAsHostname ( ) : null ) ) ; getAddress ( ) . setIsChangeable ( ( isChangable && ( staticIpChangeAllowed ) ) ) ; getSubnet ( ) . setIsChangeable ( isChangable ) ; getGateway ( ) . setIsChangeable ( isChangable ) ; }
Source:
private void updateShareable ( org.ovirt.engine.core.common.businessentities.VolumeType volumeType , org.ovirt.engine.core.common.businessentities.StorageType storageType ) { if ( ( storageType.isBlockDomain ( ) ) && ( volumeType == ( org.ovirt.engine.core.common.businessentities.VolumeType.Sparse ) ) ) { getIsShareable ( ) . setChangeProhibitionReason ( org.ovirt.engine.ui.uicommonweb.models.vms.AbstractDiskModel.CONSTANTS.shareableDiskNotSupportedByConfiguration ( ) ) ; getIsShareable ( ) . setIsChangable ( false ) ; getIsShareable ( ) . setEntity ( false ) ; } else { getIsShareable ( ) . setIsChangable ( isEditEnabled ( ) ) ; } }

Target:
private void updateShareableDiskEnabled ( org.ovirt.engine.core.common.businessentities.StoragePool datacenter ) { boolean isShareableDiskEnabled = ( ( java.lang.Boolean ) ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getConfigValuePreConverted ( ConfigurationValues.ShareableDiskEnabled , datacenter.getCompatibilityVersion ( ) . getValue ( ) ) ) ) ; getIsShareable ( ) . setChangeProhibitionReason ( org.ovirt.engine.ui.uicommonweb.models.vms.AbstractDiskModel.constants.shareableDiskNotSupported ( ) ) ; getIsShareable ( ) . setIsChangable ( ( isShareableDiskEnabled && ( isEditEnabled ( ) ) ) ) ; }
Source:
protected boolean validateSuffix ( java.lang.String suffix , org.ovirt.engine.ui.uicommonweb.models.EntityModel entityModel ) { for ( java.lang.Object object : objectsInSetupMap.values ( ) ) { org.ovirt.engine.core.common.businessentities.VmTemplate template = ( ( org.ovirt.engine.core.common.businessentities.VmTemplate ) ( object ) ) ; if ( ! ( validateName ( ( ( template.getname ( ) ) + suffix ) , template , entityModel ) ) ) { return false ; } } return true ; }

Target:
protected boolean validateSuffix ( java.lang.String suffix , org.ovirt.engine.ui.uicommonweb.models.EntityModel entityModel ) { for ( java.lang.Object object : objectsToClone ) { org.ovirt.engine.core.common.businessentities.VmTemplate template = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.ImportTemplateData ) ( object ) ) . getTemplate ( ) ; if ( ! ( validateName ( ( ( template.getname ( ) ) + suffix ) , template , entityModel ) ) ) { return false ; } } return true ; }
Source:
protected void doEdit ( org.ovirt.engine.ui.uicommonweb.models.templates.TemplateGeneralModel model ) { driver.edit ( model ) ; monitorCount.setText ( java.lang.Integer.toString ( getModel ( ) . getMonitorCount ( ) ) ) ; isStateless.setText ( java.lang.Boolean.toString ( getModel ( ) . getIsStateless ( ) ) ) ; }

Target:
protected void doEdit ( org.ovirt.engine.ui.uicommonweb.models.templates.TemplateGeneralModel model ) { driver.edit ( model ) ; monitorCount.setValue ( java.lang.Integer.toString ( getModel ( ) . getMonitorCount ( ) ) ) ; isStateless.setValue ( java.lang.Boolean.toString ( getModel ( ) . getIsStateless ( ) ) ) ; }
Source:
public void validateWrongDiskImageTypeTemplate ( ) { initializeCommand ( new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ) ; initTemplateDiskImage ( ) ; org.junit.Assert.assertFalse ( command.validate ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getValidationMessages ( ) . contains ( EngineMessage.ACTION_TYPE_FAILED_DISK_IS_NOT_VM_DISK.toString ( ) ) ) ; }

Target:
public void validateWrongDiskImageTypeTemplate ( ) { initializeCommand ( new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ) ; initTemplateDiskImage ( ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( command , EngineMessage.ACTION_TYPE_FAILED_DISK_IS_NOT_VM_DISK ) ; }
Source:
public void render ( org.ovirt.engine.ui.common.widget.table.column.Context context , java.lang.String value , com.google.gwt.safehtml.shared.SafeHtmlBuilder sb ) { if ( value != null ) { com.google.gwt.safehtml.shared.SafeHtml escapedValue = getEscapedValue ( value ) ; com.google.gwt.safehtml.shared.SafeHtml renderedValue = getRenderedValue ( escapedValue ) ; sb.append ( org.ovirt.engine.ui.common.widget.table.column.TextCellWithTooltip.template.textContainer ( styleClass , org.ovirt.engine.ui.common.utils.ElementIdUtils.createTableCellElementId ( elementIdPrefix , columnId , context ) , renderedValue ) ) ; } }

Target:
public void render ( org.ovirt.engine.ui.common.widget.table.cell.Context context , java.lang.String value , com.google.gwt.safehtml.shared.SafeHtmlBuilder sb ) { if ( value != null ) { com.google.gwt.safehtml.shared.SafeHtml escapedValue = getEscapedValue ( value ) ; com.google.gwt.safehtml.shared.SafeHtml renderedValue = getRenderedValue ( escapedValue ) ; sb.append ( org.ovirt.engine.ui.common.widget.table.cell.TextCellWithTooltip.template.textContainer ( styleClass , org.ovirt.engine.ui.common.utils.ElementIdUtils.createTableCellElementId ( elementIdPrefix , columnId , context ) , renderedValue ) ) ; } }
Source:
public boolean matches ( final java.lang.Object o ) { org.ovirt.engine.core.common.queries.SearchParameters param = ( ( org.ovirt.engine.core.common.queries.SearchParameters ) ( o ) ) ; return param.getSearchTypeValue ( ) . equals ( SearchType.VM ) ; }

Target:
private void clusterHasVMs ( ) { org.ovirt.engine.core.common.businessentities.VM vm = new org.ovirt.engine.core.common.businessentities.VM ( ) ; vm.setVdsGroupId ( VDSGroup.DEFAULT_VDS_GROUP_ID ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VM > vmList = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > ( ) ; vmList.add ( vm ) ; org.mockito.Mockito.when ( vmDao.getAllForVdsGroup ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( vmList ) ; }
Source:
public static void getStorageDomainsByConnection ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , java.lang.String connectionPath ) { 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.StorageDomain > ) ( source ) ) : null ; } } ; org.ovirt.engine.core.common.queries.GetStorageDomainsByConnectionParameters param = new org.ovirt.engine.core.common.queries.GetStorageDomainsByConnectionParameters ( ) ; param.setConnection ( connectionPath ) ; if ( storagePoolId != null ) { param.setStoragePoolId ( storagePoolId ) ; } org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetStorageDomainsByConnection , param , aQuery ) ; }

Target:
public static void getGlusterHook ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hookId , boolean includeServerHooks ) { 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.GetGlusterHookById , new org.ovirt.engine.core.common.queries.gluster.GlusterHookQueryParameters ( hookId , includeServerHooks ) , aQuery ) ; }
Source:
public static void getPermittedStorageDomainsByStoragePoolId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId , org.ovirt.engine.core.common.businessentities.ActionGroup actionGroup ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) ; } return source ; } } ; org.ovirt.engine.core.common.queries.GetPermittedStorageDomainsByStoragePoolIdParameters params = new org.ovirt.engine.core.common.queries.GetPermittedStorageDomainsByStoragePoolIdParameters ( ) ; params.setStoragePoolId ( dataCenterId ) ; params.setActionGroup ( actionGroup ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetPermittedStorageDomainsByStoragePoolId , params , aQuery ) ; }

Target:
public static void getDiskList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ( ) ; } } ; org.ovirt.engine.core.common.queries.SearchParameters searchParams = new org.ovirt.engine.core.common.queries.SearchParameters ( "Disks:" , org.ovirt.engine.core.common.interfaces.SearchType.Disk ) ; searchParams.setMaxCount ( 9999 ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , searchParams , aQuery ) ; }
Source:
public boolean validate ( ) { org.ovirt.engine.ui.uicommonweb.validation.IntegerValidation intValidation = new org.ovirt.engine.ui.uicommonweb.validation.IntegerValidation ( ) ; intValidation.setMinimum ( 1 ) ; intValidation.setMaximum ( 65535 ) ; getSpecificStorageValue ( ) . setIsValid ( true ) ; if ( getSpecificStorage ( ) . getEntity ( ) ) { getSpecificStorageValue ( ) . validateEntity ( new org.ovirt.engine.ui.uicommonweb.validation.IValidation [ ] { intValidation , new org.ovirt.engine.ui.uicommonweb.validation.NotEmptyValidation ( ) } ) ; } return getSpecificStorageValue ( ) . getIsValid ( ) ; }

Target:
public boolean validate ( ) { org.ovirt.engine.ui.uicommonweb.validation.LongValidation longValidation = new org.ovirt.engine.ui.uicommonweb.validation.LongValidation ( ) ; longValidation.setMinimum ( 1 ) ; longValidation.setMaximum ( 65535 ) ; getSpecificStorageValue ( ) . setIsValid ( true ) ; if ( getSpecificStorage ( ) . getEntity ( ) ) { getSpecificStorageValue ( ) . validateEntity ( new org.ovirt.engine.ui.uicommonweb.validation.IValidation [ ] { longValidation , new org.ovirt.engine.ui.uicommonweb.validation.NotEmptyValidation ( ) } ) ; } return getSpecificStorageValue ( ) . getIsValid ( ) ; }
Source:
private static org.ovirt.engine.core.common.businessentities.Disk getDisk ( org.ovirt.engine.core.common.businessentities.VM vm , org.ovirt.engine.core.compat.Guid id ) { for ( org.ovirt.engine.core.common.businessentities.Disk disk : vm.getDiskMap ( ) . values ( ) ) { if ( disk.getId ( ) . equals ( id ) ) { return disk ; } } return null ; }

Target:
private static org.ovirt.engine.core.common.businessentities.storage.Disk getDisk ( org.ovirt.engine.core.common.businessentities.VM vm , org.ovirt.engine.core.compat.Guid id ) { for ( org.ovirt.engine.core.common.businessentities.storage.Disk disk : vm.getDiskMap ( ) . values ( ) ) { if ( disk.getId ( ) . equals ( id ) ) { return disk ; } } return null ; }
Source:
private static boolean isBase64 ( byte [ ] octects ) { for ( int i = 0 ; i < ( octects.length ) ; i ++ ) { if ( ! ( org.apache.commons.codec.binary.Base64.isBase64 ( octects [ i ] ) ) ) { return false ; } } return true ; }

Target:
private static boolean isBase64 ( byte [ ] octects ) { for ( byte octect : octects ) { if ( ! ( org.apache.commons.codec.binary.Base64.isBase64 ( octect ) ) ) { return false ; } } return true ; }
Source:
public void getUserMessageOfTheDayViaPublic ( 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.frontend.Frontend.getInstance ( ) . runPublicQuery ( VdcQueryType.GetConfigurationValue , new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.UserMessageOfTheDay , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public void getConfigurationValueBoolean ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.queries.ConfigurationValues configVal ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Boolean ) ( source ) ) . booleanValue ( ) : true ; } } ; getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( configVal , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
public static void GetVmList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String poolName ) { 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 ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > vms = org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VM > Cast ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.IVdcQueryable > ) ( source ) ) ) ; return vms ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( ( "Vms: pool=" + poolName ) , org.ovirt.engine.core.common.interfaces.SearchType.VM ) , aQuery ) ; }

Target:
public static void IsShareableDiskEnabled ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String version ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Boolean ) ( source ) ) . booleanValue ( ) : true ; } } ; org.ovirt.engine.core.common.queries.GetConfigurationValueParameters params = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.ShareableDiskEnabled ) ; params.setVersion ( version ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( params , aQuery ) ; }
Source:
public static void RunMultipleActions ( final java.util.List < org.ovirt.engine.core.common.action.VdcActionType > actionTypes , final java.util.List < org.ovirt.engine.core.common.action.VdcActionParametersBase > parameters , final java.util.List < org.ovirt.engine.ui.uicompat.IFrontendActionAsyncCallback > callbacks , final org.ovirt.engine.ui.uicompat.IFrontendActionAsyncCallback failureCallback , final java.lang.Object state ) { org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runMultipleActions ( actionTypes , parameters , callbacks , failureCallback , state ) ; }

Target:
public java.lang.String getCurrentContext ( ) { return currentContext ; }
Source:
public static void GetProviderCertificateChain ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.businessentities.Provider provider ) { 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.RunQuery ( VdcQueryType.GetProviderCertificateChain , new org.ovirt.engine.core.common.queries.ProviderQueryParameters ( provider ) , aQuery ) ; }

Target:
private static void getVlanParentInterface ( org.ovirt.engine.core.compat.Guid vdsID , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface , 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 ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVlanParent , new org.ovirt.engine.core.common.queries.InterfaceAndIdQueryParameters ( vdsID , iface ) , aQuery ) ; }
Source:
protected boolean canDoAction ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.StoragePoolIsoMap > poolDomains = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStoragePoolIsoMapDao ( ) . getAllForStoragePool ( org.ovirt.engine.core.bll.storage.ReconstructMasterDomainCommand.getStoragePool ( ) . getId ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.StoragePoolIsoMap poolDomain : poolDomains ) { if ( ( poolDomain.getstatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageDomainStatus.Locked ) ) { addInvalidSDStatusMessage ( poolDomain.getstatus ( ) ) ; return false ; } } return org.ovirt.engine.core.bll.storage.ReconstructMasterDomainCommand.initializeVds ( ) ; }

Target:
private boolean checkIsDomainLocked ( org.ovirt.engine.core.common.businessentities.StoragePoolIsoMap domainMap ) { if ( ( org.ovirt.engine.core.common.businessentities.StorageDomainStatus.Locked ) == ( domainMap.getstatus ( ) ) ) { addInvalidSDStatusMessage ( StorageDomainStatus.Locked ) ; return true ; } return false ; }
Source:
private org.ovirt.engine.core.common.businessentities.VdsNetworkInterface createVdsInterface ( java.lang.String name , java.lang.Boolean bonded , java.lang.String bondName , java.lang.String bondOptions ) { org.ovirt.engine.core.common.businessentities.VdsNetworkInterface iface = new org.ovirt.engine.core.common.businessentities.VdsNetworkInterface ( ) ; iface.setId ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; iface.setName ( name ) ; iface.setBonded ( bonded ) ; iface.setBondName ( bondName ) ; iface.setBondOptions ( bondOptions ) ; return iface ; }

Target:
private org.ovirt.engine.core.common.businessentities.VdsNetworkInterface createVdsInterface ( java.lang.String name , java.lang.Boolean bonded , java.lang.String bondName , java.lang.String bondOptions , org.ovirt.engine.core.common.businessentities.NetworkBootProtocol bootProtocol , java.lang.String networkName ) { org.ovirt.engine.core.common.businessentities.VdsNetworkInterface iface = new org.ovirt.engine.core.common.businessentities.VdsNetworkInterface ( ) ; iface.setId ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; iface.setName ( name ) ; iface.setBonded ( bonded ) ; iface.setBondName ( bondName ) ; iface.setBondOptions ( bondOptions ) ; iface.setBootProtocol ( bootProtocol ) ; iface.setNetworkName ( networkName ) ; return iface ; }
Source:
protected void setJobLink ( final org.ovirt.engine.api.model.Action action , org.ovirt.engine.core.common.action.VdcReturnValueBase actionResult ) { org.ovirt.engine.api.model.Job job = new org.ovirt.engine.api.model.Job ( ) ; job.setId ( actionResult.getJobId ( ) . toString ( ) ) ; org.ovirt.engine.api.common.util.LinkHelper.addLinks ( getUriInfo ( ) , job , null , false ) ; action.setJob ( job ) ; }

Target:
protected void setJobLink ( final org.ovirt.engine.api.model.Action action , org.ovirt.engine.core.common.action.VdcReturnValueBase actionResult ) { org.ovirt.engine.api.model.Job job = new org.ovirt.engine.api.model.Job ( ) ; job.setId ( actionResult.getJobId ( ) . toString ( ) ) ; org.ovirt.engine.api.utils.LinkHelper.addLinks ( getUriInfo ( ) , job , null , false ) ; action.setJob ( job ) ; }