auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private org.ovirt.engine.core.common.businessentities.StorageDomain prepareLocalStorageDomainForElection ( org.ovirt.engine.core.common.businessentities.StorageDomainStatus status ) { final org.ovirt.engine.core.common.businessentities.StorageDomain localDomain = createDataStorageDomain ( status , "local domain name" , LOCAL_SD_ID ) ; localDomain.setStorageType ( StorageType.LOCALFS ) ; org.mockito.Mockito.when ( storageDomainDao.getAllForStoragePool ( org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( java.util.Collections.singletonList ( localDomain ) ) ; cmd.setStoragePool ( new org.ovirt.engine.core.common.businessentities.StoragePool ( ) ) ; return localDomain ; }

Target:
private org.ovirt.engine.core.common.businessentities.StorageDomain prepareLocalStorageDomainForElection ( org.ovirt.engine.core.common.businessentities.StorageDomainStatus status ) { final org.ovirt.engine.core.common.businessentities.StorageDomain localDomain = createDataStorageDomain ( status , "local domain name" , LOCAL_SD_ID ) ; localDomain.setStorageType ( StorageType.LOCALFS ) ; org.mockito.Mockito.when ( storageDomainDao.getAllForStoragePool ( org.mockito.ArgumentMatchers.any ( ) ) ) . thenReturn ( java.util.Collections.singletonList ( localDomain ) ) ; cmd.setStoragePool ( new org.ovirt.engine.core.common.businessentities.StoragePool ( ) ) ; return localDomain ; }
Source:
protected void executeVmCommand ( ) { org.ovirt.engine.core.bll.StopVmCommandBase.getParameters ( ) . setEntityId ( org.ovirt.engine.core.bll.StopVmCommandBase.getVm ( ) . getId ( ) ) ; if ( ( ( org.ovirt.engine.core.bll.StopVmCommandBase.getVm ( ) . getstatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.Suspended ) ) || ( ! ( org.ovirt.engine.core.compat.StringHelper.isNullOrEmpty ( org.ovirt.engine.core.bll.StopVmCommandBase.getVm ( ) . gethibernation_vol_handle ( ) ) ) ) ) { setSuspendedVm ( true ) ; setSucceeded ( stopSuspendedVm ( ) ) ; } else { super . executeVmCommand ( ) ; } removeStatelessVmUnmanagedDevices ( ) ; }

Target:
protected void executeVmCommand ( ) { org.ovirt.engine.core.bll.StopVmCommandBase.getParameters ( ) . setEntityId ( org.ovirt.engine.core.bll.StopVmCommandBase.getVm ( ) . getId ( ) ) ; if ( ( ( org.ovirt.engine.core.bll.StopVmCommandBase.getVm ( ) . getstatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.Suspended ) ) || ( ! ( org.ovirt.engine.core.compat.StringHelper.isNullOrEmpty ( org.ovirt.engine.core.bll.StopVmCommandBase.getVm ( ) . gethibernation_vol_handle ( ) ) ) ) ) { setSuspendedVm ( true ) ; org.ovirt.engine.core.bll.StopVmCommandBase.setSucceeded ( stopSuspendedVm ( ) ) ; } else { super . executeVmCommand ( ) ; } removeStatelessVmUnmanagedDevices ( ) ; }
Source:
public static java.lang.Boolean getNicHotplugSupport ( java.lang.Integer osId , org.ovirt.engine.core.compat.Version version ) { org.ovirt.engine.core.common.utils.Pair < java.lang.Integer , org.ovirt.engine.core.compat.Version > pair = new org.ovirt.engine.core.common.utils.Pair < java.lang.Integer , org.ovirt.engine.core.compat.Version > ( osId , version ) ; if ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getNicHotplugSupportMap ( ) . containsKey ( pair ) ) { return org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getNicHotplugSupportMap ( ) . get ( pair ) ; } return false ; }

Target:
public java.lang.Boolean getNicHotplugSupport ( java.lang.Integer osId , org.ovirt.engine.core.compat.Version version ) { org.ovirt.engine.core.common.utils.Pair < java.lang.Integer , org.ovirt.engine.core.compat.Version > pair = new org.ovirt.engine.core.common.utils.Pair < java.lang.Integer , org.ovirt.engine.core.compat.Version > ( osId , version ) ; if ( getNicHotplugSupportMap ( ) . containsKey ( pair ) ) { return getNicHotplugSupportMap ( ) . get ( pair ) ; } return false ; }
Source:
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 ( ) ; hosts.add ( 0 , null ) ; hostNameListModel.setItems ( hosts ) ; hostNameListModel.setIsChangable ( true ) ; setEnableSearchHost ( true ) ; getProviders ( ) . 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 ( ) ; hosts.add ( 0 , null ) ; hostNameListModel.setItems ( hosts ) ; hostNameListModel.setIsChangable ( true ) ; setEnableSearchHost ( true ) ; }
Source:
public void executeCommand ( org.ovirt.engine.ui.uicommonweb.UICommand command ) { super . executeCommand ( command ) ; if ( org.ovirt.engine.core.compat.StringHelper.stringsEqual ( command.getName ( ) , "OnSave" ) ) { onSave ( ) ; } if ( org.ovirt.engine.core.compat.StringHelper.stringsEqual ( command.getName ( ) , "OnForceSave" ) ) { onForceSave ( ) ; } else if ( org.ovirt.engine.core.compat.StringHelper.stringsEqual ( command.getName ( ) , "CancelConfirm" ) ) { cancelConfirm ( ) ; } }

Target:
public void executeCommand ( org.ovirt.engine.ui.uicommonweb.UICommand command ) { super . executeCommand ( command ) ; if ( "OnSave" . equals ( command.getName ( ) ) ) { onSave ( ) ; } if ( "OnForceSave" . equals ( command.getName ( ) ) ) { onForceSave ( ) ; } else if ( "CancelConfirm" . equals ( command.getName ( ) ) ) { cancelConfirm ( ) ; } }
Source:
public void testGetNetworkDiskTypeForV42 ( ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage diskImage = new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ; org.ovirt.engine.core.common.businessentities.VM vm = new org.ovirt.engine.core.common.businessentities.VM ( ) ; vm.setClusterCompatibilityVersion ( Version.v4_2 ) ; vm.setClusterId ( org.ovirt.engine.core.vdsbroker.builder.vminfo.VmInfoBuildUtilsTest.CLUSTER_ID ) ; diskImage.setStorageTypes ( new java.util.ArrayList ( java.util.Arrays.asList ( StorageType.GLUSTERFS ) ) ) ; org.junit.Assert.assertEquals ( VdsProperties.NETWORK , underTest.getNetworkDiskType ( vm , diskImage ) . get ( ) ) ; }

Target:
public void testGetNetworkDiskTypeForV42 ( ) { org.ovirt.engine.core.common.businessentities.VM vm = new org.ovirt.engine.core.common.businessentities.VM ( ) ; vm.setClusterCompatibilityVersion ( Version.v4_2 ) ; vm.setClusterId ( org.ovirt.engine.core.vdsbroker.builder.vminfo.VmInfoBuildUtilsTest.CLUSTER_ID ) ; org.junit.Assert.assertEquals ( VdsProperties.NETWORK , underTest.getNetworkDiskType ( vm , StorageType.GLUSTERFS ) . get ( ) ) ; }
Source:
protected boolean validateSoundDevice ( ) { if ( ! ( org.ovirt.engine.core.common.utils.VmDeviceCommonUtils.isSoundDeviceExists ( org.ovirt.engine.core.bll.ImportVmCommandBase.getVm ( ) . getManagedVmDeviceMap ( ) . values ( ) ) ) ) { return true ; } if ( ! ( osRepository.isSoundDeviceEnabled ( org.ovirt.engine.core.bll.ImportVmCommandBase.getVm ( ) . getStaticData ( ) . getOsId ( ) , org.ovirt.engine.core.bll.ImportVmCommandBase.getVdsGroup ( ) . getCompatibilityVersion ( ) ) ) ) { addCanDoActionMessageVariable ( "clusterArch" , org.ovirt.engine.core.bll.ImportVmCommandBase.getVdsGroup ( ) . getArchitecture ( ) ) ; return failCanDoAction ( EngineMessage.SOUND_DEVICE_REQUESTED_ON_NOT_SUPPORTED_ARCH ) ; } return true ; }

Target:
protected boolean validateSoundDevice ( ) { if ( ! ( org.ovirt.engine.core.common.utils.VmDeviceCommonUtils.isSoundDeviceExists ( getVm ( ) . getManagedVmDeviceMap ( ) . values ( ) ) ) ) { return true ; } if ( ! ( osRepository.isSoundDeviceEnabled ( getVm ( ) . getStaticData ( ) . getOsId ( ) , org.ovirt.engine.core.bll.ImportVmCommandBase.getVdsGroup ( ) . getCompatibilityVersion ( ) ) ) ) { addCanDoActionMessageVariable ( "clusterArch" , org.ovirt.engine.core.bll.ImportVmCommandBase.getVdsGroup ( ) . getArchitecture ( ) ) ; return failCanDoAction ( EngineMessage.SOUND_DEVICE_REQUESTED_ON_NOT_SUPPORTED_ARCH ) ; } return true ; }
Source:
public void calculateNetworkImplementationDetailsNetworkMtuOutOfSync ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface = createNetworkDevice ( ) ; calculateNetworkImplementationDetailsAndAssertSync ( iface , false , iface.getNetworkName ( ) , iface.isBridged ( ) , ( ( iface.getMtu ( ) ) + 1 ) , iface.getVlanId ( ) , createQos ( ) ) ; }

Target:
public void calculateNetworkImplementationDetailsNetworkMtuOutOfSync ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface = createNetworkDevice ( ) ; calculateNetworkImplementationDetailsAndAssertSync ( iface , false , iface.isBridged ( ) , ( ( iface.getMtu ( ) ) + 1 ) , iface.getVlanId ( ) , createQos ( ) ) ; }
Source:
public void isConnWithSameDetailsExistBlockDomains ( ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections newISCSIConnection = createISCSIConnection ( "1.2.3.4" , StorageType.ISCSI , "iqn.2013-04.myhat.com:aaa-target1" , "user1" , "mypassword123" ) ; java.util.List < org.ovirt.engine.core.common.businessentities.StorageServerConnections > connections = new java.util.ArrayList < > ( ) ; org.ovirt.engine.core.common.businessentities.StorageServerConnections connection1 = createISCSIConnection ( "1.2.3.4" , StorageType.ISCSI , "iqn.2013-04.myhat.com:aaa-target1" , "user1" , "mypassword123" ) ; connections.add ( connection1 ) ; org.mockito.Mockito.when ( storageConnDao.getAllForConnection ( newISCSIConnection ) ) . thenReturn ( connections ) ; boolean isExists = command.isConnWithSameDetailsExists ( newISCSIConnection ) ; org.junit.Assert.assertTrue ( isExists ) ; }

Target:
public void isConnWithSameDetailsExistBlockDomains ( ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections newISCSIConnection = createISCSIConnection ( "1.2.3.4" , StorageType.ISCSI , "iqn.2013-04.myhat.com:aaa-target1" , "user1" , "mypassword123" ) ; java.util.List < org.ovirt.engine.core.common.businessentities.StorageServerConnections > connections = new java.util.ArrayList < > ( ) ; org.ovirt.engine.core.common.businessentities.StorageServerConnections connection1 = createISCSIConnection ( "1.2.3.4" , StorageType.ISCSI , "iqn.2013-04.myhat.com:aaa-target1" , "user1" , "mypassword123" ) ; connections.add ( connection1 ) ; org.mockito.Mockito.when ( storageConnDao.getAllForConnection ( newISCSIConnection ) ) . thenReturn ( connections ) ; boolean isExists = command.isConnWithSameDetailsExists ( newISCSIConnection , null ) ; org.junit.Assert.assertTrue ( isExists ) ; }
Source:
private java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.api.model.Disk > queryVmDisksMap ( org.ovirt.engine.api.model.Vm vm ) { java.util.List < org.ovirt.engine.api.model.Disk > vmDisks = getBackendCollection ( org.ovirt.engine.api.model.Disk.class , VdcQueryType.GetAllDisksByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( asGuid ( vm.getId ( ) ) ) ) ; return org.ovirt.engine.core.common.businessentities.Entities.businessEntitiesById ( vmDisks ) ; }

