auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public java.lang.String toString ( ) { java.lang.StringBuilder builder = new java.lang.StringBuilder ( 50 ) ; builder.append ( "commandId: " ) ; builder.append ( getCommandId ( ) ) ; builder.append ( ", user: " ) ; if ( ( getParametersCurrentUser ( ) ) != null ) { builder.append ( getParametersCurrentUser ( ) . getLoginName ( ) ) ; } builder.append ( ", commandType: " ) ; builder.append ( getCommandType ( ) ) ; return builder.toString ( ) ; }

Target:
public java.lang.String toString ( ) { return appendAttributes ( org.ovirt.engine.core.common.utils.ToStringBuilder.forInstance ( this ) ) . build ( ) ; }
Source:
public void getVdsNullRun ( ) { final org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase b = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; final org.ovirt.engine.core.common.businessentities.VDS vds = null ; final org.ovirt.engine.core.common.businessentities.VM vm = new org.ovirt.engine.core.common.businessentities.VM ( ) ; vm.setrun_on_vds ( null ) ; final org.ovirt.engine.core.compat.Guid vdsId = null ; b.setVds ( vds ) ; b.setVdsId ( vdsId ) ; b.setVm ( vm ) ; final org.ovirt.engine.core.common.businessentities.VDS v = b.getVds ( ) ; org.junit.Assert.assertNull ( v ) ; }

Target:
public void getVdsNullRun ( ) { final org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase b = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; final org.ovirt.engine.core.common.businessentities.VDS vds = null ; final org.ovirt.engine.core.common.businessentities.VM vm = new org.ovirt.engine.core.common.businessentities.VM ( ) ; vm.setRunOnVds ( null ) ; final org.ovirt.engine.core.compat.Guid vdsId = null ; b.setVds ( vds ) ; b.setVdsId ( vdsId ) ; b.setVm ( vm ) ; final org.ovirt.engine.core.common.businessentities.VDS v = b.getVds ( ) ; org.junit.Assert.assertNull ( v ) ; }
Source:
public void testValueCaps ( ) { java.util.List < java.lang.String > comps = java.util.Arrays.asList ( comp.getCompletion ( "FA" ) ) ; org.junit.Assert.assertTrue ( "false" , comps.contains ( "false" ) ) ; org.junit.Assert.assertTrue ( "true" , ( ! ( comps.contains ( "true" ) ) ) ) ; }

Target:
public void testValueCaps ( ) { java.util.List < java.lang.String > comps = java.util.Arrays.asList ( comp.getCompletion ( "FA" ) ) ; org.junit.jupiter.api.Assertions.assertTrue ( comps.contains ( "false" ) , "false" ) ; org.junit.jupiter.api.Assertions.assertTrue ( ( ! ( comps.contains ( "true" ) ) ) , "true" ) ; }
Source:
public void getAllAttachableDisks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.Disk > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.Disk > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetAllAttachableDisksForVmQueryParameters params = new org.ovirt.engine.core.common.queries.GetAllAttachableDisksForVmQueryParameters ( storagePoolId ) ; params.setVmId ( vmId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllAttachableDisksForVm , params , aQuery ) ; }

Target:
public void getAllAttachableDisks ( org.ovirt.engine.ui.frontend.AsyncQuery < java.util.List < org.ovirt.engine.core.common.businessentities.storage.Disk > > aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.ListConverter < > ( ) ; org.ovirt.engine.core.common.queries.GetAllAttachableDisksForVmQueryParameters params = new org.ovirt.engine.core.common.queries.GetAllAttachableDisksForVmQueryParameters ( storagePoolId ) ; params.setVmId ( vmId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllAttachableDisksForVm , params , aQuery ) ; }
Source:
public void numaSupport ( ) { if ( ( getModel ( ) . getWindow ( ) ) != null ) { return ; } org.ovirt.engine.core.common.businessentities.VM vm = getVmWithNuma ( ) ; org.ovirt.engine.ui.uicommonweb.models.hosts.numa.NumaSupportModel model = new org.ovirt.engine.ui.uicommonweb.models.hosts.numa.VmNumaSupportModel ( ( ( java.util.List < org.ovirt.engine.core.common.businessentities.VDS > ) ( getModel ( ) . getDefaultHost ( ) . getItems ( ) ) ) , getModel ( ) . getDefaultHost ( ) . getSelectedItem ( ) , getModel ( ) , vm ) ; getModel ( ) . setWindow ( model ) ; }

Target:
public void numaSupport ( ) { if ( ( getModel ( ) . getWindow ( ) ) != null ) { return ; } org.ovirt.engine.core.common.businessentities.VM vm = getVmWithNuma ( ) ; final org.ovirt.engine.core.common.businessentities.VDS host = getModel ( ) . getDefaultHost ( ) . getSelectedItems ( ) . get ( 0 ) ; org.ovirt.engine.ui.uicommonweb.models.hosts.numa.NumaSupportModel model = new org.ovirt.engine.ui.uicommonweb.models.hosts.numa.VmNumaSupportModel ( ( ( java.util.List < org.ovirt.engine.core.common.businessentities.VDS > ) ( getModel ( ) . getDefaultHost ( ) . getItems ( ) ) ) , host , getModel ( ) , vm ) ; getModel ( ) . setWindow ( model ) ; }
Source:
public void getAllDataCenterNetworks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId ) { 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.Network > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.Network > ( ) ; } } ; org.ovirt.engine.core.common.queries.IdQueryParameters params = new org.ovirt.engine.core.common.queries.IdQueryParameters ( storagePoolId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetNetworksByDataCenterId , params , aQuery ) ; }

