auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public java.lang.String getValue ( org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface object ) { java.util.ArrayList < java.lang.String > networkList = new java.util.ArrayList < java.lang.String > ( ) ; for ( org.ovirt.engine.core.common.businessentities.network.Network network : importModel.getNetworks ( ) ) { networkList.add ( network.getName ( ) ) ; } ( ( org.ovirt.engine.ui.webadmin.widget.table.cell.CustomSelectionCell ) ( getCell ( ) ) ) . setOptions ( networkList ) ; return networkList.isEmpty ( ) ? "" : networkList.get ( 0 ) ; }

Target:
public java.lang.String getValue ( org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface iface ) { org.ovirt.engine.ui.uicommonweb.models.vms.ImportNetworkData importNetworkData = importModel.getNetworkImportData ( iface ) ; java.util.List < java.lang.String > networkNames = importNetworkData.getNetworkNames ( ) ; ( ( org.ovirt.engine.ui.webadmin.widget.table.cell.CustomSelectionCell ) ( getCell ( ) ) ) . setOptions ( networkNames ) ; if ( networkNames.isEmpty ( ) ) { return "" ; } java.lang.String selectedNetworkName = importNetworkData.getSelectedNetworkName ( ) ; return selectedNetworkName != null ? selectedNetworkName : networkNames.get ( 0 ) ; }
Source:
public static void getVnicProfilesByDcId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dcId ) { 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.VnicProfileView > ( ) ; } return source ; } } ; } org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVnicProfilesByDataCenterId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( dcId ) , aQuery ) ; }

Target:
public static void GetExternalNetworkList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid providerId ) { 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.GetAllExternalNetworksOnProvider , new org.ovirt.engine.core.common.queries.IdQueryParameters ( providerId ) , aQuery ) ; }
Source:
protected org.ovirt.engine.core.common.action.VdcReturnValueBase executeChildCommand ( org.ovirt.engine.core.compat.Guid idInCommandsMap ) { org.ovirt.engine.core.bll.CommandBase < ? > command = childCommandsMap.get ( idInCommandsMap ) ; return getBackendCommandObjectsHandler ( ) . runAction ( command , getExecutionContext ( ) ) ; }

Target:
protected boolean isQuotaDependant ( ) { boolean result ; if ( ( getActionType ( ) . getQuotaDependency ( ) ) == ( VdcActionType.QuotaDependency.NONE ) ) result = false ; else if ( ! ( org.ovirt.engine.core.bll.CommandBase.isInternalExecution ( ) ) ) result = true ; else if ( getActionType ( ) . isQuotaDependentAsInternalCommand ( ) ) result = true ; else result = false ; return result ; }
Source:
public void testUpdateChildren ( ) { org.ovirt.engine.core.common.businessentities.tags tag = createTag ( "tag1" , "desc1" ) ; tagsDirector.AddTag ( tag ) ; tag.settag_name ( "booboo" ) ; tagsDirector.UpdateTag ( tag ) ; org.ovirt.engine.core.common.businessentities.tags rootTag = tagsDirector.GetRootTag ( ) ; tag = rootTag.getChildren ( ) . get ( 0 ) ; org.junit.Assert.assertEquals ( "booboo" , tag.gettag_name ( ) ) ; }

Target:
public void testUpdateChildren ( ) { org.ovirt.engine.core.common.businessentities.Tags tag = createTag ( "tag1" , "desc1" ) ; tagsDirector.AddTag ( tag ) ; tag.settag_name ( "booboo" ) ; tagsDirector.UpdateTag ( tag ) ; org.ovirt.engine.core.common.businessentities.Tags rootTag = tagsDirector.GetRootTag ( ) ; tag = rootTag.getChildren ( ) . get ( 0 ) ; org.junit.Assert.assertEquals ( "booboo" , tag.gettag_name ( ) ) ; }
Source:
public void getDiskList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.DiskImage > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.DiskImage > ( ) ; } } ; org.ovirt.engine.core.common.queries.SearchParameters searchParams = new org.ovirt.engine.core.common.queries.SearchParameters ( "Disks:" , org.ovirt.engine.core.common.interfaces.SearchType.Disk ) ; searchParams.setMaxCount ( 9999 ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , searchParams , aQuery ) ; }

Target:
public void getDiskList ( org.ovirt.engine.ui.frontend.AsyncQuery < java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > > aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.ListConverter < > ( ) ; org.ovirt.engine.core.common.queries.SearchParameters searchParams = new org.ovirt.engine.core.common.queries.SearchParameters ( "Disks:" , org.ovirt.engine.core.common.interfaces.SearchType.Disk ) ; searchParams.setMaxCount ( 9999 ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , searchParams , aQuery ) ; }
Source:
public void execute ( ) { com.google.gwt.dom.client.Node favicon = com.google.gwt.user.client.DOM.getElementById ( "id-link-favicon" ) ; if ( favicon != null ) { com.google.gwt.dom.client.Node parent = favicon.getParentNode ( ) ; favicon.removeFromParent ( ) ; parent.appendChild ( favicon ) ; } }

Target:
public void onValueChange ( com.google.gwt.event.logical.shared.ValueChangeEvent < java.lang.String > event ) { super . onValueChange ( event ) ; if ( clientAgentType.isFirefox ( ) ) { com.google.gwt.core.client.Scheduler.get ( ) . scheduleDeferred ( ( ) -> { com.google.gwt.dom.client.Node favicon = com.google.gwt.user.client.DOM.getElementById ( "id-link-favicon" ) ; if ( favicon != null ) { com.google.gwt.dom.client.Node parent = favicon.getParentNode ( ) ; favicon.removeFromParent ( ) ; parent.appendChild ( favicon ) ; } } ) ; } }
Source:
public org.ovirt.engine.core.bll.ValidationResult bootProtocolSetForDisplayNetwork ( ) { org.ovirt.engine.core.common.businessentities.network.IpConfiguration ipConfiguration = attachment.getIpConfiguration ( ) ; boolean failWhen = ( getNetworkCluster ( ) . isDisplay ( ) ) && ( ( ipConfiguration == null ) || ( ( ipConfiguration.getBootProtocol ( ) ) == ( org.ovirt.engine.core.common.businessentities.network.NetworkBootProtocol.NONE ) ) ) ; return org.ovirt.engine.core.bll.ValidationResult.failWith ( VdcBllMessages.ACTION_TYPE_FAILED_DISPLAY_NETWORK_HAS_NO_BOOT_PROTOCOL ) . when ( failWhen ) ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult bootProtocolSetForRoleNetwork ( ) { org.ovirt.engine.core.common.businessentities.network.IpConfiguration ipConfiguration = attachment.getIpConfiguration ( ) ; boolean failWhen = ( isRoleNetwork ( ) ) && ( ( ( ipConfiguration == null ) || ( ! ( ipConfiguration.hasPrimaryAddressSet ( ) ) ) ) || ( ( ipConfiguration.getPrimaryAddress ( ) . getBootProtocol ( ) ) == ( org.ovirt.engine.core.common.businessentities.network.NetworkBootProtocol.NONE ) ) ) ; return org.ovirt.engine.core.bll.ValidationResult.failWith ( EngineMessage.ACTION_TYPE_FAILED_ROLE_NETWORK_HAS_NO_BOOT_PROTOCOL , org.ovirt.engine.core.utils.ReplacementUtils.createSetVariableString ( org.ovirt.engine.core.bll.validator.NetworkAttachmentValidator.VAR_ACTION_TYPE_FAILED_ROLE_NETWORK_HAS_NO_BOOT_PROTOCOL_ENTITY , getNetwork ( ) . getName ( ) ) ) . when ( failWhen ) ; }
Source:
private static java.lang.String getVdsGroupRegexString ( org.ovirt.engine.core.searchbackend.SearchObjectAutoCompleter search ) { java.lang.StringBuilder query = new java.lang.StringBuilder ( ) ; query.append ( ".*" ) . append ( search.getDefaultSort ( SearchObjects.VDC_CLUSTER_OBJ_NAME ) ) . append ( ".*" ) . append ( search.getRelatedTableName ( SearchObjects.VDC_CLUSTER_OBJ_NAME , false ) ) . append ( ".* " ) ; return query.toString ( ) ; }

Target:
private static java.lang.String getClusterRegexString ( org.ovirt.engine.core.searchbackend.SearchObjectAutoCompleter search ) { java.lang.StringBuilder query = new java.lang.StringBuilder ( ) ; query.append ( ".*" ) . append ( search.getDefaultSort ( SearchObjects.VDC_CLUSTER_OBJ_NAME ) ) . append ( ".*" ) . append ( search.getRelatedTableName ( SearchObjects.VDC_CLUSTER_OBJ_NAME , false ) ) . append ( ".* " ) ; return query.toString ( ) ; }
Source:
public static void isMTUOverrideSupported ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String version ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.Boolean ) ( source ) ) . booleanValue ( ) : true ; } } ; org.ovirt.engine.core.common.queries.GetConfigurationValueParameters tempVar = new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.MTUOverrideSupported ) ; tempVar.setVersion ( version ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getConfigFromCache ( tempVar , aQuery ) ; }

Target:
public static void GetProviderCertificateChain ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.common.businessentities.Provider provider ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetProviderCertificateChain , new org.ovirt.engine.core.common.queries.ProviderQueryParameters ( provider ) , aQuery ) ; }
Source:
private boolean executeDeactivateCommnad ( boolean passContext ) { final org.ovirt.engine.core.common.action.StorageDomainPoolParametersBase params = new org.ovirt.engine.core.common.action.StorageDomainPoolParametersBase ( org.ovirt.engine.core.bll.storage.DeactivateStorageDomainWithOvfUpdateCommand.getStorageDomainId ( ) , org.ovirt.engine.core.bll.storage.DeactivateStorageDomainWithOvfUpdateCommand.getStoragePoolId ( ) ) ; params.setSkipChecks ( true ) ; params.setSkipLock ( true ) ; params.setShouldBeLogged ( true ) ; org.ovirt.engine.core.bll.context.CommandContext context = ( passContext ) ? org.ovirt.engine.core.bll.storage.DeactivateStorageDomainWithOvfUpdateCommand.cloneContext ( ) : null ; return org.ovirt.engine.core.bll.storage.DeactivateStorageDomainWithOvfUpdateCommand.getBackend ( ) . runInternalAction ( VdcActionType.DeactivateStorageDomain , params , context ) . getSucceeded ( ) ; }

Target:
private boolean executeDeactivateCommand ( boolean passContext ) { final org.ovirt.engine.core.common.action.StorageDomainPoolParametersBase params = new org.ovirt.engine.core.common.action.StorageDomainPoolParametersBase ( org.ovirt.engine.core.bll.storage.DeactivateStorageDomainWithOvfUpdateCommand.getStorageDomainId ( ) , org.ovirt.engine.core.bll.storage.DeactivateStorageDomainWithOvfUpdateCommand.getStoragePoolId ( ) ) ; params.setSkipChecks ( true ) ; params.setSkipLock ( true ) ; params.setShouldBeLogged ( true ) ; org.ovirt.engine.core.bll.context.CommandContext context = ( passContext ) ? org.ovirt.engine.core.bll.storage.DeactivateStorageDomainWithOvfUpdateCommand.cloneContext ( ) : null ; return org.ovirt.engine.core.bll.storage.DeactivateStorageDomainWithOvfUpdateCommand.getBackend ( ) . runInternalAction ( VdcActionType.DeactivateStorageDomain , params , context ) . getSucceeded ( ) ; }
Source:
protected void executeCommand ( ) { org.ovirt.engine.core.common.businessentities.pm.FenceAgent agent = org.ovirt.engine.core.bll.AddFenceAgentCommand.getParameters ( ) . getAgent ( ) ; org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getFenceAgentDao ( ) . save ( agent ) ; org.ovirt.engine.core.bll.AddFenceAgentCommand.getReturnValue ( ) . setActionReturnValue ( agent.getId ( ) ) ; org.ovirt.engine.core.bll.AddFenceAgentCommand.setSucceeded ( true ) ; }

Target:
protected void executeCommand ( ) { org.ovirt.engine.core.common.businessentities.pm.FenceAgent agent = org.ovirt.engine.core.bll.AddFenceAgentCommand.getParameters ( ) . getAgent ( ) ; fenceAgentDao.save ( agent ) ; org.ovirt.engine.core.bll.AddFenceAgentCommand.getReturnValue ( ) . setActionReturnValue ( agent.getId ( ) ) ; org.ovirt.engine.core.bll.AddFenceAgentCommand.setSucceeded ( true ) ; }
Source:
public void initWindowsOsTypes ( ) { org.ovirt.engine.ui.frontend.AsyncQuery callback = new org.ovirt.engine.ui.frontend.AsyncQuery ( ) ; callback.asyncCallback = new org.ovirt.engine.ui.frontend.INewAsyncCallback ( ) { @ java.lang.Override public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { windowsOsIds = ( ( java.util.ArrayList < java.lang.Integer > ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ) ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.OsRepository , new org.ovirt.engine.core.common.queries.OsQueryParameters ( org.ovirt.engine.core.common.queries.OsQueryParameters.OsRepositoryVerb.GetWindowsOss ) , callback ) ; }

Target:
public void initWindowsOsTypes ( ) { org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.OsRepository , new org.ovirt.engine.core.common.queries.OsQueryParameters ( org.ovirt.engine.core.common.queries.OsQueryParameters.OsRepositoryVerb.GetWindowsOss ) , new org.ovirt.engine.ui.frontend.AsyncQuery ( new org.ovirt.engine.ui.frontend.AsyncCallback < org.ovirt.engine.core.common.queries.VdcQueryReturnValue > ( ) { @ java.lang.Override public void onSuccess ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue returnValue ) { windowsOsIds = ( ( java.util.ArrayList < java.lang.Integer > ) ( returnValue.getReturnValue ( ) ) ) ; } } ) ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc copyData ( java.util.Map src , java.util.Map dst , boolean collapse ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "SDM.copyData" ) . withParameter ( "srcImage" , src ) . withParameter ( "dstImage" , dst ) . withParameter ( "collapse" , collapse ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( response ) ; }

Target:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc copyData ( java.lang.String jobId , java.util.Map src , java.util.Map dst ) { org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest request = new org.ovirt.vdsm.jsonrpc.client.RequestBuilder ( "SDM.copy_data" ) . withParameter ( "source" , src ) . withParameter ( "destination" , dst ) . withParameter ( "job_id" , jobId ) . build ( ) ; java.util.Map < java.lang.String , java.lang.Object > response = new org.ovirt.engine.core.vdsbroker.jsonrpc.FutureMap ( this . client , request ) ; return new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( response ) ; }
Source:
public static java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmInterfaceType > getNicTypeList ( org.ovirt.engine.core.common.businessentities.VmOsType osType , boolean hasDualmode ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmInterfaceType > list = new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmInterfaceType > ( java.util.Arrays.asList ( org.ovirt.engine.core.common.businessentities.network.VmInterfaceType.values ( ) ) ) ; list.remove ( VmInterfaceType.rtl8139_pv ) ; if ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.isWindowsOsType ( osType ) ) { if ( ( osType == ( org.ovirt.engine.core.common.businessentities.VmOsType.WindowsXP ) ) && hasDualmode ) { list.add ( VmInterfaceType.rtl8139_pv ) ; } } return list ; }

Target:
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 = org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getClusterByServiceList ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ) ( source ) ) , supportsVirtService , supportsGlusterService ) ; java.util.Collections.sort ( list , new org.ovirt.engine.ui.uicommonweb.Linq.VdsGroupByNameComparer ( ) ) ; return list ; } return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VDSGroup > ( ) ; }
Source:
protected void onFetchVms ( ) { logBuilder = new java.lang.StringBuilder ( java.lang.String.format ( "Poll %s:" , vdsManager.getVdsId ( ) ) ) ; super . onFetchVms ( ) ; logBuilder.append ( java.lang.String.format ( "(%d VMs)" , changedVms.size ( ) ) ) ; org.ovirt.engine.core.vdsbroker.monitoring.VmsStatisticsFetcher.log.info ( logBuilder.toString ( ) ) ; }

Target:
protected void onFetchVms ( ) { if ( org.ovirt.engine.core.vdsbroker.monitoring.VmsStatisticsFetcher.log.isDebugEnabled ( ) ) { logBuilder = new java.lang.StringBuilder ( ) ; } super . onFetchVms ( ) ; org.ovirt.engine.core.vdsbroker.monitoring.VmsStatisticsFetcher.log.info ( "Fetched VMs from VDS '{}'" , vdsmVms.size ( ) , vdsManager.getVdsId ( ) ) ; if ( org.ovirt.engine.core.vdsbroker.monitoring.VmsStatisticsFetcher.log.isDebugEnabled ( ) ) { org.ovirt.engine.core.vdsbroker.monitoring.VmsStatisticsFetcher.log.debug ( logBuilder.toString ( ) ) ; } }
Source:
private boolean isIsoFileValid ( java.lang.String isoFile ) { return ( org.apache.commons.lang.StringUtils.isNotBlank ( isoFile ) ) && ( new java.io.File ( ( ( ( org.ovirt.engine.core.common.config.Config.resolveOVirtISOsRepositoryPath ( ) ) + ( java.io.File.separator ) ) + isoFile ) ) . exists ( ) ) ; }

Target:
private java.io.File resolveISO ( java.lang.String iso ) { java.io.File ret = null ; if ( ( iso != null ) && ( ( iso.indexOf ( java.io.File.pathSeparatorChar ) ) == ( - 1 ) ) ) { for ( org.ovirt.engine.core.bll.OVirtNodeInfo.Entry info : org.ovirt.engine.core.bll.OVirtNodeInfo.getInstance ( ) . get ( ) ) { java.io.File path = new java.io.File ( info.path , iso ) ; if ( path.exists ( ) ) { ret = path ; break ; } } } return ret ; }
Source:
public void getStorageDomainList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StorageDomain > ( ) ; } } ; org.ovirt.engine.core.common.queries.SearchParameters searchParams = new org.ovirt.engine.core.common.queries.SearchParameters ( "Storage:" , org.ovirt.engine.core.common.interfaces.SearchType.StorageDomain ) ; searchParams.setMaxCount ( 9999 ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , searchParams , aQuery ) ; }

Target:
public void getProviderCertificateChain ( org.ovirt.engine.ui.frontend.AsyncQuery < java.util.List < org.ovirt.engine.core.common.businessentities.CertificateInfo > > aQuery , org.ovirt.engine.core.common.businessentities.Provider provider ) { aQuery.converterCallback = new org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.ListConverter < > ( ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetProviderCertificateChain , new org.ovirt.engine.core.common.queries.ProviderQueryParameters ( provider ) , aQuery ) ; }
Source:
public org.ovirt.engine.core.bll.ValidationResult isLunDiskVisible ( final org.ovirt.engine.core.common.businessentities.storage.LUNs lun , org.ovirt.engine.core.common.businessentities.VDS vds ) { java.util.List < org.ovirt.engine.core.common.businessentities.storage.LUNs > luns = executeGetDeviceList ( vds.getId ( ) , lun.getLunType ( ) ) ; boolean lunExists = org.apache.commons.collections.CollectionUtils.exists ( luns , new org.apache.commons.collections.Predicate ( ) { @ java.lang.Override public boolean evaluate ( java.lang.Object o ) { return ( ( org.ovirt.engine.core.common.businessentities.storage.LUNs ) ( o ) ) . getId ( ) . equals ( lun.getId ( ) ) ; } } ) ; return lunExists ? org.ovirt.engine.core.bll.ValidationResult.VALID : new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_DISK_LUN_INVALID ) ; }

Target:
public org.ovirt.engine.core.bll.ValidationResult validRemovableHostedEngineDisks ( org.ovirt.engine.core.common.businessentities.VM vm ) { return ( isHostedEngineDirectLunDisk ( ) ) || ( ! ( vm.isHostedEngine ( ) ) ) ? org.ovirt.engine.core.bll.ValidationResult.VALID : new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_HOSTED_ENGINE_DISK ) ; }
Source:
public void testGetUserByName ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpGetEntityExpectations ( VdcQueryType.GetDbUserByUserName , org.ovirt.engine.core.common.queries.NameQueryParameters.class , new java.lang.String [ ] { "Name" } , new java.lang.Object [ ] { "admin" } , getEntity ( 0 ) ) ; control.replay ( ) ; verifyModel ( resource.getUserByName ( "admin" ) , 0 ) ; }

Target:
public void testGetUserByName ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpGetEntityExpectations ( VdcQueryType.GetDbUserByUserNameAndDomain , org.ovirt.engine.core.common.queries.GetDbUserByUserNameAndDomainQueryParameters.class , new java.lang.String [ ] { "UserName" , "DomainName" } , new java.lang.Object [ ] { "admin" , "internal" } , getEntity ( 0 ) ) ; control.replay ( ) ; verifyModel ( resource.getUserByNameAndDomain ( "admin" , "internal" ) , 0 ) ; }
Source:
public void testGetLunsThatBreakPassDiscardFunctionalityPassDiscardBreaks ( ) { createVmDiskOnSd ( false , false ) ; createVmDiskOnSd ( false , true ) ; org.ovirt.engine.core.common.businessentities.storage.LUNs lunThatBreaksDiscardSupport = createLunWithDiscardFunctionality ( 0L , false ) ; assertGetLunsThatBreakPassDiscardFunctionalityContainsExpectedLuns ( java.util.Arrays.asList ( createLunWithDiscardFunctionality ( 1024L , false ) , lunThatBreaksDiscardSupport ) , java.util.Collections.singletonList ( lunThatBreaksDiscardSupport ) ) ; }

Target:
public void testGetLunsThatBreakDiscardAfterDeleteSupportDiscardAfterDeleteBreaks ( ) { storageDomain.setDiscardAfterDelete ( true ) ; org.ovirt.engine.core.common.businessentities.storage.LUNs lunThatBreaksDiscardSupport = createLunWithDiscardSupport ( 0L ) ; assertGetLunsThatBreakDiscardAfterDeleteSupportContainsExpectedLuns ( java.util.Arrays.asList ( createLunWithDiscardSupport ( 1024L ) , lunThatBreaksDiscardSupport ) , java.util.Collections.singletonList ( lunThatBreaksDiscardSupport ) ) ; }
Source:
private void revertPreviousHandlers ( ) { getParameters ( ) . decrementExecutionIndex ( ) ; if ( ( getExecutionIndex ( ) ) >= 0 ) { log.errorFormat ( "Reverting task handler: {0}" , getCurrentTaskHandler ( ) . getClass ( ) . getName ( ) ) ; getParameters ( ) . setExecutionReason ( CommandExecutionReason.ROLLBACK_FLOW ) ; getCurrentTaskHandler ( ) . compensate ( ) ; if ( ! ( hasRevertTask ( ) ) ) { revertPreviousHandlers ( ) ; } } }

Target:
private void revertPreviousHandlers ( ) { getParameters ( ) . decrementExecutionIndex ( ) ; if ( ( getExecutionIndex ( ) ) >= 0 ) { log.errorFormat ( "Reverting task {0}, handler: {1}" , getCurrentTaskHandler ( ) . getRevertTaskType ( ) . name ( ) , getCurrentTaskHandler ( ) . getClass ( ) . getName ( ) ) ; getParameters ( ) . setExecutionReason ( CommandExecutionReason.ROLLBACK_FLOW ) ; getCurrentTaskHandler ( ) . compensate ( ) ; if ( ! ( hasRevertTask ( ) ) ) { revertPreviousHandlers ( ) ; } } }
Source:
private void refreshCapabilities ( ) { java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > list = new java.util.ArrayList < > ( ) ; for ( java.lang.Object item : org.ovirt.engine.ui.uicommonweb.models.hosts.HostListModel.getSelectedItems ( ) ) { org.ovirt.engine.core.common.businessentities.VDS vds = ( ( org.ovirt.engine.core.common.businessentities.VDS ) ( item ) ) ; list.add ( new org.ovirt.engine.core.common.action.VdsActionParameters ( vds.getId ( ) ) ) ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runMultipleAction ( VdcActionType.RefreshHost , list , new org.ovirt.engine.ui.uicompat.IFrontendMultipleActionAsyncCallback ( ) { @ java.lang.Override public void executed ( org.ovirt.engine.ui.uicompat.FrontendMultipleActionAsyncResult result ) { } } , null ) ; }

Target:
public void start ( ) { java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > list = new java.util.ArrayList < > ( ) ; for ( java.lang.Object item : org.ovirt.engine.ui.uicommonweb.models.hosts.HostListModel.getSelectedItems ( ) ) { org.ovirt.engine.core.common.businessentities.VDS vds = ( ( org.ovirt.engine.core.common.businessentities.VDS ) ( item ) ) ; list.add ( new org.ovirt.engine.core.common.action.FenceVdsActionParameters ( vds.getId ( ) ) ) ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runMultipleAction ( VdcActionType.StartVds , list , new org.ovirt.engine.ui.uicompat.IFrontendMultipleActionAsyncCallback ( ) { @ java.lang.Override public void executed ( org.ovirt.engine.ui.uicompat.FrontendMultipleActionAsyncResult result ) { } } , null ) ; }
Source:
public void testImportAsNewEntity ( ) throws java.lang.Exception { org.ovirt.engine.api.model.StorageDomain storageDomain = new org.ovirt.engine.api.model.StorageDomain ( ) ; storageDomain.setId ( GUIDS [ 2 ] . toString ( ) ) ; org.ovirt.engine.api.model.Cluster cluster = new org.ovirt.engine.api.model.Cluster ( ) ; cluster.setId ( GUIDS [ 1 ] . toString ( ) ) ; setUpGetDataCenterByStorageDomainExpectations ( org.ovirt.engine.api.restapi.resource.BackendStorageDomainVmResourceTest.STORAGE_DOMAIN_ID ) ; doTestImport ( storageDomain , cluster , false , true ) ; }

Target:
public void testImportAsNewEntity ( ) throws java.lang.Exception { org.ovirt.engine.api.model.StorageDomain storageDomain = new org.ovirt.engine.api.model.StorageDomain ( ) ; storageDomain.setId ( GUIDS [ 2 ] . toString ( ) ) ; org.ovirt.engine.core.common.businessentities.Cluster cluster = new org.ovirt.engine.core.common.businessentities.Cluster ( ) ; cluster.setId ( GUIDS [ 1 ] . toString ( ) ) ; setUpGetDataCenterByStorageDomainExpectations ( org.ovirt.engine.api.restapi.resource.BackendStorageDomainVmResourceTest.STORAGE_DOMAIN_ID ) ; doTestImport ( storageDomain , cluster , false , true ) ; }
Source:
public java.net.Socket createSocket ( java.net.InetAddress address , int port , java.net.InetAddress localAddress , int localPort ) throws java.io.IOException { if ( ( ( address.toString ( ) . charAt ( 0 ) ) == '/' ) || ( org.ovirt.engineextensions.aaa.ldap.Resolver.isAddress ( address.getHostName ( ) ) ) ) { throw new java.lang.IllegalArgumentException ( ) ; } return createSocket ( address.getHostName ( ) , port , localAddress , localPort ) ; }

Target:
public java.net.Socket createSocket ( java.net.InetAddress address , int port , java.net.InetAddress localAddress , int localPort ) throws java.io.IOException { if ( checkAddress ( address ) ) { return socketFactory.createSocket ( address , port , localAddress , localPort ) ; } else { return createSocket ( address.getHostName ( ) , port , localAddress , localPort ) ; } }
Source:
private boolean completedMerge ( ) { return ( ( org.ovirt.engine.core.bll.RemoveSnapshotSingleDiskLiveCommand.getParameters ( ) . getCommandStep ( ) ) == ( org.ovirt.engine.core.common.action.RemoveSnapshotSingleDiskLiveStep.DESTROY_IMAGE ) ) || ( ( org.ovirt.engine.core.bll.RemoveSnapshotSingleDiskLiveCommand.getParameters ( ) . getCommandStep ( ) ) == ( org.ovirt.engine.core.common.action.RemoveSnapshotSingleDiskLiveStep.COMPLETE ) ) ; }

Target:
private boolean completedMerge ( ) { return ( ( ( org.ovirt.engine.core.bll.RemoveSnapshotSingleDiskLiveCommand.getParameters ( ) . getCommandStep ( ) ) == ( org.ovirt.engine.core.common.action.RemoveSnapshotSingleDiskLiveStep.DESTROY_IMAGE ) ) || ( ( org.ovirt.engine.core.bll.RemoveSnapshotSingleDiskLiveCommand.getParameters ( ) . getCommandStep ( ) ) == ( org.ovirt.engine.core.common.action.RemoveSnapshotSingleDiskLiveStep.DESTROY_IMAGE_CHECK ) ) ) || ( ( org.ovirt.engine.core.bll.RemoveSnapshotSingleDiskLiveCommand.getParameters ( ) . getCommandStep ( ) ) == ( org.ovirt.engine.core.common.action.RemoveSnapshotSingleDiskLiveStep.COMPLETE ) ) ; }
Source:
public static < E extends org.ovirt.engine.core.common.businessentities.StorageServerConnections > java.util.Map < java.lang.String , E > connectionsByIQN ( java.util.List < E > entityList ) { if ( entityList != null ) { java.util.Map < java.lang.String , E > map = new java.util.HashMap < > ( ) ; for ( E e : entityList ) { map.put ( e.getiqn ( ) , e ) ; } return map ; } else { return java.util.Collections.emptyMap ( ) ; } }

Target:
public static < E extends org.ovirt.engine.core.common.businessentities.StorageServerConnections > java.util.Map < java.lang.String , E > connectionsByIQN ( java.util.List < E > entityList ) { if ( entityList != null ) { java.util.Map < java.lang.String , E > map = new java.util.HashMap < > ( ) ; for ( E e : entityList ) { map.put ( e.getIqn ( ) , e ) ; } return map ; } else { return java.util.Collections.emptyMap ( ) ; } }
Source:
public void checkMissingIpAddressDetailsBootProtocolStatic ( ) { final boolean initAddress = random.nextBoolean ( ) ; initIpConfigurationDetails ( NetworkBootProtocol.STATIC_IP , initAddress , ( ! initAddress ) ) ; org.junit.Assert.assertThat ( underTest.validateNetworkAttachmentIpConfiguration ( networkAttachments ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.NETWORK_ATTACHMENT_IP_CONFIGURATION_STATIC_BOOT_PROTOCOL_MISSING_IP_ADDRESS_DETAILS , org.ovirt.engine.core.utils.ReplacementUtils.createSetVariableString ( NetworkAttachmentIpConfigurationValidator.VAR_NETWORK_NAME , org.ovirt.engine.core.bll.validator.network.NetworkAttachmentIpConfigurationValidatorTest.NETWORK_NAME ) , org.ovirt.engine.core.utils.ReplacementUtils.createSetVariableString ( NetworkAttachmentIpConfigurationValidator.VAR_INTERFACE_NAME , org.ovirt.engine.core.bll.validator.network.NetworkAttachmentIpConfigurationValidatorTest.INTERFACE_NAME ) ) ) ; }

Target:
public void checkMissingIpAddressDetailsBootProtocolStatic ( ) { final boolean initAddress = random.nextBoolean ( ) ; initIpConfigurationDetails ( Ipv4BootProtocol.STATIC_IP , initAddress , ( ! initAddress ) ) ; org.junit.Assert.assertThat ( underTest.validateNetworkAttachmentIpConfiguration ( networkAttachments ) , org.ovirt.engine.core.bll.validator.ValidationResultMatchers.failsWith ( EngineMessage.NETWORK_ATTACHMENT_IP_CONFIGURATION_STATIC_BOOT_PROTOCOL_MISSING_IP_ADDRESS_DETAILS , org.ovirt.engine.core.utils.ReplacementUtils.createSetVariableString ( NetworkAttachmentIpConfigurationValidator.VAR_NETWORK_NAME , org.ovirt.engine.core.bll.validator.network.NetworkAttachmentIpConfigurationValidatorTest.NETWORK_NAME ) , org.ovirt.engine.core.utils.ReplacementUtils.createSetVariableString ( NetworkAttachmentIpConfigurationValidator.VAR_INTERFACE_NAME , org.ovirt.engine.core.bll.validator.network.NetworkAttachmentIpConfigurationValidatorTest.INTERFACE_NAME ) ) ) ; }
Source:
protected void executeVdsBrokerCommand ( ) { status = org.ovirt.engine.core.vdsbroker.vdsbroker.ConnectStoragePoolVDSCommand.getBroker ( ) . connectStoragePool ( org.ovirt.engine.core.vdsbroker.vdsbroker.ConnectStoragePoolVDSCommand.getParameters ( ) . getStoragePoolId ( ) . toString ( ) , org.ovirt.engine.core.vdsbroker.vdsbroker.ConnectStoragePoolVDSCommand.getParameters ( ) . getvds_spm_id ( ) , org.ovirt.engine.core.vdsbroker.vdsbroker.ConnectStoragePoolVDSCommand.getParameters ( ) . getStoragePoolId ( ) . toString ( ) , org.ovirt.engine.core.vdsbroker.vdsbroker.ConnectStoragePoolVDSCommand.getParameters ( ) . getMasterDomainId ( ) . toString ( ) , org.ovirt.engine.core.vdsbroker.vdsbroker.ConnectStoragePoolVDSCommand.getParameters ( ) . getMasterVersion ( ) ) ; proceedProxyReturnValue ( ) ; }

Target:
protected void executeVdsBrokerCommand ( ) { if ( isRefreshStoragePool ( ) ) { refreshStoragePool ( ) ; } else { connectStoragePool ( ) ; } proceedProxyReturnValue ( ) ; }
Source:
private void handleCopyResult ( org.ovirt.engine.core.common.businessentities.DiskImage srcDiskImage , org.ovirt.engine.core.common.businessentities.DiskImage copiedDiskImage , org.ovirt.engine.core.common.action.VdcReturnValueBase result ) { if ( ! ( result.getSucceeded ( ) ) ) { throw new org.ovirt.engine.core.common.errors.VdcBLLException ( org.ovirt.engine.core.common.errors.VdcBllErrors.VolumeCreationError ) ; } else { org.ovirt.engine.core.bll.ImagesHandler.addDiskImageWithNoVmDevice ( copiedDiskImage ) ; org.ovirt.engine.core.bll.AddVmAndCloneImageCommand.getTaskIdList ( ) . addAll ( result.getInternalVdsmTaskIdList ( ) ) ; org.ovirt.engine.core.bll.AddVmAndCloneImageCommand.getSrcDiskIdToTargetDiskIdMapping ( ) . put ( srcDiskImage.getId ( ) , copiedDiskImage.getId ( ) ) ; } }

Target:
private void handleCopyResult ( org.ovirt.engine.core.common.businessentities.storage.DiskImage srcDiskImage , org.ovirt.engine.core.common.businessentities.storage.DiskImage copiedDiskImage , org.ovirt.engine.core.common.action.VdcReturnValueBase result ) { if ( ! ( result.getSucceeded ( ) ) ) { throw new org.ovirt.engine.core.common.errors.VdcBLLException ( org.ovirt.engine.core.common.errors.VdcBllErrors.VolumeCreationError ) ; } else { org.ovirt.engine.core.bll.ImagesHandler.addDiskImageWithNoVmDevice ( copiedDiskImage ) ; org.ovirt.engine.core.bll.AddVmAndCloneImageCommand.getTaskIdList ( ) . addAll ( result.getInternalVdsmTaskIdList ( ) ) ; org.ovirt.engine.core.bll.AddVmAndCloneImageCommand.getSrcDiskIdToTargetDiskIdMapping ( ) . put ( srcDiskImage.getId ( ) , copiedDiskImage.getId ( ) ) ; } }
Source:
private void assertDiskDescriptionMap ( java.lang.String diskAlias , java.lang.String diskDescription ) throws java.io.IOException { org.junit.Assert.assertEquals ( "Should be map of disk alias and disk description" , ( ( ( ( ( ( ( ( ( "{\"" + ( ImagesHandler.DISK_ALIAS ) ) + "\":\"" ) + diskAlias ) + "\"," ) + "\"" ) + ( ImagesHandler.DISK_DESCRIPTION ) ) + "\":\"" ) + ( org.apache.commons.lang.StringUtils.defaultString ( diskDescription ) ) ) + "\"}" ) , org.ovirt.engine.core.bll.ImagesHandler.getJsonDiskDescription ( diskAlias , diskDescription ) ) ; }

Target:
private static void assertDiskDescriptionMap ( org.ovirt.engine.core.common.businessentities.storage.Disk disk ) throws java.io.IOException { org.junit.Assert.assertEquals ( "Should be map of disk alias and disk description" , java.lang.String.format ( ( "{\"DiskAlias\":\"%s\"," + "\"DiskDescription\":\"%s\"}" ) , disk.getDiskAlias ( ) , org.apache.commons.lang.StringUtils.defaultString ( disk.getDiskDescription ( ) ) ) , org.ovirt.engine.core.bll.ImagesHandler.getJsonDiskDescription ( disk ) ) ; }
Source:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValueObj ) { org.ovirt.engine.core.common.queries.VdcQueryReturnValue returnValue = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValueObj ) ) ; java.lang.Object returnValue2 = returnValue.getReturnValue ( ) ; java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > allNics = ( ( java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > ) ( returnValue2 ) ) ; this . allNics = allNics ; queryFreeBonds ( ) ; }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { java.util.List < org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface > bonds = ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ; allBonds = bonds ; initNicModels ( ) ; stopProgress ( ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.irsbroker.GlusterVolumeProfileInfoReturnForXmlRpc glusterVolumeProfileInfo ( org.ovirt.engine.core.compat.Guid clusterId , java.lang.String volumeName ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.glusterVolumeProfileInfo ( volumeName ) ; org.ovirt.engine.core.vdsbroker.irsbroker.GlusterVolumeProfileInfoReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.irsbroker.GlusterVolumeProfileInfoReturnForXmlRpc ( clusterId , xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }

Target:
public org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeStatusReturnForXmlRpc glusterVolumeStatus ( org.ovirt.engine.core.compat.Guid clusterId , java.lang.String volumeName , java.lang.String brickName , java.lang.String volumeStatusOption ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.glusterVolumeStatus ( volumeName , brickName , volumeStatusOption ) ; org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeStatusReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeStatusReturnForXmlRpc ( clusterId , xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }
Source:
private void cacheConfigValues ( 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 returnValue , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( returnValue != null ) { cachedConfigValuesPreConvert.putAll ( ( ( java.util.HashMap < org.ovirt.engine.core.compat.KeyValuePairCompat < org.ovirt.engine.core.common.queries.ConfigurationValues , java.lang.String > , java.lang.Object > ) ( returnValue ) ) ) ; } return cachedConfigValuesPreConvert ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetConfigurationValues , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }

Target:
private void cacheConfigValues ( 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 returnValue , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( returnValue != null ) { cachedConfigValuesPreConvert.putAll ( ( ( java.util.HashMap < org.ovirt.engine.core.compat.KeyValuePairCompat < org.ovirt.engine.core.common.queries.ConfigurationValues , java.lang.String > , java.lang.Object > ) ( returnValue ) ) ) ; } return cachedConfigValuesPreConvert ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetConfigurationValues , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }
Source:
protected boolean validate ( ) { getUserName ( ) . validateEntity ( new org.ovirt.engine.ui.uicommonweb.validation.IValidation [ ] { new org.ovirt.engine.ui.uicommonweb.validation.NotEmptyValidation ( ) } ) ; getPassword ( ) . validateEntity ( new org.ovirt.engine.ui.uicommonweb.validation.IValidation [ ] { new org.ovirt.engine.ui.uicommonweb.validation.NotEmptyValidation ( ) } ) ; getDomain ( ) . validateSelectedItem ( new org.ovirt.engine.ui.uicommonweb.validation.IValidation [ ] { new org.ovirt.engine.ui.uicommonweb.validation.NotEmptyValidation ( ) } ) ; return ( ( getUserName ( ) . getIsValid ( ) ) && ( getPassword ( ) . getIsValid ( ) ) ) && ( getDomain ( ) . getIsValid ( ) ) ; }

Target:
protected boolean validate ( ) { getUserName ( ) . validateEntity ( new org.ovirt.engine.ui.uicommonweb.validation.IValidation [ ] { new org.ovirt.engine.ui.uicommonweb.validation.NotEmptyValidation ( ) } ) ; getPassword ( ) . validateEntity ( new org.ovirt.engine.ui.uicommonweb.validation.IValidation [ ] { new org.ovirt.engine.ui.uicommonweb.validation.NotEmptyValidation ( ) } ) ; getProfile ( ) . validateSelectedItem ( new org.ovirt.engine.ui.uicommonweb.validation.IValidation [ ] { new org.ovirt.engine.ui.uicommonweb.validation.NotEmptyValidation ( ) } ) ; return ( ( getUserName ( ) . getIsValid ( ) ) && ( getPassword ( ) . getIsValid ( ) ) ) && ( getProfile ( ) . getIsValid ( ) ) ; }
Source:
protected org.ovirt.engine.core.common.businessentities.DiskImage cretaeVirtIODisk ( ) { org.ovirt.engine.core.common.businessentities.DiskImage disk = new org.ovirt.engine.core.common.businessentities.DiskImage ( ) ; disk.setImageId ( diskImageGuid ) ; disk.setDiskInterface ( DiskInterface.VirtIO ) ; disk.setPlugged ( false ) ; disk.setactive ( true ) ; disk.setId ( diskImageGuid ) ; org.mockito.Mockito.when ( diskDao.get ( diskImageGuid ) ) . thenReturn ( disk ) ; return disk ; }

Target:
protected org.ovirt.engine.core.common.businessentities.DiskImage cretaeVirtIODisk ( ) { org.ovirt.engine.core.common.businessentities.DiskImage disk = new org.ovirt.engine.core.common.businessentities.DiskImage ( ) ; disk.setImageId ( diskImageGuid ) ; disk.setDiskInterface ( DiskInterface.VirtIO ) ; disk.setPlugged ( false ) ; disk.setActive ( true ) ; disk.setId ( diskImageGuid ) ; org.mockito.Mockito.when ( diskDao.get ( diskImageGuid ) ) . thenReturn ( disk ) ; return disk ; }
Source:
public void testRemoveForced ( ) throws java.lang.Exception { setUpGetEntityExpectations ( 1 ) ; setUpVersionExpectations ( ) ; javax.ws.rs.core.UriInfo uriInfo = setUpActionExpectations ( VdcActionType.RemoveStoragePool , org.ovirt.engine.core.common.action.StoragePoolParametersBase.class , new java.lang.String [ ] { "StoragePoolId" , "ForceDelete" } , new java.lang.Object [ ] { GUIDS [ 0 ] , java.lang.Boolean.TRUE } , true , true , false ) ; uriInfo = addMatrixParameterExpectations ( uriInfo , BackendDataCenterResource.FORCE , java.lang.Boolean.TRUE.toString ( ) ) ; setUriInfo ( uriInfo ) ; verifyRemove ( resource.remove ( ) ) ; }

Target:
public void testRemoveForced ( ) throws java.lang.Exception { setUpGetEntityExpectations ( 1 ) ; setUpVersionExpectations ( ) ; javax.ws.rs.core.UriInfo uriInfo = setUpActionExpectations ( ActionType.RemoveStoragePool , org.ovirt.engine.core.common.action.StoragePoolParametersBase.class , new java.lang.String [ ] { "StoragePoolId" , "ForceDelete" } , new java.lang.Object [ ] { GUIDS [ 0 ] , java.lang.Boolean.TRUE } , true , true , false ) ; uriInfo = addMatrixParameterExpectations ( uriInfo , BackendDataCenterResource.FORCE , java.lang.Boolean.TRUE.toString ( ) ) ; setUriInfo ( uriInfo ) ; verifyRemove ( resource.remove ( ) ) ; }
Source:
public org.ovirt.engine.sdk.decorators.VMNIC update ( java.lang.String correlationId ) throws java.io.IOException , org.apache.http.client.ClientProtocolException , org.ovirt.engine.sdk.exceptions.ServerException { java.lang.String url = this . getHref ( ) ; java.util.List < org.apache.http.Header > headers = new org.ovirt.engine.sdk.utils.HttpHeaderBuilder ( ) . add ( "Correlation-Id" , correlationId ) . build ( ) ; url = new org.ovirt.engine.sdk.utils.UrlBuilder ( url ) . build ( ) ; return getProxy ( ) . update ( url , this , org.ovirt.engine.sdk.entities.NIC.class , org.ovirt.engine.sdk.decorators.VMNIC.class , headers ) ; }

Target:
public org.ovirt.engine.sdk.decorators.VMNIC update ( ) throws java.io.IOException , org.apache.http.client.ClientProtocolException , org.ovirt.engine.sdk.exceptions.ServerException { java.lang.String url = this . getHref ( ) ; org.ovirt.engine.sdk.utils.HttpHeaderBuilder headersBuilder = new org.ovirt.engine.sdk.utils.HttpHeaderBuilder ( ) ; java.util.List < org.apache.http.Header > headers = headersBuilder.build ( ) ; org.ovirt.engine.sdk.utils.UrlBuilder urlBuilder = new org.ovirt.engine.sdk.utils.UrlBuilder ( url ) ; url = urlBuilder.build ( ) ; return getProxy ( ) . update ( url , this , org.ovirt.engine.sdk.entities.NIC.class , org.ovirt.engine.sdk.decorators.VMNIC.class , headers ) ; }
Source:
protected void setUpGetGraphicsExpectations ( int times ) throws java.lang.Exception { for ( int i = 0 ; i < times ; i ++ ) { setUpGetEntityExpectations ( VdcQueryType.GetGraphicsDevices , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ i ] } , java.util.Collections.singletonList ( new org.ovirt.engine.core.common.businessentities.GraphicsDevice ( org.ovirt.engine.core.common.utils.VmDeviceType.SPICE ) ) ) ; } }

Target:
protected void setUpGetGraphicsExpectations ( int times ) throws java.lang.Exception { for ( int i = 0 ; i < times ; i ++ ) { setUpGetEntityExpectations ( QueryType.GetGraphicsDevices , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ i ] } , java.util.Collections.singletonList ( new org.ovirt.engine.core.common.businessentities.GraphicsDevice ( org.ovirt.engine.core.common.utils.VmDeviceType.SPICE ) ) ) ; } }
Source:
private void setUpGetCertuficateExpectations ( int times , int index ) throws java.lang.Exception { for ( int i = 0 ; i < times ; i ++ ) { setUpGetEntityExpectations ( VdcQueryType.GetVdsCertificateSubjectByVmId , org.ovirt.engine.core.common.queries.GetVmByVmIdParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ index ] } , org.ovirt.engine.api.restapi.resource.BackendVmsResourceTest.CERTIFICATE ) ; } }

Target:
private void setUpGetCertuficateExpectations ( int times , int index ) throws java.lang.Exception { for ( int i = 0 ; i < times ; i ++ ) { setUpGetEntityExpectations ( VdcQueryType.GetVdsCertificateSubjectByVmId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ index ] } , org.ovirt.engine.api.restapi.resource.BackendVmsResourceTest.CERTIFICATE ) ; } }
Source:
public static void GetDataCentersByStorageDomain ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storageDomainId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetStoragePoolsByStorageDomainId , new org.ovirt.engine.core.common.queries.StorageDomainQueryParametersBase ( storageDomainId ) , aQuery ) ; }

Target:
public static void getPermissionsByAdElementId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid userId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.permissions > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.permissions > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetPermissionsByAdElementId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( userId ) , aQuery ) ; }