auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public static synchronized java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmOsType > getWindowsOsTypes ( ) { if ( ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.windowsOsTypes ) != null ) { return org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.windowsOsTypes ; } org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.windowsOsTypes = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmOsType > ( ) ; for ( org.ovirt.engine.core.common.businessentities.VmOsType type : org.ovirt.engine.core.common.businessentities.VmOsType.values ( ) ) { if ( type.isWindows ( ) ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.windowsOsTypes.add ( type ) ; } } return org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.windowsOsTypes ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.windowsOsIds = ( ( java.util.ArrayList < java.lang.Integer > ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ) ) ; }
Source:
public boolean matches ( final java.lang.Object o ) { org.ovirt.engine.core.common.queries.SearchParameters param = ( ( org.ovirt.engine.core.common.queries.SearchParameters ) ( o ) ) ; return param.getSearchTypeValue ( ) . equals ( SearchType.VDS ) ; }

Target:
private void VdsExistWithHigherVersion ( ) { org.ovirt.engine.core.common.businessentities.VDS vds = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; vds.setstatus ( VDSStatus.Up ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VDS > vdsList = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( ) ; vdsList.add ( vds ) ; org.mockito.Mockito.when ( vdsDAO.getAllForVdsGroup ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( vdsList ) ; }
Source:
protected boolean canDoAction ( ) { if ( ! ( super . canDoAction ( ) ) ) { return false ; } if ( ( userProfileDao.getByUserId ( org.ovirt.engine.core.bll.UpdateUserProfileCommand.getUserId ( ) ) ) == null ) { return failCanDoAction ( VdcBllMessages.ACTION_TYPE_FAILED_PROFILE_NOT_EXIST ) ; } return true ; }

Target:
protected boolean canDoAction ( ) { if ( ! ( super . canDoAction ( ) ) ) { return false ; } if ( ( userProfileDao.getByUserId ( org.ovirt.engine.core.bll.UpdateUserProfileCommand.getUserId ( ) ) ) == null ) { return failCanDoAction ( EngineMessage.ACTION_TYPE_FAILED_PROFILE_NOT_EXIST ) ; } return true ; }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { if ( ( ( getIsImportGlusterConfiguration ( ) . getEntity ( ) ) != null ) && ( ( java.lang.Boolean ) ( getIsImportGlusterConfiguration ( ) . getEntity ( ) ) ) ) { getGlusterHostAddress ( ) . setIsChangable ( true ) ; getGlusterHostPassword ( ) . setIsChangable ( true ) ; } else { getGlusterHostAddress ( ) . setIsChangable ( false ) ; getGlusterHostPassword ( ) . setIsChangable ( false ) ; } }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { setIsFingerprintVerified ( false ) ; if ( ( ( getGlusterHostAddress ( ) . getEntity ( ) ) == null ) || ( ( ( ( java.lang.String ) ( getGlusterHostAddress ( ) . getEntity ( ) ) ) . trim ( ) . length ( ) ) == 0 ) ) { getGlusterHostFingerprint ( ) . setEntity ( "" ) ; return ; } fetchFingerprint ( ( ( java.lang.String ) ( getGlusterHostAddress ( ) . getEntity ( ) ) ) ) ; }
Source:
private void removeDiskImages ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > images = org.ovirt.engine.core.bll.ImagesHandler.filterImageDisks ( getVm ( ) . getDiskMap ( ) . values ( ) , true , false , true ) ; for ( org.ovirt.engine.core.common.businessentities.DiskImage image : images ) { image.setStorageIds ( new java.util.ArrayList < org.ovirt.engine.core.compat.Guid > ( java.util.Arrays.asList ( org.ovirt.engine.core.bll.RemoveVmFromImportExportCommand.getParameters ( ) . getStorageDomainId ( ) ) ) ) ; image.setStoragePoolId ( org.ovirt.engine.core.bll.RemoveVmFromImportExportCommand.getParameters ( ) . getStoragePoolId ( ) ) ; } removeVmImages ( images ) ; }

Target:
private void removeDiskImages ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > images = org.ovirt.engine.core.bll.ImagesHandler.filterImageDisks ( getVm ( ) . getDiskMap ( ) . values ( ) , true , false , true ) ; for ( org.ovirt.engine.core.common.businessentities.storage.DiskImage image : images ) { image.setStorageIds ( new java.util.ArrayList ( java.util.Arrays.asList ( org.ovirt.engine.core.bll.RemoveVmFromImportExportCommand.getParameters ( ) . getStorageDomainId ( ) ) ) ) ; image.setStoragePoolId ( org.ovirt.engine.core.bll.RemoveVmFromImportExportCommand.getParameters ( ) . getStoragePoolId ( ) ) ; } removeVmImages ( images ) ; }
Source:
public static java.util.List < org.ovirt.engine.core.aaa.DirectoryGroup > findGroupsByIds ( final org.ovirt.engine.core.extensions.mgr.ExtensionProxy extension , final java.util.List < java.lang.String > ids ) { java.util.List < org.ovirt.engine.core.aaa.DirectoryGroup > results = new java.util.ArrayList < > ( ) ; for ( java.util.List < java.lang.String > batch : org.ovirt.engine.core.aaa.AuthzUtils.getIdsBatches ( extension , ids ) ) { results.addAll ( org.ovirt.engine.core.aaa.AuthzUtils.queryGroups ( extension , org.ovirt.engine.core.aaa.SearchQueryParsingUtils.generateQueryMap ( batch , QueryEntity.GROUP ) ) ) ; } return results ; }

Target:
public static java.util.List < org.ovirt.engine.core.aaa.DirectoryGroup > findGroupsByIds ( final org.ovirt.engine.core.extensions.mgr.ExtensionProxy extension , final java.lang.String namespace , final java.util.List < java.lang.String > ids , final boolean resolveGroups , final boolean resolveGroupsRecursive ) { java.util.List < org.ovirt.engine.core.aaa.DirectoryGroup > results = new java.util.ArrayList < > ( ) ; for ( java.util.List < java.lang.String > batch : org.ovirt.engine.core.aaa.SearchQueryParsingUtils.getIdsBatches ( extension.getContext ( ) , ids ) ) { results.addAll ( org.ovirt.engine.core.aaa.AuthzUtils.queryGroups ( extension , namespace , org.ovirt.engine.core.aaa.SearchQueryParsingUtils.generateQueryMap ( batch , QueryEntity.GROUP ) , resolveGroups , resolveGroupsRecursive ) ) ; } return results ; }
Source:
private void updateWANDisableEffects ( final org.ovirt.engine.ui.uicommonweb.models.vms.ISpice spice ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getWANDisableEffects ( new org.ovirt.engine.ui.frontend.AsyncQuery ( this , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.SuppressWarnings ( value = "unchecked" ) @ java.lang.Override public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { spice.getOptions ( ) . setWanDisableEffects ( ( ( java.util.List < org.ovirt.engine.core.common.console.ConsoleOptions.WanDisableEffects > ) ( returnValue ) ) ) ; } } ) ) ; }

Target:
private void updateWANDisableEffects ( final org.ovirt.engine.ui.uicommonweb.models.vms.ISpice spice ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getWANDisableEffects ( new org.ovirt.engine.ui.frontend.AsyncQuery ( new org.ovirt.engine.ui.frontend.AsyncCallback < java.util.List < org.ovirt.engine.core.common.console.ConsoleOptions.WanDisableEffects > > ( ) { @ java.lang.SuppressWarnings ( value = "unchecked" ) @ java.lang.Override public void onSuccess ( java.util.List < org.ovirt.engine.core.common.console.ConsoleOptions.WanDisableEffects > returnValue ) { spice.getOptions ( ) . setWanDisableEffects ( returnValue ) ; } } ) ) ; }
Source:
private static int getNextImage ( java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > images , org.ovirt.engine.core.common.businessentities.DiskImage curr ) { for ( int i = 0 ; i < ( images.size ( ) ) ; i ++ ) { if ( images.get ( i ) . getParentId ( ) . equals ( curr.getImageId ( ) ) ) { return i ; } } return - 1 ; }

Target:
public org.ovirt.engine.core.compat.Guid createTask ( org.ovirt.engine.core.compat.Guid taskId , 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 super . createTaskInCurrentTransaction ( taskId , asyncTaskCreationInfo , parentCommand , entityType , entityIds ) ; }
Source:
public void testComplexCommand ( ) { java.lang.String command = createCommand ( new org.ovirt.engine.core.common.utils.ansible.AnsibleCommandBuilder ( ) . privateKey ( java.nio.file.Paths.get ( "/mykey" ) ) . inventoryFile ( java.nio.file.Paths.get ( "/myinventory" ) ) . limit ( "mylimit" ) . verboseLevel ( AnsibleVerbosity.LEVEL3 ) . variables ( new org.ovirt.engine.core.common.utils.Pair ( "a" , "1" ) , new org.ovirt.engine.core.common.utils.Pair ( "b" , "2" ) ) . playbook ( org.ovirt.engine.core.common.utils.ansible.AnsibleCommandBuilderTest.ANSIBLE_PLAYBOOK ) ) ; org.junit.Assert.assertEquals ( join ( AnsibleCommandBuilder.ANSIBLE_COMMAND , "-vvv" , "--private-key=/mykey" , "--inventory=/myinventory" , "--limit=mylimit" , "--extra-vars=a=1" , "--extra-vars=b=2" , org.ovirt.engine.core.common.utils.ansible.AnsibleCommandBuilderTest.ANSIBLE_PLAYBOOK_FULL_PATH ) , command ) ; }

Target:
public void testExtraVariables ( ) { java.lang.String command = createCommand ( new org.ovirt.engine.core.common.utils.ansible.AnsibleCommandBuilder ( ) . variables ( new org.ovirt.engine.core.common.utils.Pair ( "a" , "1" ) , new org.ovirt.engine.core.common.utils.Pair ( "b" , "2" ) , new org.ovirt.engine.core.common.utils.Pair ( "c" , "3" ) ) . playbook ( org.ovirt.engine.core.common.utils.ansible.AnsibleCommandBuilderTest.ANSIBLE_PLAYBOOK ) ) ; org.junit.Assert.assertEquals ( join ( AnsibleCommandBuilder.ANSIBLE_COMMAND , org.ovirt.engine.core.common.utils.ansible.AnsibleCommandBuilderTest.IGNORE_SSH_CONFIG , org.ovirt.engine.core.common.utils.ansible.AnsibleCommandBuilderTest.ANSIBLE_LOG_LEVEL , org.ovirt.engine.core.common.utils.ansible.AnsibleCommandBuilderTest.PRIVATE_KEY , "--extra-vars=a=1" , "--extra-vars=b=2" , "--extra-vars=c=3" , org.ovirt.engine.core.common.utils.ansible.AnsibleCommandBuilderTest.ANSIBLE_PLAYBOOK_FULL_PATH ) , command ) ; }
Source:
public void testRemoveForcedIncomplete ( ) throws java.lang.Exception { setUpGetEntityExpectations ( 1 ) ; setUpVersionExpectations ( ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.RemoveStoragePool , org.ovirt.engine.core.common.action.StoragePoolParametersBase.class , new java.lang.String [ ] { "StoragePoolId" , "ForceDelete" } , new java.lang.Object [ ] { GUIDS [ 0 ] , java.lang.Boolean.FALSE } , true , true ) ) ; org.ovirt.engine.api.model.Action action = new org.ovirt.engine.api.model.Action ( ) ; resource.remove ( action ) ; }

Target:
public void testRemoveForced ( ) throws java.lang.Exception { setUpGetEntityExpectations ( 1 ) ; setUpVersionExpectations ( ) ; javax.ws.rs.core.UriInfo uriInfo = setUpActionExpectations ( VdcActionType.RemoveStoragePool , org.ovirt.engine.core.common.action.StoragePoolParametersBase.class , new java.lang.String [ ] { "StoragePoolId" , "ForceDelete" } , new java.lang.Object [ ] { GUIDS [ 0 ] , java.lang.Boolean.TRUE } , true , true , false ) ; uriInfo = addMatrixParameterExpectations ( uriInfo , BackendDataCenterResource.FORCE , java.lang.Boolean.TRUE.toString ( ) ) ; setUriInfo ( uriInfo ) ; control.replay ( ) ; verifyRemove ( resource.remove ( ) ) ; }
Source:
private org.ovirt.engine.core.bll.ValidationResult modifiedAttachmentExists ( org.ovirt.engine.core.compat.Guid networkAttachmentId ) { boolean doesNotReferenceExistingNetworkAttachment = networkAttachmentId == null ; if ( doesNotReferenceExistingNetworkAttachment ) { return org.ovirt.engine.core.bll.ValidationResult.VALID ; } for ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment existingAttachment : existingAttachments ) { if ( existingAttachment.getId ( ) . equals ( networkAttachmentId ) ) { return org.ovirt.engine.core.bll.ValidationResult.VALID ; } } return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.NETWORK_ATTACHMENT_NOT_EXISTS , org.ovirt.engine.core.utils.ReplacementUtils.createSetVariableString ( org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidator.VAR_NETWORK_ATTACHMENT_NOT_EXISTS_ENTITY , networkAttachmentId.toString ( ) ) ) ; }

