auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public org.ovirt.engine.core.vdsbroker.irsbroker.IsoListReturnForXmlRpc getIsoList ( java.lang.String spUUID ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.getIsoList ( spUUID ) ; org.ovirt.engine.core.vdsbroker.irsbroker.IsoListReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.irsbroker.IsoListReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }

Target:
public org.ovirt.engine.core.vdsbroker.irsbroker.FileStatsReturnForXmlRpc getIsoList ( java.lang.String spUUID ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.getIsoList ( spUUID ) ; org.ovirt.engine.core.vdsbroker.irsbroker.FileStatsReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.irsbroker.FileStatsReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
private java.util.List < org.ovirt.engine.core.common.businessentities.VmInit > setUpVmInit ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmInit > vmInits = new java.util.ArrayList ( NAMES.length ) ; for ( int i = 0 ; i < ( NAMES.length ) ; i ++ ) { org.ovirt.engine.core.common.businessentities.VmInit vmInit = control.createMock ( org.ovirt.engine.core.common.businessentities.VmInit.class ) ; vmInits.add ( vmInit ) ; } return vmInits ; }

Target:
private java.util.List < org.ovirt.engine.core.common.businessentities.VmInit > setUpVmInit ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmInit > vmInits = new java.util.ArrayList ( NAMES.length ) ; for ( int i = 0 ; i < ( NAMES.length ) ; i ++ ) { org.ovirt.engine.core.common.businessentities.VmInit vmInit = org.mockito.Mockito.mock ( org.ovirt.engine.core.common.businessentities.VmInit.class ) ; vmInits.add ( vmInit ) ; } return vmInits ; }
Source:
public void Template_SelectedItemChanged ( ) { super . Template_SelectedItemChanged ( ) ; org.ovirt.engine.core.common.businessentities.VmTemplate template = ( ( org.ovirt.engine.core.common.businessentities.VmTemplate ) ( getModel ( ) . getTemplate ( ) . getSelectedItem ( ) ) ) ; if ( template == null ) { return ; } setupWindowModelFrom ( template ) ; updateHostPinning ( template.getMigrationSupport ( ) ) ; doChangeDefautlHost ( template.getDedicatedVmForVds ( ) ) ; }

Target:
public void template_SelectedItemChanged ( ) { super . template_SelectedItemChanged ( ) ; org.ovirt.engine.core.common.businessentities.VmTemplate template = ( ( org.ovirt.engine.core.common.businessentities.VmTemplate ) ( getModel ( ) . getTemplate ( ) . getSelectedItem ( ) ) ) ; if ( template == null ) { return ; } setupWindowModelFrom ( template ) ; updateHostPinning ( template.getMigrationSupport ( ) ) ; doChangeDefautlHost ( template.getDedicatedVmForVds ( ) ) ; }
Source:
public void updateNetworkDevice ( ) { org.ovirt.engine.core.common.businessentities.HostDevice before = getNetworkDevice ( ) ; before.setNetworkInterfaceName ( ( ( before.getNetworkInterfaceName ( ) ) + "new" ) ) ; dao.update ( before ) ; org.ovirt.engine.core.common.businessentities.HostDevice after = dao.get ( before.getId ( ) ) ; org.junit.Assert.assertNotNull ( after ) ; org.junit.Assert.assertEquals ( before , after ) ; }

Target:
public void updateNetworkDevice ( ) { org.ovirt.engine.core.common.businessentities.HostDevice before = getNetworkDevice ( ) ; before.setNetworkInterfaceName ( ( ( before.getNetworkInterfaceName ( ) ) + "new" ) ) ; before.setDriver ( "updated driver" ) ; dao.update ( before ) ; org.ovirt.engine.core.common.businessentities.HostDevice after = dao.get ( before.getId ( ) ) ; org.junit.Assert.assertNotNull ( after ) ; org.junit.Assert.assertEquals ( before , after ) ; }
Source:
public static 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.RunQuery ( VdcQueryType.GetServerSSHKeyFingerprint , new org.ovirt.engine.core.common.queries.ServerParameters ( hostAddress ) , aQuery ) ; }

Target:
public static void getDataCenterById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStoragePoolById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) , aQuery ) ; }
Source:
private void removeSessionImpl ( java.lang.String sessionId , int reason , java.lang.String message , java.lang.Object ... msgArgs ) { org.ovirt.engine.core.aaa.AcctUtils.reportRecords ( reason , getPrincipalName ( sessionId ) , ( ( org.ovirt.engine.api.extensions.ExtMap ) ( getData ( sessionId , org.ovirt.engine.core.bll.aaa.SessionDataContainer.AUTH_RECORD_PARAMETER_NAME , false ) ) ) , ( ( org.ovirt.engine.api.extensions.ExtMap ) ( getData ( sessionId , org.ovirt.engine.core.bll.aaa.SessionDataContainer.PRINCIPAL_RECORD_PARAMETER_NAME , false ) ) ) , message , msgArgs ) ; getDbFacade ( ) . getEngineSessionDao ( ) . remove ( getEngineSessionSeqId ( sessionId ) ) ; sessionInfoMap.remove ( sessionId ) ; }

Target:
public java.lang.String getUserName ( java.lang.String sessionId ) { return java.lang.String.format ( "%s@%s" , getPrincipalName ( sessionId ) , ( ( getProfile ( sessionId ) ) != null ? getProfile ( sessionId ) . getName ( ) : "N/A" ) ) ; }
Source:
public void onSuccess ( final org.ovirt.engine.core.common.action.VdcReturnValueBase result ) { org.ovirt.engine.ui.frontend.Frontend.logger.finer ( "Succesful returned result from Logoff." ) ; callback.asyncCallback.onSuccess ( callback.getModel ( ) , result ) ; if ( ( org.ovirt.engine.ui.frontend.Frontend.getLoginHandler ( ) ) != null ) { org.ovirt.engine.ui.frontend.Frontend.getLoginHandler ( ) . onLogout ( ) ; } }

