auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public org.ovirt.engine.api.restapi.rsdl.Signature clone ( ) { org.ovirt.engine.api.restapi.rsdl.Signature clonedSignature = new org.ovirt.engine.api.restapi.rsdl.Signature ( ) ; java.util.Map < java.lang.Object , java.lang.Object > mandatoryArguments = new java.util.HashMap < java.lang.Object , java.lang.Object > ( ) ; mandatoryArguments.putAll ( getMandatoryArguments ( ) ) ; java.util.Map < java.lang.Object , java.lang.Object > optionalArguments = new java.util.HashMap < java.lang.Object , java.lang.Object > ( ) ; optionalArguments.putAll ( getOptionalArguments ( ) ) ; clonedSignature.setMandatoryArguments ( mandatoryArguments ) ; clonedSignature.setOptionalArguments ( optionalArguments ) ; return clonedSignature ; }

Target:
public org.ovirt.engine.api.restapi.rsdl.Signature clone ( ) throws java.lang.CloneNotSupportedException { super . clone ( ) ; org.ovirt.engine.api.restapi.rsdl.Signature clonedSignature = new org.ovirt.engine.api.restapi.rsdl.Signature ( ) ; java.util.Map < java.lang.Object , java.lang.Object > mandatoryArguments = new java.util.HashMap < java.lang.Object , java.lang.Object > ( ) ; mandatoryArguments.putAll ( getMandatoryArguments ( ) ) ; java.util.Map < java.lang.Object , java.lang.Object > optionalArguments = new java.util.HashMap < java.lang.Object , java.lang.Object > ( ) ; optionalArguments.putAll ( getOptionalArguments ( ) ) ; clonedSignature.setMandatoryArguments ( mandatoryArguments ) ; clonedSignature.setOptionalArguments ( optionalArguments ) ; return clonedSignature ; }
Source:
public void getAllDataCenterNetworks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId ) { 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.network.Network > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.Network > ( ) ; } } ; org.ovirt.engine.core.common.queries.IdQueryParameters params = new org.ovirt.engine.core.common.queries.IdQueryParameters ( storagePoolId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetNetworksByDataCenterId , params , aQuery ) ; }

Target:
public 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.storage.DiskImage > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.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.getInstance ( ) . runQuery ( VdcQueryType.Search , searchParams , aQuery ) ; }
Source:
private int getResourceType ( org.ovirt.engine.core.compat.backendcompat.XmlNode node , org.ovirt.engine.core.common.businessentities.VmDevice vmDevice , java.lang.String resource ) { if ( ( ( node.SelectSingleNode ( resource , _xmlNS ) ) != null ) && ( ! ( org.ovirt.engine.core.compat.StringHelper.isNullOrEmpty ( node.SelectSingleNode ( resource , _xmlNS ) . InnerText ) ) ) ) { return java.lang.Integer.valueOf ( node.SelectSingleNode ( resource , _xmlNS ) . InnerText ) ; } return - 1 ; }

Target:
private int getResourceType ( org.ovirt.engine.core.compat.backendcompat.XmlNode node , java.lang.String resource ) { if ( ( ( node.SelectSingleNode ( resource , _xmlNS ) ) != null ) && ( ! ( org.apache.commons.lang.StringUtils.isEmpty ( node.SelectSingleNode ( resource , _xmlNS ) . InnerText ) ) ) ) { return java.lang.Integer.valueOf ( node.SelectSingleNode ( resource , _xmlNS ) . InnerText ) ; } return - 1 ; }
Source:
public void testDetach ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpEntityQueryExpectations ( 1 ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.DetachDiskFromVm , org.ovirt.engine.core.common.action.AttachDetachVmDiskParameters.class , new java.lang.String [ ] { "VmId" , "EntityInfo" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.AbstractBackendDisksResourceTest.PARENT_ID , new org.ovirt.engine.core.common.asynctasks.EntityInfo ( org.ovirt.engine.core.common.VdcObjectType.Disk , org.ovirt.engine.api.restapi.resource.BackendVmDiskResourceTest.DISK_ID ) } , true , true ) ) ; org.ovirt.engine.api.model.Action action = new org.ovirt.engine.api.model.Action ( ) ; action.setDetach ( true ) ; verifyRemove ( resource.remove ( action ) ) ; }

Target:
public void testDetach ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpEntityQueryExpectations ( 1 ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.DetachDiskFromVm , org.ovirt.engine.core.common.action.AttachDetachVmDiskParameters.class , new java.lang.String [ ] { "VmId" , "EntityInfo" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendVmDiskResourceTest.VM_ID , new org.ovirt.engine.core.common.asynctasks.EntityInfo ( org.ovirt.engine.core.common.VdcObjectType.Disk , org.ovirt.engine.api.restapi.resource.BackendVmDiskResourceTest.DISK_ID ) } , true , true ) ) ; org.ovirt.engine.api.model.Action action = new org.ovirt.engine.api.model.Action ( ) ; action.setDetach ( true ) ; verifyRemove ( resource.remove ( action ) ) ; }
Source:
public static void getStorageDomainList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetStorageDomainsByStoragePoolId , new org.ovirt.engine.core.common.queries.StoragePoolQueryParametersBase ( dataCenterId ) , aQuery ) ; }

