auphong2707/dl4se-code-review-dataset huggingface dataset:
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 RunMultipleAction ( final org.ovirt.engine.core.common.action.VdcActionType actionType , final java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > parameters , final boolean isRunOnlyIfAllCanDoPass , final org.ovirt.engine.ui.uicompat.IFrontendMultipleActionAsyncCallback callback , final java.lang.Object state ) { org.ovirt.engine.ui.frontend.gwtservices.GenericApiGWTServiceAsync service = GenericApiGWTServiceAsync.Util.getInstance ( ) ; org.ovirt.engine.ui.frontend.Frontend.RunMultipleAction ( actionType , parameters , isRunOnlyIfAllCanDoPass , callback , state , service ) ; }
Source:
public int compare ( T o1 , T o2 ) { boolean value1 = ( ( getValue ( o1 ) ) == null ) ? false : getValue ( o1 ) ; boolean value2 = ( ( getValue ( o2 ) ) == null ) ? false : getValue ( o2 ) ; if ( value1 == value2 ) { return 0 ; } else { return value1 ? 1 : - 1 ; } }

Target:
public void makeSortable ( ) { makeSortable ( java.util.Comparator.comparing ( ( t ) -> ! ( ( org.ovirt.engine.ui.common.widget.table.column.AbstractCheckboxColumn.getValue ( t ) ) == null ? false : org.ovirt.engine.ui.common.widget.table.column.AbstractCheckboxColumn.getValue ( t ) ) ) ) ; }
Source:
public boolean equals ( org.ovirt.engine.ui.uicompat.Event other ) { if ( other == null ) { return false ; } return ( org.ovirt.engine.core.compat.StringHelper.stringsEqual ( getName ( ) , other.getName ( ) ) ) && ( ( getOwnerType ( ) ) == ( other.getOwnerType ( ) ) ) ; }

Target:
public int hashCode ( ) { final int prime = 31 ; int result = 1 ; result = ( prime * result ) + ( ( privateName ) == null ? 0 : privateName.hashCode ( ) ) ; result = ( prime * result ) + ( ( privateOwnerType ) == null ? 0 : privateOwnerType.hashCode ( ) ) ; return result ; }
Source:
public void testUpdateCantDo ( ) throws java.lang.Exception { setUpGetEntityWithNoCertificateInfoExpectations ( 1 ) ; resource.setUriInfo ( setUpActionExpectations ( VdcActionType.UpdateVds , org.ovirt.engine.core.common.action.UpdateVdsActionParameters.class , new java.lang.String [ ] { "RootPassword" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendHostsResourceTest.ROOT_PASSWORD } , false , true , "ACTION_TYPE_FAILED_IMPORT_DISKS_ALREADY_EXIST" ) ) ; try { resource.update ( org.ovirt.engine.api.restapi.resource.BackendHostsResourceTest.getModel ( 0 ) ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , "ACTION_TYPE_FAILED_IMPORT_DISKS_ALREADY_EXIST" , 409 ) ; } }

Target:
public void testUpdateCantDo ( ) throws java.lang.Exception { setUpGetEntityWithNoCertificateInfoExpectations ( 1 ) ; resource.setUriInfo ( setUpActionExpectations ( VdcActionType.UpdateVds , org.ovirt.engine.core.common.action.hostdeploy.UpdateVdsActionParameters.class , new java.lang.String [ ] { "RootPassword" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendHostsResourceTest.ROOT_PASSWORD } , false , true , "ACTION_TYPE_FAILED_IMPORT_DISKS_ALREADY_EXIST" ) ) ; try { resource.update ( org.ovirt.engine.api.restapi.resource.BackendHostsResourceTest.getModel ( 0 ) ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , "ACTION_TYPE_FAILED_IMPORT_DISKS_ALREADY_EXIST" , 409 ) ; } }
Source:
public void UpdateDynamicData ( org.ovirt.engine.core.common.businessentities.VdsDynamic dynamicData ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVdsDynamicDao ( ) . update ( dynamicData ) ; }

Target:
public void UpdateDynamicData ( org.ovirt.engine.core.common.businessentities.VdsDynamic dynamicData ) { if ( ( ( ( dynamicData != null ) && ( ( _vds ) != null ) ) && ( ( _vds.getDynamicData ( ) ) != null ) ) && ( ! ( dynamicData.equals ( _vds.getDynamicData ( ) ) ) ) ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVdsDynamicDao ( ) . update ( dynamicData ) ; } else { org.ovirt.engine.core.vdsbroker.VdsManager.log.debug ( "Ignoring unneeded update of VDSDynamic" ) ; } }
Source:
public static void getRoleActionGroupsByRoleId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid roleId ) { 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.ActionGroup > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ActionGroup > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetRoleActionGroupsByRoleId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( roleId ) , aQuery ) ; }

Target:
public void getGlusterSwiftServices ( 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.GlusterServerService > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterServerServicesByServerId , new org.ovirt.engine.core.common.queries.gluster.GlusterServiceQueryParameters ( serverId , org.ovirt.engine.core.common.businessentities.gluster.ServiceType.GLUSTER_SWIFT ) , aQuery ) ; }
Source:
public static void getGlusterHookContent ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hookId , org.ovirt.engine.core.compat.Guid serverId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : "" ; } } ; org.ovirt.engine.core.common.queries.gluster.GlusterHookContentQueryParameters parameters = new org.ovirt.engine.core.common.queries.gluster.GlusterHookContentQueryParameters ( hookId ) ; parameters.setGlusterServerId ( serverId ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetGlusterHookContent , parameters , aQuery ) ; }

Target:
public static void 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.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterHookById , new org.ovirt.engine.core.common.queries.gluster.GlusterHookQueryParameters ( hookId , includeServerHooks ) , aQuery ) ; }
Source:
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 ) ; } }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc glusterVolumeGeoRepSessionDelete ( java.lang.String volumeName , java.lang.String remoteHost , java.lang.String remoteVolumeName , java.lang.String userName ) { try { return new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( vdsServer.glusterVolumeGeoRepSessionDelete ( volumeName , remoteHost , remoteVolumeName , userName ) ) ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
public static void getClusterById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVdsGroupById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
public static void getVmById ( 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.GetVmByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( vmId ) , aQuery ) ; }
Source:
public java.util.ArrayList < org.ovirt.engine.core.common.scheduling.PolicyUnit > getFilterPolicyUnits ( ) { java.util.ArrayList < org.ovirt.engine.core.common.scheduling.PolicyUnit > list = new java.util.ArrayList < org.ovirt.engine.core.common.scheduling.PolicyUnit > ( ) ; for ( org.ovirt.engine.core.common.scheduling.PolicyUnit policyUnit : getPolicyUnits ( ) ) { if ( policyUnit.isFilterImplemeted ( ) ) { list.add ( policyUnit ) ; } } return list ; }

Target:
public java.util.ArrayList < org.ovirt.engine.core.common.scheduling.PolicyUnit > getFilterPolicyUnits ( ) { java.util.ArrayList < org.ovirt.engine.core.common.scheduling.PolicyUnit > list = new java.util.ArrayList < org.ovirt.engine.core.common.scheduling.PolicyUnit > ( ) ; for ( org.ovirt.engine.core.common.scheduling.PolicyUnit policyUnit : getPolicyUnits ( ) ) { if ( ( policyUnit.getPolicyUnitType ( ) ) == ( org.ovirt.engine.core.common.scheduling.PolicyUnitType.Filter ) ) { list.add ( policyUnit ) ; } } return list ; }
Source:
protected org.ovirt.engine.api.model.Vm doPopulate ( org.ovirt.engine.api.model.Vm model , org.ovirt.engine.core.common.businessentities.VM entity ) { parent.setConsoleDevice ( model ) ; parent.setVirtioScsiController ( model ) ; parent.setSoundcard ( model ) ; parent.setVmOvfConfiguration ( model , entity ) ; parent.setRngDevice ( model ) ; return model ; }

Target:
protected org.ovirt.engine.api.model.Vm doPopulate ( org.ovirt.engine.api.model.Vm model , org.ovirt.engine.core.common.businessentities.VM entity ) { org.ovirt.engine.api.restapi.resource.BackendVmDeviceHelper.setConsoleDevice ( this , model ) ; org.ovirt.engine.api.restapi.resource.BackendVmDeviceHelper.setVirtioScsiController ( this , model ) ; org.ovirt.engine.api.restapi.resource.BackendVmDeviceHelper.setSoundcard ( this , model ) ; org.ovirt.engine.api.restapi.resource.BackendVmDeviceHelper.setRngDevice ( this , model ) ; parent.setVmOvfConfiguration ( model , entity ) ; return model ; }
Source:
public void getAllDataCenterNetworks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId ) { 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.core.common.queries.IdQueryParameters params = new org.ovirt.engine.core.common.queries.IdQueryParameters ( storagePoolId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetNetworksByDataCenterId , params , aQuery ) ; }

Target:
public void getAllDataCenterNetworks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.ListAsyncConverter ( ) ; org.ovirt.engine.core.common.queries.IdQueryParameters params = new org.ovirt.engine.core.common.queries.IdQueryParameters ( storagePoolId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetNetworksByDataCenterId , params , aQuery ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object result ) { org.ovirt.engine.ui.uicommonweb.models.vms.RunOnceModel runOnceModel = new org.ovirt.engine.ui.uicommonweb.models.vms.UserPortalRunOnceModel ( ( ( org.ovirt.engine.core.common.businessentities.VM ) ( result ) ) , getCustomPropertiesKeysList ( ) . get ( ( ( org.ovirt.engine.core.common.businessentities.VM ) ( result ) ) . getVdsGroupCompatibilityVersion ( ) ) , this ) ; setWindow ( runOnceModel ) ; runOnceModel.init ( ) ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object result ) { vmInitLoaded ( ( ( org.ovirt.engine.core.common.businessentities.VM ) ( result ) ) ) ; }
Source:
private java.util.List < org.ovirt.engine.api.model.CustomProperty > getVmHooksEnvs ( org.ovirt.engine.api.model.Version version ) { java.util.List < org.ovirt.engine.api.model.CustomProperty > ret = new java.util.ArrayList < > ( ) ; ret.addAll ( org.ovirt.engine.api.restapi.utils.CustomPropertiesParser.parse ( getConfigurationValue ( java.lang.String.class , ConfigurationValues.PredefinedVMProperties , version ) , true ) ) ; ret.addAll ( org.ovirt.engine.api.restapi.utils.CustomPropertiesParser.parse ( getConfigurationValue ( java.lang.String.class , ConfigurationValues.UserDefinedVMProperties , version ) , true ) ) ; return ret ; }

