auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void testExecuteCommandByServerIdForStart ( ) { cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.gluster.ManageGlusterServiceCommand ( new org.ovirt.engine.core.common.action.gluster.GlusterServiceParameters ( null , org.ovirt.engine.core.compat.Guid.NewGuid ( ) , org.ovirt.engine.core.common.businessentities.gluster.ServiceType.GLUSTER_SWIFT , org.ovirt.engine.core.common.constants.gluster.GlusterConstants.MANAGE_GLUSTER_SERVICE_ACTION_TYPE_START ) ) ) ; setUpMockUpForStart ( ) ; mockBackend ( true , null , GlusterServiceStatus.STOPPED ) ; cmd.executeCommand ( ) ; org.mockito.Mockito.verify ( serverServiceDao , org.mockito.Mockito.times ( 2 ) ) . updateByServerIdAndServiceType ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.gluster.GlusterServerService.class ) ) ; org.junit.Assert.assertEquals ( cmd.getAuditLogTypeValue ( ) , AuditLogType.GLUSTER_SERVICE_STARTED ) ; }

Target:
public void testExecuteCommandByServerIdForStart ( ) { cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.gluster.ManageGlusterServiceCommand ( new org.ovirt.engine.core.common.action.gluster.GlusterServiceParameters ( null , org.ovirt.engine.core.compat.Guid.newGuid ( ) , org.ovirt.engine.core.common.businessentities.gluster.ServiceType.GLUSTER_SWIFT , org.ovirt.engine.core.common.constants.gluster.GlusterConstants.MANAGE_GLUSTER_SERVICE_ACTION_TYPE_START ) ) ) ; setUpMockUpForStart ( ) ; mockBackend ( true , null , GlusterServiceStatus.STOPPED ) ; cmd.executeCommand ( ) ; org.mockito.Mockito.verify ( serverServiceDao , org.mockito.Mockito.times ( 2 ) ) . updateByServerIdAndServiceType ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.gluster.GlusterServerService.class ) ) ; org.junit.Assert.assertEquals ( cmd.getAuditLogTypeValue ( ) , AuditLogType.GLUSTER_SERVICE_STARTED ) ; }
Source:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.datacenters.DataCenterGuideModel dataCenterGuideModel = ( ( org.ovirt.engine.ui.uicommonweb.models.datacenters.DataCenterGuideModel ) ( target ) ) ; dataCenterGuideModel.clusters = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Cluster > ) ( returnValue ) ) ; dataCenterGuideModel.updateOptionsLocalFS ( ) ; }

Target:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.datacenters.DataCenterGuideModel dataCenterGuideModel = ( ( org.ovirt.engine.ui.uicommonweb.models.datacenters.DataCenterGuideModel ) ( target ) ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Cluster > clusters = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Cluster > ) ( returnValue ) ) ; dataCenterGuideModel.clusters = clusters ; dataCenterGuideModel.updateOptionsLocalFS ( ) ; }
Source:
private void postInitTemplate ( java.util.List < org.ovirt.engine.core.common.businessentities.VmTemplate > templates ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmTemplate > rootTemplates = filterNotBaseTemplates ( templates ) ; org.ovirt.engine.core.common.businessentities.VmTemplate oldTemplate = getModel ( ) . getBaseTemplate ( ) . getSelectedItem ( ) ; getModel ( ) . getBaseTemplate ( ) . setItems ( rootTemplates ) ; getModel ( ) . getBaseTemplate ( ) . setSelectedItem ( org.ovirt.engine.ui.uicommonweb.Linq.firstOrDefault ( rootTemplates , ( oldTemplate != null ? new org.ovirt.engine.ui.uicommonweb.Linq.TemplatePredicate ( oldTemplate.getId ( ) ) : new org.ovirt.engine.ui.uicommonweb.Linq.TemplatePredicate ( org.ovirt.engine.core.compat.Guid.Empty ) ) ) ) ; updateIsDisksAvailable ( ) ; }

Target:
private void postInitTemplate ( java.util.List < org.ovirt.engine.core.common.businessentities.VmTemplate > templates ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmTemplate > baseTemplates = filterNotBaseTemplates ( templates ) ; org.ovirt.engine.core.common.businessentities.VmTemplate prevBaseTemplate = getModel ( ) . getBaseTemplate ( ) . getSelectedItem ( ) ; getModel ( ) . getBaseTemplate ( ) . setItems ( baseTemplates ) ; getModel ( ) . getBaseTemplate ( ) . setSelectedItem ( org.ovirt.engine.ui.uicommonweb.Linq.firstOrDefault ( baseTemplates , new org.ovirt.engine.ui.uicommonweb.Linq.TemplatePredicate ( ( prevBaseTemplate != null ? prevBaseTemplate.getId ( ) : org.ovirt.engine.core.compat.Guid.Empty ) ) ) ) ; updateIsDisksAvailable ( ) ; }
Source:
protected boolean setAndValidateCpuProfile ( ) { return validate ( org.ovirt.engine.core.bll.profiles.CpuProfileHelper.setAndValidateCpuProfile ( org.ovirt.engine.core.bll.AddVmTemplateCommand.getParameters ( ) . getMasterVm ( ) , org.ovirt.engine.core.bll.AddVmTemplateCommand.getVdsGroup ( ) . getcompatibility_version ( ) ) ) ; }

Target:
protected boolean setAndValidateCpuProfile ( ) { if ( ( org.ovirt.engine.core.bll.AddVmTemplateCommand.getParameters ( ) . getTemplateType ( ) ) == ( org.ovirt.engine.core.common.businessentities.VmEntityType.INSTANCE_TYPE ) ) { return true ; } return validate ( org.ovirt.engine.core.bll.profiles.CpuProfileHelper.setAndValidateCpuProfile ( org.ovirt.engine.core.bll.AddVmTemplateCommand.getParameters ( ) . getMasterVm ( ) , org.ovirt.engine.core.bll.AddVmTemplateCommand.getVdsGroup ( ) . getcompatibility_version ( ) ) ) ; }
Source:
public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Tags > ret = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Tags > ( ) ; for ( org.ovirt.engine.core.common.businessentities.Tags tags : ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Tags > ) ( source ) ) ) { if ( ( tags.gettype ( ) ) == ( org.ovirt.engine.core.common.businessentities.TagsType.GeneralTag ) ) { ret.add ( tags ) ; } } return ret ; } return new org.ovirt.engine.core.common.businessentities.Tags ( ) ; }

Target:
public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Tags > ret = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.Tags tags : ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Tags > ) ( source ) ) ) { if ( ( tags.gettype ( ) ) == ( org.ovirt.engine.core.common.businessentities.TagsType.GeneralTag ) ) { ret.add ( tags ) ; } } return ret ; } return new org.ovirt.engine.core.common.businessentities.Tags ( ) ; }
Source:
public void updateStatus ( ) { org.ovirt.engine.core.common.businessentities.Snapshot snapshot = dao.get ( getExistingEntityId ( ) ) ; snapshot.setStatus ( SnapshotStatus.LOCKED ) ; dao.updateStatus ( snapshot.getId ( ) , snapshot.getStatus ( ) ) ; org.junit.Assert.assertEquals ( snapshot , dao.get ( snapshot.getId ( ) ) ) ; }

Target:
public void updateStatus ( ) { org.ovirt.engine.core.common.businessentities.Snapshot snapshot = dao.get ( getExistingEntityId ( ) ) ; snapshot.setStatus ( SnapshotStatus.LOCKED ) ; dao.updateStatus ( snapshot.getId ( ) , snapshot.getStatus ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( snapshot , dao.get ( snapshot.getId ( ) ) ) ; }
Source:
public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( ) ; } return source ; }

Target:
public void getExternalProviderHostList ( org.ovirt.engine.ui.frontend.AsyncQuery < java.util.List < org.ovirt.engine.core.common.businessentities.VDS > > aQuery , org.ovirt.engine.core.compat.Guid providerId , boolean filterOutExistingHosts , java.lang.String searchFilter ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.ListConverter < > ( ) ; org.ovirt.engine.core.common.queries.GetHostListFromExternalProviderParameters params = new org.ovirt.engine.core.common.queries.GetHostListFromExternalProviderParameters ( ) ; params.setFilterOutExistingHosts ( filterOutExistingHosts ) ; params.setProviderId ( providerId ) ; params.setSearchFilter ( searchFilter ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetHostListFromExternalProvider , params , aQuery ) ; }
Source:
private static void appendVersionComponent ( java.lang.StringBuilder val , int versionNumber ) { if ( versionNumber > ( - 1 ) ) { if ( ( val.length ( ) ) != 0 ) { val.append ( '.' ) ; } val.append ( versionNumber ) ; } }

Target:
private static void appendVersionComponent ( java.lang.StringBuilder val , int versionNumber ) { if ( versionNumber > ( org.ovirt.engine.core.compat.Version.VERSION_NOT_SET ) ) { if ( ( val.length ( ) ) != 0 ) { val.append ( '.' ) ; } val.append ( versionNumber ) ; } }
Source:
public java.lang.String toString ( ) { java.lang.StringBuilder buffer = new java.lang.StringBuilder ( ( 2 * ( bytes.length ) ) ) ; for ( int i = 0 ; i < ( bytes.length ) ; i ++ ) { java.lang.String text = java.lang.Integer.toHexString ( ( ( bytes [ i ] ) & 255 ) ) ; if ( ( text.length ( ) ) == 1 ) { buffer.append ( '0' ) ; } buffer.append ( text ) ; } return buffer.toString ( ) ; }

Target:
public java.lang.String toHex ( ) { java.lang.StringBuilder buffer = new java.lang.StringBuilder ( ( 2 * ( bytes.length ) ) ) ; for ( int i = 0 ; i < ( bytes.length ) ; i ++ ) { java.lang.String text = java.lang.Integer.toHexString ( ( ( bytes [ i ] ) & 255 ) ) ; if ( ( text.length ( ) ) == 1 ) { buffer.append ( '0' ) ; } buffer.append ( text ) ; } return buffer.toString ( ) ; }
Source:
private void readBytes ( java.nio.ByteBuffer ibuff ) throws java.io.IOException , org.ovirt.vdsm.jsonrpc.client.ClientConnectionException { readBuffer ( ibuff ) ; if ( ibuff.hasRemaining ( ) ) { return ; } ibuff.rewind ( ) ; emitOnMessageReceived ( ibuff.array ( ) ) ; this . ibuff = null ; this . byteBuffer.clear ( ) ; }

Target:
protected < T > java.util.concurrent.FutureTask < T > scheduleTask ( java.util.concurrent.Callable < T > callable ) { final java.util.concurrent.FutureTask < T > task = new java.util.concurrent.FutureTask < > ( callable ) ; reactor.queueFuture ( task ) ; return task ; }
Source:
protected void releaseExclusiveDiskDbLocks ( ) { if ( isImageExclusiveLockNeeded ( ) ) { final org.ovirt.engine.core.common.businessentities.DiskImage diskImage = ( ( org.ovirt.engine.core.common.businessentities.DiskImage ) ( getDisk ( ) ) ) ; diskImage.setImageStatus ( ImageStatus.OK ) ; org.ovirt.engine.core.bll.ImagesHandler.updateImageStatus ( diskImage.getImageId ( ) , ImageStatus.OK ) ; } }

Target:
protected void releaseExclusiveDiskDbLocks ( ) { if ( isImageExclusiveLockNeeded ( ) ) { final org.ovirt.engine.core.common.businessentities.storage.DiskImage diskImage = ( ( org.ovirt.engine.core.common.businessentities.storage.DiskImage ) ( getDisk ( ) ) ) ; diskImage.setImageStatus ( ImageStatus.OK ) ; org.ovirt.engine.core.bll.ImagesHandler.updateImageStatus ( diskImage.getImageId ( ) , ImageStatus.OK ) ; } }
Source:
public org.ovirt.engine.core.dal.VdcBllMessages validate ( org.ovirt.engine.core.common.businessentities.VDS vds , java.lang.StringBuilder sb , boolean isMigrate ) { if ( ( ! ( vds.getVdsGroupId ( ) . equals ( getVm ( ) . getVdsGroupId ( ) ) ) ) || ( ( vds.getStatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.VDSStatus.Up ) ) ) { sb.append ( "is not in up status or belongs to the VM's cluster" ) ; return org.ovirt.engine.core.dal.VdcBllMessages.ACTION_TYPE_FAILED_VDS_VM_CLUSTER ; } return null ; }

Target:
public org.ovirt.engine.core.common.errors.VdcBllMessages validate ( org.ovirt.engine.core.common.businessentities.VDS vds , java.lang.StringBuilder sb , boolean isMigrate ) { if ( ( ! ( vds.getVdsGroupId ( ) . equals ( getVm ( ) . getVdsGroupId ( ) ) ) ) || ( ( vds.getStatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.VDSStatus.Up ) ) ) { sb.append ( "is not in up status or belongs to the VM's cluster" ) ; return org.ovirt.engine.core.common.errors.VdcBllMessages.ACTION_TYPE_FAILED_VDS_VM_CLUSTER ; } return null ; }
Source:
public void insufficientDiskSpaceWithSnapshots ( ) { final org.ovirt.engine.core.bll.exportimport.ImportVmCommand < org.ovirt.engine.core.common.action.ImportVmParameters > command = setupDiskSpaceTest ( createParameters ( ) ) ; org.mockito.Mockito.doReturn ( true ) . when ( command ) . validateImages ( org.mockito.Matchers.anyMap ( ) ) ; org.mockito.Mockito.when ( command.getImportValidator ( ) . validateSpaceRequirements ( org.mockito.Matchers.anyCollection ( ) ) ) . thenReturn ( new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_DISK_SPACE_LOW_ON_STORAGE_DOMAIN ) ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( command , EngineMessage.ACTION_TYPE_FAILED_DISK_SPACE_LOW_ON_STORAGE_DOMAIN ) ; }

Target:
public void insufficientDiskSpaceWithSnapshots ( ) { final org.ovirt.engine.core.bll.exportimport.ImportVmCommand < org.ovirt.engine.core.common.action.ImportVmParameters > command = setupDiskSpaceTest ( createParameters ( ) ) ; org.mockito.Mockito.doReturn ( true ) . when ( command ) . validateImages ( org.mockito.Matchers.anyMapOf ( org.ovirt.engine.core.compat.Guid.class , org.ovirt.engine.core.common.businessentities.StorageDomain.class ) ) ; org.mockito.Mockito.when ( command.getImportValidator ( ) . validateSpaceRequirements ( org.mockito.Matchers.anyCollectionOf ( org.ovirt.engine.core.common.businessentities.storage.DiskImage.class ) ) ) . thenReturn ( new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_DISK_SPACE_LOW_ON_STORAGE_DOMAIN ) ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( command , EngineMessage.ACTION_TYPE_FAILED_DISK_SPACE_LOW_ON_STORAGE_DOMAIN ) ; }
Source:
public void canDoActionFailedUpdateReadOnly ( ) { org.mockito.Mockito.when ( diskDao.get ( diskImageGuid ) ) . thenReturn ( createDiskImage ( ) ) ; org.ovirt.engine.core.common.action.UpdateVmDiskParameters parameters = createParameters ( ) ; parameters.getDiskInfo ( ) . setReadOnly ( true ) ; initializeCommand ( parameters , java.util.Collections.singletonList ( createVm ( VMStatus.Up ) ) ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( command , EngineMessage.ACTION_TYPE_FAILED_VM_IS_NOT_DOWN ) ; }

Target:
public void validateFailedUpdateReadOnly ( ) { org.mockito.Mockito.when ( diskDao.get ( diskImageGuid ) ) . thenReturn ( createDiskImage ( ) ) ; org.ovirt.engine.core.common.action.UpdateVmDiskParameters parameters = createParameters ( ) ; parameters.getDiskInfo ( ) . setReadOnly ( true ) ; initializeCommand ( parameters , java.util.Collections.singletonList ( createVm ( VMStatus.Up ) ) ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( command , EngineMessage.ACTION_TYPE_FAILED_VM_IS_NOT_DOWN ) ; }
Source:
private void ActiveDetailModelChanging ( org.ovirt.engine.ui.uicommonweb.models.EntityModel newValue , org.ovirt.engine.ui.uicommonweb.models.EntityModel oldValue ) { if ( oldValue != null ) { oldValue.setEntity ( null ) ; if ( oldValue instanceof org.ovirt.engine.ui.uicommonweb.models.SearchableListModel ) { ( ( org.ovirt.engine.ui.uicommonweb.models.SearchableListModel ) ( oldValue ) ) . EnsureAsyncSearchStopped ( ) ; } } if ( newValue != null ) { newValue.setEntity ( ProvideDetailModelEntity ( getSelectedItem ( ) ) ) ; } }

Target:
private void activeDetailModelChanging ( org.ovirt.engine.ui.uicommonweb.models.EntityModel newValue , org.ovirt.engine.ui.uicommonweb.models.EntityModel oldValue ) { if ( oldValue != null ) { oldValue.setEntity ( null ) ; if ( oldValue instanceof org.ovirt.engine.ui.uicommonweb.models.SearchableListModel ) { ( ( org.ovirt.engine.ui.uicommonweb.models.SearchableListModel ) ( oldValue ) ) . EnsureAsyncSearchStopped ( ) ; } } if ( newValue != null ) { newValue.setEntity ( provideDetailModelEntity ( getSelectedItem ( ) ) ) ; } }
Source:
public org.ovirt.api.metamodel.concepts.Method getMethod ( org.ovirt.api.metamodel.concepts.Name name ) { java.util.Optional < org.ovirt.api.metamodel.concepts.Method > method = methods.stream ( ) . filter ( named ( name ) ) . findFirst ( ) ; if ( method.isPresent ( ) ) { return method.get ( ) ; } if ( ( base ) != null ) { return base.getMethod ( name ) ; } return null ; }

Target:
public org.ovirt.api.metamodel.concepts.Method getMethod ( org.ovirt.api.metamodel.concepts.Name name ) { java.util.Optional < org.ovirt.api.metamodel.concepts.Method > method = methods.stream ( ) . filter ( org.ovirt.api.metamodel.concepts.Named.named ( name ) ) . findFirst ( ) ; if ( method.isPresent ( ) ) { return method.get ( ) ; } if ( ( base ) != null ) { return base.getMethod ( name ) ; } return null ; }
Source:
public void init ( ) { if ( ! ( initialized ) ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getDbUserDAO ( ) . removeAllSessions ( ) ; int mRefreshRate = org.ovirt.engine.core.common.config.Config.< java.lang.Integer > GetValue ( ConfigValues.UserRefreshRate ) ; jobId = org.ovirt.engine.core.utils.timer.SchedulerUtilQuartzImpl.getInstance ( ) . scheduleAFixedDelayJob ( this , "OnTimer" , new java.lang.Class [ ] { } , new java.lang.Object [ ] { } , 0 , mRefreshRate , java.util.concurrent.TimeUnit.SECONDS ) ; initialized = true ; } }

Target:
public void init ( ) { if ( ! ( initialized ) ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getDbUserDao ( ) . removeAllSessions ( ) ; int mRefreshRate = org.ovirt.engine.core.common.config.Config.< java.lang.Integer > GetValue ( ConfigValues.UserRefreshRate ) ; jobId = org.ovirt.engine.core.utils.timer.SchedulerUtilQuartzImpl.getInstance ( ) . scheduleAFixedDelayJob ( this , "OnTimer" , new java.lang.Class [ ] { } , new java.lang.Object [ ] { } , 0 , mRefreshRate , java.util.concurrent.TimeUnit.SECONDS ) ; initialized = true ; } }
Source:
public org.ovirt.engine.core.bll.ValidationResult networkNotChanged ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment oldAttachment ) { boolean when = ( oldAttachment != null ) && ( ! ( java.util.Objects.equals ( oldAttachment.getNetworkId ( ) , attachment.getNetworkId ( ) ) ) ) ; return org.ovirt.engine.core.bll.ValidationResult.failWith ( VdcBllMessages.CANNOT_CHANGE_ATTACHED_NETWORK ) . when ( when ) ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult networkNotChanged ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment oldAttachment ) { boolean when = ( oldAttachment != null ) && ( ! ( java.util.Objects.equals ( oldAttachment.getNetworkId ( ) , attachment.getNetworkId ( ) ) ) ) ; return org.ovirt.engine.core.bll.ValidationResult.failWith ( EngineMessage.CANNOT_CHANGE_ATTACHED_NETWORK ) . when ( when ) ; }
Source:
private void endCommandActions ( ) { org.ovirt.engine.core.bll.MoveOrCopyDiskCommand.getBackend ( ) . endAction ( getImagesActionType ( ) , org.ovirt.engine.core.bll.MoveOrCopyDiskCommand.getParameters ( ) , org.ovirt.engine.core.bll.MoveOrCopyDiskCommand.getContext ( ) . clone ( ) . withoutCompensationContext ( ) . withoutLock ( ) ) ; org.ovirt.engine.core.bll.MoveOrCopyDiskCommand.setSucceeded ( true ) ; }

Target:
private void endCommandActions ( ) { if ( ! ( org.ovirt.engine.core.bll.MoveOrCopyDiskCommand.getParameters ( ) . getImagesParameters ( ) . isEmpty ( ) ) ) { org.ovirt.engine.core.bll.MoveOrCopyDiskCommand.getBackend ( ) . endAction ( getImagesActionType ( ) , org.ovirt.engine.core.bll.MoveOrCopyDiskCommand.getParameters ( ) . getImagesParameters ( ) . get ( 0 ) , org.ovirt.engine.core.bll.MoveOrCopyDiskCommand.getContext ( ) . clone ( ) . withoutCompensationContext ( ) . withoutLock ( ) ) ; } org.ovirt.engine.core.bll.MoveOrCopyDiskCommand.setSucceeded ( true ) ; }
Source:
public static void getClusterList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > list = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ) ( source ) ) ; java.util.Collections.sort ( list , new org.ovirt.engine.core.common.businessentities.comparators.NameableComparator ( ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVdsGroupsByStoragePoolId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) , aQuery ) ; }

Target:
public static void getDataCenterList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( "DataCenter: sortby name" , org.ovirt.engine.core.common.interfaces.SearchType.StoragePool ) , aQuery ) ; }
Source:
public void createCommand ( ) { org.ovirt.engine.core.common.action.RunVmParams param = new org.ovirt.engine.core.common.action.RunVmParams ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; command = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.RunVmCommand < org.ovirt.engine.core.common.action.RunVmParams > ( param ) ) ; mockVmRunHandler ( ) ; mockSuccessfulRunVmValidator ( ) ; mockSuccessfulSnapshotValidator ( ) ; mockBackend ( ) ; }

Target:
public void createCommand ( ) { org.ovirt.engine.core.common.action.RunVmParams param = new org.ovirt.engine.core.common.action.RunVmParams ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; command = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.RunVmCommand < org.ovirt.engine.core.common.action.RunVmParams > ( param ) ) ; mockIsoDomainListSyncronizer ( ) ; mockVmRunHandler ( ) ; mockSuccessfulRunVmValidator ( ) ; mockSuccessfulSnapshotValidator ( ) ; mockBackend ( ) ; }
Source:
private boolean isActiveCinderDomainAvailable ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > storageDomains = storageDomainDAO.getAllForStoragePool ( getStoragePoolId ( ) ) ; return org.apache.commons.collections.CollectionUtils.exists ( storageDomains , new org.apache.commons.collections.Predicate ( ) { @ java.lang.Override public boolean evaluate ( java.lang.Object o ) { org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain = ( ( org.ovirt.engine.core.common.businessentities.StorageDomain ) ( o ) ) ; return ( storageDomain.getStorageType ( ) . isCinderDomain ( ) ) && ( ( storageDomain.getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageDomainStatus.Active ) ) ; } } ) ; }

Target:
private boolean isActiveStorageDomainAvailable ( final org.ovirt.engine.core.common.businessentities.storage.StorageType storageType ) { java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > storageDomains = storageDomainDAO.getAllForStoragePool ( getStoragePoolId ( ) ) ; return org.apache.commons.collections.CollectionUtils.exists ( storageDomains , new org.apache.commons.collections.Predicate ( ) { @ java.lang.Override public boolean evaluate ( java.lang.Object o ) { org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain = ( ( org.ovirt.engine.core.common.businessentities.StorageDomain ) ( o ) ) ; return ( ( storageDomain.getStorageType ( ) ) == storageType ) && ( ( storageDomain.getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageDomainStatus.Active ) ) ; } } ) ; }
Source:
private void initMinimalVmMemSize ( ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getMinimalVmMemSize ( new org.ovirt.engine.ui.frontend.AsyncQuery ( this , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel vmModel = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel ) ( target ) ) ; vmModel.set_MinMemSize ( ( ( java.lang.Integer ) ( returnValue ) ) ) ; } } , getHash ( ) ) ) ; }

Target:
private void deactivateInstanceTypeManagerAndUpdateFields ( ) { getBehavior ( ) . deactivateInstanceTypeManager ( new org.ovirt.engine.ui.uicommonweb.models.vms.instancetypes.InstanceTypeManager.ActivatedListener ( ) { @ java.lang.Override public void activated ( ) { if ( ( getBehavior ( ) . getInstanceTypeManager ( ) ) != null ) { getBehavior ( ) . getInstanceTypeManager ( ) . updateFields ( ) ; } } } ) ; }
Source:
public static void init ( ) { for ( org.ovirt.engine.core.common.businessentities.StoragePool sp : org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStoragePoolDao ( ) . getAll ( ) ) { if ( ! ( org.ovirt.engine.core.vdsbroker.irsbroker.IrsBrokerCommand._irsProxyData.containsKey ( sp.getId ( ) ) ) ) { org.ovirt.engine.core.vdsbroker.irsbroker.IrsBrokerCommand._irsProxyData.put ( sp.getId ( ) , new org.ovirt.engine.core.vdsbroker.irsbroker.IrsBrokerCommand.IrsProxyData ( sp.getId ( ) ) ) ; } } }

Target:
public static void init ( ) { for ( org.ovirt.engine.core.common.businessentities.StoragePool sp : org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStoragePoolDao ( ) . getAll ( ) ) { if ( ! ( org.ovirt.engine.core.vdsbroker.irsbroker.IrsBrokerCommand._irsProxyData.containsKey ( sp.getId ( ) ) ) ) { org.ovirt.engine.core.vdsbroker.irsbroker.IrsBrokerCommand._irsProxyData.put ( sp.getId ( ) , new org.ovirt.engine.core.vdsbroker.irsbroker.IrsProxyData ( sp.getId ( ) ) ) ; } } }
Source:
void addStyles ( ) { storageTypeListEditor.setLabelStyleName ( style.label ( ) ) ; storageTypeListEditor.addContentWidgetStyleName ( style.storageContentWidget ( ) ) ; formatListEditor.setLabelStyleName ( style.label ( ) ) ; formatListEditor.addContentWidgetStyleName ( style.formatContentWidget ( ) ) ; activateDomainEditor.addContentWidgetStyleName ( style.activateDomainEditor ( ) ) ; advancedParametersExpanderContent.setStyleName ( style.advancedParametersExpanderContent ( ) ) ; }

Target:
void addStyles ( ) { storageTypeListEditor.setLabelStyleName ( style.label ( ) ) ; storageTypeListEditor.addContentWidgetContainerStyleName ( style.storageContentWidget ( ) ) ; formatListEditor.setLabelStyleName ( style.label ( ) ) ; formatListEditor.addContentWidgetContainerStyleName ( style.formatContentWidget ( ) ) ; activateDomainEditor.addContentWidgetContainerStyleName ( style.activateDomainEditor ( ) ) ; advancedParametersExpanderContent.setStyleName ( style.advancedParametersExpanderContent ( ) ) ; }
Source:
void clearPassword ( T loginModel ) { loginModel.getPassword ( ) . setEntity ( null ) ; }

Target:
protected void performLogin ( T loginModel ) { org.ovirt.engine.core.common.users.VdcUser loggedUser = loginModel.getLoggedUser ( ) ; org.ovirt.engine.ui.frontend.Frontend.setLoggedInUser ( loggedUser ) ; beforeUiCommonInitEvent ( loginModel ) ; org.ovirt.engine.ui.common.uicommon.model.UiCommonInitEvent.fire ( eventBus ) ; user.onUserLogin ( loggedUser ) ; loginModel.getPassword ( ) . setEntity ( null ) ; }
Source:
public org.ovirt.engine.api.resource.StatisticsResource getStatisticsResource ( ) { org.ovirt.engine.api.restapi.resource.EntityIdResolver < org.ovirt.engine.core.compat.Guid > resolver = new org.ovirt.engine.api.restapi.resource.QueryIdResolver ( org.ovirt.engine.core.common.queries.VdcQueryType.GetVdsByVdsId , org.ovirt.engine.core.common.queries.IdQueryParameters.class ) ; org.ovirt.engine.api.restapi.resource.HostStatisticalQuery query = new org.ovirt.engine.api.restapi.resource.HostStatisticalQuery ( resolver , newModel ( id ) ) ; return inject ( new org.ovirt.engine.api.restapi.resource.BackendStatisticsResource ( entityType , guid , query ) ) ; }

Target:
public org.ovirt.engine.api.resource.StatisticsResource getStatisticsResource ( ) { org.ovirt.engine.api.restapi.resource.EntityIdResolver < org.ovirt.engine.core.compat.Guid > resolver = new org.ovirt.engine.api.restapi.resource.QueryIdResolver ( org.ovirt.engine.core.common.queries.QueryType.GetVdsByVdsId , org.ovirt.engine.core.common.queries.IdQueryParameters.class ) ; org.ovirt.engine.api.restapi.resource.HostStatisticalQuery query = new org.ovirt.engine.api.restapi.resource.HostStatisticalQuery ( resolver , newModel ( id ) ) ; return inject ( new org.ovirt.engine.api.restapi.resource.BackendStatisticsResource ( entityType , guid , query ) ) ; }
Source:
public org.ovirt.engine.core.common.interfaces.IVdcUser addUserToThreadContext ( java.lang.String sessionId , boolean refresh ) { org.ovirt.engine.core.common.interfaces.IVdcUser vdcUser = org.ovirt.engine.core.utils.ThreadLocalParamsContainer.getVdcUser ( ) ; if ( vdcUser == null ) { if ( ! ( org.apache.commons.lang.StringUtils.isEmpty ( sessionId ) ) ) { vdcUser = getUser ( sessionId , refresh ) ; org.ovirt.engine.core.utils.ThreadLocalParamsContainer.setHttpSessionId ( sessionId ) ; } else { vdcUser = getUser ( refresh ) ; } org.ovirt.engine.core.utils.ThreadLocalParamsContainer.setVdcUser ( vdcUser ) ; } return vdcUser ; }

Target:
public org.ovirt.engine.core.common.users.VdcUser addUserToThreadContext ( java.lang.String sessionId , boolean refresh ) { org.ovirt.engine.core.common.users.VdcUser vdcUser = org.ovirt.engine.core.utils.ThreadLocalParamsContainer.getVdcUser ( ) ; if ( vdcUser == null ) { if ( ! ( org.apache.commons.lang.StringUtils.isEmpty ( sessionId ) ) ) { vdcUser = getUser ( sessionId , refresh ) ; org.ovirt.engine.core.utils.ThreadLocalParamsContainer.setHttpSessionId ( sessionId ) ; } else { vdcUser = getUser ( refresh ) ; } org.ovirt.engine.core.utils.ThreadLocalParamsContainer.setVdcUser ( vdcUser ) ; } return vdcUser ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc hotunplugDisk ( org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcStruct info ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.hotunplugDisk ( info.getInnerMap ( ) ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc hotUnplugNic ( java.util.Map info ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.hotunplugNic ( info ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
public void qosCommitmentMissingBondSpeedMode3 ( ) { org.ovirt.engine.core.bll.network.host.SetupNetworksHelper helper = qosCommitmendMissingBondSpeed ( org.ovirt.engine.core.bll.network.host.SetupNetworksHelperTest.BOND_MODE_3 ) ; validateAndExpectViolation ( helper , EngineMessage.ACTION_TYPE_FAILED_HOST_NETWORK_QOS_OVERCOMMITMENT , org.ovirt.engine.core.bll.network.host.SetupNetworksHelperTest.BOND_NAME ) ; }

Target:
private void mockCalculateBaseNicWhenVlanNicIsPassed ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface baseNic , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface vlanNic ) { org.mockito.Mockito.when ( calculateBaseNic.getBaseNic ( org.mockito.Matchers.eq ( vlanNic ) ) ) . thenReturn ( baseNic ) ; org.mockito.Mockito.when ( calculateBaseNic.getBaseNic ( org.mockito.Matchers.eq ( vlanNic ) , org.mockito.Matchers.any ( java.util.Map.class ) ) ) . thenReturn ( baseNic ) ; }
Source:
public void addStatistics ( org.ovirt.engine.api.model.Nic model , org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface entity ) { model.setStatistics ( new org.ovirt.engine.api.model.Statistics ( ) ) ; org.ovirt.engine.api.restapi.resource.NicStatisticalQuery query = new org.ovirt.engine.api.restapi.resource.NicStatisticalQuery ( newModel ( model.getId ( ) ) ) ; java.util.List < org.ovirt.engine.api.model.Statistic > statistics = query.getStatistics ( entity ) ; for ( org.ovirt.engine.api.model.Statistic statistic : statistics ) { org.ovirt.engine.api.utils.LinkHelper.addLinks ( uriInfo , statistic , query.getParentType ( ) ) ; } model.getStatistics ( ) . getStatistics ( ) . addAll ( statistics ) ; }

Target:
public org.ovirt.engine.api.model.Nics list ( ) { org.ovirt.engine.api.model.Nics nics = new org.ovirt.engine.api.model.Nics ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > entities = getBackendCollection ( VdcQueryType.GetVmInterfacesByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface entity : entities ) { org.ovirt.engine.api.model.Nic nic = populate ( map ( entity ) , entity ) ; nics.getNics ( ) . add ( addLinks ( nic ) ) ; } return nics ; }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < ? extends org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs args ) { boolean isEnabled = bootSequenceModel.getHardDiskOption ( ) . getIsChangable ( ) ; java.lang.String itemName = bootSequenceModel.getHardDiskOption ( ) . getTitle ( ) ; updateItemAvailability ( itemName , isEnabled ) ; }

Target:
public void onChange ( com.google.gwt.event.dom.client.ChangeEvent event ) { int selectedIndex = bootSequenceBox.getSelectedIndex ( ) ; bootSequenceModel.setSelectedItem ( bootSequenceModel.getItems ( ) . get ( selectedIndex ) ) ; bootSequenceUpButton.setEnabled ( bootSequenceModel.getMoveItemUpCommand ( ) . getIsExecutionAllowed ( ) ) ; bootSequenceDownButton.setEnabled ( bootSequenceModel.getMoveItemDownCommand ( ) . getIsExecutionAllowed ( ) ) ; localizeBootSequenceButtons ( ) ; }
Source:
public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; }

Target:
public java.util.List < org.ovirt.engine.core.common.businessentities.Provider > Convert ( java.lang.Object returnValue , org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery ) { if ( returnValue == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Provider > ( ) ; } java.util.List < org.ovirt.engine.core.common.businessentities.Provider > providers = org.ovirt.engine.ui.uicommonweb.Linq.toList ( org.ovirt.engine.ui.uicommonweb.Linq.filterProvidersByProvidedType ( ( ( java.lang.Iterable < org.ovirt.engine.core.common.businessentities.Provider > ) ( returnValue ) ) , providedEntity ) ) ; java.util.Collections.sort ( providers , new org.ovirt.engine.core.common.businessentities.comparators.NameableComparator ( ) ) ; return providers ; }
Source:
public void testQuotaClusterByQuotaGuidWithGeneralDefaultNoDefault ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.QuotaCluster > quotaClusterList = dao.getQuotaClusterByQuotaGuidWithGeneralDefault ( FixturesTool.QUOTA_SPECIFIC ) ; org.junit.Assert.assertNotNull ( quotaClusterList ) ; org.junit.Assert.assertEquals ( "wrong number of quotas returned" , 2 , quotaClusterList.size ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.QuotaCluster group : quotaClusterList ) { org.junit.Assert.assertNotNull ( "VDS ID should not be null in specific mode" , group.getClusterId ( ) ) ; org.junit.Assert.assertNotNull ( "VDS name should not be null in specific mode" , group.getClusterName ( ) ) ; } }

Target:
public void testQuotaClusterByQuotaGuidWithGeneralDefaultNoDefault ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.QuotaCluster > quotaClusterList = dao.getQuotaClusterByQuotaGuidWithGeneralDefault ( FixturesTool.QUOTA_SPECIFIC ) ; org.junit.jupiter.api.Assertions.assertNotNull ( quotaClusterList ) ; org.junit.jupiter.api.Assertions.assertEquals ( 2 , quotaClusterList.size ( ) , "wrong number of quotas returned" ) ; for ( org.ovirt.engine.core.common.businessentities.QuotaCluster group : quotaClusterList ) { org.junit.jupiter.api.Assertions.assertNotNull ( group.getClusterId ( ) , "VDS ID should not be null in specific mode" ) ; org.junit.jupiter.api.Assertions.assertNotNull ( group.getClusterName ( ) , "VDS name should not be null in specific mode" ) ; } }
Source:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.Disk > disks = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.Disk > ) ( returnValue ) ) ; if ( ! ( org.ovirt.engine.ui.uicommonweb.Linq.filterDisksByStorageType ( disks , Disk.DiskStorageType.LUN ) . isEmpty ( ) ) ) { setMessage ( org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getConstants ( ) . cloneVmLunsWontBeCloned ( ) ) ; } }

Target:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.Disk > disks = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.Disk > ) ( returnValue ) ) ; if ( ! ( org.ovirt.engine.ui.uicommonweb.Linq.filterDisksByStorageType ( disks , DiskStorageType.LUN ) . isEmpty ( ) ) ) { setMessage ( org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getConstants ( ) . cloneVmLunsWontBeCloned ( ) ) ; } }
Source:
private void initializeObjectState ( ) { org.ovirt.engine.core.common.businessentities.Snapshot snapshot = getSnapshotDao ( ) . get ( org.ovirt.engine.core.bll.RemoveSnapshotCommand.getParameters ( ) . getSnapshotId ( ) ) ; if ( snapshot != null ) { setSnapshotName ( snapshot.getDescription ( ) ) ; } }

Target:
private void initializeObjectState ( ) { if ( org.apache.commons.lang.StringUtils.isEmpty ( org.ovirt.engine.core.bll.RemoveSnapshotCommand.getSnapshotName ( ) ) ) { org.ovirt.engine.core.common.businessentities.Snapshot snapshot = getSnapshotDao ( ) . get ( org.ovirt.engine.core.bll.RemoveSnapshotCommand.getParameters ( ) . getSnapshotId ( ) ) ; if ( snapshot != null ) { setSnapshotName ( snapshot.getDescription ( ) ) ; } } }
Source:
public void validateEnoughSpace ( ) { initializeCommand ( new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ) ; initVmForSpace ( ) ; initVmDiskImage ( false ) ; initSrcStorageDomain ( ) ; initDestStorageDomain ( StorageType.NFS ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateSuccess ( command ) ; }

Target:
public void successVmInPreviewForAttachedSnapshot ( ) { initializeCommand ( new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) , VmEntityType.VM ) ; initVmForSpace ( ) ; initSrcStorageDomain ( ) ; initDestStorageDomain ( StorageType.NFS ) ; vmDevice.setSnapshotId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateSuccess ( command ) ; }
Source:
public java.lang.String renderNullSafe ( java.lang.Integer object ) { return ( object.toString ( ) ) + "%" ; }

Target:
public java.lang.String renderNullSafe ( java.lang.Integer object ) { if ( object == null ) { return "" ; } com.google.gwt.text.client.NumberFormatRenderer renderer = new com.google.gwt.text.client.NumberFormatRenderer ( com.google.gwt.i18n.client.NumberFormat.getPercentFormat ( ) ) ; return renderer.render ( ( ( object.doubleValue ( ) ) / 100 ) ) ; }
Source:
public int compare ( org.ovirt.engine.core.common.businessentities.VM o1 , org.ovirt.engine.core.common.businessentities.VM o2 ) { java.lang.String name1 = ( ( o1.getvm_name ( ) ) == null ) ? "" : o1.getvm_name ( ) ; java.lang.String name2 = ( ( o2.getvm_name ( ) ) == null ) ? "" : o2.getvm_name ( ) ; return name1.compareTo ( name2 ) ; }

Target:
public int compare ( org.ovirt.engine.core.common.businessentities.VM o1 , org.ovirt.engine.core.common.businessentities.VM o2 ) { java.lang.String name1 = ( ( o1.getVmName ( ) ) == null ) ? "" : o1.getVmName ( ) ; java.lang.String name2 = ( ( o2.getVmName ( ) ) == null ) ? "" : o2.getVmName ( ) ; return name1.compareTo ( name2 ) ; }
Source:
protected < T > T getConfigurationValue ( java.lang.Class < T > clz , org.ovirt.engine.core.common.queries.ConfigurationValues config , final org.ovirt.engine.api.model.Version version ) { return getEntity ( clz , VdcQueryType.GetConfigurationValue , new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( config ) { { setVersion ( asString ( version ) ) ; } } , config.toString ( ) ) ; }

Target:
protected < T > T getConfigurationValue ( java.lang.Class < T > clz , org.ovirt.engine.core.common.queries.ConfigurationValues config , final org.ovirt.engine.api.model.Version version ) { return getEntity ( clz , VdcQueryType.GetConfigurationValue , new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( config ) { { setVersion ( org.ovirt.engine.api.restapi.resource.BackendResource.asString ( version ) ) ; } } , config.toString ( ) ) ; }
Source:
public void getVdsGroupWithVds ( ) { final org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase b = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.TestAuditLogableBase ( ) ; final org.ovirt.engine.core.common.businessentities.VDS v = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; v.setvds_group_id ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID ) ; b.setVds ( v ) ; final org.ovirt.engine.core.common.businessentities.VDSGroup g = b.getVdsGroup ( ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID , g.getId ( ) ) ; }

Target:
public void getVdsGroupWithVds ( ) { final org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase b = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.TestAuditLogableBase ( ) ; final org.ovirt.engine.core.common.businessentities.VDS v = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; v.setVdsGroupId ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID ) ; b.setVds ( v ) ; final org.ovirt.engine.core.common.businessentities.VDSGroup g = b.getVdsGroup ( ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID , g.getId ( ) ) ; }
Source:
protected void performLogin ( T loginModel ) { org.ovirt.engine.core.common.businessentities.aaa.DbUser loggedUser = loginModel.getLoggedUser ( ) ; java.lang.String loginPassword = loginModel.getPassword ( ) . getEntity ( ) ; frontend.initLoggedInUser ( loggedUser , loginPassword ) ; beforeUiCommonInitEvent ( loginModel ) ; org.ovirt.engine.ui.common.uicommon.model.UiCommonInitEvent.fire ( eventBus ) ; user.onUserLogin ( loggedUser ) ; loginModel.getPassword ( ) . setEntity ( null ) ; }

Target:
protected void performLogin ( T loginModel ) { org.ovirt.engine.core.common.businessentities.aaa.DbUser loggedUser = loginModel.getLoggedUser ( ) ; java.lang.String loginPassword = loginModel.getPassword ( ) . getEntity ( ) ; beforeLogin ( loginModel ) ; frontend.initLoggedInUser ( loggedUser , loginPassword ) ; user.onUserLogin ( loggedUser ) ; loginModel.getPassword ( ) . setEntity ( null ) ; }
Source:
public void testConflictedUpdate ( ) throws java.lang.Exception { setUpGetEntityExpectations ( 0 ) ; setUpGetEntityExpectations ( 0 ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; org.ovirt.engine.api.model.Tag model = org.ovirt.engine.api.restapi.resource.BackendTagsResourceTest.getModel ( 1 , false ) ; model.setId ( org.ovirt.engine.api.restapi.resource.BackendTagResourceTest.NEW_PARENT_ID.toString ( ) ) ; try { resource.update ( model ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyImmutabilityConstraint ( wae ) ; } }

Target:
public void testConflictedUpdate ( ) throws java.lang.Exception { setUpGetEntityExpectations ( 0 ) ; setUpGetEntityExpectations ( 0 ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; org.ovirt.engine.api.model.Tag model = org.ovirt.engine.api.restapi.resource.BackendTagsResourceTest.getModel ( 1 , false ) ; model.setId ( org.ovirt.engine.api.restapi.resource.BackendTagResourceTest.NEW_PARENT_ID.toString ( ) ) ; try { resource.update ( model ) ; org.junit.Assert.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyImmutabilityConstraint ( wae ) ; } }
Source:
public void rerun ( ) { org.ovirt.engine.core.bll.MigrateVmCommand.setVm ( null ) ; determineMigrationFailureForAuditLog ( ) ; if ( ( ( org.ovirt.engine.core.bll.MigrateVmCommand.getVm ( ) ) != null ) && ( ( org.ovirt.engine.core.bll.MigrateVmCommand.getVm ( ) . getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.Up ) ) ) { setVdsDestinationId ( null ) ; super . rerun ( ) ; } else { decreasePendingVms ( getDestinationVds ( ) . getId ( ) ) ; _isRerun = true ; org.ovirt.engine.core.bll.MigrateVmCommand.setSucceeded ( false ) ; org.ovirt.engine.core.bll.MigrateVmCommand.log ( ) ; failedToRunVm ( ) ; } }

Target:
public void rerun ( ) { org.ovirt.engine.core.bll.MigrateVmCommand.setVm ( null ) ; if ( ( ( org.ovirt.engine.core.bll.MigrateVmCommand.getVm ( ) ) != null ) && ( ( org.ovirt.engine.core.bll.MigrateVmCommand.getVm ( ) . getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.Up ) ) ) { determineMigrationFailureForAuditLog ( ) ; setVdsDestinationId ( null ) ; super . rerun ( ) ; } else { failedToMigrate ( ) ; _isRerun = true ; } }
Source:
public void getClusterGlusterServices ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.core.common.queries.gluster.GlusterVolumeAdvancedDetailsParameters parameters = new org.ovirt.engine.core.common.queries.gluster.GlusterVolumeAdvancedDetailsParameters ( clusterId , null , null , false ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterVolumeAdvancedDetails , parameters , aQuery ) ; }

Target:
public void getEngineSshPublicKey ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetEngineSSHPublicKey , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }