auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void appendCustomValueAppendsWithNull ( ) { final org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase b = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.TestAuditLogableBase ( ) ; final java.lang.String key = "foo" ; final java.lang.String value = null ; final java.lang.String newVal = "bar" ; final java.lang.String sep = "_" ; b.AddCustomValue ( key , value ) ; b.AppendCustomValue ( key , newVal , sep ) ; final java.lang.String s = b.GetCustomValue ( key ) ; org.junit.Assert.assertEquals ( ( ( value + sep ) + newVal ) , s ) ; }

Target:
public void appendCustomValueAppendsWithNull ( ) { final org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase b = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.TestAuditLogableBase ( ) ; final java.lang.String key = "foo" ; final java.lang.String value = null ; final java.lang.String newVal = "bar" ; final java.lang.String sep = "_" ; b.addCustomValue ( key , value ) ; b.appendCustomValue ( key , newVal , sep ) ; final java.lang.String s = b.getCustomValue ( key ) ; org.junit.Assert.assertEquals ( ( ( value + sep ) + newVal ) , s ) ; }
Source:
public void testGetBadGuid ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpQueryExpectations ( new java.lang.String [ ] { "cpu.burnout" , "cpu.meltdown" , "cpu.vapourized" } , false ) ; try { resource.get ( ) ; org.junit.jupiter.api.Assertions.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }

Target:
public void testGetBadGuid ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpQueryExpectations ( new java.lang.String [ ] { "cpu.burnout" , "cpu.meltdown" , "cpu.vapourized" } , false ) ; verifyNotFoundException ( org.junit.jupiter.api.Assertions.assertThrows ( javax.ws.rs.WebApplicationException.class , resource :: get ) ) ; }
Source:
protected boolean canDoAction ( ) { if ( ! ( super . canDoAction ( ) ) ) { return false ; } java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > watchdogs = getWatchdogs ( ) ; if ( watchdogs.isEmpty ( ) ) { return failCanDoAction ( EngineMessage.WATCHDOG_NOT_FOUND ) ; } if ( ! ( validate ( validateWatchdog ( ) ) ) ) { return false ; } return true ; }

Target:
protected boolean validate ( ) { if ( ! ( super . validate ( ) ) ) { return false ; } java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > watchdogs = getWatchdogs ( ) ; if ( watchdogs.isEmpty ( ) ) { return failValidation ( EngineMessage.WATCHDOG_NOT_FOUND ) ; } if ( ! ( validate ( validateWatchdog ( ) ) ) ) { return false ; } return true ; }
Source:
public void stringToCpuTune ( ) { org.ovirt.engine.api.model.CpuTune cpuTune = org.ovirt.engine.api.restapi.types.VmMapper.stringToCpuTune ( "0#0" ) ; assertNotNull ( cpuTune ) ; assertNotNull ( cpuTune.getVcpuPin ( ) ) ; assertEquals ( 1 , cpuTune.getVcpuPin ( ) . size ( ) ) ; assertEquals ( 0 , cpuTune.getVcpuPin ( ) . get ( 0 ) . getVcpu ( ) ) ; assertEquals ( "0" , cpuTune.getVcpuPin ( ) . get ( 0 ) . getCpuSet ( ) ) ; }

Target:
public void stringToCpuTune ( ) { org.ovirt.engine.api.model.CpuTune cpuTune = org.ovirt.engine.api.restapi.types.VmMapper.stringToCpuTune ( "0#0" ) ; assertNotNull ( cpuTune ) ; assertNotNull ( cpuTune.getVCpuPin ( ) ) ; assertEquals ( 1 , cpuTune.getVCpuPin ( ) . size ( ) ) ; assertEquals ( 0 , cpuTune.getVCpuPin ( ) . get ( 0 ) . getVcpu ( ) ) ; assertEquals ( "0" , cpuTune.getVCpuPin ( ) . get ( 0 ) . getCpuSet ( ) ) ; }
Source:
public void guestLogoutTimeTreatmentAfterDestroy ( ) { if ( ( ( getGuestLastLoginTime ( ) ) != null ) && ( ( ( getGuestLastLogoutTime ( ) ) == null ) || ( ( getGuestLastLoginTime ( ) . compareTo ( getGuestLastLogoutTime ( ) ) ) > 0 ) ) ) { setGuestLastLogoutTime ( new java.util.Date ( ) ) ; } }

Target:
public java.lang.String getHibernationVolHandle ( ) { return hibernationVolHandle ; }
Source:
public java.lang.Long determineTotalImageInitialSize ( org.ovirt.engine.core.common.businessentities.storage.DiskImage sourceImage , org.ovirt.engine.core.common.businessentities.storage.VolumeFormat destFormat , org.ovirt.engine.core.compat.Guid dstDomain ) { if ( isInitialSizeSupportedForFormat ( destFormat , dstDomain ) ) { double totalSizeForClonedDisk = org.ovirt.engine.core.bll.storage.disk.image.ImagesHandler.getTotalActualSizeOfDisk ( sourceImage , storageDomainDao.get ( dstDomain ) . getStorageStaticData ( ) ) ; return org.ovirt.engine.core.bll.storage.disk.image.ImagesHandler.computeCowImageNeededSize ( java.lang.Double.valueOf ( totalSizeForClonedDisk ) . longValue ( ) ) ; } return null ; }