Target:
public static void getClusterList ( 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 ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > list = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ) ( source ) ) ; java.util.Collections.sort ( list , new org.ovirt.engine.core.common.businessentities.comparators.NameableComparator ( ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllVdsGroups , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }
Source:
public static void getHostArchitecture ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter < org.ovirt.engine.core.common.businessentities.ArchitectureType > ( ) { @ java.lang.Override public org.ovirt.engine.core.common.businessentities.ArchitectureType Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return ( ( org.ovirt.engine.core.common.businessentities.ArchitectureType ) ( source ) ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetHostArchitecture , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
public static void getDomainListViaPublic ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , boolean filterInternalDomain ) { 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.lang.String > ( ( ( java.util.ArrayList < java.lang.String > ) ( source ) ) ) : new java.util.ArrayList < java.lang.String > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetDomainListParameters tempVar = new org.ovirt.engine.core.common.queries.GetDomainListParameters ( ) ; tempVar.setFilterInternalDomain ( filterInternalDomain ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runPublicQuery ( VdcQueryType.GetDomainList , tempVar , aQuery ) ; }
Source:
private void addStatistics ( org.ovirt.engine.api.model.Disk model , org.ovirt.engine.api.model.Disk entity ) { model.setStatistics ( new org.ovirt.engine.api.model.Statistics ( ) ) ; org.ovirt.engine.api.restapi.resource.DiskStatisticalQuery query = new org.ovirt.engine.api.restapi.resource.DiskStatisticalQuery ( newModel ( model.getId ( ) ) ) ; java.util.List < org.ovirt.engine.api.model.Statistic > statistics = query.getStatistics ( entity ) ; for ( org.ovirt.engine.api.model.Statistic statistic : statistics ) { org.ovirt.engine.api.utils.LinkHelper.addLinks ( uriInfo , statistic , query.getParentType ( ) ) ; } model.getStatistics ( ) . getStatistics ( ) . addAll ( statistics ) ; }

Target:
private void addStatistics ( org.ovirt.engine.api.model.Disk model , org.ovirt.engine.api.model.Disk entity ) { model.setStatistics ( new org.ovirt.engine.api.model.Statistics ( ) ) ; org.ovirt.engine.api.restapi.resource.DiskStatisticalQuery query = new org.ovirt.engine.api.restapi.resource.DiskStatisticalQuery ( newModel ( model.getId ( ) ) ) ; java.util.List < org.ovirt.engine.api.model.Statistic > statistics = query.getStatistics ( entity ) ; for ( org.ovirt.engine.api.model.Statistic statistic : statistics ) { org.ovirt.engine.api.restapi.util.LinkHelper.addLinks ( statistic , query.getParentType ( ) ) ; } model.getStatistics ( ) . getStatistics ( ) . addAll ( statistics ) ; }
Source:
public void versionHasMatchingFormat ( org.ovirt.engine.core.compat.Version v ) { org.junit.Assert.assertNotNull ( ( "Missing format for version " + v ) , org.ovirt.engine.core.common.utils.VersionStorageFormatUtil.getFormatForVersion ( v ) ) ; }

Target:
public void versionHasMatchingFormat ( org.ovirt.engine.core.compat.Version v , org.ovirt.engine.core.common.businessentities.StorageType t ) { org.ovirt.engine.core.common.businessentities.StorageFormatType preferred = org.ovirt.engine.core.common.utils.VersionStorageFormatUtil.getPreferredForVersion ( v , t ) ; org.junit.Assert.assertNotNull ( java.lang.String.format ( "Missing preferred format for version %s in type %s" , v , t ) , preferred ) ; org.ovirt.engine.core.common.businessentities.StorageFormatType required = org.ovirt.engine.core.common.utils.VersionStorageFormatUtil.getRequiredForVersion ( v , t ) ; org.junit.Assert.assertNotNull ( java.lang.String.format ( "Missing required format for version %s in type %s" , v , t ) , required ) ; org.junit.Assert.assertTrue ( "Preferred version shouldn't be smaller than the required one" , ( ( preferred.compareTo ( required ) ) >= 0 ) ) ; }
Source:
public void executeCommand ( org.ovirt.engine.ui.uicommonweb.UICommand uiCommand , java.lang.Object ... params ) { org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkCommand command = ( ( org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkCommand ) ( uiCommand ) ) ; org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkItemModel < ? > op1 = command.getOp1 ( ) ; org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkItemModel < ? > op2 = command.getOp2 ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > allNics = command.getAllNics ( ) ; executeNetworkCommand ( op1 , op2 , allNics , params ) ; }

Target:
public void executeCommand ( org.ovirt.engine.ui.uicommonweb.UICommand uiCommand , java.lang.Object ... params ) { org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkCommand command = ( ( org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkCommand ) ( uiCommand ) ) ; org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkItemModel < ? > op1 = command.getOp1 ( ) ; org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkItemModel < ? > op2 = command.getOp2 ( ) ; executeNetworkCommand ( op1 , op2 , command.getDataFromHostSetupNetworksModel ( ) , params ) ; }
Source:
protected java.lang.Object [ ] getSelectedKeys ( ) { if ( ( getSelectedItems ( ) ) == null ) { return new java.lang.Object [ 0 ] ; } java.lang.Object [ ] keys = new java.lang.Object [ getSelectedItems ( ) . size ( ) ] ; for ( int i = 0 ; i < ( getSelectedItems ( ) . size ( ) ) ; i ++ ) { keys [ i ] = ( ( org.ovirt.engine.core.common.businessentities.VM ) ( getSelectedItems ( ) . get ( i ) ) ) . getId ( ) ; } return keys ; }

Target:
private void setConsoleHelpers ( ) { this . consoleUtils = ( ( org.ovirt.engine.ui.uicommonweb.ConsoleUtils ) ( org.ovirt.engine.ui.uicommonweb.TypeResolver.getInstance ( ) . resolve ( org.ovirt.engine.ui.uicommonweb.ConsoleUtils.class ) ) ) ; this . consoleManager = ( ( org.ovirt.engine.ui.uicommonweb.ConsoleManager ) ( org.ovirt.engine.ui.uicommonweb.TypeResolver.getInstance ( ) . resolve ( org.ovirt.engine.ui.uicommonweb.ConsoleManager.class ) ) ) ; this . errorPopupManager = ( ( org.ovirt.engine.ui.uicommonweb.ErrorPopupManager ) ( org.ovirt.engine.ui.uicommonweb.TypeResolver.getInstance ( ) . resolve ( org.ovirt.engine.ui.uicommonweb.ErrorPopupManager.class ) ) ) ; }
Source:
public static void getCPUList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Version version ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ServerCpu > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ServerCpu > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllServerCpuList , new org.ovirt.engine.core.common.queries.GetAllServerCpuListParameters ( version ) , aQuery ) ; }

Target:
public static void getRoleActionGroupsByRoleId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid roleId ) { 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.ActionGroup > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ActionGroup > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetRoleActionGroupsByRoleId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( roleId ) , aQuery ) ; }
Source:
private java.lang.String commaSeparated ( java.util.List < ? > invalidBondIds ) { return org.apache.commons.lang.StringUtils.join ( invalidBondIds , ", " ) ; }

