auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void testRemoveWithoutParam ( ) { container.setData ( org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_SESSION_ID , org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_KEY , org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_VALUE ) ; container.removeSession ( ) ; org.junit.Assert.assertEquals ( "Get should return the value since the session was not removed" , org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_VALUE , container.getData ( org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_SESSION_ID , org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_KEY , false ) ) ; org.ovirt.engine.core.utils.ThreadLocalParamsContainer.setHttpSessionId ( org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_SESSION_ID ) ; container.removeSession ( ) ; org.junit.Assert.assertNull ( "Get should return the value since the session was removed" , container.getData ( org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_SESSION_ID , org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_KEY , false ) ) ; }

Target:
public void testGetDataAndSetDataWithFullSession ( ) { container.setData ( org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_SESSION_ID , org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_KEY , org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_VALUE ) ; org.junit.Assert.assertEquals ( "Get should return the value with a given session" , org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_VALUE , container.getData ( org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_SESSION_ID , org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_KEY , false ) ) ; }
Source:
private void saveRange ( org.ovirt.engine.core.common.businessentities.MacRange entity ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "mac_pool_id" , entity.getMacPoolId ( ) ) . addValue ( "from_mac" , entity.getMacFrom ( ) ) . addValue ( "to_mac" , entity.getMacTo ( ) ) ; getCallsHandler ( ) . executeModification ( "InsertMacPoolRange" , parameterSource ) ; }

Target:
private void saveRange ( org.ovirt.engine.core.common.businessentities.MacRange entity ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "mac_pool_id" , entity.getMacPoolId ( ) ) . addValue ( "from_mac" , entity.getMacFrom ( ) . toLowerCase ( ) ) . addValue ( "to_mac" , entity.getMacTo ( ) . toLowerCase ( ) ) ; getCallsHandler ( ) . executeModification ( "InsertMacPoolRange" , parameterSource ) ; }
Source:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendMultipleActionAsyncResult result ) { boolean hasError = false ; for ( org.ovirt.engine.core.common.action.VdcReturnValueBase singleResult : result.getReturnValue ( ) ) { if ( ( ! ( singleResult.getCanDoAction ( ) ) ) || ( ( waitForResult ) && ( ! ( singleResult.getSucceeded ( ) ) ) ) ) { hasError = true ; getActionFlowState ( ) . addFailure ( actionType , singleResult ) ; } } if ( hasError && ( ! ( runNextInCaseOfError ) ) ) { then ( null ) ; } runNextAction ( ) ; }

Target:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendMultipleActionAsyncResult result ) { boolean hasError = false ; for ( org.ovirt.engine.core.common.action.VdcReturnValueBase singleResult : result.getReturnValue ( ) ) { if ( ( ! ( singleResult.isValid ( ) ) ) || ( ( waitForResult ) && ( ! ( singleResult.getSucceeded ( ) ) ) ) ) { hasError = true ; getActionFlowState ( ) . addFailure ( actionType , singleResult ) ; } } if ( hasError && ( ! ( runNextInCaseOfError ) ) ) { then ( null ) ; } runNextAction ( ) ; }
Source:
public int compare ( org.ovirt.engine.core.common.businessentities.Disk o1 , org.ovirt.engine.core.common.businessentities.Disk o2 ) { java.lang.Boolean boot1 = o1.isBoot ( ) ; java.lang.Boolean boot2 = o2.isBoot ( ) ; int bootResult = boot1.compareTo ( boot2 ) ; if ( ( bootResult == 0 ) && ( o1.isBoot ( ) ) ) { return java.lang.Boolean.compare ( o2.isDiskSnapshot ( ) , o1.isDiskSnapshot ( ) ) ; } return bootResult ; }

Target:
public int compare ( org.ovirt.engine.core.common.businessentities.storage.Disk o1 , org.ovirt.engine.core.common.businessentities.storage.Disk o2 ) { java.lang.Boolean boot1 = o1.isBoot ( ) ; java.lang.Boolean boot2 = o2.isBoot ( ) ; int bootResult = boot1.compareTo ( boot2 ) ; if ( ( bootResult == 0 ) && ( o1.isBoot ( ) ) ) { return java.lang.Boolean.compare ( o2.isDiskSnapshot ( ) , o1.isDiskSnapshot ( ) ) ; } return bootResult ; }
Source:
protected void executeCommand ( ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSession session = getGeoRepSession ( ) ; org.ovirt.engine.core.common.vdscommands.VDSReturnValue returnValue = runVdsCommand ( VDSCommandType.ResumeGeoRepSession , new org.ovirt.engine.core.common.vdscommands.gluster.GlusterVolumeGeoRepSessionVDSParameters ( upServer.getId ( ) , session.getMasterVolumeName ( ) , session.getSlaveHostName ( ) , session.getSlaveVolumeName ( ) , parameters.isForce ( ) ) ) ; setSucceeded ( returnValue.getSucceeded ( ) ) ; if ( ! ( getSucceeded ( ) ) ) { handleVdsError ( AuditLogType.GLUSTER_VOLUME_GEO_REP_RESUME_FAILED , returnValue.getVdsError ( ) . getMessage ( ) ) ; return ; } }