Target:
private org.ovirt.engine.core.bll.ValidationResult modifiedAttachmentExists ( org.ovirt.engine.core.compat.Guid networkAttachmentId ) { if ( isNewAttachment ( networkAttachmentId ) ) { return org.ovirt.engine.core.bll.ValidationResult.VALID ; } for ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment existingAttachment : existingAttachments ) { if ( existingAttachment.getId ( ) . equals ( networkAttachmentId ) ) { return org.ovirt.engine.core.bll.ValidationResult.VALID ; } } return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.NETWORK_ATTACHMENT_NOT_EXISTS , org.ovirt.engine.core.utils.ReplacementUtils.createSetVariableString ( org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidator.VAR_NETWORK_ATTACHMENT_NOT_EXISTS_ENTITY , networkAttachmentId.toString ( ) ) ) ; }
Source:
protected void InitDetailModels ( ) { super . InitDetailModels ( ) ; setvmBasicDiskListModel ( new org.ovirt.engine.ui.uicommonweb.models.userportal.VmBasicDiskListModel ( ) ) ; org.ovirt.engine.ui.uicompat.ObservableCollection < org.ovirt.engine.ui.uicommonweb.models.EntityModel > list = new org.ovirt.engine.ui.uicompat.ObservableCollection < org.ovirt.engine.ui.uicommonweb.models.EntityModel > ( ) ; list.add ( getvmBasicDiskListModel ( ) ) ; setDetailModels ( list ) ; setActiveDetailModel ( getvmBasicDiskListModel ( ) ) ; }

Target:
protected void initDetailModels ( ) { super . initDetailModels ( ) ; setvmBasicDiskListModel ( new org.ovirt.engine.ui.uicommonweb.models.userportal.VmBasicDiskListModel ( ) ) ; org.ovirt.engine.ui.uicompat.ObservableCollection < org.ovirt.engine.ui.uicommonweb.models.EntityModel > list = new org.ovirt.engine.ui.uicompat.ObservableCollection < org.ovirt.engine.ui.uicommonweb.models.EntityModel > ( ) ; list.add ( getvmBasicDiskListModel ( ) ) ; setDetailModels ( list ) ; setActiveDetailModel ( getvmBasicDiskListModel ( ) ) ; }
Source:
public void setUp ( ) { disk1 = org.ovirt.engine.core.bll.validator.DiskImagesValidatorTest.createDisk ( ) ; disk1.setDiskAlias ( "disk1" ) ; disk2 = org.ovirt.engine.core.bll.validator.DiskImagesValidatorTest.createDisk ( ) ; disk2.setDiskAlias ( "disk2" ) ; validator = new org.ovirt.engine.core.bll.validator.DiskImagesValidator ( java.util.Arrays.asList ( disk1 , disk2 ) ) ; }

Target:
public void setUp ( ) { disk1 = org.ovirt.engine.core.bll.validator.DiskImagesValidatorTest.createDisk ( ) ; disk1.setDiskAlias ( "disk1" ) ; disk2 = org.ovirt.engine.core.bll.validator.DiskImagesValidatorTest.createDisk ( ) ; disk2.setDiskAlias ( "disk2" ) ; validator = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.validator.DiskImagesValidator ( java.util.Arrays.asList ( disk1 , disk2 ) ) ) ; }
Source:
protected void addJNDIBeans ( ) { addBeanJNDIName ( BeanType.BACKEND , org.ovirt.engine.core.utils.ejb.EngineEJBUtilsStrategy.ENGINE_CONTEXT_PREFIX.concat ( "bll/Backend" ) ) ; addBeanJNDIName ( BeanType.SCHEDULER , org.ovirt.engine.core.utils.ejb.EngineEJBUtilsStrategy.ENGINE_CONTEXT_PREFIX.concat ( "scheduler/Scheduler" ) ) ; addBeanJNDIName ( BeanType.USERS_DOMAINS_CACHE , org.ovirt.engine.core.utils.ejb.EngineEJBUtilsStrategy.ENGINE_CONTEXT_PREFIX.concat ( "bll/UsersDomainsCacheManagerService" ) ) ; addBeanJNDIName ( BeanType.VDS_EVENT_LISTENER , org.ovirt.engine.core.utils.ejb.EngineEJBUtilsStrategy.ENGINE_CONTEXT_PREFIX.concat ( "bll/VdsEventListener" ) ) ; addBeanJNDIName ( BeanType.LOCK_MANAGER , org.ovirt.engine.core.utils.ejb.EngineEJBUtilsStrategy.ENGINE_CONTEXT_PREFIX.concat ( "bll/LockManager" ) ) ; addBeanJNDIName ( BeanType.EVENTQUEUE_MANAGER , org.ovirt.engine.core.utils.ejb.EngineEJBUtilsStrategy.ENGINE_CONTEXT_PREFIX.concat ( "bll/EventQueue" ) ) ; }

Target:
protected void addJNDIBeans ( ) { addBeanJNDIName ( BeanType.BACKEND , org.ovirt.engine.core.utils.ejb.EngineEJBUtilsStrategy.ENGINE_CONTEXT_PREFIX.concat ( "bll/Backend" ) ) ; addBeanJNDIName ( BeanType.SCHEDULER , org.ovirt.engine.core.utils.ejb.EngineEJBUtilsStrategy.ENGINE_CONTEXT_PREFIX.concat ( "scheduler/Scheduler" ) ) ; addBeanJNDIName ( BeanType.USERS_DOMAINS_CACHE , org.ovirt.engine.core.utils.ejb.EngineEJBUtilsStrategy.ENGINE_CONTEXT_PREFIX.concat ( "bll/UsersDomainsCacheManagerService" ) ) ; addBeanJNDIName ( BeanType.VDS_EVENT_LISTENER , org.ovirt.engine.core.utils.ejb.EngineEJBUtilsStrategy.ENGINE_CONTEXT_PREFIX.concat ( "bll/VdsEventListener" ) ) ; addBeanJNDIName ( BeanType.LOCK_MANAGER , org.ovirt.engine.core.utils.ejb.EngineEJBUtilsStrategy.ENGINE_CONTEXT_PREFIX.concat ( "bll/LockManager" ) ) ; addBeanJNDIName ( BeanType.EVENTQUEUE_MANAGER , org.ovirt.engine.core.utils.ejb.EngineEJBUtilsStrategy.ENGINE_CONTEXT_PREFIX.concat ( "bll/EventQueue" ) ) ; addBeanJNDIName ( BeanType.CACHE_CONTAINER , "java:jboss/infinispan/ovirt-engine" ) ; }
Source:
public void onSuccess ( final org.ovirt.engine.ui.frontend.communication.VdcOperation < org.ovirt.engine.core.common.action.VdcActionType , org.ovirt.engine.core.common.action.VdcActionParametersBase > operation , final org.ovirt.engine.core.common.action.VdcReturnValueBase result ) { org.ovirt.engine.ui.frontend.Frontend.logger.finer ( "Frontend: sucessfully executed runAction, determining result!" ) ; handleActionResult ( actionType , parameters , result , ( callback != null ? callback : org.ovirt.engine.ui.frontend.Frontend.NULLABLE_ASYNC_CALLBACK ) , state , showErrorDialog ) ; }

Target:
public void onSuccess ( final org.ovirt.engine.ui.frontend.communication.VdcOperation < org.ovirt.engine.core.common.action.VdcActionType , org.ovirt.engine.core.common.action.VdcActionParametersBase > operation , final org.ovirt.engine.core.common.action.VdcReturnValueBase result ) { org.ovirt.engine.ui.frontend.Frontend.logger.finer ( "Frontend: sucessfully executed runAction, determining result!" ) ; handleActionResult ( actionType , parameters , result , ( callback != null ? callback : org.ovirt.engine.ui.frontend.Frontend.NULLABLE_ASYNC_CALLBACK ) , state , showErrorDialog ) ; org.ovirt.engine.ui.frontend.communication.RefreshActiveModelEvent.fire ( this , true ) ; }
Source:
private void buildEntryStrings ( java.util.Map < java.lang.String , java.lang.String > locks , java.lang.StringBuilder message ) { if ( locks != null ) { for ( java.util.Map.Entry < java.lang.String , java.lang.String > entry : locks.entrySet ( ) ) { message.append ( "key: " ) . append ( entry.getKey ( ) ) . append ( " value: " ) . append ( entry.getValue ( ) ) . append ( '\n' ) ; } } }

Target:
private void buildEntryStrings ( java.util.Map < java.lang.String , org.ovirt.engine.core.common.utils.Pair < java.lang.String , java.lang.String > > locks , java.lang.StringBuilder message ) { if ( locks != null ) { for ( java.util.Map.Entry < java.lang.String , org.ovirt.engine.core.common.utils.Pair < java.lang.String , java.lang.String > > entry : locks.entrySet ( ) ) { message.append ( "key: " ) . append ( entry.getKey ( ) ) . append ( " value: " ) . append ( entry.getValue ( ) . getFirst ( ) ) . append ( '\n' ) ; } } }
Source:
public void removeAllIllegalDisks ( org.ovirt.engine.core.compat.Guid snapshotId , org.ovirt.engine.core.compat.Guid vmId ) { for ( org.ovirt.engine.core.common.businessentities.DiskImage diskImage : getDiskImageDao ( ) . getAllSnapshotsForVmSnapshot ( snapshotId ) ) { if ( ( diskImage.getImageStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.ImageStatus.ILLEGAL ) ) { org.ovirt.engine.core.bll.ImagesHandler.removeDiskImage ( diskImage , vmId ) ; } } }

Target:
public void removeAllIllegalDisks ( org.ovirt.engine.core.compat.Guid snapshotId , org.ovirt.engine.core.compat.Guid vmId ) { for ( org.ovirt.engine.core.common.businessentities.storage.DiskImage diskImage : getDiskImageDao ( ) . getAllSnapshotsForVmSnapshot ( snapshotId ) ) { if ( ( diskImage.getImageStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.storage.ImageStatus.ILLEGAL ) ) { org.ovirt.engine.core.bll.storage.disk.image.ImagesHandler.removeDiskImage ( diskImage , vmId ) ; } } }
Source:
protected static boolean ValidatMailAddress ( java.lang.String inputEmail ) { final java.lang.String strRegex = "^[\\w-]+(?:\\.[\\w-]+)*@(?:[\\w-]+\\.)+[a-zA-Z]{2,7}$" ; org.ovirt.engine.core.compat.Regex re = new org.ovirt.engine.core.compat.Regex ( strRegex ) ; return re.IsMatch ( inputEmail ) ; }

Target:
protected static boolean isEmailValid ( java.lang.String email ) { boolean valid = false ; try { if ( email == null ) { throw new javax.mail.internet.AddressException ( ) ; } new javax.mail.internet.InternetAddress ( email , true ) ; valid = true ; } catch ( javax.mail.internet.AddressException ignored ) { } return valid ; }
Source:
private void handleDirectorySearcherException ( org.ovirt.engine.api.extensions.ExtMap output , java.lang.Exception ex ) { if ( ex instanceof org.ovirt.engine.extensions.aaa.builtin.kerberosldap.AuthenticationResultException ) { org.ovirt.engine.extensions.aaa.builtin.kerberosldap.AuthenticationResultException authResultException = ( ( org.ovirt.engine.extensions.aaa.builtin.kerberosldap.AuthenticationResultException ) ( ex ) ) ; org.ovirt.engine.core.utils.kerberos.AuthenticationResult result = authResultException.getResult ( ) ; if ( result == null ) { result = org.ovirt.engine.core.utils.kerberos.AuthenticationResult.OTHER ; } org.ovirt.engine.extensions.aaa.builtin.kerberosldap.LdapAuthenticateUserCommand.log.error ( result.getDetailedMessage ( ) ) ; output.put ( Authn.InvokeKeys.RESULT , resultsMap.get ( result ) ) ; } }

Target:
private void handleDirectorySearcherException ( org.ovirt.engine.api.extensions.ExtMap output , java.lang.Exception ex ) { if ( ex instanceof org.ovirt.engine.extensions.aaa.builtin.kerberosldap.AuthenticationResultException ) { org.ovirt.engine.extensions.aaa.builtin.kerberosldap.AuthenticationResultException authResultException = ( ( org.ovirt.engine.extensions.aaa.builtin.kerberosldap.AuthenticationResultException ) ( ex ) ) ; org.ovirt.engine.extensions.aaa.builtin.kerberosldap.utils.kerberos.AuthenticationResult result = authResultException.getResult ( ) ; if ( result == null ) { result = org.ovirt.engine.extensions.aaa.builtin.kerberosldap.utils.kerberos.AuthenticationResult.OTHER ; } org.ovirt.engine.extensions.aaa.builtin.kerberosldap.LdapAuthenticateUserCommand.log.error ( result.getDetailedMessage ( ) ) ; output.put ( Authn.InvokeKeys.RESULT , resultsMap.get ( result ) ) ; } }
Source:
private boolean initRange ( java.lang.String start , java.lang.String end ) { java.util.List < java.lang.String > macAddresses = org.ovirt.engine.core.utils.MacAddressRangeUtils.initRange ( start , end ) ; if ( ( ( macAddresses.size ( ) ) + ( availableMacs.size ( ) ) ) > ( org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( ConfigValues.MaxMacsCountInPool ) ) ) { throw new org.ovirt.engine.core.bll.network.MacPoolManager.MacPoolExceededMaxException ( ) ; } availableMacs.addAll ( macAddresses ) ; return true ; }

Target:
private boolean initRange ( java.lang.String start , java.lang.String end ) { java.util.List < java.lang.String > macAddresses = org.ovirt.engine.core.utils.MacAddressRangeUtils.initRange ( start , end , org.ovirt.engine.core.bll.network.MacPoolManager.MAX_MACS_IN_POOL ) ; if ( ( ( macAddresses.size ( ) ) + ( availableMacs.size ( ) ) ) > ( org.ovirt.engine.core.bll.network.MacPoolManager.MAX_MACS_IN_POOL ) ) { availableMacs.addAll ( macAddresses.subList ( 0 , ( ( org.ovirt.engine.core.bll.network.MacPoolManager.MAX_MACS_IN_POOL ) - ( availableMacs.size ( ) ) ) ) ) ; throw new org.ovirt.engine.core.bll.network.MacPoolManager.MacPoolExceededMaxException ( ) ; } availableMacs.addAll ( macAddresses ) ; return true ; }
Source:
public java.lang.Void runInTransaction ( ) { getImageStorageDomainMapDao ( ) . remove ( new org.ovirt.engine.core.common.businessentities.ImageStorageDomainMapId ( getParameters ( ) . getImageId ( ) , getParameters ( ) . getStorageDomainId ( ) ) ) ; unLockImage ( ) ; return null ; }

Target:
public java.lang.Void runInTransaction ( ) { getImageStorageDomainMapDao ( ) . remove ( new org.ovirt.engine.core.common.businessentities.ImageStorageDomainMapId ( getParameters ( ) . getImageId ( ) , getParameters ( ) . getStorageDomainId ( ) ) ) ; org.ovirt.engine.core.bll.ImagesHandler.updateAllDiskImageSnapshotsStatus ( getRelevantDiskImage ( ) . getId ( ) , getRelevantDiskImage ( ) . getImageStatus ( ) ) ; return null ; }
Source:
protected java.util.Map < java.lang.String , java.lang.String > getExclusiveLocks ( ) { if ( ! ( org.ovirt.engine.core.bll.gluster.GlusterCommandBase.isInternalExecution ( ) ) ) { return java.util.Collections.singletonMap ( org.ovirt.engine.core.bll.gluster.GlusterCommandBase.getVdsGroupId ( ) . toString ( ) , LockingGroup.GLUSTER.name ( ) ) ; } return super . getExclusiveLocks ( ) ; }

Target:
protected java.util.Map < java.lang.String , org.ovirt.engine.core.common.utils.Pair < java.lang.String , java.lang.String > > getExclusiveLocks ( ) { if ( ! ( org.ovirt.engine.core.bll.gluster.GlusterCommandBase.isInternalExecution ( ) ) ) { return java.util.Collections.singletonMap ( org.ovirt.engine.core.bll.gluster.GlusterCommandBase.getVdsGroupId ( ) . toString ( ) , org.ovirt.engine.core.bll.LockMessagesMatchUtil.makeLockingPair ( LockingGroup.GLUSTER , VdcBllMessages.ACTION_TYPE_FAILED_OBJECT_LOCKED ) ) ; } return super . getExclusiveLocks ( ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.ExistingVmModelBehavior existingVmModelBehavior = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.ExistingVmModelBehavior ) ( model ) ) ; runningOnHost = ( ( org.ovirt.engine.core.common.businessentities.VDS ) ( returnValue ) ) ; hostCpu = calculateHostCpus ( ) ; existingVmModelBehavior.updateNumOfSockets ( ) ; }

Target:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel ) ( target ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VDSGroup > clusters = ( ( java.util.List < org.ovirt.engine.core.common.businessentities.VDSGroup > ) ( returnValue ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VDSGroup > filteredClusters = org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . filterByArchitecture ( clusters , vm.getClusterArch ( ) ) ; model.setDataCentersAndClusters ( model , dataCenters , filteredClusters , vm.getVdsGroupId ( ) ) ; initTemplate ( ) ; initCdImage ( ) ; }
Source:
public void testValidateAndSetClusterQuotaForVCPUGlobalOverGrace ( ) throws java.lang.Exception { org.junit.Assert.assertFalse ( quotaManager.validateAndSetClusterQuota ( storage_pool , org.ovirt.engine.core.bll.quota.QuotaManagerTest.DESTINATION_GUID , org.ovirt.engine.core.bll.quota.QuotaManagerTest.VCPU_QUOTA_GLOBAL_OVER_GRACE , 1 , 1 , canDoActionMessages ) ) ; assertNotEmptyCanDoActionMessage ( ) ; assertAuditLogWritten ( ) ; }

Target:
private boolean consumeForStorageQuota ( org.ovirt.engine.core.compat.Guid quotaId ) { org.ovirt.engine.core.bll.quota.QuotaConsumptionParametersWrapper parameters = null ; try { parameters = parametersWrapper.clone ( ) ; parameters.getParameters ( ) . add ( new org.ovirt.engine.core.bll.quota.QuotaStorageConsumptionParameter ( quotaId , null , QuotaConsumptionParameter.QuotaAction.CONSUME , org.ovirt.engine.core.bll.quota.QuotaManagerTest.DESTINATION_GUID , 1.0 ) ) ; } catch ( java.lang.CloneNotSupportedException e ) { } return quotaManager.consume ( parameters ) ; }
Source:
private void addNetworkToPool ( ) { org.ovirt.engine.core.common.businessentities.network.Network network = new org.ovirt.engine.core.common.businessentities.network.Network ( ) ; network.setName ( ( ( org.ovirt.engine.core.common.config.Config.< java.lang.String > getValue ( ConfigValues.ManagementNetwork ) ) + "2" ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > networks = new java.util.ArrayList < > ( ) ; networks.add ( network ) ; org.mockito.Mockito.when ( networkDao.getAllForDataCenter ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( networks ) ; }

Target:
private void addManagementNetworkToPool ( ) { org.ovirt.engine.core.common.businessentities.network.Network network = new org.ovirt.engine.core.common.businessentities.network.Network ( ) ; network.setName ( org.ovirt.engine.core.common.config.Config.< java.lang.String > getValue ( ConfigValues.DefaultManagementNetwork ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > networks = new java.util.ArrayList < > ( ) ; networks.add ( network ) ; org.mockito.Mockito.when ( networkDao.getAllForDataCenter ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( networks ) ; }
Source:
public static void IsDirectLunDiskEnabled ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String version ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Boolean ) ( source ) ) . booleanValue ( ) : true ; } } ; org.ovirt.engine.core.common.queries.GetConfigurationValueParameters params = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.DirectLUNDiskEnabled ) ; params.setVersion ( version ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( params , aQuery ) ; }

Target:
public static void IsLiveStorageMigrationEnabled ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String version ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Boolean ) ( source ) ) . booleanValue ( ) : true ; } } ; org.ovirt.engine.core.common.queries.GetConfigurationValueParameters params = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.LiveStorageMigrationEnabled ) ; params.setVersion ( version ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( params , aQuery ) ; }
Source:
protected void executeQueryCommand ( ) { org.ovirt.engine.core.bll.aaa.IsPasswordDelegationPossibleQuery.getQueryReturnValue ( ) . setReturnValue ( ( ( sessionDataContainer.getPassword ( org.ovirt.engine.core.bll.aaa.IsPasswordDelegationPossibleQuery.getParameters ( ) . getSessionId ( ) ) ) != null ) ) ; org.ovirt.engine.core.bll.aaa.IsPasswordDelegationPossibleQuery.getQueryReturnValue ( ) . setSucceeded ( true ) ; }

Target:
protected void executeQueryCommand ( ) { java.lang.String password = null ; try { password = org.ovirt.engine.core.aaa.SsoUtils.getPassword ( sessionDataContainer.getSsoAccessToken ( org.ovirt.engine.core.bll.aaa.IsPasswordDelegationPossibleQuery.getParameters ( ) . getSessionId ( ) ) ) ; } catch ( java.lang.Exception ex ) { log.error ( "Unable to execute IsPasswordDelegationPossibleQuery with message {}" , ex.getMessage ( ) ) ; log.debug ( "Exception" , ex ) ; } org.ovirt.engine.core.bll.aaa.IsPasswordDelegationPossibleQuery.getQueryReturnValue ( ) . setReturnValue ( ( password != null ) ) ; org.ovirt.engine.core.bll.aaa.IsPasswordDelegationPossibleQuery.getQueryReturnValue ( ) . setSucceeded ( true ) ; }
Source:
public int hashCode ( ) { final int prime = 31 ; int result = 1 ; result = ( prime * result ) + ( getId ( ) . hashCode ( ) ) ; result = ( prime * result ) + ( ( serviceType ) == null ? 0 : serviceType.hashCode ( ) ) ; result = ( prime * result ) + ( ( serviceName ) == null ? 0 : serviceName.hashCode ( ) ) ; return result ; }

Target:
public int hashCode ( ) { return java.util.Objects.hash ( id , serviceType , serviceName ) ; }
Source:
private < T extends org.ovirt.engine.core.dao.DAO > T getDao ( java.lang.Class < T > daoType ) { for ( org.ovirt.engine.core.dao.DAO dao : daos ) { if ( daoType.isAssignableFrom ( dao.getClass ( ) ) ) { return ( ( T ) ( dao ) ) ; } } org.ovirt.engine.core.dal.dbbroker.DbFacade.log.error ( ( "Can't find dao for " + daoType ) ) ; return null ; }

Target:
private < T extends org.ovirt.engine.core.dao.Dao > T getDao ( java.lang.Class < T > daoType ) { for ( org.ovirt.engine.core.dao.Dao dao : daos ) { if ( daoType.isAssignableFrom ( dao.getClass ( ) ) ) { return ( ( T ) ( dao ) ) ; } } org.ovirt.engine.core.dal.dbbroker.DbFacade.log.error ( ( "Can't find dao for " + daoType ) ) ; return null ; }
Source:
public void getVmGuestAgentInterfacesByVmId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmGuestAgentInterface > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmGuestAgentInterfacesByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) . withoutRefresh ( ) , aQuery ) ; }

Target:
public void getVnicProfilesByNetworkId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid networkId ) { 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.VnicProfileView > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVnicProfilesByNetworkId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( networkId ) , aQuery ) ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult validateVmStatusUsingMatrix ( org.ovirt.engine.core.common.businessentities.VM vm ) { if ( ! ( org.ovirt.engine.core.common.VdcActionUtils.CanExecute ( java.util.Arrays.asList ( vm ) , org.ovirt.engine.core.common.businessentities.VM.class , VdcActionType.RunVm ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.ACTION_TYPE_FAILED_VM_STATUS_ILLEGAL ) ; } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult validateVmStatusUsingMatrix ( org.ovirt.engine.core.common.businessentities.VM vm ) { if ( ! ( org.ovirt.engine.core.common.VdcActionUtils.canExecute ( java.util.Arrays.asList ( vm ) , org.ovirt.engine.core.common.businessentities.VM.class , VdcActionType.RunVm ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.ACTION_TYPE_FAILED_VM_STATUS_ILLEGAL , org.ovirt.engine.core.bll.validator.LocalizedVmStatus.from ( vm.getStatus ( ) ) ) ; } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }
Source:
private org.ovirt.engine.core.bll.ValidationResult networksUniquelyConfiguredOnHost ( java.util.Collection < org.ovirt.engine.core.common.businessentities.network.NetworkAttachment > attachmentsToConfigure ) { java.util.Set < org.ovirt.engine.core.compat.Guid > networkIds = new java.util.HashSet ( attachmentsToConfigure.size ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment : attachmentsToConfigure ) { if ( networkIds.contains ( attachment.getNetworkId ( ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.NETWORKS_ALREADY_ATTACHED_TO_IFACES ) ; } else { networkIds.add ( attachment.getNetworkId ( ) ) ; } } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }

Target:
org.ovirt.engine.core.bll.ValidationResult networksUniquelyConfiguredOnHost ( java.util.Collection < org.ovirt.engine.core.common.businessentities.network.NetworkAttachment > attachmentsToConfigure ) { java.util.Set < org.ovirt.engine.core.compat.Guid > usedNetworkIds = new java.util.HashSet ( attachmentsToConfigure.size ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment : attachmentsToConfigure ) { boolean alreadyUsedNetworkId = usedNetworkIds.contains ( attachment.getNetworkId ( ) ) ; if ( alreadyUsedNetworkId ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.NETWORKS_ALREADY_ATTACHED_TO_IFACES ) ; } else { usedNetworkIds.add ( attachment.getNetworkId ( ) ) ; } } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }
Source:
public java.lang.String getValue ( java.lang.String value ) throws java.security.GeneralSecurityException { java.lang.String returnedValue = "Empty" ; if ( ( value != null ) && ( ! ( value.equals ( "" ) ) ) ) { try { decrypt ( value ) ; returnedValue = "Set" ; } catch ( java.lang.Exception exception ) { java.lang.String msg = "Failed to decrypt the current value." ; org.ovirt.engine.core.config.entity.helper.PasswordValueHelper.console.writeLine ( msg ) ; org.ovirt.engine.core.config.entity.helper.PasswordValueHelper.log.error ( exception ) ; throw new java.security.GeneralSecurityException ( msg ) ; } } return returnedValue ; }

Target:
public java.lang.String getValue ( java.lang.String value ) throws java.security.GeneralSecurityException { java.lang.String returnedValue = "Empty" ; if ( ( value != null ) && ( ! ( value.equals ( "" ) ) ) ) { try { decrypt ( value ) ; returnedValue = "Set" ; } catch ( java.lang.Exception exception ) { java.lang.String msg = "Failed to decrypt the current value." ; org.ovirt.engine.core.config.entity.helper.PasswordValueHelper.console.writeLine ( msg ) ; org.ovirt.engine.core.config.entity.helper.PasswordValueHelper.log.error ( "Exception" , exception ) ; throw new java.security.GeneralSecurityException ( msg ) ; } } return returnedValue ; }
Source:
protected void handleAutoLogin ( org.ovirt.engine.ui.common.auth.AutoLoginData autoLoginData ) { final org.ovirt.engine.core.common.businessentities.aaa.DbUser loggedUser = autoLoginData.getDbUser ( ) ; com.google.gwt.core.client.Scheduler.get ( ) . scheduleDeferred ( new com.google.gwt.core.client.Scheduler.ScheduledCommand ( ) { @ java.lang.Override public void execute ( ) { lockInteractionManager.showLoadingIndicator ( ) ; getLoginModel ( ) . autoLogin ( loggedUser ) ; } } ) ; org.ovirt.engine.ui.frontend.communication.SSOTokenChangeEvent.fire ( eventBus , org.ovirt.engine.ui.common.auth.SSOTokenData.instance ( ) . getToken ( ) ) ; user.setAutoLogin ( true ) ; }

Target:
public void execute ( ) { restApiSessionManager.reuseSession ( ) ; }
Source:
public void getTemplateDiskList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid templateId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.DiskImage > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmTemplatesDisks , new org.ovirt.engine.core.common.queries.IdQueryParameters ( templateId ) , aQuery ) ; }

Target:
public void isVirtioScsiEnabledForVm ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { return ! ( ( ( java.util.List < ? > ) ( source ) ) . isEmpty ( ) ) ; } return false ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVirtioScsiControllers , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }
Source:
private boolean validateImageConfig ( java.util.List < java.lang.String > canDoActionMessages , java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.StorageDomain > domainsMap , org.ovirt.engine.core.common.businessentities.storage.DiskImage image ) { return org.ovirt.engine.core.bll.storage.disk.image.ImagesHandler.checkImageConfiguration ( domainsMap.get ( imageToDestinationDomainMap.get ( image.getId ( ) ) ) . getStorageStaticData ( ) , image , canDoActionMessages ) ; }

Target:
private boolean validateImageConfig ( java.util.List < java.lang.String > validationMessages , java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.StorageDomain > domainsMap , org.ovirt.engine.core.common.businessentities.storage.DiskImage image ) { return org.ovirt.engine.core.bll.storage.disk.image.ImagesHandler.checkImageConfiguration ( domainsMap.get ( imageToDestinationDomainMap.get ( image.getId ( ) ) ) . getStorageStaticData ( ) , image , validationMessages ) ; }
Source:
private boolean handleQueryError ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue returnValue , org.ovirt.engine.ui.uicommonweb.models.users.AdElementListModel model ) { model.setMessage ( null ) ; if ( ! ( returnValue.getSucceeded ( ) ) ) { model.setMessage ( org.ovirt.engine.ui.frontend.Frontend.getAppErrorsTranslator ( ) . TranslateErrorTextSingle ( returnValue.getExceptionString ( ) ) ) ; getSearchInProgress ( ) . setEntity ( false ) ; return true ; } return false ; }

Target:
private boolean handleQueryError ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue returnValue , org.ovirt.engine.ui.uicommonweb.models.users.AdElementListModel model ) { model.setMessage ( null ) ; if ( ! ( returnValue.getSucceeded ( ) ) ) { model.setMessage ( org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . getAppErrorsTranslator ( ) . translateErrorTextSingle ( returnValue.getExceptionString ( ) ) ) ; getSearchInProgress ( ) . setEntity ( false ) ; return true ; } return false ; }
Source:
public void executeSave ( ) { org.ovirt.engine.core.common.action.NetworkQoSParametersBase parameters = new org.ovirt.engine.core.common.action.NetworkQoSParametersBase ( ) ; parameters.setNetworkQoS ( networkQoS ) ; org.ovirt.engine.ui.frontend.Frontend.RunAction ( VdcActionType.UpdateNetworkQoS , parameters , new org.ovirt.engine.ui.uicompat.IFrontendActionAsyncCallback ( ) { @ java.lang.Override public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result1 ) { org.ovirt.engine.core.common.action.VdcReturnValueBase retVal = result1.getReturnValue ( ) ; boolean succeeded = false ; if ( ( retVal != null ) && ( retVal.getSucceeded ( ) ) ) { succeeded = true ; } postSaveAction ( succeeded ) ; } } ) ; }

Target:
public void executeSave ( ) { org.ovirt.engine.core.common.action.NetworkQoSParametersBase parameters = new org.ovirt.engine.core.common.action.NetworkQoSParametersBase ( ) ; parameters.setNetworkQoS ( networkQoS ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runAction ( VdcActionType.UpdateNetworkQoS , parameters , new org.ovirt.engine.ui.uicompat.IFrontendActionAsyncCallback ( ) { @ java.lang.Override public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result1 ) { org.ovirt.engine.core.common.action.VdcReturnValueBase retVal = result1.getReturnValue ( ) ; boolean succeeded = false ; if ( ( retVal != null ) && ( retVal.getSucceeded ( ) ) ) { succeeded = true ; } postSaveAction ( succeeded ) ; } } ) ; }
Source:
protected void endWithFailure ( ) { setSucceeded ( org.ovirt.engine.core.bll.Backend.getInstance ( ) . endAction ( VdcActionType.RunVm , org.ovirt.engine.core.bll.AttachUserToVmFromPoolAndRunCommand.getParameters ( ) . getImagesParameters ( ) . get ( 0 ) , org.ovirt.engine.core.bll.AttachUserToVmFromPoolAndRunCommand.dupContext ( ) . withExecutionContext ( null ) . withoutLock ( ) ) . getSucceeded ( ) ) ; if ( ! ( org.ovirt.engine.core.bll.AttachUserToVmFromPoolAndRunCommand.getSucceeded ( ) ) ) { log.warn ( "AttachUserToVmFromPoolAndRunCommand::EndWitFailure: endAction of RunVm Failed" ) ; } detachUserFromVmFromPool ( ) ; }

Target:
protected void endWithFailure ( ) { setSucceeded ( org.ovirt.engine.core.bll.Backend.getInstance ( ) . endAction ( VdcActionType.RunVm , org.ovirt.engine.core.bll.AttachUserToVmFromPoolAndRunCommand.getParameters ( ) . getImagesParameters ( ) . get ( 0 ) , org.ovirt.engine.core.bll.AttachUserToVmFromPoolAndRunCommand.cloneContext ( ) . withoutExecutionContext ( ) . withoutLock ( ) ) . getSucceeded ( ) ) ; if ( ! ( org.ovirt.engine.core.bll.AttachUserToVmFromPoolAndRunCommand.getSucceeded ( ) ) ) { log.warn ( "AttachUserToVmFromPoolAndRunCommand::EndWitFailure: endAction of RunVm Failed" ) ; } detachUserFromVmFromPool ( ) ; }
Source:
private void wipeAfterDelete_EntityChanged ( org.ovirt.engine.ui.uicompat.EventArgs e ) { if ( ( ! ( getIsWipeAfterDelete ( ) . getIsChangable ( ) ) ) && ( getIsWipeAfterDelete ( ) . getEntity ( ) ) ) { getIsWipeAfterDelete ( ) . setEntity ( false ) ; } }

Target:
private void storageDomain_SelectedItemChanged ( ) { org.ovirt.engine.core.common.businessentities.StorageDomain selectedStorage = getStorageDomain ( ) . getSelectedItem ( ) ; if ( selectedStorage != null ) { updateVolumeType ( selectedStorage.getStorageType ( ) ) ; } updateQuota ( getDataCenter ( ) . getSelectedItem ( ) ) ; updateDiskProfiles ( getDataCenter ( ) . getSelectedItem ( ) ) ; }
Source:
private java.util.List < org.ovirt.engine.core.utils.customprop.ValidationError > validateProperties ( org.ovirt.engine.core.compat.Version version , java.lang.String properties ) { if ( org.apache.commons.lang.StringUtils.isEmpty ( properties ) ) { return java.util.Collections.emptyList ( ) ; } if ( syntaxErrorInProperties ( properties ) ) { return invalidSyntaxValidationError ; } java.util.Map < java.lang.String , java.lang.String > map = new java.util.HashMap < java.lang.String , java.lang.String > ( ) ; java.util.List < org.ovirt.engine.core.utils.customprop.ValidationError > result = populateVMProperties ( version , properties , map ) ; return result ; }

Target:
public java.util.List < org.ovirt.engine.core.utils.customprop.ValidationError > validateVmProperties ( org.ovirt.engine.core.compat.Version version , java.lang.String properties ) { if ( org.apache.commons.lang.StringUtils.isEmpty ( properties ) ) { return java.util.Collections.emptyList ( ) ; } if ( syntaxErrorInProperties ( properties ) ) { return invalidSyntaxValidationError ; } java.util.Map < java.lang.String , java.lang.String > map = new java.util.HashMap < java.lang.String , java.lang.String > ( ) ; return populateVMProperties ( version , properties , map ) ; }