auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private void addCdDetails ( org.ovirt.engine.core.common.businessentities.VmDevice vmDevice , org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcStruct struct ) { struct.add ( VdsProperties.Type , vmDevice.getType ( ) ) ; struct.add ( VdsProperties.Device , vmDevice.getDevice ( ) ) ; struct.add ( VdsProperties.Index , "2" ) ; struct.add ( VdsProperties.Iface , VdsProperties.Ide ) ; struct.add ( VdsProperties.ReadOnly , java.lang.Boolean.TRUE.toString ( ) ) ; }

Target:
private static void addCdDetails ( org.ovirt.engine.core.common.businessentities.VmDevice vmDevice , org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcStruct struct ) { struct.add ( VdsProperties.Type , vmDevice.getType ( ) ) ; struct.add ( VdsProperties.Device , vmDevice.getDevice ( ) ) ; struct.add ( VdsProperties.Index , "2" ) ; struct.add ( VdsProperties.Iface , VdsProperties.Ide ) ; struct.add ( VdsProperties.ReadOnly , java.lang.Boolean.TRUE.toString ( ) ) ; struct.add ( VdsProperties.Shareable , java.lang.Boolean.FALSE.toString ( ) ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.SessionsListReturnForXmlRpc getSessionList ( ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.getSessionList ( ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.SessionsListReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.SessionsListReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc diskReplicateStart ( java.lang.String vmUUID , java.util.Map srcDisk , java.util.Map dstDisk ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.diskReplicateStart ( vmUUID , srcDisk , dstDisk ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
public static void GetDiskMaxSize ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) . intValue ( ) : 0 ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.MaxBlockDiskSize , org.ovirt.engine.core.common.config.Config.DefaultConfigurationVersion ) , aQuery ) ; }

Target:
public static 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.RunQuery ( VdcQueryType.GetVmInterfacesByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
public static 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 ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.EnableUSBAsDefault , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public static 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 ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.EnableUSBAsDefault , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
public static final org.ovirt.engine.ui.common.widget.table.column.TextColumnWithTooltip < org.ovirt.engine.core.common.businessentities.Disk > getDateCreatedColumn ( java.lang.String sortBy ) { org.ovirt.engine.ui.common.widget.table.column.TextColumnWithTooltip < org.ovirt.engine.core.common.businessentities.Disk > column = new org.ovirt.engine.ui.common.widget.table.column.FullDateTimeColumn < org.ovirt.engine.core.common.businessentities.Disk > ( ) { @ java.lang.Override protected java.util.Date getRawValue ( org.ovirt.engine.core.common.businessentities.Disk object ) { return ( object.getDiskStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.Disk.DiskStorageType.IMAGE ) ? ( ( org.ovirt.engine.core.common.businessentities.DiskImage ) ( object ) ) . getCreationDate ( ) : null ; } } ; return org.ovirt.engine.ui.common.widget.uicommon.disks.DisksViewColumns.makeSortable ( column , sortBy ) ; }

Target:
public static final org.ovirt.engine.ui.common.widget.table.column.AbstractTextColumnWithTooltip < org.ovirt.engine.core.common.businessentities.Disk > getDateCreatedColumn ( java.lang.String sortBy ) { org.ovirt.engine.ui.common.widget.table.column.AbstractTextColumnWithTooltip < org.ovirt.engine.core.common.businessentities.Disk > column = new org.ovirt.engine.ui.common.widget.table.column.AbstractFullDateTimeColumn < org.ovirt.engine.core.common.businessentities.Disk > ( ) { @ java.lang.Override protected java.util.Date getRawValue ( org.ovirt.engine.core.common.businessentities.Disk object ) { return ( object.getDiskStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.Disk.DiskStorageType.IMAGE ) ? ( ( org.ovirt.engine.core.common.businessentities.DiskImage ) ( object ) ) . getCreationDate ( ) : null ; } } ; return org.ovirt.engine.ui.common.widget.uicommon.disks.DisksViewColumns.makeSortable ( column , sortBy ) ; }
Source:
protected boolean UpdateVmImSpm ( ) { return org.ovirt.engine.core.bll.VmCommand.UpdateVmInSpm ( getVm ( ) . getstorage_pool_id ( ) , new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > ( java.util.Arrays.asList ( new org.ovirt.engine.core.common.businessentities.VM [ ] { getVm ( ) } ) ) ) ; }

Target:
protected void EndImportCommand ( ) { if ( ! ( getParameters ( ) . isImportAsNewEntity ( ) ) ) { setVm ( null ) ; } EndActionOnAllImageGroups ( ) ; if ( ( getVm ( ) ) != null ) { org.ovirt.engine.core.bll.VmHandler.UnLockVm ( getVm ( ) . getId ( ) ) ; UpdateVmImSpm ( ) ; } else { setCommandShouldBeLogged ( false ) ; org.ovirt.engine.core.bll.ImportVmCommand.log.warn ( "ImportVmCommand::EndImportCommand: Vm is null - not performing full EndAction" ) ; } setSucceeded ( true ) ; }
Source:
public void testGetStorageDomainIdWithPermissions ( ) { mockStoragePoolDAO ( new org.ovirt.engine.core.common.businessentities.StoragePool ( ) ) ; org.ovirt.engine.core.dao.StorageDomainDAO storageDomainDAOMock = org.mockito.Mockito.mock ( org.ovirt.engine.core.dao.StorageDomainDAO.class ) ; org.mockito.Mockito.when ( storageDomainDAOMock.getIsoStorageDomainIdForPool ( getQueryParameters ( ) . getStoragePoolId ( ) ) ) . thenReturn ( storageDomainId ) ; org.mockito.Mockito.when ( getQuery ( ) . getDbFacade ( ) . getStorageDomainDao ( ) ) . thenReturn ( storageDomainDAOMock ) ; org.junit.Assert.assertEquals ( "wrong storage domain id" , storageDomainId , getQuery ( ) . getStorageDomainIdForQuery ( ) ) ; }

Target:
public void testGetStorageDomainIdWithPermissions ( ) { mockStoragePoolDAO ( new org.ovirt.engine.core.common.businessentities.StoragePool ( ) ) ; org.ovirt.engine.core.dao.StorageDomainDAO storageDomainDAOMock = org.mockito.Mockito.mock ( org.ovirt.engine.core.dao.StorageDomainDAO.class ) ; org.mockito.Mockito.when ( storageDomainDAOMock.getIsoStorageDomainIdForPool ( getQueryParameters ( ) . getStoragePoolId ( ) , StorageDomainStatus.Active ) ) . thenReturn ( storageDomainId ) ; org.mockito.Mockito.when ( getQuery ( ) . getDbFacade ( ) . getStorageDomainDao ( ) ) . thenReturn ( storageDomainDAOMock ) ; org.junit.Assert.assertEquals ( "wrong storage domain id" , storageDomainId , getQuery ( ) . getStorageDomainIdForQuery ( ) ) ; }
Source:
public void mockVdsDbFacadeAndDao ( ) { vdsDao = org.mockito.Mockito.mock ( org.ovirt.engine.core.dao.VdsDao.class ) ; org.mockito.Mockito.when ( vdsDao.getAllForVdsGroupWithStatus ( CLUSTER_ID , VDSStatus.Up ) ) . thenReturn ( mockGetAllVdsForwithStatus ( VDSStatus.Up ) ) ; clusterUtils = org.mockito.Mockito.mock ( org.ovirt.engine.core.bll.utils.ClusterUtils.class ) ; org.mockito.Mockito.doReturn ( clusterUtils ) . when ( getQuery ( ) ) . getClusterUtils ( ) ; org.mockito.Mockito.when ( clusterUtils.getUpServer ( CLUSTER_ID ) ) . thenReturn ( getVds ( VDSStatus.Up ) ) ; org.mockito.Mockito.doReturn ( vdsDao ) . when ( clusterUtils ) . getVdsDao ( ) ; }

Target:
public void mockVdsDbFacadeAndDao ( ) { vdsDao = org.mockito.Mockito.mock ( org.ovirt.engine.core.dao.VdsDao.class ) ; org.mockito.Mockito.when ( vdsDao.getAllForClusterWithStatus ( CLUSTER_ID , VDSStatus.Up ) ) . thenReturn ( mockGetAllVdsForwithStatus ( VDSStatus.Up ) ) ; clusterUtils = org.mockito.Mockito.mock ( org.ovirt.engine.core.bll.utils.ClusterUtils.class ) ; org.mockito.Mockito.doReturn ( clusterUtils ) . when ( getQuery ( ) ) . getClusterUtils ( ) ; org.mockito.Mockito.when ( clusterUtils.getUpServer ( CLUSTER_ID ) ) . thenReturn ( getVds ( VDSStatus.Up ) ) ; org.mockito.Mockito.doReturn ( vdsDao ) . when ( clusterUtils ) . getVdsDao ( ) ; }
Source:
public org.ovirt.engine.sdk.entities.Response delete ( ) throws java.io.IOException , org.apache.http.client.ClientProtocolException , org.ovirt.engine.sdk.exceptions.ServerException { java.lang.String url = this . getHref ( ) ; java.util.List < org.apache.http.Header > headers = new org.ovirt.engine.sdk.utils.HttpHeaderBuilder ( ) . build ( ) ; url = new org.ovirt.engine.sdk.utils.UrlBuilder ( url ) . build ( ) ; return getProxy ( ) . delete ( url , org.ovirt.engine.sdk.entities.Response.class , headers ) ; }

Target:
public org.ovirt.engine.sdk.decorators.Cluster update ( java.lang.String correlationId ) throws java.io.IOException , org.apache.http.client.ClientProtocolException , org.ovirt.engine.sdk.exceptions.ServerException { java.lang.String url = this . getHref ( ) ; org.ovirt.engine.sdk.utils.HttpHeaderBuilder headersBuilder = new org.ovirt.engine.sdk.utils.HttpHeaderBuilder ( ) ; if ( correlationId != null ) { headersBuilder.add ( "Correlation-Id" , correlationId ) ; } java.util.List < org.apache.http.Header > headers = headersBuilder.build ( ) ; org.ovirt.engine.sdk.utils.UrlBuilder urlBuilder = new org.ovirt.engine.sdk.utils.UrlBuilder ( url ) ; url = urlBuilder.build ( ) ; return getProxy ( ) . update ( url , this , org.ovirt.engine.sdk.entities.Cluster.class , org.ovirt.engine.sdk.decorators.Cluster.class , headers ) ; }
Source:
protected org.ovirt.engine.core.bll.ValidationResult validateMemorySize ( org.ovirt.engine.core.common.businessentities.VM vm ) { final org.ovirt.engine.core.common.config.ConfigValues configKey = ( getOsRepository ( ) . get64bitOss ( ) . contains ( vm.getOs ( ) ) ) ? org.ovirt.engine.core.common.config.ConfigValues.VM64BitMaxMemorySizeInMB : org.ovirt.engine.core.common.config.ConfigValues.VM32BitMaxMemorySizeInMB ; final int maxSize = org.ovirt.engine.core.common.config.Config.getValue ( configKey , vm.getVdsGroupCompatibilityVersion ( ) . getValue ( ) ) ; if ( ( vm.getMemSizeMb ( ) ) > maxSize ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.ACTION_TYPE_FAILED_MEMORY_EXCEEDS_SUPPORTED_LIMIT ) ; } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }

Target:
protected org.ovirt.engine.core.bll.ValidationResult validateMemorySize ( org.ovirt.engine.core.common.businessentities.VM vm ) { int maxSize ; if ( getOsRepository ( ) . get64bitOss ( ) . contains ( vm.getOs ( ) ) ) { maxSize = org.ovirt.engine.core.common.config.Config.getValue ( ConfigValues.VM64BitMaxMemorySizeInMB , vm.getVdsGroupCompatibilityVersion ( ) . getValue ( ) ) ; } else { maxSize = org.ovirt.engine.core.common.config.Config.getValue ( ConfigValues.VM32BitMaxMemorySizeInMB ) ; } if ( ( vm.getMemSizeMb ( ) ) > maxSize ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.ACTION_TYPE_FAILED_MEMORY_EXCEEDS_SUPPORTED_LIMIT ) ; } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }
Source:
public void getAAAProfilesEntriesList ( 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.util.Collection < org.ovirt.engine.core.aaa.ProfileEntry > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.aaa.ProfileEntry > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAAAProfileList , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }

Target:
public void getAAANamespaces ( 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.util.HashMap < java.lang.String , java.util.List < java.lang.String > > ) ( source ) ) : new java.util.HashMap < java.lang.String , java.util.List < java.lang.String > > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAvailableNamespaces , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }
Source:
protected void endSuccessfully ( ) { if ( ! ( org.ovirt.engine.core.bll.storage.disk.cinder.RestoreAllCinderSnapshotsCommand.getParameters ( ) . isParentHasTasks ( ) ) ) { org.ovirt.engine.core.bll.storage.disk.cinder.RestoreAllCinderSnapshotsCommand.getBackend ( ) . endAction ( org.ovirt.engine.core.bll.storage.disk.cinder.RestoreAllCinderSnapshotsCommand.getParameters ( ) . getParentCommand ( ) , org.ovirt.engine.core.bll.storage.disk.cinder.RestoreAllCinderSnapshotsCommand.getParameters ( ) . getParentParameters ( ) , org.ovirt.engine.core.bll.storage.disk.cinder.RestoreAllCinderSnapshotsCommand.getContext ( ) . clone ( ) . withoutCompensationContext ( ) . withoutExecutionContext ( ) . withoutLock ( ) ) ; } }

