auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public JavaClassSource decorateSource(UIExecutionContext context, Project project, JavaClassSource source) throws Exception { BeanScope scopedValue = scoped.getValue(); if (BeanScope.CUSTOM == scopedValue) { source.addAnnotation(customScopeAnnotation.getValue()); } else if (BeanScope.DEPENDENT != scopedValue) { source.addAnnotation(scopedValue.getAnnotation()); } if (withNamed.getValue()) { source.addAnnotation(Named.class); } if (alternative.getValue()) { source.addAnnotation(Alternative.class); } if (qualifier != null && qualifier.getValue() != null && !"".equals(qualifier.getValue())) { source.addAnnotation(qualifier.getValue()); } if (serializable.getValue()) { <START> source.addInterface(Serializable.class); <END> } return source; }</code><technical_language>serialVersionUID added I suppose</technical_language>

Target:
public JavaClassSource decorateSource(UIExecutionContext context, Project project, JavaClassSource source) throws Exception { BeanScope scopedValue = scoped.getValue(); if (BeanScope.CUSTOM == scopedValue) { source.addAnnotation(customScopeAnnotation.getValue()); } else if (BeanScope.DEPENDENT != scopedValue) { source.addAnnotation(scopedValue.getAnnotation()); if (scopedValue.isSerializable()) { source.addInterface(Serializable.class); source.addField().setPrivate().setStatic(true).setFinal(true).setName("serialVersionUID").setType("long") .setLiteralInitializer("1L"); } } if (withNamed.getValue()) { source.addAnnotation(Named.class); } if (alternative.getValue()) { source.addAnnotation(Alternative.class); } if (qualifier != null && qualifier.getValue() != null && !"".equals(qualifier.getValue())) { source.addAnnotation(qualifier.getValue()); } return source; }
Source:
<code>private void publishIdleEvent(long idleTime) { if (this.eventPublisher != null) { FileTailingIdleEvent event = new FileTailingIdleEvent(this, this.file, idleTime); this.eventPublisher.publishEvent(event); } else { <START> logger.info("No publisher for idle event:"); <END> } }</code><technical_language>Typo. need colon in end. Copy/paste artifact</technical_language>

Target:
private void publishIdleEvent(long idleTime) { if (this.eventPublisher != null) { if (getFile().exists()) { FileTailingIdleEvent event = new FileTailingIdleEvent(this, this.file, idleTime); this.eventPublisher.publishEvent(event); } } else { logger.info("No publisher for idle event"); } }
Source:
<code>private boolean hasSameSchema(final INodeConnector connector) { return (!connector.getName().equals(currentConnector)) && connector.getBaseSchema().equals(currentConnector) <START> && !(connector instanceof IAdditionalInfo); <END> }</code><technical_language>I other connectors implement this interface in future, is do futher check like: (connector instanceof IAdditionalInfo) && "tacokit".equalsIgnoreCase(IAdditionalInfo.class.cast(connector ).getInfo("connectorType")) put "connectorType" attribute additionalInfo constructing TacokitConnector</technical_language>

Target:
private boolean hasSameSchema(final INodeConnector connector) { return (!connector.getName().equals(currentConnector)) && connector.getBaseSchema().equals(currentConnector) && !isTacokit(connector); }
Source:
<code><START> public String acquireLease(int leaseTimeInSec, String leaseId) throws StorageException { <END> try { String id = leaseBlob.acquireLease(leaseTimeInSec, leaseId); LOG.info("Acquired lease with lease id = " + id); return id; } catch (StorageException storageException) { int httpStatusCode = storageException.getHttpStatusCode(); if (httpStatusCode == HttpStatus.CONFLICT_409) { LOG.info("The blob you're trying to acquire is leased already.", storageException); } else if (httpStatusCode == HttpStatus.NOT_FOUND_404) { LOG.error("The blob you're trying to lease does not exist.", storageException); throw new AzureException(storageException); } else { LOG.error("Error acquiring lease!", storageException); throw new AzureException(storageException); } } return null; }</code><technical_language>throwing AzureException ? :)</technical_language>

Target:
public String acquireLease(int leaseTimeInSec, String leaseId) { try { String id = leaseBlob.acquireLease(leaseTimeInSec, leaseId); LOG.info("Acquired lease with lease id = " + id); return id; } catch (StorageException storageException) { int httpStatusCode = storageException.getHttpStatusCode(); if (httpStatusCode == HttpStatus.CONFLICT_409) { LOG.info("The blob you're trying to acquire is leased already.", storageException); } else if (httpStatusCode == HttpStatus.NOT_FOUND_404) { LOG.error("The blob you're trying to lease does not exist.", storageException); throw new AzureException(storageException); } else { LOG.error("Error acquiring lease!", storageException); throw new AzureException(storageException); } } return null; }
Source:
<code>public Bootstrap addModules(final Iterable<? extends Module> additionalModules) { final ArrayList<Module> copyMutable = new ArrayList<>(); for (final Module module : additionalModules) { copyMutable.add(module); } final List<Module> copy = Collections.unmodifiableList(copyMutable); <START> return overrideModules(new com.google.common.base.Function<List<Module>, Iterable<Module>>() { <END> public Iterable<Module> apply(List<Module> modules) { return Iterables.concat(modules, copy); } }); }</code><technical_language>This anonymous class replaced lambda modules -> Iterables.concat(modules, copy)</technical_language>

Target:
public Bootstrap addModules(final Iterable<? extends Module> additionalModules) { final ArrayList<Module> copyMutable = new ArrayList<>(); for (final Module module : additionalModules) { copyMutable.add(module); } final List<Module> copy = Collections.unmodifiableList(copyMutable); return this.overrideModules(modules -> Iterables.concat(modules, copy)); }
Source:
<code>private static SwapTrade parseVariableNotional(SwapTrade trade, List<CsvRow> variableRows) { ImmutableList.Builder<ValueStep> stepBuilder = ImmutableList.builder(); for (CsvRow row : variableRows) { LocalDate date = LoaderUtils.parseDate(row.getValue(START_DATE_FIELD)); row.findValue(NOTIONAL_FIELD) .map(str -> LoaderUtils.parseDouble(str)) .ifPresent(notional -> stepBuilder.add(ValueStep.of(date, ValueAdjustment.ofReplace(notional)))); } <START> ImmutableList<ValueStep> vnotionals = stepBuilder.build(); <END> if (vnotionals.isEmpty()) { return trade; } ImmutableList.Builder<SwapLeg> legBuilder = ImmutableList.builder(); for (SwapLeg swapLeg : trade.getProduct().getLegs()) { RateCalculationSwapLeg leg = (RateCalculationSwapLeg) swapLeg; NotionalSchedule notionalSchedule = leg.getNotionalSchedule().toBuilder() .amount(ValueSchedule.of(leg.getNotionalSchedule().getAmount().getInitialValue(), vnotionals)) .build(); legBuilder.add(leg.toBuilder().notionalSchedule(notionalSchedule).build()); } return replaceLegs(trade, legBuilder.build()); }</code><technical_language>vNotionals vnotionals</technical_language>

