auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public org.ovirt.engine.core.common.businessentities.VmTemplate getVmTemplate ( ) { if ( ( ( vmTemplate ) == null ) && ( ( ( vmTemplateId ) != null ) || ( ( getVm ( ) ) != null ) ) ) { vmTemplate = getVmTemplateDao ( ) . get ( ( ( vmTemplateId ) != null ? getVmTemplateId ( ) : getVm ( ) . getVmtGuid ( ) ) ) ; } return vmTemplate ; }

Target:
public org.ovirt.engine.core.common.businessentities.VmTemplate getVmTemplate ( ) { if ( ( ( vmTemplate ) == null ) && ( ( ( vmTemplateId ) != null ) || ( ( getVm ( ) ) != null ) ) ) { vmTemplate = vmTemplateDao.get ( ( ( vmTemplateId ) != null ? getVmTemplateId ( ) : getVm ( ) . getVmtGuid ( ) ) ) ; } return vmTemplate ; }
Source:
public static void IsStorageDomainNameUnique ( 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 ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage_domains > storageDomains = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage_domains > ) ( source ) ) ; return storageDomains.isEmpty ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( org.ovirt.engine.core.compat.StringFormat.format ( "Storage: name=%1$s" , name ) , org.ovirt.engine.core.common.interfaces.SearchType.StorageDomain ) , aQuery ) ; }

Target:
public static void IsStorageDomainNameUnique ( 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 ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage_domains > storageDomains = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage_domains > ) ( source ) ) ; return storageDomains.isEmpty ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( ( "Storage: name=" + name ) , org.ovirt.engine.core.common.interfaces.SearchType.StorageDomain ) , aQuery ) ; }
Source:
protected boolean migrationInterfaceUp ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic , java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > nics ) { if ( org.ovirt.engine.core.utils.NetworkUtils.isVlan ( nic ) ) { java.lang.String physicalNic = nic.getBaseInterface ( ) ; for ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface : nics ) { if ( iface.getName ( ) . equals ( physicalNic ) ) { return ( iface.getStatistics ( ) . getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.network.InterfaceStatus.UP ) ; } } } return ( nic.getStatistics ( ) . getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.network.InterfaceStatus.UP ) ; }

