auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void testGetAllVMSearch ( ) throws java.lang.Exception { org.ovirt.engine.core.common.queries.SearchParameters searchParam = new org.ovirt.engine.core.common.queries.SearchParameters ( "VM:" , org.ovirt.engine.core.common.interfaces.SearchType.VM ) ; org.ovirt.engine.core.bll.SearchQuery < org.ovirt.engine.core.common.queries.SearchParameters > searchQuery = spySearchQuery ( searchParam ) ; searchQuery.executeQueryCommand ( ) ; org.junit.Assert.assertTrue ( ( ( vmResultList ) == ( searchQuery.getQueryReturnValue ( ) . getReturnValue ( ) ) ) ) ; }

Target:
public void testGetAllMultiStoragePoolSearch ( ) throws java.lang.Exception { org.ovirt.engine.core.common.queries.SearchParameters searchParam = new org.ovirt.engine.core.common.queries.SearchParameters ( ( "Datacenters" + ( org.ovirt.engine.core.common.utils.CommonConstants.QUERY_RETURN_TYPE_SEPARATOR ) ) , org.ovirt.engine.core.common.interfaces.SearchType.StoragePool ) ; org.ovirt.engine.core.bll.SearchQuery < org.ovirt.engine.core.common.queries.SearchParameters > searchQuery = spySearchQuery ( searchParam ) ; searchQuery.executeQueryCommand ( ) ; org.junit.Assert.assertTrue ( ( ( storagePoolResultList ) == ( searchQuery.getQueryReturnValue ( ) . getReturnValue ( ) ) ) ) ; }
Source:
protected boolean canDoAction ( ) { boolean retVal = true ; if ( ( org.ovirt.engine.core.bll.RemoveVmCommand.getVm ( ) ) == null ) { retVal = false ; addCanDoActionMessage ( VdcBllMessages.ACTION_TYPE_FAILED_VM_NOT_FOUND ) ; } else if ( org.ovirt.engine.core.bll.RemoveVmCommand.getVm ( ) . isDeleteProtected ( ) ) { retVal = false ; addCanDoActionMessage ( VdcBllMessages.ACTION_TYPE_FAILED_DELETE_PROTECTION_ENABLED ) ; } else { retVal = ( super . canDoAction ( ) ) && ( canRemoveVm ( ) ) ; setDescription ( org.ovirt.engine.core.bll.RemoveVmCommand.getVmName ( ) ) ; } return retVal ; }

Target:
protected boolean canDoAction ( ) { if ( ( org.ovirt.engine.core.bll.RemoveVmCommand.getVm ( ) ) == null ) { return failCanDoAction ( VdcBllMessages.ACTION_TYPE_FAILED_VM_NOT_FOUND ) ; } if ( org.ovirt.engine.core.bll.RemoveVmCommand.getVm ( ) . isDeleteProtected ( ) ) { return failCanDoAction ( VdcBllMessages.ACTION_TYPE_FAILED_DELETE_PROTECTION_ENABLED ) ; } return ( super . canDoAction ( ) ) && ( canRemoveVm ( ) ) ; }
Source:
protected void executeCommand ( ) { try { addVmToDb ( ) ; processImages ( ) ; if ( getReturnValue ( ) . getVdsmTaskIdList ( ) . isEmpty ( ) ) { endVmRelatedOps ( ) ; } } catch ( java.lang.RuntimeException e ) { org.ovirt.engine.core.bll.network.MacPoolManager.getInstance ( ) . freeMacs ( macsAdded ) ; throw e ; } setSucceeded ( true ) ; }

Target:
protected void executeCommand ( ) { try { addVmToDb ( ) ; processImages ( ) ; if ( getReturnValue ( ) . getVdsmTaskIdList ( ) . isEmpty ( ) ) { endVmRelatedOps ( ) ; } } catch ( java.lang.RuntimeException e ) { org.ovirt.engine.core.bll.network.MacPoolManager.getInstance ( ) . freeMacs ( macsAdded ) ; throw e ; } org.ovirt.engine.core.bll.ImportVmCommand.setSucceeded ( true ) ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc hotplugDisk ( org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcStruct info ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.hotplugDisk ( info.getInnerMap ( ) ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc wrapper = new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( xmlRpcReturnValue ) ; return wrapper ; } catch ( java.lang.reflect.UndeclaredThrowableException ute ) { throw new org.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcRunTimeException ( ute ) ; } }

Target:
public java.util.concurrent.Future < java.util.Map < java.lang.String , java.lang.Object > > setupNetworks ( java.util.Map networks , java.util.Map bonds , java.util.Map options ) { return vdsServer.futureSetupNetworks ( networks , bonds , options ) ; }
Source:
private java.lang.String getPath ( javax.ws.rs.core.UriInfo uriInfo ) { java.lang.StringBuilder path = new java.lang.StringBuilder ( ) ; for ( java.lang.String p : uriInfo.getPath ( ) . split ( "/" ) ) { ( ( path.length ( ) ) == 0 ? path : path.append ( "/" ) ) . append ( org.ovirt.engine.api.restapi.resource.AbstractBackendAsyncStatusResource.urlEncode ( p ) ) ; } return org.ovirt.engine.api.utils.LinkHelper.combine ( uriInfo.getBaseUri ( ) . getPath ( ) , path.toString ( ) ) ; }

Target:
private java.lang.String getPath ( javax.ws.rs.core.UriInfo uriInfo ) { java.lang.StringBuilder path = new java.lang.StringBuilder ( ) ; for ( java.lang.String p : uriInfo.getPath ( ) . split ( "/" ) ) { ( ( path.length ( ) ) == 0 ? path : path.append ( "/" ) ) . append ( org.ovirt.engine.api.restapi.resource.AbstractBackendAsyncStatusResource.urlEncode ( p ) ) ; } return org.ovirt.engine.api.utils.LinkCreator.combine ( uriInfo.getBaseUri ( ) . getPath ( ) , path.toString ( ) ) ; }
Source:
public void isVirtioScsiEnabledDefaultedToTrue ( ) { org.ovirt.engine.core.bll.AddVmCommand < org.ovirt.engine.core.common.action.AddVmParameters > cmd = setupCanAddVmTests ( 0 , 0 ) ; org.mockito.Mockito.doReturn ( createVdsGroup ( ) ) . when ( cmd ) . getVdsGroup ( ) ; org.mockito.Mockito.when ( osRepository.getDiskInterfaces ( org.mockito.Matchers.any ( java.lang.Integer.class ) , org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Version.class ) ) ) . thenReturn ( new java.util.ArrayList < > ( java.util.Arrays.asList ( "VirtIO_SCSI" ) ) ) ; org.junit.Assert.assertTrue ( "isVirtioScsiEnabled hasn't been defaulted to true on cluster >= 3.3." , cmd.isVirtioScsiEnabled ( ) ) ; }

Target:
public void isVirtioScsiEnabledDefaultedToTrue ( ) { org.ovirt.engine.core.bll.AddVmCommand < org.ovirt.engine.core.common.action.AddVmParameters > cmd = setupCanAddVmTests ( 0 ) ; org.mockito.Mockito.doReturn ( createVdsGroup ( ) ) . when ( cmd ) . getVdsGroup ( ) ; org.mockito.Mockito.when ( osRepository.getDiskInterfaces ( org.mockito.Matchers.any ( java.lang.Integer.class ) , org.mockito.Matchers.any ( org.ovirt.engine.core.compat.Version.class ) ) ) . thenReturn ( new java.util.ArrayList < > ( java.util.Collections.singletonList ( "VirtIO_SCSI" ) ) ) ; org.junit.Assert.assertTrue ( "isVirtioScsiEnabled hasn't been defaulted to true on cluster >= 3.3." , cmd.isVirtioScsiEnabled ( ) ) ; }
Source:
protected void endMoveVmCommand ( ) { org.ovirt.engine.core.bll.MoveVmCommand.endActionOnAllImageGroups ( ) ; if ( ( org.ovirt.engine.core.bll.MoveVmCommand.getVm ( ) ) != null ) { org.ovirt.engine.core.bll.VmHandler.UnLockVm ( org.ovirt.engine.core.bll.MoveVmCommand.getVm ( ) ) ; org.ovirt.engine.core.bll.VmHandler.updateDisksFromDb ( org.ovirt.engine.core.bll.MoveVmCommand.getVm ( ) ) ; updateVmImSpm ( ) ; } else { org.ovirt.engine.core.bll.MoveVmCommand.setCommandShouldBeLogged ( false ) ; log.warn ( "MoveVmCommand::EndMoveVmCommand: Vm is null - not performing full EndAction" ) ; } org.ovirt.engine.core.bll.MoveVmCommand.setSucceeded ( true ) ; }

Target:
protected void endMoveVmCommand ( ) { boolean vmExists = ( org.ovirt.engine.core.bll.MoveVmCommand.getVm ( ) ) != null ; if ( vmExists ) { incrementDbGeneration ( ) ; } org.ovirt.engine.core.bll.MoveVmCommand.endActionOnAllImageGroups ( ) ; if ( vmExists ) { org.ovirt.engine.core.bll.VmHandler.UnLockVm ( org.ovirt.engine.core.bll.MoveVmCommand.getVm ( ) ) ; org.ovirt.engine.core.bll.VmHandler.updateDisksFromDb ( org.ovirt.engine.core.bll.MoveVmCommand.getVm ( ) ) ; } else { org.ovirt.engine.core.bll.MoveVmCommand.setCommandShouldBeLogged ( false ) ; log.warn ( "MoveVmCommand::EndMoveVmCommand: Vm is null - not performing full EndAction" ) ; } org.ovirt.engine.core.bll.MoveVmCommand.setSucceeded ( true ) ; }
Source:
protected void onBrowserEvent2 ( com.google.gwt.user.client.Event event ) { mousePosition [ 0 ] = event.getClientX ( ) ; mousePosition [ 1 ] = event.getClientY ( ) ; if ( ( org.ovirt.engine.ui.common.widget.table.AbstractActionTable.CLICK.equals ( event.getType ( ) ) ) && ( ! ( multiSelectionDisabled ) ) ) { selectionModel.setMultiSelectEnabled ( event.getCtrlKey ( ) ) ; selectionModel.setMultiRangeSelectEnabled ( event.getShiftKey ( ) ) ; } table.setFocus ( false ) ; super . onBrowserEvent2 ( event ) ; }

Target:
protected void onBrowserEvent2 ( com.google.gwt.user.client.Event event ) { mousePosition [ 0 ] = event.getClientX ( ) ; mousePosition [ 1 ] = event.getClientY ( ) ; if ( ( BrowserEvents.CLICK.equals ( event.getType ( ) ) ) && ( ! ( multiSelectionDisabled ) ) ) { selectionModel.setMultiSelectEnabled ( event.getCtrlKey ( ) ) ; selectionModel.setMultiRangeSelectEnabled ( event.getShiftKey ( ) ) ; } table.setFocus ( false ) ; super . onBrowserEvent2 ( event ) ; }
Source:
public void testRemoveByRemoveIsoDomain ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.RepoFileMetaData > listOfRepoFiles = repoFileMetaDataDao.getRepoListForStorageDomain ( FixturesTool.SHARED_ISO_STORAGE_DOAMIN_FOR_SP2_AND_SP3 , FileTypeExtension.ISO ) ; org.junit.Assert.assertNotNull ( listOfRepoFiles ) ; org.junit.Assert.assertNotSame ( true , listOfRepoFiles.isEmpty ( ) ) ; org.ovirt.engine.core.dao.StorageDomainDAO storageDomainDao = dbFacade.getStorageDomainDao ( ) ; storageDomainDao.remove ( FixturesTool.SHARED_ISO_STORAGE_DOAMIN_FOR_SP2_AND_SP3 ) ; listOfRepoFiles = getActiveIsoDomain ( ) ; org.junit.Assert.assertNotNull ( listOfRepoFiles ) ; org.junit.Assert.assertSame ( true , listOfRepoFiles.isEmpty ( ) ) ; }

Target:
public void testRemoveByRemoveIsoDomain ( ) { java.util.List < org.ovirt.engine.core.common.businessentities.RepoFileMetaData > listOfRepoFiles = repoFileMetaDataDao.getRepoListForStorageDomain ( FixturesTool.SHARED_ISO_STORAGE_DOAMIN_FOR_SP2_AND_SP3 , ImageType.ISO ) ; org.junit.Assert.assertNotNull ( listOfRepoFiles ) ; org.junit.Assert.assertNotSame ( true , listOfRepoFiles.isEmpty ( ) ) ; org.ovirt.engine.core.dao.StorageDomainDAO storageDomainDao = dbFacade.getStorageDomainDao ( ) ; storageDomainDao.remove ( FixturesTool.SHARED_ISO_STORAGE_DOAMIN_FOR_SP2_AND_SP3 ) ; listOfRepoFiles = getActiveIsoDomain ( ) ; org.junit.Assert.assertNotNull ( listOfRepoFiles ) ; org.junit.Assert.assertSame ( true , listOfRepoFiles.isEmpty ( ) ) ; }
Source:
private void cancelIncommingMigrations ( ) { for ( org.ovirt.engine.core.compat.Guid hostId : vdssToMaintenance.keySet ( ) ) { for ( org.ovirt.engine.core.common.businessentities.VM vm : org.ovirt.engine.core.bll.MaintenanceNumberOfVdssCommand.getVmDAO ( ) . getAllMigratingToHost ( hostId ) ) { runVdsCommand ( VDSCommandType.CancelMigrate , new org.ovirt.engine.core.vdsbroker.vdsbroker.CancelMigrationVDSParameters ( vm.getRunOnVds ( ) , vm.getId ( ) , true ) ) ; } } }

Target:
private void cancelIncommingMigrations ( ) { for ( org.ovirt.engine.core.compat.Guid hostId : vdssToMaintenance.keySet ( ) ) { for ( org.ovirt.engine.core.common.businessentities.VM vm : org.ovirt.engine.core.bll.MaintenanceNumberOfVdssCommand.getVmDAO ( ) . getAllMigratingToHost ( hostId ) ) { if ( ( vm.getStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.MigratingFrom ) ) { log.infoFormat ( "Cancelling incoming migration of {0} id: {1}" , vm , vm.getId ( ) ) ; runVdsCommand ( VDSCommandType.CancelMigrate , new org.ovirt.engine.core.vdsbroker.vdsbroker.CancelMigrationVDSParameters ( vm.getRunOnVds ( ) , vm.getId ( ) , true ) ) ; } } } }
Source:
public void getVmConfigurationBySnapshot ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid snapshotSourceId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( org.ovirt.engine.core.common.businessentities.VM ) ( source ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmConfigurationBySnapshot , new org.ovirt.engine.core.common.queries.IdQueryParameters ( snapshotSourceId ) . withoutRefresh ( ) , aQuery ) ; }

Target:
public void getUpHostListByCluster ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String clusterName ) { 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 : java.util.Collections.emptyList ( ) ; } } ; getUpHostListByCluster ( aQuery , clusterName , null ) ; }
Source:
public static void getGlusterSwiftServerServices ( 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.GlusterServerService > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterServerServicesByClusterId , new org.ovirt.engine.core.common.queries.gluster.GlusterServiceQueryParameters ( clusterId , org.ovirt.engine.core.common.businessentities.gluster.ServiceType.GLUSTER_SWIFT ) , aQuery ) ; }

Target:
public void getUserMessageOfTheDayViaPublic ( 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 ( ) . runPublicQuery ( VdcQueryType.GetConfigurationValue , new org.ovirt.engine.core.common.queries.GetConfigurationValueParameters ( org.ovirt.engine.core.common.queries.ConfigurationValues.UserMessageOfTheDay , getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
public void testVmDuringMigration ( ) { setUpGeneralValidations ( ) ; org.mockito.Mockito.doReturn ( new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.VdcBllMessages.ACTION_TYPE_FAILED_MIGRATION_IN_PROGRESS ) ) . when ( vmValidator ) . vmNotDuringMigration ( ) ; org.mockito.Mockito.doReturn ( org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommandTest.getEmptyDiskList ( ) ) . when ( cmd ) . getDisksList ( ) ; org.junit.Assert.assertFalse ( cmd.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( cmd.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( VdcBllMessages.ACTION_TYPE_FAILED_MIGRATION_IN_PROGRESS.name ( ) ) ) ; }

Target:
public void testVmDuringMigration ( ) { setUpGeneralValidations ( ) ; org.mockito.Mockito.doReturn ( new org.ovirt.engine.core.bll.ValidationResult ( org.ovirt.engine.core.common.errors.EngineMessage.ACTION_TYPE_FAILED_MIGRATION_IN_PROGRESS ) ) . when ( vmValidator ) . vmNotDuringMigration ( ) ; org.mockito.Mockito.doReturn ( org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommandTest.getEmptyDiskList ( ) ) . when ( cmd ) . getDisksList ( ) ; org.junit.Assert.assertFalse ( cmd.canDoAction ( ) ) ; org.junit.Assert.assertTrue ( cmd.getReturnValue ( ) . getCanDoActionMessages ( ) . contains ( EngineMessage.ACTION_TYPE_FAILED_MIGRATION_IN_PROGRESS.name ( ) ) ) ; }
Source:
protected void setActionMessageParameters ( ) { addCanDoActionMessage ( EngineMessage.VAR__ACTION__SET ) ; addCanDoActionMessage ( EngineMessage.VAR__TYPE__GLUSTER_GEOREP_CONFIG ) ; addCanDoActionMessageVariable ( "configName" , getParameters ( ) . getConfigKey ( ) ) ; addCanDoActionMessageVariable ( "geoRepSessionKey" , getGeoRepSession ( ) . getSessionKey ( ) ) ; addCanDoActionMessageVariable ( "configValue" , getParameters ( ) . getConfigValue ( ) ) ; }

Target:
protected void setActionMessageParameters ( ) { addValidationMessage ( EngineMessage.VAR__ACTION__SET ) ; addValidationMessage ( EngineMessage.VAR__TYPE__GLUSTER_GEOREP_CONFIG ) ; addValidationMessageVariable ( "configName" , getParameters ( ) . getConfigKey ( ) ) ; addValidationMessageVariable ( "geoRepSessionKey" , getGeoRepSession ( ) . getSessionKey ( ) ) ; addValidationMessageVariable ( "configValue" , getParameters ( ) . getConfigValue ( ) ) ; }
Source:
public void testReadOneMovesToNextEventWithNestedElements ( ) { org.ovirt.api.metamodel.runtime.xml.XmlReader reader = openReader ( "<root><vm><name>myvm</name></vm><next/></root>" ) ; org.ovirt.engine.api.xml.V4XmlVmReader.readOne ( reader ) ; org.junit.Assert.assertEquals ( javax.xml.stream.XMLStreamConstants.START_ELEMENT , reader.getEventType ( ) ) ; org.junit.Assert.assertEquals ( "next" , reader.getLocalName ( ) ) ; }

Target:
public void testReadOneMovesToNextEventWithNestedElements ( ) { org.ovirt.api.metamodel.runtime.xml.XmlReader reader = openReader ( "<root><vm><name>myvm</name></vm><next/></root>" ) ; reader.next ( ) ; org.ovirt.engine.api.xml.V4XmlVmReader.readOne ( reader ) ; org.junit.Assert.assertEquals ( javax.xml.stream.XMLStreamConstants.START_ELEMENT , reader.getEventType ( ) ) ; org.junit.Assert.assertEquals ( "next" , reader.getLocalName ( ) ) ; }
Source:
public static void getGlusterHostsNewlyAdded ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid clusterId , boolean isFingerprintRequired ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetAddedGlusterServers , new org.ovirt.engine.core.common.queries.gluster.AddedGlusterServersParameters ( clusterId , isFingerprintRequired ) , aQuery ) ; }

Target:
public static void countAllTemplates ( 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 ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetVmTemplateCount , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }
Source:
public void tJDBCOutput_6_error ( java.lang.Exception exception , java.lang.String errorComponent , final java.util.Map < java.lang.String , java.lang.Object > globalMap ) throws ovirt_engine_dwh.aggregationtohourly_3_4.AggregationToHourly.TalendException { end_Hash.put ( "tJDBCOutput_6" , java.lang.System.currentTimeMillis ( ) ) ; ( ( java.util.Map ) ( threadLocal.get ( ) ) ) . put ( "status" , "failure" ) ; tJDBCInput_6_onSubJobError ( exception , errorComponent , globalMap ) ; }

Target:
public void tContextLoad_1_error ( java.lang.Exception exception , java.lang.String errorComponent , final java.util.Map < java.lang.String , java.lang.Object > globalMap ) throws ovirt_engine_dwh.aggregationtohourly_3_4.AggregationToHourly.TalendException { end_Hash.put ( "tContextLoad_1" , java.lang.System.currentTimeMillis ( ) ) ; ( ( java.util.Map ) ( threadLocal.get ( ) ) ) . put ( "status" , "failure" ) ; tJDBCInput_6_onSubJobError ( exception , errorComponent , globalMap ) ; }
Source:
protected void executeCommand ( ) { org.ovirt.engine.core.common.action.VdcActionType actionToExecute = org.ovirt.engine.core.bll.RunAsyncActionCommand.getParameters ( ) . getAction ( ) ; org.ovirt.engine.core.common.action.VdcActionParametersBase actionParameters = org.ovirt.engine.core.bll.RunAsyncActionCommand.getParameters ( ) . getActionParameters ( ) ; actionParameters.setParentCommand ( VdcActionType.RunAsyncAction ) ; actionParameters.setParentParameters ( org.ovirt.engine.core.bll.RunAsyncActionCommand.getParameters ( ) ) ; org.ovirt.engine.core.bll.tasks.CommandCoordinatorUtil.executeAsyncCommand ( actionToExecute , actionParameters , org.ovirt.engine.core.bll.RunAsyncActionCommand.cloneContextAndDetachFromParent ( ) ) ; org.ovirt.engine.core.bll.RunAsyncActionCommand.setSucceeded ( true ) ; }

Target:
protected void executeCommand ( ) { commandCoordinatorUtil.executeAsyncCommand ( org.ovirt.engine.core.bll.RunAsyncActionCommand.getParameters ( ) . getAction ( ) , org.ovirt.engine.core.bll.RunAsyncActionCommand.getParameters ( ) . getActionParameters ( ) , org.ovirt.engine.core.bll.RunAsyncActionCommand.cloneContextAndDetachFromParent ( ) ) ; org.ovirt.engine.core.bll.RunAsyncActionCommand.setSucceeded ( true ) ; }
Source:
public void setItems ( java.util.Collection value ) { super . setItems ( value ) ; if ( ( ( getSelectedItem ( ) ) == null ) && ( ( ( getSelectedItems ( ) ) == null ) || ( ( getSelectedItems ( ) . size ( ) ) == 0 ) ) ) { if ( ( value != null ) && ( value.iterator ( ) . hasNext ( ) ) ) { setSelectedItem ( value.iterator ( ) . next ( ) ) ; } } }

Target:
public void setItems ( java.util.Collection < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > value ) { super . setItems ( value ) ; if ( ( ( getSelectedItem ( ) ) == null ) && ( ( ( getSelectedItems ( ) ) == null ) || ( ( getSelectedItems ( ) . size ( ) ) == 0 ) ) ) { if ( ( value != null ) && ( value.iterator ( ) . hasNext ( ) ) ) { setSelectedItem ( value.iterator ( ) . next ( ) ) ; } } }
Source:
public void save ( org.ovirt.engine.core.common.businessentities.UserProfile profile ) { getCallsHandler ( ) . executeModification ( "InsertUserProfile" , createIdParameterMapper ( profile.getId ( ) ) . addValue ( "user_id" , profile.getUserId ( ) ) . addValue ( "ssh_public_key" , profile.getSshPublicKey ( ) ) ) ; }

Target:
public void save ( org.ovirt.engine.core.common.businessentities.UserProfile profile ) { getCallsHandler ( ) . executeModification ( "InsertUserProfile" , createIdParameterMapper ( profile.getId ( ) ) . addValue ( "user_id" , profile.getUserId ( ) ) . addValue ( "ssh_public_key" , profile.getSshPublicKey ( ) ) . addValue ( "user_portal_vm_auto_login" , profile.isUserPortalVmLoginAutomatically ( ) ) ) ; }
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.RunQuery ( VdcQueryType.GetGlusterHooks , new org.ovirt.engine.core.common.queries.gluster.GlusterParameters ( clusterId ) , aQuery ) ; }

Target:
public static void getRoleList ( 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.Role > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Role > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllRoles , new org.ovirt.engine.core.common.queries.MultilevelAdministrationsQueriesParameters ( ) , aQuery ) ; }
Source:
protected void setObjectName ( java.lang.Object object , java.lang.String name , boolean isSuffix ) { org.ovirt.engine.core.common.businessentities.VM vm = ( ( org.ovirt.engine.ui.uicommonweb.models.vms.ImportVmData ) ( object ) ) . getVm ( ) ; if ( isSuffix ) { vm.setName ( ( ( vm.getName ( ) ) + name ) ) ; } else { vm.setName ( name ) ; } }

Target:
private void setObjectName ( java.lang.Object object , java.lang.String input , boolean isSuffix ) { java.lang.String nameForTheClonedVm = ( isSuffix ) ? ( getObjectName ( object ) ) + input : input ; setObjectName ( object , nameForTheClonedVm ) ; assignedVmNames.add ( nameForTheClonedVm ) ; }
Source:
public org.ovirt.engine.core.common.businessentities.VDS activate ( ) { org.ovirt.engine.core.common.businessentities.VDS vds = null ; try { vds = org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVdsDao ( ) . get ( getVdsId ( ) ) ; refreshHost ( vds ) ; } catch ( java.lang.Exception e ) { org.ovirt.engine.core.vdsbroker.VdsManager.log.infoFormat ( "Failed to activate VDS = {0} with error: {1}." , getVdsId ( ) , e.getMessage ( ) ) ; } return vds ; }

Target:
public void refreshHost ( org.ovirt.engine.core.common.businessentities.VDS vds ) { try { refreshCapabilities ( new java.util.concurrent.atomic.AtomicBoolean ( ) , vds ) ; } finally { if ( vds != null ) { updateDynamicData ( vds.getDynamicData ( ) ) ; updateNumaData ( vds ) ; monitoringStrategy.processHardwareCapabilities ( vds ) ; org.ovirt.engine.core.vdsbroker.ResourceManager.getInstance ( ) . getEventListener ( ) . handleVdsVersion ( vds.getId ( ) ) ; } } }
Source:
private void RunVMOnSpecificHost_EntityChanged ( java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { if ( ( ( java.lang.Boolean ) ( getRunVMOnSpecificHost ( ) . getEntity ( ) ) ) == true ) { clearAndDisable ( getDontMigrateVM ( ) ) ; getHostCpu ( ) . setIsChangable ( true ) ; } else { clearAndDisable ( getHostCpu ( ) ) ; getDontMigrateVM ( ) . setIsChangable ( true ) ; } behavior.updateCpuPinningVisibility ( ) ; }

Target:
private void UpdateNumOfMonitors ( ) { if ( isVncSelected ( ) ) { getNumOfMonitors ( ) . setSelectedItem ( 1 ) ; getNumOfMonitors ( ) . setIsChangable ( false ) ; } else { getNumOfMonitors ( ) . setIsChangable ( true ) ; } }
Source:
public org.ovirt.engine.ui.common.presenter.AbstractModelBoundPopupPresenterWidget < ? extends org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel , ? > getConfirmModelPopup ( org.ovirt.engine.ui.uicommonweb.models.networks.NetworkListModel source , org.ovirt.engine.ui.uicommonweb.UICommand lastExecutedCommand ) { return super . getConfirmModelPopup ( source , lastExecutedCommand ) ; }

Target:
public org.ovirt.engine.ui.common.presenter.AbstractModelBoundPopupPresenterWidget < ? extends org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel , ? > getConfirmModelPopup ( org.ovirt.engine.ui.uicommonweb.models.networks.NetworkListModel source , org.ovirt.engine.ui.uicommonweb.UICommand lastExecutedCommand ) { if ( ( lastExecutedCommand == ( getModel ( ) . getRemoveCommand ( ) ) ) || ( lastExecutedCommand.getName ( ) . equals ( EditNetworkModel.APPLY_COMMAND_NAME ) ) ) { return removeConfirmPopupProvider.get ( ) ; } else { return super . getConfirmModelPopup ( source , lastExecutedCommand ) ; } }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { setNetworkStaticDetailsStyle ( ( ( ( model.getNetworkDhcp ( ) . getEntity ( ) ) == null ) || ( ! ( model.getNetworkDhcp ( ) . getEntity ( ) ) ) ) ) ; }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { setNetworkStaticDetailsStyle ( ( ( ( model.getNetworkBootProtocolList ( ) . getSelectedItem ( ) ) != null ) && ( ( model.getNetworkBootProtocolList ( ) . getSelectedItem ( ) ) == ( org.ovirt.engine.core.common.businessentities.network.NetworkBootProtocol.STATIC_IP ) ) ) ) ; }
Source:
private void updateDestinationVdsThreaded ( org.ovirt.engine.core.compat.Guid dstVdsId , final org.ovirt.engine.core.common.businessentities.VM vm ) { final org.ovirt.engine.core.vdsbroker.VdsManager vdsManager = org.ovirt.engine.core.vdsbroker.ResourceManager.getInstance ( ) . GetVdsManager ( dstVdsId ) ; if ( vdsManager != null ) { org.ovirt.engine.core.utils.threadpool.ThreadPoolUtil.execute ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { updateDestinationVdsOnTimer ( vdsManager , vm ) ; } } ) ; } }

Target:
private void updateDestinationVds ( final org.ovirt.engine.core.compat.Guid dstVdsId , final org.ovirt.engine.core.common.businessentities.VM vm ) { org.ovirt.engine.core.utils.threadpool.ThreadPoolUtil.execute ( new java.lang.Runnable ( ) { @ java.lang.Override public void run ( ) { org.ovirt.engine.core.dal.dbbroker.DbFacade.getInstance ( ) . getVdsDynamicDao ( ) . updatePartialVdsDynamicCalc ( dstVdsId , 1 , vm.getNumOfCpus ( ) , vm.getMinAllocatedMem ( ) , 0 , 0 ) ; org.ovirt.engine.core.vdsbroker.MigrateVDSCommand.log.debugFormat ( "IncreasePendingVms::MigrateVm Increasing vds {0} pending vcpu count, in {1}, and pending vmem size, in {2}. Vm: {3}" , dstVdsId , vm.getNumOfCpus ( ) , vm.getMinAllocatedMem ( ) , vm.getName ( ) ) ; } } ) ; }
Source:
protected java.lang.String getClientTitle ( ) { java.lang.String releaseCursorKeys = getReleaseCursorKeys ( ) ; java.lang.String releaseCursorKeysTranslated = org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getInstance ( ) . getComplexValueFromSpiceRedKeysResource ( ( releaseCursorKeys != null ? releaseCursorKeys : "shift+f12" ) ) ; java.lang.String releaseCursorMsg = "" ; if ( ! ( org.ovirt.engine.core.compat.StringHelper.isNullOrEmpty ( releaseCursorKeysTranslated ) ) ) { releaseCursorMsg = " - " + ( org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getMessages ( ) . pressKeyToReleaseCursor ( releaseCursorKeysTranslated ) ) ; } return ( ( getEntity ( ) . getName ( ) ) + ":%d" ) + releaseCursorMsg ; }

Target:
protected void setForeignMenuData ( org.ovirt.engine.ui.uicommonweb.restapi.HasForeignMenuData nativeImpl ) { nativeImpl.setEngineHost ( Window.Location.getHost ( ) ) ; nativeImpl.setVmId ( getEntity ( ) . getId ( ) ) ; nativeImpl.setAdmin ( org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . getLoggedInUser ( ) . isAdmin ( ) ) ; }
Source:
private void cancelMigration ( ) { java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > list = new java.util.ArrayList < org.ovirt.engine.core.common.action.VdcActionParametersBase > ( ) ; for ( java.lang.Object item : getSelectedItems ( ) ) { org.ovirt.engine.core.common.businessentities.VM a = ( ( org.ovirt.engine.core.common.businessentities.VM ) ( item ) ) ; list.add ( new org.ovirt.engine.core.common.action.VmOperationParameterBase ( a.getId ( ) ) ) ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runMultipleAction ( VdcActionType.CancelMigrateVm , list , new org.ovirt.engine.ui.uicompat.IFrontendMultipleActionAsyncCallback ( ) { @ java.lang.Override public void executed ( org.ovirt.engine.ui.uicompat.FrontendMultipleActionAsyncResult result ) { } } , null ) ; }

Target:
private void cancelMigration ( ) { 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.vms.VmListModel.getSelectedItems ( ) ) { org.ovirt.engine.core.common.businessentities.VM a = ( ( org.ovirt.engine.core.common.businessentities.VM ) ( item ) ) ; list.add ( new org.ovirt.engine.core.common.action.VmOperationParameterBase ( a.getId ( ) ) ) ; } org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runMultipleAction ( VdcActionType.CancelMigrateVm , list , new org.ovirt.engine.ui.uicompat.IFrontendMultipleActionAsyncCallback ( ) { @ java.lang.Override public void executed ( org.ovirt.engine.ui.uicompat.FrontendMultipleActionAsyncResult result ) { } } , null ) ; }
Source:
public boolean isStorageActive ( ) { return ( ( ( getStorage ( ) ) == null ) || ( ( getStorage ( ) . getstorage_domain_shared_status ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageDomainSharedStatus.Active ) ) ) || ( ( getStorage ( ) . getstorage_domain_shared_status ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageDomainSharedStatus.Mixed ) ) ; }

Target:
public boolean isStorageActive ( ) { return ( ( getStorage ( ) . getStorageDomainSharedStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageDomainSharedStatus.Active ) ) || ( ( getStorage ( ) . getStorageDomainSharedStatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.StorageDomainSharedStatus.Mixed ) ) ; }
Source:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { org.ovirt.engine.ui.uicommonweb.models.gluster.VolumeModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.gluster.VolumeModel ) ( sender ) ) ; if ( "Bricks" . equals ( ( ( org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ) ( args ) ) . PropertyName ) ) { bricksCountEditor.setText ( org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getMessages ( ) . noOfBricksSelected ( ( ( model.getBricks ( ) . getSelectedItems ( ) ) == null ? 0 : model.getBricks ( ) . getSelectedItems ( ) . size ( ) ) ) ) ; } }

Target:
public void eventRaised ( org.ovirt.engine.ui.uicompat.Event ev , java.lang.Object sender , org.ovirt.engine.ui.uicompat.EventArgs args ) { org.ovirt.engine.ui.uicommonweb.models.gluster.VolumeModel model = ( ( org.ovirt.engine.ui.uicommonweb.models.gluster.VolumeModel ) ( sender ) ) ; if ( "Bricks" . equals ( ( ( org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs ) ( args ) ) . propertyName ) ) { bricksCountEditor.setText ( org.ovirt.engine.ui.uicompat.ConstantsManager.getInstance ( ) . getMessages ( ) . noOfBricksSelected ( ( ( model.getBricks ( ) . getSelectedItems ( ) ) == null ? 0 : model.getBricks ( ) . getSelectedItems ( ) . size ( ) ) ) ) ; } }
Source:
public void executeCommandTest ( ) { addClusterCommand.executeCommand ( ) ; org.mockito.Mockito.verify ( clusterDao ) . save ( cluster ) ; org.mockito.Mockito.verify ( backend ) . runAction ( org.mockito.ArgumentMatchers.eq ( VdcActionType.AddCpuProfile ) , org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.common.action.CpuProfileParameters.class ) ) ; org.junit.Assert.assertTrue ( addClusterCommand.getReturnValue ( ) . getSucceeded ( ) ) ; }

Target:
public void executeCommandTest ( ) { addClusterCommand.executeCommand ( ) ; org.mockito.Mockito.verify ( clusterDao ) . save ( cluster ) ; org.mockito.Mockito.verify ( backend ) . runAction ( org.mockito.ArgumentMatchers.eq ( ActionType.AddCpuProfile ) , org.mockito.ArgumentMatchers.any ( org.ovirt.engine.core.common.action.CpuProfileParameters.class ) ) ; org.junit.Assert.assertTrue ( addClusterCommand.getReturnValue ( ) . getSucceeded ( ) ) ; }
Source:
private void doFetchPrincipalRecord ( org.ovirt.engine.api.extensions.ExtMap input , org.ovirt.engine.api.extensions.ExtMap output ) { org.ovirt.engine.extensions.aaa.builtin.kerberosldap.LdapReturnValueBase ldapResult = broker.runAdAction ( AdActionType.GetAdUserByUserName , new org.ovirt.engine.extensions.aaa.builtin.kerberosldap.LdapSearchByUserNameParameters ( null , getDirectoryName ( ) , input.< org.ovirt.engine.api.extensions.ExtMap > get ( Authn.InvokeKeys.AUTH_RECORD ) . < java.lang.String > get ( Authn.AuthRecord.PRINCIPAL ) ) ) ; output.mput ( Authz.InvokeKeys.PRINCIPAL_RECORD , mapLdapUser ( ( ( org.ovirt.engine.core.common.businessentities.LdapUser ) ( ldapResult.getReturnValue ( ) ) ) ) ) ; }

Target:
private void doFetchPrincipalRecord ( org.ovirt.engine.api.extensions.ExtMap input , org.ovirt.engine.api.extensions.ExtMap output ) { org.ovirt.engine.extensions.aaa.builtin.kerberosldap.LdapReturnValueBase ldapResult = broker.runAdAction ( AdActionType.GetAdUserByUserName , new org.ovirt.engine.extensions.aaa.builtin.kerberosldap.LdapSearchByUserNameParameters ( configuration , null , getDirectoryName ( ) , input.< org.ovirt.engine.api.extensions.ExtMap > get ( Authn.InvokeKeys.AUTH_RECORD ) . < java.lang.String > get ( Authn.AuthRecord.PRINCIPAL ) ) ) ; output.mput ( Authz.InvokeKeys.PRINCIPAL_RECORD , mapLdapUser ( ( ( org.ovirt.engine.core.common.businessentities.LdapUser ) ( ldapResult.getReturnValue ( ) ) ) ) ) . mput ( Authz.InvokeKeys.STATUS , Authz.Status.SUCCESS ) ; }
Source:
public void getVmSnapshotList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid id ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Snapshot > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetAllVmSnapshotsByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }

Target:
public void getAllTemplatesFromExportDomain ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid storagePoolId , 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 ? source : new java.util.HashMap < org.ovirt.engine.core.common.businessentities.VmTemplate , java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.DiskImage > > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetAllFromExportDomainQueryParameters getAllFromExportDomainQueryParamenters = new org.ovirt.engine.core.common.queries.GetAllFromExportDomainQueryParameters ( storagePoolId , storageDomainId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetTemplatesFromExportDomain , getAllFromExportDomainQueryParamenters , aQuery ) ; }
Source:
public void eventRaised ( org.ovirt.engine.core.compat.Event ev , java.lang.Object sender , org.ovirt.engine.core.compat.EventArgs args ) { org.ovirt.engine.ui.uicommonweb.models.EntityModel entity = ( ( org.ovirt.engine.ui.uicommonweb.models.EntityModel ) ( sender ) ) ; getView ( ) . setDetachAllVisible ( ( ( java.lang.Boolean ) ( entity.getEntity ( ) ) ) ) ; }

Target:
public void eventRaised ( org.ovirt.engine.core.compat.Event ev , java.lang.Object sender , org.ovirt.engine.core.compat.EventArgs args ) { java.lang.String propertyName = ( ( org.ovirt.engine.core.compat.PropertyChangedEventArgs ) ( args ) ) . PropertyName ; if ( "IsExecutionAllowed" . equals ( propertyName ) ) { getView ( ) . setApplyEnabled ( model.getApplyCommand ( ) . getIsExecutionAllowed ( ) ) ; } }
Source:
public void executeCommand ( org.ovirt.engine.ui.uicommonweb.UICommand command ) { super . executeCommand ( command ) ; if ( command == ( getManageCommand ( ) ) ) { Manage ( ) ; } else if ( org.ovirt.engine.core.compat.StringHelper.stringsEqual ( command.getName ( ) , "OnManage" ) ) { OnManage ( ) ; } else if ( org.ovirt.engine.core.compat.StringHelper.stringsEqual ( command.getName ( ) , "Cancel" ) ) { cancel ( ) ; } }

Target:
public void executeCommand ( org.ovirt.engine.ui.uicommonweb.UICommand command ) { super . executeCommand ( command ) ; if ( command == ( getManageCommand ( ) ) ) { manage ( ) ; } else if ( org.ovirt.engine.core.compat.StringHelper.stringsEqual ( command.getName ( ) , "OnManage" ) ) { onManage ( ) ; } else if ( org.ovirt.engine.core.compat.StringHelper.stringsEqual ( command.getName ( ) , "Cancel" ) ) { cancel ( ) ; } }
Source:
public void Executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { java.lang.Object [ ] array = ( ( java.lang.Object [ ] ) ( result.getState ( ) ) ) ; org.ovirt.engine.ui.uicommonweb.models.hosts.HostListModel localModel = ( ( org.ovirt.engine.ui.uicommonweb.models.hosts.HostListModel ) ( array [ 0 ] ) ) ; boolean localApproveInitiated = ( ( java.lang.Boolean ) ( array [ 1 ] ) ) ; localModel.PostOnSaveInternal ( result.getReturnValue ( ) , localApproveInitiated ) ; }

Target:
public void executed ( org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult result ) { java.lang.Object [ ] array = ( ( java.lang.Object [ ] ) ( result.getState ( ) ) ) ; org.ovirt.engine.ui.uicommonweb.models.hosts.HostListModel localModel = ( ( org.ovirt.engine.ui.uicommonweb.models.hosts.HostListModel ) ( array [ 0 ] ) ) ; boolean localApproveInitiated = ( ( java.lang.Boolean ) ( array [ 1 ] ) ) ; localModel.postOnSaveInternal ( result.getReturnValue ( ) , localApproveInitiated ) ; }
Source:
private void revertChanges ( ) { if ( ( originalNetParams ) != null ) { setBootProtocol ( originalNetParams.getBootProtocol ( ) ) ; getAddress ( ) . setEntity ( originalNetParams.getAddress ( ) ) ; getSubnet ( ) . setEntity ( originalNetParams.getSubnet ( ) ) ; getGateway ( ) . setEntity ( originalNetParams.getGateway ( ) ) ; } }

Target:
private void revertChanges ( ) { if ( ( originalNetParams ) != null ) { setBootProtocol ( originalNetParams.getBootProtocol ( ) ) ; getAddress ( ) . setEntity ( originalNetParams.getAddress ( ) ) ; getSubnet ( ) . setEntity ( originalNetParams.getSubnet ( ) ) ; getGateway ( ) . setEntity ( originalNetParams.getGateway ( ) ) ; getCustomPropertiesModel ( ) . deserialize ( org.ovirt.engine.ui.uicommonweb.models.vms.key_value.KeyValueModel.convertProperties ( originalNetParams.getCustomProperties ( ) ) ) ; } }
Source:
public static void getPermittedStorageDomainsByStoragePoolId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid dataCenterId , org.ovirt.engine.core.common.businessentities.ActionGroup actionGroup ) { 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.StorageDomain > ( ) ; } return source ; } } ; org.ovirt.engine.core.common.queries.GetPermittedStorageDomainsByStoragePoolIdParameters params = new org.ovirt.engine.core.common.queries.GetPermittedStorageDomainsByStoragePoolIdParameters ( ) ; params.setStoragePoolId ( dataCenterId ) ; params.setActionGroup ( actionGroup ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetPermittedStorageDomainsByStoragePoolId , params , aQuery ) ; }

Target:
public void getVmList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String poolName ) { 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 ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.VM > vms = org.ovirt.engine.ui.uicommonweb.Linq.< org.ovirt.engine.core.common.businessentities.VM > cast ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.IVdcQueryable > ) ( source ) ) ) ; return vms ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.Search , new org.ovirt.engine.core.common.queries.SearchParameters ( ( "Vms: pool=" + poolName ) , org.ovirt.engine.core.common.interfaces.SearchType.VM ) , aQuery ) ; }
Source:
void localize ( org.ovirt.engine.ui.webadmin.ApplicationConstants constants ) { titleLabel.setText ( constants.configurePopupTitle ( ) ) ; closeButton.setText ( constants.closeButtonLabel ( ) ) ; rolesTab.setLabel ( constants.configureRoleTabLabel ( ) ) ; clusterPoliciesTab.setLabel ( constants.configureClusterPolicyTabLabel ( ) ) ; systemPermissionsTab.setLabel ( constants.configureSystemPermissionTabLabel ( ) ) ; }

Target:
void localize ( org.ovirt.engine.ui.webadmin.ApplicationConstants constants ) { titleLabel.setText ( constants.configurePopupTitle ( ) ) ; closeButton.setText ( constants.closeButtonLabel ( ) ) ; rolesTab.setLabel ( constants.configureRoleTabLabel ( ) ) ; clusterPoliciesTab.setLabel ( constants.configureClusterPolicyTabLabel ( ) ) ; systemPermissionsTab.setLabel ( constants.configureSystemPermissionTabLabel ( ) ) ; instanceTypesTab.setLabel ( constants.instanceTypes ( ) ) ; }
Source:
public java.util.Map < java.lang.String , java.lang.Object > getSpecParams ( ) { java.util.Map < java.lang.String , java.lang.Object > specParams = new java.util.HashMap < java.lang.String , java.lang.Object > ( ) ; java.util.Map < java.lang.String , java.lang.Object > fileTypeList = new java.util.HashMap < java.lang.String , java.lang.Object > ( ) ; specParams.put ( org.ovirt.engine.core.common.businessentities.VmPayload.SpecParamsPayload , fileTypeList ) ; fileTypeList.put ( org.ovirt.engine.core.common.businessentities.VmPayload.SpecParamsFileType , files ) ; return specParams ; }

Target:
public java.util.Map < java.lang.String , java.lang.Object > getSpecParams ( ) { java.util.Map < java.lang.String , java.lang.Object > specParams = new java.util.HashMap < java.lang.String , java.lang.Object > ( ) ; java.util.Map < java.lang.String , java.lang.Object > payload = new java.util.HashMap < java.lang.String , java.lang.Object > ( ) ; specParams.put ( org.ovirt.engine.core.common.businessentities.VmPayload.SpecParamsPayload , payload ) ; if ( ( volumeId ) != null ) { payload.put ( org.ovirt.engine.core.common.businessentities.VmPayload.SpecParamsVolumeIdType , volumeId ) ; } payload.put ( org.ovirt.engine.core.common.businessentities.VmPayload.SpecParamsFileType , files ) ; return specParams ; }
Source:
protected void initializeCommand ( org.ovirt.engine.core.common.businessentities.ImageOperation operation ) { command = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.MoveOrCopyDiskCommandTest.MoveOrCopyDiskCommandDummy ( new org.ovirt.engine.core.common.action.MoveOrCopyImageGroupParameters ( diskImageGuid , srcStorageId , destStorageId , operation ) ) ) ; org.mockito.Mockito.doReturn ( true ) . when ( command ) . isStorageDomainSpaceWithinThresholds ( ) ; org.mockito.Mockito.doReturn ( true ) . when ( command ) . checkImageConfiguration ( ) ; org.mockito.Mockito.doReturn ( java.util.Collections.emptyList ( ) ) . when ( command ) . getAllImageSnapshots ( ) ; org.mockito.Mockito.doReturn ( false ) . when ( command ) . acquireLock ( ) ; }

Target:
protected void initializeCommand ( org.ovirt.engine.core.common.businessentities.ImageOperation operation ) { command = org.mockito.Mockito.spy ( new org.ovirt.engine.core.bll.MoveOrCopyDiskCommandTest.MoveOrCopyDiskCommandDummy ( new org.ovirt.engine.core.common.action.MoveOrCopyImageGroupParameters ( diskImageGuid , srcStorageId , destStorageId , operation ) ) ) ; org.mockito.Mockito.doReturn ( true ) . when ( command ) . checkImageConfiguration ( ) ; org.mockito.Mockito.doReturn ( org.ovirt.engine.core.bll.MoveOrCopyDiskCommandTest.mockStorageDomainValidatorWithSpace ( ) ) . when ( command ) . createStorageDomainValidator ( ) ; org.mockito.Mockito.doReturn ( false ) . when ( command ) . acquireLock ( ) ; }
Source:
private void setupVmNetworkInterfaceDao ( java.util.List < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > expectedVmNetworkInterfaces ) { org.ovirt.engine.core.dao.VmNetworkInterfaceDAO vmNetworkInterfaceDaoMock = org.mockito.Mockito.mock ( org.ovirt.engine.core.dao.VmNetworkInterfaceDAO.class ) ; org.mockito.Mockito.when ( vmNetworkInterfaceDaoMock.getAllForNetwork ( networkId ) ) . thenReturn ( expectedVmNetworkInterfaces ) ; org.mockito.Mockito.when ( getDbFacadeMockInstance ( ) . getVmNetworkInterfaceDao ( ) ) . thenReturn ( vmNetworkInterfaceDaoMock ) ; }

Target:
private void setupVmNetworkInterfaceDao ( java.util.List < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > expectedVmNetworkInterfaces ) { org.ovirt.engine.core.dao.VmNetworkInterfaceDao vmNetworkInterfaceDaoMock = org.mockito.Mockito.mock ( org.ovirt.engine.core.dao.VmNetworkInterfaceDao.class ) ; org.mockito.Mockito.when ( vmNetworkInterfaceDaoMock.getAllForNetwork ( networkId ) ) . thenReturn ( expectedVmNetworkInterfaces ) ; org.mockito.Mockito.when ( getDbFacadeMockInstance ( ) . getVmNetworkInterfaceDao ( ) ) . thenReturn ( vmNetworkInterfaceDaoMock ) ; }