auphong2707/dl4se-code-review-dataset huggingface dataset:
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 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 ) ; }
Source:
protected void setUpGetEntityExpectations ( ) throws java.lang.Exception { setUpGetEntityExpectations ( false ) ; }

Target:
public void testRemove ( ) throws java.lang.Exception { setUpGetDomainExpectations ( StorageType.NFS , true ) ; setUpGetConnectionExpectations ( ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.DetachStorageDomainFromPool , org.ovirt.engine.core.common.action.DetachStorageDomainFromPoolParameters.class , new java.lang.String [ ] { "StorageDomainId" , "StoragePoolId" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendAttachedStorageDomainResourceTest.STORAGE_DOMAIN_ID , org.ovirt.engine.api.restapi.resource.BackendAttachedStorageDomainResourceTest.DATA_CENTER_ID } , true , true ) ) ; verifyRemove ( resource.remove ( ) ) ; }
Source:
public org.ovirt.engine.core.common.AuditLogType getAuditLogTypeValue ( ) { return ( ( _fenceSpmCalled ) != null ) && ( ! ( _fenceSpmCalled ) ) ? org.ovirt.engine.core.common.AuditLogType.VDS_MANUAL_FENCE_FAILED_CALL_FENCE_SPM : org.ovirt.engine.core.bll.storage.FenceVdsManualyCommand.getSucceeded ( ) ? org.ovirt.engine.core.common.AuditLogType.VDS_MANUAL_FENCE_STATUS : org.ovirt.engine.core.common.AuditLogType.VDS_MANUAL_FENCE_STATUS_FAILED ; }

Target:
public org.ovirt.engine.core.common.AuditLogType getAuditLogTypeValue ( ) { if ( org.ovirt.engine.core.bll.storage.FenceVdsManualyCommand.isInternalExecution ( ) ) { return ( ( _fenceSpmCalled ) != null ) && ( ! ( _fenceSpmCalled ) ) ? org.ovirt.engine.core.common.AuditLogType.VDS_AUTO_FENCE_FAILED_CALL_FENCE_SPM : org.ovirt.engine.core.bll.storage.FenceVdsManualyCommand.getSucceeded ( ) ? org.ovirt.engine.core.common.AuditLogType.VDS_AUTO_FENCE_STATUS : org.ovirt.engine.core.common.AuditLogType.VDS_AUTO_FENCE_STATUS_FAILED ; } else { return ( ( _fenceSpmCalled ) != null ) && ( ! ( _fenceSpmCalled ) ) ? org.ovirt.engine.core.common.AuditLogType.VDS_MANUAL_FENCE_FAILED_CALL_FENCE_SPM : org.ovirt.engine.core.bll.storage.FenceVdsManualyCommand.getSucceeded ( ) ? org.ovirt.engine.core.common.AuditLogType.VDS_MANUAL_FENCE_STATUS : org.ovirt.engine.core.common.AuditLogType.VDS_MANUAL_FENCE_STATUS_FAILED ; } }
Source:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.hosts.HostModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.hosts.HostModel ) ( target ) ) ; model.defaultSpmPriority = ( ( java.lang.Integer ) ( returnValue ) ) ; if ( ( postponedSpmPriority ) != null ) { updateSpmPriority ( postponedSpmPriority ) ; } spmInitialized = true ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { java.util.List < java.lang.String > pmOptions = ( ( java.util.ArrayList < java.lang.String > ) ( returnValue ) ) ; if ( pmOptions != null ) { getPmPort ( ) . setIsAvailable ( pmOptions.contains ( org.ovirt.engine.ui.uicommonweb.models.hosts.HostModel.PmPortKey ) ) ; getPmSlot ( ) . setIsAvailable ( pmOptions.contains ( org.ovirt.engine.ui.uicommonweb.models.hosts.HostModel.PmSlotKey ) ) ; getPmSecure ( ) . setIsAvailable ( pmOptions.contains ( org.ovirt.engine.ui.uicommonweb.models.hosts.HostModel.PmSecureKey ) ) ; } }
Source:
public void testValidateAndSetStorageQuotaSpecificInGrace ( ) throws java.lang.Exception { java.util.List < org.ovirt.engine.core.bll.quota.StorageQuotaValidationParameter > parameters = new java.util.ArrayList < org.ovirt.engine.core.bll.quota.StorageQuotaValidationParameter > ( ) ; parameters.add ( new org.ovirt.engine.core.bll.quota.StorageQuotaValidationParameter ( org.ovirt.engine.core.bll.quota.QuotaManagerTest.STORAGE_QUOTA_SPECIFIC_IN_GRACE , org.ovirt.engine.core.bll.quota.QuotaManagerTest.DESTINATION_GUID , 1 ) ) ; org.junit.Assert.assertTrue ( quotaManager.validateAndSetStorageQuota ( storage_pool , parameters , canDoActionMessages ) ) ; assertEmptyCanDoActionMessage ( ) ; assertAuditLogWritten ( ) ; }

Target:
public void testValidateAndSetStorageQuotaSpecificNotExceeded ( ) throws java.lang.Exception { org.junit.Assert.assertTrue ( consumeForStorageQuota ( org.ovirt.engine.core.bll.quota.QuotaManagerTest.STORAGE_QUOTA_SPECIFIC_NOT_EXCEEDED ) ) ; assertEmptyCanDoActionMessage ( ) ; assertAuditLogNotWritten ( ) ; }
Source:
protected void expectGetLunsMap ( org.ovirt.engine.core.dao.StorageServerConnectionLunMapDAO dao ) { for ( int i = 0 ; i < ( org.ovirt.engine.core.bll.GetLunsByVgIdTest.GUIDS.length ) ; i ++ ) { expectGetLunsMap ( dao , org.ovirt.engine.core.bll.GetLunsByVgIdTest.GUIDS [ i ] . toString ( ) , org.ovirt.engine.core.bll.GetLunsByVgIdTest.GUIDS [ i ] . toString ( ) ) ; } }

