auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public javax.ws.rs.core.Response add ( org.ovirt.engine.api.model.Job job ) { validateParameters ( job , "description" ) ; return performCreate ( VdcActionType.AddExternalJob , new org.ovirt.engine.core.common.action.AddExternalJobParameters ( job.getDescription ( ) , ( job.isSetAutoCleared ( ) ? job.isAutoCleared ( ) : false ) ) , new org.ovirt.engine.api.restapi.resource.QueryIdResolver < org.ovirt.engine.core.compat.Guid > ( org.ovirt.engine.core.common.queries.VdcQueryType.GetJobByJobId , org.ovirt.engine.core.common.queries.IdQueryParameters.class ) ) ; }

Target:
public javax.ws.rs.core.Response add ( org.ovirt.engine.api.model.Job job ) { validateParameters ( job , "description" ) ; return performCreate ( ActionType.AddExternalJob , new org.ovirt.engine.core.common.action.AddExternalJobParameters ( job.getDescription ( ) , ( job.isSetAutoCleared ( ) ? job.isAutoCleared ( ) : false ) ) , new org.ovirt.engine.api.restapi.resource.QueryIdResolver < org.ovirt.engine.core.compat.Guid > ( org.ovirt.engine.core.common.queries.VdcQueryType.GetJobByJobId , org.ovirt.engine.core.common.queries.IdQueryParameters.class ) ) ; }
Source:
private java.lang.String generateConditionStatment ( org.ovirt.engine.core.searchbackend.SyntaxObject obj , java.util.ListIterator < org.ovirt.engine.core.searchbackend.SyntaxObject > objIter , final java.lang.String searchObjStr , final boolean caseSensitive , final boolean issafe ) { final java.lang.String safeValue = ( issafe ) ? obj.getBody ( ) : org.ovirt.engine.core.searchbackend.SqlInjectionChecker.enforceEscapeCharacters ( obj.getBody ( ) ) ; return generateSafeConditionStatement ( obj , objIter , searchObjStr , caseSensitive , safeValue ) ; }

Target:
private org.ovirt.engine.core.searchbackend.SyntaxChecker.ConditionData generateConditionStatment ( org.ovirt.engine.core.searchbackend.SyntaxObject obj , java.util.ListIterator < org.ovirt.engine.core.searchbackend.SyntaxObject > objIter , final java.lang.String searchObjStr , final boolean caseSensitive , final boolean issafe , final boolean useTags ) { final java.lang.String safeValue = ( issafe ) ? obj.getBody ( ) : org.ovirt.engine.core.searchbackend.SqlInjectionChecker.enforceEscapeCharacters ( obj.getBody ( ) ) ; return generateSafeConditionStatement ( obj , objIter , searchObjStr , caseSensitive , safeValue , useTags ) ; }
Source:
public void acquireLockWait ( org.ovirt.engine.core.utils.lock.EngineLock lock ) { org.ovirt.engine.core.bll.lock.InMemoryLockManager.log.debug ( "Before acquiring and wait lock '{}'" , lock ) ; validateLockForAcquireAndWait ( lock ) ; globalLock.lock ( ) ; try { while ( ! ( acquireLockInternal ( lock ) . getFirst ( ) ) ) { org.ovirt.engine.core.bll.lock.InMemoryLockManager.log.info ( "Failed to acquire lock and wait lock '{}'" , lock ) ; releasedLock.await ( ) ; } } catch ( java.lang.InterruptedException e ) { } finally { globalLock.unlock ( ) ; } }

Target:
public void acquireLockWait ( org.ovirt.engine.core.utils.lock.EngineLock lock ) { org.ovirt.engine.core.bll.lock.InMemoryLockManager.log.debug ( "Before acquiring and wait lock '{}'" , lock ) ; validateLockForAcquireAndWait ( lock ) ; globalLock.lock ( ) ; try { while ( ! ( acquireLockInternal ( lock ) . getFirst ( ) ) ) { org.ovirt.engine.core.bll.lock.InMemoryLockManager.log.info ( "Failed to acquire lock and wait lock '{}'" , lock ) ; releasedLock.await ( ) ; } } catch ( java.lang.InterruptedException ignore ) { } finally { globalLock.unlock ( ) ; } }
Source:
public void onPowerringUp ( ) { decreasePendingVm ( org.ovirt.engine.core.bll.RunVmCommand.getVmStaticDao ( ) . get ( org.ovirt.engine.core.bll.RunVmCommand.getVmId ( ) ) ) ; }

Target:
protected void endExecutionMonitoring ( ) { if ( ( org.ovirt.engine.core.bll.RunVmCommand.getVm ( ) . isRunAndPause ( ) ) && ( ( vmDynamicDao.get ( org.ovirt.engine.core.bll.RunVmCommand.getVmId ( ) ) . getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.Paused ) ) ) { final org.ovirt.engine.core.bll.job.ExecutionContext executionContext = org.ovirt.engine.core.bll.RunVmCommand.getExecutionContext ( ) ; executionContext.setShouldEndJob ( true ) ; executionHandler.endJob ( executionContext , true ) ; } else { super . endExecutionMonitoring ( ) ; } }
Source:
protected void updateMenuItem ( com.google.gwt.user.client.ui.MenuItem item , org.ovirt.engine.ui.common.widget.action.ActionButtonDefinition < T > buttonDef ) { item.setVisible ( ( ( buttonDef.isAccessible ( org.ovirt.engine.ui.common.widget.action.AbstractActionPanel.getSelectedItems ( ) ) ) && ( buttonDef.isVisible ( org.ovirt.engine.ui.common.widget.action.AbstractActionPanel.getSelectedItems ( ) ) ) ) ) ; item.setEnabled ( buttonDef.isEnabled ( org.ovirt.engine.ui.common.widget.action.AbstractActionPanel.getSelectedItems ( ) ) ) ; if ( ( buttonDef.getMenuItemToolTip ( ) ) != null ) { item.setTitle ( buttonDef.getMenuItemToolTip ( ) ) ; } }

Target:
protected void updateMenuItem ( com.google.gwt.user.client.ui.MenuItem item , org.ovirt.engine.ui.common.widget.action.ActionButtonDefinition < T > buttonDef ) { item.setVisible ( ( ( buttonDef.isAccessible ( org.ovirt.engine.ui.common.widget.action.AbstractActionPanel.getSelectedItems ( ) ) ) && ( buttonDef.isVisible ( org.ovirt.engine.ui.common.widget.action.AbstractActionPanel.getSelectedItems ( ) ) ) ) ) ; item.setEnabled ( buttonDef.isEnabled ( org.ovirt.engine.ui.common.widget.action.AbstractActionPanel.getSelectedItems ( ) ) ) ; if ( ( buttonDef.getMenuItemToolTip ( ) ) != null ) { org.ovirt.engine.ui.common.widget.tooltip.TooltipMixin.addTooltipToElement ( com.google.gwt.safehtml.shared.SafeHtmlUtils.fromString ( buttonDef.getMenuItemToolTip ( ) ) , item.getElement ( ) ) ; } }
Source:
public void validateImageNotFound ( ) { initializeCommand ( new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ) ; org.junit.Assert.assertFalse ( command.validate ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getValidationMessages ( ) . contains ( EngineMessage.ACTION_TYPE_FAILED_DISK_NOT_EXIST.toString ( ) ) ) ; }

Target:
public void validateImageNotFound ( ) { initializeCommand ( new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( command , EngineMessage.ACTION_TYPE_FAILED_DISK_NOT_EXIST ) ; }
Source:
protected void endWithFailure ( ) { org.ovirt.engine.core.bll.HibernateVmCommand.revertTasks ( ) ; if ( ( org.ovirt.engine.core.bll.HibernateVmCommand.getVm ( ) . getRunOnVds ( ) ) != null ) { org.ovirt.engine.core.bll.HibernateVmCommand.getSnapshotDAO ( ) . removeMemoryFromActiveSnapshot ( org.ovirt.engine.core.bll.HibernateVmCommand.getVmId ( ) ) ; org.ovirt.engine.core.bll.HibernateVmCommand.setSucceeded ( true ) ; } else { org.ovirt.engine.core.bll.HibernateVmCommand.log.warn ( "VM '{}' doesn't have 'run_on_vds' value - not clearing 'hibernation_vol_handle' info." , org.ovirt.engine.core.bll.HibernateVmCommand.getVm ( ) . getName ( ) ) ; org.ovirt.engine.core.bll.HibernateVmCommand.getReturnValue ( ) . setEndActionTryAgain ( false ) ; } }

Target:
protected void endWithFailure ( ) { org.ovirt.engine.core.bll.HibernateVmCommand.endActionOnDisks ( ) ; org.ovirt.engine.core.bll.HibernateVmCommand.getSnapshotDao ( ) . removeMemoryFromActiveSnapshot ( org.ovirt.engine.core.bll.HibernateVmCommand.getVmId ( ) ) ; org.ovirt.engine.core.bll.HibernateVmCommand.revertTasks ( ) ; org.ovirt.engine.core.bll.HibernateVmCommand.setSucceeded ( true ) ; }
Source:
public void setUp ( ) { parameters = new org.ovirt.engine.core.common.action.StorageDomainParametersBase ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; parameters.setVdsId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; command = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.storage.domain.SyncLunsInfoForBlockStorageDomainCommand ( parameters , null ) ) ; }

Target:
public void setUp ( ) { parameters = new org.ovirt.engine.core.common.action.StorageDomainParametersBase ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; parameters.setVdsId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; command = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.storage.domain.SyncLunsInfoForBlockStorageDomainCommand ( parameters , null ) ) ; lunFromVg = new org.ovirt.engine.core.common.businessentities.storage.LUNs ( ) ; lunFromDb = new org.ovirt.engine.core.common.businessentities.storage.LUNs ( ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.network.IPv4Address createIpv4Address ( java.sql.ResultSet rs , java.lang.String bootProtocol ) throws java.sql.SQLException { final org.ovirt.engine.core.common.businessentities.network.IPv4Address iPv4Address = new org.ovirt.engine.core.common.businessentities.network.IPv4Address ( ) ; iPv4Address.setBootProtocol ( org.ovirt.engine.core.common.businessentities.network.NetworkBootProtocol.valueOf ( bootProtocol ) ) ; iPv4Address.setAddress ( rs.getString ( "address" ) ) ; iPv4Address.setNetmask ( rs.getString ( "netmask" ) ) ; iPv4Address.setGateway ( rs.getString ( "gateway" ) ) ; return iPv4Address ; }

Target:
private org.ovirt.engine.core.common.businessentities.network.IPv4Address createIpv4Address ( java.sql.ResultSet rs , java.lang.String bootProtocol ) throws java.sql.SQLException { final org.ovirt.engine.core.common.businessentities.network.IPv4Address iPv4Address = new org.ovirt.engine.core.common.businessentities.network.IPv4Address ( ) ; iPv4Address.setBootProtocol ( org.ovirt.engine.core.common.businessentities.network.Ipv4BootProtocol.valueOf ( bootProtocol ) ) ; iPv4Address.setAddress ( rs.getString ( "address" ) ) ; iPv4Address.setNetmask ( rs.getString ( "netmask" ) ) ; iPv4Address.setGateway ( rs.getString ( "gateway" ) ) ; return iPv4Address ; }
Source:
public static void getDataCenterById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStoragePoolById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) , aQuery ) ; }

Target:
public static void getRoleList ( 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.Role > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Role > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllRoles , new org.ovirt.engine.core.common.queries.MultilevelAdministrationsQueriesParameters ( ) , aQuery ) ; }
Source:
protected org.ovirt.engine.core.common.vdscommands.VDSParametersBase getRevertVDSParameters ( ) { return new org.ovirt.engine.core.common.vdscommands.DeleteImageGroupVDSCommandParameters ( getEnclosingCommand ( ) . getParameters ( ) . getStoragePoolId ( ) , getEnclosingCommand ( ) . getParameters ( ) . getTargetStorageDomainId ( ) , getEnclosingCommand ( ) . getParameters ( ) . getImageGroupID ( ) , org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getDiskImageDao ( ) . get ( getEnclosingCommand ( ) . getParameters ( ) . getDestinationImageId ( ) ) . isWipeAfterDelete ( ) , getEnclosingCommand ( ) . getParameters ( ) . getForceDelete ( ) ) ; }

Target:
protected org.ovirt.engine.core.common.vdscommands.VDSParametersBase getRevertVDSParameters ( ) { return org.ovirt.engine.core.bll.storage.PostZeroHandler.fixParametersWithPostZero ( new org.ovirt.engine.core.common.vdscommands.DeleteImageGroupVDSCommandParameters ( getEnclosingCommand ( ) . getParameters ( ) . getStoragePoolId ( ) , getEnclosingCommand ( ) . getParameters ( ) . getTargetStorageDomainId ( ) , getEnclosingCommand ( ) . getParameters ( ) . getImageGroupID ( ) , org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getDiskImageDao ( ) . get ( getEnclosingCommand ( ) . getParameters ( ) . getDestinationImageId ( ) ) . isWipeAfterDelete ( ) , getEnclosingCommand ( ) . getParameters ( ) . getForceDelete ( ) ) ) ; }
Source:
public static java.lang.String map ( org.ovirt.engine.api.restapi.types.GlusterHookStatus hookStatus , java.lang.String template ) { switch ( hookStatus ) { case DISABLED : return HookStatus.DISABLED.toString ( ) ; case ENABLED : return HookStatus.ENABLED.toString ( ) ; case MISSING : return HookStatus.MISSING.toString ( ) ; default : return null ; } }