Target:
protected void endWithFailure ( ) { removeRedundantVolumesForOrphanedDisks ( ) ; if ( ! ( org.ovirt.engine.core.bll.storage.disk.cinder.RestoreAllCinderSnapshotsCommand.getParameters ( ) . isParentHasTasks ( ) ) ) { unlockSnapshot ( org.ovirt.engine.core.bll.storage.disk.cinder.RestoreAllCinderSnapshotsCommand.getParameters ( ) . getSnapshot ( ) . getId ( ) ) ; super . endWithFailure ( ) ; } org.ovirt.engine.core.bll.storage.disk.cinder.RestoreAllCinderSnapshotsCommand.setSucceeded ( true ) ; }
Source:
public void testAlreadyExistStorageDomain ( ) { org.mockito.Mockito.when ( command.getStorageDomainStaticDAO ( ) . get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( org.ovirt.engine.core.bll.storage.AddExistingBlockStorageDomainCommandTest.getStorageDomain ( ) ) ; org.junit.Assert.assertFalse ( "Storage Domain already exists" , command.canAddDomain ( ) ) ; org.junit.Assert.assertTrue ( "Import block Storage Domain should have failed due to already existing Storage Domain" , command.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_DOMAIN_ALREADY_EXIST.toString ( ) ) ) ; }