Target:
protected void expectGetLunsMap ( org.ovirt.engine.core.dao.StorageServerConnectionLunMapDao dao ) { for ( int i = 0 ; i < ( org.ovirt.engine.core.bll.GetLunsByVgIdTest.GUIDS.length ) ; i ++ ) { expectGetLunsMap ( dao , org.ovirt.engine.core.bll.GetLunsByVgIdTest.GUIDS [ i ] . toString ( ) , org.ovirt.engine.core.bll.GetLunsByVgIdTest.GUIDS [ i ] . toString ( ) ) ; } }
Source:
public void testNotManagementNetworkPositive ( ) { org.mockito.Mockito.when ( network.getId ( ) ) . thenReturn ( org.ovirt.engine.core.bll.validator.NetworkValidatorTest.DEFAULT_GUID ) ; org.mockito.Mockito.when ( managementNetworkUtil.isManagementNetwork ( org.ovirt.engine.core.bll.validator.NetworkValidatorTest.DEFAULT_GUID ) ) . thenReturn ( true ) ; org.junit.Assert.assertThat ( validator.notManagementNetwork ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.NETWORK_CANNOT_REMOVE_MANAGEMENT_NETWORK ) ) ; }

Target:
public void testNotManagementNetworkPositive ( ) { org.mockito.Mockito.when ( network.getId ( ) ) . thenReturn ( org.ovirt.engine.core.bll.validator.NetworkValidatorTest.DEFAULT_GUID ) ; org.mockito.Mockito.when ( managementNetworkUtil.isManagementNetwork ( org.ovirt.engine.core.bll.validator.NetworkValidatorTest.DEFAULT_GUID ) ) . thenReturn ( true ) ; org.hamcrest.MatcherAssert.assertThat ( validator.notManagementNetwork ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.NETWORK_CANNOT_REMOVE_MANAGEMENT_NETWORK ) ) ; }
Source:
protected void executeQueryCommand ( ) { org.ovirt.engine.core.bll.FenceExecutor executor = new org.ovirt.engine.core.bll.FenceExecutor ( getHost ( ) ) ; org.ovirt.engine.core.common.vdscommands.VDSFenceReturnValue result = executor.checkStatus ( ) ; if ( result.getSucceeded ( ) ) { org.ovirt.engine.core.bll.GetNewVdsFenceStatusQuery.getQueryReturnValue ( ) . setReturnValue ( result.getReturnValue ( ) ) ; } else { handleError ( result ) ; } }

Target:
protected void executeQueryCommand ( ) { org.ovirt.engine.core.bll.FenceExecutor executor = new org.ovirt.engine.core.bll.FenceExecutor ( getHost ( ) ) ; org.ovirt.engine.core.common.vdscommands.VDSFenceReturnValue result = executor.checkAgentStatus ( org.ovirt.engine.core.bll.GetFenceAgentStatusQuery.getParameters ( ) . getAgent ( ) ) ; if ( result.getSucceeded ( ) ) { org.ovirt.engine.core.bll.GetFenceAgentStatusQuery.getQueryReturnValue ( ) . setReturnValue ( result.getReturnValue ( ) ) ; } else { handleError ( result ) ; } }
Source:
private void removeVmImages ( ) { java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > imageParams = org.ovirt.engine.core.bll.AddVmAndCloneImageCommand.getParameters ( ) . getImagesParameters ( ) ; if ( imageParams != null ) { for ( org.ovirt.engine.core.common.action.VdcActionParametersBase param : imageParams ) { org.ovirt.engine.core.common.businessentities.DiskImage diskImage = getDiskImageToRemoveByParam ( ( ( org.ovirt.engine.core.common.action.MoveOrCopyImageGroupParameters ) ( param ) ) ) ; if ( diskImage != null ) { org.ovirt.engine.core.bll.ImagesHandler.removeDiskImage ( diskImage ) ; } } } }

Target:
private void removeVmImages ( ) { java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > imageParams = org.ovirt.engine.core.bll.AddVmAndCloneImageCommand.getParameters ( ) . getImagesParameters ( ) ; if ( imageParams != null ) { for ( org.ovirt.engine.core.common.action.VdcActionParametersBase param : imageParams ) { org.ovirt.engine.core.common.businessentities.DiskImage diskImage = getDiskImageToRemoveByParam ( ( ( org.ovirt.engine.core.common.action.MoveOrCopyImageGroupParameters ) ( param ) ) ) ; if ( diskImage != null ) { org.ovirt.engine.core.bll.ImagesHandler.removeDiskImage ( diskImage , org.ovirt.engine.core.bll.AddVmAndCloneImageCommand.getVmId ( ) ) ; } } } }
Source:
public java.util.List < org.ovirt.engine.core.common.businessentities.Erratum > getErrataForHost ( java.lang.String hostName ) { org.ovirt.engine.core.bll.host.provider.foreman.ContentHost contentHost = findContentHost ( hostName ) ; if ( contentHost == null ) { log.error ( "Failed to find host on provider '{}' by host name '{}' " , getProvider ( ) . getName ( ) , hostName ) ; return java.util.Collections.emptyList ( ) ; } return runErrataListMethod ( java.lang.String.format ( org.ovirt.engine.core.bll.host.provider.foreman.ForemanHostProviderProxy.CONTENT_HOST_ERRATA_ENTRY_POINT , contentHost.getUuid ( ) ) ) ; }

Target:
public java.util.List < org.ovirt.engine.core.common.businessentities.Erratum > getErrataForHost ( java.lang.String hostName ) { return getContentHostProvider ( ) . getErrataForHost ( hostName ) ; }
Source:
public org.ovirt.engine.ui.uicommonweb.models.configure.roles_ui.RolePermissionListModel getModel ( ) { return ( ( org.ovirt.engine.ui.uicommonweb.models.configure.roles_ui.RolePermissionListModel ) ( getCommonModel ( ) . getRoleListModel ( ) . getDetailModels ( ) . get ( 0 ) ) ) ; }

Target:
public org.ovirt.engine.ui.common.presenter.AbstractModelBoundPopupPresenterWidget < ? extends org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel , ? > getConfirmModelPopup ( org.ovirt.engine.ui.uicommonweb.models.configure.roles_ui.RolePermissionListModel source , org.ovirt.engine.ui.uicommonweb.UICommand lastExecutedCommand ) { if ( lastExecutedCommand == ( getModel ( ) . getRemoveCommand ( ) ) ) { return removeConfirmPopupProvider.get ( ) ; } else { return super . getConfirmModelPopup ( source , lastExecutedCommand ) ; } }
Source:
public static void initOsNames ( ) { org.ovirt.engine.ui.frontend.AsyncQuery callback = new org.ovirt.engine.ui.frontend.AsyncQuery ( ) ; callback.asyncCallback = new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.osNames = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.initOsIds ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.OsRepository , new org.ovirt.engine.core.common.queries.OsQueryParameters ( org.ovirt.engine.core.common.queries.OsQueryParameters.OsRepositoryVerb.GetOsNames ) , callback ) ; }

Target:
public void initOsArchitecture ( ) { org.ovirt.engine.ui.frontend.AsyncQuery callback = new org.ovirt.engine.ui.frontend.AsyncQuery ( ) ; callback.asyncCallback = new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { osArchitectures = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.OsRepository , new org.ovirt.engine.core.common.queries.OsQueryParameters ( org.ovirt.engine.core.common.queries.OsQueryParameters.OsRepositoryVerb.GetOsArchitectures ) , callback ) ; }
Source:
public void getExistingStorageDomainList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hostId , org.ovirt.engine.core.common.businessentities.StorageDomainType domainType , org.ovirt.engine.core.common.businessentities.StorageType storageType , java.lang.String path ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetExistingStorageDomainList , new org.ovirt.engine.core.common.queries.GetExistingStorageDomainListParameters ( hostId , storageType , domainType , path ) , aQuery ) ; }

Target:
public void getGlusterSnapshotConfig ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId , org.ovirt.engine.core.compat.Guid volumeId ) { aQuery.setHandleFailure ( true ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterVolumeSnapshotConfig , new org.ovirt.engine.core.common.queries.gluster.GlusterVolumeQueriesParameters ( clusterId , volumeId ) , aQuery ) ; }
Source:
protected void endExecutionMonitoring ( ) { if ( ( org.ovirt.engine.core.bll.RunVmCommand.getVm ( ) . isRunAndPause ( ) ) && ( ( vmDynamicDao.get ( org.ovirt.engine.core.bll.RunVmCommand.getVmId ( ) ) . getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.Paused ) ) ) { final org.ovirt.engine.core.bll.job.ExecutionContext executionContext = org.ovirt.engine.core.bll.RunVmCommand.getExecutionContext ( ) ; executionContext.setShouldEndJob ( true ) ; executionHandler.endJob ( executionContext , true ) ; } else { super . endExecutionMonitoring ( ) ; } }

Target:
private void removeMemoryFromActiveSnapshot ( ) { java.lang.String memory = org.ovirt.engine.core.bll.RunVmCommand.getActiveSnapshot ( ) . getMemoryVolume ( ) ; if ( org.apache.commons.lang.StringUtils.isEmpty ( memory ) ) { return ; } snapshotDao.removeMemoryFromActiveSnapshot ( org.ovirt.engine.core.bll.RunVmCommand.getVmId ( ) ) ; if ( ( snapshotDao.getNumOfSnapshotsByMemory ( memory ) ) == 0 ) { org.ovirt.engine.core.bll.RunVmCommand.removeMemoryDisks ( memory ) ; } }
Source:
public void testIsNetworkInSyncWhenStaticBootProtocolNetmaskDifferent ( ) throws java.lang.Exception { initIpConfigurationBootProtocolNetmask ( org.ovirt.engine.core.utils.NetworkInSyncWithVdsNetworkInterfaceTest.BOOT_PROTOCOL , false ) ; iface.setIpv4BootProtocol ( org.ovirt.engine.core.common.businessentities.network.NetworkBootProtocol.forValue ( ( ( ( org.ovirt.engine.core.utils.NetworkInSyncWithVdsNetworkInterfaceTest.BOOT_PROTOCOL.getValue ( ) ) + 1 ) % ( org.ovirt.engine.core.common.businessentities.network.NetworkBootProtocol.values ( ) . length ) ) ) ) ; org.junit.Assert.assertThat ( createTestedInstance ( ) . isNetworkInSync ( ) , org.hamcrest.CoreMatchers.is ( false ) ) ; }

Target:
public void testIsNetworkInSyncWhenIpv4StaticBootProtocolAddressDifferent ( ) throws java.lang.Exception { initIpv4ConfigurationBootProtocolAddress ( org.ovirt.engine.core.utils.NetworkInSyncWithVdsNetworkInterfaceTest.IPV4_BOOT_PROTOCOL , false ) ; iface.setIpv4BootProtocol ( org.ovirt.engine.core.common.businessentities.network.Ipv4BootProtocol.forValue ( ( ( ( org.ovirt.engine.core.utils.NetworkInSyncWithVdsNetworkInterfaceTest.IPV4_BOOT_PROTOCOL.getValue ( ) ) + 1 ) % ( org.ovirt.engine.core.common.businessentities.network.Ipv4BootProtocol.values ( ) . length ) ) ) ) ; org.junit.Assert.assertThat ( createTestedInstance ( ) . isNetworkInSync ( ) , org.hamcrest.CoreMatchers.is ( false ) ) ; }
Source:
public void testGetAllByStoragePoolAndConnectionWithInvalidInput ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > result = dao.getAllByStoragePoolAndConnection ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) , org.ovirt.engine.core.utils.RandomUtils.instance ( ) . nextString ( 10 ) ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertTrue ( result.isEmpty ( ) ) ; }