Target:
protected boolean migrationInterfaceUp ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic , java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > nics ) { if ( org.ovirt.engine.core.common.utils.NetworkCommonUtils.isVlan ( nic ) ) { java.lang.String physicalNic = nic.getBaseInterface ( ) ; for ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface : nics ) { if ( iface.getName ( ) . equals ( physicalNic ) ) { return ( iface.getStatistics ( ) . getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.network.InterfaceStatus.UP ) ; } } } return ( nic.getStatistics ( ) . getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.network.InterfaceStatus.UP ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeGeoRepConfigListXmlRpc glusterVolumeGeoRepConfigList ( java.lang.String volumeName , java.lang.String slaveHost , java.lang.String slaveVolumeName ) { try { return new org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeGeoRepConfigListXmlRpc ( vdsServer.glusterVolumeGeoRepConfigList ( volumeName , slaveHost , slaveVolumeName ) ) ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }

Target:
public org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeGeoRepStatusDetailForXmlRpc glusterVolumeGeoRepSessionStatus ( java.lang.String volumeName , java.lang.String slaveHost , java.lang.String slaveVolumeName , java.lang.String userName ) { try { java.util.Map < java.lang.String , java.lang.Object > response = vdsServer.glusterVolumeGeoRepSessionStatus ( volumeName , slaveHost , slaveVolumeName , userName ) ; return new org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeGeoRepStatusDetailForXmlRpc ( response ) ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
protected org.ovirt.engine.api.model.GlusterBrick addParents ( org.ovirt.engine.api.model.GlusterBrick glusterBrick ) { org.ovirt.engine.api.model.GlusterVolume volume = new org.ovirt.engine.api.model.GlusterVolume ( ) ; volume.setId ( getVolumeId ( ) ) ; org.ovirt.engine.api.model.Cluster cluster = new org.ovirt.engine.api.model.Cluster ( ) ; cluster.setId ( getClusterId ( ) ) ; volume.setCluster ( cluster ) ; glusterBrick.setGlusterVolume ( volume ) ; return glusterBrick ; }

Target:
private org.ovirt.engine.api.model.GlusterBrick populateAdvancedDetails ( org.ovirt.engine.api.model.GlusterBrick model , org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity entity ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity volumeEntity = getEntity ( org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity.class , VdcQueryType.GetGlusterVolumeById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( entity.getVolumeId ( ) ) , null , true ) ; org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeAdvancedDetails detailsEntity = getEntity ( org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeAdvancedDetails.class , VdcQueryType.GetGlusterVolumeAdvancedDetails , new org.ovirt.engine.core.common.queries.gluster.GlusterVolumeAdvancedDetailsParameters ( volumeEntity.getClusterId ( ) , volumeEntity.getName ( ) , entity.getQualifiedName ( ) , true ) , null , true ) ; model = getMapper ( org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeAdvancedDetails.class , org.ovirt.engine.api.model.GlusterBrick.class ) . map ( detailsEntity , model ) ; return model ; }
Source:
public void invoke ( org.ovirt.engine.api.extensions.ExtMap context , java.util.Map < java.lang.String , java.lang.Object > args ) { context.mput ( Schema.InvokeKeys.ENTITY , Schema.Entities.GROUP ) . mput ( Schema.InvokeKeys.ENTITY_KEYS , new org.ovirt.engine.api.extensions.ExtMap ( ) . mput ( Schema.GroupIdentifiers.NAME , args.get ( "group" ) ) . mput ( Schema.SharedKeys.ADD_GROUP , context.get ( org.ovirt.engine.extension.aaa.jdbc.binding.cli.Cli.ContextKeys.POSITIONAL ) ) ) ; org.ovirt.engine.extension.aaa.jdbc.binding.cli.Cli.commands.get ( "_schema-modify" ) . invoke ( context ) ; context.putIfAbsent ( org.ovirt.engine.extension.aaa.jdbc.binding.cli.Cli.ContextKeys.EXIT_STATUS , org.ovirt.engine.extension.aaa.jdbc.binding.cli.Cli.SUCCESS ) ; }

Target:
public void invoke ( org.ovirt.engine.api.extensions.ExtMap context , java.util.Map < java.lang.String , java.lang.Object > args ) { if ( ! ( context.containsKey ( ContextKeys.EXIT_STATUS ) ) ) { context.put ( Schema.InvokeKeys.MODIFICATION_TYPE , Sql.ModificationTypes.DELETE ) ; context.put ( Schema.InvokeKeys.ENTITY_KEYS , new org.ovirt.engine.api.extensions.ExtMap ( ) . mput ( Schema.UserIdentifiers.USERNAME , context.get ( ContextKeys.POSITIONAL ) ) ) ; } if ( ! ( context.containsKey ( ContextKeys.EXIT_STATUS ) ) ) { org.ovirt.engine.extension.aaa.jdbc.binding.cli.Cli.commands.get ( "_schema-modify" ) . invoke ( context ) ; context.putIfAbsent ( ContextKeys.EXIT_STATUS , org.ovirt.engine.extension.aaa.jdbc.binding.cli.Cli.SUCCESS ) ; } }
Source:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { org.ovirt.engine.ui.uicommonweb.models.clusters.ManageGlusterSwiftModel innerGlusterSwiftModel = ( ( org.ovirt.engine.ui.uicommonweb.models.clusters.ManageGlusterSwiftModel ) ( result.getState ( ) ) ) ; innerGlusterSwiftModel.stopProgress ( ) ; if ( result.getReturnValue ( ) . getSucceeded ( ) ) { cancel ( ) ; updateGlusterDetails ( ) ; } }

Target:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendMultipleActionAsyncResult result ) { org.ovirt.engine.ui.uicommonweb.models.clusters.ManageGlusterSwiftModel innerGlusterSwiftModel = ( ( org.ovirt.engine.ui.uicommonweb.models.clusters.ManageGlusterSwiftModel ) ( result.getState ( ) ) ) ; innerGlusterSwiftModel.stopProgress ( ) ; for ( org.ovirt.engine.core.common.action.VdcReturnValueBase returnValueBase : result.getReturnValue ( ) ) { } cancel ( ) ; updateGlusterDetails ( ) ; }
Source:
void localize ( org.ovirt.engine.ui.userportal.ApplicationConstants constants ) { headerLabel.setText ( constants.loginHeaderLabel ( ) ) ; userNameEditor.setLabel ( constants.loginFormUserNameLabel ( ) ) ; passwordEditor.setLabel ( constants.loginFormPasswordLabel ( ) ) ; domainEditor.setLabel ( constants.loginFormDomainLabel ( ) ) ; connectAutomatically.setLabel ( constants.loginFormConnectAutomaticallyLabel ( ) ) ; loginButton.setText ( constants.loginButtonLabel ( ) ) ; }

Target:
private void addStyles ( ) { userNameEditor.hideLabel ( ) ; passwordEditor.hideLabel ( ) ; domainEditor.hideLabel ( ) ; }
Source:
protected void executeCommand ( ) { org.ovirt.engine.core.bll.storage.utils.VdsCommandsHelper.runVdsCommandWithFailover ( VDSCommandType.CopyVolumeData , new org.ovirt.engine.core.common.vdscommands.CopyVolumeDataVDSCommandParameters ( org.ovirt.engine.core.bll.storage.disk.image.CopyDataCommand.getParameters ( ) . getSrcInfo ( ) , org.ovirt.engine.core.bll.storage.disk.image.CopyDataCommand.getParameters ( ) . getDstInfo ( ) , org.ovirt.engine.core.bll.storage.disk.image.CopyDataCommand.getParameters ( ) . isCollapse ( ) ) , org.ovirt.engine.core.bll.storage.disk.image.CopyDataCommand.getParameters ( ) . getStoragePoolId ( ) , this ) ; org.ovirt.engine.core.bll.storage.disk.image.CopyDataCommand.setSucceeded ( true ) ; }

Target:
protected void executeCommand ( ) { org.ovirt.engine.core.bll.storage.utils.VdsCommandsHelper.runVdsCommandWithFailover ( VDSCommandType.CopyVolumeData , new org.ovirt.engine.core.common.vdscommands.CopyVolumeDataVDSCommandParameters ( org.ovirt.engine.core.bll.storage.disk.image.CopyDataCommand.getParameters ( ) . getStorageJobId ( ) , org.ovirt.engine.core.bll.storage.disk.image.CopyDataCommand.getParameters ( ) . getSrcInfo ( ) , org.ovirt.engine.core.bll.storage.disk.image.CopyDataCommand.getParameters ( ) . getDstInfo ( ) , org.ovirt.engine.core.bll.storage.disk.image.CopyDataCommand.getParameters ( ) . isCollapse ( ) ) , org.ovirt.engine.core.bll.storage.disk.image.CopyDataCommand.getParameters ( ) . getStoragePoolId ( ) , this ) ; org.ovirt.engine.core.bll.storage.disk.image.CopyDataCommand.setSucceeded ( true ) ; }
Source:
public 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.storage.Disk > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.Disk > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetAllAttachableDisksForVmQueryParameters params = new org.ovirt.engine.core.common.queries.GetAllAttachableDisksForVmQueryParameters ( storagePoolId ) ; params.setVmId ( vmId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllAttachableDisksForVm , params , aQuery ) ; }

Target:
public void getStorageDomainDefaultWipeAfterDelete ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.businessentities.storage.StorageType storageType ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean convert ( java.lang.Object returnValue , org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery ) { return ( ( java.lang.Boolean ) ( returnValue ) ) ; } } ; org.ovirt.engine.core.common.queries.GetStorageDomainDefaultWipeAfterDeleteParameters params = new org.ovirt.engine.core.common.queries.GetStorageDomainDefaultWipeAfterDeleteParameters ( storageType ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainDefaultWipeAfterDelete , params , aQuery ) ; }
Source:
protected org.ovirt.engine.ui.common.widget.uicommon.popup.vm.PopupWidgetConfigMap createWidgetConfiguration ( ) { return super . createWidgetConfiguration ( ) . putOne ( logicalNetworksEditorPanel , org.ovirt.engine.ui.common.widget.uicommon.popup.vm.PopupWidgetConfig.hiddenField ( ) ) . putAll ( poolSpecificFields ( ) , org.ovirt.engine.ui.common.widget.uicommon.popup.vm.PopupWidgetConfig.hiddenField ( ) ) . putOne ( templateEditor , org.ovirt.engine.ui.common.widget.uicommon.popup.vm.PopupWidgetConfig.hiddenField ( ) ) . putOne ( instanceTypesEditor , org.ovirt.engine.ui.common.widget.uicommon.popup.vm.PopupWidgetConfig.hiddenField ( ) ) . update ( resourceAllocationTab , org.ovirt.engine.ui.common.widget.uicommon.popup.vm.PopupWidgetConfig.hiddenField ( ) ) ; }

