auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public org.ovirt.engine.core.common.businessentities.Snapshot addSnapshot ( org.ovirt.engine.core.compat.Guid snapshotId , java.lang.String description , org.ovirt.engine.core.common.businessentities.Snapshot.SnapshotStatus snapshotStatus , org.ovirt.engine.core.common.businessentities.Snapshot.SnapshotType snapshotType , org.ovirt.engine.core.common.businessentities.VM vm , boolean saveVmConfiguration , final org.ovirt.engine.core.bll.context.CompensationContext compensationContext ) { final org.ovirt.engine.core.common.businessentities.Snapshot snapshot = new org.ovirt.engine.core.common.businessentities.Snapshot ( snapshotId , snapshotStatus , vm.getId ( ) , ( saveVmConfiguration ? generateVmConfiguration ( vm ) : null ) , snapshotType , description , new java.util.Date ( ) , vm.getAppList ( ) , org.apache.commons.lang.StringUtils.EMPTY ) ; getSnapshotDao ( ) . save ( snapshot ) ; compensationContext.snapshotNewEntity ( snapshot ) ; return snapshot ; }

Target:
public org.ovirt.engine.core.common.businessentities.Snapshot addSnapshot ( org.ovirt.engine.core.compat.Guid snapshotId , java.lang.String description , org.ovirt.engine.core.common.businessentities.Snapshot.SnapshotStatus snapshotStatus , org.ovirt.engine.core.common.businessentities.Snapshot.SnapshotType snapshotType , org.ovirt.engine.core.common.businessentities.VM vm , boolean saveVmConfiguration , java.lang.String memoryVolume , final org.ovirt.engine.core.bll.context.CompensationContext compensationContext ) { final org.ovirt.engine.core.common.businessentities.Snapshot snapshot = new org.ovirt.engine.core.common.businessentities.Snapshot ( snapshotId , snapshotStatus , vm.getId ( ) , ( saveVmConfiguration ? generateVmConfiguration ( vm ) : null ) , snapshotType , description , new java.util.Date ( ) , vm.getAppList ( ) , memoryVolume ) ; getSnapshotDao ( ) . save ( snapshot ) ; compensationContext.snapshotNewEntity ( snapshot ) ; return snapshot ; }
Source:
public void testAdd ( ) throws java.lang.Exception { setUpAddExpectations ( ) ; setUpCreationExpectations ( ) ; javax.ws.rs.core.Response response = doAdd ( getRestModel ( 0 ) ) ; org.junit.Assert.assertEquals ( 201 , response.getStatus ( ) ) ; org.ovirt.engine.api.restapi.resource.BackendTemplatesBasedResourceTest.verifyModel ( ( ( R ) ( response.getEntity ( ) ) ) , 0 ) ; org.junit.Assert.assertNull ( ( ( R ) ( response.getEntity ( ) ) ) . getCreationStatus ( ) ) ; }

