auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void testGetSupportedHostFeaturesByHostId ( ) { java.util.Set < java.lang.String > featuresSupported = dao.getSupportedHostFeaturesByHostId ( FixturesTool.HOST_ID ) ; org.junit.Assert.assertNotNull ( "Failed to retrive supported addtional features in the host" , featuresSupported ) ; java.util.Set < java.lang.String > expectedFeatures = new java.util.HashSet < > ( java.util.Arrays.asList ( "TEST_FEATURE_1" , "TEST_FEATURE_2" ) ) ; org.junit.Assert.assertEquals ( "Failed to retrive supported addtional features in the host" , expectedFeatures , featuresSupported ) ; }

Target:
public void testGetSupportedHostFeaturesByHostId ( ) { java.util.Set < java.lang.String > featuresSupported = dao.getSupportedHostFeaturesByHostId ( FixturesTool.HOST_ID ) ; org.junit.jupiter.api.Assertions.assertNotNull ( featuresSupported , "Failed to retrive supported addtional features in the host" ) ; java.util.Set < java.lang.String > expectedFeatures = new java.util.HashSet < > ( java.util.Arrays.asList ( "TEST_FEATURE_1" , "TEST_FEATURE_2" ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( expectedFeatures , featuresSupported , "Failed to retrive supported addtional features in the host" ) ; }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { updateFencingPolicyContent ( ( ( getVersion ( ) ) == null ? null : getVersion ( ) . getSelectedItem ( ) ) ) ; }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { if ( ( ( getEnableTrustedService ( ) . getEntity ( ) ) != null ) && ( getEnableTrustedService ( ) . getEntity ( ) ) ) { getEnableGlusterService ( ) . setEntity ( false ) ; getEnableGlusterService ( ) . setIsChangable ( false ) ; } else { getEnableGlusterService ( ) . setIsChangable ( true ) ; } }
Source:
public void execute ( ) { com.google.gwt.event.logical.shared.ValueChangeEvent.fire ( nameEditor.asValueBox ( ) , nameEditor.asValueBox ( ) . getValue ( ) ) ; }

Target:
public void edit ( final org.ovirt.engine.ui.uicommonweb.models.profiles.VnicProfileModel model ) { driver.edit ( model ) ; publicInfo.setVisible ( model.getPublicUse ( ) . getIsAvailable ( ) ) ; nameEditor.fireValueChangeOnKeyDown ( ) ; model.getName ( ) . getEntityChangedEvent ( ) . 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 ) { com.google.gwt.event.logical.shared.ValueChangeEvent.fire ( org.ovirt.engine.ui.webadmin.widget.vnicProfile.VnicProfileWidget.this , model ) ; } } ) ; }
Source:
public void initSoundDeviceSupportMap ( ) { org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.OsRepository , new org.ovirt.engine.core.common.queries.OsQueryParameters ( org.ovirt.engine.core.common.queries.OsQueryParameters.OsRepositoryVerb.GetSoundDeviceSupportMap ) , new org.ovirt.engine.ui.frontend.AsyncQuery ( new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object result ) { soundDeviceSupportMap = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( result ) ) . getReturnValue ( ) ; } } ) ) ; }

Target:
public void initSoundDeviceSupportMap ( ) { org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.OsRepository , new org.ovirt.engine.core.common.queries.OsQueryParameters ( org.ovirt.engine.core.common.queries.OsQueryParameters.OsRepositoryVerb.GetSoundDeviceSupportMap ) , new org.ovirt.engine.ui.frontend.AsyncQuery ( new org.ovirt.engine.ui.frontend.AsyncCallback < org.ovirt.engine.core.common.queries.VdcQueryReturnValue > ( ) { @ java.lang.Override public void onSuccess ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue result ) { soundDeviceSupportMap = result.getReturnValue ( ) ; } } ) ) ; }
Source:
public void testStatisticalQuery ( ) throws java.lang.Exception { org.ovirt.engine.api.model.VM entity = setUpStatisticalExpectations ( ) ; @ java.lang.SuppressWarnings ( value = "unchecked" ) org.ovirt.engine.api.restapi.resource.BackendStatisticsResource < org.ovirt.engine.api.model.VM , org.ovirt.engine.api.model.VM > statisticsResource = ( ( org.ovirt.engine.api.restapi.resource.BackendStatisticsResource < org.ovirt.engine.api.model.VM , org.ovirt.engine.api.model.VM > ) ( resource.getStatisticsResource ( ) ) ) ; assertNotNull ( statisticsResource ) ; verifyQuery ( statisticsResource.getQuery ( ) , entity ) ; }

Target:
public void testStatisticalQuery ( ) throws java.lang.Exception { org.ovirt.engine.api.restapi.resource.VM entity = setUpStatisticalExpectations ( ) ; @ java.lang.SuppressWarnings ( value = "unchecked" ) org.ovirt.engine.api.restapi.resource.BackendStatisticsResource < org.ovirt.engine.api.model.Vm , org.ovirt.engine.api.restapi.resource.VM > statisticsResource = ( ( org.ovirt.engine.api.restapi.resource.BackendStatisticsResource < org.ovirt.engine.api.model.Vm , org.ovirt.engine.api.restapi.resource.VM > ) ( resource.getStatisticsResource ( ) ) ) ; assertNotNull ( statisticsResource ) ; verifyQuery ( statisticsResource.getQuery ( ) , entity ) ; }
Source:
public void onFailureResetInitialStatus ( ) { mockExecutor ( false ) ; try { command.executeCommand ( ) ; } catch ( org.ovirt.engine.core.common.errors.EngineException exception ) { org.mockito.Mockito.verify ( vdsBrokerFrontend ) . runVdsCommand ( org.mockito.ArgumentMatchers.eq ( VDSCommandType.SetVdsStatus ) , org.mockito.ArgumentMatchers.any ( ) ) ; return ; } org.junit.jupiter.api.Assertions.fail ( ) ; }

Target:
public void onFailureResetInitialStatus ( ) { mockExecutor ( false ) ; org.junit.jupiter.api.Assertions.assertThrows ( org.ovirt.engine.core.common.errors.EngineException.class , command :: executeCommand ) ; org.mockito.Mockito.verify ( vdsBrokerFrontend ) . runVdsCommand ( org.mockito.ArgumentMatchers.eq ( VDSCommandType.SetVdsStatus ) , org.mockito.ArgumentMatchers.any ( ) ) ; }
Source:
public void testIsNetworkInSyncWhenGatewayBothBlank ( ) { java.util.List < java.lang.String > blankValues = java.util.Arrays.asList ( null , "" ) ; initIpConfigurationStaticBootProtocol ( NetworkBootProtocol.STATIC_IP ) ; int blankIndex = org.ovirt.engine.core.utils.RandomUtils.instance ( ) . nextInt ( 2 ) ; org.mockito.Mockito.when ( mockedIPv4Address.getGateway ( ) ) . thenReturn ( blankValues.get ( blankIndex ) ) ; iface.setIpv4Gateway ( blankValues.get ( ( blankIndex ^ 1 ) ) ) ; org.junit.Assert.assertThat ( createTestedInstance ( ) . isNetworkInSync ( ) , org.hamcrest.CoreMatchers.is ( true ) ) ; }

Target:
public void testIsNetworkInSyncWhenGatewayBothBlank ( ) { java.util.List < java.lang.String > blankValues = java.util.Arrays.asList ( null , "" ) ; initIpConfigurationStaticBootProtocol ( Ipv4BootProtocol.STATIC_IP ) ; int blankIndex = org.ovirt.engine.core.utils.RandomUtils.instance ( ) . nextInt ( 2 ) ; org.mockito.Mockito.when ( mockedIPv4Address.getGateway ( ) ) . thenReturn ( blankValues.get ( blankIndex ) ) ; iface.setIpv4Gateway ( blankValues.get ( ( blankIndex ^ 1 ) ) ) ; org.junit.Assert.assertThat ( createTestedInstance ( ) . isNetworkInSync ( ) , org.hamcrest.CoreMatchers.is ( true ) ) ; }
Source:
public void calculateNetworkImplementationDetailsNetworkVlanOutOfSync ( ) 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 ( ) ) + 1 ) , null ) ; }

Target:
public void calculateNetworkImplementationDetailsNetworkVlanOutOfSync ( ) 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 ( ) ) + 1 ) , createQos ( ) ) ; }
Source:
private void init ( ) { setMasterVolume ( new org.ovirt.engine.ui.uicommonweb.models.EntityModel < java.lang.String > ( ) ) ; setSlaveVolume ( new org.ovirt.engine.ui.uicommonweb.models.EntityModel < java.lang.String > ( ) ) ; setSlaveHost ( new org.ovirt.engine.ui.uicommonweb.models.EntityModel < java.lang.String > ( ) ) ; setForce ( new org.ovirt.engine.ui.uicommonweb.models.EntityModel < java.lang.Boolean > ( ) ) ; }

Target:
private void init ( ) { setMasterVolume ( new org.ovirt.engine.ui.uicommonweb.models.EntityModel < java.lang.String > ( ) ) ; setSlaveVolume ( new org.ovirt.engine.ui.uicommonweb.models.EntityModel < java.lang.String > ( ) ) ; setSlaveHost ( new org.ovirt.engine.ui.uicommonweb.models.EntityModel < java.lang.String > ( ) ) ; setForce ( new org.ovirt.engine.ui.uicommonweb.models.EntityModel < java.lang.Boolean > ( ) ) ; force.setIsAvailable ( false ) ; }
Source:
public void testInterfaceAlreadyLabeledWithWhenInterfaceIsLabeledBySameLabel ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface vdsNetworkInterface = createVdsNetworkInterfaceWithName ( ) ; vdsNetworkInterface.setLabels ( java.util.Collections.singleton ( "labelA" ) ) ; org.junit.Assert.assertThat ( new org.ovirt.engine.core.bll.validator.HostInterfaceValidator ( vdsNetworkInterface ) . interfaceAlreadyLabeledWith ( "labelA" ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( VdcBllMessages.INTERFACE_ALREADY_LABELED ) ) ; }

Target:
public void testInterfaceAlreadyLabeledWithWhenInterfaceIsLabeledBySameLabel ( ) throws java.lang.Exception { java.lang.String labelA = "labelA" ; org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface vdsNetworkInterface = createVdsNetworkInterfaceWithName ( ) ; vdsNetworkInterface.setLabels ( java.util.Collections.singleton ( labelA ) ) ; org.hamcrest.Matcher < org.ovirt.engine.core.bll.ValidationResult > matcher = org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.INTERFACE_ALREADY_LABELED , org.ovirt.engine.core.utils.ReplacementUtils.createSetVariableString ( HostInterfaceValidator.VAR_LABELED_NIC , vdsNetworkInterface.getName ( ) ) , org.ovirt.engine.core.utils.ReplacementUtils.createSetVariableString ( HostInterfaceValidator.VAR_NIC_LABEL , labelA ) ) ; org.junit.Assert.assertThat ( new org.ovirt.engine.core.bll.validator.HostInterfaceValidator ( vdsNetworkInterface ) . interfaceAlreadyLabeledWith ( labelA ) , matcher ) ; }
Source:
protected void setUpQueryExpectations ( java.lang.String query , java.lang.Object failure ) throws java.lang.Exception { if ( failure == null ) { for ( int i = 0 ; i < ( NAMES.length ) ; i ++ ) { setUpGetEntityExpectations ( VdcQueryType.GetStorageServerConnectionById , org.ovirt.engine.core.common.queries.StorageServerConnectionQueryParametersBase.class , new java.lang.String [ ] { "ServerConnectionId" } , new java.lang.Object [ ] { GUIDS [ i ] . toString ( ) } , org.ovirt.engine.api.restapi.resource.BackendStorageDomainsResourceTest.setUpStorageServerConnection ( i ) ) ; } } super . setUpQueryExpectations ( query , failure ) ; }

Target:
protected void setUpQueryExpectations ( java.lang.String query , java.lang.Object failure ) throws java.lang.Exception { if ( failure == null ) { for ( int i = 0 ; i < ( NAMES.length ) ; i ++ ) { setUpGetEntityExpectations ( QueryType.GetStorageServerConnectionById , org.ovirt.engine.core.common.queries.StorageServerConnectionQueryParametersBase.class , new java.lang.String [ ] { "ServerConnectionId" } , new java.lang.Object [ ] { GUIDS [ i ] . toString ( ) } , org.ovirt.engine.api.restapi.resource.BackendStorageDomainsResourceTest.setUpStorageServerConnection ( i ) ) ; } } super . setUpQueryExpectations ( query , failure ) ; }
Source:
protected java.util.List < org.ovirt.engine.api.model.Network > getClusterNetworks ( ) { org.ovirt.engine.core.common.businessentities.VDS vds = getEntity ( org.ovirt.engine.core.common.businessentities.VDS.class , VdcQueryType.GetVdsByVdsId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( org.ovirt.engine.core.compat.Guid.createGuidFromString ( getHostId ( ) ) ) , "Host" ) ; return getEntity ( java.util.List.class , VdcQueryType.GetAllNetworksByClusterId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vds.getVdsGroupId ( ) ) , "Networks" ) ; }

Target:
protected java.util.List < org.ovirt.engine.api.model.Network > getClusterNetworks ( ) { org.ovirt.engine.core.common.businessentities.VDS vds = getEntity ( org.ovirt.engine.core.common.businessentities.VDS.class , VdcQueryType.GetVdsByVdsId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( org.ovirt.engine.core.compat.Guid.createGuidFromStringDefaultEmpty ( getHostId ( ) ) ) , "Host" ) ; return getEntity ( java.util.List.class , VdcQueryType.GetAllNetworksByClusterId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vds.getVdsGroupId ( ) ) , "Networks" ) ; }
Source:
private static org.ovirt.engine.core.common.businessentities.StorageDomainStatic CloneStorageDomainStatic ( org.ovirt.engine.core.common.businessentities.StorageDomainStatic instance ) { org.ovirt.engine.core.common.businessentities.StorageDomainStatic obj = new org.ovirt.engine.core.common.businessentities.StorageDomainStatic ( ) ; obj.setConnection ( instance.getConnection ( ) ) ; obj.setId ( instance.getId ( ) ) ; obj.setStorage ( instance.getStorage ( ) ) ; obj.setStorageDomainType ( instance.getStorageDomainType ( ) ) ; obj.setStorageType ( instance.getStorageType ( ) ) ; obj.setStorageName ( instance.getStorageName ( ) ) ; obj.setStorageFormat ( instance.getStorageFormat ( ) ) ; return obj ; }

Target:
private static org.ovirt.engine.core.common.businessentities.StorageDomainStatic cloneStorageDomainStatic ( org.ovirt.engine.core.common.businessentities.StorageDomainStatic instance ) { org.ovirt.engine.core.common.businessentities.StorageDomainStatic obj = new org.ovirt.engine.core.common.businessentities.StorageDomainStatic ( ) ; obj.setConnection ( instance.getConnection ( ) ) ; obj.setId ( instance.getId ( ) ) ; obj.setStorage ( instance.getStorage ( ) ) ; obj.setStorageDomainType ( instance.getStorageDomainType ( ) ) ; obj.setStorageType ( instance.getStorageType ( ) ) ; obj.setStorageName ( instance.getStorageName ( ) ) ; obj.setStorageFormat ( instance.getStorageFormat ( ) ) ; return obj ; }
Source:
private org.ovirt.engine.core.common.action.VdcActionType getParentCommandType ( ) { org.ovirt.engine.core.common.action.VdcActionType parentCommand = org.ovirt.engine.core.common.action.VdcActionType.Unknown ; if ( parentHasCallback ( ) ) { if ( ( getTaskType ( ) ) == ( org.ovirt.engine.core.common.asynctasks.AsyncTaskType.notSupported ) ) { parentCommand = getParameters ( ) . getParentCommand ( ) ; } } else { parentCommand = getParameters ( ) . getParentCommand ( ) ; } return parentCommand ; }

Target:
protected java.util.ArrayList < org.ovirt.engine.core.compat.Guid > getTaskIdList ( ) { return ( getParameters ( ) . getParentCommand ( ) ) != ( org.ovirt.engine.core.common.action.VdcActionType.Unknown ) ? getReturnValue ( ) . getInternalVdsmTaskIdList ( ) : getReturnValue ( ) . getVdsmTaskIdList ( ) ; }
Source:
protected org.ovirt.engine.core.bll.ValidationResult networkNotUsedByVms ( final org.ovirt.engine.core.common.businessentities.network.Network network ) { java.util.List < org.ovirt.engine.core.common.businessentities.VM > vms = org.ovirt.engine.core.bll.network.dc.NetworkCommon.getVmDAO ( ) . getAllForNetwork ( network.getId ( ) ) ; if ( vms.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_NETWORK" , vms ) ; replacements.add ( VdcBllMessages.VAR__TYPE__VMS.name ( ) ) ; return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.dal.VdcBllMessages.ACTION_TYPE_FAILED_NETWORK_IN_USE , replacements ) ; }

Target:
private org.ovirt.engine.core.bll.ValidationResult networkNotUsed ( java.util.List < ? extends org.ovirt.engine.core.common.businessentities.Nameable > entities , org.ovirt.engine.core.dal.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_NETWORK" , entities ) ; replacements.add ( entitiesReplacement.name ( ) ) ; return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.dal.VdcBllMessages.ACTION_TYPE_FAILED_NETWORK_IN_USE , replacements ) ; }
Source:
private java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity > getBricks ( org.ovirt.engine.core.compat.Guid volumeId , int n ) { java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity > bricks = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity > ( ) ; org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity brick ; for ( java.lang.Integer i = 0 ; i < n ; i ++ ) { brick = new org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity ( volumeId , new org.ovirt.engine.core.common.businessentities.VdsStatic ( ) , ( "/tmp/test-vol" + ( i.toString ( ) ) ) , org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickStatus.UP ) ; bricks.add ( brick ) ; } return bricks ; }

Target:
private java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity > getBricks ( org.ovirt.engine.core.compat.Guid volumeId , int n ) { java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity > bricks = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity > ( ) ; org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity brick ; for ( java.lang.Integer i = 0 ; i < n ; i ++ ) { brick = new org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity ( volumeId , new org.ovirt.engine.core.common.businessentities.VdsStatic ( ) , ( "/tmp/test-vol" + ( i.toString ( ) ) ) , org.ovirt.engine.core.common.businessentities.gluster.GlusterStatus.UP ) ; bricks.add ( brick ) ; } return bricks ; }
Source:
public void init ( ) { super . init ( ) ; getIsAutoAssign ( ) . setEntity ( true ) ; getCustomPropertySheet ( ) . setKeyValueString ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getCustomPropertiesList ( ) . get ( vm.getVdsGroupCompatibilityVersion ( ) ) ) ; getCustomPropertySheet ( ) . deserialize ( vm.getCustomProperties ( ) ) ; loadHosts ( ) ; }

Target:
public void init ( ) { super . init ( ) ; getIsAutoAssign ( ) . setEntity ( true ) ; getCustomPropertySheet ( ) . setKeyValueMap ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getCustomPropertiesList ( ) . get ( vm.getVdsGroupCompatibilityVersion ( ) ) ) ; getCustomPropertySheet ( ) . deserialize ( vm.getCustomProperties ( ) ) ; loadHosts ( ) ; }
Source:
public static void GetClusterById ( 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.GetVdsGroupById , new org.ovirt.engine.core.common.queries.GetVdsGroupByIdParameters ( id ) , aQuery ) ; }

Target:
public static int GetClusterDefaultMemoryOverCommit ( ) { return 100 ; }
Source:
public static void GetDiskList ( 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.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ( ) ; } } ; org.ovirt.engine.core.common.queries.SearchParameters searchParams = new org.ovirt.engine.core.common.queries.SearchParameters ( "Disks:" , org.ovirt.engine.core.common.interfaces.SearchType.Disk ) ; searchParams.setMaxCount ( 9999 ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.Search , searchParams , aQuery ) ; }

Target:
public static void GetVmSnapshotList ( 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 ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllVmSnapshotsByVmId , new org.ovirt.engine.core.common.queries.GetAllVmSnapshotsByVmIdParameters ( id ) , aQuery ) ; }
Source:
public static java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmInterfaceType > getNicTypeList ( org.ovirt.engine.core.common.businessentities.VmOsType osType , boolean hasDualmode ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmInterfaceType > list = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmInterfaceType > ( java.util.Arrays.asList ( org.ovirt.engine.core.common.businessentities.network.VmInterfaceType.values ( ) ) ) ; list.remove ( VmInterfaceType.rtl8139_pv ) ; if ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.isWindowsOsType ( osType ) ) { if ( ( osType == ( org.ovirt.engine.core.common.businessentities.VmOsType.WindowsXP ) ) && hasDualmode ) { list.add ( VmInterfaceType.rtl8139_pv ) ; } } return list ; }

Target:
public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > list = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ) ( source ) ) ; java.util.Collections.sort ( list , new org.ovirt.engine.core.common.businessentities.comparators.NameableComparator ( ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ( ) ; }
Source:
public void modifiedAttachmentNotRemovedAttachmentModifiedAndRemoved ( ) { org.ovirt.engine.core.common.businessentities.network.NetworkAttachment modifiedAttachment = createNetworkAttachment ( new org.ovirt.engine.core.common.businessentities.network.Network ( ) ) ; org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidator validator = new org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidatorTest.HostSetupNetworksValidatorBuilder ( ) . setParams ( new org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidatorTest.ParametersBuilder ( ) . addRemovedNetworkAttachments ( modifiedAttachment ) ) . build ( ) ; org.junit.Assert.assertThat ( validator.modifiedAttachmentNotRemoved ( modifiedAttachment ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.NETWORK_ATTACHMENT_IN_BOTH_LISTS , org.ovirt.engine.core.utils.ReplacementUtils.createSetVariableString ( "NETWORK_ATTACHMENT_IN_BOTH_LISTS_ENTITY" , modifiedAttachment.getId ( ) . toString ( ) ) ) ) ; }

Target:
public void modifiedAttachmentNotRemovedAttachmentModifiedAndRemoved ( ) { org.ovirt.engine.core.common.businessentities.network.NetworkAttachment modifiedAttachment = createNetworkAttachment ( new org.ovirt.engine.core.common.businessentities.network.Network ( ) ) ; org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidator validator = new org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidatorTest.HostSetupNetworksValidatorBuilder ( ) . setParams ( new org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidatorTest.ParametersBuilder ( ) . addRemovedNetworkAttachments ( modifiedAttachment ) ) . build ( ) ; org.hamcrest.MatcherAssert.assertThat ( validator.modifiedAttachmentNotRemoved ( modifiedAttachment ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.NETWORK_ATTACHMENT_IN_BOTH_LISTS , org.ovirt.engine.core.utils.ReplacementUtils.createSetVariableString ( "NETWORK_ATTACHMENT_IN_BOTH_LISTS_ENTITY" , modifiedAttachment.getId ( ) . toString ( ) ) ) ) ; }
Source:
public java.lang.Boolean call ( ) throws java.lang.Exception { if ( ( _vds.isPmKdumpDetection ( ) ) && ( ! ( fenceKdumpSupported ) ) ) { _messages.post ( InstallerMessages.Severity.INFO , "Disabling Kdump integration" ) ; } _parser.cliEnvironmentSet ( KdumpEnv.ENABLE , ( ( _vds.isPmKdumpDetection ( ) ) && ( fenceKdumpSupported ) ) ) ; return true ; }

Target:
public java.lang.Boolean call ( ) throws java.lang.Exception { boolean enabled = ( ( _vds.getpm_enabled ( ) ) && ( _vds.isPmKdumpDetection ( ) ) ) && ( fenceKdumpSupported ) ; if ( ! enabled ) { _messages.post ( InstallerMessages.Severity.INFO , "Disabling Kdump integration" ) ; } _parser.cliEnvironmentSet ( KdumpEnv.ENABLE , enabled ) ; return true ; }
Source:
public void testGetAllOfType ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VDS > result = dao.getAllOfType ( VDSType.VDS ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.VDS vds : result ) { org.junit.Assert.assertEquals ( VDSType.VDS , vds.getvds_type ( ) ) ; } }

Target:
public void testGetVdsToRun ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VDS > result = dao.getVdsToRun ( VDSType.VDS , new org.ovirt.engine.core.compat.Guid ( "b399944a-81ab-4ec5-8266-e19ba7c3c9d1" ) , VDSStatus.Up , 0 ) ; org.ovirt.engine.core.dao.VdsDAOTest.assertIncorrectGetResult ( result ) ; }
Source:
public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.RepoFileMetaData > repoList = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.RepoFileMetaData > ) ( source ) ) ; java.util.ArrayList < java.lang.String > fileNameList = new java.util.ArrayList < java.lang.String > ( ) ; for ( org.ovirt.engine.core.common.businessentities.RepoFileMetaData RepoFileMetaData : repoList ) { fileNameList.add ( RepoFileMetaData.getRepoImageId ( ) ) ; } java.util.Collections.sort ( fileNameList , new org.ovirt.engine.ui.uicommonweb.Linq.CaseInsensitiveComparer ( ) ) ; return fileNameList ; } return new java.util.ArrayList < java.lang.String > ( ) ; }

Target:
public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.RepoFileMetaData > repoList = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.RepoFileMetaData > ) ( source ) ) ; java.util.ArrayList < java.lang.String > fileNameList = new java.util.ArrayList < java.lang.String > ( ) ; for ( org.ovirt.engine.core.common.businessentities.RepoFileMetaData RepoFileMetaData : repoList ) { fileNameList.add ( RepoFileMetaData.getRepoImageId ( ) ) ; } java.util.Collections.sort ( fileNameList , java.lang.String.CASE_INSENSITIVE_ORDER ) ; return fileNameList ; } return new java.util.ArrayList < java.lang.String > ( ) ; }
Source:
public void testWith0ScoreHostAndEnoughMemoryForTwo ( ) { parameters.put ( PolicyUnitParameter.HE_SPARES_COUNT.getDbName ( ) , "3" ) ; hostedEngine.setVmMemSizeMb ( 5000 ) ; hosts.get ( 2 ) . setHighlyAvailableScore ( 0 ) ; hosts.get ( 3 ) . setPhysicalMemMb ( 2048 ) ; hosts.get ( 4 ) . setPhysicalMemMb ( 2048 ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VDS > result = policyUnit.filter ( cluster , hosts , vm , parameters , messages ) ; org.junit.Assert.assertEquals ( 5 , result.size ( ) ) ; }

Target:
public void testWith0ScoreHostAndEnoughMemoryForTwo ( ) { parameters.put ( PolicyUnitParameter.HE_SPARES_COUNT.getDbName ( ) , "3" ) ; hostedEngine.setVmMemSizeMb ( 5000 ) ; hosts.get ( 2 ) . setHighlyAvailableScore ( 0 ) ; hosts.get ( 3 ) . setPhysicalMemMb ( 2048 ) ; hosts.get ( 4 ) . setPhysicalMemMb ( 2048 ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VDS > result = policyUnit.filter ( cluster , hosts , vm , parameters , messages ) ; org.junit.jupiter.api.Assertions.assertEquals ( 5 , result.size ( ) ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.StorageServerConnections createConnection ( org.ovirt.engine.core.compat.Guid id , java.lang.String connection , org.ovirt.engine.core.common.businessentities.StorageType type , org.ovirt.engine.core.common.businessentities.NfsVersion version , int timeout , int retrans ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections connectionDetails = new org.ovirt.engine.core.common.businessentities.StorageServerConnections ( ) ; connectionDetails.setid ( id.toString ( ) ) ; connectionDetails.setconnection ( connection ) ; connectionDetails.setNfsVersion ( version ) ; connectionDetails.setNfsTimeo ( ( ( short ) ( timeout ) ) ) ; connectionDetails.setstorage_type ( type ) ; connectionDetails.setNfsRetrans ( ( ( short ) ( retrans ) ) ) ; return connectionDetails ; }

Target:
private org.ovirt.engine.core.common.businessentities.StorageServerConnections populateBasicConnectionDetails ( org.ovirt.engine.core.compat.Guid id , java.lang.String connection , org.ovirt.engine.core.common.businessentities.StorageType type ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections connectionDetails = new org.ovirt.engine.core.common.businessentities.StorageServerConnections ( ) ; connectionDetails.setid ( id.toString ( ) ) ; connectionDetails.setconnection ( connection ) ; connectionDetails.setstorage_type ( type ) ; return connectionDetails ; }
Source:
private org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity getVolume ( int brickCount , boolean withDuplicateBricks ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity volumeEntity = new org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity ( ) ; volumeEntity.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; volumeEntity.setClusterId ( clusterId ) ; volumeEntity.setName ( "vol1" ) ; volumeEntity.setVolumeType ( GlusterVolumeType.DISTRIBUTE ) ; volumeEntity.setBricks ( getBricks ( volumeEntity.getId ( ) , brickCount , withDuplicateBricks ) ) ; return volumeEntity ; }

Target:
private org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity getVolume ( int brickCount , boolean withDuplicateBricks ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity volumeEntity = new org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity ( ) ; volumeEntity.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; volumeEntity.setClusterId ( org.ovirt.engine.core.bll.gluster.CreateGlusterVolumeCommandTest.clusterId ) ; volumeEntity.setName ( "vol1" ) ; volumeEntity.setVolumeType ( GlusterVolumeType.DISTRIBUTE ) ; volumeEntity.setBricks ( getBricks ( volumeEntity.getId ( ) , brickCount , withDuplicateBricks ) ) ; return volumeEntity ; }
Source:
public void testRemoveNonExistant ( ) { setUpGetEntityExpectations ( QueryType.GetVmTemplate , org.ovirt.engine.core.common.queries.GetVmTemplateParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , null ) ; try { resource.remove ( ) ; org.junit.jupiter.api.Assertions.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { org.junit.jupiter.api.Assertions.assertNotNull ( wae.getResponse ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( 404 , wae.getResponse ( ) . getStatus ( ) ) ; } }

Target:
public void testRemoveNonExistant ( ) { setUpGetEntityExpectations ( QueryType.GetVmTemplate , org.ovirt.engine.core.common.queries.GetVmTemplateParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , null ) ; try { resource.remove ( ) ; org.junit.jupiter.api.Assertions.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }
Source:
public 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 ) ; }

Target:
public void getHostFingerprint ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String hostAddress ) { 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.GetServerSSHKeyFingerprint , new org.ovirt.engine.core.common.queries.ServerParameters ( hostAddress ) , aQuery ) ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult networkNotAttachedToHost ( ) { return org.ovirt.engine.core.bll.ValidationResult.failWith ( EngineMessage.NETWORK_ALREADY_ATTACHED_TO_HOST ) . when ( networkAttachedToHost ( ) ) ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult networkNotAttachedToHost ( ) { return org.ovirt.engine.core.bll.ValidationResult.failWith ( EngineMessage.NETWORK_ALREADY_ATTACHED_TO_HOST , org.ovirt.engine.core.utils.ReplacementUtils.createSetVariableString ( "networkName" , getNetwork ( ) . getName ( ) ) , org.ovirt.engine.core.utils.ReplacementUtils.createSetVariableString ( "hostName" , host.getName ( ) ) ) . when ( networkAttachedToHost ( ) ) ; }
Source:
public void getUpHostListByCluster ( 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.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 > ( ) ; } } ; getUpHostListByCluster ( aQuery , clusterName , null ) ; }

Target:
public 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 void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; dao = dbFacade.getRoleDao ( ) ; existingRole = dao.get ( new org.ovirt.engine.core.compat.Guid ( "f5972bfa-7102-4d33-ad22-9dd421bfba78" ) ) ; newRole = new org.ovirt.engine.core.common.businessentities.Role ( ) ; newRole.setname ( "new role" ) ; newRole.setdescription ( "This is a new role." ) ; newRole.setType ( RoleType.USER ) ; newRole.setAllowsViewingChildren ( false ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; dao = dbFacade.getRoleDao ( ) ; existingRole = dao.get ( new org.ovirt.engine.core.compat.Guid ( "f5972bfa-7102-4d33-ad22-9dd421bfba78" ) ) ; newRole = new org.ovirt.engine.core.common.businessentities.Role ( ) ; newRole.setname ( "new role" ) ; newRole.setdescription ( "This is a new role." ) ; newRole.setType ( RoleType.USER ) ; newRole.setAllowsViewingChildren ( false ) ; newRole.setAppMode ( ApplicationMode.AllModes ) ; }
Source:
public void getPermittedStorageDomainsByStoragePoolId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId , org.ovirt.engine.core.common.businessentities.ActionGroup actionGroup ) { 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.core.common.queries.GetPermittedStorageDomainsByStoragePoolIdParameters params = new org.ovirt.engine.core.common.queries.GetPermittedStorageDomainsByStoragePoolIdParameters ( ) ; params.setStoragePoolId ( dataCenterId ) ; params.setActionGroup ( actionGroup ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetPermittedStorageDomainsByStoragePoolId , params , aQuery ) ; }

Target:
public void getVmsRunningOnOrMigratingToVds ( 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 ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmsRunningOnOrMigratingToVds , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
protected void ExecuteVmCommand ( ) { if ( diskShouldBeUnPlugged ( ) ) { performPlugCommnad ( VDSCommandType.HotUnPlugDisk , disk , vmDevice ) ; } org.ovirt.engine.core.bll.DetachDiskFromVmCommand.getVmDeviceDao ( ) . remove ( vmDevice.getId ( ) ) ; org.ovirt.engine.core.bll.VmHandler.updateDisksFromDb ( org.ovirt.engine.core.bll.DetachDiskFromVmCommand.getVm ( ) ) ; org.ovirt.engine.core.bll.utils.VmDeviceUtils.updateBootOrderInVmDevice ( org.ovirt.engine.core.bll.DetachDiskFromVmCommand.getVm ( ) . getStaticData ( ) ) ; org.ovirt.engine.core.bll.DetachDiskFromVmCommand.setSucceeded ( true ) ; }

Target:
protected void executeVmCommand ( ) { if ( diskShouldBeUnPlugged ( ) ) { performPlugCommnad ( VDSCommandType.HotUnPlugDisk , disk , vmDevice ) ; } org.ovirt.engine.core.bll.DetachDiskFromVmCommand.getVmDeviceDao ( ) . remove ( vmDevice.getId ( ) ) ; org.ovirt.engine.core.bll.VmHandler.updateDisksFromDb ( org.ovirt.engine.core.bll.DetachDiskFromVmCommand.getVm ( ) ) ; org.ovirt.engine.core.bll.utils.VmDeviceUtils.updateBootOrderInVmDevice ( org.ovirt.engine.core.bll.DetachDiskFromVmCommand.getVm ( ) . getStaticData ( ) ) ; org.ovirt.engine.core.bll.DetachDiskFromVmCommand.setSucceeded ( true ) ; }
Source:
public void persistCommand ( org.ovirt.engine.core.common.action.VdcActionType parentCommand , org.ovirt.engine.core.bll.context.CommandContext cmdContext , boolean enableCallBack ) { javax.transaction.Transaction transaction = org.ovirt.engine.core.utils.transaction.TransactionSupport.suspend ( ) ; try { org.ovirt.engine.core.bll.tasks.TaskManagerUtil.persistCommand ( buildCommandEntity ( getParentParameters ( parentCommand ) . getCommandId ( ) , enableCallBack ) , cmdContext ) ; } finally { if ( transaction != null ) { org.ovirt.engine.core.utils.transaction.TransactionSupport.resume ( transaction ) ; } } }

Target:
public void persistCommand ( org.ovirt.engine.core.common.action.VdcActionType parentCommand , org.ovirt.engine.core.bll.context.CommandContext cmdContext , boolean enableCallBack ) { javax.transaction.Transaction transaction = org.ovirt.engine.core.utils.transaction.TransactionSupport.suspend ( ) ; try { org.ovirt.engine.core.bll.tasks.CommandCoordinatorUtil.persistCommand ( buildCommandEntity ( getParentParameters ( parentCommand ) . getCommandId ( ) , enableCallBack ) , cmdContext ) ; } finally { if ( transaction != null ) { org.ovirt.engine.core.utils.transaction.TransactionSupport.resume ( transaction ) ; } } }
Source:
public void validateWrongDiskImageTypeTemplate ( ) { initializeCommand ( new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ) ; initTemplateDiskImage ( ) ; org.junit.Assert.assertFalse ( command.validate ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getValidationMessages ( ) . contains ( EngineMessage.ACTION_TYPE_FAILED_DISK_IS_NOT_VM_DISK.toString ( ) ) ) ; }

Target:
public void moveShareableDiskToGlusterDomain ( ) { initializeCommand ( new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ) ; initSrcStorageDomain ( ) ; initDestStorageDomain ( StorageType.GLUSTERFS ) ; initVmDiskImage ( true ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( command , EngineMessage.ACTION_TYPE_FAILED_CANT_MOVE_SHAREABLE_DISK_TO_GLUSTERFS ) ; }
Source:
public static void execute ( java.lang.Runnable command ) { try { org.ovirt.engine.core.utils.threadpool.ThreadPoolUtil.es.submit ( new org.ovirt.engine.core.utils.threadpool.ThreadPoolUtil.InternalWrapperRunnable ( command , org.ovirt.engine.core.utils.ThreadLocalParamsContainer.getVdcUser ( ) , org.ovirt.engine.core.utils.ThreadLocalParamsContainer.getHttpSessionId ( ) , org.ovirt.engine.core.utils.ThreadLocalParamsContainer.getCorrelationId ( ) ) ) ; } catch ( java.util.concurrent.RejectedExecutionException e ) { org.ovirt.engine.core.utils.threadpool.ThreadPoolUtil.log.warn ( "The thread pool is out of limit. A submitted task was rejected" ) ; throw e ; } }

Target:
public static void execute ( java.lang.Runnable command ) { try { org.ovirt.engine.core.utils.threadpool.ThreadPoolUtil.es.submit ( new org.ovirt.engine.core.utils.threadpool.ThreadPoolUtil.InternalWrapperRunnable ( command , org.ovirt.engine.core.utils.ThreadLocalParamsContainer.getUser ( ) , org.ovirt.engine.core.utils.ThreadLocalParamsContainer.getHttpSessionId ( ) , org.ovirt.engine.core.utils.ThreadLocalParamsContainer.getCorrelationId ( ) ) ) ; } catch ( java.util.concurrent.RejectedExecutionException e ) { org.ovirt.engine.core.utils.threadpool.ThreadPoolUtil.log.warn ( "The thread pool is out of limit. A submitted task was rejected" ) ; throw e ; } }
Source:
protected org.ovirt.engine.api.model.GlusterBricks resolveCreatedList ( org.ovirt.engine.core.common.action.VdcReturnValueBase result , org.ovirt.engine.api.restapi.resource.gluster.EntityIdResolver < org.ovirt.engine.core.compat.Guid > entityResolver ) { try { org.ovirt.engine.api.model.GlusterBricks bricks = new org.ovirt.engine.api.model.GlusterBricks ( ) ; for ( org.ovirt.engine.core.compat.Guid id : ( ( java.util.List < org.ovirt.engine.core.compat.Guid > ) ( result.getActionReturnValue ( ) ) ) ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity created = entityResolver.resolve ( id ) ; bricks.getGlusterBricks ( ) . add ( addLinks ( doPopulate ( map ( created ) , created ) ) ) ; } return bricks ; } catch ( java.lang.Exception e ) { e.printStackTrace ( ) ; return null ; } }

Target:
protected org.ovirt.engine.api.model.GlusterBricks resolveCreatedList ( org.ovirt.engine.core.common.action.VdcReturnValueBase result , org.ovirt.engine.api.restapi.resource.gluster.EntityIdResolver < org.ovirt.engine.core.compat.Guid > entityResolver ) { try { org.ovirt.engine.api.model.GlusterBricks bricks = new org.ovirt.engine.api.model.GlusterBricks ( ) ; for ( org.ovirt.engine.core.compat.Guid id : ( ( java.util.List < org.ovirt.engine.core.compat.Guid > ) ( result.getActionReturnValue ( ) ) ) ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity created = entityResolver.resolve ( id ) ; bricks.getGlusterBricks ( ) . add ( addLinks ( populate ( map ( created ) , created ) ) ) ; } return bricks ; } catch ( java.lang.Exception e ) { e.printStackTrace ( ) ; return null ; } }
Source:
private void revertPreviousHandlers ( ) { getParameters ( ) . decrementExecutionIndex ( ) ; if ( ( getExecutionIndex ( ) ) >= 0 ) { log.errorFormat ( "Reverting task handler: {0}" , getCurrentTaskHandler ( ) . getClass ( ) . getName ( ) ) ; getParameters ( ) . setExecutionReason ( CommandExecutionReason.ROLLBACK_FLOW ) ; getCurrentTaskHandler ( ) . compensate ( ) ; if ( ! ( hasRevertTask ( ) ) ) { revertPreviousHandlers ( ) ; } } }

Target:
private void revertPreviousHandlers ( ) { getParameters ( ) . decrementExecutionIndex ( ) ; if ( ( getExecutionIndex ( ) ) >= 0 ) { logRollbackedTask ( ) ; getParameters ( ) . setExecutionReason ( CommandExecutionReason.ROLLBACK_FLOW ) ; getCurrentTaskHandler ( ) . compensate ( ) ; if ( ! ( hasRevertTask ( ) ) ) { revertPreviousHandlers ( ) ; } } }
Source:
private org.ovirt.engine.api.model.KatelloErrata mapCollection ( java.util.List < org.ovirt.engine.core.common.businessentities.Erratum > entities ) { org.ovirt.engine.api.model.KatelloErrata collection = new org.ovirt.engine.api.model.KatelloErrata ( ) ; for ( org.ovirt.engine.core.common.businessentities.Erratum entity : entities ) { collection.getKatelloErrata ( ) . add ( addLinks ( populate ( map ( entity ) , entity ) , org.ovirt.engine.api.model.VM.class ) ) ; } return collection ; }

Target:
private org.ovirt.engine.api.model.KatelloErrata mapCollection ( java.util.List < org.ovirt.engine.core.common.businessentities.Erratum > entities ) { org.ovirt.engine.api.model.KatelloErrata collection = new org.ovirt.engine.api.model.KatelloErrata ( ) ; for ( org.ovirt.engine.core.common.businessentities.Erratum entity : entities ) { collection.getKatelloErrata ( ) . add ( addLinks ( populate ( map ( entity ) , entity ) , org.ovirt.engine.api.model.Vm.class ) ) ; } return collection ; }
Source:
public org.ovirt.engine.core.common.businessentities.VdsNetworkInterface.NetworkImplementationDetails getNetworkImplementationDetails ( ) { if ( ! ( isAttached ( ) ) ) { return null ; } org.ovirt.engine.core.common.businessentities.VdsNetworkInterface nic = ( hasVlan ( ) ) ? getBridge ( ) . getEntity ( ) : getAttachedToNic ( ) . getEntity ( ) ; return nic.getNetworkImplementationDetails ( ) ; }

Target:
public org.ovirt.engine.core.common.businessentities.VdsNetworkInterface.NetworkImplementationDetails getNetworkImplementationDetails ( ) { if ( ! ( isAttached ( ) ) ) { return null ; } org.ovirt.engine.core.common.businessentities.VdsNetworkInterface nic = ( hasVlan ( ) ) ? getVlanNic ( ) . getEntity ( ) : getAttachedToNic ( ) . getEntity ( ) ; return nic.getNetworkImplementationDetails ( ) ; }