auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public static int maxMemorySizeWithHotplugInMb ( org.ovirt.engine.core.common.businessentities.VM vm ) { 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 ) ; if ( osRepository.get64bitOss ( ) . contains ( vm.getOs ( ) ) ) { org.ovirt.engine.core.common.config.ConfigValues config = ( ( vm.getClusterArch ( ) ) == ( org.ovirt.engine.core.common.businessentities.ArchitectureType.ppc64 ) ) ? org.ovirt.engine.core.common.config.ConfigValues.VMPpc64BitMaxMemorySizeInMB : org.ovirt.engine.core.common.config.ConfigValues.VM64BitMaxMemorySizeInMB ; return org.ovirt.engine.core.common.config.Config.getValue ( config , vm.getCompatibilityVersion ( ) . getValue ( ) ) ; } return org.ovirt.engine.core.common.config.Config.getValue ( ConfigValues.VM32BitMaxMemorySizeInMB ) ; }

Target:
private static org.ovirt.engine.core.common.config.ConfigValues getMaxMemConfigValueByOsId ( int osId ) { 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 ) ; return osRepository.get64bitOss ( ) . contains ( osId ) ? ( osRepository.getOsArchitectures ( ) . get ( osId ) . getFamily ( ) ) == ( org.ovirt.engine.core.common.businessentities.ArchitectureType.ppc ) ? org.ovirt.engine.core.common.config.ConfigValues.VMPpc64BitMaxMemorySizeInMB : org.ovirt.engine.core.common.config.ConfigValues.VM64BitMaxMemorySizeInMB : org.ovirt.engine.core.common.config.ConfigValues.VM32BitMaxMemorySizeInMB ; }
Source:
public void testDeactivateNic ( ) throws java.lang.Exception { org.ovirt.engine.api.restapi.resource.BackendVmNicResource backendVmNicResource = ( ( org.ovirt.engine.api.restapi.resource.BackendVmNicResource ) ( resource ) ) ; setAllContentHeaderExpectation ( ) ; setUpGetEntityExpectations ( 3 ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.UpdateVmInterface , org.ovirt.engine.core.common.action.AddVmInterfaceParameters.class , new java.lang.String [ ] { "VmId" , "Interface.Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.AbstractBackendNicsResourceTest.PARENT_ID , GUIDS [ 1 ] } ) ) ; verifyActionResponse ( backendVmNicResource.deactivate ( new org.ovirt.engine.api.model.Action ( ) ) ) ; }

Target:
public void testDeactivateNic ( ) throws java.lang.Exception { org.ovirt.engine.api.restapi.resource.BackendVmNicResource backendVmNicResource = ( ( org.ovirt.engine.api.restapi.resource.BackendVmNicResource ) ( resource ) ) ; setAllContentHeaderExpectation ( ) ; setUpGetEntityExpectations ( 3 ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.UpdateVmInterface , org.ovirt.engine.core.common.action.AddVmInterfaceParameters.class , new java.lang.String [ ] { "VmId" , "Interface.Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendVmNicResourceTest.VM_ID , org.ovirt.engine.api.restapi.resource.BackendVmNicResourceTest.NIC_ID } ) ) ; verifyActionResponse ( backendVmNicResource.deactivate ( new org.ovirt.engine.api.model.Action ( ) ) ) ; }
Source:
public void onSuccess ( java.lang.Object target1 , java.lang.Object returnValue1 ) { java.lang.Object [ ] array1 = ( ( java.lang.Object [ ] ) ( target1 ) ) ; org.ovirt.engine.ui.uicommonweb.models.storage.StorageDataCenterListModel listModel1 = ( ( org.ovirt.engine.ui.uicommonweb.models.storage.StorageDataCenterListModel ) ( array1 [ 0 ] ) ) ; org.ovirt.engine.core.common.businessentities.StoragePool dataCenter1 = ( ( org.ovirt.engine.core.common.businessentities.StoragePool ) ( array1 [ 1 ] ) ) ; boolean addDatacenter1 = ( ( dataCenter1.getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.StoragePoolStatus.Up ) ) && ( returnValue1 == null ) ; listModel1.addToAttachCandidateDatacenters ( dataCenter1 , addDatacenter1 ) ; }

Target:
public void onSuccess ( org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain ) { boolean addDatacenter = ( ( dataCenter.getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.StoragePoolStatus.Up ) ) && ( storageDomain == null ) ; addToAttachCandidateDatacenters ( dataCenter , addDatacenter ) ; }
Source:
public static org.ovirt.engine.core.bll.CommandBase < ? extends org.ovirt.engine.core.common.action.VdcActionParametersBase > [ ] data ( ) { return new org.ovirt.engine.core.bll.CommandBase < ? > [ ] { new org.ovirt.engine.core.bll.CreateSnapshotCommand ( new org.ovirt.engine.core.common.action.ImagesActionsParametersBase ( ) ) , new org.ovirt.engine.core.bll.AddImageFromScratchCommand ( new org.ovirt.engine.core.common.action.AddImageFromScratchParameters ( ) ) , new org.ovirt.engine.core.bll.CreateImageTemplateCommand ( new org.ovirt.engine.core.common.action.CreateImageTemplateParameters ( ) ) } ; }

Target:
public static org.ovirt.engine.core.bll.CommandBase < ? extends org.ovirt.engine.core.common.action.VdcActionParametersBase > [ ] data ( ) { return new org.ovirt.engine.core.bll.CommandBase < ? > [ ] { new org.ovirt.engine.core.bll.CreateSnapshotCommand ( new org.ovirt.engine.core.common.action.ImagesActionsParametersBase ( ) ) , new org.ovirt.engine.core.bll.AddImageFromScratchCommand ( new org.ovirt.engine.core.common.action.AddImageFromScratchParameters ( ) ) , new org.ovirt.engine.core.bll.CreateImageTemplateCommand ( new org.ovirt.engine.core.common.action.CreateImageTemplateParameters ( ) ) , new org.ovirt.engine.core.bll.CreateCloneOfTemplateCommand ( new org.ovirt.engine.core.common.action.CreateCloneOfTemplateParameters ( ) ) } ; }
Source:
public static void getExternalProviderComputeResourceList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.businessentities.Provider provider ) { 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.ExternalComputeResource > ( ) ; } return source ; } } ; org.ovirt.engine.core.common.queries.ProviderQueryParameters params = new org.ovirt.engine.core.common.queries.ProviderQueryParameters ( ) ; params.setProvider ( provider ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetComputeResourceFromExternalProvider , params , aQuery ) ; }

Target:
public static void getAllProvidersByType ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.businessentities.ProviderType providerType ) { 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.Provider > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllProviders , new org.ovirt.engine.core.common.queries.GetAllProvidersParameters ( providerType ) , aQuery ) ; }
Source:
protected org.ovirt.engine.core.common.businessentities.VmTemplate getTemplateEntity ( int index ) { return org.ovirt.engine.api.restapi.resource.BackendVmsResourceTest.setUpEntityExpectations ( control.createMock ( org.ovirt.engine.core.common.businessentities.VmTemplate.class ) , index ) ; }