Target:
public void testAdd ( ) throws java.lang.Exception { setUpAddExpectations ( ) ; setUpCreationExpectations ( ) ; javax.ws.rs.core.Response response = doAdd ( getRestModel ( 0 ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( 201 , response.getStatus ( ) ) ; org.ovirt.engine.api.restapi.resource.BackendTemplatesBasedResourceTest.verifyModel ( ( ( R ) ( response.getEntity ( ) ) ) , 0 ) ; org.junit.jupiter.api.Assertions.assertNull ( ( ( R ) ( response.getEntity ( ) ) ) . getCreationStatus ( ) ) ; }
Source:
protected void updateMemoryBalloon ( ) { org.ovirt.engine.core.common.businessentities.VDSGroup cluster = getModel ( ) . getSelectedCluster ( ) ; java.lang.Integer osType = getModel ( ) . getOSType ( ) . getSelectedItem ( ) ; if ( ( cluster != null ) && ( osType != null ) ) { updateMemoryBalloon ( cluster.getCompatibilityVersion ( ) , osType ) ; } }

Target:
protected void updateMemoryBalloon ( ) { org.ovirt.engine.core.common.businessentities.Cluster cluster = getModel ( ) . getSelectedCluster ( ) ; java.lang.Integer osType = getModel ( ) . getOSType ( ) . getSelectedItem ( ) ; if ( ( cluster != null ) && ( osType != null ) ) { updateMemoryBalloon ( getModel ( ) . getCompatibilityVersion ( ) , osType ) ; } }
Source:
private void localize ( org.ovirt.engine.ui.common.CommonApplicationConstants constants ) { nameEditor.setLabel ( "Name" ) ; networkEditor.setLabel ( "Network" ) ; nicTypeEditor.setLabel ( "Type" ) ; enableManualMacCheckboxLabel.setText ( "Specify custom MAC address" ) ; }

Target:
private void localize ( org.ovirt.engine.ui.common.CommonApplicationConstants constants ) { nameEditor.setLabel ( constants.nameNetworkIntefacePopup ( ) ) ; networkEditor.setLabel ( constants.networkNetworkIntefacePopup ( ) ) ; nicTypeEditor.setLabel ( constants.typeNetworkIntefacePopup ( ) ) ; enableManualMacCheckboxLabel.setText ( constants.specipyCustMacNetworkIntefacePopup ( ) ) ; activateCheckBox.setLabel ( constants.activateNetworkIntefacePopup ( ) ) ; portMirroringEditor.setLabel ( constants.portMirroringNetworkIntefacePopup ( ) ) ; }
Source:
public void validateVmMemoryCanStartOnVdsHostTooSmallButLowOverhead ( ) { vds.setMemFree ( 8835L ) ; vds.setGuestOverhead ( 0 ) ; boolean vmPassedMemoryRequirement = org.ovirt.engine.core.bll.scheduling.SlaValidator.getInstance ( ) . hasPhysMemoryToRunVM ( vds , vm , 0 ) ; org.junit.Assert.assertEquals ( vmPassedMemoryRequirement , true ) ; }

Target:
public void validateVmMemoryCanStartOnVdsHostTooSmallButLowOverhead ( ) { vds.setMemFree ( 8835L ) ; org.mockito.Mockito.doReturn ( 0 ) . when ( vmOverheadCalculator ) . getStaticOverheadInMb ( org.mockito.Matchers.any ( ) ) ; boolean vmPassedMemoryRequirement = slaValidator.hasPhysMemoryToRunVM ( vds , vm , 0 ) ; org.junit.Assert.assertTrue ( vmPassedMemoryRequirement ) ; }
Source:
public org.ovirt.engine.core.common.businessentities.network.NetworkAttachment getNetworkAttachmentForNetwork ( org.ovirt.engine.core.compat.Guid networkId ) { if ( networkId == null ) { return null ; } org.ovirt.engine.core.common.businessentities.network.NetworkAttachment updatedAttachment = new org.ovirt.engine.core.common.utils.MapNetworkAttachments ( hostSetupNetworksParametersData.newOrModifiedNetworkAttachments ) . byNetworkId ( ) . get ( networkId ) ; if ( updatedAttachment != null ) { return updatedAttachment ; } org.ovirt.engine.core.common.businessentities.network.NetworkAttachment existingAttachment = getExistingAttachmentByNetworkId ( networkId ) ; if ( ( existingAttachment != null ) && ( ! ( shouldBeRemoved ( existingAttachment.getId ( ) ) ) ) ) { return existingAttachment ; } return null ; }

Target:
private boolean shouldSyncNetwork ( final java.lang.String networkName ) { return hostSetupNetworksParametersData.getNetworksToSync ( ) . contains ( networkName ) ; }
Source:
public void testAddIncompleteParameters ( ) { org.ovirt.engine.api.model.Nic model = new org.ovirt.engine.api.model.Nic ( ) ; model.setName ( null ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; try { collection.add ( model ) ; org.junit.Assert.fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "Nic" , "add" , "name" ) ; } }

Target:
public void testAddIncompleteParameters ( ) { org.ovirt.engine.api.model.Nic model = new org.ovirt.engine.api.model.Nic ( ) ; model.setName ( null ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; try { collection.add ( model ) ; org.junit.jupiter.api.Assertions.fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "Nic" , "add" , "name" ) ; } }
Source:
private void handleEngineDirectoryServiceException ( org.ovirt.engine.core.bll.adbroker.LdapSearchExceptionHandlingResponse response , java.lang.Throwable cause ) { response.setTranslatedException ( ( ( org.ovirt.engine.core.bll.adbroker.EngineDirectoryServiceException ) ( cause ) ) ) ; switch ( ( ( org.ovirt.engine.core.bll.adbroker.EngineDirectoryServiceException ) ( cause ) ) . getResult ( ) ) { case CONNECTION_ERROR : case CONNECTION_TIMED_OUT : case CLOCK_SKEW_TOO_GREAT : response.setServerScore ( Score.LOW ) . setTryNextServer ( true ) ; break ; default : response.setServerScore ( Score.HIGH ) . setTryNextServer ( false ) ; break ; } }

Target:
private void handleEngineDirectoryServiceException ( org.ovirt.engine.core.bll.adbroker.LdapSearchExceptionHandlingResponse response , java.lang.Throwable cause ) { response.setTranslatedException ( ( ( org.ovirt.engine.core.bll.adbroker.AuthenticationResultException ) ( cause ) ) ) ; switch ( ( ( org.ovirt.engine.core.bll.adbroker.AuthenticationResultException ) ( cause ) ) . getResult ( ) ) { case CONNECTION_ERROR : case CONNECTION_TIMED_OUT : case CLOCK_SKEW_TOO_GREAT : response.setServerScore ( Score.LOW ) . setTryNextServer ( true ) ; break ; default : response.setServerScore ( Score.HIGH ) . setTryNextServer ( false ) ; break ; } }
Source:
private void validateAndExpectViolation ( org.ovirt.engine.core.bll.network.host.SetupNetworksHelper helper , org.ovirt.engine.core.common.errors.VdcBllMessages violation ) { java.util.List < java.lang.String > violations = helper.validate ( ) ; junit.framework.Assert.assertTrue ( java.text.MessageFormat.format ( "Expected violation {0} but only got {1}." , violation , violations ) , violations.contains ( violation.name ( ) ) ) ; }

Target:
private void validateAndExpectViolation ( org.ovirt.engine.core.bll.network.host.SetupNetworksHelper helper , org.ovirt.engine.core.common.errors.VdcBllMessages violation ) { java.util.List < java.lang.String > violations = helper.validate ( ) ; org.junit.Assert.assertTrue ( java.text.MessageFormat.format ( "Expected violation {0} but only got {1}." , violation , violations ) , violations.contains ( violation.name ( ) ) ) ; }
Source:
public void getStorageConnectionById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String id , boolean isRefresh ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( org.ovirt.engine.core.common.businessentities.StorageServerConnections ) ( source ) ) : null ; } } ; org.ovirt.engine.core.common.queries.StorageServerConnectionQueryParametersBase params = new org.ovirt.engine.core.common.queries.StorageServerConnectionQueryParametersBase ( id ) ; params.setRefresh ( isRefresh ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageServerConnectionById , params , aQuery ) ; }

Target:
public void getClustersHavingHosts ( 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 ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > list = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ) ( source ) ) ; java.util.Collections.sort ( list , new org.ovirt.engine.core.common.businessentities.comparators.NameableComparator ( ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllClustersHavingHosts , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }
Source:
protected void endActionOnDisks ( ) { for ( org.ovirt.engine.core.common.action.VdcActionParametersBase p : getParametersForChildCommand ( ) ) { if ( overrideChildCommandSuccess ( ) ) { p.setTaskGroupSuccess ( org.ovirt.engine.core.bll.VmCommand.getParameters ( ) . getTaskGroupSuccess ( ) ) ; } org.ovirt.engine.core.bll.VmCommand.getBackend ( ) . endAction ( ( ( p.getCommandType ( ) ) == ( org.ovirt.engine.core.common.action.VdcActionType.Unknown ) ? getChildActionType ( ) : p.getCommandType ( ) ) , p ) ; } }

Target:
protected void endActionOnDisks ( ) { for ( org.ovirt.engine.core.common.action.VdcActionParametersBase p : getParametersForChildCommand ( ) ) { if ( overrideChildCommandSuccess ( ) ) { p.setTaskGroupSuccess ( org.ovirt.engine.core.bll.VmCommand.getParameters ( ) . getTaskGroupSuccess ( ) ) ; } org.ovirt.engine.core.bll.VmCommand.getBackend ( ) . endAction ( ( ( p.getCommandType ( ) ) == ( org.ovirt.engine.core.common.action.VdcActionType.Unknown ) ? getChildActionType ( ) : p.getCommandType ( ) ) , p , org.ovirt.engine.core.bll.VmCommand.getContext ( ) . clone ( ) . withoutCompensationContext ( ) . withoutExecutionContext ( ) . withoutLock ( ) ) ; } }
Source:
public void testGet ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpEntityQueryExpectations ( 1 ) ; control.replay ( ) ; org.ovirt.engine.api.model.Disk disk = resource.get ( ) ; org.ovirt.engine.api.restapi.resource.AbstractBackendDisksResourceTest.verifyModelSpecific ( disk , 1 ) ; verifyLinks ( disk ) ; }