Target:
private java.util.List < org.ovirt.engine.api.model.CustomProperty > getVmHooksEnvs ( org.ovirt.engine.api.model.Version version ) { java.util.List < org.ovirt.engine.api.model.CustomProperty > ret = new java.util.ArrayList < > ( ) ; java.lang.String predefinedProperties = getConfigurationValue ( ConfigurationValues.PredefinedVMProperties , version ) ; if ( predefinedProperties != null ) { ret.addAll ( org.ovirt.engine.api.restapi.utils.CustomPropertiesParser.parse ( predefinedProperties , true ) ) ; } java.lang.String userDefinedProperties = getConfigurationValue ( ConfigurationValues.UserDefinedVMProperties , version ) ; if ( userDefinedProperties != null ) { ret.addAll ( org.ovirt.engine.api.restapi.utils.CustomPropertiesParser.parse ( userDefinedProperties , true ) ) ; } return ret ; }
Source:
public static void getVmSnapshotList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllVmSnapshotsByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
public static 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 ) ; }
Source:
protected void doTestBadRemove ( boolean valid , boolean success , java.lang.String detail ) throws java.lang.Exception { setUpGetEntityExpectations ( 1 ) ; setUriInfo ( setUpActionExpectations ( ActionType.RemoveDisk , org.ovirt.engine.core.common.action.RemoveDiskParameters.class , new java.lang.String [ ] { "DiskId" } , new java.lang.Object [ ] { GUIDS [ 1 ] } , 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 ) ; setUriInfo ( setUpActionExpectations ( ActionType.RemoveDisk , org.ovirt.engine.core.common.action.RemoveDiskParameters.class , new java.lang.String [ ] { "DiskId" } , new java.lang.Object [ ] { GUIDS [ 1 ] } , valid , success ) ) ; try { resource.remove ( ) ; org.junit.Assert.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }
Source:
private void updateHeOvf ( ) { if ( ( org.ovirt.engine.core.utils.transaction.TransactionSupport.current ( ) ) == null ) { ovfDataUpdater.triggerNow ( ) ; return ; } org.ovirt.engine.core.bll.VmCommand.registerRollbackHandler ( new org.ovirt.engine.core.utils.transaction.TransactionCompletionListener ( ) { @ java.lang.Override public void onSuccess ( ) { ovfDataUpdater.triggerNow ( ) ; } @ java.lang.Override public void onRollback ( ) { } } ) ; }

Target:
private void updateHeOvf ( ) { if ( ( org.ovirt.engine.core.utils.transaction.TransactionSupport.current ( ) ) == null ) { ovfDataUpdater.triggerNow ( ) ; return ; } org.ovirt.engine.core.bll.VmCommand.registerRollbackHandler ( ( ( org.ovirt.engine.core.utils.transaction.TransactionSuccessListener ) ( ( ) -> ovfDataUpdater.triggerNow ( ) ) ) ) ; }
Source:
public void testTypedBoxedBoolean ( ) throws java.lang.Exception { java.io.File file = writeConf ( "a=true" , "b=false" ) ; org.ovirt.engine.core.extensions.mgr.Configuration config = org.ovirt.engine.core.extensions.mgr.Configuration.loadFile ( file ) ; junit.framework.Assert.assertNotNull ( config ) ; org.ovirt.engine.core.extensions.mgr.ConfigurationTest.TestTypedBoxedBoolean view = config.getView ( org.ovirt.engine.core.extensions.mgr.ConfigurationTest.TestTypedBoxedBoolean.class ) ; junit.framework.Assert.assertNotNull ( view ) ; junit.framework.Assert.assertEquals ( java.lang.Boolean.TRUE , view.isA ( ) ) ; junit.framework.Assert.assertEquals ( java.lang.Boolean.FALSE , view.isB ( ) ) ; }

Target:
public void testTypedBoxedBoolean ( ) throws java.lang.Exception { java.io.File file = writeConf ( "a=true" , "b=false" ) ; org.ovirt.engine.core.extensions.mgr.Configuration config = org.ovirt.engine.core.extensions.mgr.Configuration.loadFile ( file ) ; org.junit.Assert.assertNotNull ( config ) ; org.ovirt.engine.core.extensions.mgr.ConfigurationTest.TestTypedBoxedBoolean view = config.getView ( org.ovirt.engine.core.extensions.mgr.ConfigurationTest.TestTypedBoxedBoolean.class ) ; org.junit.Assert.assertNotNull ( view ) ; org.junit.Assert.assertEquals ( java.lang.Boolean.TRUE , view.isA ( ) ) ; org.junit.Assert.assertEquals ( java.lang.Boolean.FALSE , view.isB ( ) ) ; }
Source:
public org.ovirt.engine.ui.common.presenter.AbstractModelBoundPopupPresenterWidget < ? extends org.ovirt.engine.ui.uicommonweb.models.Model , ? > getModelPopup ( org.ovirt.engine.ui.uicommonweb.models.gluster.GlusterVolumeSnapshotListModel source , org.ovirt.engine.ui.uicommonweb.UICommand lastExecutedCommand , org.ovirt.engine.ui.uicommonweb.models.Model windowModel ) { return super . getModelPopup ( source , lastExecutedCommand , windowModel ) ; }

Target:
public org.ovirt.engine.ui.common.presenter.AbstractModelBoundPopupPresenterWidget < ? extends org.ovirt.engine.ui.uicommonweb.models.Model , ? > getModelPopup ( org.ovirt.engine.ui.uicommonweb.models.gluster.GlusterVolumeSnapshotListModel source , org.ovirt.engine.ui.uicommonweb.UICommand lastExecutedCommand , org.ovirt.engine.ui.uicommonweb.models.Model windowModel ) { if ( lastExecutedCommand == ( getModel ( ) . getCreateSnapshotCommand ( ) ) ) { return snapshotPopupProvider.get ( ) ; } else if ( lastExecutedCommand == ( getModel ( ) . getEditSnapshotScheduleCommand ( ) ) ) { return snapshotPopupProvider.get ( ) ; } return super . getModelPopup ( source , lastExecutedCommand , windowModel ) ; }
Source:
private boolean validateBondSlavesCount ( ) { boolean returnValue = true ; for ( java.util.Map.Entry < java.lang.String , java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > > bondEntry : bonds.entrySet ( ) ) { if ( ( bondEntry.getValue ( ) . size ( ) ) < 2 ) { returnValue = false ; addViolation ( VdcBllMessages.NETWORK_BONDS_INVALID_SLAVE_COUNT , bondEntry.getKey ( ) ) ; } } return returnValue ; }

Target:
private boolean validateBondSlavesCount ( ) { boolean returnValue = true ; for ( java.util.Map.Entry < java.lang.String , java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > > bondEntry : bonds.entrySet ( ) ) { if ( ( bondEntry.getValue ( ) . size ( ) ) < 2 ) { returnValue = false ; addViolation ( EngineMessage.NETWORK_BONDS_INVALID_SLAVE_COUNT , bondEntry.getKey ( ) ) ; } } return returnValue ; }
Source:
public static java.util.Map < org.ovirt.engine.core.compat.Guid , java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > > getImagesLeaf ( java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > images ) { java.util.Map < org.ovirt.engine.core.compat.Guid , java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > > retVal = new java.util.HashMap < org.ovirt.engine.core.compat.Guid , java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > > ( ) ; for ( org.ovirt.engine.core.common.businessentities.DiskImage image : images ) { org.ovirt.engine.core.utils.MultiValueMapUtils.addToMap ( image.getId ( ) , image , retVal ) ; } for ( java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > list : retVal.values ( ) ) { org.ovirt.engine.core.bll.ImportVmCommand.sortImageList ( list ) ; } return retVal ; }

Target:
public static java.util.Map < org.ovirt.engine.core.compat.Guid , java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > > getImagesLeaf ( java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > images ) { java.util.Map < org.ovirt.engine.core.compat.Guid , java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > > retVal = new java.util.HashMap < org.ovirt.engine.core.compat.Guid , java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > > ( ) ; for ( org.ovirt.engine.core.common.businessentities.DiskImage image : images ) { org.ovirt.engine.core.utils.collections.MultiValueMapUtils.addToMap ( image.getId ( ) , image , retVal ) ; } for ( java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > list : retVal.values ( ) ) { org.ovirt.engine.core.bll.ImportVmCommand.sortImageList ( list ) ; } return retVal ; }
Source:
private boolean Register ( org.ovirt.engine.core.common.businessentities.VDS vds , org.ovirt.engine.core.compat.Guid vdsGroupId , boolean IsPending ) { boolean returnValue = true ; log.debug ( "RegisterVdsQuery::Register - Entering" ) ; if ( vds == null ) { returnValue = registerNewHost ( vdsGroupId , IsPending ) ; } else { returnValue = updateExistingHost ( vds , IsPending ) ; } log.debug ( "RegisterVdsQuery::Register - Leaving with value {}" , returnValue ) ; return returnValue ; }

Target:
private boolean register ( org.ovirt.engine.core.common.businessentities.VDS vds , org.ovirt.engine.core.compat.Guid vdsGroupId , boolean IsPending ) { boolean returnValue = true ; log.debug ( "RegisterVdsQuery::register - Entering" ) ; if ( vds == null ) { returnValue = registerNewHost ( vdsGroupId , IsPending ) ; } else { returnValue = updateExistingHost ( vds , IsPending ) ; } log.debug ( "RegisterVdsQuery::register - Leaving with value {}" , returnValue ) ; return returnValue ; }
Source:
public void testRemoveWithoutParam ( ) { container.SetData ( org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_SESSION_ID , org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_KEY , org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_VALUE ) ; container.removeSession ( ) ; org.junit.Assert.assertEquals ( "Get should return the value since the session was not removed" , org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_VALUE , container.GetData ( org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_SESSION_ID , org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_KEY , false ) ) ; org.ovirt.engine.core.utils.ThreadLocalParamsContainer.setHttpSessionId ( org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_SESSION_ID ) ; container.removeSession ( ) ; org.junit.Assert.assertNull ( "Get should return the value since the session was removed" , container.GetData ( org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_SESSION_ID , org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_KEY , false ) ) ; }

Target:
public void testRemoveWithoutParam ( ) { container.setData ( org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_SESSION_ID , org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_KEY , org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_VALUE ) ; container.removeSession ( ) ; org.junit.Assert.assertEquals ( "Get should return the value since the session was not removed" , org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_VALUE , container.getData ( org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_SESSION_ID , org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_KEY , false ) ) ; org.ovirt.engine.core.utils.ThreadLocalParamsContainer.setHttpSessionId ( org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_SESSION_ID ) ; container.removeSession ( ) ; org.junit.Assert.assertNull ( "Get should return the value since the session was removed" , container.getData ( org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_SESSION_ID , org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_KEY , false ) ) ; }
Source:
public void testUpdateNotFound ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpEntityQueryExpectations ( VdcQueryType.GetNetworksByDataCenterId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendDataCenterNetworkResourceTest.dataCenterId } , new java.util.ArrayList < org.ovirt.engine.api.model.Network > ( ) ) ; try { resource.update ( org.ovirt.engine.api.restapi.resource.AbstractBackendNetworksResourceTest.getModel ( 0 ) ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }

Target:
public void testUpdateNotFound ( ) throws java.lang.Exception { setUpEntityQueryExpectations ( VdcQueryType.GetNetworkById , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendDataCenterNetworkResourceTest.NETWORK_ID } , null , null ) ; try { resource.update ( org.ovirt.engine.api.restapi.resource.BackendDataCenterNetworkResourceTest.getModel ( 0 ) ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }
Source:
public java.lang.String render ( T size ) { if ( size != null ) { org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.common.utils.SizeConverter.SizeUnit , java.lang.Double > sizeWithUnits = org.ovirt.engine.core.common.utils.SizeConverter.autoConvert ( size.longValue ( ) , SizeUnit.BYTES ) ; return ( ( formatSize ( sizeWithUnits.getSecond ( ) ) ) + " " ) + ( sizeWithUnits.getFirst ( ) ) ; } else { return constants.notAvailableLabel ( ) ; } }

Target:
public java.lang.String render ( T size ) { if ( size != null ) { org.ovirt.engine.core.common.utils.Pair < org.ovirt.engine.core.common.utils.SizeConverter.SizeUnit , java.lang.Double > sizeWithUnits = org.ovirt.engine.core.common.utils.SizeConverter.autoConvert ( size.longValue ( ) , SizeUnit.BYTES ) ; return org.ovirt.engine.ui.webadmin.widget.renderer.VolumeCapacityRenderer.messages.sizeUnitString ( formatSize ( sizeWithUnits.getSecond ( ) ) , sizeWithUnits.getFirst ( ) ) ; } else { return constants.notAvailableLabel ( ) ; } }
Source:
public static void getHostPublicKey ( 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.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetServerSSHPublicKey , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }

Target:
public static void getDataCenterById ( 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 ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetStoragePoolById , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) , aQuery ) ; }
Source:
protected boolean validateQuota ( ) { getParameters ( ) . setQuotaId ( org.ovirt.engine.core.bll.QuotaHelper.getInstance ( ) . getQuotaIdToConsume ( getVm ( ) . getStaticData ( ) . getQuotaId ( ) , getStoragePool ( ) ) ) ; for ( org.ovirt.engine.core.common.businessentities.Disk dit : getVm ( ) . getDiskMap ( ) . values ( ) ) { ( ( org.ovirt.engine.core.common.businessentities.DiskImage ) ( dit ) ) . setQuotaId ( org.ovirt.engine.core.bll.QuotaHelper.getInstance ( ) . getQuotaIdToConsume ( getVm ( ) . getStaticData ( ) . getQuotaId ( ) , getStoragePool ( ) ) ) ; } return true ; }

Target:
private void AddVmDynamic ( ) { org.ovirt.engine.core.common.businessentities.VmDynamic tempVar = new org.ovirt.engine.core.common.businessentities.VmDynamic ( ) ; tempVar.setId ( getVmId ( ) ) ; tempVar.setstatus ( VMStatus.ImageLocked ) ; tempVar.setvm_host ( "" ) ; tempVar.setvm_ip ( "" ) ; tempVar.setapp_list ( getParameters ( ) . getVm ( ) . getDynamicData ( ) . getapp_list ( ) ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVmDynamicDAO ( ) . save ( tempVar ) ; getCompensationContext ( ) . snapshotNewEntity ( tempVar ) ; }
Source:
public boolean evaluate ( java.lang.Object diskImage ) { return ( ( org.ovirt.engine.core.common.businessentities.storage.DiskImage ) ( diskImage ) ) . getActive ( ) ; }

Target:
public void testNoActiveImagesReturned ( ) { org.ovirt.engine.core.common.queries.IdQueryParameters params = getQueryParameters ( ) ; org.mockito.Mockito.when ( params.getId ( ) ) . thenReturn ( storageDoaminId ) ; org.ovirt.engine.core.bll.snapshots.GetAllDiskSnapshotsByStorageDomainIdQuery < org.ovirt.engine.core.common.queries.IdQueryParameters > query = getQuery ( ) ; query.executeQueryCommand ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > diskImages = query.getQueryReturnValue ( ) . getReturnValue ( ) ; org.junit.Assert.assertTrue ( "Active images shouldn't be returned" , diskImages.stream ( ) . noneMatch ( DiskImage :: getActive ) ) ; }
Source:
public void testValidModifiedBondsFailsWhenReferencingExistingNonBondInterface ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.network.Bond bond = createBond ( ) ; doTestValidModifiedBonds ( bond , ValidationResult.VALID , new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.NETWORK_INTERFACE_IS_NOT_BOND ) , new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.NETWORK_INTERFACE_IS_NOT_BOND ) , ValidationResult.VALID ) ; }

Target:
public void testValidModifiedBondsFailsWhenSlavesValidationFails ( ) throws java.lang.Exception { org.ovirt.engine.core.bll.ValidationResult slavesValidationResult = new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.NETWORK_INTERFACE_ATTACHED_TO_NETWORK_CANNOT_BE_SLAVE , org.ovirt.engine.core.utils.ReplacementUtils.createSetVariableString ( HostSetupNetworksValidator.NETWORK_INTERFACE_ATTACHED_TO_NETWORK_CANNOT_BE_SLAVE_ENTITY , "slaveA" ) , org.ovirt.engine.core.utils.ReplacementUtils.createSetVariableString ( HostSetupNetworksValidator.VAR_NETWORK_NAME , "networkName" ) ) ; org.ovirt.engine.core.common.businessentities.network.Bond bond = createBond ( ) ; bond.setSlaves ( java.util.Arrays.asList ( "slaveA" , "slaveB" ) ) ; doTestValidModifiedBonds ( bond , ValidationResult.VALID , ValidationResult.VALID , slavesValidationResult , slavesValidationResult ) ; }
Source:
private void updateCommand ( final org.ovirt.engine.core.bll.CommandBase < ? > command , final org.ovirt.engine.core.common.action.VdcReturnValueBase result ) { org.ovirt.engine.core.common.businessentities.CommandEntity cmdEntity = commandsRepository.getCommandEntity ( command.getCommandId ( ) ) ; cmdEntity.setReturnValue ( result ) ; if ( ! ( result.isValid ( ) ) ) { cmdEntity.setCommandStatus ( CommandStatus.FAILED ) ; } commandsRepository.persistCommand ( cmdEntity ) ; }

Target:
private void updateCommandResult ( final org.ovirt.engine.core.compat.Guid commandId , final org.ovirt.engine.core.common.action.VdcReturnValueBase result ) { org.ovirt.engine.core.common.businessentities.CommandEntity cmdEntity = commandsRepository.getCommandEntity ( commandId ) ; cmdEntity.setReturnValue ( result ) ; if ( ! ( result.isValid ( ) ) ) { cmdEntity.setCommandStatus ( CommandStatus.FAILED ) ; } commandsRepository.persistCommand ( cmdEntity ) ; }
Source:
protected void executeCommand ( ) { org.ovirt.engine.core.common.businessentities.VmStatic vmStatic = org.ovirt.engine.core.bll.AddVmAndAttachToPoolCommand.getParameters ( ) . getVmStaticData ( ) ; org.ovirt.engine.core.common.action.VdcReturnValueBase returnValueFromAddVm ; if ( VmTemplateHandler.BLANK_VM_TEMPLATE_ID.equals ( vmStatic.getVmtGuid ( ) ) ) { returnValueFromAddVm = addVmFromScratch ( vmStatic ) ; } else { returnValueFromAddVm = addVm ( vmStatic ) ; } if ( returnValueFromAddVm.getSucceeded ( ) ) { org.ovirt.engine.core.bll.AddVmAndAttachToPoolCommand.getTaskIdList ( ) . addAll ( returnValueFromAddVm.getInternalVdsmTaskIdList ( ) ) ; addVmToPool ( vmStatic ) ; } }

Target:
protected void executeCommand ( ) { org.ovirt.engine.core.common.businessentities.VmStatic vmStatic = org.ovirt.engine.core.bll.AddVmAndAttachToPoolCommand.getParameters ( ) . getVmStaticData ( ) ; org.ovirt.engine.core.common.action.VdcActionType action = ( VmTemplateHandler.BLANK_VM_TEMPLATE_ID.equals ( vmStatic.getVmtGuid ( ) ) ) ? org.ovirt.engine.core.common.action.VdcActionType.AddVmFromScratch : org.ovirt.engine.core.common.action.VdcActionType.AddVm ; org.ovirt.engine.core.common.action.VdcReturnValueBase returnValueFromAddVm = runInternalActionWithTasksContext ( action , buildAddVmParameters ( action ) ) ; if ( returnValueFromAddVm.getSucceeded ( ) ) { org.ovirt.engine.core.bll.AddVmAndAttachToPoolCommand.getTaskIdList ( ) . addAll ( returnValueFromAddVm.getInternalVdsmTaskIdList ( ) ) ; addVmToPool ( vmStatic ) ; } }
Source:
public org.ovirt.engine.core.common.businessentities.VmPoolMap mapRow ( java.sql.ResultSet rs , int rowNum ) throws java.sql.SQLException { org.ovirt.engine.core.common.businessentities.VmPoolMap entity = new org.ovirt.engine.core.common.businessentities.VmPoolMap ( ) ; entity.setvm_guid ( org.ovirt.engine.core.compat.Guid.createGuidFromStringDefaultEmpty ( rs.getString ( "vm_guid" ) ) ) ; entity.setvm_pool_id ( org.ovirt.engine.core.compat.Guid.createGuidFromStringDefaultEmpty ( rs.getString ( "vm_pool_id" ) ) ) ; return entity ; }

Target:
public java.util.List < org.ovirt.engine.core.common.businessentities.VmPoolMap > getVmPoolsMapByVmPoolId ( org.ovirt.engine.core.compat.Guid vmPoolId ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "vm_pool_id" , vmPoolId ) ; return getCallsHandler ( ) . executeReadList ( "GetVm_pool_mapByvm_pool_id" , org.ovirt.engine.core.dao.VmPoolDAODbFacadeImpl.VmPoolMapRowMapper.instance , parameterSource ) ; }
Source:
private org.ovirt.engine.core.bll.ValidationResult networkNotUsedByHost ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VDS > hostsWithNetwork = org.ovirt.engine.core.bll.network.dc.UpdateNetworkCommand.getVdsDAO ( ) . getAllForNetwork ( getOldNetwork ( ) . getId ( ) ) ; if ( hostsWithNetwork.isEmpty ( ) ) { return org.ovirt.engine.core.bll.ValidationResult.VALID ; } return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.dal.VdcBllMessages.ACTION_TYPE_FAILED_NETWORK_IN_USE_BY_HOSTS , org.ovirt.engine.core.utils.ReplacementUtils.replaceWithNameable ( "HOSTS_USING_NETWORK" , hostsWithNetwork ) ) ; }

Target:
private org.ovirt.engine.core.bll.ValidationResult networkNotUsedByHost ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VDS > hostsWithNetwork = org.ovirt.engine.core.bll.network.dc.UpdateNetworkCommand.getVdsDAO ( ) . getAllForNetwork ( getOldNetwork ( ) . getId ( ) ) ; if ( hostsWithNetwork.isEmpty ( ) ) { return org.ovirt.engine.core.bll.ValidationResult.VALID ; } java.util.Collection < java.lang.String > replacements = org.ovirt.engine.core.utils.ReplacementUtils.replaceWithNameable ( "ENTITIES_USING_NETWORK" , hostsWithNetwork ) ; replacements.add ( VdcBllMessages.VAR__ENTITIES__HOSTS.name ( ) ) ; return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.dal.VdcBllMessages.ACTION_TYPE_FAILED_NETWORK_IN_USE , replacements ) ; }
Source:
protected boolean commandSpecificCanDoAction ( ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage targetDisk = org.ovirt.engine.core.bll.storage.ovfstore.UploadStreamCommand.getDiskImage ( ) ; if ( ( targetDisk.getVolumeType ( ) ) != ( org.ovirt.engine.core.common.businessentities.storage.VolumeType.Preallocated ) ) { return failCanDoAction ( EngineMessage.ACTION_TYPE_FAILED_DISK_VOLUME_TYPE_UNSUPPORTED , java.lang.String.format ( "$volumeType %1$s" , targetDisk.getVolumeType ( ) . toString ( ) ) , java.lang.String.format ( "$supportedVolumeTypes %1$s" , VolumeType.Preallocated ) ) ; } return true ; }

Target:
protected boolean commandSpecificValidate ( ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage targetDisk = org.ovirt.engine.core.bll.storage.ovfstore.UploadStreamCommand.getDiskImage ( ) ; if ( ( targetDisk.getVolumeType ( ) ) != ( org.ovirt.engine.core.common.businessentities.storage.VolumeType.Preallocated ) ) { return failValidation ( EngineMessage.ACTION_TYPE_FAILED_DISK_VOLUME_TYPE_UNSUPPORTED , java.lang.String.format ( "$volumeType %1$s" , targetDisk.getVolumeType ( ) . toString ( ) ) , java.lang.String.format ( "$supportedVolumeTypes %1$s" , VolumeType.Preallocated ) ) ; } return true ; }
Source:
protected org.ovirt.engine.core.common.businessentities.StorageServerConnections createPosixConnection ( java.lang.String connection , org.ovirt.engine.core.common.businessentities.StorageType type , java.lang.String vfsType , java.lang.String mountOptions ) { org.ovirt.engine.core.compat.Guid id = getConnectionId ( ) ; org.ovirt.engine.core.common.businessentities.StorageServerConnections connectionDetails = populateBasicConnectionDetails ( id , connection , type ) ; connectionDetails.setVfsType ( vfsType ) ; connectionDetails.setMountOptions ( mountOptions ) ; return connectionDetails ; }

Target:
protected org.ovirt.engine.core.common.businessentities.StorageServerConnections createPosixConnection ( java.lang.String connection , org.ovirt.engine.core.common.businessentities.storage.StorageType type , java.lang.String vfsType , java.lang.String mountOptions ) { org.ovirt.engine.core.compat.Guid id = getConnectionId ( ) ; org.ovirt.engine.core.common.businessentities.StorageServerConnections connectionDetails = populateBasicConnectionDetails ( id , connection , type ) ; connectionDetails.setVfsType ( vfsType ) ; connectionDetails.setMountOptions ( mountOptions ) ; return connectionDetails ; }
Source:
public javax.ws.rs.core.Response add ( org.ovirt.engine.api.model.Permission permission ) { validateParameters ( permission , ( isPrincipalSubCollection ( ) ? new java.lang.String [ ] { "role.id" , "dataCenter|cluster|host|storageDomain|vm|vmpool|template.id" } : new java.lang.String [ ] { "role.id" , "user|group.id" } ) ) ; org.ovirt.engine.core.common.businessentities.permissions entity = map ( permission , getPermissionsTemplate ( permission ) ) ; return performCreate ( VdcActionType.AddPermission , getPrincipal ( entity , permission ) , new org.ovirt.engine.api.restapi.resource.QueryIdResolver < org.ovirt.engine.core.compat.Guid > ( org.ovirt.engine.core.common.queries.VdcQueryType.GetPermissionById , org.ovirt.engine.core.common.queries.IdQueryParameters.class ) ) ; }

Target:
public javax.ws.rs.core.Response add ( org.ovirt.engine.api.model.Permission permission ) { validateParameters ( permission , ( isPrincipalSubCollection ( ) ? new java.lang.String [ ] { "role.id" , "dataCenter|cluster|host|storageDomain|vm|vmpool|template.id" } : new java.lang.String [ ] { "role.id" , "user|group.id" } ) ) ; org.ovirt.engine.core.common.businessentities.Permissions entity = map ( permission , getPermissionsTemplate ( permission ) ) ; return performCreate ( VdcActionType.AddPermission , getPrincipal ( entity , permission ) , new org.ovirt.engine.api.restapi.resource.QueryIdResolver < org.ovirt.engine.core.compat.Guid > ( org.ovirt.engine.core.common.queries.VdcQueryType.GetPermissionById , org.ovirt.engine.core.common.queries.IdQueryParameters.class ) ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.ServerCpu getVdsGroupServerCpu ( org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterModel model , org.ovirt.engine.core.common.businessentities.VDSGroup vdsGroup ) { org.ovirt.engine.core.common.businessentities.ServerCpu retVal = null ; for ( org.ovirt.engine.core.common.businessentities.ServerCpu cpu : model.getCPU ( ) . getItems ( ) ) { if ( java.util.Objects.equals ( cpu.getCpuName ( ) , vdsGroup.getCpuName ( ) ) ) { retVal = cpu ; break ; } } return retVal ; }

Target:
private org.ovirt.engine.core.common.businessentities.ServerCpu getClusterServerCpu ( org.ovirt.engine.ui.uicommonweb.models.clusters.ClusterModel model , org.ovirt.engine.core.common.businessentities.Cluster cluster ) { org.ovirt.engine.core.common.businessentities.ServerCpu retVal = null ; for ( org.ovirt.engine.core.common.businessentities.ServerCpu cpu : model.getCPU ( ) . getItems ( ) ) { if ( java.util.Objects.equals ( cpu.getCpuName ( ) , cluster.getCpuName ( ) ) ) { retVal = cpu ; break ; } } return retVal ; }
Source:
protected void executeVdsBrokerCommand ( ) { _result = org.ovirt.engine.core.vdsbroker.vdsbroker.DiscoverSendTargetsVDSCommand.getBroker ( ) . discoverSendTargets ( org.ovirt.engine.core.vdsbroker.vdsbroker.ConnectStorageServerVDSCommand.CreateStructFromConnection ( org.ovirt.engine.core.vdsbroker.vdsbroker.DiscoverSendTargetsVDSCommand.getParameters ( ) . getConnection ( ) , null ) ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.DiscoverSendTargetsVDSCommand.proceedProxyReturnValue ( ) ; setReturnValue ( ( _result.isFullTargets ( ) ? parseFullTargets ( _result.getIqnList ( ) ) : parseTargets ( _result.getIqnList ( ) ) ) ) ; }

Target:
protected void executeVdsBrokerCommand ( ) { _result = org.ovirt.engine.core.vdsbroker.vdsbroker.DiscoverSendTargetsVDSCommand.getBroker ( ) . discoverSendTargets ( org.ovirt.engine.core.vdsbroker.vdsbroker.ConnectStorageServerVDSCommand.createStructFromConnection ( org.ovirt.engine.core.vdsbroker.vdsbroker.DiscoverSendTargetsVDSCommand.getParameters ( ) . getConnection ( ) , null ) ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.DiscoverSendTargetsVDSCommand.proceedProxyReturnValue ( ) ; setReturnValue ( ( _result.isFullTargets ( ) ? parseFullTargets ( _result.getIqnList ( ) ) : parseTargets ( _result.getIqnList ( ) ) ) ) ; }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < ? extends org.ovirt.engine.ui.uicompat.EventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { java.lang.Boolean entity = getOptimizeForSpeed ( ) . getEntity ( ) ; if ( entity ) { getGuarantyResources ( ) . setEntity ( true ) ; } getAllowOverbooking ( ) . setIsChangable ( ( ! entity ) ) ; }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < ? extends org.ovirt.engine.ui.uicompat.EventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { if ( ( ( getEnableTrustedService ( ) . getEntity ( ) ) != null ) && ( getEnableTrustedService ( ) . getEntity ( ) ) ) { getEnableGlusterService ( ) . setEntity ( false ) ; getEnableGlusterService ( ) . setIsChangeable ( false ) ; } else { getEnableGlusterService ( ) . setIsChangeable ( true ) ; } }
Source:
private void translateVolumeType ( org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity volumeEntity ) { org.ovirt.engine.ui.uicompat.EnumTranslator translator = org.ovirt.engine.ui.uicompat.EnumTranslator.getInstance ( ) ; if ( translator.containsKey ( volumeEntity.getVolumeType ( ) ) ) { getDetailModel ( ) . setVolumeTypeSilently ( translator.translate ( volumeEntity.getVolumeType ( ) ) ) ; } }

Target:
private void translateVolumeType ( org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity volumeEntity ) { org.ovirt.engine.ui.uicompat.EnumTranslator translator = org.ovirt.engine.ui.uicompat.EnumTranslator.getInstance ( ) ; if ( translator.containsKey ( volumeEntity.getVolumeType ( ) ) ) { java.lang.String volumeType = translator.translate ( volumeEntity.getVolumeType ( ) ) ; if ( volumeEntity.getIsArbiter ( ) ) { volumeType += ( " (" + ( org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getConstants ( ) . arbiter ( ) ) ) + ")" ; } getDetailModel ( ) . setVolumeTypeSilently ( volumeType ) ; } }