auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private void handleFinalizingFailure ( final org.ovirt.engine.core.bll.storage.disk.image.TransferImageCommand < T > . StateContext context ) { log.error ( "Finalizing failed transfer. {}" , getTransferDescription ( ) ) ; stopImageTransferSession ( context.entity ) ; if ( ! ( org.ovirt.engine.core.compat.Guid.isNullOrEmpty ( org.ovirt.engine.core.bll.storage.disk.image.TransferImageCommand.getParameters ( ) . getImageGroupID ( ) ) ) ) { setImageStatus ( ( ( org.ovirt.engine.core.bll.storage.disk.image.TransferImageCommand.getParameters ( ) . getTransferType ( ) ) == ( org.ovirt.engine.core.common.businessentities.storage.TransferType.Upload ) ? org.ovirt.engine.core.common.businessentities.storage.ImageStatus.ILLEGAL : org.ovirt.engine.core.common.businessentities.storage.ImageStatus.OK ) ) ; } updateEntityPhase ( ImageTransferPhase.FINISHED_FAILURE ) ; setAuditLogTypeFromPhase ( ImageTransferPhase.FINISHED_FAILURE ) ; }

Target:
private void handleFinalizingFailure ( final org.ovirt.engine.core.bll.storage.disk.image.TransferImageCommand < T > . StateContext context ) { log.error ( "Finalizing failed transfer. {}" , getTransferDescription ( ) ) ; stopImageTransferSession ( context.entity ) ; if ( ! ( org.ovirt.engine.core.compat.Guid.isNullOrEmpty ( org.ovirt.engine.core.bll.storage.disk.image.TransferImageCommand.getParameters ( ) . getImageGroupID ( ) ) ) ) { setImageStatus ( ( ( org.ovirt.engine.core.bll.storage.disk.image.TransferImageCommand.getParameters ( ) . getTransferType ( ) ) == ( org.ovirt.engine.core.common.businessentities.storage.TransferType.Upload ) ? org.ovirt.engine.core.common.businessentities.storage.ImageStatus.ILLEGAL : org.ovirt.engine.core.common.businessentities.storage.ImageStatus.OK ) ) ; } tearDownImage ( context.entity.getVdsId ( ) ) ; updateEntityPhase ( ImageTransferPhase.FINISHED_FAILURE ) ; setAuditLogTypeFromPhase ( ImageTransferPhase.FINISHED_FAILURE ) ; }
Source:
protected void updateHostPinning ( org.ovirt.engine.core.common.businessentities.MigrationSupport migrationSupport ) { getModel ( ) . getRunVMOnSpecificHost ( ) . setEntity ( false ) ; getModel ( ) . getDontMigrateVM ( ) . setEntity ( false ) ; switch ( migrationSupport ) { case PINNED_TO_HOST : getModel ( ) . getRunVMOnSpecificHost ( ) . setEntity ( true ) ; break ; case IMPLICITLY_NON_MIGRATABLE : getModel ( ) . getDontMigrateVM ( ) . setEntity ( true ) ; break ; } }

Target:
protected void updateHostPinning ( org.ovirt.engine.core.common.businessentities.MigrationSupport migrationSupport ) { getModel ( ) . setMigrationMode ( migrationSupport ) ; }
Source:
public org.ovirt.engine.core.common.businessentities.Disk mapRow ( java.sql.ResultSet rs , int rowNum ) throws java.sql.SQLException { org.ovirt.engine.core.common.businessentities.DiskImage disk = new org.ovirt.engine.core.common.businessentities.DiskImage ( ) ; disk.setDiskAlias ( rs.getString ( "disk_alias" ) ) ; disk.setSize ( rs.getLong ( "size" ) ) ; disk.setId ( getGuid ( rs , "disk_id" ) ) ; return disk ; }

Target:
public org.ovirt.engine.core.common.businessentities.storage.Disk mapRow ( java.sql.ResultSet rs , int rowNum ) throws java.sql.SQLException { org.ovirt.engine.core.common.businessentities.storage.DiskImage disk = new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ; disk.setDiskAlias ( rs.getString ( "disk_alias" ) ) ; disk.setSize ( rs.getLong ( "size" ) ) ; disk.setId ( getGuid ( rs , "disk_id" ) ) ; return disk ; }
Source:
public void setup ( ) { initVds ( ) ; initConditions ( ) ; updater = new org.ovirt.engine.core.vdsbroker.VdsUpdateRunTimeInfo ( null , vds , org.mockito.Mockito.mock ( org.ovirt.engine.core.vdsbroker.MonitoringStrategy.class ) ) { @ java.lang.Override public org.ovirt.engine.core.dal.dbbroker.DbFacade getDbFacade ( ) { return dbFacade ; } @ java.lang.Override protected void auditLog ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase auditLogable , org.ovirt.engine.core.common.AuditLogType logType ) { org.ovirt.engine.core.common.businessentities.AuditLog al = new org.ovirt.engine.core.common.businessentities.AuditLog ( ) ; al.setlog_type ( logType ) ; mockAuditLogDao.save ( al ) ; } @ java.lang.Override protected java.util.Map [ ] getVmInfo ( java.util.List < java.lang.String > vmsToUpdate ) { return vmInfo ; } } ; }

Target:
protected java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.vdsbroker.vdsbroker.entities.VmInternalData > getRunningVms ( ) { return runningVms ; }
Source:
public static void getDataCenterList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( "DataCenter: sortby name" , org.ovirt.engine.core.common.interfaces.SearchType.StoragePool ) , aQuery ) ; }

