auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private void assertGetAllForVdsCorrectResult ( java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > result ) { org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface : result ) { org.junit.Assert.assertEquals ( org.ovirt.engine.core.dao.network.InterfaceDaoImplTest.VDS_ID , iface.getVdsId ( ) ) ; } }

Target:
private void assertGetAllForVdsCorrectResult ( java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > result ) { org.junit.jupiter.api.Assertions.assertNotNull ( result ) ; org.junit.jupiter.api.Assertions.assertFalse ( result.isEmpty ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface : result ) { org.junit.jupiter.api.Assertions.assertEquals ( org.ovirt.engine.core.dao.network.InterfaceDaoImplTest.VDS_ID , iface.getVdsId ( ) ) ; } }
Source:
private void addModelListeners ( final org.ovirt.engine.ui.webadmin.uicommon.model.SystemTreeModelProvider modelProvider ) { modelProvider.getModel ( ) . getItemsChangedEvent ( ) . 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.uicommonweb.models.SystemTreeItemModel lastSelectedItem = modelProvider.getSelectionModel ( ) . getSelectedObject ( ) ; modelProvider.getSelectionModel ( ) . setSelected ( lastSelectedItem , false ) ; expandTree ( display.getRootTreeNode ( ) , org.ovirt.engine.ui.webadmin.widget.tree.SystemTree.ITEM_LEVEL ) ; } } ) ; }

Target:
private void addModelListeners ( final org.ovirt.engine.ui.webadmin.uicommon.model.SystemTreeModelProvider modelProvider ) { modelProvider.getModel ( ) . getItemsChangedEvent ( ) . 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.uicommonweb.models.SystemTreeItemModel lastSelectedItem = modelProvider.getSelectionModel ( ) . getSelectedObject ( ) ; modelProvider.getSelectionModel ( ) . setSelected ( lastSelectedItem , false ) ; expandTree ( display.getRootTreeNode ( ) , org.ovirt.engine.ui.webadmin.widget.tree.SystemTree.ITEM_LEVEL ) ; } } ) ; }
Source:
public void testConnection ( ) { getAll ( ) ; }

Target:
public java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > getAll ( ) { try { com.woorea.openstack.quantum.model.Networks networks = getClient ( ) . networks ( ) . list ( ) . execute ( ) ; return map ( networks.getList ( ) ) ; } catch ( java.lang.RuntimeException e ) { throw new org.ovirt.engine.core.common.errors.VdcBLLException ( org.ovirt.engine.core.common.errors.VdcBllErrors.PROVIDER_FAILURE , e ) ; } }
Source:
public void testAddIncompleteParameters2 ( ) throws java.lang.Exception { org.ovirt.engine.api.model.Disk model = org.ovirt.engine.api.restapi.resource.BackendVmDisksResourceTest.getModel ( ) ; model.setProvisionedSize ( null ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; try { collection.add ( model ) ; fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "Disk" , "testAddIncompleteParameters2" , "provisionedSize|size" ) ; } }

Target:
public void testAddIncompleteParameters2 ( ) throws java.lang.Exception { org.ovirt.engine.api.model.Disk model = org.ovirt.engine.api.restapi.resource.BackendVmDisksResourceTest.getModel ( ) ; model.setProvisionedSize ( null ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; try { collection.add ( model ) ; org.junit.Assert.fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "Disk" , "testAddIncompleteParameters2" , "provisionedSize|size" ) ; } }
Source:
public void testGetByIdReturnsNullIfNotExist ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.BusinessEntityMapTest.TestItem testItem = new org.ovirt.engine.core.common.businessentities.BusinessEntityMapTest.TestItem ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , null ) ; org.ovirt.engine.core.common.businessentities.BusinessEntityMap < org.ovirt.engine.core.common.businessentities.BusinessEntityMapTest.TestItem > map = new org.ovirt.engine.core.common.businessentities.BusinessEntityMap ( java.util.Arrays.asList ( testItem ) ) ; org.junit.Assert.assertThat ( map.get ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) , org.hamcrest.CoreMatchers.nullValue ( ) ) ; }

Target:
public void testGetByIdReturnsNullIfNotExist ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.BusinessEntityMapTest.TestItem testItem = new org.ovirt.engine.core.common.businessentities.BusinessEntityMapTest.TestItem ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , null ) ; org.ovirt.engine.core.common.businessentities.BusinessEntityMap < org.ovirt.engine.core.common.businessentities.BusinessEntityMapTest.TestItem > map = new org.ovirt.engine.core.common.businessentities.BusinessEntityMap ( java.util.Collections.singletonList ( testItem ) ) ; org.junit.Assert.assertThat ( map.get ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) , org.hamcrest.CoreMatchers.nullValue ( ) ) ; }
Source:
public java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > getVmDeviceByVmId ( org.ovirt.engine.core.compat.Guid vmId ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "vm_id" , vmId ) ; return getCallsHandler ( ) . executeReadList ( "GetVmDeviceByVmId" , createEntityRowMapper ( ) , parameterSource ) ; }