Target:
private static SwapTrade parseVariableNotional(SwapTrade trade, List<CsvRow> variableRows) { ImmutableList.Builder<ValueStep> stepBuilder = ImmutableList.builder(); for (CsvRow row : variableRows) { LocalDate date = LoaderUtils.parseDate(row.getValue(START_DATE_FIELD)); row.findValue(NOTIONAL_FIELD) .map(str -> LoaderUtils.parseDouble(str)) .ifPresent(notional -> stepBuilder.add(ValueStep.of(date, ValueAdjustment.ofReplace(notional)))); } ImmutableList<ValueStep> varNotionals = stepBuilder.build(); if (varNotionals.isEmpty()) { return trade; } ImmutableList.Builder<SwapLeg> legBuilder = ImmutableList.builder(); for (SwapLeg swapLeg : trade.getProduct().getLegs()) { RateCalculationSwapLeg leg = (RateCalculationSwapLeg) swapLeg; NotionalSchedule notionalSchedule = leg.getNotionalSchedule().toBuilder() .amount(ValueSchedule.of(leg.getNotionalSchedule().getAmount().getInitialValue(), varNotionals)) .build(); legBuilder.add(leg.toBuilder().notionalSchedule(notionalSchedule).build()); } return replaceLegs(trade, legBuilder.build()); }
Source:
<code>public ThriftBytesWriteSupport(TProtocolFactory protocolFactory, Class<? extends TBase<?, ?>> thriftClass, boolean buffered, FieldIgnoredHandler errorHandler) { <START> this(null, protocolFactory, thriftClass, buffered, errorHandler); <END> }</code><technical_language>avoid null</technical_language>

Target:
public ThriftBytesWriteSupport(TProtocolFactory protocolFactory, Class<? extends TBase<?, ?>> thriftClass, boolean buffered, FieldIgnoredHandler errorHandler) { this(new Configuration(), protocolFactory, thriftClass, buffered, errorHandler); }
Source:
<code>public void reschedule(Retry retry, int attempt, long waitStartMs) { long now = clock.getTicks(); while (true) { long cursor = inPubSequence.next(); if (cursor < -1) { LockSupport.parkNanos(1); continue; } if (cursor < 0) { throw EntryUnavailableException.INSTANCE; } try { RetryHolder retryHolder = inQueue.get(cursor); retryHolder.retry = retry; <START> retryHolder.attempt = attempt; <END> retryHolder.lastRunTimestamp = now; retryHolder.waitStartTimestamp = attempt == 0 ? now : waitStartMs; return; } finally { inPubSequence.done(cursor); } } }</code><technical_language>attributes context holder? This need create objects for retries</technical_language>

Target:
private void reschedule(Retry retry, int attempt, long waitStartMs) { long now = clock.getTicks(); retry.getAttemptDetails().attempt = attempt; retry.getAttemptDetails().lastRunTimestamp = now; retry.getAttemptDetails().waitStartTimestamp = attempt == 0 ? now : waitStartMs; while (true) { long cursor = inPubSequence.next(); if (cursor < -1) { continue; } if (cursor < 0) { throw RetryFailedOperationException.INSTANCE; } RetryHolder retryHolder = inQueue.get(cursor); retryHolder.retry = retry; inPubSequence.done(cursor); return; } }
Source:
<code>private void handleEntity(E entity) { <START> if (!process.isActive()) { <END> return; } Watch w = Watch.start(); try { processEntity(entity); } catch (Exception e) { process.handle(e); } finally { process.addTiming(descriptor.getPluralLabel(), w.elapsedMillis()); } }</code><technical_language>iterateAll this already(?)</technical_language>

Target:
private void handleEntity(E entity) { Watch w = Watch.start(); try { processEntity(entity); } catch (Exception e) { process.handle(e); } finally { process.addTiming(descriptor.getPluralLabel(), w.elapsedMillis()); } }
Source:
<code>public static void clearCacheByPath(Instance instance, final String zooPath) { String thePath = zooPath.startsWith("/") ? zooPath : "/" + zooPath; getZooCache(instance).clear(ZooUtil.getRoot(instance) + thePath); <START> instanceToMapCache.invalidateAll(); <END> }</code><technical_language>clear instance id</technical_language>

Target:
public static void clearCacheByPath(Instance instance, final String zooPath) { String thePath = zooPath.startsWith("/") ? zooPath : "/" + zooPath; getZooCache(instance).clear(ZooUtil.getRoot(instance) + thePath); instanceToMapCache.invalidate(instance.getInstanceID()); }
Source:
<code>private ApiResponse callAccountApi(Api.HttpMethod method, List<String> uri, Map<String, Object> params, Map<String, Object> options) throws Exception { options = verifyOptions(options); <START> if (!options.containsKey("provisioning_api_key")) { <END> options.put("provisioning_api_key", key); options.put("provisioning_api_secret", secret); } return api.getStrategy().callAccountApi(method, uri, params, options); }</code><technical_language>@nitzanj , assume if is sending key in options, sending secret? verify that</technical_language>

Target:
private ApiResponse callAccountApi(Api.HttpMethod method, List<String> uri, Map<String, Object> params, Map<String, Object> options) throws Exception { options = verifyOptions(options); if (options.containsKey("provisioning_api_key")){ if (!options.containsKey("provisioning_api_secret")){ throw new IllegalArgumentException("When providing key or secret through options, both must be provided"); } } else { if (options.containsKey("provisioning_api_secret")){ throw new IllegalArgumentException("When providing key or secret through options, both must be provided"); } options.put("provisioning_api_key", key); options.put("provisioning_api_secret", secret); } return api.getStrategy().callAccountApi(method, uri, params, options); }
Source:
<code>private int insertBatch(Iterator<EncodedObject> objects, BulkOpListener listener) { final byte[] keybuff = new byte[ObjectId.NUM_BYTES]; Set<ObjectId> insertedIds = new HashSet<>(); try (RocksDBReference dbRef = dbhandle.getReference(); WriteOptions wo = new WriteOptions(); WriteBatch batch = new WriteBatch()) { <START> wo.setSync(false); <END> wo.setDisableWAL(true); while (objects.hasNext()) { EncodedObject object = objects.next(); final ObjectId id = object.id; id.getRawValue(keybuff); final byte[] value = object.serialform; batch.put(keybuff, value); insertedIds.add(id); } dbRef.db().write(wo, batch); insertedIds.forEach((id) -> listener.inserted(id, null)); } catch (RocksDBException e) { throw Throwables.propagate(e); } return insertedIds.size(); }</code><technical_language>this need un-done changes for this write op</technical_language>

