auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private void doTestBadUpdate ( boolean valid , boolean success , java.lang.String detail ) throws java.lang.Exception { setUpEntityQueryExpectations ( 1 ) ; setUriInfo ( setUpActionExpectations ( ActionType.UpdateNetwork , org.ovirt.engine.core.common.action.AddNetworkStoragePoolParameters.class , new java.lang.String [ ] { "StoragePoolId" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendDataCenterNetworkResourceTest.dataCenterId } , valid , success ) ) ; try { resource.update ( org.ovirt.engine.api.restapi.resource.AbstractBackendNetworksResourceTest.getModel ( 0 ) ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }

Target:
private void doTestBadUpdate ( boolean valid , boolean success , java.lang.String detail ) throws java.lang.Exception { setUpEntityQueryExpectations ( 1 ) ; setUriInfo ( setUpActionExpectations ( ActionType.UpdateNetwork , org.ovirt.engine.core.common.action.AddNetworkStoragePoolParameters.class , new java.lang.String [ ] { "StoragePoolId" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendDataCenterNetworkResourceTest.dataCenterId } , valid , success ) ) ; try { resource.update ( org.ovirt.engine.api.restapi.resource.AbstractBackendNetworksResourceTest.getModel ( 0 ) ) ; org.junit.Assert.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyFault ( wae , detail ) ; } }
Source:
public javax.ws.rs.core.Response add ( org.ovirt.engine.api.model.Network network ) { validateParameters ( network , getRequiredAddFields ( ) ) ; org.ovirt.engine.api.model.Network entity = map ( network ) ; org.ovirt.engine.core.common.action.AddNetworkStoragePoolParameters params = getAddParameters ( network , entity ) ; return performCreate ( addAction , params , new org.ovirt.engine.api.restapi.resource.DataCenterNetworkIdResolver ( network.getName ( ) , params.getStoragePoolId ( ) . toString ( ) ) ) ; }

Target:
public org.ovirt.engine.api.model.Networks list ( ) { java.util.List < org.ovirt.engine.api.model.Network > entities ; if ( isFiltered ( ) ) { org.ovirt.engine.core.common.queries.IdQueryParameters parameters = new org.ovirt.engine.core.common.queries.IdQueryParameters ( org.ovirt.engine.core.compat.Guid.Empty ) ; entities = getBackendCollection ( VdcQueryType.GetAllNetworks , parameters , SearchType.Network ) ; } else { entities = getBackendCollection ( SearchType.Network ) ; } org.ovirt.engine.api.model.Networks networks = mapCollection ( entities ) ; for ( org.ovirt.engine.api.model.Network network : networks.getNetworks ( ) ) { network.setDisplay ( null ) ; } return networks ; }
Source:
public void bothDiskImagesDontExist ( ) { org.mockito.Mockito.doReturn ( false ) . when ( baseDiskDao ) . exists ( disk1 ) ; org.mockito.Mockito.doReturn ( false ) . when ( baseDiskDao ) . exists ( disk2 ) ; org.junit.Assert.assertThat ( diskExistenceValidator.disksNotExist ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.ACTION_TYPE_FAILED_DISKS_NOT_EXIST , ( ( ( "$diskIds " + ( disk1.toString ( ) ) ) + ", " ) + ( disk2.toString ( ) ) ) ) ) ; }

Target:
public void bothDiskImagesDontExist ( ) { org.mockito.Mockito.doReturn ( false ) . when ( baseDiskDao ) . exists ( disk1 ) ; org.mockito.Mockito.doReturn ( false ) . when ( baseDiskDao ) . exists ( disk2 ) ; org.hamcrest.MatcherAssert.assertThat ( diskExistenceValidator.disksNotExist ( ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.ACTION_TYPE_FAILED_DISKS_NOT_EXIST , ( ( ( "$diskIds " + ( disk1.toString ( ) ) ) + ", " ) + ( disk2.toString ( ) ) ) ) ) ; }
Source:
public org.ovirt.optimizer.util.ConfigProvider load ( ) { try { config.load ( new java.io.FileReader ( configFile ) ) ; } catch ( java.io.IOException ex ) { org.ovirt.optimizer.util.ConfigProvider.log.error ( "Connection to oVirt REST server failed" , ex ) ; } return this ; }

Target:
public org.ovirt.optimizer.util.ConfigProvider load ( ) { java.io.FileReader reader = null ; try { reader = new java.io.FileReader ( configFile ) ; config.load ( reader ) ; } catch ( java.io.IOException ex ) { org.ovirt.optimizer.util.ConfigProvider.log.error ( "Connection to oVirt REST server failed" , ex ) ; } finally { try { if ( reader != null ) { reader.close ( ) ; } } catch ( java.io.IOException ex ) { org.ovirt.optimizer.util.ConfigProvider.log.error ( "The config file could not be closed" , ex ) ; } } return this ; }
Source:
protected void initFrontend ( ) { frontend.setEventsHandler ( frontendEventsHandler ) ; frontend.getFrontendFailureEvent ( ) . addListener ( frontendFailureEventListener ) ; frontend.getFrontendNotLoggedInEvent ( ) . addListener ( new org.ovirt.engine.ui.uicompat.IEventListener < org.ovirt.engine.ui.uicompat.EventArgs > ( ) { @ java.lang.Override 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 ) { user.logout ( ) ; } } ) ; frontend.setFilterQueries ( filterFrontendQueries ( ) ) ; }

Target:
public void onLoginSuccess ( ) { com.google.gwt.core.client.Scheduler.get ( ) . scheduleDeferred ( new com.google.gwt.core.client.Scheduler.ScheduledCommand ( ) { @ java.lang.Override public void execute ( ) { frontend.runQuery ( VdcQueryType.GetEngineSessionIdToken , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , new org.ovirt.engine.ui.frontend.AsyncQuery ( new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { java.lang.String engineAuthToken = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ; restApiSessionManager.acquireSession ( engineAuthToken ) ; } } ) ) ; } } ) ; }
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 networkCreated ( org.ovirt.engine.core.compat.Guid vmId ) { getWindow ( ) . stopProgress ( ) ; cancel ( ) ; setGuideContext ( vmId ) ; updateActionAvailability ( ) ; getGuideCommand ( ) . execute ( ) ; }
Source:
public void testList ( ) throws java.lang.Exception { resource.setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpGetEntityExpectations ( QueryType.GetVdsHooksById , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , getEntity ( 0 ) ) ; org.ovirt.engine.api.model.Hooks hooks = resource.list ( ) ; assertNotNull ( hooks.getHooks ( ) ) ; assertEquals ( 4 , hooks.getHooks ( ) . size ( ) ) ; }

Target:
public void testList ( ) throws java.lang.Exception { resource.setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpGetEntityExpectations ( QueryType.GetVdsHooksById , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , getEntity ( 0 ) ) ; org.ovirt.engine.api.model.Hooks hooks = resource.list ( ) ; org.junit.Assert.assertNotNull ( hooks.getHooks ( ) ) ; org.junit.Assert.assertEquals ( 4 , hooks.getHooks ( ) . size ( ) ) ; }
Source:
protected java.lang.String composeMessage ( ) { return org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getMessages ( ) . nameMustConataionOnlyAlphanumericChars ( maxClonedNameLength ) ; }

Target:
protected org.ovirt.engine.ui.uicommonweb.validation.IValidation [ ] getClonedNameValidators ( ) { final int maxClonedNameLength = getMaxClonedNameLength ( ) ; return new org.ovirt.engine.ui.uicommonweb.validation.IValidation [ ] { new org.ovirt.engine.ui.uicommonweb.validation.NotEmptyValidation ( ) , new org.ovirt.engine.ui.uicommonweb.validation.LengthValidation ( maxClonedNameLength ) , new org.ovirt.engine.ui.uicommonweb.validation.I18NNameValidation ( org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getMessages ( ) . nameMustConataionOnlyAlphanumericChars ( maxClonedNameLength ) ) , new org.ovirt.engine.ui.uicommonweb.models.storage.TemplateBackupModel.UniqueClonedNameValidator ( assignedVmNames ) } ; }
Source:
void showModels ( java.util.List < org.ovirt.engine.ui.uicommonweb.models.hosts.HostInterfaceLineModel > interfaceLineModels ) { grid.resizeRows ( interfaceLineModels.size ( ) ) ; int row = 0 ; for ( org.ovirt.engine.ui.uicommonweb.models.hosts.HostInterfaceLineModel lineModel : interfaceLineModels ) { setGridWidget ( row , 0 , createInterfacePanel ( lineModel ) ) ; setGridWidget ( row , 1 , createBondPanel ( lineModel ) ) ; setGridWidget ( row , 2 , createVLanPanel ( lineModel ) ) ; row ++ ; } }

Target:
void showModels ( java.util.List < org.ovirt.engine.ui.uicommonweb.models.hosts.HostInterfaceLineModel > interfaceLineModels ) { this . setVisible ( true ) ; grid.resizeRows ( interfaceLineModels.size ( ) ) ; int row = 0 ; for ( org.ovirt.engine.ui.uicommonweb.models.hosts.HostInterfaceLineModel lineModel : interfaceLineModels ) { setGridWidget ( row , 0 , createInterfacePanel ( lineModel ) ) ; setGridWidget ( row , 1 , createBondPanel ( lineModel ) ) ; setGridWidget ( row , 2 , createVLanPanel ( lineModel ) ) ; row ++ ; } }
Source:
public static org.ovirt.engine.api.model.SSH map ( org.ovirt.engine.core.common.businessentities.VdsStatic entity , org.ovirt.engine.api.model.SSH template ) { org.ovirt.engine.api.model.SSH model = ( template != null ) ? template : new org.ovirt.engine.api.model.SSH ( ) ; model.setPort ( entity.getSshPort ( ) ) ; model.setUser ( new org.ovirt.engine.api.model.User ( ) ) ; model.getUser ( ) . setUserName ( entity.getSshUsername ( ) ) ; model.setFingerprint ( entity.getSshKeyFingerprint ( ) ) ; return model ; }

Target:
public static org.ovirt.engine.api.model.Ssh map ( org.ovirt.engine.core.common.businessentities.VdsStatic entity , org.ovirt.engine.api.model.Ssh template ) { org.ovirt.engine.api.model.Ssh model = ( template != null ) ? template : new org.ovirt.engine.api.model.Ssh ( ) ; model.setPort ( entity.getSshPort ( ) ) ; model.setUser ( new org.ovirt.engine.api.model.User ( ) ) ; model.getUser ( ) . setUserName ( entity.getSshUsername ( ) ) ; model.setFingerprint ( entity.getSshKeyFingerprint ( ) ) ; return model ; }
Source:
public java.util.List < org.ovirt.engine.core.compat.Guid > getExternalIdsForRunningSteps ( org.ovirt.engine.core.common.job.ExternalSystemType systemType ) { return multipleResults ( getEntityManager ( ) . createNamedQuery ( "Step.getExternalIdsForRunningSteps" ) . setParameter ( "status" , JobExecutionStatus.STARTED ) . setParameter ( "type" , systemType ) ) ; }