Target:
private void setUpGetSoundcardExpectations ( int ... idxs ) throws java.lang.Exception { for ( int i = 0 ; i < ( idxs.length ) ; i ++ ) { setUpGetEntityExpectations ( VdcQueryType.GetSoundDevices , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ idxs [ i ] ] } , new java.util.ArrayList < > ( ) ) ; } }
Source:
public void testStorageDomainVmLinks ( ) { org.ovirt.engine.api.model.Vm vm = new org.ovirt.engine.api.model.Vm ( ) ; vm.setId ( org.ovirt.engine.api.restapi.util.LinkHelperTest.VM_ID ) ; vm.setStorageDomain ( new org.ovirt.engine.api.model.StorageDomain ( ) ) ; vm.getStorageDomain ( ) . setId ( org.ovirt.engine.api.restapi.util.LinkHelperTest.STORAGE_DOMAIN_ID ) ; vm = org.ovirt.engine.api.restapi.util.LinkHelper.addLinks ( vm ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.api.restapi.util.LinkHelperTest.STORAGE_DOMAIN_VM_HREF , vm.getHref ( ) ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.api.restapi.util.LinkHelperTest.STORAGE_DOMAIN_HREF , vm.getStorageDomain ( ) . getHref ( ) ) ; }

Target:
public void testStorageDomainVmLinks ( ) { org.ovirt.engine.api.model.Vm vm = new org.ovirt.engine.api.model.Vm ( ) ; vm.setId ( org.ovirt.engine.api.restapi.util.LinkHelperTest.VM_ID ) ; vm.setStorageDomain ( new org.ovirt.engine.api.model.StorageDomain ( ) ) ; vm.getStorageDomain ( ) . setId ( org.ovirt.engine.api.restapi.util.LinkHelperTest.STORAGE_DOMAIN_ID ) ; vm = org.ovirt.engine.api.restapi.util.LinkHelper.addLinks ( vm ) ; org.junit.jupiter.api.Assertions.assertEquals ( org.ovirt.engine.api.restapi.util.LinkHelperTest.STORAGE_DOMAIN_VM_HREF , vm.getHref ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( org.ovirt.engine.api.restapi.util.LinkHelperTest.STORAGE_DOMAIN_HREF , vm.getStorageDomain ( ) . getHref ( ) ) ; }
Source:
public void testGet ( ) throws java.lang.Exception { setUpGetEntityExpectations ( VdcQueryType.GetStorageServerConnectionById , org.ovirt.engine.core.common.queries.StorageServerConnectionQueryParametersBase.class , new java.lang.String [ ] { "ServerConnectionId" } , new java.lang.Object [ ] { GUIDS [ 0 ] . toString ( ) } , org.ovirt.engine.api.restapi.resource.BackendAttachedStorageDomainResourceTest.setUpStorageServerConnection ( ) ) ; setUpGetEntityExpectations ( ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; control.replay ( ) ; org.ovirt.engine.api.restapi.resource.BackendAttachedStorageDomainsResourceTest.verifyStorageDomain ( resource.get ( ) , 0 ) ; }

Target:
private void setUpGetConnectionExpectations ( ) throws java.lang.Exception { setUpGetEntityExpectations ( VdcQueryType.GetStorageServerConnectionById , org.ovirt.engine.core.common.queries.StorageServerConnectionQueryParametersBase.class , new java.lang.String [ ] { "ServerConnectionId" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendAttachedStorageDomainResourceTest.STORAGE_CONNECTION_ID.toString ( ) } , setUpConnectionExpectations ( ) ) ; }
Source:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; dao = dbFacade.getStorageDomainStaticDao ( ) ; dynamicDao = dbFacade.getStorageDomainDynamicDao ( ) ; diskImageDao = dbFacade.getDiskImageDao ( ) ; imageDao = dbFacade.getImageDao ( ) ; existingDomain = dao.get ( new org.ovirt.engine.core.compat.Guid ( "72e3a666-89e1-4005-a7ca-f7548004a9ab" ) ) ; newStaticDomain = new org.ovirt.engine.core.common.businessentities.StorageDomainStatic ( ) ; newStaticDomain.setstorage_name ( "NewStorageDomain" ) ; newStaticDomain.setstorage ( "fDMzhE-wx3s-zo3q-Qcxd-T0li-yoYU-QvVePl" ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; dao = dbFacade.getStorageDomainStaticDao ( ) ; dynamicDao = dbFacade.getStorageDomainDynamicDao ( ) ; diskImageDao = dbFacade.getDiskImageDao ( ) ; imageDao = dbFacade.getImageDao ( ) ; existingDomain = dao.get ( new org.ovirt.engine.core.compat.Guid ( "72e3a666-89e1-4005-a7ca-f7548004a9ab" ) ) ; newStaticDomain = new org.ovirt.engine.core.common.businessentities.StorageDomainStatic ( ) ; newStaticDomain.setStorageName ( "NewStorageDomain" ) ; newStaticDomain.setStorage ( "fDMzhE-wx3s-zo3q-Qcxd-T0li-yoYU-QvVePl" ) ; }
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 ( ) ) ) { network.setId ( ( ( org.ovirt.engine.core.compat.Guid ) ( returnValue.getActionReturnValue ( ) ) ) ) ; fetchDcClusters ( dcId , network , externalNetwork.isPublicUse ( ) ) ; } }

