auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void updateCallBackNotified ( org.ovirt.engine.core.compat.Guid commandId ) { org.ovirt.engine.core.common.businessentities.CommandEntity cmdEntity = get ( commandId ) ; if ( cmdEntity != null ) { cmdEntity.setCallBackNotified ( true ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getCommandEntityDao ( ) . updateNotified ( commandId ) ; } }

Target:
public void updateCallBackNotified ( final org.ovirt.engine.core.compat.Guid commandId ) { org.ovirt.engine.core.common.businessentities.CommandEntity cmdEntity = get ( commandId ) ; if ( cmdEntity != null ) { cmdEntity.setCallBackNotified ( true ) ; org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInScope ( TransactionScopeOption.Required , new org.ovirt.engine.core.utils.transaction.TransactionMethod < java.lang.Void > ( ) { @ java.lang.Override public java.lang.Void runInTransaction ( ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getCommandEntityDao ( ) . updateNotified ( commandId ) ; return null ; } } ) ; } }
Source:
private static boolean isBondOrVlanOverBond ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface , java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > interfaces ) { if ( ( ( iface.getBonded ( ) ) != null ) && ( ( iface.getBonded ( ) ) == true ) ) { return true ; } return org.ovirt.engine.core.utils.NetworkUtils.isBondVlan ( interfaces , iface ) ; }

Target:
private static boolean isBaseInterfaceDown ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface , java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > interfaces ) { if ( ! ( org.ovirt.engine.core.utils.NetworkUtils.isVlan ( iface ) ) ) { return ( iface.getStatistics ( ) . getStatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.network.InterfaceStatus.UP ) ; } java.lang.String baseIfaceName = iface.getBaseInterface ( ) ; for ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface tmpIface : interfaces ) { if ( tmpIface.getName ( ) . equals ( baseIfaceName ) ) { return ( tmpIface.getStatistics ( ) . getStatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.network.InterfaceStatus.UP ) ; } } return false ; }
Source:
public void getVmNextRunConfiguration ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmNextRunConfiguration , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }

Target:
public void getVmNextRunConfiguration ( org.ovirt.engine.ui.frontend.AsyncQuery < org.ovirt.engine.core.common.businessentities.VM > aQuery , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.CastingConverter < > ( ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmNextRunConfiguration , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }
Source:
private java.lang.String getMessage ( java.util.Map < java.lang.String , java.lang.Object > map ) { return java.lang.String.format ( "Files [scanned: %1$s, moved: %2$s, failed: %3$s], Total size moved: %4$s" , map.get ( org.ovirt.engine.core.vdsbroker.gluster.GlusterTasksListReturnForXmlRpc.FILES_SCANNED ) , map.get ( org.ovirt.engine.core.vdsbroker.gluster.GlusterTasksListReturnForXmlRpc.FILES_MOVED ) , map.get ( org.ovirt.engine.core.vdsbroker.gluster.GlusterTasksListReturnForXmlRpc.FILES_FAILED ) , formatTotalSizeMoved ( java.lang.Long.parseLong ( map.get ( org.ovirt.engine.core.vdsbroker.gluster.GlusterTasksListReturnForXmlRpc.TOTAL_SIZE_MOVED ) . toString ( ) ) ) ) ; }

Target:
private java.lang.String getMessage ( java.util.Map < java.lang.String , java.lang.Object > map ) { return java.lang.String.format ( "Files [scanned: %1$s, moved: %2$s, failed: %3$s], Total size moved: %4$s" , map.get ( org.ovirt.engine.core.vdsbroker.gluster.GlusterTasksListReturn.FILES_SCANNED ) , map.get ( org.ovirt.engine.core.vdsbroker.gluster.GlusterTasksListReturn.FILES_MOVED ) , map.get ( org.ovirt.engine.core.vdsbroker.gluster.GlusterTasksListReturn.FILES_FAILED ) , formatTotalSizeMoved ( java.lang.Long.parseLong ( map.get ( org.ovirt.engine.core.vdsbroker.gluster.GlusterTasksListReturn.TOTAL_SIZE_MOVED ) . toString ( ) ) ) ) ; }
Source:
private static java.lang.String addSessionToContext ( org.ovirt.engine.core.common.queries.VdcQueryParametersBase parameters ) { java.lang.String sessionId = parameters.getHttpSessionId ( ) ; boolean isAddToContext = true ; if ( org.ovirt.engine.core.compat.StringHelper.isNullOrEmpty ( sessionId ) ) { sessionId = parameters.getSessionId ( ) ; } if ( org.ovirt.engine.core.compat.StringHelper.isNullOrEmpty ( sessionId ) ) { sessionId = org.ovirt.engine.core.utils.ThreadLocalParamsContainer.getHttpSessionId ( ) ; isAddToContext = false ; } if ( ( ! ( org.ovirt.engine.core.compat.StringHelper.isNullOrEmpty ( sessionId ) ) ) && isAddToContext ) { org.ovirt.engine.core.utils.ThreadLocalParamsContainer.setHttpSessionId ( sessionId ) ; } return sessionId ; }

Target:
private static java.lang.String addSessionToContext ( org.ovirt.engine.core.common.queries.VdcQueryParametersBase parameters ) { java.lang.String sessionId = parameters.getHttpSessionId ( ) ; boolean isAddToContext = true ; if ( org.apache.commons.lang.StringUtils.isEmpty ( sessionId ) ) { sessionId = parameters.getSessionId ( ) ; } if ( org.apache.commons.lang.StringUtils.isEmpty ( sessionId ) ) { sessionId = org.ovirt.engine.core.utils.ThreadLocalParamsContainer.getHttpSessionId ( ) ; isAddToContext = false ; } if ( ( ! ( org.apache.commons.lang.StringUtils.isEmpty ( sessionId ) ) ) && isAddToContext ) { org.ovirt.engine.core.utils.ThreadLocalParamsContainer.setHttpSessionId ( sessionId ) ; } return sessionId ; }
Source:
private void setupStoragePool ( ) { org.ovirt.engine.core.common.businessentities.StoragePool storagePool = new org.ovirt.engine.core.common.businessentities.StoragePool ( ) ; storagePool.setId ( spId ) ; storagePool.setStatus ( StoragePoolStatus.Up ) ; org.mockito.Mockito.doReturn ( storagePoolDao ) . when ( cmd ) . getStoragePoolDAO ( ) ; org.mockito.Mockito.when ( storagePoolDao.get ( spId ) ) . thenReturn ( storagePool ) ; }

Target:
private void setupStoragePool ( ) { org.ovirt.engine.core.common.businessentities.StoragePool storagePool = new org.ovirt.engine.core.common.businessentities.StoragePool ( ) ; storagePool.setId ( spId ) ; storagePool.setStatus ( StoragePoolStatus.Up ) ; org.mockito.Mockito.doReturn ( storagePoolDao ) . when ( cmd ) . getStoragePoolDao ( ) ; org.mockito.Mockito.when ( storagePoolDao.get ( spId ) ) . thenReturn ( storagePool ) ; }
Source:
public void ExecuteCommand ( org.ovirt.engine.ui.uicommonweb.UICommand command ) { if ( org.ovirt.engine.core.compat.StringHelper.stringsEqual ( command.getName ( ) , "OnRemove" ) ) { OnRemove ( ) ; } else if ( org.ovirt.engine.core.compat.StringHelper.stringsEqual ( command.getName ( ) , "OnRestore" ) ) { OnRestore ( ) ; } else { super . ExecuteCommand ( command ) ; } }

Target:
public void executeCommand ( org.ovirt.engine.ui.uicommonweb.UICommand command ) { if ( org.ovirt.engine.core.compat.StringHelper.stringsEqual ( command.getName ( ) , "OnRemove" ) ) { OnRemove ( ) ; } else if ( org.ovirt.engine.core.compat.StringHelper.stringsEqual ( command.getName ( ) , "OnRestore" ) ) { OnRestore ( ) ; } else { super . executeCommand ( command ) ; } }
Source:
protected < T > T getEntity ( java.lang.Class < T > clz , org.ovirt.engine.core.common.interfaces.SearchType searchType , java.lang.String constraint ) { try { org.ovirt.engine.core.common.queries.VdcQueryReturnValue result = runQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( constraint , searchType ) ) ; if ( ! ( result.getSucceeded ( ) ) ) { backendFailure ( result.getExceptionString ( ) ) ; } return castQueryResultToEntity ( clz , result , constraint ) ; } catch ( java.lang.Exception e ) { return handleError ( clz , e , false ) ; } }

Target:
protected org.ovirt.engine.core.common.queries.SearchParameters createSearchParameters ( org.ovirt.engine.core.common.interfaces.SearchType searchType , java.lang.String constraint ) { return new org.ovirt.engine.core.common.queries.SearchParameters ( constraint , searchType ) ; }
Source:
public void testRetryWithNoSuccess ( ) throws java.lang.Exception { java.util.concurrent.Callable < java.lang.Object > callable = org.mockito.Mockito.mock ( java.util.concurrent.Callable.class ) ; org.ovirt.vdsm.jsonrpc.client.utils.retry.RetryPolicy policy = new org.ovirt.vdsm.jsonrpc.client.utils.retry.RetryPolicy ( 5 , 3 , 10 , java.io.IOException.class ) ; org.ovirt.vdsm.jsonrpc.client.utils.retry.Retryable < java.lang.Object > retryable = new org.ovirt.vdsm.jsonrpc.client.utils.retry.Retryable ( callable , policy ) ; org.mockito.Mockito.stub ( callable.call ( ) ) . toThrow ( new java.net.ConnectException ( ) ) . toThrow ( new java.io.IOException ( ) ) . toThrow ( new java.io.IOException ( ) ) ; retryable.call ( ) ; }

Target:
public void testRetryWithNoSuccess ( ) throws java.lang.Exception { java.util.concurrent.Callable < java.lang.Object > callable = org.mockito.Mockito.mock ( java.util.concurrent.Callable.class ) ; org.ovirt.vdsm.jsonrpc.client.internal.ClientPolicy policy = new org.ovirt.vdsm.jsonrpc.client.internal.ClientPolicy ( 5 , 3 , 10 , java.io.IOException.class ) ; org.ovirt.vdsm.jsonrpc.client.utils.retry.Retryable < java.lang.Object > retryable = new org.ovirt.vdsm.jsonrpc.client.utils.retry.Retryable ( callable , policy ) ; org.mockito.Mockito.stub ( callable.call ( ) ) . toThrow ( new java.net.ConnectException ( ) ) . toThrow ( new java.io.IOException ( ) ) . toThrow ( new java.io.IOException ( ) ) ; retryable.call ( ) ; }
Source:
public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Provider > ( ) ; } java.util.Collections.sort ( ( ( java.util.List < org.ovirt.engine.core.common.businessentities.Provider > ) ( source ) ) , new org.ovirt.engine.core.common.businessentities.comparators.NameableComparator ( ) ) ; return source ; }

Target:
public java.util.Map < K , V > convert ( java.lang.Object source ) { return source != null ? ( ( java.util.Map < K , V > ) ( source ) ) : new java.util.HashMap < K , V > ( ) ; }
Source:
public void testUpdateCantDo ( ) { setUpGetEntityWithNoCertificateInfoExpectations ( ) ; resource.setUriInfo ( setUpActionExpectations ( ActionType.UpdateVds , org.ovirt.engine.core.common.action.hostdeploy.UpdateVdsActionParameters.class , new java.lang.String [ ] { "RootPassword" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendHostsResourceTest.ROOT_PASSWORD } , false , true , "ACTION_TYPE_FAILED_IMPORT_DISKS_ALREADY_EXIST" ) ) ; try { resource.update ( org.ovirt.engine.api.restapi.resource.BackendHostsResourceTest.getModel ( 0 ) ) ; org.junit.Assert.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , "ACTION_TYPE_FAILED_IMPORT_DISKS_ALREADY_EXIST" , 409 ) ; } }

