auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private void Override_EntityChanged ( org.ovirt.engine.ui.uicompat.EventArgs e ) { boolean isChangeable = ( ( java.lang.Boolean ) ( getOverride ( ) . getEntity ( ) ) ) ; getVersion ( ) . setIsChangable ( isChangeable ) ; getRetransmissions ( ) . setIsChangable ( isChangeable ) ; getTimeout ( ) . setIsChangable ( isChangeable ) ; }

Target:
private void override_EntityChanged ( org.ovirt.engine.ui.uicompat.EventArgs e ) { boolean isChangeable = ( ( java.lang.Boolean ) ( getOverride ( ) . getEntity ( ) ) ) ; getVersion ( ) . setIsChangable ( isChangeable ) ; getRetransmissions ( ) . setIsChangable ( isChangeable ) ; getTimeout ( ) . setIsChangable ( isChangeable ) ; }
Source:
private java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > applyUserConfiguredNics ( ) { java.util.Map < java.lang.String , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > nicsToConfigureByName = getNicsToConfigureByNameWithoutLabelsUpdates ( ) ; updateLabelsOnNicsToConfigure ( nicsToConfigureByName ) ; return new java.util.ArrayList ( nicsToConfigureByName.values ( ) ) ; }

Target:
private java.util.Map < java.lang.String , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > getLabelToNic ( java.util.Map < java.lang.String , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > nicsToConfigureByName ) { java.util.Map < java.lang.String , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > labelToExistingNic = new java.util.HashMap < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic : nicsToConfigureByName.values ( ) ) { if ( org.ovirt.engine.core.utils.NetworkUtils.isLabeled ( nic ) ) { for ( java.lang.String label : nic.getLabels ( ) ) { labelToExistingNic.put ( label , nic ) ; } } } return labelToExistingNic ; }
Source:
public void testBootProtocolSetForDisplayNetworkWhenBootProtocolIsNone ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.Network network = createNetwork ( ) ; org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment = createNetworkAttachmentWithIpConfiguration ( NetworkBootProtocol.NONE , null , null ) ; attachment.setNetworkId ( network.getId ( ) ) ; doTestBootProtocolSetForDisplayNetworkWhenNullValuedIpConfigurationAndWhenNetworkClusterDisplay ( true , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.ACTION_TYPE_FAILED_DISPLAY_NETWORK_HAS_NO_BOOT_PROTOCOL , org.ovirt.engine.core.utils.ReplacementUtils.createSetVariableString ( NetworkAttachmentValidator.VAR_ACTION_TYPE_FAILED_DISPLAY_NETWORK_HAS_NO_BOOT_PROTOCOL_ENTITY , network.getName ( ) ) ) , network , attachment ) ; }

Target:
public void testBootProtocolSetForRoleNetworkWhenIpConfigurationIsNull ( ) { org.ovirt.engine.core.common.businessentities.network.Network network = createNetwork ( ) ; org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment = createNetworkAttachmentWithIpConfiguration ( NetworkBootProtocol.NONE , null , null ) ; attachment.setNetworkId ( network.getId ( ) ) ; doTestBootProtocolSetForRoleNetworkWhenNullValuedIpConfiguration ( true , true , false , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.ACTION_TYPE_FAILED_ROLE_NETWORK_HAS_NO_BOOT_PROTOCOL , org.ovirt.engine.core.utils.ReplacementUtils.createSetVariableString ( NetworkAttachmentValidator.VAR_ACTION_TYPE_FAILED_ROLE_NETWORK_HAS_NO_BOOT_PROTOCOL_ENTITY , network.getName ( ) ) ) , network , attachment ) ; }
Source:
protected void onLogin ( final org.ovirt.engine.ui.uicommonweb.models.LoginModel loginModel ) { org.ovirt.engine.ui.uicommonweb.ReportInit.getInstance ( ) . setSsoToken ( user.getEngineSessionId ( ) ) ; 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 ) { commonModelProvider.get ( ) . updateReportsAvailability ( ) ; } } ) ; performLogin ( loginModel ) ; }

Target:
protected void performPlaceTransition ( ) { if ( ! ( pluginsReady ) ) { com.google.gwt.core.client.Scheduler.get ( ) . scheduleDeferred ( new com.google.gwt.core.client.Scheduler.ScheduledCommand ( ) { @ java.lang.Override public void execute ( ) { performPlaceTransition ( ) ; } } ) ; } else { super . performPlaceTransition ( ) ; } }
Source:
public void testInstall ( ) throws java.lang.Exception { setUpGetEntityExpectations ( 1 ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.UpdateVds , org.ovirt.engine.core.common.action.UpdateVdsActionParameters.class , new java.lang.String [ ] { "RootPassword" } , new java.lang.Object [ ] { NAMES [ 2 ] } ) ) ; org.ovirt.engine.api.model.Action action = new org.ovirt.engine.api.model.Action ( ) ; action.setRootPassword ( NAMES [ 2 ] ) ; verifyActionResponse ( resource.install ( action ) ) ; }

Target:
public void testInstall ( ) throws java.lang.Exception { setUpGetEntityWithNoCertificateInfoExpectations ( 1 ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.UpdateVds , org.ovirt.engine.core.common.action.UpdateVdsActionParameters.class , new java.lang.String [ ] { "RootPassword" } , new java.lang.Object [ ] { NAMES [ 2 ] } ) ) ; org.ovirt.engine.api.model.Action action = new org.ovirt.engine.api.model.Action ( ) ; action.setRootPassword ( NAMES [ 2 ] ) ; verifyActionResponse ( resource.install ( action ) ) ; }
Source:
public static void getGlusterSwiftServices ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid serverId ) { 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 ? source : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterServerService > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetGlusterServerServicesByServerId , new org.ovirt.engine.core.common.queries.gluster.GlusterServiceQueryParameters ( serverId , org.ovirt.engine.core.common.businessentities.gluster.ServiceType.GLUSTER_SWIFT ) , aQuery ) ; }

Target:
public static void getGlusterBricksForServer ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid serverId ) { 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 ? source : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetGlusterVolumeBricksByServerId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( serverId ) , aQuery ) ; }
Source:
public void testNetworkExistWhenBothNetworkNameAndNetworkIdAreSet ( ) { org.ovirt.engine.core.common.businessentities.network.NetworkAttachment networkAttachment = new org.ovirt.engine.core.common.businessentities.network.NetworkAttachment ( ) ; networkAttachment.setNetworkName ( "network" ) ; networkAttachment.setNetworkId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; org.junit.Assert.assertThat ( createNetworkAttachmentValidator ( networkAttachment ) . networkExists ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }

Target:
public void testNetworkExistWhenBothNetworkNameAndNetworkIdAreSet ( ) { org.ovirt.engine.core.common.businessentities.network.NetworkAttachment networkAttachment = new org.ovirt.engine.core.common.businessentities.network.NetworkAttachment ( ) ; networkAttachment.setNetworkName ( org.ovirt.engine.core.bll.validator.NetworkAttachmentValidatorTest.NETWORK_NAME ) ; networkAttachment.setNetworkId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; org.junit.Assert.assertThat ( createNetworkAttachmentValidator ( networkAttachment ) . networkExists ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity getDistributedReplacatedVolume ( org.ovirt.engine.core.compat.Guid volumeId , int brickCount , int replicaCount ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity volumeEntity = new org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity ( ) ; volumeEntity.setId ( volumeId ) ; volumeEntity.setName ( "test-vol" ) ; volumeEntity.addAccessProtocol ( AccessProtocol.GLUSTER ) ; volumeEntity.addTransportType ( TransportType.TCP ) ; volumeEntity.setVolumeType ( GlusterVolumeType.DISTRIBUTED_REPLICATE ) ; volumeEntity.setBricks ( getBricks ( volumeId , brickCount ) ) ; volumeEntity.setReplicaCount ( replicaCount ) ; return volumeEntity ; }

Target:
private org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity getDistributedReplicatedVolume ( org.ovirt.engine.core.compat.Guid volumeId , int brickCount , int replicaCount ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity volumeEntity = new org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity ( ) ; volumeEntity.setId ( volumeId ) ; volumeEntity.setName ( "test-vol" ) ; volumeEntity.addAccessProtocol ( AccessProtocol.GLUSTER ) ; volumeEntity.addTransportType ( TransportType.TCP ) ; volumeEntity.setVolumeType ( GlusterVolumeType.DISTRIBUTED_REPLICATE ) ; volumeEntity.setBricks ( getBricks ( volumeId , brickCount ) ) ; volumeEntity.setReplicaCount ( replicaCount ) ; return volumeEntity ; }
Source:
public void getUsbPolicyUsbTypeNull31 ( ) { org.ovirt.engine.api.model.Usb usb = new org.ovirt.engine.api.model.Usb ( ) ; usb.setEnabled ( true ) ; org.ovirt.engine.core.common.businessentities.VDSGroup vdsGroup = new org.ovirt.engine.core.common.businessentities.VDSGroup ( ) ; vdsGroup.setcompatibility_version ( Version.v3_1 ) ; assertEquals ( org.ovirt.engine.api.restapi.types.VmMapper.getUsbPolicyOnCreate ( usb , vdsGroup ) , UsbPolicy.ENABLED_NATIVE ) ; }

Target:
public void getUsbPolicyUsbTypeNull31 ( ) { org.ovirt.engine.api.model.Usb usb = new org.ovirt.engine.api.model.Usb ( ) ; usb.setEnabled ( true ) ; org.ovirt.engine.core.common.businessentities.VDSGroup vdsGroup = new org.ovirt.engine.core.common.businessentities.VDSGroup ( ) ; vdsGroup.setcompatibility_version ( Version.v3_1 ) ; assertEquals ( org.ovirt.engine.api.restapi.types.VmMapper.getUsbPolicyOnCreate ( usb , vdsGroup.getcompatibility_version ( ) ) , UsbPolicy.ENABLED_NATIVE ) ; }
Source:
public void guestLogoutTimeTreatmentAfterDestroy ( ) { if ( ( ( getguest_last_login_time ( ) ) != null ) && ( ( ( getguest_last_logout_time ( ) ) == null ) || ( ( getguest_last_login_time ( ) . compareTo ( getguest_last_logout_time ( ) ) ) > 0 ) ) ) { setguest_last_logout_time ( new java.util.Date ( ) ) ; } }

Target:
public void setDiskSize ( double value ) { diskSize = value ; }
Source:
public void getClusterListByName ( 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.Cluster > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( ( ( "Cluster: name=" + name ) + " sortby name" ) , org.ovirt.engine.core.common.interfaces.SearchType.Cluster ) , aQuery ) ; }

Target:
public void getDataCenterListByName ( org.ovirt.engine.ui.frontend.AsyncQuery < java.util.List < org.ovirt.engine.core.common.businessentities.StoragePool > > aQuery , java.lang.String name ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.ListConverter < > ( ) ; 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 org.ovirt.engine.core.common.businessentities.VmGuestAgentInterface mapRow ( java.sql.ResultSet rs , int rowNum ) throws java.sql.SQLException { org.ovirt.engine.core.common.businessentities.VmGuestAgentInterface vmGuestAgentInterface = new org.ovirt.engine.core.common.businessentities.VmGuestAgentInterface ( ) ; vmGuestAgentInterface.setVmId ( org.ovirt.engine.core.compat.Guid.createGuidFromString ( rs.getString ( "vm_id" ) ) ) ; vmGuestAgentInterface.setInterfaceName ( rs.getString ( "interface_name" ) ) ; vmGuestAgentInterface.setMacAddress ( rs.getString ( "mac_address" ) ) ; vmGuestAgentInterface.setIpv4Addresses ( org.ovirt.engine.core.dao.VmGuestAgentInterfaceDaoDbFacadeImpl.VmGuestAgentInterfaceRowMapper.getListOfIpAddresses ( rs.getString ( "ipv4_addresses" ) ) ) ; vmGuestAgentInterface.setIpv6Addresses ( org.ovirt.engine.core.dao.VmGuestAgentInterfaceDaoDbFacadeImpl.VmGuestAgentInterfaceRowMapper.getListOfIpAddresses ( rs.getString ( "ipv6_addresses" ) ) ) ; return vmGuestAgentInterface ; }

Target:
public org.ovirt.engine.core.common.businessentities.VmGuestAgentInterface mapRow ( java.sql.ResultSet rs , int rowNum ) throws java.sql.SQLException { org.ovirt.engine.core.common.businessentities.VmGuestAgentInterface vmGuestAgentInterface = new org.ovirt.engine.core.common.businessentities.VmGuestAgentInterface ( ) ; vmGuestAgentInterface.setVmId ( org.ovirt.engine.core.compat.Guid.createGuidFromStringDefaultEmpty ( rs.getString ( "vm_id" ) ) ) ; vmGuestAgentInterface.setInterfaceName ( rs.getString ( "interface_name" ) ) ; vmGuestAgentInterface.setMacAddress ( rs.getString ( "mac_address" ) ) ; vmGuestAgentInterface.setIpv4Addresses ( org.ovirt.engine.core.dao.VmGuestAgentInterfaceDaoDbFacadeImpl.VmGuestAgentInterfaceRowMapper.getListOfIpAddresses ( rs.getString ( "ipv4_addresses" ) ) ) ; vmGuestAgentInterface.setIpv6Addresses ( org.ovirt.engine.core.dao.VmGuestAgentInterfaceDaoDbFacadeImpl.VmGuestAgentInterfaceRowMapper.getListOfIpAddresses ( rs.getString ( "ipv6_addresses" ) ) ) ; return vmGuestAgentInterface ; }
Source:
public void OnSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.VmModelBehaviorBase behavior = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.VmModelBehaviorBase ) ( target ) ) ; cachedTimeZones.set ( index , ( ( java.util.HashMap < java.lang.String , java.lang.String > ) ( returnValue ) ) . entrySet ( ) ) ; behavior.PostUpdateTimeZone ( ) ; }

Target:
public void OnSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.models.vms.VmModelBehaviorBase behavior = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.VmModelBehaviorBase ) ( target ) ) ; cachedTimeZones.set ( index , ( ( java.util.HashMap < java.lang.String , java.lang.String > ) ( returnValue ) ) . entrySet ( ) ) ; behavior.PostUpdateTimeZone ( selectedTimeZone ) ; }
Source:
public void execute ( ) { org.ovirt.engine.core.bll.ImagesHandler.updateAllDiskImagesSnapshotsStatusInTransactionWithCompensation ( getMovedDiskIds ( ) , ImageStatus.LOCKED , ImageStatus.OK , enclosingCommand.getCompensationContext ( ) ) ; if ( enclosingCommand.getParameters ( ) . getTaskGroupSuccess ( ) ) { org.ovirt.engine.core.common.action.VdcReturnValueBase vdcReturnValue = org.ovirt.engine.core.bll.Backend.getInstance ( ) . runInternalAction ( VdcActionType.CreateAllSnapshotsFromVm , getCreateSnapshotParameters ( ) , org.ovirt.engine.core.bll.job.ExecutionHandler.createInternalJobContext ( ) ) ; enclosingCommand.getReturnValue ( ) . getVdsmTaskIdList ( ) . addAll ( vdcReturnValue.getInternalVdsmTaskIdList ( ) ) ; } enclosingCommand.getReturnValue ( ) . setSucceeded ( true ) ; }

Target:
public void execute ( ) { org.ovirt.engine.core.bll.ImagesHandler.updateAllDiskImagesSnapshotsStatusInTransactionWithCompensation ( getMovedDiskIds ( ) , ImageStatus.LOCKED , ImageStatus.OK , enclosingCommand.getCompensationContext ( ) ) ; if ( enclosingCommand.getParameters ( ) . getTaskGroupSuccess ( ) ) { org.ovirt.engine.core.common.action.VdcReturnValueBase vdcReturnValue = org.ovirt.engine.core.bll.Backend.getInstance ( ) . runInternalAction ( VdcActionType.CreateAllSnapshotsFromVm , getCreateSnapshotParameters ( ) , org.ovirt.engine.core.bll.job.ExecutionHandler.createInternalJobContext ( enclosingCommand.getContext ( ) ) ) ; enclosingCommand.getReturnValue ( ) . getVdsmTaskIdList ( ) . addAll ( vdcReturnValue.getInternalVdsmTaskIdList ( ) ) ; } enclosingCommand.getReturnValue ( ) . setSucceeded ( true ) ; }
Source:
private boolean canRunOnDestinationVds ( java.util.List < java.lang.String > messages , boolean isMigrate ) { boolean returnValue = false ; if ( ( getDestinationVdsId ( ) ) != null ) { org.ovirt.engine.core.common.businessentities.VDS target_vds = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVdsDao ( ) . get ( getDestinationVdsId ( ) ) ; org.ovirt.engine.core.bll.VdsSelector.log.infoFormat ( "Checking for a specific VDS only - id:{0}, name:{1}, host_name(ip):{2}" , getDestinationVdsId ( ) , target_vds.getvds_name ( ) , target_vds.gethost_name ( ) ) ; returnValue = canFindVdsToRun ( messages , isMigrate , new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( java.util.Arrays.asList ( target_vds ) ) ) ; } return returnValue ; }

Target:
private boolean canRunOnDestinationVds ( java.util.List < java.lang.String > messages , boolean isMigrate ) { boolean returnValue = false ; if ( ( getDestinationVdsId ( ) ) != null ) { org.ovirt.engine.core.common.businessentities.VDS target_vds = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVdsDao ( ) . get ( getDestinationVdsId ( ) ) ; org.ovirt.engine.core.bll.VdsSelector.log.infoFormat ( "Checking for a specific VDS only - id:{0}, name:{1}, host_name(ip):{2}" , getDestinationVdsId ( ) , target_vds.getName ( ) , target_vds.getHostName ( ) ) ; returnValue = canFindVdsToRun ( messages , isMigrate , new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( java.util.Arrays.asList ( target_vds ) ) ) ; } return returnValue ; }
Source:
public void removeRepoDomainFileList ( org.ovirt.engine.core.compat.Guid id , org.ovirt.engine.core.common.businessentities.ImageFileType filetype ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "repo_domain_id" , id ) . addValue ( "file_type" , filetype.getValue ( ) ) ; getCallsHandler ( ) . executeModification ( "DeleteRepo_domain_file_list" , parameterSource ) ; }

Target:
public void removeRepoDomainFileList ( org.ovirt.engine.core.compat.Guid id , org.ovirt.engine.core.common.businessentities.ImageFileType fileType ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "storage_domain_id" , id ) ; if ( ( fileType == null ) || ( fileType == ( org.ovirt.engine.core.common.businessentities.ImageFileType.All ) ) ) { parameterSource.addValue ( "file_type" , null ) ; } else { parameterSource.addValue ( "file_type" , fileType.getValue ( ) ) ; } getCallsHandler ( ) . executeModification ( "DeleteRepo_domain_file_list" , parameterSource ) ; }
Source:
public boolean use ( long mac , boolean allowDuplicates ) { checkIfMacIsFromWithinRange ( mac ) ; int arrayIndex = macToArrayIndex ( mac ) ; if ( ! ( usedMacs.get ( arrayIndex ) ) ) { ( availableMacsCount ) -- ; usedMacs.set ( arrayIndex , true ) ; return true ; } if ( allowDuplicates ) { return macDuplicityCount.add ( arrayIndex ) ; } else { return false ; } }

Target:
public boolean use ( long mac , boolean allowDuplicates ) { checkIfMacIsFromWithinRange ( mac ) ; int arrayIndex = macToArrayIndex ( mac ) ; if ( ! ( usedMacs.get ( arrayIndex ) ) ) { ( availableMacsCount ) -- ; usedMacs.set ( arrayIndex , true ) ; return true ; } if ( allowDuplicates ) { return macDuplicityCount.increase ( arrayIndex ) ; } else { return false ; } }
Source:
public 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 void getTemplateNicList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? new java.util.ArrayList < > ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ) ( source ) ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetTemplateInterfacesByTemplateId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
protected int getNeededDiskSize ( org.ovirt.engine.core.compat.Guid storageDomainId ) { int result = 0 ; for ( org.ovirt.engine.core.common.businessentities.DiskImage img : getDiskImagesFromConfiguration ( ) ) { if ( ( img.getimageStatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.ImageStatus.ILLEGAL ) ) { if ( img.getstorage_ids ( ) . get ( 0 ) . getValue ( ) . equals ( storageDomainId ) ) { result = result + ( ( int ) ( java.lang.Math.ceil ( img.getActualSize ( ) ) ) ) ; } } } return result ; }

Target:
protected int getNeededDiskSize ( org.ovirt.engine.core.compat.Guid storageDomainId ) { int result = 0 ; for ( org.ovirt.engine.core.common.businessentities.DiskImage img : getDiskImagesFromConfiguration ( ) ) { if ( ( img.getImageStatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.ImageStatus.ILLEGAL ) ) { if ( img.getstorage_ids ( ) . get ( 0 ) . getValue ( ) . equals ( storageDomainId ) ) { result = result + ( ( int ) ( java.lang.Math.ceil ( img.getActualSize ( ) ) ) ) ; } } } return result ; }
Source:
private void removeAutogeneratedSnapshot ( ) { org.ovirt.engine.core.common.action.RemoveSnapshotParameters removeSnapshotParameters = new org.ovirt.engine.core.common.action.RemoveSnapshotParameters ( org.ovirt.engine.core.bll.storage.lsm.LiveMigrateVmDisksCommand.getParameters ( ) . getAutoGeneratedSnapshotId ( ) , org.ovirt.engine.core.bll.storage.lsm.LiveMigrateVmDisksCommand.getVmId ( ) ) ; removeSnapshotParameters.setEndProcedure ( EndProcedure.COMMAND_MANAGED ) ; removeSnapshotParameters.setParentCommand ( org.ovirt.engine.core.bll.storage.lsm.LiveMigrateVmDisksCommand.getActionType ( ) ) ; removeSnapshotParameters.setParentParameters ( org.ovirt.engine.core.bll.storage.lsm.LiveMigrateVmDisksCommand.getParameters ( ) ) ; removeSnapshotParameters.setNeedsLocking ( false ) ; runInternalAction ( VdcActionType.RemoveSnapshot , removeSnapshotParameters , org.ovirt.engine.core.bll.job.ExecutionHandler.createInternalJobContext ( org.ovirt.engine.core.bll.storage.lsm.LiveMigrateVmDisksCommand.getContext ( ) ) ) ; }

Target:
private void removeAutogeneratedSnapshot ( ) { org.ovirt.engine.core.common.action.RemoveSnapshotParameters removeSnapshotParameters = new org.ovirt.engine.core.common.action.RemoveSnapshotParameters ( org.ovirt.engine.core.bll.storage.lsm.LiveMigrateVmDisksCommand.getParameters ( ) . getAutoGeneratedSnapshotId ( ) , org.ovirt.engine.core.bll.storage.lsm.LiveMigrateVmDisksCommand.getVmId ( ) ) ; removeSnapshotParameters.setEndProcedure ( EndProcedure.COMMAND_MANAGED ) ; removeSnapshotParameters.setParentCommand ( org.ovirt.engine.core.bll.storage.lsm.LiveMigrateVmDisksCommand.getActionType ( ) ) ; removeSnapshotParameters.setParentParameters ( org.ovirt.engine.core.bll.storage.lsm.LiveMigrateVmDisksCommand.getParameters ( ) ) ; removeSnapshotParameters.setNeedsLocking ( false ) ; runInternalAction ( ActionType.RemoveSnapshot , removeSnapshotParameters , org.ovirt.engine.core.bll.job.ExecutionHandler.createInternalJobContext ( org.ovirt.engine.core.bll.storage.lsm.LiveMigrateVmDisksCommand.getContext ( ) ) ) ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult validateNetworkExclusiveOnNics ( ) { java.util.Map < java.lang.String , java.util.List < org.ovirt.engine.core.bll.validator.NetworkAttachmentsValidator.NetworkType > > nicNameToNetworkTypesMap = createNicNameToNetworkTypesMap ( ) ; java.util.List < java.lang.String > violatedNics = findViolatedNics ( nicNameToNetworkTypesMap ) ; if ( violatedNics.isEmpty ( ) ) { return org.ovirt.engine.core.bll.ValidationResult.VALID ; } else { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.NETWORK_INTERFACES_NOT_EXCLUSIVELY_USED_BY_NETWORK , org.ovirt.engine.core.utils.ReplacementUtils.replaceWith ( org.ovirt.engine.core.bll.validator.NetworkAttachmentsValidator.VAR_NETWORK_INTERFACES_NOT_EXCLUSIVELY_USED_BY_NETWORK_LIST , violatedNics ) ) ; } }

Target:
public org.ovirt.engine.core.bll.ValidationResult validateNetworkExclusiveOnNics ( ) { java.util.Map < java.lang.String , java.util.List < org.ovirt.engine.core.bll.validator.network.NetworkType > > nicNameToNetworkTypesMap = createNicNameToNetworkTypesMap ( ) ; java.util.List < java.lang.String > violatedNics = findViolatedNics ( nicNameToNetworkTypesMap ) ; if ( violatedNics.isEmpty ( ) ) { return org.ovirt.engine.core.bll.ValidationResult.VALID ; } else { final org.ovirt.engine.core.common.errors.EngineMessage violationMessage = networkExclusivenessValidator.getViolationMessage ( ) ; return new org.ovirt.engine.core.bll.ValidationResult ( violationMessage , org.ovirt.engine.core.utils.ReplacementUtils.replaceWith ( ( violationMessage + ( org.ovirt.engine.core.bll.validator.NetworkAttachmentsValidator.LIST_SUFFIX ) ) , violatedNics ) ) ; } }
Source:
protected boolean ValidateAdd ( java.util.List < org.ovirt.engine.core.common.businessentities.event_notification_methods > event_notification_methods , org.ovirt.engine.core.common.businessentities.event_subscriber event_subscriber , org.ovirt.engine.core.common.businessentities.DbUser user ) { java.lang.String tagName = event_subscriber.gettag_name ( ) ; boolean retValue = ValidateNotificationMethod ( event_notification_methods , event_subscriber , user ) ; if ( retValue && ( org.apache.commons.lang.StringUtils.isNotEmpty ( tagName ) ) ) { retValue = ValidateTag ( tagName ) ; } return retValue ; }

Target:
protected boolean ValidateAdd ( java.util.List < org.ovirt.engine.core.common.businessentities.EventNotificationMethod > eventNotificationMethods , org.ovirt.engine.core.common.businessentities.event_subscriber event_subscriber , org.ovirt.engine.core.common.businessentities.DbUser user ) { java.lang.String tagName = event_subscriber.gettag_name ( ) ; boolean retValue = ValidateNotificationMethod ( eventNotificationMethods , event_subscriber , user ) ; if ( retValue && ( org.apache.commons.lang.StringUtils.isNotEmpty ( tagName ) ) ) { retValue = ValidateTag ( tagName ) ; } return retValue ; }
Source:
private java.lang.String determineSpiceProxy ( ) { if ( org.apache.commons.lang.StringUtils.isNotBlank ( getCachedVm ( ) . getVmPoolSpiceProxy ( ) ) ) { return getCachedVm ( ) . getVmPoolSpiceProxy ( ) ; } if ( org.apache.commons.lang.StringUtils.isNotBlank ( getCachedVm ( ) . getVdsGroupSpiceProxy ( ) ) ) { return getCachedVm ( ) . getVdsGroupSpiceProxy ( ) ; } java.lang.String globalSpiceProxy = getConfigValue ( ConfigValues.SpiceProxyDefault ) ; if ( org.apache.commons.lang.StringUtils.isNotBlank ( globalSpiceProxy ) ) { return globalSpiceProxy ; } return null ; }

Target:
private java.lang.String determineSpiceProxy ( ) { if ( org.apache.commons.lang.StringUtils.isNotBlank ( getCachedVm ( ) . getVmPoolSpiceProxy ( ) ) ) { return getCachedVm ( ) . getVmPoolSpiceProxy ( ) ; } if ( org.apache.commons.lang.StringUtils.isNotBlank ( getCachedVm ( ) . getClusterSpiceProxy ( ) ) ) { return getCachedVm ( ) . getClusterSpiceProxy ( ) ; } java.lang.String globalSpiceProxy = getConfigValue ( ConfigValues.SpiceProxyDefault ) ; if ( org.apache.commons.lang.StringUtils.isNotBlank ( globalSpiceProxy ) ) { return globalSpiceProxy ; } return null ; }
Source:
private void addInterfaceToDb ( org.ovirt.engine.core.common.businessentities.VmNetworkInterface vmNetworkInterface ) { org.ovirt.engine.core.bll.network.vm.AddVmInterfaceCommand.getVmNetworkInterfaceDao ( ) . save ( vmNetworkInterface ) ; org.ovirt.engine.core.bll.network.vm.AddVmInterfaceCommand.getCompensationContext ( ) . snapshotNewEntity ( vmNetworkInterface ) ; org.ovirt.engine.core.bll.network.vm.AddVmInterfaceCommand.getDbFacade ( ) . getVmNetworkStatisticsDao ( ) . save ( vmNetworkInterface.getStatistics ( ) ) ; org.ovirt.engine.core.bll.network.vm.AddVmInterfaceCommand.getCompensationContext ( ) . snapshotNewEntity ( vmNetworkInterface.getStatistics ( ) ) ; }

Target:
private void addInterfaceToDb ( org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface vmNetworkInterface ) { org.ovirt.engine.core.bll.network.vm.AddVmInterfaceCommand.getVmNetworkInterfaceDao ( ) . save ( vmNetworkInterface ) ; org.ovirt.engine.core.bll.network.vm.AddVmInterfaceCommand.getCompensationContext ( ) . snapshotNewEntity ( vmNetworkInterface ) ; org.ovirt.engine.core.bll.network.vm.AddVmInterfaceCommand.getDbFacade ( ) . getVmNetworkStatisticsDao ( ) . save ( vmNetworkInterface.getStatistics ( ) ) ; org.ovirt.engine.core.bll.network.vm.AddVmInterfaceCommand.getCompensationContext ( ) . snapshotNewEntity ( vmNetworkInterface.getStatistics ( ) ) ; }
Source:
protected void executeQueryCommand ( ) { java.util.HashMap < org.ovirt.engine.core.common.action.VdcActionType , org.ovirt.engine.core.common.queries.CommandVersionsInfo > resultMap = new java.util.HashMap < org.ovirt.engine.core.common.action.VdcActionType , org.ovirt.engine.core.common.queries.CommandVersionsInfo > ( ) ; for ( org.ovirt.engine.core.common.businessentities.action_version_map actionVersionMap : org.ovirt.engine.core.bll.GetCommandsCompatibilityVersionsQuery.getActionGroupDao ( ) . getAllActionVersionMap ( ) ) { org.ovirt.engine.core.common.queries.CommandVersionsInfo info = new org.ovirt.engine.core.common.queries.CommandVersionsInfo ( actionVersionMap.getstorage_pool_minimal_version ( ) , actionVersionMap.getcluster_minimal_version ( ) ) ; resultMap.put ( actionVersionMap.getaction_type ( ) , info ) ; } org.ovirt.engine.core.bll.GetCommandsCompatibilityVersionsQuery.getQueryReturnValue ( ) . setReturnValue ( resultMap ) ; }

Target:
protected void executeQueryCommand ( ) { java.util.HashMap < org.ovirt.engine.core.common.action.VdcActionType , org.ovirt.engine.core.common.queries.CommandVersionsInfo > resultMap = new java.util.HashMap < org.ovirt.engine.core.common.action.VdcActionType , org.ovirt.engine.core.common.queries.CommandVersionsInfo > ( ) ; for ( org.ovirt.engine.core.common.businessentities.ActionVersionMap actionVersionMap : org.ovirt.engine.core.bll.GetCommandsCompatibilityVersionsQuery.getActionGroupDao ( ) . getAllActionVersionMap ( ) ) { org.ovirt.engine.core.common.queries.CommandVersionsInfo info = new org.ovirt.engine.core.common.queries.CommandVersionsInfo ( actionVersionMap.getstorage_pool_minimal_version ( ) , actionVersionMap.getcluster_minimal_version ( ) ) ; resultMap.put ( actionVersionMap.getaction_type ( ) , info ) ; } org.ovirt.engine.core.bll.GetCommandsCompatibilityVersionsQuery.getQueryReturnValue ( ) . setReturnValue ( resultMap ) ; }
Source:
public void testRemoveNotFound ( ) throws java.lang.Exception { setUpEntityQueryExpectations ( VdcQueryType.GetNetworkById , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendDataCenterNetworkResourceTest.NETWORK_ID } , null , null ) ; try { resource.remove ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }

Target:
public void testRemove ( ) throws java.lang.Exception { setUpEntityQueryExpectations ( 2 ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.RemoveNetwork , org.ovirt.engine.core.common.action.RemoveNetworkParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendDataCenterNetworkResourceTest.networkId } , true , true ) ) ; verifyRemove ( resource.remove ( ) ) ; }
Source:
public boolean hasMethod ( org.ovirt.api.metamodel.concepts.Name name ) { for ( org.ovirt.api.metamodel.concepts.Method method : methods ) { if ( java.util.Objects.equals ( method.getName ( ) , name ) ) { return true ; } } if ( ( base ) != null ) { return base.hasMethod ( name ) ; } return false ; }

Target:
public boolean hasMethod ( org.ovirt.api.metamodel.concepts.Name name ) { return methods ( ) . anyMatch ( named ( name ) ) ; }
Source:
public java.lang.Void runInTransaction ( ) { if ( ! ( getParameters ( ) . isShouldRemainIllegalOnFailedExecution ( ) ) ) { addDiskImageToDb ( mNewCreatedDiskImage , getCompensationContext ( ) ) ; } else { addDiskImageToDb ( mNewCreatedDiskImage , null ) ; getCompensationContext ( ) . snapshotEntityStatus ( mNewCreatedDiskImage.getImage ( ) , ImageStatus.ILLEGAL ) ; } return null ; }

Target:
public java.lang.Void runInTransaction ( ) { if ( ! ( getParameters ( ) . isShouldRemainIllegalOnFailedExecution ( ) ) ) { addDiskImageToDb ( newDiskImage , getCompensationContext ( ) ) ; } else { addDiskImageToDb ( newDiskImage , null ) ; getCompensationContext ( ) . snapshotEntityStatus ( newDiskImage.getImage ( ) , ImageStatus.ILLEGAL ) ; } return null ; }
Source:
private void updateShareable ( org.ovirt.engine.core.common.businessentities.VolumeType volumeType , org.ovirt.engine.core.common.businessentities.StorageType storageType ) { if ( ( storageType.isBlockDomain ( ) ) && ( volumeType == ( org.ovirt.engine.core.common.businessentities.VolumeType.Sparse ) ) ) { getIsShareable ( ) . setChangeProhibitionReason ( org.ovirt.engine.ui.uicommonweb.models.vms.AbstractDiskModel.CONSTANTS.shareableDiskNotSupportedByConfiguration ( ) ) ; getIsShareable ( ) . setIsChangable ( false ) ; getIsShareable ( ) . setEntity ( false ) ; } else { getIsShareable ( ) . setIsChangable ( isEditEnabled ( ) ) ; } }

Target:
private void updateShareable ( org.ovirt.engine.core.common.businessentities.storage.VolumeType volumeType , org.ovirt.engine.core.common.businessentities.storage.StorageType storageType ) { if ( ( storageType.isBlockDomain ( ) ) && ( volumeType == ( org.ovirt.engine.core.common.businessentities.storage.VolumeType.Sparse ) ) ) { getIsShareable ( ) . setChangeProhibitionReason ( org.ovirt.engine.ui.uicommonweb.models.vms.AbstractDiskModel.CONSTANTS.shareableDiskNotSupportedByConfiguration ( ) ) ; getIsShareable ( ) . setIsChangable ( false ) ; getIsShareable ( ) . setEntity ( false ) ; } else { getIsShareable ( ) . setIsChangable ( isEditEnabled ( ) ) ; } }
Source:
public static void getHostPublicKey ( 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.RunQuery ( VdcQueryType.GetServerSSHPublicKey , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }

Target:
public static void getClusterNetworkList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { if ( ( aQuery.converterCallback ) == null ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.Network > ( ) ; } return source ; } } ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllNetworksByClusterId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( clusterId ) , aQuery ) ; }
Source:
protected java.lang.Long getRawValue ( org.ovirt.engine.ui.uicommonweb.models.EntityModel object ) { org.ovirt.engine.core.common.businessentities.DiskImage diskImage = ( ( org.ovirt.engine.core.common.businessentities.DiskImage ) ( ( ( org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel ) ( object.getEntity ( ) ) ) . getDisk ( ) ) ) ; return diskImage.getSize ( ) ; }

Target:
public java.lang.String getValue ( org.ovirt.engine.ui.uicommonweb.models.EntityModel object ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage diskImage = ( ( org.ovirt.engine.core.common.businessentities.storage.DiskImage ) ( ( ( org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel ) ( object.getEntity ( ) ) ) . getDisk ( ) ) ) ; return diskImage.getId ( ) . toString ( ) ; }
Source:
public org.ovirt.engine.ui.uicommonweb.models.vms.ImportData getDiskImportData ( org.ovirt.engine.core.compat.Guid diskId ) { org.ovirt.engine.ui.uicommonweb.models.vms.ImportData importData = diskImportDataMap.get ( diskId ) ; if ( importData != null ) { if ( ( storage.getSelectedItem ( ) ) == null ) { importData.setSelectedStorageDomain ( ( ( org.ovirt.engine.core.common.businessentities.storage_domains ) ( storage.getSelectedItem ( ) ) ) ) ; } } return importData ; }

Target:
public org.ovirt.engine.ui.uicommonweb.models.vms.ImportDiskData getDiskImportData ( org.ovirt.engine.core.compat.Guid diskId ) { org.ovirt.engine.ui.uicommonweb.models.vms.ImportDiskData importData = diskImportDataMap.get ( diskId ) ; if ( importData != null ) { if ( ( storage.getSelectedItem ( ) ) == null ) { importData.setSelectedStorageDomain ( ( ( org.ovirt.engine.core.common.businessentities.storage_domains ) ( storage.getSelectedItem ( ) ) ) ) ; } } return importData ; }
Source:
public void testUpdateStatus ( ) { org.ovirt.engine.core.common.businessentities.VdsDynamic before = dao.get ( FixturesTool.VDS_GLUSTER_SERVER2 ) ; before.setStatus ( VDSStatus.Down ) ; dao.updateStatus ( before.getId ( ) , before.getStatus ( ) ) ; org.ovirt.engine.core.common.businessentities.VdsDynamic after = dao.get ( FixturesTool.VDS_GLUSTER_SERVER2 ) ; org.junit.Assert.assertEquals ( before , after ) ; }

Target:
public void testUpdateStatus ( ) { org.ovirt.engine.core.common.businessentities.VdsDynamic before = dao.get ( FixturesTool.VDS_GLUSTER_SERVER2 ) ; before.setStatus ( VDSStatus.Down ) ; dao.updateStatus ( before.getId ( ) , before.getStatus ( ) ) ; org.ovirt.engine.core.common.businessentities.VdsDynamic after = dao.get ( FixturesTool.VDS_GLUSTER_SERVER2 ) ; org.junit.jupiter.api.Assertions.assertEquals ( before , after ) ; }
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 getVmGuestAgentInterfacesByVmId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmGuestAgentInterface > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmGuestAgentInterfacesByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }
Source:
private void selectTimeZone ( org.ovirt.engine.ui.uicommonweb.models.ListModel < java.util.Map.Entry < java.lang.String , java.lang.String > > specificTimeZoneModel , java.util.Map < java.lang.String , java.lang.String > timezones , final java.lang.String tz ) { specificTimeZoneModel.setSelectedItem ( org.ovirt.engine.ui.uicommonweb.Linq.firstOrDefault ( timezones.entrySet ( ) , new org.ovirt.engine.ui.uicommonweb.Linq.IPredicate < java.util.Map.Entry < java.lang.String , java.lang.String > > ( ) { @ java.lang.Override public boolean match ( java.util.Map.Entry < java.lang.String , java.lang.String > item ) { return item.getKey ( ) . equals ( tz ) ; } } ) ) ; }

Target:
private void selectTimeZone ( org.ovirt.engine.ui.uicommonweb.models.ListModel < java.util.Map.Entry < java.lang.String , java.lang.String > > specificTimeZoneModel , java.util.Map < java.lang.String , java.lang.String > timezones , final java.lang.String tz ) { specificTimeZoneModel.setSelectedItem ( org.ovirt.engine.ui.uicommonweb.Linq.firstOrNull ( timezones.entrySet ( ) , new org.ovirt.engine.ui.uicommonweb.Linq.IPredicate < java.util.Map.Entry < java.lang.String , java.lang.String > > ( ) { @ java.lang.Override public boolean match ( java.util.Map.Entry < java.lang.String , java.lang.String > item ) { return item.getKey ( ) . equals ( tz ) ; } } ) ) ; }
Source:
private void updateDeviceProperties ( ) { if ( updateReadOnlyRequested ( ) ) { vmDeviceForVm.setIsReadOnly ( getNewDisk ( ) . getReadOnly ( ) ) ; getVmDeviceDao ( ) . update ( vmDeviceForVm ) ; } if ( ( getOldDisk ( ) . getDiskInterface ( ) ) != ( getNewDisk ( ) . getDiskInterface ( ) ) ) { getVmDeviceDao ( ) . clearDeviceAddress ( getOldDisk ( ) . getId ( ) ) ; } }

Target:
private void updateDeviceProperties ( ) { if ( updateReadOnlyRequested ( ) ) { vmDeviceForVm.setIsReadOnly ( getNewDisk ( ) . getReadOnly ( ) ) ; getVmDeviceDao ( ) . update ( vmDeviceForVm ) ; } if ( ( getOldDisk ( ) . getDiskInterface ( ) ) != ( getNewDisk ( ) . getDiskInterface ( ) ) ) { vmDeviceForVm.setAddress ( "" ) ; getVmDeviceDao ( ) . clearDeviceAddress ( getOldDisk ( ) . getId ( ) ) ; } }
Source:
private org.ovirt.engine.core.common.vdscommands.VDSReturnValue AddStoragePoolInIrs ( ) { return org.ovirt.engine.core.bll.Backend.getInstance ( ) . getResourceManager ( ) . RunVdsCommand ( VDSCommandType.CreateStoragePool , new org.ovirt.engine.core.common.vdscommands.CreateStoragePoolVDSCommandParameters ( org.ovirt.engine.core.bll.storage.AddStoragePoolWithStoragesCommand.getVds ( ) . getId ( ) , org.ovirt.engine.core.bll.storage.AddStoragePoolWithStoragesCommand.getStoragePool ( ) . getstorage_pool_type ( ) , org.ovirt.engine.core.bll.storage.AddStoragePoolWithStoragesCommand.getStoragePool ( ) . getId ( ) , org.ovirt.engine.core.bll.storage.AddStoragePoolWithStoragesCommand.getStoragePool ( ) . getname ( ) , masterStorageDomain.getId ( ) , org.ovirt.engine.core.bll.storage.AddStoragePoolWithStoragesCommand.getParameters ( ) . getStorages ( ) , org.ovirt.engine.core.bll.storage.AddStoragePoolWithStoragesCommand.getStoragePool ( ) . getmaster_domain_version ( ) ) ) ; }

Target:
private org.ovirt.engine.core.common.vdscommands.VDSReturnValue addStoragePoolInIrs ( ) { return runVdsCommand ( VDSCommandType.CreateStoragePool , new org.ovirt.engine.core.common.vdscommands.CreateStoragePoolVDSCommandParameters ( org.ovirt.engine.core.bll.storage.AddStoragePoolWithStoragesCommand.getVds ( ) . getId ( ) , org.ovirt.engine.core.bll.storage.AddStoragePoolWithStoragesCommand.getStoragePool ( ) . getstorage_pool_type ( ) , org.ovirt.engine.core.bll.storage.AddStoragePoolWithStoragesCommand.getStoragePool ( ) . getId ( ) , org.ovirt.engine.core.bll.storage.AddStoragePoolWithStoragesCommand.getStoragePool ( ) . getname ( ) , masterStorageDomain.getId ( ) , org.ovirt.engine.core.bll.storage.AddStoragePoolWithStoragesCommand.getParameters ( ) . getStorages ( ) , org.ovirt.engine.core.bll.storage.AddStoragePoolWithStoragesCommand.getStoragePool ( ) . getmaster_domain_version ( ) ) ) ; }
Source:
public void getExistingStorageDomainList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hostId , org.ovirt.engine.core.common.businessentities.StorageDomainType domainType , org.ovirt.engine.core.common.businessentities.StorageType storageType , java.lang.String path ) { 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.StorageDomain > ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetExistingStorageDomainList , new org.ovirt.engine.core.common.queries.GetExistingStorageDomainListParameters ( hostId , storageType , domainType , path ) , aQuery ) ; }

Target:
public void getStorageConnectionById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String id , 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 ) { return source != null ? ( ( org.ovirt.engine.core.common.businessentities.StorageServerConnections ) ( source ) ) : null ; } } ; org.ovirt.engine.core.common.queries.StorageServerConnectionQueryParametersBase params = new org.ovirt.engine.core.common.queries.StorageServerConnectionQueryParametersBase ( id ) ; params.setRefresh ( isRefresh ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageServerConnectionById , params , aQuery ) ; }
Source:
protected java.util.List < org.ovirt.engine.core.common.businessentities.permissions > setUpPermissions ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.permissions > perms = super . setUpPermissions ( ) ; perms.add ( getEntity ( ( ( perms.size ( ) ) - 1 ) ) ) ; perms.get ( ( ( perms.size ( ) ) - 1 ) ) . setObjectType ( VdcObjectType.System ) ; return perms ; }

Target:
public void testListWithEveryonePermissions ( ) throws java.lang.Exception { javax.ws.rs.core.UriInfo uriInfo = setUpUriExpectations ( null ) ; setUpGetEntityExpectations ( VdcQueryType.GetDbUserByUserId , org.ovirt.engine.core.common.queries.GetDbUserByUserIdParameters.class , new java.lang.String [ ] { "UserId" } , new java.lang.Object [ ] { GUIDS [ 1 ] } , getUserByIdx ( 1 ) ) ; setUpQueryExpectations ( "" , null , org.ovirt.engine.api.restapi.resource.EVERYONE ) ; collection.setUriInfo ( uriInfo ) ; verifyCollection ( getCollection ( ) ) ; }