auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public static void getAllDataCenterStorageConnections ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId ) { 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.StorageServerConnections > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageServerConnections > ( ) ; } } ; org.ovirt.engine.core.common.queries.IdQueryParameters params = new org.ovirt.engine.core.common.queries.IdQueryParameters ( storagePoolId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetConnectableStorageServerConnectionsByStoragePoolId , params , aQuery ) ; }

Target:
public static void getStorageConnectionsByDataCenterIdAndStorageType ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.common.businessentities.StorageType storageType ) { 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.GetConnectionsByDataCenterAndStorageTypeParameters params = new org.ovirt.engine.core.common.queries.GetConnectionsByDataCenterAndStorageTypeParameters ( storagePoolId , storageType ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetConnectionsByDataCenterAndStorageType , params , aQuery ) ; }
Source:
public void testImagesDoesNotExist ( ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage diskImage1 = org.ovirt.engine.core.bll.snapshots.CreateAllSnapshotsFromVmCommandTest.getNewDiskImage ( ) ; org.ovirt.engine.core.common.businessentities.storage.DiskImage diskImage2 = org.ovirt.engine.core.bll.snapshots.CreateAllSnapshotsFromVmCommandTest.getNewDiskImage ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > diskImagesFromParams = new java.util.ArrayList < > ( ) ; diskImagesFromParams.addAll ( java.util.Arrays.asList ( diskImage1 , diskImage2 ) ) ; cmd.getParameters ( ) . setDisks ( diskImagesFromParams ) ; org.mockito.Mockito.doReturn ( new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_DISKS_NOT_EXIST ) ) . when ( diskImagesValidator ) . diskImagesNotExist ( ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( cmd , EngineMessage.ACTION_TYPE_FAILED_DISKS_NOT_EXIST ) ; }

Target:
public void testImagesDoesNotExist ( ) { java.util.Set < org.ovirt.engine.core.compat.Guid > guidsForDiskImages = new java.util.HashSet ( java.util.Arrays.asList ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ) ; cmd.getParameters ( ) . setDiskIds ( guidsForDiskImages ) ; org.mockito.Mockito.doReturn ( new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_DISKS_NOT_EXIST ) ) . when ( diskExistenceValidator ) . diskImagesNotExist ( ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( cmd , EngineMessage.ACTION_TYPE_FAILED_DISKS_NOT_EXIST ) ; }
Source:
protected void EndMoveVmCommand ( ) { org.ovirt.engine.core.bll.MoveVmCommand.EndActionOnAllImageGroups ( ) ; if ( ( org.ovirt.engine.core.bll.MoveVmCommand.getVm ( ) ) != null ) { org.ovirt.engine.core.bll.VmHandler.UnLockVm ( org.ovirt.engine.core.bll.MoveVmCommand.getVm ( ) ) ; org.ovirt.engine.core.bll.VmHandler.updateDisksFromDb ( org.ovirt.engine.core.bll.MoveVmCommand.getVm ( ) ) ; UpdateVmImSpm ( ) ; } else { org.ovirt.engine.core.bll.MoveVmCommand.setCommandShouldBeLogged ( false ) ; log.warn ( "MoveVmCommand::EndMoveVmCommand: Vm is null - not performing full EndAction" ) ; } org.ovirt.engine.core.bll.MoveVmCommand.setSucceeded ( true ) ; }

Target:
protected void endMoveVmCommand ( ) { org.ovirt.engine.core.bll.MoveVmCommand.endActionOnAllImageGroups ( ) ; if ( ( org.ovirt.engine.core.bll.MoveVmCommand.getVm ( ) ) != null ) { org.ovirt.engine.core.bll.VmHandler.UnLockVm ( org.ovirt.engine.core.bll.MoveVmCommand.getVm ( ) ) ; org.ovirt.engine.core.bll.VmHandler.updateDisksFromDb ( org.ovirt.engine.core.bll.MoveVmCommand.getVm ( ) ) ; updateVmImSpm ( ) ; } else { org.ovirt.engine.core.bll.MoveVmCommand.setCommandShouldBeLogged ( false ) ; log.warn ( "MoveVmCommand::EndMoveVmCommand: Vm is null - not performing full EndAction" ) ; } org.ovirt.engine.core.bll.MoveVmCommand.setSucceeded ( true ) ; }
Source:
private void initCommand ( ) { org.mockito.Mockito.when ( diskDao.get ( diskId ) ) . thenReturn ( createDiskImage ( ) ) ; org.ovirt.engine.core.common.action.AttachDetachVmDiskParameters parameters = createParameters ( ) ; command = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.storage.disk.AttachDiskToVmCommand < org.ovirt.engine.core.common.action.AttachDetachVmDiskParameters > ( parameters , null ) { @ java.lang.SuppressWarnings ( value = "synthetic-access" ) @ java.lang.Override public org.ovirt.engine.core.dao.DiskDao getDiskDao ( ) { return diskDao ; } } ) ; }

Target:
private void initCommand ( ) { org.mockito.Mockito.when ( diskDao.get ( diskId ) ) . thenReturn ( createDiskImage ( ) ) ; org.ovirt.engine.core.common.action.AttachDetachVmDiskParameters parameters = createParameters ( ) ; command = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.storage.disk.AttachDiskToVmCommand ( parameters , null ) ) ; org.mockito.Mockito.doReturn ( diskDao ) . when ( command ) . getDiskDao ( ) ; command.init ( ) ; }
Source:
public void testAddExistingBlockDomainWhenVgInfoReturnsEmptyLunList ( ) { org.mockito.Mockito.doReturn ( java.util.Collections.emptyList ( ) ) . when ( command ) . getLUNsFromVgInfo ( ) ; org.junit.Assert.assertFalse ( "Could not connect to Storage Domain" , command.canAddDomain ( ) ) ; org.junit.Assert.assertTrue ( "Import block Storage Domain should have failed due to empty Lun list returned from VGInfo " , command.getReturnValue ( ) . getValidationMessages ( ) . contains ( EngineMessage.ACTION_TYPE_FAILED_PROBLEM_WITH_CANDIDATE_INFO.toString ( ) ) ) ; }

