auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public java.net.Socket createSocket ( java.net.Socket socket , java.lang.String host , int port , boolean autoClose ) throws java.io.IOException , java.net.UnknownHostException { javax.net.ssl.SSLSocket sslSocket = ( ( javax.net.ssl.SSLSocket ) ( sslcontext.getSocketFactory ( ) . createSocket ( socket , host , port , autoClose ) ) ) ; sslSocket.setEnabledProtocols ( new java.lang.String [ ] { "SSLv3" } ) ; return sslSocket ; }

Target:
public java.net.Socket createSocket ( java.net.Socket socket , java.lang.String host , int port , boolean autoClose ) throws java.io.IOException , java.net.UnknownHostException { javax.net.ssl.SSLSocket sslSocket = ( ( javax.net.ssl.SSLSocket ) ( sslcontext.getSocketFactory ( ) . createSocket ( socket , host , port , autoClose ) ) ) ; sslSocket.setEnabledProtocols ( new java.lang.String [ ] { this . protocol } ) ; return sslSocket ; }
Source:
protected void executeQueryCommand ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VM > vmsList = org.ovirt.engine.core.bll.GetAllVmsQuery.getDbFacade ( ) . getVmDao ( ) . getAll ( org.ovirt.engine.core.bll.GetAllVmsQuery.getUserID ( ) , org.ovirt.engine.core.bll.GetAllVmsQuery.getParameters ( ) . isFiltered ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.VM vm : vmsList ) { org.ovirt.engine.core.bll.VmHandler.UpdateVmGuestAgentVersion ( vm ) ; } org.ovirt.engine.core.bll.GetAllVmsQuery.getQueryReturnValue ( ) . setReturnValue ( vmsList ) ; }

Target:
protected void executeQueryCommand ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VM > vmsList = org.ovirt.engine.core.bll.GetAllVmsQuery.getDbFacade ( ) . getVmDao ( ) . getAll ( org.ovirt.engine.core.bll.GetAllVmsQuery.getUserID ( ) , org.ovirt.engine.core.bll.GetAllVmsQuery.getParameters ( ) . isFiltered ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.VM vm : vmsList ) { org.ovirt.engine.core.bll.VmHandler.updateVmGuestAgentVersion ( vm ) ; } org.ovirt.engine.core.bll.GetAllVmsQuery.getQueryReturnValue ( ) . setReturnValue ( vmsList ) ; }
Source:
private java.lang.String getPrintableDomainsList ( ) { java.lang.StringBuilder sb = new java.lang.StringBuilder ( ) ; for ( org.ovirt.engine.core.common.businessentities.StoragePoolIsoMap map : getDomainsList ( ) ) { sb.append ( "{ domainId: " ) ; sb.append ( map.getstorage_id ( ) ) ; sb.append ( ", status: " ) ; sb.append ( map.getStatus ( ) . name ( ) ) ; sb.append ( " };" ) ; } return sb.toString ( ) ; }

Target:
protected org.ovirt.engine.core.common.utils.ToStringBuilder appendAttributes ( org.ovirt.engine.core.common.utils.ToStringBuilder tsb ) { return super . appendAttributes ( tsb ) . append ( "vdsSpmId" , getVdsSpmId ( ) ) . append ( "storagePoolId" , getStoragePoolId ( ) ) . append ( "storagePoolName" , getStoragePoolName ( ) ) . append ( "masterDomainId" , getMasterDomainId ( ) ) . append ( "masterVersion" , getMasterVersion ( ) ) . append ( "domainsList" , getDomainsList ( ) ) ; }
Source:
protected org.ovirt.engine.core.common.businessentities.StorageServerConnections createISCSIConnection ( java.lang.String connection , org.ovirt.engine.core.common.businessentities.StorageType type , java.lang.String iqn , java.lang.String port , java.lang.String user , java.lang.String password ) { org.ovirt.engine.core.compat.Guid id = getConnectionId ( ) ; org.ovirt.engine.core.common.businessentities.StorageServerConnections connectionDetails = populateBasicConnectionDetails ( id , connection , type ) ; connectionDetails.setiqn ( iqn ) ; connectionDetails.setport ( port ) ; connectionDetails.setuser_name ( user ) ; connectionDetails.setpassword ( password ) ; return connectionDetails ; }

