auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
protected void executeVdsBrokerCommand ( ) { try { status = org.ovirt.engine.core.vdsbroker.SetAmountOfMemoryVDSCommand.getBroker ( ) . hotplugMemory ( buildData ( ) ) ; org.ovirt.engine.core.vdsbroker.SetAmountOfMemoryVDSCommand.proceedProxyReturnValue ( ) ; } catch ( java.lang.RuntimeException e ) { org.ovirt.engine.core.vdsbroker.SetAmountOfMemoryVDSCommand.setVdsRuntimeErrorAndReport ( e ) ; org.ovirt.engine.core.vdsbroker.SetAmountOfMemoryVDSCommand.getVDSReturnValue ( ) . setExceptionString ( null ) ; } }

Target:
protected void executeVdsBrokerCommand ( ) { try { status = org.ovirt.engine.core.vdsbroker.SetAmountOfMemoryVDSCommand.getBroker ( ) . hotplugMemory ( org.ovirt.engine.core.vdsbroker.architecture.MemoryUtils.createVmMemoryDeviceMap ( org.ovirt.engine.core.vdsbroker.SetAmountOfMemoryVDSCommand.getParameters ( ) . getMemoryDevice ( ) , false ) ) ; org.ovirt.engine.core.vdsbroker.SetAmountOfMemoryVDSCommand.proceedProxyReturnValue ( ) ; } catch ( java.lang.RuntimeException e ) { org.ovirt.engine.core.vdsbroker.SetAmountOfMemoryVDSCommand.setVdsRuntimeErrorAndReport ( e ) ; org.ovirt.engine.core.vdsbroker.SetAmountOfMemoryVDSCommand.getVDSReturnValue ( ) . setExceptionString ( null ) ; } }
Source:
public boolean equals ( java.lang.Object obj ) { if ( ! ( obj instanceof org.ovirt.engine.core.common.businessentities.gluster.GlusterService ) ) { return false ; } org.ovirt.engine.core.common.businessentities.gluster.GlusterService other = ( ( org.ovirt.engine.core.common.businessentities.gluster.GlusterService ) ( obj ) ) ; if ( ! ( ( ( org.ovirt.engine.core.common.utils.ObjectUtils.objectsEqual ( id , other.getId ( ) ) ) && ( ( serviceType ) == ( other.getServiceType ( ) ) ) ) && ( org.ovirt.engine.core.common.utils.ObjectUtils.objectsEqual ( serviceName , other.getServiceName ( ) ) ) ) ) { return false ; } return true ; }

Target:
public boolean equals ( java.lang.Object obj ) { if ( ! ( obj instanceof org.ovirt.engine.core.common.businessentities.gluster.GlusterService ) ) { return false ; } org.ovirt.engine.core.common.businessentities.gluster.GlusterService other = ( ( org.ovirt.engine.core.common.businessentities.gluster.GlusterService ) ( obj ) ) ; if ( ! ( ( ( java.util.Objects.equals ( id , other.getId ( ) ) ) && ( ( serviceType ) == ( other.getServiceType ( ) ) ) ) && ( java.util.Objects.equals ( serviceName , other.getServiceName ( ) ) ) ) ) { return false ; } return true ; }
Source:
public void OnSuccess ( java.lang.Object model , java.lang.Object ReturnValue ) { this . setItems ( ( ( java.util.List < org.ovirt.engine.core.common.utils.PairQueryable < org.ovirt.engine.core.common.businessentities.VmNetworkInterface , org.ovirt.engine.core.common.businessentities.VM > > ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( ReturnValue ) ) . getReturnValue ( ) ) ) ) ; }

Target:
public void OnSuccess ( java.lang.Object model , java.lang.Object ReturnValue ) { if ( model.equals ( getViewFilterType ( ) ) ) { this . setItems ( ( ( java.util.List < org.ovirt.engine.core.common.utils.PairQueryable < org.ovirt.engine.core.common.businessentities.VmNetworkInterface , org.ovirt.engine.core.common.businessentities.VM > > ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( ReturnValue ) ) . getReturnValue ( ) ) ) ) ; } }
Source:
private static void addVideoDevice ( org.ovirt.engine.core.common.businessentities.VM vm ) { org.ovirt.engine.core.bll.utils.VmDeviceUtils.addManagedDevice ( new org.ovirt.engine.core.common.businessentities.VmDeviceId ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) , vm.getId ( ) ) , VmDeviceGeneralType.VIDEO , vm.getDefaultDisplayType ( ) . getVmDeviceType ( ) , org.ovirt.engine.core.bll.utils.VmDeviceUtils.getMemExpr ( vm.getNumOfMonitors ( ) ) , true , true ) ; }

Target:
private static void addVideoDevice ( org.ovirt.engine.core.common.businessentities.VmBase vm ) { org.ovirt.engine.core.bll.utils.VmDeviceUtils.addManagedDevice ( new org.ovirt.engine.core.common.businessentities.VmDeviceId ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) , vm.getId ( ) ) , VmDeviceGeneralType.VIDEO , vm.getDefaultDisplayType ( ) . getVmDeviceType ( ) , org.ovirt.engine.core.bll.utils.VmDeviceUtils.getMemExpr ( vm.getNumOfMonitors ( ) ) , true , true , null ) ; }
Source:
private org.ovirt.engine.core.bll.ValidationResult referencedNetworkAttachmentActuallyExists ( org.ovirt.engine.core.compat.Guid networkAttachmentId ) { boolean doesNotReferenceExistingNetworkAttachment = networkAttachmentId == null ; if ( doesNotReferenceExistingNetworkAttachment ) { return org.ovirt.engine.core.bll.ValidationResult.VALID ; } for ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment existingAttachment : existingAttachments ) { if ( existingAttachment.getId ( ) . equals ( networkAttachmentId ) ) { return org.ovirt.engine.core.bll.ValidationResult.VALID ; } } return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.NETWORK_ATTACHMENT_NOT_EXISTS ) ; }

