auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private java.lang.String getConstraint ( ) { java.lang.StringBuilder buffer = new java.lang.StringBuilder ( ) ; buffer.append ( "Providers: type=" ) ; buffer.append ( ProviderType.OPENSTACK_VOLUME.name ( ) ) ; java.lang.String query = org.ovirt.engine.api.common.util.QueryHelper.getConstraint ( getUriInfo ( ) , null , modelType , false ) ; if ( org.apache.commons.lang.StringUtils.isNotBlank ( query ) ) { buffer.append ( " AND (" ) ; buffer.append ( query ) ; buffer.append ( ")" ) ; } return buffer.toString ( ) ; }

Target:
private java.lang.String getConstraint ( ) { java.lang.StringBuilder buffer = new java.lang.StringBuilder ( ) ; buffer.append ( "Providers: type=" ) ; buffer.append ( ProviderType.OPENSTACK_VOLUME.name ( ) ) ; java.lang.String query = org.ovirt.engine.api.common.util.QueryHelper.getConstraint ( httpHeaders , uriInfo , null , modelType , false ) ; if ( org.apache.commons.lang.StringUtils.isNotBlank ( query ) ) { buffer.append ( " AND (" ) ; buffer.append ( query ) ; buffer.append ( ")" ) ; } return buffer.toString ( ) ; }
Source:
public void getMaxNumOfVmCpus ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String version ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) : 1 ; } } ; org.ovirt.engine.core.common.queries.GetConfigurationValueParameters tempVar = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.MaxNumOfVmCpus ) ; tempVar.setVersion ( version ) ; getConfigFromCache ( tempVar , aQuery ) ; }

Target:
public void getVmNextRunConfiguration ( 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.getInstance ( ) . runQuery ( VdcQueryType.GetVmNextRunConfiguration , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }
Source:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendMultipleActionAsyncResult result ) { hostsModel.StopProgress ( ) ; boolean isAllCanDoPassed = true ; for ( org.ovirt.engine.core.common.action.VdcReturnValueBase returnValueBase : result.getReturnValue ( ) ) { isAllCanDoPassed = isAllCanDoPassed && ( returnValueBase.getCanDoAction ( ) ) ; if ( ! isAllCanDoPassed ) { break ; } } if ( isAllCanDoPassed ) { Cancel ( ) ; } }

Target:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendMultipleActionAsyncResult result ) { hostsModel.stopProgress ( ) ; boolean isAllCanDoPassed = true ; for ( org.ovirt.engine.core.common.action.VdcReturnValueBase returnValueBase : result.getReturnValue ( ) ) { isAllCanDoPassed = isAllCanDoPassed && ( returnValueBase.getCanDoAction ( ) ) ; if ( ! isAllCanDoPassed ) { break ; } } if ( isAllCanDoPassed ) { cancel ( ) ; } }
Source:
public void getGlusterHookContent ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hookId , 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 : "" ; } } ; org.ovirt.engine.core.common.queries.gluster.GlusterHookContentQueryParameters parameters = new org.ovirt.engine.core.common.queries.gluster.GlusterHookContentQueryParameters ( hookId ) ; parameters.setGlusterServerId ( serverId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterHookContent , parameters , aQuery ) ; }

Target:
public void getGlusterHookContent ( org.ovirt.engine.ui.frontend.AsyncQuery < java.lang.String > aQuery , org.ovirt.engine.core.compat.Guid hookId , org.ovirt.engine.core.compat.Guid serverId ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.StringConverter ( ) ; org.ovirt.engine.core.common.queries.gluster.GlusterHookContentQueryParameters parameters = new org.ovirt.engine.core.common.queries.gluster.GlusterHookContentQueryParameters ( hookId ) ; parameters.setGlusterServerId ( serverId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterHookContent , parameters , aQuery ) ; }
Source:
public void setUp ( ) { disk = new org.ovirt.engine.core.common.businessentities.DiskImage ( ) ; metadataDiskDescriptionHandler = org.ovirt.engine.core.bll.MetadataDiskDescriptionHandler.getInstance ( ) ; }

Target:
public void setUp ( ) { disk = new org.ovirt.engine.core.common.businessentities.DiskImage ( ) ; metadataDiskDescriptionHandler = org.mockito.Mockito.spy ( org.ovirt.engine.core.bll.MetadataDiskDescriptionHandler.getInstance ( ) ) ; org.mockito.Mockito.doNothing ( ) . when ( metadataDiskDescriptionHandler ) . auditLog ( org.mockito.Matchers.any ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase.class ) , org.mockito.Matchers.any ( org.ovirt.engine.core.common.AuditLogType.class ) ) ; }
Source:
protected boolean validate ( ) { org.ovirt.engine.core.common.action.VdcReturnValueBase returnValue = org.ovirt.engine.core.bll.tasks.CommandHelper.canDoAction ( VdcActionType.AddDisk , getAddDiskParameters ( ) , org.ovirt.engine.core.bll.storage.disk.image.UploadDiskImageCommand.getContext ( ) . clone ( ) . getExecutionContext ( ) , true ) ; org.ovirt.engine.core.bll.storage.disk.image.UploadDiskImageCommand.getReturnValue ( ) . setValidationMessages ( returnValue.getValidationMessages ( ) ) ; return returnValue.isValid ( ) ; }

Target:
protected boolean validateCreateImage ( ) { org.ovirt.engine.core.common.action.VdcReturnValueBase returnValue = org.ovirt.engine.core.bll.tasks.CommandHelper.validate ( VdcActionType.AddDisk , getAddDiskParameters ( ) , org.ovirt.engine.core.bll.storage.disk.image.UploadDiskImageCommand.getContext ( ) . clone ( ) ) ; org.ovirt.engine.core.bll.storage.disk.image.UploadDiskImageCommand.getReturnValue ( ) . setValidationMessages ( returnValue.getValidationMessages ( ) ) ; return returnValue.isValid ( ) ; }
Source:
private java.util.List < org.ovirt.engine.core.common.businessentities.pm.FenceProxySourceType > getFenceProxySources ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.pm.FenceProxySourceType > fenceProxySources = fencedHost.getFenceProxySources ( ) ; if ( ( fenceProxySources == null ) || ( fenceProxySources.isEmpty ( ) ) ) { fenceProxySources = org.ovirt.engine.core.common.utils.pm.FenceProxySourceTypeHelper.parseFromString ( org.ovirt.engine.core.common.config.Config.< java.lang.String > getValue ( ConfigValues.FenceProxyDefaultPreferences ) ) ; } return fenceProxySources ; }

Target:
protected java.util.List < org.ovirt.engine.core.common.businessentities.pm.FenceProxySourceType > getFenceProxySources ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.pm.FenceProxySourceType > fenceProxySources = fencedHost.getFenceProxySources ( ) ; if ( org.apache.commons.collections.CollectionUtils.isEmpty ( fenceProxySources ) ) { fenceProxySources = getDefaultFenceProxySources ( ) ; } return fenceProxySources ; }
Source:
public static void GetStorageDomainList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage_domains > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage_domains > ( ) ; } } ; org.ovirt.engine.core.common.queries.SearchParameters searchParams = new org.ovirt.engine.core.common.queries.SearchParameters ( "Storage:" , org.ovirt.engine.core.common.interfaces.SearchType.StorageDomain ) ; searchParams.setMaxCount ( 9999 ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.Search , searchParams , aQuery ) ; }

Target:
public static void GetNetworkList ( 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 != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllNetworks , new org.ovirt.engine.core.common.queries.GetAllNetworkQueryParamenters ( dataCenterId ) , aQuery ) ; }
Source:
protected void onInitDisks ( ) { java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel > disks = new java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel > ( ) ; for ( org.ovirt.engine.core.common.businessentities.DiskImage disk : getDiskImages ( ) ) { disks.add ( org.ovirt.engine.ui.uicommonweb.Linq.DiskToModel ( disk ) ) ; } setDisks ( disks ) ; initStorageDomains ( ) ; }

Target:
protected void onInitDisks ( ) { java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel > disks = new java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel > ( ) ; for ( org.ovirt.engine.core.common.businessentities.DiskImage disk : getDiskImages ( ) ) { disks.add ( org.ovirt.engine.ui.uicommonweb.Linq.diskToModel ( disk ) ) ; } setDisks ( disks ) ; initStorageDomains ( ) ; }
Source:
private void readCpuItem ( org.ovirt.engine.core.compat.backendcompat.XmlNode node ) { vmBase.setNumOfSockets ( java.lang.Integer.parseInt ( node.SelectSingleNode ( "rasd:num_of_sockets" , _xmlNS ) . innerText ) ) ; vmBase.setCpuPerSocket ( java.lang.Integer.parseInt ( node.SelectSingleNode ( "rasd:cpu_per_socket" , _xmlNS ) . innerText ) ) ; }

Target:
private void readCdItem ( org.ovirt.engine.core.utils.ovf.xml.XmlNode node ) { readManagedVmDevice ( node , org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; }
Source:
public void getDiskList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ( ) ; } } ; org.ovirt.engine.core.common.queries.SearchParameters searchParams = new org.ovirt.engine.core.common.queries.SearchParameters ( "Disks:" , org.ovirt.engine.core.common.interfaces.SearchType.Disk ) ; searchParams.setMaxCount ( 9999 ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , searchParams , aQuery ) ; }

Target:
public void getVmsRunningOnOrMigratingToVds ( 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 ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmsRunningOnOrMigratingToVds , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
public void handle ( sun.misc.Signal sig ) { org.ovirt.engine.core.notifier.Notifier.log.info ( ( "Preparing for shutdown after receiving signal " + sig ) ) ; if ( ( serviceHandler.size ( ) ) > 0 ) { for ( java.util.concurrent.ScheduledFuture < ? > scheduled : serviceHandler ) { scheduled.cancel ( true ) ; } } if ( ( scheduler.size ( ) ) > 0 ) { for ( java.util.concurrent.ScheduledExecutorService executer : scheduler ) { executer.shutdown ( ) ; } } org.ovirt.engine.core.notifier.Notifier.log.info ( "Event Notification service was shutdown" ) ; java.lang.System.exit ( 0 ) ; }

Target:
public void run ( ) { org.ovirt.engine.core.notifier.Notifier.log.info ( "Preparing for shutdown after receiving signal " ) ; if ( ( serviceHandler.size ( ) ) > 0 ) { for ( java.util.concurrent.ScheduledFuture < ? > scheduled : serviceHandler ) { scheduled.cancel ( true ) ; } } if ( ( scheduler.size ( ) ) > 0 ) { for ( java.util.concurrent.ScheduledExecutorService executer : scheduler ) { executer.shutdown ( ) ; } } org.ovirt.engine.core.notifier.Notifier.log.info ( "Event Notification service was shutdown" ) ; java.lang.System.exit ( 0 ) ; }
Source:
private void assertCallToParametersCreationForVdsB ( ) { org.mockito.ArgumentCaptor < java.util.List > captor = org.mockito.ArgumentCaptor.forClass ( java.util.List.class ) ; org.mockito.Mockito.verify ( persistentHostSetupNetworksParametersFactory ) . create ( org.mockito.Matchers.eq ( vdsB.getId ( ) ) , captor.capture ( ) ) ; assertCollectionContainingOnlyThese ( captor.getValue ( ) , networkA ) ; }

Target:
private void assertCallToParametersCreationForVdsB ( ) { org.mockito.ArgumentCaptor < java.util.List > captor = org.mockito.ArgumentCaptor.forClass ( java.util.List.class ) ; org.mockito.Mockito.verify ( persistentHostSetupNetworksParametersFactory ) . create ( org.mockito.ArgumentMatchers.eq ( vdsB.getId ( ) ) , captor.capture ( ) ) ; assertCollectionContainingOnlyThese ( captor.getValue ( ) , networkA ) ; }
Source:
public void testCheckIfExistsHostWithStatusInCluster ( ) { org.ovirt.engine.core.compat.Guid clusterId = existingVds.getClusterId ( ) ; org.ovirt.engine.core.common.businessentities.VdsDynamic existingVdsDynamic = dao.get ( existingVds.getId ( ) ) ; org.ovirt.engine.core.common.businessentities.VDSStatus existingHostStatus = existingVdsDynamic.getStatus ( ) ; boolean resultBeforeUpdateStatus = dao.checkIfExistsHostWithStatusInCluster ( clusterId , existingHostStatus ) ; org.junit.Assert.assertTrue ( resultBeforeUpdateStatus ) ; updateStatusForAllHostsInCluster ( clusterId , VDSStatus.Connecting ) ; boolean resultAfterUpdateStatus = dao.checkIfExistsHostWithStatusInCluster ( clusterId , existingHostStatus ) ; org.junit.Assert.assertFalse ( resultAfterUpdateStatus ) ; }

Target:
public void testCheckIfExistsHostWithStatusInCluster ( ) { boolean resultBeforeUpdateStatus = dao.checkIfExistsHostWithStatusInCluster ( FixturesTool.GLUSTER_CLUSTER_ID , VDSStatus.Up ) ; org.junit.Assert.assertTrue ( resultBeforeUpdateStatus ) ; boolean resultAfterUpdateStatus = dao.checkIfExistsHostWithStatusInCluster ( FixturesTool.GLUSTER_CLUSTER_ID , VDSStatus.Connecting ) ; org.junit.Assert.assertFalse ( resultAfterUpdateStatus ) ; }
Source:
public void testNetworkIpAddressWasSameAsHostnameAndChangedWhenIpConfigurationIsNotStatic ( ) throws java.lang.Exception { for ( org.ovirt.engine.core.common.businessentities.network.NetworkBootProtocol networkBootProtocol : org.ovirt.engine.core.common.businessentities.network.NetworkBootProtocol.values ( ) ) { if ( networkBootProtocol == ( org.ovirt.engine.core.common.businessentities.network.NetworkBootProtocol.STATIC_IP ) ) { continue ; } org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment = createNetworkAttachmentWithIpConfiguration ( networkBootProtocol , null , null ) ; org.junit.Assert.assertThat ( new org.ovirt.engine.core.bll.validator.NetworkAttachmentValidator ( attachment , null ) . networkIpAddressWasSameAsHostnameAndChanged ( null ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; } }

Target:
public void testValidateGatewayWhenIpConfigurationIsNotSet ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment = new org.ovirt.engine.core.common.businessentities.network.NetworkAttachment ( ) ; org.junit.Assert.assertThat ( createNetworkAttachmentValidator ( attachment ) . validateGateway ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }
Source:
public static java.lang.String getMessage ( org.ovirt.engine.core.common.AuditLogType logType ) { final java.lang.String key = logType.name ( ) ; try { return org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.resourceBundle.getString ( key ) ; } catch ( java.lang.Exception e ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.log.error ( ( ( ( ( "Key '" + key ) + "' is not translated in '" ) + ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.getResourceBundleName ( ) ) ) + "'" ) ) ; return logType.name ( ) ; } }

Target:
protected static java.lang.String getMessageOrNull ( org.ovirt.engine.core.common.AuditLogType logType ) { final java.lang.String key = logType.name ( ) ; try { return org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.resourceBundle.getString ( key ) ; } catch ( java.lang.Exception e ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.log.error ( "Key '{}' is not translated in '{}'" , key , org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.getResourceBundleName ( ) ) ; return null ; } }
Source:
private boolean isRunOnce ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > cdList = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmDeviceDao ( ) . getVmDeviceByVmIdTypeAndDevice ( org.ovirt.engine.core.bll.ProcessDownVmCommand.getVmId ( ) , VmDeviceGeneralType.DISK , VmDeviceType.CDROM.getName ( ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > floppyList = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmDeviceDao ( ) . getVmDeviceByVmIdTypeAndDevice ( org.ovirt.engine.core.bll.ProcessDownVmCommand.getVmId ( ) , VmDeviceGeneralType.DISK , VmDeviceType.FLOPPY.getName ( ) ) ; return ( ( cdList.size ( ) ) > 1 ) || ( ( floppyList.size ( ) ) > 1 ) ; }

Target:
private boolean isRunOnce ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > cdList = vmDeviceDao.getVmDeviceByVmIdTypeAndDevice ( org.ovirt.engine.core.bll.ProcessDownVmCommand.getVmId ( ) , VmDeviceGeneralType.DISK , VmDeviceType.CDROM.getName ( ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.VmDevice > floppyList = vmDeviceDao.getVmDeviceByVmIdTypeAndDevice ( org.ovirt.engine.core.bll.ProcessDownVmCommand.getVmId ( ) , VmDeviceGeneralType.DISK , VmDeviceType.FLOPPY.getName ( ) ) ; return ( ( cdList.size ( ) ) > 1 ) || ( ( floppyList.size ( ) ) > 1 ) ; }
Source:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel localModel = ( ( org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel ) ( getConfirmWindow ( ) ) ) ; localModel.stopProgress ( ) ; setConfirmWindow ( null ) ; if ( result.getReturnValue ( ) . getSucceeded ( ) ) { showRebalanceStatus ( ) ; } }

Target:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendMultipleActionAsyncResult result ) { org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel localModel = ( ( org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel ) ( result.getState ( ) ) ) ; localModel.stopProgress ( ) ; cancel ( ) ; }
Source:
public static void getHostArchitecture ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter < org.ovirt.engine.core.common.businessentities.ArchitectureType > ( ) { @ java.lang.Override public org.ovirt.engine.core.common.businessentities.ArchitectureType Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return ( ( org.ovirt.engine.core.common.businessentities.ArchitectureType ) ( source ) ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetHostArchitecture , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
public 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.getInstance ( ) . runQuery ( VdcQueryType.GetVmByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }
Source:
public void getGlusterHookContent ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hookId , 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 : "" ; } } ; org.ovirt.engine.core.common.queries.gluster.GlusterHookContentQueryParameters parameters = new org.ovirt.engine.core.common.queries.gluster.GlusterHookContentQueryParameters ( hookId ) ; parameters.setGlusterServerId ( serverId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterHookContent , parameters , aQuery ) ; }

Target:
public void getClusterGlusterServices ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { 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.core.common.queries.gluster.GlusterVolumeAdvancedDetailsParameters parameters = new org.ovirt.engine.core.common.queries.gluster.GlusterVolumeAdvancedDetailsParameters ( clusterId , null , null , false ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterVolumeAdvancedDetails , parameters , aQuery ) ; }
Source:
private void doTestBadUpdate ( boolean valid , boolean success , java.lang.String detail ) throws java.lang.Exception { setUpGetEntityExpectations ( 1 ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.UpdateVdsGroup , org.ovirt.engine.core.common.action.VdsGroupOperationParameters.class , new java.lang.String [ ] { } , new java.lang.Object [ ] { } , valid , success ) ) ; try { resource.update ( org.ovirt.engine.api.restapi.resource.BackendClustersResourceTest.getModel ( 0 ) ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }

Target:
private void doTestBadUpdate ( boolean valid , boolean success , java.lang.String detail ) throws java.lang.Exception { setUpGetEntityExpectations ( 1 ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.UpdateCluster , org.ovirt.engine.core.common.action.ClusterOperationParameters.class , new java.lang.String [ ] { } , new java.lang.Object [ ] { } , valid , success ) ) ; try { resource.update ( org.ovirt.engine.api.restapi.resource.BackendClustersResourceTest.getModel ( 0 ) ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }
Source:
protected org.ovirt.engine.api.model.Disks mapCollection ( java.util.List < org.ovirt.engine.api.model.Disk > entities ) { org.ovirt.engine.api.model.Disks collection = new org.ovirt.engine.api.model.Disks ( ) ; for ( org.ovirt.engine.api.model.Disk disk : entities ) { collection.getDisks ( ) . add ( addLinks ( map ( disk ) ) ) ; } return collection ; }

Target:
protected org.ovirt.engine.api.model.Disks mapCollection ( java.util.List < org.ovirt.engine.api.model.Disk > entities ) { org.ovirt.engine.api.model.Disks collection = new org.ovirt.engine.api.model.Disks ( ) ; for ( org.ovirt.engine.api.model.Disk disk : entities ) { collection.getDisks ( ) . add ( addLinks ( populate ( map ( disk ) , disk ) ) ) ; } return collection ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult vmNotSavingRestoring ( ) { if ( ( ( vm.getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.SavingState ) ) || ( ( vm.getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.RestoringState ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.dal.VdcBllMessages.ACTION_TYPE_FAILED_VM_IS_SAVING_RESTORING ) ; } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult vmNotSavingRestoring ( ) { if ( ( vm.getStatus ( ) . isHibernating ( ) ) || ( ( vm.getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.RestoringState ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.ACTION_TYPE_FAILED_VM_IS_SAVING_RESTORING ) ; } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }
Source:
public static org.ovirt.vdsm.jsonrpc.client.internal.ResponseWorker getWorker ( ) { if ( ( org.ovirt.vdsm.jsonrpc.client.reactors.ReactorFactory.worker ) != null ) { return org.ovirt.vdsm.jsonrpc.client.reactors.ReactorFactory.worker ; } synchronized ( org.ovirt.vdsm.jsonrpc.client.reactors.ReactorFactory.class ) { if ( ( org.ovirt.vdsm.jsonrpc.client.reactors.ReactorFactory.worker ) != null ) { return org.ovirt.vdsm.jsonrpc.client.reactors.ReactorFactory.worker ; } org.ovirt.vdsm.jsonrpc.client.reactors.ReactorFactory.worker = new org.ovirt.vdsm.jsonrpc.client.internal.ResponseWorker ( ) ; } return org.ovirt.vdsm.jsonrpc.client.reactors.ReactorFactory.worker ; }

Target:
public static org.ovirt.vdsm.jsonrpc.client.internal.ResponseWorker getWorker ( int parallelism ) { if ( ( org.ovirt.vdsm.jsonrpc.client.reactors.ReactorFactory.worker ) != null ) { return org.ovirt.vdsm.jsonrpc.client.reactors.ReactorFactory.worker ; } synchronized ( org.ovirt.vdsm.jsonrpc.client.reactors.ReactorFactory.class ) { if ( ( org.ovirt.vdsm.jsonrpc.client.reactors.ReactorFactory.worker ) != null ) { return org.ovirt.vdsm.jsonrpc.client.reactors.ReactorFactory.worker ; } org.ovirt.vdsm.jsonrpc.client.reactors.ReactorFactory.worker = new org.ovirt.vdsm.jsonrpc.client.internal.ResponseWorker ( parallelism ) ; } return org.ovirt.vdsm.jsonrpc.client.reactors.ReactorFactory.worker ; }
Source:
public int hashCode ( ) { final int prime = 31 ; int result = super . hashCode ( ) ; result = ( prime * result ) + ( ( usingScsiReservation ) == null ? 0 : usingScsiReservation.hashCode ( ) ) ; result = ( prime * result ) + ( ( lun ) == null ? 0 : lun.hashCode ( ) ) ; return result ; }

Target:
public int hashCode ( ) { return java.util.Objects.hash ( super . hashCode ( ) , usingScsiReservation , lun ) ; }
Source:
public static java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > getAllImageSnapshots ( org.ovirt.engine.core.compat.Guid imageId , org.ovirt.engine.core.compat.Guid imageTemplateId ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > snapshots = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ( ) ; org.ovirt.engine.core.compat.Guid curImage = imageId ; while ( ( ! ( imageTemplateId.equals ( curImage ) ) ) && ( ! ( curImage.equals ( Guid.Empty ) ) ) ) { org.ovirt.engine.core.common.businessentities.DiskImage curDiskImage = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getDiskImageDao ( ) . getSnapshotById ( curImage ) ; snapshots.add ( curDiskImage ) ; curImage = curDiskImage.getParentId ( ) ; } return snapshots ; }

Target:
public static org.ovirt.engine.core.common.businessentities.Snapshot prepareSnapshotConfigWithoutImageSingleImage ( org.ovirt.engine.core.common.businessentities.Snapshot snapshot , org.ovirt.engine.core.compat.Guid imageId ) { return org.ovirt.engine.core.bll.ImagesHandler.prepareSnapshotConfigWithAlternateImage ( snapshot , imageId , null ) ; }
Source:
public void getUserMessageOfTheDayViaPublic ( 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.getInstance ( ) . runPublicQuery ( VdcQueryType.GetConfigurationValue , new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.UserMessageOfTheDay , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public 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.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterServerServicesByServerId , new org.ovirt.engine.core.common.queries.gluster.GlusterServiceQueryParameters ( serverId , org.ovirt.engine.core.common.businessentities.gluster.ServiceType.GLUSTER_SWIFT ) , aQuery ) ; }
Source:
private void doTestBadUpdate ( boolean canDo , boolean success , java.lang.String detail ) throws java.lang.Exception { setUpGetEntityExpectations ( 1 ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.UpdateProvider , org.ovirt.engine.core.common.action.ProviderParameters.class , new java.lang.String [ ] { "Provider.Id" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , canDo , success ) ) ; try { resource.update ( getModel ( 0 ) ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }

Target:
private void doTestBadUpdate ( boolean valid , boolean success , java.lang.String detail ) throws java.lang.Exception { setUpGetEntityExpectations ( 1 ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.UpdateProvider , org.ovirt.engine.core.common.action.ProviderParameters.class , new java.lang.String [ ] { "Provider.Id" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , valid , success ) ) ; try { resource.update ( getModel ( 0 ) ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }
Source:
public void countAllTemplates ( 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 ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmTemplateCount , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }

Target:
public void getHostsForStorageOperation ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , boolean localFsOnly ) { 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.VDS > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetHostsForStorageOperation , new org.ovirt.engine.core.common.queries.GetHostsForStorageOperationParameters ( storagePoolId , localFsOnly ) , aQuery ) ; }
Source:
public static void getRoleActionGroupsByRoleId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid roleId ) { 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.ActionGroup > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ActionGroup > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetRoleActionGroupsByRoleId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( roleId ) , aQuery ) ; }

Target:
public static void getGlusterHook ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hookId , boolean includeServerHooks ) { 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.GetGlusterHookById , new org.ovirt.engine.core.common.queries.gluster.GlusterHookQueryParameters ( hookId , includeServerHooks ) , aQuery ) ; }
Source:
protected void executeCommand ( ) { java.util.List < org.ovirt.engine.core.compat.Guid > failedGuids = getFailedVolumeIds ( ) ; if ( failedGuids.isEmpty ( ) ) { log.info ( "Requested images were successfully removed" ) ; org.ovirt.engine.core.bll.DestroyImageCheckCommand.setSucceeded ( true ) ; persistCommand ( org.ovirt.engine.core.bll.DestroyImageCheckCommand.getParameters ( ) . getParentCommand ( ) ) ; } else { log.error ( "The following images were not removed: {}" , failedGuids ) ; } }

Target:
protected void executeCommand ( ) { org.ovirt.engine.core.bll.DestroyImageCheckCommand.getParameters ( ) . setEntityInfo ( new org.ovirt.engine.core.common.asynctasks.EntityInfo ( org.ovirt.engine.core.common.VdcObjectType.Disk , org.ovirt.engine.core.bll.DestroyImageCheckCommand.getParameters ( ) . getImageGroupId ( ) ) ) ; java.util.List < org.ovirt.engine.core.compat.Guid > failedGuids = getFailedVolumeIds ( ) ; if ( failedGuids.isEmpty ( ) ) { log.info ( "Requested images were successfully removed" ) ; org.ovirt.engine.core.bll.DestroyImageCheckCommand.setSucceeded ( true ) ; persistCommand ( org.ovirt.engine.core.bll.DestroyImageCheckCommand.getParameters ( ) . getParentCommand ( ) ) ; } else { log.error ( "The following images were not removed: {}" , failedGuids ) ; } }
Source:
private void refreshTooltip ( ) { if ( ( ! ( isAttached ( ) ) ) || ( ! ( isVisible ( ) ) ) ) { return ; } if ( org.ovirt.engine.ui.common.utils.ElementUtils.detectOverflowUsingScrollWidth ( label.getElement ( ) ) ) { tooltip.setText ( getText ( ) ) ; } else { tooltip.setText ( null ) ; } tooltip.reconfigure ( ) ; }

Target:
private void refreshTooltip ( ) { if ( ( ! ( isAttached ( ) ) ) || ( ! ( isVisible ( ) ) ) ) { return ; } if ( org.ovirt.engine.ui.common.utils.ElementUtils.detectHorizontalOverflow ( label.getElement ( ) ) ) { tooltip.setText ( getText ( ) ) ; } else { tooltip.setText ( null ) ; } tooltip.reconfigure ( ) ; }
Source:
public com.google.gwt.safehtml.shared.SafeHtml getValue ( org.ovirt.engine.core.common.businessentities.network.NetworkView networkView ) { java.util.List < com.google.gwt.safehtml.shared.SafeHtml > images = new java.util.LinkedList < > ( ) ; if ( networkView.isVmNetwork ( ) ) { images.add ( vmImage ) ; } else { images.add ( emptyImage ) ; } return org.ovirt.engine.ui.webadmin.widget.table.column.NetworkRoleColumnHelper.getValue ( images ) ; }

Target:
public com.google.gwt.safehtml.shared.SafeHtml getValue ( org.ovirt.engine.core.common.businessentities.network.NetworkView networkView ) { java.util.List < com.google.gwt.safehtml.shared.SafeHtml > images = new java.util.LinkedList < > ( ) ; if ( networkView.isVmNetwork ( ) ) { images.add ( vmImage ) ; } else { images.add ( emptyImage ) ; } return org.ovirt.engine.ui.webadmin.widget.table.column.MultiImageColumnHelper.getValue ( images ) ; }
Source:
public void testValidRemovedBondsWhenReferencedInterfaceBondViaInexistingId ( ) throws java.lang.Exception { org.ovirt.engine.core.compat.Guid idOfInexistingInterface = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidator validator = new org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidatorTest.HostSetupNetworksValidatorBuilder ( ) . setParams ( new org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidatorTest.ParametersBuilder ( ) . addRemovedBonds ( idOfInexistingInterface ) ) . build ( ) ; org.ovirt.engine.core.common.errors.EngineMessage engineMessage = org.ovirt.engine.core.common.errors.EngineMessage.NETWORK_BOND_RECORD_DOES_NOT_EXISTS ; org.junit.Assert.assertThat ( validator.validRemovedBonds ( java.util.Collections.< org.ovirt.engine.core.common.businessentities.network.NetworkAttachment > emptyList ( ) ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( engineMessage , org.ovirt.engine.core.utils.ReplacementUtils.getListVariableAssignmentString ( engineMessage , java.util.Collections.singletonList ( idOfInexistingInterface ) ) ) ) ; }

Target:
public void testValidRemovedBondsWhenReferencedInterfaceBondViaInexistingId ( ) throws java.lang.Exception { org.ovirt.engine.core.compat.Guid idOfInexistingInterface = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidator validator = new org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidatorTest.HostSetupNetworksValidatorBuilder ( ) . setParams ( new org.ovirt.engine.core.bll.network.host.HostSetupNetworksValidatorTest.ParametersBuilder ( ) . addRemovedBonds ( idOfInexistingInterface ) ) . build ( ) ; org.ovirt.engine.core.common.errors.EngineMessage engineMessage = org.ovirt.engine.core.common.errors.EngineMessage.NETWORK_BOND_RECORDS_DOES_NOT_EXISTS ; org.junit.Assert.assertThat ( validator.validRemovedBonds ( java.util.Collections.< org.ovirt.engine.core.common.businessentities.network.NetworkAttachment > emptyList ( ) ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( engineMessage , org.ovirt.engine.core.utils.ReplacementUtils.getListVariableAssignmentString ( engineMessage , java.util.Collections.singletonList ( idOfInexistingInterface ) ) ) ) ; }
Source:
protected boolean canDoAction ( ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity volume = getGlusterVolume ( ) ; if ( ! ( super . canDoAction ( ) ) ) { return false ; } if ( ( ! ( org.ovirt.engine.core.bll.gluster.tasks.GlusterTaskUtils.isTaskOfType ( volume , GlusterTaskType.REMOVE_BRICK ) ) ) || ( ! ( org.ovirt.engine.core.bll.gluster.tasks.GlusterTaskUtils.isTaskStatus ( volume , JobExecutionStatus.FINISHED ) ) ) ) { return failCanDoAction ( VdcBllMessages.ACTION_TYPE_FAILED_GLUSTER_VOLUME_REMOVE_BRICKS_NOT_FINISHED ) ; } return true ; }

Target:
protected boolean canDoAction ( ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity volume = getGlusterVolume ( ) ; if ( ! ( super . canDoAction ( ) ) ) { return false ; } if ( getParameters ( ) . getBricks ( ) . isEmpty ( ) ) { return failCanDoAction ( VdcBllMessages.ACTION_TYPE_FAILED_BRICKS_REQUIRED ) ; } if ( ( ! ( org.ovirt.engine.core.bll.gluster.tasks.GlusterTaskUtils.isTaskOfType ( volume , GlusterTaskType.REMOVE_BRICK ) ) ) || ( ! ( org.ovirt.engine.core.bll.gluster.tasks.GlusterTaskUtils.isTaskStatus ( volume , JobExecutionStatus.FINISHED ) ) ) ) { return failCanDoAction ( VdcBllMessages.ACTION_TYPE_FAILED_GLUSTER_VOLUME_REMOVE_BRICKS_NOT_FINISHED ) ; } return true ; }
Source:
protected void localize ( org.ovirt.engine.ui.webadmin.ApplicationConstants constants ) { assignLabel.setText ( constants.networkPopupAssignLabel ( ) ) ; nameEditor.setLabel ( constants.nameLabel ( ) ) ; descriptionEditor.setLabel ( constants.descriptionLabel ( ) ) ; isVmNetworkEditor.setLabel ( constants.vmNetworkLabel ( ) ) ; vlanTagging.setLabel ( constants.enableVlanTagLabel ( ) ) ; hasMtuEditor.setLabel ( constants.overrideMtuLabel ( ) ) ; }

Target:
protected void localize ( org.ovirt.engine.ui.webadmin.ApplicationConstants constants ) { dataCenterEditor.setLabel ( constants.networkPopupDataCenterLabel ( ) ) ; assignLabel.setText ( constants.networkPopupAssignLabel ( ) ) ; nameEditor.setLabel ( constants.nameLabel ( ) ) ; descriptionEditor.setLabel ( constants.descriptionLabel ( ) ) ; isVmNetworkEditor.setLabel ( constants.vmNetworkLabel ( ) ) ; vlanTagging.setLabel ( constants.enableVlanTagLabel ( ) ) ; hasMtuEditor.setLabel ( constants.overrideMtuLabel ( ) ) ; }
Source:
public void testIsNetworkInSyncWhenStaticBootProtocolAddressDifferent ( ) throws java.lang.Exception { initIpConfigurationBootProtocolAddress ( org.ovirt.engine.core.utils.NetworkInSyncWithVdsNetworkInterfaceTest.BOOT_PROTOCOL , false ) ; iface.setIpv4BootProtocol ( org.ovirt.engine.core.common.businessentities.network.NetworkBootProtocol.forValue ( ( ( ( org.ovirt.engine.core.utils.NetworkInSyncWithVdsNetworkInterfaceTest.BOOT_PROTOCOL.getValue ( ) ) + 1 ) % ( org.ovirt.engine.core.common.businessentities.network.NetworkBootProtocol.values ( ) . length ) ) ) ) ; org.junit.Assert.assertThat ( createTestedInstance ( ) . isNetworkInSync ( ) , org.hamcrest.CoreMatchers.is ( false ) ) ; }

Target:
public void testIsNetworkInSyncWhenIpv4BootProtocolNotStaticAddressDifferent ( ) throws java.lang.Exception { initIpv4ConfigurationBootProtocolAddress ( Ipv4BootProtocol.NONE , false ) ; org.junit.Assert.assertThat ( createTestedInstance ( ) . isNetworkInSync ( ) , org.hamcrest.CoreMatchers.is ( true ) ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc setVmTicket ( java.lang.String vmId , java.lang.String otp64 , java.lang.String sec , java.lang.String connectionAction , java.util.Map < java.lang.String , java.lang.String > params ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "VM.setTicket" ) . withParameter ( "vmID" , vmId ) . withParameter ( "password" , otp64 ) . withParameter ( "ttl" , sec ) . withParameter ( "existingConnAction" , connectionAction ) . withParameter ( "params" , params ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( response ) ; }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc extend_image_ticket ( java.lang.String ticketId , long timeout ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "Host.extend_image_ticket" ) . withParameter ( "uuid" , ticketId ) . withParameter ( "timeout" , timeout ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( response ) ; }
Source:
public static void getGlusterSwiftServerServices ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { 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.GetGlusterServerServicesByClusterId , new org.ovirt.engine.core.common.queries.gluster.GlusterServiceQueryParameters ( clusterId , org.ovirt.engine.core.common.businessentities.gluster.ServiceType.GLUSTER_SWIFT ) , aQuery ) ; }

Target:
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.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterServerServicesByServerId , new org.ovirt.engine.core.common.queries.gluster.GlusterServiceQueryParameters ( serverId , org.ovirt.engine.core.common.businessentities.gluster.ServiceType.GLUSTER_SWIFT ) , aQuery ) ; }
Source:
public static void getPermissionsByAdElementId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid userId ) { 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.Permissions > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Permissions > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetPermissionsByAdElementId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( userId ) , aQuery ) ; }

Target:
public static void isMTUOverrideSupported ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String version ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Boolean ) ( source ) ) . booleanValue ( ) : true ; } } ; org.ovirt.engine.core.common.queries.GetConfigurationValueParameters tempVar = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.MTUOverrideSupported ) ; tempVar.setVersion ( version ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( tempVar , aQuery ) ; }
Source:
public void testRemove ( ) { org.ovirt.engine.core.common.businessentities.EngineSession result = dao.get ( existingEngineSession.getId ( ) ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertEquals ( 1 , dao.remove ( existingEngineSession.getId ( ) ) ) ; result = dao.get ( existingEngineSession.getId ( ) ) ; org.junit.Assert.assertNull ( result ) ; org.junit.Assert.assertEquals ( 0 , dao.remove ( existingEngineSession.getId ( ) ) ) ; }

Target:
public void testRemove ( ) { org.ovirt.engine.core.common.businessentities.EngineSession result = dao.get ( existingEngineSession.getId ( ) ) ; org.junit.jupiter.api.Assertions.assertNotNull ( result ) ; org.junit.jupiter.api.Assertions.assertEquals ( 1 , dao.remove ( existingEngineSession.getId ( ) ) ) ; result = dao.get ( existingEngineSession.getId ( ) ) ; org.junit.jupiter.api.Assertions.assertNull ( result ) ; org.junit.jupiter.api.Assertions.assertEquals ( 0 , dao.remove ( existingEngineSession.getId ( ) ) ) ; }