Target:
public void testGet ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpEntityQueryExpectations ( 1 ) ; control.replay ( ) ; org.ovirt.engine.api.model.Disk disk = resource.get ( ) ; org.ovirt.engine.api.restapi.resource.BackendVmDiskResourceTest.verifyModelSpecific ( disk , 1 ) ; verifyLinks ( disk ) ; }
Source:
public void testEvalNegaitive ( ) throws java.lang.Exception { org.mockito.Mockito.when ( mockVdsNetworkInterface.getNetworkName ( ) ) . thenReturn ( ( "not" + ( org.ovirt.engine.core.vdsbroker.vdsbroker.predicates.IsNetworkOnInterfacePredicateTest.TEST_NETWORK_NAME ) ) ) ; final org.ovirt.engine.core.vdsbroker.vdsbroker.predicates.IsNetworkOnInterfacePredicate underTest = new org.ovirt.engine.core.vdsbroker.vdsbroker.predicates.IsNetworkOnInterfacePredicate ( org.ovirt.engine.core.vdsbroker.vdsbroker.predicates.IsNetworkOnInterfacePredicateTest.TEST_NETWORK_NAME ) ; org.junit.Assert.assertFalse ( underTest.eval ( mockVdsNetworkInterface ) ) ; }

Target:
public void testEvalNegaitive ( ) throws java.lang.Exception { org.mockito.Mockito.when ( mockVdsNetworkInterface.getNetworkName ( ) ) . thenReturn ( ( "not" + ( org.ovirt.engine.core.vdsbroker.vdsbroker.predicates.IsNetworkOnInterfacePredicateTest.TEST_NETWORK_NAME ) ) ) ; final org.ovirt.engine.core.vdsbroker.vdsbroker.predicates.IsNetworkOnInterfacePredicate underTest = new org.ovirt.engine.core.vdsbroker.vdsbroker.predicates.IsNetworkOnInterfacePredicate ( org.ovirt.engine.core.vdsbroker.vdsbroker.predicates.IsNetworkOnInterfacePredicateTest.TEST_NETWORK_NAME ) ; org.junit.Assert.assertFalse ( underTest.test ( mockVdsNetworkInterface ) ) ; }
Source:
private static java.util.Map < java.lang.String , org.ovirt.engine.core.common.businessentities.gluster.GlusterService > getServicesMap ( ) { java.util.Map < java.lang.String , org.ovirt.engine.core.common.businessentities.gluster.GlusterService > serviceNames = new java.util.HashMap < > ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterService > services = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getGlusterServiceDao ( ) . getAll ( ) ; for ( org.ovirt.engine.core.common.businessentities.gluster.GlusterService service : services ) { serviceNames.put ( service.getServiceName ( ) , service ) ; } return serviceNames ; }

Target:
private static java.util.Map < java.lang.String , org.ovirt.engine.core.common.businessentities.gluster.GlusterService > getServicesMap ( ) { java.util.Map < java.lang.String , org.ovirt.engine.core.common.businessentities.gluster.GlusterService > serviceNames = new java.util.HashMap < > ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterService > services = org.ovirt.engine.core.di.Injector.get ( org.ovirt.engine.core.dao.gluster.GlusterServiceDao.class ) . getAll ( ) ; for ( org.ovirt.engine.core.common.businessentities.gluster.GlusterService service : services ) { serviceNames.put ( service.getServiceName ( ) , service ) ; } return serviceNames ; }
Source:
protected boolean canDoAction ( ) { if ( ! ( super . canDoAction ( ) ) ) { return false ; } oldPool = org.ovirt.engine.core.bll.UpdateVmPoolWithVmsCommand.getVmPoolDAO ( ) . get ( org.ovirt.engine.core.bll.UpdateVmPoolWithVmsCommand.getVmPool ( ) . getVmPoolId ( ) ) ; if ( ( oldPool ) == null ) { return failCanDoAction ( VdcBllMessages.VM_POOL_CANNOT_UPDATE_POOL_NOT_FOUND ) ; } if ( ( org.ovirt.engine.core.bll.UpdateVmPoolWithVmsCommand.getParameters ( ) . getVmsCount ( ) ) < 0 ) { return failCanDoAction ( VdcBllMessages.VM_POOL_CANNOT_DECREASE_VMS_FROM_POOL ) ; } return true ; }

Target:
protected boolean canDoAction ( ) { if ( ! ( super . canDoAction ( ) ) ) { return false ; } oldPool = org.ovirt.engine.core.bll.UpdateVmPoolWithVmsCommand.getVmPoolDao ( ) . get ( org.ovirt.engine.core.bll.UpdateVmPoolWithVmsCommand.getVmPool ( ) . getVmPoolId ( ) ) ; if ( ( oldPool ) == null ) { return failCanDoAction ( EngineMessage.VM_POOL_CANNOT_UPDATE_POOL_NOT_FOUND ) ; } if ( ( org.ovirt.engine.core.bll.UpdateVmPoolWithVmsCommand.getParameters ( ) . getVmsCount ( ) ) < 0 ) { return failCanDoAction ( EngineMessage.VM_POOL_CANNOT_DECREASE_VMS_FROM_POOL ) ; } return true ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > pools = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > ) ( returnValue ) ) ; org.ovirt.engine.core.common.businessentities.StoragePool pool = pools.get ( 0 ) ; if ( pool != null ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getStorageDomainList ( ( ( org.ovirt.engine.ui.frontend.AsyncQuery ) ( model ) ) , pool.getId ( ) ) ; } }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { balloonSupportMap = ( ( java.util.Map < java.lang.Integer , java.util.Map < org.ovirt.engine.core.compat.Version , java.lang.Boolean > > ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ) ) ; }
Source:
public void eventRaised ( org.ovirt.engine.core.compat.Event ev , java.lang.Object sender , org.ovirt.engine.core.compat.EventArgs args ) { super . eventRaised ( ev , sender , args ) ; if ( ev.equals ( org.ovirt.engine.ui.uicommonweb.models.EntityModel.EntityChangedEventDefinition ) ) { OnEntityChanged ( ) ; } else if ( ev.equals ( ProvidePropertyChangedEvent.Definition ) ) { EntityPropertyChanged ( sender , ( ( org.ovirt.engine.core.compat.PropertyChangedEventArgs ) ( args ) ) ) ; } }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { super . eventRaised ( ev , sender , args ) ; if ( ev.equals ( org.ovirt.engine.ui.uicommonweb.models.EntityModel.EntityChangedEventDefinition ) ) { OnEntityChanged ( ) ; } else if ( ev.equals ( ProvidePropertyChangedEvent.Definition ) ) { EntityPropertyChanged ( sender , ( ( org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ) ( args ) ) ) ; } }
Source:
public void updateGlusterHook ( org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity hook , org.ovirt.engine.core.compat.Guid hostId ) { getCallsHandler ( ) . executeModification ( "UpdateGlusterHook" , createFullParametersMapper ( hook ) ) ; updateGlusterServerHook ( hook , hostId ) ; }