Target:
public void testAlreadyExistStorageDomain ( ) { org.mockito.Mockito.when ( command.getStorageDomainStaticDao ( ) . get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( org.ovirt.engine.core.bll.storage.AddExistingBlockStorageDomainCommandTest.getStorageDomain ( ) ) ; org.junit.Assert.assertFalse ( "Storage Domain already exists" , command.canAddDomain ( ) ) ; org.junit.Assert.assertTrue ( "Import block Storage Domain should have failed due to already existing Storage Domain" , command.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_DOMAIN_ALREADY_EXIST.toString ( ) ) ) ; }
Source:
public void getRoleActionGroupsByRoleId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid roleId ) { 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.ActionGroup > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ActionGroup > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetRoleActionGroupsByRoleId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( roleId ) , aQuery ) ; }

Target:
public void isVmNameUnique ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String name , org.ovirt.engine.core.compat.Guid datacenterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return ( source != null ) && ( ! ( ( java.lang.Boolean ) ( source ) ) ) ; } } ; org.ovirt.engine.core.common.queries.NameQueryParameters params = new org.ovirt.engine.core.common.queries.NameQueryParameters ( name ) ; params.setDatacenterId ( datacenterId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.IsVmWithSameNameExist , params , aQuery ) ; }
Source:
protected void executeCommand ( ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getAuditLogDao ( ) . remove ( org.ovirt.engine.core.bll.RemoveAuditLogByIdCommand.getParameters ( ) . getAuditLogId ( ) ) ; org.ovirt.engine.core.bll.RemoveAuditLogByIdCommand.setSucceeded ( true ) ; }

Target:
protected void executeCommand ( ) { org.ovirt.engine.core.common.businessentities.AuditLog auditLog = org.ovirt.engine.core.bll.RemoveAuditLogByIdCommand.getAuditLogDao ( ) . get ( org.ovirt.engine.core.bll.RemoveAuditLogByIdCommand.getParameters ( ) . getAuditLogId ( ) ) ; org.ovirt.engine.core.bll.RemoveAuditLogByIdCommand.getAuditLogDao ( ) . remove ( org.ovirt.engine.core.bll.RemoveAuditLogByIdCommand.getParameters ( ) . getAuditLogId ( ) ) ; setAuditLogDetails ( auditLog ) ; evict ( auditLogDirector.composeSystemObjectId ( this , auditLog.getLogType ( ) ) ) ; org.ovirt.engine.core.bll.RemoveAuditLogByIdCommand.setSucceeded ( true ) ; }
Source:
public void getDefaultSpmPriority ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) . intValue ( ) : 0 ; } } ; aQuery.asyncCallback.onSuccess ( aQuery.getModel ( ) , 5 ) ; }

Target:
public void getNetworkList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.Network > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.Network > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllNetworks , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) , aQuery ) ; }
Source:
public org.ovirt.engine.core.common.AuditLogType getAuditLogTypeValue ( ) { switch ( org.ovirt.engine.core.bll.RemoveDiskCommand.getActionState ( ) ) { case EXECUTE : return org.ovirt.engine.core.bll.RemoveDiskCommand.getSucceeded ( ) ? org.ovirt.engine.core.common.AuditLogType.USER_REMOVE_DISK : org.ovirt.engine.core.common.AuditLogType.USER_FAILED_REMOVE_DISK ; case END_SUCCESS : return org.ovirt.engine.core.common.AuditLogType.USER_FINISHED_REMOVE_DISK ; default : return org.ovirt.engine.core.common.AuditLogType.USER_FINISHED_FAILED_REMOVE_DISK ; } }

Target:
public org.ovirt.engine.core.common.AuditLogType getAuditLogTypeValue ( ) { switch ( org.ovirt.engine.core.bll.RemoveDiskCommand.getActionState ( ) ) { case EXECUTE : if ( ( getDisk ( ) . getDiskStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.Disk.DiskStorageType.IMAGE ) ) { return org.ovirt.engine.core.bll.RemoveDiskCommand.getSucceeded ( ) ? org.ovirt.engine.core.common.AuditLogType.USER_REMOVE_DISK : org.ovirt.engine.core.common.AuditLogType.USER_FAILED_REMOVE_DISK ; } else { return org.ovirt.engine.core.bll.RemoveDiskCommand.getSucceeded ( ) ? org.ovirt.engine.core.common.AuditLogType.USER_FINISHED_REMOVE_DISK : org.ovirt.engine.core.common.AuditLogType.USER_FINISHED_FAILED_REMOVE_DISK ; } case END_SUCCESS : return org.ovirt.engine.core.common.AuditLogType.USER_FINISHED_REMOVE_DISK ; default : return org.ovirt.engine.core.common.AuditLogType.USER_FINISHED_FAILED_REMOVE_DISK ; } }
Source:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { org.ovirt.engine.core.common.action.VmManagementParametersBase param = new org.ovirt.engine.core.common.action.VmManagementParametersBase ( gettempVm ( ) ) ; param.setSoundDeviceEnabled ( ( ( java.lang.Boolean ) ( model.getIsSoundcardEnabled ( ) . getEntity ( ) ) ) ) ; param.setConsoleEnabled ( ( ( java.lang.Boolean ) ( model.getIsConsoleDeviceEnabled ( ) . getEntity ( ) ) ) ) ; org.ovirt.engine.ui.frontend.Frontend.RunAction ( VdcActionType.UpdateVm , param , new org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModelNetworkAsyncCallbacks.NetworkUpdateFrontendAsyncCallback ( model , defaultNetworkCreatingManager , gettempVm ( ) . getId ( ) ) , this ) ; }