Target:
public void onSuccess ( java.util.List < org.ovirt.engine.core.common.businessentities.Cluster > clusters ) { dcClusters.put ( dcId , clusters ) ; attachNetworkToClusters ( network , clusters , publicUse ) ; }
Source:
private void AddVmDynamic ( ) { org.ovirt.engine.core.common.businessentities.VmDynamic tempVar = new org.ovirt.engine.core.common.businessentities.VmDynamic ( ) ; tempVar.setId ( getVmId ( ) ) ; tempVar.setstatus ( VMStatus.ImageLocked ) ; tempVar.setvm_host ( "" ) ; tempVar.setvm_ip ( "" ) ; tempVar.setapp_list ( getParameters ( ) . getVm ( ) . getDynamicData ( ) . getapp_list ( ) ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmDynamicDAO ( ) . save ( tempVar ) ; getCompensationContext ( ) . snapshotNewEntity ( tempVar ) ; }

Target:
private void addInterfacesFromTemplate ( ) { org.ovirt.engine.core.bll.network.VmInterfaceManager vmInterfaceManager = new org.ovirt.engine.core.bll.network.VmInterfaceManager ( ) ; for ( org.ovirt.engine.core.common.businessentities.VmNetworkInterface iface : getVm ( ) . getInterfaces ( ) ) { if ( ( iface.getId ( ) ) == null ) { iface.setId ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; } iface.setVmTemplateId ( null ) ; iface.setVmId ( getVmId ( ) ) ; iface.setVmName ( getVm ( ) . getvm_name ( ) ) ; macAdded = vmInterfaceManager.add ( iface , getCompensationContext ( ) ) ; } }
Source:
public void validateGraphicsEnum ( java.lang.String consoleString ) { org.ovirt.engine.api.model.GraphicsConsole console = new org.ovirt.engine.api.model.GraphicsConsole ( ) ; console.setProtocol ( consoleString ) ; validateEnums ( org.ovirt.engine.api.model.GraphicsConsole.class , console ) ; }

Target:
private java.lang.String getTicket ( org.ovirt.engine.api.model.GraphicsType graphicsTypeEntity ) { final org.ovirt.engine.core.common.queries.GetSignedWebsocketProxyTicketParams params = new org.ovirt.engine.core.common.queries.GetSignedWebsocketProxyTicketParams ( getGuid ( ) , graphicsTypeEntity ) ; final org.ovirt.engine.core.common.queries.VdcQueryReturnValue ticketQueryReturnValue = runQuery ( VdcQueryType.GetSignedWebsocketProxyTicket , params ) ; if ( ! ( ticketQueryReturnValue.getSucceeded ( ) ) ) { try { backendFailure ( ticketQueryReturnValue.getExceptionString ( ) ) ; } catch ( org.ovirt.engine.api.restapi.resource.BackendFailureException ex ) { handleError ( ex , false ) ; } } return ticketQueryReturnValue.getReturnValue ( ) ; }
Source:
public java.lang.String toString ( ) { return ( ( ( ( "Path to theme: " + ( getPath ( ) ) ) + ", User portal css: " ) + ( getThemeStyleSheet ( org.ovirt.engine.core.utils.branding.BrandingTheme.ApplicationType.USER_PORTAL ) ) ) + ", Web admin css: " ) + ( getThemeStyleSheet ( org.ovirt.engine.core.utils.branding.BrandingTheme.ApplicationType.WEBADMIN ) ) ; }

Target:
public java.lang.String toString ( ) { return ( ( ( ( ( ( "Path to theme: " + ( getPath ( ) ) ) + ", User portal css: " ) + ( getThemeStyleSheet ( org.ovirt.engine.core.utils.branding.BrandingTheme.ApplicationType.USER_PORTAL ) ) ) + ", Web admin css: " ) + ( getThemeStyleSheet ( org.ovirt.engine.core.utils.branding.BrandingTheme.ApplicationType.WEBADMIN ) ) ) + ", Welcome page css: " ) + ( getThemeStyleSheet ( org.ovirt.engine.core.utils.branding.BrandingTheme.ApplicationType.WELCOME ) ) ; }
Source:
static boolean isNicActuallyExistsOrReferencesNewBond ( org.ovirt.engine.core.common.businessentities.BusinessEntityMap < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > existingInterfacesMap , org.ovirt.engine.core.common.businessentities.BusinessEntityMap < org.ovirt.engine.core.common.businessentities.network.Bond > bondsMap , java.lang.String nicName , org.ovirt.engine.core.compat.Guid nicId ) { boolean nicExists = ( existingInterfacesMap.get ( nicId , nicName ) ) != null ; if ( nicExists ) { return true ; } boolean nicIsNewBond = ( nicName != null ) && ( ( bondsMap.get ( nicName ) ) != null ) ; if ( nicIsNewBond ) { return true ; } return false ; }

Target:
private org.ovirt.engine.core.bll.ValidationResult validateAttachmentNotReferenceVlanDevice ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment ) { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic = existingInterfacesMap.get ( attachment.getNicName ( ) ) ; return org.ovirt.engine.core.bll.ValidationResult.failWith ( EngineMessage.ATTACHMENT_REFERENCE_VLAN_DEVICE , org.ovirt.engine.core.utils.ReplacementUtils.createSetVariableString ( "ATTACHMENT_REFERENCE_VLAN_DEVICE_ENTITY" , attachment.getNetworkName ( ) ) , org.ovirt.engine.core.utils.ReplacementUtils.createSetVariableString ( "nicName" , attachment.getNicName ( ) ) ) . when ( ( ( nic != null ) && ( org.ovirt.engine.core.utils.NetworkUtils.isVlan ( nic ) ) ) ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object result ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Provider > providers = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Provider > ) ( result ) ) ; org.ovirt.engine.ui.uicommonweb.models.ListModel < org.ovirt.engine.core.common.businessentities.Provider > providersListModel = getProviders ( ) ; providersListModel.setItems ( providers , org.ovirt.engine.ui.uicommonweb.Linq.firstOrDefault ( providers ) ) ; providersListModel.setIsChangeable ( true ) ; getIsDiscoveredHosts ( ) . setEntity ( null ) ; getIsDiscoveredHosts ( ) . setEntity ( true ) ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object result ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Provider < org.ovirt.engine.core.common.businessentities.OpenstackNetworkProviderProperties > > providers = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Provider < org.ovirt.engine.core.common.businessentities.OpenstackNetworkProviderProperties > > ) ( result ) ) ; org.ovirt.engine.ui.uicommonweb.models.ListModel < org.ovirt.engine.core.common.businessentities.Provider < org.ovirt.engine.core.common.businessentities.OpenstackNetworkProviderProperties > > providersListModel = getProviders ( ) ; providersListModel.setItems ( providers , org.ovirt.engine.ui.uicommonweb.Linq.firstOrDefault ( providers ) ) ; providersListModel.setIsChangeable ( true ) ; getIsDiscoveredHosts ( ) . setEntity ( null ) ; getIsDiscoveredHosts ( ) . setEntity ( true ) ; }
Source:
public void onClick ( com.google.gwt.event.dom.client.ClickEvent event ) { disk.getIsInternal ( ) . setEntity ( true ) ; if ( ( ( java.lang.Boolean ) ( disk.getAttachDisk ( ) . getEntity ( ) ) ) ) { revealDiskPanel ( disk ) ; } else { externalDiskPanel.setVisible ( false ) ; } }

Target:
public void eventRaised ( org.ovirt.engine.core.compat.Event ev , java.lang.Object sender , org.ovirt.engine.core.compat.EventArgs args ) { boolean isAttach = ( ( java.lang.Boolean ) ( ( ( org.ovirt.engine.ui.uicommonweb.models.EntityModel ) ( sender ) ) . getEntity ( ) ) ) ; createDiskPanel.setVisible ( ( ! isAttach ) ) ; attachDiskPanel.setVisible ( isAttach ) ; revealDiskPanel ( disk ) ; }
Source:
private void assertGetResult ( org.ovirt.engine.core.common.businessentities.StorageDomain result ) { org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertEquals ( existingDomain , result ) ; }

Target:
private void assertGetResult ( org.ovirt.engine.core.common.businessentities.StorageDomain result ) { org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertEquals ( existingDomain , result ) ; org.junit.Assert.assertEquals ( "Wrong committed disk size" , 8 , result.getCommittedDiskSize ( ) ) ; org.junit.Assert.assertEquals ( "Wrong actual disk size" , 4 , result.getActualImagesSize ( ) ) ; }
Source:
public void getNextAvailableDiskAliasNameByVMId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetNextAvailableDiskAliasNameByVMId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }

Target:
public void getVmSnapshotList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllVmSnapshotsByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
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 getGlusterRemoveBricksStatus ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId , org.ovirt.engine.core.compat.Guid volumeId , java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity > bricks ) { aQuery.setHandleFailure ( true ) ; org.ovirt.engine.core.common.action.gluster.GlusterVolumeRemoveBricksQueriesParameters parameters = new org.ovirt.engine.core.common.action.gluster.GlusterVolumeRemoveBricksQueriesParameters ( clusterId , volumeId , bricks ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterVolumeRemoveBricksStatus , parameters , aQuery ) ; }
Source:
public void isVmNameUnique ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String name , org.ovirt.engine.core.compat.Guid datacenterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return ( source != null ) && ( ! ( ( java.lang.Boolean ) ( source ) ) ) ; } } ; org.ovirt.engine.core.common.queries.NameQueryParameters params = new org.ovirt.engine.core.common.queries.NameQueryParameters ( name ) ; params.setDatacenterId ( datacenterId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.IsVmWithSameNameExist , params , aQuery ) ; }

Target:
public void isTemplateNameUnique ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String templateName , org.ovirt.engine.core.compat.Guid datacenterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return ( source != null ) && ( ! ( ( java.lang.Boolean ) ( source ) ) ) ; } } ; org.ovirt.engine.core.common.queries.NameQueryParameters params = new org.ovirt.engine.core.common.queries.NameQueryParameters ( templateName ) ; params.setDatacenterId ( datacenterId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.IsVmTemlateWithSameNameExist , params , aQuery ) ; }
Source:
protected void perform ( ) { org.ovirt.engine.core.compat.Guid dumpDiskId = createMemoryDumpDisk ( ) ; org.ovirt.engine.core.compat.Guid metadataDiskId = createMemoryMetadataDisk ( ) ; org.ovirt.engine.core.common.businessentities.DiskImage dumpDisk = getDisk ( dumpDiskId ) ; org.ovirt.engine.core.common.businessentities.DiskImage metadataDisk = getDisk ( metadataDiskId ) ; org.ovirt.engine.core.bll.HibernateVmCommand.getSnapshotDAO ( ) . updateHibernationMemory ( org.ovirt.engine.core.bll.HibernateVmCommand.getVmId ( ) , org.ovirt.engine.core.bll.memory.MemoryUtils.createMemoryStateString ( getStorageDomainId ( ) , org.ovirt.engine.core.bll.HibernateVmCommand.getStoragePoolId ( ) , dumpDisk.getId ( ) , dumpDisk.getImageId ( ) , metadataDisk.getId ( ) , metadataDisk.getImageId ( ) ) ) ; org.ovirt.engine.core.bll.HibernateVmCommand.setSucceeded ( true ) ; }

Target:
private void addMetadataDisk ( ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage metaDataDisk = org.ovirt.engine.core.bll.memory.MemoryUtils.createMetadataDiskForVm ( org.ovirt.engine.core.bll.HibernateVmCommand.getVm ( ) ) ; addDisk ( metaDataDisk ) ; }
Source:
public void getVmListByClusterName ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String clusterName ) { 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 ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > vms = org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VM > cast ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.IVdcQueryable > ) ( source ) ) ) ; return vms ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( ( "Vms: cluster=" + clusterName ) , org.ovirt.engine.core.common.interfaces.SearchType.VM ) , aQuery ) ; }

Target:
public void getVmsRunningOnOrMigratingToVds ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmsRunningOnOrMigratingToVds , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
public void testCommandInvalidNetworkId ( ) { org.mockito.Mockito.when ( networkDao.get ( org.ovirt.engine.core.bll.network.dc.AutodefineExternalNetworkCommandTest.PHYSICAL_NETWORK_ID ) ) . thenReturn ( null ) ; org.junit.Assert.assertFalse ( command.validate ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getValidationMessages ( ) . contains ( EngineMessage.NETWORK_HAVING_ID_NOT_EXISTS.name ( ) ) ) ; }

Target:
public void testCommandInvalidNetworkId ( ) { org.mockito.Mockito.when ( networkDao.get ( org.ovirt.engine.core.bll.network.dc.AutodefineExternalNetworkCommandTest.PHYSICAL_NETWORK_ID ) ) . thenReturn ( null ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( command , EngineMessage.NETWORK_HAVING_ID_NOT_EXISTS ) ; }
Source:
private static void AddGroupToUser ( org.ovirt.engine.core.common.businessentities.AdUser user , java.lang.String groupName ) { if ( ! ( user.getGroups ( ) . containsKey ( groupName ) ) ) { org.ovirt.engine.core.common.businessentities.ad_groups group = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getAdGroupDao ( ) . getByName ( groupName ) ; if ( group != null ) { user.getGroups ( ) . put ( groupName , group ) ; } else { user.getGroups ( ) . put ( groupName , new org.ovirt.engine.core.common.businessentities.ad_groups ( ) ) ; } } }

Target:
private static void AddGroupToUser ( org.ovirt.engine.core.common.businessentities.LdapUser user , java.lang.String groupName ) { if ( ! ( user.getGroups ( ) . containsKey ( groupName ) ) ) { org.ovirt.engine.core.common.businessentities.ad_groups group = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getAdGroupDao ( ) . getByName ( groupName ) ; if ( group != null ) { user.getGroups ( ) . put ( groupName , group ) ; } else { user.getGroups ( ) . put ( groupName , new org.ovirt.engine.core.common.businessentities.ad_groups ( ) ) ; } } }
Source:
public void nGuidGuidCtorNullNGuid ( ) { b = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( null , org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID2 ) ; final org.ovirt.engine.core.compat.Guid g = b.getVdsId ( ) ; org.junit.Assert.assertEquals ( Guid.Empty , g ) ; final org.ovirt.engine.core.compat.Guid gu = b.getVmId ( ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID2 , gu ) ; }

Target:
public void nGuidGuidCtorNullNGuid ( ) { b = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( null , org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID2 ) ; final org.ovirt.engine.core.compat.Guid g = b.getVdsId ( ) ; org.junit.jupiter.api.Assertions.assertEquals ( Guid.Empty , g ) ; final org.ovirt.engine.core.compat.Guid gu = b.getVmId ( ) ; org.junit.jupiter.api.Assertions.assertEquals ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID2 , gu ) ; }
Source:
public void saveNewSanStorage ( ) { org.ovirt.engine.ui.uicommonweb.models.storage.StorageModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.storage.StorageModel ) ( getWindow ( ) ) ) ; org.ovirt.engine.ui.uicommonweb.models.storage.SanStorageModel sanStorageModel = ( ( org.ovirt.engine.ui.uicommonweb.models.storage.SanStorageModel ) ( model.getCurrentStorageItem ( ) ) ) ; java.util.ArrayList < java.lang.String > usedLunsMessages = sanStorageModel.getUsedLunsMessages ( ) ; if ( usedLunsMessages.isEmpty ( ) ) { onSaveSanStorage ( ) ; } else { forceCreationWarning ( usedLunsMessages ) ; } }

Target:
private void postGetLunsMessages ( java.util.ArrayList < java.lang.String > usedLunsMessages ) { if ( usedLunsMessages.isEmpty ( ) ) { onSaveSanStorage ( ) ; } else { forceCreationWarning ( usedLunsMessages ) ; } }
Source:
protected void executeCommand ( ) { org.ovirt.engine.core.vdsbroker.irsbroker.SpmStopOnIrsVDSCommandParameters params = new org.ovirt.engine.core.vdsbroker.irsbroker.SpmStopOnIrsVDSCommandParameters ( getStoragePoolForVds ( ) . getId ( ) , org.ovirt.engine.core.bll.ForceSelectSPMCommand.getParameters ( ) . getPreferredSPMId ( ) ) ; if ( runVdsCommand ( VDSCommandType.SpmStopOnIrs , params ) . getSucceeded ( ) ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.log ( this , AuditLogType.USER_FORCE_SELECTED_SPM ) ; } else { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.log ( this , AuditLogType.USER_FORCE_SELECTED_SPM_STOP_FAILED ) ; } org.ovirt.engine.core.bll.ForceSelectSPMCommand.setSucceeded ( true ) ; }

Target:
protected void executeCommand ( ) { org.ovirt.engine.core.vdsbroker.irsbroker.SpmStopOnIrsVDSCommandParameters params = new org.ovirt.engine.core.vdsbroker.irsbroker.SpmStopOnIrsVDSCommandParameters ( getStoragePoolForVds ( ) . getId ( ) , org.ovirt.engine.core.bll.ForceSelectSPMCommand.getParameters ( ) . getPreferredSPMId ( ) ) ; if ( runVdsCommand ( VDSCommandType.SpmStopOnIrs , params ) . getSucceeded ( ) ) { auditLogDirector.log ( this , AuditLogType.USER_FORCE_SELECTED_SPM ) ; } else { auditLogDirector.log ( this , AuditLogType.USER_FORCE_SELECTED_SPM_STOP_FAILED ) ; } org.ovirt.engine.core.bll.ForceSelectSPMCommand.setSucceeded ( true ) ; }
Source:
protected void verify ( org.ovirt.engine.api.model.Tag model , org.ovirt.engine.api.model.Tag transform ) { assertNotNull ( transform ) ; assertEquals ( model.getName ( ) , transform.getName ( ) ) ; assertEquals ( model.getId ( ) , transform.getId ( ) ) ; assertEquals ( model.getDescription ( ) , transform.getDescription ( ) ) ; }

Target:
protected void verify ( org.ovirt.engine.api.model.Tag model , org.ovirt.engine.api.model.Tag transform ) { org.junit.Assert.assertNotNull ( transform ) ; org.junit.Assert.assertEquals ( model.getName ( ) , transform.getName ( ) ) ; org.junit.Assert.assertEquals ( model.getId ( ) , transform.getId ( ) ) ; org.junit.Assert.assertEquals ( model.getDescription ( ) , transform.getDescription ( ) ) ; }
Source:
protected org.ovirt.engine.core.bll.ValidationResult validateMemorySize ( org.ovirt.engine.core.common.businessentities.VM vm ) { int maxSize ; if ( getOsRepository ( ) . get64bitOss ( ) . contains ( vm.getOs ( ) ) ) { maxSize = org.ovirt.engine.core.common.config.Config.getValue ( ConfigValues.VM64BitMaxMemorySizeInMB , vm.getVdsGroupCompatibilityVersion ( ) . getValue ( ) ) ; } else { maxSize = org.ovirt.engine.core.common.config.Config.getValue ( ConfigValues.VM32BitMaxMemorySizeInMB ) ; } if ( ( vm.getMemSizeMb ( ) ) > maxSize ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.ACTION_TYPE_FAILED_MEMORY_EXCEEDS_SUPPORTED_LIMIT ) ; } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }

Target:
protected org.ovirt.engine.core.bll.ValidationResult validateMemorySize ( org.ovirt.engine.core.common.businessentities.VM vm ) { int maxSize ; if ( getOsRepository ( ) . get64bitOss ( ) . contains ( vm.getOs ( ) ) ) { maxSize = org.ovirt.engine.core.common.config.Config.getValue ( ConfigValues.VM64BitMaxMemorySizeInMB , vm.getVdsGroupCompatibilityVersion ( ) . getValue ( ) ) ; } else { maxSize = org.ovirt.engine.core.common.config.Config.getValue ( ConfigValues.VM32BitMaxMemorySizeInMB ) ; } if ( ( vm.getMemSizeMb ( ) ) > maxSize ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_MEMORY_EXCEEDS_SUPPORTED_LIMIT ) ; } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc snapshot ( java.lang.String vmId , java.util.Map < java.lang.String , java.lang.String > [ ] snapParams ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.snapshot ( vmId , snapParams ) ; 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 diskReplicateStart ( java.lang.String vmUUID , java.util.Map srcDisk , java.util.Map dstDisk ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.diskReplicateStart ( vmUUID , srcDisk , dstDisk ) ; 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:
protected boolean canDoAction ( ) { org.ovirt.engine.core.bll.network.cluster.DetachNetworkFromClusterInternalCommand < T > . DetachNetworkValidator validator = new DetachNetworkValidator ( getNetwork ( ) , org.ovirt.engine.core.bll.network.cluster.DetachNetworkFromClusterInternalCommand.getParameters ( ) . getNetworkCluster ( ) ) ; return ( ( validate ( validator.notManagementNetwork ( ) ) ) && ( validate ( validator.clusterNetworkNotUsedByVms ( ) ) ) ) && ( validate ( validator.clusterNetworkNotUsedByTemplates ( ) ) ) ; }

Target:
protected boolean canDoAction ( ) { org.ovirt.engine.core.bll.network.cluster.DetachNetworkFromClusterInternalCommand < T > . DetachNetworkValidator validator = new DetachNetworkValidator ( getNetwork ( ) , org.ovirt.engine.core.bll.network.cluster.DetachNetworkFromClusterInternalCommand.getParameters ( ) . getNetworkCluster ( ) ) ; return ( ( ( validate ( validator.notManagementNetwork ( ) ) ) && ( validate ( validator.clusterNetworkNotUsedByVms ( ) ) ) ) && ( validate ( validator.clusterNetworkNotUsedByTemplates ( ) ) ) ) && ( validate ( validator.clusterNetworkNotUsedByBricks ( ) ) ) ; }
Source:
public boolean isRDPAvailable ( ) { if ( ( rdpAvailable ) == null ) { rdpAvailable = ( clientAgentType.getBrowser ( ) . toLowerCase ( ) . contains ( "explorer" ) ) && ( clientAgentType.getOS ( ) . toLowerCase ( ) . contains ( "windows" ) ) ; com.google.gwt.core.client.GWT.log ( ( "Determining if RDP console is available on current platform, result:" + ( rdpAvailable ) ) ) ; } return rdpAvailable ; }

Target:
private boolean isWindowsClient ( ) { return clientAgentType.getOS ( ) . toLowerCase ( ) . contains ( "windows" ) ; }
Source:
protected java.lang.String renderNullSafe ( java.util.Map.Entry < java.lang.String , org.ovirt.engine.ui.uicommonweb.models.EntityModel < java.lang.String > > pair ) { java.lang.String key = pair.getKey ( ) ; java.lang.String value = pair.getValue ( ) . getEntity ( ) ; if ( "custom" . equals ( key ) ) { return ( ( org.ovirt.engine.ui.webadmin.section.main.view.popup.host.SetupNetworksBondPopupView.constants.customHostPopup ( ) ) + ": " ) + value ; } return value ; }

Target:
protected java.lang.String renderNullSafe ( java.util.Map.Entry < java.lang.String , org.ovirt.engine.ui.uicommonweb.models.EntityModel < java.lang.String > > pair ) { java.lang.String key = pair.getKey ( ) ; java.lang.String value = pair.getValue ( ) . getEntity ( ) ; if ( "custom" . equals ( key ) ) { return ( ( org.ovirt.engine.ui.webadmin.section.main.view.popup.host.SetupNetworksBondPopupView.constants.customHostPopup ( ) ) + " " ) + value ; } return value ; }
Source:
public void getAAAProfilesList ( 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 ? new java.util.ArrayList < java.lang.String > ( ( ( java.util.ArrayList < java.lang.String > ) ( source ) ) ) : new java.util.ArrayList < java.lang.String > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAAAProfileList , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }

Target:
public void getAAANamespaces ( 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.HashMap < java.lang.String , java.util.List < java.lang.String > > ) ( source ) ) : new java.util.HashMap < java.lang.String , java.util.List < java.lang.String > > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAvailableNamespaces , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }
Source:
private void dumpMap ( java.lang.String prefix , org.ovirt.engine.api.extensions.ExtMap map ) { org.apache.commons.logging.Log logger = context.< org.apache.commons.logging.Log > get ( ExtensionsManager.TRACE_LOG_CONTEXT_KEY ) ; if ( logger.isDebugEnabled ( ) ) { logger.debug ( ( prefix + " BEGIN" ) ) ; logger.debug ( map.toString ( ) ) ; logger.debug ( ( prefix + " END" ) ) ; } }

