auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.VM > getAllRunningByVds ( org.ovirt.engine.core.compat.Guid id ) { java.util.HashMap < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.VM > map = new java.util.HashMap < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.VM vm : getAllRunningForVds ( id ) ) { map.put ( vm.getId ( ) , vm ) ; } return map ; }

Target:
public java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.VM > getAllRunningByVds ( org.ovirt.engine.core.compat.Guid id ) { java.util.List < org.ovirt.engine.core.common.businessentities.VM > vms = getCallsHandler ( ) . executeReadList ( "GetVmsRunningByVds" , org.ovirt.engine.core.dao.VmDaoImpl.VmMonitoringRowMapper.instance , getCustomMapSqlParameterSource ( ) . addValue ( "vds_id" , id ) ) ; java.util.HashMap < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.VM > map = new java.util.HashMap < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.VM vm : vms ) { map.put ( vm.getId ( ) , vm ) ; } return map ; }
Source:
public void moveFloatingDisk ( ) { command.getParameters ( ) . setParametersList ( createMoveDisksParameters ( ) ) ; initDiskImage ( diskImageId ) ; org.junit.Assert.assertTrue ( command.canDoAction ( ) ) ; org.junit.Assert.assertFalse ( command.getMoveDisksParametersList ( ) . isEmpty ( ) ) ; }

Target:
public void moveUnpluggedDiskVmUp ( ) { command.getParameters ( ) . setParametersList ( createMoveDisksParameters ( ) ) ; initDiskImage ( diskImageId ) ; initVm ( VMStatus.Up , org.ovirt.engine.core.compat.Guid.newGuid ( ) , diskImageId , false ) ; command.updateParameters ( ) ; org.junit.Assert.assertEquals ( command.getMoveDiskParametersList ( ) . size ( ) , 1 ) ; }
Source:
protected void init ( ) { super . init ( ) ; resource.getParent ( ) . backend = backend ; resource.getParent ( ) . sessionHelper = sessionHelper ; resource.getParent ( ) . mappingLocator = resource.mappingLocator ; resource.getParent ( ) . httpHeaders = httpHeaders ; }

Target:
protected void init ( ) { super . init ( ) ; resource.getParent ( ) . backend = backend ; resource.getParent ( ) . sessionHelper = sessionHelper ; resource.getParent ( ) . mappingLocator = resource.mappingLocator ; resource.getParent ( ) . httpHeaders = httpHeaders ; resource.getParent ( ) . messageBundle = messageBundle ; }
Source:
public void testVmFailNoDisks ( ) { org.ovirt.engine.core.common.businessentities.VM vm = new org.ovirt.engine.core.common.businessentities.VM ( ) ; org.ovirt.engine.core.bll.validator.RunVmValidatorTest.validateResult ( runVmValidator.validateBootSequence ( vm , null , new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ( ) ) , false , VdcBllMessages.VM_CANNOT_RUN_FROM_DISK_WITHOUT_DISK ) ; }

Target:
public void testVmWithDisks ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.Disk > disks = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ( ) ; disks.add ( new org.ovirt.engine.core.common.businessentities.DiskImage ( ) ) ; org.ovirt.engine.core.bll.validator.RunVmValidatorTest.validateResult ( runVmValidator.validateBootSequence ( new org.ovirt.engine.core.common.businessentities.VM ( ) , null , disks ) , true , null ) ; }
Source:
protected void storageItemsChanged ( ) { if ( ( getItems ( ) ) != null ) { for ( java.lang.Object item : getItems ( ) ) { org.ovirt.engine.ui.uicommonweb.models.storage.IStorageModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.storage.IStorageModel ) ( item ) ) ; model.setContainer ( this ) ; if ( item instanceof org.ovirt.engine.ui.uicommonweb.models.storage.NfsStorageModel ) { org.ovirt.engine.ui.uicommonweb.models.storage.NfsStorageModel nfsModel = ( ( org.ovirt.engine.ui.uicommonweb.models.storage.NfsStorageModel ) ( item ) ) ; nfsModel.getPathChangedEvent ( ) . addListener ( this ) ; } } } }

Target:
protected void storageItemsChanged ( ) { if ( ( getStorageModels ( ) ) != null ) { for ( java.lang.Object item : getStorageModels ( ) ) { org.ovirt.engine.ui.uicommonweb.models.storage.IStorageModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.storage.IStorageModel ) ( item ) ) ; model.setContainer ( this ) ; if ( item instanceof org.ovirt.engine.ui.uicommonweb.models.storage.NfsStorageModel ) { org.ovirt.engine.ui.uicommonweb.models.storage.NfsStorageModel nfsModel = ( ( org.ovirt.engine.ui.uicommonweb.models.storage.NfsStorageModel ) ( item ) ) ; nfsModel.getPathChangedEvent ( ) . addListener ( this ) ; } } } }
Source:
private static java.lang.String getModules ( java.util.Map < java.lang.String , org.ovirt.engine.exttool.core.ModuleService > modules ) { java.lang.StringBuilder sb = new java.lang.StringBuilder ( ) ; for ( org.ovirt.engine.exttool.core.ModuleService entry : modules.values ( ) ) { sb.append ( java.lang.String.format ( " %-10s - %s%n" , entry.getName ( ) , entry.getDescription ( ) ) ) ; } return sb.toString ( ) ; }

Target:
private static java.lang.String getModules ( java.util.Map < java.lang.String , org.ovirt.engine.exttool.core.ModuleService > modules ) { java.lang.StringBuilder sb = new java.lang.StringBuilder ( ) ; for ( java.util.Map.Entry < java.lang.String , org.ovirt.engine.exttool.core.ModuleService > entry : new java.util.TreeMap ( modules ) . entrySet ( ) ) { sb.append ( java.lang.String.format ( " %-10s - %s%n" , entry.getKey ( ) , entry.getValue ( ) . getDescription ( ) ) ) ; } return sb.toString ( ) ; }
Source:
private void refreshLunSize ( org.ovirt.engine.api.model.Action action ) { java.util.List < org.ovirt.engine.api.model.LogicalUnit > incomingLuns = action.getLogicalUnits ( ) . getLogicalUnits ( ) ; if ( ! ( incomingLuns.isEmpty ( ) ) ) { org.ovirt.engine.core.common.action.ExtendSANStorageDomainParameters params = createParameters ( guid , incomingLuns , false ) ; performAction ( VdcActionType.RefreshLunsSize , params ) ; } }

Target:
public javax.ws.rs.core.Response refreshLuns ( org.ovirt.engine.api.model.Action action ) { java.util.List < org.ovirt.engine.api.model.LogicalUnit > incomingLuns ; if ( action.isSetLogicalUnits ( ) ) { incomingLuns = action.getLogicalUnits ( ) . getLogicalUnits ( ) ; } else { incomingLuns = java.util.Collections.emptyList ( ) ; } org.ovirt.engine.core.common.action.ExtendSANStorageDomainParameters params = createParameters ( guid , incomingLuns , false ) ; return performAction ( VdcActionType.RefreshLunsSize , params ) ; }
Source:
private void createSnapshot ( ) { org.ovirt.engine.core.common.businessentities.VM vm = ( ( org.ovirt.engine.core.common.businessentities.VM ) ( getSelectedItem ( ) ) ) ; if ( ( vm == null ) || ( ( getWindow ( ) ) != null ) ) { return ; } org.ovirt.engine.ui.uicommonweb.models.vms.SnapshotModel model = org.ovirt.engine.ui.uicommonweb.models.vms.SnapshotModel.createNewSnapshotModel ( this ) ; model.setValidateByVmSnapshots ( true ) ; setWindow ( model ) ; model.setVm ( vm ) ; model.initialize ( ) ; }

Target:
private void createSnapshot ( ) { org.ovirt.engine.core.common.businessentities.VM vm = org.ovirt.engine.ui.uicommonweb.models.vms.VmListModel.getSelectedItem ( ) ; if ( ( vm == null ) || ( ( org.ovirt.engine.ui.uicommonweb.models.vms.VmListModel.getWindow ( ) ) != null ) ) { return ; } org.ovirt.engine.ui.uicommonweb.models.vms.SnapshotModel model = org.ovirt.engine.ui.uicommonweb.models.vms.SnapshotModel.createNewSnapshotModel ( this ) ; model.setValidateByVmSnapshots ( true ) ; setWindow ( model ) ; model.setVm ( vm ) ; model.initialize ( ) ; }
Source:
private void expandTree ( com.google.gwt.user.cellview.client.TreeNode node , boolean collapse ) { if ( node == null ) { return ; } if ( ( node.getChildCount ( ) ) > 0 ) { for ( int i = 0 ; i < ( node.getChildCount ( ) ) ; i ++ ) { expandTree ( node.setChildOpen ( i , collapse ) , collapse ) ; } } }

Target:
private void expandTree ( com.google.gwt.user.cellview.client.TreeNode node , boolean expand , int expandFromLevel ) { if ( node == null ) { return ; } if ( ( node.getChildCount ( ) ) > 0 ) { for ( int i = 0 ; i < ( node.getChildCount ( ) ) ; i ++ ) { boolean expandNode = ( 0 < expandFromLevel ) ? ! expand : expand ; expandTree ( node.setChildOpen ( i , expandNode ) , expand , ( expandFromLevel - 1 ) ) ; } } }
Source:
public void testUrlWithPaginationAndTypes ( ) { org.ovirt.engine.core.common.queries.ErrataFilter errataFilter = new org.ovirt.engine.core.common.queries.ErrataFilter ( ) ; errataFilter.setErrataTypes ( java.util.EnumSet.of ( Erratum.ErrataType.BUGFIX , Erratum.ErrataType.SECURITY ) ) ; errataFilter.setPageSize ( 20 ) ; errataFilter.setPageNumber ( 3 ) ; org.ovirt.engine.core.bll.host.provider.foreman.FilteredErrataRelativeUrlBuilder underTest = createFilteredErrataRelativeUrlBuilder ( errataFilter ) ; org.junit.Assert.assertEquals ( "/katello/api/v2/systems/xxx/errata?search=type+%3D+bugfix+or+type+%3D+security&page=3&per_page=20" , underTest.build ( ) ) ; }

Target:
public void testUrlWithPaginationAndTypes ( ) { org.ovirt.engine.core.common.queries.ErrataFilter errataFilter = new org.ovirt.engine.core.common.queries.ErrataFilter ( ) ; errataFilter.setErrataTypes ( java.util.EnumSet.of ( Erratum.ErrataType.BUGFIX , Erratum.ErrataType.SECURITY ) ) ; errataFilter.setPageSize ( 20 ) ; errataFilter.setPageNumber ( 3 ) ; org.ovirt.engine.core.bll.host.provider.foreman.FilteredErrataRelativeUrlBuilder underTest = createFilteredErrataRelativeUrlBuilder ( errataFilter ) ; org.junit.jupiter.api.Assertions.assertEquals ( "/katello/api/v2/systems/xxx/errata?search=type+%3D+bugfix+or+type+%3D+security&page=3&per_page=20" , underTest.build ( ) ) ; }
Source:
public static void GetLowUtilizationForPowerSave ( 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.LowUtilizationForPowerSave , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }

Target:
public static 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.RunQuery ( VdcQueryType.GetGlusterHooks , new org.ovirt.engine.core.common.queries.gluster.GlusterParameters ( clusterId ) , aQuery ) ; }
Source:
public void start ( ) { java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > list = new java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > ( ) ; for ( java.lang.Object item : getSelectedItems ( ) ) { org.ovirt.engine.core.common.businessentities.VDS vds = ( ( org.ovirt.engine.core.common.businessentities.VDS ) ( item ) ) ; list.add ( new org.ovirt.engine.core.common.action.FenceVdsActionParameters ( vds.getId ( ) , org.ovirt.engine.core.common.businessentities.FenceActionType.Start ) ) ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runMultipleAction ( VdcActionType.StartVds , list , new org.ovirt.engine.ui.uicompat.IFrontendMultipleActionAsyncCallback ( ) { @ java.lang.Override public void executed ( org.ovirt.engine.ui.uicompat.FrontendMultipleActionAsyncResult result ) { } } , null ) ; }

Target:
private void refreshCapabilities ( ) { java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > list = new java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > ( ) ; for ( java.lang.Object item : getSelectedItems ( ) ) { org.ovirt.engine.core.common.businessentities.VDS vds = ( ( org.ovirt.engine.core.common.businessentities.VDS ) ( item ) ) ; list.add ( new org.ovirt.engine.core.common.action.VdsActionParameters ( vds.getId ( ) ) ) ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runMultipleAction ( VdcActionType.RefreshHostCapabilities , list , new org.ovirt.engine.ui.uicompat.IFrontendMultipleActionAsyncCallback ( ) { @ java.lang.Override public void executed ( org.ovirt.engine.ui.uicompat.FrontendMultipleActionAsyncResult result ) { } } , null ) ; }
Source:
protected com.google.gwt.user.client.ui.TreeItem getLeafItem ( org.ovirt.engine.core.common.businessentities.Disk disk ) { if ( ( disk.getDiskStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.Disk.DiskStorageType.IMAGE ) ) { return getSnapshotNode ( ( ( org.ovirt.engine.core.common.businessentities.DiskImage ) ( disk ) ) . getSnapshots ( ) ) ; } else { return null ; } }

Target:
protected com.google.gwt.user.client.ui.TreeItem getLeafItem ( org.ovirt.engine.core.common.businessentities.storage.Disk disk ) { if ( ( disk.getDiskStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.storage.Disk.DiskStorageType.IMAGE ) ) { return getSnapshotNode ( ( ( org.ovirt.engine.core.common.businessentities.storage.DiskImage ) ( disk ) ) . getSnapshots ( ) ) ; } else { return null ; } }
Source:
public 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 ; } } ; getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.MaxVdsMemOverCommitForServers , getDefaultConfigurationVersion ( ) ) , 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:
public void setup ( ) { executor = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.pm.HostFenceActionExecutor ( fencedHost , new org.ovirt.engine.core.common.businessentities.FencingPolicy ( ) ) ) ; org.mockito.Mockito.doReturn ( agentExecutor1 ) . doReturn ( agentExecutor2 ) . when ( executor ) . createFenceActionExecutor ( org.mockito.Matchers.any ( java.util.List.class ) ) ; }

Target:
public void setup ( ) { executor = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.pm.HostFenceActionExecutor ( fencedHost , new org.ovirt.engine.core.common.businessentities.FencingPolicy ( ) ) ) ; org.mockito.Mockito.doReturn ( agentExecutor1 ) . doReturn ( agentExecutor2 ) . when ( executor ) . createFenceActionExecutor ( org.mockito.ArgumentMatchers.any ( java.util.List.class ) ) ; }
Source:
public void testExecuteCommand ( ) { setVolumeId ( volumeWithRemoveBricksTask ) ; mockBackend ( true , null ) ; org.junit.Assert.assertTrue ( cmd.validate ( ) ) ; cmd.executeCommand ( ) ; org.mockito.Mockito.verify ( cmd , org.mockito.Mockito.times ( 1 ) ) . endStepJobAborted ( org.mockito.Matchers.any ( java.lang.String.class ) ) ; org.mockito.Mockito.verify ( cmd , org.mockito.Mockito.times ( 1 ) ) . releaseVolumeLock ( ) ; org.junit.Assert.assertEquals ( AuditLogType.GLUSTER_VOLUME_REMOVE_BRICKS_STOP , cmd.getAuditLogTypeValue ( ) ) ; }

Target:
public void testExecuteCommand ( ) { setVolumeId ( volumeWithRemoveBricksTask ) ; mockBackend ( true , null ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateSuccess ( cmd ) ; cmd.executeCommand ( ) ; org.mockito.Mockito.verify ( cmd , org.mockito.Mockito.times ( 1 ) ) . endStepJobAborted ( org.mockito.Matchers.any ( java.lang.String.class ) ) ; org.mockito.Mockito.verify ( cmd , org.mockito.Mockito.times ( 1 ) ) . releaseVolumeLock ( ) ; org.junit.Assert.assertEquals ( AuditLogType.GLUSTER_VOLUME_REMOVE_BRICKS_STOP , cmd.getAuditLogTypeValue ( ) ) ; }
Source:
public void readData ( java.io.ObjectInputStream dis ) { synchronized ( ovirt_engine_dwh.historyetl_3_2.HistoryETL.copyOfevent_outputStruct.commonByteArrayLock ) { try { int length = 0 ; this . log_time = readDate ( dis ) ; this . log_type_name = readString ( dis ) ; this . log_type = dis.readInt ( ) ; this . severity = dis.readInt ( ) ; this . message = readString ( dis ) ; } catch ( java.io.IOException e ) { throw new java.lang.RuntimeException ( e ) ; } } }

Target:
public void readData ( java.io.ObjectInputStream dis ) { synchronized ( ovirt_engine_dwh.historyetl_3_2.HistoryETL.copyOfevent_outputStruct.commonByteArrayLock_OVIRT_ENGINE_DWH_HistoryETL ) { try { int length = 0 ; this . log_time = readDate ( dis ) ; this . log_type_name = readString ( dis ) ; this . log_type = dis.readInt ( ) ; this . severity = dis.readInt ( ) ; this . message = readString ( dis ) ; } catch ( java.io.IOException e ) { throw new java.lang.RuntimeException ( e ) ; } } }
Source:
public static void GetWANColorDepth ( 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 ? org.ovirt.engine.ui.uicommonweb.models.vms.WanColorDepth.fromInt ( ( ( java.lang.Integer ) ( source ) ) . intValue ( ) ) : org.ovirt.engine.ui.uicommonweb.models.vms.WanColorDepth.depth16 ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.WANColorDepth ) , aQuery ) ; }

