auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
void initLists ( org.ovirt.engine.ui.uicommonweb.models.storage.IscsiStorageModel object ) { iscsiTargetToLunView = new org.ovirt.engine.ui.common.widget.uicommon.storage.IscsiTargetToLunView ( treeCollapsedHeight , treeExpandedHeight , false , multiSelection ) ; iscsiLunToTargetView = new org.ovirt.engine.ui.common.widget.uicommon.storage.IscsiLunToTargetView ( lunsTreeHeight , multiSelection ) ; dialogTabPanel.getElement ( ) . getStyle ( ) . setHeight ( tabContentHeight , Unit.PX ) ; updateStyle ( targetsToLunTab ) ; updateStyle ( lunToTargetsTab ) ; lunsListPanel.setWidget ( iscsiLunToTargetView ) ; targetsToLunsPanel.setWidget ( iscsiTargetToLunView ) ; }

Target:
void initLists ( org.ovirt.engine.ui.uicommonweb.models.storage.IscsiStorageModel object ) { iscsiTargetToLunView = new org.ovirt.engine.ui.common.widget.uicommon.storage.IscsiTargetToLunView ( treeCollapsedHeight , treeExpandedHeight , false , multiSelection ) ; iscsiLunToTargetView = new org.ovirt.engine.ui.common.widget.uicommon.storage.IscsiLunToTargetView ( lunsTreeHeight , multiSelection ) ; dialogTabPanel.getElement ( ) . getStyle ( ) . setHeight ( tabContentHeight , Unit.PX ) ; lunsListPanel.setWidget ( iscsiLunToTargetView ) ; targetsToLunsPanel.setWidget ( iscsiTargetToLunView ) ; }
Source:
public void testRemoveForced ( ) throws java.lang.Exception { setUpGetEntityExpectations ( 1 ) ; setUpVersionExpectations ( ) ; javax.ws.rs.core.UriInfo uriInfo = setUpActionExpectations ( VdcActionType.RemoveStoragePool , org.ovirt.engine.core.common.action.StoragePoolParametersBase.class , new java.lang.String [ ] { "StoragePoolId" , "ForceDelete" } , new java.lang.Object [ ] { GUIDS [ 0 ] , java.lang.Boolean.TRUE } , true , true , false ) ; uriInfo = addMatrixParameterExpectations ( uriInfo , BackendDataCenterResource.FORCE , java.lang.Boolean.TRUE.toString ( ) ) ; setUriInfo ( uriInfo ) ; control.replay ( ) ; verifyRemove ( resource.remove ( ) ) ; }

Target:
public void testRemoveForced ( ) throws java.lang.Exception { setUpGetEntityExpectations ( 1 ) ; setUpVersionExpectations ( ) ; javax.ws.rs.core.UriInfo uriInfo = setUpActionExpectations ( VdcActionType.RemoveStoragePool , org.ovirt.engine.core.common.action.StoragePoolParametersBase.class , new java.lang.String [ ] { "StoragePoolId" , "ForceDelete" } , new java.lang.Object [ ] { GUIDS [ 0 ] , java.lang.Boolean.TRUE } , true , true , false ) ; uriInfo = addMatrixParameterExpectations ( uriInfo , BackendDataCenterResource.FORCE , java.lang.Boolean.TRUE.toString ( ) ) ; setUriInfo ( uriInfo ) ; verifyRemove ( resource.remove ( ) ) ; }
Source:
protected void updateConsoleDevice ( org.ovirt.engine.core.compat.Guid vmId ) { org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetConsoleDevices , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , new org.ovirt.engine.ui.frontend.AsyncQuery ( this , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { java.util.List < java.lang.String > consoleDevices = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ; getModel ( ) . getIsConsoleDeviceEnabled ( ) . setEntity ( ( ! ( consoleDevices.isEmpty ( ) ) ) ) ; } } ) ) ; }

Target:
protected void updateConsoleDevice ( org.ovirt.engine.core.compat.Guid vmId ) { org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetConsoleDevices , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , new org.ovirt.engine.ui.frontend.AsyncQuery ( this , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { java.util.List < java.lang.String > consoleDevices = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ; getModel ( ) . getIsConsoleDeviceEnabled ( ) . setEntity ( ( ! ( consoleDevices.isEmpty ( ) ) ) ) ; } } ) ) ; }
Source:
public org.ovirt.engine.ui.common.uicommon.model.DetailModelProvider < org.ovirt.engine.ui.uicommonweb.models.networks.NetworkListModel , org.ovirt.engine.ui.uicommonweb.models.networks.NetworkGeneralModel > getNetworkGeneralProvider ( com.google.gwt.event.shared.EventBus eventBus , com.google.inject.Provider < org.ovirt.engine.ui.common.presenter.popup.DefaultConfirmationPopupPresenterWidget > defaultConfirmPopupProvider , final com.google.inject.Provider < org.ovirt.engine.ui.uicommonweb.models.networks.NetworkListModel > mainModelProvider , final com.google.inject.Provider < org.ovirt.engine.ui.uicommonweb.models.networks.NetworkGeneralModel > modelProvider ) { org.ovirt.engine.ui.common.uicommon.model.DetailTabModelProvider < org.ovirt.engine.ui.uicommonweb.models.networks.NetworkListModel , org.ovirt.engine.ui.uicommonweb.models.networks.NetworkGeneralModel > result = new org.ovirt.engine.ui.common.uicommon.model.DetailTabModelProvider < org.ovirt.engine.ui.uicommonweb.models.networks.NetworkListModel , org.ovirt.engine.ui.uicommonweb.models.networks.NetworkGeneralModel > ( eventBus , defaultConfirmPopupProvider ) ; result.setMainModelProvider ( mainModelProvider ) ; result.setModelProvider ( modelProvider ) ; return result ; }

Target:
public org.ovirt.engine.ui.common.uicommon.model.DetailModelProvider < org.ovirt.engine.ui.uicommonweb.models.networks.NetworkListModel , org.ovirt.engine.ui.uicommonweb.models.networks.NetworkGeneralModel > getNetworkGeneralProvider ( com.google.gwt.event.shared.EventBus eventBus , com.google.inject.Provider < org.ovirt.engine.ui.common.presenter.popup.DefaultConfirmationPopupPresenterWidget > defaultConfirmPopupProvider , final com.google.inject.Provider < org.ovirt.engine.ui.uicommonweb.models.networks.NetworkListModel > mainModelProvider , final com.google.inject.Provider < org.ovirt.engine.ui.uicommonweb.models.networks.NetworkGeneralModel > modelProvider ) { org.ovirt.engine.ui.common.uicommon.model.DetailTabModelProvider < org.ovirt.engine.ui.uicommonweb.models.networks.NetworkListModel , org.ovirt.engine.ui.uicommonweb.models.networks.NetworkGeneralModel > result = new org.ovirt.engine.ui.common.uicommon.model.DetailTabModelProvider ( eventBus , defaultConfirmPopupProvider ) ; result.setMainModelProvider ( mainModelProvider ) ; result.setModelProvider ( modelProvider ) ; return result ; }
Source:
public void setUpContainer ( ) { org.mockito.Mockito.when ( engineSessionDao.remove ( org.mockito.ArgumentMatchers.anyLong ( ) ) ) . thenReturn ( 1 ) ; org.mockito.Mockito.when ( ssoSessionValidator.getSessionStatuses ( org.mockito.ArgumentMatchers.anySet ( ) ) ) . thenReturn ( java.util.Collections.singletonMap ( org.ovirt.engine.core.bll.aaa.SessionDataContainerTest.TEST_SSO_TOKEN , true ) ) ; org.mockito.Mockito.when ( ssoSessionUtils.isSessionInUse ( org.mockito.ArgumentMatchers.anyLong ( ) ) ) . thenReturn ( false ) ; org.ovirt.engine.core.common.businessentities.aaa.DbUser user = org.mockito.Mockito.mock ( org.ovirt.engine.core.common.businessentities.aaa.DbUser.class ) ; container.setUser ( org.ovirt.engine.core.bll.aaa.SessionDataContainerTest.TEST_SESSION_ID , user ) ; container.setSsoAccessToken ( org.ovirt.engine.core.bll.aaa.SessionDataContainerTest.TEST_SESSION_ID , org.ovirt.engine.core.bll.aaa.SessionDataContainerTest.TEST_SSO_TOKEN ) ; }

Target:
public void setUpContainer ( ) { org.mockito.Mockito.when ( engineSessionDao.remove ( org.mockito.ArgumentMatchers.anyLong ( ) ) ) . thenReturn ( 1 ) ; org.mockito.Mockito.when ( ssoSessionValidator.getSessionStatuses ( org.mockito.ArgumentMatchers.any ( ) ) ) . thenReturn ( java.util.Collections.singletonMap ( org.ovirt.engine.core.bll.aaa.SessionDataContainerTest.TEST_SSO_TOKEN , true ) ) ; org.mockito.Mockito.when ( ssoSessionUtils.isSessionInUse ( org.mockito.ArgumentMatchers.anyLong ( ) ) ) . thenReturn ( false ) ; org.ovirt.engine.core.common.businessentities.aaa.DbUser user = org.mockito.Mockito.mock ( org.ovirt.engine.core.common.businessentities.aaa.DbUser.class ) ; container.setUser ( org.ovirt.engine.core.bll.aaa.SessionDataContainerTest.TEST_SESSION_ID , user ) ; container.setSsoAccessToken ( org.ovirt.engine.core.bll.aaa.SessionDataContainerTest.TEST_SESSION_ID , org.ovirt.engine.core.bll.aaa.SessionDataContainerTest.TEST_SSO_TOKEN ) ; }
Source:
public void onFailureResetInitialStatus ( ) { mockExecutor ( false ) ; try { command.executeCommand ( ) ; } catch ( org.ovirt.engine.core.common.errors.EngineException exception ) { org.mockito.Mockito.verify ( vdsBrokerFrontend ) . runVdsCommand ( org.mockito.ArgumentMatchers.eq ( VDSCommandType.SetVdsStatus ) , org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.common.vdscommands.SetVdsStatusVDSCommandParameters.class ) ) ; return ; } org.junit.Assert.fail ( ) ; }

Target:
public void onFailureResetInitialStatus ( ) { mockExecutor ( false ) ; try { command.executeCommand ( ) ; } catch ( org.ovirt.engine.core.common.errors.EngineException exception ) { org.mockito.Mockito.verify ( vdsBrokerFrontend ) . runVdsCommand ( org.mockito.ArgumentMatchers.eq ( VDSCommandType.SetVdsStatus ) , org.mockito.ArgumentMatchers.any ( ) ) ; return ; } org.junit.Assert.fail ( ) ; }
Source:
public void canDoActionSucceedsWithForceOption ( ) throws java.lang.Exception { command = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.RemoveVdsCommand < org.ovirt.engine.core.common.action.RemoveVdsParameters > ( new org.ovirt.engine.core.common.action.RemoveVdsParameters ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , true ) ) ) ; prepareMocks ( ) ; mockVdsWithStatus ( VDSStatus.Maintenance ) ; mockVdsDynamic ( ) ; mockVmsPinnedToHost ( java.util.Collections.< java.lang.String > emptyList ( ) ) ; mockIsGlusterEnabled ( true ) ; mockHasVolumeOnServer ( true ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionSuccess ( command ) ; }

Target:
public void canDoActionSucceedsWithForceOption ( ) throws java.lang.Exception { command = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.RemoveVdsCommand ( new org.ovirt.engine.core.common.action.RemoveVdsParameters ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , true ) ) ) ; prepareMocks ( ) ; mockVdsWithStatus ( VDSStatus.Maintenance ) ; mockVdsDynamic ( ) ; mockVmsPinnedToHost ( java.util.Collections.< java.lang.String > emptyList ( ) ) ; mockIsGlusterEnabled ( true ) ; mockHasVolumeOnServer ( true ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionSuccess ( command ) ; }
Source:
public void testPassword ( ) throws java.lang.Exception { client.setPassword ( TestCommon.password ) ; client.connect ( ) ; client.authenticate ( ) ; java.io.ByteArrayOutputStream out = new org.ovirt.engine.core.utils.ssh.ConstraintByteArrayOutputStream ( 500 ) ; client.executeCommand ( org.ovirt.engine.core.utils.ssh.BasicTest.hello_command , null , out , null ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.utils.ssh.BasicTest.hello_result , new java.lang.String ( out.toByteArray ( ) , "UTF-8" ) ) ; }

Target:
public void testPassword ( ) throws java.lang.Exception { try ( final java.io.ByteArrayOutputStream out = new org.ovirt.engine.core.utils.ssh.ConstraintByteArrayOutputStream ( 500 ) ) { client.setPassword ( TestCommon.password ) ; client.connect ( ) ; client.authenticate ( ) ; client.executeCommand ( org.ovirt.engine.core.utils.ssh.BasicTest.hello_command , null , out , null ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.utils.ssh.BasicTest.hello_result , new java.lang.String ( out.toByteArray ( ) , "UTF-8" ) ) ; } }
Source:
public boolean equals ( java.lang.Object obj ) { if ( ( this ) == obj ) { return true ; } if ( ! ( super . equals ( obj ) ) ) { return false ; } if ( ! ( obj instanceof org.ovirt.engine.core.common.businessentities.OpenstackNetworkProviderProperties ) ) { return false ; } org.ovirt.engine.core.common.businessentities.OpenstackNetworkProviderProperties other = ( ( org.ovirt.engine.core.common.businessentities.OpenstackNetworkProviderProperties ) ( obj ) ) ; if ( ( getPluginType ( ) ) != ( other.getPluginType ( ) ) ) { return false ; } return true ; }