Target:
private int insertBatch(Iterator<EncodedObject> objects, BulkOpListener listener) { final byte[] keybuff = new byte[ObjectId.NUM_BYTES]; Set<ObjectId> insertedIds = new HashSet<>(); try (RocksDBReference dbRef = dbhandle.getReference(); WriteOptions wo = new WriteOptions(); WriteBatch batch = new WriteBatch()) { wo.setSync(true); while (objects.hasNext()) { EncodedObject object = objects.next(); final ObjectId id = object.id; id.getRawValue(keybuff); final byte[] value = object.serialform; batch.put(keybuff, value); insertedIds.add(id); } dbRef.db().write(wo, batch); insertedIds.forEach((id) -> listener.inserted(id, null)); } catch (RocksDBException e) { throw Throwables.propagate(e); } return insertedIds.size(); }
Source:
<code>public void setNameAmount(String name, int newAmount) { if (nameAmounts.containsKey(name)) { int currentAmount = nameAmounts.get(name); <START> if (currentAmount > newAmount) { <END> int amountToDelete = currentAmount - newAmount; removeNames(name, amountToDelete); } else { int amountToAdd = newAmount - currentAmount; addNames(name, amountToAdd); } } }</code><technical_language>this level, invoke other APIs lead duplicated code. update HashMap directly. numInstances updated properly though</technical_language>

Target:
public void setNameAmount(String name, int newAmount) { if (nameAmounts.containsKey(name)) { int currentAmount = nameAmounts.get(name); if (newAmount == 0) { nameAmounts.remove(name); names.remove(name); numInstances -= currentAmount; } else if (newAmount > currentAmount) { nameAmounts.put(name, newAmount); numInstances += newAmount - currentAmount; } else { nameAmounts.put(name, newAmount); numInstances -= currentAmount - newAmount; } } }
Source:
<code>private void processRuleMetadata(Rule rule, WindupRuleProvider provider) { <START> final Context ctx = (Context) rule; <END> provider.enhanceMetadata(ctx); normalizeRuleMetadata(rule); assert ctx.get(RuleMetadata.CATEGORY) instanceof Set; Set<String> categories = (Set<String>) ctx.get(RuleMetadata.CATEGORY); categories.addAll(provider.getCategories()); }</code><technical_language>rename ctx --> context</technical_language>

Target:
private void processRuleMetadata(Rule rule, WindupRuleProvider provider) { final Context ctx = (Context) rule; provider.enhanceMetadata(ctx); normalizeRuleMetadata(rule); assert ctx.get(RuleMetadata.TAGS) instanceof Set; Set<String> categories = (Set<String>) ctx.get(RuleMetadata.TAGS); categories.addAll(provider.getCategories()); }
Source:
<code>private TypeNode getTypeNode() { if (isPrimitiveType()) { return (TypeNode) getAccessNodeParent().getFirstChildOfType(ASTType.class).jjtGetChild(0); } <START> if (!isLambdaTypelessParameter() <END> && getAccessNodeParent().getFirstChildOfType(ASTType.class).jjtGetNumChildren() > 0) { return (TypeNode) getAccessNodeParent().getFirstChildOfType(ASTType.class).jjtGetChild(0).jjtGetChild(0); } return null; }</code><technical_language>latest master, this is replaced more future-proof isTypeInferred relies VariableDeclaratorId.isTypeInferred. If method returned true for implicitly typed local vars, skip next line's check</technical_language>

Target:
private TypeNode getTypeNode() { if (isPrimitiveType()) { return (TypeNode) getAccessNodeParent().getFirstChildOfType(ASTType.class).jjtGetChild(0); } if (!isTypeInferred() && getAccessNodeParent().getFirstChildOfType(ASTType.class).jjtGetNumChildren() > 0) { return (TypeNode) getAccessNodeParent().getFirstChildOfType(ASTType.class).jjtGetChild(0).jjtGetChild(0); } return null; }
Source:
<code>public void start() { super.start(); <START> this.distExecutorService = new DefaultExecutorService(cache); <END> }</code><technical_language>AFAICT local thread pool is registration, submit callable node local node. this removal, a time-sensitive operation</technical_language>

Target:
public void start() { super.start(); this.distExecutorService = new DefaultExecutorService(cache, new WithinThreadExecutor()); }
Source:
<code>LocalSymbolTableImports(SymbolTable defaultSystemSymtab, SymbolTable... imports) { assert defaultSystemSymtab.isSystemTable() : "defaultSystemSymtab isn't a system symtab"; if (imports != null && imports.length > 0) { final int offset; final SymbolTable systemTable; if (imports[0].isSystemTable()) { offset = 0; systemTable = imports[0]; } else { offset = 1; systemTable = defaultSystemSymtab; } myImports = new SymbolTable[imports.length + offset]; myImports[0] = systemTable; for(int i = 1 - offset; i < imports.length; i++) { SymbolTable symbolTable = imports[i]; if(symbolTable.isLocalTable()) { <START> myImports[i + offset] = LocalSymbolTableImportAdapter.of((LocalSymbolTable) symbolTable); <END> } else { myImports[i + offset] = symbolTable; } } } else { myImports = new SymbolTable[] { defaultSystemSymtab }; } myBaseSids = new int[myImports.length]; myMaxId = prepBaseSids(myBaseSids, myImports); }</code><technical_language>Enforce a single import too</technical_language>