Target:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendMultipleQueryAsyncResult result ) { java.util.List < org.ovirt.engine.core.common.businessentities.VM > poolRepresentants = new java.util.LinkedList < org.ovirt.engine.core.common.businessentities.VM > ( ) ; java.util.List < org.ovirt.engine.core.common.queries.VdcQueryReturnValue > poolRepresentantsRetval = result.getReturnValues ( ) ; for ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue poolRepresentant : poolRepresentantsRetval ) { poolRepresentants.add ( ( ( org.ovirt.engine.core.common.businessentities.VM ) ( poolRepresentant.getReturnValue ( ) ) ) ) ; } consoleModelsCache.updatePoolCache ( poolRepresentants ) ; finishSearch ( all ) ; }
Source:
public void performPendingOperations ( ) { java.util.Queue < java.util.concurrent.Future < ? > > operations = pendingOperations ; pendingOperations = new java.util.concurrent.ConcurrentLinkedQueue < > ( ) ; operations.forEach ( ( task ) -> ( ( java.util.concurrent.FutureTask < ? > ) ( task ) ) . run ( ) ) ; }

Target:
public void performPendingOperations ( ) { while ( ! ( pendingOperations.isEmpty ( ) ) ) { ( ( java.util.concurrent.FutureTask ) ( pendingOperations.poll ( ) ) ) . run ( ) ; } }
Source:
static void checkSeverities ( ) { org.ovirt.engine.core.common.AuditLogType [ ] values = org.ovirt.engine.core.common.AuditLogType.values ( ) ; if ( ( values.length ) != ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.mSeverities.size ( ) ) ) { for ( org.ovirt.engine.core.common.AuditLogType value : values ) { if ( ! ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.mSeverities.containsKey ( value ) ) ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.log.warnFormat ( "AuditLogType: {0} not have severity. Assumed Normal" , value.toString ( ) ) ; } } } }

Target:
private static void checkMessages ( ) { org.ovirt.engine.core.common.AuditLogType [ ] values = org.ovirt.engine.core.common.AuditLogType.values ( ) ; if ( ( values.length ) != ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.messages.size ( ) ) ) { for ( org.ovirt.engine.core.common.AuditLogType value : values ) { if ( ! ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.messages.containsKey ( value ) ) ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.log.infoFormat ( "AuditLogType: {0} not exist in string table" , value.toString ( ) ) ; } } } }
Source:
public static void GetRpmVersionViaPublic ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunPublicQuery ( VdcQueryType.GetConfigurationValue , new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.ProductRPMVersion , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public static void getGlusterHookContent ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hookId , org.ovirt.engine.core.compat.Guid serverId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : "" ; } } ; org.ovirt.engine.core.common.queries.gluster.GlusterHookContentQueryParameters parameters = new org.ovirt.engine.core.common.queries.gluster.GlusterHookContentQueryParameters ( hookId ) ; parameters.setGlusterServerId ( serverId ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetGlusterHookContent , parameters , aQuery ) ; }
Source:
public void testRemove ( ) throws java.lang.Exception { setUpGetEntityExpectations ( ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.RemoveVds , org.ovirt.engine.core.common.action.VdsActionParameters.class , new java.lang.String [ ] { "VdsId" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , true , true ) ) ; verifyRemove ( collection.remove ( GUIDS [ 0 ] . toString ( ) ) ) ; }

Target:
public void testRemove ( ) throws java.lang.Exception { setUpGetEntityExpectations ( ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.RemoveVds , org.ovirt.engine.core.common.action.RemoveVdsParameters.class , new java.lang.String [ ] { "VdsId" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , true , true ) ) ; verifyRemove ( collection.remove ( GUIDS [ 0 ] . toString ( ) ) ) ; }
Source:
public static java.lang.String format ( java.lang.String pattern , java.lang.Object ... args ) { java.lang.String message = new org.ovirt.engine.core.compat.FormatterJava ( ) . format ( pattern , args ) . toString ( ) ; org.ovirt.engine.core.compat.StringFormat.log.debug ( "Formatting Java pattern: '{}' With result: {}" , pattern , message ) ; return message ; }

Target:
public static java.lang.String format ( java.lang.String pattern , java.lang.Object ... args ) { java.lang.String message = new org.ovirt.engine.core.compat.FormatterJava ( ) . format ( pattern , args ) . toString ( ) ; org.ovirt.engine.core.compat.StringFormat.log.fine ( ( ( ( "Formatting Java pattern: '" + pattern ) + "' with result: " ) + message ) ) ; return message ; }
Source:
public void getGlusterSwiftServices ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid serverId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterServerService > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterServerServicesByServerId , new org.ovirt.engine.core.common.queries.gluster.GlusterServiceQueryParameters ( serverId , org.ovirt.engine.core.common.businessentities.gluster.ServiceType.GLUSTER_SWIFT ) , aQuery ) ; }

Target:
public void getGlusterBricksForServer ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid serverId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterVolumeBricksByServerId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( serverId ) , aQuery ) ; }
Source:
protected boolean checkCpuSockets ( ) { return org.ovirt.engine.core.bll.AddVmCommand.checkCpuSockets ( org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . getVmStaticData ( ) . getNumOfSockets ( ) , org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . getVmStaticData ( ) . getCpuPerSocket ( ) , org.ovirt.engine.core.bll.AddVmCommand.getVdsGroup ( ) . getCompatibilityVersion ( ) . toString ( ) , org.ovirt.engine.core.bll.AddVmCommand.getReturnValue ( ) . getCanDoActionMessages ( ) ) ; }

