auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object ReturnValue ) { org.ovirt.engine.ui.uicommonweb.models.events.AlertListModel alertListModel = ( ( org.ovirt.engine.ui.uicommonweb.models.events.AlertListModel ) ( model ) ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.AuditLog > list = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( ReturnValue ) ) . getReturnValue ( ) ; alertListModel.setItems ( list ) ; }

Target:
protected void syncSearch ( ) { org.ovirt.engine.core.common.queries.SearchParameters tempVar = new org.ovirt.engine.core.common.queries.SearchParameters ( "Events: severity=alert" , org.ovirt.engine.core.common.interfaces.SearchType.AuditLog ) ; tempVar.setMaxCount ( getSearchPageSize ( ) ) ; tempVar.setRefresh ( false ) ; org.ovirt.engine.core.common.queries.SearchParameters searchParameters = tempVar ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , searchParameters , new org.ovirt.engine.ui.uicommonweb.models.events.SetItemsAsyncQuery ( ) ) ; }
Source:
public void testGetImagesWithNoDisk ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > result = dao.getImagesWithNoDisk ( FixturesTool.VM_RHEL5_POOL_57 ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.DiskImage image : result ) { org.junit.Assert.assertFalse ( diskDao.exists ( image.getId ( ) ) ) ; } }

Target:
public void testGetImagesWithNoDisk ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > result = dao.getImagesWithNoDisk ( FixturesTool.VM_RHEL5_POOL_57 ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.storage.DiskImage image : result ) { org.junit.Assert.assertFalse ( diskDao.exists ( image.getId ( ) ) ) ; } }
Source:
private org.ovirt.engine.core.common.action.VdcReturnValueBase notAllowToRunAction ( org.ovirt.engine.core.common.action.VdcActionType actionType ) { java.lang.String mode = dbFacade.getVdcOptionDao ( ) . getByNameAndVersion ( ConfigValues.EngineMode.name ( ) , ConfigCommon.defaultConfigurationVersion ) . getoption_value ( ) ; if ( EngineWorkingMode.MAINTENANCE.name ( ) . equalsIgnoreCase ( mode ) ) { return getErrorCommandReturnValue ( EngineMessage.ENGINE_IS_RUNNING_IN_MAINTENANCE_MODE ) ; } else if ( EngineWorkingMode.PREPARE.name ( ) . equalsIgnoreCase ( mode ) ) { return notAllowedInPrepForMaintMode ( actionType ) ; } return null ; }

Target:
private org.ovirt.engine.core.common.action.VdcReturnValueBase notAllowToRunAction ( org.ovirt.engine.core.common.action.VdcActionType actionType ) { java.lang.String mode = vdcOptionDao.getByNameAndVersion ( ConfigValues.EngineMode.name ( ) , ConfigCommon.defaultConfigurationVersion ) . getOptionValue ( ) ; if ( EngineWorkingMode.MAINTENANCE.name ( ) . equalsIgnoreCase ( mode ) ) { return getErrorCommandReturnValue ( EngineMessage.ENGINE_IS_RUNNING_IN_MAINTENANCE_MODE ) ; } else if ( EngineWorkingMode.PREPARE.name ( ) . equalsIgnoreCase ( mode ) ) { return notAllowedInPrepForMaintMode ( actionType ) ; } return null ; }
Source:
public void validateEnoughSpace ( ) throws java.lang.Exception { initializeCommand ( new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ) ; initSnapshotValidator ( ) ; initVmForSpace ( ) ; initVmDiskImage ( false ) ; initSrcStorageDomain ( ) ; initDestStorageDomain ( StorageType.NFS ) ; org.mockito.Mockito.doReturn ( org.ovirt.engine.core.bll.storage.disk.MoveOrCopyDiskCommandTest.mockStorageDomainValidatorWithSpace ( ) ) . when ( command ) . createStorageDomainValidator ( ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateSuccess ( command ) ; }

Target:
public void successVmInPreviewForAttachedSnapshot ( ) { initializeCommand ( new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) , VmEntityType.VM ) ; initSnapshotValidator ( ) ; initVmForSpace ( ) ; initSrcStorageDomain ( ) ; initDestStorageDomain ( StorageType.NFS ) ; vmDevice.setSnapshotId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateSuccess ( command ) ; }
Source:
public void testAddIncompleteParameters ( ) throws java.lang.Exception { org.ovirt.engine.api.model.NIC model = new org.ovirt.engine.api.model.NIC ( ) ; model.setName ( NAMES [ 0 ] ) ; model.setNetwork ( new org.ovirt.engine.api.model.Network ( ) ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; control.replay ( ) ; try { collection.add ( model ) ; fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "NIC" , "add" , "network.name|id" ) ; } }

Target:
public void testAddIncompleteParameters ( ) throws java.lang.Exception { org.ovirt.engine.api.model.NIC model = new org.ovirt.engine.api.model.NIC ( ) ; model.setName ( null ) ; model.setNetwork ( new org.ovirt.engine.api.model.Network ( ) ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; control.replay ( ) ; try { collection.add ( model ) ; fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "NIC" , "add" , "name" ) ; } }
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 ( new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNic > ( ) ) . when ( dao ) . getAllForVm ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ; org.mockito.Mockito.doReturn ( dao ) . when ( runVmValidator ) . getVmNicDao ( ) ; org.ovirt.engine.core.bll.validator.RunVmValidatorTest.validateResult ( runVmValidator.validateBootSequence ( new org.ovirt.engine.core.common.businessentities.VM ( ) , BootSequence.N , new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.Disk > ( ) , null ) , false , VdcBllMessages.VM_CANNOT_RUN_FROM_NETWORK_WITHOUT_NETWORK ) ; }

