auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void getTemplateNicList ( 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.getInstance ( ) . runQuery ( VdcQueryType.GetTemplateInterfacesByTemplateId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
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 ) ; }
Source:
public void reportCompleted ( ) { org.ovirt.engine.core.bll.job.ExecutionContext executionContext = org.ovirt.engine.core.bll.RunVmCommandBase.getExecutionContext ( ) ; if ( ( ( executionContext != null ) && ( executionContext.isMonitored ( ) ) ) && ( ! ( executionContext.isCompleted ( ) ) ) ) { switch ( executionContext.getExecutionMethod ( ) ) { case AsJob : org.ovirt.engine.core.bll.job.ExecutionHandler.endJob ( executionContext , false ) ; break ; case AsStep : org.ovirt.engine.core.bll.job.ExecutionHandler.endStep ( executionContext , executionContext.getStep ( ) , false ) ; break ; default : } } }

Target:
protected void endExecutionMonitoring ( ) { org.ovirt.engine.core.bll.job.ExecutionContext executionContext = org.ovirt.engine.core.bll.RunVmCommandBase.getExecutionContext ( ) ; switch ( executionContext.getExecutionMethod ( ) ) { case AsJob : org.ovirt.engine.core.bll.job.ExecutionHandler.endJob ( executionContext , false ) ; break ; case AsStep : org.ovirt.engine.core.bll.job.ExecutionHandler.endStep ( executionContext , executionContext.getStep ( ) , false ) ; break ; default : } }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValueObj ) { org.ovirt.engine.core.common.queries.VdcQueryReturnValue returnValue = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValueObj ) ) ; java.lang.Object returnValue2 = returnValue.getReturnValue ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > allNics = ( ( java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > ) ( returnValue2 ) ) ; this . allNics = allNics ; queryFreeBonds ( ) ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValueObj ) { org.ovirt.engine.core.common.queries.VdcQueryReturnValue returnValue = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValueObj ) ) ; java.lang.Object returnValue2 = returnValue.getReturnValue ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > allNics = ( ( java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > ) ( returnValue2 ) ) ; this . allNics = allNics ; queryVfsConfig ( ) ; }
Source:
protected void executeCommand ( ) { getNetwork ( ) . setLabel ( null ) ; org.ovirt.engine.core.common.action.VdcReturnValueBase result = runInternalAction ( VdcActionType.UpdateNetwork , new org.ovirt.engine.core.common.action.AddNetworkStoragePoolParameters ( getNetwork ( ) . getDataCenterId ( ) , getNetwork ( ) ) ) ; if ( ! ( result.getSucceeded ( ) ) ) { propagateFailure ( result ) ; } setSucceeded ( result.getSucceeded ( ) ) ; }

Target:
protected void executeCommand ( ) { getNetwork ( ) . setLabel ( null ) ; org.ovirt.engine.core.common.action.VdcReturnValueBase result = runInternalAction ( ActionType.UpdateNetwork , new org.ovirt.engine.core.common.action.AddNetworkStoragePoolParameters ( getNetwork ( ) . getDataCenterId ( ) , getNetwork ( ) ) ) ; if ( ! ( result.getSucceeded ( ) ) ) { propagateFailure ( result ) ; } setSucceeded ( result.getSucceeded ( ) ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { java.util.List < java.lang.String > pmOptions = ( ( java.util.ArrayList < java.lang.String > ) ( returnValue ) ) ; if ( pmOptions != null ) { getPmPort ( ) . setIsAvailable ( pmOptions.contains ( org.ovirt.engine.ui.uicommonweb.models.hosts.HostModel.PmPortKey ) ) ; getPmSlot ( ) . setIsAvailable ( pmOptions.contains ( org.ovirt.engine.ui.uicommonweb.models.hosts.HostModel.PmSlotKey ) ) ; getPmSecure ( ) . setIsAvailable ( pmOptions.contains ( org.ovirt.engine.ui.uicommonweb.models.hosts.HostModel.PmSecureKey ) ) ; } }

Target:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.hosts.HostModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.hosts.HostModel ) ( target ) ) ; model.defaultSpmPriority = ( ( java.lang.Integer ) ( returnValue ) ) ; if ( ( postponedSpmPriority ) != null ) { updateSpmPriority ( postponedSpmPriority ) ; } spmInitialized = true ; }
Source:
public static java.lang.String EREPLACE ( java.lang.String oldStr , java.lang.String newStr , java.lang.String replacement ) { if ( ( ( oldStr == null ) || ( newStr == null ) ) || ( replacement == null ) ) return oldStr ; else return oldStr.replaceAll ( newStr , replacement ) ; }

Target:
public static java.lang.String EREPLACE ( java.lang.String oldStr , java.lang.String newStr , java.lang.String replacement ) { return routines.StringHandling.CHANGE ( oldStr , newStr , replacement ) ; }
Source:
private void UpdateHasSelectedTags ( ) { java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.tags.TagModel > selectedTags = ( ( getTagList ( ) . getSelectedItems ( ) ) != null ) ? org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.ui.uicommonweb.models.tags.TagModel > Cast ( getTagList ( ) . getSelectedItems ( ) ) : new java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.tags.TagModel > ( ) ; setHasSelectedTags ( ( ( ( getSelectedItem ( ) ) != null ) && ( ( selectedTags.size ( ) ) > 0 ) ) ) ; }

