auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
void addTab ( com.google.gwt.event.shared.GwtEvent.Type < com.gwtplatform.mvp.client.RequestTabsHandler > requestTabsEventType , com.google.gwt.event.shared.GwtEvent.Type < com.gwtplatform.mvp.client.ChangeTabHandler > changeTabEventType , com.google.gwt.event.shared.GwtEvent.Type < com.gwtplatform.mvp.client.proxy.RevealContentHandler < ? > > slot , java.lang.String label , java.lang.String historyToken , boolean isMainTab , java.lang.String contentUrl , org.ovirt.engine.ui.webadmin.plugin.api.TabOptions options ) { dynamicUrlContentTabProxyFactory.create ( requestTabsEventType , changeTabEventType , slot , label , historyToken , isMainTab , contentUrl , ( options.getAlignRight ( ) ? org.ovirt.engine.ui.common.widget.Align.RIGHT : org.ovirt.engine.ui.common.widget.Align.LEFT ) ) ; org.ovirt.engine.ui.common.presenter.RedrawDynamicTabContainerEvent.fire ( this , requestTabsEventType ) ; }

Target:
void addTab ( com.google.gwt.event.shared.GwtEvent.Type < com.gwtplatform.mvp.client.RequestTabsHandler > requestTabsEventType , com.google.gwt.event.shared.GwtEvent.Type < com.gwtplatform.mvp.client.ChangeTabHandler > changeTabEventType , com.google.gwt.event.shared.GwtEvent.Type < com.gwtplatform.mvp.client.proxy.RevealContentHandler < ? > > slot , java.lang.String label , java.lang.String historyToken , boolean isMainTab , java.lang.String contentUrl , org.ovirt.engine.ui.webadmin.plugin.api.TabOptions options ) { dynamicUrlContentTabProxyFactory.create ( requestTabsEventType , changeTabEventType , slot , label , options.getPriority ( ) . floatValue ( ) , historyToken , isMainTab , contentUrl , ( options.getAlignRight ( ) ? org.ovirt.engine.ui.common.widget.Align.RIGHT : org.ovirt.engine.ui.common.widget.Align.LEFT ) ) ; org.ovirt.engine.ui.common.presenter.RedrawDynamicTabContainerEvent.fire ( this , requestTabsEventType ) ; }
Source:
public void testNotManagementNetworkPositive ( ) { org.mockito.Mockito.when ( network.getId ( ) ) . thenReturn ( DEFAULT_GUID ) ; org.mockito.Mockito.when ( managementNetworkUtil.isManagementNetwork ( DEFAULT_GUID ) ) . thenReturn ( true ) ; org.junit.Assert.assertThat ( validator.notManagementNetwork ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.NETWORK_CANNOT_REMOVE_MANAGEMENT_NETWORK ) ) ; }

Target:
public void testNotManagementNetworkNegative ( ) { org.mockito.Mockito.when ( network.getId ( ) ) . thenReturn ( org.ovirt.engine.core.bll.validator.NetworkValidatorTest.DEFAULT_GUID ) ; org.mockito.Mockito.when ( managementNetworkUtil.isManagementNetwork ( org.ovirt.engine.core.bll.validator.NetworkValidatorTest.DEFAULT_GUID ) ) . thenReturn ( false ) ; org.junit.Assert.assertThat ( validator.notManagementNetwork ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }
Source:
protected void commonInitialize ( ) { priorityUtil = new org.ovirt.engine.ui.uicommonweb.models.vms.PriorityUtil ( getModel ( ) ) ; virtioScsiUtil = new org.ovirt.engine.ui.uicommonweb.models.vms.VirtioScsiUtil ( getModel ( ) ) ; getModel ( ) . getVmId ( ) . setIsAvailable ( false ) ; getModel ( ) . getMigrationPolicies ( ) . setItems ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getMigrationPolicies ( ) ) ; }

Target:
protected void commonInitialize ( ) { priorityUtil = new org.ovirt.engine.ui.uicommonweb.models.vms.PriorityUtil ( getModel ( ) ) ; virtioScsiUtil = new org.ovirt.engine.ui.uicommonweb.models.vms.VirtioScsiUtil ( getModel ( ) ) ; getModel ( ) . getVmId ( ) . setIsAvailable ( false ) ; getModel ( ) . getMigrationPolicies ( ) . setItems ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getMigrationPolicies ( org.ovirt.engine.core.compat.Version.getLast ( ) ) ) ; }
Source:
public java.lang.Boolean call ( ) throws java.lang.Exception { java.lang.Integer support = ( ( java.lang.Integer ) ( _parser.cliEnvironmentGet ( VMConsoleEnv.SUPPORT ) ) ) ; if ( ( support == null ) || ( support != ( org.ovirt.ovirt_host_deploy.constants.Const.VMCONSOLE_SUPPORT_V1 ) ) ) { removeCustomizationCondition ( "VMCONSOLE_ENABLE" ) ; } return true ; }

Target:
public java.lang.Boolean call ( ) throws java.lang.Exception { java.lang.Integer support = ( ( java.lang.Integer ) ( _parser.cliEnvironmentGet ( VMConsoleEnv.SUPPORT ) ) ) ; if ( ( support == null ) || ( support != ( org.ovirt.ovirt_host_deploy.constants.Const.VMCONSOLE_SUPPORT_V1 ) ) ) { removeCustomizationCondition ( org.ovirt.engine.core.bll.hostdeploy.VdsDeploy.COND_VMCONSOLE_SETUP ) ; } return true ; }
Source:
private static void doTestLocaleOverride ( java.lang.String name ) { org.ovirt.engine.core.common.interfaces.ErrorTranslator et = new org.ovirt.engine.core.utils.ErrorTranslatorImpl ( name ) ; java.util.List < java.lang.String > errors = et.translateErrorText ( java.util.Arrays.asList ( org.ovirt.engine.core.utils.ErrorTranslatorTest.TEST_KEY_NO_REPLACEMENT ) , java.util.Locale.ITALIAN ) ; org.junit.Assert.assertEquals ( "Unexpected Size" , 1 , errors.size ( ) ) ; org.junit.Assert.assertEquals ( "String should equal" , "Impossibile trovare il desktop" , errors.get ( 0 ) ) ; java.lang.String error = et.translateErrorTextSingle ( org.ovirt.engine.core.utils.ErrorTranslatorTest.TEST_KEY_NO_REPLACEMENT , java.util.Locale.ITALIAN ) ; org.junit.Assert.assertEquals ( "String should equal" , "Impossibile trovare il desktop" , error ) ; }

