auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private org.ovirt.engine.core.bll.ValidationResult notChangingManagementNetworkName ( org.ovirt.engine.core.common.businessentities.network.Network oldNetwork ) { java.lang.String managementNetwork = org.ovirt.engine.core.common.config.Config.< java.lang.String > GetValue ( ConfigValues.ManagementNetwork ) ; return ( oldNetwork.getName ( ) . equals ( managementNetwork ) ) && ( ! ( org.ovirt.engine.core.bll.network.dc.UpdateNetworkCommand.getNetworkName ( ) . equals ( managementNetwork ) ) ) ? new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.dal.VdcBllMessages.NETWORK_CAN_NOT_REMOVE_DEFAULT_NETWORK ) : org.ovirt.engine.core.bll.ValidationResult.VALID ; }

Target:
private org.ovirt.engine.core.bll.ValidationResult notChangingManagementNetworkName ( ) { java.lang.String managementNetwork = org.ovirt.engine.core.common.config.Config.< java.lang.String > GetValue ( ConfigValues.ManagementNetwork ) ; return ( getOldNetwork ( ) . getName ( ) . equals ( managementNetwork ) ) && ( ! ( org.ovirt.engine.core.bll.network.dc.UpdateNetworkCommand.getNetworkName ( ) . equals ( managementNetwork ) ) ) ? new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.dal.VdcBllMessages.NETWORK_CAN_NOT_REMOVE_DEFAULT_NETWORK ) : org.ovirt.engine.core.bll.ValidationResult.VALID ; }
Source:
public void eventRaised ( org.ovirt.engine.core.compat.Event ev , java.lang.Object sender , org.ovirt.engine.core.compat.EventArgs args ) { if ( ( modelProvider.getModel ( ) . getSelectedItem ( ) ) == null ) { return ; } @ java.lang.SuppressWarnings ( value = "unchecked" ) java.lang.Iterable < org.ovirt.engine.core.common.businessentities.DiskImage > diskImages = modelProvider.getModel ( ) . getvmBasicDiskListModel ( ) . getItems ( ) ; getView ( ) . editDistItems ( diskImages ) ; }

Target:
public void eventRaised ( org.ovirt.engine.core.compat.Event ev , java.lang.Object sender , org.ovirt.engine.core.compat.EventArgs args ) { if ( ( modelProvider.getModel ( ) . getSelectedItem ( ) ) == null ) { return ; } setupDisks ( modelProvider ) ; }
Source:
protected void updateConfigValues ( ) { if ( ( getEntity ( ) ) == null ) { return ; } org.ovirt.engine.core.common.businessentities.VM vm = getEntity ( ) ; org.ovirt.engine.core.compat.Version clusterCompatibilityVersion = ( ( vm.getVdsGroupCompatibilityVersion ( ) ) != null ) ? vm.getVdsGroupCompatibilityVersion ( ) : new org.ovirt.engine.core.compat.Version ( ) ; }

Target:
private void newEntity ( ) { if ( ( getWindow ( ) ) != null ) { return ; } org.ovirt.engine.ui.uicommonweb.models.vms.VmInterfaceModel model = org.ovirt.engine.ui.uicommonweb.models.vms.NewVmInterfaceModel.createInstance ( getEntity ( ) . getStaticData ( ) , getEntity ( ) . getStatus ( ) , getEntity ( ) . getStoragePoolId ( ) , getEntity ( ) . getVdsGroupCompatibilityVersion ( ) , ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ) ( getItems ( ) ) ) , this ) ; setWindow ( model ) ; }
Source:
protected java.util.List < java.lang.String > getUrlParameterDeclarations ( java.util.List < org.ovirt.engine.sdk.entities.Parameter > params ) { java.util.List < java.lang.String > paramDecls = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.sdk.entities.Parameter param : params ) { java.lang.String paramName = org.ovirt.engine.sdk.codegen.utils.UrlUtils.toQueryParam ( param.getName ( ) ) ; java.lang.String paramType = org.ovirt.engine.sdk.codegen.utils.TypeUtils.toJava ( param.getType ( ) ) ; org.ovirt.engine.sdk.codegen.templates.MethodParameterTemplate paramDeclTemplate = new org.ovirt.engine.sdk.codegen.templates.MethodParameterTemplate ( ) ; java.lang.String paramDecl = paramDeclTemplate.getTemplate ( paramType , paramName ) ; paramDecls.add ( paramDecl ) ; } return paramDecls ; }

