auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void testIsInvalidHostname ( ) { java.lang.String [ ] straValidHosts = new java.lang.String [ ] { "blahblah" , "www.redhat.com" , "www.rhn.redhat.com" , "127.0.0.1" , "1::2" , "1:0002:34:4:5:6:7:8" } ; java.lang.String [ ] straInvalidHosts = new java.lang.String [ ] { "www.redhat#com" , "123/456" , "www@redhat.com" , "www.řhň.řěďháť.čőm" , "你好世界" , "שלוםעולם" } ; for ( java.lang.String s : straValidHosts ) { org.junit.Assert.assertTrue ( ( "Valid host name: " + s ) , org.ovirt.engine.core.common.utils.ValidationUtils.validHostname ( s ) ) ; } for ( java.lang.String s : straInvalidHosts ) { org.junit.Assert.assertTrue ( ( "Invalid host name: " + s ) , ( ! ( org.ovirt.engine.core.common.utils.ValidationUtils.validHostname ( s ) ) ) ) ; } }

Target:
public void testIsInvalidHostname ( ) { java.lang.String [ ] straValidHosts = new java.lang.String [ ] { "blahblah" , "www.redhat.com" , "www.rhn.redhat.com" , "127.0.0.1" , "1::2" , "1:0002:34:4:5:6:7:8" } ; java.lang.String [ ] straInvalidHosts = new java.lang.String [ ] { "www.redhat#com" , "123/456" , "www@redhat.com" , "www.řhň.řěďháť.čőm" , "你好世界" , "שלוםעולם" } ; for ( java.lang.String s : straValidHosts ) { org.junit.jupiter.api.Assertions.assertTrue ( org.ovirt.engine.core.common.utils.ValidationUtils.validHostname ( s ) , ( "Valid host name: " + s ) ) ; } for ( java.lang.String s : straInvalidHosts ) { org.junit.jupiter.api.Assertions.assertTrue ( ( ! ( org.ovirt.engine.core.common.utils.ValidationUtils.validHostname ( s ) ) ) , ( "Invalid host name: " + s ) ) ; } }
Source:
public void testValidateVmDown ( ) { prepareForVmValidatorTests ( ) ; cmd.getVm ( ) . setStatus ( VMStatus.Down ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateSuccess ( cmd ) ; }

Target:
public void testValidateVmDown ( ) { prepareForVmValidatorTests ( ) ; org.mockito.Mockito.doReturn ( ValidationResult.VALID ) . when ( snapshotValidator ) . vmSnapshotDisksNotDuringMerge ( org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.compat.Guid.class ) , org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ; cmd.getVm ( ) . setStatus ( VMStatus.Down ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateSuccess ( cmd ) ; }
Source:
private void createStorageDomain ( org.ovirt.engine.core.common.businessentities.StorageDomainStatus status ) { org.ovirt.engine.core.common.businessentities.StorageDomain domain = new org.ovirt.engine.core.common.businessentities.StorageDomain ( ) ; domain.setstatus ( status ) ; domain.setId ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; org.mockito.Mockito.when ( storageDomainDAO.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( domain ) ; org.mockito.Mockito.when ( storageDomainDAO.getForStoragePool ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) , org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( domain ) ; }

Target:
private void createStorageDomain ( org.ovirt.engine.core.common.businessentities.StorageDomainStatus status ) { org.ovirt.engine.core.common.businessentities.StorageDomain domain = new org.ovirt.engine.core.common.businessentities.StorageDomain ( ) ; domain.setStatus ( status ) ; domain.setId ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; org.mockito.Mockito.when ( storageDomainDAO.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( domain ) ; org.mockito.Mockito.when ( storageDomainDAO.getForStoragePool ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) , org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( domain ) ; }
Source:
protected org.ovirt.engine.core.common.businessentities.StorageServerConnections populateBasicConnectionDetails ( org.ovirt.engine.core.compat.Guid id , java.lang.String connection , org.ovirt.engine.core.common.businessentities.storage.StorageType type ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections connectionDetails = new org.ovirt.engine.core.common.businessentities.StorageServerConnections ( ) ; if ( id != null ) { connectionDetails.setid ( id.toString ( ) ) ; } connectionDetails.setconnection ( connection ) ; connectionDetails.setstorage_type ( type ) ; return connectionDetails ; }

Target:
protected org.ovirt.engine.core.common.businessentities.StorageServerConnections populateBasicConnectionDetails ( org.ovirt.engine.core.compat.Guid id , java.lang.String connection , org.ovirt.engine.core.common.businessentities.storage.StorageType type ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections connectionDetails = new org.ovirt.engine.core.common.businessentities.StorageServerConnections ( ) ; if ( id != null ) { connectionDetails.setId ( id.toString ( ) ) ; } connectionDetails.setConnection ( connection ) ; connectionDetails.setStorageType ( type ) ; return connectionDetails ; }
Source:
public static void getRpmVersion ( 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.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.core.common.queries.GetConfigurationValueParameters tempVar = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.ProductRPMVersion ) ; tempVar.setVersion ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( tempVar , aQuery ) ; }

Target:
public static void getGlusterHookContent ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hookId , org.ovirt.engine.core.compat.Guid serverId ) { 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 : "" ; } } ; org.ovirt.engine.core.common.queries.gluster.GlusterHookContentQueryParameters parameters = new org.ovirt.engine.core.common.queries.gluster.GlusterHookContentQueryParameters ( hookId ) ; parameters.setGlusterServerId ( serverId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterHookContent , parameters , aQuery ) ; }
Source:
public static void GetStorageDomainById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storageDomainId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( org.ovirt.engine.core.common.businessentities.StorageDomain ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetStorageDomainById , new org.ovirt.engine.core.common.queries.StorageDomainQueryParametersBase ( storageDomainId ) , aQuery ) ; }