Target:
org.ovirt.engine.core.bll.ValidationResult notMovingLabeledNetworkToDifferentNic ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment ) { org.ovirt.engine.core.common.businessentities.network.Network movedNetwork = existingNetworkRelatedToAttachment ( attachment ) ; if ( ! ( org.ovirt.engine.core.utils.NetworkUtils.isLabeled ( movedNetwork ) ) ) { return org.ovirt.engine.core.bll.ValidationResult.VALID ; } org.ovirt.engine.core.common.businessentities.network.NetworkAttachment existingAttachment = attachmentsById.get ( attachment.getId ( ) ) ; boolean movedToDifferentNic = ! ( existingAttachment.getNicId ( ) . equals ( attachment.getNicId ( ) ) ) ; return org.ovirt.engine.core.bll.ValidationResult.failWith ( EngineMessage.ACTION_TYPE_FAILED_CANNOT_MOVE_LABELED_NETWORK_TO_ANOTHER_NIC , org.ovirt.engine.core.utils.ReplacementUtils.createSetVariableString ( org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidator.ACTION_TYPE_FAILED_CANNOT_MOVE_LABELED_NETWORK_TO_ANOTHER_NIC_ENTITY , movedNetwork.getLabel ( ) ) ) . when ( movedToDifferentNic ) ; }
Source:
public org.ovirt.engine.core.bll.SPMAsyncTask concreteCreateTask ( org.ovirt.engine.core.compat.Guid taskId , org.ovirt.engine.core.common.asynctasks.AsyncTaskCreationInfo asyncTaskCreationInfo , org.ovirt.engine.core.common.action.VdcActionType parentCommand ) { org.ovirt.engine.core.common.asynctasks.AsyncTaskParameters p = new org.ovirt.engine.core.common.asynctasks.AsyncTaskParameters ( asyncTaskCreationInfo , getAsyncTask ( taskId , asyncTaskCreationInfo , parentCommand ) ) ; p.setEntityInfo ( getParameters ( ) . getEntityInfo ( ) ) ; return createTask ( internalGetTaskType ( ) , p ) ; }

Target:
public org.ovirt.engine.core.compat.CommandStatus getCommandStatus ( ) { return commandStatus ; }
Source:
public void testGetAll ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.vds_spm_id_map > result = dao.getAll ( org.ovirt.engine.core.dao.VdsSpmIdMapDaoTest.EXISTING_STORAGE_POOL_ID ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.vds_spm_id_map mapping : result ) { org.junit.Assert.assertEquals ( org.ovirt.engine.core.dao.VdsSpmIdMapDaoTest.EXISTING_STORAGE_POOL_ID , mapping.getstorage_pool_id ( ) ) ; } }

Target:
public void testGetAll ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VdsSpmIdMap > result = dao.getAll ( org.ovirt.engine.core.dao.VdsSpmIdMapDaoTest.EXISTING_STORAGE_POOL_ID ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.VdsSpmIdMap mapping : result ) { org.junit.Assert.assertEquals ( org.ovirt.engine.core.dao.VdsSpmIdMapDaoTest.EXISTING_STORAGE_POOL_ID , mapping.getStoragePoolId ( ) ) ; } }
Source:
protected void populateTabMap ( ) { getTabNameMapping ( ) . put ( TabName.GENERAL_TAB , this . generalTab ) ; getTabNameMapping ( ) . put ( TabName.CONSOLE_TAB , this . consoleTab ) ; getTabNameMapping ( ) . put ( TabName.CLUSTER_POLICY_TAB , this . clusterPolicyTab ) ; getTabNameMapping ( ) . put ( TabName.OPTIMIZATION_TAB , this . optimizationTab ) ; getTabNameMapping ( ) . put ( TabName.RESILIENCE_POLICY_TAB , this . resiliencePolicyTab ) ; }