Target:
protected void executeCommand ( ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSession session = getGeoRepSession ( ) ; org.ovirt.engine.core.common.vdscommands.VDSReturnValue returnValue = runVdsCommand ( VDSCommandType.ResumeGeoRepSession , new org.ovirt.engine.core.common.vdscommands.gluster.GlusterVolumeGeoRepSessionVDSParameters ( upServer.getId ( ) , session.getMasterVolumeName ( ) , session.getSlaveHostName ( ) , session.getSlaveVolumeName ( ) , session.getUserName ( ) , parameters.isForce ( ) ) ) ; setSucceeded ( returnValue.getSucceeded ( ) ) ; if ( ! ( getSucceeded ( ) ) ) { handleVdsError ( AuditLogType.GLUSTER_VOLUME_GEO_REP_RESUME_FAILED , returnValue.getVdsError ( ) . getMessage ( ) ) ; return ; } }
Source:
private void mockDiskImageDao ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.Disk > diskImageList = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ( ) ; org.ovirt.engine.core.common.businessentities.DiskImage diskImage = new org.ovirt.engine.core.common.businessentities.DiskImage ( ) ; diskImage.setStorageIds ( new java.util.ArrayList < org.ovirt.engine.core.compat.Guid > ( java.util.Arrays.asList ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ) ) ; diskImageList.add ( diskImage ) ; org.mockito.Mockito.doReturn ( diskDao ) . when ( spyCommand ) . getDiskDao ( ) ; org.mockito.Mockito.when ( diskDao.getAllForVm ( vmId ) ) . thenReturn ( diskImageList ) ; }

Target:
private void mockDiskImageDao ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.Disk > diskImageList = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ( ) ; org.ovirt.engine.core.common.businessentities.DiskImage diskImage = new org.ovirt.engine.core.common.businessentities.DiskImage ( ) ; diskImage.setStorageIds ( new java.util.ArrayList < org.ovirt.engine.core.compat.Guid > ( java.util.Arrays.asList ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ) ) ; diskImageList.add ( diskImage ) ; org.mockito.Mockito.doReturn ( diskDao ) . when ( spyCommand ) . getDiskDao ( ) ; org.mockito.Mockito.when ( diskDao.getAllForVm ( vmId ) ) . thenReturn ( diskImageList ) ; }
Source:
public void unlabel ( org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkLabelModel labelModel ) { labelModel.setInterface ( null ) ; getLabels ( ) . remove ( labelModel ) ; java.util.Set < java.lang.String > labels = getIface ( ) . getLabels ( ) ; labels.remove ( labelModel.getName ( ) ) ; if ( labels.isEmpty ( ) ) { getIface ( ) . setLabels ( null ) ; } }

Target:
public org.ovirt.engine.core.common.businessentities.network.InterfaceStatus getStatus ( ) { return getOriginalIface ( ) . getStatistics ( ) . getStatus ( ) ; }
Source:
public java.lang.String call ( ) { com.woorea.openstack.cinder.model.SnapshotForCreate snapshotForCreate = new com.woorea.openstack.cinder.model.SnapshotForCreate ( ) ; snapshotForCreate.setVolumeId ( cinderDisk.getImageId ( ) . toString ( ) ) ; snapshotForCreate.setDescription ( snapshotDescription ) ; return proxy.createSnapshot ( snapshotForCreate ) ; }

Target:
public java.lang.String createSnapshot ( final org.ovirt.engine.core.common.businessentities.storage.CinderDisk cinderDisk , final java.lang.String snapshotDescription ) { return execute ( ( ) -> { com.woorea.openstack.cinder.model.SnapshotForCreate snapshotForCreate = new com.woorea.openstack.cinder.model.SnapshotForCreate ( ) ; snapshotForCreate.setVolumeId ( cinderDisk.getImageId ( ) . toString ( ) ) ; snapshotForCreate.setDescription ( snapshotDescription ) ; return proxy.createSnapshot ( snapshotForCreate ) ; } ) ; }
Source:
private java.lang.Object getBackendParameter ( final org.ovirt.engine.core.common.queries.ConfigurationValues key ) throws javax.servlet.ServletException { final org.ovirt.engine.core.common.queries.GetConfigurationValueParameters parameters = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( ) ; parameters.setConfigValue ( key ) ; parameters.setVersion ( ConfigCommon.defaultConfigurationVersion ) ; org.ovirt.engine.core.common.queries.VdcQueryReturnValue value = backend.runPublicQuery ( VdcQueryType.GetConfigurationValue , parameters ) ; if ( ! ( value.getSucceeded ( ) ) ) { throw new javax.servlet.ServletException ( ( ( "Can\'t get value of backend parameter \"" + key ) + "\"." ) ) ; } return value.getReturnValue ( ) ; }

Target:
private java.lang.Object getBackendParameter ( final org.ovirt.engine.core.common.config.ConfigValues key ) throws javax.servlet.ServletException { final org.ovirt.engine.core.common.queries.GetConfigurationValueParameters parameters = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( ) ; parameters.setConfigValue ( key ) ; parameters.setVersion ( ConfigCommon.defaultConfigurationVersion ) ; org.ovirt.engine.core.common.queries.VdcQueryReturnValue value = backend.runPublicQuery ( VdcQueryType.GetConfigurationValue , parameters ) ; if ( ! ( value.getSucceeded ( ) ) ) { throw new javax.servlet.ServletException ( ( ( "Can\'t get value of backend parameter \"" + key ) + "\"." ) ) ; } return value.getReturnValue ( ) ; }
Source:
public static java.util.Locale getLocaleFromString ( java.lang.String localeString , boolean returnDefaultLocale ) { java.util.Locale result = ( returnDefaultLocale ) ? null : java.util.Locale.US ; try { result = org.apache.commons.lang.LocaleUtils.toLocale ( ( localeString != null ? localeString.replaceAll ( "\\-" , "_" ) : localeString ) ) ; if ( ( result == null ) && returnDefaultLocale ) { result = java.util.Locale.US ; } } catch ( java.lang.IllegalArgumentException e ) { result = ( returnDefaultLocale ) ? java.util.Locale.US : null ; } return result ; }