Target:
public static void getStorageDomainById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storageDomainId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( org.ovirt.engine.core.common.businessentities.StorageDomain ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetStorageDomainById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( storageDomainId ) , aQuery ) ; }
Source:
public java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > getPermissionCheckSubjects ( ) { java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > permissionList = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.core.common.action.MoveOrCopyImageGroupParameters parameters : org.ovirt.engine.core.bll.MoveDisksCommand.getParameters ( ) . getParametersList ( ) ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage diskImage = getDiskImageDao ( ) . get ( parameters.getImageId ( ) ) ; if ( diskImage != null ) { permissionList.add ( new org.ovirt.engine.core.bll.utils.PermissionSubject ( diskImage.getId ( ) , org.ovirt.engine.core.common.VdcObjectType.Disk , org.ovirt.engine.core.common.businessentities.ActionGroup.CONFIGURE_DISK_STORAGE ) ) ; } } return permissionList ; }

Target:
public java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > getPermissionCheckSubjects ( ) { java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > permissionList = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.core.common.action.MoveOrCopyImageGroupParameters parameters : org.ovirt.engine.core.bll.MoveDisksCommand.getParameters ( ) . getParametersList ( ) ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage diskImage = getDiskImageDao ( ) . get ( parameters.getImageId ( ) ) ; org.ovirt.engine.core.compat.Guid diskId = ( diskImage == null ) ? org.ovirt.engine.core.compat.Guid.Empty : diskImage.getId ( ) ; permissionList.add ( new org.ovirt.engine.core.bll.utils.PermissionSubject ( diskId , org.ovirt.engine.core.common.VdcObjectType.Disk , org.ovirt.engine.core.common.businessentities.ActionGroup.CONFIGURE_DISK_STORAGE ) ) ; } return permissionList ; }
Source:
private void revertChanges ( ) { if ( ( originalNetParams ) != null ) { setBootProtocol ( originalNetParams.getBootProtocol ( ) ) ; getAddress ( ) . setEntity ( originalNetParams.getAddress ( ) ) ; getSubnet ( ) . setEntity ( originalNetParams.getSubnet ( ) ) ; } }

Target:
private void revertChanges ( ) { if ( ( originalNetParams ) != null ) { setBootProtocol ( originalNetParams.getBootProtocol ( ) ) ; getAddress ( ) . setEntity ( originalNetParams.getAddress ( ) ) ; getSubnet ( ) . setEntity ( originalNetParams.getSubnet ( ) ) ; getGateway ( ) . setEntity ( originalNetParams.getGateway ( ) ) ; } }
Source:
private void MigrationMode_EntityChanged ( java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { if ( ( org.ovirt.engine.core.common.businessentities.MigrationSupport.PINNED_TO_HOST ) == ( getMigrationMode ( ) . getSelectedItem ( ) ) ) { getHostCpu ( ) . setIsChangable ( true ) ; } else { getHostCpu ( ) . setEntity ( false ) ; getHostCpu ( ) . setIsChangable ( false ) ; } behavior.updateCpuPinningVisibility ( ) ; }

Target:
public void setVncKeyboardLayout ( org.ovirt.engine.ui.uicommonweb.models.ListModel vncKeyboardLayout ) { this . vncKeyboardLayout = vncKeyboardLayout ; }
Source:
public com.google.gwt.safehtml.shared.SafeHtml getValue ( T object ) { java.lang.Integer progressValue = getProgressValue ( object ) ; int progress = ( progressValue != null ) ? progressValue : 0 ; java.lang.String text = getProgressText ( object ) ; java.lang.String color = getColorByProgress ( progress ) ; return org.ovirt.engine.ui.common.widget.table.column.AbstractProgressBarColumn.templates.progressBar ( progress , text , color , getStyle ( ) , com.google.gwt.user.client.DOM.createUniqueId ( ) ) ; }

Target:
public com.google.gwt.safehtml.shared.SafeHtml getValue ( T object ) { java.lang.Integer progressValue = getProgressValue ( object ) ; int progress = ( progressValue != null ) ? progressValue : 0 ; java.lang.String text = getProgressText ( object ) ; java.lang.String color = getColorByProgress ( progress ) ; com.google.gwt.safecss.shared.SafeStylesBuilder builder = new com.google.gwt.safecss.shared.SafeStylesBuilder ( ) ; builder.width ( progress , Unit.PCT ) ; builder.trustedBackgroundColor ( color ) ; return org.ovirt.engine.ui.common.widget.table.column.AbstractProgressBarColumn.templates.progressBar ( builder.toSafeStyles ( ) , text , getStyle ( ) , com.google.gwt.user.client.DOM.createUniqueId ( ) ) ; }
Source:
private java.lang.String getSearchPattern ( ) { java.lang.String constraint = org.ovirt.engine.api.common.util.QueryHelper.getConstraint ( httpHeaders , uriInfo , org.ovirt.engine.core.aaa.DirectoryGroup.class , false ) ; java.lang.StringBuilder sb = new java.lang.StringBuilder ( 128 ) ; sb.append ( java.text.MessageFormat.format ( ResourceConstants.AAA_GROUPS_SEARCH_TEMPLATE , parent.getDirectory ( ) . getName ( ) , "" ) ) ; sb.append ( ( org.apache.commons.lang.StringUtils.isEmpty ( constraint ) ? "allnames=*" : constraint ) ) ; return sb.toString ( ) ; }

Target:
private java.lang.String getSearchPattern ( ) { java.lang.String constraint = org.ovirt.engine.api.restapi.util.QueryHelper.getConstraint ( httpHeaders , uriInfo , org.ovirt.engine.core.aaa.DirectoryGroup.class , false ) ; java.lang.StringBuilder sb = new java.lang.StringBuilder ( 128 ) ; sb.append ( java.text.MessageFormat.format ( ResourceConstants.AAA_GROUPS_SEARCH_TEMPLATE , parent.getDirectory ( ) . getName ( ) , "" ) ) ; sb.append ( ( org.apache.commons.lang.StringUtils.isEmpty ( constraint ) ? "allnames=*" : constraint ) ) ; return sb.toString ( ) ; }
Source:
public 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 ; } } ; getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.MaxVdsMemOverCommit , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public void getDataCenterMaxNameLength ( 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 ) ) : 1 ; } } ; getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.StoragePoolNameSizeLimit , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
public boolean eval ( org.ovirt.engine.core.common.businessentities.network.Network n ) { return ( ( n.getname ( ) . trim ( ) . toLowerCase ( ) . equals ( getNetworkName ( ) . trim ( ) . toLowerCase ( ) ) ) && ( ! ( n.getId ( ) . equals ( getNetwork ( ) . getId ( ) ) ) ) ) && ( getNetwork ( ) . getstorage_pool_id ( ) . equals ( n.getstorage_pool_id ( ) ) ) ; }