Target:
public void testAddExistingBlockDomainWhenVgInfoReturnsEmptyLunList ( ) { org.mockito.Mockito.doReturn ( java.util.Collections.emptyList ( ) ) . when ( command ) . getLUNsFromVgInfo ( ) ; org.junit.jupiter.api.Assertions.assertFalse ( command.canAddDomain ( ) , "Could not connect to Storage Domain" ) ; org.junit.jupiter.api.Assertions.assertTrue ( command.getReturnValue ( ) . getValidationMessages ( ) . contains ( EngineMessage.ACTION_TYPE_FAILED_PROBLEM_WITH_CANDIDATE_INFO.toString ( ) ) , "Import block Storage Domain should have failed due to empty Lun list returned from VGInfo" ) ; }
Source:
private static org.ovirt.engine.api.restapi.types.IpVersion getIpVersion ( org.ovirt.engine.api.model.IpAddressAssignment ipAddressAssignment ) { if ( ! ( ( ipAddressAssignment.isSetIp ( ) ) && ( ipAddressAssignment.getIp ( ) . isSetVersion ( ) ) ) ) { return null ; } return org.ovirt.engine.api.restapi.types.IpVersion.fromValue ( ipAddressAssignment.getIp ( ) . getVersion ( ) ) ; }

Target:
private static org.ovirt.engine.api.model.IpVersion getIpVersion ( org.ovirt.engine.api.model.IpAddressAssignment ipAddressAssignment ) { if ( ! ( ( ipAddressAssignment.isSetIp ( ) ) && ( ipAddressAssignment.getIp ( ) . isSetVersion ( ) ) ) ) { return null ; } return ipAddressAssignment.getIp ( ) . getVersion ( ) ; }
Source:
public java.util.List < org.ovirt.engine.core.common.PermissionSubject > getPermissionCheckSubjects ( ) { java.util.List < org.ovirt.engine.core.common.PermissionSubject > listPermissionSubjects ; if ( ( org.ovirt.engine.core.bll.AddDiskCommand.getParameters ( ) . getVmId ( ) ) == null ) { listPermissionSubjects = new java.util.ArrayList < org.ovirt.engine.core.common.PermissionSubject > ( ) ; } else { listPermissionSubjects = super . getPermissionCheckSubjects ( ) ; } listPermissionSubjects.add ( new org.ovirt.engine.core.common.PermissionSubject ( org.ovirt.engine.core.bll.AddDiskCommand.getParameters ( ) . getStorageDomainId ( ) , org.ovirt.engine.core.common.VdcObjectType.Storage , org.ovirt.engine.core.common.businessentities.ActionGroup.CREATE_DISK ) ) ; return listPermissionSubjects ; }

Target:
public java.util.List < org.ovirt.engine.core.common.PermissionSubject > getPermissionCheckSubjects ( ) { java.util.List < org.ovirt.engine.core.common.PermissionSubject > listPermissionSubjects ; if ( ( ( org.ovirt.engine.core.bll.AddDiskCommand.getParameters ( ) . getVmId ( ) ) == null ) || ( Guid.Empty.equals ( org.ovirt.engine.core.bll.AddDiskCommand.getParameters ( ) . getVmId ( ) ) ) ) { listPermissionSubjects = new java.util.ArrayList < org.ovirt.engine.core.common.PermissionSubject > ( ) ; } else { listPermissionSubjects = super . getPermissionCheckSubjects ( ) ; } listPermissionSubjects.add ( new org.ovirt.engine.core.common.PermissionSubject ( org.ovirt.engine.core.bll.AddDiskCommand.getParameters ( ) . getStorageDomainId ( ) , org.ovirt.engine.core.common.VdcObjectType.Storage , org.ovirt.engine.core.common.businessentities.ActionGroup.CREATE_DISK ) ) ; return listPermissionSubjects ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object ReturnValue ) { java.util.Collection < org.ovirt.engine.core.common.businessentities.VM > vms = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( ReturnValue ) ) . getReturnValue ( ) ; if ( ( vms != null ) && ( ! ( vms.isEmpty ( ) ) ) ) { getPortMirroring ( ) . setChangeProhibitionReason ( org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getConstants ( ) . portMirroringNotChangedIfUsedByVms ( ) ) ; getPortMirroring ( ) . setIsChangable ( false ) ; } stopProgress ( ) ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object ReturnValue ) { java.util.Collection < org.ovirt.engine.core.common.businessentities.VM > vms = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( ReturnValue ) ) . getReturnValue ( ) ; if ( ( vms != null ) && ( ! ( vms.isEmpty ( ) ) ) ) { getPortMirroring ( ) . setChangeProhibitionReason ( org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getConstants ( ) . portMirroringNotChangedIfUsedByVms ( ) ) ; getPortMirroring ( ) . setIsChangeable ( false ) ; } stopProgress ( ) ; }
Source:
public com.google.gwt.safehtml.shared.SafeHtml getTooltip ( java.lang.Object object ) { return com.google.gwt.safehtml.shared.SafeHtmlUtils.fromSafeConstant ( "arik" ) ; }

Target:
public com.google.gwt.safehtml.shared.SafeHtml getTooltip ( java.lang.Object object ) { org.ovirt.engine.ui.uicommonweb.models.vms.ImportVmData importVmData = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.ImportVmData ) ( object ) ) ; java.lang.String problem = null ; if ( ( importVmData.getError ( ) ) != null ) { problem = importVmData.getError ( ) ; } else { problem = ( importVmData.isNameExistsInTheSystem ( ) ) ? org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getConstants ( ) . nameMustBeUniqueInvalidReason ( ) : importVmData.getWarning ( ) ; } return problem != null ? com.google.gwt.safehtml.shared.SafeHtmlUtils.fromSafeConstant ( problem ) : null ; }
Source:
public java.util.List < org.ovirt.engine.core.common.businessentities.VDS > getAllForStoragePoolAndStatus ( org.ovirt.engine.core.compat.Guid storagePool , org.ovirt.engine.core.common.businessentities.VDSStatus status ) { java.util.List < org.ovirt.engine.core.common.businessentities.VDS > vdsList = getCallsHandler ( ) . executeReadList ( "getVdsByStoragePoolIdWithStatus" , org.ovirt.engine.core.dao.VdsDaoImpl.VdsRowMapper.instance , getCustomMapSqlParameterSource ( ) . addValue ( "storage_pool_id" , storagePool ) . addValue ( "status" , ( status != null ? status.getValue ( ) : null ) ) ) ; return uniteAgents ( vdsList ) ; }

Target:
public java.util.List < org.ovirt.engine.core.common.businessentities.VDS > getAllForStoragePoolAndStatus ( org.ovirt.engine.core.compat.Guid storagePool , org.ovirt.engine.core.common.businessentities.VDSStatus status ) { return getAllForStoragePoolAndStatuses ( storagePool , ( status != null ? java.util.EnumSet.of ( status ) : null ) ) ; }
Source:
protected void setUpGetEntityExpectations ( boolean filter , boolean getCertInfo ) throws java.lang.Exception { setUpGetEntityExpectations ( VdcQueryType.GetVdsByVdsId , org.ovirt.engine.core.common.queries.GetVdsByVdsIdParameters.class , new java.lang.String [ ] { "VdsId" , "Filtered" } , new java.lang.Object [ ] { GUIDS [ 0 ] , filter } , getEntity ( 0 ) ) ; if ( getCertInfo ) { setUpGetCertificateInfo ( ) ; } }