Target:
public void onSuccess ( final org.ovirt.engine.core.common.action.VdcReturnValueBase result ) { org.ovirt.engine.ui.frontend.Frontend.logger.finer ( "Succesful returned result from Logoff." ) ; callback.getDel ( ) . onSuccess ( callback.getModel ( ) , result ) ; if ( ( org.ovirt.engine.ui.frontend.Frontend.getLoginHandler ( ) ) != null ) { org.ovirt.engine.ui.frontend.Frontend.getLoginHandler ( ) . onLogout ( ) ; } }
Source:
protected javax.ws.rs.core.UriInfo setUpUriInfo ( ) { javax.ws.rs.core.UriBuilder uriBuilder = createMock ( javax.ws.rs.core.UriBuilder.class ) ; org.easymock.EasyMock.expect ( uriBuilder.clone ( ) ) . andReturn ( uriBuilder ) . anyTimes ( ) ; javax.ws.rs.core.UriInfo uriInfo = createMock ( javax.ws.rs.core.UriInfo.class ) ; org.easymock.EasyMock.expect ( uriInfo.getQueryParameters ( ) ) . andReturn ( null ) . anyTimes ( ) ; org.easymock.EasyMock.expect ( uriInfo.getPathSegments ( ) ) . andReturn ( null ) . anyTimes ( ) ; return uriInfo ; }

Target:
protected javax.ws.rs.core.UriInfo setUpUriInfo ( ) { javax.ws.rs.core.UriBuilder uriBuilder = org.mockito.Mockito.mock ( javax.ws.rs.core.UriBuilder.class ) ; org.mockito.Mockito.when ( uriBuilder.clone ( ) ) . thenReturn ( uriBuilder ) ; javax.ws.rs.core.UriInfo uriInfo = org.mockito.Mockito.mock ( javax.ws.rs.core.UriInfo.class ) ; org.mockito.Mockito.when ( uriInfo.getQueryParameters ( ) ) . thenReturn ( null ) ; org.mockito.Mockito.when ( uriInfo.getPathSegments ( ) ) . thenReturn ( null ) ; return uriInfo ; }
Source:
protected void executeCommand ( ) { getAffinityGroup ( ) . setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; affinityGroupDao.save ( getAffinityGroup ( ) ) ; getReturnValue ( ) . setActionReturnValue ( getAffinityGroup ( ) . getId ( ) ) ; setSucceeded ( true ) ; }

Target:
protected void executeCommand ( ) { getAffinityGroup ( ) . setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; affinityGroupDao.save ( getAffinityGroup ( ) ) ; getReturnValue ( ) . setActionReturnValue ( getAffinityGroup ( ) . getId ( ) ) ; vmStaticDao.incrementDbGenerationForVms ( getAffinityGroup ( ) . getVmIds ( ) ) ; setSucceeded ( true ) ; }
Source:
public void testClusterLinks ( ) { org.ovirt.engine.api.model.Cluster cluster = new org.ovirt.engine.api.model.Cluster ( ) ; cluster.setId ( org.ovirt.engine.api.restapi.util.LinkHelperTest.CLUSTER_ID ) ; cluster.setDataCenter ( new org.ovirt.engine.api.model.DataCenter ( ) ) ; cluster.getDataCenter ( ) . setId ( org.ovirt.engine.api.restapi.util.LinkHelperTest.DATA_CENTER_ID ) ; org.ovirt.engine.api.restapi.util.LinkHelper.addLinks ( cluster ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.api.restapi.util.LinkHelperTest.CLUSTER_HREF , cluster.getHref ( ) ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.api.restapi.util.LinkHelperTest.DATA_CENTER_HREF , cluster.getDataCenter ( ) . getHref ( ) ) ; }

Target:
public void testClusterLinks ( ) { org.ovirt.engine.api.model.Cluster cluster = new org.ovirt.engine.api.model.Cluster ( ) ; cluster.setId ( org.ovirt.engine.api.restapi.util.LinkHelperTest.CLUSTER_ID ) ; cluster.setDataCenter ( new org.ovirt.engine.api.model.DataCenter ( ) ) ; cluster.getDataCenter ( ) . setId ( org.ovirt.engine.api.restapi.util.LinkHelperTest.DATA_CENTER_ID ) ; org.ovirt.engine.api.restapi.util.LinkHelper.addLinks ( cluster ) ; org.junit.jupiter.api.Assertions.assertEquals ( org.ovirt.engine.api.restapi.util.LinkHelperTest.CLUSTER_HREF , cluster.getHref ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( org.ovirt.engine.api.restapi.util.LinkHelperTest.DATA_CENTER_HREF , cluster.getDataCenter ( ) . getHref ( ) ) ; }
Source:
public void setElementId ( java.lang.String elementId ) { this . elementId = elementId ; vmName.getElement ( ) . setId ( org.ovirt.engine.ui.common.utils.ElementIdUtils.createElementId ( elementId , "name" ) ) ; vmStatus.getElement ( ) . setId ( org.ovirt.engine.ui.common.utils.ElementIdUtils.createElementId ( elementId , "status" ) ) ; }

Target:
public void setElementId ( java.lang.String elementId ) { vmName.getElement ( ) . setId ( org.ovirt.engine.ui.common.utils.ElementIdUtils.createElementId ( elementId , "name" ) ) ; vmStatus.getElement ( ) . setId ( org.ovirt.engine.ui.common.utils.ElementIdUtils.createElementId ( elementId , "status" ) ) ; runButton.setElementId ( org.ovirt.engine.ui.common.utils.ElementIdUtils.createElementId ( elementId , "runButton" ) ) ; shutdownButton.setElementId ( org.ovirt.engine.ui.common.utils.ElementIdUtils.createElementId ( elementId , "shutdownButton" ) ) ; suspendButton.setElementId ( org.ovirt.engine.ui.common.utils.ElementIdUtils.createElementId ( elementId , "suspendButton" ) ) ; }
Source:
public void testParseIngoreValues ( ) { java.util.List < org.ovirt.engine.api.model.PowerManagement > 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 ) ; assertNotNull ( ret ) ; assertEquals ( 1 , ret.size ( ) ) ; verifyResult ( ret.get ( 0 ) , "foo" , "one" , "bool" , null , "two" , "int" , null , "three" , "bool" , null ) ; }
Source:
protected void showContextMenu ( org.ovirt.engine.ui.webadmin.section.main.view.popup.scheduling.panels.PolicyUnitPanel sourcePanel , int clientX , int clientY ) { org.ovirt.engine.ui.common.widget.MenuBar menuBar = createMenu ( ) ; fillMenuBar ( menuBar ) ; addSubMenu ( menuBar ) ; org.ovirt.engine.ui.webadmin.section.main.view.popup.scheduling.panels.PolicyUnitPanel.menuPopup.setWidget ( menuBar ) ; org.ovirt.engine.ui.webadmin.section.main.view.popup.scheduling.panels.PolicyUnitPanel.menuPopup.setPopupPosition ( clientX , clientY ) ; org.ovirt.engine.ui.webadmin.section.main.view.popup.scheduling.panels.PolicyUnitPanel.menuPopup.show ( ) ; }