Target:
public java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > getVmDeviceByVmId ( org.ovirt.engine.core.compat.Guid vmId , org.ovirt.engine.core.compat.Guid userID , boolean isFiltered ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "vm_id" , vmId ) . addValue ( "user_id" , userID ) . addValue ( "is_filtered" , isFiltered ) ; return getCallsHandler ( ) . executeReadList ( "GetVmDeviceByVmId" , createEntityRowMapper ( ) , parameterSource ) ; }
Source:
public void testGetAllStaticByStoragePool ( ) { org.ovirt.engine.core.compat.Guid spID = dbFacade.getVdsGroupDao ( ) . get ( newVmStatic.getVdsGroupId ( ) ) . getStoragePoolId ( ) ; org.junit.Assert.assertNotNull ( spID ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VmStatic > result = dao.getAllByStoragePoolId ( spID ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; }

Target:
public void testGetAllStaticByStoragePool ( ) { org.ovirt.engine.core.compat.Guid spID = dbFacade.getClusterDao ( ) . get ( newVmStatic.getClusterId ( ) ) . getStoragePoolId ( ) ; org.junit.Assert.assertNotNull ( spID ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VmStatic > result = dao.getAllByStoragePoolId ( spID ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; }
Source:
protected void doTestBadRemove ( boolean valid , boolean success , java.lang.String detail ) throws java.lang.Exception { setUriInfo ( setUpActionExpectations ( ActionType.UnlabelNic , org.ovirt.engine.core.common.action.LabelNicParameters.class , new java.lang.String [ ] { "NicId" , "Label" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendHostNicLabelResourceTest.NIC_ID , org.ovirt.engine.api.restapi.resource.BackendHostNicLabelResourceTest.LABELS [ 0 ] } , valid , success ) ) ; try { resource.remove ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }

Target:
protected void doTestBadRemove ( boolean valid , boolean success , java.lang.String detail ) throws java.lang.Exception { setUriInfo ( setUpActionExpectations ( ActionType.UnlabelNic , org.ovirt.engine.core.common.action.LabelNicParameters.class , new java.lang.String [ ] { "NicId" , "Label" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendHostNicLabelResourceTest.NIC_ID , org.ovirt.engine.api.restapi.resource.BackendHostNicLabelResourceTest.LABELS [ 0 ] } , valid , success ) ) ; try { resource.remove ( ) ; org.junit.Assert.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }
Source:
public void setTestResultImage ( java.lang.String errorMessage ) { testResultImage.setResource ( ( errorMessage.isEmpty ( ) ? resources.logNormalImage ( ) : resources.logErrorImage ( ) ) ) ; testResultImage.setStylePrimaryName ( style.testResultImage ( ) ) ; testResultMessage.setText ( ( errorMessage.isEmpty ( ) ? constants.testSuccessMessage ( ) : errorMessage ) ) ; }

Target:
public void setTestResultImage ( java.lang.String errorMessage ) { testResultImage.setResource ( ( errorMessage.isEmpty ( ) ? org.ovirt.engine.ui.webadmin.section.main.view.popup.provider.ProviderPopupView.resources.logNormalImage ( ) : org.ovirt.engine.ui.webadmin.section.main.view.popup.provider.ProviderPopupView.resources.logErrorImage ( ) ) ) ; testResultImage.setStylePrimaryName ( style.testResultImage ( ) ) ; testResultMessage.setText ( ( errorMessage.isEmpty ( ) ? org.ovirt.engine.ui.webadmin.section.main.view.popup.provider.ProviderPopupView.constants.testSuccessMessage ( ) : errorMessage ) ) ; }
Source:
private void validateUpdateDescription ( org.ovirt.engine.core.common.businessentities.VMStatus status ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage disk = createDiskImage ( ) ; disk.setReadOnly ( false ) ; org.mockito.Mockito.when ( diskDao.get ( diskImageGuid ) ) . thenReturn ( disk ) ; org.ovirt.engine.core.common.action.UpdateVmDiskParameters parameters = createParameters ( ) ; parameters.getDiskInfo ( ) . setReadOnly ( false ) ; disk.setDescription ( org.ovirt.engine.core.utils.RandomUtils.instance ( ) . nextString ( 10 ) ) ; initializeCommand ( parameters , java.util.Collections.singletonList ( createVm ( status ) ) ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateSuccess ( command ) ; }

Target:
private void validateUpdateDescription ( org.ovirt.engine.core.common.businessentities.VMStatus status ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage disk = createDiskImage ( ) ; disk.setReadOnly ( false ) ; org.mockito.Mockito.when ( diskDao.get ( diskImageGuid ) ) . thenReturn ( disk ) ; org.ovirt.engine.core.common.action.VmDiskOperationParameterBase parameters = createParameters ( ) ; parameters.getDiskInfo ( ) . setReadOnly ( false ) ; disk.setDescription ( org.ovirt.engine.core.utils.RandomUtils.instance ( ) . nextString ( 10 ) ) ; initializeCommand ( parameters , java.util.Collections.singletonList ( createVm ( status ) ) ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateSuccess ( command ) ; }
Source:
public void hostProviderTypeDoesNotMatch ( ) { org.mockito.Mockito.when ( host.getHostProviderId ( ) ) . thenReturn ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; org.ovirt.engine.core.common.businessentities.Provider provider = org.mockito.Mockito.mock ( org.ovirt.engine.core.common.businessentities.Provider.class ) ; org.mockito.Mockito.when ( provider.getType ( ) ) . thenReturn ( ProviderType.OPENSTACK_IMAGE ) ; org.mockito.Mockito.when ( providerDao.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( provider ) ; org.junit.Assert.assertThat ( validator.hostProviderTypeMatches ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.ACTION_TYPE_FAILED_HOST_PROVIDER_TYPE_MISMATCH ) ) ; }

Target:
public void hostProviderTypeDoesNotMatch ( ) { org.mockito.Mockito.when ( host.getHostProviderId ( ) ) . thenReturn ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; org.ovirt.engine.core.common.businessentities.Provider provider = org.mockito.Mockito.mock ( org.ovirt.engine.core.common.businessentities.Provider.class ) ; org.mockito.Mockito.when ( provider.getType ( ) ) . thenReturn ( ProviderType.OPENSTACK_IMAGE ) ; org.mockito.Mockito.when ( providerDao.get ( org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( provider ) ; org.junit.Assert.assertThat ( validator.hostProviderTypeMatches ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.ACTION_TYPE_FAILED_HOST_PROVIDER_TYPE_MISMATCH ) ) ; }
Source:
public void canDoActionFailsWithForceNotSupported ( ) { org.ovirt.engine.core.common.action.gluster.CreateGlusterVolumeParameters parameters = new org.ovirt.engine.core.common.action.gluster.CreateGlusterVolumeParameters ( getVolume ( 2 , true ) , true ) ; org.ovirt.engine.core.bll.gluster.CreateGlusterVolumeCommand command = new org.ovirt.engine.core.bll.gluster.CreateGlusterVolumeCommand ( parameters ) ; cmd = org.mockito.Mockito.spy ( command ) ; prepareMocks ( cmd ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( cmd , EngineMessage.ACTION_TYPE_FAILED_GLUSTER_VOLUME_ADD_BRICK_FORCE_NOT_SUPPORTED ) ; }

Target:
public void validateFailsWithForceNotSupported ( ) { org.ovirt.engine.core.common.action.gluster.CreateGlusterVolumeParameters parameters = new org.ovirt.engine.core.common.action.gluster.CreateGlusterVolumeParameters ( getVolume ( 2 , true ) , true ) ; org.ovirt.engine.core.bll.gluster.CreateGlusterVolumeCommand command = new org.ovirt.engine.core.bll.gluster.CreateGlusterVolumeCommand ( parameters ) ; cmd = org.mockito.Mockito.spy ( command ) ; prepareMocks ( cmd ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( cmd , EngineMessage.ACTION_TYPE_FAILED_GLUSTER_VOLUME_ADD_BRICK_FORCE_NOT_SUPPORTED ) ; }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < ? extends org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs args ) { if ( ( object.getVersion ( ) . getSelectedItem ( ) ) != null ) { java.lang.String clusterVersion = object.getVersion ( ) . getSelectedItem ( ) . getValue ( ) ; serialNumberPolicyEditor.setVisible ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . isSerialNumberPolicySupported ( clusterVersion ) ) ; } }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < ? extends org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs args ) { if ( ( object.getVersion ( ) . getSelectedItem ( ) ) != null ) { org.ovirt.engine.core.compat.Version clusterVersion = object.getVersion ( ) . getSelectedItem ( ) ; migrationPolicyDetails.setVisible ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . isMigrationPoliciesSupported ( clusterVersion ) ) ; } }
Source:
public static org.ovirt.engine.ui.uicommonweb.models.SystemTreeItemModel FindAncestor ( org.ovirt.engine.ui.uicommonweb.models.SystemTreeItemType type , org.ovirt.engine.ui.uicommonweb.models.SystemTreeItemModel root ) { if ( ( root.getType ( ) ) != type ) { if ( ( root.getParent ( ) ) != null ) { return org.ovirt.engine.ui.uicommonweb.models.SystemTreeItemModel.FindAncestor ( type , root.getParent ( ) ) ; } return null ; } return root ; }

Target:
public static org.ovirt.engine.ui.uicommonweb.models.SystemTreeItemModel findAncestor ( org.ovirt.engine.ui.uicommonweb.models.SystemTreeItemType type , org.ovirt.engine.ui.uicommonweb.models.SystemTreeItemModel root ) { if ( ( root.getType ( ) ) != type ) { if ( ( root.getParent ( ) ) != null ) { return org.ovirt.engine.ui.uicommonweb.models.SystemTreeItemModel.findAncestor ( type , root.getParent ( ) ) ; } return null ; } return root ; }
Source:
public org.ovirt.engine.core.common.businessentities.event_subscriber mapRow ( java.sql.ResultSet rs , int rowNum ) throws java.sql.SQLException { org.ovirt.engine.core.common.businessentities.event_subscriber entity = new org.ovirt.engine.core.common.businessentities.event_subscriber ( ) ; entity.setevent_up_name ( rs.getString ( "event_up_name" ) ) ; entity.setmethod_id ( rs.getInt ( "method_id" ) ) ; entity.setmethod_address ( rs.getString ( "method_address" ) ) ; entity.setsubscriber_id ( org.ovirt.engine.core.compat.Guid.createGuidFromString ( rs.getString ( "subscriber_id" ) ) ) ; entity.settag_name ( rs.getString ( "tag_name" ) ) ; return entity ; }

Target:
public java.util.List < org.ovirt.engine.core.common.businessentities.event_subscriber > getAllForSubscriber ( org.ovirt.engine.core.compat.Guid id ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "subscriber_id" , id ) ; return getCallsHandler ( ) . executeReadList ( "Getevent_subscriberBysubscriber_id" , org.ovirt.engine.core.dao.EventDAODbFacadeImpl.EventSubscriberRowMapper.instance , parameterSource ) ; }
Source:
protected void ExecuteQuery ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.LdapUser > results = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.LdapUser > ( ) ; for ( org.ovirt.engine.core.compat.Guid guid : getUserIds ( ) ) { org.ovirt.engine.core.common.businessentities.LdapUser user = org.ovirt.engine.core.bll.adbroker.InternalBrokerUtils.getUserByUserGuid ( guid ) ; if ( user != null ) { results.add ( user ) ; } } setReturnValue ( results ) ; setSucceeded ( true ) ; }

Target:
protected void executeQuery ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.LdapUser > results = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.LdapUser > ( ) ; for ( org.ovirt.engine.core.compat.Guid guid : getUserIds ( ) ) { org.ovirt.engine.core.common.businessentities.LdapUser user = org.ovirt.engine.core.bll.adbroker.InternalBrokerUtils.getUserByUserGuid ( guid ) ; if ( user != null ) { results.add ( user ) ; } } setReturnValue ( results ) ; setSucceeded ( true ) ; }
Source:
private static < R extends org.ovirt.engine.api.model.BaseResource > void setActions ( javax.ws.rs.core.UriInfo uriInfo , R model , java.lang.Class < ? extends org.ovirt.engine.api.model.BaseResource > suggestedParentType ) { org.ovirt.engine.api.restapi.util.LinkHelper.Collection collection = org.ovirt.engine.api.restapi.util.LinkHelper.getCollection ( model ) ; javax.ws.rs.core.UriBuilder uriBuilder = org.ovirt.engine.api.restapi.util.LinkHelper.getUriBuilder ( uriInfo , model , suggestedParentType ) ; if ( uriBuilder != null ) { org.ovirt.engine.api.restapi.util.ActionsBuilder actionsBuilder = new org.ovirt.engine.api.restapi.util.ActionsBuilder ( uriBuilder , collection.getResourceType ( ) ) ; model.setActions ( actionsBuilder.build ( ) ) ; } }

Target:
private static void setActions ( org.ovirt.engine.api.model.BaseResource model , java.lang.Class < ? extends org.ovirt.engine.api.model.BaseResource > suggestedParentType ) { org.ovirt.engine.api.restapi.util.LinkHelper.Collection collection = org.ovirt.engine.api.restapi.util.LinkHelper.getCollection ( model ) ; java.lang.String path = org.ovirt.engine.api.restapi.util.LinkHelper.getPath ( model , suggestedParentType ) ; if ( path != null ) { org.ovirt.engine.api.restapi.util.ActionsBuilder actionsBuilder = new org.ovirt.engine.api.restapi.util.ActionsBuilder ( path , collection.getResourceType ( ) ) ; model.setActions ( actionsBuilder.build ( ) ) ; } }
Source:
private void InitVdsBroker ( ) { org.ovirt.engine.core.vdsbroker.VdsManager.log.infoFormat ( "Initialize vdsBroker ({0},{1})" , _vds.gethost_name ( ) , _vds.getport ( ) ) ; int clientTimeOut = ( org.ovirt.engine.core.common.config.Config.< java.lang.Integer > GetValue ( ConfigValues.vdsTimeout ) ) * 1000 ; org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.vdsbroker.vdsbroker.VdsServerConnector , org.apache.commons.httpclient.HttpClient > returnValue = org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcUtils.getConnection ( _vds.gethost_name ( ) , _vds.getport ( ) , clientTimeOut , org.ovirt.engine.core.vdsbroker.vdsbroker.VdsServerConnector.class , org.ovirt.engine.core.common.config.Config.< java.lang.Boolean > GetValue ( ConfigValues.UseSecureConnectionWithServers ) ) ; _vdsProxy = new org.ovirt.engine.core.vdsbroker.vdsbroker.VdsServerWrapper ( returnValue.getFirst ( ) , returnValue.getSecond ( ) ) ; }

Target:
private void InitVdsBroker ( ) { org.ovirt.engine.core.vdsbroker.VdsManager.log.infoFormat ( "Initialize vdsBroker ({0},{1})" , _vds.getHostName ( ) , _vds.getPort ( ) ) ; int clientTimeOut = ( org.ovirt.engine.core.common.config.Config.< java.lang.Integer > GetValue ( ConfigValues.vdsTimeout ) ) * 1000 ; org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.vdsbroker.vdsbroker.VdsServerConnector , org.apache.commons.httpclient.HttpClient > returnValue = org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcUtils.getConnection ( _vds.getHostName ( ) , _vds.getPort ( ) , clientTimeOut , org.ovirt.engine.core.vdsbroker.vdsbroker.VdsServerConnector.class , org.ovirt.engine.core.common.config.Config.< java.lang.Boolean > GetValue ( ConfigValues.UseSecureConnectionWithServers ) ) ; _vdsProxy = new org.ovirt.engine.core.vdsbroker.vdsbroker.VdsServerWrapper ( returnValue.getFirst ( ) , returnValue.getSecond ( ) ) ; }
Source:
public void testValidate ( ) { org.mockito.Mockito.when ( vdsDaoMock.get ( org.ovirt.engine.core.bll.hostdeploy.UpdateVdsCommandTest.HOST_ID ) ) . thenReturn ( oldHost ) ; org.junit.Assert.assertTrue ( underTestCommand.validate ( ) ) ; }

Target:
public void testValidate ( ) { org.mockito.Mockito.when ( vdsDaoMock.get ( org.ovirt.engine.core.bll.hostdeploy.UpdateVdsCommandTest.HOST_ID ) ) . thenReturn ( oldHost ) ; org.mockito.Mockito.when ( fenceAgentDao.getFenceAgentsForHost ( org.ovirt.engine.core.bll.hostdeploy.UpdateVdsCommandTest.HOST_ID ) ) . thenReturn ( new java.util.ArrayList ( ) ) ; org.junit.Assert.assertTrue ( underTestCommand.validate ( ) ) ; }
Source:
protected java.util.Map < java.lang.String , org.ovirt.engine.core.common.utils.Pair < java.lang.String , java.lang.String > > getSharedLocks ( ) { if ( ( org.ovirt.engine.core.bll.AddVmTemplateCommand.getParameters ( ) . getBaseTemplateId ( ) ) != null ) { return java.util.Collections.singletonMap ( org.ovirt.engine.core.bll.AddVmTemplateCommand.getParameters ( ) . getBaseTemplateId ( ) . toString ( ) , org.ovirt.engine.core.bll.LockMessagesMatchUtil.makeLockingPair ( LockingGroup.TEMPLATE , VdcBllMessages.ACTION_TYPE_FAILED_OBJECT_LOCKED ) ) ; } return super . getSharedLocks ( ) ; }

Target:
protected java.util.Map < java.lang.String , org.ovirt.engine.core.common.utils.Pair < java.lang.String , java.lang.String > > getSharedLocks ( ) { if ( isTemplateVersion ( ) ) { return java.util.Collections.singletonMap ( org.ovirt.engine.core.bll.AddVmTemplateCommand.getParameters ( ) . getBaseTemplateId ( ) . toString ( ) , org.ovirt.engine.core.bll.LockMessagesMatchUtil.makeLockingPair ( LockingGroup.TEMPLATE , VdcBllMessages.ACTION_TYPE_FAILED_OBJECT_LOCKED ) ) ; } return super . getSharedLocks ( ) ; }
Source:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { org.ovirt.engine.ui.uicommonweb.models.storage.StorageListModel storageListModel = ( ( org.ovirt.engine.ui.uicommonweb.models.storage.StorageListModel ) ( result.getState ( ) ) ) ; if ( storageListModel.removeConnection ) { storageListModel.cleanConnection ( storageListModel.connection , storageListModel.hostId ) ; storageListModel.removeConnection = false ; } storageListModel.OnFinish ( storageListModel.context , false , storageListModel.storageModel ) ; }

Target:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { org.ovirt.engine.ui.uicommonweb.models.storage.StorageListModel storageListModel = ( ( org.ovirt.engine.ui.uicommonweb.models.storage.StorageListModel ) ( result.getState ( ) ) ) ; if ( storageListModel.removeConnection ) { storageListModel.cleanConnection ( storageListModel.connection , storageListModel.hostId ) ; storageListModel.removeConnection = false ; } storageListModel.onFinish ( storageListModel.context , false , storageListModel.storageModel ) ; }
Source:
public static void updateVirtioScsiController ( org.ovirt.engine.core.compat.Guid vmId , java.lang.Boolean isVirtioScsiEnabled ) { if ( isVirtioScsiEnabled == null ) { return ; } java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > controllers = org.ovirt.engine.core.bll.utils.VmDeviceUtils.dbFacade.getVmDeviceDao ( ) . getVmDeviceByVmIdTypeAndDevice ( vmId , VmDeviceGeneralType.CONTROLLER , VmDeviceType.VIRTIOSCSI.getName ( ) ) ; if ( isVirtioScsiEnabled ) { if ( controllers.isEmpty ( ) ) { org.ovirt.engine.core.bll.utils.VmDeviceUtils.addVirtioScsiController ( vmId ) ; } } else { for ( org.ovirt.engine.core.common.businessentities.VmDevice device : controllers ) { org.ovirt.engine.core.bll.utils.VmDeviceUtils.dao.remove ( device.getId ( ) ) ; } } }

Target:
public static java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > getConsoleDevices ( org.ovirt.engine.core.compat.Guid vmId ) { return org.ovirt.engine.core.bll.utils.VmDeviceUtils.dao.getVmDeviceByVmIdTypeAndDevice ( vmId , VmDeviceGeneralType.CONSOLE , VmDeviceType.CONSOLE.getName ( ) ) ; }
Source:
public static org.ovirt.engine.core.common.businessentities.storage.DiskImage createSnapshotMemoryDisk ( org.ovirt.engine.core.common.businessentities.VM vm , org.ovirt.engine.core.common.businessentities.storage.StorageType storageType , org.ovirt.engine.core.common.scheduling.VmOverheadCalculator vmOverheadCalculator , java.lang.String diskDescription ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage image = org.ovirt.engine.core.bll.memory.MemoryUtils.createMemoryDisk ( vm , storageType , vmOverheadCalculator , diskDescription ) ; image.setDiskAlias ( org.ovirt.engine.core.bll.memory.MemoryUtils.VM_SNAPSHOT_MEMORY_DISK_ALIAS ) ; return image ; }

Target:
public static org.ovirt.engine.core.common.businessentities.storage.DiskImage createSnapshotMemoryDisk ( org.ovirt.engine.core.common.businessentities.VM vm , org.ovirt.engine.core.common.businessentities.storage.StorageType storageType , org.ovirt.engine.core.common.scheduling.VmOverheadCalculator vmOverheadCalculator , java.lang.String diskDescription ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage image = org.ovirt.engine.core.bll.memory.MemoryUtils.createMemoryDisk ( vm , storageType , vmOverheadCalculator , diskDescription ) ; image.setDiskAlias ( org.ovirt.engine.core.bll.memory.MemoryUtils.VM_SNAPSHOT_MEMORY_DISK_ALIAS ) ; image.setImageStatus ( ImageStatus.OK ) ; return image ; }
Source:
public static void addDiskImageWithNoVmDevice ( org.ovirt.engine.core.common.businessentities.storage.DiskImage image ) { org.ovirt.engine.core.bll.storage.disk.image.ImagesHandler.addDiskImageWithNoVmDevice ( image , image.getActive ( ) , new org.ovirt.engine.core.common.businessentities.storage.ImageStorageDomainMap ( image.getImageId ( ) , image.getStorageIds ( ) . get ( 0 ) , image.getQuotaId ( ) , image.getDiskProfileId ( ) ) ) ; }

Target:
public void addDiskImageWithNoVmDevice ( org.ovirt.engine.core.common.businessentities.storage.DiskImage image , boolean active , org.ovirt.engine.core.common.businessentities.storage.ImageStorageDomainMap imageStorageDomainMap ) { try { addImage ( image , active , imageStorageDomainMap ) ; addDisk ( image ) ; } catch ( java.lang.RuntimeException ex ) { org.ovirt.engine.core.bll.storage.disk.image.ImagesHandler.log.error ( "Failed adding new disk image and related entities to db: {}" , ex.getMessage ( ) ) ; org.ovirt.engine.core.bll.storage.disk.image.ImagesHandler.log.debug ( "Exception" , ex ) ; throw new org.ovirt.engine.core.common.errors.EngineException ( org.ovirt.engine.core.common.errors.EngineError.DB , ex ) ; } }
Source:
protected org.ovirt.engine.api.model.Network getEntity ( int index ) { org.ovirt.engine.api.model.Network entity = org.mockito.Mockito.mock ( org.ovirt.engine.api.model.Network.class ) ; org.mockito.Mockito.when ( entity.getId ( ) ) . thenReturn ( GUIDS [ index ] ) ; org.mockito.Mockito.when ( entity.getName ( ) ) . thenReturn ( NAMES [ index ] ) ; org.mockito.Mockito.when ( entity.getDescription ( ) ) . thenReturn ( DESCRIPTIONS [ index ] ) ; return entity ; }

Target:
protected void setUpEntityQueryExpectations ( int times , org.ovirt.engine.core.common.businessentities.IscsiBond iscsiBond ) throws java.lang.Exception { while ( ( times -- ) > 0 ) { setUpEntityQueryExpectations ( VdcQueryType.GetIscsiBondById , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendIscsiBondNetworkResourceTest.ISCSI_BOND_ID } , iscsiBond ) ; } }
Source:
public void getVmConfigurationBySnapshot ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid snapshotSourceId ) { 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 ? ( ( org.ovirt.engine.core.common.businessentities.VM ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmConfigurationBySnapshot , new org.ovirt.engine.core.common.queries.IdQueryParameters ( snapshotSourceId ) . withoutRefresh ( ) , aQuery ) ; }

Target:
public void getVmSnapshotList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllVmSnapshotsByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
protected void OnEntityChanged ( ) { if ( ( getEntity ( ) ) != null ) { org.ovirt.engine.core.common.businessentities.VM vm = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.ImportVmData ) ( getEntity ( ) ) ) . getVm ( ) ; setItems ( vm.getInterfaces ( ) ) ; } else { setItems ( null ) ; } }

Target:
protected void onEntityChanged ( ) { if ( ( getEntity ( ) ) != null ) { org.ovirt.engine.core.common.businessentities.VM vm = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.ImportVmData ) ( getEntity ( ) ) ) . getVm ( ) ; setItems ( vm.getInterfaces ( ) ) ; } else { setItems ( null ) ; } }
Source:
public javax.ws.rs.core.Response remove ( ) { get ( ) ; org.ovirt.engine.core.common.action.RemoveDiskParameters params = new org.ovirt.engine.core.common.action.RemoveDiskParameters ( asGuid ( id ) ) ; boolean force = org.ovirt.engine.api.common.util.QueryHelper.getBooleanMatrixParameter ( uriInfo , org.ovirt.engine.api.restapi.resource.BackendTemplateDiskResource.FORCE , true , false ) ; if ( force ) { params.setForceDelete ( force ) ; } java.lang.String storageDomain = org.ovirt.engine.api.common.util.QueryHelper.getMatrixConstraint ( uriInfo , org.ovirt.engine.api.restapi.resource.BackendTemplateDiskResource.STORAGE_DOMAIN ) ; if ( storageDomain != null ) { params.setStorageDomainId ( asGuid ( storageDomain ) ) ; } return performAction ( VdcActionType.RemoveDisk , params ) ; }