Target:
protected void setUpGetEntityExpectations ( boolean filter , boolean getCertInfo ) throws java.lang.Exception { setUpGetEntityExpectations ( VdcQueryType.GetVdsByVdsId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" , "Filtered" } , new java.lang.Object [ ] { GUIDS [ 0 ] , filter } , getEntity ( 0 ) ) ; if ( getCertInfo ) { setUpGetCertificateInfo ( ) ; } }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { if ( ( ev.matchesDefinition ( ConsoleModel.ErrorEventDefinition ) ) && ( ( sender instanceof org.ovirt.engine.ui.uicommonweb.models.vms.SpiceConsoleModel ) || ( sender instanceof org.ovirt.engine.ui.uicommonweb.models.vms.RdpConsoleModel ) ) ) { consoleModelError ( sender , getConsoleModelErrorMessage ( sender , ( ( org.ovirt.engine.ui.uicommonweb.models.vms.ErrorCodeEventArgs ) ( args ) ) ) ) ; } }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { if ( ( ev.matchesDefinition ( ConsoleModel.errorEventDefinition ) ) && ( ( sender instanceof org.ovirt.engine.ui.uicommonweb.models.vms.SpiceConsoleModel ) || ( sender instanceof org.ovirt.engine.ui.uicommonweb.models.vms.RdpConsoleModel ) ) ) { consoleModelError ( sender , getConsoleModelErrorMessage ( sender , ( ( org.ovirt.engine.ui.uicommonweb.models.vms.ErrorCodeEventArgs ) ( args ) ) ) ) ; } }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object result ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ExternalHostGroup > hostGroups = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ExternalHostGroup > ) ( result ) ) ; org.ovirt.engine.ui.uicommonweb.models.ListModel externalHostGroupsListModel = getExternalHostGroups ( ) ; externalHostGroupsListModel.setItems ( hostGroups ) ; externalHostGroupsListModel.setIsChangable ( true ) ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object result ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > hosts = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ) ( result ) ) ; org.ovirt.engine.ui.uicommonweb.models.ListModel < org.ovirt.engine.core.common.businessentities.VDS > hostNameListModel = getExternalHostName ( ) ; hostNameListModel.setItems ( hosts ) ; hostNameListModel.setIsChangable ( true ) ; setEnableSearchHost ( true ) ; getProviders ( ) . setIsChangable ( true ) ; }
Source:
public com.google.gwt.resources.client.ImageResource getValue ( org.ovirt.engine.core.common.businessentities.StoragePool dc ) { setEnumTitle ( dc.getStatus ( ) ) ; switch ( dc.getStatus ( ) ) { case Contend : return getApplicationResources ( ) . waitImage ( ) ; case Maintenance : return getApplicationResources ( ) . maintenanceImage ( ) ; case NotOperational : case NonResponsive : case Uninitialized : return getApplicationResources ( ) . downImage ( ) ; case Up : return getApplicationResources ( ) . upImage ( ) ; default : break ; } return null ; }

Target:
public com.google.gwt.resources.client.ImageResource getValue ( org.ovirt.engine.core.common.businessentities.StoragePool dc ) { switch ( dc.getStatus ( ) ) { case Contend : return org.ovirt.engine.ui.webadmin.widget.table.column.DcStatusColumn.resources.waitImage ( ) ; case Maintenance : return org.ovirt.engine.ui.webadmin.widget.table.column.DcStatusColumn.resources.maintenanceImage ( ) ; case NotOperational : case NonResponsive : case Uninitialized : return org.ovirt.engine.ui.webadmin.widget.table.column.DcStatusColumn.resources.downImage ( ) ; case Up : return org.ovirt.engine.ui.webadmin.widget.table.column.DcStatusColumn.resources.upImage ( ) ; default : break ; } return null ; }
Source:
public void setDefaultConsoleModel ( org.ovirt.engine.ui.uicommonweb.models.vms.ConsoleModel defaultConsoleModel ) { this . defaultConsoleModel = defaultConsoleModel ; }

Target:
private void setConsoleHelpers ( ) { this . consoleUtils = ( ( org.ovirt.engine.ui.uicommonweb.ConsoleUtils ) ( org.ovirt.engine.ui.uicommonweb.TypeResolver.getInstance ( ) . Resolve ( org.ovirt.engine.ui.uicommonweb.ConsoleUtils.class ) ) ) ; this . consoleManager = ( ( org.ovirt.engine.ui.uicommonweb.ConsoleManager ) ( org.ovirt.engine.ui.uicommonweb.TypeResolver.getInstance ( ) . Resolve ( org.ovirt.engine.ui.uicommonweb.ConsoleManager.class ) ) ) ; this . errorPopupManager = ( ( org.ovirt.engine.ui.uicommonweb.ErrorPopupManager ) ( org.ovirt.engine.ui.uicommonweb.TypeResolver.getInstance ( ) . Resolve ( org.ovirt.engine.ui.uicommonweb.ErrorPopupManager.class ) ) ) ; }
Source:
public void testAllDomainsHaveSpaceForMergeSuccess ( ) { org.ovirt.engine.core.bll.validator.storage.StorageDomainValidator storageDomainValidator = org.mockito.Mockito.mock ( org.ovirt.engine.core.bll.validator.storage.StorageDomainValidator.class ) ; org.mockito.Mockito.doReturn ( storageDomainValidator ) . when ( validator ) . getStorageDomainValidator ( org.mockito.ArgumentMatchers.any ( ) ) ; org.junit.Assert.assertTrue ( validator.allDomainsHaveSpaceForMerge ( org.mockito.ArgumentMatchers.anyList ( ) , org.mockito.ArgumentMatchers.any ( ) ) . isValid ( ) ) ; org.mockito.Mockito.verify ( storageDomainValidator , org.mockito.Mockito.times ( org.ovirt.engine.core.bll.validator.storage.MultipleStorageDomainsValidatorTest.NUM_DOMAINS ) ) . hasSpaceForMerge ( org.mockito.ArgumentMatchers.any ( ) , org.mockito.ArgumentMatchers.any ( ) ) ; }

Target:
public void testAllDomainsHaveSpaceForMergeSuccess ( ) { org.ovirt.engine.core.bll.validator.storage.StorageDomainValidator storageDomainValidator = org.mockito.Mockito.mock ( org.ovirt.engine.core.bll.validator.storage.StorageDomainValidator.class ) ; org.mockito.Mockito.doReturn ( storageDomainValidator ) . when ( validator ) . getStorageDomainValidator ( org.mockito.ArgumentMatchers.any ( ) ) ; org.junit.jupiter.api.Assertions.assertTrue ( validator.allDomainsHaveSpaceForMerge ( org.mockito.ArgumentMatchers.anyList ( ) , org.mockito.ArgumentMatchers.any ( ) ) . isValid ( ) ) ; org.mockito.Mockito.verify ( storageDomainValidator , org.mockito.Mockito.times ( org.ovirt.engine.core.bll.validator.storage.MultipleStorageDomainsValidatorTest.NUM_DOMAINS ) ) . hasSpaceForMerge ( org.mockito.ArgumentMatchers.any ( ) , org.mockito.ArgumentMatchers.any ( ) ) ; }
Source:
public void updateHostAddressNotAllowedWhenStatusNotInstallFailed ( ) { org.mockito.Mockito.when ( oldHost.getHostName ( ) ) . thenReturn ( generateRandomName ( ) ) ; org.mockito.Mockito.when ( host.getHostName ( ) ) . thenReturn ( generateRandomName ( ) ) ; org.mockito.Mockito.when ( oldHost.getStatus ( ) ) . thenReturn ( VDSStatus.Maintenance ) ; org.junit.Assert.assertThat ( validator.updateHostAddressAllowed ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( VdcBllMessages.ACTION_TYPE_FAILED_HOSTNAME_CANNOT_CHANGE ) ) ; }

Target:
public void updateHostAddressNotAllowedWhenStatusNotInstallFailed ( ) { org.mockito.Mockito.when ( oldHost.getHostName ( ) ) . thenReturn ( generateRandomName ( ) ) ; org.mockito.Mockito.when ( host.getHostName ( ) ) . thenReturn ( generateRandomName ( ) ) ; org.mockito.Mockito.when ( oldHost.getStatus ( ) ) . thenReturn ( VDSStatus.Maintenance ) ; org.junit.Assert.assertThat ( validator.updateHostAddressAllowed ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.ACTION_TYPE_FAILED_HOSTNAME_CANNOT_CHANGE ) ) ; }
Source:
public static void getClusterListByName ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String name ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( ( ( "Cluster: name=" + name ) + " sortby name" ) , org.ovirt.engine.core.common.interfaces.SearchType.Cluster ) , aQuery ) ; }

Target:
public static java.lang.Boolean isSuspendSupportedByArchitecture ( org.ovirt.engine.core.common.businessentities.ArchitectureType architecture , org.ovirt.engine.core.compat.Version version ) { return org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.suspendSupport.get ( architecture ) . get ( version ) ; }
Source:
public java.nio.channels.SocketChannel call ( ) throws java.io.IOException { java.net.InetAddress address = java.net.InetAddress.getByName ( hostname ) ; org.ovirt.vdsm.jsonrpc.client.reactors.ReactorClient.log.info ( ( "Connecting to " + address ) ) ; final java.net.InetSocketAddress addr = new java.net.InetSocketAddress ( address , port ) ; final java.nio.channels.SocketChannel socketChannel = java.nio.channels.SocketChannel.open ( ) ; socketChannel.configureBlocking ( false ) ; socketChannel.connect ( addr ) ; return socketChannel ; }

