auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private void updateCachedIsoFileListFromVdsm ( org.ovirt.engine.core.common.businessentities.RepoImage repoImage ) { boolean isRefreshed = false ; try { java.util.List < org.ovirt.engine.core.common.businessentities.RepoImage > problematicRepoFileList = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.RepoImage > ( ) ; isRefreshed = refreshIsoDomain ( repoImage.getRepoDomainId ( ) , problematicRepoFileList , repoImage.getFileType ( ) ) ; addRepoFileToProblematicList ( problematicRepoFileList ) ; } finally { org.ovirt.engine.core.bll.IsoDomainListSyncronizer.log.info ( "Finished automatic refresh process for '{}' file type with {}, for storage domain id '{}'." , repoImage.getFileType ( ) , ( isRefreshed ? "success" : "failure" ) , repoImage.getRepoDomainId ( ) ) ; } }

Target:
private void updateCachedIsoFileListFromVdsm ( org.ovirt.engine.core.common.businessentities.storage.RepoImage repoImage ) { boolean isRefreshed = false ; try { java.util.List < org.ovirt.engine.core.common.businessentities.storage.RepoImage > problematicRepoFileList = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.RepoImage > ( ) ; isRefreshed = refreshIsoDomain ( repoImage.getRepoDomainId ( ) , problematicRepoFileList , repoImage.getFileType ( ) ) ; addRepoFileToProblematicList ( problematicRepoFileList ) ; } finally { org.ovirt.engine.core.bll.IsoDomainListSyncronizer.log.info ( "Finished automatic refresh process for '{}' file type with {}, for storage domain id '{}'." , repoImage.getFileType ( ) , ( isRefreshed ? "success" : "failure" ) , repoImage.getRepoDomainId ( ) ) ; } }
Source:
public static void getStorageDomainById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storageDomainId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( org.ovirt.engine.core.common.businessentities.StorageDomain ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetStorageDomainById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( storageDomainId ) , aQuery ) ; }

Target:
public static void getStorageDomainListByTemplate ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid templateId ) { 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.StorageDomain > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStorageDomainsByVmTemplateId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( templateId ) , aQuery ) ; }
Source:
com.google.gwt.user.client.ui.StackLayoutPanel createWestStackPanel ( org.ovirt.engine.ui.webadmin.uicommon.model.SystemTreeModelProvider treeModelProvider , org.ovirt.engine.ui.webadmin.uicommon.model.BookmarkModelProvider bookmarkModelProvider , org.ovirt.engine.ui.webadmin.uicommon.model.TagModelProvider tagModelProvider ) { final com.google.gwt.user.client.ui.StackLayoutPanel panel = new com.google.gwt.user.client.ui.StackLayoutPanel ( com.google.gwt.dom.client.Style.Unit.PX ) { @ java.lang.Override public void onResize ( ) { super . onResize ( ) ; if ( ( uiHandlers ) != null ) { uiHandlers.setMainTabBarOffset ( getOffsetWidth ( ) ) ; } } } ; return panel ; }

Target:
public void onSelection ( com.google.gwt.event.logical.shared.SelectionEvent < java.lang.Integer > event ) { if ( event == null ) { return ; } if ( ( event.getSelectedItem ( ) ) == ( org.ovirt.engine.ui.webadmin.section.main.view.MainSectionView.BOOKMARK_INDEX ) ) { bookmarkModelProvider.getModel ( ) . executeBookmarksSearch ( ) ; } else { bookmarkModelProvider.getModel ( ) . EnsureAsyncSearchStopped ( ) ; } }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.VMListReturnForXmlRpc fullList ( java.util.List < java.lang.String > vmIds ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "Host.getVMFullList" ) . withOptionalParameterAsList ( "vmList" , vmIds ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) . withResponseKey ( "vmList" ) . withResponseType ( java.lang.Object [ ] . class ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.VMListReturnForXmlRpc ( response ) ; }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.VMListReturn fullList ( java.util.List < java.lang.String > vmIds ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "Host.getVMFullList" ) . withOptionalParameterAsList ( "vmList" , vmIds ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) . withResponseKey ( "vmList" ) . withResponseType ( java.lang.Object [ ] . class ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.VMListReturn ( response ) ; }
Source:
public org.ovirt.engine.core.common.businessentities.TagsVmMap mapRow ( java.sql.ResultSet rs , int rowNum ) throws java.sql.SQLException { org.ovirt.engine.core.common.businessentities.TagsVmMap entity = new org.ovirt.engine.core.common.businessentities.TagsVmMap ( ) ; entity.settag_id ( org.ovirt.engine.core.compat.Guid.createGuidFromStringDefaultEmpty ( rs.getString ( "tag_id" ) ) ) ; entity.setvm_id ( org.ovirt.engine.core.compat.Guid.createGuidFromStringDefaultEmpty ( rs.getString ( "vm_id" ) ) ) ; entity.setDefaultDisplayType ( ( ( java.lang.Integer ) ( rs.getObject ( "DefaultDisplayType" ) ) ) ) ; return entity ; }

Target:
public org.ovirt.engine.core.common.businessentities.TagsVmMap mapRow ( java.sql.ResultSet rs , int rowNum ) throws java.sql.SQLException { org.ovirt.engine.core.common.businessentities.TagsVmMap entity = new org.ovirt.engine.core.common.businessentities.TagsVmMap ( ) ; entity.settag_id ( getGuidDefaultEmpty ( rs , "tag_id" ) ) ; entity.setvm_id ( getGuidDefaultEmpty ( rs , "vm_id" ) ) ; entity.setDefaultDisplayType ( ( ( java.lang.Integer ) ( rs.getObject ( "DefaultDisplayType" ) ) ) ) ; return entity ; }
Source:
public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > list = org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VDS > cast ( ( ( java.lang.Iterable ) ( source ) ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( ) ; }

Target:
public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > list = org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VDS > cast ( ( ( java.lang.Iterable ) ( source ) ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc glusterVolumeBrickAdd ( java.lang.String volumeName , java.lang.String [ ] bricks , int replicaCount , int stripeCount ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "GlusterVolume.addBrick" ) . withParameter ( "volumeName" , volumeName ) . withParameter ( "brickList" , new java.util.ArrayList < > ( java.util.Arrays.asList ( bricks ) ) ) . withParameter ( "replicaCount" , replicaCount ) . withParameter ( "stripeCount" , stripeCount ) . 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.QemuImageInfoReturnForXmlRpc getQemuImageInfo ( java.lang.String sdUUID , java.lang.String spUUID , java.lang.String imgUUID , java.lang.String volUUID ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "Volume.getQemuImageInfo" ) . withParameter ( "storagepoolID" , spUUID ) . withParameter ( "storagedomainID" , sdUUID ) . withParameter ( "imageID" , imgUUID ) . withParameter ( "volumeID" , volUUID ) . 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.QemuImageInfoReturnForXmlRpc ( response ) ; }
Source:
protected org.ovirt.engine.core.common.businessentities.DiskImage getDestinationDiskImage ( ) { if ( ( _destinationImage ) == null ) { _destinationImage = getDiskImageDao ( ) . get ( getDestinationImageId ( ) ) ; if ( ( _destinationImage ) == null ) { _destinationImage = getDiskImageDao ( ) . getSnapshotById ( getDestinationImageId ( ) ) ; } } return _destinationImage ; }

Target:
protected org.ovirt.engine.core.common.businessentities.DiskImage getDestinationDiskImage ( ) { if ( ( _destinationImage ) == null ) { _destinationImage = org.ovirt.engine.core.bll.BaseImagesCommand.getDiskImageDao ( ) . get ( getDestinationImageId ( ) ) ; if ( ( _destinationImage ) == null ) { _destinationImage = org.ovirt.engine.core.bll.BaseImagesCommand.getDiskImageDao ( ) . getSnapshotById ( getDestinationImageId ( ) ) ; } } return _destinationImage ; }
Source:
public void thpDefaultTrueTest ( ) { org.ovirt.engine.core.common.businessentities.Cluster cluster = new org.ovirt.engine.core.common.businessentities.Cluster ( ) ; cluster.setVersion ( new org.ovirt.engine.api.restapi.types.Version ( ) { { setMajor ( 3 ) ; setMinor ( 0 ) ; } } ) ; org.ovirt.engine.core.common.businessentities.Cluster transform = getMapper ( ) . map ( cluster , null ) ; assertTrue ( transform.getTransparentHugepages ( ) ) ; }

Target:
public void thpDefaultTrueTest ( ) { org.ovirt.engine.core.common.businessentities.Cluster cluster = new org.ovirt.engine.core.common.businessentities.Cluster ( ) ; cluster.setVersion ( new org.ovirt.engine.api.restapi.types.Version ( ) { { setMajor ( 3 ) ; setMinor ( 0 ) ; } } ) ; org.ovirt.engine.core.common.businessentities.Cluster transform = getMapper ( ) . map ( cluster , null ) ; org.junit.Assert.assertTrue ( transform.getTransparentHugepages ( ) ) ; }
Source:
private void processFence ( ) { org.ovirt.engine.core.bll.FenceExecutor executor = new org.ovirt.engine.core.bll.FenceExecutor ( getVds ( ) , org.ovirt.engine.core.common.businessentities.FenceActionType.Status ) ; if ( ( getVds ( ) . getpm_enabled ( ) ) && ( executor.findProxyHost ( ) ) ) { org.ovirt.engine.core.common.vdscommands.VDSReturnValue returnValue = executor.Fence ( ) ; fenceSucceeded = returnValue.getSucceeded ( ) ; fenceStatusReturnValue = ( ( org.ovirt.engine.core.common.businessentities.FenceStatusReturnValue ) ( returnValue.getReturnValue ( ) ) ) ; vdsProxyFound = true ; } }

Target:
private void processFence ( ) { org.ovirt.engine.core.bll.FenceExecutor executor = new org.ovirt.engine.core.bll.FenceExecutor ( getVds ( ) , org.ovirt.engine.core.common.businessentities.FenceActionType.Status ) ; if ( ( getVds ( ) . getpm_enabled ( ) ) && ( executor.findProxyHost ( ) ) ) { org.ovirt.engine.core.common.vdscommands.VDSReturnValue returnValue = executor.fence ( ) ; fenceSucceeded = returnValue.getSucceeded ( ) ; fenceStatusReturnValue = ( ( org.ovirt.engine.core.common.businessentities.FenceStatusReturnValue ) ( returnValue.getReturnValue ( ) ) ) ; vdsProxyFound = true ; } }
Source:
public java.lang.Void runInTransaction ( ) { for ( org.ovirt.engine.core.compat.Guid asyncTaskId : getReturnValue ( ) . getTaskPlaceHolderIdList ( ) ) { org.ovirt.engine.core.common.businessentities.AsyncTasks task = getAsyncTaskDao ( ) . get ( asyncTaskId ) ; if ( ( task != null ) && ( org.ovirt.engine.core.compat.Guid.isNullOrEmpty ( task.getVdsmTaskId ( ) ) ) ) { org.ovirt.engine.core.bll.tasks.TaskManagerUtil.removeTaskFromDbByTaskId ( task.getTaskId ( ) ) ; } } return null ; }

Target:
public java.lang.Void runInTransaction ( ) { for ( org.ovirt.engine.core.compat.Guid asyncTaskId : getReturnValue ( ) . getTaskPlaceHolderIdList ( ) ) { org.ovirt.engine.core.common.businessentities.AsyncTasks task = org.ovirt.engine.core.bll.tasks.TaskManagerUtil.getAsyncTaskFromDb ( asyncTaskId ) ; if ( ( task != null ) && ( org.ovirt.engine.core.compat.Guid.isNullOrEmpty ( task.getVdsmTaskId ( ) ) ) ) { org.ovirt.engine.core.bll.tasks.TaskManagerUtil.removeTaskFromDbByTaskId ( task.getTaskId ( ) ) ; } } return null ; }
Source:
public void save ( org.ovirt.engine.core.common.businessentities.EngineBackupLog engineBackupLog ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "db_name" , engineBackupLog.getDbName ( ) ) . addValue ( "done_at" , engineBackupLog.getDoneAt ( ) ) . addValue ( "status" , ( engineBackupLog.isPassed ( ) ? 1 : - 1 ) ) . addValue ( "output_message" , engineBackupLog.getOutputMessage ( ) ) ; getCallsHandler ( ) . executeModification ( "LogEngineBackupEvent" , parameterSource ) ; }

Target:
public org.ovirt.engine.core.common.businessentities.EngineBackupLog getLastSuccessfulEngineBackup ( java.lang.String dbName ) { javax.persistence.TypedQuery < org.ovirt.engine.core.common.businessentities.EngineBackupLog > query = entityManager.createNamedQuery ( "EngineBackupLog.getLatest" , org.ovirt.engine.core.common.businessentities.EngineBackupLog.class ) . setParameter ( "dbName" , dbName ) . setMaxResults ( 1 ) ; return singleResult ( query ) ; }
Source:
public void testGetAllForVdsGroup ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VdsStatic > result = dao.getAllForVdsGroup ( existingVds.getvds_group_id ( ) ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.VdsStatic vds : result ) { org.junit.Assert.assertEquals ( existingVds.getvds_group_id ( ) , vds.getvds_group_id ( ) ) ; } }

Target:
public void testGetAllForVdsGroup ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VdsStatic > result = dao.getAllForVdsGroup ( existingVds.getVdsGroupId ( ) ) ; org.junit.Assert.assertNotNull ( result ) ; org.junit.Assert.assertFalse ( result.isEmpty ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.VdsStatic vds : result ) { org.junit.Assert.assertEquals ( existingVds.getVdsGroupId ( ) , vds.getVdsGroupId ( ) ) ; } }
Source:
public void getVmsRunningOnOrMigratingToVds ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmsRunningOnOrMigratingToVds , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
public void getAllProvidersByType ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.businessentities.ProviderType providerType ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Provider > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllProviders , new org.ovirt.engine.core.common.queries.GetAllProvidersParameters ( providerType ) , aQuery ) ; }
Source:
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 ) ; }

Target:
public static void getAllAttachableDisks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetAllAttachableDisks params = new org.ovirt.engine.core.common.queries.GetAllAttachableDisks ( storagePoolId ) ; params.setVmId ( vmId ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllAttachableDisks , params , aQuery ) ; }
Source:
public org.ovirt.engine.core.common.businessentities.DisplayType getDisplayType ( ) { org.ovirt.engine.ui.uicommonweb.models.EntityModel < org.ovirt.engine.core.common.businessentities.DisplayType > entityModel = getDisplayProtocol ( ) . getSelectedItem ( ) ; if ( entityModel == null ) { return null ; } return entityModel.getEntity ( ) ; }

Target:
protected void doDisplayTypeChanged ( ) { org.ovirt.engine.core.common.businessentities.VDSGroup cluster = getSelectedCluster ( ) ; java.lang.Integer osType = getOSType ( ) . getSelectedItem ( ) ; if ( ( cluster == null ) || ( osType == null ) ) { return ; } displayTypeSelectedItemChanged ( osType , cluster.getCompatibilityVersion ( ) ) ; }
Source:
public void setup ( ) { urlValidation = org.mockito.Mockito.spy ( new org.ovirt.engine.ui.uicommonweb.validation.UrlValidation ( new java.lang.String [ ] { org.ovirt.engine.ui.uicommonweb.Uri.SCHEME_HTTP } ) ) ; hostValidation = new org.ovirt.engine.ui.uicommonweb.validation.UrlValidationTest.TestableHostValidation ( ) ; org.mockito.Mockito.doReturn ( null ) . when ( urlValidation ) . getUriMessage ( ) ; org.mockito.Mockito.doReturn ( null ) . when ( urlValidation ) . getSchemeMessage ( org.mockito.Matchers.any ( java.lang.String.class ) ) ; org.mockito.Mockito.doReturn ( hostValidation ) . when ( urlValidation ) . getHostValidation ( ) ; }

Target:
public void setup ( ) { urlValidation = org.mockito.Mockito.spy ( new org.ovirt.engine.ui.uicommonweb.validation.UrlValidation ( new java.lang.String [ ] { org.ovirt.engine.ui.uicommonweb.Uri.SCHEME_HTTP } ) ) ; hostValidation = new org.ovirt.engine.ui.uicommonweb.validation.UriHostAddressValidation ( null ) ; org.mockito.Mockito.doReturn ( null ) . when ( urlValidation ) . getUriMessage ( ) ; org.mockito.Mockito.doReturn ( null ) . when ( urlValidation ) . getSchemeMessage ( org.mockito.Matchers.any ( java.lang.String.class ) ) ; org.mockito.Mockito.doReturn ( hostValidation ) . when ( urlValidation ) . getHostValidation ( ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc refreshStoragePool ( java.lang.String spUUID , java.lang.String msdUUID , int masterVersion ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.refreshStoragePool ( spUUID , msdUUID , masterVersion ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc refreshVolume ( java.lang.String sdUUID , java.lang.String spUUID , java.lang.String imgUUID , java.lang.String volUUID ) { try { java.util.Map < java.lang.String , java.lang.Object > xmpRpcReturnValue = vdsServer.refreshVolume ( sdUUID , spUUID , imgUUID , volUUID ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( xmpRpcReturnValue ) ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
private boolean selectedItemsContainBlankTemplate ( ) { if ( ( getSelectedItems ( ) ) != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmTemplate > templates = org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VmTemplate > cast ( getSelectedItems ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.VmTemplate template : templates ) { if ( ( template != null ) && ( template.getId ( ) . equals ( NGuid.Empty ) ) ) { return true ; } } } return false ; }

Target:
private boolean selectedItemsContainBlankTemplate ( ) { if ( ( getSelectedItems ( ) ) != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VmTemplate > templates = org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VmTemplate > cast ( getSelectedItems ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.VmTemplate template : templates ) { if ( ( template != null ) && ( template.getId ( ) . equals ( Guid.Empty ) ) ) { return true ; } } } return false ; }
Source:
private org.ovirt.engine.core.common.businessentities.network mockExistingNetwork ( java.lang.String networkName ) { org.ovirt.engine.core.common.businessentities.network network = new org.ovirt.engine.core.common.businessentities.network ( "" , "" , org.ovirt.engine.core.compat.Guid.NewGuid ( ) , networkName , "" , "" , 0 , 100 , false , 0 , true ) ; org.mockito.Mockito.when ( networkDAO.getAllForCluster ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( java.util.Collections.singletonList ( network ) ) ; return network ; }

Target:
private org.ovirt.engine.core.common.businessentities.network createNetwork ( java.lang.String networkName ) { return new org.ovirt.engine.core.common.businessentities.network ( "" , "" , org.ovirt.engine.core.compat.Guid.NewGuid ( ) , networkName , "" , "" , 0 , 100 , false , 0 , true ) ; }
Source:
public static void getVmNicList ( 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 != null ? new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ) ( source ) ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmInterfacesByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
public static void getVmsRunningOnOrMigratingToVds ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmsRunningOnOrMigratingToVds , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
public int compare ( org.ovirt.engine.core.common.utils.PairQueryable < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface , org.ovirt.engine.core.common.businessentities.VDS > o1 , org.ovirt.engine.core.common.utils.PairQueryable < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface , org.ovirt.engine.core.common.businessentities.VDS > o2 ) { boolean syncStatus1 = ( ( o1.getFirst ( ) ) == null ) ? false : o1.getFirst ( ) . getNetworkImplementationDetails ( ) . isInSync ( ) ; boolean syncStatus2 = ( ( o2.getFirst ( ) ) == null ) ? false : o2.getFirst ( ) . getNetworkImplementationDetails ( ) . isInSync ( ) ; return java.lang.Boolean.compare ( syncStatus1 , syncStatus2 ) ; }

Target:
public int compare ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface o1 , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface o2 ) { return java.lang.Boolean.compare ( extractSyncStatus ( o1 ) , extractSyncStatus ( o2 ) ) ; }
Source:
private void storagePoolAlreadyHasCluster ( ) { org.ovirt.engine.core.common.businessentities.Cluster group = new org.ovirt.engine.core.common.businessentities.Cluster ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.Cluster > groupList = new java.util.ArrayList < > ( ) ; groupList.add ( group ) ; org.mockito.Mockito.when ( clusterDao.getAllForStoragePool ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( groupList ) ; }

Target:
private void storagePoolAlreadyHasCluster ( ) { org.ovirt.engine.core.common.businessentities.Cluster group = new org.ovirt.engine.core.common.businessentities.Cluster ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.Cluster > groupList = new java.util.ArrayList < > ( ) ; groupList.add ( group ) ; org.mockito.Mockito.when ( clusterDao.getAllForStoragePool ( org.mockito.ArgumentMatchers.any ( ) ) ) . thenReturn ( groupList ) ; }
Source:
private static java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.VdcObjectType > getSubjectEntities ( java.util.List < org.ovirt.engine.core.common.PermissionSubject > permSubjectList ) { java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.VdcObjectType > entities = new java.util.HashMap < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.VdcObjectType > ( ) ; for ( org.ovirt.engine.core.common.PermissionSubject permSubj : permSubjectList ) { if ( ( ( permSubj.getObjectId ( ) ) != null ) && ( ( permSubj.getObjectType ( ) ) != null ) ) { entities.put ( permSubj.getObjectId ( ) , permSubj.getObjectType ( ) ) ; } } return entities ; }

Target:
private static java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.VdcObjectType > getSubjectEntities ( java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > permSubjectList ) { java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.VdcObjectType > entities = new java.util.HashMap < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.VdcObjectType > ( ) ; for ( org.ovirt.engine.core.bll.utils.PermissionSubject permSubj : permSubjectList ) { if ( ( ( permSubj.getObjectId ( ) ) != null ) && ( ( permSubj.getObjectType ( ) ) != null ) ) { entities.put ( permSubj.getObjectId ( ) , permSubj.getObjectType ( ) ) ; } } return entities ; }
Source:
private boolean staticBootProtoPropertiesChanged ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface existingIface ) { return ( ( iface.getBootProtocol ( ) ) == ( org.ovirt.engine.core.common.businessentities.network.NetworkBootProtocol.STATIC_IP ) ) && ( ( ( ! ( org.apache.commons.lang.ObjectUtils.equals ( iface.getAddress ( ) , existingIface.getAddress ( ) ) ) ) || ( ! ( org.apache.commons.lang.ObjectUtils.equals ( iface.getGateway ( ) , existingIface.getGateway ( ) ) ) ) ) || ( ! ( org.apache.commons.lang.ObjectUtils.equals ( iface.getSubnet ( ) , existingIface.getSubnet ( ) ) ) ) ) ; }

Target:
private boolean staticBootProtoPropertiesChanged ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface , org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface existingIface ) { return ( ( iface.getBootProtocol ( ) ) == ( org.ovirt.engine.core.common.businessentities.network.NetworkBootProtocol.STATIC_IP ) ) && ( ( ( ! ( java.util.Objects.equals ( iface.getAddress ( ) , existingIface.getAddress ( ) ) ) ) || ( ! ( java.util.Objects.equals ( iface.getGateway ( ) , existingIface.getGateway ( ) ) ) ) ) || ( ! ( java.util.Objects.equals ( iface.getSubnet ( ) , existingIface.getSubnet ( ) ) ) ) ) ; }
Source:
public org.ovirt.engine.core.common.businessentities.network.ReportedConfigurations add ( org.ovirt.engine.core.common.businessentities.network.ReportedConfigurationType type , java.lang.String value , boolean inSync ) { reportedConfigurationList.add ( new org.ovirt.engine.core.common.businessentities.network.ReportedConfiguration ( type , value , inSync ) ) ; return this ; }

Target:
public < T > org.ovirt.engine.core.common.businessentities.network.ReportedConfigurations add ( org.ovirt.engine.core.common.businessentities.network.ReportedConfigurationType type , T actual , T expected , boolean inSync ) { java.lang.String actualValue = ( actual == null ) ? null : actual.toString ( ) ; java.lang.String expectedValue = ( expected == null ) ? null : expected.toString ( ) ; reportedConfigurationList.add ( new org.ovirt.engine.core.common.businessentities.network.ReportedConfiguration ( type , actualValue , expectedValue , inSync ) ) ; return this ; }
Source:
public void testRemoveNonExistant ( ) { setUpEntityQueryExpectations ( QueryType.GetClustersByStoragePoolId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendDataCenterClusterResourceTest.dataCenterId } , new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Cluster > ( ) , null ) ; try { resource.remove ( ) ; org.junit.jupiter.api.Assertions.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { org.junit.jupiter.api.Assertions.assertNotNull ( wae.getResponse ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( 404 , wae.getResponse ( ) . getStatus ( ) ) ; } }

Target:
public void testRemoveNonExistant ( ) { setUpEntityQueryExpectations ( QueryType.GetClustersByStoragePoolId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendDataCenterClusterResourceTest.dataCenterId } , new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Cluster > ( ) , null ) ; try { resource.remove ( ) ; org.junit.jupiter.api.Assertions.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }
Source:
private java.util.List < org.ovirt.engine.core.common.businessentities.VDS > map ( java.util.List < org.ovirt.engine.core.bll.host.provider.foreman.ForemanHostWrapper > foremanHosts ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > hosts = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ( foremanHosts.size ( ) ) ; for ( org.ovirt.engine.core.bll.host.provider.foreman.ForemanHostWrapper host : foremanHosts ) { org.ovirt.engine.core.common.businessentities.VDS vds = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; java.lang.String hostName = host.getHost ( ) . getName ( ) ; vds.setVdsName ( hostName ) ; vds.setHostName ( hostName ) ; hosts.add ( vds ) ; } return hosts ; }

Target:
private java.util.List < org.ovirt.engine.core.common.businessentities.ExternalDiscoveredHost > mapDiscoveredHosts ( java.util.List < org.ovirt.engine.core.bll.host.provider.foreman.ForemanDiscoveredHost > foremanHosts ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ExternalDiscoveredHost > hosts = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ExternalDiscoveredHost > ( foremanHosts.size ( ) ) ; for ( org.ovirt.engine.core.bll.host.provider.foreman.ForemanDiscoveredHost host : foremanHosts ) { org.ovirt.engine.core.common.businessentities.ExternalDiscoveredHost dhost = new org.ovirt.engine.core.common.businessentities.ExternalDiscoveredHost ( ) ; dhost.setName ( host.getName ( ) ) ; dhost.setIp ( host.getIp ( ) ) ; dhost.setMac ( host.getMac ( ) ) ; hosts.add ( dhost ) ; } return hosts ; }
Source:
protected boolean canDoAction ( ) { if ( ( disk ) == null ) { return failCanDoAction ( VdcBllMessages.ACTION_TYPE_FAILED_VM_IMAGE_DOES_NOT_EXIST ) ; } buildSharedLockMap ( ) ; if ( ! ( org.ovirt.engine.core.bll.RemoveDiskCommand.acquireLockInternal ( ) ) ) { return false ; } return ( disk.getDiskStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.Disk.DiskStorageType.IMAGE ) ? canRemoveDiskBasedOnImageStorageCheck ( ) : canRemoveLunDisk ( ) ; }

Target:
private boolean canRemoveDiskBasedOnStorageTypeCheck ( ) { if ( ( getDisk ( ) . getDiskStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.Disk.DiskStorageType.IMAGE ) ) { return canRemoveDiskBasedOnImageStorageCheck ( ) ; } return true ; }
Source:
public void testChangeCdUsingMatrixParameter ( ) { javax.ws.rs.core.UriInfo uriInfo = setUpBasicUriExpectations ( ) ; uriInfo = addMatrixParameterExpectations ( uriInfo , "current" ) ; setUriInfo ( uriInfo ) ; setUpEntityQueryExpectations ( getVm ( ) ) ; setUpActionExpectations ( ActionType.ChangeDisk , org.ovirt.engine.core.common.action.ChangeDiskCommandParameters.class , new java.lang.String [ ] { "CdImagePath" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendVmCdromResourceTest.A_ISO } , true , true ) ; org.ovirt.engine.api.model.Cdrom cdrom = getCdrom ( org.ovirt.engine.api.restapi.resource.BackendVmCdromResourceTest.A_ISO ) ; cdrom = resource.update ( cdrom ) ; org.junit.Assert.assertTrue ( cdrom.isSetFile ( ) ) ; }

Target:
public void testChangeCdUsingMatrixParameter ( ) { javax.ws.rs.core.UriInfo uriInfo = setUpBasicUriExpectations ( ) ; uriInfo = addMatrixParameterExpectations ( uriInfo , "current" ) ; setUriInfo ( uriInfo ) ; setUpEntityQueryExpectations ( getVm ( ) ) ; setUpActionExpectations ( ActionType.ChangeDisk , org.ovirt.engine.core.common.action.ChangeDiskCommandParameters.class , new java.lang.String [ ] { "CdImagePath" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendVmCdromResourceTest.A_ISO } , true , true ) ; org.ovirt.engine.api.model.Cdrom cdrom = getCdrom ( org.ovirt.engine.api.restapi.resource.BackendVmCdromResourceTest.A_ISO ) ; cdrom = resource.update ( cdrom ) ; org.junit.jupiter.api.Assertions.assertTrue ( cdrom.isSetFile ( ) ) ; }
Source:
public javax.ws.rs.core.Response refreshLuns ( org.ovirt.engine.api.model.Action action ) { java.util.List < org.ovirt.engine.api.model.LogicalUnit > incomingLuns ; if ( action.isSetLogicalUnits ( ) ) { incomingLuns = action.getLogicalUnits ( ) . getLogicalUnits ( ) ; } else { incomingLuns = java.util.Collections.emptyList ( ) ; } org.ovirt.engine.core.common.action.ExtendSANStorageDomainParameters params = createParameters ( guid , incomingLuns , false ) ; return performAction ( VdcActionType.RefreshLunsSize , params ) ; }

Target:
public javax.ws.rs.core.Response refreshLuns ( org.ovirt.engine.api.model.Action action ) { java.util.List < org.ovirt.engine.api.model.LogicalUnit > incomingLuns ; if ( action.isSetLogicalUnits ( ) ) { incomingLuns = action.getLogicalUnits ( ) . getLogicalUnits ( ) ; } else { incomingLuns = java.util.Collections.emptyList ( ) ; } org.ovirt.engine.core.common.action.ExtendSANStorageDomainParameters params = createParameters ( guid , incomingLuns , false ) ; return performAction ( ActionType.RefreshLunsSize , params ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc glusterVolumeSnapshotConfigSet ( java.lang.String volumeName , java.lang.String configName , java.lang.String configValue ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "GlusterVolume.snapshotConfigSet" ) . withParameter ( "volumeName" , volumeName ) . withParameter ( "option" , configName ) . withParameter ( "value" , configValue ) . 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.vdsbroker.StatusOnlyReturnForXmlRpc ( response ) ; }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc glusterVolumeSnapshotConfigSet ( java.lang.String volumeName , java.lang.String configName , java.lang.String configValue ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "GlusterVolume.snapshotConfigSet" ) . withParameter ( "volumeName" , volumeName ) . withParameter ( "optionName" , configName ) . withParameter ( "optionValue" , configValue ) . 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.vdsbroker.StatusOnlyReturnForXmlRpc ( response ) ; }
Source:
private java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > applyUserConfiguredNics ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > userConfiguredNics = new java.util.ArrayList < > ( ) ; userConfiguredNics.addAll ( org.ovirt.engine.core.bll.network.host.HostSetupNetworksCommand.getParameters ( ) . getBonds ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface existingBondToRemove : getRemovedBonds ( ) ) { existingBondToRemove.setLabels ( null ) ; userConfiguredNics.add ( existingBondToRemove ) ; } return userConfiguredNics ; }

Target:
private java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > getNicsToConfigureWithoutLabelsUpdates ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > nicsToConfigure = new java.util.ArrayList < > ( ) ; nicsToConfigure.addAll ( interfaceDao.getAllInterfacesForVds ( org.ovirt.engine.core.bll.network.host.HostSetupNetworksCommand.getVdsId ( ) ) ) ; for ( org.ovirt.engine.core.common.businessentities.network.Bond bond : org.ovirt.engine.core.bll.network.host.HostSetupNetworksCommand.getParameters ( ) . getBonds ( ) ) { if ( ( bond.getId ( ) ) == null ) { org.ovirt.engine.core.common.businessentities.network.Bond newBond = new org.ovirt.engine.core.common.businessentities.network.Bond ( bond.getName ( ) ) ; nicsToConfigure.add ( newBond ) ; } } return nicsToConfigure ; }
Source:
protected org.ovirt.engine.core.utils.lock.EngineLock lockVmDiskHotPlugWithWait ( ) { org.ovirt.engine.core.utils.lock.EngineLock vmDiskHotPlugEngineLock = new org.ovirt.engine.core.utils.lock.EngineLock ( ) ; vmDiskHotPlugEngineLock.setExclusiveLocks ( java.util.Collections.singletonMap ( org.ovirt.engine.core.bll.AbstractDiskVmCommand.getVmId ( ) . toString ( ) , org.ovirt.engine.core.bll.LockMessagesMatchUtil.makeLockingPair ( LockingGroup.VM_DISK_HOT_PLUG , VdcBllMessages.ACTION_TYPE_FAILED_OBJECT_LOCKED ) ) ) ; org.ovirt.engine.core.bll.AbstractDiskVmCommand.getLockManager ( ) . acquireLockWait ( vmDiskHotPlugEngineLock ) ; return vmDiskHotPlugEngineLock ; }

Target:
protected org.ovirt.engine.core.utils.lock.EngineLock lockVmDiskHotPlugWithWait ( ) { org.ovirt.engine.core.utils.lock.EngineLock vmDiskHotPlugEngineLock = new org.ovirt.engine.core.utils.lock.EngineLock ( ) ; vmDiskHotPlugEngineLock.setExclusiveLocks ( java.util.Collections.singletonMap ( org.ovirt.engine.core.bll.AbstractDiskVmCommand.getVmId ( ) . toString ( ) , org.ovirt.engine.core.bll.LockMessagesMatchUtil.makeLockingPair ( LockingGroup.VM_DISK_HOT_PLUG , EngineMessage.ACTION_TYPE_FAILED_OBJECT_LOCKED ) ) ) ; org.ovirt.engine.core.bll.AbstractDiskVmCommand.getLockManager ( ) . acquireLockWait ( vmDiskHotPlugEngineLock ) ; return vmDiskHotPlugEngineLock ; }
Source:
private void PrepareSanStorageForEdit ( org.ovirt.engine.ui.uicommonweb.models.storage.SanStorageModel model ) { org.ovirt.engine.core.common.businessentities.storage_domains storage = ( ( org.ovirt.engine.core.common.businessentities.storage_domains ) ( getSelectedItem ( ) ) ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetLunsByVgId ( new org.ovirt.engine.ui.frontend.AsyncQuery ( model , 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.models.storage.SanStorageModel sanStorageModel = ( ( org.ovirt.engine.ui.uicommonweb.models.storage.SanStorageModel ) ( target ) ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.LUNs > lunList = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.LUNs > ) ( returnValue ) ) ; sanStorageModel.ApplyData ( lunList , true ) ; } } ) , storage.getstorage ( ) ) ; }

Target:
private void PrepareSanStorageForEdit ( org.ovirt.engine.ui.uicommonweb.models.storage.SanStorageModel model ) { org.ovirt.engine.core.common.businessentities.storage_domains storage = ( ( org.ovirt.engine.core.common.businessentities.storage_domains ) ( getSelectedItem ( ) ) ) ; model.setStorageDomain ( storage ) ; }
Source:
public java.lang.Object Convert ( java.lang.Object returnValue , org.ovirt.engine.ui.frontend.AsyncQuery asyncQuery ) { if ( origConverter != null ) { returnValue = origConverter.Convert ( returnValue , asyncQuery ) ; } if ( returnValue != null ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.cachedConfigValues.put ( config_key , returnValue ) ; } return returnValue ; }

Target:
public java.lang.Object Convert ( java.lang.Object returnValue , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( returnValue != null ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.cachedConfigValuesPreConvert.putAll ( ( ( java.util.HashMap < org.ovirt.engine.core.compat.KeyValuePairCompat < org.ovirt.engine.core.common.queries.ConfigurationValues , java.lang.String > , java.lang.Object > ) ( returnValue ) ) ) ; } return org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.cachedConfigValuesPreConvert ; }
Source:
public java.lang.Void runInTransaction ( ) { getVmNicDao ( ) . remove ( getParameters ( ) . getInterfaceId ( ) ) ; getDbFacade ( ) . getVmNetworkStatisticsDao ( ) . remove ( getParameters ( ) . getInterfaceId ( ) ) ; getDbFacade ( ) . getVmDeviceDao ( ) . remove ( new org.ovirt.engine.core.common.businessentities.VmDeviceId ( getParameters ( ) . getInterfaceId ( ) , getParameters ( ) . getVmId ( ) ) ) ; setSucceeded ( true ) ; return null ; }

Target:
public java.lang.Void runInTransaction ( ) { vmStaticDao.incrementDbGeneration ( getParameters ( ) . getVmId ( ) ) ; getVmNicDao ( ) . remove ( getParameters ( ) . getInterfaceId ( ) ) ; getDbFacade ( ) . getVmNetworkStatisticsDao ( ) . remove ( getParameters ( ) . getInterfaceId ( ) ) ; getDbFacade ( ) . getVmDeviceDao ( ) . remove ( new org.ovirt.engine.core.common.businessentities.VmDeviceId ( getParameters ( ) . getInterfaceId ( ) , getParameters ( ) . getVmId ( ) ) ) ; setSucceeded ( true ) ; return null ; }
Source:
public static short parseShort ( java.lang.String value ) { java.math.BigInteger result = javax.xml.bind.DatatypeConverter.parseInteger ( value ) ; if ( ( result.compareTo ( org.ovirt.engine.api.utils.IntegerParser.MAX_SHORT ) ) > 0 ) { throw new org.ovirt.engine.api.utils.InvalidValueException ( ( ( ( "Value " + value ) + " is greater than the maximum short " ) + ( org.ovirt.engine.api.utils.IntegerParser.MAX_SHORT ) ) ) ; } return result.shortValue ( ) ; }

Target:
public static short parseShort ( java.lang.String value ) { if ( value.trim ( ) . equals ( "" ) ) { value = "0" ; } java.math.BigInteger result = javax.xml.bind.DatatypeConverter.parseInteger ( value ) ; if ( ( result.compareTo ( org.ovirt.engine.api.utils.IntegerParser.MAX_SHORT ) ) > 0 ) { throw new org.ovirt.engine.api.utils.InvalidValueException ( ( ( ( "Value " + value ) + " is greater than the maximum short " ) + ( org.ovirt.engine.api.utils.IntegerParser.MAX_SHORT ) ) ) ; } return result.shortValue ( ) ; }
Source:
private boolean validateStorageDomains ( java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > vmDisksList , java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > memoryDisksList ) { java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > disksList = org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommand.getAllDisks ( vmDisksList , memoryDisksList ) ; org.ovirt.engine.core.bll.validator.MultipleStorageDomainsValidator sdValidator = createMultipleStorageDomainsValidator ( disksList ) ; return ( ( validate ( sdValidator.allDomainsExistAndActive ( ) ) ) && ( validate ( sdValidator.allDomainsWithinThresholds ( ) ) ) ) && ( validate ( sdValidator.allDomainsHaveSpaceForAllDisks ( vmDisksList , memoryDisksList ) ) ) ; }

Target:
private boolean validateStorageDomains ( java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > vmDisksList , java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > memoryDisksList ) { java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > disksList = org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommand.getAllDisks ( vmDisksList , memoryDisksList ) ; org.ovirt.engine.core.bll.validator.storage.MultipleStorageDomainsValidator sdValidator = createMultipleStorageDomainsValidator ( disksList ) ; return ( ( validate ( sdValidator.allDomainsExistAndActive ( ) ) ) && ( validate ( sdValidator.allDomainsWithinThresholds ( ) ) ) ) && ( validate ( sdValidator.allDomainsHaveSpaceForAllDisks ( vmDisksList , memoryDisksList ) ) ) ; }
Source:
public java.lang.Object call ( ) throws java.lang.Exception { if ( ( _managementNetwork ) != null ) { _parser.cliEnvironmentSet ( VdsmEnv.MANAGEMENT_BRIDGE_NAME , _managementNetwork ) ; } else if ( _isNode ) { _parser.cliEnvironmentSet ( VdsmEnv.MANAGEMENT_BRIDGE_NAME , org.ovirt.engine.core.utils.NetworkUtils.getEngineNetwork ( ) ) ; } else { _parser.cliNoop ( ) ; } return null ; }

Target:
public java.lang.Object call ( ) throws java.lang.Exception { if ( _isNode ) { _isLegacyNode = ( ( java.lang.Boolean ) ( _parser.cliEnvironmentGet ( VdsmEnv.OVIRT_NODE_HAS_OWN_BRIDGES ) ) ) ; } else { _parser.cliNoop ( ) ; } return null ; }