Target:
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 ( new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNic > ( ) ) . when ( dao ) . getAllForVm ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ; org.mockito.Mockito.doReturn ( dao ) . when ( runVmValidator ) . getVmNicDao ( ) ; org.ovirt.engine.core.bll.validator.RunVmValidatorTest.validateResult ( runVmValidator.validateBootSequence ( new org.ovirt.engine.core.common.businessentities.VM ( ) , BootSequence.N , new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.Disk > ( ) , null ) , false , EngineMessage.VM_CANNOT_RUN_FROM_NETWORK_WITHOUT_NETWORK ) ; }
Source:
public void testChangeCdUsingQueryParameter ( ) throws java.lang.Exception { resource.setUriInfo ( setUpChangeCdUriQueryExpectations ( ) ) ; setUpGetEntityExpectations ( 1 , VMStatus.Up ) ; setUpActionExpectations ( VdcActionType.ChangeDisk , org.ovirt.engine.core.common.action.ChangeDiskCommandParameters.class , new java.lang.String [ ] { "CdImagePath" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendCdRomResourceTest.ISO_PATH } , true , true ) ; org.ovirt.engine.api.model.CdRom cdrom = resource.update ( getUpdate ( ) ) ; assertTrue ( cdrom.isSetFile ( ) ) ; }

Target:
public void testChangeCdUsingMatrixParameter ( ) throws java.lang.Exception { resource.setUriInfo ( setUpChangeCdUriMatrixExpectations ( ) ) ; setUpGetEntityExpectations ( 1 , VMStatus.Up ) ; setUpActionExpectations ( VdcActionType.ChangeDisk , org.ovirt.engine.core.common.action.ChangeDiskCommandParameters.class , new java.lang.String [ ] { "CdImagePath" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.AbstractBackendCdRomsResourceTest.ISO_PATH } , true , true ) ; org.ovirt.engine.api.model.CdRom cdrom = resource.update ( getUpdate ( ) ) ; assertTrue ( cdrom.isSetFile ( ) ) ; }
Source:
private void storageDomainIsInactive ( ) { org.ovirt.engine.core.common.businessentities.storage_domains domain = new org.ovirt.engine.core.common.businessentities.storage_domains ( ) ; domain.setstatus ( StorageDomainStatus.InActive ) ; org.mockito.Mockito.when ( cmd.getStorageDomain ( ) ) . thenReturn ( domain ) ; }

Target:
public void checkStorageDomainNotEqualWithStatusActive ( ) { setStorageDomainStatus ( StorageDomainStatus.Active ) ; org.junit.Assert.assertFalse ( cmd.CheckStorageDomainStatusNotEqual ( StorageDomainStatus.Active ) ) ; java.util.List < java.lang.String > messages = cmd.getReturnValue ( ) . getCanDoActionMessages ( ) ; org.junit.Assert.assertEquals ( messages.size ( ) , 2 ) ; org.junit.Assert.assertEquals ( messages.get ( 0 ) , VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_DOMAIN_STATUS_ILLEGAL2.toString ( ) ) ; org.junit.Assert.assertEquals ( messages.get ( 1 ) , java.lang.String.format ( "$status %1$s" , StorageDomainStatus.Active ) ) ; }
Source:
private java.util.Set < java.lang.String > getRemovedBondsUsedByNetworks ( ) { java.util.Collection < org.ovirt.engine.core.common.businessentities.network.NetworkAttachment > attachmentsToConfigure = getAttachmentsToConfigure ( ) ; java.util.Set < java.lang.String > requiredNicsNames = new java.util.HashSet < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment : attachmentsToConfigure ) { requiredNicsNames.add ( attachment.getNicName ( ) ) ; } return requiredNicsNames ; }

Target:
private java.util.Set < java.lang.String > getNetworkAttachmentInterfaceNames ( java.util.Collection < org.ovirt.engine.core.common.businessentities.network.NetworkAttachment > networkAttachments ) { java.util.Set < java.lang.String > networkAttachmentNicNames = new java.util.HashSet < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment : networkAttachments ) { networkAttachmentNicNames.add ( attachment.getNicName ( ) ) ; } return networkAttachmentNicNames ; }
Source:
protected void initWidget ( com.google.gwt.user.client.ui.Widget widget ) { super . initWidget ( widget ) ; contextPopupPanel.setWidget ( contextMenuBar ) ; }

Target:
protected void initWidget ( com.google.gwt.user.client.ui.Widget widget ) { super . initWidget ( widget ) ; contextPopupPanel.setWidget ( contextMenuBar ) ; cascadePopupPanel.setWidget ( cascadeMenu ) ; contentPanel.add ( cascadeButton ) ; actionPanel.add ( contentPanel ) ; actionPanel.addStyleName ( style.actionPanel ( ) ) ; }
Source:
public void onBrowserEvent ( org.ovirt.engine.ui.common.widget.table.column.Context context , com.google.gwt.dom.client.Element parent , C value , com.google.gwt.dom.client.NativeEvent event , com.google.gwt.cell.client.ValueUpdater < C > valueUpdater ) { super . onBrowserEvent ( context , parent , value , event , valueUpdater ) ; if ( ! ( "mouseover" . equals ( event.getType ( ) ) ) ) { return ; } if ( ( value != null ) && ( showTooltip ( parent , value ) ) ) { parent.setTitle ( getTooltip ( value ) ) ; } else { parent.setTitle ( "" ) ; } }

Target:
public void onBrowserEvent ( org.ovirt.engine.ui.common.widget.table.column.Context context , com.google.gwt.dom.client.Element parent , C value , com.google.gwt.dom.client.NativeEvent event , com.google.gwt.cell.client.ValueUpdater < C > valueUpdater ) { super . onBrowserEvent ( context , parent , value , event , valueUpdater ) ; tooltipPanel.applyTo ( parent ) ; if ( ( value != null ) && ( showTooltip ( parent , value ) ) ) { tooltipPanel.setText ( getTooltip ( value ) ) ; } else { tooltipPanel.setText ( "" ) ; } tooltipPanel.handleNativeBrowserEvent ( parent , event ) ; }
Source:
private void setupDisks ( final org.ovirt.engine.ui.userportal.uicommon.model.basic.UserPortalBasicListProvider modelProvider ) { @ java.lang.SuppressWarnings ( value = "unchecked" ) java.lang.Iterable < org.ovirt.engine.core.common.businessentities.DiskImage > diskImages = modelProvider.getModel ( ) . getvmBasicDiskListModel ( ) . getItems ( ) ; if ( diskImages != null ) { getView ( ) . editDistItems ( diskImages ) ; } }