Target:
protected org.ovirt.engine.ui.common.widget.uicommon.popup.vm.PopupWidgetConfigMap createWidgetConfiguration ( ) { return super . createWidgetConfiguration ( ) . putOne ( logicalNetworksEditorPanel , org.ovirt.engine.ui.common.widget.uicommon.popup.vm.PopupWidgetConfig.hiddenField ( ) ) . putAll ( poolSpecificFields ( ) , org.ovirt.engine.ui.common.widget.uicommon.popup.vm.PopupWidgetConfig.hiddenField ( ) ) . putOne ( instanceTypesEditor , org.ovirt.engine.ui.common.widget.uicommon.popup.vm.PopupWidgetConfig.hiddenField ( ) ) . putOne ( templateWithVersionEditor , org.ovirt.engine.ui.common.widget.uicommon.popup.vm.PopupWidgetConfig.hiddenField ( ) ) . putAll ( resourceAllocationTemplateHiddenFields ( ) , org.ovirt.engine.ui.common.widget.uicommon.popup.vm.PopupWidgetConfig.hiddenField ( ) ) ; }
Source:
public javax.ws.rs.core.Response add ( org.ovirt.engine.api.model.Permission permission ) { validateParameters ( permission , ( isPrincipalSubCollection ( ) ? new java.lang.String [ ] { "role.id" , "dataCenter|cluster|host|storageDomain|vm|vmpool|template.id" } : new java.lang.String [ ] { "role.id" , "user|group.id" } ) ) ; org.ovirt.engine.core.common.businessentities.Permissions entity = map ( permission , getPermissionsTemplate ( permission ) ) ; return performCreate ( VdcActionType.AddPermission , getPrincipal ( entity , permission ) , new org.ovirt.engine.api.restapi.resource.QueryIdResolver < org.ovirt.engine.core.compat.Guid > ( org.ovirt.engine.core.common.queries.VdcQueryType.GetPermissionById , org.ovirt.engine.core.common.queries.IdQueryParameters.class ) ) ; }

Target:
public javax.ws.rs.core.Response add ( org.ovirt.engine.api.model.Permission permission ) { validateParameters ( permission , ( isPrincipalSubCollection ( ) ? new java.lang.String [ ] { "role.id" , "dataCenter|cluster|host|storageDomain|vm|vmpool|template.id" } : new java.lang.String [ ] { "role.id" , "user|group.id" } ) ) ; org.ovirt.engine.core.common.action.PermissionsOperationsParameters parameters = getParameters ( permission ) ; org.ovirt.engine.api.restapi.resource.QueryIdResolver < org.ovirt.engine.core.compat.Guid > resolver = new org.ovirt.engine.api.restapi.resource.QueryIdResolver ( org.ovirt.engine.core.common.queries.VdcQueryType.GetPermissionById , org.ovirt.engine.core.common.queries.IdQueryParameters.class ) ; return performCreate ( VdcActionType.AddPermission , parameters , resolver ) ; }
Source:
public void validateFailsOnSameServer ( ) { cmd = org.mockito.Mockito.spy ( createTestCommand ( volumeIdRepl , getBricks ( volumeIdRepl , 3 , true ) , 3 , 0 , false ) ) ; prepareMocks ( cmd ) ; org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity vol = getMultiBrickVolume ( volumeIdRepl , 3 ) ; vol.setVolumeType ( GlusterVolumeType.REPLICATE ) ; vol.setReplicaCount ( 3 ) ; org.mockito.Mockito.doReturn ( vol ) . when ( volumeDao ) . getById ( volumeIdRepl ) ; org.junit.Assert.assertFalse ( cmd.validate ( ) ) ; }

Target:
public void validateFailsOnSameServer ( ) { initTestCommand ( volumeIdRepl , getBricks ( volumeIdRepl , 3 , true ) , 3 , 0 , false ) ; org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity vol = getMultiBrickVolume ( volumeIdRepl , 3 ) ; vol.setVolumeType ( GlusterVolumeType.REPLICATE ) ; vol.setReplicaCount ( 3 ) ; org.mockito.Mockito.doReturn ( vol ) . when ( volumeDao ) . getById ( volumeIdRepl ) ; org.junit.Assert.assertFalse ( cmd.validate ( ) ) ; }
Source:
public static void IsTemplateNameUnique ( 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 ) { return source != null ? ! ( ( ( java.lang.Boolean ) ( source ) ) . booleanValue ( ) ) : false ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.IsVmTemlateWithSameNameExist , new org.ovirt.engine.core.common.queries.IsVmTemlateWithSameNameExistParameters ( name ) , aQuery ) ; }