Target:
protected boolean checkCpuSockets ( ) { return org.ovirt.engine.core.bll.AddVmCommand.checkCpuSockets ( org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . getVmStaticData ( ) . getNumOfSockets ( ) , org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . getVmStaticData ( ) . getCpuPerSocket ( ) , org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . getVmStaticData ( ) . getThreadsPerCpu ( ) , org.ovirt.engine.core.bll.AddVmCommand.getEffectiveCompatibilityVersion ( ) . toString ( ) , org.ovirt.engine.core.bll.AddVmCommand.getReturnValue ( ) . getCanDoActionMessages ( ) ) ; }
Source:
protected boolean validateSpaceRequirements ( org.ovirt.engine.core.common.businessentities.DiskImage diskImage ) { org.ovirt.engine.core.bll.validator.storage.StorageDomainValidator sdValidator = createStorageDomainValidator ( ) ; return ( ( validate ( sdValidator.isDomainExistAndActive ( ) ) ) && ( validate ( sdValidator.isDomainWithinThresholds ( ) ) ) ) && ( validate ( sdValidator.hasSpaceForClonedDisk ( diskImage ) ) ) ; }

Target:
protected boolean validateSpaceRequirements ( org.ovirt.engine.core.common.businessentities.DiskImage diskImage ) { diskImage.getSnapshots ( ) . add ( diskImage ) ; org.ovirt.engine.core.bll.validator.storage.StorageDomainValidator sdValidator = createStorageDomainValidator ( ) ; boolean result = ( ( validate ( sdValidator.isDomainExistAndActive ( ) ) ) && ( validate ( sdValidator.isDomainWithinThresholds ( ) ) ) ) && ( validate ( sdValidator.hasSpaceForClonedDisk ( diskImage ) ) ) ; diskImage.getSnapshots ( ) . remove ( diskImage ) ; return result ; }
Source:
public void testGetClustersByServiceAndCompatibilityVersion ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VDSGroup > vdsGroups = ( ( org.ovirt.engine.core.dao.VdsGroupDaoImpl ) ( dao ) ) . getClustersByServiceAndCompatibilityVersion ( true , false , "2.3" ) ; org.junit.Assert.assertNotNull ( vdsGroups ) ; org.junit.Assert.assertEquals ( 1 , vdsGroups.size ( ) ) ; org.junit.Assert.assertEquals ( FixturesTool.GLUSTER_CLUSTER_ID , vdsGroups.get ( 0 ) . getId ( ) ) ; }

Target:
public void testGetClustersByServiceAndCompatibilityVersion ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.Cluster > clusters = ( ( org.ovirt.engine.core.dao.ClusterDaoImpl ) ( dao ) ) . getClustersByServiceAndCompatibilityVersion ( true , false , "2.3" ) ; org.junit.Assert.assertNotNull ( clusters ) ; org.junit.Assert.assertEquals ( 1 , clusters.size ( ) ) ; org.junit.Assert.assertEquals ( FixturesTool.GLUSTER_CLUSTER_ID , clusters.get ( 0 ) . getId ( ) ) ; }
Source:
public void testSubResourceLocatorBadGuid ( ) { try { collection.getNicResource ( "foo" ) ; org.junit.jupiter.api.Assertions.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }

Target:
public void testAddIncompleteParameters ( ) { org.ovirt.engine.api.model.Nic model = new org.ovirt.engine.api.model.Nic ( ) ; model.setName ( null ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; verifyIncompleteException ( org.junit.jupiter.api.Assertions.assertThrows ( javax.ws.rs.WebApplicationException.class , ( ) -> org.ovirt.engine.api.restapi.resource.collection.add ( model ) ) , "Nic" , "add" , "name" ) ; }
Source:
public void getDataCentersByStorageDomain ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storageDomainId ) { 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.StoragePool > ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStoragePoolsByStorageDomainId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( storageDomainId ) , aQuery ) ; }

Target:
public void getRoleActionGroupsByRoleId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid roleId ) { 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.ActionGroup > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ActionGroup > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetRoleActionGroupsByRoleId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( roleId ) , aQuery ) ; }
Source:
protected org.ovirt.engine.api.restapi.resource.BackendDeviceResource < org.ovirt.engine.api.model.WatchDog , org.ovirt.engine.api.model.WatchDogs , org.ovirt.engine.core.common.businessentities.VmWatchdog > getNotFoundResource ( ) { org.ovirt.engine.api.restapi.resource.BackendDeviceResource < org.ovirt.engine.api.model.WatchDog , org.ovirt.engine.api.model.WatchDogs , org.ovirt.engine.core.common.businessentities.VmWatchdog > ret = getResource ( GUIDS [ 2 ] ) ; ret.setUriInfo ( setUpBasicUriExpectations ( ) ) ; initResource ( ret ) ; initResource ( ret.getCollection ( ) ) ; return ret ; }

Target:
public void testUpdate ( ) throws java.lang.Exception { setUpEntityQueryExpectations ( 2 ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.UpdateWatchdog , org.ovirt.engine.core.common.action.WatchdogParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendWatchdogResourceTest.VM_ID } , true , true ) ) ; org.ovirt.engine.api.model.WatchDog wd = resource.update ( getUpdate ( ) ) ; assertTrue ( wd.isSetAction ( ) ) ; }
Source:
protected java.util.Map < java.lang.String , org.ovirt.engine.core.common.utils.Pair < java.lang.String , java.lang.String > > getExclusiveLocks ( ) { org.ovirt.engine.core.common.businessentities.VDSGroup cluster = org.ovirt.engine.core.bll.AddVdsCommand.getVdsGroup ( ) ; if ( ( ( cluster != null ) && ( cluster.supportsGlusterService ( ) ) ) && ( ! ( org.ovirt.engine.core.bll.AddVdsCommand.isInternalExecution ( ) ) ) ) { return java.util.Collections.singletonMap ( cluster.getId ( ) . toString ( ) , LockMessagesMatchUtil.GLUSTER ) ; } return null ; }

Target:
protected java.util.Map < java.lang.String , org.ovirt.engine.core.common.utils.Pair < java.lang.String , java.lang.String > > getExclusiveLocks ( ) { org.ovirt.engine.core.common.businessentities.VDSGroup cluster = org.ovirt.engine.core.bll.AddVdsCommand.getVdsGroup ( ) ; if ( ( ( cluster != null ) && ( cluster.supportsGlusterService ( ) ) ) && ( ! ( org.ovirt.engine.core.bll.AddVdsCommand.isInternalExecution ( ) ) ) ) { return java.util.Collections.singletonMap ( cluster.getId ( ) . toString ( ) , org.ovirt.engine.core.bll.LockMessagesMatchUtil.makeLockingPair ( LockingGroup.GLUSTER , VdcBllMessages.ACTION_TYPE_FAILED_OBJECT_LOCKED ) ) ; } return null ; }
Source:
public org.ovirt.engine.core.bll.CommandBase < ? > createWrappedCommand ( org.ovirt.engine.core.bll.context.CommandContext commandContext , org.ovirt.engine.core.common.action.VdcActionType actionType , org.ovirt.engine.core.common.action.VdcActionParametersBase parameter , boolean isInternal ) { return isInternal ? org.ovirt.engine.core.bll.CommandsFactory.createCommand ( actionType , parameter , ( commandContext != null ? commandContext.clone ( ) . withoutCompensationContext ( ) : null ) ) : org.ovirt.engine.core.bll.CommandsFactory.createCommand ( actionType , parameter ) ; }

Target:
public org.ovirt.engine.core.bll.CommandBase < ? > createWrappedCommand ( org.ovirt.engine.core.bll.context.CommandContext commandContext , org.ovirt.engine.core.common.action.VdcActionType actionType , org.ovirt.engine.core.common.action.VdcActionParametersBase parameter , boolean isInternal ) { org.ovirt.engine.core.bll.CommandBase < ? > command = ( isInternal ) ? org.ovirt.engine.core.bll.CommandsFactory.createCommand ( actionType , parameter , ( commandContext != null ? commandContext.clone ( ) . withoutCompensationContext ( ) : null ) ) : org.ovirt.engine.core.bll.CommandsFactory.createCommand ( actionType , parameter ) ; command.setInternalExecution ( isInternal ) ; return command ; }
Source:
protected void ExecuteVdsBrokerCommand ( ) { status = org.ovirt.engine.core.vdsbroker.gluster.ResetGlusterVolumeOptionsVDSCommand.getBroker ( ) . glusterVolumeReset ( org.ovirt.engine.core.vdsbroker.gluster.ResetGlusterVolumeOptionsVDSCommand.getParameters ( ) . getVolumeName ( ) , ( ( org.ovirt.engine.core.vdsbroker.gluster.ResetGlusterVolumeOptionsVDSCommand.getParameters ( ) . getVolumeOption ( ) ) == null ? "" : org.ovirt.engine.core.vdsbroker.gluster.ResetGlusterVolumeOptionsVDSCommand.getParameters ( ) . getVolumeOption ( ) ) , org.ovirt.engine.core.vdsbroker.gluster.ResetGlusterVolumeOptionsVDSCommand.getParameters ( ) . isforceAction ( ) ) ; org.ovirt.engine.core.vdsbroker.gluster.ResetGlusterVolumeOptionsVDSCommand.ProceedProxyReturnValue ( ) ; }

Target:
protected void ExecuteVdsBrokerCommand ( ) { status = org.ovirt.engine.core.vdsbroker.gluster.ResetGlusterVolumeOptionsVDSCommand.getBroker ( ) . glusterVolumeReset ( org.ovirt.engine.core.vdsbroker.gluster.ResetGlusterVolumeOptionsVDSCommand.getParameters ( ) . getVolumeName ( ) , ( ( org.ovirt.engine.core.vdsbroker.gluster.ResetGlusterVolumeOptionsVDSCommand.getParameters ( ) . getVolumeOption ( ) ) == null ? "" : org.ovirt.engine.core.vdsbroker.gluster.ResetGlusterVolumeOptionsVDSCommand.getParameters ( ) . getVolumeOption ( ) . getKey ( ) ) , org.ovirt.engine.core.vdsbroker.gluster.ResetGlusterVolumeOptionsVDSCommand.getParameters ( ) . isforceAction ( ) ) ; org.ovirt.engine.core.vdsbroker.gluster.ResetGlusterVolumeOptionsVDSCommand.ProceedProxyReturnValue ( ) ; }
Source:
public void canDoActionShareableDiskVolumeFormatSucceeds ( ) { org.ovirt.engine.core.common.businessentities.DiskImage image = org.ovirt.engine.core.bll.AddDiskToVmCommandTest.createShareableDiskImage ( ) ; image.setvolumeFormat ( VolumeFormat.RAW ) ; org.ovirt.engine.core.common.action.AddDiskParameters parameters = org.ovirt.engine.core.bll.AddDiskToVmCommandTest.createParameters ( ) ; parameters.setDiskInfo ( image ) ; org.ovirt.engine.core.compat.Guid storageId = org.ovirt.engine.core.compat.Guid.NewGuid ( ) ; initializeCommand ( storageId , parameters ) ; mockVm ( ) ; mockStorageDomain ( storageId , Version.v3_1 ) ; mockStoragePoolIsoMap ( ) ; runAndAssertCanDoActionSuccess ( ) ; }

Target:
public void canDoActionShareableDiskVolumeFormatSucceeds ( ) { org.ovirt.engine.core.common.businessentities.DiskImage image = org.ovirt.engine.core.bll.AddDiskToVmCommandTest.createShareableDiskImage ( ) ; image.setvolumeFormat ( VolumeFormat.RAW ) ; org.ovirt.engine.core.common.action.AddDiskParameters parameters = org.ovirt.engine.core.bll.AddDiskToVmCommandTest.createParameters ( ) ; parameters.setDiskInfo ( image ) ; org.ovirt.engine.core.compat.Guid storageId = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; initializeCommand ( storageId , parameters ) ; mockVm ( ) ; mockStorageDomain ( storageId , Version.v3_1 ) ; mockStoragePoolIsoMap ( ) ; runAndAssertCanDoActionSuccess ( ) ; }
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 getClusterListByName ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String name ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Cluster > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( ( ( "Cluster: name=" + name ) + " sortby name" ) , org.ovirt.engine.core.common.interfaces.SearchType.Cluster ) , aQuery ) ; }
Source:
public void testIsNetworkInSyncWhenGatewayEqual ( ) { initIpConfigurationBootProtocolGateway ( NetworkBootProtocol.STATIC_IP , true ) ; org.junit.Assert.assertThat ( createTestedInstance ( ) . isNetworkInSync ( ) , org.hamcrest.CoreMatchers.is ( true ) ) ; }

Target:
public void testIsNetworkInSyncWhenIpv4GatewayBothBlank ( ) { java.util.List < java.lang.String > blankValues = java.util.Arrays.asList ( null , "" ) ; initIpv4ConfigurationStaticBootProtocol ( Ipv4BootProtocol.STATIC_IP ) ; int blankIndex = org.ovirt.engine.core.utils.RandomUtils.instance ( ) . nextInt ( 2 ) ; ipv4Address.setGateway ( blankValues.get ( blankIndex ) ) ; iface.setIpv4Gateway ( blankValues.get ( ( blankIndex ^ 1 ) ) ) ; org.junit.Assert.assertThat ( createTestedInstance ( ) . isNetworkInSync ( ) , org.hamcrest.CoreMatchers.is ( true ) ) ; }
Source:
public void getVmConfigurationBySnapshot ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid snapshotSourceId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( org.ovirt.engine.core.common.businessentities.VM ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmConfigurationBySnapshot , new org.ovirt.engine.core.common.queries.IdQueryParameters ( snapshotSourceId ) . withoutRefresh ( ) , aQuery ) ; }

Target:
public void getVmConfigurationBySnapshot ( org.ovirt.engine.ui.frontend.AsyncQuery < org.ovirt.engine.core.common.businessentities.VM > aQuery , org.ovirt.engine.core.compat.Guid snapshotSourceId ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.CastingConverter < > ( ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmConfigurationBySnapshot , new org.ovirt.engine.core.common.queries.IdQueryParameters ( snapshotSourceId ) . withoutRefresh ( ) , aQuery ) ; }
Source:
protected void setActionMessageParameters ( ) { addCanDoActionMessage ( VdcBllMessages.VAR__ACTION__SET ) ; addCanDoActionMessage ( VdcBllMessages.VAR__TYPE__GLUSTER_GEOREP_CONFIG ) ; addCanDoActionMessageVariable ( "configName" , getParameters ( ) . getConfigKey ( ) ) ; addCanDoActionMessageVariable ( "geoRepSessionKey" , getGeoRepSession ( ) . getSessionKey ( ) ) ; addCanDoActionMessageVariable ( "configValue" , getParameters ( ) . getConfigValue ( ) ) ; }

Target:
protected void setActionMessageParameters ( ) { addCanDoActionMessage ( EngineMessage.VAR__ACTION__SET ) ; addCanDoActionMessage ( EngineMessage.VAR__TYPE__GLUSTER_GEOREP_CONFIG ) ; addCanDoActionMessageVariable ( "configName" , getParameters ( ) . getConfigKey ( ) ) ; addCanDoActionMessageVariable ( "geoRepSessionKey" , getGeoRepSession ( ) . getSessionKey ( ) ) ; addCanDoActionMessageVariable ( "configValue" , getParameters ( ) . getConfigValue ( ) ) ; }