Target:
private void updateHasSelectedTags ( ) { java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.tags.TagModel > selectedTags = ( ( getTagList ( ) . getSelectedItems ( ) ) != null ) ? org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.ui.uicommonweb.models.tags.TagModel > cast ( getTagList ( ) . getSelectedItems ( ) ) : new java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.tags.TagModel > ( ) ; setHasSelectedTags ( ( ( ( getSelectedItem ( ) ) != null ) && ( ( selectedTags.size ( ) ) > 0 ) ) ) ; }
Source:
private static org.ovirt.engine.core.common.businessentities.DiskImage createDisk ( ) { org.ovirt.engine.core.common.businessentities.DiskImage disk = new org.ovirt.engine.core.common.businessentities.DiskImage ( ) ; disk.setImageId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; disk.setActive ( true ) ; disk.setImageStatus ( ImageStatus.OK ) ; java.util.ArrayList < org.ovirt.engine.core.compat.Guid > storageDomainIds = new java.util.ArrayList < > ( ) ; storageDomainIds.add ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; disk.setStorageIds ( storageDomainIds ) ; return disk ; }

Target:
private static org.ovirt.engine.core.common.businessentities.storage.DiskImage createDisk ( ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage disk = new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ; disk.setImageId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; disk.setActive ( true ) ; disk.setImageStatus ( ImageStatus.OK ) ; java.util.ArrayList < org.ovirt.engine.core.compat.Guid > storageDomainIds = new java.util.ArrayList < > ( ) ; storageDomainIds.add ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; disk.setStorageIds ( storageDomainIds ) ; return disk ; }
Source:
public void testRetryWithNoSuccess ( ) throws java.lang.Exception { java.util.concurrent.Callable < java.lang.Object > callable = org.mockito.Mockito.mock ( java.util.concurrent.Callable.class ) ; org.ovirt.vdsm.jsonrpc.client.internal.ClientPolicy policy = new org.ovirt.vdsm.jsonrpc.client.internal.ClientPolicy ( 5 , 3 , 10 , java.io.IOException.class ) ; org.ovirt.vdsm.jsonrpc.client.utils.retry.Retryable < java.lang.Object > retryable = new org.ovirt.vdsm.jsonrpc.client.utils.retry.Retryable ( callable , policy ) ; org.mockito.Mockito.stub ( callable.call ( ) ) . toThrow ( new java.net.ConnectException ( ) ) . toThrow ( new java.io.IOException ( ) ) . toThrow ( new java.io.IOException ( ) ) ; retryable.call ( ) ; }

Target:
public void testRetryWithNoSuccess ( ) throws java.lang.Exception { java.util.concurrent.Callable < java.lang.Object > callable = org.mockito.Mockito.mock ( java.util.concurrent.Callable.class ) ; org.ovirt.vdsm.jsonrpc.client.internal.ClientPolicy policy = new org.ovirt.vdsm.jsonrpc.client.internal.ClientPolicy ( 5 , 3 , 10 , java.io.IOException.class ) ; org.ovirt.vdsm.jsonrpc.client.utils.retry.Retryable < java.lang.Object > retryable = new org.ovirt.vdsm.jsonrpc.client.utils.retry.Retryable ( callable , policy ) ; org.mockito.Mockito.when ( callable.call ( ) ) . thenThrow ( new java.net.ConnectException ( ) ) . thenThrow ( new java.io.IOException ( ) ) . thenThrow ( new java.io.IOException ( ) ) ; retryable.call ( ) ; }
Source:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { org.ovirt.engine.ui.uicommonweb.models.storage.StorageListModel storageListModel = ( ( org.ovirt.engine.ui.uicommonweb.models.storage.StorageListModel ) ( result.getState ( ) ) ) ; org.ovirt.engine.core.common.action.VdcReturnValueBase returnVal = result.getReturnValue ( ) ; boolean success = ( returnVal != null ) && ( returnVal.getSucceeded ( ) ) ; if ( success ) { storageListModel.fileConnection = null ; } storageListModel.ImportFileStoragePostInit ( ) ; }

Target:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { org.ovirt.engine.ui.uicommonweb.models.storage.StorageListModel storageListModel = ( ( org.ovirt.engine.ui.uicommonweb.models.storage.StorageListModel ) ( result.getState ( ) ) ) ; org.ovirt.engine.core.common.action.VdcReturnValueBase returnVal = result.getReturnValue ( ) ; boolean success = ( returnVal != null ) && ( returnVal.getSucceeded ( ) ) ; if ( success ) { storageListModel.fileConnection = null ; } storageListModel.importFileStoragePostInit ( ) ; }
Source:
public static void getDataCenterMaxNameLength ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) . intValue ( ) : 1 ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.StoragePoolNameSizeLimit , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , 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.getInstance ( ) . runQuery ( VdcQueryType.IsVmTemlateWithSameNameExist , new org.ovirt.engine.core.common.queries.NameQueryParameters ( name ) , aQuery ) ; }
Source:
public void testGuestAgentStatus ( ) { org.ovirt.engine.core.compat.Guid vmId = FixturesTool.VM_RHEL5_POOL_51 ; org.ovirt.engine.core.common.businessentities.VmDynamic vmDynamic = dao.get ( vmId ) ; vmDynamic.setGuestAgentStatus ( GuestAgentStatus.UpdateNeeded ) ; dao.update ( vmDynamic ) ; vmDynamic = dao.get ( vmId ) ; org.junit.Assert.assertEquals ( vmDynamic.getGuestAgentStatus ( ) . getValue ( ) , GuestAgentStatus.UpdateNeeded.getValue ( ) ) ; }

