auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void getAllErrata ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { if ( source == null ) { return new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.Erratum > ( ) ; } return source ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetErrataForSystem , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }

Target:
public java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.StorageType > getStorageTypeList ( ) { return new java.util.ArrayList ( java.util.Arrays.asList ( StorageType.ISCSI , StorageType.FCP ) ) ; }
Source:
public void cleanHostParametersFields ( ) { getName ( ) . setEntity ( constants.empty ( ) ) ; getComment ( ) . setEntity ( constants.empty ( ) ) ; getAuthSshPort ( ) . setEntity ( java.lang.Integer.parseInt ( constants.defaultHostSSHPort ( ) ) ) ; getHost ( ) . setEntity ( constants.empty ( ) ) ; getUserPassword ( ) . setEntity ( constants.empty ( ) ) ; getFetchSshFingerprint ( ) . setEntity ( constants.empty ( ) ) ; }

Target:
public void cleanHostParametersFields ( ) { getName ( ) . setEntity ( "" ) ; getComment ( ) . setEntity ( "" ) ; getAuthSshPort ( ) . setEntity ( java.lang.Integer.parseInt ( constants.defaultHostSSHPort ( ) ) ) ; getHost ( ) . setEntity ( "" ) ; getUserPassword ( ) . setEntity ( "" ) ; getFetchSshFingerprint ( ) . setEntity ( "" ) ; }
Source:
private static boolean isQosInSync ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface , org.ovirt.engine.core.common.businessentities.network.NetworkQoS networkQos ) { org.ovirt.engine.core.common.businessentities.network.NetworkQoS ifaceQos = iface.getQos ( ) ; if ( ifaceQos == networkQos ) { return true ; } else if ( ( ifaceQos == null ) || ( networkQos == null ) ) { return false ; } else { return ifaceQos.equalValues ( networkQos ) ; } }

Target:
private static boolean isQosInSync ( org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface iface , org.ovirt.engine.core.common.businessentities.network.HostNetworkQos networkQos ) { org.ovirt.engine.core.common.businessentities.network.HostNetworkQos ifaceQos = iface.getQos ( ) ; return org.ovirt.engine.core.utils.NetworkUtils.qosParametersEqual ( ifaceQos , networkQos ) ; }
Source:
protected org.ovirt.engine.core.common.businessentities.VmTemplate lookupTemplate ( org.ovirt.engine.api.model.Template template , org.ovirt.engine.core.compat.Guid datacenterId ) { if ( template.isSetId ( ) ) { return getEntity ( org.ovirt.engine.core.common.businessentities.VmTemplate.class , VdcQueryType.GetVmTemplate , new org.ovirt.engine.core.common.queries.GetVmTemplateParameters ( asGuid ( template.getId ( ) ) ) , "GetVmTemplate" ) ; } else if ( template.isSetName ( ) ) { org.ovirt.engine.core.common.queries.GetVmTemplateParameters params = new org.ovirt.engine.core.common.queries.GetVmTemplateParameters ( template.getName ( ) ) ; params.setDataCenterId ( datacenterId ) ; return getEntity ( org.ovirt.engine.core.common.businessentities.VmTemplate.class , VdcQueryType.GetVmTemplate , params , "GetVmTemplate" ) ; } return null ; }

Target:
protected org.ovirt.engine.core.common.businessentities.VmTemplate lookupTemplate ( org.ovirt.engine.api.model.Template template , org.ovirt.engine.core.compat.Guid datacenterId ) { if ( template.isSetId ( ) ) { return getEntity ( org.ovirt.engine.core.common.businessentities.VmTemplate.class , QueryType.GetVmTemplate , new org.ovirt.engine.core.common.queries.GetVmTemplateParameters ( asGuid ( template.getId ( ) ) ) , "GetVmTemplate" ) ; } else if ( template.isSetName ( ) ) { org.ovirt.engine.core.common.queries.GetVmTemplateParameters params = new org.ovirt.engine.core.common.queries.GetVmTemplateParameters ( template.getName ( ) ) ; params.setDataCenterId ( datacenterId ) ; return getEntity ( org.ovirt.engine.core.common.businessentities.VmTemplate.class , QueryType.GetVmTemplate , params , "GetVmTemplate" ) ; } return null ; }
Source:
public void testGet ( ) { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpEntityQueryExpectations ( VdcQueryType.GetDiskByDiskId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendStorageDomainDiskResourceTest.DISK_ID } , getEntity ( 1 ) ) ; org.ovirt.engine.api.model.Disk disk = resource.get ( ) ; org.ovirt.engine.api.restapi.resource.BackendStorageDomainDiskResourceTest.verifyModelSpecific ( disk , 1 ) ; verifyLinks ( disk ) ; }

Target:
public void testGet ( ) { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpEntityQueryExpectations ( QueryType.GetDiskByDiskId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendStorageDomainDiskResourceTest.DISK_ID } , getEntity ( 1 ) ) ; org.ovirt.engine.api.model.Disk disk = resource.get ( ) ; org.ovirt.engine.api.restapi.resource.BackendStorageDomainDiskResourceTest.verifyModelSpecific ( disk , 1 ) ; verifyLinks ( disk ) ; }
Source:
private org.ovirt.engine.core.common.businessentities.VDS makeTestVds ( org.ovirt.engine.core.compat.Guid vdsId ) { org.ovirt.engine.core.common.businessentities.VDS newVdsData = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; newVdsData.setHostName ( "BUZZ" ) ; newVdsData.setVdsName ( "BAR" ) ; newVdsData.setVdsGroupCompatibilityVersion ( new org.ovirt.engine.core.compat.Version ( "1.2.3" ) ) ; newVdsData.setVdsGroupId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; newVdsData.setId ( vdsId ) ; return newVdsData ; }