Target:
public void testUpdateCantDo ( ) { setUpGetEntityWithNoCertificateInfoExpectations ( ) ; resource.setUriInfo ( setUpActionExpectations ( ActionType.UpdateVds , org.ovirt.engine.core.common.action.hostdeploy.UpdateVdsActionParameters.class , new java.lang.String [ ] { "RootPassword" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendHostsResourceTest.ROOT_PASSWORD } , false , true , "ACTION_TYPE_FAILED_IMPORT_DISKS_ALREADY_EXIST" ) ) ; try { resource.update ( org.ovirt.engine.api.restapi.resource.BackendHostsResourceTest.getModel ( 0 ) ) ; org.junit.jupiter.api.Assertions.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , "ACTION_TYPE_FAILED_IMPORT_DISKS_ALREADY_EXIST" , 409 ) ; } }
Source:
public void Executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { org.ovirt.engine.ui.uicommonweb.models.storage.StorageListModel storageListModel = ( ( org.ovirt.engine.ui.uicommonweb.models.storage.StorageListModel ) ( result.getState ( ) ) ) ; if ( storageListModel.removeConnection ) { storageListModel.CleanConnection ( storageListModel.connection , storageListModel.hostId ) ; storageListModel.removeConnection = false ; } storageListModel.OnFinish ( storageListModel.context , false , storageListModel.storageModel ) ; }

Target:
public void Executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { org.ovirt.engine.ui.uicommonweb.models.storage.StorageListModel storageListModel = ( ( org.ovirt.engine.ui.uicommonweb.models.storage.StorageListModel ) ( result.getState ( ) ) ) ; if ( storageListModel.removeConnection ) { storageListModel.cleanConnection ( storageListModel.connection , storageListModel.hostId ) ; storageListModel.removeConnection = false ; } storageListModel.OnFinish ( storageListModel.context , false , storageListModel.storageModel ) ; }
Source:
public static void isUSBEnabledByDefault ( 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.Boolean ) ( source ) ) . booleanValue ( ) : false ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.EnableUSBAsDefault , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public void getGlusterVolumeProfilingStatistics ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId , org.ovirt.engine.core.compat.Guid volumeId , boolean nfs ) { aQuery.setHandleFailure ( true ) ; org.ovirt.engine.core.common.queries.gluster.GlusterVolumeProfileParameters parameters = new org.ovirt.engine.core.common.queries.gluster.GlusterVolumeProfileParameters ( clusterId , volumeId , nfs ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterVolumeProfileInfo , parameters , aQuery ) ; }
Source:
private static java.lang.String getKvmNested ( org.ovirt.engine.core.common.utils.CpuVendor cpuVendor , boolean kvmNested ) { if ( ! kvmNested ) { return "" ; } switch ( cpuVendor ) { case AMD : return "kvm-amd.nested=1 " ; case INTEL : return "kvm-intel.nested=1 " ; case IBM : return "" ; default : throw new java.lang.RuntimeException ( ( "Unknown CpuType: " + cpuVendor ) ) ; } }

Target:
private static java.lang.String getKvmNested ( org.ovirt.engine.core.common.utils.CpuVendor cpuVendor , boolean kvmNested ) { if ( ! kvmNested ) { return "" ; } switch ( cpuVendor ) { case AMD : return "kvm-amd.nested=1 " ; case INTEL : return "kvm-intel.nested=1 " ; case IBM : return "" ; case IBMS390 : return "kvm.nested=1 " ; default : throw new java.lang.RuntimeException ( ( "Unknown CpuType: " + cpuVendor ) ) ; } }
Source:
public void testListCrashClientLocale ( ) throws java.lang.Exception { collection.setUriInfo ( setUpUriExpectations ( null ) ) ; locales.add ( org.ovirt.engine.api.restapi.resource.gluster.CLIENT_LOCALE ) ; java.lang.Throwable t = new java.lang.RuntimeException ( FAILURE ) ; setUpQueryExpectations ( org.ovirt.engine.api.restapi.resource.gluster.BackendGlusterVolumesResourceTest.defaultQuery , t ) ; collection.setParent ( org.ovirt.engine.api.restapi.resource.gluster.BackendGlusterVolumesResourceTest.parentMock ) ; try { getCollection ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , org.ovirt.engine.api.restapi.resource.gluster.BACKEND_FAILED_CLIENT_LOCALE , t ) ; } finally { locales.clear ( ) ; } }

Target:
public void testListCrashClientLocale ( ) throws java.lang.Exception { collection.setUriInfo ( setUpUriExpectations ( null ) ) ; locales.add ( org.ovirt.engine.api.restapi.resource.gluster.CLIENT_LOCALE ) ; java.lang.Throwable t = new java.lang.RuntimeException ( FAILURE ) ; setUpQueryExpectations ( org.ovirt.engine.api.restapi.resource.gluster.BackendGlusterVolumesResourceTest.defaultQuery , t ) ; collection.setParent ( org.ovirt.engine.api.restapi.resource.gluster.BackendGlusterVolumesResourceTest.parentMock ) ; try { getCollection ( ) ; org.junit.Assert.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , org.ovirt.engine.api.restapi.resource.gluster.BACKEND_FAILED_CLIENT_LOCALE , t ) ; } finally { locales.clear ( ) ; } }
Source:
protected void executeQueryCommand ( ) { final org.ovirt.engine.core.compat.Guid id = org.ovirt.engine.core.bll.GetDbGroupByIdQuery.getParameters ( ) . getId ( ) ; final org.ovirt.engine.core.dao.DbGroupDAO dao = org.ovirt.engine.core.bll.GetDbGroupByIdQuery.getDbFacade ( ) . getDbGroupDao ( ) ; final org.ovirt.engine.core.common.businessentities.DbGroup group = dao.get ( id ) ; org.ovirt.engine.core.bll.GetDbGroupByIdQuery.getQueryReturnValue ( ) . setReturnValue ( group ) ; }