Target:
private java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.api.model.Disk > queryVmDisksMap ( org.ovirt.engine.core.compat.Guid vmId ) { java.util.List < org.ovirt.engine.api.model.Disk > vmDisks = getBackendCollection ( org.ovirt.engine.api.model.Disk.class , VdcQueryType.GetAllDisksByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) ) ; return org.ovirt.engine.core.common.businessentities.Entities.businessEntitiesById ( vmDisks ) ; }
Source:
protected org.ovirt.engine.core.authentication.DirectoryGroup getAdGroup ( ) { if ( ( ( mGroup ) == null ) && ( ! ( getGroupId ( ) . equals ( Guid.Empty ) ) ) ) { org.ovirt.engine.core.common.businessentities.DbGroup dbGroup = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getDbGroupDao ( ) . get ( getGroupId ( ) ) ; org.ovirt.engine.core.authentication.Directory directory = org.ovirt.engine.core.authentication.DirectoryManager.getInstance ( ) . getDirectory ( dbGroup.getDomain ( ) ) ; mGroup = directory.findGroup ( dbGroup.getExternalId ( ) ) ; } return mGroup ; }

Target:
protected org.ovirt.engine.core.authentication.DirectoryGroup getAdGroup ( ) { if ( ( ( mGroup ) == null ) && ( ! ( getGroupId ( ) . equals ( Guid.Empty ) ) ) ) { org.ovirt.engine.core.common.businessentities.DbGroup dbGroup = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getDbGroupDao ( ) . get ( getGroupId ( ) ) ; if ( dbGroup != null ) { org.ovirt.engine.core.authentication.Directory directory = org.ovirt.engine.core.authentication.DirectoryManager.getInstance ( ) . getDirectory ( dbGroup.getDomain ( ) ) ; mGroup = directory.findGroup ( dbGroup.getExternalId ( ) ) ; } } return mGroup ; }
Source:
public com.google.gwt.resources.client.ImageResource getValue ( T item ) { java.lang.String osTypeName = org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getOsUniqueOsNames ( ) . get ( extractor.extractOsType ( item ) ) ; com.google.gwt.resources.client.ResourcePrototype resource = org.ovirt.engine.ui.userportal.widget.table.column.VmImageColumn.getApplicationResourcesWithLookup ( ) . getResource ( ( osTypeName + "SmallImage" ) ) ; if ( ( resource == null ) || ( ! ( resource instanceof com.google.gwt.resources.client.ImageResource ) ) ) { resource = org.ovirt.engine.ui.userportal.widget.table.column.VmImageColumn.getApplicationResourcesWithLookup ( ) . otherSmallImage ( ) ; } return ( ( com.google.gwt.resources.client.ImageResource ) ( resource ) ) ; }

Target:
public com.google.gwt.resources.client.ImageResource getValue ( T item ) { java.lang.String osTypeName = org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getOsUniqueOsNames ( ) . get ( extractor.extractOsType ( item ) ) ; com.google.gwt.resources.client.ResourcePrototype resource = org.ovirt.engine.ui.userportal.widget.table.column.VmImageColumn.getApplicationResourcesWithLookup ( ) . getResource ( ( osTypeName + "SmallImage" ) ) ; if ( ! ( resource instanceof com.google.gwt.resources.client.ImageResource ) ) { resource = org.ovirt.engine.ui.userportal.widget.table.column.VmImageColumn.getApplicationResourcesWithLookup ( ) . otherSmallImage ( ) ; } return ( ( com.google.gwt.resources.client.ImageResource ) ( resource ) ) ; }
Source:
private void fillConnectionDetailsIfNeeded ( org.ovirt.engine.core.common.businessentities.StorageServerConnections connection ) { if ( ( connection.getid ( ) ) == null ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections dbConnection = org.ovirt.engine.core.bll.storage.connection.ISCSIStorageHelper.findConnectionWithSameDetails ( connection ) ; if ( dbConnection != null ) { connection.setid ( dbConnection.getid ( ) ) ; } } }

Target:
private void fillConnectionDetailsIfNeeded ( org.ovirt.engine.core.common.businessentities.StorageServerConnections connection ) { if ( ( connection.getId ( ) ) == null ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections dbConnection = org.ovirt.engine.core.bll.storage.connection.ISCSIStorageHelper.findConnectionWithSameDetails ( connection ) ; if ( dbConnection != null ) { connection.setId ( dbConnection.getId ( ) ) ; } } }
Source:
private void revertCinderDisks ( ) { for ( org.ovirt.engine.core.common.action.VdcActionParametersBase childParams : org.ovirt.engine.core.bll.storage.disk.cinder.CloneCinderDisksCommand.getParameters ( ) . getImagesParameters ( ) ) { org.ovirt.engine.core.common.action.ImagesContainterParametersBase commandParameters = ( ( org.ovirt.engine.core.common.action.ImagesContainterParametersBase ) ( childParams ) ) ; org.ovirt.engine.core.compat.Guid destinationImageId = commandParameters.getDestinationImageId ( ) ; org.ovirt.engine.core.compat.Guid storageDomainId = commandParameters.getStorageDomainId ( ) ; removeCinderDisk ( destinationImageId , storageDomainId ) ; } }

Target:
private void revertCinderDisks ( ) { for ( org.ovirt.engine.core.common.action.VdcActionParametersBase childParams : org.ovirt.engine.core.bll.storage.disk.cinder.CloneCinderDisksCommand.getParameters ( ) . getImagesParameters ( ) ) { org.ovirt.engine.core.common.action.ImagesContainterParametersBase commandParameters = ( ( org.ovirt.engine.core.common.action.ImagesContainterParametersBase ) ( childParams ) ) ; org.ovirt.engine.core.compat.Guid destinationImageId = commandParameters.getDestinationImageId ( ) ; removeCinderDisk ( destinationImageId ) ; } }
Source:
private boolean validateDiscardAfterDeleteLegal ( org.ovirt.engine.core.bll.validator.storage.StorageDomainValidator storageDomainValidator ) { if ( ! ( validate ( storageDomainValidator.isDiscardAfterDeleteSupportedByDcVersion ( org.ovirt.engine.core.bll.storage.domain.UpdateStorageDomainCommand.getStoragePool ( ) . getCompatibilityVersion ( ) ) ) ) ) { return false ; } return validate ( storageDomainValidator.isDiscardAfterDeleteLegalForExistingStorageDomain ( ) ) ; }