Target:
protected void showContextMenu ( org.ovirt.engine.ui.webadmin.section.main.view.popup.scheduling.panels.PolicyUnitPanel sourcePanel , int clientX , int clientY ) { org.ovirt.engine.ui.common.widget.MenuBar menuBar = createMenu ( ) ; fillMenuBar ( menuBar ) ; if ( policyUnit.isEnabled ( ) ) { addSubMenu ( menuBar ) ; } org.ovirt.engine.ui.webadmin.section.main.view.popup.scheduling.panels.PolicyUnitPanel.menuPopup.setWidget ( menuBar ) ; org.ovirt.engine.ui.webadmin.section.main.view.popup.scheduling.panels.PolicyUnitPanel.menuPopup.setPopupPosition ( clientX , clientY ) ; org.ovirt.engine.ui.webadmin.section.main.view.popup.scheduling.panels.PolicyUnitPanel.menuPopup.show ( ) ; }
Source:
public org.ovirt.engine.core.common.AuditLogType getAuditLogTypeValue ( ) { return org.ovirt.engine.core.bll.aaa.LogoutSessionCommand.getSucceeded ( ) ? org.ovirt.engine.core.common.AuditLogType.USER_VDC_LOGOUT : org.ovirt.engine.core.common.AuditLogType.USER_VDC_LOGOUT_FAILED ; }

Target:
public org.ovirt.engine.core.common.AuditLogType getAuditLogTypeValue ( ) { addCustomValue ( "SessionID" , ( org.apache.commons.lang.StringUtils.isEmpty ( sessionId ) ? org.ovirt.engine.core.bll.aaa.LogoutSessionCommand.UNKNOWN : sessionId ) ) ; addCustomValue ( "SourceIP" , ( org.apache.commons.lang.StringUtils.isEmpty ( sourceIp ) ? org.ovirt.engine.core.bll.aaa.LogoutSessionCommand.UNKNOWN : sourceIp ) ) ; return org.ovirt.engine.core.bll.aaa.LogoutSessionCommand.getSucceeded ( ) ? org.ovirt.engine.core.common.AuditLogType.USER_VDC_LOGOUT : org.ovirt.engine.core.common.AuditLogType.USER_VDC_LOGOUT_FAILED ; }
Source:
private static void testParseLunFromXmlRpcForDevtypeField ( org.ovirt.engine.core.common.businessentities.storage.StorageType expectedStorageType , java.lang.String mockDevtype ) { java.util.Map < java.lang.String , java.lang.Object > xlun = new java.util.HashMap < > ( ) ; xlun.put ( GetDeviceListVDSCommand.DEVTYPE_FIELD , mockDevtype ) ; org.ovirt.engine.core.common.businessentities.storage.LUNs lun = org.ovirt.engine.core.vdsbroker.vdsbroker.GetDeviceListVDSCommand.parseLunFromXmlRpc ( xlun , Version.v4_1 ) ; org.junit.Assert.assertEquals ( expectedStorageType , lun.getLunType ( ) ) ; }

Target:
private static void testParseLunForDevtypeField ( org.ovirt.engine.core.common.businessentities.storage.StorageType expectedStorageType , java.lang.String mockDevtype ) { java.util.Map < java.lang.String , java.lang.Object > xlun = new java.util.HashMap < > ( ) ; xlun.put ( GetDeviceListVDSCommand.DEVTYPE_FIELD , mockDevtype ) ; org.ovirt.engine.core.common.businessentities.storage.LUNs lun = org.ovirt.engine.core.vdsbroker.vdsbroker.GetDeviceListVDSCommand.parseLun ( xlun , Version.v4_1 ) ; org.junit.Assert.assertEquals ( expectedStorageType , lun.getLunType ( ) ) ; }
Source:
protected void executeVdsBrokerCommand ( ) { result = org.ovirt.engine.core.vdsbroker.gluster.GetGlusterVolumeGeoRepConfigListVDSCommand.getBroker ( ) . glusterVolumeGeoRepConfigList ( org.ovirt.engine.core.vdsbroker.gluster.GetGlusterVolumeGeoRepConfigListVDSCommand.getParameters ( ) . getVolumeName ( ) , org.ovirt.engine.core.vdsbroker.gluster.GetGlusterVolumeGeoRepConfigListVDSCommand.getParameters ( ) . getSlaveHost ( ) , org.ovirt.engine.core.vdsbroker.gluster.GetGlusterVolumeGeoRepConfigListVDSCommand.getParameters ( ) . getSlaveVolume ( ) ) ; org.ovirt.engine.core.vdsbroker.gluster.GetGlusterVolumeGeoRepConfigListVDSCommand.proceedProxyReturnValue ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSessionConfiguration > sessionConfigs = result.getSessionConfig ( ) ; setReturnValue ( sessionConfigs ) ; }

Target:
protected void executeVdsBrokerCommand ( ) { result = org.ovirt.engine.core.vdsbroker.gluster.GetGlusterVolumeGeoRepConfigListVDSCommand.getBroker ( ) . glusterVolumeGeoRepConfigList ( org.ovirt.engine.core.vdsbroker.gluster.GetGlusterVolumeGeoRepConfigListVDSCommand.getParameters ( ) . getVolumeName ( ) , org.ovirt.engine.core.vdsbroker.gluster.GetGlusterVolumeGeoRepConfigListVDSCommand.getParameters ( ) . getSlaveHost ( ) , org.ovirt.engine.core.vdsbroker.gluster.GetGlusterVolumeGeoRepConfigListVDSCommand.getParameters ( ) . getSlaveVolume ( ) , org.ovirt.engine.core.vdsbroker.gluster.GetGlusterVolumeGeoRepConfigListVDSCommand.getParameters ( ) . getUserName ( ) ) ; org.ovirt.engine.core.vdsbroker.gluster.GetGlusterVolumeGeoRepConfigListVDSCommand.proceedProxyReturnValue ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSessionConfiguration > sessionConfigs = result.getSessionConfig ( ) ; setReturnValue ( sessionConfigs ) ; }
Source:
protected void endActionOnAllImageGroups ( ) { for ( org.ovirt.engine.core.common.action.VdcActionParametersBase p : org.ovirt.engine.core.bll.storage.export.MoveOrCopyTemplateCommand.getParameters ( ) . getImagesParameters ( ) ) { org.ovirt.engine.core.bll.storage.export.MoveOrCopyTemplateCommand.getBackend ( ) . endAction ( VdcActionType.CopyImageGroup , p , org.ovirt.engine.core.bll.storage.export.MoveOrCopyTemplateCommand.getContext ( ) . clone ( ) . withoutCompensationContext ( ) . withoutExecutionContext ( ) . withoutLock ( ) ) ; } }