Target:
public javax.ws.rs.core.Response remove ( ) { get ( ) ; org.ovirt.engine.core.common.action.RemoveDiskParameters params = new org.ovirt.engine.core.common.action.RemoveDiskParameters ( asGuid ( id ) ) ; boolean force = org.ovirt.engine.api.common.util.ParametersHelper.getBooleanParameter ( httpHeaders , uriInfo , org.ovirt.engine.api.restapi.resource.BackendTemplateDiskResource.FORCE , true , false ) ; if ( force ) { params.setForceDelete ( force ) ; } java.lang.String storageDomain = org.ovirt.engine.api.common.util.ParametersHelper.getParameter ( httpHeaders , uriInfo , org.ovirt.engine.api.restapi.resource.BackendTemplateDiskResource.STORAGE_DOMAIN ) ; if ( storageDomain != null ) { params.setStorageDomainId ( asGuid ( storageDomain ) ) ; } return performAction ( VdcActionType.RemoveDisk , params ) ; }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < ? extends org.ovirt.engine.ui.uicompat.EventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { java.lang.Boolean entity = getOptimizeForSpeed ( ) . getEntity ( ) ; if ( entity ) { getGuarantyResources ( ) . setEntity ( true ) ; } getAllowOverbooking ( ) . setIsChangable ( ( ! entity ) ) ; }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < ? extends org.ovirt.engine.ui.uicompat.EventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { java.lang.Boolean entity = getOptimizeForSpeed ( ) . getEntity ( ) ; if ( entity ) { getGuarantyResources ( ) . setEntity ( true ) ; } getAllowOverbooking ( ) . setIsChangeable ( ( ! entity ) ) ; }
Source:
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 ) ; }

