auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
protected void writeFile ( org.ovirt.engine.core.common.businessentities.storage.DiskImage image ) { _writer.writeAttributeString ( org.ovirt.engine.core.utils.ovf.OVF_PREFIX , org.ovirt.engine.core.utils.ovf.OVF_URI , "href" , image.getImageId ( ) . toString ( ) ) ; _writer.writeAttributeString ( org.ovirt.engine.core.utils.ovf.OVF_PREFIX , org.ovirt.engine.core.utils.ovf.OVF_URI , "id" , image.getImageId ( ) . toString ( ) ) ; _writer.writeAttributeString ( org.ovirt.engine.core.utils.ovf.OVF_PREFIX , org.ovirt.engine.core.utils.ovf.OVF_URI , "size" , java.lang.String.valueOf ( image.getActualSizeInBytes ( ) ) ) ; }

Target:
protected void writeFile ( org.ovirt.engine.core.common.businessentities.storage.DiskImage image ) { _writer.writeAttributeString ( org.ovirt.engine.core.utils.ovf.OVF_PREFIX , getOvfUri ( ) , "href" , image.getImageId ( ) . toString ( ) ) ; _writer.writeAttributeString ( org.ovirt.engine.core.utils.ovf.OVF_PREFIX , getOvfUri ( ) , "id" , image.getImageId ( ) . toString ( ) ) ; _writer.writeAttributeString ( org.ovirt.engine.core.utils.ovf.OVF_PREFIX , getOvfUri ( ) , "size" , java.lang.String.valueOf ( image.getActualSizeInBytes ( ) ) ) ; }
Source:
void mockGetCaCertificate ( ) { org.ovirt.engine.core.common.queries.VdcQueryReturnValue caCertificateReturnValue = new org.ovirt.engine.core.common.queries.VdcQueryReturnValue ( ) ; caCertificateReturnValue.setSucceeded ( true ) ; caCertificateReturnValue.setReturnValue ( org.ovirt.engine.core.bll.ConfigureConsoleOptionsQueryTest.CA_CERTIFICATE ) ; org.mockito.Mockito.doReturn ( caCertificateReturnValue ) . when ( backend ) . runInternalQuery ( org.mockito.ArgumentMatchers.eq ( QueryType.GetCACertificate ) , org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.common.queries.VdcQueryParametersBase.class ) ) ; }

Target:
void mockGetCaCertificate ( ) { org.ovirt.engine.core.common.queries.VdcQueryReturnValue caCertificateReturnValue = new org.ovirt.engine.core.common.queries.VdcQueryReturnValue ( ) ; caCertificateReturnValue.setSucceeded ( true ) ; caCertificateReturnValue.setReturnValue ( org.ovirt.engine.core.bll.ConfigureConsoleOptionsQueryTest.CA_CERTIFICATE ) ; org.mockito.Mockito.doReturn ( caCertificateReturnValue ) . when ( backend ) . runInternalQuery ( org.mockito.ArgumentMatchers.eq ( QueryType.GetCACertificate ) , org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.common.queries.QueryParametersBase.class ) ) ; }
Source:
protected void executeCommand ( ) { org.ovirt.engine.core.compat.Guid secretUuid = getParameters ( ) . getLibvirtSecret ( ) . getId ( ) ; addCustomValue ( "LibvirtSecretUUID" , secretUuid.toString ( ) ) ; getReturnValue ( ) . setActionReturnValue ( secretUuid ) ; }

Target:
public org.ovirt.engine.core.common.businessentities.StorageDomain getStorageDomain ( ) { if ( ( storageDomain ) == null ) { org.ovirt.engine.core.compat.Guid providerId = getParameters ( ) . getLibvirtSecret ( ) . getProviderId ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > storageDomains = getStorageDomainDAO ( ) . getAllByConnectionId ( providerId ) ; storageDomain = storageDomains.get ( 0 ) ; } return storageDomain ; }
Source:
private void updateCanSpecify ( ) { org.ovirt.engine.core.common.businessentities.network.Network network = getNetwork ( ) . getSelectedItem ( ) ; boolean isChangeble = ( ( getIsStaticAddress ( ) ) && ( network != null ) ) && ( ! ( network.getId ( ) . equals ( Guid.Empty ) ) ) ; getAddress ( ) . setIsChangable ( isChangeble ) ; getSubnet ( ) . setIsChangable ( isChangeble ) ; getGateway ( ) . setIsChangable ( isChangeble ) ; }

Target:
private void updateCanSpecify ( ) { org.ovirt.engine.core.common.businessentities.network.Network network = getNetwork ( ) . getSelectedItem ( ) ; boolean isChangeble = ( ( getIsStaticAddress ( ) ) && ( network != null ) ) && ( ! ( network.getId ( ) . equals ( Guid.Empty ) ) ) ; getAddress ( ) . setIsChangeable ( isChangeble ) ; getSubnet ( ) . setIsChangeable ( isChangeble ) ; getGateway ( ) . setIsChangeable ( isChangeble ) ; }
Source:
public static void getDataCenterListByName ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String name ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.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 ) ; }

Target:
public static void getVmById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }
Source:
public synchronized org.ovirt.engine.api.model.RSDL getRSDL ( ) throws java.io.IOException , java.lang.ClassNotFoundException { if ( ( org.ovirt.engine.api.restapi.resource.BackendApiResource.rsdl ) == null ) { org.ovirt.engine.api.restapi.resource.BackendApiResource.rsdl = org.ovirt.engine.api.rsdl.RsdlManager.loadRsdl ( getCurrent ( ) . get ( org.ovirt.engine.core.common.mode.ApplicationMode.class ) ) ; } return org.ovirt.engine.api.restapi.resource.BackendApiResource.rsdl ; }