Target:
private java.util.concurrent.Future < java.lang.Void > scheduleClose ( final java.lang.String message ) { this . closing.set ( true ) ; return scheduleTask ( ( ) -> { disconnect ( message ) ; return null ; } ) ; }
Source:
public static void getStorageDomainsByConnection ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , java.lang.String connectionPath ) { 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.core.common.queries.GetStorageDomainsByConnectionParameters param = new org.ovirt.engine.core.common.queries.GetStorageDomainsByConnectionParameters ( ) ; param.setConnection ( connectionPath ) ; if ( storagePoolId != null ) { param.setStoragePoolId ( storagePoolId ) ; } org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetStorageDomainsByConnection , param , aQuery ) ; }

Target:
public static void getClusterServerMemoryOverCommit ( 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 ) ) . intValue ( ) : 0 ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.MaxVdsMemOverCommitForServers , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
public void setDbEngineDialect ( org.ovirt.engine.core.dal.dbbroker.DbEngineDialect dbEngineDialect ) { this . dbEngineDialect = dbEngineDialect ; callsHandler.setDbEngineDialect ( dbEngineDialect ) ; }

Target:
private < T extends org.ovirt.engine.core.dao.DAO > T getDao ( java.lang.Class < T > daoType ) { for ( org.ovirt.engine.core.dao.DAO dao : daos ) { if ( daoType.isAssignableFrom ( dao.getClass ( ) ) ) { return ( ( T ) ( dao ) ) ; } } org.ovirt.engine.core.dal.dbbroker.DbFacade.log.error ( ( "Can't find dao for " + daoType ) ) ; return null ; }
Source:
private boolean hasUpServer ( org.ovirt.engine.core.common.businessentities.VDSGroup cluster ) { if ( ( getClusterUtils ( ) . hasMultipleServers ( cluster.getId ( ) ) ) && ( ( getClusterUtils ( ) . getUpServer ( cluster.getId ( ) ) ) == null ) ) { addCanDoActionMessage ( java.lang.String.format ( "$clusterName %1$s" , cluster.getname ( ) ) ) ; addCanDoActionMessage ( VdcBllMessages.ACTION_TYPE_FAILED_NO_UP_SERVER_FOUND ) ; return false ; } return true ; }

Target:
private boolean hasUpServer ( org.ovirt.engine.core.common.businessentities.VDSGroup cluster ) { if ( ( getClusterUtils ( ) . hasMultipleServers ( cluster.getId ( ) ) ) && ( ( getClusterUtils ( ) . getUpServer ( cluster.getId ( ) ) ) == null ) ) { addNoUpServerMessage ( cluster ) ; return false ; } return true ; }
Source:
public org.ovirt.engine.core.common.businessentities.TagsVmMap mapRow ( java.sql.ResultSet rs , int rowNum ) throws java.sql.SQLException { org.ovirt.engine.core.common.businessentities.TagsVmMap entity = new org.ovirt.engine.core.common.businessentities.TagsVmMap ( ) ; entity.settag_id ( getGuidDefaultEmpty ( rs , "tag_id" ) ) ; entity.setvm_id ( getGuidDefaultEmpty ( rs , "vm_id" ) ) ; entity.setDefaultDisplayType ( ( ( java.lang.Integer ) ( rs.getObject ( "DefaultDisplayType" ) ) ) ) ; return entity ; }