Target:
public static void isTemplateNameUnique ( 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 ) { return source != null ? ! ( ( ( java.lang.Boolean ) ( source ) ) . booleanValue ( ) ) : false ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.IsVmTemlateWithSameNameExist , new org.ovirt.engine.core.common.queries.IsVmTemlateWithSameNameExistParameters ( name ) , aQuery ) ; }
Source:
public org.ovirt.engine.core.common.queries.VdcQueryReturnValue RunQuery ( org.ovirt.engine.core.common.queries.VdcQueryType search , org.ovirt.engine.core.common.queries.VdcQueryParametersBase searchParameters ) { org.ovirt.engine.ui.frontend.server.gwt.GenericApiGWTServiceImpl.log.debug ( "Server: RunQuery invoked!" ) ; debugQuery ( search , searchParameters ) ; searchParameters.setSessionId ( getSession ( ) . getId ( ) ) ; return getBackend ( ) . runQuery ( search , searchParameters ) ; }

Target:
public org.ovirt.engine.core.common.queries.VdcQueryReturnValue runQuery ( org.ovirt.engine.core.common.queries.VdcQueryType search , org.ovirt.engine.core.common.queries.VdcQueryParametersBase searchParameters ) { org.ovirt.engine.ui.frontend.server.gwt.GenericApiGWTServiceImpl.log.debug ( "Server: RunQuery invoked!" ) ; debugQuery ( search , searchParameters ) ; searchParameters.setSessionId ( getEngineSessionId ( ) ) ; return getBackend ( ) . runQuery ( search , searchParameters ) ; }
Source:
protected boolean validateImages ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > imagesToValidate = org.ovirt.engine.core.bll.ImagesHandler.filterImageDisks ( org.ovirt.engine.core.bll.RemoveSnapshotCommand.getDiskDao ( ) . getAllForVm ( org.ovirt.engine.core.bll.RemoveSnapshotCommand.getVmId ( ) ) , true , false , true ) ; org.ovirt.engine.core.bll.validator.DiskImagesValidator diskImagesValidator = new org.ovirt.engine.core.bll.validator.DiskImagesValidator ( imagesToValidate ) ; return ( validate ( diskImagesValidator.diskImagesNotLocked ( ) ) ) && ( validate ( diskImagesValidator.diskImagesNotIllegal ( ) ) ) ; }

Target:
protected boolean validateImages ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > imagesToValidate = org.ovirt.engine.core.bll.ImagesHandler.filterImageDisks ( org.ovirt.engine.core.bll.RemoveSnapshotCommand.getDiskDao ( ) . getAllForVm ( org.ovirt.engine.core.bll.RemoveSnapshotCommand.getVmId ( ) ) , true , false , true ) ; org.ovirt.engine.core.bll.validator.storage.DiskImagesValidator diskImagesValidator = new org.ovirt.engine.core.bll.validator.storage.DiskImagesValidator ( imagesToValidate ) ; return ( validate ( diskImagesValidator.diskImagesNotLocked ( ) ) ) && ( validate ( diskImagesValidator.diskImagesNotIllegal ( ) ) ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeGeoRepStatusForXmlRpc glusterVolumeGeoRepStatus ( ) { try { java.util.Map < java.lang.String , java.lang.Object > response = vdsServer.glusterVolumeGeoRepStatus ( ) ; return new org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeGeoRepStatusForXmlRpc ( response ) ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc glusterVolumeGeoRepSessionPause ( java.lang.String masterVolumeName , java.lang.String slaveHost , java.lang.String slaveVolumeName , java.lang.String userName , boolean force ) { try { return new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( vdsServer.glusterVolumeGeoRepSessionPause ( masterVolumeName , slaveHost , slaveVolumeName , userName , force ) ) ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
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 ) ) ) { setDestinationVdsId ( null ) ; super . rerun ( ) ; } else { org.ovirt.engine.core.bll.MigrateVmCommand.runningFailed ( ) ; _isRerun = true ; } }

Target:
protected void reexecuteCommand ( ) { setDestinationVdsId ( null ) ; super . reexecuteCommand ( ) ; }
Source:
private void initTable ( ) { initTableOverhead ( ) ; handleRadioButtonClick ( null ) ; getTable ( ) . addActionButton ( new org.ovirt.engine.ui.webadmin.widget.action.WebAdminButtonDefinition < org.ovirt.engine.core.common.utils.PairQueryable < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface , org.ovirt.engine.core.common.businessentities.VM > > ( constants.removeInterface ( ) ) { @ java.lang.Override protected org.ovirt.engine.ui.uicommonweb.UICommand resolveCommand ( ) { return getDetailModel ( ) . getRemoveCommand ( ) ; } } ) ; }

Target:
private void initTable ( ) { getTable ( ) . enableColumnResizing ( ) ; initTableOverhead ( ) ; handleRadioButtonClick ( null ) ; getTable ( ) . addActionButton ( new org.ovirt.engine.ui.webadmin.widget.action.WebAdminButtonDefinition < org.ovirt.engine.core.common.utils.PairQueryable < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface , org.ovirt.engine.core.common.businessentities.VM > > ( constants.removeInterface ( ) ) { @ java.lang.Override protected org.ovirt.engine.ui.uicommonweb.UICommand resolveCommand ( ) { return getDetailModel ( ) . getRemoveCommand ( ) ; } } ) ; }
Source:
protected boolean canDoAction ( ) { if ( ( ( org.ovirt.engine.core.bll.AddVmFromScratchCommand.getVdsGroup ( ) ) == null ) && ( Guid.Empty.equals ( super . getStorageDomainId ( ) ) ) ) { return failCanDoAction ( VdcBllMessages.VM_CLUSTER_IS_NOT_VALID ) ; } if ( ! ( org.ovirt.engine.core.bll.ImagesHandler.CheckImagesConfiguration ( getStorageDomainId ( ) , org.ovirt.engine.core.bll.AddVmFromScratchCommand.getParameters ( ) . getDiskInfoList ( ) , org.ovirt.engine.core.bll.AddVmFromScratchCommand.getReturnValue ( ) . getCanDoActionMessages ( ) ) ) ) { return false ; } return super . canDoAction ( ) ; }

Target:
protected boolean canDoAction ( ) { if ( ( ( org.ovirt.engine.core.bll.AddVmFromScratchCommand.getVdsGroup ( ) ) == null ) && ( Guid.Empty.equals ( super . getStorageDomainId ( ) ) ) ) { return failCanDoAction ( VdcBllMessages.VM_CLUSTER_IS_NOT_VALID ) ; } if ( ! ( org.ovirt.engine.core.bll.ImagesHandler.checkImagesConfiguration ( getStorageDomainId ( ) , org.ovirt.engine.core.bll.AddVmFromScratchCommand.getParameters ( ) . getDiskInfoList ( ) , org.ovirt.engine.core.bll.AddVmFromScratchCommand.getReturnValue ( ) . getCanDoActionMessages ( ) ) ) ) { return false ; } return super . canDoAction ( ) ; }
Source:
public void testSetStatusForRequiredNetworkAbsentOnHost ( ) { networkCluster.setStatus ( NetworkStatus.OPERATIONAL ) ; org.mockito.Mockito.when ( vdsStaticDao.checkIfExistsHostThatMissesNetworkInCluster ( org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelperTest.CLUSTER_ID , org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelperTest.NETWORK_NAME1 , VDSStatus.Up ) ) . thenReturn ( true ) ; underTest.setStatus ( org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelperTest.CLUSTER_ID , java.util.Collections.singletonList ( createNetwork ( org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelperTest.NETWORK_ID1 , org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelperTest.NETWORK_NAME1 ) ) ) ; org.mockito.Mockito.verify ( networkClusterDao ) . updateStatus ( org.mockito.ArgumentMatchers.same ( networkCluster ) ) ; org.junit.Assert.assertThat ( networkCluster.getStatus ( ) , org.hamcrest.Matchers.is ( NetworkStatus.NON_OPERATIONAL ) ) ; }

Target:
public void testSetStatusForRequiredNetworkAbsentOnHost ( ) { networkCluster.setStatus ( NetworkStatus.OPERATIONAL ) ; org.mockito.Mockito.when ( vdsStaticDao.checkIfExistsHostThatMissesNetworkInCluster ( org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelperTest.CLUSTER_ID , org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelperTest.NETWORK_NAME1 , VDSStatus.Up ) ) . thenReturn ( true ) ; underTest.setStatus ( org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelperTest.CLUSTER_ID , java.util.Collections.singletonList ( createNetwork ( org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelperTest.NETWORK_ID1 , org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelperTest.NETWORK_NAME1 ) ) ) ; org.mockito.Mockito.verify ( networkClusterDao ) . updateStatus ( org.mockito.ArgumentMatchers.same ( networkCluster ) ) ; org.hamcrest.MatcherAssert.assertThat ( networkCluster.getStatus ( ) , org.hamcrest.Matchers.is ( NetworkStatus.NON_OPERATIONAL ) ) ; }
Source:
public org.ovirt.engine.core.common.utils.Pair < java.util.List < org.ovirt.engine.core.compat.Guid > , org.ovirt.engine.core.compat.Guid > balance ( org.ovirt.engine.core.common.businessentities.VDSGroup cluster , java.util.List < org.ovirt.engine.core.common.businessentities.VDS > hosts , java.util.Map < java.lang.String , java.lang.String > parameters , java.util.ArrayList < java.lang.String > messages ) { org.ovirt.engine.core.bll.scheduling.PolicyUnitImpl.log.error ( ( ( "policy unit:" + ( getPolicyUnit ( ) . getName ( ) ) ) + "balance is not implemented" ) ) ; return null ; }

Target:
public org.ovirt.engine.core.common.utils.Pair < java.util.List < org.ovirt.engine.core.compat.Guid > , org.ovirt.engine.core.compat.Guid > balance ( org.ovirt.engine.core.common.businessentities.VDSGroup cluster , java.util.List < org.ovirt.engine.core.common.businessentities.VDS > hosts , java.util.Map < java.lang.String , java.lang.String > parameters , java.util.ArrayList < java.lang.String > messages ) { org.ovirt.engine.core.bll.scheduling.PolicyUnitImpl.log.error ( "Policy unit '{}' balance is not implemented" , getPolicyUnit ( ) . getName ( ) ) ; return null ; }
Source:
public void onSuccess ( java.lang.Object model1 , java.lang.Object result ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity > volumes = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity > ) ( result ) ) ; if ( ( volumes.size ( ) ) > 0 ) { clusterModel.getEnableGlusterService ( ) . setIsChangable ( false ) ; if ( ! isVirtGlusterAllowed ) { clusterModel.getEnableOvirtService ( ) . setIsChangable ( false ) ; } } }

Target:
public void onSuccess ( java.lang.Object model1 , java.lang.Object result ) { java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity > volumes = ( ( java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity > ) ( result ) ) ; if ( ( volumes.size ( ) ) > 0 ) { clusterModel.getEnableGlusterService ( ) . setIsChangeable ( false ) ; if ( ! isVirtGlusterAllowed ) { clusterModel.getEnableOvirtService ( ) . setIsChangeable ( false ) ; } } }
Source:
private void mockVm ( ) { org.ovirt.engine.core.common.businessentities.VM vm = new org.ovirt.engine.core.common.businessentities.VM ( ) ; vm.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; vm.setStatus ( VMStatus.Down ) ; vm.setStoragePoolId ( org.ovirt.engine.core.bll.RemoveSnapshotCommandTest.STORAGE_POOLD_ID ) ; vm.setVdsGroupCompatibilityVersion ( Version.v3_5 ) ; org.mockito.Mockito.doReturn ( vm ) . when ( cmd ) . getVm ( ) ; }

Target:
private void mockVm ( ) { org.ovirt.engine.core.common.businessentities.VM vm = new org.ovirt.engine.core.common.businessentities.VM ( ) ; vm.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; vm.setStatus ( VMStatus.Down ) ; vm.setStoragePoolId ( org.ovirt.engine.core.bll.RemoveSnapshotCommandTest.STORAGE_POOL_ID ) ; vm.setVdsGroupCompatibilityVersion ( Version.v3_5 ) ; org.mockito.Mockito.doReturn ( vm ) . when ( cmd ) . getVm ( ) ; }
Source:
public void executeCommand ( org.ovirt.engine.ui.uicommonweb.UICommand command ) { super . executeCommand ( command ) ; if ( "AddDisk" . equals ( command.getName ( ) ) ) { addDisk ( ) ; } if ( "Cancel" . equals ( command.getName ( ) ) ) { cancel ( ) ; } }