Target:
private void dumpMap ( java.lang.String prefix , org.ovirt.engine.api.extensions.ExtMap map ) { org.slf4j.Logger logger = context.< org.slf4j.Logger > get ( ExtensionsManager.TRACE_LOG_CONTEXT_KEY ) ; if ( logger.isDebugEnabled ( ) ) { logger.debug ( ( prefix + " BEGIN" ) ) ; logger.debug ( map.toString ( ) ) ; logger.debug ( ( prefix + " END" ) ) ; } }
Source:
public void testPrefixViewCache ( ) throws java.lang.Exception { java.io.File file = writeConf ( ) ; org.ovirt.engine.core.extensions.mgr.Configuration config = org.ovirt.engine.core.extensions.mgr.Configuration.loadFile ( file ) ; org.junit.Assert.assertNotNull ( config ) ; org.ovirt.engine.core.extensions.mgr.Configuration view1 = config.getView ( "a" ) ; org.junit.Assert.assertNotNull ( view1 ) ; org.ovirt.engine.core.extensions.mgr.Configuration view2 = config.getView ( "a" ) ; org.junit.Assert.assertNotNull ( view2 ) ; org.junit.Assert.assertSame ( view1 , view2 ) ; }

Target:
public void testPrefixViewCache ( ) throws java.lang.Exception { java.io.File file = writeConf ( ) ; org.ovirt.engine.core.extensions.mgr.Configuration config = org.ovirt.engine.core.extensions.mgr.Configuration.loadFile ( file ) ; org.junit.jupiter.api.Assertions.assertNotNull ( config ) ; org.ovirt.engine.core.extensions.mgr.Configuration view1 = config.getView ( "a" ) ; org.junit.jupiter.api.Assertions.assertNotNull ( view1 ) ; org.ovirt.engine.core.extensions.mgr.Configuration view2 = config.getView ( "a" ) ; org.junit.jupiter.api.Assertions.assertNotNull ( view2 ) ; org.junit.jupiter.api.Assertions.assertSame ( view1 , view2 ) ; }
Source:
public void thpDefaultFalseTest ( ) { org.ovirt.engine.core.common.businessentities.Cluster cluster = new org.ovirt.engine.core.common.businessentities.Cluster ( ) ; cluster.setVersion ( new org.ovirt.engine.api.restapi.types.Version ( ) { { setMajor ( 2 ) ; setMinor ( 0 ) ; } } ) ; org.ovirt.engine.core.common.businessentities.Cluster transform = getMapper ( ) . map ( cluster , null ) ; org.junit.Assert.assertFalse ( transform.getTransparentHugepages ( ) ) ; }

Target:
public void thpDefaultFalseTest ( ) { org.ovirt.engine.core.common.businessentities.Cluster cluster = new org.ovirt.engine.core.common.businessentities.Cluster ( ) ; cluster.setVersion ( new org.ovirt.engine.api.restapi.types.Version ( ) { { setMajor ( 2 ) ; setMinor ( 0 ) ; } } ) ; org.ovirt.engine.core.common.businessentities.Cluster transform = getMapper ( ) . map ( cluster , null ) ; org.junit.jupiter.api.Assertions.assertFalse ( transform.getTransparentHugepages ( ) ) ; }
Source:
public void shouldDetectNumaPinning ( ) { invalidVM.setvNumaNodeList ( java.util.Arrays.asList ( org.ovirt.engine.core.bll.utils.NumaTestUtils.createVmNumaNode ( 1 , java.util.Arrays.asList ( org.ovirt.engine.core.bll.utils.NumaTestUtils.createVdsNumaNode ( 1 ) ) ) ) ) ; org.hamcrest.MatcherAssert.assertThat ( validator.checkVmReadyForUpgrade ( invalidVM ) , org.hamcrest.CoreMatchers.hasItem ( UPGRADE_ERROR.VM_NUMA_PINNED ) ) ; }

Target:
public void shouldDetectCpuPinning ( ) { invalidVM.setCpuPinning ( "i am pinned" ) ; org.hamcrest.MatcherAssert.assertThat ( validator.checkVmReadyForUpgrade ( invalidVM ) , org.hamcrest.CoreMatchers.hasItem ( EngineMessage.CLUSTER_UPGRADE_DETAIL_VM_CPUS_PINNED.name ( ) ) ) ; }
Source:
private java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > asImages ( java.util.List < org.ovirt.engine.core.common.businessentities.storage.Disk > disks ) { if ( disks == null ) { return null ; } java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > res = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.storage.Disk disk : disks ) { if ( ( disk.getDiskStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.storage.DiskStorageType.IMAGE ) ) { res.add ( ( ( org.ovirt.engine.core.common.businessentities.storage.DiskImage ) ( disk ) ) ) ; } } return res ; }

Target:
private java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > asImages ( java.util.List < org.ovirt.engine.core.common.businessentities.storage.Disk > disks ) { if ( disks == null ) { return null ; } java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > res = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.storage.Disk disk : disks ) { if ( disk.getDiskStorageType ( ) . isInternal ( ) ) { res.add ( ( ( org.ovirt.engine.core.common.businessentities.storage.DiskImage ) ( disk ) ) ) ; } } return res ; }
Source:
public java.util.concurrent.Future < java.lang.Void > close ( ) { send ( new org.ovirt.vdsm.jsonrpc.client.reactors.stomp.impl.Message ( ) . unsubscribe ( ) . withHeader ( org.ovirt.vdsm.jsonrpc.client.reactors.stomp.impl.Message.HEADER_ID , this . subscribtionId ) . build ( ) ) ; send ( new org.ovirt.vdsm.jsonrpc.client.reactors.stomp.impl.Message ( ) . disconnect ( ) . withHeader ( org.ovirt.vdsm.jsonrpc.client.reactors.stomp.impl.Message.HEADER_RECEIPT , java.util.UUID.randomUUID ( ) . toString ( ) ) . build ( ) ) ; return super . close ( ) ; }

Target:
public void sendMessage ( byte [ ] message ) { send ( new org.ovirt.vdsm.jsonrpc.client.reactors.stomp.impl.Message ( ) . send ( ) . withHeader ( org.ovirt.vdsm.jsonrpc.client.reactors.stomp.impl.Message.HEADER_DESTINATION , org.ovirt.vdsm.jsonrpc.client.reactors.stomp.REQUEST_QUEUE ) . withContent ( message ) . build ( ) ) ; }
Source:
protected void executeCommand ( ) { org.ovirt.engine.core.compat.Guid id = org.ovirt.engine.core.bll.aaa.RemoveGroupCommand.getParameters ( ) . getId ( ) ; for ( org.ovirt.engine.core.common.businessentities.Permission permission : org.ovirt.engine.core.bll.aaa.RemoveGroupCommand.getPermissionDAO ( ) . getAllDirectPermissionsForAdElement ( id ) ) { org.ovirt.engine.core.common.action.PermissionsOperationsParameters param = new org.ovirt.engine.core.common.action.PermissionsOperationsParameters ( permission ) ; param.setSessionId ( org.ovirt.engine.core.bll.aaa.RemoveGroupCommand.getParameters ( ) . getSessionId ( ) ) ; runInternalActionWithTasksContext ( VdcActionType.RemovePermission , param ) ; } org.ovirt.engine.core.bll.aaa.RemoveGroupCommand.getAdGroupDAO ( ) . remove ( id ) ; org.ovirt.engine.core.bll.aaa.RemoveGroupCommand.setSucceeded ( true ) ; }

Target:
protected void executeCommand ( ) { org.ovirt.engine.core.compat.Guid id = org.ovirt.engine.core.bll.aaa.RemoveGroupCommand.getParameters ( ) . getId ( ) ; for ( org.ovirt.engine.core.common.businessentities.Permission permission : org.ovirt.engine.core.bll.aaa.RemoveGroupCommand.getPermissionDao ( ) . getAllDirectPermissionsForAdElement ( id ) ) { org.ovirt.engine.core.common.action.PermissionsOperationsParameters param = new org.ovirt.engine.core.common.action.PermissionsOperationsParameters ( permission ) ; param.setSessionId ( org.ovirt.engine.core.bll.aaa.RemoveGroupCommand.getParameters ( ) . getSessionId ( ) ) ; runInternalActionWithTasksContext ( VdcActionType.RemovePermission , param ) ; } org.ovirt.engine.core.bll.aaa.RemoveGroupCommand.getAdGroupDao ( ) . remove ( id ) ; org.ovirt.engine.core.bll.aaa.RemoveGroupCommand.setSucceeded ( true ) ; }
Source:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { if ( model != null ) { model.stopProgress ( ) ; } if ( result.getReturnValue ( ) . getSucceeded ( ) ) { cancel ( ) ; } }

Target:
public void onSuccess ( java.util.List < org.ovirt.engine.core.common.businessentities.storage.Disk > disks ) { getVmDisks ( ) . clear ( ) ; for ( org.ovirt.engine.core.common.businessentities.storage.Disk disk : disks ) { if ( ( disk.getDiskStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.storage.DiskStorageType.LUN ) ) { continue ; } org.ovirt.engine.core.common.businessentities.storage.DiskImage diskImage = ( ( org.ovirt.engine.core.common.businessentities.storage.DiskImage ) ( disk ) ) ; getVmDisks ( ) . add ( diskImage ) ; } }