Target:
public java.lang.Long determineTotalImageInitialSize ( org.ovirt.engine.core.common.businessentities.storage.DiskImage sourceImage , org.ovirt.engine.core.common.businessentities.storage.VolumeFormat destFormat , org.ovirt.engine.core.compat.Guid dstDomain ) { if ( isInitialSizeSupportedForFormat ( destFormat , dstDomain ) ) { double totalSizeForClonedDisk = org.ovirt.engine.core.bll.storage.disk.image.ImagesHandler.getTotalActualSizeOfDisk ( sourceImage , storageDomainDao.get ( dstDomain ) . getStorageStaticData ( ) ) ; return org.ovirt.engine.core.bll.storage.disk.image.ImagesHandler.computeCowImageNeededSize ( sourceImage.getVolumeFormat ( ) , java.lang.Double.valueOf ( totalSizeForClonedDisk ) . longValue ( ) ) ; } return null ; }
Source:
public static void GetVmById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmByVmId , new org.ovirt.engine.core.common.queries.GetVmByVmIdParameters ( vmId ) , aQuery ) ; }

Target:
public static void getVmById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }
Source:
public void getDataCenterMaxNameLength ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) . intValue ( ) : 1 ; } } ; getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.StoragePoolNameSizeLimit , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public void getClustersHavingHosts ( 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.GetAllClustersHavingHosts , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }
Source:
public void search ( ) { if ( ( getSearchPageSize ( ) ) == ( org.ovirt.engine.ui.uicommonweb.models.SearchableListModel.UnknownInteger ) ) { asyncCallback.RequestSearch ( ) ; } else { stopRefresh ( ) ; if ( getIsQueryFirstTime ( ) ) { setSelectedItem ( null ) ; org.ovirt.engine.ui.uicommonweb.models.SearchableListModel.setSelectedItems ( null ) ; } if ( ( getIsTimerDisabled ( ) ) == false ) { setIsQueryFirstTime ( true ) ; syncSearch ( ) ; setIsQueryFirstTime ( false ) ; getTimer ( ) . start ( ) ; } else { syncSearch ( ) ; } } }

Target:
public void search ( ) { if ( ( getSearchPageSize ( ) ) == ( org.ovirt.engine.ui.uicommonweb.models.SearchableListModel.UnknownInteger ) ) { asyncCallback.requestSearch ( ) ; } else { stopRefresh ( ) ; if ( getIsQueryFirstTime ( ) ) { setSelectedItem ( null ) ; org.ovirt.engine.ui.uicommonweb.models.SearchableListModel.setSelectedItems ( null ) ; } if ( ( getIsTimerDisabled ( ) ) == false ) { setIsQueryFirstTime ( true ) ; syncSearch ( ) ; setIsQueryFirstTime ( false ) ; getTimer ( ) . start ( ) ; } else { syncSearch ( ) ; } } }
Source:
public org.ovirt.engine.core.common.action.VdcReturnValueBase runAction ( org.ovirt.engine.core.common.action.VdcActionType actionType , org.ovirt.engine.core.common.action.VdcActionParametersBase params ) { org.ovirt.engine.ui.frontend.server.gwt.GenericApiGWTServiceImpl.log.debug ( "Server: RunAction invoked!" ) ; debugAction ( actionType , params ) ; params.setSessionId ( getEngineSessionId ( ) ) ; if ( ( params.getCorrelationId ( ) ) == null ) { params.setCorrelationId ( org.ovirt.engine.core.utils.CorrelationIdTracker.getCorrelationId ( ) ) ; } return getBackend ( ) . runAction ( actionType , params ) ; }

Target:
public org.ovirt.engine.core.common.action.VdcReturnValueBase runAction ( org.ovirt.engine.core.common.action.ActionType actionType , org.ovirt.engine.core.common.action.VdcActionParametersBase params ) { org.ovirt.engine.ui.frontend.server.gwt.GenericApiGWTServiceImpl.log.debug ( "Server: RunAction invoked!" ) ; debugAction ( actionType , params ) ; params.setSessionId ( getEngineSessionId ( ) ) ; if ( ( params.getCorrelationId ( ) ) == null ) { params.setCorrelationId ( org.ovirt.engine.core.utils.CorrelationIdTracker.getCorrelationId ( ) ) ; } return getBackend ( ) . runAction ( actionType , params ) ; }
Source:
public void getHostArchitecture ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter < org.ovirt.engine.core.common.businessentities.ArchitectureType > ( ) { @ java.lang.Override public org.ovirt.engine.core.common.businessentities.ArchitectureType Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return ( ( org.ovirt.engine.core.common.businessentities.ArchitectureType ) ( source ) ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetHostArchitecture , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
public void getIrsImageList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , boolean forceRefresh ) { org.ovirt.engine.core.common.businessentities.storage.ImageFileType imageFileType = org.ovirt.engine.core.common.businessentities.storage.ImageFileType.ISO ; getIrsImageList ( aQuery , storagePoolId , forceRefresh , imageFileType ) ; }
Source:
public void testQueryWithFilter ( ) throws java.lang.Exception { java.util.List < java.lang.String > filterValue = new java.util.ArrayList < > ( ) ; filterValue.add ( "true" ) ; org.mockito.Mockito.reset ( httpHeaders ) ; org.mockito.Mockito.when ( httpHeaders.getRequestHeader ( org.ovirt.engine.api.restapi.resource.USER_FILTER_HEADER ) ) . thenReturn ( filterValue ) ; setUpEntityQueryExpectations ( 1 ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; java.util.List < org.ovirt.engine.api.model.Network > networks = getCollection ( ) ; java.util.Collections.sort ( networks , new org.ovirt.engine.api.restapi.resource.BackendNetworksResourceTest.NetworkIdComparator ( ) ) ; verifyCollection ( networks ) ; }

Target:
public void testQueryWithFilter ( ) throws java.lang.Exception { java.util.List < java.lang.String > filterValue = new java.util.ArrayList < > ( ) ; filterValue.add ( "true" ) ; org.mockito.Mockito.reset ( httpHeaders ) ; org.mockito.Mockito.when ( httpHeaders.getRequestHeader ( org.ovirt.engine.api.restapi.resource.USER_FILTER_HEADER ) ) . thenReturn ( filterValue ) ; setUpEntityQueryExpectations ( 1 ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; java.util.List < org.ovirt.engine.api.model.Network > networks = getCollection ( ) ; java.util.Collections.sort ( networks , java.util.Comparator.comparing ( Network :: getId ) ) ; verifyCollection ( networks ) ; }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { boolean authenticationRequired = requiresAuthentication.getEntity ( ) ; getUsername ( ) . setIsChangable ( authenticationRequired ) ; getPassword ( ) . setIsChangable ( authenticationRequired ) ; getTenantName ( ) . setIsChangable ( authenticationRequired ) ; }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < ? extends org.ovirt.engine.ui.uicompat.EventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { boolean authenticationRequired = requiresAuthentication.getEntity ( ) ; getUsername ( ) . setIsChangable ( authenticationRequired ) ; getPassword ( ) . setIsChangable ( authenticationRequired ) ; getTenantName ( ) . setIsChangable ( authenticationRequired ) ; getAuthUrl ( ) . setIsChangable ( authenticationRequired ) ; }
Source:
private void InitCache ( ) { if ( ( org.ovirt.engine.core.utils.pm.VdsFencingOptions.fencingOptionMapping ) == null ) { org.ovirt.engine.core.utils.pm.VdsFencingOptions.fencingAgentInstanceOptions = new java.util.HashMap < java.lang.String , java.lang.String > ( ) ; org.ovirt.engine.core.utils.pm.VdsFencingOptions.fencingOptionMapping = new java.util.HashMap < java.lang.String , java.util.HashMap < java.lang.String , java.lang.String > > ( ) ; org.ovirt.engine.core.utils.pm.VdsFencingOptions.fencingOptionTypes = new java.util.HashMap < java.lang.String , java.lang.String > ( ) ; org.ovirt.engine.core.utils.pm.VdsFencingOptions.fencingSpecialParams = new java.util.HashSet < java.lang.String > ( ) ; CacheFencingAgentsOptionMapping ( ) ; CacheFencingAgentsOptionTypes ( ) ; } }

Target:
private void InitCache ( ) { if ( ( org.ovirt.engine.core.utils.pm.VdsFenceOptions.fencingOptionMapping ) == null ) { org.ovirt.engine.core.utils.pm.VdsFenceOptions.fencingAgentInstanceOptions = new java.util.HashMap < java.lang.String , java.lang.String > ( ) ; org.ovirt.engine.core.utils.pm.VdsFenceOptions.fencingOptionMapping = new java.util.HashMap < java.lang.String , java.util.HashMap < java.lang.String , java.lang.String > > ( ) ; org.ovirt.engine.core.utils.pm.VdsFenceOptions.fencingOptionTypes = new java.util.HashMap < java.lang.String , java.lang.String > ( ) ; org.ovirt.engine.core.utils.pm.VdsFenceOptions.fencingSpecialParams = new java.util.HashSet < java.lang.String > ( ) ; CacheFencingAgentsOptionMapping ( ) ; CacheFencingAgentsOptionTypes ( ) ; } }
Source:
protected void openDocumentation ( T model ) { java.lang.String helpTag = model.getHelpTag ( ) . name ; java.lang.String documentationPath = org.ovirt.engine.ui.common.uicommon.ContextSensitiveHelpManager.getPath ( helpTag ) ; java.lang.String documentationLibURL = model.getConfigurator ( ) . getDocumentationLibURL ( ) ; org.ovirt.engine.ui.common.utils.WebUtils.openUrlInNewWindow ( "_blank" , ( documentationLibURL + documentationPath ) , WebUtils.OPTION_SCROLLBARS ) ; }

Target:
protected void openDocumentation ( T model ) { java.lang.String helpTag = model.getHelpTag ( ) . name ; java.lang.String docPath = org.ovirt.engine.ui.common.uicommon.ContextSensitiveHelpManager.getPath ( helpTag ) ; java.lang.String docBase = model.getConfigurator ( ) . getDocsBaseUrl ( ) ; org.ovirt.engine.ui.common.utils.WebUtils.openUrlInNewWindow ( "_blank" , ( docBase + docPath ) , WebUtils.OPTION_SCROLLBARS ) ; }
Source:
public void testCompleteParameters ( ) throws java.lang.Exception { org.ovirt.engine.api.model.VM vm = new org.ovirt.engine.api.model.VM ( ) ; vm.setName ( "foo" ) ; vm.setStatus ( org.ovirt.engine.api.common.util.StatusUtils.create ( VmStatus.UP ) ) ; vm.setHost ( new org.ovirt.engine.api.model.Host ( ) ) ; org.ovirt.engine.api.common.util.CompletenessAssertor.validateParameters ( vm , "name" , "host" , "status" ) ; }

Target:
public void testCompleteParameters ( ) throws java.lang.Exception { org.ovirt.engine.api.model.Vm vm = new org.ovirt.engine.api.model.Vm ( ) ; vm.setName ( "foo" ) ; vm.setStatus ( org.ovirt.engine.api.common.util.StatusUtils.create ( VmStatus.UP ) ) ; vm.setHost ( new org.ovirt.engine.api.model.Host ( ) ) ; org.ovirt.engine.api.common.util.CompletenessAssertor.validateParameters ( vm , "name" , "host" , "status" ) ; }
Source:
public boolean equals ( java.lang.Object o ) { if ( ( this ) == o ) { return true ; } if ( ! ( o instanceof org.ovirt.engine.core.common.businessentities.network.IpConfiguration ) ) { return false ; } org.ovirt.engine.core.common.businessentities.network.IpConfiguration other = ( ( org.ovirt.engine.core.common.businessentities.network.IpConfiguration ) ( o ) ) ; return java.util.Objects.equals ( iPv4Addresses , other.iPv4Addresses ) ; }

Target:
public boolean equals ( java.lang.Object o ) { if ( ( this ) == o ) { return true ; } if ( ! ( o instanceof org.ovirt.engine.core.common.businessentities.network.IpConfiguration ) ) { return false ; } org.ovirt.engine.core.common.businessentities.network.IpConfiguration other = ( ( org.ovirt.engine.core.common.businessentities.network.IpConfiguration ) ( o ) ) ; return ( java.util.Objects.equals ( iPv4Addresses , other.iPv4Addresses ) ) && ( java.util.Objects.equals ( ipV6Addresses , other.ipV6Addresses ) ) ; }
Source:
public java.lang.Object invoke ( java.lang.Object proxy , java.lang.reflect.Method method , java.lang.Object [ ] args ) throws java.lang.Throwable { if ( method.getName ( ) . equals ( "close" ) ) { return null ; } return method.invoke ( connection , args ) ; }

Target:
private void openConnection ( ) throws java.sql.SQLException { connection = java.sql.DriverManager.getConnection ( url , user , password ) ; wrapper = ( ( java.sql.Connection ) ( java.lang.reflect.Proxy.newProxyInstance ( java.lang.Thread.currentThread ( ) . getContextClassLoader ( ) , new java.lang.Class < ? > [ ] { java.sql.Connection.class } , ( proxy , method , args ) -> { if ( method.getName ( ) . equals ( "close" ) ) { return null ; } return method.invoke ( connection , args ) ; } ) ) ) ; }
Source:
private org.ovirt.engine.core.bll.network.host.SetupNetworksHelper qosCommitmentReportedBondSpeed ( int totalCommitment ) { return qosCommitmentBondSetup ( totalCommitment , null , org.ovirt.engine.core.bll.network.host.SetupNetworksHelperTest.DEFAULT_SPEED , org.ovirt.engine.core.bll.network.host.SetupNetworksHelperTest.BOND_MODE_4 ) ; }

Target:
private org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface createVlan ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface baseNic , int vlanId , java.lang.String networkName ) { java.lang.String baseIfaceName = baseNic.getName ( ) ; org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic = createVdsInterface ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , ( ( baseIfaceName + "." ) + vlanId ) , false , null , baseIfaceName , vlanId , networkName , true , null , null , org.ovirt.engine.core.bll.network.host.SetupNetworksHelperTest.DEFAULT_SPEED ) ; mockCalculateBaseNicWhenVlanNicIsPassed ( baseNic , nic ) ; return nic ; }
Source:
public void endStepJob ( org.ovirt.engine.core.common.job.Step step ) { getJobRepository ( ) . updateStep ( step ) ; org.ovirt.engine.core.bll.job.ExecutionContext finalContext = org.ovirt.engine.core.bll.job.ExecutionHandler.getInstance ( ) . createFinalizingContext ( step.getId ( ) ) ; org.ovirt.engine.core.bll.job.ExecutionHandler.getInstance ( ) . endTaskStepAndJob ( finalContext , isTaskSuccess ( step.getStatus ( ) ) ) ; }

Target:
public void releaseVolumeLock ( org.ovirt.engine.core.compat.Guid taskId ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity vol = volumeDao.getVolumeByGlusterTask ( taskId ) ; if ( vol != null ) { releaseLock ( vol.getId ( ) ) ; } else { org.ovirt.engine.core.bll.gluster.tasks.GlusterTaskUtils.log.debug ( "Did not find a volume associated with task '{}'" , taskId ) ; } }
Source:
public void edit ( org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel object ) { priorityEditor.setRowData ( new java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.EntityModel > ( ) ) ; priorityEditor.edit ( object.getPriority ( ) ) ; driver.edit ( object ) ; initTabAvailabilityListeners ( object ) ; initListeners ( object ) ; initCustomPropertySheet ( object ) ; }

Target:
public void edit ( org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel model ) { super . edit ( model ) ; priorityEditor.setRowData ( new java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.EntityModel > ( ) ) ; priorityEditor.edit ( model.getPriority ( ) ) ; driver.edit ( model ) ; initTabAvailabilityListeners ( model ) ; initListeners ( model ) ; initCustomPropertySheet ( model ) ; hideAlwaysHiddenFields ( ) ; }
Source:
public static void getVmListByClusterName ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String clusterName ) { 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 ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > vms = org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VM > cast ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.IVdcQueryable > ) ( source ) ) ) ; return vms ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( ( "Vms: cluster=" + clusterName ) , org.ovirt.engine.core.common.interfaces.SearchType.VM ) , aQuery ) ; }