Target:
public synchronized org.ovirt.engine.api.model.RSDL getRSDL ( ) throws java.io.IOException , java.lang.ClassNotFoundException { if ( ( rsdl ) == null ) { rsdl = org.ovirt.engine.api.rsdl.RsdlManager.loadRsdl ( getCurrent ( ) . get ( org.ovirt.engine.core.common.mode.ApplicationMode.class ) , getUriInfo ( ) . getBaseUri ( ) . getPath ( ) ) ; } return rsdl ; }
Source:
public synchronized void CancelTask ( org.ovirt.engine.core.compat.Guid taskID ) { if ( _tasks.containsKey ( taskID ) ) { org.ovirt.engine.core.bll.AsyncTaskManager.log.infoFormat ( "Attempting to cancel task '{0}'." , taskID ) ; _tasks.get ( taskID ) . stopTask ( ) ; _tasks.get ( taskID ) . ConcreteStartPollingTask ( ) ; } }

Target:
public synchronized void CancelTask ( org.ovirt.engine.core.compat.Guid vdsmTaskId ) { if ( _tasks.containsKey ( vdsmTaskId ) ) { org.ovirt.engine.core.bll.AsyncTaskManager.log.infoFormat ( "Attempting to cancel task '{0}'." , vdsmTaskId ) ; _tasks.get ( vdsmTaskId ) . stopTask ( ) ; _tasks.get ( vdsmTaskId ) . ConcreteStartPollingTask ( ) ; } }
Source:
private boolean isEveyoneNetworUserPermission ( org.ovirt.engine.core.common.businessentities.permissions permission ) { return ( permission.getad_element_id ( ) . getValue ( ) . equals ( ApplicationGuids.everyone.asGuid ( ) ) ) && ( permission.getrole_id ( ) . getValue ( ) . equals ( ApplicationGuids.networkUser.asGuid ( ) ) ) ; }

Target:
private boolean isEveryoneVnicProfileUserPermission ( org.ovirt.engine.core.common.businessentities.permissions permission ) { return ( permission.getad_element_id ( ) . equals ( ApplicationGuids.everyone.asGuid ( ) ) ) && ( permission.getrole_id ( ) . equals ( ApplicationGuids.vnicProfileUser.asGuid ( ) ) ) ; }
Source:
public void onValueChange ( com.google.gwt.event.logical.shared.ValueChangeEvent < java.lang.Object > event ) { for ( java.lang.Object item : object.getBondingOptions ( ) . getItems ( ) ) { org.ovirt.engine.core.compat.KeyValuePairCompat < java.lang.String , org.ovirt.engine.ui.uicommonweb.models.EntityModel > pair = ( ( org.ovirt.engine.core.compat.KeyValuePairCompat < java.lang.String , org.ovirt.engine.ui.uicommonweb.models.EntityModel > ) ( item ) ) ; if ( "custom" . equals ( pair.getKey ( ) ) ) { pair.getValue ( ) . setEntity ( event.getValue ( ) ) ; } } }

Target:
public void onValueChange ( com.google.gwt.event.logical.shared.ValueChangeEvent < java.lang.String > event ) { for ( java.util.Map.Entry < java.lang.String , org.ovirt.engine.ui.uicommonweb.models.EntityModel < java.lang.String > > pair : object.getBondingOptions ( ) . getItems ( ) ) { if ( "custom" . equals ( pair.getKey ( ) ) ) { pair.getValue ( ) . setEntity ( event.getValue ( ) ) ; } } }
Source:
private void DataCenter_SelectedItemChanged ( java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { behavior.DataCenter_SelectedItemChanged ( ) ; org.ovirt.engine.core.common.businessentities.storage_pool dataCenter = ( ( org.ovirt.engine.core.common.businessentities.storage_pool ) ( getDataCenter ( ) . getSelectedItem ( ) ) ) ; if ( dataCenter != null ) { getDisksAllocationModel ( ) . setQuotaEnforcementType ( dataCenter.getQuotaEnforcementType ( ) ) ; } }

Target:
private void WatchdogModel_EntityChanged ( java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { if ( "" . equals ( getWatchdogModel ( ) . getEntity ( ) ) ) { getWatchdogAction ( ) . setIsChangable ( false ) ; getWatchdogAction ( ) . setSelectedItem ( "" ) ; } else { getWatchdogAction ( ) . setIsChangable ( true ) ; } }
Source:
private void attachDetachDisk ( org.ovirt.engine.core.common.businessentities.Disk disk , org.ovirt.engine.core.common.action.VdcActionType actionType ) { runInternalAction ( actionType , new org.ovirt.engine.core.common.action.AttachDetachVmDiskParameters ( org.ovirt.engine.core.bll.CloneVmCommand.getParameters ( ) . getNewVmGuid ( ) , disk.getId ( ) , disk.getPlugged ( ) , disk.getReadOnly ( ) ) ) ; }

Target:
private void attachDetachDisk ( org.ovirt.engine.core.common.businessentities.storage.Disk disk , org.ovirt.engine.core.common.action.VdcActionType actionType ) { runInternalAction ( actionType , new org.ovirt.engine.core.common.action.AttachDetachVmDiskParameters ( org.ovirt.engine.core.bll.CloneVmCommand.getParameters ( ) . getNewVmGuid ( ) , disk.getId ( ) , disk.getPlugged ( ) , disk.getReadOnly ( ) ) ) ; }
Source:
public final void onBootstrap ( ) { java.util.logging.Logger rootLogger = java.util.logging.Logger.getLogger ( "" ) ; initLocalStorageLogHandler ( rootLogger ) ; initUncaughtExceptionHandler ( rootLogger ) ; com.google.gwt.core.client.Scheduler.get ( ) . scheduleDeferred ( new com.google.gwt.core.client.Scheduler.ScheduledCommand ( ) { @ java.lang.Override public void execute ( ) { performBootstrap ( ) ; } } ) ; }

Target:
public final void onBootstrap ( ) { java.util.logging.Logger rootLogger = java.util.logging.Logger.getLogger ( "" ) ; initLocalStorageLogHandler ( rootLogger ) ; java.util.logging.Logger remoteLogger = java.util.logging.Logger.getLogger ( "remote" ) ; remoteLogger.addHandler ( new com.google.gwt.logging.client.SimpleRemoteLogHandler ( ) ) ; initUncaughtExceptionHandler ( rootLogger , remoteLogger ) ; com.google.gwt.core.client.Scheduler.get ( ) . scheduleDeferred ( new com.google.gwt.core.client.Scheduler.ScheduledCommand ( ) { @ java.lang.Override public void execute ( ) { performBootstrap ( ) ; } } ) ; }
Source:
public void validateSlaveHasNoLabelsHasNoOldNorNewLabelsValid ( ) { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface slave = createNic ( "slave" ) ; 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.common.action.HostSetupNetworksParameters ( host.getId ( ) ) ) . setExistingInterfaces ( java.util.Arrays.asList ( slave ) ) . setHost ( host ) . build ( ) ; org.junit.Assert.assertThat ( validator.validateSlaveHasNoLabels ( slave.getName ( ) ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }

Target:
public void validateSlaveHasNoLabelsHasNoOldNorNewLabelsValid ( ) { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface slave = createNic ( "slave" ) ; 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.common.action.HostSetupNetworksParameters ( host.getId ( ) ) ) . setExistingInterfaces ( java.util.Collections.singletonList ( slave ) ) . setHost ( host ) . build ( ) ; org.junit.Assert.assertThat ( validator.validateSlaveHasNoLabels ( slave.getName ( ) ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }
Source:
public void getGlusterHooks ( 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.GlusterHookEntity > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterHooks , new org.ovirt.engine.core.common.queries.gluster.GlusterParameters ( clusterId ) , aQuery ) ; }

Target:
public void getGlusterHooks ( org.ovirt.engine.ui.frontend.AsyncQuery < java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity > > aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.ListConverter < > ( ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterHooks , new org.ovirt.engine.core.common.queries.gluster.GlusterParameters ( clusterId ) , aQuery ) ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult ipConfiguredForStaticBootProtocol ( ) { org.ovirt.engine.core.common.businessentities.network.IpConfiguration ipConfiguration = attachment.getIpConfiguration ( ) ; return org.ovirt.engine.core.bll.ValidationResult.failWith ( VdcBllMessages.NETWORK_ADDR_MANDATORY_IN_STATIC_IP ) . unless ( ( ( ( ipConfiguration == null ) || ( ( ipConfiguration.getBootProtocol ( ) ) != ( org.ovirt.engine.core.common.businessentities.network.NetworkBootProtocol.STATIC_IP ) ) ) || ( ( ( ipConfiguration.getAddress ( ) ) != null ) && ( ( ipConfiguration.getNetmask ( ) ) != null ) ) ) ) ; }

Target:
private boolean unsetAddress ( org.ovirt.engine.core.common.businessentities.network.IpConfiguration ipConfiguration ) { return ( ( ! ( ipConfiguration.hasPrimaryAddressSet ( ) ) ) || ( org.apache.commons.lang.StringUtils.isEmpty ( ipConfiguration.getPrimaryAddress ( ) . getAddress ( ) ) ) ) || ( org.apache.commons.lang.StringUtils.isEmpty ( ipConfiguration.getPrimaryAddress ( ) . getNetmask ( ) ) ) ; }
Source:
protected void executeCommand ( ) { org.ovirt.engine.core.common.action.VdcReturnValueBase result = runInternalActionWithTasksContext ( VdcActionType.UpdateVmVersion , buildUpdateVmVersionParameters ( ) ) ; if ( ( ! ( result.getSucceeded ( ) ) ) && ( ! ( result.isValid ( ) ) ) ) { log.warn ( "Couldn't update VM '{}' ({}) version from it's template, continue with restoring stateless snapshot." , org.ovirt.engine.core.bll.RestoreStatelessVmCommand.getVm ( ) . getName ( ) , org.ovirt.engine.core.bll.RestoreStatelessVmCommand.getVmId ( ) ) ; org.ovirt.engine.core.bll.RestoreStatelessVmCommand.setSucceeded ( restoreInitialState ( ) ) ; } else { setSucceeded ( result.getSucceeded ( ) ) ; } }

Target:
protected void executeCommand ( ) { org.ovirt.engine.core.common.action.VdcReturnValueBase result = runInternalActionWithTasksContext ( ActionType.UpdateVmVersion , buildUpdateVmVersionParameters ( ) ) ; if ( ( ! ( result.getSucceeded ( ) ) ) && ( ! ( result.isValid ( ) ) ) ) { log.warn ( "Couldn't update VM '{}' ({}) version from it's template, continue with restoring stateless snapshot." , org.ovirt.engine.core.bll.RestoreStatelessVmCommand.getVm ( ) . getName ( ) , org.ovirt.engine.core.bll.RestoreStatelessVmCommand.getVmId ( ) ) ; org.ovirt.engine.core.bll.RestoreStatelessVmCommand.setSucceeded ( restoreInitialState ( ) ) ; } else { setSucceeded ( result.getSucceeded ( ) ) ; } }
Source:
private void prepare3 ( ) { org.ovirt.engine.ui.uicompat.PreparingEnlistment enlistment = ( ( org.ovirt.engine.ui.uicompat.PreparingEnlistment ) ( context.enlistment ) ) ; org.ovirt.engine.ui.uicommonweb.models.hosts.EnlistmentContext enlistmentContext = ( ( org.ovirt.engine.ui.uicommonweb.models.hosts.EnlistmentContext ) ( enlistment.getContext ( ) ) ) ; org.ovirt.engine.core.common.action.VdcReturnValueBase returnValue = context.addVDSGroupReturnValue ; context.enlistment = null ; if ( ( returnValue != null ) && ( returnValue.getSucceeded ( ) ) ) { enlistmentContext.setClusterId ( ( ( org.ovirt.engine.core.compat.Guid ) ( returnValue.getActionReturnValue ( ) ) ) ) ; context.enlistment = null ; enlistment.prepared ( ) ; } else { enlistment.forceRollback ( ) ; } }

Target:
private void prepare3 ( ) { org.ovirt.engine.ui.uicompat.PreparingEnlistment enlistment = ( ( org.ovirt.engine.ui.uicompat.PreparingEnlistment ) ( context.enlistment ) ) ; org.ovirt.engine.ui.uicommonweb.models.hosts.EnlistmentContext enlistmentContext = ( ( org.ovirt.engine.ui.uicommonweb.models.hosts.EnlistmentContext ) ( enlistment.getContext ( ) ) ) ; org.ovirt.engine.core.common.action.VdcReturnValueBase returnValue = context.addClusterReturnValue ; context.enlistment = null ; if ( ( returnValue != null ) && ( returnValue.getSucceeded ( ) ) ) { enlistmentContext.setClusterId ( ( ( org.ovirt.engine.core.compat.Guid ) ( returnValue.getActionReturnValue ( ) ) ) ) ; context.enlistment = null ; enlistment.prepared ( ) ; } else { enlistment.forceRollback ( ) ; } }
Source:
public org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity getById ( org.ovirt.engine.core.compat.Guid id ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity glusterHook = getCallsHandler ( ) . executeRead ( "GetGlusterHookById" , org.ovirt.engine.core.dao.gluster.GlusterHooksDaoDbFacadeImpl.glusterHookRowMapper , createGlusterHookIdParams ( id ) ) ; if ( glusterHook != null ) { getGlusterServerHook ( glusterHook , null ) ; } return glusterHook ; }

Target:
public void save ( org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity glusterHook ) { getCallsHandler ( ) . executeModification ( "InsertGlusterHook" , createFullParametersMapper ( glusterHook ) ) ; if ( ( glusterHook.getServerHooks ( ) ) != null ) { for ( org.ovirt.engine.core.common.businessentities.gluster.GlusterServerHook serverHook : glusterHook.getServerHooks ( ) ) { saveGlusterServerHook ( serverHook ) ; } } }
Source:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; dao = dbFacade.getVnicProfileDao ( ) ; vnicProfile = new org.ovirt.engine.core.common.businessentities.network.VnicProfile ( ) ; vnicProfile.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; vnicProfile.setName ( "new_profile" ) ; vnicProfile.setNetworkId ( FixturesTool.NETWORK_ENGINE ) ; vnicProfile.setNetworkQosId ( FixturesTool.NETWORK_QOS ) ; vnicProfile.setPortMirroring ( false ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; dao = dbFacade.getVnicProfileDao ( ) ; vnicProfile = new org.ovirt.engine.core.common.businessentities.network.VnicProfile ( ) ; vnicProfile.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; vnicProfile.setName ( "new_profile" ) ; vnicProfile.setNetworkId ( FixturesTool.NETWORK_ENGINE ) ; vnicProfile.setNetworkQosId ( FixturesTool.NETWORK_QOS ) ; vnicProfile.setPortMirroring ( false ) ; vnicProfile.setPassthrough ( false ) ; }
Source:
public javax.ws.rs.core.Response add ( org.ovirt.engine.api.model.Network network ) { validateParameters ( network , getRequiredAddFields ( ) ) ; org.ovirt.engine.api.model.Network entity = map ( network ) ; org.ovirt.engine.core.common.action.AddNetworkStoragePoolParameters params = getActionParameters ( network , entity ) ; return performCreation ( addAction , params , new org.ovirt.engine.api.restapi.resource.DataCenterNetworkIdResolver ( network.getName ( ) , params.getStoragePoolId ( ) . toString ( ) ) ) ; }

Target:
public javax.ws.rs.core.Response add ( org.ovirt.engine.api.model.Network network ) { validateParameters ( network , getRequiredAddFields ( ) ) ; validateEnums ( org.ovirt.engine.api.model.Network.class , network ) ; org.ovirt.engine.api.model.Network entity = map ( network ) ; org.ovirt.engine.core.common.action.AddNetworkStoragePoolParameters params = getActionParameters ( network , entity ) ; return performCreation ( addAction , params , new org.ovirt.engine.api.restapi.resource.DataCenterNetworkIdResolver ( network.getName ( ) , params.getStoragePoolId ( ) . toString ( ) ) ) ; }
Source:
private void AfterSuspendTreatment ( org.ovirt.engine.core.common.businessentities.VmDynamic vm ) { org.ovirt.engine.core.common.AuditLogType type = ( ( vm.getExitStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VmExitStatus.Normal ) ) ? org.ovirt.engine.core.common.AuditLogType.USER_SUSPEND_VM_OK : org.ovirt.engine.core.common.AuditLogType.USER_FAILED_SUSPEND_VM ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase logable = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( _vds.getId ( ) , vm.getId ( ) ) ; auditLog ( logable , type ) ; org.ovirt.engine.core.vdsbroker.ResourceManager.getInstance ( ) . RemoveAsyncRunningVm ( vm.getId ( ) ) ; }

Target:
private void afterSuspendTreatment ( org.ovirt.engine.core.common.businessentities.VmDynamic vm ) { org.ovirt.engine.core.common.AuditLogType type = ( ( vm.getExitStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VmExitStatus.Normal ) ) ? org.ovirt.engine.core.common.AuditLogType.USER_SUSPEND_VM_OK : org.ovirt.engine.core.common.AuditLogType.USER_FAILED_SUSPEND_VM ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase logable = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( _vds.getId ( ) , vm.getId ( ) ) ; auditLog ( logable , type ) ; org.ovirt.engine.core.vdsbroker.ResourceManager.getInstance ( ) . RemoveAsyncRunningVm ( vm.getId ( ) ) ; }
Source:
private org.ovirt.engine.core.dao.network.VmNetworkInterfaceDao getVmNetworkInterfaceDao ( ) { return org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmNetworkInterfaceDao ( ) ; }

Target:
private boolean addMacToMap ( java.util.Map < java.lang.String , java.lang.Integer > macMap , java.lang.String mac ) { if ( ! ( macMap.containsKey ( mac ) ) ) { macMap.put ( mac , 1 ) ; return true ; } else if ( allowDuplicate ( ) ) { incrementMacInMap ( macMap , mac ) ; return true ; } return false ; }
Source:
public java.util.List < org.ovirt.engine.core.common.businessentities.RepoFileMetaData > getRepoListForStorageDomain ( org.ovirt.engine.core.compat.Guid storageDomainId , org.ovirt.engine.core.common.businessentities.ImageFileType fileType ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "storage_domain_id" , storageDomainId ) ; if ( ( fileType == null ) || ( fileType == ( org.ovirt.engine.core.common.businessentities.ImageFileType.All ) ) ) { parameterSource.addValue ( "file_type" , null ) ; } else { parameterSource.addValue ( "file_type" , fileType.getValue ( ) ) ; } return getCallsHandler ( ) . executeReadList ( "GetRepo_files_by_storage_domain" , org.ovirt.engine.core.dao.RepoFileMetaDataDAODbFacadeImpl.RepoFileMetaDataMapper.instance , parameterSource ) ; }

Target:
public java.util.List < org.ovirt.engine.core.common.businessentities.RepoImage > getRepoListForStorageDomain ( org.ovirt.engine.core.compat.Guid storageDomainId , org.ovirt.engine.core.common.businessentities.ImageFileType fileType ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "storage_domain_id" , storageDomainId ) ; if ( ( fileType == null ) || ( fileType == ( org.ovirt.engine.core.common.businessentities.ImageFileType.All ) ) ) { parameterSource.addValue ( "file_type" , null ) ; } else { parameterSource.addValue ( "file_type" , fileType.getValue ( ) ) ; } return getCallsHandler ( ) . executeReadList ( "GetRepo_files_by_storage_domain" , org.ovirt.engine.core.dao.RepoFileMetaDataDAODbFacadeImpl.RepoImageMapper.instance , parameterSource ) ; }
Source:
public static < TSource > java.util.ArrayList < TSource > ToList ( java.lang.Iterable < TSource > source ) { java.util.ArrayList < TSource > list = new java.util.ArrayList < TSource > ( ) ; for ( TSource item : source ) { list.add ( item ) ; } return list ; }

Target:
public static < TSource > java.util.ArrayList < TSource > toList ( java.lang.Iterable < TSource > source ) { java.util.ArrayList < TSource > list = new java.util.ArrayList < TSource > ( ) ; for ( TSource item : source ) { list.add ( item ) ; } return list ; }
Source:
public org.ovirt.engine.core.common.AuditLogType getAuditLogTypeValue ( ) { if ( ( org.ovirt.engine.core.bll.storage.disk.image.UploadImageStatusCommand.getParameters ( ) . getAuditLogType ( ) ) != null ) { addCustomValue ( "DiskId" , org.ovirt.engine.core.bll.storage.disk.image.UploadImageStatusCommand.getParameters ( ) . getDiskId ( ) . toString ( ) ) ; return org.ovirt.engine.core.bll.storage.disk.image.UploadImageStatusCommand.getParameters ( ) . getAuditLogType ( ) ; } else { return super . getAuditLogTypeValue ( ) ; } }

Target:
public org.ovirt.engine.core.common.AuditLogType getAuditLogTypeValue ( ) { if ( ( org.ovirt.engine.core.bll.storage.disk.image.TransferImageStatusCommand.getParameters ( ) . getAuditLogType ( ) ) != null ) { addCustomValue ( "DiskId" , org.ovirt.engine.core.bll.storage.disk.image.TransferImageStatusCommand.getParameters ( ) . getDiskId ( ) . toString ( ) ) ; return org.ovirt.engine.core.bll.storage.disk.image.TransferImageStatusCommand.getParameters ( ) . getAuditLogType ( ) ; } else { return super . getAuditLogTypeValue ( ) ; } }
Source:
protected org.ovirt.engine.core.common.businessentities.storage_domains createStorageDomain ( int availableSpace ) { org.ovirt.engine.core.common.businessentities.storage_domains sd = new org.ovirt.engine.core.common.businessentities.storage_domains ( ) ; sd.setstorage_domain_type ( StorageDomainType.Master ) ; sd.setstatus ( StorageDomainStatus.Active ) ; sd.setavailable_disk_size ( availableSpace ) ; sd.setused_disk_size ( org.ovirt.engine.core.bll.AddVmCommandTest.USED_SPACE_GB ) ; sd.setId ( org.ovirt.engine.core.bll.AddVmCommandTest.STORAGE_DOMAIN_ID ) ; return sd ; }

Target:
protected org.ovirt.engine.core.common.businessentities.StorageDomain createStorageDomain ( int availableSpace ) { org.ovirt.engine.core.common.businessentities.StorageDomain sd = new org.ovirt.engine.core.common.businessentities.StorageDomain ( ) ; sd.setStorageDomainType ( StorageDomainType.Master ) ; sd.setStatus ( StorageDomainStatus.Active ) ; sd.setAvailableDiskSize ( availableSpace ) ; sd.setUsedDiskSize ( org.ovirt.engine.core.bll.AddVmCommandTest.USED_SPACE_GB ) ; sd.setId ( org.ovirt.engine.core.bll.AddVmCommandTest.STORAGE_DOMAIN_ID ) ; return sd ; }
Source:
public static void isTemplateNameUnique ( 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 ) { return source != null ? ! ( ( ( java.lang.Boolean ) ( source ) ) . booleanValue ( ) ) : false ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.IsVmTemlateWithSameNameExist , new org.ovirt.engine.core.common.queries.NameQueryParameters ( name ) , aQuery ) ; }

Target:
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.getInstance ( ) . runQuery ( VdcQueryType.GetServerSSHPublicKey , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }
Source:
public void getHostFingerprint ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String hostAddress ) { 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 ( ) . runQuery ( VdcQueryType.GetServerSSHKeyFingerprint , new org.ovirt.engine.core.common.queries.ServerParameters ( hostAddress ) , aQuery ) ; }

Target:
public 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.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterVolumeBricksByServerId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( serverId ) , aQuery ) ; }
Source:
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 ) ; }

Target:
public void getGlusterVolumeSnapshotsForVolume ( org.ovirt.engine.ui.frontend.AsyncQuery < java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeSnapshotEntity > > aQuery , org.ovirt.engine.core.compat.Guid volumeId ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.ListConverter < > ( ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterVolumeSnapshotsByVolumeId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( volumeId ) , aQuery ) ; }
Source:
public void onFailed ( ) { updateEntityPhase ( ImageTransferPhase.FINISHED_FAILURE ) ; log.debug ( "Removing ImageUpload id {}" , org.ovirt.engine.core.bll.storage.disk.image.UploadImageCommand.getCommandId ( ) ) ; getImageTransferDao ( ) . remove ( org.ovirt.engine.core.bll.storage.disk.image.UploadImageCommand.getCommandId ( ) ) ; org.ovirt.engine.core.bll.storage.disk.image.UploadImageCommand.endWithFailure ( ) ; log.error ( "Failed to upload (command id '{}')" , getUploadDescription ( ) , org.ovirt.engine.core.bll.storage.disk.image.UploadImageCommand.getCommandId ( ) ) ; }

Target:
public void onFailed ( ) { updateEntityPhase ( ImageTransferPhase.FINISHED_FAILURE ) ; log.debug ( "Removing ImageUpload id {}" , org.ovirt.engine.core.bll.storage.disk.image.UploadImageCommand.getCommandId ( ) ) ; imageTransferDao.remove ( org.ovirt.engine.core.bll.storage.disk.image.UploadImageCommand.getCommandId ( ) ) ; org.ovirt.engine.core.bll.storage.disk.image.UploadImageCommand.endWithFailure ( ) ; log.error ( "Failed to upload (command id '{}')" , getUploadDescription ( ) , org.ovirt.engine.core.bll.storage.disk.image.UploadImageCommand.getCommandId ( ) ) ; }
Source:
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 ) ; }

Target:
public static void getDataCenterById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.core.common.queries.IdQueryParameters params = new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) ; params.setRefresh ( false ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStoragePoolById , params , aQuery ) ; }
Source:
public javax.ws.rs.core.Response requestVm ( org.ovirt.optimizer.service.facts.RunningVm request , @ javax.ws.rs.PathParam ( value = "cluster" ) java.lang.String cluster ) { response.getOutputHeaders ( ) . putSingle ( "Access-Control-Allow-Origin" , "*" ) ; response.getOutputHeaders ( ) . putSingle ( "Access-Control-Allow-Methods" , "POST" ) ; response.getOutputHeaders ( ) . putSingle ( "Access-Control-Allow-Headers" , "Content-Type" ) ; optimizer.computeVmStart ( cluster , request.getId ( ) ) ; return javax.ws.rs.core.Response.ok ( ) . build ( ) ; }

Target:
public javax.ws.rs.core.Response CancelVm ( org.ovirt.optimizer.service.facts.RunningVm request , @ javax.ws.rs.PathParam ( value = "cluster" ) java.lang.String cluster ) { optimizer.cancelVmStart ( cluster , request.getId ( ) ) ; return javax.ws.rs.core.Response.ok ( ) . header ( "Access-Control-Allow-Origin" , "*" ) . header ( "Access-Control-Allow-Methods" , "POST" ) . header ( "Access-Control-Allow-Headers" , "Content-Type" ) . build ( ) ; }
Source:
private java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > getDisksList ( org.ovirt.engine.core.compat.Guid spId ) { java.util.List disksList = new java.util.ArrayList ( 1 ) ; org.ovirt.engine.core.common.businessentities.DiskImage disk = new org.ovirt.engine.core.common.businessentities.DiskImage ( ) ; disk.setStorageIds ( new java.util.ArrayList ( java.util.Collections.singletonList ( spId ) ) ) ; disksList.add ( disk ) ; return disksList ; }

Target:
private java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > getDisksList ( org.ovirt.engine.core.compat.Guid spId ) { java.util.List disksList = new java.util.ArrayList ( 1 ) ; org.ovirt.engine.core.common.businessentities.storage.DiskImage disk = new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ; disk.setStorageIds ( new java.util.ArrayList ( java.util.Collections.singletonList ( spId ) ) ) ; disksList.add ( disk ) ; return disksList ; }
Source:
public void canDoActionPreallocatedSpaceCheckFailsSize ( ) { final int availableSize = 3 ; final int usedSize = 7 ; org.ovirt.engine.core.compat.Guid sdid = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; initializeCommand ( sdid , VolumeType.Preallocated ) ; mockVm ( ) ; mockStorageDomain ( sdid , availableSize , usedSize ) ; mockStoragePoolIsoMap ( ) ; org.junit.Assert.assertFalse ( command.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( VdcBllMessages.ACTION_TYPE_FAILED_DISK_SPACE_LOW_ON_TARGET_STORAGE_DOMAIN.toString ( ) ) ) ; }

Target:
public void canDoActionSpaceValidationSucceeds ( ) { org.ovirt.engine.core.compat.Guid storageId = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; initializeCommand ( storageId , VolumeType.Preallocated ) ; mockVm ( ) ; mockStorageDomain ( storageId ) ; mockStoragePoolIsoMap ( ) ; org.mockito.Mockito.doReturn ( org.ovirt.engine.core.bll.AddDiskToVmCommandTest.mockStorageDomainValidatorWithSpace ( ) ) . when ( command ) . createStorageDomainValidator ( ) ; org.junit.Assert.assertTrue ( command.canDoAction ( ) ) ; }
Source:
private org.ovirt.engine.api.model.Features getFeatures ( org.ovirt.engine.api.model.Version version ) { org.ovirt.engine.api.model.Features ret = new org.ovirt.engine.api.model.Features ( ) ; if ( org.ovirt.engine.api.restapi.utils.VersionUtils.greaterOrEqual ( version , org.ovirt.engine.api.restapi.resource.BackendCapabilitiesResource.VERSION_3_0 ) ) { ret.setTransparentHugepages ( new org.ovirt.engine.api.model.TransparentHugePages ( ) ) ; } return ret ; }

Target:
public java.lang.String generateId ( org.ovirt.engine.api.model.Version v ) { org.ovirt.engine.core.compat.NGuid guid = new org.ovirt.engine.core.compat.NGuid ( ( ( ( v.getMajor ( ) ) + "." ) + ( v.getMinor ( ) ) ) . getBytes ( ) , true ) ; return guid != null ? guid.toString ( ) : null ; }
Source:
protected org.ovirt.engine.core.common.businessentities.Permissions getEntity ( int index ) { org.ovirt.engine.core.common.businessentities.Permissions permission = new org.ovirt.engine.core.common.businessentities.Permissions ( ) ; permission.setId ( GUIDS [ index ] ) ; permission.setad_element_id ( GUIDS [ 1 ] ) ; permission.setObjectId ( GUIDS [ 2 ] ) ; permission.setObjectType ( VdcObjectType.StoragePool ) ; permission.setrole_id ( GUIDS [ 3 ] ) ; return permission ; }

Target:
protected org.ovirt.engine.core.common.businessentities.Permissions getEntity ( int index ) { org.ovirt.engine.core.common.businessentities.Permissions permission = new org.ovirt.engine.core.common.businessentities.Permissions ( ) ; permission.setId ( GUIDS [ index ] ) ; permission.setAdElementId ( GUIDS [ 1 ] ) ; permission.setObjectId ( GUIDS [ 2 ] ) ; permission.setObjectType ( VdcObjectType.StoragePool ) ; permission.setRoleId ( GUIDS [ 3 ] ) ; return permission ; }
Source:
public static void getAllProvidersByType ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.businessentities.ProviderType providerType ) { 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.Provider > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllProviders , new org.ovirt.engine.core.common.queries.GetAllProvidersParameters ( providerType ) , aQuery ) ; }

Target:
public static void getExternalProviderComputeResourceList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.businessentities.Provider provider ) { 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.ExternalComputeResource > ( ) ; } return source ; } } ; org.ovirt.engine.core.common.queries.ProviderQueryParameters params = new org.ovirt.engine.core.common.queries.ProviderQueryParameters ( ) ; params.setProvider ( provider ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetComputeResourceFromExternalProvider , params , aQuery ) ; }
Source:
public java.lang.Boolean runInTransaction ( ) { org.ovirt.engine.core.bll.Backend.getInstance ( ) . getResourceManager ( ) . RunVdsCommand ( VDSCommandType.CollectVdsNetworkData , new org.ovirt.engine.core.common.vdscommands.VdsIdAndVdsVDSCommandParametersBase ( getVds ( ) ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.Network net : getNetworks ( ) ) { org.ovirt.engine.core.bll.network.cluster.NetworkClusterHelper.setStatus ( getVdsGroupId ( ) , net ) ; } return java.lang.Boolean.TRUE ; }

Target:
public T runInTransaction ( ) { getDbFacade ( ) . getInterfaceDao ( ) . massUpdateInterfacesForVds ( getModifiedInterfaces ( ) ) ; return null ; }
Source:
public void getDataCentersByStorageDomain ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storageDomainId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStoragePoolsByStorageDomainId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( storageDomainId ) , aQuery ) ; }

Target:
public void getDataCenterMaxNameLength ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) . intValue ( ) : 1 ; } } ; getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.StoragePoolNameSizeLimit , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
private com.google.gwt.resources.client.ImageResource getStatusImage ( ) { switch ( ( ( org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkInterfaceModel ) ( item ) ) . getStatus ( ) ) { case UP : return resources.nicUp ( ) ; case DOWN : return resources.nicDown ( ) ; case NONE : return resources.questionMarkImage ( ) ; default : return resources.questionMarkImage ( ) ; } }

Target:
private com.google.gwt.resources.client.ImageResource getStatusImage ( ) { switch ( ( ( org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkInterfaceModel ) ( item ) ) . getStatus ( ) ) { case UP : return org.ovirt.engine.ui.webadmin.section.main.view.popup.host.panels.NicPanel.resources.nicUp ( ) ; case DOWN : return org.ovirt.engine.ui.webadmin.section.main.view.popup.host.panels.NicPanel.resources.nicDown ( ) ; case NONE : return org.ovirt.engine.ui.webadmin.section.main.view.popup.host.panels.NicPanel.resources.questionMarkImage ( ) ; default : return org.ovirt.engine.ui.webadmin.section.main.view.popup.host.panels.NicPanel.resources.questionMarkImage ( ) ; } }
Source:
public static void GetDataCenterMaxNameLength ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) . intValue ( ) : 1 ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.StoragePoolNameSizeLimit , org.ovirt.engine.core.common.config.Config.DefaultConfigurationVersion ) , aQuery ) ; }

Target:
public static void GetClusterServerMemoryOverCommit ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) . intValue ( ) : 0 ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.MaxVdsMemOverCommitForServers , org.ovirt.engine.core.common.config.Config.DefaultConfigurationVersion ) , aQuery ) ; }
Source:
protected boolean isBalloonEnabled ( ) { return org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . isBalloonEnabled ( ) ; }

Target:
protected boolean isBalloonEnabled ( ) { java.lang.Boolean balloonEnabled = org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . isBalloonEnabled ( ) ; return balloonEnabled != null ? balloonEnabled : osRepository.isBalloonEnabled ( org.ovirt.engine.core.bll.AddVmCommand.getParameters ( ) . getVmStaticData ( ) . getOsId ( ) , org.ovirt.engine.core.bll.AddVmCommand.getVdsGroup ( ) . getcompatibility_version ( ) ) ; }
Source:
private void dontSendTicket ( ) { final org.ovirt.engine.core.common.businessentities.VM vm = org.ovirt.engine.core.bll.SetVmTicketCommand.getVm ( ) ; final org.ovirt.engine.core.common.businessentities.aaa.DbUser user = org.ovirt.engine.core.bll.SetVmTicketCommand.getCurrentUser ( ) ; org.ovirt.engine.core.bll.SetVmTicketCommand.log.warn ( "Can't give console of virtual machine '{}' to user '{}', it has probably been taken by another user." , vm.getId ( ) , user.getId ( ) ) ; addCanDoActionMessage ( EngineMessage.ACTION_TYPE_FAILED_VM_IN_USE_BY_OTHER_USER ) ; org.ovirt.engine.core.bll.SetVmTicketCommand.setSucceeded ( false ) ; }

Target:
private void dontSendTicket ( ) { final org.ovirt.engine.core.common.businessentities.VM vm = org.ovirt.engine.core.bll.SetVmTicketCommand.getVm ( ) ; final org.ovirt.engine.core.common.businessentities.aaa.DbUser user = org.ovirt.engine.core.bll.SetVmTicketCommand.getCurrentUser ( ) ; org.ovirt.engine.core.bll.SetVmTicketCommand.log.warn ( "Can't give console of virtual machine '{}' to user '{}', it has probably been taken by another user." , vm.getId ( ) , user.getId ( ) ) ; addValidationMessage ( EngineMessage.ACTION_TYPE_FAILED_VM_IN_USE_BY_OTHER_USER ) ; org.ovirt.engine.core.bll.SetVmTicketCommand.setSucceeded ( false ) ; }
Source:
private boolean addInterfaceToProcessedList ( org.ovirt.engine.core.common.businessentities.VdsNetworkInterface iface ) { if ( ifaceNames.contains ( iface.getName ( ) ) ) { if ( isBond ( iface ) ) { addViolation ( VdcBllMessages.NETWORK_BOND_NAME_EXISTS ) ; } else { addViolation ( VdcBllMessages.NETWORK_INTERFACE_NAME_ALREADY_IN_USE ) ; } return false ; } ifaceNames.add ( iface.getName ( ) ) ; return true ; }

Target:
private boolean addInterfaceToProcessedList ( org.ovirt.engine.core.common.businessentities.VdsNetworkInterface iface ) { if ( ifaceNames.contains ( iface.getName ( ) ) ) { addViolation ( VdcBllMessages.NETWORK_INTERFACES_ALREADY_SPECIFIED , iface.getName ( ) ) ; return false ; } ifaceNames.add ( iface.getName ( ) ) ; return true ; }
Source:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; dao = dbFacade.getDbGroupDao ( ) ; newGroup = new org.ovirt.engine.core.common.businessentities.DbGroup ( ) ; newGroup.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; newGroup.setExternalId ( "0" ) ; newGroup.setDomain ( "domain" ) ; newGroup.setName ( "name" ) ; newGroup.setActive ( true ) ; newGroup.setNamespace ( "*" ) ; existingGroup = dao.get ( new org.ovirt.engine.core.compat.Guid ( "b399944a-81ab-4ec5-8266-e19ba7c3c9d1" ) ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; dao = dbFacade.getDbGroupDao ( ) ; newGroup = new org.ovirt.engine.core.common.businessentities.aaa.DbGroup ( ) ; newGroup.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; newGroup.setExternalId ( "0" ) ; newGroup.setDomain ( "domain" ) ; newGroup.setName ( "name" ) ; newGroup.setActive ( true ) ; newGroup.setNamespace ( "*" ) ; existingGroup = dao.get ( new org.ovirt.engine.core.compat.Guid ( "b399944a-81ab-4ec5-8266-e19ba7c3c9d1" ) ) ; }