auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private void extractRemoveNetworks ( ) { for ( org.ovirt.engine.core.common.businessentities.VdsNetworkInterface iface : getExistingIfaces ( ) . values ( ) ) { java.lang.String net = iface.getNetworkName ( ) ; if ( ( org.apache.commons.lang.StringUtils.isNotBlank ( net ) ) && ( ! ( attachedNetworksNames.contains ( net ) ) ) ) { removedNetworks.add ( net ) ; } } }

Target:
private void extractRemovedNetworks ( ) { for ( org.ovirt.engine.core.common.businessentities.VdsNetworkInterface iface : getExistingIfaces ( ) . values ( ) ) { java.lang.String net = iface.getNetworkName ( ) ; if ( ( org.apache.commons.lang.StringUtils.isNotBlank ( net ) ) && ( ! ( attachedNetworksNames.contains ( net ) ) ) ) { removedNetworks.add ( net ) ; } } }
Source:
public void testWrongKey ( ) throws java.lang.Exception { java.security.KeyPairGenerator generator = java.security.KeyPairGenerator.getInstance ( "RSA" ) ; java.security.KeyPair badKeyPair = generator.generateKeyPair ( ) ; client.setKeyPair ( badKeyPair ) ; client.connect ( ) ; client.authenticate ( ) ; client.executeCommand ( org.ovirt.engine.core.uutils.ssh.BasicTest.helloCommand , null , null , null ) ; }

Target:
public void testWrongKey ( ) throws java.lang.Exception { java.security.KeyPairGenerator generator = java.security.KeyPairGenerator.getInstance ( "RSA" ) ; java.security.KeyPair badKeyPair = generator.generateKeyPair ( ) ; client.setKeyPair ( badKeyPair ) ; org.junit.jupiter.api.Assertions.assertThrows ( javax.naming.AuthenticationException.class , ( ) -> { client.connect ( ) ; client.authenticate ( ) ; client.executeCommand ( org.ovirt.engine.core.uutils.ssh.BasicTest.helloCommand , null , null , null ) ; } ) ; }
Source:
private static void failureEventHandler ( java.lang.String description , java.util.ArrayList < java.lang.String > errorMessages ) { java.util.ArrayList < org.ovirt.engine.ui.frontend.Message > messages = new java.util.ArrayList < org.ovirt.engine.ui.frontend.Message > ( ) ; for ( java.lang.String errorMessage : errorMessages ) { messages.add ( new org.ovirt.engine.ui.frontend.Message ( description , errorMessage ) ) ; } org.ovirt.engine.ui.frontend.Frontend.frontendFailureEvent.raise ( org.ovirt.engine.ui.frontend.Frontend.class , new org.ovirt.engine.ui.frontend.FrontendFailureEventArgs ( messages ) ) ; }

Target:
private void failureEventHandler ( final java.lang.String description , final java.util.ArrayList < java.lang.String > errorMessages ) { java.util.ArrayList < org.ovirt.engine.ui.frontend.Message > messages = new java.util.ArrayList < org.ovirt.engine.ui.frontend.Message > ( ) ; for ( java.lang.String errorMessage : errorMessages ) { messages.add ( new org.ovirt.engine.ui.frontend.Message ( description , errorMessage ) ) ; } frontendFailureEvent.raise ( org.ovirt.engine.ui.frontend.Frontend.class , new org.ovirt.engine.ui.frontend.FrontendFailureEventArgs ( messages ) ) ; }
Source:
public void testInterfaceExistsWhenInterfaceIsNull ( ) { java.lang.String failingSlaveName = "slaveName" ; org.ovirt.engine.core.common.errors.EngineMessage engineMessage = org.ovirt.engine.core.common.errors.EngineMessage.HOST_NETWORK_INTERFACE_HAVING_NAME_DOES_NOT_EXIST ; java.lang.String nicNameReplacement = org.ovirt.engine.core.utils.ReplacementUtils.getVariableAssignmentString ( engineMessage , failingSlaveName ) ; org.junit.Assert.assertThat ( new org.ovirt.engine.core.bll.validator.HostInterfaceValidator ( null ) . interfaceExists ( failingSlaveName ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( engineMessage , nicNameReplacement ) ) ; }

Target:
public void testInterfaceExistsWhenInterfaceIsNull ( ) { java.lang.String failingSlaveName = "slaveName" ; org.ovirt.engine.core.common.errors.EngineMessage engineMessage = org.ovirt.engine.core.common.errors.EngineMessage.HOST_NETWORK_INTERFACE_HAVING_NAME_DOES_NOT_EXIST ; java.lang.String nicNameReplacement = org.ovirt.engine.core.utils.ReplacementUtils.getVariableAssignmentString ( engineMessage , failingSlaveName ) ; org.hamcrest.MatcherAssert.assertThat ( new org.ovirt.engine.core.bll.validator.HostInterfaceValidator ( null ) . interfaceExists ( failingSlaveName ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( engineMessage , nicNameReplacement ) ) ; }
Source:
public void testIsUpdateable ( ) { org.ovirt.engine.core.utils.ObjectIdentityChecker oic = new org.ovirt.engine.core.utils.ObjectIdentityChecker ( org.ovirt.engine.core.utils.Jedi.class ) ; org.junit.Assert.assertFalse ( "Should be false by default" , oic.isFieldUpdatable ( "name" ) ) ; oic.addPermittedFields ( "name" ) ; org.junit.Assert.assertTrue ( "Should be true now" , oic.isFieldUpdatable ( "name" ) ) ; }

Target:
public void testIsUpdateable ( ) { org.ovirt.engine.core.utils.ObjectIdentityChecker oic = new org.ovirt.engine.core.utils.ObjectIdentityChecker ( org.ovirt.engine.core.utils.Jedi.class ) ; org.junit.jupiter.api.Assertions.assertFalse ( oic.isFieldUpdatable ( "name" ) , "Should be false by default" ) ; oic.addPermittedFields ( "name" ) ; org.junit.jupiter.api.Assertions.assertTrue ( oic.isFieldUpdatable ( "name" ) , "Should be true now" ) ; }
Source:
public void checkStatus_handleProxyNotFound ( ) { org.mockito.Mockito.when ( proxyLocator.findProxyHost ( ) ) . thenReturn ( null ) ; org.ovirt.engine.core.common.vdscommands.VDSFenceReturnValue result = executor.checkStatus ( ) ; org.junit.Assert.assertFalse ( result.getSucceeded ( ) ) ; org.junit.Assert.assertTrue ( result.getExceptionString ( ) . contains ( "no running proxy Host was found" ) ) ; }

Target:
public void checkStatus_handleProxyNotFound ( ) { org.mockito.Mockito.when ( proxyLocator.findProxyHost ( ) ) . thenReturn ( null ) ; org.ovirt.engine.core.common.vdscommands.VDSFenceReturnValue result = executor.checkHostStatus ( ) ; org.junit.Assert.assertFalse ( result.getSucceeded ( ) ) ; org.junit.Assert.assertTrue ( result.getExceptionString ( ) . contains ( "no running proxy Host was found" ) ) ; }
Source:
private void updateHaMaintenanceAvailability ( java.util.List items ) { if ( ( items == null ) || ( ( items.size ( ) ) != 1 ) ) { setHaMaintenanceAvailability ( false ) ; return ; } org.ovirt.engine.core.common.businessentities.VM vm = org.ovirt.engine.ui.uicommonweb.models.vms.VmListModel.getSelectedItem ( ) ; if ( ( vm == null ) || ( ! ( vm.isHostedEngine ( ) ) ) ) { setHaMaintenanceAvailability ( false ) ; } else { setHaMaintenanceAvailability ( true ) ; } }

Target:
private boolean isHeadlessModeChanged ( org.ovirt.engine.core.common.businessentities.VM source , org.ovirt.engine.core.common.action.VmManagementParametersBase updateVmParameters ) { return ( ( source.getDefaultDisplayType ( ) ) != ( updateVmParameters.getVmStaticData ( ) . getDefaultDisplayType ( ) ) ) && ( ( ( source.getDefaultDisplayType ( ) ) == ( org.ovirt.engine.core.common.businessentities.DisplayType.none ) ) || ( ( updateVmParameters.getVmStaticData ( ) . getDefaultDisplayType ( ) ) == ( org.ovirt.engine.core.common.businessentities.DisplayType.none ) ) ) ; }
Source:
public static void GetDataCenterList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( "DataCenter: sortby name" , org.ovirt.engine.core.common.interfaces.SearchType.StoragePool ) , aQuery ) ; }