Target:
public void attachDisk ( ) { if ( ( getEntity ( ) ) == null ) { return ; } addDisk ( new org.ovirt.engine.ui.uicommonweb.models.vms.AttachDiskGuideModel ( this ) , org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getConstants ( ) . attachVirtualDiskTitle ( ) , HelpTag.attach_virtual_disk , "attach_virtual_disk" ) ; }
Source:
public void getClusterNetworkList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { if ( ( aQuery.converterCallback ) == null ) { 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.network.Network > ( ) ; } return source ; } } ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllNetworksByClusterId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( clusterId ) , aQuery ) ; }

Target:
public void getGlusterSwiftServerServices ( org.ovirt.engine.ui.frontend.AsyncQuery < java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterServerService > > aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.ListConverter < > ( ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterServerServicesByClusterId , new org.ovirt.engine.core.common.queries.gluster.GlusterServiceQueryParameters ( clusterId , org.ovirt.engine.core.common.businessentities.gluster.ServiceType.GLUSTER_SWIFT ) , aQuery ) ; }
Source:
private void buildVmGraphicsDevicesFromDb ( java.util.Map < java.lang.String , java.lang.Object > extraSpecParams ) { buildVmDevicesFromDb ( VmDeviceGeneralType.GRAPHICS , false , extraSpecParams ) ; java.lang.String legacyDisplay = deriveDisplayTypeLegacy ( ) ; if ( legacyDisplay != null ) { createInfo.put ( VdsProperties.display , legacyDisplay ) ; } }

Target:
private void buildVmGraphicsDevicesFromDb ( java.util.Map < java.lang.String , java.lang.Object > extraSpecParams ) { java.util.Comparator < org.ovirt.engine.core.common.businessentities.VmDevice > spiceLastDeviceComparator = java.util.Comparator.comparing ( VmDevice :: getDevice , org.ovirt.engine.core.utils.collections.ComparatorUtils.sortLast ( VmDeviceType.SPICE.getName ( ) ) ) ; buildVmDevicesFromDb ( VmDeviceGeneralType.GRAPHICS , false , extraSpecParams , spiceLastDeviceComparator ) ; java.lang.String legacyDisplay = deriveDisplayTypeLegacy ( ) ; if ( legacyDisplay != null ) { createInfo.put ( VdsProperties.display , legacyDisplay ) ; } }
Source:
protected org.ovirt.engine.core.bll.CpuFlagsManagerHandler getCpuFlagsManagerHandler ( ) { return cpuFlagsManagerHandler ; }

Target:
private java.util.List < org.ovirt.engine.core.common.businessentities.VDS > searchVDSsByDb ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VDS > data = genericSearch ( vdsDao , true ) ; for ( org.ovirt.engine.core.common.businessentities.VDS vds : data ) { vds.setCpuName ( cpuFlagsManagerHandler.findMaxServerCpuByFlags ( vds.getCpuFlags ( ) , vds.getClusterCompatibilityVersion ( ) ) ) ; } return data ; }
Source:
protected void proceedProxyReturnValue ( ) { org.ovirt.engine.core.common.errors.VdcBllErrors returnStatus = GetReturnValueFromStatus ( org.ovirt.engine.core.vdsbroker.irsbroker.UpdateVMVDSCommand.getReturnStatus ( ) ) ; switch ( returnStatus ) { case Done : return ; default : org.ovirt.engine.core.vdsbroker.vdsbroker.VDSExceptionBase outEx = createDefaultConcreteException ( org.ovirt.engine.core.vdsbroker.irsbroker.UpdateVMVDSCommand.getReturnStatus ( ) . mMessage ) ; initializeVdsError ( returnStatus ) ; outEx.setVdsError ( org.ovirt.engine.core.vdsbroker.irsbroker.UpdateVMVDSCommand.getVDSReturnValue ( ) . getVdsError ( ) ) ; throw outEx ; } }

Target:
protected void proceedProxyReturnValue ( ) { org.ovirt.engine.core.common.errors.VdcBllErrors returnStatus = getReturnValueFromStatus ( org.ovirt.engine.core.vdsbroker.irsbroker.UpdateVMVDSCommand.getReturnStatus ( ) ) ; switch ( returnStatus ) { case Done : return ; default : org.ovirt.engine.core.vdsbroker.vdsbroker.VDSExceptionBase outEx = createDefaultConcreteException ( org.ovirt.engine.core.vdsbroker.irsbroker.UpdateVMVDSCommand.getReturnStatus ( ) . mMessage ) ; initializeVdsError ( returnStatus ) ; outEx.setVdsError ( org.ovirt.engine.core.vdsbroker.irsbroker.UpdateVMVDSCommand.getVDSReturnValue ( ) . getVdsError ( ) ) ; throw outEx ; } }
Source:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > storageDomainList = ( ( java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > ) ( returnValue ) ) ; if ( ( storageDomainList.size ( ) ) != 0 ) { model.getStoragePoolType ( ) . setChangeProhibitionReason ( constants.cannotChangeRepositoryTypeWithSDAttached ( ) ) ; model.getStoragePoolType ( ) . setIsChangable ( false ) ; } }

