auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private void updateCustomMigrationBandwidthLimitEnabledState ( org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterModel clusterModel , java.lang.String disabilityHint ) { final org.ovirt.engine.ui.uicompat.external.Optional < java.lang.Boolean > isEnabledOptional = computeCustomMigrationBandwidthLimitEnabledState ( clusterModel ) ; if ( ! ( isEnabledOptional.isPresent ( ) ) ) { return ; } if ( ( disabilityHint != null ) && ( ! ( isEnabledOptional.get ( ) ) ) ) { getView ( ) . getCustomMigrationBandwidthLimitEditor ( ) . disable ( disabilityHint ) ; return ; } getView ( ) . getCustomMigrationBandwidthLimitEditor ( ) . setEnabled ( isEnabledOptional.get ( ) ) ; }

Target:
private void updateCustomMigrationBandwidthLimitEnabledState ( org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterModel clusterModel , java.lang.String disabilityHint ) { final java.util.Optional < java.lang.Boolean > isEnabledOptional = computeCustomMigrationBandwidthLimitEnabledState ( clusterModel ) ; if ( ! ( isEnabledOptional.isPresent ( ) ) ) { return ; } if ( ( disabilityHint != null ) && ( ! ( isEnabledOptional.get ( ) ) ) ) { getView ( ) . getCustomMigrationBandwidthLimitEditor ( ) . disable ( disabilityHint ) ; return ; } getView ( ) . getCustomMigrationBandwidthLimitEditor ( ) . setEnabled ( isEnabledOptional.get ( ) ) ; }
Source:
public com.google.gwt.resources.client.ImageResource getValue ( org.ovirt.engine.core.common.businessentities.VM object ) { boolean isDiskPlugged = getDetailModel ( ) . isDiskPluggedToVm ( object ) ; setTitle ( ( isDiskPlugged ? constants.activeDisk ( ) : constants.unactiveDisk ( ) ) ) ; return isDiskPlugged ? getCommonResources ( ) . upImage ( ) : getCommonResources ( ) . downImage ( ) ; }

Target:
public com.google.gwt.resources.client.ImageResource getValue ( org.ovirt.engine.core.common.businessentities.VM object ) { boolean isDiskPlugged = getDetailModel ( ) . isDiskPluggedToVm ( object ) ; setTitle ( ( isDiskPlugged ? constants.activeDisk ( ) : constants.inactiveDisk ( ) ) ) ; return isDiskPlugged ? getCommonResources ( ) . upImage ( ) : getCommonResources ( ) . downImage ( ) ; }
Source:
public void edit ( final org.ovirt.engine.ui.uicommonweb.models.vms.key_value.KeyValueModel object ) { setPanel ( object ) ; if ( ( object.getKeyValueLines ( ) . getItemsChangedEvent ( ) . getListeners ( ) . size ( ) ) == 0 ) { object.getKeyValueLines ( ) . getItemsChangedEvent ( ) . addListener ( new org.ovirt.engine.ui.uicompat.IEventListener ( ) { @ java.lang.Override public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { setPanel ( object ) ; } } ) ; } }

Target:
protected void init ( org.ovirt.engine.ui.uicommonweb.models.vms.key_value.KeyValueModel model ) { this . model = model ; widgets.clear ( ) ; super . init ( model ) ; if ( ! ( enabled ) ) { removeWidget ( widgets.getLast ( ) ) ; } }
Source:
protected void verifyCollection ( java.util.List < org.ovirt.engine.api.model.Snapshot > collection ) throws java.lang.Exception { assertNotNull ( collection ) ; assertEquals ( 2 , collection.size ( ) ) ; for ( int i = 0 ; i < 2 ; i ++ ) { verifyModel ( collection.get ( i ) , i ) ; } }

Target:
protected void verifyCollection ( java.util.List < org.ovirt.engine.api.model.Snapshot > collection ) throws java.lang.Exception { org.junit.Assert.assertNotNull ( collection ) ; org.junit.Assert.assertEquals ( 2 , collection.size ( ) ) ; for ( int i = 0 ; i < 2 ; i ++ ) { verifyModel ( collection.get ( i ) , i ) ; } }
Source:
public void onSuccess ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue returnValue ) { @ java.lang.SuppressWarnings ( value = "unchecked" ) java.util.List < org.ovirt.engine.core.common.businessentities.VmRngDevice > devs = returnValue.getReturnValue ( ) ; getModel ( ) . getIsRngEnabled ( ) . setEntity ( ( ! ( devs.isEmpty ( ) ) ) ) ; getModel ( ) . setRngDevice ( ( devs.isEmpty ( ) ? new org.ovirt.engine.core.common.businessentities.VmRngDevice ( ) : devs.get ( 0 ) ) ) ; }

Target:
public void onSuccess ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue returnValue ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmRngDevice > devs = returnValue.getReturnValue ( ) ; getModel ( ) . getIsRngEnabled ( ) . setEntity ( ( ! ( devs.isEmpty ( ) ) ) ) ; final org.ovirt.engine.core.common.businessentities.VmRngDevice rngDevice = ( devs.isEmpty ( ) ) ? new org.ovirt.engine.core.common.businessentities.VmRngDevice ( ) : devs.get ( 0 ) ; rngDevice.updateSourceByVersion ( getModel ( ) . getCompatibilityVersion ( ) ) ; getModel ( ) . setRngDevice ( rngDevice ) ; }
Source:
public void setUsePatternFly ( final boolean use ) { super . setUsePatternFly ( use ) ; if ( use ) { getCheckboxWidgetLabel ( ) . getStyle ( ) . setPaddingLeft ( 10 , Unit.PX ) ; getCheckboxWidgetLabel ( ) . getStyle ( ) . setPosition ( Position.RELATIVE ) ; getCheckboxWidgetLabel ( ) . getStyle ( ) . setTop ( ( - 3 ) , Unit.PX ) ; getContentWidgetElement ( ) . removeClassName ( PatternflyConstants.FORM_CONTROL ) ; } }