Target:
public static void getDataCenterList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( "DataCenter: sortby name" , org.ovirt.engine.core.common.interfaces.SearchType.StoragePool ) , aQuery ) ; }
Source:
protected void unlockVm ( ) { org.ovirt.engine.core.bll.VmCommand.setVm ( null ) ; if ( ( org.ovirt.engine.core.bll.VmCommand.getVm ( ) ) != null ) { if ( ( org.ovirt.engine.core.bll.VmCommand.getVm ( ) . getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.ImageLocked ) ) { org.ovirt.engine.core.bll.VmHandler.unlockVm ( org.ovirt.engine.core.bll.VmCommand.getVm ( ) , org.ovirt.engine.core.bll.VmCommand.getCompensationContext ( ) ) ; } } else { setLoggingForCommand ( ) ; log.warn ( "VmCommand::EndVmCommand: Vm is null - not performing endAction on Vm" ) ; } }

Target:
protected void unlockVm ( ) { org.ovirt.engine.core.bll.VmCommand.setVm ( null ) ; if ( ( org.ovirt.engine.core.bll.VmCommand.getVm ( ) ) != null ) { if ( ( org.ovirt.engine.core.bll.VmCommand.getVm ( ) . getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.ImageLocked ) ) { org.ovirt.engine.core.bll.VmHandler.unlockVm ( org.ovirt.engine.core.bll.VmCommand.getVm ( ) , org.ovirt.engine.core.bll.VmCommand.getCompensationContext ( ) ) ; } } else { setLoggingForCommand ( ) ; log.warn ( "VM is null - no unlocking" ) ; } }
Source:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.templates.TemplateDiskListModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.templates.TemplateDiskListModel ) ( target ) ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > storageDomains = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ) ( returnValue ) ) ; org.ovirt.engine.ui.uicommonweb.Linq.sort ( storageDomains , new org.ovirt.engine.core.common.businessentities.comparators.NameableComparator ( ) ) ; setStorageDomains ( storageDomains ) ; setItems ( model.value ) ; }

Target:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.templates.TemplateDiskListModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.templates.TemplateDiskListModel ) ( target ) ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > storageDomains = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ) ( returnValue ) ) ; java.util.Collections.sort ( storageDomains , new org.ovirt.engine.core.common.businessentities.comparators.NameableComparator ( ) ) ; setStorageDomains ( storageDomains ) ; setItems ( model.value ) ; }
Source:
private void initTabAvailabilityListeners ( final org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel vm ) { highAvailabilityTab.setVisible ( true ) ; isStatelessEditor.setVisible ( false ) ; numOfMonitorsEditor.setVisible ( false ) ; }

