auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void serialize ( org.ovirt.engine.api.extensions.ExtKey extKey , org.codehaus.jackson.JsonGenerator jsonGenerator , org.codehaus.jackson.map.SerializerProvider serializerProvider ) throws java.io.IOException , org.codehaus.jackson.JsonProcessingException { jsonGenerator.writeFieldName ( ( ( ( ( ( extKey.getUuid ( ) . getName ( ) ) + ";" ) + ( extKey.getType ( ) . getName ( ) ) ) + ";" ) + ( extKey.getUuid ( ) . getUuid ( ) ) ) ) ; }

Target:
public void serialize ( org.ovirt.engine.api.extensions.ExtKey extKey , org.codehaus.jackson.JsonGenerator jsonGenerator , org.codehaus.jackson.map.SerializerProvider serializerProvider ) throws java.io.IOException , org.codehaus.jackson.JsonProcessingException { jsonGenerator.writeFieldName ( java.lang.String.format ( "%s;%s;%s" , extKey.getUuid ( ) . getName ( ) , extKey.getType ( ) . getName ( ) , extKey.getUuid ( ) . getUuid ( ) ) ) ; }
Source:
public static void getGlusterHook ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hookId , boolean includeServerHooks ) { 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.GetGlusterHookById , new org.ovirt.engine.core.common.queries.gluster.GlusterHookQueryParameters ( hookId , includeServerHooks ) , aQuery ) ; }

Target:
public static void getGlusterHooks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterHooks , new org.ovirt.engine.core.common.queries.gluster.GlusterParameters ( clusterId ) , aQuery ) ; }
Source:
public void validateNoDisksSpecified ( ) { initVm ( VMStatus.Up , org.ovirt.engine.core.compat.Guid.newGuid ( ) , null ) ; org.junit.Assert.assertFalse ( command.validate ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getValidationMessages ( ) . contains ( EngineMessage.ACTION_TYPE_FAILED_NO_DISKS_SPECIFIED.toString ( ) ) ) ; }

Target:
public void validateInvalidDestinationDomain ( ) { org.ovirt.engine.core.common.businessentities.StorageDomain srcStorageDomain = initStorageDomain ( srcStorageId ) ; srcStorageDomain.setStatus ( StorageDomainStatus.Active ) ; org.ovirt.engine.core.common.businessentities.StorageDomain dstStorageDomain = initStorageDomain ( dstStorageId ) ; dstStorageDomain.setStatus ( StorageDomainStatus.Active ) ; dstStorageDomain.setStorageDomainType ( StorageDomainType.ISO ) ; initDiskImage ( diskImageGroupId , diskImageId ) ; initVm ( VMStatus.Up , org.ovirt.engine.core.compat.Guid.newGuid ( ) , diskImageGroupId ) ; org.junit.Assert.assertFalse ( command.validate ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getValidationMessages ( ) . contains ( EngineMessage.ACTION_TYPE_FAILED_STORAGE_DOMAIN_TYPE_ILLEGAL.toString ( ) ) ) ; }
Source:
public void testUnsubscribe ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.event_subscriber > before = dao.getAllForSubscriber ( existingSubscriber ) ; org.junit.Assert.assertFalse ( before.isEmpty ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.event_subscriber subscriber : before ) { dao.unsubscribe ( subscriber ) ; } java.util.List < org.ovirt.engine.core.common.businessentities.event_subscriber > after = dao.getAllForSubscriber ( existingSubscriber ) ; org.junit.Assert.assertNotNull ( after ) ; org.junit.Assert.assertTrue ( after.isEmpty ( ) ) ; }

Target:
public void testUnsubscribe ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.EventSubscriber > before = dao.getAllForSubscriber ( existingSubscriber ) ; org.junit.Assert.assertFalse ( before.isEmpty ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.EventSubscriber subscriber : before ) { dao.unsubscribe ( subscriber ) ; } java.util.List < org.ovirt.engine.core.common.businessentities.EventSubscriber > after = dao.getAllForSubscriber ( existingSubscriber ) ; org.junit.Assert.assertNotNull ( after ) ; org.junit.Assert.assertTrue ( after.isEmpty ( ) ) ; }
Source:
public void testSortItems_nullComparator ( ) { java.util.List < org.ovirt.engine.ui.uicommonweb.models.SortedListModelTest.TestItem > initial = java.util.Arrays.asList ( org.ovirt.engine.ui.uicommonweb.models.SortedListModelTest.ITEM_1_2 , org.ovirt.engine.ui.uicommonweb.models.SortedListModelTest.ITEM_1_1 ) ; testedModel.setComparator ( null ) ; java.util.Collection < org.ovirt.engine.ui.uicommonweb.models.SortedListModelTest.TestItem > sorted = testedModel.sortItems ( initial ) ; org.junit.Assert.assertEquals ( sorted , initial ) ; }

Target:
public void testSortItems_nullComparator ( ) { java.util.List < org.ovirt.engine.ui.uicommonweb.models.SortedListModelTest.TestItem > initial = java.util.Arrays.asList ( org.ovirt.engine.ui.uicommonweb.models.SortedListModelTest.ITEM_1_2 , org.ovirt.engine.ui.uicommonweb.models.SortedListModelTest.ITEM_1_1 ) ; testedModel.setComparator ( null ) ; java.util.Collection < org.ovirt.engine.ui.uicommonweb.models.SortedListModelTest.TestItem > sorted = testedModel.sortItems ( initial ) ; org.junit.jupiter.api.Assertions.assertEquals ( sorted , initial ) ; }
Source:
private org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidator createValidatorForTestingValidateQosOverridden ( org.ovirt.engine.core.common.businessentities.network.Network network ) { org.ovirt.engine.core.common.businessentities.network.NetworkAttachment networkAttachment = new org.ovirt.engine.core.common.businessentities.network.NetworkAttachment ( ) ; networkAttachment.setNetworkId ( network.getId ( ) ) ; networkAttachment.setHostNetworkQos ( new org.ovirt.engine.core.common.businessentities.network.HostNetworkQos ( ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.network.NetworkAttachment > networkAttachments = java.util.Collections.singletonList ( networkAttachment ) ; org.ovirt.engine.core.common.action.HostSetupNetworksParameters params = new org.ovirt.engine.core.common.action.HostSetupNetworksParameters ( host.getId ( ) ) ; params.setNetworkAttachments ( networkAttachments ) ; return new org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidatorTest.HostSetupNetworksValidatorBuilder ( ) . setHost ( host ) . setParams ( params ) . addNetworks ( network ) . build ( ) ; }

Target:
private org.ovirt.engine.core.common.action.HostSetupNetworksParameters build ( ) { parameters.setVdsId ( host.getId ( ) ) ; return parameters ; }
Source:
private org.ovirt.engine.api.model.Permits getPermits ( ) { org.ovirt.engine.api.model.Permits permits = new org.ovirt.engine.api.model.Permits ( ) ; for ( org.ovirt.engine.api.model.PermitType permit : org.ovirt.engine.api.model.PermitType.values ( ) ) { permits.getPermits ( ) . add ( map ( permit ) ) ; } return permits ; }

Target:
private void addVmPoolTypes ( org.ovirt.engine.api.model.VersionCaps version , org.ovirt.engine.api.model.VmPoolType [ ] values ) { if ( org.ovirt.engine.api.restapi.utils.VersionUtils.greaterOrEqual ( version , org.ovirt.engine.api.restapi.resource.BackendCapabilitiesResource.VERSION_3_6 ) ) { org.ovirt.engine.api.model.VmPoolTypes types = new org.ovirt.engine.api.model.VmPoolTypes ( ) ; for ( org.ovirt.engine.api.model.VmPoolType state : values ) { types.getVmPoolTypes ( ) . add ( state.value ( ) ) ; } version.setVmPoolTypes ( types ) ; } }
Source:
public org.ovirt.engine.core.common.businessentities.network.VnicProfile get ( org.ovirt.engine.core.compat.Guid id , org.ovirt.engine.core.compat.Guid userID , boolean isFiltered ) { return getCallsHandler ( ) . executeRead ( getProcedureNameForGet ( ) , org.ovirt.engine.core.dao.network.VnicProfileDaoDbFacadeImpl.VnicProfileRowMapper.INSTANCE , getCustomMapSqlParameterSource ( ) . addValue ( "id" , id ) . addValue ( "user_id" , userID ) . addValue ( "is_filtered" , isFiltered ) ) ; }

Target:
protected org.springframework.jdbc.core.namedparam.MapSqlParameterSource createFullParametersMapper ( org.ovirt.engine.core.common.businessentities.network.VnicProfile profile ) { return createIdParameterMapper ( profile.getId ( ) ) . addValue ( "name" , profile.getName ( ) ) . addValue ( "network_id" , profile.getNetworkId ( ) ) . addValue ( "port_mirroring" , profile.isPortMirroring ( ) ) . addValue ( "description" , profile.getDescription ( ) ) . addValue ( "custom_properties" , org.ovirt.engine.core.utils.SerializationFactory.getSerializer ( ) . serialize ( profile.getCustomProperties ( ) ) ) ; }
Source:
public com.google.gwt.resources.client.ImageResource getValue ( IVdcQueryable quota ) { boolean quotaExceeded = false ; if ( quota instanceof org.ovirt.engine.core.common.businessentities.QuotaStorage ) { quotaExceeded = getQuotaExceeded ( ( ( org.ovirt.engine.core.common.businessentities.QuotaStorage ) ( quota ) ) ) ; } else if ( quota instanceof org.ovirt.engine.core.common.businessentities.QuotaVdsGroup ) { quotaExceeded = getQuotaExceeded ( ( ( org.ovirt.engine.core.common.businessentities.QuotaVdsGroup ) ( quota ) ) ) ; } else { return null ; } if ( quotaExceeded ) { setTitle ( org.ovirt.engine.ui.webadmin.widget.table.column.QuotaUtilizationStatusColumn.applicationConstants.quotaExceeded ( ) ) ; } return quotaExceeded ? getResources ( ) . alertImage ( ) : null ; }

Target:
public com.google.gwt.resources.client.ImageResource getValue ( IVdcQueryable quota ) { boolean quotaExceeded = false ; if ( quota instanceof org.ovirt.engine.core.common.businessentities.QuotaStorage ) { quotaExceeded = getQuotaExceeded ( ( ( org.ovirt.engine.core.common.businessentities.QuotaStorage ) ( quota ) ) ) ; } else if ( quota instanceof org.ovirt.engine.core.common.businessentities.QuotaVdsGroup ) { quotaExceeded = getQuotaExceeded ( ( ( org.ovirt.engine.core.common.businessentities.QuotaVdsGroup ) ( quota ) ) ) ; } else { return null ; } if ( quotaExceeded ) { setTitle ( org.ovirt.engine.ui.webadmin.widget.table.column.QuotaUtilizationStatusColumn.constants.quotaExceeded ( ) ) ; } return quotaExceeded ? org.ovirt.engine.ui.webadmin.widget.table.column.QuotaUtilizationStatusColumn.resources.alertImage ( ) : null ; }
Source:
private java.util.Set < org.ovirt.engine.core.common.businessentities.network.Network > getNetworksToConfigure ( java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > nics , java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > labeledNetworks ) { java.util.Map < java.lang.String , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > nicsByNetworkName = org.ovirt.engine.core.common.businessentities.Entities.hostInterfacesByNetworkName ( nics ) ; java.util.Set < org.ovirt.engine.core.common.businessentities.network.Network > networkToAdd = new java.util.HashSet < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.network.Network network : labeledNetworks ) { if ( ! ( nicsByNetworkName.containsKey ( network.getName ( ) ) ) ) { networkToAdd.add ( network ) ; } } return networkToAdd ; }

Target:
private java.util.Set < org.ovirt.engine.core.common.businessentities.network.Network > getNetworksToConfigure ( java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > nics , java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > labeledNetworks ) { java.util.Map < java.lang.String , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > nicsByNetworkName = org.ovirt.engine.core.utils.NetworkUtils.hostInterfacesByNetworkName ( nics ) ; java.util.Set < org.ovirt.engine.core.common.businessentities.network.Network > networkToAdd = new java.util.HashSet < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.network.Network network : labeledNetworks ) { if ( ! ( nicsByNetworkName.containsKey ( network.getName ( ) ) ) ) { networkToAdd.add ( network ) ; } } return networkToAdd ; }
Source:
public static void getDataCenterList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( "DataCenter: sortby name" , org.ovirt.engine.core.common.interfaces.SearchType.StoragePool ) , aQuery ) ; }

Target:
public static void getClusterListByName ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String name ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( ( ( "Cluster: name=" + name ) + " sortby name" ) , org.ovirt.engine.core.common.interfaces.SearchType.Cluster ) , aQuery ) ; }
Source:
public void updateChangeConnectionType ( ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections iscsiConnection = createISCSIConnection ( "10.35.16.25" , StorageType.ISCSI , "" , "user1" , "mypassword123" ) ; parameters.setStorageServerConnection ( iscsiConnection ) ; org.mockito.Mockito.when ( storageConnDao.get ( iscsiConnection.getid ( ) ) ) . thenReturn ( oldNFSConnection ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( command , VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_CONNECTION_UNSUPPORTED_CHANGE_STORAGE_TYPE ) ; }

Target:
public void updateChangeConnectionType ( ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections iscsiConnection = createISCSIConnection ( "10.35.16.25" , StorageType.ISCSI , "iqn.2013-04.myhat.com:aaa-target1" , "user1" , "mypassword123" ) ; parameters.setStorageServerConnection ( iscsiConnection ) ; org.mockito.Mockito.when ( storageConnDao.get ( iscsiConnection.getid ( ) ) ) . thenReturn ( oldNFSConnection ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( command , VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_CONNECTION_UNSUPPORTED_CHANGE_STORAGE_TYPE ) ; }
Source:
public void onRemoval ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > storageDomains = getDbFacade ( ) . getStorageDomainDao ( ) . getAllByConnectionId ( provider.getId ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.StorageDomain storageDomainEntry : storageDomains ) { getDbFacade ( ) . getStorageDomainDynamicDao ( ) . remove ( storageDomainEntry.getId ( ) ) ; getDbFacade ( ) . getStorageDomainStaticDao ( ) . remove ( storageDomainEntry.getId ( ) ) ; } }

Target:
public org.ovirt.engine.core.bll.provider.ProviderValidator getProviderValidator ( ) { if ( ( providerValidator ) == null ) { providerValidator = new org.ovirt.engine.core.bll.provider.ProviderValidator ( provider ) ; } return providerValidator ; }
Source:
protected java.util.Map [ ] getVmInfo ( java.util.List < java.lang.String > vmsToUpdate ) { org.ovirt.engine.core.common.businessentities.VDS vds = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; vds.setId ( vdsManager.getVdsId ( ) ) ; return ( ( java.util.Map [ ] ) ( new org.ovirt.engine.core.vdsbroker.vdsbroker.FullListVdsCommand < org.ovirt.engine.core.common.vdscommands.FullListVDSCommandParameters > ( new org.ovirt.engine.core.common.vdscommands.FullListVDSCommandParameters ( vds , vmsToUpdate ) ) . executeWithReturnValue ( ) ) ) ; }

Target:
protected java.util.Map [ ] getVmInfo ( java.util.List < java.lang.String > vmsToUpdate ) { org.ovirt.engine.core.common.businessentities.VDS vds = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; vds.setId ( vdsManager.getVdsId ( ) ) ; java.util.Map [ ] result = new java.util.Map [ ] { } ; org.ovirt.engine.core.common.vdscommands.VDSReturnValue vdsReturnValue = getResourceManager ( ) . runVdsCommand ( VDSCommandType.FullList , new org.ovirt.engine.core.common.vdscommands.FullListVDSCommandParameters ( vds , vmsToUpdate ) ) ; if ( vdsReturnValue.getSucceeded ( ) ) { result = ( ( java.util.Map [ ] ) ( vdsReturnValue.getReturnValue ( ) ) ) ; } return result ; }
Source:
public void testList_LimitResults ( ) throws java.lang.Exception { javax.ws.rs.core.UriInfo uriInfo = setUpUriExpectationsWithMax ( false ) ; setUpQueryExpectations ( "" ) ; collection.setUriInfo ( uriInfo ) ; java.util.List < org.ovirt.engine.api.model.Tag > results = getCollection ( ) ; assertNotNull ( collection ) ; assertEquals ( 3 , results.size ( ) ) ; }

Target:
public void testListLimitResults ( ) throws java.lang.Exception { javax.ws.rs.core.UriInfo uriInfo = setUpUriExpectationsWithMax ( false ) ; setUpQueryExpectations ( "" ) ; collection.setUriInfo ( uriInfo ) ; java.util.List < org.ovirt.engine.api.model.Tag > results = getCollection ( ) ; assertNotNull ( collection ) ; assertEquals ( 3 , results.size ( ) ) ; }
Source:
public org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidatorTest.ParametersBuilder addLabels ( org.ovirt.engine.core.common.businessentities.network.NicLabel ... nicLabels ) { if ( emptyParameters ( nicLabels ) ) { return this ; } if ( ( parameters.getLabels ( ) ) == null ) { parameters.setLabels ( new java.util.HashSet < org.ovirt.engine.core.common.businessentities.network.NicLabel > ( ) ) ; } parameters.getLabels ( ) . addAll ( java.util.Arrays.asList ( nicLabels ) ) ; return this ; }

Target:
public org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidatorTest.ParametersBuilder addNetworkAttachments ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment ... networkAttachments ) { if ( nullParameters ( networkAttachments ) ) { return this ; } if ( ( parameters.getNetworkAttachments ( ) ) == null ) { parameters.setNetworkAttachments ( new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.NetworkAttachment > ( ) ) ; } parameters.getNetworkAttachments ( ) . addAll ( java.util.Arrays.asList ( networkAttachments ) ) ; return this ; }
Source:
public static void getCPUList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Version version ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ServerCpu > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ServerCpu > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllServerCpuList , new org.ovirt.engine.core.common.queries.GetAllServerCpuListParameters ( version ) , aQuery ) ; }

Target:
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.getInstance ( ) . runQuery ( VdcQueryType.GetAllNetworks , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) , aQuery ) ; }
Source:
private void endCreateAllSnapshots ( ) { org.ovirt.engine.core.bll.Backend.getInstance ( ) . endAction ( VdcActionType.CreateAllSnapshotsFromVm , getCreateSnapshotParameters ( ) , org.ovirt.engine.core.bll.job.ExecutionHandler.createDefaultContexForTasks ( enclosingCommand.getExecutionContext ( ) ) ) ; }

Target:
private void endCreateAllSnapshots ( ) { org.ovirt.engine.core.common.action.VdcReturnValueBase returnValue = org.ovirt.engine.core.bll.Backend.getInstance ( ) . endAction ( VdcActionType.CreateAllSnapshotsFromVm , getCreateSnapshotParameters ( ) , org.ovirt.engine.core.bll.job.ExecutionHandler.createDefaultContexForTasks ( enclosingCommand.getExecutionContext ( ) ) ) ; enclosingCommand.getReturnValue ( ) . setSucceeded ( returnValue.getSucceeded ( ) ) ; }
Source:
public void testGetSupportedFeaturesByClusterId ( ) { java.util.Set < org.ovirt.engine.core.common.businessentities.SupportedAdditionalClusterFeature > featuresSupportedInCluster = dao.getSupportedFeaturesByClusterId ( org.ovirt.engine.core.dao.ClusterFeatureDaoTest.EXISTING_VDS_GROUP ) ; java.util.List < java.lang.String > expectedFeatures = java.util.Arrays.asList ( "TEST_FEATURE_1" , "TEST_FEATURE_2" , "TEST_FEATURE_3" ) ; org.junit.Assert.assertNotNull ( "Failed to retrive supported additional features for the cluster" , featuresSupportedInCluster ) ; org.junit.Assert.assertThat ( "Failed to retrive correct set of features for the given version and category" , featuresSupportedInCluster , org.hamcrest.Matchers.hasSize ( expectedFeatures.size ( ) ) ) ; for ( org.ovirt.engine.core.common.businessentities.SupportedAdditionalClusterFeature supportedFeatures : featuresSupportedInCluster ) { org.junit.Assert.assertThat ( "Wrong feature returned from DB" , expectedFeatures , org.hamcrest.Matchers.hasItem ( supportedFeatures.getFeature ( ) . getName ( ) ) ) ; } }

Target:
public void testGetSupportedFeaturesByClusterId ( ) { java.util.Set < org.ovirt.engine.core.common.businessentities.SupportedAdditionalClusterFeature > featuresSupportedInCluster = dao.getSupportedFeaturesByClusterId ( org.ovirt.engine.core.dao.ClusterFeatureDaoTest.EXISTING_CLUSTER ) ; java.util.List < java.lang.String > expectedFeatures = java.util.Arrays.asList ( "TEST_FEATURE_1" , "TEST_FEATURE_2" , "TEST_FEATURE_3" ) ; org.junit.Assert.assertNotNull ( "Failed to retrive supported additional features for the cluster" , featuresSupportedInCluster ) ; org.junit.Assert.assertThat ( "Failed to retrive correct set of features for the given version and category" , featuresSupportedInCluster , org.hamcrest.Matchers.hasSize ( expectedFeatures.size ( ) ) ) ; for ( org.ovirt.engine.core.common.businessentities.SupportedAdditionalClusterFeature supportedFeatures : featuresSupportedInCluster ) { org.junit.Assert.assertThat ( "Wrong feature returned from DB" , expectedFeatures , org.hamcrest.Matchers.hasItem ( supportedFeatures.getFeature ( ) . getName ( ) ) ) ; } }
Source:
private void updateDirectLunDiskEnabled ( org.ovirt.engine.core.common.businessentities.StoragePool datacenter ) { if ( ( getDiskStorageType ( ) . getEntity ( ) ) != ( org.ovirt.engine.core.common.businessentities.Disk.DiskStorageType.LUN ) ) { return ; } boolean isDirectLUNDiskkEnabled = ( ( java.lang.Boolean ) ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getConfigValuePreConverted ( ConfigurationValues.DirectLUNDiskEnabled , datacenter.getCompatibilityVersion ( ) . getValue ( ) ) ) ) ; getIsDirectLunDiskAvaialable ( ) . setEntity ( isDirectLUNDiskkEnabled ) ; setMessage ( ( ! isDirectLUNDiskkEnabled ? org.ovirt.engine.ui.uicommonweb.models.vms.AbstractDiskModel.CONSTANTS.directLUNDiskNotSupported ( ) : "" ) ) ; }

Target:
private void updateDirectLunDiskEnabled ( org.ovirt.engine.core.common.businessentities.StoragePool datacenter ) { if ( ( getDiskStorageType ( ) . getEntity ( ) ) != ( org.ovirt.engine.core.common.businessentities.storage.Disk.DiskStorageType.LUN ) ) { return ; } boolean isDirectLUNDiskkEnabled = ( ( java.lang.Boolean ) ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getConfigValuePreConverted ( ConfigurationValues.DirectLUNDiskEnabled , datacenter.getCompatibilityVersion ( ) . getValue ( ) ) ) ) ; getIsDirectLunDiskAvaialable ( ) . setEntity ( isDirectLUNDiskkEnabled ) ; setMessage ( ( ! isDirectLUNDiskkEnabled ? org.ovirt.engine.ui.uicommonweb.models.vms.AbstractDiskModel.CONSTANTS.directLUNDiskNotSupported ( ) : "" ) ) ; }
Source:
public void getHostFingerprint ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String hostAddress ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetServerSSHKeyFingerprint , new org.ovirt.engine.core.common.queries.ServerParameters ( hostAddress ) , aQuery ) ; }

Target:
public void 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 ) ; }
Source:
public void getPoolById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid poolId ) { 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.GetVmPoolById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( poolId ) , aQuery ) ; }

Target:
public void getVmById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }
Source:
private static boolean IsAlreadySubscribed ( java.lang.Iterable < org.ovirt.engine.core.common.businessentities.event_subscriber > subscriptions , org.ovirt.engine.core.compat.Guid subscriberId , java.lang.String eventName , int methodId ) { boolean retval = false ; for ( org.ovirt.engine.core.common.businessentities.event_subscriber eventSubscriber : subscriptions ) { if ( ( ( subscriberId.equals ( eventSubscriber.getsubscriber_id ( ) ) ) && ( org.apache.commons.lang.StringUtils.equals ( eventSubscriber.getevent_up_name ( ) , eventName ) ) ) && ( ( eventSubscriber.getmethod_id ( ) ) == methodId ) ) { retval = true ; break ; } } return retval ; }

Target:
private static boolean IsAlreadySubscribed ( java.lang.Iterable < org.ovirt.engine.core.common.businessentities.event_subscriber > subscriptions , org.ovirt.engine.core.compat.Guid subscriberId , java.lang.String eventName , org.ovirt.engine.core.common.EventNotificationMethods eventNotificationMethod ) { boolean retval = false ; for ( org.ovirt.engine.core.common.businessentities.event_subscriber eventSubscriber : subscriptions ) { if ( ( ( subscriberId.equals ( eventSubscriber.getsubscriber_id ( ) ) ) && ( org.apache.commons.lang.StringUtils.equals ( eventSubscriber.getevent_up_name ( ) , eventName ) ) ) && ( ( eventSubscriber.getevent_notification_method ( ) ) == eventNotificationMethod ) ) { retval = true ; break ; } } return retval ; }
Source:
public boolean isHostExists ( java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterServerInfo > glusterServers , org.ovirt.engine.core.common.businessentities.VDS server ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterServer glusterServer = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getGlusterServerDao ( ) . getByServerId ( server.getId ( ) ) ; if ( glusterServer != null ) { for ( org.ovirt.engine.core.common.businessentities.gluster.GlusterServerInfo glusterServerInfo : glusterServers ) { if ( glusterServerInfo.getUuid ( ) . equals ( glusterServer.getGlusterServerUuid ( ) ) ) { return true ; } } } return false ; }

Target:
public boolean isHostExists ( java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterServerInfo > glusterServers , org.ovirt.engine.core.common.businessentities.VDS server ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterServer glusterServer = glusterServerDao.getByServerId ( server.getId ( ) ) ; if ( glusterServer != null ) { for ( org.ovirt.engine.core.common.businessentities.gluster.GlusterServerInfo glusterServerInfo : glusterServers ) { if ( glusterServerInfo.getUuid ( ) . equals ( glusterServer.getGlusterServerUuid ( ) ) ) { return true ; } } } return false ; }
Source:
private void setupConsole ( final org.ovirt.engine.ui.userportal.uicommon.model.basic.UserPortalBasicListProvider modelProvider ) { org.ovirt.engine.ui.uicommonweb.models.userportal.UserPortalItemModel item = modelProvider.getModel ( ) . getSelectedItem ( ) ; getView ( ) . setConsoleConnectLinkEnabled ( canConnectToConsole ( item ) ) ; getView ( ) . setEditConsoleEnabled ( isEditConsoleEnabled ( item ) ) ; if ( ! ( item.getVmConsoles ( ) . canConnectToConsole ( ) ) ) { getView ( ) . setConsoleWarningMessage ( item.getVmConsoles ( ) . cannotConnectReason ( ) ) ; } else { getView ( ) . setConsoleProtocol ( determineProtocolMessage ( item.getVmConsoles ( ) ) ) ; } }

Target:
private void setupConsole ( final org.ovirt.engine.ui.userportal.uicommon.model.basic.UserPortalBasicListProvider modelProvider ) { org.ovirt.engine.ui.uicommonweb.models.userportal.UserPortalItemModel item = modelProvider.getModel ( ) . getSelectedItem ( ) ; getView ( ) . setEditConsoleEnabled ( isEditConsoleEnabled ( item ) ) ; getView ( ) . setConsoleConnectLinkEnabled ( canConnectToConsole ( item ) ) ; getView ( ) . setConsoleProtocolMessage ( determineProtocolMessage ( item ) ) ; }
Source:
public java.lang.String getValue ( org.ovirt.engine.core.common.businessentities.DbUser object ) { return object.getGroupNames ( ) ; }

Target:
public java.lang.String getValue ( org.ovirt.engine.core.common.businessentities.DbUser object ) { java.lang.StringBuilder builder = new java.lang.StringBuilder ( ) ; int counter = 0 ; for ( java.lang.String name : object.getGroupNames ( ) ) { builder.append ( name ) ; if ( counter < ( ( object.getGroupNames ( ) . size ( ) ) - 1 ) ) { builder.append ( "," ) ; } } return builder.toString ( ) ; }
Source:
public static void updateSpecificActionJobCompleted ( org.ovirt.engine.core.compat.Guid entityId , org.ovirt.engine.core.common.action.VdcActionType actionType , boolean status ) { try { java.util.List < org.ovirt.engine.core.common.job.Job > jobs = org.ovirt.engine.core.bll.job.JobRepositoryFactory.getJobRepository ( ) . getJobsByEntityAndAction ( entityId , actionType ) ; for ( org.ovirt.engine.core.common.job.Job job : jobs ) { if ( ( job.getStatus ( ) ) == ( org.ovirt.engine.core.common.job.JobExecutionStatus.STARTED ) ) { job.markJobEnded ( status ) ; } org.ovirt.engine.core.bll.job.JobRepositoryFactory.getJobRepository ( ) . updateCompletedJobAndSteps ( job ) ; } } catch ( java.lang.RuntimeException e ) { org.ovirt.engine.core.bll.job.ExecutionHandler.log.error ( "Exception" , e ) ; } }

Target:
public void updateSpecificActionJobCompleted ( org.ovirt.engine.core.compat.Guid entityId , org.ovirt.engine.core.common.action.VdcActionType actionType , boolean status ) { try { java.util.List < org.ovirt.engine.core.common.job.Job > jobs = jobRepository.getJobsByEntityAndAction ( entityId , actionType ) ; for ( org.ovirt.engine.core.common.job.Job job : jobs ) { if ( ( job.getStatus ( ) ) == ( org.ovirt.engine.core.common.job.JobExecutionStatus.STARTED ) ) { job.markJobEnded ( status ) ; } jobRepository.updateCompletedJobAndSteps ( job ) ; } } catch ( java.lang.RuntimeException e ) { log.error ( "Exception" , e ) ; } }
Source:
public com.google.gwt.resources.client.ImageResource getValue ( org.ovirt.engine.core.common.scheduling.PolicyUnit object ) { if ( object.isInternal ( ) ) { setTitle ( constants.internalPolicyUnit ( ) ) ; return resources.lockImage ( ) ; } setTitle ( constants.externalPolicyUnit ( ) ) ; return resources.exteranlPolicyUnitImage ( ) ; }

Target:
public com.google.gwt.resources.client.ImageResource getValue ( org.ovirt.engine.core.common.scheduling.PolicyUnit object ) { if ( object.isInternal ( ) ) { return org.ovirt.engine.ui.webadmin.section.main.view.popup.scheduling.ManagePolicyUnitPopupView.resources.lockImage ( ) ; } return org.ovirt.engine.ui.webadmin.section.main.view.popup.scheduling.ManagePolicyUnitPopupView.resources.exteranlPolicyUnitImage ( ) ; }
Source:
public void getStorageConnectionsByDataCenterIdAndStorageType ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.common.businessentities.storage.StorageType storageType ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.core.common.queries.GetConnectionsByDataCenterAndStorageTypeParameters params = new org.ovirt.engine.core.common.queries.GetConnectionsByDataCenterAndStorageTypeParameters ( storagePoolId , storageType ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetConnectionsByDataCenterAndStorageType , params , aQuery ) ; }

Target:
public void getStorageDomainDefaultWipeAfterDelete ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.businessentities.storage.StorageType storageType ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean Convert ( java.lang.Object returnValue , org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery ) { return ( ( java.lang.Boolean ) ( returnValue ) ) ; } } ; org.ovirt.engine.core.common.queries.GetStorageDomainDefaultWipeAfterDeleteParameters params = new org.ovirt.engine.core.common.queries.GetStorageDomainDefaultWipeAfterDeleteParameters ( storageType ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainDefaultWipeAfterDelete , params , aQuery ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { java.util.Collection < org.ovirt.engine.core.common.businessentities.VDSGroup > clusters = ( ( java.util.Collection < org.ovirt.engine.core.common.businessentities.VDSGroup > ) ( returnValue ) ) ; dcClusters.put ( dcId , clusters ) ; attachNetworkToClusters ( network , clusters , publicUse ) ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { java.util.Collection < org.ovirt.engine.core.common.businessentities.VDSGroup > clusters = org.ovirt.engine.ui.uicommonweb.Linq.where ( ( ( java.util.Collection < org.ovirt.engine.core.common.businessentities.VDSGroup > ) ( returnValue ) ) , new org.ovirt.engine.ui.uicommonweb.Linq.IPredicate < org.ovirt.engine.core.common.businessentities.VDSGroup > ( ) { @ java.lang.Override public boolean match ( org.ovirt.engine.core.common.businessentities.VDSGroup source ) { return ( ( java.lang.Boolean ) ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigValuePreConverted ( ConfigurationValues.SupportCustomDeviceProperties , source.getcompatibility_version ( ) . getValue ( ) ) ) ) ; } } ) ; dcClusters.put ( dcId , clusters ) ; attachNetworkToClusters ( network , clusters , publicUse ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc glusterVolumeGeoRepConfigSet ( java.lang.String volumeName , java.lang.String slaveHost , java.lang.String slaveVolumeName , java.lang.String configKey , java.lang.String configValue ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "GlusterVolume.geoRepConfigSet" ) . withParameter ( "volumeName" , volumeName ) . withParameter ( "remoteHost" , slaveHost ) . withParameter ( "remoteVolumeName" , slaveVolumeName ) . withParameter ( "key" , configKey ) . withParameter ( "value" , configValue ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( response ) ; }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc glusterVolumeGeoRepConfigSet ( java.lang.String volumeName , java.lang.String slaveHost , java.lang.String slaveVolumeName , java.lang.String configKey , java.lang.String configValue ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "GlusterVolume.geoRepConfigSet" ) . withParameter ( "volumeName" , volumeName ) . withParameter ( "remoteHost" , slaveHost ) . withParameter ( "remoteVolumeName" , slaveVolumeName ) . withParameter ( "optionName" , configKey ) . withParameter ( "optionValue" , configValue ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( response ) ; }
Source:
protected void addCustomValuesStorage ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase auditLogableBase , java.lang.String quotaName , double storageUsagePercentage , double storageRequestedPercentage ) { auditLogableBase.addCustomValue ( "QuotaName" , quotaName ) ; auditLogableBase.addCustomValue ( "CurrentStorage" , org.ovirt.engine.core.bll.quota.QuotaManagerAuditLogger.percentageFormatter.format ( storageUsagePercentage ) ) ; auditLogableBase.addCustomValue ( "Requested" , org.ovirt.engine.core.bll.quota.QuotaManagerAuditLogger.percentageFormatter.format ( storageRequestedPercentage ) ) ; }

Target:
protected void addCustomValuesStorage ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase auditLogableBase , java.lang.String quotaName , org.ovirt.engine.core.compat.Guid quotaId , double storageUsagePercentage , double storageRequestedPercentage ) { auditLogableBase.addCustomValue ( "QuotaName" , quotaName ) ; auditLogableBase.addCustomValue ( "CurrentStorage" , org.ovirt.engine.core.bll.quota.QuotaManagerAuditLogger.percentageFormatter.format ( storageUsagePercentage ) ) ; auditLogableBase.addCustomValue ( "Requested" , org.ovirt.engine.core.bll.quota.QuotaManagerAuditLogger.percentageFormatter.format ( storageRequestedPercentage ) ) ; auditLogableBase.setQuotaNameForLog ( quotaName ) ; auditLogableBase.setQuotaIdForLog ( quotaId ) ; }
Source:
private void verifyRoleSaving ( boolean roleStatusChanged ) { for ( org.ovirt.engine.core.common.businessentities.ActionGroup group : getParams ( ) . getActionGroups ( ) ) { org.mockito.Mockito.verify ( getRoleGroupMapDAOMock ( ) ) . save ( new org.ovirt.engine.core.common.businessentities.RoleGroupMap ( group , getParams ( ) . getRoleId ( ) ) ) ; } if ( roleStatusChanged ) { org.mockito.Mockito.verify ( getRoleDAOMock ( ) ) . update ( getRole ( ) ) ; } org.mockito.Mockito.verifyNoMoreInteractions ( getRoleGroupMapDAOMock ( ) ) ; }

Target:
private void verifyRoleSaving ( boolean roleStatusChanged ) { for ( org.ovirt.engine.core.common.businessentities.ActionGroup group : getParams ( ) . getActionGroups ( ) ) { org.mockito.Mockito.verify ( getRoleGroupMapDaoMock ( ) ) . save ( new org.ovirt.engine.core.common.businessentities.RoleGroupMap ( group , getParams ( ) . getRoleId ( ) ) ) ; } if ( roleStatusChanged ) { org.mockito.Mockito.verify ( getRoleDaoMock ( ) ) . update ( getRole ( ) ) ; } org.mockito.Mockito.verifyNoMoreInteractions ( getRoleGroupMapDaoMock ( ) ) ; }
Source:
public static java.lang.Long determineImageInitialSize ( org.ovirt.engine.core.common.businessentities.storage.Image sourceImage , org.ovirt.engine.core.common.businessentities.storage.VolumeFormat destFormat , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.compat.Guid srcDomain , org.ovirt.engine.core.compat.Guid dstDomain , org.ovirt.engine.core.compat.Guid imageGroupID ) { if ( org.ovirt.engine.core.bll.storage.disk.image.ImagesHandler.isInitialSizeSupportedForFormat ( destFormat , dstDomain ) ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage imageInfoFromStorage = org.ovirt.engine.core.bll.storage.disk.image.ImagesHandler.getVolumeInfoFromVdsm ( storagePoolId , srcDomain , imageGroupID , sourceImage.getId ( ) ) ; return org.ovirt.engine.core.bll.storage.disk.image.ImagesHandler.computeCowImageNeededSize ( imageInfoFromStorage.getActualSizeInBytes ( ) ) ; } return null ; }

Target:
public java.lang.Long determineImageInitialSize ( org.ovirt.engine.core.common.businessentities.storage.Image sourceImage , org.ovirt.engine.core.common.businessentities.storage.VolumeFormat destFormat , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.compat.Guid srcDomain , org.ovirt.engine.core.compat.Guid dstDomain , org.ovirt.engine.core.compat.Guid imageGroupID ) { if ( isInitialSizeSupportedForFormat ( destFormat , dstDomain ) ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage imageInfoFromStorage = getVolumeInfoFromVdsm ( storagePoolId , srcDomain , imageGroupID , sourceImage.getId ( ) ) ; return org.ovirt.engine.core.bll.storage.disk.image.ImagesHandler.computeCowImageNeededSize ( sourceImage.getVolumeFormat ( ) , imageInfoFromStorage.getActualSizeInBytes ( ) ) ; } return null ; }
Source:
public void init ( final org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel model ) { updateReasonVisibility ( model ) ; model.getPropertyChangedEvent ( ) . addListener ( new org.ovirt.engine.ui.uicompat.IEventListener ( ) { @ java.lang.Override public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { java.lang.String propName = ( ( org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ) ( args ) ) . propertyName ; if ( "ReasonVisible" . equals ( propName ) ) { updateReasonVisibility ( model ) ; } } } ) ; super . init ( model ) ; }

Target:
public void init ( final org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel model ) { updateReasonVisibility ( model ) ; model.getPropertyChangedEvent ( ) . addListener ( new org.ovirt.engine.ui.uicompat.IEventListener < org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs > ( ) { @ java.lang.Override public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < ? extends org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs args ) { java.lang.String propName = args.propertyName ; if ( "ReasonVisible" . equals ( propName ) ) { updateReasonVisibility ( model ) ; } } } ) ; super . init ( model ) ; }
Source:
public static void IsCustomPropertiesAvailable ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String version ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Boolean ) ( source ) ) . booleanValue ( ) : true ; } } ; org.ovirt.engine.core.common.queries.GetConfigurationValueParameters tempVar = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.SupportCustomProperties ) ; tempVar.setVersion ( version ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( tempVar , aQuery ) ; }

Target:
public static boolean IsVersionMatchStorageType ( org.ovirt.engine.core.compat.Version version , org.ovirt.engine.core.common.businessentities.StorageType type ) { return ! ( ( ( type == ( org.ovirt.engine.core.common.businessentities.StorageType.LOCALFS ) ) && ( ( version.compareTo ( new org.ovirt.engine.core.compat.Version ( 2 , 2 ) ) ) <= 0 ) ) || ( ( type == ( org.ovirt.engine.core.common.businessentities.StorageType.POSIXFS ) ) && ( ( version.compareTo ( new org.ovirt.engine.core.compat.Version ( 3 , 0 ) ) ) <= 0 ) ) ) ; }
Source:
private java.util.Set < org.ovirt.engine.core.compat.Guid > getPoolIdsTasks ( ) { java.util.Set < org.ovirt.engine.core.compat.Guid > poolsOfActiveTasks = new java.util.HashSet < org.ovirt.engine.core.compat.Guid > ( ) ; for ( org.ovirt.engine.core.bll.SPMAsyncTask task : _tasks.values ( ) ) { if ( task.getShouldPoll ( ) ) { poolsOfActiveTasks.add ( task.getStoragePoolID ( ) ) ; } } return poolsOfActiveTasks ; }

Target:
private void updateTaskStatuses ( java.util.Map < org.ovirt.engine.core.compat.Guid , java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.AsyncTaskStatus > > poolsAllTasksMap ) { for ( org.ovirt.engine.core.bll.SPMAsyncTask task : _tasks.values ( ) ) { if ( task.getShouldPoll ( ) ) { java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.AsyncTaskStatus > asyncTasksForPoolMap = poolsAllTasksMap.get ( task.getStoragePoolID ( ) ) ; if ( asyncTasksForPoolMap != null ) { org.ovirt.engine.core.common.businessentities.AsyncTaskStatus cachedAsyncTaskStatus = asyncTasksForPoolMap.get ( task.getTaskID ( ) ) ; task.UpdateTask ( cachedAsyncTaskStatus ) ; } } } }
Source:
protected org.ovirt.engine.api.model.NIC deprecatedPopulate ( org.ovirt.engine.api.model.NIC model , org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface entity ) { addReportedDevices ( model , entity ) ; return addStatistics ( model , entity , uriInfo , httpHeaders ) ; }

Target:
protected org.ovirt.engine.api.model.NIC deprecatedPopulate ( org.ovirt.engine.api.model.NIC model , org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface entity ) { java.util.Set < java.lang.String > details = org.ovirt.engine.api.common.util.DetailHelper.getDetails ( httpHeaders , uriInfo ) ; addReportedDevices ( model , entity ) ; if ( details.contains ( "statistics" ) ) { addStatistics ( model , entity ) ; } return model ; }
Source:
public void getUsbPolicyUsbTypeNative ( ) { org.ovirt.engine.api.model.Usb usb = new org.ovirt.engine.api.model.Usb ( ) ; usb.setEnabled ( true ) ; usb.setType ( "native" ) ; org.ovirt.engine.core.common.businessentities.VDSGroup vdsGroup = new org.ovirt.engine.core.common.businessentities.VDSGroup ( ) ; assertEquals ( org.ovirt.engine.api.restapi.types.VmMapper.getUsbPolicyOnCreate ( usb , vdsGroup.getcompatibility_version ( ) ) , UsbPolicy.ENABLED_NATIVE ) ; }

Target:
public void getUsbPolicyIsSetDisabled ( ) { org.ovirt.engine.api.model.Usb usb = new org.ovirt.engine.api.model.Usb ( ) ; org.ovirt.engine.core.common.businessentities.VDSGroup vdsGroup = new org.ovirt.engine.core.common.businessentities.VDSGroup ( ) ; assertEquals ( org.ovirt.engine.api.restapi.types.VmMapper.getUsbPolicyOnCreate ( usb , vdsGroup.getCompatibilityVersion ( ) ) , UsbPolicy.DISABLED ) ; }