Target:
private org.ovirt.engine.core.bll.ValidationResult referencedNetworkAttachmentActuallyExists ( org.ovirt.engine.core.compat.Guid networkAttachmentId ) { boolean doesNotReferenceExistingNetworkAttachment = networkAttachmentId == null ; if ( doesNotReferenceExistingNetworkAttachment ) { return org.ovirt.engine.core.bll.ValidationResult.VALID ; } for ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment existingAttachment : existingAttachments ) { if ( existingAttachment.getId ( ) . equals ( networkAttachmentId ) ) { return org.ovirt.engine.core.bll.ValidationResult.VALID ; } } return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.NETWORK_ATTACHMENT_NOT_EXISTS ) ; }
Source:
public static void getClusterById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVdsGroupById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
public static void getGlusterRemoveBricksStatus ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId , org.ovirt.engine.core.compat.Guid volumeId , java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity > bricks ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter < org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeTaskStatusEntity > ( ) { @ java.lang.Override public org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeTaskStatusEntity Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return ( ( org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeTaskStatusEntity ) ( source ) ) ; } } ; org.ovirt.engine.core.common.action.gluster.GlusterVolumeRemoveBricksQueriesParameters parameters = new org.ovirt.engine.core.common.action.gluster.GlusterVolumeRemoveBricksQueriesParameters ( clusterId , volumeId , bricks ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetGlusterVolumeRemoveBricksStatus , parameters , aQuery ) ; }
Source:
public static void getGlusterHook ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hookId , boolean includeServerHooks ) { 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.GetGlusterHookById , new org.ovirt.engine.core.common.queries.gluster.GlusterHookQueryParameters ( hookId , includeServerHooks ) , aQuery ) ; }

Target:
public static void getGlusterRebalanceStatus ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId , org.ovirt.engine.core.compat.Guid volumeId ) { aQuery.setHandleFailure ( true ) ; org.ovirt.engine.core.common.queries.gluster.GlusterVolumeQueriesParameters parameters = new org.ovirt.engine.core.common.queries.gluster.GlusterVolumeQueriesParameters ( clusterId , volumeId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterVolumeRebalanceStatus , parameters , aQuery ) ; }
Source:
public void testAlreadyExistStorageDomain ( ) { org.mockito.Mockito.when ( command.getStorageDomainStaticDAO ( ) . get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( org.ovirt.engine.core.bll.storage.AddExistingBlockStorageDomainCommandTest.getStorageDomain ( ) ) ; org.junit.Assert.assertFalse ( "Storage Domain already exists" , command.canAddDomain ( ) ) ; org.junit.Assert.assertTrue ( "Import block Storage Domain should have failed due to already existing Storage Domain" , command.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_DOMAIN_ALREADY_EXIST.toString ( ) ) ) ; }

Target:
public void testAddExistingBlockDomainWhenVgInfoReturnsEmptyLunList ( ) { org.mockito.Mockito.doReturn ( java.util.Collections.emptyList ( ) ) . when ( command ) . getLUNsFromVgInfo ( parameters.getStorageDomain ( ) . getStorage ( ) ) ; org.junit.Assert.assertFalse ( "Could not connect to Storage Domain" , command.canAddDomain ( ) ) ; org.junit.Assert.assertTrue ( "Import block Storage Domain should have failed due to empty Lun list returned from VGInfo " , command.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( EngineMessage.ACTION_TYPE_FAILED_PROBLEM_WITH_CANDIDATE_INFO.toString ( ) ) ) ; }
Source:
private void init ( ) { this . setIsAnimated ( TooltipConfig.IS_ANIMATED ) ; this . setPlacement ( TooltipConfig.PLACEMENT ) ; this . setIsHtml ( TooltipConfig.IS_HTML ) ; this . setTrigger ( TooltipConfig.TRIGGER ) ; this . setShowDelayMs ( TooltipConfig.SHOW_DELAY_MS ) ; this . setHideDelayMs ( TooltipConfig.HIDE_DELAY_MS ) ; this . setContainer ( TooltipConfig.CONTAINER ) ; }

Target:
public void setText ( java.lang.String text ) { java.lang.String nullSafeText = ( text == null ) ? "" : text ; setHtml ( com.google.gwt.safehtml.shared.SafeHtmlUtils.fromString ( nullSafeText ) ) ; }
Source:
private void addStyles ( ) { overrideIpTablesEditor.addContentWidgetContainerStyleName ( style.overrideIpStyle ( ) ) ; activateHostAfterInstallEditor.addContentWidgetContainerStyleName ( style.activateHostAfterInstallStyle ( ) ) ; publicKeyEditor.setCustomStyle ( style.pkStyle ( ) ) ; }