Target:
public org.ovirt.engine.core.common.businessentities.TagsVmMap mapRow ( java.sql.ResultSet rs , int rowNum ) throws java.sql.SQLException { org.ovirt.engine.core.common.businessentities.TagsVmMap entity = new org.ovirt.engine.core.common.businessentities.TagsVmMap ( ) ; entity.setTagId ( getGuidDefaultEmpty ( rs , "tag_id" ) ) ; entity.setVmId ( getGuidDefaultEmpty ( rs , "vm_id" ) ) ; entity.setDefaultDisplayType ( ( ( java.lang.Integer ) ( rs.getObject ( "DefaultDisplayType" ) ) ) ) ; return entity ; }
Source:
private void setGlobalHaMaintenance ( boolean enabled ) { org.ovirt.engine.core.common.businessentities.VM vm = org.ovirt.engine.ui.uicommonweb.models.vms.VmListModel.getSelectedItem ( ) ; if ( vm == null ) { return ; } if ( ! ( vm.isHostedEngine ( ) ) ) { return ; } org.ovirt.engine.core.common.action.SetHaMaintenanceParameters params = new org.ovirt.engine.core.common.action.SetHaMaintenanceParameters ( vm.getRunOnVds ( ) , org.ovirt.engine.core.common.businessentities.HaMaintenanceMode.GLOBAL , enabled ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runAction ( VdcActionType.SetHaMaintenance , params ) ; }

Target:
private boolean isHeadlessModeChanged ( org.ovirt.engine.core.common.businessentities.VM source , org.ovirt.engine.core.common.action.VmManagementParametersBase updateVmParameters ) { return ( ( source.getDefaultDisplayType ( ) ) != ( updateVmParameters.getVmStaticData ( ) . getDefaultDisplayType ( ) ) ) && ( ( ( source.getDefaultDisplayType ( ) ) == ( org.ovirt.engine.core.common.businessentities.DisplayType.none ) ) || ( ( updateVmParameters.getVmStaticData ( ) . getDefaultDisplayType ( ) ) == ( org.ovirt.engine.core.common.businessentities.DisplayType.none ) ) ) ; }
Source:
protected void executeQueryCommand ( ) { org.ovirt.engine.core.common.businessentities.VDS vds = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVdsDAO ( ) . get ( org.ovirt.engine.core.bll.GetVdsHooksById2Query.getParameters ( ) . getVdsId ( ) ) ; java.util.Map < java.lang.String , java.lang.Object > result = new java.util.HashMap < java.lang.String , java.lang.Object > ( ) ; if ( vds != null ) { result = org.ovirt.engine.core.utils.vdshooks.VdsHooksParser.parseHooks2 ( vds.getHooksStr ( ) ) ; } org.ovirt.engine.core.bll.GetVdsHooksById2Query.getQueryReturnValue ( ) . setReturnValue ( result ) ; }

Target:
protected void executeQueryCommand ( ) { org.ovirt.engine.core.common.businessentities.VDS vds = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVdsDao ( ) . get ( org.ovirt.engine.core.bll.GetVdsHooksById2Query.getParameters ( ) . getVdsId ( ) ) ; java.util.Map < java.lang.String , java.lang.Object > result = new java.util.HashMap < java.lang.String , java.lang.Object > ( ) ; if ( vds != null ) { result = org.ovirt.engine.core.utils.vdshooks.VdsHooksParser.parseHooks2 ( vds.getHooksStr ( ) ) ; } org.ovirt.engine.core.bll.GetVdsHooksById2Query.getQueryReturnValue ( ) . setReturnValue ( result ) ; }
Source:
public static boolean isNumOfMonitorsLegal ( org.ovirt.engine.core.common.businessentities.DisplayType displayType , int numOfMonitors , java.util.List < java.lang.String > reasons ) { boolean legal = true ; if ( displayType == ( org.ovirt.engine.core.common.businessentities.DisplayType.vnc ) ) { legal = numOfMonitors <= 1 ; } else { legal = numOfMonitors <= ( org.ovirt.engine.core.bll.VmHandler.getMaxNumberOfMonitors ( ) ) ; } if ( ! legal ) { reasons.add ( VdcBllMessages.ACTION_TYPE_FAILED_ILLEGAL_NUM_OF_MONITORS.toString ( ) ) ; } return legal ; }

Target:
public static boolean isNumOfMonitorsLegal ( java.util.Collection < org.ovirt.engine.core.common.businessentities.GraphicsType > graphicsTypes , int numOfMonitors , java.util.List < java.lang.String > reasons ) { boolean legal = false ; if ( graphicsTypes.contains ( GraphicsType.VNC ) ) { legal = numOfMonitors <= 1 ; } else if ( graphicsTypes.contains ( GraphicsType.SPICE ) ) { legal = numOfMonitors <= ( org.ovirt.engine.core.bll.VmHandler.getMaxNumberOfMonitors ( ) ) ; } if ( ! legal ) { reasons.add ( VdcBllMessages.ACTION_TYPE_FAILED_ILLEGAL_NUM_OF_MONITORS.toString ( ) ) ; } return legal ; }
Source:
public void createCommand ( ) { org.ovirt.engine.core.common.action.RunVmParams param = new org.ovirt.engine.core.common.action.RunVmParams ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; command = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.RunVmCommand < org.ovirt.engine.core.common.action.RunVmParams > ( param ) ) ; mockIsoDomainListSyncronizer ( ) ; mockSuccessfulRunVmValidator ( ) ; mockSuccessfulSnapshotValidator ( ) ; mockBackend ( ) ; }

Target:
public void createCommand ( ) { org.ovirt.engine.core.common.action.RunVmParams param = new org.ovirt.engine.core.common.action.RunVmParams ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; command = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.RunVmCommand < org.ovirt.engine.core.common.action.RunVmParams > ( param ) ) ; mockIsoDomainListSyncronizer ( ) ; mockSuccessfulRunVmValidator ( ) ; org.mockito.Mockito.doNothing ( ) . when ( command ) . initParametersForExternalNetworks ( ) ; mockSuccessfulSnapshotValidator ( ) ; mockBackend ( ) ; }
Source:
protected void logToAudit ( ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase auditLogableBase = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( vds.getId ( ) ) ; auditLogableBase.setVds ( vds ) ; auditLogableBase.addCustomValue ( "message" , org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerCommand.getReturnStatus ( ) . message ) ; auditLogDirector.log ( auditLogableBase , AuditLogType.VDS_BROKER_COMMAND_FAILURE ) ; }

Target:
protected void logToAudit ( ) { if ( isPolicyResetMessage ( org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerCommand.getReturnStatus ( ) . message ) ) { return ; } org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase auditLogableBase = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( vds.getId ( ) ) ; auditLogableBase.setVds ( vds ) ; auditLogableBase.addCustomValue ( "message" , org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerCommand.getReturnStatus ( ) . message ) ; auditLogDirector.log ( auditLogableBase , AuditLogType.VDS_BROKER_COMMAND_FAILURE ) ; }
Source:
protected org.ovirt.engine.core.dao.qos.QosDao < ? > getQosDao ( ) { org.ovirt.engine.core.common.businessentities.qos.QosType qosType = getParameters ( ) . getQosType ( ) ; if ( qosType == null ) { return getDbFacade ( ) . getQosBaseDao ( ) ; } switch ( qosType ) { case STORAGE : qosDao = getDbFacade ( ) . getStorageQosDao ( ) ; break ; default : log.debugFormat ( "Not handled QoS type: {0}" , qosType ) ; break ; } return qosDao ; }