Target:
protected org.ovirt.engine.ui.common.widget.uicommon.popup.vm.PopupWidgetConfigMap createWidgetConfiguration ( ) { return super . createWidgetConfiguration ( ) . putAll ( poolSpecificFields ( ) , org.ovirt.engine.ui.common.widget.uicommon.popup.vm.PopupWidgetConfig.hiddenField ( ) ) . putOne ( isStatelessEditor , org.ovirt.engine.ui.common.widget.uicommon.popup.vm.PopupWidgetConfig.hiddenField ( ) ) . update ( consoleTab , org.ovirt.engine.ui.common.widget.uicommon.popup.vm.PopupWidgetConfig.simpleField ( ) . visibleInAdvancedModeOnly ( ) ) . update ( numOfMonitorsEditor , org.ovirt.engine.ui.common.widget.uicommon.popup.vm.PopupWidgetConfig.hiddenField ( ) ) ; }
Source:
public static java.lang.String getSuggestedDiskAlias ( org.ovirt.engine.core.common.businessentities.BaseDisk disk , java.lang.String diskPrefix , int count ) { java.lang.String diskAlias ; if ( disk == null ) { diskAlias = org.ovirt.engine.core.bll.ImagesHandler.getDefaultDiskAlias ( diskPrefix , org.ovirt.engine.core.bll.ImagesHandler.DefaultDriveName ) ; org.ovirt.engine.core.bll.ImagesHandler.log.warnFormat ( "Disk object is null, the suggested default disk alias to be used is {0}" , diskAlias ) ; } else { diskAlias = disk.getDiskAlias ( ) ; if ( org.apache.commons.lang.StringUtils.isEmpty ( diskAlias ) ) { diskAlias = org.ovirt.engine.core.bll.ImagesHandler.getDefaultDiskAlias ( diskPrefix , java.lang.String.valueOf ( count ) ) ; org.ovirt.engine.core.bll.ImagesHandler.log.infoFormat ( "Disk alias retrieved from the client is null or empty, the suggested default disk alias to be used is {0}" , diskAlias ) ; } } return diskAlias ; }

Target:
public static java.lang.String getDiskAliasWithDefault ( org.ovirt.engine.core.common.businessentities.BaseDisk disk , java.lang.String aliasIfNull ) { java.lang.String diskAlias = disk.getDiskAlias ( ) ; if ( org.apache.commons.lang.StringUtils.isEmpty ( diskAlias ) ) { org.ovirt.engine.core.bll.ImagesHandler.log.infoFormat ( "Disk alias retrieved from the client is null or empty, the suggested default disk alias to be used is {0}" , aliasIfNull ) ; return aliasIfNull ; } return diskAlias ; }
Source:
public org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidatorTest.ParametersBuilder addRemovedNetworkAttachments ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment ... networkAttachments ) { if ( emptyParameters ( networkAttachments ) ) { return this ; } if ( ( parameters.getRemovedNetworkAttachments ( ) ) == null ) { parameters.setRemovedNetworkAttachments ( new java.util.HashSet < org.ovirt.engine.core.compat.Guid > ( ) ) ; } for ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment networkAttachment : networkAttachments ) { parameters.getRemovedNetworkAttachments ( ) . add ( networkAttachment.getId ( ) ) ; } return this ; }

Target:
public org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidatorTest.ParametersBuilder addBonds ( org.ovirt.engine.core.common.businessentities.network.Bond ... bonds ) { if ( nullParameters ( bonds ) ) { return this ; } if ( ( parameters.getBonds ( ) ) == null ) { parameters.setBonds ( new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.Bond > ( ) ) ; } parameters.getBonds ( ) . addAll ( java.util.Arrays.asList ( bonds ) ) ; return this ; }
Source:
protected void executeCommand ( ) { org.ovirt.engine.core.common.businessentities.AuditLog auditLog = org.ovirt.engine.core.bll.RemoveAuditLogByIdCommand.getAuditLogDao ( ) . get ( org.ovirt.engine.core.bll.RemoveAuditLogByIdCommand.getParameters ( ) . getAuditLogId ( ) ) ; org.ovirt.engine.core.bll.RemoveAuditLogByIdCommand.getAuditLogDao ( ) . remove ( org.ovirt.engine.core.bll.RemoveAuditLogByIdCommand.getParameters ( ) . getAuditLogId ( ) ) ; setAuditLogDetails ( auditLog ) ; evict ( auditLogDirector.composeSystemObjectId ( this , auditLog.getLogType ( ) ) ) ; org.ovirt.engine.core.bll.RemoveAuditLogByIdCommand.setSucceeded ( true ) ; }

Target:
protected void executeCommand ( ) { org.ovirt.engine.core.common.businessentities.AuditLog auditLog = auditLogDao.get ( org.ovirt.engine.core.bll.RemoveAuditLogByIdCommand.getParameters ( ) . getAuditLogId ( ) ) ; auditLogDao.remove ( org.ovirt.engine.core.bll.RemoveAuditLogByIdCommand.getParameters ( ) . getAuditLogId ( ) ) ; setAuditLogDetails ( auditLog ) ; evict ( auditLogDirector.composeSystemObjectId ( this , auditLog.getLogType ( ) ) ) ; org.ovirt.engine.core.bll.RemoveAuditLogByIdCommand.setSucceeded ( true ) ; }
Source:
protected boolean canDoAction ( ) { org.ovirt.engine.core.compat.Guid id = org.ovirt.engine.core.bll.aaa.RemoveGroupCommand.getParameters ( ) . getId ( ) ; if ( isLastSuperUserGroup ( id ) ) { addCanDoActionMessage ( EngineMessage.ERROR_CANNOT_REMOVE_LAST_SUPER_USER_ROLE ) ; return false ; } if ( MultiLevelAdministrationHandler.EVERYONE_OBJECT_ID.equals ( id ) ) { addCanDoActionMessage ( EngineMessage.ACTION_TYPE_FAILED_CANNOT_REMOVE_BUILTIN_GROUP_EVERYONE ) ; return false ; } return true ; }

Target:
protected boolean validate ( ) { org.ovirt.engine.core.compat.Guid id = org.ovirt.engine.core.bll.aaa.RemoveGroupCommand.getParameters ( ) . getId ( ) ; if ( isLastSuperUserGroup ( id ) ) { addValidationMessage ( EngineMessage.ERROR_CANNOT_REMOVE_LAST_SUPER_USER_ROLE ) ; return false ; } if ( MultiLevelAdministrationHandler.EVERYONE_OBJECT_ID.equals ( id ) ) { addValidationMessage ( EngineMessage.ACTION_TYPE_FAILED_CANNOT_REMOVE_BUILTIN_GROUP_EVERYONE ) ; return false ; } return true ; }
Source:
public void getHostFingerprint ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String hostAddress ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetServerSSHKeyFingerprint , new org.ovirt.engine.core.common.queries.ServerParameters ( hostAddress ) , aQuery ) ; }

Target:
public void getTemplateDiskList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid templateId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.DiskImage > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmTemplatesDisks , new org.ovirt.engine.core.common.queries.IdQueryParameters ( templateId ) , aQuery ) ; }
Source:
public void shouldValidateSingleNodePinning ( ) { vm.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 ) ) ) ) ) ; vm.setNumaTuneMode ( NumaTuneMode.PREFERRED ) ; assertTrue ( org.ovirt.engine.core.bll.numa.vm.NumaValidator.checkVmNumaNodesIntegrity ( vm , vm.getvNumaNodeList ( ) ) . isValid ( ) ) ; }

Target:
public void shouldCreateLessNumaNodesAsVirtualCores ( ) { vm.setNumOfSockets ( 1 ) ; vm.setCpuPerSocket ( 3 ) ; org.junit.Assert.assertTrue ( org.ovirt.engine.core.bll.numa.vm.NumaValidator.checkVmNumaNodesIntegrity ( vm , vm.getvNumaNodeList ( ) ) . isValid ( ) ) ; }
Source:
private void updateDisplayAndGraphics ( ) { org.ovirt.engine.core.common.businessentities.VDSGroup cluster = getSelectedCluster ( ) ; java.lang.Integer osType = getOSType ( ) . getSelectedItem ( ) ; if ( ( cluster == null ) || ( osType == null ) ) { return ; } java.util.List < org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.common.businessentities.GraphicsType , org.ovirt.engine.core.common.businessentities.DisplayType > > graphicsAndDisplays = org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getGraphicsAndDisplays ( osType , cluster.getcompatibility_version ( ) ) ; initDisplayModels ( graphicsAndDisplays ) ; }

Target:
private void updateMemoryBalloonDevice ( ) { org.ovirt.engine.core.common.businessentities.VDSGroup cluster = getSelectedCluster ( ) ; java.lang.Integer osType = getOSType ( ) . getSelectedItem ( ) ; if ( ( cluster == null ) || ( osType == null ) ) { return ; } boolean isBalloonEnabled = org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . isBalloonEnabled ( osType , cluster.getCompatibilityVersion ( ) ) ; getMemoryBalloonDeviceEnabled ( ) . setIsChangeable ( isBalloonEnabled ) ; if ( getBehavior ( ) . basedOnCustomInstanceType ( ) ) { getMemoryBalloonDeviceEnabled ( ) . setEntity ( isBalloonEnabled ) ; } }
Source:
public void onResponseReceived ( com.google.gwt.http.client.Request request , com.google.gwt.http.client.Response response ) { try { if ( org.ovirt.engine.ui.uicompat.ReportParser.getInstance ( ) . parseReport ( response.getText ( ) ) ) { resourceMap = org.ovirt.engine.ui.uicompat.ReportParser.getInstance ( ) . getResourceMap ( ) ; dashboardMap = org.ovirt.engine.ui.uicompat.ReportParser.getInstance ( ) . getDashboardMap ( ) ; isCommunityEdition = org.ovirt.engine.ui.uicompat.ReportParser.getInstance ( ) . isCommunityEdition ( ) ; } } catch ( com.google.gwt.xml.client.impl.DOMParseException e ) { } finally { setXmlInitialized ( ) ; } }

Target:
public void onResponseReceived ( com.google.gwt.http.client.Request request , com.google.gwt.http.client.Response response ) { try { if ( ( ( response.getStatusCode ( ) ) == ( com.google.gwt.http.client.Response.SC_OK ) ) && ( org.ovirt.engine.ui.uicompat.ReportParser.getInstance ( ) . parseReport ( response.getText ( ) ) ) ) { resourceMap = org.ovirt.engine.ui.uicompat.ReportParser.getInstance ( ) . getResourceMap ( ) ; dashboardMap = org.ovirt.engine.ui.uicompat.ReportParser.getInstance ( ) . getDashboardMap ( ) ; isCommunityEdition = org.ovirt.engine.ui.uicompat.ReportParser.getInstance ( ) . isCommunityEdition ( ) ; } } catch ( com.google.gwt.xml.client.impl.DOMParseException e ) { } finally { setXmlInitialized ( ) ; } }
Source:
public static void GetClusterServerMemoryOverCommit ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) . intValue ( ) : 0 ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.MaxVdsMemOverCommitForServers , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public static void getClusterDesktopMemoryOverCommit ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) . intValue ( ) : 0 ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.MaxVdsMemOverCommit , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
private boolean isRngSupportedForClusterVersion ( org.ovirt.engine.core.compat.Version version ) { if ( version == null ) { return false ; } java.lang.Boolean supported = ( ( java.lang.Boolean ) ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getConfigValuePreConverted ( ConfigurationValues.VirtIoRngDeviceSupported , version.toString ( ) ) ) ) ; return supported == null ? false : supported ; }

Target:
public void setMigrationBandwidthLimitType ( org.ovirt.engine.ui.uicommonweb.models.ListModel < org.ovirt.engine.core.common.businessentities.MigrationBandwidthLimitType > migrationBandwidthLimitType ) { this . migrationBandwidthLimitType = migrationBandwidthLimitType ; }
Source:
public static java.lang.String getSuggestedDiskAlias ( org.ovirt.engine.core.common.businessentities.BaseDisk disk , java.lang.String diskPrefix , int count ) { java.lang.String diskAlias ; if ( disk == null ) { diskAlias = org.ovirt.engine.core.bll.ImagesHandler.getDefaultDiskAlias ( diskPrefix , org.ovirt.engine.core.bll.ImagesHandler.DefaultDriveName ) ; org.ovirt.engine.core.bll.ImagesHandler.log.warn ( "Disk object is null, the suggested default disk alias to be used is '{}'" , diskAlias ) ; } else { java.lang.String defaultAlias = org.ovirt.engine.core.bll.ImagesHandler.getDefaultDiskAlias ( diskPrefix , java.lang.String.valueOf ( count ) ) ; diskAlias = org.ovirt.engine.core.bll.ImagesHandler.getDiskAliasWithDefault ( disk , defaultAlias ) ; } return diskAlias ; }