Target:
protected org.ovirt.engine.core.common.businessentities.StorageServerConnections createISCSIConnection ( java.lang.String connection , org.ovirt.engine.core.common.businessentities.storage.StorageType type , java.lang.String iqn , java.lang.String port , java.lang.String user , java.lang.String password ) { org.ovirt.engine.core.compat.Guid id = getConnectionId ( ) ; org.ovirt.engine.core.common.businessentities.StorageServerConnections connectionDetails = populateBasicConnectionDetails ( id , connection , type ) ; connectionDetails.setiqn ( iqn ) ; connectionDetails.setport ( port ) ; connectionDetails.setuser_name ( user ) ; connectionDetails.setpassword ( password ) ; return connectionDetails ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc registerSecrets ( java.util.Map < java.lang.String , java.lang.String > [ ] libvirtSecrets ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.registerSecrets ( libvirtSecrets ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( xmlRpcReturnValue ) ; } 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 registerSecrets ( java.util.Map < java.lang.String , java.lang.String > [ ] libvirtSecrets , boolean clearUnusedSecrets ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.registerSecrets ( libvirtSecrets , clearUnusedSecrets ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( xmlRpcReturnValue ) ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
public void getEngineSshPublicKey ( 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.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetEngineSSHPublicKey , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }

Target:
public void getAllowClusterWithVirtGlusterEnabled ( org.ovirt.engine.ui.frontend.AsyncQuery < java.lang.Boolean > aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.DefaultValueConverter < > ( java.lang.Boolean.TRUE ) ; getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.AllowClusterWithVirtGlusterEnabled , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
public void testUpdate ( ) { existingAdGroup.setname ( existingAdGroup.getname ( ) . toUpperCase ( ) ) ; existingAdGroup.setdomain ( existingAdGroup.getdomain ( ) . toUpperCase ( ) ) ; existingAdGroup.setstatus ( AdRefStatus.Inactive ) ; dao.update ( existingAdGroup ) ; org.ovirt.engine.core.common.businessentities.ad_groups result = dao.get ( existingAdGroup.getid ( ) ) ; assertNotNull ( result ) ; assertEquals ( existingAdGroup , result ) ; }

Target:
public void testUpdate ( ) { existingAdGroup.setname ( existingAdGroup.getname ( ) . toUpperCase ( ) ) ; existingAdGroup.setdomain ( existingAdGroup.getdomain ( ) . toUpperCase ( ) ) ; existingAdGroup.setstatus ( AdRefStatus.Inactive ) ; dao.update ( existingAdGroup ) ; org.ovirt.engine.core.common.businessentities.LdapGroup result = dao.get ( existingAdGroup.getid ( ) ) ; assertNotNull ( result ) ; assertEquals ( existingAdGroup , result ) ; }
Source:
public org.ovirt.engine.core.dao.VdsGroupDAO getVdsGroupDAO ( ) { final org.ovirt.engine.core.dao.VdsGroupDAO v = org.mockito.Mockito.mock ( org.ovirt.engine.core.dao.VdsGroupDAO.class ) ; final org.ovirt.engine.core.common.businessentities.VDSGroup g = new org.ovirt.engine.core.common.businessentities.VDSGroup ( ) ; g.setvds_group_id ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID ) ; org.mockito.Mockito.when ( v.get ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID ) ) . thenReturn ( g ) ; return v ; }

Target:
public org.ovirt.engine.core.dao.VdsGroupDAO getVdsGroupDAO ( ) { final org.ovirt.engine.core.dao.VdsGroupDAO v = org.mockito.Mockito.mock ( org.ovirt.engine.core.dao.VdsGroupDAO.class ) ; final org.ovirt.engine.core.common.businessentities.VDSGroup g = new org.ovirt.engine.core.common.businessentities.VDSGroup ( ) ; g.setVdsGroupId ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID ) ; org.mockito.Mockito.when ( v.get ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID ) ) . thenReturn ( g ) ; return v ; }
Source:
protected void executeQueryCommand ( ) { org.ovirt.engine.core.bll.GetVmInterfacesByVmIdQuery.getQueryReturnValue ( ) . setReturnValue ( org.ovirt.engine.core.bll.GetVmInterfacesByVmIdQuery.getDbFacade ( ) . getVmNetworkInterfaceDAO ( ) . getAllForVm ( org.ovirt.engine.core.bll.GetVmInterfacesByVmIdQuery.getParameters ( ) . getId ( ) , org.ovirt.engine.core.bll.GetVmInterfacesByVmIdQuery.getUserID ( ) , org.ovirt.engine.core.bll.GetVmInterfacesByVmIdQuery.getParameters ( ) . isFiltered ( ) ) ) ; }

Target:
protected void executeQueryCommand ( ) { org.ovirt.engine.core.bll.GetVmInterfacesByVmIdQuery.getQueryReturnValue ( ) . setReturnValue ( org.ovirt.engine.core.bll.GetVmInterfacesByVmIdQuery.getDbFacade ( ) . getVmNetworkInterfaceDao ( ) . getAllForVm ( org.ovirt.engine.core.bll.GetVmInterfacesByVmIdQuery.getParameters ( ) . getId ( ) , org.ovirt.engine.core.bll.GetVmInterfacesByVmIdQuery.getUserID ( ) , org.ovirt.engine.core.bll.GetVmInterfacesByVmIdQuery.getParameters ( ) . isFiltered ( ) ) ) ; }
Source:
protected void readOsSection ( org.ovirt.engine.core.compat.backendcompat.XmlNode section ) { _vm.getStaticData ( ) . setId ( new org.ovirt.engine.core.compat.Guid ( section.Attributes.get ( "ovf:id" ) . getValue ( ) ) ) ; org.ovirt.engine.core.compat.backendcompat.XmlNode node = section.SelectSingleNode ( "Description" ) ; if ( node != null ) { _vm.getStaticData ( ) . setOs ( org.ovirt.engine.core.common.businessentities.VmOsType.valueOf ( node.InnerText ) ) ; } else { _vm.getStaticData ( ) . setOs ( VmOsType.Unassigned ) ; } }

Target:
protected void readOsSection ( org.ovirt.engine.core.compat.backendcompat.XmlNode section ) { _vm.getStaticData ( ) . setId ( new org.ovirt.engine.core.compat.Guid ( section.Attributes.get ( "ovf:id" ) . getValue ( ) ) ) ; org.ovirt.engine.core.compat.backendcompat.XmlNode node = section.SelectSingleNode ( "Description" ) ; if ( node != null ) { _vm.getStaticData ( ) . setOsId ( osRepository.getOsIdByUniqueName ( node.InnerText ) ) ; } }
Source:
public void getJobByEntityIdAndActionType ( ) { job.setActionType ( VdcActionType.UpdateVm ) ; java.util.List < org.ovirt.engine.core.common.job.Job > searchedJob = jobRepository.getJobsByEntityAndAction ( Guid.Empty , job.getActionType ( ) ) ; org.junit.Assert.assertNotNull ( searchedJob ) ; org.junit.Assert.assertTrue ( searchedJob.contains ( job ) ) ; }

Target:
public void getJobByEntityIdAndActionType ( ) { job.setActionType ( ActionType.UpdateVm ) ; java.util.List < org.ovirt.engine.core.common.job.Job > searchedJob = jobRepository.getJobsByEntityAndAction ( Guid.Empty , job.getActionType ( ) ) ; org.junit.Assert.assertNotNull ( searchedJob ) ; org.junit.Assert.assertTrue ( searchedJob.contains ( job ) ) ; }
Source:
public java.lang.Void runInTransaction ( ) { getCompensationContext ( ) . snapshotEntity ( masterDomain.getStoragePoolIsoMapData ( ) ) ; masterDomain.setstatus ( StorageDomainStatus.Locked ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStoragePoolIsoMapDao ( ) . update ( masterDomain.getStoragePoolIsoMapData ( ) ) ; getCompensationContext ( ) . stateChanged ( ) ; return null ; }

Target:
public java.lang.Void runInTransaction ( ) { getCompensationContext ( ) . snapshotEntity ( masterDomain.getStorageStaticData ( ) ) ; masterDomain.setstorage_domain_type ( StorageDomainType.Data ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStorageDomainStaticDao ( ) . update ( masterDomain.getStorageStaticData ( ) ) ; getCompensationContext ( ) . stateChanged ( ) ; return null ; }
Source:
public void calculateNetworkImplementationDetailsNetworkQosOutOfSync ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface = createNetworkDevice ( ) ; org.ovirt.engine.core.common.businessentities.network.NetworkQoS qos = createQos ( ) ; qos.setOutboundAverage ( 30 ) ; qos.setOutboundPeak ( 30 ) ; qos.setOutboundBurst ( 30 ) ; calculateNetworkImplementationDetailsAndAssertSync ( iface , false , iface.isBridged ( ) , iface.getMtu ( ) , iface.getVlanId ( ) , qos ) ; }

Target:
public void calculateNetworkImplementationDetailsNetworkQosOverridden ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface = createNetworkDevice ( ) ; iface.setQosOverridden ( true ) ; calculateNetworkImplementationDetailsAndAssertSync ( iface , true , iface.isBridged ( ) , iface.getMtu ( ) , iface.getVlanId ( ) , new org.ovirt.engine.core.common.businessentities.network.HostNetworkQos ( ) ) ; }
Source:
public java.util.List < org.ovirt.engine.core.common.businessentities.profiles.CpuProfile > getAllForCluster ( org.ovirt.engine.core.compat.Guid clusterId , org.ovirt.engine.core.compat.Guid userId , boolean isFiltered ) { return getCallsHandler ( ) . executeReadList ( "GetCpuProfilesByClusterId" , createEntityRowMapper ( ) , getCustomMapSqlParameterSource ( ) . addValue ( "cluster_id" , clusterId ) . addValue ( "user_id" , userId ) . addValue ( "is_filtered" , isFiltered ) ) ; }

Target:
public java.util.List < org.ovirt.engine.core.common.businessentities.profiles.CpuProfile > getAllForCluster ( org.ovirt.engine.core.compat.Guid clusterId , org.ovirt.engine.core.compat.Guid userId , boolean isFiltered , org.ovirt.engine.core.common.businessentities.ActionGroup actionGroup ) { return getCallsHandler ( ) . executeReadList ( "GetCpuProfilesByClusterId" , createEntityRowMapper ( ) , getCustomMapSqlParameterSource ( ) . addValue ( "cluster_id" , clusterId ) . addValue ( "user_id" , userId ) . addValue ( "is_filtered" , isFiltered ) . addValue ( "action_group_id" , actionGroup.getId ( ) ) ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.VM getVM ( org.ovirt.engine.api.model.VmPool model ) { if ( isFiltered ( ) ) { return getEntity ( org.ovirt.engine.core.common.businessentities.VM.class , VdcQueryType.GetVmDataByPoolId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( asGuid ( model.getId ( ) ) ) , model.getId ( ) ) ; } return getEntity ( org.ovirt.engine.core.common.businessentities.VM.class , SearchType.VM , ( "Vms: pool=" + ( model.getName ( ) ) ) ) ; }

Target:
private org.ovirt.engine.core.common.businessentities.VM getVM ( org.ovirt.engine.api.model.VmPool model ) { if ( isFiltered ( ) ) { return getEntity ( org.ovirt.engine.core.common.businessentities.VM.class , VdcQueryType.GetVmDataByPoolId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( asGuid ( model.getId ( ) ) ) , model.getId ( ) ) ; } return getEntity ( org.ovirt.engine.core.common.businessentities.VM.class , VdcQueryType.GetVmDataByPoolName , new org.ovirt.engine.core.common.queries.NameQueryParameters ( model.getName ( ) ) , ( "Vms: pool=" + ( model.getName ( ) ) ) ) ; }
Source:
private boolean networkRequiredOnVds ( org.ovirt.engine.core.common.businessentities.VmNetworkInterface vmIface , java.util.Map < java.lang.String , org.ovirt.engine.core.common.businessentities.Network > networksByName , boolean onlyRequiredNetworks ) { boolean networkRequiredOnVds = true ; if ( ! ( vmIface.isActive ( ) ) ) { networkRequiredOnVds = false ; } else if ( onlyRequiredNetworks ) { networkRequiredOnVds = networksByName.get ( vmIface.getNetworkName ( ) ) . getCluster ( ) . isRequired ( ) ; } return networkRequiredOnVds ; }

Target:
private boolean networkRequiredOnVds ( org.ovirt.engine.core.common.businessentities.VmNetworkInterface vmIface , java.util.Map < java.lang.String , org.ovirt.engine.core.common.businessentities.Network > networksByName , boolean onlyRequiredNetworks ) { boolean networkRequiredOnVds = true ; if ( ! ( vmIface.isPlugged ( ) ) ) { networkRequiredOnVds = false ; } else if ( onlyRequiredNetworks ) { networkRequiredOnVds = networksByName.get ( vmIface.getNetworkName ( ) ) . getCluster ( ) . isRequired ( ) ; } return networkRequiredOnVds ; }
Source:
public static org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface getSlave ( ) { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface entity = new org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface ( ) ; entity.setId ( org.ovirt.engine.api.restapi.resource.BackendHostNicsResourceTest.SLAVE_GUID ) ; entity.setName ( org.ovirt.engine.api.restapi.resource.BackendHostNicsResourceTest.SLAVE_NAME ) ; entity.setNetworkName ( org.ovirt.engine.api.restapi.resource.BackendHostNicsResourceTest.NETWORK_NAME ) ; entity.setBondName ( org.ovirt.engine.api.restapi.resource.BackendHostNicsResourceTest.MASTER_NAME ) ; entity.setBootProtocol ( org.ovirt.engine.api.restapi.resource.BackendHostNicsResourceTest.BOOT_PROTOCOL ) ; return org.ovirt.engine.api.restapi.resource.BackendHostNicsResourceTest.setUpStatistics ( entity , org.ovirt.engine.api.restapi.resource.BackendHostNicsResourceTest.SLAVE_GUID ) ; }

Target:
public static org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface getSlave ( ) { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface entity = new org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface ( ) ; entity.setId ( org.ovirt.engine.api.restapi.resource.BackendHostNicsResourceTest.SLAVE_GUID ) ; entity.setName ( org.ovirt.engine.api.restapi.resource.BackendHostNicsResourceTest.SLAVE_NAME ) ; entity.setNetworkName ( org.ovirt.engine.api.restapi.resource.BackendHostNicsResourceTest.NETWORK_NAME ) ; entity.setSpeed ( org.ovirt.engine.api.restapi.resource.BackendHostNicsResourceTest.NIC_SPEED ) ; entity.setBondName ( org.ovirt.engine.api.restapi.resource.BackendHostNicsResourceTest.MASTER_NAME ) ; entity.setBootProtocol ( org.ovirt.engine.api.restapi.resource.BackendHostNicsResourceTest.BOOT_PROTOCOL ) ; return org.ovirt.engine.api.restapi.resource.BackendHostNicsResourceTest.setUpStatistics ( entity , org.ovirt.engine.api.restapi.resource.BackendHostNicsResourceTest.SLAVE_GUID ) ; }
Source:
public boolean isManaged ( ) { return ( isAttached ( ) ) && ( ( getAttachedToNic ( ) . getEntity ( ) . getNetworkImplementationDetails ( ) ) != null ) ? getAttachedToNic ( ) . getEntity ( ) . getNetworkImplementationDetails ( ) . isManaged ( ) : true ; }

Target:
public org.ovirt.engine.core.common.businessentities.VdsNetworkInterface.NetworkImplementationDetails getNetworkImplementationDetails ( ) { if ( ! ( isAttached ( ) ) ) { return null ; } org.ovirt.engine.core.common.businessentities.VdsNetworkInterface nic = ( hasVlan ( ) ) ? getBridge ( ) . getEntity ( ) : getAttachedToNic ( ) . getEntity ( ) ; return nic.getNetworkImplementationDetails ( ) ; }
Source:
protected org.ovirt.engine.core.bll.ValidationResult vmDuringInitialization ( org.ovirt.engine.core.common.businessentities.VM vm ) { if ( ( ( vm.isRunning ( ) ) || ( ( vm.getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.NotResponding ) ) ) || ( isVmDuringInitiating ( vm ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.ACTION_TYPE_FAILED_VM_IS_RUNNING ) ; } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }

Target:
protected org.ovirt.engine.core.bll.ValidationResult vmDuringInitialization ( org.ovirt.engine.core.common.businessentities.VM vm ) { if ( ( ( vm.isRunning ( ) ) || ( ( vm.getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.NotResponding ) ) ) || ( isVmDuringInitiating ( vm ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_VM_IS_RUNNING ) ; } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }
Source:
private void setUpGetCertuficateExpectations ( int times ) throws java.lang.Exception { for ( int i = 0 ; i < times ; i ++ ) { setUpGetEntityExpectations ( VdcQueryType.GetVdsCertificateSubjectByVmId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ i ] } , org.ovirt.engine.api.restapi.resource.BackendVmsResourceTest.CERTIFICATE ) ; } }

Target:
private void setUpGetCertuficateExpectations ( int times , int index ) throws java.lang.Exception { for ( int i = 0 ; i < times ; i ++ ) { setUpGetEntityExpectations ( VdcQueryType.GetVdsCertificateSubjectByVmId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ index ] } , org.ovirt.engine.api.restapi.resource.BackendVmsResourceTest.CERTIFICATE ) ; } }
Source:
public void onClick ( com.google.gwt.event.dom.client.ClickEvent event ) { if ( ! ( isEditConsoleEnabled ( modelProvider.getModel ( ) . getSelectedItem ( ) ) ) ) { return ; } consolePopup.init ( modelProvider.getModel ( ) ) ; com.gwtplatform.mvp.client.proxy.RevealRootPopupContentEvent.fire ( getEventBus ( ) , consolePopup ) ; }

Target:
public void onClick ( com.google.gwt.event.dom.client.ClickEvent event ) { if ( ! ( isEditConsoleEnabled ( modelProvider.getModel ( ) . getSelectedItem ( ) ) ) ) { return ; } org.ovirt.engine.ui.userportal.section.main.presenter.popup.console.ConsolePopupPresenterWidget consolePopupPresenterWidget = consolePopup.get ( ) ; consolePopupPresenterWidget.init ( modelProvider.getModel ( ) ) ; com.gwtplatform.mvp.client.proxy.RevealRootPopupContentEvent.fire ( getEventBus ( ) , consolePopupPresenterWidget ) ; }
Source:
public void getVmDiskList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId , boolean isRefresh ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { return source ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ( ) ; } } ; org.ovirt.engine.core.common.queries.IdQueryParameters params = new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) ; params.setRefresh ( isRefresh ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllDisksByVmId , params , aQuery ) ; }