Target:
protected org.ovirt.engine.core.dao.qos.QosDao < ? > getQosDao ( ) { org.ovirt.engine.core.common.businessentities.qos.QosType qosType = getParameters ( ) . getQosType ( ) ; if ( qosType == null ) { return getDbFacade ( ) . getQosBaseDao ( ) ; } switch ( qosType ) { case STORAGE : qosDao = getDbFacade ( ) . getStorageQosDao ( ) ; break ; case CPU : qosDao = getDbFacade ( ) . getCpuQosDao ( ) ; break ; default : log.debugFormat ( "Not handled QoS type: {0}" , qosType ) ; break ; } return qosDao ; }
Source:
public javax.ws.rs.core.Response add ( org.ovirt.engine.api.model.GlusterVolume volume ) { validateParameters ( volume , "name" , "volumeType" , "bricks" ) ; org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity volumeEntity = getMapper ( org.ovirt.engine.api.model.GlusterVolume.class , org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity.class ) . map ( volume , null ) ; volumeEntity.setClusterId ( asGuid ( parent.get ( ) . getId ( ) ) ) ; mapBricks ( volume , volumeEntity ) ; return performCreate ( ActionType.CreateGlusterVolume , new org.ovirt.engine.core.common.action.gluster.CreateGlusterVolumeParameters ( volumeEntity , isForce ( ) ) , new org.ovirt.engine.api.restapi.resource.gluster.QueryIdResolver < org.ovirt.engine.core.compat.Guid > ( org.ovirt.engine.core.common.queries.VdcQueryType.GetGlusterVolumeById , org.ovirt.engine.core.common.queries.IdQueryParameters.class ) , true ) ; }

Target:
public javax.ws.rs.core.Response add ( org.ovirt.engine.api.model.GlusterVolume volume ) { validateParameters ( volume , "name" , "volumeType" , "bricks" ) ; org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity volumeEntity = getMapper ( org.ovirt.engine.api.model.GlusterVolume.class , org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity.class ) . map ( volume , null ) ; volumeEntity.setClusterId ( asGuid ( parent.get ( ) . getId ( ) ) ) ; mapBricks ( volume , volumeEntity ) ; return performCreate ( ActionType.CreateGlusterVolume , new org.ovirt.engine.core.common.action.gluster.CreateGlusterVolumeParameters ( volumeEntity , isForce ( ) ) , new org.ovirt.engine.api.restapi.resource.gluster.QueryIdResolver < org.ovirt.engine.core.compat.Guid > ( org.ovirt.engine.core.common.queries.QueryType.GetGlusterVolumeById , org.ovirt.engine.core.common.queries.IdQueryParameters.class ) , true ) ; }
Source:
protected org.ovirt.engine.core.bll.SPMAsyncTask ConcreteCreateTask ( org.ovirt.engine.core.common.asynctasks.AsyncTaskCreationInfo asyncTaskCreationInfo , org.ovirt.engine.core.common.action.VdcActionType parentCommand ) { org.ovirt.engine.core.common.action.VdcActionParametersBase parametersForTask = getParametersForTask ( parentCommand , getParameters ( ) ) ; org.ovirt.engine.core.common.asynctasks.AsyncTaskParameters p = new org.ovirt.engine.core.common.asynctasks.AsyncTaskParameters ( asyncTaskCreationInfo , new org.ovirt.engine.core.common.businessentities.async_tasks ( parentCommand , org.ovirt.engine.core.common.businessentities.AsyncTaskResultEnum.success , org.ovirt.engine.core.common.businessentities.AsyncTaskStatusEnum.running , asyncTaskCreationInfo.getTaskID ( ) , parametersForTask , asyncTaskCreationInfo.getStepId ( ) , getCommandId ( ) ) ) ; p.setEntityId ( getParameters ( ) . getEntityId ( ) ) ; return org.ovirt.engine.core.bll.AsyncTaskManager.getInstance ( ) . CreateTask ( getTaskType ( ) , p ) ; }

Target:
protected org.ovirt.engine.core.bll.SPMAsyncTask concreteCreateTask ( org.ovirt.engine.core.common.asynctasks.AsyncTaskCreationInfo asyncTaskCreationInfo , org.ovirt.engine.core.common.action.VdcActionType parentCommand ) { org.ovirt.engine.core.common.action.VdcActionParametersBase parametersForTask = getParametersForTask ( parentCommand , getParameters ( ) ) ; org.ovirt.engine.core.common.asynctasks.AsyncTaskParameters p = new org.ovirt.engine.core.common.asynctasks.AsyncTaskParameters ( asyncTaskCreationInfo , new org.ovirt.engine.core.common.businessentities.async_tasks ( parentCommand , org.ovirt.engine.core.common.businessentities.AsyncTaskResultEnum.success , org.ovirt.engine.core.common.businessentities.AsyncTaskStatusEnum.running , asyncTaskCreationInfo.getTaskID ( ) , parametersForTask , asyncTaskCreationInfo.getStepId ( ) , getCommandId ( ) ) ) ; p.setEntityId ( getParameters ( ) . getEntityId ( ) ) ; return org.ovirt.engine.core.bll.AsyncTaskManager.getInstance ( ) . CreateTask ( getTaskType ( ) , p ) ; }
Source:
private void Preset_SelectedItemChanged ( ) { org.ovirt.engine.core.common.businessentities.DiskImageBase preset = ( ( ( org.ovirt.engine.core.common.businessentities.DiskImageBase ) ( getPreset ( ) . getSelectedItem ( ) ) ) != null ) ? ( ( org.ovirt.engine.core.common.businessentities.DiskImageBase ) ( getPreset ( ) . getSelectedItem ( ) ) ) : ( ( org.ovirt.engine.core.common.businessentities.DiskImageBase ) ( org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.DiskImageBase > FirstOrDefault ( getPreset ( ) . getItems ( ) ) ) ) ; setVolumeFormat ( preset.getVolumeFormat ( ) ) ; getVolumeType ( ) . setSelectedItem ( preset.getVolumeType ( ) ) ; }