Target:
public void testGetAllByStoragePoolAndConnectionWithInvalidInput ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > result = dao.getAllByStoragePoolAndConnection ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , org.ovirt.engine.core.utils.RandomUtils.instance ( ) . nextString ( 10 ) ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertTrue ( result.isEmpty ( ) ) ; }
Source:
public void getHostById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVdsByVdsId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
public 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 ) ; }
Source:
protected java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DbUser > getUsers ( ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DbUser > users = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DbUser > ( ) ; for ( int i = 0 ; i < ( NAMES.length ) ; i ++ ) { org.ovirt.engine.core.common.businessentities.DbUser user = new org.ovirt.engine.core.common.businessentities.DbUser ( ) ; user.setuser_id ( GUIDS [ i ] ) ; user.setname ( NAMES [ i ] ) ; user.setusername ( NAMES [ i ] ) ; users.add ( user ) ; } return users ; }

Target:
protected org.ovirt.engine.core.common.businessentities.DbUser getUserByIdx ( int idx ) { org.ovirt.engine.core.common.businessentities.DbUser user = new org.ovirt.engine.core.common.businessentities.DbUser ( ) ; user.setuser_id ( GUIDS [ idx ] ) ; user.setname ( NAMES [ idx ] ) ; user.setusername ( NAMES [ idx ] ) ; return user ; }
Source:
public void getStorageConnectionsByDataCenterIdAndStorageType ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.common.businessentities.storage.StorageType storageType ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.core.common.queries.GetConnectionsByDataCenterAndStorageTypeParameters params = new org.ovirt.engine.core.common.queries.GetConnectionsByDataCenterAndStorageTypeParameters ( storagePoolId , storageType ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetConnectionsByDataCenterAndStorageType , params , aQuery ) ; }

Target:
public void getExternalProviderDiscoveredHostList ( 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 ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ExternalDiscoveredHost > ( ) ; } return source ; } } ; org.ovirt.engine.core.common.queries.ProviderQueryParameters params = new org.ovirt.engine.core.common.queries.ProviderQueryParameters ( ) ; params.setProvider ( provider ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetDiscoveredHostListFromExternalProvider , params , aQuery ) ; }
Source:
public void testExistingDiscardFunctionalityIsNotPreservedSdDiscardZeroesTheDataSupportBreaks ( ) { setSdDiscardFunctionality ( true , true ) ; createVmDiskOnSd ( false , false ) ; createVmDiskOnSd ( true , true ) ; junit.framework.Assert.assertFalse ( discardHelper.isExistingDiscardFunctionalityPreserved ( java.util.Arrays.asList ( createLunWithDiscardFunctionality ( 1024L , false ) , createLunWithDiscardFunctionality ( 2048L , true ) ) , storageDomain ) ) ; }

Target:
public void testExistingPassDiscardFunctionalityIsNotPreservedSdDiscardZeroesTheDataSupportBreaks ( ) { setSdDiscardSupport ( true , true ) ; createVmDiskOnSd ( false , false ) ; createVmDiskOnSd ( true , true ) ; junit.framework.Assert.assertFalse ( discardHelper.isExistingPassDiscardFunctionalityPreserved ( java.util.Arrays.asList ( createLunWithDiscardFunctionality ( 1024L , false ) , createLunWithDiscardFunctionality ( 2048L , true ) ) , storageDomain ) ) ; }
Source:
protected org.ovirt.engine.core.vdsbroker.vdsbroker.IVdsServer initializeVdsBroker ( org.ovirt.engine.core.compat.Guid vdsId ) { org.ovirt.engine.core.vdsbroker.VdsManager vdsmanager = org.ovirt.engine.core.vdsbroker.ResourceManager.getInstance ( ) . GetVdsManager ( vdsId ) ; if ( vdsmanager == null ) { throw new org.ovirt.engine.core.common.errors.EngineException ( org.ovirt.engine.core.common.errors.EngineError.RESOURCE_MANAGER_VDS_NOT_FOUND , java.lang.String.format ( "Vds with id: %1$s was not found" , vdsId ) ) ; } setVdsAndVdsStatic ( vdsmanager.getCopyVds ( ) ) ; return vdsmanager.getVdsProxy ( ) ; }

Target:
protected org.ovirt.engine.core.vdsbroker.vdsbroker.IVdsServer initializeVdsBroker ( org.ovirt.engine.core.compat.Guid vdsId ) { org.ovirt.engine.core.vdsbroker.VdsManager vdsmanager = org.ovirt.engine.core.vdsbroker.ResourceManager.getInstance ( ) . getVdsManager ( vdsId ) ; if ( vdsmanager == null ) { throw new org.ovirt.engine.core.common.errors.EngineException ( org.ovirt.engine.core.common.errors.EngineError.RESOURCE_MANAGER_VDS_NOT_FOUND , java.lang.String.format ( "Vds with id: %1$s was not found" , vdsId ) ) ; } setVdsAndVdsStatic ( vdsmanager.getCopyVds ( ) ) ; return vdsmanager.getVdsProxy ( ) ; }
Source:
public void testUpdate ( ) throws java.lang.Exception { setUpGetEntityExpectations ( 3 , VMStatus.Down ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.UpdateVm , org.ovirt.engine.core.common.action.VmManagementParametersBase.class , new java.lang.String [ ] { "VmStaticData.IsoPath" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendCdRomResourceTest.ISO_PATH } , true , true ) ) ; org.ovirt.engine.api.model.CdRom cdrom = resource.update ( getUpdate ( ) ) ; assertTrue ( cdrom.isSetFile ( ) ) ; }

