auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
protected static org.dbunit.database.IDatabaseConnection getConnection ( ) throws java.lang.Exception { java.sql.Connection con = org.ovirt.engine.core.dao.BaseDaoTestCase.dataSource.getConnection ( ) ; org.dbunit.database.IDatabaseConnection connection = new org.dbunit.database.DatabaseConnection ( con ) ; connection.getConfig ( ) . setProperty ( DatabaseConfig.PROPERTY_DATATYPE_FACTORY , org.ovirt.engine.core.dao.BaseDaoTestCase.dataFactory ) ; if ( org.ovirt.engine.core.dao.BaseDaoTestCase.needInitializationSql ) { try ( java.sql.Statement stmt = con.createStatement ( ) ) { stmt.executeUpdate ( org.ovirt.engine.core.dao.BaseDaoTestCase.initSql ) ; } } return connection ; }

Target:
protected static org.dbunit.database.IDatabaseConnection getConnection ( ) throws java.lang.Exception { java.sql.Connection con = org.ovirt.engine.core.dao.BaseDaoTestCase.dataSource.getConnection ( ) ; org.dbunit.database.IDatabaseConnection connection = new org.dbunit.database.DatabaseConnection ( con ) ; connection.getConfig ( ) . setProperty ( DatabaseConfig.PROPERTY_DATATYPE_FACTORY , org.ovirt.engine.core.dao.BaseDaoTestCase.dataFactory ) ; connection.getConfig ( ) . setProperty ( DatabaseConfig.FEATURE_ALLOW_EMPTY_FIELDS , true ) ; if ( org.ovirt.engine.core.dao.BaseDaoTestCase.needInitializationSql ) { try ( java.sql.Statement stmt = con.createStatement ( ) ) { stmt.executeUpdate ( org.ovirt.engine.core.dao.BaseDaoTestCase.initSql ) ; } } return connection ; }
Source:
public org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface.NetworkImplementationDetails getNetworkImplementationDetails ( ) { if ( ! ( isAttached ( ) ) ) { return null ; } org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic = ( hasVlan ( ) ) ? getVlanNicModel ( ) . getEntity ( ) : getAttachedToNic ( ) . getEntity ( ) ; return nic.getNetworkImplementationDetails ( ) ; }

Target:
public org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface.NetworkImplementationDetails getNetworkImplementationDetails ( ) { if ( ! ( isAttached ( ) ) ) { return null ; } org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic = ( hasVlan ( ) ) ? getVlanNicModel ( ) . getIface ( ) : getAttachedToNic ( ) . getIface ( ) ; return nic.getNetworkImplementationDetails ( ) ; }
Source:
static com.gwtplatform.mvp.client.TabData getTabData ( org.ovirt.engine.ui.common.uicommon.model.MainModelProvider < org.ovirt.engine.core.common.businessentities.VM , org.ovirt.engine.ui.uicommonweb.models.vms.VmListModel < java.lang.Void > > modelProvider , org.ovirt.engine.ui.webadmin.widget.tab.WebadminMenuLayout menuLayout ) { org.ovirt.engine.ui.webadmin.widget.tab.MenuLayoutMenuDetails menuTabDetails = menuLayout.getDetails ( WebAdminApplicationPlaces.virtualMachineMainTabPlace ) ; return new org.ovirt.engine.ui.common.widget.tab.ModelBoundTabData ( menuTabDetails.getSecondaryTitle ( ) , menuTabDetails.getSecondaryPriority ( ) , menuTabDetails.getPrimaryTitle ( ) , menuTabDetails.getPrimaryPriority ( ) , modelProvider , menuTabDetails.getIcon ( ) ) ; }

Target:
static com.gwtplatform.mvp.client.TabData getTabData ( org.ovirt.engine.ui.webadmin.widget.tab.WebadminMenuLayout menuLayout ) { org.ovirt.engine.ui.webadmin.widget.tab.MenuLayoutMenuDetails menuTabDetails = menuLayout.getDetails ( WebAdminApplicationPlaces.virtualMachineMainTabPlace ) ; return new org.ovirt.engine.ui.common.uicommon.model.GroupedTabData ( menuTabDetails.getSecondaryTitle ( ) , menuTabDetails.getPrimaryTitle ( ) , menuTabDetails.getSecondaryPriority ( ) , menuTabDetails.getPrimaryPriority ( ) , menuTabDetails.getIcon ( ) ) ; }
Source:
private void generateWriterSource ( org.ovirt.api.metamodel.concepts.StructType type ) { org.ovirt.api.metamodel.tool.JavaClassName writerName = javaTypes.getJsonWriterName ( type ) ; javaBuffer.addLine ( "public class %1$s {" , writerName.getSimpleName ( ) ) ; javaBuffer.addLine ( ) ; generateWriteOne ( type ) ; generateWriteMany ( type ) ; javaBuffer.addLine ( "}" ) ; javaBuffer.addLine ( ) ; }

Target:
private void generateEnumWriterSource ( org.ovirt.api.metamodel.concepts.EnumType type ) { org.ovirt.api.metamodel.tool.JavaClassName writerName = javaTypes.getJsonWriterName ( type ) ; javaBuffer.addLine ( "public class %1$s {" , writerName.getSimpleName ( ) ) ; javaBuffer.addLine ( ) ; generateEnumWriteOne ( type ) ; generateEnumWriteMany ( type ) ; javaBuffer.addLine ( "}" ) ; javaBuffer.addLine ( ) ; }
Source:
public java.lang.String getServerFingerprint ( java.lang.String serverName ) { java.lang.String fingerPrint = null ; try ( final org.ovirt.engine.core.bll.utils.EngineSSHClient client = getEngineSSHClient ( ) ) { client.setHost ( serverName ) ; client.connect ( ) ; fingerPrint = client.getHostFingerprint ( ) ; } catch ( java.lang.Throwable e ) { log.error ( "Could not fetch fingerprint of host '{}': {}" , serverName , e.getMessage ( ) ) ; log.debug ( "Exception" , e ) ; } return fingerPrint ; }