Target:
public boolean equals ( java.lang.Object obj ) { if ( ( this ) == obj ) { return true ; } if ( ! ( super . equals ( obj ) ) ) { return false ; } if ( ! ( obj instanceof org.ovirt.engine.core.common.businessentities.OpenstackNetworkProviderProperties ) ) { return false ; } org.ovirt.engine.core.common.businessentities.OpenstackNetworkProviderProperties other = ( ( org.ovirt.engine.core.common.businessentities.OpenstackNetworkProviderProperties ) ( obj ) ) ; if ( ! ( getPluginType ( ) . equals ( other.getPluginType ( ) ) ) ) { return false ; } return true ; }
Source:
public void setup ( ) { map = new org.ovirt.engine.core.common.businessentities.StoragePoolIsoMap ( ) ; cmd.init ( ) ; org.mockito.Mockito.doReturn ( storagePoolDao ) . when ( cmd ) . getStoragePoolDao ( ) ; org.mockito.Mockito.doReturn ( storageDomainDao ) . when ( cmd ) . getStorageDomainDao ( ) ; org.mockito.Mockito.doReturn ( eventQueue ) . when ( cmd ) . getEventQueue ( ) ; }

Target:
public void setup ( ) { map = new org.ovirt.engine.core.common.businessentities.StoragePoolIsoMap ( ) ; cmd.init ( ) ; org.mockito.Mockito.doReturn ( storagePoolDao ) . when ( cmd ) . getStoragePoolDao ( ) ; }
Source:
private void resumeUpload ( ) { if ( ( ( getSelectedItem ( ) ) == null ) || ( ( getWindow ( ) ) != null ) ) { return ; } org.ovirt.engine.ui.uicommonweb.models.storage.UploadImageModel.showUploadDialog ( this , HelpTag.resume_upload_image_to_domain , getEntity ( ) . getId ( ) , ( ( org.ovirt.engine.core.common.businessentities.storage.DiskImage ) ( getSelectedItem ( ) ) ) ) ; }

Target:
private void resumeUpload ( ) { if ( ( ( getSelectedItem ( ) ) == null ) || ( ( getWindow ( ) ) != null ) ) { return ; } org.ovirt.engine.ui.uicommonweb.models.storage.UploadImageModel.showUploadDialog ( this , HelpTag.resume_upload_image_to_domain , getEntity ( ) . getId ( ) , getSelectedItem ( ) ) ; }
Source:
public java.util.ArrayList < java.lang.String > GetSupportedOptions ( java.lang.String agent ) { java.util.ArrayList < java.lang.String > agentOptions = new java.util.ArrayList < java.lang.String > ( ) ; if ( fencingOptionMapping.containsKey ( agent ) ) { java.util.HashMap < java.lang.String , java.lang.String > options = fencingOptionMapping.get ( agent ) ; for ( java.util.Map.Entry < java.lang.String , java.lang.String > pair : options.entrySet ( ) ) { agentOptions.add ( pair.getKey ( ) ) ; } } else { org.ovirt.engine.core.utils.pm.VdsFenceOptions.log.errorFormat ( org.ovirt.engine.core.utils.pm.VdsFenceOptions.AGENT_ERROR , agent ) ; } return agentOptions ; }

Target:
public java.util.ArrayList < java.lang.String > GetSupportedOptions ( java.lang.String agent ) { java.util.ArrayList < java.lang.String > agentOptions = new java.util.ArrayList < java.lang.String > ( ) ; if ( fencingOptionMapping.containsKey ( agent ) ) { java.util.HashMap < java.lang.String , java.lang.String > options = fencingOptionMapping.get ( agent ) ; for ( java.util.Map.Entry < java.lang.String , java.lang.String > pair : options.entrySet ( ) ) { agentOptions.add ( pair.getKey ( ) ) ; } } else { org.ovirt.engine.core.utils.pm.VdsFenceOptions.log.error ( org.ovirt.engine.core.utils.pm.VdsFenceOptions.AGENT_ERROR , agent ) ; } return agentOptions ; }
Source:
private java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > getDisks ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > disks = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.core.compat.Guid diskId : org.ovirt.engine.core.bll.ImportVmFromExternalProviderCommand.getParameters ( ) . getDisks ( ) ) { disks.add ( getDisk ( diskId ) ) ; } return disks ; }

Target:
protected java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > getDisks ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > disks = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.core.compat.Guid diskId : org.ovirt.engine.core.bll.ImportVmFromExternalProviderCommand.getParameters ( ) . getDisks ( ) ) { disks.add ( getDisk ( diskId ) ) ; } return disks ; }
Source:
private org.ovirt.engine.core.bll.ValidationResult validateCoherentNicIdentification ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment ) { return org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidator.validateCoherentIdentification ( ( ( attachment.getId ( ) ) == null ? null : attachment.getId ( ) . toString ( ) ) , attachment.getNicId ( ) , attachment.getNicName ( ) , EngineMessage.NETWORK_ATTACHMENT_REFERENCES_NICS_INCOHERENTLY , existingInterfacesMap ) ; }

Target:
private org.ovirt.engine.core.bll.ValidationResult validateCoherentNicIdentification ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment ) { return validateCoherentIdentification ( java.lang.String.valueOf ( attachment.getId ( ) ) , attachment.getNicId ( ) , attachment.getNicName ( ) , EngineMessage.NETWORK_ATTACHMENT_REFERENCES_NICS_INCOHERENTLY , existingInterfacesMap ) ; }
Source:
public boolean getIsQxlSupported ( ) { boolean isLinux = getIsLinuxOS ( ) ; boolean isQxl = ( getDisplayType ( ) . getSelectedItem ( ) ) == ( org.ovirt.engine.core.common.businessentities.DisplayType.qxl ) ; boolean isSpice = ( getGraphicsType ( ) . getSelectedItem ( ) ) == ( org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel.GraphicsTypes.SPICE ) ; boolean clusterSupportsSinglePci = ( ( getSelectedCluster ( ) ) != null ) && ( ( Version.v3_3.compareTo ( getSelectedCluster ( ) . getCompatibilityVersion ( ) ) ) <= 0 ) ; return ( ( isLinux && isQxl ) && isSpice ) && clusterSupportsSinglePci ; }

Target:
public boolean getIsQxlSupported ( ) { boolean isLinux = getIsLinuxOS ( ) ; boolean isQxl = ( getDisplayType ( ) . getSelectedItem ( ) ) == ( org.ovirt.engine.core.common.businessentities.DisplayType.qxl ) ; boolean isSpice = ( getGraphicsType ( ) . getSelectedItem ( ) ) == ( org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel.GraphicsTypes.SPICE ) ; boolean clusterSupportsSinglePci = ( Version.v3_3.compareTo ( getCompatibilityVersion ( ) ) ) <= 0 ; return ( ( isLinux && isQxl ) && isSpice ) && clusterSupportsSinglePci ; }
Source:
public void migrationSupported ( ) { org.mockito.Mockito.when ( cluster.getCompatibilityVersion ( ) ) . thenReturn ( org.mockito.Mockito.mock ( org.ovirt.engine.core.compat.Version.class ) ) ; validator = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.validator.ClusterValidator ( dbFacade , cluster , cpuFlagsManagerHandler ) ) ; org.mockito.Mockito.doReturn ( true ) . when ( validator ) . migrationSupportedForArch ( org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.common.businessentities.ArchitectureType.class ) ) ; org.junit.Assert.assertThat ( validator.migrationSupported ( org.ovirt.engine.core.utils.RandomUtils.instance ( ) . nextEnum ( org.ovirt.engine.core.common.businessentities.ArchitectureType.class ) ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }

Target:
public void migrationSupported ( ) { validator = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.validator.ClusterValidator ( dbFacade , cluster , cpuFlagsManagerHandler ) ) ; org.mockito.Mockito.doReturn ( true ) . when ( validator ) . migrationSupportedForArch ( org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.common.businessentities.ArchitectureType.class ) ) ; org.junit.Assert.assertThat ( validator.migrationSupported ( org.ovirt.engine.core.utils.RandomUtils.instance ( ) . nextEnum ( org.ovirt.engine.core.common.businessentities.ArchitectureType.class ) ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }
Source:
private void updateOptions ( ) { getCompulsoryActions ( ) . clear ( ) ; getOptionalActions ( ) . clear ( ) ; if ( ( getEntity ( ) ) != null ) { startProgress ( null ) ; if ( ! ( getEntity ( ) . isLocal ( ) ) ) { updateOptionsNonLocalFSData ( ) ; } else { updateOptionsLocalFSData ( ) ; } } }

Target:
private void updateOptions ( ) { getCompulsoryActions ( ) . clear ( ) ; getOptionalActions ( ) . clear ( ) ; if ( ( getEntity ( ) ) != null ) { startProgress ( ) ; if ( ! ( getEntity ( ) . isLocal ( ) ) ) { updateOptionsNonLocalFSData ( ) ; } else { updateOptionsLocalFSData ( ) ; } } }
Source:
private static org.ovirt.engine.core.extensions.mgr.ExtensionProxy getExtensionByConfigKey ( org.ovirt.engine.api.extensions.ExtMap context , java.lang.String key , java.lang.String value ) { org.ovirt.engine.core.extensions.mgr.ExtensionProxy ret = null ; for ( org.ovirt.engine.core.extensions.mgr.ExtensionProxy proxy : org.ovirt.engine.exttool.aaa.AAAServiceImpl.getExtensionsManager ( context ) . getExtensionsByService ( org.ovirt.engine.api.extensions.aaa.Authn.class . getName ( ) ) ) { if ( value.equals ( proxy.getContext ( ) . < java.util.Properties > get ( Base.ContextKeys.CONFIGURATION ) . getProperty ( key ) ) ) { ret = proxy ; break ; } } return ret ; }

Target:
private org.ovirt.engine.core.extensions.mgr.ExtensionProxy getExtensionByConfigKey ( java.lang.String key , java.lang.String value ) { org.ovirt.engine.core.extensions.mgr.ExtensionProxy ret = null ; for ( org.ovirt.engine.core.extensions.mgr.ExtensionProxy proxy : getExtensionsManager ( ) . getExtensionsByService ( org.ovirt.engine.api.extensions.aaa.Authn.class . getName ( ) ) ) { if ( value.equals ( proxy.getContext ( ) . < java.util.Properties > get ( Base.ContextKeys.CONFIGURATION ) . getProperty ( key ) ) ) { ret = proxy ; break ; } } return ret ; }
Source:
protected void postDiscoverTargetsInternal ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageServerConnections > newItems ) { if ( newItems.isEmpty ( ) ) { setMessage ( org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getConstants ( ) . noNewDevicesWereFoundMsg ( ) ) ; return ; } java.util.SortedSet < org.ovirt.engine.ui.uicommonweb.models.storage.SanTargetModel > targetsSet = getTargetsSet ( ) ; targetsSet.addAll ( getTargets ( ) . getItems ( ) ) ; targetsSet.addAll ( getSanTargetModels ( newItems.iterator ( ) ) ) ; getTargets ( ) . setItems ( new java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.storage.SanTargetModel > ( targetsSet ) ) ; proposeDiscover ( ) ; }

Target:
protected void postDiscoverTargetsInternal ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageServerConnections > newItems ) { if ( newItems.isEmpty ( ) ) { setMessage ( org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getConstants ( ) . noNewDevicesWereFoundMsg ( ) ) ; return ; } java.util.SortedSet < org.ovirt.engine.ui.uicommonweb.models.storage.SanTargetModel > targetsSet = getTargetsSet ( ) ; targetsSet.addAll ( getTargets ( ) . getItems ( ) ) ; targetsSet.addAll ( getSanTargetModels ( newItems.iterator ( ) ) ) ; getTargets ( ) . setItems ( new java.util.ArrayList ( targetsSet ) ) ; proposeDiscover ( ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.StorageDomain addNewStorageDomainToDisk ( org.ovirt.engine.core.common.businessentities.DiskImage diskImage , org.ovirt.engine.core.common.businessentities.StorageType storageType ) { org.ovirt.engine.core.common.businessentities.StorageDomain storage = new org.ovirt.engine.core.common.businessentities.StorageDomain ( ) ; storage.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; storage.setStorageType ( storageType ) ; diskImage.setStorageIds ( new java.util.ArrayList < org.ovirt.engine.core.compat.Guid > ( java.util.Arrays.asList ( storage.getId ( ) ) ) ) ; return storage ; }

Target:
private org.ovirt.engine.core.common.businessentities.StorageDomain addNewStorageDomainToDisk ( org.ovirt.engine.core.common.businessentities.DiskImage diskImage , org.ovirt.engine.core.common.businessentities.StorageType storageType ) { org.ovirt.engine.core.common.businessentities.StorageDomain storage = new org.ovirt.engine.core.common.businessentities.StorageDomain ( ) ; storage.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; storage.setStorageType ( storageType ) ; diskImage.setStorageIds ( new java.util.ArrayList ( java.util.Arrays.asList ( storage.getId ( ) ) ) ) ; return storage ; }
Source:
private static java.lang.Boolean AssignBoolValue ( java.util.Map < java.lang.String , java.lang.Object > input , java.lang.String name ) { if ( input.containsKey ( name ) ) { if ( ( input.get ( name ) ) instanceof java.lang.Boolean ) { return ( ( java.lang.Boolean ) ( input.get ( name ) ) ) ; } return java.lang.Boolean.parseBoolean ( input.get ( name ) . toString ( ) ) ; } return null ; }

Target:
private static java.lang.Boolean AssignBoolValue ( java.util.Map < java.lang.String , java.lang.Object > input , java.lang.String name ) { if ( input.containsKey ( name ) ) { if ( ( input.get ( name ) ) instanceof java.lang.Boolean ) { return ( ( java.lang.Boolean ) ( input.get ( name ) ) ) ; } return java.lang.Boolean.parseBoolean ( input.get ( name ) . toString ( ) ) ; } return java.lang.Boolean.FALSE ; }
Source:
protected java.util.List < org.ovirt.engine.core.compat.Guid > getDedicatedHostList ( ) { java.util.List < org.ovirt.engine.core.compat.Guid > dedicatedHost = org.ovirt.engine.core.bll.numa.vm.AbstractVmNumaNodeCommand.getParameters ( ) . getDedicatedHostList ( ) ; if ( dedicatedHost != null ) { return dedicatedHost ; } return org.ovirt.engine.core.bll.numa.vm.AbstractVmNumaNodeCommand.getVm ( ) . getDedicatedVmForVdsList ( ) ; }

Target:
protected java.util.List < org.ovirt.engine.core.compat.Guid > getDedicatedHostList ( ) { java.util.List < org.ovirt.engine.core.compat.Guid > dedicatedHost = org.ovirt.engine.core.bll.numa.vm.AbstractVmNumaNodeCommand.getParameters ( ) . getDedicatedHostList ( ) ; if ( ! ( dedicatedHost.isEmpty ( ) ) ) { return dedicatedHost ; } return org.ovirt.engine.core.bll.numa.vm.AbstractVmNumaNodeCommand.getVm ( ) . getDedicatedVmForVdsList ( ) ; }
Source:
protected java.lang.String getHiddenColumnWidthKey ( com.google.gwt.user.cellview.client.Column < T , ? > column ) { if ( columnResizePersistenceEnabled ) { return ( ( ( ( ( ( org.ovirt.engine.ui.common.widget.table.ColumnResizeCellTable.GRID_HIDDEN ) + "_" ) + ( org.ovirt.engine.ui.common.widget.table.ColumnResizeCellTable.GRID_COLUMN_WIDTH_PREFIX ) ) + "_" ) + ( getGridElementId ( ) ) ) + "_" ) + ( determineOriginalIndex ( getColumnIndex ( column ) ) ) ; } return null ; }

Target:
protected java.lang.String getHiddenColumnWidthKey ( com.google.gwt.user.cellview.client.Column < T , ? > column ) { if ( columnResizePersistenceEnabled ) { return ( ( ( ( ( ( org.ovirt.engine.ui.common.widget.table.ColumnResizeCellTable.GRID_HIDDEN ) + "_" ) + ( org.ovirt.engine.ui.common.widget.table.ColumnResizeCellTable.GRID_COLUMN_WIDTH_PREFIX ) ) + "_" ) + ( getGridElementId ( ) ) ) + "_" ) + ( getColumnIndex ( column ) ) ; } return null ; }
Source:
public java.lang.String getValue ( org.ovirt.engine.core.common.businessentities.Disk object ) { return ( object.getDiskStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.Disk.DiskStorageType.IMAGE ) ? ( ( org.ovirt.engine.core.common.businessentities.DiskImage ) ( object ) ) . getStoragesNames ( ) . get ( 0 ) : constants.notAvailableLabel ( ) ; }

Target:
public java.lang.String getValue ( org.ovirt.engine.core.common.businessentities.Disk object ) { if ( ( object.getDiskStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.Disk.DiskStorageType.IMAGE ) ) { org.ovirt.engine.core.common.businessentities.DiskImage diskImage = ( ( org.ovirt.engine.core.common.businessentities.DiskImage ) ( object ) ) ; if ( ( diskImage.getStoragesNames ( ) ) != null ) { return diskImage.getStoragesNames ( ) . get ( 0 ) ; } } return constants.notAvailableLabel ( ) ; }
Source:
public static final org.ovirt.engine.ui.common.widget.table.column.DiskSizeColumn < org.ovirt.engine.core.common.businessentities.Disk > getSnapshotSizeColumn ( java.lang.String sortBy ) { org.ovirt.engine.ui.common.widget.table.column.TextColumnWithTooltip < org.ovirt.engine.core.common.businessentities.Disk > column = new org.ovirt.engine.ui.common.widget.table.column.DiskSizeColumn < org.ovirt.engine.core.common.businessentities.Disk > ( ) { @ java.lang.Override protected java.lang.Long getRawValue ( org.ovirt.engine.core.common.businessentities.Disk object ) { return ( ( org.ovirt.engine.core.common.businessentities.DiskImage ) ( object ) ) . getActualSizeInBytes ( ) ; } } ; return ( ( org.ovirt.engine.ui.common.widget.table.column.DiskSizeColumn < org.ovirt.engine.core.common.businessentities.Disk > ) ( org.ovirt.engine.ui.common.widget.uicommon.disks.DisksViewColumns.makeSortable ( column , sortBy ) ) ) ; }

Target:
public static final org.ovirt.engine.ui.common.widget.table.column.DiskSizeColumn < org.ovirt.engine.core.common.businessentities.Disk > getSnapshotSizeColumn ( java.lang.String sortBy ) { org.ovirt.engine.ui.common.widget.table.column.DiskSizeColumn < org.ovirt.engine.core.common.businessentities.Disk > column = new org.ovirt.engine.ui.common.widget.table.column.DiskSizeColumn < org.ovirt.engine.core.common.businessentities.Disk > ( ) { @ java.lang.Override protected java.lang.Long getRawValue ( org.ovirt.engine.core.common.businessentities.Disk object ) { return ( ( org.ovirt.engine.core.common.businessentities.DiskImage ) ( object ) ) . getActualSizeInBytes ( ) ; } } ; return org.ovirt.engine.ui.common.widget.uicommon.disks.DisksViewColumns.makeSortable ( column , sortBy ) ; }
Source:
public void testBootFromNetworkNoNetwork ( ) { org.ovirt.engine.core.dao.network.VmNicDao dao = org.mockito.Mockito.mock ( org.ovirt.engine.core.dao.network.VmNicDao.class ) ; org.mockito.Mockito.doReturn ( dao ) . when ( runVmValidator ) . getVmNicDao ( ) ; org.ovirt.engine.core.common.businessentities.VM vm = new org.ovirt.engine.core.common.businessentities.VM ( ) ; vm.setBootSequence ( BootSequence.N ) ; org.ovirt.engine.core.bll.validator.RunVmValidatorTest.validateResult ( runVmValidator.validateBootSequence ( vm , new java.util.ArrayList < > ( ) ) , false , EngineMessage.VM_CANNOT_RUN_FROM_NETWORK_WITHOUT_NETWORK ) ; }

Target:
public void testBootFromNetworkNoNetwork ( ) { org.ovirt.engine.core.common.businessentities.VM vm = new org.ovirt.engine.core.common.businessentities.VM ( ) ; vm.setBootSequence ( BootSequence.N ) ; org.ovirt.engine.core.bll.validator.RunVmValidatorTest.validateResult ( runVmValidator.validateBootSequence ( vm , new java.util.ArrayList < > ( ) ) , false , EngineMessage.VM_CANNOT_RUN_FROM_NETWORK_WITHOUT_NETWORK ) ; }
Source:
protected java.lang.String getBackwardCompatibleUsbPolicy ( org.ovirt.engine.core.common.businessentities.UsbPolicy usbPolicy ) { if ( usbPolicy == null ) { return ( version.compareTo ( Version.v3_1 ) ) < 0 ? org.ovirt.engine.core.common.businessentities.UsbPolicy.PRE_3_1_DISABLED : UsbPolicy.DISABLED.name ( ) ; } if ( ( version.compareTo ( Version.v3_1 ) ) < 0 ) { switch ( usbPolicy ) { case ENABLED_LEGACY : return org.ovirt.engine.core.common.businessentities.UsbPolicy.PRE_3_1_ENABLED ; default : return org.ovirt.engine.core.common.businessentities.UsbPolicy.PRE_3_1_DISABLED ; } } else { return usbPolicy.toString ( ) ; } }

Target:
protected java.lang.String getBackwardCompatibleUsbPolicy ( org.ovirt.engine.core.common.businessentities.UsbPolicy usbPolicy ) { if ( usbPolicy == null ) { return UsbPolicy.DISABLED.name ( ) ; } return usbPolicy.toString ( ) ; }
Source:
public static void getNetworkList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId ) { 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.network.Network > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.Network > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllNetworks , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) , aQuery ) ; }

Target:
public void getNetworkList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId ) { 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.network.Network > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.Network > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllNetworks , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) , aQuery ) ; }
Source:
public void postOnSaveInternalWithImport ( org.ovirt.engine.core.common.action.VdcReturnValueBase returnValue ) { org.ovirt.engine.ui.uicommonweb.models.hosts.MultipleHostsModel hostsModel = ( ( org.ovirt.engine.ui.uicommonweb.models.hosts.MultipleHostsModel ) ( getWindow ( ) ) ) ; hostsModel.getClusterModel ( ) . setClusterId ( ( ( org.ovirt.engine.core.compat.Guid ) ( returnValue.getActionReturnValue ( ) ) ) ) ; addHosts ( hostsModel ) ; }

Target:
public void postOnSaveInternalWithImport ( org.ovirt.engine.core.common.action.VdcReturnValueBase returnValue ) { org.ovirt.engine.ui.uicommonweb.models.hosts.MultipleHostsModel hostsModel = ( ( org.ovirt.engine.ui.uicommonweb.models.hosts.MultipleHostsModel ) ( getWindow ( ) ) ) ; if ( ( returnValue != null ) && ( returnValue.getSucceeded ( ) ) ) { hostsModel.getClusterModel ( ) . setClusterId ( ( ( org.ovirt.engine.core.compat.Guid ) ( returnValue.getActionReturnValue ( ) ) ) ) ; addHosts ( hostsModel ) ; } }
Source:
protected javax.ws.rs.core.Response performNonBlockingAction ( org.ovirt.engine.core.common.action.VdcActionType task , org.ovirt.engine.core.common.action.VdcActionParametersBase params , org.ovirt.engine.api.model.Action action ) { try { doNonBlockingAction ( task , params ) ; if ( action != null ) { action.setStatus ( org.ovirt.engine.api.common.util.StatusUtils.create ( CreationStatus.IN_PROGRESS ) ) ; return javax.ws.rs.core.Response.status ( Response.Status.ACCEPTED ) . entity ( action ) . build ( ) ; } else { return javax.ws.rs.core.Response.status ( Response.Status.ACCEPTED ) . build ( ) ; } } catch ( java.lang.Exception e ) { return handleError ( javax.ws.rs.core.Response.class , e , false ) ; } }

Target:
protected javax.ws.rs.core.Response performNonBlockingAction ( org.ovirt.engine.core.common.action.VdcActionType task , org.ovirt.engine.core.common.action.VdcActionParametersBase params , org.ovirt.engine.api.model.Action action ) { try { doNonBlockingAction ( task , params ) ; if ( action != null ) { action.setStatus ( CreationStatus.IN_PROGRESS.value ( ) ) ; return javax.ws.rs.core.Response.status ( Response.Status.ACCEPTED ) . entity ( action ) . build ( ) ; } else { return javax.ws.rs.core.Response.status ( Response.Status.ACCEPTED ) . build ( ) ; } } catch ( java.lang.Exception e ) { return handleError ( javax.ws.rs.core.Response.class , e , false ) ; } }
Source:
protected java.lang.Object runQuery ( org.ovirt.engine.core.common.queries.VdcQueryType queryType , org.ovirt.engine.core.common.queries.VdcQueryParametersBase queryParams , java.lang.String sessionId ) { initQueryParams ( queryParams , sessionId ) ; org.ovirt.engine.core.common.queries.VdcQueryReturnValue result = backend.runQuery ( queryType , queryParams ) ; return result.getSucceeded ( ) ? result.getReturnValue ( ) : null ; }

Target:
protected java.lang.Object runQuery ( org.ovirt.engine.core.common.queries.VdcQueryType queryType , org.ovirt.engine.core.common.queries.VdcQueryParametersBase queryParams , java.lang.String sessionId ) { initQueryParams ( queryParams , sessionId ) ; org.ovirt.engine.core.common.queries.VdcQueryReturnValue result = backend.runQuery ( queryType , queryParams ) ; return ( result != null ) && ( result.getSucceeded ( ) ) ? result.getReturnValue ( ) : null ; }
Source:
protected org.ovirt.engine.core.common.businessentities.VM setUpStatisticalExpectations ( ) throws java.lang.Exception { org.ovirt.engine.api.restapi.resource.VM entity = new org.ovirt.engine.api.restapi.resource.VM ( ) ; org.ovirt.engine.api.restapi.resource.BackendVmsResourceTest.setUpStatisticalEntityExpectations ( entity , entity.getStatisticsData ( ) ) ; setUpGetEntityExpectations ( 1 , false , entity ) ; control.replay ( ) ; return entity ; }

Target:
protected org.ovirt.engine.core.common.businessentities.VM setUpStatisticalExpectations ( ) throws java.lang.Exception { org.ovirt.engine.api.restapi.resource.VM entity = new org.ovirt.engine.api.restapi.resource.VM ( ) ; org.ovirt.engine.api.restapi.resource.BackendVmsResourceTest.setUpStatisticalEntityExpectations ( entity , entity.getStatisticsData ( ) ) ; setUpGetEntityExpectations ( 1 , false , entity ) ; return entity ; }
Source:
private static int getNextImage ( java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > images , org.ovirt.engine.core.common.businessentities.DiskImage curr ) { for ( int i = 0 ; i < ( images.size ( ) ) ; i ++ ) { if ( images.get ( i ) . getParentId ( ) . equals ( curr.getImageId ( ) ) ) { return i ; } } return - 1 ; }

Target:
public org.ovirt.engine.core.common.businessentities.VDSGroup getVdsGroup ( ) { return super . getVdsGroup ( ) ; }
Source:
public boolean equals ( java.lang.Object obj ) { if ( ( this ) == obj ) { return true ; } if ( obj == null ) { return false ; } if ( ! ( obj instanceof org.ovirt.engine.core.common.businessentities.SubjectEntity ) ) { return false ; } org.ovirt.engine.core.common.businessentities.SubjectEntity other = ( ( org.ovirt.engine.core.common.businessentities.SubjectEntity ) ( obj ) ) ; return ( java.util.Objects.equals ( entityId , other.entityId ) ) && ( java.util.Objects.equals ( entityType , other.entityType ) ) ; }

Target:
public boolean equals ( java.lang.Object obj ) { if ( ( this ) == obj ) { return true ; } if ( ! ( obj instanceof org.ovirt.engine.core.common.businessentities.SubjectEntity ) ) { return false ; } org.ovirt.engine.core.common.businessentities.SubjectEntity other = ( ( org.ovirt.engine.core.common.businessentities.SubjectEntity ) ( obj ) ) ; return ( java.util.Objects.equals ( entityId , other.entityId ) ) && ( java.util.Objects.equals ( entityType , other.entityType ) ) ; }
Source:
protected org.ovirt.engine.api.model.Disk postPopulate ( org.ovirt.engine.api.model.Disk model ) { model.setFormat ( org.ovirt.engine.api.restapi.types.MappingTestHelper.shuffle ( org.ovirt.engine.api.model.DiskFormat.class ) ) ; model.setInterface ( org.ovirt.engine.api.restapi.types.MappingTestHelper.shuffle ( org.ovirt.engine.api.model.DiskInterface.class ) ) ; model.setStatus ( org.ovirt.engine.api.restapi.types.MappingTestHelper.shuffle ( org.ovirt.engine.api.model.DiskStatus.class ) ) ; model.setLunStorage ( new org.ovirt.engine.api.model.HostStorage ( ) ) ; return model ; }

Target:
protected org.ovirt.engine.api.model.Disk postPopulate ( org.ovirt.engine.api.model.Disk model ) { model.setFormat ( org.ovirt.engine.api.restapi.types.MappingTestHelper.shuffle ( org.ovirt.engine.api.model.DiskFormat.class ) ) ; model.setStatus ( org.ovirt.engine.api.restapi.types.MappingTestHelper.shuffle ( org.ovirt.engine.api.model.DiskStatus.class ) ) ; model.setLunStorage ( new org.ovirt.engine.api.model.HostStorage ( ) ) ; return model ; }
Source:
private void onExport ( ) { org.ovirt.engine.ui.uicommonweb.models.vms.ExportVmModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.ExportVmModel ) ( getWindow ( ) ) ) ; if ( ( model.getProgress ( ) ) != null ) { return ; } if ( ! ( model.validate ( ) ) ) { return ; } model.startProgress ( null ) ; getTemplatesNotPresentOnExportDomain ( ) ; }

Target:
private void onExport ( ) { org.ovirt.engine.ui.uicommonweb.models.vms.ExportVmModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.ExportVmModel ) ( getWindow ( ) ) ) ; if ( ( model.getProgress ( ) ) != null ) { return ; } if ( ! ( model.validate ( ) ) ) { return ; } model.startProgress ( ) ; getTemplatesNotPresentOnExportDomain ( ) ; }
Source:
private java.util.List < org.ovirt.engine.api.model.Network > getNetworks ( java.lang.String clusterId ) { org.ovirt.engine.core.compat.Guid dataCenterId = getEntity ( org.ovirt.engine.core.common.businessentities.Cluster.class , VdcQueryType.GetClusterById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( asGuid ( clusterId ) ) , null ) . getStoragePoolId ( ) ; org.ovirt.engine.core.common.queries.IdQueryParameters params = new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) ; return getBackendCollection ( VdcQueryType.GetAllNetworks , params ) ; }

Target:
private java.util.List < org.ovirt.engine.api.model.Network > getNetworks ( ) { org.ovirt.engine.core.compat.Guid dataCenterId = getEntity ( org.ovirt.engine.core.common.businessentities.Cluster.class , VdcQueryType.GetClusterById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( asGuid ( clusterId ) ) , null ) . getStoragePoolId ( ) ; org.ovirt.engine.core.common.queries.IdQueryParameters params = new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) ; return getBackendCollection ( VdcQueryType.GetAllNetworks , params ) ; }
Source:
protected boolean canDoAction ( ) { addCanDoActionMessage ( VdcBllMessages.VAR__ACTION__REMOVE ) ; addCanDoActionMessage ( VdcBllMessages.VAR__TYPE__NETWORK ) ; boolean retVal = true ; if ( retVal ) { retVal = org.ovirt.engine.core.bll.storage.RemoveNetworkCommand.CommonNetworkValidation ( org.ovirt.engine.core.bll.storage.RemoveNetworkCommand.getParameters ( ) . getNetwork ( ) , org.ovirt.engine.core.bll.storage.RemoveNetworkCommand.getReturnValue ( ) . getCanDoActionMessages ( ) ) ; } return retVal ; }

Target:
protected boolean canDoAction ( ) { addCanDoActionMessage ( VdcBllMessages.VAR__ACTION__REMOVE ) ; addCanDoActionMessage ( VdcBllMessages.VAR__TYPE__NETWORK ) ; return org.ovirt.engine.core.bll.storage.RemoveNetworkCommand.CommonNetworkValidation ( org.ovirt.engine.core.bll.storage.RemoveNetworkCommand.getParameters ( ) . getNetwork ( ) , org.ovirt.engine.core.bll.storage.RemoveNetworkCommand.getReturnValue ( ) . getCanDoActionMessages ( ) ) ; }
Source:
protected void setUpQueryExpectations ( java.lang.String query , java.lang.Object failure ) throws java.lang.Exception { assert query.equals ( "" ) ; setUpEntityQueryExpectations ( VdcQueryType.GetStepsByJobId , org.ovirt.engine.core.common.queries.GetStepsByJobIdQueryParameters.class , new java.lang.String [ ] { "JobId" } , new java.lang.Object [ ] { GUIDS [ 1 ] } , setUpSteps ( ) , failure ) ; control.replay ( ) ; }

Target:
protected void setUpQueryExpectations ( java.lang.String query , java.lang.Object failure ) throws java.lang.Exception { assertEquals ( "" , query ) ; setUpEntityQueryExpectations ( VdcQueryType.GetStepsByJobId , org.ovirt.engine.core.common.queries.GetStepsByJobIdQueryParameters.class , new java.lang.String [ ] { "JobId" } , new java.lang.Object [ ] { GUIDS [ 1 ] } , setUpSteps ( ) , failure ) ; control.replay ( ) ; }
Source:
public void OnSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.VmModelBehaviorBase behavior = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.VmModelBehaviorBase ) ( target ) ) ; java.util.Map < java.lang.String , java.lang.String > timezones = ( ( java.util.Map < java.lang.String , java.lang.String > ) ( returnValue ) ) ; timezones.put ( null , "" ) ; cachedTimeZones.put ( timezoneType , timezones.entrySet ( ) ) ; behavior.PostUpdateTimeZone ( selectedTimeZone ) ; }

Target:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.VmModelBehaviorBase behavior = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.VmModelBehaviorBase ) ( target ) ) ; java.util.Map < java.lang.String , java.lang.String > timezones = ( ( java.util.Map < java.lang.String , java.lang.String > ) ( returnValue ) ) ; timezones.put ( null , "" ) ; cachedTimeZones.put ( timezoneType , timezones.entrySet ( ) ) ; behavior.PostUpdateTimeZone ( selectedTimeZone ) ; }
Source:
protected org.ovirt.engine.api.model.GraphicsType asGraphicsType ( ) { java.lang.String consoleString = org.ovirt.engine.api.restapi.utils.HexUtils.hex2string ( consoleId ) ; validateGraphicsEnum ( consoleString ) ; org.ovirt.engine.api.model.GraphicsType type = org.ovirt.engine.api.model.GraphicsType.valueOf ( consoleString ) ; return getMappingLocator ( ) . getMapper ( org.ovirt.engine.api.model.GraphicsType.class , org.ovirt.engine.api.model.GraphicsType.class ) . map ( type , null ) ; }

Target:
protected org.ovirt.engine.api.model.GraphicsType asGraphicsType ( ) { java.lang.String consoleString = org.ovirt.engine.api.restapi.utils.HexUtils.hex2string ( consoleId ) ; org.ovirt.engine.api.model.GraphicsType type = org.ovirt.engine.api.model.GraphicsType.valueOf ( consoleString ) ; return getMappingLocator ( ) . getMapper ( org.ovirt.engine.api.model.GraphicsType.class , org.ovirt.engine.api.model.GraphicsType.class ) . map ( type , null ) ; }
Source:
public void testQueryDefaultGeneralTimeZone ( ) { mcr.mockConfigValue ( ConfigValues.DefaultGeneralTimeZone , org.ovirt.engine.core.bll.GetDefaultTimeZoneQueryTest.DEFAULT_GENERAL_TIME_ZONE ) ; org.mockito.Mockito.when ( getQueryParameters ( ) . getTimeZoneType ( ) ) . thenReturn ( TimeZoneType.GENERAL_TIMEZONE ) ; getQuery ( ) . executeQueryCommand ( ) ; @ java.lang.SuppressWarnings ( value = "unchecked" ) java.lang.String result = ( ( java.lang.String ) ( getQuery ( ) . getQueryReturnValue ( ) . getReturnValue ( ) ) ) ; org.junit.Assert.assertTrue ( ( "Wrong default time zone: " + result ) , result.equals ( org.ovirt.engine.core.bll.GetDefaultTimeZoneQueryTest.DEFAULT_GENERAL_TIME_ZONE ) ) ; }

Target:
public void testQueryDefaultGeneralTimeZone ( ) { mcr.mockConfigValue ( ConfigValues.DefaultGeneralTimeZone , org.ovirt.engine.core.bll.GetDefaultTimeZoneQueryTest.DEFAULT_GENERAL_TIME_ZONE ) ; org.mockito.Mockito.when ( getQueryParameters ( ) . getTimeZoneType ( ) ) . thenReturn ( TimeZoneType.GENERAL_TIMEZONE ) ; getQuery ( ) . executeQueryCommand ( ) ; @ java.lang.SuppressWarnings ( value = "unchecked" ) java.lang.String result = ( ( java.lang.String ) ( getQuery ( ) . getQueryReturnValue ( ) . getReturnValue ( ) ) ) ; org.junit.Assert.assertEquals ( ( "Wrong default time zone: " + result ) , org.ovirt.engine.core.bll.GetDefaultTimeZoneQueryTest.DEFAULT_GENERAL_TIME_ZONE , result ) ; }
Source:
protected void EndImportCommand ( ) { if ( ! ( getParameters ( ) . isImportAsNewEntity ( ) ) ) { setVm ( null ) ; } EndActionOnAllImageGroups ( ) ; if ( ( getVm ( ) ) != null ) { org.ovirt.engine.core.bll.VmHandler.UnLockVm ( getVm ( ) . getId ( ) ) ; UpdateVmImSpm ( ) ; } else { setCommandShouldBeLogged ( false ) ; org.ovirt.engine.core.bll.ImportVmCommand.log.warn ( "ImportVmCommand::EndImportCommand: Vm is null - not performing full EndAction" ) ; } setSucceeded ( true ) ; }

Target:
protected void EndImportCommand ( ) { setVm ( null ) ; EndActionOnAllImageGroups ( ) ; if ( ( getVm ( ) ) != null ) { org.ovirt.engine.core.bll.VmHandler.UnLockVm ( getVm ( ) . getId ( ) ) ; UpdateVmImSpm ( ) ; } else { setCommandShouldBeLogged ( false ) ; org.ovirt.engine.core.bll.ImportVmCommand.log.warn ( "ImportVmCommand::EndImportCommand: Vm is null - not performing full EndAction" ) ; } setSucceeded ( true ) ; }