auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void refreshSnapshotList ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.Cluster > clusters = getClusterDao ( ) . getAll ( ) ; for ( org.ovirt.engine.core.common.businessentities.Cluster cluster : clusters ) { refreshSnapshotsInCluster ( cluster ) ; } }

Target:
public void refreshSnapshotList ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.Cluster > clusters = clusterDao.getAll ( ) ; for ( org.ovirt.engine.core.common.businessentities.Cluster cluster : clusters ) { refreshSnapshotsInCluster ( cluster ) ; } }
Source:
protected void executeQueryCommand ( ) { org.ovirt.engine.core.bll.GetAllRolesQuery.getQueryReturnValue ( ) . setReturnValue ( org.ovirt.engine.core.bll.GetAllRolesQuery.getDbFacade ( ) . getRoleDAO ( ) . getAll ( ) ) ; }

Target:
protected void executeQueryCommand ( ) { org.ovirt.engine.core.bll.GetAllRolesQuery.getQueryReturnValue ( ) . setReturnValue ( org.ovirt.engine.core.bll.GetAllRolesQuery.getDbFacade ( ) . getRoleDao ( ) . getAll ( ) ) ; }
Source:
public void testSubResourceLocator ( ) throws java.lang.Exception { control.replay ( ) ; java.lang.Object subResource = collection.getDeviceResource ( GUIDS [ 0 ] . toString ( ) ) ; assertFalse ( ( subResource instanceof org.ovirt.engine.api.resource.DeviceResource ) ) ; assertTrue ( ( subResource instanceof org.ovirt.engine.api.resource.ReadOnlyDeviceResource ) ) ; }

Target:
protected java.util.List < org.ovirt.engine.api.model.Disk > getCollection ( ) { return collection.list ( ) . getDisks ( ) ; }
Source:
public void validateGenerateVmNameWithoutMask3 ( ) { junit.framework.Assert.assertEquals ( "mypool-170" , org.ovirt.engine.core.utils.NameForVmInPoolGenerator.generateVmName ( "mypool" , 170 ) ) ; }

Target:
public void validateGenerateVmNameWithoutMask3 ( ) { org.ovirt.engine.core.utils.NameForVmInPoolGenerator generator = createNameForVmInPoolGenerator ( "mypool" ) ; for ( int i = 1 ; i < 101 ; ++ i ) { generator.generateVmName ( ) ; } org.junit.Assert.assertEquals ( "mypool-101" , generator.generateVmName ( ) ) ; }
Source:
public void update ( org.ovirt.engine.core.common.businessentities.FenceAgent agent ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource params = getInsertOrUpdateParams ( agent ) ; params.addValue ( "guid" , agent.getId ( ) ) ; getCallsHandler ( ) . executeModification ( "UpdateFenceAgent" , params ) ; }

Target:
public void update ( org.ovirt.engine.core.common.businessentities.pm.FenceAgent agent ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource params = getInsertOrUpdateParams ( agent ) ; params.addValue ( "guid" , agent.getId ( ) ) ; getCallsHandler ( ) . executeModification ( "UpdateFenceAgent" , params ) ; }
Source:
private void incrementVmsGeneration ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VM > listVms = getVmsForDiskId ( ) ; for ( org.ovirt.engine.core.common.businessentities.VM vm : listVms ) { org.ovirt.engine.core.bll.RemoveDiskCommand.getVmStaticDAO ( ) . incrementDbGeneration ( vm.getId ( ) ) ; } }

Target:
private void incrementVmsGeneration ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VM > listVms = getVmsForDiskId ( ) ; for ( org.ovirt.engine.core.common.businessentities.VM vm : listVms ) { org.ovirt.engine.core.bll.RemoveDiskCommand.getVmStaticDao ( ) . incrementDbGeneration ( vm.getId ( ) ) ; } }
Source:
public void validateFailsOnNull ( ) { cmd = org.mockito.Mockito.spy ( createTestCommand ( null ) ) ; prepareMocks ( cmd ) ; org.junit.Assert.assertFalse ( cmd.validate ( ) ) ; }

Target:
public void validateFailsOnNull ( ) { cmd = org.mockito.Mockito.spy ( createTestCommand ( null ) ) ; prepareMocks ( cmd ) ; org.junit.jupiter.api.Assertions.assertFalse ( cmd.validate ( ) ) ; }
Source:
protected void verifyActionModel ( org.ovirt.engine.api.model.Vm model , int index ) { assertNotNull ( model ) ; assertEquals ( GUIDS [ index ] . toString ( ) , model.getId ( ) ) ; verifyLinks ( model ) ; }

Target:
protected void verifyActionModel ( org.ovirt.engine.api.model.Vm model , int index ) { org.junit.Assert.assertNotNull ( model ) ; org.junit.Assert.assertEquals ( GUIDS [ index ] . toString ( ) , model.getId ( ) ) ; verifyLinks ( model ) ; }
Source:
public void smallerThanOrEquals ( ) { org.junit.Assert.assertTrue ( Version.v3_5.lessOrEquals ( new org.ovirt.engine.core.compat.Version ( "3.5" ) ) ) ; org.junit.Assert.assertTrue ( Version.v3_5.lessOrEquals ( Version.v3_6 ) ) ; org.junit.Assert.assertFalse ( Version.v3_6.lessOrEquals ( Version.v3_5 ) ) ; }

Target:
public void smallerThanOrEquals ( ) { org.junit.Assert.assertTrue ( Version.v3_6.lessOrEquals ( new org.ovirt.engine.core.compat.Version ( "3.6" ) ) ) ; org.junit.Assert.assertTrue ( Version.v3_6.lessOrEquals ( Version.v4_0 ) ) ; org.junit.Assert.assertFalse ( Version.v4_0.lessOrEquals ( Version.v3_6 ) ) ; }
Source:
public java.lang.String toString ( ) { return ( ( ( super . toString ( ) ) + ", storage domain id=" ) + ( getStorageDomainId ( ) ) ) + "}" ; }

Target:
protected org.ovirt.engine.core.common.utils.ToStringBuilder appendAttributes ( org.ovirt.engine.core.common.utils.ToStringBuilder tsb ) { return super . appendAttributes ( tsb ) . append ( "storageDomainId" , getStorageDomainId ( ) ) ; }
Source:
public void setacpi_enable ( java.lang.Boolean value ) { this . mVmDynamic.setacpi_enable ( value ) ; }

Target:
public void setAcpiEnable ( java.lang.Boolean value ) { this . vmDynamic.setacpi_enable ( value ) ; }
Source:
protected org.ovirt.engine.api.model.Label addLinks ( org.ovirt.engine.api.model.Label label , java.lang.String ... subCollectionMembersToExclude ) { super . addLinks ( label , subCollectionMembersToExclude ) ; overrideHref ( label ) ; return label ; }

Target:
protected org.ovirt.engine.api.model.NetworkLabel addLinks ( org.ovirt.engine.api.model.NetworkLabel label , java.lang.String ... subCollectionMembersToExclude ) { super . addLinks ( label , subCollectionMembersToExclude ) ; overrideHref ( label ) ; return label ; }
Source:
public void updateVisibility ( ) { super . updateVisibility ( ) ; dataCenterEditor.setVisible ( false ) ; }

Target:
public void updateVisibility ( ) { super . updateVisibility ( ) ; messageLabel.setVisible ( true ) ; dataCenterEditor.setVisible ( false ) ; }
Source:
protected org.ovirt.engine.api.model.HostNIC addParents ( org.ovirt.engine.api.model.HostNIC nic ) { return parent.addParents ( nic ) ; }

Target:
protected org.ovirt.engine.api.model.HostNic addParents ( org.ovirt.engine.api.model.HostNic nic ) { return parent.addParents ( nic ) ; }
Source:
public abstract void validate ( ) ;

Target:
public abstract void validate ( org.ovirt.vdsm.jsonrpc.client.internal.ClientPolicy policy ) ;
Source:
public void testGetByName ( ) { org.ovirt.engine.core.common.businessentities.bookmarks result = dao.getByName ( existing_bookmark.getbookmark_name ( ) ) ; assertNotNull ( result ) ; assertEquals ( existing_bookmark.getbookmark_name ( ) , result.getbookmark_name ( ) ) ; }

Target:
public void testGetByName ( ) { org.ovirt.engine.core.common.businessentities.Bookmark result = dao.getByName ( existing_bookmark.getbookmark_name ( ) ) ; assertNotNull ( result ) ; assertEquals ( existing_bookmark.getbookmark_name ( ) , result.getbookmark_name ( ) ) ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult imageProvidedForOvirtNode ( java.lang.String image ) { return org.ovirt.engine.core.bll.ValidationResult.failWith ( EngineMessage.VDS_CANNOT_INSTALL_MISSING_IMAGE_FILE ) . when ( ( ( host.isOvirtNode ( ) ) && ( org.apache.commons.lang.StringUtils.isBlank ( image ) ) ) ) ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult imageProvidedForOvirtNode ( java.lang.String image ) { return org.ovirt.engine.core.bll.ValidationResult.failWith ( EngineMessage.VDS_CANNOT_INSTALL_MISSING_IMAGE_FILE ) . when ( ( ( host.isOvirtVintageNode ( ) ) && ( org.apache.commons.lang.StringUtils.isBlank ( image ) ) ) ) ; }
Source:
public void fireEvent ( com.google.gwt.event.shared.GwtEvent < ? > event ) { getEventBus ( ) . fireEvent ( event ) ; }

Target:
public void fireEvent ( com.google.gwt.event.shared.GwtEvent < ? > event ) { getEventBus ( ) . fireEventFromSource ( event , this ) ; }
Source:
protected org.ovirt.engine.core.common.businessentities.network.Network getPersistedNetwork ( ) { if ( ( persistedNetwork ) == null ) { persistedNetwork = org.ovirt.engine.core.bll.network.cluster.NetworkClusterCommandBase.getNetworkDao ( ) . get ( getNetworkCluster ( ) . getNetworkId ( ) ) ; } return persistedNetwork ; }

Target:
protected org.ovirt.engine.core.common.businessentities.network.Network getPersistedNetwork ( ) { if ( ( persistedNetwork ) == null ) { persistedNetwork = networkDao.get ( getNetworkCluster ( ) . getNetworkId ( ) ) ; } return persistedNetwork ; }
Source:
public void invalidProviderType ( ) { org.mockito.Mockito.when ( provider.getType ( ) ) . thenReturn ( org.ovirt.engine.core.bll.provider.NetworkProviderValidatorTest.NON_NETWORK_PROVIDER_TYPE ) ; org.junit.Assert.assertThat ( validator.providerTypeValid ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( VdcBllMessages.ACTION_TYPE_FAILED_PROVIDER_TYPE_MISMATCH ) ) ; }

Target:
public void invalidProviderType ( ) { org.mockito.Mockito.when ( provider.getType ( ) ) . thenReturn ( org.ovirt.engine.core.bll.provider.NetworkProviderValidatorTest.NON_NETWORK_PROVIDER_TYPE ) ; org.junit.Assert.assertThat ( validator.providerTypeValid ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.ACTION_TYPE_FAILED_PROVIDER_TYPE_MISMATCH ) ) ; }
Source:
protected java.util.List < org.ovirt.engine.core.compat.Guid > getVdsWhiteList ( ) { return null ; }

Target:
protected java.util.List < org.ovirt.engine.core.compat.Guid > getVdsWhiteList ( ) { return java.util.Collections.emptyList ( ) ; }
Source:
protected boolean validateTag ( java.lang.String tagName ) { boolean retValue = true ; org.ovirt.engine.core.common.businessentities.Tags tag = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getTagDao ( ) . getByName ( tagName ) ; if ( tag == null ) { addCanDoActionMessage ( EngineMessage.EN_UNKNOWN_TAG_NAME ) ; retValue = false ; } return retValue ; }

Target:
protected boolean validateTag ( java.lang.String tagName ) { boolean retValue = true ; org.ovirt.engine.core.common.businessentities.Tags tag = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getTagDao ( ) . getByName ( tagName ) ; if ( tag == null ) { addValidationMessage ( EngineMessage.EN_UNKNOWN_TAG_NAME ) ; retValue = false ; } return retValue ; }
Source:
private org.ovirt.engine.core.common.businessentities.VDSGroup getVdsGroup ( org.ovirt.engine.core.compat.Version ver ) { org.ovirt.engine.core.common.businessentities.VDSGroup vdsGroup = new org.ovirt.engine.core.common.businessentities.VDSGroup ( ) ; vdsGroup.setId ( org.ovirt.engine.core.bll.gluster.GetAddedGlusterServersQueryTest.CLUSTER_ID ) ; vdsGroup.setcompatibility_version ( ver ) ; return vdsGroup ; }

Target:
private org.ovirt.engine.core.common.businessentities.VDSGroup getVdsGroup ( org.ovirt.engine.core.compat.Version ver ) { org.ovirt.engine.core.common.businessentities.VDSGroup vdsGroup = new org.ovirt.engine.core.common.businessentities.VDSGroup ( ) ; vdsGroup.setId ( org.ovirt.engine.core.bll.gluster.GetAddedGlusterServersQueryTest.CLUSTER_ID ) ; vdsGroup.setCompatibilityVersion ( ver ) ; return vdsGroup ; }
Source:
public void canDoActionSuccess ( ) { mockVmStatusUp ( ) ; cretaeVirtIODisk ( ) ; org.junit.Assert.assertTrue ( command.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getCanDoActionMessages ( ) . isEmpty ( ) ) ; }

Target:
public void canDoActionSuccess ( ) { mockVmStatusUp ( ) ; cretaeVirtIODisk ( ) ; initStorageDomain ( ) ; org.junit.Assert.assertTrue ( command.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getCanDoActionMessages ( ) . isEmpty ( ) ) ; }
Source:
public void setRetransmissions ( java.lang.Short retransmissions ) { if ( ! ( isShortsEqual ( this . retransmissions , retransmissions ) ) ) { this . retransmissions = retransmissions ; OnPropertyChanged ( new org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ( "Retransmissions" ) ) ; } }

Target:
public void setRetransmissions ( java.lang.Short retransmissions ) { if ( ! ( isShortsEqual ( this . retransmissions , retransmissions ) ) ) { this . retransmissions = retransmissions ; onPropertyChanged ( new org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ( "Retransmissions" ) ) ; } }
Source:
public void onClick ( com.google.gwt.event.dom.client.ClickEvent event ) { disk.getDiskStorageType ( ) . setEntity ( DiskStorageType.IMAGE ) ; revealDiskPanel ( disk ) ; }

Target:
public void onClick ( com.google.gwt.event.dom.client.ClickEvent event ) { disk.getDiskStorageType ( ) . setEntity ( DiskStorageType.LUN ) ; revealStorageView ( disk ) ; revealDiskPanel ( disk ) ; }
Source:
protected void executeCommand ( ) { super . executeCommand ( ) ; getLibvirtSecretDAO ( ) . remove ( getParameters ( ) . getLibvirtSecret ( ) . getId ( ) ) ; setSucceeded ( true ) ; }

Target:
protected void executeCommand ( ) { super . executeCommand ( ) ; getLibvirtSecretDAO ( ) . remove ( getParameters ( ) . getLibvirtSecret ( ) . getId ( ) ) ; unregisterLibvirtSecret ( ) ; setSucceeded ( true ) ; }
Source:
public void nullVnicProfileWhenUnlinkingNotSupported ( ) throws java.lang.Exception { vnicProfileLinkingTest ( org.junit.matchers.JUnitMatchers.both ( org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( VdcBllMessages.NULL_NETWORK_IS_NOT_SUPPORTED ) ) . and ( org.ovirt.engine.core.bll.validator.ValidationResultMatchers.replacements ( org.junit.matchers.JUnitMatchers.hasItem ( org.ovirt.engine.core.bll.validator.VmNicValidatorTest.CLUSTER_VERSION_REPLACEMENT ) ) ) , false , null ) ; }

Target:
public void nullVnicProfileWhenUnlinkingNotSupported ( ) throws java.lang.Exception { vnicProfileLinkingTest ( org.hamcrest.CoreMatchers.both ( org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( VdcBllMessages.NULL_NETWORK_IS_NOT_SUPPORTED ) ) . and ( org.ovirt.engine.core.bll.validator.ValidationResultMatchers.replacements ( org.hamcrest.CoreMatchers.hasItem ( org.ovirt.engine.core.bll.validator.VmNicValidatorTest.CLUSTER_VERSION_REPLACEMENT ) ) ) , false , null ) ; }
Source:
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 ( "IsPoolTabValid" . equals ( propName ) ) { poolTab.markAsInvalid ( null ) ; } }

