auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public static void getGlusterHookContent ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hookId , org.ovirt.engine.core.compat.Guid serverId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : "" ; } } ; org.ovirt.engine.core.common.queries.gluster.GlusterHookContentQueryParameters parameters = new org.ovirt.engine.core.common.queries.gluster.GlusterHookContentQueryParameters ( hookId ) ; parameters.setGlusterServerId ( serverId ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetGlusterHookContent , parameters , aQuery ) ; }

Target:
public static void getGlusterHookContent ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hookId , org.ovirt.engine.core.compat.Guid serverId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : "" ; } } ; org.ovirt.engine.core.common.queries.gluster.GlusterHookContentQueryParameters parameters = new org.ovirt.engine.core.common.queries.gluster.GlusterHookContentQueryParameters ( hookId ) ; parameters.setGlusterServerId ( serverId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterHookContent , parameters , aQuery ) ; }
Source:
public void onBrowserEvent ( org.ovirt.engine.ui.common.widget.table.cell.Context context , com.google.gwt.dom.client.Element parent , java.lang.String value , com.google.gwt.safehtml.shared.SafeHtml tooltipContent , com.google.gwt.dom.client.NativeEvent event , com.google.gwt.cell.client.ValueUpdater < java.lang.String > valueUpdater ) { delegate.onBrowserEvent ( context , parent , value , event , valueUpdater ) ; super . onBrowserEvent ( context , parent , value , tooltipContent , event , valueUpdater ) ; }

Target:
public void onBrowserEvent ( org.ovirt.engine.ui.common.widget.table.cell.Context context , com.google.gwt.dom.client.Element parent , java.lang.String value , java.lang.String tooltipContent , com.google.gwt.dom.client.NativeEvent event , com.google.gwt.cell.client.ValueUpdater < java.lang.String > valueUpdater ) { delegate.onBrowserEvent ( context , parent , value , event , valueUpdater ) ; super . onBrowserEvent ( context , parent , value , tooltipContent , event , valueUpdater ) ; }
Source:
public java.util.List < org.ovirt.engine.core.common.businessentities.Cluster > getAllWithQuery ( java.lang.String query ) { java.util.List < org.ovirt.engine.core.common.businessentities.Cluster > groups = getJdbcTemplate ( ) . query ( query , org.ovirt.engine.core.dao.ClusterDaoImpl.ClusterRowMapper.instance ) ; try { return getHostsAndVmsForClusters ( groups ) ; } catch ( java.lang.Exception e ) { org.ovirt.engine.core.dao.ClusterDaoImpl.log.error ( "Can't load host and vm count for cluster. Query is '{}'. Error: {}" , query , e.getMessage ( ) ) ; org.ovirt.engine.core.dao.ClusterDaoImpl.log.debug ( "Excpetion" , e ) ; } return groups ; }

Target:
public java.util.List < org.ovirt.engine.core.common.businessentities.Cluster > getAllWithQuery ( java.lang.String query ) { java.util.List < org.ovirt.engine.core.common.businessentities.Cluster > groups = getJdbcTemplate ( ) . query ( query , org.ovirt.engine.core.dao.ClusterDaoImpl.ClusterRowMapper.instance ) ; return getHostsAndVmsForClusters ( groups ) ; }
Source:
public void OnSuccess ( java.lang.Object model , java.lang.Object result ) { org.ovirt.engine.ui.uicommonweb.models.gluster.ReplaceBrickModel brickModel = ( ( org.ovirt.engine.ui.uicommonweb.models.gluster.ReplaceBrickModel ) ( model ) ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > hostList = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ) ( result ) ) ; brickModel.getServers ( ) . setItems ( hostList ) ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object result ) { org.ovirt.engine.ui.uicommonweb.models.gluster.ReplaceBrickModel brickModel = ( ( org.ovirt.engine.ui.uicommonweb.models.gluster.ReplaceBrickModel ) ( model ) ) ; java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > hostList = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDS > ) ( result ) ) ; brickModel.getServers ( ) . setItems ( hostList ) ; }
Source:
private void createCommand ( ) { org.ovirt.engine.core.common.action.StorageDomainPoolParametersBase params = new org.ovirt.engine.core.common.action.StorageDomainPoolParametersBase ( ) ; params.setStorageDomainId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; params.setStoragePoolId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.storage.domain.ActivateStorageDomainCommand ( params ) ) ; org.mockito.Mockito.doReturn ( storageDomainDao ) . when ( cmd ) . getStorageDomainDao ( ) ; org.mockito.Mockito.doReturn ( storagePoolDao ) . when ( cmd ) . getStoragePoolDao ( ) ; org.mockito.Mockito.doReturn ( vdsDao ) . when ( cmd ) . getVdsDao ( ) ; }

Target:
private void createCommand ( ) { org.ovirt.engine.core.common.action.StorageDomainPoolParametersBase params = new org.ovirt.engine.core.common.action.StorageDomainPoolParametersBase ( ) ; params.setStorageDomainId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; params.setStoragePoolId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.storage.domain.ActivateStorageDomainCommand ( params , null ) ) ; org.mockito.Mockito.doReturn ( storageDomainDao ) . when ( cmd ) . getStorageDomainDao ( ) ; org.mockito.Mockito.doReturn ( storagePoolDao ) . when ( cmd ) . getStoragePoolDao ( ) ; org.mockito.Mockito.doReturn ( vdsDao ) . when ( cmd ) . getVdsDao ( ) ; }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < ? extends org.ovirt.engine.ui.uicompat.EventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { java.util.Iterator < org.ovirt.engine.ui.uicommonweb.models.tags.TagModel > iterator = getModel ( ) . getItems ( ) . iterator ( ) ; if ( iterator.hasNext ( ) ) { org.ovirt.engine.ui.uicommonweb.models.tags.TagModel root = getModel ( ) . cloneTagModel ( iterator.next ( ) ) ; updateDataProvider ( java.util.Arrays.asList ( root ) ) ; } }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < ? extends org.ovirt.engine.ui.uicompat.EventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { java.util.Iterator < org.ovirt.engine.ui.uicommonweb.models.tags.TagModel > iterator = model.getItems ( ) . iterator ( ) ; if ( iterator.hasNext ( ) ) { org.ovirt.engine.ui.uicommonweb.models.tags.TagModel root = model.cloneTagModel ( iterator.next ( ) ) ; updateDataProvider ( java.util.Arrays.asList ( root ) ) ; } }
Source:
public void executeCommandFailedWhenServerIdPresent ( ) { cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.gluster.UpdateGlusterHookCommand ( new org.ovirt.engine.core.common.action.gluster.GlusterHookManageParameters ( HOOK_ID , org.ovirt.engine.core.bll.gluster.UpdateGlusterHookCommandTest.SERVER_ID ) ) ) ; setUpMocksForUpdate ( ) ; mockForReadContent ( false , EngineError.GlusterHookNotFound ) ; try { cmd.executeCommand ( ) ; } catch ( org.ovirt.engine.core.common.errors.EngineException e ) { org.junit.Assert.assertEquals ( e.getErrorCode ( ) , EngineError.GlusterHookNotFound ) ; } org.mockito.Mockito.verify ( hooksDao , org.mockito.Mockito.never ( ) ) . updateGlusterHook ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity.class ) ) ; }

Target:
public void executeCommandFailedWhenServerIdPresent ( ) { cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.gluster.UpdateGlusterHookCommand ( new org.ovirt.engine.core.common.action.gluster.GlusterHookManageParameters ( HOOK_ID , org.ovirt.engine.core.bll.gluster.UpdateGlusterHookCommandTest.SERVER_ID ) , null ) ) ; setUpMocksForUpdate ( ) ; mockForReadContent ( false , EngineError.GlusterHookNotFound ) ; try { cmd.executeCommand ( ) ; } catch ( org.ovirt.engine.core.common.errors.EngineException e ) { org.junit.Assert.assertEquals ( e.getErrorCode ( ) , EngineError.GlusterHookNotFound ) ; } org.mockito.Mockito.verify ( hooksDao , org.mockito.Mockito.never ( ) ) . updateGlusterHook ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity.class ) ) ; }
Source:
public void OnSuccess ( java.lang.Object model , java.lang.Object result ) { if ( result != null ) { org.ovirt.engine.core.common.businessentities.VM vm = ( ( org.ovirt.engine.core.common.businessentities.VM ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( result ) ) . getReturnValue ( ) ) ) ; if ( vm == null ) { return ; } org.ovirt.engine.ui.uicommonweb.models.pools.PoolInterfaceListModel poolInterfaceListModel = ( ( org.ovirt.engine.ui.uicommonweb.models.pools.PoolInterfaceListModel ) ( model ) ) ; poolInterfaceListModel.SyncSearch ( VdcQueryType.GetVmInterfacesByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vm.getId ( ) ) ) ; } }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object result ) { if ( result != null ) { org.ovirt.engine.core.common.businessentities.VM vm = ( ( org.ovirt.engine.core.common.businessentities.VM ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( result ) ) . getReturnValue ( ) ) ) ; if ( vm == null ) { return ; } org.ovirt.engine.ui.uicommonweb.models.pools.PoolInterfaceListModel poolInterfaceListModel = ( ( org.ovirt.engine.ui.uicommonweb.models.pools.PoolInterfaceListModel ) ( model ) ) ; poolInterfaceListModel.SyncSearch ( VdcQueryType.GetVmInterfacesByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vm.getId ( ) ) ) ; } }
Source:
public void canDoActionFailsWhenGlusterMultipleHostHasVolumesWithForce ( ) throws java.lang.Exception { command = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.RemoveVdsCommand < org.ovirt.engine.core.common.action.RemoveVdsParameters > ( new org.ovirt.engine.core.common.action.RemoveVdsParameters ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , true ) ) ) ; prepareMocks ( ) ; mockVdsWithStatus ( VDSStatus.Maintenance ) ; mockHasMultipleClusters ( true ) ; mockIsGlusterEnabled ( true ) ; mockHasVolumeOnServer ( true ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( command , EngineMessage.VDS_CANNOT_REMOVE_HOST_HAVING_GLUSTER_VOLUME ) ; }

Target:
public void canDoActionFailsWhenGlusterMultipleHostHasVolumesWithForce ( ) 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 ) ) ) ; prepareMocks ( ) ; mockVdsWithStatus ( VDSStatus.Maintenance ) ; mockHasMultipleClusters ( true ) ; mockIsGlusterEnabled ( true ) ; mockHasVolumeOnServer ( true ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( command , EngineMessage.VDS_CANNOT_REMOVE_HOST_HAVING_GLUSTER_VOLUME ) ; }
Source:
public void showCounts ( org.ovirt.engine.core.common.businessentities.ErrataCounts errataCounts ) { clearErrorMessage ( ) ; errorMessagePanel.setVisible ( false ) ; progressDotsImage.setVisible ( false ) ; getTotalSecurity ( ) . setLabel ( buildSecurityString ( errataCounts ) ) ; getTotalBugFix ( ) . setLabel ( java.lang.String.valueOf ( errataCounts.getCountByType ( ErrataType.BUGFIX ) ) ) ; getTotalEnhancement ( ) . setLabel ( java.lang.String.valueOf ( errataCounts.getCountByType ( ErrataType.ENHANCEMENT ) ) ) ; formPanel.setVisible ( true ) ; }

Target:
public void showCounts ( org.ovirt.engine.core.common.businessentities.ErrataCounts errataCounts ) { clearErrorMessage ( ) ; progressDotsImage.setVisible ( false ) ; getTotalSecurity ( ) . setLabel ( buildSecurityString ( errataCounts ) ) ; getTotalBugFix ( ) . setLabel ( java.lang.String.valueOf ( errataCounts.getCountByType ( ErrataType.BUGFIX ) ) ) ; getTotalEnhancement ( ) . setLabel ( java.lang.String.valueOf ( errataCounts.getCountByType ( ErrataType.ENHANCEMENT ) ) ) ; formPanel.setVisible ( true ) ; }
Source:
private boolean commitNewMac ( java.lang.String mac ) { availableMacs.remove ( mac ) ; allocatedMacs.add ( mac ) ; if ( availableMacs.isEmpty ( ) ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase logable = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.log ( logable , AuditLogType.MAC_POOL_EMPTY ) ; return false ; } return true ; }

Target:
private boolean commitNewMac ( java.lang.String mac ) { availableMacs.remove ( mac ) ; allocatedMacs.put ( mac , 1 ) ; if ( availableMacs.isEmpty ( ) ) { org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase logable = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase ( ) ; org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.log ( logable , AuditLogType.MAC_POOL_EMPTY ) ; return false ; } return true ; }
Source:
protected com.google.gwt.user.cellview.client.CellTree createDataDisplayWidget ( org.ovirt.engine.ui.webadmin.uicommon.model.SystemTreeModelProvider modelProvider ) { com.google.gwt.user.cellview.client.CellTree display = new org.ovirt.engine.ui.common.widget.tree.ElementIdCellTree < org.ovirt.engine.ui.webadmin.uicommon.model.SystemTreeModelProvider > ( modelProvider , null , org.ovirt.engine.ui.webadmin.widget.tree.SystemTree.res ) { @ java.lang.Override protected void onLoad ( ) { expandTree ( getDataDisplayWidget ( ) . getRootTreeNode ( ) , org.ovirt.engine.ui.webadmin.widget.tree.SystemTree.ITEM_LEVEL ) ; } } ; display.setAnimationEnabled ( true ) ; display.setKeyboardSelectionPolicy ( KeyboardSelectionPolicy.BOUND_TO_SELECTION ) ; modelProvider.setDataDisplay ( display ) ; return display ; }

Target:
protected com.google.gwt.user.cellview.client.CellTree createDataDisplayWidget ( org.ovirt.engine.ui.webadmin.uicommon.model.SystemTreeModelProvider modelProvider ) { com.google.gwt.user.cellview.client.CellTree display = new org.ovirt.engine.ui.common.widget.tree.ElementIdCellTree < org.ovirt.engine.ui.webadmin.uicommon.model.SystemTreeModelProvider > ( modelProvider , null , org.ovirt.engine.ui.webadmin.widget.tree.SystemTree.res ) { @ java.lang.Override protected void onLoad ( ) { expandTree ( getDataDisplayWidget ( ) . getRootTreeNode ( ) , org.ovirt.engine.ui.webadmin.widget.tree.SystemTree.ITEM_LEVEL ) ; } } ; display.setAnimationEnabled ( true ) ; modelProvider.setDataDisplay ( display ) ; return display ; }
Source:
public static java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > getStorageDomainsByIds ( java.util.List < org.ovirt.engine.core.compat.Guid > storageIds , java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > storageDomains ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > list = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.core.compat.Guid storageId : storageIds ) { org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain = org.ovirt.engine.ui.uicommonweb.Linq.getStorageById ( storageId , storageDomains ) ; if ( storageDomain != null ) { list.add ( storageDomain ) ; } } return list ; }

Target:
public static java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > getStorageDomainsByIds ( java.util.List < org.ovirt.engine.core.compat.Guid > storageIds , java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > storageDomains ) { java.util.List < org.ovirt.engine.core.common.businessentities.StorageDomain > list = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.core.compat.Guid storageId : storageIds ) { org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain = org.ovirt.engine.ui.uicommonweb.Linq.getStorageById ( storageId , storageDomains ) ; if ( storageDomain != null ) { list.add ( storageDomain ) ; } } return list ; }
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 , false ) ; }
Source:
public static void getVmSnapshotList ( 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 ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllVmSnapshotsByVmId , new org.ovirt.engine.core.common.queries.GetAllVmSnapshotsByVmIdParameters ( id ) , aQuery ) ; }

Target:
public static void getVmSnapshotList ( 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 ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllVmSnapshotsByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
public void hasMultipleClustersForLocalDC ( ) { org.mockito.Mockito.when ( sdDao.getAllForStoragePool ( org.mockito.ArgumentMatchers.any ( ) ) ) . thenReturn ( java.util.Collections.emptyList ( ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.Cluster > clusters = java.util.Arrays.asList ( new org.ovirt.engine.core.common.businessentities.Cluster ( ) , new org.ovirt.engine.core.common.businessentities.Cluster ( ) ) ; org.mockito.Mockito.when ( clusterDao.getAllForStoragePool ( org.mockito.ArgumentMatchers.any ( ) ) ) . thenReturn ( clusters ) ; cmd.getStoragePool ( ) . setIsLocal ( true ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( cmd , EngineMessage.CLUSTER_CANNOT_ADD_MORE_THEN_ONE_HOST_TO_LOCAL_STORAGE ) ; }

Target:
public void hasMultipleClustersForLocalDC ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.Cluster > clusters = java.util.Arrays.asList ( new org.ovirt.engine.core.common.businessentities.Cluster ( ) , new org.ovirt.engine.core.common.businessentities.Cluster ( ) ) ; org.mockito.Mockito.when ( clusterDao.getAllForStoragePool ( org.mockito.ArgumentMatchers.any ( ) ) ) . thenReturn ( clusters ) ; cmd.getStoragePool ( ) . setIsLocal ( true ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( cmd , EngineMessage.CLUSTER_CANNOT_ADD_MORE_THEN_ONE_HOST_TO_LOCAL_STORAGE ) ; }
Source:
public static org.ovirt.engine.api.model.QosType mapQosType ( java.lang.String qosType , org.ovirt.engine.api.model.QosType template ) { if ( qosType == null ) { if ( template == null ) { throw new java.lang.IllegalStateException ( "Not specified which QosType should be used" ) ; } else { return org.ovirt.engine.api.restapi.types.QosTypeMapper.mapQosType ( template , null ) ; } } else { return org.ovirt.engine.api.restapi.types.QosTypeMapper.mapModelQosType ( qosType ) ; } }

Target:
public static org.ovirt.engine.api.model.QosType map ( java.lang.String qosType , org.ovirt.engine.api.model.QosType template ) { if ( qosType == null ) { if ( template == null ) { throw new java.lang.IllegalStateException ( "Not specified which QosType should be used" ) ; } else { return org.ovirt.engine.api.restapi.types.QosTypeMapper.map ( template , null ) ; } } else { return org.ovirt.engine.api.restapi.types.QosTypeMapper.mapModelQosType ( qosType ) ; } }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.LUNListReturnForXmlRpc getDeviceList ( int storageType , java.lang.String [ ] devicesList ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = null ; if ( devicesList != null ) { xmlRpcReturnValue = vdsServer.getDeviceList ( storageType , devicesList ) ; } else { xmlRpcReturnValue = vdsServer.getDeviceList ( storageType ) ; } org.ovirt.engine.core.vdsbroker.vdsbroker.LUNListReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.LUNListReturnForXmlRpc ( 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.LUNListReturnForXmlRpc getDeviceList ( int storageType ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.getDeviceList ( storageType ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.LUNListReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.LUNListReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
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 ; }

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 ( model , entity ) ; } return model ; }
Source:
public void isConnWithSameDetailsExistCheckSameConn ( ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections newISCSIConnection = createISCSIConnection ( "1.2.3.4" , StorageType.ISCSI , "iqn.2013-04.myhat.com:aaa-target1" , "user1" , "mypassword123" ) ; java.util.List < org.ovirt.engine.core.common.businessentities.StorageServerConnections > connections = new java.util.ArrayList < > ( ) ; connections.add ( newISCSIConnection ) ; org.mockito.Mockito.when ( storageConnDao.getAllForConnection ( newISCSIConnection ) ) . thenReturn ( connections ) ; boolean isExists = command.isConnWithSameDetailsExists ( newISCSIConnection ) ; org.junit.Assert.assertFalse ( isExists ) ; }

Target:
public void isConnWithSameDetailsExistCheckSameConn ( ) { org.ovirt.engine.core.common.businessentities.StorageServerConnections newISCSIConnection = createISCSIConnection ( "1.2.3.4" , StorageType.ISCSI , "iqn.2013-04.myhat.com:aaa-target1" , "user1" , "mypassword123" ) ; java.util.List < org.ovirt.engine.core.common.businessentities.StorageServerConnections > connections = new java.util.ArrayList < > ( ) ; connections.add ( newISCSIConnection ) ; org.mockito.Mockito.when ( storageConnDao.getAllForConnection ( newISCSIConnection ) ) . thenReturn ( connections ) ; boolean isExists = command.isConnWithSameDetailsExists ( newISCSIConnection , null ) ; org.junit.Assert.assertFalse ( isExists ) ; }
Source:
public void executeCommand ( org.ovirt.engine.ui.uicommonweb.UICommand command ) { super . executeCommand ( command ) ; if ( org.ovirt.engine.core.compat.StringHelper.stringsEqual ( command.getName ( ) , org.ovirt.engine.ui.uicommonweb.models.networks.ImportNetworksModel.CMD_IMPORT ) ) { onImport ( ) ; } else if ( org.ovirt.engine.core.compat.StringHelper.stringsEqual ( command.getName ( ) , org.ovirt.engine.ui.uicommonweb.models.networks.ImportNetworksModel.CMD_CANCEL ) ) { cancel ( ) ; } else if ( getAddImportCommand ( ) . equals ( command ) ) { addImport ( ) ; } else if ( getCancelImportCommand ( ) . equals ( command ) ) { cancelImport ( ) ; } }

Target:
public void executeCommand ( org.ovirt.engine.ui.uicommonweb.UICommand command ) { super . executeCommand ( command ) ; if ( org.ovirt.engine.ui.uicommonweb.models.networks.ImportNetworksModel.CMD_IMPORT.equals ( command.getName ( ) ) ) { onImport ( ) ; } else if ( org.ovirt.engine.ui.uicommonweb.models.networks.ImportNetworksModel.CMD_CANCEL.equals ( command.getName ( ) ) ) { cancel ( ) ; } else if ( getAddImportCommand ( ) . equals ( command ) ) { addImport ( ) ; } else if ( getCancelImportCommand ( ) . equals ( command ) ) { cancelImport ( ) ; } }
Source:
private org.ovirt.engine.core.bll.AddVmFromSnapshotCommand < org.ovirt.engine.core.common.action.AddVmFromSnapshotParameters > setupCanAddVmFromSnapshotTests ( final int domainSizeGB , final int sizeRequired , org.ovirt.engine.core.compat.Guid sourceSnapshotId ) { org.ovirt.engine.core.common.businessentities.VM vm = initializeMock ( domainSizeGB , sizeRequired ) ; initializeVmDAOMock ( vm ) ; org.ovirt.engine.core.bll.AddVmFromSnapshotCommand < org.ovirt.engine.core.common.action.AddVmFromSnapshotParameters > cmd = createVmFromSnapshotCommand ( vm , sourceSnapshotId ) ; org.ovirt.engine.core.bll.AddVmCommandTest.initCommandMethods ( cmd ) ; return cmd ; }

Target:
protected org.ovirt.engine.core.bll.AddVmFromSnapshotCommand < org.ovirt.engine.core.common.action.AddVmFromSnapshotParameters > setupCanAddVmFromSnapshotTests ( final int domainSizeGB , final int sizeRequired , org.ovirt.engine.core.compat.Guid sourceSnapshotId ) { org.ovirt.engine.core.common.businessentities.VM vm = initializeMock ( domainSizeGB , sizeRequired ) ; initializeVmDAOMock ( vm ) ; org.ovirt.engine.core.bll.AddVmFromSnapshotCommand < org.ovirt.engine.core.common.action.AddVmFromSnapshotParameters > cmd = createVmFromSnapshotCommand ( vm , sourceSnapshotId ) ; org.ovirt.engine.core.bll.AddVmCommandTest.initCommandMethods ( cmd ) ; return cmd ; }
Source:
public void testDoFilterFromCookieNull ( ) throws java.io.IOException , javax.servlet.ServletException { org.mockito.Mockito.when ( mockRequest.getCookies ( ) ) . thenReturn ( null ) ; testFilter.doFilter ( mockRequest , mockResponse , mockChain ) ; org.mockito.Mockito.verify ( mockChain ) . doFilter ( mockRequest , mockResponse ) ; org.mockito.Mockito.verify ( mockRequest ) . setAttribute ( LocaleFilter.LOCALE , java.util.Locale.US ) ; org.mockito.Mockito.verify ( mockResponse , org.mockito.Mockito.times ( 1 ) ) . addCookie ( org.mockito.Mockito.any ( ) ) ; }

Target:
public void testDoFilterFromCookieNull ( ) throws java.io.IOException , javax.servlet.ServletException { testFilter.doFilter ( mockRequest , mockResponse , mockChain ) ; org.mockito.Mockito.verify ( mockChain ) . doFilter ( mockRequest , mockResponse ) ; org.mockito.Mockito.verify ( mockRequest ) . setAttribute ( LocaleFilter.LOCALE , java.util.Locale.US ) ; org.mockito.Mockito.verify ( mockResponse , org.mockito.Mockito.times ( 1 ) ) . addCookie ( org.mockito.Mockito.any ( ) ) ; }
Source:
public void OnSuccess ( java.lang.Object model , java.lang.Object returnValue ) { java.util.List < java.lang.String > pmOptions = ( ( java.util.ArrayList < java.lang.String > ) ( returnValue ) ) ; getPmPort ( ) . setIsAvailable ( pmOptions.contains ( org.ovirt.engine.ui.uicommonweb.models.hosts.HostModel.PmPortKey ) ) ; getPmSlot ( ) . setIsAvailable ( pmOptions.contains ( org.ovirt.engine.ui.uicommonweb.models.hosts.HostModel.PmSlotKey ) ) ; getPmSecure ( ) . setIsAvailable ( pmOptions.contains ( org.ovirt.engine.ui.uicommonweb.models.hosts.HostModel.PmSecureKey ) ) ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { java.util.List < java.lang.String > pmOptions = ( ( java.util.ArrayList < java.lang.String > ) ( returnValue ) ) ; if ( pmOptions != null ) { getPmPort ( ) . setIsAvailable ( pmOptions.contains ( org.ovirt.engine.ui.uicommonweb.models.hosts.HostModel.PmPortKey ) ) ; getPmSlot ( ) . setIsAvailable ( pmOptions.contains ( org.ovirt.engine.ui.uicommonweb.models.hosts.HostModel.PmSlotKey ) ) ; getPmSecure ( ) . setIsAvailable ( pmOptions.contains ( org.ovirt.engine.ui.uicommonweb.models.hosts.HostModel.PmSecureKey ) ) ; } }
Source:
private boolean Register ( org.ovirt.engine.core.common.businessentities.VDS vdsByUniqueId , org.ovirt.engine.core.compat.Guid vdsGroupId , boolean IsPending ) { if ( org.ovirt.engine.core.common.config.Config.< java.lang.Boolean > GetValue ( ConfigValues.LogVdsRegistration ) ) { org.ovirt.engine.core.bll.RegisterVdsQuery.log.infoFormat ( "RegisterVdsQuery::Register - Entering" ) ; } boolean returnValue = true ; if ( vdsByUniqueId == null ) { returnValue = registerNewHost ( vdsGroupId , IsPending ) ; } else { returnValue = updateExistingHost ( vdsByUniqueId , IsPending ) ; } if ( org.ovirt.engine.core.common.config.Config.< java.lang.Boolean > GetValue ( ConfigValues.LogVdsRegistration ) ) { org.ovirt.engine.core.bll.RegisterVdsQuery.log.infoFormat ( "RegisterVdsQuery::Register - Leaving with value {0}" , returnValue ) ; } return returnValue ; }

Target:
private boolean Register ( org.ovirt.engine.core.common.businessentities.VDS vdsByUniqueId , org.ovirt.engine.core.compat.Guid vdsGroupId , boolean IsPending ) { if ( org.ovirt.engine.core.common.config.Config.< java.lang.Boolean > GetValue ( ConfigValues.LogVdsRegistration ) ) { log.infoFormat ( "RegisterVdsQuery::Register - Entering" ) ; } boolean returnValue = true ; if ( vdsByUniqueId == null ) { returnValue = registerNewHost ( vdsGroupId , IsPending ) ; } else { returnValue = updateExistingHost ( vdsByUniqueId , IsPending ) ; } if ( org.ovirt.engine.core.common.config.Config.< java.lang.Boolean > GetValue ( ConfigValues.LogVdsRegistration ) ) { log.infoFormat ( "RegisterVdsQuery::Register - Leaving with value {0}" , returnValue ) ; } return returnValue ; }
Source:
public static void getClusterListByName ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String name ) { 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.VDSGroup > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( ( ( "Cluster: name=" + name ) + " sortby name" ) , org.ovirt.engine.core.common.interfaces.SearchType.Cluster ) , aQuery ) ; }

Target:
public static void getClusterListByName ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String name ) { 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.VDSGroup > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( ( ( "Cluster: name=" + name ) + " sortby name" ) , org.ovirt.engine.core.common.interfaces.SearchType.Cluster ) , aQuery ) ; }
Source:
private void createParameters ( ) { org.ovirt.engine.core.common.businessentities.profiles.CpuProfile cpuProfile = org.ovirt.engine.core.bll.profiles.CpuProfileHelper.createCpuProfile ( org.ovirt.engine.core.bll.profiles.AddCpuProfileCommandTest.CLUSTER_ID , org.ovirt.engine.core.bll.profiles.AddCpuProfileCommandTest.PROFILE_NAME ) ; org.ovirt.engine.core.bll.profiles.AddCpuProfileCommandTest.parameters = new org.ovirt.engine.core.common.action.CpuProfileParameters ( cpuProfile ) ; org.ovirt.engine.core.bll.profiles.AddCpuProfileCommandTest.parameters.setCorrelationId ( org.ovirt.engine.core.bll.profiles.AddCpuProfileCommandTest.CORRELATION_ID ) ; org.ovirt.engine.core.bll.profiles.AddCpuProfileCommandTest.parameters.setAddPermissions ( true ) ; org.ovirt.engine.core.bll.profiles.AddCpuProfileCommandTest.parameters.setSessionId ( org.ovirt.engine.core.bll.profiles.AddCpuProfileCommandTest.SESSION_ID ) ; }

Target:
private static org.ovirt.engine.core.common.action.CpuProfileParameters createParameters ( ) { org.ovirt.engine.core.common.businessentities.profiles.CpuProfile cpuProfile = org.ovirt.engine.core.bll.profiles.CpuProfileHelper.createCpuProfile ( org.ovirt.engine.core.bll.profiles.AddCpuProfileCommandTest.CLUSTER_ID , org.ovirt.engine.core.bll.profiles.AddCpuProfileCommandTest.PROFILE_NAME ) ; org.ovirt.engine.core.common.action.CpuProfileParameters parameters = new org.ovirt.engine.core.common.action.CpuProfileParameters ( cpuProfile ) ; parameters.setCorrelationId ( org.ovirt.engine.core.bll.profiles.AddCpuProfileCommandTest.CORRELATION_ID ) ; parameters.setAddPermissions ( true ) ; parameters.setSessionId ( org.ovirt.engine.core.bll.profiles.AddCpuProfileCommandTest.SESSION_ID ) ; return parameters ; }
Source:
public void markAsInvalid ( java.util.List < java.lang.String > validationHints ) { super . markAsInvalid ( validationHints ) ; java.lang.String tooltipText = org.ovirt.engine.ui.common.widget.AbstractValidatedWidgetWithLabel.getValidationTooltipText ( validationHints ) ; labelTooltip.setText ( tooltipText ) ; labelTooltip.reconfigure ( ) ; addLabelStyleName ( OvirtCss.HAS_TOOLTIP ) ; contentWidgetContainerTooltip.setText ( tooltipText ) ; contentWidgetContainerTooltip.reconfigure ( ) ; }

Target:
public void markAsInvalid ( java.util.List < java.lang.String > validationHints ) { super . markAsInvalid ( validationHints ) ; java.lang.String tooltipText = org.ovirt.engine.ui.common.widget.AbstractValidatedWidgetWithLabel.getValidationTooltipText ( validationHints ) ; labelTooltip.setText ( tooltipText ) ; addLabelStyleName ( OvirtCss.HAS_TOOLTIP ) ; contentWidgetContainerTooltip.setText ( tooltipText ) ; }
Source:
protected org.ovirt.engine.api.model.Disk postPopulate ( org.ovirt.engine.api.model.Disk model ) { model.setFormat ( org.ovirt.engine.api.restapi.types.MappingTestHelper.shuffle ( org.ovirt.engine.api.model.DiskFormat.class ) . value ( ) ) ; model.setInterface ( org.ovirt.engine.api.restapi.types.MappingTestHelper.shuffle ( org.ovirt.engine.api.model.DiskInterface.class ) . value ( ) ) ; model.setStatus ( org.ovirt.engine.api.common.util.StatusUtils.create ( org.ovirt.engine.api.restapi.types.MappingTestHelper.shuffle ( org.ovirt.engine.api.model.DiskStatus.class ) ) ) ; model.setLunStorage ( new org.ovirt.engine.api.model.HostStorage ( ) ) ; return model ; }

Target:
protected org.ovirt.engine.api.model.Disk postPopulate ( org.ovirt.engine.api.model.Disk model ) { model.setFormat ( org.ovirt.engine.api.restapi.types.MappingTestHelper.shuffle ( org.ovirt.engine.api.model.DiskFormat.class ) ) ; model.setInterface ( org.ovirt.engine.api.restapi.types.MappingTestHelper.shuffle ( org.ovirt.engine.api.model.DiskInterface.class ) ) ; model.setStatus ( org.ovirt.engine.api.common.util.StatusUtils.create ( org.ovirt.engine.api.restapi.types.MappingTestHelper.shuffle ( org.ovirt.engine.api.model.DiskStatus.class ) ) ) ; model.setLunStorage ( new org.ovirt.engine.api.model.HostStorage ( ) ) ; return model ; }
Source:
public void validateSucceeds ( ) { cmd = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.gluster.RefreshGlusterHooksCommand ( new org.ovirt.engine.core.common.action.gluster.GlusterClusterParameters ( org.ovirt.engine.core.bll.gluster.RefreshGlusterHooksCommandTest.CLUSTER_ID ) , null ) ) ; setupMocks ( ) ; org.mockito.Mockito.doReturn ( getServer ( ) ) . when ( cmd ) . getUpServer ( ) ; org.junit.Assert.assertTrue ( cmd.validate ( ) ) ; }

Target:
public void validateSucceeds ( ) { setupMocks ( ) ; org.mockito.Mockito.doReturn ( getServer ( ) ) . when ( cmd ) . getUpServer ( ) ; org.junit.Assert.assertTrue ( cmd.validate ( ) ) ; }
Source:
protected boolean verifySourceDomains ( ) { java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.StorageDomain > poolDomainsMap = org.ovirt.engine.core.common.businessentities.Entities.businessEntitiesById ( org.ovirt.engine.core.bll.AddVmFromTemplateCommand.getPoolDomains ( ) ) ; java.util.EnumSet < org.ovirt.engine.core.common.businessentities.StorageDomainStatus > validDomainStatuses = java.util.EnumSet.of ( StorageDomainStatus.Active ) ; java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > templateDiskImages = org.ovirt.engine.core.bll.storage.disk.image.ImagesHandler.filterImageDisks ( org.ovirt.engine.core.bll.AddVmFromTemplateCommand.getImagesToCheckDestinationStorageDomains ( ) , true , false , false ) ; validDisksDomains = org.ovirt.engine.core.bll.storage.disk.image.ImagesHandler.findDomainsInApplicableStatusForDisks ( templateDiskImages , poolDomainsMap , validDomainStatuses ) ; return validate ( new org.ovirt.engine.core.bll.validator.storage.DiskImagesValidator ( templateDiskImages ) . diskImagesOnAnyApplicableDomains ( validDisksDomains , poolDomainsMap , EngineMessage.ACTION_TYPE_FAILED_NO_VALID_DOMAINS_STATUS_FOR_TEMPLATE_DISKS , validDomainStatuses ) ) ; }

Target:
protected boolean verifySourceDomains ( ) { java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.StorageDomain > poolDomainsMap = org.ovirt.engine.core.common.businessentities.Entities.businessEntitiesById ( org.ovirt.engine.core.bll.AddVmFromTemplateCommand.getPoolDomains ( ) ) ; java.util.EnumSet < org.ovirt.engine.core.common.businessentities.StorageDomainStatus > validDomainStatuses = java.util.EnumSet.of ( StorageDomainStatus.Active ) ; java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > templateDiskImages = org.ovirt.engine.core.bll.storage.disk.image.ImagesHandler.filterImageDisks ( getImagesToCheckDestinationStorageDomains ( ) , true , false , false ) ; validDisksDomains = org.ovirt.engine.core.bll.storage.disk.image.ImagesHandler.findDomainsInApplicableStatusForDisks ( templateDiskImages , poolDomainsMap , validDomainStatuses ) ; return validate ( new org.ovirt.engine.core.bll.validator.storage.DiskImagesValidator ( templateDiskImages ) . diskImagesOnAnyApplicableDomains ( validDisksDomains , poolDomainsMap , EngineMessage.ACTION_TYPE_FAILED_NO_VALID_DOMAINS_STATUS_FOR_TEMPLATE_DISKS , validDomainStatuses ) ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.StorageDomain updateStorageDomainInMemoryVolumes ( java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > disksList ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > memoryDisksList = org.ovirt.engine.core.bll.memory.MemoryUtils.createDiskDummies ( getVm ( ) . getTotalMemorySizeInBytes ( ) , MemoryUtils.META_DATA_SIZE_IN_BYTES ) ; org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain = org.ovirt.engine.core.bll.memory.MemoryStorageHandler.findStorageDomainForMemory ( getParameters ( ) . getStoragePoolId ( ) , memoryDisksList ) ; disksList.addAll ( memoryDisksList ) ; return storageDomain ; }

Target:
private org.ovirt.engine.core.common.businessentities.StorageDomain updateStorageDomainInMemoryVolumes ( java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > disksList ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > memoryDisksList = org.ovirt.engine.core.bll.memory.MemoryUtils.createDiskDummies ( getVm ( ) . getTotalMemorySizeInBytes ( ) , MemoryUtils.META_DATA_SIZE_IN_BYTES ) ; org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain = org.ovirt.engine.core.bll.memory.MemoryStorageHandler.getInstance ( ) . findStorageDomainForMemory ( getParameters ( ) . getStoragePoolId ( ) , memoryDisksList ) ; disksList.addAll ( memoryDisksList ) ; return storageDomain ; }
Source:
public void onResponseReceived ( com.google.gwt.http.client.Request request , com.google.gwt.http.client.Response response ) { if ( ( ( response.getStatusCode ( ) ) == ( com.google.gwt.http.client.Response.SC_OK ) ) && ( response.getText ( ) . trim ( ) . equals ( org.ovirt.engine.ui.webadmin.section.main.presenter.tab.MainTabReportsPresenter.REPORTS_WEBAPP_DEPLOYED_MSG ) ) ) { org.ovirt.engine.ui.webadmin.section.main.presenter.tab.MainTabReportsPresenter.reportsWebappDeployed = true ; getView ( ) . updateReportsPanel ( url , params ) ; } else { errorPopupManager.show ( applicationConstants.reportsWebAppNotDeployedMsg ( ) ) ; } }

Target:
public void onResponseReceived ( com.google.gwt.http.client.Request request , com.google.gwt.http.client.Response response ) { if ( ( response.getStatusCode ( ) ) == ( com.google.gwt.http.client.Response.SC_OK ) ) { org.ovirt.engine.ui.webadmin.section.main.presenter.tab.MainTabReportsPresenter.reportsWebappDeployed = true ; getView ( ) . updateReportsPanel ( url , params ) ; } else { errorPopupManager.show ( applicationConstants.reportsWebAppNotDeployedMsg ( ) ) ; } }
Source:
void initAlertEventFooterPanel ( org.ovirt.engine.ui.webadmin.uicommon.model.AlertModelProvider alertModelProvider , org.ovirt.engine.ui.webadmin.uicommon.model.AlertFirstRowModelProvider alertFirstRowModelProvider , org.ovirt.engine.ui.webadmin.uicommon.model.EventModelProvider eventModelProvider , org.ovirt.engine.ui.webadmin.uicommon.model.EventFirstRowModelProvider eventFirstRowModelProvider , org.ovirt.engine.ui.webadmin.uicommon.model.TaskModelProvider taskModelProvider , org.ovirt.engine.ui.webadmin.uicommon.model.TaskFirstRowModelProvider taskFirstRowModelProvider , org.ovirt.engine.ui.webadmin.ApplicationResources resources , org.ovirt.engine.ui.webadmin.ApplicationTemplates templates , com.google.gwt.event.shared.EventBus eventBus , org.ovirt.engine.ui.common.system.ClientStorage clientStorage , org.ovirt.engine.ui.webadmin.ApplicationConstants constants ) { alertEventFooterPanel.add ( new org.ovirt.engine.ui.webadmin.widget.footer.AlertsEventsFooterView ( alertModelProvider , alertFirstRowModelProvider , eventModelProvider , eventFirstRowModelProvider , taskModelProvider , taskFirstRowModelProvider , resources , templates , eventBus , clientStorage , constants ) ) ; }

Target:
void initAlertEventFooterPanel ( org.ovirt.engine.ui.webadmin.uicommon.model.AlertModelProvider alertModelProvider , org.ovirt.engine.ui.webadmin.uicommon.model.EventModelProvider eventModelProvider , org.ovirt.engine.ui.webadmin.uicommon.model.TaskModelProvider taskModelProvider , org.ovirt.engine.ui.webadmin.ApplicationResources resources , org.ovirt.engine.ui.webadmin.ApplicationTemplates templates , com.google.gwt.event.shared.EventBus eventBus , org.ovirt.engine.ui.common.system.ClientStorage clientStorage , org.ovirt.engine.ui.webadmin.ApplicationConstants constants ) { alertEventFooterPanel.add ( new org.ovirt.engine.ui.webadmin.widget.footer.AlertsEventsFooterView ( alertModelProvider , eventModelProvider , taskModelProvider , resources , templates , eventBus , clientStorage , constants ) ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.VdsNetworkInterface createVlan ( org.ovirt.engine.core.common.businessentities.VdsNetworkInterface iface , org.ovirt.engine.core.common.businessentities.network net ) { return createVdsInterface ( ( ( ( iface.getName ( ) ) + "." ) + ( net.getvlan_id ( ) ) ) , false , null , null , NetworkBootProtocol.None , net.getName ( ) , net.getvlan_id ( ) ) ; }

Target:
private org.ovirt.engine.core.common.businessentities.VdsNetworkInterface createVlan ( org.ovirt.engine.core.common.businessentities.VdsNetworkInterface iface , org.ovirt.engine.core.common.businessentities.Network net ) { return createVdsInterface ( ( ( ( iface.getName ( ) ) + "." ) + ( net.getvlan_id ( ) ) ) , false , null , null , NetworkBootProtocol.None , net.getName ( ) , net.getvlan_id ( ) ) ; }
Source:
private void initImportClonedTemplate ( ) { getParameters ( ) . getVmTemplate ( ) . setId ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.VmNetworkInterface iface : getParameters ( ) . getVmTemplate ( ) . getInterfaces ( ) ) { iface.setId ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; iface.setMacAddress ( org.ovirt.engine.core.bll.MacPoolManager.getInstance ( ) . allocateNewMac ( ) ) ; } }

Target:
private void initImportClonedTemplate ( ) { getParameters ( ) . getVmTemplate ( ) . setId ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.VmNetworkInterface iface : getParameters ( ) . getVmTemplate ( ) . getInterfaces ( ) ) { iface.setId ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; } }
Source:
private java.lang.String generateRandomMessage ( int length ) { java.util.Random random = new java.util.Random ( ) ; java.lang.StringBuffer randStr = new java.lang.StringBuffer ( ) ; for ( int i = 0 ; i < length ; i ++ ) { int number = random.nextInt ( org.ovirt.vdsm.jsonrpc.client.reactors.stomp.SSLStompClientTestCase.CHAR_LIST.length ( ) ) ; char ch = org.ovirt.vdsm.jsonrpc.client.reactors.stomp.SSLStompClientTestCase.CHAR_LIST.charAt ( number ) ; randStr.append ( ch ) ; } return randStr.toString ( ) ; }

Target:
public static java.lang.String generateRandomMessage ( int length ) { java.util.Random random = new java.util.Random ( ) ; java.lang.StringBuffer randStr = new java.lang.StringBuffer ( ) ; for ( int i = 0 ; i < length ; i ++ ) { int number = random.nextInt ( org.ovirt.vdsm.jsonrpc.client.reactors.stomp.SSLStompClientTestCase.CHAR_LIST.length ( ) ) ; char ch = org.ovirt.vdsm.jsonrpc.client.reactors.stomp.SSLStompClientTestCase.CHAR_LIST.charAt ( number ) ; randStr.append ( ch ) ; } return randStr.toString ( ) ; }
Source:
public void mixedClusterServicesSupported ( ) { mockConfigRule.mockConfigValue ( ConfigValues.AllowClusterWithVirtGlusterEnabled , true ) ; org.mockito.Mockito.when ( cluster.supportsGlusterService ( ) ) . thenReturn ( true ) ; org.mockito.Mockito.when ( cluster.supportsVirtService ( ) ) . thenReturn ( true ) ; validator = new org.ovirt.engine.core.bll.validator.ClusterValidator ( clusterDao , dataCenterDao , cluster , cpuFlagsManagerHandler ) ; org.junit.Assert.assertThat ( validator.mixedClusterServicesSupported ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }

Target:
public void mixedClusterServicesSupported ( ) { mockConfigRule.mockConfigValue ( ConfigValues.AllowClusterWithVirtGlusterEnabled , true ) ; org.mockito.Mockito.when ( cluster.supportsGlusterService ( ) ) . thenReturn ( true ) ; org.mockito.Mockito.when ( cluster.supportsVirtService ( ) ) . thenReturn ( true ) ; org.junit.Assert.assertThat ( validator.mixedClusterServicesSupported ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }