auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public PicoNetwork(SocketChannel sc, boolean isSecondary) { m_sc = sc; InetSocketAddress remoteAddress = (InetSocketAddress)sc.socket().getRemoteSocketAddress(); m_remoteSocketAddress = remoteAddress; m_remoteSocketAddressString = remoteAddress.getAddress().getHostAddress(); m_remoteHostAndAddressAndPort = "/" + m_remoteSocketAddressString + ":" + m_remoteSocketAddress.getPort(); String remoteHost = ReverseDNSCache.hostnameOrAddress(m_remoteSocketAddress.getAddress()); if (!remoteHost.equals(m_remoteSocketAddress.getAddress().getHostAddress())) { m_remoteHostname = remoteHost; m_remoteHostAndAddressAndPort = remoteHost + m_remoteHostAndAddressAndPort; } if (isSecondary) { <START> m_toString = super.toString() + ":" + m_remoteHostAndAddressAndPort + "(s)"; <END> } else { m_toString = super.toString() + ":" + m_remoteHostAndAddressAndPort; } m_thread = new Thread(this, "Pico Network - " + m_toString); m_thread.setDaemon(true); try { sc.configureBlocking(false); sc.socket().setTcpNoDelay(true); m_selector = Selector.open(); m_interestOps = SelectionKey.OP_READ; m_key = m_sc.register(m_selector, m_interestOps); } catch (IOException ex) { m_logger.fatal(null, ex); throw new RuntimeException(ex); } }</code><technical_language>change m_toString a name more meaningful</technical_language>

Target:
public PicoNetwork(SocketChannel sc, boolean isSecondary) { m_sc = sc; InetSocketAddress remoteAddress = (InetSocketAddress)sc.socket().getRemoteSocketAddress(); m_remoteSocketAddress = remoteAddress; m_remoteSocketAddressString = remoteAddress.getAddress().getHostAddress(); m_remoteHostAndAddressAndPort = "/" + m_remoteSocketAddressString + ":" + m_remoteSocketAddress.getPort(); String remoteHost = ReverseDNSCache.hostnameOrAddress(m_remoteSocketAddress.getAddress()); if (!remoteHost.equals(m_remoteSocketAddress.getAddress().getHostAddress())) { m_remoteHostname = remoteHost; m_remoteHostAndAddressAndPort = remoteHost + m_remoteHostAndAddressAndPort; } if (isSecondary) { m_threadName = super.toString() + ":" + m_remoteHostAndAddressAndPort + "(s)"; } else { m_threadName = super.toString() + ":" + m_remoteHostAndAddressAndPort; } m_thread = new Thread(this, "Pico Network - " + m_threadName); m_thread.setDaemon(true); try { sc.configureBlocking(false); sc.socket().setTcpNoDelay(true); m_selector = Selector.open(); m_interestOps = SelectionKey.OP_READ; m_key = m_sc.register(m_selector, m_interestOps); } catch (IOException ex) { m_logger.fatal(null, ex); throw new RuntimeException(ex); } }
Source:
<code>public void setup() { WrappedRoaringBitmap mutable = new WrappedRoaringBitmap(); for (int i = 0; i < numRows; i++) { <START> if (ThreadLocalRandom.current().nextDouble(0.0, 1.0) > 0.7) { <END> mutable.add(i); } } bitmap = mutable.toImmutableBitmap(); }</code><technical_language>generate N random bitmaps a fixed seed. way, test is deterministic (but tests decent variety due N factor)</technical_language>

Target:
public void setup() { bitmaps = new ImmutableBitmap[numBitmaps]; for (int bitmap = 0; bitmap < numBitmaps; bitmap++) { WrappedRoaringBitmap mutable = new WrappedRoaringBitmap(); for (int i = 0; i < numRows; i++) { if (rando.nextDouble() > 0.2) { mutable.add(i); } } bitmaps[bitmap] = mutable.toImmutableBitmap(); } }
Source:
<code>public void copyFolderRecursive(Folder destinationFolder, Folder toCopyFolder) { <START> Map<String, Object> folderProperties = new HashMap<String, Object>(); <END> folderProperties.put(PropertyIds.NAME, toCopyFolder.getName()); folderProperties.put(PropertyIds.OBJECT_TYPE_ID, toCopyFolder.getBaseTypeId().value()); Folder newFolder = destinationFolder.createFolder(folderProperties); copyChildren(newFolder, toCopyFolder); }</code><technical_language>targetting Java 8+, diamond new HashMap<>()</technical_language>

Target:
private Map<String, String> copyFolderRecursive(Folder destinationFolder, Folder toCopyFolder) { Map<String, Object> folderProperties = new HashMap<>(); folderProperties.put(PropertyIds.NAME, toCopyFolder.getName()); folderProperties.put(PropertyIds.OBJECT_TYPE_ID, toCopyFolder.getBaseTypeId().value()); Map<String, String> folders = new HashMap<>(); Folder newFolder = destinationFolder.createFolder(folderProperties); folders.put(toCopyFolder.getId(), newFolder.getId()); copyChildren(newFolder, toCopyFolder); return folders; }
Source:
<code>public void testCallStackRequirements() { LttngUstCallStackAnalysisRequirement req = new LttngUstCallStackAnalysisRequirement(ILttngUstEventLayout.DEFAULT_LAYOUT); for (TestData item: TestData.values()) { <START> assertEquals(item.isValid(), req.test(item.getTrace())); <END> } }</code><technical_language>change to: assertEquals(item.name(), item.isValid(), req.test(item.getTrace())); In case fails in loop failed</technical_language>

Target:
public void testCallStackRequirements() { LttngUstCallStackAnalysisRequirement req = new LttngUstCallStackAnalysisRequirement(ILttngUstEventLayout.DEFAULT_LAYOUT); for (TestData item: TestData.values()) { assertEquals(item.name(), item.isValid(), req.test(item.getTrace())); } }
Source:
<code>private AbstractDNode handleListAttributeChangeOnMapping(final AbstractDNode node, final ContainerMapping containerMapping, final DragAndDropTarget viewContainer, IProgressMonitor monitor) { final boolean isListContainer = new ContainerMappingQuery(containerMapping).isListContainer(); if ((node instanceof DNodeContainer && isListContainer) || (node instanceof DNodeList && !isListContainer)) { final AbstractDNodeCandidate newCandidate = new AbstractDNodeCandidate(containerMapping, node.getTarget(), viewContainer); final Set<AbstractDNodeCandidate> newCandidates = new HashSet<AbstractDNodeCandidate>(1); newCandidates.add(newCandidate); List<AbstractDNode> newContents = createNewContent(newCandidates, true, viewContainer, containerMapping, false, monitor); <START> SiriusDiagramHelper.removeNodeFromContainer(viewContainer, <END> false, node); if (!newContents.isEmpty()) { final AbstractDNode newNode = newContents.get(0); convertGmfModelTypes(node, newNode); return newNode; } } return node; }</code><technical_language>happen if newContents.isEmpty()==true? node is removed container is returned handleListAttributeChangeOnMapping removed if createNewContent return empty list</technical_language>

Target:
private AbstractDNode handleListAttributeChangeOnMapping(final AbstractDNode node, final ContainerMapping containerMapping, final DragAndDropTarget viewContainer, IProgressMonitor monitor) { final boolean isListContainer = new ContainerMappingQuery(containerMapping).isListContainer(); if ((node instanceof DNodeContainer && isListContainer) || (node instanceof DNodeList && !isListContainer)) { final AbstractDNodeCandidate newCandidate = new AbstractDNodeCandidate(containerMapping, node.getTarget(), viewContainer); final Set<AbstractDNodeCandidate> newCandidates = new HashSet<AbstractDNodeCandidate>(1); newCandidates.add(newCandidate); List<AbstractDNode> newContents = createNewContent(newCandidates, true, viewContainer, containerMapping, false, monitor); if (!newContents.isEmpty()) { SiriusDiagramHelper.removeNodeFromContainer(viewContainer, false, node); final AbstractDNode newNode = newContents.get(0); convertGmfModelTypes(node, newNode); return newNode; } } return node; }
Source:
<code>private <R> R getUpcallResultInner(long timestamp, Object[] conflictObject) { if (TransactionalContext.isInTransaction()) { try { return (R) TransactionalContext.getCurrentContext() .getUpcallResult(this, timestamp, conflictObject); } catch (Exception e) { log.warn("UpcallResult[{}] Exception: {}", this, e); this.abortTransaction(e); } } if (underlyingObject.getUpcallResults().containsKey(timestamp)) { log.trace("Upcall[{}] Direct", this, timestamp); R ret = (R) underlyingObject.getUpcallResults().get(timestamp); underlyingObject.getUpcallResults().remove(timestamp); return ret == VersionLockedObject.NullValue.NULL_VALUE ? null : ret; } return underlyingObject.update(o -> { for (int x = 0; x < rt.getParameters().getTrimRetry(); x++) { try { o.syncObjectUnsafe(timestamp); if (o.getUpcallResults().containsKey(timestamp)) { log.trace("Upcall[{}] Sync'd", this, timestamp); R ret = (R) o.getUpcallResults().get(timestamp); o.getUpcallResults().remove(timestamp); return ret == VersionLockedObject.NullValue.NULL_VALUE ? null : ret; } throw new RuntimeException("Attempted to get the result " + "of an upcall@" + timestamp + " but we are @" + underlyingObject.getVersionUnsafe() + " and we don't have a copy"); } catch (TrimmedException ex) { log.info("getUpcallResultInner: Encountered trimmed address space " + "while accessing version of stream on attempt {}", timestamp, getStreamID(), x); <START> underlyingObject.update(obj -> { obj.resetUnsafe(); return null; }); <END> } } throw new TrimmedUpcallException(timestamp); }); }</code><technical_language>reset update() method, StampedLock is reentrant, this deadlock</technical_language>

Target:
private <R> R getUpcallResultInner(long timestamp, Object[] conflictObject) { if (TransactionalContext.isInTransaction()) { try { return (R) TransactionalContext.getCurrentContext() .getUpcallResult(this, timestamp, conflictObject); } catch (Exception e) { log.warn("UpcallResult[{}] Exception: {}", this, e); this.abortTransaction(e); } } if (underlyingObject.getUpcallResults().containsKey(timestamp)) { log.trace("Upcall[{}] Direct", this, timestamp); R ret = (R) underlyingObject.getUpcallResults().get(timestamp); underlyingObject.getUpcallResults().remove(timestamp); return ret == VersionLockedObject.NullValue.NULL_VALUE ? null : ret; } return underlyingObject.update(o -> { for (int x = 0; x < rt.getParameters().getTrimRetry(); x++) { try { o.syncObjectUnsafe(timestamp); if (o.getUpcallResults().containsKey(timestamp)) { log.trace("Upcall[{}] Sync'd", this, timestamp); R ret = (R) o.getUpcallResults().get(timestamp); o.getUpcallResults().remove(timestamp); return ret == VersionLockedObject.NullValue.NULL_VALUE ? null : ret; } throw new RuntimeException("Attempted to get the result " + "of an upcall@" + timestamp + " but we are @" + underlyingObject.getVersionUnsafe() + " and we don't have a copy"); } catch (TrimmedException ex) { log.info("getUpcallResultInner: Encountered trimmed address space " + "while accessing version of stream on attempt {}", timestamp, getStreamID(), x); o.resetUnsafe(); } } throw new TrimmedUpcallException(timestamp); }); }
Source:
<code><START> static ContentRange parse(String headerValue) { <END> if (headerValue != null && headerValue.length() >= MINIMUM_LENGTH) { String[] values = headerValue.substring(6).split("/"); if (values.length != 2) return null; int offset = -1; int last = -1; int total = -1; String tail = values[1]; if (!"*".equals(tail)) total = Integer.parseInt(tail); String head = values[0]; if (!"*".equals(head)) { String[] range = head.split("-"); offset = Integer.parseInt(range[0]); last = Integer.parseInt(range[1]); } return new ContentRange(offset, last, total); } return null; }</code><technical_language>considered Regex groups parse string. This prevent some method calls shorter. Especially pattern is - values differ</technical_language>

Target:
static ContentRange parse(String headerValue) { if (headerValue != null) { Matcher matcher = HEADER_PATTERN.matcher(headerValue); if (matcher.find()) { int offset = -1; int last = -1; int total = -1; String head = matcher.group(1); if (!"*".equals(head)) { offset = Integer.parseInt(matcher.group(2)); last = Integer.parseInt(matcher.group(3)); } String tail = matcher.group(4); if (!"*".equals(tail)) total = Integer.parseInt(tail); return new ContentRange(offset, last, total); } } return null; }
Source:
<code>public void onWebGuiAvailable() { mAvailableCount.set(0); new GetTask() { @Override protected void onPostExecute(String s) { if (s == null) { <START> Log.w(TAG, "Empty JSON string when retrieving version information"); <END> return; } try { JSONObject json = new JSONObject(s); mVersion = json.getString("version"); Log.i(TAG, "Syncthing version is " + mVersion); tryIsAvailable(); } catch (JSONException e) { Log.w(TAG, "Failed to parse config", e); } } }.execute(mUrl, GetTask.URI_VERSION, mApiKey); new GetTask() { @Override protected void onPostExecute(String config) { if (s == null) { Log.w(TAG, "Empty JSON string when retrieving config information"); return; } try { mConfig = new JSONObject(config); tryIsAvailable(); } catch (JSONException e) { Log.w(TAG, "Failed to parse config", e); } } }.execute(mUrl, GetTask.URI_CONFIG, mApiKey); getSystemInfo(new OnReceiveSystemInfoListener() { @Override public void onReceiveSystemInfo(SystemInfo info) { mLocalDeviceId = info.myID; tryIsAvailable(); } }); }</code><technical_language>This postpones crash. soon is accessed, NPE again</technical_language>

Target:
public void onWebGuiAvailable() { mAvailableCount.set(0); new GetTask() { @Override protected void onPostExecute(String s) { try { JSONObject json = new JSONObject(s); mVersion = json.getString("version"); Log.i(TAG, "Syncthing version is " + mVersion); tryIsAvailable(); } catch (JSONException e) { Log.w(TAG, "Failed to parse config", e); } } }.execute(mUrl, GetTask.URI_VERSION, mApiKey); new GetTask() { @Override protected void onPostExecute(String config) { try { mConfig = new JSONObject(config); tryIsAvailable(); } catch (JSONException e) { Log.w(TAG, "Failed to parse config", e); } } }.execute(mUrl, GetTask.URI_CONFIG, mApiKey); getSystemInfo(new OnReceiveSystemInfoListener() { @Override public void onReceiveSystemInfo(SystemInfo info) { mLocalDeviceId = info.myID; tryIsAvailable(); } }); }
Source:
<code>public void testValidateInvalidLocationId() { this.errors = new MapBindingResult(new HashMap<String, String>(), LotDto.class.getName()); <START> final Integer locationId = 6000; <END> this.lotGeneratorInputDto.setGid(1); this.lotGeneratorInputDto.setLocationId(locationId); this.lotGeneratorInputDto.setGenerateStock(false); this.lotGeneratorInputDto.setScaleId(8264); this.lotGeneratorInputDto.setStockId("ABCD"); this.lotGeneratorInputDto.setComments("Comments"); final VariableFilter variableFilter = new VariableFilter(); variableFilter.addPropertyId(TermId.INVENTORY_AMOUNT_PROPERTY.getId()); Mockito.when(this.locationDataManager.getLocationByID(locationId)).thenReturn(null); this.locationValidator.validateSeedLocationId(this.errors, locationId); Assert.assertTrue(this.errors.getAllErrors().size() == 1); final ObjectError objectError = this.errors.getAllErrors().get(0); assertThat(Arrays.asList(objectError.getCodes()), CoreMatchers.hasItem("location.invalid")); }</code><technical_language>@vmaletta 6000 a constant in tests</technical_language>

Target:
public void testValidateInvalidLocationId() { this.errors = new MapBindingResult(new HashMap<String, String>(), LotDto.class.getName()); this.lotGeneratorInputDto.setGid(GID); this.lotGeneratorInputDto.setLocationId(LOCATION_ID); this.lotGeneratorInputDto.setGenerateStock(false); this.lotGeneratorInputDto.setScaleId(SCALE_ID); this.lotGeneratorInputDto.setStockId(STOCK_ID); this.lotGeneratorInputDto.setComments(COMMENTS); final VariableFilter variableFilter = new VariableFilter(); variableFilter.addPropertyId(TermId.INVENTORY_AMOUNT_PROPERTY.getId()); Mockito.when(this.locationDataManager.getLocationByID(LOCATION_ID)).thenReturn(null); this.locationValidator.validateSeedLocationId(this.errors, LOCATION_ID); Assert.assertEquals(this.errors.getAllErrors().size(), 1); final ObjectError objectError = this.errors.getAllErrors().get(0); assertThat(Arrays.asList(objectError.getCodes()), CoreMatchers.hasItem("location.invalid")); }
Source:
<code>protected abstract DfsPackDescription newPack(PackSource source) throws IOException; protected void commitPack(Collection<DfsPackDescription> desc, Collection<DfsPackDescription> replaces) throws IOException { commitPackImpl(desc, replaces); if (replaces != <START> null) { <END> DfsBlockCache cache = DfsBlockCache.getInstance(); for (DfsPackDescription replace : replaces) { DfsPackFile packFile = cache.getOrCreate(replace, null); packFile.close(); } } getRepository().fireEvent(new DfsPacksChangedEvent()); }</code><technical_language>Add && !replaces.isEmpty() avoid potentially cache instance unnecessarily next line</technical_language>

Target:
protected abstract DfsPackDescription newPack(PackSource source) throws IOException; protected void commitPack(Collection<DfsPackDescription> desc, Collection<DfsPackDescription> replaces) throws IOException { commitPackImpl(desc, replaces); if (replaces != null && !replaces.isEmpty()) { DfsBlockCache cache = DfsBlockCache.getInstance(); for (DfsPackDescription replace : replaces) { DfsPackFile packFile = cache.getOrCreate(replace, null); packFile.close(); } } getRepository().fireEvent(new DfsPacksChangedEvent()); }
Source:
<code>public QueryResponse process(QueryResponse input) throws PluginExecutionException, StopProcessingException { for (Result result : input.getResults()) { Metacard metacard = result.getMetacard(); byte[] thumbnailBytes = metacard.getThumbnail(); if (thumbnailBytes == null) continue; try ( ByteArrayInputStream original = new ByteArrayInputStream(thumbnailBytes); ByteArrayOutputStream converted = new ByteArrayOutputStream() ) { IISRandomAccessIO in = new IISRandomAccessIO( ImageIO.createImageInputStream(original)); if (in.readInt() != OTHER_JP2_SIGNATURE || in.readInt() != JP2_SIGNATURE_BOX || in.readInt() != OFFICIAL_JP2_SIGNATURE) { in.seek(0); if (in.readShort() != START_OF_CODESTREAM_MARKER) continue; } original.reset(); BufferedImage thumbnail = ImageIO.read(original); <START> ImageIO.write(thumbnail, "jpeg", converted); <END> metacard.setAttribute( new AttributeImpl(Metacard.THUMBNAIL, converted.toByteArray())); } catch (IOException e) { throw new PluginExecutionException(e); } } return input; }</code><technical_language>check thumbnail is null write it</technical_language>

Target:
public QueryResponse process(QueryResponse input) throws PluginExecutionException, StopProcessingException { for (Result result : input.getResults()) { Metacard metacard = result.getMetacard(); byte[] thumbnailBytes = metacard.getThumbnail(); if (thumbnailBytes == null) continue; try ( ByteArrayInputStream original = new ByteArrayInputStream(thumbnailBytes); ByteArrayOutputStream converted = new ByteArrayOutputStream() ) { IISRandomAccessIO in = new IISRandomAccessIO( ImageIO.createImageInputStream(original)); if (in.readInt() != OTHER_JP2_SIGNATURE || in.readInt() != JP2_SIGNATURE_BOX || in.readInt() != OFFICIAL_JP2_SIGNATURE) { in.seek(0); if (in.readShort() != START_OF_CODESTREAM_MARKER) continue; } original.reset(); BufferedImage thumbnail = ImageIO.read(original); if (thumbnail == null) continue; ImageIO.write(thumbnail, "jpeg", converted); metacard.setAttribute( new AttributeImpl(Metacard.THUMBNAIL, converted.toByteArray())); } catch (IOException e) { throw new PluginExecutionException(e); } } return input; }
Source:
<code>public void testGetTokenNames() { assertEquals("Unexpected token name", <START> "HTML_COMMENT", JavadocUtils.getTokenName(20081)); <END> }</code><technical_language>change integer of tokens. seriously damage compatibility. Please explain this change</technical_language>

Target:
public void testGetTokenNames() { assertEquals("Unexpected token name", "OPTGROUP", JavadocUtils.getTokenName(10082)); }
Source:
<code><START> public boolean restartTopology() { <END> boolean result = true; for (HeronWorker worker : multiKeyWorkerMap.getHeronWorkers()) { result &= restartWorker(worker.workerId); } return result; }</code><technical_language>boolean a substitute for exception here? If so, throw exception if expected execute fail do so</technical_language>

Target:
public void restartTopology() throws ContainerAllocationException { for (HeronWorker worker : multiKeyWorkerMap.getHeronWorkers()) { restartWorker(worker.workerId); } }
Source:
<code>protected void fullBackupDatabase(final String dbURL, final String iPath, final ODatabaseDocumentInternal db) throws IOException { OLogManager.instance().info(this, "AutomaticBackup: executing full backup of database '%s' to %s", dbURL, iPath); final String tempPath = iPath + ".tmp"; <START> final FileOutputStream fileOutputStream = new FileOutputStream(tempPath); <END> try { db.backup(fileOutputStream, null, null, new OCommandOutputListener() { @Override public void onMessage(String iText) { OLogManager.instance().info(this, iText); } }, compressionLevel, bufferSize); } finally { fileOutputStream.close(); } Files.move(Paths.get(tempPath), Paths.get(iPath)); }</code><technical_language>do check presence of temp file file system</technical_language>

Target:
protected void fullBackupDatabase(final String dbURL, final String iPath, final ODatabaseDocumentInternal db) throws IOException { OLogManager.instance().info(this, "AutomaticBackup: executing full backup of database '%s' to %s", dbURL, iPath); final Path filePath = Paths.get(iPath); OFileUtils.prepareForFileCreationOrReplacement(filePath, this, "backing up"); final String tempFileName = iPath + ".tmp"; final Path tempFilePath = Paths.get(tempFileName); OFileUtils.prepareForFileCreationOrReplacement(tempFilePath, this, "backing up"); try (FileOutputStream fileOutputStream = new FileOutputStream(tempFileName)) { db.backup(fileOutputStream, null, null, new OCommandOutputListener() { @Override public void onMessage(String iText) { OLogManager.instance().info(this, iText); } }, compressionLevel, bufferSize); } Files.move(tempFilePath, filePath); }
Source:
<code>private static CommandParameters getCommandParameters(Object cmd) { CommandParameters cmdParams = new CommandParameters(); Class clz = cmd.getClass(); while (clz != null) { for (Field field : clz.getDeclaredFields()) { Parameters fieldAnnotation = field.getAnnotation(Parameters.class); if (fieldAnnotation != null) { try { cmdParams.addParameters(fieldAnnotation, (Parameter[]) field.get(cmd)); } catch (IllegalAccessException e) { log.warn("Unable to retrieve parameters for " + clz.getName() + "." + field.getName()); } } } clz = clz.getSuperclass(); } return cmdParams; <START> } <END></code><technical_language>Hmmm... I do need CommandParameters class... is important. A Map<Boolean, List<Parameter>> returned this function... map.put(false, new ArrayList<Parameters>()); map.put(frue, new ArrayList<Parameters>()); while() { map.get(fieldAnnotation.optional()).addAll(Arrays.asList(parameters)); } I writing english in code... I find more confusing</technical_language>

Target:
private static Map<Boolean, List<Parameter>> getCommandParameters(Object cmd) { Map<Boolean, List<Parameter>> cmdParams = new HashMap<Boolean, List<Parameter>>(); cmdParams.put(false, new ArrayList<Parameter>()); cmdParams.put(true, new ArrayList<Parameter>()); Class clz = cmd.getClass(); while (clz != null) { for (Field field : clz.getDeclaredFields()) { Parameters fieldAnnotation = field.getAnnotation(Parameters.class); if (fieldAnnotation != null) { try { cmdParams.get(fieldAnnotation.optional()).addAll(Arrays.asList((Parameter[]) field.get(cmd))); } catch (IllegalAccessException e) { log.warn("Unable to retrieve parameters for " + clz.getName() + "." + field.getName()); } } } clz = clz.getSuperclass(); } return cmdParams; }
Source:
<code>public ValueType typeCheck(TypeContext ctx) { ValueType valTypeExpr = exprToAssign.typeCheck(ctx); StructuralType structTypeObj = objectExpr.typeCheck(ctx).getStructuralType(ctx); DeclType declTypeField = structTypeObj.findDecl(fieldName, ctx); if (!(declTypeField instanceof VarDeclType)) throw new RuntimeException("Type error: trying to set the field " + fieldName + ", but this isn't" <START> + "a var declaration."); <END> ValueType valTypeField = ((VarDeclType) declTypeField).getRawResultType(); if (!valTypeExpr.isSubtypeOf(valTypeField, ctx)) throw new RuntimeException("Type error: trying to set the field " + fieldName + ", but the type " + valTypeExpr + " cannot be assigned to " + valTypeField); return valTypeExpr; }</code><technical_language>I a lot of current code throws RuntimeExceptions type errors, move new code reporting errors in a way. mind replacing this code in UnresolvedType.getILType()? i.e. ToolError.reportError, message ErrorMessage enum</technical_language>

Target:
public ValueType typeCheck(TypeContext ctx) { ValueType valTypeExpr = exprToAssign.typeCheck(ctx); StructuralType structTypeObj = objectExpr.typeCheck(ctx).getStructuralType(ctx); DeclType declTypeField = structTypeObj.findDecl(fieldName, ctx); if (!(declTypeField instanceof VarDeclType)) ToolError.reportError(ErrorMessage.TYPE_CANNOT_BE_ASSIGNED, HasLocation.UNKNOWN, declTypeField.toString()); ValueType valTypeField = ((VarDeclType) declTypeField).getResultType(View.from(objectExpr, ctx)); if (!valTypeExpr.isSubtypeOf(valTypeField, ctx)) ToolError.reportError(ErrorMessage.NOT_SUBTYPE, HasLocation.UNKNOWN, valTypeExpr.toString(), structTypeObj.toString()); return valTypeExpr; }
Source:
<code>public void isGitRepository() <START> throws IOException { <END> assertTrue(new File(db.getDirectory(), "HEAD").delete()); assertTrue(RepositoryCache.FileKey.isGitRepository(db.getDirectory(), db.getFS())); }</code><technical_language>This exception is thrown, compilation failure: org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/FileReftableTest.java:[507,17333] declared exception IOException is thrown method isGitRepository() type FileReftableTest</technical_language>

Target:
public void isGitRepository() { assertTrue(new File(db.getDirectory(), "HEAD").delete()); assertTrue(RepositoryCache.FileKey.isGitRepository(db.getDirectory(), db.getFS())); }
Source:
<code>public ClusterClientProvider<String> deployApplicationCluster( final ClusterSpecification clusterSpecification, final ApplicationConfiguration applicationConfiguration) throws ClusterDeploymentException { if (client.getRestService(clusterId).isPresent()) { throw new ClusterDeploymentException("The Flink cluster " + clusterId + " already exists."); } checkNotNull(clusterSpecification); checkNotNull(applicationConfiguration); final String deploymentTarget = flinkConfig.get(DeploymentOptions.TARGET); if (!KubernetesConfigOptions.DeploymentTargetNames.APPLICATION.getName().equalsIgnoreCase(deploymentTarget)) { throw new ClusterDeploymentException( "Couldn't deploy Kubernetes Application Cluster." + " Expected deployment.target=" + KubernetesConfigOptions.DeploymentTargetNames.APPLICATION.getName() + " but actual one was \"" + deploymentTarget + "\""); } applicationConfiguration.applyToConfiguration(flinkConfig); <START> KubernetesUtils.checkJarFileForApplicationMode(flinkConfig); <END> final ClusterClientProvider<String> clusterClientProvider = deployClusterInternal( KubernetesApplicationClusterEntrypoint.class.getName(), clusterSpecification, false); try (ClusterClient<String> clusterClient = clusterClientProvider.getClusterClient()) { LOG.info( "Create flink application cluster successfully, JobManager Web Interface: {}", clusterId, clusterClient.getWebInterfaceURL()); } return clusterClientProvider; }</code><technical_language>do do this if ignore result? Is for a sanity check fail early? call later</technical_language>

Target:
public ClusterClientProvider<String> deployApplicationCluster( final ClusterSpecification clusterSpecification, final ApplicationConfiguration applicationConfiguration) throws ClusterDeploymentException { if (client.getRestService(clusterId).isPresent()) { throw new ClusterDeploymentException("The Flink cluster " + clusterId + " already exists."); } checkNotNull(clusterSpecification); checkNotNull(applicationConfiguration); final KubernetesDeploymentTarget deploymentTarget = KubernetesDeploymentTarget.fromConfig(flinkConfig); if (KubernetesDeploymentTarget.APPLICATION != deploymentTarget) { throw new ClusterDeploymentException( "Couldn't deploy Kubernetes Application Cluster." + " Expected deployment.target=" + KubernetesDeploymentTarget.APPLICATION.getName() + " but actual one was \"" + deploymentTarget + "\""); } applicationConfiguration.applyToConfiguration(flinkConfig); final List<File> pipelineJars = KubernetesUtils.checkJarFileForApplicationMode(flinkConfig); Preconditions.checkArgument(pipelineJars.size() == 1, "Should only have one jar"); final ClusterClientProvider<String> clusterClientProvider = deployClusterInternal( KubernetesApplicationClusterEntrypoint.class.getName(), clusterSpecification, false); try (ClusterClient<String> clusterClient = clusterClientProvider.getClusterClient()) { LOG.info( "Create flink application cluster successfully, JobManager Web Interface: {}", clusterId, clusterClient.getWebInterfaceURL()); } return clusterClientProvider; }
Source:
<code>public void addRow(T props) { subProperties.add(props); <START> props.init(); <END> getForm(Form.MAIN).addRow(props.getForm(Form.MAIN)); }</code><technical_language>I init method called method creates properties this method</technical_language>

Target:
public void addRow(T props) { subProperties.add(props); getForm(Form.MAIN).addRow(props.getForm(Form.MAIN)); }
Source:
<code>public Resource copyResource(PerunSession sess, Resource templateResource, Resource destinationResource, boolean withGroups) throws InternalErrorException, ResourceNotExistsException, FacilityNotExistsException, PrivilegeException, VoNotExistsException, ResourceExistsException { <START> Utils.checkPerunSession(sess); <END> Vo destinationVo = getPerunBl().getVosManagerBl().getVoById(sess, destinationResource.getVoId()); Facility destinationFacility = getPerunBl().getFacilitiesManagerBl().getFacilityById(sess, destinationResource.getFacilityId()); getPerunBl().getVosManagerBl().checkVoExists(sess, destinationVo); getPerunBl().getFacilitiesManagerBl().checkFacilityExists(sess, destinationFacility); Facility templateResourceFacility = getPerunBl().getFacilitiesManagerBl().getFacilityById(sess, templateResource.getFacilityId()); if(!AuthzResolver.isAuthorized(sess, Role.VOADMIN, templateResource) && !AuthzResolver.isAuthorized(sess,Role.FACILITYADMIN, templateResourceFacility)){ throw new PrivilegeException(sess, "Problem with template Resource's facility in copyResource."); } if (!AuthzResolver.isAuthorized(sess, Role.VOADMIN, destinationVo) && !AuthzResolver.isAuthorized(sess, Role.FACILITYADMIN, destinationFacility)) { throw new PrivilegeException(sess, "Problem with new Resource's facility in copyResource."); } getResourcesManagerBl().checkResourceExists(sess, templateResource); return getResourcesManagerBl().copyResource(sess, templateResource, destinationResource, withGroups); }</code><technical_language>check not-null for Resource objects</technical_language>

Target:
public Resource copyResource(PerunSession sess, Resource templateResource, Resource destinationResource, boolean withGroups) throws InternalErrorException, ResourceNotExistsException, FacilityNotExistsException, PrivilegeException, VoNotExistsException, ResourceExistsException { Utils.checkPerunSession(sess); Utils.notNull(templateResource, "Template Resource"); Utils.notNull(destinationResource, "Destination Resource"); getResourcesManagerBl().checkResourceExists(sess, templateResource); if (!AuthzResolver.isAuthorized(sess, Role.FACILITYADMIN, templateResource)) { throw new PrivilegeException(sess, "User is not facility admin of template Resource's facility."); } if (!AuthzResolver.isAuthorized(sess, Role.FACILITYADMIN, destinationResource)) { throw new PrivilegeException(sess, "User is not facility admin of destination Resource's facility."); } if(withGroups) { if(destinationResource.getVoId() != templateResource.getVoId()) { throw new InternalErrorException("Resources are not from the same VO."); } if(!AuthzResolver.isAuthorized(sess, Role.VOADMIN, templateResource)) { throw new PrivilegeException(sess, "User needs vo admin rights for copying the groups and group related attributes."); } } return getResourcesManagerBl().copyResource(sess, templateResource, destinationResource, withGroups); }
Source:
<code><START> public void switchPerspective(String perspectiveId) { <END> throw new UnsupportedOperationException("Not yet supported by this implementation"); }</code><technical_language>this getActiveWindowService()... others</technical_language>

Target:
public void switchPerspective(String perspectiveId) { getActiveWindowService().switchPerspective(perspectiveId); }
Source:
<code>public static void runOnServer(String name, String path) { IWorkspaceRoot wRoot = ResourcesPlugin.getWorkspace().getRoot(); String projectName = CheatSheetUtil.replaceProjectName(name); IProject project = wRoot.getProject(projectName); if (project == null || !project.isOpen()) { return; } if (path != null) { IFile file = wRoot.getFile(new Path(CheatSheetUtil.replaceProjectName(path))); if (file != null && file.exists()) { try { <START> SingleDeployableFactory.makeDeployable(file.getFullPath()); <END> IServer[] deployableServersAsIServers = ServerConverter .getDeployableServersAsIServers(); if (deployableServersAsIServers.length == 1) { IServer server = deployableServersAsIServers[0]; IServerWorkingCopy copy = server.createWorkingCopy(); IModule[] modules = new IModule[1]; modules[0] = SingleDeployableFactory.findModule(file .getFullPath()); copy.modifyModules(modules, new IModule[0], new NullProgressMonitor()); IServer saved = copy.save(false, new NullProgressMonitor()); saved.publish(IServer.PUBLISH_INCREMENTAL, new NullProgressMonitor()); } } catch (CoreException e) { IStatus status = new Status(IStatus.INFO,Activator.PLUGIN_ID,e.getMessage(),e); Activator.getDefault().getLog().log(status); } } } IAction action = new RunOnServerAction(project); action.run(); }</code><technical_language>A project need deployable - this wrong do default. call run server</technical_language>

Target:
public static void runOnServer(String name, String path) { IWorkspaceRoot wRoot = ResourcesPlugin.getWorkspace().getRoot(); String projectName = name; IProject project = wRoot.getProject(projectName); if (project == null || !project.isOpen()) { return; } if (path != null) { IFile file = wRoot.getFile(new Path(path)); if (file != null && file.exists()) { try { SingleDeployableFactory.makeDeployable(file.getFullPath()); IServer[] deployableServersAsIServers = ServerConverter .getDeployableServersAsIServers(); if (deployableServersAsIServers.length == 1) { IServer server = deployableServersAsIServers[0]; IServerWorkingCopy copy = server.createWorkingCopy(); IModule[] modules = new IModule[1]; modules[0] = SingleDeployableFactory.findModule(file .getFullPath()); copy.modifyModules(modules, new IModule[0], new NullProgressMonitor()); IServer saved = copy.save(false, new NullProgressMonitor()); saved.publish(IServer.PUBLISH_INCREMENTAL, new NullProgressMonitor()); } } catch (CoreException e) { IStatus status = new Status(IStatus.INFO,Activator.PLUGIN_ID,e.getMessage(),e); Activator.getDefault().getLog().log(status); } } } IAction action = new RunOnServerAction(project); action.run(); }
Source:
<code>private ThingUID getThingUID(FullLight light) { ThingUID bridgeUID = hueBridgeHandler.getThing().getUID(); ThingTypeUID thingTypeUID = getThingTypeUID(light); if (thingTypeUID != null && getSupportedThingTypes().contains(thingTypeUID)) { String thingLightId = light.getId(); <START> ThingTypeUID modelUID = new ThingTypeUID(BINDING_ID, <END> light.getModelID().replaceAll(HueLightHandler.NORMALIZE_ID_REGEX, "_")); ThingUID thingUID = new ThingUID(modelUID, bridgeUID, thingLightId); return thingUID; } else { return null; } }</code><technical_language>this line outdated? do need construct another ThingTypeUID here</technical_language>

Target:
private ThingUID getThingUID(FullLight light) { ThingUID bridgeUID = hueBridgeHandler.getThing().getUID(); ThingTypeUID thingTypeUID = getThingTypeUID(light); if (thingTypeUID != null && getSupportedThingTypes().contains(thingTypeUID)) { return new ThingUID(BINDING_ID, bridgeUID, light.getId()); } else { return null; } }
Source:
<code>public synchronized void removeMonitorListener( Object monitorListener ) { List<Class<?>> listenerInterfaces = getAllInterfaces( monitorListener ); methodsStream( listenerInterfaces ).forEach( method -> { Set<MonitorListenerInvocationHandler> handlers = methodMonitorListeners.get( method ); handlers.removeIf( handler -> monitorListener.equals( handler.getMonitorListener() ) ); if ( handlers.isEmpty() ) { methodMonitorListeners.remove( method ); <START> } <END> } ); listenerInterfaces.forEach( monitoredInterfaces::remove ); }</code><technical_language>computeIfPresent methodMonitorListeners map, do this entire modification atomically in ConcurrentHashMap. need synchronise monitoredInterfaces collection. I speed more</technical_language>

Target:
public void removeMonitorListener( Object monitorListener ) { List<Class<?>> listenerInterfaces = getAllInterfaces( monitorListener ); methodsStream( listenerInterfaces ).forEach( key -> methodMonitorListeners.computeIfPresent( key, ( method1, handlers ) -> { handlers.removeIf( handler -> monitorListener.equals( handler.getMonitorListener() ) ); return handlers.isEmpty() ? null : handlers; } ) ); listenerInterfaces.forEach( monitoredInterfaces::remove ); }
Source:
<code>public static JpaSettings get() { if (INSTANCE == null) { <START> INSTANCE = new JpaSettings(); <END> } return INSTANCE; }</code><technical_language>avoid this null check instantiate fields (+private constructor if want create in other way) - potential race condition if need for tests package scoped reset method</technical_language>

Target:
public static JpaSettings get() { return INSTANCE; }
Source:
<code>public void deserialize(ByteBuf buffer) { stack = ByteBufUtils.readItemStack(buffer); <START> hand = buffer.readInt() == 0 ? EnumHand.MAIN_HAND : EnumHand.OFF_HAND; <END> }</code><technical_language>encode this a boolean instead of int</technical_language>

Target:
public IGuiProvider deserialize(ByteBuf buffer) { owner = ByteBufUtils.readItemStack(buffer); hand = buffer.readBoolean() ? EnumHand.MAIN_HAND : EnumHand.OFF_HAND; return this; }
Source:
<code>public final <START> Object clone() <END> { try { FieldArray clone = (FieldArray) super.clone(); clone.mFieldNumbers = new int[mFieldNumbers.length]; clone.mData = new FieldData[mData.length]; System.arraycopy(mFieldNumbers, 0, clone.mFieldNumbers, 0, mFieldNumbers.length); for (int i = 0; i < mData.length; i++) { if (mData[i] != null) { clone.mData[i] = (FieldData) mData[i].clone(); } } return clone; } catch (CloneNotSupportedException e) { throw new AssertionError(e); } }</code><technical_language>simply define return type FieldArray save some casts, I think. override</technical_language>

Target:
public final FieldArray clone() { int size = size(); FieldArray clone = new FieldArray(size); System.arraycopy(mFieldNumbers, 0, clone.mFieldNumbers, 0, size); for (int i = 0; i < mData.length; i++) { if (mData[i] != null) { clone.mData[i] = mData[i].clone(); } } clone.mSize = mSize; return clone; }
Source:
<code>public void updatePermission(String queueName, QueueRolePermission[] queueRolePermissionsDTO) throws BrokerManagerAdminException { QueueManagerService queueManagerService = AndesBrokerManagerAdminServiceDSHolder.getInstance() .getQueueManagerService(); org.wso2.carbon.andes.core.types.QueueRolePermission[] rolePermissions; try { if (queueRolePermissionsDTO != null && queueRolePermissionsDTO.length > 0) { rolePermissions = new org.wso2.carbon.andes.core.types.QueueRolePermission[queueRolePermissionsDTO.length]; <START> for (int i=0; i < queueRolePermissionsDTO.length; i++) { <END> rolePermissions[i] = queueRolePermissionsDTO[i].convertToAndesCoreRole(); } queueManagerService.updatePermission(queueName, rolePermissions); } } catch (QueueManagerException e) { log.error("Unable to update permission of the queue.", e); throw new BrokerManagerAdminException("Unable to update permission of the queue.", e); } }</code><technical_language>Issue readability. Please a spaces i=0</technical_language>

Target:
public void updatePermission(String queueName, QueueRolePermission[] queueRolePermissionsDTO) throws BrokerManagerAdminException { QueueManagerService queueManagerService = AndesBrokerManagerAdminServiceDSHolder.getInstance() .getQueueManagerService(); org.wso2.carbon.andes.core.types.QueueRolePermission[] rolePermissions; try { if (queueRolePermissionsDTO != null && queueRolePermissionsDTO.length > 0) { rolePermissions = new org.wso2.carbon.andes.core.types.QueueRolePermission[queueRolePermissionsDTO.length]; for (int i = 0; i < queueRolePermissionsDTO.length; i++) { rolePermissions[i] = queueRolePermissionsDTO[i].convert(); } queueManagerService.updatePermission(queueName, rolePermissions); } } catch (QueueManagerException e) { log.error("Unable to update permission of the queue.", e); throw new BrokerManagerAdminException("Unable to update permission of the queue.", e); } }
Source:
<code>private boolean clusterHasPpcArchitecture() { Cluster cluster = getModel().getSelectedCluster(); return cluster != null && cluster.getArchitecture() != null <START> && ArchitectureType.ppc.getFamily() == cluster.getArchitecture().getFamily(); <END> }</code><technical_language>I I multiple ppc types in enum: ppc, ppc64, ppcle, ppc64le</technical_language>

Target:
private boolean clusterHasPpcArchitecture() { Cluster cluster = getModel().getSelectedCluster(); return cluster != null && cluster.getArchitecture() != null && ArchitectureType.ppc == cluster.getArchitecture().getFamily(); }
Source:
<code>public String viewTagWizard(@RequestParam(required = false, value = "selectedTarget") String target, Model model) { List<String> entityTypeIds = dataService.findAll(ENTITY_TYPE_META_DATA, EntityType.class) .map(EntityType::getId) .collect(toList()); if (StringUtils.isEmpty(target)) { Optional<String> findFirst = entityTypeIds.stream().findFirst(); if (findFirst.isPresent()) { target = findFirst.get(); } } if (StringUtils.isEmpty(target)) { <START> throw new MolgenisRuntimeException("There are no entities available!"); <END> } List<Ontology> ontologies = ontologyService.getOntologies(); EntityType emd = dataService.getEntityType(target); List<Attribute> attributes = newArrayList(emd.getAttributes()); Map<String, Multimap<Relation, OntologyTerm>> taggedAttributes = attributes.stream() .collect(toMap((Attribute::getName), (x -> ontologyTagService.getTagsForAttribute( emd, x)))); model.addAttribute("entity", emd); model.addAttribute("entityTypeIds", entityTypeIds); model.addAttribute("attributes", attributes); model.addAttribute("ontologies", ontologies); model.addAttribute("taggedAttributes", taggedAttributes); model.addAttribute("relations", Relation.values()); return VIEW_TAG_WIZARD; }</code><technical_language>IllegalStateException</technical_language>

Target:
public String viewTagWizard(@RequestParam(required = false, value = "selectedTarget") String target, Model model) { List<String> entityTypeIds = dataService.findAll(ENTITY_TYPE_META_DATA, EntityType.class) .map(EntityType::getId) .collect(toList()); if (StringUtils.isEmpty(target)) { Optional<String> findFirst = entityTypeIds.stream().findFirst(); if (findFirst.isPresent()) { target = findFirst.get(); } } if (StringUtils.isEmpty(target)) { throw new IllegalStateException("There are no entities available!"); } List<Ontology> ontologies = ontologyService.getOntologies(); EntityType emd = dataService.getEntityType(target); List<Attribute> attributes = newArrayList(emd.getAttributes()); Map<String, Multimap<Relation, OntologyTerm>> taggedAttributes = attributes.stream() .collect(toMap((Attribute::getName), (x -> ontologyTagService.getTagsForAttribute( emd, x)))); model.addAttribute("entity", emd); model.addAttribute("entityTypeIds", entityTypeIds); model.addAttribute("attributes", attributes); model.addAttribute("ontologies", ontologies); model.addAttribute("taggedAttributes", taggedAttributes); model.addAttribute("relations", Relation.values()); return VIEW_TAG_WIZARD; }
Source:
<code>void handleResponse(ResponseInfo responseInfo) { long startTime = time.milliseconds(); UndeleteResponse undeleteResponse = RouterUtils.extractResponseAndNotifyResponseHandler(responseHandler, routerMetrics, responseInfo, UndeleteResponse::readFrom, UndeleteResponse::getError); RequestInfo routerRequestInfo = responseInfo.getRequestInfo(); <START> int correlationId = ((UndeleteRequest) routerRequestInfo.getRequest()).getCorrelationId(); <END> UndeleteOperation undeleteOperation = correlationIdToUndeleteOperation.remove(correlationId); if (undeleteOperations.contains(undeleteOperation)) { boolean exceptionEncountered = false; try { undeleteOperation.handleResponse(responseInfo, undeleteResponse); } catch (Exception e) { exceptionEncountered = true; undeleteOperation.setOperationException( new RouterException("Undelete handleResponse encountered unexpected error", e, RouterErrorCode.UnexpectedInternalError)); } if (exceptionEncountered || undeleteOperation.isOperationComplete()) { if (undeleteOperations.remove(undeleteOperation)) { onComplete(undeleteOperation); } } routerMetrics.undeleteManagerHandleResponseTimeMs.update(time.milliseconds() - startTime); } else { routerMetrics.ignoredResponseCount.inc(); } }</code><technical_language>redundant cast, remove (UndeleteRequest)</technical_language>

Target:
void handleResponse(ResponseInfo responseInfo) { long startTime = time.milliseconds(); UndeleteResponse undeleteResponse = RouterUtils.extractResponseAndNotifyResponseHandler(responseHandler, routerMetrics, responseInfo, UndeleteResponse::readFrom, UndeleteResponse::getError); RequestInfo routerRequestInfo = responseInfo.getRequestInfo(); int correlationId = routerRequestInfo.getRequest().getCorrelationId(); UndeleteOperation undeleteOperation = correlationIdToUndeleteOperation.remove(correlationId); if (undeleteOperations.contains(undeleteOperation)) { boolean exceptionEncountered = false; try { undeleteOperation.handleResponse(responseInfo, undeleteResponse); } catch (Exception e) { exceptionEncountered = true; undeleteOperation.setOperationException( new RouterException("Undelete handleResponse encountered unexpected error", e, RouterErrorCode.UnexpectedInternalError)); } if (exceptionEncountered || undeleteOperation.isOperationComplete()) { if (undeleteOperations.remove(undeleteOperation)) { onComplete(undeleteOperation); } } routerMetrics.undeleteManagerHandleResponseTimeMs.update(time.milliseconds() - startTime); } else { routerMetrics.ignoredResponseCount.inc(); } }
Source:
<code>public static String localPathFromTfsRepresentation(@Nullable String localPath) { if (localPath == null) { return null; } final String systemDependent = FileUtil.toSystemDependentName(localPath); if (!SystemInfo.isWindows && systemDependent.startsWith(FAKE_DRIVE_PREFIX)) { <START> return canonicalizePath(systemDependent.substring(FAKE_DRIVE_PREFIX.length())); <END> } else { return canonicalizePath(systemDependent); } }</code><technical_language>toSystemDependentName canonicalize in time</technical_language>

Target:
public static String localPathFromTfsRepresentation(@Nullable String localPath) { if (localPath == null) { return null; } if (!SystemInfo.isWindows && localPath.startsWith(FAKE_DRIVE_PREFIX)) { return canonicalizePath(localPath.substring(FAKE_DRIVE_PREFIX.length())); } else { return canonicalizePath(localPath); } }
Source:
<code>public void serialize(XMLExtendedStreamWriter writer, JdbcStringBasedStoreConfiguration configuration) throws XMLStreamException { writer.writeStartElement(Element.STRING_KEYED_JDBC_STORE); writeJdbcStoreAttributes(writer, configuration); <START> writeJDBCStoreTable(writer, Element.STRING_KEYED_TABLE, configuration.table()); <END> writeCommonStoreElements(writer, configuration); writer.writeEndElement(); }</code><technical_language>ins't KEY2STRING_MAPPER missing</technical_language>

Target:
public void serialize(XMLExtendedStreamWriter writer, JdbcStringBasedStoreConfiguration configuration) throws XMLStreamException { writer.writeStartElement(Element.STRING_KEYED_JDBC_STORE); writeJdbcStoreAttributes(writer, configuration); writeCommonStoreSubAttributes(writer, configuration); writeJDBCStoreTable(writer, Element.STRING_KEYED_TABLE, configuration.table()); writeJDBCStoreConnection(writer, configuration); writeCommonStoreElements(writer, configuration); writer.writeEndElement(); }