Target:
public boolean eval ( org.ovirt.engine.core.common.businessentities.network.Network n ) { return ( ( n.getname ( ) . trim ( ) . toLowerCase ( ) . equals ( getNetworkName ( ) . trim ( ) . toLowerCase ( ) ) ) && ( ! ( n.getId ( ) . equals ( getNetwork ( ) . getId ( ) ) ) ) ) && ( getNetwork ( ) . getDataCenterId ( ) . equals ( n.getDataCenterId ( ) ) ) ; }
Source:
public void testConnectionWithInvalidMountOptionsFails ( ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections newPosixConnection = createPosixConnection ( "multipass.my.domain.tlv.company.com:/export/allstorage/data1" , StorageType.NFS , "nfs" , "timeo=30" ) ; parameters.setStorageServerConnection ( newPosixConnection ) ; parameters.setVdsId ( Guid.Empty ) ; org.mockito.Mockito.doReturn ( new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.VALIDATION_STORAGE_CONNECTION_MOUNT_OPTIONS_CONTAINS_MANAGED_PROPERTY ) ) . when ( getCommand ( ) ) . validateMountOptions ( ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( getCommand ( ) , EngineMessage.VALIDATION_STORAGE_CONNECTION_MOUNT_OPTIONS_CONTAINS_MANAGED_PROPERTY ) ; }

Target:
public void testConnectionWithInvalidMountOptionsFails ( ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections newPosixConnection = createPosixConnection ( "multipass.my.domain.tlv.company.com:/export/allstorage/data1" , StorageType.NFS , "nfs" , "timeo=30" ) ; parameters.setStorageServerConnection ( newPosixConnection ) ; parameters.setVdsId ( Guid.Empty ) ; org.mockito.Mockito.doReturn ( new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.VALIDATION_STORAGE_CONNECTION_MOUNT_OPTIONS_CONTAINS_MANAGED_PROPERTY ) ) . when ( getCommand ( ) ) . validateMountOptions ( ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( getCommand ( ) , EngineMessage.VALIDATION_STORAGE_CONNECTION_MOUNT_OPTIONS_CONTAINS_MANAGED_PROPERTY ) ; }
Source:
public void testFileLinks ( ) throws java.lang.Exception { org.ovirt.engine.api.model.File file = new org.ovirt.engine.api.model.File ( ) ; file.setId ( org.ovirt.engine.api.restapi.util.LinkHelperTest.FILE_ID ) ; file.setStorageDomain ( new org.ovirt.engine.api.model.StorageDomain ( ) ) ; file.getStorageDomain ( ) . setId ( org.ovirt.engine.api.restapi.util.LinkHelperTest.STORAGE_DOMAIN_ID ) ; org.ovirt.engine.api.restapi.util.LinkHelper.addLinks ( file ) ; assertEquals ( org.ovirt.engine.api.restapi.util.LinkHelperTest.FILE_HREF , file.getHref ( ) ) ; }

Target:
public void testFileLinks ( ) throws java.lang.Exception { org.ovirt.engine.api.model.File file = new org.ovirt.engine.api.model.File ( ) ; file.setId ( org.ovirt.engine.api.restapi.util.LinkHelperTest.FILE_ID ) ; file.setStorageDomain ( new org.ovirt.engine.api.model.StorageDomain ( ) ) ; file.getStorageDomain ( ) . setId ( org.ovirt.engine.api.restapi.util.LinkHelperTest.STORAGE_DOMAIN_ID ) ; org.ovirt.engine.api.restapi.util.LinkHelper.addLinks ( file ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.api.restapi.util.LinkHelperTest.FILE_HREF , file.getHref ( ) ) ; }
Source:
public org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity getEntity ( ) { return ( ( org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity ) ( super . getEntity ( ) ) ) ; }