Target:
public void testGuestAgentStatus ( ) { org.ovirt.engine.core.compat.Guid vmId = FixturesTool.VM_RHEL5_POOL_51 ; org.ovirt.engine.core.common.businessentities.VmDynamic vmDynamic = dao.get ( vmId ) ; vmDynamic.setGuestAgentStatus ( GuestAgentStatus.UpdateNeeded ) ; dao.update ( vmDynamic ) ; vmDynamic = dao.get ( vmId ) ; org.junit.jupiter.api.Assertions.assertEquals ( vmDynamic.getGuestAgentStatus ( ) . getValue ( ) , GuestAgentStatus.UpdateNeeded.getValue ( ) ) ; }
Source:
public void setItems ( java.util.Collection < org.ovirt.engine.ui.uicommonweb.models.EntityModel < org.ovirt.engine.core.common.businessentities.VM > > values ) { java.util.Collection < org.ovirt.engine.ui.uicommonweb.models.EntityModel < org.ovirt.engine.core.common.businessentities.VM > > externalVms = getExternalVmModels ( ) . getItems ( ) ; if ( ( values != null ) && ( externalVms == values ) ) { sortVms ( values ) ; } else { super . setItems ( values ) ; } }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < ? extends org.ovirt.engine.ui.uicompat.EventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { providerChanged ( ) ; }
Source:
protected boolean canDoAction ( ) { if ( ( getStoragePool ( ) ) == null ) { addCanDoActionMessage ( VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_POOL_NOT_EXIST ) ; return false ; } if ( ( getQuotaId ( ) ) == null ) { addCanDoActionMessage ( VdcBllMessages.ACTION_TYPE_FAILED_QUOTA_IS_NOT_VALID ) ; return false ; } if ( ( getDbFacade ( ) . getQuotaDao ( ) . getById ( getQuotaId ( ) ) ) == null ) { addCanDoActionMessage ( VdcBllMessages.ACTION_TYPE_FAILED_QUOTA_NOT_EXIST ) ; return false ; } return true ; }

Target:
protected boolean canDoAction ( ) { if ( ( getStoragePool ( ) ) == null ) { addCanDoActionMessage ( EngineMessage.ACTION_TYPE_FAILED_STORAGE_POOL_NOT_EXIST ) ; return false ; } if ( ( getQuotaId ( ) ) == null ) { addCanDoActionMessage ( EngineMessage.ACTION_TYPE_FAILED_QUOTA_IS_NOT_VALID ) ; return false ; } if ( ( getDbFacade ( ) . getQuotaDao ( ) . getById ( getQuotaId ( ) ) ) == null ) { addCanDoActionMessage ( EngineMessage.ACTION_TYPE_FAILED_QUOTA_NOT_EXIST ) ; return false ; } return true ; }
Source:
public static void getVmConfigurationBySnapshot ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid snapshotSourceId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( org.ovirt.engine.core.common.businessentities.VM ) ( source ) ) : null ; } } ; org.ovirt.engine.core.common.queries.IdQueryParameters params = new org.ovirt.engine.core.common.queries.IdQueryParameters ( snapshotSourceId ) ; params.setRefresh ( false ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmConfigurationBySnapshot , params , aQuery ) ; }

Target:
public static void getVmConfigurationBySnapshot ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid snapshotSourceId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( org.ovirt.engine.core.common.businessentities.VM ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmConfigurationBySnapshot , new org.ovirt.engine.core.common.queries.IdQueryParameters ( snapshotSourceId ) . withoutRefresh ( ) , aQuery ) ; }
Source:
public void managementNetworkAttachmentInvalid ( ) throws java.lang.Exception { networkCluster.setRequired ( false ) ; org.junit.Assert.assertThat ( validator.managementNetworkAttachment ( org.ovirt.engine.core.bll.network.cluster.NetworkClusterValidatorTest.NETWORK_NAME ) , org.junit.matchers.JUnitMatchers.both ( org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( VdcBllMessages.ACTION_TYPE_FAILED_MANAGEMENT_NETWORK_REQUIRED ) ) . and ( org.ovirt.engine.core.bll.validator.ValidationResultMatchers.replacements ( org.junit.matchers.JUnitMatchers.hasItem ( org.ovirt.engine.core.bll.network.cluster.NetworkClusterValidatorTest.NETWORK_NAME_REPLACEMENT ) ) ) ) ; }

Target:
public void setup ( ) { org.mockito.Mockito.when ( version.getValue ( ) ) . thenReturn ( org.ovirt.engine.core.bll.network.cluster.NetworkClusterValidatorTest.CLUSTER_VERSION ) ; validator = new org.ovirt.engine.core.bll.network.cluster.NetworkClusterValidator ( networkCluster , version ) ; }
Source:
public void canDoActionMaxBlockDiskSizeCheckSucceeds ( ) { org.ovirt.engine.core.compat.Guid storageId = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; org.ovirt.engine.core.common.action.AddDiskParameters parameters = org.ovirt.engine.core.bll.AddDiskToVmCommandTest.createParameters ( ) ; parameters.setDiskInfo ( org.ovirt.engine.core.bll.AddDiskToVmCommandTest.createDiskImage ( org.ovirt.engine.core.bll.AddDiskToVmCommandTest.MAX_BLOCK_SIZE ) ) ; initializeCommand ( storageId , parameters ) ; mockVm ( ) ; mockStorageDomain ( storageId , StorageType.ISCSI ) ; mockStoragePoolIsoMap ( ) ; mockInterfaceList ( ) ; mockMaxPciSlots ( ) ; runAndAssertCanDoActionSuccess ( ) ; }

Target:
public void canDoActionMaxBlockDiskSizeCheckSucceeds ( ) { org.ovirt.engine.core.compat.Guid storageId = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; org.ovirt.engine.core.common.action.AddDiskParameters parameters = org.ovirt.engine.core.bll.AddDiskCommandTest.createParameters ( ) ; parameters.setDiskInfo ( org.ovirt.engine.core.bll.AddDiskCommandTest.createDiskImage ( org.ovirt.engine.core.bll.AddDiskCommandTest.MAX_BLOCK_SIZE ) ) ; initializeCommand ( storageId , parameters ) ; mockVm ( ) ; mockStorageDomain ( storageId , StorageType.ISCSI ) ; mockStoragePoolIsoMap ( ) ; mockInterfaceList ( ) ; mockMaxPciSlots ( ) ; runAndAssertCanDoActionSuccess ( ) ; }
Source:
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.RunQuery ( VdcQueryType.GetStoragePoolById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) , aQuery ) ; }

Target:
public static void getGlusterHook ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hookId , boolean includeServerHooks ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetGlusterHookById , new org.ovirt.engine.core.common.queries.gluster.GlusterHookQueryParameters ( hookId , includeServerHooks ) , aQuery ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > storageDomains = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ) ( returnValue ) ) ; filteredStorageDomains = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) ; for ( org.ovirt.engine.core.common.businessentities.StorageDomain domain : storageDomains ) { if ( org.ovirt.engine.ui.uicommonweb.Linq.IsDataActiveStorageDomain ( domain ) ) { filteredStorageDomains.add ( domain ) ; } } getStorage ( ) . setItems ( filteredStorageDomains ) ; if ( hasQuota ) { initQuotaForStorageDomains ( ) ; } else { initDisksStorageDomainsList ( ) ; } }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > storageDomains = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ) ( returnValue ) ) ; filteredStorageDomains = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) ; for ( org.ovirt.engine.core.common.businessentities.StorageDomain domain : storageDomains ) { if ( org.ovirt.engine.ui.uicommonweb.Linq.isDataActiveStorageDomain ( domain ) ) { filteredStorageDomains.add ( domain ) ; } } getStorage ( ) . setItems ( filteredStorageDomains ) ; if ( hasQuota ) { initQuotaForStorageDomains ( ) ; } else { initDisksStorageDomainsList ( ) ; } }
Source:
public static void IsLiveStorageMigrationEnabled ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String version ) { 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 ( ) : true ; } } ; org.ovirt.engine.core.common.queries.GetConfigurationValueParameters params = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.LiveStorageMigrationEnabled ) ; params.setVersion ( version ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( params , aQuery ) ; }

Target:
public static void IsHotPlugAvailable ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String version ) { 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 ( ) : true ; } } ; org.ovirt.engine.core.common.queries.GetConfigurationValueParameters tempVar = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.HotPlugEnabled ) ; tempVar.setVersion ( version ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( tempVar , aQuery ) ; }
Source:
public void getRpmVersion ( 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.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.core.common.queries.GetConfigurationValueParameters tempVar = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.ProductRPMVersion ) ; tempVar.setVersion ( getDefaultConfigurationVersion ( ) ) ; getConfigFromCache ( tempVar , aQuery ) ; }

Target:
public void getVolumeList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String clusterName ) { getVolumeList ( aQuery , clusterName , true ) ; }
Source:
public java.lang.String ExportTemplate ( org.ovirt.engine.core.common.businessentities.VmTemplate vmTemplate , java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > images ) { org.ovirt.engine.core.compat.backendcompat.XmlDocument document = new org.ovirt.engine.core.compat.backendcompat.XmlDocument ( ) ; org.ovirt.engine.core.utils.ovf.OvfWriter ovf = new org.ovirt.engine.core.utils.ovf.OvfTemplateWriter ( document , vmTemplate , images ) ; try { BuildOvf ( ovf ) ; } finally { ovf.dispose ( ) ; } return document.OuterXml ; }

Target:
public java.lang.String ExportTemplate ( org.ovirt.engine.core.common.businessentities.VmTemplate vmTemplate , java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > images ) { org.ovirt.engine.core.utils.ovf.OvfWriter ovf = new org.ovirt.engine.core.utils.ovf.OvfTemplateWriter ( vmTemplate , images ) ; BuildOvf ( ovf ) ; return ovf.getStringRepresentation ( ) ; }
Source:
private org.ovirt.engine.core.common.vdscommands.VDSParametersBase createVDSParameters ( ) { return postDeleteActionHandler.fixParameters ( new org.ovirt.engine.core.common.vdscommands.DestroyImageVDSCommandParameters ( org.ovirt.engine.core.bll.storage.disk.image.DestroyImageCommand.getParameters ( ) . getStoragePoolId ( ) , org.ovirt.engine.core.bll.storage.disk.image.DestroyImageCommand.getParameters ( ) . getStorageDomainId ( ) , org.ovirt.engine.core.bll.storage.disk.image.DestroyImageCommand.getParameters ( ) . getImageGroupId ( ) , org.ovirt.engine.core.bll.storage.disk.image.DestroyImageCommand.getParameters ( ) . getImageList ( ) , org.ovirt.engine.core.bll.storage.disk.image.DestroyImageCommand.getParameters ( ) . isPostZero ( ) , storageDomainDao.get ( org.ovirt.engine.core.bll.storage.disk.image.DestroyImageCommand.getParameters ( ) . getStorageDomainId ( ) ) . isDiscardAfterDelete ( ) , org.ovirt.engine.core.bll.storage.disk.image.DestroyImageCommand.getParameters ( ) . isForce ( ) ) ) ; }

Target:
private org.ovirt.engine.core.common.vdscommands.VDSParametersBase createVDSParameters ( ) { return postDeleteActionHandler.fixParameters ( new org.ovirt.engine.core.common.vdscommands.DestroyImageVDSCommandParameters ( org.ovirt.engine.core.bll.storage.disk.image.DestroyImageCommand.getParameters ( ) . getStoragePoolId ( ) , org.ovirt.engine.core.bll.storage.disk.image.DestroyImageCommand.getParameters ( ) . getStorageDomainId ( ) , org.ovirt.engine.core.bll.storage.disk.image.DestroyImageCommand.getParameters ( ) . getImageGroupId ( ) , org.ovirt.engine.core.bll.storage.disk.image.DestroyImageCommand.getParameters ( ) . getImageList ( ) , org.ovirt.engine.core.bll.storage.disk.image.DestroyImageCommand.getParameters ( ) . isPostZero ( ) , storageDomainDao.get ( org.ovirt.engine.core.bll.storage.disk.image.DestroyImageCommand.getParameters ( ) . getStorageDomainId ( ) ) . getDiscardAfterDelete ( ) , org.ovirt.engine.core.bll.storage.disk.image.DestroyImageCommand.getParameters ( ) . isForce ( ) ) ) ; }
Source:
public static boolean getBooleanMatrixParameter ( javax.ws.rs.core.UriInfo uri , java.lang.String name , boolean empty , boolean missing ) { java.lang.String text = org.ovirt.engine.api.common.util.QueryHelper.getMatrixConstraint ( uri , name ) ; if ( text == null ) { return missing ; } if ( text.isEmpty ( ) ) { return empty ; } switch ( text ) { case "true" : return true ; case "false" : return false ; default : org.ovirt.engine.api.common.util.QueryHelper.log.error ( "The value \"{}\" of matrix parameter \"{}\" isn\'t a valid boolean, it will be ignored." , text , name ) ; return missing ; } }