Target:
public void updateGlusterHook ( org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity hook ) { getCallsHandler ( ) . executeModification ( "UpdateGlusterHook" , getCustomMapSqlParameterSource ( ) . addValue ( "id" , hook.getId ( ) ) . addValue ( "hook_status" , org.ovirt.engine.core.common.utils.EnumUtils.nameOrNull ( hook.getStatus ( ) ) ) . addValue ( "content_type" , org.ovirt.engine.core.common.utils.EnumUtils.nameOrNull ( hook.getContentType ( ) ) ) . addValue ( "checksum" , hook.getChecksum ( ) ) . addValue ( "content" , hook.getContent ( ) ) . addValue ( "conflict_status" , hook.getConflictStatus ( ) ) ) ; }
Source:
public void run ( ) { for ( org.ovirt.engine.core.compat.Guid vmId : vmIds ) { org.ovirt.engine.core.common.businessentities.qos.CpuQos qos = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getCpuQosDao ( ) . getCpuQosByVmId ( vmId ) ; if ( ( qos != null ) && ( ( qos.getCpuLimit ( ) ) != null ) ) { resourceManagerProvider.get ( ) . runVdsCommand ( VDSCommandType.UpdateVmPolicy , new org.ovirt.engine.core.common.vdscommands.UpdateVmPolicyVDSParams ( vdsId , vmId , qos.getCpuLimit ( ) . intValue ( ) ) ) ; } } }

Target:
public void run ( ) { for ( org.ovirt.engine.core.compat.Guid vmId : vmIds ) { org.ovirt.engine.core.common.businessentities.qos.CpuQos qos = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getCpuQosDao ( ) . getCpuQosByVmIds ( java.util.Collections.singleton ( vmId ) ) . get ( vmId ) ; if ( ( qos != null ) && ( ( qos.getCpuLimit ( ) ) != null ) ) { resourceManagerProvider.get ( ) . runVdsCommand ( VDSCommandType.UpdateVmPolicy , new org.ovirt.engine.core.common.vdscommands.UpdateVmPolicyVDSParams ( vdsId , vmId , qos.getCpuLimit ( ) . intValue ( ) ) ) ; } } }
Source:
public void readData ( java.io.ObjectInputStream dis ) { synchronized ( ovirt_engine_dwh.configurationsync_4_1.ConfigurationSync.updateFirstSyncStruct.commonByteArrayLock_OVIRT_ENGINE_DWH_ConfigurationSync ) { try { int length = 0 ; this . var_name = readString ( dis ) ; this . var_value = readString ( dis ) ; this . var_datetime = readDate ( dis ) ; } catch ( java.io.IOException e ) { throw new java.lang.RuntimeException ( e ) ; } } }

Target:
public void writeData ( java.io.ObjectOutputStream dos ) { try { writeString ( this . var_name , dos ) ; writeString ( this . var_value , dos ) ; writeDate ( this . var_datetime , dos ) ; } catch ( java.io.IOException e ) { throw new java.lang.RuntimeException ( e ) ; } }
Source:
public void removeAllForVms ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmGuestAgentInterface > interfaces = dao.getAllForVm ( FixturesTool.VM_RHEL5_POOL_50 ) ; org.junit.Assert.assertFalse ( interfaces.isEmpty ( ) ) ; dao.removeAllForVms ( java.util.Collections.singletonList ( FixturesTool.VM_RHEL5_POOL_50 ) ) ; interfaces = dao.getAllForVm ( FixturesTool.VM_RHEL5_POOL_50 ) ; org.junit.Assert.assertTrue ( interfaces.isEmpty ( ) ) ; }

Target:
public void removeAllForVms ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmGuestAgentInterface > interfaces = dao.getAllForVm ( FixturesTool.VM_RHEL5_POOL_50 ) ; org.junit.jupiter.api.Assertions.assertFalse ( interfaces.isEmpty ( ) ) ; dao.removeAllForVms ( java.util.Collections.singletonList ( FixturesTool.VM_RHEL5_POOL_50 ) ) ; interfaces = dao.getAllForVm ( FixturesTool.VM_RHEL5_POOL_50 ) ; org.junit.jupiter.api.Assertions.assertTrue ( interfaces.isEmpty ( ) ) ; }
Source:
public boolean handle ( java.util.List < org.ovirt.engine.api.extensions.ExtMap > queryResults ) { boolean result = true ; for ( org.ovirt.engine.api.extensions.ExtMap queryResult : queryResults ) { if ( ( directoryGroups.size ( ) ) < ( org.ovirt.engine.core.aaa.AuthzUtils.QUERIES_RESULTS_LIMIT ) ) { directoryGroups.add ( org.ovirt.engine.core.aaa.AuthzUtils.mapGroupRecord ( extension , queryResult ) ) ; } else { result = false ; } } return result ; }

Target:
public boolean handle ( java.util.List < org.ovirt.engine.api.extensions.ExtMap > queryResults ) { boolean result = true ; for ( org.ovirt.engine.api.extensions.ExtMap queryResult : queryResults ) { if ( ( groups.size ( ) ) < ( org.ovirt.engine.core.aaa.AuthzUtils.QUERIES_RESULTS_LIMIT ) ) { groups.add ( queryResult ) ; } else { result = false ; } } return result ; }
Source:
public java.lang.String toString ( ) { return java.lang.String.format ( "%s, status=%s, nonOperationalReason=%s, stopSpmFailureLogged=%s, maintenanceReason=%s" , super . toString ( ) , getStatus ( ) , getNonOperationalReason ( ) , isStopSpmFailureLogged ( ) , getMaintenanceReason ( ) ) ; }

