auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>private void authCredentials(HttpServletRequest request, HttpServletResponse response) throws IOException { try { Credentials credentials = SSOUtils.getUserCredentialsFromHeader(request); if (credentials == null) { response.sendError(HttpServletResponse.SC_UNAUTHORIZED); } else { AuthenticationUtils.handleCredentials( request.getSession(true), credentials.getUsername(), credentials.getPassword(), credentials.getProfile()); String issueTicket = request.getParameter("ticket"); if (StringUtils.isEmpty(issueTicket) || "0".equals(issueTicket)) { response.getWriter().print(SSOUtils.getSsoToken(request.getSession(true).getId())); } else { try (OutputStream os = response.getOutputStream()) { os.write(SSOUtils.issueTicket(request.getServletContext(), request.getSession(true).getId(), request).getBytes("UTF-8")); } } } } catch (Exception e) { log.error("Unable to authenticate {}", e.getMessage()); <START> response.sendError(HttpServletResponse.SC_UNAUTHORIZED); <END> } }</code><technical_language>easier for user accept json? for example need set status code for password change / user locked. reminds me... need a service for :)))</technical_language>

Target:
private void authCredentials(HttpServletRequest request, HttpServletResponse response) throws IOException { try { Credentials credentials = SSOUtils.getUserCredentialsFromHeader(request); if (credentials == null) { response.sendError(HttpServletResponse.SC_UNAUTHORIZED); } else { AuthenticationUtils.handleCredentials( request.getSession(true), credentials.getUsername(), credentials.getPassword(), credentials.getProfile()); String returnPayload = request.getParameter("payload"); if (StringUtils.isEmpty(returnPayload) || "0".equals(returnPayload)) { response.getWriter().print(SSOUtils.getSsoToken(request.getSession(true).getId())); } else { try (OutputStream os = response.getOutputStream()) { Map<String, Object> payload = SSOUtils.getTokenPayload(request.getServletContext(), request.getSession(true).getId()); payload.put(STATUS, HttpServletResponse.SC_OK); os.write(SSOUtils.getJson(payload).getBytes("UTF-8")); } } } } catch (Exception e) { log.error("Unable to authenticate {}", e.getMessage()); Map<String, Object> errorData = new HashMap<>(); errorData.put(STATUS, HttpServletResponse.SC_UNAUTHORIZED); errorData.put(MESSAGE, e.getMessage()); response.getWriter().print(SSOUtils.getJson(errorData)); } }
Source:
<code>public void setGlobalTargetTaskThreadPoolSize(int globalTargetTaskThreadPoolSize) { ClusterConfig clusterConfig = _accessor.getProperty(_accessor.keyBuilder().clusterConfig()); if (clusterConfig == null) { <START> throw new IllegalStateException("Failed to find ClusterConfig!"); <END> } clusterConfig.setGlobalTargetTaskThreadPoolSize(globalTargetTaskThreadPoolSize); }</code><technical_language>Nit: add cluster name</technical_language>

Target:
public void setGlobalTargetTaskThreadPoolSize(int globalTargetTaskThreadPoolSize) { ClusterConfig clusterConfig = getClusterConfig(); clusterConfig.setGlobalTargetTaskThreadPoolSize(globalTargetTaskThreadPoolSize); }
Source:
<code>protected AbstractAvroMessageConverter(MimeType supportedMimeType, AvroSchemaServiceManager avroSchemaServiceManager) { this(Collections.singletonList(supportedMimeType), avroSchemaServiceManager); <START> this.avroSchemaServiceManager = avroSchemaServiceManager; <END> }</code><technical_language>This assignment is a duplicate. call other constructor assigns avroSchemaServiceManager</technical_language>

Target:
protected AbstractAvroMessageConverter(MimeType supportedMimeType, AvroSchemaServiceManager avroSchemaServiceManager) { this(Collections.singletonList(supportedMimeType), avroSchemaServiceManager); }
Source:
<code>public void doPolling(Guid cmdId, List<Guid> childCmdIds) { boolean anyFailed = false; for (Guid childCmdId : childCmdIds) { CommandStatus commandStatus = CommandCoordinatorUtil.getCommandStatus(childCmdId); switch (commandStatus) { case ACTIVE: log.info("Waiting on CloneCinderDisksCommandCallback child commands to complete"); return; case FAILED: case FAILED_RESTARTED: case UNKNOWN: <START> anyFailed = true; <END> break; default: log.error("Invalid command status: '{}", commandStatus); break; } } T command = getCommand(cmdId); command.getParameters().setTaskGroupSuccess(!anyFailed); command.setCommandStatus(anyFailed ? CommandStatus.FAILED : CommandStatus.SUCCEEDED); log.info("All CloneCinderDisksCommandCallback commands have completed, status '{}'", command.getCommandStatus()); }</code><technical_language>add a warning log</technical_language>

Target:
public void doPolling(Guid cmdId, List<Guid> childCmdIds) { boolean anyFailed = false; for (Guid childCmdId : childCmdIds) { CommandStatus commandStatus = CommandCoordinatorUtil.getCommandStatus(childCmdId); switch (commandStatus) { case ACTIVE: log.info("Waiting on CloneCinderDisksCommandCallback child commands to complete"); return; case FAILED: case FAILED_RESTARTED: case UNKNOWN: anyFailed = true; log.error("Unknown command status."); break; default: log.error("Invalid command status: '{}", commandStatus); break; } } T command = getCommand(cmdId); command.getParameters().setTaskGroupSuccess(!anyFailed); command.setCommandStatus(anyFailed ? CommandStatus.FAILED : CommandStatus.SUCCEEDED); log.info("All CloneCinderDisksCommandCallback commands have completed, status '{}'", command.getCommandStatus()); }
Source:
<code>public void handle(Willie bot, Channel channel, User sender, String[] args) { ConfigurationBuilder cb = new ConfigurationBuilder(); cb.setDebugEnabled(true) .setOAuthConsumerKey(bot.getConfig().getTwitterConsumerKey()) .setOAuthConsumerSecret(bot.getConfig().getTwitterConsumerKeySecret()) .setOAuthAccessToken(bot.getConfig().getTwitterAccessToken()) .setOAuthAccessTokenSecret(bot.getConfig().getTwitterAccessTokenSecret()); TwitterFactory tf = new TwitterFactory(cb.build()); Twitter twitter = tf.getInstance(); try { Trends trend = twitter.getPlaceTrends(1); int trendsToShow = bot.getConfig().getTwitterTrendsToShow(); <START> channel.sendMessage(Colors.CYAN + "Top " + trendsToShow + " trend(s) on Twitter right now..."); <END> for (Trend t : trend.getTrends()) { if (trendsToShow > 0) { channel.sendMessage(t.getName()); } trendsToShow =- 1; } } catch (TwitterException e) { e.printStackTrace(); } }</code><technical_language>this a dynamic S please</technical_language>

Target:
public void handle(Willie bot, Channel channel, User sender, String[] args) { ConfigurationBuilder cb = new ConfigurationBuilder(); cb.setDebugEnabled(true) .setOAuthConsumerKey(bot.getConfig().getTwitterConsumerKey()) .setOAuthConsumerSecret(bot.getConfig().getTwitterConsumerKeySecret()) .setOAuthAccessToken(bot.getConfig().getTwitterAccessToken()) .setOAuthAccessTokenSecret(bot.getConfig().getTwitterAccessTokenSecret()); TwitterFactory tf = new TwitterFactory(cb.build()); Twitter twitter = tf.getInstance(); try { Trends trend = twitter.getPlaceTrends(1); int trendsToShow = 5; channel.sendMessage(Colors.CYAN + "Top " + trendsToShow + " trends on Twitter right now..."); for (Trend t : trend.getTrends()) { if (trendsToShow > 0) { channel.sendMessage(t.getName()); } trendsToShow =- 1; } } catch (TwitterException e) { e.printStackTrace(); } }
Source:
<code>private Comparator<File> getHtBackupFileComparatorByVersion() { return (a, b) -> { <START> Pattern htJarFileBackupPattern = Pattern.compile(HT_BACKUP_FILENAME_PATTERN_STRING); <END> Matcher htJarFileBackupMatcher = htJarFileBackupPattern.matcher(a.getName()); htJarFileBackupMatcher.find(); Version aVersion = Version.fromString(htJarFileBackupMatcher.group(1)); htJarFileBackupMatcher = htJarFileBackupPattern.matcher(b.getName()); htJarFileBackupMatcher.find(); Version bVersion = Version.fromString(htJarFileBackupMatcher.group(1)); return aVersion.compareTo(bVersion); }; }</code><technical_language>regex matching factored out another method, a bit more SLAP</technical_language>

Target:
private Comparator<File> getHtBackupFileComparatorByVersion() { return (a, b) -> getVersionOfHtBackupFileFromFilename(a.getName()) .compareTo(getVersionOfHtBackupFileFromFilename(b.getName())); }
Source:
<code>public void loadLocalCache() { final long start = System.currentTimeMillis(); File baseDir = config.getInfoDir(); if (!baseDir.exists() && !config.getInfoDir().mkdirs()) { return; } List<DataSegment> cachedSegments = Lists.newArrayList(); File[] segmentsToLoad = baseDir.listFiles(); for (int i = 0; i < segmentsToLoad.length; i++) { File file = segmentsToLoad[i]; log.info("Loading segment cache file [%d/%d][%s].", i, segmentsToLoad.length, file); try { final DataSegment segment = jsonMapper.readValue(file, DataSegment.class); <START> if (!segment.getIdentifier().equals(file.getName())) { <END> log.makeAlert("Ignoring cache file for dataSource[%s].", segment.getDataSource()) .addData("cacheFile", file.getPath()) .addData("segmentIdentifier", segment.getIdentifier()) .emit(); } else if (serverManager.isSegmentCached(segment)) { cachedSegments.add(segment); } else { log.warn("Unable to find cache file for %s. Deleting lookup entry", segment.getIdentifier()); File segmentInfoCacheFile = new File(config.getInfoDir(), segment.getIdentifier()); if (!segmentInfoCacheFile.delete()) { log.warn("Unable to delete segmentInfoCacheFile[%s]", segmentInfoCacheFile); } } } catch (Exception e) { log.makeAlert(e, "Failed to load segment from segmentInfo file") .addData("file", file) .emit(); } } addSegments( cachedSegments, new DataSegmentChangeCallback() { @Override public void execute() { log.info("Cache load took %,d ms", System.currentTimeMillis() - start); } } ); }</code><technical_language>deleting file if a mismatch instead of ignoring it</technical_language>

Target:
public void loadLocalCache() { final long start = System.currentTimeMillis(); File baseDir = config.getInfoDir(); if (!baseDir.exists() && !config.getInfoDir().mkdirs()) { return; } List<DataSegment> cachedSegments = Lists.newArrayList(); File[] segmentsToLoad = baseDir.listFiles(); int ignored = 0; for (int i = 0; i < segmentsToLoad.length; i++) { File file = segmentsToLoad[i]; log.info("Loading segment cache file [%d/%d][%s].", i, segmentsToLoad.length, file); try { final DataSegment segment = jsonMapper.readValue(file, DataSegment.class); if (!segment.getIdentifier().equals(file.getName())) { log.warn("Ignoring cache file[%s] for segment[%s].", file.getPath(), segment.getIdentifier()); ignored++; } else if (serverManager.isSegmentCached(segment)) { cachedSegments.add(segment); } else { log.warn("Unable to find cache file for %s. Deleting lookup entry", segment.getIdentifier()); File segmentInfoCacheFile = new File(config.getInfoDir(), segment.getIdentifier()); if (!segmentInfoCacheFile.delete()) { log.warn("Unable to delete segmentInfoCacheFile[%s]", segmentInfoCacheFile); } } } catch (Exception e) { log.makeAlert(e, "Failed to load segment from segmentInfo file") .addData("file", file) .emit(); } } if (ignored > 0) { log.makeAlert("Ignored misnamed segment cache files on startup.") .addData("numIgnored", ignored) .emit(); } addSegments( cachedSegments, new DataSegmentChangeCallback() { @Override public void execute() { log.info("Cache load took %,d ms", System.currentTimeMillis() - start); } } ); }
Source:
<code><START> Properties getProperties() { <END> return props; }</code><technical_language>access modifier this method visible package subclasses classes package. Is this want</technical_language>

Target:
public Properties getProperties() { return props; }
Source:
<code>public CumulativeNonDistinctResultsCollection(Collection<? extends Collection<E>> results, int limit, List<Metadata> collectionsMetadata) { this.results = results; this.limit = limit; this.collectionsMetdata = collectionsMetadata; <START> System.out.println("JASON"); <END> }</code><technical_language>want remove this :-)</technical_language>

Target:
public CumulativeNonDistinctResultsCollection(Collection<? extends Collection<E>> results, int limit, List<Metadata> collectionsMetadata) { this.results = results; this.limit = limit; this.collectionsMetdata = collectionsMetadata; }
Source:
<code>static InetSocketAddress getResolvedHttpProxyAddress(String host, int port) throws IOException { InetSocketAddress targetAddress = null; Iterator<Proxy> proxies = ProxySelector.getDefault().select(URI.create(String.format("http://%s:%d", host, port))).iterator(); while (targetAddress == null && proxies.hasNext()) { Proxy proxy = proxies.next(); if(proxy.type() == Proxy.Type.HTTP) { if (!(proxy.address() instanceof InetSocketAddress)) <START> throw new IOException("Unsupported proxy address type " + proxy.address().getClass()); <END> InetSocketAddress proxyAddress = (InetSocketAddress) proxy.address(); if(proxyAddress.isUnresolved()) proxyAddress = new InetSocketAddress(proxyAddress.getHostName(), proxyAddress.getPort()); targetAddress = proxyAddress; } } if(targetAddress == null) { String httpProxy = System.getenv("http_proxy"); if(httpProxy != null) { try { URL url = new URL(httpProxy); targetAddress = new InetSocketAddress(url.getHost(), url.getPort()); } catch (MalformedURLException e) { System.err.println("Not use http_proxy environment variable which is invalid: "+e.getMessage()); } } } return targetAddress; }</code><technical_language>this throw log? for a suitable Proxy all</technical_language>

Target:
static InetSocketAddress getResolvedHttpProxyAddress(String host, int port) throws IOException { InetSocketAddress targetAddress = null; Iterator<Proxy> proxies = ProxySelector.getDefault().select(URI.create(String.format("http://%s:%d", host, port))).iterator(); while (targetAddress == null && proxies.hasNext()) { Proxy proxy = proxies.next(); if(proxy.type() == Proxy.Type.DIRECT) { break; } if(proxy.type() == Proxy.Type.HTTP) { final SocketAddress address = proxy.address(); if (!(address instanceof InetSocketAddress)) { System.err.println("Unsupported proxy address type " + (address != null ? address.getClass() : "null")); continue; } InetSocketAddress proxyAddress = (InetSocketAddress) address; if(proxyAddress.isUnresolved()) proxyAddress = new InetSocketAddress(proxyAddress.getHostName(), proxyAddress.getPort()); targetAddress = proxyAddress; } } if(targetAddress == null) { String httpProxy = System.getenv("http_proxy"); if(httpProxy != null) { try { URL url = new URL(httpProxy); targetAddress = new InetSocketAddress(url.getHost(), url.getPort()); } catch (MalformedURLException e) { System.err.println("Not use http_proxy environment variable which is invalid: "+e.getMessage()); } } } return targetAddress; }
Source:
<code>void createHandle (int index) { state |= HANDLE | THEME_BACKGROUND; fixedHandle = OS.g_object_new (display.gtk_fixed_get_type (), 0); if (fixedHandle == 0) error (SWT.ERROR_NO_HANDLES); OS.gtk_widget_set_has_window (fixedHandle, true); handle = OS.gtk_toolbar_new (); if (handle == 0) error (SWT.ERROR_NO_HANDLES); OS.gtk_container_add (fixedHandle, handle); if ((style & SWT.FLAT) != 0 && !OS.GTK3) { byte swt_toolbar_flat = Converter.wcsToMbcs (null, "swt-toolbar-flat", true); OS.gtk_widget_set_name (handle, swt_toolbar_flat); } OS.gtk_toolbar_set_icon_size (handle, OS.GTK3 ? OS.GTK_ICON_SIZE_SMALL_TOOLBAR : OS.GTK_ICON_SIZE_LARGE_TOOLBAR); <START> if (OS.GTK_VERSION < OS.VERSION(3, 21, 0)) { <END> setFontDescription(defaultFont().handle); } }</code><technical_language>Generally check for GTK dev versions. GTK3.21 is a development version, this call GTK3.22</technical_language>

Target:
void createHandle (int index) { state |= HANDLE | THEME_BACKGROUND; fixedHandle = OS.g_object_new (display.gtk_fixed_get_type (), 0); if (fixedHandle == 0) error (SWT.ERROR_NO_HANDLES); OS.gtk_widget_set_has_window (fixedHandle, true); handle = OS.gtk_toolbar_new (); if (handle == 0) error (SWT.ERROR_NO_HANDLES); OS.gtk_container_add (fixedHandle, handle); if ((style & SWT.FLAT) != 0 && !OS.GTK3) { byte swt_toolbar_flat = Converter.wcsToMbcs (null, "swt-toolbar-flat", true); OS.gtk_widget_set_name (handle, swt_toolbar_flat); } OS.gtk_toolbar_set_icon_size (handle, OS.GTK3 ? OS.GTK_ICON_SIZE_SMALL_TOOLBAR : OS.GTK_ICON_SIZE_LARGE_TOOLBAR); if (OS.GTK_VERSION < OS.VERSION(3, 22, 0)) { setFontDescription(defaultFont().handle); } }
Source:
<code>public RouterException(String message, RouterErrorCode errorCode) { <START> super(message + errorCode); <END> this.errorCode = errorCode; }</code><technical_language>Minor: add a space in message error code</technical_language>

Target:
public RouterException(String message, RouterErrorCode errorCode) { super(message + " Error: " + errorCode); this.errorCode = errorCode; }
Source:
<code>private void handleAJAXAction(final HttpServletRequest req, final HttpServletResponse resp, final Session session) throws ServletException, IOException { final HashMap<String, Object> ret = new HashMap<>(); final String ajaxName = getParam(req, "ajax"); try { if (ajaxName.equals("addNote")) { ajaxAddNotes(req, ret, session.getUser()); <START> } else { <END> ajaxRemoveNotes(req, ret, session.getUser()); } } catch (final Exception e) { ret.put("error", e.getMessage()); } this.writeJSON(resp, ret); }</code><technical_language>If enters some invalid parameters in API call, remove note right? For reason, I verify else if (ajaxName.equals("removeNote"))</technical_language>

Target:
private void handleAJAXAction(final HttpServletRequest req, final HttpServletResponse resp, final Session session) throws ServletException, IOException { final HashMap<String, Object> ret = new HashMap<>(); final String ajaxName = getParam(req, "ajax"); try { if (ajaxName.equals("addNote")) { ajaxAddNotes(req, ret); } else if (ajaxName.equals("removeNote")){ ajaxRemoveNotes(ret); } else { ret.put("error", "Can not find the ajax operation"); } } catch (final Exception e) { ret.put("error", e.getMessage()); } this.writeJSON(resp, ret); }
Source:
<code>public String toString(Duration value) { if ( value == null ) { return null; } <START> return new StringBuilder() <END> .append( value.getSeconds() ) .append( value.toNanos() ) .toString(); }</code><technical_language>capacity of StringBuilder avoid re-allocating new char array copying (it definitively happen for internal char array's length is 16 default)</technical_language>

Target:
public String toString(Duration value) { if ( value == null ) { return null; } String seconds = String.valueOf( value.getSeconds() ); String nanos = String.valueOf( value.getNano() ); String zeros = StringHelper.repeat( '0', 9-nanos.length() ); return seconds + zeros + nanos; }
Source:
<code>private boolean repairBendpointsOfEdge(Edge edge, Rectangle srcBounds, Point srcRef, Rectangle tgtBounds, Point tgtRef) { boolean isEdgeModified = false; PointList newPointList = new PointList(); Option<Point> srcConnectionBendpoint = GraphicalHelper.getIntersection(srcRef, tgtRef, srcBounds, true); Option<Point> tgtConnectionBendpoint = GraphicalHelper.getIntersection(srcRef, tgtRef, tgtBounds, false); if (srcConnectionBendpoint.some() && tgtConnectionBendpoint.some()) { isEdgeModified = true; EdgeQuery edgeQuery = new EdgeQuery(edge); Routing routingStyle = edgeQuery.getRoutingStyle(); if (Routing.RECTILINEAR_LITERAL.equals(routingStyle) <START> && srcBounds != null && srcBounds.equals(tgtBounds)) { newPointList = RectilinearEdgeUtil.computeRectilinearBendpointsSameSourceAndTarget(srcBounds, tgtBounds, srcBounds.getRight(), PositionConstants.EAST); } else if (Routing.RECTILINEAR_LITERAL.equals(routingStyle)) { <END> newPointList = RectilinearEdgeUtil.computeRectilinearBendpoints(srcBounds, tgtBounds, srcConnectionBendpoint.get(), tgtConnectionBendpoint.get()); } else { newPointList.addPoint(srcConnectionBendpoint.get()); newPointList.addPoint(tgtConnectionBendpoint.get()); } newPointList = RectilinearEdgeUtil.normalizeToStraightLineTolerance(newPointList, 2); setNewBendPoints(edge, srcRef, tgtRef, newPointList); } return isEdgeModified; }</code><technical_language>sure: means if this migration applied, perform this fix</technical_language>

Target:
private boolean repairBendpointsOfEdge(Edge edge, Rectangle srcBounds, Point srcRef, Rectangle tgtBounds, Point tgtRef) { boolean isEdgeModified = false; PointList newPointList = new PointList(); Option<Point> srcConnectionBendpoint = GraphicalHelper.getIntersection(srcRef, tgtRef, srcBounds, true); Option<Point> tgtConnectionBendpoint = GraphicalHelper.getIntersection(srcRef, tgtRef, tgtBounds, false); if (srcConnectionBendpoint.some() && tgtConnectionBendpoint.some()) { isEdgeModified = true; EdgeQuery edgeQuery = new EdgeQuery(edge); Routing routingStyle = edgeQuery.getRoutingStyle(); if (Routing.RECTILINEAR_LITERAL.equals(routingStyle) && srcBounds != null && srcBounds.equals(tgtBounds)) { newPointList = RectilinearEdgeUtil.computeRectilinearBendpointsSameSourceAndTarget(srcBounds, srcBounds.getRight(), PositionConstants.EAST); } else if (Routing.RECTILINEAR_LITERAL.equals(routingStyle)) { newPointList = RectilinearEdgeUtil.computeRectilinearBendpoints(srcBounds, tgtBounds, srcConnectionBendpoint.get(), tgtConnectionBendpoint.get()); } else { newPointList.addPoint(srcConnectionBendpoint.get()); newPointList.addPoint(tgtConnectionBendpoint.get()); } newPointList = RectilinearEdgeUtil.normalizeToStraightLineTolerance(newPointList, 2); setNewBendPoints(edge, srcRef, tgtRef, newPointList); } return isEdgeModified; }
Source:
<code>public ImmutableSpongeBreakableData(Set<BlockType> breakable) { super(ImmutableBreakableData.class); registerGetters(); <START> this.breakable = breakable; <END> }</code><technical_language>making defensive copies of Set, do immutable</technical_language>

Target:
public ImmutableSpongeBreakableData(Set<BlockType> breakable) { super(ImmutableBreakableData.class, breakable, Keys.BREAKABLE_BLOCK_TYPES, SpongeBreakableData.class); }
Source:
<code>@Test public void parameterVariableElement() { TypeElement classElement = getElement(VariableElementParameterClass.class); List<ExecutableElement> methods = methodsIn(elements.getAllMembers(classElement)); ExecutableElement element = findFirstExecutable(methods, "foo"); VariableElement parameterElement = element.getParameters().get(0); assertThat(ParameterSpec.get(parameterElement).toString()) <START> .isEqualTo("@javax.annotation.Nullable java.lang.String arg0"); <END> }</code><technical_language>repro this master? If - worth filing</technical_language>

Target:
@Test public void parameterVariableElement() { TypeElement classElement = getElement(VariableElementParameterClass.class); List<ExecutableElement> methods = methodsIn(elements.getAllMembers(classElement)); ExecutableElement element = findFirst(methods, "foo"); VariableElement parameterElement = element.getParameters().get(0); assertThat(ParameterSpec.get(parameterElement).toString()) .isEqualTo("@javax.annotation.Nullable java.lang.String arg0"); }
Source:
<code><START> public OpenIdConfigurationResponse getConnectDiscoveryResponse(String opConfigurationEndpoint, String opHost, String opDiscoveryPath) { <END> return Strings.isNullOrEmpty(opConfigurationEndpoint) ? getConnectDiscoveryResponse(opHost, opDiscoveryPath) : getConnectDiscoveryResponse(opConfigurationEndpoint); }</code><technical_language>This method is redundant. opConfigurationEndpoint = opHost + opDiscoveryPath. need copy paste. Lets stick single method (refactor existing method re-use) public OpenIdConfigurationResponse getConnectDiscoveryResponse(String opConfigurationEndpoint)</technical_language>

Target:
public OpenIdConfigurationResponse getConnectDiscoveryResponse(String opConfigurationEndpoint, String opHost, String opDiscoveryPath) { return Strings.isNullOrEmpty(opConfigurationEndpoint) ? getConnectDiscoveryResponse(getConnectDiscoveryUrl(opHost, opDiscoveryPath)) : getConnectDiscoveryResponse(opConfigurationEndpoint); }
Source:
<code>ErrorCallback<Object> getErrorCallback() { return (message, throwable) -> { showWarningMessage(); loadConstraintValues(emptyList()); <START> return true; <END> }; }</code><technical_language>want return false prevent _default_ error handler running too. a test I backend throw a RuntimeException I successfully new message. default error handler is invoked I presented a popup showing RuntimeException message too. ![drools-3021](<LINK_0> Oh, replicate putting a client-side break-point DataTypeConstraintEnumeration.setValue(..) L#91 set 1/0 (with quotes)</technical_language>

Target:
ErrorCallback<Object> getErrorCallback() { return (message, throwable) -> { showWarningMessage(); loadConstraintValues(emptyList()); return false; }; }
Source:
<code><START> private static String trimEndOfLine(String line) { <END> int index = line.length()-1; for (; index > 0; index--) { char c = line.charAt(index); if (!Character.isWhitespace(c)) { break; } } return line.substring(0, index+1); }</code><technical_language>I a regex for that: java private static final Pattern RTRIM = Pattern.compile("\\s+$"); public static String ltrim(String s) { return RTRIM.matcher(s).replaceAll(""); }</technical_language>

Target:
private static String trimEndOfLine(String line) { return RTRIM.matcher(line).replaceAll(""); }
Source:
<code>public void addStorageCell( int newStorageCellID ) { this.storageCellDimensionIDs.add( newStorageCellID ); DimensionManager.registerDimension( newStorageCellID, AEConfig.instance.storageProviderID ); NetworkHandler.instance.sendToAll( new PacketNewStorageDimension( newStorageCellID ) ); String[] values = new String[this.storageCellDimensionIDs.size()]; <START> for( int x = 0; x < this.storageCellDimensionIDs.size(); x++ ) <END> { values[x] = String.valueOf( this.storageCellDimensionIDs.get( x ) ); } this.storageCellIDsProperty().set( values ); this.config.save(); }</code><technical_language>super important change xD</technical_language>

Target:
public void addStorageCell( int newStorageCellID ) { this.storageCellDimensionIDs.add( newStorageCellID ); DimensionManager.registerDimension( newStorageCellID, AEConfig.instance.storageProviderID ); NetworkHandler.instance.sendToAll( new PacketNewStorageDimension( newStorageCellID ) ); String[] values = new String[this.storageCellDimensionIDs.size()]; for( int x = 0; x < values.length; x++ ) { values[x] = String.valueOf( this.storageCellDimensionIDs.get( x ) ); } this.storageCellIDsProperty().set( values ); this.config.save(); }
Source:
<code>public void setUserFlag(int flag) { <START> assert(0<= flag); <END> assert(flag<=7); mFlags = (mFlags & ~0b111) | flag; }</code><technical_language>small whitespace suggestion assert(0 <= flag); also, do assert utility yet? assert is useless android</technical_language>

Target:
public void setUserFlag(int flag) { mFlags = setFlagInInt(mFlags, flag); }
Source:
<code>private byte getHopLimit(String upstreamIface) { try { int upstreamHopLimit = Integer.parseUnsignedInt( mNetd.getProcSysNet(INetd.IPV6, INetd.CONF, upstreamIface, "hop_limit")); upstreamHopLimit++; return (byte) Integer.max(upstreamHopLimit, 254); } catch (Exception e) <START> <END> return RaParams.DEFAULT_HOPLIMIT; }</code><technical_language>log error here</technical_language>

Target:
private byte getHopLimit(String upstreamIface) { try { int upstreamHopLimit = Integer.parseUnsignedInt( mNetd.getProcSysNet(INetd.IPV6, INetd.CONF, upstreamIface, "hop_limit")); upstreamHopLimit++; return (byte) Integer.max(upstreamHopLimit, 255); } catch (Exception e) { mLog.e("Failed to find upstream interface hop limit", e); } return RaParams.DEFAULT_HOPLIMIT; }
Source:
<code>public SnomedRf2ExportModel(@Nullable final String refSetId) { super(); clientBranch = BranchPathUtils.createActivePath(SnomedPackage.eINSTANCE); releaseType = ContentSubType.SNAPSHOT; refSetsToExport = true; modulesToExport = Sets.newHashSet(); userId = ApplicationContext.getInstance().getService(ICDOConnectionManager.class).getUserId(); unsetEffectiveTimeLabel = ""; <START> namespace = SnomedExporterUtil.getCountryAndNameSpaceElement(); <END> SnomedRefSetIndexEntry indexEntry = getRefsetIndexEntry(refSetId); if (indexEntry != null) { refSetIds = newHashSet(indexEntry.getId()); singleRefSetExport = true; coreComponentsToExport = false; settings = SnomedExporterUtil.createSettings(singleton(indexEntry)); } else { refSetIds = newHashSet(); singleRefSetExport = false; coreComponentsToExport = true; settings = Sets.newHashSet(); } setExportPath(initExportPath()); }</code><technical_language>Inconsistent variable name</technical_language>

Target:
public SnomedRf2ExportModel(@Nullable final String refSetId) { super(); clientBranch = BranchPathUtils.createActivePath(SnomedPackage.eINSTANCE); releaseType = ContentSubType.SNAPSHOT; refSetsToExport = true; modulesToExport = Sets.newHashSet(); userId = ApplicationContext.getInstance().getService(ICDOConnectionManager.class).getUserId(); unsetEffectiveTimeLabel = ""; countryAndNamespaceId = SnomedExporterUtil.getCountryAndNameSpaceId(); SnomedRefSetIndexEntry indexEntry = getRefsetIndexEntry(refSetId); if (indexEntry != null) { refSetIds = newHashSet(indexEntry.getId()); singleRefSetExport = true; coreComponentsToExport = false; settings = SnomedExporterUtil.createSettings(singleton(indexEntry)); } else { refSetIds = newHashSet(); singleRefSetExport = false; coreComponentsToExport = true; settings = Sets.newHashSet(); } setExportPath(initExportPath()); }
Source:
<code><START> private void verifyRateSensor(final String metricNamePrefix, <END> final String description, final SensorCreator sensorCreator) { setupStreamsMetricsMock(metricNamePrefix); StreamsMetricsImpl.addAmountRateMetricToSensor(sensor, STATE_LEVEL_GROUP, tags, metricNamePrefix, description); replayAndVerify(sensorCreator); }</code><technical_language>nit: I slightly doubt exact match tests necessary</technical_language>

Target:
private void verifyRateSensor(final String metricNamePrefix, final String description, final SensorCreator sensorCreator) { setupStreamsMetricsMock(metricNamePrefix); StreamsMetricsImpl.addRateOfSumMetricToSensor(sensor, STATE_LEVEL_GROUP, tags, metricNamePrefix, description); replayCallAndVerify(sensorCreator); }
Source:
<code>public State as(Class<? extends State> target) { if (target == OnOffType.class) { return equals(ZERO) ? OnOffType.OFF : OnOffType.ON; } else if (target == PercentType.class) { return new PercentType(toBigDecimal().multiply(new BigDecimal(100))); } else if (target == UpDownType.class) { if (equals(ZERO)) { return UpDownType.UP; } else if (toBigDecimal().compareTo(new BigDecimal(1)) == 0) { return UpDownType.DOWN; } else { return UnDefType.UNDEF; } } else if (target == OpenClosedType.class) { if (equals(ZERO)) { return OpenClosedType.CLOSED; } else if (toBigDecimal().compareTo(new BigDecimal(1)) == 0) { return OpenClosedType.OPEN; } else { return UnDefType.UNDEF; } } else if (target == HSBType.class) { return new HSBType(DecimalType.ZERO, PercentType.ZERO, <START> new PercentType(this.toBigDecimal().multiply(new BigDecimal(100)))); <END> } else { return StateConverterUtil.defaultConversion(this, target); } }</code><technical_language>BigDecimal.valueOf(100) is preferred new BigDecimal(100): "This 'static factory method' is provided in preference a (long) constructor allows for reuse of frequently BigDecimal values." ([link](<LINK_0> (another instance also)</technical_language>

Target:
public State as(Class<? extends State> target) { if (target == OnOffType.class) { return equals(ZERO) ? OnOffType.OFF : OnOffType.ON; } else if (target == PercentType.class) { return new PercentType(toBigDecimal().multiply(BigDecimal.valueOf(100))); } else if (target == UpDownType.class) { if (equals(ZERO)) { return UpDownType.UP; } else if (toBigDecimal().compareTo(BigDecimal.valueOf(1)) == 0) { return UpDownType.DOWN; } else { return UnDefType.UNDEF; } } else if (target == OpenClosedType.class) { if (equals(ZERO)) { return OpenClosedType.CLOSED; } else if (toBigDecimal().compareTo(BigDecimal.valueOf(1)) == 0) { return OpenClosedType.OPEN; } else { return UnDefType.UNDEF; } } else if (target == HSBType.class) { return new HSBType(DecimalType.ZERO, PercentType.ZERO, new PercentType(this.toBigDecimal().multiply(BigDecimal.valueOf(100)))); } else { return StateConverterUtil.defaultConversion(this, target); } }
Source:
<code>public void create(Run run) throws Exception { <START> MavenWorkspaceRepository repo = run.getPlugin(MavenWorkspaceRepository.class); <END> if (repo == null) { run.addBasicPlugin(new MavenWorkspaceRepository()); } }</code><technical_language>I this work. I need add plugin Run's workspace. other changes above, workspace a standalone workspace</technical_language>

Target:
public void create(Run run) throws Exception { Workspace workspace = run.getWorkspace(); MavenWorkspaceRepository repo = workspace.getPlugin(MavenWorkspaceRepository.class); if (repo == null) { workspace.addBasicPlugin(new MavenWorkspaceRepository()); } }
Source:
<code>private void handleOverReplicatedContainer(final ContainerInfo container, final Set<ContainerReplica> replicas) { final ContainerID id = container.containerID(); final int replicationFactor = container.getReplicationFactor().getNumber(); <START> final int deficit = replicas.size() - replicationFactor - <END> inflightDeletion.getOrDefault(id, Collections.emptyList()).size(); if (deficit > 0) { final Map<UUID, ContainerReplica> uniqueReplicas = new LinkedHashMap<>(); replicas.stream() .filter(r -> compareState(container.getState(), r.getState())) .forEach(r -> uniqueReplicas .putIfAbsent(r.getOriginDatanodeId(), r)); final List<ContainerReplica> eligibleReplicas = new ArrayList<>(replicas); eligibleReplicas.removeAll(uniqueReplicas.values()); final List<ContainerReplica> unhealthyReplicas = eligibleReplicas .stream() .filter(r -> !compareState(container.getState(), r.getState())) .collect(Collectors.toList()); eligibleReplicas.removeAll(unhealthyReplicas); eligibleReplicas.addAll(0, unhealthyReplicas); inflightDeletion.computeIfAbsent(id, k -> new ArrayList<>()); for (int i = 0; i < deficit; i++) { sendDeleteCommand(container, eligibleReplicas.get(i).getDatanodeDetails(), true); } } }</code><technical_language>Addressed</technical_language>

Target:
private void handleOverReplicatedContainer(final ContainerInfo container, final Set<ContainerReplica> replicas) { final ContainerID id = container.containerID(); final int replicationFactor = container.getReplicationFactor().getNumber(); final int excess = replicas.size() - replicationFactor - inflightDeletion.getOrDefault(id, Collections.emptyList()).size(); if (excess > 0) { LOG.info("Container is over replicated. Expected replica count" + " is {}, but found {}.", id, replicationFactor, replicationFactor + excess); final Map<UUID, ContainerReplica> uniqueReplicas = new LinkedHashMap<>(); replicas.stream() .filter(r -> compareState(container.getState(), r.getState())) .forEach(r -> uniqueReplicas .putIfAbsent(r.getOriginDatanodeId(), r)); final List<ContainerReplica> eligibleReplicas = new ArrayList<>(replicas); eligibleReplicas.removeAll(uniqueReplicas.values()); final List<ContainerReplica> unhealthyReplicas = eligibleReplicas .stream() .filter(r -> !compareState(container.getState(), r.getState())) .collect(Collectors.toList()); eligibleReplicas.removeAll(unhealthyReplicas); eligibleReplicas.addAll(0, unhealthyReplicas); for (int i = 0; i < excess; i++) { sendDeleteCommand(container, eligibleReplicas.get(i).getDatanodeDetails(), true); } } }
Source:
<code>} catch (HibernateException ex) { <START> LOG.error("Initial SessionFactory creation failed." + ex); <END> throw new ExceptionInInitializerError(ex); }</code><technical_language>log ex.getLocalizedMessage()</technical_language>

Target:
} catch (HibernateException ex) { LOG.error("Initial SessionFactory creation failed." + ex.getLocalizedMessage(), ex); throw new ExceptionInInitializerError(ex); }
Source:
<code>public void exampleFuture3(Vertx vertx, Future<Void> startFuture) { FileSystem fs = vertx.fileSystem(); Future<Void> fut1 = Future.future(); Future<Void> fut2 = Future.future(); fs.createFile("/foo", fut1.completer()); <START> fut1.compose(string -> { <END> fs.writeFile("/foo", Buffer.buffer(), fut2.completer()); }, fut2); fut2.compose(integer -> { fs.move("/foo", "/bar", startFuture.completer()); }, startFuture); }</code><technical_language>parameter name is confusing, I think</technical_language>

Target:
public void exampleFuture3(Vertx vertx, Future<Void> startFuture) { FileSystem fs = vertx.fileSystem(); Future<Void> fut1 = Future.future(); Future<Void> fut2 = Future.future(); fs.createFile("/foo", fut1.completer()); fut1.compose(v -> { fs.writeFile("/foo", Buffer.buffer(), fut2.completer()); }, fut2); fut2.compose(v -> { fs.move("/foo", "/bar", startFuture.completer()); }, startFuture); }
Source:
<code>public void visitNode(Tree tree) { if(!hasSemantic()) { return; } ClassTree classTree = (ClassTree) tree; Type superType = classTree.symbol().superClass(); IdentifierTree className = classTree.simpleName(); if(className == null || superType == null || !(superType.is("java.io.OutputStream") || superType.is("java.io.FilterOutputStream"))) { return; } Optional<MethodTree> writeByteIntInt = classTree.members() .stream() .filter(m -> m.is(Tree.Kind.METHOD)) .map(m -> (MethodTree) m) .filter(WRITE_BYTES_INT_INT::matches) .findFirst(); <START> if(!writeByteIntInt.isPresent()) { <END> reportIssue(className, "Provide an override of \"write(byte[],int,int)\" for this class."); } }</code><technical_language>I enough, in case of a abstract direct subtypes of OutputStream, implementing write(int b) this raise a FP. asking for implementing write(byte[], int, int), while write(int) is implemented? For direct subtypes of FilterOutputStream enough, method is implemented</technical_language>

Target:
public void visitNode(Tree tree) { if (!hasSemantic()) { return; } ClassTree classTree = (ClassTree) tree; Type superType = classTree.symbol().superClass(); IdentifierTree className = classTree.simpleName(); if (className == null || classTree.symbol().isAbstract() || superType == null || !(superType.is("java.io.OutputStream") || superType.is("java.io.FilterOutputStream"))) { return; } Optional<MethodTree> writeByteIntInt = findMethod(classTree, WRITE_BYTES_INT_INT); Optional<MethodTree> writeInt = findMethod(classTree, WRITE_INT); if (!writeByteIntInt.isPresent()) { String message = "Provide an override of \"write(byte[],int,int)\" for this class."; if (writeInt.isPresent()) { MethodTree writeIntTree = writeInt.get(); if (writeIntTree.block().body().isEmpty()) { message = "Provide an empty override of \"write(byte[],int,int)\" for this class as well."; } } reportIssue(className, message); } }
Source:
<code>private List<ProcessResult> process(TaskSource taskSource, Schema schema, int processorCount) { List<Future<ProcessResult>> futures = new ArrayList<>(); List<ProcessResult> joined = new ArrayList<>(); try { log.info("Start bulk processing"); showProgress(0, processorCount); for (int i=0; i < processorCount; i++) { futures.add(startProcessor(taskSource, schema, i)); } for (int i=0; i < processorCount; i++) { try { joined.add(futures.get(i).get()); <START> showProgress(i + 1, processorCount); <END> } catch (ExecutionException ex) { throw Throwables.propagate(ex.getCause()); } catch (InterruptedException ex) { throw new ExecuteInterruptedException(ex); } } return joined; } finally { for (int i=joined.size(); i < futures.size(); i++) { futures.get(i).cancel(true); } } }</code><technical_language>I realized this is incorrect counting. Next thread finish thread finishes. need completedTaskCount runningTaskCount</technical_language>

Target:
private List<ProcessResult> process(TaskSource taskSource, Schema schema, int processorCount) { List<Future<ProcessResult>> futures = new ArrayList<>(); List<ProcessResult> joined = new ArrayList<>(); try { log.info("Start bulk processing"); showProgress(processorCount); for (int i=0; i < processorCount; i++) { futures.add(startProcessor(taskSource, schema, i)); } for (int i=0; i < processorCount; i++) { try { joined.add(futures.get(i).get()); showProgress(processorCount); } catch (ExecutionException ex) { throw Throwables.propagate(ex.getCause()); } catch (InterruptedException ex) { throw new ExecuteInterruptedException(ex); } } return joined; } finally { for (int i=joined.size(); i < futures.size(); i++) { futures.get(i).cancel(true); } } }
Source:
<code>public void testFiveNodeK1TwoRacks() throws JSONException { <START> TestDescription td = getBoringDescription(5, 6, 1, 2, 1); <END> subTestDescription(td, false); }</code><technical_language>If leafCount is 1, rack groups</technical_language>

Target:
public void testFiveNodeK1TwoRacks() throws JSONException { TestDescription td = getBoringDescription(5, 6, 1, 1, 2); subTestDescription(td, false); }
Source:
<code><START> public void testCurrentLogFileNameIsEmptyAndAppenderUsesArchivedNameInstead() throws Exception { <END> final Logger root = (Logger) LoggerFactory.getLogger(org.slf4j.Logger.ROOT_LOGGER_NAME); final FileAppenderFactory<ILoggingEvent> appenderFactory = new FileAppenderFactory<>(); appenderFactory.setArchivedLogFilenamePattern(folder.newFile("test-archived-name-%d.log").toString()); final Appender<ILoggingEvent> appender = appenderFactory.build(root.getLoggerContext(), "test", new DropwizardLayoutFactory(), new NullLevelFilterFactory<>(), new AsyncLoggingEventAppenderFactory()); RollingFileAppender<ILoggingEvent> rollingAppender = (RollingFileAppender<ILoggingEvent>) ((AsyncAppender) appender).getAppender("file-appender"); String file = rollingAppender.getFile(); String dateSuffic = LocalDateTime.now().format(DateTimeFormatter.ofPattern("YYYY-MM-dd")); String[] split = file.split("/"); Assert.assertEquals("test-archived-name-" + dateSuffic + ".log", split[split.length-1]); }</code><technical_language>do feel implementation instead (it's a bit shorter): java @Test public void testCurrentLogFileNameIsEmptyAndAppenderUsesArchivedNameInstead() throws Exception { final FileAppenderFactory<ILoggingEvent> appenderFactory = new FileAppenderFactory<>(); appenderFactory.setArchivedLogFilenamePattern(folder.newFile("test-archived-name-%d.log").toString()); final FileAppender<ILoggingEvent> rollingAppender = appenderFactory.buildAppender(new LoggerContext()); final String file = rollingAppender.getFile(); final String dateSuffix = LocalDateTime.now().format(DateTimeFormatter.ofPattern("YYYY-MM-dd")); final String name = Files.getNameWithoutExtension(file); Assert.assertEquals("test-archived-name-" + dateSuffix, name); }</technical_language>

Target:
public void testCurrentLogFileNameIsEmptyAndAppenderUsesArchivedNameInstead() throws Exception { final FileAppenderFactory<ILoggingEvent> appenderFactory = new FileAppenderFactory<>(); appenderFactory.setArchivedLogFilenamePattern(folder.newFile("test-archived-name-%d.log").toString()); final FileAppender<ILoggingEvent> rollingAppender = appenderFactory.buildAppender(new LoggerContext()); final String file = rollingAppender.getFile(); final String dateSuffix = LocalDateTime.now().format(DateTimeFormatter.ofPattern("YYYY-MM-dd")); final String name = Files.getNameWithoutExtension(file); Assert.assertEquals("test-archived-name-" + dateSuffix, name); }
Source:
<code>public Map<String, String> getFilteredSubnetWithCidr(String environmentCrn, Stack stack, String networkId, Collection<String> subnetIds) { Credential credential = credentialService.getCredentialByEnvCrn(environmentCrn); ExtendedCloudCredential cloudCredential = extendedCloudCredentialConverter.convert(credential); <START> Map<String, String> filter = new HashMap<>(); NetworkFilterProvider networkFilterProvider = networkFilterProviderMap.get(CloudPlatform.valueOf(stack.getCloudPlatform())); if (networkFilterProvider != null) { filter = networkFilterProvider.provide(stack.getNetwork(), networkId, subnetIds); } <END> CloudNetworks cloudNetworks = cloudParameterService.getCloudNetworks(cloudCredential, stack.getRegion(), stack.getPlatformvariant(), filter); LOGGER.debug("Received Cloud networks for region [{}]: {}", stack.getRegion(), cloudNetworks.getCloudNetworkResponses().get(stack.getRegion())); return cloudNetworks.getCloudNetworkResponses().getOrDefault(stack.getRegion(), Collections.emptySet()).stream() .filter(cloudNetwork -> { String[] splittedNetworkId = cloudNetwork.getId().split("/"); String cloudNetworkId = splittedNetworkId[splittedNetworkId.length - 1]; return networkId.equals(cloudNetworkId) || networkId.equals(cloudNetwork.getName()); }) .flatMap(cloudNetwork -> cloudNetwork.getSubnetsMeta().stream()) .filter(cloudSubnet -> StringUtils.isNoneBlank(cloudSubnet.getId(), cloudSubnet.getCidr())) .filter(cloudSubnet -> subnetIds.contains(cloudSubnet.getId()) || subnetIds.contains(cloudSubnet.getName())) .collect(Collectors.toMap(CloudSubnet::getId, CloudSubnet::getCidr)); }</code><technical_language>moved a separate method, createFilter</technical_language>

Target:
public Map<String, String> getFilteredSubnetWithCidr(String environmentCrn, Stack stack, String networkId, Collection<String> subnetIds) { Credential credential = credentialService.getCredentialByEnvCrn(environmentCrn); ExtendedCloudCredential cloudCredential = extendedCloudCredentialConverter.convert(credential); Map<String, String> filter = getFilter(stack, networkId, subnetIds); CloudNetworks cloudNetworks = cloudParameterService.getCloudNetworks(cloudCredential, stack.getRegion(), stack.getPlatformvariant(), filter); LOGGER.debug("Received Cloud networks for region [{}]: {}", stack.getRegion(), cloudNetworks.getCloudNetworkResponses().get(stack.getRegion())); return cloudNetworks.getCloudNetworkResponses().getOrDefault(stack.getRegion(), Collections.emptySet()).stream() .filter(cloudNetwork -> { String[] splittedNetworkId = cloudNetwork.getId().split("/"); String cloudNetworkId = splittedNetworkId[splittedNetworkId.length - 1]; return networkId.equals(cloudNetworkId) || networkId.equals(cloudNetwork.getName()); }) .flatMap(cloudNetwork -> cloudNetwork.getSubnetsMeta().stream()) .filter(cloudSubnet -> StringUtils.isNoneBlank(cloudSubnet.getId(), cloudSubnet.getCidr())) .filter(cloudSubnet -> subnetIds.contains(cloudSubnet.getId()) || subnetIds.contains(cloudSubnet.getName())) .collect(Collectors.toMap(CloudSubnet::getId, CloudSubnet::getCidr)); }
Source:
<code><START> private void finishAndRecordTimings() { <END> timeBag.finishGlobalStage("Finished"); StringBuilder timingsToLog = new StringBuilder(); timingsToLog.append("TxRecovery Status and Timings [txs=").append(txCnt.get()); for (String stageTiming : timeBag.stagesTimings()) timingsToLog.append(", ").append(stageTiming); timingsToLog.append("]"); log.info(timingsToLog.toString()); }</code><technical_language>This executed transaction? recovery some node failed</technical_language>

Target:
private void finishAndRecordTimings() { timeBag.finishGlobalStage("Finished"); StringBuilder timingsToLog = new StringBuilder(); timingsToLog.append("TxRecovery Status and Timings [txs=").append(preparedTxCnt.get()); for (String stageTiming : timeBag.stagesTimings()) timingsToLog.append(", ").append(stageTiming); timingsToLog.append("]"); log.info(timingsToLog.toString()); }