auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void getClusterFeaturesByClusterId ( 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 != null ? ( ( java.util.Set < org.ovirt.engine.core.common.businessentities.SupportedAdditionalClusterFeature > ) ( source ) ) : new java.util.HashSet < org.ovirt.engine.core.common.businessentities.SupportedAdditionalClusterFeature > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetClusterFeaturesByClusterId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( clusterId ) , aQuery ) ; }

Target:
public void getClusterFeaturesByVersionAndCategory ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Version version , org.ovirt.engine.core.common.mode.ApplicationMode category ) { 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.Set < org.ovirt.engine.core.common.businessentities.AdditionalFeature > ) ( source ) ) : new java.util.HashSet < org.ovirt.engine.core.common.businessentities.AdditionalFeature > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetClusterFeaturesByVersionAndCategory , new org.ovirt.engine.core.common.queries.GetClusterFeaturesByVersionAndCategoryParameters ( version , category ) , aQuery ) ; }
Source:
public void Executed ( org.ovirt.engine.ui.uicompat.FrontendMultipleActionAsyncResult result ) { postExecuteSave ( ) ; }

Target:
protected void addCommands ( ) { org.ovirt.engine.ui.uicommonweb.UICommand tempVar2 = new org.ovirt.engine.ui.uicommonweb.UICommand ( "OnSave" , this ) ; tempVar2.setTitle ( org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getConstants ( ) . ok ( ) ) ; tempVar2.setIsDefault ( true ) ; getCommands ( ) . add ( tempVar2 ) ; org.ovirt.engine.ui.uicommonweb.UICommand tempVar3 = new org.ovirt.engine.ui.uicommonweb.UICommand ( "Cancel" , this ) ; tempVar3.setTitle ( org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getConstants ( ) . cancel ( ) ) ; tempVar3.setIsCancel ( true ) ; getCommands ( ) . add ( tempVar3 ) ; }
Source:
private void updateHeartbeatPolicy ( boolean isheartbeat ) { org.ovirt.vdsm.jsonrpc.client.utils.retry.RetryPolicy policy = client.getClientRetryPolicy ( ) ; policy.setHeartbeat ( isheartbeat ) ; client.setClientRetryPolicy ( policy ) ; }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc glusterVolumeGeoRepSessionPause ( java.lang.String masterVolumeName , java.lang.String slaveHost , java.lang.String slaveVolumeName , java.lang.String userName , boolean force ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "GlusterVolume.geoRepSessionPause" ) . withParameter ( "volumeName" , masterVolumeName ) . withParameter ( "remoteHost" , slaveHost ) . withParameter ( "remoteVolumeName" , slaveVolumeName ) . withOptionalParameter ( "remoteUserName" , userName ) . withParameter ( "force" , force ) . 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 ) ; }
Source:
public void validateNoFreeSpacePctOnDomains ( ) { setupMocks ( ) ; mockGetImageDomainsListVdsCommand ( 2 , 2 ) ; org.ovirt.engine.core.bll.AddVmPoolWithVmsCommand < org.ovirt.engine.core.common.action.AddVmPoolWithVmsParameters > cmd = createCommand ( ) ; org.mockito.Mockito.when ( org.ovirt.engine.core.common.config.Config.< java.lang.Integer > GetValue ( ConfigValues.FreeSpaceLow ) ) . thenReturn ( 50 ) ; org.junit.Assert.assertFalse ( cmd.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( cmd.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( VdcBllMessages.ACTION_TYPE_FAILED_DISK_SPACE_LOW.toString ( ) ) ) ; }

Target:
public void validateMultiDisksWithNotEnoughSpaceOnDomains ( ) { mcr.mockConfigValue ( ConfigValues.FreeSpaceCriticalLowInGB , 95 ) ; org.junit.Assert.assertFalse ( command.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( VdcBllMessages.ACTION_TYPE_FAILED_DISK_SPACE_LOW.toString ( ) ) ) ; }
Source:
protected void endActionOnAllImageGroups ( ) { for ( org.ovirt.engine.core.common.action.ActionParametersBase p : org.ovirt.engine.core.bll.exportimport.MoveOrCopyTemplateCommand.getParameters ( ) . getImagesParameters ( ) ) { org.ovirt.engine.core.bll.exportimport.MoveOrCopyTemplateCommand.getBackend ( ) . endAction ( ActionType.CopyImageGroup , p , org.ovirt.engine.core.bll.exportimport.MoveOrCopyTemplateCommand.getContext ( ) . clone ( ) . withoutCompensationContext ( ) . withoutExecutionContext ( ) . withoutLock ( ) ) ; } }

Target:
protected void endActionOnAllImageGroups ( ) { for ( org.ovirt.engine.core.common.action.ActionParametersBase p : org.ovirt.engine.core.bll.exportimport.MoveOrCopyTemplateCommand.getParameters ( ) . getImagesParameters ( ) ) { backend.endAction ( ActionType.CopyImageGroup , p , org.ovirt.engine.core.bll.exportimport.MoveOrCopyTemplateCommand.getContext ( ) . clone ( ) . withoutCompensationContext ( ) . withoutExecutionContext ( ) . withoutLock ( ) ) ; } }
Source:
protected java.util.Map < java.lang.String , java.lang.String > getExclusiveLocks ( ) { if ( ! ( org.ovirt.engine.core.bll.gluster.GlusterCommandBase.isInternalExecution ( ) ) ) { return java.util.Collections.singletonMap ( org.ovirt.engine.core.bll.gluster.GlusterCommandBase.getVdsGroupId ( ) . toString ( ) , LockingGroup.GLUSTER.name ( ) ) ; } return super . getExclusiveLocks ( ) ; }

Target:
protected java.util.Map < java.lang.String , org.ovirt.engine.core.common.utils.Pair < java.lang.String , java.lang.String > > getExclusiveLocks ( ) { if ( ! ( org.ovirt.engine.core.bll.gluster.GlusterCommandBase.isInternalExecution ( ) ) ) { return java.util.Collections.singletonMap ( org.ovirt.engine.core.bll.gluster.GlusterCommandBase.getVdsGroupId ( ) . toString ( ) , LockMessagesMatchUtil.GLUSTER ) ; } return super . getExclusiveLocks ( ) ; }
Source:
public void getUsbPolicyOnUpdateCurrentlyDisabledGotEnabledPolicyNotSetUsbOnPre3_1Cluster ( ) { org.ovirt.engine.api.model.Usb usb = new org.ovirt.engine.api.model.Usb ( ) ; usb.setEnabled ( true ) ; org.ovirt.engine.core.common.businessentities.VDSGroup vdsGroup = new org.ovirt.engine.core.common.businessentities.VDSGroup ( ) ; vdsGroup.setCompatibilityVersion ( Version.v3_0 ) ; assertEquals ( org.ovirt.engine.api.restapi.types.VmMapper.getUsbPolicyOnUpdate ( usb , UsbPolicy.DISABLED , vdsGroup.getCompatibilityVersion ( ) ) , UsbPolicy.ENABLED_LEGACY ) ; }

Target:
public void testGuestFQDN ( ) { org.ovirt.engine.api.restapi.types.VM vm = new org.ovirt.engine.api.restapi.types.VM ( ) ; org.ovirt.engine.core.common.businessentities.VmDynamic vmDynamic = new org.ovirt.engine.core.common.businessentities.VmDynamic ( ) ; vmDynamic.setStatus ( VMStatus.Up ) ; vmDynamic.setVmFQDN ( "localhost.localdomain" ) ; vm.setDynamicData ( vmDynamic ) ; org.ovirt.engine.api.model.Vm map = org.ovirt.engine.api.restapi.types.VmMapper.map ( vm , ( ( org.ovirt.engine.api.model.Vm ) ( null ) ) ) ; assertNotNull ( map.getFqdn ( ) ) ; assertEquals ( map.getFqdn ( ) , "localhost.localdomain" ) ; }
Source:
public static void getStorageDomainListByTemplate ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid templateId ) { 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.StorageDomain > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetStorageDomainsByVmTemplateId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( templateId ) , aQuery ) ; }