Target:
private org.ovirt.engine.core.common.businessentities.VDS makeTestVds ( org.ovirt.engine.core.compat.Guid vdsId ) { org.ovirt.engine.core.common.businessentities.VDS newVdsData = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; newVdsData.setHostName ( "BUZZ" ) ; newVdsData.setVdsName ( "BAR" ) ; newVdsData.setClusterCompatibilityVersion ( new org.ovirt.engine.core.compat.Version ( "1.2.3" ) ) ; newVdsData.setClusterId ( org.ovirt.engine.core.compat.Guid.newGuid ( ) ) ; newVdsData.setId ( vdsId ) ; return newVdsData ; }
Source:
protected javax.ws.rs.core.Response performAdd ( N incoming ) { org.ovirt.engine.core.common.scheduling.ClusterPolicy entity = getClusterPolicy ( ) ; performAction ( VdcActionType.EditClusterPolicy , getAddParametersProvider ( ) . getParameters ( incoming , entity ) ) ; entity = getClusterPolicy ( ) ; updateIncomingId ( incoming ) ; N model = map ( entity , incoming ) ; model = addLinks ( doPopulate ( model , entity ) ) ; return javax.ws.rs.core.Response.ok ( model ) . build ( ) ; }

Target:
protected javax.ws.rs.core.Response performAdd ( N incoming ) { org.ovirt.engine.core.common.scheduling.ClusterPolicy entity = getClusterPolicy ( ) ; performAction ( ActionType.EditClusterPolicy , getAddParametersProvider ( ) . getParameters ( incoming , entity ) ) ; entity = getClusterPolicy ( ) ; updateIncomingId ( incoming ) ; N model = map ( entity , incoming ) ; model = addLinks ( doPopulate ( model , entity ) ) ; return javax.ws.rs.core.Response.ok ( model ) . build ( ) ; }
Source:
private java.util.List < org.ovirt.engine.core.common.businessentities.Provider > getBackendCollection ( ) { if ( isFiltered ( ) ) { return getBackendCollection ( VdcQueryType.GetAllProviders , new org.ovirt.engine.core.common.queries.GetAllProvidersParameters ( org.ovirt.engine.core.common.businessentities.ProviderType.OPENSTACK_NETWORK , org.ovirt.engine.core.common.businessentities.ProviderType.EXTERNAL_NETWORK ) ) ; } else { java.util.List < org.ovirt.engine.core.common.businessentities.Provider > openstackCollection = getBackendCollection ( SearchType.Provider , getConstraint ( ProviderType.OPENSTACK_NETWORK.name ( ) ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.Provider > externalCollection = getBackendCollection ( SearchType.Provider , getConstraint ( ProviderType.EXTERNAL_NETWORK.name ( ) ) ) ; openstackCollection.addAll ( externalCollection ) ; return openstackCollection ; } }

Target:
private java.util.List < org.ovirt.engine.core.common.businessentities.Provider > getBackendCollection ( ) { if ( isFiltered ( ) ) { return getBackendCollection ( QueryType.GetAllProviders , new org.ovirt.engine.core.common.queries.GetAllProvidersParameters ( org.ovirt.engine.core.common.businessentities.ProviderType.OPENSTACK_NETWORK , org.ovirt.engine.core.common.businessentities.ProviderType.EXTERNAL_NETWORK ) ) ; } else { java.util.List < org.ovirt.engine.core.common.businessentities.Provider > openstackCollection = getBackendCollection ( SearchType.Provider , getConstraint ( ProviderType.OPENSTACK_NETWORK.name ( ) ) ) ; java.util.List < org.ovirt.engine.core.common.businessentities.Provider > externalCollection = getBackendCollection ( SearchType.Provider , getConstraint ( ProviderType.EXTERNAL_NETWORK.name ( ) ) ) ; openstackCollection.addAll ( externalCollection ) ; return openstackCollection ; } }
Source:
private void expandTree ( com.google.gwt.user.cellview.client.TreeNode node , boolean collapse ) { if ( node == null ) { return ; } if ( ( node.getChildCount ( ) ) > 0 ) { for ( int i = 0 ; i < ( node.getChildCount ( ) ) ; i ++ ) { expandTree ( node.setChildOpen ( i , collapse ) , collapse ) ; } } }

Target:
private void expandTree ( com.google.gwt.user.cellview.client.TreeNode node , int expandUpToLevel ) { if ( node == null ) { return ; } for ( int i = 0 ; i < ( node.getChildCount ( ) ) ; i ++ ) { boolean expandNode = ( 0 < expandUpToLevel ) ? true : false ; expandTree ( node.setChildOpen ( i , expandNode ) , ( expandUpToLevel - 1 ) ) ; } }
Source:
public void AppendCustomValue ( final java.lang.String name , final java.lang.String value , final java.lang.String separator ) { final java.lang.String key = name.toLowerCase ( ) ; java.lang.String newValue = value ; if ( customValues.containsKey ( key ) ) { newValue = java.lang.String.format ( "%1$s%2$s%3$s" , customValues.get ( key ) , separator , value ) ; } customValues.put ( name.toLowerCase ( ) , newValue ) ; }

Target:
public void appendCustomValue ( final java.lang.String name , final java.lang.String value , final java.lang.String separator ) { final java.lang.String key = name.toLowerCase ( ) ; java.lang.String newValue = value ; if ( customValues.containsKey ( key ) ) { newValue = java.lang.String.format ( "%1$s%2$s%3$s" , customValues.get ( key ) , separator , value ) ; } customValues.put ( name.toLowerCase ( ) , newValue ) ; }
Source:
private void mockConfig ( ) { org.powermock.api.mockito.PowerMockito.when ( org.ovirt.engine.core.common.config.Config.< java.lang.Object > GetValue ( ConfigValues.PredefinedVMProperties , "3.0" ) ) . thenReturn ( "" ) ; org.powermock.api.mockito.PowerMockito.when ( org.ovirt.engine.core.common.config.Config.< java.lang.Object > GetValue ( ConfigValues.UserDefinedVMProperties , "3.0" ) ) . thenReturn ( "" ) ; org.powermock.api.mockito.PowerMockito.when ( org.ovirt.engine.core.common.config.Config.< java.lang.Object > GetValue ( ConfigValues.InitStorageSparseSizeInGB ) ) . thenReturn ( new java.lang.Integer ( "1" ) ) ; }

Target:
private void mockConfig ( ) { mcr.mockConfigValue ( ConfigValues.PredefinedVMProperties , "3.0" , "" ) ; mcr.mockConfigValue ( ConfigValues.UserDefinedVMProperties , "3.0" , "" ) ; mcr.mockConfigValue ( ConfigValues.InitStorageSparseSizeInGB , 1 ) ; }
Source:
protected void setUpGetEntityExpectations ( int times , org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface entity ) throws java.lang.Exception { while ( ( times -- ) > 0 ) { setUpGetEntityExpectations ( VdcQueryType.GetVmInterfacesByVmId , org.ovirt.engine.core.common.queries.GetVmByVmIdParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.AbstractBackendNicsResourceTest.PARENT_ID } , entity ) ; } }

Target:
protected void setUpGetEntityExpectations ( int times , org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface entity ) throws java.lang.Exception { while ( ( times -- ) > 0 ) { setUpGetEntityExpectations ( VdcQueryType.GetVmInterfacesByVmId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.AbstractBackendNicsResourceTest.PARENT_ID } , entity ) ; } }
Source:
protected boolean ExecuteWithoutTransaction ( ) { boolean succeeded = false ; try { log.info ( "Running Command: RegisterVds" ) ; ExecuteRegisterVdsCommand ( ) ; succeeded = org.ovirt.engine.core.bll.RegisterVdsQuery.getQueryReturnValue ( ) . getSucceeded ( ) ; } catch ( java.lang.RuntimeException ex ) { log.error ( "RegisterVdsQuery::ExecuteWithoutTransaction: An exception has been thrown." , ex ) ; } finally { WriteToAuditLog ( ) ; } return succeeded ; }

Target:
protected void executeQueryCommand ( ) { try { log.info ( "Running Command: RegisterVds" ) ; ExecuteRegisterVdsCommand ( ) ; } catch ( java.lang.RuntimeException ex ) { log.error ( "RegisterVdsQuery::ExecuteWithoutTransaction: An exception has been thrown." , ex ) ; } finally { writeToAuditLog ( ) ; } }
Source:
private java.lang.Integer getPmPrimaryPortAsInteger ( ) { if ( ( ( getPmPort ( ) ) != null ) && ( ( getPmPort ( ) . getEntity ( ) ) != null ) ) { return java.lang.Integer.valueOf ( getPmPort ( ) . getEntity ( ) ) ; } else { return null ; } }

Target:
public void run ( ) { getKernelCmdline ( ) . setEntity ( "" ) ; }
Source:
public void getRoleActionGroupsByRoleId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid roleId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ActionGroup > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.ActionGroup > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetRoleActionGroupsByRoleId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( roleId ) , aQuery ) ; }

Target:
public void getGlusterHookContent ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hookId , org.ovirt.engine.core.compat.Guid serverId ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? source : "" ; } } ; org.ovirt.engine.core.common.queries.gluster.GlusterHookContentQueryParameters parameters = new org.ovirt.engine.core.common.queries.gluster.GlusterHookContentQueryParameters ( hookId ) ; parameters.setGlusterServerId ( serverId ) ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetGlusterHookContent , parameters , aQuery ) ; }
Source:
protected R linkSubResource ( R model , java.lang.String subResource , java.lang.String oid ) { java.lang.String href = java.lang.String.join ( "/" , org.ovirt.engine.api.restapi.util.LinkHelper.getPath ( model ) , oid , subResource ) ; addOrUpdateLink ( model , subResource , href ) ; return model ; }

Target:
protected R linkSubResource ( R model , java.lang.String subResource , java.lang.String oid ) { java.lang.String path = org.ovirt.engine.api.restapi.util.LinkHelper.getPath ( model ) ; if ( path != null ) { java.lang.String href = java.lang.String.join ( "/" , path , oid , subResource ) ; addOrUpdateLink ( model , subResource , href ) ; } return model ; }
Source:
private void DiskInterface_SelectedItemChanged ( ) { boolean isInternal = getIsInternal ( ) . getEntity ( ) ; org.ovirt.engine.core.common.businessentities.DiskInterface diskInterface = getDiskInterface ( ) . getSelectedItem ( ) ; getIsSgIoUnfiltered ( ) . setIsAvailable ( ( ( ! isInternal ) && ( DiskInterface.VirtIO_SCSI.equals ( diskInterface ) ) ) ) ; getIsScsiPassthrough ( ) . setIsAvailable ( ( ( ! isInternal ) && ( DiskInterface.VirtIO_SCSI.equals ( diskInterface ) ) ) ) ; updateScsiPassthroguhChangeability ( ) ; updateReadOnlyChangeability ( ) ; updatePlugChangeability ( ) ; }

Target:
private void DiskInterface_SelectedItemChanged ( ) { boolean isLunDisk = ( getDiskStorageType ( ) . getEntity ( ) ) == ( org.ovirt.engine.core.common.businessentities.Disk.DiskStorageType.LUN ) ; org.ovirt.engine.core.common.businessentities.DiskInterface diskInterface = getDiskInterface ( ) . getSelectedItem ( ) ; getIsSgIoUnfiltered ( ) . setIsAvailable ( ( isLunDisk && ( DiskInterface.VirtIO_SCSI.equals ( diskInterface ) ) ) ) ; getIsScsiPassthrough ( ) . setIsAvailable ( ( isLunDisk && ( DiskInterface.VirtIO_SCSI.equals ( diskInterface ) ) ) ) ; updateScsiPassthroguhChangeability ( ) ; updateReadOnlyChangeability ( ) ; updatePlugChangeability ( ) ; }
Source:
public void testConnection ( ) { chooseDcForCheckingIfGetNamesFromExternalProviderSupported ( ) ; org.ovirt.engine.core.common.queries.VdcQueryReturnValue retVal = org.ovirt.engine.core.bll.Backend.getInstance ( ) . runInternalQuery ( VdcQueryType.GetVmsFromExternalProvider , buildGetVmsFromExternalProviderQueryParameters ( ) ) ; if ( ! ( retVal.getSucceeded ( ) ) ) { throw new org.ovirt.engine.core.common.errors.EngineException ( org.ovirt.engine.core.common.errors.EngineError.PROVIDER_FAILURE , retVal.getExceptionString ( ) ) ; } }

Target:
public void testConnection ( ) { chooseDcForCheckingIfGetNamesFromExternalProviderSupported ( ) ; org.ovirt.engine.core.common.queries.VdcQueryReturnValue retVal = org.ovirt.engine.core.bll.Backend.getInstance ( ) . runInternalQuery ( QueryType.GetVmsFromExternalProvider , buildGetVmsFromExternalProviderQueryParameters ( ) ) ; if ( ! ( retVal.getSucceeded ( ) ) ) { throw new org.ovirt.engine.core.common.errors.EngineException ( org.ovirt.engine.core.common.errors.EngineError.PROVIDER_FAILURE , retVal.getExceptionString ( ) ) ; } }
Source:
protected void updateDataProvider ( java.util.List < org.ovirt.engine.ui.uicommonweb.models.userportal.UserPortalItemModel > items ) { if ( ( currentItems ) == null ) { currentItems = items ; super . updateDataProvider ( items ) ; } else if ( itemsChanged ( items , currentItems ) ) { super . updateDataProvider ( items ) ; } }

Target:
protected void updateDataProvider ( java.util.List < org.ovirt.engine.ui.uicommonweb.models.userportal.UserPortalItemModel > items ) { if ( ( currentItems ) == null ) { currentItems = items ; super . updateDataProvider ( items ) ; } else if ( itemsChanged ( items , currentItems ) ) { for ( org.ovirt.engine.ui.uicommonweb.models.userportal.UserPortalItemModel itemModel : currentItems ) { itemModel.clearReferences ( ) ; } super . updateDataProvider ( items ) ; } else { org.ovirt.engine.ui.userportal.uicommon.model.AbstractUserPortalListProvider.retainSelectedItems ( ) ; } currentItems = items ; }
Source:
public static void initUniqueOsNames ( ) { 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 ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.uniqueOsNames = ( ( java.util.HashMap < java.lang.Integer , java.lang.String > ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ) ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.OsRepository , new org.ovirt.engine.core.common.queries.OsQueryParameters ( org.ovirt.engine.core.common.queries.OsQueryParameters.OsRepositoryVerb.GetUniqueOsNames ) , callback ) ; }

Target:
public static void initUniqueOsNames ( ) { 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 ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.uniqueOsNames = ( ( java.util.HashMap < java.lang.Integer , java.lang.String > ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ) ) ; org.ovirt.engine.core.common.utils.SimpleDependecyInjector.getInstance ( ) . bind ( new org.ovirt.engine.core.searchbackend.OsValueAutoCompleter ( org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.uniqueOsNames ) ) ; } } ; 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.GetUniqueOsNames ) , callback ) ; }
Source:
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.getInstance ( ) . runQuery ( VdcQueryType.GetPermissionsByAdElementId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( userId ) , aQuery ) ; }

Target:
public static 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 , org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getDefaultConfigurationVersion ( ) ) , aQuery ) ; }
Source:
private void sendTicket ( ) { final org.ovirt.engine.core.common.interfaces.IVdcUser user = org.ovirt.engine.core.bll.SetVmTicketCommand.getCurrentUser ( ) ; final boolean sent = org.ovirt.engine.core.bll.Backend.getInstance ( ) . getResourceManager ( ) . RunVdsCommand ( VDSCommandType.SetVmTicket , new org.ovirt.engine.core.common.vdscommands.SetVmTicketVDSCommandParameters ( org.ovirt.engine.core.bll.SetVmTicketCommand.getVdsId ( ) , org.ovirt.engine.core.bll.SetVmTicketCommand.getVmId ( ) , mTicket , mValidTime , user.getUserName ( ) , user.getUserId ( ) ) ) . getSucceeded ( ) ; if ( sent ) { org.ovirt.engine.core.bll.SetVmTicketCommand.setActionReturnValue ( mTicket ) ; } org.ovirt.engine.core.bll.SetVmTicketCommand.setSucceeded ( sent ) ; }

Target:
private void sendTicket ( ) { final org.ovirt.engine.core.common.users.VdcUser user = org.ovirt.engine.core.bll.SetVmTicketCommand.getCurrentUser ( ) ; final boolean sent = org.ovirt.engine.core.bll.Backend.getInstance ( ) . getResourceManager ( ) . RunVdsCommand ( VDSCommandType.SetVmTicket , new org.ovirt.engine.core.common.vdscommands.SetVmTicketVDSCommandParameters ( org.ovirt.engine.core.bll.SetVmTicketCommand.getVdsId ( ) , org.ovirt.engine.core.bll.SetVmTicketCommand.getVmId ( ) , mTicket , mValidTime , user.getUserName ( ) , user.getUserId ( ) ) ) . getSucceeded ( ) ; if ( sent ) { org.ovirt.engine.core.bll.SetVmTicketCommand.setActionReturnValue ( mTicket ) ; } org.ovirt.engine.core.bll.SetVmTicketCommand.setSucceeded ( sent ) ; }
Source:
protected org.ovirt.engine.core.common.businessentities.VDS getInverse ( org.ovirt.engine.core.common.businessentities.VdsStatic to ) { org.ovirt.engine.core.common.businessentities.VDS inverse = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; inverse.setId ( to.getId ( ) ) ; inverse.setvds_name ( to.getvds_name ( ) ) ; inverse.sethost_name ( to.gethost_name ( ) ) ; inverse.setvds_group_id ( to.getvds_group_id ( ) ) ; inverse.setport ( to.getport ( ) ) ; inverse.setVdsSpmPriority ( to.getVdsSpmPriority ( ) ) ; return inverse ; }

Target:
protected org.ovirt.engine.core.common.businessentities.VDS getInverse ( org.ovirt.engine.core.common.businessentities.VdsStatic to ) { org.ovirt.engine.core.common.businessentities.VDS inverse = new org.ovirt.engine.core.common.businessentities.VDS ( ) ; inverse.setId ( to.getId ( ) ) ; inverse.setvds_name ( to.getvds_name ( ) ) ; inverse.sethost_name ( to.gethost_name ( ) ) ; inverse.setvds_group_id ( to.getvds_group_id ( ) ) ; inverse.setport ( to.getport ( ) ) ; inverse.setVdsSpmPriority ( to.getVdsSpmPriority ( ) ) ; inverse.setConsoleAddress ( to.getConsoleAddress ( ) ) ; return inverse ; }
Source:
public static void GetExistingStorageDomainList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hostId , org.ovirt.engine.core.common.businessentities.StorageDomainType domainType , java.lang.String path ) { 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 ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetExistingStorageDomainList , new org.ovirt.engine.core.common.queries.GetExistingStorageDomainListParameters ( hostId , org.ovirt.engine.core.common.businessentities.StorageType.NFS , domainType , path ) , aQuery ) ; }

Target:
public static void GetExistingStorageDomainList ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , org.ovirt.engine.core.compat.Guid hostId , org.ovirt.engine.core.common.businessentities.StorageDomainType domainType , org.ovirt.engine.core.common.businessentities.StorageType storageType , java.lang.String path ) { 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 ) ) : null ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetExistingStorageDomainList , new org.ovirt.engine.core.common.queries.GetExistingStorageDomainListParameters ( hostId , storageType , domainType , path ) , aQuery ) ; }
Source:
protected void executeVdsBrokerCommand ( ) { log.info ( "-- executeVdsBrokerCommand: calling 'copyVolumeData'" ) ; status = org.ovirt.engine.core.vdsbroker.vdsbroker.CopyVolumeDataVDSCommand.getBroker ( ) . copyData ( buildLocationInfo ( org.ovirt.engine.core.vdsbroker.vdsbroker.CopyVolumeDataVDSCommand.getParameters ( ) . getSrcInfo ( ) ) , buildLocationInfo ( org.ovirt.engine.core.vdsbroker.vdsbroker.CopyVolumeDataVDSCommand.getParameters ( ) . getDstInfo ( ) ) , org.ovirt.engine.core.vdsbroker.vdsbroker.CopyVolumeDataVDSCommand.getParameters ( ) . isCollapse ( ) ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.CopyVolumeDataVDSCommand.proceedProxyReturnValue ( ) ; }

Target:
protected void executeVdsBrokerCommand ( ) { java.util.Map < java.lang.String , java.lang.Object > map = new java.util.HashMap < > ( ) ; map.put ( "code" , EngineError.Done.getValue ( ) ) ; map.put ( "message" , "done" ) ; status = new org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc ( java.util.Collections.< java.lang.String , java.lang.Object > singletonMap ( "status" , map ) ) ; org.ovirt.engine.core.vdsbroker.vdsbroker.CopyVolumeDataVDSCommand.proceedProxyReturnValue ( ) ; }
Source:
public org.ovirt.engine.core.compat.Guid persistAsyncTaskPlaceHolder ( java.lang.String taskKey ) { return super . persistAsyncTaskPlaceHolder ( getActionType ( ) , taskKey ) ; }

Target:
protected void executeCommand ( ) { if ( isMemoryRemovable ( ) ) { java.util.List < org.ovirt.engine.core.compat.Guid > guids = org.ovirt.engine.core.utils.GuidUtils.getGuidListFromString ( org.ovirt.engine.core.bll.RemoveMemoryVolumesCommand.getParameters ( ) . getMemoryVolumes ( ) ) ; org.ovirt.engine.core.common.action.RemoveDiskParameters removeMemoryDumpDiskParameters = new org.ovirt.engine.core.common.action.RemoveDiskParameters ( guids.get ( 2 ) ) ; removeMemoryDumpDiskParameters.setShouldBeLogged ( false ) ; runInternalAction ( VdcActionType.RemoveDisk , removeMemoryDumpDiskParameters ) ; org.ovirt.engine.core.common.action.RemoveDiskParameters removeMemoryMetadataDiskParameters = new org.ovirt.engine.core.common.action.RemoveDiskParameters ( guids.get ( 4 ) ) ; removeMemoryMetadataDiskParameters.setShouldBeLogged ( false ) ; runInternalAction ( VdcActionType.RemoveDisk , removeMemoryMetadataDiskParameters ) ; } org.ovirt.engine.core.bll.RemoveMemoryVolumesCommand.setSucceeded ( true ) ; }
Source:
public void invalidQosMissingValues ( ) { org.ovirt.engine.core.common.businessentities.network.HostNetworkQos qos = new org.ovirt.engine.core.common.businessentities.network.HostNetworkQos ( ) ; qos.setOutAverageUpperlimit ( org.ovirt.engine.core.bll.network.host.SetupNetworksHelperTest.HIGH_BANDWIDTH ) ; qos.setOutAverageRealtime ( org.ovirt.engine.core.bll.network.host.SetupNetworksHelperTest.LOW_BANDWIDTH ) ; org.ovirt.engine.core.bll.network.host.SetupNetworksHelper helper = qosValuesTest ( qos ) ; validateAndExpectViolation ( helper , EngineMessage.ACTION_TYPE_FAILED_HOST_NETWORK_QOS_SETUP_NETWORKS_MISSING_VALUES , org.ovirt.engine.core.bll.network.host.SetupNetworksHelperTest.MANAGEMENT_NETWORK_NAME ) ; }

Target:
public void setUp ( ) throws java.lang.Exception { effectiveHostNetworkQos = new org.ovirt.engine.core.vdsbroker.EffectiveHostNetworkQos ( qosDao ) ; injectorRule.bind ( org.ovirt.engine.core.dao.network.NetworkDao.class , networkDao ) ; injectorRule.bind ( org.ovirt.engine.core.dao.network.NetworkAttachmentDao.class , networkAttachmentDao ) ; injectorRule.bind ( org.ovirt.engine.core.dao.network.InterfaceDao.class , interfaceDao ) ; injectorRule.bind ( org.ovirt.engine.core.dao.gluster.GlusterBrickDao.class , brickDao ) ; injectorRule.bind ( org.ovirt.engine.core.vdsbroker.EffectiveHostNetworkQos.class , effectiveHostNetworkQos ) ; injectorRule.bind ( org.ovirt.engine.core.vdsbroker.NetworkImplementationDetailsUtils.class , new org.ovirt.engine.core.vdsbroker.NetworkImplementationDetailsUtils ( effectiveHostNetworkQos , networkAttachmentDao , calculateBaseNic ) ) ; injectorRule.bind ( org.ovirt.engine.core.vdsbroker.CalculateBaseNic.class , calculateBaseNic ) ; }
Source:
private void initState ( ) { reportsEnabled = false ; xmlInitialized = false ; urlInitialized = false ; reportBaseUrl = "" ; isCommunityEdition = false ; resourceMap = new java.util.HashMap < java.lang.String , org.ovirt.engine.ui.uicompat.ReportParser.Resource > ( ) ; dashboardMap = new java.util.HashMap < java.lang.String , org.ovirt.engine.ui.uicompat.ReportParser.Dashboard > ( ) ; reportsInitEvent = new org.ovirt.engine.core.compat.Event ( "ReportsInitialize" , org.ovirt.engine.ui.uicommonweb.ReportInit.class ) ; }

Target:
private void initState ( ) { reportsEnabled = false ; xmlInitialized = false ; urlInitialized = false ; reportBaseUrl = "" ; isCommunityEdition = false ; resourceMap = new java.util.HashMap < java.lang.String , org.ovirt.engine.ui.uicompat.ReportParser.Resource > ( ) ; dashboardMap = new java.util.HashMap < java.lang.String , org.ovirt.engine.ui.uicompat.ReportParser.Dashboard > ( ) ; reportsInitEvent = new org.ovirt.engine.ui.uicompat.Event ( "ReportsInitialize" , org.ovirt.engine.ui.uicommonweb.ReportInit.class ) ; }
Source:
public static void GetLunsByVgId ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery , java.lang.String vgId , org.ovirt.engine.core.compat.Guid vdsId ) { 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.LUNs > ) ( source ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.LUNs > ( ) ; } } ; org.ovirt.engine.core.common.queries.GetLunsByVgIdParameters params = new org.ovirt.engine.core.common.queries.GetLunsByVgIdParameters ( vgId , vdsId ) ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetLunsByVgId , params , aQuery ) ; }

Target:
public static void GetVmNicList ( 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 ? new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ) ( source ) ) ) : new java.util.ArrayList < org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface > ( ) ; } } ; org.ovirt.engine.ui.frontend.Frontend.RunQuery ( VdcQueryType.GetVmInterfacesByVmId , new org.ovirt.engine.core.common.queries.IdQueryParameters ( id ) , aQuery ) ; }
Source:
private static int GetFirstImage ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.DiskImage > images , org.ovirt.engine.core.common.businessentities.DiskImage curr ) { for ( int i = 0 ; i < ( images.size ( ) ) ; i ++ ) { if ( curr.getParentId ( ) . equals ( images.get ( i ) . getImageId ( ) ) ) { return i ; } } return - 1 ; }

Target:
private static int GetFirstImage ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage.DiskImage > images , org.ovirt.engine.core.common.businessentities.storage.DiskImage curr ) { for ( int i = 0 ; i < ( images.size ( ) ) ; i ++ ) { if ( curr.getParentId ( ) . equals ( images.get ( i ) . getImageId ( ) ) ) { return i ; } } return - 1 ; }
Source:
public void reportCompleted ( ) { if ( org.ovirt.engine.core.bll.RunVmOnceCommand.getReturnValue ( ) . getSucceeded ( ) ) { org.ovirt.engine.core.bll.RunVmOnceCommand.getExecutionContext ( ) . setCompleted ( true ) ; } }

Target:
public void reportCompleted ( ) { org.ovirt.engine.core.bll.job.ExecutionContext executionContext = org.ovirt.engine.core.bll.RunVmOnceCommand.getExecutionContext ( ) ; executionContext.setShouldEndJob ( true ) ; boolean success = ( org.ovirt.engine.core.bll.RunVmOnceCommand.getParameters ( ) . getRunAndPause ( ) ) && ( ( org.ovirt.engine.core.bll.RunVmOnceCommand.getVmDynamicDAO ( ) . get ( org.ovirt.engine.core.bll.RunVmOnceCommand.getVmId ( ) ) . getstatus ( ) ) == ( org.ovirt.engine.core.common.businessentities.VMStatus.Paused ) ) ; org.ovirt.engine.core.bll.job.ExecutionHandler.endJob ( executionContext , success ) ; }
Source:
public void OnSuccess ( java.lang.Object model , java.lang.Object returnValue ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage_pool > pools = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.storage_pool > ) ( returnValue ) ) ; org.ovirt.engine.core.common.businessentities.storage_pool pool = pools.get ( 0 ) ; if ( pool != null ) { org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.GetStorageDomainList ( ( ( org.ovirt.engine.ui.frontend.AsyncQuery ) ( model ) ) , pool.getId ( ) ) ; } }

Target:
public void onSuccess ( java.lang.Object model , java.lang.Object returnValue ) { java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > pools = ( ( java.util.ArrayList < org.ovirt.engine.core.common.businessentities.StoragePool > ) ( ( ( org.ovirt.engine.core.common.queries.VdcQueryReturnValue ) ( returnValue ) ) . getReturnValue ( ) ) ) ; if ( ( pools != null ) && ( ( pools.size ( ) ) > 0 ) ) { org.ovirt.engine.core.common.businessentities.StoragePool pool = pools.get ( 0 ) ; org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider.getClusterList ( ( ( org.ovirt.engine.ui.frontend.AsyncQuery ) ( model ) ) , pool.getId ( ) ) ; } }
Source:
protected void onEntityChanged ( ) { super . onEntityChanged ( ) ; if ( ( getEntity ( ) ) != null ) { java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.users.UserGroup > items = new java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.users.UserGroup > ( ) ; for ( java.lang.String groupFullName : getEntity ( ) . getgroups ( ) . split ( "[,]" , ( - 1 ) ) ) { items.add ( org.ovirt.engine.ui.uicommonweb.models.users.UserGroupListModel.CreateUserGroup ( groupFullName ) ) ; } setItems ( items ) ; } else { setItems ( null ) ; } }

Target:
protected void onEntityChanged ( ) { super . onEntityChanged ( ) ; if ( ( getEntity ( ) ) != null ) { java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.users.UserGroup > items = new java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.users.UserGroup > ( ) ; for ( java.lang.String groupFullName : getEntity ( ) . getgroups ( ) . split ( "[,]" , ( - 1 ) ) ) { items.add ( org.ovirt.engine.ui.uicommonweb.models.users.UserGroupListModel.createUserGroup ( groupFullName ) ) ; } setItems ( items ) ; } else { setItems ( null ) ; } }
Source:
public static long getFileSize ( java.io.File file ) { final long length = file.length ( ) ; if ( length > ( org.ovirt.engine.core.utils.servlet.ServletUtils.LARGE ) ) { org.ovirt.engine.core.utils.servlet.ServletUtils.log.warn ( ( ( ( ( ( ( "File \"" + ( file.getAbsolutePath ( ) ) ) + " is " ) + length ) + " bytes long. Please reconsider using this servlet for files larger than " ) + ( org.ovirt.engine.core.utils.servlet.ServletUtils.LARGE ) ) + " bytes." ) ) ; } return length ; }

Target:
public static long getFileSize ( java.io.File file ) { final long length = file.length ( ) ; if ( length > ( org.ovirt.engine.core.utils.servlet.ServletUtils.LARGE ) ) { org.ovirt.engine.core.utils.servlet.ServletUtils.log.warn ( "File '{}' is bytes long. Please reconsider using this servlet for files larger than bytes." , file.getAbsolutePath ( ) , length , org.ovirt.engine.core.utils.servlet.ServletUtils.LARGE ) ; } return length ; }
Source:
public org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc migrateStatus ( java.lang.String vmId ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.migrateStatus ( vmId ) ; 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 org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc glusterGeoRepMountBrokerSetup ( java.lang.String remoteVolumeName , java.lang.String userName , java.lang.String remoteGroupName , java.lang.Boolean partial ) { try { java.util.Map < java.lang.String , java.lang.Object > xmlRpcReturnValue = vdsServer.glusterGeoRepMountBrokerSetup ( userName , remoteGroupName , remoteVolumeName , partial ) ; 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 ) ; } }
Source:
public void testUpdateAll ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.VmStatistics existingVm = dao.get ( FixturesTool.VM_RHEL5_POOL_57 ) ; org.ovirt.engine.core.common.businessentities.VmStatistics existingVm2 = dao.get ( new org.ovirt.engine.core.compat.Guid ( "77296e00-0cad-4e5a-9299-008a7b6f4356" ) ) ; existingVm.setCpuSys ( 50.0 ) ; existingVm2.setCpuUser ( 50.0 ) ; dao.updateAll ( java.util.Arrays.asList ( existingVm , existingVm2 ) ) ; org.junit.Assert.assertEquals ( existingVm , dao.get ( existingVm.getId ( ) ) ) ; org.junit.Assert.assertEquals ( existingVm2 , dao.get ( existingVm2.getId ( ) ) ) ; }

Target:
public void testUpdateAll ( ) throws java.lang.Exception { org.ovirt.engine.core.common.businessentities.VmStatistics existingVm = dao.get ( FixturesTool.VM_RHEL5_POOL_57 ) ; org.ovirt.engine.core.common.businessentities.VmStatistics existingVm2 = dao.get ( FixturesTool.VM_RHEL5_POOL_51 ) ; existingVm.setCpuSys ( 50.0 ) ; existingVm2.setCpuUser ( 50.0 ) ; dao.updateAll ( java.util.Arrays.asList ( existingVm , existingVm2 ) ) ; org.junit.Assert.assertEquals ( existingVm , dao.get ( existingVm.getId ( ) ) ) ; org.junit.Assert.assertEquals ( existingVm2 , dao.get ( existingVm2.getId ( ) ) ) ; }
Source:
private void setUpGetDataCenterByStorageDomainExpectations ( org.ovirt.engine.core.compat.Guid id ) { setUpEntityQueryExpectations ( VdcQueryType.GetStoragePoolsByStorageDomainId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { id } , org.ovirt.engine.api.restapi.resource.BackendStorageDomainTemplatesResourceTest.setUpStoragePool ( ) ) ; }

Target:
private void setUpGetDataCenterByStorageDomainExpectations ( org.ovirt.engine.core.compat.Guid id , int times ) { while ( ( times -- ) > 0 ) { setUpEntityQueryExpectations ( VdcQueryType.GetStoragePoolsByStorageDomainId , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { id } , org.ovirt.engine.api.restapi.resource.BackendStorageDomainTemplatesResourceTest.setUpStoragePool ( ) ) ; } }
Source:
public void getHostPublicKey ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object Convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetServerSSHPublicKey , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }

Target:
public void getEngineSshPublicKey ( org.ovirt.engine.ui.frontend.AsyncQuery aQuery ) { aQuery.converterCallback = new org.ovirt.engine.ui.frontend.IAsyncConverter ( ) { @ java.lang.Override public java.lang.Object convert ( java.lang.Object source , org.ovirt.engine.ui.frontend.AsyncQuery _asyncQuery ) { return source != null ? ( ( java.lang.String ) ( source ) ) : "" ; } } ; org.ovirt.engine.ui.frontend.Frontend.getInstance ( ) . runQuery ( VdcQueryType.GetEngineSSHPublicKey , new org.ovirt.engine.core.common.queries.VdcQueryParametersBase ( ) , aQuery ) ; }
Source:
protected java.util.Map < java.lang.String , java.lang.Object > initDeviceStructure ( ) { java.util.Map < java.lang.String , java.lang.Object > deviceStruct = new java.util.HashMap < > ( ) ; deviceStruct.put ( VdsProperties.balloonEnabled , getParameters ( ) . isEnableBalloon ( ) ) ; deviceStruct.put ( VdsProperties.ksmEnabled , getParameters ( ) . isEnableKsm ( ) ) ; deviceStruct.put ( VdsProperties.ksmMergeAcrossNodes , getParameters ( ) . isKsmMergeAcrossNumaNodes ( ) ) ; return deviceStruct ; }

Target:
protected java.util.Map < java.lang.String , java.lang.Object > initDeviceStructure ( ) { java.util.Map < java.lang.String , java.lang.Object > deviceStruct = new java.util.HashMap < > ( ) ; deviceStruct.put ( VdsProperties.balloonEnabled , getParameters ( ) . isEnableBalloon ( ) ) ; deviceStruct.put ( VdsProperties.ksmEnabled , getParameters ( ) . isEnableKsm ( ) ) ; if ( ( getVds ( ) . getVdsGroupCompatibilityVersion ( ) . compareTo ( Version.v3_6 ) ) >= 0 ) { deviceStruct.put ( VdsProperties.ksmMergeAcrossNodes , getParameters ( ) . isKsmMergeAcrossNumaNodes ( ) ) ; } return deviceStruct ; }
Source:
public void testChangeCdIncompleteParameters ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; resource.setUriInfo ( setUpBasicUriExpectations ( ) ) ; org.ovirt.engine.api.model.CdRom update = getUpdate ( ) ; update.getFile ( ) . setId ( null ) ; control.replay ( ) ; try { resource.update ( update ) ; fail ( "expected WebApplicationException on incomplete parameters" ) ; } catch ( javax.ws.rs.WebApplicationException wae ) { verifyIncompleteException ( wae , "CdRom" , "update" , "file.id" ) ; } }

Target:
public void testEjectCd ( ) throws java.lang.Exception { setUriInfo ( setUpChangeCdUriMatrixExpectations ( ) ) ; setUpGetEntityExpectations ( 1 , VMStatus.Up ) ; setUpActionExpectations ( VdcActionType.ChangeDisk , org.ovirt.engine.core.common.action.ChangeDiskCommandParameters.class , new java.lang.String [ ] { "CdImagePath" } , new java.lang.Object [ ] { org.ovirt.engine.api.restapi.resource.BackendCdRomResourceTest.EJECT_ISO } , true , true ) ; org.ovirt.engine.api.model.CdRom update = getUpdate ( ) ; update.getFile ( ) . setId ( org.ovirt.engine.api.restapi.resource.BackendCdRomResourceTest.EJECT_ISO ) ; org.ovirt.engine.api.model.CdRom cdrom = resource.update ( update ) ; assertEquals ( org.ovirt.engine.api.restapi.resource.BackendCdRomResourceTest.EJECT_ISO , cdrom.getFile ( ) . getId ( ) ) ; }
Source:
public void edit ( org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel object ) { priorityEditor.setRowData ( new java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.EntityModel > ( ) ) ; priorityEditor.edit ( object.getPriority ( ) ) ; org.ovirt.engine.ui.common.widget.uicommon.popup.AbstractVmPopupWidget.Driver.driver.edit ( object ) ; initTabAvailabilityListeners ( object ) ; initListeners ( object ) ; initCustomPropertySheet ( object ) ; }

Target:
public void edit ( org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel object ) { priorityEditor.setRowData ( new java.util.ArrayList < org.ovirt.engine.ui.uicommonweb.models.EntityModel > ( ) ) ; priorityEditor.edit ( object.getPriority ( ) ) ; driver.edit ( object ) ; initTabAvailabilityListeners ( object ) ; initListeners ( object ) ; initCustomPropertySheet ( object ) ; }
Source:
protected java.util.HashMap < org.ovirt.engine.core.common.businessentities.VmTemplate , java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > > setUpTemplates ( boolean notFound ) { java.util.HashMap < org.ovirt.engine.core.common.businessentities.VmTemplate , java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > > ret = new java.util.HashMap < > ( ) ; if ( notFound ) { return ret ; } for ( int i = 0 ; i < ( NAMES.length ) ; i ++ ) { ret.put ( getEntity ( i ) , new java.util.ArrayList < > ( ) ) ; } return ret ; }

Target:
protected java.util.Map < org.ovirt.engine.core.common.businessentities.VmTemplate , java.util.List < org.ovirt.engine.core.common.businessentities.storage.DiskImage > > setUpTemplates ( boolean notFound ) { if ( notFound ) { return java.util.Collections.emptyMap ( ) ; } return java.util.stream.IntStream.range ( 0 , NAMES.length ) . boxed ( ) . collect ( java.util.stream.Collectors.toMap ( this :: getEntity , java.util.ArrayList :: new ) ) ; }