Target:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > storageDomainList = ( ( java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > ) ( returnValue ) ) ; if ( ( storageDomainList.size ( ) ) != 0 ) { model.getStoragePoolType ( ) . setChangeProhibitionReason ( constants.cannotChangeRepositoryTypeWithSDAttached ( ) ) ; model.getStoragePoolType ( ) . setIsChangeable ( false ) ; } }
Source:
protected boolean isVirtioScsiEnabled ( ) { java.lang.Boolean virtioScsiEnabled = org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . isVirtioScsiEnabled ( ) ; boolean isOsSupportedForVirtIoScsi = org.ovirt.engine.core.bll.validator.VmValidationUtils.isDiskInterfaceSupportedByOs ( org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . getVm ( ) . getOs ( ) , org.ovirt.engine.core.bll.AddVmCommand.getVdsGroup ( ) . getCompatibilityVersion ( ) , DiskInterface.VirtIO_SCSI ) ; return virtioScsiEnabled != null ? virtioScsiEnabled : ( org.ovirt.engine.core.common.FeatureSupported.virtIoScsi ( org.ovirt.engine.core.bll.AddVmCommand.getVdsGroup ( ) . getCompatibilityVersion ( ) ) ) && isOsSupportedForVirtIoScsi ; }

Target:
protected boolean isVirtioScsiEnabled ( ) { java.lang.Boolean virtioScsiEnabled = org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . isVirtioScsiEnabled ( ) ; boolean isOsSupportedForVirtIoScsi = org.ovirt.engine.core.bll.validator.VmValidationUtils.isDiskInterfaceSupportedByOs ( org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . getVm ( ) . getOs ( ) , org.ovirt.engine.core.bll.AddVmCommand.getEffectiveCompatibilityVersion ( ) , DiskInterface.VirtIO_SCSI ) ; return virtioScsiEnabled != null ? virtioScsiEnabled : ( org.ovirt.engine.core.common.FeatureSupported.virtIoScsi ( org.ovirt.engine.core.bll.AddVmCommand.getEffectiveCompatibilityVersion ( ) ) ) && isOsSupportedForVirtIoScsi ; }
Source:
public void isConnWithSameDetailsExistNoConnections ( ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections newNFSConnection = createNFSConnection ( "multipass.my.domain.tlv.company.com:/export/allstorage/data2" , StorageType.NFS , NfsVersion.V4 , 300 , 0 ) ; java.util.List < org.ovirt.engine.core.common.businessentities.StorageServerConnections > connections = new java.util.ArrayList < > ( ) ; org.mockito.Mockito.when ( storageConnDao.getAllForStorage ( newNFSConnection.getConnection ( ) ) ) . thenReturn ( connections ) ; boolean isExists = command.isConnWithSameDetailsExists ( newNFSConnection , null ) ; org.junit.Assert.assertFalse ( isExists ) ; }

Target:
public void isConnWithSameDetailsExistNoConnections ( ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections newNFSConnection = createNFSConnection ( "multipass.my.domain.tlv.company.com:/export/allstorage/data2" , StorageType.NFS , NfsVersion.V4 , 300 , 0 ) ; java.util.List < org.ovirt.engine.core.common.businessentities.StorageServerConnections > connections = java.util.Collections.emptyList ( ) ; org.mockito.Mockito.when ( storageConnDao.getAllForStorage ( newNFSConnection.getConnection ( ) ) ) . thenReturn ( connections ) ; boolean isExists = command.isConnWithSameDetailsExists ( newNFSConnection , null ) ; org.junit.Assert.assertFalse ( isExists ) ; }
Source:
protected void updateDataProvider ( java.util.List < T > items ) { super . updateDataProvider ( items ) ; if ( ( selectedItems ) != null ) { super . setSelectedItems ( selectedItems ) ; } if ( ( dataChangeListener ) != null ) { dataChangeListener.onDataChange ( items ) ; } }

Target:
protected void retainSelectedItems ( ) { if ( ( selectedItems ) != null ) { super . setSelectedItems ( selectedItems ) ; } }
Source:
private void getVlanParentInterface ( org.ovirt.engine.core.compat.Guid vdsID , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface , 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.GetVlanParent , new org.ovirt.engine.core.common.queries.InterfaceAndIdQueryParameters ( vdsID , iface ) , aQuery ) ; }

Target:
public void getAllDataCenterNetworks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId ) { 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.network.Network > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.Network > ( ) ; } } ; org.ovirt.engine.core.common.queries.IdQueryParameters params = new org.ovirt.engine.core.common.queries.IdQueryParameters ( storagePoolId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetNetworksByDataCenterId , params , aQuery ) ; }
Source:
public void setUp ( ) { org.mockito.Mockito.when ( macPoolPerCluster.getMacPoolForCluster ( org.ovirt.engine.core.bll.network.vm.ValidateVmMacsQueryTest.CLUSTER_ID ) ) . thenReturn ( readMacPool ) ; org.mockito.Mockito.when ( vmMacsValidationsFactory.createVmMacsValidationList ( org.ovirt.engine.core.bll.network.vm.ValidateVmMacsQueryTest.CLUSTER_ID , readMacPool ) ) . thenReturn ( java.util.Collections.singletonList ( vmMacsValidation ) ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; org.mockito.Mockito.when ( macPoolPerCluster.getMacPoolForCluster ( org.ovirt.engine.core.bll.network.vm.ValidateVmMacsQueryTest.CLUSTER_ID ) ) . thenReturn ( readMacPool ) ; org.mockito.Mockito.when ( vmMacsValidationsFactory.createVmMacsValidationList ( org.ovirt.engine.core.bll.network.vm.ValidateVmMacsQueryTest.CLUSTER_ID , readMacPool ) ) . thenReturn ( java.util.Collections.singletonList ( vmMacsValidation ) ) ; org.mockito.Mockito.when ( getQueryParameters ( ) . getVmsByCluster ( ) ) . thenReturn ( vmsByCluster ) ; }
Source:
protected void alertIfFencingDisabled ( ) { if ( ! ( getVdsGroup ( ) . getFencingPolicy ( ) . isFencingEnabled ( ) ) ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase alb = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; alb.setVdsGroupId ( getVdsGroup ( ) . getId ( ) ) ; alb.setRepeatable ( true ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.log ( alb , AuditLogType.FENCE_DISABLED_IN_CLUSTER_POLICY ) ; } }

Target:
protected void alertIfFencingDisabled ( ) { if ( ! ( getVdsGroup ( ) . getFencingPolicy ( ) . isFencingEnabled ( ) ) ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase alb = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; alb.setVdsGroupId ( getVdsGroup ( ) . getId ( ) ) ; alb.setRepeatable ( true ) ; auditLogDirector.log ( alb , AuditLogType.FENCE_DISABLED_IN_CLUSTER_POLICY ) ; } }
Source:
private static java.util.List < org.ovirt.engine.core.common.businessentities.VDSGroup > createClusterList ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VDSGroup > clusters = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ( ) ; org.ovirt.engine.core.common.businessentities.VDSGroup cluster = new org.ovirt.engine.core.common.businessentities.VDSGroup ( ) ; cluster.setcompatibility_version ( org.ovirt.engine.core.bll.storage.UpdateStoragePoolCommandTest.VERSION_1_0 ) ; clusters.add ( cluster ) ; return clusters ; }

Target:
private static java.util.List < org.ovirt.engine.core.common.businessentities.VDSGroup > createClusterList ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VDSGroup > clusters = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ( ) ; org.ovirt.engine.core.common.businessentities.VDSGroup cluster = new org.ovirt.engine.core.common.businessentities.VDSGroup ( ) ; cluster.setcompatibility_version ( org.ovirt.engine.core.bll.storage.UpdateStoragePoolCommandTest.VERSION_1_0 ) ; cluster.setname ( "firstCluster" ) ; clusters.add ( cluster ) ; return clusters ; }
Source:
public void setDiskStorageType ( org.ovirt.engine.core.common.businessentities.storage.DiskStorageType diskStorageType ) { allButton.setValue ( ( diskStorageType == null ) ) ; imagesButton.setValue ( ( diskStorageType == ( org.ovirt.engine.core.common.businessentities.storage.DiskStorageType.IMAGE ) ) ) ; lunsButton.setValue ( ( diskStorageType == ( org.ovirt.engine.core.common.businessentities.storage.DiskStorageType.LUN ) ) ) ; }

