auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public static void getVmSnapshotList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllVmSnapshotsByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
public static void getoVirtISOsList ( 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.compat.RpmVersion > ( ( ( java.util.ArrayList < org.ovirt.engine.core.compat.RpmVersion > ) ( source ) ) ) : new java.util.ArrayList < org.ovirt.engine.core.compat.RpmVersion > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetoVirtISOs , new org.ovirt.engine.core.common.queries.VdsIdParametersBase ( id ) , aQuery ) ; }
Source:
private void setupVdsNetworkInterfaceDao ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > expectedVdsNetworkInterface = java.util.Collections.singletonList ( vdsNetworkInterface ) ; org.ovirt.engine.core.dao.network.InterfaceDao vdsNetworkInterfaceDaoMock = org.mockito.Mockito.mock ( org.ovirt.engine.core.dao.network.InterfaceDao.class ) ; org.mockito.Mockito.when ( vdsNetworkInterfaceDaoMock.getVdsInterfacesByNetworkId ( networkId ) ) . thenReturn ( expectedVdsNetworkInterface ) ; org.mockito.Mockito.when ( getDbFacadeMockInstance ( ) . getInterfaceDao ( ) ) . thenReturn ( vdsNetworkInterfaceDaoMock ) ; }

Target:
private void setupVdsNetworkInterfaceDao ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > expectedVdsNetworkInterface = java.util.Collections.singletonList ( vdsNetworkInterface ) ; org.mockito.Mockito.when ( interfaceDaoMocked.getVdsInterfacesByNetworkId ( networkId ) ) . thenReturn ( expectedVdsNetworkInterface ) ; }
Source:
public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; }

Target:
public java.util.List < org.ovirt.engine.core.common.businessentities.Cluster > convert ( java.lang.Object source ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Cluster > list = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Cluster > ) ( source ) ) ; return getClusterByServiceList ( list , supportsVirtService , supportsGlusterService ) ; } return new java.util.ArrayList < > ( ) ; }
Source:
public org.ovirt.engine.core.common.action.VdcReturnValueBase login ( org.ovirt.engine.core.common.action.LoginUserParameters parameters ) { switch ( parameters.getActionType ( ) ) { case LoginUser : case LoginAdminUser : org.ovirt.engine.core.bll.CommandBase < ? > command = org.ovirt.engine.core.bll.CommandsFactory.CreateCommand ( parameters.getActionType ( ) , parameters ) ; command.insertAsyncTaskPlaceHolders ( ) ; return command.executeAction ( ) ; default : return getErrorCommandReturnValue ( VdcBllMessages.USER_NOT_AUTHORIZED_TO_PERFORM_ACTION ) ; } }

Target:
public org.ovirt.engine.core.common.action.VdcReturnValueBase login ( org.ovirt.engine.core.common.action.LoginUserParameters parameters ) { switch ( parameters.getActionType ( ) ) { case LoginUser : case LoginAdminUser : org.ovirt.engine.core.bll.CommandBase < ? > command = org.ovirt.engine.core.bll.CommandsFactory.createCommand ( parameters.getActionType ( ) , parameters ) ; command.insertAsyncTaskPlaceHolders ( ) ; return command.executeAction ( ) ; default : return getErrorCommandReturnValue ( VdcBllMessages.USER_NOT_AUTHORIZED_TO_PERFORM_ACTION ) ; } }
Source:
private void assertLabelBeingAttachedToValidBondFailed ( org.ovirt.engine.core.common.action.HostSetupNetworksParameters params , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > nics = java.util.Arrays.asList ( nic ) ; org.ovirt.engine.core.common.businessentities.network.NicLabel nicLabel = new org.ovirt.engine.core.common.businessentities.network.NicLabel ( nic.getId ( ) , nic.getName ( ) , "lbl1" ) ; org.junit.Assert.assertThat ( createNicLabelValidator ( params , nics ) . labelBeingAttachedToValidBond ( nicLabel ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.IMPROPER_BOND_IS_LABELED , org.ovirt.engine.core.utils.ReplacementUtils.createSetVariableString ( HostInterfaceValidator.VAR_BOND_NAME , nic.getName ( ) ) ) ) ; }

Target:
private void assertLabelBeingAttachedToValidBondFailed ( org.ovirt.engine.core.common.action.HostSetupNetworksParameters params , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > nics = java.util.Collections.singletonList ( nic ) ; org.ovirt.engine.core.common.businessentities.network.NicLabel nicLabel = new org.ovirt.engine.core.common.businessentities.network.NicLabel ( nic.getId ( ) , nic.getName ( ) , "lbl1" ) ; org.junit.Assert.assertThat ( createNicLabelValidator ( params , nics ) . labelBeingAttachedToValidBond ( nicLabel ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.IMPROPER_BOND_IS_LABELED , org.ovirt.engine.core.utils.ReplacementUtils.createSetVariableString ( HostInterfaceValidator.VAR_BOND_NAME , nic.getName ( ) ) ) ) ; }
Source:
com.google.gwt.user.client.ui.Grid createBlankRow ( final org.ovirt.engine.ui.uicommonweb.models.hosts.HostInterfaceLineModel lineModel ) { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface = ( lineModel.getIsBonded ( ) ) ? lineModel.getInterface ( ) : lineModel.getInterfaces ( ) . get ( 0 ) . getInterface ( ) ; return createBaseVlanRow ( new com.google.gwt.user.client.ui.Label ( ) , lineModel.getIsManagement ( ) , lineModel.getNetworkName ( ) , iface.getNetworkImplementationDetails ( ) , lineModel.getAddress ( ) ) ; }

Target:
com.google.gwt.user.client.ui.Grid createBlankRow ( final org.ovirt.engine.ui.uicommonweb.models.hosts.HostInterfaceLineModel lineModel ) { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface = ( lineModel.getIsBonded ( ) ) ? lineModel.getInterface ( ) : lineModel.getInterfaces ( ) . get ( 0 ) . getInterface ( ) ; return createBaseVlanRow ( new com.google.gwt.user.client.ui.Label ( ) , lineModel.getIsManagement ( ) , lineModel.getNetworkName ( ) , iface.getNetworkImplementationDetails ( ) , lineModel.getIpv4Address ( ) , lineModel.getIpv6Address ( ) ) ; }
Source:
static void printDataPointDetails ( java.util.List < org.ovirt.engine.core.common.businessentities.network.VnicProfileView > views , org.ovirt.engine.core.common.businessentities.network.ExternalVnicProfileMapping mapping , int count , java.lang.String description ) { java.lang.System.out.println ( java.lang.String.format ( "[%s - %d] profile view from dao [%s], input mapping {%s}" , description , count , org.ovirt.engine.core.bll.exportimport.vnics.MapVnicFlowTestUtils.printProfileViews ( views ) , org.ovirt.engine.core.bll.exportimport.vnics.MapVnicFlowTestUtils.printMapping ( mapping ) ) ) ; }

Target:
static void printDataPointDetails ( java.util.List < org.ovirt.engine.core.common.businessentities.network.VnicProfileView > views , org.ovirt.engine.core.common.businessentities.network.ExternalVnicProfileMapping mapping , int count , java.lang.String description ) { if ( ! ( org.ovirt.engine.core.bll.exportimport.vnics.MapVnicFlowTestUtils.GENERATE_DEBUG_INFO ) ) { return ; } java.lang.System.out.println ( java.lang.String.format ( "[%s - %d] profile view from dao [%s], input mapping {%s}" , description , count , org.ovirt.engine.core.bll.exportimport.vnics.MapVnicFlowTestUtils.printProfileViews ( views ) , org.ovirt.engine.core.bll.exportimport.vnics.MapVnicFlowTestUtils.printMapping ( mapping ) ) ) ; }
Source:
public static void getVnicProfilesByNetworkId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid networkId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VnicProfileView > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVnicProfilesByNetworkId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( networkId ) , aQuery ) ; }

Target:
public static void getAllVnicProfiles ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VnicProfileView > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllVnicProfiles , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }
Source:
public void testGetFilteredWithPermissions ( ) { org.ovirt.engine.core.common.businessentities.storage.Disk result = dao.get ( getExistingEntityId ( ) , org.ovirt.engine.core.dao.PRIVILEGED_USER_ID , true ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertEquals ( getExistingEntityId ( ) . toString ( ) , result.getId ( ) . toString ( ) ) ; }

Target:
public void testGetFilteredWithPermissions ( ) { org.ovirt.engine.core.common.businessentities.storage.Disk result = dao.get ( getExistingEntityId ( ) , org.ovirt.engine.core.dao.PRIVILEGED_USER_ID , true ) ; org.junit.jupiter.api.Assertions.assertNotNull ( result ) ; org.junit.jupiter.api.Assertions.assertEquals ( getExistingEntityId ( ) . toString ( ) , result.getId ( ) . toString ( ) ) ; }
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 < > ( ( ( 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 getVmNicList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? new java.util.ArrayList < > ( ( ( 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.GetVmInterfacesByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
public static void getDiskList ( 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.DiskImage > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ( ) ; } } ; org.ovirt.engine.core.common.queries.SearchParameters searchParams = new org.ovirt.engine.core.common.queries.SearchParameters ( "Disks:" , org.ovirt.engine.core.common.interfaces.SearchType.Disk ) ; searchParams.setMaxCount ( 9999 ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.Search , searchParams , aQuery ) ; }

Target:
public static void getVmsRunningOnOrMigratingToVds ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmsRunningOnOrMigratingToVds , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
public static void GetVmById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmByVmId , new org.ovirt.engine.core.common.queries.GetVmByVmIdParameters ( vmId ) , aQuery ) ; }

Target:
public static void GetClusterById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVdsGroupById , new org.ovirt.engine.core.common.queries.GetVdsGroupByIdParameters ( id ) , aQuery ) ; }
Source:
public void getStorageDomainById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storageDomainId ) { 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.StorageDomain ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( storageDomainId ) , aQuery ) ; }

Target:
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 ) { return org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VDS > cast ( ( ( java.util.List < ? > ) ( source ) ) ) ; } 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 ) ; }
Source:
private void saveGlusterStorage ( ) { if ( ( getWindow ( ) . getProgress ( ) ) != null ) { return ; } getWindow ( ) . startProgress ( null ) ; org.ovirt.engine.ui.uicompat.Task.create ( this , new java.util.ArrayList < java.lang.Object > ( java.util.Arrays.asList ( new java.lang.Object [ ] { "SaveGluster" } ) ) ) . run ( ) ; }

Target:
private void cancelImportConfirm ( ) { cancelConfirm ( ) ; getWindow ( ) . stopProgress ( ) ; if ( ( fileConnection ) != null ) { org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runAction ( VdcActionType.DisconnectStorageServerConnection , new org.ovirt.engine.core.common.action.StorageServerConnectionParametersBase ( fileConnection , hostId ) , new org.ovirt.engine.ui.uicompat.IFrontendActionAsyncCallback ( ) { @ java.lang.Override 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 ( ) ) ) ; cleanConnection ( storageListModel.fileConnection , storageListModel.hostId ) ; storageListModel.fileConnection = null ; } } , this ) ; } }
Source:
private org.ovirt.engine.core.common.action.ActionReturnValue addNetwork ( org.ovirt.engine.core.compat.Guid dataCenterId , org.ovirt.engine.core.common.businessentities.network.Network network ) { org.ovirt.engine.core.common.action.AddNetworkStoragePoolParameters params = new org.ovirt.engine.core.common.action.AddNetworkStoragePoolParameters ( dataCenterId , network ) ; params.setVnicProfileRequired ( false ) ; return runInternalAction ( ActionType.AddNetwork , params ) ; }

Target:
private org.ovirt.engine.core.common.action.ActionReturnValue addNetwork ( org.ovirt.engine.core.compat.Guid dataCenterId , org.ovirt.engine.core.common.businessentities.network.Network network , boolean attachToAllClusters ) { org.ovirt.engine.core.common.action.AddNetworkStoragePoolParameters params = new org.ovirt.engine.core.common.action.AddNetworkStoragePoolParameters ( dataCenterId , network ) ; params.setVnicProfileRequired ( false ) ; if ( attachToAllClusters ) { params.setNetworkClusterList ( networkHelper.createNetworkClusters ( getAllClusterIdsInDataCenter ( dataCenterId ) ) ) ; } return runInternalAction ( ActionType.AddNetwork , params ) ; }
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.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmConfigurationBySnapshot , new org.ovirt.engine.core.common.queries.IdQueryParameters ( snapshotSourceId ) , 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:
private org.ovirt.engine.core.bll.context.CommandContext createContextForStatelessSnapshotCreation ( ) { java.util.Map < java.lang.String , java.lang.String > values = getVmValuesForMsgResolving ( ) ; org.ovirt.engine.core.common.job.Step createSnapshotsStep = addSubStep ( StepEnum.EXECUTING , StepEnum.CREATING_SNAPSHOTS , values ) ; org.ovirt.engine.core.bll.job.ExecutionContext createSnapshotsCtx = new org.ovirt.engine.core.bll.job.ExecutionContext ( ) ; createSnapshotsCtx.setMonitored ( true ) ; createSnapshotsCtx.setStep ( createSnapshotsStep ) ; return new org.ovirt.engine.core.bll.context.CommandContext ( createSnapshotsCtx , org.ovirt.engine.core.bll.RunVmCommand.getCompensationContext ( ) , org.ovirt.engine.core.bll.RunVmCommand.getLock ( ) ) ; }

Target:
private org.ovirt.engine.core.bll.context.CommandContext createContextForStatelessSnapshotCreation ( ) { java.util.Map < java.lang.String , java.lang.String > values = getVmValuesForMsgResolving ( ) ; org.ovirt.engine.core.common.job.Step createSnapshotsStep = addSubStep ( StepEnum.EXECUTING , StepEnum.CREATING_SNAPSHOTS , values ) ; org.ovirt.engine.core.bll.job.ExecutionContext createSnapshotsCtx = new org.ovirt.engine.core.bll.job.ExecutionContext ( ) ; createSnapshotsCtx.setMonitored ( true ) ; createSnapshotsCtx.setStep ( createSnapshotsStep ) ; return org.ovirt.engine.core.bll.RunVmCommand.dupContext ( ) . withExecutionContext ( createSnapshotsCtx ) ; }
Source:
public void validationSucceeds ( ) { org.mockito.Mockito.when ( hostValidator.hostExists ( ) ) . thenReturn ( ValidationResult.VALID ) ; org.mockito.Mockito.when ( hostValidator.isUp ( ) ) . thenReturn ( ValidationResult.VALID ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateSuccess ( command ) ; }

Target:
public void validationSucceeds ( ) { org.mockito.Mockito.when ( hostValidator.hostExists ( ) ) . thenReturn ( ValidationResult.VALID ) ; org.mockito.Mockito.when ( hostValidator.isUp ( ) ) . thenReturn ( ValidationResult.VALID ) ; org.mockito.Mockito.doReturn ( true ) . when ( command ) . checkStorageDomain ( ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateSuccess ( command ) ; }
Source:
public java.util.List < org.ovirt.engine.ui.uicommonweb.models.storage.IStorageModel > getExportStorageModels ( ) { 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 nfsExportModel = new org.ovirt.engine.ui.uicommonweb.models.storage.NfsStorageModel ( ) ; models.add ( nfsExportModel ) ; org.ovirt.engine.ui.uicommonweb.models.storage.PosixStorageModel posixExportModel = new org.ovirt.engine.ui.uicommonweb.models.storage.PosixStorageModel ( ) ; models.add ( posixExportModel ) ; org.ovirt.engine.ui.uicommonweb.models.storage.GlusterStorageModel glusterExportModel = new org.ovirt.engine.ui.uicommonweb.models.storage.GlusterStorageModel ( ) ; models.add ( glusterExportModel ) ; addTypeToStorageModels ( StorageDomainType.ImportExport , models ) ; return models ; }

Target:
public java.util.List < org.ovirt.engine.ui.uicommonweb.models.storage.IStorageModel > getExportStorageModels ( ) { 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 nfsExportModel = new org.ovirt.engine.ui.uicommonweb.models.storage.NfsStorageModel ( ) ; models.add ( nfsExportModel ) ; org.ovirt.engine.ui.uicommonweb.models.storage.PosixStorageModel posixExportModel = new org.ovirt.engine.ui.uicommonweb.models.storage.PosixStorageModel ( ) ; models.add ( posixExportModel ) ; org.ovirt.engine.ui.uicommonweb.models.storage.GlusterStorageModel glusterExportModel = new org.ovirt.engine.ui.uicommonweb.models.storage.GlusterStorageModel ( ) ; models.add ( glusterExportModel ) ; org.ovirt.engine.ui.uicommonweb.models.storage.LocalStorageModel localExportStorageModel = new org.ovirt.engine.ui.uicommonweb.models.storage.LocalStorageModel ( ) ; models.add ( localExportStorageModel ) ; addTypeToStorageModels ( StorageDomainType.ImportExport , models ) ; return models ; }
Source:
public static void getDataCentersByStorageDomain ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storageDomainId ) { 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.StoragePool > ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetStoragePoolsByStorageDomainId , new org.ovirt.engine.core.common.queries.StorageDomainQueryParametersBase ( storageDomainId ) , aQuery ) ; }

Target:
public static void isVmNameUnique ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String name ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ! ( ( ( java.lang.Boolean ) ( source ) ) . booleanValue ( ) ) : false ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.IsVmWithSameNameExist , new org.ovirt.engine.core.common.queries.NameQueryParameters ( name ) , aQuery ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { java.lang.Boolean interfaceHasSiblingVlanInterfaces = ( ( java.lang.Boolean ) ( returnValue ) ) ; if ( ! interfaceHasSiblingVlanInterfaces ) { for ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface i : interfaceList ) { if ( java.util.Objects.equals ( i.getBondName ( ) , vlanParent.getName ( ) ) ) { ifacesOptions.add ( i ) ; } } } defaultInterfaceName.append ( vlanParent.getName ( ) ) ; asyncQuery.asyncCallback.onSuccess ( asyncQuery.model , ifacesOptions ) ; }

Target:
public boolean isEnableDeprecatedClientModeSpicePlugin ( ) { return ( ( java.lang.Boolean ) ( getConfigValuePreConverted ( ConfigurationValues.EnableDeprecatedClientModeSpicePlugin , getDefaultConfigurationVersion ( ) ) ) ) ; }
Source:
public void shouldDetectSameOs ( ) { org.assertj.core.api.Assertions.assertThat ( new org.ovirt.engine.core.utils.OS ( "os1" , new org.ovirt.engine.core.compat.Version ( "6.3" ) ) . isSameOsFamily ( new org.ovirt.engine.core.utils.OS ( "os1" , new org.ovirt.engine.core.compat.Version ( "6.3" ) ) ) ) . isTrue ( ) ; }

Target:
public void shouldDetectDifferentOs ( ) { org.assertj.core.api.Assertions.assertThat ( new org.ovirt.engine.core.utils.OS ( "os1" , new org.ovirt.engine.core.compat.Version ( "6.3" ) , "" ) . isSameOsFamily ( new org.ovirt.engine.core.utils.OS ( "os2" , new org.ovirt.engine.core.compat.Version ( "6.3" ) , "" ) ) ) . isFalse ( ) ; }
Source:
protected void executeCommand ( ) { final org.ovirt.engine.core.compat.Guid providerId = org.ovirt.engine.core.bll.provider.RemoveProviderCommand.getParameters ( ) . getProvider ( ) . getId ( ) ; org.ovirt.engine.core.bll.provider.ProviderProxy providerProxy = org.ovirt.engine.core.bll.provider.ProviderProxyFactory.getInstance ( ) . create ( org.ovirt.engine.core.bll.provider.RemoveProviderCommand.getParameters ( ) . getProvider ( ) ) ; if ( providerProxy != null ) { providerProxy.onRemoval ( ) ; } org.ovirt.engine.core.bll.provider.RemoveProviderCommand.getProviderDao ( ) . remove ( providerId ) ; org.ovirt.engine.core.bll.provider.RemoveProviderCommand.setSucceeded ( true ) ; }

Target:
protected void executeCommand ( ) { final org.ovirt.engine.core.compat.Guid providerId = org.ovirt.engine.core.bll.provider.RemoveProviderCommand.getParameters ( ) . getProvider ( ) . getId ( ) ; if ( ( getProviderProxy ( ) ) != null ) { getProviderProxy ( ) . onRemoval ( ) ; } org.ovirt.engine.core.bll.provider.RemoveProviderCommand.getProviderDao ( ) . remove ( providerId ) ; org.ovirt.engine.core.bll.provider.RemoveProviderCommand.setSucceeded ( true ) ; }
Source:
protected void executeVdsBrokerCommand ( ) { if ( getVds ( ) . getHighlyAvailableIsConfigured ( ) ) { try { status = getBroker ( ) . setHaMaintenanceMode ( getParameters ( ) . getMode ( ) . name ( ) , getParameters ( ) . isEnabled ( ) ) ; proceedProxyReturnValue ( ) ; } catch ( java.lang.RuntimeException e ) { setVdsRuntimeError ( e ) ; getVDSReturnValue ( ) . setExceptionString ( null ) ; } } }

Target:
protected void executeVdsBrokerCommand ( ) { if ( getVds ( ) . getHighlyAvailableIsConfigured ( ) ) { try { status = getBroker ( ) . setHaMaintenanceMode ( getParameters ( ) . getMode ( ) . name ( ) , getParameters ( ) . isEnabled ( ) ) ; proceedProxyReturnValue ( ) ; } catch ( java.lang.RuntimeException e ) { setVdsRuntimeErrorAndReport ( e ) ; getVDSReturnValue ( ) . setExceptionString ( null ) ; } } }
Source:
public boolean executeUpdateVmInSpmCommand ( org.ovirt.engine.core.compat.Guid storagePoolId , java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.compat.KeyValuePairCompat < java.lang.String , java.util.List < org.ovirt.engine.core.compat.Guid > > > metaDictionary , org.ovirt.engine.core.compat.Guid storageDomainId ) { org.ovirt.engine.core.common.vdscommands.UpdateVMVDSCommandParameters tempVar = new org.ovirt.engine.core.common.vdscommands.UpdateVMVDSCommandParameters ( storagePoolId , metaDictionary ) ; tempVar.setStorageDomainId ( storageDomainId ) ; return org.ovirt.engine.core.bll.Backend.getInstance ( ) . getResourceManager ( ) . RunVdsCommand ( VDSCommandType.UpdateVM , tempVar ) . getSucceeded ( ) ; }

Target:
public boolean executeUpdateVmInSpmCommand ( org.ovirt.engine.core.compat.Guid storagePoolId , java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.compat.KeyValuePairCompat < java.lang.String , java.util.List < org.ovirt.engine.core.compat.Guid > > > metaDictionary , org.ovirt.engine.core.compat.Guid storageDomainId ) { org.ovirt.engine.core.common.vdscommands.UpdateVMVDSCommandParameters tempVar = new org.ovirt.engine.core.common.vdscommands.UpdateVMVDSCommandParameters ( storagePoolId , metaDictionary ) ; tempVar.setStorageDomainId ( storageDomainId ) ; return org.ovirt.engine.core.bll.Backend.getInstance ( ) . getResourceManager ( ) . runVdsCommand ( VDSCommandType.UpdateVM , tempVar ) . getSucceeded ( ) ; }
Source:
private void assertEqualsTagsVmMap ( org.ovirt.engine.core.common.businessentities.TagsVmMap existing , org.ovirt.engine.core.common.businessentities.TagsVmMap result ) { org.junit.Assert.assertEquals ( "TG is not equal" , existing.getTagId ( ) , result.getTagId ( ) ) ; org.junit.Assert.assertEquals ( "VM id not equal " , existing.getVmId ( ) , result.getVmId ( ) ) ; org.junit.Assert.assertEquals ( "Object equation" , existing , result ) ; }

Target:
private void assertEqualsTagsVmMap ( org.ovirt.engine.core.common.businessentities.TagsVmMap existing , org.ovirt.engine.core.common.businessentities.TagsVmMap result ) { org.junit.jupiter.api.Assertions.assertEquals ( existing.getTagId ( ) , result.getTagId ( ) , "TG is not equal" ) ; org.junit.jupiter.api.Assertions.assertEquals ( existing.getVmId ( ) , result.getVmId ( ) , "VM id not equal" ) ; org.junit.jupiter.api.Assertions.assertEquals ( existing , result , "Object equation" ) ; }
Source:
protected void setAllowChangeHostPlacementPropertiesWhenNotInMaintenance ( ) { getDataCenter ( ) . setChangeProhibitionReason ( "Data Center can be changed only when the Host is in Maintenance mode." ) ; getDataCenter ( ) . setIsChangable ( false ) ; getCluster ( ) . setChangeProhibitionReason ( "Cluster can be changed only when the Host is in Maintenance mode." ) ; getCluster ( ) . setIsChangable ( false ) ; }

Target:
protected void setAllowChangeHostPlacementPropertiesWhenNotInMaintenance ( ) { org.ovirt.engine.ui.uicompat.UIConstants constants = org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getConstants ( ) ; getDataCenter ( ) . setChangeProhibitionReason ( constants.dcCanOnlyBeChangedWhenHostInMaintMode ( ) ) ; getDataCenter ( ) . setIsChangable ( false ) ; getCluster ( ) . setChangeProhibitionReason ( constants.clusterCanOnlyBeChangedWhenHostInMaintMode ( ) ) ; getCluster ( ) . setIsChangable ( false ) ; }
Source:
public int hashCode ( ) { final int prime = 31 ; int result = 1 ; result = ( prime * result ) + ( ( id.tagId ) == null ? 0 : id.tagId.hashCode ( ) ) ; result = ( prime * result ) + ( ( id.templateId ) == null ? 0 : id.templateId.hashCode ( ) ) ; result = ( prime * result ) + ( ( defaultDisplayType ) == null ? 0 : defaultDisplayType.hashCode ( ) ) ; return result ; }

Target:
public int hashCode ( ) { return java.util.Objects.hash ( id.tagId , id.templateId , defaultDisplayType ) ; }
Source:
protected boolean canDoAction ( ) { org.ovirt.engine.core.common.businessentities.Tags tag = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getTagDao ( ) . getByName ( org.ovirt.engine.core.bll.AddTagCommand.getParameters ( ) . getTag ( ) . gettag_name ( ) ) ; if ( tag != null ) { addCanDoActionMessage ( VdcBllMessages.TAGS_SPECIFY_TAG_IS_IN_USE ) ; return false ; } return true ; }

Target:
protected boolean canDoAction ( ) { org.ovirt.engine.core.common.businessentities.Tags tag = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getTagDao ( ) . getByName ( org.ovirt.engine.core.bll.AddTagCommand.getParameters ( ) . getTag ( ) . gettag_name ( ) ) ; if ( tag != null ) { addCanDoActionMessage ( EngineMessage.TAGS_SPECIFY_TAG_IS_IN_USE ) ; return false ; } return true ; }
Source:
protected void verifyModel ( org.ovirt.engine.api.model.Group model , int index ) { assertEquals ( GUIDS [ index ] . toString ( ) , model.getId ( ) ) ; assertEquals ( NAMES [ index ] , model.getName ( ) ) ; assertNotNull ( model.getDomain ( ) ) ; verifyLinks ( model ) ; }

Target:
protected void verifyModel ( org.ovirt.engine.api.model.Group model , int index ) { org.junit.Assert.assertEquals ( GUIDS [ index ] . toString ( ) , model.getId ( ) ) ; org.junit.Assert.assertEquals ( NAMES [ index ] , model.getName ( ) ) ; org.junit.Assert.assertNotNull ( model.getDomain ( ) ) ; verifyLinks ( model ) ; }
Source:
private void removeListeners ( org.ovirt.engine.ui.uicommonweb.models.ConsolePopupModel model ) { if ( ( viewUpdatingListener ) == null ) { return ; } org.ovirt.engine.ui.uicommonweb.models.vms.ISpice spice = extractSpice ( model ) ; if ( spice == null ) { return ; } spice.getUsbAutoShareChangedEvent ( ) . removeListener ( viewUpdatingListener ) ; spice.getWANColorDepthChangedEvent ( ) . removeListener ( viewUpdatingListener ) ; spice.getWANDisableEffectsChangeEvent ( ) . removeListener ( viewUpdatingListener ) ; }

Target:
private void removeListeners ( org.ovirt.engine.ui.uicommonweb.models.ConsolePopupModel model ) { if ( ( viewUpdatingListener ) == null ) { return ; } org.ovirt.engine.ui.uicommonweb.models.vms.ISpice spice = model.getVmConsoles ( ) . getConsoleModel ( org.ovirt.engine.ui.uicommonweb.models.vms.SpiceConsoleModel.class ) . getspice ( ) ; if ( spice == null ) { return ; } spice.getUsbAutoShareChangedEvent ( ) . removeListener ( viewUpdatingListener ) ; spice.getWANColorDepthChangedEvent ( ) . removeListener ( viewUpdatingListener ) ; spice.getWANDisableEffectsChangeEvent ( ) . removeListener ( viewUpdatingListener ) ; }
Source:
protected void endSuccessfully ( ) { setVmTemplateId ( org.ovirt.engine.core.bll.AddVmTemplateCommand.getParameters ( ) . getVmTemplateId ( ) ) ; setVmId ( getVmIdFromImageParameters ( ) ) ; for ( org.ovirt.engine.core.common.action.VdcActionParametersBase p : org.ovirt.engine.core.bll.AddVmTemplateCommand.getParameters ( ) . getImagesParameters ( ) ) { org.ovirt.engine.core.bll.Backend.getInstance ( ) . EndAction ( VdcActionType.CreateImageTemplate , p ) ; } if ( ( reloadVmTemplateFromDB ( ) ) != null ) { endDefaultOperations ( ) ; } org.ovirt.engine.core.bll.AddVmTemplateCommand.setSucceeded ( true ) ; }

Target:
protected void endSuccessfully ( ) { setVmTemplateId ( org.ovirt.engine.core.bll.AddVmTemplateCommand.getParameters ( ) . getVmTemplateId ( ) ) ; setVmId ( getVmIdFromImageParameters ( ) ) ; org.ovirt.engine.core.bll.AddVmTemplateCommand.getVmStaticDAO ( ) . incrementDbGeneration ( org.ovirt.engine.core.bll.AddVmTemplateCommand.getVmTemplateId ( ) ) ; for ( org.ovirt.engine.core.common.action.VdcActionParametersBase p : org.ovirt.engine.core.bll.AddVmTemplateCommand.getParameters ( ) . getImagesParameters ( ) ) { org.ovirt.engine.core.bll.Backend.getInstance ( ) . EndAction ( VdcActionType.CreateImageTemplate , p ) ; } if ( ( reloadVmTemplateFromDB ( ) ) != null ) { endDefaultOperations ( ) ; } org.ovirt.engine.core.bll.AddVmTemplateCommand.setSucceeded ( true ) ; }
Source:
private boolean isConsoleCommandsExecutionAllowed ( ) { final java.util.List < org.ovirt.engine.core.common.businessentities.VM > list = ( ( getSelectedItem ( ) ) == null ) ? null : getSelectedItems ( ) ; if ( list == null ) { return false ; } for ( org.ovirt.engine.core.common.businessentities.VM vm : list ) { if ( consoleModelsCache.getVmConsolesForEntity ( vm ) . canConnectToConsole ( ) ) { return true ; } } return false ; }

Target:
private boolean isConsoleCommandsExecutionAllowed ( ) { final java.util.List < org.ovirt.engine.core.common.businessentities.VM > list = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.VmListModel.getSelectedItem ( ) ) == null ) ? null : org.ovirt.engine.ui.uicommonweb.models.vms.VmListModel.getSelectedItems ( ) ; if ( list == null ) { return false ; } for ( org.ovirt.engine.core.common.businessentities.VM vm : list ) { if ( consoleModelsCache.getVmConsolesForEntity ( vm ) . canConnectToConsole ( ) ) { return true ; } } return false ; }
Source:
protected org.ovirt.engine.core.common.businessentities.VDSGroup getCluster ( org.ovirt.engine.api.model.VM vm ) { if ( namedCluster ( vm ) ) { return isFiltered ( ) ? lookupClusterByName ( vm.getCluster ( ) . getName ( ) ) : getEntity ( org.ovirt.engine.core.common.businessentities.VDSGroup.class , VdcQueryType.GetVdsGroupByName , new org.ovirt.engine.core.common.queries.NameQueryParameters ( vm.getCluster ( ) . getName ( ) ) , ( "Cluster: name=" + ( vm.getCluster ( ) . getName ( ) ) ) ) ; } return lookupCluster ( asGuid ( vm.getCluster ( ) . getId ( ) ) ) ; }

Target:
protected org.ovirt.engine.core.common.businessentities.VDSGroup getCluster ( org.ovirt.engine.api.model.Vm vm ) { if ( namedCluster ( vm ) ) { return isFiltered ( ) ? lookupClusterByName ( vm.getCluster ( ) . getName ( ) ) : getEntity ( org.ovirt.engine.core.common.businessentities.VDSGroup.class , VdcQueryType.GetVdsGroupByName , new org.ovirt.engine.core.common.queries.NameQueryParameters ( vm.getCluster ( ) . getName ( ) ) , ( "Cluster: name=" + ( vm.getCluster ( ) . getName ( ) ) ) ) ; } return lookupCluster ( asGuid ( vm.getCluster ( ) . getId ( ) ) ) ; }
Source:
public void removeAll ( java.util.Collection < org.ovirt.engine.core.compat.Guid > ids ) { getCallsHandler ( ) . executeModification ( "DeleteGlusterServerHooksByGuids" , getCustomMapSqlParameterSource ( ) . addValue ( "ids" , org.apache.commons.lang.StringUtils.join ( ids , ',' ) ) ) ; getCallsHandler ( ) . executeModification ( "DeleteGlusterHooksByGuids" , getCustomMapSqlParameterSource ( ) . addValue ( "ids" , org.apache.commons.lang.StringUtils.join ( ids , ',' ) ) ) ; }

Target:
public void updateGlusterHook ( org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity hook ) { getCallsHandler ( ) . executeModification ( "UpdateGlusterHook" , getCustomMapSqlParameterSource ( ) . addValue ( "id" , hook.getId ( ) ) . addValue ( "hook_status" , org.ovirt.engine.core.common.utils.EnumUtils.nameOrNull ( hook.getStatus ( ) ) ) . addValue ( "content_type" , org.ovirt.engine.core.common.utils.EnumUtils.nameOrNull ( hook.getContentType ( ) ) ) . addValue ( "checksum" , hook.getChecksum ( ) ) . addValue ( "content" , hook.getContent ( ) ) . addValue ( "conflict_status" , hook.getConflictStatus ( ) ) ) ; }
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 void setUp ( ) throws java.lang.Exception { ifaceQos = new org.ovirt.engine.core.common.businessentities.network.HostNetworkQos ( ) ; networkQos = new org.ovirt.engine.core.common.businessentities.network.HostNetworkQos ( ) ; iface = new org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface ( ) ; network = new org.ovirt.engine.core.common.businessentities.network.Network ( ) ; iface.setQos ( ifaceQos ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { ifaceQos = new org.ovirt.engine.core.common.businessentities.network.HostNetworkQos ( ) ; networkQos = new org.ovirt.engine.core.common.businessentities.network.HostNetworkQos ( ) ; iface = new org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface ( ) ; iface.setBridged ( true ) ; network = new org.ovirt.engine.core.common.businessentities.network.Network ( ) ; iface.setQos ( ifaceQos ) ; }
Source:
public java.util.Map < org.ovirt.engine.core.compat.Version , java.lang.String > getAllVmProperties ( ) { java.util.Map < org.ovirt.engine.core.compat.Version , java.lang.String > allVmPropertiesString = new java.util.HashMap < org.ovirt.engine.core.compat.Version , java.lang.String > ( ) ; for ( java.util.Map.Entry < org.ovirt.engine.core.compat.Version , java.util.Map < java.lang.String , java.lang.String > > entry : allVmProperties.entrySet ( ) ) { allVmPropertiesString.put ( entry.getKey ( ) , convertProperties ( entry.getValue ( ) ) ) ; } return allVmPropertiesString ; }

Target:
public java.util.List < org.ovirt.engine.core.common.utils.customprop.ValidationError > validateVmProperties ( org.ovirt.engine.core.compat.Version version , java.lang.String properties ) { if ( syntaxErrorInProperties ( properties ) ) { return invalidSyntaxValidationError ; } return validateProperties ( allVmProperties.get ( version ) , convertProperties ( properties ) ) ; }
Source:
public void edit ( org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel vm ) { super . edit ( vm ) ; hostTab.setVisible ( false ) ; resourceAllocationTab.setVisible ( false ) ; templateEditor.setVisible ( false ) ; highAvailabilityTab.setVisible ( true ) ; customPropertiesTab.setVisible ( true ) ; }

Target:
protected org.ovirt.engine.ui.common.widget.uicommon.popup.vm.PopupWidgetConfigMap createWidgetConfiguration ( ) { return super . createWidgetConfiguration ( ) . putAll ( poolSpecificFields ( ) , org.ovirt.engine.ui.common.widget.uicommon.popup.vm.PopupWidgetConfig.hiddenField ( ) ) . putOne ( templateEditor , org.ovirt.engine.ui.common.widget.uicommon.popup.vm.PopupWidgetConfig.hiddenField ( ) ) . update ( resourceAllocationTab , org.ovirt.engine.ui.common.widget.uicommon.popup.vm.PopupWidgetConfig.hiddenField ( ) ) ; }
Source:
public void filter ( ) throws org.apache.xmlrpc.XmlRpcException { java.lang.Object [ ] sentObject = new java.lang.Object [ 4 ] ; sentObject [ 0 ] = new java.lang.Object [ ] { org.ovirt.schedulerproxy.SchedulerProxy.FILE_NAME } ; sentObject [ 1 ] = org.ovirt.schedulerproxy.SchedulerProxy.HOSTS_EXAMPLE ; sentObject [ 2 ] = org.ovirt.schedulerproxy.SchedulerProxy.VM_EXAMPLE ; sentObject [ 3 ] = "" ; java.lang.Object execute = client.execute ( "runFilters" , sentObject ) ; java.lang.System.out.println ( parseFilterResult ( execute ) ) ; }

Target:
public java.util.List < java.lang.String > filter ( java.lang.String [ ] filterNames , java.lang.String [ ] HostID , java.lang.String vmID , java.lang.String args ) throws org.apache.xmlrpc.XmlRpcException { java.lang.Object [ ] sentObject = new java.lang.Object [ 4 ] ; sentObject [ 0 ] = filterNames ; sentObject [ 1 ] = HostID ; sentObject [ 2 ] = vmID ; sentObject [ 3 ] = args ; java.lang.Object execute = client.execute ( "runFilters" , sentObject ) ; return parseFilterResult ( execute ) ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult isDiskInterfaceSupported ( org.ovirt.engine.core.common.businessentities.VM vm ) { if ( vm != null ) { if ( ! ( org.ovirt.engine.core.bll.validator.VmValidationUtils.isDiskInterfaceSupportedByOs ( vm.getOs ( ) , vm.getVdsGroupCompatibilityVersion ( ) , disk.getDiskInterface ( ) ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_DISK_INTERFACE_UNSUPPORTED , java.lang.String.format ( "$osName %s" , org.ovirt.engine.core.bll.validator.storage.DiskValidator.getOsRepository ( ) . getOsName ( vm.getOs ( ) ) ) ) ; } } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult isDiskInterfaceSupported ( org.ovirt.engine.core.common.businessentities.VM vm ) { if ( vm != null ) { if ( ! ( org.ovirt.engine.core.bll.validator.VmValidationUtils.isDiskInterfaceSupportedByOs ( vm.getOs ( ) , vm.getCompatibilityVersion ( ) , disk.getDiskInterface ( ) ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_DISK_INTERFACE_UNSUPPORTED , java.lang.String.format ( "$osName %s" , org.ovirt.engine.core.bll.validator.storage.DiskValidator.getOsRepository ( ) . getOsName ( vm.getOs ( ) ) ) ) ; } } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }
Source:
public void testGetManagementNetwork ( ) { org.mockito.Mockito.when ( mockNetworkDao.getManagementNetwork ( org.ovirt.engine.core.bll.network.cluster.ManagementNetworkUtilImplTest.TEST_CLUSTER_ID ) ) . thenReturn ( mockNetwork ) ; final org.ovirt.engine.core.common.businessentities.network.Network actual = underTest.getManagementNetwork ( org.ovirt.engine.core.bll.network.cluster.ManagementNetworkUtilImplTest.TEST_CLUSTER_ID ) ; org.junit.Assert.assertSame ( mockNetwork , actual ) ; org.mockito.Mockito.verify ( mockNetworkDao ) . getManagementNetwork ( org.ovirt.engine.core.bll.network.cluster.ManagementNetworkUtilImplTest.TEST_CLUSTER_ID ) ; }

Target:
public void testGetManagementNetwork ( ) { org.mockito.Mockito.when ( mockNetworkDao.getManagementNetwork ( org.ovirt.engine.core.bll.network.cluster.ManagementNetworkUtilImplTest.TEST_CLUSTER_ID ) ) . thenReturn ( mockNetwork ) ; final org.ovirt.engine.core.common.businessentities.network.Network actual = underTest.getManagementNetwork ( org.ovirt.engine.core.bll.network.cluster.ManagementNetworkUtilImplTest.TEST_CLUSTER_ID ) ; org.junit.jupiter.api.Assertions.assertSame ( mockNetwork , actual ) ; org.mockito.Mockito.verify ( mockNetworkDao ) . getManagementNetwork ( org.ovirt.engine.core.bll.network.cluster.ManagementNetworkUtilImplTest.TEST_CLUSTER_ID ) ; }