auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
protected void EntityChanging ( java.lang.Object newValue , java.lang.Object oldValue ) { org.ovirt.engine.core.common.businessentities.VDSGroup vdsGroup = ( ( org.ovirt.engine.core.common.businessentities.VDSGroup ) ( newValue ) ) ; getNewNetworkCommand ( ) . setIsExecutionAllowed ( ( ( vdsGroup != null ) && ( ( vdsGroup.getStoragePoolId ( ) ) != null ) ) ) ; }

Target:
protected void entityChanging ( java.lang.Object newValue , java.lang.Object oldValue ) { org.ovirt.engine.core.common.businessentities.VDSGroup vdsGroup = ( ( org.ovirt.engine.core.common.businessentities.VDSGroup ) ( newValue ) ) ; getNewNetworkCommand ( ) . setIsExecutionAllowed ( ( ( vdsGroup != null ) && ( ( vdsGroup.getStoragePoolId ( ) ) != null ) ) ) ; }
Source:
protected boolean canDoAction ( ) { boolean returnValue = ( ( ( ( super . canDoAction ( ) ) && ( org.ovirt.engine.core.bll.storage.AddStoragePoolWithStoragesCommand.checkStoragePool ( ) ) ) && ( checkStoragePoolStatus ( StoragePoolStatus.Uninitialized ) ) ) && ( org.ovirt.engine.core.bll.storage.AddStoragePoolWithStoragesCommand.initializeVds ( ) ) ) && ( checkStorageDomainsInPool ( ) ) ; return returnValue ; }

Target:
protected boolean canDoAction ( ) { boolean returnValue = ( ( ( ( ( super . canDoAction ( ) ) && ( org.ovirt.engine.core.bll.storage.AddStoragePoolWithStoragesCommand.checkStoragePool ( ) ) ) && ( checkStoragePoolStatus ( StoragePoolStatus.Uninitialized ) ) ) && ( org.ovirt.engine.core.bll.storage.AddStoragePoolWithStoragesCommand.initializeVds ( ) ) ) && ( checkStorageDomainsInPool ( ) ) ) && ( isDomainAttachedToDifferentStoragePool ( ) ) ; return returnValue ; }
Source:
private void mockExecutor ( org.ovirt.engine.core.common.businessentities.FenceAgent agent , boolean success ) { org.ovirt.engine.core.common.vdscommands.VDSFenceReturnValue returnValue = new org.ovirt.engine.core.common.vdscommands.VDSFenceReturnValue ( ) ; returnValue.setSucceeded ( success ) ; returnValue.setFenceAgentUsed ( agent ) ; org.mockito.Mockito.when ( executor.fence ( org.mockito.Mockito.eq ( FenceActionType.Start ) , org.mockito.Mockito.eq ( agent ) ) ) . thenReturn ( returnValue ) ; }

Target:
private void mockExecutor ( org.ovirt.engine.core.common.businessentities.FenceAgent agent , boolean success ) { org.ovirt.engine.core.common.vdscommands.VDSFenceReturnValue returnValue = new org.ovirt.engine.core.common.vdscommands.VDSFenceReturnValue ( ) ; returnValue.setSucceeded ( success ) ; returnValue.setFenceAgentUsed ( agent ) ; org.mockito.Mockito.when ( executor.fence ( org.mockito.Matchers.eq ( FenceActionType.Start ) , org.mockito.Matchers.eq ( agent ) ) ) . thenReturn ( returnValue ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { java.util.List < java.lang.String > consoleDevices = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ; getModel ( ) . getIsConsoleDeviceEnabled ( ) . setEntity ( ( ! ( consoleDevices.isEmpty ( ) ) ) ) ; }

Target:
public void beforeUpdates ( ) { getInstanceTypeManager ( ) . deactivate ( ) ; }
Source:
private org.ovirt.engine.core.common.asynctasks.AsyncTaskType internalGetTaskType ( ) { if ( hasTaskHandlers ( ) ) { if ( ( getParameters ( ) . getExecutionReason ( ) ) == ( org.ovirt.engine.core.common.action.VdcActionParametersBase.CommandExecutionReason.REGULAR_FLOW ) ) { return getCurrentTaskHandler ( ) . getTaskType ( ) ; } return getCurrentTaskHandler ( ) . getRevertTaskType ( ) ; } return getTaskType ( ) ; }

Target:
protected org.ovirt.engine.core.common.queries.VdcQueryReturnValue runInternalQuery ( org.ovirt.engine.core.common.queries.VdcQueryType type , org.ovirt.engine.core.common.queries.VdcQueryParametersBase queryParams ) { return getBackend ( ) . runInternalQuery ( type , queryParams ) ; }
Source:
private void updateController ( ) { this . controller = modelProvider.getModel ( ) ; updateTimer ( ) ; }

Target:
private void updateController ( ) { this . controller = modelProvider.getModel ( ) ; org.ovirt.engine.ui.uicommonweb.models.GridTimer modelTimer = getModelTimer ( ) ; modelTimer.setRefreshRate ( readRefreshRate ( ) ) ; modelTimer.addValueChangeHandler ( new com.google.gwt.event.logical.shared.ValueChangeHandler < java.lang.String > ( ) { @ java.lang.Override public void onValueChange ( com.google.gwt.event.logical.shared.ValueChangeEvent < java.lang.String > event ) { onRefresh ( event.getValue ( ) ) ; } } ) ; }
Source:
private boolean hasReportsModelRefreshEvent ( ) { for ( org.ovirt.engine.ui.uicompat.IEventListener < org.ovirt.engine.ui.uicompat.EventArgs > listnr : getModel ( ) . getReportModelRefreshEvent ( ) . getListeners ( ) ) { if ( listnr instanceof org.ovirt.engine.ui.webadmin.section.main.presenter.tab.MainTabReportsPresenter.ReportsModelRefreshEvent ) { return true ; } } return false ; }

Target:
protected void onReset ( ) { super . onReset ( ) ; if ( ! ( hasReportsModelRefreshEvent ( ) ) ) { getModel ( ) . getReportsAvailabilityEvent ( ) . addListener ( new org.ovirt.engine.ui.webadmin.section.main.presenter.tab.MainTabReportsPresenter.ReportsModelRefreshEvent ( ) ) ; } setSubTabPanelVisible ( false ) ; getModel ( ) . refreshReportModel ( ) ; }
Source:
private static void CloneNetworkStatisticss ( org.ovirt.engine.core.common.businessentities.NetworkStatistics instance , org.ovirt.engine.core.common.businessentities.NetworkStatistics obj ) { obj.setId ( instance.getId ( ) ) ; obj.setReceiveDropRate ( instance.getReceiveDropRate ( ) ) ; obj.setReceiveRate ( instance.getReceiveRate ( ) ) ; obj.setTransmitDropRate ( instance.getTransmitDropRate ( ) ) ; obj.setTransmitRate ( instance.getTransmitRate ( ) ) ; obj.setStatus ( instance.getStatus ( ) ) ; }

Target:
private static void CloneNetworkStatisticss ( org.ovirt.engine.core.common.businessentities.network.NetworkStatistics instance , org.ovirt.engine.core.common.businessentities.network.NetworkStatistics obj ) { obj.setId ( instance.getId ( ) ) ; obj.setReceiveDropRate ( instance.getReceiveDropRate ( ) ) ; obj.setReceiveRate ( instance.getReceiveRate ( ) ) ; obj.setTransmitDropRate ( instance.getTransmitDropRate ( ) ) ; obj.setTransmitRate ( instance.getTransmitRate ( ) ) ; obj.setStatus ( instance.getStatus ( ) ) ; }
Source:
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.storage_domains > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetStorageDomainsByStoragePoolId , new org.ovirt.engine.core.common.queries.StoragePoolQueryParametersBase ( dataCenterId ) , aQuery ) ; }

Target:
public static void GetStorageDomainListByTemplate ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid templateId ) { 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.storage_domains > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetStorageDomainsByVmTemplateId , new org.ovirt.engine.core.common.queries.GetStorageDomainsByVmTemplateIdQueryParameters ( templateId ) , aQuery ) ; }
Source:
protected void ItemsChanged ( ) { super . ItemsChanged ( ) ; if ( ( ( ( getSelectionNodeList ( ) ) != null ) && ( getSelectionNodeList ( ) . isEmpty ( ) ) ) && ( ( getAttachedTagsToEntities ( ) ) != null ) ) { AttachedTagsToEntitiesChanged ( ) ; } }

Target:
protected void itemsChanged ( ) { super . itemsChanged ( ) ; if ( ( ( ( getSelectionNodeList ( ) ) != null ) && ( getSelectionNodeList ( ) . isEmpty ( ) ) ) && ( ( getAttachedTagsToEntities ( ) ) != null ) ) { attachedTagsToEntitiesChanged ( ) ; } }
Source:
private static void addBootProtocol ( java.util.Map < java.lang.String , java.lang.Object > entry , org.ovirt.engine.core.common.businessentities.VDS host , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface ) { org.ovirt.engine.core.vdsbroker.vdsbroker.BootProtocolResolver resolver = ( org.ovirt.engine.core.common.FeatureSupported.cfgEntriesDeprecated ( host.getClusterCompatibilityVersion ( ) ) ) ? new org.ovirt.engine.core.vdsbroker.vdsbroker.NoCfgBootProtocolResolver ( entry , iface ) : new org.ovirt.engine.core.vdsbroker.vdsbroker.CfgBootProtocolResolver ( entry , iface ) ; resolver.resolve ( ) ; }

Target:
private static void setBootProtocolAndGateway ( org.ovirt.engine.core.vdsbroker.vdsbroker.BootProtocolResolver bootProtocolResolver , org.ovirt.engine.core.vdsbroker.vdsbroker.IpInfoFetcher ipInfoFetcher , java.util.function.Consumer < org.ovirt.engine.core.common.businessentities.network.NetworkBootProtocol > bootProtocolSetter , java.util.function.Consumer < java.lang.String > gatewaySetter ) { final org.ovirt.engine.core.common.businessentities.network.NetworkBootProtocol bootProtocol = bootProtocolResolver.resolve ( ipInfoFetcher ) ; bootProtocolSetter.accept ( bootProtocol ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilder.setGateway ( bootProtocol , ipInfoFetcher , gatewaySetter ) ; }
Source:
public void getHostPublicKey ( 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.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetServerSSHPublicKey , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }

Target:
public void countAllTemplates ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmTemplateCount , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }
Source:
private static boolean isList ( java.lang.Object model , java.lang.String superField ) { return ( ( ( model != null ) && ( org.ovirt.engine.api.common.util.ReflectionHelper.isSet ( model , superField ) ) ) && ( org.ovirt.engine.api.common.util.ReflectionHelper.isSet ( org.ovirt.engine.api.common.util.ReflectionHelper.get ( model , superField ) , superField ) ) ) && ( ( org.ovirt.engine.api.common.util.ReflectionHelper.get ( org.ovirt.engine.api.common.util.ReflectionHelper.get ( model , superField ) , superField ) ) instanceof java.util.List ) ; }

Target:
private static boolean isList ( java.lang.Object model , java.lang.String superField ) { return ( ( ( model != null ) && ( org.ovirt.engine.api.utils.ReflectionHelper.isSet ( model , superField ) ) ) && ( org.ovirt.engine.api.utils.ReflectionHelper.isSet ( org.ovirt.engine.api.utils.ReflectionHelper.get ( model , superField ) , superField ) ) ) && ( ( org.ovirt.engine.api.utils.ReflectionHelper.get ( org.ovirt.engine.api.utils.ReflectionHelper.get ( model , superField ) , superField ) ) instanceof java.util.List ) ; }
Source:
private void initEditors ( ) { pmTypeEditor = new org.ovirt.engine.ui.common.widget.editor.ListModelListBoxEditor ( new org.ovirt.engine.ui.common.widget.renderer.StringRenderer < java.lang.String > ( ) ) ; pmEncryptOptionsEditor = new org.ovirt.engine.ui.common.widget.editor.generic.EntityModelCheckBoxEditor ( org.ovirt.engine.ui.common.widget.Align.RIGHT ) ; pmEncryptOptionsEditor.setUsePatternFly ( true ) ; pmSecureEditor = new org.ovirt.engine.ui.common.widget.editor.generic.EntityModelCheckBoxEditor ( org.ovirt.engine.ui.common.widget.Align.RIGHT ) ; pmSecureEditor.setUsePatternFly ( true ) ; }

Target:
private void initEditors ( ) { pmTypeEditor = new org.ovirt.engine.ui.common.widget.editor.ListModelListBoxEditor ( new org.ovirt.engine.ui.common.widget.renderer.StringRenderer < java.lang.String > ( ) ) ; pmEncryptOptionsEditor = new org.ovirt.engine.ui.common.widget.editor.generic.EntityModelCheckBoxEditor ( org.ovirt.engine.ui.common.widget.Align.RIGHT ) ; pmEncryptOptionsEditor.setUsePatternFly ( true ) ; pmSecureEditor = new org.ovirt.engine.ui.common.widget.editor.generic.EntityModelCheckBoxEditor ( org.ovirt.engine.ui.common.widget.Align.RIGHT ) ; pmSecureEditor.setUsePatternFly ( true ) ; fencingOptionsUrl = new com.google.gwt.user.client.ui.Anchor ( dynamicMessages.fencingOptions ( ) ) ; fencingOptionsUrl.asWidget ( ) . addStyleName ( style.fencingOptionsLink ( ) ) ; }
Source:
public void failedStatus ( ) { org.ovirt.engine.core.common.businessentities.pm.FenceOperationResult result = new org.ovirt.engine.core.common.businessentities.pm.FenceOperationResult ( FenceActionType.STATUS , 1 , null , "unknown" , null ) ; org.junit.Assert.assertEquals ( Status.ERROR , result.getStatus ( ) ) ; org.junit.Assert.assertEquals ( PowerStatus.UNKNOWN , result.getPowerStatus ( ) ) ; }

Target:
public void failedStatus ( ) { org.ovirt.engine.core.common.businessentities.pm.FenceOperationResult result = new org.ovirt.engine.core.common.businessentities.pm.FenceOperationResult ( FenceActionType.STATUS , 1 , null , "unknown" , null ) ; org.junit.jupiter.api.Assertions.assertEquals ( Status.ERROR , result.getStatus ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( PowerStatus.UNKNOWN , result.getPowerStatus ( ) ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeGeoRepConfigListXmlRpc glusterVolumeGeoRepConfigList ( java.lang.String volumeName , java.lang.String slaveHost , java.lang.String slaveVolumeName ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "GlusterVolume.geoRepConfigList" ) . withParameter ( "volumeName" , volumeName ) . withParameter ( "remoteHost" , slaveHost ) . withParameter ( "remoteVolumeName" , slaveVolumeName ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) ; return new org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeGeoRepConfigListXmlRpc ( response ) ; }

Target:
public org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeGeoRepConfigListXmlRpc glusterVolumeGeoRepConfigList ( java.lang.String volumeName , java.lang.String slaveHost , java.lang.String slaveVolumeName , java.lang.String userName ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "GlusterVolume.geoRepConfigList" ) . withParameter ( "volumeName" , volumeName ) . withParameter ( "remoteHost" , slaveHost ) . withParameter ( "remoteVolumeName" , slaveVolumeName ) . withOptionalParameter ( "remoteUserName" , userName ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) ; return new org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeGeoRepConfigListXmlRpc ( response ) ; }
Source:
public void getGlusterHostsNewlyAdded ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId , boolean isFingerprintRequired ) { 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.GetAddedGlusterServers , new org.ovirt.engine.core.common.queries.gluster.AddedGlusterServersParameters ( clusterId , isFingerprintRequired ) , aQuery ) ; }

Target:
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 ) ; }
Source:
public void testLiveSnapshotWhenNoPluggedDiskSnapshot ( ) { org.mockito.Mockito.doReturn ( true ) . when ( cmd ) . isLiveSnapshotApplicable ( ) ; org.mockito.Mockito.doReturn ( org.ovirt.engine.core.bll.snapshots.CreateAllSnapshotsFromVmCommandTest.getEmptyDiskList ( ) ) . when ( cmd ) . getDisksList ( ) ; org.junit.Assert.assertTrue ( cmd.validate ( ) ) ; org.junit.Assert.assertTrue ( cmd.getReturnValue ( ) . getValidationMessages ( ) . isEmpty ( ) ) ; }

Target:
public void testPositiveValidateWithDisks ( ) { org.mockito.Mockito.doReturn ( org.ovirt.engine.core.bll.snapshots.CreateAllSnapshotsFromVmCommandTest.getNonEmptyDiskList ( ) ) . when ( cmd ) . getDisksList ( ) ; org.mockito.Mockito.doReturn ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) . when ( cmd ) . getStorageDomainId ( ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateSuccess ( cmd ) ; }
Source:
public void testNotRemovingManagementNetwork ( ) throws java.lang.Exception { org.ovirt.engine.core.bll.validator.NetworkAttachmentValidator networkAttachmentValidatorSpy = org.mockito.Mockito.spy ( createNetworkAttachmentValidator ( new org.ovirt.engine.core.common.businessentities.network.NetworkAttachment ( ) ) ) ; org.mockito.Mockito.doReturn ( networkValidatorMock ) . when ( networkAttachmentValidatorSpy ) . createNetworkValidator ( ) ; org.ovirt.engine.core.bll.ValidationResult propagatedResult = new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.NETWORK_CANNOT_REMOVE_MANAGEMENT_NETWORK , "a" ) ; org.mockito.Mockito.when ( networkValidatorMock.notRemovingManagementNetwork ( ) ) . thenReturn ( propagatedResult ) ; org.junit.Assert.assertThat ( "ValidationResult is not correctly propagated" , networkAttachmentValidatorSpy.notRemovingManagementNetwork ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( VdcBllMessages.NETWORK_CANNOT_REMOVE_MANAGEMENT_NETWORK , "a" ) ) ; }

Target:
public void testNotRemovingManagementNetwork ( ) throws java.lang.Exception { org.ovirt.engine.core.bll.validator.NetworkAttachmentValidator networkAttachmentValidatorSpy = org.mockito.Mockito.spy ( createNetworkAttachmentValidator ( new org.ovirt.engine.core.common.businessentities.network.NetworkAttachment ( ) ) ) ; org.mockito.Mockito.doReturn ( networkValidatorMock ) . when ( networkAttachmentValidatorSpy ) . getNetworkValidator ( ) ; org.ovirt.engine.core.bll.ValidationResult propagatedResult = new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.NETWORK_CANNOT_REMOVE_MANAGEMENT_NETWORK , "a" ) ; org.mockito.Mockito.when ( networkValidatorMock.notRemovingManagementNetwork ( ) ) . thenReturn ( propagatedResult ) ; org.junit.Assert.assertThat ( "ValidationResult is not correctly propagated" , networkAttachmentValidatorSpy.notRemovingManagementNetwork ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.NETWORK_CANNOT_REMOVE_MANAGEMENT_NETWORK , "a" ) ) ; }
Source:
protected void executeQueryCommand ( ) { org.ovirt.engine.core.common.businessentities.VDS host = org.ovirt.engine.core.bll.GetHostArchitectureQuery.getDbFacade ( ) . getVdsDao ( ) . get ( org.ovirt.engine.core.bll.GetHostArchitectureQuery.getParameters ( ) . getId ( ) ) ; org.ovirt.engine.core.common.businessentities.ServerCpu sc = org.ovirt.engine.core.bll.CpuFlagsManagerHandler.FindMaxServerCpuByFlags ( host.getCpuFlags ( ) , host.getVdsGroupCompatibilityVersion ( ) ) ; org.ovirt.engine.core.bll.GetHostArchitectureQuery.getQueryReturnValue ( ) . setReturnValue ( sc.getArchitecture ( ) ) ; }

Target:
protected void executeQueryCommand ( ) { org.ovirt.engine.core.common.businessentities.VDS host = org.ovirt.engine.core.bll.GetHostArchitectureQuery.getDbFacade ( ) . getVdsDao ( ) . get ( org.ovirt.engine.core.bll.GetHostArchitectureQuery.getParameters ( ) . getId ( ) ) ; org.ovirt.engine.core.common.businessentities.ServerCpu sc = org.ovirt.engine.core.bll.CpuFlagsManagerHandler.FindMaxServerCpuByFlags ( host.getCpuFlags ( ) , host.getVdsGroupCompatibilityVersion ( ) ) ; org.ovirt.engine.core.bll.GetHostArchitectureQuery.getQueryReturnValue ( ) . setReturnValue ( ( sc == null ? org.ovirt.engine.core.common.businessentities.ArchitectureType.undefined : sc.getArchitecture ( ) ) ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc vmUpdateDevice ( java.lang.String vmId , java.util.Map device ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "VM.updateDevice" ) . withParameter ( "vmID" , vmId ) . withParameter ( "params" , device ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( response ) ; }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturn vmUpdateDevice ( java.lang.String vmId , java.util.Map device ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "VM.updateDevice" ) . withParameter ( "vmID" , vmId ) . withParameter ( "params" , device ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturn ( response ) ; }
Source:
public void setPmProxyPreferences ( java.lang.String value ) { java.lang.String [ ] array = value.split ( "," ) ; java.util.List < java.lang.String > list = new java.util.ArrayList < java.lang.String > ( ) ; for ( java.lang.String item : array ) { list.add ( item ) ; } getPmProxyPreferencesList ( ) . setItems ( list ) ; }

Target:
public void setPmProxyPreferences ( java.lang.String value ) { java.lang.String [ ] array = value.split ( "," ) ; java.util.List < org.ovirt.engine.ui.uicommonweb.models.hosts.FenceProxyModel > list = new java.util.ArrayList < > ( ) ; for ( java.lang.String item : array ) { org.ovirt.engine.ui.uicommonweb.models.hosts.FenceProxyModel model = new org.ovirt.engine.ui.uicommonweb.models.hosts.FenceProxyModel ( ) ; model.setEntity ( org.ovirt.engine.core.common.businessentities.pm.FenceProxySourceType.forValue ( item ) ) ; list.add ( model ) ; } getPmProxyPreferencesList ( ) . setItems ( list ) ; }
Source:
private boolean CommitNewMac ( java.lang.String mac ) { availableMacs.remove ( mac ) ; allocatedMacs.add ( mac ) ; if ( availableMacs.isEmpty ( ) ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase logable = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.log ( logable , AuditLogType.MAC_POOL_EMPTY ) ; return false ; } return true ; }

Target:
private boolean commitNewMac ( java.lang.String mac ) { availableMacs.remove ( mac ) ; allocatedMacs.add ( mac ) ; if ( availableMacs.isEmpty ( ) ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase logable = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.log ( logable , AuditLogType.MAC_POOL_EMPTY ) ; return false ; } return true ; }
Source:
public org.ovirt.engine.core.common.AuditLogType getAuditLogTypeValue ( ) { return org.ovirt.engine.core.bll.MigrateVmCommand.getSucceeded ( ) ? ( org.ovirt.engine.core.bll.MigrateVmCommand.getActionReturnValue ( ) ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.Up ) ? org.ovirt.engine.core.common.AuditLogType.VM_MIGRATION_DONE : org.ovirt.engine.core.bll.MigrateVmCommand.isInternalExecution ( ) ? org.ovirt.engine.core.common.AuditLogType.VM_MIGRATION_START_SYSTEM_INITIATED : org.ovirt.engine.core.common.AuditLogType.VM_MIGRATION_START : _isRerun ? org.ovirt.engine.core.common.AuditLogType.VM_MIGRATION_TRYING_RERUN : ( org.ovirt.engine.core.bll.MigrateVmCommand.getVds ( ) . getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VDSStatus.PreparingForMaintenance ) ? org.ovirt.engine.core.common.AuditLogType.VM_MIGRATION_FAILED_DURING_MOVE_TO_MAINTENANCE : ( getDestinationVds ( ) ) == null ? org.ovirt.engine.core.common.AuditLogType.VM_MIGRATION_FAILED_NO_VDS_TO_RUN_ON : org.ovirt.engine.core.common.AuditLogType.VM_MIGRATION_FAILED ; }

Target:
public org.ovirt.engine.core.common.AuditLogType getAuditLogTypeValue ( ) { return org.ovirt.engine.core.bll.MigrateVmCommand.getSucceeded ( ) ? ( org.ovirt.engine.core.bll.MigrateVmCommand.getActionReturnValue ( ) ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.Up ) ? org.ovirt.engine.core.common.AuditLogType.VM_MIGRATION_DONE : getAuditLogForMigrationStarted ( ) : _isRerun ? org.ovirt.engine.core.common.AuditLogType.VM_MIGRATION_TRYING_RERUN : getAuditLogForMigrationFailure ( ) ; }
Source:
public void getHostListByDataCenter ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid spId ) { 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.VDS > list = org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VDS > cast ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.IVdcQueryable > ) ( source ) ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllVdsByStoragePool , new org.ovirt.engine.core.common.queries.IdQueryParameters ( spId ) , aQuery ) ; }

Target:
public 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 canDoActionPreallocatedSpaceCheckSucceeds ( ) { final int availableSize = 12 ; final int usedSize = 8 ; org.ovirt.engine.core.compat.Guid sdid = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; initializeCommand ( sdid , VolumeType.Preallocated ) ; mockVm ( ) ; mockStorageDomain ( sdid , availableSize , usedSize ) ; mockStoragePoolIsoMap ( ) ; org.junit.Assert.assertTrue ( command.canDoAction ( ) ) ; }

Target:
private static org.ovirt.engine.core.bll.validator.StorageDomainValidator mockStorageDomainValidator ( ) { org.ovirt.engine.core.bll.validator.StorageDomainValidator storageDomainValidator = org.mockito.Mockito.mock ( org.ovirt.engine.core.bll.validator.StorageDomainValidator.class ) ; org.mockito.Mockito.when ( storageDomainValidator.isDomainExistAndActive ( ) ) . thenReturn ( ValidationResult.VALID ) ; org.mockito.Mockito.when ( storageDomainValidator.isDomainWithinThresholds ( ) ) . thenReturn ( ValidationResult.VALID ) ; return storageDomainValidator ; }
Source:
private void onNumaSupport ( ) { if ( ( getWindow ( ) ) == null ) { return ; } org.ovirt.engine.ui.uicommonweb.models.hosts.numa.NumaSupportModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.hosts.numa.NumaSupportModel ) ( getWindow ( ) ) ) ; java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > updateParamsList = model.getUpdateParameters ( ) ; if ( ! ( updateParamsList.isEmpty ( ) ) ) { org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runMultipleAction ( VdcActionType.UpdateVmNumaNodes , updateParamsList ) ; } setWindow ( null ) ; }

Target:
private void onNumaSupport ( ) { if ( ( org.ovirt.engine.ui.uicommonweb.models.hosts.HostListModel.getWindow ( ) ) == null ) { return ; } org.ovirt.engine.ui.uicommonweb.models.hosts.numa.NumaSupportModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.hosts.numa.NumaSupportModel ) ( org.ovirt.engine.ui.uicommonweb.models.hosts.HostListModel.getWindow ( ) ) ) ; java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > updateParamsList = model.getUpdateParameters ( ) ; if ( ! ( updateParamsList.isEmpty ( ) ) ) { org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runMultipleAction ( VdcActionType.UpdateVmNumaNodes , updateParamsList ) ; } org.ovirt.engine.ui.uicommonweb.models.hosts.HostListModel.setWindow ( null ) ; }
Source:
public org.ovirt.engine.core.common.businessentities.network.VnicProfileView mapRow ( java.sql.ResultSet rs , int rowNum ) throws java.sql.SQLException { org.ovirt.engine.core.common.businessentities.network.VnicProfileView entity = super . mapRow ( rs , rowNum ) ; entity.setNetworkName ( rs.getString ( "network_name" ) ) ; entity.setDataCenterName ( rs.getString ( "data_center_name" ) ) ; entity.setCompatibilityVersion ( new org.ovirt.engine.core.compat.Version ( rs.getString ( "compatibility_version" ) ) ) ; return entity ; }

Target:
public org.ovirt.engine.core.common.businessentities.network.VnicProfileView mapRow ( java.sql.ResultSet rs , int rowNum ) throws java.sql.SQLException { org.ovirt.engine.core.common.businessentities.network.VnicProfileView entity = super . mapRow ( rs , rowNum ) ; entity.setNetworkName ( rs.getString ( "network_name" ) ) ; entity.setNetworkQosName ( rs.getString ( "network_qos_name" ) ) ; entity.setDataCenterName ( rs.getString ( "data_center_name" ) ) ; entity.setCompatibilityVersion ( new org.ovirt.engine.core.compat.Version ( rs.getString ( "compatibility_version" ) ) ) ; return entity ; }
Source:
public void moveDiskToGluster ( ) { initializeCommand ( new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ) ; initSrcStorageDomain ( ) ; initDestStorageDomain ( StorageType.GLUSTERFS ) ; initVmDiskImage ( false ) ; org.junit.Assert.assertTrue ( command.validate ( ) ) ; }

Target:
public void moveShareableDisk ( ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage diskImage = new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ; diskImage.setShareable ( true ) ; initializeCommand ( diskImage , VmEntityType.VM ) ; initSrcStorageDomain ( ) ; initDestStorageDomain ( StorageType.NFS ) ; org.junit.Assert.assertTrue ( command.validate ( ) ) ; }
Source:
public org.ovirt.engine.core.common.businessentities.gluster.GlusterServerHook mapRow ( java.sql.ResultSet rs , int rowNum ) throws java.sql.SQLException { org.ovirt.engine.core.common.businessentities.gluster.GlusterServerHook entity = new org.ovirt.engine.core.common.businessentities.gluster.GlusterServerHook ( ) ; entity.setHookId ( org.ovirt.engine.core.compat.Guid.createGuidFromString ( rs.getString ( "hook_id" ) ) ) ; entity.setServerId ( org.ovirt.engine.core.compat.Guid.createGuidFromString ( rs.getString ( "server_id" ) ) ) ; entity.setStatus ( rs.getString ( "hook_status" ) ) ; entity.setContentType ( rs.getString ( "content_type" ) ) ; entity.setChecksum ( rs.getString ( "checksum" ) ) ; return entity ; }

Target:
public org.ovirt.engine.core.common.businessentities.gluster.GlusterServerHook mapRow ( java.sql.ResultSet rs , int rowNum ) throws java.sql.SQLException { org.ovirt.engine.core.common.businessentities.gluster.GlusterServerHook entity = new org.ovirt.engine.core.common.businessentities.gluster.GlusterServerHook ( ) ; entity.setHookId ( org.ovirt.engine.core.compat.Guid.createGuidFromString ( rs.getString ( "hook_id" ) ) ) ; entity.setServerId ( org.ovirt.engine.core.compat.Guid.createGuidFromString ( rs.getString ( "server_id" ) ) ) ; entity.setStatus ( rs.getString ( "hook_status" ) ) ; entity.setContentType ( rs.getString ( "content_type" ) ) ; entity.setChecksum ( rs.getString ( "checksum" ) ) ; entity.setServerName ( rs.getString ( "server_name" ) ) ; return entity ; }
Source:
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 ) ; }

Target:
public static void getExistingStorageDomainList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hostId , org.ovirt.engine.core.common.businessentities.StorageDomainType domainType , org.ovirt.engine.core.common.businessentities.StorageType storageType , java.lang.String path ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetExistingStorageDomainList , new org.ovirt.engine.core.common.queries.GetExistingStorageDomainListParameters ( hostId , storageType , domainType , path ) , aQuery ) ; }
Source:
private static java.lang.String encrypt ( java.lang.String source , java.security.cert.Certificate cert ) throws java.io.UnsupportedEncodingException , java.security.GeneralSecurityException { javax.crypto.Cipher rsa = javax.crypto.Cipher.getInstance ( org.ovirt.engine.core.utils.crypt.EncryptionUtils.algo ) ; rsa.init ( javax.crypto.Cipher.ENCRYPT_MODE , cert.getPublicKey ( ) ) ; return new org.apache.commons.codec.binary.Base64 ( 0 ) . encodeToString ( rsa.doFinal ( source.trim ( ) . getBytes ( "UTF-8" ) ) ) ; }

Target:
private static java.lang.String encrypt ( java.lang.String source , java.security.cert.Certificate cert ) throws java.security.GeneralSecurityException { javax.crypto.Cipher rsa = javax.crypto.Cipher.getInstance ( org.ovirt.engine.core.utils.crypt.EncryptionUtils.algo ) ; rsa.init ( javax.crypto.Cipher.ENCRYPT_MODE , cert.getPublicKey ( ) ) ; return new org.apache.commons.codec.binary.Base64 ( 0 ) . encodeToString ( rsa.doFinal ( source.trim ( ) . getBytes ( java.nio.charset.Charset.forName ( "UTF-8" ) ) ) ) ; }
Source:
public void getAllAttachableDisks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.Disk > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.Disk > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetAllAttachableDisksForVmQueryParameters params = new org.ovirt.engine.core.common.queries.GetAllAttachableDisksForVmQueryParameters ( storagePoolId ) ; params.setVmId ( vmId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllAttachableDisksForVm , params , aQuery ) ; }

Target:
public void 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:
private org.ovirt.engine.core.common.businessentities.StorageDomain addNewStorageDomainToDisk ( org.ovirt.engine.core.common.businessentities.DiskImage diskImage , org.ovirt.engine.core.common.businessentities.StorageType storageType ) { org.ovirt.engine.core.common.businessentities.StorageDomain storage = new org.ovirt.engine.core.common.businessentities.StorageDomain ( ) ; storage.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; storage.setStorageType ( storageType ) ; storage.setStatus ( StorageDomainStatus.Active ) ; diskImage.setStorageIds ( new java.util.ArrayList ( java.util.Collections.singletonList ( storage.getId ( ) ) ) ) ; return storage ; }

Target:
private org.ovirt.engine.core.common.businessentities.StorageDomain addNewStorageDomainToDisk ( org.ovirt.engine.core.common.businessentities.storage.DiskImage diskImage , org.ovirt.engine.core.common.businessentities.storage.StorageType storageType ) { org.ovirt.engine.core.common.businessentities.StorageDomain storage = new org.ovirt.engine.core.common.businessentities.StorageDomain ( ) ; storage.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; storage.setStorageType ( storageType ) ; storage.setStatus ( StorageDomainStatus.Active ) ; diskImage.setStorageIds ( new java.util.ArrayList ( java.util.Collections.singletonList ( storage.getId ( ) ) ) ) ; return storage ; }
Source:
private java.lang.String createRdpInvocationInfo ( ) { return new org.ovirt.engine.ui.common.view.popup.ConsolePopupView.KeyValueHtmlRowMaker ( constants.auto ( ) , constants.rdpInvokeAuto ( ) ) . append ( constants.nativeClient ( ) , constants.rdpInvokeNative ( ) ) . append ( constants.browserPlugin ( ) , constants.rdpInvokePlugin ( ) ) . toString ( ) ; }

Target:
private java.lang.String createRdpInvocationInfo ( ) { return new org.ovirt.engine.ui.common.view.popup.ConsolePopupView.KeyValueHtmlRowMaker ( org.ovirt.engine.ui.common.view.popup.ConsolePopupView.constants.auto ( ) , org.ovirt.engine.ui.common.view.popup.ConsolePopupView.constants.rdpInvokeAuto ( ) ) . append ( org.ovirt.engine.ui.common.view.popup.ConsolePopupView.constants.nativeClient ( ) , org.ovirt.engine.ui.common.view.popup.ConsolePopupView.constants.rdpInvokeNative ( ) ) . append ( org.ovirt.engine.ui.common.view.popup.ConsolePopupView.constants.browserPlugin ( ) , org.ovirt.engine.ui.common.view.popup.ConsolePopupView.constants.rdpInvokePlugin ( ) ) . toString ( ) ; }
Source:
public static void GetExistingStorageDomainList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hostId , org.ovirt.engine.core.common.businessentities.StorageDomainType domainType , java.lang.String path ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetExistingStorageDomainList , new org.ovirt.engine.core.common.queries.GetExistingStorageDomainListParameters ( hostId , org.ovirt.engine.core.common.businessentities.StorageType.NFS , domainType , path ) , aQuery ) ; }

Target:
public static void GetStorageDomainList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) ; } } ; org.ovirt.engine.core.common.queries.SearchParameters searchParams = new org.ovirt.engine.core.common.queries.SearchParameters ( "Storage:" , org.ovirt.engine.core.common.interfaces.SearchType.StorageDomain ) ; searchParams.setMaxCount ( 9999 ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.Search , searchParams , aQuery ) ; }
Source:
public void filterUnSelectableModels ( ) { super . filterUnSelectableModels ( ) ; if ( getModel ( ) . getAvailableStorageItems ( ) . getItems ( ) . isEmpty ( ) ) { getModel ( ) . getDataCenterAlert ( ) . setIsAvailable ( true ) ; getModel ( ) . getDataCenterAlert ( ) . setEntity ( org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getConstants ( ) . noStoragesToImport ( ) ) ; } }

Target:
public void setStorageItems ( ) { super . setStorageItems ( ) ; if ( getSelectableModels ( ) . isEmpty ( ) ) { getModel ( ) . getDataCenterAlert ( ) . setIsAvailable ( true ) ; getModel ( ) . getDataCenterAlert ( ) . setEntity ( org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getConstants ( ) . noStoragesToImport ( ) ) ; } }
Source:
private org.ovirt.engine.core.compat.Guid createMemoryMetadataDisk ( ) { org.ovirt.engine.core.common.businessentities.DiskImage image = new org.ovirt.engine.core.common.businessentities.DiskImage ( ) ; image.setDiskAlias ( java.lang.String.format ( "%s_hibernation_metadata" , org.ovirt.engine.core.bll.HibernateVmCommand.getVm ( ) . getName ( ) ) ) ; image.setDescription ( "meta-data for hibernated VM" ) ; image.setSize ( MemoryUtils.META_DATA_SIZE_IN_BYTES ) ; image.setVolumeType ( VolumeType.Sparse ) ; image.setvolumeFormat ( VolumeFormat.COW ) ; image.setDiskInterface ( DiskInterface.VirtIO ) ; return addDisk ( image ) ; }

Target:
private void addDisk ( org.ovirt.engine.core.common.businessentities.storage.DiskImage disk ) { org.ovirt.engine.core.common.action.VdcReturnValueBase returnValue = runInternalActionWithTasksContext ( VdcActionType.AddDisk , buildAddDiskParameters ( disk ) ) ; if ( ! ( returnValue.getSucceeded ( ) ) ) { throw new org.ovirt.engine.core.common.errors.EngineException ( returnValue.getFault ( ) . getError ( ) , java.lang.String.format ( "Failed to create disk! %s" , disk.getDiskAlias ( ) ) ) ; } org.ovirt.engine.core.bll.HibernateVmCommand.getTaskIdList ( ) . addAll ( returnValue.getInternalVdsmTaskIdList ( ) ) ; }
Source:
protected org.ovirt.engine.core.common.businessentities.VDS getEntity ( int index ) { org.ovirt.engine.core.common.businessentities.VDS host = control.createMock ( org.ovirt.engine.core.common.businessentities.VDS.class ) ; org.easymock.EasyMock.expect ( host.getId ( ) ) . andReturn ( GUIDS [ index ] ) . anyTimes ( ) ; org.easymock.EasyMock.expect ( host.getName ( ) ) . andReturn ( NAMES [ index ] ) . anyTimes ( ) ; return host ; }

Target:
protected org.ovirt.engine.core.common.businessentities.VDS getEntity ( int index ) { org.ovirt.engine.core.common.businessentities.VDS host = org.mockito.Mockito.mock ( org.ovirt.engine.core.common.businessentities.VDS.class ) ; org.mockito.Mockito.when ( host.getId ( ) ) . thenReturn ( GUIDS [ index ] ) ; org.mockito.Mockito.when ( host.getName ( ) ) . thenReturn ( NAMES [ index ] ) ; return host ; }
Source:
public static java.util.List < org.ovirt.engine.ui.uicommonweb.models.storage.IStorageModel > getIsoStorageModels ( ) { java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.storage.IStorageModel > models = new java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.storage.IStorageModel > ( ) ; org.ovirt.engine.ui.uicommonweb.models.storage.NfsStorageModel nfsIsoModel = new org.ovirt.engine.ui.uicommonweb.models.storage.NfsStorageModel ( ) ; models.add ( nfsIsoModel ) ; org.ovirt.engine.ui.uicommonweb.models.storage.PosixStorageModel posixIsoModel = new org.ovirt.engine.ui.uicommonweb.models.storage.PosixStorageModel ( ) ; models.add ( posixIsoModel ) ; org.ovirt.engine.ui.uicommonweb.models.storage.LocalStorageModel localIsoModel = new org.ovirt.engine.ui.uicommonweb.models.storage.LocalStorageModel ( ) ; models.add ( localIsoModel ) ; for ( org.ovirt.engine.ui.uicommonweb.models.storage.IStorageModel model : models ) { model.setRole ( StorageDomainType.ISO ) ; } return models ; }

Target:
public static java.util.List < org.ovirt.engine.ui.uicommonweb.models.storage.IStorageModel > getIsoStorageModels ( ) { java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.storage.IStorageModel > models = new java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.storage.IStorageModel > ( ) ; org.ovirt.engine.ui.uicommonweb.models.storage.NfsStorageModel nfsIsoModel = new org.ovirt.engine.ui.uicommonweb.models.storage.NfsStorageModel ( ) ; models.add ( nfsIsoModel ) ; org.ovirt.engine.ui.uicommonweb.models.storage.PosixStorageModel posixIsoModel = new org.ovirt.engine.ui.uicommonweb.models.storage.PosixStorageModel ( ) ; models.add ( posixIsoModel ) ; org.ovirt.engine.ui.uicommonweb.models.storage.LocalStorageModel localIsoModel = new org.ovirt.engine.ui.uicommonweb.models.storage.LocalStorageModel ( ) ; models.add ( localIsoModel ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.addTypeToStorageModels ( StorageDomainType.ISO , models ) ; return models ; }
Source:
private void addCollectionAction ( java.lang.String rel , java.lang.String [ ] periods , int i , java.lang.String period , org.ovirt.engine.sdk.codegen.holders.ResourceHolder resourceHolder , org.ovirt.engine.sdk.entities.DetailedLink detailedLink ) { java.lang.String methodName = getActionMethodName ( period , periods [ ( i - 3 ) ] ) ; if ( ! ( resourceHolder.hasMethod ( period ) ) ) { java.lang.String docParams = org.ovirt.engine.sdk.codegen.documentation.DocsGen.generate ( detailedLink ) ; resourceHolder.addMethod ( period , this . resourceActionMethodTemplate.getTemplate ( methodName , rel , docParams , detailedLink ) ) ; } }

Target:
private void addCollectionAction ( java.lang.String rel , java.lang.String [ ] periods , int i , java.lang.String period , org.ovirt.engine.sdk.codegen.holders.ResourceHolder resourceHolder , org.ovirt.engine.sdk.entities.DetailedLink detailedLink ) { java.lang.String methodName = getActionMethodName ( period , periods [ ( i - 3 ) ] ) ; if ( ! ( resourceHolder.hasMethod ( period ) ) ) { java.lang.String docParams = org.ovirt.engine.sdk.codegen.documentation.DocsGen.generateBodyParams ( detailedLink ) ; resourceHolder.addMethod ( period , this . resourceActionMethodTemplate.getTemplate ( methodName , rel , docParams , detailedLink ) ) ; } }