Target:
protected void executeQueryCommand ( ) { final org.ovirt.engine.core.compat.Guid id = org.ovirt.engine.core.bll.GetDbGroupByIdQuery.getParameters ( ) . getId ( ) ; final org.ovirt.engine.core.dao.DbGroupDAO dao = org.ovirt.engine.core.bll.GetDbGroupByIdQuery.getDbFacade ( ) . getDbGroupDao ( ) ; final org.ovirt.engine.core.common.businessentities.aaa.DbGroup group = dao.get ( id ) ; org.ovirt.engine.core.bll.GetDbGroupByIdQuery.getQueryReturnValue ( ) . setReturnValue ( group ) ; }
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.RunQuery ( VdcQueryType.GetAddedGlusterServers , new org.ovirt.engine.core.common.queries.gluster.AddedGlusterServersParameters ( clusterId , isFingerprintRequired ) , aQuery ) ; }

Target:
public static void getVmGuestAgentInterfacesByVmId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmGuestAgentInterface > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmGuestAgentInterfacesByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }
Source:
protected void EndMoveOrCopyCommand ( ) { EndActionOnAllImageGroups ( ) ; if ( ( org.ovirt.engine.core.bll.MoveOrCopyTemplateCommand.getVmTemplate ( ) ) != null ) { org.ovirt.engine.core.bll.VmTemplateHandler.UnLockVmTemplate ( org.ovirt.engine.core.bll.MoveOrCopyTemplateCommand.getVmTemplateId ( ) ) ; org.ovirt.engine.core.bll.utils.VmDeviceUtils.setVmDevices ( org.ovirt.engine.core.bll.MoveOrCopyTemplateCommand.getVmTemplate ( ) ) ; UpdateTemplateInSpm ( ) ; } else { org.ovirt.engine.core.bll.MoveOrCopyTemplateCommand.setCommandShouldBeLogged ( false ) ; log.warn ( "MoveOrCopyTemplateCommand::EndMoveOrCopyCommand: VmTemplate is null, not performing full EndAction" ) ; } org.ovirt.engine.core.bll.MoveOrCopyTemplateCommand.setSucceeded ( true ) ; }

Target:
private void endVmTemplateRelatedOps ( ) { if ( ( org.ovirt.engine.core.bll.MoveOrCopyTemplateCommand.getVmTemplate ( ) ) != null ) { org.ovirt.engine.core.bll.VmTemplateHandler.UnLockVmTemplate ( org.ovirt.engine.core.bll.MoveOrCopyTemplateCommand.getVmTemplateId ( ) ) ; org.ovirt.engine.core.bll.utils.VmDeviceUtils.setVmDevices ( org.ovirt.engine.core.bll.MoveOrCopyTemplateCommand.getVmTemplate ( ) ) ; UpdateTemplateInSpm ( ) ; } else { org.ovirt.engine.core.bll.MoveOrCopyTemplateCommand.setCommandShouldBeLogged ( false ) ; log.warn ( "MoveOrCopyTemplateCommand::EndMoveOrCopyCommand: VmTemplate is null, not performing full EndAction" ) ; } }
Source:
private void endCommandActions ( ) { org.ovirt.engine.core.bll.MoveOrCopyDiskCommand.getBackend ( ) . endAction ( getImagesActionType ( ) , org.ovirt.engine.core.bll.MoveOrCopyDiskCommand.getParameters ( ) ) ; org.ovirt.engine.core.bll.MoveOrCopyDiskCommand.setSucceeded ( true ) ; }

Target:
protected void executeCommand ( ) { overrideParameters ( ) ; org.ovirt.engine.core.common.action.VdcReturnValueBase vdcRetValue = runInternalActionWithTasksContext ( getImagesActionType ( ) , org.ovirt.engine.core.bll.MoveOrCopyDiskCommand.getParameters ( ) ) ; if ( ! ( vdcRetValue.getSucceeded ( ) ) ) { org.ovirt.engine.core.bll.MoveOrCopyDiskCommand.setSucceeded ( false ) ; org.ovirt.engine.core.bll.MoveOrCopyDiskCommand.getReturnValue ( ) . setFault ( vdcRetValue.getFault ( ) ) ; } else { org.ovirt.engine.core.bll.MoveOrCopyDiskCommand.setSucceeded ( true ) ; org.ovirt.engine.core.bll.MoveOrCopyDiskCommand.getReturnValue ( ) . getVdsmTaskIdList ( ) . addAll ( vdcRetValue.getInternalVdsmTaskIdList ( ) ) ; } }
Source:
public java.lang.String getServerUniqueId ( ) { wrapper.executeCommand ( org.ovirt.engine.core.common.config.Config.< java.lang.String > GetValue ( ConfigValues.BootstrapNodeIDCommand ) ) ; return callback.serverUniqueId ; }

Target:
public java.lang.String getServerUniqueId ( ) { wrapper.executeCommand ( org.ovirt.engine.core.common.config.Config.< java.lang.String > GetValue ( ConfigValues.BootstrapNodeIDCommand ) ) ; java.lang.String serverUniqueId = callback.serverUniqueId.trim ( ) ; if ( serverUniqueId.isEmpty ( ) ) { throw new java.lang.RuntimeException ( java.lang.String.format ( "Got empty unique id from host '%1$s'" , server ) ) ; } return serverUniqueId ; }
Source:
static boolean isNicActuallyExistsOrReferencesNewBond ( org.ovirt.engine.core.common.businessentities.BusinessEntityMap < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > existingInterfacesMap , org.ovirt.engine.core.common.businessentities.BusinessEntityMap < org.ovirt.engine.core.common.businessentities.network.Bond > bondsMap , java.lang.String nicName , org.ovirt.engine.core.compat.Guid nicId ) { boolean nicExists = ( existingInterfacesMap.get ( nicId , nicName ) ) != null ; if ( nicExists ) { return true ; } boolean nicIsNewBond = ( nicName != null ) && ( ( bondsMap.get ( nicName ) ) != null ) ; if ( nicIsNewBond ) { return true ; } return false ; }