Target:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { if ( cModel == null ) { return ; } else { cModel.stopProgress ( ) ; if ( ! ( result.getReturnValue ( ) . getSucceeded ( ) ) ) { cModel.setMessage ( result.getReturnValue ( ) . getFault ( ) . getMessage ( ) ) ; } else { setWindow ( null ) ; } } }
Source:
public org.ovirt.engine.sdk.decorators.HostNICLabel add ( org.ovirt.engine.sdk.decorators.Label label ) throws java.io.IOException , org.apache.http.client.ClientProtocolException , org.ovirt.engine.sdk.exceptions.ServerException { java.lang.String url = ( ( this . parent.getHref ( ) ) + ( SLASH ) ) + ( getName ( ) ) ; org.ovirt.engine.sdk.utils.HttpHeaderBuilder headersBuilder = new org.ovirt.engine.sdk.utils.HttpHeaderBuilder ( ) ; java.util.List < org.apache.http.Header > headers = headersBuilder.build ( ) ; org.ovirt.engine.sdk.utils.UrlBuilder urlBuilder = new org.ovirt.engine.sdk.utils.UrlBuilder ( url ) ; url = urlBuilder.build ( ) ; return getProxy ( ) . add ( url , label , org.ovirt.engine.sdk.entities.Label.class , org.ovirt.engine.sdk.decorators.HostNICLabel.class , headers ) ; }