Target:
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 ( "IsPoolTabValid" . equals ( propName ) ) { poolTab.markAsInvalid ( null ) ; } }
Source:
private void LogCommand ( ) { java.lang.Class < ? > type = getClass ( ) ; org.ovirt.engine.core.bll.InternalCommandAttribute annotation = type.getAnnotation ( org.ovirt.engine.core.bll.InternalCommandAttribute.class ) ; if ( annotation == null ) { org.ovirt.engine.core.bll.CommandBase.log ( ) ; } }

Target:
private void logCommand ( ) { java.lang.Class < ? > type = getClass ( ) ; org.ovirt.engine.core.bll.InternalCommandAttribute annotation = type.getAnnotation ( org.ovirt.engine.core.bll.InternalCommandAttribute.class ) ; if ( annotation == null ) { org.ovirt.engine.core.bll.CommandBase.log ( ) ; } }
Source:
protected boolean RunConnectionStorageToDomain ( org.ovirt.engine.core.common.businessentities.storage_domains storageDomain , org.ovirt.engine.core.compat.Guid vdsId , int type ) { return true ; }

Target:
protected boolean runConnectionStorageToDomain ( org.ovirt.engine.core.common.businessentities.storage_domains storageDomain , org.ovirt.engine.core.compat.Guid vdsId , int type ) { return true ; }
Source:
public void canDoActionSucceeds ( ) { mockVdsWithOsVersion ( org.ovirt.engine.core.bll.hostdeploy.InstallVdsInternalCommandTest.VALID_OVIRT_VERSION ) ; org.ovirt.engine.core.common.action.hostdeploy.InstallVdsParameters param = org.ovirt.engine.core.bll.hostdeploy.InstallVdsInternalCommandTest.createParameters ( ) ; org.ovirt.engine.core.bll.hostdeploy.InstallVdsInternalCommand < org.ovirt.engine.core.common.action.hostdeploy.InstallVdsParameters > command = createCommand ( param ) ; org.junit.Assert.assertTrue ( command.canDoAction ( ) ) ; }

Target:
public void validateSucceeds ( ) { mockVdsWithOsVersion ( org.ovirt.engine.core.bll.hostdeploy.InstallVdsInternalCommandTest.VALID_OVIRT_VERSION ) ; org.ovirt.engine.core.common.action.hostdeploy.InstallVdsParameters param = org.ovirt.engine.core.bll.hostdeploy.InstallVdsInternalCommandTest.createParameters ( ) ; org.ovirt.engine.core.bll.hostdeploy.InstallVdsInternalCommand < org.ovirt.engine.core.common.action.hostdeploy.InstallVdsParameters > command = createCommand ( param ) ; org.junit.Assert.assertTrue ( command.validate ( ) ) ; }
Source:
public void changingNetworkNotAllowed ( ) { mockVnicProfileNetworkChange ( org.ovirt.engine.core.bll.validator.VnicProfileValidatorTest.DEFAULT_GUID , org.ovirt.engine.core.bll.validator.VnicProfileValidatorTest.OTHER_GUID ) ; org.junit.Assert.assertThat ( validator.networkNotChanged ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.ACTION_TYPE_FAILED_CANNOT_CHANGE_VNIC_PROFILE_NETWORK ) ) ; }