Target:
public void getHostListByDataCenter ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid spId ) { 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 org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VDS > cast ( ( ( java.util.List < ? > ) ( source ) ) ) ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllVdsByStoragePool , new org.ovirt.engine.core.common.queries.IdQueryParameters ( spId ) , aQuery ) ; }
Source:
public static void hasSpiceSupport ( int osId , org.ovirt.engine.core.compat.Version version , org.ovirt.engine.ui.frontend.AsyncQuery callback ) { org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.OsRepository , new org.ovirt.engine.core.common.queries.OsQueryParameters ( org.ovirt.engine.core.common.queries.OsQueryParameters.OsRepositoryVerb.HasSpiceSupport , osId , version ) , callback ) ; }

Target:
private static void initDisplayTypes ( ) { org.ovirt.engine.ui.frontend.AsyncQuery callback = new org.ovirt.engine.ui.frontend.AsyncQuery ( ) ; callback.asyncCallback = new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.displayTypes = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.OsRepository , new org.ovirt.engine.core.common.queries.OsQueryParameters ( org.ovirt.engine.core.common.queries.OsQueryParameters.OsRepositoryVerb.GetDisplayTypes ) , callback ) ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult qosExistsOrNull ( ) { return ( ( diskProfile.getQosId ( ) ) == null ) || ( ( getDbFacade ( ) . getStorageQosDao ( ) . get ( diskProfile.getQosId ( ) ) ) != null ) ? org.ovirt.engine.core.bll.ValidationResult.VALID : new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.ACTION_TYPE_FAILED_QOS_NOT_FOUND ) ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult qosExistsOrNull ( ) { return ( ( getDiskProfile ( ) . getQosId ( ) ) == null ) || ( ( getDbFacade ( ) . getStorageQosDao ( ) . get ( getDiskProfile ( ) . getQosId ( ) ) ) != null ) ? org.ovirt.engine.core.bll.ValidationResult.VALID : new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.ACTION_TYPE_FAILED_QOS_NOT_FOUND ) ; }
Source:
public java.util.List < java.lang.String > getAvailbleKeys ( ) { java.util.List < java.lang.String > list = new java.util.ArrayList < java.lang.String > ( allKeyValueMap.keySet ( ) ) ; for ( java.lang.String key : getUsedKeys ( ) ) { list.remove ( key ) ; } if ( ( list.size ( ) ) > 0 ) { list.add ( 0 , org.ovirt.engine.ui.uicommonweb.models.vms.key_value.KeyValueModel.SELECT_KEY ) ; } else { list.add ( org.ovirt.engine.ui.uicommonweb.models.vms.key_value.KeyValueModel.NO_KEYS ) ; } return list ; }