Target:
void initEditors ( ) { isoEditor = new org.ovirt.engine.ui.common.widget.editor.ListModelListBoxEditor < org.ovirt.engine.core.compat.RpmVersion > ( new org.ovirt.engine.ui.common.widget.renderer.NullSafeRenderer < org.ovirt.engine.core.compat.RpmVersion > ( ) { @ java.lang.Override public java.lang.String renderNullSafe ( org.ovirt.engine.core.compat.RpmVersion version ) { return version.getRpmName ( ) ; } } ) ; rbPassword = new com.google.gwt.user.client.ui.RadioButton ( "1" ) ; rbPublicKey = new com.google.gwt.user.client.ui.RadioButton ( "1" ) ; publicKeyEditor = new org.ovirt.engine.ui.common.widget.editor.generic.StringEntityModelTextAreaLabelEditor ( ) ; activateHostAfterInstallEditor = new org.ovirt.engine.ui.common.widget.editor.generic.EntityModelCheckBoxEditor ( org.ovirt.engine.ui.common.widget.Align.RIGHT ) ; overrideIpTablesEditor = new org.ovirt.engine.ui.common.widget.editor.generic.EntityModelCheckBoxEditor ( org.ovirt.engine.ui.common.widget.Align.RIGHT ) ; }
Source:
protected void verifyModel ( org.ovirt.engine.api.model.ExternalNetworkProviderConfiguration model , int index ) { org.junit.Assert.assertEquals ( org.ovirt.engine.api.restapi.utils.HexUtils.string2hex ( GUIDS [ index ] . toString ( ) ) , model.getId ( ) ) ; org.junit.Assert.assertEquals ( GUIDS [ ( index + 1 ) ] . toString ( ) , model.getHost ( ) . getId ( ) ) ; org.junit.Assert.assertEquals ( GUIDS [ index ] . toString ( ) , model.getExternalNetworkProvider ( ) . getId ( ) ) ; verifyLinks ( model ) ; }