Target:
private org.ovirt.engine.core.bll.ValidationResult nicActuallyExistsOrReferencesNewBond ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment ) { java.lang.String targetNicName = attachment.getNicName ( ) ; boolean attachmentReferencesExistingNic = ( existingInterfacesMap.get ( attachment.getNicId ( ) , targetNicName ) ) != null ; if ( attachmentReferencesExistingNic ) { return org.ovirt.engine.core.bll.ValidationResult.VALID ; } boolean attachmentReferencesNewlyCreatedBond = ( targetNicName != null ) && ( ( bondsMap.get ( targetNicName ) ) != null ) ; if ( attachmentReferencesNewlyCreatedBond ) { return org.ovirt.engine.core.bll.ValidationResult.VALID ; } return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.HOST_NETWORK_INTERFACE_NOT_EXIST ) ; }
Source:
private static org.ovirt.engine.core.common.businessentities.StorageDomain mockStorageDomain ( int availableSize , int usedSize , org.ovirt.engine.core.common.businessentities.StorageType storageType ) { org.ovirt.engine.core.common.businessentities.StorageDomain sd = new org.ovirt.engine.core.common.businessentities.StorageDomain ( ) ; sd.setAvailableDiskSize ( availableSize ) ; sd.setUsedDiskSize ( usedSize ) ; sd.setStatus ( StorageDomainStatus.Active ) ; sd.setStorageType ( storageType ) ; return sd ; }

Target:
private static org.ovirt.engine.core.common.businessentities.StorageDomain mockStorageDomain ( int availableSize , int usedSize , org.ovirt.engine.core.common.businessentities.storage.StorageType storageType ) { org.ovirt.engine.core.common.businessentities.StorageDomain sd = new org.ovirt.engine.core.common.businessentities.StorageDomain ( ) ; sd.setAvailableDiskSize ( availableSize ) ; sd.setUsedDiskSize ( usedSize ) ; sd.setStatus ( StorageDomainStatus.Active ) ; sd.setStorageType ( storageType ) ; return sd ; }
Source:
private void setUpDAOMocks ( ) { vmDaoMock = org.mockito.Mockito.mock ( org.ovirt.engine.core.dao.VmDAO.class ) ; org.mockito.Mockito.doReturn ( vmDaoMock ) . when ( snapshotVmConfigurationHelper ) . getVmDao ( ) ; snapshotDaoMock = org.mockito.Mockito.mock ( org.ovirt.engine.core.dao.SnapshotDao.class ) ; org.mockito.Mockito.doReturn ( snapshotDaoMock ) . when ( snapshotVmConfigurationHelper ) . getSnapshotDao ( ) ; diskImageDaoMock = org.mockito.Mockito.mock ( org.ovirt.engine.core.dao.DiskImageDAO.class ) ; org.mockito.Mockito.doReturn ( diskImageDaoMock ) . when ( snapshotVmConfigurationHelper ) . getDiskImageDao ( ) ; org.mockito.Mockito.when ( diskImageDaoMock.get ( existingImageId ) ) . thenReturn ( existingDiskImage ) ; }

Target:
private void setUpDaoMocks ( ) { vmDaoMock = org.mockito.Mockito.mock ( org.ovirt.engine.core.dao.VmDao.class ) ; org.mockito.Mockito.doReturn ( vmDaoMock ) . when ( snapshotVmConfigurationHelper ) . getVmDao ( ) ; snapshotDaoMock = org.mockito.Mockito.mock ( org.ovirt.engine.core.dao.SnapshotDao.class ) ; org.mockito.Mockito.doReturn ( snapshotDaoMock ) . when ( snapshotVmConfigurationHelper ) . getSnapshotDao ( ) ; diskImageDaoMock = org.mockito.Mockito.mock ( org.ovirt.engine.core.dao.DiskImageDao.class ) ; org.mockito.Mockito.doReturn ( diskImageDaoMock ) . when ( snapshotVmConfigurationHelper ) . getDiskImageDao ( ) ; org.mockito.Mockito.when ( diskImageDaoMock.get ( existingImageId ) ) . thenReturn ( existingDiskImage ) ; }
Source:
public void canDoActionSucceeds ( ) throws java.lang.Exception { mockVdsWithStatus ( VDSStatus.Maintenance ) ; mockVdsDynamic ( ) ; mockVmsPinnedToHost ( java.util.Collections.< java.lang.String > emptyList ( ) ) ; mockIsGlusterEnabled ( false ) ; mockHasVolumeOnServer ( false ) ; runAndAssertCanDoActionSuccess ( ) ; }

Target:
public void canDoActionSucceeds ( ) throws java.lang.Exception { command = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.RemoveVdsCommand < org.ovirt.engine.core.common.action.RemoveVdsParameters > ( new org.ovirt.engine.core.common.action.RemoveVdsParameters ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) , false ) ) ) ; prepareMocks ( command ) ; mockVdsWithStatus ( VDSStatus.Maintenance ) ; mockVdsDynamic ( ) ; mockVmsPinnedToHost ( java.util.Collections.< java.lang.String > emptyList ( ) ) ; mockIsGlusterEnabled ( false ) ; mockHasVolumeOnServer ( false ) ; runAndAssertCanDoActionSuccess ( ) ; }
Source:
public static org.ovirt.engine.api.model.Storage map ( org.ovirt.engine.core.common.businessentities.storage.LUNs entity , org.ovirt.engine.api.model.Storage template ) { org.ovirt.engine.api.model.Storage model = ( template != null ) ? template : new org.ovirt.engine.api.model.Storage ( ) ; model.setId ( entity.getLUN_id ( ) ) ; model.setType ( org.ovirt.engine.api.restapi.types.StorageDomainMapper.map ( entity.getLunType ( ) , null ) ) ; model.setLogicalUnits ( new org.ovirt.engine.api.model.LogicalUnits ( ) ) ; model.getLogicalUnits ( ) . getLogicalUnits ( ) . add ( org.ovirt.engine.api.restapi.types.StorageLogicalUnitMapper.map ( entity , ( ( org.ovirt.engine.api.model.LogicalUnit ) ( null ) ) ) ) ; return model ; }