Target:
public static void getHostArchitecture ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter < org.ovirt.engine.core.common.businessentities.ArchitectureType > ( ) { @ java.lang.Override public org.ovirt.engine.core.common.businessentities.ArchitectureType Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return ( ( org.ovirt.engine.core.common.businessentities.ArchitectureType ) ( source ) ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetHostArchitecture , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
protected boolean validateQuota ( ) { getParameters ( ) . setQuotaId ( org.ovirt.engine.core.bll.QuotaHelper.getInstance ( ) . getQuotaIdToConsume ( getVm ( ) . getStaticData ( ) . getQuotaId ( ) , getStoragePool ( ) ) ) ; for ( org.ovirt.engine.core.common.businessentities.Disk dit : getVm ( ) . getDiskMap ( ) . values ( ) ) { ( ( org.ovirt.engine.core.common.businessentities.DiskImage ) ( dit ) ) . setQuotaId ( org.ovirt.engine.core.bll.QuotaHelper.getInstance ( ) . getQuotaIdToConsume ( getVm ( ) . getStaticData ( ) . getQuotaId ( ) , getStoragePool ( ) ) ) ; } return true ; }

Target:
public java.util.List < org.ovirt.engine.core.common.PermissionSubject > getPermissionCheckSubjects ( ) { java.util.List < org.ovirt.engine.core.common.PermissionSubject > permissionList = super . getPermissionCheckSubjects ( ) ; if ( ( ( getVm ( ) ) != null ) && ( ! ( org.apache.commons.lang.StringUtils.isEmpty ( getVm ( ) . getCustomProperties ( ) ) ) ) ) { permissionList.add ( new org.ovirt.engine.core.common.PermissionSubject ( getVm ( ) . getvds_group_id ( ) , org.ovirt.engine.core.common.VdcObjectType.VdsGroups , org.ovirt.engine.core.common.businessentities.ActionGroup.CHANGE_VM_CUSTOM_PROPERTIES ) ) ; } return permissionList ; }
Source:
private org.ovirt.engine.core.bll.ValidationResult validateCoherentNetworkIdentification ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment ) { org.ovirt.engine.core.compat.Guid networkId = attachment.getNetworkId ( ) ; java.lang.String networkName = attachment.getNetworkName ( ) ; org.ovirt.engine.core.compat.Guid violatingEntityId = attachment.getId ( ) ; return validateCoherentIdentification ( violatingEntityId , networkId , networkName , VdcBllMessages.NETWORK_ATTACHMENT_REFERENCES_NETWORK_INCOHERENTLY , networkBusinessEntityMap ) ; }

Target:
private org.ovirt.engine.core.bll.ValidationResult validateCoherentNetworkIdentification ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment ) { org.ovirt.engine.core.compat.Guid networkId = attachment.getNetworkId ( ) ; java.lang.String networkName = attachment.getNetworkName ( ) ; org.ovirt.engine.core.compat.Guid violatingEntityId = attachment.getId ( ) ; return validateCoherentIdentification ( violatingEntityId , networkId , networkName , EngineMessage.NETWORK_ATTACHMENT_REFERENCES_NETWORK_INCOHERENTLY , networkBusinessEntityMap ) ; }
Source:
public void testHotsetUpdateableWhenHotsetRequested ( ) { org.ovirt.engine.core.utils.ObjectIdentityChecker oic = new org.ovirt.engine.core.utils.ObjectIdentityChecker ( org.ovirt.engine.core.utils.Jedi.class ) ; oic.addHotsetFields ( "name" ) ; org.junit.Assert.assertTrue ( "hot set requested for hot set fields should be true" , oic.isFieldUpdatable ( null , "name" , null , true ) ) ; }