Target:
protected void verifyModel ( org.ovirt.engine.api.model.ExternalNetworkProviderConfiguration model , int index ) { org.junit.jupiter.api.Assertions.assertEquals ( org.ovirt.engine.api.restapi.utils.HexUtils.string2hex ( GUIDS [ index ] . toString ( ) ) , model.getId ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( GUIDS [ ( index + 1 ) ] . toString ( ) , model.getHost ( ) . getId ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( GUIDS [ index ] . toString ( ) , model.getExternalNetworkProvider ( ) . getId ( ) ) ; verifyLinks ( model ) ; }
Source:
public void testGetAllMultiVmSearch ( ) throws java.lang.Exception { org.ovirt.engine.core.common.queries.SearchParameters searchParam = new org.ovirt.engine.core.common.queries.SearchParameters ( ( "VMs" + ( org.ovirt.engine.core.common.utils.CommonConstants.QUERY_RETURN_TYPE_SEPARATOR ) ) , org.ovirt.engine.core.common.interfaces.SearchType.VM ) ; org.ovirt.engine.core.bll.SearchQuery < org.ovirt.engine.core.common.queries.SearchParameters > searchQuery = spySearchQuery ( searchParam ) ; searchQuery.executeQueryCommand ( ) ; org.junit.Assert.assertEquals ( vmResultList , searchQuery.getQueryReturnValue ( ) . getReturnValue ( ) ) ; }

Target:
public void testGetAllMultiVmSearch ( ) throws java.lang.Exception { org.mockito.Mockito.when ( getQueryParameters ( ) . getSearchPattern ( ) ) . thenReturn ( ( "VMs" + ( org.ovirt.engine.core.common.utils.CommonConstants.QUERY_RETURN_TYPE_SEPARATOR ) ) ) ; org.mockito.Mockito.when ( getQueryParameters ( ) . getSearchTypeValue ( ) ) . thenReturn ( SearchType.VmTemplate ) ; getQuery ( ) . executeQueryCommand ( ) ; org.junit.Assert.assertEquals ( vmResultList , getQuery ( ) . getQueryReturnValue ( ) . getReturnValue ( ) ) ; }
Source:
public javax.ws.rs.core.Response preview ( org.ovirt.engine.api.model.Action action ) { org.ovirt.engine.core.common.action.TryBackToAllSnapshotsOfVmParameters tryBackParams = new org.ovirt.engine.core.common.action.TryBackToAllSnapshotsOfVmParameters ( parentId , guid ) ; javax.ws.rs.core.Response response = doAction ( VdcActionType.TryBackToAllSnapshotsOfVm , tryBackParams , action ) ; return response ; }

Target:
public javax.ws.rs.core.Response preview ( org.ovirt.engine.api.model.Action action ) { org.ovirt.engine.core.common.action.TryBackToAllSnapshotsOfVmParameters tryBackParams = new org.ovirt.engine.core.common.action.TryBackToAllSnapshotsOfVmParameters ( parentId , guid ) ; if ( action.isSetRestoreMemory ( ) ) { tryBackParams.setRestoreMemory ( action.isRestoreMemory ( ) ) ; } javax.ws.rs.core.Response response = doAction ( VdcActionType.TryBackToAllSnapshotsOfVm , tryBackParams , action ) ; return response ; }
Source:
private void getImageChildren ( org.ovirt.engine.core.compat.Guid snapshot , java.util.List < org.ovirt.engine.core.compat.Guid > children ) { java.util.List < org.ovirt.engine.core.compat.Guid > list = new java.util.ArrayList < org.ovirt.engine.core.compat.Guid > ( ) ; for ( org.ovirt.engine.core.common.businessentities.DiskImage image : org.ovirt.engine.core.bll.RemoveImageCommand.getDiskImageDao ( ) . getAllSnapshotsForParent ( snapshot ) ) { list.add ( image.getImageId ( ) ) ; } children.addAll ( list ) ; for ( org.ovirt.engine.core.compat.Guid snapshotId : list ) { getImageChildren ( snapshotId , children ) ; } }

Target:
private void getImageChildren ( org.ovirt.engine.core.compat.Guid snapshot , java.util.List < org.ovirt.engine.core.compat.Guid > children ) { java.util.List < org.ovirt.engine.core.compat.Guid > list = new java.util.ArrayList < org.ovirt.engine.core.compat.Guid > ( ) ; for ( org.ovirt.engine.core.common.businessentities.storage.DiskImage image : org.ovirt.engine.core.bll.RemoveImageCommand.getDiskImageDao ( ) . getAllSnapshotsForParent ( snapshot ) ) { list.add ( image.getImageId ( ) ) ; } children.addAll ( list ) ; for ( org.ovirt.engine.core.compat.Guid snapshotId : list ) { getImageChildren ( snapshotId , children ) ; } }
Source:
public void testDetachTemplateFromTag ( ) { dao.detachTemplateFromTag ( existingTemplateTag.getTagId ( ) , existingTemplateTag.getTemplateId ( ) ) ; org.ovirt.engine.core.common.businessentities.TagsTemplateMap result = dao.getTagTemplateByTagIdAndByTemplateId ( existingTemplateTag.getTagId ( ) , existingTemplateTag.getTemplateId ( ) ) ; org.junit.Assert.assertNull ( result ) ; }

Target:
public void testDetachTemplateFromTag ( ) { dao.detachTemplateFromTag ( existingTemplateTag.gettag_id ( ) , existingTemplateTag.gettemplate_id ( ) ) ; org.ovirt.engine.core.common.businessentities.TagsTemplateMap result = dao.getTagTemplateByTagIdAndByTemplateId ( existingTemplateTag.gettag_id ( ) , existingTemplateTag.gettemplate_id ( ) ) ; org.junit.Assert.assertNull ( result ) ; }
Source:
protected org.ovirt.engine.core.compat.Guid generateNewDiskId ( org.ovirt.engine.core.common.businessentities.DiskImage disk ) { org.ovirt.engine.core.compat.Guid newGuidForDisk = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; newDiskIdForDisk.put ( newGuidForDisk , org.ovirt.engine.core.common.businessentities.DiskImage.copyOf ( disk ) ) ; disk.setId ( newGuidForDisk ) ; disk.setImageId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; return newGuidForDisk ; }

Target:
protected void updateManagedDeviceMap ( org.ovirt.engine.core.common.businessentities.storage.DiskImage disk , java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.VmDevice > managedDeviceMap ) { org.ovirt.engine.core.compat.Guid oldDiskId = newDiskIdForDisk.get ( disk.getId ( ) ) . getId ( ) ; managedDeviceMap.put ( disk.getId ( ) , managedDeviceMap.get ( oldDiskId ) ) ; managedDeviceMap.remove ( oldDiskId ) ; }
Source:
protected void commonInitialize ( ) { priorityUtil = new org.ovirt.engine.ui.uicommonweb.models.vms.PriorityUtil ( getModel ( ) ) ; virtioScsiUtil = new org.ovirt.engine.ui.uicommonweb.models.vms.VirtioScsiUtil ( getModel ( ) ) ; getModel ( ) . getVmId ( ) . setIsAvailable ( false ) ; }

Target:
protected void commonInitialize ( ) { priorityUtil = new org.ovirt.engine.ui.uicommonweb.models.vms.PriorityUtil ( getModel ( ) ) ; virtioScsiUtil = new org.ovirt.engine.ui.uicommonweb.models.vms.VirtioScsiUtil ( getModel ( ) ) ; getModel ( ) . getVmId ( ) . setIsAvailable ( false ) ; getModel ( ) . getMigrationPolicies ( ) . setItems ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getMigrationPolicies ( ) ) ; }
Source:
public static void enableLoadBalancer ( ) { if ( org.ovirt.engine.core.common.config.Config.< java.lang.Boolean > getValue ( ConfigValues.EnableVdsLoadBalancing ) ) { org.ovirt.engine.core.bll.scheduling.SchedulingManager.log.info ( "Start scheduling to enable vds load balancer" ) ; org.ovirt.engine.core.utils.timer.SchedulerUtilQuartzImpl.getInstance ( ) . scheduleAFixedDelayJob ( org.ovirt.engine.core.bll.scheduling.SchedulingManager.instance , "performLoadBalancing" , new java.lang.Class [ ] { } , new java.lang.Object [ ] { } , org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( ConfigValues.VdsLoadBalancingIntervalInMinutes ) , org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( ConfigValues.VdsLoadBalancingIntervalInMinutes ) , java.util.concurrent.TimeUnit.MINUTES ) ; org.ovirt.engine.core.bll.scheduling.SchedulingManager.log.info ( "Finished scheduling to enable vds load balancer" ) ; } }

Target:
public void enableHaReservationCheck ( ) { if ( org.ovirt.engine.core.common.config.Config.< java.lang.Boolean > getValue ( ConfigValues.EnableVdsLoadBalancing ) ) { org.ovirt.engine.core.bll.scheduling.SchedulingManager.log.info ( "Start HA Reservation check" ) ; java.lang.Integer interval = org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( ConfigValues.VdsHaReservationIntervalInMinutes ) ; org.ovirt.engine.core.di.Injector.get ( org.ovirt.engine.core.utils.timer.SchedulerUtilQuartzImpl.class ) . scheduleAFixedDelayJob ( this , "performHaResevationCheck" , new java.lang.Class [ ] { } , new java.lang.Object [ ] { } , interval , interval , java.util.concurrent.TimeUnit.MINUTES ) ; org.ovirt.engine.core.bll.scheduling.SchedulingManager.log.info ( "Finished HA Reservation check" ) ; } }
Source:
public void getDataCenterMaxNameLength ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) . intValue ( ) : 1 ; } } ; getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.StoragePoolNameSizeLimit , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public void getRoleActionGroupsByRoleId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid roleId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ActionGroup > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ActionGroup > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetRoleActionGroupsByRoleId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( roleId ) , aQuery ) ; }
Source:
protected boolean canDoAction ( ) { if ( org.ovirt.engine.core.compat.Guid.isNullOrEmpty ( org.ovirt.engine.core.bll.hostdeploy.InstallVdsInternalCommand.getVdsId ( ) ) ) { return failCanDoAction ( VdcBllMessages.VDS_INVALID_SERVER_ID ) ; } if ( ( org.ovirt.engine.core.bll.hostdeploy.InstallVdsInternalCommand.getVds ( ) ) == null ) { return failCanDoAction ( VdcBllMessages.ACTION_TYPE_FAILED_HOST_NOT_EXIST ) ; } return true ; }