Target:
public java.lang.String getServerFingerprint ( java.lang.String serverName ) { java.lang.String fingerPrint = null ; try ( final org.ovirt.engine.core.bll.utils.EngineSSHClient client = getEngineSSHClient ( ) ) { client.setHost ( serverName ) ; client.setUser ( "dummy" ) ; client.connect ( ) ; fingerPrint = client.getHostFingerprint ( ) ; } catch ( java.lang.Throwable e ) { log.error ( "Could not fetch fingerprint of host '{}': {}" , serverName , e.getMessage ( ) ) ; log.debug ( "Exception" , e ) ; } return fingerPrint ; }
Source:
protected boolean removeVmLeaseIfNeeded ( org.ovirt.engine.core.compat.Guid leaseStorageDomainId , org.ovirt.engine.core.compat.Guid vmId ) { if ( leaseStorageDomainId == null ) { return true ; } org.ovirt.engine.core.common.vdscommands.VmLeaseVDSParameters parameters = new org.ovirt.engine.core.common.vdscommands.VmLeaseVDSParameters ( org.ovirt.engine.core.bll.VmCommand.getVm ( ) . getStoragePoolId ( ) ) ; parameters.setLeaseId ( vmId ) ; parameters.setStorageDomainId ( leaseStorageDomainId ) ; return runVdsCommand ( VDSCommandType.RemoveVmLease , parameters ) . getSucceeded ( ) ; }

Target:
protected java.lang.String cdPathWindowsToLinux ( java.lang.String windowsPath , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.compat.Guid vdsId ) { if ( org.apache.commons.lang.StringUtils.isEmpty ( windowsPath ) ) { return "" ; } return cdPathWindowsToLinux ( windowsPath , ( ( java.lang.String ) ( runVdsCommand ( VDSCommandType.IsoPrefix , new org.ovirt.engine.core.common.vdscommands.VdsAndPoolIDVDSParametersBase ( vdsId , storagePoolId ) ) . getReturnValue ( ) ) ) ) ; }
Source:
public void lowThresholdStorageSpace ( ) { org.ovirt.engine.core.common.action.ImportVmParameters parameters = createParameters ( ) ; org.ovirt.engine.core.bll.validator.ImportValidator validator = setupDiskSpaceTest ( parameters ) ; org.mockito.Mockito.doReturn ( new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_DISK_SPACE_LOW_ON_STORAGE_DOMAIN ) ) . when ( multipleSdValidator ) . allDomainsWithinThresholds ( ) ; org.junit.Assert.assertEquals ( EngineMessage.ACTION_TYPE_FAILED_DISK_SPACE_LOW_ON_STORAGE_DOMAIN , validator.validateSpaceRequirements ( java.util.Collections.< org.ovirt.engine.core.common.businessentities.storage.DiskImage > emptyList ( ) ) . getMessage ( ) ) ; }

Target:
public void lowThresholdStorageSpace ( ) { org.ovirt.engine.core.common.action.ImportVmParameters parameters = createParameters ( ) ; org.ovirt.engine.core.bll.validator.ImportValidator validator = setupDiskSpaceTest ( parameters ) ; org.mockito.Mockito.doReturn ( new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_DISK_SPACE_LOW_ON_STORAGE_DOMAIN ) ) . when ( multipleSdValidator ) . allDomainsWithinThresholds ( ) ; org.junit.Assert.assertThat ( validator.validateSpaceRequirements ( java.util.Collections.< org.ovirt.engine.core.common.businessentities.storage.DiskImage > emptyList ( ) ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.ACTION_TYPE_FAILED_DISK_SPACE_LOW_ON_STORAGE_DOMAIN ) ) ; }
Source:
public java.util.List < org.ovirt.engine.core.aaa.DirectoryUser > queryUsers ( org.ovirt.engine.core.bll.adbroker.LdapQueryData data ) { org.ovirt.engine.core.bll.adbroker.LdapReturnValueBase ldapResult = broker.runAdAction ( AdActionType.SearchUserByQuery , new org.ovirt.engine.core.bll.adbroker.LdapSearchByQueryParameters ( null , getName ( ) , data ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.LdapUser > ldapUsers = ( ( java.util.List < org.ovirt.engine.core.common.businessentities.LdapUser > ) ( ldapResult.getReturnValue ( ) ) ) ; return mapUsers ( ldapUsers ) ; }

Target:
public java.util.List < org.ovirt.engine.core.aaa.DirectoryUser > queryUsers ( java.lang.String query ) { org.ovirt.engine.core.bll.adbroker.LdapQueryData queryData = new org.ovirt.engine.core.bll.adbroker.LdapQueryDataImpl ( ) ; queryData.setLdapQueryType ( LdapQueryType.searchUsers ) ; queryData.setDomain ( getProfileName ( ) ) ; queryData.setFilterParameters ( new java.lang.Object [ ] { query } ) ; org.ovirt.engine.core.bll.adbroker.LdapReturnValueBase ldapResult = broker.runAdAction ( AdActionType.SearchUserByQuery , new org.ovirt.engine.core.bll.adbroker.LdapSearchByQueryParameters ( null , getName ( ) , queryData ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.LdapUser > ldapUsers = ( ( java.util.List < org.ovirt.engine.core.common.businessentities.LdapUser > ) ( ldapResult.getReturnValue ( ) ) ) ; return mapUsers ( ldapUsers ) ; }
Source:
public void OnSuccess ( java.lang.Object model1 , java.lang.Object ReturnValue1 ) { org.ovirt.engine.ui.uicommonweb.models.vms.VmGeneralModel vmGeneralModel1 = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.VmGeneralModel ) ( model1 ) ) ; org.ovirt.engine.core.common.businessentities.storage_domains storage = ( ( org.ovirt.engine.core.common.businessentities.storage_domains ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( ReturnValue1 ) ) . getReturnValue ( ) ) ) ; vmGeneralModel1.setStorageDomain ( storage.getstorage_name ( ) ) ; vmGeneralModel1.getUpdateCompleteEvent ( ) . raise ( this , EventArgs.Empty ) ; }

Target:
public void OnSuccess ( java.lang.Object model1 , java.lang.Object ReturnValue1 ) { org.ovirt.engine.ui.uicommonweb.models.vms.VmGeneralModel vmGeneralModel1 = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.VmGeneralModel ) ( model1 ) ) ; org.ovirt.engine.core.common.businessentities.StorageDomain storage = ( ( org.ovirt.engine.core.common.businessentities.StorageDomain ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( ReturnValue1 ) ) . getReturnValue ( ) ) ) ; vmGeneralModel1.setStorageDomain ( storage.getStorageName ( ) ) ; vmGeneralModel1.getUpdateCompleteEvent ( ) . raise ( this , EventArgs.Empty ) ; }
Source:
public void testCannotUpdateOSNotSupportVirtioScsi ( ) { prepareVmToPassValidate ( ) ; group.setCompatibilityVersion ( Version.v4_0 ) ; org.mockito.Mockito.when ( command.isVirtioScsiEnabledForVm ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( true ) ; org.mockito.Mockito.when ( osRepository.getDiskInterfaces ( org.mockito.Matchers.any ( java.lang.Integer.class ) , org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Version.class ) ) ) . thenReturn ( java.util.Collections.singletonList ( "VirtIO" ) ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( command , EngineMessage.ACTION_TYPE_FAILED_ILLEGAL_OS_TYPE_DOES_NOT_SUPPORT_VIRTIO_SCSI ) ; }

Target:
public void testCannotUpdateOSNotSupportVirtioScsi ( ) { prepareVmToPassValidate ( ) ; group.setCompatibilityVersion ( Version.v3_6 ) ; org.mockito.Mockito.when ( command.isVirtioScsiEnabledForVm ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( true ) ; org.mockito.Mockito.when ( osRepository.getDiskInterfaces ( org.mockito.Matchers.any ( java.lang.Integer.class ) , org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Version.class ) ) ) . thenReturn ( java.util.Collections.singletonList ( "VirtIO" ) ) ; command.initEffectiveCompatibilityVersion ( ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( command , EngineMessage.ACTION_TYPE_FAILED_ILLEGAL_OS_TYPE_DOES_NOT_SUPPORT_VIRTIO_SCSI ) ; }
Source:
public void Executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { org.ovirt.engine.ui.uicommonweb.models.storage.StorageListModel storageListModel = ( ( org.ovirt.engine.ui.uicommonweb.models.storage.StorageListModel ) ( result.getState ( ) ) ) ; org.ovirt.engine.core.common.action.VdcReturnValueBase returnVal = result.getReturnValue ( ) ; boolean success = ( returnVal != null ) && ( returnVal.getSucceeded ( ) ) ; if ( success ) { storageListModel.nfsConnection = null ; } storageListModel.ImportNfsStoragePostInit ( ) ; }

Target:
public void Executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { org.ovirt.engine.ui.uicommonweb.models.storage.StorageListModel storageListModel = ( ( org.ovirt.engine.ui.uicommonweb.models.storage.StorageListModel ) ( result.getState ( ) ) ) ; org.ovirt.engine.core.common.action.VdcReturnValueBase vdcReturnValueBase = result.getReturnValue ( ) ; storageListModel.storageDomain.setStorage ( ( ( java.lang.String ) ( vdcReturnValueBase.getActionReturnValue ( ) ) ) ) ; }
Source:
public void getLunsByVgId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String vgId , org.ovirt.engine.core.compat.Guid vdsId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.LUNs > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.LUNs > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetLunsByVgIdParameters params = new org.ovirt.engine.core.common.queries.GetLunsByVgIdParameters ( vgId , vdsId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetLunsByVgId , params , aQuery ) ; }

Target:
public void getStorageDomainList ( 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.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) ; } } ; org.ovirt.engine.core.common.queries.SearchParameters searchParams = new org.ovirt.engine.core.common.queries.SearchParameters ( "Storage:" , org.ovirt.engine.core.common.interfaces.SearchType.StorageDomain ) ; searchParams.setMaxCount ( 9999 ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , searchParams , aQuery ) ; }
Source:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { cachedMaxPriority = ( ( java.lang.Integer ) ( returnValue ) ) ; updatePriority ( ( ( org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel ) ( target ) ) ) ; }

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 static void getClusterNetworkList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { if ( ( aQuery.converterCallback ) == null ) { 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.network.Network > ( ) ; } return source ; } } ; } org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllNetworksByClusterId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( clusterId ) , aQuery ) ; }

Target:
public static void getGlusterSwiftServerServices ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterServerService > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterServerServicesByClusterId , new org.ovirt.engine.core.common.queries.gluster.GlusterServiceQueryParameters ( clusterId , org.ovirt.engine.core.common.businessentities.gluster.ServiceType.GLUSTER_SWIFT ) , aQuery ) ; }
Source:
public void getItem_prefixedKeyExists ( ) { org.mockito.Mockito.doReturn ( "LocalValue" ) . when ( tested ) . getLocalItemImpl ( ( ( ClientStorageImpl.CLIENT_STORAGE_KEY_PREFIX ) + "LocalKey" ) ) ; java.lang.String localValue = tested.getLocalItem ( "LocalKey" ) ; org.junit.Assert.assertThat ( localValue , org.hamcrest.CoreMatchers.equalTo ( "LocalValue" ) ) ; org.mockito.Mockito.doReturn ( "SessionValue" ) . when ( tested ) . getSessionItemImpl ( ( ( ClientStorageImpl.CLIENT_STORAGE_KEY_PREFIX ) + "SessionKey" ) ) ; java.lang.String sessionValue = tested.getSessionItem ( "SessionKey" ) ; org.junit.Assert.assertThat ( sessionValue , org.hamcrest.CoreMatchers.equalTo ( "SessionValue" ) ) ; }

Target:
public void getItem_prefixedKeyExists ( ) { org.mockito.Mockito.doReturn ( "LocalValue" ) . when ( tested ) . getLocalItemImpl ( ( ( ClientStorageImpl.CLIENT_STORAGE_KEY_PREFIX ) + "LocalKey" ) ) ; java.lang.String localValue = tested.getLocalItem ( "LocalKey" ) ; org.hamcrest.MatcherAssert.assertThat ( localValue , org.hamcrest.CoreMatchers.equalTo ( "LocalValue" ) ) ; org.mockito.Mockito.doReturn ( "SessionValue" ) . when ( tested ) . getSessionItemImpl ( ( ( ClientStorageImpl.CLIENT_STORAGE_KEY_PREFIX ) + "SessionKey" ) ) ; java.lang.String sessionValue = tested.getSessionItem ( "SessionKey" ) ; org.hamcrest.MatcherAssert.assertThat ( sessionValue , org.hamcrest.CoreMatchers.equalTo ( "SessionValue" ) ) ; }
Source:
public java.lang.String getDisplayValue ( ) { if ( isDefault ( ) ) { final java.lang.String defaultTimeZoneKey = org.ovirt.engine.ui.uicommonweb.models.vms.TimeZoneModel.getDefaultTimeZoneKey ( timeZoneType ) ; return org.ovirt.engine.ui.uicommonweb.models.vms.TimeZoneModel.cachedTimeZones.get ( timeZoneType ) . get ( defaultTimeZoneKey ) ; } else { return org.ovirt.engine.ui.uicommonweb.models.vms.TimeZoneModel.cachedTimeZones.get ( timeZoneType ) . get ( timeZoneKey ) ; } }

Target:
public java.lang.String getDisplayValue ( ) { if ( isDefault ( ) ) { final java.lang.String defaultTimeZoneKey = ( ( java.lang.String ) ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigValuePreConverted ( timeZoneType.getDefaultTimeZoneConfigurationKey ( ) ) ) ) ; if ( ! ( timeZoneType.getTimeZoneList ( ) . containsKey ( defaultTimeZoneKey ) ) ) { timeZoneKey = timeZoneType.getUltimateFallback ( ) ; } return timeZoneType.getTimeZoneList ( ) . get ( defaultTimeZoneKey ) ; } else { return timeZoneType.getTimeZoneList ( ) . get ( timeZoneKey ) ; } }
Source:
public void initDictionaries ( ) { org.ovirt.engine.core.bll.CpuFlagsManagerHandler.log.info ( "Start initializing dictionaries" ) ; org.ovirt.engine.core.bll.CpuFlagsManagerHandler._managersDictionary.clear ( ) ; for ( org.ovirt.engine.core.compat.Version ver : org.ovirt.engine.core.common.config.Config.< java.util.HashSet < org.ovirt.engine.core.compat.Version > > getValue ( ConfigValues.SupportedClusterLevels ) ) { org.ovirt.engine.core.bll.CpuFlagsManagerHandler._managersDictionary.put ( ver , new org.ovirt.engine.core.bll.CpuFlagsManagerHandler.CpuFlagsManager ( ver ) ) ; } org.ovirt.engine.core.bll.CpuFlagsManagerHandler.log.info ( "Finished initializing dictionaries" ) ; }

Target:
public void initDictionaries ( ) { org.ovirt.engine.core.bll.CpuFlagsManagerHandler.log.info ( "Start initializing dictionaries" ) ; org.ovirt.engine.core.bll.CpuFlagsManagerHandler.managersDictionary.clear ( ) ; for ( org.ovirt.engine.core.compat.Version ver : org.ovirt.engine.core.common.config.Config.< java.util.HashSet < org.ovirt.engine.core.compat.Version > > getValue ( ConfigValues.SupportedClusterLevels ) ) { org.ovirt.engine.core.bll.CpuFlagsManagerHandler.managersDictionary.put ( ver , new org.ovirt.engine.core.bll.CpuFlagsManagerHandler.CpuFlagsManager ( ver ) ) ; } org.ovirt.engine.core.bll.CpuFlagsManagerHandler.log.info ( "Finished initializing dictionaries" ) ; }
Source:
public void lunsMatch ( ) { org.ovirt.engine.core.common.businessentities.storage.LUNs lun = new org.ovirt.engine.core.common.businessentities.storage.LUNs ( ) ; lun.setLUNId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) . toString ( ) ) ; lun.setPhysicalVolumeId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) . toString ( ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.storage.LUNs > lunsFromVgInfo = java.util.Arrays.asList ( lun , lun ) ; java.util.List < org.ovirt.engine.core.common.businessentities.storage.LUNs > lunsFromDb = java.util.Arrays.asList ( lun , lun ) ; boolean isMismatch = command.isLunsInfoMismatch ( lunsFromVgInfo , lunsFromDb ) ; org.junit.Assert.assertFalse ( isMismatch ) ; }

Target:
public void lunsMatch ( ) { org.ovirt.engine.core.common.businessentities.storage.LUNs lun = new org.ovirt.engine.core.common.businessentities.storage.LUNs ( ) ; lun.setLUNId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) . toString ( ) ) ; lun.setPhysicalVolumeId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) . toString ( ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.storage.LUNs > lunsFromVgInfo = java.util.Arrays.asList ( lun , lun ) ; java.util.List < org.ovirt.engine.core.common.businessentities.storage.LUNs > lunsFromDb = java.util.Arrays.asList ( lun , lun ) ; boolean isMatch = command.getLunsToUpdateInDb ( lunsFromVgInfo , lunsFromDb ) . isEmpty ( ) ; org.junit.Assert.assertTrue ( isMatch ) ; }
Source:
public void getHostsForStorageOperation ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , boolean localFsOnly ) { 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 source ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetHostsForStorageOperation , new org.ovirt.engine.core.common.queries.GetHostsForStorageOperationParameters ( storagePoolId , localFsOnly ) , aQuery ) ; }

Target:
public void getDataCentersByStorageDomain ( org.ovirt.engine.ui.frontend.AsyncQuery < java.util.List < org.ovirt.engine.core.common.businessentities.StoragePool > > aQuery , org.ovirt.engine.core.compat.Guid storageDomainId ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.CastingConverter < > ( ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStoragePoolsByStorageDomainId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( storageDomainId ) , aQuery ) ; }
Source:
public void testExecuteQueryCommand ( ) { org.mockito.Mockito.when ( params.getId ( ) ) . thenReturn ( networkId ) ; setupVdsDao ( ) ; setupVdsNetworkInterfaceDao ( ) ; setupNetworkDao ( ) ; org.ovirt.engine.core.common.utils.PairQueryable < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface , org.ovirt.engine.core.common.businessentities.VDS > vdsInterfaceVdsPair = new org.ovirt.engine.core.common.utils.PairQueryable ( vdsNetworkInterface , vds ) ; java.util.List < org.ovirt.engine.core.common.utils.PairQueryable < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface , org.ovirt.engine.core.common.businessentities.VDS > > expected = java.util.Collections.singletonList ( vdsInterfaceVdsPair ) ; getQuery ( ) . executeQueryCommand ( ) ; org.junit.Assert.assertEquals ( "Wrong result returned" , expected , getQuery ( ) . getQueryReturnValue ( ) . getReturnValue ( ) ) ; }

