auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void testStorageDomainMappings ( ) { assertEquals ( LunStatus.Free , org.ovirt.engine.api.restapi.types.StorageLogicalUnitMapper.map ( org.ovirt.engine.core.common.businessentities.LunStatus.Free , null ) ) ; assertEquals ( LunStatus.Used , org.ovirt.engine.api.restapi.types.StorageLogicalUnitMapper.map ( org.ovirt.engine.core.common.businessentities.LunStatus.Used , null ) ) ; assertEquals ( LunStatus.Unusable , org.ovirt.engine.api.restapi.types.StorageLogicalUnitMapper.map ( org.ovirt.engine.core.common.businessentities.LunStatus.Unusable , null ) ) ; }

Target:
public void testStorageDomainMappings ( ) { assertEquals ( LunStatus.Free , org.ovirt.engine.api.restapi.types.StorageLogicalUnitMapper.map ( org.ovirt.engine.core.common.businessentities.storage.LunStatus.Free , null ) ) ; assertEquals ( LunStatus.Used , org.ovirt.engine.api.restapi.types.StorageLogicalUnitMapper.map ( org.ovirt.engine.core.common.businessentities.storage.LunStatus.Used , null ) ) ; assertEquals ( LunStatus.Unusable , org.ovirt.engine.api.restapi.types.StorageLogicalUnitMapper.map ( org.ovirt.engine.core.common.businessentities.storage.LunStatus.Unusable , null ) ) ; }
Source:
public void UpdateVdsStatisticsData ( org.ovirt.engine.core.common.businessentities.VdsStatistics vdsStatistics ) { org.ovirt.engine.core.vdsbroker.VdsManager vdsManager = GetVdsManager ( vdsStatistics.getId ( ) ) ; if ( vdsManager != null ) { vdsManager.updateStatisticsData ( vdsStatistics ) ; } }

Target:
public void updateVdsStatisticsData ( org.ovirt.engine.core.common.businessentities.VdsStatistics vdsStatistics ) { org.ovirt.engine.core.vdsbroker.VdsManager vdsManager = getVdsManager ( vdsStatistics.getId ( ) ) ; if ( vdsManager != null ) { vdsManager.updateStatisticsData ( vdsStatistics ) ; } }
Source:
protected void buildVmSoundDevices ( ) { if ( ( vm.getvm_type ( ) ) == ( org.ovirt.engine.core.common.businessentities.VmType.Desktop ) ) { createInfo.add ( VdsProperties.soundDevice , getSoundDevice ( vm.getStaticData ( ) , vm.getvds_group_compatibility_version ( ) ) ) ; } }

Target:
protected void buildVmSoundDevices ( ) { if ( ( vm.getVmType ( ) ) == ( org.ovirt.engine.core.common.businessentities.VmType.Desktop ) ) { createInfo.add ( VdsProperties.soundDevice , getSoundDevice ( vm.getStaticData ( ) , vm.getVdsGroupCompatibilityVersion ( ) ) ) ; } }
Source:
protected java.util.List < ? extends java.util.Comparator < org.ovirt.engine.core.common.businessentities.StorageDomain > > getStorageDomainComparators ( java.util.Collection < org.ovirt.engine.core.common.businessentities.storage.DiskImage > vmDisks ) { return java.util.Arrays.asList ( new org.ovirt.engine.core.bll.memory.sdcomparators.StorageDomainNumberOfVmDisksComparator ( vmDisks ) , new org.ovirt.engine.core.bll.memory.sdcomparators.StorageTypeSharedComparator ( ) , new org.ovirt.engine.core.bll.memory.sdcomparators.StorageTypeFileComparator ( ) , new org.ovirt.engine.core.bll.memory.sdcomparators.StorageDomainAvailableDiskSizeComparator ( ) ) ; }

Target:
protected java.util.List < ? extends java.util.Comparator < org.ovirt.engine.core.common.businessentities.StorageDomain > > getStorageDomainComparators ( java.util.Collection < org.ovirt.engine.core.common.businessentities.storage.DiskImage > vmDisks ) { return java.util.Arrays.asList ( new org.ovirt.engine.core.bll.memory.sdcomparators.StorageDomainNumberOfVmDisksComparator ( vmDisks ) , new org.ovirt.engine.core.bll.memory.sdcomparators.StorageTypeSharedFirstComparator ( ) , new org.ovirt.engine.core.bll.memory.sdcomparators.StorageTypeFileFirstComparator ( ) , new org.ovirt.engine.core.bll.memory.sdcomparators.StorageDomainAvailableDiskSizeComparator ( ) ) ; }
Source:
public void testGetDataAndSetDataWithEmptySession ( ) { org.junit.Assert.assertNull ( "Get should return null with an empty session" , container.getData ( "" , org.ovirt.engine.core.bll.aaa.SessionDataContainerTest.TEST_KEY , false ) ) ; }

Target:
public void testGetDataAndSetDataWithEmptySession ( ) { org.junit.Assert.assertNull ( "Get should return null with an empty session" , container.getData ( "" , org.ovirt.engine.core.bll.aaa.SessionDataContainerTest.TEST_KEY , false ) ) ; clearSession ( ) ; }
Source:
protected void syncSearch ( ) { super . syncSearch ( ) ; doDataCenterSearch ( ) ; doClusterSearch ( ) ; doHostSearch ( ) ; doVolumeSearch ( ) ; doProviderSearch ( ) ; getTimer ( ) . stop ( ) ; }

Target:
protected void syncSearch ( ) { super . syncSearch ( ) ; doDataCenterSearch ( ) ; doClusterSearch ( ) ; doHostSearch ( ) ; doVolumeSearch ( ) ; doProviderSearch ( ) ; doErrataSearch ( ) ; getTimer ( ) . stop ( ) ; }
Source:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.hosts.AsyncIteratorCallback callback = ( ( org.ovirt.engine.ui.uicommonweb.models.hosts.AsyncIteratorCallback ) ( target ) ) ; org.ovirt.engine.ui.uicompat.Event notifyEvent = callback.getNotifyEvent ( ) ; notifyEvent.raise ( this , new org.ovirt.engine.ui.uicommonweb.models.hosts.ValueEventArgs ( returnValue ) ) ; }

Target:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { notifyEvent.raise ( this , new org.ovirt.engine.ui.uicommonweb.models.hosts.ValueEventArgs < T > ( ( ( T ) ( returnValue ) ) ) ) ; }
Source:
static com.gwtplatform.mvp.client.TabData getTabData ( org.ovirt.engine.ui.webadmin.ApplicationConstants applicationConstants , org.ovirt.engine.ui.common.uicommon.model.SearchableDetailModelProvider < org.ovirt.engine.core.common.businessentities.VM , org.ovirt.engine.ui.uicommonweb.models.storage.StorageListModel , org.ovirt.engine.ui.uicommonweb.models.storage.StorageVmListModel > modelProvider ) { return new org.ovirt.engine.ui.common.widget.tab.ModelBoundTabData ( applicationConstants.storageVmSubTabLabel ( ) , 4 , modelProvider ) ; }

Target:
static com.gwtplatform.mvp.client.TabData getTabData ( org.ovirt.engine.ui.common.uicommon.model.SearchableDetailModelProvider < org.ovirt.engine.core.common.businessentities.VM , org.ovirt.engine.ui.uicommonweb.models.storage.StorageListModel , org.ovirt.engine.ui.uicommonweb.models.storage.StorageVmListModel > modelProvider ) { return new org.ovirt.engine.ui.common.widget.tab.ModelBoundTabData ( org.ovirt.engine.ui.webadmin.section.main.presenter.tab.storage.SubTabStorageVmPresenter.constants.storageVmSubTabLabel ( ) , 4 , modelProvider ) ; }
Source:
public org.ovirt.engine.core.bll.tasks.interfaces.CommandCallback getCallback ( ) { if ( isLiveMerge ( ) ) { return new org.ovirt.engine.core.bll.RemoveDiskSnapshotsCommandCallback ( ) ; } else { return null ; } }

Target:
public org.ovirt.engine.core.bll.tasks.interfaces.CommandCallback getCallback ( ) { if ( isLiveMerge ( ) ) { return new org.ovirt.engine.core.bll.RemoveDiskSnapshotsCommandCallback ( ) ; } else if ( org.ovirt.engine.core.bll.RemoveDiskSnapshotsCommand.getParameters ( ) . isUseCinderCommandCallback ( ) ) { return new org.ovirt.engine.core.bll.ConcurrentChildCommandsExecutionCallback ( ) ; } return null ; }
Source:
public void onClick ( com.google.gwt.event.dom.client.ClickEvent event ) { removeAllBricksButton.getCommand ( ) . execute ( ) ; clearSelections ( ) ; }

Target:
public void onClick ( com.google.gwt.event.dom.client.ClickEvent event ) { removeAllBricksButton.getCommand ( ) . execute ( ) ; clearSelections ( ) ; bricksTable.flush ( ) ; bricksTable.redraw ( ) ; }
Source:
public java.lang.String getHostFingerprint ( ) throws java.io.IOException { java.lang.String fingerprint = org.ovirt.engine.core.uutils.ssh.OpenSSHUtils.getKeyFingerprint ( getHostKey ( ) , "MD5" ) ; if ( fingerprint == null ) { throw new java.io.IOException ( "Unable to parse host key" ) ; } return fingerprint ; }

Target:
public java.lang.String getHostFingerprint ( java.lang.String hash ) throws java.io.IOException { java.lang.String fingerprint = org.ovirt.engine.core.uutils.ssh.OpenSSHUtils.getKeyFingerprint ( getHostKey ( ) , hash ) ; if ( fingerprint == null ) { throw new java.io.IOException ( "Unable to parse host key" ) ; } return fingerprint ; }
Source:
private void invokeHostUpgrade ( org.ovirt.engine.core.bll.CommandBase < ? > command , org.ovirt.engine.core.common.action.hostdeploy.UpgradeHostParameters parameters ) { org.ovirt.engine.core.bll.tasks.CommandCoordinatorUtil.executeAsyncCommand ( VdcActionType.UpgradeHostInternal , createUpgradeParameteres ( parameters ) , command.cloneContextAndDetachFromParent ( ) ) ; }

Target:
private void invokeHostUpgrade ( org.ovirt.engine.core.bll.CommandBase < ? > command , org.ovirt.engine.core.common.action.hostdeploy.UpgradeHostParameters parameters ) { org.ovirt.engine.core.bll.tasks.CommandCoordinatorUtil.executeAsyncCommand ( VdcActionType.UpgradeHostInternal , createUpgradeParameters ( parameters ) , command.cloneContextAndDetachFromParent ( ) ) ; }
Source:
protected org.ovirt.engine.core.common.businessentities.LUNs getEntity ( int index ) { org.ovirt.engine.core.common.businessentities.LUNs entity = new org.ovirt.engine.core.common.businessentities.LUNs ( ) ; entity.setLUN_id ( GUIDS [ index ] . toString ( ) ) ; entity.setLunType ( org.ovirt.engine.core.common.businessentities.StorageType.ISCSI ) ; return entity ; }

Target:
protected org.ovirt.engine.core.common.businessentities.storage.LUNs getEntity ( int index ) { org.ovirt.engine.core.common.businessentities.storage.LUNs entity = new org.ovirt.engine.core.common.businessentities.storage.LUNs ( ) ; entity.setLUN_id ( GUIDS [ index ] . toString ( ) ) ; entity.setLunType ( org.ovirt.engine.core.common.businessentities.storage.StorageType.ISCSI ) ; return entity ; }
Source:
protected org.ovirt.engine.core.common.businessentities.Snapshot getActiveSnapshot ( ) { return org.ovirt.engine.core.bll.RemoveVmHibernationVolumesCommand.getSnapshotDAO ( ) . get ( org.ovirt.engine.core.bll.RemoveVmHibernationVolumesCommand.getVm ( ) . getId ( ) , SnapshotType.ACTIVE ) ; }

Target:
protected org.ovirt.engine.core.common.businessentities.Snapshot getActiveSnapshot ( ) { return org.ovirt.engine.core.bll.RemoveVmHibernationVolumesCommand.getSnapshotDao ( ) . get ( org.ovirt.engine.core.bll.RemoveVmHibernationVolumesCommand.getVm ( ) . getId ( ) , SnapshotType.ACTIVE ) ; }
Source:
static void verifyModelSpecific ( org.ovirt.engine.api.model.Image model , int index ) { assertEquals ( GUIDS [ index ] . toString ( ) , model.getId ( ) ) ; }

Target:
static void verifyModelSpecific ( org.ovirt.engine.api.model.Image model , int index ) { org.junit.Assert.assertEquals ( GUIDS [ index ] . toString ( ) , model.getId ( ) ) ; }
Source:
public void testRemoveAllForVds ( ) throws java.lang.Exception { dao.removeAllForVds ( org.ovirt.engine.core.dao.AuditLogDAOTest.VDS_ID , true ) ; java.util.List < org.ovirt.engine.core.common.businessentities.AuditLog > result = dao.getAll ( ) ; org.junit.Assert.assertEquals ( 3 , result.size ( ) ) ; }

Target:
public void testRemoveAllForVds ( ) throws java.lang.Exception { dao.removeAllForVds ( org.ovirt.engine.core.dao.AuditLogDAOTest.VDS_ID , true ) ; java.util.List < org.ovirt.engine.core.common.businessentities.AuditLog > result = dao.getAll ( null , false ) ; org.junit.Assert.assertEquals ( 5 , result.size ( ) ) ; }
Source:
public void bufferReset_headUpperBound ( ) { tested.reset ( org.ovirt.engine.ui.common.utils.AddOnlyRingBufferTest.CAPACITY , 2 ) ; }

Target:
public void bufferReset_headUpperBound ( ) { org.junit.jupiter.api.Assertions.assertThrows ( java.lang.IllegalArgumentException.class , ( ) -> tested.reset ( org.ovirt.engine.ui.common.utils.AddOnlyRingBufferTest.CAPACITY , 2 ) ) ; }
Source:
public void testGetAllWithIpAddress ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VDS > result = dao.getAllWithIpAddress ( org.ovirt.engine.core.dao.VdsDAOTest.IP_ADDRESS ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; }

Target:
public void testGetFirstUpRhelForVdsGroupFromClusterWithRhels ( ) { org.ovirt.engine.core.common.businessentities.VDS vds = dao.getFirstUpRhelForVdsGroup ( org.ovirt.engine.core.dao.VdsDAOTest.VDS_GROUP_WITH_RHELS ) ; org.junit.Assert.assertNotNull ( vds ) ; }
Source:
public void testComparatorLowerPriorityFst ( ) { int compared = cpComparator.compare ( ConsoleProtocol.RDP , ConsoleProtocol.VNC ) ; org.junit.Assert.assertTrue ( ( compared < 0 ) ) ; }

Target:
public void testComparatorLowerPriorityFst ( ) { int compared = cpComparator.compare ( ConsoleProtocol.RDP , ConsoleProtocol.VNC ) ; org.junit.jupiter.api.Assertions.assertTrue ( ( compared < 0 ) ) ; }
Source:
public int hashCode ( ) { return java.util.Objects.hash ( id , device , type , address , bootOrder , specParams , isManaged , isPlugged , getIsReadOnly ( ) , alias , customProperties , snapshotId , logicalName , usingScsiReservation ) ; }

Target:
public int hashCode ( ) { return java.util.Objects.hash ( id , device , type , address , bootOrder , specParams , isManaged , isPlugged , getIsReadOnly ( ) , alias , customProperties , snapshotId , logicalName , usingScsiReservation , hostDevice ) ; }
Source:
public boolean getSpiceFullScreen ( ) { return placeManager.isMainSectionBasicPlaceVisible ( ) ; }

Target:
protected org.ovirt.engine.core.common.queries.ConfigurationValues spiceFullScreenConfigKey ( ) { if ( placeManager.isMainSectionBasicPlaceVisible ( ) ) { return org.ovirt.engine.core.common.queries.ConfigurationValues.FullScreenUserportalBasicDefault ; } return org.ovirt.engine.core.common.queries.ConfigurationValues.FullScreenUserportalExtendedDefault ; }
Source:
private static org.ovirt.engine.core.common.businessentities.UsbPolicy getUsbPolicyAccordingToClusterVersion ( org.ovirt.engine.core.common.businessentities.VDSGroup vdsGroup ) { return ( vdsGroup.getcompatibility_version ( ) . compareTo ( Version.v3_1 ) ) >= 0 ? org.ovirt.engine.core.common.businessentities.UsbPolicy.ENABLED_NATIVE : org.ovirt.engine.core.common.businessentities.UsbPolicy.ENABLED_LEGACY ; }

Target:
private static org.ovirt.engine.core.common.businessentities.UsbPolicy getUsbPolicyAccordingToClusterVersion ( org.ovirt.engine.core.compat.Version vdsGroupVersion ) { return ( vdsGroupVersion.compareTo ( Version.v3_1 ) ) >= 0 ? org.ovirt.engine.core.common.businessentities.UsbPolicy.ENABLED_NATIVE : org.ovirt.engine.core.common.businessentities.UsbPolicy.ENABLED_LEGACY ; }
Source:
public void setdescription ( java.lang.String value ) { this . description = value ; }

Target:
public void setStoragePath ( java.util.ArrayList < java.lang.String > storagePath ) { this . storagePath = storagePath ; }
Source:
public void testGetInnerJoin ( ) { org.junit.Assert.assertNotNull ( "Sanity test" , comp.getInnerJoin ( "EVENT" , "USER" , true ) ) ; }

Target:
public void testGetInnerJoin ( ) { org.junit.jupiter.api.Assertions.assertNotNull ( comp.getInnerJoin ( "EVENT" , "USER" , true ) , "Sanity test" ) ; }
Source:
public boolean canVmsBePaused ( java.util.List < org.ovirt.engine.core.common.businessentities.VM > items ) { for ( org.ovirt.engine.core.common.businessentities.VM vm : items ) { if ( ! ( isSuspendSupportedByArchitecture ( vm.getClusterArch ( ) , vm.getVdsGroupCompatibilityVersion ( ) ) ) ) { return false ; } } return true ; }

Target:
public boolean canVmsBePaused ( java.util.List < org.ovirt.engine.core.common.businessentities.VM > items ) { for ( org.ovirt.engine.core.common.businessentities.VM vm : items ) { if ( ! ( isSuspendSupportedByArchitecture ( vm.getClusterArch ( ) , vm.getCompatibilityVersion ( ) ) ) ) { return false ; } } return true ; }
Source:
public java.lang.String getAdGroupName ( ) { if ( ( ( mGroupName ) == null ) && ( ( getAdGroup ( ) ) != null ) ) { mGroupName = getAdGroup ( ) . getName ( ) ; } return mGroupName ; }

Target:
public java.lang.String getGroupName ( ) { if ( ( ( mGroupName ) == null ) && ( ( getGroup ( ) ) != null ) ) { mGroupName = getGroup ( ) . getName ( ) ; } return mGroupName ; }
Source:
protected org.ovirt.engine.core.common.scheduling.AffinityGroup getNewAffinityGroup ( ) { org.ovirt.engine.core.common.scheduling.AffinityGroup affinityGroup = super . getNewAffinityGroup ( ) ; affinityGroup.setEntityIds ( new java.util.ArrayList < org.ovirt.engine.core.compat.Guid > ( ) ) ; affinityGroup.getEntityIds ( ) . add ( getEntity ( ) . getId ( ) ) ; return affinityGroup ; }

Target:
protected org.ovirt.engine.core.common.scheduling.AffinityGroup getNewAffinityGroup ( ) { org.ovirt.engine.core.common.scheduling.AffinityGroup affinityGroup = super . getNewAffinityGroup ( ) ; affinityGroup.setVmIds ( new java.util.ArrayList < org.ovirt.engine.core.compat.Guid > ( ) ) ; affinityGroup.getVmIds ( ) . add ( getEntity ( ) . getId ( ) ) ; return affinityGroup ; }
Source:
private javax.ws.rs.core.Response resetOption ( org.ovirt.engine.api.model.Action action , java.lang.String optionName , boolean force ) { return doAction ( VdcActionType.ResetGlusterVolumeOptions , new org.ovirt.engine.core.common.action.gluster.ResetGlusterVolumeOptionsParameters ( guid , optionName , force ) , action ) ; }

Target:
private javax.ws.rs.core.Response resetOption ( org.ovirt.engine.api.model.Action action , java.lang.String optionName , java.lang.String optionValue , boolean force ) { return doAction ( VdcActionType.ResetGlusterVolumeOptions , new org.ovirt.engine.core.common.action.gluster.ResetGlusterVolumeOptionsParameters ( guid , new org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeOptionEntity ( guid , optionName , optionValue ) , force ) , action ) ; }
Source:
public java.lang.String getGlusterHookContent ( org.ovirt.engine.core.compat.Guid hookId ) { java.lang.String content = getCallsHandler ( ) . executeRead ( "GetGlusterHookById" , org.ovirt.engine.core.dao.gluster.GlusterHooksDaoDbFacadeImpl.GlusterHookContentRowMapper , createIdParameterMapper ( hookId ) . addValue ( "includeContent" , true ) ) ; return content ; }

Target:
public java.lang.String getGlusterHookContent ( org.ovirt.engine.core.compat.Guid hookId ) { return getCallsHandler ( ) . executeRead ( "GetGlusterHookById" , org.ovirt.engine.core.dao.gluster.GlusterHooksDaoDbFacadeImpl.glusterHookRowMapper , createIdParameterMapper ( hookId ) . addValue ( "includeContent" , true ) ) . getContent ( ) ; }
Source:
public void setHardLimit ( java.lang.String sessionHardLimit ) { try { restApiSessionHardlimit = java.lang.Integer.valueOf ( sessionHardLimit ) ; } catch ( java.lang.NumberFormatException ex ) { restApiSessionHardlimit = org.ovirt.engine.ui.webadmin.plugin.restapi.RestApiSessionManager.DEFAULT_HARD_LIMIT ; } }

Target:
public void setHardLimit ( java.lang.String sessionHardLimit ) { try { restApiSessionHardlimit = java.lang.Integer.valueOf ( sessionHardLimit ) ; } catch ( java.lang.NumberFormatException ex ) { restApiSessionHardlimit = org.ovirt.engine.ui.common.restapi.RestApiSessionManager.DEFAULT_HARD_LIMIT ; } }
Source:
public void testGet ( ) throws java.lang.Exception { }

Target:
public void testGet ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpGetEntityExpectations ( asList ( getEntity ( 1 ) ) ) ; control.replay ( ) ; verifyModel ( resource.get ( ) , 1 ) ; }
Source:
private void setReturnMessage ( ) { org.ovirt.engine.core.bll.gluster.GetGlusterServersForImportQuery.getQueryReturnValue ( ) . setSucceeded ( false ) ; org.ovirt.engine.core.bll.gluster.GetGlusterServersForImportQuery.getQueryReturnValue ( ) . setExceptionString ( VdcBllMessages.SERVER_ALREADY_EXISTS_IN_ANOTHER_CLUSTER.toString ( ) ) ; return ; }

Target:
private void setReturnMessage ( java.lang.String errorMessage ) { org.ovirt.engine.core.bll.gluster.GetGlusterServersForImportQuery.getQueryReturnValue ( ) . setSucceeded ( false ) ; org.ovirt.engine.core.bll.gluster.GetGlusterServersForImportQuery.getQueryReturnValue ( ) . setExceptionString ( errorMessage ) ; }
Source:
protected boolean isDataCenterWithoutSpm ( ) { return org.ovirt.engine.core.common.FeatureSupported.dataCenterWithoutSpm ( org.ovirt.engine.core.bll.storage.disk.image.BaseImagesCommand.getStoragePool ( ) . getCompatibilityVersion ( ) ) ; }

Target:
protected boolean isDataOperationsByHSM ( ) { return org.ovirt.engine.core.common.FeatureSupported.dataOperationsByHSM ( org.ovirt.engine.core.bll.storage.disk.image.BaseImagesCommand.getStoragePool ( ) . getCompatibilityVersion ( ) ) ; }
Source:
public java.lang.String getValue ( java.lang.Object object ) { return java.lang.String.valueOf ( ( ( org.ovirt.engine.core.common.businessentities.VmTemplate ) ( object ) ) . getNumOfCpus ( ) ) ; }

Target:
public java.lang.String getValue ( java.lang.Object object ) { return ( ( org.ovirt.engine.ui.uicommonweb.models.vms.ImportTemplateData ) ( object ) ) . getTemplate ( ) . getname ( ) ; }
Source:
static com.gwtplatform.mvp.client.TabData getTabData ( org.ovirt.engine.ui.common.uicommon.model.DetailTabModelProvider < org.ovirt.engine.ui.uicommonweb.models.vms.VmListModel < java.lang.Void > , org.ovirt.engine.ui.uicommonweb.models.VmErrataCountModel > errataCountModelProvider ) { return new org.ovirt.engine.ui.common.widget.tab.ModelBoundTabData ( org.ovirt.engine.ui.webadmin.section.main.presenter.tab.virtualMachine.SubTabVirtualMachineErrataPresenter.constants.virtualMachineErrataSubTabLabel ( ) , 9 , errataCountModelProvider ) ; }

Target:
static com.gwtplatform.mvp.client.TabData getTabData ( org.ovirt.engine.ui.common.uicommon.model.DetailTabModelProvider < org.ovirt.engine.ui.uicommonweb.models.vms.VmListModel < java.lang.Void > , org.ovirt.engine.ui.uicommonweb.models.VmErrataCountModel > errataCountModelProvider ) { return new org.ovirt.engine.ui.common.widget.tab.ModelBoundTabData ( org.ovirt.engine.ui.webadmin.section.main.presenter.tab.virtualMachine.SubTabVirtualMachineErrataPresenter.constants.virtualMachineErrataSubTabLabel ( ) , 10 , errataCountModelProvider ) ; }
Source:
private org.ovirt.engine.core.bll.ValidationResult createValidationResult ( boolean valid ) { return valid ? org.ovirt.engine.core.bll.ValidationResult.VALID : new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.Unassigned ) ; }

Target:
private org.ovirt.engine.core.bll.ValidationResult createValidationResult ( boolean valid ) { return valid ? org.ovirt.engine.core.bll.ValidationResult.VALID : new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.Unassigned ) ; }
Source:
public java.lang.Void call ( ) { disconnect ( message ) ; return null ; }

Target:
private java.util.concurrent.Future < java.lang.Void > scheduleClose ( final java.lang.String message ) { this . closing.set ( true ) ; return scheduleTask ( ( ) -> { disconnect ( message ) ; return null ; } ) ; }
Source:
public void rollbackQuotaByVmId ( org.ovirt.engine.core.compat.Guid vmId ) { org.ovirt.engine.core.common.businessentities.VM vm = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmDao ( ) . get ( vmId ) ; if ( vm != null ) { removeQuotaFromCache ( vm.getStoragePoolId ( ) , vm.getQuotaId ( ) ) ; } }

Target:
public void rollbackQuotaByVmId ( org.ovirt.engine.core.compat.Guid vmId ) { org.ovirt.engine.core.common.businessentities.VM vm = vmDao.get ( vmId ) ; if ( vm != null ) { removeQuotaFromCache ( vm.getStoragePoolId ( ) , vm.getQuotaId ( ) ) ; } }
Source:
public void testSave ( ) { addVmInit ( ) ; org.ovirt.engine.core.common.businessentities.VmInit result = dao.get ( org.ovirt.engine.core.dao.VmInitDaoTest.EXISTING_VM ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertEquals ( "hostname" , result.getHostname ( ) ) ; }

Target:
public void testSave ( ) { addVmInit ( ) ; org.ovirt.engine.core.common.businessentities.VmInit result = dao.get ( org.ovirt.engine.core.dao.VmInitDaoTest.EXISTING_VM ) ; org.junit.jupiter.api.Assertions.assertNotNull ( result ) ; org.junit.jupiter.api.Assertions.assertEquals ( "hostname" , result.getHostname ( ) ) ; }
Source:
public void run ( ) { doUpdateTimeZone ( null ) ; }

Target:
protected void updateDefaultTimeZone ( ) { doUpdateTimeZone ( null ) ; }
Source:
protected void updateExistingEntity ( ) { org.ovirt.engine.core.compat.RpmVersion glusterVersion = new org.ovirt.engine.core.compat.RpmVersion ( "glusterfs-3.4.0.34.1u2rhs-1.el6rhs" ) ; existingEntity.setGlusterVersion ( glusterVersion ) ; }

Target:
protected void updateExistingEntity ( ) { existingEntity.setGlusterVersion ( new org.ovirt.engine.core.compat.RpmVersion ( "glusterfs-3.4.0.34.1u2rhs-1.el6rhs" ) ) ; existingEntity.setLibrbdVersion ( new org.ovirt.engine.core.compat.RpmVersion ( "librbd1-0.80.9-1.fc21.x86_64_updated" ) ) ; existingEntity.getReportedDnsResolverConfiguration ( ) . setNameServers ( java.util.Collections.singletonList ( new org.ovirt.engine.core.common.businessentities.network.NameServer ( "1.1.1.1" ) ) ) ; }
Source:
private void createSaveButon ( ) { org.ovirt.engine.ui.uicommonweb.UICommand onSaveCommand = new org.ovirt.engine.ui.uicommonweb.UICommand ( "OnSave" , this ) ; onSaveCommand.setTitle ( org.ovirt.engine.ui.uicommonweb.models.datacenters.IscsiBondModel.CONSTANTS.ok ( ) ) ; onSaveCommand.setIsDefault ( true ) ; getCommands ( ) . add ( onSaveCommand ) ; }

Target:
private void createSaveButon ( ) { org.ovirt.engine.ui.uicommonweb.UICommand onSaveCommand = new org.ovirt.engine.ui.uicommonweb.UICommand ( "OnSave" , this ) ; onSaveCommand.setTitle ( org.ovirt.engine.ui.uicommonweb.models.datacenters.IscsiBondModel.constants.ok ( ) ) ; onSaveCommand.setIsDefault ( true ) ; getCommands ( ) . add ( onSaveCommand ) ; }
Source:
protected org.ovirt.engine.core.compat.Guid getPredefinedVdsIdToRunOn ( ) { return org.ovirt.engine.core.bll.RunVmCommand.getVm ( ) . getDedicatedVmForVds ( ) ; }

Target:
protected void init ( ) { if ( ( org.ovirt.engine.core.bll.RunVmCommand.getVm ( ) ) != null ) { needsHostDevices = hostDeviceManager.checkVmNeedsDirectPassthrough ( org.ovirt.engine.core.bll.RunVmCommand.getVm ( ) ) ; } }
Source:
public void removeInterfaceFromVds ( org.ovirt.engine.core.compat.Guid id ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "id" , id ) ; getCallsHandler ( ) . executeModification ( "Deletevds_interface" , parameterSource ) ; }

Target:
public void removeInterfaceFromVds ( org.ovirt.engine.core.compat.Guid id ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "id" , id ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getQosDao ( ) . remove ( id ) ; getCallsHandler ( ) . executeModification ( "Deletevds_interface" , parameterSource ) ; }
Source:
protected void setUpEntityQueryExpectations ( ) throws java.lang.Exception { setUpEntityQueryExpectations ( VdcQueryType.GetVmByVmId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendVmApplicationResourceTest.VM_ID } , getVm ( ) ) ; }

Target:
protected void setUpEntityQueryExpectations ( ) throws java.lang.Exception { setUpEntityQueryExpectations ( QueryType.GetVmByVmId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendVmApplicationResourceTest.VM_ID } , getVm ( ) ) ; }
Source:
public void New ( ) { commandType = org.ovirt.engine.ui.uicommonweb.models.configure.roles_ui.RoleListModel.CommandType.New ; org.ovirt.engine.core.common.businessentities.roles role = new org.ovirt.engine.core.common.businessentities.roles ( ) ; InitRoleDialog ( role ) ; }

Target:
public void New ( ) { commandType = org.ovirt.engine.ui.uicommonweb.models.configure.roles_ui.RoleListModel.CommandType.New ; org.ovirt.engine.core.common.businessentities.Role role = new org.ovirt.engine.core.common.businessentities.Role ( ) ; InitRoleDialog ( role ) ; }
Source:
public void setOverrideEnabledSmartcard ( boolean enabled ) { this . smartcardEnabledOverridden = enabled ; }

Target:
public void setSpiceProxyEnabled ( boolean enabled ) { this . consoleOptions.setSpiceProxyEnabled ( enabled ) ; }
Source:
private void BuildOvf ( org.ovirt.engine.core.utils.ovf.IOvfBuilder builder ) { builder.BuildReference ( ) ; builder.BuildNetwork ( ) ; builder.BuildDisk ( ) ; builder.BuildVirtualSystem ( ) ; }

Target:
private void BuildOvf ( org.ovirt.engine.core.utils.ovf.IOvfBuilder builder ) { builder.buildReference ( ) ; builder.buildNetwork ( ) ; builder.buildDisk ( ) ; builder.buildVirtualSystem ( ) ; }
Source:
private void readCdItem ( org.ovirt.engine.core.compat.backendcompat.XmlNode node ) { readVmDevice ( node , vmBase , org.ovirt.engine.core.compat.Guid.newGuid ( ) , java.lang.Boolean.TRUE ) ; }

Target:
private void readCdItem ( org.ovirt.engine.core.compat.backendcompat.XmlNode node ) { readManagedVmDevice ( node , org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; }
Source:
public void setRetryPolicy ( org.ovirt.vdsm.jsonrpc.client.utils.retry.RetryPolicy policy ) { this . client.setRetryPolicy ( policy ) ; }

Target:
public void setClientRetryPolicy ( org.ovirt.vdsm.jsonrpc.client.utils.retry.RetryPolicy policy ) { this . client.setRetryPolicy ( policy ) ; }
Source:
public void setItems ( java.lang.Iterable value ) { if ( ( items ) != value ) { ItemsChanging ( value , items ) ; items = value ; getItemsChangedEvent ( ) . raise ( this , EventArgs.Empty ) ; onPropertyChanged ( new org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ( "Items" ) ) ; } }

Target:
public void setItems ( java.lang.Iterable value ) { if ( ( items ) != value ) { itemsChanging ( value , items ) ; items = value ; getItemsChangedEvent ( ) . raise ( this , EventArgs.Empty ) ; onPropertyChanged ( new org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ( "Items" ) ) ; } }
Source:
public org.ovirt.engine.core.common.action.ActionType deserialize ( org.codehaus.jackson.JsonParser jsonParser , org.codehaus.jackson.map.DeserializationContext deserializationContext ) throws java.io.IOException { java.lang.String jsonValue = jsonParser.getText ( ) ; org.ovirt.engine.core.common.action.ActionType actionType = org.ovirt.engine.core.utils.serialization.json.VdcActionTypeDeserializer.mappings.get ( jsonValue ) ; if ( actionType == null ) { actionType = org.ovirt.engine.core.common.action.ActionType.Unknown ; } return actionType ; }

Target:
public org.ovirt.engine.core.common.action.ActionType deserialize ( org.codehaus.jackson.JsonParser jsonParser , org.codehaus.jackson.map.DeserializationContext deserializationContext ) throws java.io.IOException { java.lang.String jsonValue = jsonParser.getText ( ) ; org.ovirt.engine.core.common.action.ActionType actionType = org.ovirt.engine.core.utils.serialization.json.ActionTypeDeserializer.mappings.get ( jsonValue ) ; if ( actionType == null ) { actionType = org.ovirt.engine.core.common.action.ActionType.Unknown ; } return actionType ; }
Source:
protected org.ovirt.engine.core.bll.context.CommandContext dupContext ( ) { return getContext ( ) . clone ( ) ; }

Target:
protected org.ovirt.engine.core.bll.context.CommandContext cloneContext ( ) { return getContext ( ) . clone ( ) ; }
Source:
public native java.lang.String getValue ( ) ;

Target:
public native java.lang.String getSessionTimeout ( ) ;
Source:
public java.util.Map < java.lang.String , java.lang.Object > getVGList ( ) ;

Target:
public java.util.Map < java.lang.String , java.lang.Object > getDeviceList ( int storageType , java.lang.String [ ] devicesList , boolean checkStatus ) ;
Source:
protected org.ovirt.engine.core.common.scheduling.ClusterPolicy getSchedulingPolicy ( ) { return getEntity ( new org.ovirt.engine.api.restapi.resource.QueryIdResolver ( org.ovirt.engine.core.common.queries.VdcQueryType.GetClusterPolicyById , org.ovirt.engine.core.common.queries.IdQueryParameters.class ) , false ) ; }

Target:
protected org.ovirt.engine.core.common.scheduling.ClusterPolicy getSchedulingPolicy ( ) { return getEntity ( new org.ovirt.engine.api.restapi.resource.QueryIdResolver ( org.ovirt.engine.core.common.queries.QueryType.GetClusterPolicyById , org.ovirt.engine.core.common.queries.IdQueryParameters.class ) , false ) ; }
Source:
public void getUsbPolicyOnUpdateCurrentlyDisabledGotEnabledNotSetLegacyPolicyUsb ( ) { org.ovirt.engine.api.model.Usb usb = new org.ovirt.engine.api.model.Usb ( ) ; usb.setType ( "legacy" ) ; assertEquals ( org.ovirt.engine.api.restapi.types.VmMapper.getUsbPolicyOnUpdate ( usb , UsbPolicy.DISABLED ) , UsbPolicy.DISABLED ) ; }

Target:
public void getUsbPolicyOnUpdateCurrentlyDisabledGotEnabledNotSetLegacyPolicyUsb ( ) { org.ovirt.engine.api.model.Usb usb = new org.ovirt.engine.api.model.Usb ( ) ; usb.setType ( UsbType.LEGACY ) ; assertEquals ( org.ovirt.engine.api.restapi.types.VmMapper.getUsbPolicyOnUpdate ( usb , UsbPolicy.DISABLED ) , UsbPolicy.DISABLED ) ; }
Source:
private void localize ( org.ovirt.engine.ui.webadmin.ApplicationConstants constants ) { forceEditor.setLabel ( constants.detachGlusterHostsForcefully ( ) ) ; }

Target:
private void localize ( ) { forceEditor.setLabel ( org.ovirt.engine.ui.webadmin.section.main.view.popup.gluster.DetachGlusterHostsPopupView.constants.detachGlusterHostsForcefully ( ) ) ; }
Source:
public static org.ovirt.engine.core.common.businessentities.VmDevice addMemoryBalloon ( org.ovirt.engine.core.compat.Guid vmId ) { return org.ovirt.engine.core.bll.utils.VmDeviceUtils.addManagedDevice ( new org.ovirt.engine.core.common.businessentities.VmDeviceId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , vmId ) , VmDeviceGeneralType.BALLOON , VmDeviceType.MEMBALLOON , org.ovirt.engine.core.bll.utils.VmDeviceUtils.getMemoryBalloonSpecParams ( ) , true , true ) ; }

Target:
public void removeUsbSlots ( org.ovirt.engine.core.compat.Guid vmId ) { removeVmDevices ( getUsbSlots ( vmId ) ) ; }
Source:
public void testPositiveValidateWithDisks ( ) { org.mockito.Mockito.doReturn ( org.ovirt.engine.core.bll.snapshots.CreateSnapshotsForVmCommandTest.getNonEmptyDiskList ( ) ) . when ( cmd ) . getDisksList ( ) ; org.mockito.Mockito.doReturn ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) . when ( cmd ) . getStorageDomainId ( ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateSuccess ( cmd ) ; }

Target:
public void testPositiveValidateWithDisks ( ) { org.mockito.Mockito.doReturn ( org.ovirt.engine.core.bll.snapshots.CreateSnapshotForVmCommandTest.getNonEmptyDiskList ( ) ) . when ( cmd ) . getDisksList ( ) ; org.mockito.Mockito.doReturn ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) . when ( cmd ) . getStorageDomainId ( ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateSuccess ( cmd ) ; }
Source:
public org.ovirt.engine.ui.uicommonweb.models.ListModel flush ( ) { vnicsModel.getItemsChangedEvent ( ) . removeListener ( vnicsChangedListener ) ; flush ( vnicsModel ) ; return driver.flush ( ) ; }

Target:
public org.ovirt.engine.ui.uicommonweb.models.ListModel flush ( ) { vnicsModel.getItemsChangedEvent ( ) . removeListener ( vnicsChangedListener ) ; flush ( vnicsModel ) ; vnicsModel.getItemsChangedEvent ( ) . addListener ( vnicsChangedListener ) ; return driver.flush ( ) ; }
Source:
public void setTitle ( java.lang.String title ) { this . title = title ; super . setTitle ( title ) ; }

Target:
public void setTooltipText ( com.google.gwt.safehtml.shared.SafeHtml tooltipText ) { this . tooltipText = tooltipText ; }
Source:
protected void buildVmNumaProperties ( ) { final java.lang.String compatibilityVersion = vm.getVdsGroupCompatibilityVersion ( ) . toString ( ) ; addNumaSetting ( compatibilityVersion ) ; }

Target:
protected void buildVmNumaProperties ( ) { final java.lang.String compatibilityVersion = vm.getClusterCompatibilityVersion ( ) . toString ( ) ; addNumaSetting ( compatibilityVersion ) ; }
Source:
public void testReturnVmDisksService ( ) { org.junit.Assert.assertTrue ( ( ( connection.systemService ( ) . service ( "vms/123/disks" ) ) instanceof org.ovirt.engine.sdk4.services.VmDisksService ) ) ; }

Target:
public void testReturnVmDisksService ( ) { org.junit.Assert.assertTrue ( ( ( connection.systemService ( ) . service ( "vms/123/diskattachments" ) ) instanceof org.ovirt.engine.sdk4.services.DiskAttachmentsService ) ) ; }
Source:
private org.springframework.jdbc.core.simple.ParameterizedRowMapper < org.ovirt.engine.core.common.businessentities.Quota > getQuotaMetaDataFromResultSet ( ) { org.springframework.jdbc.core.simple.ParameterizedRowMapper < org.ovirt.engine.core.common.businessentities.Quota > mapper = new org.springframework.jdbc.core.simple.ParameterizedRowMapper < org.ovirt.engine.core.common.businessentities.Quota > ( ) { @ java.lang.Override public org.ovirt.engine.core.common.businessentities.Quota mapRow ( java.sql.ResultSet rs , int rowNum ) throws java.sql.SQLException { return getQuotaMetaDataFromResultSet ( rs ) ; } } ; return mapper ; }

Target:
private org.springframework.jdbc.core.RowMapper < org.ovirt.engine.core.common.businessentities.Quota > getQuotaMetaDataFromResultSet ( ) { org.springframework.jdbc.core.RowMapper < org.ovirt.engine.core.common.businessentities.Quota > mapper = new org.springframework.jdbc.core.RowMapper < org.ovirt.engine.core.common.businessentities.Quota > ( ) { @ java.lang.Override public org.ovirt.engine.core.common.businessentities.Quota mapRow ( java.sql.ResultSet rs , int rowNum ) throws java.sql.SQLException { return getQuotaMetaDataFromResultSet ( rs ) ; } } ; return mapper ; }
Source:
public void setEntityNames ( java.util.List < java.lang.String > entityNames ) { this . entityNames = entityNames ; if ( entityNames == null ) { this . entityNames = new java.util.ArrayList < > ( ) ; } }

Target:
public org.ovirt.engine.core.common.scheduling.EntityAffinityRule getVmAffinityRule ( ) { return this . vmAffinityRule ; }
Source:
protected org.ovirt.engine.api.model.DataCenter postPopulate ( org.ovirt.engine.api.model.DataCenter model ) { model.setStorageFormat ( org.ovirt.engine.api.restapi.types.MappingTestHelper.shuffle ( org.ovirt.engine.api.restapi.model.StorageFormat.class ) . value ( ) ) ; return model ; }

Target:
protected org.ovirt.engine.api.model.DataCenter postPopulate ( org.ovirt.engine.api.model.DataCenter model ) { model.setStorageFormat ( org.ovirt.engine.api.restapi.types.MappingTestHelper.shuffle ( org.ovirt.engine.api.restapi.model.StorageFormat.class ) . value ( ) ) ; model.setQuotaMode ( org.ovirt.engine.api.restapi.types.MappingTestHelper.shuffle ( org.ovirt.engine.api.model.QuotaModeType.class ) . value ( ) ) ; return model ; }
Source:
protected void executeCommand ( ) { org.ovirt.engine.core.bll.storage.repoimage.ImportRepoImageCommand.setSucceeded ( true ) ; }

Target:
public void endWithFailure ( ) { updateDiskStatus ( ImageStatus.ILLEGAL ) ; org.ovirt.engine.core.bll.storage.repoimage.ImportRepoImageCommand.setSucceeded ( true ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.StorageDomainStatic getStorageDomainStatic ( ) { return sd ; }

Target:
protected java.lang.String fromDeployAction ( org.ovirt.engine.core.common.businessentities.HostedEngineDeployConfiguration.Action deployAction ) { switch ( deployAction ) { case DEPLOY : return org.ovirt.ovirt_host_deploy.constants.Const.HOSTED_ENGINE_ACTION_DEPLOY ; case UNDEPLOY : return org.ovirt.ovirt_host_deploy.constants.Const.HOSTED_ENGINE_ACTION_REMOVE ; } return org.ovirt.ovirt_host_deploy.constants.Const.HOSTED_ENGINE_ACTION_NONE ; }
Source:
public void testAllEmpty ( ) { java.lang.String command = createCommand ( new org.ovirt.engine.core.common.utils.ansible.AnsibleCommandBuilder ( ) . playbook ( org.ovirt.engine.core.common.utils.ansible.AnsibleCommandBuilderTest.ANSIBLE_PLAYBOOK ) ) ; org.junit.Assert.assertEquals ( join ( AnsibleCommandBuilder.ANSIBLE_COMMAND , org.ovirt.engine.core.common.utils.ansible.AnsibleCommandBuilderTest.PRIVATE_KEY , org.ovirt.engine.core.common.utils.ansible.AnsibleCommandBuilderTest.ANSIBLE_PLAYBOOK_FULL_PATH ) , command ) ; }

Target:
public void testAllEmpty ( ) { java.lang.String command = createCommand ( new org.ovirt.engine.core.common.utils.ansible.AnsibleCommandBuilder ( ) . playbook ( org.ovirt.engine.core.common.utils.ansible.AnsibleCommandBuilderTest.ANSIBLE_PLAYBOOK ) ) ; org.junit.Assert.assertEquals ( join ( AnsibleCommandBuilder.ANSIBLE_COMMAND , org.ovirt.engine.core.common.utils.ansible.AnsibleCommandBuilderTest.ANSIBLE_LOG_LEVEL , org.ovirt.engine.core.common.utils.ansible.AnsibleCommandBuilderTest.PRIVATE_KEY , org.ovirt.engine.core.common.utils.ansible.AnsibleCommandBuilderTest.ANSIBLE_PLAYBOOK_FULL_PATH ) , command ) ; }
Source:
public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) . intValue ( ) : 1 ; }

Target:
public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) . intValue ( ) : 1 ; }
Source:
public void validateFailsOnNull ( ) { cmd = org.mockito.Mockito.spy ( createTestCommand ( null ) ) ; prepareMocks ( cmd ) ; org.junit.Assert.assertFalse ( cmd.validate ( ) ) ; }

Target:
public void validateSucceedsOnVolumeWithRebalanceTask ( ) { cmd.setGlusterVolumeId ( volumeWithRebalanceTask ) ; org.junit.Assert.assertTrue ( cmd.validate ( ) ) ; }
Source:
public java.lang.String getStringRepresentation ( ) { return _document.getOuterXml ( ) ; }

Target:
private void buildImageReference ( ) { org.ovirt.engine.core.utils.ovf.xml.XmlNodeList list = _document.SelectNodes ( "//*/File" , _xmlNS ) ; for ( org.ovirt.engine.core.utils.ovf.xml.XmlNode node : list ) { org.ovirt.engine.core.common.businessentities.DiskImage image = new org.ovirt.engine.core.common.businessentities.DiskImage ( ) ; image.setImageId ( new org.ovirt.engine.core.compat.Guid ( node.attributes.get ( "ovf:id" ) . getValue ( ) ) ) ; image.setId ( org.ovirt.engine.core.utils.ovf.OvfParser.GetImageGrupIdFromImageFile ( node.attributes.get ( "ovf:href" ) . getValue ( ) ) ) ; image.setActive ( true ) ; image.setImageStatus ( ImageStatus.OK ) ; image.setDescription ( node.attributes.get ( "ovf:description" ) . getValue ( ) ) ; _images.add ( image ) ; } }
Source:
static com.gwtplatform.mvp.client.TabData getTabData ( org.ovirt.engine.ui.webadmin.ApplicationConstants applicationConstants , org.ovirt.engine.ui.common.uicommon.model.SearchableDetailModelProvider < org.ovirt.engine.core.common.businessentities.AuditLog , org.ovirt.engine.ui.uicommonweb.models.hosts.HostListModel < java.lang.Void > , org.ovirt.engine.ui.uicommonweb.models.hosts.HostEventListModel > modelProvider ) { return new org.ovirt.engine.ui.common.widget.tab.ModelBoundTabData ( applicationConstants.hostEventSubTabLabel ( ) , 7 , modelProvider , org.ovirt.engine.ui.common.widget.Align.RIGHT ) ; }

Target:
static com.gwtplatform.mvp.client.TabData getTabData ( org.ovirt.engine.ui.common.uicommon.model.SearchableDetailModelProvider < org.ovirt.engine.core.common.businessentities.AuditLog , org.ovirt.engine.ui.uicommonweb.models.hosts.HostListModel < java.lang.Void > , org.ovirt.engine.ui.uicommonweb.models.hosts.HostEventListModel > modelProvider ) { return new org.ovirt.engine.ui.common.widget.tab.ModelBoundTabData ( org.ovirt.engine.ui.webadmin.section.main.presenter.tab.host.SubTabHostEventPresenter.constants.hostEventSubTabLabel ( ) , 7 , modelProvider , org.ovirt.engine.ui.common.widget.Align.RIGHT ) ; }
Source:
public void testGetSystemStatisticsValueWithSpecifiedStatus ( ) { int numOfVmWithStatusMigratingFrom = dao.getSystemStatisticsValue ( "VM" , java.lang.Integer.toString ( VMStatus.MigratingFrom.getValue ( ) ) ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.dao.SystemStatisticsDaoImplTest.NUM_OF_VM_IN_FIXTURES_WITH_STATUS_MIGRATING_FROM , numOfVmWithStatusMigratingFrom ) ; }

Target:
public void testGetSystemStatisticsValueWithSpecifiedStatus ( ) { int numOfVmWithStatusMigratingFrom = dao.getSystemStatisticsValue ( "VM" , java.lang.Integer.toString ( VMStatus.MigratingFrom.getValue ( ) ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( org.ovirt.engine.core.dao.SystemStatisticsDaoImplTest.NUM_OF_VM_IN_FIXTURES_WITH_STATUS_MIGRATING_FROM , numOfVmWithStatusMigratingFrom ) ; }
Source:
public void search ( ) { if ( ( getEntity ( ) ) != null ) { super . search ( ) ; } }

Target:
public void remove ( ) { if ( ( getWindow ( ) ) != null ) { return ; } org.ovirt.engine.ui.uicommonweb.models.vms.RemoveExternalSubnetModel model = new org.ovirt.engine.ui.uicommonweb.models.vms.RemoveExternalSubnetModel ( this , getSelectedItems ( ) ) ; setWindow ( model ) ; }
Source:
protected void configure ( org.ovirt.engine.core.dal.dbbroker.DbFacade dbFacade ) { loadDbFacadeConfig ( ) ; dbFacade.setOnStartConnectionTimeout ( connectionTimeout ) ; dbFacade.setConnectionCheckInterval ( checkInterval ) ; }

Target:
public org.ovirt.engine.core.dal.dbbroker.DbConnectionUtil produceDbConnectionUtil ( org.springframework.jdbc.core.JdbcTemplate jdbcTemplate ) { loadDbFacadeConfig ( ) ; return new org.ovirt.engine.core.dal.dbbroker.DbConnectionUtil ( jdbcTemplate , connectionTimeout , checkInterval ) ; }
Source:
public java.util.List < org.ovirt.engine.core.common.businessentities.aaa.AuthzGroup > Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return ( ( java.util.List < org.ovirt.engine.core.common.businessentities.aaa.AuthzGroup > ) ( source ) ) ; }

Target:
public java.util.List < org.ovirt.engine.core.common.businessentities.aaa.AuthzGroup > convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return ( ( java.util.List < org.ovirt.engine.core.common.businessentities.aaa.AuthzGroup > ) ( source ) ) ; }
Source:
public void testIsExternalVM ( ) throws java.lang.Exception { org.ovirt.engine.core.utils.ovf.xml.XmlDocument xmlDocument = new org.ovirt.engine.core.utils.ovf.xml.XmlDocument ( getXmlOvfData ( ) ) ; org.junit.Assert.assertFalse ( "VM should not be external VM" , org.ovirt.engine.core.utils.OvfUtils.isExternalVM ( xmlDocument ) ) ; }

Target:
public void testIsExternalVM ( ) throws java.lang.Exception { org.ovirt.engine.core.utils.ovf.xml.XmlDocument xmlDocument = new org.ovirt.engine.core.utils.ovf.xml.XmlDocument ( getXmlOvfData ( ) ) ; org.junit.Assert.assertFalse ( "VM should not be external VM" , ovfUtils.isExternalVM ( xmlDocument ) ) ; }
Source:
private void processExceptionToClient ( org.ovirt.engine.core.common.errors.VdcFault fault ) { fault.setSessionID ( getParameters ( ) . getSessionId ( ) ) ; _returnValue.setFault ( fault ) ; }

Target:
private void processExceptionToClient ( org.ovirt.engine.core.common.errors.VdcFault fault ) { fault.setSessionID ( getParameters ( ) . getSessionId ( ) ) ; _returnValue.getExecuteFailedMessages ( ) . add ( fault.getError ( ) . name ( ) ) ; _returnValue.setFault ( fault ) ; }
Source:
public java.lang.String getFullUserName ( ) { java.lang.String userName = getUserName ( ) ; java.lang.String domain = getDomain ( ) ; if ( ( ( userName != null ) && ( ! ( userName.contains ( "@" ) ) ) ) && ( domain != null ) ) { return ( userName + "@" ) + domain ; } return userName ; }

Target:
public java.lang.String getFullUserName ( ) { return isLoggedIn ( ) ? org.ovirt.engine.ui.frontend.utils.FormatUtils.getFullLoginName ( loggedUser ) : null ; }
Source:
public void remove ( org.ovirt.engine.core.compat.Guid commandId ) { commandMap.remove ( commandId ) ; }

Target:
public void remove ( org.ovirt.engine.core.compat.Guid commandId ) { commandMap.remove ( commandId ) ; cmdEntityDao.remove ( commandId ) ; }
Source:
public static java.lang.String string2hex ( java.lang.String text ) { return org.apache.commons.codec.binary.Hex.encodeHexString ( text.getBytes ( org.ovirt.engine.api.restapi.utils.HexUtils.UTF_8 ) ) ; }

Target:
public static java.lang.String string2hex ( java.lang.String text ) { return org.apache.commons.codec.binary.Hex.encodeHexString ( text.getBytes ( java.nio.charset.StandardCharsets.UTF_8 ) ) ; }
Source:
protected org.ovirt.engine.core.common.businessentities.vm_pools getEntity ( int index ) { return setUpEntityExpectations ( control.createMock ( org.ovirt.engine.core.common.businessentities.vm_pools.class ) , index ) ; }

Target:
protected org.ovirt.engine.api.model.VmPool getEntity ( int index ) { return setUpEntityExpectations ( control.createMock ( org.ovirt.engine.api.model.VmPool.class ) , index ) ; }