Target:
protected void populateTabMap ( ) { getTabNameMapping ( ) . put ( TabName.GENERAL_TAB , this . generalTab ) ; getTabNameMapping ( ) . put ( TabName.CONSOLE_TAB , this . consoleTab ) ; getTabNameMapping ( ) . put ( TabName.CLUSTER_POLICY_TAB , this . clusterPolicyTab ) ; getTabNameMapping ( ) . put ( TabName.OPTIMIZATION_TAB , this . optimizationTab ) ; getTabNameMapping ( ) . put ( TabName.MIGRATION_TAB , this . migrationTab ) ; getTabNameMapping ( ) . put ( TabName.MAC_POOL_TAB , macPoolTab ) ; }
Source:
public java.lang.Boolean runInTransaction ( ) { org.ovirt.engine.core.bll.Backend.getInstance ( ) . getResourceManager ( ) . RunVdsCommand ( VDSCommandType.CollectVdsNetworkData , new org.ovirt.engine.core.common.vdscommands.VdsIdAndVdsVDSCommandParametersBase ( bckndCmdParams.getVdsId ( ) ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.Network net : getNetworks ( ) ) { org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelper.setStatus ( getVdsGroupId ( ) , net ) ; } return java.lang.Boolean.TRUE ; }

Target:
public java.lang.Boolean runInTransaction ( ) { org.ovirt.engine.core.bll.Backend.getInstance ( ) . getResourceManager ( ) . RunVdsCommand ( VDSCommandType.CollectVdsNetworkData , new org.ovirt.engine.core.common.vdscommands.CollectVdsNetworkDataVDSCommandParameters ( getVds ( ) ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.Network net : getNetworks ( ) ) { org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelper.setStatus ( getVdsGroupId ( ) , net ) ; } return java.lang.Boolean.TRUE ; }
Source:
public void testGetQosWhenNetworkAttachmentHasOverriddenQos ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.Network network = createNetworkWithQos ( createHostNetworkQos ( ) ) ; org.ovirt.engine.core.common.businessentities.network.NetworkAttachment networkAttachment = createNetworkAttachentWithOverriddenQos ( ) ; org.ovirt.engine.core.common.businessentities.network.HostNetworkQos networkAttachmentHostNetworkQos = networkAttachment.getHostNetworkQos ( ) ; org.junit.Assert.assertThat ( effectiveHostNetworkQos.getQos ( networkAttachment , network ) , org.hamcrest.CoreMatchers.is ( networkAttachmentHostNetworkQos ) ) ; org.mockito.Mockito.verifyNoMoreInteractions ( hostNetworkQosDao ) ; }

Target:
public void testGetQosWhenNetworkAttachmentHasOverriddenQos ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.Network network = createNetworkWithQos ( createHostNetworkQos ( ) ) ; org.ovirt.engine.core.common.businessentities.network.NetworkAttachment networkAttachment = createNetworkAttachentWithOverriddenQos ( ) ; org.ovirt.engine.core.common.businessentities.network.HostNetworkQos networkAttachmentHostNetworkQos = org.ovirt.engine.core.common.businessentities.network.HostNetworkQos.fromAnonymousHostNetworkQos ( networkAttachment.getHostNetworkQos ( ) ) ; org.junit.Assert.assertThat ( effectiveHostNetworkQos.getQos ( networkAttachment , network ) , org.hamcrest.CoreMatchers.is ( networkAttachmentHostNetworkQos ) ) ; org.mockito.Mockito.verifyNoMoreInteractions ( hostNetworkQosDao ) ; }
Source:
private void Run ( ) { org.ovirt.engine.core.common.businessentities.VM entity = ( ( org.ovirt.engine.core.common.businessentities.VM ) ( getItem ( ) . getEntity ( ) ) ) ; boolean reinitialize = ( ! ( entity.getis_initialized ( ) ) ) && ( org.ovirt.engine.ui.uicommonweb.DataProvider.IsWindowsOsType ( entity.getvm_os ( ) ) ) ; org.ovirt.engine.core.common.action.RunVmParams tempVar = new org.ovirt.engine.core.common.action.RunVmParams ( entity.getId ( ) ) ; tempVar.setReinitialize ( reinitialize ) ; org.ovirt.engine.ui.frontend.Frontend.RunAction ( VdcActionType.RunVm , tempVar ) ; }

Target:
private void Run ( ) { org.ovirt.engine.core.common.businessentities.VM entity = ( ( org.ovirt.engine.core.common.businessentities.VM ) ( getItem ( ) . getEntity ( ) ) ) ; boolean reinitialize = ( ! ( entity.isInitialized ( ) ) ) && ( org.ovirt.engine.ui.uicommonweb.DataProvider.IsWindowsOsType ( entity.getVmOs ( ) ) ) ; org.ovirt.engine.core.common.action.RunVmParams tempVar = new org.ovirt.engine.core.common.action.RunVmParams ( entity.getId ( ) ) ; tempVar.setReinitialize ( reinitialize ) ; org.ovirt.engine.ui.frontend.Frontend.RunAction ( VdcActionType.RunVm , tempVar ) ; }
Source:
protected void executeCommand ( ) { org.ovirt.engine.core.bll.DestroyImageCheckCommand.getParameters ( ) . setEntityInfo ( new org.ovirt.engine.core.common.asynctasks.EntityInfo ( org.ovirt.engine.core.common.VdcObjectType.Disk , org.ovirt.engine.core.bll.DestroyImageCheckCommand.getParameters ( ) . getImageGroupId ( ) ) ) ; java.util.List < org.ovirt.engine.core.compat.Guid > failedGuids = getFailedVolumeIds ( ) ; if ( failedGuids.isEmpty ( ) ) { log.info ( "Requested images were successfully removed" ) ; org.ovirt.engine.core.bll.DestroyImageCheckCommand.setSucceeded ( true ) ; persistCommand ( org.ovirt.engine.core.bll.DestroyImageCheckCommand.getParameters ( ) . getParentCommand ( ) ) ; } else { log.error ( "The following images were not removed: {}" , failedGuids ) ; } }