Target:
private boolean validateDiscardAfterDeleteLegal ( org.ovirt.engine.core.bll.validator.storage.StorageDomainValidator storageDomainValidator ) { if ( ( ( org.ovirt.engine.core.bll.storage.domain.UpdateStorageDomainCommand.getStoragePoolId ( ) ) != null ) && ( ! ( validate ( storageDomainValidator.isDiscardAfterDeleteSupportedByDcVersion ( org.ovirt.engine.core.bll.storage.domain.UpdateStorageDomainCommand.getStoragePool ( ) . getCompatibilityVersion ( ) ) ) ) ) ) { return false ; } return validate ( storageDomainValidator.isDiscardAfterDeleteLegalForExistingStorageDomain ( ) ) ; }
Source:
public static void getHostListByDataCenter ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid spId ) { 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.VDS > list = org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VDS > cast ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.IVdcQueryable > ) ( source ) ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllVdsByStoragePool , new org.ovirt.engine.core.common.queries.IdQueryParameters ( spId ) , aQuery ) ; }

Target:
public static void getHostListByDataCenter ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid spId ) { 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.VDS > list = org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VDS > cast ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.IVdcQueryable > ) ( source ) ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllVdsByStoragePool , new org.ovirt.engine.core.common.queries.IdQueryParameters ( spId ) , aQuery ) ; }
Source:
protected void performLogin ( T loginModel ) { org.ovirt.engine.core.common.businessentities.aaa.DbUser loggedUser = loginModel.getLoggedUser ( ) ; java.lang.String loginPassword = loginModel.getPassword ( ) . getEntity ( ) ; beforeLogin ( loginModel ) ; frontend.initLoggedInUser ( loggedUser , loginPassword ) ; user.onUserLogin ( loggedUser ) ; loginModel.getPassword ( ) . setEntity ( null ) ; }

Target:
protected void performLogin ( T loginModel ) { org.ovirt.engine.core.common.businessentities.aaa.DbUser loggedUser = loginModel.getLoggedUser ( ) ; java.lang.String loginPassword = loginModel.getPassword ( ) . getEntity ( ) ; beforeLogin ( loginModel ) ; frontend.initLoggedInUser ( loggedUser , loginPassword ) ; user.onUserLogin ( ) ; loginModel.getPassword ( ) . setEntity ( null ) ; }
Source:
private java.lang.String determineSpiceProxy ( ) { if ( ! ( org.apache.commons.lang.StringUtils.isNotBlank ( getCachedVm ( ) . getVmPoolSpiceProxy ( ) ) ) ) { return getCachedVm ( ) . getVmPoolSpiceProxy ( ) ; } if ( ! ( org.apache.commons.lang.StringUtils.isNotBlank ( getCachedVm ( ) . getVdsGroupSpiceProxy ( ) ) ) ) { return getCachedVm ( ) . getVdsGroupSpiceProxy ( ) ; } java.lang.String globalSpiceProxy = getConfigValue ( ConfigValues.SpiceProxyDefault ) ; if ( org.apache.commons.lang.StringUtils.isNotBlank ( globalSpiceProxy ) ) { return globalSpiceProxy ; } return null ; }

Target:
private java.lang.String determineSpiceProxy ( ) { if ( org.apache.commons.lang.StringUtils.isNotBlank ( getCachedVm ( ) . getVmPoolSpiceProxy ( ) ) ) { return getCachedVm ( ) . getVmPoolSpiceProxy ( ) ; } if ( org.apache.commons.lang.StringUtils.isNotBlank ( getCachedVm ( ) . getVdsGroupSpiceProxy ( ) ) ) { return getCachedVm ( ) . getVdsGroupSpiceProxy ( ) ; } java.lang.String globalSpiceProxy = getConfigValue ( ConfigValues.SpiceProxyDefault ) ; if ( org.apache.commons.lang.StringUtils.isNotBlank ( globalSpiceProxy ) ) { return globalSpiceProxy ; } return null ; }
Source:
public java.lang.String getProperty ( java.lang.String key ) { java.lang.String value = values.get ( key ) ; if ( value == null ) { java.lang.String message = ( "The property \"" + key ) + "\" doesn\'t have a value." ; org.ovirt.engine.core.utils.LocalConfig.log.error ( message ) ; throw new java.lang.IllegalArgumentException ( message ) ; } return values.get ( key ) ; }

Target:
public java.lang.String getProperty ( java.lang.String key ) { return getProperty ( key , false ) ; }
Source:
private void hostName_SelectedItemChanged ( ) { org.ovirt.engine.core.common.businessentities.VDS vds = ( ( org.ovirt.engine.core.common.businessentities.VDS ) ( getExternalHostName ( ) . getSelectedItem ( ) ) ) ; if ( vds == null ) { vds = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; } updateModelFromVds ( vds , null , false , null ) ; getHost ( ) . setIsChangable ( false ) ; }

Target:
private void hostName_SelectedItemChanged ( ) { org.ovirt.engine.core.common.businessentities.VDS vds = ( ( org.ovirt.engine.core.common.businessentities.VDS ) ( getExternalHostName ( ) . getSelectedItem ( ) ) ) ; if ( vds == null ) { vds = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; } updateModelFromVds ( vds , null , false , null ) ; }
Source:
protected void initSoundCard ( org.ovirt.engine.core.compat.Guid id ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.isSoundcardEnabled ( new org.ovirt.engine.ui.frontend.AsyncQuery ( getModel ( ) , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { getModel ( ) . getIsSoundcardEnabled ( ) . setEntity ( returnValue ) ; } } ) , id ) ; }

Target:
protected void initSoundCard ( org.ovirt.engine.core.compat.Guid id ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.isSoundcardEnabled ( new org.ovirt.engine.ui.frontend.AsyncQuery ( getModel ( ) , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { getModel ( ) . getIsSoundcardEnabled ( ) . setEntity ( ( ( java.lang.Boolean ) ( returnValue ) ) ) ; } } ) , id ) ; }
Source:
protected void revertToActiveSnapshot ( org.ovirt.engine.core.compat.Guid createdSnapshotId ) { getSnapshotDao ( ) . remove ( createdSnapshotId ) ; getSnapshotDao ( ) . updateId ( getSnapshotDao ( ) . getId ( org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommand.getVmId ( ) , SnapshotType.ACTIVE ) , createdSnapshotId ) ; org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommand.setSucceeded ( false ) ; }