Target:
public org.ovirt.engine.core.compat.Guid getDefaultIconId ( boolean small ) { final org.ovirt.engine.core.common.queries.VmIconIdSizePair pair = osIdToDefaultIconIdMap.get ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.DEFAULT_OS_ID ) ; if ( pair != null ) { return pair.get ( small ) ; } throw new java.lang.RuntimeException ( "Icon of default operating system not found." ) ; }
Source:
public void invoke ( org.ovirt.engine.api.extensions.ExtMap context , java.util.Map < java.lang.String , java.lang.Object > args ) { context.mput ( Schema.InvokeKeys.ENTITY , Schema.Entities.USER ) . mput ( Schema.InvokeKeys.ENTITY_KEYS , new org.ovirt.engine.api.extensions.ExtMap ( ) . mput ( Schema.UserIdentifiers.USERNAME , args.get ( "user" ) ) . mput ( Schema.SharedKeys.ADD_GROUP , context.get ( org.ovirt.engine.extension.aaa.jdbc.binding.cli.Cli.ContextKeys.POSITIONAL ) ) ) ; org.ovirt.engine.extension.aaa.jdbc.binding.cli.Cli.commands.get ( "_schema-modify" ) . invoke ( context ) ; context.putIfAbsent ( org.ovirt.engine.extension.aaa.jdbc.binding.cli.Cli.ContextKeys.EXIT_STATUS , org.ovirt.engine.extension.aaa.jdbc.binding.cli.Cli.SUCCESS ) ; }

Target:
public void invoke ( org.ovirt.engine.api.extensions.ExtMap context , java.util.Map < java.lang.String , java.lang.Object > args ) { if ( ! ( context.containsKey ( ContextKeys.EXIT_STATUS ) ) ) { context.put ( Schema.InvokeKeys.MODIFICATION_TYPE , Sql.ModificationTypes.DELETE ) ; context.put ( Schema.InvokeKeys.ENTITY_KEYS , new org.ovirt.engine.api.extensions.ExtMap ( ) . mput ( Schema.UserIdentifiers.USERNAME , context.get ( ContextKeys.POSITIONAL ) ) ) ; } if ( ! ( context.containsKey ( ContextKeys.EXIT_STATUS ) ) ) { org.ovirt.engine.extension.aaa.jdbc.binding.cli.Cli.commands.get ( "_schema-modify" ) . invoke ( context ) ; context.putIfAbsent ( ContextKeys.EXIT_STATUS , org.ovirt.engine.extension.aaa.jdbc.binding.cli.Cli.SUCCESS ) ; } }
Source:
public void getStorageConnectionById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String id , boolean isRefresh ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( org.ovirt.engine.core.common.businessentities.StorageServerConnections ) ( source ) ) : null ; } } ; org.ovirt.engine.core.common.queries.StorageServerConnectionQueryParametersBase params = new org.ovirt.engine.core.common.queries.StorageServerConnectionQueryParametersBase ( id ) ; params.setRefresh ( isRefresh ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageServerConnectionById , params , aQuery ) ; }

Target:
public void getClusterDesktopMemoryOverCommit ( 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.Integer ) ( source ) ) : 0 ; } } ; getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.MaxVdsMemOverCommit , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
public static java.lang.String cdPathWindowsToLinux ( java.lang.String windowsPath , org.ovirt.engine.core.compat.Guid storagePoolId ) { if ( org.ovirt.engine.core.compat.StringHelper.isNullOrEmpty ( windowsPath ) ) { return windowsPath ; } java.lang.String fileName = org.ovirt.engine.core.compat.backendcompat.Path.GetFileName ( windowsPath ) ; java.lang.String isoPrefix = ( ( java.lang.String ) ( org.ovirt.engine.core.bll.Backend.getInstance ( ) . getResourceManager ( ) . RunVdsCommand ( VDSCommandType.IsoPrefix , new org.ovirt.engine.core.common.vdscommands.IrsBaseVDSCommandParameters ( storagePoolId ) ) . getReturnValue ( ) ) ) ; return java.lang.String.format ( "%1$s/%2$s" , isoPrefix , fileName ) ; }

Target:
public static java.lang.String cdPathWindowsToLinux ( java.lang.String windowsPath , org.ovirt.engine.core.compat.Guid storagePoolId ) { return org.ovirt.engine.core.bll.ImagesHandler.cdPathWindowsToLinux ( windowsPath , ( ( java.lang.String ) ( org.ovirt.engine.core.bll.Backend.getInstance ( ) . getResourceManager ( ) . RunVdsCommand ( VDSCommandType.IsoPrefix , new org.ovirt.engine.core.common.vdscommands.IrsBaseVDSCommandParameters ( storagePoolId ) ) . getReturnValue ( ) ) ) ) ; }
Source:
private org.ovirt.engine.core.common.vdscommands.VDSParametersBase createVDSParameters ( ) { return postDeleteActionHandler.fixParameters ( new org.ovirt.engine.core.common.vdscommands.DestroyImageVDSCommandParameters ( org.ovirt.engine.core.bll.storage.disk.image.DestroyImageCommand.getParameters ( ) . getStoragePoolId ( ) , org.ovirt.engine.core.bll.storage.disk.image.DestroyImageCommand.getParameters ( ) . getStorageDomainId ( ) , org.ovirt.engine.core.bll.storage.disk.image.DestroyImageCommand.getParameters ( ) . getImageGroupId ( ) , org.ovirt.engine.core.bll.storage.disk.image.DestroyImageCommand.getParameters ( ) . getImageList ( ) , org.ovirt.engine.core.bll.storage.disk.image.DestroyImageCommand.getParameters ( ) . isPostZero ( ) , org.ovirt.engine.core.bll.storage.disk.image.DestroyImageCommand.getParameters ( ) . isForce ( ) ) ) ; }

Target:
private org.ovirt.engine.core.common.vdscommands.VDSParametersBase createVDSParameters ( ) { return postDeleteActionHandler.fixParameters ( new org.ovirt.engine.core.common.vdscommands.DestroyImageVDSCommandParameters ( org.ovirt.engine.core.bll.storage.disk.image.DestroyImageCommand.getParameters ( ) . getStoragePoolId ( ) , org.ovirt.engine.core.bll.storage.disk.image.DestroyImageCommand.getParameters ( ) . getStorageDomainId ( ) , org.ovirt.engine.core.bll.storage.disk.image.DestroyImageCommand.getParameters ( ) . getImageGroupId ( ) , org.ovirt.engine.core.bll.storage.disk.image.DestroyImageCommand.getParameters ( ) . getImageList ( ) , org.ovirt.engine.core.bll.storage.disk.image.DestroyImageCommand.getParameters ( ) . isPostZero ( ) , storageDomainDao.get ( org.ovirt.engine.core.bll.storage.disk.image.DestroyImageCommand.getParameters ( ) . getStorageDomainId ( ) ) . isDiscardAfterDelete ( ) , org.ovirt.engine.core.bll.storage.disk.image.DestroyImageCommand.getParameters ( ) . isForce ( ) ) ) ; }
Source:
private java.util.Map < java.lang.String , java.lang.Object > buildResponse ( javax.servlet.http.HttpServletRequest request , org.ovirt.engine.core.sso.utils.SsoSession ssoSession , java.lang.String clientId ) throws java.lang.Exception { java.util.Map < java.lang.String , java.lang.Object > payload = buildResponse ( ssoSession ) ; if ( org.ovirt.engine.core.sso.utils.SsoUtils.scopeAsList ( ssoSession.getScope ( ) ) . contains ( SsoConstants.OPENID_SCOPE ) ) { payload.put ( "id_token" , org.ovirt.engine.core.sso.utils.SsoUtils.createJWT ( request , ssoSession , clientId ) ) ; } return payload ; }

