auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private org.ovirt.engine.core.compat.Guid mockSourceImage ( ) { org.ovirt.engine.core.compat.Guid imageId = org.ovirt.engine.core.compat.Guid.NewGuid ( ) ; org.ovirt.engine.core.common.businessentities.DiskImage image = new org.ovirt.engine.core.common.businessentities.DiskImage ( ) ; image.setImageId ( imageId ) ; java.util.ArrayList < org.ovirt.engine.core.compat.Guid > list = new java.util.ArrayList < org.ovirt.engine.core.compat.Guid > ( ) ; list.add ( org.ovirt.engine.core.bll.RemoveSnapshotCommandTest.STORAGE_DOMAIN_ID ) ; image.setStorageIds ( list ) ; image.setActualSize ( org.ovirt.engine.core.bll.RemoveSnapshotCommandTest.IMAGE_ACTUAL_SIZE_GB ) ; image.setSize ( 40 ) ; org.mockito.Mockito.doReturn ( java.util.Collections.singletonList ( image ) ) . when ( cmd ) . getSourceImages ( ) ; return imageId ; }

Target:
private org.ovirt.engine.core.compat.Guid mockSourceImage ( ) { org.ovirt.engine.core.compat.Guid imageId = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; org.ovirt.engine.core.common.businessentities.DiskImage image = new org.ovirt.engine.core.common.businessentities.DiskImage ( ) ; image.setImageId ( imageId ) ; java.util.ArrayList < org.ovirt.engine.core.compat.Guid > list = new java.util.ArrayList < org.ovirt.engine.core.compat.Guid > ( ) ; list.add ( org.ovirt.engine.core.bll.RemoveSnapshotCommandTest.STORAGE_DOMAIN_ID ) ; image.setStorageIds ( list ) ; image.setActualSize ( org.ovirt.engine.core.bll.RemoveSnapshotCommandTest.IMAGE_ACTUAL_SIZE_GB ) ; image.setSize ( 40 ) ; org.mockito.Mockito.doReturn ( java.util.Collections.singletonList ( image ) ) . when ( cmd ) . getSourceImages ( ) ; return imageId ; }
Source:
protected void doTestBadRemove ( boolean valid , boolean success , java.lang.String detail ) throws java.lang.Exception { setUpEntityQueryExpectations ( 1 ) ; setAllContentHeaderExpectation ( ) ; setGetGuestAgentQueryExpectations ( 1 ) ; setUriInfo ( setUpActionExpectations ( ActionType.RemoveVmInterface , org.ovirt.engine.core.common.action.RemoveVmInterfaceParameters.class , new java.lang.String [ ] { "VmId" , "InterfaceId" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendVmNicResourceTest.VM_ID , org.ovirt.engine.api.restapi.resource.BackendVmNicResourceTest.NIC_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 { setUpEntityQueryExpectations ( 1 ) ; setAllContentHeaderExpectation ( ) ; setGetGuestAgentQueryExpectations ( 1 ) ; setUriInfo ( setUpActionExpectations ( ActionType.RemoveVmInterface , org.ovirt.engine.core.common.action.RemoveVmInterfaceParameters.class , new java.lang.String [ ] { "VmId" , "InterfaceId" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendVmNicResourceTest.VM_ID , org.ovirt.engine.api.restapi.resource.BackendVmNicResourceTest.NIC_ID } , valid , success ) ) ; try { resource.remove ( ) ; org.junit.Assert.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }
Source:
private void loadHosts ( ) { org.ovirt.engine.core.common.businessentities.VDSGroup selectedCluster = clusters.getSelectedItem ( ) ; if ( selectedCluster == null ) { return ; } org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getUpHostListByCluster ( new org.ovirt.engine.ui.frontend.AsyncQuery ( this , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.SuppressWarnings ( value = "unchecked" ) @ java.lang.Override public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { postMigrateGetUpHosts ( privateVmList , ( ( java.util.List < org.ovirt.engine.core.common.businessentities.VDS > ) ( returnValue ) ) ) ; } } ) , selectedCluster.getName ( ) ) ; }

Target:
private void loadHosts ( ) { org.ovirt.engine.core.common.businessentities.Cluster selectedCluster = clusters.getSelectedItem ( ) ; if ( selectedCluster == null ) { return ; } org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getUpHostListByCluster ( new org.ovirt.engine.ui.frontend.AsyncQuery ( this , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.SuppressWarnings ( value = "unchecked" ) @ java.lang.Override public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { postMigrateGetUpHosts ( privateVmList , ( ( java.util.List < org.ovirt.engine.core.common.businessentities.VDS > ) ( returnValue ) ) ) ; } } ) , selectedCluster.getName ( ) ) ; }
Source:
public void setUsePatternFly ( boolean usePatternFly ) { getWidget ( ) . addStyleName ( style.listBox ( ) ) ; if ( usePatternFly ) { container.addStyleName ( Styles.FORM_CONTROL ) ; container.addStyleName ( style.container ( ) ) ; getWidget ( ) . addStyleName ( style.listBoxPatternfly ( ) ) ; groupLabelContainer.addStyleName ( style.labelContainer ( ) ) ; } else { container.addStyleName ( style.container_legacy ( ) ) ; } }

Target:
public void setUsePatternFly ( boolean usePatternFly ) { getWidget ( ) . addStyleName ( style.listBox ( ) ) ; if ( usePatternFly ) { container.addStyleName ( Styles.FORM_CONTROL ) ; container.addStyleName ( style.container ( ) ) ; container.removeStyleName ( style.container_legacy ( ) ) ; getWidget ( ) . addStyleName ( style.listBoxPatternfly ( ) ) ; groupLabelContainer.addStyleName ( style.labelContainer ( ) ) ; } else { container.addStyleName ( style.container_legacy ( ) ) ; } }
Source:
private void reportMtuDifferences ( java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > ifaceNetworks ) { java.util.List < java.lang.String > mtuDiffNetworks = new java.util.ArrayList < java.lang.String > ( ) ; for ( org.ovirt.engine.core.common.businessentities.network.Network net : ifaceNetworks ) { mtuDiffNetworks.add ( java.lang.String.format ( "%s(%s)" , net.getName ( ) , ( ( net.getMtu ( ) ) == 0 ? "default" : java.lang.String.valueOf ( net.getMtu ( ) ) ) ) ) ; } addViolation ( VdcBllMessages.NETWORK_MTU_DIFFERENCES , java.lang.String.format ( "[%s]" , org.apache.commons.lang.StringUtils.join ( mtuDiffNetworks , ", " ) ) ) ; }

Target:
private org.ovirt.engine.core.bll.ValidationResult validateCoherentNicIdentification ( org.ovirt.engine.core.compat.Guid violatingEntityId , org.ovirt.engine.core.compat.Guid nicId , java.lang.String nicName , org.ovirt.engine.core.common.errors.VdcBllMessages message ) { boolean bothIdentificationSet = ( nicId != null ) && ( nicName != null ) ; java.lang.String [ ] replacements = createIncoherentNicIdentificationErrorReplacements ( violatingEntityId , nicId , nicName ) ; return org.ovirt.engine.core.bll.ValidationResult.failWith ( message , replacements ) . when ( ( bothIdentificationSet && ( isNicNameAndNicIdIncoherent ( nicId , nicName ) ) ) ) ; }
Source:
public void updateMaxNumOfVmCpus ( ) { java.lang.String version = getClusterCompatibilityVersion ( ) . toString ( ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getMaxNumOfVmCpus ( new org.ovirt.engine.ui.frontend.AsyncQuery ( getModel ( ) , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.VmModelBehaviorBase behavior = org.ovirt.engine.ui.uicommonweb.models.vms.VmModelBehaviorBase.this ; behavior.maxCpus = ( ( java.lang.Integer ) ( returnValue ) ) ; behavior.postUpdateNumOfSockets2 ( ) ; } } ) , version ) ; }

Target:
public void updateMaxNumOfVmCpus ( ) { java.lang.String version = getCompatibilityVersion ( ) . toString ( ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getMaxNumOfVmCpus ( new org.ovirt.engine.ui.frontend.AsyncQuery ( getModel ( ) , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.VmModelBehaviorBase behavior = org.ovirt.engine.ui.uicommonweb.models.vms.VmModelBehaviorBase.this ; behavior.maxCpus = ( ( java.lang.Integer ) ( returnValue ) ) ; behavior.postUpdateNumOfSockets2 ( ) ; } } ) , version ) ; }
Source:
protected void executeCommand ( ) { try { addVmToDb ( ) ; processImages ( ) ; if ( getReturnValue ( ) . getVdsmTaskIdList ( ) . isEmpty ( ) ) { endVmRelatedOps ( ) ; } org.ovirt.engine.core.bll.VmHandler.addVmInitToDB ( getVm ( ) . getStaticData ( ) ) ; } catch ( java.lang.RuntimeException e ) { org.ovirt.engine.core.bll.network.MacPoolManager.getInstance ( ) . freeMacs ( macsAdded ) ; throw e ; } org.ovirt.engine.core.bll.ImportVmCommand.setSucceeded ( true ) ; }

Target:
protected void executeCommand ( ) { try { addVmToDb ( ) ; processImages ( ( ! ( org.ovirt.engine.core.bll.ImportVmCommand.isImagesAlreadyOnTarget ( ) ) ) ) ; if ( getReturnValue ( ) . getVdsmTaskIdList ( ) . isEmpty ( ) ) { endVmRelatedOps ( ) ; } org.ovirt.engine.core.bll.VmHandler.addVmInitToDB ( getVm ( ) . getStaticData ( ) ) ; } catch ( java.lang.RuntimeException e ) { org.ovirt.engine.core.bll.network.MacPoolManager.getInstance ( ) . freeMacs ( macsAdded ) ; throw e ; } org.ovirt.engine.core.bll.ImportVmCommand.setSucceeded ( true ) ; }
Source:
public java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > getPermissionCheckSubjects ( ) { return null ; }

Target:
private boolean isRunOnce ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > cdList = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmDeviceDao ( ) . getVmDeviceByVmIdTypeAndDevice ( org.ovirt.engine.core.bll.ProcessDownVmCommand.getVmId ( ) , VmDeviceGeneralType.DISK , VmDeviceType.CDROM.getName ( ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > floppyList = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmDeviceDao ( ) . getVmDeviceByVmIdTypeAndDevice ( org.ovirt.engine.core.bll.ProcessDownVmCommand.getVmId ( ) , VmDeviceGeneralType.DISK , VmDeviceType.FLOPPY.getName ( ) ) ; return ( ( cdList.size ( ) ) > 1 ) || ( ( floppyList.size ( ) ) > 1 ) ; }
Source:
private void updateTimeoutLogableObject ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase auditLogable , org.ovirt.engine.core.common.AuditLogType logType ) { int eventFloodRate = ( ( auditLogable.isExternal ( ) ) && ( ( auditLogable.getEventFloodInSec ( ) ) == 0 ) ) ? 30 : logType.getEventFloodRate ( ) ; if ( eventFloodRate > 0 ) { auditLogable.setEndTime ( java.util.concurrent.TimeUnit.SECONDS.toMillis ( eventFloodRate ) ) ; auditLogable.setTimeoutObjectId ( composeObjectId ( auditLogable , logType ) ) ; } }

Target:
private static void updateTimeoutLogableObject ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase auditLogable , org.ovirt.engine.core.common.AuditLogType logType ) { int eventFloodRate = ( ( auditLogable.isExternal ( ) ) && ( ( auditLogable.getEventFloodInSec ( ) ) == 0 ) ) ? 30 : logType.getEventFloodRate ( ) ; if ( eventFloodRate > 0 ) { auditLogable.setEndTime ( java.util.concurrent.TimeUnit.SECONDS.toMillis ( eventFloodRate ) ) ; auditLogable.setTimeoutObjectId ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.composeObjectId ( auditLogable , logType ) ) ; } }
Source:
public java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity > getByClusterId ( org.ovirt.engine.core.compat.Guid clusterId ) { java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity > glusterHooks = getCallsHandler ( ) . executeReadList ( "GetGlusterHooksByClusterGuid" , org.ovirt.engine.core.dao.gluster.GlusterHooksDaoDbFacadeImpl.glusterHookRowMapper , getCustomMapSqlParameterSource ( ) . addValue ( "cluster_id" , clusterId ) ) ; for ( org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity entity : glusterHooks ) { getGlusterServerHook ( entity , null ) ; } return glusterHooks ; }

