auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void testSaveUserWithTooManyGroups ( ) { org.ovirt.engine.core.common.businessentities.DbUser tooManyGroupsUser = new org.ovirt.engine.core.common.businessentities.DbUser ( ) ; tooManyGroupsUser.setExternalId ( new org.ovirt.engine.core.common.utils.ExternalId ( 0 ) ) ; tooManyGroupsUser.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; tooManyGroupsUser.setFirstName ( "I" ) ; tooManyGroupsUser.setLastName ( "Have" ) ; tooManyGroupsUser.setLoginName ( "too" ) ; tooManyGroupsUser.setEmail ( "many@redhat.com" ) ; tooManyGroupsUser.setDomain ( "domain" ) ; tooManyGroupsUser.setGroupNames ( "groups" ) ; tooManyGroupsUser.setGroupIds ( org.apache.commons.lang.StringUtils.leftPad ( "groups" , 2048 ) ) ; dao.save ( tooManyGroupsUser ) ; org.ovirt.engine.core.common.businessentities.DbUser result = dao.getByUsername ( tooManyGroupsUser.getLoginName ( ) ) ; org.junit.Assert.assertEquals ( tooManyGroupsUser , result ) ; }

Target:
public void testSaveUserWithTooManyGroups ( ) { org.ovirt.engine.core.common.businessentities.DbUser tooManyGroupsUser = new org.ovirt.engine.core.common.businessentities.DbUser ( ) ; tooManyGroupsUser.setExternalId ( "0" ) ; tooManyGroupsUser.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; tooManyGroupsUser.setFirstName ( "I" ) ; tooManyGroupsUser.setLastName ( "Have" ) ; tooManyGroupsUser.setLoginName ( "too" ) ; tooManyGroupsUser.setEmail ( "many@redhat.com" ) ; tooManyGroupsUser.setDomain ( "domain" ) ; tooManyGroupsUser.setGroupNames ( "groups" ) ; tooManyGroupsUser.setGroupIds ( org.apache.commons.lang.StringUtils.leftPad ( "groups" , 2048 ) ) ; dao.save ( tooManyGroupsUser ) ; org.ovirt.engine.core.common.businessentities.DbUser result = dao.getByUsername ( tooManyGroupsUser.getLoginName ( ) ) ; org.junit.Assert.assertEquals ( tooManyGroupsUser , result ) ; }
Source:
public void testBondNotUpdatedAndRemovedSimultaneouslyNotValid ( ) { org.ovirt.engine.core.common.action.HostSetupNetworksParameters params = new org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidatorTest.ParametersBuilder ( ) . addBonds ( org.ovirt.engine.core.common.action.CreateOrUpdateBond.fromBond ( bond ) ) . addRemovedBonds ( bond.getId ( ) ) . build ( ) ; org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidator validator = new org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidatorTest.HostSetupNetworksValidatorBuilder ( ) . setParams ( params ) . build ( ) ; org.ovirt.engine.core.common.errors.EngineMessage engineMessage = org.ovirt.engine.core.common.errors.EngineMessage.BONDS_UPDATED_AND_REMOVED_SIMULTANEOUSLY ; org.junit.Assert.assertThat ( validator.bondNotUpdatedAndRemovedSimultaneously ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( engineMessage , org.ovirt.engine.core.utils.ReplacementUtils.getListVariableAssignmentString ( engineMessage , java.util.Collections.singletonList ( bond.getName ( ) ) ) ) ) ; }

Target:
public void testBondNotUpdatedAndRemovedSimultaneouslyNotValid ( ) { org.ovirt.engine.core.common.action.HostSetupNetworksParameters params = new org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidatorTest.ParametersBuilder ( ) . addBonds ( org.ovirt.engine.core.common.action.CreateOrUpdateBond.fromBond ( bond ) ) . addRemovedBonds ( bond.getId ( ) ) . build ( ) ; org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidator validator = new org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidatorTest.HostSetupNetworksValidatorBuilder ( ) . setParams ( params ) . build ( ) ; org.ovirt.engine.core.common.errors.EngineMessage engineMessage = org.ovirt.engine.core.common.errors.EngineMessage.BONDS_UPDATED_AND_REMOVED_SIMULTANEOUSLY ; org.hamcrest.MatcherAssert.assertThat ( validator.bondNotUpdatedAndRemovedSimultaneously ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( engineMessage , org.ovirt.engine.core.utils.ReplacementUtils.getListVariableAssignmentString ( engineMessage , java.util.Collections.singletonList ( bond.getName ( ) ) ) ) ) ; }
Source:
protected void executeCommand ( ) { org.ovirt.engine.core.common.action.VdcReturnValueBase result = org.ovirt.engine.core.bll.network.host.UnlabelNicCommand.getBackend ( ) . runInternalAction ( VdcActionType.PersistentSetupNetworks , new RemoveNetworksByLabelParametersBuilder ( ) . buildParameters ( getNic ( ) , getLabel ( ) ) ) ; if ( ! ( result.getSucceeded ( ) ) ) { propagateFailure ( result ) ; } setSucceeded ( result.getSucceeded ( ) ) ; }