Target:
protected boolean canDoAction ( ) { if ( org.ovirt.engine.core.compat.Guid.isNullOrEmpty ( org.ovirt.engine.core.bll.hostdeploy.InstallVdsInternalCommand.getVdsId ( ) ) ) { return failCanDoAction ( EngineMessage.VDS_INVALID_SERVER_ID ) ; } if ( ( org.ovirt.engine.core.bll.hostdeploy.InstallVdsInternalCommand.getVds ( ) ) == null ) { return failCanDoAction ( EngineMessage.ACTION_TYPE_FAILED_HOST_NOT_EXIST ) ; } return true ; }
Source:
public void getVmTemplatesByBaseTemplateId ( org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery , org.ovirt.engine.core.compat.Guid baseTemplate ) { asyncQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmTemplate > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmTemplatesByBaseTemplateId , new org.ovirt.engine.core.common.queries.GetVmTemplateParameters ( baseTemplate ) , asyncQuery ) ; }

Target:
public void getHostNumaTopologyByHostId ( org.ovirt.engine.ui.frontend.AsyncQuery < java.util.List < org.ovirt.engine.core.common.businessentities.VdsNumaNode > > asyncQuery , org.ovirt.engine.core.compat.Guid hostId ) { asyncQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.ListConverter < > ( ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVdsNumaNodesByVdsId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( hostId ) , asyncQuery ) ; }
Source:
private java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > createHotPlugDiskToVmParameters ( boolean plug ) { java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > parametersList = new java.util.ArrayList < > ( ) ; org.ovirt.engine.core.common.businessentities.VM vm = getEntity ( ) ; for ( java.lang.Object item : getSelectedItems ( ) ) { org.ovirt.engine.core.common.businessentities.storage.Disk disk = ( ( org.ovirt.engine.core.common.businessentities.storage.Disk ) ( item ) ) ; disk.setPlugged ( plug ) ; parametersList.add ( new org.ovirt.engine.core.common.action.HotPlugDiskToVmParameters ( new org.ovirt.engine.core.common.businessentities.storage.DiskVmElement ( disk.getId ( ) , vm.getId ( ) ) ) ) ; } return parametersList ; }

Target:
private java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > createPlugOrUnplugParams ( boolean plug ) { java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > parametersList = new java.util.ArrayList < > ( ) ; org.ovirt.engine.core.common.businessentities.VM vm = getEntity ( ) ; for ( java.lang.Object item : getSelectedItems ( ) ) { org.ovirt.engine.core.common.businessentities.storage.Disk disk = ( ( org.ovirt.engine.core.common.businessentities.storage.Disk ) ( item ) ) ; disk.setPlugged ( plug ) ; parametersList.add ( new org.ovirt.engine.core.common.action.VmDiskOperationParameterBase ( new org.ovirt.engine.core.common.businessentities.storage.DiskVmElement ( disk.getId ( ) , vm.getId ( ) ) ) ) ; } return parametersList ; }
Source:
public java.lang.Object transform ( java.lang.Object input ) { return ( ( org.ovirt.engine.core.common.businessentities.VmTemplate ) ( input ) ) . getId ( ) ; }