Target:
public static org.ovirt.engine.api.model.HostStorage map ( org.ovirt.engine.core.common.businessentities.storage.LUNs entity , org.ovirt.engine.api.model.HostStorage template ) { org.ovirt.engine.api.model.HostStorage model = ( template != null ) ? template : new org.ovirt.engine.api.model.HostStorage ( ) ; model.setId ( entity.getLUN_id ( ) ) ; model.setType ( org.ovirt.engine.api.restapi.types.StorageDomainMapper.map ( entity.getLunType ( ) , null ) ) ; model.setLogicalUnits ( new org.ovirt.engine.api.model.LogicalUnits ( ) ) ; model.getLogicalUnits ( ) . getLogicalUnits ( ) . add ( org.ovirt.engine.api.restapi.types.StorageLogicalUnitMapper.map ( entity , ( ( org.ovirt.engine.api.model.LogicalUnit ) ( null ) ) ) ) ; return model ; }
Source:
public void testPosixDcAndNotMatchingCompatiblityVersion ( ) { storagePool.setcompatibility_version ( Version.v3_0 ) ; storagePool.setstorage_pool_type ( StorageType.POSIXFS ) ; org.junit.Assert.assertFalse ( validator.isPosixDcAndMatchingCompatiblityVersion ( ) ) ; assertMessages ( VdcBllMessages.DATA_CENTER_POSIX_STORAGE_NOT_SUPPORTED_IN_CURRENT_VERSION ) ; }

Target:
public void testPosixDcAndNotMatchingCompatiblityVersion ( ) { storagePool.setcompatibility_version ( Version.v3_0 ) ; storagePool.setstorage_pool_type ( StorageType.POSIXFS ) ; org.ovirt.engine.core.bll.ValidationResult result = validator.isPosixDcAndMatchingCompatiblityVersion ( ) ; org.junit.Assert.assertFalse ( result.isValid ( ) ) ; org.ovirt.engine.core.bll.storage.StoragePoolValidatorTest.assertMessage ( result , VdcBllMessages.DATA_CENTER_POSIX_STORAGE_NOT_SUPPORTED_IN_CURRENT_VERSION ) ; }
Source:
private void initNetworkProvidersList ( ) { org.ovirt.engine.ui.frontend.AsyncQuery getProvidersQuery = new org.ovirt.engine.ui.frontend.AsyncQuery ( ) ; getProvidersQuery.asyncCallback = new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object result ) { stopProgress ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.Provider > providers = ( ( java.util.List < org.ovirt.engine.core.common.businessentities.Provider > ) ( result ) ) ; providers.add ( 0 , null ) ; getNetworkProviders ( ) . setItems ( providers ) ; getNetworkProviders ( ) . setSelectedItem ( null ) ; } } ; startProgress ( null ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetAllNetworkProviders ( getProvidersQuery ) ; }

Target:
private void initNetworkProvidersList ( ) { org.ovirt.engine.ui.frontend.AsyncQuery getProvidersQuery = new org.ovirt.engine.ui.frontend.AsyncQuery ( ) ; getProvidersQuery.asyncCallback = new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object result ) { stopProgress ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.Provider > providers = ( ( java.util.List < org.ovirt.engine.core.common.businessentities.Provider > ) ( result ) ) ; providers.add ( 0 , null ) ; getNetworkProviders ( ) . setItems ( providers ) ; getNetworkProviders ( ) . setSelectedItem ( null ) ; } } ; startProgress ( null ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getAllNetworkProviders ( getProvidersQuery ) ; }
Source:
private org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidator createHostSetupNetworksValidator ( org.ovirt.engine.core.common.action.HostSetupNetworksParameters params , java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > existingIfaces , java.util.List < org.ovirt.engine.core.common.businessentities.network.NetworkAttachment > existingAttachments , org.ovirt.engine.core.common.businessentities.BusinessEntityMap < org.ovirt.engine.core.common.businessentities.network.Network > networkBusinessEntityMap ) { return new org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidatorTest.HostSetupNetworksValidatorBuilder ( ) . setHost ( host ) . setParams ( params ) . setExistingInterfaces ( existingIfaces ) . setExistingAttachments ( existingAttachments ) . setNetworkBusinessEntityMap ( networkBusinessEntityMap ) . build ( ) ; }

Target:
private org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidator createHostSetupNetworksValidator ( org.ovirt.engine.core.common.action.HostSetupNetworksParameters params , java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > existingIfaces , java.util.List < org.ovirt.engine.core.common.businessentities.network.NetworkAttachment > existingAttachments , java.util.Collection < org.ovirt.engine.core.common.businessentities.network.Network > networks ) { return new org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidatorTest.HostSetupNetworksValidatorBuilder ( ) . setHost ( host ) . setParams ( params ) . setExistingInterfaces ( existingIfaces ) . setExistingAttachments ( existingAttachments ) . addNetworks ( networks ) . build ( ) ; }
Source:
void localize ( org.ovirt.engine.ui.webadmin.ApplicationConstants constants ) { nameEditor.setLabel ( constants.nameProvider ( ) ) ; typeEditor.setLabel ( constants.typeProvider ( ) ) ; descriptionEditor.setLabel ( constants.descriptionProvider ( ) ) ; urlEditor.setLabel ( constants.urlProvider ( ) ) ; }

Target:
void localize ( org.ovirt.engine.ui.webadmin.ApplicationConstants constants ) { nameEditor.setLabel ( constants.nameProvider ( ) ) ; typeEditor.setLabel ( constants.typeProvider ( ) ) ; descriptionEditor.setLabel ( constants.descriptionProvider ( ) ) ; urlEditor.setLabel ( constants.urlProvider ( ) ) ; requiresAuthenticationEditor.setLabel ( constants.requiresAuthenticationProvider ( ) ) ; usernameEditor.setLabel ( constants.usernameProvider ( ) ) ; passwordEditor.setLabel ( constants.passwordProvider ( ) ) ; }
Source:
protected void executeCommand ( ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getNetworkDAO ( ) . update ( org.ovirt.engine.core.bll.storage.UpdateNetworkCommand.getParameters ( ) . getNetwork ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.VDSGroup cluster : _clusters ) { org.ovirt.engine.core.bll.AttachNetworkToVdsGroupCommand.SetNetworkStatus ( cluster.getId ( ) , org.ovirt.engine.core.bll.storage.UpdateNetworkCommand.getParameters ( ) . getNetwork ( ) ) ; } org.ovirt.engine.core.bll.storage.UpdateNetworkCommand.setSucceeded ( true ) ; }