Target:
public void saveOrUpdateGlusterServerHook ( org.ovirt.engine.core.common.businessentities.gluster.GlusterServerHook serverHook ) { if ( ( getGlusterServerHook ( serverHook.getHookId ( ) , serverHook.getServerId ( ) ) ) == null ) { saveGlusterServerHook ( serverHook ) ; } else { updateGlusterServerHook ( serverHook ) ; } }
Source:
protected void executeCommand ( ) { addCustomValue ( "NicName" , getNic ( ) . getName ( ) ) ; org.ovirt.engine.core.common.action.VdcReturnValueBase result = runInternalAction ( ActionType.HostSetupNetworks , createHostSetupNetworksParameters ( ) , org.ovirt.engine.core.bll.network.host.UnlabelNicCommand.cloneContextAndDetachFromParent ( ) ) ; if ( ! ( result.getSucceeded ( ) ) ) { propagateFailure ( result ) ; } setSucceeded ( result.getSucceeded ( ) ) ; }

Target:
protected void executeCommand ( ) { addCustomValue ( "NicName" , getNic ( ) . getName ( ) ) ; org.ovirt.engine.core.common.action.ActionReturnValue result = runInternalAction ( ActionType.HostSetupNetworks , createHostSetupNetworksParameters ( ) , org.ovirt.engine.core.bll.network.host.UnlabelNicCommand.cloneContextAndDetachFromParent ( ) ) ; if ( ! ( result.getSucceeded ( ) ) ) { propagateFailure ( result ) ; } setSucceeded ( result.getSucceeded ( ) ) ; }
Source:
public void testAddForce ( ) { javax.ws.rs.core.UriInfo uriInfo = setUpBasicUriExpectations ( ) ; setUriInfo ( setUpGetMatrixConstraintsExpectations ( BackendResource.FORCE_CONSTRAINT , true , "true" , uriInfo ) ) ; setUpVolumeCreationExpectations ( true ) ; collection.setParent ( org.ovirt.engine.api.restapi.resource.gluster.BackendGlusterVolumesResourceTest.parentMock ) ; javax.ws.rs.core.Response response = collection.add ( createModel ( ) ) ; assertEquals ( 201 , response.getStatus ( ) ) ; assertTrue ( ( ( response.getEntity ( ) ) instanceof org.ovirt.engine.api.model.GlusterVolume ) ) ; verifyModel ( ( ( org.ovirt.engine.api.model.GlusterVolume ) ( response.getEntity ( ) ) ) , 1 ) ; }