Target:
protected void endActionOnAllImageGroups ( ) { for ( org.ovirt.engine.core.common.action.VdcActionParametersBase p : org.ovirt.engine.core.bll.exportimport.MoveOrCopyTemplateCommand.getParameters ( ) . getImagesParameters ( ) ) { org.ovirt.engine.core.bll.exportimport.MoveOrCopyTemplateCommand.getBackend ( ) . endAction ( VdcActionType.CopyImageGroup , p , org.ovirt.engine.core.bll.exportimport.MoveOrCopyTemplateCommand.getContext ( ) . clone ( ) . withoutCompensationContext ( ) . withoutExecutionContext ( ) . withoutLock ( ) ) ; } }
Source:
private void verifyPermit ( org.ovirt.engine.api.model.Permit permit , org.ovirt.engine.core.common.businessentities.ActionGroup action ) { org.junit.Assert.assertEquals ( java.lang.Integer.toString ( action.getId ( ) ) , permit.getId ( ) ) ; org.junit.Assert.assertEquals ( action.name ( ) . toLowerCase ( ) , permit.getName ( ) ) ; org.junit.Assert.assertNotNull ( permit.getRole ( ) ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.api.restapi.resource.BackendPermitResourceTest.ROLE_ID.toString ( ) , permit.getRole ( ) . getId ( ) ) ; }

Target:
private void verifyPermit ( org.ovirt.engine.api.model.Permit permit , org.ovirt.engine.core.common.businessentities.ActionGroup action ) { org.junit.jupiter.api.Assertions.assertEquals ( java.lang.Integer.toString ( action.getId ( ) ) , permit.getId ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( action.name ( ) . toLowerCase ( ) , permit.getName ( ) ) ; org.junit.jupiter.api.Assertions.assertNotNull ( permit.getRole ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( org.ovirt.engine.api.restapi.resource.BackendPermitResourceTest.ROLE_ID.toString ( ) , permit.getRole ( ) . getId ( ) ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object result ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Provider > providers = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Provider > ) ( result ) ) ; org.ovirt.engine.ui.uicommonweb.models.ListModel < org.ovirt.engine.core.common.businessentities.Provider > providersListModel = getProviders ( ) ; providersListModel.setItems ( providers ) ; providersListModel.setIsChangable ( true ) ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object result ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Provider > providers = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Provider > ) ( result ) ) ; org.ovirt.engine.ui.uicommonweb.models.ListModel < org.ovirt.engine.core.common.businessentities.Provider > providersListModel = getProviders ( ) ; providersListModel.setItems ( providers ) ; providersListModel.setIsChangable ( true ) ; providersListModel.setSelectedItem ( providers.get ( 0 ) ) ; getIsDiscorveredHosts ( ) . setEntity ( null ) ; getIsDiscorveredHosts ( ) . setEntity ( true ) ; }
Source:
private void doTestBadUpdate ( boolean valid , boolean success , java.lang.String detail ) throws java.lang.Exception { setUpEntityQueryExpectations ( 1 , 0 , false ) ; setUriInfo ( setUpActionExpectations ( ActionType.UpdateMacPool , org.ovirt.engine.core.common.action.MacPoolParameters.class , new java.lang.String [ ] { } , new java.lang.Object [ ] { } , valid , success ) ) ; try { resource.update ( org.ovirt.engine.api.restapi.resource.BackendMacPoolResourceTest.getModel ( 0 ) ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }

Target:
private void doTestBadUpdate ( boolean valid , boolean success , java.lang.String detail ) throws java.lang.Exception { setUpEntityQueryExpectations ( 1 , 0 , false ) ; setUriInfo ( setUpActionExpectations ( ActionType.UpdateMacPool , org.ovirt.engine.core.common.action.MacPoolParameters.class , new java.lang.String [ ] { } , new java.lang.Object [ ] { } , valid , success ) ) ; try { resource.update ( org.ovirt.engine.api.restapi.resource.BackendMacPoolResourceTest.getModel ( 0 ) ) ; org.junit.Assert.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }
Source:
public java.lang.Object runInTransaction ( ) { long currentTime = java.lang.System.currentTimeMillis ( ) ; repoFileMetaDataDao.removeRepoDomainFileList ( repoStorageDomainId , fileTypeExt ) ; org.ovirt.engine.core.common.businessentities.RepoFileMetaData repo_md ; for ( java.lang.String isoFile : isoDomainList ) { repo_md = new org.ovirt.engine.core.common.businessentities.RepoFileMetaData ( ) ; repo_md.setLastRefreshed ( currentTime ) ; repo_md.setSize ( 0 ) ; repo_md.setRepoDomainId ( repoStorageDomainId ) ; repo_md.setDateCreated ( null ) ; repo_md.setRepoFileName ( isoFile ) ; repo_md.setFileType ( fileTypeExt ) ; repoFileMetaDataDao.addRepoFileMap ( repo_md ) ; } return true ; }

Target:
public java.lang.Object runInTransaction ( ) { long currentTime = java.lang.System.currentTimeMillis ( ) ; repoFileMetaDataDao.removeRepoDomainFileList ( repoStorageDomainId , imageType ) ; org.ovirt.engine.core.common.businessentities.RepoFileMetaData repo_md ; for ( java.lang.String isoFile : isoDomainList ) { repo_md = new org.ovirt.engine.core.common.businessentities.RepoFileMetaData ( ) ; repo_md.setLastRefreshed ( currentTime ) ; repo_md.setSize ( 0 ) ; repo_md.setRepoDomainId ( repoStorageDomainId ) ; repo_md.setDateCreated ( null ) ; repo_md.setRepoFileName ( isoFile ) ; repo_md.setFileType ( imageType ) ; repoFileMetaDataDao.addRepoFileMap ( repo_md ) ; } return true ; }
Source:
public org.ovirt.engine.core.common.businessentities.VDS getValue ( S object ) { if ( object instanceof org.ovirt.engine.core.common.businessentities.VDS ) { return ( ( org.ovirt.engine.core.common.businessentities.VDS ) ( object ) ) ; } return null ; }

Target:
public com.google.gwt.safehtml.shared.SafeHtml getEntityValue ( org.ovirt.engine.core.common.businessentities.VDS object ) { java.util.List < com.google.gwt.safehtml.shared.SafeHtml > imagesHtml = new java.util.ArrayList ( getSafeHtmlStringMap ( object ) . keySet ( ) ) ; if ( ! ( imagesHtml.isEmpty ( ) ) ) { return org.ovirt.engine.ui.webadmin.widget.table.column.MultiImageColumnHelper.getValue ( imagesHtml ) ; } return null ; }
Source:
public boolean isVisible ( ) { org.ovirt.engine.core.common.businessentities.StorageDomainType storageDomainType = ( ( org.ovirt.engine.core.common.businessentities.StorageDomain ) ( getDetailModel ( ) . getEntity ( ) ) ) . getStorageDomainType ( ) ; return ( ! ( storageDomainType.equals ( StorageDomainType.ISO ) ) ) && ( ! ( storageDomainType.equals ( StorageDomainType.ImportExport ) ) ) ; }

Target:
public boolean getIsAvailable ( ) { org.ovirt.engine.core.common.businessentities.StorageDomain entity = ( ( org.ovirt.engine.core.common.businessentities.StorageDomain ) ( getDetailModel ( ) . getEntity ( ) ) ) ; org.ovirt.engine.core.common.businessentities.StorageDomainType storageDomainType = ( entity != null ) ? entity.getStorageDomainType ( ) : null ; return ( ! ( StorageDomainType.ISO.equals ( storageDomainType ) ) ) && ( ! ( StorageDomainType.ImportExport.equals ( storageDomainType ) ) ) ; }
Source:
public static void isMTUOverrideSupported ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String version ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Boolean ) ( source ) ) . booleanValue ( ) : true ; } } ; org.ovirt.engine.core.common.queries.GetConfigurationValueParameters tempVar = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.MTUOverrideSupported ) ; tempVar.setVersion ( version ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( tempVar , aQuery ) ; }