Target:
private void listenOnDiskModelChangeEvent ( final org.ovirt.engine.ui.userportal.uicommon.model.basic.UserPortalBasicListProvider modelProvider ) { modelProvider.getModel ( ) . getvmBasicDiskListModel ( ) . 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 ) { if ( ( modelProvider.getModel ( ) . getSelectedItem ( ) ) == null ) { return ; } @ java.lang.SuppressWarnings ( value = "unchecked" ) java.lang.Iterable < org.ovirt.engine.core.common.businessentities.DiskImage > diskImages = modelProvider.getModel ( ) . getvmBasicDiskListModel ( ) . getItems ( ) ; getView ( ) . editDistItems ( diskImages ) ; } } ) ; }
Source:
private boolean isRngSupportedForClusterVersion ( org.ovirt.engine.core.compat.Version version ) { if ( version == null ) { return false ; } java.lang.Boolean supported = ( ( java.lang.Boolean ) ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getConfigValuePreConverted ( ConfigurationValues.VirtIoRngDeviceSupported , version.toString ( ) ) ) ) ; return supported == null ? false : supported ; }

Target:
private void initSelectedMacPool ( ) { java.util.Collection < org.ovirt.engine.core.common.businessentities.MacPool > allMacPools = getMacPoolListModel ( ) . getItems ( ) ; org.ovirt.engine.core.common.businessentities.Cluster cluster = getEntity ( ) ; if ( ( allMacPools != null ) && ( cluster != null ) ) { org.ovirt.engine.core.compat.Guid macPoolId = cluster.getMacPoolId ( ) ; for ( org.ovirt.engine.core.common.businessentities.MacPool macPool : allMacPools ) { if ( macPool.getId ( ) . equals ( macPoolId ) ) { getMacPoolListModel ( ) . setSelectedItem ( macPool ) ; break ; } } } }
Source:
protected void executeCommand ( ) { org.ovirt.engine.core.common.businessentities.UserProfile profile = org.ovirt.engine.core.bll.AddUserProfileCommand.getParameters ( ) . getUserProfile ( ) ; profile.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; profile.setUserId ( org.ovirt.engine.core.bll.AddUserProfileCommand.getUserId ( ) ) ; userProfileDao.save ( profile ) ; org.ovirt.engine.core.bll.AddUserProfileCommand.setSucceeded ( true ) ; }

Target:
protected void executeCommand ( ) { org.ovirt.engine.core.common.businessentities.UserProfile profile = org.ovirt.engine.core.bll.AddUserProfileCommand.getParameters ( ) . getUserProfile ( ) ; profile.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; profile.setUserId ( org.ovirt.engine.core.bll.AddUserProfileCommand.getUserId ( ) ) ; if ( ( ! ( profile.getSshPublicKey ( ) . isEmpty ( ) ) ) && ( org.ovirt.engine.core.compat.Guid.isNullOrEmpty ( profile.getSshPublicKeyId ( ) ) ) ) { profile.setSshPublicKeyId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; } userProfileDao.save ( profile ) ; org.ovirt.engine.core.bll.AddUserProfileCommand.setSucceeded ( true ) ; }
Source:
public static void getGlusterHooks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterHooks , new org.ovirt.engine.core.common.queries.gluster.GlusterParameters ( clusterId ) , aQuery ) ; }

Target:
public static void getGlusterHookContent ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hookId , org.ovirt.engine.core.compat.Guid serverId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : "" ; } } ; org.ovirt.engine.core.common.queries.gluster.GlusterHookContentQueryParameters parameters = new org.ovirt.engine.core.common.queries.gluster.GlusterHookContentQueryParameters ( hookId ) ; parameters.setGlusterServerId ( serverId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterHookContent , parameters , aQuery ) ; }
Source:
public void testGetAllForStoragePoolAndStatuses ( ) { prepareHostWithDifferentStatus ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VDS > result = dao.getAllForStoragePoolAndStatuses ( existingVds.getStoragePoolId ( ) , java.util.EnumSet.of ( existingVds.getStatus ( ) , existingVds2.getStatus ( ) ) ) ; org.junit.Assert.assertTrue ( org.apache.commons.collections.CollectionUtils.disjunction ( result , java.util.Arrays.asList ( existingVds , existingVds2 ) ) . isEmpty ( ) ) ; assertCorrectGetAllResult ( result ) ; }

Target:
public void testGetAllForStoragePoolAndStatuses ( ) { prepareHostWithDifferentStatus ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VDS > result = dao.getAllForStoragePoolAndStatuses ( existingVds.getStoragePoolId ( ) , java.util.EnumSet.of ( existingVds.getStatus ( ) , existingVds2.getStatus ( ) ) ) ; org.junit.jupiter.api.Assertions.assertTrue ( org.apache.commons.collections.CollectionUtils.disjunction ( result , java.util.Arrays.asList ( existingVds , existingVds2 ) ) . isEmpty ( ) ) ; assertCorrectGetAllResult ( result ) ; }
Source:
private void addSyncDiff ( org.ovirt.engine.ui.uicommonweb.models.hosts.network.LogicalNetworkModel networkModel ) { addRow ( org.ovirt.engine.ui.webadmin.section.main.view.popup.host.panels.ItemInfoPopup.templates.imageTextSetupNetwork ( notInSyncImage , org.ovirt.engine.ui.webadmin.section.main.view.popup.host.panels.ItemInfoPopup.constants.hostOutOfSync ( ) ) ) ; addRow ( new com.google.gwt.safehtml.shared.SafeHtml ( ) { @ java.lang.Override public java.lang.String asString ( ) { return generatePreviewSentence ( ) ; } } ) ; java.util.List < org.ovirt.engine.core.common.businessentities.network.ReportedConfiguration > panelParameters = createNetworkOutOfSyncPanelParameters ( networkModel ) ; com.google.gwt.user.client.ui.Widget networkOutOfSyncPanel = new org.ovirt.engine.ui.webadmin.section.main.view.popup.host.panels.NetworkOutOfSyncPanel ( panelParameters ) . outOfSyncTableAsWidget ( ) ; contents.insertRow ( contents.getRowCount ( ) ) ; contents.setWidget ( contents.getRowCount ( ) , 0 , networkOutOfSyncPanel ) ; }

Target:
private void addSyncDiff ( org.ovirt.engine.ui.uicommonweb.models.hosts.network.LogicalNetworkModel networkModel ) { addRow ( org.ovirt.engine.ui.webadmin.section.main.view.popup.host.panels.ItemInfoPopup.templates.imageTextSetupNetwork ( notInSyncImage , org.ovirt.engine.ui.webadmin.section.main.view.popup.host.panels.ItemInfoPopup.constants.hostOutOfSync ( ) ) ) ; com.google.gwt.safehtml.shared.SafeHtml safeHtml = com.google.gwt.safehtml.shared.SafeHtmlUtils.fromTrustedString ( org.ovirt.engine.ui.webadmin.section.main.view.popup.host.panels.ItemInfoPopup.constants.hostOutOfSyncPreviewSentence ( ) ) ; addRow ( safeHtml ) ; java.util.List < org.ovirt.engine.core.common.businessentities.network.ReportedConfiguration > panelParameters = filterSyncProperties ( networkModel ) ; com.google.gwt.user.client.ui.Widget networkOutOfSyncPanel = new org.ovirt.engine.ui.webadmin.section.main.view.popup.host.panels.NetworkOutOfSyncPanel ( panelParameters ) . outOfSyncTableAsWidget ( ) ; contents.insertRow ( contents.getRowCount ( ) ) ; contents.setWidget ( contents.getRowCount ( ) , 0 , networkOutOfSyncPanel ) ; }
Source:
private void setUpMockUpForStart ( ) { prepareMocks ( cmd ) ; org.mockito.Mockito.when ( serviceDao.getByServiceType ( org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.common.businessentities.gluster.ServiceType.class ) ) ) . thenReturn ( getGlusterServiceListByServiceType ( ServiceType.GLUSTER_SWIFT , GlusterServiceStatus.STOPPED ) ) ; org.mockito.Mockito.doReturn ( getGlusterServerServicesByServerIdAndServiceType ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , ServiceType.GLUSTER_SWIFT , GlusterServiceStatus.STOPPED ) ) . when ( serverServiceDao ) . getByServerIdAndServiceType ( org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.compat.Guid.class ) , org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.common.businessentities.gluster.ServiceType.class ) ) ; }

Target:
private void setUpMockUpForStop ( ) { prepareMocks ( ) ; org.mockito.Mockito.when ( serviceDao.getByServiceType ( org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.common.businessentities.gluster.ServiceType.class ) ) ) . thenReturn ( getGlusterServiceListByServiceType ( ServiceType.GLUSTER_SWIFT , GlusterServiceStatus.RUNNING ) ) ; org.mockito.Mockito.doReturn ( getGlusterServerServicesByServerIdAndServiceType ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , ServiceType.GLUSTER_SWIFT , GlusterServiceStatus.RUNNING ) ) . when ( serverServiceDao ) . getByServerIdAndServiceType ( org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.compat.Guid.class ) , org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.common.businessentities.gluster.ServiceType.class ) ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc startSpice ( java.lang.String vdsIp , int port , java.lang.String ticket ) { return null ; }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc createVolumeContainer ( java.lang.String jobId , java.util.Map < java.lang.String , java.lang.Object > createVolumeInfo ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "SDM.create_volume" ) . withParameter ( "job_id" , jobId ) . withParameter ( "vol_info" , createVolumeInfo ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( response ) ; }
Source:
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 ) ; if ( collection != null ) { 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 ( ) ) ; } } }

Target:
private static void setActions ( org.ovirt.engine.api.model.BaseResource model , java.lang.String path ) { org.ovirt.engine.api.restapi.util.LinkHelper.ApiLocationMetadata collection = org.ovirt.engine.api.restapi.util.LinkHelper.getCollection ( model ) ; if ( collection != null ) { org.ovirt.engine.api.restapi.util.ActionsBuilder actionsBuilder = new org.ovirt.engine.api.restapi.util.ActionsBuilder ( path , collection.getEntityServiceClass ( ) ) ; model.setActions ( actionsBuilder.build ( ) ) ; } }
Source:
public void testGetLunsToUpdateInDbForSameLun ( ) { org.ovirt.engine.core.common.businessentities.storage.LUNs lun = new org.ovirt.engine.core.common.businessentities.storage.LUNs ( ) ; org.ovirt.engine.core.compat.Guid lunId = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; lun.setLUNId ( lunId.toString ( ) ) ; lun.setPhysicalVolumeId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) . toString ( ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.storage.LUNs > upToDateLuns = getLunsToUpdateInDb ( lun , lun ) . get ( command.noOp ) ; assertLunIdInList ( upToDateLuns , lunId ) ; }

Target:
public void testGetLunsToUpdateInDbForSameLun ( ) { setLunsSameLunAndPvIds ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.storage.LUNs > upToDateLuns = getLunsToUpdateInDb ( ) . get ( command.noOp ) ; assertLunIdInList ( upToDateLuns , lunFromVg.getLUNId ( ) ) ; }
Source:
public void validateFailsOnPassDiscardSupport ( ) { createParameters ( ) ; initDiskImage ( diskImageGroupId , diskImageId ) ; initVm ( VMStatus.Up , org.ovirt.engine.core.compat.Guid.newGuid ( ) , diskImageGroupId ) ; org.ovirt.engine.core.common.businessentities.StorageDomain srcSd = initStorageDomain ( srcStorageId ) ; srcSd.setStatus ( StorageDomainStatus.Active ) ; org.ovirt.engine.core.common.businessentities.StorageDomain dstSd = initStorageDomain ( dstStorageId ) ; dstSd.setStatus ( StorageDomainStatus.Active ) ; org.mockito.Mockito.when ( diskVmElementValidator.isPassDiscardSupported ( org.mockito.ArgumentMatchers.any ( ) ) ) . thenReturn ( new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_PASS_DISCARD_NOT_SUPPORTED_BY_DISK_INTERFACE ) ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( command , EngineMessage.ACTION_TYPE_FAILED_PASS_DISCARD_NOT_SUPPORTED_BY_DISK_INTERFACE ) ; }

Target:
private void mockValidators ( ) { org.mockito.Mockito.doReturn ( diskValidator ) . when ( command ) . createDiskValidator ( org.mockito.ArgumentMatchers.any ( ) ) ; org.mockito.Mockito.doReturn ( diskVmElementValidator ) . when ( command ) . createDiskVmElementValidator ( org.mockito.ArgumentMatchers.any ( ) , org.mockito.ArgumentMatchers.any ( ) ) ; }
Source:
public void executeQueryCommand ( ) { getQuery ( ) . executeQueryCommand ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.storage.CinderDisk > result = getQuery ( ) . getQueryReturnValue ( ) . getReturnValue ( ) ; org.junit.Assert.assertEquals ( 2 , result.size ( ) ) ; assertDiskFromVolume ( volumes.get ( 0 ) , result.get ( 0 ) ) ; assertDiskFromVolume ( volumes.get ( 2 ) , result.get ( 1 ) ) ; }

Target:
public void executeQueryCommand ( ) { getQuery ( ) . executeQueryCommand ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.storage.CinderDisk > result = getQuery ( ) . getQueryReturnValue ( ) . getReturnValue ( ) ; org.junit.jupiter.api.Assertions.assertEquals ( 2 , result.size ( ) ) ; assertDiskFromVolume ( volumes.get ( 0 ) , result.get ( 0 ) ) ; assertDiskFromVolume ( volumes.get ( 2 ) , result.get ( 1 ) ) ; }
Source:
void localize ( org.ovirt.engine.ui.userportal.ApplicationConstants constants , org.ovirt.engine.ui.userportal.ApplicationDynamicMessages dynamicMessages ) { userNameEditor.setLabel ( constants.loginFormUserNameLabel ( ) ) ; passwordEditor.setLabel ( constants.loginFormPasswordLabel ( ) ) ; profileEditor.setLabel ( constants.loginFormProfileLabel ( ) ) ; connectAutomaticallyEditor.setLabel ( constants.loginFormConnectAutomaticallyLabel ( ) ) ; loginButton.setLabel ( constants.loginButtonLabel ( ) ) ; motdHeaderLabel.setText ( constants.motdHeaderLabel ( ) ) ; }

Target:
void localize ( ) { userNameEditor.setLabel ( org.ovirt.engine.ui.userportal.section.login.view.LoginFormView.constants.loginFormUserNameLabel ( ) ) ; passwordEditor.setLabel ( org.ovirt.engine.ui.userportal.section.login.view.LoginFormView.constants.loginFormPasswordLabel ( ) ) ; profileEditor.setLabel ( org.ovirt.engine.ui.userportal.section.login.view.LoginFormView.constants.loginFormProfileLabel ( ) ) ; connectAutomaticallyEditor.setLabel ( org.ovirt.engine.ui.userportal.section.login.view.LoginFormView.constants.loginFormConnectAutomaticallyLabel ( ) ) ; loginButton.setLabel ( org.ovirt.engine.ui.userportal.section.login.view.LoginFormView.constants.loginButtonLabel ( ) ) ; motdHeaderLabel.setText ( org.ovirt.engine.ui.userportal.section.login.view.LoginFormView.constants.motdHeaderLabel ( ) ) ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult isPosixDcAndMatchingCompatiblityVersion ( ) { if ( ( ( storagePool.getstorage_pool_type ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageType.POSIXFS ) ) && ( ! ( org.ovirt.engine.core.common.config.Config.< java.lang.Boolean > GetValue ( ConfigValues.PosixStorageEnabled , storagePool.getcompatibility_version ( ) . toString ( ) ) ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.dal.VdcBllMessages.DATA_CENTER_POSIX_STORAGE_NOT_SUPPORTED_IN_CURRENT_VERSION ) ; } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult isPosixDcAndMatchingCompatiblityVersion ( ) { if ( ( ( storagePool.getstorage_pool_type ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageType.POSIXFS ) ) && ( ! ( org.ovirt.engine.core.common.config.Config.< java.lang.Boolean > GetValue ( ConfigValues.PosixStorageEnabled , storagePool.getcompatibility_version ( ) . toString ( ) ) ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.DATA_CENTER_POSIX_STORAGE_NOT_SUPPORTED_IN_CURRENT_VERSION ) ; } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }
Source:
public void getoVirtISOsList ( 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 ? new java.util.ArrayList < > ( ( ( java.util.ArrayList < org.ovirt.engine.core.compat.RpmVersion > ) ( source ) ) ) : new java.util.ArrayList < org.ovirt.engine.core.compat.RpmVersion > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetoVirtISOs , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
public void getClusterList ( 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 ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Cluster > list = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Cluster > ) ( source ) ) ; java.util.Collections.sort ( list , new org.ovirt.engine.core.common.businessentities.comparators.NameableComparator ( ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Cluster > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetClustersByStoragePoolId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) , aQuery ) ; }
Source:
protected void ExecuteIrsBrokerCommand ( ) { _result = org.ovirt.engine.core.vdsbroker.irsbroker.GetImagesListVDSCommand.getIrsProxy ( ) . getImagesList ( org.ovirt.engine.core.vdsbroker.irsbroker.GetImagesListVDSCommand.getParameters ( ) . getStorageDomainId ( ) . toString ( ) ) ; ProceedProxyReturnValue ( ) ; java.util.ArrayList < org.ovirt.engine.core.compat.Guid > tempRetValue = new java.util.ArrayList < org.ovirt.engine.core.compat.Guid > ( _result.getImageList ( ) . length ) ; for ( java.lang.String id : _result.getImageList ( ) ) { tempRetValue.add ( new org.ovirt.engine.core.compat.Guid ( id ) ) ; } setReturnValue ( tempRetValue ) ; }

Target:
protected void ExecuteIrsBrokerCommand ( ) { _result = org.ovirt.engine.core.vdsbroker.irsbroker.GetImagesListVDSCommand.getIrsProxy ( ) . getImagesList ( org.ovirt.engine.core.vdsbroker.irsbroker.GetImagesListVDSCommand.getParameters ( ) . getStorageDomainId ( ) . toString ( ) ) ; proceedProxyReturnValue ( ) ; java.util.ArrayList < org.ovirt.engine.core.compat.Guid > tempRetValue = new java.util.ArrayList < org.ovirt.engine.core.compat.Guid > ( _result.getImageList ( ) . length ) ; for ( java.lang.String id : _result.getImageList ( ) ) { tempRetValue.add ( new org.ovirt.engine.core.compat.Guid ( id ) ) ; } setReturnValue ( tempRetValue ) ; }
Source:
protected void expectGetLunsForVg ( java.lang.String vgId ) { org.ovirt.engine.core.dao.LunDAO dao = org.mockito.Mockito.mock ( org.ovirt.engine.core.dao.LunDAO.class ) ; org.mockito.Mockito.when ( getDbFacadeMockInstance ( ) . getLunDao ( ) ) . thenReturn ( dao ) ; org.mockito.Mockito.when ( dao.getAllForVolumeGroup ( vgId ) ) . thenReturn ( setUpLuns ( ) ) ; }

Target:
protected org.ovirt.engine.core.dao.StorageServerConnectionLunMapDAO setUpStorageServerConnectionLunMapDAO ( ) { storageServerConnectionLunMapDAO = org.mockito.Mockito.mock ( org.ovirt.engine.core.dao.StorageServerConnectionLunMapDAO.class ) ; org.mockito.Mockito.when ( getDbFacadeMockInstance ( ) . getStorageServerConnectionLunMapDao ( ) ) . thenReturn ( storageServerConnectionLunMapDAO ) ; return storageServerConnectionLunMapDAO ; }
Source:
public void getGlusterHooks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterHooks , new org.ovirt.engine.core.common.queries.gluster.GlusterParameters ( clusterId ) , aQuery ) ; }

Target:
public void getClusterGlusterServices ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.core.common.queries.gluster.GlusterVolumeAdvancedDetailsParameters parameters = new org.ovirt.engine.core.common.queries.gluster.GlusterVolumeAdvancedDetailsParameters ( clusterId , null , null , false ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterVolumeAdvancedDetails , parameters , aQuery ) ; }
Source:
private boolean isSameSourceAndDest ( org.ovirt.engine.core.common.action.LiveMigrateDiskParameters parameters ) { org.ovirt.engine.core.common.businessentities.StorageDomain sourceDomain = getImageSourceDomain ( parameters.getImageId ( ) ) ; if ( sourceDomain.getId ( ) . equals ( parameters.getStorageDomainId ( ) ) ) { return failCanDoAction ( VdcBllMessages.ACTION_TYPE_FAILED_SOURCE_AND_TARGET_SAME ) ; } return true ; }