Target:
protected void executeCommand ( ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getNetworkDao ( ) . update ( org.ovirt.engine.core.bll.storage.UpdateNetworkCommand.getParameters ( ) . getNetwork ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.VDSGroup cluster : _clusters ) { org.ovirt.engine.core.bll.AttachNetworkToVdsGroupCommand.SetNetworkStatus ( cluster.getId ( ) , org.ovirt.engine.core.bll.storage.UpdateNetworkCommand.getParameters ( ) . getNetwork ( ) ) ; } org.ovirt.engine.core.bll.storage.UpdateNetworkCommand.setSucceeded ( true ) ; }
Source:
public void testListIncludeStatistics ( ) throws java.lang.Exception { try { accepts.add ( "application/xml; detail=statistics" ) ; setUriInfo ( setUpUriExpectations ( null ) ) ; setGetGuestAgentQueryExpectations ( 3 ) ; setUpQueryExpectations ( "" ) ; java.util.List < org.ovirt.engine.api.model.Nic > nics = getCollection ( ) ; assertTrue ( nics.get ( 0 ) . isSetStatistics ( ) ) ; verifyCollection ( nics ) ; } finally { accepts.clear ( ) ; } }

Target:
protected void setGetGuestAgentQueryExpectations ( int times ) throws java.lang.Exception { while ( ( times -- ) > 0 ) { setUpEntityQueryExpectations ( VdcQueryType.GetVmGuestAgentInterfacesByVmId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendVmNicsResourceTest.VM_ID } , getListOfVmGuestAgentInterfaces ( ) ) ; } }
Source:
public boolean isValid ( java.lang.Integer value , javax.validation.ConstraintValidatorContext context ) { boolean result = ( value == null ) ? true : ( value >= ( min ) ) && ( value <= ( max ) ) ; if ( ! result ) { context.buildConstraintViolationWithTemplate ( rangeMessage ) ; } return result ; }

Target:
public boolean isValid ( java.lang.Integer value , javax.validation.ConstraintValidatorContext context ) { boolean result = ( value == null ) ? true : ( value >= ( min ) ) && ( value <= ( max ) ) ; if ( ! result ) { context.buildConstraintViolationWithTemplate ( rangeMessage ) . addConstraintViolation ( ) ; } return result ; }
Source:
public void testParseIngoreValues ( ) { java.util.List < org.ovirt.engine.api.model.Agent > ret = org.ovirt.engine.api.restapi.util.FenceOptionsParser.parse ( "foo:one=1,two=2,three=3" , "one=bool,two=int,three=bool" , true ) ; assertNotNull ( ret ) ; assertEquals ( 1 , ret.size ( ) ) ; verifyResult ( ret.get ( 0 ) , "foo" , "one" , "bool" , null , "two" , "int" , null , "three" , "bool" , null ) ; }

Target:
public void testParseIngoreValues ( ) { java.util.List < org.ovirt.engine.api.model.Agent > ret = org.ovirt.engine.api.restapi.util.FenceOptionsParser.parse ( "foo:one=1,two=2,three=3" , "one=bool,two=int,three=bool" , true ) ; org.junit.Assert.assertNotNull ( ret ) ; org.junit.Assert.assertEquals ( 1 , ret.size ( ) ) ; verifyResult ( ret.get ( 0 ) , "foo" , "one" , "bool" , null , "two" , "int" , null , "three" , "bool" , null ) ; }
Source:
public void testNonExistingQuota ( ) { prepareVmToPassValidate ( ) ; vmStatic.setQuotaId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; org.junit.Assert.assertFalse ( command.validateQuota ( vmStatic.getQuotaId ( ) ) ) ; org.ovirt.engine.core.bll.ValidateTestUtils.assertValidationMessages ( "" , command , EngineMessage.ACTION_TYPE_FAILED_QUOTA_NOT_EXIST ) ; }

Target:
public void testValidateQuota ( ) { command.validateQuota ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; org.mockito.Mockito.verify ( quotaValidator , org.mockito.Mockito.times ( 1 ) ) . isValid ( ) ; org.mockito.Mockito.verify ( quotaValidator , org.mockito.Mockito.times ( 1 ) ) . isDefinedForStoragePool ( org.mockito.ArgumentMatchers.any ( ) ) ; }
Source:
private void validateArgStartsWithDash ( java.lang.String arg ) { if ( ! ( arg.startsWith ( "-" ) ) ) { org.ovirt.engine.core.config.EngineConfigCLIParser.log.debug ( ( ( "parseAction error: first argument '" + arg ) + "' did not start with '-' or '--'." ) ) ; throw new java.lang.IllegalArgumentException ( "First argument must be an action, and start with '-' or '--'" ) ; } }

Target:
private void validateArgStartsWithDash ( java.lang.String arg ) { org.ovirt.engine.core.config.EngineConfigCLIParser.log.debug ( ( "Validating arrgument" + arg ) ) ; if ( ! ( arg.startsWith ( "-" ) ) ) { org.ovirt.engine.core.config.EngineConfigCLIParser.log.debug ( ( ( "parseAction error: first argument '" + arg ) + "' did not start with '-' or '--'." ) ) ; throw new java.lang.IllegalArgumentException ( "First argument must be an action, and start with '-' or '--'" ) ; } }
Source:
protected void executeCommand ( ) { org.ovirt.engine.core.common.vdscommands.VDSReturnValue returnValue = runVdsCommand ( VDSCommandType.DeleteGlusterVolume , new org.ovirt.engine.core.common.vdscommands.gluster.GlusterVolumeVDSParameters ( getUpServer ( ) . getId ( ) , getGlusterVolumeName ( ) ) ) ; setSucceeded ( returnValue.getSucceeded ( ) ) ; if ( getSucceeded ( ) ) { updateVolumeStatusInDb ( getParameters ( ) . getVolumeId ( ) ) ; } else { handleVdsError ( AuditLogType.GLUSTER_VOLUME_DELETE_FAILED , returnValue.getVdsError ( ) . getMessage ( ) ) ; return ; } }