Target:
public void changingNetworkNotAllowed ( ) { mockVnicProfileNetworkChange ( org.ovirt.engine.core.bll.validator.VnicProfileValidatorTest.DEFAULT_GUID , org.ovirt.engine.core.bll.validator.VnicProfileValidatorTest.OTHER_GUID ) ; org.hamcrest.MatcherAssert.assertThat ( validator.networkNotChanged ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.ACTION_TYPE_FAILED_CANNOT_CHANGE_VNIC_PROFILE_NETWORK ) ) ; }
Source:
protected boolean isDiskExists ( org.ovirt.engine.core.compat.Guid id ) { return getBaseDiskDao ( ) . exists ( id ) ; }

Target:
protected boolean validateNoDuplicateDiskImages ( java.lang.Iterable < org.ovirt.engine.core.common.businessentities.DiskImage > images ) { if ( ! ( getParameters ( ) . isImportAsNewEntity ( ) ) ) { org.ovirt.engine.core.bll.validator.DiskImagesValidator diskImagesValidator = new org.ovirt.engine.core.bll.validator.DiskImagesValidator ( images ) ; return validate ( diskImagesValidator.diskImagesAlreadyExist ( ) ) ; } return true ; }
Source:
private boolean canRemoveDiskBasedOnStorageTypeCheck ( ) { if ( ( getDisk ( ) . getDiskStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.storage.Disk.DiskStorageType.IMAGE ) ) { return canRemoveDiskBasedOnImageStorageCheck ( ) ; } return true ; }

Target:
private boolean canRemoveDiskBasedOnStorageTypeCheck ( ) { if ( ( getDisk ( ) . getDiskStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.storage.DiskStorageType.IMAGE ) ) { return canRemoveDiskBasedOnImageStorageCheck ( ) ; } return true ; }
Source:
public java.lang.Void runInTransaction ( ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . SaveIsInitialized ( vmId , true ) ; return null ; }

Target:
public java.lang.Void runInTransaction ( ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmDao ( ) . saveIsInitialized ( vmId , true ) ; return null ; }
Source:
public java.lang.String loadTemplate ( ) { try { return readFileTemplate ( ) ; } catch ( java.io.FileNotFoundException e ) { e.printStackTrace ( ) ; return null ; } }

Target:
public java.lang.String loadTemplate ( ) { try { return readFileTemplate ( ) ; } catch ( java.io.FileNotFoundException e ) { e.printStackTrace ( ) ; throw new java.lang.RuntimeException ( ( ( "Template \"" + ( getName ( ) ) ) + "\" not found." ) , e ) ; } }
Source:
public void canDoActionSucceedsOnDiskDomainCheckWhenNoDisks ( ) throws java.lang.Exception { org.ovirt.engine.core.compat.Guid storageId = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; initializeCommand ( storageId ) ; mockVm ( ) ; mockStorageDomain ( storageId ) ; mockStoragePoolIsoMap ( ) ; runAndAssertCanDoActionSuccess ( ) ; }

Target:
public void canDoActionSucceedsOnDiskDomainCheckWhenNoDisks ( ) throws java.lang.Exception { org.ovirt.engine.core.compat.Guid storageId = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; initializeCommand ( storageId ) ; mockVm ( ) ; mockStorageDomain ( storageId ) ; mockStoragePoolIsoMap ( ) ; mockInterfaceList ( ) ; mockMaxPciSlots ( ) ; runAndAssertCanDoActionSuccess ( ) ; }
Source:
org.ovirt.engine.core.bll.network.macpoolmanager.Range addRange ( org.ovirt.engine.core.bll.network.macpoolmanager.Range range ) { ranges.add ( range ) ; return range ; }

Target:
org.ovirt.engine.core.bll.network.macpool.Range addRange ( org.ovirt.engine.core.bll.network.macpool.Range range ) { ranges.add ( range ) ; return range ; }
Source:
public void addTabWidget ( com.google.gwt.user.client.ui.Widget tabWidget , int index ) { getView ( ) . addTabWidget ( tabWidget , index ) ; }

Target:
public void addTabWidget ( com.google.gwt.user.client.ui.IsWidget tabWidget , int index ) { tabBar.addTabWidget ( tabWidget , index ) ; }
Source:
private void addErrataForHostsFeature ( org.ovirt.engine.api.model.Features features ) { org.ovirt.engine.api.model.Feature feature = new org.ovirt.engine.api.model.Feature ( ) ; feature.setName ( "Katello Errata" ) ; feature.setDescription ( "View available Katello Errata for hosts and system." ) ; features.getFeature ( ) . add ( feature ) ; }

Target:
private void addErrataForHostsFeature ( org.ovirt.engine.api.model.Features features ) { org.ovirt.engine.api.model.Feature feature = new org.ovirt.engine.api.model.Feature ( ) ; feature.setName ( "Katello Errata" ) ; feature.setDescription ( "View available Katello Errata for vms, hosts and system." ) ; features.getFeature ( ) . add ( feature ) ; }
Source:
com.google.gwt.safehtml.shared.SafeHtml titleSetupNetworkTooltip ( java.lang.String title ) ;

Target:
com.google.gwt.safehtml.shared.SafeHtml titleSetupNetworkTooltip ( java.lang.String title , java.lang.String backgroundColor ) ;
Source:
private boolean hasVms ( java.lang.Object selectedItem ) { if ( selectedItem instanceof org.ovirt.engine.core.common.businessentities.vm_pools ) { return ( ( ( org.ovirt.engine.core.common.businessentities.vm_pools ) ( selectedItem ) ) . getvm_assigned_count ( ) ) != 0 ; } return false ; }

Target:
private boolean hasVms ( java.lang.Object selectedItem ) { if ( selectedItem instanceof org.ovirt.engine.core.common.businessentities.VmPool ) { return ( ( ( org.ovirt.engine.core.common.businessentities.VmPool ) ( selectedItem ) ) . getAssignedVmsCount ( ) ) != 0 ; } return false ; }
Source:
public void setNetworks ( java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > networks ) { this . networks = networks ; }

Target:
private void setNetworkNames ( java.util.List < java.lang.String > networkNames ) { this . networkNames = networkNames ; if ( ! ( networkNames.isEmpty ( ) ) ) { setSelectedNetworkName ( networkNames.get ( 0 ) ) ; } }
Source:
public javax.ws.rs.core.Response performAction ( org.ovirt.engine.core.common.action.ActionType task , org.ovirt.engine.core.common.action.VdcActionParametersBase params ) { return performAction ( task , params , null , false ) ; }

Target:
public javax.ws.rs.core.Response performAction ( org.ovirt.engine.core.common.action.ActionType task , org.ovirt.engine.core.common.action.ActionParametersBase params ) { return performAction ( task , params , null , false ) ; }
Source:
public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > ( ) ; } return source ; }

Target:
public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > ( ) ; }
Source:
public void testExecuteQueryCommandNoNetworksDefined ( ) { getQuery ( ) . executeQueryCommand ( ) ; final java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > actual = getQuery ( ) . getQueryReturnValue ( ) . getReturnValue ( ) ; org.junit.Assert.assertTrue ( actual.isEmpty ( ) ) ; }

Target:
public void testExecuteQueryCommandNoNetworksDefined ( ) { getQuery ( ) . executeQueryCommand ( ) ; final java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > actual = getQuery ( ) . getQueryReturnValue ( ) . getReturnValue ( ) ; org.junit.jupiter.api.Assertions.assertTrue ( actual.isEmpty ( ) ) ; }
Source:
protected void executeVdsBrokerCommand ( ) { result = org.ovirt.engine.core.vdsbroker.gluster.GetStorageDeviceListVDSCommand.getBroker ( ) . getStorageDeviceList ( ) ; org.ovirt.engine.core.vdsbroker.gluster.GetStorageDeviceListVDSCommand.proceedProxyReturnValue ( ) ; setReturnValue ( result.getStorageDevices ( ) ) ; }

Target:
protected void executeVdsBrokerCommand ( ) { result = org.ovirt.engine.core.vdsbroker.gluster.GetStorageDeviceListVDSCommand.getBroker ( ) . glusterStorageDeviceList ( ) ; org.ovirt.engine.core.vdsbroker.gluster.GetStorageDeviceListVDSCommand.proceedProxyReturnValue ( ) ; setReturnValue ( result.getStorageDevices ( ) ) ; }
Source:
protected void endActionOnAllImageGroups ( ) { for ( org.ovirt.engine.core.common.action.VdcActionParametersBase p : getParameters ( ) . getImagesParameters ( ) ) { p.setTaskGroupSuccess ( getParameters ( ) . getTaskGroupSuccess ( ) ) ; getBackend ( ) . EndAction ( getImagesActionType ( ) , p ) ; } }

Target:
protected void endActionOnAllImageGroups ( ) { for ( org.ovirt.engine.core.common.action.VdcActionParametersBase p : getParameters ( ) . getImagesParameters ( ) ) { p.setTaskGroupSuccess ( getParameters ( ) . getTaskGroupSuccess ( ) ) ; getBackend ( ) . endAction ( getImagesActionType ( ) , p ) ; } }
Source:
public int getJsonThreadPoolSize ( ) { return this . jsonThreadPoolSize ; }

Target:
public void setJsonHost ( java.lang.String jsonHost ) { this . jsonHost = jsonHost ; }
Source:
private org.ovirt.engine.api.model.Clusters listVirtOnly ( ) { if ( isFiltered ( ) ) { return mapVirtOnlyCollection ( getBackendCollection ( VdcQueryType.GetAllClusters , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) ) ) ; } else { return mapVirtOnlyCollection ( getBackendCollection ( SearchType.Cluster ) ) ; } }

Target:
private org.ovirt.engine.api.model.Clusters listVirtOnly ( ) { if ( isFiltered ( ) ) { return mapVirtOnlyCollection ( getBackendCollection ( QueryType.GetAllClusters , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) ) ) ; } else { return mapVirtOnlyCollection ( getBackendCollection ( SearchType.Cluster ) ) ; } }
Source:
public org.ovirt.engine.api.resource.FenceAgentsResource getFenceAgentsResource ( ) { return inject ( new org.ovirt.engine.api.restapi.resource.BackendFenceAgentsResource ( id ) ) ; }

Target:
public org.ovirt.engine.api.resource.FenceAgentsResource getFenceAgentsResource ( ) { return inject ( new org.ovirt.engine.api.restapi.resource.BackendFenceAgentsResource ( guid ) ) ; }
Source:
private void createNonUpVds ( ) { org.mockito.Mockito.when ( vdsDao.getAllForStoragePoolAndStatus ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) , org.mockito.Matchers.eq ( VDSStatus.Up ) ) ) . thenReturn ( java.util.Collections.emptyList ( ) ) ; }

Target:
private void createNonUpVds ( ) { org.mockito.Mockito.when ( vdsDao.getAllForStoragePoolAndStatus ( org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.compat.Guid.class ) , org.mockito.ArgumentMatchers.eq ( VDSStatus.Up ) ) ) . thenReturn ( java.util.Collections.emptyList ( ) ) ; }
Source:
protected org.ovirt.engine.core.common.businessentities.storage_domains getStorageDomain ( org.ovirt.engine.core.compat.Guid domainId ) { return org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStorageDomainDAO ( ) . getForStoragePool ( domainId , vmTemplate.getstorage_pool_id ( ) . getValue ( ) ) ; }

Target:
protected org.ovirt.engine.core.common.businessentities.storage_domains getStorageDomain ( org.ovirt.engine.core.compat.Guid domainId ) { return org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStorageDomainDao ( ) . getForStoragePool ( domainId , vmTemplate.getstorage_pool_id ( ) . getValue ( ) ) ; }
Source:
public void setPrestartedVmsHint ( java.lang.String value ) { if ( ( prestartedVmsHint ) != value ) { prestartedVmsHint = value ; OnPropertyChanged ( new org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ( "PrestartedVmsHint" ) ) ; } }

Target:
public void setPrestartedVmsHint ( java.lang.String value ) { if ( ( prestartedVmsHint ) != value ) { prestartedVmsHint = value ; onPropertyChanged ( new org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ( "PrestartedVmsHint" ) ) ; } }
Source:
public org.ovirt.engine.core.common.interfaces.IVdcUser getUser ( ) { return ( ( org.ovirt.engine.core.common.interfaces.IVdcUser ) ( GetData ( org.ovirt.engine.core.bll.session.SessionDataContainer.VDC_USER_PARAMETER_NAME ) ) ) ; }

Target:
public org.ovirt.engine.core.common.interfaces.IVdcUser getUser ( boolean refresh ) { return ( ( org.ovirt.engine.core.common.interfaces.IVdcUser ) ( GetData ( org.ovirt.engine.core.bll.session.SessionDataContainer.VDC_USER_PARAMETER_NAME , refresh ) ) ) ; }
Source:
public void setTaskParameters ( org.ovirt.engine.core.common.action.VdcActionParametersBase value ) { cmdEntity.setActionParameters ( value ) ; }

Target:
public void setTaskParameters ( org.ovirt.engine.core.common.action.VdcActionParametersBase value ) { cmdEntity.setCommandParameters ( value ) ; }
Source:
public int compare ( org.ovirt.engine.core.common.businessentities.VmTemplate x , org.ovirt.engine.core.common.businessentities.VmTemplate y ) { return ( ( int ) ( ( x.getActualDiskSize ( ) ) - ( y.getActualDiskSize ( ) ) ) ) ; }

Target:
public int compare ( org.ovirt.engine.core.common.businessentities.VmTemplate x , org.ovirt.engine.core.common.businessentities.VmTemplate y ) { return ( ( int ) ( ( getCachedActualDiskSize ( x ) ) - ( getCachedActualDiskSize ( y ) ) ) ) ; }
Source:
public void testValidateAndSetClusterQuotaForVCPUGlobalNotExceeded ( ) throws java.lang.Exception { quotaManager.removeStoragePoolFromCache ( storage_pool.getId ( ) ) ; org.junit.Assert.assertTrue ( quotaManager.validateAndSetClusterQuota ( storage_pool , org.ovirt.engine.core.bll.quota.QuotaManagerTest.DESTINATION_GUID , org.ovirt.engine.core.bll.quota.QuotaManagerTest.VCPU_QUOTA_GLOBAL_NOT_EXCEEDED , 1 , 1 , canDoActionMessages ) ) ; assertEmptyCanDoActionMessage ( ) ; assertAuditLogNotWritten ( ) ; }

Target:
public void testValidateAndSetClusterQuotaForVCPUGlobalNotExceeded ( ) throws java.lang.Exception { org.junit.Assert.assertTrue ( consumeForVdsQuota ( org.ovirt.engine.core.bll.quota.QuotaManagerTest.VCPU_QUOTA_GLOBAL_NOT_EXCEEDED ) ) ; assertEmptyCanDoActionMessage ( ) ; assertAuditLogNotWritten ( ) ; }
Source:
public void canDoActionFailsOnRemoveLastAdGroupWithSuperUserPrivileges ( ) throws java.lang.Exception { mockIsLastSuperUserGroup ( true ) ; org.junit.Assert.assertFalse ( command.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( VdcBllMessages.ERROR_CANNOT_REMOVE_LAST_SUPER_USER_ROLE.toString ( ) ) ) ; }

Target:
public void canDoActionFailsOnRemoveLastAdGroupWithSuperUserPrivileges ( ) throws java.lang.Exception { mockIsLastSuperUserGroup ( true ) ; org.junit.Assert.assertFalse ( command.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( EngineMessage.ERROR_CANNOT_REMOVE_LAST_SUPER_USER_ROLE.toString ( ) ) ) ; }
Source:
public void render ( com.google.gwt.cell.client.Cell.Context context , org.ovirt.engine.ui.uicommonweb.models.EntityModel object , com.google.gwt.safehtml.shared.SafeHtmlBuilder sb ) { super . render ( context , object , sb ) ; sb.append ( templates.textForCheckBox ( constants.required ( ) ) ) ; }

Target:
public void render ( com.google.gwt.cell.client.Cell.Context context , org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterNetworkModel object , com.google.gwt.safehtml.shared.SafeHtmlBuilder sb ) { super . render ( context , object , sb ) ; sb.append ( templates.textForCheckBox ( constants.assign ( ) ) ) ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult hostNameIsValid ( ) { return org.ovirt.engine.core.bll.ValidationResult.failWith ( VdcBllMessages.ACTION_TYPE_FAILED_INVALID_VDS_HOSTNAME ) . unless ( org.ovirt.engine.core.common.utils.ValidationUtils.validHostname ( host.getHostName ( ) ) ) ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult hostNameIsValid ( ) { return org.ovirt.engine.core.bll.ValidationResult.failWith ( EngineMessage.ACTION_TYPE_FAILED_INVALID_VDS_HOSTNAME ) . unless ( org.ovirt.engine.core.common.utils.ValidationUtils.validHostname ( host.getHostName ( ) ) ) ; }
Source:
public void getJobsByNonExistsCorrelationID ( ) { java.util.List < org.ovirt.engine.core.common.job.Job > jobsList = dao.getJobsByCorrelationId ( "NO_CORRELATION_ID" ) ; org.junit.Assert.assertTrue ( "Verify no jobs associate with non existed correlation ID" , jobsList.isEmpty ( ) ) ; }

Target:
public void getJobsByNonExistsCorrelationID ( ) { java.util.List < org.ovirt.engine.core.common.job.Job > jobsList = dao.getJobsByCorrelationId ( "NO_CORRELATION_ID" ) ; org.junit.jupiter.api.Assertions.assertTrue ( jobsList.isEmpty ( ) , "Verify no jobs associate with non existed correlation ID" ) ; }
Source:
public org.ovirt.engine.core.common.businessentities.network.IPv4Address createPrimaryAddress ( ) { return new org.ovirt.engine.core.common.businessentities.network.IPv4Address ( ) ; }

Target:
public org.ovirt.engine.core.common.businessentities.network.IPv4Address createPrimaryAddress ( ) { org.ovirt.engine.core.common.businessentities.network.IPv4Address iPv4Address = new org.ovirt.engine.core.common.businessentities.network.IPv4Address ( ) ; iPv4Address.setBootProtocol ( NetworkBootProtocol.DHCP ) ; return iPv4Address ; }
Source:
public static org.ovirt.engine.api.model.NfsVersion map ( org.ovirt.engine.api.model.NfsVersion version , org.ovirt.engine.api.model.NfsVersion outgoing ) { switch ( version ) { case V3 : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.NfsVersion ; case V4 : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.NfsVersion ; case AUTO : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.NfsVersion ; default : return null ; } }

Target:
public static org.ovirt.engine.api.model.NfsVersion map ( org.ovirt.engine.api.model.NfsVersion version , org.ovirt.engine.api.model.NfsVersion outgoing ) { switch ( version ) { case V3 : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.NfsVersion ; case V4 : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.NfsVersion ; case V4_1 : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.NfsVersion ; case AUTO : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.NfsVersion ; default : return null ; } }
Source:
protected void EntityPropertyChanged ( java.lang.Object sender , org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs e ) { super . EntityPropertyChanged ( sender , e ) ; if ( ( e.PropertyName.equals ( "status" ) ) || ( e.PropertyName.equals ( "net_config_dirty" ) ) ) { UpdateActionAvailability ( ) ; } }

Target:
protected void entityPropertyChanged ( java.lang.Object sender , org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs e ) { super . entityPropertyChanged ( sender , e ) ; if ( ( e.PropertyName.equals ( "status" ) ) || ( e.PropertyName.equals ( "net_config_dirty" ) ) ) { UpdateActionAvailability ( ) ; } }
Source:
public void addWithExistingMacAddressSucceed ( ) { org.ovirt.engine.core.common.businessentities.network.VmNic iface = createNewInterface ( ) ; runAddAndVerify ( iface , true , org.mockito.Mockito.times ( 1 ) , org.ovirt.engine.core.bll.network.VmInterfaceManagerTest.OS_ID , org.ovirt.engine.core.bll.network.VmInterfaceManagerTest.VERSION_3_2 ) ; }

Target:
public void addWithExistingMacAddressSucceed ( ) { org.ovirt.engine.core.common.businessentities.network.VmNic iface = org.ovirt.engine.core.bll.network.VmInterfaceManagerTest.createNewInterface ( ) ; runAddAndVerify ( iface , true , org.mockito.Mockito.times ( 1 ) , org.ovirt.engine.core.bll.network.VmInterfaceManagerTest.OS_ID , org.ovirt.engine.core.bll.network.VmInterfaceManagerTest.VERSION_3_2 ) ; }
Source:
public org.ovirt.engine.core.common.queries.VdcQueryReturnValue runQuery ( org.ovirt.engine.core.common.queries.VdcQueryType actionType , org.ovirt.engine.core.common.queries.VdcQueryParametersBase parameters ) { return runQueryImpl ( actionType , parameters , true , null ) ; }

Target:
public org.ovirt.engine.core.common.queries.VdcQueryReturnValue runQuery ( org.ovirt.engine.core.common.queries.QueryType actionType , org.ovirt.engine.core.common.queries.VdcQueryParametersBase parameters ) { return runQueryImpl ( actionType , parameters , true , null ) ; }
Source:
public void tearDown ( ) { verifyAll ( ) ; org.ovirt.engine.api.common.invocation.CurrentManager.remove ( ) ; }

Target:
public void tearDown ( ) { verifyAll ( ) ; org.ovirt.engine.api.restapi.invocation.CurrentManager.remove ( ) ; }
Source:
public void testGetAllFromDisksIncludingSnapshotsForPrivilegedUserWithFilter ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.Disk > result = dao.getAllFromDisksIncludingSnapshots ( org.ovirt.engine.core.dao.PRIVILEGED_USER_ID , true ) ; org.junit.Assert.assertEquals ( "wrong number of returned disks" , 14 , result.size ( ) ) ; }

Target:
public void testGetAllFromDisksIncludingSnapshotsForPrivilegedUserWithFilter ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.Disk > result = dao.getAllFromDisksIncludingSnapshots ( org.ovirt.engine.core.dao.PRIVILEGED_USER_ID , true ) ; org.junit.jupiter.api.Assertions.assertEquals ( 14 , result.size ( ) , "wrong number of returned disks" ) ; }
Source:
public void calculateNetworkImplementationDetailsNetworkIsSyncWithMtuUnset ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface = createNetworkDevice ( ) ; calculateNetworkImplementationDetailsAndAssertSync ( iface , true , iface.getNetworkName ( ) , iface.isBridged ( ) , 0 , iface.getVlanId ( ) , null ) ; }

Target:
public void calculateNetworkImplementationDetailsNetworkIsSyncWithMtuUnset ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface = createNetworkDevice ( ) ; calculateNetworkImplementationDetailsAndAssertSync ( iface , true , iface.getNetworkName ( ) , iface.isBridged ( ) , 0 , iface.getVlanId ( ) , createQos ( ) ) ; }
Source:
public void testFromGraphicsType ( ) { org.junit.Assert.assertEquals ( GraphicsTypes.SPICE , org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel.GraphicsTypes.fromGraphicsType ( GraphicsType.SPICE ) ) ; org.junit.Assert.assertEquals ( GraphicsTypes.VNC , org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel.GraphicsTypes.fromGraphicsType ( GraphicsType.VNC ) ) ; }

Target:
public void testFromGraphicsType ( ) { org.junit.jupiter.api.Assertions.assertEquals ( GraphicsTypes.SPICE , org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel.GraphicsTypes.fromGraphicsType ( GraphicsType.SPICE ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( GraphicsTypes.VNC , org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel.GraphicsTypes.fromGraphicsType ( GraphicsType.VNC ) ) ; }
Source:
public void lowerVersionMgmtNetworkSupportedFeatures ( ) { storagePoolWithLowerVersion ( ) ; addNonDefaultClusterToPool ( ) ; addManagementNetworkToPool ( ) ; setupNetworkValidator ( true ) ; org.junit.Assert.assertTrue ( cmd.canDoAction ( ) ) ; }

Target:
public void lowerVersionMgmtNetworkSupportedFeatures ( ) { storagePoolWithLowerVersion ( ) ; addNonDefaultClusterToPool ( ) ; addManagementNetworksToPool ( 2 ) ; setupNetworkValidator ( true ) ; org.junit.Assert.assertTrue ( cmd.canDoAction ( ) ) ; }
Source:
private static org.ovirt.engine.core.common.businessentities.StorageServerConnections createConnectionWithCredentials ( java.lang.String target , java.lang.String userName , java.lang.String password ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections conn = new org.ovirt.engine.core.common.businessentities.StorageServerConnections ( ) ; conn.setiqn ( target ) ; conn.setuser_name ( userName ) ; conn.setpassword ( password ) ; return conn ; }

Target:
private static org.ovirt.engine.core.common.businessentities.StorageServerConnections createConnectionWithCredentials ( java.lang.String target , java.lang.String userName , java.lang.String password ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections conn = new org.ovirt.engine.core.common.businessentities.StorageServerConnections ( ) ; conn.setIqn ( target ) ; conn.setUserName ( userName ) ; conn.setPassword ( password ) ; return conn ; }
Source:
protected org.ovirt.engine.core.common.businessentities.VDSGroup getCluster ( org.ovirt.engine.api.model.VmPool pool ) { return getEntity ( org.ovirt.engine.core.common.businessentities.VDSGroup.class , VdcQueryType.GetVdsGroupByName , new org.ovirt.engine.core.common.queries.NameQueryParameters ( pool.getCluster ( ) . getName ( ) ) , ( "Cluster: name=" + ( pool.getCluster ( ) . getName ( ) ) ) ) ; }

Target:
protected org.ovirt.engine.core.common.businessentities.Cluster getCluster ( org.ovirt.engine.api.model.VmPool pool ) { return getEntity ( org.ovirt.engine.core.common.businessentities.Cluster.class , VdcQueryType.GetClusterByName , new org.ovirt.engine.core.common.queries.NameQueryParameters ( pool.getCluster ( ) . getName ( ) ) , ( "Cluster: name=" + ( pool.getCluster ( ) . getName ( ) ) ) ) ; }
Source:
protected org.ovirt.engine.core.bll.validator.VnicProfileValidator createVnicProfileValidator ( ) { return new org.ovirt.engine.core.bll.validator.VnicProfileValidator ( getVnicProfile ( ) , vmDao , dcDao ) ; }

Target:
protected org.ovirt.engine.core.bll.validator.VnicProfileValidator createVnicProfileValidator ( ) { return new org.ovirt.engine.core.bll.validator.VnicProfileValidator ( getVnicProfile ( ) , vmDao , dcDao , networkFilterDao ) ; }
Source:
protected org.ovirt.engine.core.compat.Guid lookupStorageDomainIdByName ( java.lang.String name ) { return getEntity ( org.ovirt.engine.core.common.businessentities.storage_domains.class , SearchType.StorageDomain , ( "Storage: name=" + name ) ) . getId ( ) ; }

Target:
protected org.ovirt.engine.core.compat.Guid lookupStorageDomainIdByName ( java.lang.String name ) { return getEntity ( org.ovirt.engine.api.model.StorageDomain.class , SearchType.StorageDomain , ( "Storage: name=" + name ) ) . getId ( ) ; }
Source:
protected org.ovirt.engine.core.common.businessentities.Snapshot addActiveSnapshot ( org.ovirt.engine.core.compat.Guid snapshotId ) { return new org.ovirt.engine.core.bll.snapshots.SnapshotsManager ( ) . addActiveSnapshot ( snapshotId , getVm ( ) , getCompensationContext ( ) ) ; }

Target:
protected org.ovirt.engine.core.common.businessentities.Snapshot addActiveSnapshot ( org.ovirt.engine.core.compat.Guid snapshotId ) { return snapshotsManager.addActiveSnapshot ( snapshotId , getVm ( ) , getMemoryVolumeForNewActiveSnapshot ( ) , getCompensationContext ( ) ) ; }
Source:
public void validateVmMemoryCantStartOnVdsBecauseOfGuestOverhead ( ) { org.mockito.Mockito.doReturn ( 256 ) . when ( vmOverheadCalculator ) . getStaticOverheadInMb ( org.mockito.Matchers.any ( ) ) ; boolean vmPassedMemoryRequirement = slaValidator.hasPhysMemoryToRunVM ( vds , vm , 0 ) ; org.junit.Assert.assertFalse ( vmPassedMemoryRequirement ) ; }

Target:
public void validateVmMemoryCantStartOnVdsBecauseOfGuestOverhead ( ) { org.mockito.Mockito.doReturn ( 256 ) . when ( vmOverheadCalculator ) . getStaticOverheadInMb ( org.mockito.Matchers.any ( ) ) ; boolean vmPassedMemoryRequirement = slaValidator.hasPhysMemoryToRunVM ( vds , vm , 0 ) ; org.junit.jupiter.api.Assertions.assertFalse ( vmPassedMemoryRequirement ) ; }
Source:
private void assertDiskDescriptionDecoding ( org.ovirt.engine.core.common.businessentities.storage.Disk disk ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.storage.Disk diskToEnrich = new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ; metadataDiskDescriptionHandler.enrichDiskByJsonDescription ( metadataDiskDescriptionHandler.generateJsonDiskDescription ( disk ) , diskToEnrich ) ; org.junit.Assert.assertEquals ( diskToEnrich , disk ) ; }

Target:
private void assertDiskDescriptionDecoding ( org.ovirt.engine.core.common.businessentities.storage.Disk disk ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.storage.Disk diskToEnrich = new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ; metadataDiskDescriptionHandler.enrichDiskByJsonDescription ( metadataDiskDescriptionHandler.generateJsonDiskDescription ( disk ) , diskToEnrich ) ; org.junit.jupiter.api.Assertions.assertEquals ( diskToEnrich , disk ) ; }
Source:
public java.util.List < org.ovirt.engine.core.common.job.Step > getStepsByExternalId ( org.ovirt.engine.core.compat.Guid externalId ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "external_id" , externalId ) ; return getCallsHandler ( ) . executeReadList ( "GetStepsByExternalTaskId" , createEntityRowMapper ( ) , parameterSource ) ; }

Target:
public java.util.List < org.ovirt.engine.core.common.job.Step > getStepsByExternalId ( org.ovirt.engine.core.compat.Guid externalId ) { return multipleResults ( entityManager.createNamedQuery ( "Step.getStepsByExternalId" , org.ovirt.engine.core.common.job.Step.class ) . setParameter ( "externalId" , externalId ) ) ; }
Source:
protected org.ovirt.engine.core.bll.SPMAsyncTask ConcreteCreateTask ( org.ovirt.engine.core.common.asynctasks.AsyncTaskCreationInfo asyncTaskCreationInfo , org.ovirt.engine.core.common.action.VdcActionType parentCommand ) { throw new java.lang.UnsupportedOperationException ( ) ; }

Target:
protected org.ovirt.engine.core.common.asynctasks.AsyncTaskType getTaskType ( ) { throw new java.lang.UnsupportedOperationException ( ) ; }
Source:
protected org.ovirt.engine.core.dao.VmNetworkInterfaceDAO getVmNetworkInterfaceDAO ( ) { return getDbFacade ( ) . getVmNetworkInterfaceDAO ( ) ; }

Target:
protected org.ovirt.engine.core.dao.NetworkClusterDAO getNetworkClusterDAO ( ) { return getDbFacade ( ) . getNetworkClusterDao ( ) ; }
Source:
public void testGetAllForStoragePool ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > result = dao.getAllForStoragePool ( org.ovirt.engine.core.dao.StorageDomainDaoTest.EXISTING_STORAGE_POOL_ID ) ; org.ovirt.engine.core.dao.StorageDomainDaoTest.assertGetAllForStoragePoolResult ( result , org.ovirt.engine.core.dao.StorageDomainDaoTest.EXISTING_STORAGE_POOL_ID ) ; }

Target:
public void testGetAllForStoragePool ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > result = dao.getAllForStoragePool ( FixturesTool.STORAGE_POOL_NFS ) ; org.ovirt.engine.core.dao.StorageDomainDaoTest.assertGetAllForStoragePoolResult ( result , FixturesTool.STORAGE_POOL_NFS ) ; }
Source:
public void subscribe ( org.ovirt.vdsm.jsonrpc.client.events.EventSubscriber subscriber ) { org.ovirt.engine.core.vdsbroker.ResourceManager.log.debug ( "subscribe called with subscription id: {}" , subscriber.getSubsctibtionId ( ) ) ; org.ovirt.vdsm.jsonrpc.client.reactors.ReactorFactory.getWorker ( this . parallelism ) . getPublisher ( ) . subscribe ( subscriber ) ; }

Target:
public void subscribe ( org.ovirt.vdsm.jsonrpc.client.events.EventSubscriber subscriber ) { org.ovirt.engine.core.vdsbroker.ResourceManager.log.debug ( "subscribe called with subscription id: {}" , subscriber.getSubscriptionId ( ) ) ; org.ovirt.vdsm.jsonrpc.client.reactors.ReactorFactory.getWorker ( this . parallelism ) . getPublisher ( ) . subscribe ( subscriber ) ; }