Target:
protected void executeCommand ( ) { org.ovirt.engine.core.common.action.VdcReturnValueBase result = org.ovirt.engine.core.bll.network.host.UnlabelNicCommand.getBackend ( ) . runInternalAction ( VdcActionType.PersistentSetupNetworks , new org.ovirt.engine.core.bll.network.RemoveNetworksByLabelParametersBuilder ( ) . buildParameters ( getNic ( ) , getLabel ( ) , org.ovirt.engine.core.bll.network.host.UnlabelNicCommand.getVds ( ) . getVdsGroupId ( ) ) ) ; if ( ! ( result.getSucceeded ( ) ) ) { propagateFailure ( result ) ; } setSucceeded ( result.getSucceeded ( ) ) ; }
Source:
public java.lang.String getAdUserName ( ) { if ( ( mAdUserName ) == null ) { org.ovirt.engine.core.common.businessentities.DbUser user = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getDbUserDAO ( ) . get ( getAdUserId ( ) ) ; if ( user != null ) { mAdUserName = user.getusername ( ) ; } } return mAdUserName ; }

Target:
public java.lang.String getAdUserName ( ) { if ( ( mAdUserName ) == null ) { org.ovirt.engine.core.common.businessentities.DbUser user = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getDbUserDao ( ) . get ( getAdUserId ( ) ) ; if ( user != null ) { mAdUserName = user.getusername ( ) ; } } return mAdUserName ; }
Source:
protected void handleError ( ) { addCanDoActionMessage ( VdcBllMessages.VDS_FENCE_OPERATION_FAILED ) ; addCanDoActionMessage ( VdcBllMessages.VAR__TYPE__HOST ) ; addCanDoActionMessage ( VdcBllMessages.VAR__ACTION__RESTART ) ; log.errorFormat ( "Failed to run RestartVdsCommand on vds :{0}" , org.ovirt.engine.core.bll.RestartVdsCommand.getVdsName ( ) ) ; }

Target:
private org.ovirt.engine.core.common.action.VdcReturnValueBase executeVdsFenceAction ( final org.ovirt.engine.core.compat.Guid vdsId , java.lang.String sessionId , org.ovirt.engine.core.common.businessentities.FenceActionType fenceAction , org.ovirt.engine.core.common.action.VdcActionType action ) { org.ovirt.engine.core.common.action.FenceVdsActionParameters params = new org.ovirt.engine.core.common.action.FenceVdsActionParameters ( vdsId , fenceAction ) ; params.setParentCommand ( VdcActionType.RestartVds ) ; params.setSessionId ( sessionId ) ; return org.ovirt.engine.core.bll.Backend.getInstance ( ) . runInternalAction ( action , params , getContext ( ) ) ; }
Source:
public void refuseBalloonOnPPC ( ) { org.ovirt.engine.core.bll.AddVmCommand < org.ovirt.engine.core.common.action.AddVmParameters > cmd = setupCanAddPpcTest ( ) ; cmd.getParameters ( ) . setBalloonEnabled ( true ) ; org.mockito.Mockito.when ( osRepository.isBalloonEnabled ( cmd.getParameters ( ) . getVm ( ) . getVmOsId ( ) , cmd.getVdsGroup ( ) . getCompatibilityVersion ( ) ) ) . thenReturn ( false ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( cmd , EngineMessage.BALLOON_REQUESTED_ON_NOT_SUPPORTED_ARCH ) ; }

Target:
public void refuseBalloonOnPPC ( ) { org.ovirt.engine.core.bll.AddVmCommand < org.ovirt.engine.core.common.action.AddVmParameters > cmd = setupCanAddPpcTest ( ) ; cmd.getParameters ( ) . setBalloonEnabled ( true ) ; org.mockito.Mockito.when ( osRepository.isBalloonEnabled ( cmd.getParameters ( ) . getVm ( ) . getVmOsId ( ) , cmd.getVdsGroup ( ) . getCompatibilityVersion ( ) ) ) . thenReturn ( false ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( cmd , EngineMessage.BALLOON_REQUESTED_ON_NOT_SUPPORTED_ARCH ) ; }
Source:
public void testRemoveByRemoveIsoDomain ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.RepoImage > listOfRepoFiles = dao.getRepoListForStorageDomain ( FixturesTool.SHARED_ISO_STORAGE_DOMAIN_FOR_SP2_AND_SP3 , ImageFileType.ISO ) ; org.junit.Assert.assertNotNull ( listOfRepoFiles ) ; org.junit.Assert.assertFalse ( listOfRepoFiles.isEmpty ( ) ) ; storageDomainDao.remove ( FixturesTool.SHARED_ISO_STORAGE_DOMAIN_FOR_SP2_AND_SP3 ) ; listOfRepoFiles = getActiveIsoDomain ( ) ; org.junit.Assert.assertNotNull ( listOfRepoFiles ) ; org.junit.Assert.assertTrue ( listOfRepoFiles.isEmpty ( ) ) ; }

Target:
public void testRemoveByRemoveIsoDomain ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.RepoImage > listOfRepoFiles = dao.getRepoListForStorageDomain ( FixturesTool.SHARED_ISO_STORAGE_DOMAIN_FOR_SP2_AND_SP3 , ImageFileType.ISO ) ; org.junit.jupiter.api.Assertions.assertNotNull ( listOfRepoFiles ) ; org.junit.jupiter.api.Assertions.assertFalse ( listOfRepoFiles.isEmpty ( ) ) ; storageDomainDao.remove ( FixturesTool.SHARED_ISO_STORAGE_DOMAIN_FOR_SP2_AND_SP3 ) ; listOfRepoFiles = getActiveIsoDomain ( ) ; org.junit.jupiter.api.Assertions.assertNotNull ( listOfRepoFiles ) ; org.junit.jupiter.api.Assertions.assertTrue ( listOfRepoFiles.isEmpty ( ) ) ; }
Source:
protected void initProfiles ( ) { java.util.List < org.ovirt.engine.ui.uicommonweb.models.profiles.VnicProfileModel > profiles = new java.util.LinkedList < org.ovirt.engine.ui.uicommonweb.models.profiles.VnicProfileModel > ( ) ; profiles.add ( new org.ovirt.engine.ui.uicommonweb.models.profiles.NewVnicProfileModel ( getSourceListModel ( ) , getSelectedDc ( ) . getcompatibility_version ( ) , false ) ) ; getProfiles ( ) . setItems ( profiles ) ; }

