auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
protected java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DbUser > getUsers ( ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DbUser > users = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DbUser > ( ) ; for ( int i = 0 ; i < ( NAMES.length ) ; i ++ ) { org.ovirt.engine.core.common.businessentities.DbUser user = new org.ovirt.engine.core.common.businessentities.DbUser ( ) ; user.setuser_id ( GUIDS [ i ] ) ; user.setname ( NAMES [ i ] ) ; user.setusername ( NAMES [ i ] ) ; users.add ( user ) ; } return users ; }

Target:
protected java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DbUser > getUsers ( ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DbUser > users = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DbUser > ( ) ; for ( int i = 0 ; i < ( NAMES.length ) ; i ++ ) { users.add ( getUserByIdx ( i ) ) ; } return users ; }
Source:
public void updateStatusForIp ( ) { org.ovirt.engine.core.common.businessentities.VdsKdumpStatus existing = new org.ovirt.engine.core.common.businessentities.VdsKdumpStatus ( ) ; existing.setStatus ( KdumpFlowStatus.FINISHED ) ; existing.setAddress ( "[\"10.35.110.10\", 4444]" ) ; dbFacade.getVdsKdumpStatusDao ( ) . updateForIp ( "10.35.110.10" , existing ) ; existing.setVdsId ( new org.ovirt.engine.core.compat.Guid ( "afce7a39-8e8c-4819-ba9c-796d316592e6" ) ) ; org.ovirt.engine.core.common.businessentities.VdsKdumpStatus found = dbFacade.getVdsKdumpStatusDao ( ) . get ( existing.getVdsId ( ) ) ; org.junit.Assert.assertNotNull ( found ) ; org.junit.Assert.assertEquals ( existing , found ) ; }

Target:
public void updateStatusForIp ( ) { org.ovirt.engine.core.common.businessentities.VdsKdumpStatus existing = new org.ovirt.engine.core.common.businessentities.VdsKdumpStatus ( ) ; existing.setStatus ( KdumpFlowStatus.FINISHED ) ; existing.setAddress ( "[\"10.35.110.10\", 4444]" ) ; dbFacade.getVdsKdumpStatusDao ( ) . updateForIp ( "10.35.110.10" , existing ) ; existing.setVdsId ( FixturesTool.VDS_RHEL6_NFS_SPM ) ; org.ovirt.engine.core.common.businessentities.VdsKdumpStatus found = dbFacade.getVdsKdumpStatusDao ( ) . get ( existing.getVdsId ( ) ) ; org.junit.Assert.assertNotNull ( found ) ; org.junit.Assert.assertEquals ( existing , found ) ; }
Source:
public static void main ( java.lang.String ... args ) { try { org.apache.log4j.Logger.getRootLogger ( ) . setLevel ( org.apache.log4j.Level.DEBUG ) ; org.ovirt.engine.core.config.EngineConfig.getInstance ( ) . setParser ( new org.ovirt.engine.core.config.EngineConfigCLIParser ( ) ) ; org.ovirt.engine.core.config.EngineConfig.getInstance ( ) . setUpAndExecute ( args ) ; } catch ( java.lang.Throwable t ) { org.ovirt.engine.core.config.EngineConfig.log.debug ( "Exiting with error: " , t ) ; java.lang.System.err.println ( t.getMessage ( ) ) ; java.lang.System.exit ( 1 ) ; } }

Target:
public static void main ( java.lang.String ... args ) { try { org.ovirt.engine.core.config.EngineConfig.getInstance ( ) . setParser ( new org.ovirt.engine.core.config.EngineConfigCLIParser ( ) ) ; org.ovirt.engine.core.config.EngineConfig.getInstance ( ) . setUpAndExecute ( args ) ; } catch ( java.lang.Throwable t ) { org.ovirt.engine.core.config.EngineConfig.log.debug ( "Exiting with error: " , t ) ; org.ovirt.engine.core.config.EngineConfig.console.writeErrorLine ( t.getMessage ( ) ) ; java.lang.System.exit ( 1 ) ; } }
Source:
public java.util.Map < java.lang.String , java.lang.String > getJobMessageProperties ( ) { if ( ( jobProperties ) == null ) { jobProperties = super . getJobMessageProperties ( ) ; jobProperties.put ( VdcObjectType.VM.name ( ) . toLowerCase ( ) , ( ( getVmName ( ) ) == null ? "" : getVmName ( ) ) ) ; jobProperties.put ( VdcObjectType.Storage.name ( ) . toLowerCase ( ) , getStorageDomainName ( ) ) ; } return jobProperties ; }

Target:
public java.util.Map < java.lang.String , java.lang.String > getJobMessageProperties ( ) { if ( ( jobProperties ) == null ) { jobProperties = super . getJobMessageProperties ( ) ; jobProperties.put ( VdcObjectType.VM.name ( ) . toLowerCase ( ) , ( ( getVmName ( ) ) == null ? "" : getVmName ( ) ) ) ; jobProperties.put ( VdcObjectType.VdsGroups.name ( ) . toLowerCase ( ) , getVdsGroupName ( ) ) ; } return jobProperties ; }
Source:
public void qosBaloonNotSupported ( ) { org.mockito.Mockito.when ( cluster.getCompatibilityVersion ( ) ) . thenReturn ( org.mockito.Mockito.mock ( org.ovirt.engine.core.compat.Version.class ) ) ; org.mockito.Mockito.when ( cluster.isEnableBallooning ( ) ) . thenReturn ( true ) ; validator = new org.ovirt.engine.core.bll.validator.ClusterValidator ( dbFacade , cluster ) ; org.junit.Assert.assertThat ( validator.qosBaloonSupported ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( VdcBllMessages.QOS_BALLOON_NOT_SUPPORTED ) ) ; }

Target:
public void qosBaloonNotSupported ( ) { org.mockito.Mockito.when ( cluster.getCompatibilityVersion ( ) ) . thenReturn ( org.mockito.Mockito.mock ( org.ovirt.engine.core.compat.Version.class ) ) ; org.mockito.Mockito.when ( cluster.isEnableBallooning ( ) ) . thenReturn ( true ) ; validator = new org.ovirt.engine.core.bll.validator.ClusterValidator ( dbFacade , cluster ) ; org.junit.Assert.assertThat ( validator.qosBaloonSupported ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.QOS_BALLOON_NOT_SUPPORTED ) ) ; }
Source:
public void networkDidntChange ( ) { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic = createNic ( "nic0" , "net" ) ; mockExistingIfaces ( nic ) ; org.ovirt.engine.core.bll.network.host.SetupNetworksHelper helper = createHelper ( createParametersForNics ( nic ) ) ; validateAndAssertNoChanges ( helper ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { final org.ovirt.engine.core.vdsbroker.EffectiveHostNetworkQos effectiveHostNetworkQos = new org.ovirt.engine.core.vdsbroker.EffectiveHostNetworkQos ( qosDao ) ; injectorRule.bind ( org.ovirt.engine.core.dao.network.NetworkDao.class , networkDao ) ; injectorRule.bind ( org.ovirt.engine.core.dao.network.NetworkAttachmentDao.class , networkAttachmentDao ) ; injectorRule.bind ( org.ovirt.engine.core.dao.network.InterfaceDao.class , interfaceDao ) ; injectorRule.bind ( org.ovirt.engine.core.dao.gluster.GlusterBrickDao.class , brickDao ) ; injectorRule.bind ( org.ovirt.engine.core.vdsbroker.EffectiveHostNetworkQos.class , effectiveHostNetworkQos ) ; injectorRule.bind ( org.ovirt.engine.core.vdsbroker.NetworkImplementationDetailsUtils.class , new org.ovirt.engine.core.vdsbroker.NetworkImplementationDetailsUtils ( effectiveHostNetworkQos , networkAttachmentDao , calculateBaseNic ) ) ; injectorRule.bind ( org.ovirt.engine.core.vdsbroker.CalculateBaseNic.class , calculateBaseNic ) ; }
Source:
public static final org.ovirt.engine.ui.common.widget.table.column.DiskSizeColumn < org.ovirt.engine.core.common.businessentities.Disk > getSnapshotSizeColumn ( java.lang.String sortBy ) { org.ovirt.engine.ui.common.widget.table.column.DiskSizeColumn < org.ovirt.engine.core.common.businessentities.Disk > column = new org.ovirt.engine.ui.common.widget.table.column.DiskSizeColumn < org.ovirt.engine.core.common.businessentities.Disk > ( ) { @ java.lang.Override protected java.lang.Long getRawValue ( org.ovirt.engine.core.common.businessentities.Disk object ) { return ( ( org.ovirt.engine.core.common.businessentities.DiskImage ) ( object ) ) . getActualSizeInBytes ( ) ; } } ; return org.ovirt.engine.ui.common.widget.uicommon.disks.DisksViewColumns.makeSortable ( column , sortBy ) ; }

Target:
public static final org.ovirt.engine.ui.common.widget.table.column.AbstractDiskSizeColumn < org.ovirt.engine.core.common.businessentities.Disk > getSnapshotSizeColumn ( java.lang.String sortBy ) { org.ovirt.engine.ui.common.widget.table.column.AbstractDiskSizeColumn < org.ovirt.engine.core.common.businessentities.Disk > column = new org.ovirt.engine.ui.common.widget.table.column.AbstractDiskSizeColumn < org.ovirt.engine.core.common.businessentities.Disk > ( ) { @ java.lang.Override protected java.lang.Long getRawValue ( org.ovirt.engine.core.common.businessentities.Disk object ) { return ( ( org.ovirt.engine.core.common.businessentities.DiskImage ) ( object ) ) . getActualSizeInBytes ( ) ; } } ; return org.ovirt.engine.ui.common.widget.uicommon.disks.DisksViewColumns.makeSortable ( column , sortBy ) ; }
Source:
protected void init ( org.ovirt.engine.ui.uicommonweb.models.hosts.VfsNicLabelModel model ) { super . init ( model ) ; for ( org.ovirt.engine.ui.uicommonweb.models.ListModel < java.lang.String > labelModel : model.getItems ( ) ) { labelModel.getSelectedItemChangedEvent ( ) . addListener ( new org.ovirt.engine.ui.uicompat.IEventListener < org.ovirt.engine.ui.uicompat.EventArgs > ( ) { @ java.lang.Override 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 ) { com.google.gwt.event.logical.shared.ValueChangeEvent.fire ( org.ovirt.engine.ui.webadmin.section.main.view.popup.host.VfsNicLabelWidget.this , null ) ; } } ) ; } }

Target:
protected void init ( final org.ovirt.engine.ui.uicommonweb.models.hosts.VfsNicLabelModel model ) { super . init ( model ) ; getModel ( ) . updateSuggestedLabels ( ) ; for ( org.ovirt.engine.ui.uicommonweb.models.ListModel < java.lang.String > labelModel : model.getItems ( ) ) { labelModel.getSelectedItemChangedEvent ( ) . addListener ( new org.ovirt.engine.ui.uicompat.IEventListener < org.ovirt.engine.ui.uicompat.EventArgs > ( ) { @ java.lang.Override 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 ) { selectedLabelsChanged ( ) ; } } ) ; } }
Source:
public void getUnusedBricksFromServer ( org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery , org.ovirt.engine.core.compat.Guid hostId ) { asyncQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.core.common.queries.VdsIdParametersBase parameters = new org.ovirt.engine.core.common.queries.VdsIdParametersBase ( hostId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetUnusedGlusterBricks , parameters , asyncQuery ) ; }

Target:
public void getStorageDevices ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hostId ) { 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.GetGlusterStorageDevices , new org.ovirt.engine.core.common.queries.VdsIdParametersBase ( hostId ) , aQuery ) ; }
Source:
public static void GetRpmVersionViaPublic ( 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.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunPublicQuery ( VdcQueryType.GetConfigurationValue , new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.ProductRPMVersion , org.ovirt.engine.core.common.config.Config.DefaultConfigurationVersion ) , aQuery ) ; }

Target:
public static void GetSANWipeAfterDelete ( 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.Boolean ) ( source ) ) . booleanValue ( ) : false ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.SANWipeAfterDelete , org.ovirt.engine.core.common.config.Config.DefaultConfigurationVersion ) , aQuery ) ; }
Source:
private static boolean isRunOnce ( org.ovirt.engine.core.compat.Guid vmId ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > cdList = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmDeviceDao ( ) . getVmDeviceByVmIdTypeAndDevice ( vmId , VmDeviceGeneralType.DISK , VmDeviceType.CDROM.getName ( ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > floppyList = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmDeviceDao ( ) . getVmDeviceByVmIdTypeAndDevice ( vmId , VmDeviceGeneralType.DISK , VmDeviceType.FLOPPY.getName ( ) ) ; return ( ( cdList.size ( ) ) > 1 ) || ( ( floppyList.size ( ) ) > 1 ) ; }

Target:
private static boolean isRunOnce ( org.ovirt.engine.core.compat.Guid vmId ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > cdList = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmDeviceDao ( ) . getVmDeviceByVmIdTypeAndDevice ( vmId , VmDeviceType.DISK.getName ( ) , VmDeviceType.CDROM.getName ( ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > floppyList = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmDeviceDao ( ) . getVmDeviceByVmIdTypeAndDevice ( vmId , VmDeviceType.DISK.getName ( ) , VmDeviceType.FLOPPY.getName ( ) ) ; return ( ( cdList.size ( ) ) > 1 ) || ( ( floppyList.size ( ) ) > 1 ) ; }
Source:
protected boolean checkOperationIsCorrect ( ) { if ( ( ( ( org.ovirt.engine.core.bll.MoveOrCopyDiskCommand.getParameters ( ) . getOperation ( ) ) == ( org.ovirt.engine.core.common.businessentities.storage.ImageOperation.Move ) ) && ( ( org.ovirt.engine.core.bll.MoveOrCopyDiskCommand.getImage ( ) . getVmEntityType ( ) ) != null ) ) && ( org.ovirt.engine.core.bll.MoveOrCopyDiskCommand.getImage ( ) . getVmEntityType ( ) . isTemplateType ( ) ) ) { return failCanDoAction ( VdcBllMessages.ACTION_TYPE_FAILED_DISK_IS_NOT_VM_DISK ) ; } return true ; }

Target:
protected boolean checkOperationIsCorrect ( ) { if ( ( ( ( org.ovirt.engine.core.bll.MoveOrCopyDiskCommand.getParameters ( ) . getOperation ( ) ) == ( org.ovirt.engine.core.common.businessentities.storage.ImageOperation.Move ) ) && ( ( org.ovirt.engine.core.bll.MoveOrCopyDiskCommand.getImage ( ) . getVmEntityType ( ) ) != null ) ) && ( org.ovirt.engine.core.bll.MoveOrCopyDiskCommand.getImage ( ) . getVmEntityType ( ) . isTemplateType ( ) ) ) { return failCanDoAction ( EngineMessage.ACTION_TYPE_FAILED_DISK_IS_NOT_VM_DISK ) ; } return true ; }
Source:
public void onBrowserEvent ( org.ovirt.engine.ui.common.widget.table.cell.Context context , com.google.gwt.dom.client.Element parent , C value , com.google.gwt.safehtml.shared.SafeHtml tooltipContent , com.google.gwt.dom.client.NativeEvent event , com.google.gwt.cell.client.ValueUpdater < C > valueUpdater ) { if ( tooltipContent == null ) { tooltipContent = getTooltip ( value ) ; } org.ovirt.engine.ui.common.widget.tooltip.TooltipMixin.handleTooltipEvent ( parent , tooltipContent , event ) ; super . onBrowserEvent ( context , parent , value , event , valueUpdater ) ; }

Target:
public void onBrowserEvent ( org.ovirt.engine.ui.common.widget.table.cell.Context context , com.google.gwt.dom.client.Element parent , C value , com.google.gwt.dom.client.NativeEvent event , com.google.gwt.cell.client.ValueUpdater < C > valueUpdater ) { com.google.gwt.safehtml.shared.SafeHtml tooltip = getTooltip ( value ) ; if ( tooltip == null ) { tooltip = getTooltip ( value , parent ) ; } org.ovirt.engine.ui.common.utils.ElementTooltipUtils.handleCellEvent ( event , parent , tooltip ) ; super . onBrowserEvent ( context , parent , value , event , valueUpdater ) ; }
Source:
public void testRemoveNonExistant ( ) throws java.lang.Exception { setUpEntityQueryExpectations ( QueryType.GetVnicProfileById , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , null ) ; try { resource.remove ( ) ; org.ovirt.engine.api.restapi.resource.AbstractBackendVnicProfileResourceTest.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { assertNotNull ( wae.getResponse ( ) ) ; assertEquals ( 404 , wae.getResponse ( ) . getStatus ( ) ) ; } }

Target:
public void testRemoveNonExistant ( ) throws java.lang.Exception { setUpEntityQueryExpectations ( QueryType.GetVnicProfileById , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , null ) ; try { resource.remove ( ) ; org.ovirt.engine.api.restapi.resource.AbstractBackendVnicProfileResourceTest.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { org.junit.Assert.assertNotNull ( wae.getResponse ( ) ) ; org.junit.Assert.assertEquals ( 404 , wae.getResponse ( ) . getStatus ( ) ) ; } }
Source:
public java.util.List < org.ovirt.engine.core.bll.quota.QuotaConsumptionParameter > getQuotaStorageConsumptionParameters ( ) { java.util.List < org.ovirt.engine.core.bll.quota.QuotaConsumptionParameter > list = new java.util.ArrayList < org.ovirt.engine.core.bll.quota.QuotaConsumptionParameter > ( ) ; if ( java.lang.Boolean.TRUE.equals ( org.ovirt.engine.core.bll.RunVmOnceCommand.getParameters ( ) . getRunAsStateless ( ) ) ) { for ( org.ovirt.engine.core.common.businessentities.DiskImage image : org.ovirt.engine.core.bll.RunVmOnceCommand.getVm ( ) . getDiskList ( ) ) { list.add ( new org.ovirt.engine.core.bll.quota.QuotaStorageConsumptionParameter ( image.getQuotaId ( ) , null , QuotaConsumptionParameter.QuotaAction.CONSUME , image.getstorage_ids ( ) . get ( 0 ) , image.getActualSize ( ) ) ) ; } } return list ; }

Target:
public java.util.List < org.ovirt.engine.core.bll.quota.QuotaConsumptionParameter > getQuotaStorageConsumptionParameters ( ) { java.util.List < org.ovirt.engine.core.bll.quota.QuotaConsumptionParameter > list = new java.util.ArrayList < org.ovirt.engine.core.bll.quota.QuotaConsumptionParameter > ( ) ; if ( java.lang.Boolean.TRUE.equals ( org.ovirt.engine.core.bll.RunVmOnceCommand.getParameters ( ) . getRunAsStateless ( ) ) ) { for ( org.ovirt.engine.core.common.businessentities.DiskImage image : org.ovirt.engine.core.bll.RunVmOnceCommand.getVm ( ) . getDiskList ( ) ) { list.add ( new org.ovirt.engine.core.bll.quota.QuotaStorageConsumptionParameter ( image.getQuotaId ( ) , null , QuotaConsumptionParameter.QuotaAction.CONSUME , image.getStorageIds ( ) . get ( 0 ) , image.getActualSize ( ) ) ) ; } } return list ; }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs pcArgs = ( ( org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ) ( args ) ) ; if ( "Progress" . equals ( pcArgs.PropertyName ) ) { externalDiskPanel.clear ( ) ; if ( ( sanStorageModel.getProgress ( ) ) != null ) { externalDiskPanel.add ( progressContent ) ; } else { externalDiskPanel.add ( storageView ) ; } } }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs pcArgs = ( ( org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ) ( args ) ) ; if ( "Progress" . equals ( pcArgs.propertyName ) ) { externalDiskPanel.clear ( ) ; if ( ( sanStorageModel.getProgress ( ) ) != null ) { externalDiskPanel.add ( progressContent ) ; } else { externalDiskPanel.add ( storageView ) ; } } }
Source:
protected void onLogin ( final org.ovirt.engine.ui.uicommonweb.models.LoginModel loginModel ) { org.ovirt.engine.ui.uicommonweb.ReportInit.getInstance ( ) . init ( ) ; org.ovirt.engine.ui.uicommonweb.ReportInit.getInstance ( ) . getReportsInitEvent ( ) . addListener ( new org.ovirt.engine.ui.uicompat.IEventListener < org.ovirt.engine.ui.uicompat.EventArgs > ( ) { @ java.lang.Override 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 ) { updateReportsAvailability ( ) ; } } ) ; performLogin ( loginModel ) ; }

Target:
protected void onLogin ( final org.ovirt.engine.ui.uicommonweb.models.LoginModel loginModel ) { org.ovirt.engine.ui.uicommonweb.ReportInit.getInstance ( ) . init ( ) ; org.ovirt.engine.ui.uicommonweb.ReportInit.getInstance ( ) . getReportsInitEvent ( ) . addListener ( new org.ovirt.engine.ui.uicompat.IEventListener < org.ovirt.engine.ui.uicompat.EventArgs > ( ) { @ java.lang.Override 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 ) { updateReportsAvailability ( ) ; } } ) ; performLogin ( loginModel ) ; restApiSessionManager.recordLoggedInTime ( ) ; }
Source:
public boolean shouldUpdateVmStatus ( org.ovirt.engine.core.common.businessentities.VmDynamic vmDynamic ) { org.ovirt.engine.core.compat.Guid id = vmDynamic.getId ( ) ; if ( ! ( vmStatusUpdated.containsKey ( id ) ) ) { vmStatusUpdated.put ( id , vmDynamic.getStatusUpdatedTime ( ) ) ; return true ; } java.lang.Double knownStatusUpdate = vmStatusUpdated.get ( id ) ; java.lang.Double statusUpdateTime = vmDynamic.getStatusUpdatedTime ( ) ; if ( knownStatusUpdate <= statusUpdateTime ) { vmStatusUpdated.replace ( id , statusUpdateTime ) ; return true ; } return false ; }

Target:
public boolean shouldUpdateVmStatus ( org.ovirt.engine.core.vdsbroker.vdsbroker.entities.VmInternalData vmInternalData ) { org.ovirt.engine.core.compat.Guid id = vmInternalData.getVmDynamic ( ) . getId ( ) ; if ( ! ( vmStatusUpdated.containsKey ( id ) ) ) { vmStatusUpdated.put ( id , vmInternalData.getTimestamp ( ) ) ; return true ; } java.lang.Double knownStatusUpdate = vmStatusUpdated.get ( id ) ; java.lang.Double statusUpdateTime = vmInternalData.getTimestamp ( ) ; if ( knownStatusUpdate <= statusUpdateTime ) { vmStatusUpdated.replace ( id , statusUpdateTime ) ; return true ; } return false ; }
Source:
public void testListCrash ( ) throws java.lang.Exception { }

Target:
public void testListCrashClientLocale ( ) throws java.lang.Exception { javax.ws.rs.core.UriInfo uriInfo = setUpUriExpectations ( null ) ; locales.add ( org.ovirt.engine.api.restapi.resource.CLIENT_LOCALE ) ; java.lang.Throwable t = new java.lang.RuntimeException ( FAILURE ) ; setUpQueryExpectations ( org.ovirt.engine.api.restapi.resource.BackendGroupsResourceTest.QUERY , t ) ; collection.setUriInfo ( uriInfo ) ; try { getCollection ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , org.ovirt.engine.api.restapi.resource.BACKEND_FAILED_CLIENT_LOCALE , t ) ; } finally { locales.clear ( ) ; } }
Source:
private void queryFreeBonds ( ) { org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery = new org.ovirt.engine.ui.frontend.AsyncQuery ( ) ; asyncQuery.setModel ( this ) ; asyncQuery.asyncCallback = new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { allBonds = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ; initNetworkModels ( ) ; initNicModels ( ) ; stopProgress ( ) ; } } ; org.ovirt.engine.core.common.businessentities.VDS vds = getEntity ( ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVdsFreeBondsByVdsId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vds.getId ( ) ) , asyncQuery ) ; }

Target:
private void queryFreeBonds ( ) { org.ovirt.engine.core.common.businessentities.VDS vds = getEntity ( ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVdsFreeBondsByVdsId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vds.getId ( ) ) , new org.ovirt.engine.ui.uicommonweb.models.hosts.AsyncQuery ( new org.ovirt.engine.ui.frontend.AsyncCallback < org.ovirt.engine.core.common.queries.VdcQueryReturnValue > ( ) { @ java.lang.Override public void onSuccess ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue returnValue ) { allBonds = returnValue.getReturnValue ( ) ; initNetworkModels ( ) ; initNicModels ( ) ; stopProgress ( ) ; } } ) ) ; }
Source:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.storage.SanStorageModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.storage.SanStorageModel ) ( target ) ) ; org.ovirt.engine.core.common.queries.VdcQueryReturnValue response = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) ; if ( response.getSucceeded ( ) ) { model.applyData ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.LUNs > ) ( response.getReturnValue ( ) ) ) , false ) ; model.setGetLUNsFailure ( "" ) ; } else { model.setGetLUNsFailure ( org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getConstants ( ) . couldNotRetrieveLUNsLunsFailure ( ) ) ; } }

Target:
public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.core.common.queries.VdcQueryReturnValue response = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) ; if ( response.getSucceeded ( ) ) { model.applyData ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.LUNs > ) ( response.getReturnValue ( ) ) ) , false , prevSelected ) ; model.setGetLUNsFailure ( "" ) ; } else { model.setGetLUNsFailure ( org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getConstants ( ) . couldNotRetrieveLUNsLunsFailure ( ) ) ; } }
Source:
public java.lang.Object runInTransaction ( ) { HandleVdsInformation ( ) ; vm.setRunOnVds ( getVdsId ( ) ) ; if ( getParameters ( ) . isClearHibernationVolumes ( ) ) { vm.setHibernationVolHandle ( StringUtils.EMPTY ) ; } org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmDynamicDao ( ) . update ( vm.getDynamicData ( ) ) ; return null ; }

Target:
public java.lang.Object runInTransaction ( ) { handleVdsInformation ( ) ; vm.setRunOnVds ( getVdsId ( ) ) ; if ( getParameters ( ) . isClearHibernationVolumes ( ) ) { vm.setHibernationVolHandle ( StringUtils.EMPTY ) ; } org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmDynamicDao ( ) . update ( vm.getDynamicData ( ) ) ; return null ; }
Source:
public void getAllAttachableDisks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , 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 != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetAllAttachableDisks params = new org.ovirt.engine.core.common.queries.GetAllAttachableDisks ( storagePoolId ) ; params.setVmId ( vmId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllAttachableDisks , params , aQuery ) ; }

Target:
public void getVmList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String poolName ) { 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: pool=" + poolName ) , org.ovirt.engine.core.common.interfaces.SearchType.VM ) , aQuery ) ; }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { if ( "IsAvailable" . equals ( ( ( org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ) ( args ) ) . PropertyName ) ) { getView ( ) . toggleProfilesVisibility ( model.getProfiles ( ) . getIsAvailable ( ) ) ; } }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { getView ( ) . toggleSubnetVisibility ( ( ( java.lang.Boolean ) ( model.getExport ( ) . getEntity ( ) ) ) ) ; }
Source:
protected void executeCommand ( ) { completeGenerationInfo ( ) ; org.ovirt.engine.core.bll.storage.utils.VdsCommandsHelper.runVdsCommandWithFailover ( VDSCommandType.ColdMerge , new org.ovirt.engine.core.common.vdscommands.ColdMergeVDSCommandParameters ( org.ovirt.engine.core.bll.storage.disk.image.ColdMergeCommand.getParameters ( ) . getStorageJobId ( ) , org.ovirt.engine.core.bll.storage.disk.image.ColdMergeCommand.getParameters ( ) . getSubchainInfo ( ) ) , org.ovirt.engine.core.bll.storage.disk.image.ColdMergeCommand.getParameters ( ) . getStoragePoolId ( ) , this ) ; org.ovirt.engine.core.bll.storage.disk.image.ColdMergeCommand.setSucceeded ( true ) ; }

Target:
protected void executeCommand ( ) { completeGenerationInfo ( ) ; vdsCommandsHelper.runVdsCommandWithFailover ( VDSCommandType.ColdMerge , new org.ovirt.engine.core.common.vdscommands.ColdMergeVDSCommandParameters ( org.ovirt.engine.core.bll.storage.disk.image.ColdMergeCommand.getParameters ( ) . getStorageJobId ( ) , org.ovirt.engine.core.bll.storage.disk.image.ColdMergeCommand.getParameters ( ) . getSubchainInfo ( ) ) , org.ovirt.engine.core.bll.storage.disk.image.ColdMergeCommand.getParameters ( ) . getStoragePoolId ( ) , this ) ; org.ovirt.engine.core.bll.storage.disk.image.ColdMergeCommand.setSucceeded ( true ) ; }
Source:
private boolean isTemplateInDestStorageDomain ( org.ovirt.engine.core.compat.Guid imageId , org.ovirt.engine.core.compat.Guid sourceDomainId ) { org.ovirt.engine.core.compat.Guid templateId = getDiskImageByImageId ( imageId ) . getImageTemplateId ( ) ; if ( ! ( Guid.Empty.equals ( templateId ) ) ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage templateImage = org.ovirt.engine.core.bll.storage.lsm.LiveMigrateVmDisksCommand.getDiskImageDao ( ) . get ( templateId ) ; if ( ! ( templateImage.getStorageIds ( ) . contains ( sourceDomainId ) ) ) { return failValidation ( EngineMessage.ACTION_TYPE_FAILED_TEMPLATE_NOT_FOUND_ON_DESTINATION_DOMAIN ) ; } } return true ; }

Target:
private boolean isTemplateInDestStorageDomain ( org.ovirt.engine.core.compat.Guid imageId , org.ovirt.engine.core.compat.Guid sourceDomainId ) { org.ovirt.engine.core.compat.Guid templateId = getDiskImageByImageId ( imageId ) . getImageTemplateId ( ) ; if ( ! ( Guid.Empty.equals ( templateId ) ) ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage templateImage = diskImageDao.get ( templateId ) ; if ( ! ( templateImage.getStorageIds ( ) . contains ( sourceDomainId ) ) ) { return failValidation ( EngineMessage.ACTION_TYPE_FAILED_TEMPLATE_NOT_FOUND_ON_DESTINATION_DOMAIN ) ; } } return true ; }
Source:
private void processHeartbeat ( ) { if ( ( ( ! ( this . isInInit ( ) ) ) && ( this . policy.isHeartbeat ( ) ) ) && ( ( ( this . lastHeartbeat ) + ( this . policy.getHeartbeat ( ) ) ) < ( java.lang.System.currentTimeMillis ( ) ) ) ) { org.ovirt.vdsm.jsonrpc.client.reactors.ReactorClient.log.debug ( "Heartbeat exeeded. Closing channel" ) ; this . closeChannel ( ) ; } }

Target:
private void processHeartbeat ( ) { if ( ( ( ! ( this . isInInit ( ) ) ) && ( this . policy.isHeartbeat ( ) ) ) && ( ( ( this . lastHeartbeat ) + ( this . policy.getHeartbeat ( ) ) ) < ( java.lang.System.currentTimeMillis ( ) ) ) ) { org.ovirt.vdsm.jsonrpc.client.reactors.ReactorClient.log.debug ( "Heartbeat exeeded. Closing channel" ) ; this . disconnect ( ) ; } }
Source:
protected java.util.List < org.ovirt.engine.core.common.businessentities.VM > getVmsFromExportDomain ( ) { org.ovirt.engine.core.common.queries.GetAllFromExportDomainQueryParameters p = new org.ovirt.engine.core.common.queries.GetAllFromExportDomainQueryParameters ( getParameters ( ) . getStoragePoolId ( ) , getParameters ( ) . getSourceDomainId ( ) ) ; org.ovirt.engine.core.common.queries.VdcQueryReturnValue qRetVal = org.ovirt.engine.core.bll.ImportVmCommand.getBackend ( ) . runInternalQuery ( VdcQueryType.GetVmsFromExportDomain , p ) ; return qRetVal.getSucceeded ( ) ? qRetVal.< java.util.List < org.ovirt.engine.core.common.businessentities.VM > > getReturnValue ( ) : null ; }

Target:
protected java.util.List < org.ovirt.engine.core.common.businessentities.VM > getVmsFromExportDomain ( ) { org.ovirt.engine.core.common.queries.GetAllFromExportDomainQueryParameters p = new org.ovirt.engine.core.common.queries.GetAllFromExportDomainQueryParameters ( getParameters ( ) . getStoragePoolId ( ) , getParameters ( ) . getSourceDomainId ( ) ) ; org.ovirt.engine.core.common.queries.VdcQueryReturnValue qRetVal = org.ovirt.engine.core.bll.Backend.getInstance ( ) . runInternalQuery ( VdcQueryType.GetVmsFromExportDomain , p ) ; return qRetVal.getSucceeded ( ) ? qRetVal.< java.util.List < org.ovirt.engine.core.common.businessentities.VM > > getReturnValue ( ) : null ; }
Source:
public void canDoActionDiskIsLocked ( ) throws java.lang.Exception { initializeCommand ( ImageOperation.Move ) ; initVmDiskImage ( ) ; initVm ( ) ; command.getImage ( ) . setImageStatus ( ImageStatus.LOCKED ) ; org.mockito.Mockito.doReturn ( vmDeviceDao ) . when ( command ) . getVmDeviceDAO ( ) ; org.junit.Assert.assertFalse ( command.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( VdcBllMessages.ACTION_TYPE_FAILED_DISKS_LOCKED.toString ( ) ) ) ; }

Target:
public void canDoActionDiskIsLocked ( ) throws java.lang.Exception { initializeCommand ( ImageOperation.Move ) ; initVmDiskImage ( ) ; initVmForFail ( ) ; command.getImage ( ) . setImageStatus ( ImageStatus.LOCKED ) ; org.mockito.Mockito.doReturn ( vmDeviceDao ) . when ( command ) . getVmDeviceDAO ( ) ; org.junit.Assert.assertFalse ( command.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( VdcBllMessages.ACTION_TYPE_FAILED_DISKS_LOCKED.toString ( ) ) ) ; }
Source:
private java.lang.String readEventLogValue ( org.ovirt.engine.core.compat.backendcompat.XmlNode content , java.lang.String name ) { java.lang.StringBuilder fullNameSB = new java.lang.StringBuilder ( org.ovirt.engine.core.utils.ovf.OvfVmReader.EXPORT_ONLY_PREFIX ) ; fullNameSB.append ( name ) ; org.ovirt.engine.core.compat.backendcompat.XmlNode node = content.SelectSingleNode ( fullNameSB.toString ( ) ) ; if ( node != null ) { return node.InnerText ; } return null ; }

Target:
private java.lang.String readEventLogValue ( org.ovirt.engine.core.compat.backendcompat.XmlNode content , java.lang.String name ) { java.lang.StringBuilder fullNameSB = new java.lang.StringBuilder ( org.ovirt.engine.core.utils.ovf.OvfVmReader.EXPORT_ONLY_PREFIX ) ; fullNameSB.append ( name ) ; org.ovirt.engine.core.compat.backendcompat.XmlNode node = content.SelectSingleNode ( fullNameSB.toString ( ) ) ; if ( node != null ) { return node.innerText ; } return null ; }
Source:
public boolean equals ( java.lang.Object obj ) { if ( ( obj == null ) || ( ! ( obj instanceof org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSessionConfiguration ) ) ) { return false ; } if ( ! ( super . equals ( obj ) ) ) { return false ; } return java.util.Objects.equals ( getId ( ) , ( ( org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSessionConfiguration ) ( obj ) ) . getId ( ) ) ; }

Target:
public boolean equals ( java.lang.Object obj ) { if ( ( this ) == obj ) { return true ; } if ( ! ( obj instanceof org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSessionConfiguration ) ) { return false ; } org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSessionConfiguration other = ( ( org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSessionConfiguration ) ( obj ) ) ; return ( super . equals ( obj ) ) && ( java.util.Objects.equals ( sessionId , other.sessionId ) ) ; }
Source:
private void vlanIdAvailableTest ( org.hamcrest.Matcher < org.ovirt.engine.core.bll.ValidationResult > matcher , java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > networks ) { this . networks.addAll ( networks ) ; org.mockito.Mockito.when ( network.getVlanId ( ) ) . thenReturn ( DEFAULT_VLAN_ID ) ; org.mockito.Mockito.when ( network.getId ( ) ) . thenReturn ( DEFAULT_GUID ) ; org.junit.Assert.assertThat ( validator.vlanIdNotUsed ( ) , matcher ) ; }

Target:
private void vlanIdAvailableTest ( org.hamcrest.Matcher < org.ovirt.engine.core.bll.ValidationResult > matcher , java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > networks ) { this . networks.addAll ( networks ) ; org.mockito.Mockito.when ( network.getVlanId ( ) ) . thenReturn ( org.ovirt.engine.core.bll.validator.NetworkValidatorTest.DEFAULT_VLAN_ID ) ; org.mockito.Mockito.when ( network.getId ( ) ) . thenReturn ( org.ovirt.engine.core.bll.validator.NetworkValidatorTest.DEFAULT_GUID ) ; org.junit.Assert.assertThat ( validator.vlanIdNotUsed ( ) , matcher ) ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult profileNameNotUsed ( ) { for ( T profile : getProfilesByParentEntity ( ) ) { if ( ( profile.getName ( ) . equals ( getProfile ( ) . getName ( ) ) ) && ( ! ( profile.getId ( ) . equals ( getProfile ( ) . getId ( ) ) ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.ACTION_TYPE_FAILED_PROFILE_NAME_IN_USE ) ; } } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult profileNameNotUsed ( ) { for ( T profile : getProfilesByParentEntity ( ) ) { if ( ( profile.getName ( ) . equals ( getProfile ( ) . getName ( ) ) ) && ( ! ( profile.getId ( ) . equals ( getProfile ( ) . getId ( ) ) ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_PROFILE_NAME_IN_USE ) ; } } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }
Source:
private void retrieveDefaultSpmPriority ( ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getDefaultSpmPriority ( new org.ovirt.engine.ui.frontend.AsyncQuery ( this , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { spmDefaultPriorityValue = ( ( java.lang.Integer ) ( returnValue ) ) ; updateSpmPriorityValues ( ) ; updateSpmPriority ( ) ; } } ) ) ; }

Target:
private void retrieveDefaultSpmPriority ( ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getDefaultSpmPriority ( new org.ovirt.engine.ui.uicommonweb.models.hosts.AsyncQuery ( new org.ovirt.engine.ui.frontend.AsyncCallback < java.lang.Integer > ( ) { @ java.lang.Override public void onSuccess ( java.lang.Integer returnValue ) { spmDefaultPriorityValue = returnValue ; updateSpmPriorityValues ( ) ; updateSpmPriority ( ) ; } } ) ) ; }
Source:
public void noDiskProfileAssociatedToStorageDomainFailureTest ( ) { map.put ( diskImage , org.ovirt.engine.core.bll.profiles.DiskProfileHelperTest.STORAGE_DOMAIN_2 ) ; diskProfileHelper.setAndValidateDiskProfiles ( map , dbUser ) ; map.clear ( ) ; map.put ( diskImage , org.ovirt.engine.core.bll.profiles.DiskProfileHelperTest.STORAGE_DOMAIN_1 ) ; org.junit.Assert.assertThat ( diskProfileHelper.setAndValidateDiskProfiles ( map , dbUser ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.ACTION_TYPE_DISK_PROFILE_NOT_FOUND_FOR_STORAGE_DOMAIN ) ) ; }

Target:
public void noDiskProfileAssociatedToStorageDomainFailureTest ( ) { map.put ( diskImage , org.ovirt.engine.core.bll.profiles.DiskProfileHelperTest.STORAGE_DOMAIN_2 ) ; diskProfileHelper.setAndValidateDiskProfiles ( map , dbUser ) ; map.clear ( ) ; map.put ( diskImage , org.ovirt.engine.core.bll.profiles.DiskProfileHelperTest.STORAGE_DOMAIN_1 ) ; org.hamcrest.MatcherAssert.assertThat ( diskProfileHelper.setAndValidateDiskProfiles ( map , dbUser ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.ACTION_TYPE_DISK_PROFILE_NOT_FOUND_FOR_STORAGE_DOMAIN ) ) ; }
Source:
protected boolean hostToRunExist ( ) { if ( ( org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . getVmStaticData ( ) . getdedicated_vm_for_vds ( ) ) != null ) { if ( ( org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVdsDao ( ) . get ( org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . getVmStaticData ( ) . getdedicated_vm_for_vds ( ) ) ) == null ) { addCanDoActionMessage ( VdcBllMessages.ACTION_TYPE_FAILED_HOST_NOT_EXIST ) ; return false ; } } return true ; }

Target:
protected boolean hostToRunExist ( ) { if ( ( org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . getVmStaticData ( ) . getDedicatedVmForVds ( ) ) != null ) { if ( ( org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVdsDao ( ) . get ( org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . getVmStaticData ( ) . getDedicatedVmForVds ( ) ) ) == null ) { addCanDoActionMessage ( VdcBllMessages.ACTION_TYPE_FAILED_HOST_NOT_EXIST ) ; return false ; } } return true ; }
Source:
protected void determineMigrationFailureForAuditLog ( ) { if ( ( ( org.ovirt.engine.core.bll.MigrateVmCommand.getVm ( ) ) != null ) && ( ( org.ovirt.engine.core.bll.MigrateVmCommand.getVm ( ) . getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.Up ) ) ) { try { runVdsCommand ( VDSCommandType.MigrateStatus , new org.ovirt.engine.core.common.vdscommands.MigrateStatusVDSCommandParameters ( org.ovirt.engine.core.bll.MigrateVmCommand.getVdsId ( ) , org.ovirt.engine.core.bll.MigrateVmCommand.getVmId ( ) ) ) ; } catch ( org.ovirt.engine.core.common.errors.VdcBLLException e ) { migrationErrorCode = e.getErrorCode ( ) ; } } }

Target:
protected void determineMigrationFailureForAuditLog ( ) { if ( ( ( org.ovirt.engine.core.bll.MigrateVmCommand.getVm ( ) ) != null ) && ( ( org.ovirt.engine.core.bll.MigrateVmCommand.getVm ( ) . getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.Up ) ) ) { try { runVdsCommand ( VDSCommandType.MigrateStatus , new org.ovirt.engine.core.common.vdscommands.MigrateStatusVDSCommandParameters ( org.ovirt.engine.core.bll.MigrateVmCommand.getVdsId ( ) , org.ovirt.engine.core.bll.MigrateVmCommand.getVmId ( ) ) ) ; } catch ( org.ovirt.engine.core.common.errors.EngineException e ) { migrationErrorCode = e.getErrorCode ( ) ; } } }
Source:
protected void executeQueryCommand ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VDS > hosts = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVdsDao ( ) . getAllForVdsGroup ( org.ovirt.engine.core.bll.IsDisplayAddressConsistentInClusterQuery.getParameters ( ) . getId ( ) , org.ovirt.engine.core.bll.IsDisplayAddressConsistentInClusterQuery.getUserID ( ) , org.ovirt.engine.core.bll.IsDisplayAddressConsistentInClusterQuery.getParameters ( ) . isFiltered ( ) ) ; org.ovirt.engine.core.bll.IsDisplayAddressConsistentInClusterQuery.getQueryReturnValue ( ) . setReturnValue ( ( ! ( isDisplayAddressPartiallyOverridden ( hosts ) ) ) ) ; }

Target:
protected void executeQueryCommand ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VDS > hosts = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVdsDao ( ) . getAllForCluster ( org.ovirt.engine.core.bll.IsDisplayAddressConsistentInClusterQuery.getParameters ( ) . getId ( ) , org.ovirt.engine.core.bll.IsDisplayAddressConsistentInClusterQuery.getUserID ( ) , org.ovirt.engine.core.bll.IsDisplayAddressConsistentInClusterQuery.getParameters ( ) . isFiltered ( ) ) ; org.ovirt.engine.core.bll.IsDisplayAddressConsistentInClusterQuery.getQueryReturnValue ( ) . setReturnValue ( ( ! ( isDisplayAddressPartiallyOverridden ( hosts ) ) ) ) ; }
Source:
public static org.ovirt.engine.core.common.businessentities.network.VmInterfaceType getDefaultNicType ( ) { return org.ovirt.engine.core.common.businessentities.network.VmInterfaceType.pv ; }

Target:
public org.ovirt.engine.core.common.businessentities.network.VmInterfaceType getDefaultNicType ( java.util.Collection < org.ovirt.engine.core.common.businessentities.network.VmInterfaceType > items ) { if ( ( items == null ) || ( items.isEmpty ( ) ) ) { return null ; } else if ( items.contains ( VmInterfaceType.pv ) ) { return org.ovirt.engine.core.common.businessentities.network.VmInterfaceType.pv ; } else { return items.iterator ( ) . next ( ) ; } }
Source:
private org.ovirt.engine.core.compat.Guid getPrestartedVmToAttach ( org.ovirt.engine.core.compat.Guid vmPoolId ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmPoolMap > vmPoolMaps = org.ovirt.engine.core.bll.AttachUserToVmFromPoolAndRunCommand.getVmPoolDao ( ) . getVmMapsInVmPoolByVmPoolIdAndStatus ( vmPoolId , VMStatus.Up ) ; if ( vmPoolMaps != null ) { for ( org.ovirt.engine.core.common.businessentities.VmPoolMap map : vmPoolMaps ) { if ( canAttachPrestartedVmToUser ( map.getVmId ( ) , org.ovirt.engine.core.bll.AttachUserToVmFromPoolAndRunCommand.getVmPool ( ) . isStateful ( ) , org.ovirt.engine.core.bll.AttachUserToVmFromPoolAndRunCommand.getReturnValue ( ) . getValidationMessages ( ) ) ) { return map.getVmId ( ) ; } } } return org.ovirt.engine.core.compat.Guid.Empty ; }

Target:
private org.ovirt.engine.core.compat.Guid getPrestartedVmToAttach ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmPoolMap > vmPoolMaps = org.ovirt.engine.core.bll.AttachUserToVmFromPoolAndRunCommand.getVmPoolDao ( ) . getVmMapsInVmPoolByVmPoolIdAndStatus ( org.ovirt.engine.core.bll.AttachUserToVmFromPoolAndRunCommand.getVmPoolId ( ) , VMStatus.Up ) ; if ( vmPoolMaps != null ) { for ( org.ovirt.engine.core.common.businessentities.VmPoolMap map : vmPoolMaps ) { if ( canAttachPrestartedVmToUser ( map.getVmId ( ) , org.ovirt.engine.core.bll.AttachUserToVmFromPoolAndRunCommand.getVmPool ( ) . isStateful ( ) , org.ovirt.engine.core.bll.AttachUserToVmFromPoolAndRunCommand.getReturnValue ( ) . getValidationMessages ( ) ) ) { return map.getVmId ( ) ; } } } return org.ovirt.engine.core.compat.Guid.Empty ; }