Target:
public void setDiskStorageType ( org.ovirt.engine.core.common.businessentities.storage.DiskStorageType diskStorageType ) { allButton.setValue ( ( diskStorageType == null ) ) ; imagesButton.setValue ( ( diskStorageType == ( org.ovirt.engine.core.common.businessentities.storage.DiskStorageType.IMAGE ) ) ) ; lunsButton.setValue ( ( diskStorageType == ( org.ovirt.engine.core.common.businessentities.storage.DiskStorageType.LUN ) ) ) ; cinderButton.setValue ( ( diskStorageType == ( org.ovirt.engine.core.common.businessentities.storage.DiskStorageType.CINDER ) ) ) ; }
Source:
public org.ovirt.engine.ui.common.uicommon.model.SearchableDetailModelProvider < org.ovirt.engine.core.common.businessentities.Quota , org.ovirt.engine.ui.uicommonweb.models.datacenters.DataCenterListModel , org.ovirt.engine.ui.uicommonweb.models.datacenters.DataCenterQuotaListModel > getDataCenterQuotaListProvider ( org.ovirt.engine.ui.webadmin.gin.ClientGinjector ginjector ) { return new org.ovirt.engine.ui.common.uicommon.model.SearchableDetailTabModelProvider < org.ovirt.engine.core.common.businessentities.Quota , org.ovirt.engine.ui.uicommonweb.models.datacenters.DataCenterListModel , org.ovirt.engine.ui.uicommonweb.models.datacenters.DataCenterQuotaListModel > ( ginjector , org.ovirt.engine.ui.uicommonweb.models.datacenters.DataCenterListModel.class , org.ovirt.engine.ui.uicommonweb.models.datacenters.DataCenterQuotaListModel.class ) ; }

Target:
public org.ovirt.engine.ui.common.presenter.AbstractModelBoundPopupPresenterWidget < ? extends org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel , ? > getConfirmModelPopup ( org.ovirt.engine.ui.uicommonweb.models.datacenters.DataCenterQuotaListModel source , org.ovirt.engine.ui.uicommonweb.UICommand lastExecutedCommand ) { if ( lastExecutedCommand.equals ( getModel ( ) . getRemoveQuotaCommand ( ) ) ) { return removeConfirmPopupProvider.get ( ) ; } else { return super . getConfirmModelPopup ( source , lastExecutedCommand ) ; } }
Source:
private void fillVolumeInformation ( org.ovirt.engine.core.common.businessentities.DiskImage disk ) { org.ovirt.engine.core.common.businessentities.DiskImage ancestor = org.ovirt.engine.core.bll.CreateImageTemplateCommand.getDiskImageDao ( ) . getAncestor ( org.ovirt.engine.core.bll.CreateImageTemplateCommand.getDiskImage ( ) . getImageId ( ) ) ; if ( ancestor == null ) { log.warn ( "Can't find ancestor of Disk with ID '{}', using original disk for volume info." , org.ovirt.engine.core.bll.CreateImageTemplateCommand.getDiskImage ( ) . getImageId ( ) ) ; ancestor = org.ovirt.engine.core.bll.CreateImageTemplateCommand.getDiskImage ( ) ; } disk.setvolumeFormat ( ancestor.getVolumeFormat ( ) ) ; disk.setVolumeType ( ancestor.getVolumeType ( ) ) ; }

Target:
private void fillVolumeInformation ( org.ovirt.engine.core.common.businessentities.storage.DiskImage disk ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage ancestor = org.ovirt.engine.core.bll.CreateImageTemplateCommand.getDiskImageDao ( ) . getAncestor ( org.ovirt.engine.core.bll.CreateImageTemplateCommand.getDiskImage ( ) . getImageId ( ) ) ; if ( ancestor == null ) { log.warn ( "Can't find ancestor of Disk with ID '{}', using original disk for volume info." , org.ovirt.engine.core.bll.CreateImageTemplateCommand.getDiskImage ( ) . getImageId ( ) ) ; ancestor = org.ovirt.engine.core.bll.CreateImageTemplateCommand.getDiskImage ( ) ; } disk.setvolumeFormat ( ancestor.getVolumeFormat ( ) ) ; disk.setVolumeType ( ancestor.getVolumeType ( ) ) ; }