Target:
public void testAddForce ( ) { javax.ws.rs.core.UriInfo uriInfo = setUpBasicUriExpectations ( ) ; setUriInfo ( setUpGetMatrixConstraintsExpectations ( BackendResource.FORCE_CONSTRAINT , true , "true" , uriInfo ) ) ; setUpVolumeCreationExpectations ( true ) ; collection.setParent ( org.ovirt.engine.api.restapi.resource.gluster.BackendGlusterVolumesResourceTest.parentMock ) ; javax.ws.rs.core.Response response = collection.add ( createModel ( ) ) ; org.junit.Assert.assertEquals ( 201 , response.getStatus ( ) ) ; org.junit.Assert.assertTrue ( ( ( response.getEntity ( ) ) instanceof org.ovirt.engine.api.model.GlusterVolume ) ) ; verifyModel ( ( ( org.ovirt.engine.api.model.GlusterVolume ) ( response.getEntity ( ) ) ) , 1 ) ; }
Source:
public void vdsGroupWithVirtGlusterServicesNotAllowed ( ) { createCommandWithVirtGlusterEnabled ( ) ; org.mockito.Mockito.when ( vdsGroupDao.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.createVdsGroupWithNoCpuName ( ) ) ; org.mockito.Mockito.when ( vdsGroupDao.getByName ( org.mockito.Matchers.anyString ( ) ) ) . thenReturn ( org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.createVdsGroupWithNoCpuName ( ) ) ; mcr.mockConfigValue ( ConfigValues.AllowClusterWithVirtGlusterEnabled , java.lang.Boolean.FALSE ) ; mcr.mockConfigValue ( ConfigValues.GlusterSupport , org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.VERSION_1_1 , java.lang.Boolean.TRUE ) ; cpuExists ( ) ; allQueriesForVms ( ) ; canDoActionFailedWithReason ( EngineMessage.VDS_GROUP_ENABLING_BOTH_VIRT_AND_GLUSTER_SERVICES_NOT_ALLOWED ) ; }

Target:
public void vdsGroupWithVirtGlusterServicesNotAllowed ( ) { createCommandWithVirtGlusterEnabled ( ) ; org.mockito.Mockito.when ( vdsGroupDao.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.createVdsGroupWithNoCpuName ( ) ) ; org.mockito.Mockito.when ( vdsGroupDao.getByName ( org.mockito.Matchers.anyString ( ) ) ) . thenReturn ( org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.createVdsGroupWithNoCpuName ( ) ) ; mcr.mockConfigValue ( ConfigValues.AllowClusterWithVirtGlusterEnabled , java.lang.Boolean.FALSE ) ; mcr.mockConfigValue ( ConfigValues.GlusterSupport , org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.VERSION_1_1 , java.lang.Boolean.TRUE ) ; cpuExists ( ) ; allQueriesForVms ( ) ; validateFailedWithReason ( EngineMessage.VDS_GROUP_ENABLING_BOTH_VIRT_AND_GLUSTER_SERVICES_NOT_ALLOWED ) ; }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < ? extends org.ovirt.engine.ui.uicompat.EventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { if ( ( ( getIsImportGlusterConfiguration ( ) . getEntity ( ) ) != null ) && ( getIsImportGlusterConfiguration ( ) . getEntity ( ) ) ) { getGlusterHostAddress ( ) . setIsChangeable ( true ) ; getGlusterHostPassword ( ) . setIsChangeable ( true ) ; } else { getGlusterHostAddress ( ) . setIsChangeable ( false ) ; getGlusterHostPassword ( ) . setIsChangeable ( false ) ; } }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object result ) { java.lang.String fingerprint = ( ( java.lang.String ) ( result ) ) ; if ( ( fingerprint != null ) && ( ( fingerprint.length ( ) ) > 0 ) ) { getGlusterHostFingerprint ( ) . setEntity ( ( ( java.lang.String ) ( result ) ) ) ; setIsFingerprintVerified ( true ) ; } else { getGlusterHostFingerprint ( ) . setEntity ( org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getConstants ( ) . errorLoadingFingerprint ( ) ) ; setIsFingerprintVerified ( false ) ; } }
Source:
public void getAAAProfilesList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.convertAAAProfilesResult ( aQuery ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAAAProfileList , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }

Target:
public void getRoleList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Role > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Role > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllRoles , new org.ovirt.engine.core.common.queries.MultilevelAdministrationsQueriesParameters ( ) , aQuery ) ; }
Source:
public void onSuccess ( final java.util.List < org.ovirt.engine.ui.frontend.communication.VdcOperation < org.ovirt.engine.core.common.queries.VdcQueryType , org.ovirt.engine.core.common.queries.VdcQueryParametersBase > > operationList , final java.util.List < org.ovirt.engine.core.common.queries.VdcQueryReturnValue > resultObject ) { org.ovirt.engine.ui.frontend.Frontend.logger.finer ( "Succesful returned result from runMultipleQueries!" ) ; org.ovirt.engine.ui.uicompat.FrontendMultipleQueryAsyncResult f = new org.ovirt.engine.ui.uicompat.FrontendMultipleQueryAsyncResult ( queryTypeList , queryParamsList , resultObject ) ; callback.executed ( f ) ; org.ovirt.engine.ui.frontend.communication.AsyncOperationCompleteEvent.fire ( this , state ) ; raiseQueryCompleteEvent ( queryTypeList , state ) ; }

Target:
public void onSuccess ( final java.util.List < org.ovirt.engine.ui.frontend.communication.VdcOperation < org.ovirt.engine.core.common.queries.VdcQueryType , org.ovirt.engine.core.common.queries.VdcQueryParametersBase > > operationList , final java.util.List < org.ovirt.engine.core.common.queries.VdcQueryReturnValue > resultObject ) { org.ovirt.engine.ui.frontend.Frontend.logger.finer ( "Succesful returned result from runMultipleQueries!" ) ; org.ovirt.engine.ui.uicompat.FrontendMultipleQueryAsyncResult f = new org.ovirt.engine.ui.uicompat.FrontendMultipleQueryAsyncResult ( queryTypeList , queryParamsList , resultObject ) ; callback.executed ( f ) ; fireAsyncOperationCompleteEvent ( state ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StorageDomainListReturnForXmlRpc reconstructMaster ( java.lang.String spUUID , int hostSpmId , java.lang.String msdUUID , java.lang.String masterVersion ) { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = irsServer.reconstructMaster ( spUUID , hostSpmId , msdUUID , masterVersion ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.StorageDomainListReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.StorageDomainListReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.ResizeStorageDomainPVMapReturnForXmlRpc resizeStorageDomainPV ( java.lang.String sdUUID , java.lang.String spUUID , java.lang.String device ) { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = irsServer.resizePV ( sdUUID , spUUID , device ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.ResizeStorageDomainPVMapReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.ResizeStorageDomainPVMapReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; }
Source:
public void testPosixDcAndNotMatchingCompatiblityVersion ( ) { storagePool.setcompatibility_version ( Version.v3_0 ) ; storagePool.setstorage_pool_type ( StorageType.POSIXFS ) ; org.ovirt.engine.core.bll.ValidationResult result = validator.isPosixDcAndMatchingCompatiblityVersion ( ) ; org.junit.Assert.assertFalse ( result.isValid ( ) ) ; org.ovirt.engine.core.bll.storage.StoragePoolValidatorTest.assertMessage ( result , VdcBllMessages.DATA_CENTER_POSIX_STORAGE_NOT_SUPPORTED_IN_CURRENT_VERSION ) ; }

Target:
public void testPosixDcAndNotMatchingCompatiblityVersion ( ) { storagePool.setcompatibility_version ( Version.v3_0 ) ; storagePool.setStorageType ( StorageType.POSIXFS ) ; org.ovirt.engine.core.bll.ValidationResult result = validator.isPosixDcAndMatchingCompatiblityVersion ( ) ; org.junit.Assert.assertFalse ( result.isValid ( ) ) ; org.ovirt.engine.core.bll.storage.StoragePoolValidatorTest.assertMessage ( result , VdcBllMessages.DATA_CENTER_POSIX_STORAGE_NOT_SUPPORTED_IN_CURRENT_VERSION ) ; }
Source:
protected void beforeLogin ( org.ovirt.engine.ui.uicommonweb.models.LoginModel loginModel ) { }

Target:
public void onDynamicMainTabAdded ( org.ovirt.engine.ui.webadmin.section.main.presenter.DynamicMainTabAddedEvent event ) { java.lang.String historyToken = event.getHistoryToken ( ) ; java.lang.String searchPrefix = event.getSearchPrefix ( ) ; if ( loginComplete ) { addDynamicMainTabToCommonModel ( historyToken , searchPrefix ) ; } else { dynamicMainTabs.add ( new org.ovirt.engine.ui.webadmin.system.ApplicationInit.DynamicMainTabInfo ( historyToken , searchPrefix ) ) ; } }
Source:
protected boolean canDoAction ( ) { boolean returnValue = super . canDoAction ( ) ; if ( returnValue && ( VmTemplateHandler.BlankVmTemplateId.equals ( org.ovirt.engine.core.bll.AddVmPoolWithVmsCommand.getParameters ( ) . getVmStaticData ( ) . getvmt_guid ( ) ) ) ) { returnValue = false ; addCanDoActionMessage ( VdcBllMessages.VM_POOL_CANNOT_CREATE_FROM_BLANK_TEMPLATE ) ; } return returnValue ; }

Target:
protected boolean canDoAction ( ) { boolean returnValue = super . canDoAction ( ) ; if ( returnValue && ( VmTemplateHandler.BlankVmTemplateId.equals ( org.ovirt.engine.core.bll.AddVmPoolWithVmsCommand.getParameters ( ) . getVmStaticData ( ) . getVmtGuid ( ) ) ) ) { returnValue = false ; addCanDoActionMessage ( VdcBllMessages.VM_POOL_CANNOT_CREATE_FROM_BLANK_TEMPLATE ) ; } return returnValue ; }
Source:
public static void GetGlusterHostsNewlyAdded ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId , boolean isFingerprintRequired ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAddedGlusterServers , new org.ovirt.engine.core.common.queries.gluster.AddedGlusterServersParameters ( clusterId , isFingerprintRequired ) , aQuery ) ; }

Target:
public static void 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 ) ; }
Source:
public void validateFailsForDeviceAlreadyInUse ( ) { org.ovirt.engine.core.common.businessentities.gluster.StorageDevice storageDevice = getStorageDevice ( "sda" , null ) ; storageDevice.setCanCreateBrick ( false ) ; cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.gluster.CreateBrickCommand ( new org.ovirt.engine.core.common.action.gluster.CreateBrickParameters ( HOST_ID , "brick1" , "/gluster-bricks/brick1" , org.ovirt.engine.core.common.businessentities.RaidType.RAID0 , null , null , java.util.Collections.singletonList ( storageDevice ) ) , null ) ) ; prepareMocks ( cmd , VDSStatus.Up ) ; org.junit.Assert.assertFalse ( cmd.validate ( ) ) ; }

Target:
protected void prepareMocks ( org.ovirt.engine.core.common.businessentities.VDSStatus status ) { org.mockito.Mockito.when ( cmd.getCluster ( ) ) . thenReturn ( cluster ) ; org.mockito.Mockito.doReturn ( vds ) . when ( cmd ) . getVds ( ) ; org.mockito.Mockito.doReturn ( status ) . when ( vds ) . getStatus ( ) ; mockIsGlusterEnabled ( true ) ; org.mockito.Mockito.doReturn ( glusterUtil ) . when ( cmd ) . getGlusterUtil ( ) ; }
Source:
private org.ovirt.engine.core.compat.Guid determineSourceImageGroup ( org.ovirt.engine.core.common.businessentities.storage.DiskImage image ) { return ( image.getImageTemplateId ( ) ) != ( org.ovirt.engine.core.compat.Guid.Empty ) ? org.ovirt.engine.core.bll.storage.disk.image.CloneImageGroupVolumesStructureCommand.getImageDao ( ) . get ( image.getImageTemplateId ( ) ) . getId ( ) : org.ovirt.engine.core.bll.storage.disk.image.CloneImageGroupVolumesStructureCommand.getParameters ( ) . getImageGroupID ( ) ; }

Target:
private org.ovirt.engine.core.compat.Guid determineSourceImageGroup ( org.ovirt.engine.core.common.businessentities.storage.DiskImage image ) { return ( image.getImageTemplateId ( ) ) != ( org.ovirt.engine.core.compat.Guid.Empty ) ? imageDao.get ( image.getImageTemplateId ( ) ) . getId ( ) : org.ovirt.engine.core.bll.storage.disk.image.CloneImageGroupVolumesStructureCommand.getParameters ( ) . getImageGroupID ( ) ; }
Source:
public void getStorageDomainDefaultWipeAfterDelete ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.businessentities.storage.StorageType storageType ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean convert ( java.lang.Object returnValue , org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery ) { return ( ( java.lang.Boolean ) ( returnValue ) ) ; } } ; org.ovirt.engine.core.common.queries.GetStorageDomainDefaultWipeAfterDeleteParameters params = new org.ovirt.engine.core.common.queries.GetStorageDomainDefaultWipeAfterDeleteParameters ( storageType ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainDefaultWipeAfterDelete , params , aQuery ) ; }

Target:
public void getStorageConnectionsByDataCenterIdAndStorageType ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.common.businessentities.storage.StorageType storageType ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.core.common.queries.GetConnectionsByDataCenterAndStorageTypeParameters params = new org.ovirt.engine.core.common.queries.GetConnectionsByDataCenterAndStorageTypeParameters ( storagePoolId , storageType ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetConnectionsByDataCenterAndStorageType , params , aQuery ) ; }
Source:
protected void executeQueryCommand ( ) { final int pageSize = org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( ConfigValues.JobPageSize ) ; int offset = java.lang.Math.max ( org.ovirt.engine.core.bll.GetJobsByOffsetQuery.getParameters ( ) . getOffset ( ) , 0 ) ; java.util.List < org.ovirt.engine.core.common.job.Job > jobs = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getJobDao ( ) . getJobsByOffsetAndPageSize ( ( offset * pageSize ) , pageSize ) ; org.ovirt.engine.core.bll.GetJobsByOffsetQuery.getQueryReturnValue ( ) . setReturnValue ( jobs ) ; }

Target:
protected void executeQueryCommand ( ) { final int pageSize = org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( ConfigValues.JobPageSize ) ; int offset = java.lang.Math.max ( org.ovirt.engine.core.bll.GetJobsByOffsetQuery.getParameters ( ) . getOffset ( ) , 0 ) ; java.util.List < org.ovirt.engine.core.common.job.Job > jobs = jobDao.getJobsByOffsetAndPageSize ( ( offset * pageSize ) , pageSize ) ; org.ovirt.engine.core.bll.GetJobsByOffsetQuery.getQueryReturnValue ( ) . setReturnValue ( jobs ) ; }
Source:
public void setUp ( ) { disk = org.ovirt.engine.core.bll.validator.storage.DiskValidatorTest.createDiskImage ( ) ; disk.setDiskAlias ( "disk1" ) ; validator = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.validator.storage.DiskValidator ( disk ) ) ; org.mockito.Mockito.doReturn ( vmDao ) . when ( validator ) . getVmDao ( ) ; org.mockito.Mockito.doReturn ( diskImageDao ) . when ( validator ) . getDiskImageDao ( ) ; }

Target:
public void setUp ( ) { disk = org.ovirt.engine.core.bll.validator.storage.DiskValidatorTest.createDiskImage ( ) ; disk.setDiskAlias ( "disk1" ) ; validator = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.validator.storage.DiskValidator ( disk ) ) ; diskImagesValidator = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.validator.storage.DiskImagesValidator ( disk ) ) ; org.mockito.Mockito.doReturn ( vmDao ) . when ( validator ) . getVmDao ( ) ; org.mockito.Mockito.doReturn ( diskImageDao ) . when ( validator ) . getDiskImageDao ( ) ; org.mockito.Mockito.doReturn ( diskImageDao ) . when ( diskImagesValidator ) . getDiskImageDao ( ) ; }
Source:
public void testConnection ( ) { try { getClient ( ) . execute ( new com.woorea.openstack.base.client.OpenStackRequest ( getClient ( ) , com.woorea.openstack.base.client.HttpMethod.GET , "" , null , org.ovirt.engine.core.bll.provider.network.openstack.OpenstackNetworkProviderProxy.ApiRootResponse.class ) ) ; } catch ( java.lang.RuntimeException e ) { throw new org.ovirt.engine.core.common.errors.VdcBLLException ( org.ovirt.engine.core.common.errors.VdcBllErrors.PROVIDER_FAILURE , e ) ; } }

Target:
public void testConnection ( ) { try { getClient ( ) . execute ( new com.woorea.openstack.base.client.OpenStackRequest ( getClient ( ) , com.woorea.openstack.base.client.HttpMethod.GET , "" , null , org.ovirt.engine.core.bll.provider.network.openstack.OpenstackNetworkProviderProxy.ApiRootResponse.class ) ) ; } catch ( com.woorea.openstack.base.client.OpenStackResponseException e ) { org.ovirt.engine.core.bll.provider.network.openstack.OpenstackNetworkProviderProxy.log.error ( "{} (OpenStack response error code: {})" , e.getMessage ( ) , e.getStatus ( ) ) ; org.ovirt.engine.core.bll.provider.network.openstack.OpenstackNetworkProviderProxy.log.debug ( "Exception" , e ) ; throw new org.ovirt.engine.core.common.errors.VdcBLLException ( org.ovirt.engine.core.common.errors.VdcBllErrors.PROVIDER_FAILURE , e ) ; } catch ( java.lang.RuntimeException e ) { throw new org.ovirt.engine.core.common.errors.VdcBLLException ( org.ovirt.engine.core.common.errors.VdcBllErrors.PROVIDER_FAILURE , e ) ; } }
Source:
void addStyles ( ) { pathEditor.addContentWidgetContainerStyleName ( style.pathEditorContent ( ) ) ; expanderContent.setClassName ( style.expanderContent ( ) ) ; }

Target:
void addStyles ( ) { pathEditor.addContentWidgetContainerStyleName ( style.pathEditorContent ( ) ) ; expanderContent.setStyleName ( style.expanderContent ( ) ) ; versionListEditor.setStyleName ( style.versionListEditor ( ) ) ; retransmissionsEditor.setStyleName ( style.storageTextBoxEditor ( ) ) ; timeoutEditor.setStyleName ( style.storageTextBoxEditor ( ) ) ; mountOptionsEditor.setStyleName ( style.mountTextBoxEditor ( ) ) ; }
Source:
protected void initDetailModels ( ) { super . initDetailModels ( ) ; setVmBasicDiskListModel ( new org.ovirt.engine.ui.uicommonweb.models.userportal.VmBasicDiskListModel ( ) ) ; org.ovirt.engine.ui.uicompat.ObservableCollection < org.ovirt.engine.ui.uicommonweb.models.EntityModel > list = new org.ovirt.engine.ui.uicompat.ObservableCollection < org.ovirt.engine.ui.uicommonweb.models.EntityModel > ( ) ; list.add ( getVmBasicDiskListModel ( ) ) ; setDetailModels ( list ) ; setActiveDetailModel ( getVmBasicDiskListModel ( ) ) ; }

Target:
private void setDetailList ( ) { java.util.List < org.ovirt.engine.ui.uicommonweb.models.HasEntity < java.lang.Object > > list = new java.util.ArrayList < > ( ) ; list.add ( getVmBasicDiskListModel ( ) ) ; setDetailModels ( list ) ; setActiveDetailModel ( getVmBasicDiskListModel ( ) ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc glusterSnapshotActivate ( java.lang.String snapshotName , boolean force ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "GlusterSnapshot.activate" ) . withParameter ( "snapName" , snapshotName ) . withParameter ( "force" , force ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( response ) ; }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturn glusterSnapshotActivate ( java.lang.String snapshotName , boolean force ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "GlusterSnapshot.activate" ) . withParameter ( "snapName" , snapshotName ) . withParameter ( "force" , force ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturn ( response ) ; }
Source:
protected boolean validate ( ) { org.ovirt.engine.core.bll.validator.HostValidator hostValidator = new org.ovirt.engine.core.bll.validator.HostValidator ( getVds ( ) ) ; if ( ( ! ( validate ( hostValidator.hostExists ( ) ) ) ) || ( ! ( validate ( hostValidator.isUp ( ) ) ) ) ) { return false ; } if ( ! ( getVds ( ) . getHighlyAvailableIsConfigured ( ) ) ) { return failValidation ( EngineMessage.ACTION_TYPE_FAILED_VDS_HA_NOT_CONFIGURED ) ; } return true ; }

Target:
protected boolean validate ( ) { org.ovirt.engine.core.bll.validator.HostValidator hostValidator = org.ovirt.engine.core.bll.validator.HostValidator.createInstance ( getVds ( ) ) ; if ( ( ! ( validate ( hostValidator.hostExists ( ) ) ) ) || ( ! ( validate ( hostValidator.isUp ( ) ) ) ) ) { return false ; } if ( ! ( getVds ( ) . getHighlyAvailableIsConfigured ( ) ) ) { return failValidation ( EngineMessage.ACTION_TYPE_FAILED_VDS_HA_NOT_CONFIGURED ) ; } return true ; }
Source:
private boolean isSameManagementNetwork ( ) { final org.ovirt.engine.core.common.businessentities.network.Network sourceManagementNetwork = getNetworkDao ( ) . getManagementNetwork ( getSourceCluster ( ) . getId ( ) ) ; final org.ovirt.engine.core.common.businessentities.network.Network targetManagementNetwork = getNetworkDao ( ) . getManagementNetwork ( getTargetCluster ( ) . getId ( ) ) ; return ( targetManagementNetwork != null ) && ( sourceManagementNetwork.getName ( ) . equals ( targetManagementNetwork.getName ( ) ) ) ; }

Target:
private boolean isSameManagementNetwork ( ) { final org.ovirt.engine.core.common.businessentities.network.Network sourceManagementNetwork = org.ovirt.engine.core.bll.ChangeVDSClusterCommand.getNetworkDao ( ) . getManagementNetwork ( getSourceCluster ( ) . getId ( ) ) ; final org.ovirt.engine.core.common.businessentities.network.Network targetManagementNetwork = org.ovirt.engine.core.bll.ChangeVDSClusterCommand.getNetworkDao ( ) . getManagementNetwork ( getTargetCluster ( ) . getId ( ) ) ; return ( targetManagementNetwork != null ) && ( sourceManagementNetwork.getName ( ) . equals ( targetManagementNetwork.getName ( ) ) ) ; }
Source:
public void setInputFieldsEnabled ( boolean enabled ) { nameEditor.setEnabled ( enabled ) ; descriptionEditor.setEnabled ( enabled ) ; isVmNetworkEditor.setEnabled ( enabled ) ; vlanTagging.setEnabled ( enabled ) ; vlanTag.setEnabled ( enabled ) ; hasMtuEditor.setEnabled ( enabled ) ; mtuEditor.setEnabled ( enabled ) ; }

Target:
public void setInputFieldsEnabled ( boolean enabled ) { nameEditor.setEnabled ( enabled ) ; descriptionEditor.setEnabled ( enabled ) ; isVmNetworkEditor.setEnabled ( enabled ) ; vlanTagging.setEnabled ( enabled ) ; vlanTag.setEnabled ( enabled ) ; hasMtuEditor.setEnabled ( enabled ) ; mtuEditor.setEnabled ( enabled ) ; messageLabel.setVisible ( ( ! enabled ) ) ; }
Source:
public void testConnection ( ) { try { getClient ( ) . execute ( new com.woorea.openstack.base.client.OpenStackRequest ( getClient ( ) , com.woorea.openstack.base.client.HttpMethod.GET , "" , null , org.ovirt.engine.core.bll.provider.network.openstack.BaseNetworkProviderProxy.ApiRootResponse.class ) ) ; } catch ( com.woorea.openstack.base.client.OpenStackResponseException e ) { org.ovirt.engine.core.bll.provider.network.openstack.BaseNetworkProviderProxy.log.error ( "{} (OpenStack response error code: {})" , e.getMessage ( ) , e.getStatus ( ) ) ; org.ovirt.engine.core.bll.provider.network.openstack.BaseNetworkProviderProxy.log.debug ( "Exception" , e ) ; throw new org.ovirt.engine.core.common.errors.EngineException ( org.ovirt.engine.core.common.errors.EngineError.PROVIDER_FAILURE , e ) ; } catch ( java.lang.RuntimeException e ) { throw new org.ovirt.engine.core.common.errors.EngineException ( org.ovirt.engine.core.common.errors.EngineError.PROVIDER_FAILURE , e ) ; } }

Target:
private < R > R execute ( com.woorea.openstack.base.client.OpenStackRequest < R > request ) { try { return request.execute ( ) ; } catch ( com.woorea.openstack.base.client.OpenStackResponseException e ) { throw new org.ovirt.engine.core.common.errors.EngineException ( org.ovirt.engine.core.common.errors.EngineError.PROVIDER_FAILURE , e , true ) ; } catch ( java.lang.RuntimeException e ) { throw new org.ovirt.engine.core.common.errors.EngineException ( org.ovirt.engine.core.common.errors.EngineError.PROVIDER_FAILURE , org.apache.commons.lang.exception.ExceptionUtils.getRootCause ( e ) , true ) ; } }
Source:
public java.lang.String toString ( ) { return ( ( ( ( ( ( "Path to theme: " + ( getPath ( ) ) ) + ", User portal css: " ) + ( getThemeStyleSheet ( "userportal" ) ) ) + ", Web admin css: " ) + ( getThemeStyleSheet ( "webadmin" ) ) ) + ", Welcome page css: " ) + ( getThemeStyleSheet ( "welcome" ) ) ; }

Target:
public java.lang.String toString ( ) { return ( ( ( ( ( ( "Path to theme: " + ( getPath ( ) ) ) + ", User portal css: " ) + ( getThemeStylesheets ( "userportal" ) ) ) + ", Web admin css: " ) + ( getThemeStylesheets ( "webadmin" ) ) ) + ", Welcome page css: " ) + ( getThemeStylesheets ( "welcome" ) ) ; }
Source:
public void rerun ( ) { org.ovirt.engine.core.bll.MigrateVmCommand.setVm ( null ) ; if ( ( ( org.ovirt.engine.core.bll.MigrateVmCommand.getVm ( ) ) != null ) && ( ( org.ovirt.engine.core.bll.MigrateVmCommand.getVm ( ) . getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.Up ) ) ) { determineMigrationFailureForAuditLog ( ) ; setVdsDestinationId ( null ) ; super . rerun ( ) ; } else { failedToMigrate ( ) ; _isRerun = true ; } }

Target:
protected org.ovirt.engine.core.compat.Guid getCurrentVdsId ( ) { org.ovirt.engine.core.compat.Guid destinationVdsId = getDestinationVdsId ( ) ; return destinationVdsId != null ? destinationVdsId : super . getCurrentVdsId ( ) ; }
Source:
protected void proceedProxyReturnValue ( ) { org.ovirt.engine.core.common.errors.EngineError returnStatus = getReturnValueFromStatus ( org.ovirt.engine.core.vdsbroker.irsbroker.RemoveVMVDSCommand.getReturnStatus ( ) ) ; switch ( returnStatus ) { case Done : return ; default : org.ovirt.engine.core.vdsbroker.vdsbroker.VDSExceptionBase outEx = createDefaultConcreteException ( org.ovirt.engine.core.vdsbroker.irsbroker.RemoveVMVDSCommand.getReturnStatus ( ) . mMessage ) ; initializeVdsError ( returnStatus ) ; outEx.setVdsError ( org.ovirt.engine.core.vdsbroker.irsbroker.RemoveVMVDSCommand.getVDSReturnValue ( ) . getVdsError ( ) ) ; throw outEx ; } }

Target:
protected void proceedProxyReturnValue ( ) { org.ovirt.engine.core.common.errors.EngineError returnStatus = getReturnValueFromStatus ( org.ovirt.engine.core.vdsbroker.irsbroker.RemoveVMVDSCommand.getReturnStatus ( ) ) ; switch ( returnStatus ) { case Done : return ; default : org.ovirt.engine.core.vdsbroker.vdsbroker.VDSExceptionBase outEx = createDefaultConcreteException ( org.ovirt.engine.core.vdsbroker.irsbroker.RemoveVMVDSCommand.getReturnStatus ( ) . message ) ; initializeVdsError ( returnStatus ) ; outEx.setVdsError ( org.ovirt.engine.core.vdsbroker.irsbroker.RemoveVMVDSCommand.getVDSReturnValue ( ) . getVdsError ( ) ) ; throw outEx ; } }
Source:
private static java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > createStorageDomains ( org.ovirt.engine.core.compat.Guid sdIdToBeSelected ) { org.ovirt.engine.core.common.businessentities.StorageDomain sd1 = org.ovirt.engine.core.bll.memory.MemoryStorageHandlerTest.createStorageDomain ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , StorageType.NFS , org.ovirt.engine.core.bll.memory.MemoryStorageHandlerTest.LOW_SPACE_IN_GB ) ; org.ovirt.engine.core.common.businessentities.StorageDomain sd2 = org.ovirt.engine.core.bll.memory.MemoryStorageHandlerTest.createStorageDomain ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , StorageType.NFS , org.ovirt.engine.core.bll.memory.MemoryStorageHandlerTest.LOW_SPACE_IN_GB ) ; org.ovirt.engine.core.common.businessentities.StorageDomain sd3 = org.ovirt.engine.core.bll.memory.MemoryStorageHandlerTest.createStorageDomain ( sdIdToBeSelected , StorageType.NFS , org.ovirt.engine.core.bll.memory.MemoryStorageHandlerTest.ENOUGH_SPACE_IN_GB ) ; java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > storageDomains = java.util.Arrays.asList ( sd1 , sd2 , sd3 ) ; return storageDomains ; }

Target:
private org.ovirt.engine.core.common.businessentities.StorageDomain initStorageDomain ( ) { org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain = new org.ovirt.engine.core.common.businessentities.StorageDomain ( ) ; storageDomain.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; storageDomain.setStorageDomainType ( StorageDomainType.Data ) ; storageDomain.setStatus ( StorageDomainStatus.Active ) ; return storageDomain ; }
Source:
public void testListCrashClientLocale ( ) { javax.ws.rs.core.UriInfo uriInfo = setUpUriExpectations ( null ) ; locales.add ( org.ovirt.engine.api.restapi.resource.CLIENT_LOCALE ) ; java.lang.Throwable t = new java.lang.RuntimeException ( FAILURE ) ; setUpEntityQueryExpectations ( 1 , t ) ; collection.setUriInfo ( uriInfo ) ; try { getCollection ( ) ; org.junit.Assert.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , org.ovirt.engine.api.restapi.resource.BACKEND_FAILED_CLIENT_LOCALE , t ) ; } finally { locales.clear ( ) ; } }

Target:
public void testListCrashClientLocale ( ) { javax.ws.rs.core.UriInfo uriInfo = setUpUriExpectations ( null ) ; locales.add ( org.ovirt.engine.api.restapi.resource.CLIENT_LOCALE ) ; java.lang.Throwable t = new java.lang.RuntimeException ( FAILURE ) ; setUpEntityQueryExpectations ( 1 , t ) ; collection.setUriInfo ( uriInfo ) ; try { getCollection ( ) ; org.junit.jupiter.api.Assertions.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , org.ovirt.engine.api.restapi.resource.BACKEND_FAILED_CLIENT_LOCALE , t ) ; } finally { locales.clear ( ) ; } }
Source:
private boolean validateLabelChanges ( java.util.Collection < org.ovirt.engine.ui.uicommonweb.models.hosts.network.LogicalNetworkModel > potentialNetworks ) { org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkInterfaceModel mockSrc = new org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkInterfaceModel ( this ) ; org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkInterfaceModel mockDst = new org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkInterfaceModel ( this ) ; mockSrc.setEntity ( new org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface ( ) ) ; mockDst.setEntity ( new org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface ( ) ) ; mockDst.setItems ( new java.util.ArrayList ( potentialNetworks ) ) ; boolean valid = ! ( org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkOperationFactory.operationFor ( mockSrc , mockDst ) . isNullOperation ( ) ) ; if ( ! valid ) { candidateOperation ( mockSrc , mockDst , true ) ; } return valid ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValueObj ) { org.ovirt.engine.core.common.queries.VdcQueryReturnValue returnValue = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValueObj ) ) ; java.lang.Object returnValue2 = returnValue.getReturnValue ( ) ; this . existingNetworkAttachments = ( ( java.util.List < org.ovirt.engine.core.common.businessentities.network.NetworkAttachment > ) ( returnValue2 ) ) ; queryVfsConfig ( ) ; }
Source:
public org.ovirt.engine.core.common.businessentities.StorageDomain findStorageDomainForMemory ( org.ovirt.engine.core.compat.Guid storagePoolId , java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > disksList ) { java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > domainsInPool = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStorageDomainDao ( ) . getAllForStoragePool ( storagePoolId ) ; org.ovirt.engine.core.common.businessentities.StorageDomain storageDomainForMemory = findStorageDomainForMemory ( domainsInPool , disksList ) ; if ( storageDomainForMemory != null ) { updateDisksStorage ( storageDomainForMemory , disksList ) ; } return storageDomainForMemory ; }

Target:
public org.ovirt.engine.core.common.businessentities.StorageDomain findStorageDomainForMemory ( org.ovirt.engine.core.compat.Guid storagePoolId , java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > memoryDisks , java.util.Collection < org.ovirt.engine.core.common.businessentities.storage.DiskImage > vmDisks ) { java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > domainsInPool = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStorageDomainDao ( ) . getAllForStoragePool ( storagePoolId ) ; org.ovirt.engine.core.common.businessentities.StorageDomain storageDomainForMemory = findStorageDomainForMemory ( domainsInPool , memoryDisks , vmDisks ) ; if ( storageDomainForMemory != null ) { updateDisksStorage ( storageDomainForMemory , memoryDisks ) ; } return storageDomainForMemory ; }