auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
protected void onBind ( ) { super . onBind ( ) ; getView ( ) . setMainTabPanelVisible ( userRole.isExtendedUser ( ) ) ; registerHandler ( getView ( ) . getAboutLink ( ) . addClickHandler ( new com.google.gwt.event.dom.client.ClickHandler ( ) { @ java.lang.Override public void onClick ( com.google.gwt.event.dom.client.ClickEvent event ) { com.gwtplatform.mvp.client.proxy.RevealRootPopupContentEvent.fire ( org.ovirt.engine.ui.userportal.section.main.presenter.HeaderPresenterWidget.this , aboutPopup ) ; } } ) ) ; }

Target:
protected void onReset ( ) { super . onReset ( ) ; getView ( ) . setMainTabPanelVisible ( userRole.isExtendedUser ( ) ) ; }
Source:
public void testGetAllInterfacesByLabelForCluster ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > interfaces = dao.getAllInterfacesByLabelForCluster ( org.ovirt.engine.core.dao.network.InterfaceDaoTest.CLUSTER_ID , org.ovirt.engine.core.dao.network.InterfaceDaoTest.LABEL ) ; org.junit.Assert.assertNotNull ( interfaces ) ; org.junit.Assert.assertFalse ( interfaces.isEmpty ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic : interfaces ) { org.junit.Assert.assertTrue ( nic.getLabels ( ) . contains ( org.ovirt.engine.core.dao.network.InterfaceDaoTest.LABEL ) ) ; } }

Target:
public void testGetAllInterfacesByLabelForCluster ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > interfaces = dao.getAllInterfacesByLabelForCluster ( org.ovirt.engine.core.dao.network.InterfaceDaoImplTest.CLUSTER_ID , org.ovirt.engine.core.dao.network.InterfaceDaoImplTest.LABEL ) ; org.junit.Assert.assertNotNull ( interfaces ) ; org.junit.Assert.assertFalse ( interfaces.isEmpty ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic : interfaces ) { org.junit.Assert.assertTrue ( nic.getLabels ( ) . contains ( org.ovirt.engine.core.dao.network.InterfaceDaoImplTest.LABEL ) ) ; } }
Source:
public void testCanDoActionVmUpLiveMergeNotSupported ( ) { prepareForVmValidatorTests ( ) ; cmd.getVm ( ) . setStatus ( VMStatus.Up ) ; org.mockito.Mockito.doReturn ( true ) . when ( cmd ) . isDiskPlugged ( ) ; org.mockito.Mockito.doReturn ( false ) . when ( cmd ) . isLiveMergeSupported ( ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( cmd , VdcBllMessages.ACTION_TYPE_FAILED_VM_IS_NOT_DOWN ) ; }

Target:
public void testCanDoActionVmUpLiveMergeNotSupported ( ) { prepareForVmValidatorTests ( ) ; cmd.getVm ( ) . setStatus ( VMStatus.Up ) ; org.mockito.Mockito.doReturn ( true ) . when ( cmd ) . isDiskPlugged ( ) ; org.mockito.Mockito.doReturn ( false ) . when ( cmd ) . isLiveMergeSupported ( ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( cmd , EngineMessage.ACTION_TYPE_FAILED_VM_IS_NOT_DOWN ) ; }
Source:
protected void updateGraphicsInfos ( ) { for ( org.ovirt.engine.core.common.businessentities.VmDevice vmDevice : org.ovirt.engine.core.bll.RunVmCommand.getVmDeviceDao ( ) . getVmDeviceByVmIdAndType ( org.ovirt.engine.core.bll.RunVmCommand.getVmId ( ) , VmDeviceGeneralType.GRAPHICS ) ) { org.ovirt.engine.core.bll.RunVmCommand.getVm ( ) . getGraphicsInfos ( ) . put ( org.ovirt.engine.core.common.businessentities.GraphicsType.fromString ( vmDevice.getDevice ( ) ) , new org.ovirt.engine.core.common.businessentities.GraphicsInfo ( ) ) ; } }

Target:
protected void updateGraphicsInfos ( ) { for ( org.ovirt.engine.core.common.businessentities.VmDevice vmDevice : vmDeviceDao.getVmDeviceByVmIdAndType ( org.ovirt.engine.core.bll.RunVmCommand.getVmId ( ) , VmDeviceGeneralType.GRAPHICS ) ) { org.ovirt.engine.core.bll.RunVmCommand.getVm ( ) . getGraphicsInfos ( ) . put ( org.ovirt.engine.core.common.businessentities.GraphicsType.fromString ( vmDevice.getDevice ( ) ) , new org.ovirt.engine.core.common.businessentities.GraphicsInfo ( ) ) ; } }
Source:
protected void doTestBadRemove ( boolean valid , boolean success , java.lang.String detail ) { setUpGetEntityExpectations ( 1 ) ; setUpVersionExpectations ( ) ; setUriInfo ( setUpActionExpectations ( ActionType.RemoveStoragePool , org.ovirt.engine.core.common.action.StoragePoolParametersBase.class , new java.lang.String [ ] { "StoragePoolId" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , valid , success ) ) ; try { resource.remove ( ) ; org.junit.Assert.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }

Target:
protected void doTestBadRemove ( boolean valid , boolean success , java.lang.String detail ) { setUpGetEntityExpectations ( 1 ) ; setUpVersionExpectations ( ) ; setUriInfo ( setUpActionExpectations ( ActionType.RemoveStoragePool , org.ovirt.engine.core.common.action.StoragePoolParametersBase.class , new java.lang.String [ ] { "StoragePoolId" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , valid , success ) ) ; try { resource.remove ( ) ; org.junit.jupiter.api.Assertions.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }
Source:
private void mockRoleGroups ( org.ovirt.engine.core.common.businessentities.ActionGroup ... groups ) { java.util.List < org.ovirt.engine.core.common.businessentities.RoleGroupMap > maps = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.RoleGroupMap > ( ) ; for ( org.ovirt.engine.core.common.businessentities.ActionGroup group : groups ) { maps.add ( new org.ovirt.engine.core.common.businessentities.RoleGroupMap ( group , getParams ( ) . getRoleId ( ) ) ) ; } org.mockito.Mockito.when ( getRoleGroupMapDAOMock ( ) . getAllForRole ( getParams ( ) . getRoleId ( ) ) ) . thenReturn ( maps ) ; }

Target:
private void mockRoleGroups ( org.ovirt.engine.core.common.businessentities.ActionGroup ... groups ) { java.util.List < org.ovirt.engine.core.common.businessentities.RoleGroupMap > maps = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.RoleGroupMap > ( ) ; for ( org.ovirt.engine.core.common.businessentities.ActionGroup group : groups ) { maps.add ( new org.ovirt.engine.core.common.businessentities.RoleGroupMap ( group , getParams ( ) . getRoleId ( ) ) ) ; } org.mockito.Mockito.when ( getRoleGroupMapDaoMock ( ) . getAllForRole ( getParams ( ) . getRoleId ( ) ) ) . thenReturn ( maps ) ; }
Source:
private void addFloppyDetails ( org.ovirt.engine.core.common.businessentities.VmDevice vmDevice , org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcStruct struct ) { struct.add ( VdsProperties.Type , vmDevice.getType ( ) ) ; struct.add ( VdsProperties.Device , vmDevice.getDevice ( ) ) ; struct.add ( VdsProperties.Index , "0" ) ; struct.add ( VdsProperties.Iface , VdsProperties.Fdc ) ; struct.add ( VdsProperties.ReadOnly , java.lang.String.valueOf ( vmDevice.getIsReadOnly ( ) ) ) ; }

Target:
private void addFloppyDetails ( org.ovirt.engine.core.common.businessentities.VmDevice vmDevice , org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcStruct struct ) { struct.add ( VdsProperties.Type , vmDevice.getType ( ) ) ; struct.add ( VdsProperties.Device , vmDevice.getDevice ( ) ) ; struct.add ( VdsProperties.Index , "0" ) ; struct.add ( VdsProperties.Iface , VdsProperties.Fdc ) ; struct.add ( VdsProperties.ReadOnly , java.lang.String.valueOf ( vmDevice.getIsReadOnly ( ) ) ) ; struct.add ( VdsProperties.Shareable , java.lang.Boolean.FALSE.toString ( ) ) ; }
Source:
private void UpdateUserAuthFields ( ) { getUserName ( ) . setIsValid ( true ) ; getUserName ( ) . setIsChangable ( ( ( java.lang.Boolean ) ( getUseUserAuth ( ) . getEntity ( ) ) ) ) ; getPassword ( ) . setIsValid ( true ) ; getPassword ( ) . setIsChangable ( ( ( java.lang.Boolean ) ( getUseUserAuth ( ) . getEntity ( ) ) ) ) ; }

Target:
private void updateUserAuthFields ( ) { getUserName ( ) . setIsValid ( true ) ; getUserName ( ) . setIsChangable ( ( ( java.lang.Boolean ) ( getUseUserAuth ( ) . getEntity ( ) ) ) ) ; getPassword ( ) . setIsValid ( true ) ; getPassword ( ) . setIsChangable ( ( ( java.lang.Boolean ) ( getUseUserAuth ( ) . getEntity ( ) ) ) ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.VolumeFormat getTargetVolumeFormat ( org.ovirt.engine.core.common.businessentities.VolumeFormat volumeFormat , org.ovirt.engine.core.common.businessentities.VolumeType volumeType , org.ovirt.engine.core.compat.Guid storageDomainId ) { if ( ( volumeFormat == ( org.ovirt.engine.core.common.businessentities.VolumeFormat.RAW ) ) && ( volumeType == ( org.ovirt.engine.core.common.businessentities.VolumeType.Sparse ) ) ) { org.ovirt.engine.core.common.businessentities.StorageDomainStatic destDomain = org.ovirt.engine.core.bll.CreateImageTemplateCommand.getStorageDomainStaticDAO ( ) . get ( storageDomainId ) ; if ( destDomain.getStorageType ( ) . isBlockDomain ( ) ) { return org.ovirt.engine.core.common.businessentities.VolumeFormat.COW ; } } return volumeFormat ; }

Target:
private org.ovirt.engine.core.common.businessentities.storage.VolumeFormat getTargetVolumeFormat ( org.ovirt.engine.core.common.businessentities.storage.VolumeFormat volumeFormat , org.ovirt.engine.core.common.businessentities.storage.VolumeType volumeType , org.ovirt.engine.core.compat.Guid storageDomainId ) { if ( ( volumeFormat == ( org.ovirt.engine.core.common.businessentities.storage.VolumeFormat.RAW ) ) && ( volumeType == ( org.ovirt.engine.core.common.businessentities.storage.VolumeType.Sparse ) ) ) { org.ovirt.engine.core.common.businessentities.StorageDomainStatic destDomain = org.ovirt.engine.core.bll.CreateImageTemplateCommand.getStorageDomainStaticDAO ( ) . get ( storageDomainId ) ; if ( destDomain.getStorageType ( ) . isBlockDomain ( ) ) { return org.ovirt.engine.core.common.businessentities.storage.VolumeFormat.COW ; } } return volumeFormat ; }
Source:
protected org.ovirt.engine.ui.common.widget.uicommon.popup.vm.PopupWidgetConfigMap createWidgetConfiguration ( ) { return super . createWidgetConfiguration ( ) . putAll ( poolSpecificFields ( ) , org.ovirt.engine.ui.common.widget.uicommon.popup.vm.PopupWidgetConfig.hiddenField ( ) ) . putOne ( logicalNetworksEditorPanel , org.ovirt.engine.ui.common.widget.uicommon.popup.vm.PopupWidgetConfig.hiddenField ( ) ) . update ( consoleTab , org.ovirt.engine.ui.common.widget.uicommon.popup.vm.PopupWidgetConfig.simpleField ( ) . visibleInAdvancedModeOnly ( ) ) . update ( templateVersionNameEditor , org.ovirt.engine.ui.common.widget.uicommon.popup.vm.PopupWidgetConfig.hiddenField ( ) ) ; }

Target:
protected org.ovirt.engine.ui.common.widget.uicommon.popup.vm.PopupWidgetConfigMap createWidgetConfiguration ( ) { return super . createWidgetConfiguration ( ) . putAll ( poolSpecificFields ( ) , org.ovirt.engine.ui.common.widget.uicommon.popup.vm.PopupWidgetConfig.hiddenField ( ) ) . putOne ( logicalNetworksEditorPanel , org.ovirt.engine.ui.common.widget.uicommon.popup.vm.PopupWidgetConfig.hiddenField ( ) ) . update ( consoleTab , org.ovirt.engine.ui.common.widget.uicommon.popup.vm.PopupWidgetConfig.simpleField ( ) . visibleInAdvancedModeOnly ( ) ) . putOne ( baseTemplateEditor , org.ovirt.engine.ui.common.widget.uicommon.popup.vm.PopupWidgetConfig.hiddenField ( ) ) ; }
Source:
public void getStorageDomainByName ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String storageDomainName ) { 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.GetStorageDomainByName , new org.ovirt.engine.core.common.queries.NameQueryParameters ( storageDomainName ) , aQuery ) ; }

Target:
public void getStorageDomainById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storageDomainId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( org.ovirt.engine.core.common.businessentities.StorageDomain ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( storageDomainId ) , aQuery ) ; }
Source:
private static void mapQosTypeToModel ( org.ovirt.engine.core.common.businessentities.qos.QosBase entity , org.ovirt.engine.api.model.QoS model ) { switch ( entity.getQosType ( ) ) { case STORAGE : org.ovirt.engine.api.restapi.types.QosMapper.mapStorageQosToModel ( entity , model ) ; break ; case CPU : org.ovirt.engine.api.restapi.types.QosMapper.mapCpuQosToModel ( entity , model ) ; break ; case NETWORK : org.ovirt.engine.api.restapi.types.QosMapper.mapNetworkQosToModel ( entity , model ) ; break ; case HOSTNETWORK : org.ovirt.engine.api.restapi.types.QosMapper.mapHostNetworkQosToModel ( entity , model ) ; break ; default : throw new java.lang.IllegalArgumentException ( "Unsupported QoS type" ) ; } }

Target:
private static void mapQosTypeToModel ( org.ovirt.engine.core.common.businessentities.qos.QosBase entity , org.ovirt.engine.api.model.Qos model ) { switch ( entity.getQosType ( ) ) { case STORAGE : org.ovirt.engine.api.restapi.types.QosMapper.mapStorageQosToModel ( entity , model ) ; break ; case CPU : org.ovirt.engine.api.restapi.types.QosMapper.mapCpuQosToModel ( entity , model ) ; break ; case NETWORK : org.ovirt.engine.api.restapi.types.QosMapper.mapNetworkQosToModel ( entity , model ) ; break ; case HOSTNETWORK : org.ovirt.engine.api.restapi.types.QosMapper.mapHostNetworkQosToModel ( entity , model ) ; break ; default : throw new java.lang.IllegalArgumentException ( "Unsupported QoS type" ) ; } }
Source:
protected void updateHashName ( T model ) { java.lang.String hashName = model.getHashName ( ) ; org.ovirt.engine.ui.common.presenter.AbstractModelBoundPopupPresenterWidget.getView ( ) . setHashName ( hashName ) ; org.ovirt.engine.ui.uicommonweb.UICommand openDocumentationCommand = model.getOpenDocumentationCommand ( ) ; if ( openDocumentationCommand != null ) { boolean isDocumentationAvailable = ( hashName != null ) && ( ( org.ovirt.engine.ui.common.uicommon.ContextSensitiveHelpManager.getPath ( hashName ) ) != null ) ; openDocumentationCommand.setIsAvailable ( isDocumentationAvailable ) ; updateHelpCommand ( ( isDocumentationAvailable ? openDocumentationCommand : null ) ) ; } }

Target:
protected void updateHelpTag ( T model ) { org.ovirt.engine.ui.uicommonweb.help.HelpTag helpTag = model.getHelpTag ( ) ; org.ovirt.engine.ui.uicommonweb.UICommand command = model.getOpenDocumentationCommand ( ) ; if ( ( ( command != null ) && ( helpTag != null ) ) && ( ( org.ovirt.engine.ui.common.uicommon.ContextSensitiveHelpManager.getPath ( helpTag.name ( ) ) ) != null ) ) { command.setIsAvailable ( true ) ; org.ovirt.engine.ui.common.presenter.AbstractModelBoundPopupPresenterWidget.getView ( ) . setHelpCommand ( command ) ; } }
Source:
public void canDoActionFailedWrongPlugStatus ( ) throws java.lang.Exception { mockVmStatusUp ( ) ; cretaeDiskWrongPlug ( false ) ; org.junit.Assert.assertFalse ( command.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( VdcBllMessages.HOT_UNPLUG_DISK_IS_NOT_PLUGGED.toString ( ) ) ) ; }

Target:
public void canDoActionFailedWrongPlugStatus ( ) throws java.lang.Exception { mockVmStatusUp ( ) ; mockInterfaceList ( ) ; cretaeDiskWrongPlug ( false ) ; org.junit.Assert.assertFalse ( command.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( VdcBllMessages.HOT_UNPLUG_DISK_IS_NOT_PLUGGED.toString ( ) ) ) ; }
Source:
public void testRemove ( ) throws java.lang.Exception { setUpEntityQueryExpectations ( VdcQueryType.GetVdsGroupsByStoragePoolId , org.ovirt.engine.core.common.queries.StoragePoolQueryParametersBase.class , new java.lang.String [ ] { "StoragePoolId" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendDataCenterClustersResourceTest.dataCenterId } , setUpVDSGroups ( ) , null ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.RemoveVdsGroup , org.ovirt.engine.core.common.action.VdsGroupParametersBase.class , new java.lang.String [ ] { "VdsGroupId" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , true , true ) ) ; verifyRemove ( collection.remove ( GUIDS [ 0 ] . toString ( ) ) ) ; }

Target:
public void testRemove ( ) throws java.lang.Exception { setUpEntityQueryExpectations ( VdcQueryType.GetVdsGroupsByStoragePoolId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendDataCenterClustersResourceTest.dataCenterId } , setUpVDSGroups ( ) , null ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.RemoveVdsGroup , org.ovirt.engine.core.common.action.VdsGroupParametersBase.class , new java.lang.String [ ] { "VdsGroupId" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , true , true ) ) ; verifyRemove ( collection.remove ( GUIDS [ 0 ] . toString ( ) ) ) ; }
Source:
protected org.ovirt.engine.core.common.businessentities.DiskImage getImage ( ) { switch ( org.ovirt.engine.core.bll.MoveOrCopyImageGroupCommand.getActionState ( ) ) { case END_SUCCESS : case END_FAILURE : if ( ( _diskImage ) == null ) { java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > diskImages = org.ovirt.engine.core.bll.MoveOrCopyImageGroupCommand.getDiskImageDao ( ) . getAllSnapshotsForImageGroup ( org.ovirt.engine.core.bll.MoveOrCopyImageGroupCommand.getParameters ( ) . getImageGroupID ( ) ) ; _diskImage = ( diskImages.isEmpty ( ) ) ? null : diskImages.get ( 0 ) ; } return _diskImage ; default : return super . getImage ( ) ; } }

Target:
protected org.ovirt.engine.core.common.businessentities.DiskImage getImage ( ) { switch ( org.ovirt.engine.core.bll.CopyImageGroupCommand.getActionState ( ) ) { case END_SUCCESS : case END_FAILURE : if ( ( _diskImage ) == null ) { java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > diskImages = org.ovirt.engine.core.bll.CopyImageGroupCommand.getDiskImageDao ( ) . getAllSnapshotsForImageGroup ( org.ovirt.engine.core.bll.CopyImageGroupCommand.getParameters ( ) . getImageGroupID ( ) ) ; _diskImage = ( diskImages.isEmpty ( ) ) ? null : diskImages.get ( 0 ) ; } return _diskImage ; default : return super . getImage ( ) ; } }
Source:
protected org.ovirt.engine.core.common.businessentities.storage.DiskImage getImageInfoFromVdsm ( final org.ovirt.engine.core.common.businessentities.storage.DiskImage targetImage ) { org.ovirt.engine.core.common.vdscommands.VDSReturnValue ret = runVdsCommand ( VDSCommandType.GetImageInfo , new org.ovirt.engine.core.common.vdscommands.GetImageInfoVDSCommandParameters ( targetImage.getStoragePoolId ( ) , targetImage.getStorageIds ( ) . get ( 0 ) , targetImage.getId ( ) , targetImage.getImageId ( ) ) ) ; return ( ( org.ovirt.engine.core.common.businessentities.storage.DiskImage ) ( ret.getReturnValue ( ) ) ) ; }

Target:
protected org.ovirt.engine.core.common.businessentities.storage.DiskImage getImageInfoFromVdsm ( final org.ovirt.engine.core.common.businessentities.storage.DiskImage targetImage ) { try { org.ovirt.engine.core.common.vdscommands.VDSReturnValue ret = runVdsCommand ( VDSCommandType.GetImageInfo , new org.ovirt.engine.core.common.vdscommands.GetImageInfoVDSCommandParameters ( targetImage.getStoragePoolId ( ) , targetImage.getStorageIds ( ) . get ( 0 ) , targetImage.getId ( ) , targetImage.getImageId ( ) ) ) ; return ( ( org.ovirt.engine.core.common.businessentities.storage.DiskImage ) ( ret.getReturnValue ( ) ) ) ; } catch ( org.ovirt.engine.core.common.errors.EngineException e ) { log.warn ( "Failed to get info of volume '{0}' using GetImageInfo" , targetImage.getImageId ( ) , e ) ; return null ; } }
Source:
public void executeCommand ( org.ovirt.engine.ui.uicommonweb.UICommand command ) { super . executeCommand ( command ) ; if ( command == ( getAddCommand ( ) ) ) { add ( ) ; } else if ( command == ( getEditCommand ( ) ) ) { edit ( ) ; } else if ( command == ( getRemoveCommand ( ) ) ) { remove ( ) ; } }

Target:
public void executeCommand ( org.ovirt.engine.ui.uicommonweb.UICommand command ) { super . executeCommand ( command ) ; if ( command == ( getAddCommand ( ) ) ) { add ( ) ; } else if ( command == ( getEditCommand ( ) ) ) { edit ( ) ; } else if ( command == ( getRemoveCommand ( ) ) ) { remove ( ) ; } else if ( command == ( getForceRemoveCommand ( ) ) ) { forceRemove ( ) ; } }
Source:
public void setUp ( ) throws java.lang.Exception { storageDomain = new org.ovirt.engine.core.common.businessentities.StorageDomain ( ) ; storageDomain.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; storageDomain.setStorageFormat ( StorageFormatType.V3 ) ; storageDomain.setStorageType ( StorageType.NFS ) ; storagePool = new org.ovirt.engine.core.common.businessentities.StoragePool ( ) ; storagePool.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; storagePool.setcompatibility_version ( Version.v3_5 ) ; org.mockito.Mockito.when ( storagePoolIsoMapDAO.getAllForStorage ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePoolIsoMap > ( ) ) ; spyValidator ( ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { storageDomain = new org.ovirt.engine.core.common.businessentities.StorageDomain ( ) ; storageDomain.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; storageDomain.setStorageFormat ( StorageFormatType.V3 ) ; storageDomain.setStorageType ( StorageType.NFS ) ; storagePool = new org.ovirt.engine.core.common.businessentities.StoragePool ( ) ; storagePool.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; storagePool.setCompatibilityVersion ( Version.v3_5 ) ; org.mockito.Mockito.when ( storagePoolIsoMapDAO.getAllForStorage ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePoolIsoMap > ( ) ) ; spyValidator ( ) ; }
Source:
protected void executeVdsBrokerCommand ( ) { retval = org.ovirt.engine.core.vdsbroker.vdsbroker.AddImageTicketVDSCommand.getBroker ( ) . add_image_ticket ( org.ovirt.engine.core.vdsbroker.vdsbroker.AddImageTicketVDSCommand.getParameters ( ) . getTicketId ( ) . toString ( ) , org.ovirt.engine.core.vdsbroker.vdsbroker.AddImageTicketVDSCommand.getParameters ( ) . getOperations ( ) , org.ovirt.engine.core.vdsbroker.vdsbroker.AddImageTicketVDSCommand.getParameters ( ) . getTimeout ( ) , org.ovirt.engine.core.vdsbroker.vdsbroker.AddImageTicketVDSCommand.getParameters ( ) . getSize ( ) , org.ovirt.engine.core.vdsbroker.vdsbroker.AddImageTicketVDSCommand.getParameters ( ) . getUrl ( ) ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.AddImageTicketVDSCommand.proceedProxyReturnValue ( ) ; setReturnValue ( retval ) ; }

Target:
protected void executeVdsBrokerCommand ( ) { retval = org.ovirt.engine.core.vdsbroker.vdsbroker.AddImageTicketVDSCommand.getBroker ( ) . add_image_ticket ( org.ovirt.engine.core.vdsbroker.vdsbroker.AddImageTicketVDSCommand.getParameters ( ) . getTicketId ( ) . toString ( ) , org.ovirt.engine.core.vdsbroker.vdsbroker.AddImageTicketVDSCommand.getParameters ( ) . getOperations ( ) , org.ovirt.engine.core.vdsbroker.vdsbroker.AddImageTicketVDSCommand.getParameters ( ) . getTimeout ( ) , org.ovirt.engine.core.vdsbroker.vdsbroker.AddImageTicketVDSCommand.getParameters ( ) . getSize ( ) , org.ovirt.engine.core.vdsbroker.vdsbroker.AddImageTicketVDSCommand.getParameters ( ) . getUrl ( ) , org.ovirt.engine.core.vdsbroker.vdsbroker.AddImageTicketVDSCommand.getParameters ( ) . getFilename ( ) ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.AddImageTicketVDSCommand.proceedProxyReturnValue ( ) ; setReturnValue ( retval ) ; }
Source:
protected org.ovirt.engine.ui.uicommonweb.UICommand resolveCommand ( ) { return getModel ( ) . getNewCommand ( ) ; }

Target:
public void eventRaised ( org.ovirt.engine.core.compat.Event ev , java.lang.Object sender , org.ovirt.engine.core.compat.EventArgs args ) { org.ovirt.engine.core.common.businessentities.Snapshot snapshot = ( ( org.ovirt.engine.core.common.businessentities.Snapshot ) ( getModel ( ) . getSelectedItem ( ) ) ) ; if ( ( snapshot != null ) && ( ! ( getTable ( ) . getSelectionModel ( ) . isSelected ( snapshot ) ) ) ) { getTable ( ) . getSelectionModel ( ) . setSelected ( snapshot , true ) ; } vmSnapshotInfoPanel.updatePanel ( snapshot ) ; }
Source:
private org.ovirt.engine.api.model.Domains mapCollection ( java.util.List < org.ovirt.engine.api.restapi.model.Directory > entities ) { org.ovirt.engine.api.model.Domains collection = new org.ovirt.engine.api.model.Domains ( ) ; for ( org.ovirt.engine.api.restapi.model.Directory entity : entities ) { collection.getDomains ( ) . add ( injectSearchLinks ( addLinks ( map ( entity ) ) , org.ovirt.engine.api.restapi.resource.aaa.BackendDomainsResource.SUB_COLLECTIONS ) ) ; } return collection ; }

Target:
private org.ovirt.engine.api.model.Domains mapCollection ( java.util.List < org.ovirt.engine.api.restapi.model.Directory > entities ) { org.ovirt.engine.api.model.Domains collection = new org.ovirt.engine.api.model.Domains ( ) ; for ( org.ovirt.engine.api.restapi.model.Directory entity : entities ) { collection.getDomains ( ) . add ( injectSearchLinks ( addLinks ( map ( entity ) ) , subCollections ) ) ; } return collection ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult interfaceInHost ( org.ovirt.engine.core.compat.Guid hostId ) { return org.ovirt.engine.core.bll.ValidationResult.failWith ( VdcBllMessages.NIC_NOT_EXISTS_ON_HOST ) . when ( ( ! ( iface.getVdsId ( ) . equals ( hostId ) ) ) ) ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult interfaceInHost ( org.ovirt.engine.core.compat.Guid hostId ) { return org.ovirt.engine.core.bll.ValidationResult.failWith ( EngineMessage.NIC_NOT_EXISTS_ON_HOST , org.ovirt.engine.core.utils.ReplacementUtils.createSetVariableString ( org.ovirt.engine.core.bll.validator.HostInterfaceValidator.VAR_NIC_NOT_EXISTS_ON_HOST_ENTITY , hostId.toString ( ) ) ) . when ( ( ! ( iface.getVdsId ( ) . equals ( hostId ) ) ) ) ; }
Source:
public void executeCommand ( ) { org.ovirt.engine.core.common.queries.VdcQueryReturnValue returnValue = runInternalQuery ( VdcQueryType.GetUnregisteredCinderDiskByIdAndStorageDomainId , new org.ovirt.engine.core.common.action.GetCinderEntityByStorageDomainIdParameters ( getCinderDisk ( ) . getId ( ) , org.ovirt.engine.core.bll.storage.disk.cinder.RegisterCinderDiskCommand.getParameters ( ) . getStorageDomainId ( ) ) ) ; org.ovirt.engine.core.common.businessentities.storage.CinderDisk cinderDisk = returnValue.getReturnValue ( ) ; if ( cinderDisk != null ) { addCinderDiskToDB ( cinderDisk ) ; org.ovirt.engine.core.bll.storage.disk.cinder.RegisterCinderDiskCommand.getReturnValue ( ) . setActionReturnValue ( cinderDisk.getId ( ) ) ; org.ovirt.engine.core.bll.storage.disk.cinder.RegisterCinderDiskCommand.setSucceeded ( true ) ; } }

Target:
public void executeCommand ( ) { org.ovirt.engine.core.common.queries.VdcQueryReturnValue returnValue = runInternalQuery ( QueryType.GetUnregisteredCinderDiskByIdAndStorageDomainId , new org.ovirt.engine.core.common.action.GetCinderEntityByStorageDomainIdParameters ( getCinderDisk ( ) . getId ( ) , org.ovirt.engine.core.bll.storage.disk.cinder.RegisterCinderDiskCommand.getParameters ( ) . getStorageDomainId ( ) ) ) ; org.ovirt.engine.core.common.businessentities.storage.CinderDisk cinderDisk = returnValue.getReturnValue ( ) ; if ( cinderDisk != null ) { addCinderDiskToDB ( cinderDisk ) ; org.ovirt.engine.core.bll.storage.disk.cinder.RegisterCinderDiskCommand.getReturnValue ( ) . setActionReturnValue ( cinderDisk.getId ( ) ) ; org.ovirt.engine.core.bll.storage.disk.cinder.RegisterCinderDiskCommand.setSucceeded ( true ) ; } }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { if ( ev.matchesDefinition ( spiceVersionFileFetchedEvent_Definition ) ) { org.ovirt.engine.core.compat.Version spiceVersion = parseVersion ( ( ( org.ovirt.engine.ui.webadmin.uicommon.FileFetchEventArgs ) ( args ) ) . getFileContent ( ) ) ; setSpiceVersion ( spiceVersion ) ; } else if ( ev.matchesDefinition ( documentationFileFetchedEvent_Definition ) ) { java.lang.String documentationPathFileContent = ( ( org.ovirt.engine.ui.webadmin.uicommon.FileFetchEventArgs ) ( args ) ) . getFileContent ( ) ; org.ovirt.engine.ui.common.uicommon.ContextSensitiveHelpManager.init ( documentationPathFileContent ) ; } }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { if ( ev.matchesDefinition ( spiceVersionFileFetchedEvent_Definition ) ) { org.ovirt.engine.core.compat.Version spiceVersion = parseVersion ( ( ( org.ovirt.engine.ui.webadmin.uicommon.FileFetchEventArgs ) ( args ) ) . getFileContent ( ) ) ; setSpiceVersion ( spiceVersion ) ; } else if ( ev.matchesDefinition ( documentationFileFetchedEvent_Definition ) ) { java.lang.String cshMapping = ( ( org.ovirt.engine.ui.webadmin.uicommon.FileFetchEventArgs ) ( args ) ) . getFileContent ( ) ; org.ovirt.engine.ui.common.uicommon.ContextSensitiveHelpManager.init ( cshMapping ) ; } }
Source:
public static void getMaximalVmMemSize64OS ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String version ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) . intValue ( ) : - 1 ; } } ; org.ovirt.engine.core.common.queries.GetConfigurationValueParameters tempVar = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.VM64BitMaxMemorySizeInMB ) ; tempVar.setVersion ( version ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( tempVar , aQuery ) ; }

Target:
public static void getClusterById ( 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.GetVdsGroupById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
private void addContentToWestPanel ( org.ovirt.engine.ui.webadmin.uicommon.model.SystemTreeModelProvider treeModelProvider , org.ovirt.engine.ui.webadmin.uicommon.model.BookmarkModelProvider bookmarkModelProvider , org.ovirt.engine.ui.webadmin.uicommon.model.TagModelProvider tagModelProvider , final com.google.gwt.user.client.ui.StackLayoutPanel panel , org.ovirt.engine.ui.webadmin.ApplicationConstants constants ) { panel.insert ( new org.ovirt.engine.ui.webadmin.widget.tree.SystemTree ( treeModelProvider , constants ) , treeHeader , 26 , panel.getWidgetCount ( ) ) ; panel.insert ( new org.ovirt.engine.ui.webadmin.widget.bookmark.BookmarkList ( bookmarkModelProvider , constants ) , bookmarksHeader , 26 , panel.getWidgetCount ( ) ) ; panel.insert ( new org.ovirt.engine.ui.webadmin.widget.tags.TagList ( tagModelProvider , constants ) , tagsHeader , 26 , panel.getWidgetCount ( ) ) ; }

Target:
private void addContentToWestPanel ( org.ovirt.engine.ui.webadmin.uicommon.model.SystemTreeModelProvider treeModelProvider , org.ovirt.engine.ui.webadmin.uicommon.model.BookmarkModelProvider bookmarkModelProvider , org.ovirt.engine.ui.webadmin.uicommon.model.TagModelProvider tagModelProvider , final com.google.gwt.user.client.ui.StackLayoutPanel panel , org.ovirt.engine.ui.webadmin.ApplicationConstants constants ) { panel.insert ( new org.ovirt.engine.ui.webadmin.widget.tree.SystemTree ( treeModelProvider , constants ) , treeHeader , org.ovirt.engine.ui.webadmin.section.main.view.MainSectionView.SECTION_HEADER_HEIGHT , panel.getWidgetCount ( ) ) ; panel.insert ( new org.ovirt.engine.ui.webadmin.widget.bookmark.BookmarkList ( bookmarkModelProvider , constants ) , bookmarksHeader , org.ovirt.engine.ui.webadmin.section.main.view.MainSectionView.SECTION_HEADER_HEIGHT , panel.getWidgetCount ( ) ) ; panel.insert ( new org.ovirt.engine.ui.webadmin.widget.tags.TagList ( tagModelProvider , constants ) , tagsHeader , org.ovirt.engine.ui.webadmin.section.main.view.MainSectionView.SECTION_HEADER_HEIGHT , panel.getWidgetCount ( ) ) ; }
Source:
public void getHostFingerprint ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String hostAddress ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetServerSSHKeyFingerprint , new org.ovirt.engine.core.common.queries.ServerParameters ( hostAddress ) , aQuery ) ; }

Target:
public void getHostFingerprint ( org.ovirt.engine.ui.frontend.AsyncQuery < java.lang.String > aQuery , java.lang.String hostAddress ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.StringConverter ( ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetServerSSHKeyFingerprint , new org.ovirt.engine.core.common.queries.ServerParameters ( hostAddress ) , aQuery ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc glusterVolumeReplaceBrickStart ( java.lang.String volumeName , java.lang.String existingBrickDir , java.lang.String newBrickDir ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "GlusterVolume.replaceBrickStart" ) . withParameter ( "volumeName" , volumeName ) . withParameter ( "existingBrick" , existingBrickDir ) . withParameter ( "newBrick" , newBrickDir ) . 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.StatusOnlyReturnForXmlRpc refreshVolume ( java.lang.String sdUUID , java.lang.String spUUID , java.lang.String imgUUID , java.lang.String volUUID ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "Volume.refresh" ) . withParameter ( "storagepoolID" , spUUID ) . withParameter ( "storagedomainID" , sdUUID ) . withParameter ( "imageID" , imgUUID ) . withParameter ( "volumeID" , volUUID ) . 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 ) ; }
Source:
public void update ( org.ovirt.engine.core.common.businessentities.event_subscriber subscriber , int oldMethodId ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "event_up_name" , subscriber.getevent_up_name ( ) ) . addValue ( "old_method_id" , oldMethodId ) . addValue ( "new_method_id" , subscriber.getmethod_id ( ) ) . addValue ( "subscriber_id" , subscriber.getsubscriber_id ( ) ) ; getCallsHandler ( ) . executeModification ( "Updateevent_subscriber" , parameterSource ) ; }

Target:
public void unsubscribe ( org.ovirt.engine.core.common.businessentities.event_subscriber subscriber ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "event_up_name" , subscriber.getevent_up_name ( ) ) . addValue ( "notification_method" , subscriber.getevent_notification_method ( ) . name ( ) ) . addValue ( "subscriber_id" , subscriber.getsubscriber_id ( ) ) . addValue ( "tag_name" , subscriber.gettag_name ( ) ) ; getCallsHandler ( ) . executeModification ( "Deleteevent_subscriber" , parameterSource ) ; }
Source:
public void testCannotDisableVirtioScsi ( ) { prepareVmToPassCanDoAction ( ) ; command.getParameters ( ) . setVirtioScsiEnabled ( false ) ; org.ovirt.engine.core.common.businessentities.storage.Disk disk = new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ; disk.setDiskInterface ( DiskInterface.VirtIO_SCSI ) ; disk.setPlugged ( true ) ; mockDiskDaoGetAllForVm ( java.util.Collections.singletonList ( disk ) , true ) ; mockVmValidator ( ) ; command.initEffectiveCompatibilityVersion ( ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( command , EngineMessage.CANNOT_DISABLE_VIRTIO_SCSI_PLUGGED_DISKS ) ; }

Target:
public void testCannotDisableVirtioScsi ( ) { prepareVmToPassValidate ( ) ; command.getParameters ( ) . setVirtioScsiEnabled ( false ) ; org.ovirt.engine.core.common.businessentities.storage.Disk disk = new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ; disk.setDiskInterface ( DiskInterface.VirtIO_SCSI ) ; disk.setPlugged ( true ) ; mockDiskDaoGetAllForVm ( java.util.Collections.singletonList ( disk ) , true ) ; mockVmValidator ( ) ; command.initEffectiveCompatibilityVersion ( ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( command , EngineMessage.CANNOT_DISABLE_VIRTIO_SCSI_PLUGGED_DISKS ) ; }
Source:
private boolean isStatelessSnapshotExistsForVm ( ) { return getSnapshotDao ( ) . exists ( org.ovirt.engine.core.bll.RunVmCommand.getVm ( ) . getId ( ) , SnapshotType.STATELESS ) ; }

Target:
protected boolean isVmRunningOnNonDefaultVds ( ) { return ( ( org.ovirt.engine.core.bll.RunVmCommand.getVm ( ) . getDedicatedVmForVds ( ) ) != null ) && ( ! ( org.ovirt.engine.core.bll.RunVmCommand.getVm ( ) . getRunOnVds ( ) . equals ( org.ovirt.engine.core.bll.RunVmCommand.getVm ( ) . getDedicatedVmForVds ( ) ) ) ) ; }
Source:
public com.google.gwt.safehtml.shared.SafeHtml getTooltip ( ) { com.google.gwt.safehtml.shared.SafeHtml tooltip = null ; if ( ( getModel ( ) . isHotPlugAvailable ( ) ) && ( ! ( getModel ( ) . getIsDiskHotPlugSupported ( ) ) ) ) { tooltip = com.google.gwt.safehtml.shared.SafeHtmlUtils.fromString ( org.ovirt.engine.ui.common.widget.uicommon.vm.VmDiskListModelTable.constants.diskHotPlugNotSupported ( ) ) ; } return tooltip ; }

Target:
public com.google.gwt.safehtml.shared.SafeHtml getTooltip ( ) { com.google.gwt.safehtml.shared.SafeHtml tooltip = null ; if ( ( getModel ( ) . isHotPlugAvailable ( ) ) && ( ! ( getModel ( ) . isPlugAvailableByDisks ( false ) ) ) ) { tooltip = com.google.gwt.safehtml.shared.SafeHtmlUtils.fromString ( org.ovirt.engine.ui.common.widget.uicommon.vm.VmDiskListModelTable.constants.diskHotPlugNotSupported ( ) ) ; } return tooltip ; }
Source:
public void testDetermineMessageReturnsClassNameForNoParameterExpansion ( ) { org.slf4j.Logger log = org.mockito.Mockito.mock ( org.slf4j.Logger.class ) ; org.junit.Assert.assertEquals ( "LoggedUtils.determineMessage shouldn't return parameter expansion for a disabled log level." , java.lang.Object.class . getName ( ) , org.ovirt.engine.core.utils.log.LoggedUtils.determineMessage ( log , org.ovirt.engine.core.utils.log.LoggedUtilsTest.LoggedOverridingSubclassNoParameters.class . getAnnotation ( org.ovirt.engine.core.utils.log.Logged.class ) , new java.lang.Object ( ) ) ) ; org.junit.Assert.assertEquals ( "LoggedUtils.determineMessage shouldn't return parameter expansion when diabled completely." , java.lang.Object.class . getName ( ) , org.ovirt.engine.core.utils.log.LoggedUtils.determineMessage ( log , org.ovirt.engine.core.utils.log.LoggedUtilsTest.LoggedClass.class . getAnnotation ( org.ovirt.engine.core.utils.log.Logged.class ) , new java.lang.Object ( ) ) ) ; }

Target:
public void testDetermineMessageReturnsClassNameForNoParameterExpansion ( ) { org.slf4j.Logger log = org.mockito.Mockito.mock ( org.slf4j.Logger.class ) ; org.junit.jupiter.api.Assertions.assertEquals ( java.lang.Object.class . getName ( ) , org.ovirt.engine.core.utils.log.LoggedUtils.determineMessage ( log , org.ovirt.engine.core.utils.log.LoggedUtilsTest.LoggedOverridingSubclassNoParameters.class . getAnnotation ( org.ovirt.engine.core.utils.log.Logged.class ) , new java.lang.Object ( ) ) , "LoggedUtils.determineMessage shouldn't return parameter expansion for a disabled log level." ) ; org.junit.jupiter.api.Assertions.assertEquals ( java.lang.Object.class . getName ( ) , org.ovirt.engine.core.utils.log.LoggedUtils.determineMessage ( log , org.ovirt.engine.core.utils.log.LoggedUtilsTest.LoggedClass.class . getAnnotation ( org.ovirt.engine.core.utils.log.Logged.class ) , new java.lang.Object ( ) ) , "LoggedUtils.determineMessage shouldn't return parameter expansion when diabled completely." ) ; }
Source:
public static java.util.List < org.ovirt.engine.core.aaa.DirectoryUser > findPrincipalsByQuery ( final org.ovirt.engine.core.extensions.mgr.ExtensionProxy extension , final java.lang.String namespace , final java.lang.String query ) { return org.ovirt.engine.core.aaa.AuthzUtils.queryPrincipals ( extension , namespace , org.ovirt.engine.core.aaa.SearchQueryParsingUtils.generateQueryMap ( query , Authz.QueryEntity.PRINCIPAL ) , false , false ) ; }

Target:
public static java.util.List < org.ovirt.engine.api.extensions.ExtMap > queryGroupRecords ( final org.ovirt.engine.core.extensions.mgr.ExtensionProxy extension , final java.lang.String namespace , final org.ovirt.engine.api.extensions.ExtMap filter , boolean groupsResolving , boolean groupsResolvingRecursive ) { org.ovirt.engine.api.extensions.ExtMap inputMap = new org.ovirt.engine.api.extensions.ExtMap ( ) . mput ( Authz.InvokeKeys.QUERY_ENTITY , Authz.QueryEntity.GROUP ) . mput ( Authz.InvokeKeys.QUERY_FLAGS , org.ovirt.engine.core.aaa.AuthzUtils.queryFlagValue ( groupsResolving , groupsResolvingRecursive ) ) . mput ( Authz.InvokeKeys.QUERY_FILTER , filter ) . mput ( Authz.InvokeKeys.NAMESPACE , namespace ) ; return org.ovirt.engine.core.aaa.AuthzUtils.populateGroups ( extension , namespace , inputMap ) ; }
Source:
public void testUpdate ( ) { existingAsyncTask.setstatus ( AsyncTaskStatusEnum.aborting ) ; existingAsyncTask.setresult ( AsyncTaskResultEnum.failure ) ; existingAsyncTask.setaction_type ( VdcActionType.AddDisk ) ; org.ovirt.engine.core.common.action.AddDiskParameters addDiskToVmParams = new org.ovirt.engine.core.common.action.AddDiskParameters ( ) ; addDiskToVmParams.setSessionId ( "SESSION_ID" ) ; existingAsyncTask.setaction_parameters ( addDiskToVmParams ) ; dao.update ( existingAsyncTask ) ; org.ovirt.engine.core.common.businessentities.async_tasks result = dao.get ( existingAsyncTask.gettask_id ( ) ) ; org.junit.Assert.assertEquals ( existingAsyncTask , result ) ; }

Target:
public void testUpdate ( ) { existingAsyncTask.setstatus ( AsyncTaskStatusEnum.aborting ) ; existingAsyncTask.setresult ( AsyncTaskResultEnum.failure ) ; existingAsyncTask.setaction_type ( VdcActionType.AddDisk ) ; org.ovirt.engine.core.common.action.AddDiskParameters addDiskToVmParams = new org.ovirt.engine.core.common.action.AddDiskParameters ( ) ; addDiskToVmParams.setSessionId ( "SESSION_ID" ) ; existingAsyncTask.setaction_parameters ( addDiskToVmParams ) ; dao.update ( existingAsyncTask ) ; org.ovirt.engine.core.common.businessentities.AsyncTasks result = dao.get ( existingAsyncTask.gettask_id ( ) ) ; org.junit.Assert.assertEquals ( existingAsyncTask , result ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.DiskImage createDiskImage ( ) { return new org.ovirt.engine.core.common.businessentities.DiskImage ( true , new java.util.Date ( ) , new java.util.Date ( ) , 1L , "1" , org.ovirt.engine.core.compat.Guid.NewGuid ( ) , "2" , org.ovirt.engine.core.compat.Guid.NewGuid ( ) , 1L , org.ovirt.engine.core.compat.Guid.NewGuid ( ) , org.ovirt.engine.core.common.businessentities.ImageStatus.OK , new java.util.Date ( ) , "" , org.ovirt.engine.core.common.businessentities.VmEntityType.VM , 1 , null , null , org.ovirt.engine.core.common.businessentities.QuotaEnforcementTypeEnum.DISABLED , false ) ; }

Target:
private org.ovirt.engine.core.common.businessentities.DiskImage createDiskImage ( ) { return new org.ovirt.engine.core.common.businessentities.DiskImage ( true , new java.util.Date ( ) , new java.util.Date ( ) , 1L , "1" , org.ovirt.engine.core.compat.Guid.newGuid ( ) , "2" , org.ovirt.engine.core.compat.Guid.newGuid ( ) , 1L , org.ovirt.engine.core.compat.Guid.newGuid ( ) , org.ovirt.engine.core.common.businessentities.ImageStatus.OK , new java.util.Date ( ) , "" , org.ovirt.engine.core.common.businessentities.VmEntityType.VM , 1 , null , null , org.ovirt.engine.core.common.businessentities.QuotaEnforcementTypeEnum.DISABLED , false ) ; }
Source:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel ) ( target ) ) ; model.setDataCentersAndClusters ( model , dataCenters , ( ( java.util.List < org.ovirt.engine.core.common.businessentities.VDSGroup > ) ( returnValue ) ) , null ) ; initCdImage ( ) ; getPoolModelBehaviorInitializedEvent ( ) . raise ( this , EventArgs.Empty ) ; }

Target:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel ) ( target ) ) ; model.setDataCentersAndClusters ( model , dataCenters , ( ( java.util.List < org.ovirt.engine.core.common.businessentities.VDSGroup > ) ( returnValue ) ) , null ) ; initCdImage ( ) ; getPoolModelBehaviorInitializedEvent ( ) . raise ( this , EventArgs.EMPTY ) ; }
Source:
public void canDoWithPinnedHostOnVm ( ) { final org.ovirt.engine.core.bll.numa.vm.AddVmNumaNodesCommand command = mockedCommand ( ) ; org.assertj.core.api.Assertions.assertThat ( command.canDoAction ( ) ) . isTrue ( ) ; }

Target:
public void canSetNumaConfigurationWithVmFromParams ( ) { final org.ovirt.engine.core.bll.numa.vm.AddVmNumaNodesCommand command = mockedCommandWithVmFromParams ( ) ; command.executeCommand ( ) ; org.mockito.Mockito.verify ( vmNumaNodeDao ) . massSaveNumaNode ( org.mockito.Matchers.eq ( newNumaNodes ) , org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) , org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ; }
Source:
public void networkInUseByTemplates ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.VmTemplate template = org.mockito.Mockito.mock ( org.ovirt.engine.core.common.businessentities.VmTemplate.class ) ; org.mockito.Mockito.when ( template.getName ( ) ) . thenReturn ( org.ovirt.engine.core.bll.validator.NetworkValidatorTest.NAMEABLE_NAME ) ; networkNotUsedByTemplatesTest ( org.ovirt.engine.core.bll.validator.NetworkValidatorTest.failsWithNetworkInUse ( ) , java.util.Collections.singletonList ( template ) ) ; }

Target:
public void networkInUseByOneTemplate ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.VmTemplate template = org.mockito.Mockito.mock ( org.ovirt.engine.core.common.businessentities.VmTemplate.class ) ; org.mockito.Mockito.when ( template.getName ( ) ) . thenReturn ( org.ovirt.engine.core.bll.validator.NetworkValidatorTest.NAMEABLE_NAME ) ; networkNotUsedByTemplatesTest ( org.ovirt.engine.core.bll.validator.NetworkValidatorTest.failsWithOneNetworkInUse ( ) , java.util.Collections.singletonList ( template ) ) ; }