Target:
private static org.ovirt.engine.api.model.GlusterHookStatus mapHookStatus ( org.ovirt.engine.api.model.GlusterHookStatus status ) { switch ( status ) { case DISABLED : return org.ovirt.engine.api.model.GlusterHookStatus.DISABLED ; case ENABLED : return org.ovirt.engine.api.model.GlusterHookStatus.ENABLED ; case MISSING : return org.ovirt.engine.api.model.GlusterHookStatus.MISSING ; default : return null ; } }
Source:
private boolean validateSourceStorageDomain ( org.ovirt.engine.core.compat.Guid imageId ) { org.ovirt.engine.core.common.businessentities.DiskImage diskImage = getDiskImageByImageId ( imageId ) ; org.ovirt.engine.core.compat.Guid domainId = diskImage.getStorageIds ( ) . get ( 0 ) ; org.ovirt.engine.core.bll.validator.StorageDomainValidator validator = getValidator ( domainId , org.ovirt.engine.core.bll.lsm.LiveMigrateVmDisksCommand.getStoragePoolId ( ) ) ; return validate ( validator.isDomainExistAndActive ( ) ) ; }

Target:
private boolean validateDestStorageAndSourceStorageOfSameTypes ( org.ovirt.engine.core.common.businessentities.StorageDomain destDomain , org.ovirt.engine.core.common.businessentities.StorageDomain sourceDomain ) { if ( ( destDomain.getStorageType ( ) . getStorageSubtype ( ) ) != ( sourceDomain.getStorageType ( ) . getStorageSubtype ( ) ) ) { return failCanDoAction ( VdcBllMessages.ACTION_TYPE_FAILED_DESTINATION_AND_SOURCE_STORAGE_SUB_TYPES_DIFFERENT ) ; } return true ; }
Source:
private void readCpuItem ( org.ovirt.engine.core.utils.ovf.xml.XmlNode node ) { vmBase.setNumOfSockets ( java.lang.Integer.parseInt ( node.SelectSingleNode ( "rasd:num_of_sockets" , _xmlNS ) . innerText ) ) ; vmBase.setCpuPerSocket ( java.lang.Integer.parseInt ( node.SelectSingleNode ( "rasd:cpu_per_socket" , _xmlNS ) . innerText ) ) ; }

Target:
private void readCpuItem ( org.ovirt.engine.core.utils.ovf.xml.XmlNode node ) { vmBase.setNumOfSockets ( java.lang.Integer.parseInt ( selectSingleNode ( node , "rasd:num_of_sockets" , _xmlNS ) . innerText ) ) ; vmBase.setCpuPerSocket ( java.lang.Integer.parseInt ( selectSingleNode ( node , "rasd:cpu_per_socket" , _xmlNS ) . innerText ) ) ; }
Source:
protected void mockGetImageDomainsListVdsCommand ( int availableDiskSizeFirstDomain , int availableDiskSizeSecondDomain ) { mockGetStorageDomainList ( availableDiskSizeFirstDomain , availableDiskSizeSecondDomain ) ; org.ovirt.engine.core.common.vdscommands.VDSReturnValue returnValue = new org.ovirt.engine.core.common.vdscommands.VDSReturnValue ( ) ; returnValue.setReturnValue ( org.ovirt.engine.core.bll.CommonVmPoolWithVmsCommandTestAbstract.mockStorageGuidList ( storageDomainsList ) ) ; org.mockito.Mockito.when ( vdsBrokerFrontend.RunVdsCommand ( org.mockito.Matchers.eq ( VDSCommandType.GetImageDomainsList ) , org.mockito.Matchers.< org.ovirt.engine.core.common.vdscommands.VDSParametersBase > any ( org.ovirt.engine.core.common.vdscommands.VDSParametersBase.class ) ) ) . thenReturn ( returnValue ) ; }

Target:
private void mockVds ( ) { mockGetStorageDomainList ( 100 , 100 ) ; mockGetImagesList ( ) ; }
Source:
public void testCheckGroupsCanBeAttachedSuccess ( ) { getRole ( ) . setType ( RoleType.ADMIN ) ; org.ovirt.engine.core.common.businessentities.RoleGroupMap map = new org.ovirt.engine.core.common.businessentities.RoleGroupMap ( org.ovirt.engine.core.common.businessentities.ActionGroup.DELETE_STORAGE_POOL , getParams ( ) . getRoleId ( ) ) ; mockGetAllForRole ( java.util.Collections.singletonList ( map ) ) ; java.util.List < java.lang.String > messages = new java.util.ArrayList < > ( ) ; org.junit.Assert.assertFalse ( "canDoAction should succeed" , getCommand ( ) . checkIfGroupsCanBeAttached ( messages ) ) ; org.junit.Assert.assertTrue ( "no messages sould have been added" , messages.isEmpty ( ) ) ; }

Target:
public void testCheckGroupsCanBeAttachedSuccess ( ) { getRole ( ) . setType ( RoleType.ADMIN ) ; org.ovirt.engine.core.common.businessentities.RoleGroupMap map = new org.ovirt.engine.core.common.businessentities.RoleGroupMap ( org.ovirt.engine.core.common.businessentities.ActionGroup.DELETE_STORAGE_POOL , getParams ( ) . getRoleId ( ) ) ; mockGetAllForRole ( java.util.Collections.singletonList ( map ) ) ; java.util.List < java.lang.String > messages = new java.util.ArrayList < > ( ) ; org.junit.Assert.assertFalse ( "validate should succeed" , getCommand ( ) . checkIfGroupsCanBeAttached ( messages ) ) ; org.junit.Assert.assertTrue ( "no messages sould have been added" , messages.isEmpty ( ) ) ; }
Source:
public void testDedicatedHostNotExistOrNotSameCluster ( ) { prepareVmToPassCanDoAction ( ) ; org.mockito.Mockito.doReturn ( vdsDao ) . when ( command ) . getVdsDao ( ) ; org.mockito.Mockito.doReturn ( false ) . when ( command ) . isDedicatedVdsExistOnSameCluster ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.VmBase.class ) , org.mockito.Matchers.any ( java.util.ArrayList.class ) ) ; vmStatic.setDedicatedVmForVdsList ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; org.junit.Assert.assertFalse ( "canDoAction should have failed with invalid dedicated host." , command.canDoAction ( ) ) ; }

Target:
public void testDedicatedHostNotExistOrNotSameCluster ( ) { prepareVmToPassValidate ( ) ; org.mockito.Mockito.doReturn ( vdsDao ) . when ( command ) . getVdsDao ( ) ; org.mockito.Mockito.doReturn ( false ) . when ( command ) . isDedicatedVdsExistOnSameCluster ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.VmBase.class ) , org.mockito.Matchers.any ( java.util.ArrayList.class ) ) ; vmStatic.setDedicatedVmForVdsList ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; org.junit.Assert.assertFalse ( "validate should have failed with invalid dedicated host." , command.validate ( ) ) ; }
Source:
public void hostStatusValid ( ) { validator = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.validator.UpdateHostValidator ( dbFacade , oldHost , host , false ) ) ; org.mockito.Mockito.doReturn ( true ) . when ( validator ) . isUpdateValid ( ) ; org.junit.Assert.assertThat ( validator.hostStatusValid ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }

Target:
public void hostStatusValid ( ) { validator = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.validator.UpdateHostValidator ( dbFacade , oldHost , host , false , hostedEngineHelper ) ) ; org.mockito.Mockito.doReturn ( true ) . when ( validator ) . isUpdateValid ( ) ; org.junit.Assert.assertThat ( validator.hostStatusValid ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }
Source:
public org.ovirt.engine.api.model.GlusterHook get ( ) { org.ovirt.engine.api.model.GlusterHook hook = performGet ( VdcQueryType.GetGlusterHookById , new org.ovirt.engine.core.common.queries.gluster.GlusterHookQueryParameters ( guid , true ) ) ; org.ovirt.engine.core.common.queries.VdcQueryReturnValue result = runQuery ( VdcQueryType.GetGlusterHookContent , new org.ovirt.engine.core.common.queries.gluster.GlusterHookContentQueryParameters ( guid ) ) ; if ( ( ( result != null ) && ( result.getSucceeded ( ) ) ) && ( ( result.getReturnValue ( ) ) != null ) ) { hook.setContent ( result.getReturnValue ( ) ) ; } return hook ; }

Target:
public org.ovirt.engine.api.model.GlusterHook get ( ) { org.ovirt.engine.api.model.GlusterHook hook = performGet ( QueryType.GetGlusterHookById , new org.ovirt.engine.core.common.queries.gluster.GlusterHookQueryParameters ( guid , true ) ) ; org.ovirt.engine.core.common.queries.VdcQueryReturnValue result = runQuery ( QueryType.GetGlusterHookContent , new org.ovirt.engine.core.common.queries.gluster.GlusterHookContentQueryParameters ( guid ) ) ; if ( ( ( result != null ) && ( result.getSucceeded ( ) ) ) && ( ( result.getReturnValue ( ) ) != null ) ) { hook.setContent ( result.getReturnValue ( ) ) ; } return hook ; }
Source:
public void initialize ( ) { super . initialize ( ) ; org.ovirt.engine.ui.uicommonweb.UICommand onSaveCommand = new org.ovirt.engine.ui.uicommonweb.UICommand ( "OnSave" , this ) ; onSaveCommand.setTitle ( org.ovirt.engine.ui.uicommonweb.models.vms.AbstractDiskModel.CONSTANTS.ok ( ) ) ; onSaveCommand.setIsDefault ( true ) ; getCommands ( ) . add ( onSaveCommand ) ; getCommands ( ) . add ( getCancelCommand ( ) ) ; if ( ( getVm ( ) ) != null ) { updateBootableDiskAvailable ( ) ; } updateDatacenters ( ) ; }

Target:
private void commonInitialize ( ) { super . initialize ( ) ; org.ovirt.engine.ui.uicommonweb.UICommand onSaveCommand = new org.ovirt.engine.ui.uicommonweb.UICommand ( "OnSave" , this ) ; onSaveCommand.setTitle ( org.ovirt.engine.ui.uicommonweb.models.vms.AbstractDiskModel.constants.ok ( ) ) ; onSaveCommand.setIsDefault ( true ) ; getCommands ( ) . add ( onSaveCommand ) ; getCommands ( ) . add ( getCancelCommand ( ) ) ; updateDatacenters ( ) ; }
Source:
public void testCheckIfRoleIsReadOnlyTrue ( ) { getRole ( ) . setis_readonly ( true ) ; java.util.List < java.lang.String > messages = new java.util.ArrayList < java.lang.String > ( 1 ) ; org.junit.Assert.assertTrue ( "Role should be read only" , getCommand ( ) . checkIfRoleIsReadOnly ( messages ) ) ; org.junit.Assert.assertEquals ( "Wrong canDoAction message" , VdcBllMessages.ACTION_TYPE_FAILED_ROLE_IS_READ_ONLY.toString ( ) , messages.get ( 0 ) ) ; }

Target:
public void testCheckIfRoleIsReadOnlyTrue ( ) { getRole ( ) . setReadonly ( true ) ; java.util.List < java.lang.String > messages = new java.util.ArrayList < java.lang.String > ( 1 ) ; org.junit.Assert.assertTrue ( "Role should be read only" , getCommand ( ) . checkIfRoleIsReadOnly ( messages ) ) ; org.junit.Assert.assertEquals ( "Wrong canDoAction message" , VdcBllMessages.ACTION_TYPE_FAILED_ROLE_IS_READ_ONLY.toString ( ) , messages.get ( 0 ) ) ; }
Source:
public void testGetAllForDataCenter ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.VnicProfileView > result = dao.getAllForDataCenter ( FixturesTool.DATA_CENTER ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.VnicProfileView profile : result ) { org.junit.Assert.assertEquals ( FixturesTool.DATA_CENTER_NAME , profile.getDataCenterName ( ) ) ; } }

Target:
public void testGetAllForDataCenter ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.VnicProfileView > result = dao.getAllForDataCenter ( FixturesTool.DATA_CENTER ) ; org.junit.jupiter.api.Assertions.assertNotNull ( result ) ; org.junit.jupiter.api.Assertions.assertFalse ( result.isEmpty ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.VnicProfileView profile : result ) { org.junit.jupiter.api.Assertions.assertEquals ( FixturesTool.DATA_CENTER_NAME , profile.getDataCenterName ( ) ) ; } }
Source:
public void init ( final javax.servlet.FilterConfig config ) throws javax.servlet.ServletException { this . config = config ; }

Target:
public void init ( final javax.servlet.FilterConfig config ) throws javax.servlet.ServletException { this . config = config ; this . enabled = ( ( java.lang.Boolean ) ( getBackendParameter ( ConfigurationValues.CORSSupport ) ) ) ; this . enabledDefaultOrigins = ( ( java.lang.Boolean ) ( getBackendParameter ( ConfigurationValues.CORSAllowDefaultOrigins ) ) ) ; java.lang.String sufficesFromConf = org.apache.commons.lang.StringUtils.defaultString ( ( ( java.lang.String ) ( getBackendParameter ( ConfigurationValues.CORSDefaultOriginSuffixes ) ) ) , "" ) ; this . defaultOriginsSuffixes = new java.util.HashSet < > ( java.util.Arrays.asList ( sufficesFromConf.split ( "," ) ) ) ; }
Source:
public void getAuditLogTypeValueTest ( ) { org.ovirt.engine.core.common.action.ActionReturnValue returnValueBase = new org.ovirt.engine.core.common.action.ActionReturnValue ( ) ; returnValueBase.setSucceeded ( true ) ; addCpuProfileCommand.setReturnValue ( returnValueBase ) ; org.junit.Assert.assertEquals ( AuditLogType.USER_ADDED_CPU_PROFILE , addCpuProfileCommand.getAuditLogTypeValue ( ) ) ; returnValueBase.setSucceeded ( false ) ; addCpuProfileCommand.setReturnValue ( returnValueBase ) ; org.junit.Assert.assertEquals ( AuditLogType.USER_FAILED_TO_ADD_CPU_PROFILE , addCpuProfileCommand.getAuditLogTypeValue ( ) ) ; }

Target:
public void getAuditLogTypeValueTest ( ) { org.ovirt.engine.core.common.action.ActionReturnValue returnValueBase = new org.ovirt.engine.core.common.action.ActionReturnValue ( ) ; returnValueBase.setSucceeded ( true ) ; addCpuProfileCommand.setReturnValue ( returnValueBase ) ; org.junit.jupiter.api.Assertions.assertEquals ( AuditLogType.USER_ADDED_CPU_PROFILE , addCpuProfileCommand.getAuditLogTypeValue ( ) ) ; returnValueBase.setSucceeded ( false ) ; addCpuProfileCommand.setReturnValue ( returnValueBase ) ; org.junit.jupiter.api.Assertions.assertEquals ( AuditLogType.USER_FAILED_TO_ADD_CPU_PROFILE , addCpuProfileCommand.getAuditLogTypeValue ( ) ) ; }
Source:
private void setupQuerySpy ( ) { org.mockito.Mockito.doReturn ( vdsDaoMocked ) . when ( getQuery ( ) ) . getVdsDao ( ) ; org.mockito.Mockito.doReturn ( interfaceDaoMocked ) . when ( getQuery ( ) ) . getInterfaceDao ( ) ; org.mockito.Mockito.doReturn ( networkDaoMocked ) . when ( getQuery ( ) ) . getNetworkDao ( ) ; org.mockito.Mockito.doReturn ( hostNetworkQosDaoMocked ) . when ( getQuery ( ) ) . getHostNetworkQosDao ( ) ; }

Target:
private void setupQuerySpy ( ) { org.mockito.Mockito.doReturn ( vdsDaoMocked ) . when ( getQuery ( ) ) . getVdsDao ( ) ; org.mockito.Mockito.doReturn ( interfaceDaoMocked ) . when ( getQuery ( ) ) . getInterfaceDao ( ) ; org.mockito.Mockito.doReturn ( networkDaoMocked ) . when ( getQuery ( ) ) . getNetworkDao ( ) ; org.mockito.Mockito.doReturn ( networkImplementationDetailsUtils ) . when ( getQuery ( ) ) . getNetworkImplementationDetailsUtils ( ) ; org.mockito.Mockito.doReturn ( networkAttachmentDao ) . when ( getQuery ( ) ) . getNetworkAttachmentDao ( ) ; }
Source:
public void testDeserializeVdcActionParameters ( ) { org.ovirt.engine.core.common.action.VdcActionParametersBase params = new org.ovirt.engine.core.utils.serialization.json.JsonObjectDeserializer ( ) . deserialize ( getVdcActionParamsJson ( ) , org.ovirt.engine.core.common.action.VdcActionParametersBase.class ) ; org.junit.Assert.assertNotNull ( params.getLockProperties ( ) ) ; org.junit.Assert.assertTrue ( params.getLockProperties ( ) . isWait ( ) ) ; org.junit.Assert.assertEquals ( Scope.None , params.getLockProperties ( ) . getScope ( ) ) ; }

Target:
public void testDeserializeVdcActionParameters ( ) { org.ovirt.engine.core.common.action.ActionParametersBase params = new org.ovirt.engine.core.utils.serialization.json.JsonObjectDeserializer ( ) . deserialize ( getVdcActionParamsJson ( ) , org.ovirt.engine.core.common.action.ActionParametersBase.class ) ; org.junit.Assert.assertNotNull ( params.getLockProperties ( ) ) ; org.junit.Assert.assertTrue ( params.getLockProperties ( ) . isWait ( ) ) ; org.junit.Assert.assertEquals ( Scope.None , params.getLockProperties ( ) . getScope ( ) ) ; }
Source:
public javax.ws.rs.core.Response add ( org.ovirt.engine.api.model.Group group ) { validateParameters ( group , "name" ) ; org.ovirt.engine.core.common.action.AddUserParameters newGroup = new org.ovirt.engine.core.common.action.AddUserParameters ( ) ; newGroup.setAdGroup ( getAdGroup ( group ) ) ; return performCreate ( VdcActionType.AddUser , newGroup , new org.ovirt.engine.api.restapi.resource.GroupIdResolver ( newGroup.getAdGroup ( ) . getid ( ) ) ) ; }

Target:
private java.lang.String getSearchPattern ( ) { java.lang.String userProvidedPattern = org.ovirt.engine.api.common.util.QueryHelper.getConstraint ( getUriInfo ( ) , "" , modelType ) ; return userProvidedPattern.equals ( "Groups : " ) ? userProvidedPattern + ( org.ovirt.engine.api.restapi.resource.BackendGroupsResource.GROUPS_SEARCH_PATTERN ) : ( userProvidedPattern + ( org.ovirt.engine.api.restapi.resource.BackendGroupsResource.AND_SEARCH_PATTERN ) ) + ( org.ovirt.engine.api.restapi.resource.BackendGroupsResource.GROUPS_SEARCH_PATTERN ) ; }
Source:
public void testIncompleteImport ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; try { control.replay ( ) ; resource.doImport ( new org.ovirt.engine.api.model.Action ( ) ) ; fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "Action" , "doImport" , "cluster.id|name" ) ; } }

Target:
public void testIncompleteImport ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; try { control.replay ( ) ; resource.doImport ( new org.ovirt.engine.api.model.Action ( ) ) ; fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "Action" , "doImport" , "cluster.id|name" , "storageDomain.id|name" ) ; } }
Source:
protected void copyVmDevices ( ) { org.ovirt.engine.core.bll.utils.VmDeviceUtils.copyVmDevices ( org.ovirt.engine.core.bll.AddVmCommand.getVmTemplateId ( ) , org.ovirt.engine.core.bll.AddVmCommand.getVmId ( ) , getSrcDeviceIdToTargetDeviceIdMapping ( ) , org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . isSoundDeviceEnabled ( ) , org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . isConsoleEnabled ( ) ) ; }

Target:
protected void copyVmDevices ( ) { org.ovirt.engine.core.bll.utils.VmDeviceUtils.copyVmDevices ( org.ovirt.engine.core.bll.AddVmCommand.getVmTemplateId ( ) , org.ovirt.engine.core.bll.AddVmCommand.getVmId ( ) , getSrcDeviceIdToTargetDeviceIdMapping ( ) , org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . isSoundDeviceEnabled ( ) , org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . isConsoleEnabled ( ) , isVirtioScsiEnabled ( ) ) ; }
Source:
public void validateVmInPreview ( ) { initializeCommand ( new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ) ; initSnapshotValidator ( ) ; initVmForSpace ( ) ; initVmDiskImage ( false ) ; initSrcStorageDomain ( ) ; initDestStorageDomain ( StorageType.NFS ) ; org.mockito.Mockito.when ( snapshotsValidator.vmNotInPreview ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_VM_IN_PREVIEW ) ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( command , EngineMessage.ACTION_TYPE_FAILED_VM_IN_PREVIEW ) ; }

Target:
public void validateEnoughSpace ( ) throws java.lang.Exception { initializeCommand ( new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) , VmEntityType.VM ) ; initSnapshotValidator ( ) ; initVmForSpace ( ) ; initSrcStorageDomain ( ) ; initDestStorageDomain ( StorageType.NFS ) ; org.mockito.Mockito.doReturn ( org.ovirt.engine.core.bll.storage.disk.MoveOrCopyDiskCommandTest.mockStorageDomainValidatorWithSpace ( ) ) . when ( command ) . createStorageDomainValidator ( ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateSuccess ( command ) ; }
Source:
public void validateIsoPrefixWhenNoActiveIso ( ) throws java.lang.Exception { setIsoPrefixVDSMethod ( org.ovirt.engine.core.bll.RunVmCommandTest.INACTIVE_ISO_PREFIX ) ; java.lang.String initrd = "initrd" ; org.ovirt.engine.core.common.businessentities.VM vm = createVmForTesting ( ( ( org.ovirt.engine.core.bll.RunVmCommandTest.ISO_PREFIX ) + initrd ) , null ) ; org.junit.Assert.assertEquals ( vm.getInitrdUrl ( ) , ( ( ( org.ovirt.engine.core.bll.RunVmCommandTest.INACTIVE_ISO_PREFIX ) + "/" ) + initrd ) ) ; }

Target:
public void validateIsoPrefixWhenNoActiveIso ( ) throws java.lang.Exception { setIsoPrefixVDSMethod ( org.ovirt.engine.core.bll.RunVmCommandTest.INACTIVE_ISO_PREFIX ) ; java.lang.String initrd = "initrd" ; org.ovirt.engine.core.common.businessentities.VM vm = createVmForTesting ( ( ( RunVmCommand.ISO_PREFIX ) + initrd ) , null ) ; org.junit.Assert.assertEquals ( vm.getInitrdUrl ( ) , ( ( ( org.ovirt.engine.core.bll.RunVmCommandTest.INACTIVE_ISO_PREFIX ) + "/" ) + initrd ) ) ; }
Source:
public org.ovirt.api.metamodel.concepts.Method getMethod ( org.ovirt.api.metamodel.concepts.Name name ) { for ( org.ovirt.api.metamodel.concepts.Method method : methods ) { if ( java.util.Objects.equals ( method.getName ( ) , name ) ) { return method ; } } if ( ( base ) != null ) { return base.getMethod ( name ) ; } return null ; }

Target:
public java.util.stream.Stream < org.ovirt.api.metamodel.concepts.Method > declaredMethods ( ) { return methods.stream ( ) ; }
Source:
public void setActionMessageParameters ( ) { cmd.setActionMessageParameters ( ) ; java.util.List < java.lang.String > messages = cmd.getReturnValue ( ) . getCanDoActionMessages ( ) ; org.junit.Assert.assertTrue ( "action name not in messages" , messages.remove ( VdcBllMessages.VAR__ACTION__UPDATE.name ( ) ) ) ; org.junit.Assert.assertTrue ( "type not in messages" , messages.remove ( VdcBllMessages.VAR__TYPE__STORAGE__DOMAIN.name ( ) ) ) ; org.junit.Assert.assertTrue ( ( "redundant messages " + messages ) , messages.isEmpty ( ) ) ; }

Target:
public void setActionMessageParameters ( ) { cmd.setActionMessageParameters ( ) ; java.util.List < java.lang.String > messages = cmd.getReturnValue ( ) . getCanDoActionMessages ( ) ; org.junit.Assert.assertTrue ( "action name not in messages" , messages.remove ( EngineMessage.VAR__ACTION__UPDATE.name ( ) ) ) ; org.junit.Assert.assertTrue ( "type not in messages" , messages.remove ( EngineMessage.VAR__TYPE__STORAGE__DOMAIN.name ( ) ) ) ; org.junit.Assert.assertTrue ( ( "redundant messages " + messages ) , messages.isEmpty ( ) ) ; }
Source:
private org.ovirt.engine.core.common.vdscommands.VDSReturnValue runUpdateMomPolicy ( final org.ovirt.engine.core.common.businessentities.VDSGroup cluster , final org.ovirt.engine.core.common.businessentities.VDS vds ) { org.ovirt.engine.core.common.vdscommands.VDSReturnValue returnValue = new org.ovirt.engine.core.common.vdscommands.VDSReturnValue ( ) ; if ( ( cluster.getcompatibility_version ( ) . compareTo ( Version.v3_3 ) ) >= 0 ) { try { returnValue = runVdsCommand ( VDSCommandType.SetMOMPolicyParameters , new org.ovirt.engine.core.common.vdscommands.MomPolicyVDSParameters ( vds , cluster.isEnableBallooning ( ) , cluster.isEnableKsm ( ) ) ) ; } catch ( org.ovirt.engine.core.common.errors.VdcBLLException e ) { log.errorFormat ( "Could not update MoM policy on host {0}" , vds.getName ( ) ) ; returnValue.setSucceeded ( false ) ; } } return returnValue ; }

Target:
private org.ovirt.engine.core.common.vdscommands.VDSReturnValue runUpdateMomPolicy ( final org.ovirt.engine.core.common.businessentities.VDSGroup cluster , final org.ovirt.engine.core.common.businessentities.VDS vds ) { org.ovirt.engine.core.common.vdscommands.VDSReturnValue returnValue = new org.ovirt.engine.core.common.vdscommands.VDSReturnValue ( ) ; if ( ( cluster.getcompatibility_version ( ) . compareTo ( Version.v3_3 ) ) >= 0 ) { try { returnValue = runVdsCommand ( VDSCommandType.SetMOMPolicyParameters , new org.ovirt.engine.core.common.vdscommands.MomPolicyVDSParameters ( vds , cluster.isEnableBallooning ( ) , cluster.isEnableKsm ( ) ) ) ; } catch ( org.ovirt.engine.core.common.errors.VdcBLLException e ) { log.error ( "Could not update MoM policy on host '{}'" , vds.getName ( ) ) ; returnValue.setSucceeded ( false ) ; } } return returnValue ; }
Source:
public boolean IsTagDescestorOfTag ( org.ovirt.engine.core.compat.Guid sourceTagId , org.ovirt.engine.core.compat.Guid potentialDescestorId ) { if ( sourceTagId.equals ( potentialDescestorId ) ) { return true ; } org.ovirt.engine.core.common.businessentities.Tags tag = GetTagById ( sourceTagId ) ; if ( ( tag != null ) && ( ( tag.getChildren ( ) ) != null ) ) { for ( org.ovirt.engine.core.common.businessentities.Tags childTag : tag.getChildren ( ) ) { if ( IsTagDescestorOfTag ( childTag.gettag_id ( ) , potentialDescestorId ) ) { return true ; } } } return false ; }

Target:
public boolean isTagDescestorOfTag ( org.ovirt.engine.core.compat.Guid sourceTagId , org.ovirt.engine.core.compat.Guid potentialDescestorId ) { if ( sourceTagId.equals ( potentialDescestorId ) ) { return true ; } org.ovirt.engine.core.common.businessentities.Tags tag = GetTagById ( sourceTagId ) ; if ( ( tag != null ) && ( ( tag.getChildren ( ) ) != null ) ) { for ( org.ovirt.engine.core.common.businessentities.Tags childTag : tag.getChildren ( ) ) { if ( isTagDescestorOfTag ( childTag.gettag_id ( ) , potentialDescestorId ) ) { return true ; } } } return false ; }
Source:
private java.util.LinkedList < org.ovirt.engine.core.compat.Guid > convertToGuidList ( java.lang.String str , char delimiter ) { java.util.LinkedList < org.ovirt.engine.core.compat.Guid > results = new java.util.LinkedList < > ( ) ; if ( str != null ) { for ( java.lang.String id : str.split ( java.lang.String.format ( " *%s *" , delimiter ) ) ) { results.add ( org.ovirt.engine.core.compat.Guid.createGuidFromString ( id ) ) ; } } return results ; }

Target:
private java.util.LinkedList < org.ovirt.engine.core.compat.Guid > convertToGuidList ( java.lang.String str , char delimiter ) { java.util.LinkedList < org.ovirt.engine.core.compat.Guid > results = new java.util.LinkedList < > ( ) ; if ( org.apache.commons.lang.StringUtils.isNotEmpty ( str ) ) { for ( java.lang.String id : str.split ( java.lang.String.format ( " *%s *" , delimiter ) ) ) { results.add ( org.ovirt.engine.core.compat.Guid.createGuidFromString ( id ) ) ; } } return results ; }
Source:
public static void isSoundcardEnabled ( 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 < java.lang.String > ) ( source ) ) . size ( ) ) > 0 ; } return false ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetSoundDevices , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }

Target:
public static void getClusterList ( 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 ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > list = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ) ( source ) ) ; java.util.Collections.sort ( list , new org.ovirt.engine.core.common.businessentities.comparators.NameableComparator ( ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllVdsGroups , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }
Source:
protected void pollVds ( org.ovirt.engine.core.common.businessentities.VDS vds ) { int retries = 10 ; while ( ( ( retries > 0 ) && ( ( retVal ) == null ) ) && ( ! ( editNetworkThreadFinish ) ) ) { retries -- ; try { org.ovirt.engine.core.bll.Backend.getInstance ( ) . getResourceManager ( ) . RunVdsCommand ( VDSCommandType.CollectVdsNetworkData , new org.ovirt.engine.core.common.vdscommands.CollectHostNetworkDataVdsCommandParameters ( vds ) ) ; } catch ( java.lang.Exception e ) { } } }

Target:
protected void pollVds ( org.ovirt.engine.core.common.businessentities.VDS vds ) { int retries = 10 ; while ( ( ( retries > 0 ) && ( ( retVal ) == null ) ) && ( ! ( editNetworkThreadFinish ) ) ) { retries -- ; try { runVdsCommand ( VDSCommandType.CollectVdsNetworkData , new org.ovirt.engine.core.common.vdscommands.CollectHostNetworkDataVdsCommandParameters ( vds ) ) ; } catch ( java.lang.Exception e ) { } } }
Source:
protected void executeCommand ( ) { org.ovirt.engine.core.bll.profiles.AddProfileCommandBase.getParameters ( ) . getProfile ( ) . setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; org.ovirt.engine.core.bll.profiles.AddProfileCommandBase.getProfileDao ( ) . save ( org.ovirt.engine.core.bll.profiles.AddProfileCommandBase.getParameters ( ) . getProfile ( ) ) ; org.ovirt.engine.core.bll.profiles.AddProfileCommandBase.getReturnValue ( ) . setActionReturnValue ( org.ovirt.engine.core.bll.profiles.AddProfileCommandBase.getParameters ( ) . getProfile ( ) . getId ( ) ) ; org.ovirt.engine.core.bll.profiles.AddProfileCommandBase.setSucceeded ( true ) ; }

Target:
protected void executeCommand ( ) { org.ovirt.engine.core.bll.profiles.AddProfileCommandBase.getParameters ( ) . getProfile ( ) . setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; org.ovirt.engine.core.bll.profiles.AddProfileCommandBase.getProfileDao ( ) . save ( org.ovirt.engine.core.bll.profiles.AddProfileCommandBase.getParameters ( ) . getProfile ( ) ) ; org.ovirt.engine.core.bll.profiles.AddProfileCommandBase.getReturnValue ( ) . setActionReturnValue ( org.ovirt.engine.core.bll.profiles.AddProfileCommandBase.getParameters ( ) . getProfile ( ) . getId ( ) ) ; if ( org.ovirt.engine.core.bll.profiles.AddProfileCommandBase.getParameters ( ) . isAddPermissions ( ) ) { addPermissions ( ) ; } org.ovirt.engine.core.bll.profiles.AddProfileCommandBase.setSucceeded ( true ) ; }
Source:
private void localize ( org.ovirt.engine.ui.webadmin.ApplicationConstants constants ) { hostEditor.setLabel ( constants.hostService ( ) ) ; serviceTypeEditor.setLabel ( constants.nameService ( ) ) ; filterButton.setLabel ( constants.filterService ( ) ) ; clearButton.setLabel ( constants.showAllService ( ) ) ; }

Target:
private void localize ( ) { hostEditor.setLabel ( org.ovirt.engine.ui.webadmin.section.main.view.tab.cluster.SubTabClusterServiceView.constants.hostService ( ) ) ; serviceTypeEditor.setLabel ( org.ovirt.engine.ui.webadmin.section.main.view.tab.cluster.SubTabClusterServiceView.constants.nameService ( ) ) ; filterButton.setLabel ( org.ovirt.engine.ui.webadmin.section.main.view.tab.cluster.SubTabClusterServiceView.constants.filterService ( ) ) ; clearButton.setLabel ( org.ovirt.engine.ui.webadmin.section.main.view.tab.cluster.SubTabClusterServiceView.constants.showAllService ( ) ) ; }
Source:
private void AddVmDynamic ( ) { org.ovirt.engine.core.common.businessentities.VmDynamic tempVar = new org.ovirt.engine.core.common.businessentities.VmDynamic ( ) ; tempVar.setId ( getVmId ( ) ) ; tempVar.setstatus ( VMStatus.ImageLocked ) ; tempVar.setvm_host ( "" ) ; tempVar.setvm_ip ( "" ) ; tempVar.setapp_list ( getParameters ( ) . getVm ( ) . getDynamicData ( ) . getapp_list ( ) ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmDynamicDAO ( ) . save ( tempVar ) ; getCompensationContext ( ) . snapshotNewEntity ( tempVar ) ; }

Target:
private void addVmDynamic ( ) { org.ovirt.engine.core.common.businessentities.VmDynamic tempVar = new org.ovirt.engine.core.common.businessentities.VmDynamic ( ) ; tempVar.setId ( getVmId ( ) ) ; tempVar.setstatus ( VMStatus.ImageLocked ) ; tempVar.setvm_host ( "" ) ; tempVar.setvm_ip ( "" ) ; tempVar.setapp_list ( getParameters ( ) . getVm ( ) . getDynamicData ( ) . getapp_list ( ) ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmDynamicDao ( ) . save ( tempVar ) ; getCompensationContext ( ) . snapshotNewEntity ( tempVar ) ; }
Source:
protected void executeCommand ( ) { getMacPoolEntity ( ) . setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; getMacPoolDao ( ) . save ( getMacPoolEntity ( ) ) ; org.ovirt.engine.core.bll.network.macpoolmanager.MacPoolPerDcSingleton.getInstance ( ) . createPool ( getMacPoolEntity ( ) ) ; setSucceeded ( true ) ; getReturnValue ( ) . setActionReturnValue ( getMacPoolId ( ) ) ; }

Target:
protected void executeCommand ( ) { getMacPoolEntity ( ) . setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; getMacPoolDao ( ) . save ( getMacPoolEntity ( ) ) ; addPermission ( getCurrentUser ( ) . getId ( ) , getMacPoolEntity ( ) . getId ( ) ) ; org.ovirt.engine.core.bll.network.macpoolmanager.MacPoolPerDcSingleton.getInstance ( ) . createPool ( getMacPoolEntity ( ) ) ; setSucceeded ( true ) ; getReturnValue ( ) . setActionReturnValue ( getMacPoolId ( ) ) ; }
Source:
public boolean equals ( java.lang.Object obj ) { if ( ( this ) == obj ) { return true ; } if ( ! ( obj instanceof org.ovirt.engine.core.common.businessentities.network.Bond ) ) { return false ; } org.ovirt.engine.core.common.businessentities.network.Bond other = ( ( org.ovirt.engine.core.common.businessentities.network.Bond ) ( obj ) ) ; return ( super . equals ( obj ) ) && ( java.util.Objects.equals ( slaves , other.slaves ) ) ; }

Target:
public boolean equals ( java.lang.Object obj ) { if ( ( this ) == obj ) { return true ; } if ( ! ( obj instanceof org.ovirt.engine.core.common.businessentities.network.Bond ) ) { return false ; } org.ovirt.engine.core.common.businessentities.network.Bond other = ( ( org.ovirt.engine.core.common.businessentities.network.Bond ) ( obj ) ) ; return ( ( super . equals ( obj ) ) && ( java.util.Objects.equals ( slaves , other.slaves ) ) ) && ( java.util.Objects.equals ( activeSlave , other.activeSlave ) ) ; }
Source:
private java.util.List < org.ovirt.engine.api.model.Network > getEntities ( boolean isDisplay ) { java.util.List < org.ovirt.engine.api.model.Network > entities = new java.util.ArrayList < org.ovirt.engine.api.model.Network > ( ) ; for ( int i = 0 ; i < ( NAMES.length ) ; i ++ ) { if ( isDisplay ) { entities.add ( getEntity ( i , isDisplay ) ) ; } else { entities.add ( getEntity ( i ) ) ; } } return entities ; }

Target:
private java.util.List < org.ovirt.engine.api.model.Network > getEntities ( boolean isDisplay , boolean isRequired ) { java.util.List < org.ovirt.engine.api.model.Network > entities = new java.util.ArrayList < org.ovirt.engine.api.model.Network > ( ) ; for ( int i = 0 ; i < ( NAMES.length ) ; i ++ ) { if ( isDisplay ) { entities.add ( getEntity ( i , isDisplay , isRequired ) ) ; } else { entities.add ( getEntity ( i ) ) ; } } return entities ; }
Source:
protected org.ovirt.engine.ui.common.widget.table.SimpleActionTable < T > createActionTable ( ) { return new org.ovirt.engine.ui.common.widget.table.SimpleActionTable < T > ( modelProvider , getTableHeaderlessResources ( ) , getTableResources ( ) , org.ovirt.engine.ui.webadmin.gin.ClientGinjectorProvider.getEventBus ( ) , org.ovirt.engine.ui.webadmin.gin.ClientGinjectorProvider.getClientStorage ( ) ) ; }

Target:
protected org.ovirt.engine.ui.common.widget.table.SimpleActionTable < T > createActionTable ( ) { return new org.ovirt.engine.ui.common.widget.table.SimpleActionTable < T > ( modelProvider , getTableHeaderlessResources ( ) , getTableResources ( ) , org.ovirt.engine.ui.webadmin.gin.ClientGinjectorProvider.getEventBus ( ) , org.ovirt.engine.ui.webadmin.gin.ClientGinjectorProvider.getClientStorage ( ) ) { { if ( useTableWidgetForContent ( ) ) { enableHeaderContextMenu ( ) ; } } } ; }