Target:
public void testHotsetUpdateableWhenHotsetRequestedAndStatusOtherThanHotSettable ( ) { org.ovirt.engine.core.utils.ObjectIdentityChecker oic = new org.ovirt.engine.core.utils.ObjectIdentityChecker ( org.ovirt.engine.core.utils.Jedi.class ) ; oic.addHotsetField ( "name" , java.util.EnumSet.of ( VMStatus.Up ) ) ; org.junit.Assert.assertFalse ( "hot set requested for hot set fields should be false in state other than Up" , oic.isFieldUpdatable ( null , "name" , null , true ) ) ; }
Source:
private void auditLogForNoMetadataDescriptionUpdate ( org.ovirt.engine.core.common.AuditLogType auditLogType , org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain , org.ovirt.engine.core.common.businessentities.DiskImage diskImage ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase auditLogableBase = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; auditLogableBase.addCustomValue ( "DataCenterName" , org.ovirt.engine.core.bll.UpdateVmDiskCommand.getStoragePool ( ) . getName ( ) ) ; auditLogableBase.addCustomValue ( "StorageDomainName" , storageDomain.getName ( ) ) ; auditLogableBase.addCustomValue ( "DiskName" , diskImage.getDiskAlias ( ) ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.log ( auditLogableBase , auditLogType ) ; }

Target:
private void auditLogForNoMetadataDescriptionUpdate ( org.ovirt.engine.core.common.AuditLogType auditLogType , org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain , org.ovirt.engine.core.common.businessentities.storage.DiskImage diskImage ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase auditLogableBase = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; auditLogableBase.addCustomValue ( "DataCenterName" , org.ovirt.engine.core.bll.UpdateVmDiskCommand.getStoragePool ( ) . getName ( ) ) ; auditLogableBase.addCustomValue ( "StorageDomainName" , storageDomain.getName ( ) ) ; auditLogableBase.addCustomValue ( "DiskName" , diskImage.getDiskAlias ( ) ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.log ( auditLogableBase , auditLogType ) ; }
Source:
public void disableVirtWhenVmsExist ( ) { createCommandWithGlusterEnabled ( ) ; org.mockito.Mockito.when ( vdsGroupDAO.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.createDefaultVdsGroup ( ) ) ; org.mockito.Mockito.when ( vdsGroupDAO.getByName ( org.mockito.Matchers.anyString ( ) ) ) . thenReturn ( org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.createDefaultVdsGroup ( ) ) ; org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.mcr.mockConfigValue ( ConfigValues.GlusterSupport , org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.VERSION_1_1 , java.lang.Boolean.TRUE ) ; cpuExists ( ) ; cpuFlagsNotMissing ( ) ; clusterHasVds ( ) ; clusterHasVMs ( ) ; canDoActionFailedWithReason ( VdcBllMessages.VDS_GROUP_CANNOT_DISABLE_VIRT_WHEN_CLUSTER_CONTAINS_VMS ) ; }

Target:
public void disableVirtWhenVmsExist ( ) { createCommandWithGlusterEnabled ( ) ; org.mockito.Mockito.when ( vdsGroupDAO.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.createDefaultVdsGroup ( ) ) ; org.mockito.Mockito.when ( vdsGroupDAO.getByName ( org.mockito.Matchers.anyString ( ) ) ) . thenReturn ( org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.createDefaultVdsGroup ( ) ) ; mcr.mockConfigValue ( ConfigValues.GlusterSupport , org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.VERSION_1_1 , java.lang.Boolean.TRUE ) ; cpuExists ( ) ; cpuFlagsNotMissing ( ) ; clusterHasVds ( ) ; clusterHasVMs ( ) ; canDoActionFailedWithReason ( VdcBllMessages.VDS_GROUP_CANNOT_DISABLE_VIRT_WHEN_CLUSTER_CONTAINS_VMS ) ; }
Source:
private void initFilter ( ) { org.mockito.Mockito.doNothing ( ) . when ( filter ) . updateDisksStorage ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.StorageDomain.class ) , org.mockito.Matchers.anyListOf ( org.ovirt.engine.core.common.businessentities.storage.DiskImage.class ) ) ; org.mockito.Mockito.doReturn ( storageDomainValidator ) . when ( filter ) . getStorageDomainValidator ( storageDomain ) ; }

Target:
private void initFilter ( ) { filter = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.memory.sdfilters.StorageDomainSpaceRequirementsFilter ( memoryDisks ) ) ; org.mockito.Mockito.doNothing ( ) . when ( filter ) . updateDisksStorage ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.StorageDomain.class ) , org.mockito.Matchers.anyListOf ( org.ovirt.engine.core.common.businessentities.storage.DiskImage.class ) ) ; org.mockito.Mockito.doReturn ( storageDomainValidator ) . when ( filter ) . getStorageDomainValidator ( storageDomain ) ; }
Source:
public void testCopyBySdId ( ) throws java.lang.Exception { setUpEntityQueryExpectations ( 1 ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.MoveOrCopyDisk , org.ovirt.engine.core.common.action.MoveOrCopyImageGroupParameters.class , new java.lang.String [ ] { "ImageId" , "SourceDomainId" , "StorageDomainId" , "Operation" } , new java.lang.Object [ ] { GUIDS [ 1 ] , org.ovirt.engine.core.compat.Guid.Empty , GUIDS [ 3 ] , org.ovirt.engine.core.common.businessentities.ImageOperation.Copy } ) ) ; verifyActionResponse ( resource.copy ( setUpCopyParams ( false ) ) ) ; }

Target:
public void testCopyBySdId ( ) throws java.lang.Exception { setUpEntityQueryExpectations ( VdcQueryType.GetDiskByDiskId , org.ovirt.engine.core.common.queries.GetDiskByDiskIdParameters.class , new java.lang.String [ ] { "DiskId" } , new java.lang.Object [ ] { GUIDS [ 1 ] } , getEntity ( 1 ) ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.MoveOrCopyDisk , org.ovirt.engine.core.common.action.MoveOrCopyImageGroupParameters.class , new java.lang.String [ ] { "ImageId" , "SourceDomainId" , "StorageDomainId" , "Operation" } , new java.lang.Object [ ] { GUIDS [ 1 ] , org.ovirt.engine.core.compat.Guid.Empty , GUIDS [ 3 ] , org.ovirt.engine.core.common.businessentities.ImageOperation.Copy } ) ) ; verifyActionResponse ( resource.copy ( setUpCopyParams ( false ) ) ) ; }
Source:
protected org.ovirt.engine.core.common.vdscommands.CreateVmVDSCommandParameters initCreateVmParams ( ) { org.ovirt.engine.core.common.vdscommands.CreateVmVDSCommandParameters createVmParams = super . initCreateVmParams ( ) ; createVmParams.getVm ( ) . setRunOnce ( true ) ; org.ovirt.engine.core.common.action.RunVmOnceParams runOnceParams = org.ovirt.engine.core.bll.RunVmOnceCommand.getParameters ( ) ; org.ovirt.engine.core.common.action.SysPrepParams sysPrepParams = new org.ovirt.engine.core.common.action.SysPrepParams ( ) ; sysPrepParams.setSysPrepDomainName ( runOnceParams.getSysPrepDomainName ( ) ) ; sysPrepParams.setSysPrepUserName ( runOnceParams.getSysPrepUserName ( ) ) ; sysPrepParams.setSysPrepPassword ( runOnceParams.getSysPrepPassword ( ) ) ; createVmParams.setSysPrepParams ( sysPrepParams ) ; createVmParams.setCloudInitParameters ( runOnceParams.getCloudInitParameters ( ) ) ; return createVmParams ; }

Target:
protected org.ovirt.engine.core.common.vdscommands.CreateVmVDSCommandParameters initCreateVmParams ( ) { org.ovirt.engine.core.common.vdscommands.CreateVmVDSCommandParameters createVmParams = super . initCreateVmParams ( ) ; createVmParams.getVm ( ) . setRunOnce ( true ) ; org.ovirt.engine.core.common.action.RunVmOnceParams runOnceParams = org.ovirt.engine.core.bll.RunVmOnceCommand.getParameters ( ) ; org.ovirt.engine.core.common.action.SysPrepParams sysPrepParams = new org.ovirt.engine.core.common.action.SysPrepParams ( ) ; sysPrepParams.setSysPrepDomainName ( runOnceParams.getSysPrepDomainName ( ) ) ; sysPrepParams.setSysPrepUserName ( runOnceParams.getSysPrepUserName ( ) ) ; sysPrepParams.setSysPrepPassword ( runOnceParams.getSysPrepPassword ( ) ) ; createVmParams.setSysPrepParams ( sysPrepParams ) ; createVmParams.setVmInit ( runOnceParams.getVmInit ( ) ) ; return createVmParams ; }
Source:
public void validateSucceedsWithStopActionTypeAndClusterId ( ) { cmd.getParameters ( ) . setActionType ( GlusterConstants.MANAGE_GLUSTER_SERVICE_ACTION_TYPE_STOP ) ; cmd.getParameters ( ) . setClusterId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; cmd.setClusterId ( cmd.getParameters ( ) . getClusterId ( ) ) ; prepareMocks ( ) ; org.junit.Assert.assertTrue ( cmd.validate ( ) ) ; }

Target:
public void validateSucceedsWithStopActionTypeAndClusterId ( ) { cmd.getParameters ( ) . setActionType ( GlusterConstants.MANAGE_GLUSTER_SERVICE_ACTION_TYPE_STOP ) ; cmd.getParameters ( ) . setClusterId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; cmd.setClusterId ( cmd.getParameters ( ) . getClusterId ( ) ) ; prepareMocks ( ) ; org.junit.jupiter.api.Assertions.assertTrue ( cmd.validate ( ) ) ; }
Source:
public void appendCustomValueAppendsWithNull ( ) { 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 appendCustomValueAppendsWithNull ( ) { 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.jupiter.api.Assertions.assertEquals ( ( ( value + sep ) + newVal ) , s ) ; }
Source:
protected void endWithFailure ( ) { setSucceeded ( org.ovirt.engine.core.bll.Backend.getInstance ( ) . endAction ( VdcActionType.RunVm , org.ovirt.engine.core.bll.AttachUserToVmFromPoolAndRunCommand.getParameters ( ) . getImagesParameters ( ) . get ( 0 ) , new org.ovirt.engine.core.bll.context.CommandContext ( org.ovirt.engine.core.bll.AttachUserToVmFromPoolAndRunCommand.getCompensationContext ( ) ) ) . getSucceeded ( ) ) ; if ( ! ( org.ovirt.engine.core.bll.AttachUserToVmFromPoolAndRunCommand.getSucceeded ( ) ) ) { log.warn ( "AttachUserToVmFromPoolAndRunCommand::EndWitFailure: endAction of RunVm Failed" ) ; } detachUserFromVmFromPool ( ) ; }

Target:
protected void endWithFailure ( ) { setSucceeded ( org.ovirt.engine.core.bll.Backend.getInstance ( ) . endAction ( VdcActionType.RunVm , org.ovirt.engine.core.bll.AttachUserToVmFromPoolAndRunCommand.getParameters ( ) . getImagesParameters ( ) . get ( 0 ) , org.ovirt.engine.core.bll.AttachUserToVmFromPoolAndRunCommand.dupContext ( ) . withExecutionContext ( null ) . withoutLock ( ) ) . getSucceeded ( ) ) ; if ( ! ( org.ovirt.engine.core.bll.AttachUserToVmFromPoolAndRunCommand.getSucceeded ( ) ) ) { log.warn ( "AttachUserToVmFromPoolAndRunCommand::EndWitFailure: endAction of RunVm Failed" ) ; } detachUserFromVmFromPool ( ) ; }
Source:
void localize ( ) { pathEditor.setLabel ( org.ovirt.engine.ui.webadmin.section.main.view.popup.storage.GlusterStorageView.constants.storagePopupPosixPathLabel ( ) ) ; pathExampleLabel.setText ( org.ovirt.engine.ui.webadmin.section.main.view.popup.storage.GlusterStorageView.constants.storagePopupGlusterPathExampleLabel ( ) ) ; vfsTypeEditor.setLabel ( org.ovirt.engine.ui.webadmin.section.main.view.popup.storage.GlusterStorageView.constants.storagePopupVfsTypeLabel ( ) ) ; mountOptionsEditor.setLabel ( org.ovirt.engine.ui.webadmin.section.main.view.popup.storage.GlusterStorageView.constants.storagePopupMountOptionsLabel ( ) ) ; }

Target:
void localize ( ) { pathEditor.setLabel ( org.ovirt.engine.ui.webadmin.section.main.view.popup.storage.GlusterStorageView.constants.storagePopupPosixPathLabel ( ) ) ; pathExampleLabel.setText ( org.ovirt.engine.ui.webadmin.section.main.view.popup.storage.GlusterStorageView.constants.storagePopupGlusterPathExampleLabel ( ) ) ; vfsTypeEditor.setLabel ( org.ovirt.engine.ui.webadmin.section.main.view.popup.storage.GlusterStorageView.constants.storagePopupVfsTypeLabel ( ) ) ; mountOptionsEditor.setLabel ( org.ovirt.engine.ui.webadmin.section.main.view.popup.storage.GlusterStorageView.constants.storagePopupMountOptionsLabel ( ) ) ; linkGlusterVolumeEditor.setLabel ( org.ovirt.engine.ui.webadmin.section.main.view.popup.storage.GlusterStorageView.constants.storagePopupLinkGlusterVolumeLabel ( ) ) ; glusterVolumesEditor.setLabel ( org.ovirt.engine.ui.webadmin.section.main.view.popup.storage.GlusterStorageView.constants.glusterVolume ( ) ) ; }
Source:
private void endChildCommand ( boolean succeeded ) { if ( ! ( org.ovirt.engine.core.bll.storage.ovfstore.CreateOvfVolumeForStorageDomainCommand.getParameters ( ) . getImagesParameters ( ) . isEmpty ( ) ) ) { org.ovirt.engine.core.common.action.ActionParametersBase childParams = org.ovirt.engine.core.bll.storage.ovfstore.CreateOvfVolumeForStorageDomainCommand.getParameters ( ) . getImagesParameters ( ) . get ( 0 ) ; childParams.setTaskGroupSuccess ( succeeded ) ; org.ovirt.engine.core.bll.storage.ovfstore.CreateOvfVolumeForStorageDomainCommand.getBackend ( ) . endAction ( childParams.getCommandType ( ) , childParams , org.ovirt.engine.core.bll.storage.ovfstore.CreateOvfVolumeForStorageDomainCommand.getContext ( ) . clone ( ) . withoutCompensationContext ( ) . withoutExecutionContext ( ) . withoutLock ( ) ) ; } }

Target:
private void endChildCommand ( boolean succeeded ) { if ( ! ( org.ovirt.engine.core.bll.storage.ovfstore.CreateOvfVolumeForStorageDomainCommand.getParameters ( ) . getImagesParameters ( ) . isEmpty ( ) ) ) { org.ovirt.engine.core.common.action.ActionParametersBase childParams = org.ovirt.engine.core.bll.storage.ovfstore.CreateOvfVolumeForStorageDomainCommand.getParameters ( ) . getImagesParameters ( ) . get ( 0 ) ; childParams.setTaskGroupSuccess ( succeeded ) ; backend.endAction ( childParams.getCommandType ( ) , childParams , org.ovirt.engine.core.bll.storage.ovfstore.CreateOvfVolumeForStorageDomainCommand.getContext ( ) . clone ( ) . withoutCompensationContext ( ) . withoutExecutionContext ( ) . withoutLock ( ) ) ; } }
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 getClusterNetworkList ( org.ovirt.engine.ui.frontend.AsyncQuery < java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > > aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { if ( ( aQuery.converterCallback ) == null ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.ListConverter < > ( ) ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllNetworksByClusterId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( clusterId ) , aQuery ) ; }
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 getDataCenterById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStoragePoolById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) . withoutRefresh ( ) , aQuery ) ; }
Source:
public void save ( org.ovirt.engine.core.common.businessentities.Permissions permission ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "ad_element_id" , permission.getad_element_id ( ) ) . addValue ( "id" , permission.getId ( ) ) . addValue ( "role_id" , permission.getrole_id ( ) ) . addValue ( "object_id" , permission.getObjectId ( ) ) . addValue ( "object_type_id" , permission.getObjectType ( ) . getValue ( ) ) ; getCallsHandler ( ) . executeModification ( "InsertPermission" , parameterSource ) ; }