Target:
protected java.util.List < java.lang.String > getUrlParameterDeclarations ( java.util.List < org.ovirt.engine.sdk.entities.Parameter > params ) { java.util.List < java.lang.String > paramDecls = new java.util.ArrayList < > ( ) ; for ( org.ovirt.engine.sdk.entities.Parameter param : params ) { java.lang.String paramName = org.ovirt.engine.sdk.codegen.utils.UrlUtils.toQueryParam ( param.getName ( ) ) ; java.lang.String paramType = org.ovirt.engine.sdk.codegen.utils.TypeUtils.toJava ( param.getType ( ) ) ; org.ovirt.engine.sdk.codegen.templates.MethodParameterTemplate paramDeclTemplate = new org.ovirt.engine.sdk.codegen.templates.MethodParameterTemplate ( ) ; java.lang.String paramDecl = paramDeclTemplate.evaluate ( paramType , paramName ) ; paramDecls.add ( paramDecl ) ; } return paramDecls ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult vmHostCanLiveMerge ( ) { for ( org.ovirt.engine.core.common.businessentities.VM vm : vms ) { if ( ( ! ( vm.isDown ( ) ) ) && ( ( ( vm.getRunOnVds ( ) ) == null ) || ( ! ( org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVdsDao ( ) . get ( vm.getRunOnVds ( ) ) . getLiveMergeSupport ( ) ) ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.ACTION_TYPE_FAILED_VM_HOST_CANNOT_LIVE_MERGE , java.lang.String.format ( "$VmName %s" , vm.getName ( ) ) ) ; } } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult vmHostCanLiveMerge ( ) { for ( org.ovirt.engine.core.common.businessentities.VM vm : vms ) { if ( ( ! ( vm.isDown ( ) ) ) && ( ( ( vm.getRunOnVds ( ) ) == null ) || ( ! ( org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVdsDao ( ) . get ( vm.getRunOnVds ( ) ) . getLiveMergeSupport ( ) ) ) ) ) { return new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_VM_HOST_CANNOT_LIVE_MERGE , java.lang.String.format ( "$VmName %s" , vm.getName ( ) ) ) ; } } return org.ovirt.engine.core.bll.ValidationResult.VALID ; }
Source:
public void testCombine ( ) throws java.lang.Exception { assertEquals ( "/foo/bar" , org.ovirt.engine.api.common.util.LinkHelper.combine ( "/foo" , "bar" ) ) ; assertEquals ( "/foo/bar" , org.ovirt.engine.api.common.util.LinkHelper.combine ( "/foo/" , "bar" ) ) ; assertEquals ( "/foo/bar" , org.ovirt.engine.api.common.util.LinkHelper.combine ( "/foo/" , "/bar" ) ) ; assertEquals ( "/foo/bar" , org.ovirt.engine.api.common.util.LinkHelper.combine ( "/foo" , "/bar" ) ) ; }

Target:
public void testCombine ( ) throws java.lang.Exception { assertEquals ( "/foo/bar" , org.ovirt.engine.api.utils.LinkHelper.combine ( "/foo" , "bar" ) ) ; assertEquals ( "/foo/bar" , org.ovirt.engine.api.utils.LinkHelper.combine ( "/foo/" , "bar" ) ) ; assertEquals ( "/foo/bar" , org.ovirt.engine.api.utils.LinkHelper.combine ( "/foo/" , "/bar" ) ) ; assertEquals ( "/foo/bar" , org.ovirt.engine.api.utils.LinkHelper.combine ( "/foo" , "/bar" ) ) ; }
Source:
public static java.lang.String map ( org.ovirt.engine.core.common.businessentities.VdsProtocol protocol , java.lang.String template ) { java.lang.String result = null ; if ( protocol != null ) { switch ( protocol ) { case STOMP : result = VdsProtocol.STOMP.value ( ) ; break ; case AMQP : result = VdsProtocol.AMQP.value ( ) ; break ; case XML : default : result = VdsProtocol.XML.value ( ) ; break ; } } return result ; }

Target:
public static org.ovirt.engine.api.model.HostProtocol map ( org.ovirt.engine.core.common.businessentities.VdsProtocol protocol , org.ovirt.engine.api.model.HostProtocol template ) { org.ovirt.engine.api.model.HostProtocol result = null ; if ( protocol != null ) { switch ( protocol ) { case STOMP : result = org.ovirt.engine.api.model.HostProtocol.STOMP ; break ; case AMQP : result = org.ovirt.engine.api.model.HostProtocol.AMQP ; break ; case XML : default : result = org.ovirt.engine.api.model.HostProtocol.XML ; break ; } } return result ; }
Source:
public java.util.ArrayList < org.ovirt.engine.core.common.action.VdcReturnValueBase > runMultipleActions ( org.ovirt.engine.core.common.action.VdcActionType actionType , java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > parameters , boolean isRunOnlyIfAllValidationPass ) { return runMultipleActions ( actionType , parameters , isRunOnlyIfAllValidationPass , false ) ; }

Target:
public java.util.List < org.ovirt.engine.core.common.action.ActionReturnValue > runMultipleActions ( org.ovirt.engine.core.common.action.ActionType actionType , java.util.List < org.ovirt.engine.core.common.action.ActionParametersBase > parameters , boolean isRunOnlyIfAllValidationPass , boolean waitForResult ) { org.ovirt.engine.core.common.action.ActionReturnValue returnValue = notAllowToRunAction ( actionType ) ; if ( returnValue != null ) { java.util.List < org.ovirt.engine.core.common.action.ActionReturnValue > list = new java.util.ArrayList < > ( ) ; list.add ( returnValue ) ; return list ; } else { return runMultipleActionsImpl ( actionType , parameters , false , isRunOnlyIfAllValidationPass , waitForResult , null ) ; } }
Source:
public void onClick ( com.google.gwt.event.dom.client.ClickEvent event ) { if ( eventButton.getValue ( ) ) { alertButton.setValue ( false ) ; taskButton.setValue ( false ) ; tablePanel.clear ( ) ; tablePanel.add ( eventsTable ) ; firstRowTablePanel.clear ( ) ; firstRowTablePanel.add ( _eventsTable ) ; message.setText ( constants.lastMsgEventFooter ( ) ) ; collapseButton.setVisible ( false ) ; } else { eventButton.setValue ( true ) ; } }

Target:
public void onClick ( com.google.gwt.event.dom.client.ClickEvent event ) { if ( eventButton.getValue ( ) ) { alertButton.setValue ( false ) ; taskButton.setValue ( false ) ; tablePanel.clear ( ) ; tablePanel.add ( eventsTable ) ; firstRowTablePanel.clear ( ) ; firstRowTablePanel.add ( _eventsTable ) ; message.setText ( org.ovirt.engine.ui.webadmin.widget.footer.AlertsEventsFooterView.constants.lastMsgEventFooter ( ) ) ; collapseButton.setVisible ( false ) ; } else { eventButton.setValue ( true ) ; } }
Source:
public void getClustersHavingHosts ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > list = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ) ( source ) ) ; java.util.Collections.sort ( list , new org.ovirt.engine.core.common.businessentities.comparators.NameableComparator ( ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllClustersHavingHosts , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }

Target:
public void getClustersHavingHosts ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source != null ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > list = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ) ( source ) ) ; java.util.Collections.sort ( list , new org.ovirt.engine.core.common.businessentities.comparators.NameableComparator ( ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllClustersHavingHosts , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }
Source:
public boolean equals ( java.lang.Object obj ) { if ( ( this ) == obj ) { return true ; } if ( ! ( obj instanceof org.ovirt.engine.core.common.action.MigrateVmParameters ) ) { return false ; } org.ovirt.engine.core.common.action.MigrateVmParameters other = ( ( org.ovirt.engine.core.common.action.MigrateVmParameters ) ( obj ) ) ; return ( ( ( forceMigrationForNonMigratableVm ) == ( other.forceMigrationForNonMigratableVm ) ) && ( org.ovirt.engine.core.common.utils.ObjectUtils.objectsEqual ( getVmId ( ) , other.getVmId ( ) ) ) ) && ( org.ovirt.engine.core.common.utils.ObjectUtils.objectsEqual ( targetVdsGroupId , other.targetVdsGroupId ) ) ; }

Target:
public boolean equals ( java.lang.Object obj ) { if ( ( this ) == obj ) { return true ; } if ( ! ( obj instanceof org.ovirt.engine.core.common.action.MigrateVmParameters ) ) { return false ; } org.ovirt.engine.core.common.action.MigrateVmParameters other = ( ( org.ovirt.engine.core.common.action.MigrateVmParameters ) ( obj ) ) ; return ( ( ( forceMigrationForNonMigratableVm ) == ( other.forceMigrationForNonMigratableVm ) ) && ( java.util.Objects.equals ( getVmId ( ) , other.getVmId ( ) ) ) ) && ( java.util.Objects.equals ( targetVdsGroupId , other.targetVdsGroupId ) ) ; }
Source:
public void modifyCredentials ( java.lang.String pool , java.lang.String user , java.lang.String currentPassword , java.lang.String newPassword ) throws org.ovirt.engineextensions.aaa.ldap.LDAPException { org.ovirt.engineextensions.aaa.ldap.PasswordModifyExtendedResult passwordModifyResult = ( ( org.ovirt.engineextensions.aaa.ldap.PasswordModifyExtendedResult ) ( getConnectionPool ( pool ) . processExtendedOperation ( new org.ovirt.engineextensions.aaa.ldap.PasswordModifyExtendedRequest ( user , currentPassword , newPassword ) ) ) ) ; if ( ( passwordModifyResult.getResultCode ( ) ) != ( ResultCode.SUCCESS ) ) { throw new org.ovirt.engineextensions.aaa.ldap.LDAPException ( passwordModifyResult ) ; } }

Target:
public void modifyCredentials ( java.lang.String pool , java.lang.String user , java.lang.String currentPassword , java.lang.String newPassword , java.util.Map < java.lang.String , java.lang.Object > vars ) throws java.lang.Exception { org.ovirt.engineextensions.aaa.ldap.PasswordModifyExtendedResult passwordModifyResult = ( ( org.ovirt.engineextensions.aaa.ldap.PasswordModifyExtendedResult ) ( getConnectionPoolEntry ( pool , vars ) . connectionPool.processExtendedOperation ( new org.ovirt.engineextensions.aaa.ldap.PasswordModifyExtendedRequest ( user , currentPassword , newPassword ) ) ) ) ; if ( ( passwordModifyResult.getResultCode ( ) ) != ( ResultCode.SUCCESS ) ) { throw new org.ovirt.engineextensions.aaa.ldap.LDAPException ( passwordModifyResult ) ; } }
Source:
public com.google.gwt.safehtml.shared.SafeHtml getTooltip ( org.ovirt.engine.core.common.scheduling.PolicyUnit object ) { java.lang.String tooltipContent = null ; if ( object.isInternal ( ) ) { tooltipContent = org.ovirt.engine.ui.webadmin.section.main.view.popup.scheduling.ManagePolicyUnitPopupView.constants.internalPolicyUnit ( ) ; } else { tooltipContent = org.ovirt.engine.ui.webadmin.section.main.view.popup.scheduling.ManagePolicyUnitPopupView.constants.externalPolicyUnit ( ) ; } return com.google.gwt.safehtml.shared.SafeHtmlUtils.fromSafeConstant ( tooltipContent ) ; }

Target:
public java.lang.String getTooltip ( org.ovirt.engine.core.common.scheduling.PolicyUnit object ) { java.lang.String tooltipContent = "" ; if ( object.isInternal ( ) ) { tooltipContent = org.ovirt.engine.ui.webadmin.section.main.view.popup.scheduling.ManagePolicyUnitPopupView.constants.internalPolicyUnit ( ) ; } else { tooltipContent = org.ovirt.engine.ui.webadmin.section.main.view.popup.scheduling.ManagePolicyUnitPopupView.constants.externalPolicyUnit ( ) ; } return tooltipContent ; }
Source:
public void testInvalidUpdateOfStatusRestrictedEditableFieldOnRunningHost ( ) { org.ovirt.engine.core.common.businessentities.VdsStatic src = new org.ovirt.engine.core.common.businessentities.VdsStatic ( ) ; src.setClusterId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; org.ovirt.engine.core.common.businessentities.VdsStatic dest = new org.ovirt.engine.core.common.businessentities.VdsStatic ( ) ; dest.setClusterId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; boolean updateIsValid = org.ovirt.engine.core.bll.VdsHandler.isUpdateValid ( src , dest , VDSStatus.Up ) ; org.junit.Assert.assertFalse ( "Update should not be valid for different cluster IDs on a running host" , updateIsValid ) ; }

Target:
public void testInvalidUpdateOfStatusRestrictedEditableFieldOnRunningHost ( ) { org.ovirt.engine.core.common.businessentities.VdsStatic src = new org.ovirt.engine.core.common.businessentities.VdsStatic ( ) ; src.setClusterId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; org.ovirt.engine.core.common.businessentities.VdsStatic dest = new org.ovirt.engine.core.common.businessentities.VdsStatic ( ) ; dest.setClusterId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; boolean updateIsValid = vdsHandler.isUpdateValid ( src , dest , VDSStatus.Up ) ; org.junit.Assert.assertFalse ( "Update should not be valid for different cluster IDs on a running host" , updateIsValid ) ; }
Source:
protected void handleSpecificCommandActions ( ) { if ( ( mVmList.size ( ) ) > 0 ) { org.ovirt.engine.core.bll.StopVdsCommand.restartVdsVms ( ) ; org.ovirt.engine.core.bll.Backend.getInstance ( ) . getResourceManager ( ) . RunVdsCommand ( VDSCommandType.UpdateVdsVMsCleared , new org.ovirt.engine.core.common.vdscommands.UpdateVdsVMsClearedVDSCommandParameters ( org.ovirt.engine.core.bll.StopVdsCommand.getVds ( ) . getId ( ) ) ) ; } }

Target:
protected void handleSpecificCommandActions ( ) { if ( ( mVmList.size ( ) ) > 0 ) { org.ovirt.engine.core.bll.RestartVdsVmsOperation restartVmsOper = new org.ovirt.engine.core.bll.RestartVdsVmsOperation ( org.ovirt.engine.core.bll.StopVdsCommand.getExecutionContext ( ) , org.ovirt.engine.core.bll.StopVdsCommand.getVds ( ) ) ; restartVmsOper.restartVms ( mVmList ) ; org.ovirt.engine.core.bll.Backend.getInstance ( ) . getResourceManager ( ) . RunVdsCommand ( VDSCommandType.UpdateVdsVMsCleared , new org.ovirt.engine.core.common.vdscommands.UpdateVdsVMsClearedVDSCommandParameters ( org.ovirt.engine.core.bll.StopVdsCommand.getVds ( ) . getId ( ) ) ) ; } }
Source:
protected javax.ws.rs.core.Response add ( org.ovirt.engine.api.model.VnicProfile vnicProfile ) { validateParameters ( vnicProfile ) ; org.ovirt.engine.core.common.action.AddVnicProfileParameters addVnicProfileParameters = new org.ovirt.engine.core.common.action.AddVnicProfileParameters ( map ( vnicProfile ) , ( ! ( vnicProfile.isSetNetworkFilter ( ) ) ) ) ; return performCreate ( VdcActionType.AddVnicProfile , addVnicProfileParameters , new org.ovirt.engine.api.restapi.resource.QueryIdResolver < org.ovirt.engine.core.compat.Guid > ( org.ovirt.engine.core.common.queries.VdcQueryType.GetVnicProfileById , org.ovirt.engine.core.common.queries.IdQueryParameters.class ) ) ; }

Target:
protected javax.ws.rs.core.Response add ( org.ovirt.engine.api.model.VnicProfile vnicProfile ) { validateParameters ( vnicProfile ) ; org.ovirt.engine.core.common.action.AddVnicProfileParameters addVnicProfileParameters = new org.ovirt.engine.core.common.action.AddVnicProfileParameters ( map ( vnicProfile ) , ( ! ( vnicProfile.isSetNetworkFilter ( ) ) ) ) ; return performCreate ( ActionType.AddVnicProfile , addVnicProfileParameters , new org.ovirt.engine.api.restapi.resource.QueryIdResolver < org.ovirt.engine.core.compat.Guid > ( org.ovirt.engine.core.common.queries.VdcQueryType.GetVnicProfileById , org.ovirt.engine.core.common.queries.IdQueryParameters.class ) ) ; }
Source:
protected org.ovirt.engine.core.common.businessentities.DbUser getEntity ( int index ) { org.ovirt.engine.core.common.businessentities.DbUser entity = new org.ovirt.engine.core.common.businessentities.DbUser ( ) ; entity.setId ( GUIDS [ index ] ) ; entity.setExternalId ( EXTERNAL_IDS [ index ] ) ; entity.setLoginName ( NAMES [ index ] ) ; entity.setGroupNames ( new java.util.HashSet < java.lang.String > ( java.util.Arrays.asList ( org.ovirt.engine.api.restapi.resource.BackendUsersResourceTest.GROUPS.split ( "," ) ) ) ) ; entity.setNamespace ( org.ovirt.engine.api.restapi.resource.BackendUsersResourceTest.NAMESPACE ) ; entity.setDomain ( org.ovirt.engine.api.restapi.resource.DOMAIN ) ; return entity ; }

Target:
protected org.ovirt.engine.core.common.businessentities.aaa.DbUser getEntity ( int index ) { org.ovirt.engine.core.common.businessentities.aaa.DbUser entity = new org.ovirt.engine.core.common.businessentities.aaa.DbUser ( ) ; entity.setId ( GUIDS [ index ] ) ; entity.setExternalId ( EXTERNAL_IDS [ index ] ) ; entity.setLoginName ( NAMES [ index ] ) ; entity.setGroupNames ( new java.util.HashSet < java.lang.String > ( java.util.Arrays.asList ( org.ovirt.engine.api.restapi.resource.BackendUsersResourceTest.GROUPS.split ( "," ) ) ) ) ; entity.setNamespace ( org.ovirt.engine.api.restapi.resource.BackendUsersResourceTest.NAMESPACE ) ; entity.setDomain ( org.ovirt.engine.api.restapi.resource.DOMAIN ) ; return entity ; }
Source:
public static void getGlusterHooks ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterHooks , new org.ovirt.engine.core.common.queries.gluster.GlusterParameters ( clusterId ) , aQuery ) ; }

Target:
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.getInstance ( ) . runQuery ( VdcQueryType.GetServerSSHPublicKey , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }
Source:
public void testDiscoverGeoRepData ( ) { org.mockito.Mockito.doReturn ( getSessionsVDSReturnVal ( true , 2 ) ) . when ( syncJob ) . runVdsCommand ( org.mockito.Matchers.eq ( VDSCommandType.GetGlusterVolumeGeoRepStatus ) , org.mockito.Matchers.any ( org.ovirt.engine.core.common.vdscommands.gluster.GlusterVolumeGeoRepSessionVDSParameters.class ) ) ; syncJob.discoverGeoRepData ( ) ; org.mockito.Mockito.verify ( geoRepDao , org.mockito.Mockito.times ( 2 ) ) . save ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSession.class ) ) ; }

Target:
public void testDiscoverGeoRepData ( ) { org.mockito.Mockito.doReturn ( getSessionsVDSReturnVal ( true , 2 ) ) . when ( syncJob ) . runVdsCommand ( org.mockito.Matchers.eq ( VDSCommandType.GetGlusterVolumeGeoRepSessionList ) , org.mockito.Matchers.any ( org.ovirt.engine.core.common.vdscommands.gluster.GlusterVolumeGeoRepSessionVDSParameters.class ) ) ; syncJob.discoverGeoRepData ( ) ; org.mockito.Mockito.verify ( geoRepDao , org.mockito.Mockito.times ( 2 ) ) . save ( org.mockito.Matchers.any ( org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSession.class ) ) ; }
Source:
public java.util.List < org.ovirt.engine.core.common.businessentities.VDS > filter ( java.util.List < org.ovirt.engine.core.common.businessentities.VDS > data ) { for ( org.ovirt.engine.core.common.businessentities.VDS vds : data ) { vds.setCpuName ( getCpuFlagsManagerHandler ( ) . findMaxServerCpuByFlags ( vds.getCpuFlags ( ) , vds.getVdsGroupCompatibilityVersion ( ) ) ) ; } return data ; }

Target:
public java.util.List < org.ovirt.engine.core.common.businessentities.VDS > filter ( java.util.List < org.ovirt.engine.core.common.businessentities.VDS > data ) { for ( org.ovirt.engine.core.common.businessentities.VDS vds : data ) { vds.setCpuName ( cpuFlagsManagerHandler.findMaxServerCpuByFlags ( vds.getCpuFlags ( ) , vds.getVdsGroupCompatibilityVersion ( ) ) ) ; } return data ; }
Source:
private static java.util.List < org.ovirt.engine.core.common.businessentities.VDSGroup > createClusterList ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VDSGroup > clusters = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ( ) ; org.ovirt.engine.core.common.businessentities.VDSGroup cluster = new org.ovirt.engine.core.common.businessentities.VDSGroup ( ) ; cluster.setcompatibility_version ( org.ovirt.engine.core.bll.storage.UpdateStoragePoolCommandTest.VERSION_1_0 ) ; cluster.setname ( "firstCluster" ) ; clusters.add ( cluster ) ; return clusters ; }

Target:
private static java.util.List < org.ovirt.engine.core.common.businessentities.VDSGroup > createClusterList ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VDSGroup > clusters = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ( ) ; org.ovirt.engine.core.common.businessentities.VDSGroup cluster = new org.ovirt.engine.core.common.businessentities.VDSGroup ( ) ; cluster.setcompatibility_version ( org.ovirt.engine.core.bll.storage.UpdateStoragePoolCommandTest.VERSION_1_0 ) ; cluster.setName ( "firstCluster" ) ; clusters.add ( cluster ) ; return clusters ; }
Source:
public void OnTimer ( org.ovirt.engine.core.compat.Guid domainId ) { synchronized ( _lockObject ) { if ( _domainsInProblem.containsKey ( domainId ) ) { org.ovirt.engine.core.vdsbroker.irsbroker.IrsBrokerCommand.log.info ( ( "starting ProcessDomainRecovery for domain " + domainId ) ) ; ProcessDomainRecovery ( domainId ) ; } _timers.remove ( domainId ) ; } }

Target:
public void OnTimer ( org.ovirt.engine.core.compat.Guid domainId ) { synchronized ( _lockObject ) { if ( _domainsInProblem.containsKey ( domainId ) ) { org.ovirt.engine.core.vdsbroker.irsbroker.IrsBrokerCommand.log.info ( ( "starting ProcessDomainRecovery for domain " + ( org.ovirt.engine.core.vdsbroker.irsbroker.IrsBrokerCommand.IrsProxyData.getDomainIdTuple ( domainId ) ) ) ) ; ProcessDomainRecovery ( domainId ) ; } _timers.remove ( domainId ) ; } }
Source:
protected javax.ws.rs.core.UriInfo addMatrixParameterExpectations ( javax.ws.rs.core.UriInfo mockUriInfo , java.lang.String matrixParameter ) { javax.ws.rs.core.MultivaluedMap < java.lang.String , java.lang.String > matrixParams = new org.jboss.resteasy.specimpl.MultivaluedMapImpl < java.lang.String , java.lang.String > ( ) ; matrixParams.put ( matrixParameter , null ) ; javax.ws.rs.core.PathSegment segment = control.createMock ( javax.ws.rs.core.PathSegment.class ) ; org.easymock.EasyMock.expect ( segment.getMatrixParameters ( ) ) . andReturn ( matrixParams ) . anyTimes ( ) ; org.easymock.EasyMock.expect ( mockUriInfo.getPathSegments ( ) ) . andReturn ( java.util.Arrays.asList ( segment ) ) . anyTimes ( ) ; return mockUriInfo ; }

Target:
protected javax.ws.rs.core.UriInfo addMatrixParameterExpectations ( javax.ws.rs.core.UriInfo mockUriInfo , java.lang.String matrixParameter ) { javax.ws.rs.core.MultivaluedMap < java.lang.String , java.lang.String > matrixParams = new org.ovirt.engine.api.restapi.resource.AbstractBackendBaseTest.SimpleMultivaluedMap < > ( ) ; matrixParams.put ( matrixParameter , null ) ; javax.ws.rs.core.PathSegment segment = control.createMock ( javax.ws.rs.core.PathSegment.class ) ; org.easymock.EasyMock.expect ( segment.getMatrixParameters ( ) ) . andReturn ( matrixParams ) . anyTimes ( ) ; org.easymock.EasyMock.expect ( mockUriInfo.getPathSegments ( ) ) . andReturn ( java.util.Arrays.asList ( segment ) ) . anyTimes ( ) ; return mockUriInfo ; }
Source:
private static void addVideoDevice ( org.ovirt.engine.core.common.businessentities.VM vm ) { org.ovirt.engine.core.bll.utils.VmDeviceUtils.addManagedDevice ( new org.ovirt.engine.core.common.businessentities.VmDeviceId ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) , vm.getId ( ) ) , VmDeviceType.VIDEO , vm.getDefaultDisplayType ( ) . getVmDeviceType ( ) , org.ovirt.engine.core.bll.utils.VmDeviceUtils.getMemExpr ( vm.getNumOfMonitors ( ) ) , true , true ) ; }

Target:
private static void addVideoDevice ( org.ovirt.engine.core.common.businessentities.VmBase vm ) { org.ovirt.engine.core.bll.utils.VmDeviceUtils.addManagedDevice ( new org.ovirt.engine.core.common.businessentities.VmDeviceId ( org.ovirt.engine.core.compat.Guid.NewGuid ( ) , vm.getId ( ) ) , VmDeviceGeneralType.VIDEO , vm.getDefaultDisplayType ( ) . getVmDeviceType ( ) , org.ovirt.engine.core.bll.utils.VmDeviceUtils.getMemExpr ( vm.getNumOfMonitors ( ) ) , true , true , null ) ; }
Source:
public org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeOptionEntity mapRow ( java.sql.ResultSet rs , int rowNum ) throws java.sql.SQLException { org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeOptionEntity option = new org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeOptionEntity ( ) ; option.setId ( org.ovirt.engine.core.compat.Guid.createGuidFromString ( rs.getString ( "id" ) ) ) ; option.setVolumeId ( org.ovirt.engine.core.compat.Guid.createGuidFromString ( rs.getString ( "volume_id" ) ) ) ; option.setKey ( rs.getString ( "option_key" ) ) ; option.setValue ( rs.getString ( "option_val" ) ) ; return option ; }

Target:
public org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeOptionEntity mapRow ( java.sql.ResultSet rs , int rowNum ) throws java.sql.SQLException { org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeOptionEntity option = new org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeOptionEntity ( ) ; option.setId ( org.ovirt.engine.core.compat.Guid.createGuidFromStringDefaultEmpty ( rs.getString ( "id" ) ) ) ; option.setVolumeId ( org.ovirt.engine.core.compat.Guid.createGuidFromStringDefaultEmpty ( rs.getString ( "volume_id" ) ) ) ; option.setKey ( rs.getString ( "option_key" ) ) ; option.setValue ( rs.getString ( "option_val" ) ) ; return option ; }
Source:
public void getVdsGroupWithVm ( ) { final org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase b = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.TestAuditLogableBase ( ) ; final org.ovirt.engine.core.common.businessentities.VM v = new org.ovirt.engine.core.common.businessentities.VM ( ) ; v.setVdsGroupId ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID ) ; b.setVm ( v ) ; final org.ovirt.engine.core.common.businessentities.VDSGroup g = b.getVdsGroup ( ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID , g.getId ( ) ) ; }

Target:
public void getClusterWithVm ( ) { final org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase b = new org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.TestAuditLogableBase ( ) ; final org.ovirt.engine.core.common.businessentities.VM v = new org.ovirt.engine.core.common.businessentities.VM ( ) ; v.setClusterId ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID ) ; b.setVm ( v ) ; final org.ovirt.engine.core.common.businessentities.Cluster g = b.getCluster ( ) ; org.junit.Assert.assertEquals ( org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBaseTest.GUID , g.getId ( ) ) ; }
Source:
protected void removeVmNetwork ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmNetworkInterface > interfaces = getVmNetworkInterfaceDao ( ) . getAllForVm ( org.ovirt.engine.core.bll.VmCommand.getVmId ( ) ) ; if ( interfaces != null ) { for ( org.ovirt.engine.core.common.businessentities.VmNetworkInterface iface : interfaces ) { org.ovirt.engine.core.bll.MacPoolManager.getInstance ( ) . freeMac ( iface.getMacAddress ( ) ) ; } } }

Target:
protected void removeVmNetwork ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.VmNetworkInterface > interfaces = getVmNetworkInterfaceDao ( ) . getAllForVm ( org.ovirt.engine.core.bll.VmCommand.getVmId ( ) ) ; if ( interfaces != null ) { for ( org.ovirt.engine.core.common.businessentities.VmNetworkInterface iface : interfaces ) { org.ovirt.engine.core.bll.network.MacPoolManager.getInstance ( ) . freeMac ( iface.getMacAddress ( ) ) ; } } }
Source:
public static org.ovirt.engine.core.common.businessentities.StorageServerConnections findConnectionWithSameDetails ( org.ovirt.engine.core.common.businessentities.StorageServerConnections connection ) { java.util.List < org.ovirt.engine.core.common.businessentities.StorageServerConnections > connections = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStorageServerConnectionDao ( ) . getAllForConnection ( connection ) ; for ( org.ovirt.engine.core.common.businessentities.StorageServerConnections dbConnection : connections ) { if ( org.ovirt.engine.core.common.utils.ObjectUtils.objectsEqual ( dbConnection.getpassword ( ) , connection.getpassword ( ) ) ) { return dbConnection ; } } return null ; }

Target:
public static org.ovirt.engine.core.common.businessentities.StorageServerConnections findConnectionWithSameDetails ( org.ovirt.engine.core.common.businessentities.StorageServerConnections connection ) { java.util.List < org.ovirt.engine.core.common.businessentities.StorageServerConnections > connections = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getStorageServerConnectionDao ( ) . getAllForConnection ( connection ) ; for ( org.ovirt.engine.core.common.businessentities.StorageServerConnections dbConnection : connections ) { if ( java.util.Objects.equals ( dbConnection.getpassword ( ) , connection.getpassword ( ) ) ) { return dbConnection ; } } return null ; }
Source:
public void testUpdateNotFound ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpEntityQueryExpectations ( 1 , 0 , true ) ; try { resource.update ( org.ovirt.engine.api.restapi.resource.BackendMacPoolResourceTest.getModel ( 0 ) ) ; fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }

Target:
public void testUpdateNotFound ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpEntityQueryExpectations ( 1 , 0 , true ) ; try { resource.update ( org.ovirt.engine.api.restapi.resource.BackendMacPoolResourceTest.getModel ( 0 ) ) ; org.junit.Assert.fail ( "expected WebApplicationException" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyNotFoundException ( wae ) ; } }
Source:
private void newEntity ( ) { org.ovirt.engine.core.common.businessentities.VM vm = ( ( org.ovirt.engine.core.common.businessentities.VM ) ( getEntity ( ) ) ) ; if ( ( vm == null ) || ( ( getWindow ( ) ) != null ) ) { return ; } org.ovirt.engine.ui.uicommonweb.models.vms.SnapshotModel model = org.ovirt.engine.ui.uicommonweb.models.vms.SnapshotModel.createNewSnapshotModel ( vm , this ) ; setWindow ( model ) ; }

Target:
private void newEntity ( ) { org.ovirt.engine.core.common.businessentities.VM vm = ( ( org.ovirt.engine.core.common.businessentities.VM ) ( getEntity ( ) ) ) ; if ( ( vm == null ) || ( ( getWindow ( ) ) != null ) ) { return ; } org.ovirt.engine.ui.uicommonweb.models.vms.SnapshotModel model = org.ovirt.engine.ui.uicommonweb.models.vms.SnapshotModel.createNewSnapshotModel ( this ) ; setWindow ( model ) ; model.setVm ( vm ) ; model.initialize ( ) ; }
Source:
public void isCpuPinningValidWithoutPinnedHost ( ) { org.ovirt.engine.core.bll.VmManagementCommandBase < org.ovirt.engine.core.common.action.VmManagementParametersBase > test = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.VmManagementCommandBase < org.ovirt.engine.core.common.action.VmManagementParametersBase > ( org.ovirt.engine.core.compat.Guid.Empty ) ) ; org.ovirt.engine.core.common.businessentities.VmStatic vmStatic = new org.ovirt.engine.core.common.businessentities.VmStatic ( ) ; vmStatic.setNumOfSockets ( 6 ) ; vmStatic.setCpuPerSocket ( 2 ) ; vmStatic.setDedicatedVmForVds ( null ) ; junit.framework.Assert.assertFalse ( test.isCpuPinningValid ( "0#0" , vmStatic ) ) ; junit.framework.Assert.assertFalse ( test.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( VdcBllMessages.ACTION_TYPE_FAILED_VM_CANNOT_BE_PINNED_TO_CPU_WITH_UNDEFINED_HOST ) ) ; }

Target:
public void isCpuPinningValidWithoutPinnedHost ( ) { org.ovirt.engine.core.bll.VmManagementCommandBase < org.ovirt.engine.core.common.action.VmManagementParametersBase > test = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.VmManagementCommandBase < org.ovirt.engine.core.common.action.VmManagementParametersBase > ( org.ovirt.engine.core.compat.Guid.Empty ) ) ; org.ovirt.engine.core.common.businessentities.VmStatic vmStatic = new org.ovirt.engine.core.common.businessentities.VmStatic ( ) ; vmStatic.setNumOfSockets ( 6 ) ; vmStatic.setCpuPerSocket ( 2 ) ; vmStatic.setDedicatedVmForVds ( null ) ; org.junit.Assert.assertFalse ( test.isCpuPinningValid ( "0#0" , vmStatic ) ) ; org.junit.Assert.assertFalse ( test.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( VdcBllMessages.ACTION_TYPE_FAILED_VM_CANNOT_BE_PINNED_TO_CPU_WITH_UNDEFINED_HOST ) ) ; }
Source:
public static void getClusterNetworkList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId ) { if ( ( aQuery.converterCallback ) == null ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.Network > ( ) ; } return source ; } } ; } org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAllNetworksByClusterId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( clusterId ) , aQuery ) ; }

Target:
public static void getTemplateListByDataCenter ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.TemplateConverter ( ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmTemplatesByStoragePoolId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dataCenterId ) , aQuery ) ; }
Source:
private void endDefaultOperations ( ) { endUnlockOps ( ) ; if ( isTemplateVersion ( ) ) { org.ovirt.engine.core.bll.AddVmTemplateCommand.updateVmsJobIdMap.put ( org.ovirt.engine.core.bll.AddVmTemplateCommand.getParameters ( ) . getBaseTemplateId ( ) , null ) ; java.lang.String jobId = getSchedulUtil ( ) . scheduleAOneTimeJob ( this , "updateVmVersion" , new java.lang.Class [ 0 ] , new java.lang.Object [ 0 ] , 0 , java.util.concurrent.TimeUnit.SECONDS ) ; org.ovirt.engine.core.bll.AddVmTemplateCommand.updateVmsJobIdMap.put ( org.ovirt.engine.core.bll.AddVmTemplateCommand.getParameters ( ) . getBaseTemplateId ( ) , jobId ) ; } }

Target:
private void endDefaultOperations ( ) { endUnlockOps ( ) ; if ( isTemplateVersion ( ) ) { org.ovirt.engine.core.bll.AddVmTemplateCommand.updateVmsJobIdMap.put ( org.ovirt.engine.core.bll.AddVmTemplateCommand.getParameters ( ) . getBaseTemplateId ( ) , StringUtils.EMPTY ) ; java.lang.String jobId = getSchedulUtil ( ) . scheduleAOneTimeJob ( this , "updateVmVersion" , new java.lang.Class [ 0 ] , new java.lang.Object [ 0 ] , 0 , java.util.concurrent.TimeUnit.SECONDS ) ; org.ovirt.engine.core.bll.AddVmTemplateCommand.updateVmsJobIdMap.put ( org.ovirt.engine.core.bll.AddVmTemplateCommand.getParameters ( ) . getBaseTemplateId ( ) , jobId ) ; } }
Source:
protected void ExecuteVdsBrokerCommand ( ) { status = org.ovirt.engine.core.vdsbroker.vdsbroker.DisconnectStoragePoolVDSCommand.getBroker ( ) . disconnectStoragePool ( org.ovirt.engine.core.vdsbroker.vdsbroker.DisconnectStoragePoolVDSCommand.getParameters ( ) . getStoragePoolId ( ) . toString ( ) , org.ovirt.engine.core.vdsbroker.vdsbroker.DisconnectStoragePoolVDSCommand.getParameters ( ) . getvds_spm_id ( ) , org.ovirt.engine.core.vdsbroker.vdsbroker.DisconnectStoragePoolVDSCommand.getParameters ( ) . getStoragePoolId ( ) . toString ( ) ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.DisconnectStoragePoolVDSCommand.proceedProxyReturnValue ( ) ; }

Target:
protected void executeVdsBrokerCommand ( ) { status = org.ovirt.engine.core.vdsbroker.vdsbroker.DisconnectStoragePoolVDSCommand.getBroker ( ) . disconnectStoragePool ( org.ovirt.engine.core.vdsbroker.vdsbroker.DisconnectStoragePoolVDSCommand.getParameters ( ) . getStoragePoolId ( ) . toString ( ) , org.ovirt.engine.core.vdsbroker.vdsbroker.DisconnectStoragePoolVDSCommand.getParameters ( ) . getvds_spm_id ( ) , org.ovirt.engine.core.vdsbroker.vdsbroker.DisconnectStoragePoolVDSCommand.getParameters ( ) . getStoragePoolId ( ) . toString ( ) ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.DisconnectStoragePoolVDSCommand.proceedProxyReturnValue ( ) ; }
Source:
public void testDisksUsagesWithEmptyEntry ( ) { java.lang.Object [ ] disksUsages = initDisksUsageData ( ) ; disksUsages [ 1 ] = new java.util.HashMap < java.lang.String , java.lang.String > ( ) ; org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcStruct xml = setDisksUsageInXmlRpc ( disksUsages ) ; validateDisksUsagesList ( getVmStatistics ( ) , disksUsages , xml ) ; }

Target:
public void testDisksUsagesWithEmptyEntry ( ) { java.lang.Object [ ] disksUsages = org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectBuilderTest.initDisksUsageData ( ) ; disksUsages [ 1 ] = new java.util.HashMap < java.lang.String , java.lang.String > ( ) ; org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcStruct xml = org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectBuilderTest.setDisksUsageInXmlRpc ( disksUsages ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectBuilderTest.validateDisksUsagesList ( getVmStatistics ( ) , disksUsages , xml ) ; }
Source:
private java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > getImagesList ( ) { if ( ( ( org.ovirt.engine.core.bll.RestoreAllSnapshotsCommand.getParameters ( ) . getImages ( ) ) == null ) && ( ! ( getSnapshotId ( ) . equals ( Guid.Empty ) ) ) ) { org.ovirt.engine.core.bll.RestoreAllSnapshotsCommand.getParameters ( ) . setImages ( org.ovirt.engine.core.bll.RestoreAllSnapshotsCommand.getDiskImageDao ( ) . getAllSnapshotsForVmSnapshot ( getSnapshotId ( ) ) ) ; } return org.ovirt.engine.core.bll.RestoreAllSnapshotsCommand.getParameters ( ) . getImages ( ) ; }

Target:
private java.util.List < org.ovirt.engine.core.common.businessentities.DiskImage > getImagesList ( ) { if ( ( ( org.ovirt.engine.core.bll.RestoreAllSnapshotsCommand.getParameters ( ) . getImages ( ) ) == null ) && ( ! ( getSnapshot ( ) . getId ( ) . equals ( Guid.Empty ) ) ) ) { org.ovirt.engine.core.bll.RestoreAllSnapshotsCommand.getParameters ( ) . setImages ( org.ovirt.engine.core.bll.RestoreAllSnapshotsCommand.getDiskImageDao ( ) . getAllSnapshotsForVmSnapshot ( getSnapshot ( ) . getId ( ) ) ) ; } return org.ovirt.engine.core.bll.RestoreAllSnapshotsCommand.getParameters ( ) . getImages ( ) ; }
Source:
private org.ovirt.engine.api.model.Network getModel ( int index ) { org.ovirt.engine.api.model.Network model = new org.ovirt.engine.api.model.Network ( ) ; model.setId ( GUIDS [ 0 ] . toString ( ) ) ; model.setName ( NAMES [ index ] ) ; model.setDescription ( DESCRIPTIONS [ index ] ) ; return model ; }

Target:
protected void setUpGetNetworksByDataCenterExpectations ( int times , java.lang.Object failure ) throws java.lang.Exception { while ( ( times -- ) > 0 ) { setUpEntityQueryExpectations ( VdcQueryType.GetAllNetworks , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ 2 ] } , getEntityList ( ) , failure ) ; } }
Source:
public void testIncompleteMove ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; try { control.replay ( ) ; ( ( org.ovirt.engine.api.resource.VmDiskResource ) ( resource ) ) . move ( new org.ovirt.engine.api.model.Action ( ) ) ; fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "Action" , "move" , "storageDomain.id|name" ) ; } }

Target:
private void verifyActionResponse ( javax.ws.rs.core.Response r ) throws java.lang.Exception { verifyActionResponse ( r , ( ( ( "vms/" + ( org.ovirt.engine.api.restapi.resource.BackendVmDiskResourceTest.VM_ID ) ) + "/disks/" ) + ( org.ovirt.engine.api.restapi.resource.BackendVmDiskResourceTest.DISK_ID ) ) , false ) ; }
Source:
boolean isTaskOverPrePollingLapse ( ) { org.ovirt.engine.core.common.asynctasks.AsyncTaskParameters parameters = getParameters ( ) ; long taskStartTime = parameters.getDbAsyncTask ( ) . getStartTime ( ) . getTime ( ) ; java.lang.Integer prePollingPeriod = org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( org.ovirt.engine.core.common.config.ConfigValues.UknownTaskPrePollingLapse ) ; boolean idlePeriodPassed = ( ( java.lang.System.currentTimeMillis ( ) ) - taskStartTime ) > prePollingPeriod ; org.ovirt.engine.core.bll.tasks.SPMAsyncTask.log.infoFormat ( "task id {0} {1}. Pre-polling period is {2} millis. " , parameters.getVdsmTaskId ( ) , ( idlePeriodPassed ? "has passed pre-polling period time and should be polled" : "is in pre-polling period and should not be polled" ) , prePollingPeriod ) ; return idlePeriodPassed ; }

Target:
boolean isTaskOverPrePollingLapse ( ) { org.ovirt.engine.core.common.asynctasks.AsyncTaskParameters parameters = getParameters ( ) ; long taskStartTime = parameters.getDbAsyncTask ( ) . getStartTime ( ) . getTime ( ) ; java.lang.Integer prePollingPeriod = org.ovirt.engine.core.common.config.Config.< java.lang.Integer > getValue ( org.ovirt.engine.core.common.config.ConfigValues.UnknownTaskPrePollingLapse ) ; boolean idlePeriodPassed = ( ( java.lang.System.currentTimeMillis ( ) ) - taskStartTime ) > prePollingPeriod ; org.ovirt.engine.core.bll.tasks.SPMAsyncTask.log.infoFormat ( "task id {0} {1}. Pre-polling period is {2} millis. " , parameters.getVdsmTaskId ( ) , ( idlePeriodPassed ? "has passed pre-polling period time and should be polled" : "is in pre-polling period and should not be polled" ) , prePollingPeriod ) ; return idlePeriodPassed ; }
Source:
protected void onClosed ( final com.google.gwt.user.client.Event evt ) { org.ovirt.engine.ui.common.utils.ElementTooltipUtils.hideAllTooltips ( ) ; com.google.gwt.user.client.ui.RootPanel.detachNow ( this ) ; fireEvent ( new org.gwtbootstrap3.client.shared.event.AlertClosedEvent ( evt ) ) ; }

Target:
public void removeFromParent ( ) { com.google.gwt.user.client.ui.Widget parent = getParent ( ) ; if ( parent instanceof com.google.gwt.user.client.ui.HasWidgets ) { ( ( com.google.gwt.user.client.ui.HasWidgets ) ( parent ) ) . remove ( this ) ; } else { if ( com.google.gwt.user.client.ui.RootPanel.isInDetachList ( this ) ) { com.google.gwt.user.client.ui.RootPanel.detachNow ( this ) ; } } }
Source:
protected boolean isVmPartOfManualPool ( ) { if ( ( org.ovirt.engine.core.bll.RunVmCommand.getVm ( ) . getVmPoolId ( ) ) == null ) { return false ; } final org.ovirt.engine.core.common.businessentities.VmPool vmPool = org.ovirt.engine.core.bll.RunVmCommand.getDbFacade ( ) . getVmPoolDao ( ) . get ( org.ovirt.engine.core.bll.RunVmCommand.getVm ( ) . getVmPoolId ( ) ) ; return vmPool.getVmPoolType ( ) . equals ( VmPoolType.Manual ) ; }

Target:
protected boolean isVmPartOfManualPool ( ) { if ( ( org.ovirt.engine.core.bll.RunVmCommand.getVm ( ) . getVmPoolId ( ) ) == null ) { return false ; } final org.ovirt.engine.core.common.businessentities.VmPool vmPool = org.ovirt.engine.core.bll.RunVmCommand.getDbFacade ( ) . getVmPoolDao ( ) . get ( org.ovirt.engine.core.bll.RunVmCommand.getVm ( ) . getVmPoolId ( ) ) ; return vmPool.getVmPoolType ( ) . equals ( VmPoolType.MANUAL ) ; }