Target:
public static java.util.Locale getLocaleFromString ( java.lang.String localeString , boolean returnDefaultLocale ) { java.util.Locale result = ( returnDefaultLocale ) ? null : org.ovirt.engine.core.utils.servlet.LocaleFilter.DEFAULT_LOCALE ; try { result = org.apache.commons.lang.LocaleUtils.toLocale ( ( localeString != null ? localeString.replaceAll ( "\\-" , "_" ) : localeString ) ) ; if ( ( result == null ) && returnDefaultLocale ) { result = org.ovirt.engine.core.utils.servlet.LocaleFilter.DEFAULT_LOCALE ; } } catch ( java.lang.IllegalArgumentException e ) { result = ( returnDefaultLocale ) ? org.ovirt.engine.core.utils.servlet.LocaleFilter.DEFAULT_LOCALE : null ; } return result ; }
Source:
public java.util.List < org.ovirt.engine.core.common.businessentities.DbUser > getAll ( ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) ; return getCallsHandler ( ) . executeReadList ( "GetAllFromUsers" , org.ovirt.engine.core.dao.DbUserDAODbFacadeImpl.DbUserRowMapper.instance , parameterSource ) ; }

Target:
public java.util.List < org.ovirt.engine.core.common.businessentities.DbUser > getAll ( org.ovirt.engine.core.compat.Guid userID , boolean isFiltered ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "user_id" , userID ) . addValue ( "is_filtered" , isFiltered ) ; return getCallsHandler ( ) . executeReadList ( "GetAllFromUsers" , org.ovirt.engine.core.dao.DbUserDAODbFacadeImpl.DbUserRowMapper.instance , parameterSource ) ; }
Source:
private void setVmTemplateIdParameter ( ) { java.util.Map < java.lang.Boolean , org.ovirt.engine.core.common.businessentities.VmTemplate > templateMap = org.ovirt.engine.core.bll.RemoveDiskCommand.getDbFacade ( ) . getVmTemplateDAO ( ) . getAllForImage ( ( ( org.ovirt.engine.core.common.businessentities.DiskImage ) ( disk ) ) . getImageId ( ) ) ; if ( ! ( templateMap.isEmpty ( ) ) ) { setVmTemplateId ( templateMap.values ( ) . iterator ( ) . next ( ) . getId ( ) ) ; } }

Target:
private void setVmTemplateIdParameter ( ) { java.util.Map < java.lang.Boolean , org.ovirt.engine.core.common.businessentities.VmTemplate > templateMap = org.ovirt.engine.core.bll.RemoveDiskCommand.getDbFacade ( ) . getVmTemplateDao ( ) . getAllForImage ( ( ( org.ovirt.engine.core.common.businessentities.DiskImage ) ( disk ) ) . getImageId ( ) ) ; if ( ! ( templateMap.isEmpty ( ) ) ) { setVmTemplateId ( templateMap.values ( ) . iterator ( ) . next ( ) . getId ( ) ) ; } }
Source:
public static void getHostFingerprint ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String hostAddress ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetServerSSHKeyFingerprint , new org.ovirt.engine.core.common.queries.ServerParameters ( hostAddress ) , aQuery ) ; }

Target:
public void 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.getInstance ( ) . runQuery ( VdcQueryType.GetStoragePoolById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) . withoutRefresh ( ) , aQuery ) ; }
Source:
private void recalculateImageDerivedFields ( ) { if ( getImageSourceLocalEnabled ( ) . getEntity ( ) ) { autoSelectImageType ( getImagePath ( ) . getEntity ( ) ) ; } else { autoSelectImageType ( getImageUri ( ) . getEntity ( ) ) ; } }

Target:
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 ) { super . eventRaised ( ev , sender , args ) ; if ( ev.matchesDefinition ( ListModel.selectedItemChangedEventDefinition ) ) { if ( ( sender == ( getDiskModel ( ) . getStorageDomain ( ) ) ) || ( sender == ( getDiskModel ( ) . getVolumeType ( ) ) ) ) { updateVolumeType ( ) ; } } }
Source:
protected org.ovirt.engine.ui.uicommonweb.models.datacenters.NetworkClusterModel createNetworkClusterModel ( org.ovirt.engine.core.common.businessentities.VDSGroup cluster ) { if ( cluster.getId ( ) . equals ( this . cluster.getId ( ) ) ) { org.ovirt.engine.ui.uicommonweb.models.datacenters.NetworkClusterModel networkClusterModel = new org.ovirt.engine.ui.uicommonweb.models.datacenters.NetworkClusterModel ( cluster ) ; networkClusterModel.setAttached ( true ) ; networkClusterModel.setRequired ( ( ! ( ( java.lang.Boolean ) ( getExport ( ) . getEntity ( ) ) ) ) ) ; networkClusterModel.setIsChangeable ( false ) ; return networkClusterModel ; } else { return super . createNetworkClusterModel ( cluster ) ; } }

Target:
protected org.ovirt.engine.ui.uicommonweb.models.datacenters.NetworkClusterModel createNetworkClusterModel ( org.ovirt.engine.core.common.businessentities.Cluster cluster ) { if ( cluster.getId ( ) . equals ( this . cluster.getId ( ) ) ) { org.ovirt.engine.ui.uicommonweb.models.datacenters.NetworkClusterModel networkClusterModel = new org.ovirt.engine.ui.uicommonweb.models.datacenters.NetworkClusterModel ( cluster ) ; networkClusterModel.setAttached ( true ) ; networkClusterModel.setRequired ( ( ! ( ( java.lang.Boolean ) ( getExport ( ) . getEntity ( ) ) ) ) ) ; networkClusterModel.setIsChangeable ( false ) ; return networkClusterModel ; } else { return super . createNetworkClusterModel ( cluster ) ; } }
Source:
public void testGetVdsCapabilities ( ) throws java.lang.InterruptedException , java.util.concurrent.ExecutionException , org.ovirt.vdsm.jsonrpc.client.ClientConnectionException { org.ovirt.vdsm.jsonrpc.client.JsonRpcClient client = org.ovirt.engine.core.vdsbroker.jsonrpc.JsonRpcUtils.createStompClient ( org.ovirt.engine.core.vdsbroker.jsonrpc.JsonRpcIntegrationTest.HOST_ADDRESS , org.ovirt.engine.core.vdsbroker.jsonrpc.JsonRpcIntegrationTest.PORT , org.ovirt.engine.core.vdsbroker.jsonrpc.JsonRpcIntegrationTest.TIMEOUT , 0 , org.ovirt.engine.core.vdsbroker.jsonrpc.JsonRpcIntegrationTest.TIMEOUT , org.ovirt.engine.core.vdsbroker.jsonrpc.JsonRpcIntegrationTest.TIMEOUT , true ) ; final org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "Host.getCapabilities" ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > map = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( client , request ) ; org.junit.Assert.assertTrue ( map.isEmpty ( ) ) ; }

Target:
public void testGetVdsCapabilities ( ) throws java.lang.InterruptedException , java.util.concurrent.ExecutionException , org.ovirt.vdsm.jsonrpc.client.ClientConnectionException { org.ovirt.vdsm.jsonrpc.client.JsonRpcClient client = org.ovirt.engine.core.vdsbroker.jsonrpc.JsonRpcUtils.createStompClient ( org.ovirt.engine.core.vdsbroker.jsonrpc.JsonRpcIntegrationTest.HOST_ADDRESS , org.ovirt.engine.core.vdsbroker.jsonrpc.JsonRpcIntegrationTest.PORT , org.ovirt.engine.core.vdsbroker.jsonrpc.JsonRpcIntegrationTest.TIMEOUT , 0 , org.ovirt.engine.core.vdsbroker.jsonrpc.JsonRpcIntegrationTest.TIMEOUT , org.ovirt.engine.core.vdsbroker.jsonrpc.JsonRpcIntegrationTest.TIMEOUT , true , "TLSv1" ) ; final org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "Host.getCapabilities" ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > map = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( client , request ) ; org.junit.Assert.assertTrue ( map.isEmpty ( ) ) ; }
Source:
public void canDoActionMaxBlockDiskSizeCheckFails ( ) { org.ovirt.engine.core.compat.Guid storageId = org.ovirt.engine.core.compat.Guid.NewGuid ( ) ; org.ovirt.engine.core.common.action.AddDiskParameters parameters = org.ovirt.engine.core.bll.AddDiskToVmCommandTest.createParameters ( ) ; parameters.setDiskInfo ( org.ovirt.engine.core.bll.AddDiskToVmCommandTest.createDiskImage ( ( ( org.ovirt.engine.core.bll.AddDiskToVmCommandTest.MAX_BLOCK_SIZE ) * 2 ) ) ) ; initializeCommand ( storageId , parameters ) ; mockVm ( ) ; mockStorageDomain ( storageId , StorageType.ISCSI ) ; mockStoragePoolIsoMap ( ) ; org.junit.Assert.assertFalse ( command.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( VdcBllMessages.ACTION_TYPE_FAILED_DISK_MAX_SIZE_EXCEEDED.toString ( ) ) ) ; }

Target:
public void canDoActionMaxBlockDiskSizeCheckFails ( ) { org.ovirt.engine.core.compat.Guid storageId = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; org.ovirt.engine.core.common.action.AddDiskParameters parameters = org.ovirt.engine.core.bll.AddDiskToVmCommandTest.createParameters ( ) ; parameters.setDiskInfo ( org.ovirt.engine.core.bll.AddDiskToVmCommandTest.createDiskImage ( ( ( org.ovirt.engine.core.bll.AddDiskToVmCommandTest.MAX_BLOCK_SIZE ) * 2 ) ) ) ; initializeCommand ( storageId , parameters ) ; mockVm ( ) ; mockStorageDomain ( storageId , StorageType.ISCSI ) ; mockStoragePoolIsoMap ( ) ; org.junit.Assert.assertFalse ( command.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( VdcBllMessages.ACTION_TYPE_FAILED_DISK_MAX_SIZE_EXCEEDED.toString ( ) ) ) ; }
Source:
public void setSearchString ( java.lang.String value , boolean checkIfNewValue ) { if ( ( ! checkIfNewValue ) || ( ! ( org.ovirt.engine.core.compat.StringHelper.stringsEqual ( searchString , value ) ) ) ) { searchString = value ; SearchStringChanged ( ) ; OnPropertyChanged ( new org.ovirt.engine.core.compat.PropertyChangedEventArgs ( "SearchString" ) ) ; } }

Target:
public void setSearchString ( java.lang.String value , boolean checkIfNewValue ) { if ( ( ! checkIfNewValue ) || ( ! ( org.ovirt.engine.core.compat.StringHelper.stringsEqual ( searchString , value ) ) ) ) { searchString = value ; searchStringChanged ( ) ; onPropertyChanged ( new org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ( "SearchString" ) ) ; } }
Source:
public static void getNetworkList ( 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 != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.Network > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.Network > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllNetworks , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) , aQuery ) ; }

Target:
public static void getDataCentersByStorageDomain ( 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 ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStoragePoolsByStorageDomainId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( storageDomainId ) , aQuery ) ; }
Source:
protected org.ovirt.engine.core.compat.Guid generateNewDiskId ( org.ovirt.engine.core.common.businessentities.DiskImage disk ) { org.ovirt.engine.core.compat.Guid newGuidForDisk = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; newDiskIdForDisk.put ( newGuidForDisk , org.ovirt.engine.core.common.businessentities.DiskImage.copyOf ( disk ) ) ; disk.setId ( newGuidForDisk ) ; disk.setImageId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; return newGuidForDisk ; }

Target:
protected org.ovirt.engine.core.compat.Guid generateNewDiskId ( org.ovirt.engine.core.common.businessentities.storage.DiskImage disk ) { org.ovirt.engine.core.compat.Guid newGuidForDisk = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; newDiskIdForDisk.put ( newGuidForDisk , org.ovirt.engine.core.common.businessentities.storage.DiskImage.copyOf ( disk ) ) ; disk.setId ( newGuidForDisk ) ; disk.setImageId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; return newGuidForDisk ; }
Source:
public void getVmList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String poolName ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > vms = org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VM > cast ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.IVdcQueryable > ) ( source ) ) ) ; return vms ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( ( "Vms: pool=" + poolName ) , org.ovirt.engine.core.common.interfaces.SearchType.VM ) , aQuery ) ; }