Target:
public void getNextAvailableDiskAliasNameByVMId ( 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.GetNextAvailableDiskAliasNameByVMId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }
Source:
public static org.ovirt.engine.core.common.businessentities.VDSGroup map ( org.ovirt.engine.core.common.businessentities.StoragePool pool , org.ovirt.engine.core.common.businessentities.VDSGroup template ) { org.ovirt.engine.core.common.businessentities.VDSGroup entity = ( template != null ) ? template : new org.ovirt.engine.core.common.businessentities.VDSGroup ( ) ; if ( ( pool.getcompatibility_version ( ) ) != null ) { entity.setcompatibility_version ( pool.getcompatibility_version ( ) ) ; } return entity ; }

Target:
public static org.ovirt.engine.core.common.businessentities.VDSGroup map ( org.ovirt.engine.core.common.businessentities.StoragePool pool , org.ovirt.engine.core.common.businessentities.VDSGroup template ) { org.ovirt.engine.core.common.businessentities.VDSGroup entity = ( template != null ) ? template : new org.ovirt.engine.core.common.businessentities.VDSGroup ( ) ; if ( ( pool.getCompatibilityVersion ( ) ) != null ) { entity.setcompatibility_version ( pool.getCompatibilityVersion ( ) ) ; } return entity ; }
Source:
private boolean containsDefaultCluster ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VDSGroup > clusters = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVdsGroupDAO ( ) . getAllForStoragePool ( org.ovirt.engine.core.bll.storage.UpdateStoragePoolCommand.getStoragePool ( ) . getId ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.VDSGroup cluster : clusters ) { if ( cluster.getId ( ) . equals ( VDSGroup.DEFAULT_VDS_GROUP_ID ) ) { return true ; } } return false ; }

Target:
protected org.ovirt.engine.core.bll.storage.StoragePoolValidator createStoragePoolValidator ( ) { return new org.ovirt.engine.core.bll.storage.StoragePoolValidator ( org.ovirt.engine.core.bll.storage.UpdateStoragePoolCommand.getStoragePool ( ) , org.ovirt.engine.core.bll.storage.UpdateStoragePoolCommand.getReturnValue ( ) . getCanDoActionMessages ( ) ) ; }
Source:
public static java.lang.String cdPathWindowsToLinux ( java.lang.String windowsPath , java.lang.String isoPrefix ) { if ( org.apache.commons.lang.StringUtils.isEmpty ( windowsPath ) ) { return windowsPath ; } java.lang.String fileName = org.ovirt.engine.core.compat.backendcompat.Path.GetFileName ( windowsPath ) ; return java.lang.String.format ( "%1$s/%2$s" , isoPrefix , fileName ) ; }

Target:
public static java.lang.String cdPathWindowsToLinux ( java.lang.String windowsPath , java.lang.String isoPrefix ) { if ( org.apache.commons.lang.StringUtils.isEmpty ( windowsPath ) ) { return windowsPath ; } java.lang.String fileName = new java.io.File ( windowsPath ) . getName ( ) ; return java.lang.String.format ( "%1$s/%2$s" , isoPrefix , fileName ) ; }
Source:
public boolean getLegal ( ) { if ( getUseTimout ( ) ) { java.lang.String keyForCheck = getkeyForCheck ( ) ; synchronized ( keyForCheck.intern ( ) ) { if ( ! ( org.ovirt.engine.core.utils.cache.CacheManager.getTimeoutBaseCache ( ) . containsKey ( keyForCheck ) ) ) { org.ovirt.engine.core.utils.cache.CacheManager.getTimeoutBaseCache ( ) . put ( keyForCheck , keyForCheck , getEndTime ( ) , java.util.concurrent.TimeUnit.MILLISECONDS ) ; return true ; } } return false ; } return true ; }

Target:
public boolean getLegal ( ) { if ( getUseTimout ( ) ) { java.lang.String keyForCheck = getkeyForCheck ( ) ; synchronized ( keyForCheck.intern ( ) ) { if ( ! ( org.ovirt.engine.core.dal.utils.CacheManager.getTimeoutBaseCache ( ) . containsKey ( keyForCheck ) ) ) { org.ovirt.engine.core.dal.utils.CacheManager.getTimeoutBaseCache ( ) . put ( keyForCheck , keyForCheck , getEndTime ( ) , java.util.concurrent.TimeUnit.MILLISECONDS ) ; return true ; } } return false ; } return true ; }
Source:
protected boolean canDoAction ( ) { org.ovirt.engine.core.bll.validator.IscsiBondValidator validator = new org.ovirt.engine.core.bll.validator.IscsiBondValidator ( ) ; return validate ( validator.iscsiBondWithTheSameNameExistInDataCenter ( getIscsiBond ( ) ) ) ; }

Target:
protected boolean canDoAction ( ) { if ( ! ( org.ovirt.engine.core.common.FeatureSupported.isIscsiMultipathingSupported ( org.ovirt.engine.core.bll.storage.AddIscsiBondCommand.getStoragePool ( ) . getcompatibility_version ( ) ) ) ) { return failCanDoAction ( VdcBllMessages.ISCSI_BOND_NOT_SUPPORTED ) ; } org.ovirt.engine.core.bll.validator.IscsiBondValidator validator = new org.ovirt.engine.core.bll.validator.IscsiBondValidator ( ) ; return ( ( validate ( validator.iscsiBondWithTheSameNameExistInDataCenter ( getIscsiBond ( ) ) ) ) && ( validate ( validator.validateAddedLogicalNetworks ( getIscsiBond ( ) ) ) ) ) && ( validate ( validator.validateAddedStorageConnections ( getIscsiBond ( ) ) ) ) ; }
Source:
protected java.util.List < org.ovirt.engine.core.common.businessentities.VDSGroup > getClusters ( ) { return vdsGroupDao.getAll ( ) ; }

Target:
private java.lang.Iterable < org.ovirt.engine.core.common.businessentities.VDSGroup > findMigrationFreeClusters ( ) { final java.util.List < org.ovirt.engine.core.common.businessentities.VM > migratingVms = vmDao.getAllByStatus ( VMStatus.MigratingFrom ) ; final java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.VDSGroup > allClusters = new java.util.HashMap < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.VDSGroup cluster : vdsGroupDao.getAll ( ) ) { allClusters.put ( cluster.getId ( ) , cluster ) ; } for ( org.ovirt.engine.core.common.businessentities.VM vm : migratingVms ) { allClusters.remove ( vm.getVdsGroupId ( ) ) ; } return allClusters.values ( ) ; }
Source:
public static void getRoleList ( 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.Role > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Role > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllRoles , new org.ovirt.engine.core.common.queries.MultilevelAdministrationsQueriesParameters ( ) , aQuery ) ; }

Target:
public static void getHostById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVdsByVdsId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
private void logDeviceInformation ( org.ovirt.engine.core.compat.Guid vmId , java.util.Map device ) { java.lang.String message = "Received a '{}' Device without an address when processing VM '{}' devices, skipping device" ; java.lang.String deviceType = ( ( java.lang.String ) ( device.get ( VdsProperties.Device ) ) ) ; if ( shouldLogDeviceDetails ( deviceType ) ) { java.util.Map < java.lang.String , java.lang.Object > deviceInfo = device ; org.ovirt.engine.core.vdsbroker.VdsUpdateRunTimeInfo.log.info ( ( message + ": '{}'" ) , org.apache.commons.lang.StringUtils.defaultString ( deviceType ) , vmId , deviceInfo ) ; } else { org.ovirt.engine.core.vdsbroker.VdsUpdateRunTimeInfo.log.info ( message , org.apache.commons.lang.StringUtils.defaultString ( deviceType ) , vmId ) ; } }

Target:
private void logDeviceInformation ( org.ovirt.engine.core.compat.Guid vmId , java.util.Map device ) { java.lang.String message = "Received a '{}' Device without an address when processing VM '{}' devices, skipping device" ; java.lang.String deviceType = ( ( java.lang.String ) ( device.get ( VdsProperties.Device ) ) ) ; if ( shouldLogDeviceDetails ( deviceType ) ) { java.util.Map < java.lang.String , java.lang.Object > deviceInfo = device ; org.ovirt.engine.core.vdsbroker.HostMonitoring.log.info ( ( message + ": '{}'" ) , org.apache.commons.lang.StringUtils.defaultString ( deviceType ) , vmId , deviceInfo ) ; } else { org.ovirt.engine.core.vdsbroker.HostMonitoring.log.info ( message , org.apache.commons.lang.StringUtils.defaultString ( deviceType ) , vmId ) ; } }
Source:
public void auditNetworkCompliance ( org.ovirt.engine.core.common.businessentities.VDS host , java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > dbIfaces , final java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > clusterNetworks ) { java.util.Map < java.lang.String , org.ovirt.engine.core.common.businessentities.network.Network > clusterNetworksByName = org.ovirt.engine.core.common.businessentities.Entities.entitiesByName ( clusterNetworks ) ; final java.util.Collection < org.ovirt.engine.core.common.businessentities.network.Network > dbHostNetworks = findNetworksOnInterfaces ( dbIfaces , clusterNetworksByName ) ; logChangedDisplayNetwork ( host , dbHostNetworks , dbIfaces ) ; logUnsynchronizedNetworks ( host , clusterNetworksByName ) ; }

Target:
private void auditNetworkCompliance ( org.ovirt.engine.core.common.businessentities.VDS host , java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > dbIfaces , java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > clusterNetworks ) { if ( ( host.getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VDSStatus.Maintenance ) ) { return ; } final java.util.Map < java.lang.String , org.ovirt.engine.core.common.businessentities.network.Network > clusterNetworksByName = org.ovirt.engine.core.common.businessentities.Entities.entitiesByName ( clusterNetworks ) ; final java.util.Collection < org.ovirt.engine.core.common.businessentities.network.Network > dbHostNetworks = findNetworksOnInterfaces ( dbIfaces , clusterNetworksByName ) ; logChangedDisplayNetwork ( host , dbHostNetworks , dbIfaces ) ; logUnsynchronizedNetworks ( host , clusterNetworksByName ) ; }
Source:
protected java.lang.String getDisabledMessage ( java.lang.Object model ) { java.util.List < java.lang.String > reasons = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.ImportVmData ) ( model ) ) . getClone ( ) . getChangeProhibitionReasons ( ) ; if ( ( reasons != null ) && ( ! ( reasons.isEmpty ( ) ) ) ) { return reasons.get ( 0 ) ; } return null ; }

Target:
protected java.lang.String getDisabledMessage ( java.lang.Object model ) { return ( ( org.ovirt.engine.ui.uicommonweb.models.vms.ImportVmData ) ( model ) ) . getClone ( ) . getChangeProhibitionReason ( ) ; }
Source:
private void assertDiskDescriptionMap ( org.ovirt.engine.core.common.businessentities.storage.Disk disk ) throws java.io.IOException { org.junit.Assert.assertEquals ( "Should be map of disk alias and disk description" , java.lang.String.format ( ( "{\"DiskAlias\":\"%s\"," + "\"DiskDescription\":\"%s\"}" ) , disk.getDiskAlias ( ) , org.apache.commons.lang.StringUtils.defaultString ( disk.getDiskDescription ( ) ) ) , metadataDiskDescriptionHandler.getJsonDiskDescription ( disk ) ) ; }

Target:
private void assertDiskDescriptionMap ( org.ovirt.engine.core.common.businessentities.storage.Disk disk , java.lang.String ... jsonEntries ) throws java.io.IOException { org.junit.Assert.assertEquals ( java.lang.String.format ( "{%s}" , org.apache.commons.lang.StringUtils.join ( jsonEntries , "," , 0 , jsonEntries.length ) ) , metadataDiskDescriptionHandler.generateJsonDiskDescription ( disk ) ) ; }
Source:
void onIsValidPropertyChange ( org.ovirt.engine.ui.common.widget.HasValidation editor , org.ovirt.engine.ui.uicommonweb.models.EntityModel model ) { if ( model.getIsValid ( ) ) { editor.markAsValid ( ) ; } else { editor.markAsInvalid ( model.getInvalidityReasons ( ) ) ; } }

Target:
void onIsValidPropertyChange ( org.ovirt.engine.ui.common.widget.HasValidation editor , org.ovirt.engine.ui.uicommonweb.models.Model model ) { if ( model.getIsValid ( ) ) { editor.markAsValid ( ) ; } else { if ( editor.isValid ( ) ) { editor.markAsInvalid ( model.getInvalidityReasons ( ) ) ; } } }
Source:
public void testAddIncompleteParameters ( ) throws java.lang.Exception { org.ovirt.engine.api.model.Network model = new org.ovirt.engine.api.model.Network ( ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; try { collection.add ( model ) ; fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "Network" , "add" , "name" ) ; } }

Target:
public void testAddIncompleteParameters ( ) throws java.lang.Exception { org.ovirt.engine.api.model.Network model = new org.ovirt.engine.api.model.Network ( ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; try { collection.add ( model ) ; org.junit.Assert.fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "Network" , "add" , "name" ) ; } }
Source:
protected org.ovirt.engine.core.compat.Guid getDiskId ( ) { return getCommand ( ) . getParameters ( ) . getDiskId ( ) ; }

Target:
public void onFailed ( org.ovirt.engine.core.compat.Guid cmdId , java.util.List < org.ovirt.engine.core.compat.Guid > childCmdIds ) { super . onFailed ( cmdId , childCmdIds ) ; getCommand ( ) . getParameters ( ) . setTaskGroupSuccess ( false ) ; log.error ( "Failed deleting volume/snapshot from Cinder. ID: {}" , getDiskId ( ) ) ; getCommand ( ) . endAction ( ) ; org.ovirt.engine.core.bll.tasks.CommandCoordinatorUtil.removeAllCommandsInHierarchy ( cmdId ) ; }
Source:
public void testPayloadMapToVmPaylod ( ) { org.ovirt.engine.api.model.Payload payload = new org.ovirt.engine.api.model.Payload ( ) ; payload.setType ( "CDROM" ) ; payload.setVolumeId ( "CD-VOL" ) ; org.ovirt.engine.core.common.businessentities.VmPayload vmPayload = org.ovirt.engine.api.restapi.types.VmMapper.map ( payload , null ) ; assertEquals ( payload.getType ( ) , vmPayload.getDeviceType ( ) . name ( ) ) ; assertEquals ( payload.getVolumeId ( ) , vmPayload.getVolumeId ( ) ) ; }

Target:
public void testPayloadMapToVmPaylod ( ) { org.ovirt.engine.api.model.Payload payload = new org.ovirt.engine.api.model.Payload ( ) ; payload.setType ( VmDeviceType.CDROM ) ; payload.setVolumeId ( "CD-VOL" ) ; org.ovirt.engine.core.common.businessentities.VmPayload vmPayload = org.ovirt.engine.api.restapi.types.VmMapper.map ( payload , null ) ; assertEquals ( payload.getType ( ) . name ( ) , vmPayload.getDeviceType ( ) . name ( ) ) ; assertEquals ( payload.getVolumeId ( ) , vmPayload.getVolumeId ( ) ) ; }
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.StorageDomain > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) ; } } ; 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.getInstance ( ) . runQuery ( VdcQueryType.Search , searchParams , aQuery ) ; }

Target:
public static void getClusterDesktopMemoryOverCommit ( 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.MaxVdsMemOverCommit , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
private void validateCanDoActionDomainInProcess ( org.ovirt.engine.core.common.businessentities.StorageDomainStatus masterStatus , org.ovirt.engine.core.common.businessentities.StorageDomainStatus regularStatus , org.ovirt.engine.core.common.businessentities.StorageDomainStatus expectedStatus ) { masterDomainIsoMap.setStatus ( masterStatus ) ; regularDomainIsoMap.setStatus ( regularStatus ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( cmd , VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_DOMAIN_STATUS_ILLEGAL2 ) ; java.util.List < java.lang.String > messages = cmd.getReturnValue ( ) . getCanDoActionMessages ( ) ; org.junit.Assert.assertEquals ( messages.get ( 0 ) , VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_DOMAIN_STATUS_ILLEGAL2.toString ( ) ) ; org.junit.Assert.assertEquals ( messages.get ( 1 ) , java.lang.String.format ( "$status %1$s" , expectedStatus ) ) ; }

Target:
private void validateCanDoActionDomainInProcess ( org.ovirt.engine.core.common.businessentities.StorageDomainStatus masterStatus , org.ovirt.engine.core.common.businessentities.StorageDomainStatus regularStatus , org.ovirt.engine.core.common.businessentities.StorageDomainStatus expectedStatus ) { masterDomainIsoMap.setStatus ( masterStatus ) ; regularDomainIsoMap.setStatus ( regularStatus ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( cmd , EngineMessage.ACTION_TYPE_FAILED_STORAGE_DOMAIN_STATUS_ILLEGAL2 ) ; java.util.List < java.lang.String > messages = cmd.getReturnValue ( ) . getCanDoActionMessages ( ) ; org.junit.Assert.assertEquals ( messages.get ( 0 ) , EngineMessage.ACTION_TYPE_FAILED_STORAGE_DOMAIN_STATUS_ILLEGAL2.toString ( ) ) ; org.junit.Assert.assertEquals ( messages.get ( 1 ) , java.lang.String.format ( "$status %1$s" , expectedStatus ) ) ; }
Source:
protected void updateVMDetails ( org.ovirt.engine.core.common.businessentities.VM vm ) { org.ovirt.engine.core.bll.VmHandler.updateDisksFromDb ( vm ) ; org.ovirt.engine.core.bll.VmHandler.updateVmGuestAgentVersion ( vm ) ; org.ovirt.engine.core.bll.VmHandler.updateNetworkInterfacesFromDb ( vm ) ; org.ovirt.engine.core.bll.VmHandler.updateVmInitFromDB ( vm.getStaticData ( ) , true ) ; org.ovirt.engine.core.bll.VmHandler.updateNumaNodesFromDb ( vm ) ; }

Target:
protected void updateVMDetails ( org.ovirt.engine.core.common.businessentities.VM vm ) { vmHandler.updateDisksFromDb ( vm ) ; vmHandler.updateVmGuestAgentVersion ( vm ) ; vmHandler.updateNetworkInterfacesFromDb ( vm ) ; vmHandler.updateVmInitFromDB ( vm.getStaticData ( ) , true ) ; vmHandler.updateNumaNodesFromDb ( vm ) ; vmHandler.updateVmStatistics ( vm ) ; }
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:
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.hasPrimaryAddressSet ( ) ) && ( org.apache.commons.lang.StringUtils.isNotEmpty ( ipConfiguration.getPrimaryAddress ( ) . getAddress ( ) ) ) ) && ( org.apache.commons.lang.StringUtils.isNotEmpty ( ipConfiguration.getPrimaryAddress ( ) . getNetmask ( ) ) ) ) ) ) ; }
Source:
public java.lang.Void runInTransaction ( ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase logable = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; logable.addCustomValue ( "MACAddr" , iface.getMacAddress ( ) ) ; logable.addCustomValue ( "VmName" , iface.getVmName ( ) ) ; log ( logable , AuditLogType.MAC_ADDRESS_IS_IN_USE ) ; return null ; }

Target:
private org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase createAuditLog ( final org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface iface ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase logable = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; logable.setVmId ( iface.getVmId ( ) . getValue ( ) ) ; logable.addCustomValue ( "MACAddr" , iface.getMacAddress ( ) ) ; logable.addCustomValue ( "IfaceName" , iface.getName ( ) ) ; return logable ; }
Source:
public void onFailure ( final org.ovirt.engine.ui.frontend.communication.VdcOperation < org.ovirt.engine.core.common.action.VdcActionType , org.ovirt.engine.core.common.action.LoginUserParameters > operation , final java.lang.Throwable caught ) { if ( ignoreFailure ( caught ) ) { return ; } org.ovirt.engine.ui.frontend.Frontend.logger.log ( java.util.logging.Level.SEVERE , ( "Failed to login: " + caught ) , caught ) ; getEventsHandler ( ) . runQueryFailed ( null ) ; failureEventHandler ( caught ) ; if ( callback.isHandleFailure ( ) ) { org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . setLoggedInUser ( null ) ; callback.getDel ( ) . onSuccess ( callback.getModel ( ) , null ) ; } }

Target:
public void onFailure ( final org.ovirt.engine.ui.frontend.communication.VdcOperation < org.ovirt.engine.core.common.action.VdcActionType , org.ovirt.engine.core.common.action.LoginUserParameters > operation , final java.lang.Throwable caught ) { if ( ignoreFailure ( caught ) ) { return ; } org.ovirt.engine.ui.frontend.Frontend.logger.log ( java.util.logging.Level.SEVERE , ( "Failed to login: " + caught ) , caught ) ; getEventsHandler ( ) . runQueryFailed ( null ) ; failureEventHandler ( caught ) ; clearLoggedInUser ( ) ; if ( callback.isHandleFailure ( ) ) { setLoggedInUser ( null ) ; callback.getDel ( ) . onSuccess ( callback.getModel ( ) , null ) ; } }
Source:
public void edit ( final org.ovirt.engine.ui.uicommonweb.models.vms.key_value.KeyValueModel object ) { setPanel ( object ) ; if ( ( object.getKeyValueLines ( ) . getItemsChangedEvent ( ) . getListeners ( ) . size ( ) ) == 0 ) { object.getKeyValueLines ( ) . getItemsChangedEvent ( ) . addListener ( new org.ovirt.engine.core.compat.IEventListener ( ) { @ java.lang.Override public void eventRaised ( org.ovirt.engine.core.compat.Event ev , java.lang.Object sender , org.ovirt.engine.core.compat.EventArgs args ) { setPanel ( object ) ; } } ) ; } }

Target:
public void edit ( final org.ovirt.engine.ui.uicommonweb.models.vms.key_value.KeyValueModel object ) { setPanel ( object ) ; if ( ( object.getKeyValueLines ( ) . getItemsChangedEvent ( ) . getListeners ( ) . size ( ) ) == 0 ) { object.getKeyValueLines ( ) . getItemsChangedEvent ( ) . addListener ( new org.ovirt.engine.ui.uicompat.IEventListener ( ) { @ java.lang.Override public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { setPanel ( object ) ; } } ) ; } }
Source:
public java.lang.Object map ( java.lang.Object from , java.lang.Object template ) { java.lang.Object ret = null ; try { ret = method.invoke ( null , from , template ) ; } catch ( java.lang.Exception e ) { e.printStackTrace ( ) ; } return to.cast ( ret ) ; }

Target:
public java.lang.Object map ( java.lang.Object from , java.lang.Object template ) { java.lang.Object ret = null ; try { ret = method.invoke ( null , from , template ) ; } catch ( java.lang.reflect.InvocationTargetException ite ) { if ( ( ite.getTargetException ( ) ) instanceof org.ovirt.engine.api.restapi.utils.MalformedIdException ) { throw ( ( org.ovirt.engine.api.restapi.utils.MalformedIdException ) ( ite.getTargetException ( ) ) ) ; } } catch ( java.lang.Exception e ) { e.printStackTrace ( ) ; } return to.cast ( ret ) ; }
Source:
public void render ( com.google.gwt.cell.client.Cell.Context context , org.ovirt.engine.ui.uicommonweb.models.EntityModel object , com.google.gwt.safehtml.shared.SafeHtmlBuilder sb ) { com.google.gwt.cell.client.Cell < java.lang.Boolean > cell = getCell ( ) ; if ( cell instanceof org.ovirt.engine.ui.webadmin.widget.table.column.EntityModelCheckboxColumn.EnabledDisabledCheckboxCell ) { ( ( org.ovirt.engine.ui.webadmin.widget.table.column.EntityModelCheckboxColumn.EnabledDisabledCheckboxCell ) ( cell ) ) . renderEditable ( context , getValue ( object ) , canEdit ( object ) , sb ) ; } else { super . render ( context , object , sb ) ; } }

Target:
public void render ( com.google.gwt.cell.client.Cell.Context context , T object , com.google.gwt.safehtml.shared.SafeHtmlBuilder sb ) { com.google.gwt.cell.client.Cell < java.lang.Boolean > cell = org.ovirt.engine.ui.webadmin.widget.table.column.CheckboxColumn.getCell ( ) ; if ( cell instanceof org.ovirt.engine.ui.webadmin.widget.table.column.CheckboxColumn.EnabledDisabledCheckboxCell ) { ( ( org.ovirt.engine.ui.webadmin.widget.table.column.CheckboxColumn.EnabledDisabledCheckboxCell ) ( cell ) ) . renderEditable ( context , org.ovirt.engine.ui.webadmin.widget.table.column.CheckboxColumn.getValue ( object ) , canEdit ( object ) , sb ) ; } else { super . render ( context , object , sb ) ; } }
Source:
public void testUpdateRole ( ) { existingRole.setdescription ( "This is an updated description" ) ; dao.update ( existingRole ) ; org.ovirt.engine.core.common.businessentities.roles result = dao.get ( existingRole.getId ( ) ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertEquals ( existingRole , result ) ; }

Target:
public void testUpdateRole ( ) { existingRole.setdescription ( "This is an updated description" ) ; dao.update ( existingRole ) ; org.ovirt.engine.core.common.businessentities.Role result = dao.get ( existingRole.getId ( ) ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertEquals ( existingRole , result ) ; }
Source:
protected java.util.List < org.ovirt.engine.core.common.businessentities.storage.LUNs > setUpLunsFromDeviceList ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.LUNs > luns = setUpLuns ( false ) ; for ( int i = 0 ; i < ( luns.size ( ) ) ; i ++ ) { java.util.HashMap < java.lang.String , java.lang.Boolean > pathsDictionary = new java.util.HashMap < java.lang.String , java.lang.Boolean > ( ) ; pathsDictionary.put ( org.ovirt.engine.core.bll.GetLunsByVgIdQueryTest.PHYSICAL_DEVICE_FIELD , true ) ; luns.get ( i ) . setPathsDictionary ( pathsDictionary ) ; } return luns ; }

Target:
protected java.util.List < org.ovirt.engine.core.common.businessentities.storage.LUNs > setUpLunsFromDeviceList ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.LUNs > luns = setUpLuns ( false ) ; for ( org.ovirt.engine.core.common.businessentities.storage.LUNs lun : luns ) { java.util.HashMap < java.lang.String , java.lang.Boolean > pathsDictionary = new java.util.HashMap < java.lang.String , java.lang.Boolean > ( ) ; pathsDictionary.put ( org.ovirt.engine.core.bll.GetLunsByVgIdQueryTest.PHYSICAL_DEVICE_FIELD , true ) ; lun.setPathsDictionary ( pathsDictionary ) ; } return luns ; }
Source:
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 ( ) ; mockInterfaceList ( ) ; mockMaxPciSlots ( ) ; org.mockito.Mockito.doReturn ( org.ovirt.engine.core.bll.AddDiskToVmCommandTest.mockStorageDomainValidatorWithSpace ( ) ) . when ( command ) . createStorageDomainValidator ( ) ; org.junit.Assert.assertTrue ( command.canDoAction ( ) ) ; }

Target:
private void mockEntities ( org.ovirt.engine.core.compat.Guid storageId ) { mockStorageDomain ( storageId ) ; mockStoragePoolIsoMap ( ) ; mockInterfaceList ( ) ; mockMaxPciSlots ( ) ; }
Source:
protected void postAddNetwork ( org.ovirt.engine.core.compat.Guid providerId , java.lang.String externalId ) { org.ovirt.engine.core.common.businessentities.network.ExternalSubnet externalSubnet = org.ovirt.engine.core.bll.provider.network.AddNetworkWithSubnetOnProviderCommand.getParameters ( ) . getExternalSubnet ( ) ; if ( externalSubnet != null ) { org.ovirt.engine.core.common.action.AddExternalSubnetParameters subnetParameters = new org.ovirt.engine.core.common.action.AddExternalSubnetParameters ( externalSubnet , providerId , externalId ) ; org.ovirt.engine.core.bll.provider.network.AddNetworkWithSubnetOnProviderCommand.getBackend ( ) . runInternalMultipleActions ( ActionType.AddSubnetToProvider , java.util.Arrays.asList ( subnetParameters ) ) ; } }

Target:
protected void postAddNetwork ( org.ovirt.engine.core.compat.Guid providerId , java.lang.String externalId ) { org.ovirt.engine.core.common.businessentities.network.ExternalSubnet externalSubnet = org.ovirt.engine.core.bll.provider.network.AddNetworkWithSubnetOnProviderCommand.getParameters ( ) . getExternalSubnet ( ) ; if ( externalSubnet != null ) { org.ovirt.engine.core.common.action.AddExternalSubnetParameters subnetParameters = new org.ovirt.engine.core.common.action.AddExternalSubnetParameters ( externalSubnet , providerId , externalId ) ; backend.runInternalMultipleActions ( ActionType.AddSubnetToProvider , java.util.Arrays.asList ( subnetParameters ) ) ; } }
Source:
protected void setUpGetEntityExpectations ( int times , boolean notFound , org.ovirt.engine.api.model.VM entity ) throws java.lang.Exception { while ( ( times -- ) > 0 ) { setUpGetEntityExpectations ( VdcQueryType.GetVmByVmId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , ( notFound ? null : entity ) ) ; } }

Target:
protected void setUpGetEntityExpectations ( int times , boolean notFound , org.ovirt.engine.api.restapi.resource.VM entity ) throws java.lang.Exception { while ( ( times -- ) > 0 ) { setUpGetEntityExpectations ( VdcQueryType.GetVmByVmId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , ( notFound ? null : entity ) ) ; } }
Source:
private void updateShareable ( org.ovirt.engine.core.common.businessentities.VolumeType volumeType , org.ovirt.engine.core.common.businessentities.StorageType storageType ) { getIsShareable ( ) . setEntity ( false ) ; getIsShareable ( ) . setIsChangable ( ( ! ( ( storageType.isBlockDomain ( ) ) && ( volumeType == ( org.ovirt.engine.core.common.businessentities.VolumeType.Sparse ) ) ) ) ) ; getIsShareable ( ) . getChangeProhibitionReasons ( ) . add ( org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getConstants ( ) . shareableDiskNotSupportedByConfiguration ( ) ) ; }

Target:
private void updateShareable ( org.ovirt.engine.core.common.businessentities.VolumeType volumeType , org.ovirt.engine.core.common.businessentities.StorageType storageType ) { getIsShareable ( ) . setEntity ( false ) ; getIsShareable ( ) . setChangeProhibitionReason ( org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getConstants ( ) . shareableDiskNotSupportedByConfiguration ( ) ) ; getIsShareable ( ) . setIsChangable ( ( ! ( ( storageType.isBlockDomain ( ) ) && ( volumeType == ( org.ovirt.engine.core.common.businessentities.VolumeType.Sparse ) ) ) ) ) ; }
Source:
public void edit ( org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel unitVmModel ) { super . edit ( unitVmModel ) ; initTabAvailabilityListeners ( ) ; if ( unitVmModel.isVmAttachedToPool ( ) ) { specificHost.setEnabled ( false ) ; specificHostLabel.setStyleName ( style.labelDisabled ( ) , true ) ; customPropertiesSheetEditor.setEnabled ( false ) ; } }

Target:
public void edit ( org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel unitVmModel ) { super . edit ( unitVmModel ) ; if ( unitVmModel.isVmAttachedToPool ( ) ) { specificHost.setEnabled ( false ) ; specificHostLabel.setStyleName ( style.labelDisabled ( ) , true ) ; customPropertiesSheetEditor.setEnabled ( false ) ; } changeApplicationLevelVisibility ( highAvailabilityTab , true ) ; }
Source:
public void testGetAllForNetwork ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VDS > result = dao.getAllForNetwork ( FixturesTool.NETWORK_ENGINE_2 ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertEquals ( 1 , result.size ( ) ) ; org.junit.Assert.assertEquals ( existingVds , result.get ( 0 ) ) ; }

Target:
public void testGetAllForNetwork ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VDS > result = dao.getAllForNetwork ( FixturesTool.NETWORK_ENGINE_2 ) ; org.junit.jupiter.api.Assertions.assertNotNull ( result ) ; org.junit.jupiter.api.Assertions.assertEquals ( 1 , result.size ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( existingVds , result.get ( 0 ) ) ; }
Source:
public void storagePoolName ( ) { final org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase b = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; final org.ovirt.engine.core.common.businessentities.StoragePool p = new org.ovirt.engine.core.common.businessentities.StoragePool ( ) ; p.setname ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.NAME ) ; b.setStoragePool ( p ) ; final java.lang.String s = b.getStoragePoolName ( ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.NAME , s ) ; }

Target:
public void storagePoolName ( ) { final org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase b = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; final org.ovirt.engine.core.common.businessentities.StoragePool p = new org.ovirt.engine.core.common.businessentities.StoragePool ( ) ; p.setName ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.NAME ) ; b.setStoragePool ( p ) ; final java.lang.String s = b.getStoragePoolName ( ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.NAME , s ) ; }
Source:
public 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 ) ; }

Target:
public void getClusterById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVdsGroupById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
public void testStorageDomainLinks ( ) throws java.lang.Exception { org.ovirt.engine.api.model.StorageDomain storageDomain = new org.ovirt.engine.api.model.StorageDomain ( ) ; storageDomain.setId ( org.ovirt.engine.api.restapi.util.LinkHelperTest.STORAGE_DOMAIN_ID ) ; storageDomain.setStorage ( new org.ovirt.engine.api.model.HostStorage ( ) ) ; storageDomain.getStorage ( ) . setPath ( "foo" ) ; org.ovirt.engine.api.restapi.util.LinkHelper.addLinks ( storageDomain ) ; assertEquals ( org.ovirt.engine.api.restapi.util.LinkHelperTest.STORAGE_DOMAIN_HREF , storageDomain.getHref ( ) ) ; assertNull ( storageDomain.getStorage ( ) . getHref ( ) ) ; }

Target:
public void testStorageDomainLinks ( ) throws java.lang.Exception { org.ovirt.engine.api.model.StorageDomain storageDomain = new org.ovirt.engine.api.model.StorageDomain ( ) ; storageDomain.setId ( org.ovirt.engine.api.restapi.util.LinkHelperTest.STORAGE_DOMAIN_ID ) ; storageDomain.setStorage ( new org.ovirt.engine.api.model.HostStorage ( ) ) ; storageDomain.getStorage ( ) . setPath ( "foo" ) ; org.ovirt.engine.api.restapi.util.LinkHelper.addLinks ( storageDomain ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.api.restapi.util.LinkHelperTest.STORAGE_DOMAIN_HREF , storageDomain.getHref ( ) ) ; org.junit.Assert.assertNull ( storageDomain.getStorage ( ) . getHref ( ) ) ; }
Source:
private void initImportClonedTemplate ( ) { getParameters ( ) . getVmTemplate ( ) . setId ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface iface : getParameters ( ) . getVmTemplate ( ) . getInterfaces ( ) ) { iface.setId ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; } }

Target:
private void initImportClonedTemplate ( ) { getParameters ( ) . getVmTemplate ( ) . setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface iface : getParameters ( ) . getVmTemplate ( ) . getInterfaces ( ) ) { iface.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; } }
Source:
private org.ovirt.engine.core.common.businessentities.network.IpConfiguration createIpConfiguration ( ) { org.ovirt.engine.core.common.businessentities.network.IPv4Address address = new org.ovirt.engine.core.common.businessentities.network.IPv4Address ( ) ; address.setAddress ( org.ovirt.engine.core.vdsbroker.vdsbroker.HostNetworkAttachmentsPersisterTest.IP_ADDRESS ) ; address.setNetmask ( org.ovirt.engine.core.vdsbroker.vdsbroker.HostNetworkAttachmentsPersisterTest.NETMASK ) ; address.setGateway ( org.ovirt.engine.core.vdsbroker.vdsbroker.HostNetworkAttachmentsPersisterTest.GATEWAY ) ; address.setBootProtocol ( NetworkBootProtocol.STATIC_IP ) ; org.ovirt.engine.core.common.businessentities.network.IpConfiguration result = new org.ovirt.engine.core.common.businessentities.network.IpConfiguration ( ) ; result.setIPv4Addresses ( java.util.Collections.singletonList ( address ) ) ; return result ; }

Target:
private org.ovirt.engine.core.common.businessentities.network.IPv4Address createIpv4Address ( ) { org.ovirt.engine.core.common.businessentities.network.IPv4Address address = new org.ovirt.engine.core.common.businessentities.network.IPv4Address ( ) ; address.setAddress ( org.ovirt.engine.core.vdsbroker.vdsbroker.HostNetworkAttachmentsPersisterTest.IPV4_ADDRESS ) ; address.setNetmask ( org.ovirt.engine.core.vdsbroker.vdsbroker.HostNetworkAttachmentsPersisterTest.IPV4_NETMASK ) ; address.setGateway ( org.ovirt.engine.core.vdsbroker.vdsbroker.HostNetworkAttachmentsPersisterTest.IPV4_GATEWAY ) ; address.setBootProtocol ( Ipv4BootProtocol.STATIC_IP ) ; return address ; }
Source:
public void setEnabled ( boolean enabled ) { contentWidget.setEnabled ( enabled ) ; if ( enabled ) { labelElement.replaceClassName ( style.labelDisabled ( ) , style.labelEnabled ( ) ) ; } else { labelElement.replaceClassName ( style.labelEnabled ( ) , style.labelDisabled ( ) ) ; } if ( ! ( keepTitleOnSetEnabled ) ) { updateWidgetTitle ( null ) ; } }

Target:
public void setLabelStyleNames ( java.lang.String styleNames ) { for ( java.lang.String name : styleNames.split ( "[,\\s]+" ) ) { labelElement.addClassName ( name ) ; } }