Target:
public void testGetVmTemplatesByIds ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmTemplate > result = dao.getVmTemplatesByIds ( java.util.Arrays.asList ( org.ovirt.engine.core.dao.VmTemplateDaoTest.EXISTING_TEMPLATE_ID , org.ovirt.engine.core.dao.VmTemplateDaoTest.DELETABLE_TEMPLATE_ID ) ) ; org.junit.Assert.assertEquals ( "loaded templates list isn't in the expected size" , 2 , result.size ( ) ) ; java.util.Collection < org.ovirt.engine.core.compat.Guid > recieved = result.stream ( ) . map ( VmTemplate :: getId ) . collect ( java.util.stream.Collectors.toList ( ) ) ; org.junit.Assert.assertTrue ( "the received list didn't contain an expected Template" , recieved.contains ( org.ovirt.engine.core.dao.VmTemplateDaoTest.EXISTING_TEMPLATE_ID ) ) ; org.junit.Assert.assertTrue ( "the received list didn't contain an expected Template" , recieved.contains ( org.ovirt.engine.core.dao.VmTemplateDaoTest.DELETABLE_TEMPLATE_ID ) ) ; }
Source:
public static void getAllAttachableDisks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetAllAttachableDisks params = new org.ovirt.engine.core.common.queries.GetAllAttachableDisks ( storagePoolId ) ; params.setVmId ( vmId ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllAttachableDisks , params , aQuery ) ; }

Target:
public static void getVmSnapshotList ( 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 != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllVmSnapshotsByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
private org.ovirt.engine.core.bll.network.macpoolmanager.MacPoolManagerStrategy createPoolWithoutLocking ( org.ovirt.engine.core.common.businessentities.MacPool macPool ) { if ( macPools.containsKey ( macPool.getId ( ) ) ) { throw new java.lang.IllegalStateException ( org.ovirt.engine.core.bll.network.macpoolmanager.MacPoolPerDc.UNABLE_TO_CREATE_MAC_POOL_IT_ALREADY_EXIST ) ; } org.ovirt.engine.core.bll.network.macpoolmanager.MacPoolManagerStrategy poolForScope = new org.ovirt.engine.core.bll.network.macpoolmanager.MacPoolManagerRanges ( macPoolToRanges ( macPool ) , macPool.isAllowDuplicateMacAddresses ( ) ) ; macPools.put ( macPool.getId ( ) , poolForScope ) ; return poolForScope ; }

Target:
private org.ovirt.engine.core.bll.network.macpool.MacPool createPoolWithoutLocking ( org.ovirt.engine.core.bll.network.macpool.MacPool macPool ) { if ( macPools.containsKey ( macPool.getId ( ) ) ) { throw new java.lang.IllegalStateException ( org.ovirt.engine.core.bll.network.macpool.MacPoolPerDc.UNABLE_TO_CREATE_MAC_POOL_IT_ALREADY_EXIST ) ; } org.ovirt.engine.core.bll.network.macpool.MacPool poolForScope = new org.ovirt.engine.core.bll.network.macpool.MacPoolUsingRanges ( macPoolToRanges ( macPool ) , macPool.isAllowDuplicateMacAddresses ( ) ) ; macPools.put ( macPool.getId ( ) , poolForScope ) ; return poolForScope ; }
Source:
public void appendCustomValueAppendsWithNull ( ) { final org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase b = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.TestAuditLogableBase ( ) ; final java.lang.String key = "foo" ; final java.lang.String value = null ; final java.lang.String newVal = "bar" ; final java.lang.String sep = "_" ; b.addCustomValue ( key , value ) ; b.appendCustomValue ( key , newVal , sep ) ; final java.lang.String s = b.getCustomValue ( key ) ; org.junit.Assert.assertEquals ( ( ( value + sep ) + newVal ) , s ) ; }

Target:
public void appendCustomValueAppend ( ) { final java.lang.String key = "foo" ; final java.lang.String value = org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.NAME ; final java.lang.String newVal = "bar" ; final java.lang.String sep = "_" ; b.addCustomValue ( key , value ) ; b.appendCustomValue ( key , newVal , sep ) ; final java.lang.String s = b.getCustomValue ( key ) ; org.junit.Assert.assertEquals ( ( ( value + sep ) + newVal ) , s ) ; }
Source:
public void getHostsForStorageOperation ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , boolean localFsOnly ) { 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 source ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetHostsForStorageOperation , new org.ovirt.engine.core.common.queries.GetHostsForStorageOperationParameters ( storagePoolId , localFsOnly ) , aQuery ) ; }

Target:
public void countAllTemplates ( 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 ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmTemplateCount , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }
Source:
public void save ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment entity ) { verifyRelationWithHostNetworkQos ( entity ) ; verifyUnsetStoragePoolIdAndNameOnQos ( entity ) ; persistQosChanges ( entity ) ; super . save ( entity ) ; }

Target:
private void mapIpConfiguration ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment networkAttachment , org.springframework.jdbc.core.namedparam.MapSqlParameterSource mapper ) { final org.ovirt.engine.core.common.businessentities.network.IpConfiguration ipConfiguration = ( ( networkAttachment.getIpConfiguration ( ) ) == null ) ? new org.ovirt.engine.core.common.businessentities.network.IpConfiguration ( ) : networkAttachment.getIpConfiguration ( ) ; mapIpv4Configuration ( mapper , ipConfiguration ) ; mapIpv6Configuration ( mapper , ipConfiguration ) ; }
Source:
public static void getStorageDomainList ( 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.StorageDomain > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) ; } } ; org.ovirt.engine.core.common.queries.SearchParameters searchParams = new org.ovirt.engine.core.common.queries.SearchParameters ( "Storage:" , org.ovirt.engine.core.common.interfaces.SearchType.StorageDomain ) ; searchParams.setMaxCount ( 9999 ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.Search , searchParams , aQuery ) ; }

