auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public static void GetTimeZoneList ( 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 ) { return new java.util.HashMap < java.lang.String , java.lang.String > ( ) ; } return source ; } } ; org.ovirt.engine.core.common.queries.TimeZoneQueryParams params = new org.ovirt.engine.core.common.queries.TimeZoneQueryParams ( ) ; params.setWindowsOS ( ( ( org.ovirt.engine.ui.uicommonweb.models.vms.VmModelBehaviorBase ) ( aQuery.getModel ( ) ) ) . getModel ( ) . getIsWindowsOS ( ) ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetTimeZones , params , aQuery ) ; }

Target:
public static void getTimeZoneList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.TimeZoneType timeZoneType ) { 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.HashMap < java.lang.String , java.lang.String > ( ) ; } return source ; } } ; org.ovirt.engine.core.common.queries.TimeZoneQueryParams params = new org.ovirt.engine.core.common.queries.TimeZoneQueryParams ( ) ; params.setTimeZoneType ( timeZoneType ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetTimeZones , params , aQuery ) ; }
Source:
public org.ovirt.engine.api.model.InstanceType update ( org.ovirt.engine.api.model.InstanceType incoming ) { org.ovirt.engine.api.model.InstanceType instanceType = performUpdate ( incoming , new org.ovirt.engine.api.restapi.resource.QueryIdResolver ( org.ovirt.engine.core.common.queries.VdcQueryType.GetInstanceType , org.ovirt.engine.core.common.queries.GetVmTemplateParameters.class ) , ActionType.UpdateVmTemplate , new org.ovirt.engine.api.restapi.resource.BackendInstanceTypeResource.UpdateParametersProvider ( ) ) ; if ( instanceType != null ) { org.ovirt.engine.api.restapi.util.DisplayHelper.adjustDisplayData ( this , instanceType ) ; } return instanceType ; }

Target:
public org.ovirt.engine.api.model.InstanceType update ( org.ovirt.engine.api.model.InstanceType incoming ) { org.ovirt.engine.api.model.InstanceType instanceType = performUpdate ( incoming , new org.ovirt.engine.api.restapi.resource.QueryIdResolver ( org.ovirt.engine.core.common.queries.QueryType.GetInstanceType , org.ovirt.engine.core.common.queries.GetVmTemplateParameters.class ) , ActionType.UpdateVmTemplate , new org.ovirt.engine.api.restapi.resource.BackendInstanceTypeResource.UpdateParametersProvider ( ) ) ; if ( instanceType != null ) { org.ovirt.engine.api.restapi.util.DisplayHelper.adjustDisplayData ( this , instanceType ) ; } return instanceType ; }
Source:
public void isSupportBridgesReportByVDSM ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String version ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Boolean ) ( source ) ) . booleanValue ( ) : true ; } } ; org.ovirt.engine.core.common.queries.GetConfigurationValueParameters tempVar = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.SupportBridgesReportByVDSM ) ; tempVar.setVersion ( version ) ; getConfigFromCache ( tempVar , aQuery ) ; }

Target:
public void getMaxNumOfThreadsPerCpu ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String version ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) : 1 ; } } ; org.ovirt.engine.core.common.queries.GetConfigurationValueParameters tempVar = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.MaxNumOfThreadsPerCpu ) ; tempVar.setVersion ( version ) ; getConfigFromCache ( tempVar , aQuery ) ; }
Source:
public void testGetHostsForStorageOperationLocalFsOnly ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VDS > result = dao.getHostsForStorageOperation ( null , true ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertEquals ( 1 , result.size ( ) ) ; org.junit.Assert.assertEquals ( FixturesTool.CLUSTER_RHEL6_LOCALFS , result.get ( 0 ) . getClusterId ( ) ) ; }

Target:
public void testGetHostsForStorageOperationLocalFsOnly ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VDS > result = dao.getHostsForStorageOperation ( null , true ) ; org.junit.jupiter.api.Assertions.assertNotNull ( result ) ; org.junit.jupiter.api.Assertions.assertEquals ( 1 , result.size ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( FixturesTool.CLUSTER_RHEL6_LOCALFS , result.get ( 0 ) . getClusterId ( ) ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.StorageDomain prepareLocalStorageDomainForElection ( org.ovirt.engine.core.common.businessentities.StorageDomainStatus status , java.lang.String name ) { final org.ovirt.engine.core.common.businessentities.StorageDomain localDomain = createDataStorageDomain ( status , name , LOCAL_SD_ID ) ; localDomain.setStorageType ( StorageType.LOCALFS ) ; org.mockito.Mockito.doReturn ( storageDomainDao ) . when ( cmd ) . getStorageDomainDao ( ) ; org.mockito.Mockito.when ( storageDomainDao.getAllForStoragePool ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( java.util.Arrays.asList ( localDomain ) ) ; cmd.setStoragePool ( new org.ovirt.engine.core.common.businessentities.StoragePool ( ) ) ; return localDomain ; }

Target:
private org.ovirt.engine.core.common.businessentities.StorageDomain prepareLocalStorageDomainForElection ( org.ovirt.engine.core.common.businessentities.StorageDomainStatus status , java.lang.String name ) { final org.ovirt.engine.core.common.businessentities.StorageDomain localDomain = createDataStorageDomain ( status , name , LOCAL_SD_ID ) ; localDomain.setStorageType ( StorageType.LOCALFS ) ; org.mockito.Mockito.doReturn ( storageDomainDao ) . when ( cmd ) . getStorageDomainDao ( ) ; org.mockito.Mockito.when ( storageDomainDao.getAllForStoragePool ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( java.util.Collections.singletonList ( localDomain ) ) ; cmd.setStoragePool ( new org.ovirt.engine.core.common.businessentities.StoragePool ( ) ) ; return localDomain ; }
Source:
private static void addEmptyCD ( org.ovirt.engine.core.compat.Guid dstId ) { org.ovirt.engine.core.bll.utils.VmDeviceUtils.addManagedDevice ( new org.ovirt.engine.core.common.businessentities.VmDeviceId ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) , dstId ) , VmDeviceGeneralType.DISK , VmDeviceType.CDROM , java.util.Collections.< java.lang.String , java.lang.Object > singletonMap ( VdsProperties.Path , "" ) , true , true , null ) ; }

Target:
private static void addEmptyCD ( org.ovirt.engine.core.compat.Guid dstId ) { org.ovirt.engine.core.bll.utils.VmDeviceUtils.addManagedDevice ( new org.ovirt.engine.core.common.businessentities.VmDeviceId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , dstId ) , VmDeviceGeneralType.DISK , VmDeviceType.CDROM , java.util.Collections.< java.lang.String , java.lang.Object > singletonMap ( VdsProperties.Path , "" ) , true , true , null ) ; }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { if ( org.ovirt.engine.ui.webadmin.section.main.presenter.tab.MainTabReportsPresenter.reportsWebappDeployed ) { getView ( ) . updateReportsPanel ( getModel ( ) . getUrl ( ) , getModel ( ) . getParams ( ) ) ; } else { checkUpdateReportsPanel ( getModel ( ) . getUrl ( ) , getModel ( ) . getParams ( ) ) ; } }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { if ( ( org.ovirt.engine.ui.webadmin.section.main.presenter.tab.MainTabReportsPresenter.reportsWebappDeployed ) && ( ( getModel ( ) . getUri ( ) ) != null ) ) { getView ( ) . updateReportsPanel ( getModel ( ) . getUrl ( ) , getModel ( ) . getParams ( ) ) ; } }
Source:
public void testStringToMap ( ) { final java.lang.String str = "ipport=666,secure=true" ; java.util.Map < java.lang.String , java.lang.String > map = org.ovirt.engine.core.common.utils.pm.PowerManagementUtils.pmOptionsStringToMap ( str ) ; org.junit.Assert.assertEquals ( 2 , map.size ( ) ) ; org.junit.Assert.assertEquals ( "666" , map.get ( "ipport" ) ) ; org.junit.Assert.assertEquals ( "true" , map.get ( "secure" ) ) ; }

Target:
public void testStringToMap ( ) { final java.lang.String str = "ipport=666,secure=true" ; java.util.Map < java.lang.String , java.lang.String > map = org.ovirt.engine.core.common.utils.pm.PowerManagementUtils.pmOptionsStringToMap ( str ) ; org.junit.jupiter.api.Assertions.assertEquals ( 2 , map.size ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( "666" , map.get ( "ipport" ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( "true" , map.get ( "secure" ) ) ; }
Source:
private void cancelIncommingMigrations ( ) { for ( org.ovirt.engine.core.compat.Guid hostId : vdssToMaintenance.keySet ( ) ) { for ( org.ovirt.engine.core.common.businessentities.VM vm : org.ovirt.engine.core.bll.MaintenanceNumberOfVdssCommand.getVmDao ( ) . getAllMigratingToHost ( hostId ) ) { if ( ( vm.getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.MigratingFrom ) ) { log.info ( "Cancelling incoming migration of '{}' id '{}'" , vm , vm.getId ( ) ) ; runVdsCommand ( VDSCommandType.CancelMigrate , new org.ovirt.engine.core.vdsbroker.vdsbroker.CancelMigrationVDSParameters ( vm.getRunOnVds ( ) , vm.getId ( ) , true ) ) ; } } } }

Target:
private void cancelIncommingMigrations ( ) { for ( org.ovirt.engine.core.compat.Guid hostId : vdssToMaintenance.keySet ( ) ) { for ( org.ovirt.engine.core.common.businessentities.VmDynamic vm : org.ovirt.engine.core.bll.MaintenanceNumberOfVdssCommand.getVmDynamicDao ( ) . getAllMigratingToHost ( hostId ) ) { if ( ( vm.getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.MigratingFrom ) ) { log.info ( "Cancelling incoming migration of '{}' id '{}'" , vm , vm.getId ( ) ) ; runVdsCommand ( VDSCommandType.CancelMigrate , new org.ovirt.engine.core.vdsbroker.vdsbroker.CancelMigrationVDSParameters ( vm.getRunOnVds ( ) , vm.getId ( ) , true ) ) ; } } } }
Source:
protected static org.ovirt.engine.ui.uicommonweb.models.common.SelectionTreeNodeModel createSelectionTreeNodeModel ( boolean isReadOnly , org.ovirt.engine.ui.uicommonweb.models.configure.roles_ui.RoleNode roleNode ) { org.ovirt.engine.ui.uicommonweb.models.common.SelectionTreeNodeModel nodeModel ; nodeModel = new org.ovirt.engine.ui.uicommonweb.models.common.SelectionTreeNodeModel ( ) ; nodeModel.setTitle ( roleNode.getName ( ) ) ; nodeModel.setDescription ( roleNode.getName ( ) ) ; nodeModel.setIsChangable ( ( ! isReadOnly ) ) ; return nodeModel ; }

Target:
protected static org.ovirt.engine.ui.uicommonweb.models.common.SelectionTreeNodeModel createSelectionTreeNodeModel ( boolean isReadOnly , org.ovirt.engine.ui.uicommonweb.models.configure.roles_ui.RoleNode roleNode ) { org.ovirt.engine.ui.uicommonweb.models.common.SelectionTreeNodeModel nodeModel ; nodeModel = new org.ovirt.engine.ui.uicommonweb.models.common.SelectionTreeNodeModel ( ) ; nodeModel.setTitle ( roleNode.getName ( ) ) ; nodeModel.setDescription ( roleNode.getName ( ) ) ; nodeModel.setIsChangeable ( ( ! isReadOnly ) ) ; return nodeModel ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object ReturnValue ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.NetworkQoS > networkQoSes = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.NetworkQoS > ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( ReturnValue ) ) . getReturnValue ( ) ) ) ; getNetworkQoS ( ) . setItems ( networkQoSes ) ; setSelectedNetworkQoSId ( selectedItemId ) ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object ReturnValue ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.NetworkQoS > networkQoSes = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.NetworkQoS > ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( ReturnValue ) ) . getReturnValue ( ) ) ) ; org.ovirt.engine.core.common.businessentities.network.NetworkQoS none = new org.ovirt.engine.core.common.businessentities.network.NetworkQoS ( ) ; none.setName ( org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getConstants ( ) . unlimitedQoSTitle ( ) ) ; none.setId ( Guid.Empty ) ; networkQoSes.add ( 0 , none ) ; getNetworkQoS ( ) . setItems ( networkQoSes ) ; setSelectedNetworkQoSId ( selectedItemId ) ; }
Source:
public java.lang.String toString ( ) { return java.lang.String.format ( "%s, storagePoolId=%s, storageType=%s, storageDomainType=%s, path=%s" , super . toString ( ) , getStoragePoolId ( ) , getStorageType ( ) , getStorageDomainType ( ) , getPath ( ) ) ; }

Target:
protected org.ovirt.engine.core.common.utils.ToStringBuilder appendAttributes ( org.ovirt.engine.core.common.utils.ToStringBuilder tsb ) { return super . appendAttributes ( tsb ) . append ( "storagePoolId" , getStoragePoolId ( ) ) . append ( "storageType" , getStorageType ( ) ) . append ( "storageDomainType" , getStorageDomainType ( ) ) . append ( "path" , getPath ( ) ) ; }
Source:
private void testStatusMapping ( org.ovirt.engine.core.common.businessentities.gluster.GlusterStatus backendStatus , org.ovirt.engine.api.model.GlusterVolumeStatus restStatus ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity volume = new org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity ( ) ; volume.setStatus ( backendStatus ) ; org.ovirt.engine.api.model.GlusterVolume restVolume = org.ovirt.engine.api.restapi.types.GlusterVolumeMapper.map ( volume , null ) ; org.junit.Assert.assertEquals ( restVolume.getStatus ( ) , restStatus ) ; }

Target:
private void testStatusMapping ( org.ovirt.engine.core.common.businessentities.gluster.GlusterStatus backendStatus , org.ovirt.engine.api.model.GlusterVolumeStatus restStatus ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity volume = new org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity ( ) ; volume.setStatus ( backendStatus ) ; org.ovirt.engine.api.model.GlusterVolume restVolume = org.ovirt.engine.api.restapi.types.GlusterVolumeMapper.map ( volume , null ) ; org.junit.jupiter.api.Assertions.assertEquals ( restVolume.getStatus ( ) , restStatus ) ; }
Source:
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 ; mockOsRepository ( ) ; }

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 ; org.ovirt.engine.api.restapi.utils.OsTypeMockUtils.mockOsTypes ( ) ; }
Source:
public static void getVmGuestAgentInterfacesByVmId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmGuestAgentInterface > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmGuestAgentInterfacesByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }

Target:
public static void GetExternalNetworkList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid providerId ) { 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.GetAllExternalNetworksOnProvider , new org.ovirt.engine.core.common.queries.IdQueryParameters ( providerId ) , aQuery ) ; }
Source:
public void testGetAllMultiStoragePoolSearch ( ) throws java.lang.Exception { org.ovirt.engine.core.common.queries.SearchParameters searchParam = new org.ovirt.engine.core.common.queries.SearchParameters ( ( "Datacenters" + ( org.ovirt.engine.core.common.utils.CommonConstants.QUERY_RETURN_TYPE_SEPARATOR ) ) , org.ovirt.engine.core.common.interfaces.SearchType.StoragePool ) ; org.ovirt.engine.core.bll.SearchQuery < org.ovirt.engine.core.common.queries.SearchParameters > searchQuery = spySearchQuery ( searchParam ) ; searchQuery.executeQueryCommand ( ) ; org.junit.Assert.assertEquals ( storagePoolResultList , searchQuery.getQueryReturnValue ( ) . getReturnValue ( ) ) ; }

Target:
public void testGetAllStoragePoolSearch ( ) throws java.lang.Exception { org.mockito.Mockito.when ( getQueryParameters ( ) . getSearchPattern ( ) ) . thenReturn ( ( "Datacenter" + ( org.ovirt.engine.core.common.utils.CommonConstants.QUERY_RETURN_TYPE_SEPARATOR ) ) ) ; org.mockito.Mockito.when ( getQueryParameters ( ) . getSearchTypeValue ( ) ) . thenReturn ( SearchType.StoragePool ) ; getQuery ( ) . executeQueryCommand ( ) ; org.junit.Assert.assertEquals ( storagePoolResultList , getQuery ( ) . getQueryReturnValue ( ) . getReturnValue ( ) ) ; }
Source:
public com.google.gwt.resources.client.ImageResource getValue ( org.ovirt.engine.core.common.businessentities.VM object ) { boolean isDiskPlugged = getDetailModel ( ) . isDiskPluggedToVm ( object ) ; setTitle ( ( isDiskPlugged ? constants.active ( ) : constants.inactive ( ) ) ) ; return isDiskPlugged ? getCommonResources ( ) . upImage ( ) : getCommonResources ( ) . downImage ( ) ; }

Target:
public com.google.gwt.resources.client.ImageResource getValue ( org.ovirt.engine.core.common.businessentities.VM object ) { boolean isDiskPlugged = getDetailModel ( ) . isDiskPluggedToVm ( object ) ; return isDiskPlugged ? org.ovirt.engine.ui.webadmin.section.main.view.tab.disk.SubTabDiskVmView.resources.upImage ( ) : org.ovirt.engine.ui.webadmin.section.main.view.tab.disk.SubTabDiskVmView.resources.downImage ( ) ; }
Source:
public org.ovirt.engine.core.compat.Guid createTask ( 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 , java.lang.String description , java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.VdcObjectType > entitiesMap ) { return coCoAsyncTaskHelper.createTask ( taskId , command , asyncTaskCreationInfo , parentCommand , description , entitiesMap ) ; }

Target:
public org.ovirt.engine.core.common.businessentities.AsyncTask createAsyncTask ( org.ovirt.engine.core.bll.CommandBase < ? > command , org.ovirt.engine.core.common.asynctasks.AsyncTaskCreationInfo asyncTaskCreationInfo , org.ovirt.engine.core.common.action.ActionType parentCommand ) { return coCoAsyncTaskHelper.createAsyncTask ( command , asyncTaskCreationInfo , parentCommand ) ; }
Source:
public void validateFailsWhenGlusterMultipleHostHasVolumesWithForce ( ) throws java.lang.Exception { command = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.RemoveVdsCommand ( new org.ovirt.engine.core.common.action.RemoveVdsParameters ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , true ) , null ) ) ; prepareMocks ( ) ; mockVdsWithStatus ( VDSStatus.Maintenance ) ; mockHasMultipleClusters ( true ) ; mockIsGlusterEnabled ( true ) ; mockHasVolumeOnServer ( true ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( command , EngineMessage.VDS_CANNOT_REMOVE_HOST_HAVING_GLUSTER_VOLUME ) ; }

Target:
public void validateFailsWhenGlusterHostHasVolumes ( ) throws java.lang.Exception { mockVdsWithStatus ( VDSStatus.Maintenance ) ; mockVdsDynamic ( ) ; mockVmsPinnedToHost ( java.util.Collections.emptyList ( ) ) ; mockIsGlusterEnabled ( true ) ; mockHasVolumeOnServer ( true ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( command , EngineMessage.VDS_CANNOT_REMOVE_HOST_HAVING_GLUSTER_VOLUME ) ; }
Source:
protected void cretaeVirtIODisk ( ) { org.ovirt.engine.core.common.businessentities.DiskImage disk = new org.ovirt.engine.core.common.businessentities.DiskImage ( ) ; disk.setImageId ( diskImageGuid ) ; disk.setDiskInterface ( DiskInterface.VirtIO ) ; disk.setActive ( true ) ; org.mockito.Mockito.doReturn ( diskDao ) . when ( command ) . getDiskDao ( ) ; org.mockito.Mockito.when ( diskDao.get ( diskImageGuid ) ) . thenReturn ( disk ) ; mockVmDevice ( false ) ; }

Target:
protected void cretaeVirtIODisk ( ) { org.ovirt.engine.core.common.businessentities.DiskImage disk = getDiskImage ( ) ; disk.setDiskInterface ( DiskInterface.VirtIO ) ; disk.setActive ( true ) ; org.mockito.Mockito.doReturn ( diskDao ) . when ( command ) . getDiskDao ( ) ; org.mockito.Mockito.when ( diskDao.get ( diskImageGuid ) ) . thenReturn ( disk ) ; mockVmDevice ( false ) ; }
Source:
protected void doTestBadRemove ( boolean canDo , boolean success , java.lang.String detail ) throws java.lang.Exception { setUpGetEntityExpectations ( ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.RemoveAdGroup , org.ovirt.engine.core.common.action.AdElementParametersBase.class , new java.lang.String [ ] { "AdElementId" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , canDo , success ) ) ; try { collection.remove ( GUIDS [ 0 ] . toString ( ) ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }

Target:
public void testRemove ( ) throws java.lang.Exception { setUpGetEntityExpectations ( ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.RemoveGroup , org.ovirt.engine.core.common.action.AdElementParametersBase.class , new java.lang.String [ ] { "AdElementId" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , true , true ) ) ; verifyRemove ( collection.remove ( GUIDS [ 0 ] . toString ( ) ) ) ; }
Source:
protected com.google.gwt.user.cellview.client.CellTree createDataDisplayWidget ( org.ovirt.engine.ui.webadmin.uicommon.model.TagModelProvider modelProvider ) { org.ovirt.engine.ui.webadmin.widget.tags.TagList.TagTreeResources res = com.google.gwt.core.client.GWT.create ( org.ovirt.engine.ui.webadmin.widget.tags.TagList.TagTreeResources.class ) ; com.google.gwt.user.cellview.client.CellTree display = new com.google.gwt.user.cellview.client.CellTree ( modelProvider , null , res ) ; display.setAnimationEnabled ( true ) ; display.setKeyboardSelectionPolicy ( KeyboardSelectionPolicy.BOUND_TO_SELECTION ) ; modelProvider.setDisplay ( display ) ; return display ; }

Target:
private void expandTree ( com.google.gwt.user.cellview.client.TreeNode node ) { if ( node == null ) { return ; } for ( int i = 0 ; i < ( node.getChildCount ( ) ) ; i ++ ) { expandTree ( node.setChildOpen ( i , true ) ) ; } }
Source:
public void testUpdateNotFound ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpGetEntityExpectations ( 1 , true ) ; try { resource.update ( getModel ( 1 ) ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }

Target:
public void testUpdateNotFound ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpGetEntityExpectations ( 1 , true ) ; try { resource.update ( getModel ( 1 ) ) ; org.junit.Assert.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }
Source:
public void unsyncedNetworkModified ( ) { org.ovirt.engine.core.common.businessentities.network.Network net = createNetwork ( "net" ) ; org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic = createNicSyncedWithNetwork ( "nic0" , net ) ; nic.setBridged ( ( ! ( net.isVmNetwork ( ) ) ) ) ; nic.setBootProtocol ( NetworkBootProtocol.NONE ) ; mockExistingNetworks ( net ) ; mockExistingIfaces ( nic ) ; nic.setBootProtocol ( NetworkBootProtocol.DHCP ) ; org.ovirt.engine.core.bll.network.host.SetupNetworksHelper helper = createHelper ( createParametersForNics ( nic ) ) ; validateAndExpectViolation ( helper , VdcBllMessages.NETWORKS_NOT_IN_SYNC , net.getName ( ) ) ; }

Target:
public void unsyncedNetworkModified ( ) { org.ovirt.engine.core.common.businessentities.network.Network net = createNetwork ( "net" ) ; org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic = createNicSyncedWithNetwork ( "nic0" , net ) ; nic.setBridged ( ( ! ( net.isVmNetwork ( ) ) ) ) ; nic.setBootProtocol ( NetworkBootProtocol.NONE ) ; mockExistingNetworks ( net ) ; mockExistingIfaces ( nic ) ; nic.setBootProtocol ( NetworkBootProtocol.DHCP ) ; org.ovirt.engine.core.bll.network.host.SetupNetworksHelper helper = createHelper ( createParametersForNics ( nic ) ) ; validateAndExpectViolation ( helper , EngineMessage.NETWORKS_NOT_IN_SYNC , net.getName ( ) ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeTaskReturnForXmlRpc glusterVolumeRemoveBrickStatus ( java.lang.String volumeName , java.lang.String [ ] bricksList ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "GlusterVolume.removeBrickStatus" ) . withParameter ( "volumeName" , volumeName ) . withParameter ( "brickList" , new java.util.ArrayList < > ( java.util.Arrays.asList ( bricksList ) ) ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) . withIgnoreResponseKey ( ) ; return new org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeTaskReturnForXmlRpc ( response ) ; }

Target:
public org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeTaskReturn glusterVolumeRemoveBrickStatus ( java.lang.String volumeName , java.lang.String [ ] bricksList ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "GlusterVolume.removeBrickStatus" ) . withParameter ( "volumeName" , volumeName ) . withParameter ( "brickList" , new java.util.ArrayList < > ( java.util.Arrays.asList ( bricksList ) ) ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) . withIgnoreResponseKey ( ) ; return new org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeTaskReturn ( response ) ; }
Source:
protected boolean canDoAction ( ) { if ( ! ( super . canDoAction ( ) ) ) { return false ; } oldMacPool = getMacPoolDao ( ) . get ( getMacPoolId ( ) ) ; return ( ( validate ( new org.ovirt.engine.core.bll.MacPoolValidator ( oldMacPool ) . macPoolExists ( ) ) ) && ( validate ( new org.ovirt.engine.core.bll.MacPoolValidator ( getMacPoolEntity ( ) ) . hasUniqueName ( ) ) ) ) && ( validate ( new org.ovirt.engine.core.bll.UpdateMacPoolValidator ( oldMacPool , getMacPoolEntity ( ) ) . defaultFlagIsNotChanged ( ) ) ) ; }

Target:
protected boolean canDoAction ( ) { if ( ! ( super . canDoAction ( ) ) ) { return false ; } oldMacPool = getMacPoolDao ( ) . get ( getMacPoolId ( ) ) ; return ( ( validate ( new org.ovirt.engine.core.bll.MacPoolValidator ( oldMacPool ) . macPoolExists ( ) ) ) && ( validate ( new org.ovirt.engine.core.bll.MacPoolValidator ( getMacPoolEntity ( ) ) . hasUniqueName ( ) ) ) ) && ( validate ( org.ovirt.engine.core.bll.UpdateMacPoolCommand.validateDefaultFlagIsNotChanged ( oldMacPool , getMacPoolEntity ( ) ) ) ) ; }
Source:
public static void getClusterById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVdsGroupById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
public static void getHostArchitecture ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter < org.ovirt.engine.core.common.businessentities.ArchitectureType > ( ) { @ java.lang.Override public org.ovirt.engine.core.common.businessentities.ArchitectureType Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return ( ( org.ovirt.engine.core.common.businessentities.ArchitectureType ) ( source ) ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetHostArchitecture , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
public void testGetNotFound ( ) throws java.lang.Exception { org.ovirt.engine.api.resource.StorageResource subresource = collection.getStorageResource ( "foo" ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpQueryExpectations ( "" ) ; try { subresource.get ( ) ; org.junit.Assert.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }

Target:
public void testGetNotFound ( ) throws java.lang.Exception { org.ovirt.engine.api.resource.StorageResource subresource = collection.getStorageResource ( "foo" ) ; setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpQueryExpectations ( "" ) ; try { subresource.get ( ) ; org.junit.jupiter.api.Assertions.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }
Source:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; dao = dbFacade.getStorageDomainStaticDao ( ) ; dynamicDao = dbFacade.getStorageDomainDynamicDao ( ) ; diskImageDao = dbFacade.getDiskImageDao ( ) ; imageDao = dbFacade.getImageDao ( ) ; existingDomain = dao.get ( new org.ovirt.engine.core.compat.Guid ( "72e3a666-89e1-4005-a7ca-f7548004a9ab" ) ) ; newStaticDomain = new org.ovirt.engine.core.common.businessentities.StorageDomainStatic ( ) ; newStaticDomain.setStorageName ( "NewStorageDomain" ) ; newStaticDomain.setStorage ( "fDMzhE-wx3s-zo3q-Qcxd-T0li-yoYU-QvVePl" ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; dao = dbFacade.getStorageDomainStaticDao ( ) ; dynamicDao = dbFacade.getStorageDomainDynamicDao ( ) ; diskImageDao = dbFacade.getDiskImageDao ( ) ; imageDao = dbFacade.getImageDao ( ) ; existingDomain = dao.get ( new org.ovirt.engine.core.compat.Guid ( "72e3a666-89e1-4005-a7ca-f7548004a9ab" ) ) ; newStaticDomain = new org.ovirt.engine.core.common.businessentities.StorageDomainStatic ( ) ; newStaticDomain.setStorageName ( "NewStorageDomain" ) ; newStaticDomain.setStorage ( "fDMzhE-wx3s-zo3q-Qcxd-T0li-yoYU-QvVePl" ) ; newStaticDomain.setStorageFormat ( StorageFormatType.V1 ) ; }
Source:
public void canDoAction ( ) { java.util.List lunsFromDb = new java.util.ArrayList < > ( ) ; org.ovirt.engine.core.common.businessentities.storage.LUNs lun1 = new org.ovirt.engine.core.common.businessentities.storage.LUNs ( ) ; lun1.setLUN_id ( "1" ) ; lun1.setStorageDomainId ( sdId ) ; org.ovirt.engine.core.common.businessentities.storage.LUNs lun2 = new org.ovirt.engine.core.common.businessentities.storage.LUNs ( ) ; lun2.setLUN_id ( "2" ) ; lun2.setStorageDomainId ( sdId ) ; lunsFromDb.add ( lun1 ) ; lunsFromDb.add ( lun2 ) ; org.mockito.Mockito.when ( lunsDao.getAllForVolumeGroup ( org.ovirt.engine.core.bll.storage.domain.RefreshLunsSizeCommandTest.STORAGE ) ) . thenReturn ( lunsFromDb ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionSuccess ( cmd ) ; }

Target:
public void canDoAction ( ) { java.util.List lunsFromDb = new java.util.ArrayList < > ( ) ; org.ovirt.engine.core.common.businessentities.storage.LUNs lun1 = new org.ovirt.engine.core.common.businessentities.storage.LUNs ( ) ; lun1.setLUNId ( "1" ) ; lun1.setStorageDomainId ( sdId ) ; org.ovirt.engine.core.common.businessentities.storage.LUNs lun2 = new org.ovirt.engine.core.common.businessentities.storage.LUNs ( ) ; lun2.setLUNId ( "2" ) ; lun2.setStorageDomainId ( sdId ) ; lunsFromDb.add ( lun1 ) ; lunsFromDb.add ( lun2 ) ; org.mockito.Mockito.when ( lunsDao.getAllForVolumeGroup ( org.ovirt.engine.core.bll.storage.domain.RefreshLunsSizeCommandTest.STORAGE ) ) . thenReturn ( lunsFromDb ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionSuccess ( cmd ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc glusterHookUpdate ( java.lang.String glusterCommand , java.lang.String stage , java.lang.String hookName , java.lang.String content , java.lang.String checksum ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "GlusterHook.update" ) . withParameter ( "glusterCmd" , glusterCommand ) . withParameter ( "hookLevel" , stage ) . withParameter ( "hookName" , hookName ) . withParameter ( "hookData" , content ) . withParameter ( "hookMd5Sum" , checksum ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( response ) ; }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturn glusterHookUpdate ( java.lang.String glusterCommand , java.lang.String stage , java.lang.String hookName , java.lang.String content , java.lang.String checksum ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "GlusterHook.update" ) . withParameter ( "glusterCmd" , glusterCommand ) . withParameter ( "hookLevel" , stage ) . withParameter ( "hookName" , hookName ) . withParameter ( "hookData" , content ) . withParameter ( "hookMd5Sum" , checksum ) . 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:
private void generateWriterSource ( org.ovirt.api.metamodel.concepts.StructType type ) { org.ovirt.api.metamodel.tool.JavaClassName writerName = javaTypes.getJsonWriterName ( type ) ; javaBuffer.addLine ( "public class %1$s {" , writerName.getSimpleName ( ) ) ; javaBuffer.addLine ( ) ; generateWriteOne ( type ) ; generateWriteMany ( type ) ; javaBuffer.addLine ( "}" ) ; javaBuffer.addLine ( ) ; }

Target:
private void generateEnumReader ( org.ovirt.api.metamodel.concepts.EnumType type ) { javaBuffer = new org.ovirt.api.metamodel.tool.JavaClassBuffer ( ) ; org.ovirt.api.metamodel.tool.JavaClassName readerName = javaTypes.getJsonReaderName ( type ) ; javaBuffer.setClassName ( readerName ) ; generateEnumReaderSource ( type ) ; try { javaBuffer.write ( outDir ) ; } catch ( java.io.IOException exception ) { throw new java.lang.RuntimeException ( ( ( "Can\'t write file for XML reader \"" + readerName ) + "\"" ) , exception ) ; } }
Source:
public static final < T extends org.ovirt.engine.core.common.businessentities.Disk > java.util.Collection < T > filterNonSnapableDisks ( java.util.Collection < org.ovirt.engine.core.common.businessentities.Disk > source ) { return ( ( java.util.Collection < T > ) ( org.ovirt.engine.ui.uicommonweb.Linq.where ( source , new org.ovirt.engine.ui.uicommonweb.Linq.IPredicate < org.ovirt.engine.core.common.businessentities.Disk > ( ) { @ java.lang.Override public boolean match ( org.ovirt.engine.core.common.businessentities.Disk source ) { return source.isAllowSnapshot ( ) ; } } ) ) ) ; }

Target:
public static final < T extends org.ovirt.engine.core.common.businessentities.storage.Disk > java.util.Collection < T > filterDisksByStorageType ( java.util.Collection < org.ovirt.engine.core.common.businessentities.storage.Disk > source , final org.ovirt.engine.core.common.businessentities.storage.DiskStorageType diskStorageType ) { return ( ( java.util.Collection < T > ) ( org.ovirt.engine.ui.uicommonweb.Linq.where ( source , new org.ovirt.engine.ui.uicommonweb.Linq.IPredicate < org.ovirt.engine.core.common.businessentities.storage.Disk > ( ) { @ java.lang.Override public boolean match ( org.ovirt.engine.core.common.businessentities.storage.Disk source ) { return ( source.getDiskStorageType ( ) ) == diskStorageType ; } } ) ) ) ; }
Source:
public void prepareParams ( ) { parameters = new org.ovirt.engine.core.common.action.StorageServerConnectionParametersBase ( ) ; parameters.setVdsId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; command = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.storage.AddStorageServerConnectionCommand < org.ovirt.engine.core.common.action.StorageServerConnectionParametersBase > ( parameters , null ) ) ; org.mockito.Mockito.doReturn ( storageConnDao ) . when ( command ) . getStorageConnDao ( ) ; org.mockito.Mockito.doReturn ( storageDomainDao ) . when ( command ) . getStorageDomainDao ( ) ; }

Target:
public void prepareParams ( ) { parameters = new org.ovirt.engine.core.common.action.StorageServerConnectionParametersBase ( ) ; parameters.setVdsId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; command = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.storage.AddStorageServerConnectionCommand < org.ovirt.engine.core.common.action.StorageServerConnectionParametersBase > ( parameters , null ) ) ; org.mockito.Mockito.doReturn ( storageConnDao ) . when ( command ) . getStorageConnDao ( ) ; org.mockito.Mockito.doReturn ( storageDomainDao ) . when ( command ) . getStorageDomainDao ( ) ; org.mockito.Mockito.doReturn ( null ) . when ( command ) . findConnectionWithSameDetails ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.StorageServerConnections.class ) ) ; }
Source:
protected boolean canDoAction ( ) { if ( ! ( super . canDoAction ( ) ) ) { return false ; } if ( getGeoRepSession ( ) . getStatus ( ) . equals ( GeoRepSessionStatus.ACTIVE ) ) { return failCanDoAction ( VdcBllMessages.ACTION_TYPE_FAILED_GEOREP_SESSION_ALREADY_STARTED ) ; } return true ; }

Target:
protected boolean canDoAction ( ) { if ( ! ( super . canDoAction ( ) ) ) { return false ; } if ( ( getGeoRepSession ( ) . getStatus ( ) . equals ( GeoRepSessionStatus.ACTIVE ) ) && ( ! ( getParameters ( ) . isForce ( ) ) ) ) { return failCanDoAction ( VdcBllMessages.ACTION_TYPE_FAILED_GEOREP_SESSION_ALREADY_STARTED ) ; } return true ; }
Source:
public java.util.Collection < org.ovirt.engine.core.common.businessentities.DiskInterface > getDiskHotpluggableInterfaces ( java.lang.Integer osId , org.ovirt.engine.core.compat.Version version ) { java.util.Set < java.lang.String > diskHotpluggableInterfaces = getDiskHotpluggableInterfacesMap ( ) . get ( new org.ovirt.engine.core.common.utils.Pair < java.lang.Integer , org.ovirt.engine.core.compat.Version > ( osId , version ) ) ; if ( diskHotpluggableInterfaces == null ) { return java.util.Collections.emptySet ( ) ; } java.util.Collection < org.ovirt.engine.core.common.businessentities.DiskInterface > diskInterfaces = new java.util.HashSet < org.ovirt.engine.core.common.businessentities.DiskInterface > ( ) ; for ( java.lang.String diskHotpluggableInterface : diskHotpluggableInterfaces ) { diskInterfaces.add ( org.ovirt.engine.core.common.businessentities.DiskInterface.valueOf ( diskHotpluggableInterface ) ) ; } return diskInterfaces ; }

Target:
public java.util.Collection < org.ovirt.engine.core.common.businessentities.storage.DiskInterface > getDiskHotpluggableInterfaces ( java.lang.Integer osId , org.ovirt.engine.core.compat.Version version ) { java.util.Set < java.lang.String > diskHotpluggableInterfaces = getDiskHotpluggableInterfacesMap ( ) . get ( new org.ovirt.engine.core.common.utils.Pair < java.lang.Integer , org.ovirt.engine.core.compat.Version > ( osId , version ) ) ; if ( diskHotpluggableInterfaces == null ) { return java.util.Collections.emptySet ( ) ; } java.util.Collection < org.ovirt.engine.core.common.businessentities.storage.DiskInterface > diskInterfaces = new java.util.HashSet < org.ovirt.engine.core.common.businessentities.storage.DiskInterface > ( ) ; for ( java.lang.String diskHotpluggableInterface : diskHotpluggableInterfaces ) { diskInterfaces.add ( org.ovirt.engine.core.common.businessentities.storage.DiskInterface.valueOf ( diskHotpluggableInterface ) ) ; } return diskInterfaces ; }
Source:
static org.ovirt.engine.core.bll.ValidationResult validateDefaultFlagIsNotChanged ( org.ovirt.engine.core.common.businessentities.MacPool macPoolFromDb , org.ovirt.engine.core.common.businessentities.MacPool newMacPool ) { if ( ( macPoolFromDb == null ) || ( newMacPool == null ) ) { throw new java.lang.IllegalArgumentException ( ) ; } final boolean defaultChanged = ( macPoolFromDb.isDefaultPool ( ) ) != ( newMacPool.isDefaultPool ( ) ) ; return org.ovirt.engine.core.bll.ValidationResult.failWith ( VdcBllMessages.ACTION_TYPE_FAILED_CHANGING_DEFAULT_MAC_POOL_IS_NOT_SUPPORTED ) . when ( defaultChanged ) ; }

Target:
static org.ovirt.engine.core.bll.ValidationResult validateDefaultFlagIsNotChanged ( org.ovirt.engine.core.common.businessentities.MacPool macPoolFromDb , org.ovirt.engine.core.common.businessentities.MacPool newMacPool ) { if ( ( macPoolFromDb == null ) || ( newMacPool == null ) ) { throw new java.lang.IllegalArgumentException ( ) ; } final boolean defaultChanged = ( macPoolFromDb.isDefaultPool ( ) ) != ( newMacPool.isDefaultPool ( ) ) ; return org.ovirt.engine.core.bll.ValidationResult.failWith ( EngineMessage.ACTION_TYPE_FAILED_CHANGING_DEFAULT_MAC_POOL_IS_NOT_SUPPORTED ) . when ( defaultChanged ) ; }
Source:
public static java.util.List < org.ovirt.engine.core.aaa.DirectoryGroup > findGroupsByIds ( final org.ovirt.engine.core.extensions.mgr.ExtensionProxy extension , final java.lang.String namespace , final java.util.List < java.lang.String > ids , final boolean resolveGroups , final boolean resolveGroupsRecursive ) { java.util.List < org.ovirt.engine.core.aaa.DirectoryGroup > results = new java.util.ArrayList < > ( ) ; for ( java.util.List < java.lang.String > batch : org.ovirt.engine.core.aaa.SearchQueryParsingUtils.getIdsBatches ( extension.getContext ( ) , ids ) ) { results.addAll ( org.ovirt.engine.core.aaa.AuthzUtils.queryGroups ( extension , namespace , org.ovirt.engine.core.aaa.SearchQueryParsingUtils.generateQueryMap ( batch , QueryEntity.GROUP ) , resolveGroups , resolveGroupsRecursive ) ) ; } return results ; }

Target:
public static java.util.List < org.ovirt.engine.api.extensions.ExtMap > findGroupRecordsByIds ( final org.ovirt.engine.core.extensions.mgr.ExtensionProxy extension , final java.lang.String namespace , final java.util.List < java.lang.String > ids , final boolean groupsResolving , final boolean groupsResolvingRecursive ) { java.util.List < org.ovirt.engine.api.extensions.ExtMap > results = new java.util.ArrayList < > ( ) ; for ( java.util.List < java.lang.String > batch : org.ovirt.engine.core.aaa.SearchQueryParsingUtils.getIdsBatches ( extension.getContext ( ) , ids ) ) { results.addAll ( org.ovirt.engine.core.aaa.AuthzUtils.queryGroupRecords ( extension , namespace , org.ovirt.engine.core.aaa.SearchQueryParsingUtils.generateQueryMap ( batch , Authz.QueryEntity.GROUP ) , groupsResolving , groupsResolvingRecursive ) ) ; } return results ; }
Source:
public int hashCode ( ) { final int prime = 31 ; int result = 1 ; result = ( prime * result ) + ( ( externalId ) == null ? 0 : externalId.hashCode ( ) ) ; result = ( prime * result ) + ( ( externalSystemType ) == null ? 0 : externalSystemType.hashCode ( ) ) ; return result ; }

Target:
public boolean equals ( java.lang.Object obj ) { if ( ( this ) == obj ) { return true ; } if ( ! ( obj instanceof org.ovirt.engine.core.common.job.ExternalSystem ) ) { return false ; } org.ovirt.engine.core.common.job.ExternalSystem other = ( ( org.ovirt.engine.core.common.job.ExternalSystem ) ( obj ) ) ; return ( java.util.Objects.equals ( externalId , other.externalId ) ) && ( ( externalSystemType ) == ( other.externalSystemType ) ) ; }
Source:
public void invoke ( org.ovirt.engine.api.extensions.ExtMap context , java.util.Map < java.lang.String , java.lang.Object > args ) { context.mput ( Schema.InvokeKeys.MODIFICATION_TYPE , Sql.ModificationTypes.UPDATE ) ; org.ovirt.engine.extension.aaa.jdbc.binding.cli.Cli.putUserEditKeys ( context , args ) ; if ( ! ( context.containsKey ( org.ovirt.engine.extension.aaa.jdbc.binding.cli.Cli.ContextKeys.EXIT_STATUS ) ) ) { org.ovirt.engine.extension.aaa.jdbc.binding.cli.Cli.commands.get ( "_schema-modify" ) . invoke ( context ) ; context.putIfAbsent ( org.ovirt.engine.extension.aaa.jdbc.binding.cli.Cli.ContextKeys.EXIT_STATUS , org.ovirt.engine.extension.aaa.jdbc.binding.cli.Cli.SUCCESS ) ; } }

Target:
public void invoke ( org.ovirt.engine.api.extensions.ExtMap context , java.util.Map < java.lang.String , java.lang.Object > args ) { context.mput ( Schema.InvokeKeys.MODIFICATION_TYPE , Sql.ModificationTypes.UPDATE ) ; org.ovirt.engine.extension.aaa.jdbc.binding.cli.Cli.putUserEditKeys ( context , args ) ; if ( ! ( context.containsKey ( ContextKeys.EXIT_STATUS ) ) ) { org.ovirt.engine.extension.aaa.jdbc.binding.cli.Cli.commands.get ( "_schema-modify" ) . invoke ( context ) ; context.putIfAbsent ( ContextKeys.EXIT_STATUS , org.ovirt.engine.extension.aaa.jdbc.binding.cli.Cli.SUCCESS ) ; } }
Source:
protected org.ovirt.engine.api.model.Nic doPopulate ( org.ovirt.engine.api.model.Nic model , org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface entity ) { org.ovirt.engine.api.restapi.resource.BackendVmNicsResource parent = ( ( org.ovirt.engine.api.restapi.resource.BackendVmNicsResource ) ( collection ) ) ; parent.addReportedDevices ( model , entity ) ; return model ; }

Target:
protected org.ovirt.engine.api.model.Nic deprecatedPopulate ( org.ovirt.engine.api.model.Nic model , org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface entity ) { java.util.Set < java.lang.String > details = org.ovirt.engine.api.common.util.DetailHelper.getDetails ( httpHeaders , uriInfo ) ; org.ovirt.engine.api.restapi.resource.BackendNicHelper.addReportedDevices ( this , model , entity ) ; if ( details.contains ( "statistics" ) ) { org.ovirt.engine.api.restapi.resource.BackendNicHelper.addStatistics ( this , model , entity ) ; } return model ; }