Target:
protected void revertToActiveSnapshot ( org.ovirt.engine.core.compat.Guid createdSnapshotId ) { if ( createdSnapshotId != null ) { getSnapshotDao ( ) . remove ( createdSnapshotId ) ; getSnapshotDao ( ) . updateId ( getSnapshotDao ( ) . getId ( org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommand.getVmId ( ) , SnapshotType.ACTIVE ) , createdSnapshotId ) ; } org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommand.setSucceeded ( false ) ; }
Source:
private org.ovirt.engine.core.bll.network.macpoolmanager.MacPoolManagerStrategy createPoolWithoutLocking ( org.ovirt.engine.core.common.businessentities.MacPool macPool ) { if ( macPools.containsKey ( macPool.getId ( ) ) ) { throw new java.lang.IllegalStateException ( org.ovirt.engine.core.bll.network.macpoolmanager.MacPoolPerDc.UNABLE_TO_CREATE_MAC_POOL_IT_ALREADY_EXIST ) ; } org.ovirt.engine.core.bll.network.macpoolmanager.MacPoolManagerStrategy poolForScope = new org.ovirt.engine.core.bll.network.macpoolmanager.MacPoolManagerRanges ( macPoolToRanges ( macPool ) , macPool.isAllowDuplicateMacAddresses ( ) ) ; poolForScope.initialize ( ) ; macPools.put ( macPool.getId ( ) , poolForScope ) ; return poolForScope ; }

Target:
private org.ovirt.engine.core.bll.network.macpoolmanager.MacPoolManagerStrategy createPoolWithoutLocking ( org.ovirt.engine.core.common.businessentities.MacPool macPool ) { if ( macPools.containsKey ( macPool.getId ( ) ) ) { throw new java.lang.IllegalStateException ( org.ovirt.engine.core.bll.network.macpoolmanager.MacPoolPerDc.UNABLE_TO_CREATE_MAC_POOL_IT_ALREADY_EXIST ) ; } org.ovirt.engine.core.bll.network.macpoolmanager.MacPoolManagerStrategy poolForScope = new org.ovirt.engine.core.bll.network.macpoolmanager.MacPoolManagerRanges ( macPoolToRanges ( macPool ) , macPool.isAllowDuplicateMacAddresses ( ) ) ; macPools.put ( macPool.getId ( ) , poolForScope ) ; return poolForScope ; }
Source:
protected boolean validateVmNetwork ( ) { boolean retVal = true ; if ( ! ( org.ovirt.engine.core.bll.network.dc.NetworkCommon.getParameters ( ) . getNetwork ( ) . isVmNetwork ( ) ) ) { org.ovirt.engine.core.compat.Version version = org.ovirt.engine.core.bll.network.dc.NetworkCommon.getStoragePool ( ) . getcompatibility_version ( ) ; retVal = org.ovirt.engine.core.common.config.Config.< java.lang.Boolean > GetValue ( ConfigValues.NonVmNetworkSupported , version.getValue ( ) ) ; if ( ! retVal ) { addCanDoActionMessage ( VdcBllMessages.NON_VM_NETWORK_NOT_SUPPORTED_FOR_POOL_LEVEL ) ; } } return retVal ; }

Target:
protected boolean validateVmNetwork ( ) { boolean retVal = true ; if ( ! ( getNetwork ( ) . isVmNetwork ( ) ) ) { org.ovirt.engine.core.compat.Version version = org.ovirt.engine.core.bll.network.dc.NetworkCommon.getStoragePool ( ) . getcompatibility_version ( ) ; retVal = org.ovirt.engine.core.common.config.Config.< java.lang.Boolean > GetValue ( ConfigValues.NonVmNetworkSupported , version.getValue ( ) ) ; if ( ! retVal ) { addCanDoActionMessage ( VdcBllMessages.NON_VM_NETWORK_NOT_SUPPORTED_FOR_POOL_LEVEL ) ; } } return retVal ; }
Source:
public void clusterWithVirtGlusterServicesNotAllowed ( ) { createCommandWithVirtGlusterEnabled ( ) ; org.mockito.Mockito.when ( clusterDao.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( org.ovirt.engine.core.bll.UpdateClusterCommandTest.createClusterWithNoCpuName ( ) ) ; org.mockito.Mockito.when ( clusterDao.getByName ( org.mockito.Matchers.anyString ( ) ) ) . thenReturn ( org.ovirt.engine.core.bll.UpdateClusterCommandTest.createClusterWithNoCpuName ( ) ) ; mcr.mockConfigValue ( ConfigValues.AllowClusterWithVirtGlusterEnabled , java.lang.Boolean.FALSE ) ; mcr.mockConfigValue ( ConfigValues.GlusterSupport , org.ovirt.engine.core.bll.UpdateClusterCommandTest.VERSION_1_1 , java.lang.Boolean.TRUE ) ; cpuExists ( ) ; allQueriesForVms ( ) ; validateFailedWithReason ( EngineMessage.CLUSTER_ENABLING_BOTH_VIRT_AND_GLUSTER_SERVICES_NOT_ALLOWED ) ; }

Target:
public void clusterWithVirtGlusterServicesNotAllowed ( ) { createCommandWithVirtGlusterEnabled ( ) ; org.mockito.Mockito.when ( clusterDao.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( org.ovirt.engine.core.bll.UpdateClusterCommandTest.createClusterWithNoCpuName ( ) ) ; org.mockito.Mockito.when ( clusterDao.getByName ( org.mockito.Matchers.anyString ( ) ) ) . thenReturn ( org.ovirt.engine.core.bll.UpdateClusterCommandTest.createClusterWithNoCpuName ( ) ) ; mcr.mockConfigValue ( ConfigValues.AllowClusterWithVirtGlusterEnabled , java.lang.Boolean.FALSE ) ; cpuExists ( ) ; allQueriesForVms ( ) ; validateFailedWithReason ( EngineMessage.CLUSTER_ENABLING_BOTH_VIRT_AND_GLUSTER_SERVICES_NOT_ALLOWED ) ; }
Source:
protected void build ( org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel model , org.ovirt.engine.core.common.businessentities.VM vm ) { vm.setVmtGuid ( model.getTemplate ( ) . getSelectedItem ( ) . getId ( ) ) ; vm.setCustomProperties ( model.getCustomPropertySheet ( ) . serialize ( ) ) ; vm.setInstanceTypeId ( model.getInstanceTypes ( ) . getSelectedItem ( ) . getId ( ) ) ; }

Target:
protected void build ( org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel model , org.ovirt.engine.core.common.businessentities.VM vm ) { vm.setVmtGuid ( model.getTemplate ( ) . getSelectedItem ( ) . getId ( ) ) ; vm.setInstanceTypeId ( model.getInstanceTypes ( ) . getSelectedItem ( ) . getId ( ) ) ; }
Source:
public org.ovirt.engine.core.extensions.mgr.ExtensionProxy getExtensionByName ( java.lang.String name ) throws org.ovirt.engine.core.extensions.mgr.ConfigurationException { if ( name == null ) { throw new org.ovirt.engine.core.extensions.mgr.ConfigurationException ( java.lang.String.format ( "Extension was not specified" ) ) ; } org.ovirt.engine.core.extensions.mgr.ExtensionsManager.ExtensionEntry entry = initializedEntries.get ( name ) ; if ( entry == null ) { throw new org.ovirt.engine.core.extensions.mgr.ConfigurationException ( java.lang.String.format ( "Extension %1$s could not be found" , name ) ) ; } return entry.extension ; }

Target:
public org.ovirt.engine.core.extensions.mgr.ExtensionProxy getExtensionByName ( java.lang.String name ) throws org.ovirt.engine.core.extensions.mgr.ConfigurationException { if ( name == null ) { throw new org.ovirt.engine.core.extensions.mgr.ConfigurationException ( "Extension was not specified" ) ; } org.ovirt.engine.core.extensions.mgr.ExtensionsManager.ExtensionEntry entry = initializedEntries.get ( name ) ; if ( entry == null ) { throw new org.ovirt.engine.core.extensions.mgr.ConfigurationException ( java.lang.String.format ( "Extension %1$s could not be found" , name ) ) ; } return entry.extension ; }
Source:
public void cleanHostParametersFields ( ) { getName ( ) . setEntity ( "" ) ; getComment ( ) . setEntity ( "" ) ; getAuthSshPort ( ) . setEntity ( java.lang.Integer.parseInt ( constants.defaultHostSSHPort ( ) ) ) ; getHost ( ) . setEntity ( "" ) ; getUserPassword ( ) . setEntity ( "" ) ; getFetchSshFingerprint ( ) . setEntity ( "" ) ; }

Target:
public void cleanHostParametersFields ( ) { getName ( ) . setEntity ( "" ) ; getHost ( ) . setEntity ( "" ) ; }
Source:
public static java.util.Collection < org.ovirt.engine.core.aaa.DirectoryGroup > mapGroupRecordsToDirectoryGroups ( final java.lang.String authzName , final java.util.Collection < org.ovirt.engine.api.extensions.ExtMap > groups ) { java.util.List < org.ovirt.engine.core.aaa.DirectoryGroup > results = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.api.extensions.ExtMap group : groups ) { results.add ( org.ovirt.engine.core.bll.aaa.DirectoryUtils.mapGroupRecordToDirectoryGroup ( authzName , group ) ) ; } return results ; }

Target:
public java.util.Collection < org.ovirt.engine.core.aaa.DirectoryGroup > mapGroupRecordsToDirectoryGroups ( final java.lang.String authzName , final java.util.Collection < org.ovirt.engine.api.extensions.ExtMap > groups ) { java.util.List < org.ovirt.engine.core.aaa.DirectoryGroup > results = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.api.extensions.ExtMap group : groups ) { results.add ( mapGroupRecordToDirectoryGroup ( authzName , group ) ) ; } return results ; }
Source:
private org.ovirt.engine.core.dao.ClusterDao mockCluster ( ) { org.ovirt.engine.core.dao.ClusterDao mock = org.mockito.Mockito.mock ( org.ovirt.engine.core.dao.ClusterDao.class ) ; org.ovirt.engine.core.common.businessentities.Cluster value = new org.ovirt.engine.core.common.businessentities.Cluster ( ) ; value.setEmulatedMachine ( "pc-1.0" ) ; value.getRequiredRngSources ( ) . add ( VmRngDevice.Source.RANDOM ) ; value.setCompatibilityVersion ( Version.v3_5 ) ; org.mockito.Mockito.when ( mock.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( value ) ; return mock ; }

Target:
private org.ovirt.engine.core.dao.ClusterDao mockCluster ( ) { org.ovirt.engine.core.dao.ClusterDao mock = org.mockito.Mockito.mock ( org.ovirt.engine.core.dao.ClusterDao.class ) ; cluster = new org.ovirt.engine.core.common.businessentities.Cluster ( ) ; cluster.setEmulatedMachine ( "pc-1.0" ) ; cluster.getRequiredRngSources ( ) . add ( VmRngDevice.Source.RANDOM ) ; cluster.setCompatibilityVersion ( Version.v3_5 ) ; org.mockito.Mockito.when ( mock.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( cluster ) ; return mock ; }
Source:
protected void sendWarningForNonExportableDisks ( org.ovirt.engine.core.common.businessentities.VM entity ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getVmDiskList ( new org.ovirt.engine.ui.frontend.AsyncQuery ( getWindow ( ) , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { final org.ovirt.engine.ui.uicommonweb.models.vms.ExportVmModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.ExportVmModel ) ( target ) ) ; @ java.lang.SuppressWarnings ( value = "unchecked" ) final java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > vmDisks = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ) ( returnValue ) ) ; org.ovirt.engine.ui.uicommonweb.models.vms.VmModelHelper.sendWarningForNonExportableDisks ( model , vmDisks , VmModelHelper.WarningType.VM_EXPORT ) ; } } ) , entity.getId ( ) ) ; }

Target:
protected void sendWarningForNonExportableDisks ( org.ovirt.engine.core.common.businessentities.VM entity ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getVmDiskList ( new org.ovirt.engine.ui.frontend.AsyncQuery ( getWindow ( ) , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { final org.ovirt.engine.ui.uicommonweb.models.vms.ExportVmModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.ExportVmModel ) ( target ) ) ; @ java.lang.SuppressWarnings ( value = "unchecked" ) final java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > vmDisks = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ) ( returnValue ) ) ; org.ovirt.engine.ui.uicommonweb.models.vms.VmModelHelper.sendWarningForNonExportableDisks ( model , vmDisks , VmModelHelper.WarningType.VM_EXPORT ) ; } } ) , entity.getId ( ) ) ; }
Source:
protected boolean canDoAction ( ) { boolean returnValue = true ; if ( ( org.ovirt.engine.core.bll.ClearNonResponsiveVdsVmsCommand.getVds ( ) ) == null ) { addCanDoActionMessage ( VdcBllMessages.VDS_INVALID_SERVER_ID ) ; returnValue = false ; } else if ( ( hasVMs ( ) ) && ( ( org.ovirt.engine.core.bll.ClearNonResponsiveVdsVmsCommand.getVds ( ) . getstatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.VDSStatus.NonResponsive ) ) ) { addCanDoActionMessage ( VdcBllMessages.VDS_CANNOT_CLEAR_VMS_WRONG_STATUS ) ; returnValue = false ; } return returnValue ; }

Target:
protected boolean canDoAction ( ) { boolean returnValue = true ; if ( ( org.ovirt.engine.core.bll.ClearNonResponsiveVdsVmsCommand.getVds ( ) ) == null ) { addCanDoActionMessage ( VdcBllMessages.VDS_INVALID_SERVER_ID ) ; returnValue = false ; } else if ( ( hasVMs ( ) ) && ( ( org.ovirt.engine.core.bll.ClearNonResponsiveVdsVmsCommand.getVds ( ) . getStatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.VDSStatus.NonResponsive ) ) ) { addCanDoActionMessage ( VdcBllMessages.VDS_CANNOT_CLEAR_VMS_WRONG_STATUS ) ; returnValue = false ; } return returnValue ; }
Source:
public void setMessage ( java.lang.String message ) { super . setMessage ( message ) ; messagePanel.setVisible ( ( ( message != null ) && ( ! ( message.isEmpty ( ) ) ) ) ) ; messagePanel.clear ( ) ; messagePanel.add ( new com.google.gwt.user.client.ui.Label ( message ) ) ; }

Target:
public void setMessage ( java.lang.String message ) { super . setMessage ( message ) ; messagePanel.setVisible ( ( ( message != null ) && ( ! ( message.isEmpty ( ) ) ) ) ) ; messagePanel.clear ( ) ; if ( message != null ) { messagePanel.add ( new com.google.gwt.user.client.ui.Label ( message ) ) ; } }
Source:
public void testRemoveStorageDomainNull ( ) throws java.lang.Exception { javax.ws.rs.core.UriInfo uriInfo = setUpBasicUriExpectations ( ) ; setUriInfo ( uriInfo ) ; control.replay ( ) ; try { resource.remove ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { assertEquals ( 400 , wae.getResponse ( ) . getStatus ( ) ) ; } }

Target:
public void testRemoveStorageDomainNull ( ) throws java.lang.Exception { javax.ws.rs.core.UriInfo uriInfo = setUpBasicUriExpectations ( ) ; setUriInfo ( uriInfo ) ; try { resource.remove ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { assertEquals ( 400 , wae.getResponse ( ) . getStatus ( ) ) ; } }
Source:
public java.lang.Boolean getValue ( ) { boolean allEntriesDisabled = ! ( isEnabled ( ) ) ; for ( org.ovirt.engine.ui.uicommonweb.models.hosts.VfsConfigNetwork vfsConfigNetwork : getNetworksTableItems ( ) ) { if ( allEntriesDisabled || ( canEditAssign ( vfsConfigNetwork ) ) ) { if ( ! ( vfsConfigNetwork.isAttached ( ) ) ) { return false ; } } } return true ; }

Target:
public java.lang.Boolean getValue ( ) { boolean allEntriesDisabled = ! ( isEnabled ( ) ) ; for ( org.ovirt.engine.ui.uicommonweb.models.hosts.VfsConfigNetwork vfsConfigNetwork : getNetworksTableItems ( ) ) { if ( ( allEntriesDisabled || ( canEditAssign ( vfsConfigNetwork ) ) ) && ( ! ( vfsConfigNetwork.isAttached ( ) ) ) ) { return false ; } } return true ; }
Source:
public void getClusterWithVm ( ) { final org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase b = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.TestAuditLogableBase ( ) ; final org.ovirt.engine.core.common.businessentities.VM v = new org.ovirt.engine.core.common.businessentities.VM ( ) ; v.setClusterId ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID ) ; b.setVm ( v ) ; final org.ovirt.engine.core.common.businessentities.Cluster g = b.getCluster ( ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID , g.getId ( ) ) ; }

Target:
public void getClusterWithVm ( ) { final org.ovirt.engine.core.common.businessentities.VM v = new org.ovirt.engine.core.common.businessentities.VM ( ) ; v.setClusterId ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID ) ; b.setVm ( v ) ; final org.ovirt.engine.core.common.businessentities.Cluster g = b.getCluster ( ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID , g.getId ( ) ) ; }
Source:
public void dismissEvent ( ) { final org.ovirt.engine.core.common.businessentities.AuditLog auditLog = org.ovirt.engine.ui.uicommonweb.models.events.EventListModel.getSelectedItem ( ) ; if ( auditLog == null ) { return ; } org.ovirt.engine.core.common.action.RemoveAuditLogByIdParameters params = new org.ovirt.engine.core.common.action.RemoveAuditLogByIdParameters ( auditLog.getAuditLogId ( ) ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runAction ( VdcActionType.RemoveAuditLogById , params , new org.ovirt.engine.ui.uicompat.IFrontendActionAsyncCallback ( ) { @ java.lang.Override public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { org.ovirt.engine.ui.uicommonweb.models.events.EventListModel.this . refresh ( ) ; } } ) ; }

Target:
public void dismissEvent ( ) { dismissEvent ( org.ovirt.engine.ui.uicommonweb.models.events.EventListModel.getSelectedItem ( ) ) ; }
Source:
public void onSuccess ( java.lang.Object returnValueObj ) { java.lang.Object returnValue = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValueObj ) ) . getReturnValue ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.network.HostNicVfsConfig > allHostVfs = ( ( java.util.List < org.ovirt.engine.core.common.businessentities.network.HostNicVfsConfig > ) ( returnValue ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.HostNicVfsConfig vfsConfig : allHostVfs ) { originalVfsConfigs.add ( vfsConfig ) ; nicToVfsConfig.put ( vfsConfig.getNicId ( ) , new org.ovirt.engine.core.common.businessentities.network.HostNicVfsConfig ( vfsConfig ) ) ; } queryVfMap ( ) ; }