Target:
public void setUsePatternFly ( final boolean use ) { super . setUsePatternFly ( use ) ; if ( use ) { getCheckboxWidgetLabel ( ) . getStyle ( ) . setPaddingLeft ( 10 , Unit.PX ) ; getCheckboxWidgetLabel ( ) . getStyle ( ) . setPosition ( Position.RELATIVE ) ; getCheckboxWidgetLabel ( ) . getStyle ( ) . setTop ( ( - 3 ) , Unit.PX ) ; getContentWidgetElement ( ) . removeClassName ( Styles.FORM_CONTROL ) ; } }
Source:
private void handleTicketGenerationError ( org.ovirt.engine.core.common.action.VdcReturnValueBase commandResult ) { org.ovirt.engine.core.bll.ConfigureConsoleOptionsQuery.getQueryReturnValue ( ) . setSucceeded ( false ) ; if ( commandResult.getValidationMessages ( ) . contains ( EngineMessage.SETTING_VM_TICKET_FAILED_CONSOLE_OF_VM_CURRENTLY_USED_BY_ADMIN_USER.name ( ) ) ) { org.ovirt.engine.core.bll.ConfigureConsoleOptionsQuery.getQueryReturnValue ( ) . setExceptionString ( EngineMessage.SETTING_VM_TICKET_FAILED_CONSOLE_OF_VM_CURRENTLY_USED_BY_ADMIN_USER.name ( ) ) ; return ; } org.ovirt.engine.core.bll.ConfigureConsoleOptionsQuery.getQueryReturnValue ( ) . setExceptionString ( EngineMessage.GENERAL_FAILURE.name ( ) ) ; }

Target:
private void handleTicketGenerationError ( org.ovirt.engine.core.common.action.VdcReturnValueBase commandResult ) { org.ovirt.engine.core.bll.ConfigureConsoleOptionsQuery.getQueryReturnValue ( ) . setSucceeded ( false ) ; if ( commandResult.getValidationMessages ( ) . contains ( EngineMessage.USER_CANNOT_FORCE_RECONNECT_TO_VM.name ( ) ) ) { org.ovirt.engine.core.bll.ConfigureConsoleOptionsQuery.getQueryReturnValue ( ) . setExceptionString ( EngineMessage.USER_CANNOT_FORCE_RECONNECT_TO_VM.name ( ) ) ; return ; } org.ovirt.engine.core.bll.ConfigureConsoleOptionsQuery.getQueryReturnValue ( ) . setExceptionString ( EngineMessage.SETTING_VM_TICKET_FAILED.name ( ) ) ; }
Source:
private void resetIrs ( ) { if ( ( org.ovirt.engine.core.bll.storage.FenceVdsManualyCommand.getStoragePool ( ) . getspm_vds_id ( ) ) != null ) { org.ovirt.engine.core.common.vdscommands.ResetIrsVDSCommandParameters tempVar = new org.ovirt.engine.core.common.vdscommands.ResetIrsVDSCommandParameters ( org.ovirt.engine.core.bll.storage.FenceVdsManualyCommand.getStoragePool ( ) . getId ( ) , org.ovirt.engine.core.bll.storage.FenceVdsManualyCommand.getStoragePool ( ) . getspm_vds_id ( ) ) ; tempVar.setVdsAlreadyRebooted ( true ) ; runVdsCommand ( VDSCommandType.ResetIrs , tempVar ) ; } }

Target:
private void resetIrs ( ) { if ( ( org.ovirt.engine.core.bll.storage.FenceVdsManualyCommand.getStoragePool ( ) . getSpmVdsId ( ) ) != null ) { org.ovirt.engine.core.common.vdscommands.ResetIrsVDSCommandParameters tempVar = new org.ovirt.engine.core.common.vdscommands.ResetIrsVDSCommandParameters ( org.ovirt.engine.core.bll.storage.FenceVdsManualyCommand.getStoragePool ( ) . getId ( ) , org.ovirt.engine.core.bll.storage.FenceVdsManualyCommand.getStoragePool ( ) . getSpmVdsId ( ) ) ; tempVar.setVdsAlreadyRebooted ( true ) ; runVdsCommand ( VDSCommandType.ResetIrs , tempVar ) ; } }
Source:
private static org.ovirt.engine.core.bll.ValidationResult assignFirstCpuProfile ( org.ovirt.engine.core.common.businessentities.VmBase vmBase ) { java.util.List < org.ovirt.engine.core.common.businessentities.profiles.CpuProfile > cpuProfilesWithPermissions = org.ovirt.engine.core.bll.profiles.CpuProfileHelper.getCpuProfileDao ( ) . getAllForCluster ( vmBase.getVdsGroupId ( ) ) ; if ( cpuProfilesWithPermissions.isEmpty ( ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_CPU_PROFILE_EMPTY ) ; } else { vmBase.setCpuProfileId ( cpuProfilesWithPermissions.get ( 0 ) . getId ( ) ) ; return org.ovirt.engine.core.bll.ValidationResult.VALID ; } }

Target:
public static org.ovirt.engine.core.bll.ValidationResult assignFirstCpuProfile ( org.ovirt.engine.core.common.businessentities.VmBase vmBase , org.ovirt.engine.core.compat.Guid userId ) { java.util.List < org.ovirt.engine.core.common.businessentities.profiles.CpuProfile > cpuProfilesWithPermissions = org.ovirt.engine.core.bll.profiles.CpuProfileHelper.getCpuProfileDao ( ) . getAllForCluster ( vmBase.getVdsGroupId ( ) , userId , ( userId != null ) , ActionGroup.ASSIGN_CPU_PROFILE ) ; if ( cpuProfilesWithPermissions.isEmpty ( ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_CPU_PROFILE_EMPTY ) ; } else { vmBase.setCpuProfileId ( cpuProfilesWithPermissions.get ( 0 ) . getId ( ) ) ; return org.ovirt.engine.core.bll.ValidationResult.VALID ; } }
Source:
public void getAllTemplatesFromExportDomain ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , 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 ? source : new java.util.HashMap < org.ovirt.engine.core.common.businessentities.VmTemplate , java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.DiskImage > > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetAllFromExportDomainQueryParameters getAllFromExportDomainQueryParamenters = new org.ovirt.engine.core.common.queries.GetAllFromExportDomainQueryParameters ( storagePoolId , storageDomainId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetTemplatesFromExportDomain , getAllFromExportDomainQueryParamenters , aQuery ) ; }

Target:
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.storage.LUNs > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.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 setup ( ) { tagsDirector = org.mockito.Mockito.spy ( org.ovirt.engine.core.bll.TagsDirector.getInstance ( ) ) ; org.mockito.Mockito.when ( tagDao.getAllForParent ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( java.util.Collections.< org.ovirt.engine.core.common.businessentities.tags > emptyList ( ) ) ; org.mockito.Mockito.doReturn ( tagDao ) . when ( tagsDirector ) . getTagDAO ( ) ; org.mockito.Mockito.doNothing ( ) . when ( tagsDirector ) . updateTagInBackend ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.tags.class ) ) ; tagsDirector.init ( ) ; }

Target:
public void setup ( ) { tagsDirector = org.mockito.Mockito.spy ( org.ovirt.engine.core.bll.TagsDirector.getInstance ( ) ) ; org.mockito.Mockito.when ( tagDao.getAllForParent ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( java.util.Collections.< org.ovirt.engine.core.common.businessentities.Tags > emptyList ( ) ) ; org.mockito.Mockito.doReturn ( tagDao ) . when ( tagsDirector ) . getTagDAO ( ) ; org.mockito.Mockito.doNothing ( ) . when ( tagsDirector ) . updateTagInBackend ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.Tags.class ) ) ; tagsDirector.init ( ) ; }
Source:
public void testGetNetworkDevices ( ) { java.util.List < java.lang.String > networkDevices = OsRepositoryImpl.INSTANCE.getNetworkDevices ( 777 , null ) ; org.junit.Assert.assertEquals ( 2 , networkDevices.size ( ) ) ; for ( java.lang.String device : org.ovirt.engine.core.utils.OsRepositoryImplTest.NETWORK_DEVICES.split ( "," ) ) { org.junit.Assert.assertTrue ( networkDevices.contains ( device ) ) ; } }

Target:
public void testGetNetworkDevices ( ) { java.util.List < java.lang.String > networkDevices = OsRepositoryImpl.INSTANCE.getNetworkDevices ( 777 , null ) ; org.junit.jupiter.api.Assertions.assertEquals ( 2 , networkDevices.size ( ) ) ; for ( java.lang.String device : org.ovirt.engine.core.utils.OsRepositoryImplTest.NETWORK_DEVICES.split ( "," ) ) { org.junit.jupiter.api.Assertions.assertTrue ( networkDevices.contains ( device ) ) ; } }
Source:
public void testStorageDomainMappings ( ) { assertEquals ( LunStatus.FREE , org.ovirt.engine.api.restapi.types.StorageLogicalUnitMapper.map ( org.ovirt.engine.core.common.businessentities.storage.LunStatus.Free , null ) ) ; assertEquals ( LunStatus.USED , org.ovirt.engine.api.restapi.types.StorageLogicalUnitMapper.map ( org.ovirt.engine.core.common.businessentities.storage.LunStatus.Used , null ) ) ; assertEquals ( LunStatus.UNUSABLE , org.ovirt.engine.api.restapi.types.StorageLogicalUnitMapper.map ( org.ovirt.engine.core.common.businessentities.storage.LunStatus.Unusable , null ) ) ; }

Target:
public void testStorageDomainMappings ( ) { org.junit.Assert.assertEquals ( LunStatus.FREE , org.ovirt.engine.api.restapi.types.StorageLogicalUnitMapper.map ( org.ovirt.engine.core.common.businessentities.storage.LunStatus.Free , null ) ) ; org.junit.Assert.assertEquals ( LunStatus.USED , org.ovirt.engine.api.restapi.types.StorageLogicalUnitMapper.map ( org.ovirt.engine.core.common.businessentities.storage.LunStatus.Used , null ) ) ; org.junit.Assert.assertEquals ( LunStatus.UNUSABLE , org.ovirt.engine.api.restapi.types.StorageLogicalUnitMapper.map ( org.ovirt.engine.core.common.businessentities.storage.LunStatus.Unusable , null ) ) ; }
Source:
public void testRemoveWithoutParam ( ) { container.SetData ( org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_SESSION_ID , org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_KEY , org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_VALUE ) ; container.removeSession ( ) ; org.junit.Assert.assertEquals ( "Get should return the value since the session was not removed" , org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_VALUE , container.GetData ( org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_SESSION_ID , org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_KEY ) ) ; org.ovirt.engine.core.utils.ThreadLocalParamsContainer.setHttpSessionId ( org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_SESSION_ID ) ; container.removeSession ( ) ; org.junit.Assert.assertNull ( "Get should return the value since the session was removed" , container.GetData ( org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_SESSION_ID , org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_KEY ) ) ; }

Target:
public void testCleanExpiredUsersSessionsNoUsers ( ) { org.ovirt.engine.core.dao.DbUserDAO dbUserDAOMcok = initDataForClearTest ( org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_KEY ) ; container.cleanExpiredUsersSessions ( ) ; container.cleanExpiredUsersSessions ( ) ; org.junit.Assert.assertNull ( "Get should return null since the session was removed" , container.GetData ( org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_SESSION_ID , org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_KEY , false ) ) ; org.mockito.Mockito.verifyZeroInteractions ( dbUserDAOMcok ) ; }
Source:
public java.lang.String getVdcObjectName ( ) { org.ovirt.engine.core.common.businessentities.Permission perms = org.ovirt.engine.core.bll.PermissionsCommandBase.getParameters ( ) . getPermission ( ) ; return entityDao.getEntityNameByIdAndType ( perms.getObjectId ( ) , perms.getObjectType ( ) ) ; }

Target:
public java.lang.String getVdcObjectName ( ) { org.ovirt.engine.core.common.businessentities.Permission perms = org.ovirt.engine.core.bll.PermissionsCommandBase.getParameters ( ) . getPermission ( ) ; return org.apache.commons.lang.StringUtils.isNotEmpty ( perms.getObjectName ( ) ) ? perms.getObjectName ( ) : entityDao.getEntityNameByIdAndType ( perms.getObjectId ( ) , perms.getObjectType ( ) ) ; }
Source:
public void initDiskHotpluggableInterfacesMap ( ) { org.ovirt.engine.ui.frontend.AsyncQuery callback = new org.ovirt.engine.ui.frontend.AsyncQuery ( ) ; callback.asyncCallback = new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { diskHotpluggableInterfacesMap = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.OsRepository , new org.ovirt.engine.core.common.queries.OsQueryParameters ( org.ovirt.engine.core.common.queries.OsQueryParameters.OsRepositoryVerb.GetDiskHotpluggableInterfacesMap ) , callback ) ; }

Target:
public void initDiskHotpluggableInterfacesMap ( ) { org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.OsRepository , new org.ovirt.engine.core.common.queries.OsQueryParameters ( org.ovirt.engine.core.common.queries.OsQueryParameters.OsRepositoryVerb.GetDiskHotpluggableInterfacesMap ) , new org.ovirt.engine.ui.frontend.AsyncQuery ( new org.ovirt.engine.ui.frontend.AsyncCallback < org.ovirt.engine.core.common.queries.VdcQueryReturnValue > ( ) { @ java.lang.Override public void onSuccess ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue returnValue ) { diskHotpluggableInterfacesMap = returnValue.getReturnValue ( ) ; } } ) ) ; }
Source:
public static 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.RunQuery ( VdcQueryType.GetVmConfigurationBySnapshot , new org.ovirt.engine.core.common.queries.GetVmConfigurationBySnapshotQueryParams ( snapshotSourceId ) , aQuery ) ; }

Target:
public static void getNextAvailableDiskAliasNameByVMId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetNextAvailableDiskAliasNameByVMId , new org.ovirt.engine.core.common.queries.GetAllDisksByVmIdParameters ( vmId ) , aQuery ) ; }
Source:
public void testGetIdsOfHostsWithStatus ( ) { java.util.List < org.ovirt.engine.core.compat.Guid > hostIds = dao.getIdsOfHostsWithStatus ( VDSStatus.Up ) ; org.junit.Assert.assertEquals ( 5 , hostIds.size ( ) ) ; org.junit.Assert.assertTrue ( hostIds.containsAll ( org.ovirt.engine.core.dao.VdsDynamicDaoTest.HOSTS_WITH_UP_STATUS ) ) ; hostIds = dao.getIdsOfHostsWithStatus ( VDSStatus.Maintenance ) ; org.junit.Assert.assertEquals ( 0 , hostIds.size ( ) ) ; }

Target:
public void testGetIdsOfHostsWithStatus ( ) { java.util.List < org.ovirt.engine.core.compat.Guid > hostIds = dao.getIdsOfHostsWithStatus ( VDSStatus.Up ) ; org.junit.jupiter.api.Assertions.assertEquals ( 5 , hostIds.size ( ) ) ; org.junit.jupiter.api.Assertions.assertTrue ( hostIds.containsAll ( org.ovirt.engine.core.dao.VdsDynamicDaoTest.HOSTS_WITH_UP_STATUS ) ) ; hostIds = dao.getIdsOfHostsWithStatus ( VDSStatus.Maintenance ) ; org.junit.jupiter.api.Assertions.assertEquals ( 0 , hostIds.size ( ) ) ; }
Source:
public void testSucceedInterfaceCanUpdateReadOnly ( ) { initializeCommand ( new org.ovirt.engine.core.common.action.UpdateVmDiskParameters ( vmId , diskImageGuid , createDiskImage ( ) ) ) ; org.mockito.Mockito.doReturn ( true ) . when ( command ) . updateReadOnlyRequested ( ) ; org.mockito.Mockito.doReturn ( ValidationResult.VALID ) . when ( diskValidator ) . isReadOnlyPropertyCompatibleWithInterface ( ) ; org.junit.Assert.assertTrue ( command.validateCanUpdateReadOnly ( diskValidator ) ) ; }

Target:
public void testFailInterfaceCanUpdateReadOnly ( ) { initializeCommand ( new org.ovirt.engine.core.common.action.UpdateVmDiskParameters ( vmId , diskImageGuid , createDiskImage ( ) ) ) ; org.mockito.Mockito.doReturn ( true ) . when ( command ) . updateReadOnlyRequested ( ) ; org.mockito.Mockito.doReturn ( new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.ACTION_TYPE_FAILED_INTERFACE_DOES_NOT_SUPPORT_READ_ONLY_ATTR ) ) . when ( diskValidator ) . isReadOnlyPropertyCompatibleWithInterface ( ) ; org.junit.Assert.assertFalse ( command.validateCanUpdateReadOnly ( diskValidator ) ) ; }
Source:
public org.ovirt.engine.core.common.businessentities.DbUser getUser ( boolean refresh ) { return ( ( org.ovirt.engine.core.common.businessentities.DbUser ) ( getData ( org.ovirt.engine.core.utils.ThreadLocalParamsContainer.getHttpSessionId ( ) , org.ovirt.engine.core.bll.session.SessionDataContainer.USER_PARAMETER_NAME , refresh ) ) ) ; }

Target:
private void removeSessionImpl ( java.lang.String sessionId , int reason , java.lang.String message , java.lang.Object ... msgArgs ) { org.ovirt.engine.core.aaa.AcctUtils.reportRecords ( reason , getPrincipalName ( sessionId ) , ( ( org.ovirt.engine.api.extensions.ExtMap ) ( getData ( sessionId , org.ovirt.engine.core.bll.session.SessionDataContainer.AUTH_RECORD_PARAMETER_NAME , false ) ) ) , ( ( org.ovirt.engine.api.extensions.ExtMap ) ( getData ( sessionId , org.ovirt.engine.core.bll.session.SessionDataContainer.PRINCIPAL_RECORD_PARAMETER_NAME , false ) ) ) , message , msgArgs ) ; sessionInfoMap.remove ( sessionId ) ; }
Source:
private void assertNetworkConfig ( java.util.Map < java.lang.String , java.lang.Object > metaData ) { @ java.lang.SuppressWarnings ( value = "unchecked" ) final java.util.Map < java.lang.String , java.lang.String > networkConfig = ( ( java.util.Map < java.lang.String , java.lang.String > ) ( metaData.get ( "network_config" ) ) ) ; org.junit.Assert.assertThat ( networkConfig , org.hamcrest.Matchers.hasEntry ( "path" , "/etc/network/interfaces" ) ) ; org.junit.Assert.assertThat ( networkConfig , org.hamcrest.Matchers.hasEntry ( "content_path" , "/content/0000" ) ) ; }

Target:
private void assertNetworkConfig ( java.util.Map < java.lang.String , java.lang.Object > metaData ) { @ java.lang.SuppressWarnings ( value = "unchecked" ) final java.util.Map < java.lang.String , java.lang.String > networkConfig = ( ( java.util.Map < java.lang.String , java.lang.String > ) ( metaData.get ( "network_config" ) ) ) ; org.hamcrest.MatcherAssert.assertThat ( networkConfig , org.hamcrest.Matchers.hasEntry ( "path" , "/etc/network/interfaces" ) ) ; org.hamcrest.MatcherAssert.assertThat ( networkConfig , org.hamcrest.Matchers.hasEntry ( "content_path" , "/content/0000" ) ) ; }
Source:
public void postDataCenterWithClusterSelectedItemChanged ( ) { updateDefaultHost ( ) ; updateCustomPropertySheet ( ) ; updateNumOfSockets ( ) ; updateQuotaByCluster ( vm.getQuotaId ( ) , vm.getQuotaName ( ) ) ; updateCpuPinningVisibility ( ) ; initNetworkInterfaces ( ) ; updateMemoryBalloon ( ) ; updateCpuSharesAvailability ( ) ; }

Target:
public void postDataCenterWithClusterSelectedItemChanged ( ) { updateDefaultHost ( ) ; updateCustomPropertySheet ( ) ; updateNumOfSockets ( ) ; updateQuotaByCluster ( vm.getQuotaId ( ) , vm.getQuotaName ( ) ) ; updateCpuPinningVisibility ( ) ; updateMemoryBalloon ( ) ; updateCpuSharesAvailability ( ) ; updateNetworkInterfaces ( networkBehavior , networkInerfaces ) ; updateVirtioScsiAvailability ( ) ; }
Source:
public void testListCrashClientLocale ( ) throws java.lang.Exception { javax.ws.rs.core.UriInfo uriInfo = setUpUriExpectations ( null ) ; locales.add ( org.ovirt.engine.api.restapi.resource.CLIENT_LOCALE ) ; java.lang.Throwable t = new java.lang.RuntimeException ( FAILURE ) ; setUpMacPoolsQueryExpectations ( t ) ; collection.setUriInfo ( uriInfo ) ; try { getCollection ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , org.ovirt.engine.api.restapi.resource.BACKEND_FAILED_CLIENT_LOCALE , t ) ; } finally { locales.clear ( ) ; } }

Target:
public void testListCrashClientLocale ( ) throws java.lang.Exception { javax.ws.rs.core.UriInfo uriInfo = setUpUriExpectations ( null ) ; locales.add ( org.ovirt.engine.api.restapi.resource.CLIENT_LOCALE ) ; java.lang.Throwable t = new java.lang.RuntimeException ( FAILURE ) ; setUpMacPoolsQueryExpectations ( t ) ; collection.setUriInfo ( uriInfo ) ; try { getCollection ( ) ; org.junit.Assert.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , org.ovirt.engine.api.restapi.resource.BACKEND_FAILED_CLIENT_LOCALE , t ) ; } finally { locales.clear ( ) ; } }
Source:
public void getUsbPolicyUsbTypeLegacy ( ) { org.ovirt.engine.api.model.Usb usb = new org.ovirt.engine.api.model.Usb ( ) ; usb.setEnabled ( true ) ; usb.setType ( "legacy" ) ; org.ovirt.engine.core.common.businessentities.VDSGroup vdsGroup = new org.ovirt.engine.core.common.businessentities.VDSGroup ( ) ; assertEquals ( org.ovirt.engine.api.restapi.types.VmMapper.getUsbPolicyOnCreate ( usb , vdsGroup.getCompatibilityVersion ( ) ) , UsbPolicy.ENABLED_LEGACY ) ; }

Target:
public void getUsbPolicyUsbTypeNative ( ) { org.ovirt.engine.api.model.Usb usb = new org.ovirt.engine.api.model.Usb ( ) ; usb.setEnabled ( true ) ; usb.setType ( "native" ) ; assertEquals ( org.ovirt.engine.api.restapi.types.VmMapper.getUsbPolicyOnCreate ( usb ) , UsbPolicy.ENABLED_NATIVE ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc heartBeat ( ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.heartBeat ( ) ; 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 ) ; } }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc allocateVolume ( java.lang.String spUUID , java.lang.String sdUUID , java.lang.String imgGUID , java.lang.String volUUID , java.lang.String size ) { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.allocateVolume ( sdUUID , spUUID , imgGUID , volUUID , size ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; }
Source:
protected void addStoragePermissionByQuotaMode ( java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > permsList , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.compat.Guid StorageDomainId ) { org.ovirt.engine.core.common.businessentities.StoragePool storagePool = null ; if ( storagePoolId != null ) { storagePool = org.ovirt.engine.core.bll.CommandBase.getStoragePoolDAO ( ) . get ( storagePoolId ) ; if ( storagePool != null ) { if ( ( ( storagePool.getQuotaEnforcementType ( ) ) == ( org.ovirt.engine.core.common.businessentities.QuotaEnforcementTypeEnum.DISABLED ) ) || ( ( storagePool.getQuotaEnforcementType ( ) ) == ( org.ovirt.engine.core.common.businessentities.QuotaEnforcementTypeEnum.SOFT_ENFORCEMENT ) ) ) { permsList.add ( new org.ovirt.engine.core.bll.utils.PermissionSubject ( StorageDomainId , org.ovirt.engine.core.common.VdcObjectType.Storage , org.ovirt.engine.core.common.businessentities.ActionGroup.CREATE_DISK ) ) ; } } } }

Target:
protected org.ovirt.engine.core.compat.Guid createTaskInCurrentTransaction ( org.ovirt.engine.core.common.asynctasks.AsyncTaskCreationInfo asyncTaskCreationInfo , org.ovirt.engine.core.common.action.VdcActionType parentCommand , org.ovirt.engine.core.common.VdcObjectType entityType , org.ovirt.engine.core.compat.Guid ... entityIds ) { return createTaskImpl ( asyncTaskCreationInfo , parentCommand , null , entityType , entityIds ) ; }
Source:
public void onSelection ( com.google.gwt.event.logical.shared.SelectionEvent < java.lang.Integer > event ) { if ( ( object ) != null ) { object.setActiveDetailModel ( object.getDetailModels ( ) . get ( event.getSelectedItem ( ) ) ) ; if ( ( event.getSelectedItem ( ) ) == 0 ) { generalView.setMainTabSelectedItem ( ( ( org.ovirt.engine.core.common.businessentities.VM ) ( object.getSelectedItem ( ) ) ) ) ; } } }

Target:
protected void subTabLayoutPanelSelectionChanged ( java.lang.Integer selectedItem ) { if ( ( object ) != null ) { object.setActiveDetailModel ( object.getDetailModels ( ) . get ( selectedItem ) ) ; if ( selectedItem == 0 ) { generalView.setMainTabSelectedItem ( ( ( org.ovirt.engine.core.common.businessentities.VM ) ( object.getSelectedItem ( ) ) ) ) ; } } }
Source:
public void testGetBaseNicWhenCacheIsNotProvided ( ) { org.mockito.Mockito.when ( interfaceDao.get ( baseNic.getVdsId ( ) , baseNic.getName ( ) ) ) . thenReturn ( baseNic ) ; org.junit.Assert.assertThat ( calculateBaseNic.getBaseNic ( vlanNic , null ) , org.hamcrest.CoreMatchers.is ( baseNic ) ) ; org.mockito.Mockito.verify ( interfaceDao ) . get ( org.mockito.ArgumentMatchers.eq ( baseNic.getVdsId ( ) ) , org.mockito.ArgumentMatchers.eq ( baseNic.getName ( ) ) ) ; org.mockito.Mockito.verifyNoMoreInteractions ( interfaceDao ) ; }

Target:
public void testGetBaseNicWhenCacheIsNotProvided ( ) { org.mockito.Mockito.when ( interfaceDao.get ( baseNic.getVdsId ( ) , baseNic.getName ( ) ) ) . thenReturn ( baseNic ) ; org.hamcrest.MatcherAssert.assertThat ( calculateBaseNic.getBaseNic ( vlanNic , null ) , org.hamcrest.CoreMatchers.is ( baseNic ) ) ; org.mockito.Mockito.verify ( interfaceDao ) . get ( org.mockito.ArgumentMatchers.eq ( baseNic.getVdsId ( ) ) , org.mockito.ArgumentMatchers.eq ( baseNic.getName ( ) ) ) ; org.mockito.Mockito.verifyNoMoreInteractions ( interfaceDao ) ; }
Source:
private void localize ( final org.ovirt.engine.ui.webadmin.ApplicationConstants constants ) { status.setText ( constants.rebalanceComplete ( ) ) ; startTimeEditor.setLabel ( constants.rebalanceStartTime ( ) ) ; volumeEditor.setLabel ( constants.rebalanceVolumeName ( ) ) ; clusterEditor.setLabel ( constants.rebalanceClusterVolume ( ) ) ; statusTimeEditor.setLabel ( constants.rebalanceStatusTime ( ) ) ; stopTimeEditor.setLabel ( constants.rebalanceStopTime ( ) ) ; }

Target:
private void localize ( ) { status.setText ( org.ovirt.engine.ui.webadmin.section.main.view.popup.gluster.VolumeRebalanceStatusPopupView.constants.rebalanceComplete ( ) ) ; startTimeEditor.setLabel ( org.ovirt.engine.ui.webadmin.section.main.view.popup.gluster.VolumeRebalanceStatusPopupView.constants.rebalanceStartTime ( ) ) ; volumeEditor.setLabel ( org.ovirt.engine.ui.webadmin.section.main.view.popup.gluster.VolumeRebalanceStatusPopupView.constants.rebalanceVolumeName ( ) ) ; clusterEditor.setLabel ( org.ovirt.engine.ui.webadmin.section.main.view.popup.gluster.VolumeRebalanceStatusPopupView.constants.rebalanceClusterVolume ( ) ) ; statusTimeEditor.setLabel ( org.ovirt.engine.ui.webadmin.section.main.view.popup.gluster.VolumeRebalanceStatusPopupView.constants.rebalanceStatusTime ( ) ) ; stopTimeEditor.setLabel ( org.ovirt.engine.ui.webadmin.section.main.view.popup.gluster.VolumeRebalanceStatusPopupView.constants.rebalanceStopTime ( ) ) ; }
Source:
private void addSyncDiff ( org.ovirt.engine.ui.uicommonweb.models.hosts.network.LogicalNetworkModel networkModel ) { addRow ( org.ovirt.engine.ui.webadmin.section.main.view.popup.host.panels.ItemInfoPopup.templates.imageTextSetupNetwork ( notInSyncImage , org.ovirt.engine.ui.webadmin.section.main.view.popup.host.panels.ItemInfoPopup.constants.hostOutOfSync ( ) ) ) ; com.google.gwt.safehtml.shared.SafeHtml safeHtml = com.google.gwt.safehtml.shared.SafeHtmlUtils.fromTrustedString ( generatePreviewSentence ( ) ) ; addRow ( safeHtml ) ; java.util.List < org.ovirt.engine.core.common.businessentities.network.ReportedConfiguration > panelParameters = filterSyncProperties ( networkModel ) ; com.google.gwt.user.client.ui.Widget networkOutOfSyncPanel = new org.ovirt.engine.ui.webadmin.section.main.view.popup.host.panels.NetworkOutOfSyncPanel ( panelParameters ) . outOfSyncTableAsWidget ( ) ; contents.insertRow ( contents.getRowCount ( ) ) ; contents.setWidget ( contents.getRowCount ( ) , 0 , networkOutOfSyncPanel ) ; }

Target:
private void addSyncDiff ( org.ovirt.engine.ui.uicommonweb.models.hosts.network.LogicalNetworkModel networkModel ) { addRow ( org.ovirt.engine.ui.webadmin.section.main.view.popup.host.panels.ItemInfoPopup.templates.imageTextSetupNetwork ( notInSyncImage , org.ovirt.engine.ui.webadmin.section.main.view.popup.host.panels.ItemInfoPopup.templates.coloredText ( org.ovirt.engine.ui.webadmin.section.main.view.popup.host.panels.ItemInfoPopup.constants.hostOutOfSync ( ) , org.ovirt.engine.ui.webadmin.section.main.view.popup.host.panels.ItemInfoPopup.TEXT_COLOR ) ) ) ; com.google.gwt.safehtml.shared.SafeHtml safeHtml = com.google.gwt.safehtml.shared.SafeHtmlUtils.fromTrustedString ( generatePreviewSentence ( ) ) ; addRow ( safeHtml ) ; java.util.List < org.ovirt.engine.core.common.businessentities.network.ReportedConfiguration > panelParameters = filterSyncProperties ( networkModel ) ; com.google.gwt.user.client.ui.Widget networkOutOfSyncPanel = new org.ovirt.engine.ui.webadmin.section.main.view.popup.host.panels.NetworkOutOfSyncPanel ( panelParameters ) . outOfSyncTableAsWidget ( ) ; contents.insertRow ( contents.getRowCount ( ) ) ; contents.setWidget ( contents.getRowCount ( ) , 0 , networkOutOfSyncPanel ) ; }
Source:
public void getExternalProviderComputeResourceList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.businessentities.Provider provider ) { 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.ExternalComputeResource > ( ) ; } return source ; } } ; org.ovirt.engine.core.common.queries.ProviderQueryParameters params = new org.ovirt.engine.core.common.queries.ProviderQueryParameters ( ) ; params.setProvider ( provider ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetComputeResourceFromExternalProvider , params , aQuery ) ; }

Target:
public void getAllProvidersByType ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.businessentities.ProviderType providerType ) { 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.Provider > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllProviders , new org.ovirt.engine.core.common.queries.GetAllProvidersParameters ( providerType ) , aQuery ) ; }
Source:
public static org.ovirt.engine.api.model.Storage map ( org.ovirt.engine.api.restapi.types.StorageDomain entity , org.ovirt.engine.api.model.Storage template ) { org.ovirt.engine.api.model.Storage model = ( template != null ) ? template : new org.ovirt.engine.api.model.Storage ( ) ; model.setId ( entity.getStorage ( ) ) ; model.setType ( org.ovirt.engine.api.restapi.types.StorageDomainMapper.map ( entity.getStorageType ( ) , null ) ) ; model.setVolumeGroup ( new org.ovirt.engine.api.model.VolumeGroup ( ) ) ; model.getVolumeGroup ( ) . setId ( entity.getStorage ( ) ) ; return model ; }

Target:
public static org.ovirt.engine.api.model.HostStorage map ( org.ovirt.engine.api.restapi.types.StorageDomain entity , org.ovirt.engine.api.model.HostStorage template ) { org.ovirt.engine.api.model.HostStorage model = ( template != null ) ? template : new org.ovirt.engine.api.model.HostStorage ( ) ; model.setId ( entity.getStorage ( ) ) ; model.setType ( org.ovirt.engine.api.restapi.types.StorageDomainMapper.map ( entity.getStorageType ( ) , null ) ) ; model.setVolumeGroup ( new org.ovirt.engine.api.model.VolumeGroup ( ) ) ; model.getVolumeGroup ( ) . setId ( entity.getStorage ( ) ) ; return model ; }
Source:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { boolean isNameUnique = ( ( java.lang.Boolean ) ( returnValue ) ) ; if ( ! isNameUnique ) { model.getInvalidityReasons ( ) . clear ( ) ; model.getName ( ) . getInvalidityReasons ( ) . add ( org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getConstants ( ) . nameMustBeUniqueInvalidReason ( ) ) ; model.getName ( ) . setIsValid ( false ) ; model.setIsValid ( false ) ; } else { postNameUniqueCheck ( vm ) ; } }

Target:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { boolean isNameUnique = ( ( java.lang.Boolean ) ( returnValue ) ) ; if ( ! isNameUnique ) { model.getInvalidityReasons ( ) . clear ( ) ; model.getName ( ) . getInvalidityReasons ( ) . add ( org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getConstants ( ) . nameMustBeUniqueInvalidReason ( ) ) ; model.getName ( ) . setIsValid ( false ) ; model.setIsValid ( false ) ; model.fireValidationCompleteEvent ( ) ; } else { postNameUniqueCheck ( vm ) ; } }
Source:
public static void getClusterGlusterServices ( 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 ; } } ; org.ovirt.engine.core.common.queries.gluster.GlusterVolumeAdvancedDetailsParameters parameters = new org.ovirt.engine.core.common.queries.gluster.GlusterVolumeAdvancedDetailsParameters ( clusterId , null , null , false ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterVolumeAdvancedDetails , parameters , aQuery ) ; }

Target:
public static 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 setUp ( ) { super . setUp ( ) ; vm = new org.ovirt.engine.core.common.businessentities.VM ( ) ; vm.setStatus ( VMStatus.Down ) ; org.mockito.Mockito.when ( vmDao.getVmsListForDisk ( getDiskImageId ( ) , java.lang.Boolean.FALSE ) ) . thenReturn ( java.util.Collections.singletonList ( vm ) ) ; }

Target:
public void setUp ( ) { super . setUp ( ) ; vm = new org.ovirt.engine.core.common.businessentities.VM ( ) ; vm.setStatus ( VMStatus.Down ) ; org.mockito.Mockito.when ( vmDao.getVmsListForDisk ( diskImageId , java.lang.Boolean.FALSE ) ) . thenReturn ( java.util.Collections.singletonList ( vm ) ) ; }
Source:
public java.lang.Void runInTransaction ( ) { for ( org.ovirt.engine.core.compat.Guid asyncTaskId : getReturnValue ( ) . getTaskPlaceHolderIdList ( ) ) { org.ovirt.engine.core.common.businessentities.AsyncTasks task = org.ovirt.engine.core.bll.tasks.TaskManagerUtil.getAsyncTaskFromDb ( asyncTaskId ) ; if ( ( task != null ) && ( org.ovirt.engine.core.compat.Guid.isNullOrEmpty ( task.getVdsmTaskId ( ) ) ) ) { org.ovirt.engine.core.bll.tasks.TaskManagerUtil.removeTaskFromDbByTaskId ( task.getTaskId ( ) ) ; } } return null ; }

Target:
public java.lang.Void runInTransaction ( ) { for ( org.ovirt.engine.core.compat.Guid asyncTaskId : getReturnValue ( ) . getTaskPlaceHolderIdList ( ) ) { org.ovirt.engine.core.common.businessentities.AsyncTask task = org.ovirt.engine.core.bll.tasks.CommandCoordinatorUtil.getAsyncTaskFromDb ( asyncTaskId ) ; if ( ( task != null ) && ( org.ovirt.engine.core.compat.Guid.isNullOrEmpty ( task.getVdsmTaskId ( ) ) ) ) { org.ovirt.engine.core.bll.tasks.CommandCoordinatorUtil.removeTaskFromDbByTaskId ( task.getTaskId ( ) ) ; } } return null ; }
Source:
public static void getNextAvailableDiskAliasNameByVMId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetNextAvailableDiskAliasNameByVMId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }

Target:
public void getVmNicList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ) ( source ) ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmInterfacesByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
private void MigrationMode_EntityChanged ( java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { if ( ( org.ovirt.engine.core.common.businessentities.MigrationSupport.PINNED_TO_HOST ) == ( getMigrationMode ( ) . getSelectedItem ( ) ) ) { getHostCpu ( ) . setIsChangable ( true ) ; } else { getHostCpu ( ) . setEntity ( false ) ; getHostCpu ( ) . setIsChangable ( false ) ; } behavior.updateCpuPinningVisibility ( ) ; }

Target:
private void UpdateNumOfMonitors ( ) { if ( isVncSelected ( ) ) { getNumOfMonitors ( ) . setSelectedItem ( 1 ) ; getNumOfMonitors ( ) . setIsChangable ( false ) ; } else { getNumOfMonitors ( ) . setIsChangable ( true ) ; } }
Source:
private static void addPermission ( org.ovirt.engine.core.compat.Guid userId , org.ovirt.engine.core.compat.Guid entityId , org.ovirt.engine.core.bll.PredefinedRoles role ) { org.ovirt.engine.core.common.businessentities.permissions perms = new org.ovirt.engine.core.common.businessentities.permissions ( ) ; perms.setad_element_id ( userId ) ; perms.setObjectType ( VdcObjectType.Network ) ; perms.setObjectId ( entityId ) ; perms.setrole_id ( role.getId ( ) ) ; org.ovirt.engine.core.bll.MultiLevelAdministrationHandler.addPermission ( perms ) ; }

Target:
private static void addPermission ( org.ovirt.engine.core.compat.Guid userId , org.ovirt.engine.core.compat.Guid entityId , org.ovirt.engine.core.bll.PredefinedRoles role , org.ovirt.engine.core.common.VdcObjectType objectType ) { org.ovirt.engine.core.common.businessentities.permissions perms = new org.ovirt.engine.core.common.businessentities.permissions ( ) ; perms.setad_element_id ( userId ) ; perms.setObjectType ( objectType ) ; perms.setObjectId ( entityId ) ; perms.setrole_id ( role.getId ( ) ) ; org.ovirt.engine.core.bll.MultiLevelAdministrationHandler.addPermission ( perms ) ; }
Source:
private void writeModel ( ) { writer.writeStartElement ( "model" ) ; writer.writeStartElement ( "types" ) ; model.types ( ) . forEach ( this :: writeType ) ; writer.writeEndElement ( ) ; writer.writeStartElement ( "services" ) ; model.services ( ) . forEach ( this :: writeService ) ; writer.writeEndElement ( ) ; writer.writeEndElement ( ) ; }

Target:
private void writeParameter ( org.ovirt.api.metamodel.concepts.Parameter parameter ) { writer.writeStartElement ( "parameter" ) ; writeCommon ( parameter ) ; writer.writeElement ( "in" , java.lang.Boolean.toString ( parameter.isIn ( ) ) ) ; writer.writeElement ( "out" , java.lang.Boolean.toString ( parameter.isIn ( ) ) ) ; writeTypeRef ( parameter.getType ( ) ) ; writer.writeEndElement ( ) ; }
Source:
public org.ovirt.engine.core.common.eventqueue.EventResult masterDomainNotOperational ( org.ovirt.engine.core.compat.Guid storageDomainId , org.ovirt.engine.core.compat.Guid storagePoolId , boolean isReconstructToInactiveDomains ) { org.ovirt.engine.core.common.action.VdcActionParametersBase parameters = new org.ovirt.engine.core.common.action.ReconstructMasterParameters ( storagePoolId , storageDomainId , true , isReconstructToInactiveDomains ) ; boolean isSucceeded = org.ovirt.engine.core.bll.Backend.getInstance ( ) . runInternalAction ( VdcActionType.ReconstructMasterDomain , parameters , org.ovirt.engine.core.bll.job.ExecutionHandler.createInternalJobContext ( ) ) . getSucceeded ( ) ; return new org.ovirt.engine.core.common.eventqueue.EventResult ( isSucceeded , org.ovirt.engine.core.common.eventqueue.EventType.RECONSTRUCT ) ; }

Target:
public org.ovirt.engine.core.common.eventqueue.EventResult masterDomainNotOperational ( org.ovirt.engine.core.compat.Guid storageDomainId , org.ovirt.engine.core.compat.Guid storagePoolId , boolean isReconstructToInactiveDomains , boolean canReconstructToCurrentMaster ) { org.ovirt.engine.core.common.action.VdcActionParametersBase parameters = new org.ovirt.engine.core.common.action.ReconstructMasterParameters ( storagePoolId , storageDomainId , true , isReconstructToInactiveDomains , canReconstructToCurrentMaster ) ; boolean isSucceeded = org.ovirt.engine.core.bll.Backend.getInstance ( ) . runInternalAction ( VdcActionType.ReconstructMasterDomain , parameters , org.ovirt.engine.core.bll.job.ExecutionHandler.createInternalJobContext ( ) ) . getSucceeded ( ) ; return new org.ovirt.engine.core.common.eventqueue.EventResult ( isSucceeded , org.ovirt.engine.core.common.eventqueue.EventType.RECONSTRUCT ) ; }