Target:
public static void getHostListByDataCenter ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid spId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > list = org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VDS > cast ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.IVdcQueryable > ) ( source ) ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllVdsByStoragePool , new org.ovirt.engine.core.common.queries.IdQueryParameters ( spId ) , aQuery ) ; }
Source:
public void getExistingStorageDomainList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hostId , org.ovirt.engine.core.common.businessentities.StorageDomainType domainType , org.ovirt.engine.core.common.businessentities.storage.StorageType storageType , java.lang.String path ) { 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.StorageDomain > ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetExistingStorageDomainList , new org.ovirt.engine.core.common.queries.GetExistingStorageDomainListParameters ( hostId , storageType , domainType , path ) , aQuery ) ; }

Target:
public void getExistingStorageDomainList ( org.ovirt.engine.ui.frontend.AsyncQuery < java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > > aQuery , org.ovirt.engine.core.compat.Guid hostId , org.ovirt.engine.core.common.businessentities.StorageDomainType domainType , org.ovirt.engine.core.common.businessentities.storage.StorageType storageType , java.lang.String path ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.CastingConverter < > ( ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetExistingStorageDomainList , new org.ovirt.engine.core.common.queries.GetExistingStorageDomainListParameters ( hostId , storageType , domainType , path ) , aQuery ) ; }
Source:
private void onSaveSanStorage ( ) { org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel confirmationModel = ( ( org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel ) ( getConfirmWindow ( ) ) ) ; if ( ( confirmationModel != null ) && ( ! ( confirmationModel.validate ( ) ) ) ) { return ; } cancelConfirm ( ) ; getWindow ( ) . startProgress ( null ) ; org.ovirt.engine.ui.uicompat.Task.Create ( this , new java.util.ArrayList < java.lang.Object > ( java.util.Arrays.asList ( new java.lang.Object [ ] { "SaveSan" } ) ) ) . Run ( ) ; }

Target:
private void onSaveSanStorage ( ) { org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel confirmationModel = ( ( org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel ) ( getConfirmWindow ( ) ) ) ; if ( ( confirmationModel != null ) && ( ! ( confirmationModel.validate ( ) ) ) ) { return ; } cancelConfirm ( ) ; getWindow ( ) . startProgress ( null ) ; org.ovirt.engine.ui.uicompat.Task.create ( this , new java.util.ArrayList < java.lang.Object > ( java.util.Arrays.asList ( new java.lang.Object [ ] { "SaveSan" } ) ) ) . run ( ) ; }
Source:
public void getGlusterHooks ( 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 != null ? source : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterHooks , new org.ovirt.engine.core.common.queries.gluster.GlusterParameters ( clusterId ) , 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:
protected boolean canDoAction ( ) { org.ovirt.engine.core.bll.validator.NetworkValidator validator = new org.ovirt.engine.core.bll.validator.NetworkValidator ( getNetwork ( ) ) ; return ( ( validate ( validator.networkIsSet ( ) ) ) && ( validate ( validator.notLabeled ( ) ) ) ) && ( validate ( validator.notExternalNetwork ( ) ) ) ; }

Target:
protected boolean canDoAction ( ) { org.ovirt.engine.core.bll.validator.NetworkValidator validator = new org.ovirt.engine.core.bll.validator.NetworkValidator ( vmDao , getNetwork ( ) ) ; return ( ( validate ( validator.networkIsSet ( ) ) ) && ( validate ( validator.notLabeled ( ) ) ) ) && ( validate ( validator.notExternalNetwork ( ) ) ) ; }
Source:
protected boolean canDoAction ( ) { disk = org.ovirt.engine.core.bll.HotPlugDiskToVmCommand.getDiskDao ( ) . get ( org.ovirt.engine.core.bll.HotPlugDiskToVmCommand.getParameters ( ) . getDiskId ( ) ) ; return ( ( ( org.ovirt.engine.core.bll.HotPlugDiskToVmCommand.isVmExist ( ) ) && ( org.ovirt.engine.core.bll.HotPlugDiskToVmCommand.isVmUpOrDown ( ) ) ) && ( isDiskExist ( disk ) ) ) && ( checkCanPerformPlugUnPlugDisk ( ) ) ; }

Target:
protected boolean canDoAction ( ) { disk = org.ovirt.engine.core.bll.HotPlugDiskToVmCommand.getDiskDao ( ) . get ( org.ovirt.engine.core.bll.HotPlugDiskToVmCommand.getParameters ( ) . getDiskId ( ) ) ; return ( ( ( ( org.ovirt.engine.core.bll.HotPlugDiskToVmCommand.isVmExist ( ) ) && ( org.ovirt.engine.core.bll.HotPlugDiskToVmCommand.isVmUpOrDown ( ) ) ) && ( isDiskExist ( disk ) ) ) && ( checkCanPerformPlugUnPlugDisk ( ) ) ) && ( validate ( new org.ovirt.engine.core.bll.snapshots.SnapshotsValidator ( ) . vmNotDuringSnapshot ( org.ovirt.engine.core.bll.HotPlugDiskToVmCommand.getVmId ( ) ) ) ) ; }
Source:
public static 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 ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( tempVar , aQuery ) ; }

Target:
public static void getGlusterBricksForServer ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid serverId ) { 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.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterVolumeBricksByServerId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( serverId ) , aQuery ) ; }
Source:
public void qosValuesModified ( ) { org.ovirt.engine.core.common.businessentities.network.Network network = createNetwork ( org.ovirt.engine.core.bll.network.host.SetupNetworksHelperTest.MANAGEMENT_NETWORK_NAME ) ; mockExistingNetworks ( network ) ; org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface = createNicSyncedWithNetwork ( "eth0" , network ) ; iface.setQosOverridden ( true ) ; mockExistingIfaces ( iface ) ; iface.setQos ( createQos ( ) ) ; org.ovirt.engine.core.bll.network.host.SetupNetworksHelper helper = createHelper ( createParametersForNics ( iface ) , Version.v3_4 ) ; validateAndAssertNetworkModified ( helper , network ) ; }