Target:
public static java.lang.String getConstraint ( javax.ws.rs.core.HttpHeaders headers , javax.ws.rs.core.UriInfo ui , java.lang.String defaultQuery , java.lang.Class < ? > clz , boolean typePrefix ) { java.lang.String prefix = ( typePrefix ) ? org.ovirt.engine.api.common.util.QueryHelper.RETURN_TYPES.get ( clz ) : "" ; java.lang.String search = org.ovirt.engine.api.common.util.ParametersHelper.getParameter ( headers , ui , org.ovirt.engine.api.common.util.QueryHelper.CONSTRAINT_PARAMETER ) ; if ( search != null ) { return prefix + search ; } if ( defaultQuery != null ) { return prefix + defaultQuery ; } return null ; }
Source:
private void totalCPUCores_EntityChanged ( java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { getNumOfSockets ( ) . getSelectedItemChangedEvent ( ) . removeListener ( this ) ; getTotalCPUCores ( ) . getEntityChangedEvent ( ) . removeListener ( this ) ; getCoresPerSocket ( ) . getSelectedItemChangedEvent ( ) . removeListener ( this ) ; behavior.totalCpuCoresChanged ( ) ; getTotalCPUCores ( ) . getEntityChangedEvent ( ) . addListener ( this ) ; getNumOfSockets ( ) . getSelectedItemChangedEvent ( ) . addListener ( this ) ; getCoresPerSocket ( ) . getSelectedItemChangedEvent ( ) . addListener ( this ) ; }

Target:
private void addCPUListeners ( ) { getTotalCPUCores ( ) . getEntityChangedEvent ( ) . addListener ( this ) ; getNumOfSockets ( ) . getSelectedItemChangedEvent ( ) . addListener ( this ) ; getCoresPerSocket ( ) . getSelectedItemChangedEvent ( ) . addListener ( this ) ; getThreadsPerCore ( ) . getSelectedItemChangedEvent ( ) . addListener ( this ) ; }
Source:
public void testGetVmNumaNodeInfoByBdsGroupId ( ) { org.ovirt.engine.core.compat.Guid vdsGroupId = new org.ovirt.engine.core.compat.Guid ( "b399944a-81ab-4ec5-8266-e19ba7c3c9d1" ) ; org.ovirt.engine.core.compat.Guid vmId = org.ovirt.engine.core.compat.Guid.createGuidFromString ( "77296e00-0cad-4e5a-9299-008a7b6f4354" ) ; java.util.Map < org.ovirt.engine.core.compat.Guid , java.util.List < org.ovirt.engine.core.common.businessentities.VmNumaNode > > result = vmNumaNodeDao.getVmNumaNodeInfoByClusterId ( vdsGroupId ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertEquals ( 1 , result.size ( ) ) ; org.junit.Assert.assertEquals ( 2 , result.get ( vmId ) . size ( ) ) ; }

Target:
public void testGetVmNumaNodeInfoByBdsGroupId ( ) { org.ovirt.engine.core.compat.Guid vdsGroupId = FixturesTool.CLUSTER ; org.ovirt.engine.core.compat.Guid vmId = org.ovirt.engine.core.compat.Guid.createGuidFromString ( "77296e00-0cad-4e5a-9299-008a7b6f4354" ) ; java.util.Map < org.ovirt.engine.core.compat.Guid , java.util.List < org.ovirt.engine.core.common.businessentities.VmNumaNode > > result = vmNumaNodeDao.getVmNumaNodeInfoByClusterId ( vdsGroupId ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertEquals ( 1 , result.size ( ) ) ; org.junit.Assert.assertEquals ( 2 , result.get ( vmId ) . size ( ) ) ; }
Source:
public boolean Validate ( ) { org.ovirt.engine.ui.uicommonweb.validation.LengthValidation tempVar = new org.ovirt.engine.ui.uicommonweb.validation.LengthValidation ( ) ; tempVar.setMaxLength ( 40 ) ; getName ( ) . ValidateEntity ( new org.ovirt.engine.ui.uicommonweb.validation.IValidation [ ] { new org.ovirt.engine.ui.uicommonweb.validation.NotEmptyValidation ( ) , tempVar , new org.ovirt.engine.ui.uicommonweb.validation.I18NNameValidation ( ) } ) ; return getName ( ) . getIsValid ( ) ; }

Target:
public boolean validate ( ) { org.ovirt.engine.ui.uicommonweb.validation.LengthValidation tempVar = new org.ovirt.engine.ui.uicommonweb.validation.LengthValidation ( ) ; tempVar.setMaxLength ( 40 ) ; getName ( ) . validateEntity ( new org.ovirt.engine.ui.uicommonweb.validation.IValidation [ ] { new org.ovirt.engine.ui.uicommonweb.validation.NotEmptyValidation ( ) , tempVar , new org.ovirt.engine.ui.uicommonweb.validation.I18NNameValidation ( ) } ) ; return getName ( ) . getIsValid ( ) ; }
Source:
public void testGetDataAndSetDataWithFullSession ( ) { org.ovirt.engine.core.utils.ThreadLocalParamsContainer.setHttpSessionId ( org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_SESSION_ID ) ; org.junit.Assert.assertTrue ( "Set should fail with an empty session" , container.setData ( org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_KEY , org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_VALUE ) ) ; org.junit.Assert.assertEquals ( "Get should return null with an empty session" , org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_VALUE , container.getData ( org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_KEY , false ) ) ; org.junit.Assert.assertEquals ( "Get should return the value with a given session" , org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_VALUE , container.getData ( org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_SESSION_ID , org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_KEY , false ) ) ; }

Target:
public void testRemoveWithParam ( ) { container.setData ( org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_SESSION_ID , org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_KEY , org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_VALUE ) ; container.removeSessionOnLogout ( org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_SESSION_ID ) ; org.junit.Assert.assertNull ( "Get should return null since the session was removed" , container.getData ( org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_SESSION_ID , org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_KEY , false ) ) ; }
Source:
protected boolean canDoAction ( ) { if ( ( org.ovirt.engine.core.bll.VmSlaPolicyCommand.getVm ( ) ) == null ) { return failCanDoAction ( EngineMessage.ACTION_TYPE_FAILED_VM_NOT_FOUND ) ; } if ( ( org.ovirt.engine.core.bll.VmSlaPolicyCommand.getVm ( ) . getStatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.VMStatus.Up ) ) { return failCanDoAction ( EngineMessage.ACTION_TYPE_FAILED_VM_STATUS_ILLEGAL , org.ovirt.engine.core.bll.validator.LocalizedVmStatus.from ( org.ovirt.engine.core.bll.VmSlaPolicyCommand.getVm ( ) . getStatus ( ) ) ) ; } if ( ! ( org.ovirt.engine.core.common.FeatureSupported.vmSlaPolicy ( org.ovirt.engine.core.bll.VmSlaPolicyCommand.getVm ( ) . getVdsGroupCompatibilityVersion ( ) ) ) ) { return failCanDoAction ( EngineMessage.VM_SLA_POLICY_NOT_SUPPORTED ) ; } return true ; }

Target:
protected boolean canDoAction ( ) { if ( ( org.ovirt.engine.core.bll.VmSlaPolicyCommand.getVm ( ) ) == null ) { return failCanDoAction ( EngineMessage.ACTION_TYPE_FAILED_VM_NOT_FOUND ) ; } if ( ( org.ovirt.engine.core.bll.VmSlaPolicyCommand.getVm ( ) . getStatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.VMStatus.Up ) ) { return org.ovirt.engine.core.bll.VmSlaPolicyCommand.failVmStatusIllegal ( ) ; } if ( ! ( org.ovirt.engine.core.common.FeatureSupported.vmSlaPolicy ( org.ovirt.engine.core.bll.VmSlaPolicyCommand.getVm ( ) . getVdsGroupCompatibilityVersion ( ) ) ) ) { return failCanDoAction ( EngineMessage.VM_SLA_POLICY_NOT_SUPPORTED ) ; } return true ; }
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:
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 ( ) ; parent.addParents ( volume ) ; glusterBrick.setGlusterVolume ( volume ) ; return glusterBrick ; }
Source:
public void edit ( org.ovirt.engine.ui.uicommonweb.models.providers.ProviderModel object ) { driver.edit ( object ) ; }

Target:
public void edit ( org.ovirt.engine.ui.uicommonweb.models.providers.ProviderModel model ) { customizeAgentTab ( ( ( java.lang.Boolean ) ( model.getAgentTabAvailable ( ) . getEntity ( ) ) ) , ( ( java.lang.String ) ( model.getInterfaceMappingsLabel ( ) . getEntity ( ) ) ) ) ; driver.edit ( model ) ; }
Source:
public void testListIncludeStatistics ( ) throws java.lang.Exception { try { accepts.add ( "application/xml; detail=statistics" ) ; setUriInfo ( setUpUriExpectations ( null ) ) ; setUpQueryExpectations ( "" ) ; java.util.List < org.ovirt.engine.api.model.Disk > disks = getCollection ( ) ; org.junit.Assert.assertTrue ( disks.get ( 0 ) . isSetStatistics ( ) ) ; verifyCollection ( disks ) ; } finally { accepts.clear ( ) ; } }

Target:
public void testListIncludeStatistics ( ) throws java.lang.Exception { try { accepts.add ( "application/xml; detail=statistics" ) ; setUriInfo ( setUpUriExpectations ( null ) ) ; setUpQueryExpectations ( "" ) ; java.util.List < org.ovirt.engine.api.model.Disk > disks = getCollection ( ) ; org.junit.jupiter.api.Assertions.assertTrue ( disks.get ( 0 ) . isSetStatistics ( ) ) ; verifyCollection ( disks ) ; } finally { accepts.clear ( ) ; } }
Source:
public void testLiveSnapshotWhenNoPluggedDiskSnapshot ( ) { setUpGeneralValidations ( ) ; setUpDiskValidations ( ) ; org.mockito.Mockito.doReturn ( true ) . when ( cmd ) . isLiveSnapshotApplicable ( ) ; org.mockito.Mockito.doReturn ( org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommandTest.getEmptyDiskList ( ) ) . when ( cmd ) . getSnappableVmDisks ( ) ; org.junit.Assert.assertTrue ( cmd.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( cmd.getReturnValue ( ) . getCanDoActionMessages ( ) . isEmpty ( ) ) ; }

Target:
public void testLiveSnapshotWhenNoPluggedDiskSnapshot ( ) { setUpGeneralValidations ( ) ; setUpDiskValidations ( ) ; org.mockito.Mockito.doReturn ( true ) . when ( cmd ) . isLiveSnapshotApplicable ( ) ; org.mockito.Mockito.doReturn ( org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommandTest.getEmptyDiskList ( ) ) . when ( cmd ) . getDisksList ( ) ; org.junit.Assert.assertTrue ( cmd.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( cmd.getReturnValue ( ) . getCanDoActionMessages ( ) . isEmpty ( ) ) ; }
Source:
public void setup ( ) { org.mockito.Mockito.when ( tagDao.getAllForParent ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( java.util.Collections.emptyList ( ) ) ; org.mockito.Mockito.doReturn ( tagDao ) . when ( tagsDirector ) . getTagDao ( ) ; org.mockito.Mockito.doNothing ( ) . when ( tagsDirector ) . updateTagInBackend ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.Tags.class ) ) ; tagsDirector.init ( ) ; }

Target:
public void setup ( ) { org.mockito.Mockito.when ( tagDao.getAllForParent ( org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( java.util.Collections.emptyList ( ) ) ; org.mockito.Mockito.doReturn ( tagDao ) . when ( tagsDirector ) . getTagDao ( ) ; org.mockito.Mockito.doNothing ( ) . when ( tagsDirector ) . updateTagInBackend ( org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.common.businessentities.Tags.class ) ) ; tagsDirector.init ( ) ; }
Source:
protected boolean canDoAction ( ) { if ( ( org.ovirt.engine.core.bll.RemoveVmFromPoolCommand.getVm ( ) ) == null ) { return failCanDoAction ( EngineMessage.ACTION_TYPE_FAILED_VM_NOT_FOUND ) ; } if ( ( org.ovirt.engine.core.bll.RemoveVmFromPoolCommand.getVmPoolId ( ) ) == null ) { return failCanDoAction ( EngineMessage.VM_POOL_CANNOT_DETACH_VM_NOT_ATTACHED_TO_POOL ) ; } if ( ( org.ovirt.engine.core.bll.RemoveVmFromPoolCommand.getVm ( ) . isRunningOrPaused ( ) ) || ( ( org.ovirt.engine.core.bll.RemoveVmFromPoolCommand.getVm ( ) . getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.Unknown ) ) ) { return failCanDoAction ( EngineMessage.VM_POOL_CANNOT_REMOVE_RUNNING_VM_FROM_POOL ) ; } return true ; }

Target:
protected boolean validate ( ) { if ( ( org.ovirt.engine.core.bll.RemoveVmFromPoolCommand.getVm ( ) ) == null ) { return failValidation ( EngineMessage.ACTION_TYPE_FAILED_VM_NOT_FOUND ) ; } if ( ( org.ovirt.engine.core.bll.RemoveVmFromPoolCommand.getVmPoolId ( ) ) == null ) { return failValidation ( EngineMessage.VM_POOL_CANNOT_DETACH_VM_NOT_ATTACHED_TO_POOL ) ; } if ( ( org.ovirt.engine.core.bll.RemoveVmFromPoolCommand.getVm ( ) . isRunningOrPaused ( ) ) || ( ( org.ovirt.engine.core.bll.RemoveVmFromPoolCommand.getVm ( ) . getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.Unknown ) ) ) { return failValidation ( EngineMessage.VM_POOL_CANNOT_REMOVE_RUNNING_VM_FROM_POOL ) ; } return true ; }
Source:
public boolean validate ( boolean isOVirt ) { getOVirtISO ( ) . setIsValid ( true ) ; getRootPassword ( ) . setIsValid ( true ) ; if ( isOVirt ) { getOVirtISO ( ) . validateSelectedItem ( new org.ovirt.engine.ui.uicommonweb.validation.IValidation [ ] { new org.ovirt.engine.ui.uicommonweb.validation.NotEmptyValidation ( ) } ) ; } else { getRootPassword ( ) . validateEntity ( new org.ovirt.engine.ui.uicommonweb.validation.IValidation [ ] { new org.ovirt.engine.ui.uicommonweb.validation.NotEmptyValidation ( ) } ) ; } return ( getRootPassword ( ) . getIsValid ( ) ) && ( getOVirtISO ( ) . getIsValid ( ) ) ; }

Target:
public org.ovirt.engine.ui.uicommonweb.models.EntityModel getPublicKey ( ) { return privatePublicKey ; }
Source:
public static void getClusterList ( 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 ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > list = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ) ( source ) ) ; java.util.Collections.sort ( list , new org.ovirt.engine.core.common.businessentities.comparators.NameableComparator ( ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVdsGroupsByStoragePoolId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) , aQuery ) ; }

Target:
public static void getStorageDomainList ( 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 ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainsByStoragePoolId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) , aQuery ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.configure.scheduling.ClusterPolicyListModel clusterPolicyListModel = ( ( org.ovirt.engine.ui.uicommonweb.models.configure.scheduling.ClusterPolicyListModel ) ( model ) ) ; java.util.ArrayList < org.ovirt.engine.core.common.scheduling.ClusterPolicy > list = ( ( java.util.ArrayList < org.ovirt.engine.core.common.scheduling.ClusterPolicy > ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ) ) ; clusterPolicyListModel.setItems ( list ) ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.configure.scheduling.ClusterPolicyListModel clusterPolicyListModel = ( ( org.ovirt.engine.ui.uicommonweb.models.configure.scheduling.ClusterPolicyListModel ) ( model ) ) ; java.util.ArrayList < org.ovirt.engine.core.common.scheduling.ClusterPolicy > list = ( ( java.util.ArrayList < org.ovirt.engine.core.common.scheduling.ClusterPolicy > ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ) ) ; java.util.Collections.sort ( list , new org.ovirt.engine.ui.uicommonweb.Linq.ClusterPolicyComparator ( ) ) ; clusterPolicyListModel.setItems ( list ) ; }
Source:
public void serviceFound ( org.ovirt.engine.ui.frontend.gwtservices.GenericApiGWTServiceAsync service ) { service.RunAction ( ( ( org.ovirt.engine.core.common.action.VdcActionType ) ( operation.getOperation ( ) ) ) , ( ( org.ovirt.engine.core.common.action.VdcActionParametersBase ) ( operation.getParameter ( ) ) ) , new com.google.gwt.user.client.rpc.AsyncCallback < org.ovirt.engine.core.common.action.VdcReturnValueBase > ( ) { @ java.lang.Override public void onFailure ( final java.lang.Throwable exception ) { operation.getCallback ( ) . onFailure ( operation , exception ) ; } @ java.lang.Override public void onSuccess ( final org.ovirt.engine.core.common.action.VdcReturnValueBase result ) { operation.getCallback ( ) . onSuccess ( operation , result ) ; } } ) ; }

Target:
public void serviceFound ( org.ovirt.engine.ui.frontend.gwtservices.GenericApiGWTServiceAsync service ) { service.runAction ( ( ( org.ovirt.engine.core.common.action.VdcActionType ) ( operation.getOperation ( ) ) ) , ( ( org.ovirt.engine.core.common.action.VdcActionParametersBase ) ( operation.getParameter ( ) ) ) , new com.google.gwt.user.client.rpc.AsyncCallback < org.ovirt.engine.core.common.action.VdcReturnValueBase > ( ) { @ java.lang.Override public void onFailure ( final java.lang.Throwable exception ) { operation.getCallback ( ) . onFailure ( operation , exception ) ; } @ java.lang.Override public void onSuccess ( final org.ovirt.engine.core.common.action.VdcReturnValueBase result ) { operation.getCallback ( ) . onSuccess ( operation , result ) ; } } ) ; }
Source:
public static void removeVmDevices ( java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > devices , int numberOfDevicesToRemove ) { int size = devices.size ( ) ; for ( int index = 1 ; index <= numberOfDevicesToRemove ; index ++ ) { if ( size >= index ) { org.ovirt.engine.core.bll.utils.VmDeviceUtils.dao.remove ( devices.get ( ( size - index ) ) . getId ( ) ) ; } } }

Target:
public void removeVmDevices ( java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > devices , int numberOfDevicesToRemove ) { int size = devices.size ( ) ; for ( int index = 1 ; index <= numberOfDevicesToRemove ; index ++ ) { if ( size >= index ) { vmDeviceDao.remove ( devices.get ( ( size - index ) ) . getId ( ) ) ; } } }
Source:
private boolean watchdogAvailable ( java.lang.String watchdogModel ) { for ( java.lang.String availableWatchdogModel : model.getWatchdogModel ( ) . getItems ( ) ) { if ( ( watchdogModel == null ) && ( availableWatchdogModel == null ) ) { return true ; } if ( ( ( watchdogModel != null ) && ( availableWatchdogModel != null ) ) && ( watchdogModel.equals ( availableWatchdogModel ) ) ) { return true ; } } return false ; }

Target:
private boolean watchdogAvailable ( org.ovirt.engine.core.common.businessentities.VmWatchdogType watchdogModel ) { for ( org.ovirt.engine.core.common.businessentities.VmWatchdogType availableWatchdogModel : model.getWatchdogModel ( ) . getItems ( ) ) { if ( ( watchdogModel == null ) && ( availableWatchdogModel == null ) ) { return true ; } if ( ( ( watchdogModel != null ) && ( availableWatchdogModel != null ) ) && ( watchdogModel.equals ( availableWatchdogModel ) ) ) { return true ; } } return false ; }