Target:
LocalSymbolTableImports(SymbolTable defaultSystemSymtab, SymbolTable... imports) { assert defaultSystemSymtab.isSystemTable() : "defaultSystemSymtab isn't a system symtab"; if (imports != null && imports.length > 0) { final int offset; final SymbolTable systemTable; if (imports[0].isSystemTable()) { offset = 0; systemTable = imports[0]; } else { offset = 1; systemTable = defaultSystemSymtab; } myImports = new SymbolTable[imports.length + offset]; myImports[0] = systemTable; validateImports(Arrays.asList(imports)); for(int i = 1 - offset; i < imports.length; i++) { SymbolTable symbolTable = imports[i]; if(symbolTable instanceof LocalSymbolTable) { myImports[i + offset] = LocalSymbolTableImportAdapter.of((LocalSymbolTable) symbolTable); } else { myImports[i + offset] = symbolTable; } } } else { myImports = new SymbolTable[] { defaultSystemSymtab }; } myBaseSids = new int[myImports.length]; myMaxId = prepBaseSids(myBaseSids, myImports); }
Source:
<code>public String toString() { <START> return "COMP(" + leftChild + ", " + type + ", " + rightChild + ')'; <END> }</code><technical_language>type(left, right)</technical_language>

Target:
public String toString() { return type + "(" + leftChild + ", " + rightChild + ')'; }
Source:
<code>private void createSnapshot() { if (getWindow() != null) { return; } GlusterVolumeEntity volumeEntity = getEntity(); final GlusterVolumeSnapshotModel snapshotModel = new GlusterVolumeSnapshotModel(true, !volumeEntity.getSnapshotScheduled()); snapshotModel.setHelpTag(HelpTag.new_volume_snapshot); snapshotModel.setHashName("new_volume_snapshot"); snapshotModel.setTitle(ConstantsManager.getInstance().getConstants().createScheduleVolumeSnapshotTitle()); setWindow(snapshotModel); snapshotModel.getClusterName().setEntity(volumeEntity.getVdsGroupName()); snapshotModel.getVolumeName().setEntity(volumeEntity.getName()); AsyncDataProvider.getInstance().getIsGlusterVolumeSnapshotCliScheduleEnabled(new AsyncQuery(this, new INewAsyncCallback() { @Override public void onSuccess(Object model, Object returnValue) { <START> Boolean isCliScheduleEnabled = (Boolean) returnValue; <END> snapshotModel.getDisableCliSchedule().setEntity(isCliScheduleEnabled); } }), volumeEntity.getClusterId()); UICommand okCommand = UICommand.createDefaultOkUiCommand("onCreateSnapshot", this); snapshotModel.getCommands().add(okCommand); UICommand cancelCommand = UICommand.createCancelUiCommand("cancel", this); snapshotModel.getCommands().add(cancelCommand); }</code><technical_language>dialog is blocked user action here, result of query in remains unnoticed user</technical_language>

Target:
private void createSnapshot() { if (getWindow() != null) { return; } GlusterVolumeEntity volumeEntity = getEntity(); final GlusterVolumeSnapshotModel snapshotModel = new GlusterVolumeSnapshotModel(true, !volumeEntity.getSnapshotScheduled()); snapshotModel.setHelpTag(HelpTag.new_volume_snapshot); snapshotModel.setHashName("new_volume_snapshot"); snapshotModel.setTitle(ConstantsManager.getInstance().getConstants().createScheduleVolumeSnapshotTitle()); setWindow(snapshotModel); snapshotModel.startProgress(null); snapshotModel.getClusterName().setEntity(volumeEntity.getVdsGroupName()); snapshotModel.getVolumeName().setEntity(volumeEntity.getName()); AsyncDataProvider.getInstance().getIsGlusterVolumeSnapshotCliScheduleEnabled(new AsyncQuery(this, new INewAsyncCallback() { @Override public void onSuccess(Object model, Object returnValue) { Boolean isCliScheduleEnabled = (Boolean) returnValue; snapshotModel.getDisableCliSchedule().setEntity(isCliScheduleEnabled); snapshotModel.stopProgress(); } }), volumeEntity.getClusterId()); UICommand okCommand = UICommand.createDefaultOkUiCommand("onCreateSnapshot", this); snapshotModel.getCommands().add(okCommand); UICommand cancelCommand = UICommand.createCancelUiCommand("cancel", this); snapshotModel.getCommands().add(cancelCommand); }
Source:
<code>public void onSuccessfulResponse(ReplicaId replicaId) { <START> successfulRequests.add(replicaId); <END> onReplicaResponse(replicaId); }</code><technical_language>this base. is this copied</technical_language>

Target:
public void onSuccessfulResponse(ReplicaId replicaId) { super.onSuccessfulResponse(replicaId); if(isLocalDone) { coordinatorMetrics.crossColoProxyCallCount.inc(); } onReplicaResponse(replicaId); }
Source:
<code><START> public void testPageLoad() { <END> LayerAccessDataRulePanelInfo info = new LayerAccessDataRulePanelInfo(); ListModel<DataAccessRuleInfo> own = info.createOwnModel(layerModel, false); tester.startPage( new FormTestPage( new ComponentBuilder() { private static final long serialVersionUID = -5907648151984337786L; public Component buildComponent(final String id) { return new LayerAccessDataRulePanel(id, layerModel, own); } })); tester.assertComponent("form:panel", LayerAccessDataRulePanel.class); tester.assertComponent("form:panel:dataAccessPanel", AccessDataRulePanel.class); tester.assertComponent( "form:panel:dataAccessPanel:listContainer", WebMarkupContainer.class); tester.assertComponent( "form:panel:dataAccessPanel:listContainer:selectAll", CheckBox.class); tester.assertComponent("form:panel:dataAccessPanel:listContainer:rules", ListView.class); }</code><technical_language>interesting a test checking right checkboxes selected initial rule set</technical_language>

Target:
public void testPageLoad() throws IOException { LayerAccessDataRulePanelInfo info = new LayerAccessDataRulePanelInfo(); ListModel<DataAccessRuleInfo> own = info.createOwnModel(layerModel, false); tester.startPage( new FormTestPage( new ComponentBuilder() { private static final long serialVersionUID = -5907648151984337786L; public Component buildComponent(final String id) { return new LayerAccessDataRulePanel(id, layerModel, own); } })); tester.assertComponent("form:panel", LayerAccessDataRulePanel.class); tester.assertComponent("form:panel:dataAccessPanel", AccessDataRulePanel.class); tester.assertComponent( "form:panel:dataAccessPanel:listContainer", WebMarkupContainer.class); tester.assertComponent( "form:panel:dataAccessPanel:listContainer:selectAll", CheckBox.class); tester.assertComponent("form:panel:dataAccessPanel:listContainer:rules", ListView.class); }
Source:
<code>public Map<Long, Set<TObject>> chronologize(String key, long record, long start, long end) { <START> Map<Long, Set<TObject>> context = Maps.newTreeMap(); <END> return chronologize(key, record, start, end, context); }</code><technical_language>is context a TreeMap? LinkedHashMap</technical_language>