Target:
public void testUpdate ( ) throws java.lang.Exception { setUpGetEntityExpectations ( 3 , VMStatus.Down ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.UpdateVm , org.ovirt.engine.core.common.action.VmManagementParametersBase.class , new java.lang.String [ ] { "VmStaticData.IsoPath" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.AbstractBackendCdRomsResourceTest.ISO_PATH } , true , true ) ) ; org.ovirt.engine.api.model.CdRom cdrom = resource.update ( getUpdate ( ) ) ; assertTrue ( cdrom.isSetFile ( ) ) ; }
Source:
public void testGetBrickByQualifiedName ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity > bricks = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity > ( ) ; bricks.add ( brick1 ) ; bricks.add ( brick2 ) ; bricks.add ( brick3 ) ; org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity brick = org.ovirt.engine.core.common.utils.gluster.GlusterCoreUtil.getBrickByQualifiedName ( bricks , ( ( ( SERVER_1 ) + ":" ) + ( DIR_1 ) ) ) ; org.junit.Assert.assertNotNull ( brick ) ; org.junit.Assert.assertEquals ( brick1.getId ( ) , brick.getId ( ) ) ; }

Target:
public void testGetBrickByQualifiedName ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity > bricks = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity > ( ) ; bricks.add ( org.ovirt.engine.core.common.utils.gluster.GlusterCoreUtilTest.brick1 ) ; bricks.add ( org.ovirt.engine.core.common.utils.gluster.GlusterCoreUtilTest.brick2 ) ; bricks.add ( org.ovirt.engine.core.common.utils.gluster.GlusterCoreUtilTest.brick3 ) ; org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity brick = org.ovirt.engine.core.common.utils.gluster.GlusterCoreUtil.getBrickByQualifiedName ( bricks , ( ( ( org.ovirt.engine.core.common.utils.gluster.GlusterCoreUtilTest.SERVER_1 ) + ":" ) + ( org.ovirt.engine.core.common.utils.gluster.GlusterCoreUtilTest.DIR_1 ) ) ) ; org.junit.Assert.assertNotNull ( brick ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.common.utils.gluster.GlusterCoreUtilTest.brick1.getId ( ) , brick.getId ( ) ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc clearTask ( java.lang.String taskUUID ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "Task.clear" ) . withParameter ( "taskID" , taskUUID ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( response ) ; }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturn clearTask ( java.lang.String taskUUID ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "Task.clear" ) . withParameter ( "taskID" , taskUUID ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturn ( response ) ; }
Source:
public void testGetLunsToUpdateInDbDiffDeviceSize ( ) { setLunsSameLunAndPvIds ( ) ; lunFromVg.setDeviceSize ( 20 ) ; lunFromDb.setDeviceSize ( 10 ) ; java.util.List < org.ovirt.engine.core.common.businessentities.storage.LUNs > existingLunsToUpdateInDb = getLunsToUpdateInDb ( ) . get ( command.updateExistingLuns ) ; assertLunIdInList ( existingLunsToUpdateInDb , lunFromVg.getLUNId ( ) ) ; }

Target:
private void assertLunShouldBeUpdatedDueToFieldChange ( ) { setLunsSameLunAndPvIds ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.storage.LUNs > existingLunsToUpdateInDb = getLunsToUpdateInDb ( ) . get ( command.updateExistingLuns ) ; assertLunIdInList ( existingLunsToUpdateInDb , lunFromVg.getLUNId ( ) ) ; }
Source:
public void save ( org.ovirt.engine.core.common.businessentities.VdsStatic vds ) { java.util.Map < java.lang.String , java.lang.Object > dbResults = new org.springframework.jdbc.core.simple.SimpleJdbcCall ( jdbcTemplate ) . withProcedureName ( "InsertVdsStatic" ) . execute ( getInsertOrUpdateParams ( vds ) ) ; vds.setId ( new org.ovirt.engine.core.compat.Guid ( dbResults.get ( "vds_id" ) . toString ( ) ) ) ; }

Target:
public void save ( org.ovirt.engine.core.common.businessentities.VdsStatic vds ) { org.ovirt.engine.core.compat.Guid id = vds.getId ( ) ; if ( org.ovirt.engine.core.compat.Guid.isNullOrEmpty ( id ) ) { id = org.ovirt.engine.core.compat.Guid.NewGuid ( ) ; vds.setId ( id ) ; } new org.springframework.jdbc.core.simple.SimpleJdbcCall ( jdbcTemplate ) . withProcedureName ( "InsertVdsStatic" ) . execute ( getInsertOrUpdateParams ( vds ) ) ; }
Source:
private void DiskInterface_SelectedItemChanged ( ) { boolean isInternal = ( ( java.lang.Boolean ) ( getIsInternal ( ) . getEntity ( ) ) ) ; org.ovirt.engine.core.common.businessentities.DiskInterface diskInterface = ( ( org.ovirt.engine.core.common.businessentities.DiskInterface ) ( getDiskInterface ( ) . getSelectedItem ( ) ) ) ; getIsSgIoUnfiltered ( ) . setIsAvailable ( ( ( ! isInternal ) && ( DiskInterface.VirtIO_SCSI.equals ( diskInterface ) ) ) ) ; updateReadOnlyChangeability ( ) ; }

Target:
private void DiskInterface_SelectedItemChanged ( ) { boolean isInternal = ( ( java.lang.Boolean ) ( getIsInternal ( ) . getEntity ( ) ) ) ; org.ovirt.engine.core.common.businessentities.DiskInterface diskInterface = ( ( org.ovirt.engine.core.common.businessentities.DiskInterface ) ( getDiskInterface ( ) . getSelectedItem ( ) ) ) ; getIsSgIoUnfiltered ( ) . setIsAvailable ( ( ( ! isInternal ) && ( DiskInterface.VirtIO_SCSI.equals ( diskInterface ) ) ) ) ; updateReadOnlyChangeability ( ) ; updatePlugChangeability ( ) ; }
Source:
private static org.ovirt.engine.core.common.businessentities.VDSGroup createVdsGroupWithNoCpuName ( ) { org.ovirt.engine.core.common.businessentities.VDSGroup group = new org.ovirt.engine.core.common.businessentities.VDSGroup ( ) ; group.setName ( "Default" ) ; group.setId ( org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.DEFAULT_VDS_GROUP_ID ) ; group.setcompatibility_version ( org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.VERSION_1_1 ) ; group.setStoragePoolId ( org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.STORAGE_POOL_ID ) ; group.setArchitecture ( ArchitectureType.undefined ) ; return group ; }

Target:
private static org.ovirt.engine.core.common.businessentities.VDSGroup createVdsGroupWithDifferentName ( ) { org.ovirt.engine.core.common.businessentities.VDSGroup group = new org.ovirt.engine.core.common.businessentities.VDSGroup ( ) ; group.setName ( "BadName" ) ; group.setCompatibilityVersion ( org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.VERSION_1_1 ) ; return group ; }
Source:
public void loadVmsFromKvm ( ) { clearForLoad ( ) ; if ( ! ( validateKvmConfiguration ( ) ) ) { return ; } org.ovirt.engine.core.compat.Guid proxyId = ( ( getXenProxyHosts ( ) . getSelectedItem ( ) ) != null ) ? getXenProxyHosts ( ) . getSelectedItem ( ) . getId ( ) : null ; loadVMsFromExternalProvider ( OriginType.KVM , getKvmUri ( ) . getEntity ( ) , getKvmUsername ( ) . getEntity ( ) , getKvmPassword ( ) . getEntity ( ) , proxyId ) ; }

Target:
public void loadVmsFromKvm ( ) { clearForLoad ( ) ; if ( ! ( validateKvmConfiguration ( ) ) ) { return ; } org.ovirt.engine.core.compat.Guid proxyId = ( ( getKvmProxyHosts ( ) . getSelectedItem ( ) ) != null ) ? getKvmProxyHosts ( ) . getSelectedItem ( ) . getId ( ) : null ; loadVMsFromExternalProvider ( OriginType.KVM , getKvmUri ( ) . getEntity ( ) , getKvmUsername ( ) . getEntity ( ) , getKvmPassword ( ) . getEntity ( ) , proxyId ) ; }
Source:
public static void GetHostListByDataCenter ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid spId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > list = org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VDS > cast ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.IVdcQueryable > ) ( source ) ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllVdsByStoragePool , new org.ovirt.engine.core.common.queries.GetAllVdsByStoragePoolParameters ( spId ) , aQuery ) ; }

Target:
public static void getHostListByDataCenter ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid spId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > list = org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VDS > cast ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.IVdcQueryable > ) ( source ) ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllVdsByStoragePool , new org.ovirt.engine.core.common.queries.GetAllVdsByStoragePoolParameters ( spId ) , aQuery ) ; }
Source:
private void rollback5 ( ) { org.ovirt.engine.ui.uicompat.Enlistment enlistment = context.enlistment ; org.ovirt.engine.ui.uicommonweb.models.hosts.EnlistmentContext enlistmentContext = ( ( org.ovirt.engine.ui.uicommonweb.models.hosts.EnlistmentContext ) ( enlistment.getContext ( ) ) ) ; if ( ( enlistmentContext.getDataCenterId ( ) ) != null ) { org.ovirt.engine.ui.frontend.Frontend.RunAction ( VdcActionType.RemoveStoragePool , new org.ovirt.engine.core.common.action.StoragePoolParametersBase ( enlistmentContext.getDataCenterId ( ) ) ) ; } context.enlistment = null ; enlistment.Done ( ) ; }

Target:
private void rollback5 ( ) { org.ovirt.engine.ui.uicompat.Enlistment enlistment = context.enlistment ; org.ovirt.engine.ui.uicommonweb.models.hosts.EnlistmentContext enlistmentContext = ( ( org.ovirt.engine.ui.uicommonweb.models.hosts.EnlistmentContext ) ( enlistment.getContext ( ) ) ) ; if ( ( enlistmentContext.getDataCenterId ( ) ) != null ) { org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runAction ( VdcActionType.RemoveStoragePool , new org.ovirt.engine.core.common.action.StoragePoolParametersBase ( enlistmentContext.getDataCenterId ( ) ) ) ; } context.enlistment = null ; enlistment.Done ( ) ; }
Source:
public com.google.gwt.safehtml.shared.SafeHtml getTooltip ( org.ovirt.engine.ui.uicommonweb.models.EntityModel object ) { return null ; }

Target:
protected java.lang.Long getRawValue ( org.ovirt.engine.ui.uicommonweb.models.EntityModel object ) { org.ovirt.engine.core.common.businessentities.storage.LunDisk disk = ( ( org.ovirt.engine.core.common.businessentities.storage.LunDisk ) ( ( ( org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel ) ( object.getEntity ( ) ) ) . getDisk ( ) ) ) ; return ( ( long ) ( disk.getLun ( ) . getDeviceSize ( ) ) ) ; }
Source:
private void updateInfoPanel ( ) { org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface vmNetworkInterface = ( ( org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface ) ( getModel ( ) . getSelectedItem ( ) ) ) ; if ( ( vmNetworkInterface != null ) && ( ! ( getTable ( ) . getSelectionModel ( ) . isSelected ( vmNetworkInterface ) ) ) ) { getTable ( ) . getSelectionModel ( ) . setSelected ( vmNetworkInterface , true ) ; } vmInterfaceInfoPanel.updatePanel ( vmNetworkInterface ) ; }

Target:
private void updateInfoPanel ( ) { final org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface vmNetworkInterface = ( ( org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface ) ( getModel ( ) . getSelectedItem ( ) ) ) ; if ( ( vmNetworkInterface != null ) && ( ! ( getTable ( ) . getSelectionModel ( ) . isSelected ( vmNetworkInterface ) ) ) ) { com.google.gwt.core.client.Scheduler.get ( ) . scheduleDeferred ( new com.google.gwt.core.client.Scheduler.ScheduledCommand ( ) { @ java.lang.Override public void execute ( ) { getTable ( ) . getSelectionModel ( ) . setSelected ( vmNetworkInterface , true ) ; } } ) ; } vmInterfaceInfoPanel.updatePanel ( vmNetworkInterface ) ; }
Source:
public void testListWithEveryonePermissions ( ) throws java.lang.Exception { javax.ws.rs.core.UriInfo uriInfo = setUpUriExpectations ( null ) ; setUpGetEntityExpectations ( QueryType.GetDbUserByUserId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ 1 ] } , getUserByIdx ( 1 ) ) ; setUpQueryExpectations ( "" , null , org.ovirt.engine.api.restapi.resource.EVERYONE ) ; collection.setUriInfo ( uriInfo ) ; verifyCollection ( getCollection ( ) ) ; }

Target:
public void testListWithEveryonePermissions ( ) throws java.lang.Exception { javax.ws.rs.core.UriInfo uriInfo = setUpUriExpectations ( null ) ; setUpGetEntityExpectations ( QueryType.GetAnyDbUserByUserId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ 1 ] } , getUserByIdx ( 1 ) ) ; setUpQueryExpectations ( "" , null , org.ovirt.engine.api.restapi.resource.EVERYONE ) ; collection.setUriInfo ( uriInfo ) ; verifyCollection ( getCollection ( ) ) ; }
Source:
public final boolean ConnectToServer ( java.lang.String server , java.lang.String certPath , java.lang.String password ) { org.ovirt.engine.core.utils.hostinstall.Credentials creds = new org.ovirt.engine.core.utils.hostinstall.Credentials ( ) ; creds.setPassphrase ( password ) ; creds.setCertPath ( certPath ) ; creds.setUsername ( "root" ) ; return _do_connect ( server , creds ) ; }

Target:
public final boolean connect ( java.lang.String server , java.lang.String certPath , java.lang.String password ) { org.ovirt.engine.core.utils.hostinstall.Credentials creds = new org.ovirt.engine.core.utils.hostinstall.Credentials ( ) ; creds.setPassphrase ( password ) ; creds.setCertPath ( certPath ) ; creds.setUsername ( "root" ) ; return _do_connect ( server , creds ) ; }
Source:
protected void setUpFormatDomain ( boolean shouldFail ) { org.ovirt.engine.core.common.vdscommands.VDSReturnValue ret = new org.ovirt.engine.core.common.vdscommands.VDSReturnValue ( ) ; ret.setSucceeded ( ( ! shouldFail ) ) ; org.mockito.Mockito.doReturn ( ret ) . when ( command ) . runVdsCommand ( org.mockito.Matchers.eq ( VDSCommandType.FormatStorageDomain ) , org.mockito.Matchers.any ( org.ovirt.engine.core.common.vdscommands.FormatStorageDomainVDSCommandParameters.class ) ) ; }

Target:
protected void setUpFormatDomain ( boolean shouldFail ) { org.ovirt.engine.core.common.vdscommands.VDSReturnValue ret = new org.ovirt.engine.core.common.vdscommands.VDSReturnValue ( ) ; ret.setSucceeded ( ( ! shouldFail ) ) ; org.mockito.Mockito.doReturn ( ret ) . when ( command ) . runVdsCommand ( org.mockito.ArgumentMatchers.eq ( VDSCommandType.FormatStorageDomain ) , org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.common.vdscommands.FormatStorageDomainVDSCommandParameters.class ) ) ; }
Source:
public void Executed ( org.ovirt.engine.ui.uicompat.FrontendMultipleQueryAsyncResult result ) { java.util.List < org.ovirt.engine.core.common.queries.VdcQueryReturnValue > returnValueList = result.getReturnValues ( ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > clusters = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ) ( returnValueList.get ( 0 ) . getReturnValue ( ) ) ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmTemplate > templates = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmTemplate > ) ( returnValueList.get ( 1 ) . getReturnValue ( ) ) ) ; InitClusters ( clusters , true , false ) ; InitTemplates ( templates ) ; InitCdImage ( ) ; }

Target:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendMultipleQueryAsyncResult result ) { java.util.List < org.ovirt.engine.core.common.queries.VdcQueryReturnValue > returnValueList = result.getReturnValues ( ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > clusters = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ) ( returnValueList.get ( 0 ) . getReturnValue ( ) ) ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmTemplate > templates = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmTemplate > ) ( returnValueList.get ( 1 ) . getReturnValue ( ) ) ) ; InitClusters ( clusters , true , false ) ; InitTemplates ( templates ) ; InitCdImage ( ) ; }
Source:
public void validateVmDuringSnapshot ( ) { createParameters ( ) ; initDiskImage ( diskImageGroupId , diskImageId ) ; initVm ( VMStatus.Up , null , diskImageId ) ; org.mockito.Mockito.when ( snapshotDao.exists ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) , org.mockito.Matchers.eq ( Snapshot.SnapshotStatus.LOCKED ) ) ) . thenReturn ( true ) ; org.mockito.Mockito.doReturn ( new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_VM_IS_DURING_SNAPSHOT ) ) . when ( snapshotsValidator ) . vmNotDuringSnapshot ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( command , EngineMessage.ACTION_TYPE_FAILED_VM_IS_DURING_SNAPSHOT ) ; }

Target:
public void passDiscardNotSupportedOnDestSd ( ) { org.ovirt.engine.core.compat.Guid dstSd = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; org.mockito.Mockito.when ( diskVmElementValidator.isPassDiscardSupported ( dstSd ) ) . thenReturn ( new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_PASS_DISCARD_NOT_SUPPORTED_BY_DISK_INTERFACE ) ) ; org.junit.Assert.assertFalse ( command.validatePassDiscardSupportedOnDestinationStorageDomain ( new org.ovirt.engine.core.common.action.LiveMigrateDiskParameters ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , org.ovirt.engine.core.compat.Guid.newGuid ( ) , dstSd , org.ovirt.engine.core.compat.Guid.newGuid ( ) , org.ovirt.engine.core.compat.Guid.newGuid ( ) , org.ovirt.engine.core.compat.Guid.newGuid ( ) , org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ) ) ; }
Source:
public org.ovirt.engine.sdk.decorators.ClusterNetwork update ( java.lang.String correlationId ) throws java.io.IOException , org.apache.http.client.ClientProtocolException , org.ovirt.engine.sdk.exceptions.ServerException { java.lang.String url = this . getHref ( ) ; java.util.List < org.apache.http.Header > headers = new org.ovirt.engine.sdk.utils.HttpHeaderBuilder ( ) . add ( "Correlation-Id" , correlationId ) . build ( ) ; url = new org.ovirt.engine.sdk.utils.UrlBuilder ( url ) . build ( ) ; return getProxy ( ) . update ( url , this , org.ovirt.engine.sdk.entities.Network.class , org.ovirt.engine.sdk.decorators.ClusterNetwork.class , headers ) ; }

Target:
public org.ovirt.engine.sdk.decorators.ClusterNetwork update ( java.lang.String correlationId ) throws java.io.IOException , org.apache.http.client.ClientProtocolException , org.ovirt.engine.sdk.exceptions.ServerException { java.lang.String url = this . getHref ( ) ; org.ovirt.engine.sdk.utils.HttpHeaderBuilder headersBuilder = new org.ovirt.engine.sdk.utils.HttpHeaderBuilder ( ) ; if ( correlationId != null ) { headersBuilder.add ( "Correlation-Id" , correlationId ) ; } java.util.List < org.apache.http.Header > headers = headersBuilder.build ( ) ; org.ovirt.engine.sdk.utils.UrlBuilder urlBuilder = new org.ovirt.engine.sdk.utils.UrlBuilder ( url ) ; url = urlBuilder.build ( ) ; return getProxy ( ) . update ( url , this , org.ovirt.engine.sdk.entities.Network.class , org.ovirt.engine.sdk.decorators.ClusterNetwork.class , headers ) ; }
Source:
private void setupExpectedGlusterServersInfo ( ) { expectedServers = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterServerInfo > ( ) ; org.ovirt.engine.core.common.businessentities.gluster.GlusterServerInfo server = new org.ovirt.engine.core.common.businessentities.gluster.GlusterServerInfo ( ) ; server.setUuid ( server_id1 ) ; server.setHostnameOrIp ( "test_server1" ) ; server.setStatus ( PeerStatus.CONNECTED ) ; expectedServers.add ( server ) ; server = new org.ovirt.engine.core.common.businessentities.gluster.GlusterServerInfo ( ) ; server.setUuid ( server_id3 ) ; server.setHostnameOrIp ( "test_server3" ) ; server.setStatus ( PeerStatus.CONNECTED ) ; expectedServers.add ( server ) ; }

Target:
private void setupExpectedGlusterServersInfo ( ) { expectedServers = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterServerInfo > ( ) ; org.ovirt.engine.core.common.businessentities.gluster.GlusterServerInfo server = new org.ovirt.engine.core.common.businessentities.gluster.GlusterServerInfo ( ) ; server.setUuid ( org.ovirt.engine.core.bll.gluster.GetAddedGlusterServersQueryTest.server_id1 ) ; server.setHostnameOrIp ( org.ovirt.engine.core.bll.gluster.GetAddedGlusterServersQueryTest.TEST_SERVER1 ) ; server.setStatus ( PeerStatus.CONNECTED ) ; expectedServers.add ( server ) ; server = new org.ovirt.engine.core.common.businessentities.gluster.GlusterServerInfo ( ) ; server.setUuid ( org.ovirt.engine.core.bll.gluster.GetAddedGlusterServersQueryTest.server_id3 ) ; server.setHostnameOrIp ( org.ovirt.engine.core.bll.gluster.GetAddedGlusterServersQueryTest.TEST_SERVER3 ) ; server.setStatus ( PeerStatus.CONNECTED ) ; expectedServers.add ( server ) ; }
Source:
protected R resolveCreated ( org.ovirt.engine.core.common.action.VdcReturnValueBase result , org.ovirt.engine.api.restapi.resource.EntityIdResolver entityResolver , java.lang.Class < ? extends org.ovirt.engine.api.model.BaseResource > suggestedParentType ) { try { Q created = entityResolver.resolve ( ( ( org.ovirt.engine.core.compat.Guid ) ( result.getActionReturnValue ( ) ) ) ) ; return addLinks ( populate ( org.ovirt.engine.api.restapi.resource.AbstractBackendCollectionResource.map ( created ) , created ) , suggestedParentType ) ; } catch ( java.lang.Exception e ) { e.printStackTrace ( ) ; return null ; } }

Target:
protected < T > Q resolveCreated ( org.ovirt.engine.core.common.action.VdcReturnValueBase result , org.ovirt.engine.api.restapi.resource.IResolver < T , Q > entityResolver ) { try { return entityResolver.resolve ( ( ( T ) ( result.getActionReturnValue ( ) ) ) ) ; } catch ( java.lang.Exception e ) { e.printStackTrace ( ) ; return null ; } }