Target:
public java.util.List < org.ovirt.engine.core.compat.Guid > getExternalIdsForRunningSteps ( org.ovirt.engine.core.common.job.ExternalSystemType systemType ) { org.springframework.jdbc.core.namedparam.MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource ( ) . addValue ( "external_system_type" , systemType.name ( ) ) . addValue ( "status" , JobExecutionStatus.STARTED.name ( ) ) ; return getCallsHandler ( ) . executeReadList ( "GetExternalIdsFromSteps" , createGuidMapper ( ) , parameterSource ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface createBond ( java.lang.String name , java.lang.String networkName ) { return createVdsInterface ( org.ovirt.engine.core.compat.Guid.newGuid ( ) , name , true , null , null , networkName , true , null ) ; }

Target:
public void labeledNetworkRemovedFromNic ( ) { java.lang.String networkName = "net" ; java.lang.String label = "lbl1" ; org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic = createLabeledNic ( "nic0" , networkName , label ) ; mockExistingIfaces ( nic ) ; nic.setNetworkName ( null ) ; mockExistingNetworks ( createLabeledNetwork ( networkName , label ) ) ; org.ovirt.engine.core.bll.network.host.SetupNetworksHelper helper = createHelper ( createParametersForNics ( nic ) ) ; validateAndExpectViolation ( helper , VdcBllMessages.ACTION_TYPE_FAILED_CANNOT_REMOVE_LABELED_NETWORK_FROM_NIC , networkName ) ; }
Source:
void initCheckBoxEditors ( ) { networkEnabledEditor = new org.ovirt.engine.ui.common.widget.editor.generic.EntityModelCheckBoxEditor ( org.ovirt.engine.ui.common.widget.Align.RIGHT ) ; networkStartOnBootEditor = new org.ovirt.engine.ui.common.widget.editor.generic.EntityModelCheckBoxEditor ( org.ovirt.engine.ui.common.widget.Align.LEFT ) ; }

Target:
void initCheckBoxEditors ( ) { networkEnabledEditor = new org.ovirt.engine.ui.common.widget.editor.generic.EntityModelCheckBoxEditor ( org.ovirt.engine.ui.common.widget.Align.RIGHT ) ; networkStartOnBootEditor = new org.ovirt.engine.ui.common.widget.editor.generic.EntityModelCheckBoxEditor ( org.ovirt.engine.ui.common.widget.Align.RIGHT ) ; timeZoneEnabledEditor = new org.ovirt.engine.ui.common.widget.editor.generic.EntityModelCheckBoxEditor ( org.ovirt.engine.ui.common.widget.Align.RIGHT ) ; cloudInitPasswordSetEditor = new org.ovirt.engine.ui.common.widget.editor.generic.EntityModelCheckBoxEditor ( org.ovirt.engine.ui.common.widget.Align.RIGHT ) ; regenerateKeysEnabledEditor = new org.ovirt.engine.ui.common.widget.editor.generic.EntityModelCheckBoxEditor ( org.ovirt.engine.ui.common.widget.Align.RIGHT ) ; windowsSyspreptimeZoneEnabledEditor = new org.ovirt.engine.ui.common.widget.editor.generic.EntityModelCheckBoxEditor ( org.ovirt.engine.ui.common.widget.Align.RIGHT ) ; sysprepPasswordSetEditor = new org.ovirt.engine.ui.common.widget.editor.generic.EntityModelCheckBoxEditor ( org.ovirt.engine.ui.common.widget.Align.RIGHT ) ; }
Source:
public com.google.gwt.safehtml.shared.SafeHtml getValue ( org.ovirt.engine.core.common.utils.PairQueryable < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface , org.ovirt.engine.core.common.businessentities.VDS > object ) { if ( ( object.getFirst ( ) ) != null ) { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic = object.getFirst ( ) ; return getDetailModel ( ) . isInterfaceAttachedByLabel ( nic ) ? templates.textImageLabels ( nic.getName ( ) , labelImage ) : com.google.gwt.safehtml.shared.SafeHtmlUtils.fromTrustedString ( nic.getName ( ) ) ; } return null ; }

Target:
public com.google.gwt.safehtml.shared.SafeHtml getValue ( org.ovirt.engine.core.common.utils.PairQueryable < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface , org.ovirt.engine.core.common.businessentities.VDS > object ) { if ( ( object.getFirst ( ) ) != null ) { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic = object.getFirst ( ) ; return getDetailModel ( ) . isInterfaceAttachedByLabel ( nic ) ? org.ovirt.engine.ui.webadmin.section.main.view.tab.network.SubTabNetworkHostView.templates.textImageLabels ( nic.getName ( ) , labelImage ) : com.google.gwt.safehtml.shared.SafeHtmlUtils.fromTrustedString ( nic.getName ( ) ) ; } return null ; }
Source:
public int compareTo ( ovirt_engine_dwh.osenumupdate_3_3.OsEnumUpdate.host_changesStruct other ) { int returnValue = - 1 ; returnValue = checkNullsAndCompare ( this . enum_type , other.enum_type ) ; if ( returnValue != 0 ) { return returnValue ; } returnValue = checkNullsAndCompare ( this . enum_key , other.enum_key ) ; if ( returnValue != 0 ) { return returnValue ; } returnValue = checkNullsAndCompare ( this . language_code , other.language_code ) ; if ( returnValue != 0 ) { return returnValue ; } return returnValue ; }

Target:
public int compareTo ( ovirt_engine_dwh.osenumupdate_3_3.OsEnumUpdate.row2Struct other ) { int returnValue = - 1 ; returnValue = checkNullsAndCompare ( this . enum_type , other.enum_type ) ; if ( returnValue != 0 ) { return returnValue ; } returnValue = checkNullsAndCompare ( this . enum_key , other.enum_key ) ; if ( returnValue != 0 ) { return returnValue ; } returnValue = checkNullsAndCompare ( this . language_code , other.language_code ) ; if ( returnValue != 0 ) { return returnValue ; } return returnValue ; }
Source:
protected void verifyCollection ( java.util.List < org.ovirt.engine.api.model.WatchDog > collection ) throws java.lang.Exception { assertNotNull ( collection ) ; assertEquals ( 1 , collection.size ( ) ) ; if ( ! ( collection.isEmpty ( ) ) ) { verifyModel ( collection.get ( 0 ) , 0 ) ; } }

Target:
protected void verifyCollection ( java.util.List < org.ovirt.engine.api.model.Watchdog > collection ) throws java.lang.Exception { assertNotNull ( collection ) ; assertEquals ( 1 , collection.size ( ) ) ; if ( ! ( collection.isEmpty ( ) ) ) { verifyModel ( collection.get ( 0 ) , 0 ) ; } }
Source:
void addModelSearchStringChangeListener ( final org.ovirt.engine.ui.uicommonweb.models.SearchableListModel < ? > model ) { if ( model.supportsServerSideSorting ( ) ) { model.getPropertyChangedEvent ( ) . addListener ( new org.ovirt.engine.ui.uicompat.IEventListener ( ) { @ java.lang.Override public void eventRaised ( com.google.gwt.user.client.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { if ( "SearchString" . equals ( ( ( org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ) ( args ) ) . propertyName ) ) { if ( ! ( model.isSearchValidForServerSideSorting ( ) ) ) { model.clearSortOptions ( ) ; clearColumnSort ( ) ; } } } } ) ; } }

Target:
void addModelSearchStringChangeListener ( final org.ovirt.engine.ui.uicommonweb.models.SearchableListModel < ? > model ) { if ( model.supportsServerSideSorting ( ) ) { model.getPropertyChangedEvent ( ) . addListener ( new org.ovirt.engine.ui.uicompat.IEventListener < org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs > ( ) { @ java.lang.Override public void eventRaised ( org.ovirt.engine.ui.uicompat.Event < org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs > ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs args ) { if ( "SearchString" . equals ( args.propertyName ) ) { if ( ! ( model.isSearchValidForServerSideSorting ( ) ) ) { model.clearSortOptions ( ) ; clearColumnSort ( ) ; } } } } ) ; } }
Source:
public java.lang.String getValue ( org.ovirt.engine.core.common.businessentities.storage.Disk disk ) { return ( disk.getDiskStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.storage.DiskStorageType.IMAGE ) ? ( ( org.ovirt.engine.core.common.businessentities.storage.DiskImage ) ( disk ) ) . getImageId ( ) . toString ( ) : null ; }

Target:
public java.lang.String getValue ( org.ovirt.engine.core.common.businessentities.storage.Disk disk ) { return ( ( disk.getDiskStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.storage.DiskStorageType.IMAGE ) ) || ( ( disk.getDiskStorageType ( ) ) == ( org.ovirt.engine.core.common.businessentities.storage.DiskStorageType.CINDER ) ) ? ( ( org.ovirt.engine.core.common.businessentities.storage.DiskImage ) ( disk ) ) . getImageId ( ) . toString ( ) : null ; }
Source:
public void testBadGet ( ) throws java.lang.Exception { org.ovirt.engine.api.restapi.resource.BackendFileResource resource = new org.ovirt.engine.api.restapi.resource.BackendFileResource ( "foo" , collection ) ; collection.setUriInfo ( setUpUriExpectations ( null ) ) ; setUpQueryExpectations ( "" , null ) ; try { resource.get ( ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }

Target:
public void testBadGet ( ) throws java.lang.Exception { org.ovirt.engine.api.restapi.resource.BackendFileResource resource = new org.ovirt.engine.api.restapi.resource.BackendFileResource ( "foo" , collection ) ; collection.setUriInfo ( setUpUriExpectations ( null ) ) ; setUpQueryExpectations ( "" , null ) ; try { resource.get ( ) ; org.junit.Assert.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }
Source:
private void setVmTicket ( ) { org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runAction ( VdcActionType.SetVmTicket , new org.ovirt.engine.core.common.action.SetVmTicketParameters ( getEntity ( ) . getId ( ) , null , TICKET_VALIDITY_SECONDS ) , new org.ovirt.engine.ui.uicompat.IFrontendActionAsyncCallback ( ) { @ java.lang.Override public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { org.ovirt.engine.ui.uicommonweb.models.vms.SpiceConsoleModel spiceConsoleModel = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.SpiceConsoleModel ) ( result.getState ( ) ) ) ; spiceConsoleModel.postSendVmTicket ( result.getReturnValue ( ) ) ; } } , this ) ; }

Target:
private void setVmTicket ( ) { org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runAction ( VdcActionType.SetVmTicket , new org.ovirt.engine.core.common.action.SetVmTicketParameters ( getEntity ( ) . getId ( ) , null , TICKET_VALIDITY_SECONDS , org.ovirt.engine.core.common.businessentities.GraphicsType.SPICE ) , new org.ovirt.engine.ui.uicompat.IFrontendActionAsyncCallback ( ) { @ java.lang.Override public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { org.ovirt.engine.ui.uicommonweb.models.vms.SpiceConsoleModel spiceConsoleModel = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.SpiceConsoleModel ) ( result.getState ( ) ) ) ; spiceConsoleModel.postSendVmTicket ( result.getReturnValue ( ) ) ; } } , this ) ; }
Source:
public void testStart ( ) throws java.lang.Exception { setUpWindowsGetEntityExpectations ( 2 , false ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.RunVmOnce , org.ovirt.engine.core.common.action.RunVmOnceParams.class , new java.lang.String [ ] { "VmId" } , new java.lang.Object [ ] { GUIDS [ 0 ] } ) ) ; verifyActionResponse ( resource.start ( new org.ovirt.engine.api.model.Action ( ) ) ) ; }

Target:
public void testStart ( ) throws java.lang.Exception { setUpWindowsGetEntityExpectations ( 2 , false ) ; setUriInfo ( setUpActionExpectations ( VdcActionType.RunVmOnce , org.ovirt.engine.core.common.action.RunVmOnceParams.class , new java.lang.String [ ] { "VmId" } , new java.lang.Object [ ] { GUIDS [ 0 ] } ) ) ; javax.ws.rs.core.Response response = resource.start ( new org.ovirt.engine.api.model.Action ( ) ) ; verifyActionResponse ( response ) ; verifyActionModel ( ( ( org.ovirt.engine.api.model.Action ) ( response.getEntity ( ) ) ) . getVm ( ) , 0 ) ; }
Source:
public void versionDecreaseLowerVersionThanDC ( ) { createCommandWithOlderVersion ( true , false ) ; org.ovirt.engine.core.dao.StoragePoolDao storagePoolDao2 = org.mockito.Mockito.mock ( org.ovirt.engine.core.dao.StoragePoolDao.class ) ; org.mockito.Mockito.when ( storagePoolDao2.get ( org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Guid.class ) ) ) . thenReturn ( org.ovirt.engine.core.bll.UpdateClusterCommandTest.createStoragePoolLocalFSOldVersion ( ) ) ; org.mockito.Mockito.doReturn ( storagePoolDao2 ) . when ( cmd ) . getStoragePoolDao ( ) ; org.mockito.Mockito.doReturn ( storagePoolDao2 ) . when ( dbFacadeMock ) . getStoragePoolDao ( ) ; setupCpu ( ) ; validateFailedWithReason ( EngineMessage.ACTION_TYPE_FAILED_CANNOT_DECREASE_COMPATIBILITY_VERSION_UNDER_DC ) ; }

Target:
public void versionDecreaseWithHost ( ) { createCommandWithOlderVersion ( ) ; setupCpu ( ) ; vdsExist ( ) ; validateFailedWithReason ( EngineMessage.ACTION_TYPE_FAILED_CANNOT_DECREASE_CLUSTER_WITH_HOSTS_COMPATIBILITY_VERSION ) ; }
Source:
protected void executeCommand ( ) { boolean succeeded = false ; try { succeeded = runVdsCommand ( VDSCommandType.SetMOMPolicyParameters , new org.ovirt.engine.core.common.vdscommands.MomPolicyVDSParameters ( getVds ( ) , getVdsGroup ( ) . isEnableBallooning ( ) , getVdsGroup ( ) . isEnableKsm ( ) ) ) . getSucceeded ( ) ; } catch ( org.ovirt.engine.core.common.errors.VdcBLLException e ) { log.error ( "Could not update MoM policy on host '{}': {}" , getVdsName ( ) , e.getMessage ( ) ) ; log.debug ( "Exception" , e ) ; } getReturnValue ( ) . setSucceeded ( succeeded ) ; }

Target:
protected void executeCommand ( ) { boolean succeeded = false ; try { succeeded = runVdsCommand ( VDSCommandType.SetMOMPolicyParameters , new org.ovirt.engine.core.common.vdscommands.MomPolicyVDSParameters ( getVds ( ) , getVdsGroup ( ) . isEnableBallooning ( ) , getVdsGroup ( ) . isEnableKsm ( ) , getVdsGroup ( ) . isKsmMergeAcrossNumaNodes ( ) ) ) . getSucceeded ( ) ; } catch ( org.ovirt.engine.core.common.errors.VdcBLLException e ) { log.error ( "Could not update MoM policy on host '{}': {}" , getVdsName ( ) , e.getMessage ( ) ) ; log.debug ( "Exception" , e ) ; } getReturnValue ( ) . setSucceeded ( succeeded ) ; }
Source:
public static void getHostFingerprint ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String hostAddress ) { 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.getInstance ( ) . runQuery ( VdcQueryType.GetServerSSHKeyFingerprint , new org.ovirt.engine.core.common.queries.ServerParameters ( hostAddress ) , aQuery ) ; }

Target:
public static void getGlusterHostsNewlyAdded ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId , boolean isFingerprintRequired ) { 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.GetAddedGlusterServers , new org.ovirt.engine.core.common.queries.gluster.AddedGlusterServersParameters ( clusterId , isFingerprintRequired ) , aQuery ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object ReturnValue ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage diskImage = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( ReturnValue ) ) . getReturnValue ( ) ; org.ovirt.engine.core.common.action.RegisterDiskParameters registerDiskParams = new org.ovirt.engine.core.common.action.RegisterDiskParameters ( diskImage , getEntity ( ) . getId ( ) ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runAction ( VdcActionType.RegisterDisk , registerDiskParams ) ; }

Target:
private void register ( ) { if ( ( getWindow ( ) ) != null ) { return ; } for ( java.lang.Object item : getSelectedItems ( ) ) { org.ovirt.engine.core.common.businessentities.storage.DiskImage disk = ( ( org.ovirt.engine.core.common.businessentities.storage.DiskImage ) ( item ) ) ; org.ovirt.engine.core.common.action.RegisterDiskParameters registerDiskParams = new org.ovirt.engine.core.common.action.RegisterDiskParameters ( disk , getEntity ( ) . getId ( ) ) ; registerDiskParams.setRefreshFromStorage ( true ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runAction ( VdcActionType.RegisterDisk , registerDiskParams ) ; } }
Source:
protected java.util.List < org.ovirt.engine.core.common.businessentities.Permissions > setUpPermissions ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.Permissions > perms = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Permissions > ( ) ; for ( int i = 0 ; i < ( NAMES.length ) ; i ++ ) { perms.add ( getEntity ( i ) ) ; } return perms ; }

Target:
protected java.util.List < org.ovirt.engine.api.model.Permission > setUpPermissions ( ) { java.util.List < org.ovirt.engine.api.model.Permission > perms = new java.util.ArrayList < > ( ) ; for ( int i = 0 ; i < ( NAMES.length ) ; i ++ ) { perms.add ( getEntity ( i ) ) ; } return perms ; }
Source:
public 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 void getNetworkConnectivityCheckTimeoutInSeconds ( 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 ) ) : 120 ; } } ; getConfigFromCache ( new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.NetworkConnectivityCheckTimeoutInSeconds , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
public void labelBeingAttachedToNonVlanNonSlaveInterfaceValid ( ) { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic = createNic ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > nics = java.util.Arrays.asList ( nic ) ; org.ovirt.engine.core.common.businessentities.network.NicLabel nicLabel = new org.ovirt.engine.core.common.businessentities.network.NicLabel ( nic.getId ( ) , nic.getName ( ) , "lbl1" ) ; org.junit.Assert.assertThat ( createNicLabelValidator ( nics ) . labelBeingAttachedToNonVlanNonSlaveInterface ( nicLabel ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }

Target:
public void labelBeingAttachedToNonVlanNonSlaveInterfaceValid ( ) { org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface nic = createNic ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > nics = java.util.Collections.singletonList ( nic ) ; org.ovirt.engine.core.common.businessentities.network.NicLabel nicLabel = new org.ovirt.engine.core.common.businessentities.network.NicLabel ( nic.getId ( ) , nic.getName ( ) , "lbl1" ) ; org.junit.Assert.assertThat ( createNicLabelValidator ( nics ) . labelBeingAttachedToNonVlanNonSlaveInterface ( nicLabel ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.isValid ( ) ) ; }
Source:
public void canDoActionVmIsNotDown ( ) throws java.lang.Exception { initializeCommand ( ImageOperation.Move ) ; initSnapshotValidator ( ) ; initVmDiskImage ( false ) ; mockGetVmsListForDisk ( ) ; initSrcStorageDomain ( ) ; initDestStorageDomain ( StorageType.NFS ) ; org.mockito.Mockito.doReturn ( vmDeviceDao ) . when ( command ) . getVmDeviceDao ( ) ; org.junit.Assert.assertFalse ( command.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( VdcBllMessages.ACTION_TYPE_FAILED_VM_IS_NOT_DOWN.toString ( ) ) ) ; }

Target:
public void canDoActionVmIsNotDown ( ) throws java.lang.Exception { initializeCommand ( ImageOperation.Move ) ; initSnapshotValidator ( ) ; initVmDiskImage ( false ) ; mockGetVmsListForDisk ( ) ; initSrcStorageDomain ( ) ; initDestStorageDomain ( StorageType.NFS ) ; org.mockito.Mockito.doReturn ( vmDeviceDao ) . when ( command ) . getVmDeviceDao ( ) ; org.junit.Assert.assertFalse ( command.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( command.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( EngineMessage.ACTION_TYPE_FAILED_VM_IS_NOT_DOWN.toString ( ) ) ) ; }
Source:
protected void executeQueryCommand ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VDS > vds = org.ovirt.engine.core.bll.GetVdsByNameQuery.getDbFacade ( ) . getVdsDao ( ) . getAllWithName ( org.ovirt.engine.core.bll.GetVdsByNameQuery.getParameters ( ) . getName ( ) ) ; if ( ( vds.size ( ) ) > 0 ) { org.ovirt.engine.core.bll.GetVdsByNameQuery.getQueryReturnValue ( ) . setReturnValue ( vds.get ( 0 ) ) ; } }

Target:
protected void executeQueryCommand ( ) { org.ovirt.engine.core.common.businessentities.VDS vds = org.ovirt.engine.core.bll.GetVdsByNameQuery.getDbFacade ( ) . getVdsDao ( ) . getByName ( org.ovirt.engine.core.bll.GetVdsByNameQuery.getParameters ( ) . getName ( ) ) ; org.ovirt.engine.core.bll.GetVdsByNameQuery.getQueryReturnValue ( ) . setReturnValue ( vds ) ; }
Source:
public org.ovirt.engine.core.common.businessentities.AsyncTasks getByVdsmTaskId ( org.ovirt.engine.core.compat.Guid vdsmTaskId ) { org.ovirt.engine.core.common.businessentities.AsyncTasks asyncTask = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getAsyncTaskDao ( ) . getByVdsmTaskId ( vdsmTaskId ) ; if ( asyncTask != null ) { copyFromCommandEntity ( asyncTask , commandsCache.get ( asyncTask.getCommandId ( ) ) ) ; } return asyncTask ; }

Target:
public int removeTaskFromDbByTaskId ( final org.ovirt.engine.core.compat.Guid taskId ) throws java.lang.RuntimeException { return coCoAsyncTaskHelper.removeTaskFromDbByTaskId ( taskId ) ; }
Source:
public void testRefreshUserSessionAfterExpiration ( ) { initDataForClearTest ( org.ovirt.engine.core.bll.session.SessionDataContainerTest.USER ) ; container.cleanExpiredUsersSessions ( ) ; container.cleanExpiredUsersSessions ( ) ; container.GetData ( org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_SESSION_ID , org.ovirt.engine.core.bll.session.SessionDataContainerTest.USER , true ) ; org.junit.Assert.assertNull ( "Get should return null since the session wasn't refresh" , container.GetData ( org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_SESSION_ID , org.ovirt.engine.core.bll.session.SessionDataContainerTest.USER , false ) ) ; }

Target:
public void testRefreshUserSessionAfterExpiration ( ) { initDataForClearTest ( org.ovirt.engine.core.bll.session.SessionDataContainerTest.USER ) ; container.cleanExpiredUsersSessions ( ) ; container.cleanExpiredUsersSessions ( ) ; container.getData ( org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_SESSION_ID , org.ovirt.engine.core.bll.session.SessionDataContainerTest.USER , true ) ; org.junit.Assert.assertNull ( "Get should return null since the session wasn't refresh" , container.getData ( org.ovirt.engine.core.bll.session.SessionDataContainerTest.TEST_SESSION_ID , org.ovirt.engine.core.bll.session.SessionDataContainerTest.USER , false ) ) ; }
Source:
private static org.ovirt.engine.core.common.businessentities.VmTemplate createVmTemplate ( ) { org.ovirt.engine.core.common.businessentities.VmTemplate template = new org.ovirt.engine.core.common.businessentities.VmTemplate ( ) ; template.setName ( "test-template" ) ; template.setOrigin ( OriginType.OVIRT ) ; template.setId ( new org.ovirt.engine.core.compat.Guid ( ) ) ; template.setDescription ( "test-description" ) ; template.setDbGeneration ( 2L ) ; return template ; }

Target:
private static org.ovirt.engine.core.common.businessentities.VmTemplate createVmTemplate ( ) { org.ovirt.engine.core.common.businessentities.VmTemplate template = new org.ovirt.engine.core.common.businessentities.VmTemplate ( ) ; template.setName ( "test-template" ) ; template.setOrigin ( OriginType.OVIRT ) ; template.setId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; template.setDescription ( "test-description" ) ; template.setDbGeneration ( 2L ) ; return template ; }
Source:
public void testPersistentAuthOtherPreferencesInSameHeader ( ) { org.junit.Assert.assertTrue ( isPersistentAuth ( "persistent-auth, x, y" ) ) ; org.junit.Assert.assertTrue ( isPersistentAuth ( "x, persistent-auth, y" ) ) ; org.junit.Assert.assertTrue ( isPersistentAuth ( "x, y, persistent-auth" ) ) ; }

Target:
public void testPreferIgnoresCase ( ) { org.junit.Assert.assertEquals ( FiltersHelper.PREFER_PERSISTENCE_AUTH , getPrefer ( "Persistent-Auth" ) ) ; org.junit.Assert.assertEquals ( FiltersHelper.PREFER_PERSISTENCE_AUTH , getPrefer ( "PERSISTENT-AUTH" ) ) ; org.junit.Assert.assertEquals ( FiltersHelper.PREFER_NEW_AUTH , getPrefer ( "new-auth" ) ) ; org.junit.Assert.assertEquals ( FiltersHelper.PREFER_NEW_AUTH , getPrefer ( "NEW-AUTH" ) ) ; }
Source:
public void vmsMonitoring ( ) { if ( isMonitoringNeeded ( ) ) { org.ovirt.engine.core.vdsbroker.VmsListFetcher fetcher = ( getRefreshStatistics ( ) ) ? new org.ovirt.engine.core.vdsbroker.VmsStatisticsFetcher ( this ) : new org.ovirt.engine.core.vdsbroker.VmsListFetcher ( this ) ; fetcher.fetch ( ) ; new org.ovirt.engine.core.vdsbroker.VmsMonitoring ( this , fetcher.getChangedVms ( ) , fetcher.getVmsWithChangedDevices ( ) , auditLogDirector ) . perform ( ) ; } }

Target:
public void vmsMonitoring ( ) { if ( isMonitoringNeeded ( ) ) { org.ovirt.engine.core.vdsbroker.VmsListFetcher fetcher = ( getRefreshStatistics ( ) ) ? new org.ovirt.engine.core.vdsbroker.VmsStatisticsFetcher ( this ) : new org.ovirt.engine.core.vdsbroker.VmsListFetcher ( this ) ; long fetchTime = java.lang.System.nanoTime ( ) ; fetcher.fetch ( ) ; new org.ovirt.engine.core.vdsbroker.VmsMonitoring ( this , fetcher.getChangedVms ( ) , fetcher.getVmsWithChangedDevices ( ) , auditLogDirector , fetchTime ) . perform ( ) ; } }
Source:
private void updateDiskImagesToIllegal ( org.ovirt.engine.core.common.businessentities.DiskImage diskImage ) { java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > snapshotDisks = org.ovirt.engine.core.bll.RemoveAllVmImagesCommand.getDbFacade ( ) . getDiskImageDao ( ) . getAllSnapshotsForImageGroup ( diskImage.getId ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.DiskImage diskSnapshot : snapshotDisks ) { diskSnapshot.setVmSnapshotId ( null ) ; diskSnapshot.setImageStatus ( ImageStatus.ILLEGAL ) ; org.ovirt.engine.core.bll.RemoveAllVmImagesCommand.getDbFacade ( ) . getImageDao ( ) . update ( diskSnapshot.getImage ( ) ) ; } }

Target:
private void updateDiskImagesToIllegal ( org.ovirt.engine.core.common.businessentities.storage.DiskImage diskImage ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > snapshotDisks = org.ovirt.engine.core.bll.RemoveAllVmImagesCommand.getDbFacade ( ) . getDiskImageDao ( ) . getAllSnapshotsForImageGroup ( diskImage.getId ( ) ) ; for ( org.ovirt.engine.core.common.businessentities.storage.DiskImage diskSnapshot : snapshotDisks ) { diskSnapshot.setVmSnapshotId ( null ) ; diskSnapshot.setImageStatus ( ImageStatus.ILLEGAL ) ; org.ovirt.engine.core.bll.RemoveAllVmImagesCommand.getDbFacade ( ) . getImageDao ( ) . update ( diskSnapshot.getImage ( ) ) ; } }
Source:
protected org.ovirt.engine.core.compat.Guid getUpServerId ( ) { if ( ( brick ) == null ) { return getRandomUpServerId ( clusterId ) ; } org.ovirt.engine.core.common.businessentities.VDS brickServer = org.ovirt.engine.core.bll.gluster.GetGlusterVolumeAdvancedDetailsQuery.getVdsDao ( ) . get ( brick.getServerId ( ) ) ; if ( ( brickServer.getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VDSStatus.Up ) ) { return brickServer.getId ( ) ; } return super . getRandomUpServerId ( clusterId ) ; }

Target:
protected org.ovirt.engine.core.compat.Guid getUpServerId ( ) { if ( ( brick ) == null ) { return getRandomUpServerId ( clusterId ) ; } org.ovirt.engine.core.common.businessentities.VDS brickServer = org.ovirt.engine.core.bll.gluster.GetGlusterVolumeAdvancedDetailsQuery.getDbFacade ( ) . getVdsDao ( ) . get ( brick.getServerId ( ) ) ; if ( ( brickServer.getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VDSStatus.Up ) ) { return brickServer.getId ( ) ; } return super . getRandomUpServerId ( clusterId ) ; }
Source:
public static void getStorageConnectionById ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String id , boolean isRefresh ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( org.ovirt.engine.core.common.businessentities.StorageServerConnections ) ( source ) ) : null ; } } ; org.ovirt.engine.core.common.queries.StorageServerConnectionQueryParametersBase params = new org.ovirt.engine.core.common.queries.StorageServerConnectionQueryParametersBase ( id ) ; params.setRefresh ( isRefresh ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetStorageServerConnectionById , params , aQuery ) ; }

Target:
public static void getRpmVersionViaPublic ( 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.RunPublicQuery ( VdcQueryType.GetConfigurationValue , new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.ProductRPMVersion , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
private void initServerUrl ( ) throws org.ovirt.engine.core.notifier.NotificationServiceException { java.lang.String serverAddressProp = prop.get ( NotificationProperties.ENGINE_ADDRESS ) ; java.lang.String protocol = ( isHttpsProtocol ) ? "https" : "http" ; serverUrl = java.lang.String.format ( org.ovirt.engine.core.notifier.EngineMonitorService.HEALTH_SERVLET_URL , protocol , ( org.apache.commons.lang.StringUtils.isEmpty ( serverAddressProp ) ? org.ovirt.engine.core.notifier.EngineMonitorService.DEFAULT_SERVER_ADDRESS : serverAddressProp ) ) ; try { new java.net.URL ( serverUrl ) ; } catch ( java.net.MalformedURLException e ) { throw new org.ovirt.engine.core.notifier.NotificationServiceException ( java.lang.String.format ( ( "Invalid engine server address format: [%s]. " + "Please verify the format of [%s]. Should be ip:port or hostname:port whereas [%s])" ) , serverUrl , NotificationProperties.ENGINE_ADDRESS , serverAddressProp ) , e ) ; } }

Target:
private void initServerUrl ( ) throws org.ovirt.engine.core.notifier.NotificationServiceException { org.ovirt.engine.core.utils.LocalConfig config = org.ovirt.engine.core.utils.LocalConfig.getInstance ( ) ; try { if ( isHttpsProtocol ) { serverUrl = config.getExternalHttpsUrl ( org.ovirt.engine.core.notifier.EngineMonitorService.HEALTH_SERVLET_PATH ) ; } else { serverUrl = config.getExternalHttpUrl ( org.ovirt.engine.core.notifier.EngineMonitorService.HEALTH_SERVLET_PATH ) ; } org.ovirt.engine.core.notifier.EngineMonitorService.log.info ( ( ( "Engine health servlet URL is \"" + ( serverUrl ) ) + "\"." ) ) ; } catch ( java.net.MalformedURLException exception ) { throw new org.ovirt.engine.core.notifier.NotificationServiceException ( "Can't get engine health servlet URL." , exception ) ; } }
Source:
public void vdsNonOperational ( org.ovirt.engine.core.compat.Guid vdsId , org.ovirt.engine.core.common.businessentities.NonOperationalReason reason , boolean logCommand , org.ovirt.engine.core.compat.Guid domainId , java.util.Map < java.lang.String , java.lang.String > customLogValues ) { org.ovirt.engine.core.bll.job.ExecutionHandler.updateSpecificActionJobCompleted ( vdsId , VdcActionType.MaintenanceVds , false ) ; org.ovirt.engine.core.common.action.SetNonOperationalVdsParameters tempVar = new org.ovirt.engine.core.common.action.SetNonOperationalVdsParameters ( vdsId , reason , customLogValues ) ; tempVar.setStorageDomainId ( domainId ) ; tempVar.setShouldBeLogged ( logCommand ) ; org.ovirt.engine.core.bll.Backend.getInstance ( ) . runInternalAction ( VdcActionType.SetNonOperationalVds , tempVar , org.ovirt.engine.core.bll.job.ExecutionHandler.createInternalJobContext ( ) ) ; }

Target:
public void vdsNonOperational ( org.ovirt.engine.core.compat.Guid vdsId , org.ovirt.engine.core.common.businessentities.NonOperationalReason reason , boolean logCommand , org.ovirt.engine.core.compat.Guid domainId , java.util.Map < java.lang.String , java.lang.String > customLogValues ) { org.ovirt.engine.core.bll.job.ExecutionHandler.updateSpecificActionJobCompleted ( vdsId , VdcActionType.MaintenanceVds , false ) ; org.ovirt.engine.core.common.action.SetNonOperationalVdsParameters tempVar = new org.ovirt.engine.core.common.action.SetNonOperationalVdsParameters ( vdsId , reason , customLogValues ) ; tempVar.setStorageDomainId ( domainId ) ; tempVar.setShouldBeLogged ( logCommand ) ; backend.runInternalAction ( VdcActionType.SetNonOperationalVds , tempVar , org.ovirt.engine.core.bll.job.ExecutionHandler.createInternalJobContext ( ) ) ; }
Source:
protected void setActionMessageParameters ( ) { addCanDoActionMessage ( VdcBllMessages.VAR__ACTION__REMOVE ) ; addCanDoActionMessage ( VdcBllMessages.VAR__TYPE__CLUSTER_POLICY ) ; }

Target:
private java.lang.String clustersListIntoTokenizedString ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VDSGroup > attachedClustersList = getVdsGroupDao ( ) . getClustersByClusterPolicyId ( getParameters ( ) . getClusterPolicyId ( ) ) ; java.util.List < java.lang.String > clusterNamesList = new java.util.LinkedList < > ( ) ; for ( org.ovirt.engine.core.common.businessentities.VDSGroup vdsGroup : attachedClustersList ) clusterNamesList.add ( vdsGroup.getName ( ) ) ; return org.apache.commons.lang.StringUtils.join ( clusterNamesList , ',' ) ; }
Source:
private void generateMethodInterface ( org.ovirt.api.metamodel.concepts.Method method ) { if ( ( method.getBase ( ) ) != null ) { return ; } org.ovirt.api.metamodel.concepts.Name name = method.getName ( ) ; generateRequestInterface ( method ) ; generateResponseInterface ( method ) ; generateDoc ( method ) ; java.lang.String request = getRequestName ( method ) ; java.lang.String member = javaNames.getJavaMemberStyleName ( name ) ; javaBuffer.addLine ( "%1$s %2$s();" , request , member ) ; javaBuffer.addLine ( ) ; }

Target:
private org.ovirt.api.metamodel.concepts.Name getFullName ( org.ovirt.api.metamodel.concepts.Method method ) { org.ovirt.api.metamodel.concepts.Method base = method.getBase ( ) ; if ( base == null ) { return method.getName ( ) ; } return names.concatenate ( getFullName ( base ) , method.getName ( ) ) ; }
Source:
private boolean hostCompliesWithClusterEmulationMode ( org.ovirt.engine.core.common.businessentities.VDS vds , org.ovirt.engine.core.common.businessentities.VDSGroup vdsGroup ) { java.lang.String clusterEmulatedMachine = vdsGroup.getEmulatedMachine ( ) ; if ( ( clusterEmulatedMachine == null ) || ( clusterEmulatedMachine.isEmpty ( ) ) ) { return hostEmulationModeMatchesTheConfigValues ( vds ) ; } else { return ( vds.getSupportedEmulatedMachines ( ) ) != null ? java.util.Arrays.asList ( vds.getSupportedEmulatedMachines ( ) . split ( "," ) ) . contains ( clusterEmulatedMachine ) : false ; } }

Target:
private boolean hostCompliesWithClusterEmulationMode ( org.ovirt.engine.core.common.businessentities.VDS vds , org.ovirt.engine.core.common.businessentities.VDSGroup vdsGroup ) { if ( vdsGroup.isDetectEmulatedMachine ( ) ) { return hostEmulationModeMatchesTheConfigValues ( vds ) ; } else { return ( vds.getSupportedEmulatedMachines ( ) ) != null ? java.util.Arrays.asList ( vds.getSupportedEmulatedMachines ( ) . split ( "," ) ) . contains ( vdsGroup.getEmulatedMachine ( ) ) : false ; } }