Target:
public static void getClusterDesktopMemoryOverCommit ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) . intValue ( ) : 0 ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.MaxVdsMemOverCommit , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
public static void getPermittedStorageDomainsByStoragePoolId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId , org.ovirt.engine.core.common.businessentities.ActionGroup actionGroup ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) ; } return source ; } } ; org.ovirt.engine.core.common.queries.GetPermittedStorageDomainsByStoragePoolIdParameters params = new org.ovirt.engine.core.common.queries.GetPermittedStorageDomainsByStoragePoolIdParameters ( ) ; params.setStoragePoolId ( dataCenterId ) ; params.setActionGroup ( actionGroup ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetPermittedStorageDomainsByStoragePoolId , params , aQuery ) ; }

Target:
public static void getVmsRunningOnOrMigratingToVds ( 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 ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmsRunningOnOrMigratingToVds , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
public void getStorageConnectionsByDataCenterIdAndStorageType ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.common.businessentities.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 ) ; }

Target:
public void getStorageConnectionsByDataCenterIdAndStorageType ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.common.businessentities.storage.StorageType storageType ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.core.common.queries.GetConnectionsByDataCenterAndStorageTypeParameters params = new org.ovirt.engine.core.common.queries.GetConnectionsByDataCenterAndStorageTypeParameters ( storagePoolId , storageType ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetConnectionsByDataCenterAndStorageType , params , aQuery ) ; }
Source:
public void save ( ) { org.ovirt.engine.core.common.businessentities.VmGuestAgentInterface guestAgentInterface = createVmGuestAgentInterface ( ) ; org.junit.Assert.assertFalse ( dao.getAllForVm ( org.ovirt.engine.core.dao.VmGuestAgentInterfaceDaoTest.EXISTING_VM_ID ) . contains ( guestAgentInterface ) ) ; dao.save ( guestAgentInterface ) ; org.junit.Assert.assertTrue ( dao.getAllForVm ( org.ovirt.engine.core.dao.VmGuestAgentInterfaceDaoTest.EXISTING_VM_ID ) . contains ( guestAgentInterface ) ) ; }

Target:
public void save ( ) { org.ovirt.engine.core.common.businessentities.VmGuestAgentInterface guestAgentInterface = createVmGuestAgentInterface ( ) ; org.junit.Assert.assertFalse ( dao.getAllForVm ( FixturesTool.VM_RHEL5_POOL_50 ) . contains ( guestAgentInterface ) ) ; dao.save ( guestAgentInterface ) ; org.junit.Assert.assertTrue ( dao.getAllForVm ( FixturesTool.VM_RHEL5_POOL_50 ) . contains ( guestAgentInterface ) ) ; }
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.VmCommand.getParameters ( ) . getVmId ( ) , org.ovirt.engine.core.common.VdcObjectType.VM , org.ovirt.engine.core.bll.VmCommand.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.VmCommand.getParameters ( ) . getVmId ( ) , org.ovirt.engine.core.common.VdcObjectType.VM , org.ovirt.engine.core.bll.VmCommand.getActionType ( ) . getActionGroup ( ) ) ) ; return permissionList ; }
Source:
public void testWarnOnActiveVmPositive ( ) { testWarnOnActiveVmInner ( true ) ; org.mockito.Mockito.verify ( mockAuditLogDirector ) . log ( auditLogableBaseCaptor.capture ( ) , org.mockito.Mockito.same ( AuditLogType.NETWORK_UPDATE_DISPLAY_FOR_CLUSTER_WITH_ACTIVE_VM ) ) ; final org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase actualLoggable = auditLogableBaseCaptor.getValue ( ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.bll.network.cluster.helper.DisplayNetworkClusterHelperTest.TEST_CLUSTER_ID , actualLoggable.getVdsGroupId ( ) ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.bll.network.cluster.helper.DisplayNetworkClusterHelperTest.TEST_NETWORK_NAME , actualLoggable.getCustomValue ( "networkname" ) ) ; }