Target:
public void save ( org.ovirt.engine.core.common.businessentities.Permission permission ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "ad_element_id" , permission.getAdElementId ( ) ) . addValue ( "id" , permission.getId ( ) ) . addValue ( "role_id" , permission.getRoleId ( ) ) . addValue ( "object_id" , permission.getObjectId ( ) ) . addValue ( "object_type_id" , permission.getObjectType ( ) . getValue ( ) ) ; getCallsHandler ( ) . executeModification ( "InsertPermission" , parameterSource ) ; }
Source:
private void endVmRelatedOps ( ) { org.ovirt.engine.core.bll.ImportVmCommand.setVm ( null ) ; if ( ( getVm ( ) ) != null ) { org.ovirt.engine.core.bll.VmHandler.UnLockVm ( getVm ( ) ) ; } else { org.ovirt.engine.core.bll.ImportVmCommand.setCommandShouldBeLogged ( false ) ; org.ovirt.engine.core.bll.ImportVmCommand.log.warn ( "ImportVmCommand::EndImportCommand: Vm is null - not performing full EndAction" ) ; } }

Target:
private void endVmRelatedOps ( ) { org.ovirt.engine.core.bll.ImportVmCommand.setVm ( null ) ; if ( ( getVm ( ) ) != null ) { org.ovirt.engine.core.bll.VmHandler.unLockVm ( getVm ( ) ) ; } else { org.ovirt.engine.core.bll.ImportVmCommand.setCommandShouldBeLogged ( false ) ; org.ovirt.engine.core.bll.ImportVmCommand.log.warn ( "ImportVmCommand::EndImportCommand: Vm is null - not performing full endAction" ) ; } }
Source:
protected void updateOldImageAsActive ( org.ovirt.engine.core.common.businessentities.Snapshot.SnapshotType snapshotType , boolean active ) { org.ovirt.engine.core.compat.Guid oldImageId = findImageForSameDrive ( snapshotType ) ; if ( oldImageId == null ) { log.error ( "Can't find image to update to active '{}', snapshot type '{}', original image id '{}'" , active , snapshotType , getImageId ( ) ) ; return ; } org.ovirt.engine.core.common.businessentities.storage.DiskImage oldImage = org.ovirt.engine.core.bll.storage.disk.image.BaseImagesCommand.getDiskImageDao ( ) . getSnapshotById ( oldImageId ) ; oldImage.setActive ( active ) ; org.ovirt.engine.core.bll.storage.disk.image.BaseImagesCommand.getImageDao ( ) . update ( oldImage.getImage ( ) ) ; }