Target:
public static void getAllProvidersByType ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.businessentities.ProviderType providerType ) { 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.Provider > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllProviders , new org.ovirt.engine.core.common.queries.GetAllProvidersParameters ( providerType ) , aQuery ) ; }
Source:
protected void proceedProxyReturnValue ( ) { org.ovirt.engine.core.common.errors.EngineError returnStatus = getReturnValueFromStatus ( org.ovirt.engine.core.vdsbroker.vdsbroker.CreateStoragePoolVDSCommand.getReturnStatus ( ) ) ; switch ( returnStatus ) { case StorageDomainAccessError : org.ovirt.engine.core.vdsbroker.vdsbroker.CreateStoragePoolVDSCommand.getVDSReturnValue ( ) . setSucceeded ( false ) ; org.ovirt.engine.core.common.errors.VDSError tempVar = new org.ovirt.engine.core.common.errors.VDSError ( ) ; tempVar.setCode ( EngineError.StorageDomainAccessError ) ; tempVar.setMessage ( org.ovirt.engine.core.vdsbroker.vdsbroker.CreateStoragePoolVDSCommand.getReturnStatus ( ) . mMessage ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.CreateStoragePoolVDSCommand.getVDSReturnValue ( ) . setVdsError ( tempVar ) ; break ; default : super . proceedProxyReturnValue ( ) ; initializeVdsError ( returnStatus ) ; break ; } }

Target:
protected void proceedProxyReturnValue ( ) { org.ovirt.engine.core.common.errors.EngineError returnStatus = getReturnValueFromStatus ( org.ovirt.engine.core.vdsbroker.vdsbroker.CreateStoragePoolVDSCommand.getReturnStatus ( ) ) ; switch ( returnStatus ) { case StorageDomainAccessError : org.ovirt.engine.core.vdsbroker.vdsbroker.CreateStoragePoolVDSCommand.getVDSReturnValue ( ) . setSucceeded ( false ) ; org.ovirt.engine.core.common.errors.VDSError tempVar = new org.ovirt.engine.core.common.errors.VDSError ( ) ; tempVar.setCode ( EngineError.StorageDomainAccessError ) ; tempVar.setMessage ( org.ovirt.engine.core.vdsbroker.vdsbroker.CreateStoragePoolVDSCommand.getReturnStatus ( ) . message ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.CreateStoragePoolVDSCommand.getVDSReturnValue ( ) . setVdsError ( tempVar ) ; break ; default : super . proceedProxyReturnValue ( ) ; initializeVdsError ( returnStatus ) ; break ; } }
Source:
private static void clusterVersionIsSupported ( ) { org.powermock.api.mockito.PowerMockito.mockStatic ( org.ovirt.engine.core.bll.utils.VersionSupport.class ) ; org.powermock.api.mockito.PowerMockito.when ( org.ovirt.engine.core.bll.utils.VersionSupport.checkVersionSupported ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Version.class ) ) ) . thenReturn ( true ) ; org.powermock.api.mockito.PowerMockito.when ( org.ovirt.engine.core.bll.utils.VersionSupport.checkClusterVersionSupported ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Version.class ) , org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.VDS.class ) ) ) . thenReturn ( true ) ; }

Target:
private void cpuFlagsMissing ( ) { java.util.List < java.lang.String > strings = new java.util.ArrayList < java.lang.String > ( ) ; strings.add ( "foo" ) ; org.mockito.Mockito.doReturn ( strings ) . when ( cmd ) . missingServerCpuFlags ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.VDS.class ) ) ; }
Source:
public java.lang.Object runInTransaction ( ) { getCompensationContext ( ) . snapshotEntityStatus ( getStoragePool ( ) , getStoragePool ( ) . getstatus ( ) ) ; getStoragePool ( ) . setstatus ( StoragePoolStatus.Maintenance ) ; getStoragePoolDAO ( ) . updateStatus ( getStoragePool ( ) . getId ( ) , getStoragePool ( ) . getstatus ( ) ) ; getCompensationContext ( ) . stateChanged ( ) ; return null ; }

