auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; dao = dbFacade.getStoragePoolDao ( ) ; existingPool = dao.get ( FixturesTool.DATA_CENTER ) ; existingPool.setStatus ( StoragePoolStatus.Up ) ; vds = FixturesTool.VDS_RHEL6_NFS_SPM ; cluster = FixturesTool.CLUSTER ; storageDomain = new org.ovirt.engine.core.compat.Guid ( "72e3a666-89e1-4005-a7ca-f7548004a9ab" ) ; newPool = new org.ovirt.engine.core.common.businessentities.StoragePool ( ) ; newPool.setName ( "newPoolDude" ) ; newPool.setCompatibilityVersion ( org.ovirt.engine.core.compat.Version.getLast ( ) ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; dao = dbFacade.getStoragePoolDao ( ) ; existingPool = dao.get ( FixturesTool.DATA_CENTER ) ; existingPool.setStatus ( StoragePoolStatus.Up ) ; vds = FixturesTool.VDS_RHEL6_NFS_SPM ; cluster = FixturesTool.CLUSTER ; storageDomain = FixturesTool.STORAGE_DOMAIN_SCALE_SD5 ; newPool = new org.ovirt.engine.core.common.businessentities.StoragePool ( ) ; newPool.setName ( "newPoolDude" ) ; newPool.setCompatibilityVersion ( org.ovirt.engine.core.compat.Version.getLast ( ) ) ; }
Source:
protected void setUpQueryExpectations ( java.lang.String query , java.lang.Object failure ) { org.junit.Assert.assertEquals ( "" , query ) ; setUpEntityQueryExpectations ( QueryType.GetVdsInterfacesByVdsId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendHostNicsResourceTest.PARENT_GUID } , org.ovirt.engine.api.restapi.resource.BackendHostNicsResourceTest.setUpInterfaces ( ) , failure ) ; }

Target:
protected void setUpQueryExpectations ( java.lang.String query , java.lang.Object failure ) { org.junit.jupiter.api.Assertions.assertEquals ( "" , query ) ; setUpEntityQueryExpectations ( QueryType.GetVdsInterfacesByVdsId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendHostNicsResourceTest.PARENT_GUID } , org.ovirt.engine.api.restapi.resource.BackendHostNicsResourceTest.setUpInterfaces ( ) , failure ) ; }
Source:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { java.lang.Object [ ] array = ( ( java.lang.Object [ ] ) ( target ) ) ; org.ovirt.engine.ui.uicommonweb.models.vms.ExistingVmModelBehavior behavior = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.ExistingVmModelBehavior ) ( array [ 0 ] ) ) ; org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel ) ( array [ 1 ] ) ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > clusters = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ) ( returnValue ) ) ; InitClusters ( clusters , model ) ; behavior.InitTemplate ( ) ; behavior.InitCdImage ( ) ; }

Target:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { java.lang.Object [ ] array = ( ( java.lang.Object [ ] ) ( target ) ) ; org.ovirt.engine.ui.uicommonweb.models.vms.ExistingVmModelBehavior behavior = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.ExistingVmModelBehavior ) ( array [ 0 ] ) ) ; org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel ) ( array [ 1 ] ) ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > clusters = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ) ( returnValue ) ) ; initClusters ( clusters , model ) ; behavior.initTemplate ( ) ; behavior.initCdImage ( ) ; }
Source:
public void onKeyPress ( com.google.gwt.event.dom.client.KeyPressEvent event ) { if ( ( com.google.gwt.event.dom.client.KeyCodes.KEY_ENTER ) == ( event.getNativeEvent ( ) . getKeyCode ( ) ) ) { model.setSearchString ( getView ( ) . getSearchString ( ) . getValue ( ) ) ; getView ( ) . getSearchButton ( ) . getCommand ( ) . Execute ( ) ; } }

Target:
public void eventRaised ( org.ovirt.engine.core.compat.Event ev , java.lang.Object sender , org.ovirt.engine.core.compat.EventArgs args ) { getView ( ) . getSearchButton ( ) . getCommand ( ) . setIsExecutionAllowed ( ( ! ( ( java.lang.Boolean ) ( model.getSearchInProgress ( ) . getEntity ( ) ) ) ) ) ; }
Source:
public void invoke ( org.ovirt.engine.api.extensions.ExtMap context , java.util.Map < java.lang.String , java.lang.Object > args ) { throw new java.lang.RuntimeException ( "TBD" ) ; }

Target:
public void invoke ( org.ovirt.engine.api.extensions.ExtMap context , java.util.Map < java.lang.String , java.lang.Object > args ) { if ( ! ( context.containsKey ( ContextKeys.EXIT_STATUS ) ) ) { context.put ( Schema.InvokeKeys.MODIFICATION_TYPE , Sql.ModificationTypes.DELETE ) ; context.put ( Schema.InvokeKeys.ENTITY_KEYS , new org.ovirt.engine.api.extensions.ExtMap ( ) . mput ( Schema.UserIdentifiers.USERNAME , context.get ( ContextKeys.POSITIONAL ) ) ) ; } if ( ! ( context.containsKey ( ContextKeys.EXIT_STATUS ) ) ) { org.ovirt.engine.extension.aaa.jdbc.binding.cli.Cli.commands.get ( "_schema-modify" ) . invoke ( context ) ; context.putIfAbsent ( ContextKeys.EXIT_STATUS , org.ovirt.engine.extension.aaa.jdbc.binding.cli.Cli.SUCCESS ) ; } }
Source:
protected void endSuccessfully ( ) { org.ovirt.engine.core.bll.TryBackToAllSnapshotsOfVmCommand.endActionOnDisks ( ) ; if ( ( org.ovirt.engine.core.bll.TryBackToAllSnapshotsOfVmCommand.getVm ( ) ) != null ) { org.ovirt.engine.core.bll.VmHandler.unlockVm ( org.ovirt.engine.core.bll.TryBackToAllSnapshotsOfVmCommand.getVm ( ) , org.ovirt.engine.core.bll.TryBackToAllSnapshotsOfVmCommand.getCompensationContext ( ) ) ; restoreVmConfigFromSnapshot ( ) ; } else { org.ovirt.engine.core.bll.TryBackToAllSnapshotsOfVmCommand.setCommandShouldBeLogged ( false ) ; log.warn ( "VmCommand::EndVmCommand: Vm is null - not performing EndAction on Vm" ) ; } org.ovirt.engine.core.bll.TryBackToAllSnapshotsOfVmCommand.setSucceeded ( true ) ; }

Target:
protected void endSuccessfully ( ) { org.ovirt.engine.core.bll.TryBackToAllSnapshotsOfVmCommand.getVmStaticDAO ( ) . incrementDbGeneration ( org.ovirt.engine.core.bll.TryBackToAllSnapshotsOfVmCommand.getVm ( ) . getId ( ) ) ; org.ovirt.engine.core.bll.TryBackToAllSnapshotsOfVmCommand.endActionOnDisks ( ) ; if ( ( org.ovirt.engine.core.bll.TryBackToAllSnapshotsOfVmCommand.getVm ( ) ) != null ) { org.ovirt.engine.core.bll.VmHandler.unlockVm ( org.ovirt.engine.core.bll.TryBackToAllSnapshotsOfVmCommand.getVm ( ) , org.ovirt.engine.core.bll.TryBackToAllSnapshotsOfVmCommand.getCompensationContext ( ) ) ; restoreVmConfigFromSnapshot ( ) ; } else { org.ovirt.engine.core.bll.TryBackToAllSnapshotsOfVmCommand.setCommandShouldBeLogged ( false ) ; log.warn ( "VmCommand::EndVmCommand: Vm is null - not performing EndAction on Vm" ) ; } org.ovirt.engine.core.bll.TryBackToAllSnapshotsOfVmCommand.setSucceeded ( true ) ; }
Source:
private void setIcon ( java.lang.String iconCss ) { org.gwtbootstrap3.client.ui.html.Span iconPanel = new org.gwtbootstrap3.client.ui.html.Span ( ) ; iconPanel.addStyleName ( getBaseStyle ( iconCss ) ) ; iconPanel.addStyleName ( iconCss ) ; add ( iconPanel ) ; }

Target:
private void addIcon ( java.lang.String iconCss ) { if ( ( iconCss != null ) && ( ! ( iconCss.isEmpty ( ) ) ) ) { org.gwtbootstrap3.client.ui.html.Span iconPanel = new org.gwtbootstrap3.client.ui.html.Span ( ) ; iconPanel.addStyleName ( getBaseStyle ( iconCss ) ) ; iconPanel.addStyleName ( iconCss ) ; iconPanel.addStyleName ( PatternflyConstants.LIST_VIEW_ICON_PANEL ) ; add ( iconPanel ) ; } }
Source:
public void testVmWithDisks ( ) { org.ovirt.engine.core.common.businessentities.VM vm = new org.ovirt.engine.core.common.businessentities.VM ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.Disk > disks = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ( ) ; disks.add ( new org.ovirt.engine.core.common.businessentities.DiskImage ( ) ) ; org.ovirt.engine.core.bll.validator.RunVmValidatorTest.validateResult ( runVmValidator.validateBootSequence ( vm , null , disks ) , true , null ) ; }

Target:
public void testNoIsoDomain ( ) { org.ovirt.engine.core.bll.validator.RunVmValidatorTest.validateResult ( runVmValidator.validateBootSequence ( new org.ovirt.engine.core.common.businessentities.VM ( ) , BootSequence.CD , new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ( ) ) , false , VdcBllMessages.VM_CANNOT_RUN_FROM_CD_WITHOUT_ACTIVE_STORAGE_DOMAIN_ISO ) ; }
Source:
protected void UpdateDetailsAvailability ( ) { super . UpdateDetailsAvailability ( ) ; getClusterServiceModel ( ) . setIsAvailable ( ( ( org.ovirt.engine.core.common.businessentities.VDSGroup ) ( getSelectedItem ( ) ) ) . supportsGlusterService ( ) ) ; }

Target:
protected void UpdateDetailsAvailability ( ) { super . UpdateDetailsAvailability ( ) ; org.ovirt.engine.core.common.businessentities.VDSGroup vdsGroup = ( ( org.ovirt.engine.core.common.businessentities.VDSGroup ) ( getSelectedItem ( ) ) ) ; getClusterServiceModel ( ) . setIsAvailable ( ( ( ( vdsGroup != null ) && ( vdsGroup.supportsGlusterService ( ) ) ) && ( ( Version.v3_2.compareTo ( vdsGroup.getcompatibility_version ( ) ) ) <= 0 ) ) ) ; }
Source:
protected void setUpSpyQuery ( ) throws java.lang.Exception { super . setUpSpyQuery ( ) ; org.ovirt.engine.core.common.businessentities.storage.RepoImage rfmd = new org.ovirt.engine.core.common.businessentities.storage.RepoImage ( ) ; rfmd.setFileType ( expectedType ) ; org.mockito.Mockito.doReturn ( java.util.Collections.singletonList ( rfmd ) ) . when ( getQuery ( ) ) . getUserRequestForStorageDomainRepoFileList ( ) ; }

Target:
protected void initQuery ( org.ovirt.engine.core.bll.storage.repoimage.GetImagesListByStoragePoolIdQuery < ? extends org.ovirt.engine.core.common.queries.GetImagesListByStoragePoolIdParameters > query ) { super . initQuery ( query ) ; org.ovirt.engine.core.common.businessentities.storage.RepoImage rfmd = new org.ovirt.engine.core.common.businessentities.storage.RepoImage ( ) ; rfmd.setFileType ( expectedType ) ; org.mockito.Mockito.doReturn ( java.util.Collections.singletonList ( rfmd ) ) . when ( query ) . getUserRequestForStorageDomainRepoFileList ( ) ; }
Source:
private void addVmToDb ( ) { org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInNewTransaction ( new org.ovirt.engine.core.utils.transaction.TransactionMethod < java.lang.Void > ( ) { @ java.lang.Override public java.lang.Void runInTransaction ( ) { addVmStatic ( ) ; addVmDynamic ( ) ; addVmInterfaces ( ) ; addVmStatistics ( ) ; getCompensationContext ( ) . stateChanged ( ) ; return null ; } } ) ; }

Target:
private void addVmToDb ( ) { org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInNewTransaction ( new org.ovirt.engine.core.utils.transaction.TransactionMethod < java.lang.Void > ( ) { @ java.lang.Override public java.lang.Void runInTransaction ( ) { addVmStatic ( ) ; addVmDynamic ( ) ; addVmInterfaces ( ) ; addVmStatistics ( ) ; getCompensationContext ( ) . stateChanged ( ) ; return null ; } } ) ; freeLock ( ) ; }
Source:
protected javax.ws.rs.core.UriInfo setUpUriInfo ( ) { javax.ws.rs.core.UriBuilder uriBuilder = createMock ( javax.ws.rs.core.UriBuilder.class ) ; org.easymock.EasyMock.expect ( uriBuilder.clone ( ) ) . andReturn ( uriBuilder ) . anyTimes ( ) ; javax.ws.rs.core.UriInfo uriInfo = createMock ( javax.ws.rs.core.UriInfo.class ) ; for ( int i = 0 ; i < 2 ; i ++ ) { org.easymock.EasyMock.expect ( uriInfo.getQueryParameters ( ) ) . andReturn ( null ) ; } return uriInfo ; }

Target:
protected javax.ws.rs.core.UriInfo setUpUriInfo ( ) { javax.ws.rs.core.UriBuilder uriBuilder = createMock ( javax.ws.rs.core.UriBuilder.class ) ; org.easymock.EasyMock.expect ( uriBuilder.clone ( ) ) . andReturn ( uriBuilder ) . anyTimes ( ) ; javax.ws.rs.core.UriInfo uriInfo = createMock ( javax.ws.rs.core.UriInfo.class ) ; org.easymock.EasyMock.expect ( uriInfo.getQueryParameters ( ) ) . andReturn ( null ) . anyTimes ( ) ; org.easymock.EasyMock.expect ( uriInfo.getPathSegments ( ) ) . andReturn ( null ) . anyTimes ( ) ; return uriInfo ; }
Source:
private void assertTestNotRemovingLabeledNetworksValid ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic , org.ovirt.engine.core.common.businessentities.network.NetworkAttachment removedAttachment , org.ovirt.engine.core.common.action.HostSetupNetworksParameters params , org.ovirt.engine.core.common.businessentities.network.Network network ) { org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidator validator = new org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidatorTest.HostSetupNetworksValidatorBuilder ( ) . setParams ( params ) . setHost ( host ) . setExistingInterfaces ( java.util.Collections.singletonList ( nic ) ) . addNetworks ( network ) . build ( ) ; org.junit.Assert.assertThat ( validator.notRemovingLabeledNetworks ( removedAttachment ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { host = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; host.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; host.setVdsGroupCompatibilityVersion ( Version.v3_5 ) ; final org.ovirt.engine.core.common.businessentities.VdsDynamic vdsDynamic = new org.ovirt.engine.core.common.businessentities.VdsDynamic ( ) ; vdsDynamic.setSupportedClusterLevels ( org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidatorTest.TEST_VERSION ) ; host.setDynamicData ( vdsDynamic ) ; bond = new org.ovirt.engine.core.common.businessentities.network.Bond ( ) ; bond.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; org.mockito.Mockito.when ( mockNetworkExclusivenessValidatorResolver.resolveNetworkExclusivenessValidator ( org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidatorTest.TEST_SUPPORTED_VERSIONS ) ) . thenReturn ( mockNetworkExclusivenessValidator ) ; }
Source:
public void confFileNotExistInTar ( ) { givenListOfImagesAndVolumes ( ) ; givenTheWantedDiskImage ( ) ; mockVdcCommand ( VdcActionType.RetrieveImageData , successfulVdcReturnValue ( new byte [ 10 ] ) ) ; java.util.Map < java.lang.String , java.lang.String > config = fetchConfig ( ) ; org.junit.Assert.assertThat ( config , org.hamcrest.core.Is.is ( java.util.Collections.emptyMap ( ) ) ) ; }

Target:
public void confFileNotExistInTar ( ) { givenListOfImagesAndVolumes ( ) ; givenTheWantedDiskImage ( ) ; mockVdcCommand ( ActionType.RetrieveImageData , successfulVdcReturnValue ( new byte [ 10 ] ) ) ; java.util.Map < java.lang.String , java.lang.String > config = fetchConfig ( ) ; org.junit.Assert.assertThat ( config , org.hamcrest.core.Is.is ( java.util.Collections.emptyMap ( ) ) ) ; }
Source:
protected void doTestBadRemove ( boolean canDo , boolean success , java.lang.String detail ) throws java.lang.Exception { setUpEntityQueryExpectations ( 2 ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.RemoveNetwork , org.ovirt.engine.core.common.action.AddNetworkStoragePoolParameters.class , new java.lang.String [ ] { "StoragePoolId" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendNetworksResourceTest.DATA_CENTER_ID } , canDo , success ) ) ; try { collection.remove ( GUIDS [ 0 ] . toString ( ) ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }

Target:
protected void doTestBadRemove ( boolean canDo , boolean success , java.lang.String detail ) throws java.lang.Exception { setUpEntityQueryExpectations ( 2 ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.RemoveNetwork , org.ovirt.engine.core.common.action.RemoveNetworkParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , canDo , success ) ) ; try { collection.remove ( GUIDS [ 0 ] . toString ( ) ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { boolean isAttach = ( ( java.lang.Boolean ) ( ( ( org.ovirt.engine.ui.uicommonweb.models.EntityModel ) ( sender ) ) . getEntity ( ) ) ) ; createDiskPanel.setVisible ( ( ! isAttach ) ) ; attachDiskPanel.setVisible ( isAttach ) ; if ( ( ! isAttach ) && ( ! ( isNewLunDiskEnabled ) ) ) { disk.getIsInternal ( ) . setEntity ( true ) ; } revealDiskPanel ( disk ) ; }

Target:
public com.google.gwt.resources.client.ImageResource getValue ( org.ovirt.engine.ui.uicommonweb.models.EntityModel object ) { org.ovirt.engine.core.common.businessentities.Disk disk = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel ) ( object.getEntity ( ) ) ) . getDisk ( ) ; setTitle ( ( disk.isShareable ( ) ? constants.shareable ( ) : null ) ) ; return disk.isShareable ( ) ? resources.shareableDiskIcon ( ) : null ; }
Source:
public void testTypedEnum ( ) throws java.lang.Exception { java.io.File file = writeConf ( "a=A" ) ; org.ovirt.engine.core.extensions.mgr.Configuration config = org.ovirt.engine.core.extensions.mgr.Configuration.loadFile ( file ) ; junit.framework.Assert.assertNotNull ( config ) ; org.ovirt.engine.core.extensions.mgr.ConfigurationTest.TestTypedEnum view = config.getView ( org.ovirt.engine.core.extensions.mgr.ConfigurationTest.TestTypedEnum.class ) ; junit.framework.Assert.assertNotNull ( view ) ; junit.framework.Assert.assertEquals ( org.ovirt.engine.core.extensions.mgr.ConfigurationTest.TestEnum.A , view.getA ( ) ) ; }

Target:
public void testTypedEnum ( ) throws java.lang.Exception { java.io.File file = writeConf ( "a=A" ) ; org.ovirt.engine.core.extensions.mgr.Configuration config = org.ovirt.engine.core.extensions.mgr.Configuration.loadFile ( file ) ; org.junit.Assert.assertNotNull ( config ) ; org.ovirt.engine.core.extensions.mgr.ConfigurationTest.TestTypedEnum view = config.getView ( org.ovirt.engine.core.extensions.mgr.ConfigurationTest.TestTypedEnum.class ) ; org.junit.Assert.assertNotNull ( view ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.extensions.mgr.ConfigurationTest.TestEnum.A , view.getA ( ) ) ; }
Source:
public static 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.RunQuery ( VdcQueryType.GetRoleActionGroupsByRoleId , new org.ovirt.engine.core.common.queries.MultilevelAdministrationByRoleIdParameters ( roleId ) , aQuery ) ; }

Target:
public static void getPermissionsByAdElementId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid userId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.permissions > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.permissions > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetPermissionsByAdElementId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( userId ) , aQuery ) ; }
Source:
public void onRemove ( ) { java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > pb = new java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > ( ) ; for ( java.lang.Object a : sourceListModel.getSelectedItems ( ) ) { org.ovirt.engine.core.common.businessentities.network.Network network = ( ( org.ovirt.engine.core.common.businessentities.network.Network ) ( a ) ) ; pb.add ( new org.ovirt.engine.core.common.action.AddNetworkStoragePoolParameters ( network.getstorage_pool_id ( ) . getValue ( ) , network ) ) ; } org.ovirt.engine.ui.frontend.Frontend.RunMultipleAction ( VdcActionType.RemoveNetwork , pb ) ; sourceListModel.setConfirmWindow ( null ) ; }

Target:
public void onRemove ( ) { java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > pb = new java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > ( ) ; for ( java.lang.Object a : sourceListModel.getSelectedItems ( ) ) { org.ovirt.engine.core.common.businessentities.network.Network network = ( ( org.ovirt.engine.core.common.businessentities.network.Network ) ( a ) ) ; pb.add ( new org.ovirt.engine.core.common.action.AddNetworkStoragePoolParameters ( network.getDataCenterId ( ) . getValue ( ) , network ) ) ; } org.ovirt.engine.ui.frontend.Frontend.RunMultipleAction ( VdcActionType.RemoveNetwork , pb ) ; sourceListModel.setConfirmWindow ( null ) ; }
Source:
void localize ( ) { applyNowCpuMessage.setHTML ( bulletedItem ( org.ovirt.engine.ui.common.widget.uicommon.popup.vm.VmNextRunConfigurationWidget.messages.nextRunConfigurationCpuValue ( ) ) ) ; applyNowMemoryMessage.setHTML ( bulletedItem ( org.ovirt.engine.ui.common.widget.uicommon.popup.vm.VmNextRunConfigurationWidget.messages.nextRunConfigurationMemoryValue ( ) ) ) ; vmUnpinnedMessage1.setHTML ( bulletedItem ( org.ovirt.engine.ui.common.widget.uicommon.popup.vm.VmNextRunConfigurationWidget.messages.unpinnedRunningVmWarningIncompatability ( ) ) ) ; vmUnpinnedMessage2.setHTML ( bulletedItem ( org.ovirt.engine.ui.common.widget.uicommon.popup.vm.VmNextRunConfigurationWidget.messages.unpinnedRunningVmWarningSecurity ( ) ) ) ; }

Target:
void localize ( ) { applyNowCpuMessage.setHTML ( bulletedItem ( org.ovirt.engine.ui.common.widget.uicommon.popup.vm.VmNextRunConfigurationWidget.messages.nextRunConfigurationCpuValue ( ) ) ) ; applyNowMemoryMessage.setHTML ( bulletedItem ( org.ovirt.engine.ui.common.widget.uicommon.popup.vm.VmNextRunConfigurationWidget.messages.nextRunConfigurationMemoryValue ( ) ) ) ; applyNowVmLeaseMessage.setHTML ( bulletedItem ( org.ovirt.engine.ui.common.widget.uicommon.popup.vm.VmNextRunConfigurationWidget.messages.nextRunConfigurationVmLeaseValue ( ) ) ) ; vmUnpinnedMessage1.setHTML ( bulletedItem ( org.ovirt.engine.ui.common.widget.uicommon.popup.vm.VmNextRunConfigurationWidget.messages.unpinnedRunningVmWarningIncompatability ( ) ) ) ; vmUnpinnedMessage2.setHTML ( bulletedItem ( org.ovirt.engine.ui.common.widget.uicommon.popup.vm.VmNextRunConfigurationWidget.messages.unpinnedRunningVmWarningSecurity ( ) ) ) ; }
Source:
public static 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.RunQuery ( VdcQueryType.GetPermittedStorageDomainsByStoragePoolId , params , aQuery ) ; }

Target:
public static void getVmList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String poolName ) { 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 ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > vms = org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VM > cast ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.IVdcQueryable > ) ( source ) ) ) ; return vms ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( ( "Vms: pool=" + poolName ) , org.ovirt.engine.core.common.interfaces.SearchType.VM ) , aQuery ) ; }
Source:
protected void endWithFailure ( ) { if ( isStatelessSnapshotExistsForVm ( ) ) { org.ovirt.engine.core.common.action.VdcReturnValueBase vdcReturnValue = org.ovirt.engine.core.bll.RunVmCommand.getBackend ( ) . endAction ( VdcActionType.CreateAllSnapshotsFromVm , buildCreateSnapshotParametersForEndAction ( ) , new org.ovirt.engine.core.bll.context.CommandContext ( org.ovirt.engine.core.bll.RunVmCommand.getCompensationContext ( ) ) ) ; setSucceeded ( vdcReturnValue.getSucceeded ( ) ) ; } else { super . endWithFailure ( ) ; } }

Target:
boolean checkRngDeviceClusterCompatibility ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > rngDevs = org.ovirt.engine.core.bll.RunVmCommand.getVmDeviceDao ( ) . getVmDeviceByVmIdTypeAndDevice ( org.ovirt.engine.core.bll.RunVmCommand.getVmId ( ) , VmDeviceGeneralType.RNG , VmDeviceType.VIRTIO.getName ( ) ) ; if ( ! ( rngDevs.isEmpty ( ) ) ) { org.ovirt.engine.core.common.businessentities.VmRngDevice rngDev = new org.ovirt.engine.core.common.businessentities.VmRngDevice ( rngDevs.get ( 0 ) ) ; if ( ! ( org.ovirt.engine.core.bll.RunVmCommand.getVdsGroup ( ) . getRequiredRngSources ( ) . contains ( rngDev.getSource ( ) ) ) ) { return false ; } } return true ; }
Source:
protected void addMoveOrCopyParameters ( java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > parameters , org.ovirt.engine.core.compat.Guid sourceStorageDomaiGuid , org.ovirt.engine.core.compat.Guid destStorageDomaiGuid , org.ovirt.engine.core.common.businessentities.DiskImage disk ) { org.ovirt.engine.core.common.action.MoveOrCopyImageGroupParameters params = createParameters ( sourceStorageDomaiGuid , destStorageDomaiGuid , disk ) ; params.setQuotaId ( disk.getQuotaId ( ) ) ; parameters.add ( params ) ; }

Target:
protected void addMoveOrCopyParameters ( java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > parameters , org.ovirt.engine.core.compat.Guid sourceStorageDomainGuid , org.ovirt.engine.core.compat.Guid destStorageDomainGuid , org.ovirt.engine.core.common.businessentities.DiskImage disk ) { org.ovirt.engine.core.common.action.MoveOrCopyImageGroupParameters params = createParameters ( sourceStorageDomainGuid , destStorageDomainGuid , disk ) ; params.setQuotaId ( disk.getQuotaId ( ) ) ; parameters.add ( params ) ; }
Source:
public static void IsVmNameUnique ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String name ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ! ( ( ( java.lang.Boolean ) ( source ) ) . booleanValue ( ) ) : false ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.IsVmWithSameNameExist , new org.ovirt.engine.core.common.queries.IsVmWithSameNameExistParameters ( name ) , aQuery ) ; }

Target:
public static 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.RunQuery ( VdcQueryType.GetRoleActionGroupsByRoleId , new org.ovirt.engine.core.common.queries.MultilevelAdministrationByRoleIdParameters ( roleId ) , aQuery ) ; }
Source:
public void testGetAllWithPermissionsForPriviligedUser ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmTemplate > result = dao.getAll ( org.ovirt.engine.core.dao.PRIVILEGED_USER_ID , true , VmEntityType.TEMPLATE ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.dao.VmTemplateDaoTest.NUMBER_OF_TEMPLATES_FOR_PRIVELEGED_USER , result.size ( ) ) ; org.junit.Assert.assertEquals ( result.iterator ( ) . next ( ) , existingEntity ) ; }

Target:
public void testGetAllWithPermissionsForPriviligedUser ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmTemplate > result = dao.getAll ( org.ovirt.engine.core.dao.PRIVILEGED_USER_ID , true , VmEntityType.TEMPLATE ) ; org.junit.jupiter.api.Assertions.assertNotNull ( result ) ; org.junit.jupiter.api.Assertions.assertEquals ( org.ovirt.engine.core.dao.VmTemplateDaoTest.NUMBER_OF_TEMPLATES_FOR_PRIVELEGED_USER , result.size ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( result.iterator ( ) . next ( ) , existingEntity ) ; }
Source:
public static void getTemplateDiskList ( 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.DiskImage > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmTemplatesDisks , new org.ovirt.engine.core.common.queries.IdQueryParameters ( templateId ) , aQuery ) ; }

Target:
public void getDataCenterListByName ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String name ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( ( ( "DataCenter: name=" + name ) + " sortby name" ) , org.ovirt.engine.core.common.interfaces.SearchType.StoragePool ) , aQuery ) ; }
Source:
public void stringPropertiesSyntax ( ) { org.ovirt.engine.core.common.utils.customprop.CustomPropertiesUtils utils = new org.ovirt.engine.core.common.utils.customprop.CustomPropertiesUtils ( ) ; org.junit.Assert.assertTrue ( "Invalid key/value delimiter" , utils.syntaxErrorInProperties ( "speed:1024;duplex=full" ) ) ; org.junit.Assert.assertTrue ( "Missing key/value delimiter" , utils.syntaxErrorInProperties ( "speed=1024;duplex" ) ) ; org.junit.Assert.assertTrue ( "Invalid key character" , utils.syntaxErrorInProperties ( "spe*ed=1024;duplex=full" ) ) ; org.junit.Assert.assertTrue ( "Invalid value character" , utils.syntaxErrorInProperties ( "speed=1024;duplex=fu;ll" ) ) ; }

Target:
public void stringPropertiesSyntax ( ) { org.ovirt.engine.core.common.utils.customprop.CustomPropertiesUtils utils = new org.ovirt.engine.core.common.utils.customprop.CustomPropertiesUtils ( ) ; org.junit.jupiter.api.Assertions.assertTrue ( utils.syntaxErrorInProperties ( "speed:1024;duplex=full" ) , "Invalid key/value delimiter" ) ; org.junit.jupiter.api.Assertions.assertTrue ( utils.syntaxErrorInProperties ( "speed=1024;duplex" ) , "Missing key/value delimiter" ) ; org.junit.jupiter.api.Assertions.assertTrue ( utils.syntaxErrorInProperties ( "spe*ed=1024;duplex=full" ) , "Invalid key character" ) ; org.junit.jupiter.api.Assertions.assertTrue ( utils.syntaxErrorInProperties ( "speed=1024;duplex=fu;ll" ) , "Invalid value character" ) ; }
Source:
private void writeOwnerModels ( ) { logger.log ( Type.DEBUG , "Strating to write OwnerModels" ) ; sw.println ( ) ; sw.println ( "@Override" ) ; sw.println ( "protected java.util.Map<String, org.ovirt.engine.ui.uicommonweb.models.EntityModel> getOwnerModels() {" ) ; sw.indent ( ) ; sw.println ( "java.util.Map<String, org.ovirt.engine.ui.uicommonweb.models.EntityModel> regs = new java.util.HashMap<String, org.ovirt.engine.ui.uicommonweb.models.EntityModel>();" ) ; logger.log ( Type.DEBUG , "Going over Editor Fields" ) ; for ( com.google.gwt.editor.rebind.model.EditorData editorData : model.getEditorData ( ) ) { logger.log ( Type.DEBUG , ( "Going over Field: " + editorData ) ) ; java.lang.String path = editorData.getPath ( ) ; if ( ( path.length ( ) ) == 0 ) { continue ; } com.google.gwt.core.ext.typeinfo.JClassType propertyOwnerType = editorData.getPropertyOwnerType ( ) ; if ( ( propertyOwnerType == ( listModelType ) ) || ( propertyOwnerType == ( entityModelType ) ) ) { logger.log ( Type.DEBUG , ( "Found owner Model Field: " + editorData ) ) ; sw.println ( "regs.put(\"%s\", getObject()%s);" , path , editorData.getBeanOwnerExpression ( ) ) ; } } sw.println ( "return regs;" ) ; sw.outdent ( ) ; sw.println ( "}" ) ; }

Target:
private void writeOwnerModels ( ) { logger.log ( Type.DEBUG , "Strating to write OwnerModels" ) ; sw.println ( ) ; sw.println ( "@Override" ) ; sw.println ( "protected java.util.Map<String, org.ovirt.engine.ui.uicommonweb.models.EntityModel> getOwnerModels() {" ) ; sw.indent ( ) ; sw.println ( "java.util.Map<String, org.ovirt.engine.ui.uicommonweb.models.EntityModel> regs = new java.util.HashMap<String, org.ovirt.engine.ui.uicommonweb.models.EntityModel>();" ) ; logger.log ( Type.DEBUG , "Going over Editor Fields" ) ; for ( com.google.gwt.editor.rebind.model.EditorData editorData : model.getEditorData ( ) ) { logger.log ( Type.DEBUG , ( "Going over Field: " + editorData ) ) ; java.lang.String path = editorData.getPath ( ) ; if ( ( path.length ( ) ) == 0 ) { continue ; } com.google.gwt.core.ext.typeinfo.JClassType propertyOwnerType = eraseType ( editorData.getPropertyOwnerType ( ) ) ; if ( ( propertyOwnerType == ( listModelType ) ) || ( propertyOwnerType == ( entityModelType ) ) ) { logger.log ( Type.DEBUG , ( "Found owner Model Field: " + editorData ) ) ; sw.println ( "regs.put(\"%s\", getObject()%s);" , path , editorData.getBeanOwnerExpression ( ) ) ; } } sw.println ( "return regs;" ) ; sw.outdent ( ) ; sw.println ( "}" ) ; }
Source:
private boolean networkAttachmentIsBeingRemoved ( java.lang.String interfaceName ) { for ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment : params.getRemovedNetworkAttachments ( ) ) { if ( java.util.Objects.equals ( interfaceName , attachment.getNicName ( ) ) ) { return true ; } } return false ; }

Target:
private org.ovirt.engine.core.bll.ValidationResult nicActuallyExistsOrReferencesNewBond ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment ) { java.lang.String targetNicName = attachment.getNicName ( ) ; boolean attachmentReferencesExistingNic = ( existingInterfacesMap.get ( attachment.getNicId ( ) , targetNicName ) ) != null ; if ( attachmentReferencesExistingNic ) { return org.ovirt.engine.core.bll.ValidationResult.VALID ; } boolean attachmentReferencesNewlyCreatedBond = ( targetNicName != null ) && ( ( bondsMap.get ( targetNicName ) ) != null ) ; if ( attachmentReferencesNewlyCreatedBond ) { return org.ovirt.engine.core.bll.ValidationResult.VALID ; } return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.HOST_NETWORK_INTERFACE_NOT_EXIST ) ; }
Source:
public java.util.List < org.ovirt.engine.core.common.businessentities.VmTemplate > filter ( final java.util.List < org.ovirt.engine.core.common.businessentities.VmTemplate > data ) { for ( org.ovirt.engine.core.common.businessentities.IVdcQueryable vmt_helper : data ) { org.ovirt.engine.core.common.businessentities.VmTemplate vmt = ( ( org.ovirt.engine.core.common.businessentities.VmTemplate ) ( vmt_helper ) ) ; org.ovirt.engine.core.bll.VmTemplateHandler.updateDisksFromDb ( vmt ) ; } return data ; }

Target:
public java.util.List < org.ovirt.engine.core.common.businessentities.VmTemplate > filter ( final java.util.List < org.ovirt.engine.core.common.businessentities.VmTemplate > data ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmTemplate > filtered = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.IVdcQueryable vmt_helper : data ) { org.ovirt.engine.core.common.businessentities.VmTemplate vmt = ( ( org.ovirt.engine.core.common.businessentities.VmTemplate ) ( vmt_helper ) ) ; if ( ( vmt.getTemplateType ( ) ) != ( org.ovirt.engine.core.common.businessentities.VmEntityType.TEMPLATE ) ) { continue ; } filtered.add ( vmt ) ; } return filtered ; }
Source:
private org.ovirt.engine.core.common.businessentities.storage.ImageStatus checkImageStatus ( org.ovirt.engine.core.common.businessentities.storage.CinderDisk removedVolume ) { try { return getCinderBroker ( ) . getImageStatusByClassificationType ( removedVolume ) ; } catch ( com.woorea.openstack.base.client.OpenStackResponseException ex ) { if ( ( ex.getStatus ( ) ) == ( org.apache.commons.httpclient.HttpStatus.SC_NOT_FOUND ) ) { log.info ( "Image status could not be provided since the cinder image might have already been removed from Cinder." ) ; return org.ovirt.engine.core.common.businessentities.storage.ImageStatus.OK ; } logError ( removedVolume , ex ) ; } catch ( java.lang.Exception e ) { logError ( removedVolume , e ) ; } return org.ovirt.engine.core.common.businessentities.storage.ImageStatus.ILLEGAL ; }

Target:
private boolean allChildCmdIdsFinished ( java.util.List < org.ovirt.engine.core.compat.Guid > childCmdIds ) { return ( org.ovirt.engine.core.bll.storage.RemoveCinderDiskCommandCallback.getCommand ( ) . getParameters ( ) . getFinishedChildCmdIds ( ) . size ( ) ) == ( childCmdIds.size ( ) ) ; }
Source:
public void testGetDiskAttachedToVm ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.UnregisteredDisk > unregisteredDisk = dao.getByDiskIdAndStorageDomainId ( FixturesTool.UNREGISTERED_DISK2 , FixturesTool.STORAGE_DOMAIN_NFS2_1 ) ; org.junit.Assert.assertTrue ( "Disk should exists in the UnregisteredDisks table" , ( ! ( unregisteredDisk.isEmpty ( ) ) ) ) ; org.junit.Assert.assertEquals ( "Disk should have one vm attached" , 1 , unregisteredDisk.get ( 0 ) . getVms ( ) . size ( ) ) ; }

Target:
public void testGetDiskAttachedToVm ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.UnregisteredDisk > unregisteredDisk = dao.getByDiskIdAndStorageDomainId ( FixturesTool.UNREGISTERED_DISK2 , FixturesTool.STORAGE_DOMAIN_NFS2_1 ) ; org.junit.jupiter.api.Assertions.assertTrue ( ( ! ( unregisteredDisk.isEmpty ( ) ) ) , "Disk should exists in the UnregisteredDisks table" ) ; org.junit.jupiter.api.Assertions.assertEquals ( 1 , unregisteredDisk.get ( 0 ) . getVms ( ) . size ( ) , "Disk should have one vm attached" ) ; }
Source:
private static org.ovirt.engine.core.common.businessentities.CommandEntity getCommandEntity ( org.ovirt.engine.core.bll.tasks.interfaces.CommandCoordinator coco , org.ovirt.engine.core.compat.Guid cmdId ) { org.ovirt.engine.core.common.businessentities.CommandEntity cmdEntity = coco.getCommandEntity ( cmdId ) ; if ( cmdEntity == null ) { cmdEntity = coco.createCommandEntity ( cmdId , ActionType.Unknown , new org.ovirt.engine.core.common.action.VdcActionParametersBase ( ) ) ; } return cmdEntity ; }

Target:
private static org.ovirt.engine.core.common.businessentities.CommandEntity getCommandEntity ( org.ovirt.engine.core.bll.tasks.interfaces.CommandCoordinator coco , org.ovirt.engine.core.compat.Guid cmdId ) { org.ovirt.engine.core.common.businessentities.CommandEntity cmdEntity = coco.getCommandEntity ( cmdId ) ; if ( cmdEntity == null ) { cmdEntity = coco.createCommandEntity ( cmdId , ActionType.Unknown , new org.ovirt.engine.core.common.action.ActionParametersBase ( ) ) ; } return cmdEntity ; }
Source:
public org.ovirt.engine.core.bll.tasks.SPMAsyncTask concreteCreateTask ( org.ovirt.engine.core.compat.Guid taskId , org.ovirt.engine.core.bll.CommandBase command , org.ovirt.engine.core.common.asynctasks.AsyncTaskCreationInfo asyncTaskCreationInfo , org.ovirt.engine.core.common.action.VdcActionType parentCommand ) { org.ovirt.engine.core.common.asynctasks.AsyncTaskParameters p = new org.ovirt.engine.core.common.asynctasks.AsyncTaskParameters ( asyncTaskCreationInfo , getAsyncTask ( taskId , command , asyncTaskCreationInfo , parentCommand ) ) ; p.setEntityInfo ( command.getParameters ( ) . getEntityInfo ( ) ) ; return createTask ( internalGetTaskType ( command ) , p ) ; }

Target:
private void buildCmdHierarchy ( org.ovirt.engine.core.common.businessentities.CommandEntity cmdEntity ) { if ( ! ( org.ovirt.engine.core.compat.Guid.isNullOrEmpty ( cmdEntity.getRootCommandId ( ) ) ) ) { childHierarchy.putIfAbsent ( cmdEntity.getRootCommandId ( ) , new java.util.ArrayList < org.ovirt.engine.core.compat.Guid > ( ) ) ; if ( ! ( childHierarchy.get ( cmdEntity.getRootCommandId ( ) ) . contains ( cmdEntity.getId ( ) ) ) ) { childHierarchy.get ( cmdEntity.getRootCommandId ( ) ) . add ( cmdEntity.getId ( ) ) ; } } }
Source:
private boolean validateInputManagementNetwork ( ) { managementNetwork = getManagementNetworkById ( ) ; if ( ( managementNetwork ) == null ) { addValidationMessage ( EngineMessage.NETWORK_NOT_EXISTS ) ; return false ; } final org.ovirt.engine.core.bll.network.cluster.NetworkClusterValidatorBase networkClusterValidator = createNetworkClusterValidator ( ) ; return ( ( validate ( networkClusterValidator.networkBelongsToClusterDataCenter ( org.ovirt.engine.core.bll.AddVdsGroupCommand.getVdsGroup ( ) , managementNetwork ) ) ) && ( validate ( networkClusterValidator.managementNetworkRequired ( managementNetwork ) ) ) ) && ( validate ( networkClusterValidator.managementNetworkNotExternal ( managementNetwork ) ) ) ; }

Target:
private boolean validateInputManagementNetwork ( ) { managementNetwork = getManagementNetworkById ( ) ; if ( ( managementNetwork ) == null ) { addValidationMessage ( EngineMessage.NETWORK_NOT_EXISTS ) ; return false ; } final org.ovirt.engine.core.bll.network.cluster.NetworkClusterValidatorBase networkClusterValidator = createNetworkClusterValidator ( ) ; return ( ( validate ( networkClusterValidator.networkBelongsToClusterDataCenter ( org.ovirt.engine.core.bll.AddClusterCommand.getCluster ( ) , managementNetwork ) ) ) && ( validate ( networkClusterValidator.managementNetworkRequired ( managementNetwork ) ) ) ) && ( validate ( networkClusterValidator.managementNetworkNotExternal ( managementNetwork ) ) ) ; }
Source:
public void testDedicatedHostNotExist ( ) { prepareVmToPassCanDoAction ( ) ; org.mockito.Mockito.doReturn ( vdsDAO ) . when ( command ) . getVdsDAO ( ) ; vmStatic.setDedicatedVmForVds ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; junit.framework.Assert.assertFalse ( "canDoAction should have failed with invalid dedicated host." , command.canDoAction ( ) ) ; assertCanDoActionMessage ( VdcBllMessages.ACTION_TYPE_FAILED_DEDICATED_VDS_NOT_IN_SAME_CLUSTER ) ; }

Target:
public void testChangeClusterForbidden ( ) { prepareVmToPassCanDoAction ( ) ; vmStatic.setVdsGroupId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; junit.framework.Assert.assertFalse ( "canDoAction should have failed with cant change cluster." , command.canDoAction ( ) ) ; assertCanDoActionMessage ( VdcBllMessages.VM_CANNOT_UPDATE_CLUSTER ) ; }
Source:
protected void RunCommands ( ) { SortCommands ( ) ; for ( final org.ovirt.engine.core.bll.CommandBase < ? > command : getCommands ( ) ) { org.ovirt.engine.core.utils.threadpool.ThreadPoolUtil.execute ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { executeValidatedCommands ( command ) ; } } ) ; } }

Target:
protected void RunCommands ( ) { SortCommands ( ) ; for ( final org.ovirt.engine.core.bll.CommandBase < ? > command : getCommands ( ) ) { if ( command.getReturnValue ( ) . getCanDoAction ( ) ) { org.ovirt.engine.core.utils.threadpool.ThreadPoolUtil.execute ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { executeValidatedCommand ( command ) ; } } ) ; } } }
Source:
public void bufferBelowCapacity ( ) { org.junit.Assert.assertNull ( tested.add ( "A" ) ) ; org.junit.Assert.assertNull ( tested.add ( "B" ) ) ; org.junit.Assert.assertArrayEquals ( testedListToArray ( ) , new java.lang.String [ ] { "A" , "B" } ) ; org.junit.Assert.assertEquals ( 0 , tested.head ( ) ) ; org.junit.Assert.assertEquals ( 2 , tested.size ( ) ) ; org.junit.Assert.assertFalse ( tested.isEmpty ( ) ) ; org.junit.Assert.assertFalse ( tested.isFull ( ) ) ; }

Target:
public void bufferBelowCapacity ( ) { org.junit.jupiter.api.Assertions.assertNull ( tested.add ( "A" ) ) ; org.junit.jupiter.api.Assertions.assertNull ( tested.add ( "B" ) ) ; org.junit.jupiter.api.Assertions.assertArrayEquals ( testedListToArray ( ) , new java.lang.String [ ] { "A" , "B" } ) ; org.junit.jupiter.api.Assertions.assertEquals ( 0 , tested.head ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( 2 , tested.size ( ) ) ; org.junit.jupiter.api.Assertions.assertFalse ( tested.isEmpty ( ) ) ; org.junit.jupiter.api.Assertions.assertFalse ( tested.isFull ( ) ) ; }
Source:
public void getVmDiskList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId , boolean isRefresh ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { return source ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ( ) ; } } ; org.ovirt.engine.core.common.queries.IdQueryParameters params = new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) ; params.setRefresh ( isRefresh ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllDisksByVmId , params , aQuery ) ; }

Target:
public void getHostsForStorageOperation ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , boolean localFsOnly ) { 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 source ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetHostsForStorageOperation , new org.ovirt.engine.core.common.queries.GetHostsForStorageOperationParameters ( storagePoolId , localFsOnly ) , aQuery ) ; }