Target:
public void testExecuteQueryCommand ( ) { org.mockito.Mockito.when ( params.getId ( ) ) . thenReturn ( networkId ) ; setupVdsDao ( ) ; setupVdsNetworkInterfaceDao ( ) ; setupNetworkDao ( ) ; org.ovirt.engine.core.common.utils.PairQueryable < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface , org.ovirt.engine.core.common.businessentities.VDS > vdsInterfaceVdsPair = new org.ovirt.engine.core.common.utils.PairQueryable ( vdsNetworkInterface , vds ) ; java.util.List < org.ovirt.engine.core.common.utils.PairQueryable < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface , org.ovirt.engine.core.common.businessentities.VDS > > expected = java.util.Collections.singletonList ( vdsInterfaceVdsPair ) ; getQuery ( ) . executeQueryCommand ( ) ; org.junit.jupiter.api.Assertions.assertEquals ( expected , getQuery ( ) . getQueryReturnValue ( ) . getReturnValue ( ) , "Wrong result returned" ) ; }
Source:
private static boolean takesPrimitive ( java.lang.reflect.Method m ) { return ( ( m.getParameterTypes ( ) . length ) == 1 ) && ( ( ( ( ( org.ovirt.engine.api.restapi.types.MappingTestHelper.takesString ( m ) ) || ( org.ovirt.engine.api.restapi.types.MappingTestHelper.takesBoolean ( m ) ) ) || ( org.ovirt.engine.api.restapi.types.MappingTestHelper.takesShort ( m ) ) ) || ( org.ovirt.engine.api.restapi.types.MappingTestHelper.takesInteger ( m ) ) ) || ( org.ovirt.engine.api.restapi.types.MappingTestHelper.takesLong ( m ) ) ) ; }

Target:
private static boolean takesPrimitive ( java.lang.reflect.Method m ) { return ( ( m.getParameterTypes ( ) . length ) == 1 ) && ( ( ( ( ( ( org.ovirt.engine.api.restapi.types.MappingTestHelper.takesString ( m ) ) || ( org.ovirt.engine.api.restapi.types.MappingTestHelper.takesBoolean ( m ) ) ) || ( org.ovirt.engine.api.restapi.types.MappingTestHelper.takesShort ( m ) ) ) || ( org.ovirt.engine.api.restapi.types.MappingTestHelper.takesInteger ( m ) ) ) || ( org.ovirt.engine.api.restapi.types.MappingTestHelper.takesLong ( m ) ) ) || ( org.ovirt.engine.api.restapi.types.MappingTestHelper.takesDouble ( m ) ) ) ; }
Source:
public void testGetBaseNicVerifyDelegation ( ) throws java.lang.Exception { org.ovirt.engine.core.vdsbroker.CalculateBaseNic spy = org.mockito.Mockito.spy ( calculateBaseNic ) ; spy.getBaseNic ( baseNic ) ; org.mockito.Mockito.verify ( spy ) . getBaseNic ( org.mockito.Matchers.< org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > any ( ) , org.mockito.Matchers.< java.util.Map < java.lang.String , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > > any ( ) ) ; }

Target:
public void testGetBaseNicVerifyDelegation ( ) throws java.lang.Exception { org.ovirt.engine.core.vdsbroker.CalculateBaseNic spy = org.mockito.Mockito.spy ( calculateBaseNic ) ; spy.getBaseNic ( baseNic ) ; org.mockito.Mockito.verify ( spy ) . getBaseNic ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface.class ) , org.mockito.Matchers.anyMapOf ( java.lang.String.class , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface.class ) ) ; }
Source:
public void render ( org.ovirt.engine.ui.common.widget.table.cell.Context context , com.google.gwt.resources.client.ImageResource value , com.google.gwt.safehtml.shared.SafeHtmlBuilder sb ) { if ( value != null ) { sb.append ( org.ovirt.engine.ui.common.widget.table.cell.StyledImageResourceCell.template.imageContainerWithStyleClass ( style , styleClass , com.google.gwt.safehtml.shared.SafeHtmlUtils.fromTrustedString ( com.google.gwt.user.client.ui.AbstractImagePrototype.create ( value ) . getHTML ( ) ) ) ) ; } }

Target:
public void render ( org.ovirt.engine.ui.common.widget.table.cell.Context context , com.google.gwt.resources.client.ImageResource value , com.google.gwt.safehtml.shared.SafeHtmlBuilder sb ) { if ( value != null ) { sb.append ( org.ovirt.engine.ui.common.widget.table.cell.ImageResourceCell.template.imageContainerWithStyleClass ( style , styleClass , com.google.gwt.safehtml.shared.SafeHtmlUtils.fromTrustedString ( com.google.gwt.user.client.ui.AbstractImagePrototype.create ( value ) . getHTML ( ) ) ) ) ; } }
Source:
private static java.util.List < org.ovirt.engine.core.common.businessentities.VDSGroup > createClusterList ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VDSGroup > clusters = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ( ) ; org.ovirt.engine.core.common.businessentities.VDSGroup cluster = new org.ovirt.engine.core.common.businessentities.VDSGroup ( ) ; cluster.setcompatibility_version ( org.ovirt.engine.core.bll.storage.UpdateStoragePoolCommandTest.VERSION_1_0 ) ; cluster.setName ( "firstCluster" ) ; clusters.add ( cluster ) ; return clusters ; }

Target:
private static java.util.List < org.ovirt.engine.core.common.businessentities.VDSGroup > createClusterList ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VDSGroup > clusters = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ( ) ; org.ovirt.engine.core.common.businessentities.VDSGroup cluster = new org.ovirt.engine.core.common.businessentities.VDSGroup ( ) ; cluster.setCompatibilityVersion ( org.ovirt.engine.core.bll.storage.UpdateStoragePoolCommandTest.VERSION_1_0 ) ; cluster.setName ( "firstCluster" ) ; clusters.add ( cluster ) ; return clusters ; }
Source:
private < T > void maybeSetEntity ( org.ovirt.engine.ui.uicommonweb.models.EntityModel < T > listModel , T value ) { if ( ( ( listModel != null ) && ( listModel.getIsChangable ( ) ) ) && ( listModel.getIsAvailable ( ) ) ) { listModel.setEntity ( value ) ; } }

Target:
protected < T > void maybeSetEntity ( org.ovirt.engine.ui.uicommonweb.models.EntityModel < T > listModel , T value ) { if ( ( alwaysEnabledFieldUpdate ) || ( ( ( listModel != null ) && ( listModel.getIsChangable ( ) ) ) && ( listModel.getIsAvailable ( ) ) ) ) { listModel.setEntity ( value ) ; } }
Source:
private void addStyles ( ) { importGlusterConfigurationEditor.addContentWidgetStyleName ( style.editorContentWidget ( ) ) ; migrateOnErrorOption_NOEditor.addContentWidgetStyleName ( style.label ( ) ) ; migrateOnErrorOption_YESEditor.addContentWidgetStyleName ( style.label ( ) ) ; migrateOnErrorOption_HA_ONLYEditor.addContentWidgetStyleName ( style.label ( ) ) ; countThreadsAsCoresEditor.setContentWidgetStyleName ( style.fullWidth ( ) ) ; enableTrustedServiceEditor.setContentWidgetStyleName ( style.fullWidth ( ) ) ; }

Target:
private void addStyles ( ) { importGlusterConfigurationEditor.addContentWidgetStyleName ( style.editorContentWidget ( ) ) ; migrateOnErrorOption_NOEditor.addContentWidgetStyleName ( style.label ( ) ) ; migrateOnErrorOption_YESEditor.addContentWidgetStyleName ( style.label ( ) ) ; migrateOnErrorOption_HA_ONLYEditor.addContentWidgetStyleName ( style.label ( ) ) ; countThreadsAsCoresEditor.setContentWidgetStyleName ( style.fullWidth ( ) ) ; enableTrustedServiceEditor.setContentWidgetStyleName ( style.fullWidth ( ) ) ; enableHaReservationEditor.setContentWidgetStyleName ( style.fullWidth ( ) ) ; }
Source:
public void testAddIncompleteParameters_2 ( ) throws java.lang.Exception { org.ovirt.engine.api.model.Disk model = getModel ( 0 ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; control.replay ( ) ; try { collection.add ( model ) ; fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "Disk" , "testAddIncompleteParameters_2" , "provisionedSize|size" ) ; } }

Target:
public void testAddIncompleteParameters_2 ( ) throws java.lang.Exception { org.ovirt.engine.api.model.Disk model = getModel ( 0 ) ; model.setSize ( null ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; control.replay ( ) ; try { collection.add ( model ) ; fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "Disk" , "testAddIncompleteParameters_2" , "provisionedSize|size" ) ; } }
Source:
public void saveJob ( final org.ovirt.engine.core.common.job.Job job ) { jobDao.save ( job ) ; }

Target:
public java.lang.Void runInTransaction ( ) { jobDao.save ( job ) ; java.util.Set < java.util.Map.Entry < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.VdcObjectType > > entrySet = job.getJobSubjectEntities ( ) . entrySet ( ) ; for ( java.util.Map.Entry < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.VdcObjectType > entry : entrySet ) { jobSubjectEntityDao.save ( job.getId ( ) , entry.getKey ( ) , entry.getValue ( ) ) ; } return null ; }
Source:
protected void executeQueryCommand ( ) { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic = org.ovirt.engine.core.bll.network.dc.GetNetworkLabelsByHostNicIdQuery.getDbFacade ( ) . getInterfaceDao ( ) . get ( org.ovirt.engine.core.bll.network.dc.GetNetworkLabelsByHostNicIdQuery.getParameters ( ) . getId ( ) ) ; org.ovirt.engine.core.bll.network.dc.GetNetworkLabelsByHostNicIdQuery.getQueryReturnValue ( ) . setReturnValue ( ( ( nic == null ) || ( ! ( org.ovirt.engine.core.utils.NetworkUtils.isLabeled ( nic ) ) ) ? java.util.Collections.< org.ovirt.engine.core.common.businessentities.network.pseudo.NetworkLabel > emptyList ( ) : convertToNetworkLabels ( nic.getLabels ( ) ) ) ) ; }

Target:
protected void executeQueryCommand ( ) { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic = interfaceDao.get ( org.ovirt.engine.core.bll.network.dc.GetNetworkLabelsByHostNicIdQuery.getParameters ( ) . getId ( ) ) ; org.ovirt.engine.core.bll.network.dc.GetNetworkLabelsByHostNicIdQuery.getQueryReturnValue ( ) . setReturnValue ( ( ( nic == null ) || ( ! ( org.ovirt.engine.core.utils.NetworkUtils.isLabeled ( nic ) ) ) ? java.util.Collections.< org.ovirt.engine.core.common.businessentities.network.pseudo.NetworkLabel > emptyList ( ) : convertToNetworkLabels ( nic.getLabels ( ) ) ) ) ; }
Source:
public void testSetOption ( ) throws java.lang.Exception { setUriInfo ( setUpActionExpectations ( VdcActionType.SetGlusterVolumeOption , org.ovirt.engine.core.common.action.gluster.GlusterVolumeOptionParameters.class , new java.lang.String [ ] { "VolumeId" } , new java.lang.Object [ ] { GUIDS [ 0 ] } ) ) ; org.ovirt.engine.api.model.Action action = new org.ovirt.engine.api.model.Action ( ) ; action.setOption ( new org.ovirt.engine.api.model.Option ( ) ) ; action.getOption ( ) . setName ( "auth.allow" ) ; action.getOption ( ) . setValue ( "*" ) ; verifyActionResponse ( resource.setOption ( action ) ) ; }

Target:
public void testSetOption ( ) throws java.lang.Exception { setupParentExpectations ( ) ; resource.setParent ( volumesResourceMock ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.SetGlusterVolumeOption , org.ovirt.engine.core.common.action.gluster.GlusterVolumeOptionParameters.class , new java.lang.String [ ] { "VolumeId" } , new java.lang.Object [ ] { GUIDS [ 0 ] } ) ) ; org.ovirt.engine.api.model.Action action = new org.ovirt.engine.api.model.Action ( ) ; action.setOption ( new org.ovirt.engine.api.model.Option ( ) ) ; action.getOption ( ) . setName ( "auth.allow" ) ; action.getOption ( ) . setValue ( "*" ) ; verifyActionResponse ( resource.setOption ( action ) ) ; }
Source:
public void testGetDefaultQuotaForDCWithDefaultQuota ( ) throws java.lang.Exception { org.mockito.Mockito.when ( quotaDAO.getDefaultQuotaByStoragePoolId ( storagePoolUUID ) ) . thenReturn ( mockGeneralStorageQuota ( ) ) ; org.ovirt.engine.core.common.businessentities.Quota quotaUnlimited = quotaHelper.getUnlimitedQuota ( mockStoragePool ( ) , true ) ; assertQuotaUnlimited ( quotaUnlimited ) ; assertQuotaUnlimitedName ( quotaUnlimited ) ; }

Target:
public void testGetDefaultQuotaToDCWithoutDefaultQuotaWithNoReuse ( ) throws java.lang.Exception { java.lang.String defaultQuotaName = quotaHelper.getDefaultQuotaName ( storagePool.getname ( ) ) ; org.mockito.Mockito.when ( quotaHelper.generateDefaultQuotaName ( storagePool ) ) . thenReturn ( defaultQuotaName ) ; org.ovirt.engine.core.common.businessentities.Quota quotaUnlimited = quotaHelper.getUnlimitedQuota ( mockStoragePool ( ) , true , false ) . getFirst ( ) ; assertQuotaUnlimited ( quotaUnlimited ) ; assertQuotaUnlimitedName ( quotaUnlimited ) ; }
Source:
public static void getVmSnapshotList ( 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 ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllVmSnapshotsByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
public static void getLunsByVgId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String vgId , org.ovirt.engine.core.compat.Guid vdsId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.LUNs > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.LUNs > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetLunsByVgIdParameters params = new org.ovirt.engine.core.common.queries.GetLunsByVgIdParameters ( vgId , vdsId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetLunsByVgId , params , aQuery ) ; }
Source:
public void render ( org.ovirt.engine.ui.userportal.section.main.view.tab.extended.Context context , org.ovirt.engine.core.common.businessentities.VmTemplate template , com.google.gwt.safehtml.shared.SafeHtmlBuilder sb ) { sb.append ( templates.vmNameCellItem ( org.ovirt.engine.ui.common.utils.ElementIdUtils.createTableCellElementId ( elementIdPrefix , "name" , context ) , template.getName ( ) ) ) ; java.lang.String description = template.getDescription ( ) ; if ( ( description != null ) && ( ! ( description.isEmpty ( ) ) ) ) { sb.append ( templates.vmDescriptionCellItem ( description ) ) ; } }

Target:
public java.lang.String getValue ( org.ovirt.engine.core.common.businessentities.VmTemplate template ) { return ( ( template.getDescription ( ) ) != null ) && ( ! ( template.getDescription ( ) . isEmpty ( ) ) ) ? template.getDescription ( ) : "" ; }
Source:
protected org.ovirt.engine.core.common.utils.ToStringBuilder appendAttributes ( org.ovirt.engine.core.common.utils.ToStringBuilder tsb ) { return super . appendAttributes ( tsb ) . append ( "operations" , getOperations ( ) ) . append ( "size" , getSize ( ) ) . append ( "url" , getUrl ( ) ) ; }

Target:
protected org.ovirt.engine.core.common.utils.ToStringBuilder appendAttributes ( org.ovirt.engine.core.common.utils.ToStringBuilder tsb ) { return super . appendAttributes ( tsb ) . append ( "operations" , getOperations ( ) ) . append ( "size" , getSize ( ) ) . append ( "url" , getUrl ( ) ) . append ( "filename" , getFilename ( ) ) ; }
Source:
protected java.util.Map < java.lang.String , org.ovirt.engine.core.common.utils.Pair < java.lang.String , java.lang.String > > getExclusiveLocks ( ) { return java.util.Collections.singletonMap ( org.ovirt.engine.core.bll.storage.RemoveStorageServerConnectionCommand.getConnection ( ) . getconnection ( ) , org.ovirt.engine.core.bll.LockMessagesMatchUtil.makeLockingPair ( LockingGroup.STORAGE_CONNECTION , VdcBllMessages.ACTION_TYPE_FAILED_OBJECT_LOCKED ) ) ; }

Target:
protected java.util.Map < java.lang.String , org.ovirt.engine.core.common.utils.Pair < java.lang.String , java.lang.String > > getExclusiveLocks ( ) { java.util.Map < java.lang.String , org.ovirt.engine.core.common.utils.Pair < java.lang.String , java.lang.String > > locks = new java.util.HashMap < java.lang.String , org.ovirt.engine.core.common.utils.Pair < java.lang.String , java.lang.String > > ( ) ; locks.put ( org.ovirt.engine.core.bll.storage.RemoveStorageServerConnectionCommand.getConnection ( ) . getconnection ( ) , org.ovirt.engine.core.bll.LockMessagesMatchUtil.makeLockingPair ( LockingGroup.STORAGE_CONNECTION , VdcBllMessages.ACTION_TYPE_FAILED_OBJECT_LOCKED ) ) ; locks.put ( org.ovirt.engine.core.bll.storage.RemoveStorageServerConnectionCommand.getConnection ( ) . getid ( ) , org.ovirt.engine.core.bll.LockMessagesMatchUtil.makeLockingPair ( LockingGroup.STORAGE_CONNECTION , VdcBllMessages.ACTION_TYPE_FAILED_OBJECT_LOCKED ) ) ; return locks ; }
Source:
public java.lang.Void runInTransaction ( ) { getNetworkDAO ( ) . save ( getNetwork ( ) ) ; if ( ( getNetwork ( ) . isVmNetwork ( ) ) && ( getParameters ( ) . isVnicProfileRequired ( ) ) ) { getVnicProfileDao ( ) . save ( org.ovirt.engine.core.bll.network.cluster.NetworkHelper.createVnicProfile ( getNetwork ( ) ) ) ; } org.ovirt.engine.core.bll.network.cluster.NetworkHelper.addPermissionsOnNetwork ( getCurrentUser ( ) . getId ( ) , getNetwork ( ) . getId ( ) ) ; return null ; }

Target:
public java.lang.Void runInTransaction ( ) { getNetworkDao ( ) . save ( getNetwork ( ) ) ; if ( ( getNetwork ( ) . isVmNetwork ( ) ) && ( getParameters ( ) . isVnicProfileRequired ( ) ) ) { getVnicProfileDao ( ) . save ( org.ovirt.engine.core.bll.network.cluster.NetworkHelper.createVnicProfile ( getNetwork ( ) ) ) ; } org.ovirt.engine.core.bll.network.cluster.NetworkHelper.addPermissionsOnNetwork ( getCurrentUser ( ) . getId ( ) , getNetwork ( ) . getId ( ) ) ; return null ; }
Source:
private void changePassword ( ) { org.ovirt.engine.ui.frontend.Frontend.RunAction ( VdcActionType.ChangeUserPassword , new org.ovirt.engine.core.common.action.ChangeUserPasswordParameters ( ( ( java.lang.String ) ( getUserName ( ) . getEntity ( ) ) ) , ( ( java.lang.String ) ( getPassword ( ) . getEntity ( ) ) ) , ( ( java.lang.String ) ( getNewPassword ( ) . getEntity ( ) ) ) , ( ( java.lang.String ) ( getDomain ( ) . getSelectedItem ( ) ) ) ) ) ; }

Target:
private void changePassword ( ) { org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runAction ( VdcActionType.ChangeUserPassword , new org.ovirt.engine.core.common.action.ChangeUserPasswordParameters ( ( ( java.lang.String ) ( getUserName ( ) . getEntity ( ) ) ) , ( ( java.lang.String ) ( getPassword ( ) . getEntity ( ) ) ) , ( ( java.lang.String ) ( getNewPassword ( ) . getEntity ( ) ) ) , ( ( java.lang.String ) ( getDomain ( ) . getSelectedItem ( ) ) ) ) ) ; }
Source:
public void testTypedPrimitiveBoolean ( ) throws java.lang.Exception { java.io.File file = writeConf ( "a=true" , "b=false" ) ; org.ovirt.engine.core.extensions.mgr.Configuration config = org.ovirt.engine.core.extensions.mgr.Configuration.loadFile ( file ) ; org.junit.Assert.assertNotNull ( config ) ; org.ovirt.engine.core.extensions.mgr.ConfigurationTest.TestTypedPrimitiveBoolean view = config.getView ( org.ovirt.engine.core.extensions.mgr.ConfigurationTest.TestTypedPrimitiveBoolean.class ) ; org.junit.Assert.assertNotNull ( view ) ; org.junit.Assert.assertTrue ( view.isA ( ) ) ; org.junit.Assert.assertFalse ( view.isB ( ) ) ; }

Target:
public void testTypedPrimitiveBoolean ( ) throws java.lang.Exception { java.io.File file = writeConf ( "a=true" , "b=false" ) ; org.ovirt.engine.core.extensions.mgr.Configuration config = org.ovirt.engine.core.extensions.mgr.Configuration.loadFile ( file ) ; org.junit.jupiter.api.Assertions.assertNotNull ( config ) ; org.ovirt.engine.core.extensions.mgr.ConfigurationTest.TestTypedPrimitiveBoolean view = config.getView ( org.ovirt.engine.core.extensions.mgr.ConfigurationTest.TestTypedPrimitiveBoolean.class ) ; org.junit.jupiter.api.Assertions.assertNotNull ( view ) ; org.junit.jupiter.api.Assertions.assertTrue ( view.isA ( ) ) ; org.junit.jupiter.api.Assertions.assertFalse ( view.isB ( ) ) ; }
Source:
public void vmTemplateNameWithVm ( ) { 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 ( ) ; b.setVm ( v ) ; final java.lang.String n = b.getVmTemplateName ( ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.NAME , n ) ; }

Target:
public void getUserName ( ) { b.setUserName ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.NAME ) ; final java.lang.String n = b.getUserName ( ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.NAME , n ) ; }
Source:
public void testObjectsEqual ( ) { java.lang.Integer ten = java.lang.Integer.valueOf ( 10 ) ; junit.framework.Assert.assertFalse ( org.ovirt.engine.core.common.utils.ObjectUtils.objectsEqual ( ten , java.lang.Integer.valueOf ( 20 ) ) ) ; junit.framework.Assert.assertTrue ( org.ovirt.engine.core.common.utils.ObjectUtils.objectsEqual ( ten , java.lang.Integer.valueOf ( 10 ) ) ) ; junit.framework.Assert.assertTrue ( org.ovirt.engine.core.common.utils.ObjectUtils.objectsEqual ( null , null ) ) ; junit.framework.Assert.assertFalse ( org.ovirt.engine.core.common.utils.ObjectUtils.objectsEqual ( ten , null ) ) ; junit.framework.Assert.assertFalse ( org.ovirt.engine.core.common.utils.ObjectUtils.objectsEqual ( null , ten ) ) ; }

Target:
public void testObjectsEqual ( ) { java.lang.Integer ten = java.lang.Integer.valueOf ( 10 ) ; org.junit.Assert.assertFalse ( org.ovirt.engine.core.common.utils.ObjectUtils.objectsEqual ( ten , java.lang.Integer.valueOf ( 20 ) ) ) ; org.junit.Assert.assertTrue ( org.ovirt.engine.core.common.utils.ObjectUtils.objectsEqual ( ten , java.lang.Integer.valueOf ( 10 ) ) ) ; org.junit.Assert.assertTrue ( org.ovirt.engine.core.common.utils.ObjectUtils.objectsEqual ( null , null ) ) ; org.junit.Assert.assertFalse ( org.ovirt.engine.core.common.utils.ObjectUtils.objectsEqual ( ten , null ) ) ; org.junit.Assert.assertFalse ( org.ovirt.engine.core.common.utils.ObjectUtils.objectsEqual ( null , ten ) ) ; }