Target:
public void getVmSnapshotList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllVmSnapshotsByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
public void getUpHostListByCluster ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String clusterName ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : java.util.Collections.emptyList ( ) ; } } ; getUpHostListByCluster ( aQuery , clusterName , null ) ; }

Target:
public void getSearchResultsLimit ( org.ovirt.engine.ui.frontend.AsyncQuery < java.lang.Integer > aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.DefaultValueConverter < > ( 100 ) ; getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.SearchResultsLimit , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
public org.ovirt.engine.core.common.job.Job getJob ( final org.ovirt.engine.core.compat.Guid jobId ) { org.ovirt.engine.core.common.job.Job job = jobDao.get ( jobId ) ; if ( job != null ) { java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.VdcObjectType > jobSubjectEntity = jobSubjectEntityDao.getJobSubjectEntityByJobId ( jobId ) ; job.setJobSubjectEntities ( jobSubjectEntity ) ; } return job ; }

Target:
public org.ovirt.engine.core.common.job.Job runInTransaction ( ) { org.ovirt.engine.core.common.job.Job job = jobDao.get ( jobId ) ; if ( job != null ) { job.getJobSubjectEntities ( ) ; } return job ; }
Source:
public static void setIsAdminGUIFlag ( org.ovirt.engine.core.compat.Guid userId , boolean hasPermissions ) { org.ovirt.engine.core.common.businessentities.DbUser user = org.ovirt.engine.core.bll.MultiLevelAdministrationHandler.getDbUserDAO ( ) . get ( userId ) ; if ( ( user.isAdmin ( ) ) != hasPermissions ) { user.setAdmin ( hasPermissions ) ; org.ovirt.engine.core.bll.MultiLevelAdministrationHandler.getDbUserDAO ( ) . update ( user ) ; } }

Target:
public static void setIsAdminGUIFlag ( org.ovirt.engine.core.compat.Guid userId , boolean hasPermissions ) { org.ovirt.engine.core.common.businessentities.aaa.DbUser user = org.ovirt.engine.core.bll.MultiLevelAdministrationHandler.getDbUserDAO ( ) . get ( userId ) ; if ( ( user.isAdmin ( ) ) != hasPermissions ) { user.setAdmin ( hasPermissions ) ; org.ovirt.engine.core.bll.MultiLevelAdministrationHandler.getDbUserDAO ( ) . update ( user ) ; } }
Source:
public void setUp ( ) { createStorageDomain ( ) ; storageDomainDisks = new java.util.LinkedList < > ( ) ; org.mockito.Mockito.when ( diskImageDao.getAllForStorageDomain ( storageDomain.getId ( ) ) ) . thenReturn ( storageDomainDisks ) ; storageDomainVmDisks = new java.util.LinkedList < > ( ) ; org.mockito.Mockito.when ( diskVmElementDao.getAllDiskVmElementsByDisksIds ( org.mockito.Matchers.anyCollectionOf ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( storageDomainVmDisks ) ; org.mockito.Mockito.when ( storageDomainDao.get ( storageDomain.getId ( ) ) ) . thenReturn ( storageDomain ) ; }

Target:
public void setUp ( ) { createStorageDomain ( ) ; storageDomainDisks = new java.util.LinkedList < > ( ) ; org.mockito.Mockito.when ( diskImageDao.getAllForStorageDomain ( storageDomain.getId ( ) ) ) . thenReturn ( storageDomainDisks ) ; storageDomainVmDisks = new java.util.LinkedList < > ( ) ; org.mockito.Mockito.when ( diskVmElementDao.getAllDiskVmElementsByDisksIds ( org.mockito.ArgumentMatchers.anyCollectionOf ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( storageDomainVmDisks ) ; org.mockito.Mockito.when ( storageDomainDao.get ( storageDomain.getId ( ) ) ) . thenReturn ( storageDomain ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { java.util.List < java.lang.String > images = ( ( java.util.List < java.lang.String > ) ( returnValue ) ) ; getIsoImage ( ) . setItems ( images ) ; if ( ( getIsoImage ( ) . getIsChangable ( ) ) && ( ( getIsoImage ( ) . getSelectedItem ( ) ) == null ) ) { getIsoImage ( ) . setSelectedItem ( org.ovirt.engine.ui.uicommonweb.Linq.FirstOrDefault ( images ) ) ; } }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { java.util.List < java.lang.String > images = ( ( java.util.List < java.lang.String > ) ( returnValue ) ) ; getIsoImage ( ) . setItems ( images ) ; if ( ( getIsoImage ( ) . getIsChangable ( ) ) && ( ( getIsoImage ( ) . getSelectedItem ( ) ) == null ) ) { getIsoImage ( ) . setSelectedItem ( org.ovirt.engine.ui.uicommonweb.Linq.firstOrDefault ( images ) ) ; } }
Source:
private void interfaceHasSiblingVlanInterfaces ( org.ovirt.engine.core.compat.Guid vdsID , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface , 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 ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > siblingVlanInterfaces = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > ) ( source ) ) ; return ! ( siblingVlanInterfaces.isEmpty ( ) ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllSiblingVlanInterfaces , new org.ovirt.engine.core.common.queries.InterfaceAndIdQueryParameters ( vdsID , iface ) , aQuery ) ; }

Target:
private void interfaceHasSiblingVlanInterfaces ( org.ovirt.engine.core.compat.Guid vdsID , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface , 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 ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > siblingVlanInterfaces = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > ) ( source ) ) ; return ! ( siblingVlanInterfaces.isEmpty ( ) ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllSiblingVlanInterfaces , new org.ovirt.engine.core.common.queries.InterfaceAndIdQueryParameters ( vdsID , iface ) , aQuery ) ; }
Source:
protected boolean canDoAction ( ) { if ( ! ( super . canDoAction ( ) ) ) { return false ; } oldMacPool = getMacPoolDao ( ) . get ( getParameters ( ) . getMacPoolId ( ) ) ; final org.ovirt.engine.core.bll.MacPoolValidator validator = new org.ovirt.engine.core.bll.MacPoolValidator ( oldMacPool ) ; return ( ( validate ( validator.macPoolExists ( ) ) ) && ( validate ( validator.notRemovingUsedPool ( ) ) ) ) && ( validate ( validator.notRemovingDefaultPool ( ) ) ) ; }

Target:
protected boolean canDoAction ( ) { if ( ! ( super . canDoAction ( ) ) ) { return false ; } final org.ovirt.engine.core.bll.MacPoolValidator validator = new org.ovirt.engine.core.bll.MacPoolValidator ( getOldMacPool ( ) ) ; return ( ( validate ( validator.macPoolExists ( ) ) ) && ( validate ( validator.notRemovingUsedPool ( ) ) ) ) && ( validate ( validator.notRemovingDefaultPool ( ) ) ) ; }
Source:
protected void setVirtioScsiController ( org.ovirt.engine.api.model.Vm model ) { if ( ! ( model.isSetVirtioScsi ( ) ) ) { model.setVirtioScsi ( new org.ovirt.engine.api.model.VirtioScsi ( ) ) ; } model.getVirtioScsi ( ) . setEnabled ( ( ! ( org.ovirt.engine.api.restapi.util.VmHelper.getVirtioScsiControllersForEntity ( this , new org.ovirt.engine.core.compat.Guid ( model.getId ( ) ) ) . isEmpty ( ) ) ) ) ; }

Target:
protected org.ovirt.engine.api.model.Vm doPopulate ( org.ovirt.engine.api.model.Vm model , org.ovirt.engine.core.common.businessentities.VM entity ) { org.ovirt.engine.api.restapi.resource.BackendVmDeviceHelper.setPayload ( this , model ) ; org.ovirt.engine.api.restapi.resource.MemoryPolicyHelper.setupMemoryBalloon ( model , this ) ; org.ovirt.engine.api.restapi.resource.BackendVmDeviceHelper.setConsoleDevice ( this , model ) ; org.ovirt.engine.api.restapi.resource.BackendVmDeviceHelper.setVirtioScsiController ( this , model ) ; org.ovirt.engine.api.restapi.resource.BackendVmDeviceHelper.setSoundcard ( this , model ) ; org.ovirt.engine.api.restapi.resource.BackendVmDeviceHelper.setCertificateInfo ( this , model ) ; org.ovirt.engine.api.restapi.resource.BackendVmDeviceHelper.setRngDevice ( this , model ) ; setVmOvfConfiguration ( model , entity ) ; return model ; }
Source:
protected boolean canDoAction ( ) { if ( ! ( super . canDoAction ( ) ) ) { return false ; } if ( ( getSnapshot ( ) . getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.gluster.GlusterSnapshotStatus.ACTIVATED ) ) { return failCanDoAction ( EngineMessage.ACTION_TYPE_FAILED_GLUSTER_VOLUME_SNAPSHOT_ALREADY_ACTIVATED , getSnapshot ( ) . getSnapshotName ( ) ) ; } return true ; }

Target:
protected boolean validate ( ) { if ( ! ( super . validate ( ) ) ) { return false ; } if ( ( getSnapshot ( ) . getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.gluster.GlusterSnapshotStatus.ACTIVATED ) ) { return failValidation ( EngineMessage.ACTION_TYPE_FAILED_GLUSTER_VOLUME_SNAPSHOT_ALREADY_ACTIVATED , getSnapshot ( ) . getSnapshotName ( ) ) ; } return true ; }
Source:
public void testInvalidUpdateOfNonEditableFieldOnRunningHost ( ) { org.ovirt.engine.core.common.businessentities.VdsStatic src = new org.ovirt.engine.core.common.businessentities.VdsStatic ( ) ; src.setServerSslEnabled ( true ) ; org.ovirt.engine.core.common.businessentities.VdsStatic dest = new org.ovirt.engine.core.common.businessentities.VdsStatic ( ) ; dest.setServerSslEnabled ( false ) ; boolean updateIsValid = vdsHandler.isUpdateValid ( src , dest , VDSStatus.Up ) ; org.junit.Assert.assertFalse ( "Update should not be valid for different server SSL enabled states" , updateIsValid ) ; }

Target:
public void testInvalidUpdateOfNonEditableFieldOnRunningHost ( ) { org.ovirt.engine.core.common.businessentities.VdsStatic src = new org.ovirt.engine.core.common.businessentities.VdsStatic ( ) ; src.setServerSslEnabled ( true ) ; org.ovirt.engine.core.common.businessentities.VdsStatic dest = new org.ovirt.engine.core.common.businessentities.VdsStatic ( ) ; dest.setServerSslEnabled ( false ) ; boolean updateIsValid = vdsHandler.isUpdateValid ( src , dest , VDSStatus.Up ) ; org.junit.jupiter.api.Assertions.assertFalse ( updateIsValid , "Update should not be valid for different server SSL enabled states" ) ; }
Source:
public void testVmOvfCreation ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.VM vm = org.ovirt.engine.core.utils.ovf.OvfManagerTest.createVM ( ) ; java.lang.String xml = manager.exportVm ( vm , new java.util.ArrayList < > ( ) , Version.v3_1 ) ; org.junit.Assert.assertNotNull ( xml ) ; final org.ovirt.engine.core.common.businessentities.VM newVm = new org.ovirt.engine.core.common.businessentities.VM ( ) ; manager.importVm ( xml , newVm , new java.util.ArrayList < > ( ) , new java.util.ArrayList < > ( ) ) ; org.ovirt.engine.core.utils.ovf.OvfManagerTest.assertVm ( vm , newVm , vm.getDbGeneration ( ) ) ; }

Target:
public void testVmOvfCreation ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.VM vm = org.ovirt.engine.core.utils.ovf.OvfManagerTest.createVM ( ) ; java.lang.String xml = manager.exportVm ( vm , new java.util.ArrayList < > ( ) , Version.v3_6 ) ; org.junit.Assert.assertNotNull ( xml ) ; final org.ovirt.engine.core.common.businessentities.VM newVm = new org.ovirt.engine.core.common.businessentities.VM ( ) ; manager.importVm ( xml , newVm , new java.util.ArrayList < > ( ) , new java.util.ArrayList < > ( ) ) ; org.ovirt.engine.core.utils.ovf.OvfManagerTest.assertVm ( vm , newVm , vm.getDbGeneration ( ) ) ; }
Source:
public boolean getUseLocalDrives ( ) { return false ; }

Target:
public static boolean isBrowserSupported ( ) { org.ovirt.engine.ui.common.uicommon.ClientAgentType cat = new org.ovirt.engine.ui.common.uicommon.ClientAgentType ( ) ; org.ovirt.engine.ui.common.uicommon.IRdpImpl.logger.finer ( ( ( ( ( ( ( "Determining whether browser [" + ( cat.browser ) ) + "], version [" ) + ( cat.version ) ) + "] on OS [" ) + ( cat.os ) ) + "] is supported by spice" ) ) ; if ( ( ( cat.os.equalsIgnoreCase ( "Windows" ) ) && ( cat.browser.equalsIgnoreCase ( "Explorer" ) ) ) && ( ( cat.version ) >= 7.0 ) ) { return true ; } return false ; }
Source:
public java.util.List < org.ovirt.engine.core.common.businessentities.AuditLog > getAllByVMTemplateName ( java.lang.String vmName , org.ovirt.engine.core.compat.Guid userID , boolean isFiltered ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "vm_template_name" , vmName ) . addValue ( "user_id" , userID ) . addValue ( "is_filtered" , isFiltered ) ; return getCallsHandler ( ) . executeReadList ( "GetAuditLogByVMTemplateName" , org.ovirt.engine.core.dao.AuditLogDAODbFacadeImpl.auditLogRowMapper , parameterSource ) ; }