Target:
protected void updateOldImageAsActive ( org.ovirt.engine.core.common.businessentities.Snapshot.SnapshotType snapshotType , boolean active ) { org.ovirt.engine.core.compat.Guid oldImageId = findImageForSameDrive ( snapshotType ) ; if ( oldImageId == null ) { log.error ( "Can't find image to update to active '{}', snapshot type '{}', original image id '{}'" , active , snapshotType , getImageId ( ) ) ; return ; } org.ovirt.engine.core.common.businessentities.storage.DiskImage oldImage = diskImageDao.getSnapshotById ( oldImageId ) ; oldImage.setActive ( active ) ; org.ovirt.engine.core.bll.storage.disk.image.BaseImagesCommand.getImageDao ( ) . update ( oldImage.getImage ( ) ) ; }
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.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterHookById , new org.ovirt.engine.core.common.queries.gluster.GlusterHookQueryParameters ( hookId , includeServerHooks ) , aQuery ) ; }

Target:
public void getClusterGlusterServices ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { 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.gluster.GlusterVolumeAdvancedDetailsParameters parameters = new org.ovirt.engine.core.common.queries.gluster.GlusterVolumeAdvancedDetailsParameters ( clusterId , null , null , false ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterVolumeAdvancedDetails , parameters , aQuery ) ; }
Source:
public void testIpConfiguredForStaticBootProtocolWhenIpConfigurationIsNotNullAndBootProtocolIsStaticAndAddressIsEmpty ( ) throws java.lang.Exception { doTestIpConfiguredForStaticBootProtocol ( "" , "255.255.255.0" ) ; }

Target:
public void testNetworkExistWhenBothNetworkNameAndNetworkIdAreSet ( ) { org.ovirt.engine.core.common.businessentities.network.NetworkAttachment networkAttachment = new org.ovirt.engine.core.common.businessentities.network.NetworkAttachment ( ) ; networkAttachment.setNetworkName ( "network" ) ; networkAttachment.setNetworkId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; org.junit.Assert.assertThat ( createNetworkAttachmentValidator ( networkAttachment ) . networkExists ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }
Source:
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.RunQuery ( VdcQueryType.GetVmsRunningOnOrMigratingToVds , new org.ovirt.engine.core.common.queries.GetVmsRunningOnOrMigratingToVdsParameters ( id ) , aQuery ) ; }

Target:
public static void getStorageDomainMaxNameLength ( 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 ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.StorageDomainNameSizeLimit , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
private void addNonDefaultClusterToPool ( ) { org.ovirt.engine.core.common.businessentities.VDSGroup defaultCluster = new org.ovirt.engine.core.common.businessentities.VDSGroup ( ) ; defaultCluster.setcompatibility_version ( org.ovirt.engine.core.bll.storage.UpdateStoragePoolCommandTest.VERSION_1_1 ) ; defaultCluster.setId ( org.ovirt.engine.core.bll.storage.UpdateStoragePoolCommandTest.NON_DEFAULT_VDS_GROUP_ID ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VDSGroup > clusters = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ( ) ; clusters.add ( defaultCluster ) ; org.mockito.Mockito.when ( vdsGroupDao.getAllForStoragePool ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( clusters ) ; }

Target:
private static org.ovirt.engine.core.common.businessentities.StoragePool createNewStoragePool ( ) { org.ovirt.engine.core.common.businessentities.StoragePool pool = org.ovirt.engine.core.bll.storage.UpdateStoragePoolCommandTest.createBasicPool ( ) ; pool.setIsLocal ( false ) ; pool.setCompatibilityVersion ( org.ovirt.engine.core.bll.storage.UpdateStoragePoolCommandTest.VERSION_1_1 ) ; return pool ; }
Source:
private java.lang.String getOptions ( org.ovirt.engine.core.common.businessentities.FenceAgent agent ) { org.ovirt.engine.core.common.businessentities.ArchitectureType architectureType = org.ovirt.engine.core.bll.VdsArchitectureHelper.getArchitecture ( _vds.getStaticData ( ) ) ; java.lang.String managementOptions = org.ovirt.engine.core.utils.pm.VdsFenceOptions.getDefaultAgentOptions ( agent.getType ( ) , agent.getOptions ( ) , architectureType ) ; return managementOptions ; }

Target:
private java.lang.String getOptions ( org.ovirt.engine.core.common.businessentities.FenceAgent agent ) { org.ovirt.engine.core.common.businessentities.ArchitectureType architectureType = architectureHelper.getArchitecture ( _vds.getStaticData ( ) ) ; java.lang.String managementOptions = org.ovirt.engine.core.utils.pm.VdsFenceOptions.getDefaultAgentOptions ( agent.getType ( ) , ( ( agent.getOptions ( ) ) == null ? "" : agent.getOptions ( ) ) , architectureType ) ; return managementOptions ; }
Source:
public void validateNoDirectLunIdAndValidStoragePoolId ( ) { org.ovirt.engine.core.common.businessentities.StoragePool storagePool = new org.ovirt.engine.core.common.businessentities.StoragePool ( ) ; storagePool.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; org.mockito.Mockito.when ( storagePoolDao.get ( storagePool.getId ( ) ) ) . thenReturn ( storagePool ) ; setStoragePoolId ( storagePool.getId ( ) ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateSuccess ( command ) ; }

Target:
public void validateNoDirectLunIdAndValidStoragePool ( ) { org.mockito.Mockito.doReturn ( true ) . when ( command ) . validateStoragePool ( ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateSuccess ( command ) ; }
Source:
public static void getGlusterVolumeOptionInfoList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetGlusterVolumeOptionsInfo , new org.ovirt.engine.core.common.queries.gluster.GlusterParameters ( clusterId ) , aQuery ) ; }

Target:
public static void getDataCenterById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStoragePoolById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) , aQuery ) ; }
Source:
public void validateSucceedsWithStopActionTypeAndClusterId ( ) { org.ovirt.engine.core.common.action.gluster.GlusterServiceParameters params = new org.ovirt.engine.core.common.action.gluster.GlusterServiceParameters ( ) ; params.setActionType ( GlusterConstants.MANAGE_GLUSTER_SERVICE_ACTION_TYPE_STOP ) ; params.setClusterId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.gluster.ManageGlusterServiceCommand ( params , null ) ) ; prepareMocks ( cmd ) ; org.junit.Assert.assertTrue ( cmd.validate ( ) ) ; }