Target:
public org.ovirt.engine.sdk.decorators.HostHostNicLabel add ( org.ovirt.engine.sdk.decorators.Label label ) throws java.io.IOException , org.apache.http.client.ClientProtocolException , org.ovirt.engine.sdk.exceptions.ServerException { java.lang.String url = ( ( this . parent.getHref ( ) ) + ( SLASH ) ) + ( getName ( ) ) ; org.ovirt.engine.sdk.utils.HttpHeaderBuilder headersBuilder = new org.ovirt.engine.sdk.utils.HttpHeaderBuilder ( ) ; java.util.List < org.apache.http.Header > headers = headersBuilder.build ( ) ; org.ovirt.engine.sdk.utils.UrlBuilder urlBuilder = new org.ovirt.engine.sdk.utils.UrlBuilder ( url ) ; url = urlBuilder.build ( ) ; return getProxy ( ) . add ( url , label , org.ovirt.engine.sdk.entities.Label.class , org.ovirt.engine.sdk.decorators.HostHostNicLabel.class , headers ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.ServerCpu getVdsGroupServerCpu ( org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterModel model , org.ovirt.engine.core.common.businessentities.VDSGroup vdsGroup ) { org.ovirt.engine.core.common.businessentities.ServerCpu retVal = null ; for ( org.ovirt.engine.core.common.businessentities.ServerCpu cpu : model.getCPU ( ) . getItems ( ) ) { if ( java.util.Objects.equals ( cpu.getCpuName ( ) , vdsGroup.getCpuName ( ) ) ) { retVal = cpu ; break ; } } return retVal ; }

Target:
protected void onActionSucceeded ( org.ovirt.engine.core.compat.Guid macPoolId ) { org.ovirt.engine.core.common.businessentities.MacPool macPool = getEntity ( ) ; macPool.setId ( macPoolId ) ; java.util.Collection < org.ovirt.engine.core.common.businessentities.MacPool > macPools = new java.util.ArrayList ( clusterModel.getMacPoolListModel ( ) . getItems ( ) ) ; macPools.add ( macPool ) ; clusterModel.getMacPoolListModel ( ) . setItems ( macPools ) ; clusterModel.getMacPoolListModel ( ) . setSelectedItem ( macPool ) ; this . setConfirmWindow ( null ) ; }
Source:
public void testBlockingHostedEngineEditing ( ) { org.ovirt.engine.core.bll.UpdateVmCommandTest.mcr.mockConfigValue ( ConfigValues.AllowEditingHostedEngine , false ) ; vmStatic.setOrigin ( OriginType.MANAGED_HOSTED_ENGINE ) ; boolean validInput = command.validateInputs ( ) ; org.junit.Assert.assertThat ( validInput , org.hamcrest.core.Is.is ( false ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getValidationMessages ( ) . contains ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_EDITING_HOSTED_ENGINE_IS_DISABLED.name ( ) ) ) ; }

Target:
public void testBlockingHostedEngineEditing ( ) { vmStatic.setOrigin ( OriginType.MANAGED_HOSTED_ENGINE ) ; boolean validInput = command.validateInputs ( ) ; org.hamcrest.MatcherAssert.assertThat ( validInput , org.hamcrest.core.Is.is ( false ) ) ; org.junit.jupiter.api.Assertions.assertTrue ( command.getReturnValue ( ) . getValidationMessages ( ) . contains ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_EDITING_HOSTED_ENGINE_IS_DISABLED.name ( ) ) ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.ServerConnectionStatusReturnForXmlRpc validateStorageServerConnection ( int serverType , java.lang.String spUUID , java.util.Map < java.lang.String , java.lang.String > [ ] args ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.validateStorageServerConnection ( serverType , spUUID , args ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.ServerConnectionStatusReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.ServerConnectionStatusReturnForXmlRpc ( 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 glusterHookAdd ( java.lang.String glusterCommand , java.lang.String stage , java.lang.String hookName , java.lang.String content , java.lang.String checksum , java.lang.Boolean enabled ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.glusterHookAdd ( glusterCommand , stage , hookName , content , checksum , enabled ) ; 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 void perform ( ) { switch ( getFlow ( ) ) { case RESUME_PAUSE : resumeVm ( ) ; break ; case REMOVE_STATELESS_IMAGES : removeVmStatlessImages ( ) ; break ; case CREATE_STATELESS_IMAGES : statelessVmTreatment ( ) ; break ; case RESUME_HIBERNATE : case RUN : default : runVm ( ) ; } }

Target:
protected void perform ( ) { switch ( getFlow ( ) ) { case RESUME_PAUSE : resumeVm ( ) ; break ; case REMOVE_STATELESS_IMAGES : removeVmStatlessImages ( ) ; break ; case CREATE_STATELESS_IMAGES : createVmStatelessImages ( ) ; break ; case RESUME_HIBERNATE : case RUN : default : runVm ( ) ; } }
Source:
public void customPropertiesNetworkRemoved ( ) { mockExistingNetworks ( ) ; org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface = createNic ( "eth0" , org.ovirt.engine.core.bll.network.host.SetupNetworksHelperTest.MANAGEMENT_NETWORK_NAME ) ; iface.setCustomProperties ( createCustomProperties ( ) ) ; mockExistingIfaces ( iface ) ; iface.setNetworkName ( null ) ; org.ovirt.engine.core.bll.network.host.SetupNetworksHelper helper = createHelper ( createParametersForNics ( iface ) , Version.v3_5 ) ; validateAndAssertNetworkRemoved ( helper , org.ovirt.engine.core.bll.network.host.SetupNetworksHelperTest.MANAGEMENT_NETWORK_NAME ) ; }

Target:
public void qosValuesModified ( ) { org.ovirt.engine.core.common.businessentities.network.Network network = createNetwork ( org.ovirt.engine.core.bll.network.host.SetupNetworksHelperTest.MANAGEMENT_NETWORK_NAME ) ; org.ovirt.engine.core.bll.network.host.SetupNetworksHelper helper = qosValuesTest ( network , createQos ( ) ) ; validateAndAssertNetworkModified ( helper , network ) ; }
Source:
protected boolean canDoAction ( ) { if ( ! ( checkRemoveEditValidations ( ) ) ) { return false ; } if ( ( org.ovirt.engine.core.bll.scheduling.SchedulingManager.getInstance ( ) . getClustersByClusterPolicyId ( getParameters ( ) . getClusterPolicyId ( ) ) . size ( ) ) > 0 ) { return failCanDoAction ( VdcBllMessages.ACTION_TYPE_FAILED_CLUSTER_POLICY_INUSE , java.lang.String.format ( "$clusters %1$s" , clustersListIntoTokenizedString ( ) ) ) ; } return true ; }

Target:
protected boolean canDoAction ( ) { if ( ! ( checkRemoveEditValidations ( ) ) ) { return false ; } if ( ( org.ovirt.engine.core.bll.scheduling.SchedulingManager.getInstance ( ) . getClustersByClusterPolicyId ( getParameters ( ) . getClusterPolicyId ( ) ) . size ( ) ) > 0 ) { return failCanDoAction ( EngineMessage.ACTION_TYPE_FAILED_CLUSTER_POLICY_INUSE , java.lang.String.format ( "$clusters %1$s" , clustersListIntoTokenizedString ( ) ) ) ; } return true ; }
Source:
public void canDoActionFailsOnNoConflictServers ( ) { cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.gluster.UpdateGlusterHookCommand ( new org.ovirt.engine.core.common.action.gluster.GlusterHookManageParameters ( HOOK_ID ) ) ) ; org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity hook = getHookEntity ( ) ; hook.setServerHooks ( java.util.Collections.singletonList ( getGlusterServerHook ( 0 , GlusterHookStatus.MISSING ) ) ) ; setUpMocksForUpdate ( true , hook ) ; org.junit.Assert.assertFalse ( cmd.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( cmd.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( EngineMessage.ACTION_TYPE_FAILED_GLUSTER_HOOK_NO_CONFLICT_SERVERS.toString ( ) ) ) ; }

Target:
public void validateFailsOnNoConflictServers ( ) { cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.gluster.UpdateGlusterHookCommand ( new org.ovirt.engine.core.common.action.gluster.GlusterHookManageParameters ( HOOK_ID ) ) ) ; org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity hook = getHookEntity ( ) ; hook.setServerHooks ( java.util.Collections.singletonList ( getGlusterServerHook ( 0 , GlusterHookStatus.MISSING ) ) ) ; setUpMocksForUpdate ( true , hook ) ; org.junit.Assert.assertFalse ( cmd.validate ( ) ) ; org.junit.Assert.assertTrue ( cmd.getReturnValue ( ) . getValidationMessages ( ) . contains ( EngineMessage.ACTION_TYPE_FAILED_GLUSTER_HOOK_NO_CONFLICT_SERVERS.toString ( ) ) ) ; }
Source:
public static void getDataCenterById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetStoragePoolById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) , aQuery ) ; }

Target:
public static void getClusterGlusterServices ( 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 ; } } ; org.ovirt.engine.core.common.queries.gluster.GlusterVolumeAdvancedDetailsParameters parameters = new org.ovirt.engine.core.common.queries.gluster.GlusterVolumeAdvancedDetailsParameters ( clusterId , null , null , false ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterVolumeAdvancedDetails , parameters , aQuery ) ; }
Source:
protected int getMaxClonedNameLength ( java.lang.Object object ) { org.ovirt.engine.core.common.businessentities.VM vm = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.ImportVmData ) ( object ) ) . getVm ( ) ; return org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . isWindowsOsType ( vm.getOs ( ) ) ? org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getMaxVmNameLengthWin ( ) : org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getMaxVmNameLengthNonWin ( ) ; }

Target:
protected void executeDiskModifications ( org.ovirt.engine.core.compat.Guid vmId , org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel model ) { org.ovirt.engine.ui.uicommonweb.models.vms.VmListModel.getcurrentVm ( ) . setId ( vmId ) ; model.getInstanceImages ( ) . executeDiskModifications ( org.ovirt.engine.ui.uicommonweb.models.vms.VmListModel.getcurrentVm ( ) ) ; }
Source:
protected void callbackConnected ( ) { java.lang.String fingerprint = hkvVerifier.getServerFingerprint ( ) ; if ( fingerprint == null ) { fingerprint = "Unknown" ; org.ovirt.engine.core.utils.hostinstall.VdsInstallerSSH.log.error ( "Unable to get host fingerprint!" ) ; } if ( haveCallback ( ) ) { callback.AddMessage ( java.lang.String.format ( "<BSTRAP component='RHEV_INSTALL' status='OK' message='Connected to Host %s with SSH key fingerprint: %s'/>" , host , fingerprint ) ) ; callback.Connected ( ) ; } }

Target:
protected void callbackConnected ( ) { java.lang.String fingerprint = hkvVerifier.getServerFingerprint ( ) ; if ( fingerprint == null ) { fingerprint = "Unknown" ; org.ovirt.engine.core.utils.hostinstall.VdsInstallerSSH.log.error ( "Unable to get host fingerprint!" ) ; } if ( haveCallback ( ) ) { callback.addMessage ( java.lang.String.format ( "<BSTRAP component='RHEV_INSTALL' status='OK' message='Connected to Host %s with SSH key fingerprint: %s'/>" , host , fingerprint ) ) ; callback.connected ( ) ; } }
Source:
public static void getMaximalVmMemSize32OS ( 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 ( ) : 20480 ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.VM32BitMaxMemorySizeInMB , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public static void getMaxNumOfVmCpus ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String version ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) . intValue ( ) : 1 ; } } ; org.ovirt.engine.core.common.queries.GetConfigurationValueParameters tempVar = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.MaxNumOfVmCpus ) ; tempVar.setVersion ( version ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( tempVar , aQuery ) ; }
Source:
public void getAllAttachableDisks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , 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 != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.Disk > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.Disk > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetAllAttachableDisksForVmQueryParameters params = new org.ovirt.engine.core.common.queries.GetAllAttachableDisksForVmQueryParameters ( storagePoolId ) ; params.setVmId ( vmId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllAttachableDisksForVm , params , aQuery ) ; }

Target:
public void getGlusterHooks ( org.ovirt.engine.ui.frontend.AsyncQuery < java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity > > aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.ListConverter < > ( ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterHooks , new org.ovirt.engine.core.common.queries.gluster.GlusterParameters ( clusterId ) , aQuery ) ; }
Source:
public static void getVmSnapshotList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllVmSnapshotsByVmId , new org.ovirt.engine.core.common.queries.GetAllVmSnapshotsByVmIdParameters ( id ) , aQuery ) ; }

Target:
public static void getVmsRunningOnOrMigratingToVds ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmsRunningOnOrMigratingToVds , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
public void PostOnSaveInternal ( org.ovirt.engine.core.common.action.VdcReturnValueBase returnValue ) { org.ovirt.engine.ui.uicommonweb.models.datacenters.DataCenterModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.datacenters.DataCenterModel ) ( getWindow ( ) ) ) ; model.StopProgress ( ) ; Cancel ( ) ; if ( ( ( model.getIsNew ( ) ) && ( returnValue != null ) ) && ( returnValue.getSucceeded ( ) ) ) { setGuideContext ( returnValue.getActionReturnValue ( ) ) ; UpdateActionAvailability ( ) ; getGuideCommand ( ) . Execute ( ) ; } }

Target:
public void postOnSaveInternal ( org.ovirt.engine.core.common.action.VdcReturnValueBase returnValue ) { org.ovirt.engine.ui.uicommonweb.models.datacenters.DataCenterModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.datacenters.DataCenterModel ) ( getWindow ( ) ) ) ; model.stopProgress ( ) ; cancel ( ) ; if ( ( ( model.getIsNew ( ) ) && ( returnValue != null ) ) && ( returnValue.getSucceeded ( ) ) ) { setGuideContext ( returnValue.getActionReturnValue ( ) ) ; updateActionAvailability ( ) ; getGuideCommand ( ) . execute ( ) ; } }
Source:
public void initUserAndGroupData ( ) { if ( ( dbUser ) == null ) { dbUser = org.ovirt.engine.core.bll.PermissionsCommandBase.getDbUserDAO ( ) . get ( org.ovirt.engine.core.bll.PermissionsCommandBase.getParameters ( ) . getPermission ( ) . getad_element_id ( ) ) ; } if ( ( ( dbUser ) == null ) && ( ( dbGroup ) == null ) ) { dbGroup = org.ovirt.engine.core.bll.PermissionsCommandBase.getAdGroupDAO ( ) . get ( org.ovirt.engine.core.bll.PermissionsCommandBase.getParameters ( ) . getPermission ( ) . getad_element_id ( ) ) ; } }