Target:
private void updateVolumeType ( org.ovirt.engine.core.common.businessentities.VolumeType volumeType ) { getVolumeType ( ) . setSelectedItem ( volumeType ) ; }
Source:
protected java.util.List < java.lang.String > extractVariableDeclarations ( java.lang.Iterable < java.lang.String > appendedCanDoMsgs ) { final java.util.List < java.lang.String > result = new java.util.ArrayList < > ( ) ; for ( java.lang.String appendedCanDoMsg : appendedCanDoMsgs ) { result.addAll ( java.util.Arrays.asList ( appendedCanDoMsg.split ( "(?=\\$)" ) ) ) ; } return result ; }

Target:
protected java.util.List < java.lang.String > extractVariableDeclarations ( java.lang.Iterable < java.lang.String > appendedValidateMsgs ) { final java.util.List < java.lang.String > result = new java.util.ArrayList < > ( ) ; for ( java.lang.String appendedValidateMsg : appendedValidateMsgs ) { result.addAll ( java.util.Arrays.asList ( appendedValidateMsg.split ( "(?=\\$)" ) ) ) ; } return result ; }
Source:
public void testUpdate ( ) { existingUser.setFirstName ( "changedname" ) ; existingUser.setLastName ( "changedsurname" ) ; dao.update ( existingUser ) ; org.ovirt.engine.core.common.businessentities.DbUser result = dao.get ( existingUser.getId ( ) ) ; org.junit.Assert.assertEquals ( existingUser , result ) ; }

Target:
public void testUpdate ( ) { existingUser.setFirstName ( "changedname" ) ; existingUser.setLastName ( "changedsurname" ) ; dao.update ( existingUser ) ; org.ovirt.engine.core.common.businessentities.aaa.DbUser result = dao.get ( existingUser.getId ( ) ) ; org.junit.Assert.assertEquals ( existingUser , result ) ; }
Source:
public static void getTemplateById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid templateId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmTemplate , new org.ovirt.engine.core.common.queries.GetVmTemplateParameters ( templateId ) , aQuery ) ; }

Target:
public static void getDataCenterById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStoragePoolById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) . withoutRefresh ( ) , aQuery ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc setVolumeDescription ( java.lang.String sdUUID , java.lang.String spUUID , java.lang.String imgGUID , java.lang.String volUUID , java.lang.String description ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "Volume.setDescription" ) . withParameter ( "volumeID" , volUUID ) . withParameter ( "storagepoolID" , spUUID ) . withParameter ( "storagedomainID" , sdUUID ) . withParameter ( "imageID" , imgGUID ) . withParameter ( "description" , description ) . 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 ) ; }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturn setVolumeDescription ( java.lang.String sdUUID , java.lang.String spUUID , java.lang.String imgGUID , java.lang.String volUUID , java.lang.String description ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "Volume.setDescription" ) . withParameter ( "volumeID" , volUUID ) . withParameter ( "storagepoolID" , spUUID ) . withParameter ( "storagedomainID" , sdUUID ) . withParameter ( "imageID" , imgGUID ) . withParameter ( "description" , description ) . 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.StatusOnlyReturn ( response ) ; }
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 getGlusterHook ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hookId , boolean includeServerHooks ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterHookById , new org.ovirt.engine.core.common.queries.gluster.GlusterHookQueryParameters ( hookId , includeServerHooks ) , aQuery ) ; }
Source:
public static void isSupportBridgesReportByVDSM ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String version ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Boolean ) ( source ) ) . booleanValue ( ) : true ; } } ; org.ovirt.engine.core.common.queries.GetConfigurationValueParameters tempVar = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.SupportBridgesReportByVDSM ) ; tempVar.setVersion ( version ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( tempVar , aQuery ) ; }

Target:
public static void isMTUOverrideSupported ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String version ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Boolean ) ( source ) ) . booleanValue ( ) : true ; } } ; org.ovirt.engine.core.common.queries.GetConfigurationValueParameters tempVar = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.MTUOverrideSupported ) ; tempVar.setVersion ( version ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( tempVar , aQuery ) ; }
Source:
public static void getGlusterSwiftServerServices ( 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.GlusterServerService > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetGlusterServerServicesByClusterId , new org.ovirt.engine.core.common.queries.gluster.GlusterServiceQueryParameters ( clusterId , org.ovirt.engine.core.common.businessentities.gluster.ServiceType.GLUSTER_SWIFT ) , aQuery ) ; }

Target:
public static void getRpmVersionViaPublic ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunPublicQuery ( VdcQueryType.GetConfigurationValue , new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.ProductRPMVersion , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
protected void endExecutionMonitoring ( ) { if ( ( org.ovirt.engine.core.bll.RunVmCommand.getVm ( ) . isRunAndPause ( ) ) && ( ( org.ovirt.engine.core.bll.RunVmCommand.getVmDynamicDao ( ) . get ( org.ovirt.engine.core.bll.RunVmCommand.getVmId ( ) ) . getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.Paused ) ) ) { final org.ovirt.engine.core.bll.job.ExecutionContext executionContext = org.ovirt.engine.core.bll.RunVmCommand.getExecutionContext ( ) ; executionContext.setShouldEndJob ( true ) ; org.ovirt.engine.core.bll.job.ExecutionHandler.endJob ( executionContext , true ) ; } else { super . endExecutionMonitoring ( ) ; } }

Target:
protected void endExecutionMonitoring ( ) { if ( ( org.ovirt.engine.core.bll.RunVmCommand.getVm ( ) . isRunAndPause ( ) ) && ( ( org.ovirt.engine.core.bll.RunVmCommand.getVmDynamicDao ( ) . get ( org.ovirt.engine.core.bll.RunVmCommand.getVmId ( ) ) . getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.Paused ) ) ) { final org.ovirt.engine.core.bll.job.ExecutionContext executionContext = org.ovirt.engine.core.bll.RunVmCommand.getExecutionContext ( ) ; executionContext.setShouldEndJob ( true ) ; executionHandler.endJob ( executionContext , true ) ; } else { super . endExecutionMonitoring ( ) ; } }