Target:
public java.util.List < org.ovirt.engine.core.common.businessentities.AuditLog > getAllByVMTemplateId ( org.ovirt.engine.core.compat.Guid vmId , org.ovirt.engine.core.compat.Guid userID , boolean isFiltered ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "vm_template_id" , vmId ) . addValue ( "user_id" , userID ) . addValue ( "is_filtered" , isFiltered ) ; return getCallsHandler ( ) . executeReadList ( "GetAuditLogByVMTemplateId" , org.ovirt.engine.core.dao.AuditLogDAODbFacadeImpl.auditLogRowMapper , parameterSource ) ; }
Source:
public void getVmList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String poolName ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > vms = org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VM > cast ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.IVdcQueryable > ) ( source ) ) ) ; return vms ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( ( "Vms: pool=" + poolName ) , org.ovirt.engine.core.common.interfaces.SearchType.VM ) , aQuery ) ; }

Target:
public void getUpHostListByCluster ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String clusterName ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : java.util.Collections.emptyList ( ) ; } } ; getUpHostListByCluster ( aQuery , clusterName , null ) ; }
Source:
protected boolean checkIfNeedToBeOverride ( ) { if ( ( ( ( org.ovirt.engine.core.bll.MoveOrCopyDiskCommand.getParameters ( ) . getOperation ( ) ) == ( org.ovirt.engine.core.common.businessentities.ImageOperation.Copy ) ) && ( ! ( org.ovirt.engine.core.bll.MoveOrCopyDiskCommand.getParameters ( ) . getForceOverride ( ) ) ) ) && ( org.ovirt.engine.core.bll.MoveOrCopyDiskCommand.getImage ( ) . getStorageIds ( ) . contains ( org.ovirt.engine.core.bll.MoveOrCopyDiskCommand.getStorageDomain ( ) . getId ( ) ) ) ) { return failCanDoAction ( VdcBllMessages.ACTION_TYPE_FAILED_IMAGE_ALREADY_EXISTS ) ; } return true ; }

Target:
protected boolean checkIfNeedToBeOverride ( ) { if ( ( ( ( org.ovirt.engine.core.bll.MoveOrCopyDiskCommand.getParameters ( ) . getOperation ( ) ) == ( org.ovirt.engine.core.common.businessentities.storage.ImageOperation.Copy ) ) && ( ! ( org.ovirt.engine.core.bll.MoveOrCopyDiskCommand.getParameters ( ) . getForceOverride ( ) ) ) ) && ( org.ovirt.engine.core.bll.MoveOrCopyDiskCommand.getImage ( ) . getStorageIds ( ) . contains ( org.ovirt.engine.core.bll.MoveOrCopyDiskCommand.getStorageDomain ( ) . getId ( ) ) ) ) { return failCanDoAction ( VdcBllMessages.ACTION_TYPE_FAILED_IMAGE_ALREADY_EXISTS ) ; } return true ; }
Source:
private void translateErrors ( final java.util.Collection < org.ovirt.engine.core.common.action.VdcReturnValueBase > errors ) { for ( org.ovirt.engine.core.common.action.VdcReturnValueBase retVal : errors ) { if ( ! ( retVal.getCanDoAction ( ) ) ) { retVal.setCanDoActionMessages ( ( ( java.util.ArrayList < java.lang.String > ) ( translateError ( retVal ) ) ) ) ; } else if ( ! ( retVal.getSucceeded ( ) ) ) { org.ovirt.engine.core.common.errors.EngineFault fault = retVal.getFault ( ) ; fault.setMessage ( translateEngineFault ( fault ) ) ; } } }

Target:
private void translateErrors ( final java.util.Collection < org.ovirt.engine.core.common.action.VdcReturnValueBase > errors ) { for ( org.ovirt.engine.core.common.action.VdcReturnValueBase retVal : errors ) { if ( ! ( retVal.isValid ( ) ) ) { retVal.setValidationMessages ( ( ( java.util.ArrayList < java.lang.String > ) ( translateError ( retVal ) ) ) ) ; } else if ( ! ( retVal.getSucceeded ( ) ) ) { org.ovirt.engine.core.common.errors.EngineFault fault = retVal.getFault ( ) ; fault.setMessage ( translateEngineFault ( fault ) ) ; } } }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { java.util.List < org.ovirt.engine.ui.uicommonweb.models.EntityModel < org.ovirt.engine.core.common.businessentities.VM > > externalVms = new java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.EntityModel < org.ovirt.engine.core.common.businessentities.VM > > ( ) ; for ( org.ovirt.engine.core.common.businessentities.VM vm : ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . < java.util.List < org.ovirt.engine.core.common.businessentities.VM > > getReturnValue ( ) ) { externalVms.add ( new org.ovirt.engine.ui.uicommonweb.models.EntityModel < org.ovirt.engine.core.common.businessentities.VM > ( vm ) ) ; } this . externalVmModels.setItems ( externalVms ) ; stopProgress ( ) ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { updateVms ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . < java.util.List < org.ovirt.engine.core.common.businessentities.VM > > getReturnValue ( ) ) ; }
Source:
private void sortReportedConfigurationList ( ) { java.util.Comparator < org.ovirt.engine.core.common.businessentities.network.ReportedConfiguration > reportedConfigurationComparator = new java.util.Comparator < org.ovirt.engine.core.common.businessentities.network.ReportedConfiguration > ( ) { @ java.lang.Override public int compare ( org.ovirt.engine.core.common.businessentities.network.ReportedConfiguration reportedConfiguration , org.ovirt.engine.core.common.businessentities.network.ReportedConfiguration t1 ) { return reportedConfiguration.getType ( ) . getName ( ) . compareTo ( t1.getType ( ) . getName ( ) ) ; } } ; java.util.Collections.sort ( reportedConfigurationList , reportedConfigurationComparator ) ; }

Target:
private void sortReportedConfigurationList ( ) { java.util.Collections.sort ( reportedConfigurationList , java.util.Comparator.comparing ( ( r ) -> r.getType ( ) . getName ( ) ) ) ; }
Source:
public boolean isMixedTypeDC ( org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain ) { boolean isBlockDomain = storageDomain.getStorageType ( ) . isBlockDomain ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > poolDomains = org.ovirt.engine.core.bll.storage.StorageHandlingCommandBase.getStorageDomainDAO ( ) . getAllForStoragePool ( org.ovirt.engine.core.bll.storage.StorageHandlingCommandBase.getStoragePoolId ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.StorageDomain currSD : poolDomains ) { if ( ( ! ( isStorageDomainOfTypeIsoOrExport ( currSD ) ) ) && ( ( currSD.getStorageType ( ) . isBlockDomain ( ) ) != isBlockDomain ) ) { addCanDoActionMessage ( VdcBllMessages.ACTION_TYPE_FAILED_MIXED_STORAGE_TYPES_NOT_ALLOWED ) ; return true ; } } return false ; }

Target:
public boolean isMixedTypeDC ( org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain ) { boolean isBlockDomain = storageDomain.getStorageType ( ) . isBlockDomain ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.StorageType > storageTypesOnPool = org.ovirt.engine.core.bll.storage.StorageHandlingCommandBase.getStoragePoolDAO ( ) . getStorageTypesInPool ( org.ovirt.engine.core.bll.storage.StorageHandlingCommandBase.getStoragePoolId ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.StorageType storageType : storageTypesOnPool ) { if ( ( storageType.isBlockDomain ( ) ) != isBlockDomain ) { addCanDoActionMessage ( VdcBllMessages.ACTION_TYPE_FAILED_MIXED_STORAGE_TYPES_NOT_ALLOWED ) ; return true ; } } return false ; }
Source:
protected void executeQuery ( org.ovirt.engine.extensions.aaa.builtin.kerberosldap.DirectorySearcher directorySearcher ) { final java.util.List < org.ovirt.engine.core.common.businessentities.LdapUser > userList = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.LdapUser > ( ) ; @ java.lang.SuppressWarnings ( value = "unchecked" ) final java.util.List < org.ovirt.engine.core.common.businessentities.LdapUser > usersList = ( ( java.util.List < org.ovirt.engine.core.common.businessentities.LdapUser > ) ( directorySearcher.findAll ( getLdapQueryData ( ) ) ) ) ; for ( final org.ovirt.engine.core.common.businessentities.LdapUser searchResult : usersList ) { { org.ovirt.engine.core.common.businessentities.LdapUser user = populateUserData ( searchResult , getLdapQueryData ( ) . getDomain ( ) , populateGroups ) ; userList.add ( user ) ; } } setReturnValue ( userList ) ; setSucceeded ( true ) ; }

Target:
protected void executeQuery ( org.ovirt.engine.extensions.aaa.builtin.kerberosldap.DirectorySearcher directorySearcher ) { final java.util.List < org.ovirt.engine.core.common.businessentities.aaa.LdapUser > userList = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.aaa.LdapUser > ( ) ; @ java.lang.SuppressWarnings ( value = "unchecked" ) final java.util.List < org.ovirt.engine.core.common.businessentities.aaa.LdapUser > usersList = ( ( java.util.List < org.ovirt.engine.core.common.businessentities.aaa.LdapUser > ) ( directorySearcher.findAll ( getLdapQueryData ( ) ) ) ) ; for ( final org.ovirt.engine.core.common.businessentities.aaa.LdapUser searchResult : usersList ) { { org.ovirt.engine.core.common.businessentities.aaa.LdapUser user = populateUserData ( searchResult , getLdapQueryData ( ) . getDomain ( ) , populateGroups ) ; userList.add ( user ) ; } } setReturnValue ( userList ) ; setSucceeded ( true ) ; }