Target:
protected void initProfiles ( ) { java.util.List < org.ovirt.engine.ui.uicommonweb.models.profiles.VnicProfileModel > profiles = new java.util.LinkedList < org.ovirt.engine.ui.uicommonweb.models.profiles.VnicProfileModel > ( ) ; org.ovirt.engine.ui.uicommonweb.models.profiles.NewVnicProfileModel newModel = new org.ovirt.engine.ui.uicommonweb.models.profiles.NewVnicProfileModel ( getSourceListModel ( ) , getSelectedDc ( ) . getcompatibility_version ( ) , false , getSelectedDc ( ) . getId ( ) ) ; profiles.add ( newModel ) ; getProfiles ( ) . setItems ( profiles ) ; }
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 ) . 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 ; }

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 testGetStorageDomainWithNoStatus ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > result = dao.getStorageDomains ( FixturesTool.STORAGE_POOL_NFS_INACTIVE_ISO , StorageDomainType.ISO , null ) ; org.ovirt.engine.core.common.businessentities.StorageDomain domain = result.get ( 0 ) ; org.junit.Assert.assertEquals ( FixturesTool.STORAGE_DOMAIN_NFS_INACTIVE_ISO , domain.getId ( ) ) ; org.junit.Assert.assertEquals ( "Wrong committed disk size" , 0 , domain.getCommittedDiskSize ( ) ) ; org.junit.Assert.assertEquals ( "Wrong actual disk size" , 0 , domain.getActualImagesSize ( ) ) ; org.junit.Assert.assertEquals ( "Wrong shared status" , StorageDomainSharedStatus.Inactive , domain.getStorageDomainSharedStatus ( ) ) ; }

Target:
public void testGetStorageDomainWithNoStatus ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > result = dao.getStorageDomains ( FixturesTool.STORAGE_POOL_NFS_INACTIVE_ISO , StorageDomainType.ISO , null ) ; org.ovirt.engine.core.common.businessentities.StorageDomain domain = result.get ( 0 ) ; org.junit.jupiter.api.Assertions.assertEquals ( FixturesTool.STORAGE_DOMAIN_NFS_INACTIVE_ISO , domain.getId ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( 0 , domain.getCommittedDiskSize ( ) , "Wrong committed disk size" ) ; org.junit.jupiter.api.Assertions.assertEquals ( 0 , domain.getActualImagesSize ( ) , "Wrong actual disk size" ) ; org.junit.jupiter.api.Assertions.assertEquals ( StorageDomainSharedStatus.Inactive , domain.getStorageDomainSharedStatus ( ) , "Wrong shared status" ) ; }
Source:
public static void getTemplateDiskList ( 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 ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmTemplatesDisks , new org.ovirt.engine.core.common.queries.IdQueryParameters ( templateId ) , aQuery ) ; }

Target:
public static void isSoundcardEnabled ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { return ( ( ( java.util.List < java.lang.String > ) ( source ) ) . size ( ) ) > 0 ; } return false ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetSoundDevices , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }
Source:
public void getDataCenterList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , boolean doRefresh ) { 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.StoragePool > ( ) ; } return source ; } } ; org.ovirt.engine.core.common.queries.SearchParameters params = new org.ovirt.engine.core.common.queries.SearchParameters ( "DataCenter: sortby name" , org.ovirt.engine.core.common.interfaces.SearchType.StoragePool ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , ( doRefresh ? params : params.withoutRefresh ( ) ) , aQuery ) ; }

Target:
public void getDataCenterList ( org.ovirt.engine.ui.frontend.AsyncQuery < java.util.List < org.ovirt.engine.core.common.businessentities.StoragePool > > aQuery , boolean doRefresh ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.ListConverter < > ( ) ; org.ovirt.engine.core.common.queries.SearchParameters params = new org.ovirt.engine.core.common.queries.SearchParameters ( "DataCenter: sortby name" , org.ovirt.engine.core.common.interfaces.SearchType.StoragePool ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , ( doRefresh ? params : params.withoutRefresh ( ) ) , aQuery ) ; }
Source:
public void execute ( ) { if ( enclosingCommand.getParameters ( ) . getTaskGroupSuccess ( ) ) { org.ovirt.engine.core.common.action.VdcReturnValueBase vdcReturnValue = org.ovirt.engine.core.bll.Backend.getInstance ( ) . runInternalAction ( VdcActionType.CreateAllSnapshotsFromVm , getCreateSnapshotParameters ( ) , org.ovirt.engine.core.bll.job.ExecutionHandler.createDefaultContexForTasks ( enclosingCommand.getExecutionContext ( ) ) ) ; enclosingCommand.getReturnValue ( ) . getTaskIdList ( ) . addAll ( vdcReturnValue.getInternalTaskIdList ( ) ) ; } enclosingCommand.getReturnValue ( ) . setSucceeded ( true ) ; }

Target:
public void endSuccessfully ( ) { endCreateAllSnapshots ( ) ; for ( org.ovirt.engine.core.common.action.LiveMigrateDiskParameters parameters : enclosingCommand.getParameters ( ) . getParametersList ( ) ) { updateDestinitationImageId ( parameters ) ; org.ovirt.engine.core.bll.ImagesHandler.updateImageStatus ( parameters.getDestinationImageId ( ) , ImageStatus.LOCKED ) ; } org.ovirt.engine.core.bll.job.ExecutionHandler.endJob ( enclosingCommand.getExecutionContext ( ) , true ) ; enclosingCommand.setExecutionContext ( null ) ; }
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 < > ( ) ; java.util.Iterator < java.lang.String > iter = appendedCanDoMsgs.iterator ( ) ; while ( iter.hasNext ( ) ) { result.addAll ( java.util.Arrays.asList ( iter.next ( ) . split ( "(?=\\$)" ) ) ) ; } return result ; }

Target:
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 ; }
Source:
public void getUserMessageOfTheDayViaPublic ( 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.getInstance ( ) . runPublicQuery ( VdcQueryType.GetConfigurationValue , new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.UserMessageOfTheDay , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public void getGlusterVolumeSnapshotsForVolume ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid volumeId ) { 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.GlusterVolumeSnapshotEntity > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterVolumeSnapshotsByVolumeId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( volumeId ) , aQuery ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc heartBeat ( ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "Host.ping" ) . 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.StatusOnlyReturnForXmlRpc glusterGeoRepKeysUpdate ( java.util.List < java.lang.String > geoRepPubKeys , java.lang.String userName ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "GlusterVolume.geoRepKeysUpdate" ) . withParameter ( "geoRepPubKeys" , geoRepPubKeys ) . withOptionalParameter ( "userName" , userName ) . 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:
public void testAddIncompleteParameters ( ) { setUriInfo ( setUpBasicUriExpectations ( ) ) ; try { collection.add ( new org.ovirt.engine.api.model.Tag ( ) ) ; org.junit.Assert.fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "Tag" , "add" , "name" ) ; } }

Target:
public void testAddIncompleteParameters ( ) { setUriInfo ( setUpBasicUriExpectations ( ) ) ; try { collection.add ( new org.ovirt.engine.api.model.Tag ( ) ) ; org.junit.jupiter.api.Assertions.fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "Tag" , "add" , "name" ) ; } }
Source:
public static void getRedirectServletReportsPage ( 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.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.RedirectServletReportsPage , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public static void getPermittedStorageDomainsByStoragePoolId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId , org.ovirt.engine.core.common.businessentities.ActionGroup actionGroup ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) ; } return source ; } } ; org.ovirt.engine.core.common.queries.GetPermittedStorageDomainsByStoragePoolIdParameters params = new org.ovirt.engine.core.common.queries.GetPermittedStorageDomainsByStoragePoolIdParameters ( ) ; params.setStoragePoolId ( dataCenterId ) ; params.setActionGroup ( actionGroup ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetPermittedStorageDomainsByStoragePoolId , params , aQuery ) ; }
Source:
public void setUp ( ) throws java.lang.Exception { manager = new org.ovirt.engine.core.utils.ovf.OvfManager ( ) ; org.ovirt.engine.core.common.utils.SimpleDependecyInjector.getInstance ( ) . bind ( org.ovirt.engine.core.common.osinfo.OsRepository.class , osRepository ) ; java.util.HashMap < java.lang.Integer , java.lang.String > osIdsToNames = new java.util.HashMap < > ( ) ; org.mockito.Mockito.when ( osRepository.getUniqueOsNames ( ) ) . thenReturn ( osIdsToNames ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { manager = new org.ovirt.engine.core.utils.ovf.OvfManager ( ) ; org.ovirt.engine.core.common.utils.SimpleDependecyInjector.getInstance ( ) . bind ( org.ovirt.engine.core.common.osinfo.OsRepository.class , osRepository ) ; java.util.HashMap < java.lang.Integer , java.lang.String > osIdsToNames = new java.util.HashMap < > ( ) ; org.mockito.Mockito.when ( osRepository.getArchitectureFromOS ( org.mockito.Matchers.any ( java.lang.Integer.class ) ) ) . thenReturn ( ArchitectureType.x86_64 ) ; org.mockito.Mockito.when ( osRepository.getUniqueOsNames ( ) ) . thenReturn ( osIdsToNames ) ; }
Source:
public static void getTemplateNicList ( 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 < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ) ( source ) ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetTemplateInterfacesByTemplateId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
public void getVmNicList ( 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 < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ) ( source ) ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmInterfacesByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { org.ovirt.engine.ui.uicommonweb.models.storage.StorageListModel storageListModel = ( ( org.ovirt.engine.ui.uicommonweb.models.storage.StorageListModel ) ( result.getState ( ) ) ) ; if ( storageListModel.removeConnection ) { storageListModel.cleanConnection ( storageListModel.connection , storageListModel.hostId ) ; storageListModel.removeConnection = false ; } storageListModel.OnFinish ( storageListModel.context , false , storageListModel.storageModel ) ; }

Target:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { org.ovirt.engine.ui.uicommonweb.models.storage.StorageListModel storageListModel = ( ( org.ovirt.engine.ui.uicommonweb.models.storage.StorageListModel ) ( result.getState ( ) ) ) ; storageListModel.removeConnection = false ; storageListModel.onFinish ( storageListModel.context , true , storageListModel.storageModel ) ; }
Source:
private void removeNetwork ( ) { networkMap.remove ( getNetworkList ( ) . getSelectedItem ( ) ) ; getNetworkList ( ) . setItems ( new java.util.ArrayList < java.lang.String > ( networkMap.keySet ( ) ) ) ; getNetworkList ( ) . setSelectedItem ( org.ovirt.engine.ui.uicommonweb.Linq.firstOrDefault ( networkMap.keySet ( ) ) ) ; }

Target:
private void removeNetwork ( ) { networkMap.remove ( getNetworkList ( ) . getSelectedItem ( ) ) ; getNetworkList ( ) . setItems ( new java.util.ArrayList < java.lang.String > ( networkMap.keySet ( ) ) ) ; getNetworkList ( ) . setSelectedItem ( org.ovirt.engine.ui.uicommonweb.Linq.firstOrNull ( networkMap.keySet ( ) ) ) ; }
Source:
private void addDiskToMap ( org.ovirt.engine.core.common.businessentities.DiskImage diskImage , java.util.List < org.ovirt.engine.core.common.businessentities.VM > vmsForPluggedDisk , java.util.List < org.ovirt.engine.core.common.businessentities.VM > vmsForUnpluggedDisk ) { if ( vmsForPluggedDisk != null ) { diskImage.setPlugged ( true ) ; } else if ( vmsForUnpluggedDisk != null ) { diskImage.setPlugged ( false ) ; } diskMap.put ( diskImage.getImageId ( ) , diskImage ) ; }

Target:
private void addDiskToMap ( org.ovirt.engine.core.common.businessentities.storage.DiskImage diskImage , java.util.List < org.ovirt.engine.core.common.businessentities.VM > vmsForPluggedDisk , java.util.List < org.ovirt.engine.core.common.businessentities.VM > vmsForUnpluggedDisk ) { if ( vmsForPluggedDisk != null ) { diskImage.setPlugged ( true ) ; } else if ( vmsForUnpluggedDisk != null ) { diskImage.setPlugged ( false ) ; } diskMap.put ( diskImage.getImageId ( ) , diskImage ) ; }
Source:
protected boolean validate ( ) { if ( ! ( super . validate ( ) ) ) { return false ; } org.ovirt.engine.core.common.queries.VdcQueryReturnValue returnValue = runInternalQuery ( VdcQueryType.GetWatchdog , new org.ovirt.engine.core.common.queries.IdQueryParameters ( getParameters ( ) . getId ( ) ) ) ; java.util.Collection < org.ovirt.engine.core.common.businessentities.VmWatchdog > watchdogs = returnValue.getReturnValue ( ) ; if ( ! ( watchdogs.isEmpty ( ) ) ) { return failValidation ( EngineMessage.WATCHDOG_ALREADY_EXISTS ) ; } if ( ! ( validate ( validateWatchdog ( ) ) ) ) { return false ; } return true ; }

Target:
private java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > getVmWatchdogDevices ( ) { return getVmDeviceDao ( ) . getVmDeviceByVmIdAndType ( getParameters ( ) . getId ( ) , VmDeviceGeneralType.WATCHDOG ) ; }
Source:
public java.lang.String getButtonToolTip ( ) { if ( ( ! ( getModel ( ) . getIsCloneVmSupported ( ) ) ) && ( ( getModel ( ) . getEntity ( ) ) != null ) ) { org.ovirt.engine.core.common.queries.CommandVersionsInfo commandVersionsInfo = org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getCommandVersionsInfo ( VdcActionType.AddVmFromSnapshot ) ; java.lang.String minimalClusterVersion = ( commandVersionsInfo != null ) ? commandVersionsInfo.getClusterVersion ( ) . toString ( 2 ) : "" ; return messages.cloneVmNotSupported ( minimalClusterVersion ) ; } else { return this . getTitle ( ) ; } }

Target:
protected org.ovirt.engine.ui.uicommonweb.UICommand resolveCommand ( ) { return getModel ( ) . getUndoCommand ( ) ; }
Source:
private void initHostKdumpDetectionStatus ( ) { getDbFacade ( ) . getVdsKdumpStatusDao ( ) . remove ( getVdsId ( ) ) ; if ( ( getVds ( ) . isPmKdumpDetection ( ) ) && ( ( getVds ( ) . getKdumpStatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.KdumpStatus.ENABLED ) ) ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase base = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; base.setVds ( getVds ( ) ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.log ( base , AuditLogType.KDUMP_DETECTION_NOT_CONFIGURED_ON_VDS ) ; } }

Target:
private void initHostKdumpDetectionStatus ( ) { getDbFacade ( ) . getVdsKdumpStatusDao ( ) . remove ( getVdsId ( ) ) ; if ( ( ( getVds ( ) . isPmEnabled ( ) ) && ( getVds ( ) . isPmKdumpDetection ( ) ) ) && ( ( getVds ( ) . getKdumpStatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.KdumpStatus.ENABLED ) ) ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase base = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; base.setVds ( getVds ( ) ) ; auditLogDirector.log ( base , AuditLogType.KDUMP_DETECTION_NOT_CONFIGURED_ON_VDS ) ; } }
Source:
private void addStyles ( ) { importGlusterConfigurationEditor.addContentWidgetStyleName ( style.editorContentWidget ( ) ) ; migrateOnErrorOption_NOEditor.addContentWidgetStyleName ( style.label ( ) ) ; migrateOnErrorOption_YESEditor.addContentWidgetStyleName ( style.label ( ) ) ; migrateOnErrorOption_HA_ONLYEditor.addContentWidgetStyleName ( style.label ( ) ) ; countThreadsAsCoresEditor.setContentWidgetStyleName ( style.fullWidth ( ) ) ; enableTrustedServiceEditor.setContentWidgetStyleName ( style.fullWidth ( ) ) ; enableHaReservationEditor.setContentWidgetStyleName ( style.fullWidth ( ) ) ; enableOptionalReasonEditor.setContentWidgetStyleName ( style.fullWidth ( ) ) ; }

Target:
private void addStyles ( ) { importGlusterConfigurationEditor.addContentWidgetContainerStyleName ( style.editorContentWidget ( ) ) ; migrateOnErrorOption_NOEditor.addContentWidgetContainerStyleName ( style.label ( ) ) ; migrateOnErrorOption_YESEditor.addContentWidgetContainerStyleName ( style.label ( ) ) ; migrateOnErrorOption_HA_ONLYEditor.addContentWidgetContainerStyleName ( style.label ( ) ) ; countThreadsAsCoresEditor.setContentWidgetContainerStyleName ( style.fullWidth ( ) ) ; enableTrustedServiceEditor.setContentWidgetContainerStyleName ( style.fullWidth ( ) ) ; enableHaReservationEditor.setContentWidgetContainerStyleName ( style.fullWidth ( ) ) ; enableOptionalReasonEditor.setContentWidgetContainerStyleName ( style.fullWidth ( ) ) ; }
Source:
public void doTestBadAddFromConfigurationMissingParameters ( ) { setUriInfo ( setUpBasicUriExpectations ( ) ) ; org.ovirt.engine.api.model.Vm model = createModel ( null ) ; model.setInitialization ( new org.ovirt.engine.api.model.Initialization ( ) ) ; model.getInitialization ( ) . setConfiguration ( new org.ovirt.engine.api.model.Configuration ( ) ) ; try { collection.add ( model ) ; org.junit.Assert.fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "Vm" , "add" , "initialization.configuration.type" , "initialization.configuration.data" ) ; } }

Target:
public void doTestBadAddFromConfigurationMissingParameters ( ) { setUriInfo ( setUpBasicUriExpectations ( ) ) ; org.ovirt.engine.api.model.Vm model = createModel ( null ) ; model.setInitialization ( new org.ovirt.engine.api.model.Initialization ( ) ) ; model.getInitialization ( ) . setConfiguration ( new org.ovirt.engine.api.model.Configuration ( ) ) ; try { collection.add ( model ) ; org.junit.jupiter.api.Assertions.fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "Vm" , "add" , "initialization.configuration.type" , "initialization.configuration.data" ) ; } }
Source:
public org.ovirt.engine.ui.uicommonweb.models.quota.QuotaModel flush ( ) { quotaClusterTable.flush ( ) ; quotaStorageTable.flush ( ) ; return driver.flush ( ) ; }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { if ( ( ( java.lang.Boolean ) ( model.getSpecificStorageQuota ( ) . getEntity ( ) ) ) ) { quotaStorageTable.insertColumn ( 0 , isStorageInQuotaColumn ) ; quotaStorageTable.setColumnWidth ( isStorageInQuotaColumn , "30px" ) ; quotaStorageTable.asEditor ( ) . edit ( model.getAllDataCenterStorages ( ) ) ; } else { quotaStorageTable.removeColumn ( isStorageInQuotaColumn ) ; quotaStorageTable.asEditor ( ) . edit ( model.getQuotaStorages ( ) ) ; } }
Source:
public void getDataCenterMaxNameLength ( 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 ) ) : 1 ; } } ; getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.StoragePoolNameSizeLimit , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public void getClustersHavingHosts ( 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 ) { 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.GetAllClustersHavingHosts , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }
Source:
public java.lang.String getServerFingerprint ( java.lang.String serverName ) { java.lang.String fingerPrint = null ; try ( final org.ovirt.engine.core.bll.utils.EngineSSHClient client = getEngineSSHClient ( ) ) { client.setHost ( serverName ) ; client.connect ( ) ; fingerPrint = client.getHostFingerprint ( ) ; } catch ( java.lang.Throwable e ) { log.errorFormat ( "Could not fetch fingerprint of host {0} with message: {1}" , serverName , org.apache.commons.lang.exception.ExceptionUtils.getMessage ( e ) ) ; } return fingerPrint ; }

Target:
public java.lang.String getServerFingerprint ( java.lang.String serverName ) { java.lang.String fingerPrint = null ; try ( final org.ovirt.engine.core.bll.utils.EngineSSHClient client = getEngineSSHClient ( ) ) { client.setHost ( serverName ) ; client.connect ( ) ; fingerPrint = client.getHostFingerprint ( ) ; } catch ( java.lang.Throwable e ) { log.error ( "Could not fetch fingerprint of host '{}': {}" , serverName , e.getMessage ( ) ) ; log.debug ( "Exception" , e ) ; } return fingerPrint ; }
Source:
public static void doTar ( java.io.OutputStream os , java.io.File base ) throws java.io.IOException , java.lang.SecurityException { org.apache.commons.compress.archivers.tar.TarArchiveOutputStream archive = null ; try { archive = new org.apache.commons.compress.archivers.tar.TarArchiveOutputStream ( os ) ; org.ovirt.engine.core.utils.hostinstall.Tar._recurse ( archive , base , "./" ) ; } finally { if ( archive != null ) { try { archive.close ( ) ; } catch ( java.io.IOException e ) { org.ovirt.engine.core.utils.hostinstall.Tar.log.error ( java.lang.String.format ( "Cannot close tar stream" ) , e ) ; } } } }

Target:
public static void doTar ( java.io.OutputStream os , java.io.File base ) throws java.io.IOException , java.lang.SecurityException { org.apache.commons.compress.archivers.tar.TarArchiveOutputStream archive = null ; try { archive = new org.apache.commons.compress.archivers.tar.TarArchiveOutputStream ( os ) ; archive.setLongFileMode ( TarArchiveOutputStream.LONGFILE_GNU ) ; org.ovirt.engine.core.utils.hostinstall.Tar._recurse ( archive , base , "./" ) ; } finally { if ( archive != null ) { try { archive.close ( ) ; } catch ( java.io.IOException e ) { org.ovirt.engine.core.utils.hostinstall.Tar.log.error ( java.lang.String.format ( "Cannot close tar stream" ) , e ) ; } } } }
Source:
public void onFailure ( final java.lang.Throwable caught ) { if ( org.ovirt.engine.ui.frontend.Frontend.ignoreFailure ( caught ) ) { return ; } org.ovirt.engine.ui.frontend.Frontend.logger.log ( java.util.logging.Level.SEVERE , ( "Failed to execute sync getIsUserLoggedIn: " + caught ) , caught ) ; org.ovirt.engine.ui.frontend.Frontend.failureEventHandler ( caught ) ; callback.onFailure ( null ) ; }

Target:
public void onFailure ( final java.lang.Throwable caught ) { if ( org.ovirt.engine.ui.frontend.Frontend.ignoreFailure ( caught ) ) { return ; } org.ovirt.engine.ui.frontend.Frontend.logger.log ( java.util.logging.Level.SEVERE , ( "Failed to execute RunQuery: " + caught ) , caught ) ; org.ovirt.engine.ui.frontend.Frontend.getEventsHandler ( ) . runQueryFailed ( null ) ; org.ovirt.engine.ui.frontend.Frontend.failureEventHandler ( caught ) ; if ( callback.isHandleFailure ( ) ) { org.ovirt.engine.ui.frontend.Frontend.clearLoggedInUser ( ) ; callback.getDel ( ) . onSuccess ( callback.getModel ( ) , null ) ; } }
Source:
public void testGetPermittedStorageDomains ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > result = dao.getPermittedStorageDomainsByStoragePool ( org.ovirt.engine.core.dao.StorageDomainDaoTest.EXISTING_USER_ID , ActionGroup.CONFIGURE_VM_STORAGE , new org.ovirt.engine.core.compat.Guid ( "6d849ebf-755f-4552-ad09-9a090cda105d" ) ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; org.junit.Assert.assertEquals ( result.get ( 0 ) . getId ( ) , existingDomain.getId ( ) ) ; }

Target:
public void testGetNonePermittedStorageDomains ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > result = dao.getPermittedStorageDomainsByStoragePool ( FixturesTool.USER_EXISTING_ID , ActionGroup.CONSUME_QUOTA , FixturesTool.DATA_CENTER ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertTrue ( result.isEmpty ( ) ) ; }
Source:
protected void removeVmSnapshots ( ) { java.util.Collection < java.lang.String > memoriesOfRemovedSnapshots = new org.ovirt.engine.core.bll.snapshots.SnapshotsManager ( ) . removeSnapshots ( org.ovirt.engine.core.bll.VmCommand.getVmId ( ) ) ; for ( java.lang.String memoryVolumes : memoriesOfRemovedSnapshots ) { if ( shouldRemoveMemorySnapshotVolumes ( memoryVolumes ) ) { removeMemoryVolumes ( memoryVolumes , org.ovirt.engine.core.bll.VmCommand.getActionType ( ) , false ) ; } } }