Target:
protected void executeCommand ( ) { org.ovirt.engine.core.bll.DestroyImageCheckCommand.getParameters ( ) . setEntityInfo ( new org.ovirt.engine.core.common.asynctasks.EntityInfo ( org.ovirt.engine.core.common.VdcObjectType.Disk , org.ovirt.engine.core.bll.DestroyImageCheckCommand.getParameters ( ) . getImageGroupId ( ) ) ) ; java.util.List < org.ovirt.engine.core.compat.Guid > failedGuids = getFailedVolumeIds ( ) ; if ( failedGuids.isEmpty ( ) ) { log.info ( "Requested images were successfully removed" ) ; org.ovirt.engine.core.bll.DestroyImageCheckCommand.setSucceeded ( true ) ; setCommandStatus ( CommandStatus.SUCCEEDED ) ; persistCommand ( org.ovirt.engine.core.bll.DestroyImageCheckCommand.getParameters ( ) . getParentCommand ( ) ) ; } else { log.error ( "The following images were not removed: {}" , failedGuids ) ; } }
Source:
private void addSupportedQosTypes ( org.ovirt.engine.api.model.VersionCaps version ) { version.setQosTypes ( new org.ovirt.engine.api.model.QosTypes ( ) ) ; if ( org.ovirt.engine.api.restapi.utils.VersionUtils.greaterOrEqual ( version , org.ovirt.engine.api.restapi.resource.BackendCapabilitiesResource.VERSION_3_5 ) ) { version.getQosTypes ( ) . getQosTypes ( ) . add ( org.ovirt.engine.api.model.QosType.STORAGE.name ( ) . toLowerCase ( ) ) ; } }

Target:
private void addSupportedQosTypes ( org.ovirt.engine.api.model.VersionCaps version ) { version.setQosTypes ( new org.ovirt.engine.api.model.QosTypes ( ) ) ; if ( org.ovirt.engine.api.restapi.utils.VersionUtils.greaterOrEqual ( version , org.ovirt.engine.api.restapi.resource.BackendCapabilitiesResource.VERSION_3_5 ) ) { version.getQosTypes ( ) . getQosTypes ( ) . add ( org.ovirt.engine.api.model.QosType.STORAGE.name ( ) . toLowerCase ( ) ) ; version.getQosTypes ( ) . getQosTypes ( ) . add ( org.ovirt.engine.api.model.QosType.CPU.name ( ) . toLowerCase ( ) ) ; } }
Source:
protected void executeDomainCommand ( ) { log.info ( "-- executeVdsBrokerCommand: calling 'isolateVolume'" ) ; status = org.ovirt.engine.core.vdsbroker.vdsbroker.IsolateVolumeVDSCommand.getBroker ( ) . isolateVolume ( org.ovirt.engine.core.vdsbroker.vdsbroker.IsolateVolumeVDSCommand.getParameters ( ) . getStorageDomainId ( ) . toString ( ) , org.ovirt.engine.core.vdsbroker.vdsbroker.IsolateVolumeVDSCommand.getParameters ( ) . getSourceImageGroupId ( ) . toString ( ) , org.ovirt.engine.core.vdsbroker.vdsbroker.IsolateVolumeVDSCommand.getParameters ( ) . getDestImageGroupId ( ) . toString ( ) , org.ovirt.engine.core.vdsbroker.vdsbroker.IsolateVolumeVDSCommand.getParameters ( ) . getImage ( ) . toString ( ) ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.IsolateVolumeVDSCommand.proceedProxyReturnValue ( ) ; }

Target:
protected void executeVdsBrokerCommand ( ) { log.info ( "-- executeVdsBrokerCommand: calling 'isolateVolume'" ) ; status = org.ovirt.engine.core.vdsbroker.vdsbroker.IsolateVolumeVDSCommand.getBroker ( ) . isolateVolume ( org.ovirt.engine.core.vdsbroker.vdsbroker.IsolateVolumeVDSCommand.getParameters ( ) . getStorageDomainId ( ) . toString ( ) , org.ovirt.engine.core.vdsbroker.vdsbroker.IsolateVolumeVDSCommand.getParameters ( ) . getSourceImageGroupId ( ) . toString ( ) , org.ovirt.engine.core.vdsbroker.vdsbroker.IsolateVolumeVDSCommand.getParameters ( ) . getDestImageGroupId ( ) . toString ( ) , org.ovirt.engine.core.vdsbroker.vdsbroker.IsolateVolumeVDSCommand.getParameters ( ) . getImage ( ) . toString ( ) ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.IsolateVolumeVDSCommand.proceedProxyReturnValue ( ) ; }
Source:
public void testGetRootWithHierarchy ( ) { org.ovirt.engine.core.common.businessentities.Tags tag = createTag ( "tag1" , "desc1" ) ; tagsDirector.addTag ( tag ) ; org.ovirt.engine.core.common.businessentities.Tags tags = tagsDirector.getRootTag ( ) ; org.junit.Assert.assertNotNull ( tags ) ; org.junit.Assert.assertEquals ( tags.gettag_id ( ) , TagsDirector.ROOT_TAG_ID ) ; org.junit.Assert.assertEquals ( 1 , tags.getChildren ( ) . size ( ) ) ; org.junit.Assert.assertEquals ( "tag1" , tags.getChildren ( ) . get ( 0 ) . gettag_name ( ) ) ; }

Target:
public void testGetRootWithHierarchy ( ) { org.ovirt.engine.core.common.businessentities.Tags tag = createTag ( "tag1" , "desc1" ) ; tagsDirector.addTag ( tag ) ; org.ovirt.engine.core.common.businessentities.Tags tags = tagsDirector.getRootTag ( ) ; org.junit.Assert.assertNotNull ( tags ) ; org.junit.Assert.assertEquals ( tags.getTagId ( ) , TagsDirector.ROOT_TAG_ID ) ; org.junit.Assert.assertEquals ( 1 , tags.getChildren ( ) . size ( ) ) ; org.junit.Assert.assertEquals ( "tag1" , tags.getChildren ( ) . get ( 0 ) . getTagName ( ) ) ; }
Source:
private void invokeHostUpgrade ( org.ovirt.engine.core.common.action.hostdeploy.UpgradeHostParameters params ) { org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runAction ( VdcActionType.UpgradeHost , params , new org.ovirt.engine.ui.uicompat.IFrontendActionAsyncCallback ( ) { @ java.lang.Override public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { org.ovirt.engine.core.common.action.VdcReturnValueBase returnValue = result.getReturnValue ( ) ; if ( ( returnValue != null ) && ( returnValue.getSucceeded ( ) ) ) { cancel ( ) ; } } } ) ; }

Target:
public void start ( ) { 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.FenceVdsActionParameters ( vds.getId ( ) ) ) ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runMultipleAction ( VdcActionType.StartVds , list , new org.ovirt.engine.ui.uicompat.IFrontendMultipleActionAsyncCallback ( ) { @ java.lang.Override public void executed ( org.ovirt.engine.ui.uicompat.FrontendMultipleActionAsyncResult result ) { } } , null ) ; }
Source:
public 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.getInstance ( ) . runQuery ( VdcQueryType.GetVdsGroupById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
private void runQueryByIdParameter ( org.ovirt.engine.core.common.queries.VdcQueryType queryType , org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.AsIsAsyncConverter ( ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( queryType , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { org.ovirt.engine.core.common.action.VdcReturnValueBase returnValue = result.getReturnValue ( ) ; if ( ( returnValue != null ) && ( returnValue.getSucceeded ( ) ) ) { doNetworkOperation ( returnValue , ( ( java.util.List < org.ovirt.engine.ui.uicommonweb.models.vms.NicWithLogicalNetworks > ) ( unitVmModel.getNicsWithLogicalNetworks ( ) . getItems ( ) ) ) ) ; } else { networkCreatingManager.getCallback ( ) . queryFailed ( ) ; } }

Target:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { org.ovirt.engine.core.common.action.VdcReturnValueBase returnValue = result.getReturnValue ( ) ; if ( ( returnValue != null ) && ( returnValue.getSucceeded ( ) ) ) { java.util.List < org.ovirt.engine.ui.uicommonweb.models.vms.VnicInstanceType > nicWithLogicalNetworks = ( ( java.util.List < org.ovirt.engine.ui.uicommonweb.models.vms.VnicInstanceType > ) ( unitVmModel.getNicsWithLogicalNetworks ( ) . getItems ( ) ) ) ; if ( nicWithLogicalNetworks == null ) { nicWithLogicalNetworks = new java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.vms.VnicInstanceType > ( ) ; } doNetworkOperation ( returnValue , nicWithLogicalNetworks ) ; } else { networkCreatingManager.getCallback ( ) . queryFailed ( ) ; } }
Source:
private void InitCache ( ) { if ( ( org.ovirt.engine.core.utils.pm.VdsFenceOptions.fencingOptionMapping ) == null ) { org.ovirt.engine.core.utils.pm.VdsFenceOptions.fencingAgentInstanceOptions = new java.util.HashMap < java.lang.String , java.lang.String > ( ) ; org.ovirt.engine.core.utils.pm.VdsFenceOptions.fencingOptionMapping = new java.util.HashMap < java.lang.String , java.util.HashMap < java.lang.String , java.lang.String > > ( ) ; org.ovirt.engine.core.utils.pm.VdsFenceOptions.fencingOptionTypes = new java.util.HashMap < java.lang.String , java.lang.String > ( ) ; org.ovirt.engine.core.utils.pm.VdsFenceOptions.fencingSpecialParams = new java.util.HashSet < java.lang.String > ( ) ; CacheFencingAgentsOptionMapping ( ) ; CacheFencingAgentsOptionTypes ( ) ; } }

Target:
private void InitCache ( ) { if ( ( fencingOptionMapping ) == null ) { org.ovirt.engine.core.utils.pm.VdsFenceOptions.fencingAgentInstanceOptions = new java.util.HashMap < java.lang.String , java.lang.String > ( ) ; fencingOptionMapping = new java.util.HashMap < java.lang.String , java.util.HashMap < java.lang.String , java.lang.String > > ( ) ; org.ovirt.engine.core.utils.pm.VdsFenceOptions.fencingOptionTypes = new java.util.HashMap < java.lang.String , java.lang.String > ( ) ; org.ovirt.engine.core.utils.pm.VdsFenceOptions.fencingSpecialParams = new java.util.HashSet < java.lang.String > ( ) ; CacheFencingAgentsOptionMapping ( ) ; CacheFencingAgentsOptionTypes ( ) ; } }
Source:
public static void GetStorageConnectionById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String id , boolean isRefresh ) { 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.StorageServerConnections ) ( source ) ) : null ; } } ; org.ovirt.engine.core.common.queries.StorageServerConnectionQueryParametersBase params = new org.ovirt.engine.core.common.queries.StorageServerConnectionQueryParametersBase ( id ) ; params.setRefresh ( isRefresh ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetStorageServerConnectionById , params , aQuery ) ; }

Target:
public static void GetRoleActionGroupsByRoleId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid roleId ) { 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.ActionGroup > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ActionGroup > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetRoleActionGroupsByRoleId , new org.ovirt.engine.core.common.queries.MultilevelAdministrationByRoleIdParameters ( roleId ) , aQuery ) ; }
Source:
private org.ovirt.engine.sdk.entities.RSDL load ( ) throws java.io.IOException { try { javax.xml.bind.JAXBContext context = javax.xml.bind.JAXBContext.newInstance ( org.ovirt.engine.sdk.entities.RSDL.class ) ; javax.xml.bind.Unmarshaller unmarshaller = context.createUnmarshaller ( ) ; javax.xml.transform.Source source = new javax.xml.transform.stream.StreamSource ( file ) ; javax.xml.bind.JAXBElement < org.ovirt.engine.sdk.entities.RSDL > element = unmarshaller.unmarshal ( source , org.ovirt.engine.sdk.entities.RSDL.class ) ; return element.getValue ( ) ; } catch ( javax.xml.bind.JAXBException exception ) { throw new java.io.IOException ( exception ) ; } }

Target:
private org.ovirt.engine.sdk.entities.Rsdl load ( ) throws java.io.IOException { try { javax.xml.bind.JAXBContext context = javax.xml.bind.JAXBContext.newInstance ( org.ovirt.engine.sdk.entities.Rsdl.class ) ; javax.xml.bind.Unmarshaller unmarshaller = context.createUnmarshaller ( ) ; javax.xml.transform.Source source = new javax.xml.transform.stream.StreamSource ( file ) ; javax.xml.bind.JAXBElement < org.ovirt.engine.sdk.entities.Rsdl > element = unmarshaller.unmarshal ( source , org.ovirt.engine.sdk.entities.Rsdl.class ) ; return element.getValue ( ) ; } catch ( javax.xml.bind.JAXBException exception ) { throw new java.io.IOException ( exception ) ; } }
Source:
private boolean isTemplateInDestStorageDomain ( org.ovirt.engine.core.compat.Guid imageId , org.ovirt.engine.core.compat.Guid sourceDomainId ) { org.ovirt.engine.core.compat.Guid templateId = getDiskImageById ( imageId ) . getit_guid ( ) ; if ( ! ( ImagesHandler.BlankImageTemplateId.equals ( templateId ) ) ) { org.ovirt.engine.core.common.businessentities.DiskImage templateImage = getDiskImageDao ( ) . get ( templateId ) ; if ( ! ( templateImage.getstorage_ids ( ) . contains ( sourceDomainId ) ) ) { return failCanDoAction ( VdcBllMessages.ACTION_TYPE_FAILED_TEMPLATE_NOT_FOUND_ON_DESTINATION_DOMAIN ) ; } } return true ; }

Target:
private boolean isTemplateInDestStorageDomain ( org.ovirt.engine.core.compat.Guid imageId , org.ovirt.engine.core.compat.Guid sourceDomainId ) { org.ovirt.engine.core.compat.Guid templateId = getDiskImageById ( imageId ) . getit_guid ( ) ; if ( ! ( Guid.Empty.equals ( templateId ) ) ) { org.ovirt.engine.core.common.businessentities.DiskImage templateImage = getDiskImageDao ( ) . get ( templateId ) ; if ( ! ( templateImage.getstorage_ids ( ) . contains ( sourceDomainId ) ) ) { return failCanDoAction ( VdcBllMessages.ACTION_TYPE_FAILED_TEMPLATE_NOT_FOUND_ON_DESTINATION_DOMAIN ) ; } } return true ; }
Source:
private static void validateResult ( org.ovirt.engine.core.bll.ValidationResult validationResult , boolean isValid , org.ovirt.engine.core.common.errors.EngineMessage message ) { org.junit.Assert.assertEquals ( isValid , validationResult.isValid ( ) ) ; org.junit.Assert.assertEquals ( message , validationResult.getMessage ( ) ) ; }

Target:
private static void validateResult ( org.ovirt.engine.core.bll.ValidationResult validationResult , boolean isValid , org.ovirt.engine.core.common.errors.EngineMessage message ) { org.junit.Assert.assertEquals ( isValid , validationResult.isValid ( ) ) ; if ( ! isValid ) { org.junit.Assert.assertThat ( validationResult , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( message ) ) ; } }
Source:
private < T extends java.lang.Enum < T > > java.lang.String getMessage ( java.util.Map < T , java.lang.String > map , T type ) { java.lang.String message = map.get ( type ) ; if ( message == null ) { org.ovirt.engine.core.dal.job.ExecutionMessageDirector.log.warnFormat ( "The message key {0} is missing from {1}" , type.name ( ) , org.ovirt.engine.core.dal.job.ExecutionMessageDirector.EXECUTION_MESSAGES_FILE_PATH ) ; message = type.name ( ) ; } return message ; }

Target:
private < T extends java.lang.Enum < T > > java.lang.String getMessage ( java.util.Map < T , java.lang.String > map , T type ) { java.lang.String message = map.get ( type ) ; if ( message == null ) { org.ovirt.engine.core.dal.job.ExecutionMessageDirector.log.warn ( "The message key '{}' is missing from '{}'" , type.name ( ) , org.ovirt.engine.core.dal.job.ExecutionMessageDirector.EXECUTION_MESSAGES_FILE_PATH ) ; message = type.name ( ) ; } return message ; }
Source:
private org.ovirt.engine.core.compat.Guid addJob ( org.ovirt.engine.core.common.businessentities.VDSGroup cluster , org.ovirt.engine.core.common.asynctasks.gluster.GlusterAsyncTask task , org.ovirt.engine.core.common.action.VdcActionType actionType ) { org.ovirt.engine.core.common.action.VdcReturnValueBase result = getBackend ( ) . runInternalAction ( VdcActionType.AddInternalJob , new org.ovirt.engine.core.common.action.AddInternalJobParameters ( org.ovirt.engine.core.dal.job.ExecutionMessageDirector.resolveJobMessage ( actionType , org.ovirt.engine.core.bll.gluster.GlusterTasksSyncJob.getMessageMap ( cluster , task ) ) , actionType , true ) ) ; if ( ! ( result.getSucceeded ( ) ) ) { throw new org.ovirt.engine.core.common.errors.VdcBLLException ( result.getFault ( ) . getError ( ) ) ; } org.ovirt.engine.core.compat.Guid jobId = ( ( org.ovirt.engine.core.compat.Guid ) ( result.getActionReturnValue ( ) ) ) ; return jobId ; }

Target:
private org.ovirt.engine.core.compat.Guid addAsyncTaskStep ( org.ovirt.engine.core.common.businessentities.VDSGroup cluster , org.ovirt.engine.core.common.asynctasks.gluster.GlusterAsyncTask task , org.ovirt.engine.core.common.job.StepEnum step , org.ovirt.engine.core.compat.Guid execStepId ) { org.ovirt.engine.core.common.action.VdcReturnValueBase result ; result = getBackend ( ) . runInternalAction ( VdcActionType.AddInternalStep , new org.ovirt.engine.core.common.action.AddStepParameters ( execStepId , getGlusterTaskUtils ( ) . getTaskMessage ( cluster , step , task ) , step ) ) ; if ( ! ( result.getSucceeded ( ) ) ) { throw new org.ovirt.engine.core.common.errors.VdcBLLException ( result.getFault ( ) . getError ( ) ) ; } org.ovirt.engine.core.compat.Guid asyncStepId = ( ( org.ovirt.engine.core.compat.Guid ) ( result.getActionReturnValue ( ) ) ) ; return asyncStepId ; }
Source:
public java.lang.String toString ( ) { return org.ovirt.engine.core.common.utils.ToStringBuilder.forInstance ( this ) . append ( "id" , getId ( ) ) . append ( "networkId" , getNetworkId ( ) ) . append ( "networkQosId" , getNetworkQosId ( ) ) . append ( "portMirroring" , isPortMirroring ( ) ) . append ( "passthrough" , isPassthrough ( ) ) . append ( "customProperties" , getCustomProperties ( ) ) . append ( "description" , getDescription ( ) ) . append ( "networkFilterId" , getNetworkFilterId ( ) ) . build ( ) ; }

Target:
public java.lang.String toString ( ) { return org.ovirt.engine.core.common.utils.ToStringBuilder.forInstance ( this ) . append ( "id" , getId ( ) ) . append ( "networkId" , getNetworkId ( ) ) . append ( "networkQosId" , getNetworkQosId ( ) ) . append ( "portMirroring" , isPortMirroring ( ) ) . append ( "passthrough" , isPassthrough ( ) ) . append ( "migratable" , isMigratable ( ) ) . append ( "customProperties" , getCustomProperties ( ) ) . append ( "description" , getDescription ( ) ) . append ( "networkFilterId" , getNetworkFilterId ( ) ) . build ( ) ; }
Source:
public void getVnicProfilesByDcId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dcId ) { if ( ( aQuery.converterCallback ) == null ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VnicProfileView > ( ) ; } return source ; } } ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVnicProfilesByDataCenterId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dcId ) , aQuery ) ; }

Target:
public void getHostListByCluster ( org.ovirt.engine.ui.frontend.AsyncQuery < java.util.List < org.ovirt.engine.core.common.businessentities.VDS > > aQuery , java.lang.String clusterName ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.ListConverter < > ( ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( ( ( "Host: cluster = " + clusterName ) + " sortby name" ) , org.ovirt.engine.core.common.interfaces.SearchType.VDS ) , aQuery ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.irsbroker.OneUuidReturnForXmlRpc createVG ( java.lang.String sdUUID , java.lang.String [ ] deviceList ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "LVMVolumeGroup.create" ) . withParameter ( "name" , sdUUID ) . withParameter ( "devlist" , new java.util.ArrayList < > ( java.util.Arrays.asList ( deviceList ) ) ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) . withResponseKey ( "uuid" ) ; return new org.ovirt.engine.core.vdsbroker.irsbroker.OneUuidReturnForXmlRpc ( response ) ; }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.OneMapReturnForXmlRpc get_image_transfer_session_stats ( java.lang.String ticketId ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "Host.get_image_transfer_session_stats" ) . withParameter ( "ticketUUID" , ticketId ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) . withResponseKey ( "statsMap" ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.OneMapReturnForXmlRpc ( response ) ; }
Source:
public com.google.gwt.safehtml.shared.SafeHtml getValue ( org.ovirt.engine.ui.uicommonweb.models.userportal.UserPortalItemModel item ) { com.google.gwt.safehtml.shared.SafeHtmlBuilder builder = new com.google.gwt.safehtml.shared.SafeHtmlBuilder ( ) ; builder.append ( templates.vmNameCellItem ( item.getName ( ) ) ) ; if ( ( item.getDescription ( ) ) != null ) { builder.append ( templates.vmDescriptionCellItem ( item.getDescription ( ) ) ) ; } return builder.toSafeHtml ( ) ; }

Target:
public void render ( org.ovirt.engine.ui.userportal.section.main.view.tab.extended.Context context , org.ovirt.engine.ui.uicommonweb.models.userportal.UserPortalItemModel item , com.google.gwt.safehtml.shared.SafeHtmlBuilder sb ) { sb.append ( templates.vmNameCellItem ( org.ovirt.engine.ui.common.utils.ElementIdUtils.createTableCellElementId ( elementIdPrefix , "name" , context ) , item.getName ( ) ) ) ; java.lang.String description = item.getDescription ( ) ; if ( ( description != null ) && ( ! ( description.isEmpty ( ) ) ) ) { sb.append ( templates.vmDescriptionCellItem ( description ) ) ; } }
Source:
public void getCinderVolumeTypesList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storageDomainId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter < java.util.List < org.ovirt.engine.core.common.businessentities.storage.CinderVolumeType > > ( ) { @ java.lang.Override public java.util.List < org.ovirt.engine.core.common.businessentities.storage.CinderVolumeType > convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return ( ( java.util.List < org.ovirt.engine.core.common.businessentities.storage.CinderVolumeType > ) ( source ) ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetCinderVolumeTypesByStorageDomainId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( storageDomainId ) , aQuery ) ; }

Target:
public void getStorageDomainList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) ; } } ; org.ovirt.engine.core.common.queries.SearchParameters searchParams = new org.ovirt.engine.core.common.queries.SearchParameters ( "Storage:" , org.ovirt.engine.core.common.interfaces.SearchType.StorageDomain ) ; searchParams.setMaxCount ( 9999 ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , searchParams , aQuery ) ; }