auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private static org.ovirt.engine.core.common.businessentities.StoragePool createStoragePoolLocalFS ( ) { org.ovirt.engine.core.common.businessentities.StoragePool pool = new org.ovirt.engine.core.common.businessentities.StoragePool ( ) ; pool.setstorage_pool_type ( StorageType.LOCALFS ) ; return pool ; }

Target:
private static org.ovirt.engine.core.common.businessentities.StoragePool createStoragePoolLocalFS ( ) { org.ovirt.engine.core.common.businessentities.StoragePool pool = new org.ovirt.engine.core.common.businessentities.StoragePool ( ) ; pool.setStorageType ( StorageType.LOCALFS ) ; return pool ; }
Source:
public static void addDisk ( org.ovirt.engine.core.common.businessentities.storage.BaseDisk disk ) { if ( ! ( org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getBaseDiskDao ( ) . exists ( disk.getId ( ) ) ) ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getBaseDiskDao ( ) . save ( disk ) ; } }

Target:
public void addDisk ( org.ovirt.engine.core.common.businessentities.storage.BaseDisk disk ) { if ( ! ( baseDiskDao.exists ( disk.getId ( ) ) ) ) { baseDiskDao.save ( disk ) ; } }
Source:
public boolean isSetSchedulingPolicy ( ) { return ( ( this . schedulingPolicy ) != null ) && ( ! ( this . schedulingPolicy.isEmpty ( ) ) ) ; }

Target:
public java.util.List < org.ovirt.engine.sdk.entities.SchedulingPolicy > getSchedulingPolicies ( ) { if ( ( schedulingPolicies ) == null ) { schedulingPolicies = new java.util.ArrayList < org.ovirt.engine.sdk.entities.SchedulingPolicy > ( ) ; } return this . schedulingPolicies ; }
Source:
void AddVmStatistics ( ) { org.ovirt.engine.core.common.businessentities.VmStatistics stats = new org.ovirt.engine.core.common.businessentities.VmStatistics ( ) ; stats.setId ( org.ovirt.engine.core.bll.AddVmCommand.getVmId ( ) ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmStatisticsDAO ( ) . save ( stats ) ; org.ovirt.engine.core.bll.AddVmCommand.getCompensationContext ( ) . snapshotNewEntity ( stats ) ; }

Target:
void addVmStatistics ( ) { org.ovirt.engine.core.common.businessentities.VmStatistics stats = new org.ovirt.engine.core.common.businessentities.VmStatistics ( ) ; stats.setId ( org.ovirt.engine.core.bll.AddVmCommand.getVmId ( ) ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmStatisticsDao ( ) . save ( stats ) ; org.ovirt.engine.core.bll.AddVmCommand.getCompensationContext ( ) . snapshotNewEntity ( stats ) ; }
Source:
private void assertNetworkRemoved ( org.ovirt.engine.core.bll.network.host.SetupNetworksHelper helper , java.lang.String expectedNetworkName ) { junit.framework.Assert.assertTrue ( java.text.MessageFormat.format ( "Expected network ''{0}'' to be removed but it wasn''t. Removed networks: {1}" , expectedNetworkName , helper.getRemoveNetworks ( ) ) , helper.getRemoveNetworks ( ) . contains ( expectedNetworkName ) ) ; }

Target:
private void assertNetworkRemoved ( org.ovirt.engine.core.bll.network.host.SetupNetworksHelper helper , java.lang.String expectedNetworkName ) { org.junit.Assert.assertTrue ( java.text.MessageFormat.format ( "Expected network ''{0}'' to be removed but it wasn''t. Removed networks: {1}" , expectedNetworkName , helper.getRemoveNetworks ( ) ) , helper.getRemoveNetworks ( ) . contains ( expectedNetworkName ) ) ; }
Source:
public void setMonitorCount ( int value ) { if ( ( monitorCount ) != value ) { monitorCount = value ; OnPropertyChanged ( new org.ovirt.engine.core.compat.PropertyChangedEventArgs ( "MonitorCount" ) ) ; } }

Target:
public void setMonitorCount ( int value ) { if ( ( monitorCount ) != value ) { monitorCount = value ; OnPropertyChanged ( new org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ( "MonitorCount" ) ) ; } }
Source:
protected boolean canDoAction ( ) { if ( ! ( super . canDoAction ( ) ) ) { return false ; } if ( getGeoRepSession ( ) . getStatus ( ) . equals ( GeoRepSessionStatus.STOPPED ) ) { addCanDoActionMessage ( EngineMessage.ACTION_TYPE_FAILED_GEOREP_SESSION_STOPPED ) ; } return true ; }

Target:
protected boolean validate ( ) { if ( ! ( super . validate ( ) ) ) { return false ; } if ( getGeoRepSession ( ) . getStatus ( ) . equals ( GeoRepSessionStatus.STOPPED ) ) { addValidationMessage ( EngineMessage.ACTION_TYPE_FAILED_GEOREP_SESSION_STOPPED ) ; } return true ; }
Source:
private void mockVdcCommand ( org.ovirt.engine.core.common.action.ActionType actionType , org.ovirt.engine.core.common.action.VdcReturnValueBase returnValue ) { org.mockito.Mockito.doReturn ( returnValue ) . when ( backend ) . runInternalAction ( org.mockito.ArgumentMatchers.eq ( actionType ) , org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.common.action.VdcActionParametersBase.class ) ) ; }

Target:
private void mockVdcCommand ( org.ovirt.engine.core.common.action.ActionType actionType , org.ovirt.engine.core.common.action.VdcReturnValueBase returnValue ) { org.mockito.Mockito.doReturn ( returnValue ) . when ( backend ) . runInternalAction ( org.mockito.ArgumentMatchers.eq ( actionType ) , org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.common.action.ActionParametersBase.class ) ) ; }
Source:
protected void setErrorMessageLabel ( com.google.gwt.user.client.ui.Label errorMessage , java.lang.String text ) { errorMessage.getElement ( ) . setInnerHTML ( text ) ; }

Target:
protected void setErrorMessageLabel ( com.google.gwt.user.client.ui.Label errorMessage , com.google.gwt.safehtml.shared.SafeHtml text ) { if ( text != null ) { errorMessage.getElement ( ) . setInnerSafeHtml ( text ) ; } else { errorMessage.getElement ( ) . setInnerHTML ( null ) ; } }
Source:
private void selectCurrentPinnedHost ( ) { org.ovirt.engine.core.common.businessentities.VDS host = org.ovirt.engine.ui.uicommonweb.Linq.findHostById ( getPinnedHost ( ) . getItems ( ) , vm.getDedicatedVmForVds ( ) ) ; if ( host != null ) { getPinnedHost ( ) . setSelectedItem ( host ) ; } }

Target:
private void selectCurrentPinnedHost ( ) { org.ovirt.engine.core.common.businessentities.VDS host = org.ovirt.engine.ui.uicommonweb.Linq.findHostByIdFromIdList ( getPinnedHost ( ) . getItems ( ) , vm.getDedicatedVmForVdsList ( ) ) ; if ( host != null ) { getPinnedHost ( ) . setSelectedItem ( host ) ; } }
Source:
public void getManagementNetworkName ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.ManagementNetwork , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
private void initializeLargeToSmallIconMap ( ) { largeToSmallOsDefaultIconIdMap = new java.util.HashMap < > ( ) ; for ( org.ovirt.engine.core.common.queries.VmIconIdSizePair pair : osIdToDefaultIconIdMap.values ( ) ) { largeToSmallOsDefaultIconIdMap.put ( pair.getLarge ( ) , pair.getSmall ( ) ) ; } }
Source:
private void doTest ( boolean duplicatesAllowed , boolean macInUse , boolean macInRange , boolean result ) { prepareMacPool ( duplicatesAllowed , macInUse , macInRange ) ; org.junit.Assert.assertThat ( underTest.test ( vnic ) , org.hamcrest.Matchers.is ( result ) ) ; }

Target:
private void doTest ( boolean duplicatesAllowed , boolean macInUse , boolean macInRange , boolean result ) { prepareMacPool ( duplicatesAllowed , macInUse , macInRange ) ; org.hamcrest.MatcherAssert.assertThat ( underTest.test ( vnic ) , org.hamcrest.Matchers.is ( result ) ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object ReturnValue ) { this . setItems ( ( ( java.util.List < org.ovirt.engine.core.common.utils.PairQueryable < org.ovirt.engine.core.common.businessentities.VDSGroup , org.ovirt.engine.core.common.businessentities.network.NetworkCluster > > ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( ReturnValue ) ) . getReturnValue ( ) ) ) ) ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object ReturnValue ) { setItems ( ( ( java.util.Collection < org.ovirt.engine.core.common.utils.PairQueryable < org.ovirt.engine.core.common.businessentities.VDSGroup , org.ovirt.engine.core.common.businessentities.network.NetworkCluster > > ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( ReturnValue ) ) . getReturnValue ( ) ) ) ) ; }
Source:
public void setvm_creation_date ( java.util.Date value ) { this . mVmStatic.setcreation_date ( value ) ; }

Target:
public void setVmCreationDate ( java.util.Date value ) { this . vmStatic.setcreation_date ( value ) ; }
Source:
public void testValidateNetworkExclusiveOnNicsVmNetworkMustBeSoleAttachedInterface ( ) throws java.lang.Exception { checkVmNetworkIsSoleAssignedInterface ( org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) , vmNetwork1 ) ; }

Target:
public void testValidateNetworkExclusiveOnNicsVmNetworkMustBeSoleAttachedInterface ( ) throws java.lang.Exception { checkVmNetworkIsSoleAssignedInterface ( false , java.util.Arrays.asList ( NetworkType.VM ) , vmNetwork1 ) ; }
Source:
protected void fillImagesMapBasedOnTemplate ( ) { org.ovirt.engine.core.bll.ImagesHandler.fillImagesMapBasedOnTemplate ( vmDisksSource , getPoolDomains ( ) , diskInfoDestinationMap , destStorages ) ; }

Target:
protected void fillImagesMapBasedOnTemplate ( ) { org.ovirt.engine.core.bll.storage.disk.image.ImagesHandler.fillImagesMapBasedOnTemplate ( vmDisksSource , getPoolDomains ( ) , diskInfoDestinationMap , destStorages ) ; }
Source:
public void testEvalPositive ( ) throws java.lang.Exception { org.mockito.Mockito.when ( mockOtherIface.getName ( ) ) . thenReturn ( org.ovirt.engine.core.vdsbroker.vdsbroker.predicates.DisplayInterfaceEqualityPredicateTest.TEST_INTERFACE_NAME ) ; org.mockito.Mockito.when ( mockOtherIface.getAddress ( ) ) . thenReturn ( org.ovirt.engine.core.vdsbroker.vdsbroker.predicates.DisplayInterfaceEqualityPredicateTest.TEST_INTERFACE_ADDRESS ) ; org.junit.Assert.assertTrue ( underTest.test ( mockOtherIface ) ) ; }

Target:
public void testEvalPositive ( ) throws java.lang.Exception { org.mockito.Mockito.when ( mockOtherIface.getName ( ) ) . thenReturn ( org.ovirt.engine.core.vdsbroker.vdsbroker.predicates.DisplayInterfaceEqualityPredicateTest.TEST_INTERFACE_NAME ) ; org.mockito.Mockito.when ( mockOtherIface.getIpv4Address ( ) ) . thenReturn ( org.ovirt.engine.core.vdsbroker.vdsbroker.predicates.DisplayInterfaceEqualityPredicateTest.TEST_INTERFACE_ADDRESS ) ; org.junit.Assert.assertTrue ( underTest.test ( mockOtherIface ) ) ; }
Source:
private void logFailedAttemptToRestartHighlyAvailableVm ( org.ovirt.engine.core.compat.Guid vmId ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase event = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; event.setVmId ( vmId ) ; auditLogDirector.log ( event , AuditLogType.HA_VM_RESTART_FAILED ) ; }

Target:
private void logFailureToRestartVm ( org.ovirt.engine.core.compat.Guid vmId ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase event = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; event.setVmId ( vmId ) ; auditLogDirector.log ( event , getExceededMaxNumOfRestartsAuditLogType ( ) ) ; }
Source:
private void auditLogFailedToConnect ( ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogable loggable = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableImpl ( ) ; new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector ( ) . log ( loggable , AuditLogType.FAILED_TO_CONNECT_TO_SCHEDULER_PROXY ) ; }

Target:
private void auditLogFailedToConnect ( ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogable loggable = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableImpl ( ) ; auditLogDirector.log ( loggable , AuditLogType.FAILED_TO_CONNECT_TO_SCHEDULER_PROXY ) ; }
Source:
public void executeCommand ( org.ovirt.engine.ui.uicommonweb.UICommand uiCommand ) { setWindow ( null ) ; setWindow ( model ) ; }

Target:
public void executeCommand ( org.ovirt.engine.ui.uicommonweb.UICommand uiCommand ) { setWindow ( null ) ; model.clearVmModelsExceptItems ( ) ; setWindow ( model ) ; }
Source:
private static void raiseQueryCompleteEvent ( final java.util.List < org.ovirt.engine.core.common.queries.VdcQueryType > queryTypeList , final java.lang.String context ) { for ( org.ovirt.engine.core.common.queries.VdcQueryType queryType : queryTypeList ) { org.ovirt.engine.ui.frontend.Frontend.raiseQueryCompleteEvent ( queryType , context ) ; } }

Target:
private void raiseQueryStartedEvent ( final org.ovirt.engine.core.common.queries.VdcQueryType queryType , final java.lang.String context ) { raiseQueryEvent ( getQueryStartedEvent ( ) , queryType , context ) ; }
Source:
protected java.util.List < org.ovirt.engine.core.common.businessentities.network.VnicProfile > getVnicProfiles ( ) { if ( ( vnicProfiles ) == null ) { vnicProfiles = getDbFacade ( ) . getVnicProfileDao ( ) . getAllForNetwork ( vnicProfile.getNetworkId ( ) ) ; } return vnicProfiles ; }

Target:
protected org.ovirt.engine.core.common.businessentities.network.Network getNetwork ( ) { if ( ( network ) == null ) { network = org.ovirt.engine.core.di.Injector.get ( org.ovirt.engine.core.dao.network.NetworkDao.class ) . get ( vnicProfile.getNetworkId ( ) ) ; } return network ; }
Source:
public void testGetRelevantQuotasExistingVdsGroupNoSpecificQuotas ( ) throws java.lang.Exception { assertGetAllRelevantQuoatsForVdsGroup ( FixturesTool.VDS_GROUP_RHEL6_NFS_NO_SPECIFIC_QUOTAS , ( ( org.ovirt.engine.core.dao.QuotaDAOTest.NUM_QUOTAS ) - 1 ) ) ; }

Target:
public void testGetRelevantQuotasExistingVdsGroup ( ) throws java.lang.Exception { assertGetAllRelevantQuoatsForVdsGroup ( FixturesTool.VDS_GROUP_RHEL6_NFS , org.ovirt.engine.core.dao.QuotaDAOTest.VDS_GRUOP_NUM_QUOTAS ) ; }
Source:
public void addRecommendationForKsm ( final boolean isKsmEnabled , final java.lang.String clusterName ) { if ( isKsmEnabled ) { recommendationsList.add ( ( ( ( constants.highPerformancePopupRecommendationMsgForKsmPart1 ( ) ) + clusterName ) + ( constants.highPerformancePopupRecommendationMsgForKsmPart2 ( ) ) ) ) ; } }

Target:
public void addRecommendationForKsm ( final boolean isKsmEnabled , final java.lang.String clusterName ) { if ( isKsmEnabled ) { recommendationsList.add ( messages.highPerformancePopupRecommendationMsgForKsm ( clusterName ) ) ; } }
Source:
public void getVmTemplateDefault ( ) { final org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase b = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; final org.ovirt.engine.core.common.businessentities.VmTemplate t = b.getVmTemplate ( ) ; org.junit.Assert.assertNull ( t ) ; }

Target:
public void getVmTemplateNull ( ) { b.setVmTemplate ( null ) ; final org.ovirt.engine.core.common.businessentities.VmTemplate t = b.getVmTemplate ( ) ; org.junit.Assert.assertNull ( t ) ; }
Source:
public void testGetAllForEntityFilteredWithNoPermissionsFilteringDisabled ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.Permissions > result = dao.getAllForEntity ( org.ovirt.engine.core.dao.PermissionDAOTest.VM_ENTITY_ID , org.ovirt.engine.core.dao.UNPRIVILEGED_USER_SESSION_ID , false ) ; org.ovirt.engine.core.dao.PermissionDAOTest.assertGetAllForEntityResult ( result ) ; }

Target:
public void testGetAllForEntityFilteredWithNoPermissions ( ) { org.junit.Assert.assertNotNull ( unprivilegedUserSession ) ; java.util.List < org.ovirt.engine.core.common.businessentities.Permissions > result = dao.getAllForEntity ( org.ovirt.engine.core.dao.PermissionDAOTest.VM_ENTITY_ID , unprivilegedUserSession.getId ( ) , true ) ; org.ovirt.engine.core.dao.PermissionDAOTest.assertInvalidGetPermissionList ( result ) ; }
Source:
protected java.lang.Object getId ( Q entity ) { java.lang.Object id = null ; if ( ( entity != null ) && ( entity instanceof org.ovirt.engine.core.common.businessentities.IVdcQueryable ) ) { id = ( ( org.ovirt.engine.core.common.businessentities.IVdcQueryable ) ( entity ) ) . getQueryableId ( ) ; } return id ; }

Target:
protected java.lang.Object getId ( Q entity ) { java.lang.Object id = null ; if ( ( entity != null ) && ( entity instanceof org.ovirt.engine.core.common.businessentities.Queryable ) ) { id = ( ( org.ovirt.engine.core.common.businessentities.Queryable ) ( entity ) ) . getQueryableId ( ) ; } return id ; }
Source:
private void addPowerManagers ( org.ovirt.engine.api.model.VersionCaps version , java.util.List < org.ovirt.engine.api.model.PowerManagement > powerManagers ) { version.setPowerManagers ( new org.ovirt.engine.api.model.PowerManagers ( ) ) ; version.getPowerManagers ( ) . getPowerManagers ( ) . addAll ( powerManagers ) ; }

Target:
private void addPowerManagementAgents ( org.ovirt.engine.api.model.VersionCaps version , java.util.List < org.ovirt.engine.api.model.Agent > agents ) { version.setPowerManagement ( new org.ovirt.engine.api.model.Agents ( ) ) ; version.getPowerManagement ( ) . getAgents ( ) . addAll ( agents ) ; }
Source:
private void setUpGetDataCenterByStorageDomainExpectations ( org.ovirt.engine.core.compat.Guid id ) { setUpEntityQueryExpectations ( VdcQueryType.GetStoragePoolsByStorageDomainId , org.ovirt.engine.core.common.queries.StorageDomainQueryParametersBase.class , new java.lang.String [ ] { "StorageDomainId" } , new java.lang.Object [ ] { id } , org.ovirt.engine.api.restapi.resource.BackendStorageDomainTemplatesResourceTest.setUpStoragePool ( ) ) ; }

Target:
private void setUpGetDataCenterByStorageDomainExpectations ( org.ovirt.engine.core.compat.Guid id ) { setUpEntityQueryExpectations ( VdcQueryType.GetStoragePoolsByStorageDomainId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { id } , org.ovirt.engine.api.restapi.resource.BackendStorageDomainTemplatesResourceTest.setUpStoragePool ( ) ) ; }
Source:
public boolean isRequired ( ) { return getEntity ( ) . getCluster ( ) . isRequired ( ) ; }

Target:
public java.util.List < org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterNetworkModel > getItems ( ) { return ( ( java.util.List < org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterNetworkModel > ) ( super . getItems ( ) ) ) ; }
Source:
public void testGetStoragePoolIsoMap ( ) { org.ovirt.engine.core.common.businessentities.StoragePoolIsoMap result = dao.get ( new org.ovirt.engine.core.common.businessentities.StoragePoolIsoMapId ( existingStoragePoolIsoMap.getstorage_id ( ) , existingStoragePoolIsoMap.getstorage_pool_id ( ) ) ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertEquals ( existingStoragePoolIsoMap , result ) ; }

Target:
public void testGetStoragePoolIsoMap ( ) { org.ovirt.engine.core.common.businessentities.StoragePoolIsoMap result = dao.get ( new org.ovirt.engine.core.common.businessentities.StoragePoolIsoMapId ( existingStoragePoolIsoMap.getStorageId ( ) , existingStoragePoolIsoMap.getStoragePoolId ( ) ) ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertEquals ( existingStoragePoolIsoMap , result ) ; }
Source:
public static org.ovirt.engine.core.common.businessentities.network.NetworkInterface findInterfaceByName ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > items , java.lang.String name ) { for ( org.ovirt.engine.core.common.businessentities.network.NetworkInterface i : items ) { if ( org.ovirt.engine.core.compat.StringHelper.stringsEqual ( i.getName ( ) , name ) ) { return i ; } } return null ; }

Target:
public static org.ovirt.engine.core.common.businessentities.network.NetworkInterface findInterfaceByName ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > items , java.lang.String name ) { for ( org.ovirt.engine.core.common.businessentities.network.NetworkInterface i : items ) { if ( org.ovirt.engine.core.common.utils.ObjectUtils.objectsEqual ( i.getName ( ) , name ) ) { return i ; } } return null ; }
Source:
public org.ovirt.engine.core.common.businessentities.Snapshot getEntity ( ) { return ( ( org.ovirt.engine.core.common.businessentities.Snapshot ) ( super . getEntity ( ) ) ) ; }

Target:
public org.ovirt.engine.ui.uicommonweb.models.ListModel < org.ovirt.engine.ui.uicommonweb.models.vms.SnapshotModel.PreivewPartialSnapshotOption > getPartialPreviewSnapshotOptions ( ) { return partialPreviewSnapshotOptions ; }
Source:
public void statusMatches ( ) { setStorageDomainStatus ( StorageDomainStatus.Inactive ) ; org.junit.Assert.assertTrue ( cmd.checkStorageDomainStatus ( StorageDomainStatus.Inactive ) ) ; org.junit.Assert.assertFalse ( commandHasInvalidStatusMessage ( ) ) ; }

Target:
public void statusMatches ( ) { setStorageDomainStatus ( StorageDomainStatus.Inactive ) ; org.junit.jupiter.api.Assertions.assertTrue ( cmd.checkStorageDomainStatus ( StorageDomainStatus.Inactive ) ) ; org.junit.jupiter.api.Assertions.assertFalse ( commandHasInvalidStatusMessage ( ) ) ; }
Source:
protected org.ovirt.engine.core.common.businessentities.VdsStatic getNonExistentEntity ( ) { return newStaticVds ; }

Target:
public void testSave ( ) { dao.save ( newStaticVds ) ; org.ovirt.engine.core.common.businessentities.VdsStatic staticResult = dao.get ( newStaticVds.getId ( ) ) ; org.junit.Assert.assertNotNull ( staticResult ) ; org.junit.Assert.assertEquals ( newStaticVds , staticResult ) ; }
Source:
public static boolean hasVmRngDevice ( org.ovirt.engine.core.compat.Guid vmId ) { return ! ( org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmDeviceDao ( ) . getVmDeviceByVmIdAndType ( vmId , VmDeviceGeneralType.RNG ) . isEmpty ( ) ) ; }

Target:
public static boolean hasVmRngDevice ( org.ovirt.engine.core.compat.Guid vmId ) { return ! ( org.ovirt.engine.core.bll.utils.VmDeviceUtils.dbFacade.getVmDeviceDao ( ) . getVmDeviceByVmIdAndType ( vmId , VmDeviceGeneralType.RNG ) . isEmpty ( ) ) ; }
Source:
public void eventRaised ( org.ovirt.engine.core.compat.Event ev , java.lang.Object sender , org.ovirt.engine.core.compat.EventArgs args ) { if ( ! ( ( java.lang.Boolean ) ( diskModel.getIsInternal ( ) . getEntity ( ) ) ) ) { model.getUpdateCommand ( ) . Execute ( ) ; } }

Target:
public boolean handleEnterKeyDisabled ( ) { return ( ( storageView ) != null ) && ( storageView.isSubViewFocused ( ) ) ; }
Source:
public void getLatency ( ) { try { getLatency ( ( ( long ) ( org.ovirt.vdsmfake.Utils.minimum ) ) ) ; } catch ( java.lang.Exception e ) { org.ovirt.vdsmfake.Utils.log.error ( "failed to get latency error is: {}" , e ) ; } }

Target:
public static void getLatency ( ) { try { org.ovirt.vdsmfake.Utils.getLatency ( ( ( long ) ( org.ovirt.vdsmfake.Utils.minimum ) ) ) ; } catch ( java.lang.Exception e ) { org.ovirt.vdsmfake.Utils.log.error ( "failed to get latency error is: {}" , e ) ; } }
Source:
public int getVramMultiplier ( int osId ) ;

Target:
java.lang.String getSysprepPath ( int osId , org.ovirt.engine.core.compat.Version version ) ;
Source:
public void shouldDetectPinnedVM ( ) { invalidVM.setDedicatedVmForVdsList ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; invalidVM.setMigrationSupport ( org.ovirt.engine.core.common.businessentities.MigrationSupport.PINNED_TO_HOST ) ; org.hamcrest.MatcherAssert.assertThat ( validator.isVmReadyForUpgrade ( invalidVM ) , org.hamcrest.CoreMatchers.hasItem ( UPGRADE_ERROR.VM_PINNED_TO_HOSTS ) ) ; }

Target:
public void shouldDetectPassThroughDeviceOnVM ( ) { org.mockito.Mockito.when ( hostDeviceManager.checkVmNeedsDirectPassthrough ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.VM.class ) ) ) . thenReturn ( true ) ; org.hamcrest.MatcherAssert.assertThat ( validator.checkVmReadyForUpgrade ( invalidVM ) , org.hamcrest.CoreMatchers.hasItem ( UPGRADE_ERROR.VM_NEEDS_PASSTHROUGH ) ) ; }
Source:
public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : "" ; }

Target:
public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery ) { return source != null ? source : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeSnapshotEntity > ( ) ; }
Source:
public java.lang.String getPartialVersion ( ) { return vdsDynamic.getVersion ( ) . getValue ( ) . substring ( 0 , 2 ) ; }

Target:
public boolean isUpdateAvailable ( ) { return vdsDynamic.isUpdateAvailable ( ) ; }
Source:
protected boolean canDoAction ( ) { return canMigrateVm ( org.ovirt.engine.core.bll.MigrateVmCommand.getVmId ( ) , org.ovirt.engine.core.bll.MigrateVmCommand.getReturnValue ( ) . getCanDoActionMessages ( ) ) ; }

Target:
protected void setActionMessageParameters ( ) { addCanDoActionMessage ( VdcBllMessages.VAR__ACTION__MIGRATE ) ; addCanDoActionMessage ( VdcBllMessages.VAR__TYPE__VM ) ; }
Source:
public void lowerVersionHostsAndNetwork ( ) { storagePoolWithLowerVersion ( ) ; addNonDefaultClusterToPool ( ) ; addHostsToCluster ( ) ; addNetworkToPool ( ) ; canDoActionFailed ( VdcBllMessages.ACTION_TYPE_FAILED_CANNOT_DECREASE_COMPATIBILITY_VERSION ) ; }

Target:
public void lowerVersionHostsAndNetwork ( ) { storagePoolWithLowerVersion ( ) ; addNonDefaultClusterToPool ( ) ; addHostsToCluster ( ) ; addNonManagementNetworkToPool ( ) ; canDoActionFailed ( VdcBllMessages.ACTION_TYPE_FAILED_CANNOT_DECREASE_COMPATIBILITY_VERSION ) ; }
Source:
org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc heartBeat ( ) ;

Target:
java.util.List < java.security.cert.Certificate > getPeerCertificates ( ) ;
Source:
protected boolean shouldAddLease ( org.ovirt.engine.core.common.businessentities.VM vm ) { return ( vm.getLeaseStorageDomainId ( ) ) != null ; }

Target:
protected boolean shouldAddLease ( org.ovirt.engine.core.common.businessentities.VmStatic vm ) { return ( vm.getLeaseStorageDomainId ( ) ) != null ; }
Source:
public void testExtractIpv6PrefixNull ( ) { org.junit.Assert.assertThat ( org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilder.extractIpv6Prefix ( null ) , org.hamcrest.Matchers.nullValue ( ) ) ; }

Target:
public void testExtractProperIpv6AddressWithInvalidPrefix ( ) { org.junit.Assert.assertThat ( vdsBrokerObjectsBuilder.extractIpv6Address ( "::/a" ) , org.hamcrest.Matchers.is ( "::/a" ) ) ; }
Source:
public static org.ovirt.engine.core.common.businessentities.VmDevice addNetworkInterfaceDevice ( org.ovirt.engine.core.common.businessentities.VmDeviceId id , boolean plugged ) { return org.ovirt.engine.core.bll.utils.VmDeviceUtils.addManagedDevice ( id , VmDeviceType.INTERFACE , VmDeviceType.BRIDGE , null , plugged , false ) ; }

Target:
public static org.ovirt.engine.core.common.businessentities.VmDevice addNetworkInterfaceDevice ( org.ovirt.engine.core.common.businessentities.VmDeviceId id , boolean plugged ) { return org.ovirt.engine.core.bll.utils.VmDeviceUtils.addManagedDevice ( id , VmDeviceType.INTERFACE , VmDeviceType.BRIDGE , java.util.Collections.< java.lang.String , java.lang.Object > emptyMap ( ) , plugged , false ) ; }
Source:
public void leaseNotFreeMultipleOwners ( ) { java.lang.Object [ ] owners = new java.lang.Object [ ] { 1 , 2 , 3 } ; org.junit.Assert.assertFalse ( getLeaseStatus ( owners ) . isFree ( ) ) ; }

Target:
public void leaseNotFreeSingleOwner ( ) { java.lang.Object [ ] owners = new java.lang.Object [ ] { 1 } ; org.junit.jupiter.api.Assertions.assertFalse ( getLeaseStatus ( owners ) . isFree ( ) ) ; }
Source:
public org.ovirt.engine.core.common.businessentities.VmOsType getOsType ( ) { return getos ( ) ; }

Target:
public java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > getUnmanagedDeviceList ( ) { return unmanagedDeviceList ; }
Source:
protected void selectedItemPropertyChanged ( java.lang.Object sender , org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs e ) { super . selectedItemPropertyChanged ( sender , e ) ; if ( e.propertyName.equals ( "status" ) ) { updateActionAvailability ( ) ; } }

Target:
protected void selectedItemPropertyChanged ( java.lang.Object sender , org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs e ) { super . selectedItemPropertyChanged ( sender , e ) ; if ( e.propertyName.equals ( "status" ) ) { updateActionsAvailability ( ) ; } }
Source:
public void testRemoveAllOfTypeForVds ( ) throws java.lang.Exception { dao.removeAllOfTypeForVds ( org.ovirt.engine.core.dao.AuditLogDAOTest.VDS_ID , AuditLogType.IRS_DISK_SPACE_LOW_ERROR.getValue ( ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.AuditLog > result = dao.getAll ( ) ; org.junit.Assert.assertEquals ( 2 , result.size ( ) ) ; }

Target:
public void testRemoveAllOfTypeForVds ( ) throws java.lang.Exception { dao.removeAllOfTypeForVds ( org.ovirt.engine.core.dao.AuditLogDAOTest.VDS_ID , AuditLogType.IRS_DISK_SPACE_LOW_ERROR.getValue ( ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.AuditLog > result = dao.getAll ( org.ovirt.engine.core.dao.PRIVILEGED_USER_ID , true ) ; org.junit.Assert.assertEquals ( 2 , result.size ( ) ) ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult networkPrefixValid ( ) { return org.ovirt.engine.core.bll.ValidationResult.failWith ( VdcBllMessages.NETWORK_CANNOT_CONTAIN_BOND_NAME ) . when ( network.getName ( ) . toLowerCase ( ) . startsWith ( "bond" ) ) ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult networkPrefixValid ( ) { return org.ovirt.engine.core.bll.ValidationResult.failWith ( EngineMessage.NETWORK_CANNOT_CONTAIN_BOND_NAME ) . when ( network.getName ( ) . toLowerCase ( ) . startsWith ( "bond" ) ) ; }
Source:
protected static void buildVmOnSave ( org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel model , org.ovirt.engine.core.common.businessentities.VM vm ) { org.ovirt.engine.ui.uicommonweb.builders.BuilderExecutor.build ( model , vm.getStaticData ( ) , new org.ovirt.engine.ui.uicommonweb.builders.vm.FullUnitToVmBaseBuilder ( ) ) ; org.ovirt.engine.ui.uicommonweb.builders.BuilderExecutor.build ( model , vm , new org.ovirt.engine.ui.uicommonweb.builders.vm.VmSpecificUnitToVmBuilder ( ) ) ; }

Target:
protected static void buildVmOnSave ( org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel model , org.ovirt.engine.core.common.businessentities.VM vm ) { org.ovirt.engine.ui.uicommonweb.builders.BuilderExecutor.build ( model , vm.getStaticData ( ) , new org.ovirt.engine.ui.uicommonweb.builders.vm.FullUnitToVmBaseBuilder < org.ovirt.engine.core.common.businessentities.VmStatic > ( ) ) ; org.ovirt.engine.ui.uicommonweb.builders.BuilderExecutor.build ( model , vm , new org.ovirt.engine.ui.uicommonweb.builders.vm.VmSpecificUnitToVmBuilder ( ) ) ; }
Source:
protected void LogSettingVmToDown ( org.ovirt.engine.core.compat.Guid vdsId , org.ovirt.engine.core.compat.Guid vmId ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase logable = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( vdsId , vmId ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.log ( logable , AuditLogType.VM_WAS_SET_DOWN_DUE_TO_HOST_REBOOT_OR_MANUAL_FENCE ) ; }

Target:
protected void logSettingVmToDown ( org.ovirt.engine.core.compat.Guid vdsId , org.ovirt.engine.core.compat.Guid vmId ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase logable = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( vdsId , vmId ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.log ( logable , AuditLogType.VM_WAS_SET_DOWN_DUE_TO_HOST_REBOOT_OR_MANUAL_FENCE ) ; }
Source:
public void addOrUpdateTaskInDB ( final org.ovirt.engine.core.common.businessentities.AsyncTasks asyncTask ) { persistCommand ( copyToCommandEntity ( asyncTask , commandsCache.get ( asyncTask.getCommandId ( ) ) ) ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getAsyncTaskDao ( ) . saveOrUpdate ( asyncTask ) ; }

Target:
public int removeByVdsmTaskId ( final org.ovirt.engine.core.compat.Guid vdsmTaskId ) { return coCoAsyncTaskHelper.removeByVdsmTaskId ( vdsmTaskId ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.Provider < ? > getProvider ( ) { return org.ovirt.engine.core.bll.provider.network.AddSubnetToProviderCommand.getDbFacade ( ) . getProviderDao ( ) . get ( org.ovirt.engine.core.bll.provider.network.AddSubnetToProviderCommand.getParameters ( ) . getProviderId ( ) ) ; }

Target:
private org.ovirt.engine.core.common.businessentities.Provider < ? > getProvider ( ) { return providerDao.get ( org.ovirt.engine.core.bll.provider.network.AddSubnetToProviderCommand.getParameters ( ) . getProviderId ( ) ) ; }
Source:
public java.util.Map < java.lang.String , java.lang.Object > registerSecrets ( java.util.Map < java.lang.String , java.lang.String > [ ] libvirtSecrets ) ;

Target:
java.util.Map < java.lang.String , java.lang.Object > snapshot ( java.lang.String vmId , java.util.Map < java.lang.String , java.lang.String > [ ] disks , java.lang.String memory , boolean frozen ) ;
Source:
public void testIsNetworkInSyncWhenIpv6BootProtocolNotStaticNetmaskDifferent ( ) throws java.lang.Exception { initIpv6ConfigurationBootProtocolPrefix ( Ipv6BootProtocol.NONE , false ) ; org.junit.Assert.assertThat ( createTestedInstance ( ) . isNetworkInSync ( ) , org.hamcrest.CoreMatchers.is ( true ) ) ; }

Target:
public void testIsNetworkInSyncWhenIpv6BootProtocolNotStaticNetmaskDifferent ( ) { initIpv6ConfigurationBootProtocolPrefix ( Ipv6BootProtocol.NONE , false ) ; org.hamcrest.MatcherAssert.assertThat ( createTestedInstance ( ) . isNetworkInSync ( ) , org.hamcrest.CoreMatchers.is ( true ) ) ; }
Source:
public void testExistingDiscardAfterDeleteFunctionalityPreservedAllLunsHaveDiscardAfterDeleteFunctionality ( ) { storageDomain.setDiscardAfterDelete ( true ) ; org.junit.Assert.assertTrue ( discardHelper.isExistingDiscardAfterDeleteFunctionalityPreserved ( java.util.Arrays.asList ( createLunWithDiscardFunctionality ( 1024L , false ) , createLunWithDiscardFunctionality ( 2048L , true ) ) , storageDomain ) ) ; }

Target:
public void testExistingDiscardAfterDeleteFunctionalityPreservedNoDiscardAfterDeleteFunctionality ( ) { storageDomain.setDiscardAfterDelete ( false ) ; org.junit.Assert.assertTrue ( discardHelper.isExistingDiscardAfterDeleteFunctionalityPreserved ( java.util.Arrays.asList ( createLunWithDiscardSupport ( 0L ) , createLunWithDiscardSupport ( 0L ) ) , storageDomain ) ) ; }
Source:
protected org.ovirt.engine.core.common.vdscommands.DeleteImageGroupVDSCommandParameters buildDeleteMemoryImageParams ( java.util.List < org.ovirt.engine.core.compat.Guid > guids ) { return org.ovirt.engine.core.bll.storage.domain.PostDeleteActionHandler.fixParameters ( new org.ovirt.engine.core.common.vdscommands.DeleteImageGroupVDSCommandParameters ( guids.get ( 1 ) , guids.get ( 0 ) , guids.get ( 2 ) , isPostZero ( ) , false ) ) ; }

Target:
protected org.ovirt.engine.core.common.vdscommands.DeleteImageGroupVDSCommandParameters buildDeleteMemoryImageParams ( java.util.List < org.ovirt.engine.core.compat.Guid > guids ) { return postDeleteActionHandler.fixParameters ( new org.ovirt.engine.core.common.vdscommands.DeleteImageGroupVDSCommandParameters ( guids.get ( 1 ) , guids.get ( 0 ) , guids.get ( 2 ) , isPostZero ( ) , false ) ) ; }
Source:
public org.ovirt.engine.api.model.DiskSnapshot get ( ) { org.ovirt.engine.api.model.DiskSnapshot diskSnapshot = performGet ( VdcQueryType.GetDiskSnapshotByImageId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( guid ) ) ; diskSnapshot.setStorageDomain ( new org.ovirt.engine.api.model.StorageDomain ( ) ) ; diskSnapshot.getStorageDomain ( ) . setId ( this . storageDomainId ) ; return diskSnapshot ; }

Target:
public org.ovirt.engine.api.model.DiskSnapshot get ( ) { org.ovirt.engine.api.model.DiskSnapshot diskSnapshot = performGet ( QueryType.GetDiskSnapshotByImageId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( guid ) ) ; diskSnapshot.setStorageDomain ( new org.ovirt.engine.api.model.StorageDomain ( ) ) ; diskSnapshot.getStorageDomain ( ) . setId ( this . storageDomainId ) ; return diskSnapshot ; }
Source:
protected void onReveal ( ) { super . onReveal ( ) ; modelProvider.onSubTabSelected ( ) ; if ( ( getTable ( ) ) != null ) { getTable ( ) . setLoadingState ( LoadingState.LOADING ) ; } }

Target:
protected void onHide ( ) { super . onHide ( ) ; modelProvider.onSubTabDeselected ( ) ; }
Source:
public void setup ( ) { param = new org.ovirt.engine.core.common.action.AttachNetworkToClusterParameter ( getExistingCluster ( ) , getNetwork ( ) ) ; underTest = new org.ovirt.engine.core.bll.network.cluster.AttachNetworkToClusterInternalCommandTest.TestAttachNetworkToClusterCommand ( param ) ; }

Target:
public void setUp ( ) { org.mockito.Mockito.doReturn ( mockClusterDao ) . when ( underTest ) . getClusterDao ( ) ; org.mockito.Mockito.doReturn ( mockNetworkClusterDao ) . when ( underTest ) . getNetworkClusterDao ( ) ; org.mockito.Mockito.doReturn ( mockNetworkDao ) . when ( underTest ) . getNetworkDao ( ) ; }
Source:
protected void copyVmDevices ( ) { org.ovirt.engine.core.bll.utils.VmDeviceUtils.copyVmDevices ( org.ovirt.engine.core.bll.AddVmCommand.getVmTemplateId ( ) , org.ovirt.engine.core.bll.AddVmCommand.getVmId ( ) , srcDiskIdToTargetDiskIdMapping , _vmInterfaces , org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . isSoundDeviceEnabled ( ) , org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . isConsoleEnabled ( ) ) ; }

Target:
protected void fillImagesMapBasedOnTemplate ( ) { org.ovirt.engine.core.bll.ImagesHandler.fillImagesMapBasedOnTemplate ( vmDisksSource , org.ovirt.engine.core.bll.AddVmCommand.getStorageDomainDAO ( ) . getAllForStoragePool ( vmDisksSource.getStoragePoolId ( ) ) , diskInfoDestinationMap , destStorages , false ) ; }
Source:
public java.lang.String getValue ( org.ovirt.engine.core.common.businessentities.VmTemplate object ) { return object.getname ( ) ; }

Target:
public java.lang.String getValue ( org.ovirt.engine.core.common.utils.PairQueryable < org.ovirt.engine.core.common.businessentities.VmNetworkInterface , org.ovirt.engine.core.common.businessentities.VmTemplate > object ) { return object.getSecond ( ) . getname ( ) ; }
Source:
public void enablePluginInvocation ( ) { canInvokePlugins = true ; for ( org.ovirt.engine.ui.webadmin.plugin.Plugin plugin : getPlugins ( ) ) { initPlugin ( plugin ) ; } }

Target:
public void execute ( ) { for ( org.ovirt.engine.ui.webadmin.plugin.Plugin plugin : getPlugins ( ) ) { initPlugin ( plugin ) ; } }
Source:
public java.util.ArrayList < org.ovirt.engine.core.common.action.VdcReturnValueBase > RunMultipleActions ( org.ovirt.engine.core.common.action.VdcActionType actionType , java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > parameters ) { java.util.ArrayList < org.ovirt.engine.core.common.action.VdcReturnValueBase > returnValue = backend.RunMultipleActions ( actionType , parameters ) ; return returnValue ; }

Target:
public java.util.ArrayList < org.ovirt.engine.core.common.action.VdcReturnValueBase > RunMultipleActions ( org.ovirt.engine.core.common.action.VdcActionType actionType , java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > parameters , boolean isRunOnlyIfAllCanDoPass ) { java.util.ArrayList < org.ovirt.engine.core.common.action.VdcReturnValueBase > returnValue = backend.RunMultipleActions ( actionType , parameters , isRunOnlyIfAllCanDoPass ) ; return returnValue ; }
Source:
protected static org.ovirt.engine.api.restapi.resource.BackendReadOnlyDeviceResource < org.ovirt.engine.api.model.CdRom , org.ovirt.engine.api.model.CdRoms , org.ovirt.engine.core.common.businessentities.VM > getResource ( org.ovirt.engine.core.compat.Guid id ) { return new org.ovirt.engine.api.restapi.resource.BackendReadOnlyDeviceResource < org.ovirt.engine.api.model.CdRom , org.ovirt.engine.api.model.CdRoms , org.ovirt.engine.core.common.businessentities.VM > ( org.ovirt.engine.api.model.CdRom.class , org.ovirt.engine.core.common.businessentities.VM.class , id , org.ovirt.engine.api.restapi.resource.BackendReadOnlyCdRomResourceTest.getCollection ( ) ) ; }

Target:
protected static org.ovirt.engine.api.restapi.resource.BackendReadOnlyDeviceResource < org.ovirt.engine.api.model.Cdrom , org.ovirt.engine.api.model.Cdroms , org.ovirt.engine.core.common.businessentities.VM > getResource ( org.ovirt.engine.core.compat.Guid id ) { return new org.ovirt.engine.api.restapi.resource.BackendReadOnlyDeviceResource < org.ovirt.engine.api.model.Cdrom , org.ovirt.engine.api.model.Cdroms , org.ovirt.engine.core.common.businessentities.VM > ( org.ovirt.engine.api.model.Cdrom.class , org.ovirt.engine.core.common.businessentities.VM.class , id , org.ovirt.engine.api.restapi.resource.BackendReadOnlyCdRomResourceTest.getCollection ( ) ) ; }
Source:
public static < T > org.ovirt.engine.core.utils.MockConfigRule.MockConfigDescriptor < T > mockConfig ( org.ovirt.engine.core.common.config.ConfigValues value , org.ovirt.engine.core.compat.Version version , T returnValue ) { return new org.ovirt.engine.core.utils.MockConfigRule.MockConfigDescriptor ( value , version.toString ( ) , returnValue ) ; }

Target:
public static < T > org.ovirt.engine.core.common.utils.MockConfigRule.MockConfigDescriptor < T > mockConfig ( org.ovirt.engine.core.common.config.ConfigValues value , org.ovirt.engine.core.compat.Version version , T returnValue ) { return new org.ovirt.engine.core.common.utils.MockConfigRule.MockConfigDescriptor ( value , version.toString ( ) , returnValue ) ; }
Source:
public void create ( ) { org.ovirt.engine.core.bll.Backend.checkDBConnectivity ( ) ; initialize ( ) ; }

Target:
public void create ( ) { checkDBConnectivity ( ) ; try { initialize ( ) ; } catch ( java.lang.Exception ex ) { org.ovirt.engine.core.bll.Backend.log.error ( "Error during initialization" , ex.getMessage ( ) ) ; org.ovirt.engine.core.bll.Backend.log.debug ( "" , ex ) ; throw ex ; } }
Source:
public void setCpuSpeedMh ( java.lang.Double value ) { this . mVdsDynamic.setcpu_speed_mh ( value ) ; }

Target:
public void setCpuSpeedMh ( java.lang.Double value ) { vdsDynamic.setCpuSpeedMh ( value ) ; }
Source:
public void testUpdateNotExistingConnection ( ) { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpGetNotExistingEntityExpectations ( ) ; try { resource.update ( getModel ( 3 ) ) ; org.junit.Assert.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }

Target:
public void testUpdateNotExistingConnection ( ) { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpGetNotExistingEntityExpectations ( ) ; try { resource.update ( getModel ( 3 ) ) ; org.junit.jupiter.api.Assertions.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }
Source:
private boolean needToUpdateVdsBroker ( ) { return org.ovirt.engine.core.bll.VdsHandler.isFieldsUpdated ( org.ovirt.engine.core.bll.hostdeploy.UpdateVdsCommand.getParameters ( ) . getVdsStaticData ( ) , oldHost.getStaticData ( ) , org.ovirt.engine.core.bll.hostdeploy.UpdateVdsCommand.UPDATE_FIELDS_VDS_BROKER ) ; }

Target:
private boolean needToUpdateVdsBroker ( ) { return vdsHandler.isFieldsUpdated ( org.ovirt.engine.core.bll.hostdeploy.UpdateVdsCommand.getParameters ( ) . getVdsStaticData ( ) , oldHost.getStaticData ( ) , org.ovirt.engine.core.bll.hostdeploy.UpdateVdsCommand.UPDATE_FIELDS_VDS_BROKER ) ; }
Source:
protected org.ovirt.engine.core.common.businessentities.Disk getDisk ( ) { if ( ( disk ) == null ) { disk = getDiskDao ( ) . get ( ( ( org.ovirt.engine.core.compat.Guid ) ( org.ovirt.engine.core.bll.RemoveDiskCommand.getParameters ( ) . getEntityId ( ) ) ) ) ; } return disk ; }

Target:
protected org.ovirt.engine.core.common.businessentities.Disk getDisk ( ) { if ( ( disk ) == null ) { disk = getDiskDao ( ) . get ( org.ovirt.engine.core.bll.RemoveDiskCommand.getParameters ( ) . getDiskId ( ) ) ; } return disk ; }
Source:
protected boolean isHotPlugSupported ( ) { if ( org.ovirt.engine.core.common.config.Config.< java.lang.Boolean > GetValue ( ConfigValues.HotPlugEnabled , org.ovirt.engine.core.bll.VmCommand.getVds ( ) . getVdsGroupCompatibilityVersion ( ) . getValue ( ) ) ) { return true ; } addCanDoActionMessage ( VdcBllMessages.HOT_PLUG_IS_NOT_SUPPORTED ) ; return false ; }

Target:
protected java.util.List < org.ovirt.engine.core.common.businessentities.network.VmNic > getInterfaces ( ) { if ( ( interfaces ) == null ) { interfaces = getVmNicDao ( ) . getAllForVm ( org.ovirt.engine.core.bll.VmCommand.getVmId ( ) ) ; } return interfaces ; }
Source:
public void sortDisks ( ) { if ( ( disks ) != null ) { org.ovirt.engine.ui.uicommonweb.Linq.sort ( disks , new org.ovirt.engine.ui.uicommonweb.Linq.DiskModelByAliasComparer ( ) ) ; onPropertyChanged ( new org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ( "Disks" ) ) ; } }

Target:
public void sortDisks ( ) { if ( ( disks ) != null ) { java.util.Collections.sort ( disks , new org.ovirt.engine.ui.uicommonweb.Linq.DiskModelByAliasComparer ( ) ) ; onPropertyChanged ( new org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ( "Disks" ) ) ; } }
Source:
protected java.lang.String prepareImage ( org.ovirt.engine.core.compat.Guid vdsId ) { org.ovirt.engine.core.common.vdscommands.VDSReturnValue vdsRetVal = runVdsCommand ( VDSCommandType.PrepareImage , getPrepareParameters ( vdsId ) ) ; return ( ( org.ovirt.engine.core.vdsbroker.vdsbroker.PrepareImageReturnForXmlRpc ) ( vdsRetVal.getReturnValue ( ) ) ) . getImagePath ( ) ; }

Target:
protected java.lang.String prepareImage ( org.ovirt.engine.core.compat.Guid vdsId ) { org.ovirt.engine.core.common.vdscommands.VDSReturnValue vdsRetVal = runVdsCommand ( VDSCommandType.PrepareImage , getPrepareParameters ( vdsId ) ) ; return ( org.ovirt.engine.core.bll.storage.disk.image.UploadDiskImageCommand.FILE_URL_SCHEME ) + ( ( ( org.ovirt.engine.core.vdsbroker.vdsbroker.PrepareImageReturnForXmlRpc ) ( vdsRetVal.getReturnValue ( ) ) ) . getImagePath ( ) ) ; }
Source:
public void testIpConfiguredForStaticBootProtocolWhenIpConfigurationIsNotNullAndBootProtocolIsStaticAndNetmaskIsNull ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment = createNetworkAttachmentWithIpConfiguration ( NetworkBootProtocol.STATIC_IP , "" , null ) ; org.junit.Assert.assertThat ( new org.ovirt.engine.core.bll.validator.NetworkAttachmentValidator ( attachment , new org.ovirt.engine.core.common.businessentities.VDS ( ) ) . ipConfiguredForStaticBootProtocol ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( VdcBllMessages.NETWORK_ADDR_MANDATORY_IN_STATIC_IP ) ) ; }

Target:
public void testIpConfiguredForStaticBootProtocolWhenIpConfigurationIsNotNullAndBootProtocolIsStaticAndAddressAndNetmaskIsNotNull ( ) throws java.lang.Exception { doTestIpConfiguredForStaticBootProtocol ( "192.168.1.1" , "255.255.255.0" , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }
Source:
public void GetTagIdAndChildrenNamesAsList ( java.util.HashSet < java.lang.String > tagIds ) { tagIds.add ( gettag_name ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.tags tag : _children ) { tag.GetTagIdAndChildrenNamesAsList ( tagIds ) ; } }

Target:
public void getTagIdAndChildrenNamesAsList ( java.util.HashSet < java.lang.String > tagIds ) { tagIds.add ( gettag_name ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.tags tag : _children ) { tag.getTagIdAndChildrenNamesAsList ( tagIds ) ; } }
Source:
private java.util.Map < java.lang.String , org.ovirt.engine.core.common.businessentities.Network > getExistingClusterNetworks ( ) { if ( ( existingClusterNetworks ) == null ) { existingClusterNetworks = org.ovirt.engine.core.common.businessentities.Entities.entitiesByName ( getDbFacade ( ) . getNetworkDAO ( ) . getAllForCluster ( vdsGroupId ) ) ; } return existingClusterNetworks ; }

Target:
private java.util.Map < java.lang.String , org.ovirt.engine.core.common.businessentities.Network > getExistingClusterNetworks ( ) { if ( ( existingClusterNetworks ) == null ) { existingClusterNetworks = org.ovirt.engine.core.common.businessentities.Entities.entitiesByName ( getDbFacade ( ) . getNetworkDao ( ) . getAllForCluster ( vdsGroupId ) ) ; } return existingClusterNetworks ; }