Target:
public void validateSucceedsWithStopActionTypeAndClusterIdAndServerId ( ) { cmd.getParameters ( ) . setActionType ( GlusterConstants.MANAGE_GLUSTER_SERVICE_ACTION_TYPE_STOP ) ; cmd.getParameters ( ) . setClusterId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; cmd.getParameters ( ) . setServerId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; cmd.setClusterId ( cmd.getParameters ( ) . getClusterId ( ) ) ; cmd.setVdsId ( cmd.getParameters ( ) . getServerId ( ) ) ; prepareMocks ( cmd ) ; org.junit.Assert.assertTrue ( cmd.validate ( ) ) ; }
Source:
private javax.ws.rs.core.Response attachDiskToVm ( org.ovirt.engine.api.model.Disk disk ) { boolean isDiskActive = ( disk.isSetActive ( ) ) ? disk.isActive ( ) : false ; org.ovirt.engine.core.common.action.AttachDettachVmDiskParameters params = new org.ovirt.engine.core.common.action.AttachDettachVmDiskParameters ( parentId , org.ovirt.engine.core.compat.Guid.createGuidFromString ( disk.getId ( ) ) , isDiskActive ) ; return performAction ( VdcActionType.AttachDiskToVm , params ) ; }

Target:
private javax.ws.rs.core.Response attachDiskToVm ( org.ovirt.engine.api.model.Disk disk ) { boolean isDiskActive = ( disk.isSetActive ( ) ) ? disk.isActive ( ) : false ; org.ovirt.engine.core.common.action.AttachDettachVmDiskParameters params = new org.ovirt.engine.core.common.action.AttachDettachVmDiskParameters ( parentId , org.ovirt.engine.core.compat.Guid.createGuidFromStringDefaultEmpty ( disk.getId ( ) ) , isDiskActive ) ; return performAction ( VdcActionType.AttachDiskToVm , params ) ; }
Source:
protected boolean canDoAction ( ) { if ( ! ( super . canDoAction ( ) ) ) { return false ; } upServer = getUpServer ( ) ; if ( ( upServer ) == null ) { addCanDoActionMessageVariable ( "clusterName" , org.ovirt.engine.core.bll.gluster.GlusterCommandBase.getVdsGroup ( ) . getName ( ) ) ; addCanDoActionMessage ( VdcBllMessages.ACTION_TYPE_FAILED_NO_UP_SERVER_FOUND ) ; return false ; } return true ; }

Target:
protected boolean canDoAction ( ) { if ( ! ( super . canDoAction ( ) ) ) { return false ; } upServer = getUpServer ( ) ; if ( ( upServer ) == null ) { addCanDoActionMessageVariable ( "clusterName" , org.ovirt.engine.core.bll.gluster.GlusterCommandBase.getVdsGroup ( ) . getName ( ) ) ; addCanDoActionMessage ( EngineMessage.ACTION_TYPE_FAILED_NO_UP_SERVER_FOUND ) ; return false ; } return true ; }
Source:
public static void GetVmNicList ( 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 ? new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ) ( source ) ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmInterfacesByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , 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.RunQuery ( VdcQueryType.GetVmsRunningOnOrMigratingToVds , new org.ovirt.engine.core.common.queries.GetVmsRunningOnOrMigratingToVdsParameters ( id ) , aQuery ) ; }
Source:
public void executeCommand ( org.ovirt.engine.ui.uicommonweb.UICommand command ) { super . executeCommand ( command ) ; if ( command == ( getRemoveCommand ( ) ) ) { Remove ( ) ; } else if ( org.ovirt.engine.core.compat.StringHelper.stringsEqual ( command.getName ( ) , "Cancel" ) ) { Cancel ( ) ; } else if ( org.ovirt.engine.core.compat.StringHelper.stringsEqual ( command.getName ( ) , "OnRemove" ) ) { OnRemove ( ) ; } }

Target:
public void executeCommand ( org.ovirt.engine.ui.uicommonweb.UICommand command ) { super . executeCommand ( command ) ; if ( command == ( getRemoveCommand ( ) ) ) { remove ( ) ; } else if ( org.ovirt.engine.core.compat.StringHelper.stringsEqual ( command.getName ( ) , "Cancel" ) ) { cancel ( ) ; } else if ( org.ovirt.engine.core.compat.StringHelper.stringsEqual ( command.getName ( ) , "OnRemove" ) ) { onRemove ( ) ; } }
Source:
public org.ovirt.engine.core.common.businessentities.DiskImage mapRow ( java.sql.ResultSet rs , int rowNum ) throws java.sql.SQLException { org.ovirt.engine.core.common.businessentities.DiskImage entity = super . mapRow ( rs , rowNum ) ; mapEntity ( rs , entity ) ; return entity ; }

Target:
public org.ovirt.engine.core.common.businessentities.storage.DiskImage mapRow ( java.sql.ResultSet rs , int rowNum ) throws java.sql.SQLException { org.ovirt.engine.core.common.businessentities.storage.DiskImage entity = null ; org.ovirt.engine.core.common.businessentities.storage.DiskStorageType diskStorageType = org.ovirt.engine.core.common.businessentities.storage.DiskStorageType.forValue ( rs.getInt ( "disk_storage_type" ) ) ; switch ( diskStorageType ) { case IMAGE : entity = super . mapRow ( rs , rowNum ) ; mapEntity ( rs , entity ) ; break ; case CINDER : entity = org.ovirt.engine.core.dao.DiskImageDAODbFacadeImpl.CinderDiskRowMapper.instance.mapRow ( rs , rowNum ) ; break ; } return entity ; }
Source:
private org.ovirt.engine.core.common.AuditLogType getExecuteAuditLogTypeValue ( boolean successful ) { boolean isVmNameExist = org.apache.commons.lang.StringUtils.isNotEmpty ( org.ovirt.engine.core.bll.AddDiskCommand.getVmName ( ) ) ; if ( successful ) { if ( isVmNameExist ) { return org.ovirt.engine.core.common.AuditLogType.USER_ADD_DISK_TO_VM ; } else { return org.ovirt.engine.core.common.AuditLogType.USER_ADD_DISK ; } } else { if ( isVmNameExist ) { return org.ovirt.engine.core.common.AuditLogType.USER_FAILED_ADD_DISK_TO_VM ; } else { return org.ovirt.engine.core.common.AuditLogType.USER_FAILED_ADD_DISK ; } } }

Target:
private org.ovirt.engine.core.common.AuditLogType getExecuteAuditLogTypeValue ( boolean successful ) { boolean isVmNameExist = org.apache.commons.lang.StringUtils.isNotEmpty ( org.ovirt.engine.core.bll.AddDiskCommand.getVmName ( ) ) ; if ( successful ) { if ( org.ovirt.engine.core.bll.AddDiskCommand.isInternalExecution ( ) ) { return org.ovirt.engine.core.common.AuditLogType.ADD_DISK_INTERNAL ; } if ( isVmNameExist ) { return org.ovirt.engine.core.common.AuditLogType.USER_ADD_DISK_TO_VM ; } else { return org.ovirt.engine.core.common.AuditLogType.USER_ADD_DISK ; } } else { if ( org.ovirt.engine.core.bll.AddDiskCommand.isInternalExecution ( ) ) { return org.ovirt.engine.core.common.AuditLogType.ADD_DISK_INTERNAL_FAILURE ; } if ( isVmNameExist ) { return org.ovirt.engine.core.common.AuditLogType.USER_FAILED_ADD_DISK_TO_VM ; } else { return org.ovirt.engine.core.common.AuditLogType.USER_FAILED_ADD_DISK ; } } }
Source:
private void checkEntityForRollback ( org.ovirt.engine.core.common.businessentities.BusinessEntity < ? > entity ) { if ( entity == null ) { throw new java.lang.IllegalArgumentException ( "Can not create snapshot from a null entity" ) ; } if ( ( org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getDaoForEntity ( ( ( java.lang.Class < org.ovirt.engine.core.common.businessentities.BusinessEntity < java.io.Serializable > > ) ( entity.getClass ( ) ) ) ) ) == null ) { throw new java.lang.IllegalArgumentException ( ( "There is no rollback DAO registered for entity type " + ( entity.getClass ( ) . getName ( ) ) ) ) ; } }

Target:
private void checkEntityForRollback ( org.ovirt.engine.core.common.businessentities.BusinessEntity < ? > entity ) { if ( entity == null ) { throw new java.lang.IllegalArgumentException ( "Can not create snapshot from a null entity" ) ; } if ( ( org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getDaoForEntity ( ( ( java.lang.Class < org.ovirt.engine.core.common.businessentities.BusinessEntity < java.io.Serializable > > ) ( entity.getClass ( ) ) ) ) ) == null ) { throw new java.lang.IllegalArgumentException ( ( "There is no rollback Dao registered for entity type " + ( entity.getClass ( ) . getName ( ) ) ) ) ; } }
Source:
public static void IsPoolNameUnique ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String name ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { return ! ( ( java.lang.Boolean ) ( source ) ) ; } return false ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.IsVmPoolWithSameNameExists , new org.ovirt.engine.core.common.queries.IsVmPoolWithSameNameExistsParameters ( name ) , aQuery ) ; }

Target:
public static void isPoolNameUnique ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String name ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { return ! ( ( java.lang.Boolean ) ( source ) ) ; } return false ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.IsVmPoolWithSameNameExists , new org.ovirt.engine.core.common.queries.IsVmPoolWithSameNameExistsParameters ( name ) , aQuery ) ; }
Source:
public void getDbGroupsByUserId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid userId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter < java.util.List < org.ovirt.engine.core.common.businessentities.aaa.DbGroup > > ( ) { @ java.lang.Override public java.util.List < org.ovirt.engine.core.common.businessentities.aaa.DbGroup > Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return ( ( java.util.List < org.ovirt.engine.core.common.businessentities.aaa.DbGroup > ) ( source ) ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetDbGroupsByUserId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( userId ) , aQuery ) ; }

Target:
public void getVmNextRunConfiguration ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , 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 ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmNextRunConfiguration , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }