auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
protected void executeCommand ( ) { final org.ovirt.engine.core.common.action.VdcReturnValueBase returnValue = runInternalAction ( VdcActionType.DetachNetworkFromClusterInternal , org.ovirt.engine.core.bll.network.cluster.DetachNetworkToClusterCommand.getParameters ( ) ) ; setSucceeded ( returnValue.getSucceeded ( ) ) ; if ( returnValue.getSucceeded ( ) ) { if ( org.ovirt.engine.core.bll.network.cluster.NetworkHelper.shouldRemoveNetworkFromHostUponNetworkRemoval ( getPersistedNetwork ( ) ) ) { detachLabeledNetworksFromClusterHosts ( ) ; } } else { propagateFailure ( returnValue ) ; } }

Target:
protected void executeCommand ( ) { final org.ovirt.engine.core.common.action.ActionReturnValue returnValue = runInternalAction ( ActionType.DetachNetworkFromClusterInternal , org.ovirt.engine.core.bll.network.cluster.DetachNetworkToClusterCommand.getParameters ( ) ) ; setSucceeded ( returnValue.getSucceeded ( ) ) ; if ( returnValue.getSucceeded ( ) ) { if ( org.ovirt.engine.core.bll.network.cluster.NetworkHelper.shouldRemoveNetworkFromHostUponNetworkRemoval ( getPersistedNetwork ( ) ) ) { detachLabeledNetworksFromClusterHosts ( ) ; } } else { propagateFailure ( returnValue ) ; } }
Source:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; dao = dbFacade.getVmTemplateDao ( ) ; existingTemplate = dao.get ( new org.ovirt.engine.core.compat.Guid ( "1b85420c-b84c-4f29-997e-0eb674b40b79" ) ) ; existingInstanceType = dao.get ( new org.ovirt.engine.core.compat.Guid ( "99408929-82cf-4dc7-a532-9d998063fa95" ) ) ; newVmTemplate = new org.ovirt.engine.core.common.businessentities.VmTemplate ( ) ; newVmTemplate.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; newVmTemplate.setName ( "NewVmTemplate" ) ; newVmTemplate.setVdsGroupId ( org.ovirt.engine.core.dao.VmTemplateDAOTest.VDS_GROUP_ID ) ; newVmTemplate.setClusterArch ( ArchitectureType.x86_64 ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; dao = dbFacade.getVmTemplateDao ( ) ; existingTemplate = dao.get ( new org.ovirt.engine.core.compat.Guid ( "1b85420c-b84c-4f29-997e-0eb674b40b79" ) ) ; existingInstanceType = dao.get ( new org.ovirt.engine.core.compat.Guid ( "99408929-82cf-4dc7-a532-9d998063fa95" ) ) ; newVmTemplate = new org.ovirt.engine.core.common.businessentities.VmTemplate ( ) ; newVmTemplate.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; newVmTemplate.setName ( "NewVmTemplate" ) ; newVmTemplate.setVdsGroupId ( org.ovirt.engine.core.dao.VmTemplateDAOTest.VDS_GROUP_ID ) ; newVmTemplate.setClusterArch ( ArchitectureType.x86_64 ) ; newVmTemplate.setCpuProfileId ( FixturesTool.CPU_PROFILE_2 ) ; }
Source:
protected org.ovirt.engine.core.common.vdscommands.VDSReturnValue getStatsForDomain ( ) { return runVdsCommand ( VDSCommandType.GetStorageDomainStats , new org.ovirt.engine.core.common.vdscommands.GetStorageDomainStatsVDSCommandParameters ( org.ovirt.engine.core.bll.storage.UpdateStorageServerConnectionCommand.getVds ( ) . getId ( ) , org.ovirt.engine.core.bll.storage.UpdateStorageServerConnectionCommand.getStorageDomain ( ) . getId ( ) ) ) ; }

Target:
protected void changeStorageDomainStatusInTransaction ( final org.ovirt.engine.core.common.businessentities.StorageDomainStatus status ) { executeInNewTransaction ( new org.ovirt.engine.core.utils.transaction.TransactionMethod < java.lang.Void > ( ) { @ java.lang.Override public java.lang.Void runInTransaction ( ) { for ( org.ovirt.engine.core.common.businessentities.StorageDomain domain : domains ) { org.ovirt.engine.core.common.businessentities.StoragePoolIsoMap map = getStoragePoolIsoMap ( domain ) ; org.ovirt.engine.core.bll.context.CompensationContext context = getCompensationContext ( ) ; context.snapshotEntityStatus ( map , map.getstatus ( ) ) ; updateStatus ( map , status ) ; getCompensationContext ( ) . stateChanged ( ) ; } return null ; } } ) ; }
Source:
public java.util.List < org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.compat.Guid , java.lang.Integer > > getPinnedNumaNodeIndex ( org.ovirt.engine.core.compat.Guid vmId ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmNumaNode > numaNodes = getAllVmNumaNodeByVmId ( vmId ) ; java.util.List < org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.compat.Guid , java.lang.Integer > > result = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.VmNumaNode node : numaNodes ) { for ( org.ovirt.engine.core.common.businessentities.NumaNodeVmVds item : node.getNumaNodeVdsList ( ) ) { result.add ( new org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.compat.Guid , java.lang.Integer > ( node.getVmId ( ) , item.getNodeIndex ( ) ) ) ; } } return result ; }

Target:
public java.util.List < org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.compat.Guid , java.lang.Integer > > getPinnedNumaNodeIndex ( org.ovirt.engine.core.compat.Guid vmId ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "vm_id" , vmId ) ; return getCallsHandler ( ) . executeReadList ( "GetLastRunInPnodeInfoByVmId" , org.ovirt.engine.core.dao.VmNumaNodeDAODbFacadeImpl.vNodePinToPnodeRowMapper , parameterSource ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc isolateVolume ( java.lang.String sdUUID , java.lang.String srcImageID , java.lang.String dstImageID , java.lang.String volumeID ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "SDM.isolateVolume" ) . withParameter ( "storagedomainID" , sdUUID ) . withParameter ( "srcImageID" , srcImageID ) . withParameter ( "dstImageID" , dstImageID ) . withParameter ( "volumeID" , volumeID ) . 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 isolateVolume ( java.lang.String sdUUID , java.lang.String srcImageID , java.lang.String dstImageID , java.lang.String volumeID ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "SDM.isolateVolume" ) . withParameter ( "storagedomainID" , sdUUID ) . withParameter ( "srcImageID" , srcImageID ) . withParameter ( "dstImageID" , dstImageID ) . withParameter ( "volumeID" , volumeID ) . 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 SetDefaultNames1 ( ) { org.ovirt.engine.core.common.businessentities.VDS host = context.host ; if ( ( host.getStoragePoolId ( ) ) != null ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetDataCenterById ( new org.ovirt.engine.ui.frontend.AsyncQuery ( this , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { context.hostDataCenter = ( ( org.ovirt.engine.core.common.businessentities.StoragePool ) ( returnValue ) ) ; SetDefaultNames2 ( ) ; } } , frontendHash ) , host.getStoragePoolId ( ) ) ; } else { SetDefaultNames2 ( ) ; } }

Target:
public void setDefaultNames1 ( ) { org.ovirt.engine.core.common.businessentities.VDS host = context.host ; if ( ( host.getStoragePoolId ( ) ) != null ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDataCenterById ( new org.ovirt.engine.ui.frontend.AsyncQuery ( this , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { context.hostDataCenter = ( ( org.ovirt.engine.core.common.businessentities.StoragePool ) ( returnValue ) ) ; setDefaultNames2 ( ) ; } } , frontendHash ) , host.getStoragePoolId ( ) ) ; } else { setDefaultNames2 ( ) ; } }
Source:
public org.ovirt.engine.core.common.businessentities.gluster.GlusterService mapRow ( java.sql.ResultSet rs , int rowNum ) throws java.sql.SQLException { org.ovirt.engine.core.common.businessentities.gluster.GlusterService entity = new org.ovirt.engine.core.common.businessentities.gluster.GlusterService ( ) ; entity.setId ( org.ovirt.engine.core.compat.Guid.createGuidFromString ( rs.getString ( "id" ) ) ) ; entity.setServiceType ( org.ovirt.engine.core.common.businessentities.gluster.ServiceType.valueOf ( rs.getString ( "service_type" ) ) ) ; entity.setServiceName ( rs.getString ( "service_name" ) ) ; return entity ; }

Target:
public org.ovirt.engine.core.common.businessentities.gluster.GlusterService mapRow ( java.sql.ResultSet rs , int rowNum ) throws java.sql.SQLException { org.ovirt.engine.core.common.businessentities.gluster.GlusterService entity = new org.ovirt.engine.core.common.businessentities.gluster.GlusterService ( ) ; entity.setId ( org.ovirt.engine.core.compat.Guid.createGuidFromStringDefaultEmpty ( rs.getString ( "id" ) ) ) ; entity.setServiceType ( org.ovirt.engine.core.common.businessentities.gluster.ServiceType.valueOf ( rs.getString ( "service_type" ) ) ) ; entity.setServiceName ( rs.getString ( "service_name" ) ) ; return entity ; }
Source:
public void nicDoesntExist ( ) { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic = createNic ( "eth0" , null ) ; org.ovirt.engine.core.bll.network.host.SetupNetworksHelper helper = createHelper ( createParametersForNics ( nic ) ) ; validateAndExpectViolation ( helper , VdcBllMessages.NETWORK_INTERFACES_DONT_EXIST , nic.getName ( ) ) ; }

Target:
private org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface createNic ( java.lang.String nicName , java.lang.String networkName ) { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic = createVdsInterface ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , nicName , false , null , null , null , networkName , true , null , null , org.ovirt.engine.core.bll.network.host.SetupNetworksHelperTest.DEFAULT_SPEED ) ; mockCalculateBaseNicWhenBaseNicIsPassed ( nic ) ; return nic ; }
Source:
public < T > T getValue ( org.ovirt.engine.core.common.config.ConfigValues name , java.lang.String version ) { java.util.Map < java.lang.String , T > values = getValuesForAllVersions ( name ) ; if ( ( values != null ) && ( values.containsKey ( version ) ) ) { return values.get ( version ) ; } throw new java.lang.IllegalArgumentException ( ( ( ( name.toString ( ) ) + " has no value for version: " ) + version ) ) ; }

Target:
public < T > T getValue ( org.ovirt.engine.core.common.config.ConfigValues name , java.lang.String version ) { java.util.Map < java.lang.String , T > values = getValuesForAllVersions ( name ) ; if ( valueExists ( name , version ) ) { return values.get ( version ) ; } throw new java.lang.IllegalArgumentException ( ( ( ( name.toString ( ) ) + " has no value for version: " ) + version ) ) ; }
Source:
public static < P extends org.ovirt.engine.core.common.action.VdcActionParametersBase > boolean hasConstructor ( org.ovirt.engine.core.common.action.VdcActionType action , P parameters , org.ovirt.engine.core.bll.context.CommandContext cmdContext ) { return ( org.ovirt.engine.core.utils.ReflectionUtils.findConstructor ( org.ovirt.engine.core.bll.CommandsFactory.getCommandClass ( action.name ( ) , org.ovirt.engine.core.bll.CommandsFactory.CommandSuffix ) , parameters.getClass ( ) , cmdContext.getClass ( ) ) ) != null ; }

Target:
public static < P extends org.ovirt.engine.core.common.action.VdcActionParametersBase > boolean hasConstructor ( org.ovirt.engine.core.common.action.VdcActionType action , P parameters , org.ovirt.engine.core.bll.context.CommandContext cmdContext ) { return ( org.ovirt.engine.core.utils.ReflectionUtils.findConstructor ( org.ovirt.engine.core.bll.CommandsFactory.getCommandClass ( action.name ( ) , org.ovirt.engine.core.bll.CommandsFactory.COMMAND_SUFFIX ) , parameters.getClass ( ) , cmdContext.getClass ( ) ) ) != null ; }
Source:
private void createCluster ( ) { cluster = new org.ovirt.engine.core.common.businessentities.Cluster ( ) ; cluster.setName ( CLUSTER_NAME ) ; cluster.setDescription ( CLUSTER_DESCRIPTION ) ; cluster.setStoragePoolId ( DATA_CENTER_ID ) ; cluster.setCpuName ( CPU_NAME ) ; cluster.setMaxVdsMemoryOverCommit ( MAX_VDS_MEMORY_OVER_COMMIT ) ; cluster.setCountThreadsAsCores ( COUNT_THREADS_AS_CORES ) ; cluster.setTransparentHugepages ( SET_TRANSPARENT_HUGE_PAGES ) ; cluster.setCompatibilityVersion ( SET_COMPATIBILITY_VERSION ) ; cluster.setMigrateOnError ( MIGRATE_ON_ERROR ) ; cluster.setArchitecture ( ARCHITECTURE_TYPE ) ; }

Target:
private void injectMocks ( ) { injectorRule.bind ( org.ovirt.engine.core.bll.CpuFlagsManagerHandler.class , cpuFlagsManagerHandler ) ; injectorRule.bind ( org.ovirt.engine.core.dao.ClusterDao.class , clusterDao ) ; injectorRule.bind ( org.ovirt.engine.core.common.businessentities.network.Network.class , managementNetwork ) ; injectorRule.bind ( org.ovirt.engine.core.dao.network.NetworkClusterDao.class , networkClusterDao ) ; }
Source:
public void testStatisticalQuery ( ) throws java.lang.Exception { org.ovirt.engine.api.restapi.resource.VM entity = setUpStatisticalExpectations ( ) ; @ java.lang.SuppressWarnings ( value = "unchecked" ) org.ovirt.engine.api.restapi.resource.BackendStatisticsResource < org.ovirt.engine.api.model.Vm , org.ovirt.engine.api.restapi.resource.VM > statisticsResource = ( ( org.ovirt.engine.api.restapi.resource.BackendStatisticsResource < org.ovirt.engine.api.model.Vm , org.ovirt.engine.api.restapi.resource.VM > ) ( resource.getStatisticsResource ( ) ) ) ; assertNotNull ( statisticsResource ) ; verifyQuery ( statisticsResource.getQuery ( ) , entity ) ; }

Target:
public void testStatisticalQuery ( ) throws java.lang.Exception { org.ovirt.engine.api.restapi.resource.VM entity = setUpStatisticalExpectations ( ) ; @ java.lang.SuppressWarnings ( value = "unchecked" ) org.ovirt.engine.api.restapi.resource.BackendStatisticsResource < org.ovirt.engine.api.model.Vm , org.ovirt.engine.api.restapi.resource.VM > statisticsResource = ( ( org.ovirt.engine.api.restapi.resource.BackendStatisticsResource < org.ovirt.engine.api.model.Vm , org.ovirt.engine.api.restapi.resource.VM > ) ( resource.getStatisticsResource ( ) ) ) ; org.junit.Assert.assertNotNull ( statisticsResource ) ; verifyQuery ( statisticsResource.getQuery ( ) , entity ) ; }
Source:
public void canDoActionEnoughSpace ( ) throws java.lang.Exception { initializeCommand ( ImageOperation.Move , new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ) ; initSnapshotValidator ( ) ; initVmForSpace ( ) ; initVmDiskImage ( false ) ; initSrcStorageDomain ( ) ; initDestStorageDomain ( StorageType.NFS ) ; org.mockito.Mockito.doReturn ( org.ovirt.engine.core.bll.storage.disk.MoveOrCopyDiskCommandTest.mockStorageDomainValidatorWithSpace ( ) ) . when ( command ) . createStorageDomainValidator ( ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionSuccess ( command ) ; }

Target:
public void validateEnoughSpace ( ) throws java.lang.Exception { initializeCommand ( ImageOperation.Move , new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ) ; initSnapshotValidator ( ) ; initVmForSpace ( ) ; initVmDiskImage ( false ) ; initSrcStorageDomain ( ) ; initDestStorageDomain ( StorageType.NFS ) ; org.mockito.Mockito.doReturn ( org.ovirt.engine.core.bll.storage.disk.MoveOrCopyDiskCommandTest.mockStorageDomainValidatorWithSpace ( ) ) . when ( command ) . createStorageDomainValidator ( ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateSuccess ( command ) ; }
Source:
private void Edit ( ) { if ( ( getWindow ( ) ) != null ) { return ; } org.ovirt.engine.ui.uicommonweb.models.vms.VmInterfaceModel model = org.ovirt.engine.ui.uicommonweb.models.vms.EditVmInterfaceModel.createInstance ( getEntity ( ) . getStaticData ( ) , getEntity ( ) , getEntity ( ) . getVdsGroupCompatibilityVersion ( ) , ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmNetworkInterface > ) ( getItems ( ) ) ) , ( ( org.ovirt.engine.core.common.businessentities.VmNetworkInterface ) ( getSelectedItem ( ) ) ) , this ) ; setWindow ( model ) ; }

Target:
private void Edit ( ) { if ( ( getWindow ( ) ) != null ) { return ; } org.ovirt.engine.ui.uicommonweb.models.vms.VmInterfaceModel model = org.ovirt.engine.ui.uicommonweb.models.vms.EditVmInterfaceModel.createInstance ( getEntity ( ) . getStaticData ( ) , getEntity ( ) , getEntity ( ) . getVdsGroupCompatibilityVersion ( ) , ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ) ( getItems ( ) ) ) , ( ( org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface ) ( getSelectedItem ( ) ) ) , this ) ; setWindow ( model ) ; }
Source:
public void testHasSpiceSupport ( ) throws java.lang.Exception { org.junit.Assert.assertTrue ( OsRepositoryImpl.INSTANCE.getSpiceSupportMatrix ( ) . get ( 777 ) . get ( null ) ) ; }

Target:
public void testDisplayTypes ( ) throws java.lang.Exception { java.util.List < org.ovirt.engine.core.common.businessentities.DisplayType > supportedDisplays = OsRepositoryImpl.INSTANCE.getDisplayTypes ( ) . get ( 777 ) . get ( null ) ; boolean isSizeCorrect = ( supportedDisplays.size ( ) ) == 2 ; boolean containsSameElements = new java.util.HashSet < org.ovirt.engine.core.common.businessentities.DisplayType > ( supportedDisplays ) . equals ( new java.util.HashSet < org.ovirt.engine.core.common.businessentities.DisplayType > ( java.util.Arrays.asList ( DisplayType.qxl , DisplayType.vnc ) ) ) ; org.junit.Assert.assertTrue ( isSizeCorrect ) ; org.junit.Assert.assertTrue ( containsSameElements ) ; }
Source:
protected void initTable ( org.ovirt.engine.ui.common.CommonApplicationConstants constants ) { super . initTable ( constants ) ; org.ovirt.engine.ui.webadmin.section.main.view.AbstractSubTabEventView.getTable ( ) . addActionButton ( new org.ovirt.engine.ui.webadmin.widget.action.WebAdminButtonDefinition < org.ovirt.engine.core.common.businessentities.AuditLog > ( constants.details ( ) , org.ovirt.engine.ui.common.widget.action.CommandLocation.OnlyFromContext ) { @ java.lang.Override protected org.ovirt.engine.ui.uicommonweb.UICommand resolveCommand ( ) { return getModelBoundTableWidget ( ) . getModel ( ) . getDetailsCommand ( ) ; } } ) ; }

Target:
protected void initTable ( ) { super . initTable ( ) ; org.ovirt.engine.ui.webadmin.section.main.view.AbstractSubTabEventView.getTable ( ) . addActionButton ( new org.ovirt.engine.ui.webadmin.widget.action.WebAdminButtonDefinition < org.ovirt.engine.core.common.businessentities.AuditLog > ( org.ovirt.engine.ui.webadmin.section.main.view.AbstractSubTabEventView.constants.details ( ) , org.ovirt.engine.ui.common.widget.action.CommandLocation.OnlyFromContext ) { @ java.lang.Override protected org.ovirt.engine.ui.uicommonweb.UICommand resolveCommand ( ) { return getModelBoundTableWidget ( ) . getModel ( ) . getDetailsCommand ( ) ; } } ) ; }
Source:
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 ) ; }

Target:
public void getClusterGlusterSwiftService ( org.ovirt.engine.ui.frontend.AsyncQuery < org.ovirt.engine.core.common.businessentities.gluster.GlusterClusterService > aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetFirstConverter < > ( ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterClusterServiceByClusterId , new org.ovirt.engine.core.common.queries.gluster.GlusterServiceQueryParameters ( clusterId , org.ovirt.engine.core.common.businessentities.gluster.ServiceType.GLUSTER_SWIFT ) , aQuery ) ; }
Source:
private void runOnce ( ) { org.ovirt.engine.ui.uicommonweb.models.userportal.UserPortalItemModel selectedItem = ( ( org.ovirt.engine.ui.uicommonweb.models.userportal.UserPortalItemModel ) ( getSelectedItem ( ) ) ) ; if ( ( selectedItem == null ) || ( ( selectedItem.getEntity ( ) ) == null ) ) { return ; } org.ovirt.engine.core.common.businessentities.VM vm = ( ( org.ovirt.engine.core.common.businessentities.VM ) ( selectedItem.getEntity ( ) ) ) ; org.ovirt.engine.ui.uicommonweb.models.vms.RunOnceModel model = new org.ovirt.engine.ui.uicommonweb.models.vms.UserPortalRunOnceModel ( vm , getCustomPropertiesKeysList ( ) . get ( vm.getVdsGroupCompatibilityVersion ( ) ) , this ) ; setWindow ( model ) ; model.init ( ) ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object result ) { org.ovirt.engine.ui.uicommonweb.models.vms.RunOnceModel runOnceModel = new org.ovirt.engine.ui.uicommonweb.models.vms.UserPortalRunOnceModel ( ( ( org.ovirt.engine.core.common.businessentities.VM ) ( result ) ) , this ) ; setWindow ( runOnceModel ) ; runOnceModel.init ( ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.DisplayType getDefaultDisplayType ( int osId , org.ovirt.engine.core.compat.Version clusterVersion ) { org.ovirt.engine.core.common.osinfo.OsRepository osRepository = org.ovirt.engine.core.common.utils.SimpleDependecyInjector.getInstance ( ) . get ( org.ovirt.engine.core.common.osinfo.OsRepository.class ) ; java.util.List < org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.common.businessentities.GraphicsType , org.ovirt.engine.core.common.businessentities.DisplayType > > pairs = osRepository.getGraphicsAndDisplays ( osId , clusterVersion ) ; if ( ! ( pairs.isEmpty ( ) ) ) { org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.common.businessentities.GraphicsType , org.ovirt.engine.core.common.businessentities.DisplayType > graphicsDisplayPair = pairs.get ( 0 ) ; return graphicsDisplayPair.getSecond ( ) ; } return org.ovirt.engine.core.common.businessentities.DisplayType.qxl ; }

Target:
private org.ovirt.engine.core.common.businessentities.DisplayType getDefaultDisplayType ( int osId , org.ovirt.engine.core.compat.Version clusterVersion ) { org.ovirt.engine.core.common.osinfo.OsRepository osRepository = org.ovirt.engine.core.common.utils.SimpleDependencyInjector.getInstance ( ) . get ( org.ovirt.engine.core.common.osinfo.OsRepository.class ) ; java.util.List < org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.common.businessentities.GraphicsType , org.ovirt.engine.core.common.businessentities.DisplayType > > pairs = osRepository.getGraphicsAndDisplays ( osId , clusterVersion ) ; if ( ! ( pairs.isEmpty ( ) ) ) { org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.common.businessentities.GraphicsType , org.ovirt.engine.core.common.businessentities.DisplayType > graphicsDisplayPair = pairs.get ( 0 ) ; return graphicsDisplayPair.getSecond ( ) ; } return org.ovirt.engine.core.common.businessentities.DisplayType.qxl ; }
Source:
void forceRefresh ( M model ) { if ( model instanceof org.ovirt.engine.ui.uicommonweb.models.SearchableListModel ) { org.ovirt.engine.ui.uicommonweb.UICommand lastExecutedCommand = model.getLastExecutedCommand ( ) ; if ( ( lastExecutedCommand != null ) && ( ! ( lastExecutedCommand.getIsCancel ( ) ) ) ) { org.ovirt.engine.ui.uicommonweb.models.SearchableListModel searchableList = ( ( org.ovirt.engine.ui.uicommonweb.models.SearchableListModel ) ( model ) ) ; searchableList.forceRefresh ( ) ; } } }

Target:
protected boolean hasModel ( ) { return ( ( getCommonModel ( ) ) != null ) && ( ( org.ovirt.engine.ui.common.uicommon.model.TabModelProvider.getModel ( ) ) != null ) ; }
Source:
protected org.ovirt.engine.core.bll.interfaces.BackendInternal getBackend ( ) { return org.ovirt.engine.core.di.Injector.get ( org.ovirt.engine.core.bll.interfaces.BackendInternal.class ) ; }

Target:
private void initCommandBase ( ) { initUser ( ) ; org.ovirt.engine.core.bll.job.ExecutionContext executionContext = context.getExecutionContext ( ) ; if ( ( executionContext.getJob ( ) ) != null ) { setJobId ( executionContext.getJob ( ) . getId ( ) ) ; } else if ( ( executionContext.getStep ( ) ) != null ) { setJobId ( executionContext.getStep ( ) . getJobId ( ) ) ; } setCorrelationId ( _parameters.getCorrelationId ( ) ) ; }
Source:
private void removeRequestFromTracking ( org.codehaus.jackson.JsonNode id ) { try ( org.ovirt.vdsm.jsonrpc.client.utils.LockWrapper wrapper = new org.ovirt.vdsm.jsonrpc.client.utils.LockWrapper ( this . lock ) ) { this . queue.remove ( id ) ; org.ovirt.vdsm.jsonrpc.client.utils.ResponseTracking tracking = this . map.remove ( id ) ; java.util.List < org.codehaus.jackson.JsonNode > nodes = this . hostToId.get ( tracking.getClient ( ) . getHostname ( ) ) ; nodes.remove ( id ) ; } }

Target:
private void removeRequestFromTracking ( org.codehaus.jackson.JsonNode id ) { try ( org.ovirt.vdsm.jsonrpc.client.utils.LockWrapper wrapper = new org.ovirt.vdsm.jsonrpc.client.utils.LockWrapper ( this . lock ) ) { this . queue.remove ( id ) ; org.ovirt.vdsm.jsonrpc.client.utils.ResponseTracking tracking = this . map.remove ( id ) ; java.util.List < org.codehaus.jackson.JsonNode > nodes = this . hostToId.get ( tracking.getClient ( ) . getClientId ( ) ) ; nodes.remove ( id ) ; } }
Source:
public void testDnsResolverConfigurationNonDefaultRouteNetwork ( ) { iface.setIpv4DefaultRoute ( true ) ; network.setDnsResolverConfiguration ( sampleDnsResolverConfiguration ) ; testedNetworkAttachment.setDnsResolverConfiguration ( sampleDnsResolverConfiguration2 ) ; org.junit.Assert.assertThat ( createTestedInstance ( false , sampleDnsResolverConfiguration ) . isNetworkInSync ( ) , org.hamcrest.CoreMatchers.is ( false ) ) ; }

Target:
public void testDefaultRouteNonDefaultRouteNetwork ( ) { iface.setIpv4DefaultRoute ( true ) ; network.setDnsResolverConfiguration ( sampleDnsResolverConfiguration ) ; org.hamcrest.MatcherAssert.assertThat ( createTestedInstance ( false , sampleDnsResolverConfiguration ) . isNetworkInSync ( ) , org.hamcrest.CoreMatchers.is ( false ) ) ; }
Source:
public int hashCode ( ) { final int prime = 31 ; int result = 1 ; result = ( prime * result ) + ( hosts ) ; result = ( prime * result ) + ( ( vdsGroupId ) == null ? 0 : vdsGroupId.hashCode ( ) ) ; result = ( prime * result ) + ( vms ) ; return result ; }

Target:
public boolean equals ( java.lang.Object obj ) { if ( ( this ) == obj ) { return true ; } if ( ! ( obj instanceof org.ovirt.engine.core.common.businessentities.VDSGroupHostsAndVMs ) ) { return false ; } org.ovirt.engine.core.common.businessentities.VDSGroupHostsAndVMs other = ( ( org.ovirt.engine.core.common.businessentities.VDSGroupHostsAndVMs ) ( obj ) ) ; return ( ( ( hosts ) == ( other.hosts ) ) && ( java.util.Objects.equals ( vdsGroupId , other.vdsGroupId ) ) ) && ( ( vms ) == ( other.vms ) ) ; }
Source:
public void testDetermineActualFile_US ( ) { java.io.File originalFile = org.ovirt.engine.core.utils.ServletUtils.makeFileFromSanePath ( ( "/" + ( java.util.Locale.US.toLanguageTag ( ) ) ) , testServlet.base ) ; org.mockito.Mockito.when ( mockRequest.getPathInfo ( ) ) . thenReturn ( ( "/" + ( java.util.Locale.US.toLanguageTag ( ) ) ) ) ; java.io.File actualFile = testServlet.determineActualFile ( mockRequest , java.util.Locale.US ) ; org.junit.Assert.assertNotNull ( "actualFile should not be null" , actualFile ) ; org.junit.Assert.assertTrue ( "actualFile should exist" , actualFile.exists ( ) ) ; org.junit.Assert.assertEquals ( "original and actual should match" , originalFile , actualFile ) ; }

Target:
public void testDetermineActualFile_US ( ) { java.io.File originalFile = org.ovirt.engine.core.utils.servlet.ServletUtils.makeFileFromSanePath ( ( "/" + ( java.util.Locale.US.toLanguageTag ( ) ) ) , testServlet.base ) ; org.mockito.Mockito.when ( mockRequest.getPathInfo ( ) ) . thenReturn ( ( "/" + ( java.util.Locale.US.toLanguageTag ( ) ) ) ) ; java.io.File actualFile = testServlet.determineActualFile ( mockRequest , java.util.Locale.US ) ; org.junit.Assert.assertNotNull ( "actualFile should not be null" , actualFile ) ; org.junit.Assert.assertTrue ( "actualFile should exist" , actualFile.exists ( ) ) ; org.junit.Assert.assertEquals ( "original and actual should match" , originalFile , actualFile ) ; }
Source:
private void revertPreviousHandlers ( ) { getParameters ( ) . decrementExecutionIndex ( ) ; if ( ( getExecutionIndex ( ) ) >= 0 ) { logRollbackedTask ( ) ; getParameters ( ) . setExecutionReason ( CommandExecutionReason.ROLLBACK_FLOW ) ; getCurrentTaskHandler ( ) . compensate ( ) ; if ( ! ( hasRevertTask ( ) ) ) { revertPreviousHandlers ( ) ; } } }

Target:
private boolean hasStepsToRevert ( ) { return ( getExecutionIndex ( ) ) >= 0 ; }
Source:
protected java.util.List < org.ovirt.engine.api.model.VM > setUpVms ( ) { java.util.List < org.ovirt.engine.api.model.VM > ret = new java.util.ArrayList < org.ovirt.engine.api.model.VM > ( ) ; for ( int i = 0 ; i < ( NAMES.length ) ; i ++ ) { ret.add ( getEntity ( i ) ) ; } return ret ; }

Target:
protected java.util.List < org.ovirt.engine.api.restapi.resource.VM > setUpVms ( ) { java.util.List < org.ovirt.engine.api.restapi.resource.VM > ret = new java.util.ArrayList < org.ovirt.engine.api.restapi.resource.VM > ( ) ; for ( int i = 0 ; i < ( NAMES.length ) ; i ++ ) { ret.add ( getEntity ( i ) ) ; } return ret ; }
Source:
public static void initLinuxOsTypes ( ) { org.ovirt.engine.ui.frontend.AsyncQuery callback = new org.ovirt.engine.ui.frontend.AsyncQuery ( ) ; callback.asyncCallback = new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.linuxOsIds = ( ( java.util.ArrayList < java.lang.Integer > ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ) ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.OsRepository , new org.ovirt.engine.core.common.queries.OsQueryParameters ( org.ovirt.engine.core.common.queries.OsQueryParameters.OsRepositoryVerb.GetLinuxOss ) , callback ) ; }

Target:
public void initOsNames ( ) { org.ovirt.engine.ui.frontend.AsyncQuery callback = new org.ovirt.engine.ui.frontend.AsyncQuery ( ) ; callback.asyncCallback = new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { osNames = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ; initOsIds ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.OsRepository , new org.ovirt.engine.core.common.queries.OsQueryParameters ( org.ovirt.engine.core.common.queries.OsQueryParameters.OsRepositoryVerb.GetOsNames ) , callback ) ; }
Source:
private java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.network.Network > createClusterNetworksMap ( java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > allClusterNetworks ) { java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.network.Network > clusterNetworksMap = new java.util.HashMap < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.network.Network network : allClusterNetworks ) { clusterNetworksMap.put ( network.getId ( ) , network ) ; } return clusterNetworksMap ; }

Target:
private java.lang.String getAttachedViaLabel ( org.ovirt.engine.core.common.businessentities.network.Network network ) { return network.getLabel ( ) ; }
Source:
protected void executeCommand ( ) { boolean removedStatelessSnapshot = detachUsers ( ) ; if ( ! removedStatelessSnapshot ) { removeVmStatelessImages ( ) ; } org.ovirt.engine.core.bll.quota.QuotaManager.getInstance ( ) . rollbackQuotaByVmId ( org.ovirt.engine.core.bll.ProcessDownVmCommand.getVmId ( ) ) ; removeStatelessVmUnmanagedDevices ( ) ; applyNextRunConfiguration ( ) ; }

Target:
protected void executeCommand ( ) { boolean removedStatelessSnapshot = detachUsers ( ) ; if ( ! removedStatelessSnapshot ) { removeVmStatelessImages ( ) ; } org.ovirt.engine.core.bll.quota.QuotaManager.getInstance ( ) . rollbackQuotaByVmId ( org.ovirt.engine.core.bll.ProcessDownVmCommand.getVmId ( ) ) ; removeStatelessVmUnmanagedDevices ( ) ; releaseUsedHostDevices ( ) ; applyNextRunConfiguration ( ) ; }
Source:
private void refreshCapabilities ( ) { java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > list = new java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > ( ) ; for ( java.lang.Object item : org.ovirt.engine.ui.uicommonweb.models.hosts.HostListModel.getSelectedItems ( ) ) { org.ovirt.engine.core.common.businessentities.VDS vds = ( ( org.ovirt.engine.core.common.businessentities.VDS ) ( item ) ) ; list.add ( new org.ovirt.engine.core.common.action.VdsActionParameters ( vds.getId ( ) ) ) ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runMultipleAction ( VdcActionType.RefreshHostCapabilities , list , new org.ovirt.engine.ui.uicompat.IFrontendMultipleActionAsyncCallback ( ) { @ java.lang.Override public void executed ( org.ovirt.engine.ui.uicompat.FrontendMultipleActionAsyncResult result ) { } } , null ) ; }

Target:
private void refreshCapabilities ( ) { java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > list = new java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > ( ) ; for ( java.lang.Object item : org.ovirt.engine.ui.uicommonweb.models.hosts.HostListModel.getSelectedItems ( ) ) { org.ovirt.engine.core.common.businessentities.VDS vds = ( ( org.ovirt.engine.core.common.businessentities.VDS ) ( item ) ) ; list.add ( new org.ovirt.engine.core.common.action.VdsActionParameters ( vds.getId ( ) ) ) ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runMultipleAction ( VdcActionType.RefreshHost , list , new org.ovirt.engine.ui.uicompat.IFrontendMultipleActionAsyncCallback ( ) { @ java.lang.Override public void executed ( org.ovirt.engine.ui.uicompat.FrontendMultipleActionAsyncResult result ) { } } , null ) ; }
Source:
private java.lang.String getVmPoolIsBeingCreatedMessage ( ) { java.lang.StringBuilder builder = new java.lang.StringBuilder ( EngineMessage.ACTION_TYPE_FAILED_VM_POOL_IS_BEING_CREATED.name ( ) ) ; if ( ( org.ovirt.engine.core.bll.AddVmPoolCommand.getVmPoolName ( ) ) != null ) { builder.append ( java.lang.String.format ( "$VmPoolName %1$s" , org.ovirt.engine.core.bll.AddVmPoolCommand.getVmPoolName ( ) ) ) ; } return builder.toString ( ) ; }

Target:
public java.util.List < org.ovirt.engine.core.bll.quota.QuotaConsumptionParameter > getQuotaVdsConsumptionParameters ( ) { org.ovirt.engine.core.compat.Guid quotaId = org.ovirt.engine.core.bll.AddVmPoolCommand.getQuotaManager ( ) . getDefaultQuotaIfNull ( org.ovirt.engine.core.bll.AddVmPoolCommand.getParameters ( ) . getVmStaticData ( ) . getQuotaId ( ) , org.ovirt.engine.core.bll.AddVmPoolCommand.getStoragePoolId ( ) ) ; return java.util.Collections.singletonList ( new org.ovirt.engine.core.bll.quota.QuotaSanityParameter ( quotaId , null ) ) ; }
Source:
private boolean canRemoveVmWithDetachDisks ( ) { if ( ! ( Guid.Empty.equals ( org.ovirt.engine.core.bll.RemoveVmCommand.getVm ( ) . getVmtGuid ( ) ) ) ) { return failCanDoAction ( VdcBllMessages.VM_CANNOT_REMOVE_WITH_DETACH_DISKS_BASED_ON_TEMPLATE ) ; } for ( org.ovirt.engine.core.common.businessentities.storage.Disk disk : org.ovirt.engine.core.bll.RemoveVmCommand.getVm ( ) . getDiskList ( ) ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > diskImageList = org.ovirt.engine.core.bll.RemoveVmCommand.getDiskImageDao ( ) . getAllSnapshotsForImageGroup ( disk.getId ( ) ) ; if ( ( diskImageList.size ( ) ) > 1 ) { return failCanDoAction ( VdcBllMessages.VM_CANNOT_REMOVE_WITH_DETACH_DISKS_SNAPSHOTS_EXIST ) ; } } return true ; }

Target:
protected void setActionMessageParameters ( ) { addCanDoActionMessage ( EngineMessage.VAR__ACTION__REMOVE ) ; addCanDoActionMessage ( EngineMessage.VAR__TYPE__VM ) ; }
Source:
protected void setDiskImportData ( org.ovirt.engine.core.compat.Guid diskId , java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage_domains > storageDomains , org.ovirt.engine.core.common.businessentities.VolumeType volumeType ) { org.ovirt.engine.ui.uicommonweb.models.vms.ImportData data = new org.ovirt.engine.ui.uicommonweb.models.vms.ImportData ( ) ; diskImportDataMap.put ( diskId , data ) ; data.setAllStorageDomains ( filteredStorageDomains ) ; data.setCollapseSnapshot ( getCollapseSnapshots ( ) ) ; data.setStorageDomains ( storageDomains ) ; data.setVolumeType ( volumeType ) ; data.setStorageQuotaList ( storageQuotaMap ) ; }

Target:
protected void addDiskImportData ( org.ovirt.engine.core.compat.Guid diskId , java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > storageDomains , org.ovirt.engine.core.common.businessentities.VolumeType volumeType , org.ovirt.engine.ui.uicommonweb.models.EntityModel collapseSnapshots ) { org.ovirt.engine.ui.uicommonweb.models.vms.ImportDiskData data = new org.ovirt.engine.ui.uicommonweb.models.vms.ImportDiskData ( ) ; data.setCollapseSnapshot ( collapseSnapshots ) ; data.setAllStorageDomains ( filteredStorageDomains ) ; data.setStorageDomains ( storageDomains ) ; data.setVolumeType ( volumeType ) ; data.setStorageQuotaList ( storageQuotaMap ) ; diskImportDataMap.put ( diskId , data ) ; }
Source:
private org.ovirt.engine.core.bll.ValidationResult validateAttachStorageDomain ( ) { org.ovirt.engine.core.bll.validator.storage.StoragePoolValidator spValidator = new org.ovirt.engine.core.bll.validator.storage.StoragePoolValidator ( getStoragePool ( ) ) ; org.ovirt.engine.core.bll.ValidationResult result ; result = spValidator.isAnyDomainInProcess ( ) ; if ( ! ( result.isValid ( ) ) ) { return result ; } result = spValidator.checkStoragePoolNotInStatus ( StoragePoolStatus.Up ) ; if ( ! ( result.isValid ( ) ) ) { return result ; } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }

Target:
private org.ovirt.engine.core.bll.ValidationResult validateAttachStorageDomain ( ) { org.ovirt.engine.core.bll.validator.storage.StoragePoolValidator spValidator = new org.ovirt.engine.core.bll.validator.storage.StoragePoolValidator ( getStoragePool ( ) ) ; org.ovirt.engine.core.bll.ValidationResult result ; result = spValidator.isAnyDomainInProcess ( ) ; if ( ! ( result.isValid ( ) ) ) { return result ; } result = spValidator.isInStatus ( StoragePoolStatus.Up ) ; if ( ! ( result.isValid ( ) ) ) { return result ; } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }
Source:
public void testUpdateNotFound ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpGetEntityExpectations ( 1 , true ) ; try { resource.update ( org.ovirt.engine.api.restapi.resource.BackendClustersResourceTest.getModel ( 0 ) ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }

Target:
public void testUpdateNotFound ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpGetEntityExpectations ( 1 , true ) ; try { resource.update ( org.ovirt.engine.api.restapi.resource.BackendClustersResourceTest.getModel ( 0 ) ) ; org.junit.Assert.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc validateStorageDomain ( java.lang.String sdUUID ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.validateStorageDomain ( sdUUID ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc glusterHookRemove ( java.lang.String glusterCommand , java.lang.String stage , java.lang.String hookName ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.glusterHookRemove ( glusterCommand , stage , hookName ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
public javax.ws.rs.core.Response install ( org.ovirt.engine.api.v3.types.V3Action action ) { return adaptAction ( delegate :: install , action ) ; }

Target:
public org.ovirt.engine.api.v3.types.V3Host get ( @ javax.ws.rs.core.Context javax.ws.rs.core.UriInfo ui ) { boolean force = org.ovirt.engine.api.common.util.QueryHelper.getBooleanMatrixParameter ( ui , "force" , true , false ) ; if ( force ) { try { getDelegate ( ) . refresh ( new org.ovirt.engine.api.model.Action ( ) ) ; } catch ( javax.ws.rs.WebApplicationException exception ) { throw adaptException ( exception ) ; } } return adaptGet ( getDelegate ( ) :: get ) ; }
Source:
public 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 ; } } ; getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.StorageDomainNameSizeLimit , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public 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.storage.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:
public org.ovirt.engine.api.model.MigrationOptions adapt ( org.ovirt.engine.api.v3.types.V3MigrationOptions from ) { org.ovirt.engine.api.model.MigrationOptions to = new org.ovirt.engine.api.model.MigrationOptions ( ) ; if ( from.isSetAutoConverge ( ) ) { to.setAutoConverge ( org.ovirt.engine.api.model.InheritableBoolean.valueOf ( from.getAutoConverge ( ) ) ) ; } if ( from.isSetCompressed ( ) ) { to.setCompressed ( org.ovirt.engine.api.model.InheritableBoolean.valueOf ( from.getCompressed ( ) ) ) ; } return to ; }

Target:
public org.ovirt.engine.api.model.MigrationOptions adapt ( org.ovirt.engine.api.v3.types.V3MigrationOptions from ) { org.ovirt.engine.api.model.MigrationOptions to = new org.ovirt.engine.api.model.MigrationOptions ( ) ; if ( from.isSetAutoConverge ( ) ) { to.setAutoConverge ( org.ovirt.engine.api.model.InheritableBoolean.fromValue ( from.getAutoConverge ( ) ) ) ; } if ( from.isSetCompressed ( ) ) { to.setCompressed ( org.ovirt.engine.api.model.InheritableBoolean.fromValue ( from.getCompressed ( ) ) ) ; } return to ; }
Source:
public static void isTemplateNameUnique ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String name ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ! ( ( ( java.lang.Boolean ) ( source ) ) . booleanValue ( ) ) : false ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.IsVmTemlateWithSameNameExist , new org.ovirt.engine.core.common.queries.NameQueryParameters ( name ) , aQuery ) ; }

Target:
public static void getGlusterHooks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterHooks , new org.ovirt.engine.core.common.queries.gluster.GlusterParameters ( clusterId ) , aQuery ) ; }
Source:
private void onStop ( ) { onPowerAction ( VdcActionType.StopVm , new org.ovirt.engine.ui.uicommonweb.models.vms.VmListModel.PowerActionParametersFactory < org.ovirt.engine.core.common.action.VdcActionParametersBase > ( ) { @ java.lang.Override public org.ovirt.engine.core.common.action.VdcActionParametersBase createActionParameters ( org.ovirt.engine.core.common.businessentities.VM vm ) { return new org.ovirt.engine.core.common.action.StopVmParameters ( vm.getId ( ) , org.ovirt.engine.core.common.action.StopVmTypeEnum.NORMAL ) ; } } ) ; }

Target:
private void onStop ( ) { final org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel ) ( getWindow ( ) ) ) ; onPowerAction ( VdcActionType.StopVm , new org.ovirt.engine.ui.uicommonweb.models.vms.VmListModel.PowerActionParametersFactory < org.ovirt.engine.core.common.action.VdcActionParametersBase > ( ) { @ java.lang.Override public org.ovirt.engine.core.common.action.VdcActionParametersBase createActionParameters ( org.ovirt.engine.core.common.businessentities.VM vm ) { return new org.ovirt.engine.core.common.action.StopVmParameters ( vm.getId ( ) , org.ovirt.engine.core.common.action.StopVmTypeEnum.NORMAL , model.getReason ( ) . getEntity ( ) ) ; } } ) ; }
Source:
protected org.ovirt.engine.ui.userportal.widget.action.UserPortalImageButtonDefinition < org.ovirt.engine.ui.uicommonweb.models.userportal.UserPortalItemModel > createButtonDefinition ( final org.ovirt.engine.ui.uicommonweb.models.userportal.UserPortalItemModel data ) { return new org.ovirt.engine.ui.userportal.widget.action.UserPortalImageButtonDefinition < org.ovirt.engine.ui.uicommonweb.models.userportal.UserPortalItemModel > ( ( data.getIsPool ( ) ? constants.returnVmLabel ( ) : constants.shutDownVm ( ) ) , applicationResources.stopIcon ( ) , applicationResources.stopDisabledIcon ( ) ) { @ java.lang.Override protected org.ovirt.engine.ui.uicommonweb.UICommand resolveCommand ( ) { return data.getIsPool ( ) ? data.getReturnVmCommand ( ) : data.getShutdownCommand ( ) ; } } ; }

Target:
protected java.lang.String getTitle ( org.ovirt.engine.ui.uicommonweb.models.userportal.UserPortalItemModel value ) { return value.getIsPool ( ) ? constants.returnVmLabel ( ) : constants.shutDownVm ( ) ; }