Target:
public java.lang.Object runInTransaction ( ) { getCompensationContext ( ) . snapshotEntityStatus ( getStoragePool ( ) , getStoragePool ( ) . getStatus ( ) ) ; getStoragePool ( ) . setStatus ( StoragePoolStatus.Maintenance ) ; getStoragePoolDAO ( ) . updateStatus ( getStoragePool ( ) . getId ( ) , getStoragePool ( ) . getStatus ( ) ) ; getCompensationContext ( ) . stateChanged ( ) ; return null ; }
Source:
public void shouldNotMigrateVmOnClusterTwoWhileInUpgradeMode ( ) { cluster2.setClusterPolicyId ( ClusterPolicy.UPGRADE_POLICY_GUID ) ; arem.refresh ( ) ; org.mockito.Mockito.verify ( arem ) . migrateVM ( vm1 ) ; org.mockito.Mockito.verify ( arem , org.mockito.Mockito.times ( 1 ) ) . migrateVM ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.VM.class ) ) ; org.mockito.Mockito.verify ( arem , org.mockito.Mockito.times ( 0 ) ) . migrateVM ( org.mockito.Matchers.eq ( vm2 ) ) ; }

Target:
public void shouldNotMigrateVmOnClusterTwoWhileInUpgradeMode ( ) { cluster2.setClusterPolicyId ( ClusterPolicy.UPGRADE_POLICY_GUID ) ; arem.refresh ( ) ; org.mockito.Mockito.verify ( arem ) . migrateVM ( vm1 ) ; org.mockito.Mockito.verify ( arem , org.mockito.Mockito.times ( 1 ) ) . migrateVM ( org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.common.businessentities.VM.class ) ) ; org.mockito.Mockito.verify ( arem , org.mockito.Mockito.times ( 0 ) ) . migrateVM ( org.mockito.ArgumentMatchers.eq ( vm2 ) ) ; }
Source:
private void castEveryonePermissionsToUser ( org.ovirt.engine.api.model.Permission entity ) { if ( ( ( ( entity.getAdElementId ( ) ) != null ) && ( entity.getAdElementId ( ) . equals ( Guid.EVERYONE ) ) ) && ( queryType.equals ( VdcQueryType.GetPermissionsByAdElementId ) ) ) { entity.setAdElementId ( this . targetId ) ; } }

Target:
private void castEveryonePermissionsToUser ( org.ovirt.engine.api.model.Permission entity ) { if ( ( ( ( entity.getAdElementId ( ) ) != null ) && ( entity.getAdElementId ( ) . equals ( Guid.EVERYONE ) ) ) && ( queryType.equals ( QueryType.GetPermissionsByAdElementId ) ) ) { entity.setAdElementId ( this . targetId ) ; } }
Source:
public void customPropertiesModified ( ) { org.ovirt.engine.core.common.businessentities.network.Network network = createNetwork ( org.ovirt.engine.core.bll.network.host.SetupNetworksHelperTest.MANAGEMENT_NETWORK_NAME ) ; mockExistingNetworks ( network ) ; org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface = createNicSyncedWithNetwork ( "eth0" , network ) ; mockExistingIfaces ( iface ) ; iface.setCustomProperties ( createCustomProperties ( ) ) ; org.ovirt.engine.core.bll.network.host.SetupNetworksHelper helper = createHelper ( createParametersForNics ( iface ) , Version.v3_5 ) ; validateAndExpectNoViolations ( helper ) ; assertNoBondsModified ( helper ) ; assertNetworkModified ( helper , network ) ; assertNoNetworksRemoved ( helper ) ; assertNoBondsRemoved ( helper ) ; assertInterfaceModified ( helper , iface ) ; }

Target:
private org.ovirt.engine.core.bll.network.host.SetupNetworksHelper qosValuesTest ( org.ovirt.engine.core.common.businessentities.network.Network network , org.ovirt.engine.core.common.businessentities.network.HostNetworkQos qos ) { mockExistingNetworks ( network ) ; org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface = createNicSyncedWithNetwork ( "eth0" , network ) ; iface.setQosOverridden ( true ) ; mockExistingIfaces ( iface ) ; iface.setQos ( qos ) ; return createHelper ( createParametersForNics ( iface ) , Version.v3_4 ) ; }
Source:
public java.lang.Void runInTransaction ( ) { for ( org.ovirt.engine.core.compat.Guid vmId : vmGuestAgentNics.keySet ( ) ) { getDbFacade ( ) . getVmGuestAgentInterfaceDao ( ) . removeAllForVm ( vmId ) ; } for ( java.util.List < org.ovirt.engine.core.common.businessentities.VmGuestAgentInterface > nics : vmGuestAgentNics.values ( ) ) { if ( nics != null ) { for ( org.ovirt.engine.core.common.businessentities.VmGuestAgentInterface nic : nics ) { getDbFacade ( ) . getVmGuestAgentInterfaceDao ( ) . save ( nic ) ; } } } return null ; }

Target:
public java.lang.Void runInTransaction ( ) { getDbFacade ( ) . getVmDeviceDao ( ) . removeAll ( removedDeviceIds ) ; return null ; }
Source:
protected void doGet ( javax.servlet.http.HttpServletRequest request , javax.servlet.http.HttpServletResponse response ) throws java.io.IOException , javax.servlet.ServletException { java.io.File file = org.ovirt.engine.core.utils.ServletUtils.makeFileFromSanePath ( request.getPathInfo ( ) , base ) ; file = checkForIndex ( request , response , file , request.getPathInfo ( ) ) ; if ( file == null ) { response.sendError ( HttpServletResponse.SC_NOT_FOUND ) ; } else { org.ovirt.engine.core.utils.ServletUtils.sendFile ( request , response , file , type ) ; } }

Target:
protected void doGet ( javax.servlet.http.HttpServletRequest request , javax.servlet.http.HttpServletResponse response ) throws java.io.IOException , javax.servlet.ServletException { java.io.File file = org.ovirt.engine.core.utils.servlet.ServletUtils.makeFileFromSanePath ( request.getPathInfo ( ) , base ) ; file = checkForIndex ( request , response , file , request.getPathInfo ( ) ) ; if ( file == null ) { response.sendError ( HttpServletResponse.SC_NOT_FOUND ) ; } else { org.ovirt.engine.core.utils.servlet.ServletUtils.sendFile ( request , response , file , type ) ; } }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc glusterVolumeBrickAdd ( java.lang.String volumeName , java.lang.String [ ] bricks , int replicaCount , int stripeCount ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "GlusterVolume.addBrick" ) . withParameter ( "volumeName" , volumeName ) . withParameter ( "brickList" , new java.util.ArrayList < > ( java.util.Arrays.asList ( bricks ) ) ) . withParameter ( "replicaCount" , replicaCount ) . withParameter ( "stripeCount" , stripeCount ) . 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.irsbroker.StatusReturnForXmlRpc verifyUntrustedVolume ( java.lang.String spID , java.lang.String sdID , java.lang.String imageID , java.lang.String volumeID ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "Volume.verify_untrusted" ) . withParameter ( "storagepoolID" , spID ) . withParameter ( "storagedomainID" , sdID ) . withParameter ( "imageID" , imageID ) . withParameter ( "volumeID" , volumeID ) . 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.irsbroker.StatusReturnForXmlRpc ( response ) ; }
Source:
protected void verify ( org.ovirt.engine.api.model.Application model , org.ovirt.engine.api.model.Application transform ) { org.junit.Assert.assertNotNull ( transform ) ; org.junit.Assert.assertNotNull ( transform.getId ( ) ) ; org.junit.Assert.assertNotNull ( transform.getName ( ) ) ; org.junit.Assert.assertEquals ( model.getName ( ) , transform.getName ( ) ) ; org.junit.Assert.assertEquals ( model.getId ( ) , transform.getId ( ) ) ; }

Target:
protected void verify ( org.ovirt.engine.api.model.Application model , org.ovirt.engine.api.model.Application transform ) { org.junit.jupiter.api.Assertions.assertNotNull ( transform ) ; org.junit.jupiter.api.Assertions.assertNotNull ( transform.getId ( ) ) ; org.junit.jupiter.api.Assertions.assertNotNull ( transform.getName ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( model.getName ( ) , transform.getName ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( model.getId ( ) , transform.getId ( ) ) ; }
Source:
public static int GetSearchResultsLimit ( ) { if ( ( org.ovirt.engine.ui.uicommonweb.DataProvider._cachedSearchResultsLimit ) == ( - 1 ) ) { org.ovirt.engine.core.common.queries.VdcQueryReturnValue returnValue = org.ovirt.engine.ui.uicommonweb.DataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.SearchResultsLimit ) ) ; if ( ( ( returnValue != null ) && ( returnValue.getSucceeded ( ) ) ) && ( ( returnValue.getReturnValue ( ) ) != null ) ) { org.ovirt.engine.ui.uicommonweb.DataProvider._cachedSearchResultsLimit = ( ( java.lang.Integer ) ( returnValue.getReturnValue ( ) ) ) ; } else { org.ovirt.engine.ui.uicommonweb.DataProvider._cachedSearchResultsLimit = 0 ; } } return org.ovirt.engine.ui.uicommonweb.DataProvider._cachedSearchResultsLimit ; }

Target:
public static int GetSearchResultsLimit ( ) { if ( ( org.ovirt.engine.ui.uicommonweb.DataProvider._cachedSearchResultsLimit ) == ( - 1 ) ) { org.ovirt.engine.core.common.queries.VdcQueryReturnValue returnValue = org.ovirt.engine.ui.uicommonweb.DataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.SearchResultsLimit , org.ovirt.engine.core.common.config.Config.DefaultConfigurationVersion ) ) ; if ( ( ( returnValue != null ) && ( returnValue.getSucceeded ( ) ) ) && ( ( returnValue.getReturnValue ( ) ) != null ) ) { org.ovirt.engine.ui.uicommonweb.DataProvider._cachedSearchResultsLimit = ( ( java.lang.Integer ) ( returnValue.getReturnValue ( ) ) ) ; } else { org.ovirt.engine.ui.uicommonweb.DataProvider._cachedSearchResultsLimit = 0 ; } } return org.ovirt.engine.ui.uicommonweb.DataProvider._cachedSearchResultsLimit ; }
Source:
public void prepareCommandForMonitoring ( org.ovirt.engine.core.bll.context.CommandContext commandContext , org.ovirt.engine.core.bll.CommandBase < ? > command ) { org.ovirt.engine.core.utils.CorrelationIdTracker.setCorrelationId ( command.getCorrelationId ( ) ) ; if ( ( ( commandContext == null ) || ( ( commandContext.getExecutionContext ( ) ) == null ) ) || ( commandContext.getExecutionContext ( ) . isMonitored ( ) ) ) { org.ovirt.engine.core.bll.job.ExecutionHandler.prepareCommandForMonitoring ( command , command.getActionType ( ) , command.isInternalExecution ( ) ) ; } }

Target:
public void prepareCommandForMonitoring ( org.ovirt.engine.core.bll.context.CommandContext commandContext , org.ovirt.engine.core.bll.CommandBase < ? > command ) { org.ovirt.engine.core.utils.CorrelationIdTracker.setCorrelationId ( command.getCorrelationId ( ) ) ; if ( ( ( commandContext == null ) || ( ( commandContext.getExecutionContext ( ) ) == null ) ) || ( commandContext.getExecutionContext ( ) . isMonitored ( ) ) ) { executionHandler.prepareCommandForMonitoring ( command , command.getActionType ( ) , command.isInternalExecution ( ) ) ; } }
Source:
public void removeTag ( org.ovirt.engine.core.compat.Guid tagId ) { if ( tagsMapByID.containsKey ( tagId ) ) { org.ovirt.engine.core.common.businessentities.Tags tag = tagsMapByID.get ( tagId ) ; removeTagAndChildren ( tag ) ; org.ovirt.engine.core.common.businessentities.Tags parent = tagsMapByID.get ( tag.getparent_id ( ) ) ; parent.getChildren ( ) . remove ( tag ) ; addTagToHash ( parent ) ; } else { org.ovirt.engine.core.bll.TagsDirector.log.warn ( "Trying to remove tag, not exists in Data Structure - '{}'" , tagId ) ; } }