Target:
public static void getVmNicList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ) ( source ) ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmInterfacesByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
private void addNameSpaceColumn ( org.ovirt.engine.ui.common.CommonApplicationConstants constants ) { org.ovirt.engine.ui.common.widget.table.column.AbstractTextColumn < org.ovirt.engine.core.common.businessentities.Permission > namespaceColumn = new org.ovirt.engine.ui.common.widget.table.column.AbstractTextColumn < org.ovirt.engine.core.common.businessentities.Permission > ( ) { @ java.lang.Override public java.lang.String getValue ( org.ovirt.engine.core.common.businessentities.Permission object ) { return object.getNamespace ( ) ; } } ; namespaceColumn.makeSortable ( ) ; org.ovirt.engine.ui.common.widget.uicommon.permissions.PermissionListModelTable.getTable ( ) . addColumn ( namespaceColumn , constants.namespace ( ) , "150px" ) ; }

Target:
private void addRoleColumn ( ) { org.ovirt.engine.ui.common.widget.table.column.AbstractTextColumn < org.ovirt.engine.core.common.businessentities.Permission > roleColumn = new org.ovirt.engine.ui.common.widget.table.column.AbstractTextColumn < org.ovirt.engine.core.common.businessentities.Permission > ( ) { @ java.lang.Override public java.lang.String getValue ( org.ovirt.engine.core.common.businessentities.Permission object ) { return object.getRoleName ( ) ; } } ; roleColumn.makeSortable ( ) ; org.ovirt.engine.ui.common.widget.uicommon.permissions.PermissionListModelTable.getTable ( ) . addColumn ( roleColumn , org.ovirt.engine.ui.common.widget.uicommon.permissions.PermissionListModelTable.constants.rolePermission ( ) , "300px" ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeGeoRepStatusForXmlRpc glusterVolumeGeoRepStatus ( java.lang.String volumeName , java.lang.String slaveHost , java.lang.String slaveVolumeName ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "GlusterVolume.geoRepStatus" ) . withParameter ( "volName" , volumeName ) . withParameter ( "remoteHost" , slaveHost ) . withParameter ( "remoteVolName" , slaveVolumeName ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) . withIgnoreResponseKey ( ) ; return new org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeGeoRepStatusForXmlRpc ( response ) ; }

Target:
public org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeGeoRepStatusForXmlRpc glusterVolumeGeoRepSessionList ( java.lang.String volumeName , java.lang.String slaveHost , java.lang.String slaveVolumeName ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "GlusterVolume.geoRepSessionList" ) . withParameter ( "volName" , volumeName ) . withParameter ( "remoteHost" , slaveHost ) . withParameter ( "remoteVolName" , slaveVolumeName ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) . withIgnoreResponseKey ( ) ; return new org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeGeoRepStatusForXmlRpc ( response ) ; }
Source:
private void onRemove ( ) { cancel ( ) ; java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > params = new java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > ( ) ; for ( org.ovirt.engine.core.common.businessentities.MacPool macPool : ( ( java.lang.Iterable < org.ovirt.engine.core.common.businessentities.MacPool > ) ( getSelectedItems ( ) ) ) ) { params.add ( new org.ovirt.engine.core.common.action.IdParameters ( macPool.getId ( ) ) ) ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runMultipleAction ( VdcActionType.RemoveMacPool , params ) ; }

Target:
private void onRemove ( ) { cancel ( ) ; java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > params = new java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > ( ) ; for ( org.ovirt.engine.core.common.businessentities.MacPool macPool : ( ( java.lang.Iterable < org.ovirt.engine.core.common.businessentities.MacPool > ) ( getSelectedItems ( ) ) ) ) { params.add ( new org.ovirt.engine.core.common.action.RemoveMacPoolByIdParameters ( macPool.getId ( ) ) ) ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runMultipleAction ( VdcActionType.RemoveMacPool , params ) ; }
Source:
private void mockVdsWithOsVersion ( java.lang.String osVersion ) { org.ovirt.engine.core.common.businessentities.VDS vds = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; vds.setVdsType ( VDSType.oVirtNode ) ; vds.setHostOs ( osVersion ) ; org.mockito.Mockito.when ( vdsDao.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( vds ) ; }

Target:
private void mockVdsWithOsVersion ( java.lang.String osVersion ) { org.ovirt.engine.core.common.businessentities.VDS vds = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; vds.setVdsType ( VDSType.oVirtVintageNode ) ; vds.setHostOs ( osVersion ) ; org.mockito.Mockito.when ( vdsDao.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( vds ) ; }
Source:
public void testChangeCdUsingQueryParameter ( ) throws java.lang.Exception { resource.setUriInfo ( setUpChangeCdUriQueryExpectations ( ) ) ; setUpGetEntityExpectations ( 1 , VMStatus.Up ) ; setUpActionExpectations ( VdcActionType.ChangeDisk , org.ovirt.engine.core.common.action.ChangeDiskCommandParameters.class , new java.lang.String [ ] { "CdImagePath" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendCdRomResourceTest.ISO_PATH } , true , true ) ; org.ovirt.engine.api.model.CdRom cdrom = resource.update ( getUpdate ( ) ) ; assertTrue ( cdrom.isSetFile ( ) ) ; }

Target:
public void testChangeCdUsingQueryParameter ( ) throws java.lang.Exception { resource.setUriInfo ( setUpChangeCdUriQueryExpectations ( ) ) ; setUpGetEntityExpectations ( 1 , VMStatus.Up ) ; setUpActionExpectations ( VdcActionType.ChangeDisk , org.ovirt.engine.core.common.action.ChangeDiskCommandParameters.class , new java.lang.String [ ] { "CdImagePath" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.AbstractBackendCdRomsResourceTest.ISO_PATH } , true , true ) ; org.ovirt.engine.api.model.CdRom cdrom = resource.update ( getUpdate ( ) ) ; assertTrue ( cdrom.isSetFile ( ) ) ; }
Source:
public 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 ) . withoutRefresh ( ) , aQuery ) ; }

Target:
public void getAAANamespaces ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.HashMap < java.lang.String , java.util.List < java.lang.String > > ) ( source ) ) : new java.util.HashMap < java.lang.String , java.util.List < java.lang.String > > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAvailableNamespaces , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }
Source:
public static 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.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 getMaxNumOfVmSockets ( 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.Integer ) ( source ) ) . intValue ( ) : 1 ; } } ; org.ovirt.engine.core.common.queries.GetConfigurationValueParameters tempVar = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.MaxNumOfVmSockets ) ; tempVar.setVersion ( version ) ; getConfigFromCache ( tempVar , aQuery ) ; }
Source:
private java.lang.String [ ] createIncoherentIdentificationErrorReplacements ( java.lang.String violatingEntityId , org.ovirt.engine.core.compat.Guid referringId , java.lang.String referringName ) { return new java.lang.String [ ] { java.lang.String.format ( "$referrerId %s" , violatingEntityId ) , java.lang.String.format ( "$referringId %s" , referringId ) , java.lang.String.format ( "$referringName %s" , referringName ) } ; }

Target:
private java.lang.String [ ] createIncoherentIdentificationErrorReplacements ( java.lang.String violatingEntityId , org.ovirt.engine.core.compat.Guid referringId , java.lang.String referringName ) { return new java.lang.String [ ] { org.ovirt.engine.core.utils.ReplacementUtils.createSetVariableString ( "referrerId" , violatingEntityId ) , org.ovirt.engine.core.utils.ReplacementUtils.createSetVariableString ( "referringId" , referringId ) , org.ovirt.engine.core.utils.ReplacementUtils.createSetVariableString ( "referringName" , referringName ) } ; }
Source:
public void testGetEntityNameByIdAndTypeForRole ( ) { org.ovirt.engine.core.common.businessentities.roles role = dbFacade.getRoleDAO ( ) . get ( org.ovirt.engine.core.dao.DbFacadeDAOTest.ROLE_ID ) ; org.junit.Assert.assertNotNull ( role ) ; java.lang.String name = role.getname ( ) ; org.junit.Assert.assertTrue ( name.equals ( dbFacade.getEntityNameByIdAndType ( org.ovirt.engine.core.dao.DbFacadeDAOTest.ROLE_ID , VdcObjectType.Role ) ) ) ; }

Target:
public void testGetEntityNameByIdAndTypeForRole ( ) { org.ovirt.engine.core.common.businessentities.Role role = dbFacade.getRoleDao ( ) . get ( org.ovirt.engine.core.dao.DbFacadeDAOTest.ROLE_ID ) ; org.junit.Assert.assertNotNull ( role ) ; java.lang.String name = role.getname ( ) ; org.junit.Assert.assertTrue ( name.equals ( dbFacade.getEntityNameByIdAndType ( org.ovirt.engine.core.dao.DbFacadeDAOTest.ROLE_ID , VdcObjectType.Role ) ) ) ; }
Source:
public void versionDecreaseLowerVersionThanDC ( ) { createCommandWithOlderVersion ( ) ; org.ovirt.engine.core.dao.StoragePoolDao storagePoolDao2 = org.mockito.Mockito.mock ( org.ovirt.engine.core.dao.StoragePoolDao.class ) ; org.mockito.Mockito.when ( storagePoolDao2.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( org.ovirt.engine.core.bll.UpdateClusterCommandTest.createStoragePoolLocalFSOldVersion ( ) ) ; org.mockito.Mockito.doReturn ( storagePoolDao2 ) . when ( cmd ) . getStoragePoolDao ( ) ; org.mockito.Mockito.doReturn ( storagePoolDao2 ) . when ( dbFacadeMock ) . getStoragePoolDao ( ) ; setupCpu ( ) ; validateFailedWithReason ( EngineMessage.ACTION_TYPE_FAILED_CANNOT_DECREASE_COMPATIBILITY_VERSION_UNDER_DC ) ; }

Target:
public void versionDecreaseLowerVersionThanDC ( ) { createCommandWithOlderVersion ( ) ; org.mockito.Mockito.when ( storagePoolDao.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( org.ovirt.engine.core.bll.UpdateClusterCommandTest.createStoragePoolLocalFSOldVersion ( ) ) ; setupCpu ( ) ; validateFailedWithReason ( EngineMessage.ACTION_TYPE_FAILED_CANNOT_DECREASE_COMPATIBILITY_VERSION_UNDER_DC ) ; }
Source:
public org.ovirt.engine.core.common.businessentities.VmTemplate getByName ( java.lang.String name , org.ovirt.engine.core.compat.Guid userID , boolean isFiltered ) { return getCallsHandler ( ) . executeRead ( "GetVmTemplateByVmtName" , org.ovirt.engine.core.dao.VmTemplateDAODbFacadeImpl.VMTemplateRowMapper.instance , getCustomMapSqlParameterSource ( ) . addValue ( "vmt_name" , name ) . addValue ( "user_id" , userID ) . addValue ( "is_filtered" , isFiltered ) ) ; }

Target:
public org.ovirt.engine.core.common.businessentities.VmTemplate getByName ( java.lang.String name , org.ovirt.engine.core.compat.Guid datacenterId , org.ovirt.engine.core.compat.Guid userID , boolean isFiltered ) { return getCallsHandler ( ) . executeRead ( "GetVmTemplateByVmtName" , org.ovirt.engine.core.dao.VmTemplateDAODbFacadeImpl.VMTemplateRowMapper.instance , getCustomMapSqlParameterSource ( ) . addValue ( "vmt_name" , name ) . addValue ( "storage_pool_id" , datacenterId ) . addValue ( "user_id" , userID ) . addValue ( "is_filtered" , isFiltered ) ) ; }
Source:
public static void getUpHostListByCluster ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String clusterName ) { 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.VDS > list = org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VDS > cast ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.IVdcQueryable > ) ( source ) ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( ) ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getUpHostListByCluster ( aQuery , clusterName , null ) ; }

Target:
public static void getoVirtISOsList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? new java.util.ArrayList < org.ovirt.engine.core.compat.RpmVersion > ( ( ( java.util.ArrayList < org.ovirt.engine.core.compat.RpmVersion > ) ( source ) ) ) : new java.util.ArrayList < org.ovirt.engine.core.compat.RpmVersion > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetoVirtISOs , new org.ovirt.engine.core.common.queries.VdsIdParametersBase ( id ) , aQuery ) ; }
Source:
public void onFailure ( java.lang.Throwable caught ) { org.ovirt.engine.ui.frontend.Frontend.logger.log ( java.util.logging.Level.SEVERE , ( "Failed to execute RunPublicQuery: " + caught ) , caught ) ; org.ovirt.engine.ui.uicompat.FrontendMultipleQueryAsyncResult f = new org.ovirt.engine.ui.uicompat.FrontendMultipleQueryAsyncResult ( queryTypeList , queryParamsList , null ) ; org.ovirt.engine.ui.frontend.Frontend.failureEventHandler ( caught ) ; callback.Executed ( f ) ; org.ovirt.engine.ui.frontend.Frontend.raiseQueryCompleteEvent ( queryTypeList , context ) ; }

Target:
public void onFailure ( java.lang.Throwable caught ) { if ( org.ovirt.engine.ui.frontend.Frontend.ignoreFailure ( caught ) ) { return ; } org.ovirt.engine.ui.frontend.Frontend.logger.log ( java.util.logging.Level.SEVERE , ( "Failed to execute RunPublicQuery: " + caught ) , caught ) ; org.ovirt.engine.ui.uicompat.FrontendMultipleQueryAsyncResult f = new org.ovirt.engine.ui.uicompat.FrontendMultipleQueryAsyncResult ( queryTypeList , queryParamsList , null ) ; org.ovirt.engine.ui.frontend.Frontend.failureEventHandler ( caught ) ; callback.Executed ( f ) ; org.ovirt.engine.ui.frontend.Frontend.raiseQueryCompleteEvent ( queryTypeList , context ) ; }
Source:
public java.util.Set < java.lang.String > getConsumedEvents ( ) { java.util.Set < java.lang.String > set = new java.util.HashSet ( super . getConsumedEvents ( ) ) ; set.add ( BrowserEvents.CLICK ) ; set.add ( BrowserEvents.MOUSEMOVE ) ; return set ; }

Target:
public java.util.Set < java.lang.String > getConsumedEvents ( ) { java.util.Set < java.lang.String > set = new java.util.HashSet ( super . getConsumedEvents ( ) ) ; set.add ( BrowserEvents.CLICK ) ; set.add ( BrowserEvents.CONTEXTMENU ) ; set.add ( BrowserEvents.MOUSEMOVE ) ; set.add ( BrowserEvents.CHANGE ) ; return set ; }
Source:
public void setItems ( java.util.Collection value ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.Disk > disks = ( value != null ) ? org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.storage.Disk > cast ( value ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.Disk > ( ) ; java.util.Collections.sort ( disks , new org.ovirt.engine.ui.uicommonweb.Linq.DiskByAliasComparer ( ) ) ; super . setItems ( disks ) ; updateActionAvailability ( ) ; }

Target:
public void setItems ( java.util.Collection value ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.Disk > disks = ( value != null ) ? org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.storage.Disk > cast ( value ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.Disk > ( ) ; java.util.Collections.sort ( disks , new org.ovirt.engine.core.common.businessentities.comparators.DiskByDiskAliasComparator ( ) ) ; super . setItems ( disks ) ; updateActionAvailability ( ) ; }
Source:
public void getClusterNetworkList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { if ( ( aQuery.converterCallback ) == null ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.Network > ( ) ; } return source ; } } ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllNetworksByClusterId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( clusterId ) , aQuery ) ; }

Target:
public void getStorageDomainById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storageDomainId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( org.ovirt.engine.core.common.businessentities.StorageDomain ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( storageDomainId ) , aQuery ) ; }
Source:
public void AttachTask ( org.ovirt.engine.core.bll.tasks.CommandAsyncTask asyncTask ) { synchronized ( _listTasks ) { if ( ! ( _listTasks.containsKey ( asyncTask.getVdsmTaskId ( ) ) ) ) { org.ovirt.engine.core.bll.CommandMultiAsyncTasks.log.info ( "CommandMultiAsyncTasks::AttachTask: Attaching task '{}' to command '{}'." , asyncTask.getVdsmTaskId ( ) , getCommandId ( ) ) ; _listTasks.put ( asyncTask.getVdsmTaskId ( ) , asyncTask ) ; } } }

Target:
public void attachTask ( org.ovirt.engine.core.bll.tasks.CommandAsyncTask asyncTask ) { synchronized ( _listTasks ) { if ( ! ( _listTasks.containsKey ( asyncTask.getVdsmTaskId ( ) ) ) ) { org.ovirt.engine.core.bll.CommandMultiAsyncTasks.log.info ( "CommandMultiAsyncTasks::attachTask: Attaching task '{}' to command '{}'." , asyncTask.getVdsmTaskId ( ) , getCommandId ( ) ) ; _listTasks.put ( asyncTask.getVdsmTaskId ( ) , asyncTask ) ; } } }
Source:
protected UnitVmModel.GraphicsTypes getRawValue ( org.ovirt.engine.core.common.businessentities.VM vm ) { if ( ( ( vm.getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.Down ) ) || ( ( vm.getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.ImageLocked ) ) ) { return null ; } java.util.Map < org.ovirt.engine.core.common.businessentities.GraphicsType , org.ovirt.engine.core.common.businessentities.GraphicsInfo > graphicsInfos = vm.getGraphicsInfos ( ) ; return UnitVmModel.GraphicsTypes.fromGraphicsTypes ( graphicsInfos.keySet ( ) ) ; }

Target:
public java.lang.String getValue ( org.ovirt.engine.core.common.businessentities.VM vm ) { if ( ( vm.getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.MigratingFrom ) ) { return null ; } return super . getValue ( vm ) ; }
Source:
protected org.ovirt.engine.core.bll.ValidationResult validateInterfacesConfigured ( org.ovirt.engine.core.common.businessentities.VM vm ) { for ( org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface nic : vm.getInterfaces ( ) ) { if ( ( nic.getVnicProfileId ( ) ) == null ) { return org.ovirt.engine.core.common.FeatureSupported.networkLinking ( vm.getVdsGroupCompatibilityVersion ( ) ) ? org.ovirt.engine.core.bll.ValidationResult.VALID : new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_INTERFACE_NETWORK_NOT_CONFIGURED ) ; } } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }

Target:
protected org.ovirt.engine.core.bll.ValidationResult validateInterfacesConfigured ( org.ovirt.engine.core.common.businessentities.VM vm ) { for ( org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface nic : vm.getInterfaces ( ) ) { if ( ( nic.getVnicProfileId ( ) ) == null ) { return org.ovirt.engine.core.common.FeatureSupported.networkLinking ( vm.getClusterCompatibilityVersion ( ) ) ? org.ovirt.engine.core.bll.ValidationResult.VALID : new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_INTERFACE_NETWORK_NOT_CONFIGURED ) ; } } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }
Source:
public java.util.List < org.ovirt.engine.core.common.businessentities.RepoFileMetaData > getUserRequestForStoragePoolAndDomainRepoFileList ( org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.compat.Guid storageDomainId , org.ovirt.engine.core.common.businessentities.ImageType imageType , boolean forceRefresh ) { java.util.List < org.ovirt.engine.core.common.businessentities.RepoFileMetaData > repoList = null ; if ( ! ( isStorageDomainValid ( storageDomainId , imageType , forceRefresh ) ) ) { return null ; } repoList = getCachedIsoListByStoragePoolAndDomainId ( storagePoolId , storageDomainId , imageType ) ; return repoList ; }

Target:
public java.util.List < org.ovirt.engine.core.common.businessentities.RepoFileMetaData > getUserRequestForStoragePoolAndDomainRepoFileList ( org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.compat.Guid storageDomainId , org.ovirt.engine.core.common.businessentities.ImageFileType imageType , boolean forceRefresh ) { java.util.List < org.ovirt.engine.core.common.businessentities.RepoFileMetaData > repoList = null ; if ( ! ( isStorageDomainValid ( storageDomainId , imageType , forceRefresh ) ) ) { return null ; } repoList = getCachedIsoListByStoragePoolAndDomainId ( storagePoolId , storageDomainId , imageType ) ; return repoList ; }
Source:
private boolean Register ( org.ovirt.engine.core.common.businessentities.VDS vdsByUniqueId , org.ovirt.engine.core.compat.Guid vdsGroupId , boolean IsPending ) { boolean returnValue = true ; log.debugFormat ( "RegisterVdsQuery::Register - Entering" ) ; if ( vdsByUniqueId == null ) { returnValue = registerNewHost ( vdsGroupId , IsPending ) ; } else { returnValue = updateExistingHost ( vdsByUniqueId , IsPending ) ; } log.debugFormat ( "RegisterVdsQuery::Register - Leaving with value {0}" , returnValue ) ; return returnValue ; }

Target:
private boolean Register ( org.ovirt.engine.core.common.businessentities.VDS vds , org.ovirt.engine.core.compat.Guid vdsGroupId , boolean IsPending ) { boolean returnValue = true ; log.debug ( "RegisterVdsQuery::Register - Entering" ) ; if ( vds == null ) { returnValue = registerNewHost ( vdsGroupId , IsPending ) ; } else { returnValue = updateExistingHost ( vds , IsPending ) ; } log.debug ( "RegisterVdsQuery::Register - Leaving with value {}" , returnValue ) ; return returnValue ; }