Target:
public Map<Long, Set<TObject>> chronologize(String key, long record, long start, long end) { Map<Long, Set<TObject>> context = Maps.newLinkedHashMap(); return chronologize(key, record, start, end, context); }
Source:
<code>public void testSkipScan() throws Exception { String baseTableName = dataTableName; PreparedStatement upsertStmt = dataTableUpsertStmt; if (!Strings.isNullOrEmpty(viewDdl)) { baseTableName = viewName; upsertStmt = viewUpsertStmt; } for (int i=0; i < 2; i++) { if (dataTableDdl.contains("MULTI_TENANT")) { upsertRowMultiTenant(upsertStmt, "val"+i, i,"name-" + i, 19999); } else { <START> upsertRow(upsertStmt, i, "name-" + i, 19999); <END> } conn.commit(); } IndexScrutinyToolIT.runScrutiny(schemaName, baseTableName, indexTableName, null, SourceTable.INDEX_TABLE_SOURCE); PreparedStatement targetStmt = IndexScrutinyTool.getTargetTableQueryForScrutinyTool(); assertSkipScanFilter(targetStmt); IndexScrutinyToolIT.runScrutiny(schemaName, baseTableName, indexTableName, null, SourceTable.DATA_TABLE_SOURCE); targetStmt = IndexScrutinyTool.getTargetTableQueryForScrutinyTool(); assertSkipScanFilter(targetStmt); }</code><technical_language>if I understand this correctly, this ll insert 2 rows</technical_language>

Target:
public void testSkipScan() throws Exception { String baseTableName = dataTableName; PreparedStatement upsertStmt = dataTableUpsertStmt; if (!Strings.isNullOrEmpty(viewDdl)) { baseTableName = viewName; upsertStmt = viewUpsertStmt; } for (int i=0; i < 2; i++) { if (dataTableDdl.contains("MULTI_TENANT")) { upsertRowMultiTenant(upsertStmt, "val"+i, i,"name-" + i, 19999); } else { upsertRow(upsertStmt, i, "name-" + i, 19999); } conn.commit(); } List<Job> completedJobs = IndexScrutinyToolIT.runScrutiny(schemaName, baseTableName, indexTableName, null, SourceTable.DATA_TABLE_SOURCE); PreparedStatement targetStmt = IndexScrutinyTool.getTargetTableQueryForScrutinyTool(); assertSkipScanFilter(targetStmt); Job job = completedJobs.get(0); Counters counters = job.getCounters(); assertEquals(2, getCounterValue(counters, VALID_ROW_COUNT)); assertEquals(0, getCounterValue(counters, INVALID_ROW_COUNT)); completedJobs = IndexScrutinyToolIT.runScrutiny(schemaName, baseTableName, indexTableName, null, SourceTable.INDEX_TABLE_SOURCE); targetStmt = IndexScrutinyTool.getTargetTableQueryForScrutinyTool(); assertSkipScanFilter(targetStmt); job = completedJobs.get(0); counters = job.getCounters(); assertEquals(2, getCounterValue(counters, VALID_ROW_COUNT)); assertEquals(0, getCounterValue(counters, INVALID_ROW_COUNT)); }
Source:
<code>private void prepareUnitCardData() { try { ChunkPlugin chunkPlugin = mProject.getChunkPlugin(new ChunkPluginLoader(this)); List<Chunk> chunks = chunkPlugin.getChapter(mChapterNum).getChunks(); for (Chunk unit : chunks) { String title = Utils.capitalizeFirstLetter(mProject.getModeName()) + " " + unit.getLabel(); <START> mUnitCardList.add(new UnitCard(mAdapter, mProject, title, mChapterNum, unit.getStartVerse(), unit.getEndVerse(), this)); <END> } } catch (IOException e) { e.printStackTrace(); } }</code><technical_language>line length</technical_language>

Target:
private void prepareUnitCardData() { if(chunkPlugin != null) { List<Chunk> chunks = chunkPlugin.getChapter(mChapterNum).getChunks(); for (Chunk unit : chunks) { String title = Utils.capitalizeFirstLetter(mProject.getModeName()) + " " + unit.getLabel(); mUnitCardList.add( new UnitCard( mAdapter, mProject, title, mChapterNum, unit.getStartVerse(), unit.getEndVerse(), this ) ); } } }
Source:
<code>private List<MetricFamilySamples> getQueryExecutionMetrics() { return Arrays.asList( createCounter( "hibernate_query_execution_total", "Get global number of executed queries", statistics.getQueryExecutionCount() ), createGauge( "hibernate_query_execution_seconds_max", <START> "Get the time in milliseconds of the slowest query.", <END> statistics.getQueryExecutionMaxTime() / 1000.0 ), createCounter( "hibernate_natural_id_query_execution_total", "Get the global number of naturalId queries executed against the database", statistics.getNaturalIdQueryExecutionCount() ), createGauge( "hibernate_natural_id_query_execution_seconds_max", "Get the global maximum query time for naturalId queries executed against the database", statistics.getNaturalIdQueryExecutionMaxTime() / 1000.0 ) ); }</code><technical_language>time period? generally drop metrics this useful statistically</technical_language>

Target:
private List<MetricFamilySamples> getQueryExecutionMetrics() { return Arrays.<MetricFamilySamples>asList( createCounter( "hibernate_query_execution_total", "Global number of executed queries (getQueryExecutionCount)", new ValueProvider() { @Override public double getValue(Statistics statistics) { return statistics.getQueryExecutionCount(); } } ), createCounter( "hibernate_natural_id_query_execution_total", "The global number of naturalId queries executed against the database (getNaturalIdQueryExecutionCount)", new ValueProvider() { @Override public double getValue(Statistics statistics) { return statistics.getNaturalIdQueryExecutionCount(); } } ) ); }
Source:
<code>private static String mapToDecimalOrBinary(Schema schema, SqoopOptions options) { boolean logicalTypesEnabled = options.getConf().getBoolean(ConfigurationConstants.PROP_ENABLE_PARQUET_LOGICAL_TYPE_DECIMAL, false); <START> if (logicalTypesEnabled && schema.getLogicalType() != null && schema.getLogicalType() instanceof Decimal) { <END> Decimal decimal = (Decimal) schema.getLogicalType(); int precision = Math.min(HiveDecimal.MAX_PRECISION, decimal.getPrecision()); if (precision < decimal.getPrecision()) { LOG.warn("Warning! Precision in the Hive table definition will be smaller than the actual precision of the column on storage! Hive may not be able to read data from this column."); } int scale = Math.min(HiveDecimal.MAX_SCALE, decimal.getScale()); if (scale < decimal.getScale()) { LOG.warn("Warning! Scale in the Hive table definition will be smaller than the actual scale of the column on storage! Hive may not be able to read data from this column."); } return String.format("%s (%d, %d)", HIVE_TYPE_DECIMAL, precision, scale); } else { return HIVE_TYPE_BINARY; } }</code><technical_language>null check is redundant here</technical_language>

Target:
private static String mapToDecimalOrBinary(Schema schema, SqoopOptions options) { boolean logicalTypesEnabled = options.getConf().getBoolean(ConfigurationConstants.PROP_ENABLE_PARQUET_LOGICAL_TYPE_DECIMAL, false); if (logicalTypesEnabled && schema.getLogicalType() instanceof Decimal) { Decimal decimal = (Decimal) schema.getLogicalType(); int precision = Math.min(HiveDecimal.MAX_PRECISION, decimal.getPrecision()); if (precision < decimal.getPrecision()) { LOG.warn("Warning! Precision in the Hive table definition will be smaller than the actual precision of the column on storage! Hive may not be able to read data from this column."); } int scale = Math.min(HiveDecimal.MAX_SCALE, decimal.getScale()); if (scale < decimal.getScale()) { LOG.warn("Warning! Scale in the Hive table definition will be smaller than the actual scale of the column on storage! Hive may not be able to read data from this column."); } return String.format("%s (%d, %d)", HIVE_TYPE_DECIMAL, precision, scale); } else { return HIVE_TYPE_BINARY; } }
Source:
<code>private AmazonEC2 reconnectToEc2() throws IOException { synchronized(this) { <START> if (AmazonEC2Cloud.isTestMode()) { <END> connection = mockConnect(createCredentialsProvider(), getEc2EndpointUrl(), privateKey); } else { connection = connect(createCredentialsProvider(), getEc2EndpointUrl()); } return connection; } }</code><technical_language>clean this test mode stuff, happy done in a separate PR pervasive in this plugin, fixing diff gigantic</technical_language>

Target:
private AmazonEC2 reconnectToEc2() throws IOException { synchronized(this) { connection = AmazonEC2Factory.getInstance().connect(createCredentialsProvider(), getEc2EndpointUrl()); return connection; } }
Source:
<code>public static String loadResourceToString( final String path ) { String resource = null; <START> try ( final InputStream stream = Thread.currentThread().getContextClassLoader() <END> .getResourceAsStream( path ) ) { resource = IOUtils.toString( stream ); } catch ( final IOException | NullPointerException e ) { logger.error( "Failed to load resource from " + path, e ); return null; } return resource; }</code><technical_language>Guava Resources of this already. update calls guava instead</technical_language>

Target:
public static String loadResourceToString( final String path ) { URL resource = Resources.getResource( path ); try { return Resources.toString( resource, StandardCharsets.UTF_8 ); } catch ( final IOException e ) { logger.error( "Failed to load resource from " + path, e ); return null; } }
Source:
<code>public void onCreate() { registerReceiver(mReceiver, new IntentFilter(Intent.ACTION_USER_PRESENT)); registerReceiver(mReceiver, new <START> IntentFilter(Intent.ACTION_USER_REMOVED)); <END> mStorageManager = StorageManager.from(this); synchronized (mBinder) { updateDisabledStateLocked(); mStorageManager.registerListener(mStorageEventListener); StorageVolume[] volumes = mStorageManager.getVolumeList(); mVolumes = volumes; for (int i = 0; i < volumes.length; i++) { String path = volumes[i].getPath(); String state = mStorageManager.getVolumeState(path); if (Environment.MEDIA_MOUNTED.equals(state)) { volumeMountedLocked(path); } } } if (mThreadLooper == null || mThread == null) { mThread = new HandlerThread("MtpStorageInfo", Process.THREAD_PRIORITY_BACKGROUND); mThread.start(); mThreadLooper = mThread.getLooper(); if (mThreadLooper != null) { mHandler = new MtpStorageInfoHandler(mThreadLooper); } } }</code><technical_language>please a single call registerReceiver (using IntentFilter matches multiple actions, IntentFilter.addAction)</technical_language>

Target:
public void onCreate() { IntentFilter intentFilter = new IntentFilter(); intentFilter.addAction(Intent.ACTION_USER_PRESENT); intentFilter.addAction(Intent.ACTION_USER_REMOVED); registerReceiver(mReceiver, intentFilter); mStorageManager = StorageManager.from(this); synchronized (mBinder) { updateDisabledStateLocked(); mStorageManager.registerListener(mStorageEventListener); StorageVolume[] volumes = mStorageManager.getVolumeList(); mVolumes = volumes; for (int i = 0; i < volumes.length; i++) { String path = volumes[i].getPath(); String state = mStorageManager.getVolumeState(path); if (Environment.MEDIA_MOUNTED.equals(state)) { volumeMountedLocked(path); } } } mThread = new HandlerThread("MtpStorageInfo", Process.THREAD_PRIORITY_BACKGROUND); mThread.start(); mHandler = new MtpStorageInfoHandler(mThread.getLooper()); }
Source:
<code>private static Talk talk(final Issue issue, final String tag, final File dir) throws IOException { final Talk talk = new Talk.InFile(); final String identifier = "id"; talk.modify( <START> new Directives().xpath("/talk") <END> .attr("later", Boolean.TRUE.toString()) .add("daemon").attr(identifier, "123") .add("title").set("merge").up() .add("script").set("empty").up() .add("code").set("-7").up() .add("dir").set(dir.getAbsolutePath()).up().up() .add("wire") .add("href").set("http://test2").up() .add("github-repo").set(issue.repo().coordinates().toString()) .up() .add("github-issue").set(Integer.toString(issue.number())).up() .up() .add("request").attr(identifier, "abcdef") .add("type").set("release").up() .add("success").set(Boolean.TRUE.toString()).up() .add("args").add("arg").attr("name", "tag").set(tag) ); return talk; }</code><technical_language>ahr ... forgot xsd ..</technical_language>

Target:
private static Talk talk(final Issue issue, final String tag, final File dir) throws IOException { final Talk talk = new Talk.InFile(); final String identifier = "id"; talk.modify( new Directives().xpath("/talk") .add("daemon").attr(identifier, "123") .add("title").set("merge").up() .add("script").set("empty").up() .add("dir").set(dir.getAbsolutePath()).up().up() .add("wire") .add("href").set("http://test2").up() .add("github-repo").set(issue.repo().coordinates().toString()) .up() .add("github-issue").set(Integer.toString(issue.number())).up() .up() .add("request").attr(identifier, "abcdef") .add("type").set("release").up() .add("success").set(Boolean.TRUE.toString()).up() .add("args").add("arg").attr("name", "tag").set(tag) ); return talk; }
Source:
<code>public List<InstanceConfig> getInstanceConfigs() { <START> if(_instanceConfigs.isEmpty()){ <END> _instanceConfigs = HelixHelper.getInstanceConfigs(_helixManager); } return _instanceConfigs; }</code><technical_language>set instanceConfig in get call</technical_language>

Target:
public synchronized List<InstanceConfig> getInstanceConfigs() { if (_instanceConfigs.isEmpty() || !_listenerInitiated) { return HelixHelper.getInstanceConfigs(_helixManager); } return _instanceConfigs; }
Source:
<code>public void switchToUser(UserAccount user, int userSwitchType, Bundle extras) { if (user == null || !doesUserAccountExist(user)) { switchToNewUser(); return; } final UserAccount curUser = getCurrentUser(); if (user.equals(curUser)) { return; } <START> clearCachedCurrentUser(curUser); <END> final ClientManager cm = new ClientManager(context, accountType, SalesforceSDKManager.getInstance().getLoginOptions(), true); final Account account = cm.getAccountByName(user.getAccountName()); storeCurrentUserInfo(user.getUserId(), user.getOrgId()); cm.peekRestClient(account); sendUserSwitchIntent(userSwitchType, extras); }</code><technical_language>This handles switch existing user use-case. need call this in switch new user use-case. I a place handle this in public void storeCurrentUserInfo(String userId, String orgId) in UserAccountManager. change current user ends there, including new user current user. This call moved handle cases</technical_language>

Target:
public void switchToUser(UserAccount user, int userSwitchType, Bundle extras) { if (user == null || !doesUserAccountExist(user)) { switchToNewUser(); return; } final UserAccount curUser = getCurrentUser(); if (user.equals(curUser)) { return; } final ClientManager cm = new ClientManager(context, accountType, SalesforceSDKManager.getInstance().getLoginOptions(), true); final Account account = cm.getAccountByName(user.getAccountName()); storeCurrentUserInfo(user.getUserId(), user.getOrgId()); cm.peekRestClient(account); sendUserSwitchIntent(userSwitchType, extras); }
Source:
<code><START> public String readMessage(Topic topic, int partition, long offset) { <END> byte[] bytes = readMessage(topic.getQualifiedName(), partition, offset); if (topic.getContentType() == Topic.ContentType.AVRO) { bytes = convertAvroToJson(topic.getMessageSchema(), bytes); } return new String(bytes, Charset.forName("UTF-8")); }</code><technical_language>return bytes do conversion later</technical_language>

Target:
public String readMessage(Topic topic, int partition, long offset) { byte[] bytes = kafkaRawMessageReader.readMessage(topic.getQualifiedName(), partition, offset); if (topic.getContentType() == Topic.ContentType.AVRO) { bytes = convertAvroToJson(topic.getMessageSchema(), bytes); } return new String(bytes, Charset.forName("UTF-8")); }
Source:
<code>public void getPoints( final GeoCluster geoCluster, final AsyncCallback<BackendlessCollection<GeoPoint>> responder ) { try { CollectionAdaptingPolicy<GeoPoint> adaptingPolicy = new CollectionAdaptingPolicy<GeoPoint>(); Invoker.invokeAsync( GEO_MANAGER_SERVER_ALIAS, "loadGeoPoints", new Object[] { Backendless.getApplicationId(), Backendless.getVersion(), geoCluster.getObjectId(), geoCluster.getGeoQuery() }, new AsyncCallback<BackendlessCollection<GeoPoint>>() { @Override public void handleResponse( BackendlessCollection<GeoPoint> response ) { response.setQuery( geoCluster.getGeoQuery() ); response.setType( GeoPoint.class ); if( responder != null ) responder.handleResponse( response ); } @Override public void handleFault( BackendlessFault fault ) { <START> responder.handleFault( fault ); <END> } }, new AdaptingResponder<GeoPoint>( GeoPoint.class, adaptingPolicy ) ); } catch( Throwable e ) { if( responder != null ) responder.handleFault( new BackendlessFault( e ) ); } }</code><technical_language>check if responder is null</technical_language>

Target:
public void getPoints( final GeoCluster geoCluster, final AsyncCallback<BackendlessCollection<GeoPoint>> responder ) { try { CollectionAdaptingPolicy<GeoPoint> adaptingPolicy = new CollectionAdaptingPolicy<GeoPoint>(); Invoker.invokeAsync( GEO_MANAGER_SERVER_ALIAS, "loadGeoPoints", new Object[] { Backendless.getApplicationId(), Backendless.getVersion(), geoCluster.getObjectId(), geoCluster.getGeoQuery() }, new AsyncCallback<BackendlessCollection<GeoPoint>>() { @Override public void handleResponse( BackendlessCollection<GeoPoint> response ) { response.setQuery( geoCluster.getGeoQuery() ); response.setType( GeoPoint.class ); if( responder != null ) responder.handleResponse( response ); } @Override public void handleFault( BackendlessFault fault ) { if( responder != null ) responder.handleFault( fault ); } }, new AdaptingResponder<GeoPoint>( GeoPoint.class, adaptingPolicy ) ); } catch( Throwable e ) { if( responder != null ) responder.handleFault( new BackendlessFault( e ) ); } }
Source:
<code>public Object wrap(final ProceedingJoinPoint point) throws Throwable { final int threadCount = ((MethodSignature) point.getSignature()) .getMethod().getAnnotation(Parallel.class).threads(); final Collection<Callable<Throwable>> callables = new ArrayList<Callable<Throwable>>(); final CountDownLatch start = new CountDownLatch(1); for (int thread = 0; thread < threadCount; ++thread) { callables.add(this.callable(point, start)); } final ExecutorService executor = Executors <START> .newFixedThreadPool(threadCount); <END> final List<Future<Throwable>> futures = new ArrayList<Future<Throwable>>(); for (Callable<Throwable> callable : callables) { futures.add(executor.submit(callable)); } start.countDown(); for (Future<Throwable> future : futures) { final Throwable exception = future.get(); if (exception != null) { executor.shutdownNow(); throw exception; } } return null; }</code><technical_language>VerboseThreads for a factory</technical_language>

Target:
public Object wrap(final ProceedingJoinPoint point) throws ParallelException { final int total = ((MethodSignature) point.getSignature()) .getMethod().getAnnotation(Parallel.class).threads(); final Collection<Callable<Throwable>> callables = new ArrayList<Callable<Throwable>>(total); final CountDownLatch start = new CountDownLatch(1); for (int thread = 0; thread < total; ++thread) { callables.add(this.callable(point, start)); } final ExecutorService executor = Executors .newFixedThreadPool(total, new VerboseThreads()); final List<Future<Throwable>> futures = new ArrayList<Future<Throwable>>(total); for (Callable<Throwable> callable : callables) { futures.add(executor.submit(callable)); } start.countDown(); final Collection<Throwable> failures = new LinkedList<Throwable>(); for (Future<Throwable> future : futures) { final Throwable exception; try { exception = future.get(); if (exception != null) { failures.add(exception); } } catch (InterruptedException ex) { failures.add(ex); } catch (ExecutionException ex) { failures.add(ex); } } if (!failures.isEmpty()) { throw this.exceptions(failures); } return null; }
Source:
<code>public void theGetActualMeterReadsRequestIsReceived(final Map<String, String> settings) throws Throwable { <START> final ActualMeterReadsRequest request = ActualMeterReadsRequestFactory.forDevice(); <END> final ActualMeterReadsAsyncResponse asyncResponse = this.requestClient.doRequest(request); assertNotNull("asyncRespone should not be null", asyncResponse); ScenarioContext.current().put(PlatformKeys.KEY_CORRELATION_UID, asyncResponse.getCorrelationUid()); }</code><technical_language>Factory method forDevice() a bit odd parameters. DeviceIdentification is included in scenario step settings more obvious get there, a method present in other factories (fromParameterMap(final Map<String, String>)). is appears DeviceIdentification in settings, including identification of unrelated device, get confusing</technical_language>

Target:
public void theGetActualMeterReadsRequestIsReceived(final Map<String, String> settings) throws Throwable { final ActualMeterReadsRequest request = ActualMeterReadsRequestFactory.fromParameterMap(settings); final ActualMeterReadsAsyncResponse asyncResponse = this.requestClient.doRequest(request); assertNotNull("asyncRespone should not be null", asyncResponse); ScenarioContext.current().put(PlatformKeys.KEY_CORRELATION_UID, asyncResponse.getCorrelationUid()); }
Source:
<code><START> ResultRowImpl( ) <END> { this( new HashMap<>() ); }</code><technical_language>Formatting</technical_language>

Target:
public ResultRowImpl() { this( new HashMap<>() ); }
Source:
<code>private void discoverFilter(final FunctionCall filter, final List<QueryModelNode> unmatched) { try { filter.visit(new FilterVisitor()); <START> } catch (final Exception e) { <END> e.printStackTrace(); } }</code><technical_language>static</technical_language>

Target:
private void discoverFilter(final FunctionCall filter, final List<QueryModelNode> unmatched) { try { filter.visit(new FilterVisitor()); } catch (final Exception e) { LOG.error("Failed to match the filter object.", e); } }
Source:
<code>public void saveStructureQuotaStructure(final HttpServerRequest request) { <START> request.bodyHandler(new Handler<Buffer>() { <END> @Override public void handle(Buffer event) { try { String obj = XSSUtils.stripXSS(event.toString("UTF-8")); JsonObject jsonStructure = new JsonObject(obj); quotaService.updateQuotaForStructure(jsonStructure, new Handler<Either<String,JsonObject>>() { public void handle(Either<String, JsonObject> result) { if (result.isLeft()) { log.error("Error saving structure quota."); } } }); } catch (Exception e) { log.error("Failed to save Structure Quota"); } } }); }</code><technical_language><LINK_0></technical_language>

Target:
public void saveStructureQuotaStructure(final HttpServerRequest request) { bodyToJson(request, new Handler<JsonObject>() { @Override public void handle(final JsonObject jsonStructure) { quotaService.updateQuotaForStructure(jsonStructure, new Handler<Either<String,JsonObject>>() { public void handle(Either<String, JsonObject> result) { if (result.isRight()) { ok(request); } else { log.error("Error saving structure quota."); badRequest(request, result.left().getValue()); } } }); } }); }
Source:
<code>public void parse(String status) throws PSQLException { if (!Parser.isDigitAt(status, status.length() - 1)) { set(0, 0); } long oid = 0; <START> long count = 0; <END> try { int lastSpace = status.lastIndexOf(' '); if (Parser.isDigitAt(status, lastSpace + 1)) { count = Parser.parseLong(status, lastSpace + 1, status.length()); if (Parser.isDigitAt(status, lastSpace - 1)) { int penultimateSpace = status.lastIndexOf(' ', lastSpace - 1); if (Parser.isDigitAt(status, penultimateSpace + 1)) { oid = Parser.parseLong(status, penultimateSpace + 1, lastSpace); } } } } catch (NumberFormatException e) { throw new PSQLException( GT.tr("Unable to parse the count in command completion tag: {0}.", status), PSQLState.CONNECTION_FAILURE, e); } set(oid, count); }</code><technical_language>rows a name for this variable</technical_language>

Target:
public void parse(String status) throws PSQLException { if (!Parser.isDigitAt(status, status.length() - 1)) { set(0, 0); return; } long oid = 0; long rows = 0; try { int lastSpace = status.lastIndexOf(' '); if (Parser.isDigitAt(status, lastSpace + 1)) { rows = Parser.parseLong(status, lastSpace + 1, status.length()); if (Parser.isDigitAt(status, lastSpace - 1)) { int penultimateSpace = status.lastIndexOf(' ', lastSpace - 1); if (Parser.isDigitAt(status, penultimateSpace + 1)) { oid = Parser.parseLong(status, penultimateSpace + 1, lastSpace); } } } } catch (NumberFormatException e) { throw new PSQLException( GT.tr("Unable to parse the count in command completion tag: {0}.", status), PSQLState.CONNECTION_FAILURE, e); } set(oid, rows); }