auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private void saveSanStorage ( ) { org.ovirt.engine.ui.uicommonweb.models.storage.StorageModel storageModel = ( ( org.ovirt.engine.ui.uicommonweb.models.storage.StorageModel ) ( getWindow ( ) ) ) ; org.ovirt.engine.ui.uicommonweb.models.storage.SanStorageModel sanStorageModel = ( ( org.ovirt.engine.ui.uicommonweb.models.storage.SanStorageModel ) ( storageModel.getSelectedItem ( ) ) ) ; java.util.ArrayList < java.lang.String > usedLunsMessages = sanStorageModel.getUsedLunsMessages ( ) ; if ( usedLunsMessages.isEmpty ( ) ) { onSaveSanStorage ( ) ; } else { forceCreationWarning ( usedLunsMessages ) ; } }

Target:
private void saveSanStorage ( ) { org.ovirt.engine.ui.uicommonweb.models.storage.StorageModel storageModel = ( ( org.ovirt.engine.ui.uicommonweb.models.storage.StorageModel ) ( getWindow ( ) ) ) ; org.ovirt.engine.ui.uicommonweb.models.storage.SanStorageModel sanStorageModel = ( ( org.ovirt.engine.ui.uicommonweb.models.storage.SanStorageModel ) ( storageModel.getCurrentStorageItem ( ) ) ) ; java.util.ArrayList < java.lang.String > usedLunsMessages = sanStorageModel.getUsedLunsMessages ( ) ; if ( usedLunsMessages.isEmpty ( ) ) { onSaveSanStorage ( ) ; } else { forceCreationWarning ( usedLunsMessages ) ; } }
Source:
public int hashCode ( ) { return uuid.hashCode ( ) ; }

Target:
public boolean equals ( java.lang.Object obj ) { if ( ( this ) == obj ) { return true ; } if ( ! ( obj instanceof org.ovirt.engine.core.compat.Guid ) ) { return false ; } org.ovirt.engine.core.compat.Guid other = ( ( org.ovirt.engine.core.compat.Guid ) ( obj ) ) ; return java.util.Objects.equals ( uuid , other.uuid ) ; }
Source:
public static void GetVmListByClusterName ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String clusterName ) { 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 ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > vms = org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VM > Cast ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.IVdcQueryable > ) ( source ) ) ) ; return vms ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( ( "Vms: cluster=" + clusterName ) , org.ovirt.engine.core.common.interfaces.SearchType.VM ) , aQuery ) ; }

Target:
public static void getVmList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String poolName ) { 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 ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > vms = org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VM > cast ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.IVdcQueryable > ) ( source ) ) ) ; return vms ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( ( "Vms: pool=" + poolName ) , org.ovirt.engine.core.common.interfaces.SearchType.VM ) , aQuery ) ; }
Source:
public void testEnumCollectionToStringList ( ) { java.util.List < org.ovirt.engine.core.utils.EnumUtilsTest.EnumForTest > enumCollection = new java.util.ArrayList < org.ovirt.engine.core.utils.EnumUtilsTest.EnumForTest > ( ) ; enumCollection.add ( org.ovirt.engine.core.utils.EnumUtilsTest.EnumForTest.ENUM1 ) ; enumCollection.add ( org.ovirt.engine.core.utils.EnumUtilsTest.EnumForTest.ENUM2 ) ; java.util.List < java.lang.String > stringList = org.ovirt.engine.core.common.utils.EnumUtils.enumCollectionToStringList ( enumCollection ) ; org.junit.Assert.assertNotNull ( stringList ) ; org.junit.Assert.assertEquals ( 2 , stringList.size ( ) ) ; org.junit.Assert.assertTrue ( stringList.contains ( org.ovirt.engine.core.utils.EnumUtilsTest.EnumForTest.ENUM1.name ( ) ) ) ; org.junit.Assert.assertTrue ( stringList.contains ( org.ovirt.engine.core.utils.EnumUtilsTest.EnumForTest.ENUM2.name ( ) ) ) ; }

Target:
public void testEnumCollectionToStringList ( ) { java.util.List < org.ovirt.engine.core.utils.EnumUtilsTest.EnumForTesting > enumCollection = new java.util.ArrayList < org.ovirt.engine.core.utils.EnumUtilsTest.EnumForTesting > ( ) ; enumCollection.add ( org.ovirt.engine.core.utils.EnumUtilsTest.EnumForTesting.ENUM1 ) ; enumCollection.add ( org.ovirt.engine.core.utils.EnumUtilsTest.EnumForTesting.ENUM2 ) ; java.util.List < java.lang.String > stringList = org.ovirt.engine.core.common.utils.EnumUtils.enumCollectionToStringList ( enumCollection ) ; org.junit.Assert.assertNotNull ( stringList ) ; org.junit.Assert.assertEquals ( 2 , stringList.size ( ) ) ; org.junit.Assert.assertTrue ( stringList.contains ( org.ovirt.engine.core.utils.EnumUtilsTest.EnumForTesting.ENUM1.name ( ) ) ) ; org.junit.Assert.assertTrue ( stringList.contains ( org.ovirt.engine.core.utils.EnumUtilsTest.EnumForTesting.ENUM2.name ( ) ) ) ; }
Source:
public static void initCache ( org.ovirt.engine.ui.uicommonweb.models.LoginModel loginModel ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.cacheConfigValues ( new org.ovirt.engine.ui.frontend.AsyncQuery ( loginModel , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( target ) ; } } ) ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.initOsNames ( ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.initUniqueOsNames ( ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.initLinuxOsTypes ( ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.initWindowsOsTypes ( ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.initHasSpiceSupport ( ) ; }

Target:
public static void initCache ( org.ovirt.engine.ui.uicommonweb.models.LoginModel loginModel ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.cacheConfigValues ( new org.ovirt.engine.ui.frontend.AsyncQuery ( loginModel , new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object target , java.lang.Object returnValue ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( target ) ; } } ) ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.initOsNames ( ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.initUniqueOsNames ( ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.initLinuxOsTypes ( ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.initWindowsOsTypes ( ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.initHasSpiceSupport ( ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.initNicHotplugSupportMap ( ) ; }
Source:
private void DiskInterface_SelectedItemChanged ( ) { boolean isInternal = getIsInternal ( ) . getEntity ( ) ; org.ovirt.engine.core.common.businessentities.DiskInterface diskInterface = getDiskInterface ( ) . getSelectedItem ( ) ; getIsSgIoUnfiltered ( ) . setIsAvailable ( ( ( ! isInternal ) && ( DiskInterface.VirtIO_SCSI.equals ( diskInterface ) ) ) ) ; updateReadOnlyChangeability ( ) ; updatePlugChangeability ( ) ; }

Target:
private void DiskInterface_SelectedItemChanged ( ) { boolean isInternal = getIsInternal ( ) . getEntity ( ) ; org.ovirt.engine.core.common.businessentities.DiskInterface diskInterface = getDiskInterface ( ) . getSelectedItem ( ) ; getIsSgIoUnfiltered ( ) . setIsAvailable ( ( ( ! isInternal ) && ( DiskInterface.VirtIO_SCSI.equals ( diskInterface ) ) ) ) ; getIsScsiPassthrough ( ) . setIsAvailable ( ( ( ! isInternal ) && ( DiskInterface.VirtIO_SCSI.equals ( diskInterface ) ) ) ) ; updateScsiPassthroguhChangeability ( ) ; updateReadOnlyChangeability ( ) ; updatePlugChangeability ( ) ; }
Source:
protected org.ovirt.engine.core.common.businessentities.BaseDisk generateNewEntity ( ) { return new org.ovirt.engine.core.common.businessentities.BaseDisk ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , org.ovirt.engine.core.common.businessentities.DiskInterface.IDE , true , org.ovirt.engine.core.common.businessentities.PropagateErrors.Off , "DiskName" , "" , false , false , org.ovirt.engine.core.common.businessentities.ScsiGenericIO.FILTERED ) ; }

Target:
protected org.ovirt.engine.core.common.businessentities.BaseDisk generateNewEntity ( ) { org.ovirt.engine.core.common.businessentities.BaseDisk d = new org.ovirt.engine.core.common.businessentities.BaseDisk ( ) ; d.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; d.setDiskInterface ( DiskInterface.IDE ) ; d.setWipeAfterDelete ( true ) ; d.setPropagateErrors ( PropagateErrors.Off ) ; d.setDiskAlias ( "DiskName" ) ; d.setSgio ( ScsiGenericIO.FILTERED ) ; return d ; }
Source:
public static void getClusterNetworkList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { if ( ( aQuery.converterCallback ) == null ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.Network > ( ) ; } return source ; } } ; } org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllNetworksByClusterId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( clusterId ) , aQuery ) ; }

Target:
public static void getGlusterHostsNewlyAdded ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId , boolean isFingerprintRequired ) { 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.GetAddedGlusterServers , new org.ovirt.engine.core.common.queries.gluster.AddedGlusterServersParameters ( clusterId , isFingerprintRequired ) , aQuery ) ; }
Source:
protected void executeCommand ( ) { org.ovirt.engine.core.common.action.PersistentHostSetupNetworksParameters parameters = generateSyncAllHostNetworksParameters ( ) ; org.ovirt.engine.core.common.action.VdcReturnValueBase retVal = runInternalAction ( VdcActionType.PersistentHostSetupNetworks , parameters , cloneContextAndDetachFromParent ( ) ) ; if ( ! ( retVal.getSucceeded ( ) ) ) { propagateFailure ( retVal ) ; } else { setSucceeded ( true ) ; } }

Target:
protected void executeCommand ( ) { org.ovirt.engine.core.common.action.PersistentHostSetupNetworksParameters parameters = generateSyncAllHostNetworksParameters ( ) ; org.ovirt.engine.core.common.action.VdcReturnValueBase retVal = runInternalAction ( ActionType.PersistentHostSetupNetworks , parameters , cloneContextAndDetachFromParent ( ) ) ; if ( ! ( retVal.getSucceeded ( ) ) ) { propagateFailure ( retVal ) ; } else { setSucceeded ( true ) ; } }
Source:
public void testAddOperationAction ( ) { org.ovirt.engine.ui.frontend.communication.VdcOperation < org.ovirt.engine.core.common.action.VdcActionType , org.ovirt.engine.core.common.action.VdcActionParametersBase > testOperation = new org.ovirt.engine.ui.frontend.communication.VdcOperation < org.ovirt.engine.core.common.action.VdcActionType , org.ovirt.engine.core.common.action.VdcActionParametersBase > ( org.ovirt.engine.core.common.action.VdcActionType.AddNetworkOnProvider , new org.ovirt.engine.core.common.action.VdcActionParametersBase ( ) , null ) ; testManager.addOperation ( testOperation ) ; org.mockito.Mockito.verify ( mockOperationProcessor ) . processOperation ( testManager ) ; org.junit.Assert.assertEquals ( "Operations must match" , testOperation , testManager.pollOperation ( ) ) ; }

Target:
public void testAddOperationAction ( ) { org.ovirt.engine.ui.frontend.communication.VdcOperation < org.ovirt.engine.core.common.action.VdcActionType , org.ovirt.engine.core.common.action.VdcActionParametersBase > testOperation = new org.ovirt.engine.ui.frontend.communication.VdcOperation < org.ovirt.engine.core.common.action.VdcActionType , org.ovirt.engine.core.common.action.VdcActionParametersBase > ( org.ovirt.engine.core.common.action.VdcActionType.AddNetworkOnProvider , new org.ovirt.engine.core.common.action.VdcActionParametersBase ( ) , null ) ; testManager.addOperation ( testOperation ) ; org.mockito.Mockito.verify ( mockOperationProcessor ) . processOperation ( testManager ) ; org.mockito.Mockito.verify ( mockEventBus ) . fireEvent ( org.mockito.Matchers.any ( org.ovirt.engine.ui.frontend.communication.EngineSessionRefreshedEvent.class ) ) ; org.junit.Assert.assertEquals ( "Operations must match" , testOperation , testManager.pollOperation ( ) ) ; }
Source:
public void testMapHostId ( ) { org.ovirt.engine.api.model.VM entity = new org.ovirt.engine.api.model.VM ( ) ; entity.setStatus ( VMStatus.Up ) ; org.ovirt.engine.core.compat.Guid guid = org.ovirt.engine.core.compat.NGuid.NewGuid ( ) ; entity.setRunOnVds ( guid ) ; org.ovirt.engine.api.model.VM model = org.ovirt.engine.api.restapi.types.VmMapper.map ( entity , null ) ; assertEquals ( guid.toString ( ) , model.getHost ( ) . getId ( ) ) ; }

Target:
public void testMapHostId ( ) { org.ovirt.engine.api.model.VM entity = new org.ovirt.engine.api.model.VM ( ) ; entity.setStatus ( VMStatus.Up ) ; org.ovirt.engine.core.compat.Guid guid = org.ovirt.engine.core.compat.Guid.newGuid ( ) ; entity.setRunOnVds ( guid ) ; org.ovirt.engine.api.restapi.utils.OsTypeMockUtils.mockOsTypes ( ) ; org.ovirt.engine.api.model.VM model = org.ovirt.engine.api.restapi.types.VmMapper.map ( entity , null ) ; assertEquals ( guid.toString ( ) , model.getHost ( ) . getId ( ) ) ; }
Source:
public static org.ovirt.engine.ui.uicommonweb.models.vms.EditVmInterfaceModel createInstance ( org.ovirt.engine.core.common.businessentities.VmBase vmStatic , org.ovirt.engine.core.common.businessentities.VM vm , org.ovirt.engine.core.compat.Version clusterCompatibilityVersion , java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmNetworkInterface > vmNicList , org.ovirt.engine.core.common.businessentities.VmNetworkInterface nic , org.ovirt.engine.ui.uicommonweb.models.EntityModel sourceModel ) { org.ovirt.engine.ui.uicommonweb.models.vms.EditVmInterfaceModel instance = new org.ovirt.engine.ui.uicommonweb.models.vms.EditVmInterfaceModel ( vmStatic , vm , clusterCompatibilityVersion , vmNicList , nic , sourceModel ) ; instance.init ( ) ; return instance ; }

Target:
public static org.ovirt.engine.ui.uicommonweb.models.vms.EditVmInterfaceModel createInstance ( org.ovirt.engine.core.common.businessentities.VmBase vmStatic , org.ovirt.engine.core.common.businessentities.VM vm , org.ovirt.engine.core.compat.Version clusterCompatibilityVersion , java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > vmNicList , org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface nic , org.ovirt.engine.ui.uicommonweb.models.EntityModel sourceModel ) { org.ovirt.engine.ui.uicommonweb.models.vms.EditVmInterfaceModel instance = new org.ovirt.engine.ui.uicommonweb.models.vms.EditVmInterfaceModel ( vmStatic , vm , clusterCompatibilityVersion , vmNicList , nic , sourceModel ) ; instance.init ( ) ; return instance ; }
Source:
public static void getMaxNumOfVmCpus ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String version ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) . intValue ( ) : 1 ; } } ; org.ovirt.engine.core.common.queries.GetConfigurationValueParameters tempVar = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.MaxNumOfVmCpus ) ; tempVar.setVersion ( version ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( tempVar , aQuery ) ; }

Target:
public void getAuthzGroupsByUserId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid userId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter < java.util.List < org.ovirt.engine.core.common.businessentities.aaa.AuthzGroup > > ( ) { @ java.lang.Override public java.util.List < org.ovirt.engine.core.common.businessentities.aaa.AuthzGroup > Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return ( ( java.util.List < org.ovirt.engine.core.common.businessentities.aaa.AuthzGroup > ) ( source ) ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAuthzGroupsByUserId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( userId ) , aQuery ) ; }
Source:
protected void doTestBadRemove ( boolean valid , boolean success , java.lang.String detail ) { setUriInfo ( setUpActionExpectations ( ActionType.RemoveVmNicFilterParameter , org.ovirt.engine.core.common.action.RemoveVmNicFilterParameterParameters.class , new java.lang.String [ ] { "VmId" , "FilterParameterId" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendVmNicFilterParameterResourceTest.VM_ID , org.ovirt.engine.api.restapi.resource.BackendVmNicFilterParameterResourceTest.PARAMETER_ID } , valid , success ) ) ; try { resource.remove ( ) ; org.junit.Assert.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }

Target:
protected void doTestBadRemove ( boolean valid , boolean success , java.lang.String detail ) { setUriInfo ( setUpActionExpectations ( ActionType.RemoveVmNicFilterParameter , org.ovirt.engine.core.common.action.RemoveVmNicFilterParameterParameters.class , new java.lang.String [ ] { "VmId" , "FilterParameterId" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendVmNicFilterParameterResourceTest.VM_ID , org.ovirt.engine.api.restapi.resource.BackendVmNicFilterParameterResourceTest.PARAMETER_ID } , valid , success ) ) ; try { resource.remove ( ) ; org.junit.jupiter.api.Assertions.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }
Source:
public org.ovirt.engine.core.dal.VdcBllMessages validate ( org.ovirt.engine.core.common.businessentities.VDS vds , java.lang.StringBuilder sb ) { if ( ! ( org.ovirt.engine.core.bll.RunVmCommandBase.hasCapacityToRunVM ( vds ) ) ) { sb.append ( "has insuffient capacity to run power client" ) ; return org.ovirt.engine.core.dal.VdcBllMessages.ACTION_TYPE_FAILED_VDS_VM_CPUS ; } return null ; }

Target:
public org.ovirt.engine.core.dal.VdcBllMessages validate ( org.ovirt.engine.core.common.businessentities.VDS vds , java.lang.StringBuilder sb , boolean isMigrate ) { java.lang.Integer cores = org.ovirt.engine.core.bll.VdsSelector.getEffectiveCpuCores ( vds ) ; if ( ( cores != null ) && ( ( getVm ( ) . getNumOfCpus ( ) ) > cores ) ) { sb.append ( "has less cores(" ) . append ( cores ) . append ( ") than " ) . append ( getVm ( ) . getNumOfCpus ( ) ) ; return org.ovirt.engine.core.dal.VdcBllMessages.ACTION_TYPE_FAILED_VDS_VM_CPUS ; } return null ; }
Source:
protected final < T > javax.ws.rs.core.Response performCreate ( org.ovirt.engine.core.common.action.ActionType task , org.ovirt.engine.core.common.action.VdcActionParametersBase taskParams , org.ovirt.engine.api.restapi.resource.IResolver < T , Q > entityResolver , boolean block , java.lang.Class < ? extends org.ovirt.engine.api.model.BaseResource > suggestedParentType ) { org.ovirt.engine.core.common.action.VdcReturnValueBase createResult = doCreateEntity ( task , taskParams ) ; return fetchCreatedEntity ( entityResolver , block , suggestedParentType , createResult ) ; }

Target:
protected final < T > javax.ws.rs.core.Response performCreate ( org.ovirt.engine.core.common.action.ActionType task , org.ovirt.engine.core.common.action.ActionParametersBase taskParams , org.ovirt.engine.api.restapi.resource.IResolver < T , Q > entityResolver , boolean block , java.lang.Class < ? extends org.ovirt.engine.api.model.BaseResource > suggestedParentType ) { org.ovirt.engine.core.common.action.VdcReturnValueBase createResult = doCreateEntity ( task , taskParams ) ; return fetchCreatedEntity ( entityResolver , block , suggestedParentType , createResult ) ; }
Source:
private com.google.gwt.user.client.ui.IsWidget createAdditionalInfoPanel ( ) { com.google.gwt.user.client.ui.FlowPanel panel = new com.google.gwt.user.client.ui.FlowPanel ( ) ; panel.addStyleName ( PatternflyConstants.PF_LIST_VIEW_ADDITIONAL_INFO ) ; panel.add ( createGeneralAdditionalInfo ( ) ) ; panel.add ( createStatisticsAdditionalInfo ( ) ) ; panel.add ( createGuestAgentAdditionalInfo ( ) ) ; return panel ; }

Target:
private void createAdditionalInfoPanel ( ) { additionalInfoPanel.add ( createGeneralAdditionalInfo ( ) ) ; additionalInfoPanel.add ( createStatisticsAdditionalInfo ( ) ) ; additionalInfoPanel.add ( createGuestAgentAdditionalInfo ( ) ) ; }
Source:
public org.ovirt.engine.core.dal.VdcBllMessages validate ( org.ovirt.engine.core.common.businessentities.VDS vds , java.lang.StringBuilder sb ) { if ( ( ( getVm ( ) . getstatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.VMStatus.Paused ) ) && ( ! ( memoryChecker.evaluate ( vds , getVm ( ) ) ) ) ) { sb.append ( "has insufficient memory to run the VM" ) ; return org.ovirt.engine.core.dal.VdcBllMessages.ACTION_TYPE_FAILED_VDS_VM_MEMORY ; } return null ; }

Target:
public org.ovirt.engine.core.dal.VdcBllMessages validate ( org.ovirt.engine.core.common.businessentities.VDS vds , java.lang.StringBuilder sb , boolean isMigrate ) { if ( ( ( getVm ( ) . getstatus ( ) ) != ( org.ovirt.engine.core.common.businessentities.VMStatus.Paused ) ) && ( ! ( memoryChecker.evaluate ( vds , getVm ( ) ) ) ) ) { sb.append ( "has insufficient memory to run the VM" ) ; return org.ovirt.engine.core.dal.VdcBllMessages.ACTION_TYPE_FAILED_VDS_VM_MEMORY ; } return null ; }
Source:
public void testSave ( ) { newVmInterface.setVmId ( org.ovirt.engine.core.dao.network.VmNetworkInterfaceDaoTest.VM_ID ) ; newVmDevice.setId ( new org.ovirt.engine.core.common.businessentities.VmDeviceId ( newVmInterface.getId ( ) , org.ovirt.engine.core.dao.network.VmNetworkInterfaceDaoTest.VM_ID ) ) ; dao.save ( newVmInterface ) ; vmDevicesDao.save ( newVmDevice ) ; StatsDao.save ( newVmInterface.getStatistics ( ) ) ; org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface savedInterface = dao.get ( newVmInterface.getId ( ) ) ; assertNotNull ( savedInterface ) ; assertEquals ( newVmInterface.getName ( ) , savedInterface.getName ( ) ) ; }

Target:
public void testSave ( ) { newVmInterface.setVmId ( org.ovirt.engine.core.dao.network.VmNetworkInterfaceDaoTest.VM_ID ) ; newVmDevice.setId ( new org.ovirt.engine.core.common.businessentities.VmDeviceId ( newVmInterface.getId ( ) , org.ovirt.engine.core.dao.network.VmNetworkInterfaceDaoTest.VM_ID ) ) ; dao.save ( newVmInterface ) ; vmDevicesDao.save ( newVmDevice ) ; StatsDao.save ( newVmInterface.getStatistics ( ) ) ; org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface savedInterface = dao.get ( newVmInterface.getId ( ) ) ; org.junit.Assert.assertNotNull ( savedInterface ) ; org.junit.Assert.assertEquals ( newVmInterface.getName ( ) , savedInterface.getName ( ) ) ; }
Source:
private void updateTaskStatuses ( java.util.Map < org.ovirt.engine.core.compat.Guid , java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.AsyncTaskStatus > > poolsAllTasksMap ) { for ( org.ovirt.engine.core.bll.tasks.SPMAsyncTask task : _tasks.values ( ) ) { if ( task.getShouldPoll ( ) ) { java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.AsyncTaskStatus > asyncTasksForPoolMap = poolsAllTasksMap.get ( task.getStoragePoolID ( ) ) ; if ( asyncTasksForPoolMap != null ) { org.ovirt.engine.core.common.businessentities.AsyncTaskStatus cachedAsyncTaskStatus = asyncTasksForPoolMap.get ( task.getVdsmTaskId ( ) ) ; task.UpdateTask ( cachedAsyncTaskStatus ) ; } } } }

Target:
private void updateTaskStatuses ( java.util.Map < org.ovirt.engine.core.compat.Guid , java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.AsyncTaskStatus > > poolsAllTasksMap ) { for ( org.ovirt.engine.core.bll.tasks.interfaces.SPMTask task : _tasks.values ( ) ) { if ( task.getShouldPoll ( ) ) { java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.AsyncTaskStatus > asyncTasksForPoolMap = poolsAllTasksMap.get ( task.getStoragePoolID ( ) ) ; if ( asyncTasksForPoolMap != null ) { org.ovirt.engine.core.common.businessentities.AsyncTaskStatus cachedAsyncTaskStatus = asyncTasksForPoolMap.get ( task.getVdsmTaskId ( ) ) ; task.updateTask ( cachedAsyncTaskStatus ) ; } } } }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { java.lang.String propName = ( ( org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ) ( args ) ) . PropertyName ; if ( "Message" . equals ( propName ) ) { appendMessage ( model.getMessage ( ) ) ; } else if ( "VM" . equals ( propName ) ) { updateMemoryBoxVisibility ( ) ; } }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { java.lang.String propName = ( ( org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ) ( args ) ) . propertyName ; if ( "Message" . equals ( propName ) ) { appendMessage ( model.getMessage ( ) ) ; } else if ( "VM" . equals ( propName ) ) { updateMemoryBoxVisibility ( ) ; } }
Source:
public void enableLoadBalancer ( ) { if ( org.ovirt.engine.core.common.config.Config.< java.lang.Boolean > getValue ( ConfigValues.EnableVdsLoadBalancing ) ) { org.ovirt.engine.core.bll.scheduling.SchedulingManager.log.info ( "Start scheduling to enable vds load balancer" ) ; org.ovirt.engine.core.utils.timer.SchedulerUtilQuartzImpl.getInstance ( ) . scheduleAFixedDelayJob ( this , "performLoadBalancing" , new java.lang.Class [ ] { } , new java.lang.Object [ ] { } , org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( ConfigValues.VdsLoadBalancingIntervalInMinutes ) , org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( ConfigValues.VdsLoadBalancingIntervalInMinutes ) , java.util.concurrent.TimeUnit.MINUTES ) ; org.ovirt.engine.core.bll.scheduling.SchedulingManager.log.info ( "Finished scheduling to enable vds load balancer" ) ; } }

Target:
public void enableHaReservationCheck ( ) { if ( org.ovirt.engine.core.common.config.Config.< java.lang.Boolean > getValue ( ConfigValues.EnableVdsLoadBalancing ) ) { org.ovirt.engine.core.bll.scheduling.SchedulingManager.log.info ( "Start HA Reservation check" ) ; java.lang.Integer interval = org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( ConfigValues.VdsHaReservationIntervalInMinutes ) ; org.ovirt.engine.core.di.Injector.get ( org.ovirt.engine.core.utils.timer.SchedulerUtilQuartzImpl.class ) . scheduleAFixedDelayJob ( this , "performHaResevationCheck" , new java.lang.Class [ ] { } , new java.lang.Object [ ] { } , interval , interval , java.util.concurrent.TimeUnit.MINUTES ) ; org.ovirt.engine.core.bll.scheduling.SchedulingManager.log.info ( "Finished HA Reservation check" ) ; } }
Source:
protected java.util.List < org.ovirt.engine.core.common.businessentities.VmTemplate > filterNotBaseTemplates ( java.util.List < org.ovirt.engine.core.common.businessentities.VmTemplate > templates ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmTemplate > baseTemplates = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmTemplate > ( ) ; for ( org.ovirt.engine.core.common.businessentities.VmTemplate template : templates ) { if ( template.getId ( ) . equals ( template.getBaseTemplateId ( ) ) ) { baseTemplates.add ( template ) ; } } return baseTemplates ; }

Target:
protected void baseTemplateSelectedItemChanged ( ) { org.ovirt.engine.core.common.businessentities.VmTemplate baseTemplate = getModel ( ) . getBaseTemplate ( ) . getSelectedItem ( ) ; if ( baseTemplate != null ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmTemplate > subVersions = templateToSubVersions.get ( baseTemplate.getId ( ) ) ; getModel ( ) . getTemplate ( ) . setItems ( new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmTemplate > ( subVersions ) ) ; getModel ( ) . getTemplate ( ) . setSelectedItem ( subVersions.get ( 1 ) ) ; } }
Source:
public void testNetworkIpAddressWasSameAsHostnameAndChangedWhenIpConfigurationIsNull ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment = new org.ovirt.engine.core.common.businessentities.network.NetworkAttachment ( ) ; attachment.setIpConfiguration ( null ) ; org.junit.Assert.assertThat ( new org.ovirt.engine.core.bll.validator.NetworkAttachmentValidator ( attachment , null ) . networkIpAddressWasSameAsHostnameAndChanged ( null ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }

Target:
public void testBootProtocolSetForDisplayNetworkWhenBootProtocolIsDhcp ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.Network network = new org.ovirt.engine.core.common.businessentities.network.Network ( ) ; network.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; org.ovirt.engine.core.common.businessentities.network.NetworkAttachment attachment = createNetworkAttachmentWithIpConfiguration ( NetworkBootProtocol.DHCP , null , null ) ; attachment.setNetworkId ( network.getId ( ) ) ; doTestBootProtocolSetForDisplayNetworkWhenNullValuedIpConfigurationAndWhenNetworkClusterDisplay ( true , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) , network , attachment ) ; }
Source:
public void validateSucceedsWithStopActionType ( ) { cmd.getParameters ( ) . setActionType ( GlusterConstants.MANAGE_GLUSTER_SERVICE_ACTION_TYPE_STOP ) ; prepareMocks ( cmd ) ; org.junit.Assert.assertFalse ( cmd.validate ( ) ) ; }

Target:
public void validateSucceedsWithStopActionTypeAndClusterId ( ) { cmd.getParameters ( ) . setActionType ( GlusterConstants.MANAGE_GLUSTER_SERVICE_ACTION_TYPE_STOP ) ; cmd.getParameters ( ) . setClusterId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; cmd.setClusterId ( cmd.getParameters ( ) . getClusterId ( ) ) ; prepareMocks ( ) ; org.junit.Assert.assertTrue ( cmd.validate ( ) ) ; }
Source:
public org.ovirt.engine.core.common.businessentities.StorageDomainDynamic mapRow ( java.sql.ResultSet rs , int rowNum ) throws java.sql.SQLException { org.ovirt.engine.core.common.businessentities.StorageDomainDynamic entity = new org.ovirt.engine.core.common.businessentities.StorageDomainDynamic ( ) ; entity.setAvailableDiskSize ( ( ( java.lang.Integer ) ( rs.getObject ( "available_disk_size" ) ) ) ) ; entity.setId ( org.ovirt.engine.core.compat.Guid.createGuidFromString ( rs.getString ( "id" ) ) ) ; entity.setUsedDiskSize ( ( ( java.lang.Integer ) ( rs.getObject ( "used_disk_size" ) ) ) ) ; return entity ; }

Target:
public org.ovirt.engine.core.common.businessentities.StorageDomainDynamic mapRow ( java.sql.ResultSet rs , int rowNum ) throws java.sql.SQLException { org.ovirt.engine.core.common.businessentities.StorageDomainDynamic entity = new org.ovirt.engine.core.common.businessentities.StorageDomainDynamic ( ) ; entity.setAvailableDiskSize ( ( ( java.lang.Integer ) ( rs.getObject ( "available_disk_size" ) ) ) ) ; entity.setId ( org.ovirt.engine.core.compat.Guid.createGuidFromStringDefaultEmpty ( rs.getString ( "id" ) ) ) ; entity.setUsedDiskSize ( ( ( java.lang.Integer ) ( rs.getObject ( "used_disk_size" ) ) ) ) ; return entity ; }
Source:
public int hashCode ( ) { final int prime = 31 ; int result = super . hashCode ( ) ; return ( prime * result ) + ( ( sessionId ) == null ? 0 : sessionId.hashCode ( ) ) ; }

Target:
public boolean equals ( java.lang.Object obj ) { if ( ( this ) == obj ) { return true ; } if ( ! ( obj instanceof org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSessionConfiguration ) ) { return false ; } org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSessionConfiguration other = ( ( org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSessionConfiguration ) ( obj ) ) ; return ( super . equals ( obj ) ) && ( java.util.Objects.equals ( sessionId , other.sessionId ) ) ; }
Source:
public void mapWatchdog ( ) { org.ovirt.engine.api.model.WatchDog model = new org.ovirt.engine.api.model.WatchDog ( ) ; model.setAction ( "reset" ) ; model.setModel ( "i6300esb" ) ; model.setId ( Guid.Empty.toString ( ) ) ; org.ovirt.engine.core.common.businessentities.VmWatchdog entity = org.ovirt.engine.api.restapi.types.WatchdogMapper.map ( model , null ) ; org.junit.Assert.assertNotNull ( entity ) ; org.junit.Assert.assertEquals ( entity.getAction ( ) , VmWatchdogAction.RESET ) ; org.junit.Assert.assertEquals ( entity.getModel ( ) , VmWatchdogType.i6300esb ) ; }

Target:
public void mapWatchdog ( ) { org.ovirt.engine.api.model.Watchdog model = new org.ovirt.engine.api.model.Watchdog ( ) ; model.setAction ( "reset" ) ; model.setModel ( "i6300esb" ) ; model.setId ( Guid.Empty.toString ( ) ) ; org.ovirt.engine.core.common.businessentities.VmWatchdog entity = org.ovirt.engine.api.restapi.types.WatchdogMapper.map ( model , null ) ; org.junit.Assert.assertNotNull ( entity ) ; org.junit.Assert.assertEquals ( entity.getAction ( ) , VmWatchdogAction.RESET ) ; org.junit.Assert.assertEquals ( entity.getModel ( ) , VmWatchdogType.i6300esb ) ; }
Source:
protected static int getNumOfPrestartedVmsInPool ( org.ovirt.engine.core.compat.NGuid poolId ) { java.util.List < org.ovirt.engine.core.common.businessentities.vm_pool_map > vmPoolMaps = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmPoolDAO ( ) . getVmMapsInVmPoolByVmPoolIdAndStatus ( poolId , VMStatus.Up ) ; int prestartedVmsInPool = 0 ; if ( vmPoolMaps != null ) { for ( org.ovirt.engine.core.common.businessentities.vm_pool_map map : vmPoolMaps ) { if ( org.ovirt.engine.core.bll.VmPoolCommandBase.CanAttachPrestartedVmToUser ( map.getvm_guid ( ) ) ) { prestartedVmsInPool ++ ; } } } return prestartedVmsInPool ; }

Target:
protected static int getNumOfPrestartedVmsInPool ( org.ovirt.engine.core.compat.NGuid poolId ) { java.util.List < org.ovirt.engine.core.common.businessentities.vm_pool_map > vmPoolMaps = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmPoolDAO ( ) . getVmMapsInVmPoolByVmPoolIdAndStatus ( poolId , VMStatus.Up ) ; int prestartedVmsInPool = 0 ; if ( vmPoolMaps != null ) { for ( org.ovirt.engine.core.common.businessentities.vm_pool_map map : vmPoolMaps ) { if ( org.ovirt.engine.core.bll.VmPoolCommandBase.canAttachPrestartedVmToUser ( map.getvm_guid ( ) ) ) { prestartedVmsInPool ++ ; } } } return prestartedVmsInPool ; }
Source:
protected org.ovirt.engine.api.model.Disk deprecatedPopulate ( org.ovirt.engine.api.model.Disk model , org.ovirt.engine.api.model.Disk entity ) { return addStatistics ( model , entity , uriInfo , httpHeaders ) ; }

Target:
protected org.ovirt.engine.api.model.Disk deprecatedPopulate ( org.ovirt.engine.api.model.Disk model , org.ovirt.engine.api.model.Disk entity ) { java.util.Set < java.lang.String > details = org.ovirt.engine.api.common.util.DetailHelper.getDetails ( httpHeaders , uriInfo ) ; if ( details.contains ( "statistics" ) ) { addStatistics ( model , entity ) ; } return model ; }
Source:
public void onBootstrap ( ) { super . onBootstrap ( ) ; com.google.gwt.user.client.Window.setTitle ( dynamicMessages.applicationTitle ( ) ) ; org.ovirt.engine.ui.webadmin.uimode.UiModeData uiModeData = org.ovirt.engine.ui.webadmin.uimode.UiModeData.instance ( ) ; if ( uiModeData != null ) { handleUiMode ( uiModeData ) ; } org.ovirt.engine.ui.webadmin.plugin.restapi.EngineSessionTimeoutData engineSessionTimeoutData = org.ovirt.engine.ui.webadmin.plugin.restapi.EngineSessionTimeoutData.instance ( ) ; if ( engineSessionTimeoutData != null ) { restApiSessionManager.setSessionTimeout ( engineSessionTimeoutData.getValue ( ) ) ; } placeManager.revealCurrentPlace ( ) ; }

Target:
public void onBootstrap ( ) { super . onBootstrap ( ) ; com.google.gwt.user.client.Window.setTitle ( dynamicMessages.applicationTitle ( ) ) ; org.ovirt.engine.ui.webadmin.uimode.UiModeData uiModeData = org.ovirt.engine.ui.webadmin.uimode.UiModeData.instance ( ) ; if ( uiModeData != null ) { handleUiMode ( uiModeData ) ; } org.ovirt.engine.ui.webadmin.plugin.restapi.EngineSessionTimeoutData engineSessionTimeoutData = org.ovirt.engine.ui.webadmin.plugin.restapi.EngineSessionTimeoutData.instance ( ) ; if ( engineSessionTimeoutData != null ) { restApiSessionManager.setSessionTimeout ( engineSessionTimeoutData.getSessionTimeout ( ) ) ; restApiSessionManager.setHardLimit ( engineSessionTimeoutData.getSessionHardLimit ( ) ) ; } placeManager.revealCurrentPlace ( ) ; }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { boolean isEnabled = bootSequenceModel.getHardDiskOption ( ) . getIsChangable ( ) ; java.lang.String itemName = bootSequenceModel.getHardDiskOption ( ) . getTitle ( ) ; updateItemAvailability ( itemName , isEnabled ) ; }

Target:
public void onChange ( com.google.gwt.event.dom.client.ChangeEvent event ) { int selectedIndex = bootSequenceBox.getSelectedIndex ( ) ; bootSequenceModel.setSelectedItem ( bootSequenceModel.getItems ( ) . get ( selectedIndex ) ) ; bootSequenceUpButton.setEnabled ( bootSequenceModel.getMoveItemUpCommand ( ) . getIsExecutionAllowed ( ) ) ; bootSequenceDownButton.setEnabled ( bootSequenceModel.getMoveItemDownCommand ( ) . getIsExecutionAllowed ( ) ) ; localizeBootSequenceButtons ( ) ; }
Source:
private void newPoolNameIsAlreadyTaken ( ) { org.mockito.Mockito.when ( spDao.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( new org.ovirt.engine.core.common.businessentities.StoragePool ( ) ) ; org.mockito.Mockito.when ( spDao.getByName ( org.mockito.Matchers.anyString ( ) ) ) . thenReturn ( org.ovirt.engine.core.bll.storage.UpdateStoragePoolCommandTest.createDefaultStoragePool ( ) ) ; }

Target:
private void newPoolNameIsAlreadyTaken ( ) { org.mockito.Mockito.when ( spDao.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( new org.ovirt.engine.core.common.businessentities.StoragePool ( ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.StoragePool > storagePoolList = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > ( ) ; storagePoolList.add ( org.ovirt.engine.core.bll.storage.UpdateStoragePoolCommandTest.createDefaultStoragePool ( ) ) ; org.mockito.Mockito.when ( spDao.getByName ( org.mockito.Matchers.anyString ( ) , org.mockito.Matchers.anyBoolean ( ) ) ) . thenReturn ( new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > ( storagePoolList ) ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturn amendVolume ( java.lang.String jobId , java.util.Map < java.lang.String , java.lang.Object > volInfo , java.util.Map < java.lang.String , java.lang.Object > volAttr ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "SDM.amend_volume" ) . withParameter ( "job_id" , jobId ) . withParameter ( "vol_info" , volInfo ) . withParameter ( "vol_attr" , volAttr ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturn ( response ) ; }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturn amendVolume ( java.lang.String jobId , java.util.Map < java.lang.String , java.lang.Object > volInfo , java.util.Map < java.lang.String , java.lang.Object > qcow2_attr ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "SDM.amend_volume" ) . withParameter ( "job_id" , jobId ) . withParameter ( "vol_info" , volInfo ) . withParameter ( "qcow2_attr" , qcow2_attr ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturn ( response ) ; }
Source:
public static java.lang.String map ( java.lang.Integer type ) { switch ( type ) { case 0 : return NicInterface.RTL8139_VIRTIO.value ( ) ; case 1 : return NicInterface.RTL8139.value ( ) ; case 2 : return NicInterface.E1000.value ( ) ; case 3 : return NicInterface.VIRTIO.value ( ) ; default : return null ; } }

Target:
public static java.lang.String map ( java.lang.Integer type ) { switch ( type ) { case 0 : return NicInterface.RTL8139_VIRTIO.value ( ) ; case 1 : return NicInterface.RTL8139.value ( ) ; case 2 : return NicInterface.E1000.value ( ) ; case 3 : return NicInterface.VIRTIO.value ( ) ; case 4 : return NicInterface.SPAPR_VLAN.value ( ) ; default : return null ; } }
Source:
public void getStorageDevices ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hostId ) { 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.GetGlusterStorageDevices , new org.ovirt.engine.core.common.queries.VdsIdParametersBase ( hostId ) , aQuery ) ; }

Target:
public void getUnusedBricksFromServer ( org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery , org.ovirt.engine.core.compat.Guid hostId ) { asyncQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.core.common.queries.VdsIdParametersBase parameters = new org.ovirt.engine.core.common.queries.VdsIdParametersBase ( hostId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetUnusedGlusterBricks , parameters , asyncQuery ) ; }
Source:
private boolean validateSourceStorageDomain ( org.ovirt.engine.core.compat.Guid imageId ) { org.ovirt.engine.core.common.businessentities.DiskImage diskImage = getDiskImageById ( imageId ) ; org.ovirt.engine.core.compat.Guid domainId = diskImage.getStorageIds ( ) . get ( 0 ) ; org.ovirt.engine.core.bll.validator.StorageDomainValidator validator = getValidator ( domainId , org.ovirt.engine.core.bll.lsm.LiveMigrateVmDisksCommand.getStoragePoolId ( ) . getValue ( ) ) ; return validate ( validator.isDomainExistAndActive ( ) ) ; }

Target:
protected boolean checkImagesStatus ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > disksToCheck = org.ovirt.engine.core.bll.ImagesHandler.filterImageDisks ( getDiskDao ( ) . getAllForVm ( org.ovirt.engine.core.bll.lsm.LiveMigrateVmDisksCommand.getVmId ( ) ) , true , false ) ; org.ovirt.engine.core.bll.validator.DiskImagesValidator diskImagesValidator = new org.ovirt.engine.core.bll.validator.DiskImagesValidator ( disksToCheck ) ; return validate ( diskImagesValidator.diskImagesNotLocked ( ) ) ; }
Source:
public void addVmToRun ( org.ovirt.engine.core.compat.Guid vmId ) { autoStartVmsToRun.add ( new org.ovirt.engine.core.common.utils.Pair ( org.ovirt.engine.core.compat.DateTime.getNow ( ) , vmId ) ) ; }

Target:
public void startFailedAutoStartVms ( ) { java.util.LinkedList < org.ovirt.engine.core.compat.Guid > idsToRemove = new java.util.LinkedList < > ( ) ; for ( org.ovirt.engine.core.compat.Guid vmId : autoStartVmsToRun ) { org.ovirt.engine.core.utils.lock.EngineLock runVmLock = createEngineLockForRunVm ( vmId , getLockMessage ( ) ) ; if ( ! ( getLockManager ( ) . acquireLock ( runVmLock ) . getFirst ( ) ) ) { continue ; } runVm ( vmId , runVmLock ) ; idsToRemove.add ( vmId ) ; } autoStartVmsToRun.removeAll ( idsToRemove ) ; }
Source:
public void testNetworksOnNicMatchMtu ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > networks = java.util.Collections.singletonList ( createNetwork ( 1 , false , "netA" ) ) ; java.util.Map < java.lang.String , java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > > networksOnNics = java.util.Collections.singletonMap ( "nicName" , networks ) ; org.ovirt.engine.core.bll.network.host.NetworkMtuValidator networkMtuValidator = new org.ovirt.engine.core.bll.network.host.NetworkMtuValidator ( new org.ovirt.engine.core.common.businessentities.BusinessEntityMap ( networks ) ) ; org.junit.Assert.assertThat ( networkMtuValidator.validateMtu ( networksOnNics ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }

Target:
public void testNetworksOnNicMatchMtu ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > networks = java.util.Collections.singletonList ( createNetwork ( 1 , false , "netA" ) ) ; java.util.Map < java.lang.String , java.util.List < org.ovirt.engine.core.common.businessentities.network.Network > > networksOnNics = java.util.Collections.singletonMap ( "nicName" , networks ) ; org.ovirt.engine.core.bll.network.host.NetworkMtuValidator networkMtuValidator = new org.ovirt.engine.core.bll.network.host.NetworkMtuValidator ( new org.ovirt.engine.core.common.businessentities.BusinessEntityMap ( networks ) ) ; org.hamcrest.MatcherAssert.assertThat ( networkMtuValidator.validateMtu ( networksOnNics ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }
Source:
private java.util.Collection < java.lang.String > getFreeLabels ( ) { java.util.SortedSet < java.lang.String > freeLabels = new java.util.TreeSet < > ( dcLabels ) ; freeLabels.removeAll ( labelToIface.keySet ( ) ) ; return freeLabels ; }

Target:
public void executeCommand ( org.ovirt.engine.ui.uicommonweb.UICommand uiCommand ) { if ( ! ( labelPopup.validate ( ) ) ) { return ; } sourceListModel.setConfirmWindow ( null ) ; java.lang.String label = labelPopup.getLabel ( ) . getEntity ( ) ; dcLabels.add ( label ) ; NetworkOperation.LABEL.getCommand ( new org.ovirt.engine.ui.uicommonweb.models.hosts.network.NetworkLabelModel ( label , this ) , networkCommand.getOp2 ( ) , hostSetupNetworksParametersData ) . execute ( ) ; redraw ( ) ; }