Target:
public void initUserAndGroupData ( ) { if ( ( dbUser ) == null ) { dbUser = org.ovirt.engine.core.bll.PermissionsCommandBase.getDbUserDAO ( ) . get ( org.ovirt.engine.core.bll.PermissionsCommandBase.getParameters ( ) . getPermission ( ) . getAdElementId ( ) ) ; } if ( ( ( dbUser ) == null ) && ( ( dbGroup ) == null ) ) { dbGroup = org.ovirt.engine.core.bll.PermissionsCommandBase.getAdGroupDAO ( ) . get ( org.ovirt.engine.core.bll.PermissionsCommandBase.getParameters ( ) . getPermission ( ) . getAdElementId ( ) ) ; } }
Source:
public static boolean isDisplayTypeSupported ( int osId , org.ovirt.engine.core.compat.Version version , org.ovirt.engine.core.common.businessentities.DisplayType defaultDisplayType ) { return org.ovirt.engine.core.bll.validator.VmValidationUtils.getOsRepository ( ) . getDisplayTypes ( ) . get ( osId ) . get ( version ) . contains ( defaultDisplayType ) ; }

Target:
public static boolean isGraphicsAndDisplaySupported ( int osId , org.ovirt.engine.core.compat.Version version , java.util.Collection < org.ovirt.engine.core.common.businessentities.GraphicsType > graphics , org.ovirt.engine.core.common.businessentities.DisplayType displayType ) { for ( org.ovirt.engine.core.common.businessentities.GraphicsType graphicType : graphics ) { if ( ! ( org.ovirt.engine.core.bll.validator.VmValidationUtils.getOsRepository ( ) . getGraphicsAndDisplays ( ) . get ( osId ) . get ( version ) . contains ( new org.ovirt.engine.core.common.utils.Pair ( graphicType , displayType ) ) ) ) { return false ; } } return true ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc copyData ( java.lang.String jobId , java.util.Map src , java.util.Map dst ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "SDM.copy_data" ) . withParameter ( "source" , src ) . withParameter ( "destination" , dst ) . withParameter ( "job_id" , jobId ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( response ) ; }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturn copyData ( java.lang.String jobId , java.util.Map src , java.util.Map dst ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "SDM.copy_data" ) . withParameter ( "source" , src ) . withParameter ( "destination" , dst ) . withParameter ( "job_id" , jobId ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturn ( response ) ; }
Source:
public org.ovirt.engine.api.resource.AssignedCpuProfilesResource getCpuProfilesResource ( ) { return inject ( new org.ovirt.engine.api.restapi.resource.BackendAssignedCpuProfilesResource ( id ) ) ; }

Target:
public org.ovirt.engine.core.common.action.VdcActionParametersBase getParameters ( org.ovirt.engine.api.model.Cluster incoming , org.ovirt.engine.core.common.businessentities.VDSGroup entity ) { final org.ovirt.engine.core.common.businessentities.VDSGroup cluster = map ( incoming , entity ) ; final org.ovirt.engine.core.common.action.ManagementNetworkOnClusterOperationParameters managementNetworkOnClusterOperationParameters ; final org.ovirt.engine.core.compat.Guid dcId = getDataCenterId ( cluster ) ; if ( dcId == null ) { managementNetworkOnClusterOperationParameters = new org.ovirt.engine.core.common.action.ManagementNetworkOnClusterOperationParameters ( cluster ) ; } else { final org.ovirt.engine.core.compat.Guid managementNetworkId = managementNetworkFinder.getManagementNetworkId ( incoming , dcId ) ; managementNetworkOnClusterOperationParameters = new org.ovirt.engine.core.common.action.ManagementNetworkOnClusterOperationParameters ( cluster , managementNetworkId ) ; } return managementNetworkOnClusterOperationParameters ; }
Source:
public java.util.List < org.ovirt.engine.core.common.job.StepSubjectEntity > getCommandStepSubjectEntities ( ) { if ( ( ( org.ovirt.engine.core.bll.storage.disk.image.CopyDataCommand.getParameters ( ) . getJobWeight ( ) ) != null ) && ( ( org.ovirt.engine.core.bll.storage.disk.image.CopyDataCommand.getParameters ( ) . getDstInfo ( ) ) instanceof org.ovirt.engine.core.common.businessentities.VdsmImageLocationInfo ) ) { return java.util.Collections.singletonList ( new org.ovirt.engine.core.common.job.StepSubjectEntity ( org.ovirt.engine.core.common.VdcObjectType.Disk , ( ( org.ovirt.engine.core.common.businessentities.VdsmImageLocationInfo ) ( org.ovirt.engine.core.bll.storage.disk.image.CopyDataCommand.getParameters ( ) . getDstInfo ( ) ) ) . getImageGroupId ( ) , org.ovirt.engine.core.bll.storage.disk.image.CopyDataCommand.getParameters ( ) . getJobWeight ( ) ) ) ; } return null ; }

Target:
public org.ovirt.engine.core.common.businessentities.HostJobInfo.HostJobStatus poll ( ) { if ( isDstVdsmImage ( ) ) { org.ovirt.engine.core.common.businessentities.VdsmImageLocationInfo info = ( ( org.ovirt.engine.core.common.businessentities.VdsmImageLocationInfo ) ( org.ovirt.engine.core.bll.storage.disk.image.CopyDataCommand.getParameters ( ) . getDstInfo ( ) ) ) ; return poller.pollImage ( org.ovirt.engine.core.bll.storage.disk.image.CopyDataCommand.getParameters ( ) . getStoragePoolId ( ) , info.getStorageDomainId ( ) , info.getImageGroupId ( ) , info.getImageId ( ) , info.getGeneration ( ) , org.ovirt.engine.core.bll.storage.disk.image.CopyDataCommand.getCommandId ( ) , org.ovirt.engine.core.bll.storage.disk.image.CopyDataCommand.getActionType ( ) ) ; } return null ; }
Source:
public void updateAllDiskImageDynamicWithDiskIdByVmId ( java.util.Collection < org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.storage.DiskImageDynamic > > diskImageDynamicForVm ) { java.util.List < org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.storage.DiskImageDynamic > > sortedDisks = new java.util.ArrayList < > ( ) ; sortedDisks.addAll ( diskImageDynamicForVm ) ; java.util.Collections.sort ( sortedDisks , new org.ovirt.engine.core.common.utils.PairFirstComparator ( new org.ovirt.engine.core.common.utils.NaturalOrderComparator ( ) ) ) ; getCallsHandler ( ) . executeStoredProcAsBatch ( "Updatedisk_image_dynamic_by_disk_id_and_vm_id" , sortedDisks , getBatchImageGroupMapper ( ) ) ; }

Target:
public void updateAllDiskImageDynamicWithDiskIdByVmId ( java.util.Collection < org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.storage.DiskImageDynamic > > diskImageDynamicForVm ) { getCallsHandler ( ) . executeStoredProcAsBatch ( "Updatedisk_image_dynamic_by_disk_id_and_vm_id" , org.ovirt.engine.core.dao.DiskImageDynamicDaoImpl.sortDiskImageDynamicForUpdate ( diskImageDynamicForVm ) , getBatchImageGroupMapper ( ) ) ; }
Source:
public java.util.Map < java.lang.String , java.lang.String > getJobMessageProperties ( ) { if ( ( jobProperties ) == null ) { jobProperties = super . getJobMessageProperties ( ) ; jobProperties.put ( "repoimagename" , ( ( getDiskImage ( ) ) != null ? getDiskImage ( ) . getDiskAlias ( ) : "" ) ) ; } return jobProperties ; }

Target:
public java.lang.String getRepoImageName ( ) { return ( getDiskImage ( ) ) != null ? getDiskImage ( ) . getDiskAlias ( ) : "" ; }
Source:
private org.ovirt.engine.core.common.vdscommands.ImageActionsVDSCommandParameters getPrepareTeardownParameters ( org.ovirt.engine.core.compat.Guid vdsId ) { return new org.ovirt.engine.core.common.vdscommands.ImageActionsVDSCommandParameters ( vdsId , org.ovirt.engine.core.bll.storage.disk.image.UploadDiskImageCommand.getStoragePool ( ) . getId ( ) , org.ovirt.engine.core.bll.storage.disk.image.UploadDiskImageCommand.getStorageDomainId ( ) , org.ovirt.engine.core.bll.storage.disk.image.UploadDiskImageCommand.getImage ( ) . getImage ( ) . getDiskId ( ) , org.ovirt.engine.core.bll.storage.disk.image.UploadDiskImageCommand.getImage ( ) . getImageId ( ) ) ; }

Target:
protected org.ovirt.engine.core.common.vdscommands.ImageActionsVDSCommandParameters getImageActionsParameters ( org.ovirt.engine.core.compat.Guid vdsId ) { return new org.ovirt.engine.core.common.vdscommands.ImageActionsVDSCommandParameters ( vdsId , org.ovirt.engine.core.bll.storage.disk.image.UploadDiskImageCommand.getStoragePool ( ) . getId ( ) , org.ovirt.engine.core.bll.storage.disk.image.UploadDiskImageCommand.getStorageDomainId ( ) , org.ovirt.engine.core.bll.storage.disk.image.UploadDiskImageCommand.getImage ( ) . getImage ( ) . getDiskId ( ) , org.ovirt.engine.core.bll.storage.disk.image.UploadDiskImageCommand.getImage ( ) . getImageId ( ) ) ; }
Source:
public java.lang.String toString ( ) { java.lang.StringBuilder sb = new java.lang.StringBuilder ( ) ; try { walkTree ( sb , preferences ) ; } catch ( java.util.prefs.BackingStoreException e ) { org.ovirt.engine.core.utils.OsRepositoryImpl.log.error ( e.getStackTrace ( ) ) ; } return sb.toString ( ) ; }

Target:
public java.lang.String toString ( ) { java.lang.StringBuilder sb = new java.lang.StringBuilder ( ) ; try { walkTree ( sb , preferences ) ; } catch ( java.util.prefs.BackingStoreException e ) { org.ovirt.engine.core.utils.OsRepositoryImpl.log.error ( "Error traversing OS tree: {}" , e.getMessage ( ) ) ; org.ovirt.engine.core.utils.OsRepositoryImpl.log.debug ( "Exception" , e ) ; } return sb.toString ( ) ; }
Source:
public java.lang.String getCustomToolTip ( ) { if ( ( ! ( getModel ( ) . getIsCloneVmSupported ( ) ) ) && ( ( getModel ( ) . getEntity ( ) ) != null ) ) { org.ovirt.engine.core.common.queries.CommandVersionsInfo commandVersionsInfo = org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetCommandVersionsInfo ( VdcActionType.AddVmFromSnapshot ) ; java.lang.String minimalClusterVersion = ( commandVersionsInfo != null ) ? commandVersionsInfo.getClusterVersion ( ) . toString ( 2 ) : "" ; return org.ovirt.engine.core.compat.StringFormat.format ( constants.cloneVmNotSupported ( ) , minimalClusterVersion ) ; } else { return this . getTitle ( ) ; } }

Target:
protected org.ovirt.engine.ui.uicommonweb.UICommand resolveCommand ( ) { return getModel ( ) . getRemoveCommand ( ) ; }