Target:
protected org.ovirt.engine.core.common.utils.ToStringBuilder appendAttributes ( org.ovirt.engine.core.common.utils.ToStringBuilder tsb ) { return super . appendAttributes ( tsb ) . append ( "status" , getStatus ( ) ) . append ( "nonOperationalReason" , getNonOperationalReason ( ) ) . append ( "stopSpmFailureLogged" , isStopSpmFailureLogged ( ) ) . append ( "maintenanceReason" , getMaintenanceReason ( ) ) ; }
Source:
public java.lang.String getValue ( org.ovirt.engine.core.common.businessentities.VmTemplate object ) { if ( object.getId ( ) . equals ( object.getBaseTemplateId ( ) ) ) { return "" ; } return org.ovirt.engine.core.compat.StringFormat.format ( "%s (%s)" , getMainModel ( ) . resolveBaseTemplateNameForTemplate ( object.getId ( ) ) , ( ( object.getTemplateVersionName ( ) ) != null ? object.getTemplateVersionName ( ) : " " ) ) ; }

Target:
public java.lang.String getValue ( org.ovirt.engine.core.common.businessentities.VmTemplate object ) { if ( object.getId ( ) . equals ( object.getBaseTemplateId ( ) ) ) { return "" ; } return org.ovirt.engine.core.compat.StringFormat.format ( "%s (%s)" , ( ( object.getTemplateVersionName ( ) ) != null ? object.getTemplateVersionName ( ) : "" ) , object.getTemplateVersionNumber ( ) ) ; }
Source:
protected boolean isFiltered ( ) { return org.ovirt.engine.api.restapi.util.ParametersHelper.getBooleanParameter ( httpHeaders , uriInfo , org.ovirt.engine.api.restapi.resource.BaseBackendResource.FILTER , true , false ) ; }

Target:
protected boolean isFiltered ( ) { java.lang.Boolean result = org.ovirt.engine.api.restapi.util.ParametersHelper.getBooleanParameter ( httpHeaders , uriInfo , org.ovirt.engine.api.restapi.resource.BaseBackendResource.FILTER , true , null ) ; if ( result == null ) { org.ovirt.engine.core.common.businessentities.aaa.DbUser user = getCurrent ( ) . getUser ( ) ; if ( ! ( user.isAdmin ( ) ) ) { org.ovirt.engine.api.restapi.LocalConfig config = org.ovirt.engine.api.restapi.LocalConfig.getInstance ( ) ; result = config.getFilterByDefault ( ) ; } else { result = java.lang.Boolean.FALSE ; } } return result ; }
Source:
public void createOvfStoreDisks ( int missingDiskCount ) { for ( int i = 0 ; i < missingDiskCount ; i ++ ) { org.ovirt.engine.core.common.action.CreateOvfVolumeForStorageDomainCommandParameters parameters = createCreateOvfVolumeForStorageDomainParams ( ) ; runInternalAction ( VdcActionType.CreateOvfVolumeForStorageDomain , parameters , org.ovirt.engine.core.bll.storage.ovfstore.ProcessOvfUpdateForStorageDomainCommand.getContext ( ) . clone ( ) . withoutLock ( ) ) ; } }

Target:
public void createOvfStoreDisks ( int missingDiskCount ) { for ( int i = 0 ; i < missingDiskCount ; i ++ ) { org.ovirt.engine.core.common.action.CreateOvfVolumeForStorageDomainCommandParameters parameters = createCreateOvfVolumeForStorageDomainParams ( ) ; runInternalAction ( ActionType.CreateOvfVolumeForStorageDomain , parameters , org.ovirt.engine.core.bll.storage.ovfstore.ProcessOvfUpdateForStorageDomainCommand.getContext ( ) . clone ( ) . withoutLock ( ) ) ; } }
Source:
private org.ovirt.engine.core.bll.network.macpool.MacPool getPoolWithoutLocking ( org.ovirt.engine.core.compat.Guid macPoolId ) { final org.ovirt.engine.core.bll.network.macpool.MacPool result = macPools.get ( macPoolId ) ; if ( result == null ) { throw new java.lang.IllegalStateException ( org.ovirt.engine.core.bll.network.macpool.MacPoolPerDc.INEXISTENT_POOL_EXCEPTION_MESSAGE ) ; } return result ; }

Target:
private org.ovirt.engine.core.bll.network.macpool.MacPool getMacPoolWithoutLocking ( org.ovirt.engine.core.compat.Guid macPoolId , java.util.List < org.ovirt.engine.core.bll.network.macpool.MacPoolDecorator > decorators ) { final org.ovirt.engine.core.bll.network.macpool.MacPool poolById = macPools.get ( macPoolId ) ; if ( poolById == null ) { throw new java.lang.IllegalStateException ( org.ovirt.engine.core.bll.network.macpool.MacPoolPerDc.INEXISTENT_POOL_EXCEPTION_MESSAGE ) ; } return decoratedMacPoolFactory.createDecoratedPool ( macPoolId , poolById , decorators ) ; }
Source:
protected void updateStatus ( org.ovirt.engine.core.common.businessentities.StoragePoolIsoMap map , org.ovirt.engine.core.common.businessentities.StorageDomainStatus status ) { log.info ( "Setting domain '{}' to status '{}'" , map.getId ( ) , status.name ( ) ) ; map.setStatus ( status ) ; getStoragePoolIsoMapDao ( ) . updateStatus ( map.getId ( ) , map.getStatus ( ) ) ; }

Target:
protected void updateStatus ( org.ovirt.engine.core.common.businessentities.StoragePoolIsoMap map , org.ovirt.engine.core.common.businessentities.StorageDomainStatus status ) { log.info ( "Setting domain '{}' to status '{}'" , map.getId ( ) , status.name ( ) ) ; map.setStatus ( status ) ; org.ovirt.engine.core.bll.storage.UpdateStorageServerConnectionCommand.getStoragePoolIsoMapDao ( ) . updateStatus ( map.getId ( ) , map.getStatus ( ) ) ; }
Source:
public static void IsPoolNameUnique ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String name ) { 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 ! ( ( java.lang.Boolean ) ( source ) ) ; } return false ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.IsVmPoolWithSameNameExists , new org.ovirt.engine.core.common.queries.IsVmPoolWithSameNameExistsParameters ( name ) , aQuery ) ; }