Target:
public java.util.List < java.lang.String > getAvailableKeys ( ) { java.util.List < java.lang.String > list = ( ( allKeyValueMap ) == null ) ? new java.util.LinkedList < java.lang.String > ( ) : new java.util.LinkedList < java.lang.String > ( allKeyValueMap.keySet ( ) ) ; list.removeAll ( getUsedKeys ( ) ) ; if ( ( list.size ( ) ) > 0 ) { list.add ( 0 , org.ovirt.engine.ui.uicommonweb.models.vms.key_value.KeyValueModel.SELECT_KEY ) ; } else { list.add ( org.ovirt.engine.ui.uicommonweb.models.vms.key_value.KeyValueModel.NO_KEYS ) ; } return list ; }
Source:
public org.ovirt.engine.core.common.AuditLogType getAuditLogTypeValue ( ) { return org.ovirt.engine.core.bll.MigrateVmCommand.getSucceeded ( ) ? ( org.ovirt.engine.core.bll.MigrateVmCommand.getActionReturnValue ( ) ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.Up ) ? org.ovirt.engine.core.common.AuditLogType.VM_MIGRATION_DONE : org.ovirt.engine.core.bll.MigrateVmCommand.isInternalExecution ( ) ? org.ovirt.engine.core.common.AuditLogType.VM_MIGRATION_START_SYSTEM_INITIATED : org.ovirt.engine.core.common.AuditLogType.VM_MIGRATION_START : _isRerun ? org.ovirt.engine.core.common.AuditLogType.VM_MIGRATION_TRYING_RERUN : ( org.ovirt.engine.core.bll.MigrateVmCommand.getVds ( ) . getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VDSStatus.PreparingForMaintenance ) ? org.ovirt.engine.core.common.AuditLogType.VM_MIGRATION_FAILED_DURING_MOVE_TO_MAINTENANCE : ( getDestinationVds ( ) ) == null ? org.ovirt.engine.core.common.AuditLogType.VM_MIGRATION_FAILED_NO_VDS_TO_RUN_ON : org.ovirt.engine.core.common.AuditLogType.VM_MIGRATION_FAILED ; }

Target:
private org.ovirt.engine.core.common.AuditLogType getAuditLogForMigrationFailure ( ) { if ( ( org.ovirt.engine.core.bll.MigrateVmCommand.getVds ( ) . getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VDSStatus.PreparingForMaintenance ) ) { return org.ovirt.engine.core.common.AuditLogType.VM_MIGRATION_FAILED_DURING_MOVE_TO_MAINTENANCE ; } if ( ( getDestinationVds ( ) ) == null ) { return org.ovirt.engine.core.common.AuditLogType.VM_MIGRATION_FAILED_NO_VDS_TO_RUN_ON ; } return org.ovirt.engine.core.common.AuditLogType.VM_MIGRATION_FAILED ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.OneMapReturnForXmlRpc GetImageTransferSessionStats ( java.lang.String ticketId ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "Host.getImageTransferSessionStats" ) . withParameter ( "ticketUUID" , ticketId ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) . withResponseKey ( "statsMap" ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.OneMapReturnForXmlRpc ( response ) ; }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.OneMapReturnForXmlRpc get_image_transfer_session_stats ( java.lang.String ticketId ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "Host.get_image_transfer_session_stats" ) . withParameter ( "ticketUUID" , ticketId ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) . withResponseKey ( "statsMap" ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.OneMapReturnForXmlRpc ( response ) ; }
Source:
protected org.ovirt.engine.core.compat.Guid createTask ( org.ovirt.engine.core.common.asynctasks.AsyncTaskCreationInfo asyncTaskCreationInfo , org.ovirt.engine.core.common.action.VdcActionType parentCommand ) { return org.ovirt.engine.core.bll.tasks.TaskManagerUtil.createTask ( this , asyncTaskCreationInfo , parentCommand , null , null , org.ovirt.engine.core.bll.CommandBase.EMPTY_GUID_ARRAY ) ; }

Target:
public void run ( ) { log.infoFormat ( "Rollback for command: {0}." , this . getClass ( ) . getName ( ) ) ; try { getAsyncTaskManager ( ) . CancelTasks ( getReturnValue ( ) . getTaskIdList ( ) ) ; } catch ( java.lang.Exception e ) { log.errorFormat ( "Failed to cancel tasks for command: {0}." , this . getClass ( ) . getName ( ) ) ; } }
Source:
public java.lang.Void runInTransaction ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.Disk > pluggedDisks = org.ovirt.engine.core.bll.VmRunHandler.getInstance ( ) . getPluggedDisks ( getVm ( ) ) ; runVdsCommand ( VDSCommandType.Snapshot , new org.ovirt.engine.core.common.vdscommands.SnapshotVDSCommandParameters ( getVm ( ) . getrun_on_vds ( ) . getValue ( ) , getVm ( ) . getId ( ) , org.ovirt.engine.core.bll.ImagesHandler.filterImageDisks ( pluggedDisks , false , true ) ) ) ; return null ; }

Target:
public java.lang.Void runInTransaction ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.Disk > pluggedDisks = org.ovirt.engine.core.bll.VmRunHandler.getInstance ( ) . getPluggedDisks ( getVm ( ) ) ; runVdsCommand ( VDSCommandType.Snapshot , new org.ovirt.engine.core.common.vdscommands.SnapshotVDSCommandParameters ( getVm ( ) . getRunOnVds ( ) . getValue ( ) , getVm ( ) . getId ( ) , org.ovirt.engine.core.bll.ImagesHandler.filterImageDisks ( pluggedDisks , false , true ) ) ) ; return null ; }
Source:
public void testIsNetworkInSyncWhenGatewayBothBlank ( ) { java.util.List < java.lang.String > blankValues = java.util.Arrays.asList ( null , "" ) ; initIpConfigurationStaticBootProtocol ( NetworkBootProtocol.STATIC_IP ) ; int blankIndex = org.ovirt.engine.core.utils.RandomUtils.instance ( ) . nextInt ( 2 ) ; org.mockito.Mockito.when ( mockedIPv4Address.getGateway ( ) ) . thenReturn ( blankValues.get ( blankIndex ) ) ; iface.setGateway ( blankValues.get ( ( blankIndex ^ 1 ) ) ) ; org.junit.Assert.assertThat ( createTestedInstance ( ) . isNetworkInSync ( ) , org.hamcrest.CoreMatchers.is ( true ) ) ; }

Target:
public void testIsNetworkInSyncWhenGatewayBothBlank ( ) { java.util.List < java.lang.String > blankValues = java.util.Arrays.asList ( null , "" ) ; initIpConfigurationStaticBootProtocol ( NetworkBootProtocol.STATIC_IP ) ; int blankIndex = org.ovirt.engine.core.utils.RandomUtils.instance ( ) . nextInt ( 2 ) ; org.mockito.Mockito.when ( mockedIPv4Address.getGateway ( ) ) . thenReturn ( blankValues.get ( blankIndex ) ) ; iface.setIpv4Gateway ( blankValues.get ( ( blankIndex ^ 1 ) ) ) ; org.junit.Assert.assertThat ( createTestedInstance ( ) . isNetworkInSync ( ) , org.hamcrest.CoreMatchers.is ( true ) ) ; }
Source:
protected void executeQueryCommand ( ) { org.ovirt.engine.core.bll.storage.GetStoragePoolByIdQuery.getQueryReturnValue ( ) . setReturnValue ( org.ovirt.engine.core.bll.storage.GetStoragePoolByIdQuery.getDbFacade ( ) . getStoragePoolDAO ( ) . get ( org.ovirt.engine.core.bll.storage.GetStoragePoolByIdQuery.getParameters ( ) . getStoragePoolId ( ) , org.ovirt.engine.core.bll.storage.GetStoragePoolByIdQuery.getUserID ( ) , org.ovirt.engine.core.bll.storage.GetStoragePoolByIdQuery.getParameters ( ) . isFiltered ( ) ) ) ; }

Target:
protected void executeQueryCommand ( ) { org.ovirt.engine.core.bll.storage.GetStoragePoolByIdQuery.getQueryReturnValue ( ) . setReturnValue ( org.ovirt.engine.core.bll.storage.GetStoragePoolByIdQuery.getDbFacade ( ) . getStoragePoolDao ( ) . get ( org.ovirt.engine.core.bll.storage.GetStoragePoolByIdQuery.getParameters ( ) . getStoragePoolId ( ) , org.ovirt.engine.core.bll.storage.GetStoragePoolByIdQuery.getUserID ( ) , org.ovirt.engine.core.bll.storage.GetStoragePoolByIdQuery.getParameters ( ) . isFiltered ( ) ) ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.DiskImage createNotVirtIODisk ( ) { org.ovirt.engine.core.common.businessentities.DiskImage disk = new org.ovirt.engine.core.common.businessentities.DiskImage ( ) ; disk.setImageId ( diskImageGuid ) ; disk.setDiskInterface ( DiskInterface.IDE ) ; disk.setActive ( true ) ; org.mockito.Mockito.doReturn ( diskDao ) . when ( command ) . getDiskDao ( ) ; org.mockito.Mockito.when ( diskDao.get ( diskImageGuid ) ) . thenReturn ( disk ) ; return disk ; }

Target:
private org.ovirt.engine.core.common.businessentities.DiskImage createNotVirtIODisk ( ) { org.ovirt.engine.core.common.businessentities.DiskImage disk = getDiskImage ( ) ; disk.setActive ( true ) ; disk.setDiskInterface ( DiskInterface.IDE ) ; org.mockito.Mockito.doReturn ( diskDao ) . when ( command ) . getDiskDao ( ) ; org.mockito.Mockito.when ( diskDao.get ( diskImageGuid ) ) . thenReturn ( disk ) ; return disk ; }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < ? extends org.ovirt.engine.ui.uicompat.EventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { providerChanged ( ) ; }

Target:
public void setItems ( java.util.Collection < org.ovirt.engine.ui.uicommonweb.models.EntityModel < org.ovirt.engine.core.common.businessentities.VM > > values ) { java.util.Collection < org.ovirt.engine.ui.uicommonweb.models.EntityModel < org.ovirt.engine.core.common.businessentities.VM > > externalVms = getExternalVmModels ( ) . getItems ( ) ; if ( ( values != null ) && ( externalVms == values ) ) { sortVms ( values ) ; } else { super . setItems ( values ) ; } }
Source:
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 ) ; }

Target:
public static void getGlusterVolumeSnapshotsForVolume ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid volumeId ) { 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.GlusterVolumeSnapshotEntity > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterVolumeSnapshotsByVolumeId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( volumeId ) , aQuery ) ; }
Source:
private void updateAdminStatus ( org.ovirt.engine.core.common.businessentities.permissions perm ) { org.ovirt.engine.core.common.businessentities.roles role = org.ovirt.engine.core.bll.AddPermissionCommand.getRoleDao ( ) . get ( perm.getrole_id ( ) ) ; if ( ( role.getType ( ) ) == ( org.ovirt.engine.core.common.businessentities.RoleType.ADMIN ) ) { org.ovirt.engine.core.bll.MultiLevelAdministrationHandler.setIsAdminGUIFlag ( perm.getad_element_id ( ) , true ) ; } }

Target:
private void updateAdminStatus ( org.ovirt.engine.core.common.businessentities.permissions perm ) { org.ovirt.engine.core.common.businessentities.Role role = org.ovirt.engine.core.bll.AddPermissionCommand.getRoleDao ( ) . get ( perm.getrole_id ( ) ) ; if ( ( role.getType ( ) ) == ( org.ovirt.engine.core.common.businessentities.RoleType.ADMIN ) ) { org.ovirt.engine.core.bll.MultiLevelAdministrationHandler.setIsAdminGUIFlag ( perm.getad_element_id ( ) , true ) ; } }
Source:
public java.lang.String getValue ( org.ovirt.engine.core.common.businessentities.QuotaVdsGroup object ) { java.lang.String str ; if ( ( object.getVirtualCpu ( ) ) == null ) { return "" ; } else if ( object.getVirtualCpu ( ) . equals ( QuotaVdsGroup.UNLIMITED_VCPU ) ) { str = ( constants.outOfQuota ( ) ) + ( constants.unlimitedQuota ( ) ) ; } else { str = ( constants.outOfQuota ( ) ) + ( object.getVirtualCpu ( ) ) ; } return ( ( object.getVirtualCpuUsage ( ) ) + str ) + " vCPUs" ; }

Target:
public java.lang.String getValue ( org.ovirt.engine.core.common.businessentities.QuotaVdsGroup object ) { if ( ( object.getVirtualCpu ( ) ) == null ) { return "" ; } else if ( object.getVirtualCpu ( ) . equals ( QuotaVdsGroup.UNLIMITED_VCPU ) ) { return messages.unlimitedVcpuConsumption ( object.getVirtualCpuUsage ( ) ) ; } else { return messages.limitedVcpuConsumption ( object.getVirtualCpuUsage ( ) , object.getVirtualCpu ( ) ) ; } }
Source:
public static boolean CanUpdateField ( java.lang.Class < ? > objectType , java.lang.String fieldName , java.lang.Enum < ? > status , java.lang.Object fieldContainer ) { org.ovirt.engine.core.utils.ObjectIdentityChecker checker = org.ovirt.engine.core.utils.ObjectIdentityChecker.identities.get ( objectType ) ; if ( checker != null ) { return checker.IsFieldUpdatable ( status , fieldName , fieldContainer ) ; } return true ; }

Target:
public static boolean canUpdateField ( java.lang.Class < ? > objectType , java.lang.String fieldName , java.lang.Enum < ? > status , java.lang.Object fieldContainer ) { org.ovirt.engine.core.utils.ObjectIdentityChecker checker = org.ovirt.engine.core.utils.ObjectIdentityChecker.identities.get ( objectType ) ; if ( checker != null ) { return checker.isFieldUpdatable ( status , fieldName , fieldContainer ) ; } return true ; }
Source:
protected C mapCollection ( java.util.List < Q > entities ) { C collection = org.ovirt.engine.api.restapi.resource.AbstractBackendReadOnlyDevicesResource.instantiate ( collectionType ) ; java.util.List < D > list = getList ( collection ) ; for ( Q entity : entities ) { D candidate = populate ( org.ovirt.engine.api.restapi.resource.AbstractBackendReadOnlyDevicesResource.map ( entity ) , entity ) ; if ( validate ( candidate ) ) { list.add ( org.ovirt.engine.api.restapi.resource.AbstractBackendReadOnlyDevicesResource.addLinks ( candidate ) ) ; } } return collection ; }

Target:
protected C mapCollection ( java.util.List < Q > entities , boolean addLinks ) { C collection = org.ovirt.engine.api.restapi.resource.AbstractBackendReadOnlyDevicesResource.instantiate ( collectionType ) ; java.util.List < D > list = getList ( collection ) ; for ( Q entity : entities ) { D candidate = populate ( org.ovirt.engine.api.restapi.resource.AbstractBackendReadOnlyDevicesResource.map ( entity ) , entity ) ; if ( validate ( candidate ) ) { if ( addLinks ) { candidate = org.ovirt.engine.api.restapi.resource.AbstractBackendReadOnlyDevicesResource.addLinks ( candidate ) ; } list.add ( candidate ) ; } } return collection ; }
Source:
public static void getNextAvailableDiskAliasNameByVMId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetNextAvailableDiskAliasNameByVMId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }

Target:
public static void getDiskList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ( ) ; } } ; org.ovirt.engine.core.common.queries.SearchParameters searchParams = new org.ovirt.engine.core.common.queries.SearchParameters ( "Disks:" , org.ovirt.engine.core.common.interfaces.SearchType.Disk ) ; searchParams.setMaxCount ( 9999 ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , searchParams , aQuery ) ; }
Source:
public java.util.List < org.ovirt.engine.core.common.PermissionSubject > getPermissionCheckSubjects ( ) { java.util.List < org.ovirt.engine.core.common.PermissionSubject > permissionList = new java.util.ArrayList < org.ovirt.engine.core.common.PermissionSubject > ( ) ; permissionList.add ( new org.ovirt.engine.core.common.PermissionSubject ( org.ovirt.engine.core.bll.AddVmPoolWithVmsCommand.getParameters ( ) . getVmStaticData ( ) . getvds_group_id ( ) , org.ovirt.engine.core.common.VdcObjectType.VdsGroups , org.ovirt.engine.core.bll.AddVmPoolWithVmsCommand.getActionType ( ) . getActionGroup ( ) ) ) ; permissionList.add ( new org.ovirt.engine.core.common.PermissionSubject ( org.ovirt.engine.core.bll.AddVmPoolWithVmsCommand.getVmTemplateId ( ) , org.ovirt.engine.core.common.VdcObjectType.VmTemplate , org.ovirt.engine.core.bll.AddVmPoolWithVmsCommand.getActionType ( ) . getActionGroup ( ) ) ) ; 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 < org.ovirt.engine.core.bll.utils.PermissionSubject > ( ) ; permissionList.add ( new org.ovirt.engine.core.bll.utils.PermissionSubject ( org.ovirt.engine.core.bll.AddVmPoolWithVmsCommand.getParameters ( ) . getVmStaticData ( ) . getvds_group_id ( ) , org.ovirt.engine.core.common.VdcObjectType.VdsGroups , org.ovirt.engine.core.bll.AddVmPoolWithVmsCommand.getActionType ( ) . getActionGroup ( ) ) ) ; permissionList.add ( new org.ovirt.engine.core.bll.utils.PermissionSubject ( org.ovirt.engine.core.bll.AddVmPoolWithVmsCommand.getVmTemplateId ( ) , org.ovirt.engine.core.common.VdcObjectType.VmTemplate , org.ovirt.engine.core.bll.AddVmPoolWithVmsCommand.getActionType ( ) . getActionGroup ( ) ) ) ; return permissionList ; }
Source:
public void testGetVmIconByDataUrlWithValidUrl ( ) { final java.util.List < org.ovirt.engine.core.common.businessentities.VmIcon > result = prepareDao ( ) . getByDataUrl ( org.ovirt.engine.core.dao.VmIconDaoTest.OTHER_SMALL_DATAURL ) ; org.junit.Assert.assertEquals ( 1 , result.size ( ) ) ; org.junit.Assert.assertEquals ( new org.ovirt.engine.core.common.businessentities.VmIcon ( org.ovirt.engine.core.dao.VmIconDaoTest.OTHER_SMALL_ICON_ID , org.ovirt.engine.core.dao.VmIconDaoTest.OTHER_SMALL_DATAURL ) , result.get ( 0 ) ) ; }

Target:
public void testGetVmIconByDataUrlWithValidUrl ( ) { final java.util.List < org.ovirt.engine.core.common.businessentities.VmIcon > result = prepareDao ( ) . getByDataUrl ( org.ovirt.engine.core.dao.VmIconDaoTest.OTHER_SMALL_DATAURL ) ; org.junit.Assert.assertEquals ( 1 , result.size ( ) ) ; org.junit.Assert.assertEquals ( new org.ovirt.engine.core.common.businessentities.VmIcon ( FixturesTool.SMALL_ICON_ID , org.ovirt.engine.core.dao.VmIconDaoTest.OTHER_SMALL_DATAURL ) , result.get ( 0 ) ) ; }
Source:
public void setColumnWidth ( com.google.gwt.user.cellview.client.Column < T , ? > column , java.lang.String width ) { setColumnWidth ( column , width , false ) ; }

Target:
public void setColumnWidth ( com.google.gwt.user.cellview.client.Column < T , ? > column , java.lang.String width ) { if ( ( unaddedColumns.indexOf ( column ) ) < 0 ) { setColumnWidth ( column , width , false ) ; } else { unaddedColumnWidths.put ( column , width ) ; } }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { java.util.List < java.lang.String > pmOptions = ( ( java.util.ArrayList < java.lang.String > ) ( returnValue ) ) ; if ( pmOptions != null ) { getPmSecondaryPort ( ) . setIsAvailable ( pmOptions.contains ( org.ovirt.engine.ui.uicommonweb.models.hosts.HostModel.PmPortKey ) ) ; getPmSecondarySlot ( ) . setIsAvailable ( pmOptions.contains ( org.ovirt.engine.ui.uicommonweb.models.hosts.HostModel.PmSlotKey ) ) ; getPmSecondarySecure ( ) . setIsAvailable ( pmOptions.contains ( org.ovirt.engine.ui.uicommonweb.models.hosts.HostModel.PmSecureKey ) ) ; } }

Target:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.hosts.HostModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.hosts.HostModel ) ( target ) ) ; model.maxSpmPriority = ( ( java.lang.Integer ) ( returnValue ) ) ; initSpmPriorities1 ( ) ; }
Source:
public void canDoActionSameSourceAndDest ( ) throws java.lang.Exception { destStorageId = srcStorageId ; initializeCommand ( ImageOperation.Move , new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ) ; initVmDiskImage ( false ) ; mockGetVmsListForDisk ( ) ; initSrcStorageDomain ( ) ; org.junit.Assert.assertFalse ( command.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( EngineMessage.ACTION_TYPE_FAILED_SOURCE_AND_TARGET_SAME.toString ( ) ) ) ; }

Target:
public void validateSameSourceAndDest ( ) throws java.lang.Exception { destStorageId = srcStorageId ; initializeCommand ( ImageOperation.Move , new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ) ; initVmDiskImage ( false ) ; mockGetVmsListForDisk ( ) ; initSrcStorageDomain ( ) ; org.junit.Assert.assertFalse ( command.validate ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getValidationMessages ( ) . contains ( EngineMessage.ACTION_TYPE_FAILED_SOURCE_AND_TARGET_SAME.toString ( ) ) ) ; }