Target:
public void removeTag ( org.ovirt.engine.core.compat.Guid tagId ) { if ( tagsMapByID.containsKey ( tagId ) ) { org.ovirt.engine.core.common.businessentities.Tags tag = tagsMapByID.get ( tagId ) ; removeTagAndChildren ( tag ) ; org.ovirt.engine.core.common.businessentities.Tags parent = tagsMapByID.get ( tag.getParentId ( ) ) ; parent.getChildren ( ) . remove ( tag ) ; addTagToHash ( parent ) ; } else { org.ovirt.engine.core.bll.TagsDirector.log.warn ( "Trying to remove tag, not exists in Data Structure - '{}'" , tagId ) ; } }
Source:
protected void doTestBadRemove ( boolean valid , boolean success , java.lang.String detail ) throws java.lang.Exception { setUpClusterExpectations ( org.ovirt.engine.api.restapi.resource.BackendClusterNetworksResourceTest.CLUSTER_ID ) ; setUpEntityQueryExpectations ( 2 , false , false , false , false ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.DetachNetworkToCluster , org.ovirt.engine.core.common.action.AttachNetworkToClusterParameter.class , new java.lang.String [ ] { "ClusterId" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendClusterNetworksResourceTest.CLUSTER_ID } , valid , success ) ) ; try { resource.remove ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }

Target:
protected void doTestBadRemove ( boolean valid , boolean success , java.lang.String detail ) throws java.lang.Exception { setUpClusterExpectations ( org.ovirt.engine.api.restapi.resource.BackendClusterNetworksResourceTest.CLUSTER_ID ) ; setUpEntityQueryExpectations ( 2 , false , false , false , false ) ; setUriInfo ( setUpActionExpectations ( ActionType.DetachNetworkToCluster , org.ovirt.engine.core.common.action.AttachNetworkToClusterParameter.class , new java.lang.String [ ] { "ClusterId" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendClusterNetworksResourceTest.CLUSTER_ID } , valid , success ) ) ; try { resource.remove ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }
Source:
public void setListensOnPostMessage ( boolean val ) { this . listensOnPostMessage = val ; }

Target:
private boolean isClientBrowserSupported ( ) { boolean isExplorer = ( ( org.ovirt.engine.ui.uicommonweb.Configurator ) ( org.ovirt.engine.ui.uicommonweb.TypeResolver.getInstance ( ) . resolve ( org.ovirt.engine.ui.uicommonweb.Configurator.class ) ) ) . isClientWindowsExplorer ( ) ; java.lang.Float browserVersion = ( ( org.ovirt.engine.ui.uicommonweb.Configurator ) ( org.ovirt.engine.ui.uicommonweb.TypeResolver.getInstance ( ) . resolve ( org.ovirt.engine.ui.uicommonweb.Configurator.class ) ) ) . clientBrowserVersion ( ) ; return isExplorer ? browserVersion >= 11.0F : true ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.VGListReturnForXmlRpc getVGList ( ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "Host.getLVMVolumeGroups" ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) . withResponseKey ( "vglist" ) . withResponseType ( java.lang.Object [ ] . class ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.VGListReturnForXmlRpc ( response ) ; }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.VolumeInfoReturnForXmlRpc getVolumeInfo ( 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.getInfo" ) . 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.VolumeInfoReturnForXmlRpc ( response ) ; }
Source:
public void mapPropertiesSyntaxNullValue ( ) { org.ovirt.engine.core.common.utils.customprop.CustomPropertiesUtils utils = new org.ovirt.engine.core.common.utils.customprop.CustomPropertiesUtils ( ) ; java.util.Map < java.lang.String , java.lang.String > propMap = new java.util.LinkedHashMap < > ( ) ; propMap.put ( "speed" , "1024" ) ; propMap.put ( "duplex" , null ) ; propMap.put ( "debug" , "" ) ; org.junit.Assert.assertFalse ( utils.syntaxErrorInProperties ( propMap ) ) ; }

Target:
public void mapPropertiesSyntaxNullValue ( ) { org.ovirt.engine.core.common.utils.customprop.CustomPropertiesUtils utils = new org.ovirt.engine.core.common.utils.customprop.CustomPropertiesUtils ( ) ; java.util.Map < java.lang.String , java.lang.String > propMap = new java.util.LinkedHashMap < > ( ) ; propMap.put ( "speed" , "1024" ) ; propMap.put ( "duplex" , null ) ; propMap.put ( "debug" , "" ) ; org.junit.jupiter.api.Assertions.assertFalse ( utils.syntaxErrorInProperties ( propMap ) ) ; }
Source:
public void testAddIncompleteParameters ( ) throws java.lang.Exception { org.ovirt.engine.api.model.Cluster model = new org.ovirt.engine.api.model.Cluster ( ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; control.replay ( ) ; try { collection.add ( model ) ; fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "Cluster" , "add" , "name" ) ; } }

Target:
public void testAddIncompleteParameters ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.Cluster model = new org.ovirt.engine.core.common.businessentities.Cluster ( ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; control.replay ( ) ; try { collection.add ( model ) ; fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "Cluster" , "add" , "name" ) ; } }
Source:
public org.ovirt.engine.core.common.queries.VdcQueryReturnValue RunQuery ( org.ovirt.engine.core.common.queries.VdcQueryType search , org.ovirt.engine.core.common.queries.VdcQueryParametersBase searchParameters ) { org.ovirt.engine.ui.frontend.server.gwt.GenericApiGWTServiceImpl.log.debug ( "Server: RunQuery invoked!" ) ; searchParameters.setSessionId ( getSessionId ( ) ) ; return getBackend ( ) . RunQuery ( search , searchParameters ) ; }

Target:
public org.ovirt.engine.core.common.queries.VdcQueryReturnValue RunQuery ( org.ovirt.engine.core.common.queries.VdcQueryType search , org.ovirt.engine.core.common.queries.VdcQueryParametersBase searchParameters ) { org.ovirt.engine.ui.frontend.server.gwt.GenericApiGWTServiceImpl.log.debug ( "Server: RunQuery invoked!" ) ; debugQuery ( search , searchParameters ) ; searchParameters.setSessionId ( getSessionId ( ) ) ; return getBackend ( ) . RunQuery ( search , searchParameters ) ; }