Target:
public void qosNotSupported ( ) { org.ovirt.engine.core.common.businessentities.network.Network network = createNetwork ( org.ovirt.engine.core.bll.network.host.SetupNetworksHelperTest.MANAGEMENT_NETWORK_NAME ) ; mockExistingNetworks ( network ) ; org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface = createNicSyncedWithNetwork ( "eth0" , network ) ; mockExistingIfaces ( iface ) ; iface.setQosOverridden ( true ) ; iface.setQos ( createQos ( ) ) ; org.ovirt.engine.core.bll.network.host.SetupNetworksHelper helper = createHelper ( createParametersForNics ( iface ) ) ; validateAndExpectViolation ( helper , VdcBllMessages.ACTION_TYPE_FAILED_HOST_NETWORK_QOS_NOT_SUPPORTED , org.ovirt.engine.core.bll.network.host.SetupNetworksHelperTest.MANAGEMENT_NETWORK_NAME ) ; }
Source:
private void validateCanDoActionDomainInProcess ( org.ovirt.engine.core.common.businessentities.StorageDomainStatus masterStatus , org.ovirt.engine.core.common.businessentities.StorageDomainStatus regularStatus , org.ovirt.engine.core.common.businessentities.StorageDomainStatus expectedStatus ) { masterDomainIsoMap.setStatus ( masterStatus ) ; regularDomainIsoMap.setStatus ( regularStatus ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( cmd , EngineMessage.ACTION_TYPE_FAILED_STORAGE_DOMAIN_STATUS_ILLEGAL2 ) ; java.util.List < java.lang.String > messages = cmd.getReturnValue ( ) . getCanDoActionMessages ( ) ; org.junit.Assert.assertEquals ( messages.get ( 0 ) , EngineMessage.ACTION_TYPE_FAILED_STORAGE_DOMAIN_STATUS_ILLEGAL2.toString ( ) ) ; org.junit.Assert.assertEquals ( messages.get ( 1 ) , java.lang.String.format ( "$status %1$s" , expectedStatus ) ) ; }

Target:
private void validateDomainInProcess ( org.ovirt.engine.core.common.businessentities.StorageDomainStatus masterStatus , org.ovirt.engine.core.common.businessentities.StorageDomainStatus regularStatus , org.ovirt.engine.core.common.businessentities.StorageDomainStatus expectedStatus ) { masterDomainIsoMap.setStatus ( masterStatus ) ; regularDomainIsoMap.setStatus ( regularStatus ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( cmd , EngineMessage.ACTION_TYPE_FAILED_STORAGE_DOMAIN_STATUS_ILLEGAL2 ) ; java.util.List < java.lang.String > messages = cmd.getReturnValue ( ) . getValidationMessages ( ) ; org.junit.Assert.assertEquals ( messages.get ( 0 ) , EngineMessage.ACTION_TYPE_FAILED_STORAGE_DOMAIN_STATUS_ILLEGAL2.toString ( ) ) ; org.junit.Assert.assertEquals ( messages.get ( 1 ) , java.lang.String.format ( "$status %1$s" , expectedStatus ) ) ; }
Source:
public void testSave ( ) { org.ovirt.engine.core.common.businessentities.storage.image_storage_domain_map entry = new org.ovirt.engine.core.common.businessentities.storage.image_storage_domain_map ( org.ovirt.engine.core.dao.ImageStorageDomainMapDaoTest.EXISTING_IMAGE_ID_WITH_NO_MAP_ENTRY , org.ovirt.engine.core.dao.ImageStorageDomainMapDaoTest.EXISTING_DOMAIN_ID , FixturesTool.DEFAULT_QUOTA_GENERAL , FixturesTool.DISK_PROFILE_1 ) ; dao.save ( entry ) ; java.util.List < org.ovirt.engine.core.common.businessentities.storage.image_storage_domain_map > entries = dao.getAllByImageId ( org.ovirt.engine.core.dao.ImageStorageDomainMapDaoTest.EXISTING_IMAGE_ID_WITH_NO_MAP_ENTRY ) ; org.junit.Assert.assertNotNull ( entries ) ; org.junit.Assert.assertTrue ( ( ( entries.size ( ) ) == 1 ) ) ; org.ovirt.engine.core.common.businessentities.storage.image_storage_domain_map entryFromDb = entries.get ( 0 ) ; org.junit.Assert.assertEquals ( entry , entryFromDb ) ; }

Target:
public void testSave ( ) { org.ovirt.engine.core.common.businessentities.storage.ImageStorageDomainMap entry = new org.ovirt.engine.core.common.businessentities.storage.ImageStorageDomainMap ( org.ovirt.engine.core.dao.ImageStorageDomainMapDaoTest.EXISTING_IMAGE_ID_WITH_NO_MAP_ENTRY , org.ovirt.engine.core.dao.ImageStorageDomainMapDaoTest.EXISTING_DOMAIN_ID , FixturesTool.DEFAULT_QUOTA_GENERAL , FixturesTool.DISK_PROFILE_1 ) ; dao.save ( entry ) ; java.util.List < org.ovirt.engine.core.common.businessentities.storage.ImageStorageDomainMap > entries = dao.getAllByImageId ( org.ovirt.engine.core.dao.ImageStorageDomainMapDaoTest.EXISTING_IMAGE_ID_WITH_NO_MAP_ENTRY ) ; org.junit.Assert.assertNotNull ( entries ) ; org.junit.Assert.assertTrue ( ( ( entries.size ( ) ) == 1 ) ) ; org.ovirt.engine.core.common.businessentities.storage.ImageStorageDomainMap entryFromDb = entries.get ( 0 ) ; org.junit.Assert.assertEquals ( entry , entryFromDb ) ; }
Source:
public void testDeleteUnregisteredEntity ( ) { org.ovirt.engine.core.common.businessentities.OvfEntityData ovfEntityData = dao.getByEntityIdAndStorageDomain ( FixturesTool.VM_RHEL5_POOL_50 , FixturesTool.STORAGE_DOAMIN_NFS2_1 ) ; org.junit.Assert.assertNotNull ( ovfEntityData ) ; dao.removeEntity ( FixturesTool.VM_RHEL5_POOL_50 , FixturesTool.STORAGE_DOAMIN_NFS2_1 ) ; ovfEntityData = dao.getByEntityIdAndStorageDomain ( FixturesTool.VM_RHEL5_POOL_50 , FixturesTool.STORAGE_DOAMIN_NFS2_1 ) ; org.junit.Assert.assertNull ( ovfEntityData ) ; }

Target:
public void testDeleteUnregisteredEntity ( ) { org.ovirt.engine.core.common.businessentities.OvfEntityData ovfEntityData = dao.getByEntityIdAndStorageDomain ( FixturesTool.UNREGISTERED_VM , FixturesTool.STORAGE_DOAMIN_NFS2_1 ) ; org.junit.Assert.assertNotNull ( ovfEntityData ) ; dao.removeEntity ( FixturesTool.UNREGISTERED_VM , FixturesTool.STORAGE_DOAMIN_NFS2_1 ) ; ovfEntityData = dao.getByEntityIdAndStorageDomain ( FixturesTool.UNREGISTERED_VM , FixturesTool.STORAGE_DOAMIN_NFS2_1 ) ; org.junit.Assert.assertNull ( ovfEntityData ) ; }
Source:
private boolean validateDiskImage ( ) { org.ovirt.engine.core.common.businessentities.storage.Disk disk = org.ovirt.engine.core.bll.storage.repoimage.ExportRepoImageCommand.getDiskDao ( ) . get ( org.ovirt.engine.core.bll.storage.repoimage.ExportRepoImageCommand.getParameters ( ) . getImageGroupID ( ) ) ; if ( ( disk != null ) && ( ! ( validate ( new org.ovirt.engine.core.bll.validator.storage.DiskValidator ( disk ) . validateUnsupportedDiskStorageType ( DiskStorageType.LUN , DiskStorageType.CINDER ) ) ) ) ) { return false ; } if ( ( getDiskImage ( ) ) == null ) { return failCanDoAction ( EngineMessage.ACTION_TYPE_FAILED_DISK_NOT_EXIST ) ; } return true ; }

Target:
private boolean validateDiskImage ( ) { org.ovirt.engine.core.common.businessentities.storage.Disk disk = org.ovirt.engine.core.bll.storage.repoimage.ExportRepoImageCommand.getDiskDao ( ) . get ( org.ovirt.engine.core.bll.storage.repoimage.ExportRepoImageCommand.getParameters ( ) . getImageGroupID ( ) ) ; if ( ( disk != null ) && ( ! ( validate ( new org.ovirt.engine.core.bll.validator.storage.DiskValidator ( disk ) . validateUnsupportedDiskStorageType ( DiskStorageType.LUN , DiskStorageType.CINDER ) ) ) ) ) { return false ; } if ( ( getDiskImage ( ) ) == null ) { return failValidation ( EngineMessage.ACTION_TYPE_FAILED_DISK_NOT_EXIST ) ; } return true ; }
Source:
public void calculateNetworkImplementationDetailsNetworkVmNetworkOutOfSync ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface = createNetworkDevice ( ) ; calculateNetworkImplementationDetailsAndAssertSync ( iface , false , iface.getNetworkName ( ) , ( ! ( iface.isBridged ( ) ) ) , iface.getMtu ( ) , iface.getVlanId ( ) ) ; }

Target:
public void calculateNetworkImplementationDetailsNetworkVmNetworkOutOfSync ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface = createNetworkDevice ( ) ; calculateNetworkImplementationDetailsAndAssertSync ( iface , false , iface.getNetworkName ( ) , ( ! ( iface.isBridged ( ) ) ) , iface.getMtu ( ) , iface.getVlanId ( ) , createQos ( ) ) ; }
Source:
public org.ovirt.engine.core.common.AuditLogType getAuditLogTypeValue ( ) { if ( getSucceeded ( ) ) { return org.ovirt.engine.core.common.AuditLogType.GLUSTER_VOLUME_CREATE ; } else { return ( errorType ) == null ? org.ovirt.engine.core.common.AuditLogType.GLUSTER_VOLUME_CREATE_FAILED : errorType ; } }

Target:
private java.util.Map < java.lang.String , java.lang.String > getOptionValues ( org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity volume , org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeOptionEntity option ) { java.util.Map < java.lang.String , java.lang.String > values = new java.util.HashMap < java.lang.String , java.lang.String > ( ) ; values.put ( GlusterConstants.CLUSTER , getVdsGroupName ( ) ) ; values.put ( GlusterConstants.VOLUME , volume.getName ( ) ) ; values.put ( GlusterConstants.OPTION_KEY , option.getKey ( ) ) ; values.put ( GlusterConstants.OPTION_VALUE , option.getValue ( ) ) ; return values ; }
Source:
private static org.ovirt.engine.core.aaa.DirectoryGroup mapGroupRecord ( final org.ovirt.engine.core.extensions.mgr.ExtensionProxy extension , final org.ovirt.engine.api.extensions.ExtMap group ) { org.ovirt.engine.core.aaa.DirectoryGroup directoryGroup = null ; if ( group != null ) { directoryGroup = new org.ovirt.engine.core.aaa.DirectoryGroup ( extension.getContext ( ) . < java.lang.String > get ( Base.ContextKeys.INSTANCE_NAME ) , group.< java.lang.String > get ( Authz.GroupRecord.ID ) , group.< java.lang.String > get ( Authz.GroupRecord.NAME ) ) ; } return directoryGroup ; }

Target:
private static org.ovirt.engine.core.aaa.DirectoryGroup mapGroupRecord ( final org.ovirt.engine.core.extensions.mgr.ExtensionProxy extension , final org.ovirt.engine.api.extensions.ExtMap group ) { org.ovirt.engine.core.aaa.DirectoryGroup directoryGroup = null ; if ( group != null ) { directoryGroup = new org.ovirt.engine.core.aaa.DirectoryGroup ( extension.getContext ( ) . < java.lang.String > get ( Base.ContextKeys.INSTANCE_NAME ) , group.< java.lang.String > get ( Authz.GroupRecord.NAMESPACE ) , group.< java.lang.String > get ( Authz.GroupRecord.ID ) , group.< java.lang.String > get ( Authz.GroupRecord.NAME ) ) ; } return directoryGroup ; }
Source:
public static java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > getAllImageSnapshots ( org.ovirt.engine.core.compat.Guid imageId , org.ovirt.engine.core.compat.Guid imageTemplateId ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > snapshots = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ( ) ; org.ovirt.engine.core.compat.Guid curImage = imageId ; while ( ( ! ( imageTemplateId.equals ( curImage ) ) ) && ( ! ( curImage.equals ( Guid.Empty ) ) ) ) { org.ovirt.engine.core.common.businessentities.DiskImage curDiskImage = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getDiskImageDao ( ) . getSnapshotById ( curImage ) ; snapshots.add ( curDiskImage ) ; curImage = curDiskImage.getParentId ( ) ; } return snapshots ; }

Target:
public static java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > getAllImageSnapshots ( org.ovirt.engine.core.compat.Guid imageId ) { return org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getDiskImageDao ( ) . getAllSnapshotsForLeaf ( imageId ) ; }
Source:
protected boolean isPostZero ( ) { if ( ( cachedPostZero ) == null ) { cachedPostZero = getDbFacade ( ) . getDiskDao ( ) . getAllForVm ( vm.getId ( ) ) . contains ( new java.lang.Object ( ) { @ java.lang.Override public boolean equals ( java.lang.Object obj ) { return ( obj != null ) && ( ( ( org.ovirt.engine.core.common.businessentities.Disk ) ( obj ) ) . isWipeAfterDelete ( ) ) ; } } ) ; } return cachedPostZero ; }

Target:
protected boolean isPostZero ( ) { if ( ( cachedPostZero ) == null ) { cachedPostZero = isDiskWithWipeAfterDeleteExist ( getDiskDao ( ) . getAllForVm ( vm.getId ( ) ) ) ; } return cachedPostZero ; }
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 ) { if ( "IsChangable" . equals ( args.propertyName ) ) { boolean value = getIsChangable ( ) ; getThroughput ( ) . setIsChangable ( value ) ; getIops ( ) . setIsChangable ( value ) ; } }

Target:
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 ( "IsChangable" . equals ( args.propertyName ) ) { boolean value = getIsChangable ( ) ; getThroughput ( ) . setIsChangeable ( value ) ; getIops ( ) . setIsChangeable ( value ) ; } }
Source:
public void setUp ( ) { tested = org.mockito.Mockito.spy ( new org.ovirt.engine.ui.common.system.ClientStorageImpl ( org.ovirt.engine.ui.common.system.ClientStorageImplTest.KEY_PREFIX ) { @ java.lang.Override void initStorage ( ) { } } ) ; org.mockito.Mockito.doNothing ( ) . when ( tested ) . setLocalItemImpl ( org.mockito.Matchers.any ( java.lang.String.class ) , org.mockito.Matchers.any ( java.lang.String.class ) ) ; org.mockito.Mockito.doNothing ( ) . when ( tested ) . setSessionItemImpl ( org.mockito.Matchers.any ( java.lang.String.class ) , org.mockito.Matchers.any ( java.lang.String.class ) ) ; }

Target:
public void setUp ( ) { tested = org.mockito.Mockito.spy ( new org.ovirt.engine.ui.common.system.ClientStorageImpl ( org.ovirt.engine.ui.common.system.ClientStorageImplTest.KEY_PREFIX ) { @ java.lang.Override void initStorage ( ) { } } ) ; org.mockito.Mockito.doNothing ( ) . when ( tested ) . setLocalItemImpl ( org.mockito.ArgumentMatchers.any ( java.lang.String.class ) , org.mockito.ArgumentMatchers.any ( java.lang.String.class ) ) ; org.mockito.Mockito.doNothing ( ) . when ( tested ) . setSessionItemImpl ( org.mockito.ArgumentMatchers.any ( java.lang.String.class ) , org.mockito.ArgumentMatchers.any ( java.lang.String.class ) ) ; }
Source:
public static void GetExternalNetworkList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid providerId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.Network > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllExternalNetworksOnProvider , new org.ovirt.engine.core.common.queries.IdQueryParameters ( providerId ) , aQuery ) ; }

Target:
public static void getVmGuestAgentInterfacesByVmId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmGuestAgentInterface > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmGuestAgentInterfacesByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }
Source:
private boolean restoreInitialState ( ) { org.ovirt.engine.core.compat.Guid snapshotId = getSnapshotDao ( ) . getId ( org.ovirt.engine.core.bll.RestoreStatelessVmCommand.getVmId ( ) , SnapshotType.STATELESS ) ; if ( snapshotId == null ) { return true ; } java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > imagesList = org.ovirt.engine.core.bll.RestoreStatelessVmCommand.getDiskImageDao ( ) . getAllSnapshotsForVmSnapshot ( snapshotId ) ; if ( ( imagesList == null ) || ( imagesList.isEmpty ( ) ) ) { return true ; } return runInternalActionWithTasksContext ( VdcActionType.RestoreAllSnapshots , buildRestoreAllSnapshotsParameters ( imagesList ) , org.ovirt.engine.core.bll.RestoreStatelessVmCommand.getLock ( ) ) . getSucceeded ( ) ; }

Target:
private java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > getDiskSnapshotsForVmSnapshot ( org.ovirt.engine.core.compat.Guid snapshotId ) { java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > images = org.ovirt.engine.core.bll.RestoreStatelessVmCommand.getDiskImageDao ( ) . getAllSnapshotsForVmSnapshot ( snapshotId ) ; return images != null ? images : java.util.Collections.< org.ovirt.engine.core.common.businessentities.DiskImage > emptyList ( ) ; }
Source:
private static java.net.HttpURLConnection createConnection ( java.lang.String uri ) throws java.lang.Exception { java.net.HttpURLConnection connection = org.ovirt.engine.core.aaa.SSOOAuthServiceUtils.create ( new java.net.URL ( ( ( org.ovirt.engine.core.utils.EngineLocalConfig.getInstance ( ) . getProperty ( "ENGINE_SSO_SERVICE_URL" ) ) + uri ) ) ) ; connection.setDoInput ( true ) ; connection.setDoOutput ( true ) ; connection.setRequestMethod ( "POST" ) ; connection.setRequestProperty ( "Accept" , "application/json" ) ; connection.setRequestProperty ( "Content-Type" , "application/x-www-form-urlencoded" ) ; connection.setRequestProperty ( "Content-Language" , "en-US" ) ; return connection ; }

Target:
private static java.net.HttpURLConnection createConnection ( java.lang.String uri ) throws java.lang.Exception { java.net.HttpURLConnection connection = org.ovirt.engine.core.aaa.SSOOAuthServiceUtils.create ( new org.ovirt.engine.core.uutils.net.URLBuilder ( org.ovirt.engine.core.utils.EngineLocalConfig.getInstance ( ) . getProperty ( "ENGINE_SSO_SERVICE_URL" ) , uri ) . buildURL ( ) ) ; connection.setDoInput ( true ) ; connection.setDoOutput ( true ) ; connection.setRequestMethod ( "POST" ) ; connection.setRequestProperty ( "Accept" , "application/json" ) ; connection.setRequestProperty ( "Content-Type" , "application/x-www-form-urlencoded" ) ; connection.setRequestProperty ( "Content-Language" , "en-US" ) ; return connection ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult statusSupportedForHostUpgrade ( ) { return org.ovirt.engine.core.bll.ValidationResult.failWith ( VdcBllMessages.VDS_CANNOT_INSTALL_STATUS_ILLEGAL ) . when ( ( ( ( ( getHost ( ) . getStatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.VDSStatus.Maintenance ) ) && ( ( getHost ( ) . getStatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.VDSStatus.InstallFailed ) ) ) && ( ( getHost ( ) . getStatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.VDSStatus.Up ) ) ) ) ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult statusSupportedForHostUpgrade ( ) { return org.ovirt.engine.core.bll.ValidationResult.failWith ( VdcBllMessages.VDS_CANNOT_INSTALL_STATUS_ILLEGAL ) . unless ( org.ovirt.engine.core.common.VdcActionUtils.canExecute ( java.util.Arrays.asList ( getHost ( ) ) , org.ovirt.engine.core.common.businessentities.VDS.class , VdcActionType.UpgradeHost ) ) ; }
Source:
protected void ExecuteVdsBrokerCommand ( ) { org.ovirt.engine.core.compat.Guid vmId = org.ovirt.engine.core.vdsbroker.vdsbroker.CancelMigrateVDSCommand.getParameters ( ) . getVmId ( ) ; status = org.ovirt.engine.core.vdsbroker.vdsbroker.CancelMigrateVDSCommand.getBroker ( ) . migrateCancel ( vmId.toString ( ) ) ; ProceedProxyReturnValue ( ) ; org.ovirt.engine.core.vdsbroker.ResourceManager.getInstance ( ) . RemoveAsyncRunningVm ( vmId ) ; }

Target:
protected void ExecuteVdsBrokerCommand ( ) { org.ovirt.engine.core.compat.Guid vmId = org.ovirt.engine.core.vdsbroker.vdsbroker.CancelMigrateVDSCommand.getParameters ( ) . getVmId ( ) ; status = org.ovirt.engine.core.vdsbroker.vdsbroker.CancelMigrateVDSCommand.getBroker ( ) . migrateCancel ( vmId.toString ( ) ) ; proceedProxyReturnValue ( ) ; org.ovirt.engine.core.vdsbroker.ResourceManager.getInstance ( ) . RemoveAsyncRunningVm ( vmId ) ; }
Source:
protected boolean canDoAction ( ) { if ( ( org.ovirt.engine.core.bll.numa.vm.AbstractVmNumaNodeCommand.getVm ( ) ) == null ) { return failCanDoAction ( EngineMessage.ACTION_TYPE_FAILED_VM_NOT_FOUND ) ; } return validate ( org.ovirt.engine.core.bll.numa.vm.NumaValidator.checkVmNumaNodesIntegrity ( org.ovirt.engine.core.bll.numa.vm.AbstractVmNumaNodeCommand.getVm ( ) , getVmNumaNodesForValidation ( ) ) ) ; }

Target:
protected boolean canDoAction ( ) { if ( ( org.ovirt.engine.core.bll.numa.vm.AbstractVmNumaNodeCommand.getVm ( ) ) == null ) { return failCanDoAction ( EngineMessage.ACTION_TYPE_FAILED_VM_NOT_FOUND ) ; } if ( ! ( validate ( org.ovirt.engine.core.bll.numa.vm.NumaValidator.checkVmNumaIndexDuplicates ( org.ovirt.engine.core.bll.numa.vm.AbstractVmNumaNodeCommand.getParameters ( ) . getVmNumaNodeList ( ) ) ) ) ) { return false ; } return validate ( org.ovirt.engine.core.bll.numa.vm.NumaValidator.checkVmNumaNodesIntegrity ( org.ovirt.engine.core.bll.numa.vm.AbstractVmNumaNodeCommand.getVm ( ) , getVmNumaNodesForValidation ( ) ) ) ; }
Source:
protected java.util.Map < java.lang.String , org.ovirt.engine.core.common.utils.Pair < java.lang.String , java.lang.String > > getExclusiveLocks ( ) { if ( ! ( org.ovirt.engine.core.bll.gluster.GlusterCommandBase.isInternalExecution ( ) ) ) { return java.util.Collections.singletonMap ( org.ovirt.engine.core.bll.gluster.GlusterCommandBase.getVdsGroupId ( ) . toString ( ) , LockMessagesMatchUtil.GLUSTER ) ; } return super . getExclusiveLocks ( ) ; }

Target:
protected java.util.Map < java.lang.String , org.ovirt.engine.core.common.utils.Pair < java.lang.String , java.lang.String > > getExclusiveLocks ( ) { if ( ! ( org.ovirt.engine.core.bll.gluster.GlusterCommandBase.isInternalExecution ( ) ) ) { return java.util.Collections.singletonMap ( org.ovirt.engine.core.bll.gluster.GlusterCommandBase.getVdsGroupId ( ) . toString ( ) , org.ovirt.engine.core.bll.LockMessagesMatchUtil.makeLockingPair ( LockingGroup.GLUSTER , VdcBllMessages.ACTION_TYPE_FAILED_OBJECT_LOCKED ) ) ; } return super . getExclusiveLocks ( ) ; }
Source:
public static org.ovirt.engine.core.vdsbroker.VMStatsRefresher create ( final org.ovirt.engine.core.vdsbroker.VdsManager manager , final org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector auditLogDirector , final org.ovirt.engine.core.utils.timer.SchedulerUtil scheduler ) { org.ovirt.engine.core.compat.Version version = manager.getCompatibilityVersion ( ) ; if ( ( ( org.ovirt.engine.core.common.FeatureSupported.jsonProtocol ( version ) ) && ( ( org.ovirt.engine.core.common.businessentities.VdsProtocol.STOMP ) == ( manager.getCopyVds ( ) . getProtocol ( ) ) ) ) && ( org.ovirt.engine.core.common.FeatureSupported.vmStatsEvents ( version ) ) ) { return new org.ovirt.engine.core.vdsbroker.jsonrpc.EventVMStatsRefresher ( manager , auditLogDirector , scheduler ) ; } return new org.ovirt.engine.core.vdsbroker.PollVMStatsRefresher ( manager , auditLogDirector , scheduler ) ; }

Target:
public org.ovirt.engine.core.vdsbroker.VmStatsRefresher create ( org.ovirt.engine.core.vdsbroker.VdsManager vdsManager ) { return org.ovirt.engine.core.di.Injector.injectMembers ( getRefresherForVds ( vdsManager ) ) ; }
Source:
protected boolean canDoAction ( ) { boolean returnValue = true ; if ( ( org.ovirt.engine.core.bll.ClearNonResponsiveVdsVmsCommand.getVds ( ) ) == null ) { addCanDoActionMessage ( VdcBllMessages.VDS_INVALID_SERVER_ID ) ; returnValue = false ; } else if ( ( hasVMs ( ) ) && ( ( org.ovirt.engine.core.bll.ClearNonResponsiveVdsVmsCommand.getVds ( ) . getStatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.VDSStatus.NonResponsive ) ) ) { addCanDoActionMessage ( VdcBllMessages.VDS_CANNOT_CLEAR_VMS_WRONG_STATUS ) ; returnValue = false ; } return returnValue ; }

Target:
protected boolean canDoAction ( ) { boolean returnValue = true ; if ( ( org.ovirt.engine.core.bll.ClearNonResponsiveVdsVmsCommand.getVds ( ) ) == null ) { addCanDoActionMessage ( VdcBllMessages.VDS_INVALID_SERVER_ID ) ; returnValue = false ; } else if ( ( ( hasVMs ( ) ) && ( ( org.ovirt.engine.core.bll.ClearNonResponsiveVdsVmsCommand.getVds ( ) . getStatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.VDSStatus.NonResponsive ) ) ) && ( ( org.ovirt.engine.core.bll.ClearNonResponsiveVdsVmsCommand.getVds ( ) . getStatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.VDSStatus.Reboot ) ) ) { addCanDoActionMessage ( VdcBllMessages.VDS_CANNOT_CLEAR_VMS_WRONG_STATUS ) ; returnValue = false ; } return returnValue ; }
Source:
private void handleVdsLiveSnapshotFailure ( org.ovirt.engine.core.common.errors.VdcBLLException e ) { log.warnFormat ( "Wasn't able to live snpashot due to error: {0}. VM will still be configured to the new created snapshot" , org.apache.commons.lang.exception.ExceptionUtils.getMessage ( e ) ) ; addCustomValue ( "SnapshotName" , org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommand.getSnapshotName ( ) ) ; addCustomValue ( "VmName" , org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommand.getVmName ( ) ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.log ( this , AuditLogType.USER_CREATE_LIVE_SNAPSHOT_FINISHED_FAILURE ) ; }

Target:
private void handleVdsLiveSnapshotFailure ( org.ovirt.engine.core.common.errors.VdcBLLException e ) { log.warnFormat ( "Wasn't able to live snpashot due to error: {0}. VM will still be configured to the new created snapshot" , org.apache.commons.lang.exception.ExceptionUtils.getMessage ( e ) ) ; addCustomValue ( "SnapshotName" , org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommand.getSnapshotName ( ) ) ; addCustomValue ( "VmName" , org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommand.getVmName ( ) ) ; updateCallStackFromThrowable ( e ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.log ( this , AuditLogType.USER_CREATE_LIVE_SNAPSHOT_FINISHED_FAILURE ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc glusterVolumeGeoRepSessionPause ( java.lang.String masterVolumeName , java.lang.String slaveHost , java.lang.String slaveVolumeName , boolean force ) { try { return new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( vdsServer.glusterVolumeGeoRepSessionPause ( masterVolumeName , slaveHost , slaveVolumeName , force ) ) ; } 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 glusterVolumeGeoRepSessionPause ( java.lang.String masterVolumeName , java.lang.String slaveHost , java.lang.String slaveVolumeName , java.lang.String userName , boolean force ) { try { return new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( vdsServer.glusterVolumeGeoRepSessionPause ( masterVolumeName , slaveHost , slaveVolumeName , userName , force ) ) ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
private boolean isConsoleCommandsExecutionAllowed ( ) { org.ovirt.engine.ui.uicommonweb.models.ConsoleProtocol protocol = consoleUtils.determineConnectionProtocol ( this ) ; return consoleUtils.canShowConsole ( protocol , this ) ; }

Target:
private void RunOnce ( ) { org.ovirt.engine.core.common.businessentities.VM vm = ( ( org.ovirt.engine.core.common.businessentities.VM ) ( getSelectedItem ( ) ) ) ; org.ovirt.engine.ui.uicommonweb.models.vms.RunOnceModel model = new org.ovirt.engine.ui.uicommonweb.models.vms.WebadminRunOnceModel ( vm , getCustomPropertiesKeysList ( ) . get ( vm.getVdsGroupCompatibilityVersion ( ) ) , this ) ; setWindow ( model ) ; model.init ( ) ; }
Source:
public static org.ovirt.engine.api.model.GlusterVolumeType map ( org.ovirt.engine.api.model.GlusterVolumeType glusterVolumeType , org.ovirt.engine.api.model.GlusterVolumeType template ) { switch ( glusterVolumeType ) { case DISTRIBUTE : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeType ; case REPLICATE : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeType ; case DISTRIBUTED_REPLICATE : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeType ; case STRIPE : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeType ; case DISTRIBUTED_STRIPE : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeType ; case STRIPED_REPLICATE : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeType ; case DISTRIBUTED_STRIPED_REPLICATE : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeType ; default : return null ; } }

Target:
public static org.ovirt.engine.api.model.GlusterVolumeType map ( org.ovirt.engine.api.model.GlusterVolumeType glusterVolumeType , org.ovirt.engine.api.model.GlusterVolumeType template ) { switch ( glusterVolumeType ) { case DISTRIBUTE : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeType ; case REPLICATE : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeType ; case DISTRIBUTED_REPLICATE : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeType ; case STRIPE : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeType ; case DISTRIBUTED_STRIPE : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeType ; case STRIPED_REPLICATE : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeType ; case DISTRIBUTED_STRIPED_REPLICATE : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeType ; case DISPERSE : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeType ; case DISTRIBUTED_DISPERSE : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeType ; default : return null ; } }