auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
static com.gwtplatform.mvp.client.TabData getTabData ( org.ovirt.engine.ui.common.uicommon.model.SearchableDetailModelProvider < org.ovirt.engine.core.common.businessentities.profiles.DiskProfile , org.ovirt.engine.ui.uicommonweb.models.storage.StorageListModel , org.ovirt.engine.ui.uicommonweb.models.profiles.DiskProfileListModel > modelProvider ) { return new org.ovirt.engine.ui.common.widget.tab.ModelBoundTabData ( org.ovirt.engine.ui.webadmin.section.main.presenter.tab.storage.SubTabStorageDiskProfilePresenter.constants.diskProfilesSubTabLabel ( ) , 9 , modelProvider ) ; }

Target:
static com.gwtplatform.mvp.client.TabData getTabData ( org.ovirt.engine.ui.common.uicommon.model.SearchableDetailModelProvider < org.ovirt.engine.core.common.businessentities.profiles.DiskProfile , org.ovirt.engine.ui.uicommonweb.models.storage.StorageListModel , org.ovirt.engine.ui.uicommonweb.models.profiles.DiskProfileListModel > modelProvider ) { return new org.ovirt.engine.ui.common.widget.tab.ModelBoundTabData ( org.ovirt.engine.ui.webadmin.section.main.presenter.tab.storage.SubTabStorageDiskProfilePresenter.constants.diskProfilesSubTabLabel ( ) , 10 , modelProvider ) ; }
Source:
public void onSelectionChange ( com.google.gwt.view.client.SelectionChangeEvent event ) { modelProvider.setSelectedItems ( getSelectedItems ( ) ) ; fireTableSelectionChangeEvent ( ) ; onSelection ( ) ; }

Target:
public void onSelectionChange ( com.google.gwt.view.client.SelectionChangeEvent event ) { modelProvider.setSelectedItems ( getSelectedItems ( ) ) ; fireTableSelectionChangeEvent ( ) ; handlePlaceTransition ( ) ; }
Source:
public void setVmtGuid ( org.ovirt.engine.core.compat.Guid value ) { this . vmStatic.setvmt_guid ( value ) ; }

Target:
public org.ovirt.engine.core.compat.Guid getVmtGuid ( ) { return this . vmStatic.getVmtGuid ( ) ; }
Source:
protected boolean CheckStorageConnection ( java.lang.String storageDomainConnection ) { boolean returnValue = true ; if ( ( getStorageServerConnectionDAO ( ) . get ( storageDomainConnection ) ) == null ) { returnValue = false ; addCanDoActionMessage ( VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_CONNECTION_NOT_EXIST ) ; } return returnValue ; }

Target:
protected boolean checkStorageConnection ( java.lang.String storageDomainConnection ) { if ( ( getStorageServerConnectionDAO ( ) . get ( storageDomainConnection ) ) == null ) { return failCanDoAction ( VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_CONNECTION_NOT_EXIST ) ; } return true ; }
Source:
public final void setMacPoolId ( org.ovirt.engine.core.compat.Guid macPoolId ) { this . macPoolId = macPoolId ; }

Target:
public void forceAddMacs ( java.util.List < java.lang.String > macs ) { macPool.forceAddMacs ( macs ) ; }
Source:
private void mockJobDao ( org.ovirt.engine.core.common.job.Job job ) { org.mockito.Mockito.when ( jobDao.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( job ) ; }

Target:
private void mockJobDao ( org.ovirt.engine.core.common.job.Job job ) { org.mockito.Mockito.when ( jobDao.get ( org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( job ) ; }
Source:
private void removeMemoryDisksIfNeeded ( java.lang.String hiberVol ) { if ( org.apache.commons.lang.StringUtils.isNotEmpty ( hiberVol ) ) { org.ovirt.engine.core.bll.StopVmCommandBase.removeMemoryDisks ( hiberVol ) ; } }

Target:
private void removeMemoryDisksIfNeeded ( org.ovirt.engine.core.common.businessentities.Snapshot snapshot ) { if ( snapshot.containsMemory ( ) ) { removeMemoryDisks ( snapshot ) ; } }
Source:
public void vnicProfileSet ( ) { org.junit.Assert.assertThat ( validator.vnicProfileIsSet ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }

Target:
public void vnicProfileExists ( ) { org.hamcrest.MatcherAssert.assertThat ( validator.vnicProfileExists ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }
Source:
public void setvm_mem_size_mb ( int value ) { this . mVmStatic.setmem_size_mb ( value ) ; }

Target:
public void setVmMemSizeMb ( int value ) { this . vmStatic.setmem_size_mb ( value ) ; }
Source:
public void runActionExecutionFailed ( org.ovirt.engine.core.common.action.VdcActionType action , org.ovirt.engine.core.common.errors.VdcFault fault ) { errorPopupManager.show ( messages.uiCommonRunActionExecutionFailed ( org.ovirt.engine.ui.uicompat.EnumTranslator.createAndTranslate ( action ) , fault.getMessage ( ) ) ) ; }

Target:
public void runActionExecutionFailed ( org.ovirt.engine.core.common.action.VdcActionType action , org.ovirt.engine.core.common.errors.VdcFault fault ) { if ( isRaiseErrorModalPanel ( action , fault ) ) errorPopupManager.show ( messages.uiCommonRunActionExecutionFailed ( org.ovirt.engine.ui.uicompat.EnumTranslator.createAndTranslate ( action ) , fault.getMessage ( ) ) ) ; }
Source:
public void testLongName ( ) { vmStatic.setName ( "this_should_be_very_long_vm_name_so_it will_fail_can_do_action_validation" ) ; org.junit.Assert.assertFalse ( "canDoAction should fail for too long vm name." , command.canDoAction ( ) ) ; assertCanDoActionMessage ( EngineMessage.ACTION_TYPE_FAILED_NAME_LENGTH_IS_TOO_LONG ) ; }

Target:
public void testInvalidNumberOfMonitors ( ) { prepareVmToPassValidate ( ) ; vmStatic.setNumOfMonitors ( 99 ) ; org.junit.Assert.assertFalse ( "validate should have failed with invalid number of monitors." , command.validate ( ) ) ; assertValidateMessage ( EngineMessage.ACTION_TYPE_FAILED_ILLEGAL_NUM_OF_MONITORS ) ; }
Source:
public void setstatus ( org.ovirt.engine.core.common.businessentities.StorageDomainStatus value ) { if ( value == null ) { persistentStorageDomainStatus = null ; } else { persistentStorageDomainStatus = value.getValue ( ) ; } }

Target:
public void setStatus ( org.ovirt.engine.core.common.businessentities.StorageDomainStatus value ) { if ( value == null ) { persistentStorageDomainStatus = null ; } else { persistentStorageDomainStatus = value.getValue ( ) ; } }
Source:
public void parametersWithSecureDeletionAreNotFixedOnBlockDomainWhenPostZeroIsFalse ( ) { org.ovirt.engine.core.bll.storage.domain.PostDeleteActionHandlerTest.ParametersWithPostDeleteAction parameters = org.ovirt.engine.core.bll.storage.domain.PostDeleteActionHandler.fixParameters ( new org.ovirt.engine.core.bll.storage.domain.PostDeleteActionHandlerTest.ParametersWithPostDeleteAction ( false ) , false ) ; assertPostZeroValue ( parameters , false ) ; }

Target:
public void parametersWithSecureDeletionAreNotFixedOnFileDomainWhenPostZeroIsFalse ( ) { org.ovirt.engine.core.bll.storage.domain.PostDeleteActionHandlerTest.ParametersWithPostDeleteAction parameters = postDeleteActionHandler.fixParameters ( new org.ovirt.engine.core.bll.storage.domain.PostDeleteActionHandlerTest.ParametersWithPostDeleteAction ( false ) , true ) ; assertPostZeroValue ( parameters , false ) ; }
Source:
public void setlibvirt_version ( java.lang.String value ) { this . mVdsDynamic.setlibvirt_version ( value ) ; }

Target:
public void setLibvirtVersion ( org.ovirt.engine.core.compat.RpmVersion value ) { this . mVdsDynamic.setlibvirt_version ( value ) ; }
Source:
protected org.ovirt.engine.core.common.businessentities.VDS getTargetVds ( ) { if ( ( targetVds ) == null ) { targetVds = org.ovirt.engine.core.vdsbroker.vdsbroker.FenceVdsVDSCommand.getDbFacade ( ) . getVdsDao ( ) . get ( org.ovirt.engine.core.vdsbroker.vdsbroker.FenceVdsVDSCommand.getParameters ( ) . getTargetVdsID ( ) ) ; } return targetVds ; }

Target:
protected org.ovirt.engine.core.common.businessentities.VDS getTargetVds ( ) { if ( ( targetVds ) == null ) { targetVds = vdsDao.get ( org.ovirt.engine.core.vdsbroker.vdsbroker.FenceVdsVDSCommand.getParameters ( ) . getTargetVdsID ( ) ) ; } return targetVds ; }
Source:
protected org.ovirt.engine.core.bll.storage.CinderBroker getCinderBroker ( ) { if ( ( cinderBroker ) == null ) { cinderBroker = new org.ovirt.engine.core.bll.storage.CinderBroker ( getStorageDomainId ( ) , org.ovirt.engine.core.bll.storage.RemoveCinderDiskCommand.getReturnValue ( ) . getExecuteFailedMessages ( ) ) ; } return cinderBroker ; }

Target:
protected org.ovirt.engine.core.common.businessentities.storage.CinderDisk getDisk ( ) { if ( ( cinderDisk ) == null ) { cinderDisk = ( ( org.ovirt.engine.core.common.businessentities.storage.CinderDisk ) ( org.ovirt.engine.core.bll.storage.RemoveCinderDiskCommand.getDiskDao ( ) . get ( org.ovirt.engine.core.bll.storage.RemoveCinderDiskCommand.getParameters ( ) . getDiskId ( ) ) ) ) ; } return cinderDisk ; }
Source:
public synchronized void CancelTasks ( java.util.List < org.ovirt.engine.core.compat.Guid > vdsmTaskList ) { for ( org.ovirt.engine.core.compat.Guid vdsmTaskId : vdsmTaskList ) { CancelTask ( vdsmTaskId ) ; } }

Target:
public synchronized void cancelTasks ( java.util.List < org.ovirt.engine.core.compat.Guid > vdsmTaskList ) { for ( org.ovirt.engine.core.compat.Guid vdsmTaskId : vdsmTaskList ) { cancelTask ( vdsmTaskId ) ; } }
Source:
public double getActualDiskSize ( ) { return getDiskImageMap ( ) . values ( ) . stream ( ) . mapToDouble ( DiskImage :: getActualSize ) . sum ( ) ; }

Target:
public double getActualDiskSize ( ) { if ( ( cachedActualSize ) < 0.0 ) { cachedActualSize = getDiskImageMap ( ) . values ( ) . stream ( ) . mapToDouble ( DiskImage :: getActualSize ) . sum ( ) ; } return cachedActualSize ; }
Source:
public void testGetAll ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.VnicProfile > result = dao.getAll ( ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertEquals ( 2 , result.size ( ) ) ; }

Target:
public void testGetAll ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.VnicProfile > result = dao.getAll ( ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertEquals ( 5 , result.size ( ) ) ; }
Source:
public void init ( boolean security , boolean bugs , boolean enhancements ) { securityCheckbox.setValue ( security ) ; bugCheckbox.setValue ( bugs ) ; enhancementCheckbox.setValue ( enhancements ) ; showPanelItems ( true ) ; }

Target:
public void init ( boolean security , boolean bugs , boolean enhancements ) { securityCheckbox.setActive ( security ) ; bugCheckbox.setActive ( bugs ) ; enhancementCheckbox.setActive ( enhancements ) ; showPanelItems ( true ) ; }
Source:
public javax.ws.rs.core.Response remove ( ) { get ( ) ; return performAction ( VdcActionType.UnlabelNic , new org.ovirt.engine.core.common.action.LabelNicParameters ( parent.getHostNicId ( ) , id ) ) ; }

Target:
protected javax.ws.rs.core.Response performRemove ( ) { return performAction ( VdcActionType.UnlabelNic , new org.ovirt.engine.core.common.action.LabelNicParameters ( parent.getHostNicId ( ) , id ) ) ; }
Source:
public void runningSucceded ( ) { removeMemoryFromActiveSnapshot ( ) ; setFlow ( org.ovirt.engine.core.bll.RunVmCommand.RunVmFlow.RUNNING_SUCCEEDED ) ; super . runningSucceded ( ) ; }

Target:
public void runningSucceded ( ) { removeMemoryFromActiveSnapshot ( ) ; setFlow ( RunVmFlow.RUNNING_SUCCEEDED ) ; super . runningSucceded ( ) ; }
Source:
private void removeMemoryImages ( ) { new org.ovirt.engine.core.bll.memory.MemoryImageRemoverFromExportDomain ( getVm ( ) , this , getParameters ( ) . getStoragePoolId ( ) , getParameters ( ) . getStorageDomainId ( ) ) . removeMemoryVolumes ( org.ovirt.engine.core.bll.memory.MemoryUtils.getMemoryVolumesFromSnapshots ( getVm ( ) . getSnapshots ( ) ) ) ; }

Target:
private void removeMemoryImages ( ) { new org.ovirt.engine.core.bll.memory.MemoryImageRemoverFromExportDomain ( getVm ( ) , this , getParameters ( ) . getStoragePoolId ( ) , getParameters ( ) . getStorageDomainId ( ) ) . remove ( ) ; }
Source:
public void getUsbPolicyOnUpdateCurrentlyDisabledGotDisabledNativePolicyUsb ( ) { org.ovirt.engine.api.model.Usb usb = new org.ovirt.engine.api.model.Usb ( ) ; usb.setEnabled ( false ) ; usb.setType ( "native" ) ; assertEquals ( org.ovirt.engine.api.restapi.types.VmMapper.getUsbPolicyOnUpdate ( usb , UsbPolicy.DISABLED , null ) , UsbPolicy.DISABLED ) ; }

Target:
public void getUsbPolicyOnUpdateCurrentlyLegacyGotDisabledLegacyPolicyUsb ( ) { org.ovirt.engine.api.model.Usb usb = new org.ovirt.engine.api.model.Usb ( ) ; usb.setEnabled ( false ) ; usb.setType ( "legacy" ) ; assertEquals ( org.ovirt.engine.api.restapi.types.VmMapper.getUsbPolicyOnUpdate ( usb , UsbPolicy.ENABLED_LEGACY ) , UsbPolicy.DISABLED ) ; }
Source:
protected boolean isUnavailable ( T size ) { return size == null ; }

Target:
protected boolean isUnavailable ( T size ) { return ( size == null ) || ( ( size.longValue ( ) ) == ( org.ovirt.engine.core.common.constants.StorageConstants.SIZE_IS_NOT_AVAILABLE ) ) ; }
Source:
protected void PostDiscoverTargets ( java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.storage.SanTargetModel > newItems ) { super . PostDiscoverTargets ( newItems ) ; InitializeItems ( null , newItems ) ; lastDiscoveredTargets.clear ( ) ; lastDiscoveredTargets.addAll ( newItems ) ; }

Target:
protected void postDiscoverTargets ( java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.storage.SanTargetModel > newItems ) { super . postDiscoverTargets ( newItems ) ; initializeItems ( null , newItems ) ; lastDiscoveredTargets.clear ( ) ; lastDiscoveredTargets.addAll ( newItems ) ; }
Source:
protected java.util.Map < java.lang.String , java.lang.String > getExclusiveLocks ( ) { return java.util.Collections.singletonMap ( org.ovirt.engine.core.bll.MoveOrCopyDiskCommand.getImage ( ) . getId ( ) . toString ( ) , LockingGroup.DISK.name ( ) ) ; }

Target:
protected java.util.Map < java.lang.String , org.ovirt.engine.core.common.utils.Pair < java.lang.String , java.lang.String > > getExclusiveLocks ( ) { return java.util.Collections.singletonMap ( org.ovirt.engine.core.bll.MoveOrCopyDiskCommand.getImage ( ) . getId ( ) . toString ( ) , LockMessagesMatchUtil.DISK ) ; }
Source:
public void withForceFailsIn31Cluster ( ) { validator = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.validator.gluster.GlusterVolumeValidator ( ) ) ; org.ovirt.engine.core.bll.ValidationResult result = validator.isForceCreateVolumeAllowed ( Version.v3_1 , true ) ; org.junit.Assert.assertEquals ( result , new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.ACTION_TYPE_FAILED_GLUSTER_VOLUME_ADD_BRICK_FORCE_NOT_SUPPORTED ) ) ; }

Target:
public void withForceFailsIn31Cluster ( ) { validator = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.validator.gluster.GlusterVolumeValidator ( ) ) ; org.ovirt.engine.core.bll.ValidationResult result = validator.isForceCreateVolumeAllowed ( Version.v3_1 , true ) ; org.junit.Assert.assertEquals ( result , new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_GLUSTER_VOLUME_ADD_BRICK_FORCE_NOT_SUPPORTED ) ) ; }
Source:
protected void executeCommand ( ) { updateQuotaCache ( ) ; org.ovirt.engine.core.bll.storage.UpdateStoragePoolCommand.copyUnchangedStoragePoolProperties ( org.ovirt.engine.core.bll.storage.UpdateStoragePoolCommand.getStoragePool ( ) , oldStoragePool ) ; org.ovirt.engine.core.bll.storage.UpdateStoragePoolCommand.getStoragePoolDAO ( ) . updatePartial ( org.ovirt.engine.core.bll.storage.UpdateStoragePoolCommand.getStoragePool ( ) ) ; updateStoragePoolFormatType ( ) ; org.ovirt.engine.core.bll.storage.UpdateStoragePoolCommand.setSucceeded ( true ) ; }

Target:
protected void executeCommand ( ) { updateQuotaCache ( ) ; org.ovirt.engine.core.bll.storage.UpdateStoragePoolCommand.copyUnchangedStoragePoolProperties ( org.ovirt.engine.core.bll.storage.UpdateStoragePoolCommand.getStoragePool ( ) , oldStoragePool ) ; org.ovirt.engine.core.bll.storage.UpdateStoragePoolCommand.getStoragePoolDao ( ) . updatePartial ( org.ovirt.engine.core.bll.storage.UpdateStoragePoolCommand.getStoragePool ( ) ) ; updateStoragePoolFormatType ( ) ; org.ovirt.engine.core.bll.storage.UpdateStoragePoolCommand.setSucceeded ( true ) ; }
Source:
public void newProfile ( ) { if ( ( getWindow ( ) ) != null ) { return ; } org.ovirt.engine.ui.uicommonweb.models.profiles.NewDiskProfileModel model = new org.ovirt.engine.ui.uicommonweb.models.profiles.NewDiskProfileModel ( this , getEntity ( ) . getStoragePoolId ( ) ) ; setWindow ( model ) ; initProfileStorageDomains ( model ) ; }

Target:
protected org.ovirt.engine.core.compat.Guid getStoragePoolId ( ) { return ( getParentEntity ( ) ) != null ? getParentEntity ( ) . getStoragePoolId ( ) : null ; }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < ? extends org.ovirt.engine.ui.uicompat.EventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { if ( object.getOptimizationCustom_IsSelected ( ) . getEntity ( ) ) { optimizationCustomFormatter ( object ) ; optimizationCustomEditor.setVisible ( true ) ; } }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < ? extends org.ovirt.engine.ui.uicompat.EventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { resiliencePolicyTab.setVisible ( object.getisResiliencePolicyTabAvailable ( ) ) ; applyModeCustomizations ( ) ; }
Source:
public static boolean hasGraphicsDevice ( org.ovirt.engine.core.compat.Guid vmId , org.ovirt.engine.core.common.businessentities.GraphicsType type ) { return ! ( org.ovirt.engine.core.bll.utils.VmDeviceUtils.getGraphicsDevices ( vmId , type ) . isEmpty ( ) ) ; }

Target:
public boolean hasRngDevice ( org.ovirt.engine.core.compat.Guid vmId ) { return ! ( getRngDevices ( vmId ) . isEmpty ( ) ) ; }
Source:
protected void cancel ( ) { org.ovirt.engine.ui.frontend.Frontend.Unsubscribe ( ) ; setWindow ( null ) ; setConfirmWindow ( null ) ; }

Target:
protected void cancel ( ) { org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . unsubscribe ( ) ; setWindow ( null ) ; setConfirmWindow ( null ) ; }
Source:
public void testSave ( ) { dao.save ( newUser ) ; org.ovirt.engine.core.common.businessentities.DbUser result = dao.getByUsername ( newUser.getusername ( ) ) ; org.junit.Assert.assertEquals ( newUser , result ) ; }

Target:
public void testSave ( ) { dao.save ( newUser ) ; org.ovirt.engine.core.common.businessentities.DbUser result = dao.getByUsername ( newUser.getLoginName ( ) ) ; org.junit.Assert.assertEquals ( newUser , result ) ; }
Source:
protected java.lang.String getErrorMessage ( java.lang.String msg ) { return ! ( org.apache.commons.lang.StringUtils.isEmpty ( msg ) ) ? msg : java.lang.String.format ( "Please refer to %1$s/engine.log and log logs under %1$s/ovirt-engine/host-deploy/ for further details." , org.ovirt.engine.core.utils.EngineLocalConfig.getInstance ( ) . getLogDir ( ) ) ; }

Target:
protected java.lang.String getErrorMessage ( java.lang.String msg ) { return ! ( org.apache.commons.lang.StringUtils.isEmpty ( msg ) ) ? msg : java.lang.String.format ( "Please refer to %1$s/engine.log and log logs under %1$s/host-deploy/ for further details." , org.ovirt.engine.core.utils.EngineLocalConfig.getInstance ( ) . getLogDir ( ) ) ; }
Source:
public final void AddPermittedFields ( java.lang.String ... fieldNames ) { for ( java.lang.String fieldName : fieldNames ) { permitted.add ( fieldName ) ; } }

Target:
public final void addPermittedFields ( java.lang.String ... fieldNames ) { for ( java.lang.String fieldName : fieldNames ) { permitted.add ( fieldName ) ; } }
Source:
protected void itemPropertyChanged ( java.lang.Object sender , org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs e ) { super . itemPropertyChanged ( sender , e ) ; if ( e.PropertyName.equals ( "status" ) ) { updateActionAvailability ( ) ; } }

Target:
protected void selectedItemPropertyChanged ( java.lang.Object sender , org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs e ) { super . selectedItemPropertyChanged ( sender , e ) ; if ( e.propertyName.equals ( "status" ) ) { updateActionAvailability ( ) ; } }
Source:
protected void selectedItemPropertyChanged ( java.lang.Object sender , org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs e ) { super . selectedItemPropertyChanged ( sender , e ) ; if ( e.PropertyName.equals ( "status" ) ) { UpdateActionAvailability ( ) ; } }

Target:
protected void itemPropertyChanged ( java.lang.Object sender , org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs e ) { super . itemPropertyChanged ( sender , e ) ; if ( e.PropertyName.equals ( "status" ) ) { updateActionAvailability ( ) ; } }
Source:
public void setIsPowerManagementTabValid ( boolean value ) { if ( ( isPowerManagementTabValid ) != value ) { isPowerManagementTabValid = value ; OnPropertyChanged ( new org.ovirt.engine.core.compat.PropertyChangedEventArgs ( "IsPowerManagementTabValid" ) ) ; } }

Target:
public void setIsGeneralTabValid ( boolean value ) { if ( ( isGeneralTabValid ) != value ) { isGeneralTabValid = value ; OnPropertyChanged ( new org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ( "IsGeneralTabValid" ) ) ; } }
Source:
public void getVdsGroupDefault ( ) { final org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase b = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; final org.ovirt.engine.core.common.businessentities.VDSGroup g = b.getVdsGroup ( ) ; org.junit.Assert.assertNull ( g ) ; }

Target:
public void getClusterDefault ( ) { final org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase b = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; final org.ovirt.engine.core.common.businessentities.Cluster g = b.getCluster ( ) ; org.junit.Assert.assertNull ( g ) ; }
Source:
public org.ovirt.engine.core.common.AuditLogType getAuditLogTypeValue ( ) { return org.ovirt.engine.core.bll.storage.export.RemoveVmFromImportExportCommand.getSucceeded ( ) ? org.ovirt.engine.core.common.AuditLogType.IMPORTEXPORT_REMOVE_VM : org.ovirt.engine.core.common.AuditLogType.IMPORTEXPORT_REMOVE_VM_FAILED ; }

Target:
public org.ovirt.engine.core.common.AuditLogType getAuditLogTypeValue ( ) { return org.ovirt.engine.core.bll.exportimport.RemoveVmFromImportExportCommand.getSucceeded ( ) ? org.ovirt.engine.core.common.AuditLogType.IMPORTEXPORT_REMOVE_VM : org.ovirt.engine.core.common.AuditLogType.IMPORTEXPORT_REMOVE_VM_FAILED ; }
Source:
public int hashCode ( ) { final int prime = 31 ; int result = 1 ; result = ( prime * result ) + ( getOrder ( ) ) ; return result ; }

Target:
public int hashCode ( ) { return java.util.Objects.hashCode ( getOrder ( ) ) ; }
Source:
protected org.ovirt.engine.ui.uicommonweb.ILogger lookupLogger ( ) { return null ; }

Target:
public void setUp ( ) { testedModel = new org.ovirt.engine.ui.uicommonweb.models.SortedListModel ( ) ; }
Source:
public void setSearchString ( java.lang.String value ) { if ( ! ( org.ovirt.engine.core.compat.StringHelper.stringsEqual ( searchString , value ) ) ) { searchString = value ; searchStringChanged ( ) ; onPropertyChanged ( new org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ( "SearchString" ) ) ; } }

Target:
public void setSearchString ( java.lang.String value ) { if ( ! ( org.ovirt.engine.core.common.utils.ObjectUtils.objectsEqual ( searchString , value ) ) ) { searchString = value ; searchStringChanged ( ) ; onPropertyChanged ( new org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ( "SearchString" ) ) ; } }
Source:
public java.lang.String getValue ( org.ovirt.engine.core.common.businessentities.Network object ) { return ( object.getstorage_pool_id ( ) ) == null ? "" : object.getstorage_pool_id ( ) . toString ( ) ; }

Target:
public java.lang.String getValue ( org.ovirt.engine.core.common.businessentities.NetworkView object ) { return object.getStoragePoolName ( ) ; }
Source:
public void testHasUniqueNamePersistingNewRecord ( ) { org.junit.Assert.assertThat ( callHasUniqueName ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , org.ovirt.engine.core.compat.Guid.newGuid ( ) , "macPool1" , "macPool2" ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }

Target:
public void testHasUniqueNamePersistingNewRecord ( ) { org.hamcrest.MatcherAssert.assertThat ( callHasUniqueName ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , org.ovirt.engine.core.compat.Guid.newGuid ( ) , "macPool1" , "macPool2" ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }
Source:
public org.ovirt.engine.core.common.utils.VmDeviceType getDisplayDevice ( int osId , org.ovirt.engine.core.compat.Version version , org.ovirt.engine.core.common.businessentities.DisplayType displayType ) ;

Target:
public java.lang.String getSysprepFileName ( int osId , org.ovirt.engine.core.compat.Version version ) ;
Source:
private void waitForConnect ( ) { try { this . connected.await ( policy.getRetryTimeOut ( ) , policy.getTimeUnit ( ) ) ; } catch ( java.lang.InterruptedException e ) { throw new java.lang.IllegalStateException ( "Communication interrupted" ) ; } }

Target:
private void waitForConnect ( ) { try { this . connected.await ( policy.getRetryTimeOut ( ) , policy.getTimeUnit ( ) ) ; } catch ( java.lang.InterruptedException e ) { disconnect ( ) ; throw new java.lang.IllegalStateException ( "Communication interrupted" ) ; } }
Source:
public void addLink ( org.ovirt.api.metamodel.concepts.Link newLink ) { links.add ( newLink ) ; links.sort ( java.util.Comparator.comparing ( Link :: getName ) ) ; }

Target:
public java.util.stream.Stream < org.ovirt.api.metamodel.concepts.Link > declaredLinks ( ) { return links.stream ( ) ; }
Source:
void setupDefaultVmStyles ( ) { if ( ! ( isSelected ( ) ) ) { if ( model.IsVmUp ( ) ) { getView ( ) . setVmUpStyle ( ) ; } else { getView ( ) . setVmDownStyle ( ) ; } } }

Target:
void setupDefaultVmStyles ( ) { if ( ! ( isSelected ( ) ) ) { if ( model.isVmUp ( ) ) { getView ( ) . setVmUpStyle ( ) ; } else { getView ( ) . setVmDownStyle ( ) ; } } }
Source:
protected void addCanDoActionMessageVariable ( java.lang.String varName , java.lang.Object varValue ) { getReturnValue ( ) . getCanDoActionMessages ( ) . add ( java.lang.String.format ( "$%s %s" , varName , varValue ) ) ; }

Target:
protected void addValidationMessageVariable ( java.lang.String varName , java.lang.Object varValue ) { getReturnValue ( ) . getValidationMessages ( ) . add ( java.lang.String.format ( "$%s %s" , varName , varValue ) ) ; }
Source:
public boolean isRunOnce ( ) { return runOnce ; }

Target:
public boolean isRunOnce ( ) { return vmDynamic.isRunOnce ( ) ; }
Source:
public void getUsbPolicyOnUpdateCurrentlyNativeGotEnabledNativePolicyUsb ( ) { org.ovirt.engine.api.model.Usb usb = new org.ovirt.engine.api.model.Usb ( ) ; usb.setEnabled ( true ) ; usb.setType ( UsbType.NATIVE ) ; assertEquals ( UsbPolicy.ENABLED_NATIVE , org.ovirt.engine.api.restapi.types.VmMapper.getUsbPolicyOnUpdate ( usb , UsbPolicy.ENABLED_NATIVE ) ) ; }

Target:
public void getUsbPolicyOnUpdateCurrentlyNativeGotEnabledNotSetNativePolicyUsb ( ) { org.ovirt.engine.api.model.Usb usb = new org.ovirt.engine.api.model.Usb ( ) ; usb.setType ( UsbType.NATIVE ) ; org.junit.Assert.assertEquals ( UsbPolicy.ENABLED_NATIVE , org.ovirt.engine.api.restapi.types.VmMapper.getUsbPolicyOnUpdate ( usb , UsbPolicy.ENABLED_NATIVE ) ) ; }
Source:
protected org.ovirt.engine.core.common.businessentities.LdapUser getAdUser ( int index ) { org.ovirt.engine.core.common.businessentities.LdapUser adUser = new org.ovirt.engine.core.common.businessentities.LdapUser ( ) ; adUser.setUserId ( GUIDS [ index ] ) ; adUser.setUserName ( NAMES [ index ] ) ; adUser.setDomainControler ( org.ovirt.engine.api.restapi.resource.DOMAIN ) ; return adUser ; }

Target:
private org.ovirt.engine.core.common.businessentities.LdapUser getDirectoryUser ( int index ) { org.ovirt.engine.core.common.businessentities.LdapUser directoryUser = new org.ovirt.engine.core.common.businessentities.LdapUser ( ) ; directoryUser.setUserId ( EXTERNAL_IDS [ index ] ) ; directoryUser.setUserName ( NAMES [ index ] ) ; directoryUser.setDomainControler ( org.ovirt.engine.api.restapi.resource.DOMAIN ) ; return directoryUser ; }
Source:
public void testCDAVdsSPMPrioritySetToNever ( ) { vds.setVdsSpmPriority ( BusinessEntitiesDefinitions.HOST_MIN_SPM_PRIORITY ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( "canDoAction did not fail on a VDS that is set to never be elected as SPM" , command , EngineMessage.CANNOT_FORCE_SELECT_SPM_VDS_MARKED_AS_NEVER_SPM ) ; }

Target:
public void testCDAVdsSPMPrioritySetToNever ( ) { vds.setVdsSpmPriority ( BusinessEntitiesDefinitions.HOST_MIN_SPM_PRIORITY ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( "validate did not fail on a VDS that is set to never be elected as SPM" , command , EngineMessage.CANNOT_FORCE_SELECT_SPM_VDS_MARKED_AS_NEVER_SPM ) ; }
Source:
private void addStyles ( ) { getElement ( ) . getStyle ( ) . setPosition ( Style.Position.STATIC ) ; }

Target:
private void addStyles ( ) { org.ovirt.engine.ui.webadmin.section.main.view.popup.storage.RegisterEntityInfoPanel.getElement ( ) . getStyle ( ) . setPosition ( Style.Position.STATIC ) ; }
Source:
private void mockValidateCustomProperties ( ) { org.mockito.Mockito.doReturn ( true ) . when ( command ) . validateCustomProperties ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.VmStatic.class ) , org.mockito.Matchers.any ( java.util.ArrayList.class ) ) ; }

Target:
private void mockValidateCustomProperties ( ) { org.mockito.Mockito.doReturn ( true ) . when ( command ) . validateCustomProperties ( org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.common.businessentities.VmStatic.class ) , org.mockito.ArgumentMatchers.any ( java.util.ArrayList.class ) ) ; }
Source:
public java.util.List < org.ovirt.engine.core.compat.Guid > getExternalIdsForRunningSteps ( org.ovirt.engine.core.common.job.ExternalSystemType systemType ) { return multipleResults ( getEntityManager ( ) . createNamedQuery ( "Step.getExternalIdsForRunningSteps" ) . setParameter ( "status" , JobExecutionStatus.STARTED ) . setParameter ( "type" , systemType ) ) ; }

Target:
protected org.springframework.jdbc.core.RowMapper < org.ovirt.engine.core.common.job.Step > createEntityRowMapper ( ) { return org.ovirt.engine.core.dao.StepDaoImpl.stepRowMapper ; }
Source:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { org.ovirt.engine.ui.uicommonweb.models.userportal.AttachCdModel attachCdModel = ( ( org.ovirt.engine.ui.uicommonweb.models.userportal.AttachCdModel ) ( result.getState ( ) ) ) ; attachCdModel.stopProgress ( ) ; cancel ( ) ; }

Target:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendMultipleActionAsyncResult result ) { org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel localModel = ( ( org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel ) ( result.getState ( ) ) ) ; localModel.stopProgress ( ) ; cancel ( ) ; }
Source:
public java.util.Map < java.lang.String , java.lang.Object > reset ( java.lang.String vmId ) ;

Target:
public java.util.Map < java.lang.String , java.lang.Object > desktopLogoff ( java.lang.String vmId , java.lang.String force ) ;
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < ? extends org.ovirt.engine.ui.uicompat.EventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { getView ( ) . handleQuotaColumnVisibility ( ) ; }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < ? extends org.ovirt.engine.ui.uicompat.EventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { if ( ( commonModelProvider.get ( ) . getSelectedItem ( ) ) instanceof org.ovirt.engine.ui.uicommonweb.models.disks.DiskListModel ) { getView ( ) . handleQuotaColumnVisibility ( ) ; } }
Source:
public void lowerVersionMgmtNetworkNonSupportedFeatures ( ) { storagePoolWithLowerVersion ( ) ; addNonDefaultClusterToPool ( ) ; addManagementNetworksToPool ( 2 ) ; setupNetworkValidator ( false ) ; canDoActionFailed ( EngineMessage.ACTION_TYPE_FAILED_CANNOT_DECREASE_COMPATIBILITY_VERSION ) ; }

Target:
public void lowerVersionMgmtNetworkNonSupportedFeatures ( ) { storagePoolWithLowerVersion ( ) ; addNonDefaultClusterToPool ( ) ; addManagementNetworksToPool ( 2 ) ; setupNetworkValidator ( false ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( cmd , EngineMessage.ACTION_TYPE_FAILED_CANNOT_DECREASE_COMPATIBILITY_VERSION ) ; }
Source:
protected org.ovirt.engine.core.common.businessentities.Tags getTag ( ) { if ( ( ( tag ) == null ) && ( ( getTagId ( ) ) != null ) ) { tag = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getTagDao ( ) . get ( getTagId ( ) ) ; } return tag ; }

Target:
protected org.ovirt.engine.core.common.businessentities.Tags getTag ( ) { if ( ( ( tag ) == null ) && ( ( getTagId ( ) ) != null ) ) { tag = tagDao.get ( getTagId ( ) ) ; } return tag ; }
Source:
private static void setHref ( org.ovirt.engine.api.model.BaseResource model ) { org.ovirt.engine.api.restapi.util.LinkHelper.setHref ( model , null ) ; }

Target:
private static org.ovirt.engine.api.restapi.util.LinkHelper.ApiLocationMetadata getCollection ( org.ovirt.engine.api.model.BaseResource model ) { return org.ovirt.engine.api.restapi.util.LinkHelper.getLocationMetadata ( model , null ) ; }
Source:
public void testGetAll ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > result = dao.getAll ( ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; }

Target:
public void testGetAll ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > result = dao.getAll ( ) ; org.junit.jupiter.api.Assertions.assertFalse ( result.isEmpty ( ) ) ; }
Source:
public void updateSession ( org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSession geoRepSession ) { getCallsHandler ( ) . executeModification ( "UpdateGlusterGeoRepSessionStatus" , createIdParameterMapper ( geoRepSession.getId ( ) ) . addValue ( "status" , geoRepSession.getStatus ( ) ) ) ; }

Target:
public org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSessionDetails getGeoRepSessionDetails ( org.ovirt.engine.core.compat.Guid sessionId , org.ovirt.engine.core.compat.Guid masterBrickId ) { return getCallsHandler ( ) . executeRead ( "GetGlusterGeoRepSessionDetailsForBrick" , org.ovirt.engine.core.dao.gluster.GlusterGeoRepDaoDbFacadeImpl.georepSessionDetailsRowMapper , createIdParameterMapper ( sessionId ) . addValue ( "master_brick_id" , masterBrickId ) ) ; }
Source:
private void updateVolumeStatusInDb ( org.ovirt.engine.core.compat.Guid volumeId ) { getGlusterVolumeDao ( ) . remove ( volumeId ) ; }

Target:
private void updateVolumeStatusInDb ( org.ovirt.engine.core.compat.Guid volumeId ) { glusterVolumeDao.remove ( volumeId ) ; }
Source:
public void addLDAPServer ( java.net.URI uri ) { ldapServers.add ( uri ) ; }

Target:
public void addLDAPServer ( java.net.URI uri ) { try { lock.readLock ( ) . lock ( ) ; ldapServers.add ( uri ) ; } finally { lock.readLock ( ) . unlock ( ) ; } }
Source:
public java.lang.String getValue ( org.ovirt.engine.core.common.businessentities.VmTemplate object ) { return ( object.getorigin ( ) ) == null ? org.ovirt.engine.ui.webadmin.section.main.view.tab.storage.SubTabStorageTemplateBackupView.messageConstants.notSpecifiedLabel ( ) : object.getorigin ( ) . toString ( ) ; }

Target:
public java.lang.String getValue ( org.ovirt.engine.core.common.businessentities.VmTemplate object ) { return ( object.getOrigin ( ) ) == null ? org.ovirt.engine.ui.webadmin.section.main.view.tab.storage.SubTabStorageTemplateBackupView.messageConstants.notSpecifiedLabel ( ) : object.getOrigin ( ) . toString ( ) ; }
Source:
public static java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.NetworkInterface > vmNetworkInterfaceListToBase ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > items ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.NetworkInterface > networkInterfaces = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.NetworkInterface > ( ) ; for ( org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface item : items ) { networkInterfaces.add ( item ) ; } return networkInterfaces ; }

Target:
public static org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface findInterfaceNetworkNameNotEmpty ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > items ) { for ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface i : items ) { if ( ! ( org.ovirt.engine.core.compat.StringHelper.isNullOrEmpty ( i.getNetworkName ( ) ) ) ) { return i ; } } return null ; }
Source:
protected void executeCommand ( ) { userProfileDao.remove ( org.ovirt.engine.core.bll.RemoveUserProfileCommand.getParameters ( ) . getUserProfile ( ) . getId ( ) ) ; org.ovirt.engine.core.bll.RemoveUserProfileCommand.setSucceeded ( true ) ; }

Target:
protected void executeCommand ( ) { org.ovirt.engine.core.common.businessentities.UserProfile profile = org.ovirt.engine.core.bll.RemoveUserProfileCommand.getUserProfile ( ) ; userProfileDao.remove ( profile.getId ( ) ) ; org.ovirt.engine.core.bll.RemoveUserProfileCommand.setSucceeded ( true ) ; }
Source:
private void returnVm ( ) { org.ovirt.engine.core.common.businessentities.VM entity = ( ( org.ovirt.engine.core.common.businessentities.VM ) ( getItem ( ) . getEntity ( ) ) ) ; org.ovirt.engine.ui.frontend.Frontend.RunAction ( VdcActionType.ShutdownVm , new org.ovirt.engine.core.common.action.ShutdownVmParameters ( entity.getId ( ) , false ) , null , null ) ; }

Target:
private void returnVm ( ) { org.ovirt.engine.core.common.businessentities.VM entity = ( ( org.ovirt.engine.core.common.businessentities.VM ) ( getItem ( ) . getEntity ( ) ) ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runAction ( VdcActionType.ShutdownVm , new org.ovirt.engine.core.common.action.ShutdownVmParameters ( entity.getId ( ) , false ) , null , null ) ; }
Source:
protected void verifyEntityModification ( org.ovirt.engine.core.common.job.Step result ) { org.junit.Assert.assertEquals ( JobExecutionStatus.FINISHED , result.getStatus ( ) ) ; org.junit.Assert.assertEquals ( 1 , result.getSteps ( ) . size ( ) ) ; }

Target:
public void existStep ( ) { org.junit.Assert.assertTrue ( dao.exists ( org.ovirt.engine.core.dao.StepDaoTest.EXISTING_STEP_ID ) ) ; }
Source:
public boolean match ( org.ovirt.engine.core.common.action.VdcReturnValueBase source ) { return source.getCanDoAction ( ) ; }

Target:
public boolean match ( org.ovirt.engine.core.common.action.VdcReturnValueBase source ) { return source.isValid ( ) ; }
Source:
private static org.ovirt.engine.core.common.businessentities.ArchitectureType getOsSection ( org.ovirt.engine.core.compat.backendcompat.XmlDocument xmlDocument ) { org.ovirt.engine.core.common.businessentities.ArchitectureType archType = null ; org.ovirt.engine.core.compat.backendcompat.XmlNode content = xmlDocument.SelectSingleNode ( "//*/Content" ) ; org.ovirt.engine.core.compat.backendcompat.XmlNodeList nodeList = content.SelectNodes ( "Section" ) ; org.ovirt.engine.core.compat.backendcompat.XmlNode selectedSection = null ; org.ovirt.engine.core.common.osinfo.OsRepository osRepository = org.ovirt.engine.core.common.utils.SimpleDependecyInjector.getInstance ( ) . get ( org.ovirt.engine.core.common.osinfo.OsRepository.class ) ; if ( nodeList != null ) { for ( org.ovirt.engine.core.compat.backendcompat.XmlNode section : nodeList ) { java.lang.String value = section.attributes.get ( "xsi:type" ) . getValue ( ) ; if ( value.equals ( "ovf:OperatingSystemSection_Type" ) ) { selectedSection = section ; break ; } } if ( selectedSection != null ) { int osId = osRepository.getOsIdByUniqueName ( selectedSection.innerText ) ; archType = osRepository.getArchitectureFromOS ( osId ) ; } } return archType ; }

Target:
private static org.ovirt.engine.core.common.businessentities.ArchitectureType getOsSection ( org.ovirt.engine.core.utils.ovf.xml.XmlDocument xmlDocument ) { org.ovirt.engine.core.common.businessentities.ArchitectureType archType = null ; org.ovirt.engine.core.utils.ovf.xml.XmlNode content = xmlDocument.SelectSingleNode ( "//*/Content" ) ; org.ovirt.engine.core.utils.ovf.xml.XmlNodeList nodeList = content.SelectNodes ( "Section" ) ; org.ovirt.engine.core.utils.ovf.xml.XmlNode selectedSection = null ; org.ovirt.engine.core.common.osinfo.OsRepository osRepository = org.ovirt.engine.core.common.utils.SimpleDependecyInjector.getInstance ( ) . get ( org.ovirt.engine.core.common.osinfo.OsRepository.class ) ; if ( nodeList != null ) { for ( org.ovirt.engine.core.utils.ovf.xml.XmlNode section : nodeList ) { java.lang.String value = section.attributes.get ( "xsi:type" ) . getValue ( ) ; if ( value.equals ( "ovf:OperatingSystemSection_Type" ) ) { selectedSection = section ; break ; } } if ( selectedSection != null ) { int osId = osRepository.getOsIdByUniqueName ( selectedSection.innerText ) ; archType = osRepository.getArchitectureFromOS ( osId ) ; } } return archType ; }
Source:
public void unlinkedWhenUnlinkingNotSupported ( ) throws java.lang.Exception { unlinkingTest ( org.hamcrest.CoreMatchers.both ( org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( VdcBllMessages.UNLINKING_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 , false ) ; }

Target:
public void unlinkedWhenUnlinkingNotSupported ( ) throws java.lang.Exception { unlinkingTest ( org.hamcrest.CoreMatchers.both ( org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.UNLINKING_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 , false ) ; }
Source:
public void testExistingUsbControllerModelWithNonExistingVersion ( ) { final org.ovirt.engine.core.common.businessentities.UsbControllerModel model = OsRepositoryImpl.INSTANCE.getOsUsbControllerModel ( OsRepositoryImpl.INSTANCE.getOsIdByUniqueName ( "rhel6" ) , Version.v4_1 ) ; org.junit.Assert.assertEquals ( UsbControllerModel.NEC_XHCI , model ) ; }

Target:
public void testExistingUsbControllerModelWithNonExistingVersion ( ) { final org.ovirt.engine.core.common.businessentities.UsbControllerModel model = OsRepositoryImpl.INSTANCE.getOsUsbControllerModel ( OsRepositoryImpl.INSTANCE.getOsIdByUniqueName ( "rhel6" ) , Version.v4_1 , ChipsetType.I440FX ) ; org.junit.Assert.assertEquals ( UsbControllerModel.NEC_XHCI , model ) ; }
Source:
private org.ovirt.engine.core.common.action.VdcReturnValueBase importHEVM ( org.ovirt.engine.core.common.businessentities.VM vm , org.ovirt.engine.core.common.businessentities.StorageDomain sd ) { return backend.runInternalAction ( VdcActionType.ImportVm , createImportParams ( vm , sd ) ) ; }

Target:
private org.ovirt.engine.core.common.action.VdcReturnValueBase importHEVM ( org.ovirt.engine.core.common.businessentities.VM vm , org.ovirt.engine.core.common.businessentities.StorageDomain sd ) { return backend.runInternalAction ( ActionType.ImportVm , createImportParams ( vm , sd ) ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.DiskImageBase createPreallocDiskImageBase ( ) { org.ovirt.engine.core.common.businessentities.DiskImageBase base = new org.ovirt.engine.core.common.businessentities.DiskImageBase ( ) ; base.setvolume_type ( VolumeType.Preallocated ) ; base.setDiskInterface ( DiskInterface.IDE ) ; base.setSizeInGigabytes ( 5 ) ; return base ; }

Target:
private static org.ovirt.engine.core.common.businessentities.DiskImage createPreallocDiskImage ( ) { org.ovirt.engine.core.common.businessentities.DiskImage image = new org.ovirt.engine.core.common.businessentities.DiskImage ( ) ; image.setvolume_type ( VolumeType.Preallocated ) ; image.setDiskInterface ( DiskInterface.IDE ) ; image.setSizeInGigabytes ( 5 ) ; return image ; }
Source:
protected void getHostListByCluster ( org.ovirt.engine.core.common.businessentities.Cluster cluster , org.ovirt.engine.ui.frontend.AsyncQuery query ) { org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetHostsByClusterId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( cluster.getId ( ) ) , query ) ; }

Target:
protected void getHostListByCluster ( org.ovirt.engine.core.common.businessentities.Cluster cluster , org.ovirt.engine.ui.frontend.AsyncQuery < java.util.List < org.ovirt.engine.core.common.businessentities.VDS > > query ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getHostListByClusterId ( query , cluster.getId ( ) ) ; }
Source:
protected org.ovirt.engine.core.common.businessentities.storage_domains getStorageDomain ( int idx ) { org.ovirt.engine.core.common.businessentities.storage_domains dom = new org.ovirt.engine.core.common.businessentities.storage_domains ( ) ; dom.setId ( GUIDS [ idx ] ) ; dom.setstorage_name ( NAMES [ idx ] ) ; return dom ; }

Target:
protected org.ovirt.engine.api.model.StorageDomain getStorageDomain ( int idx ) { org.ovirt.engine.api.model.StorageDomain dom = new org.ovirt.engine.api.model.StorageDomain ( ) ; dom.setId ( GUIDS [ idx ] ) ; dom.setStorageName ( NAMES [ idx ] ) ; return dom ; }
Source:
public void testCanDoSucceed ( ) { org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionSuccess ( command ) ; }

Target:
public void testValidateSucceed ( ) { org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateSuccess ( command ) ; }
Source:
public org.ovirt.engine.core.common.users.VdcUser getUser ( boolean refresh ) { return ( ( org.ovirt.engine.core.common.users.VdcUser ) ( GetData ( org.ovirt.engine.core.bll.session.SessionDataContainer.VDC_USER_PARAMETER_NAME , refresh ) ) ) ; }

Target:
public org.ovirt.engine.core.common.businessentities.DbUser getUser ( boolean refresh ) { return ( ( org.ovirt.engine.core.common.businessentities.DbUser ) ( GetData ( org.ovirt.engine.core.bll.session.SessionDataContainer.USER_PARAMETER_NAME , refresh ) ) ) ; }
Source:
public void testGetAllForQuotaId ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.Permissions > result = dao.getConsumedPermissionsForQuotaId ( FixturesTool.QUOTA_GENERAL ) ; org.junit.Assert.assertEquals ( result.get ( 0 ) . getad_element_id ( ) , FixturesTool.USER_EXISTING_ID ) ; }

Target:
public void testGetAllForQuotaId ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.Permissions > result = dao.getConsumedPermissionsForQuotaId ( FixturesTool.QUOTA_GENERAL ) ; org.junit.Assert.assertEquals ( result.get ( 0 ) . getAdElementId ( ) , FixturesTool.USER_EXISTING_ID ) ; }
Source:
protected org.ovirt.engine.core.dao.StorageDomainStaticDAO getStorageDomainStaticDAO ( ) { org.ovirt.engine.core.dao.StorageDomainStaticDAO d = org.mockito.Mockito.mock ( org.ovirt.engine.core.dao.StorageDomainStaticDAO.class ) ; org.mockito.Mockito.when ( d.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( new org.ovirt.engine.core.common.businessentities.storage_domain_static ( ) ) ; return d ; }

Target:
protected org.ovirt.engine.core.dao.StorageDomainStaticDAO getStorageDomainStaticDAO ( ) { org.ovirt.engine.core.dao.StorageDomainStaticDAO d = org.mockito.Mockito.mock ( org.ovirt.engine.core.dao.StorageDomainStaticDAO.class ) ; org.mockito.Mockito.when ( d.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( new org.ovirt.engine.core.common.businessentities.StorageDomainStatic ( ) ) ; return d ; }
Source:
public void passDiscardSupportedForDestSdMoveOp ( ) { initializeCommand ( new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ) ; mockPassDiscardSupportedForDestSd ( ValidationResult.VALID , ImageOperation.Move ) ; org.junit.Assert.assertTrue ( command.validatePassDiscardSupportedForDestinationStorageDomain ( ) ) ; }

Target:
public void validateFailureOnCopyingLunDisk ( ) { initializeCommand ( new org.ovirt.engine.core.common.businessentities.storage.LunDisk ( ) , null ) ; command.getParameters ( ) . setOperation ( ImageOperation.Copy ) ; command.init ( ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( command , EngineMessage.ACTION_TYPE_FAILED_NOT_SUPPORTED_DISK_STORAGE_TYPE ) ; }