Target:
public static java.lang.String getSuggestedDiskAlias ( org.ovirt.engine.core.common.businessentities.storage.BaseDisk disk , java.lang.String diskPrefix , int count ) { java.lang.String diskAlias ; if ( disk == null ) { diskAlias = org.ovirt.engine.core.bll.ImagesHandler.getDefaultDiskAlias ( diskPrefix , org.ovirt.engine.core.bll.ImagesHandler.DefaultDriveName ) ; org.ovirt.engine.core.bll.ImagesHandler.log.warn ( "Disk object is null, the suggested default disk alias to be used is '{}'" , diskAlias ) ; } else { java.lang.String defaultAlias = org.ovirt.engine.core.bll.ImagesHandler.getDefaultDiskAlias ( diskPrefix , java.lang.String.valueOf ( count ) ) ; diskAlias = org.ovirt.engine.core.bll.ImagesHandler.getDiskAliasWithDefault ( disk , defaultAlias ) ; } return diskAlias ; }
Source:
protected org.ovirt.engine.core.utils.linq.Predicate < org.ovirt.engine.core.common.businessentities.StorageDomain > getPredicate ( final java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > disksList ) { return new org.ovirt.engine.core.utils.linq.Predicate < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) { @ java.lang.Override public boolean eval ( org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain ) { updateDisksStorage ( storageDomain , disksList ) ; org.ovirt.engine.core.bll.validator.storage.StorageDomainValidator storageDomainValidator = getStorageDomainValidator ( storageDomain ) ; return ( storageDomainValidator.isDomainWithinThresholds ( ) . isValid ( ) ) && ( storageDomainValidator.hasSpaceForClonedDisks ( disksList ) . isValid ( ) ) ; } } ; }

Target:
protected org.ovirt.engine.core.utils.linq.Predicate < org.ovirt.engine.core.common.businessentities.StorageDomain > getPredicate ( final java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > memoryDisks ) { return new org.ovirt.engine.core.utils.linq.Predicate < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) { @ java.lang.Override public boolean eval ( org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain ) { updateDisksStorage ( storageDomain , memoryDisks ) ; org.ovirt.engine.core.bll.validator.storage.StorageDomainValidator storageDomainValidator = getStorageDomainValidator ( storageDomain ) ; return ( storageDomainValidator.isDomainWithinThresholds ( ) . isValid ( ) ) && ( storageDomainValidator.hasSpaceForClonedDisks ( memoryDisks ) . isValid ( ) ) ; } } ; }
Source:
private org.ovirt.engine.core.common.businessentities.VDS createHost ( ) { org.ovirt.engine.core.common.businessentities.VDS vds = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; vds.setId ( org.ovirt.engine.core.bll.StartVdsCommandTest.FENCECD_HOST_ID ) ; vds.setVdsGroupId ( org.ovirt.engine.core.bll.StartVdsCommandTest.FENCECD_HOST_CLUSTER_ID ) ; vds.setVdsName ( org.ovirt.engine.core.bll.StartVdsCommandTest.HOST_NAME ) ; vds.setStatus ( VDSStatus.Up ) ; java.util.List < org.ovirt.engine.core.common.businessentities.FenceAgent > agents = new java.util.LinkedList < > ( ) ; agents.add ( agent1 ) ; agents.add ( agent2 ) ; vds.setFenceAgents ( agents ) ; return vds ; }

Target:
private org.ovirt.engine.core.common.businessentities.VDS createHost ( ) { org.ovirt.engine.core.common.businessentities.VDS vds = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; vds.setId ( org.ovirt.engine.core.bll.StartVdsCommandTest.FENCECD_HOST_ID ) ; vds.setVdsGroupId ( org.ovirt.engine.core.bll.StartVdsCommandTest.FENCECD_HOST_CLUSTER_ID ) ; vds.setVdsName ( org.ovirt.engine.core.bll.StartVdsCommandTest.HOST_NAME ) ; vds.setStatus ( VDSStatus.Up ) ; java.util.List < org.ovirt.engine.core.common.businessentities.pm.FenceAgent > agents = new java.util.LinkedList < > ( ) ; agents.add ( agent1 ) ; agents.add ( agent2 ) ; vds.setFenceAgents ( agents ) ; return vds ; }
Source:
protected org.ovirt.engine.ui.uicommonweb.models.datacenters.NetworkClusterModel createNetworkClusterModel ( org.ovirt.engine.core.common.businessentities.Cluster cluster ) { if ( cluster.getId ( ) . equals ( this . cluster.getId ( ) ) ) { org.ovirt.engine.ui.uicommonweb.models.datacenters.NetworkClusterModel networkClusterModel = new org.ovirt.engine.ui.uicommonweb.models.datacenters.NetworkClusterModel ( cluster ) ; networkClusterModel.setAttached ( true ) ; networkClusterModel.setRequired ( ( ! ( getExport ( ) . getEntity ( ) ) ) ) ; networkClusterModel.setIsChangeable ( false ) ; return networkClusterModel ; } else { return super . createNetworkClusterModel ( cluster ) ; } }

Target:
protected org.ovirt.engine.ui.uicommonweb.models.datacenters.NetworkClusterModel createNetworkClusterModel ( org.ovirt.engine.core.common.businessentities.Cluster cluster ) { if ( cluster.getId ( ) . equals ( this . cluster.getId ( ) ) ) { org.ovirt.engine.ui.uicommonweb.models.datacenters.NetworkClusterModel networkClusterModel = new org.ovirt.engine.ui.uicommonweb.models.datacenters.NetworkClusterModel ( cluster ) ; networkClusterModel.setAttached ( true ) ; networkClusterModel.setRequired ( ( ! ( getExternal ( ) . getEntity ( ) ) ) ) ; networkClusterModel.setIsChangeable ( false ) ; return networkClusterModel ; } else { return super . createNetworkClusterModel ( cluster ) ; } }
Source:
protected void removeVmSnapshots ( ) { java.util.Collection < java.lang.String > memoriesOfRemovedSnapshots = new org.ovirt.engine.core.bll.snapshots.SnapshotsManager ( ) . removeSnapshots ( org.ovirt.engine.core.bll.VmCommand.getVmId ( ) ) ; for ( java.lang.String memoryVolumes : memoriesOfRemovedSnapshots ) { if ( shouldRemoveMemorySnapshotVolumes ( memoryVolumes ) ) { removeMemoryVolumes ( memoryVolumes , org.ovirt.engine.core.bll.VmCommand.getActionType ( ) , false ) ; } } }

Target:
protected org.ovirt.engine.core.dao.network.VmNicDao getVmNicDao ( ) { return super . getVmNicDao ( ) ; }
Source:
public void mapBackendModel ( ) { for ( org.ovirt.engine.core.common.businessentities.VmWatchdogType type : org.ovirt.engine.core.common.businessentities.VmWatchdogType.values ( ) ) { org.ovirt.engine.api.model.WatchdogModel model = org.ovirt.engine.api.restapi.types.WatchdogMapper.map ( type ) ; org.junit.Assert.assertNotNull ( model ) ; org.junit.Assert.assertEquals ( model.name ( ) . toLowerCase ( ) , type.name ( ) . toLowerCase ( ) ) ; } }

Target:
public void mapBackendModel ( ) { for ( org.ovirt.engine.core.common.businessentities.VmWatchdogType type : org.ovirt.engine.core.common.businessentities.VmWatchdogType.values ( ) ) { org.ovirt.engine.api.model.WatchdogModel model = org.ovirt.engine.api.restapi.types.WatchdogMapper.map ( type ) ; org.junit.jupiter.api.Assertions.assertNotNull ( model ) ; org.junit.jupiter.api.Assertions.assertEquals ( model.name ( ) . toLowerCase ( ) , type.name ( ) . toLowerCase ( ) ) ; } }
Source:
public void qosOverridden ( ) { org.ovirt.engine.core.common.businessentities.network.Network network = createManagementNetwork ( ) ; mockExistingNetworks ( network ) ; org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface = createNicSyncedWithNetwork ( "eth0" , network ) ; mockExistingIfaces ( iface ) ; iface.setQosOverridden ( true ) ; org.ovirt.engine.core.bll.network.host.SetupNetworksHelper helper = createHelper ( createParametersForNics ( iface ) , Version.v3_4 ) ; validateAndAssertQosOverridden ( helper , iface ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { effectiveHostNetworkQos = new org.ovirt.engine.core.vdsbroker.EffectiveHostNetworkQos ( qosDao ) ; injectorRule.bind ( org.ovirt.engine.core.dao.network.NetworkDao.class , networkDao ) ; injectorRule.bind ( org.ovirt.engine.core.dao.network.NetworkAttachmentDao.class , networkAttachmentDao ) ; injectorRule.bind ( org.ovirt.engine.core.dao.network.InterfaceDao.class , interfaceDao ) ; injectorRule.bind ( org.ovirt.engine.core.dao.gluster.GlusterBrickDao.class , brickDao ) ; injectorRule.bind ( org.ovirt.engine.core.vdsbroker.EffectiveHostNetworkQos.class , effectiveHostNetworkQos ) ; injectorRule.bind ( org.ovirt.engine.core.vdsbroker.NetworkImplementationDetailsUtils.class , new org.ovirt.engine.core.vdsbroker.NetworkImplementationDetailsUtils ( effectiveHostNetworkQos , networkAttachmentDao , calculateBaseNic ) ) ; injectorRule.bind ( org.ovirt.engine.core.vdsbroker.CalculateBaseNic.class , calculateBaseNic ) ; }
Source:
public static void GetLunsByVgId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String vgId ) { 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.LUNs > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.LUNs > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetLunsByVgIdParameters tempVar = new org.ovirt.engine.core.common.queries.GetLunsByVgIdParameters ( ) ; tempVar.setVgId ( vgId ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetLunsByVgId , tempVar , aQuery ) ; }

Target:
public static void GetMaxSpmPriority ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) . intValue ( ) : 0 ; } } ; aQuery.asyncCallback.OnSuccess ( aQuery.getModel ( ) , 10 ) ; }
Source:
public static void getDefaultTimeZone ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.TimeZoneType timeZoneType ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { return source ; } return "" ; } } ; org.ovirt.engine.core.common.queries.TimeZoneQueryParams params = new org.ovirt.engine.core.common.queries.TimeZoneQueryParams ( ) ; params.setTimeZoneType ( timeZoneType ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetDefaultTimeZone , params , aQuery ) ; }

Target:
public void isVirtioScsiEnabledForVm ( 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 ) { if ( source != null ) { return ! ( ( ( java.util.List < ? > ) ( source ) ) . isEmpty ( ) ) ; } return false ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVirtioScsiControllers , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }
Source:
public static java.util.List < org.ovirt.engine.core.aaa.DirectoryUser > findDirectoryUserByIds ( final org.ovirt.engine.core.extensions.mgr.ExtensionProxy extension , final java.lang.String namespace , final java.util.List < java.lang.String > ids , final boolean groupsResolving , final boolean groupsResolvingRecursive ) { return org.ovirt.engine.core.aaa.DirectoryUtils.mapPrincipalRecords ( org.ovirt.engine.core.aaa.AuthzUtils.getName ( extension ) , org.ovirt.engine.core.aaa.AuthzUtils.findPrincipalsByIds ( extension , namespace , ids , groupsResolving , groupsResolvingRecursive ) ) ; }

Target:
public static java.util.List < org.ovirt.engine.core.aaa.DirectoryUser > findDirectoryUserByIds ( final org.ovirt.engine.core.extensions.mgr.ExtensionProxy extension , final java.lang.String namespace , final java.util.List < java.lang.String > ids , final boolean groupsResolving , final boolean groupsResolvingRecursive ) { return org.ovirt.engine.core.aaa.DirectoryUtils.mapPrincipalRecordsToDirectoryUsers ( org.ovirt.engine.core.aaa.AuthzUtils.getName ( extension ) , org.ovirt.engine.core.aaa.AuthzUtils.findPrincipalsByIds ( extension , namespace , ids , groupsResolving , groupsResolvingRecursive ) ) ; }
Source:
public void onRemove ( ) { java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > parameters = new java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > ( ) ; for ( java.lang.Object networkQoS : sourceListModel.getSelectedItems ( ) ) { org.ovirt.engine.core.common.action.NetworkQoSParametersBase parameter = new org.ovirt.engine.core.common.action.NetworkQoSParametersBase ( ) ; parameter.setNetworkQoS ( ( ( org.ovirt.engine.core.common.businessentities.network.NetworkQoS ) ( networkQoS ) ) ) ; parameters.add ( parameter ) ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runMultipleAction ( VdcActionType.RemoveNetworkQoS , parameters ) ; cancel ( ) ; }

Target:
public void onRemove ( ) { java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > parameters = new java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > ( ) ; for ( java.lang.Object networkQoS : sourceListModel.getSelectedItems ( ) ) { org.ovirt.engine.core.common.action.QosParametersBase < org.ovirt.engine.core.common.businessentities.network.NetworkQoS > parameter = new org.ovirt.engine.core.common.action.QosParametersBase < org.ovirt.engine.core.common.businessentities.network.NetworkQoS > ( ) ; org.ovirt.engine.core.common.businessentities.network.NetworkQoS tempQos = ( ( org.ovirt.engine.core.common.businessentities.network.NetworkQoS ) ( networkQoS ) ) ; parameter.setQos ( tempQos ) ; parameters.add ( parameter ) ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runMultipleAction ( VdcActionType.RemoveNetworkQoS , parameters ) ; cancel ( ) ; }
Source:
public void testGroups ( ) { org.ovirt.engine.core.compat.Match match = org.ovirt.engine.core.compat.Regex.Match ( "ABC,123" , "([A-Z]+),([0-9]+)" ) ; org.junit.Assert.assertEquals ( "First Group" , "ABC" , match.Groups ( ) . get ( 0 ) . getValue ( ) ) ; org.junit.Assert.assertEquals ( "Second Group" , "123" , match.Groups ( ) . get ( 1 ) . getValue ( ) ) ; }

Target:
public void testGroups ( ) { org.ovirt.engine.core.compat.Match match = org.ovirt.engine.core.compat.Regex.Match ( "ABC,123" , "([A-Z]+),([0-9]+)" ) ; org.junit.Assert.assertEquals ( "First Group" , "ABC" , match.groups ( ) . get ( 0 ) . getValue ( ) ) ; org.junit.Assert.assertEquals ( "Second Group" , "123" , match.groups ( ) . get ( 1 ) . getValue ( ) ) ; }
Source:
public com.google.gwt.resources.client.ImageResource getValue ( T item ) { java.lang.String osTypeName = org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getOsUniqueOsNames ( ) . get ( extractor.extractOsType ( item ) ) ; com.google.gwt.resources.client.ResourcePrototype resource = org.ovirt.engine.ui.userportal.widget.table.column.VmImageColumn.getApplicationResourcesWithLookup ( ) . getResource ( ( osTypeName + "SmallImage" ) ) ; if ( ( resource == null ) || ( ! ( resource instanceof com.google.gwt.resources.client.ImageResource ) ) ) { resource = org.ovirt.engine.ui.userportal.widget.table.column.VmImageColumn.getApplicationResourcesWithLookup ( ) . other_SmallImage ( ) ; } return ( ( com.google.gwt.resources.client.ImageResource ) ( resource ) ) ; }

Target:
public com.google.gwt.resources.client.ImageResource getValue ( T item ) { java.lang.String osTypeName = org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getOsUniqueOsNames ( ) . get ( extractor.extractOsType ( item ) ) ; com.google.gwt.resources.client.ResourcePrototype resource = org.ovirt.engine.ui.userportal.widget.table.column.VmImageColumn.getApplicationResourcesWithLookup ( ) . getResource ( ( osTypeName + "SmallImage" ) ) ; if ( ( resource == null ) || ( ! ( resource instanceof com.google.gwt.resources.client.ImageResource ) ) ) { resource = org.ovirt.engine.ui.userportal.widget.table.column.VmImageColumn.getApplicationResourcesWithLookup ( ) . otherSmallImage ( ) ; } return ( ( com.google.gwt.resources.client.ImageResource ) ( resource ) ) ; }
Source:
public static void getGlusterSwiftServerServices ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterServerService > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetGlusterServerServicesByClusterId , new org.ovirt.engine.core.common.queries.gluster.GlusterServiceQueryParameters ( clusterId , org.ovirt.engine.core.common.businessentities.gluster.ServiceType.GLUSTER_SWIFT ) , aQuery ) ; }

Target:
public static void getGlusterHooks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterHooks , new org.ovirt.engine.core.common.queries.gluster.GlusterParameters ( clusterId ) , aQuery ) ; }
Source:
static org.ovirt.engine.api.model.VM setUpStatisticalEntityExpectations ( org.ovirt.engine.api.model.VM entity , org.ovirt.engine.core.common.businessentities.VmStatistics statistics ) { entity.setVmMemSizeMb ( 10 ) ; entity.setStatisticsData ( statistics ) ; statistics.setusage_mem_percent ( 20 ) ; statistics.setcpu_user ( 30.0 ) ; statistics.setcpu_sys ( 40.0 ) ; statistics.setusage_cpu_percent ( 50 ) ; entity.setMigrationProgressPercent ( 50 ) ; return entity ; }

Target:
static org.ovirt.engine.api.model.VM setUpStatisticalEntityExpectations ( org.ovirt.engine.api.model.VM entity , org.ovirt.engine.core.common.businessentities.VmStatistics statistics ) { entity.setVmMemSizeMb ( 10 ) ; entity.setStatisticsData ( statistics ) ; statistics.setusage_mem_percent ( 20 ) ; statistics.setcpu_user ( 30.0 ) ; statistics.setcpu_sys ( 40.0 ) ; statistics.setusage_cpu_percent ( 50 ) ; entity.setMigrationProgressPercent ( 50 ) ; entity.setGuestMemoryFree ( 5120L ) ; entity.setGuestMemoryBuffered ( 2048L ) ; entity.setGuestMemoryCached ( 1024L ) ; return entity ; }
Source:
protected org.ovirt.engine.core.common.action.AddNetworkStoragePoolParameters getActionParameters ( org.ovirt.engine.api.model.Network network , org.ovirt.engine.api.model.Network entity ) { if ( namedDataCenter ( network ) ) { entity.setstorage_pool_id ( getDataCenterId ( network ) ) ; } return new org.ovirt.engine.core.common.action.AddNetworkStoragePoolParameters ( entity.getstorage_pool_id ( ) . getValue ( ) , entity ) ; }

Target:
protected org.ovirt.engine.core.common.action.AddNetworkStoragePoolParameters getActionParameters ( org.ovirt.engine.api.model.Network network , org.ovirt.engine.api.model.Network entity ) { if ( namedDataCenter ( network ) ) { entity.setDataCenterId ( getDataCenterId ( network ) ) ; } return new org.ovirt.engine.core.common.action.AddNetworkStoragePoolParameters ( entity.getDataCenterId ( ) . getValue ( ) , entity ) ; }
Source:
protected boolean canDoAction ( ) { boolean retValue = true ; if ( ( org.ovirt.engine.core.bll.StopVdsCommand.getParameters ( ) . getParentCommand ( ) ) == ( org.ovirt.engine.core.common.action.VdcActionType.Unknown ) ) { retValue = super . canDoAction ( ) ; if ( ( ( org.ovirt.engine.core.bll.StopVdsCommand.getVds ( ) ) != null ) && ( ( org.ovirt.engine.core.bll.StopVdsCommand.getVds ( ) . getStatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.VDSStatus.Maintenance ) ) ) { addCanDoActionMessage ( VdcBllMessages.VDS_STATUS_NOT_VALID_FOR_STOP ) ; retValue = false ; } } return retValue ; }

Target:
protected boolean canDoAction ( ) { boolean retValue = true ; if ( ( org.ovirt.engine.core.bll.StopVdsCommand.getParameters ( ) . getParentCommand ( ) ) == ( org.ovirt.engine.core.common.action.VdcActionType.Unknown ) ) { retValue = super . canDoAction ( ) ; if ( ( ( org.ovirt.engine.core.bll.StopVdsCommand.getVds ( ) ) != null ) && ( ( org.ovirt.engine.core.bll.StopVdsCommand.getVds ( ) . getStatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.VDSStatus.Maintenance ) ) ) { addCanDoActionMessage ( VdcBllMessages.VDS_STATUS_NOT_VALID_FOR_STOP ) ; retValue = false ; } } org.ovirt.engine.core.bll.StopVdsCommand.getReturnValue ( ) . setCanDoAction ( retValue ) ; return retValue ; }
Source:
private boolean validateCrossAttachments ( java.util.List < org.ovirt.engine.core.common.businessentities.network.NetworkAttachment > networkAttachmentsForVds ) { networkAttachmentsForVds.add ( org.ovirt.engine.core.bll.network.host.AddNetworkAttachmentCommand.getParameters ( ) . getNetworkAttachment ( ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > networks = org.ovirt.engine.core.bll.network.host.AddNetworkAttachmentCommand.getNetworkDAO ( ) . getAllForCluster ( org.ovirt.engine.core.bll.network.host.AddNetworkAttachmentCommand.getVdsGroupId ( ) ) ; org.ovirt.engine.core.bll.validator.NetworkAttachmentsValidator crossAttachmentsValidator = new org.ovirt.engine.core.bll.validator.NetworkAttachmentsValidator ( networkAttachmentsForVds , new org.ovirt.engine.core.common.businessentities.BusinessEntityMap ( networks ) ) ; return validate ( crossAttachmentsValidator.validateNetworkExclusiveOnNics ( ) ) ; }

Target:
public boolean eval ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment networkAttachment ) { return networkAttachment.getNetworkId ( ) . equals ( requiredNetworkId ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.network.Network getNetworkByName ( java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > networks ) { return org.ovirt.engine.core.utils.linq.LinqUtils.firstOrNull ( networks , new org.ovirt.engine.core.utils.linq.Predicate < org.ovirt.engine.core.common.businessentities.network.Network > ( ) { @ java.lang.Override public boolean eval ( org.ovirt.engine.core.common.businessentities.network.Network network ) { return network.getName ( ) . equals ( getNetworkName ( ) ) ; } } ) ; }

Target:
private org.ovirt.engine.core.common.businessentities.network.Network getNetworkByName ( java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > networks ) { java.lang.String networkName = org.ovirt.engine.core.bll.network.dc.AddNetworkCommand.getNetworkName ( ) ; for ( org.ovirt.engine.core.common.businessentities.network.Network network : networks ) { if ( network.getName ( ) . equals ( networkName ) ) { return network ; } } return null ; }