Target:
public static void isPoolNameUnique ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String name ) { 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 ! ( ( java.lang.Boolean ) ( source ) ) ; } return false ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.IsVmPoolWithSameNameExists , new org.ovirt.engine.core.common.queries.NameQueryParameters ( name ) , aQuery ) ; }
Source:
private boolean validateNetworkProviderConfiguration ( ) { return ( ( ! ( org.ovirt.engine.core.bll.hostdeploy.UpdateVdsCommand.getParameters ( ) . isInstallHost ( ) ) ) || ( ( org.ovirt.engine.core.bll.hostdeploy.UpdateVdsCommand.getParameters ( ) . getVdsStaticData ( ) . getOpenstackNetworkProviderId ( ) ) == null ) ) || ( validateNetworkProviderProperties ( org.ovirt.engine.core.bll.hostdeploy.UpdateVdsCommand.getParameters ( ) . getVdsStaticData ( ) . getOpenstackNetworkProviderId ( ) , org.ovirt.engine.core.bll.hostdeploy.UpdateVdsCommand.getParameters ( ) . getNetworkMappings ( ) ) ) ; }

Target:
private boolean validateNetworkProviderConfiguration ( ) { return ( ( ! ( org.ovirt.engine.core.bll.hostdeploy.UpdateVdsCommand.getParameters ( ) . isInstallHost ( ) ) ) || ( ( org.ovirt.engine.core.bll.hostdeploy.UpdateVdsCommand.getParameters ( ) . getVdsStaticData ( ) . getOpenstackNetworkProviderId ( ) ) == null ) ) || ( validateOpenstackNetworkProviderProperties ( org.ovirt.engine.core.bll.hostdeploy.UpdateVdsCommand.getParameters ( ) . getVdsStaticData ( ) . getOpenstackNetworkProviderId ( ) , org.ovirt.engine.core.bll.hostdeploy.UpdateVdsCommand.getParameters ( ) . getNetworkMappings ( ) ) ) ; }
Source:
private java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.bll.provider.storage.OpenStackVolumeProviderProxy > getVolumeProviderProxyMap ( ) { if ( ( diskProxyMap ) == null ) { diskProxyMap = new java.util.HashMap < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.storage.CinderDisk cinderDisk : cinderDisks ) { org.ovirt.engine.core.bll.provider.storage.OpenStackVolumeProviderProxy volumeProviderProxy = getVolumeProviderProxy ( cinderDisk ) ; diskProxyMap.put ( cinderDisk.getId ( ) , volumeProviderProxy ) ; } } return diskProxyMap ; }

Target:
private java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.bll.provider.storage.OpenStackVolumeProviderProxy > initializeVolumeProviderProxyMap ( ) { if ( ( diskProxyMap ) == null ) { diskProxyMap = new java.util.HashMap < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.storage.CinderDisk cinderDisk : cinderDisks ) { org.ovirt.engine.core.bll.provider.storage.OpenStackVolumeProviderProxy volumeProviderProxy = getVolumeProviderProxy ( cinderDisk ) ; diskProxyMap.put ( cinderDisk.getId ( ) , volumeProviderProxy ) ; } } return diskProxyMap ; }
Source:
public void setEnabled ( boolean enabled ) { button.setEnabled ( enabled ) ; dropdownButton.setEnabled ( enabled ) ; }

Target:
public void setEnabled ( boolean enabled ) { button.setEnabled ( enabled ) ; for ( org.ovirt.engine.core.common.utils.Pair < com.google.gwt.user.client.ui.MenuItem , org.ovirt.engine.ui.common.widget.action.ActionButtonDefinition < T > > item : items ) { updateMenuItem ( item.getFirst ( ) , item.getSecond ( ) , selectedItemsProvider.getSelectedItems ( ) ) ; } dropdownButton.setEnabled ( enabled ) ; }
Source:
protected void executeQueryCommand ( ) { org.ovirt.engine.core.common.businessentities.VDS host = org.ovirt.engine.core.bll.GetHostArchitectureQuery.getDbFacade ( ) . getVdsDao ( ) . get ( org.ovirt.engine.core.bll.GetHostArchitectureQuery.getParameters ( ) . getId ( ) ) ; org.ovirt.engine.core.common.businessentities.ServerCpu sc = org.ovirt.engine.core.bll.CpuFlagsManagerHandler.FindMaxServerCpuByFlags ( host.getCpuFlags ( ) , host.getVdsGroupCompatibilityVersion ( ) ) ; org.ovirt.engine.core.bll.GetHostArchitectureQuery.getQueryReturnValue ( ) . setReturnValue ( ( sc == null ? org.ovirt.engine.core.common.businessentities.ArchitectureType.undefined : sc.getArchitecture ( ) ) ) ; }

Target:
protected void executeQueryCommand ( ) { org.ovirt.engine.core.common.businessentities.VDS host = org.ovirt.engine.core.bll.GetHostArchitectureQuery.getDbFacade ( ) . getVdsDao ( ) . get ( org.ovirt.engine.core.bll.GetHostArchitectureQuery.getParameters ( ) . getId ( ) ) ; org.ovirt.engine.core.common.businessentities.ServerCpu sc = org.ovirt.engine.core.bll.CpuFlagsManagerHandler.findMaxServerCpuByFlags ( host.getCpuFlags ( ) , host.getVdsGroupCompatibilityVersion ( ) ) ; org.ovirt.engine.core.bll.GetHostArchitectureQuery.getQueryReturnValue ( ) . setReturnValue ( ( sc == null ? org.ovirt.engine.core.common.businessentities.ArchitectureType.undefined : sc.getArchitecture ( ) ) ) ; }
Source:
public void getClusterById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVdsGroupById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
public void getPoolById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid poolId ) { 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.GetVmPoolById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( poolId ) , aQuery ) ; }
Source:
public void testExportWithStorageDomainName ( ) throws java.lang.Exception { setUpGetEntityExpectations ( ( "Storage: name=" + ( NAMES [ 2 ] ) ) , SearchType.StorageDomain , getStorageDomain ( 2 ) ) ; org.ovirt.engine.api.model.StorageDomain storageDomain = new org.ovirt.engine.api.model.StorageDomain ( ) ; storageDomain.setName ( NAMES [ 2 ] ) ; doTestExport ( storageDomain , false , false ) ; }

Target:
public void testExportWithStorageDomainName ( ) throws java.lang.Exception { setUpEntityQueryExpectations ( VdcQueryType.GetStorageDomainByName , org.ovirt.engine.core.common.queries.NameQueryParameters.class , new java.lang.String [ ] { "Name" } , new java.lang.Object [ ] { NAMES [ 2 ] } , getStorageDomainStatic ( 2 ) ) ; org.ovirt.engine.api.model.StorageDomain storageDomain = new org.ovirt.engine.api.model.StorageDomain ( ) ; storageDomain.setName ( NAMES [ 2 ] ) ; doTestExport ( storageDomain , false , false ) ; }
Source:
private void applyNetworkChangesToHosts ( ) { java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > parameters = syncNetworkParametersBuilder.buildParameters ( org.ovirt.engine.core.bll.network.dc.UpdateNetworkCommand.getNetwork ( ) , getOldNetwork ( ) ) ; if ( ! ( parameters.isEmpty ( ) ) ) { org.ovirt.engine.core.bll.network.HostSetupNetworksParametersBuilder.updateParametersSequencing ( parameters ) ; runInternalMultipleActions ( VdcActionType.PersistentHostSetupNetworks , parameters ) ; } }

Target:
private java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > prepareSetupNetworksParameters ( ) { java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > parameters = syncNetworkParametersBuilder.buildParameters ( org.ovirt.engine.core.bll.network.dc.UpdateNetworkCommand.getNetwork ( ) , getOldNetwork ( ) ) ; setParentCommandInfo ( parameters ) ; org.ovirt.engine.core.bll.network.HostSetupNetworksParametersBuilder.updateParametersSequencing ( parameters ) ; return parameters ; }
Source:
public void testLiveSnapshotWhenNoPluggedDiskSnapshot ( ) { org.mockito.Mockito.doReturn ( true ) . when ( cmd ) . isLiveSnapshotApplicable ( ) ; org.mockito.Mockito.doReturn ( org.ovirt.engine.core.bll.snapshots.CreateAllSnapshotsFromVmCommandTest.getEmptyDiskList ( ) ) . when ( cmd ) . getDisksList ( ) ; org.junit.Assert.assertTrue ( cmd.validate ( ) ) ; org.junit.Assert.assertTrue ( cmd.getReturnValue ( ) . getValidationMessages ( ) . isEmpty ( ) ) ; }

Target:
public void testLiveSnapshotWhenNoPluggedDiskSnapshot ( ) { org.mockito.Mockito.doReturn ( true ) . when ( cmd ) . isLiveSnapshotApplicable ( ) ; org.mockito.Mockito.doReturn ( org.ovirt.engine.core.bll.snapshots.CreateAllSnapshotsFromVmCommandTest.getEmptyDiskList ( ) ) . when ( cmd ) . getDisksList ( ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateSuccess ( cmd ) ; }
Source:
private void InitOldParentTagName ( ) { if ( ( ( org.ovirt.engine.core.bll.MoveTagCommand.getTag ( ) ) != null ) && ( ( org.ovirt.engine.core.bll.MoveTagCommand.getTag ( ) . getparent_id ( ) ) != null ) ) { org.ovirt.engine.core.common.businessentities.Tags parent = org.ovirt.engine.core.bll.TagsDirector.getInstance ( ) . getTagById ( new org.ovirt.engine.core.compat.Guid ( org.ovirt.engine.core.bll.MoveTagCommand.getTag ( ) . getparent_id ( ) . toString ( ) ) ) ; if ( parent != null ) { _oldParnetTagName = parent.gettag_name ( ) ; } } }

Target:
private void initOldParentTagName ( ) { if ( ( ( org.ovirt.engine.core.bll.MoveTagCommand.getTag ( ) ) != null ) && ( ( org.ovirt.engine.core.bll.MoveTagCommand.getTag ( ) . getParentId ( ) ) != null ) ) { org.ovirt.engine.core.common.businessentities.Tags parent = org.ovirt.engine.core.bll.TagsDirector.getInstance ( ) . getTagById ( new org.ovirt.engine.core.compat.Guid ( org.ovirt.engine.core.bll.MoveTagCommand.getTag ( ) . getParentId ( ) . toString ( ) ) ) ; if ( parent != null ) { _oldParnetTagName = parent.getTagName ( ) ; } } }
Source:
protected void executeVdsBrokerCommand ( ) { infoReturn = org.ovirt.engine.core.vdsbroker.vdsbroker.GetStatsVDSCommand.getBroker ( ) . getVdsStats ( ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.GetStatsVDSCommand.proceedProxyReturnValue ( ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilder.updateVDSStatisticsData ( org.ovirt.engine.core.vdsbroker.vdsbroker.GetStatsVDSCommand.getVds ( ) , infoReturn.info ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilder.checkTimeDrift ( org.ovirt.engine.core.vdsbroker.vdsbroker.GetStatsVDSCommand.getVds ( ) , infoReturn.info ) ; }

Target:
protected void executeVdsBrokerCommand ( ) { infoReturn = org.ovirt.engine.core.vdsbroker.vdsbroker.GetStatsVDSCommand.getBroker ( ) . getVdsStats ( ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.GetStatsVDSCommand.proceedProxyReturnValue ( ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilder.updateVDSStatisticsData ( org.ovirt.engine.core.vdsbroker.vdsbroker.GetStatsVDSCommand.getVds ( ) , infoReturn.info ) ; multipathHealthHandler.handleMultipathHealthReport ( org.ovirt.engine.core.vdsbroker.vdsbroker.GetStatsVDSCommand.getVds ( ) , infoReturn.info ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilder.checkTimeDrift ( org.ovirt.engine.core.vdsbroker.vdsbroker.GetStatsVDSCommand.getVds ( ) , infoReturn.info ) ; }
Source:
protected void onInitAllDisks ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.Disk > disks ) { for ( org.ovirt.engine.core.common.businessentities.storage.Disk disk : disks ) { if ( ( disk.getDiskStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.storage.Disk.DiskStorageType.IMAGE ) ) { allDisks.add ( org.ovirt.engine.ui.uicommonweb.Linq.diskToModel ( disk ) ) ; } } }

Target:
protected void onInitAllDisks ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.Disk > disks ) { for ( org.ovirt.engine.core.common.businessentities.storage.Disk disk : disks ) { if ( ( disk.getDiskStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.storage.DiskStorageType.IMAGE ) ) { allDisks.add ( org.ovirt.engine.ui.uicommonweb.Linq.diskToModel ( disk ) ) ; } } }
Source:
protected boolean validateSpaceRequirements ( org.ovirt.engine.core.common.businessentities.DiskImage diskImage ) { diskImage.getSnapshots ( ) . add ( diskImage ) ; org.ovirt.engine.core.bll.validator.storage.StorageDomainValidator sdValidator = createStorageDomainValidator ( ) ; boolean result = ( ( validate ( sdValidator.isDomainExistAndActive ( ) ) ) && ( validate ( sdValidator.isDomainWithinThresholds ( ) ) ) ) && ( validate ( sdValidator.hasSpaceForClonedDisk ( diskImage ) ) ) ; diskImage.getSnapshots ( ) . remove ( diskImage ) ; return result ; }

Target:
protected boolean validateSpaceRequirements ( org.ovirt.engine.core.common.businessentities.storage.DiskImage diskImage ) { diskImage.getSnapshots ( ) . add ( diskImage ) ; org.ovirt.engine.core.bll.validator.storage.StorageDomainValidator sdValidator = createStorageDomainValidator ( ) ; boolean result = ( ( validate ( sdValidator.isDomainExistAndActive ( ) ) ) && ( validate ( sdValidator.isDomainWithinThresholds ( ) ) ) ) && ( validate ( sdValidator.hasSpaceForClonedDisk ( diskImage ) ) ) ; diskImage.getSnapshots ( ) . remove ( diskImage ) ; return result ; }
Source:
public java.util.List < org.ovirt.engine.core.common.PermissionSubject > getPermissionCheckSubjects ( ) { java.util.List < org.ovirt.engine.core.common.PermissionSubject > permissionList = new java.util.ArrayList < org.ovirt.engine.core.common.PermissionSubject > ( ) ; permissionList.add ( new org.ovirt.engine.core.common.PermissionSubject ( org.ovirt.engine.core.bll.VmTemplateCommand.getVmTemplateId ( ) , org.ovirt.engine.core.common.VdcObjectType.VmTemplate , org.ovirt.engine.core.bll.VmTemplateCommand.getActionType ( ) . getActionGroup ( ) ) ) ; return permissionList ; }

Target:
public java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > getPermissionCheckSubjects ( ) { java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > permissionList = new java.util.ArrayList < org.ovirt.engine.core.bll.utils.PermissionSubject > ( ) ; permissionList.add ( new org.ovirt.engine.core.bll.utils.PermissionSubject ( org.ovirt.engine.core.bll.VmTemplateCommand.getVmTemplateId ( ) , org.ovirt.engine.core.common.VdcObjectType.VmTemplate , org.ovirt.engine.core.bll.VmTemplateCommand.getActionType ( ) . getActionGroup ( ) ) ) ; return permissionList ; }
Source:
protected void executeVdsBrokerCommand ( ) { java.util.List < java.lang.String > vmIds = org.ovirt.engine.core.vdsbroker.vdsbroker.FullListVDSCommand.getParameters ( ) . getVmIds ( ) ; java.lang.String [ ] vmIdsArray = vmIds.toArray ( new java.lang.String [ vmIds.size ( ) ] ) ; fullVmListReturn = org.ovirt.engine.core.vdsbroker.vdsbroker.FullListVDSCommand.getBroker ( ) . list ( java.lang.Boolean.TRUE.toString ( ) , vmIdsArray ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.FullListVDSCommand.proceedProxyReturnValue ( ) ; java.util.Map < java.lang.String , java.lang.Object > [ ] struct = fullVmListReturn.mVmList ; org.ovirt.engine.core.vdsbroker.vdsbroker.FullListVDSCommand.setReturnValue ( struct ) ; }

Target:
protected void executeVdsBrokerCommand ( ) { java.util.List < java.lang.String > vmIds = org.ovirt.engine.core.vdsbroker.vdsbroker.FullListVDSCommand.getParameters ( ) . getVmIds ( ) ; java.lang.String [ ] vmIdsArray = vmIds.toArray ( new java.lang.String [ vmIds.size ( ) ] ) ; fullVmListReturn = org.ovirt.engine.core.vdsbroker.vdsbroker.FullListVDSCommand.getBroker ( ) . list ( java.lang.Boolean.TRUE.toString ( ) , vmIdsArray ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.FullListVDSCommand.proceedProxyReturnValue ( ) ; java.util.Map < java.lang.String , java.lang.Object > [ ] struct = fullVmListReturn.vmList ; org.ovirt.engine.core.vdsbroker.vdsbroker.FullListVDSCommand.setReturnValue ( struct ) ; }
Source:
private void prepare7 ( ) { org.ovirt.engine.ui.uicompat.PreparingEnlistment enlistment = ( ( org.ovirt.engine.ui.uicompat.PreparingEnlistment ) ( context.enlistment ) ) ; org.ovirt.engine.core.common.action.VdcReturnValueBase returnValue = context.removeStorageServerConnectionReturnValue ; context.enlistment = null ; if ( returnValue != null ) { enlistment.Done ( ) ; } else { enlistment.prepared ( ) ; } }

Target:
private void prepare7 ( ) { org.ovirt.engine.ui.uicompat.PreparingEnlistment enlistment = ( ( org.ovirt.engine.ui.uicompat.PreparingEnlistment ) ( context.enlistment ) ) ; org.ovirt.engine.core.common.action.VdcReturnValueBase returnValue = context.removeStorageServerConnectionReturnValue ; context.enlistment = null ; if ( returnValue != null ) { enlistment.done ( ) ; } else { enlistment.prepared ( ) ; } }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object ReturnValue ) { org.ovirt.engine.ui.uicommonweb.models.users.AdElementListModel adElementListModel = ( ( org.ovirt.engine.ui.uicommonweb.models.users.AdElementListModel ) ( model ) ) ; org.ovirt.engine.core.common.queries.VdcQueryReturnValue queryReturnValue = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( ReturnValue ) ) ; if ( handleQueryError ( queryReturnValue , adElementListModel ) ) { return ; } setusers ( new java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.EntityModel < org.ovirt.engine.core.common.businessentities.aaa.DbUser > > ( ) ) ; addUsersToModel ( queryReturnValue , getExcludeUsers ( ) ) ; onAdUsersLoaded ( adElementListModel ) ; }

Target:
public void onSuccess ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue queryReturnValue ) { if ( handleQueryError ( queryReturnValue ) ) { return ; } java.util.HashSet < java.lang.String > excludeUsers = new java.util.HashSet < > ( ) ; if ( ( getExcludeItems ( ) ) != null ) { for ( org.ovirt.engine.core.common.businessentities.aaa.DbUser item : getExcludeItems ( ) ) { excludeUsers.add ( item.getExternalId ( ) ) ; } } setgroups ( new java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.EntityModel < org.ovirt.engine.core.common.businessentities.aaa.DbUser > > ( ) ) ; addGroupsToModel ( queryReturnValue , excludeUsers ) ; onAdGroupsLoaded ( ) ; }