Target:
protected boolean canDoAction ( ) { if ( ! ( super . canDoAction ( ) ) ) { return false ; } org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity volume = getGlusterVolume ( ) ; if ( volume.isOnline ( ) ) { addCanDoActionMessage ( VdcBllMessages.ACTION_TYPE_FAILED_GLUSTER_VOLUME_IS_UP ) ; addCanDoActionMessage ( java.lang.String.format ( "$volumeName %1$s" , volume.getName ( ) ) ) ; return false ; } return true ; }
Source:
public static < T extends java.lang.Object > void injectMembers ( T instance ) { javax.enterprise.inject.spi.AnnotatedType type = org.ovirt.engine.core.bll.utils.Injector.injector.manager.createAnnotatedType ( instance.getClass ( ) ) ; javax.enterprise.inject.spi.InjectionTarget injectionTarget = org.ovirt.engine.core.bll.utils.Injector.injector.manager.createInjectionTarget ( type ) ; injectionTarget.inject ( instance , org.ovirt.engine.core.bll.utils.Injector.injector.manager.createCreationalContext ( null ) ) ; injectionTarget.postConstruct ( instance ) ; }

Target:
public static < T extends org.ovirt.engine.core.bll.CommandBase < ? extends org.ovirt.engine.core.common.action.VdcActionParametersBase > > T injectMembers ( T instance ) { javax.enterprise.inject.spi.AnnotatedType type = org.ovirt.engine.core.bll.utils.Injector.injector.manager.createAnnotatedType ( instance.getClass ( ) ) ; javax.enterprise.inject.spi.InjectionTarget injectionTarget = org.ovirt.engine.core.bll.utils.Injector.injector.manager.createInjectionTarget ( type ) ; injectionTarget.inject ( instance , org.ovirt.engine.core.bll.utils.Injector.injector.manager.createCreationalContext ( null ) ) ; injectionTarget.postConstruct ( instance ) ; return instance ; }
Source:
private com.google.gwt.safehtml.shared.SafeHtml toUnorderedList ( java.util.List < java.lang.String > stringItems ) { com.google.gwt.safehtml.shared.SafeHtmlBuilder builder = new com.google.gwt.safehtml.shared.SafeHtmlBuilder ( ) ; for ( java.lang.String stringItem : stringItems ) { builder.append ( templates.listItem ( stringItem ) ) ; } return templates.unorderedList ( builder.toSafeHtml ( ) ) ; }

Target:
private com.google.gwt.safehtml.shared.SafeHtml toList ( java.util.List < java.lang.String > stringItems ) { com.google.gwt.safehtml.shared.SafeHtmlBuilder builder = new com.google.gwt.safehtml.shared.SafeHtmlBuilder ( ) ; builder.appendEscaped ( stringItems.get ( 0 ) ) ; return builder.toSafeHtml ( ) ; }
Source:
public void readOnlyIsNotSupportedByDiskInterface ( ) { disk.setReadOnly ( true ) ; disk.setDiskInterface ( DiskInterface.IDE ) ; org.junit.Assert.assertThat ( validator.isReadOnlyPropertyCompatibleWithInterface ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( VdcBllMessages.ACTION_TYPE_FAILED_IDE_INTERFACE_DOES_NOT_SUPPORT_READ_ONLY_ATTR ) ) ; }

Target:
public void readOnlyIsNotSupportedByDiskInterface ( ) { disk.setReadOnly ( true ) ; disk.setDiskInterface ( DiskInterface.IDE ) ; org.junit.Assert.assertThat ( validator.isReadOnlyPropertyCompatibleWithInterface ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( VdcBllMessages.ACTION_TYPE_FAILED_IDE_INTERFACE_DOES_NOT_SUPPORT_READ_ONLY_ATTR ) ) ; setupForLun ( ) ; lunDisk.setReadOnly ( true ) ; lunDisk.setDiskInterface ( DiskInterface.VirtIO_SCSI ) ; lunDisk.setSgio ( ScsiGenericIO.FILTERED ) ; org.junit.Assert.assertThat ( lunValidator.isReadOnlyPropertyCompatibleWithInterface ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( VdcBllMessages.SCSI_PASSTHROUGH_IS_NOT_SUPPORTED_FOR_READ_ONLY_DISK ) ) ; }
Source:
public void setSelection ( java.lang.Boolean value ) { if ( ( ( selection ) == null ) && ( value == null ) ) { return ; } if ( ( ( selection ) == null ) || ( ! ( selection.equals ( value ) ) ) ) { selection = value ; getSelectionChangedEvent ( ) . raise ( this , EventArgs.Empty ) ; onPropertyChanged ( new org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ( "Selection" ) ) ; } }

Target:
public void setSelection ( java.lang.Boolean value ) { if ( ( ( selection ) == null ) && ( value == null ) ) { return ; } if ( ( ( selection ) == null ) || ( ! ( selection.equals ( value ) ) ) ) { selection = value ; getSelectionChangedEvent ( ) . raise ( this , EventArgs.EMPTY ) ; onPropertyChanged ( new org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ( "Selection" ) ) ; } }
Source:
public 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.storage.DiskImage > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.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 ) ; }

Target:
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 ) ; }
Source:
public static void GetRoleActionGroupsByRoleId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid roleId ) { 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.ActionGroup > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ActionGroup > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetRoleActionGroupsByRoleId , new org.ovirt.engine.core.common.queries.MultilevelAdministrationByRoleIdParameters ( roleId ) , aQuery ) ; }

Target:
public static void GetStorageConnectionById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String id , boolean isRefresh ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( org.ovirt.engine.core.common.businessentities.StorageServerConnections ) ( source ) ) : null ; } } ; org.ovirt.engine.core.common.queries.StorageServerConnectionQueryParametersBase params = new org.ovirt.engine.core.common.queries.StorageServerConnectionQueryParametersBase ( id ) ; params.setRefresh ( isRefresh ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetStorageServerConnectionById , params , aQuery ) ; }