auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public static void getDataCenterById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStoragePoolById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) . withoutRefresh ( ) , aQuery ) ; }

Target:
public static void getDataCenterListByName ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String name ) { 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.StoragePool > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( ( ( "DataCenter: name=" + name ) + " sortby name" ) , org.ovirt.engine.core.common.interfaces.SearchType.StoragePool ) , aQuery ) ; }
Source:
public static org.ovirt.engine.core.common.businessentities.network.NetworkInterface findInterfaceNetworkNameNotEmpty ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.NetworkInterface > items ) { for ( org.ovirt.engine.core.common.businessentities.network.NetworkInterface i : items ) { if ( ! ( org.ovirt.engine.core.compat.StringHelper.isNullOrEmpty ( i.getNetworkName ( ) ) ) ) { return i ; } } return null ; }

Target:
public int compare ( org.ovirt.engine.core.common.businessentities.network.VnicProfileView vnicProfile1 , org.ovirt.engine.core.common.businessentities.network.VnicProfileView vnicProfile2 ) { if ( vnicProfile1 == null ) { return vnicProfile2 == null ? 0 : 1 ; } else if ( vnicProfile2 == null ) { return - 1 ; } int retVal = lexoNumeric.compare ( vnicProfile1.getNetworkName ( ) , vnicProfile2.getNetworkName ( ) ) ; return retVal == 0 ? lexoNumeric.compare ( vnicProfile1.getName ( ) , vnicProfile2.getName ( ) ) : retVal ; }
Source:
public static org.ovirt.engine.api.model.DisplayType map ( org.ovirt.engine.api.model.DisplayType type , org.ovirt.engine.api.model.DisplayType incoming ) { switch ( type ) { case VNC : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.DisplayType ; case SPICE : return org.ovirt.engine.api.model.org.ovirt.engine.core.common.businessentities.DisplayType ; default : return null ; } }

Target:
private static org.ovirt.engine.core.common.businessentities.GraphicsType deriveGraphicsType ( java.util.Map < org.ovirt.engine.core.common.businessentities.GraphicsType , org.ovirt.engine.core.common.businessentities.GraphicsInfo > graphicsInfos ) { if ( graphicsInfos != null ) { if ( graphicsInfos.containsKey ( GraphicsType.SPICE ) ) { return org.ovirt.engine.core.common.businessentities.GraphicsType.SPICE ; } if ( graphicsInfos.containsKey ( GraphicsType.VNC ) ) { return org.ovirt.engine.core.common.businessentities.GraphicsType.VNC ; } } return null ; }
Source:
public void parseArguments ( java.util.List < java.lang.String > args ) throws java.lang.Exception { java.lang.System.out.println ( "Available modules:" ) ; for ( java.util.Map.Entry < java.lang.String , org.ovirt.engine.exttool.core.ModuleService > entry : new java.util.TreeMap ( getContext ( ) . < java.util.Map < java.lang.String , org.ovirt.engine.exttool.core.ModuleService > > get ( ContextKeys.MODULES ) ) . entrySet ( ) ) { java.lang.System.out.printf ( java.lang.String.format ( " %-10s - %s%n" , entry.getKey ( ) , entry.getValue ( ) . getDescription ( ) ) ) ; } throw new org.ovirt.engine.exttool.core.ExitException ( 0 ) ; }

Target:
public void parseArguments ( java.util.List < java.lang.String > args ) throws java.lang.Exception { java.lang.System.out.println ( "Available modules:" ) ; for ( java.util.Map.Entry < java.lang.String , org.ovirt.engine.exttool.core.ModuleService > entry : new java.util.TreeMap ( getContext ( ) . < java.util.Map < java.lang.String , org.ovirt.engine.exttool.core.ModuleService > > get ( ContextKeys.MODULES ) ) . entrySet ( ) ) { java.lang.System.out.printf ( java.lang.String.format ( " %-10s - %s%n" , entry.getKey ( ) , entry.getValue ( ) . getDescription ( ) ) ) ; } throw new org.ovirt.engine.exttool.core.ExitException ( "Usage" , 0 ) ; }
Source:
protected java.util.List < java.lang.String > getVolumeGroupIdsByLUNs ( java.util.List < org.ovirt.engine.core.common.businessentities.LUNs > luns ) { java.util.Set < java.lang.String > vgSet = new java.util.HashSet < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.LUNs lun : luns ) { if ( ! ( lun.getvolume_group_id ( ) . isEmpty ( ) ) ) { vgSet.add ( lun.getvolume_group_id ( ) ) ; } } return new java.util.ArrayList < > ( vgSet ) ; }

Target:
protected java.util.List < java.lang.String > getVolumeGroupIdsByLUNs ( java.util.List < org.ovirt.engine.core.common.businessentities.storage.LUNs > luns ) { java.util.Set < java.lang.String > vgSet = new java.util.HashSet < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.storage.LUNs lun : luns ) { if ( ! ( lun.getvolume_group_id ( ) . isEmpty ( ) ) ) { vgSet.add ( lun.getvolume_group_id ( ) ) ; } } return new java.util.ArrayList < > ( vgSet ) ; }
Source:
public static java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage_domains > FindAllStorageDomainsBySharedStatus ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage_domains > items , org.ovirt.engine.core.common.businessentities.StorageDomainSharedStatus status ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage_domains > ret = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage_domains > ( ) ; for ( org.ovirt.engine.core.common.businessentities.storage_domains i : items ) { if ( ( i.getstorage_domain_shared_status ( ) ) == status ) { ret.add ( i ) ; } } return ret ; }