Target:
public static void GetWANColorDepth ( 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 ? org.ovirt.engine.ui.uicommonweb.models.vms.WanColorDepth.fromInt ( ( ( java.lang.Integer ) ( source ) ) . intValue ( ) ) : org.ovirt.engine.ui.uicommonweb.models.vms.WanColorDepth.depth16 ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.WANColorDepth , org.ovirt.engine.core.common.config.Config.DefaultConfigurationVersion ) , aQuery ) ; }
Source:
private static java.util.List < org.ovirt.engine.api.extensions.ExtMap > flatGroups ( org.ovirt.engine.api.extensions.ExtMap entity , org.ovirt.engine.api.extensions.ExtKey key , java.util.List < org.ovirt.engine.api.extensions.ExtMap > accumulator ) { for ( org.ovirt.engine.api.extensions.ExtMap group : entity.< java.util.List < org.ovirt.engine.api.extensions.ExtMap > > get ( key , java.util.Collections.< org.ovirt.engine.api.extensions.ExtMap > emptyList ( ) ) ) { accumulator.add ( group ) ; org.ovirt.engine.core.bll.aaa.CreateUserSessionCommand.flatGroups ( group , Authz.GroupRecord.GROUPS , accumulator ) ; } return accumulator ; }

Target:
private static void flatGroups ( org.ovirt.engine.api.extensions.ExtMap entity , org.ovirt.engine.api.extensions.ExtKey key , java.util.List < java.lang.String > accumulator ) { for ( org.ovirt.engine.api.extensions.ExtMap group : entity.< java.util.Collection < org.ovirt.engine.api.extensions.ExtMap > > get ( key , java.util.Collections.< org.ovirt.engine.api.extensions.ExtMap > emptyList ( ) ) ) { if ( ! ( accumulator.contains ( group.< java.lang.String > get ( Authz.GroupRecord.ID ) ) ) ) { accumulator.add ( group.< java.lang.String > get ( Authz.GroupRecord.ID ) ) ; org.ovirt.engine.core.bll.aaa.CreateUserSessionCommand.flatGroups ( group , Authz.GroupRecord.GROUPS , accumulator ) ; } } }
Source:
public static < TSource > java.lang.Iterable < TSource > Where ( java.lang.Iterable < TSource > source , org.ovirt.engine.ui.uicommonweb.Linq.IPredicate < TSource > predicate ) { java.util.ArrayList < TSource > list = new java.util.ArrayList < TSource > ( ) ; for ( TSource item : source ) { if ( predicate.Match ( item ) ) { list.add ( item ) ; } } return list ; }

Target:
public static < TSource > java.lang.Iterable < TSource > where ( java.lang.Iterable < TSource > source , org.ovirt.engine.ui.uicommonweb.Linq.IPredicate < TSource > predicate ) { java.util.ArrayList < TSource > list = new java.util.ArrayList < TSource > ( ) ; for ( TSource item : source ) { if ( predicate.match ( item ) ) { list.add ( item ) ; } } return list ; }
Source:
public javax.ws.rs.core.Response doClone ( org.ovirt.engine.api.model.Action action ) { validateParameters ( action , "vm.name" ) ; org.ovirt.engine.core.common.businessentities.VM vm = getEntity ( org.ovirt.engine.core.common.businessentities.VM.class , VdcQueryType.GetVmByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( guid ) , ( "VM: id=" + ( guid ) ) ) ; org.ovirt.engine.core.common.action.CloneVmParameters cloneVmParameters = new org.ovirt.engine.core.common.action.CloneVmParameters ( vm , action.getVm ( ) . getName ( ) ) ; cloneVmParameters.setMakeCreatorExplicitOwner ( isFiltered ( ) ) ; javax.ws.rs.core.Response response = doAction ( VdcActionType.CloneVm , cloneVmParameters , action ) ; return response ; }

Target:
public javax.ws.rs.core.Response doClone ( org.ovirt.engine.api.model.Action action ) { validateParameters ( action , "vm.name" ) ; org.ovirt.engine.core.common.businessentities.VM vm = getEntity ( org.ovirt.engine.core.common.businessentities.VM.class , VdcQueryType.GetVmByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( guid ) , ( "VM: id=" + ( guid ) ) ) ; org.ovirt.engine.core.common.action.CloneVmParameters cloneVmParameters = new org.ovirt.engine.core.common.action.CloneVmParameters ( vm , action.getVm ( ) . getName ( ) ) ; cloneVmParameters.setMakeCreatorExplicitOwner ( isFiltered ( ) ) ; javax.ws.rs.core.Response response = doAction ( ActionType.CloneVm , cloneVmParameters , action ) ; return response ; }
Source:
public void testGuidListValuesWithOneGuid ( ) { java.lang.String listValues = "e61f7070-cd52-46ca-88c2-686e1c70fe44" ; java.util.List < org.ovirt.engine.core.compat.Guid > stringList = org.ovirt.engine.core.compat.Guid.createGuidListFromString ( listValues ) ; java.util.List < org.ovirt.engine.core.compat.Guid > expectedList = new java.util.ArrayList < > ( ) ; expectedList.add ( new org.ovirt.engine.core.compat.Guid ( "e61f7070-cd52-46ca-88c2-686e1c70fe44" ) ) ; org.junit.Assert.assertEquals ( expectedList , stringList ) ; }

Target:
public void testGuidListValuesWithOneGuid ( ) { java.lang.String listValues = "e61f7070-cd52-46ca-88c2-686e1c70fe44" ; java.util.List < org.ovirt.engine.core.compat.Guid > stringList = org.ovirt.engine.core.compat.Guid.createGuidListFromString ( listValues ) ; java.util.List < org.ovirt.engine.core.compat.Guid > expectedList = new java.util.ArrayList < > ( ) ; expectedList.add ( new org.ovirt.engine.core.compat.Guid ( "e61f7070-cd52-46ca-88c2-686e1c70fe44" ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( expectedList , stringList ) ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult validateStatusForActivation ( ) { org.ovirt.engine.core.bll.ValidationResult existsValidation = exists ( ) ; if ( ! ( existsValidation.isValid ( ) ) ) { return existsValidation ; } if ( ( org.ovirt.engine.core.common.businessentities.VDSStatus.Up ) == ( vds.getStatus ( ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.VDS_ALREADY_UP ) ; } if ( ( org.ovirt.engine.core.common.businessentities.VDSStatus.NonResponsive ) == ( vds.getStatus ( ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.VDS_NON_RESPONSIVE ) ; } return ValidationResult.VALID ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult validateStatusForActivation ( ) { org.ovirt.engine.core.bll.ValidationResult existsValidation = exists ( ) ; if ( ! ( existsValidation.isValid ( ) ) ) { return existsValidation ; } if ( ( org.ovirt.engine.core.common.businessentities.VDSStatus.Up ) == ( vds.getStatus ( ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.VDS_ALREADY_UP ) ; } if ( ( org.ovirt.engine.core.common.businessentities.VDSStatus.NonResponsive ) == ( vds.getStatus ( ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.VDS_NON_RESPONSIVE ) ; } return ValidationResult.VALID ; }
Source:
public void setUp ( ) { super . setUp ( ) ; org.mockito.Mockito.doReturn ( true ) . when ( cmd ) . checkNumberOfMonitors ( ) ; org.mockito.Mockito.doReturn ( true ) . when ( cmd ) . validateCustomProperties ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.VmStatic.class ) , org.mockito.Matchers.anyListOf ( java.lang.String.class ) ) ; initCommandMethods ( ) ; initDestSDs ( ) ; generateStorageToDisksMap ( ) ; cmd.init ( ) ; }

Target:
public void setUp ( ) { super . setUp ( ) ; org.mockito.Mockito.doReturn ( true ) . when ( cmd ) . checkNumberOfMonitors ( ) ; org.mockito.Mockito.doReturn ( true ) . when ( cmd ) . validateCustomProperties ( org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.common.businessentities.VmStatic.class ) , org.mockito.ArgumentMatchers.anyListOf ( java.lang.String.class ) ) ; initCommandMethods ( ) ; initDestSDs ( ) ; generateStorageToDisksMap ( ) ; cmd.init ( ) ; }
Source:
public org.ovirt.engine.core.common.action.VdcReturnValueBase endAction ( org.ovirt.engine.core.bll.tasks.interfaces.SPMTask task , org.ovirt.engine.core.bll.job.ExecutionContext context ) { org.ovirt.engine.core.common.businessentities.AsyncTasks dbAsyncTask = task.getParameters ( ) . getDbAsyncTask ( ) ; org.ovirt.engine.core.common.action.VdcActionType actionType = getEndActionType ( dbAsyncTask ) ; org.ovirt.engine.core.common.action.VdcActionParametersBase parameters = dbAsyncTask.getActionParameters ( ) ; org.ovirt.engine.core.bll.CommandBase < ? > command = org.ovirt.engine.core.bll.CommandsFactory.createCommand ( actionType , parameters ) ; command.setContext ( new org.ovirt.engine.core.bll.context.CommandContext ( context ) ) ; return new org.ovirt.engine.core.bll.tasks.DecoratedCommand ( command ) . endAction ( ) ; }

Target:
public org.ovirt.engine.core.bll.tasks.SPMAsyncTask concreteCreateTask ( org.ovirt.engine.core.compat.Guid taskId , org.ovirt.engine.core.bll.CommandBase command , org.ovirt.engine.core.common.asynctasks.AsyncTaskCreationInfo asyncTaskCreationInfo , org.ovirt.engine.core.common.action.VdcActionType parentCommand ) { return coCoAsyncTaskHelper.concreteCreateTask ( taskId , command , asyncTaskCreationInfo , parentCommand ) ; }
Source:
public void successVmInPreviewForAttachedSnapshot ( ) { initializeCommand ( new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) ) ; initSnapshotValidator ( ) ; initVmForSpace ( ) ; initVmDiskImage ( false ) ; initSrcStorageDomain ( ) ; initDestStorageDomain ( StorageType.NFS ) ; vmDevice.setSnapshotId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateSuccess ( command ) ; }

Target:
public void successVmInPreviewForAttachedSnapshot ( ) { initializeCommand ( new org.ovirt.engine.core.common.businessentities.storage.DiskImage ( ) , VmEntityType.VM ) ; initSnapshotValidator ( ) ; initVmForSpace ( ) ; initSrcStorageDomain ( ) ; initDestStorageDomain ( StorageType.NFS ) ; vmDevice.setSnapshotId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateSuccess ( command ) ; }
Source:
public void testGetSysprepFileName ( ) { org.junit.Assert.assertEquals ( org.ovirt.engine.core.utils.OsRepositoryImplTest.SYSPREP_INF , OsRepositoryImpl.INSTANCE.getSysprepFileName ( 1 , null ) ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.utils.OsRepositoryImplTest.UNATTEND_XML , OsRepositoryImpl.INSTANCE.getSysprepFileName ( 11 , null ) ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.utils.OsRepositoryImplTest.UNATTEND_XML , OsRepositoryImpl.INSTANCE.getSysprepFileName ( 20 , null ) ) ; }

Target:
public void testGetSysprepFileName ( ) { org.junit.jupiter.api.Assertions.assertEquals ( org.ovirt.engine.core.utils.OsRepositoryImplTest.SYSPREP_INF , OsRepositoryImpl.INSTANCE.getSysprepFileName ( 1 , null ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( org.ovirt.engine.core.utils.OsRepositoryImplTest.UNATTEND_XML , OsRepositoryImpl.INSTANCE.getSysprepFileName ( 11 , null ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( org.ovirt.engine.core.utils.OsRepositoryImplTest.UNATTEND_XML , OsRepositoryImpl.INSTANCE.getSysprepFileName ( 20 , null ) ) ; }
Source:
private boolean isVMPartOfManualPool ( ) { if ( ( org.ovirt.engine.core.bll.RunVmCommand.getVm ( ) . getVmPoolId ( ) ) == null ) { return false ; } final org.ovirt.engine.core.common.businessentities.VmPool vmPool = org.ovirt.engine.core.bll.RunVmCommand.getDbFacade ( ) . getVmPoolDao ( ) . get ( org.ovirt.engine.core.bll.RunVmCommand.getVm ( ) . getVmPoolId ( ) ) ; return vmPool.getVmPoolType ( ) . equals ( VmPoolType.Manual ) ; }

Target:
private boolean isVmPartOfManualPool ( ) { if ( ( org.ovirt.engine.core.bll.RunVmCommand.getVm ( ) . getVmPoolId ( ) ) == null ) { return false ; } final org.ovirt.engine.core.common.businessentities.VmPool vmPool = org.ovirt.engine.core.bll.RunVmCommand.getDbFacade ( ) . getVmPoolDao ( ) . get ( org.ovirt.engine.core.bll.RunVmCommand.getVm ( ) . getVmPoolId ( ) ) ; return vmPool.getVmPoolType ( ) . equals ( VmPoolType.Manual ) ; }
Source:
public void getVolumeSnapshotSchedule ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid volumeId ) { 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.GetGlusterVolumeSnapshotScheduleByVolumeId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( volumeId ) , aQuery ) ; }

Target:
public void getVolumeSnapshotSchedule ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid volumeId ) { 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.GetGlusterVolumeSnapshotScheduleByVolumeId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( volumeId ) , aQuery ) ; }
Source:
private void removeDiskImages ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > images = org.ovirt.engine.core.bll.ImagesHandler.filterImageDisks ( getVm ( ) . getDiskMap ( ) . values ( ) , true , false , true ) ; for ( org.ovirt.engine.core.common.businessentities.DiskImage image : images ) { image.setStorageIds ( new java.util.ArrayList < org.ovirt.engine.core.compat.Guid > ( java.util.Arrays.asList ( org.ovirt.engine.core.bll.RemoveVmFromImportExportCommand.getParameters ( ) . getStorageDomainId ( ) ) ) ) ; image.setStoragePoolId ( org.ovirt.engine.core.bll.RemoveVmFromImportExportCommand.getParameters ( ) . getStoragePoolId ( ) ) ; } removeVmImages ( images ) ; }

Target:
private void removeDiskImages ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > images = org.ovirt.engine.core.bll.ImagesHandler.filterImageDisks ( getVm ( ) . getDiskMap ( ) . values ( ) , true , false , true ) ; for ( org.ovirt.engine.core.common.businessentities.storage.DiskImage image : images ) { image.setStorageIds ( new java.util.ArrayList < org.ovirt.engine.core.compat.Guid > ( java.util.Arrays.asList ( org.ovirt.engine.core.bll.RemoveVmFromImportExportCommand.getParameters ( ) . getStorageDomainId ( ) ) ) ) ; image.setStoragePoolId ( org.ovirt.engine.core.bll.RemoveVmFromImportExportCommand.getParameters ( ) . getStoragePoolId ( ) ) ; } removeVmImages ( images ) ; }
Source:
public void testCompareTo ( ) { org.ovirt.engine.core.compat.NGuid guid1 = org.ovirt.engine.core.compat.NGuid.createGuidFromString ( "5b411bc1-c220-4421-9abd-cfa484aecb6e" ) ; org.ovirt.engine.core.compat.NGuid guid2 = org.ovirt.engine.core.compat.NGuid.createGuidFromString ( "5b411bc1-c220-4421-9abd-cfa484aecb6f" ) ; assertTrue ( ( ( guid1.compareTo ( guid2 ) ) < 0 ) ) ; assertTrue ( ( ( guid1.compareTo ( guid1 ) ) == 0 ) ) ; assertTrue ( ( ( guid2.compareTo ( guid1 ) ) > 0 ) ) ; }

Target:
public void testCompareTo ( ) { org.ovirt.engine.core.compat.NGuid guid1 = org.ovirt.engine.core.compat.NGuid.createGuidFromString ( "5b411bc1-c220-4421-9abd-cfa484aecb6e" ) ; org.ovirt.engine.core.compat.NGuid guid2 = org.ovirt.engine.core.compat.NGuid.createGuidFromString ( "5b411bc1-c220-4421-9abd-cfa484aecb6f" ) ; org.junit.Assert.assertTrue ( ( ( guid1.compareTo ( guid2 ) ) < 0 ) ) ; org.junit.Assert.assertTrue ( ( ( guid1.compareTo ( guid1 ) ) == 0 ) ) ; org.junit.Assert.assertTrue ( ( ( guid2.compareTo ( guid1 ) ) > 0 ) ) ; }
Source:
public static void getDomainListViaPublic ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , boolean filterInternalDomain ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? new java.util.ArrayList < java.lang.String > ( ( ( java.util.ArrayList < java.lang.String > ) ( source ) ) ) : new java.util.ArrayList < java.lang.String > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetDomainListParameters tempVar = new org.ovirt.engine.core.common.queries.GetDomainListParameters ( ) ; tempVar.setFilterInternalDomain ( filterInternalDomain ) ; org.ovirt.engine.ui.frontend.Frontend.RunPublicQuery ( VdcQueryType.GetDomainList , tempVar , aQuery ) ; }

Target:
public static void getAAAProfilesListViaPublic ( 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 ? new java.util.ArrayList < java.lang.String > ( ( ( java.util.ArrayList < java.lang.String > ) ( source ) ) ) : new java.util.ArrayList < java.lang.String > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runPublicQuery ( VdcQueryType.GetAAAProfileList , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }
Source:
private java.util.List < org.ovirt.engine.core.common.action.VdcActionParametersBase > createActionParameterList ( final org.ovirt.engine.core.common.action.VdcActionParametersBase parameters , final int count ) { java.util.List < org.ovirt.engine.core.common.action.VdcActionParametersBase > result = new java.util.ArrayList < > ( ) ; for ( int i = 0 ; i < count ; i ++ ) { result.add ( parameters ) ; } return result ; }

Target:
private java.util.List < org.ovirt.engine.core.common.action.ActionParametersBase > createActionParameterList ( final org.ovirt.engine.core.common.action.ActionParametersBase parameters , final int count ) { java.util.List < org.ovirt.engine.core.common.action.ActionParametersBase > result = new java.util.ArrayList < > ( ) ; for ( int i = 0 ; i < count ; i ++ ) { result.add ( parameters ) ; } return result ; }
Source:
public static java.lang.String map ( org.ovirt.engine.api.model.DiskStorageType diskStorageType ) { switch ( diskStorageType ) { case IMAGE : return DiskStorageType.IMAGE.value ( ) ; case CINDER : return DiskStorageType.CINDER.value ( ) ; case LUN : return DiskStorageType.LUN.value ( ) ; default : return null ; } }

Target:
public static org.ovirt.engine.api.model.DiskStorageType map ( org.ovirt.engine.api.model.DiskStorageType diskStorageType ) { switch ( diskStorageType ) { case IMAGE : return org.ovirt.engine.api.model.DiskStorageType.IMAGE ; case CINDER : return org.ovirt.engine.api.model.DiskStorageType.CINDER ; case LUN : return org.ovirt.engine.api.model.DiskStorageType.LUN ; default : return null ; } }
Source:
public org.ovirt.engine.api.model.Networks list ( ) { java.util.List < org.ovirt.engine.api.model.Network > entities ; if ( isFiltered ( ) ) { org.ovirt.engine.core.common.queries.IdQueryParameters parameters = new org.ovirt.engine.core.common.queries.IdQueryParameters ( org.ovirt.engine.core.compat.Guid.Empty ) ; entities = getBackendCollection ( VdcQueryType.GetAllNetworks , parameters , SearchType.Network ) ; } else { entities = getBackendCollection ( SearchType.Network ) ; } org.ovirt.engine.api.model.Networks networks = mapCollection ( entities ) ; for ( org.ovirt.engine.api.model.Network network : networks.getNetworks ( ) ) { network.setDisplay ( null ) ; } return networks ; }

Target:
public org.ovirt.engine.api.model.Networks list ( ) { org.ovirt.engine.api.model.Networks networks ; if ( isFiltered ( ) ) { networks = mapCollection ( getBackendCollection ( queryType , getQueryParameters ( ) , SearchType.Network ) ) ; } else { networks = mapCollection ( getBackendCollection ( SearchType.Network ) ) ; } for ( org.ovirt.engine.api.model.Network network : networks.getNetworks ( ) ) { network.setDisplay ( null ) ; } return networks ; }
Source:
public static void getClusterList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > list = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ) ( source ) ) ; java.util.Collections.sort ( list , new org.ovirt.engine.core.common.businessentities.comparators.NameableComparator ( ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllVdsGroups , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }

Target:
public void getWANColorDepth ( 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 ? org.ovirt.engine.core.common.console.ConsoleOptions.WanColorDepth.fromInt ( ( ( java.lang.Integer ) ( source ) ) . intValue ( ) ) : org.ovirt.engine.core.common.console.ConsoleOptions.WanColorDepth.depth16 ; } } ; getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.WANColorDepth , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
private void updateModifiedNetworksNames ( ) { java.util.Collection < java.lang.String > networkNames = org.ovirt.engine.core.utils.linq.LinqUtils.transformToList ( org.ovirt.engine.core.bll.network.host.PersistentHostSetupNetworksCommand.getParameters ( ) . getNetworkAttachments ( ) , new org.ovirt.engine.core.bll.network.host.function.NetworkNameFromNetworkAttachmentTransformationFunction ( ) ) ; org.ovirt.engine.core.bll.network.host.PersistentHostSetupNetworksCommand.getParameters ( ) . setNetworkNames ( org.apache.commons.lang.StringUtils.join ( networkNames , ", " ) ) ; }

Target:
public org.ovirt.engine.core.common.AuditLogType getAuditLogTypeValue ( ) { if ( org.apache.commons.lang.StringUtils.isEmpty ( org.ovirt.engine.core.bll.network.host.PersistentHostSetupNetworksCommand.getParameters ( ) . getNetworkNames ( ) ) ) { return org.ovirt.engine.core.bll.network.host.PersistentHostSetupNetworksCommand.getSucceeded ( ) ? org.ovirt.engine.core.common.AuditLogType.PERSIST_SETUP_NETWORK_ON_HOST_FINISHED : org.ovirt.engine.core.common.AuditLogType.PERSIST_SETUP_NETWORK_ON_HOST_FAILED ; } else { return org.ovirt.engine.core.bll.network.host.PersistentHostSetupNetworksCommand.getSucceeded ( ) ? org.ovirt.engine.core.common.AuditLogType.PERSIST_NETWORK_ON_HOST_FINISHED : org.ovirt.engine.core.common.AuditLogType.PERSIST_NETWORK_ON_HOST_FAILED ; } }
Source:
protected void revertTasks ( ) { org.ovirt.engine.core.compat.Guid destImageId = org.ovirt.engine.core.bll.CreateImageTemplateCommand.getDestinationDiskImage ( ) . getImageId ( ) ; org.ovirt.engine.core.common.action.RemoveImageParameters p = new org.ovirt.engine.core.common.action.RemoveImageParameters ( destImageId ) ; p.setEntityId ( destImageId ) ; p.setParentParameters ( p ) ; p.setParentCommand ( VdcActionType.RemoveImage ) ; org.ovirt.engine.core.common.action.VdcReturnValueBase returnValue = checkAndPerformRollbackUsingCommand ( VdcActionType.RemoveImage , p ) ; if ( returnValue.getSucceeded ( ) ) { startPollingAsyncTasks ( returnValue.getInternalVdsmTaskIdList ( ) ) ; } }

Target:
protected void revertTasks ( ) { org.ovirt.engine.core.compat.Guid destImageId = org.ovirt.engine.core.bll.CreateImageTemplateCommand.getDestinationDiskImage ( ) . getImageId ( ) ; org.ovirt.engine.core.common.action.RemoveImageParameters p = new org.ovirt.engine.core.common.action.RemoveImageParameters ( destImageId ) ; p.setEntityInfo ( new org.ovirt.engine.core.common.asynctasks.EntityInfo ( org.ovirt.engine.core.common.VdcObjectType.VM , destImageId ) ) ; p.setParentParameters ( p ) ; p.setParentCommand ( VdcActionType.RemoveImage ) ; org.ovirt.engine.core.common.action.VdcReturnValueBase returnValue = checkAndPerformRollbackUsingCommand ( VdcActionType.RemoveImage , p ) ; if ( returnValue.getSucceeded ( ) ) { startPollingAsyncTasks ( returnValue.getInternalVdsmTaskIdList ( ) ) ; } }
Source:
public java.lang.String getValue ( org.ovirt.engine.ui.uicommonweb.models.EntityModel object ) { org.ovirt.engine.core.common.businessentities.LunDisk disk = ( ( org.ovirt.engine.core.common.businessentities.LunDisk ) ( ( ( org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel ) ( object.getEntity ( ) ) ) . getDisk ( ) ) ) ; return disk.getDiskDescription ( ) ; }

Target:
protected java.lang.Long getRawValue ( org.ovirt.engine.ui.uicommonweb.models.EntityModel object ) { org.ovirt.engine.core.common.businessentities.storage.LunDisk disk = ( ( org.ovirt.engine.core.common.businessentities.storage.LunDisk ) ( ( ( org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel ) ( object.getEntity ( ) ) ) . getDisk ( ) ) ) ; return ( ( long ) ( disk.getLun ( ) . getDeviceSize ( ) ) ) ; }
Source:
private void testAddingMixedTypes ( org.ovirt.engine.core.compat.Version version , boolean addingMixedTypesShouldSucceed ) { storagePool.setcompatibility_version ( version ) ; org.ovirt.engine.core.bll.ValidationResult attachDomainResult = validator.validateDomainCanBeAttachedToPool ( ) ; if ( addingMixedTypesShouldSucceed ) { org.junit.Assert.assertTrue ( ( "Attaching an ISCSI domain to a pool with NFS domain with with mixed type allowed failed, version: " + version ) , attachDomainResult.isValid ( ) ) ; } else { org.junit.Assert.assertFalse ( ( "Attaching an ISCSI domain to a pool with NFS domain with no mixed type allowed succeeded, version: " + version ) , attachDomainResult.isValid ( ) ) ; assertFailingMessage ( "Attaching an ISCSI domain to a pool with NFS domain with no mixed type failed with the wrong message" , attachDomainResult , VdcBllMessages.ACTION_TYPE_FAILED_MIXED_STORAGE_TYPES_NOT_ALLOWED ) ; } }

Target:
private void testAddingMixedTypes ( org.ovirt.engine.core.compat.Version version , boolean addingMixedTypesShouldSucceed ) { storagePool.setCompatibilityVersion ( version ) ; org.ovirt.engine.core.bll.ValidationResult attachDomainResult = validator.validateDomainCanBeAttachedToPool ( ) ; if ( addingMixedTypesShouldSucceed ) { org.junit.Assert.assertTrue ( ( "Attaching an ISCSI domain to a pool with NFS domain with with mixed type allowed failed, version: " + version ) , attachDomainResult.isValid ( ) ) ; } else { org.junit.Assert.assertFalse ( ( "Attaching an ISCSI domain to a pool with NFS domain with no mixed type allowed succeeded, version: " + version ) , attachDomainResult.isValid ( ) ) ; assertFailingMessage ( "Attaching an ISCSI domain to a pool with NFS domain with no mixed type failed with the wrong message" , attachDomainResult , VdcBllMessages.ACTION_TYPE_FAILED_MIXED_STORAGE_TYPES_NOT_ALLOWED ) ; } }
Source:
public void testEjectCd ( ) throws java.lang.Exception { javax.ws.rs.core.UriInfo uriInfo = setUpBasicUriExpectations ( ) ; uriInfo = addMatrixParameterExpectations ( uriInfo , "current" ) ; setUriInfo ( uriInfo ) ; setUpEntityQueryExpectations ( getVm ( org.ovirt.engine.api.restapi.resource.BackendVmCdromResourceTest.A_ISO , org.ovirt.engine.api.restapi.resource.BackendVmCdromResourceTest.NO_ISO , VMStatus.Up ) ) ; setUpActionExpectations ( VdcActionType.ChangeDisk , org.ovirt.engine.core.common.action.ChangeDiskCommandParameters.class , new java.lang.String [ ] { "CdImagePath" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendVmCdromResourceTest.NO_ISO } , true , true ) ; org.ovirt.engine.api.model.Cdrom cdrom = getCdrom ( org.ovirt.engine.api.restapi.resource.BackendVmCdromResourceTest.NO_ISO ) ; cdrom = resource.update ( cdrom ) ; assertNull ( cdrom.getFile ( ) ) ; }

Target:
public void testEjectCd ( ) throws java.lang.Exception { javax.ws.rs.core.UriInfo uriInfo = setUpBasicUriExpectations ( ) ; uriInfo = addMatrixParameterExpectations ( uriInfo , "current" ) ; setUriInfo ( uriInfo ) ; setUpEntityQueryExpectations ( getVm ( org.ovirt.engine.api.restapi.resource.BackendVmCdromResourceTest.A_ISO , org.ovirt.engine.api.restapi.resource.BackendVmCdromResourceTest.NO_ISO , VMStatus.Up ) ) ; setUpActionExpectations ( ActionType.ChangeDisk , org.ovirt.engine.core.common.action.ChangeDiskCommandParameters.class , new java.lang.String [ ] { "CdImagePath" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendVmCdromResourceTest.NO_ISO } , true , true ) ; org.ovirt.engine.api.model.Cdrom cdrom = getCdrom ( org.ovirt.engine.api.restapi.resource.BackendVmCdromResourceTest.NO_ISO ) ; cdrom = resource.update ( cdrom ) ; assertNull ( cdrom.getFile ( ) ) ; }