Target:
public void onSuccess ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue returnValueObj ) { java.lang.Object returnValue = returnValueObj.getReturnValue ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.network.HostNicVfsConfig > allHostVfs = ( ( java.util.List < org.ovirt.engine.core.common.businessentities.network.HostNicVfsConfig > ) ( returnValue ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.HostNicVfsConfig vfsConfig : allHostVfs ) { originalVfsConfigs.add ( vfsConfig ) ; nicToVfsConfig.put ( vfsConfig.getNicId ( ) , new org.ovirt.engine.core.common.businessentities.network.HostNicVfsConfig ( vfsConfig ) ) ; } queryVfMap ( ) ; }
Source:
void loadPlugin ( org.ovirt.engine.ui.webadmin.plugin.Plugin plugin ) { if ( plugin.isInState ( PluginState.DEFINED ) ) { org.ovirt.engine.ui.webadmin.plugin.PluginManager.logger.info ( ( ( "Loading plugin [" + ( plugin.getMetaData ( ) . getName ( ) ) ) + "]" ) ) ; com.google.gwt.dom.client.Document.get ( ) . getBody ( ) . appendChild ( plugin.getIFrameElement ( ) ) ; plugin.markAsLoading ( ) ; } }

Target:
void loadPlugin ( org.ovirt.engine.ui.webadmin.plugin.Plugin plugin ) { if ( plugin.isInState ( PluginState.DEFINED ) ) { org.ovirt.engine.ui.webadmin.plugin.PluginManager.logger.info ( ( ( "Loading plugin [" + ( plugin.getName ( ) ) ) + "]" ) ) ; com.google.gwt.dom.client.Document.get ( ) . getBody ( ) . appendChild ( plugin.getIFrameElement ( ) ) ; plugin.markAsLoading ( ) ; } }
Source:
public void shouldWeightNewestHostsBetterOnVmStarts ( ) { final org.ovirt.engine.core.common.businessentities.VM newVM = new org.ovirt.engine.core.common.businessentities.VM ( ) ; org.assertj.core.api.Assertions.assertThat ( filter ( newVM , tooOldHost , newEnoughHost ) ) . contains ( org.ovirt.engine.core.bll.scheduling.policyunits.InClusterUpgradeWeightPolicyUnitTest.weight ( tooOldHost , org.ovirt.engine.core.bll.scheduling.policyunits.InClusterUpgradeWeightPolicyUnit.BAD_WEIGHT ) , org.ovirt.engine.core.bll.scheduling.policyunits.InClusterUpgradeWeightPolicyUnitTest.weight ( newEnoughHost , org.ovirt.engine.core.bll.scheduling.policyunits.InClusterUpgradeWeightPolicyUnit.BEST_WEIGHT ) ) ; }

Target:
public void shouldWeightNewestHostsBetterOnVmStarts ( ) { final org.ovirt.engine.core.common.businessentities.VM newVM = new org.ovirt.engine.core.common.businessentities.VM ( ) ; org.assertj.core.api.Assertions.assertThat ( filter ( newVM , newEnoughHost , tooOldHost ) ) . contains ( org.ovirt.engine.core.bll.scheduling.policyunits.InClusterUpgradeWeightPolicyUnitTest.weight ( tooOldHost , org.ovirt.engine.core.bll.scheduling.policyunits.InClusterUpgradeWeightPolicyUnit.BAD_WEIGHT ) , org.ovirt.engine.core.bll.scheduling.policyunits.InClusterUpgradeWeightPolicyUnitTest.weight ( newEnoughHost , org.ovirt.engine.core.bll.scheduling.policyunits.InClusterUpgradeWeightPolicyUnit.BEST_WEIGHT ) ) ; }
Source:
public void getClusterName ( ) { final org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase b = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.TestAuditLogableBase ( ) ; final org.ovirt.engine.core.common.businessentities.Cluster g = new org.ovirt.engine.core.common.businessentities.Cluster ( ) ; g.setName ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.NAME ) ; b.setCluster ( g ) ; final java.lang.String n = b.getClusterName ( ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.NAME , n ) ; }

Target:
public void getClusterName ( ) { final org.ovirt.engine.core.common.businessentities.Cluster g = new org.ovirt.engine.core.common.businessentities.Cluster ( ) ; g.setName ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.NAME ) ; b.setCluster ( g ) ; final java.lang.String n = b.getClusterName ( ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.NAME , n ) ; }
Source:
public void isVirtioScsiEnabledDefaultedToTrue ( ) { cmd.getParameters ( ) . getVm ( ) . setClusterId ( cluster.getId ( ) ) ; cmd.initEffectiveCompatibilityVersion ( ) ; org.mockito.Mockito.when ( osRepository.getDiskInterfaces ( org.mockito.ArgumentMatchers.anyInt ( ) , org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.compat.Version.class ) ) ) . thenReturn ( new java.util.ArrayList < > ( java.util.Collections.singletonList ( "VirtIO_SCSI" ) ) ) ; org.junit.Assert.assertTrue ( "isVirtioScsiEnabled hasn't been defaulted to true on cluster >= 3.3." , cmd.isVirtioScsiEnabled ( ) ) ; }

Target:
public void isVirtioScsiEnabledDefaultedToTrue ( ) { cmd.getParameters ( ) . getVm ( ) . setClusterId ( cluster.getId ( ) ) ; cmd.initEffectiveCompatibilityVersion ( ) ; org.mockito.Mockito.when ( osRepository.getDiskInterfaces ( org.mockito.ArgumentMatchers.anyInt ( ) , org.mockito.ArgumentMatchers.any ( ) ) ) . thenReturn ( new java.util.ArrayList < > ( java.util.Collections.singletonList ( "VirtIO_SCSI" ) ) ) ; org.junit.Assert.assertTrue ( "isVirtioScsiEnabled hasn't been defaulted to true on cluster >= 3.3." , cmd.isVirtioScsiEnabled ( ) ) ; }
Source:
private void addScsiGenericIoOptions ( org.ovirt.engine.api.model.VersionCaps version , org.ovirt.engine.api.model.ScsiGenericIO [ ] values ) { if ( org.ovirt.engine.api.restapi.utils.VersionUtils.greaterOrEqual ( version , org.ovirt.engine.api.restapi.resource.BackendCapabilitiesResource.VERSION_3_3 ) ) { version.setSgioOptions ( new org.ovirt.engine.api.model.ScsiGenericIoOptions ( ) ) ; for ( org.ovirt.engine.api.model.ScsiGenericIO mode : values ) { version.getSgioOptions ( ) . getScsiGenericIoOptions ( ) . add ( mode.value ( ) ) ; } } }

Target:
private void addScsiGenericIoOptions ( org.ovirt.engine.api.model.VersionCaps version , org.ovirt.engine.api.model.ScsiGenericIO [ ] values ) { version.setSgioOptions ( new org.ovirt.engine.api.model.ScsiGenericIoOptions ( ) ) ; for ( org.ovirt.engine.api.model.ScsiGenericIO mode : values ) { version.getSgioOptions ( ) . getScsiGenericIoOptions ( ) . add ( mode.value ( ) ) ; } }