auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public static void getVnicProfilesByDcId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dcId ) { if ( ( aQuery.converterCallback ) == null ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VnicProfileView > ( ) ; } return source ; } } ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVnicProfilesByDataCenterId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dcId ) , aQuery ) ; }

Target:
public static void getVmGuestAgentInterfacesByVmId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmGuestAgentInterface > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmGuestAgentInterfacesByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }
Source:
protected void executeCommand ( ) { org.ovirt.engine.core.bll.AddRoleCommand.getRole ( ) . setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; org.ovirt.engine.core.bll.AddRoleCommand.getRole ( ) . setAllowsViewingChildren ( false ) ; org.ovirt.engine.core.bll.AddRoleCommand.getRoleDao ( ) . save ( org.ovirt.engine.core.bll.AddRoleCommand.getRole ( ) ) ; org.ovirt.engine.core.bll.AddRoleCommand.getReturnValue ( ) . setActionReturnValue ( org.ovirt.engine.core.bll.AddRoleCommand.getRole ( ) . getId ( ) ) ; org.ovirt.engine.core.bll.AddRoleCommand.setSucceeded ( true ) ; }

Target:
protected void executeCommand ( ) { org.ovirt.engine.core.bll.AddRoleCommand.getRole ( ) . setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; org.ovirt.engine.core.bll.AddRoleCommand.getRole ( ) . setAllowsViewingChildren ( false ) ; org.ovirt.engine.core.bll.AddRoleCommand.getRole ( ) . setAppMode ( ApplicationMode.AllModes ) ; org.ovirt.engine.core.bll.AddRoleCommand.getRoleDao ( ) . save ( org.ovirt.engine.core.bll.AddRoleCommand.getRole ( ) ) ; org.ovirt.engine.core.bll.AddRoleCommand.getReturnValue ( ) . setActionReturnValue ( org.ovirt.engine.core.bll.AddRoleCommand.getRole ( ) . getId ( ) ) ; org.ovirt.engine.core.bll.AddRoleCommand.setSucceeded ( true ) ; }
Source:
public void getGlusterSwiftServices ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid serverId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterServerService > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterServerServicesByServerId , new org.ovirt.engine.core.common.queries.gluster.GlusterServiceQueryParameters ( serverId , org.ovirt.engine.core.common.businessentities.gluster.ServiceType.GLUSTER_SWIFT ) , aQuery ) ; }

Target:
public void getGlusterHook ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hookId , boolean includeServerHooks ) { 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.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterHookById , new org.ovirt.engine.core.common.queries.gluster.GlusterHookQueryParameters ( hookId , includeServerHooks ) , aQuery ) ; }
Source:
protected void executeQueryCommand ( ) { final java.lang.String domain = org.ovirt.engine.core.bll.GetDirectoryGroupByIdQuery.getParameters ( ) . getDomain ( ) ; final org.ovirt.engine.core.compat.Guid id = org.ovirt.engine.core.bll.GetDirectoryGroupByIdQuery.getParameters ( ) . getId ( ) ; final org.ovirt.engine.core.bll.adbroker.LdapBroker broker = org.ovirt.engine.core.bll.adbroker.LdapFactory.getInstance ( domain ) ; final org.ovirt.engine.core.common.businessentities.LdapGroup group = ( ( org.ovirt.engine.core.common.businessentities.LdapGroup ) ( broker.RunAdAction ( AdActionType.GetAdGroupByGroupId , new org.ovirt.engine.core.bll.adbroker.LdapSearchByIdParameters ( domain , id ) ) . getReturnValue ( ) ) ) ; org.ovirt.engine.core.bll.GetDirectoryGroupByIdQuery.getQueryReturnValue ( ) . setReturnValue ( group ) ; }

Target:
protected void executeQueryCommand ( ) { final java.lang.String domain = org.ovirt.engine.core.bll.GetDirectoryGroupByIdQuery.getParameters ( ) . getDomain ( ) ; final org.ovirt.engine.core.common.utils.ExternalId id = org.ovirt.engine.core.bll.GetDirectoryGroupByIdQuery.getParameters ( ) . getId ( ) ; final org.ovirt.engine.core.bll.adbroker.LdapBroker broker = org.ovirt.engine.core.bll.adbroker.LdapFactory.getInstance ( domain ) ; final org.ovirt.engine.core.common.businessentities.LdapGroup group = ( ( org.ovirt.engine.core.common.businessentities.LdapGroup ) ( broker.runAdAction ( AdActionType.GetAdGroupByGroupId , new org.ovirt.engine.core.bll.adbroker.LdapSearchByIdParameters ( domain , id ) ) . getReturnValue ( ) ) ) ; org.ovirt.engine.core.bll.GetDirectoryGroupByIdQuery.getQueryReturnValue ( ) . setReturnValue ( group ) ; }
Source:
public void testSave ( ) { newVmInterface.setVmId ( org.ovirt.engine.core.dao.VmNetworkInterfaceDAOTest.VM_ID ) ; newVmDevice.setId ( new org.ovirt.engine.core.common.businessentities.VmDeviceId ( newVmInterface.getId ( ) , org.ovirt.engine.core.dao.VmNetworkInterfaceDAOTest.VM_ID ) ) ; dao.save ( newVmInterface ) ; vmDevicesDao.save ( newVmDevice ) ; StatsDao.save ( newVmInterface.getStatistics ( ) ) ; org.ovirt.engine.core.common.businessentities.VmNetworkInterface savedInterface = dao.get ( newVmInterface.getId ( ) ) ; org.junit.Assert.assertNotNull ( savedInterface ) ; org.junit.Assert.assertEquals ( newVmInterface.getName ( ) , savedInterface.getName ( ) ) ; }

Target:
public void testSave ( ) { newVmInterface.setVmId ( org.ovirt.engine.core.dao.VmNetworkInterfaceDAOTest.VM_ID ) ; newVmDevice.setId ( new org.ovirt.engine.core.common.businessentities.VmDeviceId ( newVmInterface.getId ( ) , org.ovirt.engine.core.dao.VmNetworkInterfaceDAOTest.VM_ID ) ) ; dao.save ( newVmInterface ) ; vmDevicesDao.save ( newVmDevice ) ; StatsDao.save ( newVmInterface.getStatistics ( ) ) ; org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface savedInterface = dao.get ( newVmInterface.getId ( ) ) ; org.junit.Assert.assertNotNull ( savedInterface ) ; org.junit.Assert.assertEquals ( newVmInterface.getName ( ) , savedInterface.getName ( ) ) ; }
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 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.storage.Disk > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.Disk > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetAllAttachableDisksForVmQueryParameters params = new org.ovirt.engine.core.common.queries.GetAllAttachableDisksForVmQueryParameters ( storagePoolId ) ; params.setVmId ( vmId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllAttachableDisksForVm , params , aQuery ) ; }
Source:
void bindInfrastructure ( ) { bindCommonInfrastructure ( org.ovirt.engine.ui.userportal.place.UserPortalPlaceManager.class ) ; bind ( org.ovirt.engine.ui.userportal.auth.LoggedInExtendedPlaceGatekeeper.class ) . in ( com.google.inject.Singleton.class ) ; bind ( org.ovirt.engine.ui.userportal.system.ApplicationInit.class ) . asEagerSingleton ( ) ; bind ( org.ovirt.engine.ui.userportal.auth.CurrentUserRole.class ) . in ( com.google.inject.Singleton.class ) ; }

Target:
void bindInfrastructure ( ) { bindCommonInfrastructure ( org.ovirt.engine.ui.userportal.place.UserPortalPlaceManager.class ) ; bind ( org.ovirt.engine.ui.userportal.auth.LoggedInExtendedPlaceGatekeeper.class ) . in ( com.google.inject.Singleton.class ) ; bind ( org.ovirt.engine.ui.uicommonweb.auth.CurrentUserRole.class ) . in ( com.google.inject.Singleton.class ) ; bind ( org.ovirt.engine.ui.userportal.system.ApplicationInit.class ) . asEagerSingleton ( ) ; bindTypeAndImplAsSingleton ( org.ovirt.engine.ui.uicommonweb.auth.CurrentUserRole.class , org.ovirt.engine.ui.userportal.auth.UserPortalCurrentUserRole.class ) ; }
Source:
public void testStaticTemplatedFooToBarClassMapper ( ) { org.ovirt.engine.api.restapi.types.Mapper < org.ovirt.engine.api.restapi.test.mappers.impl.FooImpl , org.ovirt.engine.api.restapi.test.mappers.impl.BarImpl > mapper = mappingLocator.getMapper ( org.ovirt.engine.api.restapi.test.mappers.impl.FooImpl.class , org.ovirt.engine.api.restapi.test.mappers.impl.BarImpl.class ) ; org.junit.Assert.assertNotNull ( mapper ) ; org.ovirt.engine.api.restapi.test.mappers.impl.BarImpl bar = mapper.map ( new org.ovirt.engine.api.restapi.test.mappers.impl.FooImpl ( "foo" ) , new org.ovirt.engine.api.restapi.test.mappers.impl.BarImpl ( "overwrite" , "keep" ) ) ; org.junit.Assert.assertEquals ( "foo" , bar.get ( ) ) ; org.junit.Assert.assertEquals ( "keep" , bar.other ( ) ) ; }

Target:
public void testStaticTemplatedFooToBarClassMapper ( ) { org.ovirt.engine.api.restapi.types.Mapper < org.ovirt.engine.api.restapi.test.mappers.impl.FooImpl , org.ovirt.engine.api.restapi.test.mappers.impl.BarImpl > mapper = mappingLocator.getMapper ( org.ovirt.engine.api.restapi.test.mappers.impl.FooImpl.class , org.ovirt.engine.api.restapi.test.mappers.impl.BarImpl.class ) ; org.junit.jupiter.api.Assertions.assertNotNull ( mapper ) ; org.ovirt.engine.api.restapi.test.mappers.impl.BarImpl bar = mapper.map ( new org.ovirt.engine.api.restapi.test.mappers.impl.FooImpl ( "foo" ) , new org.ovirt.engine.api.restapi.test.mappers.impl.BarImpl ( "overwrite" , "keep" ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( "foo" , bar.get ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( "keep" , bar.other ( ) ) ; }
Source:
protected void executeCommand ( ) { org.ovirt.engine.core.bll.storage.AddNetworkCommand.getParameters ( ) . getNetwork ( ) . setId ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getNetworkDAO ( ) . save ( org.ovirt.engine.core.bll.storage.AddNetworkCommand.getParameters ( ) . getNetwork ( ) ) ; org.ovirt.engine.core.bll.storage.AddNetworkCommand.getReturnValue ( ) . setActionReturnValue ( org.ovirt.engine.core.bll.storage.AddNetworkCommand.getParameters ( ) . getNetwork ( ) . getId ( ) ) ; org.ovirt.engine.core.bll.storage.AddNetworkCommand.setSucceeded ( true ) ; }

Target:
protected void executeCommand ( ) { org.ovirt.engine.core.bll.storage.AddNetworkCommand.getParameters ( ) . getNetwork ( ) . setId ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getNetworkDao ( ) . save ( org.ovirt.engine.core.bll.storage.AddNetworkCommand.getParameters ( ) . getNetwork ( ) ) ; org.ovirt.engine.core.bll.storage.AddNetworkCommand.getReturnValue ( ) . setActionReturnValue ( org.ovirt.engine.core.bll.storage.AddNetworkCommand.getParameters ( ) . getNetwork ( ) . getId ( ) ) ; org.ovirt.engine.core.bll.storage.AddNetworkCommand.setSucceeded ( true ) ; }
Source:
void updateActionButton ( org.ovirt.engine.ui.common.widget.action.ActionButton button , org.ovirt.engine.ui.common.widget.action.ActionButtonDefinition < T > buttonDef ) { button.asWidget ( ) . setVisible ( ( ( buttonDef.isAccessible ( ) ) && ( buttonDef.isVisible ( getSelectedItems ( ) ) ) ) ) ; button.setEnabled ( buttonDef.isEnabled ( getSelectedItems ( ) ) ) ; button.setTitle ( ( ( buttonDef.getCustomToolTip ( ) ) != null ? buttonDef.getCustomToolTip ( ) : buttonDef.getTitle ( ) ) ) ; }

Target:
void updateActionButton ( org.ovirt.engine.ui.common.widget.action.ActionButton button , org.ovirt.engine.ui.common.widget.action.ActionButtonDefinition < T > buttonDef ) { button.asWidget ( ) . setVisible ( ( ( buttonDef.isAccessible ( ) ) && ( buttonDef.isVisible ( org.ovirt.engine.ui.common.widget.action.AbstractActionPanel.getSelectedItems ( ) ) ) ) ) ; button.setEnabled ( buttonDef.isEnabled ( org.ovirt.engine.ui.common.widget.action.AbstractActionPanel.getSelectedItems ( ) ) ) ; button.setTitle ( ( ( buttonDef.getCustomToolTip ( ) ) != null ? buttonDef.getCustomToolTip ( ) : buttonDef.getTitle ( ) ) ) ; }
Source:
public void init ( final org.ovirt.engine.ui.uicommonweb.models.datacenters.NewNetworkModel model ) { super . init ( model ) ; model.getDataCenters ( ) . getSelectedItemChangedEvent ( ) . addListener ( new org.ovirt.engine.core.compat.IEventListener ( ) { @ java.lang.Override public void eventRaised ( org.ovirt.engine.core.compat.Event ev , java.lang.Object sender , org.ovirt.engine.core.compat.EventArgs args ) { ( ( org.ovirt.engine.ui.webadmin.section.main.presenter.popup.cluster.NewClusterNetworkPopupPresenterWidget.ViewDef ) ( getView ( ) ) ) . setDataCenterName ( ( ( org.ovirt.engine.core.common.businessentities.storage_pool ) ( model.getDataCenters ( ) . getSelectedItem ( ) ) ) . getname ( ) ) ; } } ) ; }

Target:
public void init ( final org.ovirt.engine.ui.uicommonweb.models.datacenters.NewNetworkModel model ) { super . init ( model ) ; model.getDataCenters ( ) . getSelectedItemChangedEvent ( ) . addListener ( new org.ovirt.engine.ui.uicompat.IEventListener ( ) { @ java.lang.Override public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { ( ( org.ovirt.engine.ui.webadmin.section.main.presenter.popup.cluster.NewClusterNetworkPopupPresenterWidget.ViewDef ) ( getView ( ) ) ) . setDataCenterName ( ( ( org.ovirt.engine.core.common.businessentities.storage_pool ) ( model.getDataCenters ( ) . getSelectedItem ( ) ) ) . getname ( ) ) ; } } ) ; }
Source:
public void testEffectiveEmulatedMachineWithCustomSet ( ) { final org.ovirt.engine.core.common.businessentities.VmBase vmBase = new org.ovirt.engine.core.common.businessentities.VmBase ( ) ; final org.ovirt.engine.core.common.businessentities.Cluster cluster = new org.ovirt.engine.core.common.businessentities.Cluster ( ) ; cluster.setEmulatedMachine ( "cluster-pc-i440fx-rhel7.3.0" ) ; vmBase.setCustomEmulatedMachine ( "testpc-i440fx-rhel7.3.0" ) ; org.junit.Assert.assertEquals ( "testpc-i440fx-rhel7.3.0" , org.ovirt.engine.core.bll.utils.EmulatedMachineUtils.getEffective ( vmBase , ( ) -> cluster ) ) ; }

Target:
public void testEffectiveEmulatedMachineWithCustomSet ( ) { final org.ovirt.engine.core.common.businessentities.VmBase vmBase = new org.ovirt.engine.core.common.businessentities.VmBase ( ) ; final org.ovirt.engine.core.common.businessentities.Cluster cluster = new org.ovirt.engine.core.common.businessentities.Cluster ( ) ; cluster.setEmulatedMachine ( "cluster-pc-i440fx-rhel7.3.0" ) ; vmBase.setCustomEmulatedMachine ( "testpc-i440fx-rhel7.3.0" ) ; org.junit.jupiter.api.Assertions.assertEquals ( "testpc-i440fx-rhel7.3.0" , org.ovirt.engine.core.bll.utils.EmulatedMachineUtils.getEffective ( vmBase , ( ) -> cluster ) ) ; }
Source:
protected void ExecuteVdsBrokerCommand ( ) { _result = org.ovirt.engine.core.vdsbroker.vdsbroker.DisconnectStorageServerVDSCommand.getBroker ( ) . disconnectStorageServer ( org.ovirt.engine.core.vdsbroker.vdsbroker.DisconnectStorageServerVDSCommand.getParameters ( ) . getStorageType ( ) . getValue ( ) , org.ovirt.engine.core.vdsbroker.vdsbroker.DisconnectStorageServerVDSCommand.getParameters ( ) . getStoragePoolId ( ) . toString ( ) , org.ovirt.engine.core.vdsbroker.vdsbroker.DisconnectStorageServerVDSCommand.BuildStructFromConnectionListObject ( ) ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.DisconnectStorageServerVDSCommand.proceedProxyReturnValue ( ) ; setReturnValue ( _result.convertToStatusList ( ) ) ; }

Target:
protected void executeVdsBrokerCommand ( ) { _result = org.ovirt.engine.core.vdsbroker.vdsbroker.DisconnectStorageServerVDSCommand.getBroker ( ) . disconnectStorageServer ( org.ovirt.engine.core.vdsbroker.vdsbroker.DisconnectStorageServerVDSCommand.getParameters ( ) . getStorageType ( ) . getValue ( ) , org.ovirt.engine.core.vdsbroker.vdsbroker.DisconnectStorageServerVDSCommand.getParameters ( ) . getStoragePoolId ( ) . toString ( ) , org.ovirt.engine.core.vdsbroker.vdsbroker.DisconnectStorageServerVDSCommand.BuildStructFromConnectionListObject ( ) ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.DisconnectStorageServerVDSCommand.proceedProxyReturnValue ( ) ; setReturnValue ( _result.convertToStatusList ( ) ) ; }
Source:
private void setDetailList ( final org.ovirt.engine.ui.uicommonweb.models.profiles.VnicProfileVmListModel vNicProfileVmListModel , final org.ovirt.engine.ui.uicommonweb.models.profiles.VnicProfileTemplateListModel vNicProfileTemplateListModel , final org.ovirt.engine.ui.uicommonweb.models.configure.PermissionListModel < org.ovirt.engine.core.common.businessentities.network.VnicProfileView > permissionListModel ) { java.util.List < org.ovirt.engine.ui.uicommonweb.models.HasEntity < org.ovirt.engine.core.common.businessentities.network.VnicProfileView > > list = new java.util.ArrayList < > ( ) ; list.add ( vNicProfileVmListModel ) ; list.add ( vNicProfileTemplateListModel ) ; list.add ( permissionListModel ) ; setDetailModels ( list ) ; }

Target:
private void setDetailList ( ) { java.util.List < org.ovirt.engine.ui.uicommonweb.models.HasEntity < org.ovirt.engine.core.common.businessentities.network.VnicProfileView > > list = new java.util.ArrayList < > ( ) ; list.add ( vmListModel ) ; list.add ( templateListModel ) ; list.add ( permissionListModel ) ; setDetailModels ( list ) ; }
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 ( ) , org.ovirt.engine.core.bll.RunVmCommand.dupContext ( ) . withoutExecutionContext ( ) . withoutLock ( ) ) ; setSucceeded ( vdcReturnValue.getSucceeded ( ) ) ; } else { super . endWithFailure ( ) ; } }

Target:
protected void endWithFailure ( ) { if ( isStatelessSnapshotExistsForVm ( ) ) { org.ovirt.engine.core.common.action.VdcReturnValueBase vdcReturnValue = org.ovirt.engine.core.bll.RunVmCommand.getBackend ( ) . endAction ( VdcActionType.CreateAllSnapshotsFromVm , buildCreateSnapshotParametersForEndAction ( ) , org.ovirt.engine.core.bll.RunVmCommand.cloneContext ( ) . withoutExecutionContext ( ) . withoutLock ( ) ) ; setSucceeded ( vdcReturnValue.getSucceeded ( ) ) ; } else { super . endWithFailure ( ) ; } }
Source:
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 ) ; }

Target:
public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; }
Source:
private void setStyle ( ) { throughputTotalEditor.setContentWidgetStyleName ( style.valueWidth ( ) ) ; throughputReadEditor.setContentWidgetStyleName ( style.valueWidth ( ) ) ; throughputWriteEditor.setContentWidgetStyleName ( style.valueWidth ( ) ) ; iopsTotalEditor.setContentWidgetStyleName ( style.valueWidth ( ) ) ; iopsReadEditor.setContentWidgetStyleName ( style.valueWidth ( ) ) ; iopsWriteEditor.setContentWidgetStyleName ( style.valueWidth ( ) ) ; }

Target:
private void setStyle ( ) { throughputTotalEditor.setContentWidgetContainerStyleName ( style.valueWidth ( ) ) ; throughputReadEditor.setContentWidgetContainerStyleName ( style.valueWidth ( ) ) ; throughputWriteEditor.setContentWidgetContainerStyleName ( style.valueWidth ( ) ) ; iopsTotalEditor.setContentWidgetContainerStyleName ( style.valueWidth ( ) ) ; iopsReadEditor.setContentWidgetContainerStyleName ( style.valueWidth ( ) ) ; iopsWriteEditor.setContentWidgetContainerStyleName ( style.valueWidth ( ) ) ; }
Source:
public static void getExternalProviderDiscoveredHostList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.businessentities.Provider provider ) { 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.ExternalDiscoveredHost > ( ) ; } return source ; } } ; org.ovirt.engine.core.common.queries.ProviderQueryParameters params = new org.ovirt.engine.core.common.queries.ProviderQueryParameters ( ) ; params.setProvider ( provider ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetDiscoveredHostListFromExternalProvider , params , aQuery ) ; }

Target:
public void getExternalProviderComputeResourceList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.businessentities.Provider provider ) { 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.ExternalComputeResource > ( ) ; } return source ; } } ; org.ovirt.engine.core.common.queries.ProviderQueryParameters params = new org.ovirt.engine.core.common.queries.ProviderQueryParameters ( ) ; params.setProvider ( provider ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetComputeResourceFromExternalProvider , params , aQuery ) ; }
Source:
protected void itemsCollectionChanged ( java.lang.Object sender , org.ovirt.engine.ui.uicompat.NotifyCollectionChangedEventArgs e ) { super . itemsCollectionChanged ( sender , e ) ; if ( ( ( getSystemTreeSelectedItem ( ) ) != null ) && ( ( getSystemTreeSelectedItem ( ) . getType ( ) ) == ( org.ovirt.engine.ui.uicommonweb.models.SystemTreeItemType.DataCenter ) ) ) { org.ovirt.engine.core.common.businessentities.storage_pool dataCenter = ( ( org.ovirt.engine.core.common.businessentities.storage_pool ) ( getSystemTreeSelectedItem ( ) . getEntity ( ) ) ) ; setSelectedItem ( org.ovirt.engine.ui.uicommonweb.Linq.FirstOrDefault ( org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.storage_pool > Cast ( getItems ( ) ) , new org.ovirt.engine.ui.uicommonweb.Linq.DataCenterPredicate ( dataCenter.getId ( ) ) ) ) ; } }

Target:
protected void itemsCollectionChanged ( java.lang.Object sender , org.ovirt.engine.ui.uicompat.NotifyCollectionChangedEventArgs e ) { super . itemsCollectionChanged ( sender , e ) ; if ( ( ( getSystemTreeSelectedItem ( ) ) != null ) && ( ( getSystemTreeSelectedItem ( ) . getType ( ) ) == ( org.ovirt.engine.ui.uicommonweb.models.SystemTreeItemType.DataCenter ) ) ) { org.ovirt.engine.core.common.businessentities.StoragePool dataCenter = ( ( org.ovirt.engine.core.common.businessentities.StoragePool ) ( getSystemTreeSelectedItem ( ) . getEntity ( ) ) ) ; setSelectedItem ( org.ovirt.engine.ui.uicommonweb.Linq.firstOrDefault ( org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.StoragePool > cast ( getItems ( ) ) , new org.ovirt.engine.ui.uicommonweb.Linq.DataCenterPredicate ( dataCenter.getId ( ) ) ) ) ; } }
Source:
private void handleCinderDomain ( ) { org.ovirt.engine.core.bll.storage.CINDERStorageHelper CINDERStorageHelper = new org.ovirt.engine.core.bll.storage.CINDERStorageHelper ( ) ; CINDERStorageHelper.attachCinderDomainToPool ( org.ovirt.engine.core.bll.storage.domain.AttachStorageDomainToPoolCommand.getStorageDomain ( ) . getId ( ) , org.ovirt.engine.core.bll.storage.domain.AttachStorageDomainToPoolCommand.getParameters ( ) . getStoragePoolId ( ) ) ; if ( org.ovirt.engine.core.bll.storage.domain.AttachStorageDomainToPoolCommand.getParameters ( ) . getActivate ( ) ) { attemptToActivateCinderDomain ( ) ; } org.ovirt.engine.core.bll.storage.domain.AttachStorageDomainToPoolCommand.setSucceeded ( true ) ; }

Target:
private void handleCinderDomain ( ) { org.ovirt.engine.core.bll.storage.connection.CINDERStorageHelper CINDERStorageHelper = new org.ovirt.engine.core.bll.storage.connection.CINDERStorageHelper ( ) ; CINDERStorageHelper.attachCinderDomainToPool ( org.ovirt.engine.core.bll.storage.domain.AttachStorageDomainToPoolCommand.getStorageDomain ( ) . getId ( ) , org.ovirt.engine.core.bll.storage.domain.AttachStorageDomainToPoolCommand.getParameters ( ) . getStoragePoolId ( ) ) ; if ( org.ovirt.engine.core.bll.storage.domain.AttachStorageDomainToPoolCommand.getParameters ( ) . getActivate ( ) ) { attemptToActivateCinderDomain ( ) ; } org.ovirt.engine.core.bll.storage.domain.AttachStorageDomainToPoolCommand.setSucceeded ( true ) ; }
Source:
private static java.lang.String mockConfig ( org.ovirt.engine.core.compat.Version version , org.ovirt.engine.core.common.queries.ConfigurationValues configurationValues ) { java.lang.String returnValue = org.ovirt.engine.core.utils.RandomUtils.instance ( ) . nextString ( 10 , true ) ; org.ovirt.engine.core.common.config.ConfigValues configValues = org.ovirt.engine.core.common.config.ConfigValues.valueOf ( configurationValues.name ( ) ) ; org.ovirt.engine.core.bll.GetConfigurationValueQueryTest.mcr.mockConfigValue ( configValues , version , returnValue ) ; return returnValue ; }

Target:
private static java.lang.String mockConfig ( org.ovirt.engine.core.compat.Version version , org.ovirt.engine.core.common.queries.ConfigurationValues configurationValues ) { java.lang.String returnValue = org.ovirt.engine.core.utils.RandomUtils.instance ( ) . nextString ( 10 , true ) ; org.ovirt.engine.core.common.config.ConfigValues configValues = org.ovirt.engine.core.common.config.ConfigValues.valueOf ( configurationValues.name ( ) ) ; mcr.mockConfigValue ( configValues , version , returnValue ) ; return returnValue ; }
Source:
public void testImportVMFromConfigurationXMLCouldNotGetParsed ( ) { org.ovirt.engine.core.common.businessentities.OvfEntityData ovfEntity = getOvfEntityData ( ) ; ovfEntity.setOvfData ( "This is not a valid XML" ) ; initCommand ( ovfEntity ) ; org.mockito.Mockito.when ( unregisteredOVFDataDao.getByEntityIdAndStorageDomain ( vmId , storageDomainId ) ) . thenReturn ( ovfEntity ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( cmd , VdcBllMessages.ACTION_TYPE_FAILED_OVF_CONFIGURATION_NOT_SUPPORTED ) ; }

Target:
public void testImportVMFromConfigurationXMLCouldNotGetParsed ( ) { org.ovirt.engine.core.common.businessentities.OvfEntityData ovfEntity = getOvfEntityData ( ) ; ovfEntity.setOvfData ( "This is not a valid XML" ) ; initCommand ( ovfEntity ) ; org.mockito.Mockito.when ( unregisteredOVFDataDao.getByEntityIdAndStorageDomain ( vmId , storageDomainId ) ) . thenReturn ( ovfEntity ) ; org.mockito.Mockito.when ( validator.validateUnregisteredEntity ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.IVdcQueryable.class ) , org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.OvfEntityData.class ) , org.mockito.Matchers.anyList ( ) ) ) . thenReturn ( new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.ACTION_TYPE_FAILED_OVF_CONFIGURATION_NOT_SUPPORTED ) ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( cmd , VdcBllMessages.ACTION_TYPE_FAILED_OVF_CONFIGURATION_NOT_SUPPORTED ) ; }
Source:
public static void GetCustomPropertiesList ( 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.HashMap < org.ovirt.engine.core.compat.Version , java.lang.String > ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmCustomProperties , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }

Target:
public static void GetRpmVersionViaPublic ( 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.RunPublicQuery ( VdcQueryType.GetConfigurationValue , new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.ProductRPMVersion , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
public void getGlusterHostsNewlyAdded ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId , boolean isFingerprintRequired ) { 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.getInstance ( ) . runQuery ( VdcQueryType.GetAddedGlusterServers , new org.ovirt.engine.core.common.queries.gluster.AddedGlusterServersParameters ( clusterId , isFingerprintRequired ) , aQuery ) ; }

Target:
public void countAllTemplates ( 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 ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmTemplateCount , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }
Source:
public void testUpdateIscsiBond ( ) { final java.lang.String newDescription = "10GB iscsi bond" ; org.ovirt.engine.core.common.businessentities.IscsiBond iscsiBond = dao.get ( iscsiBondId ) ; junit.framework.Assert.assertFalse ( newDescription.equals ( iscsiBond.getDescription ( ) ) ) ; iscsiBond.setDescription ( newDescription ) ; dao.update ( iscsiBond ) ; iscsiBond = dao.get ( iscsiBondId ) ; junit.framework.Assert.assertEquals ( newDescription , iscsiBond.getDescription ( ) ) ; }

Target:
public void testUpdateIscsiBond ( ) { final java.lang.String newDescription = "10GB iscsi bond" ; org.ovirt.engine.core.common.businessentities.IscsiBond iscsiBond = dao.get ( iscsiBondId ) ; org.junit.Assert.assertFalse ( newDescription.equals ( iscsiBond.getDescription ( ) ) ) ; iscsiBond.setDescription ( newDescription ) ; dao.update ( iscsiBond ) ; iscsiBond = dao.get ( iscsiBondId ) ; org.junit.Assert.assertEquals ( newDescription , iscsiBond.getDescription ( ) ) ; }
Source:
public static boolean IsDataActiveStorageDomain ( org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain ) { boolean isData = ( ( storageDomain.getstorage_domain_type ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageDomainType.Data ) ) || ( ( storageDomain.getstorage_domain_type ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageDomainType.Master ) ) ; boolean isActive = org.ovirt.engine.ui.uicommonweb.Linq.IsActiveStorageDomain ( storageDomain ) ; return isData && isActive ; }

Target:
public static boolean IsDataActiveStorageDomain ( org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain ) { boolean isData = ( ( storageDomain.getStorageDomainType ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageDomainType.Data ) ) || ( ( storageDomain.getStorageDomainType ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageDomainType.Master ) ) ; boolean isActive = org.ovirt.engine.ui.uicommonweb.Linq.IsActiveStorageDomain ( storageDomain ) ; return isData && isActive ; }
Source:
private java.lang.String getMemoryFromActiveSnapshot ( ) { if ( memoryFromSnapshotUsed ) { return org.apache.commons.lang.StringUtils.EMPTY ; } if ( ( getFlow ( ) ) == ( org.ovirt.engine.core.bll.RunVmCommand.RunVmFlow.RESUME_HIBERNATE ) ) { return org.ovirt.engine.core.bll.RunVmCommand.getActiveSnapshot ( ) . getMemoryVolume ( ) ; } if ( ! ( org.ovirt.engine.core.common.FeatureSupported.isMemorySnapshotSupportedByArchitecture ( org.ovirt.engine.core.bll.RunVmCommand.getVm ( ) . getClusterArch ( ) , org.ovirt.engine.core.bll.RunVmCommand.getVm ( ) . getCompatibilityVersion ( ) ) ) ) { return org.apache.commons.lang.StringUtils.EMPTY ; } return org.ovirt.engine.core.bll.RunVmCommand.getActiveSnapshot ( ) . getMemoryVolume ( ) ; }

Target:
private java.lang.String getMemoryFromActiveSnapshot ( ) { if ( memoryFromSnapshotUsed ) { return org.apache.commons.lang.StringUtils.EMPTY ; } if ( ( getFlow ( ) ) == ( org.ovirt.engine.core.common.action.RunVmParams.RunVmFlow.RESUME_HIBERNATE ) ) { return org.ovirt.engine.core.bll.RunVmCommand.getActiveSnapshot ( ) . getMemoryVolume ( ) ; } if ( ! ( org.ovirt.engine.core.common.FeatureSupported.isMemorySnapshotSupportedByArchitecture ( org.ovirt.engine.core.bll.RunVmCommand.getVm ( ) . getClusterArch ( ) , org.ovirt.engine.core.bll.RunVmCommand.getVm ( ) . getCompatibilityVersion ( ) ) ) ) { return org.apache.commons.lang.StringUtils.EMPTY ; } return org.ovirt.engine.core.bll.RunVmCommand.getActiveSnapshot ( ) . getMemoryVolume ( ) ; }
Source:
public void getStorageDomainByName ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String storageDomainName ) { 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.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainByName , new org.ovirt.engine.core.common.queries.NameQueryParameters ( storageDomainName ) , aQuery ) ; }

Target:
public void getAAANamespaces ( 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.HashMap < java.lang.String , java.util.List < java.lang.String > > ) ( source ) ) : new java.util.HashMap < java.lang.String , java.util.List < java.lang.String > > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAvailableNamespaces , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }
Source:
public void syncWithBackend ( ) { final org.ovirt.engine.core.common.businessentities.StoragePool dc = getSelectedDc ( ) ; if ( dc == null ) { return ; } boolean isSupportBridgesReportByVDSM = ( ( java.lang.Boolean ) ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigValuePreConverted ( ConfigurationValues.SupportBridgesReportByVDSM , dc.getcompatibility_version ( ) . toString ( ) ) ) ) ; setSupportBridgesReportByVDSM ( isSupportBridgesReportByVDSM ) ; boolean isMTUOverrideSupported = ( ( java.lang.Boolean ) ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigValuePreConverted ( ConfigurationValues.MTUOverrideSupported , dc.getcompatibility_version ( ) . toString ( ) ) ) ) ; setMTUOverrideSupported ( isMTUOverrideSupported ) ; }

Target:
public void syncWithBackend ( ) { final org.ovirt.engine.core.common.businessentities.StoragePool dc = getSelectedDc ( ) ; if ( dc == null ) { return ; } boolean isSupportBridgesReportByVDSM = ( ( java.lang.Boolean ) ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigValuePreConverted ( ConfigurationValues.SupportBridgesReportByVDSM , dc.getcompatibility_version ( ) . toString ( ) ) ) ) ; setSupportBridgesReportByVDSM ( isSupportBridgesReportByVDSM ) ; boolean isMTUOverrideSupported = ( ( java.lang.Boolean ) ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigValuePreConverted ( ConfigurationValues.MTUOverrideSupported , dc.getcompatibility_version ( ) . toString ( ) ) ) ) ; setMTUOverrideSupported ( isMTUOverrideSupported ) ; }
Source:
public void update ( org.ovirt.engine.core.common.businessentities.network_cluster cluster ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "cluster_id" , cluster.getcluster_id ( ) ) . addValue ( "network_id" , cluster.getnetwork_id ( ) ) . addValue ( "status" , cluster.getstatus ( ) ) . addValue ( "is_display" , cluster.getis_display ( ) ) . addValue ( "required" , cluster.isRequired ( ) ) ; getCallsHandler ( ) . executeModification ( "Updatenetwork_cluster" , parameterSource ) ; }

Target:
public void update ( org.ovirt.engine.core.common.businessentities.NetworkCluster cluster ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "cluster_id" , cluster.getcluster_id ( ) ) . addValue ( "network_id" , cluster.getnetwork_id ( ) ) . addValue ( "status" , cluster.getstatus ( ) ) . addValue ( "is_display" , cluster.getis_display ( ) ) . addValue ( "required" , cluster.isRequired ( ) ) ; getCallsHandler ( ) . executeModification ( "Updatenetwork_cluster" , parameterSource ) ; }
Source:
private void createDefaultFileStats ( java.lang.Object [ ] fileNames ) { java.util.Map < java.lang.String , java.lang.Object > defaultFileStats = new java.util.HashMap < > ( ) ; defaultFileStats.put ( VdsProperties.size , java.lang.String.valueOf ( StorageConstants.SIZE_IS_NOT_AVAILABLE ) ) ; for ( int i = 0 ; i < ( fileNames.length ) ; i ++ ) { fileStats.put ( ( ( java.lang.String ) ( fileNames [ i ] ) ) , defaultFileStats ) ; } }

Target:
private void createDefaultFileStats ( java.lang.Object [ ] fileNames ) { for ( int i = 0 ; i < ( fileNames.length ) ; i ++ ) { fileStats.put ( ( ( java.lang.String ) ( fileNames [ i ] ) ) , java.util.Collections.< java.lang.String , java.lang.Object > emptyMap ( ) ) ; } }
Source:
protected void executeQueryCommand ( ) { org.ovirt.engine.core.bll.gluster.GetGlusterVolumeGeoRepConfigListQuery.getQueryReturnValue ( ) . setReturnValue ( org.ovirt.engine.core.bll.gluster.GetGlusterVolumeGeoRepConfigListQuery.getGeoRepDao ( ) . getGeoRepSessionConfig ( org.ovirt.engine.core.bll.gluster.GetGlusterVolumeGeoRepConfigListQuery.getParameters ( ) . getId ( ) ) ) ; }

Target:
protected void executeQueryCommand ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSessionConfiguration > configs = org.ovirt.engine.core.bll.gluster.GetGlusterVolumeGeoRepConfigListQuery.getGeoRepDao ( ) . getGeoRepSessionConfig ( org.ovirt.engine.core.bll.gluster.GetGlusterVolumeGeoRepConfigListQuery.getParameters ( ) . getId ( ) ) ; configs.addAll ( org.ovirt.engine.core.bll.gluster.GetGlusterVolumeGeoRepConfigListQuery.getGeoRepDao ( ) . getGlusterGeoRepSessionUnSetConfig ( org.ovirt.engine.core.bll.gluster.GetGlusterVolumeGeoRepConfigListQuery.getParameters ( ) . getId ( ) ) ) ; org.ovirt.engine.core.bll.gluster.GetGlusterVolumeGeoRepConfigListQuery.getQueryReturnValue ( ) . setReturnValue ( configs ) ; }
Source:
protected void UpdateActionAvailability ( ) { super . UpdateActionAvailability ( ) ; getConnectCommand ( ) . setIsExecutionAllowed ( ( ( ( ( getEntity ( ) ) != null ) && ( ( ( getEntity ( ) . getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.Up ) ) || ( ( getEntity ( ) . getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.PoweringDown ) ) ) ) && ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.IsWindowsOsType ( getEntity ( ) . getVmOs ( ) ) ) ) ) ; }

Target:
protected void updateActionAvailability ( ) { super . updateActionAvailability ( ) ; getConnectCommand ( ) . setIsExecutionAllowed ( ( ( ( ( getEntity ( ) ) != null ) && ( ( ( getEntity ( ) . getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.Up ) ) || ( ( getEntity ( ) . getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.PoweringDown ) ) ) ) && ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.isWindowsOsType ( getEntity ( ) . getVmOsId ( ) ) ) ) ) ; }
Source:
protected boolean canDoAction ( ) { if ( ( getNic ( ) ) == null ) { return failCanDoAction ( VdcBllMessages.HOST_NETWORK_INTERFACE_NOT_EXIST ) ; } if ( ( ! ( org.ovirt.engine.core.utils.NetworkUtils.isLabeled ( getNic ( ) ) ) ) || ( ! ( getNic ( ) . getLabels ( ) . contains ( getLabel ( ) ) ) ) ) { return failCanDoAction ( VdcBllMessages.INTERFACE_NOT_LABELED ) ; } return true ; }

Target:
protected void setActionMessageParameters ( ) { addCanDoActionMessage ( EngineMessage.VAR__ACTION__REMOVE ) ; addCanDoActionMessage ( EngineMessage.VAR__TYPE__LABEL ) ; }
Source:
public javax.ws.rs.core.Response add ( org.ovirt.engine.api.model.Permission permission ) { validateParameters ( permission , ( isPrincipalSubCollection ( ) ? new java.lang.String [ ] { "role.id" , "dataCenter|cluster|host|storageDomain|vm|vmpool|template.id" } : new java.lang.String [ ] { "role.id" , "user|group.id" } ) ) ; org.ovirt.engine.core.common.businessentities.permissions entity = map ( permission , getPermissionsTemplate ( permission ) ) ; return performCreation ( VdcActionType.AddPermission , getPrincipal ( entity , permission ) , new org.ovirt.engine.api.restapi.resource.QueryIdResolver < org.ovirt.engine.core.compat.Guid > ( org.ovirt.engine.core.common.queries.VdcQueryType.GetPermissionById , org.ovirt.engine.core.common.queries.MultilevelAdministrationByPermissionIdParameters.class ) ) ; }

Target:
public javax.ws.rs.core.Response add ( org.ovirt.engine.api.model.Permission permission ) { validateParameters ( permission , ( isPrincipalSubCollection ( ) ? new java.lang.String [ ] { "role.id" , "dataCenter|cluster|host|storageDomain|vm|vmpool|template.id" } : new java.lang.String [ ] { "role.id" , "user|group.id" } ) ) ; org.ovirt.engine.core.common.businessentities.permissions entity = map ( permission , getPermissionsTemplate ( permission ) ) ; return performCreate ( VdcActionType.AddPermission , getPrincipal ( entity , permission ) , new org.ovirt.engine.api.restapi.resource.QueryIdResolver < org.ovirt.engine.core.compat.Guid > ( org.ovirt.engine.core.common.queries.VdcQueryType.GetPermissionById , org.ovirt.engine.core.common.queries.MultilevelAdministrationByPermissionIdParameters.class ) ) ; }
Source:
private void selectDefaul ( org.ovirt.engine.ui.uicommonweb.models.userportal.UserPortalBasicListModel model , java.util.List < org.ovirt.engine.ui.uicommonweb.models.userportal.UserPortalItemModel > items ) { if ( ( model.getSelectedItem ( ) ) != null ) { return ; } org.ovirt.engine.ui.uicommonweb.models.userportal.UserPortalItemModel item = items.iterator ( ) . next ( ) ; if ( item == null ) { return ; } model.setSelectedItem ( item ) ; }

Target:
private void selectDefault ( org.ovirt.engine.ui.uicommonweb.models.userportal.UserPortalBasicListModel model , java.util.List < org.ovirt.engine.ui.uicommonweb.models.userportal.UserPortalItemModel > items ) { if ( ( model.getSelectedItem ( ) ) != null ) { return ; } if ( ( items == null ) || ( ( items.size ( ) ) == 0 ) ) { return ; } org.ovirt.engine.ui.uicommonweb.models.userportal.UserPortalItemModel item = items.iterator ( ) . next ( ) ; if ( item == null ) { return ; } model.setSelectedItem ( item ) ; }
Source:
protected void selectDataCenterWithCluster ( org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel model , org.ovirt.engine.core.compat.Guid selectedCluster , java.util.List < org.ovirt.engine.ui.uicommonweb.models.vms.DataCenterWithCluster > dataCentersWithClusters ) { if ( selectedCluster == null ) { getDataCenterWithClustersList ( ) . setSelectedItem ( org.ovirt.engine.ui.uicommonweb.Linq.firstOrDefault ( dataCentersWithClusters ) ) ; } else { model.getDataCenterWithClustersList ( ) . setSelectedItem ( org.ovirt.engine.ui.uicommonweb.Linq.firstOrDefault ( dataCentersWithClusters , new org.ovirt.engine.ui.uicommonweb.Linq.DataCenterWithClusterAccordingClusterPredicate ( ( ( org.ovirt.engine.core.compat.Guid ) ( selectedCluster ) ) ) ) ) ; } }

Target:
private void overrideMigrationDowntimeChanged ( ) { java.lang.Boolean entity = getOverrideMigrationDowntime ( ) . getEntity ( ) ; getMigrationDowntime ( ) . setIsChangable ( java.lang.Boolean.TRUE.equals ( entity ) ) ; }