auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>protected void addHeaders(HttpURLConnection connection, String tenantId) { if (tenantId == null) { tenantId = PropertyUtil.getProperty(PropertyUtil.HAWKULAR_TENANT); } <START> if (tenantId != null) { <END> connection.setRequestProperty(HAWKULAR_TENANT, tenantId); } if (authorization == null && username != null) { String authString = username + ":" + password; String encoded = Base64.getEncoder().encodeToString(authString.getBytes()); authorization = "Basic " + encoded; } if (authorization != null) { connection.setRequestProperty("Authorization", authorization); } }</code><technical_language>minor one: put "else" of previous</technical_language>

Target:
protected void addHeaders(HttpURLConnection connection, String tenantId) { if (tenantId == null) { tenantId = PropertyUtil.getProperty(PropertyUtil.HAWKULAR_TENANT); } if (tenantId != null) { connection.setRequestProperty(HAWKULAR_TENANT, tenantId); } if (authorization == null && username != null) { String authString = username + ":" + password; String encoded = encoder.encodeToString(authString.getBytes()); authorization = "Basic " + encoded; } if (authorization != null) { connection.setRequestProperty("Authorization", authorization); } }
Source:
<code>public void testGetBrowsableStudiesBySpecies() throws URISyntaxException { String url = "/v1/meta/studies/list?species=hsapiens_grch37"; ResponseEntity<QueryResponse<QueryResult<VariantStudySummary>>> response = restTemplate.exchange( url, HttpMethod.GET, null, new ParameterizedTypeReference<QueryResponse<QueryResult<VariantStudySummary>>>() {}); assertEquals(HttpStatus.OK, response.getStatusCode()); QueryResponse<QueryResult<VariantStudySummary>> queryResponse = response.getBody(); assertEquals(1, queryResponse.getResponse().size()); List<VariantStudySummary> results = queryResponse.getResponse().get(0).getResult(); <START> System.out.println(results); <END> assertEquals(3, results.size()); for (VariantStudySummary variantStudySummary : results) { assertTrue(variantStudySummary.getFilesCount() > 0); assertNotNull(variantStudySummary.getStudyName()); assertNotNull(variantStudySummary.getStudyId()); } }</code><technical_language>remove logger</technical_language>

Target:
public void testGetBrowsableStudiesBySpecies() throws URISyntaxException { String url = "/v1/meta/studies/list?species=hsapiens_grch37"; ResponseEntity<QueryResponse<QueryResult<VariantStudySummary>>> response = restTemplate.exchange( url, HttpMethod.GET, null, new ParameterizedTypeReference<QueryResponse<QueryResult<VariantStudySummary>>>() {}); assertEquals(HttpStatus.OK, response.getStatusCode()); QueryResponse<QueryResult<VariantStudySummary>> queryResponse = response.getBody(); assertEquals(1, queryResponse.getResponse().size()); List<VariantStudySummary> results = queryResponse.getResponse().get(0).getResult(); assertEquals(3, results.size()); for (VariantStudySummary variantStudySummary : results) { assertTrue(variantStudySummary.getFilesCount() > 0); assertNotNull(variantStudySummary.getStudyName()); assertNotNull(variantStudySummary.getStudyId()); } }
Source:
<code>public void before() { <START> when(timelockRpcClient.getLeaderTime()).thenReturn(LeaderTime.of(LeadershipId.random(), NanoTime.now())); <END> timelockService = LeasingTimelockClient.create(timelockRpcClient, SERVICE_ID); }</code><technical_language>red flag: fact changing time implies this testing is insufficient. purpose of writing unit tests this is codify assumptions making this code work; time static is a huge red flag means tests time invariant (which means leasing tested)</technical_language>

Target:
public void before() { when(timelockRpcClient.getLeaderTime()).thenAnswer(inv -> LeaderTime.of(LEADER_ID, time.get())); timelockService = new LeasingTimelockClient(timelockRpcClient, SERVICE_ID); }
Source:
<code>private void initListeners() { this.restoreToSavePointListener = new RestoreToLastSavePointListener(session); this.restoreToSavePointListener.register(); this.saveSessionListener = new SaveSessionWhenNoDialectEditorsListener(session); <START> this.saveSessionListener.register(); <END> }</code><technical_language>Code in register() done in constructor of SaveSessionWhenNoDialectEditorsListener</technical_language>

Target:
private void initListeners() { this.restoreToSavePointListener = new RestoreToLastSavePointListener(session); this.saveSessionListener = new SaveSessionWhenNoDialectEditorsListener(session); this.saveSessionListener.register(); }
Source:
<code>public static void update(IProject project, Optional<List<OmniEclipseProjectNature>> projectNatures, PersistentModelBuilder persistentModel, IProgressMonitor monitor) throws CoreException { PersistentModel previousPersistentModel = persistentModel.getPrevious(); Set<String> managedNatures = previousPersistentModel.isPresent() ? Sets.newLinkedHashSet(previousPersistentModel.getManagedNatures()) : Sets.<String>newLinkedHashSet(); Set<String> modelNatures = toNatures(projectNatures); IProjectDescription description = project.getDescription(); Set<String> existingNatures = Sets.newLinkedHashSet(Arrays.asList(description.getNatureIds())); Result<String> result = ManagedModelMergingStrategy.calculate(existingNatures, modelNatures, managedNatures); <START> String[] natureIds = FluentIterable.from(result.getNextElements()).filter(new Predicate<String>() { <END> @Override public boolean apply(String natureId) { return ResourcesPlugin.getWorkspace().getNatureDescriptor(natureId) != null; } }).toArray(String.class); description.setNatureIds(natureIds); project.setDescription(description, monitor); persistentModel.managedNatures(result.getNextManaged()); }</code><technical_language>is this related refactoring</technical_language>

Target:
public static void update(IProject project, Optional<List<OmniEclipseProjectNature>> projectNatures, PersistentModelBuilder persistentModel, IProgressMonitor monitor) throws CoreException { PersistentModel previousPersistentModel = persistentModel.getPrevious(); Set<String> managedNatures = previousPersistentModel.isPresent() ? Sets.newLinkedHashSet(previousPersistentModel.getManagedNatures()) : Sets.<String>newLinkedHashSet(); Set<String> modelNatures = toNatures(projectNatures); IProjectDescription description = project.getDescription(); Set<String> existingNatures = Sets.newLinkedHashSet(Arrays.asList(description.getNatureIds())); Result<String> result = ManagedModelMergingStrategy.calculate(existingNatures, modelNatures, managedNatures); description.setNatureIds(result.getNextElements().toArray(new String[0])); project.setDescription(description, monitor); persistentModel.managedNatures(result.getNextManaged()); }
Source:
<code>private void deleteFeedbackQuestionCascade( String feedbackSessionName, String courseId, int questionNumber) { FeedbackQuestionAttributes questionToDelete = getFeedbackQuestion(feedbackSessionName, courseId, questionNumber); if (questionToDelete == null) { return; } frLogic.deleteFeedbackResponsesForQuestionAndCascade(questionToDelete.getId(), true); List<FeedbackQuestionAttributes> questionsToShiftQnNumber = getFeedbackQuestionsForSession(feedbackSessionName, courseId); <START> if (fsLogic.getFeedbackSession(feedbackSessionName, courseId) == null) { <END> Assumption.fail("Session disappeared."); } fqDb.deleteEntity(questionToDelete); if (questionToDelete.questionNumber < questionsToShiftQnNumber.size()) { shiftQuestionNumbersDown(questionToDelete.questionNumber, questionsToShiftQnNumber); } }</code><technical_language>check do getFeedbackQuestionsForSession ? for other place</technical_language>

Target:
private void deleteFeedbackQuestionCascade( String feedbackSessionName, String courseId, int questionNumber) { FeedbackQuestionAttributes questionToDelete = getFeedbackQuestion(feedbackSessionName, courseId, questionNumber); if (questionToDelete == null) { return; } frLogic.deleteFeedbackResponsesForQuestionAndCascade(questionToDelete.getId(), true); if (fsLogic.getFeedbackSession(feedbackSessionName, courseId) == null) { Assumption.fail("Session disappeared."); } List<FeedbackQuestionAttributes> questionsToShiftQnNumber = getFeedbackQuestionsForSession(feedbackSessionName, courseId); fqDb.deleteEntity(questionToDelete); if (questionToDelete.questionNumber < questionsToShiftQnNumber.size()) { shiftQuestionNumbersDown(questionToDelete.questionNumber, questionsToShiftQnNumber); } }
Source:
<code>private Map<String, String> buildResultTagMap(Result result) throws Exception { Map<String, String> resultTagMap = new TreeMap<>(); for (ResultAttribute resultAttribute : resultAttributesToWriteAsTags) { resultAttribute.addTo(resultTagMap, result); } if (typeNamesAsTags) { log.debug("adding typeNames as tags"); Map<String, String> typeNameValueMap = TypeNameValue.extractMap(resultTagMap.get("typeName")); log.debug("this is typeNameValueMap ==== ", typeNameValueMap, this.typeNames); for (String typeToTag : this.typeNames) { <START> if (typeNameValueMap.containsKey(typeToTag)) { <END> resultTagMap.put(typeToTag, typeNameValueMap.get(typeToTag)); } } } return resultTagMap; }</code><technical_language>Replace containsKey() call a get check for nullity. This save lookup in map</technical_language>

Target:
private Map<String, String> buildResultTagMap(Result result) throws Exception { Map<String, String> resultTagMap = new TreeMap<>(); for (ResultAttribute resultAttribute : resultAttributesToWriteAsTags) { resultAttribute.addTo(resultTagMap, result); } if (typeNamesAsTags) { log.debug("adding typeNames as tags"); Map<String, String> typeNameValueMap = TypeNameValue.extractMap(resultTagMap.get("typeName")); log.debug("this is typeNameValueMap ==== ", typeNameValueMap, this.typeNames); for (String typeToTag : this.typeNames) { if (typeNameValueMap.get(typeToTag) != null) { resultTagMap.put(typeToTag, typeNameValueMap.get(typeToTag)); } } } return resultTagMap; }
Source:
<code>public void notifyTransactionDataReceived(int topologyId) { if (topologyId < transactionDataTopologyId) { throw new IllegalStateException("Cannot set a topology id (" + topologyId + ") that is lower than the current one (" + transactionDataTopologyId + ")"); } if (trace) { log.tracef("Signalling transaction data received for topology %d", topologyId); } transactionDataTopologyId = topologyId; transactionDataLock.lock(); CompletableFuture<Void> oldFuture = transactionDataFuture; try { transactionDataFuture = new CompletableFuture<>(); } finally { transactionDataLock.unlock(); <START> remoteExecutor.execute(() -> oldFuture.complete(null)); <END> } }</code><technical_language>Haha, I wanted publish version for comparison :) difference is I removed lock completely. if safe, I some new failures, a single lock for topology for tx data. remote executor here, I want blocked task run a thread (so I handleAsync(..., remoteExecutor) in STI)</technical_language>

Target:
public void notifyTransactionDataReceived(int topologyId) { if (topologyId < transactionDataTopologyId) { throw new IllegalStateException("Cannot set a topology id (" + topologyId + ") that is lower than the current one (" + transactionDataTopologyId + ")"); } if (trace) { log.tracef("Signalling transaction data received for topology %d", topologyId); } transactionDataTopologyId = topologyId; CompletableFuture<Void> oldFuture = null; try { synchronized (this) { oldFuture = transactionDataFuture; transactionDataFuture = new CompletableFuture<>(); } } finally { if (oldFuture != null) { oldFuture.complete(null); } } }
Source:
<code>protected static byte[] encryptAndEncode(Encrypt0Message enc, OSCoreCtx ctx, Message mess, boolean newPartialIV) throws OSException { boolean isRequest = mess instanceof Request; try { byte[] key = ctx.getSenderKey(); byte[] partialIV = null; byte[] nonce = null; if (isRequest) { partialIV = OSSerializer.processPartialIV(ctx.getSenderSeq()); nonce = OSSerializer.nonceGeneration(partialIV, ctx.getSenderId(), ctx.getCommonIV(), ctx.getIVLength()); enc.addAttribute(HeaderKeys.PARTIAL_IV, CBORObject.FromObject(partialIV), Attribute.UNPROTECTED); enc.addAttribute(HeaderKeys.KID, CBORObject.FromObject(ctx.getSenderId()), Attribute.UNPROTECTED); } else { <START> if(!newPartialIV){ <END> partialIV = OSSerializer.processPartialIV(ctx.getReceiverSeq()); nonce = OSSerializer.nonceGeneration(partialIV, ctx.getRecipientId(), ctx.getCommonIV(), ctx.getIVLength()); }else{ partialIV = OSSerializer.processPartialIV(ctx.getSenderSeq()); nonce = OSSerializer.nonceGeneration(partialIV, ctx.getRecipientId(), ctx.getCommonIV(), ctx.getIVLength()); } } enc.addAttribute(HeaderKeys.IV, CBORObject.FromObject(nonce), Attribute.DO_NOT_SEND); enc.addAttribute(HeaderKeys.Algorithm, ctx.getAlg().AsCBOR(), Attribute.DO_NOT_SEND); enc.encrypt(key); return enc.getEncryptedContent(); } catch (CoseException e) { LOGGER.severe("COSE/Crypto exception: " + e.getMessage()); throw new OSException(e.getMessage()); } }</code><technical_language>whitespace</technical_language>

Target:
protected static byte[] encryptAndEncode(Encrypt0Message enc, OSCoreCtx ctx, Message mess, boolean newPartialIV) throws OSException { boolean isRequest = mess instanceof Request; try { byte[] key = ctx.getSenderKey(); byte[] partialIV = null; byte[] nonce = null; if (isRequest) { partialIV = OSSerializer.processPartialIV(ctx.getSenderSeq()); nonce = OSSerializer.nonceGeneration(partialIV, ctx.getSenderId(), ctx.getCommonIV(), ctx.getIVLength()); enc.addAttribute(HeaderKeys.PARTIAL_IV, CBORObject.FromObject(partialIV), Attribute.UNPROTECTED); enc.addAttribute(HeaderKeys.KID, CBORObject.FromObject(ctx.getSenderId()), Attribute.UNPROTECTED); } else { if (!newPartialIV) { partialIV = OSSerializer.processPartialIV(ctx.getReceiverSeq()); nonce = OSSerializer.nonceGeneration(partialIV, ctx.getRecipientId(), ctx.getCommonIV(), ctx.getIVLength()); } else { partialIV = OSSerializer.processPartialIV(ctx.getSenderSeq()); nonce = OSSerializer.nonceGeneration(partialIV, ctx.getRecipientId(), ctx.getCommonIV(), ctx.getIVLength()); } } enc.addAttribute(HeaderKeys.IV, CBORObject.FromObject(nonce), Attribute.DO_NOT_SEND); enc.addAttribute(HeaderKeys.Algorithm, ctx.getAlg().AsCBOR(), Attribute.DO_NOT_SEND); enc.encrypt(key); return enc.getEncryptedContent(); } catch (CoseException e) { LOGGER.error("COSE/Crypto exception: " + e.getMessage()); throw new OSException(e.getMessage()); } }
Source:
<code>public static AbstractFactory getInstance() { if (_abstractFactory == null) { <START> synchronized ("factory") { <END> _abstractFactory = createFactory(); } } return _abstractFactory; }</code><technical_language>this synchronization is right? If "factory" is a new String object for call, block</technical_language>

Target:
public static AbstractFactory getInstance() { if (_abstractFactory == null) { synchronized (AbstractFactory.class) { _abstractFactory = createFactory(); } } return _abstractFactory; }
Source:
<code>public void testGetSessionInfo() throws Exception { String hostname = ""; int session = 0; try(CallableStatement cs = methodWatcher.prepareCall("call SYSCS_UTIL.SYSCS_GET_SESSION_INFO()") ) { <START> ResultSet rs = cs.executeQuery(); <END> rs.next(); hostname = rs.getString("HOSTNAME"); session = rs.getInt("SESSION"); DbUtils.closeQuietly(rs); } try(CallableStatement cs2 = methodWatcher.createConnection().prepareCall("call SYSCS_UTIL.SYSCS_GET_SESSION_INFO()"); ResultSet rs2 = cs2.executeQuery() ) { rs2.next(); String hostname2 = rs2.getString("HOSTNAME"); int session2 = rs2.getInt("SESSION"); Assert.assertEquals(hostname, hostname2); Assert.assertNotEquals(session, session2); DbUtils.closeQuietly(rs2); } }</code><technical_language>While it, try-with-resource this as-well</technical_language>

Target:
public void testGetSessionInfo() throws Exception { String hostname = ""; int session = 0; try(CallableStatement cs = methodWatcher.prepareCall("call SYSCS_UTIL.SYSCS_GET_SESSION_INFO()"); ResultSet rs = cs.executeQuery() ) { rs.next(); hostname = rs.getString("HOSTNAME"); session = rs.getInt("SESSION"); DbUtils.closeQuietly(rs); } try(CallableStatement cs2 = methodWatcher.createConnection().prepareCall("call SYSCS_UTIL.SYSCS_GET_SESSION_INFO()"); ResultSet rs2 = cs2.executeQuery() ) { rs2.next(); String hostname2 = rs2.getString("HOSTNAME"); int session2 = rs2.getInt("SESSION"); Assert.assertEquals(hostname, hostname2); Assert.assertNotEquals(session, session2); DbUtils.closeQuietly(rs2); } }
Source:
<code>private boolean checkIfCommandIsAvailable(WR3223Commands command) throws IOException { if (disabledCommands.contains(command)) { return false; } String value = connector.read(controllerAddr, command); if (value == null || value.contains("???")) { disabledCommands.add(command); <START> logger.warn("Command " + command + " is not supported by the controller."); <END> return false; } return true; }</code><technical_language>parameterized logging instead of string concatenation</technical_language>

Target:
private boolean checkIfCommandIsAvailable(WR3223Commands command) throws IOException { if (disabledCommands.contains(command)) { return false; } String value = connector.read(controllerAddr, command); if (value == null || value.contains("???")) { disabledCommands.add(command); logger.warn("Command is not supported by the controller.", command); return false; } return true; }
Source:
<code>protected void updateTemplateVersion() { if (getCluster() == null) { return; } if (getVmTemplate() == null) { return; } <START> if (!VmVersionUpdater.isVersionUpdatePossible(getVmTemplate())) { <END> return; } Version newVersion = CompatibilityVersionUtils.getEffective(getVmTemplate(), this::getCluster); if (newVersion.less(getCluster().getCompatibilityVersion())) { var dataCenterVersion = getStoragePool().getCompatibilityVersion(); if (newVersion.less(dataCenterVersion)) { newVersion = dataCenterVersion; } } new VmVersionUpdater(cpuFlagsManagerHandler) .updateVmtemplateToVersion(getVmTemplate(), newVersion, getCluster()); }</code><technical_language>isTemplateUpdatePossible() method here? Is necessary condition is in validate() method if false, validatin of command fail</technical_language>

Target:
protected void updateTemplateVersion() { if (getCluster() == null) { return; } if (getVmTemplate() == null) { return; } if (!isTemplateVersionUpdatePossible()) { return; } Version newVersion = CompatibilityVersionUtils.getEffective(getVmTemplate(), this::getCluster); if (newVersion.less(getCluster().getCompatibilityVersion())) { var dataCenterVersion = getStoragePool().getCompatibilityVersion(); if (newVersion.less(dataCenterVersion)) { newVersion = dataCenterVersion; } } new VmVersionUpdater(cpuFlagsManagerHandler) .updateVmtemplateToVersion(getVmTemplate(), newVersion, getCluster()); }
Source:
<code>public long getOneSidedRelationshipsCount(final ContentType contentType) throws DotDataException { DotConnect dc = new DotConnect(); dc.setSQL(sql.SELECT_ONE_SIDE_RELATIONSHIP_COUNT); dc.addParam(contentType.id()); dc.addParam(contentType.id()); List<Map<String,String>> results = dc.loadResults(); <START> return Long.parseLong(results.get(0).get("count")); <END> }</code><technical_language>is ConversionUtils.toLong (results.get(0).get("count"), 0);</technical_language>

Target:
public long getOneSidedRelationshipsCount(final ContentType contentType) throws DotDataException { final DotConnect dc = new DotConnect(); dc.setSQL(sql.SELECT_ONE_SIDE_RELATIONSHIP_COUNT); dc.addParam(contentType.id()); dc.addParam(contentType.id()); final List<Map<String,String>> results = dc.loadResults(); return ConversionUtils.toLong(results.get(0).get("relationship_count")); }
Source:
<code>public BaseDisk() { propagateErrors = PropagateErrors.Off; <START> contentType = DiskContentType.DATA; <END> }</code><technical_language>set diskDescription empty string here</technical_language>

Target:
public BaseDisk() { propagateErrors = PropagateErrors.Off; contentType = DiskContentType.DATA; diskDescription = ""; }
Source:
<code>protected boolean uploadSegment(File segmentTarFile, SegmentUploader segmentUploader, SegmentCompletionProtocol.Request.Params params) { URI segmentLocation = segmentUploader.uploadSegment(segmentTarFile, new LLCSegmentName(params.getSegmentName())); if (segmentLocation != null) { <START> params.withSegmentLocation(segmentLocation.toString()); <END> return true; } return false; }</code><technical_language>changing request parameters while indicating response? remove this</technical_language>

Target:
protected String uploadSegment(File segmentTarFile, SegmentUploader segmentUploader, SegmentCompletionProtocol.Request.Params params) { URI segmentLocation = segmentUploader.uploadSegment(segmentTarFile, new LLCSegmentName(params.getSegmentName())); if (segmentLocation != null) { return segmentLocation.toString(); } return null; }
Source:
<code>private StringBuilder buildStatement() { StringBuilder buffer = new StringBuilder(); StringBuilder columnsBuffer = new StringBuilder(); for ( int i = 0; i < columns.length; i++ ) { columnsBuffer.append( columns[i] ); if ( i < columns.length - 1 ) { columnsBuffer.append( "," ); } <START> } <END> buffer .append( "with " ) .append( tableName ) .append( " (" ) .append( columnsBuffer ); StringBuilder parameters = new StringBuilder(); for ( Object[] result : this.ids ) { if ( parameters.length() > 0 ) { parameters.append( "," ); } parameters.append( "(" ); String[] tokens = new String[result.length]; Arrays.fill( tokens, "?" ); String tokenList = String.join( ",", Arrays.asList( tokens ) ); parameters.append( tokenList ); parameters.append( ")" ); } buffer .append( " ) as ( select " ) .append( columnsBuffer ) .append( " from ( values " ) .append( parameters ) .append( ") as HT " ) .append( "(" ) .append( columnsBuffer ) .append( ") ) " ); return buffer; }</code><technical_language>Is block String columnsBuffer = String.join(",", columns)? time, columnNames joinedColumnNames a name</technical_language>

Target:
private StringBuilder buildStatement() { StringBuilder buffer = new StringBuilder(); String columnNames = String.join(",", columns); buffer .append( "with " ) .append( tableName ) .append( " (" ) .append( columnNames ); StringBuilder parameters = new StringBuilder(); for ( Object[] result : this.ids ) { if ( parameters.length() > 0 ) { parameters.append( "," ); } parameters.append( "(" ); parameters.append( String.join( ",", Collections.nCopies( result.length, "?")) ); parameters.append( ")" ); } buffer .append( " ) as ( select " ) .append( columnNames ) .append( " from ( values " ) .append( parameters ) .append( ") as HT " ) .append( "(" ) .append( columnNames ) .append( ") ) " ); return buffer; }
Source:
<code>protected Point getSize() { if (size == null) { size = new <START> Point(getBaseImageData().width, <END> getBaseImageData().height); } return size; }</code><technical_language>This triggers baseImage.getImageData() if size for Image based constructors lead NPE before. For descriptor-based data this creates a ImageData object (parent one)</technical_language>

Target:
protected Point getSize() { return size.get(); }
Source:
<code>public void testRedrawAfterDispose() { LineNumberRulerColumn lineNumberRulerColumn= new LineNumberRulerColumn(); CompositeRuler ruler= new CompositeRuler(); ruler.addDecorator(0, lineNumberRulerColumn); SourceViewer sourceViewer= new SourceViewer(fParent, ruler, SWT.NONE); lineNumberRulerColumn.getControl().setSize(10, 10); sourceViewer.getTextWidget().dispose(); try { lineNumberRulerColumn.redraw(); } <START> catch (Exception <END> notExpected) { notExpected.printStackTrace(); fail(); } }</code><technical_language>do need try/catch here? fail, if fails, junit care stack</technical_language>

Target:
public void testRedrawAfterDispose() { LineNumberRulerColumn lineNumberRulerColumn= new LineNumberRulerColumn(); CompositeRuler ruler= new CompositeRuler(); ruler.addDecorator(0, lineNumberRulerColumn); SourceViewer sourceViewer= new SourceViewer(fParent, ruler, SWT.NONE); lineNumberRulerColumn.getControl().setSize(10, 10); sourceViewer.getTextWidget().dispose(); lineNumberRulerColumn.redraw(); }
Source:
<code>public Mono<Void> deleteModel(String modelId) { try { return deleteModelWithResponse(modelId).flatMap(FluxUtil::toMono); <START> } catch (RuntimeException ex) { <END> return monoError(logger, ex); } }</code><technical_language>need catch exception here, done in overload</technical_language>

Target:
public Mono<Void> deleteModel(String modelId) { return deleteModelWithResponse(modelId).flatMap(FluxUtil::toMono); }
Source:
<code>protected void initParametersForExternalNetworks(VDS vds, boolean isMigration) { for (VmNetworkInterface iface : getVm().getInterfaces()) { VnicProfile vnicProfile = vnicProfileDao.get(iface.getVnicProfileId()); Network network = networkHelper.getNetworkByVnicProfile(vnicProfile); if (network != null && network.isExternal() && iface.isPlugged()) { Provider<?> provider = providerDao.get(network.getProvidedBy().getProviderId()); NetworkProviderProxy providerProxy = providerProxyFactory.create(provider); String pluginType = <START> StringUtils.defaultString( <END> ((OpenstackNetworkProviderProperties) provider.getAdditionalProperties()).getPluginType()); String hostBindingId = hostProviderBindingDao.get(vds.getId(), pluginType); Map<String, String> deviceProperties = providerProxy.allocate( network, vnicProfile, iface, vds, isMigration, hostBindingId); getVm().getRuntimeDeviceCustomProperties().put( new VmDeviceId(iface.getId(), getVmId()), deviceProperties); } } }</code><technical_language>this in hostProviderBindingDao.get()</technical_language>

Target:
protected void initParametersForExternalNetworks(VDS vds, boolean isMigration) { for (VmNetworkInterface iface : getVm().getInterfaces()) { VnicProfile vnicProfile = vnicProfileDao.get(iface.getVnicProfileId()); Network network = networkHelper.getNetworkByVnicProfile(vnicProfile); if (network != null && network.isExternal() && iface.isPlugged()) { Provider<?> provider = providerDao.get(network.getProvidedBy().getProviderId()); NetworkProviderProxy providerProxy = providerProxyFactory.create(provider); String pluginType = ((OpenstackNetworkProviderProperties) provider. getAdditionalProperties()).getPluginType(); String hostBindingId = hostProviderBindingDao.get(vds.getId(), pluginType); Map<String, String> deviceProperties = providerProxy.allocate( network, vnicProfile, iface, vds, isMigration, hostBindingId); getVm().getRuntimeDeviceCustomProperties().put( new VmDeviceId(iface.getId(), getVmId()), deviceProperties); } } }
Source:
<code>private File getRestoreFile() { <START> return new File(taskConfig.getBaseTaskDir(), "restore.json"); <END> }</code><technical_language>this a constant string</technical_language>

Target:
private File getRestoreFile() { return new File(taskConfig.getBaseTaskDir(), TASK_RESTORE_FILENAME); }
Source:
<code>public boolean hasLength() { <START> return false; <END> }</code><technical_language>Binary output length calculated</technical_language>

Target:
public boolean hasLength() { return true; }
Source:
<code>public static void enableRouteOverview() { <START> get("/debug/routeOverview/", RouteOverview::createHtmlOverview); <END> }</code><technical_language>i personally prefer case urls /debug/routeoverview **Done.**</technical_language>

Target:
public static void enableRouteOverview() { enableRouteOverview("/debug/routeoverview/"); }
Source:
<code>private synchronized void scheduleNextRequest() { TaskStatus taskStatus = getTaskStatus(); if (!running || taskStatus.getState().isDone()) { return; } if (future != null && !future.isDone()) { log.error("Can not reschedule update because an update is already running"); return; } ListenableFuture<?> errorRateLimit = errorTracker.acquireRequestPermit(); if (!errorRateLimit.isDone()) { errorRateLimit.addListener(this::scheduleNextRequest, executor); return; } Request request = setBinaryTransportHeadersIfNeeded(prepareGet()) .setUri(uriBuilderFrom(taskStatus.getSelf()).appendPath("status").build()) .setHeader(PRESTO_CURRENT_STATE, taskStatus.getState().toString()) .setHeader(PRESTO_MAX_WAIT, refreshMaxWait.toString()) .build(); ResponseHandler responseHandler; if (isBinaryTransportEnabled) { responseHandler = createFullSmileResponseHandler((SmileCodec<TaskStatus>) taskStatusCodec); <START> } <END> else { responseHandler = createAdaptingJsonResponseHandler(unwrapJsonCodec(taskStatusCodec)); } errorTracker.startRequest(); future = httpClient.executeAsync(request, responseHandler); currentRequestStartNanos.set(System.nanoTime()); Futures.addCallback(future, new SimpleHttpResponseHandler<>(this, request.getUri(), stats), executor); }</code><technical_language>pass a response handler based config? Instead of a if check</technical_language>

Target:
private synchronized void scheduleNextRequest() { TaskStatus taskStatus = getTaskStatus(); if (!running || taskStatus.getState().isDone()) { return; } if (future != null && !future.isDone()) { log.error("Can not reschedule update because an update is already running"); return; } ListenableFuture<?> errorRateLimit = errorTracker.acquireRequestPermit(); if (!errorRateLimit.isDone()) { errorRateLimit.addListener(this::scheduleNextRequest, executor); return; } Request request = setContentTypeHeaders(isBinaryTransportEnabled, prepareGet()) .setUri(uriBuilderFrom(taskStatus.getSelf()).appendPath("status").build()) .setHeader(PRESTO_CURRENT_STATE, taskStatus.getState().toString()) .setHeader(PRESTO_MAX_WAIT, refreshMaxWait.toString()) .build(); ResponseHandler responseHandler; if (isBinaryTransportEnabled) { responseHandler = createFullSmileResponseHandler((SmileCodec<TaskStatus>) taskStatusCodec); } else { responseHandler = createAdaptingJsonResponseHandler(unwrapJsonCodec(taskStatusCodec)); } errorTracker.startRequest(); future = httpClient.executeAsync(request, responseHandler); currentRequestStartNanos.set(System.nanoTime()); Futures.addCallback(future, new SimpleHttpResponseHandler<>(this, request.getUri(), stats), executor); }
Source:
<code>private void processEvents() { try { while ( !Thread.currentThread().isInterrupted() && (state.get() == State.STARTED) ) { <START> int pollMaxMs = (sessionTimeoutMs * 2) / 3; END> final ConnectionState newState = eventQueue.poll(pollMaxMs, TimeUnit.MILLISECONDS); if ( newState != null ) { if ( listeners.size() == 0 ) { log.warn("There are no ConnectionStateListeners registered."); } listeners.forEach ( new Function<ConnectionStateListener, Void>() { @Override public Void apply(ConnectionStateListener listener) { listener.stateChanged(client, newState); return null; } } ); } else if ( checkSessionExpiration ) { synchronized(this) { checkSessionExpiration(); } } } } catch ( InterruptedException e ) { Thread.currentThread().interrupt(); } }</code><technical_language>This is configured session timeout MS. this issues if negotiated timeout is different? I guess means potentially 4/3 \* configured session timeout determine if session timed out network partition</technical_language>

Target:
private void processEvents() { try { while ( !Thread.currentThread().isInterrupted() && (state.get() == State.STARTED) ) { int lastNegotiatedSessionTimeoutMs = client.getZookeeperClient().getLastNegotiatedSessionTimeoutMs(); int useSessionTimeoutMs = (lastNegotiatedSessionTimeoutMs > 0) ? lastNegotiatedSessionTimeoutMs : sessionTimeoutMs; int pollMaxMs = (useSessionTimeoutMs * 2) / 3; final ConnectionState newState = eventQueue.poll(pollMaxMs, TimeUnit.MILLISECONDS); if ( newState != null ) { if ( listeners.size() == 0 ) { log.warn("There are no ConnectionStateListeners registered."); } listeners.forEach ( new Function<ConnectionStateListener, Void>() { @Override public Void apply(ConnectionStateListener listener) { listener.stateChanged(client, newState); return null; } } ); } else if ( checkSessionExpiration ) { synchronized(this) { checkSessionExpiration(); } } } } catch ( InterruptedException e ) { Thread.currentThread().interrupt(); } }
Source:
<code>public List<Job> pop(final int count) throws IOException { final Object result = this.client.call( LuaCommand.POP.toString(), this.name, this.client.workerName(), Integer.toString(count)); if (result.equals(ClientHelper.EMPTY_RESULT)) { <START> return new ArrayList<Job>(); <END> } final InjectableValues injectables = new InjectableValues.Std().addValue("client", this.client); final JavaType javaType = new ObjectMapper().getTypeFactory() .constructCollectionType(ArrayList.class, Job.class); return JsonUtils.parse(result.toString(), javaType, injectables); }</code><technical_language>[Collections.emptyList()](<LINK_0> instead of constructing a new empty list</technical_language>

Target:
public List<Job> pop(final int count) throws IOException { final Object result = this.client.call( LuaCommand.POP.toString(), this.name, this.client.workerName(), Integer.toString(count)); if (result.equals(ClientHelper.EMPTY_RESULT)) { return Collections.emptyList(); } final InjectableValues injectables = new InjectableValues.Std().addValue("client", this.client); final JavaType javaType = new ObjectMapper().getTypeFactory() .constructCollectionType(ArrayList.class, Job.class); return JsonUtils.parse(result.toString(), javaType, injectables); }
Source:
<code>private Object createObjectFromFullModuleNames(String name, Set<String> fullModuleNames) throws CheckstyleException { if (fullModuleNames.size() == 1) { return createObject(fullModuleNames.iterator().next()); } else { final String optionalNames = fullModuleNames.stream() <START> .reduce((fullNames, fullName) -> fullNames + STRING_SEPARATOR + fullName).get(); <END> final LocalizedMessage exceptionMessage = new LocalizedMessage(0, Definitions.CHECKSTYLE_BUNDLE, AMBIGUOUS_MODULE_NAME_EXCEPTION_MESSAGE, new String[] {name, optionalNames}, null, getClass(), null); throw new CheckstyleException(exceptionMessage.getMessage()); } }</code><technical_language>simple .collect(Collectors.joining(", "))</technical_language>

Target:
private Object createObjectFromFullModuleNames(String name, Set<String> fullModuleNames) throws CheckstyleException { final Object returnValue; if (fullModuleNames.size() == 1) { returnValue = createObject(fullModuleNames.iterator().next()); } else { final String optionalNames = fullModuleNames.stream() .sorted() .collect(Collectors.joining(STRING_SEPARATOR)); final LocalizedMessage exceptionMessage = new LocalizedMessage(0, Definitions.CHECKSTYLE_BUNDLE, AMBIGUOUS_MODULE_NAME_EXCEPTION_MESSAGE, new String[] {name, optionalNames}, null, getClass(), null); throw new CheckstyleException(exceptionMessage.getMessage()); } return returnValue; }
Source:
<code>public List<ChePlugin> execute() throws InfrastructureException { LOG.debug("Starting brokers pod for workspace '{}'", workspaceId); Span tracingSpan = startTracingPhase(); KubernetesDeployments deployments = namespace.deployments(); try { for (ConfigMap configMap : brokerEnvironment.getConfigMaps().values()) { namespace.configMaps().create(configMap); } Pod pluginBrokerPod = getPluginBrokerPod(brokerEnvironment.getPodsCopy()); if (factory.isConfigured()) { UnrecoverablePodEventListener unrecoverableEventListener = factory.create( ImmutableSet.of(pluginBrokerPod.getMetadata().getName()), this::handleUnrecoverableEvent); namespace.deployments().watchEvents(unrecoverableEventListener); } deployments.create(pluginBrokerPod); LOG.debug("Brokers pod is created for workspace '{}'", workspaceId); <START> finishSpanIfExists(tracingSpan); <END> return nextPhase.execute(); } finally { namespace.deployments().stopWatch(); try { deployments.delete(); } catch (InfrastructureException e) { LOG.error("Brokers pod removal failed. Error: " + e.getLocalizedMessage(), e); } try { namespace.configMaps().delete(); } catch (InfrastructureException ex) { LOG.error("Brokers config map removal failed. Error: " + ex.getLocalizedMessage(), ex); } } }</code><technical_language>If a case of exception bypassed. move finally section</technical_language>

Target:
public List<ChePlugin> execute() throws InfrastructureException { LOG.debug("Starting brokers pod for workspace '{}'", workspaceId); Span tracingSpan = tracerUtil.buildSpan(SPAN_NAME, null, workspaceId, null); KubernetesDeployments deployments = namespace.deployments(); try { for (ConfigMap configMap : brokerEnvironment.getConfigMaps().values()) { namespace.configMaps().create(configMap); } Pod pluginBrokerPod = getPluginBrokerPod(brokerEnvironment.getPodsCopy()); if (factory.isConfigured()) { UnrecoverablePodEventListener unrecoverableEventListener = factory.create( ImmutableSet.of(pluginBrokerPod.getMetadata().getName()), this::handleUnrecoverableEvent); namespace.deployments().watchEvents(unrecoverableEventListener); } deployments.create(pluginBrokerPod); LOG.debug("Brokers pod is created for workspace '{}'", workspaceId); tracerUtil.finishSpan(tracingSpan); return nextPhase.execute(); } catch (InfrastructureException e) { tracerUtil.finishSpanAsFailure(tracingSpan, e.getMessage()); throw e; } finally { namespace.deployments().stopWatch(); try { deployments.delete(); } catch (InfrastructureException e) { LOG.error("Brokers pod removal failed. Error: " + e.getLocalizedMessage(), e); } try { namespace.configMaps().delete(); } catch (InfrastructureException ex) { LOG.error("Brokers config map removal failed. Error: " + ex.getLocalizedMessage(), ex); } } }
Source:
<code>public void deleteRejectedOrPendingOrganization( @Parameter(hidden = true, name = "user") @Auth User user, @Parameter(description = "Organization ID.", name = "organizationId", in = ParameterIn.PATH, required = true) @PathParam("organizationId") Long organizationId) { Organization organization = organizationDAO.findById(organizationId); OrganizationUser orgUser = getUserOrgRole(organization, user.getId()); if ((orgUser == null || orgUser.getRole() != OrganizationUser.Role.MAINTAINER) && (!user.isCurator() && !user.getIsAdmin())) { throw new CustomWebApplicationException("You do not have access to delete this organization", HttpStatus.SC_FORBIDDEN); } if (organization.getStatus() == Organization.ApplicationState.PENDING || organization.getStatus() == Organization.ApplicationState.REJECTED) { organization.getStarredUsers().clear(); organization.getAliases().clear(); eventDAO.deleteEventByOrganizationID(organizationId); <START> organizationDAO.update(organization); <END> organizationDAO.delete(organization); } else { throw new CustomWebApplicationException("You cannot delete an organization that is not currently pending or rejected", HttpStatus.SC_BAD_REQUEST); } }</code><technical_language>Do need this line? necessary of interaction related entities, weird update in order delete it. 100% of this, I for users explicitly delete (clear) more. For lines 433 434, accomplish annotations instead, lines 436 438 in this block</technical_language>

Target:
public void deleteRejectedOrPendingOrganization( @Parameter(hidden = true, name = "user") @Auth User user, @Parameter(description = "Organization ID.", name = "organizationId", in = ParameterIn.PATH, required = true) @PathParam("organizationId") Long organizationId) { Organization organization = organizationDAO.findById(organizationId); OrganizationUser orgUser = getUserOrgRole(organization, user.getId()); if ((orgUser == null || orgUser.getRole() != OrganizationUser.Role.MAINTAINER) && (!user.isCurator() && !user.getIsAdmin())) { throw new CustomWebApplicationException("You do not have access to delete this organization", HttpStatus.SC_FORBIDDEN); } if (organization.getStatus() == Organization.ApplicationState.PENDING || organization.getStatus() == Organization.ApplicationState.REJECTED) { eventDAO.deleteEventByOrganizationID(organizationId); organizationDAO.delete(organization); } else { throw new CustomWebApplicationException("You can only delete organizations that are pending or have been rejected", HttpStatus.SC_BAD_REQUEST); } }
Source:
<code>protected Map<String, GlusterVolumeEntity> fetchVolumes(VDS upServer) { VDSReturnValue result = Backend.getInstance() .getResourceManager() <START> .RunVdsCommand(VDSCommandType.GlusterVolumesList, <END> new GlusterVolumesListVDSParameters(upServer.getId(), upServer.getvds_group_id())); return result.getSucceeded() ? (Map<String, GlusterVolumeEntity>) result.getReturnValue() : null; }</code><technical_language>runVdsCommand here</technical_language>

Target:
protected Map<String, GlusterVolumeEntity> fetchVolumes(VDS upServer) { VDSReturnValue result = runVdsCommand(VDSCommandType.GlusterVolumesList, new GlusterVolumesListVDSParameters(upServer.getId(), upServer.getvds_group_id())); return result.getSucceeded() ? (Map<String, GlusterVolumeEntity>) result.getReturnValue() : null; }
Source:
<code>public void initializeDefaultPreferences() { IPreferenceStore pstore = CDebugUIPlugin.getDefault().getPreferenceStore(); CDebugPreferencePage.initDefaults( pstore ); pstore.setDefault( ICDebugPreferenceConstants.PREF_DISASM_OPEN_NO_SOURCE_INFO, true ); pstore.setDefault( ICDebugPreferenceConstants.PREF_DISASM_OPEN_SOURCE_NOT_FOUND, false ); pstore.setDefault( ICDebugPreferenceConstants.PREF_DISASM_SHOW_INSTRUCTIONS, true ); pstore.setDefault( ICDebugPreferenceConstants.PREF_DISASM_SHOW_SOURCE, true ); pstore.setDefault( ICDebugPreferenceConstants.PREF_SHOW_ERROR_REVERSE_TRACE_METHOD_NOT_AVAILABLE, true ); <START> pstore.setDefault( ICDebugPreferenceConstants.PREF_REVERSE_TRACE_METHOD_HARDWARE, ICDebugPreferenceConstants.PREF_REVERSE_TRACE_METHOD_GDB_TRACE); <END> }</code><technical_language>If move preference page dsf.gdb.ui change in GdbPreferenceInitializer.java</technical_language>

Target:
public void initializeDefaultPreferences() { IPreferenceStore pstore = CDebugUIPlugin.getDefault().getPreferenceStore(); CDebugPreferencePage.initDefaults( pstore ); pstore.setDefault( ICDebugPreferenceConstants.PREF_DISASM_OPEN_NO_SOURCE_INFO, true ); pstore.setDefault( ICDebugPreferenceConstants.PREF_DISASM_OPEN_SOURCE_NOT_FOUND, false ); pstore.setDefault( ICDebugPreferenceConstants.PREF_DISASM_SHOW_INSTRUCTIONS, true ); pstore.setDefault( ICDebugPreferenceConstants.PREF_DISASM_SHOW_SOURCE, true ); pstore.setDefault(ICDebugPreferenceConstants.PREF_SHOW_ERROR_REVERSE_TRACE_METHOD_NOT_AVAILABLE, true); }
Source:
<code>public void ensureV3CertificateCreationOkWhenConsumerSupportsV3Dot1Certs() throws Exception { <START> consumer.setFact("system.certificate_version", "3.4"); <END> subscription.getProduct().setAttribute(Product.Attributes.RAM, "4"); subscription.getProduct().setAttribute(Product.Attributes.ROLES, "role1, role2 "); DefaultEntitlementCertServiceAdapter entAdapter = this.initCertServiceAdapter(); entAdapter.createX509Certificate(consumer, owner, pool, entitlement, product, new HashSet<>(), getProductModels(product, new HashSet<>(), "prefix", entitlement), new BigInteger("1234"), keyPair, true); }</code><technical_language>Certificate version is a good candidate for extraction. is a lot of places a bit easier update version in future</technical_language>

Target:
public void ensureV3CertificateCreationOkWhenConsumerSupportsV3Dot1Certs() throws Exception { consumer.setFact("system.certificate_version", X509V3ExtensionUtil.CERT_VERSION); subscription.getProduct().setAttribute(Product.Attributes.RAM, "4"); subscription.getProduct().setAttribute(Product.Attributes.ROLES, "role1, role2 "); DefaultEntitlementCertServiceAdapter entAdapter = this.initCertServiceAdapter(); entAdapter.createX509Certificate(consumer, owner, pool, entitlement, product, new HashSet<>(), getProductModels(product, new HashSet<>(), "prefix", entitlement), new BigInteger("1234"), keyPair, true); }
Source:
<code>void setLastSearchTime() { LocalDate date = LocalDate.now(); testStudy.setLastSearchDate(date); <START> Assertions.assertEquals(date.toString(), testStudy.getStudyMetaDataField(StudyMetaDataField.STUDY_LAST_SEARCH).get()); <END> }</code><technical_language>static import, Assertions... is superflous</technical_language>

Target:
void setLastSearchTime() { LocalDate date = LocalDate.now(); testStudy.setLastSearchDate(date); assertEquals(date.toString(), testStudy.getStudyMetaDataField(StudyMetaDataField.STUDY_LAST_SEARCH).get()); }
Source:
<code>private Response executeProcessAlarmAction(String idOperation, Event params) throws CapabilityException { IAction action = createAction(idOperation); action.setParams(params); <START> action.setModelToUpdate(resource.getModel()); <END> log.debug("Executing process alarm action"); return executeAction(action, idOperation); }</code><technical_language>if checkParams that</technical_language>

Target:
private Response executeProcessAlarmAction(String idOperation, Event params) throws CapabilityException { IAction action = createActionAndCheckParams(idOperation, params); action.setParams(params); action.setModelToUpdate(resource.getModel()); log.debug("Executing process alarm action"); return executeAction(action, idOperation); }
Source:
<code>public void testUpdate() throws CoreException { TaskReviewsMappingsStore taskReviewsMappingStore = getEmptyTaskReviewStore(); TaskData reviewData1 = addReviewData(review1, descriptionWithTaskUrl1); TaskContainerDelta delta = new TaskContainerDelta(review1, Kind.ADDED); taskReviewsMappingStore.addTaskAssocation(review1, reviewData1); taskReviewsMappingStore.containersChanged(ImmutableSet.of(delta)); assertTrue(taskReviewsMappingStore.getReviewUrls(taskUrl1).contains(reviewUrl1)); when(review1.getAttribute(TaskReviewsMappingsStore.ATTR_ASSOCIATED_TASK)).thenReturn(taskUrl1); reviewData1 = addReviewData(review1, descriptionWithTaskUrl2); <START> taskReviewsMappingStore.addTaskAssocation(review1, reviewData1); <END> delta = new TaskContainerDelta(review1, Kind.CONTENT); taskReviewsMappingStore.containersChanged(ImmutableSet.of(delta)); assertFalse(taskReviewsMappingStore.getReviewUrls(taskUrl1).contains(reviewUrl1)); assertTrue(taskReviewsMappingStore.getReviewUrls(taskUrl2).contains(reviewUrl1)); }</code><technical_language>I I addressed this some changes in updateMapping ordering of adding attribute</technical_language>

Target:
public void testUpdate() throws CoreException { TaskReviewsMappingsStore taskReviewsMappingStore = getEmptyTaskReviewStore(); TaskData reviewData1 = addReviewData(review1, descriptionWithTaskUrl1); TaskContainerDelta delta = new TaskContainerDelta(review1, Kind.ADDED); taskReviewsMappingStore.addTaskAssocation(review1, reviewData1); taskReviewsMappingStore.containersChanged(ImmutableSet.of(delta)); assertTrue(taskReviewsMappingStore.getReviewUrls(taskUrl1).contains(reviewUrl1)); reviewData1 = addReviewData(review1, descriptionWithTaskUrl2); delta = new TaskContainerDelta(review1, Kind.CONTENT); taskReviewsMappingStore.addTaskAssocation(review1, reviewData1); taskReviewsMappingStore.containersChanged(ImmutableSet.of(delta)); assertFalse(taskReviewsMappingStore.getReviewUrls(taskUrl1).contains(reviewUrl1)); assertTrue(taskReviewsMappingStore.getReviewUrls(taskUrl2).contains(reviewUrl1)); }
Source:
<code>public void doWrite(BaseRow row, int ordinal) { if (row.isNullAt(ordinal)) { ((DecimalVector) getValueVector()).setNull(getCount()); } else { <START> ((DecimalVector) getValueVector()).setSafe( <END> getCount(), row.getDecimal(ordinal, precision, scale).toBigDecimal()); } }</code><technical_language>adjust precision scale here, in DecimalWriter? If pass a decimal precision scale, exception thrown</technical_language>

Target:
public void doWrite(BaseRow row, int ordinal) { if (row.isNullAt(ordinal)) { ((DecimalVector) getValueVector()).setNull(getCount()); } else { BigDecimal bigDecimal = row.getDecimal(ordinal, precision, scale).toBigDecimal(); bigDecimal = fromBigDecimal(bigDecimal, precision, scale); if (bigDecimal == null) { ((DecimalVector) getValueVector()).setNull(getCount()); } else { ((DecimalVector) getValueVector()).setSafe(getCount(), bigDecimal); } } }