Target:
public void testWarnOnActiveVmPositive ( ) { testWarnOnActiveVmInner ( true ) ; org.mockito.Mockito.verify ( mockAuditLogDirector ) . log ( auditLogableBaseCaptor.capture ( ) , org.mockito.Mockito.same ( AuditLogType.NETWORK_UPDATE_DISPLAY_FOR_CLUSTER_WITH_ACTIVE_VM ) ) ; final org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase actualLoggable = auditLogableBaseCaptor.getValue ( ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.bll.network.cluster.helper.DisplayNetworkClusterHelperTest.TEST_CLUSTER_ID , actualLoggable.getClusterId ( ) ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.bll.network.cluster.helper.DisplayNetworkClusterHelperTest.TEST_NETWORK_NAME , actualLoggable.getCustomValue ( "networkname" ) ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc monitorCommand ( java.lang.String vmId , java.lang.String monitorCommand ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "VM.monitorCommand" ) . withParameter ( "vmID" , vmId ) . withParameter ( "command" , monitorCommand ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( response ) ; }

Target:
public org.ovirt.engine.core.vdsbroker.irsbroker.StatusReturnForXmlRpc teardownImage ( java.lang.String spID , java.lang.String sdID , java.lang.String imageID , java.lang.String volumeID ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "Image.teardown" ) . withParameter ( "storagepoolID" , spID ) . withParameter ( "storagedomainID" , sdID ) . withParameter ( "imageID" , imageID ) . withParameter ( "leafVolID" , volumeID ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) ; return new org.ovirt.engine.core.vdsbroker.irsbroker.StatusReturnForXmlRpc ( response ) ; }
Source:
private static int setNetworkBootOrder ( java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > devices , int bootOrder ) { for ( org.ovirt.engine.core.common.businessentities.VmDevice device : devices ) { if ( org.ovirt.engine.core.common.utils.VmDeviceCommonUtils.isBridge ( device ) ) { if ( device.getIsPlugged ( ) ) { device.setBootOrder ( ( ++ bootOrder ) ) ; } } } return bootOrder ; }

Target:
private static java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > getPluggedInterfaces ( java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > devices ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > result = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmDevice > ( ) ; for ( org.ovirt.engine.core.common.businessentities.VmDevice device : devices ) { if ( ( org.ovirt.engine.core.common.utils.VmDeviceCommonUtils.isBridge ( device ) ) && ( device.getIsPlugged ( ) ) ) { result.add ( device ) ; } } return result ; }
Source:
private org.ovirt.engine.core.common.businessentities.DiskImage createNotVirtIODisk ( ) { org.ovirt.engine.core.common.businessentities.DiskImage disk = getDiskImage ( ) ; disk.setActive ( true ) ; disk.setDiskInterface ( DiskInterface.IDE ) ; org.mockito.Mockito.doReturn ( diskDao ) . when ( command ) . getDiskDao ( ) ; org.mockito.Mockito.when ( diskDao.get ( diskImageGuid ) ) . thenReturn ( disk ) ; org.mockito.Mockito.when ( osRepository.getDiskHotpluggableInterfaces ( org.mockito.Matchers.any ( java.lang.Integer.class ) , org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Version.class ) ) ) . thenReturn ( org.ovirt.engine.core.bll.HotPlugDiskToVmCommandTest.DISK_HOTPLUGGABLE_INTERFACES ) ; return disk ; }

Target:
private org.ovirt.engine.core.common.businessentities.DiskImage createNotVirtIODisk ( ) { org.ovirt.engine.core.common.businessentities.DiskImage disk = getDiskImage ( ) ; disk.setActive ( true ) ; disk.setDiskInterface ( DiskInterface.IDE ) ; org.mockito.Mockito.doReturn ( diskDao ) . when ( command ) . getDiskDao ( ) ; org.mockito.Mockito.when ( diskDao.get ( diskImageGuid ) ) . thenReturn ( disk ) ; org.mockito.Mockito.when ( osRepository.getDiskHotpluggableInterfaces ( org.mockito.Matchers.any ( java.lang.Integer.class ) , org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Version.class ) ) ) . thenReturn ( new java.util.HashSet < java.lang.String > ( org.ovirt.engine.core.bll.HotPlugDiskToVmCommandTest.DISK_HOTPLUGGABLE_INTERFACES ) ) ; return disk ; }
Source:
public void rerun ( ) { org.ovirt.engine.core.bll.MigrateVmCommand.setVm ( null ) ; determineMigrationFailureForAuditLog ( ) ; 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 ) ) ) { setVdsDestinationId ( null ) ; super . rerun ( ) ; } else { decreasePendingVms ( getDestinationVds ( ) . getId ( ) ) ; _isRerun = true ; org.ovirt.engine.core.bll.MigrateVmCommand.setSucceeded ( false ) ; org.ovirt.engine.core.bll.MigrateVmCommand.log ( ) ; failedToRunVm ( ) ; } }

Target:
protected void failedToMigrate ( ) { try { determineMigrationFailureForAuditLog ( ) ; _isRerun = false ; org.ovirt.engine.core.bll.MigrateVmCommand.setSucceeded ( false ) ; org.ovirt.engine.core.bll.MigrateVmCommand.log ( ) ; failedToRunVm ( ) ; } finally { org.ovirt.engine.core.bll.MigrateVmCommand.freeLock ( ) ; } }
Source:
public void getVmsFromExternalServer ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId , org.ovirt.engine.core.compat.Guid vdsId , java.lang.String url , java.lang.String username , java.lang.String password , org.ovirt.engine.core.common.businessentities.OriginType originType ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmsFromExternalProvider , new org.ovirt.engine.core.common.queries.GetVmsFromExternalProviderQueryParameters ( url , username , password , originType , vdsId , dataCenterId ) , aQuery ) ; }

Target:
public void getVmsFromExternalServer ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId , org.ovirt.engine.core.compat.Guid vdsId , java.lang.String url , java.lang.String username , java.lang.String password , org.ovirt.engine.core.common.businessentities.OriginType originType , java.util.List < java.lang.String > vmsToImport ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.ListConverter < > ( ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmsFromExternalProvider , new org.ovirt.engine.core.common.queries.GetVmsFromExternalProviderQueryParameters ( url , username , password , originType , vdsId , dataCenterId , vmsToImport ) , aQuery ) ; }