Target:
protected boolean setAndValidateDiskProfiles ( ) { java.util.Map < org.ovirt.engine.core.common.businessentities.DiskImage , org.ovirt.engine.core.compat.Guid > map = new java.util.HashMap < > ( ) ; for ( org.ovirt.engine.core.common.action.LiveMigrateDiskParameters parameters : getParameters ( ) . getParametersList ( ) ) { org.ovirt.engine.core.common.businessentities.DiskImage diskImage = getDiskImageByImageId ( parameters.getImageId ( ) ) ; map.put ( diskImage , diskImage.getStorageIds ( ) . get ( 0 ) ) ; } return validate ( org.ovirt.engine.core.bll.profiles.DiskProfileHelper.setAndValidateDiskProfiles ( map , org.ovirt.engine.core.bll.lsm.LiveMigrateVmDisksCommand.getStoragePool ( ) . getcompatibility_version ( ) ) ) ; }
Source:
public void testAlreadyExistStorageDomain ( ) { org.mockito.Mockito.when ( storageDomainStaticDao.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( org.ovirt.engine.core.bll.storage.domain.AddExistingBlockStorageDomainCommandTest.getStorageDomain ( ) ) ; org.junit.Assert.assertFalse ( "Storage Domain already exists" , command.canAddDomain ( ) ) ; org.junit.Assert.assertTrue ( "Import block Storage Domain should have failed due to already existing Storage Domain" , command.getReturnValue ( ) . getValidationMessages ( ) . contains ( EngineMessage.ACTION_TYPE_FAILED_STORAGE_DOMAIN_ALREADY_EXIST.toString ( ) ) ) ; }

Target:
public void testAlreadyExistStorageDomain ( ) { org.mockito.Mockito.when ( storageDomainStaticDao.get ( org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( org.ovirt.engine.core.bll.storage.domain.AddExistingBlockStorageDomainCommandTest.getStorageDomain ( ) ) ; org.junit.Assert.assertFalse ( "Storage Domain already exists" , command.canAddDomain ( ) ) ; org.junit.Assert.assertTrue ( "Import block Storage Domain should have failed due to already existing Storage Domain" , command.getReturnValue ( ) . getValidationMessages ( ) . contains ( EngineMessage.ACTION_TYPE_FAILED_STORAGE_DOMAIN_ALREADY_EXIST.toString ( ) ) ) ; }
Source:
private org.ovirt.engine.core.bll.ValidationResult networkNameNotUsed ( ) { org.ovirt.engine.core.common.businessentities.network.Network networkWithSameName = getOtherNetworkWithSameName ( org.ovirt.engine.core.bll.network.dc.UpdateNetworkCommand.getNetworks ( ) ) ; return networkWithSameName != null ? new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.dal.VdcBllMessages.ACTION_TYPE_FAILED_NETWORK_NAME_IN_USE ) : org.ovirt.engine.core.bll.ValidationResult.VALID ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult notChangingManagementNetwork ( org.ovirt.engine.core.common.businessentities.network.Network newNetwork ) { java.lang.String managementNetwork = org.ovirt.engine.core.common.config.Config.< java.lang.String > GetValue ( ConfigValues.ManagementNetwork ) ; return ( network.getName ( ) . equals ( managementNetwork ) ) && ( ! ( newNetwork.getName ( ) . equals ( managementNetwork ) ) ) ? new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.dal.VdcBllMessages.NETWORK_CAN_NOT_REMOVE_DEFAULT_NETWORK ) : org.ovirt.engine.core.bll.ValidationResult.VALID ; }
Source:
public static void GetLunsByVgId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String vgId , org.ovirt.engine.core.compat.Guid vdsId ) { 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.LUNs > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.LUNs > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetLunsByVgIdParameters params = new org.ovirt.engine.core.common.queries.GetLunsByVgIdParameters ( vgId , vdsId ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetLunsByVgId , params , aQuery ) ; }

Target:
public static void getExistingStorageDomainList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hostId , org.ovirt.engine.core.common.businessentities.StorageDomainType domainType , org.ovirt.engine.core.common.businessentities.StorageType storageType , java.lang.String path ) { 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.StorageDomain > ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetExistingStorageDomainList , new org.ovirt.engine.core.common.queries.GetExistingStorageDomainListParameters ( hostId , storageType , domainType , path ) , aQuery ) ; }
Source:
private void doInit ( org.ovirt.engineextensions.aaa.ldap.ExtMap input , org.ovirt.engineextensions.aaa.ldap.ExtMap output ) throws java.lang.Exception { try { ensureFramework ( input ) ; } catch ( java.lang.Exception e ) { org.ovirt.engineextensions.aaa.ldap.AuthzExtension.log.error ( "Cannot initialize LDAP framework, deferring initialization. Error: {}" , e.getMessage ( ) ) ; org.ovirt.engineextensions.aaa.ldap.AuthzExtension.log.debug ( "Exception" , e ) ; } }

Target:
private void doInit ( org.ovirt.engineextensions.aaa.ldap.ExtMap input , org.ovirt.engineextensions.aaa.ldap.ExtMap output ) throws java.lang.Exception { try { ensureFramework ( input ) ; } catch ( java.lang.Exception e ) { org.ovirt.engineextensions.aaa.ldap.AuthzExtension.log.error ( "{} Cannot initialize LDAP framework, deferring initialization. Error: {}" , logPrefix , e.getMessage ( ) ) ; org.ovirt.engineextensions.aaa.ldap.AuthzExtension.log.debug ( "Exception" , e ) ; } }
Source:
protected void ExecuteIrsBrokerCommand ( ) { org.ovirt.engine.core.vdsbroker.irsbroker.VDSReturnValue returnValue = org.ovirt.engine.core.vdsbroker.irsbroker.ResourceManager.getInstance ( ) . runVdsCommand ( VDSCommandType.HSMRevertTask , new org.ovirt.engine.core.vdsbroker.irsbroker.HSMTaskGuidBaseVDSCommandParameters ( org.ovirt.engine.core.vdsbroker.irsbroker.SPMRevertTaskVDSCommand.getCurrentIrsProxyData ( ) . getCurrentVdsId ( ) , org.ovirt.engine.core.vdsbroker.irsbroker.SPMRevertTaskVDSCommand.getParameters ( ) . getTaskId ( ) ) ) ; if ( ( returnValue != null ) && ( ! ( returnValue.getSucceeded ( ) ) ) ) { org.ovirt.engine.core.vdsbroker.irsbroker.SPMRevertTaskVDSCommand.getVDSReturnValue ( ) . setVdsError ( returnValue.getVdsError ( ) ) ; org.ovirt.engine.core.vdsbroker.irsbroker.SPMRevertTaskVDSCommand.getVDSReturnValue ( ) . setSucceeded ( false ) ; } }

Target:
protected void ExecuteIrsBrokerCommand ( ) { org.ovirt.engine.core.common.vdscommands.VDSReturnValue returnValue = org.ovirt.engine.core.vdsbroker.ResourceManager.getInstance ( ) . runVdsCommand ( VDSCommandType.HSMRevertTask , new org.ovirt.engine.core.common.vdscommands.HSMTaskGuidBaseVDSCommandParameters ( org.ovirt.engine.core.vdsbroker.irsbroker.SPMRevertTaskVDSCommand.getCurrentIrsProxyData ( ) . getCurrentVdsId ( ) , org.ovirt.engine.core.vdsbroker.irsbroker.SPMRevertTaskVDSCommand.getParameters ( ) . getTaskId ( ) ) ) ; if ( ( returnValue != null ) && ( ! ( returnValue.getSucceeded ( ) ) ) ) { org.ovirt.engine.core.vdsbroker.irsbroker.SPMRevertTaskVDSCommand.getVDSReturnValue ( ) . setVdsError ( returnValue.getVdsError ( ) ) ; org.ovirt.engine.core.vdsbroker.irsbroker.SPMRevertTaskVDSCommand.getVDSReturnValue ( ) . setSucceeded ( false ) ; } }
Source:
public void canDoActionFailureOnMovingLunDisk ( ) { org.ovirt.engine.core.common.action.MoveDiskParameters moveDiskParameters1 = new org.ovirt.engine.core.common.action.MoveDiskParameters ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , srcStorageId , dstStorageId ) ; command.getParameters ( ) . setParametersList ( java.util.Collections.singletonList ( moveDiskParameters1 ) ) ; initLunDisk ( ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( command , EngineMessage.ACTION_TYPE_FAILED_LUN_DISK ) ; }

Target:
public void canDoActionFailureOnMovingLunDisk ( ) { org.ovirt.engine.core.common.action.MoveDiskParameters moveDiskParameters1 = new org.ovirt.engine.core.common.action.MoveDiskParameters ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , srcStorageId , dstStorageId ) ; command.getParameters ( ) . setParametersList ( java.util.Collections.singletonList ( moveDiskParameters1 ) ) ; initLunDisk ( ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( command , EngineMessage.ACTION_TYPE_FAILED_NOT_SUPPORTED_DISK_STORAGE_TYPE ) ; }
Source:
private void UpdateStorageDomainCells ( ) { java.lang.Boolean isSingleDestStorage = ( ( java.lang.Boolean ) ( object.getIsSingleDestStorage ( ) . getEntity ( ) ) ) ; java.lang.String toolTip = ( isSingleDestStorage ) ? "" : constants.importVmTemplateSingleStorageCheckedLabel ( ) ; if ( ( customSelectionCellStorageDomain ) != null ) { customSelectionCellStorageDomain.setEnabledWithToolTip ( ( ! isSingleDestStorage ) , toolTip ) ; } diskTable.edit ( object.getImportDiskListModel ( ) ) ; }

Target:
public void update ( int index , org.ovirt.engine.core.common.businessentities.DiskImage disk , java.lang.String value ) { object.getDiskImportData ( disk.getId ( ) ) . setSelectedStorageDomainString ( value ) ; diskTable.edit ( object.getImportDiskListModel ( ) ) ; }
Source:
protected void updateScsiPassthroguhChangeability ( ) { getIsScsiPassthrough ( ) . setIsChangable ( ( ( ! ( getIsReadOnly ( ) . getEntity ( ) ) ) && ( isEditEnabled ( ) ) ) ) ; getIsScsiPassthrough ( ) . setChangeProhibitionReason ( org.ovirt.engine.ui.uicommonweb.models.vms.AbstractDiskModel.CONSTANTS.cannotEnableScsiPassthroughForLunReadOnlyDisk ( ) ) ; updateSgIoUnfilteredChangeability ( ) ; }

Target:
protected void updateScsiPassthroguhChangeability ( ) { getIsScsiPassthrough ( ) . setIsChangable ( ( ( ! ( getIsReadOnly ( ) . getEntity ( ) ) ) && ( isEditEnabled ( ) ) ) ) ; getIsScsiPassthrough ( ) . setChangeProhibitionReason ( org.ovirt.engine.ui.uicommonweb.models.vms.AbstractDiskModel.constants.cannotEnableScsiPassthroughForLunReadOnlyDisk ( ) ) ; updateSgIoUnfilteredChangeability ( ) ; }
Source:
private void updatePassDiscardChangeability ( ) { getPassDiscard ( ) . setIsChangeable ( isEditEnabled ( ) ) ; }

Target:
protected void updatePassDiscardChangeability ( ) { if ( ( isEditEnabled ( ) ) && ( getPassDiscard ( ) . getIsAvailable ( ) ) ) { if ( ( getDiskStorageType ( ) . getEntity ( ) ) == ( org.ovirt.engine.core.common.businessentities.storage.DiskStorageType.LUN ) ) { updatePassDiscardChangeabilityForDirectLun ( ) ; } else if ( ( getDiskStorageType ( ) . getEntity ( ) ) == ( org.ovirt.engine.core.common.businessentities.storage.DiskStorageType.IMAGE ) ) { updatePassDiscardChangeabilityForDiskImage ( ) ; } } }
Source:
public void setup ( ) { org.ovirt.engine.core.CommandMocks.mockDbFacade ( cmd , dbFacade ) ; org.mockito.Mockito.when ( dbFacade.getStoragePoolDao ( ) ) . thenReturn ( storagePoolDao ) ; org.mockito.Mockito.when ( dbFacade.getStorageDomainDao ( ) ) . thenReturn ( storageDomainDao ) ; org.mockito.Mockito.doReturn ( eventQueue ) . when ( cmd ) . getEventQueue ( ) ; }

Target:
public void setup ( ) { map = new org.ovirt.engine.core.common.businessentities.StoragePoolIsoMap ( ) ; org.ovirt.engine.core.CommandMocks.mockDbFacade ( cmd , dbFacade ) ; org.mockito.Mockito.when ( dbFacade.getStoragePoolDao ( ) ) . thenReturn ( storagePoolDao ) ; org.mockito.Mockito.when ( dbFacade.getStorageDomainDao ( ) ) . thenReturn ( storageDomainDao ) ; org.mockito.Mockito.doReturn ( eventQueue ) . when ( cmd ) . getEventQueue ( ) ; }
Source:
public void onClick ( com.google.gwt.event.dom.client.ClickEvent event ) { ( ( org.ovirt.engine.ui.common.widget.AddRemoveRowWidget < M , T , V > . AddRemoveRowPanel ) ( widget.getParent ( ) ) ) . swapButton ( createButton ( item ) ) ; addGhostEntry ( ) ; onAdd ( value , widget ) ; }

Target:
public void onClick ( com.google.gwt.event.dom.client.ClickEvent event ) { ( ( org.ovirt.engine.ui.common.widget.AddRemoveRowWidget < M , T , V > . AddRemoveRowPanel ) ( widget.getParent ( ) ) ) . swapButton ( createButton ( item ) ) ; org.ovirt.engine.core.common.utils.Pair < T , V > item = addGhostEntry ( ) ; onAdd ( item.getFirst ( ) , item.getSecond ( ) ) ; }