auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void testAllocateMacFromRequestForStatelessVmWhenReturningToStateInSnapshotWithDuplicateMacs ( ) { otherNic.setMacAddress ( org.ovirt.engine.core.bll.network.vm.OLD_MAC ) ; nicBeingUpdated.setMacAddress ( org.ovirt.engine.core.bll.network.vm.NEW_MAC ) ; updatingNic.setMacAddress ( org.ovirt.engine.core.bll.network.vm.OLD_MAC ) ; mockOriginalSnapshot ( org.ovirt.engine.core.bll.network.vm.OLD_MAC , org.ovirt.engine.core.bll.network.vm.OLD_MAC ) ; underTest.initMacPoolData ( ) ; org.junit.Assert.assertThat ( ( "New mac value of nic being updated is same as one in snapshot, thus it is already allocated in" + "mac pool and it must not be allocated again." ) , underTest.allocateMacFromRequest ( ) , org.hamcrest.CoreMatchers.is ( false ) ) ; }

Target:
public void testAllocateMacFromRequestForStatelessVmWhenReturningToStateInSnapshotWithDuplicateMacs ( ) { otherNic.setMacAddress ( org.ovirt.engine.core.bll.network.vm.OLD_MAC ) ; nicBeingUpdated.setMacAddress ( org.ovirt.engine.core.bll.network.vm.NEW_MAC ) ; updatingNic.setMacAddress ( org.ovirt.engine.core.bll.network.vm.OLD_MAC ) ; mockOriginalSnapshot ( org.ovirt.engine.core.bll.network.vm.OLD_MAC , org.ovirt.engine.core.bll.network.vm.OLD_MAC ) ; underTest.initMacPoolData ( ) ; org.hamcrest.MatcherAssert.assertThat ( ( "New mac value of nic being updated is same as one in snapshot, thus it is already allocated in" + "mac pool and it must not be allocated again." ) , underTest.allocateMacFromRequest ( ) , org.hamcrest.CoreMatchers.is ( false ) ) ; }
Source:
private java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > createHotPlugDiskToVmParameters ( boolean plug ) { java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > parametersList = new java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > ( ) ; org.ovirt.engine.core.common.businessentities.VM vm = getEntity ( ) ; for ( java.lang.Object item : getSelectedItems ( ) ) { org.ovirt.engine.core.common.businessentities.Disk disk = ( ( org.ovirt.engine.core.common.businessentities.Disk ) ( item ) ) ; disk.setPlugged ( plug ) ; parametersList.add ( new org.ovirt.engine.core.common.action.HotPlugDiskToVmParameters ( vm.getId ( ) , disk.getId ( ) ) ) ; } return parametersList ; }

Target:
private java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > createHotPlugDiskToVmParameters ( boolean plug ) { java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > parametersList = new java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > ( ) ; org.ovirt.engine.core.common.businessentities.VM vm = getEntity ( ) ; for ( java.lang.Object item : getSelectedItems ( ) ) { org.ovirt.engine.core.common.businessentities.storage.Disk disk = ( ( org.ovirt.engine.core.common.businessentities.storage.Disk ) ( item ) ) ; disk.setPlugged ( plug ) ; parametersList.add ( new org.ovirt.engine.core.common.action.HotPlugDiskToVmParameters ( vm.getId ( ) , disk.getId ( ) ) ) ; } return parametersList ; }
Source:
public void deallocate ( org.ovirt.engine.core.common.businessentities.network.VmNic nic ) { try { com.woorea.openstack.quantum.model.Port port = locatePort ( nic ) ; if ( port != null ) { getClient ( ) . ports ( ) . delete ( port.getId ( ) ) . execute ( ) ; } } catch ( java.lang.RuntimeException e ) { throw new org.ovirt.engine.core.common.errors.VdcBLLException ( org.ovirt.engine.core.common.errors.VdcBllErrors.PROVIDER_FAILURE , e ) ; } }

Target:
public void deallocate ( org.ovirt.engine.core.common.businessentities.network.VmNic nic ) { try { com.woorea.openstack.quantum.model.Port port = locatePort ( nic ) ; if ( port != null ) { getClient ( ) . ports ( ) . delete ( port.getId ( ) ) . execute ( ) ; } } catch ( java.lang.RuntimeException e ) { throw new org.ovirt.engine.core.common.errors.EngineException ( org.ovirt.engine.core.common.errors.EngineError.PROVIDER_FAILURE , e ) ; } }
Source:
public void clearModel ( ) { setFormat ( null ) ; setActualSize ( 0 ) ; setVirtualSize ( 0 ) ; setQcowCompat ( null ) ; setBackingFile ( null ) ; setFileLoaded ( false ) ; setIsValid ( true ) ; getInvalidityReasons ( ) . clear ( ) ; getEntityChangedEvent ( ) . raise ( this , EventArgs.EMPTY ) ; }

Target:
public void clearModel ( ) { setFormat ( null ) ; setActualSize ( 0 ) ; setVirtualSize ( 0 ) ; setQcowCompat ( null ) ; setBackingFile ( null ) ; setFileLoaded ( false ) ; setContentType ( null ) ; setFileName ( null ) ; setIsValid ( true ) ; getInvalidityReasons ( ) . clear ( ) ; getEntityChangedEvent ( ) . raise ( this , EventArgs.EMPTY ) ; }
Source:
public void onBrowserEvent ( org.ovirt.engine.ui.common.widget.table.column.Context context , com.google.gwt.dom.client.Element parent , com.google.gwt.resources.client.ImageResource value , com.google.gwt.dom.client.NativeEvent event , com.google.gwt.cell.client.ValueUpdater < com.google.gwt.resources.client.ImageResource > valueUpdater ) { titlePanel.setWidget ( new com.google.gwt.user.client.ui.Label ( title ) ) ; java.lang.String eventType = event.getType ( ) ; if ( BrowserEvents.MOUSEOVER.equals ( eventType ) ) { titlePanel.showRelativeTo ( parent ) ; } else if ( BrowserEvents.MOUSEOUT.equals ( eventType ) ) { titlePanel.hide ( ) ; } }

Target:
public void onBrowserEvent ( org.ovirt.engine.ui.common.widget.table.column.Context context , com.google.gwt.dom.client.Element parent , com.google.gwt.resources.client.ImageResource value , com.google.gwt.dom.client.NativeEvent event , com.google.gwt.cell.client.ValueUpdater < com.google.gwt.resources.client.ImageResource > valueUpdater ) { java.lang.String eventType = event.getType ( ) ; handleTitlePanel ( eventType , parent ) ; }
Source:
private java.lang.String readPasswordFile ( java.lang.String passwordFile ) throws java.io.FileNotFoundException , java.io.IOException { java.io.FileReader in = new java.io.FileReader ( passwordFile ) ; java.io.BufferedReader bufferedReader = new java.io.BufferedReader ( in ) ; java.lang.String readLine = bufferedReader.readLine ( ) ; org.ovirt.engine.extensions.aaa.builtin.tools.ManageDomains.closeQuietly ( in , bufferedReader ) ; return readLine ; }

Target:
private java.lang.String readPasswordFile ( java.lang.String passwordFile ) throws java.io.FileNotFoundException , java.io.IOException { try ( java.io.BufferedReader bufferedReader = new java.io.BufferedReader ( new java.io.InputStreamReader ( new java.io.FileInputStream ( passwordFile ) , "UTF-8" ) ) ) { java.lang.String readLine = bufferedReader.readLine ( ) ; return readLine ; } }
Source:
public void calculateNetworkImplementationDetailsNetworkQosMissing ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface = createNetworkDevice ( ) ; calculateNetworkImplementationDetailsAndAssertSync ( iface , false , iface.getNetworkName ( ) , iface.isBridged ( ) , iface.getMtu ( ) , iface.getVlanId ( ) , null ) ; }

Target:
public void calculateNetworkImplementationDetailsNetworkQosOutOfSync ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface = createNetworkDevice ( ) ; org.ovirt.engine.core.common.businessentities.network.HostNetworkQos qos = new org.ovirt.engine.core.common.businessentities.network.HostNetworkQos ( ) ; qos.setOutAverageLinkshare ( 60 ) ; qos.setOutAverageUpperlimit ( 60 ) ; qos.setOutAverageRealtime ( 60 ) ; calculateNetworkImplementationDetailsAndAssertSync ( iface , false , iface.isBridged ( ) , iface.getMtu ( ) , iface.getVlanId ( ) , qos ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc glusterVolumeSnapshotCreate ( java.lang.String volumeName , java.lang.String snapshotName , java.lang.String description , boolean force ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.glusterVolumeSnapshotCreate ( volumeName , snapshotName , description , force ) ; 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 glusterVolumeGeoRepConfigSet ( java.lang.String volumeName , java.lang.String slaveHost , java.lang.String slaveVolumeName , java.lang.String configKey , java.lang.String configValue ) { try { return new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( vdsServer.glusterVolumeGeoRepConfigSet ( volumeName , slaveHost , slaveVolumeName , configKey , configValue ) ) ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
public void testGetVmIconByDataUrlWithValidUrl ( ) { final java.util.List < org.ovirt.engine.core.common.businessentities.VmIcon > result = dao.getByDataUrl ( org.ovirt.engine.core.dao.VmIconDaoTest.OTHER_SMALL_DATAURL ) ; org.junit.Assert.assertEquals ( 1 , result.size ( ) ) ; org.junit.Assert.assertEquals ( new org.ovirt.engine.core.common.businessentities.VmIcon ( FixturesTool.SMALL_ICON_ID , org.ovirt.engine.core.dao.VmIconDaoTest.OTHER_SMALL_DATAURL ) , result.get ( 0 ) ) ; }

Target:
public void testGetVmIconByDataUrlWithValidUrl ( ) { final java.util.List < org.ovirt.engine.core.common.businessentities.VmIcon > result = dao.getByDataUrl ( org.ovirt.engine.core.dao.VmIconDaoTest.OTHER_SMALL_DATAURL ) ; org.junit.jupiter.api.Assertions.assertEquals ( 1 , result.size ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( new org.ovirt.engine.core.common.businessentities.VmIcon ( FixturesTool.SMALL_ICON_ID , org.ovirt.engine.core.dao.VmIconDaoTest.OTHER_SMALL_DATAURL ) , result.get ( 0 ) ) ; }
Source:
public org.ovirt.engine.ui.common.presenter.AbstractModelBoundPopupPresenterWidget < ? extends org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel , ? > getConfirmModelPopup ( org.ovirt.engine.ui.uicommonweb.models.vms.VmListModel source , org.ovirt.engine.ui.uicommonweb.UICommand lastExecutedCommand ) { if ( ( ( lastExecutedCommand == ( getModel ( ) . getRemoveCommand ( ) ) ) || ( lastExecutedCommand == ( getModel ( ) . getStopCommand ( ) ) ) ) || ( lastExecutedCommand == ( getModel ( ) . getShutdownCommand ( ) ) ) ) { return removeConfirmPopupProvider.get ( ) ; } else { return super . getConfirmModelPopup ( source , lastExecutedCommand ) ; } }

Target:
public org.ovirt.engine.ui.common.presenter.AbstractModelBoundPopupPresenterWidget < ? extends org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel , ? > getConfirmModelPopup ( org.ovirt.engine.ui.uicommonweb.models.vms.VmListModel source , org.ovirt.engine.ui.uicommonweb.UICommand lastExecutedCommand ) { if ( lastExecutedCommand == ( getModel ( ) . getRemoveCommand ( ) ) ) { return vmRemoveConfirmPopupProvider.get ( ) ; } else if ( ( lastExecutedCommand == ( getModel ( ) . getStopCommand ( ) ) ) || ( lastExecutedCommand == ( getModel ( ) . getShutdownCommand ( ) ) ) ) { return removeConfirmPopupProvider.get ( ) ; } else { return super . getConfirmModelPopup ( source , lastExecutedCommand ) ; } }
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.storage_domains ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetStorageDomainById , new org.ovirt.engine.core.common.queries.StorageDomainQueryParametersBase ( storageDomainId ) , aQuery ) ; }

Target:
public static void GetRoleList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.roles > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.roles > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllRoles , new org.ovirt.engine.core.common.queries.MultilevelAdministrationsQueriesParameters ( ) , aQuery ) ; }
Source:
public com.google.gwt.safehtml.shared.SafeHtml getTooltip ( org.ovirt.engine.core.common.businessentities.VM vm ) { if ( ( ( vm.getStopReason ( ) ) != null ) && ( ! ( vm.getStopReason ( ) . trim ( ) . isEmpty ( ) ) ) ) { return com.google.gwt.safehtml.shared.SafeHtmlUtils.fromString ( vm.getStopReason ( ) ) ; } return null ; }

Target:
protected java.lang.String getReason ( org.ovirt.engine.core.common.businessentities.VM value ) { return value.getStopReason ( ) ; }
Source:
protected void doTestBadRemove ( boolean valid , boolean success , java.lang.String detail ) throws java.lang.Exception { setUpGetEntityExpectations ( 1 ) ; setUpGetGraphicsExpectations ( 1 ) ; setUpGetBallooningExpectations ( ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.RemoveVmTemplate , org.ovirt.engine.core.common.action.VmTemplateManagementParameters.class , new java.lang.String [ ] { "VmTemplateId" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , valid , success ) ) ; try { resource.remove ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }

Target:
protected void doTestBadRemove ( boolean valid , boolean success , java.lang.String detail ) throws java.lang.Exception { setUpGetEntityExpectations ( 1 ) ; setUpGetGraphicsExpectations ( 1 ) ; setUpGetBallooningExpectations ( ) ; setUriInfo ( setUpActionExpectations ( ActionType.RemoveVmTemplate , org.ovirt.engine.core.common.action.VmTemplateManagementParameters.class , new java.lang.String [ ] { "VmTemplateId" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , valid , success ) ) ; try { resource.remove ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc vmUpdateDevice ( java.lang.String vmId , org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcStruct device ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.vmUpdateDevice ( vmId , device.getInnerMap ( ) ) ; 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.gluster.GlusterHookContentInfoReturnForXmlRpc glusterHookRead ( java.lang.String glusterCommand , java.lang.String stage , java.lang.String hookName ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.glusterHookRead ( glusterCommand , stage , hookName ) ; org.ovirt.engine.core.vdsbroker.gluster.GlusterHookContentInfoReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.gluster.GlusterHookContentInfoReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
public org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeGeoRepStatusForXmlRpc glusterVolumeGeoRepStatus ( ) { try { java.util.Map < java.lang.String , java.lang.Object > response = vdsServer.glusterVolumeGeoRepStatus ( ) ; return new org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeGeoRepStatusForXmlRpc ( response ) ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }

Target:
public org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeGeoRepStatusForXmlRpc glusterVolumeGeoRepSessionList ( java.lang.String volumeName , java.lang.String slaveHost , java.lang.String slaveVolumeName ) { try { java.util.Map < java.lang.String , java.lang.Object > response ; response = vdsServer.glusterVolumeGeoRepSessionList ( volumeName , slaveHost , slaveVolumeName ) ; return new org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeGeoRepStatusForXmlRpc ( response ) ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
private static java.util.concurrent.locks.Lock getSyncObject ( org.ovirt.engine.core.compat.Guid domainId , org.ovirt.engine.core.common.businessentities.ImageFileType imageType ) { org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.ImageFileType > domainPerFileType = new org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.ImageFileType > ( domainId , imageType ) ; org.ovirt.engine.core.bll.IsoDomainListSyncronizer.syncDomainForFileTypeMap.putIfAbsent ( domainPerFileType , new java.util.concurrent.locks.ReentrantLock ( ) ) ; return org.ovirt.engine.core.bll.IsoDomainListSyncronizer.syncDomainForFileTypeMap.get ( domainPerFileType ) ; }

Target:
private static java.util.concurrent.locks.Lock getSyncObject ( org.ovirt.engine.core.compat.Guid domainId , org.ovirt.engine.core.common.businessentities.storage.ImageFileType imageType ) { org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.businessentities.storage.ImageFileType > domainPerFileType = new org.ovirt.engine.core.common.utils.Pair ( domainId , imageType ) ; org.ovirt.engine.core.bll.IsoDomainListSyncronizer.syncDomainForFileTypeMap.putIfAbsent ( domainPerFileType , new java.util.concurrent.locks.ReentrantLock ( ) ) ; return org.ovirt.engine.core.bll.IsoDomainListSyncronizer.syncDomainForFileTypeMap.get ( domainPerFileType ) ; }
Source:
public void setEntity ( T value ) { if ( ( entity ) != value ) { entityChanging ( value , entity ) ; entity = value ; onEntityChanged ( ) ; getEntityChangedEvent ( ) . raise ( this , EventArgs.Empty ) ; onPropertyChanged ( new org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ( "Entity" ) ) ; } }

Target:
public void setEntity ( T value ) { if ( ( entity ) != value ) { entityChanging ( value , entity ) ; entity = value ; onEntityChanged ( ) ; getEntityChangedEvent ( ) . raise ( this , EventArgs.EMPTY ) ; onPropertyChanged ( new org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ( "Entity" ) ) ; } }
Source:
public java.lang.String getText ( java.lang.Object image ) { if ( image instanceof org.ovirt.engine.core.common.businessentities.RepoImage ) { return ( ( org.ovirt.engine.core.common.businessentities.RepoImage ) ( image ) ) . getRepoImageTitle ( ) ; } return "(Unknown)" ; }

Target:
public java.lang.String getText ( java.lang.Object image ) { if ( image instanceof org.ovirt.engine.core.common.businessentities.RepoImage ) { return ( ( org.ovirt.engine.core.common.businessentities.RepoImage ) ( image ) ) . getRepoImageTitle ( ) ; } else if ( image instanceof org.ovirt.engine.core.common.businessentities.DiskImage ) { return ( ( org.ovirt.engine.core.common.businessentities.DiskImage ) ( image ) ) . getDiskAlias ( ) ; } return constants.unknown ( ) ; }
Source:
public org.ovirt.engine.core.common.businessentities.network.HostNicVfsConfig mapRow ( java.sql.ResultSet rs , int index ) throws java.sql.SQLException { org.ovirt.engine.core.common.businessentities.network.HostNicVfsConfig entity = new org.ovirt.engine.core.common.businessentities.network.HostNicVfsConfig ( ) ; entity.setId ( getGuidDefaultEmpty ( rs , "id" ) ) ; entity.setNicId ( getGuidDefaultEmpty ( rs , "nic_id" ) ) ; entity.setAllNetworksAllowed ( rs.getBoolean ( "all_networks_allowed" ) ) ; return entity ; }

Target:
public org.ovirt.engine.core.common.businessentities.network.HostNicVfsConfig mapRow ( java.sql.ResultSet rs , int index ) throws java.sql.SQLException { org.ovirt.engine.core.common.businessentities.network.HostNicVfsConfig entity = new org.ovirt.engine.core.common.businessentities.network.HostNicVfsConfig ( ) ; entity.setId ( getGuid ( rs , "id" ) ) ; entity.setNicId ( getGuid ( rs , "nic_id" ) ) ; entity.setAllNetworksAllowed ( rs.getBoolean ( "is_all_networks_allowed" ) ) ; ( ( org.ovirt.engine.core.dao.network.HostNicVfsConfigDaoDbFacadeImpl ) ( org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getHostNicVfsConfigDao ( ) ) ) . fillNetworksAndLabelsDataOnConfig ( entity ) ; return entity ; }
Source:
public static void getPermissionsByAdElementId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid userId ) { 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.Permissions > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Permissions > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetPermissionsByAdElementId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( userId ) , aQuery ) ; }

Target:
public void getGlusterBricksForServer ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , 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 : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterVolumeBricksByServerId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( serverId ) , aQuery ) ; }
Source:
public void getNetworkList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId ) { 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.network.Network > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.Network > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllNetworks , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) , aQuery ) ; }

Target:
public void getCPUList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Version version ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ServerCpu > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ServerCpu > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllServerCpuList , new org.ovirt.engine.core.common.queries.GetAllServerCpuListParameters ( version ) , aQuery ) ; }
Source:
public void edit ( final org.ovirt.engine.ui.uicommonweb.models.vms.MigrateModel object ) { org.ovirt.engine.ui.webadmin.section.main.view.popup.vm.VmMigratePopupView.Driver.driver.edit ( object ) ; updateMessages ( object ) ; object.getPropertyChangedEvent ( ) . addListener ( new org.ovirt.engine.ui.uicompat.IEventListener ( ) { @ java.lang.Override public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { if ( args instanceof org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ) { updateMessages ( object ) ; } } } ) ; }

Target:
public void edit ( final org.ovirt.engine.ui.uicommonweb.models.vms.MigrateModel object ) { driver.edit ( object ) ; updateMessages ( object ) ; object.getPropertyChangedEvent ( ) . addListener ( new org.ovirt.engine.ui.uicompat.IEventListener ( ) { @ java.lang.Override public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { if ( args instanceof org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ) { updateMessages ( object ) ; } } } ) ; }
Source:
public void onSucceeded ( org.ovirt.engine.core.compat.Guid cmdId , java.util.List < org.ovirt.engine.core.compat.Guid > childCmdIds ) { java.lang.String ovf = getOvf ( ) ; if ( ovf == null ) { return ; } org.ovirt.engine.core.common.businessentities.VM vm = readVmFromOvf ( ovf ) ; if ( vm == null ) { return ; } addImportedDevices ( vm.getStaticData ( ) ) ; deleteV2VJob ( ) ; }

Target:
private boolean selectProxyHost ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VDS > activeHosts = org.ovirt.engine.core.bll.ConvertVmCommand.getVdsDAO ( ) . getAllForStoragePoolAndStatus ( org.ovirt.engine.core.bll.ConvertVmCommand.getStoragePoolId ( ) , VDSStatus.Up ) ; if ( activeHosts.isEmpty ( ) ) { return false ; } org.ovirt.engine.core.common.businessentities.VDS activeHost = activeHosts.get ( 0 ) ; setVds ( activeHost ) ; org.ovirt.engine.core.bll.ConvertVmCommand.getParameters ( ) . setProxyHostId ( activeHost.getId ( ) ) ; return true ; }
Source:
protected void syncSearch ( ) { if ( ( getEntity ( ) ) != null ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity glusterVolumeEntity = ( ( org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity ) ( getEntity ( ) ) ) ; if ( ( getItems ( ) ) == ( glusterVolumeEntity.getBricks ( ) ) ) { getItemsChangedEvent ( ) . raise ( this , EventArgs.Empty ) ; } else { setItems ( glusterVolumeEntity.getBricks ( ) ) ; } } else { setItems ( null ) ; } }

Target:
protected void syncSearch ( ) { if ( ( getEntity ( ) ) != null ) { org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity glusterVolumeEntity = ( ( org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity ) ( getEntity ( ) ) ) ; if ( ( getItems ( ) ) == ( glusterVolumeEntity.getBricks ( ) ) ) { getItemsChangedEvent ( ) . raise ( this , EventArgs.EMPTY ) ; } else { setItems ( glusterVolumeEntity.getBricks ( ) ) ; } } else { setItems ( null ) ; } }
Source:
public org.ovirt.engine.core.common.AuditLogType getAuditLogTypeValue ( ) { if ( ! ( org.ovirt.engine.core.bll.storage.disk.image.AllocateImageGroupVolumeCommand.getSucceeded ( ) ) ) { addCustomValue ( "DiskId" , org.ovirt.engine.core.bll.storage.disk.image.AllocateImageGroupVolumeCommand.getDiskImage ( ) . getId ( ) . toString ( ) ) ; addCustomValue ( "DiskAlias" , org.ovirt.engine.core.bll.storage.disk.image.AllocateImageGroupVolumeCommand.getDiskImage ( ) . getDiskAlias ( ) ) ; return org.ovirt.engine.core.common.AuditLogType.DISK_PREALLOCATION_FAILED ; } return super . getAuditLogTypeValue ( ) ; }

Target:
public org.ovirt.engine.core.common.AuditLogType getAuditLogTypeValue ( ) { if ( ! ( org.ovirt.engine.core.bll.storage.disk.image.AllocateImageGroupVolumeCommand.getSucceeded ( ) ) ) { addCustomValue ( "DiskId" , org.ovirt.engine.core.bll.storage.disk.image.AllocateImageGroupVolumeCommand.getParameters ( ) . getImageGroupID ( ) . toString ( ) ) ; addCustomValue ( "DiskAlias" , getDisk ( ) . getDiskAlias ( ) ) ; return org.ovirt.engine.core.common.AuditLogType.DISK_PREALLOCATION_FAILED ; } return super . getAuditLogTypeValue ( ) ; }
Source:
public void testChangeQuotaForDisk ( ) { org.ovirt.engine.core.common.businessentities.image_storage_domain_map image_storage_domain_map = dao.getAllByImageId ( org.ovirt.engine.core.dao.ImageStorageDomainMapDaoTest.EXISTING_IMAGE_ID ) . get ( 0 ) ; org.ovirt.engine.core.compat.Guid quotaId = image_storage_domain_map.getQuotaId ( ) ; if ( quotaId.equals ( FixturesTool.DEFAULT_QUOTA_GENERAL ) ) { org.junit.Assert.fail ( "Same source and dest quota id, cannot perform test" ) ; } dao.updateQuotaForImageAndSnapshots ( org.ovirt.engine.core.dao.ImageStorageDomainMapDaoTest.EXISTING_DISK_ID , org.ovirt.engine.core.dao.ImageStorageDomainMapDaoTest.EXISTING_DOMAIN_ID , FixturesTool.DEFAULT_QUOTA_GENERAL ) ; image_storage_domain_map = dao.getAllByImageId ( org.ovirt.engine.core.dao.ImageStorageDomainMapDaoTest.EXISTING_IMAGE_ID ) . get ( 0 ) ; quotaId = image_storage_domain_map.getQuotaId ( ) ; org.junit.Assert.assertEquals ( "quota wasn't changed" , quotaId , FixturesTool.DEFAULT_QUOTA_GENERAL ) ; }

Target:
public void testChangeQuotaForDisk ( ) { org.ovirt.engine.core.common.businessentities.storage.image_storage_domain_map image_storage_domain_map = dao.getAllByImageId ( org.ovirt.engine.core.dao.ImageStorageDomainMapDaoTest.EXISTING_IMAGE_ID ) . get ( 0 ) ; org.ovirt.engine.core.compat.Guid quotaId = image_storage_domain_map.getQuotaId ( ) ; if ( quotaId.equals ( FixturesTool.DEFAULT_QUOTA_GENERAL ) ) { org.junit.Assert.fail ( "Same source and dest quota id, cannot perform test" ) ; } dao.updateQuotaForImageAndSnapshots ( org.ovirt.engine.core.dao.ImageStorageDomainMapDaoTest.EXISTING_DISK_ID , org.ovirt.engine.core.dao.ImageStorageDomainMapDaoTest.EXISTING_DOMAIN_ID , FixturesTool.DEFAULT_QUOTA_GENERAL ) ; image_storage_domain_map = dao.getAllByImageId ( org.ovirt.engine.core.dao.ImageStorageDomainMapDaoTest.EXISTING_IMAGE_ID ) . get ( 0 ) ; quotaId = image_storage_domain_map.getQuotaId ( ) ; org.junit.Assert.assertEquals ( "quota wasn't changed" , quotaId , FixturesTool.DEFAULT_QUOTA_GENERAL ) ; }
Source:
public void init ( org.ovirt.engine.core.common.osinfo.MapBackedPreferences preferences ) { org.ovirt.engine.core.utils.OsRepositoryImpl.INSTANCE.preferences = preferences ; emptyNode = preferences.node ( "emptyNode" ) ; buildIdToUnameLookup ( ) ; buildBackCompatMapping ( ) ; validateTree ( ) ; }

Target:
public void init ( org.ovirt.engine.core.common.osinfo.MapBackedPreferences preferences ) { org.ovirt.engine.core.utils.OsRepositoryImpl.INSTANCE.preferences = preferences ; emptyNode = preferences.node ( "emptyNode" ) ; buildIdToUnameLookup ( ) ; buildBackCompatMapping ( ) ; validateTree ( ) ; if ( org.ovirt.engine.core.utils.OsRepositoryImpl.log.isDebugEnabled ( ) ) { org.ovirt.engine.core.utils.OsRepositoryImpl.log.debugFormat ( "Osinfo Repository:\n {0}" , toString ( ) ) ; } }
Source:
public static void getGlusterHook ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hookId , boolean includeServerHooks ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetGlusterHookById , new org.ovirt.engine.core.common.queries.gluster.GlusterHookQueryParameters ( hookId , includeServerHooks ) , aQuery ) ; }

Target:
public static void getGlusterRemoveBricksStatus ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId , org.ovirt.engine.core.compat.Guid volumeId , java.util.List < org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity > bricks ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter < org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeTaskStatusEntity > ( ) { @ java.lang.Override public org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeTaskStatusEntity Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return ( ( org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeTaskStatusEntity ) ( source ) ) ; } } ; org.ovirt.engine.core.common.action.gluster.GlusterVolumeRemoveBricksQueriesParameters parameters = new org.ovirt.engine.core.common.action.gluster.GlusterVolumeRemoveBricksQueriesParameters ( clusterId , volumeId , bricks ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetGlusterVolumeRemoveBricksStatus , parameters , aQuery ) ; }
Source:
public void canDetectMissingRequiredHostNumaNodes ( ) { updatedNumaNodes = java.util.Arrays.asList ( org.ovirt.engine.core.bll.utils.NumaTestUtils.createVmNumaNodeWithId ( 3 , vdsNumaNodes , org.ovirt.engine.core.bll.numa.vm.UpdateVmNumaNodesCommandTest.NODE_ID_3 ) ) ; existingNumaNodes.addAll ( updatedNumaNodes ) ; vm.setvNumaNodeList ( existingNumaNodes ) ; vdsNumaNodes.remove ( 0 ) ; final org.ovirt.engine.core.bll.numa.vm.UpdateVmNumaNodesCommand command = mockedCommandWithVmFromParams ( ) ; org.ovirt.engine.core.bll.CanDoActionTestUtils.runAndAssertCanDoActionFailure ( command , EngineMessage.VM_NUMA_NODE_HOST_NODE_INVALID_INDEX ) ; }

Target:
public void canDetectMissingRequiredHostNumaNodes ( ) { updatedNumaNodes = java.util.Arrays.asList ( org.ovirt.engine.core.bll.utils.NumaTestUtils.createVmNumaNodeWithId ( 3 , vdsNumaNodes , org.ovirt.engine.core.bll.numa.vm.UpdateVmNumaNodesCommandTest.NODE_ID_3 ) ) ; existingNumaNodes.addAll ( updatedNumaNodes ) ; vm.setvNumaNodeList ( existingNumaNodes ) ; vdsNumaNodes.remove ( 0 ) ; final org.ovirt.engine.core.bll.numa.vm.UpdateVmNumaNodesCommand command = mockedCommandWithVmFromParams ( ) ; org.ovirt.engine.core.bll.ValidateTestUtils.runAndAssertValidateFailure ( command , EngineMessage.VM_NUMA_NODE_HOST_NODE_INVALID_INDEX ) ; }
Source:
protected java.lang.String cdPathWindowsToLinux ( java.lang.String windowsPath , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.compat.Guid vdsId ) { if ( org.apache.commons.lang.StringUtils.isEmpty ( windowsPath ) ) { return "" ; } return cdPathWindowsToLinux ( windowsPath , ( ( java.lang.String ) ( runVdsCommand ( VDSCommandType.IsoPrefix , new org.ovirt.engine.core.common.vdscommands.VdsAndPoolIDVDSParametersBase ( vdsId , storagePoolId ) ) . getReturnValue ( ) ) ) ) ; }

Target:
protected java.lang.String cdPathWindowsToLinux ( java.lang.String windowsPath , org.ovirt.engine.core.compat.Guid storagePoolId , org.ovirt.engine.core.compat.Guid vdsId ) { if ( org.apache.commons.lang.StringUtils.isEmpty ( windowsPath ) ) { return "" ; } return cdPathWindowsToLinux ( windowsPath , getIsoPrefix ( storagePoolId , vdsId ) ) ; }
Source:
public void getClusterUnsupportedVmsCpus ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vdsGroupId , java.lang.String newCpuName ) { 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 source ; } return new java.util.HashMap ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetClusterUnsupportedVmsCpus , new org.ovirt.engine.core.common.queries.GetClusterUnsupportedVmsCpusParameters ( vdsGroupId , newCpuName ) , aQuery ) ; }

Target:
public void getCinderVolumeTypesList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storageDomainId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter < java.util.List < org.ovirt.engine.core.common.businessentities.storage.CinderVolumeType > > ( ) { @ java.lang.Override public java.util.List < org.ovirt.engine.core.common.businessentities.storage.CinderVolumeType > Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return ( ( java.util.List < org.ovirt.engine.core.common.businessentities.storage.CinderVolumeType > ) ( source ) ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetCinderVolumeTypesByStorageDomainId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( storageDomainId ) , aQuery ) ; }
Source:
public void getNextAvailableDiskAliasNameByVMId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid vmId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetNextAvailableDiskAliasNameByVMId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }

Target:
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 ) ; }
Source:
protected org.ovirt.engine.core.common.businessentities.roles getEntity ( int index ) { org.ovirt.engine.core.common.businessentities.roles role = new org.ovirt.engine.core.common.businessentities.roles ( ) ; role.setId ( GUIDS [ index ] ) ; role.setname ( NAMES [ index ] ) ; role.setdescription ( DESCRIPTIONS [ index ] ) ; role.setis_readonly ( false ) ; role.setType ( RoleType.ADMIN ) ; return role ; }

Target:
protected org.ovirt.engine.api.model.Role getEntity ( int index ) { org.ovirt.engine.api.model.Role role = new org.ovirt.engine.api.model.Role ( ) ; role.setId ( GUIDS [ index ] ) ; role.setname ( NAMES [ index ] ) ; role.setdescription ( DESCRIPTIONS [ index ] ) ; role.setis_readonly ( false ) ; role.setType ( RoleType.ADMIN ) ; return role ; }
Source:
public void testUrlWithPagination ( ) { org.ovirt.engine.core.common.queries.ErrataFilter errataFilter = new org.ovirt.engine.core.common.queries.ErrataFilter ( ) ; errataFilter.setPageSize ( 20 ) ; errataFilter.setPageNumber ( 3 ) ; org.ovirt.engine.core.bll.host.provider.foreman.FilteredErrataRelativeUrlBuilder underTest = new org.ovirt.engine.core.bll.host.provider.foreman.FilteredErrataRelativeUrlBuilder ( org.ovirt.engine.core.bll.host.provider.foreman.FilteredErrataRelativeUrlBuilderTest.HOST_ID , errataFilter ) ; org.junit.Assert.assertEquals ( "/katello/api/v2/systems/xxx/errata?page=3&per_page=20" , underTest.build ( ) ) ; }

Target:
public void testUrlWithPagination ( ) { org.ovirt.engine.core.common.queries.ErrataFilter errataFilter = new org.ovirt.engine.core.common.queries.ErrataFilter ( ) ; errataFilter.setPageSize ( 20 ) ; errataFilter.setPageNumber ( 3 ) ; org.ovirt.engine.core.bll.host.provider.foreman.FilteredErrataRelativeUrlBuilder underTest = createFilteredErrataRelativeUrlBuilder ( errataFilter ) ; org.junit.Assert.assertEquals ( "/katello/api/v2/systems/xxx/errata?page=3&per_page=20" , underTest.build ( ) ) ; }
Source:
public java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.VdcObjectType > getJobSubjectEntityByJobId ( org.ovirt.engine.core.compat.Guid jobId ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "job_id" , jobId ) ; java.util.List < org.ovirt.engine.core.dao.JobSubjectEntityDaoFacadeImpl.JobSubjectEntity > list = getCallsHandler ( ) . executeReadList ( "GetJobSubjectEntityByJobId" , org.ovirt.engine.core.dao.JobSubjectEntityDaoFacadeImpl.jobSubjectEntityRowMapper , parameterSource ) ; java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.VdcObjectType > entityMap = new java.util.HashMap < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.VdcObjectType > ( ) ; for ( org.ovirt.engine.core.dao.JobSubjectEntityDaoFacadeImpl.JobSubjectEntity jobSubjectEntity : list ) { entityMap.put ( jobSubjectEntity.getEntityId ( ) , jobSubjectEntity.getEntityType ( ) ) ; } return entityMap ; }

Target:
public java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.VdcObjectType > getJobSubjectEntityByJobId ( org.ovirt.engine.core.compat.Guid jobId ) { java.util.List < org.ovirt.engine.core.common.job.JobSubjectEntity > list = multipleResults ( entityManager.createNamedQuery ( "JobSubjectEntity.getJobSubjectEntityByJobId" , org.ovirt.engine.core.common.job.JobSubjectEntity.class ) . setParameter ( "jobId" , jobId ) ) ; java.util.Map < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.VdcObjectType > entityMap = new java.util.HashMap < org.ovirt.engine.core.compat.Guid , org.ovirt.engine.core.common.VdcObjectType > ( ) ; for ( org.ovirt.engine.core.common.job.JobSubjectEntity jobSubjectEntity : list ) { entityMap.put ( jobSubjectEntity.getEntityId ( ) , jobSubjectEntity.getEntityType ( ) ) ; } return entityMap ; }
Source:
private void queryQoss ( ) { org.ovirt.engine.ui.frontend.AsyncQuery qossQuery = new org.ovirt.engine.ui.frontend.AsyncQuery ( ) ; qossQuery.asyncCallback = new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { java.util.Collection < org.ovirt.engine.core.common.businessentities.network.HostNetworkQos > qoss = ( ( java.util.Collection < org.ovirt.engine.core.common.businessentities.network.HostNetworkQos > ) ( returnValue ) ) ; qosById = org.ovirt.engine.core.common.businessentities.Entities.businessEntitiesById ( qoss ) ; queryInterfaces ( ) ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getAllHostNetworkQos ( getEntity ( ) . getStoragePoolId ( ) , qossQuery ) ; }

Target:
private void queryQoss ( ) { org.ovirt.engine.ui.uicommonweb.models.hosts.AsyncQuery qossQuery = new org.ovirt.engine.ui.uicommonweb.models.hosts.AsyncQuery ( ) ; qossQuery.asyncCallback = new org.ovirt.engine.ui.frontend.AsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object returnValue ) { java.util.Collection < org.ovirt.engine.core.common.businessentities.network.HostNetworkQos > qoss = ( ( java.util.Collection < org.ovirt.engine.core.common.businessentities.network.HostNetworkQos > ) ( returnValue ) ) ; qosById = org.ovirt.engine.core.common.businessentities.Entities.businessEntitiesById ( qoss ) ; queryInterfaces ( ) ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getAllHostNetworkQos ( getEntity ( ) . getStoragePoolId ( ) , qossQuery ) ; }
Source:
public void getClusterGlusterServices ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.core.common.queries.gluster.GlusterVolumeAdvancedDetailsParameters parameters = new org.ovirt.engine.core.common.queries.gluster.GlusterVolumeAdvancedDetailsParameters ( clusterId , null , null , false ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterVolumeAdvancedDetails , parameters , aQuery ) ; }

Target:
public void getTemplateById ( 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 ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmTemplate , new org.ovirt.engine.core.common.queries.GetVmTemplateParameters ( templateId ) , aQuery ) ; }
Source:
protected boolean canDoAction ( ) { parameters = getParameters ( ) ; if ( ! ( super . canDoAction ( ) ) ) { return false ; } if ( getGeoRepSession ( ) . getStatus ( ) . equals ( GeoRepSessionStatus.ACTIVE ) ) { addCanDoActionMessage ( VdcBllMessages.ACTION_TYPE_FAILED_GEOREP_SESSION_ALREADY_RESUMED ) ; return false ; } return true ; }

Target:
protected boolean canDoAction ( ) { parameters = getParameters ( ) ; if ( ! ( super . canDoAction ( ) ) ) { return false ; } if ( getGeoRepSession ( ) . getStatus ( ) . equals ( GeoRepSessionStatus.ACTIVE ) ) { addCanDoActionMessage ( EngineMessage.ACTION_TYPE_FAILED_GEOREP_SESSION_ALREADY_RESUMED ) ; return false ; } return true ; }
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 GetDataCenterList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage_pool > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( "DataCenter: sortby name" , org.ovirt.engine.core.common.interfaces.SearchType.StoragePool ) , aQuery ) ; }
Source:
public boolean Validate ( ) { org.ovirt.engine.ui.uicommonweb.validation.NotEmptyValidation valueValidation = new org.ovirt.engine.ui.uicommonweb.validation.NotEmptyValidation ( ) ; getSelectedKey ( ) . ValidateEntity ( new org.ovirt.engine.ui.uicommonweb.validation.IValidation [ ] { valueValidation } ) ; getValue ( ) . ValidateEntity ( new org.ovirt.engine.ui.uicommonweb.validation.IValidation [ ] { valueValidation } ) ; return ( getSelectedKey ( ) . getIsValid ( ) ) && ( getValue ( ) . getIsValid ( ) ) ; }

Target:
public boolean Validate ( ) { org.ovirt.engine.ui.uicommonweb.validation.NotEmptyValidation valueValidation = new org.ovirt.engine.ui.uicommonweb.validation.NotEmptyValidation ( ) ; getSelectedKey ( ) . validateEntity ( new org.ovirt.engine.ui.uicommonweb.validation.IValidation [ ] { valueValidation } ) ; getValue ( ) . validateEntity ( new org.ovirt.engine.ui.uicommonweb.validation.IValidation [ ] { valueValidation } ) ; return ( getSelectedKey ( ) . getIsValid ( ) ) && ( getValue ( ) . getIsValid ( ) ) ; }