Target:
public static java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > FindAllStorageDomainsBySharedStatus ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > items , org.ovirt.engine.core.common.businessentities.StorageDomainSharedStatus status ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ret = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) ; for ( org.ovirt.engine.core.common.businessentities.StorageDomain i : items ) { if ( ( i.getStorageDomainSharedStatus ( ) ) == status ) { ret.add ( i ) ; } } return ret ; }
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 GetDataCenterList ( 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 ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage_pool > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( "DataCenter: sortby name" , org.ovirt.engine.core.common.interfaces.SearchType.StoragePool ) , aQuery ) ; }
Source:
public static void getVmSnapshotList ( 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 ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllVmSnapshotsByVmId , new org.ovirt.engine.core.common.queries.GetAllVmSnapshotsByVmIdParameters ( id ) , aQuery ) ; }

Target:
public static void getRedirectServletReportsPage ( 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.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.RedirectServletReportsPage , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
public void execute ( ) { org.ovirt.engine.ui.common.presenter.popup.numa.UpdatedVnumaEvent.fire ( this , nodeModel.getVm ( ) . getId ( ) , nodeModel.isPinned ( ) , nodeModel.getVmNumaNode ( ) . getIndex ( ) , numaNodeList.indexOf ( numaNode ) ) ; org.ovirt.engine.ui.common.view.popup.numa.DraggableVirtualNumaPanel.menuPopup.hide ( ) ; }

Target:
public void execute ( ) { org.ovirt.engine.ui.common.presenter.popup.numa.UpdatedVnumaEvent.fire ( this , nodeModel.getVm ( ) . getId ( ) , nodeModel.isPinned ( ) , nodeModel.getVmNumaNode ( ) . getIndex ( ) , nodeIndex ) ; org.ovirt.engine.ui.common.view.popup.numa.DraggableVirtualNumaPanel.menuPopup.hide ( ) ; }
Source:
public org.ovirt.engine.core.common.businessentities.StoragePoolIsoMap runInTransaction ( ) { org.ovirt.engine.core.bll.context.CompensationContext context = getCompensationContext ( ) ; context.snapshotEntityStatus ( map , map.getstatus ( ) ) ; updateStatus ( map , status ) ; getCompensationContext ( ) . stateChanged ( ) ; return null ; }

Target:
public java.lang.Void runInTransaction ( ) { for ( org.ovirt.engine.core.common.businessentities.StorageDomain domain : domains ) { org.ovirt.engine.core.common.businessentities.StoragePoolIsoMap map = getStoragePoolIsoMap ( domain ) ; org.ovirt.engine.core.bll.context.CompensationContext context = getCompensationContext ( ) ; context.snapshotEntityStatus ( map , map.getstatus ( ) ) ; updateStatus ( map , status ) ; getCompensationContext ( ) . stateChanged ( ) ; } return null ; }
Source:
public static void GetVmDiskList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId , boolean isRefresh ) { 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 source ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetAllDisksByVmIdParameters params = new org.ovirt.engine.core.common.queries.GetAllDisksByVmIdParameters ( vmId ) ; params.setRefresh ( isRefresh ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllDisksByVmId , params , aQuery ) ; }

Target:
public static void getVmDiskList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId , boolean isRefresh ) { 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 source ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetAllDisksByVmIdParameters params = new org.ovirt.engine.core.common.queries.GetAllDisksByVmIdParameters ( vmId ) ; params.setRefresh ( isRefresh ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllDisksByVmId , params , aQuery ) ; }
Source:
public void updateDetails ( org.ovirt.engine.core.common.businessentities.VM vm ) { getSelectedItemDefinedMemory ( ) . setEntity ( sizeParser ( vm.getVmMemSizeMb ( ) ) ) ; getSelectedItemNumOfCpuCores ( ) . setEntity ( org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getMessages ( ) . cpuInfoMessage ( vm.getNumOfCpus ( ) , vm.getNumOfSockets ( ) , vm.getCpuPerSocket ( ) ) ) ; }

Target:
public void updateDetails ( org.ovirt.engine.core.common.businessentities.VM vm ) { getSelectedItemDefinedMemory ( ) . setEntity ( sizeParser ( vm.getVmMemSizeMb ( ) ) ) ; getSelectedItemNumOfCpuCores ( ) . setEntity ( org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getMessages ( ) . cpuInfoMessage ( vm.getNumOfCpus ( ) , vm.getNumOfSockets ( ) , vm.getCpuPerSocket ( ) , vm.getThreadsPerCpu ( ) ) ) ; }
Source:
private java.io.File createTempPng ( ) throws java.io.IOException { java.io.File file = java.io.File.createTempFile ( "favicon" , ".png" ) ; file.deleteOnExit ( ) ; java.awt.image.BufferedImage img = new java.awt.image.BufferedImage ( 256 , 256 , java.awt.image.BufferedImage.TYPE_INT_RGB ) ; if ( ! ( javax.imageio.ImageIO.write ( img , "PNG" , file ) ) ) { org.junit.Assert.fail ( "Unable to write temporary image file" ) ; } return file ; }

Target:
private java.io.File createTempPng ( ) throws java.io.IOException { java.io.File file = java.io.File.createTempFile ( "favicon" , ".png" ) ; file.deleteOnExit ( ) ; java.awt.image.BufferedImage img = new java.awt.image.BufferedImage ( 256 , 256 , java.awt.image.BufferedImage.TYPE_INT_RGB ) ; if ( ! ( javax.imageio.ImageIO.write ( img , "PNG" , file ) ) ) { org.junit.jupiter.api.Assertions.fail ( "Unable to write temporary image file" ) ; } return file ; }
Source:
protected void proceedProxyReturnValue ( ) { org.ovirt.engine.core.common.errors.EngineError returnStatus = getReturnValueFromStatus ( org.ovirt.engine.core.vdsbroker.vdsbroker.CancelMigrateVDSCommand.getReturnStatus ( ) ) ; switch ( returnStatus ) { case noVM : org.ovirt.engine.core.vdsbroker.vdsbroker.VDSExceptionBase outEx = org.ovirt.engine.core.vdsbroker.vdsbroker.CancelMigrateVDSCommand.createDefaultConcreteException ( "Cancel migration has failed. Please try again in a few moments and track the VM's event list for details" ) ; initializeVdsError ( returnStatus ) ; outEx.setVdsError ( new org.ovirt.engine.core.common.errors.VDSError ( org.ovirt.engine.core.common.errors.EngineError.MIGRATION_CANCEL_ERROR_NO_VM , org.ovirt.engine.core.vdsbroker.vdsbroker.CancelMigrateVDSCommand.getReturnStatus ( ) . mMessage ) ) ; throw outEx ; default : super . proceedProxyReturnValue ( ) ; } }

Target:
protected void proceedProxyReturnValue ( ) { org.ovirt.engine.core.common.errors.EngineError returnStatus = getReturnValueFromStatus ( org.ovirt.engine.core.vdsbroker.vdsbroker.CancelMigrateVDSCommand.getReturnStatus ( ) ) ; switch ( returnStatus ) { case noVM : org.ovirt.engine.core.vdsbroker.vdsbroker.VDSExceptionBase outEx = org.ovirt.engine.core.vdsbroker.vdsbroker.CancelMigrateVDSCommand.createDefaultConcreteException ( "Cancel migration has failed. Please try again in a few moments and track the VM's event list for details" ) ; initializeVdsError ( returnStatus ) ; outEx.setVdsError ( new org.ovirt.engine.core.common.errors.VDSError ( org.ovirt.engine.core.common.errors.EngineError.MIGRATION_CANCEL_ERROR_NO_VM , org.ovirt.engine.core.vdsbroker.vdsbroker.CancelMigrateVDSCommand.getReturnStatus ( ) . message ) ) ; throw outEx ; default : super . proceedProxyReturnValue ( ) ; } }
Source:
public void setUp ( ) { setUpQuota ( ) ; params = new org.ovirt.engine.core.common.action.QuotaCRUDParameters ( quota ) ; command = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.UpdateQuotaCommand ( params ) ) ; org.mockito.Mockito.doReturn ( quotaDAO ) . when ( command ) . getQuotaDAO ( ) ; }

Target:
public void setUp ( ) { setUpQuota ( ) ; params = new org.ovirt.engine.core.common.action.QuotaCRUDParameters ( quota ) ; command = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.UpdateQuotaCommand ( params ) ) ; org.mockito.Mockito.doReturn ( quotaDAO ) . when ( command ) . getQuotaDAO ( ) ; org.mockito.Mockito.doNothing ( ) . when ( command ) . removeQuotaFromCache ( ) ; }
Source:
protected boolean checkCpuSockets ( ) { return org.ovirt.engine.core.bll.AddVmCommand.CheckCpuSockets ( org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . getVmStaticData ( ) . getnum_of_sockets ( ) , org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . getVmStaticData ( ) . getcpu_per_socket ( ) , org.ovirt.engine.core.bll.AddVmCommand.getVdsGroup ( ) . getcompatibility_version ( ) . toString ( ) , org.ovirt.engine.core.bll.AddVmCommand.getReturnValue ( ) . getCanDoActionMessages ( ) ) ; }

Target:
protected boolean checkCpuSockets ( ) { return org.ovirt.engine.core.bll.AddVmCommand.CheckCpuSockets ( org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . getVmStaticData ( ) . getNumOfSockets ( ) , org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . getVmStaticData ( ) . getCpuPerSocket ( ) , org.ovirt.engine.core.bll.AddVmCommand.getVdsGroup ( ) . getcompatibility_version ( ) . toString ( ) , org.ovirt.engine.core.bll.AddVmCommand.getReturnValue ( ) . getCanDoActionMessages ( ) ) ; }
Source:
public java.lang.Object getKey ( T item ) { if ( item instanceof org.ovirt.engine.ui.uicommonweb.models.userportal.UserPortalItemModel ) { org.ovirt.engine.ui.uicommonweb.models.userportal.UserPortalItemModel itemModel = ( ( org.ovirt.engine.ui.uicommonweb.models.userportal.UserPortalItemModel ) ( item ) ) ; return itemModel.getIsPool ( ) ? ( ( org.ovirt.engine.core.common.businessentities.VmPool ) ( itemModel.getEntity ( ) ) ) . getVmPoolId ( ) : ( ( org.ovirt.engine.core.common.businessentities.VM ) ( itemModel.getEntity ( ) ) ) . getId ( ) ; } return super . getKey ( item ) ; }

Target:
public java.lang.Object getKey ( T item ) { if ( item instanceof org.ovirt.engine.ui.uicommonweb.models.userportal.UserPortalItemModel ) { org.ovirt.engine.ui.uicommonweb.models.userportal.UserPortalItemModel itemModel = ( ( org.ovirt.engine.ui.uicommonweb.models.userportal.UserPortalItemModel ) ( item ) ) ; return itemModel.isPool ( ) ? ( ( org.ovirt.engine.core.common.businessentities.VmPool ) ( itemModel.getEntity ( ) ) ) . getVmPoolId ( ) : ( ( org.ovirt.engine.core.common.businessentities.VM ) ( itemModel.getEntity ( ) ) ) . getId ( ) ; } return super . getKey ( item ) ; }
Source:
private void listenOnDiskModelChangeEvent ( final org.ovirt.engine.ui.userportal.uicommon.model.basic.UserPortalBasicListProvider modelProvider ) { modelProvider.getModel ( ) . getvmBasicDiskListModel ( ) . getItemsChangedEvent ( ) . addListener ( new org.ovirt.engine.core.compat.IEventListener ( ) { @ java.lang.Override public void eventRaised ( org.ovirt.engine.core.compat.Event ev , java.lang.Object sender , org.ovirt.engine.core.compat.EventArgs args ) { if ( ( modelProvider.getModel ( ) . getSelectedItem ( ) ) == null ) { return ; } setupDisks ( modelProvider ) ; } } ) ; }

Target:
private void listenOnDiskModelChangeEvent ( final org.ovirt.engine.ui.userportal.uicommon.model.basic.UserPortalBasicListProvider modelProvider ) { modelProvider.getModel ( ) . getvmBasicDiskListModel ( ) . getItemsChangedEvent ( ) . addListener ( new org.ovirt.engine.core.compat.IEventListener ( ) { @ java.lang.Override public void eventRaised ( org.ovirt.engine.core.compat.Event ev , java.lang.Object sender , org.ovirt.engine.core.compat.EventArgs args ) { if ( ( modelProvider.getModel ( ) . getSelectedItem ( ) ) == null ) { return ; } @ java.lang.SuppressWarnings ( value = "unchecked" ) java.lang.Iterable < org.ovirt.engine.core.common.businessentities.DiskImage > diskImages = modelProvider.getModel ( ) . getvmBasicDiskListModel ( ) . getItems ( ) ; getView ( ) . editDistItems ( diskImages ) ; } } ) ; }
Source:
public static org.ovirt.engine.core.common.businessentities.storage.DiskImage createDiskImageWithExcessData ( org.ovirt.engine.core.common.businessentities.storage.DiskImage diskImage , org.ovirt.engine.core.compat.Guid sdId ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage dummy = org.ovirt.engine.core.common.businessentities.storage.DiskImage.copyOf ( diskImage ) ; dummy.setStorageIds ( new java.util.ArrayList ( java.util.Collections.singletonList ( sdId ) ) ) ; dummy.getSnapshots ( ) . addAll ( org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getDiskImageDao ( ) . getAllSnapshotsForLeaf ( dummy.getImageId ( ) ) ) ; return dummy ; }

Target:
public org.ovirt.engine.core.common.businessentities.storage.DiskImage createDiskImageWithExcessData ( org.ovirt.engine.core.common.businessentities.storage.DiskImage diskImage , org.ovirt.engine.core.compat.Guid sdId ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage dummy = org.ovirt.engine.core.common.businessentities.storage.DiskImage.copyOf ( diskImage ) ; dummy.setStorageIds ( new java.util.ArrayList ( java.util.Collections.singletonList ( sdId ) ) ) ; dummy.getSnapshots ( ) . addAll ( diskImageDao.getAllSnapshotsForLeaf ( dummy.getImageId ( ) ) ) ; return dummy ; }
Source:
private static void testParseLunFromXmlRpcForDevtypeField ( org.ovirt.engine.core.common.businessentities.StorageType expectedStorageType , java.lang.String mockDevtype ) { java.util.Map < java.lang.String , java.lang.Object > xlun = new java.util.HashMap < java.lang.String , java.lang.Object > ( ) ; xlun.put ( GetDeviceListVDSCommand.DEVTYPE_FIELD , mockDevtype ) ; org.ovirt.engine.core.common.businessentities.LUNs lun = org.ovirt.engine.core.vdsbroker.vdsbroker.GetDeviceListVDSCommand.parseLunFromXmlRpc ( xlun ) ; org.junit.Assert.assertEquals ( expectedStorageType , lun.getLunType ( ) ) ; }

Target:
private static void testParseLunFromXmlRpcForDevtypeField ( org.ovirt.engine.core.common.businessentities.storage.StorageType expectedStorageType , java.lang.String mockDevtype ) { java.util.Map < java.lang.String , java.lang.Object > xlun = new java.util.HashMap < java.lang.String , java.lang.Object > ( ) ; xlun.put ( GetDeviceListVDSCommand.DEVTYPE_FIELD , mockDevtype ) ; org.ovirt.engine.core.common.businessentities.storage.LUNs lun = org.ovirt.engine.core.vdsbroker.vdsbroker.GetDeviceListVDSCommand.parseLunFromXmlRpc ( xlun ) ; org.junit.Assert.assertEquals ( expectedStorageType , lun.getLunType ( ) ) ; }
Source:
public void validateNotEnoughSpace ( ) throws java.lang.Exception { initializeCommand ( new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ) ; initVmForSpace ( ) ; initVmDiskImage ( false ) ; initSrcStorageDomain ( ) ; initDestStorageDomain ( StorageType.NFS ) ; org.mockito.Mockito.doReturn ( org.ovirt.engine.core.bll.storage.disk.MoveOrCopyDiskCommandTest.mockStorageDomainValidatorWithoutSpace ( ) ) . when ( command ) . createStorageDomainValidator ( ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( command , EngineMessage.ACTION_TYPE_FAILED_DISK_SPACE_LOW_ON_STORAGE_DOMAIN ) ; }

Target:
public void validateDiskIsOvfStore ( ) throws java.lang.Exception { initializeCommand ( new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) , VmEntityType.VM ) ; command.getImage ( ) . setContentType ( DiskContentType.OVF_STORE ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( command , EngineMessage.ACTION_TYPE_FAILED_OVF_DISK_NOT_SUPPORTED ) ; }
Source:
public org.ovirt.engine.api.v3.types.V3VM get ( @ javax.ws.rs.core.Context javax.ws.rs.core.HttpHeaders headers , @ javax.ws.rs.core.Context javax.ws.rs.core.UriInfo ui ) { org.ovirt.engine.api.v3.types.V3VM vm = adaptGet ( getDelegate ( ) :: get ) ; org.ovirt.engine.api.v3.helpers.V3VmHelper.addDisksLink ( vm ) ; java.util.Set < java.lang.String > details = org.ovirt.engine.api.common.util.DetailHelper.getDetails ( headers , ui ) ; if ( ( details != null ) && ( ! ( details.isEmpty ( ) ) ) ) { org.ovirt.engine.api.v3.helpers.V3VmHelper.addInlineDetails ( vm , this , details ) ; } return vm ; }

Target:
public org.ovirt.engine.api.v3.types.V3VM get ( @ javax.ws.rs.core.Context javax.ws.rs.core.HttpHeaders headers , @ javax.ws.rs.core.Context javax.ws.rs.core.UriInfo ui ) { org.ovirt.engine.api.v3.types.V3VM vm = adaptGet ( getDelegate ( ) :: get ) ; org.ovirt.engine.api.v3.helpers.V3VmHelper.addDisksLink ( vm ) ; java.util.Set < java.lang.String > details = org.ovirt.engine.api.common.util.DetailHelper.getDetails ( headers , ui ) ; if ( ( details != null ) && ( ! ( details.isEmpty ( ) ) ) ) { org.ovirt.engine.api.v3.helpers.V3VmHelper.addInlineDetails ( vm , this , details ) ; } org.ovirt.engine.api.v3.helpers.V3VmHelper.addGuestIp ( vm ) ; return vm ; }
Source:
protected void init ( T model ) { this . model = model ; widgets.clear ( ) ; super . init ( model ) ; if ( ! ( enabled ) ) { removeWidget ( widgets.getLast ( ) ) ; } }

Target:
protected void init ( T model ) { this . model = model ; widgets.clear ( ) ; super . init ( model ) ; if ( ! ( enabled ) ) { org.ovirt.engine.ui.common.widget.form.key_value.KeyValueLineWidget lastWidget = widgets.getLast ( ) ; if ( isGhost ( lastWidget.flush ( ) ) ) { removeWidget ( lastWidget ) ; } } }
Source:
public org.ovirt.engine.api.resource.StatisticsResource getStatisticsResource ( ) { org.ovirt.engine.api.restapi.resource.EntityIdResolver < org.ovirt.engine.core.compat.Guid > resolver = new org.ovirt.engine.api.restapi.resource.QueryIdResolver < org.ovirt.engine.core.compat.Guid > ( org.ovirt.engine.core.common.queries.VdcQueryType.GetVmByVmId , org.ovirt.engine.core.common.queries.GetVmByVmIdParameters.class ) ; org.ovirt.engine.api.restapi.resource.VmStatisticalQuery query = new org.ovirt.engine.api.restapi.resource.VmStatisticalQuery ( resolver , newModel ( id ) ) ; return inject ( new org.ovirt.engine.api.restapi.resource.BackendStatisticsResource < org.ovirt.engine.api.model.VM , org.ovirt.engine.api.model.VM > ( entityType , guid , query ) ) ; }

Target:
public org.ovirt.engine.api.resource.StatisticsResource getStatisticsResource ( ) { org.ovirt.engine.api.restapi.resource.EntityIdResolver < org.ovirt.engine.core.compat.Guid > resolver = new org.ovirt.engine.api.restapi.resource.QueryIdResolver < org.ovirt.engine.core.compat.Guid > ( org.ovirt.engine.core.common.queries.VdcQueryType.GetVmByVmId , org.ovirt.engine.core.common.queries.IdQueryParameters.class ) ; org.ovirt.engine.api.restapi.resource.VmStatisticalQuery query = new org.ovirt.engine.api.restapi.resource.VmStatisticalQuery ( resolver , newModel ( id ) ) ; return inject ( new org.ovirt.engine.api.restapi.resource.BackendStatisticsResource < org.ovirt.engine.api.model.VM , org.ovirt.engine.api.model.VM > ( entityType , guid , query ) ) ; }
Source:
private boolean isNetworkDeviceFree ( org.ovirt.engine.core.common.businessentities.HostDevice networkDevice ) { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface vfNic = getNicByPciDevice ( networkDevice ) ; return ( ( vfNic != null ) && ( ! ( isNetworkAttached ( vfNic ) ) ) ) && ( ! ( isVlanDeviceAttached ( vfNic ) ) ) ; }

Target:
private boolean isNetworkDeviceFree ( org.ovirt.engine.core.common.businessentities.HostDevice networkDevice ) { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface vfNic = getNicByPciDevice ( networkDevice ) ; return ( ( ( vfNic != null ) && ( ! ( isNetworkAttached ( vfNic ) ) ) ) && ( ! ( isVlanDeviceAttached ( vfNic ) ) ) ) && ( ! ( vfNic.isPartOfBond ( ) ) ) ; }
Source:
public void testExportWithStorageDomainName ( ) throws java.lang.Exception { setUpGetEntityExpectations ( ( "Storage: name=" + ( NAMES [ 2 ] ) ) , SearchType.StorageDomain , getStorageDomain ( 2 ) ) ; org.ovirt.engine.api.model.StorageDomain storageDomain = new org.ovirt.engine.api.model.StorageDomain ( ) ; storageDomain.setName ( NAMES [ 2 ] ) ; doTestExport ( storageDomain , false ) ; }

Target:
public void testExportWithStorageDomainName ( ) throws java.lang.Exception { setUpEntityQueryExpectations ( VdcQueryType.GetStorageDomainByName , org.ovirt.engine.core.common.queries.NameQueryParameters.class , new java.lang.String [ ] { "Name" } , new java.lang.Object [ ] { NAMES [ 2 ] } , getStorageDomainStatic ( 2 ) ) ; org.ovirt.engine.api.model.StorageDomain storageDomain = new org.ovirt.engine.api.model.StorageDomain ( ) ; storageDomain.setName ( NAMES [ 2 ] ) ; doTestExport ( storageDomain , false ) ; }
Source:
public static void getAttachedTagsToUser ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.setAttachedTagsConverter ( aQuery ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetTagsByUserId , new org.ovirt.engine.core.common.queries.GetTagsByUserIdParameters ( id.toString ( ) ) , aQuery ) ; }

Target:
public static void getDataCentersByStorageDomain ( 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 ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStoragePoolsByStorageDomainId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( storageDomainId ) , aQuery ) ; }
Source:
public void executeCommand ( org.ovirt.engine.ui.uicommonweb.UICommand command ) { super . executeCommand ( command ) ; if ( "AddDisk" . equals ( command.getName ( ) ) ) { addDisk ( ) ; } if ( "Cancel" . equals ( command.getName ( ) ) ) { cancel ( ) ; } }

Target:
public void executeCommand ( org.ovirt.engine.ui.uicommonweb.UICommand command ) { super . executeCommand ( command ) ; if ( "NewDisk" . equals ( command.getName ( ) ) ) { newDisk ( ) ; } else if ( "AttachDisk" . equals ( command.getName ( ) ) ) { attachDisk ( ) ; } else if ( "Cancel" . equals ( command.getName ( ) ) ) { cancel ( ) ; } }
Source:
private org.ovirt.engine.core.common.businessentities.network.Network findDisplayNetwork ( java.util.Collection < org.ovirt.engine.core.common.businessentities.network.Network > networks ) { org.ovirt.engine.core.common.businessentities.network.Network managementNetwork = null ; for ( org.ovirt.engine.core.common.businessentities.network.Network network : networks ) { if ( network.getCluster ( ) . isDisplay ( ) ) { return network ; } if ( org.ovirt.engine.core.utils.NetworkUtils.isManagementNetwork ( network ) ) { managementNetwork = network ; } } return managementNetwork ; }

Target:
private org.ovirt.engine.core.common.businessentities.network.Network findDisplayNetwork ( org.ovirt.engine.core.compat.Guid clusterId , java.util.Collection < org.ovirt.engine.core.common.businessentities.network.Network > networks ) { org.ovirt.engine.core.common.businessentities.network.Network managementNetwork = null ; for ( org.ovirt.engine.core.common.businessentities.network.Network network : networks ) { if ( network.getCluster ( ) . isDisplay ( ) ) { return network ; } if ( managementNetworkUtil.isManagementNetwork ( network.getId ( ) , clusterId ) ) { managementNetwork = network ; } } return managementNetwork ; }
Source:
private java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > getStorageDomains ( ) { org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain = control.createMock ( org.ovirt.engine.core.common.businessentities.StorageDomain.class ) ; org.easymock.EasyMock.expect ( storageDomain.getId ( ) ) . andReturn ( GUIDS [ 0 ] ) . anyTimes ( ) ; org.easymock.EasyMock.expect ( storageDomain.getStorage ( ) ) . andReturn ( GUIDS [ 0 ] . toString ( ) ) . anyTimes ( ) ; return java.util.Collections.singletonList ( storageDomain ) ; }

Target:
private java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > getStorageDomains ( ) { org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain = org.mockito.Mockito.mock ( org.ovirt.engine.core.common.businessentities.StorageDomain.class ) ; org.mockito.Mockito.when ( storageDomain.getId ( ) ) . thenReturn ( GUIDS [ 0 ] ) ; org.mockito.Mockito.when ( storageDomain.getStorage ( ) ) . thenReturn ( GUIDS [ 0 ] . toString ( ) ) ; return java.util.Collections.singletonList ( storageDomain ) ; }
Source:
private void addSelectedItemsChangedListener ( ) { org.ovirt.engine.ui.uicompat.IEventListener < org.ovirt.engine.ui.uicompat.EventArgs > selectionChangedListener = 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 ) { updateWarningLabel ( ) ; } } ; attachableDisksMap.get ( DiskStorageType.IMAGE ) . getSelectedItemsChangedEvent ( ) . addListener ( selectionChangedListener ) ; attachableDisksMap.get ( DiskStorageType.LUN ) . getSelectedItemsChangedEvent ( ) . addListener ( selectionChangedListener ) ; }

Target:
private void addSelectedItemsChangedListener ( ) { org.ovirt.engine.ui.uicompat.IEventListener < org.ovirt.engine.ui.uicompat.EventArgs > selectionChangedListener = 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 ) { updateWarningLabel ( ) ; } } ; attachableDisksMap.get ( DiskStorageType.IMAGE ) . getSelectedItemsChangedEvent ( ) . addListener ( selectionChangedListener ) ; attachableDisksMap.get ( DiskStorageType.CINDER ) . getSelectedItemsChangedEvent ( ) . addListener ( selectionChangedListener ) ; attachableDisksMap.get ( DiskStorageType.LUN ) . getSelectedItemsChangedEvent ( ) . addListener ( selectionChangedListener ) ; }
Source:
public void init ( java.util.List items , final org.ovirt.engine.core.compat.Guid storageDomainId ) { setItems ( items , storageDomainId ) ; }

Target:
public org.ovirt.engine.ui.uicommonweb.validation.ValidationResult validate ( java.lang.Object value ) { return ( data.isNameExistsInTheSystem ( ) ) && ( data.getName ( ) . equals ( data.getVm ( ) . getName ( ) ) ) ? org.ovirt.engine.ui.uicommonweb.validation.ValidationResult.fail ( org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getConstants ( ) . nameMustBeUniqueInvalidReason ( ) ) : org.ovirt.engine.ui.uicommonweb.validation.ValidationResult.ok ( ) ; }
Source:
public javax.ws.rs.core.Response add ( org.ovirt.engine.api.model.Permit permit ) { validateParameters ( permit , "name|id" ) ; validateEnums ( org.ovirt.engine.api.model.Permit.class , permit ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ActionGroup > actionGroups = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ActionGroup > ( ) ; actionGroups.add ( map ( permit ) ) ; return performCreation ( VdcActionType.AttachActionGroupsToRole , new org.ovirt.engine.core.common.action.ActionGroupsToRoleParameter ( roleId , actionGroups ) , new org.ovirt.engine.api.restapi.resource.BackendPermitsResource.PermitIdResolver ( actionGroups.get ( 0 ) ) ) ; }

Target:
public javax.ws.rs.core.Response add ( org.ovirt.engine.api.model.Permit permit ) { validateParameters ( permit , "name|id" ) ; validateEnums ( org.ovirt.engine.api.model.Permit.class , permit ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ActionGroup > actionGroups = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ActionGroup > ( ) ; actionGroups.add ( map ( permit ) ) ; return performCreate ( VdcActionType.AttachActionGroupsToRole , new org.ovirt.engine.core.common.action.ActionGroupsToRoleParameter ( roleId , actionGroups ) , new org.ovirt.engine.api.restapi.resource.BackendPermitsResource.PermitIdResolver ( actionGroups.get ( 0 ) ) ) ; }
Source:
private static boolean verifyByteArray ( java.io.DataInputStream dataInputStream , byte [ ] expected ) throws java.io.IOException { int length = dataInputStream.readInt ( ) ; byte [ ] contents = new byte [ length ] ; int numBytes = dataInputStream.read ( contents , 0 , length ) ; if ( numBytes != length ) { return false ; } if ( expected != null ) { return java.util.Arrays.equals ( contents , expected ) ; } return true ; }

Target:
public static boolean isPublicKeyValid ( java.lang.String publicKey ) { java.lang.String [ ] words = publicKey.split ( "\\s+" , 3 ) ; if ( ( words.length ) < 2 ) { return false ; } if ( ! ( words [ 0 ] . matches ( "^[\\p{Alpha}\\p{Digit}-]*$" ) ) ) { return false ; } if ( ! ( org.ovirt.engine.core.uutils.ssh.OpenSSHUtils.isBase64 ( words [ 1 ] . getBytes ( ) ) ) ) { return false ; } return true ; }
Source:
public javax.ws.rs.core.Response updateVirtualFunctionsConfig ( org.ovirt.engine.api.model.Action action ) { validateParameters ( action , "virtualFunctionsConfiguration.numberOfVirtualFunctions|allNetworksAllowed" ) ; final org.ovirt.engine.core.common.businessentities.network.HostNicVfsConfig vfsConfig = parent.findVfsConfig ( guid ) ; if ( vfsConfig == null ) { return notAllowed ( localize ( Messages.INVALID_OPERATION_ON_NON_SRIOV_NIC ) , guid.toString ( ) ) ; } org.ovirt.engine.core.common.action.UpdateHostNicVfsConfigParameters params = prepareUpdateHostNicVfsConfigParameters ( action , vfsConfig ) ; return doAction ( VdcActionType.UpdateHostNicVfsConfig , params , action ) ; }

Target:
public javax.ws.rs.core.Response updateVirtualFunctionsConfiguration ( org.ovirt.engine.api.model.Action action ) { validateParameters ( action , "virtualFunctionsConfiguration.numberOfVirtualFunctions|allNetworksAllowed" ) ; final org.ovirt.engine.core.common.businessentities.network.HostNicVfsConfig vfsConfig = parent.findVfsConfig ( guid ) ; if ( vfsConfig == null ) { return notAllowed ( localize ( Messages.INVALID_OPERATION_ON_NON_SRIOV_NIC ) , guid.toString ( ) ) ; } org.ovirt.engine.core.common.action.UpdateHostNicVfsConfigParameters params = prepareUpdateHostNicVfsConfigParameters ( action , vfsConfig ) ; return doAction ( VdcActionType.UpdateHostNicVfsConfig , params , action ) ; }
Source:
public static void getVmSnapshotList ( 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 ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllVmSnapshotsByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
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 ) ; }
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 ( ) { @ java.lang.Override public void eventRaised ( org.ovirt.engine.ui.uicompat.Event 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 ( ) { @ java.lang.Override public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { updateReportsAvailability ( ) ; } } ) ; performLogin ( loginModel ) ; restApiSessionManager.recordLoggedInTime ( ) ; }
Source:
public void executeCommand ( ) { cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.gluster.RefreshGlusterHooksCommand ( new org.ovirt.engine.core.common.action.gluster.GlusterClusterParameters ( org.ovirt.engine.core.bll.gluster.RefreshGlusterHooksCommandTest.CLUSTER_ID ) ) ) ; setupMocks ( ) ; org.mockito.Mockito.doNothing ( ) . when ( hookSyncJob ) . refreshHooksInCluster ( getVdsGroup ( ) , true ) ; cmd.executeCommand ( ) ; org.junit.Assert.assertEquals ( cmd.getAuditLogTypeValue ( ) , AuditLogType.GLUSTER_HOOK_REFRESH ) ; }

Target:
public void executeCommand ( ) { cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.gluster.RefreshGlusterHooksCommand ( new org.ovirt.engine.core.common.action.gluster.GlusterClusterParameters ( org.ovirt.engine.core.bll.gluster.RefreshGlusterHooksCommandTest.CLUSTER_ID ) ) ) ; setupMocks ( ) ; org.mockito.Mockito.doNothing ( ) . when ( hookSyncJob ) . refreshHooksInCluster ( getCluster ( ) , true ) ; cmd.executeCommand ( ) ; org.junit.Assert.assertEquals ( cmd.getAuditLogTypeValue ( ) , AuditLogType.GLUSTER_HOOK_REFRESH ) ; }
Source:
public void testGetAllRoleGroupMaps ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.RoleGroupMap > result = dao.getAllForRole ( org.ovirt.engine.core.dao.RoleGroupMapDaoTest.EXISTING_ROLE_ID ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.RoleGroupMap map : result ) { org.junit.Assert.assertEquals ( org.ovirt.engine.core.dao.RoleGroupMapDaoTest.EXISTING_ROLE_ID , map.getRoleId ( ) ) ; } }

Target:
public void testGetAllRoleGroupMaps ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.RoleGroupMap > result = dao.getAllForRole ( FixturesTool.ROLE_ID ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.RoleGroupMap map : result ) { org.junit.Assert.assertEquals ( FixturesTool.ROLE_ID , map.getRoleId ( ) ) ; } }
Source:
public org.ovirt.engine.core.vdsbroker.gluster.StorageDeviceListReturnForXmlRpc getStorageDeviceList ( ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "GlusterHost.storageDevicesList" ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) . withResponseKey ( "deviceInfo" ) ; return new org.ovirt.engine.core.vdsbroker.gluster.StorageDeviceListReturnForXmlRpc ( response ) ; }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.OvfReturnForXmlRpc getConvertedVm ( java.lang.String jobUUID ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "Host.getConvertedVm" ) . withParameter ( "jobid" , jobUUID ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) . withResponseKey ( "ovf" ) . withResponseType ( java.lang.String.class ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.OvfReturnForXmlRpc ( response ) ; }
Source:
private void editDisksTable ( org.ovirt.engine.ui.uicommonweb.models.vms.SnapshotModel model ) { disksTable.asEditor ( ) . edit ( model.getSnapshotDisks ( ) ) ; model.getSnapshotDisks ( ) . getItemsChangedEvent ( ) . addListener ( new org.ovirt.engine.ui.uicompat.IEventListener ( ) { @ java.lang.Override public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { disksTable.selectAll ( ) ; } } ) ; }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { updateMemoryWarning ( model ) ; }
Source:
private boolean properiesRequiringVmUpdateDeviceWereUpdated ( ) { return ( ! ( org.apache.commons.lang.StringUtils.equals ( oldIface.getNetworkName ( ) , org.ovirt.engine.core.bll.network.vm.UpdateVmInterfaceCommand.getNetworkName ( ) ) ) ) || ( ( oldIface.isLinked ( ) ) != ( org.ovirt.engine.core.bll.network.vm.UpdateVmInterfaceCommand.getInterface ( ) . isLinked ( ) ) ) ; }

Target:
private boolean propertiesRequiringVmUpdateDeviceWereUpdated ( ) { return ( ( ! ( org.apache.commons.lang.StringUtils.equals ( oldIface.getNetworkName ( ) , org.ovirt.engine.core.bll.network.vm.UpdateVmInterfaceCommand.getNetworkName ( ) ) ) ) || ( ( oldIface.isLinked ( ) ) != ( org.ovirt.engine.core.bll.network.vm.UpdateVmInterfaceCommand.getInterface ( ) . isLinked ( ) ) ) ) || ( ! ( org.ovirt.engine.core.common.utils.ObjectUtils.objectsEqual ( oldIface.getCustomProperties ( ) , org.ovirt.engine.core.bll.network.vm.UpdateVmInterfaceCommand.getInterface ( ) . getCustomProperties ( ) ) ) ) ; }
Source:
private void Pause ( ) { java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > list = new java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > ( ) ; for ( java.lang.Object item : getSelectedItems ( ) ) { org.ovirt.engine.core.common.businessentities.VM a = ( ( org.ovirt.engine.core.common.businessentities.VM ) ( item ) ) ; list.add ( new org.ovirt.engine.core.common.action.HibernateVmParameters ( a.getId ( ) ) ) ; } org.ovirt.engine.ui.frontend.Frontend.RunMultipleAction ( VdcActionType.HibernateVm , list , new org.ovirt.engine.ui.uicompat.IFrontendMultipleActionAsyncCallback ( ) { @ java.lang.Override public void Executed ( org.ovirt.engine.ui.uicompat.FrontendMultipleActionAsyncResult result ) { } } , null ) ; }

Target:
private void pause ( ) { java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > list = new java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > ( ) ; for ( java.lang.Object item : getSelectedItems ( ) ) { org.ovirt.engine.core.common.businessentities.VM a = ( ( org.ovirt.engine.core.common.businessentities.VM ) ( item ) ) ; list.add ( new org.ovirt.engine.core.common.action.HibernateVmParameters ( a.getId ( ) ) ) ; } org.ovirt.engine.ui.frontend.Frontend.RunMultipleAction ( VdcActionType.HibernateVm , list , new org.ovirt.engine.ui.uicompat.IFrontendMultipleActionAsyncCallback ( ) { @ java.lang.Override public void Executed ( org.ovirt.engine.ui.uicompat.FrontendMultipleActionAsyncResult result ) { } } , null ) ; }