Target:
protected java.util.Set < java.lang.String > removeVmSnapshots ( ) { return new org.ovirt.engine.core.bll.snapshots.SnapshotsManager ( ) . removeSnapshots ( org.ovirt.engine.core.bll.VmCommand.getVmId ( ) ) ; }
Source:
private void mockGetImagesList ( ) { org.ovirt.engine.core.common.vdscommands.VDSReturnValue returnValue = new org.ovirt.engine.core.common.vdscommands.VDSReturnValue ( ) ; returnValue.setReturnValue ( new java.util.ArrayList < org.ovirt.engine.core.compat.Guid > ( ) ) ; org.mockito.Mockito.when ( vdsBrokerFrontend.RunVdsCommand ( org.mockito.Matchers.eq ( VDSCommandType.GetImagesList ) , org.mockito.Matchers.< org.ovirt.engine.core.common.vdscommands.VDSParametersBase > any ( org.ovirt.engine.core.common.vdscommands.VDSParametersBase.class ) ) ) . thenReturn ( returnValue ) ; }

Target:
private void mockGetImagesList ( ) { org.ovirt.engine.core.common.vdscommands.VDSReturnValue returnValue = new org.ovirt.engine.core.common.vdscommands.VDSReturnValue ( ) ; returnValue.setReturnValue ( new java.util.ArrayList < org.ovirt.engine.core.compat.Guid > ( ) ) ; org.mockito.Mockito.when ( vdsBrokerFrontend.runVdsCommand ( org.mockito.Matchers.eq ( VDSCommandType.GetImagesList ) , org.mockito.Matchers.< org.ovirt.engine.core.common.vdscommands.VDSParametersBase > any ( org.ovirt.engine.core.common.vdscommands.VDSParametersBase.class ) ) ) . thenReturn ( returnValue ) ; }
Source:
public void isUSBEnabledByDefault ( 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.Boolean ) ( source ) ) . booleanValue ( ) : false ; } } ; getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.EnableUSBAsDefault , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public void getGlusterSnapshotConfig ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId , org.ovirt.engine.core.compat.Guid volumeId ) { aQuery.setHandleFailure ( true ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterVolumeSnapshotConfig , new org.ovirt.engine.core.common.queries.gluster.GlusterVolumeQueriesParameters ( clusterId , volumeId ) , aQuery ) ; }
Source:
public void getAllAttachableDisks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetAllAttachableDisks params = new org.ovirt.engine.core.common.queries.GetAllAttachableDisks ( storagePoolId ) ; params.setVmId ( vmId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllAttachableDisks , params , aQuery ) ; }

Target:
public void getStorageDomainDefaultWipeAfterDelete ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.businessentities.storage.StorageType storageType ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter < java.lang.Boolean > ( ) { @ java.lang.Override public java.lang.Boolean Convert ( java.lang.Object returnValue , org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery ) { return ( ( java.lang.Boolean ) ( returnValue ) ) ; } } ; org.ovirt.engine.core.common.queries.GetStorageDomainDefaultWipeAfterDeleteParameters params = new org.ovirt.engine.core.common.queries.GetStorageDomainDefaultWipeAfterDeleteParameters ( storageType ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainDefaultWipeAfterDelete , params , aQuery ) ; }
Source:
protected boolean checkSingleQxlDisplay ( ) { if ( ! ( org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . getVmStaticData ( ) . getSingleQxlPci ( ) ) ) { return true ; } return org.ovirt.engine.core.bll.VmHandler.isSingleQxlDeviceLegal ( org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . getVm ( ) . getDefaultDisplayType ( ) , org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . getVm ( ) . getOs ( ) , org.ovirt.engine.core.bll.AddVmCommand.getReturnValue ( ) . getCanDoActionMessages ( ) , org.ovirt.engine.core.bll.AddVmCommand.getVdsGroup ( ) . getcompatibility_version ( ) ) ; }

Target:
protected boolean checkSingleQxlDisplay ( ) { if ( ! ( org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . getVmStaticData ( ) . getSingleQxlPci ( ) ) ) { return true ; } return org.ovirt.engine.core.bll.VmHandler.isSingleQxlDeviceLegal ( org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . getVm ( ) . getDefaultDisplayType ( ) , org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . getVm ( ) . getOs ( ) , org.ovirt.engine.core.bll.AddVmCommand.getReturnValue ( ) . getCanDoActionMessages ( ) , org.ovirt.engine.core.bll.AddVmCommand.getVdsGroup ( ) . getCompatibilityVersion ( ) ) ; }
Source:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterListModel localModel = ( ( org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterListModel ) ( result.getState ( ) ) ) ; if ( ( ( java.lang.Boolean ) ( model.getIsImportGlusterConfiguration ( ) . getEntity ( ) ) ) ) { localModel.postOnSaveInternalWithImport ( result.getReturnValue ( ) ) ; } else { localModel.PostOnSaveInternal ( result.getReturnValue ( ) ) ; } }

Target:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterListModel localModel = ( ( org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterListModel ) ( result.getState ( ) ) ) ; if ( ( ( java.lang.Boolean ) ( model.getIsImportGlusterConfiguration ( ) . getEntity ( ) ) ) ) { localModel.postOnSaveInternalWithImport ( result.getReturnValue ( ) ) ; } else { localModel.postOnSaveInternal ( result.getReturnValue ( ) ) ; } }