Target:
private java.util.Map < java.lang.String , java.lang.Object > buildResponse ( javax.servlet.http.HttpServletRequest request , org.ovirt.engine.core.sso.utils.SsoSession ssoSession , java.lang.String clientId , java.lang.String clientSecret ) throws java.lang.Exception { java.util.Map < java.lang.String , java.lang.Object > payload = buildResponse ( ssoSession ) ; if ( org.ovirt.engine.core.sso.utils.SsoUtils.scopeAsList ( ssoSession.getScope ( ) ) . contains ( SsoConstants.OPENID_SCOPE ) ) { payload.put ( "id_token" , org.ovirt.engine.core.sso.servlets.OpenIdUtils.createJWT ( request , ssoSession , clientId , clientSecret ) ) ; } return payload ; }
Source:
public void run ( ) { log.infoFormat ( "Rollback for command: {0}." , this . getClass ( ) . getName ( ) ) ; try { getAsyncTaskManager ( ) . cancelTasks ( getReturnValue ( ) . getVdsmTaskIdList ( ) ) ; } catch ( java.lang.Exception e ) { log.errorFormat ( "Failed to cancel tasks for command: {0}." , this . getClass ( ) . getName ( ) ) ; } }

Target:
public void persistCommand ( org.ovirt.engine.core.common.action.VdcActionType parentCommand , boolean enableCallBack ) { org.ovirt.engine.core.common.action.VdcActionParametersBase parentParameters = getParentParameters ( parentCommand ) ; javax.transaction.Transaction transaction = org.ovirt.engine.core.utils.transaction.TransactionSupport.suspend ( ) ; try { org.ovirt.engine.core.bll.tasks.TaskManagerUtil.persistCommand ( org.ovirt.engine.core.common.businessentities.CommandEntity.buildCommandEntity ( getCommandId ( ) , parentParameters.getCommandId ( ) , getActionType ( ) , getParameters ( ) , commandStatus , enableCallBack , getReturnValue ( ) ) ) ; } finally { org.ovirt.engine.core.utils.transaction.TransactionSupport.resume ( transaction ) ; } }
Source:
public org.ovirt.engine.core.bll.ValidationResult validateSingleHostAttachedToLocalStorage ( ) { org.ovirt.engine.core.common.businessentities.StoragePool storagePool = storagePoolDao.getForVdsGroup ( host.getVdsGroupId ( ) ) ; if ( ( storagePool == null ) || ( ! ( storagePool.isLocal ( ) ) ) ) { return org.ovirt.engine.core.bll.ValidationResult.VALID ; } return org.ovirt.engine.core.bll.ValidationResult.failWith ( VdcBllMessages.VDS_CANNOT_ADD_MORE_THEN_ONE_HOST_TO_LOCAL_STORAGE ) . unless ( hostStaticDao.getAllForVdsGroup ( host.getVdsGroupId ( ) ) . isEmpty ( ) ) ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult validateSingleHostAttachedToLocalStorage ( ) { org.ovirt.engine.core.common.businessentities.StoragePool storagePool = storagePoolDao.getForVdsGroup ( host.getVdsGroupId ( ) ) ; if ( ( storagePool == null ) || ( ! ( storagePool.isLocal ( ) ) ) ) { return org.ovirt.engine.core.bll.ValidationResult.VALID ; } return org.ovirt.engine.core.bll.ValidationResult.failWith ( EngineMessage.VDS_CANNOT_ADD_MORE_THEN_ONE_HOST_TO_LOCAL_STORAGE ) . unless ( hostStaticDao.getAllForVdsGroup ( host.getVdsGroupId ( ) ) . isEmpty ( ) ) ; }
Source:
public org.ovirt.engine.api.model.NetworkFilterParameters list ( ) { org.ovirt.engine.api.model.NetworkFilterParameters parameters = new org.ovirt.engine.api.model.NetworkFilterParameters ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.network.VmNicFilterParameter > entities = getBackendCollection ( VdcQueryType.GetVmInterfaceFilterParametersByVmInterfaceId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( nicId ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.VmNicFilterParameter entity : entities ) { org.ovirt.engine.api.model.NetworkFilterParameter parameter = populate ( map ( entity ) , entity ) ; parameters.getNetworkFilterParameters ( ) . add ( addLinks ( parameter ) ) ; } return parameters ; }

Target:
public org.ovirt.engine.api.model.NetworkFilterParameters list ( ) { org.ovirt.engine.api.model.NetworkFilterParameters parameters = new org.ovirt.engine.api.model.NetworkFilterParameters ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.network.VmNicFilterParameter > entities = getBackendCollection ( QueryType.GetVmInterfaceFilterParametersByVmInterfaceId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( nicId ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.VmNicFilterParameter entity : entities ) { org.ovirt.engine.api.model.NetworkFilterParameter parameter = populate ( map ( entity ) , entity ) ; parameters.getNetworkFilterParameters ( ) . add ( addLinks ( parameter ) ) ; } return parameters ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.ServerConnectionStatusReturnForXmlRpc validateStorageServerConnection ( int serverType , java.lang.String spUUID , java.util.Map < java.lang.String , java.lang.String > [ ] args ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.validateStorageServerConnection ( serverType , spUUID , args ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.ServerConnectionStatusReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.ServerConnectionStatusReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc diskReplicateFinish ( java.lang.String vmUUID , java.util.Map srcDisk , java.util.Map dstDisk ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.diskReplicateFinish ( vmUUID , srcDisk , dstDisk ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }