auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private boolean devicePluggable ( org.ovirt.engine.core.common.businessentities.VmDevice device ) { return ( org.ovirt.engine.core.common.utils.VmDeviceCommonUtils.isDisk ( device ) ) || ( ( VmDeviceType.BRIDGE.getName ( ) . equals ( device.getDevice ( ) ) ) && ( ( org.ovirt.engine.core.common.businessentities.VmDeviceGeneralType.INTERFACE ) == ( device.getType ( ) ) ) ) ; }

Target:
private boolean devicePluggable ( org.ovirt.engine.core.common.businessentities.VmDevice device ) { return ( org.ovirt.engine.core.common.utils.VmDeviceCommonUtils.isDisk ( device ) ) || ( org.ovirt.engine.core.common.utils.VmDeviceCommonUtils.isBridge ( device ) ) ; }
Source:
public javax.ws.rs.core.Response remove ( ) { get ( ) ; org.ovirt.engine.core.common.action.FenceAgentCommandParameterBase params = new org.ovirt.engine.core.common.action.FenceAgentCommandParameterBase ( ) ; org.ovirt.engine.core.common.businessentities.pm.FenceAgent agent = new org.ovirt.engine.core.common.businessentities.pm.FenceAgent ( ) ; agent.setId ( guid ) ; params.setAgent ( agent ) ; return performAction ( ActionType.RemoveFenceAgent , params ) ; }

Target:
public javax.ws.rs.core.Response remove ( ) { get ( ) ; org.ovirt.engine.core.common.action.FenceAgentCommandParameterBase params = new org.ovirt.engine.core.common.action.FenceAgentCommandParameterBase ( ) ; org.ovirt.engine.core.common.businessentities.pm.FenceAgent agent = new org.ovirt.engine.core.common.businessentities.pm.FenceAgent ( ) ; agent.setHostId ( hostId ) ; agent.setId ( guid ) ; params.setAgent ( agent ) ; return performAction ( ActionType.RemoveFenceAgent , params ) ; }
Source:
public void getPermissionsByAdElementId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid userId ) { 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.util.ArrayList < org.ovirt.engine.core.common.businessentities.Permissions > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Permissions > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetPermissionsByAdElementId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( userId ) , aQuery ) ; }

Target:
public void getRpmVersion ( 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.core.common.queries.GetConfigurationValueParameters tempVar = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.ProductRPMVersion ) ; tempVar.setVersion ( getDefaultConfigurationVersion ( ) ) ; getConfigFromCache ( tempVar , aQuery ) ; }
Source:
public void getAllTemplatesFromExportDomain ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.compat.Guid storageDomainId ) { 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 ? source : new java.util.HashMap < org.ovirt.engine.core.common.businessentities.VmTemplate , java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.DiskImage > > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetAllFromExportDomainQueryParameters getAllFromExportDomainQueryParamenters = new org.ovirt.engine.core.common.queries.GetAllFromExportDomainQueryParameters ( storagePoolId , storageDomainId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetTemplatesFromExportDomain , getAllFromExportDomainQueryParamenters , aQuery ) ; }

Target:
public void getoVirtISOsList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { 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 ? new java.util.ArrayList < org.ovirt.engine.core.compat.RpmVersion > ( ( ( java.util.ArrayList < org.ovirt.engine.core.compat.RpmVersion > ) ( source ) ) ) : new java.util.ArrayList < org.ovirt.engine.core.compat.RpmVersion > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetoVirtISOs , new org.ovirt.engine.core.common.queries.VdsIdParametersBase ( id ) , aQuery ) ; }
Source:
public void canDoActionNotEnoughSpace ( ) throws java.lang.Exception { initializeCommand ( ImageOperation.Move ) ; initVmForSpace ( ) ; initVmDiskImage ( ) ; initSrcStorageDomain ( ) ; initDestStorageDomain ( ) ; org.mockito.Mockito.doReturn ( org.ovirt.engine.core.bll.MoveOrCopyDiskCommandTest.mockStorageDomainValidatorWithoutSpace ( ) ) . when ( command ) . createStorageDomainValidator ( ) ; org.mockito.Mockito.doReturn ( new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ( ) ) . when ( command ) . getAllImageSnapshots ( ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( command , VdcBllMessages.ACTION_TYPE_FAILED_DISK_SPACE_LOW_ON_STORAGE_DOMAIN ) ; }

Target:
public void canDoActionNotEnoughSpace ( ) throws java.lang.Exception { initializeCommand ( ImageOperation.Move ) ; initVmForSpace ( ) ; initVmDiskImage ( false ) ; initSrcStorageDomain ( ) ; initDestStorageDomain ( StorageType.NFS ) ; org.mockito.Mockito.doReturn ( org.ovirt.engine.core.bll.MoveOrCopyDiskCommandTest.mockStorageDomainValidatorWithoutSpace ( ) ) . when ( command ) . createStorageDomainValidator ( ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( command , VdcBllMessages.ACTION_TYPE_FAILED_DISK_SPACE_LOW_ON_STORAGE_DOMAIN ) ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult networkNameNotUsed ( ) { for ( org.ovirt.engine.core.common.businessentities.network.Network otherNetwork : getNetworks ( ) ) { if ( ( otherNetwork.getName ( ) . equals ( network.getName ( ) ) ) && ( ! ( otherNetwork.getId ( ) . equals ( network.getId ( ) ) ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.ACTION_TYPE_FAILED_NETWORK_NAME_IN_USE , getNetworkNameReplacement ( ) ) ; } } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult networkNameNotUsed ( ) { for ( org.ovirt.engine.core.common.businessentities.network.Network otherNetwork : getNetworks ( ) ) { if ( ( otherNetwork.getName ( ) . equals ( network.getName ( ) ) ) && ( ! ( otherNetwork.getId ( ) . equals ( network.getId ( ) ) ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_NETWORK_NAME_IN_USE , getNetworkNameReplacement ( ) ) ; } } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }
Source:
protected org.ovirt.engine.core.bll.ValidationResult profileNotUsed ( java.util.List < ? extends org.ovirt.engine.core.common.businessentities.Nameable > entities , org.ovirt.engine.core.common.errors.VdcBllMessages entitiesReplacement ) { if ( entities.isEmpty ( ) ) { return org.ovirt.engine.core.bll.ValidationResult.VALID ; } java.util.Collection < java.lang.String > replacements = org.ovirt.engine.core.utils.ReplacementUtils.replaceWithNameable ( "ENTITIES_USING_PROFILE" , entities ) ; replacements.add ( entitiesReplacement.name ( ) ) ; return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.ACTION_TYPE_FAILED_PROFILE_IN_USE , replacements ) ; }

Target:
protected org.ovirt.engine.core.bll.ValidationResult profileNotUsed ( java.util.List < ? extends org.ovirt.engine.core.common.businessentities.Nameable > entities , org.ovirt.engine.core.common.errors.EngineMessage entitiesReplacement ) { if ( entities.isEmpty ( ) ) { return org.ovirt.engine.core.bll.ValidationResult.VALID ; } java.util.Collection < java.lang.String > replacements = org.ovirt.engine.core.utils.ReplacementUtils.replaceWithNameable ( "ENTITIES_USING_PROFILE" , entities ) ; replacements.add ( entitiesReplacement.name ( ) ) ; return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_PROFILE_IN_USE , replacements ) ; }
Source:
private void doTestBadRemove ( boolean valid , boolean success , java.lang.String detail ) throws java.lang.Exception { setUpGetTagExpectations ( true ) ; setUriInfo ( setUpActionExpectations ( ActionType.DetachUserFromTag , org.ovirt.engine.core.common.action.AttachEntityToTagParameters.class , new java.lang.String [ ] { "TagId" , "EntitiesId" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendUserTagResourceTest.TAG_ID , asList ( org.ovirt.engine.api.restapi.resource.BackendUserTagResourceTest.USER_ID ) } , valid , success ) ) ; try { resource.remove ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }

Target:
private void doTestBadRemove ( boolean valid , boolean success , java.lang.String detail ) throws java.lang.Exception { setUpGetTagExpectations ( true ) ; setUriInfo ( setUpActionExpectations ( ActionType.DetachUserFromTag , org.ovirt.engine.core.common.action.AttachEntityToTagParameters.class , new java.lang.String [ ] { "TagId" , "EntitiesId" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendUserTagResourceTest.TAG_ID , asList ( org.ovirt.engine.api.restapi.resource.BackendUserTagResourceTest.USER_ID ) } , valid , success ) ) ; try { resource.remove ( ) ; org.junit.Assert.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }
Source:
public void getAuthzGroupsByUserId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid userId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter < java.util.List < org.ovirt.engine.core.common.businessentities.aaa.AuthzGroup > > ( ) { @ java.lang.Override 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 ) ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAuthzGroupsByUserId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( userId ) , aQuery ) ; }

Target:
public void getClusterListByName ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String name ) { 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.Cluster > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( ( ( "Cluster: name=" + name ) + " sortby name" ) , org.ovirt.engine.core.common.interfaces.SearchType.Cluster ) , aQuery ) ; }
Source:
private void removeVmStatlessImages ( ) { org.ovirt.engine.core.bll.VmPoolHandler.processVmPoolOnStopVm ( org.ovirt.engine.core.bll.RunVmCommand.getVm ( ) . getId ( ) , new org.ovirt.engine.core.bll.context.CommandContext ( org.ovirt.engine.core.bll.RunVmCommand.getExecutionContext ( ) , org.ovirt.engine.core.bll.RunVmCommand.getLock ( ) ) ) ; org.ovirt.engine.core.bll.RunVmCommand.setLock ( null ) ; org.ovirt.engine.core.bll.RunVmCommand.setSucceeded ( true ) ; }

Target:
private void removeVmStatlessImages ( ) { runInternalAction ( VdcActionType.ProcessDownVm , new org.ovirt.engine.core.common.action.IdParameters ( org.ovirt.engine.core.bll.RunVmCommand.getVm ( ) . getId ( ) ) , org.ovirt.engine.core.bll.job.ExecutionHandler.createDefaultContextForTasks ( org.ovirt.engine.core.bll.RunVmCommand.getContext ( ) , org.ovirt.engine.core.bll.RunVmCommand.getLock ( ) ) ) ; org.ovirt.engine.core.bll.RunVmCommand.setLock ( null ) ; org.ovirt.engine.core.bll.RunVmCommand.setSucceeded ( true ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.VM createVmForTesting ( java.lang.String initrd , java.lang.String kernel ) { mockVm ( command ) ; org.ovirt.engine.core.common.action.RunVmParams runVmParams = command.getParameters ( ) ; runVmParams.setinitrd_url ( initrd ) ; runVmParams.setkernel_url ( kernel ) ; command.CreateVm ( ) ; org.ovirt.engine.core.common.businessentities.VM vm = vmDAO.get ( command.getParameters ( ) . getVmId ( ) ) ; return vm ; }

Target:
private org.ovirt.engine.core.common.businessentities.VM createVmForTesting ( java.lang.String initrd , java.lang.String kernel ) { mockVm ( command ) ; org.ovirt.engine.core.common.action.RunVmParams runVmParams = command.getParameters ( ) ; runVmParams.setinitrd_url ( initrd ) ; runVmParams.setkernel_url ( kernel ) ; command.createVm ( ) ; org.ovirt.engine.core.common.businessentities.VM vm = vmDAO.get ( command.getParameters ( ) . getVmId ( ) ) ; return vm ; }
Source:
public void getStorageConnectionById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String id , boolean isRefresh ) { 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 ? ( ( org.ovirt.engine.core.common.businessentities.StorageServerConnections ) ( source ) ) : null ; } } ; org.ovirt.engine.core.common.queries.StorageServerConnectionQueryParametersBase params = new org.ovirt.engine.core.common.queries.StorageServerConnectionQueryParametersBase ( id ) ; params.setRefresh ( isRefresh ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageServerConnectionById , params , aQuery ) ; }

Target:
public void getRoleActionGroupsByRoleId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid roleId ) { 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.util.ArrayList < org.ovirt.engine.core.common.businessentities.ActionGroup > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ActionGroup > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetRoleActionGroupsByRoleId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( roleId ) , aQuery ) ; }
Source:
public void testValidateCompletion ( ) { org.ovirt.engine.core.searchbackend.IAutoCompleter comp = new org.ovirt.engine.core.searchbackend.BitValueAutoCompleter ( ) ; assertTrue ( "TRUE" , comp.validateCompletion ( "TRUE" ) ) ; assertTrue ( "TR" , comp.validateCompletion ( "TR" ) ) ; assertFalse ( "JarJar" , comp.validateCompletion ( "JarJar" ) ) ; }

Target:
public void testValidateCompletion ( ) { org.ovirt.engine.core.searchbackend.IAutoCompleter comp = new org.ovirt.engine.core.searchbackend.BitValueAutoCompleter ( ) ; org.junit.Assert.assertTrue ( "TRUE" , comp.validateCompletion ( "TRUE" ) ) ; org.junit.Assert.assertTrue ( "TR" , comp.validateCompletion ( "TR" ) ) ; org.junit.Assert.assertFalse ( "JarJar" , comp.validateCompletion ( "JarJar" ) ) ; }
Source:
public void testGetDiskSnapshotForVmSnapshot ( ) { org.ovirt.engine.core.common.businessentities.DiskImage result = dao.getDiskSnapshotForVmSnapshot ( FixturesTool.IMAGE_GROUP_ID , FixturesTool.EXISTING_SNAPSHOT_ID ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertEquals ( FixturesTool.IMAGE_GROUP_ID , result.getId ( ) ) ; org.junit.Assert.assertEquals ( FixturesTool.EXISTING_SNAPSHOT_ID , result.getVmSnapshotId ( ) ) ; }

Target:
public void testGetDiskSnapshotForVmSnapshot ( ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage result = dao.getDiskSnapshotForVmSnapshot ( FixturesTool.IMAGE_GROUP_ID , FixturesTool.EXISTING_SNAPSHOT_ID ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertEquals ( FixturesTool.IMAGE_GROUP_ID , result.getId ( ) ) ; org.junit.Assert.assertEquals ( FixturesTool.EXISTING_SNAPSHOT_ID , result.getVmSnapshotId ( ) ) ; }
Source:
void initComboBox ( ) { sysPrepDomainNameListBoxEditor = new org.ovirt.engine.ui.common.widget.editor.ListModelListBoxEditor < java.lang.Object > ( ) ; sysPrepDomainNameTextBoxEditor = new org.ovirt.engine.ui.common.widget.editor.EntityModelTextBoxEditor ( ) ; sysPrepDomainNameComboBox = new org.ovirt.engine.ui.common.widget.ComboBox ( sysPrepDomainNameListBoxEditor , sysPrepDomainNameTextBoxEditor ) ; defaultHostEditor = new org.ovirt.engine.ui.common.widget.editor.ListModelListBoxEditor < java.lang.Object > ( new org.ovirt.engine.ui.common.widget.renderer.NullSafeRenderer < java.lang.Object > ( ) { @ java.lang.Override public java.lang.String renderNullSafe ( java.lang.Object object ) { return ( ( org.ovirt.engine.core.common.businessentities.VDS ) ( object ) ) . getName ( ) ; } } ) ; }

Target:
public void onChange ( com.google.gwt.event.dom.client.ChangeEvent event ) { runOnceModel.sysPrepListBoxChanged ( ) ; }
Source:
public static org.ovirt.engine.api.model.Sessions map ( org.ovirt.engine.api.model.VM vm , org.ovirt.engine.api.model.Sessions sessions ) { if ( sessions == null ) { sessions = new org.ovirt.engine.api.model.Sessions ( ) ; } org.ovirt.engine.api.restapi.types.VmMapper.mapConsoleSession ( vm , sessions ) ; org.ovirt.engine.api.restapi.types.VmMapper.mapGuestSessions ( vm , sessions ) ; return sessions ; }

Target:
public static org.ovirt.engine.api.model.Sessions map ( org.ovirt.engine.api.restapi.types.VM vm , org.ovirt.engine.api.model.Sessions sessions ) { if ( sessions == null ) { sessions = new org.ovirt.engine.api.model.Sessions ( ) ; } org.ovirt.engine.api.restapi.types.VmMapper.mapConsoleSession ( vm , sessions ) ; org.ovirt.engine.api.restapi.types.VmMapper.mapGuestSessions ( vm , sessions ) ; return sessions ; }
Source:
public java.lang.Object runInTransaction ( ) { getCompensationContext ( ) . snapshotEntityStatus ( getStoragePool ( ) , getStoragePool ( ) . getstatus ( ) ) ; getStoragePool ( ) . setstatus ( StoragePoolStatus.Maintanance ) ; getStoragePoolDAO ( ) . updateStatus ( getStoragePool ( ) . getId ( ) , getStoragePool ( ) . getstatus ( ) ) ; getCompensationContext ( ) . stateChanged ( ) ; return null ; }

Target:
public java.lang.Object runInTransaction ( ) { getCompensationContext ( ) . snapshotEntityStatus ( getStoragePool ( ) , getStoragePool ( ) . getstatus ( ) ) ; getStoragePool ( ) . setstatus ( StoragePoolStatus.Maintenance ) ; getStoragePoolDAO ( ) . updateStatus ( getStoragePool ( ) . getId ( ) , getStoragePool ( ) . getstatus ( ) ) ; getCompensationContext ( ) . stateChanged ( ) ; return null ; }
Source:
private void _setNode ( ) { _isNode = true ; _vds.setvds_type ( VDSType.oVirtNode ) ; org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInNewTransaction ( new org.ovirt.engine.core.utils.transaction.TransactionMethod < java.lang.Void > ( ) { @ java.lang.Override public java.lang.Void runInTransaction ( ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVdsStaticDao ( ) . update ( _vds.getStaticData ( ) ) ; return null ; } } ) ; }

Target:
private void _setNode ( ) { _isNode = true ; _vds.setVdsType ( VDSType.oVirtNode ) ; org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInNewTransaction ( new org.ovirt.engine.core.utils.transaction.TransactionMethod < java.lang.Void > ( ) { @ java.lang.Override public java.lang.Void runInTransaction ( ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVdsStaticDao ( ) . update ( _vds.getStaticData ( ) ) ; return null ; } } ) ; }
Source:
public void getIrsImageList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , boolean forceRefresh , org.ovirt.engine.core.common.businessentities.storage.ImageFileType imageFileType ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.RepoImageToImageFileNameAsyncConverter ( ) ; org.ovirt.engine.core.common.queries.GetImagesListByStoragePoolIdParameters parameters = new org.ovirt.engine.core.common.queries.GetImagesListByStoragePoolIdParameters ( storagePoolId , imageFileType ) ; parameters.setForceRefresh ( forceRefresh ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetImagesListByStoragePoolId , parameters , aQuery ) ; }

Target:
private void getIrsImageList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , boolean forceRefresh , org.ovirt.engine.core.common.businessentities.storage.ImageFileType imageFileType , org.ovirt.engine.ui.frontend.IAsyncConverter converterCallBack ) { aQuery.converterCallback = converterCallBack ; org.ovirt.engine.core.common.queries.GetImagesListByStoragePoolIdParameters parameters = new org.ovirt.engine.core.common.queries.GetImagesListByStoragePoolIdParameters ( storagePoolId , imageFileType ) ; parameters.setForceRefresh ( forceRefresh ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetImagesListByStoragePoolId , parameters , aQuery ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.configure.scheduling.ClusterPolicyClusterListModel clusterPolicyClusterListModel = ( ( org.ovirt.engine.ui.uicommonweb.models.configure.scheduling.ClusterPolicyClusterListModel ) ( model ) ) ; clusterPolicyClusterListModel.setItems ( ( ( java.lang.Iterable ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ) ) ) ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.configure.scheduling.ClusterPolicyClusterListModel clusterPolicyClusterListModel = ( ( org.ovirt.engine.ui.uicommonweb.models.configure.scheduling.ClusterPolicyClusterListModel ) ( model ) ) ; clusterPolicyClusterListModel.setItems ( ( ( java.util.Collection ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ) ) ) ; }
Source:
public void validateSameSourceAndDest ( ) { destStorageId = srcStorageId ; initializeCommand ( new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ) ; command.getParameters ( ) . setStorageDomainId ( destStorageId ) ; command.setStorageDomainId ( destStorageId ) ; initVmDiskImage ( false ) ; mockGetVmsListForDisk ( ) ; initSrcStorageDomain ( ) ; org.junit.Assert.assertFalse ( command.validate ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getValidationMessages ( ) . contains ( EngineMessage.ACTION_TYPE_FAILED_SOURCE_AND_TARGET_SAME.toString ( ) ) ) ; }

Target:
public void validateVmIsNotDown ( ) { initializeCommand ( new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ) ; initVmDiskImage ( false ) ; mockGetVmsListForDisk ( ) ; initSrcStorageDomain ( ) ; initDestStorageDomain ( StorageType.NFS ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( command , EngineMessage.ACTION_TYPE_FAILED_VM_IS_NOT_DOWN ) ; }
Source:
public void canDoActionWrongStorage ( ) { org.ovirt.engine.core.common.businessentities.StorageDomainStatic nfsStatic = createStorageDomain ( ) ; nfsStatic.setStorageType ( StorageType.NFS ) ; org.ovirt.engine.core.common.businessentities.StorageDomain sd = new org.ovirt.engine.core.common.businessentities.StorageDomain ( ) ; sd.setStorageStaticData ( nfsStatic ) ; sd.setStatus ( StorageDomainStatus.Active ) ; sd.setStoragePoolId ( spId ) ; org.mockito.Mockito.doReturn ( sd ) . when ( cmd ) . getStorageDomain ( ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( cmd , VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_DOMAIN_TYPE_ILLEGAL ) ; }

Target:
public void canDoActionWrongStorage ( ) { org.ovirt.engine.core.common.businessentities.StorageDomainStatic nfsStatic = createStorageDomain ( ) ; nfsStatic.setStorageType ( StorageType.NFS ) ; org.ovirt.engine.core.common.businessentities.StorageDomain sd = new org.ovirt.engine.core.common.businessentities.StorageDomain ( ) ; sd.setStorageStaticData ( nfsStatic ) ; sd.setStatus ( StorageDomainStatus.Active ) ; sd.setStoragePoolId ( spId ) ; org.mockito.Mockito.doReturn ( sd ) . when ( cmd ) . getStorageDomain ( ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( cmd , EngineMessage.ACTION_TYPE_FAILED_STORAGE_DOMAIN_TYPE_ILLEGAL ) ; }
Source:
public static void isAnyHostUpInCluster ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String clusterName ) { 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.List ) ( source ) ) . size ( ) ) > 0 ) ) { return true ; } return false ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getUpHostListByCluster ( aQuery , clusterName , 1 ) ; }

Target:
public static void getHostPublicKey ( 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.GetServerSSHPublicKey , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeTaskStatusForHost getStatusForNode ( java.util.Map < java.lang.String , java.lang.Object > nodeStatus ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeTaskStatusForHost rebalanceStatusForHost = new org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeTaskStatusForHost ( ) ; rebalanceStatusForHost.setHostName ( ( nodeStatus.containsKey ( org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeTaskReturnForXmlRpc.HOST_NAME ) ? ( ( java.lang.String ) ( nodeStatus.get ( org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeTaskReturnForXmlRpc.HOST_NAME ) ) ) : null ) ) ; rebalanceStatusForHost.setHostUuid ( ( nodeStatus.containsKey ( org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeTaskReturnForXmlRpc.HOST_UUID ) ? new org.ovirt.engine.core.compat.Guid ( ( ( java.lang.String ) ( nodeStatus.get ( org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeTaskReturnForXmlRpc.HOST_UUID ) ) ) ) : null ) ) ; populateGlusterVolumeTaskStatusDetail ( rebalanceStatusForHost , nodeStatus ) ; return rebalanceStatusForHost ; }

Target:
private org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeTaskStatusForHost getStatusForNode ( java.util.Map < java.lang.String , java.lang.Object > nodeStatus ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeTaskStatusForHost rebalanceStatusForHost = new org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeTaskStatusForHost ( ) ; rebalanceStatusForHost.setHostName ( ( nodeStatus.containsKey ( org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeTaskReturn.HOST_NAME ) ? ( ( java.lang.String ) ( nodeStatus.get ( org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeTaskReturn.HOST_NAME ) ) ) : null ) ) ; rebalanceStatusForHost.setHostUuid ( ( nodeStatus.containsKey ( org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeTaskReturn.HOST_UUID ) ? new org.ovirt.engine.core.compat.Guid ( ( ( java.lang.String ) ( nodeStatus.get ( org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeTaskReturn.HOST_UUID ) ) ) ) : null ) ) ; populateGlusterVolumeTaskStatusDetail ( rebalanceStatusForHost , nodeStatus ) ; return rebalanceStatusForHost ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult vmNotRunningStateless ( ) { if ( org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getSnapshotDao ( ) . exists ( vm.getId ( ) , SnapshotType.STATELESS ) ) { org.ovirt.engine.core.dal.VdcBllMessages message = ( vm.isStatusUp ( ) ) ? org.ovirt.engine.core.dal.VdcBllMessages.ACTION_TYPE_FAILED_VM_RUNNING_STATELESS : org.ovirt.engine.core.dal.VdcBllMessages.ACTION_TYPE_FAILED_VM_HAS_STATELESS_SNAPSHOT_LEFTOVER ; return new org.ovirt.engine.core.bll.ValidationResult ( message ) ; } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult vmNotRunningStateless ( ) { if ( org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getSnapshotDao ( ) . exists ( vm.getId ( ) , SnapshotType.STATELESS ) ) { org.ovirt.engine.core.dal.VdcBllMessages message = ( vm.isRunning ( ) ) ? org.ovirt.engine.core.dal.VdcBllMessages.ACTION_TYPE_FAILED_VM_RUNNING_STATELESS : org.ovirt.engine.core.dal.VdcBllMessages.ACTION_TYPE_FAILED_VM_HAS_STATELESS_SNAPSHOT_LEFTOVER ; return new org.ovirt.engine.core.bll.ValidationResult ( message ) ; } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }
Source:
public static void getHostById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { 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.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVdsByVdsId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
public static void getAllAttachableDisks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetAllAttachableDisks params = new org.ovirt.engine.core.common.queries.GetAllAttachableDisks ( storagePoolId ) ; params.setVmId ( vmId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllAttachableDisks , params , aQuery ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc freeze ( java.lang.String vmId ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "VM.freeze" ) . withParameter ( "vmID" , vmId ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( response ) ; }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturn freeze ( java.lang.String vmId ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "VM.freeze" ) . withParameter ( "vmID" , vmId ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturn ( response ) ; }
Source:
public static org.ovirt.engine.api.model.CdRom map ( org.ovirt.engine.core.common.businessentities.VmTemplate entity , org.ovirt.engine.api.model.CdRom template ) { org.ovirt.engine.api.model.CdRom model = ( template != null ) ? template : new org.ovirt.engine.api.model.CdRom ( ) ; model.setId ( org.ovirt.engine.api.restapi.types.CdRomMapper.CDROM_ID.toString ( ) ) ; if ( ! ( org.ovirt.engine.core.compat.StringHelper.isNullOrEmpty ( entity.getiso_path ( ) ) ) ) { model.setFile ( new org.ovirt.engine.api.model.File ( ) ) ; model.getFile ( ) . setId ( entity.getiso_path ( ) ) ; } return model ; }

Target:
public static org.ovirt.engine.api.model.CdRom map ( org.ovirt.engine.core.common.businessentities.VmTemplate entity , org.ovirt.engine.api.model.CdRom template ) { org.ovirt.engine.api.model.CdRom model = ( template != null ) ? template : new org.ovirt.engine.api.model.CdRom ( ) ; model.setId ( org.ovirt.engine.api.restapi.types.CdRomMapper.CDROM_ID.toString ( ) ) ; if ( ! ( org.ovirt.engine.core.compat.StringHelper.isNullOrEmpty ( entity.getIsoPath ( ) ) ) ) { model.setFile ( new org.ovirt.engine.api.model.File ( ) ) ; model.getFile ( ) . setId ( entity.getIsoPath ( ) ) ; } return model ; }
Source:
public void render ( com.google.gwt.cell.client.Cell.Context context , T object , com.google.gwt.safehtml.shared.SafeHtmlBuilder sb ) { com.google.gwt.cell.client.Cell < java.lang.Boolean > cell = org.ovirt.engine.ui.webadmin.widget.table.column.CheckboxColumn.getCell ( ) ; if ( cell instanceof org.ovirt.engine.ui.webadmin.widget.table.column.CheckboxColumn.EnabledDisabledCheckboxCell ) { ( ( org.ovirt.engine.ui.webadmin.widget.table.column.CheckboxColumn.EnabledDisabledCheckboxCell ) ( cell ) ) . renderEditable ( context , org.ovirt.engine.ui.webadmin.widget.table.column.CheckboxColumn.getValue ( object ) , canEdit ( object ) , sb ) ; } else { super . render ( context , object , sb ) ; } }

Target:
public void render ( com.google.gwt.cell.client.Cell.Context context , T object , com.google.gwt.safehtml.shared.SafeHtmlBuilder sb ) { com.google.gwt.cell.client.Cell < java.lang.Boolean > cell = org.ovirt.engine.ui.common.widget.table.column.CheckboxColumn.getCell ( ) ; if ( cell instanceof org.ovirt.engine.ui.common.widget.table.column.CheckboxColumn.EnabledDisabledCheckboxCell ) { ( ( org.ovirt.engine.ui.common.widget.table.column.CheckboxColumn.EnabledDisabledCheckboxCell ) ( cell ) ) . renderEditable ( context , org.ovirt.engine.ui.common.widget.table.column.CheckboxColumn.getValue ( object ) , canEdit ( object ) , sb ) ; } else { super . render ( context , object , sb ) ; } }
Source:
public org.ovirt.engine.core.dao.DiskDao getDiskDao ( ) { return diskDao ; }

Target:
private void initCommand ( ) { org.mockito.Mockito.when ( diskDao.get ( diskId ) ) . thenReturn ( createDiskImage ( ) ) ; org.ovirt.engine.core.common.action.AttachDetachVmDiskParameters parameters = createParameters ( ) ; command = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.storage.disk.AttachDiskToVmCommand ( parameters , null ) ) ; org.mockito.Mockito.doReturn ( diskDao ) . when ( command ) . getDiskDao ( ) ; command.init ( ) ; }
Source:
public void render ( org.ovirt.engine.ui.common.widget.table.column.Context context , com.google.gwt.resources.client.ImageResource value , com.google.gwt.safehtml.shared.SafeHtmlBuilder sb ) { if ( value != null ) { com.google.gwt.safehtml.shared.SafeHtml html = com.google.gwt.safehtml.shared.SafeHtmlUtils.fromTrustedString ( com.google.gwt.user.client.ui.AbstractImagePrototype.create ( value ) . getHTML ( ) ) ; sb.appendHtmlConstant ( ( ( "<div style=\"" + ( style ) ) + "\">" ) ) ; sb.append ( html ) ; sb.appendHtmlConstant ( "</div>" ) ; } }

Target:
public void render ( org.ovirt.engine.ui.common.widget.table.column.Context context , com.google.gwt.resources.client.ImageResource value , com.google.gwt.safehtml.shared.SafeHtmlBuilder sb ) { if ( value != null ) { com.google.gwt.safehtml.shared.SafeHtml html = com.google.gwt.safehtml.shared.SafeHtmlUtils.fromTrustedString ( com.google.gwt.user.client.ui.AbstractImagePrototype.create ( value ) . getHTML ( ) ) ; sb.appendHtmlConstant ( ( ( ( ( ( "<div title=\"" + ( title ) ) + "\" " ) + "style=\"" ) + ( style ) ) + "\">" ) ) ; sb.append ( html ) ; sb.appendHtmlConstant ( "</div>" ) ; } }
Source:
public void render ( org.ovirt.engine.ui.webadmin.widget.table.column.Context context , org.ovirt.engine.core.common.businessentities.gluster.BrickProperties value , com.google.gwt.safehtml.shared.SafeHtmlBuilder sb ) { if ( value != null ) { setFreeSize ( value.getFreeSize ( ) ) ; setTotalSize ( value.getTotalSize ( ) ) ; setUsedSize ( ( ( value.getTotalSize ( ) ) - ( value.getFreeSize ( ) ) ) ) ; setInUnit ( SizeUnit.MB ) ; } super . render ( context , ( value == null ? null : value ) , sb ) ; }

Target:
public void render ( org.ovirt.engine.ui.webadmin.widget.table.column.Context context , org.ovirt.engine.core.common.businessentities.gluster.BrickProperties value , com.google.gwt.safehtml.shared.SafeHtmlBuilder sb ) { if ( value != null ) { setFreeSize ( value.getFreeSize ( ) ) ; setTotalSize ( value.getTotalSize ( ) ) ; setUsedSize ( ( ( value.getTotalSize ( ) ) - ( value.getFreeSize ( ) ) ) ) ; setInUnit ( SizeUnit.MiB ) ; } super . render ( context , ( value == null ? null : value ) , sb ) ; }
Source:
protected void initializeModelHandlers ( final org.ovirt.engine.ui.uicommonweb.models.events.EventListModel < java.lang.Void > model ) { super . initializeModelHandlers ( model ) ; model.getPropertyChangedEvent ( ) . addListener ( new org.ovirt.engine.ui.uicompat.IEventListener < org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs > ( ) { @ java.lang.Override 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 ) { if ( "LastEvent" . equals ( args.propertyName ) ) { updateData ( ) ; } } } ) ; }

Target:
protected void initializeModelHandlers ( final org.ovirt.engine.ui.uicommonweb.models.events.EventListModel < java.lang.Void > model ) { super . initializeModelHandlers ( model ) ; model.setDisplayEventsOnly ( true ) ; model.getPropertyChangedEvent ( ) . addListener ( new org.ovirt.engine.ui.uicompat.IEventListener < org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs > ( ) { @ java.lang.Override 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 ) { if ( "LastEvent" . equals ( args.propertyName ) ) { updateData ( ) ; } } } ) ; }
Source:
public java.util.Map activateStorageDomain ( java.lang.String sdUUID , java.lang.String spUUID ) { try { log.info ( "Activating storage domain, spUUID: sdUUID: {}" , new java.lang.Object [ ] { spUUID , sdUUID } ) ; final org.ovirt.vdsmfake.domain.DataCenter dataCenter = getDataCenterById ( spUUID ) ; final org.ovirt.vdsmfake.domain.StorageDomain storageDomain = dataCenter.getStorageDomainMap ( ) . get ( sdUUID ) ; if ( storageDomain != null ) { storageDomain.setDomainStatus ( StorageDomain.DomainStatus.ACTIVE ) ; updateStorageDomain ( storageDomain ) ; } return getOKStatus ( ) ; } catch ( java.lang.Exception e ) { throw error ( e ) ; } }

Target:
private void activateClearance ( org.ovirt.vdsmfake.domain.StorageDomain storageDomain ) { storageDomain.setDomainStatus ( StorageDomain.DomainStatus.ACTIVE ) ; updateStorageDomain ( storageDomain ) ; }
Source:
public void diskSnapshotsCanBePreviewed ( ) { org.ovirt.engine.core.common.businessentities.Snapshot activeSnapshot = getActiveSnapshot ( ) ; org.mockito.Mockito.when ( snapshotDao.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( activeSnapshot ) ; org.junit.Assert.assertThat ( validator.canDiskSnapshotsBePreviewed ( activeSnapshot.getId ( ) ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }

Target:
public void diskSnapshotsCanBePreviewed ( ) { org.ovirt.engine.core.common.businessentities.Snapshot activeSnapshot = getActiveSnapshot ( ) ; org.mockito.Mockito.when ( snapshotDao.get ( org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( activeSnapshot ) ; org.junit.Assert.assertThat ( validator.canDiskSnapshotsBePreviewed ( activeSnapshot.getId ( ) ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }
Source:
protected void postInitDisks ( ) { onDataLoad ( ) ; checkDestFormatCompatibility ( ) ; StopProgress ( ) ; getStorage ( ) . getSelectedItemChangedEvent ( ) . addListener ( new org.ovirt.engine.ui.uicompat.IEventListener ( ) { @ java.lang.Override public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { onDataLoad ( ) ; } } ) ; }

Target:
protected void postInitDisks ( ) { onDataLoad ( ) ; checkDestFormatCompatibility ( ) ; stopProgress ( ) ; getStorage ( ) . getSelectedItemChangedEvent ( ) . addListener ( new org.ovirt.engine.ui.uicompat.IEventListener ( ) { @ java.lang.Override public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { onDataLoad ( ) ; } } ) ; }
Source:
private boolean prestartVm ( org.ovirt.engine.core.compat.Guid vmGuid ) { boolean prestartVmSucceeded = false ; if ( org.ovirt.engine.core.bll.VmPoolCommandBase.CanAttachNonPrestartedVmToUser ( vmGuid ) ) { org.ovirt.engine.core.common.businessentities.VM vmToPrestart = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmDAO ( ) . get ( vmGuid ) ; if ( runVmAsStateless ( vmToPrestart ) ) { prestartVmSucceeded = true ; } } return prestartVmSucceeded ; }

Target:
private boolean prestartVm ( org.ovirt.engine.core.compat.Guid vmGuid ) { boolean prestartVmSucceeded = false ; if ( org.ovirt.engine.core.bll.VmPoolCommandBase.canAttachNonPrestartedVmToUser ( vmGuid ) ) { org.ovirt.engine.core.common.businessentities.VM vmToPrestart = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmDAO ( ) . get ( vmGuid ) ; if ( runVmAsStateless ( vmToPrestart ) ) { prestartVmSucceeded = true ; } } return prestartVmSucceeded ; }
Source:
protected void initAppTable ( ) { appTable = new org.ovirt.engine.ui.common.widget.editor.IVdcQueryableCellTable < java.lang.String , org.ovirt.engine.ui.uicommonweb.models.vms.VmAppListModel > ( ) ; appTable.addColumn ( new org.ovirt.engine.ui.common.widget.table.column.TextColumnWithTooltip < java.lang.String > ( ) { @ java.lang.Override public java.lang.String getValue ( java.lang.String object ) { return object ; } } , constants.installedApp ( ) ) ; appTable.getElement ( ) . getStyle ( ) . setPosition ( Position.RELATIVE ) ; com.google.gwt.user.client.ui.ScrollPanel appPanel = new com.google.gwt.user.client.ui.ScrollPanel ( ) ; appPanel.add ( appTable ) ; subTabLayoutPanel.add ( appPanel , constants.importVmApplicationslSubTabLabel ( ) ) ; }

Target:
protected void initAppTable ( ) { appTable = new org.ovirt.engine.ui.common.widget.editor.ListModelObjectCellTable < java.lang.String , org.ovirt.engine.ui.uicommonweb.models.vms.VmAppListModel > ( ) ; appTable.addColumn ( new org.ovirt.engine.ui.common.widget.table.column.TextColumnWithTooltip < java.lang.String > ( ) { @ java.lang.Override public java.lang.String getValue ( java.lang.String object ) { return object ; } } , constants.installedApp ( ) ) ; appTable.getElement ( ) . getStyle ( ) . setPosition ( Position.RELATIVE ) ; com.google.gwt.user.client.ui.ScrollPanel appPanel = new com.google.gwt.user.client.ui.ScrollPanel ( ) ; appPanel.add ( appTable ) ; subTabLayoutPanel.add ( appPanel , constants.importVmApplicationslSubTabLabel ( ) ) ; }
Source:
public void onSucceeded ( org.ovirt.engine.core.compat.Guid cmdId , java.util.List < org.ovirt.engine.core.compat.Guid > childCmdIds ) { super . onSucceeded ( cmdId , childCmdIds ) ; log.info ( "Disk has been successfully deleted from Cinder. ID: {}" , getDiskId ( ) ) ; if ( getCommand ( ) . getParameters ( ) . getShouldBeLogged ( ) ) { new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector ( ) . log ( getCommand ( ) , AuditLogType.USER_FINISHED_REMOVE_DISK ) ; } getCommand ( ) . removeDiskFromDb ( ) ; getCommand ( ) . endAction ( ) ; org.ovirt.engine.core.bll.tasks.CommandCoordinatorUtil.removeAllCommandsInHierarchy ( cmdId ) ; }

Target:
public void onSucceeded ( org.ovirt.engine.core.compat.Guid cmdId , java.util.List < org.ovirt.engine.core.compat.Guid > childCmdIds ) { super . onSucceeded ( cmdId , childCmdIds ) ; log.info ( "Volume/Snapshot has been successfully deleted from Cinder. ID: {}" , getDiskId ( ) ) ; getCommand ( ) . endAction ( ) ; org.ovirt.engine.core.bll.tasks.CommandCoordinatorUtil.removeAllCommandsInHierarchy ( cmdId ) ; }
Source:
public void markAsInvalid ( java.util.List < java.lang.String > validationHints ) { super . markAsInvalid ( validationHints ) ; java.lang.String tooltipText = org.ovirt.engine.ui.common.widget.AbstractValidatedWidgetWithLabel.getValidationTooltipText ( validationHints ) ; labelTooltip.setText ( tooltipText ) ; labelTooltip.reconfigure ( ) ; contentWidgetContainerTooltip.setText ( tooltipText ) ; contentWidgetContainerTooltip.reconfigure ( ) ; }

Target:
public void markAsInvalid ( java.util.List < java.lang.String > validationHints ) { super . markAsInvalid ( validationHints ) ; java.lang.String tooltipText = org.ovirt.engine.ui.common.widget.AbstractValidatedWidgetWithLabel.getValidationTooltipText ( validationHints ) ; labelTooltip.setText ( tooltipText ) ; labelTooltip.reconfigure ( ) ; addLabelStyleName ( OvirtCss.HAS_TOOLTIP ) ; contentWidgetContainerTooltip.setText ( tooltipText ) ; contentWidgetContainerTooltip.reconfigure ( ) ; }
Source:
protected void endWithFailure ( ) { removeRedundantVolumesForOrphanedDisks ( ) ; if ( ! ( org.ovirt.engine.core.bll.storage.RestoreAllCinderSnapshotsCommand.getParameters ( ) . isParentHasTasks ( ) ) ) { org.ovirt.engine.core.bll.storage.RestoreAllCinderSnapshotsCommand.getParameters ( ) . getParentParameters ( ) . setTaskGroupSuccess ( false ) ; org.ovirt.engine.core.bll.storage.RestoreAllCinderSnapshotsCommand.getBackend ( ) . endAction ( org.ovirt.engine.core.bll.storage.RestoreAllCinderSnapshotsCommand.getParameters ( ) . getParentCommand ( ) , org.ovirt.engine.core.bll.storage.RestoreAllCinderSnapshotsCommand.getParameters ( ) . getParentParameters ( ) , org.ovirt.engine.core.bll.storage.RestoreAllCinderSnapshotsCommand.cloneContextAndDetachFromParent ( ) ) ; } org.ovirt.engine.core.bll.storage.RestoreAllCinderSnapshotsCommand.setSucceeded ( true ) ; }

Target:
protected void endWithFailure ( ) { removeRedundantVolumesForOrphanedDisks ( ) ; if ( ! ( org.ovirt.engine.core.bll.storage.RestoreAllCinderSnapshotsCommand.getParameters ( ) . isParentHasTasks ( ) ) ) { unlockSnapshot ( org.ovirt.engine.core.bll.storage.RestoreAllCinderSnapshotsCommand.getParameters ( ) . getSnapshot ( ) . getId ( ) ) ; super . endWithFailure ( ) ; } org.ovirt.engine.core.bll.storage.RestoreAllCinderSnapshotsCommand.setSucceeded ( true ) ; }