auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private void initTimeZones ( ) { getOSType ( ) . getSelectedItemChangedEvent ( ) . 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 ) { getBehavior ( ) . updateTimeZone ( ) ; } } ) ; }

Target:
private void WatchdogModel_EntityChanged ( java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { if ( "" . equals ( getWatchdogModel ( ) . getEntity ( ) ) ) { getWatchdogAction ( ) . setIsChangable ( false ) ; getWatchdogAction ( ) . setSelectedItem ( "" ) ; } else { getWatchdogAction ( ) . setIsChangable ( true ) ; } }
Source:
public void Executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { org.ovirt.engine.ui.uicommonweb.models.storage.StorageListModel storageListModel = ( ( org.ovirt.engine.ui.uicommonweb.models.storage.StorageListModel ) ( result.getState ( ) ) ) ; org.ovirt.engine.core.common.action.VdcReturnValueBase returnVal = result.getReturnValue ( ) ; boolean success = ( returnVal != null ) && ( returnVal.getSucceeded ( ) ) ; if ( success ) { storageListModel.nfsConnection = null ; } storageListModel.ImportNfsStoragePostInit ( ) ; }

Target:
public void Executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { org.ovirt.engine.ui.uicommonweb.models.storage.StorageListModel storageListModel = ( ( org.ovirt.engine.ui.uicommonweb.models.storage.StorageListModel ) ( result.getState ( ) ) ) ; org.ovirt.engine.core.common.action.VdcReturnValueBase returnVal = result.getReturnValue ( ) ; boolean success = ( returnVal != null ) && ( returnVal.getSucceeded ( ) ) ; if ( success ) { storageListModel.fileConnection = null ; } storageListModel.ImportFileStoragePostInit ( ) ; }
Source:
protected void buildVmVideoCards ( ) { createInfo.put ( VdsProperties.display , vm.getDisplayType ( ) . toString ( ) ) ; if ( ( vm.getDisplayType ( ) ) != ( vm.getDefaultDisplayType ( ) ) ) { addVideoCardByDisplayType ( vm.getDisplayType ( ) , vm.getNumOfMonitors ( ) , vm.getSingleQxlPci ( ) ) ; } else { addVideoCardsDefinedForVmInDB ( vm.getId ( ) ) ; } }

Target:
protected void buildVmGraphicsDevices ( ) { boolean graphicsOverriden = ( ( vm.isRunOnce ( ) ) && ( ( vm.getGraphicsInfos ( ) ) != null ) ) && ( ! ( vm.getGraphicsInfos ( ) . isEmpty ( ) ) ) ; boolean usesGraphicsAsDevice = org.ovirt.engine.core.common.FeatureSupported.graphicsDeviceEnabled ( vm.getVdsGroupCompatibilityVersion ( ) ) ; if ( graphicsOverriden ) { buildVmGraphicsDevicesOverriden ( vm.getGraphicsInfos ( ) , usesGraphicsAsDevice ) ; } else { buildVmGraphicsDevicesFromDb ( usesGraphicsAsDevice ) ; } }
Source:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; dao = dbFacade.getStorageDomainDynamicDao ( ) ; staticDao = dbFacade.getStorageDomainStaticDao ( ) ; existingDynamic = dao.get ( org.ovirt.engine.core.dao.StorageDomainDynamicDAOTest.EXISTING_DOMAIN_ID ) ; newStaticDomain = new org.ovirt.engine.core.common.businessentities.StorageDomainStatic ( ) ; newStaticDomain.setStorage ( "fDMzhE-wx3s-zo3q-Qcxd-T0li-yoYU-QvVePl" ) ; newDynamicDomain = new org.ovirt.engine.core.common.businessentities.StorageDomainDynamic ( ) ; newDynamicDomain.setavailable_disk_size ( org.ovirt.engine.core.dao.StorageDomainDynamicDAOTest.USED_DISK_SIZE ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { super . setUp ( ) ; dao = dbFacade.getStorageDomainDynamicDao ( ) ; staticDao = dbFacade.getStorageDomainStaticDao ( ) ; existingDynamic = dao.get ( org.ovirt.engine.core.dao.StorageDomainDynamicDAOTest.EXISTING_DOMAIN_ID ) ; newStaticDomain = new org.ovirt.engine.core.common.businessentities.StorageDomainStatic ( ) ; newStaticDomain.setStorage ( "fDMzhE-wx3s-zo3q-Qcxd-T0li-yoYU-QvVePl" ) ; newDynamicDomain = new org.ovirt.engine.core.common.businessentities.StorageDomainDynamic ( ) ; newDynamicDomain.setAvailableDiskSize ( org.ovirt.engine.core.dao.StorageDomainDynamicDAOTest.USED_DISK_SIZE ) ; }
Source:
protected boolean checkPermissions ( final java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > permSubjects ) { java.util.List < java.lang.String > messages = new java.util.ArrayList < java.lang.String > ( ) ; for ( org.ovirt.engine.core.bll.utils.PermissionSubject permSubject : permSubjects ) { messages.clear ( ) ; if ( checkSinglePermission ( permSubject , messages ) ) { return true ; } } org.ovirt.engine.core.bll.network.cluster.UpdateNetworkOnClusterCommand.getReturnValue ( ) . getCanDoActionMessages ( ) . addAll ( messages ) ; return false ; }

Target:
private org.ovirt.engine.core.bll.network.cluster.UpdateNetworkClusterValidator createNetworkClusterValidator ( ) { return new org.ovirt.engine.core.bll.network.cluster.UpdateNetworkClusterValidator ( org.ovirt.engine.core.bll.network.cluster.UpdateNetworkOnClusterCommand.getNetworkCluster ( ) , getOldNetworkCluster ( ) , getClusterVersion ( ) ) ; }
Source:
public void testDedicatedHostNotExist ( ) { prepareVmToPassCanDoAction ( ) ; org.mockito.Mockito.doReturn ( vdsDAO ) . when ( command ) . getVdsDAO ( ) ; vmStatic.setDedicatedVmForVds ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) ) ; junit.framework.Assert.assertFalse ( "canDoAction should have failed with invalid dedicated host." , command.canDoAction ( ) ) ; assertCanDoActionMessage ( VdcBllMessages.ACTION_TYPE_FAILED_DEDICATED_VDS_NOT_IN_SAME_CLUSTER ) ; }

Target:
public void testDedicatedHostNotExist ( ) { prepareVmToPassCanDoAction ( ) ; org.mockito.Mockito.doReturn ( vdsDAO ) . when ( command ) . getVdsDAO ( ) ; vmStatic.setDedicatedVmForVds ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; junit.framework.Assert.assertFalse ( "canDoAction should have failed with invalid dedicated host." , command.canDoAction ( ) ) ; assertCanDoActionMessage ( VdcBllMessages.ACTION_TYPE_FAILED_DEDICATED_VDS_NOT_IN_SAME_CLUSTER ) ; }
Source:
public void testRemove ( ) throws java.lang.Exception { setUpGetEntityExpectations ( 1 ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.RemoveVmPool , org.ovirt.engine.core.common.action.VmPoolParametersBase.class , new java.lang.String [ ] { "VmPoolId" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , true , true ) ) ; verifyRemove ( resource.remove ( ) ) ; }

Target:
public void testRemove ( ) throws java.lang.Exception { setUpGetEntityExpectations ( 1 ) ; setUriInfo ( setUpActionExpectations ( ActionType.RemoveVmPool , org.ovirt.engine.core.common.action.VmPoolParametersBase.class , new java.lang.String [ ] { "VmPoolId" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , true , true ) ) ; verifyRemove ( resource.remove ( ) ) ; }
Source:
public static java.lang.String mapToJson ( java.util.Map < java.lang.String , java.lang.Object > input ) throws java.io.IOException { org.codehaus.jackson.map.ObjectMapper mapper = new org.codehaus.jackson.map.ObjectMapper ( ) ; org.codehaus.jackson.JsonFactory factory = new org.codehaus.jackson.JsonFactory ( ) ; java.io.StringWriter writer = new java.io.StringWriter ( ) ; org.codehaus.jackson.JsonGenerator generator = factory.createJsonGenerator ( writer ) ; generator.useDefaultPrettyPrinter ( ) ; mapper.writeValue ( generator , input ) ; return writer.toString ( ) ; }

Target:
public static java.lang.String mapToJson ( java.util.Map < java.lang.String , java.lang.Object > input , boolean prettyPrint ) throws java.io.IOException { org.codehaus.jackson.map.ObjectMapper mapper = new org.codehaus.jackson.map.ObjectMapper ( ) ; org.codehaus.jackson.JsonFactory factory = new org.codehaus.jackson.JsonFactory ( ) ; java.io.StringWriter writer = new java.io.StringWriter ( ) ; org.codehaus.jackson.JsonGenerator generator = factory.createJsonGenerator ( writer ) ; if ( prettyPrint ) { generator.useDefaultPrettyPrinter ( ) ; } mapper.writeValue ( generator , input ) ; return writer.toString ( ) ; }
Source:
protected void EndVmCommand ( ) { try { if ( org.ovirt.engine.core.bll.RemoveVmCommand.acquireLock ( ) ) { setVm ( org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmDAO ( ) . get ( org.ovirt.engine.core.bll.RemoveVmCommand.getVmId ( ) ) ) ; if ( ( org.ovirt.engine.core.bll.RemoveVmCommand.getVm ( ) ) != null ) { RemoveVmFromDb ( ) ; } } org.ovirt.engine.core.bll.RemoveVmCommand.setSucceeded ( true ) ; } finally { org.ovirt.engine.core.bll.RemoveVmCommand.freeLock ( ) ; } }

Target:
protected void EndVmCommand ( ) { try { if ( org.ovirt.engine.core.bll.RemoveVmCommand.acquireLock ( ) ) { setVm ( org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmDAO ( ) . get ( org.ovirt.engine.core.bll.RemoveVmCommand.getVmId ( ) ) ) ; if ( ( org.ovirt.engine.core.bll.RemoveVmCommand.getVm ( ) ) != null ) { org.ovirt.engine.core.bll.VmHandler.updateDisksFromDb ( org.ovirt.engine.core.bll.RemoveVmCommand.getVm ( ) ) ; RemoveVmFromDb ( ) ; } } org.ovirt.engine.core.bll.RemoveVmCommand.setSucceeded ( true ) ; } finally { org.ovirt.engine.core.bll.RemoveVmCommand.freeLock ( ) ; } }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc fenceSpmStorage ( java.lang.String spUUID , int prevID , java.lang.String prevLVER ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "StoragePool.fence" ) . withParameter ( "storagepoolID" , spUUID ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( response ) ; }

Target:
public org.ovirt.engine.core.vdsbroker.gluster.GlusterHostsPubKeyReturnForXmlRpc glusterGeoRepKeysGet ( ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "GlusterVolume.geoRepKeysGet" ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) ; return new org.ovirt.engine.core.vdsbroker.gluster.GlusterHostsPubKeyReturnForXmlRpc ( response ) ; }
Source:
public void testGetNotFound1 ( ) { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpGetEntityExpectations ( new java.util.ArrayList < > ( ) ) ; try { resource.get ( ) ; org.junit.jupiter.api.Assertions.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }

Target:
public void testGetNotFound1 ( ) { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpGetEntityExpectations ( new java.util.ArrayList < > ( ) ) ; verifyNotFoundException ( org.junit.jupiter.api.Assertions.assertThrows ( javax.ws.rs.WebApplicationException.class , resource :: get ) ) ; }
Source:
public java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > getPermissionCheckSubjects ( ) { if ( ( ( permsList ) == null ) && ( ( disk ) != null ) ) { permsList = new java.util.ArrayList < org.ovirt.engine.core.bll.utils.PermissionSubject > ( ) ; permsList.add ( new org.ovirt.engine.core.bll.utils.PermissionSubject ( disk.getId ( ) , org.ovirt.engine.core.common.VdcObjectType.Disk , org.ovirt.engine.core.common.businessentities.ActionGroup.DELETE_DISK ) ) ; } return permsList ; }

Target:
public java.util.List < org.ovirt.engine.core.bll.utils.PermissionSubject > getPermissionCheckSubjects ( ) { if ( ( ( permsList ) == null ) && ( ( getDisk ( ) ) != null ) ) { permsList = new java.util.ArrayList < org.ovirt.engine.core.bll.utils.PermissionSubject > ( ) ; permsList.add ( new org.ovirt.engine.core.bll.utils.PermissionSubject ( getDisk ( ) . getId ( ) , org.ovirt.engine.core.common.VdcObjectType.Disk , org.ovirt.engine.core.common.businessentities.ActionGroup.DELETE_DISK ) ) ; } return permsList ; }
Source:
public void testSync ( ) { org.mockito.Mockito.doReturn ( getSessionsVDSReturnVal ( true , 2 ) ) . when ( syncJob ) . runVdsCommand ( org.mockito.Matchers.eq ( VDSCommandType.GetGlusterVolumeGeoRepStatus ) , org.mockito.Matchers.any ( org.ovirt.engine.core.common.vdscommands.gluster.GlusterVolumeGeoRepSessionVDSParameters.class ) ) ; syncJob.refreshGeoRepData ( ) ; org.mockito.Mockito.verify ( geoRepDao , org.mockito.Mockito.times ( 2 ) ) . save ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSession.class ) ) ; }

Target:
public void testDiscoverGeoRepData ( ) { org.mockito.Mockito.doReturn ( getSessionsVDSReturnVal ( true , 2 ) ) . when ( syncJob ) . runVdsCommand ( org.mockito.Matchers.eq ( VDSCommandType.GetGlusterVolumeGeoRepStatus ) , org.mockito.Matchers.any ( org.ovirt.engine.core.common.vdscommands.gluster.GlusterVolumeGeoRepSessionVDSParameters.class ) ) ; syncJob.discoverGeoRepData ( ) ; org.mockito.Mockito.verify ( geoRepDao , org.mockito.Mockito.times ( 2 ) ) . save ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSession.class ) ) ; }
Source:
private long getImageSizeInBytes ( ) { return ( ( ( long ) ( ( ( org.ovirt.engine.core.bll.HibernateVmCommand.getVm ( ) . getVmMemSizeMb ( ) ) + 200 ) + ( 64 * ( org.ovirt.engine.core.bll.HibernateVmCommand.getVm ( ) . getNumOfMonitors ( ) ) ) ) ) * 1024 ) * 1024 ; }

Target:
public org.ovirt.engine.core.compat.Guid getStorageDomainId ( ) { if ( ( _storageDomainId.equals ( Guid.Empty ) ) && ( ( org.ovirt.engine.core.bll.HibernateVmCommand.getVm ( ) ) != null ) ) { long sizeNeeded = ( ( org.ovirt.engine.core.bll.HibernateVmCommand.getVm ( ) . getTotalMemorySizeInBytes ( ) ) + ( org.ovirt.engine.core.bll.HibernateVmCommand.META_DATA_SIZE_IN_BYTES ) ) / ( BYTES_IN_GB ) ; org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain = org.ovirt.engine.core.bll.VmHandler.findStorageDomainForMemory ( org.ovirt.engine.core.bll.HibernateVmCommand.getVm ( ) . getStoragePoolId ( ) , sizeNeeded ) ; if ( storageDomain != null ) { _storageDomainId = storageDomain.getId ( ) ; } } return _storageDomainId ; }
Source:
public void getAAAProfilesListViaPublic ( 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 ? new java.util.ArrayList < java.lang.String > ( ( ( java.util.ArrayList < java.lang.String > ) ( source ) ) ) : new java.util.ArrayList < java.lang.String > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runPublicQuery ( VdcQueryType.GetAAAProfileList , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }

Target:
public void getAAAProfilesListViaPublic ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.convertAAAProfilesResult ( aQuery ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runPublicQuery ( VdcQueryType.GetAAAProfileList , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }
Source:
public static void GetTemplateDiskList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid templateId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmTemplatesDisks , new org.ovirt.engine.core.common.queries.GetVmTemplatesDisksParameters ( templateId ) , aQuery ) ; }

Target:
public static void GetMaxNumOfCPUsPerSocket ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String version ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Integer ) ( source ) ) . intValue ( ) : 1 ; } } ; org.ovirt.engine.core.common.queries.GetConfigurationValueParameters tempVar = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.MaxNumOfCpuPerSocket ) ; tempVar.setVersion ( version ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( tempVar , aQuery ) ; }
Source:
public void onUserPortalModelInit ( org.ovirt.engine.ui.userportal.uicommon.model.UserPortalModelInitEvent event ) { updateListModel ( listModelProvider.getModel ( ) ) ; }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { if ( ! ( sameEntity ( listModel.getSelectedItem ( ) , model ) ) ) { getView ( ) . setNotSelected ( model.IsVmUp ( ) ) ; } else { getView ( ) . setSelected ( ) ; } }
Source:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { org.ovirt.engine.ui.uicommonweb.models.vms.VmListModel vmListModel = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.VmListModel ) ( result.getState ( ) ) ) ; vmListModel.getWindow ( ) . stopProgress ( ) ; org.ovirt.engine.core.common.action.VdcReturnValueBase returnValueBase = result.getReturnValue ( ) ; if ( ( returnValueBase != null ) && ( returnValueBase.getSucceeded ( ) ) ) { vmListModel.cancel ( ) ; vmListModel.setGuideContext ( returnValueBase.getActionReturnValue ( ) ) ; vmListModel.updateActionAvailability ( ) ; vmListModel.getGuideCommand ( ) . execute ( ) ; } }

Target:
public void queryFailed ( ) { getWindow ( ) . stopProgress ( ) ; cancel ( ) ; }
Source:
public org.ovirt.engine.core.common.businessentities.ActionVersionMap mapRow ( java.sql.ResultSet rs , int rowNum ) throws java.sql.SQLException { org.ovirt.engine.core.common.businessentities.ActionVersionMap entity = new org.ovirt.engine.core.common.businessentities.ActionVersionMap ( ) ; entity.setaction_type ( org.ovirt.engine.core.common.action.VdcActionType.forValue ( rs.getInt ( "action_type" ) ) ) ; entity.setcluster_minimal_version ( rs.getString ( "cluster_minimal_version" ) ) ; entity.setstorage_pool_minimal_version ( rs.getString ( "storage_pool_minimal_version" ) ) ; return entity ; }

Target:
public org.ovirt.engine.core.common.businessentities.ActionVersionMap mapRow ( java.sql.ResultSet rs , int rowNum ) throws java.sql.SQLException { org.ovirt.engine.core.common.businessentities.ActionVersionMap entity = new org.ovirt.engine.core.common.businessentities.ActionVersionMap ( ) ; entity.setActionType ( org.ovirt.engine.core.common.action.VdcActionType.forValue ( rs.getInt ( "action_type" ) ) ) ; entity.setClusterMinimalVersion ( rs.getString ( "cluster_minimal_version" ) ) ; entity.setStoragePoolMinimalVersion ( rs.getString ( "storage_pool_minimal_version" ) ) ; return entity ; }
Source:
protected void InitDetailModels ( ) { super . InitDetailModels ( ) ; org.ovirt.engine.ui.uicompat.ObservableCollection < org.ovirt.engine.ui.uicommonweb.models.EntityModel > list = new org.ovirt.engine.ui.uicompat.ObservableCollection < org.ovirt.engine.ui.uicommonweb.models.EntityModel > ( ) ; list.add ( new org.ovirt.engine.ui.uicommonweb.models.templates.TemplateGeneralModel ( ) ) ; list.add ( new org.ovirt.engine.ui.uicommonweb.models.templates.TemplateVmListModel ( ) ) ; list.add ( new org.ovirt.engine.ui.uicommonweb.models.templates.TemplateInterfaceListModel ( ) ) ; list.add ( new org.ovirt.engine.ui.uicommonweb.models.templates.TemplateStorageListModel ( ) ) ; addCustomModelsDetailModelList ( list ) ; setDetailModels ( list ) ; }

Target:
protected void initDetailModels ( ) { super . initDetailModels ( ) ; org.ovirt.engine.ui.uicompat.ObservableCollection < org.ovirt.engine.ui.uicommonweb.models.EntityModel > list = new org.ovirt.engine.ui.uicompat.ObservableCollection < org.ovirt.engine.ui.uicommonweb.models.EntityModel > ( ) ; list.add ( new org.ovirt.engine.ui.uicommonweb.models.templates.TemplateGeneralModel ( ) ) ; list.add ( new org.ovirt.engine.ui.uicommonweb.models.templates.TemplateVmListModel ( ) ) ; list.add ( new org.ovirt.engine.ui.uicommonweb.models.templates.TemplateInterfaceListModel ( ) ) ; list.add ( new org.ovirt.engine.ui.uicommonweb.models.templates.TemplateStorageListModel ( ) ) ; addCustomModelsDetailModelList ( list ) ; setDetailModels ( list ) ; }
Source:
protected void perform ( ) { setActionReturnValue ( org.ovirt.engine.core.bll.Backend.getInstance ( ) . getResourceManager ( ) . RunVdsCommand ( VDSCommandType.ChangeDisk , new org.ovirt.engine.core.common.vdscommands.ChangeDiskVDSCommandParameters ( org.ovirt.engine.core.bll.ChangeDiskCommand.getVdsId ( ) , org.ovirt.engine.core.bll.ChangeDiskCommand.getVm ( ) . getId ( ) , cdImagePath ) ) . getReturnValue ( ) ) ; org.ovirt.engine.core.bll.VmHandler.updateCurrentCd ( org.ovirt.engine.core.bll.ChangeDiskCommand.getVdsId ( ) , org.ovirt.engine.core.bll.ChangeDiskCommand.getVm ( ) , org.ovirt.engine.core.bll.ChangeDiskCommand.getParameters ( ) . getCdImagePath ( ) ) ; org.ovirt.engine.core.bll.ChangeDiskCommand.setSucceeded ( true ) ; }

Target:
protected void perform ( ) { setActionReturnValue ( runVdsCommand ( VDSCommandType.ChangeDisk , new org.ovirt.engine.core.common.vdscommands.ChangeDiskVDSCommandParameters ( org.ovirt.engine.core.bll.ChangeDiskCommand.getVdsId ( ) , org.ovirt.engine.core.bll.ChangeDiskCommand.getVm ( ) . getId ( ) , cdImagePath ) ) . getReturnValue ( ) ) ; org.ovirt.engine.core.bll.VmHandler.updateCurrentCd ( org.ovirt.engine.core.bll.ChangeDiskCommand.getVdsId ( ) , org.ovirt.engine.core.bll.ChangeDiskCommand.getVm ( ) , org.ovirt.engine.core.bll.ChangeDiskCommand.getParameters ( ) . getCdImagePath ( ) ) ; org.ovirt.engine.core.bll.ChangeDiskCommand.setSucceeded ( true ) ; }
Source:
public java.lang.String getName ( ) { return getEntity ( ) . getname ( ) ; }

Target:
public void setDisplayNetwork ( org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterNetworkModel model , boolean value ) { if ( ! ( isMultiDisplay ( ) ) ) { if ( ( getDisplayNetwork ( ) ) != null ) { getDisplayNetwork ( ) . setDisplayNetwork ( ( ! value ) ) ; } } model.setDisplayNetwork ( value ) ; }
Source:
public void testGetIscsiBondIdByNetworkId ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.IscsiBond > fetchedIscsiBonds = dao.getIscsiBondsByNetworkId ( FixturesTool.NETWORK_ENGINE ) ; org.junit.Assert.assertEquals ( 1 , fetchedIscsiBonds.size ( ) ) ; org.junit.Assert.assertEquals ( FixturesTool.ISCSI_BOND_ID , fetchedIscsiBonds.get ( 0 ) . getId ( ) ) ; }

Target:
public void testGetIscsiBondIdByNetworkId ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.IscsiBond > fetchedIscsiBonds = dao.getIscsiBondsByNetworkId ( FixturesTool.NETWORK_ENGINE ) ; org.junit.jupiter.api.Assertions.assertEquals ( 1 , fetchedIscsiBonds.size ( ) ) ; org.junit.jupiter.api.Assertions.assertEquals ( FixturesTool.ISCSI_BOND_ID , fetchedIscsiBonds.get ( 0 ) . getId ( ) ) ; }
Source:
public static void GetDefaultSpmPriority ( 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.lang.Integer ) ( source ) ) . intValue ( ) : 0 ; } } ; aQuery.asyncCallback.OnSuccess ( aQuery.getModel ( ) , 5 ) ; }

Target:
public static void GetLowUtilizationForPowerSave ( 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.lang.Integer ) ( source ) ) . intValue ( ) : 0 ; } } ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.LowUtilizationForPowerSave , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
private void calculateNetworkImplementationDetailsAndAssertSync ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface , boolean expectSync , java.lang.String networkName , boolean vmNet , int mtu , int vlanId ) { java.util.Map < java.lang.String , org.ovirt.engine.core.common.businessentities.network.Network > networks = createNetworksMap ( networkName , vmNet , mtu , vlanId ) ; org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface.NetworkImplementationDetails networkImplementationDetails = org.ovirt.engine.core.utils.NetworkUtils.calculateNetworkImplementationDetails ( networks , iface ) ; org.junit.Assert.assertNotNull ( "Network implementation details should be filled." , networkImplementationDetails ) ; org.junit.Assert.assertEquals ( ( ( "Network implementation details should be " + ( expectSync ? "in" : "out of" ) ) + " sync." ) , expectSync , networkImplementationDetails.isInSync ( ) ) ; }

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.NetworkQoS qos = createQos ( ) ; qos.setOutboundAverage ( 30 ) ; qos.setOutboundPeak ( 30 ) ; qos.setOutboundBurst ( 30 ) ; calculateNetworkImplementationDetailsAndAssertSync ( iface , false , iface.getNetworkName ( ) , iface.isBridged ( ) , iface.getMtu ( ) , iface.getVlanId ( ) , qos ) ; }
Source:
private void addOsTypes ( org.ovirt.engine.api.model.VersionCaps version , org.ovirt.engine.api.model.OsType [ ] types ) { version.setOsTypes ( new org.ovirt.engine.api.model.OsTypes ( ) ) ; for ( org.ovirt.engine.api.model.OsType type : types ) { version.getOsTypes ( ) . getOsTypes ( ) . add ( type.value ( ) ) ; } }

Target:
private void addStepEnumTypes ( org.ovirt.engine.api.model.VersionCaps version , org.ovirt.engine.api.model.StepEnum [ ] states ) { version.setStepTypes ( new org.ovirt.engine.api.model.StepTypes ( ) ) ; for ( org.ovirt.engine.api.model.StepEnum type : states ) { version.getStepTypes ( ) . getStepType ( ) . add ( type.value ( ) ) ; } }
Source:
private void setUpGetBallooningExpectations ( int times ) throws java.lang.Exception { for ( int i = 0 ; i < times ; i ++ ) { setUpGetEntityExpectations ( VdcQueryType.IsBalloonEnabled , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ i ] } , true ) ; } }

Target:
private void setUpGetBallooningExpectations ( int times , int index ) throws java.lang.Exception { for ( int i = 0 ; i < times ; i ++ ) { setUpGetEntityExpectations ( VdcQueryType.IsBalloonEnabled , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ index ] } , true ) ; } }
Source:
private void commonSave ( boolean allNetworksAllowed ) { org.ovirt.engine.core.common.businessentities.network.HostNicVfsConfig newConfig = new org.ovirt.engine.core.common.businessentities.network.HostNicVfsConfig ( ) ; newConfig.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; newConfig.setNicId ( FixturesTool.VDS_NETWORK_INTERFACE_WITHOUT_QOS ) ; newConfig.setAllNetworksAllowed ( allNetworksAllowed ) ; if ( ! allNetworksAllowed ) { addNetworks ( newConfig ) ; addLabels ( newConfig ) ; } dao.save ( newConfig ) ; org.ovirt.engine.core.common.businessentities.network.HostNicVfsConfig result = dao.get ( newConfig.getId ( ) ) ; org.junit.Assert.assertNotNull ( result ) ; assertHostNicVfsConfigEquals ( newConfig , result ) ; }

Target:
private void commonSave ( boolean allNetworksAllowed ) { org.ovirt.engine.core.common.businessentities.network.HostNicVfsConfig newConfig = new org.ovirt.engine.core.common.businessentities.network.HostNicVfsConfig ( ) ; newConfig.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; newConfig.setNicId ( FixturesTool.VDS_NETWORK_INTERFACE_WITHOUT_QOS ) ; newConfig.setAllNetworksAllowed ( allNetworksAllowed ) ; if ( ! allNetworksAllowed ) { addNetworks ( newConfig ) ; addLabels ( newConfig ) ; } dao.save ( newConfig ) ; org.ovirt.engine.core.common.businessentities.network.HostNicVfsConfig result = dao.get ( newConfig.getId ( ) ) ; org.junit.jupiter.api.Assertions.assertNotNull ( result ) ; assertHostNicVfsConfigEquals ( newConfig , result ) ; }
Source:
public void onFailure ( final java.lang.Throwable caught ) { if ( org.ovirt.engine.ui.frontend.Frontend.ignoreFailure ( caught ) ) { return ; } org.ovirt.engine.ui.frontend.Frontend.logger.log ( java.util.logging.Level.SEVERE , ( "Failed to execute sync getIsUserLoggedIn: " + caught ) , caught ) ; org.ovirt.engine.ui.frontend.Frontend.failureEventHandler ( caught ) ; callback.onFailure ( null ) ; }

Target:
public static void RunMultipleActions ( org.ovirt.engine.core.common.action.VdcActionType actionType , java.util.List < org.ovirt.engine.core.common.action.VdcActionParametersBase > parameters , java.util.List < org.ovirt.engine.ui.uicompat.IFrontendActionAsyncCallback > callbacks ) { org.ovirt.engine.ui.frontend.Frontend.RunMultipleActions ( actionType , parameters , callbacks , null ) ; }
Source:
public void testRemove ( ) { dao.save ( networkAttachment ) ; org.ovirt.engine.core.common.businessentities.network.NetworkAttachment result = dao.get ( networkAttachment.getId ( ) ) ; org.junit.Assert.assertNotNull ( result ) ; dao.remove ( networkAttachment.getId ( ) ) ; org.junit.Assert.assertNull ( dao.get ( networkAttachment.getId ( ) ) ) ; }

Target:
public void testRemove ( ) { dao.save ( networkAttachment ) ; org.ovirt.engine.core.common.businessentities.network.NetworkAttachment result = dao.get ( networkAttachment.getId ( ) ) ; org.junit.Assert.assertNotNull ( result ) ; dao.remove ( networkAttachment.getId ( ) ) ; org.junit.Assert.assertNull ( dao.get ( networkAttachment.getId ( ) ) ) ; org.junit.Assert.assertNull ( dnsResolverConfigurationDao.get ( networkAttachment.getDnsResolverConfiguration ( ) . getId ( ) ) ) ; }
Source:
public static final org.ovirt.engine.ui.common.widget.table.column.AbstractTextColumnWithTooltip < org.ovirt.engine.core.common.businessentities.Disk > getDescriptionColumn ( java.lang.String sortBy ) { org.ovirt.engine.ui.common.widget.table.column.AbstractTextColumnWithTooltip < org.ovirt.engine.core.common.businessentities.Disk > column = new org.ovirt.engine.ui.common.widget.table.column.AbstractTextColumnWithTooltip < org.ovirt.engine.core.common.businessentities.Disk > ( ) { @ java.lang.Override public java.lang.String getValue ( org.ovirt.engine.core.common.businessentities.Disk object ) { return object.getDiskDescription ( ) ; } } ; return org.ovirt.engine.ui.common.widget.uicommon.disks.DisksViewColumns.makeSortable ( column , sortBy ) ; }

Target:
public static final org.ovirt.engine.ui.common.widget.table.column.AbstractTextColumn < org.ovirt.engine.core.common.businessentities.storage.Disk > getDescriptionColumn ( java.lang.String sortBy ) { org.ovirt.engine.ui.common.widget.table.column.AbstractTextColumn < org.ovirt.engine.core.common.businessentities.storage.Disk > column = new org.ovirt.engine.ui.common.widget.table.column.AbstractTextColumn < org.ovirt.engine.core.common.businessentities.storage.Disk > ( ) { @ java.lang.Override public java.lang.String getValue ( org.ovirt.engine.core.common.businessentities.storage.Disk object ) { return object.getDiskDescription ( ) ; } } ; return org.ovirt.engine.ui.common.widget.uicommon.disks.DisksViewColumns.makeSortable ( column , sortBy ) ; }
Source:
public void update ( int index , org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain , java.lang.String value ) { transitionHandler.handlePlaceTransition ( true ) ; }

Target:
public void update ( int index , org.ovirt.engine.core.common.businessentities.StorageDomain storageDomain , java.lang.String value ) { java.util.Map < java.lang.String , java.lang.String > parameters = new java.util.HashMap < > ( ) ; parameters.put ( FragmentParams.NAME.getName ( ) , storageDomain.getName ( ) ) ; getPlaceTransitionHandler ( ) . handlePlaceTransition ( WebAdminApplicationPlaces.storageGeneralSubTabPlace , parameters ) ; }
Source:
public void diskImagesNoDerivedDisksOnStorageDomain ( ) { disk1.setVmEntityType ( VmEntityType.TEMPLATE ) ; java.util.ArrayList < org.ovirt.engine.core.compat.Guid > storageDomainIds = new java.util.ArrayList < > ( ) ; storageDomainIds.add ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; disk2.setStorageIds ( storageDomainIds ) ; org.mockito.Mockito.when ( diskImageDao.getAllSnapshotsForParent ( disk1.getImageId ( ) ) ) . thenReturn ( java.util.Collections.singletonList ( disk2 ) ) ; org.junit.Assert.assertThat ( validator.diskImagesHaveNoDerivedDisks ( Guid.Empty ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }

Target:
public void diskImagesNoDerivedDisksOnStorageDomain ( ) { disk1.setVmEntityType ( VmEntityType.TEMPLATE ) ; java.util.ArrayList < org.ovirt.engine.core.compat.Guid > storageDomainIds = new java.util.ArrayList < > ( ) ; storageDomainIds.add ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; disk2.setStorageIds ( storageDomainIds ) ; org.mockito.Mockito.when ( diskImageDao.getAllSnapshotsForParent ( disk1.getImageId ( ) ) ) . thenReturn ( java.util.Collections.singletonList ( disk2 ) ) ; org.hamcrest.MatcherAssert.assertThat ( validator.diskImagesHaveNoDerivedDisks ( Guid.Empty ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }
Source:
protected boolean checkStorageDomainStatus ( final org.ovirt.engine.core.common.businessentities.StorageDomainStatus ... statuses ) { boolean valid = false ; org.ovirt.engine.core.common.businessentities.StorageDomainStatus status = getStorageDomainStatus ( ) ; if ( status != null ) { valid = java.util.Arrays.asList ( statuses ) . contains ( status ) ; } if ( ! valid ) { if ( ( status != null ) && ( status.isStorageDomainInProcess ( ) ) ) { return failCanDoAction ( EngineMessage.ACTION_TYPE_FAILED_OBJECT_LOCKED ) ; } addStorageDomainStatusIllegalMessage ( ) ; } return valid ; }

Target:
protected boolean checkStorageDomainStatus ( final org.ovirt.engine.core.common.businessentities.StorageDomainStatus ... statuses ) { boolean valid = false ; org.ovirt.engine.core.common.businessentities.StorageDomainStatus status = getStorageDomainStatus ( ) ; if ( status != null ) { valid = java.util.Arrays.asList ( statuses ) . contains ( status ) ; } if ( ! valid ) { if ( ( status != null ) && ( status.isStorageDomainInProcess ( ) ) ) { return failValidation ( EngineMessage.ACTION_TYPE_FAILED_OBJECT_LOCKED ) ; } addStorageDomainStatusIllegalMessage ( ) ; } return valid ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc glusterVolumeGeoRepSessionCreate ( java.lang.String volumeName , java.lang.String remoteHost , java.lang.String remoteVolumeName , java.lang.String remoteUserName , java.lang.Boolean force ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.glusterVolumeGeoRepSessionCreate ( volumeName , remoteHost , remoteVolumeName , remoteUserName , 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 glusterGeoRepMountBrokerSetup ( java.lang.String remoteVolumeName , java.lang.String userName , java.lang.String remoteGroupName ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.glusterGeoRepMountBrokerSetup ( userName , remoteGroupName , remoteVolumeName ) ; 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 ) ; } }
Source:
public org.ovirt.engine.core.aaa.AuthenticationResult authenticate ( java.lang.String name , java.lang.String password ) { org.ovirt.engine.core.bll.adbroker.LdapReturnValueBase ldapResult = broker.runAdAction ( AdActionType.AuthenticateUser , new org.ovirt.engine.core.bll.adbroker.LdapUserPasswordBaseParameters ( getProfileName ( ) , name , password ) ) ; org.ovirt.engine.core.bll.adbroker.UserAuthenticationResult authResult = ( ( org.ovirt.engine.core.bll.adbroker.UserAuthenticationResult ) ( ldapResult.getReturnValue ( ) ) ) ; return new org.ovirt.engine.core.aaa.provisional.ProvisionalAuthenticationResult ( getProfileName ( ) , authResult ) ; }

Target:
public void init ( ) { broker = org.ovirt.engine.core.bll.adbroker.LdapFactory.getInstance ( getProfileName ( ) ) ; context.put ( ExtensionProperties.AUTHOR , "The oVirt Project" ) ; context.put ( ExtensionProperties.EXTENSION_NAME , "Internal Kerberos/LDAP authentication (Built-in)" ) ; context.put ( ExtensionProperties.LICENSE , "ASL 2.0" ) ; context.put ( ExtensionProperties.HOME , "http://www.ovirt.org" ) ; context.put ( ExtensionProperties.VERSION , "N/A" ) ; if ( ( org.ovirt.engine.core.aaa.provisional.ProvisionalAuthenticator.passwordChangeMsgPerDomain ) == null ) { synchronized ( org.ovirt.engine.core.aaa.provisional.ProvisionalAuthenticator.class ) { if ( ( org.ovirt.engine.core.aaa.provisional.ProvisionalAuthenticator.passwordChangeMsgPerDomain ) == null ) { org.ovirt.engine.core.aaa.provisional.ProvisionalAuthenticator.passwordChangeMsgPerDomain = new java.util.HashMap < > ( ) ; java.lang.String changePasswordUrl = org.ovirt.engine.core.common.config.Config.< java.lang.String > getValue ( ConfigValues.ChangePasswordMsg ) ; java.lang.String [ ] pairs = changePasswordUrl.split ( "," ) ; for ( java.lang.String pair : pairs ) { java.lang.String [ ] pairParts = pair.split ( ":" , 2 ) ; if ( ( pairParts.length ) >= 2 ) { try { org.ovirt.engine.core.aaa.provisional.ProvisionalAuthenticator.passwordChangeMsgPerDomain.put ( pairParts [ 0 ] , java.net.URLDecoder.decode ( pairParts [ 1 ] , "UTF-8" ) ) ; } catch ( java.io.UnsupportedEncodingException e ) { throw new org.ovirt.engine.api.extensions.AAAExtensionException ( org.ovirt.engine.api.extensions.AAAExtensionException.AAAExtensionError.INVALID_CONFIGURATION , ( "error in obtaining the password change message or url for " + ( pairParts [ 0 ] ) ) ) ; } } } } } } java.lang.String changePasswordMsgOrUrl = org.ovirt.engine.core.aaa.provisional.ProvisionalAuthenticator.passwordChangeMsgPerDomain.get ( getProfileName ( ) ) ; if ( changePasswordMsgOrUrl != null ) { org.ovirt.engine.core.aaa.provisional.ExtensionProperties key = ( containsURL ( changePasswordMsgOrUrl ) ) ? ExtensionProperties.AAA_CHANGE_EXPIRED_PASSWORD_URL : ExtensionProperties.AAA_CHANGE_EXPIRED_PASSWORD_MSG ; context.put ( key , changePasswordMsgOrUrl ) ; } }
Source:
private java.lang.String getGlusterNetworkAddress ( org.ovirt.engine.core.compat.Guid hostId , java.lang.String glusterNetworkName ) { final java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > nics = getInterfaceDao ( ) . getAllInterfacesForVds ( hostId ) ; for ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic : nics ) { if ( glusterNetworkName.equals ( nic.getNetworkName ( ) ) ) { return nic.getIpv4Address ( ) ; } } return null ; }

Target:
private java.lang.String getGlusterNetworkAddress ( org.ovirt.engine.core.compat.Guid hostId , java.lang.String glusterNetworkName ) { final java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > nics = interfaceDao.getAllInterfacesForVds ( hostId ) ; for ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic : nics ) { if ( glusterNetworkName.equals ( nic.getNetworkName ( ) ) ) { return nic.getIpv4Address ( ) ; } } return null ; }
Source:
public void postDataCenterWithClusterSelectedItemChanged ( ) { updateDefaultHost ( ) ; updateCustomPropertySheet ( ) ; updateMinAllocatedMemory ( ) ; updateNumOfSockets ( ) ; if ( ( ( org.ovirt.engine.core.common.businessentities.VmTemplate ) ( getModel ( ) . getTemplate ( ) . getSelectedItem ( ) ) ) != null ) { org.ovirt.engine.core.common.businessentities.VmTemplate template = ( ( org.ovirt.engine.core.common.businessentities.VmTemplate ) ( getModel ( ) . getTemplate ( ) . getSelectedItem ( ) ) ) ; updateQuotaByCluster ( template.getQuotaId ( ) , template.getQuotaName ( ) ) ; } }

Target:
public void postDataCenterWithClusterSelectedItemChanged ( ) { updateDefaultHost ( ) ; updateCustomPropertySheet ( ) ; updateMinAllocatedMemory ( ) ; updateNumOfSockets ( ) ; if ( ( ( org.ovirt.engine.core.common.businessentities.VmTemplate ) ( getModel ( ) . getTemplate ( ) . getSelectedItem ( ) ) ) != null ) { org.ovirt.engine.core.common.businessentities.VmTemplate template = ( ( org.ovirt.engine.core.common.businessentities.VmTemplate ) ( getModel ( ) . getTemplate ( ) . getSelectedItem ( ) ) ) ; updateQuotaByCluster ( template.getQuotaId ( ) , template.getQuotaName ( ) ) ; } updateMemoryBalloon ( ) ; }
Source:
protected org.ovirt.engine.core.common.businessentities.StorageType getRawValue ( org.ovirt.engine.core.common.businessentities.storage.Disk object ) { if ( ( object.getDiskStorageType ( ) ) != ( org.ovirt.engine.core.common.businessentities.storage.Disk.DiskStorageType.IMAGE ) ) { return null ; } org.ovirt.engine.core.common.businessentities.DiskImage disk = ( ( org.ovirt.engine.core.common.businessentities.DiskImage ) ( object ) ) ; return disk.getStorageTypes ( ) . isEmpty ( ) ? null : disk.getStorageTypes ( ) . get ( 0 ) ; }

Target:
protected org.ovirt.engine.core.common.businessentities.storage.StorageType getRawValue ( org.ovirt.engine.core.common.businessentities.storage.Disk object ) { if ( ( object.getDiskStorageType ( ) ) != ( org.ovirt.engine.core.common.businessentities.storage.DiskStorageType.IMAGE ) ) { return null ; } org.ovirt.engine.core.common.businessentities.storage.DiskImage disk = ( ( org.ovirt.engine.core.common.businessentities.storage.DiskImage ) ( object ) ) ; return disk.getStorageTypes ( ) . isEmpty ( ) ? null : disk.getStorageTypes ( ) . get ( 0 ) ; }
Source:
private void doInit ( org.ovirt.engineextensions.aaa.ldap.ExtMap input , org.ovirt.engineextensions.aaa.ldap.ExtMap output ) throws java.lang.Exception { try { ensureFramework ( input ) ; } catch ( java.lang.Exception e ) { org.ovirt.engineextensions.aaa.ldap.AuthzExtension.log.error ( "{} Cannot initialize LDAP framework, deferring initialization. Error: {}" , logPrefix , e.getMessage ( ) ) ; org.ovirt.engineextensions.aaa.ldap.AuthzExtension.log.debug ( "Exception" , e ) ; } }

Target:
private void doInit ( org.ovirt.engineextensions.aaa.ldap.ExtMap input , org.ovirt.engineextensions.aaa.ldap.ExtMap output ) throws java.lang.Exception { try { ensureFramework ( input ) ; } catch ( java.lang.Exception e ) { org.ovirt.engineextensions.aaa.ldap.AuthzExtension.log.debug ( "Ignoring Exception" , e ) ; } }
Source:
protected void syncSearch ( ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getAllVmTemplates ( new org.ovirt.engine.ui.frontend.AsyncQuery ( this , 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.VmTemplate > vmTemplates = ( ( java.util.Collection < org.ovirt.engine.core.common.businessentities.VmTemplate > ) ( returnValue ) ) ; prefetchIcons ( vmTemplates ) ; } } ) , getIsQueryFirstTime ( ) ) ; }

Target:
protected void syncSearch ( ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getAllVmTemplates ( new org.ovirt.engine.ui.uicommonweb.models.userportal.AsyncQuery ( new org.ovirt.engine.ui.frontend.AsyncCallback < java.util.List < org.ovirt.engine.core.common.businessentities.VmTemplate > > ( ) { @ java.lang.Override public void onSuccess ( java.util.List < org.ovirt.engine.core.common.businessentities.VmTemplate > vmTemplates ) { prefetchIcons ( vmTemplates ) ; } } ) , getIsQueryFirstTime ( ) ) ; }
Source:
private static void mapPrimaryAgent ( org.ovirt.engine.api.model.PowerManagement pm , org.ovirt.engine.api.model.Agent agentApi , org.ovirt.engine.core.common.businessentities.FenceAgent agentEngine ) { org.ovirt.engine.api.restapi.types.DeprecatedPowerManagementMapper.setManagementIp ( agentApi , agentEngine , pm ) ; org.ovirt.engine.api.restapi.types.DeprecatedPowerManagementMapper.setManagementType ( agentApi , agentEngine , pm ) ; org.ovirt.engine.api.restapi.types.DeprecatedPowerManagementMapper.setManagementUser ( agentApi , agentEngine , pm ) ; org.ovirt.engine.api.restapi.types.DeprecatedPowerManagementMapper.setManagementPassword ( agentApi , agentEngine , pm ) ; org.ovirt.engine.api.restapi.types.DeprecatedPowerManagementMapper.setManagementOptions ( agentApi , agentEngine , pm ) ; agentEngine.setOrder ( agentApi.getOrder ( ) ) ; agentEngine.setPort ( agentApi.getPort ( ) ) ; }

Target:
private static void mapPrimaryAgent ( org.ovirt.engine.api.model.PowerManagement pm , org.ovirt.engine.api.model.Agent agentApi , org.ovirt.engine.core.common.businessentities.pm.FenceAgent agentEngine ) { org.ovirt.engine.api.restapi.types.DeprecatedPowerManagementMapper.setManagementIp ( agentApi , agentEngine , pm ) ; org.ovirt.engine.api.restapi.types.DeprecatedPowerManagementMapper.setManagementType ( agentApi , agentEngine , pm ) ; org.ovirt.engine.api.restapi.types.DeprecatedPowerManagementMapper.setManagementUser ( agentApi , agentEngine , pm ) ; org.ovirt.engine.api.restapi.types.DeprecatedPowerManagementMapper.setManagementPassword ( agentApi , agentEngine , pm ) ; org.ovirt.engine.api.restapi.types.DeprecatedPowerManagementMapper.setManagementOptions ( agentApi , agentEngine , pm ) ; agentEngine.setOrder ( agentApi.getOrder ( ) ) ; agentEngine.setPort ( agentApi.getPort ( ) ) ; }
Source:
protected java.lang.String getPredefinedVMProperties ( org.ovirt.engine.core.compat.Version version ) { return "sap_agent=^(true|false)$;sndbuf=^[0-9]+$;vhost=^(([a-zA-Z0-9_]*):(true|false))(,(([a-zA-Z0-9_]*):(true|false)))*$;viodiskcache=^(none|writeback|writethrough)$" ; }

Target:
public void testNoDiskBootFromIsoDomain ( ) { org.ovirt.engine.core.bll.IsoDomainListSyncronizer mock = mockIsoDomainListSyncronizer ( ) ; org.mockito.Mockito.doReturn ( new org.ovirt.engine.core.compat.Guid ( ) ) . when ( mock ) . findActiveISODomain ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ; org.ovirt.engine.core.bll.validator.RunVmValidatorTest.validateResult ( runVmValidator.validateBootSequence ( new org.ovirt.engine.core.common.businessentities.VM ( ) , BootSequence.CD , new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Disk > ( ) ) , true , null ) ; }