Target:
private static void doTestLocaleOverride ( java.lang.String name ) { org.ovirt.engine.core.common.interfaces.ErrorTranslator et = new org.ovirt.engine.core.utils.ErrorTranslatorImpl ( name ) ; java.util.List < java.lang.String > errors = et.translateErrorText ( java.util.Collections.singletonList ( org.ovirt.engine.core.utils.ErrorTranslatorTest.TEST_KEY_NO_REPLACEMENT ) , java.util.Locale.ITALIAN ) ; org.junit.Assert.assertEquals ( "Unexpected Size" , 1 , errors.size ( ) ) ; org.junit.Assert.assertEquals ( "String should equal" , "Impossibile trovare il desktop" , errors.get ( 0 ) ) ; java.lang.String error = et.translateErrorTextSingle ( org.ovirt.engine.core.utils.ErrorTranslatorTest.TEST_KEY_NO_REPLACEMENT , java.util.Locale.ITALIAN ) ; org.junit.Assert.assertEquals ( "String should equal" , "Impossibile trovare il desktop" , error ) ; }
Source:
public static void getHostListByDataCenter ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid spId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > list = org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VDS > cast ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.IVdcQueryable > ) ( source ) ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllVdsByStoragePool , new org.ovirt.engine.core.common.queries.GetAllVdsByStoragePoolParameters ( spId ) , aQuery ) ; }

Target:
public static void getDefaultTimeZone ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.TimeZoneType timeZoneType ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { return source ; } return "" ; } } ; org.ovirt.engine.core.common.queries.TimeZoneQueryParams params = new org.ovirt.engine.core.common.queries.TimeZoneQueryParams ( ) ; params.setTimeZoneType ( timeZoneType ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetDefaultTimeZone , params , aQuery ) ; }
Source:
protected java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > getVmDisksFromDb ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > disksFromDb = org.ovirt.engine.core.bll.storage.disk.image.DisksFilter.filterImageDisks ( org.ovirt.engine.core.bll.storage.disk.CreateAllTemplateDisksFromSnapshotCommand.getVm ( ) . getDiskMap ( ) . values ( ) , org.ovirt.engine.core.bll.storage.disk.image.DisksFilter.ONLY_SNAPABLE , org.ovirt.engine.core.bll.storage.disk.image.DisksFilter.ONLY_ACTIVE ) ; disksFromDb.addAll ( org.ovirt.engine.core.bll.storage.disk.image.DisksFilter.filterCinderDisks ( org.ovirt.engine.core.bll.storage.disk.CreateAllTemplateDisksFromSnapshotCommand.getVm ( ) . getDiskMap ( ) . values ( ) , org.ovirt.engine.core.bll.storage.disk.image.DisksFilter.ONLY_PLUGGED ) ) ; return disksFromDb ; }

Target:
protected java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > getVmDisksFromDb ( ) { vmHandler.updateDisksFromDb ( org.ovirt.engine.core.bll.storage.disk.CreateAllTemplateDisksFromSnapshotCommand.getVm ( ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > disksFromDb = org.ovirt.engine.core.bll.storage.disk.image.DisksFilter.filterImageDisks ( org.ovirt.engine.core.bll.storage.disk.CreateAllTemplateDisksFromSnapshotCommand.getVm ( ) . getDiskMap ( ) . values ( ) , org.ovirt.engine.core.bll.storage.disk.image.DisksFilter.ONLY_SNAPABLE , org.ovirt.engine.core.bll.storage.disk.image.DisksFilter.ONLY_ACTIVE ) ; disksFromDb.addAll ( org.ovirt.engine.core.bll.storage.disk.image.DisksFilter.filterCinderDisks ( org.ovirt.engine.core.bll.storage.disk.CreateAllTemplateDisksFromSnapshotCommand.getVm ( ) . getDiskMap ( ) . values ( ) , org.ovirt.engine.core.bll.storage.disk.image.DisksFilter.ONLY_PLUGGED ) ) ; return disksFromDb ; }
Source:
public void onFailure ( java.lang.Throwable caught ) { if ( org.ovirt.engine.ui.frontend.Frontend.ignoreFailure ( caught ) ) { return ; } org.ovirt.engine.ui.frontend.Frontend.logger.log ( java.util.logging.Level.SEVERE , ( "Failed to execute RunPublicQuery: " + caught ) , caught ) ; org.ovirt.engine.ui.uicompat.FrontendQueryAsyncResult f = new org.ovirt.engine.ui.uicompat.FrontendQueryAsyncResult ( queryType , parameters , null ) ; org.ovirt.engine.ui.frontend.Frontend.getEventsHandler ( ) . runQueryFailed ( null ) ; org.ovirt.engine.ui.frontend.Frontend.failureEventHandler ( caught ) ; callback.OnFailure ( f ) ; }

Target:
private static void failureEventHandler ( java.lang.String description , java.util.ArrayList < java.lang.String > errorMessages ) { java.util.ArrayList < org.ovirt.engine.ui.frontend.Message > messages = new java.util.ArrayList < org.ovirt.engine.ui.frontend.Message > ( ) ; for ( java.lang.String errorMessage : errorMessages ) { messages.add ( new org.ovirt.engine.ui.frontend.Message ( description , errorMessage ) ) ; } org.ovirt.engine.ui.frontend.Frontend.frontendFailureEvent.raise ( org.ovirt.engine.ui.frontend.Frontend.class , new org.ovirt.engine.ui.frontend.FrontendFailureEventArgs ( messages ) ) ; }
Source:
private void useAlternateCredentials_EntityChanged ( ) { boolean useAlternateCredentials = getUseAlternateCredentials ( ) . getEntity ( ) ; getSysPrepUserName ( ) . setIsChangable ( getUseAlternateCredentials ( ) . getEntity ( ) ) ; getSysPrepPassword ( ) . setIsChangable ( getUseAlternateCredentials ( ) . getEntity ( ) ) ; getSysPrepUserName ( ) . setEntity ( ( useAlternateCredentials ? "" : null ) ) ; getSysPrepPassword ( ) . setEntity ( ( useAlternateCredentials ? "" : null ) ) ; }

Target:
private void useAlternateCredentials_EntityChanged ( ) { boolean useAlternateCredentials = getUseAlternateCredentials ( ) . getEntity ( ) ; getSysPrepUserName ( ) . setIsChangeable ( getUseAlternateCredentials ( ) . getEntity ( ) ) ; getSysPrepPassword ( ) . setIsChangeable ( getUseAlternateCredentials ( ) . getEntity ( ) ) ; getSysPrepUserName ( ) . setEntity ( ( useAlternateCredentials ? "" : null ) ) ; getSysPrepPassword ( ) . setEntity ( ( useAlternateCredentials ? "" : null ) ) ; }
Source:
public void testNetworkCanBeAttachedNetworkAttachmentCannotBeAddedOnVlanInterfaces ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface vdsNetworkInterface = createVdsNetworkInterfaceWithName ( ) ; vdsNetworkInterface.setVlanId ( 1 ) ; org.junit.Assert.assertThat ( new org.ovirt.engine.core.bll.validator.HostInterfaceValidator ( vdsNetworkInterface ) . networkCanBeAttached ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( VdcBllMessages.CANNOT_ADD_NETWORK_ATTACHMENT_ON_SLAVE_OR_VLAN ) ) ; }

Target:
public void testNetworkCanBeAttachedNetworkAttachmentCannotBeAddedOnVlanInterfaces ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface vdsNetworkInterface = createVdsNetworkInterfaceWithName ( ) ; vdsNetworkInterface.setVlanId ( 1 ) ; java.lang.String networkName = "networkName" ; org.junit.Assert.assertThat ( new org.ovirt.engine.core.bll.validator.HostInterfaceValidator ( vdsNetworkInterface ) . networkCanBeAttached ( networkName ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.CANNOT_ADD_NETWORK_ATTACHMENT_ON_SLAVE_OR_VLAN , org.ovirt.engine.core.utils.ReplacementUtils.createSetVariableString ( HostInterfaceValidator.VAR_NETWORK_NAME , networkName ) , org.ovirt.engine.core.utils.ReplacementUtils.createSetVariableString ( HostInterfaceValidator.VAR_NIC_NAME , vdsNetworkInterface.getName ( ) ) ) ) ; }
Source:
public java.util.List < org.ovirt.engine.core.common.businessentities.VDS > getAllForVdsGroupWithStatus ( org.ovirt.engine.core.compat.Guid vdsGroupId , org.ovirt.engine.core.common.businessentities.VDSStatus status ) { java.util.List < org.ovirt.engine.core.common.businessentities.VDS > vdsList = getCallsHandler ( ) . executeReadList ( "getVdsForVdsGroupWithStatus" , org.ovirt.engine.core.dao.VdsDaoImpl.VdsRowMapper.instance , getCustomMapSqlParameterSource ( ) . addValue ( "vds_group_id" , vdsGroupId ) . addValue ( "status" , status.getValue ( ) ) ) ; return uniteAgents ( vdsList ) ; }

Target:
public java.util.List < org.ovirt.engine.core.common.businessentities.VDS > getAllForClusterWithStatus ( org.ovirt.engine.core.compat.Guid clusterId , org.ovirt.engine.core.common.businessentities.VDSStatus status ) { java.util.List < org.ovirt.engine.core.common.businessentities.VDS > vdsList = getCallsHandler ( ) . executeReadList ( "getVdsForClusterWithStatus" , org.ovirt.engine.core.dao.VdsDaoImpl.VdsRowMapper.instance , getCustomMapSqlParameterSource ( ) . addValue ( "cluster_id" , clusterId ) . addValue ( "status" , status.getValue ( ) ) ) ; return uniteAgents ( vdsList ) ; }
Source:
private static org.ovirt.engine.core.common.businessentities.VDSGroup createDefaultVdsGroup ( ) { org.ovirt.engine.core.common.businessentities.VDSGroup group = new org.ovirt.engine.core.common.businessentities.VDSGroup ( ) ; group.setName ( "Default" ) ; group.setId ( VDSGroup.DEFAULT_VDS_GROUP_ID ) ; group.setcpu_name ( "Intel Conroe" ) ; group.setArchitectureType ( ArchitectureType.x86_64 ) ; group.setcompatibility_version ( org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.VERSION_1_1 ) ; group.setStoragePoolId ( org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.STORAGE_POOL_ID ) ; return group ; }

Target:
private static org.ovirt.engine.core.common.businessentities.VDSGroup createDefaultVdsGroup ( ) { org.ovirt.engine.core.common.businessentities.VDSGroup group = new org.ovirt.engine.core.common.businessentities.VDSGroup ( ) ; group.setName ( "Default" ) ; group.setId ( org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.DEFAULT_VDS_GROUP_ID ) ; group.setcpu_name ( "Intel Conroe" ) ; group.setcompatibility_version ( org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.VERSION_1_1 ) ; group.setStoragePoolId ( org.ovirt.engine.core.bll.UpdateVdsGroupCommandTest.STORAGE_POOL_ID ) ; group.setArchitecture ( ArchitectureType.x86_64 ) ; return group ; }
Source:
public org.ovirt.engine.api.model.HostNic addParents ( org.ovirt.engine.api.model.HostNic nic ) { nic.setHost ( new org.ovirt.engine.api.model.Host ( ) ) ; nic.getHost ( ) . setId ( hostId ) ; return nic ; }

Target:
public org.ovirt.engine.api.model.HostNic addParents ( org.ovirt.engine.api.model.HostNic hostNic ) { final org.ovirt.engine.api.model.HostNic nic = super . addParents ( hostNic ) ; final org.ovirt.engine.api.model.Host host = new org.ovirt.engine.api.model.Host ( ) ; host.setId ( hostId ) ; nic.setHost ( host ) ; if ( ( nic.getPhysicalFunction ( ) ) != null ) { nic.getPhysicalFunction ( ) . setHost ( host ) ; } return nic ; }
Source:
public void setItems ( java.util.Collection value ) { java.util.List < org.ovirt.engine.core.common.businessentities.AuditLog > list = ( ( java.util.List < org.ovirt.engine.core.common.businessentities.AuditLog > ) ( value ) ) ; if ( list != null ) { java.util.Collections.sort ( list , java.util.Collections.reverseOrder ( new org.ovirt.engine.ui.uicommonweb.Linq.AuditLogComparer ( ) ) ) ; } super . setItems ( list ) ; }

Target:
public void setItems ( java.util.Collection value ) { java.util.List < org.ovirt.engine.core.common.businessentities.AuditLog > list = ( ( java.util.List < org.ovirt.engine.core.common.businessentities.AuditLog > ) ( value ) ) ; if ( list != null ) { java.util.Collections.sort ( list , Linq.AuditLogComparer.reversed ( ) ) ; } super . setItems ( list ) ; }
Source:
public void Executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { org.ovirt.engine.core.common.action.VdcReturnValueBase returnValueBase = result.getReturnValue ( ) ; if ( ( returnValueBase != null ) && ( returnValueBase.getSucceeded ( ) ) ) { if ( ( windowModel ) != null ) { windowModel.StopProgress ( ) ; listModel.setWindow ( null ) ; listModel.setConfirmWindow ( null ) ; listModel.search ( ) ; } } }

Target:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { org.ovirt.engine.core.common.action.VdcReturnValueBase returnValueBase = result.getReturnValue ( ) ; if ( ( returnValueBase != null ) && ( returnValueBase.getSucceeded ( ) ) ) { if ( ( windowModel ) != null ) { windowModel.StopProgress ( ) ; listModel.setWindow ( null ) ; listModel.setConfirmWindow ( null ) ; listModel.search ( ) ; } } }
Source:
protected void executeCommand ( ) { try { addVmToDb ( ) ; org.ovirt.engine.core.common.businessentities.VM vm = getVm ( ) ; if ( vm.getImages ( ) . isEmpty ( ) ) { endVmRelatedOps ( ) ; } else { processImages ( ) ; } } catch ( java.lang.RuntimeException e ) { org.ovirt.engine.core.bll.network.MacPoolManager.getInstance ( ) . freeMacs ( macsAdded ) ; throw e ; } setSucceeded ( true ) ; }

Target:
protected void endWithFailure ( ) { setVm ( null ) ; if ( ( getVm ( ) ) != null ) { removeVmSnapshots ( getVm ( ) ) ; endActionOnAllImageGroups ( ) ; removeVmNetworkInterfaces ( ) ; getVmDynamicDAO ( ) . remove ( getVmId ( ) ) ; getVmStatisticsDAO ( ) . remove ( getVmId ( ) ) ; getVmStaticDAO ( ) . remove ( getVmId ( ) ) ; setSucceeded ( true ) ; } else { setVm ( getParameters ( ) . getVm ( ) ) ; getReturnValue ( ) . setEndActionTryAgain ( false ) ; } }
Source:
public static void initDefaultOSes ( ) { org.ovirt.engine.ui.frontend.AsyncQuery callback = new org.ovirt.engine.ui.frontend.AsyncQuery ( ) ; callback.asyncCallback = new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.defaultOSes = ( ( java.util.HashMap < org.ovirt.engine.core.common.businessentities.ArchitectureType , java.lang.Integer > ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ) ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.OsRepository , new org.ovirt.engine.core.common.queries.OsQueryParameters ( org.ovirt.engine.core.common.queries.OsQueryParameters.OsRepositoryVerb.GetDefaultOSes ) , callback ) ; }

Target:
public void initDefaultOSes ( ) { org.ovirt.engine.ui.frontend.AsyncQuery callback = new org.ovirt.engine.ui.frontend.AsyncQuery ( ) ; callback.asyncCallback = new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { defaultOSes = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.OsRepository , new org.ovirt.engine.core.common.queries.OsQueryParameters ( org.ovirt.engine.core.common.queries.OsQueryParameters.OsRepositoryVerb.GetDefaultOSes ) , callback ) ; }
Source:
public void testValidModifiedBondsFailsWhenSlavesValidationFails ( ) throws java.lang.Exception { org.ovirt.engine.core.common.errors.EngineMessage engineMessage = org.ovirt.engine.core.common.errors.EngineMessage.NETWORK_INTERFACE_ATTACHED_TO_NETWORK_CANNOT_BE_SLAVE ; org.ovirt.engine.core.bll.ValidationResult slavesValidationResult = new org.ovirt.engine.core.bll.ValidationResult ( engineMessage , org.ovirt.engine.core.utils.ReplacementUtils.getVariableAssignmentString ( engineMessage , "slaveA" ) , org.ovirt.engine.core.utils.ReplacementUtils.createSetVariableString ( HostSetupNetworksValidator.VAR_NETWORK_NAME , "networkName" ) ) ; org.ovirt.engine.core.common.businessentities.network.Bond bond = createBond ( ) ; bond.setSlaves ( java.util.Arrays.asList ( "slaveA" , "slaveB" ) ) ; doTestValidModifiedBonds ( bond , ValidationResult.VALID , ValidationResult.VALID , slavesValidationResult , slavesValidationResult ) ; }

Target:
public void testValidModifiedBondsFailsWhenBondNotHaveNameAndId ( ) throws java.lang.Exception { doTestValidModifiedBonds ( new org.ovirt.engine.core.common.businessentities.network.Bond ( ) , ValidationResult.VALID , new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.BOND_DOES_NOT_HAVE_NEITHER_ID_NOR_NAME_SPECIFIED ) , ValidationResult.VALID ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.StorageServerConnections createPosixConnection ( java.lang.String connection , org.ovirt.engine.core.common.businessentities.StorageType type , java.lang.String vfsType , java.lang.String mountOptions ) { org.ovirt.engine.core.compat.Guid id = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; org.ovirt.engine.core.common.businessentities.StorageServerConnections connectionDetails = populateBasicConnectionDetails ( id , connection , type ) ; connectionDetails.setVfsType ( vfsType ) ; connectionDetails.setMountOptions ( mountOptions ) ; return connectionDetails ; }

Target:
public void checkEmptyIdHost ( ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections newNFSConnection = createNFSConnection ( "multipass.my.domain.tlv.company.com:/export/allstorage/data2" , StorageType.NFS , NfsVersion.V4 , 300 , 0 ) ; parameters.setStorageServerConnection ( newNFSConnection ) ; parameters.setVdsId ( Guid.Empty ) ; org.mockito.Mockito.when ( storageConnDao.get ( newNFSConnection.getid ( ) ) ) . thenReturn ( oldNFSConnection ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionSuccess ( command ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface createNicSyncedWithNetwork ( java.lang.String nicName , org.ovirt.engine.core.common.businessentities.network.Network network ) { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic = createVdsInterface ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , nicName , false , null , network.getVlanId ( ) , network.getName ( ) , network.isVmNetwork ( ) ) ; return nic ; }

Target:
private org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface createNicSyncedWithNetwork ( java.lang.String nicName , org.ovirt.engine.core.common.businessentities.network.Network network ) { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic = createVdsInterface ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , nicName , false , null , network.getVlanId ( ) , network.getName ( ) , network.isVmNetwork ( ) , network.getAddr ( ) ) ; return nic ; }
Source:
private void HandleEndAction ( ) { try { if ( org.ovirt.engine.core.bll.RemoveVmTemplateCommand.getParameters ( ) . isRemoveTemplateFromDb ( ) ) { RemoveTemplateFromDb ( ) ; } else { org.ovirt.engine.core.bll.VmTemplateHandler.UnLockVmTemplate ( org.ovirt.engine.core.bll.RemoveVmTemplateCommand.getVmTemplateId ( ) ) ; } org.ovirt.engine.core.bll.RemoveVmTemplateCommand.setSucceeded ( true ) ; } catch ( java.lang.RuntimeException e ) { org.ovirt.engine.core.bll.RemoveVmTemplateCommand.getReturnValue ( ) . setEndActionTryAgain ( false ) ; log.error ( "Encountered a problem removing template from DB, setting the action not to retry." ) ; } }

Target:
private void HandleEndAction ( ) { try { if ( org.ovirt.engine.core.bll.RemoveVmTemplateCommand.getParameters ( ) . isRemoveTemplateFromDb ( ) ) { removeTemplateFromDb ( ) ; } else { org.ovirt.engine.core.bll.VmTemplateHandler.unlockVmTemplate ( org.ovirt.engine.core.bll.RemoveVmTemplateCommand.getVmTemplateId ( ) ) ; } org.ovirt.engine.core.bll.RemoveVmTemplateCommand.setSucceeded ( true ) ; } catch ( java.lang.RuntimeException e ) { org.ovirt.engine.core.bll.RemoveVmTemplateCommand.getReturnValue ( ) . setEndActionTryAgain ( false ) ; log.error ( "Encountered a problem removing template from DB, setting the action not to retry." ) ; } }
Source:
public void addTask ( org.ovirt.vdsmfake.task.TaskType type , long delay , java.lang.Object object ) { try { if ( org.ovirt.vdsmfake.AppConfig.getInstance ( ) . isJsonEvents ( ) ) { new org.ovirt.vdsmfake.rpc.json.JsonRpcNotification ( ) . fireEvents ( type , delay , object ) ; } else { org.ovirt.vdsmfake.task.TaskProcessor.getInstance ( ) . addTask ( new org.ovirt.vdsmfake.task.TaskRequest ( type , delay , object ) ) ; } } catch ( java.lang.Exception e ) { log.error ( "wrapping task error:" , e ) ; } }

Target:
public void addTask ( org.ovirt.vdsmfake.task.TaskType type , long delay , java.lang.Object object ) { try { if ( org.ovirt.vdsmfake.AppConfig.getInstance ( ) . isJsonEvents ( ) ) { jsonRpcNotification.fireEvents ( type , delay , object ) ; } else { org.ovirt.vdsmfake.task.TaskProcessor.getInstance ( ) . addTask ( new org.ovirt.vdsmfake.task.TaskRequest ( type , delay , object ) ) ; } } catch ( java.lang.Exception e ) { log.error ( "wrapping task error:" , e ) ; } }
Source:
public void testConnection ( ) { try { getClient ( ) . execute ( new com.woorea.openstack.base.client.OpenStackRequest ( getClient ( ) , com.woorea.openstack.base.client.HttpMethod.GET , "" , null , null ) ) ; } catch ( java.lang.RuntimeException e ) { throw new org.ovirt.engine.core.common.errors.VdcBLLException ( org.ovirt.engine.core.common.errors.VdcBllErrors.PROVIDER_FAILURE , e ) ; } }

Target:
public void testConnection ( ) { try { getClient ( ) . execute ( new com.woorea.openstack.base.client.OpenStackRequest ( getClient ( ) , com.woorea.openstack.base.client.HttpMethod.GET , "" , null , null ) ) ; } catch ( com.woorea.openstack.base.client.OpenStackResponseException e ) { org.ovirt.engine.core.bll.provider.storage.AbstractOpenStackStorageProviderProxy.log.error ( "{} (OpenStack response error code: {})" , e.getMessage ( ) , e.getStatus ( ) ) ; org.ovirt.engine.core.bll.provider.storage.AbstractOpenStackStorageProviderProxy.log.debug ( "Exception" , e ) ; throw new org.ovirt.engine.core.common.errors.VdcBLLException ( org.ovirt.engine.core.common.errors.VdcBllErrors.PROVIDER_FAILURE , e ) ; } catch ( java.lang.RuntimeException e ) { throw new org.ovirt.engine.core.common.errors.VdcBLLException ( org.ovirt.engine.core.common.errors.VdcBllErrors.PROVIDER_FAILURE , e ) ; } }
Source:
public void PostOnSaveInternal ( org.ovirt.engine.core.common.action.VdcReturnValueBase returnValue ) { org.ovirt.engine.ui.uicommonweb.models.datacenters.DataCenterModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.datacenters.DataCenterModel ) ( getWindow ( ) ) ) ; model.StopProgress ( ) ; Cancel ( ) ; if ( ( ( model.getIsNew ( ) ) && ( returnValue != null ) ) && ( returnValue.getSucceeded ( ) ) ) { setGuideContext ( returnValue.getActionReturnValue ( ) ) ; UpdateActionAvailability ( ) ; getGuideCommand ( ) . Execute ( ) ; } }

Target:
protected void selectedItemsChanged ( ) { super . selectedItemsChanged ( ) ; updateActionAvailability ( ) ; }
Source:
public static void getVmGuestAgentInterfacesByVmId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmGuestAgentInterface > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmGuestAgentInterfacesByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }

Target:
public static void getExternalNetworkMap ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid providerId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.HashMap < org.ovirt.engine.core.common.businessentities.network.Network , java.util.Set < org.ovirt.engine.core.compat.Guid > > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllExternalNetworksOnProvider , new org.ovirt.engine.core.common.queries.IdQueryParameters ( providerId ) , aQuery ) ; }
Source:
public static void checkDbVersion ( java.sql.Connection conn , java.lang.String configurationFile ) throws java.io.IOException , java.sql.SQLException { boolean uptodate = ( new org.ovirt.engine.extension.aaa.jdbc.core.datasource.Sql.Query ( org.ovirt.engine.extension.aaa.jdbc.Formatter.format ( "SELECT COUNT(script) AS count FROM schema_version WHERE script = {}" , org.ovirt.engine.extension.aaa.jdbc.Formatter.escapeString ( org.ovirt.engine.extension.aaa.jdbc.binding.api.ExtensionUtils.getLatestUpgradeScriptName ( org.ovirt.engine.extension.aaa.jdbc.binding.api.ExtensionUtils.getDbScriptsDir ( configurationFile ) ) ) ) ) . asInteger ( conn , "count" ) ) == 1 ; if ( ! uptodate ) { throw new java.lang.RuntimeException ( ( "Database schema is older than required by currently installed ovirt-engine-extension-aaa-jdbc " + ( ( "package version. Please upgrade profile database schema before proceeding (for more info about " + "upgrade please take a look at README.admin file contained in ovirt-engine-extension-aaa-jdbc " ) + "package)." ) ) ) ; } }

Target:
public static void checkDbVersion ( javax.sql.DataSource ds , java.lang.String configurationFile ) throws java.io.IOException , java.sql.SQLException { try ( java.sql.Connection conn = ds.getConnection ( ) ) { boolean uptodate = ( new org.ovirt.engine.extension.aaa.jdbc.core.datasource.Sql.Query ( org.ovirt.engine.extension.aaa.jdbc.Formatter.format ( "SELECT COUNT(script) AS count FROM schema_version WHERE script = {}" , org.ovirt.engine.extension.aaa.jdbc.Formatter.escapeString ( org.ovirt.engine.extension.aaa.jdbc.binding.api.ExtensionUtils.getLatestUpgradeScriptName ( org.ovirt.engine.extension.aaa.jdbc.binding.api.ExtensionUtils.getDbScriptsDir ( configurationFile ) ) ) ) ) . asInteger ( conn , "count" ) ) == 1 ; if ( ! uptodate ) { throw new java.lang.RuntimeException ( ( "Database schema is older than required by currently installed ovirt-engine-extension-aaa-jdbc " + ( ( "package version. Please upgrade profile database schema before proceeding (for more info about " + "upgrade please take a look at README.admin file contained in ovirt-engine-extension-aaa-jdbc " ) + "package)." ) ) ) ; } } }
Source:
public boolean handle ( java.util.List < org.ovirt.engine.api.extensions.ExtMap > queryResults ) { boolean result = true ; for ( org.ovirt.engine.api.extensions.ExtMap queryResult : queryResults ) { if ( ( directoryUsers.size ( ) ) < ( org.ovirt.engine.core.aaa.AuthzUtils.QUERIES_RESULTS_LIMIT ) ) { directoryUsers.add ( org.ovirt.engine.core.aaa.AuthzUtils.mapPrincipalRecord ( extension , queryResult ) ) ; } else { result = false ; break ; } } return result ; }

Target:
public boolean handle ( java.util.List < org.ovirt.engine.api.extensions.ExtMap > queryResults ) { boolean result = true ; for ( org.ovirt.engine.api.extensions.ExtMap queryResult : queryResults ) { if ( ( principalRecords.size ( ) ) < ( org.ovirt.engine.core.aaa.AuthzUtils.QUERIES_RESULTS_LIMIT ) ) { principalRecords.add ( queryResult ) ; } else { result = false ; break ; } } return result ; }
Source:
public javax.ws.rs.core.Response remove ( ) { org.ovirt.engine.core.common.businessentities.Quota entity = getEntity ( org.ovirt.engine.core.common.businessentities.Quota.class , VdcQueryType.GetQuotaByQuotaId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( parentId ) , parentId.toString ( ) ) ; updateEntityForRemove ( entity , asGuid ( id ) ) ; return performAction ( VdcActionType.UpdateQuota , new org.ovirt.engine.core.common.action.QuotaCRUDParameters ( entity ) ) ; }

Target:
public javax.ws.rs.core.Response remove ( ) { org.ovirt.engine.core.common.businessentities.Quota entity = getEntity ( org.ovirt.engine.core.common.businessentities.Quota.class , VdcQueryType.GetQuotaByQuotaId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( parentId ) , parentId.toString ( ) ) ; updateEntityForRemove ( entity , asGuid ( id ) ) ; return performAction ( ActionType.UpdateQuota , new org.ovirt.engine.core.common.action.QuotaCRUDParameters ( entity ) ) ; }
Source:
private void New ( ) { org.ovirt.engine.core.common.businessentities.VM vm = getEntity ( ) ; if ( ( getWindow ( ) ) != null ) { return ; } org.ovirt.engine.ui.uicommonweb.models.vms.VmInterfaceModel model = org.ovirt.engine.ui.uicommonweb.models.vms.NewVmInterfaceModel.createInstance ( getEntity ( ) . getStaticData ( ) , getEntity ( ) . getVdsGroupCompatibilityVersion ( ) , ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ) ( getItems ( ) ) ) , this ) ; setWindow ( model ) ; }

Target:
private void newEntity ( ) { org.ovirt.engine.core.common.businessentities.VM vm = getEntity ( ) ; if ( ( getWindow ( ) ) != null ) { return ; } org.ovirt.engine.ui.uicommonweb.models.vms.VmInterfaceModel model = org.ovirt.engine.ui.uicommonweb.models.vms.NewVmInterfaceModel.createInstance ( getEntity ( ) . getStaticData ( ) , getEntity ( ) . getVdsGroupCompatibilityVersion ( ) , ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ) ( getItems ( ) ) ) , this ) ; setWindow ( model ) ; }
Source:
public void getClusterDesktopMemoryOverCommit ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) : 0 ; } } ; getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.MaxVdsMemOverCommit , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public void getClusterServerMemoryOverCommit ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) : 0 ; } } ; getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.MaxVdsMemOverCommitForServers , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { super . eventRaised ( ev , sender , args ) ; if ( ( ev.matchesDefinition ( EntityModel.entityChangedEventDefinition ) ) && ( sender == ( getPath ( ) ) ) ) { getPathChangedEvent ( ) . raise ( this , EventArgs.Empty ) ; } else if ( ( ev.matchesDefinition ( EntityModel.entityChangedEventDefinition ) ) && ( sender == ( getOverride ( ) ) ) ) { override_EntityChanged ( args ) ; } }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { super . eventRaised ( ev , sender , args ) ; if ( ( ev.matchesDefinition ( EntityModel.entityChangedEventDefinition ) ) && ( sender == ( getPath ( ) ) ) ) { getPathChangedEvent ( ) . raise ( this , EventArgs.EMPTY ) ; } else if ( ( ev.matchesDefinition ( EntityModel.entityChangedEventDefinition ) ) && ( sender == ( getOverride ( ) ) ) ) { override_EntityChanged ( args ) ; } }
Source:
private java.lang.String getServerFingerprint ( java.lang.String hostnameOrIp ) { java.lang.String serverKeyFingerprint = "" ; if ( org.ovirt.engine.core.bll.gluster.GetAddedGlusterServersQuery.getParameters ( ) . isServerKeyFingerprintRequired ( ) ) { org.ovirt.engine.core.utils.hostinstall.VdsInstallerSSH sshWrapper = getVdsInstallerSSHInstance ( ) ; try { serverKeyFingerprint = sshWrapper.getServerKeyFingerprint ( hostnameOrIp ) ; } catch ( java.lang.Throwable e ) { log.errorFormat ( "Could not fetch fingerprint of host {0} with message: {1}" , hostnameOrIp , org.apache.commons.lang.exception.ExceptionUtils.getMessage ( e ) ) ; } finally { sshWrapper.shutdown ( ) ; } } return serverKeyFingerprint ; }

Target:
public java.lang.String getServerFingerprint ( java.lang.String serverName ) { java.lang.String fingerPrint = null ; org.ovirt.engine.core.utils.ssh.EngineSSHDialog dialog = getEngineSSHDialog ( ) ; try { dialog.setHost ( serverName ) ; dialog.connect ( ) ; fingerPrint = dialog.getHostFingerprint ( ) ; } catch ( java.lang.Throwable e ) { log.errorFormat ( "Could not fetch fingerprint of host {0} with message: {1}" , serverName , org.apache.commons.lang.exception.ExceptionUtils.getMessage ( e ) ) ; } finally { dialog.disconnect ( ) ; } return fingerPrint ; }
Source:
private void assignVNumaToPhysicalNuma ( org.ovirt.engine.ui.uicommonweb.models.hosts.numa.VNodeModel vNodeModel , org.ovirt.engine.core.compat.Guid nodeId ) { if ( ! ( p2vNumaNodesMap.containsKey ( nodeId ) ) ) { p2vNumaNodesMap.put ( nodeId , new java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.hosts.numa.VNodeModel > ( ) ) ; } p2vNumaNodesMap.get ( nodeId ) . add ( vNodeModel ) ; }

Target:
private void assignVNumaToPhysicalNuma ( org.ovirt.engine.ui.uicommonweb.models.hosts.numa.VNodeModel vNodeModel , java.lang.Integer nodeIdx ) { if ( ! ( p2vNumaNodesMap.containsKey ( nodeIdx ) ) ) { p2vNumaNodesMap.put ( nodeIdx , new java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.hosts.numa.VNodeModel > ( ) ) ; } p2vNumaNodesMap.get ( nodeIdx ) . add ( vNodeModel ) ; }
Source:
public void setSelectedNetworkQoSId ( org.ovirt.engine.core.compat.Guid networkQoSId ) { getNetworkQoS ( ) . setSelectedItem ( null ) ; if ( ( ( getNetworkQoS ( ) . getItems ( ) ) != null ) && ( networkQoSId != null ) ) { for ( java.lang.Object item : getNetworkQoS ( ) . getItems ( ) ) { if ( ( ( org.ovirt.engine.core.common.businessentities.network.NetworkQoS ) ( item ) ) . getId ( ) . equals ( networkQoSId ) ) { getNetworkQoS ( ) . setSelectedItem ( item ) ; break ; } } } }

Target:
public void setSelectedNetworkQoSId ( org.ovirt.engine.core.compat.Guid networkQoSId ) { if ( networkQoSId != null ) { for ( java.lang.Object item : getNetworkQoS ( ) . getItems ( ) ) { if ( ( ( org.ovirt.engine.core.common.businessentities.network.NetworkQoS ) ( item ) ) . getId ( ) . equals ( networkQoSId ) ) { getNetworkQoS ( ) . setSelectedItem ( item ) ; break ; } } } else { setSelectedNetworkQoSId ( Guid.Empty ) ; } }
Source:
public void Rollback ( ) { super . Rollback ( ) ; if ( macAddressChanged ) { org.ovirt.engine.core.bll.MacPoolManager.getInstance ( ) . AddMac ( oldIface.getMacAddress ( ) ) ; if ( ! ( org.ovirt.engine.core.common.config.Config.< java.lang.Boolean > GetValue ( ConfigValues.AllowDuplicateMacAddresses ) ) ) { org.ovirt.engine.core.bll.MacPoolManager.getInstance ( ) . freeMac ( getMacAddress ( ) ) ; } } }

Target:
public void rollback ( ) { super . rollback ( ) ; if ( macAddressChanged ) { org.ovirt.engine.core.bll.MacPoolManager.getInstance ( ) . AddMac ( oldIface.getMacAddress ( ) ) ; if ( ! ( org.ovirt.engine.core.common.config.Config.< java.lang.Boolean > GetValue ( ConfigValues.AllowDuplicateMacAddresses ) ) ) { org.ovirt.engine.core.bll.MacPoolManager.getInstance ( ) . freeMac ( getMacAddress ( ) ) ; } } }
Source:
public static void GetGlusterVolumeBrickDetails ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId , java.lang.String volume , java.lang.String brick ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.core.common.queries.gluster.GlusterVolumeAdvancedDetailsParameters parameters = new org.ovirt.engine.core.common.queries.gluster.GlusterVolumeAdvancedDetailsParameters ( clusterId , volume , brick , true ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetGlusterVolumeAdvancedDetails , parameters , aQuery ) ; }

Target:
public static void GetRpmVersionViaPublic ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunPublicQuery ( VdcQueryType.GetConfigurationValue , new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.ProductRPMVersion , org.ovirt.engine.core.common.config.Config.DefaultConfigurationVersion ) , aQuery ) ; }
Source:
public void testBuildVmOnNewTemplate ( ) { org.ovirt.engine.core.common.businessentities.VM vm = org.ovirt.engine.ui.uicommonweb.models.vms.VmListModel.buildVmOnNewTemplate ( model , origVm ) ; verifyBuiltCommonVm ( vm.getStaticData ( ) ) ; verifyBuiltOrigVm ( origVm , vm ) ; org.junit.Assert.assertEquals ( origVm.getDedicatedVmForVdsList ( ) , vm.getDedicatedVmForVdsList ( ) ) ; org.junit.Assert.assertEquals ( origVm.getMigrationSupport ( ) , vm.getMigrationSupport ( ) ) ; org.junit.Assert.assertEquals ( origVm.getMigrationDowntime ( ) , vm.getMigrationDowntime ( ) ) ; }

Target:
public void testBuildVmOnNewTemplate ( ) { org.ovirt.engine.core.common.businessentities.VM vm = org.ovirt.engine.ui.uicommonweb.models.vms.VmListModel.buildVmOnNewTemplate ( model , origVm ) ; verifyBuiltCommonVm ( vm.getStaticData ( ) ) ; verifyBuiltOrigVm ( origVm , vm ) ; org.junit.jupiter.api.Assertions.assertEquals ( origVm.getDedicatedVmForVdsList ( ) , vm.getDedicatedVmForVdsList ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( origVm.getMigrationSupport ( ) , vm.getMigrationSupport ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( origVm.getMigrationDowntime ( ) , vm.getMigrationDowntime ( ) ) ; }
Source:
public void canDoActionFailsOnNull ( ) { cmd = createTestCommand ( null ) ; org.junit.Assert.assertFalse ( cmd.canDoAction ( ) ) ; }

Target:
private org.ovirt.engine.core.common.businessentities.VDS getVds ( org.ovirt.engine.core.common.businessentities.VDSStatus status ) { org.ovirt.engine.core.common.businessentities.VDS vds = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; vds.setId ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; vds.setvds_name ( "gfs1" ) ; vds.setvds_group_id ( CLUSTER_ID ) ; vds.setstatus ( status ) ; return vds ; }
Source:
public void getClusterList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > list = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ) ( source ) ) ; java.util.Collections.sort ( list , new org.ovirt.engine.core.common.businessentities.comparators.NameableComparator ( ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllVdsGroups , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }

Target:
public void isSoundcardEnabled ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { return ! ( ( ( java.util.List < ? > ) ( source ) ) . isEmpty ( ) ) ; } return false ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetSoundDevices , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }
Source:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendMultipleActionAsyncResult result ) { callback.vnicCreated ( vmId ) ; }

Target:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendMultipleActionAsyncResult result ) { org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runMultipleAction ( VdcActionType.UpdateVmInterface , updateVnicParameters , new org.ovirt.engine.ui.uicompat.IFrontendMultipleActionAsyncCallback ( ) { @ java.lang.Override public void executed ( org.ovirt.engine.ui.uicompat.FrontendMultipleActionAsyncResult result ) { org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runMultipleAction ( VdcActionType.RemoveVmInterface , removeVnicParameters , new org.ovirt.engine.ui.uicompat.IFrontendMultipleActionAsyncCallback ( ) { @ java.lang.Override public void executed ( org.ovirt.engine.ui.uicompat.FrontendMultipleActionAsyncResult result ) { callback.vnicCreated ( vmId ) ; } } , this ) ; } } , this ) ; }
Source:
public void testSetStatusForRequiredNetwork ( ) { org.mockito.Mockito.when ( vdsDao.getAllForCluster ( org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelperTest.CLUSTER_ID ) ) . thenReturn ( createHosts ( true , false ) ) ; underTest.setStatus ( org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelperTest.CLUSTER_ID , createNetwork ( org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelperTest.NETWORK_ID , org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelperTest.NETWORK_NAME ) ) ; }

Target:
public void testSetStatusForRequiredNetworkAbsentOnHost ( ) { networkCluster.setStatus ( NetworkStatus.OPERATIONAL ) ; testSetStatusForRequiredNetwork ( ( "not" + ( org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelperTest.NETWORK_NAME ) ) ) ; org.mockito.Mockito.verify ( networkClusterDao ) . updateStatus ( org.mockito.ArgumentMatchers.same ( networkCluster ) ) ; org.junit.Assert.assertThat ( networkCluster.getStatus ( ) , org.hamcrest.Matchers.is ( NetworkStatus.NON_OPERATIONAL ) ) ; }